@lekoala/date-picker 0.5.2 → 0.5.3

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.
@@ -87,7 +87,8 @@ export class DatePickerElement extends HTMLElement {
87
87
  this._originalDescribedBy = "";
88
88
  this._rangeOriginalDescribedBy = ["", ""];
89
89
  this._formatHint = null;
90
- this._generatedPlaceholder = false;
90
+ /** Inputs whose placeholder was generated by this element. */
91
+ this._generatedPlaceholders = new WeakSet();
91
92
  this._controller = null;
92
93
  this._stopTracking = null;
93
94
  this._open = false;
@@ -114,6 +115,14 @@ export class DatePickerElement extends HTMLElement {
114
115
  return this.hasAttribute("range") && Boolean(this._range);
115
116
  }
116
117
 
118
+ /** A commit result may only be applied while this picker still owns the
119
+ * controller that produced it. Disconnect tears controllers down and
120
+ * reconnect builds new ones, so a previous instance can never write again.
121
+ * @param {DateFieldController} field */
122
+ _ownsField(field) {
123
+ return this._connected && (field === this._field || Boolean(this._fields?.includes(field)));
124
+ }
125
+
117
126
  connectedCallback() {
118
127
  if (this._connected) return;
119
128
  upgradeProperties(this, [
@@ -265,6 +274,7 @@ export class DatePickerElement extends HTMLElement {
265
274
  this._stopDefaultMessages?.();
266
275
  this._stopDefaultMessages = null;
267
276
  this._connected = false;
277
+ this._suppressFocusOpen = false;
268
278
  this.hide(false);
269
279
  this._controller?.abort();
270
280
  this._controller = null;
@@ -306,7 +316,20 @@ export class DatePickerElement extends HTMLElement {
306
316
 
307
317
  /** @param {string} name @param {string|null} oldValue @param {string|null} newValue */
308
318
  attributeChangedCallback(name, oldValue, newValue) {
309
- if (!this._connected || this._reflecting || oldValue === newValue) return;
319
+ if (this._reflecting || oldValue === newValue) return;
320
+ if (name === "value" && newValue && !isDate(newValue)) {
321
+ this._reflectValue(this._value);
322
+ return;
323
+ }
324
+ if ((name === "min" || name === "max") && newValue && !isDate(newValue)) {
325
+ this.removeAttribute(name);
326
+ if (this._connected) {
327
+ this._syncCalendarOptions();
328
+ void this.validate();
329
+ }
330
+ return;
331
+ }
332
+ if (!this._connected) return;
310
333
  if (name === "value") {
311
334
  if (this._rangeMode()) return;
312
335
  if (!newValue || isDate(newValue)) {
@@ -657,7 +680,7 @@ export class DatePickerElement extends HTMLElement {
657
680
  // Reset is cancelable and runs before native values have been restored.
658
681
  this.hide(false);
659
682
  queueMicrotask(() => {
660
- if (!event.defaultPrevented) restore();
683
+ if (!signal.aborted && !event.defaultPrevented) restore();
661
684
  });
662
685
  },
663
686
  { capture: true, signal },
@@ -720,7 +743,7 @@ export class DatePickerElement extends HTMLElement {
720
743
  // open-on-focus, where the popup is already open when Tab reaches the
721
744
  // button; Escape keeps closing it. Defer focus as in the input handler.
722
745
  if (event.detail === 0) {
723
- setTimeout(() => this._calendar?.focusGrid(), 0);
746
+ this._defer(() => this._calendar?.focusGrid());
724
747
  return;
725
748
  }
726
749
  this.hide(false);
@@ -746,7 +769,7 @@ export class DatePickerElement extends HTMLElement {
746
769
  // The app listener on <date-picker> runs after this during bubbling;
747
770
  // defer the commit so preventDefault() is actually respected.
748
771
  queueMicrotask(() => {
749
- if (custom.defaultPrevented || !this._connected) return;
772
+ if (signal.aborted || custom.defaultPrevented || !this._connected) return;
750
773
  // A grid pick that resolves after the popup closed, after a newer pick
751
774
  // or after a programmatic value must not overwrite it. A programmatic
752
775
  // calendar.activateDate() carries no intent and still commits.
@@ -834,7 +857,7 @@ export class DatePickerElement extends HTMLElement {
834
857
  const date = custom.detail?.date;
835
858
  if (!isDate(date)) return;
836
859
  queueMicrotask(() => {
837
- if (custom.defaultPrevented || !this._connected || !this._range) return;
860
+ if (signal.aborted || custom.defaultPrevented || !this._connected || !this._range) return;
838
861
  const intent = /** @type {PickIntent | undefined} */ (activationIntents.get(custom));
839
862
  // A response is dropped when the active endpoint changed, the popup
840
863
  // closed or a newer activation superseded this one.
@@ -917,7 +940,7 @@ export class DatePickerElement extends HTMLElement {
917
940
  // Keyboard activation of an already-open picker: switch the bound, then
918
941
  // move into the grid. Escape keeps closing it.
919
942
  this._activateRangeEndpoint(endpoint);
920
- setTimeout(() => this._calendar?.focusGrid(), 0);
943
+ this._defer(() => this._calendar?.focusGrid());
921
944
  return;
922
945
  }
923
946
  if (endpoint !== this._range?.activeEndpoint) {
@@ -940,7 +963,7 @@ export class DatePickerElement extends HTMLElement {
940
963
  if (this._open) {
941
964
  if (this._rangeMode() && endpoint) this._activateRangeEndpoint(endpoint);
942
965
  // Chromium drops script-initiated focus changes during keydown dispatch.
943
- setTimeout(() => this._calendar?.focusGrid(), 0);
966
+ this._defer(() => this._calendar?.focusGrid());
944
967
  return;
945
968
  }
946
969
  if (this._rangeMode()) this.show({ endpoint: endpoint || undefined });
@@ -958,7 +981,7 @@ export class DatePickerElement extends HTMLElement {
958
981
  if (this._open) {
959
982
  // Chromium drops script-initiated focus changes made during keydown
960
983
  // dispatch; defer to a macrotask so the grid can take keyboard focus.
961
- setTimeout(() => this._calendar?.focusGrid(), 0);
984
+ this._defer(() => this._calendar?.focusGrid());
962
985
  } else {
963
986
  this.show();
964
987
  }
@@ -1297,9 +1320,9 @@ export class DatePickerElement extends HTMLElement {
1297
1320
  this._fields[1].setLocale(this.locale);
1298
1321
  hint.textContent = `${this.messages.formatHint}: ${this._fields[0].placeholder}`;
1299
1322
  for (const [index, field] of this._fields.entries()) {
1300
- if (!field.input.hasAttribute("placeholder") || this._generatedPlaceholder) {
1323
+ if (!field.input.hasAttribute("placeholder") || this._generatedPlaceholders.has(field.input)) {
1301
1324
  field.input.placeholder = field.placeholder;
1302
- this._generatedPlaceholder = true;
1325
+ this._generatedPlaceholders.add(field.input);
1303
1326
  }
1304
1327
  const canonical = index === 1 ? this._range?.end || "" : this._range?.start || "";
1305
1328
  if (canonical) field.input.value = field.format(canonical);
@@ -1311,9 +1334,9 @@ export class DatePickerElement extends HTMLElement {
1311
1334
  if (!field) return;
1312
1335
  field.setLocale(this.locale);
1313
1336
  hint.textContent = `${this.messages.formatHint}: ${field.placeholder}`;
1314
- if (!field.input.hasAttribute("placeholder") || this._generatedPlaceholder) {
1337
+ if (!field.input.hasAttribute("placeholder") || this._generatedPlaceholders.has(field.input)) {
1315
1338
  field.input.placeholder = field.placeholder;
1316
- this._generatedPlaceholder = true;
1339
+ this._generatedPlaceholders.add(field.input);
1317
1340
  }
1318
1341
  if (this._value) field.input.value = field.format(this._value);
1319
1342
  this._refreshButtonLabel();
@@ -1408,6 +1431,9 @@ export class DatePickerElement extends HTMLElement {
1408
1431
  // current value against the latest constraints regardless of dirtiness.
1409
1432
  if (!options.force && !field.isDirty) return false;
1410
1433
  const result = await field.commit(options);
1434
+ if (!this._ownsField(field) || !field.isCommitCurrent(result.commitId)) {
1435
+ return false;
1436
+ }
1411
1437
  if (result.status === "stale" || result.status === "invalid") return false;
1412
1438
  this._setValue(result.value || "", {
1413
1439
  emit,
@@ -1425,6 +1451,7 @@ export class DatePickerElement extends HTMLElement {
1425
1451
  const field = fields[index];
1426
1452
  if (!field?.isDirty) return false;
1427
1453
  const result = await field.commit();
1454
+ if (!this._ownsField(field) || !field.isCommitCurrent(result.commitId)) return false;
1428
1455
  if (result.status === "stale") return false;
1429
1456
  if (result.status === "invalid") {
1430
1457
  this._orderTags.delete(index);
@@ -1580,6 +1607,17 @@ export class DatePickerElement extends HTMLElement {
1580
1607
  this._timeOrderOwned.clear();
1581
1608
  }
1582
1609
 
1610
+ /** Run a timer only while the connection that scheduled it remains active.
1611
+ * @param {() => void} callback */
1612
+ _defer(callback) {
1613
+ const controller = this._controller;
1614
+ setTimeout(() => {
1615
+ if (!this._connected || !controller || controller.signal.aborted || this._controller !== controller)
1616
+ return;
1617
+ callback();
1618
+ }, 0);
1619
+ }
1620
+
1583
1621
  _restoreDefault() {
1584
1622
  const field = this._field;
1585
1623
  if (!field) return;
@@ -1616,10 +1654,10 @@ export class DatePickerElement extends HTMLElement {
1616
1654
  const input = this._fields?.[index]?.input;
1617
1655
  if (!input) return;
1618
1656
  this._suppressFocusOpen = true;
1619
- setTimeout(() => {
1657
+ this._defer(() => {
1620
1658
  input.focus();
1621
1659
  this._suppressFocusOpen = false;
1622
- }, 0);
1660
+ });
1623
1661
  }
1624
1662
 
1625
1663
  /**
@@ -1633,10 +1671,10 @@ export class DatePickerElement extends HTMLElement {
1633
1671
  this._returnFocus = null;
1634
1672
  if (!(target instanceof HTMLElement) || !target.isConnected || target.matches(":disabled")) return;
1635
1673
  this._suppressFocusOpen = true;
1636
- setTimeout(() => {
1674
+ this._defer(() => {
1637
1675
  target.focus();
1638
1676
  this._suppressFocusOpen = false;
1639
- }, 0);
1677
+ });
1640
1678
  }
1641
1679
 
1642
1680
  /** @returns {"" | "start" | "end"} */
@@ -1665,6 +1703,7 @@ export class DatePickerElement extends HTMLElement {
1665
1703
  // Empty text flows through commit()'s "clear" outcome, not an early exit.
1666
1704
  for (const [index, field] of fields.entries()) {
1667
1705
  const result = await field.commit({ moveDisplay: false });
1706
+ if (!this._ownsField(field) || !field.isCommitCurrent(result.commitId)) continue;
1668
1707
  // A parse/source error replaced the order error, which no longer owns it.
1669
1708
  if (result.status === "invalid") this._orderTags.delete(index);
1670
1709
  if (result.status === "ok" || result.status === "clear") {
@@ -1677,7 +1716,19 @@ export class DatePickerElement extends HTMLElement {
1677
1716
  return fields.every((field) => field.input.checkValidity());
1678
1717
  }
1679
1718
  const input = this._field?.input;
1680
- if (!input) return true;
1719
+ if (!input) {
1720
+ const dateInputs = this.hasAttribute("range")
1721
+ ? this.querySelectorAll(":scope > input[data-range-start], :scope > input[data-range-end]")
1722
+ : this._input
1723
+ ? [this._input]
1724
+ : [];
1725
+ const timeInputs = this.querySelectorAll(
1726
+ ":scope > input[type=time][data-time-start], :scope > input[type=time][data-time-end]",
1727
+ );
1728
+ return [...dateInputs, ...timeInputs].every(
1729
+ (candidate) => candidate instanceof HTMLInputElement && candidate.checkValidity(),
1730
+ );
1731
+ }
1681
1732
  // Empty text flows through commit()'s "clear" outcome so the canonical
1682
1733
  // value and hidden ISO are cleared with it.
1683
1734
  await this._commitText(false, { force: true, moveDisplay: false });
@@ -1724,7 +1775,14 @@ export class DatePickerElement extends HTMLElement {
1724
1775
  });
1725
1776
  position();
1726
1777
  this._stopTracking = autoUpdate(this, panel, position);
1727
- if (options.moveFocus !== false) queueMicrotask(() => calendar.focusGrid());
1778
+ if (options.moveFocus !== false) {
1779
+ const controller = this._controller;
1780
+ queueMicrotask(() => {
1781
+ if (!this._connected || !controller || controller.signal.aborted || this._controller !== controller)
1782
+ return;
1783
+ calendar.focusGrid();
1784
+ });
1785
+ }
1728
1786
  this.dispatchEvent(new Event("open", { bubbles: true }));
1729
1787
  }
1730
1788
 
package/src/date.js CHANGED
@@ -42,8 +42,11 @@ export function monthKey(value) {
42
42
  const text = String(value || "");
43
43
  const monthMatch = MONTH_RE.exec(text);
44
44
  if (monthMatch) {
45
+ const year = Number(monthMatch[1]);
45
46
  const month = Number(monthMatch[2]);
46
- if (month >= 1 && month <= 12) return `${monthMatch[1]}-${String(month).padStart(2, "0")}`;
47
+ if (year >= 1 && year <= 9999 && month >= 1 && month <= 12) {
48
+ return `${monthMatch[1]}-${String(month).padStart(2, "0")}`;
49
+ }
47
50
  }
48
51
  const parsed = parseDate(text);
49
52
  if (!parsed) throw new TypeError(`Invalid civil date/month: ${value}`);
@@ -1,10 +0,0 @@
1
- /**
2
- * Package-internal: the host intent each activation event carries. A host
3
- * (`date-picker`) hands its intent to the next activation through
4
- * `_hostIntent`; `activateDate()` takes it synchronously and tags the events
5
- * it dispatches, so a late response is matched to its own interaction, never
6
- * to an earlier or later activation of the same date.
7
- * @type {WeakMap<Event, unknown>}
8
- */
9
- export declare const activationIntents: WeakMap<Event, unknown>;
10
- //# sourceMappingURL=activation-intents.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"activation-intents.d.ts","sourceRoot":"","sources":["../../src/activation-intents.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAFpB,OAAO,CAAC,KAAK,EAAE,OAAO,CAEc,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EADJ,aACI,QAgCf;IAED,sCAAsC;IACtC,MAAM,CAAC,IAAI,AADC,CAAuB,EAAf,OACF,QAqIjB;CACF"}
@@ -1,118 +0,0 @@
1
- /**
2
- * Whether the user may edit this input right now. `:disabled` is the effective
3
- * state: the `disabled` property misses a disabled ancestor `<fieldset>`.
4
- * @param {HTMLInputElement} input
5
- */
6
- export declare function isEditable(input: HTMLInputElement): boolean;
7
- /**
8
- * Owns a single editable form field inside a picker: the visible input, its
9
- * hidden canonical ISO field, the Intl adapter and the text commit pipeline
10
- * (parsing, availability gate, stale-response protection).
11
- *
12
- * It deliberately knows nothing about calendars, popups or ranges. Remote
13
- * availability is injected as an async `confirm(date)` callback and the
14
- * committed canonical value is applied by the coordinator, so all canonical
15
- * reflection and events stay at the picker level.
16
- */
17
- export declare class DateFieldController {
18
- input: HTMLInputElement;
19
- messages: Record<string, string>;
20
- adapter: {
21
- locale: string;
22
- placeholder: string;
23
- format(value: string): string;
24
- parse(text: string): string;
25
- };
26
- /** @type {HTMLInputElement | null} */
27
- hidden: HTMLInputElement | null;
28
- /** Current canonical value (YYYY-MM-DD or ""). */
29
- canonical: string;
30
- _dirty: boolean;
31
- _commitId: number;
32
- _originalName: string;
33
- /** @type {MutationObserver | null} */
34
- _attributeObserver: MutationObserver | null;
35
- /** @type {(() => void) | null} */
36
- onAttributesChanged: (() => void) | null;
37
- /**
38
- * Async availability gate for a parsed date. Returning `{ ok: false }`
39
- * marks the target unavailable. Swappable at runtime. The commit options
40
- * are forwarded so the gate can honor `moveDisplay`.
41
- * @type {((date: string, options?: {moveDisplay?: boolean}) => Promise<{ok: boolean, message?: string}>) | null}
42
- */
43
- confirm: ((date: string, options?: {
44
- moveDisplay?: boolean;
45
- }) => Promise<{
46
- ok: boolean;
47
- message?: string;
48
- }>) | null;
49
- /** Canonical value behind a `defaultValue` the enhancement generated, or null. @type {string | null} */
50
- _generatedDefault: string | null;
51
- /**
52
- * @param {HTMLInputElement} input
53
- * @param {{messages?: Record<string, string>, locale?: string}} [options]
54
- */
55
- constructor(input: HTMLInputElement, options?: {
56
- messages?: Record<string, string>;
57
- locale?: string;
58
- });
59
- /** @param {string} locale */
60
- setLocale(locale: string): void;
61
- /**
62
- * Make the current text the reset default when the author provided none.
63
- * Never redefine an author-provided `input.defaultValue`: the next reset must
64
- * use the native default (which the app may change).
65
- */
66
- adoptDefault(): void;
67
- /** @param {Record<string, string>} messages */
68
- setMessages(messages: Record<string, string>): void;
69
- /** @param {string} value */
70
- format(value: string): string;
71
- /** @param {string} text */
72
- parse(text: string): string;
73
- get placeholder(): string;
74
- get isDisabled(): boolean;
75
- get isReadOnly(): boolean;
76
- /** Create the hidden canonical field for an authored `name` and observe the
77
- * input for dynamic name/form/disabled changes. */
78
- setupFormValue(): void;
79
- /** Sync the hidden field with the current dynamic attributes. */
80
- syncInputState(): void;
81
- /** Invalidate any pending (possibly in-flight) commit. */
82
- dirty(): void;
83
- /** Whether the user edited the visible text since the last application. */
84
- get isDirty(): boolean;
85
- /** Live text input: the raw text no longer matches the canonical value, so
86
- * the hidden ISO must not submit it. A text that formats back to the current
87
- * canonical value (e.g. re-applied by a calendar pick) keeps the ISO value
88
- * valid; invalidating in-flight commits first still drops stale async work. */
89
- handleInput(): void;
90
- /**
91
- * Commit the visible text. Returns the parsed canonical date on success, the
92
- * empty string on a clear, or a falsy marker for invalid/stale commits. The
93
- * caller applies the canonical value so reflection and events stay central.
94
- * `options` is forwarded to the `confirm` gate so a revalidation can ask it
95
- * not to move the calendar display (source reloads must not re-home it).
96
- * @param {{moveDisplay?: boolean}} [options]
97
- * @returns {Promise<{status: "ok" | "clear" | "invalid" | "stale", value?: string}>}
98
- */
99
- commit(options?: {
100
- moveDisplay?: boolean;
101
- }): Promise<{
102
- status: "ok" | "clear" | "invalid" | "stale";
103
- value?: string;
104
- }>;
105
- /**
106
- * @param {string} value
107
- * @param {{format?: boolean}} [options]
108
- */
109
- setCanonical(value: string, options?: {
110
- format?: boolean;
111
- }): void;
112
- /** Restore value from `input.defaultValue` (native form reset). */
113
- restoreDefault(): string;
114
- /** Remove the hidden field and attribute observer, restoring the original
115
- * authored `name` on the visible input. */
116
- teardown(): void;
117
- }
118
- //# sourceMappingURL=date-field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-field.d.ts","sourceRoot":"","sources":["../../src/date-field.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAFrB,gBAEqB,WAE/B;AAED;;;;;;;;;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;;;;;OAKG;IACE,OAAO,EAFF,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAC,KAAK,OAAO,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC,GAAG,IAAI;IAGhH,wGAAwG;IACnG,iBAAiB,EADiE,MAAM,GAAG,IAAI;IA1BtG;;;OAGG;IACH,YAAY,KAAK,EAHN,gBAGM,EAAE,OAAO,AAFvB,CAAuE,EAA/D;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAE/B,EAwB9B;IAED,6BAA6B;IAC7B,SAAS,CAAC,MAAM,EADJ,MACI,QAUf;IAED;;;;OAIG;IACH,YAAY,SAKX;IAED,+CAA+C;IAC/C,WAAW,CA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,KAAK,CAShC;CACF"}
@@ -1,8 +0,0 @@
1
- /** Civil time check for canonical `input[type=time]` values. @param {string} value */
2
- export declare function isTime(value: string): boolean;
3
- /**
4
- * Compare two canonical time values. `09:30` equals `09:30:00`.
5
- * @param {string} a @param {string} b
6
- */
7
- export declare function compareTimes(a: string, b: string): -1 | 0 | 1;
8
- //# sourceMappingURL=time.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/time.js"],"names":[],"mappings":"AAkBA,sFAAsF;AACtF,wBAAgB,MAAM,CAAC,KAAK,EAD0C,MAC1C,WAE3B;AAOD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAFnB,MAEmB,EAAE,CAAC,EAFJ,MAEI,cAMhC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Replay properties assigned before custom-element definition through their setters.
3
- * Call only once the element is ready to accept the listed properties.
4
- * @param {HTMLElement} element
5
- * @param {string[]} properties
6
- */
7
- export declare function upgradeProperties(element: HTMLElement, properties: string[]): void;
8
- //# sourceMappingURL=upgrade-properties.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upgrade-properties.d.ts","sourceRoot":"","sources":["../../src/upgrade-properties.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,WAG8B,EAAE,UAAU,EAF1C,MAAM,EAEoC,QAOpD"}