@nysds/nys-datepicker 1.23.0 → 1.23.2
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/dist/nys-datepicker.d.ts
CHANGED
|
@@ -202,6 +202,7 @@ export declare class NysDatepicker extends NysFormControlElement {
|
|
|
202
202
|
connectedCallback(): void;
|
|
203
203
|
disconnectedCallback(): void;
|
|
204
204
|
firstUpdated(): Promise<void>;
|
|
205
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
205
206
|
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
206
207
|
private _whenWcDatepickerReady;
|
|
207
208
|
/**
|
package/dist/nys-datepicker.js
CHANGED
|
@@ -10,13 +10,13 @@ import "@nysds/nys-button";
|
|
|
10
10
|
* █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
|
|
11
11
|
* █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
|
|
12
12
|
*
|
|
13
|
-
* Datepicker Component v1.23.
|
|
13
|
+
* Datepicker Component v1.23.2
|
|
14
14
|
* Part of the New York State Design System
|
|
15
15
|
* Repository: https://github.com/its-hcd/nysds
|
|
16
16
|
* License: MIT
|
|
17
17
|
*/
|
|
18
18
|
/*!
|
|
19
|
-
* New York State Design System v1.23.
|
|
19
|
+
* New York State Design System v1.23.2
|
|
20
20
|
* Description: A design system for New York State's digital products.
|
|
21
21
|
* Repository: https://github.com/its-hcd/nysds
|
|
22
22
|
* License: MIT
|
|
@@ -1129,6 +1129,13 @@ const f = (M = class extends tt {
|
|
|
1129
1129
|
async firstUpdated() {
|
|
1130
1130
|
this._setValue(this.value), !(this._shouldUseNativeDatepicker() || !await this._whenWcDatepickerReady()) && (setTimeout(() => this._replaceButtonSVG(), 0), setTimeout(() => this._addMonthDropdownIcon(), 0), setTimeout(() => this._handleDateChange(), 0), setTimeout(() => this._onDocumentClick(), 0));
|
|
1131
1131
|
}
|
|
1132
|
+
// Normalize `value` and derive the required message before rendering, not
|
|
1133
|
+
// after, so the writes _setValue()/_manageRequire() make in updated() are
|
|
1134
|
+
// no-ops and Lit doesn't schedule a second update
|
|
1135
|
+
// (see lit.dev/msg/change-in-update).
|
|
1136
|
+
willUpdate(e) {
|
|
1137
|
+
super.willUpdate(e), e.has("value") && (this.value ? typeof this.value == "string" && (this.value = this._parseLocalDate(this.value)) : this.value = void 0), (!this.hasUpdated || e.has("value") || e.has("required")) && (this.internalValidationMessage = this.required && !this.value ? "This field is required." : "");
|
|
1138
|
+
}
|
|
1132
1139
|
updated(e) {
|
|
1133
1140
|
if (super.updated(e), e.has("value")) {
|
|
1134
1141
|
const a = e.get("value"), s = this.value;
|