@lekoala/date-picker 0.3.0 → 0.5.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 +281 -263
- package/custom-elements.json +30 -0
- package/dist/date-picker.css +51 -46
- package/dist/date-picker.js +685 -204
- package/dist/date-picker.min.css +1 -1
- package/dist/date-picker.min.js +13 -13
- package/dist/date-picker.standalone.min.js +65 -60
- package/dist/types/control-classes.d.ts +30 -0
- package/dist/types/control-classes.d.ts.map +1 -0
- package/dist/types/date-calendar.d.ts +49 -3
- package/dist/types/date-calendar.d.ts.map +1 -1
- package/dist/types/date-field.d.ts +12 -4
- package/dist/types/date-field.d.ts.map +1 -1
- package/dist/types/date-picker.d.ts +106 -9
- 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 +14 -2
- package/dist/types/date.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/intl.d.ts.map +1 -1
- package/dist/types/source.d.ts +1 -0
- package/dist/types/source.d.ts.map +1 -1
- package/docs/ACCESSIBILITY.md +6 -2
- package/docs/API.md +430 -358
- package/docs/DECISIONS.md +68 -49
- package/docs/MIGRATION-FLATPICKR.md +1 -1
- package/docs/TESTING.md +1 -1
- package/docs/USE_CASES.md +156 -141
- package/package.json +8 -8
- package/src/control-classes.js +50 -0
- package/src/date-calendar.js +188 -54
- package/src/date-field.js +9 -5
- package/src/date-picker.css +51 -46
- package/src/date-picker.js +392 -83
- package/src/date-range.js +184 -30
- package/src/date.js +57 -3
- package/src/index.js +1 -0
- package/src/intl.js +52 -17
- package/src/source.js +14 -4
|
@@ -54,6 +54,11 @@ 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;
|
|
60
|
+
/** @type {Map<string, DateState>} States of the current rendered grid. */
|
|
61
|
+
_renderedStates: Map<string, DateState>;
|
|
57
62
|
_messages: {
|
|
58
63
|
chooseDate: string;
|
|
59
64
|
changeDate: string;
|
|
@@ -74,6 +79,11 @@ export declare class DateCalendarElement extends HTMLElement {
|
|
|
74
79
|
rangeOrderStart: string;
|
|
75
80
|
rangeOrderEnd: string;
|
|
76
81
|
};
|
|
82
|
+
_controlClasses: {
|
|
83
|
+
month: string;
|
|
84
|
+
year: string;
|
|
85
|
+
nav: string;
|
|
86
|
+
};
|
|
77
87
|
static observedAttributes: string[];
|
|
78
88
|
constructor();
|
|
79
89
|
connectedCallback(): void;
|
|
@@ -121,6 +131,14 @@ export declare class DateCalendarElement extends HTMLElement {
|
|
|
121
131
|
/** @public */
|
|
122
132
|
get showWeekNumbers(): boolean;
|
|
123
133
|
set showWeekNumbers(value: boolean);
|
|
134
|
+
/**
|
|
135
|
+
* Author classes for header controls; merged with global defaults.
|
|
136
|
+
* @public
|
|
137
|
+
* @returns {import("./control-classes.js").ControlClasses}
|
|
138
|
+
*/
|
|
139
|
+
get controlClasses(): import("./control-classes.js").ControlClasses;
|
|
140
|
+
/** @param {Partial<import("./control-classes.js").ControlClasses> | null} value */
|
|
141
|
+
set controlClasses(value: Partial<import("./control-classes.js").ControlClasses> | null);
|
|
124
142
|
/** @public */
|
|
125
143
|
get messages(): {
|
|
126
144
|
chooseDate: string;
|
|
@@ -213,15 +231,43 @@ export declare class DateCalendarElement extends HTMLElement {
|
|
|
213
231
|
_moveFocusDom(previous: string, next: string, moveFocus?: boolean): void;
|
|
214
232
|
/** @param {string} previousValue @param {string} nextValue */
|
|
215
233
|
_moveSelectionDom(previousValue: string, nextValue: string): boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Accessible name of one day cell. The band contribution is dropped while a
|
|
236
|
+
* preview is projected onto `highlightedRange`: a proposal must not be
|
|
237
|
+
* announced as a committed range start/end.
|
|
238
|
+
* @param {string} date @param {DateState} state
|
|
239
|
+
* @param {"" | "start" | "in" | "end" | "single"} position
|
|
240
|
+
*/
|
|
241
|
+
_dayLabel(date: string, state: DateState, position: "" | "start" | "in" | "end" | "single"): string;
|
|
242
|
+
/**
|
|
243
|
+
* Repaint the range band over the cells already rendered. The band is
|
|
244
|
+
* presentation on top of the same grid, so it must never rebuild it: a full
|
|
245
|
+
* render would drop `renderDay()` nodes and fight the roving focus on every
|
|
246
|
+
* hover of a live range preview.
|
|
247
|
+
*/
|
|
248
|
+
_updateRangeDom(): void;
|
|
216
249
|
/** @public */
|
|
217
250
|
focusGrid(): void;
|
|
218
|
-
/**
|
|
219
|
-
|
|
251
|
+
/**
|
|
252
|
+
* Run one explicit activation: availability check, then the cancelable
|
|
253
|
+
* `dateactivate` seam, then selection. Click, keyboard and any other input
|
|
254
|
+
* device share this single path, so an application that cancels
|
|
255
|
+
* `dateactivate` cannot be bypassed by a new interaction.
|
|
256
|
+
* @public
|
|
257
|
+
* @param {string} date @returns {Promise<boolean>}
|
|
258
|
+
*/
|
|
259
|
+
activateDate(date: string): Promise<boolean>;
|
|
220
260
|
/** @param {MouseEvent} event */
|
|
221
261
|
_onClick(event: MouseEvent): void;
|
|
222
262
|
/** @param {Event} event */
|
|
223
263
|
_onChange(event: Event): void;
|
|
224
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Real DOM focus is the single source of truth for `datefocus`: the model is
|
|
266
|
+
* synced here and the event is announced from here, so the temporary focus
|
|
267
|
+
* arithmetic in `_onKeyDown` cannot emit phantom events, and setting
|
|
268
|
+
* `focusedDate` without moving focus stays silent.
|
|
269
|
+
* @param {FocusEvent} event
|
|
270
|
+
*/
|
|
225
271
|
_onFocusIn(event: FocusEvent): void;
|
|
226
272
|
/** @param {KeyboardEvent} event */
|
|
227
273
|
_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;AA4GhD,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,GAAG,IAAI,GAAG,SAAS,CAAa;AACzF,YAAoC,qBAAqB,GAA/C,CAAC,IAAI,EAAC,MAAM,KAAK,OAAO,CAAuB;AAhB7D;;;;;;;;;GASG;AACH,qDAAqD;AACrD,8FAA8F;AAC9F,0GAA0G;AAC1G,2DAA2D;AAC3D,wGAAwG;AACxG,gGAAgG;AAChG,gEAAgE;AAEhE,qBAAa,mB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C;IAED;;;;;;OAMG;IACH,SAAS,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,SAuBd;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,QAqIjB;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;
|
|
@@ -74,9 +77,14 @@ export declare class DateFieldController {
|
|
|
74
77
|
* Commit the visible text. Returns the parsed canonical date on success, the
|
|
75
78
|
* empty string on a clear, or a falsy marker for invalid/stale commits. The
|
|
76
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]
|
|
77
83
|
* @returns {Promise<{status: "ok" | "clear" | "invalid" | "stale", value?: string}>}
|
|
78
84
|
*/
|
|
79
|
-
commit(
|
|
85
|
+
commit(options?: {
|
|
86
|
+
moveDisplay?: boolean;
|
|
87
|
+
}): Promise<{
|
|
80
88
|
status: "ok" | "clear" | "invalid" | "stale";
|
|
81
89
|
value?: string;
|
|
82
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,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,I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AK,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,9 +21,27 @@ 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
|
-
|
|
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;
|
|
27
45
|
/** Overlaid calendar triggers, one per field (single) or per bound (range). @type {{button: HTMLButtonElement, endpoint: "" | "start" | "end"}[]} */
|
|
28
46
|
_buttons: {
|
|
29
47
|
button: HTMLButtonElement;
|
|
@@ -62,6 +80,11 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
62
80
|
rangeOrderStart: string;
|
|
63
81
|
rangeOrderEnd: string;
|
|
64
82
|
};
|
|
83
|
+
_controlClasses: {
|
|
84
|
+
month: string;
|
|
85
|
+
year: string;
|
|
86
|
+
nav: string;
|
|
87
|
+
};
|
|
65
88
|
/** @type {any} */
|
|
66
89
|
_source: any;
|
|
67
90
|
/** @type {any} */
|
|
@@ -122,6 +145,14 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
122
145
|
set openOnFocus(value: boolean);
|
|
123
146
|
/** @public */
|
|
124
147
|
get open(): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Author classes for header controls; merged with global defaults.
|
|
150
|
+
* @public
|
|
151
|
+
* @returns {import("./control-classes.js").ControlClasses}
|
|
152
|
+
*/
|
|
153
|
+
get controlClasses(): import("./control-classes.js").ControlClasses;
|
|
154
|
+
/** @param {Partial<import("./control-classes.js").ControlClasses> | null} value */
|
|
155
|
+
set controlClasses(value: Partial<import("./control-classes.js").ControlClasses> | null);
|
|
125
156
|
/** @public */
|
|
126
157
|
get messages(): {
|
|
127
158
|
chooseDate: string;
|
|
@@ -203,6 +234,8 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
203
234
|
* between the two; it is not focusable.
|
|
204
235
|
*/
|
|
205
236
|
_build(): void;
|
|
237
|
+
/** @param {AbortSignal} signal @param {HTMLInputElement | null | undefined} input @param {() => void} restore */
|
|
238
|
+
_bindPopup(signal: AbortSignal, input: HTMLInputElement | null | undefined, restore: () => void): void;
|
|
206
239
|
_bind(): void;
|
|
207
240
|
_bindRange(): void;
|
|
208
241
|
/**
|
|
@@ -236,6 +269,59 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
236
269
|
* activation supersedes every earlier pending one.
|
|
237
270
|
* @param {Event} event */
|
|
238
271
|
_captureGridIntent(event: Event): void;
|
|
272
|
+
/** Whether one bound can receive a user pick right now.
|
|
273
|
+
* @param {"start" | "end"} bound */
|
|
274
|
+
_boundEditable(bound: "start" | "end"): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Single write path for a calendar-driven range change. Both fields are
|
|
277
|
+
* synchronized before anything is announced, because one transition can move
|
|
278
|
+
* both bounds at once (`10` then `5` commits `start 10 -> 5` together with
|
|
279
|
+
* `end "" -> 10`); writing bound by bound would expose an intermediate
|
|
280
|
+
* inverted pair. Synthetic `input`/`change` stay on the bounds that moved.
|
|
281
|
+
* @param {import("./date-range.js").RangeTransition} transition
|
|
282
|
+
*/
|
|
283
|
+
_applyRangeTransition(transition: import("./date-range.js").RangeTransition): void;
|
|
284
|
+
/**
|
|
285
|
+
* Project a candidate date onto the calendar band. Purely visual: no
|
|
286
|
+
* `rangechange`, no field write, no validation and no source request — the
|
|
287
|
+
* projection reads the month state already loaded, and the real availability
|
|
288
|
+
* check still runs on commit.
|
|
289
|
+
* @param {string} date @param {"" | "start" | "end"} [endpoint]
|
|
290
|
+
*/
|
|
291
|
+
_setPreview(date: string, endpoint?: "" | "start" | "end"): void;
|
|
292
|
+
/** Drop the projection and put the committed range back on the band. */
|
|
293
|
+
_clearPreview(): void;
|
|
294
|
+
/** @param {Event} event */
|
|
295
|
+
_onGridDateFocus(event: Event): void;
|
|
296
|
+
/**
|
|
297
|
+
* Hover candidate. `focusedDate` stays the keyboard target only: pointer
|
|
298
|
+
* hover never moves it, it just feeds the same projection.
|
|
299
|
+
* @param {Event} event
|
|
300
|
+
*/
|
|
301
|
+
_onGridPointerOver(event: Event): void;
|
|
302
|
+
_onGridPointerLeave(): void;
|
|
303
|
+
/** @param {EventTarget | null} target @returns {string} */
|
|
304
|
+
_cellDate(target: EventTarget | null): string;
|
|
305
|
+
/** @param {number} x @param {number} y @returns {string} */
|
|
306
|
+
_dateAtPoint(x: number, y: number): string;
|
|
307
|
+
/**
|
|
308
|
+
* Arm an endpoint drag. Only a complete, ordered range offers two distinct
|
|
309
|
+
* handles; a one-day range carries both markers on the same cell, and
|
|
310
|
+
* guessing which one the user meant would be worse than not dragging.
|
|
311
|
+
* @param {Event} event
|
|
312
|
+
*/
|
|
313
|
+
_onGridPointerDown(event: Event): void;
|
|
314
|
+
/** @param {Event} event */
|
|
315
|
+
_onGridPointerMove(event: Event): void;
|
|
316
|
+
/** @param {Event} event */
|
|
317
|
+
_onGridPointerUp(event: Event): void;
|
|
318
|
+
/** @param {Event} event */
|
|
319
|
+
_onGridPointerCancel(event: Event): void;
|
|
320
|
+
/** @param {number} pointerId */
|
|
321
|
+
_releaseDragCapture(pointerId: number): void;
|
|
322
|
+
/** Expose whether the band currently offers draggable handles, and whether
|
|
323
|
+
* one is being dragged, so the cursor can say so. */
|
|
324
|
+
_syncDragAffordance(): void;
|
|
239
325
|
/** @param {KeyboardEvent} event */
|
|
240
326
|
_onEscape(event: KeyboardEvent): void;
|
|
241
327
|
_syncCalendarOptions(): void;
|
|
@@ -246,25 +332,30 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
246
332
|
_refreshRangeButtonLabel(): void;
|
|
247
333
|
/** @param {string} value */
|
|
248
334
|
_reflectValue(value: string): void;
|
|
249
|
-
/** @param {string} value @param {{emit?:boolean,format?:boolean,reflect?:boolean}} [options] */
|
|
335
|
+
/** @param {string} value @param {{emit?:boolean,format?:boolean,reflect?:boolean,moveDisplay?:boolean}} [options] */
|
|
250
336
|
_setValue(value: string, options?: {
|
|
251
337
|
emit?: boolean;
|
|
252
338
|
format?: boolean;
|
|
253
339
|
reflect?: boolean;
|
|
340
|
+
moveDisplay?: boolean;
|
|
254
341
|
}): void;
|
|
255
342
|
/**
|
|
256
343
|
* Calendar-backed availability gate injected into the field controllers.
|
|
257
344
|
* A cancelled or failed source load confirms nothing: do not fill the
|
|
258
345
|
* submitted ISO field nor treat the date as available.
|
|
259
|
-
* @param {string} date @
|
|
346
|
+
* @param {string} date @param {{moveDisplay?: boolean}} [options]
|
|
347
|
+
* @returns {Promise<{ok: boolean, message?: string}>}
|
|
260
348
|
*/
|
|
261
|
-
_confirmDate(date: string
|
|
349
|
+
_confirmDate(date: string, options?: {
|
|
350
|
+
moveDisplay?: boolean;
|
|
351
|
+
}): Promise<{
|
|
262
352
|
ok: boolean;
|
|
263
353
|
message?: string;
|
|
264
354
|
}>;
|
|
265
|
-
/** @param {boolean} emit @param {{force?: boolean}} [options] */
|
|
355
|
+
/** @param {boolean} emit @param {{force?: boolean, moveDisplay?: boolean}} [options] */
|
|
266
356
|
_commitText(emit: boolean, options?: {
|
|
267
357
|
force?: boolean;
|
|
358
|
+
moveDisplay?: boolean;
|
|
268
359
|
}): Promise<boolean>;
|
|
269
360
|
/** @param {"start" | "end"} which */
|
|
270
361
|
_commitFieldText(which: "start" | "end"): Promise<boolean>;
|
|
@@ -284,8 +375,14 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
284
375
|
/** @param {"start" | "end"} which */
|
|
285
376
|
_boundCanonical(which: "start" | "end"): string;
|
|
286
377
|
_emitRangeChange(): void;
|
|
287
|
-
/**
|
|
288
|
-
*
|
|
378
|
+
/** Displayable projection of the business range. An inverted or start-less
|
|
379
|
+
* pair shows no misleading band. @returns {{start:string, end:string}} */
|
|
380
|
+
_displayRange(): {
|
|
381
|
+
start: string;
|
|
382
|
+
end: string;
|
|
383
|
+
};
|
|
384
|
+
/** Put the committed range back on the calendar band, dropping any
|
|
385
|
+
* projection currently shown over it. */
|
|
289
386
|
_syncHighlight(): void;
|
|
290
387
|
/**
|
|
291
388
|
* Cross-bound validity: the order error is attributed to the bound that was
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker.js"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAUtE,qBAAa,iBAAkB,SAAQ,WAAW;IA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;KACzE,QAoChB;IAED,gCAAgC;IAChC,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,SA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C,CACA,EADQ,CAAC,KAAK,EAAE,OAAO,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
|
@@ -51,13 +51,25 @@ export declare function startOfWeek(value: string, firstDay?: number): string;
|
|
|
51
51
|
/** @param {string} value @param {number} firstDay */
|
|
52
52
|
export declare function endOfWeek(value: string, firstDay?: number): string;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Civil weeks covering the anchor month: 4..6 full rows. Optional fixed weeks
|
|
55
|
+
* pads to six rows when a full extra week fits inside the canonical window.
|
|
55
56
|
* @param {string} value YYYY-MM or YYYY-MM-DD
|
|
56
|
-
* @param {{firstDay?: number}} [options]
|
|
57
|
+
* @param {{firstDay?: number, fixedWeeks?: boolean}} [options]
|
|
57
58
|
*/
|
|
58
59
|
export declare function getMonthWeeks(value: string, options?: {
|
|
59
60
|
firstDay?: number;
|
|
61
|
+
fixedWeeks?: boolean;
|
|
60
62
|
}): string[][];
|
|
63
|
+
/**
|
|
64
|
+
* Nearest month whose true civil weeks stay inside 0001-01-01..9999-12-31, so a
|
|
65
|
+
* grid can always be built. A month's covering weeks can reach a few days
|
|
66
|
+
* before or after it, so the earliest and latest displayable months depend on
|
|
67
|
+
* `firstDay`.
|
|
68
|
+
* @param {string} value YYYY-MM or YYYY-MM-DD
|
|
69
|
+
* @param {number} [firstDay]
|
|
70
|
+
* @returns {string} YYYY-MM
|
|
71
|
+
*/
|
|
72
|
+
export declare function clampDisplayMonth(value: string, firstDay?: number): string;
|
|
61
73
|
/** @param {string} value @param {string} [min] @param {string} [max] */
|
|
62
74
|
export declare function clampDate(value: string, min?: string, max?: string): string;
|
|
63
75
|
/** 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,EADN,MACM,UAGvC;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,KAAK,EADtB,MACsB,UAEjC;AAED,4BAA4B;AAC5B,wBAAgB,UAAU,CAAC,KAAK,EADpB,MACoB,UAI/B;AAED,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,KAAK,EADM,MACN,UAI9B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAF/B,MAE+B,UAKzC;AAED,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,KAAK,EADrB,MACqB,EAAE,QAAQ,GADT,MACa,UAG9C;AAED,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB,EAAE,QAAQ,GADP,MACW,UAE5C;AAED
|
|
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,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Q,GADP,MACW,UAE5C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAHxB,MAGwB,EAAE,OAAO,AAFzC,CAA4D,EAApD;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAEF,cAsBhD;AAaD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAJ5B,MAI4B,EAAE,QAAQ,AAH9C,CACA,EADQ,MAG0C,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/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { CalendarModel } from "./calendar-model.js";
|
|
2
|
+
export { getDefaultControlClasses, setDefaultControlClasses } from "./control-classes.js";
|
|
2
3
|
export * as dates from "./date.js";
|
|
3
4
|
export { DateCalendarElement } from "./date-calendar.js";
|
|
4
5
|
export { DatePickerElement } from "./date-picker.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/types/intl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl.d.ts","sourceRoot":"","sources":["../../src/intl.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"intl.d.ts","sourceRoot":"","sources":["../../src/intl.js"],"names":[],"mappings":"AA+BA,+BAA+B;AAC/B,wBAAgB,aAAa,CAAC,MAAM,AADhC,CAAwB,EAAhB,MAC6B,UAKxC;AAwBD,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"}
|
package/dist/types/source.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export declare function normalizeDateStates(payload: unknown): Map<string, Record<string, unknown>>;
|
|
8
8
|
/**
|
|
9
9
|
* Small fetch adapter for legacy/configUrl-like endpoints.
|
|
10
|
+
* Resolve and validate the URL immediately against the document or worker location.
|
|
10
11
|
* @param {string | URL} url
|
|
11
12
|
* @param {{map?:(payload:unknown)=>unknown, params?:(range:{start:string,end:string})=>Record<string,string>}} [options]
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/source.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,OAGgC,GAF9B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsBhD;AAED
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/source.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,OAGgC,GAF9B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsBhD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAH1B,MAAM,GAAG,GAGiB,EAAE,OAAO,AAF3C,CAAsH,EAA9G;IAAC,GAAG,CAAC,EAAC,CAAC,OAAO,EAAC,OAAO,KAAG,OAAO,CAAC;IAAC,MAAM,CAAC,EAAC,CAAC,KAAK,EAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAA,GAAG,EAAC,MAAM,CAAA;KAAC,KAAG,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,CAAA;CAE1D;IAc/C,wFAAwF;IAClF,IAAI,QADE;QAAC,KAAK,EAAC,MAAM,CAAC;QAAA,GAAG,EAAC,MAAM,CAAA;KAAC,YAAgB;QAAC,MAAM,CAAC,EAAC,WAAW,CAAA;KAAC;EAW7E"}
|