@daffodil/design 0.91.0 → 0.92.3-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/README.md +26 -38
- package/accordion/index.d.ts +2 -2
- package/article/README.md +66 -46
- package/article/index.d.ts +22 -1
- package/article/src/article-theme.scss +12 -0
- package/breadcrumb/README.md +6 -1
- package/breadcrumb/index.d.ts +65 -11
- package/breadcrumb/src/breadcrumb-theme.scss +1 -1
- package/button/README.md +36 -33
- package/button/index.d.ts +26 -5
- package/button/src/button/basic/button-theme.scss +4 -2
- package/button/src/button/button-base.scss +26 -3
- package/button/src/button/icon/icon-theme.scss +10 -6
- package/button/src/button/raised/raised-theme.scss +4 -2
- package/callout/README.md +15 -27
- package/card/README.md +36 -61
- package/container/README.md +18 -23
- package/fesm2022/daffodil-design-accordion.mjs +13 -13
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +168 -26
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +83 -42
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +23 -23
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +33 -33
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +13 -13
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +8 -8
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +26 -26
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +9 -9
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +23 -23
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +18 -14
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +25 -17
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +16 -16
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +223 -60
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +33 -29
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +47 -41
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +25 -21
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +16 -16
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +7 -7
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +17 -14
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +16 -16
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +6 -6
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +25 -25
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +99 -0
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
- package/fesm2022/daffodil-design-switch.mjs +3 -3
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +15 -15
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +7 -7
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +6 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +23 -25
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +152 -103
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +385 -326
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form-field/README.md +50 -85
- package/form-field/index.d.ts +11 -9
- package/hero/README.md +5 -5
- package/image/README.md +2 -2
- package/index.d.ts +184 -270
- package/input/README.md +4 -4
- package/input/index.d.ts +4 -3
- package/link-set/index.d.ts +9 -1
- package/list/README.md +2 -2
- package/loading-icon/README.md +1 -1
- package/loading-icon/index.d.ts +1 -1
- package/media-gallery/README.md +3 -3
- package/menu/README.md +107 -10
- package/menu/index.d.ts +143 -11
- package/modal/README.md +1 -1
- package/modal/index.d.ts +23 -15
- package/native-select/README.md +4 -4
- package/native-select/index.d.ts +8 -7
- package/navbar/README.md +23 -17
- package/navbar/index.d.ts +12 -2
- package/navbar/src/navbar-theme.scss +4 -46
- package/notification/README.md +4 -4
- package/package.json +1 -1
- package/paginator/README.md +42 -6
- package/paginator/index.d.ts +4 -2
- package/progress-bar/README.md +3 -3
- package/quantity-field/README.md +4 -4
- package/quantity-field/index.d.ts +4 -1
- package/radio/README.md +1 -1
- package/scss/theme.scss +7 -1
- package/scss/theming/_color-palettes.scss +0 -6
- package/select/README.md +4 -4
- package/sidebar/README.md +6 -6
- package/spinner/README.md +57 -0
- package/spinner/index.d.ts +53 -0
- package/spinner/src/spinner-theme.scss +62 -0
- package/switch/README.md +4 -4
- package/switch/index.d.ts +2 -2
- package/tabs/README.md +1 -1
- package/tabs/index.d.ts +2 -2
- package/tag/README.md +24 -30
- package/tag/index.d.ts +1 -1
- package/text-snippet/README.md +1 -1
- package/text-snippet/src/text-snippet-theme.scss +12 -0
- package/textarea/README.md +4 -4
- package/textarea/index.d.ts +4 -4
- package/toast/README.md +4 -4
- package/tree/README.md +39 -22
- package/tree/index.d.ts +57 -90
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-checkbox.mjs","sources":["../../../libs/design/checkbox/src/checkbox/checkbox.component.ts","../../../libs/design/checkbox/src/checkbox/checkbox.component.html","../../../libs/design/checkbox/src/checkbox-set/checkbox-set.component.ts","../../../libs/design/checkbox/src/checkbox-set/checkbox-set.component.html","../../../libs/design/checkbox/src/cva/checkbox-cva.directive.ts","../../../libs/design/checkbox/src/checkbox.module.ts","../../../libs/design/checkbox/src/checkbox.ts","../../../libs/design/checkbox/src/daffodil-design-checkbox.ts"],"sourcesContent":["import {\n Component,\n Input,\n HostBinding,\n ChangeDetectionStrategy,\n EventEmitter,\n Output,\n ChangeDetectorRef,\n ViewChild,\n ElementRef,\n} from '@angular/core';\n\nlet checkboxIdNum = 0;\n\n@Component({\n selector: 'daff-checkbox',\n templateUrl: './checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffCheckboxComponent {\n /**\n * @docs-private\n */\n @ViewChild('inputElement', { static: true, read: ElementRef }) nativeCheckbox: ElementRef<HTMLInputElement>;\n /**\n * The name of the checkbox.\n */\n @Input() name: string;\n /**\n * The value of the checkbox.\n */\n @Input() value: any;\n /**\n * Boolean value to determine whether or not the checkbox is checked.\n */\n private _checked = false;\n\n @Input()\n get checked() {\n return this._checked;\n }\n set checked(value: boolean) {\n if (this._checked === value) {\n return;\n }\n if (value === true) {\n this.nativeCheckbox.nativeElement.checked = true;\n this.becameChecked.emit(this._checked);\n } else {\n this.nativeCheckbox.nativeElement.checked = false;\n this.becameUnchecked.emit();\n }\n\n this._checked = value;\n }\n /**\n * The id of the checkbox. Must be unique. If not entered by a user then it is generated.\n */\n @Input() id: string = 'daff-checkbox-' + checkboxIdNum;\n\n /**\n * The aria-label of the checkbox.\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('aria-label') label = '';\n\n /**\n * The aria-labeledby of the checkbox.\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('aria-labelledby') labeledBy: string;\n\n /**\n * Event on whether or not the selection has changed.\n */\n @Output() becameChecked: EventEmitter<boolean> = new EventEmitter();\n @Output() becameUnchecked: EventEmitter<void> = new EventEmitter();\n\n /**\n * Whether the checkbox is focused\n */\n focused: boolean;\n /**\n * Whether the checkbox is disabled.\n */\n disabled: boolean;\n\n /**\n * The role of the component. Set to \"checkbox\".\n *\n * @docs-private\n */\n @HostBinding('attr.role') role = 'checkbox';\n\n\n /**\n * @docs-private\n */\n _onChange(val: Event) {\n if ((<HTMLInputElement>val.target).checked) {\n this.select();\n } else {\n this.deselect();\n }\n };\n /**\n * @docs-private\n */\n @HostBinding('class.focused') get focusClass() {\n return this.focused === true;\n };\n /**\n * @docs-private\n */\n @HostBinding('class.disabled') get disabledClass() {\n return this.disabled === true;\n };\n /**\n * Sets focused to false.\n */\n onBlur() {\n this.focused = false;\n }\n /**\n * Sets focused to true.\n */\n onFocus() {\n this.focused = true;\n }\n\n constructor(private _cdRef: ChangeDetectorRef) {\n /**\n * Increments id number on new checkbox. Gurantees unique ID on generation.\n */\n checkboxIdNum++;\n }\n /**\n * Sets checked to true.\n */\n select() {\n this.checked = true;\n this._cdRef.markForCheck();\n }\n /**\n * Sets checked to false\n */\n deselect() {\n this.checked = false;\n this._cdRef.markForCheck();\n }\n}\n","<input #inputElement\ntype=\"checkbox\"\n[attr.aria-label]=\"label\"\n[attr.aria-labelledby]=\"labeledBy\"\n[attr.checked]=\"checked ? '' : null\"\n[attr.id] = \"id\"\n[attr.value]=\"value\"\n[attr.name]=\"name\"\n[attr.disabled] = \"disabled ? '' : null\" \n(change)=\"_onChange($event)\"\n(blur)=\"onBlur()\"\n(focus)=\"onFocus()\"\n/>\n<label [attr.for]=\"id\"><ng-content></ng-content></label>","import {\n Component,\n Input,\n HostBinding,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { UntypedFormArray } from '@angular/forms';\n\nimport { DaffCheckboxComponent } from '../checkbox/checkbox.component';\n\n@Component({\n selector: 'daff-checkbox-set',\n templateUrl: './checkbox-set.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffCheckboxSetComponent {\n\n @Input() formArray: UntypedFormArray;\n /**\n * The name of the checkbox-set\n */\n @Input() name: string;\n\n /**\n * The role of the component. Set to \"checkbox\".\n *\n * @docs-private\n */\n @HostBinding('attr.role') role = 'group';\n\n /**\n * The list of checkboxes in the set.\n *\n * @docs-private\n */\n @ContentChildren(DaffCheckboxComponent) checkboxes: QueryList<DaffCheckboxComponent>;\n\n @Output() valueList = new EventEmitter<any[]>();\n\n getValues(): any[] {\n const checkboxes = this.checkboxes.toArray();\n return this.formArray.value.map((element, index) => element === true ? checkboxes[index].value : false).filter(element => element !== false);\n }\n}\n","<ng-content></ng-content>","import {\n Directive,\n Input,\n OnInit,\n Self,\n Optional,\n} from '@angular/core';\nimport {\n NgControl,\n ControlValueAccessor,\n} from '@angular/forms';\n\nimport { DaffCheckboxComponent } from '../checkbox/checkbox.component';\n\n/**\n * A directive for binding the DaffCheckboxComponent and the Control Value Accessor.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-checkbox[ngModel], daff-checkbox[formControl], daff-checkbox[formControlName]',\n})\nexport class DaffCheckboxControlValueAccessorDirective implements OnInit, ControlValueAccessor {\n _onChange: (val: any) => void;\n _onTouched: () => void;\n\n /**\n * The value of the ControlValueAccessor\n */\n @Input() value: any;\n\n /**\n * The name of the ControlValueAccessor\n */\n @Input() name: string;\n\n constructor(\n @Optional() @Self() public _control: NgControl,\n private _checkbox: DaffCheckboxComponent,\n ) {\n if (this._control != null) {\n this._control.valueAccessor = this;\n }\n }\n\n\n /**\n * A lifecycle method called when the directive is initialized.\n */\n /**\n * @docs-private\n */\n ngOnInit(): void {\n // See the note about `writeValue` usage.\n this.writeValue(this._control.value);\n\n // Watch for user events on the component to update the state\n this._checkbox.becameChecked.subscribe(\n () => {\n this._onChange(true);\n },\n );\n this._checkbox.becameUnchecked.subscribe(\n () => {\n this._onChange(false);\n },\n );\n }\n\n /**\n * writes a new value down into the component.\n */\n writeValue(value: any): void {\n value = !!value;\n if (value === true) {\n this.fireSelect();\n } else {\n this.fireDeselect();\n }\n }\n\n /**\n * Registers the change handler\n */\n registerOnChange(fn: any): void {\n this._onChange = (val) => {\n fn(val);\n };\n }\n\n /**\n * Registers the touched handler\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the disabled state.\n */\n setDisabledState?(isDisabled: boolean): void {\n this._checkbox.disabled = isDisabled;\n }\n\n /**\n * calls the child checkbox's select function\n */\n fireSelect() {\n this._checkbox.select();\n }\n\n /**\n * calls the child checkbox's deselect function\n */\n fireDeselect() {\n this._checkbox.deselect();\n }\n\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffCheckboxComponent } from './checkbox/checkbox.component';\nimport { DaffCheckboxSetComponent } from './checkbox-set/checkbox-set.component';\nimport { DaffCheckboxControlValueAccessorDirective } from './cva/checkbox-cva.directive';\n\n@NgModule({\n exports: [\n DaffCheckboxComponent,\n DaffCheckboxSetComponent,\n DaffCheckboxControlValueAccessorDirective,\n ],\n imports: [\n CommonModule,\n DaffCheckboxComponent,\n DaffCheckboxSetComponent,\n DaffCheckboxControlValueAccessorDirective,\n ],\n providers: [\n DaffCheckboxSetComponent,\n ],\n})\nexport class DaffCheckboxModule { }\n","import { DaffCheckboxComponent } from './checkbox/checkbox.component';\nimport { DaffCheckboxSetComponent } from './checkbox-set/checkbox-set.component';\nimport { DaffCheckboxControlValueAccessorDirective } from './cva/checkbox-cva.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_CHECKBOX_COMPONENTS = <const> [\n DaffCheckboxComponent,\n DaffCheckboxSetComponent,\n DaffCheckboxControlValueAccessorDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.DaffCheckboxComponent"],"mappings":";;;;;AAYA,IAAI,aAAa,GAAG,CAAC;MAOR,qBAAqB,CAAA;AAkBhC,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ;IACtB;IACA,IAAI,OAAO,CAAC,KAAc,EAAA;AACxB,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC3B;QACF;AACA,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,GAAG,IAAI;YAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QACxC;aAAO;YACL,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,GAAG,KAAK;AACjD,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;QAC7B;AAEA,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;IACvB;AAyCA;;AAEG;AACH,IAAA,SAAS,CAAC,GAAU,EAAA;AAClB,QAAA,IAAuB,GAAG,CAAC,MAAO,CAAC,OAAO,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B;IACrB,wBAAwB;IACxB,yCAAyC;;;ACV3C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-checkbox.mjs","sources":["../../../libs/design/checkbox/src/checkbox/checkbox.component.ts","../../../libs/design/checkbox/src/checkbox/checkbox.component.html","../../../libs/design/checkbox/src/checkbox-set/checkbox-set.component.ts","../../../libs/design/checkbox/src/checkbox-set/checkbox-set.component.html","../../../libs/design/checkbox/src/cva/checkbox-cva.directive.ts","../../../libs/design/checkbox/src/checkbox.module.ts","../../../libs/design/checkbox/src/checkbox.ts","../../../libs/design/checkbox/src/daffodil-design-checkbox.ts"],"sourcesContent":["import {\n Component,\n Input,\n HostBinding,\n ChangeDetectionStrategy,\n EventEmitter,\n Output,\n ChangeDetectorRef,\n ViewChild,\n ElementRef,\n} from '@angular/core';\n\nlet checkboxIdNum = 0;\n\n@Component({\n selector: 'daff-checkbox',\n templateUrl: './checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffCheckboxComponent {\n /**\n * @docs-private\n */\n @ViewChild('inputElement', { static: true, read: ElementRef }) nativeCheckbox: ElementRef<HTMLInputElement>;\n /**\n * The name of the checkbox.\n */\n @Input() name: string;\n /**\n * The value of the checkbox.\n */\n @Input() value: any;\n /**\n * Boolean value to determine whether or not the checkbox is checked.\n */\n private _checked = false;\n\n @Input()\n get checked() {\n return this._checked;\n }\n set checked(value: boolean) {\n if (this._checked === value) {\n return;\n }\n if (value === true) {\n this.nativeCheckbox.nativeElement.checked = true;\n this.becameChecked.emit(this._checked);\n } else {\n this.nativeCheckbox.nativeElement.checked = false;\n this.becameUnchecked.emit();\n }\n\n this._checked = value;\n }\n /**\n * The id of the checkbox. Must be unique. If not entered by a user then it is generated.\n */\n @Input() id: string = 'daff-checkbox-' + checkboxIdNum;\n\n /**\n * The aria-label of the checkbox.\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('aria-label') label = '';\n\n /**\n * The aria-labeledby of the checkbox.\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('aria-labelledby') labeledBy: string;\n\n /**\n * Event on whether or not the selection has changed.\n */\n @Output() becameChecked: EventEmitter<boolean> = new EventEmitter();\n @Output() becameUnchecked: EventEmitter<void> = new EventEmitter();\n\n /**\n * Whether the checkbox is focused\n */\n focused: boolean;\n /**\n * Whether the checkbox is disabled.\n */\n disabled: boolean;\n\n /**\n * The role of the component. Set to \"checkbox\".\n *\n * @docs-private\n */\n @HostBinding('attr.role') role = 'checkbox';\n\n\n /**\n * @docs-private\n */\n _onChange(val: Event) {\n if ((<HTMLInputElement>val.target).checked) {\n this.select();\n } else {\n this.deselect();\n }\n };\n /**\n * @docs-private\n */\n @HostBinding('class.focused') get focusClass() {\n return this.focused === true;\n };\n /**\n * @docs-private\n */\n @HostBinding('class.disabled') get disabledClass() {\n return this.disabled === true;\n };\n /**\n * Sets focused to false.\n */\n onBlur() {\n this.focused = false;\n }\n /**\n * Sets focused to true.\n */\n onFocus() {\n this.focused = true;\n }\n\n constructor(private _cdRef: ChangeDetectorRef) {\n /**\n * Increments id number on new checkbox. Gurantees unique ID on generation.\n */\n checkboxIdNum++;\n }\n /**\n * Sets checked to true.\n */\n select() {\n this.checked = true;\n this._cdRef.markForCheck();\n }\n /**\n * Sets checked to false\n */\n deselect() {\n this.checked = false;\n this._cdRef.markForCheck();\n }\n}\n","<input #inputElement\ntype=\"checkbox\"\n[attr.aria-label]=\"label\"\n[attr.aria-labelledby]=\"labeledBy\"\n[attr.checked]=\"checked ? '' : null\"\n[attr.id] = \"id\"\n[attr.value]=\"value\"\n[attr.name]=\"name\"\n[attr.disabled] = \"disabled ? '' : null\" \n(change)=\"_onChange($event)\"\n(blur)=\"onBlur()\"\n(focus)=\"onFocus()\"\n/>\n<label [attr.for]=\"id\"><ng-content></ng-content></label>","import {\n Component,\n Input,\n HostBinding,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { UntypedFormArray } from '@angular/forms';\n\nimport { DaffCheckboxComponent } from '../checkbox/checkbox.component';\n\n@Component({\n selector: 'daff-checkbox-set',\n templateUrl: './checkbox-set.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffCheckboxSetComponent {\n\n @Input() formArray: UntypedFormArray;\n /**\n * The name of the checkbox-set\n */\n @Input() name: string;\n\n /**\n * The role of the component. Set to \"checkbox\".\n *\n * @docs-private\n */\n @HostBinding('attr.role') role = 'group';\n\n /**\n * The list of checkboxes in the set.\n *\n * @docs-private\n */\n @ContentChildren(DaffCheckboxComponent) checkboxes: QueryList<DaffCheckboxComponent>;\n\n @Output() valueList = new EventEmitter<any[]>();\n\n getValues(): any[] {\n const checkboxes = this.checkboxes.toArray();\n return this.formArray.value.map((element, index) => element === true ? checkboxes[index].value : false).filter(element => element !== false);\n }\n}\n","<ng-content></ng-content>","import {\n Directive,\n Input,\n OnInit,\n Self,\n Optional,\n} from '@angular/core';\nimport {\n NgControl,\n ControlValueAccessor,\n} from '@angular/forms';\n\nimport { DaffCheckboxComponent } from '../checkbox/checkbox.component';\n\n/**\n * A directive for binding the DaffCheckboxComponent and the Control Value Accessor.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-checkbox[ngModel], daff-checkbox[formControl], daff-checkbox[formControlName]',\n})\nexport class DaffCheckboxControlValueAccessorDirective implements OnInit, ControlValueAccessor {\n _onChange: (val: any) => void;\n _onTouched: () => void;\n\n /**\n * The value of the ControlValueAccessor\n */\n @Input() value: any;\n\n /**\n * The name of the ControlValueAccessor\n */\n @Input() name: string;\n\n constructor(\n @Optional() @Self() public _control: NgControl,\n private _checkbox: DaffCheckboxComponent,\n ) {\n if (this._control != null) {\n this._control.valueAccessor = this;\n }\n }\n\n\n /**\n * A lifecycle method called when the directive is initialized.\n */\n /**\n * @docs-private\n */\n ngOnInit(): void {\n // See the note about `writeValue` usage.\n this.writeValue(this._control.value);\n\n // Watch for user events on the component to update the state\n this._checkbox.becameChecked.subscribe(\n () => {\n this._onChange(true);\n },\n );\n this._checkbox.becameUnchecked.subscribe(\n () => {\n this._onChange(false);\n },\n );\n }\n\n /**\n * writes a new value down into the component.\n */\n writeValue(value: any): void {\n value = !!value;\n if (value === true) {\n this.fireSelect();\n } else {\n this.fireDeselect();\n }\n }\n\n /**\n * Registers the change handler\n */\n registerOnChange(fn: any): void {\n this._onChange = (val) => {\n fn(val);\n };\n }\n\n /**\n * Registers the touched handler\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the disabled state.\n */\n setDisabledState?(isDisabled: boolean): void {\n this._checkbox.disabled = isDisabled;\n }\n\n /**\n * calls the child checkbox's select function\n */\n fireSelect() {\n this._checkbox.select();\n }\n\n /**\n * calls the child checkbox's deselect function\n */\n fireDeselect() {\n this._checkbox.deselect();\n }\n\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffCheckboxComponent } from './checkbox/checkbox.component';\nimport { DaffCheckboxSetComponent } from './checkbox-set/checkbox-set.component';\nimport { DaffCheckboxControlValueAccessorDirective } from './cva/checkbox-cva.directive';\n\n@NgModule({\n exports: [\n DaffCheckboxComponent,\n DaffCheckboxSetComponent,\n DaffCheckboxControlValueAccessorDirective,\n ],\n imports: [\n CommonModule,\n DaffCheckboxComponent,\n DaffCheckboxSetComponent,\n DaffCheckboxControlValueAccessorDirective,\n ],\n providers: [\n DaffCheckboxSetComponent,\n ],\n})\nexport class DaffCheckboxModule { }\n","import { DaffCheckboxComponent } from './checkbox/checkbox.component';\nimport { DaffCheckboxSetComponent } from './checkbox-set/checkbox-set.component';\nimport { DaffCheckboxControlValueAccessorDirective } from './cva/checkbox-cva.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_CHECKBOX_COMPONENTS = <const> [\n DaffCheckboxComponent,\n DaffCheckboxSetComponent,\n DaffCheckboxControlValueAccessorDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */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B,yCAAyC;AAC1C,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;wBACrB,wBAAwB;wBACxB,yCAAyC;AAC1C,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT,wBAAwB;AACzB,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;AACI,MAAM,wBAAwB,GAAW;IAC9C,qBAAqB;IACrB,wBAAwB;IACxB,yCAAyC;;;ACV3C;;AAEG;;;;"}
|
|
@@ -9,10 +9,10 @@ import { CommonModule } from '@angular/common';
|
|
|
9
9
|
* @inheritdoc
|
|
10
10
|
*/
|
|
11
11
|
class DaffContainerComponent {
|
|
12
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
13
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
12
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffContainerComponent, isStandalone: true, selector: "daff-container", host: { classAttribute: "daff-container" }, hostDirectives: [{ directive: i1.DaffSizableDirective, inputs: ["size", "size"] }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host-context(.daff-manage-container-layout){display:inherit;flex:inherit;flex-flow:inherit;flex-direction:inherit;flex-wrap:inherit;place-items:inherit;place-content:inherit;justify-content:inherit;justify-items:inherit;align-items:inherit;align-content:inherit;gap:inherit;grid:inherit;grid-template:inherit;grid-template-areas:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;grid-auto-flow:inherit}:host{display:block;margin:0 auto;padding:0;width:100%}:host.daff-xs{max-width:640px}:host.daff-sm{max-width:800px}:host.daff-md{max-width:1040px}:host.daff-lg{max-width:1340px}:host.daff-xl{max-width:1920px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffContainerComponent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
args: [{ selector: 'daff-container', template: '<ng-content></ng-content>', hostDirectives: [
|
|
18
18
|
{
|
|
@@ -21,19 +21,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
21
21
|
},
|
|
22
22
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
23
23
|
'class': 'daff-container',
|
|
24
|
-
}, styles: [":host-context(.daff-manage-container-layout){display:inherit;flex:inherit;flex-flow:inherit;flex-direction:inherit;flex-wrap:inherit;place-items:inherit;place-content:inherit;justify-content:inherit;justify-items:inherit;align-items:inherit;align-content:inherit;gap:inherit;grid:inherit;grid-template:inherit;grid-template-areas:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;grid-auto-flow:inherit
|
|
24
|
+
}, styles: [":host-context(.daff-manage-container-layout){display:inherit;flex:inherit;flex-flow:inherit;flex-direction:inherit;flex-wrap:inherit;place-items:inherit;place-content:inherit;justify-content:inherit;justify-items:inherit;align-items:inherit;align-content:inherit;gap:inherit;grid:inherit;grid-template:inherit;grid-template-areas:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;grid-auto-flow:inherit}:host{display:block;margin:0 auto;padding:0;width:100%}:host.daff-xs{max-width:640px}:host.daff-sm{max-width:800px}:host.daff-md{max-width:1040px}:host.daff-lg{max-width:1340px}:host.daff-xl{max-width:1920px}\n"] }]
|
|
25
25
|
}] });
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated in favor of {@link DAFF_CONTAINER_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
29
29
|
*/
|
|
30
30
|
class DaffContainerModule {
|
|
31
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
32
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
31
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffContainerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
32
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffContainerModule, imports: [CommonModule,
|
|
33
33
|
DaffContainerComponent], exports: [DaffContainerComponent] }); }
|
|
34
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
34
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffContainerModule, imports: [CommonModule] }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffContainerModule, decorators: [{
|
|
37
37
|
type: NgModule,
|
|
38
38
|
args: [{
|
|
39
39
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-container.mjs","sources":["../../../libs/design/container/src/container/container.component.ts","../../../libs/design/container/src/container.module.ts","../../../libs/design/container/src/container.ts","../../../libs/design/container/src/daffodil-design-container.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { DaffSizableDirective } from '@daffodil/design';\n\n/**\n * @inheritdoc\n */\n@Component({\n selector: 'daff-container',\n styleUrls: ['./container.component.scss'],\n template: '<ng-content></ng-content>',\n hostDirectives: [\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-container',\n },\n})\nexport class DaffContainerComponent {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffContainerComponent } from './container/container.component';\n\n/**\n * @deprecated in favor of {@link DAFF_CONTAINER_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffContainerComponent,\n ],\n exports: [\n DaffContainerComponent,\n ],\n})\nexport class DaffContainerModule { }\n","import { DaffContainerComponent } from './container/container.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_CONTAINER_COMPONENTS = <const> [\n DaffContainerComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAQA;;AAEG;MAgBU,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"daffodil-design-container.mjs","sources":["../../../libs/design/container/src/container/container.component.ts","../../../libs/design/container/src/container.module.ts","../../../libs/design/container/src/container.ts","../../../libs/design/container/src/daffodil-design-container.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { DaffSizableDirective } from '@daffodil/design';\n\n/**\n * @inheritdoc\n */\n@Component({\n selector: 'daff-container',\n styleUrls: ['./container.component.scss'],\n template: '<ng-content></ng-content>',\n hostDirectives: [\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-container',\n },\n})\nexport class DaffContainerComponent {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffContainerComponent } from './container/container.component';\n\n/**\n * @deprecated in favor of {@link DAFF_CONTAINER_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffContainerComponent,\n ],\n exports: [\n DaffContainerComponent,\n ],\n})\nexport class DaffContainerModule { }\n","import { DaffContainerComponent } from './container/container.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_CONTAINER_COMPONENTS = <const> [\n DaffContainerComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAQA;;AAEG;MAgBU,sBAAsB,CAAA;kIAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,0MAZvB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uqBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAY1B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAflC,SAAS;+BACE,gBAAgB,EAAA,QAAA,EAEhB,2BAA2B,EAAA,cAAA,EACrB;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,oBAAoB;4BAC/B,MAAM,EAAE,CAAC,MAAM,CAAC;AACjB,yBAAA;qBACF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,gBAAgB;AAC1B,qBAAA,EAAA,MAAA,EAAA,CAAA,uqBAAA,CAAA,EAAA;;;ACnBH;;AAEG;MAUU,mBAAmB,CAAA;kIAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAP5B,YAAY;AACZ,YAAA,sBAAsB,aAGtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAP5B,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAOH,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAT/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACdD;;AAEG;AACI,MAAM,yBAAyB,GAAW;IAC/C,sBAAsB;;;ACNxB;;AAEG;;;;"}
|
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Directive, isDevMode, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@daffodil/design';
|
|
4
4
|
import { DaffPrefixDirective, DaffSuffixDirective, DaffFormLabelDirective, DaffSkeletonableDirective, DaffFormLabelModule } from '@daffodil/design';
|
|
5
5
|
import { DaffFormFieldLabelDirective, DaffHintComponent, DaffErrorMessageComponent } from '@daffodil/design/form';
|
|
6
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import { BehaviorSubject } from 'rxjs';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* DaffFormFieldActionDirective marks an element, typically a button, as an action attached to a form control inside `DaffFormFieldComponent`.
|
|
11
|
+
*/
|
|
9
12
|
class DaffFormFieldActionDirective {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* @docs-private
|
|
13
|
-
*/
|
|
14
|
-
this.class = true;
|
|
15
|
-
}
|
|
16
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormFieldActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffFormFieldActionDirective, isStandalone: true, selector: "[daffFormFieldAction]", host: { properties: { "class.daff-form-field-action": "this.class" } }, ngImport: i0 }); }
|
|
13
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
14
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffFormFieldActionDirective, isStandalone: true, selector: "[daffFormFieldAction]", host: { classAttribute: "daff-form-field-action" }, ngImport: i0 }); }
|
|
18
15
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldActionDirective, decorators: [{
|
|
20
17
|
type: Directive,
|
|
21
18
|
args: [{
|
|
22
19
|
selector: '[daffFormFieldAction]',
|
|
20
|
+
host: {
|
|
21
|
+
class: 'daff-form-field-action',
|
|
22
|
+
},
|
|
23
23
|
}]
|
|
24
|
-
}]
|
|
25
|
-
type: HostBinding,
|
|
26
|
-
args: ['class.daff-form-field-action']
|
|
27
|
-
}] } });
|
|
24
|
+
}] });
|
|
28
25
|
|
|
29
26
|
/**
|
|
30
|
-
*
|
|
27
|
+
* Form controls must extend this class to be used inside `DaffFormFieldComponent`.
|
|
31
28
|
*
|
|
32
29
|
* > **Note**
|
|
33
|
-
* >
|
|
34
|
-
*
|
|
30
|
+
* > The control is defined as an abstract class instead of an interface to support Angular's dependency injection. Interfaces are erased during TypeScript compilation and cannot be used as DI tokens.
|
|
31
|
+
* >
|
|
35
32
|
* > By using an abstract class, the Angular DI container can match the class token for injection.
|
|
36
33
|
*/
|
|
37
34
|
class DaffFormFieldControl {
|
|
@@ -95,6 +92,9 @@ var DaffFormFieldApperanaceEnum;
|
|
|
95
92
|
DaffFormFieldApperanaceEnum["Fixed"] = "fixed";
|
|
96
93
|
})(DaffFormFieldApperanaceEnum || (DaffFormFieldApperanaceEnum = {}));
|
|
97
94
|
const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';
|
|
95
|
+
/**
|
|
96
|
+
* DaffFormFieldComponent is a wrapping component that provides consistent styling and behavior for form control elements.
|
|
97
|
+
*/
|
|
98
98
|
class DaffFormFieldComponent {
|
|
99
99
|
/** @docs-private */
|
|
100
100
|
get isNativeSelect() {
|
|
@@ -163,7 +163,7 @@ class DaffFormFieldComponent {
|
|
|
163
163
|
return this._control?.raised || this.isFilled;
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* The appearance
|
|
166
|
+
* The appearance of the form field. Defaults to `fluid`.
|
|
167
167
|
*/
|
|
168
168
|
get appearance() {
|
|
169
169
|
return this._appearance;
|
|
@@ -261,10 +261,10 @@ class DaffFormFieldComponent {
|
|
|
261
261
|
ngAfterContentChecked() {
|
|
262
262
|
this._validateFormControl();
|
|
263
263
|
}
|
|
264
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
265
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
264
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
265
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", inputs: { appearance: "appearance", id: "id" }, host: { properties: { "class.is-native-select": "isNativeSelect", "class.has-prefix": "_prefix", "class.has-suffix": "_suffix || action", "class.daff-error": "isError", "class.daff-disabled": "isDisabled", "class.daff-valid": "isValid", "class.daff-focused": "isFocused", "class.daff-raised": "isRaised", "class.fluid": "appearance === \"fluid\"", "class.fixed": "appearance === \"fixed\"" }, classAttribute: "daff-form-field" }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true }, { propertyName: "_control", first: true, predicate: DaffFormFieldControl, descendants: true }, { propertyName: "_formLabelDirective", first: true, predicate: DaffFormLabelDirective, descendants: true }, { propertyName: "_formFieldLabelDirective", first: true, predicate: DaffFormFieldLabelDirective, descendants: true }, { propertyName: "_action", first: true, predicate: DaffFormFieldActionDirective, descendants: true }, { propertyName: "_hint", first: true, predicate: DaffHintComponent, descendants: true }, { propertyName: "_error", first: true, predicate: DaffErrorMessageComponent, descendants: true }], hostDirectives: [{ directive: i1.DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>", styles: [".daff-form-field{display:flex;flex-direction:column;gap:.25rem;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-native-select .daff-form-field__control:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:.125rem solid currentColor;border-bottom:.125rem solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:calc(.75rem - 1px) 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control{padding-right:0}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s;white-space:nowrap}.daff-form-field.fluid label+input,.daff-form-field.fluid label+textarea,.daff-form-field.fluid label+select,.daff-form-field.fluid label~* input,.daff-form-field.fluid label~* textarea,.daff-form-field.fluid label~* select,.daff-form-field.fluid .daff-form-label+input,.daff-form-field.fluid .daff-form-label+textarea,.daff-form-field.fluid .daff-form-label+select,.daff-form-field.fluid .daff-form-label~* input,.daff-form-field.fluid .daff-form-label~* textarea,.daff-form-field.fluid .daff-form-label~* select,.daff-form-field.fluid .daff-form-field__label+input,.daff-form-field.fluid .daff-form-field__label+textarea,.daff-form-field.fluid .daff-form-field__label+select,.daff-form-field.fluid .daff-form-field__label~* input,.daff-form-field.fluid .daff-form-field__label~* textarea,.daff-form-field.fluid .daff-form-field__label~* select{padding:calc(1.5rem - 1px) 0 calc(.5rem - 1px)}.daff-form-field.fluid.daff-raised label,.daff-form-field.fluid.daff-raised .daff-form-label,.daff-form-field.fluid.daff-raised .daff-form-field__label{transform:translateY(-75%) scale(.75)}.daff-form-field.fluid.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-prefix,.daff-form-field.fluid .daff-suffix{height:3rem;min-width:3rem}.daff-form-field.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__inner{flex-grow:1;position:relative;overflow:hidden}.daff-form-field .daff-prefix,.daff-form-field .daff-suffix{display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:none;height:calc(3rem - 2px);min-width:calc(3rem - 2px)}.daff-form-field.daff-skeleton{display:flex;position:relative;height:3.5rem;width:100%;border-radius:.25rem}.daff-form-field.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:3.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-form-field.daff-skeleton>*{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
266
266
|
}
|
|
267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldComponent, decorators: [{
|
|
268
268
|
type: Component,
|
|
269
269
|
args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
270
270
|
NgTemplateOutlet,
|
|
@@ -285,7 +285,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
285
285
|
directive: DaffSkeletonableDirective,
|
|
286
286
|
inputs: ['skeleton'],
|
|
287
287
|
},
|
|
288
|
-
], template: "<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>", styles: [".daff-form-field{display:flex;flex-direction:column;gap:.25rem;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-native-select .daff-form-field__control:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:.125rem solid currentColor;border-bottom:.125rem solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:calc(.75rem - 1px) 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s;
|
|
288
|
+
], template: "<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>", styles: [".daff-form-field{display:flex;flex-direction:column;gap:.25rem;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-native-select .daff-form-field__control:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:.125rem solid currentColor;border-bottom:.125rem solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:calc(.75rem - 1px) 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control{padding-right:0}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s;white-space:nowrap}.daff-form-field.fluid label+input,.daff-form-field.fluid label+textarea,.daff-form-field.fluid label+select,.daff-form-field.fluid label~* input,.daff-form-field.fluid label~* textarea,.daff-form-field.fluid label~* select,.daff-form-field.fluid .daff-form-label+input,.daff-form-field.fluid .daff-form-label+textarea,.daff-form-field.fluid .daff-form-label+select,.daff-form-field.fluid .daff-form-label~* input,.daff-form-field.fluid .daff-form-label~* textarea,.daff-form-field.fluid .daff-form-label~* select,.daff-form-field.fluid .daff-form-field__label+input,.daff-form-field.fluid .daff-form-field__label+textarea,.daff-form-field.fluid .daff-form-field__label+select,.daff-form-field.fluid .daff-form-field__label~* input,.daff-form-field.fluid .daff-form-field__label~* textarea,.daff-form-field.fluid .daff-form-field__label~* select{padding:calc(1.5rem - 1px) 0 calc(.5rem - 1px)}.daff-form-field.fluid.daff-raised label,.daff-form-field.fluid.daff-raised .daff-form-label,.daff-form-field.fluid.daff-raised .daff-form-field__label{transform:translateY(-75%) scale(.75)}.daff-form-field.fluid.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-prefix,.daff-form-field.fluid .daff-suffix{height:3rem;min-width:3rem}.daff-form-field.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__inner{flex-grow:1;position:relative;overflow:hidden}.daff-form-field .daff-prefix,.daff-form-field .daff-suffix{display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:none;height:calc(3rem - 2px);min-width:calc(3rem - 2px)}.daff-form-field.daff-skeleton{display:flex;position:relative;height:3.5rem;width:100%;border-radius:.25rem}.daff-form-field.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:3.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-form-field.daff-skeleton>*{visibility:hidden}\n"] }]
|
|
289
289
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { _prefix: [{
|
|
290
290
|
type: ContentChild,
|
|
291
291
|
args: [DaffPrefixDirective]
|
|
@@ -320,8 +320,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
320
320
|
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
|
321
321
|
*/
|
|
322
322
|
class DaffFormFieldModule {
|
|
323
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
324
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
323
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
324
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, imports: [DaffFormFieldComponent,
|
|
325
325
|
DaffErrorMessageComponent,
|
|
326
326
|
DaffHintComponent,
|
|
327
327
|
DaffFormFieldLabelDirective,
|
|
@@ -330,11 +330,11 @@ class DaffFormFieldModule {
|
|
|
330
330
|
DaffHintComponent,
|
|
331
331
|
DaffFormFieldLabelDirective,
|
|
332
332
|
DaffFormLabelModule] }); }
|
|
333
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
333
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, imports: [DaffErrorMessageComponent,
|
|
334
334
|
DaffHintComponent,
|
|
335
335
|
DaffFormLabelModule, DaffFormLabelModule] }); }
|
|
336
336
|
}
|
|
337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, decorators: [{
|
|
338
338
|
type: NgModule,
|
|
339
339
|
args: [{
|
|
340
340
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-form-field.mjs","sources":["../../../libs/design/form-field/src/action/action.directive.ts","../../../libs/design/form-field/src/form-field-control.ts","../../../libs/design/form-field/src/form-field/form-field.component.ts","../../../libs/design/form-field/src/form-field/form-field.component.html","../../../libs/design/form-field/src/form-field.module.ts","../../../libs/design/form-field/src/form-field.ts","../../../libs/design/form-field/src/daffodil-design-form-field.ts"],"sourcesContent":["import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffFormFieldAction]',\n})\nexport class DaffFormFieldActionDirective {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-form-field-action') class = true;\n}\n","import { NgControl } from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\n\nimport { DaffFormFieldState } from './form-field-state';\n\n/**\n * An abstract class that form controls must implement to be used with the DaffFormFieldComponent.\n *\n * > **Note**\n * > This is an abstract class instead of an interface to support Angular's dependency injection. Interfaces are erased during TypeScript compilation and cannot be used as DI tokens.\n *\n * > By using an abstract class, the Angular DI container can match the class token for injection.\n */\nexport abstract class DaffFormFieldControl<T> {\n /**\n * The type of the control (e.g., 'input', 'select', 'textarea').\n * Used to apply control-specific styling or behavior.\n */\n abstract readonly controlType?: any;\n\n /**\n * Whether the control supports automatic label behavior.\n * When `true`, the form field will associate the label with the control using `for` and `id` attributes.\n *\n * Defaults to `true`.\n */\n readonly supportsAutoLabelling?: boolean = true;\n\n /**\n * Whether the control currently has focus.\n */\n abstract readonly focused: boolean;\n\n /**\n * Whether the control is required for form validation.\n */\n abstract readonly required: boolean;\n\n /**\n * Whether the control is disabled.\n */\n abstract readonly disabled: boolean;\n\n /**\n * The unique identifier for the control element.\n */\n readonly id?: string;\n\n /**\n * Whether the label should be in the raised position.\n * By default, matches the focused state.\n */\n get raised() {\n return this.focused;\n };\n\n /**\n * Sets focus on the control.\n *\n * @param event - Optional event that triggers the focus.\n */\n abstract focus(event?: Event): void;\n\n /**\n * The current value of the control.\n */\n abstract readonly value: T;\n\n constructor(public ngControl: NgControl | null) {}\n\n /**\n * Computes the current state of the form field control.\n * Combines control properties and form validation state.\n */\n get state(): DaffFormFieldState {\n return {\n focused: this.focused,\n filled: !!this.value,\n disabled: this.ngControl?.disabled ?? this.disabled,\n error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),\n valid: !this.ngControl?.errors && this.ngControl?.dirty,\n };\n }\n\n _stateChanges = new BehaviorSubject({\n focused: false,\n filled: false,\n disabled: false,\n error: false,\n valid: true,\n });\n\n /**\n * Observable stream of state changes for the form field control.\n */\n stateChanges: Observable<DaffFormFieldState>;\n\n /**\n * Emits the current state.\n */\n emitState(deferred = false) {\n if(deferred) {\n Promise.resolve().then(() => {\n this._stateChanges.next(this.state);\n });\n return;\n }\n\n this._stateChanges.next(this.state);\n }\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ContentChild,\n AfterContentInit,\n AfterContentChecked,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Input,\n AfterViewInit,\n isDevMode,\n ElementRef,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffSkeletonableDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from '../action/action.directive';\nimport { DaffFormFieldControl } from '../form-field-control';\n\nlet daffFormFieldId = 0;\n\nexport type DaffFormFieldApperanace = 'fluid' | 'fixed';\n\nenum DaffFormFieldApperanaceEnum {\n Fluid = 'fluid',\n Fixed = 'fixed',\n}\n\nexport const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';\n\n@Component({\n selector: 'daff-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n ],\n host: {\n class: 'daff-form-field',\n '[class.is-native-select]': 'isNativeSelect',\n '[class.has-prefix]': '_prefix',\n '[class.has-suffix]': '_suffix || action',\n '[class.daff-error]': 'isError',\n '[class.daff-disabled]': 'isDisabled',\n '[class.daff-valid]': 'isValid',\n '[class.daff-focused]': 'isFocused',\n '[class.daff-raised]': 'isRaised',\n '[class.fluid]': 'appearance === \"fluid\"',\n '[class.fixed]': 'appearance === \"fixed\"',\n },\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n})\nexport class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n /** @docs-private */\n get isNativeSelect() {\n return this._control.controlType === 'native-select';\n }\n\n constructor(private cd: ChangeDetectorRef, public elementRef: ElementRef) {}\n\n /** @docs-private */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /** @docs-private */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n\n /**\n * @docs-private\n *\n * The child form control that the form field manages.\n */\n @ContentChild(DaffFormFieldControl) _control: DaffFormFieldControl<unknown>;\n\n /**\n * @docs-private\n * @deprecated Deprecated in version 0.86.0. Will be removed in v1.0.0. Deprecated in version 0.89.0. Will be removed in version 0.92.0.\n */\n @ContentChild(DaffFormLabelDirective) _formLabelDirective: DaffFormLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldLabelDirective) _formFieldLabelDirective: DaffFormFieldLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldActionDirective) _action: DaffFormFieldActionDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffHintComponent) private _hint: DaffHintComponent;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffErrorMessageComponent) private _error: DaffErrorMessageComponent;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as error.\n */\n isError = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field contains any user input.\n */\n isFilled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as disabled.\n */\n isDisabled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as valid.\n */\n isValid = false;\n\n /**\n * @docs-private\n *\n * Determines whether or not the form field should display its focused state.\n */\n get isFocused() {\n return this._control?.focused;\n }\n\n /**\n * @docs-private\n */\n get isRaised() {\n return this._control?.raised || this.isFilled;\n }\n\n private _appearance: DaffFormFieldApperanace = DaffFormFieldApperanaceEnum.Fluid;\n\n /**\n * The appearance style of a form field, whether the label is `fluid` or `fixed`.\n */\n @Input()\n get appearance() {\n return this._appearance;\n }\n\n set appearance(value: DaffFormFieldApperanace) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._appearance = DaffFormFieldApperanaceEnum.Fluid;\n } else {\n this._appearance = value;\n }\n };\n\n /**\n * @docs-private\n */\n get isFixed() {\n return this._appearance === DaffFormFieldApperanaceEnum.Fixed;\n }\n\n /**\n * The unique id of the form field. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each form field is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the form field.\n */\n @Input() id = 'daff-form-field-' + ++daffFormFieldId;\n\n /**\n * @docs-private\n */\n hasHint() {\n return this._hint ? true : false;\n }\n\n /**\n * @docs-private\n */\n hintId = this.id + '-hint';\n\n /**\n * @docs-private\n */\n hasErrorMessage() {\n return this._error ? true : false;\n }\n\n /**\n * @docs-private\n */\n errorMessageId = this.id + '-error';\n\n /**\n * @docs-private\n */\n get autoLabelId() {\n return this._control.supportsAutoLabelling ? this.id : null;\n }\n\n /**\n * @docs-private\n */\n get customId() {\n return this._control.supportsAutoLabelling ? null : this.id;\n }\n\n /**\n * @docs-private\n *\n * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.\n */\n ngAfterViewInit() {\n if (isDevMode()) {\n if (!this._formFieldLabelDirective && this._control.supportsAutoLabelling && !(this._control.id)) {\n console.warn(\n `Accessibility Warning: The form field with id \"${this.id}\" uses a control that supports auto-labelling, but no <daff-form-label> component was found.\\n\\n` +\n `1. Add a <daff-form-label> component (recommended)\\n` +\n `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\\n\\n` +\n `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`,\n );\n }\n\n if(this._suffix && this._action && !this.isFixed) {\n console.warn(\n `UI consideration for form field with id \"${this.id}\":\\n\\n` + `In a fluid appearance, avoid using suffix alongside an action.`,\n );\n };\n }\n }\n\n /**\n * Validates whether or not the form field is in a \"usable\" state.\n */\n private _validateFormControl() {\n if (!this._control) {\n throw new Error(DaffFormFieldMissingControlMessage);\n }\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentInit() {\n this._validateFormControl();\n\n this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {\n this.isFilled = filled;\n this.isError = error;\n this.isDisabled = disabled;\n this.isValid = valid;\n\n this.cd.markForCheck();\n });\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentChecked() {\n this._validateFormControl();\n }\n}\n","<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>","import { NgModule } from '@angular/core';\n\nimport { DaffFormLabelModule } from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n exports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n})\nexport class DaffFormFieldModule { }\n","import {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from './action/action.directive';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_FIELD_COMPONENTS = <const> [\n DaffFormFieldComponent,\n DaffFormLabelDirective,\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormFieldActionDirective,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffErrorMessageComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAQa,4BAA4B,CAAA;AAHzC,IAAA,WAAA,GAAA;AAIE;;AAEG;QAC0C,IAAA,CAAA,KAAK,GAAG,IAAI;AAC1D,IAAA;iIALY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,8BAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AAClC,iBAAA;8BAK8C,KAAK,EAAA,CAAA;sBAAjD,WAAW;uBAAC,8BAA8B;;;ACJ7C;;;;;;;AAOG;MACmB,oBAAoB,CAAA;AAmCxC;;;AAGG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;IACrB;;AAc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/src/action/action.directive.ts","../../../libs/design/form-field/src/form-field-control.ts","../../../libs/design/form-field/src/form-field/form-field.component.ts","../../../libs/design/form-field/src/form-field/form-field.component.html","../../../libs/design/form-field/src/form-field.module.ts","../../../libs/design/form-field/src/form-field.ts","../../../libs/design/form-field/src/daffodil-design-form-field.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * DaffFormFieldActionDirective marks an element, typically a button, as an action attached to a form control inside `DaffFormFieldComponent`.\n */\n@Directive({\n selector: '[daffFormFieldAction]',\n host: {\n class: 'daff-form-field-action',\n },\n})\nexport class DaffFormFieldActionDirective {}\n","import { NgControl } from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\n\nimport { DaffFormFieldState } from './form-field-state';\n\n/**\n * Form controls must extend this class to be used inside `DaffFormFieldComponent`.\n *\n * > **Note**\n * > The control is defined as an abstract class instead of an interface to support Angular's dependency injection. Interfaces are erased during TypeScript compilation and cannot be used as DI tokens.\n * >\n * > By using an abstract class, the Angular DI container can match the class token for injection.\n */\nexport abstract class DaffFormFieldControl<T> {\n /**\n * The type of the control (e.g., 'input', 'select', 'textarea').\n * Used to apply control-specific styling or behavior.\n */\n abstract readonly controlType?: any;\n\n /**\n * Whether the control supports automatic label behavior.\n * When `true`, the form field will associate the label with the control using `for` and `id` attributes.\n *\n * Defaults to `true`.\n */\n readonly supportsAutoLabelling?: boolean = true;\n\n /**\n * Whether the control currently has focus.\n */\n abstract readonly focused: boolean;\n\n /**\n * Whether the control is required for form validation.\n */\n abstract readonly required: boolean;\n\n /**\n * Whether the control is disabled.\n */\n abstract readonly disabled: boolean;\n\n /**\n * The unique identifier for the control element.\n */\n readonly id?: string;\n\n /**\n * Whether the label should be in the raised position.\n * By default, matches the focused state.\n */\n get raised() {\n return this.focused;\n };\n\n /**\n * Sets focus on the control.\n *\n * @param event - Optional event that triggers the focus.\n */\n abstract focus(event?: Event): void;\n\n /**\n * The current value of the control.\n */\n abstract readonly value: T;\n\n constructor(public ngControl: NgControl | null) {}\n\n /**\n * Computes the current state of the form field control.\n * Combines control properties and form validation state.\n */\n get state(): DaffFormFieldState {\n return {\n focused: this.focused,\n filled: !!this.value,\n disabled: this.ngControl?.disabled ?? this.disabled,\n error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),\n valid: !this.ngControl?.errors && this.ngControl?.dirty,\n };\n }\n\n _stateChanges = new BehaviorSubject({\n focused: false,\n filled: false,\n disabled: false,\n error: false,\n valid: true,\n });\n\n /**\n * Observable stream of state changes for the form field control.\n */\n stateChanges: Observable<DaffFormFieldState>;\n\n /**\n * Emits the current state.\n */\n emitState(deferred = false) {\n if(deferred) {\n Promise.resolve().then(() => {\n this._stateChanges.next(this.state);\n });\n return;\n }\n\n this._stateChanges.next(this.state);\n }\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ContentChild,\n AfterContentInit,\n AfterContentChecked,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Input,\n AfterViewInit,\n isDevMode,\n ElementRef,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffSkeletonableDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from '../action/action.directive';\nimport { DaffFormFieldControl } from '../form-field-control';\n\nlet daffFormFieldId = 0;\n\nexport type DaffFormFieldApperanace = 'fluid' | 'fixed';\n\nenum DaffFormFieldApperanaceEnum {\n Fluid = 'fluid',\n Fixed = 'fixed',\n}\n\nexport const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';\n\n/**\n * DaffFormFieldComponent is a wrapping component that provides consistent styling and behavior for form control elements.\n */\n@Component({\n selector: 'daff-form-field',\n templateUrl: './form-field.component.html',\n styleUrl: './form-field.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n ],\n host: {\n class: 'daff-form-field',\n '[class.is-native-select]': 'isNativeSelect',\n '[class.has-prefix]': '_prefix',\n '[class.has-suffix]': '_suffix || action',\n '[class.daff-error]': 'isError',\n '[class.daff-disabled]': 'isDisabled',\n '[class.daff-valid]': 'isValid',\n '[class.daff-focused]': 'isFocused',\n '[class.daff-raised]': 'isRaised',\n '[class.fluid]': 'appearance === \"fluid\"',\n '[class.fixed]': 'appearance === \"fixed\"',\n },\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n})\nexport class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n /** @docs-private */\n get isNativeSelect() {\n return this._control.controlType === 'native-select';\n }\n\n constructor(private cd: ChangeDetectorRef, public elementRef: ElementRef) {}\n\n /** @docs-private */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /** @docs-private */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n\n /**\n * @docs-private\n *\n * The child form control that the form field manages.\n */\n @ContentChild(DaffFormFieldControl) _control: DaffFormFieldControl<unknown>;\n\n /**\n * @docs-private\n * @deprecated Deprecated in version 0.86.0. Will be removed in version 1.0.0.\n */\n @ContentChild(DaffFormLabelDirective) _formLabelDirective: DaffFormLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldLabelDirective) _formFieldLabelDirective: DaffFormFieldLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldActionDirective) _action: DaffFormFieldActionDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffHintComponent) private _hint: DaffHintComponent;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffErrorMessageComponent) private _error: DaffErrorMessageComponent;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as error.\n */\n isError = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field contains any user input.\n */\n isFilled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as disabled.\n */\n isDisabled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as valid.\n */\n isValid = false;\n\n /**\n * @docs-private\n *\n * Determines whether or not the form field should display its focused state.\n */\n get isFocused() {\n return this._control?.focused;\n }\n\n /**\n * @docs-private\n */\n get isRaised() {\n return this._control?.raised || this.isFilled;\n }\n\n private _appearance: DaffFormFieldApperanace = DaffFormFieldApperanaceEnum.Fluid;\n\n /**\n * The appearance of the form field. Defaults to `fluid`.\n */\n @Input()\n get appearance() {\n return this._appearance;\n }\n\n set appearance(value: DaffFormFieldApperanace) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._appearance = DaffFormFieldApperanaceEnum.Fluid;\n } else {\n this._appearance = value;\n }\n };\n\n /**\n * @docs-private\n */\n get isFixed() {\n return this._appearance === DaffFormFieldApperanaceEnum.Fixed;\n }\n\n /**\n * The unique id of the form field. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each form field is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the form field.\n */\n @Input() id = 'daff-form-field-' + ++daffFormFieldId;\n\n /**\n * @docs-private\n */\n hasHint() {\n return this._hint ? true : false;\n }\n\n /**\n * @docs-private\n */\n hintId = this.id + '-hint';\n\n /**\n * @docs-private\n */\n hasErrorMessage() {\n return this._error ? true : false;\n }\n\n /**\n * @docs-private\n */\n errorMessageId = this.id + '-error';\n\n /**\n * @docs-private\n */\n get autoLabelId() {\n return this._control.supportsAutoLabelling ? this.id : null;\n }\n\n /**\n * @docs-private\n */\n get customId() {\n return this._control.supportsAutoLabelling ? null : this.id;\n }\n\n /**\n * @docs-private\n *\n * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.\n */\n ngAfterViewInit() {\n if (isDevMode()) {\n if (!this._formFieldLabelDirective && this._control.supportsAutoLabelling && !(this._control.id)) {\n console.warn(\n `Accessibility Warning: The form field with id \"${this.id}\" uses a control that supports auto-labelling, but no <daff-form-label> component was found.\\n\\n` +\n `1. Add a <daff-form-label> component (recommended)\\n` +\n `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\\n\\n` +\n `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`,\n );\n }\n\n if(this._suffix && this._action && !this.isFixed) {\n console.warn(\n `UI consideration for form field with id \"${this.id}\":\\n\\n` + `In a fluid appearance, avoid using suffix alongside an action.`,\n );\n };\n }\n }\n\n /**\n * Validates whether or not the form field is in a \"usable\" state.\n */\n private _validateFormControl() {\n if (!this._control) {\n throw new Error(DaffFormFieldMissingControlMessage);\n }\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentInit() {\n this._validateFormControl();\n\n this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {\n this.isFilled = filled;\n this.isError = error;\n this.isDisabled = disabled;\n this.isValid = valid;\n\n this.cd.markForCheck();\n });\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentChecked() {\n this._validateFormControl();\n }\n}\n","<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>","import { NgModule } from '@angular/core';\n\nimport { DaffFormLabelModule } from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n exports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n})\nexport class DaffFormFieldModule { }\n","import {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from './action/action.directive';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_FIELD_COMPONENTS = <const> [\n DaffFormFieldComponent,\n DaffFormLabelDirective,\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormFieldActionDirective,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffErrorMessageComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA;;AAEG;MAOU,4BAA4B,CAAA;kIAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;sHAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,wBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBANxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,wBAAwB;AAChC,qBAAA;AACF,iBAAA;;;ACFD;;;;;;;AAOG;MACmB,oBAAoB,CAAA;AAmCxC;;;AAGG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;IACrB;;AAcA,IAAA,WAAA,CAAmB,SAA2B,EAAA;QAA3B,IAAA,CAAA,SAAS,GAAT,SAAS;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AAsB;YACtB,yBAAyB;YACzB,iBAAiB;YACjB,2BAA2B;YAC3B,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAGV,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAb5B,yBAAyB;YACzB,iBAAiB;AAEjB,YAAA,mBAAmB,EAOnB,mBAAmB,CAAA,EAAA,CAAA,CAAA;;4FAGV,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAhB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,2BAA2B;wBAC3B,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,2BAA2B;wBAC3B,mBAAmB;AACpB,qBAAA;AACF,iBAAA;;;ACfD;;AAEG;AACI,MAAM,0BAA0B,GAAW;IAChD,sBAAsB;IACtB,sBAAsB;IACtB,mBAAmB;IACnB,mBAAmB;IACnB,4BAA4B;IAC5B,iBAAiB;IACjB,2BAA2B;IAC3B,yBAAyB;;;ACzB3B;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, Input, Directive } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class DaffErrorMessageComponent {
|
|
5
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffErrorMessageComponent, isStandalone: true, selector: "daff-error-message", host: { attributes: { "aria-live": "polite" }, classAttribute: "daff-error-message" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorMessageComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', host: {
|
|
11
11
|
class: 'daff-error-message',
|
|
@@ -20,10 +20,10 @@ class DaffHintComponent {
|
|
|
20
20
|
* */
|
|
21
21
|
this.validated = false;
|
|
22
22
|
}
|
|
23
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
24
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
23
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffHintComponent, isStandalone: true, selector: "daff-hint", inputs: { validated: "validated" }, host: { properties: { "class.validated": "validated" }, classAttribute: "daff-hint" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffHintComponent, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
28
|
args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
29
29
|
class: 'daff-hint',
|
|
@@ -34,10 +34,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
34
34
|
}] } });
|
|
35
35
|
|
|
36
36
|
class DaffFormFieldLabelDirective {
|
|
37
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
38
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
37
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffFormFieldLabelDirective, isStandalone: true, selector: "daff-form-label", ngImport: i0 }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldLabelDirective, decorators: [{
|
|
41
41
|
type: Directive,
|
|
42
42
|
args: [{
|
|
43
43
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-form.mjs","sources":["../../../libs/design/form/src/error-message/error-message.component.ts","../../../libs/design/form/src/hint/hint.component.ts","../../../libs/design/form/src/label/label.directive.ts","../../../libs/design/form/src/form.ts","../../../libs/design/form/src/daffodil-design-form.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-error-message',\n template: '<ng-content></ng-content>',\n styleUrls: ['./error-message.component.scss'],\n host: {\n class: 'daff-error-message',\n 'aria-live': 'polite',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffErrorMessageComponent {}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-hint',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hint.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'daff-hint',\n '[class.validated]': 'validated',\n },\n})\nexport class DaffHintComponent {\n /**\n * Displays a validated hint UI.\n * */\n @Input() validated = false;\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-form-label',\n})\nexport class DaffFormFieldLabelDirective {}\n","import { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffHintComponent } from './hint/hint.component';\nimport { DaffFormFieldLabelDirective } from './label/label.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_HELPER_COMPONENTS = <const> [\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"daffodil-design-form.mjs","sources":["../../../libs/design/form/src/error-message/error-message.component.ts","../../../libs/design/form/src/hint/hint.component.ts","../../../libs/design/form/src/label/label.directive.ts","../../../libs/design/form/src/form.ts","../../../libs/design/form/src/daffodil-design-form.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-error-message',\n template: '<ng-content></ng-content>',\n styleUrls: ['./error-message.component.scss'],\n host: {\n class: 'daff-error-message',\n 'aria-live': 'polite',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffErrorMessageComponent {}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-hint',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hint.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'daff-hint',\n '[class.validated]': 'validated',\n },\n})\nexport class DaffHintComponent {\n /**\n * Displays a validated hint UI.\n * */\n @Input() validated = false;\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-form-label',\n})\nexport class DaffFormFieldLabelDirective {}\n","import { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffHintComponent } from './hint/hint.component';\nimport { DaffFormFieldLabelDirective } from './label/label.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_HELPER_COMPONENTS = <const> [\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,yBAAyB,CAAA;kIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,qKAR1B,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA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