@daffodil/design 0.83.0 → 0.84.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/atoms/form/checkbox/cva/checkbox-cva.directive.d.ts +3 -0
- package/atoms/form/error-message/error-message.component.d.ts +4 -1
- package/atoms/form/error-message/error-message.module.d.ts +4 -1
- package/atoms/form/form-field/form-field/form-field.component.d.ts +23 -29
- package/atoms/form/form-field/form-field-control.d.ts +18 -4
- package/atoms/form/form-field/form-field-state.d.ts +7 -0
- package/atoms/form/form-field/form-field.d.ts +10 -0
- package/atoms/form/form-field/form-field.module.d.ts +6 -4
- package/atoms/form/form-field/public_api.d.ts +2 -1
- package/atoms/form/form-label/form-label.directive.d.ts +4 -1
- package/atoms/form/form-label/form-label.module.d.ts +4 -1
- package/atoms/form/hint/hint.component.d.ts +9 -0
- package/atoms/form/hint/public_api.d.ts +1 -0
- package/atoms/form/input/input.component.d.ts +15 -19
- package/atoms/form/input/input.module.d.ts +4 -2
- package/atoms/form/native-select/native-select.component.d.ts +5 -1
- package/atoms/form/quantity-field/quantity-field.component.d.ts +2 -1
- package/atoms/form/quantity-field/quantity-field.module.d.ts +3 -3
- package/atoms/form/quantity-field/quantity-input/quantity-input.component.d.ts +3 -0
- package/atoms/form/radio/cva/radio-cva.directive.d.ts +3 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +3 -0
- package/breadcrumb/src/breadcrumb-theme.scss +12 -3
- package/button/button/button-base.directive.d.ts +6 -23
- package/button/src/button/basic/button-theme.scss +13 -41
- package/button/src/button/button-base.scss +17 -4
- package/button/src/button/flat/flat-theme.scss +4 -38
- package/button/src/button/icon/icon-theme.scss +4 -30
- package/button/src/button/raised/raised-theme.scss +2 -2
- package/button/src/button/stroked/stroked-theme.scss +4 -36
- package/button/src/button/underline/underline-theme.scss +4 -18
- package/callout/src/callout-theme.scss +27 -10
- package/card/card/basic/basic.component.d.ts +3 -0
- package/card/card/raised/raised.component.d.ts +3 -0
- package/card/card/stroked/stroked.component.d.ts +3 -0
- package/checkbox/examples/basic-checkbox/basic-checkbox.component.d.ts +3 -0
- package/checkbox/examples/checkbox-set/checkbox-set.component.d.ts +3 -0
- package/core/article-encapsulated/article-encapsulated.directive.d.ts +3 -0
- package/core/colorable/colorable.directive.d.ts +8 -0
- package/core/manage-container-layout/manage-container-layout.directive.d.ts +3 -0
- package/core/openable/openable.directive.d.ts +3 -0
- package/core/prefix-suffix/prefix-suffix.module.d.ts +1 -1
- package/core/prefix-suffix/prefix.directive.d.ts +4 -1
- package/core/prefix-suffix/public_api.d.ts +0 -4
- package/core/prefix-suffix/suffix.directive.d.ts +4 -1
- package/core/sizable/sizable.directive.d.ts +8 -0
- package/core/statusable/statusable.directive.d.ts +2 -0
- package/core/text-alignable/text-alignable.directive.d.ts +6 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +5 -2
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +21 -17
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +25 -32
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +9 -0
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +6 -0
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +2 -2
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input-examples.mjs +45 -22
- package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +2 -2
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +23 -10
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +33 -0
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +2 -2
- package/fesm2022/daffodil-design-notification-examples.mjs +6 -11
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +32 -5
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +2 -2
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +18 -0
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +9 -9
- package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch-examples.mjs +6 -6
- package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +3 -4
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +23 -4
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +6 -0
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +3 -5
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +19 -5
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +3 -0
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +301 -224
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/src/hero-theme.scss +27 -10
- package/input/examples/examples.d.ts +2 -2
- package/input/examples/input-disabled/input-disabled.component.d.ts +2 -0
- package/input/examples/input-hint/input-hint.component.d.ts +5 -0
- package/input/examples/input-with-form-field/input-with-form-field.component.d.ts +2 -0
- package/list/list/list.component.d.ts +1 -1
- package/list/src/list-theme.scss +16 -20
- package/menu/menu/menu.component.d.ts +15 -0
- package/menu/menu-activator/menu-activator.component.d.ts +3 -0
- package/menu/src/menu-theme.scss +29 -10
- package/modal/modal/modal.component.d.ts +21 -0
- package/modal/modal-actions/modal-actions.component.d.ts +3 -0
- package/modal/modal-close/modal-close.directive.d.ts +3 -0
- package/modal/modal-content/modal-content.component.d.ts +3 -0
- package/modal/modal-title/modal-title.directive.d.ts +3 -0
- package/navbar/src/navbar-theme.scss +8 -3
- package/notification/README.md +11 -12
- package/notification/notification/notification.component.d.ts +17 -2
- package/notification/notification-actions/notification-actions.directive.d.ts +3 -0
- package/notification/notification-message/notification-message.directive.d.ts +3 -0
- package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -0
- package/notification/notification-title/notification-title.directive.d.ts +3 -0
- package/notification/notification.d.ts +2 -2
- package/package.json +1 -1
- package/paginator/src/paginator-theme.scss +22 -17
- package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +3 -0
- package/progress-bar/progress-bar.component.d.ts +15 -0
- package/public_api.d.ts +1 -0
- package/scss/state/skeleton/_mixins.scss +19 -9
- package/scss/theme.scss +2 -0
- package/src/atoms/form/error-message/error-message-theme.scss +4 -1
- package/src/atoms/form/form-field/form-field/form-field-theme.scss +22 -10
- package/src/atoms/form/hint/hint-theme.scss +17 -0
- package/src/atoms/form/input/input-theme.scss +1 -5
- package/switch/switch.d.ts +2 -2
- package/tabs/tabs/tab-activator/tab-activator.component.d.ts +15 -0
- package/tabs/tabs/tab-label/tab-label.component.d.ts +2 -5
- package/tabs/tabs/tabs.component.d.ts +3 -0
- package/toast/examples/default-toast/default-toast.component.d.ts +3 -0
- package/toast/examples/toast-positions/toast-positions.component.d.ts +3 -0
- package/toast/toast/toast.component.d.ts +3 -5
- package/tree/interfaces/tree-data.d.ts +15 -0
- package/tree/interfaces/tree-render-mode.d.ts +2 -2
- package/tree/tree/tree-notifier.service.d.ts +3 -3
- package/tree/tree/tree.component.d.ts +13 -3
- package/tree/tree-item/tree-item.directive.d.ts +6 -0
- package/youtube-player/youtube-player.component.d.ts +3 -0
- package/core/prefix-suffix/prefixable/prefixable-interface.d.ts +0 -7
- package/core/prefix-suffix/prefixable/prefixable.d.ts +0 -11
- package/core/prefix-suffix/suffixable/suffixable-interface.d.ts +0 -7
- package/core/prefix-suffix/suffixable/suffixable.d.ts +0 -11
- package/input/examples/basic-input/basic-input.component.d.ts +0 -5
@@ -1,15 +1,12 @@
|
|
1
|
-
import * as i2 from '@angular/common';
|
2
|
-
import { CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
|
3
1
|
import * as i0 from '@angular/core';
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
7
|
-
import { faChevronDown } from '@fortawesome/free-solid-svg-icons';
|
2
|
+
import { Directive, HostBinding, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, NgModule, Optional, Self, HostListener, Input, EventEmitter, ElementRef, ViewChild, Output, ContentChildren, Injectable, InjectionToken, inject, PLATFORM_ID, Inject, makeEnvironmentProviders, provideAppInitializer, isDevMode } from '@angular/core';
|
3
|
+
import { BehaviorSubject, merge, of, map, Subject, fromEventPattern, fromEvent, EMPTY, combineLatest } from 'rxjs';
|
8
4
|
import * as i1 from '@angular/forms';
|
9
5
|
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
6
|
+
import * as i2 from '@angular/common';
|
7
|
+
import { CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
|
10
8
|
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
11
|
-
import {
|
12
|
-
import { takeUntil, startWith, map, catchError, filter, shareReplay } from 'rxjs/operators';
|
9
|
+
import { takeUntil, startWith, map as map$1, catchError, filter, shareReplay } from 'rxjs/operators';
|
13
10
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
14
11
|
import { DaffServerSafePersistenceServiceToken } from '@daffodil/core';
|
15
12
|
|
@@ -19,6 +16,56 @@ class DaffErrorStateMatcher {
|
|
19
16
|
}
|
20
17
|
}
|
21
18
|
|
19
|
+
/**
|
20
|
+
*
|
21
|
+
* Prefix can be used to place content before another piece of content in components like
|
22
|
+
* `daff-form-field`, `daff-solo-field`, and `daff-list`.
|
23
|
+
*/
|
24
|
+
class DaffPrefixDirective {
|
25
|
+
constructor() {
|
26
|
+
/**
|
27
|
+
* @docs-private
|
28
|
+
*/
|
29
|
+
this.class = true;
|
30
|
+
}
|
31
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
32
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffPrefixDirective, isStandalone: true, selector: "[daffPrefix]", host: { properties: { "class.daff-prefix": "this.class" } }, ngImport: i0 }); }
|
33
|
+
}
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixDirective, decorators: [{
|
35
|
+
type: Directive,
|
36
|
+
args: [{
|
37
|
+
selector: '[daffPrefix]',
|
38
|
+
}]
|
39
|
+
}], propDecorators: { class: [{
|
40
|
+
type: HostBinding,
|
41
|
+
args: ['class.daff-prefix']
|
42
|
+
}] } });
|
43
|
+
|
44
|
+
/**
|
45
|
+
*
|
46
|
+
* Prefix can be used to place content after another piece of content in components like
|
47
|
+
* `daff-form-field`, `daff-solo-field`, and `daff-list`.
|
48
|
+
*/
|
49
|
+
class DaffSuffixDirective {
|
50
|
+
constructor() {
|
51
|
+
/**
|
52
|
+
* @docs-private
|
53
|
+
*/
|
54
|
+
this.class = true;
|
55
|
+
}
|
56
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffSuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
57
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffSuffixDirective, isStandalone: true, selector: "[daffSuffix]", host: { properties: { "class.daff-suffix": "this.class" } }, ngImport: i0 }); }
|
58
|
+
}
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffSuffixDirective, decorators: [{
|
60
|
+
type: Directive,
|
61
|
+
args: [{
|
62
|
+
selector: '[daffSuffix]',
|
63
|
+
}]
|
64
|
+
}], propDecorators: { class: [{
|
65
|
+
type: HostBinding,
|
66
|
+
args: ['class.daff-suffix']
|
67
|
+
}] } });
|
68
|
+
|
22
69
|
/**
|
23
70
|
*
|
24
71
|
* The class that a form control must **implement** in order to be
|
@@ -31,33 +78,53 @@ class DaffErrorStateMatcher {
|
|
31
78
|
* be used for the necessary dependency injection.
|
32
79
|
*/
|
33
80
|
class DaffFormFieldControl {
|
81
|
+
constructor(ngControl) {
|
82
|
+
this.ngControl = ngControl;
|
83
|
+
this._stateChanges = new BehaviorSubject({
|
84
|
+
focused: false,
|
85
|
+
filled: false,
|
86
|
+
disabled: false,
|
87
|
+
error: false,
|
88
|
+
valid: true,
|
89
|
+
});
|
90
|
+
}
|
91
|
+
get state() {
|
92
|
+
return {
|
93
|
+
focused: this.focused,
|
94
|
+
filled: !!this.value,
|
95
|
+
disabled: this.ngControl?.disabled,
|
96
|
+
error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),
|
97
|
+
valid: !this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),
|
98
|
+
};
|
99
|
+
}
|
100
|
+
emitState() {
|
101
|
+
this._stateChanges.next(this.state);
|
102
|
+
}
|
34
103
|
}
|
35
104
|
;
|
36
105
|
|
37
106
|
const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';
|
38
107
|
|
39
|
-
// ChangeDetection is ignored because this component needs to be refactored
|
40
|
-
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
41
108
|
class DaffFormFieldComponent {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
109
|
+
/** @docs-private */
|
110
|
+
get isSelectField() {
|
111
|
+
return this._control.controlType === 'native-select';
|
112
|
+
}
|
113
|
+
constructor(cd) {
|
114
|
+
this.cd = cd;
|
115
|
+
/** @docs-private */
|
47
116
|
this.class = true;
|
48
|
-
/**
|
49
|
-
* The tracking property used to determine if the parent form has been submitted,
|
50
|
-
* and thus show an error message (even if the field hasn't been touched).
|
51
|
-
*
|
52
|
-
* @deprecated Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
53
|
-
*/
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
55
|
-
this.formSubmitted = false;
|
56
117
|
/**
|
57
118
|
* Tracking property to keep a record of whether or not the
|
58
119
|
* form field should be marked as error.
|
59
120
|
*/
|
60
121
|
this.isError = false;
|
122
|
+
/**
|
123
|
+
* Tracking property to keep a record of whether or not the
|
124
|
+
* form field contains any user input.
|
125
|
+
*/
|
126
|
+
this.isFilled = false;
|
127
|
+
this.isDisabled = false;
|
61
128
|
/**
|
62
129
|
* Tracking property to keep a record of whether or not the
|
63
130
|
* form field should be marked as valid.
|
@@ -65,30 +132,13 @@ class DaffFormFieldComponent {
|
|
65
132
|
this.isValid = false;
|
66
133
|
}
|
67
134
|
/**
|
68
|
-
* @docs
|
69
|
-
*
|
70
135
|
* Determines whether or not the form field should display its focused state.
|
71
136
|
*/
|
72
137
|
get isFocused() {
|
73
138
|
return this._control?.focused;
|
74
139
|
}
|
75
140
|
/**
|
76
|
-
*
|
77
|
-
*
|
78
|
-
* TODO: consider whether or not this can be refactored to some kind of
|
79
|
-
* observable to remove unnecessary change detection.
|
80
|
-
*
|
81
|
-
* @docs-private
|
82
|
-
*/
|
83
|
-
ngDoCheck() {
|
84
|
-
if (this._control?.ngControl) {
|
85
|
-
this.isError = this._control.ngControl.errors && (this._control.ngControl.touched);
|
86
|
-
this.isValid = !this._control.ngControl.errors && this._control.ngControl.touched;
|
87
|
-
}
|
88
|
-
}
|
89
|
-
/**
|
90
|
-
* Validate whether or not the FormField is in
|
91
|
-
* a "usable" state.
|
141
|
+
* Validate whether or not the FormField is in a "usable" state.
|
92
142
|
*/
|
93
143
|
_validateFormControl() {
|
94
144
|
if (!this._control) {
|
@@ -104,6 +154,13 @@ class DaffFormFieldComponent {
|
|
104
154
|
*/
|
105
155
|
ngAfterContentInit() {
|
106
156
|
this._validateFormControl();
|
157
|
+
this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {
|
158
|
+
this.isFilled = filled;
|
159
|
+
this.isError = error;
|
160
|
+
this.isDisabled = disabled;
|
161
|
+
this.isValid = valid;
|
162
|
+
this.cd.markForCheck();
|
163
|
+
});
|
107
164
|
}
|
108
165
|
/**
|
109
166
|
* Life cycle hook to verify that the form field has an acceptable
|
@@ -115,17 +172,21 @@ class DaffFormFieldComponent {
|
|
115
172
|
ngAfterContentChecked() {
|
116
173
|
this._validateFormControl();
|
117
174
|
}
|
118
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
119
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
175
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
176
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", host: { properties: { "class.daff-form-field": "this.class" } }, 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 }], ngImport: i0, template: "<div\n\tclass=\"daff-form-field__control\"\n\t[class.daff-focused]=\"isFocused\"\n\t[class.daff-error]=\"isError\"\n\t[class.daff-valid]=\"isValid\"\n\t[class.daff-filled]=\"isFilled\"\n\t[class.daff-disabled]=\"isDisabled\">\n\t@if (_prefix) {\n\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t}\n\t<div class=\"daff-form-field__form-wrapper\">\n\t\t<ng-content select=\"label[daffFormLabel]\"></ng-content>\n\t\t<ng-content></ng-content>\n\t\t@if (isSelectField) {\n\t\t\t<div class=\"daff-form-field__icon\"></div>\n\t\t}\n\t</div>\n @if (_suffix) {\n\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t}\n</div>\n<ng-content select=\"daff-error-message\"></ng-content>\n<ng-content select=\"daff-hint\"></ng-content>", styles: [".daff-form-field{display:block;position:relative}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;box-sizing:border-box;font-size:1rem;height:3.5rem;line-height:1rem;position:relative;width:100%}.daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field__control .daff-form-label{position:absolute;left:1rem;top:1.25rem;pointer-events:none;transition:all .2s ease}.daff-form-field__control.daff-focused .daff-form-label,.daff-form-field__control.daff-filled .daff-form-label{font-size:.75rem;top:.375rem}.daff-form-field__control.daff-focused * ::-webkit-input-placeholder,.daff-form-field__control.daff-filled * ::-webkit-input-placeholder{opacity:1}.daff-form-field__control.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__icon{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-form-field__form-wrapper{flex-grow:1;padding:1.5rem 1rem .5rem;position:relative}.daff-form-field .daff-hint,.daff-form-field .daff-error-message{margin-top:.25rem}.daff-form-field .daff-prefix{padding-left:1rem}.daff-form-field .daff-suffix{padding-right:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
120
177
|
}
|
121
178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldComponent, decorators: [{
|
122
179
|
type: Component,
|
123
|
-
args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None,
|
124
|
-
}], propDecorators: { class: [{
|
180
|
+
args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n\tclass=\"daff-form-field__control\"\n\t[class.daff-focused]=\"isFocused\"\n\t[class.daff-error]=\"isError\"\n\t[class.daff-valid]=\"isValid\"\n\t[class.daff-filled]=\"isFilled\"\n\t[class.daff-disabled]=\"isDisabled\">\n\t@if (_prefix) {\n\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t}\n\t<div class=\"daff-form-field__form-wrapper\">\n\t\t<ng-content select=\"label[daffFormLabel]\"></ng-content>\n\t\t<ng-content></ng-content>\n\t\t@if (isSelectField) {\n\t\t\t<div class=\"daff-form-field__icon\"></div>\n\t\t}\n\t</div>\n @if (_suffix) {\n\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t}\n</div>\n<ng-content select=\"daff-error-message\"></ng-content>\n<ng-content select=\"daff-hint\"></ng-content>", styles: [".daff-form-field{display:block;position:relative}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;box-sizing:border-box;font-size:1rem;height:3.5rem;line-height:1rem;position:relative;width:100%}.daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field__control .daff-form-label{position:absolute;left:1rem;top:1.25rem;pointer-events:none;transition:all .2s ease}.daff-form-field__control.daff-focused .daff-form-label,.daff-form-field__control.daff-filled .daff-form-label{font-size:.75rem;top:.375rem}.daff-form-field__control.daff-focused * ::-webkit-input-placeholder,.daff-form-field__control.daff-filled * ::-webkit-input-placeholder{opacity:1}.daff-form-field__control.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__icon{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-form-field__form-wrapper{flex-grow:1;padding:1.5rem 1rem .5rem;position:relative}.daff-form-field .daff-hint,.daff-form-field .daff-error-message{margin-top:.25rem}.daff-form-field .daff-prefix{padding-left:1rem}.daff-form-field .daff-suffix{padding-right:1rem}\n"] }]
|
181
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { class: [{
|
125
182
|
type: HostBinding,
|
126
183
|
args: ['class.daff-form-field']
|
127
|
-
}],
|
128
|
-
type:
|
184
|
+
}], _prefix: [{
|
185
|
+
type: ContentChild,
|
186
|
+
args: [DaffPrefixDirective]
|
187
|
+
}], _suffix: [{
|
188
|
+
type: ContentChild,
|
189
|
+
args: [DaffSuffixDirective]
|
129
190
|
}], _control: [{
|
130
191
|
type: ContentChild,
|
131
192
|
args: [DaffFormFieldControl]
|
@@ -133,22 +194,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
133
194
|
|
134
195
|
class DaffErrorMessageComponent {
|
135
196
|
constructor() {
|
197
|
+
/**
|
198
|
+
* @docs-private
|
199
|
+
*/
|
136
200
|
this.class = true;
|
137
201
|
}
|
138
202
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
139
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffErrorMessageComponent, isStandalone:
|
203
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffErrorMessageComponent, isStandalone: true, selector: "daff-error-message", host: { properties: { "class.daff-error-message": "this.class" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;font-size:.875rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
140
204
|
}
|
141
205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageComponent, decorators: [{
|
142
206
|
type: Component,
|
143
|
-
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush,
|
207
|
+
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;font-size:.875rem}\n"] }]
|
144
208
|
}], propDecorators: { class: [{
|
145
209
|
type: HostBinding,
|
146
210
|
args: ['class.daff-error-message']
|
147
211
|
}] } });
|
148
212
|
|
213
|
+
/**
|
214
|
+
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
215
|
+
*/
|
149
216
|
class DaffErrorMessageModule {
|
150
217
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
151
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageModule,
|
218
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageModule, imports: [DaffErrorMessageComponent], exports: [DaffErrorMessageComponent] }); }
|
152
219
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageModule }); }
|
153
220
|
}
|
154
221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffErrorMessageModule, decorators: [{
|
@@ -157,86 +224,168 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
157
224
|
exports: [
|
158
225
|
DaffErrorMessageComponent,
|
159
226
|
],
|
160
|
-
|
227
|
+
imports: [
|
161
228
|
DaffErrorMessageComponent,
|
162
229
|
],
|
163
230
|
}]
|
164
231
|
}] });
|
165
232
|
|
233
|
+
class DaffFormLabelDirective {
|
234
|
+
constructor() {
|
235
|
+
/**
|
236
|
+
* @docs-private
|
237
|
+
*/
|
238
|
+
this.class = true;
|
239
|
+
}
|
240
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
241
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffFormLabelDirective, isStandalone: true, selector: "[daffFormLabel]", host: { properties: { "class.daff-form-label": "this.class" } }, ngImport: i0 }); }
|
242
|
+
}
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelDirective, decorators: [{
|
244
|
+
type: Directive,
|
245
|
+
args: [{
|
246
|
+
selector: '[daffFormLabel]',
|
247
|
+
}]
|
248
|
+
}], propDecorators: { class: [{
|
249
|
+
type: HostBinding,
|
250
|
+
args: ['class.daff-form-label']
|
251
|
+
}] } });
|
252
|
+
|
253
|
+
/**
|
254
|
+
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
255
|
+
*/
|
256
|
+
class DaffFormLabelModule {
|
257
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
258
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule, imports: [DaffFormLabelDirective], exports: [DaffFormLabelDirective] }); }
|
259
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule }); }
|
260
|
+
}
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule, decorators: [{
|
262
|
+
type: NgModule,
|
263
|
+
args: [{
|
264
|
+
exports: [
|
265
|
+
DaffFormLabelDirective,
|
266
|
+
],
|
267
|
+
imports: [
|
268
|
+
DaffFormLabelDirective,
|
269
|
+
],
|
270
|
+
}]
|
271
|
+
}] });
|
272
|
+
|
273
|
+
/**
|
274
|
+
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
275
|
+
*/
|
166
276
|
class DaffFormFieldModule {
|
167
277
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
168
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldModule,
|
169
|
-
|
170
|
-
|
171
|
-
DaffErrorMessageModule
|
172
|
-
|
173
|
-
|
174
|
-
|
278
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldModule, imports: [DaffFormFieldComponent,
|
279
|
+
DaffErrorMessageModule,
|
280
|
+
DaffFormLabelModule], exports: [DaffFormFieldComponent,
|
281
|
+
DaffErrorMessageModule,
|
282
|
+
DaffFormLabelModule] }); }
|
283
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldModule, imports: [DaffErrorMessageModule,
|
284
|
+
DaffFormLabelModule, DaffErrorMessageModule,
|
285
|
+
DaffFormLabelModule] }); }
|
175
286
|
}
|
176
287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormFieldModule, decorators: [{
|
177
288
|
type: NgModule,
|
178
289
|
args: [{
|
179
290
|
imports: [
|
180
|
-
|
181
|
-
FontAwesomeModule,
|
291
|
+
DaffFormFieldComponent,
|
182
292
|
DaffErrorMessageModule,
|
293
|
+
DaffFormLabelModule,
|
183
294
|
],
|
184
295
|
exports: [
|
185
296
|
DaffFormFieldComponent,
|
186
297
|
DaffErrorMessageModule,
|
187
|
-
|
188
|
-
declarations: [
|
189
|
-
DaffFormFieldComponent,
|
298
|
+
DaffFormLabelModule,
|
190
299
|
],
|
191
300
|
}]
|
192
301
|
}] });
|
193
302
|
|
303
|
+
class DaffHintComponent {
|
304
|
+
constructor() {
|
305
|
+
/**
|
306
|
+
* @docs-private
|
307
|
+
*/
|
308
|
+
this.class = true;
|
309
|
+
}
|
310
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
311
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffHintComponent, isStandalone: true, selector: "daff-hint", host: { properties: { "class.daff-hint": "this.class" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;font-size:.875rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
312
|
+
}
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffHintComponent, decorators: [{
|
314
|
+
type: Component,
|
315
|
+
args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:block;font-size:.875rem}\n"] }]
|
316
|
+
}], propDecorators: { class: [{
|
317
|
+
type: HostBinding,
|
318
|
+
args: ['class.daff-hint']
|
319
|
+
}] } });
|
320
|
+
|
321
|
+
/**
|
322
|
+
* @docs-private
|
323
|
+
*/
|
324
|
+
const DAFF_FORM_FIELD_COMPONENTS = [
|
325
|
+
DaffFormFieldComponent,
|
326
|
+
DaffErrorMessageComponent,
|
327
|
+
DaffFormLabelDirective,
|
328
|
+
DaffHintComponent,
|
329
|
+
DaffPrefixDirective,
|
330
|
+
DaffSuffixDirective,
|
331
|
+
];
|
332
|
+
|
194
333
|
/**
|
195
334
|
* DaffInputComponent provides the same functionality as a native `<input>` and contains custom styling and functionality.
|
196
335
|
*/
|
197
|
-
class DaffInputComponent {
|
198
|
-
/**
|
199
|
-
* @docs-private
|
200
|
-
*/
|
336
|
+
class DaffInputComponent extends DaffFormFieldControl {
|
337
|
+
/** @docs-private */
|
201
338
|
focus() {
|
202
339
|
this.focused = true;
|
340
|
+
this.emitState();
|
203
341
|
}
|
204
|
-
/**
|
205
|
-
* @docs-private
|
206
|
-
*/
|
342
|
+
/** @docs-private */
|
207
343
|
blur() {
|
208
344
|
this.focused = false;
|
345
|
+
this.emitState();
|
209
346
|
}
|
210
347
|
constructor(
|
211
|
-
/**
|
212
|
-
* @docs-private
|
213
|
-
*/
|
348
|
+
/** @docs-private */
|
214
349
|
ngControl, _elementRef) {
|
350
|
+
super(ngControl);
|
215
351
|
this.ngControl = ngControl;
|
216
352
|
this._elementRef = _elementRef;
|
353
|
+
/** @docs-private */
|
354
|
+
this.class = true;
|
355
|
+
/** @docs-private */
|
356
|
+
this.controlType = 'native-input';
|
217
357
|
this.focused = false;
|
218
358
|
}
|
359
|
+
/** @docs-private */
|
360
|
+
ngOnInit() {
|
361
|
+
this.stateChanges = merge(this._stateChanges.asObservable(), this.ngControl ? this.ngControl.statusChanges : of(undefined)).pipe(map(() => this.state));
|
362
|
+
}
|
363
|
+
/** @docs-private */
|
219
364
|
onFocus() {
|
220
365
|
this._elementRef.nativeElement.focus();
|
221
366
|
}
|
367
|
+
get value() {
|
368
|
+
return this._elementRef.nativeElement.value;
|
369
|
+
}
|
222
370
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
223
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffInputComponent, isStandalone:
|
371
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffInputComponent, isStandalone: true, selector: "input[daff-input]", host: { listeners: { "focus": "focus()", "blur": "blur()" }, properties: { "class.daff-input": "this.class" } }, providers: [
|
224
372
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
225
373
|
{ provide: DaffFormFieldControl, useExisting: DaffInputComponent },
|
226
|
-
], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{border:none;border-radius:4px;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;padding:0;width:100%;box-sizing:border-box}:host:focus{border:none;box-shadow:none;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
374
|
+
], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{border:none;border-radius:4px;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;padding:0;width:100%;box-sizing:border-box}:host:focus{border:none;box-shadow:none;outline:none}:host:disabled{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
227
375
|
}
|
228
376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputComponent, decorators: [{
|
229
377
|
type: Component,
|
230
378
|
args: [{ selector: 'input[daff-input]', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
231
379
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
232
380
|
{ provide: DaffFormFieldControl, useExisting: DaffInputComponent },
|
233
|
-
],
|
381
|
+
], styles: [":host{border:none;border-radius:4px;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;padding:0;width:100%;box-sizing:border-box}:host:focus{border:none;box-shadow:none;outline:none}:host:disabled{cursor:not-allowed}\n"] }]
|
234
382
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
235
383
|
type: Optional
|
236
384
|
}, {
|
237
385
|
type: Self
|
238
|
-
}] }, { type: i0.ElementRef }], propDecorators: {
|
239
|
-
type:
|
386
|
+
}] }, { type: i0.ElementRef }], propDecorators: { class: [{
|
387
|
+
type: HostBinding,
|
388
|
+
args: ['class.daff-input']
|
240
389
|
}], focus: [{
|
241
390
|
type: HostListener,
|
242
391
|
args: ['focus']
|
@@ -245,61 +394,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
245
394
|
args: ['blur']
|
246
395
|
}] } });
|
247
396
|
|
397
|
+
/**
|
398
|
+
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
399
|
+
*/
|
248
400
|
class DaffInputModule {
|
249
401
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
250
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule,
|
251
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule
|
402
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule, imports: [DaffInputComponent], exports: [DaffInputComponent] }); }
|
403
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule }); }
|
252
404
|
}
|
253
405
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule, decorators: [{
|
254
406
|
type: NgModule,
|
255
407
|
args: [{
|
256
408
|
imports: [
|
257
|
-
CommonModule,
|
258
|
-
],
|
259
|
-
exports: [
|
260
409
|
DaffInputComponent,
|
261
410
|
],
|
262
|
-
|
411
|
+
exports: [
|
263
412
|
DaffInputComponent,
|
264
413
|
],
|
265
414
|
}]
|
266
415
|
}] });
|
267
416
|
|
268
|
-
class DaffNativeSelectComponent {
|
417
|
+
class DaffNativeSelectComponent extends DaffFormFieldControl {
|
269
418
|
/**
|
270
419
|
* @docs-private
|
271
420
|
*/
|
272
421
|
focus() {
|
273
422
|
this.focused = true;
|
423
|
+
this.emitState();
|
274
424
|
}
|
275
425
|
/**
|
276
426
|
* @docs-private
|
277
427
|
*/
|
278
428
|
blur() {
|
279
429
|
this.focused = false;
|
430
|
+
this.emitState();
|
280
431
|
}
|
281
432
|
constructor(
|
282
433
|
/**
|
283
434
|
* @docs-private
|
284
435
|
*/
|
285
436
|
ngControl, _elementRef) {
|
437
|
+
super(ngControl);
|
286
438
|
this.ngControl = ngControl;
|
287
439
|
this._elementRef = _elementRef;
|
288
440
|
/**
|
289
441
|
* @docs-private
|
290
442
|
*/
|
291
443
|
this.controlType = 'native-select';
|
444
|
+
/**
|
445
|
+
* @docs-private
|
446
|
+
*/
|
292
447
|
this.class = true;
|
293
448
|
this.focused = false;
|
294
449
|
}
|
295
450
|
onFocus() {
|
296
451
|
this._elementRef.nativeElement.focus();
|
297
452
|
}
|
453
|
+
get value() {
|
454
|
+
return this._elementRef.nativeElement.value;
|
455
|
+
}
|
298
456
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffNativeSelectComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
299
457
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffNativeSelectComponent, isStandalone: false, selector: "select[daff-native-select]", inputs: { formSubmitted: "formSubmitted" }, host: { listeners: { "focus": "focus()", "blur": "blur()" }, properties: { "class.daff-native-select": "this.class" } }, providers: [
|
300
458
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
301
459
|
{ provide: DaffFormFieldControl, useExisting: DaffNativeSelectComponent },
|
302
|
-
], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-native-select{appearance:none;background:transparent;background-clip:padding-box;border:0;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;min-width:45px;width:100%}.daff-native-select:focus{border:0;box-shadow:none;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
460
|
+
], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-native-select{appearance:none;background:transparent;background-clip:padding-box;border:0;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;min-width:45px;width:100%}.daff-native-select:focus{border:0;box-shadow:none;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
303
461
|
}
|
304
462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffNativeSelectComponent, decorators: [{
|
305
463
|
type: Component,
|
@@ -498,6 +656,9 @@ class DaffCheckboxControlValueAccessorDirective {
|
|
498
656
|
/**
|
499
657
|
* A lifecycle method called when the directive is initialized.
|
500
658
|
*/
|
659
|
+
/**
|
660
|
+
* @docs-private
|
661
|
+
*/
|
501
662
|
ngOnInit() {
|
502
663
|
// See the note about `writeValue` usage.
|
503
664
|
this.writeValue(this._control.value);
|
@@ -678,6 +839,9 @@ class DaffQuantityInputComponent {
|
|
678
839
|
this._inputControl = new UntypedFormControl();
|
679
840
|
this._destroyed = new Subject();
|
680
841
|
}
|
842
|
+
/**
|
843
|
+
* @docs-private
|
844
|
+
*/
|
681
845
|
ngOnInit() {
|
682
846
|
this._inputControl.patchValue(this.ngControl.control.value);
|
683
847
|
this.setInputDisabled();
|
@@ -714,7 +878,7 @@ class DaffQuantityInputComponent {
|
|
714
878
|
: this._inputControl.enable();
|
715
879
|
}
|
716
880
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityInputComponent, deps: [{ token: i1.NgControl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
717
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffQuantityInputComponent, isStandalone: false, selector: "daff-quantity-input", inputs: { min: "min", max: "max" }, viewQueries: [{ propertyName: "input", first: true, predicate: DaffInputComponent, descendants: true }], ngImport: i0, template: "<input daff-input\n type=\"number\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.step]=\"1\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (change)=\"onValueChange($event)\"\n [formControl]=\"_inputControl\"\n>\n", dependencies: [{ kind: "
|
881
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffQuantityInputComponent, isStandalone: false, selector: "daff-quantity-input", inputs: { min: "min", max: "max" }, viewQueries: [{ propertyName: "input", first: true, predicate: DaffInputComponent, descendants: true }], ngImport: i0, template: "<input daff-input\n type=\"number\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.step]=\"1\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (change)=\"onValueChange($event)\"\n [formControl]=\"_inputControl\"\n>\n", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DaffInputComponent, selector: "input[daff-input]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
718
882
|
}
|
719
883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityInputComponent, decorators: [{
|
720
884
|
type: Component,
|
@@ -805,7 +969,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
805
969
|
type: Input
|
806
970
|
}] } });
|
807
971
|
|
808
|
-
class DaffQuantityFieldComponent {
|
972
|
+
class DaffQuantityFieldComponent extends DaffFormFieldControl {
|
809
973
|
get focused() {
|
810
974
|
return !!(this.input?.focused || this.select?.focused);
|
811
975
|
}
|
@@ -840,6 +1004,7 @@ class DaffQuantityFieldComponent {
|
|
840
1004
|
return !this.showInputField;
|
841
1005
|
}
|
842
1006
|
constructor(ngControl, cd) {
|
1007
|
+
super(ngControl);
|
843
1008
|
this.ngControl = ngControl;
|
844
1009
|
this.cd = cd;
|
845
1010
|
/**
|
@@ -893,6 +1058,14 @@ class DaffQuantityFieldComponent {
|
|
893
1058
|
this.input.focus();
|
894
1059
|
}
|
895
1060
|
}
|
1061
|
+
get value() {
|
1062
|
+
if (this.select) {
|
1063
|
+
return this.select.value;
|
1064
|
+
}
|
1065
|
+
if (this.input) {
|
1066
|
+
return this.input.value;
|
1067
|
+
}
|
1068
|
+
}
|
896
1069
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
897
1070
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffQuantityFieldComponent, isStandalone: false, selector: "daff-quantity-field", inputs: { min: "min", max: "max", selectMax: "selectMax", id: "id" }, providers: [
|
898
1071
|
{
|
@@ -900,7 +1073,7 @@ class DaffQuantityFieldComponent {
|
|
900
1073
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
901
1074
|
useExisting: DaffQuantityFieldComponent,
|
902
1075
|
},
|
903
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: DaffQuantityInputComponent, descendants: true }, { propertyName: "select", first: true, predicate: DaffQuantitySelectComponent, descendants: true }], ngImport: i0, template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\"\n [max]=\"_maxFloor\"\n [extendable]=\"max > selectMax\"\n [id]=\"id\">\n</daff-quantity-select>\n<daff-quantity-input\n *ngIf=\"showInputField\"\n [min]=\"min\"\n [max]=\"max\"\n [id]=\"id\">\n</daff-quantity-input>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DaffQuantityInputComponent, selector: "daff-quantity-input", inputs: ["min", "max"] }, { kind: "component", type: DaffQuantitySelectComponent, selector: "daff-quantity-select", inputs: ["min", "max", "extendable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1076
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: DaffQuantityInputComponent, descendants: true }, { propertyName: "select", first: true, predicate: DaffQuantitySelectComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\"\n [max]=\"_maxFloor\"\n [extendable]=\"max > selectMax\"\n [id]=\"id\">\n</daff-quantity-select>\n<daff-quantity-input\n *ngIf=\"showInputField\"\n [min]=\"min\"\n [max]=\"max\"\n [id]=\"id\">\n</daff-quantity-input>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DaffQuantityInputComponent, selector: "daff-quantity-input", inputs: ["min", "max"] }, { kind: "component", type: DaffQuantitySelectComponent, selector: "daff-quantity-select", inputs: ["min", "max", "extendable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
904
1077
|
}
|
905
1078
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldComponent, decorators: [{
|
906
1079
|
type: Component,
|
@@ -937,14 +1110,14 @@ class DaffQuantityFieldModule {
|
|
937
1110
|
DaffQuantityInputComponent,
|
938
1111
|
DaffQuantitySelectComponent], imports: [CommonModule,
|
939
1112
|
DaffNativeSelectModule,
|
940
|
-
|
941
|
-
|
1113
|
+
ReactiveFormsModule,
|
1114
|
+
DaffInputModule], exports: [DaffQuantityFieldComponent,
|
942
1115
|
DaffQuantityInputComponent,
|
943
1116
|
DaffQuantitySelectComponent] }); }
|
944
1117
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldModule, imports: [CommonModule,
|
945
1118
|
DaffNativeSelectModule,
|
946
|
-
|
947
|
-
|
1119
|
+
ReactiveFormsModule,
|
1120
|
+
DaffInputModule] }); }
|
948
1121
|
}
|
949
1122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldModule, decorators: [{
|
950
1123
|
type: NgModule,
|
@@ -957,8 +1130,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
957
1130
|
imports: [
|
958
1131
|
CommonModule,
|
959
1132
|
DaffNativeSelectModule,
|
960
|
-
DaffInputModule,
|
961
1133
|
ReactiveFormsModule,
|
1134
|
+
DaffInputModule,
|
962
1135
|
],
|
963
1136
|
exports: [
|
964
1137
|
DaffQuantityFieldComponent,
|
@@ -1180,6 +1353,9 @@ class DaffRadioControlValueAccessorDirective {
|
|
1180
1353
|
this._control.valueAccessor = this;
|
1181
1354
|
}
|
1182
1355
|
}
|
1356
|
+
/**
|
1357
|
+
* @docs-private
|
1358
|
+
*/
|
1183
1359
|
ngOnInit() {
|
1184
1360
|
this.writeValue(this._control.value);
|
1185
1361
|
this._registry.add(this._control, this);
|
@@ -1278,90 +1454,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
1278
1454
|
}]
|
1279
1455
|
}] });
|
1280
1456
|
|
1281
|
-
class DaffFormLabelDirective {
|
1282
|
-
constructor() {
|
1283
|
-
this.class = true;
|
1284
|
-
}
|
1285
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1286
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffFormLabelDirective, isStandalone: false, selector: "[daffFormLabel]", host: { properties: { "class.daff-form-label": "this.class" } }, ngImport: i0 }); }
|
1287
|
-
}
|
1288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelDirective, decorators: [{
|
1289
|
-
type: Directive,
|
1290
|
-
args: [{
|
1291
|
-
selector: '[daffFormLabel]',
|
1292
|
-
standalone: false,
|
1293
|
-
}]
|
1294
|
-
}], propDecorators: { class: [{
|
1295
|
-
type: HostBinding,
|
1296
|
-
args: ['class.daff-form-label']
|
1297
|
-
}] } });
|
1298
|
-
|
1299
|
-
class DaffFormLabelModule {
|
1300
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1301
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule, declarations: [DaffFormLabelDirective], exports: [DaffFormLabelDirective] }); }
|
1302
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule }); }
|
1303
|
-
}
|
1304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffFormLabelModule, decorators: [{
|
1305
|
-
type: NgModule,
|
1306
|
-
args: [{
|
1307
|
-
exports: [
|
1308
|
-
DaffFormLabelDirective,
|
1309
|
-
],
|
1310
|
-
declarations: [
|
1311
|
-
DaffFormLabelDirective,
|
1312
|
-
],
|
1313
|
-
}]
|
1314
|
-
}] });
|
1315
|
-
|
1316
|
-
/**
|
1317
|
-
*
|
1318
|
-
* Prefix can be used to place content before another piece of content in components like
|
1319
|
-
* `daff-form-field`, `daff-solo-field`, and `daff-list`.
|
1320
|
-
*/
|
1321
|
-
class DaffPrefixDirective {
|
1322
|
-
constructor() {
|
1323
|
-
this.class = true;
|
1324
|
-
}
|
1325
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1326
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffPrefixDirective, isStandalone: false, selector: "[daffPrefix]", host: { properties: { "class.daff-prefix": "this.class" } }, ngImport: i0 }); }
|
1327
|
-
}
|
1328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixDirective, decorators: [{
|
1329
|
-
type: Directive,
|
1330
|
-
args: [{
|
1331
|
-
selector: '[daffPrefix]',
|
1332
|
-
standalone: false,
|
1333
|
-
}]
|
1334
|
-
}], propDecorators: { class: [{
|
1335
|
-
type: HostBinding,
|
1336
|
-
args: ['class.daff-prefix']
|
1337
|
-
}] } });
|
1338
|
-
|
1339
|
-
/**
|
1340
|
-
*
|
1341
|
-
* Prefix can be used to place content after another piece of content in components like
|
1342
|
-
* `daff-form-field`, `daff-solo-field`, and `daff-list`.
|
1343
|
-
*/
|
1344
|
-
class DaffSuffixDirective {
|
1345
|
-
constructor() {
|
1346
|
-
this.class = true;
|
1347
|
-
}
|
1348
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffSuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1349
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffSuffixDirective, isStandalone: false, selector: "[daffSuffix]", host: { properties: { "class.daff-suffix": "this.class" } }, ngImport: i0 }); }
|
1350
|
-
}
|
1351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffSuffixDirective, decorators: [{
|
1352
|
-
type: Directive,
|
1353
|
-
args: [{
|
1354
|
-
selector: '[daffSuffix]',
|
1355
|
-
standalone: false,
|
1356
|
-
}]
|
1357
|
-
}], propDecorators: { class: [{
|
1358
|
-
type: HostBinding,
|
1359
|
-
args: ['class.daff-suffix']
|
1360
|
-
}] } });
|
1361
|
-
|
1362
1457
|
class DaffPrefixSuffixModule {
|
1363
1458
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixSuffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1364
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixSuffixModule,
|
1459
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixSuffixModule, imports: [DaffPrefixDirective,
|
1365
1460
|
DaffSuffixDirective], exports: [DaffPrefixDirective,
|
1366
1461
|
DaffSuffixDirective] }); }
|
1367
1462
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixSuffixModule }); }
|
@@ -1369,58 +1464,17 @@ class DaffPrefixSuffixModule {
|
|
1369
1464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffPrefixSuffixModule, decorators: [{
|
1370
1465
|
type: NgModule,
|
1371
1466
|
args: [{
|
1372
|
-
imports: [
|
1373
|
-
exports: [
|
1467
|
+
imports: [
|
1374
1468
|
DaffPrefixDirective,
|
1375
1469
|
DaffSuffixDirective,
|
1376
1470
|
],
|
1377
|
-
|
1471
|
+
exports: [
|
1378
1472
|
DaffPrefixDirective,
|
1379
1473
|
DaffSuffixDirective,
|
1380
1474
|
],
|
1381
1475
|
}]
|
1382
1476
|
}] });
|
1383
1477
|
|
1384
|
-
/**
|
1385
|
-
* A mixin for giving a component the ability to place content after another piece of content.
|
1386
|
-
*/
|
1387
|
-
function daffSuffixableMixin(Base) {
|
1388
|
-
class SuffixableDirective extends Base {
|
1389
|
-
constructor(...args) {
|
1390
|
-
super(...args);
|
1391
|
-
}
|
1392
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: SuffixableDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
1393
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: SuffixableDirective, isStandalone: true, queries: [{ propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
|
1394
|
-
}
|
1395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: SuffixableDirective, decorators: [{
|
1396
|
-
type: Directive
|
1397
|
-
}], ctorParameters: () => [{ type: undefined }], propDecorators: { _suffix: [{
|
1398
|
-
type: ContentChild,
|
1399
|
-
args: [DaffSuffixDirective, { static: true }]
|
1400
|
-
}] } });
|
1401
|
-
return SuffixableDirective;
|
1402
|
-
}
|
1403
|
-
|
1404
|
-
/**
|
1405
|
-
* A mixin for giving a component the ability to place content before another piece of content.
|
1406
|
-
*/
|
1407
|
-
function daffPrefixableMixin(Base) {
|
1408
|
-
class PrefixableDirective extends Base {
|
1409
|
-
constructor(...args) {
|
1410
|
-
super(...args);
|
1411
|
-
}
|
1412
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: PrefixableDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
1413
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: PrefixableDirective, isStandalone: true, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
|
1414
|
-
}
|
1415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: PrefixableDirective, decorators: [{
|
1416
|
-
type: Directive
|
1417
|
-
}], ctorParameters: () => [{ type: undefined }], propDecorators: { _prefix: [{
|
1418
|
-
type: ContentChild,
|
1419
|
-
args: [DaffPrefixDirective, { static: true }]
|
1420
|
-
}] } });
|
1421
|
-
return PrefixableDirective;
|
1422
|
-
}
|
1423
|
-
|
1424
1478
|
/**
|
1425
1479
|
* Enumerates the available color palette options for a component.
|
1426
1480
|
* These values can be used to apply specific color styles to components within the application.
|
@@ -1554,11 +1608,17 @@ class DaffColorableDirective {
|
|
1554
1608
|
'daff-white': this.color === DaffPaletteEnum.White,
|
1555
1609
|
};
|
1556
1610
|
}
|
1611
|
+
/**
|
1612
|
+
* @docs-private
|
1613
|
+
*/
|
1557
1614
|
ngOnChanges(changes) {
|
1558
1615
|
if (!changes.color.currentValue) {
|
1559
1616
|
this.color = this.defaultColor;
|
1560
1617
|
}
|
1561
1618
|
}
|
1619
|
+
/**
|
1620
|
+
* @docs-private
|
1621
|
+
*/
|
1562
1622
|
ngOnInit() {
|
1563
1623
|
validateColor(this.color);
|
1564
1624
|
if (!this.color) {
|
@@ -1572,7 +1632,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
1572
1632
|
type: Directive,
|
1573
1633
|
args: [{
|
1574
1634
|
selector: '[daffColorable]',
|
1575
|
-
standalone: true,
|
1576
1635
|
}]
|
1577
1636
|
}], propDecorators: { class: [{
|
1578
1637
|
type: HostBinding,
|
@@ -1837,6 +1896,9 @@ class DaffTextAlignableDirective {
|
|
1837
1896
|
'daff-right': this.textAlignment === DaffTextAlignmentEnum.Right,
|
1838
1897
|
};
|
1839
1898
|
}
|
1899
|
+
/**
|
1900
|
+
* @docs-private
|
1901
|
+
*/
|
1840
1902
|
ngOnChanges(changes) {
|
1841
1903
|
if (!changes.textAlignment?.currentValue) {
|
1842
1904
|
this.textAlignment = this.defaultAlignment;
|
@@ -1982,6 +2044,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
1982
2044
|
*/
|
1983
2045
|
class DaffManageContainerLayoutDirective {
|
1984
2046
|
constructor() {
|
2047
|
+
/**
|
2048
|
+
* @docs-private
|
2049
|
+
*/
|
1985
2050
|
this.class = true;
|
1986
2051
|
}
|
1987
2052
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffManageContainerLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
@@ -2024,6 +2089,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
2024
2089
|
*/
|
2025
2090
|
class DaffArticleEncapsulatedDirective {
|
2026
2091
|
constructor() {
|
2092
|
+
/**
|
2093
|
+
* @docs-private
|
2094
|
+
*/
|
2027
2095
|
this.class = true;
|
2028
2096
|
}
|
2029
2097
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffArticleEncapsulatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
@@ -2071,7 +2139,7 @@ class DaffOsThemeService {
|
|
2071
2139
|
this.doc = _doc;
|
2072
2140
|
this.preference$ = this.doc.defaultView?.matchMedia
|
2073
2141
|
? fromEventPattern(addHandlerFactory(this.doc.defaultView), removeHandlerFactory(this.doc.defaultView))
|
2074
|
-
.pipe(startWith(this.doc.defaultView?.matchMedia(mediaQueryDarkPreference)), map((e) => e.matches), map((prefersDark) => prefersDark ? DaffTheme.Dark : DaffTheme.Light))
|
2142
|
+
.pipe(startWith(this.doc.defaultView?.matchMedia(mediaQueryDarkPreference)), map$1((e) => e.matches), map$1((prefersDark) => prefersDark ? DaffTheme.Dark : DaffTheme.Light))
|
2075
2143
|
: of(DaffTheme.None);
|
2076
2144
|
}
|
2077
2145
|
/**
|
@@ -2114,7 +2182,7 @@ class DaffThemeStorageService {
|
|
2114
2182
|
this.doc = _doc;
|
2115
2183
|
this.theme$ = merge(this.storage$, this.doc.defaultView
|
2116
2184
|
? fromEvent(this.doc.defaultView, 'storage').pipe(startWith(storageEventBuilder(this.storage.getItem(THEME_STORAGE_KEY))), catchError((e) => EMPTY))
|
2117
|
-
: of(storageEventBuilder(this.storage.getItem(THEME_STORAGE_KEY)))).pipe(filter((e) => e.key === THEME_STORAGE_KEY), map((e) => coerceValue(e.newValue)), shareReplay(1));
|
2185
|
+
: of(storageEventBuilder(this.storage.getItem(THEME_STORAGE_KEY)))).pipe(filter((e) => e.key === THEME_STORAGE_KEY), map$1((e) => coerceValue(e.newValue)), shareReplay(1));
|
2118
2186
|
}
|
2119
2187
|
/**
|
2120
2188
|
* Given that Safari doesn't respect in-tab storage events, we have to manually
|
@@ -2180,7 +2248,7 @@ class DaffThemingService {
|
|
2180
2248
|
this.theme$ = combineLatest([
|
2181
2249
|
this.osTheme.getThemePreference(),
|
2182
2250
|
this.themeStorage.getThemeAsObservable(),
|
2183
|
-
]).pipe(map(([osPreference, storedPreference]) => daffComputeThemeSetting(osPreference, storedPreference)));
|
2251
|
+
]).pipe(map$1(([osPreference, storedPreference]) => daffComputeThemeSetting(osPreference, storedPreference)));
|
2184
2252
|
this.theme$.subscribe((theme) => {
|
2185
2253
|
this.theme = theme;
|
2186
2254
|
});
|
@@ -2427,11 +2495,17 @@ class DaffSizableDirective {
|
|
2427
2495
|
'daff-xl': this.size === DaffSizableEnum.XLarge,
|
2428
2496
|
};
|
2429
2497
|
}
|
2498
|
+
/**
|
2499
|
+
* @docs-private
|
2500
|
+
*/
|
2430
2501
|
ngOnChanges(changes) {
|
2431
2502
|
if (!changes.size?.currentValue) {
|
2432
2503
|
this.size = this.defaultSize;
|
2433
2504
|
}
|
2434
2505
|
}
|
2506
|
+
/**
|
2507
|
+
* @docs-private
|
2508
|
+
*/
|
2435
2509
|
ngOnInit() {
|
2436
2510
|
if (!this.size) {
|
2437
2511
|
this.size = this.defaultSize;
|
@@ -2546,6 +2620,9 @@ class DaffOpenableDirective {
|
|
2546
2620
|
this._setOpen(state);
|
2547
2621
|
this.toggled.emit(state);
|
2548
2622
|
}
|
2623
|
+
/**
|
2624
|
+
* @docs-private
|
2625
|
+
*/
|
2549
2626
|
ngOnChanges(changes) {
|
2550
2627
|
/**
|
2551
2628
|
* Throw an error if open is set in a component that is not stateless
|
@@ -2630,5 +2707,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
2630
2707
|
* Generated bundle index. Do not edit.
|
2631
2708
|
*/
|
2632
2709
|
|
2633
|
-
export { DAFF_THEME_INITIALIZER, DaffArticleEncapsulatedDirective, DaffBreakpoints, DaffCheckboxComponent, DaffCheckboxControlValueAccessorDirective, DaffCheckboxModule, DaffCheckboxSetComponent, DaffColorableDirective, DaffCompactableDirective, DaffErrorMessageComponent, DaffErrorMessageModule, DaffErrorStateMatcher, DaffFocusStackService, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldModule, DaffFormLabelDirective, DaffFormLabelModule, DaffInputComponent, DaffInputModule, DaffManageContainerLayoutDirective, DaffNativeSelectComponent, DaffNativeSelectModule, DaffOpenableDirective, DaffPrefixDirective, DaffPrefixSuffixModule, DaffQuantityFieldComponent, DaffQuantityFieldModule, DaffQuantityInputComponent, DaffQuantitySelectComponent, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector
|
2710
|
+
export { DAFF_FORM_FIELD_COMPONENTS, DAFF_THEME_INITIALIZER, DaffArticleEncapsulatedDirective, DaffBreakpoints, DaffCheckboxComponent, DaffCheckboxControlValueAccessorDirective, DaffCheckboxModule, DaffCheckboxSetComponent, DaffColorableDirective, DaffCompactableDirective, DaffErrorMessageComponent, DaffErrorMessageModule, DaffErrorStateMatcher, DaffFocusStackService, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldModule, DaffFormLabelDirective, DaffFormLabelModule, DaffHintComponent, DaffInputComponent, DaffInputModule, DaffManageContainerLayoutDirective, DaffNativeSelectComponent, DaffNativeSelectModule, DaffOpenableDirective, DaffPrefixDirective, DaffPrefixSuffixModule, DaffQuantityFieldComponent, DaffQuantityFieldModule, DaffQuantityInputComponent, DaffQuantitySelectComponent, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector };
|
2634
2711
|
//# sourceMappingURL=daffodil-design.mjs.map
|