@daffodil/storefront 0.94.1-rc.0 → 0.95.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/fesm2022/daffodil-storefront-carousel.mjs +235 -113
- package/fesm2022/daffodil-storefront-carousel.mjs.map +1 -1
- package/fesm2022/daffodil-storefront-quantity-field.mjs +745 -459
- package/fesm2022/daffodil-storefront-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-storefront-theme-toggle.mjs +159 -89
- package/fesm2022/daffodil-storefront-theme-toggle.mjs.map +1 -1
- package/fesm2022/daffodil-storefront.mjs +0 -4
- package/package.json +1 -1
- package/types/daffodil-storefront-carousel.d.ts +33 -36
- package/types/daffodil-storefront-quantity-field.d.ts +326 -249
- package/types/daffodil-storefront-theme-toggle.d.ts +36 -40
- package/types/daffodil-storefront.d.ts +1 -2
- package/fesm2022/daffodil-storefront.mjs.map +0 -1
|
@@ -1,257 +1,334 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { NgControl, UntypedFormControl
|
|
4
|
-
import { Subject } from
|
|
5
|
-
import { DaffFormFieldControl,
|
|
6
|
-
import { DaffInputComponent } from
|
|
7
|
-
import { DaffNativeSelectComponent } from
|
|
8
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectorRef, OnDestroy, OnInit } from "@angular/core";
|
|
3
|
+
import { ControlValueAccessor, NgControl, UntypedFormControl } from "@angular/forms";
|
|
4
|
+
import { Subject } from "rxjs";
|
|
5
|
+
import { DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldControlTypesEnum } from "@daffodil/design/form-field";
|
|
6
|
+
import { DaffInputComponent } from "@daffodil/design/input";
|
|
7
|
+
import { DaffNativeSelectComponent } from "@daffodil/design/native-select";
|
|
9
8
|
declare class DaffSfQuantityInputComponent implements OnInit, OnDestroy {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
9
|
+
ngControl: NgControl;
|
|
10
|
+
private changeDetectorRef;
|
|
11
|
+
input: DaffInputComponent;
|
|
12
|
+
/**
|
|
13
|
+
* Event emitted when the quantity input gains focus
|
|
14
|
+
*/
|
|
15
|
+
focusChange: import("@angular/core").OutputEmitterRef<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Event emitted when the quantity input loses focus
|
|
18
|
+
*/
|
|
19
|
+
blurChange: import("@angular/core").OutputEmitterRef<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Event emitted when the quantity input's value changes
|
|
22
|
+
*/
|
|
23
|
+
valueChange: import("@angular/core").OutputEmitterRef<number>;
|
|
24
|
+
quantity: import("@angular/core").ModelSignal<number>;
|
|
25
|
+
/**
|
|
26
|
+
* The minimum number for the quantity input field
|
|
27
|
+
*/
|
|
28
|
+
min: import("@angular/core").InputSignal<number>;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum number for the quantity input field
|
|
31
|
+
*/
|
|
32
|
+
max: import("@angular/core").InputSignal<number>;
|
|
33
|
+
/**
|
|
34
|
+
* @docs-private
|
|
35
|
+
*/
|
|
36
|
+
get focused(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* A new control for the nested native input.
|
|
39
|
+
* We don't bind the native input directly to the inherited form control
|
|
40
|
+
* to avoid triggering updates on the input event.
|
|
41
|
+
* Instead, we listen for the change event and manually patch form control values.
|
|
42
|
+
*/
|
|
43
|
+
_inputControl: UntypedFormControl;
|
|
44
|
+
_destroyed: Subject<unknown>;
|
|
45
|
+
get value(): number;
|
|
46
|
+
set value(value: number);
|
|
47
|
+
constructor(ngControl: NgControl, changeDetectorRef: ChangeDetectorRef);
|
|
48
|
+
/**
|
|
49
|
+
* @docs-private
|
|
50
|
+
*/
|
|
51
|
+
ngOnInit(): void;
|
|
52
|
+
ngOnDestroy(): void;
|
|
53
|
+
focus(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Callback function fired when the value changes.
|
|
56
|
+
* Used to pass the value back up to the ngControl.
|
|
57
|
+
*/
|
|
58
|
+
onValueChange(event: Event): void;
|
|
59
|
+
private setInputDisabled;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSfQuantityInputComponent, [{
|
|
61
|
+
optional: true;
|
|
62
|
+
}, null]>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffSfQuantityInputComponent, "daff-sf-quantity-input", never, {
|
|
64
|
+
"quantity": {
|
|
65
|
+
"alias": "quantity";
|
|
66
|
+
"required": false;
|
|
67
|
+
"isSignal": true;
|
|
68
|
+
};
|
|
69
|
+
"min": {
|
|
70
|
+
"alias": "min";
|
|
71
|
+
"required": false;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
74
|
+
"max": {
|
|
75
|
+
"alias": "max";
|
|
76
|
+
"required": false;
|
|
77
|
+
"isSignal": true;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
"focusChange": "focusChange";
|
|
81
|
+
"blurChange": "blurChange";
|
|
82
|
+
"valueChange": "valueChange";
|
|
83
|
+
"quantity": "quantityChange";
|
|
84
|
+
}, never, never, true, never>;
|
|
63
85
|
}
|
|
64
|
-
|
|
65
86
|
declare class DaffSfQuantitySelectComponent {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
87
|
+
select: DaffNativeSelectComponent;
|
|
88
|
+
/**
|
|
89
|
+
* A new control for the nested native select.
|
|
90
|
+
* We don't bind the native select directly to the inherited form control
|
|
91
|
+
* to avoid triggering updates on the input event.
|
|
92
|
+
* Instead, we listen for the change event and manually patch form control values.
|
|
93
|
+
*/
|
|
94
|
+
_selectControl: UntypedFormControl;
|
|
95
|
+
/**
|
|
96
|
+
* The minimum number selectable. Defaults to 1.
|
|
97
|
+
*/
|
|
98
|
+
min: import("@angular/core").InputSignal<number>;
|
|
99
|
+
/**
|
|
100
|
+
* The maximum number selectable. Defaults to 10.
|
|
101
|
+
*/
|
|
102
|
+
max: import("@angular/core").InputSignal<number>;
|
|
103
|
+
/**
|
|
104
|
+
* Property used to determine whether or not the select is
|
|
105
|
+
* used in a situation where the `max` isn't a true max.
|
|
106
|
+
*/
|
|
107
|
+
extendable: import("@angular/core").InputSignal<boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Event emitted when the quantity select gains focus
|
|
110
|
+
*/
|
|
111
|
+
focusChange: import("@angular/core").OutputEmitterRef<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Event emitted when the quantity select loses focus
|
|
114
|
+
*/
|
|
115
|
+
blurChange: import("@angular/core").OutputEmitterRef<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Event emitted when the quantiy select's value changes
|
|
118
|
+
*/
|
|
119
|
+
valueChange: import("@angular/core").OutputEmitterRef<number>;
|
|
120
|
+
quantity: import("@angular/core").InputSignal<unknown>;
|
|
121
|
+
disabled: import("@angular/core").InputSignal<unknown>;
|
|
122
|
+
constructor();
|
|
123
|
+
/**
|
|
124
|
+
* An input for easily making options for the `select`.
|
|
125
|
+
*/
|
|
126
|
+
valueArray: import("@angular/core").Signal<number[]>;
|
|
127
|
+
get focused(): boolean;
|
|
128
|
+
focus(): void;
|
|
129
|
+
/**
|
|
130
|
+
* @docs-private
|
|
131
|
+
*
|
|
132
|
+
* Callback function fired when the value changes.
|
|
133
|
+
* Used to pass the value back up to the ngControl.
|
|
134
|
+
*/
|
|
135
|
+
onValueChange(event: Event): void;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSfQuantitySelectComponent, never>;
|
|
137
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffSfQuantitySelectComponent, "daff-sf-quantity-select", never, {
|
|
138
|
+
"min": {
|
|
139
|
+
"alias": "min";
|
|
140
|
+
"required": false;
|
|
141
|
+
"isSignal": true;
|
|
142
|
+
};
|
|
143
|
+
"max": {
|
|
144
|
+
"alias": "max";
|
|
145
|
+
"required": false;
|
|
146
|
+
"isSignal": true;
|
|
147
|
+
};
|
|
148
|
+
"extendable": {
|
|
149
|
+
"alias": "extendable";
|
|
150
|
+
"required": false;
|
|
151
|
+
"isSignal": true;
|
|
152
|
+
};
|
|
153
|
+
"quantity": {
|
|
154
|
+
"alias": "quantity";
|
|
155
|
+
"required": false;
|
|
156
|
+
"isSignal": true;
|
|
157
|
+
};
|
|
158
|
+
"disabled": {
|
|
159
|
+
"alias": "disabled";
|
|
160
|
+
"required": false;
|
|
161
|
+
"isSignal": true;
|
|
162
|
+
};
|
|
163
|
+
}, {
|
|
164
|
+
"focusChange": "focusChange";
|
|
165
|
+
"blurChange": "blurChange";
|
|
166
|
+
"valueChange": "valueChange";
|
|
167
|
+
}, never, never, true, never>;
|
|
117
168
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
169
|
+
export declare class DaffSfQuantityFieldComponent extends DaffFormFieldControl<number> implements ControlValueAccessor, DaffFormFieldControl<number>, OnInit {
|
|
170
|
+
ngControl: NgControl;
|
|
171
|
+
private cd;
|
|
172
|
+
private formField;
|
|
173
|
+
/**
|
|
174
|
+
* @docs-private
|
|
175
|
+
*/
|
|
176
|
+
quantity: import("@angular/core").WritableSignal<number>;
|
|
177
|
+
/**
|
|
178
|
+
* @docs-private
|
|
179
|
+
*/
|
|
180
|
+
_inputHasBeenShown: import("@angular/core").WritableSignal<boolean>;
|
|
181
|
+
/**
|
|
182
|
+
* @docs-private
|
|
183
|
+
*/
|
|
184
|
+
_showInputField: import("@angular/core").Signal<boolean>;
|
|
185
|
+
/**
|
|
186
|
+
* @docs-private
|
|
187
|
+
*/
|
|
188
|
+
_showSelectField: import("@angular/core").Signal<boolean>;
|
|
189
|
+
/** @docs-private */
|
|
190
|
+
get controlType(): DaffFormFieldControlTypesEnum;
|
|
191
|
+
/**
|
|
192
|
+
* @docs-private
|
|
193
|
+
*/
|
|
194
|
+
input: import("@angular/core").Signal<DaffSfQuantityInputComponent>;
|
|
195
|
+
/**
|
|
196
|
+
* @docs-private
|
|
197
|
+
*/
|
|
198
|
+
select: import("@angular/core").Signal<DaffSfQuantitySelectComponent>;
|
|
199
|
+
/**
|
|
200
|
+
* The minimum valid value of the quantity field.
|
|
201
|
+
* Must be greater than or equal to 1.
|
|
202
|
+
*/
|
|
203
|
+
min: import("@angular/core").InputSignal<number>;
|
|
204
|
+
/**
|
|
205
|
+
* The maximum valid value of the quantity field.
|
|
206
|
+
* Must be greater than `min`.
|
|
207
|
+
*/
|
|
208
|
+
max: import("@angular/core").InputSignal<number>;
|
|
209
|
+
/**
|
|
210
|
+
* The maximum number allowed before the field switches from a dropdown to an input.
|
|
211
|
+
* When the value reaches this number, an input field is shown instead of a select.
|
|
212
|
+
* Default is 10.
|
|
213
|
+
*/
|
|
214
|
+
selectMax: import("@angular/core").InputSignal<number>;
|
|
215
|
+
/**
|
|
216
|
+
* @docs-private
|
|
217
|
+
*
|
|
218
|
+
* Implemented as part of DaffFormFieldControl.
|
|
219
|
+
*/
|
|
220
|
+
get focused(): boolean;
|
|
221
|
+
private _disabled;
|
|
222
|
+
/**
|
|
223
|
+
* @docs-private
|
|
224
|
+
*
|
|
225
|
+
* Implemented as part of DaffFormFieldControl.
|
|
226
|
+
*/
|
|
227
|
+
get disabled(): boolean;
|
|
228
|
+
set disabled(value: boolean);
|
|
229
|
+
private _required;
|
|
230
|
+
/**
|
|
231
|
+
* @docs-private
|
|
232
|
+
*
|
|
233
|
+
* Implemented as part of DaffFormFieldControl.
|
|
234
|
+
*/
|
|
235
|
+
get required(): boolean;
|
|
236
|
+
set required(value: boolean);
|
|
237
|
+
_destroyed: Subject<boolean>;
|
|
238
|
+
/**
|
|
239
|
+
* @docs-private
|
|
240
|
+
*
|
|
241
|
+
* Returns the lesser of max and selectMax.
|
|
242
|
+
*/
|
|
243
|
+
get _maxFloor(): number;
|
|
244
|
+
private _focusSetWhenSwitching;
|
|
245
|
+
constructor(ngControl: NgControl, cd: ChangeDetectorRef, formField: DaffFormFieldComponent);
|
|
246
|
+
/**
|
|
247
|
+
* @docs-private
|
|
248
|
+
*/
|
|
249
|
+
ngOnInit(): void;
|
|
250
|
+
private onChange;
|
|
251
|
+
private onTouched;
|
|
252
|
+
/**
|
|
253
|
+
* @docs-private
|
|
254
|
+
*/
|
|
255
|
+
writeValue(quantity: number): void;
|
|
256
|
+
/**
|
|
257
|
+
* @docs-private
|
|
258
|
+
*/
|
|
259
|
+
registerOnChange(fn: (quantity: number) => void): void;
|
|
260
|
+
/**
|
|
261
|
+
* @docs-private
|
|
262
|
+
*/
|
|
263
|
+
registerOnTouched(fn: any): void;
|
|
264
|
+
/**
|
|
265
|
+
* @docs-private
|
|
266
|
+
*/
|
|
267
|
+
setDisabledState(isDisabled: boolean): void;
|
|
268
|
+
/**
|
|
269
|
+
* @docs-private
|
|
270
|
+
*
|
|
271
|
+
* Implemented as part of DaffFormFieldControl.
|
|
272
|
+
*/
|
|
273
|
+
focus(): void;
|
|
274
|
+
/**
|
|
275
|
+
* @docs-private
|
|
276
|
+
*
|
|
277
|
+
* Called when child components gain focus
|
|
278
|
+
*/
|
|
279
|
+
_onChildFocus(): void;
|
|
280
|
+
/**
|
|
281
|
+
* @docs-private
|
|
282
|
+
*
|
|
283
|
+
* Called when child components lose focus
|
|
284
|
+
*/
|
|
285
|
+
_onChildBlur(): void;
|
|
286
|
+
/**
|
|
287
|
+
* @docs-private
|
|
288
|
+
*
|
|
289
|
+
* Called when child components change value
|
|
290
|
+
*/
|
|
291
|
+
_onChildValueChange(value: number): void;
|
|
292
|
+
/**
|
|
293
|
+
* Implemented as part of DaffFormFieldControl.
|
|
294
|
+
*/
|
|
295
|
+
get value(): number;
|
|
296
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSfQuantityFieldComponent, [{
|
|
297
|
+
optional: true;
|
|
298
|
+
self: true;
|
|
299
|
+
}, null, {
|
|
300
|
+
optional: true;
|
|
301
|
+
}]>;
|
|
302
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffSfQuantityFieldComponent, "daff-sf-quantity-field", never, {
|
|
303
|
+
"min": {
|
|
304
|
+
"alias": "min";
|
|
305
|
+
"required": false;
|
|
306
|
+
"isSignal": true;
|
|
307
|
+
};
|
|
308
|
+
"max": {
|
|
309
|
+
"alias": "max";
|
|
310
|
+
"required": false;
|
|
311
|
+
"isSignal": true;
|
|
312
|
+
};
|
|
313
|
+
"selectMax": {
|
|
314
|
+
"alias": "selectMax";
|
|
315
|
+
"required": false;
|
|
316
|
+
"isSignal": true;
|
|
317
|
+
};
|
|
318
|
+
"disabled": {
|
|
319
|
+
"alias": "disabled";
|
|
320
|
+
"required": false;
|
|
321
|
+
};
|
|
322
|
+
"required": {
|
|
323
|
+
"alias": "required";
|
|
324
|
+
"required": false;
|
|
325
|
+
};
|
|
326
|
+
}, {}, never, never, true, never>;
|
|
327
|
+
static ngAcceptInputType_disabled: unknown;
|
|
328
|
+
static ngAcceptInputType_required: unknown;
|
|
250
329
|
}
|
|
251
|
-
|
|
252
330
|
/**
|
|
253
331
|
* @docs-private
|
|
254
332
|
*/
|
|
255
|
-
declare const DAFF_SF_QUANTITY_FIELD_COMPONENTS: readonly [typeof DaffSfQuantityFieldComponent];
|
|
256
|
-
|
|
257
|
-
export { DAFF_SF_QUANTITY_FIELD_COMPONENTS, DaffSfQuantityFieldComponent };
|
|
333
|
+
export declare const DAFF_SF_QUANTITY_FIELD_COMPONENTS: readonly [typeof DaffSfQuantityFieldComponent];
|
|
334
|
+
export {};
|