@golemui/gui-lit 1.1.0 → 1.1.1-rc.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/CHANGELOG.md +15 -0
- package/{button.element-3a7rRHbA.js → button.element-CJay43iR.js} +16 -13
- package/{calendar-BuJgwvZx.js → calendar-D31xNsxx.js} +72 -59
- package/{calendar.element-M5MPJmap.js → calendar.element-BhFrCsns.js} +22 -20
- package/{checkbox.element-CVskoXEc.js → checkbox.element-DAAVB651.js} +49 -49
- package/{currency.element-CfFrAtrr.js → currency.element-D8A2ObpM.js} +11 -10
- package/{date-Bj9mI3GU.js → date-DBuYpvcO.js} +35 -27
- package/{date-input-cJDkNnVw.js → date-input-DLiMreSS.js} +64 -44
- package/date-picker.element-DeUQtbLg.js +357 -0
- package/{date-time-calendar-BzRfkLKU.js → date-time-calendar-DzU-FtVl.js} +89 -76
- package/{date-time-calendar.element-DC4NK0y1.js → date-time-calendar.element-BLBcVsFu.js} +13 -11
- package/{date-time-input-BXxsfuyZ.js → date-time-input-DZaz2heD.js} +75 -43
- package/{date-time-picker.element-Dy-8cb-_.js → date-time-picker.element-BUbLdV6i.js} +125 -65
- package/{date-time.element-Bv4XdzMi.js → date-time.element-B5onfSBG.js} +31 -25
- package/{date.element-Consgsbb.js → date.element-BsKhLrEc.js} +22 -19
- package/{day-status-0-hJHrI7.js → day-status-CsWStVQV.js} +153 -129
- package/{dropdown.element-WsD61Qel.js → dropdown.element-CXpMwJsU.js} +19 -13
- package/{errors-QjKhr6mA.js → errors-Byb2dIhK.js} +3 -2
- package/index.js +1643 -1184
- package/index.umd.cjs +792 -399
- package/{list-CrLIL4by.js → list-D730tmGN.js} +115 -116
- package/{list.element-DV82YxnJ.js → list.element-eo3DIOrp.js} +2 -2
- package/{markdown.element-p-kC47D7.js → markdown.element-FbtwdnAv.js} +310 -218
- package/{number.element-CBr47IiY.js → number.element-BEpOCzXy.js} +76 -61
- package/package.json +6 -6
- package/{part-templates-Db871PS3.js → part-templates-VORbpgs2.js} +132 -118
- package/{password.element-n-R9RbkB.js → password.element-CBaB8h5b.js} +19 -17
- package/{pill-ranges-DCqDmpkk.js → pill-ranges-DpvWwP-3.js} +12 -12
- package/{pills-Be1UrLgq.js → pills-BDMO2NiR.js} +80 -58
- package/popup.controller-B33OvX_y.js +86 -0
- package/{radiogroup.element-CeQn623u.js → radiogroup.element-KWzBx8mx.js} +55 -51
- package/{range-calendar-CKPYeSGt.js → range-calendar-DO_woqcF.js} +101 -87
- package/{range-calendar.element-D6KYq18B.js → range-calendar.element-DHLZhpnj.js} +15 -13
- package/{range-date-input-D--AqBMv.js → range-date-input-Br7XqQPK.js} +90 -71
- package/{range-date-input.element-D4nIXJbw.js → range-date-input.element-BdD4SlB4.js} +15 -12
- package/{range-date-picker.element-dhxPAAE6.js → range-date-picker.element-DWRHiAoC.js} +97 -49
- package/{range-date-time-calendar-yksWrR7b.js → range-date-time-calendar-B3EMgN1E.js} +150 -136
- package/{range-date-time-calendar.element-C00aDefZ.js → range-date-time-calendar.element-Coea6RF4.js} +9 -7
- package/{range-date-time-input-B37TUoM3.js → range-date-time-input-Cu-T_nuC.js} +125 -94
- package/{range-date-time-input.element-DUnbv4ed.js → range-date-time-input.element-Cti44iuW.js} +31 -25
- package/{range-date-time-picker.element-Cbps6s_G.js → range-date-time-picker.element-CDN2RL1y.js} +107 -47
- package/{range-time-input-3lhqR1Ku.js → range-time-input-BP9ZL9O8.js} +85 -66
- package/{range-time-input.element-dU2iBdmJ.js → range-time-input.element-B7wtHJoQ.js} +14 -11
- package/{range-time-picker.element-v6nQsIPw.js → range-time-picker.element-CPIAiQPC.js} +92 -51
- package/{repeater.element-CtNgB4F5.js → repeater.element-BM1Keckd.js} +1 -1
- package/{select.element-C0V-Bv3L.js → select.element-eepcXTpL.js} +84 -78
- package/{tabs.element-BvAyI71N.js → tabs.element-CvcIA8P3.js} +1 -0
- package/{tags.element-DvwEpxpK.js → tags.element-CPHgotb0.js} +21 -14
- package/templates-Dmr34nwp.js +88 -0
- package/{textarea.element-HThYqdR_.js → textarea.element-CiNEy9uq.js} +8 -7
- package/{textinput.element-CkXNzMUg.js → textinput.element-AL2Nr768.js} +10 -9
- package/{time-input-BOhlBGJZ.js → time-input-5dkSm8UW.js} +67 -47
- package/{time-list-Czo48bZm.js → time-list-DLcq8BAp.js} +1 -1
- package/{time-picker-bFJ63ky8.js → time-picker-g337F8d0.js} +89 -51
- package/{time-picker.element-CYZVXgRS.js → time-picker.element-DLihegjg.js} +23 -19
- package/{time.element-fK3oLi49.js → time.element-BneqgMlQ.js} +22 -19
- package/{toggle.element-C1kCw5H8.js → toggle.element-Cz91CRdp.js} +44 -43
- package/date-picker.element-va_-LGZD.js +0 -312
- package/popup.controller-eUDxE6jD.js +0 -71
- package/templates-Dk1jxLwS.js +0 -75
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { LitElement as g, nothing as p, html as u } from "lit";
|
|
2
2
|
import { property as a, customElement as c } from "lit/decorators.js";
|
|
3
|
-
import { classMap as
|
|
4
|
-
import { styleMap as
|
|
5
|
-
import { G as b, b as f, c as D } from "./templates-
|
|
6
|
-
import { G as
|
|
7
|
-
import { c as
|
|
8
|
-
import { r as
|
|
9
|
-
import "./pills-
|
|
10
|
-
import { D as
|
|
11
|
-
var
|
|
12
|
-
for (var o =
|
|
13
|
-
(d =
|
|
14
|
-
return
|
|
3
|
+
import { classMap as y } from "lit/directives/class-map.js";
|
|
4
|
+
import { styleMap as v } from "lit-html/directives/style-map.js";
|
|
5
|
+
import { G as b, b as f, c as D } from "./templates-Dmr34nwp.js";
|
|
6
|
+
import { G as A, g as S, a as P, r as h, f as T, p as m, b as L, d as _, m as E, c as R, o as C, P as $ } from "./part-templates-VORbpgs2.js";
|
|
7
|
+
import { c as k } from "./range-commit-8-MmYUyo.js";
|
|
8
|
+
import { r as I, f as M, b as w, a as B, s as F } from "./pill-ranges-DpvWwP-3.js";
|
|
9
|
+
import "./pills-BDMO2NiR.js";
|
|
10
|
+
import { D as O } from "./date-DBuYpvcO.js";
|
|
11
|
+
var x = Object.defineProperty, G = Object.getOwnPropertyDescriptor, i = (e, r, l, s) => {
|
|
12
|
+
for (var o = s > 1 ? void 0 : s ? G(r, l) : r, n = e.length - 1, d; n >= 0; n--)
|
|
13
|
+
(d = e[n]) && (o = (s ? d(r, l, o) : d(o)) || o);
|
|
14
|
+
return s && o && x(r, l, o), o;
|
|
15
15
|
};
|
|
16
|
-
let
|
|
16
|
+
let t = class extends g {
|
|
17
17
|
constructor() {
|
|
18
|
-
super(...arguments), this.uid = void 0, this.label = void 0, this.localeId = void 0, this.errors = [], this.showErrors = !0, this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.icon = "", this.hint = void 0, this.hourFormat = void 0, this.minuteStep = 1, this.invalidDateMessage = void 0, this.value = [], this.removePillAriaLabel = void 0, this.startDateTimeAriaLabel = void 0, this.endDateTimeAriaLabel = void 0, this.separator = void 0, this.minDateTime = void 0, this.maxDateTime = void 0, this.minDateTimeMessage = void 0, this.maxDateTimeMessage = void 0, this.disabledRanges = void 0, this.disabledRangeMessage = void 0, this.inputBlockClass = "gui-range-date-time-input", this.groups = ["start", "end"], this._validationTriggered = !1, this._parts = new
|
|
18
|
+
super(...arguments), this.uid = void 0, this.label = void 0, this.localeId = void 0, this.errors = [], this.showErrors = !0, this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.icon = "", this.hint = void 0, this.dayAriaLabel = void 0, this.monthAriaLabel = void 0, this.yearAriaLabel = void 0, this.hourAriaLabel = void 0, this.minuteAriaLabel = void 0, this.dayPeriodAriaLabel = void 0, this.hourFormat = void 0, this.minuteStep = 1, this.invalidDateMessage = void 0, this.value = [], this.removePillAriaLabel = void 0, this.startDateTimeAriaLabel = void 0, this.endDateTimeAriaLabel = void 0, this.separator = void 0, this.minDateTime = void 0, this.maxDateTime = void 0, this.minDateTimeMessage = void 0, this.maxDateTimeMessage = void 0, this.disabledRanges = void 0, this.disabledRangeMessage = void 0, this.inputBlockClass = "gui-range-date-time-input", this.groups = ["start", "end"], this._validationTriggered = !1, this._parts = new A(this, {
|
|
19
19
|
blockClass: this.inputBlockClass,
|
|
20
20
|
groups: this.groups,
|
|
21
|
-
getDescriptor: (
|
|
21
|
+
getDescriptor: (e) => this.getPartDescriptor(e),
|
|
22
22
|
commitGroup: () => {
|
|
23
23
|
this._validationTriggered ? this.revalidate() : this.syncParts();
|
|
24
24
|
},
|
|
@@ -31,9 +31,9 @@ let e = class extends g {
|
|
|
31
31
|
},
|
|
32
32
|
getHourFormat: () => this.localeData.effectiveHourFormat,
|
|
33
33
|
getDayPeriodLabels: () => this.localeData.dayPeriodLabels,
|
|
34
|
-
onInputErrorSurfaced: (
|
|
35
|
-
onSurfacedErrorCleared: (
|
|
36
|
-
new CustomEvent("change", { detail: { value:
|
|
34
|
+
onInputErrorSurfaced: (e) => this.dispatchEvent(new CustomEvent("inputError", { detail: { message: e }, bubbles: !0 })),
|
|
35
|
+
onSurfacedErrorCleared: (e) => this.dispatchEvent(
|
|
36
|
+
new CustomEvent("change", { detail: { value: e }, bubbles: !0, composed: !0 })
|
|
37
37
|
)
|
|
38
38
|
}), this.ariaController = new b(this, {
|
|
39
39
|
getTargets: () => this.querySelectorAll(`.${this.inputBlockClass}`),
|
|
@@ -44,20 +44,21 @@ let e = class extends g {
|
|
|
44
44
|
errors: this.errors,
|
|
45
45
|
readonly: this.readOnly,
|
|
46
46
|
disabled: this.disabled,
|
|
47
|
-
touched: this.touched
|
|
47
|
+
touched: this.touched,
|
|
48
|
+
required: this.required
|
|
48
49
|
}
|
|
49
50
|
})
|
|
50
|
-
}), this.onPillRemoveEvent = (
|
|
51
|
+
}), this.onPillRemoveEvent = (e) => {
|
|
51
52
|
if (this.disabled || this.readOnly) return;
|
|
52
|
-
const
|
|
53
|
-
|
|
53
|
+
const r = I(this.value, e.detail.key);
|
|
54
|
+
r && (this.value = r.next, this.dispatchEvent(
|
|
54
55
|
new CustomEvent("change", { detail: { value: this.value }, bubbles: !0, composed: !0 })
|
|
55
|
-
),
|
|
56
|
+
), r.next.length === 0 && requestAnimationFrame(() => {
|
|
56
57
|
this.querySelector(".gui-range-date-time-input__field input")?.focus();
|
|
57
58
|
}));
|
|
58
|
-
}, this.onPillClickEvent = (
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
}, this.onPillClickEvent = (e) => {
|
|
60
|
+
const r = M(this.getSortedPills(), e.detail.key);
|
|
61
|
+
r && this.onPillClick(r);
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
createRenderRoot() {
|
|
@@ -67,16 +68,16 @@ let e = class extends g {
|
|
|
67
68
|
super.connectedCallback(), this.classList.add("gui-field");
|
|
68
69
|
}
|
|
69
70
|
get localeData() {
|
|
70
|
-
return
|
|
71
|
+
return S(this.localeId, this.hourFormat, this.minuteStep, !0);
|
|
71
72
|
}
|
|
72
|
-
getPartDescriptor(
|
|
73
|
-
return this.localeData.descriptors[
|
|
73
|
+
getPartDescriptor(e) {
|
|
74
|
+
return this.localeData.descriptors[e];
|
|
74
75
|
}
|
|
75
|
-
willUpdate(
|
|
76
|
-
(!this.hasUpdated ||
|
|
76
|
+
willUpdate(e) {
|
|
77
|
+
(!this.hasUpdated || e.has("hourFormat") || e.has("localeId")) && this._parts.seedDayPeriods();
|
|
77
78
|
}
|
|
78
79
|
render() {
|
|
79
|
-
const
|
|
80
|
+
const e = {
|
|
80
81
|
uid: this.uid,
|
|
81
82
|
label: this.label,
|
|
82
83
|
errors: this.errors,
|
|
@@ -86,25 +87,31 @@ let e = class extends g {
|
|
|
86
87
|
readonly: this.readOnly,
|
|
87
88
|
value: this.value,
|
|
88
89
|
hint: this.hint
|
|
89
|
-
},
|
|
90
|
+
}, r = {
|
|
90
91
|
blockClass: this.inputBlockClass,
|
|
91
92
|
groups: this.groups,
|
|
92
|
-
formatParts:
|
|
93
|
+
formatParts: P(this.localeId, this.localeData.effectiveHourFormat),
|
|
93
94
|
getDescriptor: (o) => this.getPartDescriptor(o),
|
|
94
95
|
getDisplayValue: this._parts.getPartDisplay,
|
|
95
|
-
|
|
96
|
+
getPartAriaLabel: (o, n) => ({
|
|
97
|
+
day: this.dayAriaLabel,
|
|
98
|
+
month: this.monthAriaLabel,
|
|
99
|
+
year: this.yearAriaLabel,
|
|
100
|
+
hour: this.hourAriaLabel,
|
|
101
|
+
minute: this.minuteAriaLabel
|
|
102
|
+
})[n] ?? $[n],
|
|
103
|
+
dayPeriodAriaLabel: this.dayPeriodAriaLabel,
|
|
96
104
|
disabled: this.disabled,
|
|
97
105
|
partsReadonly: !!this.readOnly
|
|
98
|
-
}, l =
|
|
106
|
+
}, l = w(
|
|
99
107
|
this.getSortedPills(),
|
|
100
|
-
(o) =>
|
|
101
|
-
|
|
102
|
-
), r = {
|
|
108
|
+
(o) => B(o, (n) => this.formatDateTimeForDisplay(n))
|
|
109
|
+
), s = {
|
|
103
110
|
"gui-widget-icon": !0,
|
|
104
111
|
[this.icon]: !!this.icon
|
|
105
112
|
};
|
|
106
113
|
return u`
|
|
107
|
-
${this.label ? f(this.uid,
|
|
114
|
+
${this.label ? f(this.uid, e, !1, void 0, !1) : p}
|
|
108
115
|
|
|
109
116
|
<div class="gui-widget">
|
|
110
117
|
<div
|
|
@@ -112,11 +119,17 @@ let e = class extends g {
|
|
|
112
119
|
role="group"
|
|
113
120
|
aria-label=${this.label ?? "Date-time range input"}
|
|
114
121
|
>
|
|
115
|
-
${this.icon ? u`<span
|
|
122
|
+
${this.icon ? u`<span
|
|
123
|
+
class=${y(s)}
|
|
124
|
+
data-icon=${this.icon}
|
|
125
|
+
aria-hidden="true"
|
|
126
|
+
></span>` : p}
|
|
116
127
|
|
|
117
128
|
<gui-pills
|
|
118
129
|
class="gui-range-date-time-input__pills"
|
|
119
|
-
style=${
|
|
130
|
+
style=${v(l.length ? {} : { "min-width": 0 })}
|
|
131
|
+
.uid=${this.uid}
|
|
132
|
+
.toolbarAriaLabel=${"Selected date-time ranges"}
|
|
120
133
|
.items=${l}
|
|
121
134
|
.removable=${!0}
|
|
122
135
|
.clickable=${!0}
|
|
@@ -135,7 +148,7 @@ let e = class extends g {
|
|
|
135
148
|
role="group"
|
|
136
149
|
aria-label=${this.startDateTimeAriaLabel ?? "Start date-time"}
|
|
137
150
|
>
|
|
138
|
-
${h("start",
|
|
151
|
+
${h("start", r, this._parts)}
|
|
139
152
|
</div>
|
|
140
153
|
|
|
141
154
|
<span class="gui-range-date-time-input__separator">${this.separator ?? "-"}</span>
|
|
@@ -145,27 +158,27 @@ let e = class extends g {
|
|
|
145
158
|
role="group"
|
|
146
159
|
aria-label=${this.endDateTimeAriaLabel ?? "End date-time"}
|
|
147
160
|
>
|
|
148
|
-
${h("end",
|
|
161
|
+
${h("end", r, this._parts)}
|
|
149
162
|
</div>
|
|
150
163
|
</div>
|
|
151
164
|
</div>
|
|
152
165
|
|
|
153
|
-
${this.showErrors && this.errors?.length ? D(this.uid,
|
|
166
|
+
${this.showErrors && this.errors?.length ? D(this.uid, e) : p}
|
|
154
167
|
</div>
|
|
155
168
|
`;
|
|
156
169
|
}
|
|
157
|
-
onPillClick(
|
|
170
|
+
onPillClick(e) {
|
|
158
171
|
this.dispatchEvent(
|
|
159
|
-
new CustomEvent("pillClick", { detail: { range:
|
|
172
|
+
new CustomEvent("pillClick", { detail: { range: e }, bubbles: !0, composed: !0 })
|
|
160
173
|
);
|
|
161
174
|
}
|
|
162
|
-
formatDateTimeForDisplay(
|
|
163
|
-
return
|
|
175
|
+
formatDateTimeForDisplay(e) {
|
|
176
|
+
return T(e, this.localeId, this.localeData.effectiveHourFormat);
|
|
164
177
|
}
|
|
165
178
|
getSortedPills() {
|
|
166
|
-
return
|
|
179
|
+
return F(
|
|
167
180
|
this.value,
|
|
168
|
-
(
|
|
181
|
+
(e, r) => m(e).getTime() - m(r).getTime()
|
|
169
182
|
);
|
|
170
183
|
}
|
|
171
184
|
/**
|
|
@@ -181,19 +194,19 @@ let e = class extends g {
|
|
|
181
194
|
* whether the 10th is allowed until 00:00 or 23:59, and independent date/time
|
|
182
195
|
* axes would wrongly reject Feb 11 08:00 for a `minTime` of 09:00.
|
|
183
196
|
*/
|
|
184
|
-
validateDateTimeParts(
|
|
185
|
-
const { effectiveHourFormat:
|
|
186
|
-
hourFormat:
|
|
197
|
+
validateDateTimeParts(e) {
|
|
198
|
+
const { effectiveHourFormat: r, descriptors: l } = this.localeData, { result: s, writeBacks: o } = L(this._parts.values[e] ?? {}, {
|
|
199
|
+
hourFormat: r,
|
|
187
200
|
descriptors: l,
|
|
188
201
|
invalidDateMessage: this.invalidDateMessage
|
|
189
202
|
});
|
|
190
|
-
if (this._parts.applyWriteBacks(
|
|
191
|
-
if (
|
|
192
|
-
const n =
|
|
203
|
+
if (this._parts.applyWriteBacks(e, o), s.kind === "incomplete") return { kind: "incomplete" };
|
|
204
|
+
if (s.kind === "invalid") return { kind: "invalid", message: s.message };
|
|
205
|
+
const n = _(s.iso, this.minDateTime, this.maxDateTime, {
|
|
193
206
|
minDateTimeMessage: this.minDateTimeMessage,
|
|
194
207
|
maxDateTimeMessage: this.maxDateTimeMessage
|
|
195
208
|
});
|
|
196
|
-
return n ? { kind: "invalid", message: n } : { kind: "valid", value:
|
|
209
|
+
return n ? { kind: "invalid", message: n } : { kind: "valid", value: s.iso };
|
|
197
210
|
}
|
|
198
211
|
/**
|
|
199
212
|
* Re-parses both endpoints so per-endpoint problems (impossible date-time,
|
|
@@ -211,16 +224,16 @@ let e = class extends g {
|
|
|
211
224
|
* Shared by the Enter commit and by {@link revalidate}.
|
|
212
225
|
*/
|
|
213
226
|
evaluateRange() {
|
|
214
|
-
const { start:
|
|
227
|
+
const { start: e, end: r } = this.syncParts(), l = k(e, r, this.value, {
|
|
215
228
|
// Date-time ranges are two instants: a backward selection reorders (swap)
|
|
216
229
|
// rather than erroring — mirroring the range calendar's date swap.
|
|
217
|
-
order: (
|
|
218
|
-
const n =
|
|
230
|
+
order: (s, o) => {
|
|
231
|
+
const n = C(s, o);
|
|
219
232
|
return { start: n.start, end: n.end };
|
|
220
233
|
},
|
|
221
|
-
validate: (
|
|
222
|
-
toRange: (
|
|
223
|
-
merge:
|
|
234
|
+
validate: (s) => R({ start: s.start, end: s.end }, this.disabledRanges) ? this.disabledRangeMessage ?? O : null,
|
|
235
|
+
toRange: (s) => ({ start: s.start, end: s.end }),
|
|
236
|
+
merge: E
|
|
224
237
|
});
|
|
225
238
|
return l.kind === "invalid" && this._parts.surfaceInputError(l.message), l.kind === "incomplete" && this._parts.clearSurfacedInputError(this.value ?? []), l;
|
|
226
239
|
}
|
|
@@ -235,88 +248,106 @@ let e = class extends g {
|
|
|
235
248
|
}
|
|
236
249
|
tryCreatePill() {
|
|
237
250
|
this._validationTriggered = !0;
|
|
238
|
-
const
|
|
239
|
-
|
|
251
|
+
const e = this.evaluateRange();
|
|
252
|
+
e.kind === "commit" && (this.value = e.value, this._validationTriggered = !1, this._parts.clearGroup("start"), this._parts.clearGroup("end"), this._parts.seedDayPeriods(), this._parts.resetSurfacedInputError(), this.dispatchEvent(
|
|
240
253
|
new CustomEvent("change", { detail: { value: this.value }, bubbles: !0, composed: !0 })
|
|
241
254
|
), this._parts.focusFirst("start"), this.requestUpdate());
|
|
242
255
|
}
|
|
243
256
|
};
|
|
244
257
|
i([
|
|
245
258
|
a({ type: String })
|
|
246
|
-
],
|
|
259
|
+
], t.prototype, "uid", 2);
|
|
247
260
|
i([
|
|
248
261
|
a({ type: String })
|
|
249
|
-
],
|
|
262
|
+
], t.prototype, "label", 2);
|
|
250
263
|
i([
|
|
251
264
|
a({ type: String, attribute: "locale-id" })
|
|
252
|
-
],
|
|
265
|
+
], t.prototype, "localeId", 2);
|
|
253
266
|
i([
|
|
254
267
|
a({ type: Array })
|
|
255
|
-
],
|
|
268
|
+
], t.prototype, "errors", 2);
|
|
256
269
|
i([
|
|
257
270
|
a({ type: Boolean })
|
|
258
|
-
],
|
|
271
|
+
], t.prototype, "showErrors", 2);
|
|
259
272
|
i([
|
|
260
273
|
a({ type: Boolean })
|
|
261
|
-
],
|
|
274
|
+
], t.prototype, "touched", 2);
|
|
262
275
|
i([
|
|
263
276
|
a({ type: Boolean })
|
|
264
|
-
],
|
|
277
|
+
], t.prototype, "required", 2);
|
|
265
278
|
i([
|
|
266
279
|
a({ type: Boolean })
|
|
267
|
-
],
|
|
280
|
+
], t.prototype, "disabled", 2);
|
|
268
281
|
i([
|
|
269
282
|
a({ type: Boolean, attribute: "readonly" })
|
|
270
|
-
],
|
|
283
|
+
], t.prototype, "readOnly", 2);
|
|
284
|
+
i([
|
|
285
|
+
a({ type: String })
|
|
286
|
+
], t.prototype, "icon", 2);
|
|
287
|
+
i([
|
|
288
|
+
a({ type: String })
|
|
289
|
+
], t.prototype, "hint", 2);
|
|
290
|
+
i([
|
|
291
|
+
a({ type: String })
|
|
292
|
+
], t.prototype, "dayAriaLabel", 2);
|
|
293
|
+
i([
|
|
294
|
+
a({ type: String })
|
|
295
|
+
], t.prototype, "monthAriaLabel", 2);
|
|
296
|
+
i([
|
|
297
|
+
a({ type: String })
|
|
298
|
+
], t.prototype, "yearAriaLabel", 2);
|
|
299
|
+
i([
|
|
300
|
+
a({ type: String })
|
|
301
|
+
], t.prototype, "hourAriaLabel", 2);
|
|
271
302
|
i([
|
|
272
303
|
a({ type: String })
|
|
273
|
-
],
|
|
304
|
+
], t.prototype, "minuteAriaLabel", 2);
|
|
274
305
|
i([
|
|
275
306
|
a({ type: String })
|
|
276
|
-
],
|
|
307
|
+
], t.prototype, "dayPeriodAriaLabel", 2);
|
|
277
308
|
i([
|
|
278
309
|
a({ type: String, attribute: "hour-format" })
|
|
279
|
-
],
|
|
310
|
+
], t.prototype, "hourFormat", 2);
|
|
280
311
|
i([
|
|
281
312
|
a({ type: Number, attribute: "minute-step" })
|
|
282
|
-
],
|
|
313
|
+
], t.prototype, "minuteStep", 2);
|
|
283
314
|
i([
|
|
284
315
|
a({ type: String, attribute: "invalid-date-message" })
|
|
285
|
-
],
|
|
316
|
+
], t.prototype, "invalidDateMessage", 2);
|
|
286
317
|
i([
|
|
287
318
|
a({ type: Array })
|
|
288
|
-
],
|
|
319
|
+
], t.prototype, "value", 2);
|
|
289
320
|
i([
|
|
290
321
|
a({ type: String })
|
|
291
|
-
],
|
|
322
|
+
], t.prototype, "removePillAriaLabel", 2);
|
|
292
323
|
i([
|
|
293
324
|
a({ type: String })
|
|
294
|
-
],
|
|
325
|
+
], t.prototype, "startDateTimeAriaLabel", 2);
|
|
295
326
|
i([
|
|
296
327
|
a({ type: String })
|
|
297
|
-
],
|
|
328
|
+
], t.prototype, "endDateTimeAriaLabel", 2);
|
|
298
329
|
i([
|
|
299
330
|
a({ type: String })
|
|
300
|
-
],
|
|
331
|
+
], t.prototype, "separator", 2);
|
|
301
332
|
i([
|
|
302
333
|
a({ type: String, attribute: "min-date-time" })
|
|
303
|
-
],
|
|
334
|
+
], t.prototype, "minDateTime", 2);
|
|
304
335
|
i([
|
|
305
336
|
a({ type: String, attribute: "max-date-time" })
|
|
306
|
-
],
|
|
337
|
+
], t.prototype, "maxDateTime", 2);
|
|
307
338
|
i([
|
|
308
339
|
a({ type: String, attribute: "min-date-time-message" })
|
|
309
|
-
],
|
|
340
|
+
], t.prototype, "minDateTimeMessage", 2);
|
|
310
341
|
i([
|
|
311
342
|
a({ type: String, attribute: "max-date-time-message" })
|
|
312
|
-
],
|
|
343
|
+
], t.prototype, "maxDateTimeMessage", 2);
|
|
313
344
|
i([
|
|
314
345
|
a({ type: Array, attribute: "disabled-ranges" })
|
|
315
|
-
],
|
|
346
|
+
], t.prototype, "disabledRanges", 2);
|
|
316
347
|
i([
|
|
317
348
|
a({ type: String, attribute: "disabled-range-message" })
|
|
318
|
-
],
|
|
319
|
-
|
|
349
|
+
], t.prototype, "disabledRangeMessage", 2);
|
|
350
|
+
t = i([
|
|
320
351
|
c("gui-range-date-time")
|
|
321
|
-
],
|
|
322
|
-
typeof customElements < "u" && !customElements.get("gui-range-date-time") && customElements.define("gui-range-date-time",
|
|
352
|
+
], t);
|
|
353
|
+
typeof customElements < "u" && !customElements.get("gui-range-date-time") && customElements.define("gui-range-date-time", t);
|
package/{range-date-time-input.element-DUnbv4ed.js → range-date-time-input.element-Cti44iuW.js}
RENAMED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
2
|
-
import "./range-date-time-input-
|
|
1
|
+
import { InputWidgetAdapter as m, formContext as n, inputContext as o } from "@golemui/lit";
|
|
2
|
+
import "./range-date-time-input-Cu-T_nuC.js";
|
|
3
3
|
import { consume as h, provide as u } from "@lit/context";
|
|
4
4
|
import { LitElement as D, html as c } from "lit";
|
|
5
|
-
import { property as
|
|
5
|
+
import { property as b, customElement as $ } from "lit/decorators.js";
|
|
6
6
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var a =
|
|
9
|
-
(l =
|
|
10
|
-
return
|
|
7
|
+
var g = Object.defineProperty, L = Object.getOwnPropertyDescriptor, d = (e, t, s, r) => {
|
|
8
|
+
for (var a = r > 1 ? void 0 : r ? L(t, s) : t, p = e.length - 1, l; p >= 0; p--)
|
|
9
|
+
(l = e[p]) && (a = (r ? l(t, s, a) : l(a)) || a);
|
|
10
|
+
return r && a && g(t, s, a), a;
|
|
11
11
|
};
|
|
12
|
-
let
|
|
12
|
+
let i = class extends D {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
14
|
+
super(...arguments), this.adapter = new m(), this.subscriptions = [];
|
|
15
15
|
}
|
|
16
16
|
createRenderRoot() {
|
|
17
17
|
return this;
|
|
18
18
|
}
|
|
19
|
-
updated(
|
|
20
|
-
super.updated(
|
|
21
|
-
const
|
|
22
|
-
|
|
19
|
+
updated(e) {
|
|
20
|
+
super.updated(e);
|
|
21
|
+
const t = this.adapter.templateData.size;
|
|
22
|
+
t ? this.style.flex = String(t) : this.style.removeProperty("flex");
|
|
23
23
|
}
|
|
24
24
|
connectedCallback() {
|
|
25
25
|
super.connectedCallback(), this.classList.add("gui-range-date-time", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
@@ -40,6 +40,12 @@ let r = class extends D {
|
|
|
40
40
|
?readonly=${this.adapter.templateData.readonly}
|
|
41
41
|
.value=${this.adapter.templateData.value}
|
|
42
42
|
.localeId=${this.adapter.templateData.lang}
|
|
43
|
+
.dayAriaLabel=${this.adapter.templateData.dayAriaLabel}
|
|
44
|
+
.monthAriaLabel=${this.adapter.templateData.monthAriaLabel}
|
|
45
|
+
.yearAriaLabel=${this.adapter.templateData.yearAriaLabel}
|
|
46
|
+
.hourAriaLabel=${this.adapter.templateData.hourAriaLabel}
|
|
47
|
+
.minuteAriaLabel=${this.adapter.templateData.minuteAriaLabel}
|
|
48
|
+
.dayPeriodAriaLabel=${this.adapter.templateData.dayPeriodAriaLabel}
|
|
43
49
|
.separator=${this.adapter.templateData.separator}
|
|
44
50
|
.removePillAriaLabel=${this.adapter.templateData.removePillAriaLabel}
|
|
45
51
|
.startDateTimeAriaLabel=${this.adapter.templateData.startDateTimeAriaLabel}
|
|
@@ -56,26 +62,26 @@ let r = class extends D {
|
|
|
56
62
|
></gui-range-date-time>
|
|
57
63
|
`;
|
|
58
64
|
}
|
|
59
|
-
valueChanged(
|
|
60
|
-
this.adapter.injectValidationIssues(null), this.adapter.valueChanged(
|
|
65
|
+
valueChanged(e) {
|
|
66
|
+
this.adapter.injectValidationIssues(null), this.adapter.valueChanged(e.detail.value);
|
|
61
67
|
}
|
|
62
|
-
onInputError(
|
|
63
|
-
this.adapter.injectValidationIssues([
|
|
68
|
+
onInputError(e) {
|
|
69
|
+
this.adapter.injectValidationIssues([e.detail.message]);
|
|
64
70
|
}
|
|
65
71
|
disconnectedCallback() {
|
|
66
|
-
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((
|
|
72
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
75
|
d([
|
|
70
|
-
h({ context:
|
|
71
|
-
|
|
72
|
-
],
|
|
76
|
+
h({ context: n }),
|
|
77
|
+
b({ attribute: !1 })
|
|
78
|
+
], i.prototype, "formContext", 2);
|
|
73
79
|
d([
|
|
74
80
|
u({ context: o })
|
|
75
|
-
],
|
|
76
|
-
|
|
81
|
+
], i.prototype, "adapter", 2);
|
|
82
|
+
i = d([
|
|
77
83
|
$("gui-range-date-time-input")
|
|
78
|
-
],
|
|
84
|
+
], i);
|
|
79
85
|
export {
|
|
80
|
-
|
|
86
|
+
i as RangeDateTimeInputElement
|
|
81
87
|
};
|