@daffodil/design 0.84.0 → 0.85.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/src/accordion-theme.scss +11 -13
- package/article/src/article-theme.scss +36 -38
- package/atoms/form/form-field/form-field/form-field.component.d.ts +22 -1
- package/atoms/form/form-field/form-field-control.d.ts +1 -0
- package/atoms/form/hint/hint.component.d.ts +5 -1
- package/breadcrumb/src/breadcrumb-theme.scss +9 -11
- package/button/button/raised/raised.component.d.ts +1 -1
- package/button/src/button/basic/button-theme.scss +80 -82
- package/button/src/button/flat/flat-theme.scss +28 -30
- package/button/src/button/icon/icon-theme.scss +74 -76
- package/button/src/button/raised/raised-theme.scss +28 -30
- package/button/src/button/stroked/stroked-theme.scss +31 -33
- package/button/src/button/underline/underline-theme.scss +30 -32
- package/callout/src/callout-theme.scss +21 -23
- package/card/src/card/raised/raised-theme.scss +9 -11
- package/card/src/card/stroked/stroked-theme.scss +32 -34
- package/card/src/card-base-theme.scss +42 -44
- package/core/colorable/colorable.d.ts +2 -2
- package/fesm2022/daffodil-design-accordion-examples.mjs +10 -10
- package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-accordion.mjs +15 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article-examples.mjs +31 -31
- package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +11 -11
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs +7 -7
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +11 -11
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +28 -28
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +30 -30
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +13 -13
- package/fesm2022/daffodil-design-callout-examples.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-examples.mjs +19 -19
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +35 -35
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +7 -7
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container-examples.mjs +4 -4
- package/fesm2022/daffodil-design-container-examples.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-hero-examples.mjs +13 -13
- package/fesm2022/daffodil-design-hero-examples.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-examples.mjs +10 -10
- package/fesm2022/daffodil-design-image-examples.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-examples.mjs +38 -17
- package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +96 -0
- package/fesm2022/daffodil-design-input.mjs.map +1 -0
- package/fesm2022/daffodil-design-link-set.mjs +17 -17
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +13 -13
- package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +12 -12
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon-examples.mjs +4 -4
- package/fesm2022/daffodil-design-loading-icon-examples.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-examples.mjs +16 -16
- package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +14 -21
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu-examples.mjs +7 -7
- package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +17 -17
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal-examples.mjs +7 -7
- package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +28 -28
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar-examples.mjs +13 -13
- package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +8 -8
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +16 -16
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +20 -20
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator-examples.mjs +7 -7
- package/fesm2022/daffodil-design-paginator-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -8
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +12 -12
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +19 -18
- package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +355 -0
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -0
- package/fesm2022/daffodil-design-radio-examples.mjs +4 -4
- package/fesm2022/daffodil-design-radio-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +13 -13
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +27 -27
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch-examples.mjs +16 -16
- package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +4 -4
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs-examples.mjs +16 -16
- package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +16 -16
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet-examples.mjs +4 -4
- package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +4 -4
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +16 -16
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +22 -22
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree-examples.mjs +7 -7
- package/fesm2022/daffodil-design-tree-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +11 -11
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +7 -7
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +252 -616
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/src/hero-theme.scss +21 -23
- package/input/README.md +66 -0
- package/input/examples/input-hint-and-error/input-hint-and-error.component.d.ts +9 -0
- package/input/index.d.ts +1 -0
- package/{atoms/form/input → input}/input.component.d.ts +1 -1
- package/list/src/list-theme.scss +9 -11
- package/loading-icon/src/loading-icon-theme.scss +20 -22
- package/media-gallery/media-gallery/media-gallery.component.d.ts +0 -4
- package/media-gallery/src/media-gallery-theme.scss +10 -12
- package/menu/helpers/create-overlay.d.ts +1 -1
- package/menu/src/menu-theme.scss +10 -11
- package/modal/src/modal-theme.scss +2 -2
- package/navbar/src/navbar-theme.scss +18 -20
- package/notification/src/notification-theme.scss +44 -46
- package/package.json +1 -1
- package/paginator/src/paginator-theme.scss +9 -11
- package/progress-bar/src/progress-bar-theme.scss +18 -20
- package/public_api.d.ts +0 -2
- package/quantity-field/README.md +63 -0
- package/quantity-field/index.d.ts +1 -0
- package/quantity-field/public_api.d.ts +2 -0
- package/{atoms/form/quantity-field → quantity-field}/quantity-field.component.d.ts +3 -3
- package/quantity-field/quantity-field.module.d.ts +11 -0
- package/{atoms/form/quantity-field → quantity-field}/quantity-input/quantity-input.component.d.ts +2 -2
- package/{atoms/form/quantity-field → quantity-field}/quantity-select/quantity-select.component.d.ts +2 -2
- package/scss/state/skeleton/_mixins.scss +8 -9
- package/scss/theme.scss +0 -2
- package/scss/theming/_configure-theme.scss +16 -16
- package/scss/theming/_get-base-color.scss +19 -0
- package/scss/theming/_get-palette.scss +27 -0
- package/scss/theming/_get-theme-mode.scss +9 -0
- package/scss/theming/_index.scss +3 -0
- package/scss/theming/_light-dark.scss +4 -4
- package/scss/theming/_theme-css-variables.scss +20 -20
- package/sidebar/src/sidebar-theme.scss +4 -5
- package/src/atoms/form/error-message/error-message-theme.scss +3 -4
- package/src/atoms/form/form-field/form-field/form-field-theme.scss +42 -31
- package/src/atoms/form/hint/hint-theme.scss +13 -8
- package/src/atoms/form/native-select/native-select-theme.scss +5 -7
- package/switch/src/switch-theme.scss +13 -15
- package/tabs/src/tabs-theme.scss +13 -15
- package/toast/src/toast-theme.scss +36 -38
- package/tree/src/tree-theme.scss +20 -22
- package/atoms/form/quantity-field/public_api.d.ts +0 -4
- package/atoms/form/quantity-field/quantity-field.module.d.ts +0 -13
- package/src/atoms/form/input/input-theme.scss +0 -12
- /package/{atoms/form/input → input}/input.module.d.ts +0 -0
- /package/{atoms/form/input → input}/public_api.d.ts +0 -0
@@ -1,13 +1,10 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import {
|
3
|
-
import { BehaviorSubject,
|
2
|
+
import { HostBinding, Directive, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, HostListener, Optional, Self, EventEmitter, ElementRef, Output, ViewChild, ContentChildren, Injectable, InjectionToken, inject, PLATFORM_ID, Inject, makeEnvironmentProviders, provideAppInitializer, isDevMode } from '@angular/core';
|
3
|
+
import { BehaviorSubject, of, fromEventPattern, Subject, merge, fromEvent, EMPTY, combineLatest } from 'rxjs';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
|
-
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
6
|
-
import * as i2 from '@angular/common';
|
7
5
|
import { CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
|
8
|
-
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
9
|
-
import { takeUntil, startWith, map as map$1, catchError, filter, shareReplay } from 'rxjs/operators';
|
10
6
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
7
|
+
import { startWith, map, catchError, filter, shareReplay } from 'rxjs/operators';
|
11
8
|
import { DaffServerSafePersistenceServiceToken } from '@daffodil/core';
|
12
9
|
|
13
10
|
class DaffErrorStateMatcher {
|
@@ -28,10 +25,10 @@ class DaffPrefixDirective {
|
|
28
25
|
*/
|
29
26
|
this.class = true;
|
30
27
|
}
|
31
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
32
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
28
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
29
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffPrefixDirective, isStandalone: true, selector: "[daffPrefix]", host: { properties: { "class.daff-prefix": "this.class" } }, ngImport: i0 }); }
|
33
30
|
}
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPrefixDirective, decorators: [{
|
35
32
|
type: Directive,
|
36
33
|
args: [{
|
37
34
|
selector: '[daffPrefix]',
|
@@ -53,10 +50,10 @@ class DaffSuffixDirective {
|
|
53
50
|
*/
|
54
51
|
this.class = true;
|
55
52
|
}
|
56
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
57
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
53
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
54
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffSuffixDirective, isStandalone: true, selector: "[daffSuffix]", host: { properties: { "class.daff-suffix": "this.class" } }, ngImport: i0 }); }
|
58
55
|
}
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSuffixDirective, decorators: [{
|
60
57
|
type: Directive,
|
61
58
|
args: [{
|
62
59
|
selector: '[daffSuffix]',
|
@@ -66,6 +63,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
66
63
|
args: ['class.daff-suffix']
|
67
64
|
}] } });
|
68
65
|
|
66
|
+
/**
|
67
|
+
* `DaffSkeletonableDirective` allows a component to display a skeleton loading
|
68
|
+
* state by conditionally applying a CSS class. This is useful for indicating to
|
69
|
+
* users that content is loading or being processed. This directive can be used to
|
70
|
+
* apply a skeleton loading state to any component by toggling the `skeleton`
|
71
|
+
* input property. When `skeleton` is `true`, the `daff-skeleton` CSS class
|
72
|
+
* is applied, which should style the component to look like a loading placeholder.
|
73
|
+
*
|
74
|
+
* @example Implementing it as an attribute directive
|
75
|
+
*
|
76
|
+
* ```html
|
77
|
+
* <div daffSkeletonable [skeleton]="isLoading">Content</div>
|
78
|
+
* ```
|
79
|
+
*
|
80
|
+
* @example Implementing it as an Angular host directive
|
81
|
+
*
|
82
|
+
* ```ts
|
83
|
+
* @Component({
|
84
|
+
* standalone: true,
|
85
|
+
* selector: 'custom-component',
|
86
|
+
* template: 'custom-component.html',
|
87
|
+
* hostDirectives: [
|
88
|
+
* {
|
89
|
+
* directive: DaffSkeletonableDirective,
|
90
|
+
* inputs: ['skeleton'],
|
91
|
+
* },
|
92
|
+
* ],
|
93
|
+
* })
|
94
|
+
* export class CustomComponent { }
|
95
|
+
* ```
|
96
|
+
*
|
97
|
+
* ```scss
|
98
|
+
* :host {
|
99
|
+
* .daff-skeleton {
|
100
|
+
* @include state.skeleton-screen(48px, 24px);
|
101
|
+
* }
|
102
|
+
* }
|
103
|
+
* ```
|
104
|
+
*
|
105
|
+
* The directive applies the `daff-skeleton` class to the component should be defined in your styles to display the loading
|
106
|
+
* state as desired. It can be used in conjuction with the `skeleton-screen` mixin, which provides predefined loading styles.
|
107
|
+
*/
|
108
|
+
class DaffSkeletonableDirective {
|
109
|
+
constructor() {
|
110
|
+
this.skeleton = false;
|
111
|
+
}
|
112
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSkeletonableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
113
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffSkeletonableDirective, isStandalone: true, selector: "[daffSkeletonable]", inputs: { skeleton: "skeleton" }, host: { properties: { "class.daff-skeleton": "this.skeleton" } }, ngImport: i0 }); }
|
114
|
+
}
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSkeletonableDirective, decorators: [{
|
116
|
+
type: Directive,
|
117
|
+
args: [{
|
118
|
+
selector: '[daffSkeletonable]',
|
119
|
+
standalone: true,
|
120
|
+
}]
|
121
|
+
}], propDecorators: { skeleton: [{
|
122
|
+
type: Input
|
123
|
+
}, {
|
124
|
+
type: HostBinding,
|
125
|
+
args: ['class.daff-skeleton']
|
126
|
+
}] } });
|
127
|
+
|
69
128
|
/**
|
70
129
|
*
|
71
130
|
* The class that a form control must **implement** in order to be
|
@@ -78,6 +137,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
78
137
|
* be used for the necessary dependency injection.
|
79
138
|
*/
|
80
139
|
class DaffFormFieldControl {
|
140
|
+
get raised() {
|
141
|
+
return this.focused;
|
142
|
+
}
|
143
|
+
;
|
81
144
|
constructor(ngControl) {
|
82
145
|
this.ngControl = ngControl;
|
83
146
|
this._stateChanges = new BehaviorSubject({
|
@@ -110,6 +173,24 @@ class DaffFormFieldComponent {
|
|
110
173
|
get isSelectField() {
|
111
174
|
return this._control.controlType === 'native-select';
|
112
175
|
}
|
176
|
+
/**
|
177
|
+
* @docs-private
|
178
|
+
*/
|
179
|
+
get errorClass() {
|
180
|
+
return this.isError;
|
181
|
+
}
|
182
|
+
/**
|
183
|
+
* @docs-private
|
184
|
+
*/
|
185
|
+
get disabledClass() {
|
186
|
+
return this.isDisabled;
|
187
|
+
}
|
188
|
+
/**
|
189
|
+
* @docs-private
|
190
|
+
*/
|
191
|
+
get validClass() {
|
192
|
+
return this.isValid;
|
193
|
+
}
|
113
194
|
constructor(cd) {
|
114
195
|
this.cd = cd;
|
115
196
|
/** @docs-private */
|
@@ -137,6 +218,18 @@ class DaffFormFieldComponent {
|
|
137
218
|
get isFocused() {
|
138
219
|
return this._control?.focused;
|
139
220
|
}
|
221
|
+
/**
|
222
|
+
* @docs-private
|
223
|
+
*/
|
224
|
+
get focusedClass() {
|
225
|
+
return this.isFocused;
|
226
|
+
}
|
227
|
+
/**
|
228
|
+
* @docs-private
|
229
|
+
*/
|
230
|
+
get raisedClass() {
|
231
|
+
return this._control?.raised || this.isFilled;
|
232
|
+
}
|
140
233
|
/**
|
141
234
|
* Validate whether or not the FormField is in a "usable" state.
|
142
235
|
*/
|
@@ -172,12 +265,17 @@ class DaffFormFieldComponent {
|
|
172
265
|
ngAfterContentChecked() {
|
173
266
|
this._validateFormControl();
|
174
267
|
}
|
175
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
176
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
268
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
269
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", host: { properties: { "class.daff-form-field": "this.class", "class.daff-error": "this.errorClass", "class.daff-disabled": "this.disabledClass", "class.daff-valid": "this.validClass", "class.daff-focused": "this.focusedClass", "class.daff-raised": "this.raisedClass" } }, 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 }], hostDirectives: [{ directive: DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "<div class=\"daff-form-field__control\">\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-hint\"></ng-content>\n<ng-content select=\"daff-error-message\"></ng-content>", styles: [".daff-form-field{display:block;position:relative}.daff-form-field .daff-hint,.daff-form-field .daff-error-message{margin-top:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;position:relative;width:100%}.daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field__control input,.daff-form-field__control textarea,.daff-form-field__control select{font-size:1rem;line-height:1.5rem;padding:1rem}.daff-form-field__control .daff-form-label{position:absolute;left:1rem;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s}.daff-form-field__control .daff-form-label+input,.daff-form-field__control .daff-form-label+textarea,.daff-form-field__control .daff-form-label+select{padding:1.5rem 1rem .5rem}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.daff-raised .daff-form-label{transform:translateY(-75%) scale(.75)}.daff-form-field.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.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;position:relative}.daff-form-field .daff-prefix{padding-left:1rem}.daff-form-field .daff-suffix{padding-right:1rem}.daff-form-field.daff-skeleton{display:flex;position:relative}.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"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
177
270
|
}
|
178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldComponent, decorators: [{
|
179
272
|
type: Component,
|
180
|
-
args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
273
|
+
args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
274
|
+
{
|
275
|
+
directive: DaffSkeletonableDirective,
|
276
|
+
inputs: ['skeleton'],
|
277
|
+
},
|
278
|
+
], template: "<div class=\"daff-form-field__control\">\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-hint\"></ng-content>\n<ng-content select=\"daff-error-message\"></ng-content>", styles: [".daff-form-field{display:block;position:relative}.daff-form-field .daff-hint,.daff-form-field .daff-error-message{margin-top:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;position:relative;width:100%}.daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field__control input,.daff-form-field__control textarea,.daff-form-field__control select{font-size:1rem;line-height:1.5rem;padding:1rem}.daff-form-field__control .daff-form-label{position:absolute;left:1rem;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s}.daff-form-field__control .daff-form-label+input,.daff-form-field__control .daff-form-label+textarea,.daff-form-field__control .daff-form-label+select{padding:1.5rem 1rem .5rem}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.daff-raised .daff-form-label{transform:translateY(-75%) scale(.75)}.daff-form-field.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.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;position:relative}.daff-form-field .daff-prefix{padding-left:1rem}.daff-form-field .daff-suffix{padding-right:1rem}.daff-form-field.daff-skeleton{display:flex;position:relative}.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"] }]
|
181
279
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { class: [{
|
182
280
|
type: HostBinding,
|
183
281
|
args: ['class.daff-form-field']
|
@@ -190,6 +288,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
190
288
|
}], _control: [{
|
191
289
|
type: ContentChild,
|
192
290
|
args: [DaffFormFieldControl]
|
291
|
+
}], errorClass: [{
|
292
|
+
type: HostBinding,
|
293
|
+
args: ['class.daff-error']
|
294
|
+
}], disabledClass: [{
|
295
|
+
type: HostBinding,
|
296
|
+
args: ['class.daff-disabled']
|
297
|
+
}], validClass: [{
|
298
|
+
type: HostBinding,
|
299
|
+
args: ['class.daff-valid']
|
300
|
+
}], focusedClass: [{
|
301
|
+
type: HostBinding,
|
302
|
+
args: ['class.daff-focused']
|
303
|
+
}], raisedClass: [{
|
304
|
+
type: HostBinding,
|
305
|
+
args: ['class.daff-raised']
|
193
306
|
}] } });
|
194
307
|
|
195
308
|
class DaffErrorMessageComponent {
|
@@ -199,12 +312,12 @@ class DaffErrorMessageComponent {
|
|
199
312
|
*/
|
200
313
|
this.class = true;
|
201
314
|
}
|
202
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
203
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
315
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
316
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
204
317
|
}
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffErrorMessageComponent, decorators: [{
|
206
319
|
type: Component,
|
207
|
-
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;font-size:.875rem}\n"] }]
|
320
|
+
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"] }]
|
208
321
|
}], propDecorators: { class: [{
|
209
322
|
type: HostBinding,
|
210
323
|
args: ['class.daff-error-message']
|
@@ -214,11 +327,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
214
327
|
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
215
328
|
*/
|
216
329
|
class DaffErrorMessageModule {
|
217
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
218
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
219
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
330
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffErrorMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
331
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffErrorMessageModule, imports: [DaffErrorMessageComponent], exports: [DaffErrorMessageComponent] }); }
|
332
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffErrorMessageModule }); }
|
220
333
|
}
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffErrorMessageModule, decorators: [{
|
222
335
|
type: NgModule,
|
223
336
|
args: [{
|
224
337
|
exports: [
|
@@ -237,10 +350,10 @@ class DaffFormLabelDirective {
|
|
237
350
|
*/
|
238
351
|
this.class = true;
|
239
352
|
}
|
240
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
241
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
353
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
354
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffFormLabelDirective, isStandalone: true, selector: "[daffFormLabel]", host: { properties: { "class.daff-form-label": "this.class" } }, ngImport: i0 }); }
|
242
355
|
}
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormLabelDirective, decorators: [{
|
244
357
|
type: Directive,
|
245
358
|
args: [{
|
246
359
|
selector: '[daffFormLabel]',
|
@@ -254,11 +367,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
254
367
|
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
255
368
|
*/
|
256
369
|
class DaffFormLabelModule {
|
257
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
258
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
259
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
370
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
371
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffFormLabelModule, imports: [DaffFormLabelDirective], exports: [DaffFormLabelDirective] }); }
|
372
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormLabelModule }); }
|
260
373
|
}
|
261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormLabelModule, decorators: [{
|
262
375
|
type: NgModule,
|
263
376
|
args: [{
|
264
377
|
exports: [
|
@@ -274,17 +387,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
274
387
|
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
275
388
|
*/
|
276
389
|
class DaffFormFieldModule {
|
277
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
278
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
390
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
391
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldModule, imports: [DaffFormFieldComponent,
|
279
392
|
DaffErrorMessageModule,
|
280
393
|
DaffFormLabelModule], exports: [DaffFormFieldComponent,
|
281
394
|
DaffErrorMessageModule,
|
282
395
|
DaffFormLabelModule] }); }
|
283
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
396
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldModule, imports: [DaffErrorMessageModule,
|
284
397
|
DaffFormLabelModule, DaffErrorMessageModule,
|
285
398
|
DaffFormLabelModule] }); }
|
286
399
|
}
|
287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldModule, decorators: [{
|
288
401
|
type: NgModule,
|
289
402
|
args: [{
|
290
403
|
imports: [
|
@@ -306,16 +419,25 @@ class DaffHintComponent {
|
|
306
419
|
* @docs-private
|
307
420
|
*/
|
308
421
|
this.class = true;
|
422
|
+
/**
|
423
|
+
* Whether or not the hint has been validated
|
424
|
+
* */
|
425
|
+
this.validated = false;
|
309
426
|
}
|
310
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
311
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
427
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
428
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffHintComponent, isStandalone: true, selector: "daff-hint", inputs: { validated: "validated" }, host: { properties: { "class.daff-hint": "this.class", "class.validated": "this.validated" } }, 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 }); }
|
312
429
|
}
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffHintComponent, decorators: [{
|
314
431
|
type: Component,
|
315
|
-
args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:
|
432
|
+
args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"] }]
|
316
433
|
}], propDecorators: { class: [{
|
317
434
|
type: HostBinding,
|
318
435
|
args: ['class.daff-hint']
|
436
|
+
}], validated: [{
|
437
|
+
type: Input
|
438
|
+
}, {
|
439
|
+
type: HostBinding,
|
440
|
+
args: ['class.validated']
|
319
441
|
}] } });
|
320
442
|
|
321
443
|
/**
|
@@ -330,90 +452,6 @@ const DAFF_FORM_FIELD_COMPONENTS = [
|
|
330
452
|
DaffSuffixDirective,
|
331
453
|
];
|
332
454
|
|
333
|
-
/**
|
334
|
-
* DaffInputComponent provides the same functionality as a native `<input>` and contains custom styling and functionality.
|
335
|
-
*/
|
336
|
-
class DaffInputComponent extends DaffFormFieldControl {
|
337
|
-
/** @docs-private */
|
338
|
-
focus() {
|
339
|
-
this.focused = true;
|
340
|
-
this.emitState();
|
341
|
-
}
|
342
|
-
/** @docs-private */
|
343
|
-
blur() {
|
344
|
-
this.focused = false;
|
345
|
-
this.emitState();
|
346
|
-
}
|
347
|
-
constructor(
|
348
|
-
/** @docs-private */
|
349
|
-
ngControl, _elementRef) {
|
350
|
-
super(ngControl);
|
351
|
-
this.ngControl = ngControl;
|
352
|
-
this._elementRef = _elementRef;
|
353
|
-
/** @docs-private */
|
354
|
-
this.class = true;
|
355
|
-
/** @docs-private */
|
356
|
-
this.controlType = 'native-input';
|
357
|
-
this.focused = false;
|
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 */
|
364
|
-
onFocus() {
|
365
|
-
this._elementRef.nativeElement.focus();
|
366
|
-
}
|
367
|
-
get value() {
|
368
|
-
return this._elementRef.nativeElement.value;
|
369
|
-
}
|
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 }); }
|
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: [
|
372
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
373
|
-
{ provide: DaffFormFieldControl, useExisting: DaffInputComponent },
|
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 }); }
|
375
|
-
}
|
376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputComponent, decorators: [{
|
377
|
-
type: Component,
|
378
|
-
args: [{ selector: 'input[daff-input]', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
379
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
380
|
-
{ provide: DaffFormFieldControl, useExisting: DaffInputComponent },
|
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"] }]
|
382
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
383
|
-
type: Optional
|
384
|
-
}, {
|
385
|
-
type: Self
|
386
|
-
}] }, { type: i0.ElementRef }], propDecorators: { class: [{
|
387
|
-
type: HostBinding,
|
388
|
-
args: ['class.daff-input']
|
389
|
-
}], focus: [{
|
390
|
-
type: HostListener,
|
391
|
-
args: ['focus']
|
392
|
-
}], blur: [{
|
393
|
-
type: HostListener,
|
394
|
-
args: ['blur']
|
395
|
-
}] } });
|
396
|
-
|
397
|
-
/**
|
398
|
-
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
399
|
-
*/
|
400
|
-
class DaffInputModule {
|
401
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
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 }); }
|
404
|
-
}
|
405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInputModule, decorators: [{
|
406
|
-
type: NgModule,
|
407
|
-
args: [{
|
408
|
-
imports: [
|
409
|
-
DaffInputComponent,
|
410
|
-
],
|
411
|
-
exports: [
|
412
|
-
DaffInputComponent,
|
413
|
-
],
|
414
|
-
}]
|
415
|
-
}] });
|
416
|
-
|
417
455
|
class DaffNativeSelectComponent extends DaffFormFieldControl {
|
418
456
|
/**
|
419
457
|
* @docs-private
|
@@ -453,13 +491,13 @@ class DaffNativeSelectComponent extends DaffFormFieldControl {
|
|
453
491
|
get value() {
|
454
492
|
return this._elementRef.nativeElement.value;
|
455
493
|
}
|
456
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
457
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
494
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
495
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", 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: [
|
458
496
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
459
497
|
{ provide: DaffFormFieldControl, useExisting: DaffNativeSelectComponent },
|
460
498
|
], 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 }); }
|
461
499
|
}
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectComponent, decorators: [{
|
463
501
|
type: Component,
|
464
502
|
args: [{ selector: 'select[daff-native-select]', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
465
503
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
@@ -483,11 +521,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
483
521
|
}] } });
|
484
522
|
|
485
523
|
class DaffNativeSelectModule {
|
486
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
487
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
488
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
524
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
525
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectModule, declarations: [DaffNativeSelectComponent], imports: [CommonModule], exports: [DaffNativeSelectComponent] }); }
|
526
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectModule, imports: [CommonModule] }); }
|
489
527
|
}
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectModule, decorators: [{
|
491
529
|
type: NgModule,
|
492
530
|
args: [{
|
493
531
|
imports: [
|
@@ -604,10 +642,10 @@ class DaffCheckboxComponent {
|
|
604
642
|
this.checked = false;
|
605
643
|
this._cdRef.markForCheck();
|
606
644
|
}
|
607
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
608
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
645
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
646
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffCheckboxComponent, isStandalone: false, selector: "daff-checkbox", inputs: { name: "name", value: "value", checked: "checked", id: "id", label: ["aria-label", "label"], labeledBy: ["aria-labelledby", "labeledBy"] }, outputs: { becameChecked: "becameChecked", becameUnchecked: "becameUnchecked" }, host: { properties: { "attr.role": "this.role", "class.focused": "this.focusClass", "class.disabled": "this.disabledClass" } }, viewQueries: [{ propertyName: "nativeCheckbox", first: true, predicate: ["inputElement"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<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>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
609
647
|
}
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxComponent, decorators: [{
|
611
649
|
type: Component,
|
612
650
|
args: [{ selector: 'daff-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<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>" }]
|
613
651
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { nativeCheckbox: [{
|
@@ -714,10 +752,10 @@ class DaffCheckboxControlValueAccessorDirective {
|
|
714
752
|
fireDeselect() {
|
715
753
|
this._checkbox.deselect();
|
716
754
|
}
|
717
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
718
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
755
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxControlValueAccessorDirective, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DaffCheckboxComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
|
756
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffCheckboxControlValueAccessorDirective, isStandalone: false, selector: "daff-checkbox[ngModel], daff-checkbox[formControl], daff-checkbox[formControlName]", inputs: { value: "value", name: "name" }, ngImport: i0 }); }
|
719
757
|
}
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxControlValueAccessorDirective, decorators: [{
|
721
759
|
type: Directive,
|
722
760
|
args: [{
|
723
761
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
@@ -748,10 +786,10 @@ class DaffCheckboxSetComponent {
|
|
748
786
|
const checkboxes = this.checkboxes.toArray();
|
749
787
|
return this.formArray.value.map((element, index) => element === true ? checkboxes[index].value : false).filter(element => element !== false);
|
750
788
|
}
|
751
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
752
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
789
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxSetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
790
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffCheckboxSetComponent, isStandalone: false, selector: "daff-checkbox-set", inputs: { formArray: "formArray", name: "name" }, outputs: { valueList: "valueList" }, host: { properties: { "attr.role": "this.role" } }, queries: [{ propertyName: "checkboxes", predicate: DaffCheckboxComponent }], ngImport: i0, template: "<ng-content></ng-content>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
753
791
|
}
|
754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxSetComponent, decorators: [{
|
755
793
|
type: Component,
|
756
794
|
args: [{ selector: 'daff-checkbox-set', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-content></ng-content>" }]
|
757
795
|
}], propDecorators: { formArray: [{
|
@@ -769,17 +807,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
769
807
|
}] } });
|
770
808
|
|
771
809
|
class DaffCheckboxModule {
|
772
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
773
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
810
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
811
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxModule, declarations: [DaffCheckboxComponent,
|
774
812
|
DaffCheckboxSetComponent,
|
775
813
|
DaffCheckboxControlValueAccessorDirective], imports: [CommonModule], exports: [DaffCheckboxComponent,
|
776
814
|
DaffCheckboxSetComponent,
|
777
815
|
DaffCheckboxControlValueAccessorDirective] }); }
|
778
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
816
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxModule, providers: [
|
779
817
|
DaffCheckboxSetComponent,
|
780
818
|
], imports: [CommonModule] }); }
|
781
819
|
}
|
782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCheckboxModule, decorators: [{
|
783
821
|
type: NgModule,
|
784
822
|
args: [{
|
785
823
|
exports: [
|
@@ -801,346 +839,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
801
839
|
}]
|
802
840
|
}] });
|
803
841
|
|
804
|
-
class DaffQuantityInputComponent {
|
805
|
-
get focused() {
|
806
|
-
return this.input?.focused;
|
807
|
-
}
|
808
|
-
get value() {
|
809
|
-
return this.ngControl.control.value;
|
810
|
-
}
|
811
|
-
set value(value) {
|
812
|
-
const val = Math.min(Math.round(coerceNumberProperty(value)), this.max);
|
813
|
-
this.ngControl.control.patchValue(val);
|
814
|
-
this._inputControl.patchValue(val);
|
815
|
-
this.changeDetectorRef.markForCheck();
|
816
|
-
}
|
817
|
-
get disabled() {
|
818
|
-
return this.ngControl.control.disabled;
|
819
|
-
}
|
820
|
-
constructor(ngControl, changeDetectorRef) {
|
821
|
-
this.ngControl = ngControl;
|
822
|
-
this.changeDetectorRef = changeDetectorRef;
|
823
|
-
/**
|
824
|
-
* @docs
|
825
|
-
* The minimum number for the quantity input field
|
826
|
-
*/
|
827
|
-
this.min = 1;
|
828
|
-
/**
|
829
|
-
* @docs
|
830
|
-
* The maximum number for the quantity input field
|
831
|
-
*/
|
832
|
-
this.max = 10;
|
833
|
-
/**
|
834
|
-
* A new control for the nested native input.
|
835
|
-
* We don't bind the native input directly to the inherited form control
|
836
|
-
* to avoid triggering updates on the input event.
|
837
|
-
* Instead, we listen for the change event and manually patch form control values.
|
838
|
-
*/
|
839
|
-
this._inputControl = new UntypedFormControl();
|
840
|
-
this._destroyed = new Subject();
|
841
|
-
}
|
842
|
-
/**
|
843
|
-
* @docs-private
|
844
|
-
*/
|
845
|
-
ngOnInit() {
|
846
|
-
this._inputControl.patchValue(this.ngControl.control.value);
|
847
|
-
this.setInputDisabled();
|
848
|
-
this.ngControl.statusChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
849
|
-
this.setInputDisabled();
|
850
|
-
});
|
851
|
-
}
|
852
|
-
ngOnDestroy() {
|
853
|
-
this._destroyed.next(true);
|
854
|
-
}
|
855
|
-
focus() {
|
856
|
-
this.input.focus();
|
857
|
-
}
|
858
|
-
onFocus() {
|
859
|
-
this.ngControl.control.markAsTouched();
|
860
|
-
}
|
861
|
-
onBlur() {
|
862
|
-
if (this.value === null || this.value === undefined) {
|
863
|
-
this.value = 1;
|
864
|
-
this.changeDetectorRef.markForCheck();
|
865
|
-
}
|
866
|
-
}
|
867
|
-
/**
|
868
|
-
* Callback function fired when the value changes.
|
869
|
-
* Used to pass the value back up to the ngControl.
|
870
|
-
*/
|
871
|
-
onValueChange(e) {
|
872
|
-
this.value = e.target.value;
|
873
|
-
}
|
874
|
-
setInputDisabled() {
|
875
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
876
|
-
this.ngControl.disabled
|
877
|
-
? this._inputControl.disable()
|
878
|
-
: this._inputControl.enable();
|
879
|
-
}
|
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 }); }
|
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 }); }
|
882
|
-
}
|
883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityInputComponent, decorators: [{
|
884
|
-
type: Component,
|
885
|
-
args: [{ selector: 'daff-quantity-input', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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" }]
|
886
|
-
}], ctorParameters: () => [{ type: i1.NgControl }, { type: i0.ChangeDetectorRef }], propDecorators: { input: [{
|
887
|
-
type: ViewChild,
|
888
|
-
args: [DaffInputComponent]
|
889
|
-
}], min: [{
|
890
|
-
type: Input
|
891
|
-
}], max: [{
|
892
|
-
type: Input
|
893
|
-
}] } });
|
894
|
-
|
895
|
-
/**
|
896
|
-
* Create an array of numbers from min to max, not including max.
|
897
|
-
*/
|
898
|
-
const makeValueArray = (min, max, increment) => Array(max - min).fill(0).map((x, i) => (i * increment) + min);
|
899
|
-
class DaffQuantitySelectComponent {
|
900
|
-
get value() {
|
901
|
-
return this._value;
|
902
|
-
}
|
903
|
-
set value(value) {
|
904
|
-
this._value = value;
|
905
|
-
this.ngControl.control.patchValue(this._value);
|
906
|
-
this.changeDetectorRef.markForCheck();
|
907
|
-
}
|
908
|
-
constructor(ngControl, changeDetectorRef) {
|
909
|
-
this.ngControl = ngControl;
|
910
|
-
this.changeDetectorRef = changeDetectorRef;
|
911
|
-
/**
|
912
|
-
* @docs
|
913
|
-
* The minimum number selectable.
|
914
|
-
*/
|
915
|
-
this.min = 1;
|
916
|
-
/**
|
917
|
-
* @docs
|
918
|
-
* The maximum number selectable;
|
919
|
-
*/
|
920
|
-
this.max = 10;
|
921
|
-
/**
|
922
|
-
* @docs
|
923
|
-
* Property used to determine whether or not the DaffQuantitySelectComponent is
|
924
|
-
* used in a situation whether the `max` isn't a true max.
|
925
|
-
*/
|
926
|
-
this.extendable = true;
|
927
|
-
/**
|
928
|
-
* The amount to increment between "min" and "max".
|
929
|
-
*/
|
930
|
-
this.increment = 1;
|
931
|
-
this._value = 1;
|
932
|
-
}
|
933
|
-
/**
|
934
|
-
* Callback function fired when the value changes.
|
935
|
-
* Used to pass the value back up to the ngControl.
|
936
|
-
*/
|
937
|
-
onValueChange(e) {
|
938
|
-
this.value = e.target.value;
|
939
|
-
}
|
940
|
-
get focused() {
|
941
|
-
return this.select.focused;
|
942
|
-
}
|
943
|
-
focus() {
|
944
|
-
this.select.focus();
|
945
|
-
}
|
946
|
-
onFocus() {
|
947
|
-
this.ngControl.control.markAsTouched();
|
948
|
-
}
|
949
|
-
/**
|
950
|
-
* A helper function for easily making options for the `select`.
|
951
|
-
*/
|
952
|
-
get valueArray() {
|
953
|
-
return makeValueArray(this.min, this.max, this.increment);
|
954
|
-
}
|
955
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantitySelectComponent, deps: [{ token: i1.NgControl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
956
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: DaffQuantitySelectComponent, isStandalone: false, selector: "daff-quantity-select", inputs: { min: "min", max: "max", extendable: "extendable" }, viewQueries: [{ propertyName: "select", first: true, predicate: DaffNativeSelectComponent, descendants: true }], ngImport: i0, template: "<select daff-native-select\n [formControl]=\"ngControl.control\"\n (focus)=\"onFocus()\"\n>\n <option *ngFor=\"let item of valueArray\" [value]=\"item\">{{ item }}</option>\n <option [value]=\"max\" *ngIf=\"extendable\">{{ max }}+</option>\n <option [value]=\"max\" *ngIf=\"!extendable\">{{ max }}</option>\n</select>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DaffNativeSelectComponent, selector: "select[daff-native-select]", inputs: ["formSubmitted"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
957
|
-
}
|
958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantitySelectComponent, decorators: [{
|
959
|
-
type: Component,
|
960
|
-
args: [{ selector: 'daff-quantity-select', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<select daff-native-select\n [formControl]=\"ngControl.control\"\n (focus)=\"onFocus()\"\n>\n <option *ngFor=\"let item of valueArray\" [value]=\"item\">{{ item }}</option>\n <option [value]=\"max\" *ngIf=\"extendable\">{{ max }}+</option>\n <option [value]=\"max\" *ngIf=\"!extendable\">{{ max }}</option>\n</select>\n" }]
|
961
|
-
}], ctorParameters: () => [{ type: i1.NgControl }, { type: i0.ChangeDetectorRef }], propDecorators: { select: [{
|
962
|
-
type: ViewChild,
|
963
|
-
args: [DaffNativeSelectComponent]
|
964
|
-
}], min: [{
|
965
|
-
type: Input
|
966
|
-
}], max: [{
|
967
|
-
type: Input
|
968
|
-
}], extendable: [{
|
969
|
-
type: Input
|
970
|
-
}] } });
|
971
|
-
|
972
|
-
class DaffQuantityFieldComponent extends DaffFormFieldControl {
|
973
|
-
get focused() {
|
974
|
-
return !!(this.input?.focused || this.select?.focused);
|
975
|
-
}
|
976
|
-
get quantity() {
|
977
|
-
return this._quantity;
|
978
|
-
}
|
979
|
-
set quantity(value) {
|
980
|
-
this._quantity = coerceNumberProperty(value, 1);
|
981
|
-
}
|
982
|
-
/**
|
983
|
-
* Returns the lesser of max and selectMax.
|
984
|
-
*/
|
985
|
-
get _maxFloor() {
|
986
|
-
return Math.min(this.max, this.selectMax);
|
987
|
-
}
|
988
|
-
get controlType() {
|
989
|
-
// TODO: use enum
|
990
|
-
return this.showInputField
|
991
|
-
? 'native-input'
|
992
|
-
: 'native-select';
|
993
|
-
}
|
994
|
-
get showInputField() {
|
995
|
-
const ret = this._inputHasBeenShown || (this.ngControl
|
996
|
-
? this.ngControl.value >= this.selectMax
|
997
|
-
: this.quantity >= this.selectMax);
|
998
|
-
if (ret) {
|
999
|
-
this._inputHasBeenShown = true;
|
1000
|
-
}
|
1001
|
-
return ret;
|
1002
|
-
}
|
1003
|
-
get showSelectField() {
|
1004
|
-
return !this.showInputField;
|
1005
|
-
}
|
1006
|
-
constructor(ngControl, cd) {
|
1007
|
-
super(ngControl);
|
1008
|
-
this.ngControl = ngControl;
|
1009
|
-
this.cd = cd;
|
1010
|
-
/**
|
1011
|
-
* @docs
|
1012
|
-
* The minimum valid value of the quantity field.
|
1013
|
-
* Must be greater than or equal to 1.
|
1014
|
-
*/
|
1015
|
-
this.min = 1;
|
1016
|
-
/**
|
1017
|
-
* @docs
|
1018
|
-
* The maximum valid value of the quantity field.
|
1019
|
-
* Must be greater than min.
|
1020
|
-
*/
|
1021
|
-
this.max = 500;
|
1022
|
-
/**
|
1023
|
-
* @docs
|
1024
|
-
* The range of numbers acceptable in a quantity dropdown
|
1025
|
-
* before it becomes an input element.
|
1026
|
-
*/
|
1027
|
-
this.selectMax = 10;
|
1028
|
-
this.id = '';
|
1029
|
-
this.disabled = false;
|
1030
|
-
this._quantity = 1;
|
1031
|
-
this._inputHasBeenShown = false;
|
1032
|
-
if (this.ngControl != null) {
|
1033
|
-
this.ngControl.valueAccessor = this;
|
1034
|
-
}
|
1035
|
-
}
|
1036
|
-
onChange(quantity) { }
|
1037
|
-
;
|
1038
|
-
onTouched(quantity) { }
|
1039
|
-
;
|
1040
|
-
writeValue(quantity) {
|
1041
|
-
this.quantity = quantity;
|
1042
|
-
this.cd.markForCheck();
|
1043
|
-
}
|
1044
|
-
registerOnChange(fn) {
|
1045
|
-
this.onChange = fn;
|
1046
|
-
}
|
1047
|
-
registerOnTouched(fn) {
|
1048
|
-
this.onTouched = fn;
|
1049
|
-
}
|
1050
|
-
setDisabledState(isDisabled) {
|
1051
|
-
this.disabled = isDisabled;
|
1052
|
-
}
|
1053
|
-
focus() {
|
1054
|
-
if (this.select) {
|
1055
|
-
this.select.focus();
|
1056
|
-
}
|
1057
|
-
if (this.input) {
|
1058
|
-
this.input.focus();
|
1059
|
-
}
|
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
|
-
}
|
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 }); }
|
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: [
|
1071
|
-
{
|
1072
|
-
provide: DaffFormFieldControl,
|
1073
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
1074
|
-
useExisting: DaffQuantityFieldComponent,
|
1075
|
-
},
|
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 }); }
|
1077
|
-
}
|
1078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldComponent, decorators: [{
|
1079
|
-
type: Component,
|
1080
|
-
args: [{ selector: 'daff-quantity-field', providers: [
|
1081
|
-
{
|
1082
|
-
provide: DaffFormFieldControl,
|
1083
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
1084
|
-
useExisting: DaffQuantityFieldComponent,
|
1085
|
-
},
|
1086
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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" }]
|
1087
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
1088
|
-
type: Optional
|
1089
|
-
}, {
|
1090
|
-
type: Self
|
1091
|
-
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { input: [{
|
1092
|
-
type: ViewChild,
|
1093
|
-
args: [DaffQuantityInputComponent]
|
1094
|
-
}], select: [{
|
1095
|
-
type: ViewChild,
|
1096
|
-
args: [DaffQuantitySelectComponent]
|
1097
|
-
}], min: [{
|
1098
|
-
type: Input
|
1099
|
-
}], max: [{
|
1100
|
-
type: Input
|
1101
|
-
}], selectMax: [{
|
1102
|
-
type: Input
|
1103
|
-
}], id: [{
|
1104
|
-
type: Input
|
1105
|
-
}] } });
|
1106
|
-
|
1107
|
-
class DaffQuantityFieldModule {
|
1108
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1109
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldModule, declarations: [DaffQuantityFieldComponent,
|
1110
|
-
DaffQuantityInputComponent,
|
1111
|
-
DaffQuantitySelectComponent], imports: [CommonModule,
|
1112
|
-
DaffNativeSelectModule,
|
1113
|
-
ReactiveFormsModule,
|
1114
|
-
DaffInputModule], exports: [DaffQuantityFieldComponent,
|
1115
|
-
DaffQuantityInputComponent,
|
1116
|
-
DaffQuantitySelectComponent] }); }
|
1117
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldModule, imports: [CommonModule,
|
1118
|
-
DaffNativeSelectModule,
|
1119
|
-
ReactiveFormsModule,
|
1120
|
-
DaffInputModule] }); }
|
1121
|
-
}
|
1122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffQuantityFieldModule, decorators: [{
|
1123
|
-
type: NgModule,
|
1124
|
-
args: [{
|
1125
|
-
declarations: [
|
1126
|
-
DaffQuantityFieldComponent,
|
1127
|
-
DaffQuantityInputComponent,
|
1128
|
-
DaffQuantitySelectComponent,
|
1129
|
-
],
|
1130
|
-
imports: [
|
1131
|
-
CommonModule,
|
1132
|
-
DaffNativeSelectModule,
|
1133
|
-
ReactiveFormsModule,
|
1134
|
-
DaffInputModule,
|
1135
|
-
],
|
1136
|
-
exports: [
|
1137
|
-
DaffQuantityFieldComponent,
|
1138
|
-
DaffQuantityInputComponent,
|
1139
|
-
DaffQuantitySelectComponent,
|
1140
|
-
],
|
1141
|
-
}]
|
1142
|
-
}] });
|
1143
|
-
|
1144
842
|
class DaffRadioSetComponent {
|
1145
843
|
constructor() {
|
1146
844
|
/**
|
@@ -1148,10 +846,10 @@ class DaffRadioSetComponent {
|
|
1148
846
|
*/
|
1149
847
|
this.role = 'radiogroup';
|
1150
848
|
}
|
1151
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1152
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
849
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioSetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
850
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffRadioSetComponent, isStandalone: false, selector: "daff-radio-set", inputs: { name: "name" }, host: { properties: { "attr.role": "this.role" } }, ngImport: i0, template: "<ng-content></ng-content>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1153
851
|
}
|
1154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioSetComponent, decorators: [{
|
1155
853
|
type: Component,
|
1156
854
|
args: [{ selector: 'daff-radio-set', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-content></ng-content>" }]
|
1157
855
|
}], ctorParameters: () => [], propDecorators: { name: [{
|
@@ -1254,10 +952,10 @@ class DaffRadioComponent {
|
|
1254
952
|
this.select();
|
1255
953
|
}
|
1256
954
|
;
|
1257
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1258
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
955
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioComponent, deps: [{ token: DaffRadioSetComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
956
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffRadioComponent, isStandalone: false, selector: "daff-radio", inputs: { checked: "checked", value: "value", id: "id", name: "name", label: ["aria-label", "label"], labelledby: ["aria-labelledby", "labelledby"] }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "attr.role": "this.role", "class.focused": "this.focusClass", "class.disabled": "this.disabledClass" } }, ngImport: i0, template: "<input type=\"radio\" \n[attr.checked]=\"checked ? '' : null\" \n[attr.id]=\"id\" \n[attr.name]=\"name\" \n[attr.aria-label]=\"label\"\n[attr.aria-labelledby]=\"labelledby\"\n[attr.value]=\"value\"\n[attr.disabled] = \"disabled ? '' : null\" \n(change)=\"onChange()\"\n(blur)=\"onBlur()\"\n(focus)=\"onFocus()\"/>\n<label [attr.for]=\"id\">\n <ng-content></ng-content>\n</label>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1259
957
|
}
|
1260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioComponent, decorators: [{
|
1261
959
|
type: Component,
|
1262
960
|
args: [{ selector: 'daff-radio', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<input type=\"radio\" \n[attr.checked]=\"checked ? '' : null\" \n[attr.id]=\"id\" \n[attr.name]=\"name\" \n[attr.aria-label]=\"label\"\n[attr.aria-labelledby]=\"labelledby\"\n[attr.value]=\"value\"\n[attr.disabled] = \"disabled ? '' : null\" \n(change)=\"onChange()\"\n(blur)=\"onBlur()\"\n(focus)=\"onFocus()\"/>\n<label [attr.for]=\"id\">\n <ng-content></ng-content>\n</label>" }]
|
1263
961
|
}], ctorParameters: () => [{ type: DaffRadioSetComponent, decorators: [{
|
@@ -1333,10 +1031,10 @@ class DaffRadioRegistry {
|
|
1333
1031
|
return controlPair['control'].control.parent === accessor._control.control.parent
|
1334
1032
|
&& controlPair['accessor'].name === accessor.name;
|
1335
1033
|
}
|
1336
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1337
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
1034
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1035
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioRegistry, providedIn: 'root' }); }
|
1338
1036
|
}
|
1339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioRegistry, decorators: [{
|
1340
1038
|
type: Injectable,
|
1341
1039
|
args: [{ providedIn: 'root' }]
|
1342
1040
|
}] });
|
@@ -1406,10 +1104,10 @@ class DaffRadioControlValueAccessorDirective {
|
|
1406
1104
|
fireDeselect() {
|
1407
1105
|
this._radio.deselect();
|
1408
1106
|
}
|
1409
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1410
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1107
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioControlValueAccessorDirective, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DaffRadioRegistry }, { token: DaffRadioComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1108
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffRadioControlValueAccessorDirective, isStandalone: false, selector: "daff-radio[ngModel], daff-radio[formControl], daff-radio[formControlName]", inputs: { value: "value", name: "name" }, ngImport: i0 }); }
|
1411
1109
|
}
|
1412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioControlValueAccessorDirective, decorators: [{
|
1413
1111
|
type: Directive,
|
1414
1112
|
args: [{
|
1415
1113
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
@@ -1427,15 +1125,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
1427
1125
|
}] } });
|
1428
1126
|
|
1429
1127
|
class DaffRadioModule {
|
1430
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1431
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
1128
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1129
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioModule, declarations: [DaffRadioControlValueAccessorDirective,
|
1432
1130
|
DaffRadioComponent,
|
1433
1131
|
DaffRadioSetComponent], imports: [CommonModule], exports: [DaffRadioComponent,
|
1434
1132
|
DaffRadioSetComponent,
|
1435
1133
|
DaffRadioControlValueAccessorDirective] }); }
|
1436
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
1134
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioModule, imports: [CommonModule] }); }
|
1437
1135
|
}
|
1438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioModule, decorators: [{
|
1439
1137
|
type: NgModule,
|
1440
1138
|
args: [{
|
1441
1139
|
exports: [
|
@@ -1455,13 +1153,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
1455
1153
|
}] });
|
1456
1154
|
|
1457
1155
|
class DaffPrefixSuffixModule {
|
1458
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1459
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
1156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPrefixSuffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1157
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffPrefixSuffixModule, imports: [DaffPrefixDirective,
|
1460
1158
|
DaffSuffixDirective], exports: [DaffPrefixDirective,
|
1461
1159
|
DaffSuffixDirective] }); }
|
1462
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
1160
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPrefixSuffixModule }); }
|
1463
1161
|
}
|
1464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPrefixSuffixModule, decorators: [{
|
1465
1163
|
type: NgModule,
|
1466
1164
|
args: [{
|
1467
1165
|
imports: [
|
@@ -1510,12 +1208,12 @@ var DaffPaletteEnum;
|
|
1510
1208
|
*/
|
1511
1209
|
DaffPaletteEnum["ThemeContrast"] = "theme-contrast";
|
1512
1210
|
/**
|
1513
|
-
* @deprecated Deprecated in version 0.82.0. Will be removed in version 0.
|
1211
|
+
* @deprecated Deprecated in version 0.82.0. Will be removed in version 1.0.0.
|
1514
1212
|
* Black. It's dark.
|
1515
1213
|
*/
|
1516
1214
|
DaffPaletteEnum["Black"] = "black";
|
1517
1215
|
/**
|
1518
|
-
* @deprecated Deprecated in version 0.82.0. Will be removed in version 0.
|
1216
|
+
* @deprecated Deprecated in version 0.82.0. Will be removed in version 1.0.0.
|
1519
1217
|
* White. It's bright.
|
1520
1218
|
*/
|
1521
1219
|
DaffPaletteEnum["White"] = "white";
|
@@ -1625,10 +1323,10 @@ class DaffColorableDirective {
|
|
1625
1323
|
this.color = this.defaultColor;
|
1626
1324
|
}
|
1627
1325
|
}
|
1628
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1629
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1326
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffColorableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1327
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffColorableDirective, isStandalone: true, selector: "[daffColorable]", inputs: { color: "color" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0 }); }
|
1630
1328
|
}
|
1631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffColorableDirective, decorators: [{
|
1632
1330
|
type: Directive,
|
1633
1331
|
args: [{
|
1634
1332
|
selector: '[daffColorable]',
|
@@ -1662,10 +1360,10 @@ class NoopBreakpointObserver {
|
|
1662
1360
|
observe(value) {
|
1663
1361
|
return of();
|
1664
1362
|
}
|
1665
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1666
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
1363
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NoopBreakpointObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1364
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NoopBreakpointObserver, providedIn: 'root' }); }
|
1667
1365
|
}
|
1668
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NoopBreakpointObserver, decorators: [{
|
1669
1367
|
type: Injectable,
|
1670
1368
|
args: [{
|
1671
1369
|
providedIn: 'root',
|
@@ -1754,10 +1452,10 @@ class DaffStatusableDirective {
|
|
1754
1452
|
'daff-success': this.status === DaffStatusEnum.Success,
|
1755
1453
|
};
|
1756
1454
|
}
|
1757
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1758
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1455
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffStatusableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1456
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffStatusableDirective, isStandalone: true, selector: "[daffStatusable]", inputs: { status: "status" }, host: { properties: { "class": "this.class" } }, ngImport: i0 }); }
|
1759
1457
|
}
|
1760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffStatusableDirective, decorators: [{
|
1761
1459
|
type: Directive,
|
1762
1460
|
args: [{
|
1763
1461
|
selector: '[daffStatusable]',
|
@@ -1770,68 +1468,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
1770
1468
|
type: Input
|
1771
1469
|
}] } });
|
1772
1470
|
|
1773
|
-
/**
|
1774
|
-
* `DaffSkeletonableDirective` allows a component to display a skeleton loading
|
1775
|
-
* state by conditionally applying a CSS class. This is useful for indicating to
|
1776
|
-
* users that content is loading or being processed. This directive can be used to
|
1777
|
-
* apply a skeleton loading state to any component by toggling the `skeleton`
|
1778
|
-
* input property. When `skeleton` is `true`, the `daff-skeleton` CSS class
|
1779
|
-
* is applied, which should style the component to look like a loading placeholder.
|
1780
|
-
*
|
1781
|
-
* @example Implementing it as an attribute directive
|
1782
|
-
*
|
1783
|
-
* ```html
|
1784
|
-
* <div daffSkeletonable [skeleton]="isLoading">Content</div>
|
1785
|
-
* ```
|
1786
|
-
*
|
1787
|
-
* @example Implementing it as an Angular host directive
|
1788
|
-
*
|
1789
|
-
* ```ts
|
1790
|
-
* @Component({
|
1791
|
-
* standalone: true,
|
1792
|
-
* selector: 'custom-component',
|
1793
|
-
* template: 'custom-component.html',
|
1794
|
-
* hostDirectives: [
|
1795
|
-
* {
|
1796
|
-
* directive: DaffSkeletonableDirective,
|
1797
|
-
* inputs: ['skeleton'],
|
1798
|
-
* },
|
1799
|
-
* ],
|
1800
|
-
* })
|
1801
|
-
* export class CustomComponent { }
|
1802
|
-
* ```
|
1803
|
-
*
|
1804
|
-
* ```scss
|
1805
|
-
* :host {
|
1806
|
-
* .daff-skeleton {
|
1807
|
-
* @include state.skeleton-screen(48px, 24px);
|
1808
|
-
* }
|
1809
|
-
* }
|
1810
|
-
* ```
|
1811
|
-
*
|
1812
|
-
* The directive applies the `daff-skeleton` class to the component should be defined in your styles to display the loading
|
1813
|
-
* state as desired. It can be used in conjuction with the `skeleton-screen` mixin, which provides predefined loading styles.
|
1814
|
-
*/
|
1815
|
-
class DaffSkeletonableDirective {
|
1816
|
-
constructor() {
|
1817
|
-
this.skeleton = false;
|
1818
|
-
}
|
1819
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffSkeletonableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1820
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.5", type: DaffSkeletonableDirective, isStandalone: true, selector: "[daffSkeletonable]", inputs: { skeleton: "skeleton" }, host: { properties: { "class.daff-skeleton": "this.skeleton" } }, ngImport: i0 }); }
|
1821
|
-
}
|
1822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffSkeletonableDirective, decorators: [{
|
1823
|
-
type: Directive,
|
1824
|
-
args: [{
|
1825
|
-
selector: '[daffSkeletonable]',
|
1826
|
-
standalone: true,
|
1827
|
-
}]
|
1828
|
-
}], propDecorators: { skeleton: [{
|
1829
|
-
type: Input
|
1830
|
-
}, {
|
1831
|
-
type: HostBinding,
|
1832
|
-
args: ['class.daff-skeleton']
|
1833
|
-
}] } });
|
1834
|
-
|
1835
1471
|
var DaffTextAlignmentEnum;
|
1836
1472
|
(function (DaffTextAlignmentEnum) {
|
1837
1473
|
DaffTextAlignmentEnum["Left"] = "left";
|
@@ -1904,10 +1540,10 @@ class DaffTextAlignableDirective {
|
|
1904
1540
|
this.textAlignment = this.defaultAlignment;
|
1905
1541
|
}
|
1906
1542
|
}
|
1907
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1908
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1543
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTextAlignableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1544
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffTextAlignableDirective, isStandalone: true, selector: "[daffTextAlignable]", inputs: { textAlignment: "textAlignment" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0 }); }
|
1909
1545
|
}
|
1910
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTextAlignableDirective, decorators: [{
|
1911
1547
|
type: Directive,
|
1912
1548
|
args: [{
|
1913
1549
|
selector: '[daffTextAlignable]',
|
@@ -1968,10 +1604,10 @@ class DaffCompactableDirective {
|
|
1968
1604
|
constructor() {
|
1969
1605
|
this.compact = false;
|
1970
1606
|
}
|
1971
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
1972
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1607
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCompactableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1608
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffCompactableDirective, isStandalone: true, selector: "[daffCompactable]", inputs: { compact: "compact" }, host: { properties: { "class.daff-compact": "this.compact" } }, ngImport: i0 }); }
|
1973
1609
|
}
|
1974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCompactableDirective, decorators: [{
|
1975
1611
|
type: Directive,
|
1976
1612
|
args: [{
|
1977
1613
|
selector: '[daffCompactable]',
|
@@ -2049,10 +1685,10 @@ class DaffManageContainerLayoutDirective {
|
|
2049
1685
|
*/
|
2050
1686
|
this.class = true;
|
2051
1687
|
}
|
2052
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2053
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1688
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffManageContainerLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1689
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffManageContainerLayoutDirective, isStandalone: true, selector: "[daffManageContainerLayout]", host: { properties: { "class.daff-manage-container-layout": "this.class" } }, ngImport: i0 }); }
|
2054
1690
|
}
|
2055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffManageContainerLayoutDirective, decorators: [{
|
2056
1692
|
type: Directive,
|
2057
1693
|
args: [{
|
2058
1694
|
selector: '[daffManageContainerLayout]',
|
@@ -2094,10 +1730,10 @@ class DaffArticleEncapsulatedDirective {
|
|
2094
1730
|
*/
|
2095
1731
|
this.class = true;
|
2096
1732
|
}
|
2097
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2098
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
1733
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffArticleEncapsulatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1734
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffArticleEncapsulatedDirective, isStandalone: true, selector: "[daffArticleEncapsulated]", host: { properties: { "class.daff-ae": "this.class" } }, ngImport: i0 }); }
|
2099
1735
|
}
|
2100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffArticleEncapsulatedDirective, decorators: [{
|
2101
1737
|
type: Directive,
|
2102
1738
|
args: [{
|
2103
1739
|
selector: '[daffArticleEncapsulated]',
|
@@ -2139,7 +1775,7 @@ class DaffOsThemeService {
|
|
2139
1775
|
this.doc = _doc;
|
2140
1776
|
this.preference$ = this.doc.defaultView?.matchMedia
|
2141
1777
|
? fromEventPattern(addHandlerFactory(this.doc.defaultView), removeHandlerFactory(this.doc.defaultView))
|
2142
|
-
.pipe(startWith(this.doc.defaultView?.matchMedia(mediaQueryDarkPreference)), map
|
1778
|
+
.pipe(startWith(this.doc.defaultView?.matchMedia(mediaQueryDarkPreference)), map((e) => e.matches), map((prefersDark) => prefersDark ? DaffTheme.Dark : DaffTheme.Light))
|
2143
1779
|
: of(DaffTheme.None);
|
2144
1780
|
}
|
2145
1781
|
/**
|
@@ -2148,10 +1784,10 @@ class DaffOsThemeService {
|
|
2148
1784
|
getThemePreference() {
|
2149
1785
|
return this.preference$;
|
2150
1786
|
}
|
2151
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2152
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
1787
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffOsThemeService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1788
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffOsThemeService, providedIn: 'root' }); }
|
2153
1789
|
}
|
2154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffOsThemeService, decorators: [{
|
2155
1791
|
type: Injectable,
|
2156
1792
|
args: [{
|
2157
1793
|
providedIn: 'root',
|
@@ -2182,7 +1818,7 @@ class DaffThemeStorageService {
|
|
2182
1818
|
this.doc = _doc;
|
2183
1819
|
this.theme$ = merge(this.storage$, this.doc.defaultView
|
2184
1820
|
? fromEvent(this.doc.defaultView, 'storage').pipe(startWith(storageEventBuilder(this.storage.getItem(THEME_STORAGE_KEY))), catchError((e) => EMPTY))
|
2185
|
-
: of(storageEventBuilder(this.storage.getItem(THEME_STORAGE_KEY)))).pipe(filter((e) => e.key === THEME_STORAGE_KEY), map
|
1821
|
+
: of(storageEventBuilder(this.storage.getItem(THEME_STORAGE_KEY)))).pipe(filter((e) => e.key === THEME_STORAGE_KEY), map((e) => coerceValue(e.newValue)), shareReplay(1));
|
2186
1822
|
}
|
2187
1823
|
/**
|
2188
1824
|
* Given that Safari doesn't respect in-tab storage events, we have to manually
|
@@ -2205,10 +1841,10 @@ class DaffThemeStorageService {
|
|
2205
1841
|
this.progressStorageEvent(DaffTheme.None);
|
2206
1842
|
this.storage.removeItem(THEME_STORAGE_KEY);
|
2207
1843
|
}
|
2208
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2209
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
1844
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemeStorageService, deps: [{ token: DaffServerSafePersistenceServiceToken }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1845
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemeStorageService, providedIn: 'root' }); }
|
2210
1846
|
}
|
2211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemeStorageService, decorators: [{
|
2212
1848
|
type: Injectable,
|
2213
1849
|
args: [{
|
2214
1850
|
providedIn: 'root',
|
@@ -2248,7 +1884,7 @@ class DaffThemingService {
|
|
2248
1884
|
this.theme$ = combineLatest([
|
2249
1885
|
this.osTheme.getThemePreference(),
|
2250
1886
|
this.themeStorage.getThemeAsObservable(),
|
2251
|
-
]).pipe(map
|
1887
|
+
]).pipe(map(([osPreference, storedPreference]) => daffComputeThemeSetting(osPreference, storedPreference)));
|
2252
1888
|
this.theme$.subscribe((theme) => {
|
2253
1889
|
this.theme = theme;
|
2254
1890
|
});
|
@@ -2279,10 +1915,10 @@ class DaffThemingService {
|
|
2279
1915
|
? this.lightMode()
|
2280
1916
|
: this.darkMode();
|
2281
1917
|
}
|
2282
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2283
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
1918
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemingService, deps: [{ token: DaffOsThemeService }, { token: DaffThemeStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1919
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemingService, providedIn: 'root' }); }
|
2284
1920
|
}
|
2285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemingService, decorators: [{
|
2286
1922
|
type: Injectable,
|
2287
1923
|
args: [{
|
2288
1924
|
providedIn: 'root',
|
@@ -2325,10 +1961,10 @@ class DaffThemeClassSetterService {
|
|
2325
1961
|
this.renderer.removeClass(this.doc.body, DAFF_THEME_LIGHT_CSS_CLASS);
|
2326
1962
|
this.renderer.removeClass(this.doc.body, DAFF_THEME_DARK_CSS_CLASS);
|
2327
1963
|
}
|
2328
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2329
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
1964
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemeClassSetterService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }, { token: DaffThemingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1965
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemeClassSetterService }); }
|
2330
1966
|
}
|
2331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
1967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffThemeClassSetterService, decorators: [{
|
2332
1968
|
type: Injectable
|
2333
1969
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
2334
1970
|
type: Inject,
|
@@ -2409,10 +2045,10 @@ class DaffFocusStackService {
|
|
2409
2045
|
this.document.activeElement.blur();
|
2410
2046
|
return this.document.activeElement;
|
2411
2047
|
}
|
2412
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2413
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
2048
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFocusStackService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2049
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFocusStackService, providedIn: 'root' }); }
|
2414
2050
|
}
|
2415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
2051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFocusStackService, decorators: [{
|
2416
2052
|
type: Injectable,
|
2417
2053
|
args: [{ providedIn: 'root' }]
|
2418
2054
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
@@ -2511,10 +2147,10 @@ class DaffSizableDirective {
|
|
2511
2147
|
this.size = this.defaultSize;
|
2512
2148
|
}
|
2513
2149
|
}
|
2514
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2515
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
2150
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
2151
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffSizableDirective, isStandalone: true, selector: "[daffSizable]", inputs: { size: "size" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0 }); }
|
2516
2152
|
}
|
2517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
2153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSizableDirective, decorators: [{
|
2518
2154
|
type: Directive,
|
2519
2155
|
args: [{
|
2520
2156
|
selector: '[daffSizable]',
|
@@ -2634,10 +2270,10 @@ class DaffOpenableDirective {
|
|
2634
2270
|
}
|
2635
2271
|
}
|
2636
2272
|
}
|
2637
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2638
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
2273
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffOpenableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
2274
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffOpenableDirective, isStandalone: true, selector: "[daffOpenable]", inputs: { open: "open" }, outputs: { toggled: "toggled" }, host: { properties: { "class.daff-open": "this.open" } }, usesOnChanges: true, ngImport: i0 }); }
|
2639
2275
|
}
|
2640
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
2276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffOpenableDirective, decorators: [{
|
2641
2277
|
type: Directive,
|
2642
2278
|
args: [{
|
2643
2279
|
selector: '[daffOpenable]',
|
@@ -2673,10 +2309,10 @@ class DaffSelectableDirective {
|
|
2673
2309
|
this.cd.markForCheck();
|
2674
2310
|
return this;
|
2675
2311
|
}
|
2676
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
2677
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
2312
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSelectableDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
2313
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffSelectableDirective, isStandalone: true, selector: "[daffSelected]", inputs: { selected: "selected" }, outputs: { becameSelected: "becameSelected" }, host: { properties: { "class.daff-selected": "this.selected" } }, ngImport: i0 }); }
|
2678
2314
|
}
|
2679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
2315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffSelectableDirective, decorators: [{
|
2680
2316
|
type: Directive,
|
2681
2317
|
args: [{
|
2682
2318
|
selector: '[daffSelected]',
|
@@ -2707,5 +2343,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
2707
2343
|
* Generated bundle index. Do not edit.
|
2708
2344
|
*/
|
2709
2345
|
|
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,
|
2346
|
+
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, DaffManageContainerLayoutDirective, DaffNativeSelectComponent, DaffNativeSelectModule, DaffOpenableDirective, DaffPrefixDirective, DaffPrefixSuffixModule, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector };
|
2711
2347
|
//# sourceMappingURL=daffodil-design.mjs.map
|