@daffodil/storefront 0.94.1 → 0.95.1

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.
@@ -1,257 +1,334 @@
1
- import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
3
- import { NgControl, UntypedFormControl, ControlValueAccessor } from '@angular/forms';
4
- import { Subject } from 'rxjs';
5
- import { DaffFormFieldControl, DaffFormFieldComponent } from '@daffodil/design/form-field';
6
- import { DaffInputComponent } from '@daffodil/design/input';
7
- import { DaffNativeSelectComponent } from '@daffodil/design/native-select';
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
- ngControl: NgControl;
11
- private changeDetectorRef;
12
- input: DaffInputComponent;
13
- /**
14
- * Event emitted when the quantity input gains focus
15
- */
16
- focusChange: _angular_core.OutputEmitterRef<void>;
17
- /**
18
- * Event emitted when the quantity input loses focus
19
- */
20
- blurChange: _angular_core.OutputEmitterRef<void>;
21
- /**
22
- * Event emitted when the quantity input's value changes
23
- */
24
- valueChange: _angular_core.OutputEmitterRef<number>;
25
- quantity: _angular_core.ModelSignal<number>;
26
- /**
27
- * The minimum number for the quantity input field
28
- */
29
- min: _angular_core.InputSignal<number>;
30
- /**
31
- * The maximum number for the quantity input field
32
- */
33
- max: _angular_core.InputSignal<number>;
34
- /**
35
- * @docs-private
36
- */
37
- get focused(): boolean;
38
- /**
39
- * A new control for the nested native input.
40
- * We don't bind the native input directly to the inherited form control
41
- * to avoid triggering updates on the input event.
42
- * Instead, we listen for the change event and manually patch form control values.
43
- */
44
- _inputControl: UntypedFormControl;
45
- _destroyed: Subject<unknown>;
46
- get value(): number;
47
- set value(value: number);
48
- constructor(ngControl: NgControl, changeDetectorRef: ChangeDetectorRef);
49
- /**
50
- * @docs-private
51
- */
52
- ngOnInit(): void;
53
- ngOnDestroy(): void;
54
- focus(): void;
55
- /**
56
- * Callback function fired when the value changes.
57
- * Used to pass the value back up to the ngControl.
58
- */
59
- onValueChange(event: Event): void;
60
- private setInputDisabled;
61
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffSfQuantityInputComponent, [{ optional: true; }, null]>;
62
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DaffSfQuantityInputComponent, "daff-sf-quantity-input", never, { "quantity": { "alias": "quantity"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, { "focusChange": "focusChange"; "blurChange": "blurChange"; "valueChange": "valueChange"; "quantity": "quantityChange"; }, never, never, true, never>;
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
- select: DaffNativeSelectComponent;
67
- /**
68
- * A new control for the nested native select.
69
- * We don't bind the native select directly to the inherited form control
70
- * to avoid triggering updates on the input event.
71
- * Instead, we listen for the change event and manually patch form control values.
72
- */
73
- _selectControl: UntypedFormControl;
74
- /**
75
- * The minimum number selectable. Defaults to 1.
76
- */
77
- min: _angular_core.InputSignal<number>;
78
- /**
79
- * The maximum number selectable. Defaults to 10.
80
- */
81
- max: _angular_core.InputSignal<number>;
82
- /**
83
- * Property used to determine whether or not the select is
84
- * used in a situation where the `max` isn't a true max.
85
- */
86
- extendable: _angular_core.InputSignal<boolean>;
87
- /**
88
- * Event emitted when the quantity select gains focus
89
- */
90
- focusChange: _angular_core.OutputEmitterRef<void>;
91
- /**
92
- * Event emitted when the quantity select loses focus
93
- */
94
- blurChange: _angular_core.OutputEmitterRef<void>;
95
- /**
96
- * Event emitted when the quantiy select's value changes
97
- */
98
- valueChange: _angular_core.OutputEmitterRef<number>;
99
- quantity: _angular_core.InputSignal<unknown>;
100
- disabled: _angular_core.InputSignal<unknown>;
101
- constructor();
102
- /**
103
- * An input for easily making options for the `select`.
104
- */
105
- valueArray: _angular_core.Signal<number[]>;
106
- get focused(): boolean;
107
- focus(): void;
108
- /**
109
- * @docs-private
110
- *
111
- * Callback function fired when the value changes.
112
- * Used to pass the value back up to the ngControl.
113
- */
114
- onValueChange(event: Event): void;
115
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffSfQuantitySelectComponent, never>;
116
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DaffSfQuantitySelectComponent, "daff-sf-quantity-select", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "extendable": { "alias": "extendable"; "required": false; "isSignal": true; }; "quantity": { "alias": "quantity"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "focusChange": "focusChange"; "blurChange": "blurChange"; "valueChange": "valueChange"; }, never, never, true, never>;
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
- declare class DaffSfQuantityFieldComponent extends DaffFormFieldControl<number> implements ControlValueAccessor, DaffFormFieldControl<number>, OnInit {
120
- ngControl: NgControl;
121
- private cd;
122
- private formField;
123
- /**
124
- * @docs-private
125
- */
126
- quantity: _angular_core.WritableSignal<number>;
127
- /**
128
- * @docs-private
129
- */
130
- _inputHasBeenShown: _angular_core.WritableSignal<boolean>;
131
- /**
132
- * @docs-private
133
- */
134
- _showInputField: _angular_core.Signal<boolean>;
135
- /**
136
- * @docs-private
137
- */
138
- _showSelectField: _angular_core.Signal<boolean>;
139
- /** @docs-private */
140
- get controlType(): "native-input" | "native-select";
141
- /**
142
- * @docs-private
143
- */
144
- input: _angular_core.Signal<DaffSfQuantityInputComponent>;
145
- /**
146
- * @docs-private
147
- */
148
- select: _angular_core.Signal<DaffSfQuantitySelectComponent>;
149
- /**
150
- * The minimum valid value of the quantity field.
151
- * Must be greater than or equal to 1.
152
- */
153
- min: _angular_core.InputSignal<number>;
154
- /**
155
- * The maximum valid value of the quantity field.
156
- * Must be greater than `min`.
157
- */
158
- max: _angular_core.InputSignal<number>;
159
- /**
160
- * The maximum number allowed before the field switches from a dropdown to an input.
161
- * When the value reaches this number, an input field is shown instead of a select.
162
- * Default is 10.
163
- */
164
- selectMax: _angular_core.InputSignal<number>;
165
- /**
166
- * @docs-private
167
- *
168
- * Implemented as part of DaffFormFieldControl.
169
- */
170
- get focused(): boolean;
171
- private _disabled;
172
- /**
173
- * @docs-private
174
- *
175
- * Implemented as part of DaffFormFieldControl.
176
- */
177
- get disabled(): boolean;
178
- set disabled(value: boolean);
179
- private _required;
180
- /**
181
- * @docs-private
182
- *
183
- * Implemented as part of DaffFormFieldControl.
184
- */
185
- get required(): boolean;
186
- set required(value: boolean);
187
- _destroyed: Subject<boolean>;
188
- /**
189
- * @docs-private
190
- *
191
- * Returns the lesser of max and selectMax.
192
- */
193
- get _maxFloor(): number;
194
- private _focusSetWhenSwitching;
195
- constructor(ngControl: NgControl, cd: ChangeDetectorRef, formField: DaffFormFieldComponent);
196
- /**
197
- * @docs-private
198
- */
199
- ngOnInit(): void;
200
- private onChange;
201
- private onTouched;
202
- /**
203
- * @docs-private
204
- */
205
- writeValue(quantity: number): void;
206
- /**
207
- * @docs-private
208
- */
209
- registerOnChange(fn: (quantity: number) => void): void;
210
- /**
211
- * @docs-private
212
- */
213
- registerOnTouched(fn: any): void;
214
- /**
215
- * @docs-private
216
- */
217
- setDisabledState(isDisabled: boolean): void;
218
- /**
219
- * @docs-private
220
- *
221
- * Implemented as part of DaffFormFieldControl.
222
- */
223
- focus(): void;
224
- /**
225
- * @docs-private
226
- *
227
- * Called when child components gain focus
228
- */
229
- _onChildFocus(): void;
230
- /**
231
- * @docs-private
232
- *
233
- * Called when child components lose focus
234
- */
235
- _onChildBlur(): void;
236
- /**
237
- * @docs-private
238
- *
239
- * Called when child components change value
240
- */
241
- _onChildValueChange(value: number): void;
242
- /**
243
- * Implemented as part of DaffFormFieldControl.
244
- */
245
- get value(): number;
246
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffSfQuantityFieldComponent, [{ optional: true; self: true; }, null, { optional: true; }]>;
247
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DaffSfQuantityFieldComponent, "daff-sf-quantity-field", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "selectMax": { "alias": "selectMax"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, never, true, never>;
248
- static ngAcceptInputType_disabled: unknown;
249
- static ngAcceptInputType_required: unknown;
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 {};