@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.4 → 0.0.0-pr1503.5
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/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/accessibility.md +1 -1
- package/components/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +23 -8
- package/components/checkbox/demo/getting-started.min.js +23 -8
- package/components/checkbox/demo/index.min.js +23 -8
- package/components/checkbox/dist/index.js +23 -8
- package/components/checkbox/dist/registered.js +23 -8
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +166 -142
- package/components/combobox/demo/customize.min.js +2515 -2316
- package/components/combobox/demo/getting-started.min.js +2515 -2312
- package/components/combobox/demo/index.md +2 -1
- package/components/combobox/demo/index.min.js +2515 -2312
- package/components/combobox/demo/keyboard-behavior.md +3 -146
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/demo/why-combobox.md +2 -2
- package/components/combobox/dist/auro-combobox.d.ts +49 -15
- package/components/combobox/dist/index.js +1462 -753
- package/components/combobox/dist/registered.js +1462 -753
- package/components/counter/demo/customize.min.js +188 -244
- package/components/counter/demo/index.min.js +188 -244
- package/components/counter/dist/auro-counter.d.ts +0 -8
- package/components/counter/dist/index.js +188 -244
- package/components/counter/dist/registered.js +188 -244
- package/components/datepicker/demo/accessibility.md +20 -10
- package/components/datepicker/demo/api.md +65 -62
- package/components/datepicker/demo/customize.md +180 -40
- package/components/datepicker/demo/customize.min.js +1690 -777
- package/components/datepicker/demo/getting-started.md +118 -2
- package/components/datepicker/demo/index.min.js +1690 -759
- package/components/datepicker/demo/keyboard-behavior.md +3 -3
- package/components/datepicker/demo/voiceover.md +4 -4
- package/components/datepicker/demo/why-datepicker.md +2 -2
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +48 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +188 -10
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +89 -6
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +1690 -759
- package/components/datepicker/dist/registered.js +1690 -759
- package/components/dropdown/demo/customize.html +3 -0
- package/components/dropdown/demo/customize.min.js +142 -208
- package/components/dropdown/demo/getting-started.min.js +131 -207
- package/components/dropdown/demo/index.min.js +131 -207
- package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
- package/components/dropdown/dist/index.js +131 -207
- package/components/dropdown/dist/registered.js +131 -207
- package/components/form/demo/api.md +3 -3
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.md +535 -135
- package/components/form/demo/customize.min.js +6307 -4378
- package/components/form/demo/getting-started.md +344 -96
- package/components/form/demo/getting-started.min.js +6255 -4378
- package/components/form/demo/index.min.js +6206 -4378
- package/components/form/demo/registerDemoDeps.min.js +5827 -4333
- package/components/form/dist/auro-form.d.ts +128 -10
- package/components/form/dist/index.js +377 -43
- package/components/form/dist/registered.js +377 -43
- package/components/input/demo/accessibility.md +1 -1
- package/components/input/demo/api.md +58 -57
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.md +62 -61
- package/components/input/demo/customize.min.js +396 -275
- package/components/input/demo/getting-started.min.js +396 -275
- package/components/input/demo/index.min.js +396 -275
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +60 -81
- package/components/input/dist/index.js +409 -276
- package/components/input/dist/registered.js +396 -275
- package/components/input/dist/utilities.d.ts +10 -1
- package/components/menu/demo/accessibility.md +9 -4
- package/components/menu/demo/api.md +48 -45
- package/components/menu/demo/css-only.md +26 -19
- package/components/menu/demo/customize.md +307 -75
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +144 -7
- package/components/menu/demo/index.min.js +961 -1341
- package/components/menu/demo/keyboard-behavior.md +83 -4
- package/components/menu/demo/voiceover.md +21 -14
- package/components/menu/demo/why-menu.md +8 -9
- package/components/menu/dist/auro-menu-utils.d.ts +19 -0
- package/components/menu/dist/auro-menu.d.ts +97 -116
- package/components/menu/dist/auro-menuoption.d.ts +39 -133
- package/components/menu/dist/index.js +823 -1309
- package/components/menu/dist/registered.js +835 -1309
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/customize.min.js +23 -8
- package/components/radio/demo/getting-started.min.js +23 -8
- package/components/radio/demo/index.min.js +23 -8
- package/components/radio/dist/index.js +23 -8
- package/components/radio/dist/registered.js +23 -8
- package/components/select/demo/accessibility.md +6 -1
- package/components/select/demo/api.md +3 -2
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.md +210 -5
- package/components/select/demo/customize.min.js +1613 -1854
- package/components/select/demo/design.md +10 -10
- package/components/select/demo/getting-started.md +1 -1
- package/components/select/demo/getting-started.min.js +1617 -1903
- package/components/select/demo/index.md +2 -2
- package/components/select/demo/index.min.js +1613 -1854
- package/components/select/demo/keyboard-behavior.md +81 -54
- package/components/select/demo/voiceover.md +28 -15
- package/components/select/dist/auro-select.d.ts +70 -12
- package/components/select/dist/index.js +580 -315
- package/components/select/dist/registered.js +580 -315
- package/components/select/dist/selectUtils.d.ts +24 -0
- package/custom-elements.json +8071 -7919
- package/package.json +7 -3
- package/components/checkbox/demo/customize.js +0 -22
- package/components/checkbox/demo/demo-support.js +0 -1
- package/components/checkbox/demo/getting-started.js +0 -22
- package/components/checkbox/demo/index.js +0 -8
- package/components/checkbox/demo/styles.scss +0 -1
- package/components/combobox/demo/customize.js +0 -24
- package/components/combobox/demo/demo-support.js +0 -1
- package/components/combobox/demo/getting-started.js +0 -21
- package/components/combobox/demo/index.js +0 -23
- package/components/combobox/demo/styles.scss +0 -1
- package/components/counter/demo/customize.js +0 -21
- package/components/counter/demo/demo-support.js +0 -1
- package/components/counter/demo/index.js +0 -21
- package/components/counter/demo/styles.scss +0 -1
- package/components/datepicker/demo/customize.js +0 -19
- package/components/datepicker/demo/demo-support.js +0 -1
- package/components/datepicker/demo/index.js +0 -23
- package/components/datepicker/demo/styles.scss +0 -1
- package/components/dropdown/demo/customize.js +0 -9
- package/components/dropdown/demo/demo-support.js +0 -1
- package/components/dropdown/demo/getting-started.js +0 -9
- package/components/dropdown/demo/index.js +0 -16
- package/components/dropdown/demo/styles.scss +0 -1
- package/components/form/demo/customize.js +0 -9
- package/components/form/demo/demo-support.js +0 -1
- package/components/form/demo/getting-started.js +0 -9
- package/components/form/demo/index.js +0 -5
- package/components/form/demo/registerDemoDeps.js +0 -23
- package/components/form/demo/styles.scss +0 -1
- package/components/input/demo/customize.js +0 -25
- package/components/input/demo/demo-support.js +0 -1
- package/components/input/demo/getting-started.js +0 -8
- package/components/input/demo/index.js +0 -8
- package/components/input/demo/styles.css +0 -974
- package/components/input/demo/styles.scss +0 -1
- package/components/menu/demo/demo-support.js +0 -1
- package/components/menu/demo/index.js +0 -25
- package/components/menu/demo/styles.scss +0 -1
- package/components/menu/dist/auro-menu.context.d.ts +0 -238
- package/components/radio/demo/customize.js +0 -22
- package/components/radio/demo/demo-support.js +0 -1
- package/components/radio/demo/getting-started.js +0 -24
- package/components/radio/demo/index.js +0 -8
- package/components/radio/demo/styles.scss +0 -1
- package/components/select/demo/customize.js +0 -11
- package/components/select/demo/demo-support.js +0 -1
- package/components/select/demo/getting-started.js +0 -26
- package/components/select/demo/index.js +0 -11
- package/components/select/demo/styles.scss +0 -1
- /package/components/counter/dist/styles/{counter-wrapper-color-css.d.ts → counter-group-color-css.d.ts} +0 -0
- /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* @slot label - Defines the label content for the entire datepicker when `layout="snowflake"`.
|
|
13
13
|
* @slot toLabel - Defines the label content for the second input when the `range` attribute is used.
|
|
14
14
|
* @slot fromLabel - Defines the label content for the first input.
|
|
15
|
+
* @slot optionalFromLabel - Overrides the "(optional)" text rendered next to the first input's label when the datepicker is not `required`.
|
|
16
|
+
* @slot optionalToLabel - Overrides the "(optional)" text rendered next to the second input's label when `range` is set and the datepicker is not `required`.
|
|
15
17
|
* @slot date_YYYY_MM_DD - Defines the content to display in the auro-calendar-cell for the specified date. The content text is colored using the success state token when the `highlight` attribute is applied to the slot.
|
|
16
18
|
* @slot popover_YYYY_MM_DD - Defines the content to display in the auro-calendar-cell popover for the specified date.
|
|
17
19
|
* @csspart dropdown - Use for customizing the style of the dropdown.
|
|
@@ -52,6 +54,14 @@ export class AuroDatePicker extends AuroElement {
|
|
|
52
54
|
};
|
|
53
55
|
/**
|
|
54
56
|
* Array of dates that cannot be selected. Dates should be in ISO format (YYYY-MM-DD).
|
|
57
|
+
*
|
|
58
|
+
* **Immutable update required.** The datepicker treats this array as
|
|
59
|
+
* immutable and memoizes a lookup Set keyed on the array's reference
|
|
60
|
+
* identity — matching Lit's own reactivity semantics for array
|
|
61
|
+
* properties. In-place mutations (`blackoutDates.push(...)`,
|
|
62
|
+
* `blackoutDates[i] = ...`, `blackoutDates.splice(...)`) will not
|
|
63
|
+
* invalidate the cache and the new entries will be silently ignored.
|
|
64
|
+
* To update, reassign the property: `el.blackoutDates = [...el.blackoutDates, '2024-12-25']`.
|
|
55
65
|
*/
|
|
56
66
|
blackoutDates: {
|
|
57
67
|
type: ArrayConstructor;
|
|
@@ -59,6 +69,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
59
69
|
};
|
|
60
70
|
/**
|
|
61
71
|
* Label announced for blackout (disabled but in-range) date cells.
|
|
72
|
+
* @default 'unavailable'
|
|
62
73
|
*/
|
|
63
74
|
blackoutLabel: {
|
|
64
75
|
type: StringConstructor;
|
|
@@ -73,6 +84,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
73
84
|
};
|
|
74
85
|
/**
|
|
75
86
|
* Accessible label for the calendar grid containing the days of the month.
|
|
87
|
+
* @default 'Calendar days of the month'
|
|
76
88
|
*/
|
|
77
89
|
calendarGridLabel: {
|
|
78
90
|
type: StringConstructor;
|
|
@@ -209,6 +221,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
209
221
|
};
|
|
210
222
|
/**
|
|
211
223
|
* Accessible label for the next month navigation button.
|
|
224
|
+
* @default 'Next month'
|
|
212
225
|
*/
|
|
213
226
|
navLabelNextMonth: {
|
|
214
227
|
type: StringConstructor;
|
|
@@ -216,6 +229,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
216
229
|
};
|
|
217
230
|
/**
|
|
218
231
|
* Accessible label for the previous month navigation button.
|
|
232
|
+
* @default 'Previous month'
|
|
219
233
|
*/
|
|
220
234
|
navLabelPrevMonth: {
|
|
221
235
|
type: StringConstructor;
|
|
@@ -281,7 +295,11 @@ export class AuroDatePicker extends AuroElement {
|
|
|
281
295
|
reflect: boolean;
|
|
282
296
|
};
|
|
283
297
|
/**
|
|
284
|
-
* Label announced for cells after
|
|
298
|
+
* Label announced for cells after a fully selected range (both
|
|
299
|
+
* `dateFrom` and `dateTo` are set). While a range is still being
|
|
300
|
+
* picked (`dateFrom` set, `dateTo` unset), focused cells past the
|
|
301
|
+
* start use `rangeLabelEndPreview` instead.
|
|
302
|
+
* @default 'after range'
|
|
285
303
|
*/
|
|
286
304
|
rangeLabelAfterRange: {
|
|
287
305
|
type: StringConstructor;
|
|
@@ -289,6 +307,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
289
307
|
};
|
|
290
308
|
/**
|
|
291
309
|
* Label announced for cells before the range start.
|
|
310
|
+
* @default 'before range'
|
|
292
311
|
*/
|
|
293
312
|
rangeLabelBeforeRange: {
|
|
294
313
|
type: StringConstructor;
|
|
@@ -296,13 +315,25 @@ export class AuroDatePicker extends AuroElement {
|
|
|
296
315
|
};
|
|
297
316
|
/**
|
|
298
317
|
* Label announced for the range end date cell.
|
|
318
|
+
* @default 'range end'
|
|
299
319
|
*/
|
|
300
320
|
rangeLabelEnd: {
|
|
301
321
|
type: StringConstructor;
|
|
302
322
|
reflect: boolean;
|
|
303
323
|
};
|
|
324
|
+
/**
|
|
325
|
+
* Label announced for the focused cell while previewing a range end
|
|
326
|
+
* (dateFrom set, dateTo not yet selected). Tells AT users that
|
|
327
|
+
* pressing Enter would commit this cell as the range end.
|
|
328
|
+
* @default 'previewing range end'
|
|
329
|
+
*/
|
|
330
|
+
rangeLabelEndPreview: {
|
|
331
|
+
type: StringConstructor;
|
|
332
|
+
reflect: boolean;
|
|
333
|
+
};
|
|
304
334
|
/**
|
|
305
335
|
* Label announced for cells within the selected range.
|
|
336
|
+
* @default 'in range'
|
|
306
337
|
*/
|
|
307
338
|
rangeLabelInRange: {
|
|
308
339
|
type: StringConstructor;
|
|
@@ -310,13 +341,14 @@ export class AuroDatePicker extends AuroElement {
|
|
|
310
341
|
};
|
|
311
342
|
/**
|
|
312
343
|
* Label announced for the range start date cell.
|
|
344
|
+
* @default 'range start'
|
|
313
345
|
*/
|
|
314
346
|
rangeLabelStart: {
|
|
315
347
|
type: StringConstructor;
|
|
316
348
|
reflect: boolean;
|
|
317
349
|
};
|
|
318
350
|
/**
|
|
319
|
-
* Dates that the user should have for reference as part of their decision
|
|
351
|
+
* Dates that the user should have for reference as part of their decision-making when selecting a date.
|
|
320
352
|
* This should be a JSON string array of ISO date strings (`YYYY-MM-DD`).
|
|
321
353
|
*/
|
|
322
354
|
referenceDates: {
|
|
@@ -414,6 +446,15 @@ export class AuroDatePicker extends AuroElement {
|
|
|
414
446
|
*
|
|
415
447
|
*/
|
|
416
448
|
static register(name?: string): void;
|
|
449
|
+
/**
|
|
450
|
+
* Per-class dedup set used by `_warnInvalidLocale`. Static so the dedup
|
|
451
|
+
* spans every datepicker instance on the page; lives on the class (not
|
|
452
|
+
* at module scope) so it stays an encapsulated implementation detail of
|
|
453
|
+
* this component and does not interfere with WCA's class-JSDoc
|
|
454
|
+
* attachment.
|
|
455
|
+
* @private
|
|
456
|
+
*/
|
|
457
|
+
private static _warnedInvalidLocales;
|
|
417
458
|
/**
|
|
418
459
|
* @private
|
|
419
460
|
*/
|
|
@@ -438,6 +479,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
438
479
|
rangeLabelBeforeRange: string;
|
|
439
480
|
rangeLabelInRange: string;
|
|
440
481
|
rangeLabelAfterRange: string;
|
|
482
|
+
rangeLabelEndPreview: string;
|
|
441
483
|
blackoutDates: any[];
|
|
442
484
|
blackoutLabel: string;
|
|
443
485
|
navLabelPrevMonth: string;
|
|
@@ -518,6 +560,21 @@ export class AuroDatePicker extends AuroElement {
|
|
|
518
560
|
* @returns {void}
|
|
519
561
|
*/
|
|
520
562
|
private handleClick;
|
|
563
|
+
/**
|
|
564
|
+
* Single AbortController shared by every listener registered in the
|
|
565
|
+
* configure* methods. Lets disconnectedCallback tear all of them down
|
|
566
|
+
* with one abort() call.
|
|
567
|
+
*
|
|
568
|
+
* The genuine leak risk is the listeners attached to children that can
|
|
569
|
+
* outlive the host if they get reparented — `this.dropdown`,
|
|
570
|
+
* `this.calendar`, and the inputs inside the dropdown's slot.
|
|
571
|
+
* Listeners attached to `this` (e.g. focusin/focusout on the host)
|
|
572
|
+
* form a self-contained reference graph that the GC can collect with
|
|
573
|
+
* the host anyway, but they share the same signal so the cleanup
|
|
574
|
+
* pattern stays uniform across all configure* sites.
|
|
575
|
+
* @private
|
|
576
|
+
*/
|
|
577
|
+
private _listenerAbortController;
|
|
521
578
|
/**
|
|
522
579
|
* Handles click on the clear button.
|
|
523
580
|
* @private
|
|
@@ -635,10 +692,26 @@ export class AuroDatePicker extends AuroElement {
|
|
|
635
692
|
*/
|
|
636
693
|
get calendarFocusDateObject(): Date | undefined;
|
|
637
694
|
/**
|
|
638
|
-
* Converts a Unix timestamp (seconds) from the
|
|
695
|
+
* Converts a Unix timestamp (seconds) from the vendored range-datepicker
|
|
696
|
+
* (`src/vendor/wc-range-datepicker/day.js`) to an ISO date string.
|
|
697
|
+
*
|
|
698
|
+
* Timezone contract:
|
|
699
|
+
* - INPUT: `time` is assumed to be the seconds-since-epoch of **local
|
|
700
|
+
* midnight** for the intended calendar day. The vendor's Day constructor
|
|
701
|
+
* builds it via `date-fns format(date, 't')` from a locally-constructed
|
|
702
|
+
* Date, so this assumption currently holds end-to-end.
|
|
703
|
+
* - OUTPUT: `dateFormatter.toISOFormatString` reads the Date's local
|
|
704
|
+
* getFullYear/getMonth/getDate components, so the returned YYYY-MM-DD
|
|
705
|
+
* string matches the local calendar day.
|
|
706
|
+
*
|
|
707
|
+
* If the vendor ever switches to emitting UTC-midnight timestamps, this
|
|
708
|
+
* conversion will silently shift the returned date by one day in zones
|
|
709
|
+
* west of UTC. Any vendor swap should re-verify this contract; the TZ
|
|
710
|
+
* regression suite (`npm run test:hst`, UTC-10) will catch the symptom.
|
|
711
|
+
*
|
|
639
712
|
* @private
|
|
640
|
-
* @param {number} time - Unix timestamp
|
|
641
|
-
* @returns {string} ISO date string (yyyy-mm-dd).
|
|
713
|
+
* @param {number} time - Unix timestamp (seconds), local midnight of the day.
|
|
714
|
+
* @returns {string} ISO date string (yyyy-mm-dd) reflecting the local calendar day.
|
|
642
715
|
*/
|
|
643
716
|
private convertWcTimeToDate;
|
|
644
717
|
/**
|
|
@@ -680,7 +753,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
680
753
|
*/
|
|
681
754
|
private configureDropdown;
|
|
682
755
|
dropdown: any;
|
|
683
|
-
|
|
756
|
+
_restoreFocusOnClose: boolean | undefined;
|
|
684
757
|
/**
|
|
685
758
|
* Binds all behavior needed to the input after rendering.
|
|
686
759
|
* @private
|
|
@@ -770,6 +843,16 @@ export class AuroDatePicker extends AuroElement {
|
|
|
770
843
|
* @returns {boolean}
|
|
771
844
|
*/
|
|
772
845
|
get hasError(): boolean;
|
|
846
|
+
/**
|
|
847
|
+
* Logs a one-time `console.debug` when an unsupported locale falls back to
|
|
848
|
+
* en-US. Deduped by the offending tag so noisy re-renders that resurface
|
|
849
|
+
* the same bad value stay quiet, but each new bad value still signals so
|
|
850
|
+
* consumers can spot the typo or missing tag.
|
|
851
|
+
* @private
|
|
852
|
+
* @param {string|undefined} badLocale - The locale value that failed.
|
|
853
|
+
* @returns {void}
|
|
854
|
+
*/
|
|
855
|
+
private _warnInvalidLocale;
|
|
773
856
|
/**
|
|
774
857
|
* Lifecycle method to check if the locale is valid.
|
|
775
858
|
* @ignore
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for parsing and matching blackout dates across the
|
|
3
|
+
* datepicker. Both `auro-calendar` (memoized Set + `isDateBlackout`) and the
|
|
4
|
+
* pre-`firstUpdated` fallback inside `auro-calendar-cell` route through these
|
|
5
|
+
* helpers so the YYYY-MM-DD → seconds conversion and the merge-with-legacy
|
|
6
|
+
* `disabledDays` rules are defined exactly once.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Converts a `YYYY-MM-DD` ISO date string to a Unix timestamp (seconds)
|
|
10
|
+
* representing local midnight on that calendar day. Returns `null` for
|
|
11
|
+
* inputs that don't parse to a finite timestamp.
|
|
12
|
+
*
|
|
13
|
+
* Uses the `new Date(year, monthIndex, day)` constructor (NOT
|
|
14
|
+
* `new Date(isoStr)`) so the result is local-midnight rather than UTC
|
|
15
|
+
* midnight — required to keep the calendar grid aligned with the user's
|
|
16
|
+
* local calendar day in negative-offset timezones.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} isoStr - Date string in `YYYY-MM-DD` format.
|
|
19
|
+
* @returns {number|null} Local-midnight Unix timestamp (seconds), or null.
|
|
20
|
+
*/
|
|
21
|
+
export function parseIsoToTimestamp(isoStr: string): number | null;
|
|
22
|
+
/**
|
|
23
|
+
* Builds a `Set<number>` of seconds-since-epoch timestamps covering both the
|
|
24
|
+
* legacy `disabledDays` (already-numeric) array and the ISO `blackoutDates`
|
|
25
|
+
* array. Use this for O(1) membership checks in hot paths.
|
|
26
|
+
*
|
|
27
|
+
* @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
|
|
28
|
+
* @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
|
|
29
|
+
* @returns {Set<number>}
|
|
30
|
+
*/
|
|
31
|
+
export function buildBlackoutSet(disabledDays: Array<string | number> | undefined, blackoutDates: Array<string> | undefined): Set<number>;
|
|
32
|
+
/**
|
|
33
|
+
* One-shot membership test for a single timestamp against both blackout
|
|
34
|
+
* sources. Allocates a Set on each call; only use this in cold paths
|
|
35
|
+
* (e.g. the pre-`firstUpdated` cell fallback). Hot paths should hold the
|
|
36
|
+
* Set returned from `buildBlackoutSet` and `.has(ts)` directly.
|
|
37
|
+
*
|
|
38
|
+
* @param {number} dateTs - Unix timestamp (seconds) to test.
|
|
39
|
+
* @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
|
|
40
|
+
* @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
|
|
41
|
+
* @returns {boolean}
|
|
42
|
+
*/
|
|
43
|
+
export function isBlackoutTimestamp(dateTs: number, disabledDays: Array<string | number> | undefined, blackoutDates: Array<string> | undefined): boolean;
|