[AAE-10219] Add css to align according to alignment property in RadioField (#7750)

* [AAE-10219] Add css to align according to alignment property in RadioField

* [AAE-10219] Add css to align according to alignment property in RadioField

* trigger travis

* Fix nx build core

* reduce dependsOn config

* update demoshell cspell path

* [AAE-10460] fix storybook config (#7785)

* [AAE-10460] fix storybook config

* trigger travis

* trigger travis

Co-authored-by: Rafal Szmit <rafal.szmit@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
Co-authored-by: Tomasz Gnyp <49343696+tomgny@users.noreply.github.com>
This commit is contained in:
Sushmitha V 2022-08-26 04:09:01 +05:30 committed by GitHub
parent 76c98c53ed
commit 2ef40b150f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 29 deletions

View File

@ -260,7 +260,7 @@
"options": { "options": {
"commands": [ "commands": [
{ {
"command": "$(npm bin)/cspell 'lib/demo-shell/**/*.ts'" "command": "$(npm bin)/cspell 'demo-shell/**/*.ts'"
} }
] ]
} }
@ -306,7 +306,7 @@
"tsConfig": "lib/core/tsconfig.lib.json", "tsConfig": "lib/core/tsconfig.lib.json",
"project": "lib/core/ng-package.json" "project": "lib/core/ng-package.json"
}, },
"dependsOn": ["license"], "dependsOn": ["license", "^build"],
"configurations": { "configurations": {
"production": { "production": {
"project": "lib/core/ng-package.json", "project": "lib/core/ng-package.json",
@ -339,11 +339,7 @@
"lib/core/api/**/*.ts", "lib/core/api/**/*.ts",
"lib/core/api/**/*.html" "lib/core/api/**/*.html"
] ]
}, }
"dependsOn": [
"spellcheck",
"stylelint"
]
}, },
"storybook": { "storybook": {
"builder": "@storybook/angular:start-storybook", "builder": "@storybook/angular:start-storybook",
@ -454,11 +450,7 @@
"lib/content-services/**/*.ts", "lib/content-services/**/*.ts",
"lib/content-services/**/*.html" "lib/content-services/**/*.html"
] ]
}, }
"dependsOn": [
"spellcheck",
"stylelint"
]
}, },
"storybook": { "storybook": {
"builder": "@storybook/angular:start-storybook", "builder": "@storybook/angular:start-storybook",
@ -559,11 +551,7 @@
"lib/process-services/**/*.ts", "lib/process-services/**/*.ts",
"lib/process-services/**/*.html" "lib/process-services/**/*.html"
] ]
}, }
"dependsOn": [
"spellcheck",
"stylelint"
]
}, },
"spellcheck": { "spellcheck": {
"executor": "nx:run-commands", "executor": "nx:run-commands",
@ -632,11 +620,7 @@
"lib/process-services-cloud/**/*.ts", "lib/process-services-cloud/**/*.ts",
"lib/process-services-cloud/**/*.html" "lib/process-services-cloud/**/*.html"
] ]
}, }
"dependsOn": [
"spellcheck",
"stylelint"
]
}, },
"storybook": { "storybook": {
"builder": "@storybook/angular:start-storybook", "builder": "@storybook/angular:start-storybook",
@ -737,11 +721,7 @@
"lib/insights/**/*.ts", "lib/insights/**/*.ts",
"lib/insights/**/*.html" "lib/insights/**/*.html"
] ]
}, }
"dependsOn": [
"spellcheck",
"stylelint"
]
}, },
"spellcheck": { "spellcheck": {
"executor": "nx:run-commands", "executor": "nx:run-commands",

View File

@ -76,6 +76,7 @@ export class FormFieldModel extends FormWidgetModel {
currency: string = null; currency: string = null;
dateDisplayFormat: string = this.defaultDateFormat; dateDisplayFormat: string = this.defaultDateFormat;
selectionType: 'single' | 'multiple' = null; selectionType: 'single' | 'multiple' = null;
alignmentType: 'vertical' | 'horizontal' = null;
rule?: FormFieldRule; rule?: FormFieldRule;
selectLoggedUser: boolean; selectLoggedUser: boolean;
groupsRestriction: string[]; groupsRestriction: string[];
@ -189,6 +190,7 @@ export class FormFieldModel extends FormWidgetModel {
this.validationSummary = new ErrorMessageModel(); this.validationSummary = new ErrorMessageModel();
this.tooltip = json.tooltip; this.tooltip = json.tooltip;
this.selectionType = json.selectionType; this.selectionType = json.selectionType;
this.alignmentType = json.alignmentType;
this.rule = json.rule; this.rule = json.rule;
this.selectLoggedUser = json.selectLoggedUser; this.selectLoggedUser = json.selectLoggedUser;
this.groupsRestriction = json.groupsRestriction?.groups; this.groupsRestriction = json.groupsRestriction?.groups;

View File

@ -1,8 +1,8 @@
<div class="adf-radio-buttons-widget-cloud {{field.className}}" <div class="adf-radio-buttons-widget-cloud {{field.className}}"
[class.adf-readonly]="field.readOnly" [id]="field.id"> [class.adf-readonly]="field.readOnly" [id]="field.id">
<div class="adf-radio-button-container"> <div [ngClass]="(field.alignmentType === 'vertical') ? 'adf-radio-button-container': 'adf-radio-button-container-horizontal'">
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span class="adf-asterisk" *ngIf="isRequired()">*</span></label> <label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span class="adf-asterisk" *ngIf="isRequired()">*</span></label>
<mat-radio-group class="adf-radio-group" [(ngModel)]="field.value" [disabled]="field.readOnly"> <mat-radio-group [ngClass]="(field.alignmentType === 'vertical') ? 'adf-radio-group': 'adf-radio-group-horizontal'" class="adf-radio-group" [(ngModel)]="field.value" [disabled]="field.readOnly">
<mat-radio-button <mat-radio-button
[matTooltip]="field.tooltip" [matTooltip]="field.tooltip"
matTooltipPosition="above" matTooltipPosition="above"

View File

@ -5,6 +5,12 @@
flex-direction: column; flex-direction: column;
} }
&-radio-button-container-horizontal {
margin-bottom: 15px;
display: flex;
flex-direction: row;
}
&-radio-group { &-radio-group {
margin-top: 15px; margin-top: 15px;
margin-left: 5px; margin-left: 5px;
@ -12,6 +18,13 @@
flex-direction: column; flex-direction: column;
} }
&-radio-group-horizontal {
margin-top: 0;
margin-left: 25%;
display: inline-flex;
display: table-column-group;
}
&-radio-button { &-radio-button {
margin: 5px; margin: 5px;
} }

View File

@ -30,6 +30,12 @@
"targetDefaults": { "targetDefaults": {
"build": { "build": {
"dependsOn": ["^build"] "dependsOn": ["^build"]
},
"lint": {
"dependsOn": [
"spellcheck",
"stylelint"
]
} }
}, },
"tasksRunnerOptions": { "tasksRunnerOptions": {