@lekoala/date-picker 0.2.0 → 0.4.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/README.md +12 -8
- package/custom-elements.json +32 -2
- package/dist/date-picker.css +163 -115
- package/dist/date-picker.js +656 -171
- package/dist/date-picker.min.css +1 -1
- package/dist/date-picker.min.js +13 -13
- package/dist/date-picker.standalone.min.js +177 -129
- package/dist/types/date-calendar.d.ts +34 -3
- package/dist/types/date-calendar.d.ts.map +1 -1
- package/dist/types/date-field.d.ts +15 -5
- package/dist/types/date-field.d.ts.map +1 -1
- package/dist/types/date-picker.d.ts +153 -14
- package/dist/types/date-picker.d.ts.map +1 -1
- package/dist/types/date-range.d.ts +102 -20
- package/dist/types/date-range.d.ts.map +1 -1
- package/dist/types/date.d.ts +10 -0
- package/dist/types/date.d.ts.map +1 -1
- package/dist/types/intl.d.ts.map +1 -1
- package/docs/ACCESSIBILITY.md +22 -10
- package/docs/API.md +72 -3
- package/docs/ARCHITECTURE.md +16 -2
- package/docs/AT-CHECKLIST.md +1 -1
- package/docs/DECISIONS.md +19 -4
- package/docs/MIGRATION-FLATPICKR.md +2 -2
- package/docs/TESTING.md +1 -1
- package/docs/USE_CASES.md +3 -0
- package/package.json +7 -7
- package/src/date-calendar.js +148 -48
- package/src/date-field.js +20 -8
- package/src/date-picker.css +163 -115
- package/src/date-picker.js +549 -110
- package/src/date-range.js +184 -30
- package/src/date.js +50 -1
- package/src/intl.js +13 -7
|
@@ -54,6 +54,9 @@ export declare class DateCalendarElement extends HTMLElement {
|
|
|
54
54
|
_isDateDisabled: DateDisabledPredicate | null;
|
|
55
55
|
/** @type {DateRange} */
|
|
56
56
|
_highlightedRange: DateRange;
|
|
57
|
+
/** @type {DateRange} */
|
|
58
|
+
_paintedRange: DateRange;
|
|
59
|
+
_paintedPreview: boolean;
|
|
57
60
|
_messages: {
|
|
58
61
|
chooseDate: string;
|
|
59
62
|
changeDate: string;
|
|
@@ -213,15 +216,43 @@ export declare class DateCalendarElement extends HTMLElement {
|
|
|
213
216
|
_moveFocusDom(previous: string, next: string, moveFocus?: boolean): void;
|
|
214
217
|
/** @param {string} previousValue @param {string} nextValue */
|
|
215
218
|
_moveSelectionDom(previousValue: string, nextValue: string): boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Accessible name of one day cell. The band contribution is dropped while a
|
|
221
|
+
* preview is projected onto `highlightedRange`: a proposal must not be
|
|
222
|
+
* announced as a committed range start/end.
|
|
223
|
+
* @param {string} date @param {DateState} state
|
|
224
|
+
* @param {"" | "start" | "in" | "end" | "single"} position
|
|
225
|
+
*/
|
|
226
|
+
_dayLabel(date: string, state: DateState, position: "" | "start" | "in" | "end" | "single"): string;
|
|
227
|
+
/**
|
|
228
|
+
* Repaint the range band over the cells already rendered. The band is
|
|
229
|
+
* presentation on top of the same grid, so it must never rebuild it: a full
|
|
230
|
+
* render would drop `renderDay()` nodes and fight the roving focus on every
|
|
231
|
+
* hover of a live range preview.
|
|
232
|
+
*/
|
|
233
|
+
_updateRangeDom(): void;
|
|
216
234
|
/** @public */
|
|
217
235
|
focusGrid(): void;
|
|
218
|
-
/**
|
|
219
|
-
|
|
236
|
+
/**
|
|
237
|
+
* Run one explicit activation: availability check, then the cancelable
|
|
238
|
+
* `dateactivate` seam, then selection. Click, keyboard and any other input
|
|
239
|
+
* device share this single path, so an application that cancels
|
|
240
|
+
* `dateactivate` cannot be bypassed by a new interaction.
|
|
241
|
+
* @public
|
|
242
|
+
* @param {string} date @returns {Promise<boolean>}
|
|
243
|
+
*/
|
|
244
|
+
activateDate(date: string): Promise<boolean>;
|
|
220
245
|
/** @param {MouseEvent} event */
|
|
221
246
|
_onClick(event: MouseEvent): void;
|
|
222
247
|
/** @param {Event} event */
|
|
223
248
|
_onChange(event: Event): void;
|
|
224
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* Real DOM focus is the single source of truth for `datefocus`: the model is
|
|
251
|
+
* synced here and the event is announced from here, so the temporary focus
|
|
252
|
+
* arithmetic in `_onKeyDown` cannot emit phantom events, and setting
|
|
253
|
+
* `focusedDate` without moving focus stays silent.
|
|
254
|
+
* @param {FocusEvent} event
|
|
255
|
+
*/
|
|
225
256
|
_onFocusIn(event: FocusEvent): void;
|
|
226
257
|
/** @param {KeyboardEvent} event */
|
|
227
258
|
_onKeyDown(event: KeyboardEvent): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-calendar.d.ts","sourceRoot":"","sources":["../../src/date-calendar.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"date-calendar.d.ts","sourceRoot":"","sources":["../../src/date-calendar.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA2GhD,YAAqC,SAAS,GAApC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAA,GAAG,EAAC,MAAM,CAAA;CAAC,CAAW;AAC9C,YAA8E,SAAS,GAA7E,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAC,QAAQ,CAAC,EAAC,OAAO,CAAC;IAAC,WAAW,CAAC,EAAC,MAAM,CAAA;CAAC,CAAW;AACvF,YAAyF,UAAU,GAAzF,CAAC,KAAK,EAAC,SAAS,EAAE,OAAO,EAAC;IAAC,MAAM,EAAC,WAAW,CAAA;CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAY;AACnG,YAA0C,UAAU,GAA1C,UAAU,GAAG;IAAC,IAAI,EAAC,UAAU,CAAA;CAAC,CAAY;AACpD,YAAgF,iBAAiB,GAAvF,CAAC,IAAI,EAAC,MAAM,EAAE,WAAW,EAAC,SAAS,KAAK,SAAS,GAAG,IAAI,GAAG,SAAS,CAAmB;AACjG,YAA8E,WAAW,GAA/E,CAAC,IAAI,EAAC,MAAM,EAAE,KAAK,EAAC,SAAS,KAAK,IAAI,GAAG,MAAM,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S,CAAC,IAAI,EAHH,MAGG,EAAE,KAAK,EAHW,SAGX,EAAE,QAAQ,EAFpB,EAAE,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,QAEV,UAW9B;IAED;;;;;OAKG;IACH,eAAe,SAad;IAED,cAAc;IACd,SAAS,SAGR;IAED;;;;;;;OAOG;IACG,YAAY,CAAC,IAAI,EAFZ,MAEY,GAFW,OAAO,CAAC,OAAO,CAAC,CAmCjD;IAED,gCAAgC;IAChC,QAAQ,CAAC,KAAK,EADF,UACE,QAmBb;IAED,2BAA2B;IAC3B,SAAS,CAAC,KAAK,EADH,KACG,QAgBd;IAED;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAFL,UAEK,QASf;IAED,mCAAmC;IACnC,UAAU,CAAC,KAAK,EADJ,aACI,QAgCf;IAED,sCAAsC;IACtC,MAAM,CAAC,IAAI,AADC,CAAuB,EAAf,OACF,QA+HjB;CACF"}
|
|
@@ -30,10 +30,13 @@ export declare class DateFieldController {
|
|
|
30
30
|
onAttributesChanged: (() => void) | null;
|
|
31
31
|
/**
|
|
32
32
|
* Async availability gate for a parsed date. Returning `{ ok: false }`
|
|
33
|
-
* marks the target unavailable. Swappable at runtime.
|
|
34
|
-
*
|
|
33
|
+
* marks the target unavailable. Swappable at runtime. The commit options
|
|
34
|
+
* are forwarded so the gate can honor `moveDisplay`.
|
|
35
|
+
* @type {((date: string, options?: {moveDisplay?: boolean}) => Promise<{ok: boolean, message?: string}>) | null}
|
|
35
36
|
*/
|
|
36
|
-
confirm: ((date: string
|
|
37
|
+
confirm: ((date: string, options?: {
|
|
38
|
+
moveDisplay?: boolean;
|
|
39
|
+
}) => Promise<{
|
|
37
40
|
ok: boolean;
|
|
38
41
|
message?: string;
|
|
39
42
|
}>) | null;
|
|
@@ -66,15 +69,22 @@ export declare class DateFieldController {
|
|
|
66
69
|
/** Whether the user edited the visible text since the last application. */
|
|
67
70
|
get isDirty(): boolean;
|
|
68
71
|
/** Live text input: the raw text no longer matches the canonical value, so
|
|
69
|
-
* the hidden ISO must not submit it.
|
|
72
|
+
* the hidden ISO must not submit it. A text that formats back to the current
|
|
73
|
+
* canonical value (e.g. re-applied by a calendar pick) keeps the ISO value
|
|
74
|
+
* valid; invalidating in-flight commits first still drops stale async work. */
|
|
70
75
|
handleInput(): void;
|
|
71
76
|
/**
|
|
72
77
|
* Commit the visible text. Returns the parsed canonical date on success, the
|
|
73
78
|
* empty string on a clear, or a falsy marker for invalid/stale commits. The
|
|
74
79
|
* caller applies the canonical value so reflection and events stay central.
|
|
80
|
+
* `options` is forwarded to the `confirm` gate so a revalidation can ask it
|
|
81
|
+
* not to move the calendar display (source reloads must not re-home it).
|
|
82
|
+
* @param {{moveDisplay?: boolean}} [options]
|
|
75
83
|
* @returns {Promise<{status: "ok" | "clear" | "invalid" | "stale", value?: string}>}
|
|
76
84
|
*/
|
|
77
|
-
commit(
|
|
85
|
+
commit(options?: {
|
|
86
|
+
moveDisplay?: boolean;
|
|
87
|
+
}): Promise<{
|
|
78
88
|
status: "ok" | "clear" | "invalid" | "stale";
|
|
79
89
|
value?: string;
|
|
80
90
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-field.d.ts","sourceRoot":"","sources":["../../src/date-field.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,qBAAa,mBAAmB;IAMvB,KAAK;IACL,QAAQ;IACR,OAAO;;;;;;IACZ,sCAAsC;IACjC,MAAM,EADA,gBAAgB,GAAG,IAAI;IAElC,kDAAkD;IAC7C,SAAS;IACT,MAAM;IACN,SAAS;IACT,aAAa;IAClB,sCAAsC;IACjC,kBAAkB,EADZ,gBAAgB,GAAG,IAAI;IAElC,kCAAkC;IAC7B,mBAAmB,EADb,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;IAE9B
|
|
1
|
+
{"version":3,"file":"date-field.d.ts","sourceRoot":"","sources":["../../src/date-field.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH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ED;;;;;;;;OAQG;IACG,MAAM,CAAC,OAAO,AAHjB,CACA,EADQ;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAGR,GAFZ,OAAO,CAAC;QAAC,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CA4BnF;IAED;;;OAGG;IACH,YAAY,CAAC,KAAK,EAHP,MAGO,EAAE,OAAO,AAFxB,CAAqC,EAA7B;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAEI,QAW/B;IAED,mEAAmE;IACnE,cAAc,WAIb;IAED;+CAC2C;IAC3C,QAAQ,SAOP;CACF"}
|
|
@@ -21,10 +21,35 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
21
21
|
/** @type {"" | "start" | "end"} */
|
|
22
22
|
_lastFocusEndpoint: "" | "start" | "end";
|
|
23
23
|
_rangeCommitId: number;
|
|
24
|
-
/**
|
|
25
|
-
* time (range mode supersession/stale protection)
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
/** Grid activation intents, keyed by date: the generation at interaction
|
|
25
|
+
* time (range mode supersession/stale protection) plus the bound a drag
|
|
26
|
+
* drop targets, empty for a normal pick.
|
|
27
|
+
* @type {Map<string, {id: number, endpoint: "" | "start" | "end"}>} */
|
|
28
|
+
_pendingIntents: Map<string, {
|
|
29
|
+
id: number;
|
|
30
|
+
endpoint: "" | "start" | "end";
|
|
31
|
+
}>;
|
|
32
|
+
/** Candidate date currently projected onto the calendar band, if any. */
|
|
33
|
+
_previewDate: string;
|
|
34
|
+
/** Live endpoint drag, or null. @type {{pointerId:number, endpoint:"start"|"end", x:number, y:number, date:string, active:boolean} | null} */
|
|
35
|
+
_drag: {
|
|
36
|
+
pointerId: number;
|
|
37
|
+
endpoint: "start" | "end";
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
date: string;
|
|
41
|
+
active: boolean;
|
|
42
|
+
} | null;
|
|
43
|
+
/** A real drag already committed; swallow the click that follows it. */
|
|
44
|
+
_suppressGridClick: boolean;
|
|
45
|
+
/** Overlaid calendar triggers, one per field (single) or per bound (range). @type {{button: HTMLButtonElement, endpoint: "" | "start" | "end"}[]} */
|
|
46
|
+
_buttons: {
|
|
47
|
+
button: HTMLButtonElement;
|
|
48
|
+
endpoint: "" | "start" | "end";
|
|
49
|
+
}[];
|
|
50
|
+
/** Control that opened the popover, so single mode can restore focus to it.
|
|
51
|
+
* @type {HTMLElement | null} */
|
|
52
|
+
_returnFocus: HTMLElement | null;
|
|
28
53
|
_panel: HTMLDivElement | null;
|
|
29
54
|
_calendar: DateCalendarElement | null;
|
|
30
55
|
_originalDescribedBy: string;
|
|
@@ -63,6 +88,8 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
63
88
|
_renderDay: any;
|
|
64
89
|
/** @type {any} */
|
|
65
90
|
_isDateDisabled: any;
|
|
91
|
+
/** Public picker coordinate-space request. @type {"viewport" | "document"} */
|
|
92
|
+
_coordinateSpace: "viewport" | "document";
|
|
66
93
|
static observedAttributes: string[];
|
|
67
94
|
constructor();
|
|
68
95
|
_rangeMode(): boolean;
|
|
@@ -166,6 +193,9 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
166
193
|
/** @public @returns {any} */
|
|
167
194
|
get isDateDisabled(): any;
|
|
168
195
|
set isDateDisabled(value: any);
|
|
196
|
+
/** @public JS-only coordinate-space policy: "viewport" by default, "document" as an explicit opt-in; a change made while open applies to the next opening only. @returns {"viewport" | "document"} */
|
|
197
|
+
get coordinateSpace(): "viewport" | "document";
|
|
198
|
+
set coordinateSpace(value: "viewport" | "document");
|
|
169
199
|
_adapter(): {
|
|
170
200
|
locale: string;
|
|
171
201
|
placeholder: string;
|
|
@@ -176,10 +206,45 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
176
206
|
_syncInputState(): void;
|
|
177
207
|
_syncRangeFields(): void;
|
|
178
208
|
_setRangeAria(): void;
|
|
179
|
-
/**
|
|
180
|
-
|
|
209
|
+
/**
|
|
210
|
+
* Create one calendar trigger. It is a real button overlaid inside the
|
|
211
|
+
* field's own box (see the CSS): the field reserves the room, the trigger
|
|
212
|
+
* stays transparent, and the field's focus ring wraps both.
|
|
213
|
+
* @param {"" | "start" | "end"} endpoint
|
|
214
|
+
* @returns {HTMLButtonElement}
|
|
215
|
+
*/
|
|
216
|
+
_createTrigger(endpoint: "" | "start" | "end"): HTMLButtonElement;
|
|
217
|
+
/**
|
|
218
|
+
* Build the popup once and one trigger per field. Each trigger is inserted
|
|
219
|
+
* immediately after its own field so DOM order follows visual/tab order
|
|
220
|
+
* (`date -> its trigger -> next control`). The hidden ISO field may sit
|
|
221
|
+
* between the two; it is not focusable.
|
|
222
|
+
*/
|
|
223
|
+
_build(): void;
|
|
181
224
|
_bind(): void;
|
|
182
225
|
_bindRange(): void;
|
|
226
|
+
/**
|
|
227
|
+
* Point the shared calendar at one range bound and invalidate any pending
|
|
228
|
+
* activation, so a late response can never commit on the wrong bound.
|
|
229
|
+
* @param {"start" | "end"} endpoint
|
|
230
|
+
*/
|
|
231
|
+
_activateRangeEndpoint(endpoint: "start" | "end"): void;
|
|
232
|
+
/**
|
|
233
|
+
* Range has one trigger per bound. A press on the other bound's trigger is a
|
|
234
|
+
* local switch, not a toggle: it repoints the single open popup instead of
|
|
235
|
+
* closing it. Only a press on the already-active bound toggles shut.
|
|
236
|
+
* @param {"start" | "end"} endpoint
|
|
237
|
+
* @param {MouseEvent} event
|
|
238
|
+
*/
|
|
239
|
+
_onRangeTriggerClick(endpoint: "start" | "end", event: MouseEvent): void;
|
|
240
|
+
/**
|
|
241
|
+
* ArrowDown on a trigger opens the popup and drops into the grid, like the
|
|
242
|
+
* field itself (Enter/Space go through the click path). Needed because focus
|
|
243
|
+
* now returns to the trigger that opened the popover.
|
|
244
|
+
* @param {"" | "start" | "end"} endpoint
|
|
245
|
+
* @param {KeyboardEvent} event
|
|
246
|
+
*/
|
|
247
|
+
_onTriggerKeyDown(endpoint: "" | "start" | "end", event: KeyboardEvent): void;
|
|
183
248
|
/** @param {"" | "start" | "end"} endpoint @param {KeyboardEvent} event */
|
|
184
249
|
_onFieldKeyDown(endpoint: "" | "start" | "end", event: KeyboardEvent): void;
|
|
185
250
|
/** @param {"" | "start" | "end"} endpoint @param {FocusEvent} event */
|
|
@@ -189,33 +254,93 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
189
254
|
* activation supersedes every earlier pending one.
|
|
190
255
|
* @param {Event} event */
|
|
191
256
|
_captureGridIntent(event: Event): void;
|
|
257
|
+
/** Whether one bound can receive a user pick right now.
|
|
258
|
+
* @param {"start" | "end"} bound */
|
|
259
|
+
_boundEditable(bound: "start" | "end"): boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Single write path for a calendar-driven range change. Both fields are
|
|
262
|
+
* synchronized before anything is announced, because one transition can move
|
|
263
|
+
* both bounds at once (`10` then `5` commits `start 10 -> 5` together with
|
|
264
|
+
* `end "" -> 10`); writing bound by bound would expose an intermediate
|
|
265
|
+
* inverted pair. Synthetic `input`/`change` stay on the bounds that moved.
|
|
266
|
+
* @param {import("./date-range.js").RangeTransition} transition
|
|
267
|
+
*/
|
|
268
|
+
_applyRangeTransition(transition: import("./date-range.js").RangeTransition): void;
|
|
269
|
+
/**
|
|
270
|
+
* Project a candidate date onto the calendar band. Purely visual: no
|
|
271
|
+
* `rangechange`, no field write, no validation and no source request — the
|
|
272
|
+
* projection reads the month state already loaded, and the real availability
|
|
273
|
+
* check still runs on commit.
|
|
274
|
+
* @param {string} date @param {"" | "start" | "end"} [endpoint]
|
|
275
|
+
*/
|
|
276
|
+
_setPreview(date: string, endpoint?: "" | "start" | "end"): void;
|
|
277
|
+
/** Drop the projection and put the committed range back on the band. */
|
|
278
|
+
_clearPreview(): void;
|
|
279
|
+
/** @param {Event} event */
|
|
280
|
+
_onGridDateFocus(event: Event): void;
|
|
281
|
+
/**
|
|
282
|
+
* Hover candidate. `focusedDate` stays the keyboard target only: pointer
|
|
283
|
+
* hover never moves it, it just feeds the same projection.
|
|
284
|
+
* @param {Event} event
|
|
285
|
+
*/
|
|
286
|
+
_onGridPointerOver(event: Event): void;
|
|
287
|
+
_onGridPointerLeave(): void;
|
|
288
|
+
/** @param {EventTarget | null} target @returns {string} */
|
|
289
|
+
_cellDate(target: EventTarget | null): string;
|
|
290
|
+
/** @param {number} x @param {number} y @returns {string} */
|
|
291
|
+
_dateAtPoint(x: number, y: number): string;
|
|
292
|
+
/**
|
|
293
|
+
* Arm an endpoint drag. Only a complete, ordered range offers two distinct
|
|
294
|
+
* handles; a one-day range carries both markers on the same cell, and
|
|
295
|
+
* guessing which one the user meant would be worse than not dragging.
|
|
296
|
+
* @param {Event} event
|
|
297
|
+
*/
|
|
298
|
+
_onGridPointerDown(event: Event): void;
|
|
299
|
+
/** @param {Event} event */
|
|
300
|
+
_onGridPointerMove(event: Event): void;
|
|
301
|
+
/** @param {Event} event */
|
|
302
|
+
_onGridPointerUp(event: Event): void;
|
|
303
|
+
/** @param {Event} event */
|
|
304
|
+
_onGridPointerCancel(event: Event): void;
|
|
305
|
+
/** @param {number} pointerId */
|
|
306
|
+
_releaseDragCapture(pointerId: number): void;
|
|
307
|
+
/** Expose whether the band currently offers draggable handles, and whether
|
|
308
|
+
* one is being dragged, so the cursor can say so. */
|
|
309
|
+
_syncDragAffordance(): void;
|
|
192
310
|
/** @param {KeyboardEvent} event */
|
|
193
311
|
_onEscape(event: KeyboardEvent): void;
|
|
194
312
|
_syncCalendarOptions(): void;
|
|
195
313
|
_refreshLocale(): void;
|
|
196
314
|
_refreshButtonLabel(): void;
|
|
315
|
+
/** Each bound has its own trigger, so each needs its own accessible name: the
|
|
316
|
+
* bound label is what tells two otherwise identical triggers apart. */
|
|
197
317
|
_refreshRangeButtonLabel(): void;
|
|
198
318
|
/** @param {string} value */
|
|
199
319
|
_reflectValue(value: string): void;
|
|
200
|
-
/** @param {string} value @param {{emit?:boolean,format?:boolean,reflect?:boolean}} [options] */
|
|
320
|
+
/** @param {string} value @param {{emit?:boolean,format?:boolean,reflect?:boolean,moveDisplay?:boolean}} [options] */
|
|
201
321
|
_setValue(value: string, options?: {
|
|
202
322
|
emit?: boolean;
|
|
203
323
|
format?: boolean;
|
|
204
324
|
reflect?: boolean;
|
|
325
|
+
moveDisplay?: boolean;
|
|
205
326
|
}): void;
|
|
206
327
|
/**
|
|
207
328
|
* Calendar-backed availability gate injected into the field controllers.
|
|
208
329
|
* A cancelled or failed source load confirms nothing: do not fill the
|
|
209
330
|
* submitted ISO field nor treat the date as available.
|
|
210
|
-
* @param {string} date @
|
|
331
|
+
* @param {string} date @param {{moveDisplay?: boolean}} [options]
|
|
332
|
+
* @returns {Promise<{ok: boolean, message?: string}>}
|
|
211
333
|
*/
|
|
212
|
-
_confirmDate(date: string
|
|
334
|
+
_confirmDate(date: string, options?: {
|
|
335
|
+
moveDisplay?: boolean;
|
|
336
|
+
}): Promise<{
|
|
213
337
|
ok: boolean;
|
|
214
338
|
message?: string;
|
|
215
339
|
}>;
|
|
216
|
-
/** @param {boolean} emit @param {{force?: boolean}} [options] */
|
|
340
|
+
/** @param {boolean} emit @param {{force?: boolean, moveDisplay?: boolean}} [options] */
|
|
217
341
|
_commitText(emit: boolean, options?: {
|
|
218
342
|
force?: boolean;
|
|
343
|
+
moveDisplay?: boolean;
|
|
219
344
|
}): Promise<boolean>;
|
|
220
345
|
/** @param {"start" | "end"} which */
|
|
221
346
|
_commitFieldText(which: "start" | "end"): Promise<boolean>;
|
|
@@ -235,8 +360,14 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
235
360
|
/** @param {"start" | "end"} which */
|
|
236
361
|
_boundCanonical(which: "start" | "end"): string;
|
|
237
362
|
_emitRangeChange(): void;
|
|
238
|
-
/**
|
|
239
|
-
*
|
|
363
|
+
/** Displayable projection of the business range. An inverted or start-less
|
|
364
|
+
* pair shows no misleading band. @returns {{start:string, end:string}} */
|
|
365
|
+
_displayRange(): {
|
|
366
|
+
start: string;
|
|
367
|
+
end: string;
|
|
368
|
+
};
|
|
369
|
+
/** Put the committed range back on the calendar band, dropping any
|
|
370
|
+
* projection currently shown over it. */
|
|
240
371
|
_syncHighlight(): void;
|
|
241
372
|
/**
|
|
242
373
|
* Cross-bound validity: the order error is attributed to the bound that was
|
|
@@ -260,14 +391,22 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
260
391
|
_restoreRangeDefault(): void;
|
|
261
392
|
/** @param {"start" | "end"} which */
|
|
262
393
|
_focusField(which: "start" | "end"): void;
|
|
263
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Restore focus to the control that opened the popover (single mode). focus()
|
|
396
|
+
* must not run synchronously from a keydown handler (Chromium drops focus
|
|
397
|
+
* changes there) and must not re-open the popover under the default
|
|
398
|
+
* open-on-focus. Deferring keeps _suppressFocusOpen active for the call.
|
|
399
|
+
*/
|
|
400
|
+
_restoreFocus(): void;
|
|
264
401
|
/** @returns {"" | "start" | "end"} */
|
|
265
402
|
_resolveRangeEndpoint(): "" | "start" | "end";
|
|
266
403
|
/** @public */
|
|
267
404
|
validate(): Promise<boolean>;
|
|
268
|
-
/** @public @param {{moveFocus?:boolean}} [options] */
|
|
405
|
+
/** @public @param {{moveFocus?:boolean, endpoint?:"start"|"end", returnFocus?:HTMLElement}} [options] */
|
|
269
406
|
show(options?: {
|
|
270
407
|
moveFocus?: boolean;
|
|
408
|
+
endpoint?: "start" | "end";
|
|
409
|
+
returnFocus?: HTMLElement;
|
|
271
410
|
}): void;
|
|
272
411
|
/** @param {boolean} expanded */
|
|
273
412
|
_setExpanded(expanded: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker.js"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,mBAAm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YAAY,CAAC,QAAQ,EADT,OACS,QAKpB;IAED,8CAA8C;IAC9C,IAAI,CAAC,YAAY,AADL,CAA+B,EAAvB,OACK,QA8BxB;IAED;;;yCAGqC;IACrC,qBAAqB,IADR,EAAE,GAAG,OAAO,GAAG,KAAK,CAShC;CACF"}
|
|
@@ -29,21 +29,63 @@ export declare function normalizeRange(range: {
|
|
|
29
29
|
* @returns {"" | "start" | "in" | "end" | "single"}
|
|
30
30
|
*/
|
|
31
31
|
export declare function rangePosition(date: string, range: DateRange | null | undefined): "" | "start" | "in" | "end" | "single";
|
|
32
|
+
export type RangeTransition = {
|
|
33
|
+
status: "pending" | "complete" | "refused";
|
|
34
|
+
/**
|
|
35
|
+
* primary bound the transition speaks through
|
|
36
|
+
*/
|
|
37
|
+
endpoint: "start" | "end";
|
|
38
|
+
/**
|
|
39
|
+
* bounds whose value actually moves
|
|
40
|
+
*/
|
|
41
|
+
changedEndpoints: ("start" | "end")[];
|
|
42
|
+
/**
|
|
43
|
+
* the whole resulting pair, not only the moved bound
|
|
44
|
+
*/
|
|
45
|
+
range: DateRange;
|
|
46
|
+
/**
|
|
47
|
+
* bound the next pick would target
|
|
48
|
+
*/
|
|
49
|
+
activeEndpoint: "" | "start" | "end";
|
|
50
|
+
/**
|
|
51
|
+
* the workflow cannot continue in the popup
|
|
52
|
+
*/
|
|
53
|
+
close?: boolean;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @typedef {object} RangeTransition
|
|
57
|
+
* @property {"pending" | "complete" | "refused"} status
|
|
58
|
+
* @property {"start" | "end"} endpoint primary bound the transition speaks through
|
|
59
|
+
* @property {("start" | "end")[]} changedEndpoints bounds whose value actually moves
|
|
60
|
+
* @property {DateRange} range the whole resulting pair, not only the moved bound
|
|
61
|
+
* @property {"" | "start" | "end"} activeEndpoint bound the next pick would target
|
|
62
|
+
* @property {boolean} [close] the workflow cannot continue in the popup
|
|
63
|
+
*/
|
|
32
64
|
/**
|
|
33
65
|
* Pure two-bound state machine for the shared-calendar range picker. Covers
|
|
34
66
|
* start/end state and the active-endpoint transition rules; it knows nothing
|
|
35
67
|
* about DOM, popups or async availability.
|
|
36
68
|
*
|
|
37
|
-
* Interaction contract
|
|
69
|
+
* Interaction contract:
|
|
38
70
|
* - opening through a field targets that bound;
|
|
39
71
|
* - a pick outside a complete range extends the corresponding bound;
|
|
40
|
-
* -
|
|
72
|
+
* - while a range is being created (`start` set, no `end`), a second pick
|
|
73
|
+
* before the anchor is sorted into `date -> start` instead of refused:
|
|
74
|
+
* calendar interaction never produces an inverted range;
|
|
75
|
+
* - an explicit change to one bound of an already complete pair keeps that
|
|
76
|
+
* bound's identity, so moving `end` before `start` is refused rather than
|
|
77
|
+
* silently rewriting the other field;
|
|
41
78
|
* - activating through `start` commits `start`, moves the active endpoint to
|
|
42
79
|
* `end` and leaves the popup open for the second selection.
|
|
43
80
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
81
|
+
* Each rule exists once, as a `project*()` projection; `activate()` and
|
|
82
|
+
* `moveEndpoint()` only apply one. Hover, keyboard and drag previews read the
|
|
83
|
+
* same projections, so a second copy of the interaction rules cannot drift
|
|
84
|
+
* into the DOM layer.
|
|
85
|
+
*
|
|
86
|
+
* Text entry is deliberately outside this machine: a typed pair may be
|
|
87
|
+
* temporarily inverted and report a validation error. It is the coordinator's
|
|
88
|
+
* job to forward only a displayable range to `calendar.highlightedRange`.
|
|
47
89
|
*/
|
|
48
90
|
export declare class DateRangeController {
|
|
49
91
|
/** @type {"" | "start" | "end"} */
|
|
@@ -51,32 +93,72 @@ export declare class DateRangeController {
|
|
|
51
93
|
start: string;
|
|
52
94
|
end: string;
|
|
53
95
|
constructor();
|
|
54
|
-
/** @returns {
|
|
55
|
-
get range():
|
|
56
|
-
start: string;
|
|
57
|
-
end: string;
|
|
58
|
-
};
|
|
96
|
+
/** @returns {DateRange} */
|
|
97
|
+
get range(): DateRange;
|
|
59
98
|
/** Whether both bounds exist and are ordered (start <= end). */
|
|
60
99
|
get complete(): boolean;
|
|
61
100
|
/** @param {"" | "start" | "end"} endpoint */
|
|
62
101
|
focus(endpoint: "" | "start" | "end"): void;
|
|
102
|
+
/** @param {"start" | "end"} endpoint @returns {RangeTransition} */
|
|
103
|
+
_refuse(endpoint: "start" | "end"): RangeTransition;
|
|
63
104
|
/**
|
|
64
|
-
*
|
|
105
|
+
* Project one grid activation through the active endpoint, without mutating.
|
|
65
106
|
*
|
|
66
107
|
* `editable(bound)` reports whether a bound can receive a user pick. It
|
|
67
108
|
* guards every commit and the `start -> end` transition: when the next bound
|
|
68
|
-
* is uneditable the returned
|
|
69
|
-
* the popup targeting a bound that can never change. `status:
|
|
70
|
-
* stays reserved for an actually ordered pair.
|
|
109
|
+
* is uneditable the returned transition carries `close: true` instead of
|
|
110
|
+
* leaving the popup targeting a bound that can never change. `status:
|
|
111
|
+
* "complete"` stays reserved for an actually ordered pair.
|
|
112
|
+
* @param {string} date
|
|
113
|
+
* @param {(bound: "start" | "end") => boolean} [editable]
|
|
114
|
+
* @returns {RangeTransition}
|
|
115
|
+
*/
|
|
116
|
+
project(date: string, editable?: (bound: "start" | "end") => boolean): RangeTransition;
|
|
117
|
+
/**
|
|
118
|
+
* Project a direct move of one bound (endpoint drag), without mutating.
|
|
119
|
+
*
|
|
120
|
+
* Only a complete, ordered pair offers two handles to grab, and a handle
|
|
121
|
+
* never crosses the other one: the candidate is clamped to the opposite
|
|
122
|
+
* bound, so the previewed band is exactly what a drop commits. Equality is
|
|
123
|
+
* allowed (a one-day range).
|
|
124
|
+
* @param {string} date
|
|
125
|
+
* @param {"start" | "end"} endpoint
|
|
126
|
+
* @param {(bound: "start" | "end") => boolean} [editable]
|
|
127
|
+
* @returns {RangeTransition}
|
|
128
|
+
*/
|
|
129
|
+
projectEndpoint(date: string, endpoint: "start" | "end", editable?: (bound: "start" | "end") => boolean): RangeTransition;
|
|
130
|
+
/**
|
|
131
|
+
* Displayable band a candidate date would produce, or `null` when there is
|
|
132
|
+
* nothing to promise. Single source of truth for hover, keyboard and drag
|
|
133
|
+
* previews: the projection rules with no mutation and no event.
|
|
134
|
+
*
|
|
135
|
+
* Without a drag handle a preview only speaks during range creation, when
|
|
136
|
+
* exactly one bound is anchored and the other is still open. An empty range
|
|
137
|
+
* has no anchor to project from, and a complete pair is not a promise in
|
|
138
|
+
* progress — previewing it would repaint the committed band on every hover.
|
|
139
|
+
* @param {string} date
|
|
140
|
+
* @param {"" | "start" | "end"} [endpoint] drag handle, empty for a normal pick
|
|
141
|
+
* @param {(bound: "start" | "end") => boolean} [editable]
|
|
142
|
+
* @returns {DateRange | null}
|
|
143
|
+
*/
|
|
144
|
+
previewRange(date: string, endpoint?: "" | "start" | "end", editable?: (bound: "start" | "end") => boolean): DateRange | null;
|
|
145
|
+
/** @param {RangeTransition} transition @returns {RangeTransition} */
|
|
146
|
+
_apply(transition: RangeTransition): RangeTransition;
|
|
147
|
+
/**
|
|
148
|
+
* Apply one grid activation through the active endpoint.
|
|
149
|
+
* @param {string} date
|
|
150
|
+
* @param {(bound: "start" | "end") => boolean} [editable]
|
|
151
|
+
* @returns {RangeTransition}
|
|
152
|
+
*/
|
|
153
|
+
activate(date: string, editable?: (bound: "start" | "end") => boolean): RangeTransition;
|
|
154
|
+
/**
|
|
155
|
+
* Apply a direct move of one bound (endpoint drag).
|
|
71
156
|
* @param {string} date
|
|
157
|
+
* @param {"start" | "end"} endpoint
|
|
72
158
|
* @param {(bound: "start" | "end") => boolean} [editable]
|
|
73
|
-
* @returns {
|
|
159
|
+
* @returns {RangeTransition}
|
|
74
160
|
*/
|
|
75
|
-
|
|
76
|
-
status: "pending" | "complete" | "refused";
|
|
77
|
-
endpoint: "start" | "end";
|
|
78
|
-
close?: boolean;
|
|
79
|
-
};
|
|
161
|
+
moveEndpoint(date: string, endpoint: "start" | "end", editable?: (bound: "start" | "end") => boolean): RangeTransition;
|
|
80
162
|
}
|
|
81
163
|
/**
|
|
82
164
|
* Link two date pickers without teaching either picker about its sibling.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../src/date-range.js"],"names":[],"mappings":"AAEI,YAAsC,SAAS,GAArC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,GAAG,EAAC,MAAM,CAAA;CAAC,CAAW;AAAnD,sDAAsD;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAHzB;IAAC,KAAK,CAAC,EAAC,MAAM,CAAC;IAAC,GAAG,CAAC,EAAC,MAAM,CAAA;CAAC,GAAC,IAAI,GAAC,SAGT,GAFvB,SAAS,CAYrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAIuB,EAAE,KAAK,EAH9B,SAAS,GAAC,IAAI,GAAC,SAGe,GAF5B,EAAE,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAUlD;
|
|
1
|
+
{"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../src/date-range.js"],"names":[],"mappings":"AAEI,YAAsC,SAAS,GAArC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,GAAG,EAAC,MAAM,CAAA;CAAC,CAAW;AAAnD,sDAAsD;AAEtD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAHzB;IAAC,KAAK,CAAC,EAAC,MAAM,CAAC;IAAC,GAAG,CAAC,EAAC,MAAM,CAAA;CAAC,GAAC,IAAI,GAAC,SAGT,GAFvB,SAAS,CAYrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAIuB,EAAE,KAAK,EAH9B,SAAS,GAAC,IAAI,GAAC,SAGe,GAF5B,EAAE,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAUlD;AAGE,YAAkB,eAAe,GACjC;IAA+C,MAAM,EAA1C,SAAS,GAAG,UAAU,GAAG,SAAS,CAC7C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AO,GAAG,KAAK,KAAK,OAGgB,GAF1C,SAAS,GAAG,IAAI,CAY5B;IAED,qEAAqE;IACrE,MAAM,CAAC,UAAU,EADL,eACK,GADiC,eAAe,CAOhE;IAED;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAJF,MAIE,EAAE,QAAQ,AAHpB,CACA,EADQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,KAAK,OAGH,GAFvB,eAAe,CAI3B;IAED;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EALN,MAKM,EAAE,QAAQ,EAJhB,OAAO,GAAG,KAIM,EAAE,QAAQ,AAHlC,CACA,EADQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,KAAK,OAGW,GAFrC,eAAe,CAI3B;CACF;AAgBD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAJxB,OAAO,kBAAkB,EAAE,iBAIH,EAAE,GAAG,EAH7B,OAAO,kBAAkB,EAAE,iBAGE,GAF3B,MAAM,IAAI,CAyBtB"}
|
package/dist/types/date.d.ts
CHANGED
|
@@ -58,6 +58,16 @@ export declare function endOfWeek(value: string, firstDay?: number): string;
|
|
|
58
58
|
export declare function getMonthWeeks(value: string, options?: {
|
|
59
59
|
firstDay?: number;
|
|
60
60
|
}): string[][];
|
|
61
|
+
/**
|
|
62
|
+
* Nearest month whose true civil weeks stay inside 0001-01-01..9999-12-31, so a
|
|
63
|
+
* grid can always be built. A month's covering weeks can reach a few days
|
|
64
|
+
* before or after it, so the earliest and latest displayable months depend on
|
|
65
|
+
* `firstDay`.
|
|
66
|
+
* @param {string} value YYYY-MM or YYYY-MM-DD
|
|
67
|
+
* @param {number} [firstDay]
|
|
68
|
+
* @returns {string} YYYY-MM
|
|
69
|
+
*/
|
|
70
|
+
export declare function clampDisplayMonth(value: string, firstDay?: number): string;
|
|
61
71
|
/** @param {string} value @param {string} [min] @param {string} [max] */
|
|
62
72
|
export declare function clampDate(value: string, min?: string, max?: string): string;
|
|
63
73
|
/** Local civil date; no timezone conversion of the selected date model. */
|
package/dist/types/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/date.js"],"names":[],"mappings":"AAGA,2BAA2B;AAC3B,wBAAgB,UAAU,CAAC,IAAI,EADnB,MACmB,WAE9B;AAED,iDAAiD;AACjD,wBAAgB,WAAW,CAAC,IAAI,EADpB,MACoB,EAAE,KAAK,EADN,MACM,qBAGtC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAHpB,MAGoB,GAFlB;IAAC,IAAI,EAAC,MAAM,CAAC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,GAAG,EAAC,MAAM,CAAA;CAAC,GAAG,IAAI,CAW1D;AAED,4BAA4B;AAC5B,wBAAgB,MAAM,CAAC,KAAK,EADhB,MACgB,WAE3B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAHnB,MAGmB,GAFjB,MAAM,CAYlB;AAED,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,IAAI,EADlB,MACkB,EAAE,KAAK,EADJ,MACI,EAAE,GAAG,EADa,MACb,UAIzC;AAeD,4BAA4B;AAC5B,wBAAgB,UAAU,CAAC,KAAK,EADpB,MACoB,QAI/B;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,CAAC,EADlB,MACkB,EAAE,CAAC,EADH,MACG,cAGhC;AAED,mDAAmD;AACnD,wBAAgB,OAAO,CAAC,KAAK,EADjB,MACiB,EAAE,MAAM,EADH,MACG,UAOpC;AAED,mDAAmD;AACnD,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB,EAAE,MAAM,EADL,MACK,UAUtC;AAED,mDAAmD;AACnD,wBAAgB,QAAQ,CAAC,KAAK,EADlB,MACkB,EAAE,MAAM,EADJ,MACI,UAOrC;AAED,mDAAmD;AACnD,wBAAgB,UAAU,CAAC,KAAK,EADpB,MACoB,EAAE,MAAM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0C,GAFxC,MAAM,CAyBlB;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB,EAAE,GAAG,AADV,CAAsB,EAAd,MACO,EAAE,GAAG,AADE,CAAqB,EAAb,MACL,UAKlD;AAED,2EAA2E;AAC3E,wBAAgB,QAAQ,WAGvB;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,KAAK,EADD,MACC,UAUlC"}
|
package/dist/types/intl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl.d.ts","sourceRoot":"","sources":["../../src/intl.js"],"names":[],"mappings":"AAIA,+BAA+B;AAC/B,wBAAgB,aAAa,CAAC,MAAM,AADhC,CAAwB,EAAhB,MAC6B,UAKxC;
|
|
1
|
+
{"version":3,"file":"intl.d.ts","sourceRoot":"","sources":["../../src/intl.js"],"names":[],"mappings":"AAIA,+BAA+B;AAC/B,wBAAgB,aAAa,CAAC,MAAM,AADhC,CAAwB,EAAhB,MAC6B,UAKxC;AAsBD,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,KAAK,EADxB,MACwB,EAAE,MAAM,AADlB,CAAwB,EAAhB,MACe,UAUhD;AAED,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,KAAK,EADzB,MACyB,EAAE,MAAM,AADnB,CAAwB,EAAhB,MACgB,UAQjD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,AAFlC,CAAyB,EAAjB,MAE+B,GAFJ,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CA2B1E;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,MAAM,AAD7B,CAAyB,EAAjB,MAC0B,EAAE,KAAK,AADhB,CAA+B,EAAvB,MAAM,GAAC,OACU,YAMrD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,AAJhC,CACA,EADQ,MAI6B,EAAE,QAAQ,AAH/C,CACA,EADQ,MAG2C,EAAE,KAAK,AAF1D,CAAwC,EAAhC,MAAM,GAAC,OAAO,GAAC,QAE6C,YAetE;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,AAFrC,CAAwB,EAAhB,MAEkC;;;IAoCzC,4BAA4B;kBAAhB,MAAM;IAKlB,6CAA6C;gBAAjC,MAAM,GAAiB,MAAM;EAmB5C;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB;;;;SAE9B"}
|