@golemui/gui-lit 1.2.0 → 1.2.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 +19 -0
- package/{accordion.element-BIgxl5e9.js → accordion.element-C9GzfKrY.js} +29 -30
- package/alert.element-CHn49Yaf.js +55 -0
- package/button.element-C9fHivSw.js +59 -0
- package/{calendar.element-Cv3RBphf.js → calendar.element-XkojKTJk.js} +30 -31
- package/checkbox.element-DU_tVMXu.js +66 -0
- package/currency.element-BmAH5KS_.js +73 -0
- package/date-picker.element-Bg3rF95F.js +94 -0
- package/{date-time-calendar.element-DlbWZjoe.js → date-time-calendar.element-sywQCeQQ.js} +24 -24
- package/date-time-picker.element-HHpwjWTQ.js +107 -0
- package/{date-time.element-CLLxM2nV.js → date-time.element-ucETvSTC.js} +26 -26
- package/{date.element-B8ZHK9KJ.js → date.element-BEHGxRFF.js} +27 -27
- package/default-list-item-renderer-CuPJ9jUD.js +24 -0
- package/{dropdown.element-DMZ7oL5n.js → dropdown.element-DUqG_p1x.js} +85 -84
- package/{flex.element-DG4Uaj_X.js → flex.element-pwba7621.js} +27 -28
- package/{grid.element-DCZsh-3J.js → grid.element-C8K7_Qi3.js} +29 -30
- package/index.js +1316 -3883
- package/index.umd.cjs +117 -2132
- package/{list.element-ADtUK2na.js → list.element-ZtEMKE2x.js} +41 -40
- package/markdown-text.element-DDm36qD0.js +54 -0
- package/markdown.element-DWz3U9rG.js +84 -0
- package/number.element-VkG5wScD.js +71 -0
- package/package.json +6 -6
- package/password.element-C5vQHq5P.js +72 -0
- package/radiogroup.element-CKdO9HwO.js +69 -0
- package/{range-calendar.element-D5eb2f7p.js → range-calendar.element-BznGrej5.js} +23 -24
- package/{range-date-input.element-C35grlYo.js → range-date-input.element-BloTHRDl.js} +24 -24
- package/range-date-picker.element-DKhwFasW.js +98 -0
- package/{range-date-time-calendar.element-BV0J96Gu.js → range-date-time-calendar.element-CZCET-sb.js} +26 -26
- package/{range-date-time-input.element-CzgRbR9F.js → range-date-time-input.element-Dr2VrYhG.js} +24 -24
- package/range-date-time-picker.element-CYeIMWLp.js +109 -0
- package/{range-time-input.element-BOHLUO8z.js → range-time-input.element-7OZhPQqx.js} +23 -23
- package/range-time-picker.element-D0mRFZkK.js +96 -0
- package/renderer.element-DbsFoBba.js +48 -0
- package/{repeater.element-Da8YN1Vy.js → repeater.element-DGEbwvhY.js} +54 -65
- package/select.element-Bb_9jAVB.js +76 -0
- package/{tabs.element-CvcIA8P3.js → tabs.element-BYDNF_pm.js} +49 -50
- package/tags.element-BSN3i9Gx.js +73 -0
- package/textarea.element-Dl1ZEOqO.js +71 -0
- package/textinput.element-C5Vbbkxq.js +68 -0
- package/{time-picker.element-C3oR0EkQ.js → time-picker.element-Crmj9YDy.js} +26 -26
- package/{time.element-X286nthD.js → time.element-DfSeAZp4.js} +29 -29
- package/toggle.element-ORsprZ2M.js +66 -0
- package/alert.element-DPWq9-0F.js +0 -56
- package/button.element-CJay43iR.js +0 -132
- package/calendar-DleRbmvP.js +0 -267
- package/checkbox.element-CpmrzdH0.js +0 -200
- package/currency.element-Cezgzbbs.js +0 -276
- package/date-DBuYpvcO.js +0 -849
- package/date-input-B3yHsn-g.js +0 -204
- package/date-picker.element-ByZefznr.js +0 -357
- package/date-time-calendar-CB5cNoOX.js +0 -374
- package/date-time-input-DrY68YDX.js +0 -246
- package/date-time-picker.element-CYwmumfq.js +0 -440
- package/day-status-ljexnwEO.js +0 -554
- package/errors-Bs_vYN-_.js +0 -110
- package/focus-leave.controller-2gV0pQd5.js +0 -73
- package/list-D730tmGN.js +0 -297
- package/markdown-text-X-BRJT6K.js +0 -30
- package/markdown-text.element-B8TfVLIO.js +0 -55
- package/markdown.element-D5zcxAUS.js +0 -693
- package/number.element-DEY5tR_y.js +0 -291
- package/numeric-jmOOKz30.js +0 -12
- package/one-of-anKkm7mD.js +0 -50
- package/part-templates-VORbpgs2.js +0 -691
- package/password.element-C1aQh_iz.js +0 -240
- package/pill-ranges-DpvWwP-3.js +0 -48
- package/pills-BDMO2NiR.js +0 -348
- package/popup.controller-B33OvX_y.js +0 -86
- package/radiogroup.element-B2G-XyGx.js +0 -235
- package/range-calendar-D7sG24Kx.js +0 -466
- package/range-commit-8-MmYUyo.js +0 -14
- package/range-date-input-BChaoBC1.js +0 -311
- package/range-date-picker.element-Do5YsL5V.js +0 -434
- package/range-date-time-calendar-DulGK2EQ.js +0 -734
- package/range-date-time-input-8ggqckP7.js +0 -353
- package/range-date-time-picker.element-hi5KdopZ.js +0 -472
- package/range-selection-CU3hxLJE.js +0 -25
- package/range-time-input-D7GFdDeA.js +0 -348
- package/range-time-picker.element-DDNQMA_u.js +0 -470
- package/renderer.element-CNyMn2Lu.js +0 -49
- package/select.element-SDxBhGjz.js +0 -266
- package/tabs-DzSCq_98.js +0 -13
- package/tags.element-Bnhfevp3.js +0 -369
- package/templates-Df7abEkB.js +0 -92
- package/textarea.element-Dx7eYEnl.js +0 -239
- package/textinput.element-BnIoDRmY.js +0 -205
- package/time-input-Kk4EX6at.js +0 -201
- package/time-list-DLcq8BAp.js +0 -217
- package/time-picker-DLj1rhOf.js +0 -299
- package/toggle.element-Dokdat_o.js +0 -203
|
@@ -1,470 +0,0 @@
|
|
|
1
|
-
import { InputWidgetAdapter as $, formContext as y, inputContext as v } from "@golemui/lit";
|
|
2
|
-
import { LitElement as g, html as m, nothing as T } from "lit";
|
|
3
|
-
import { property as a, query as _, state as c, customElement as b } from "lit/decorators.js";
|
|
4
|
-
import { classMap as f } from "lit/directives/class-map.js";
|
|
5
|
-
import "./range-time-input-D7GFdDeA.js";
|
|
6
|
-
import "./time-list-DLcq8BAp.js";
|
|
7
|
-
import { G as L } from "./popup.controller-B33OvX_y.js";
|
|
8
|
-
import { k as w, s as u, t as A } from "./part-templates-VORbpgs2.js";
|
|
9
|
-
import { a as S, b as k, c as I } from "./templates-Df7abEkB.js";
|
|
10
|
-
import { I as C, b as M, e as x } from "./date-DBuYpvcO.js";
|
|
11
|
-
import { consume as E, provide as P } from "@lit/context";
|
|
12
|
-
import "rxjs";
|
|
13
|
-
var O = Object.defineProperty, R = Object.getOwnPropertyDescriptor, i = (e, s, o, n) => {
|
|
14
|
-
for (var r = n > 1 ? void 0 : n ? R(s, o) : s, l = e.length - 1, p; l >= 0; l--)
|
|
15
|
-
(p = e[l]) && (r = (n ? p(s, o, r) : p(r)) || r);
|
|
16
|
-
return n && r && O(s, o, r), r;
|
|
17
|
-
};
|
|
18
|
-
let t = class extends g {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.icon = "", this.toggleAriaLabel = void 0, this.hourAriaLabel = void 0, this.minuteAriaLabel = void 0, this.dayPeriodAriaLabel = void 0, this.errors = [], this.showErrors = !0, this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.localeId = void 0, this.value = [], this.separator = void 0, this.removePillAriaLabel = void 0, this.startTimeAriaLabel = void 0, this.endTimeAriaLabel = void 0, this.startTimeLabel = void 0, this.endTimeLabel = void 0, this.hourFormat = void 0, this.minuteStep = void 0, this.minTime = void 0, this.maxTime = void 0, this.disabledRanges = void 0, this.allowCustomTime = !1, this.height = void 0, this.itemHeight = void 0, this.minTimeMessage = void 0, this.maxTimeMessage = void 0, this.rangeOrderMessage = void 0, this.disabledRangeMessage = void 0, this.noAvailableTimesMessage = void 0, this._workingIn = void 0, this._workingOut = void 0, this._popup = new L(this, {
|
|
21
|
-
focusRestoreSelector: "gui-range-time input, gui-range-time button",
|
|
22
|
-
focusPopupSelector: '.gui-time-list__option[tabindex="0"]',
|
|
23
|
-
isDisabled: () => !!this.disabled,
|
|
24
|
-
clickIntent: (e) => e.closest(".gui-time-list__option") ? "ignore" : e.closest(".gui-range-time-input__part") || e.closest(".gui-range-time-picker__panel") ? "open" : "toggle",
|
|
25
|
-
keyToggleMode: "openClose",
|
|
26
|
-
beforeOpen: (e) => {
|
|
27
|
-
this.querySelector(".gui-pills__dropdown") && e.suppressNextFocusOut(), this.closePillsDropdown();
|
|
28
|
-
},
|
|
29
|
-
onOpenChanged: (e) => {
|
|
30
|
-
e || (this._workingIn = void 0, this._workingOut = void 0);
|
|
31
|
-
}
|
|
32
|
-
}), this.onDropdownToggle = (e) => {
|
|
33
|
-
e.detail?.open && this._popup.open && this._popup.close();
|
|
34
|
-
}, this.onToggleClick = (e) => {
|
|
35
|
-
e.stopPropagation(), this._popup.open ? this._popup.close() : this._popup.openAndFocus();
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
createRenderRoot() {
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
super.connectedCallback(), this.addEventListener("dropdowntoggle", this.onDropdownToggle);
|
|
43
|
-
}
|
|
44
|
-
disconnectedCallback() {
|
|
45
|
-
super.disconnectedCallback(), this.removeEventListener("dropdowntoggle", this.onDropdownToggle);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Bounds for the "time out" list: undefined until an "in" is chosen. Once
|
|
49
|
-
* chosen, the floor is one slot after "in" so `out > in` strictly; when that
|
|
50
|
-
* spills past the end of the day, an empty (min > max) window yields the
|
|
51
|
-
* "no available times" message.
|
|
52
|
-
*/
|
|
53
|
-
get outListBounds() {
|
|
54
|
-
if (!this._workingIn) return { minTime: this.minTime, maxTime: this.maxTime };
|
|
55
|
-
const e = w(this._workingIn, this.minuteStep);
|
|
56
|
-
return e ? { minTime: e, maxTime: this.maxTime } : { minTime: "23:59:59", maxTime: "00:00:00" };
|
|
57
|
-
}
|
|
58
|
-
render() {
|
|
59
|
-
const e = S("rangeTimePicker", { icon: this.icon }), s = this.outListBounds, o = this.startTimeLabel ?? "Start time", n = this.endTimeLabel ?? "End time", r = this._popup.open ? m`<div
|
|
60
|
-
class="gui-range-time-picker__panel"
|
|
61
|
-
id=${`${this.uid}_popup`}
|
|
62
|
-
role="dialog"
|
|
63
|
-
aria-label=${this.label ?? "Time list"}
|
|
64
|
-
>
|
|
65
|
-
<div class="gui-range-time-picker__column">
|
|
66
|
-
<span class="gui-range-time-picker__column-label">${o}</span>
|
|
67
|
-
<gui-time-list
|
|
68
|
-
class="gui-range-time-picker__list"
|
|
69
|
-
.uid=${this.uid}
|
|
70
|
-
.label=${o}
|
|
71
|
-
.value=${this._workingIn}
|
|
72
|
-
.localeId=${this.localeId}
|
|
73
|
-
.hourFormat=${this.hourFormat}
|
|
74
|
-
.minuteStep=${this.minuteStep}
|
|
75
|
-
.minTime=${this.minTime}
|
|
76
|
-
.maxTime=${this.maxTime}
|
|
77
|
-
.disabledRanges=${this.disabledRanges}
|
|
78
|
-
.height=${this.height}
|
|
79
|
-
.itemHeight=${this.itemHeight}
|
|
80
|
-
.noAvailableTimesMessage=${this.noAvailableTimesMessage}
|
|
81
|
-
?readonly=${this.readOnly}
|
|
82
|
-
@change=${this.onInListChange}
|
|
83
|
-
></gui-time-list>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div class="gui-range-time-picker__column">
|
|
87
|
-
<span class="gui-range-time-picker__column-label">${n}</span>
|
|
88
|
-
<gui-time-list
|
|
89
|
-
class="gui-range-time-picker__list"
|
|
90
|
-
.uid=${this.uid}
|
|
91
|
-
.label=${n}
|
|
92
|
-
.value=${this._workingOut}
|
|
93
|
-
.localeId=${this.localeId}
|
|
94
|
-
.hourFormat=${this.hourFormat}
|
|
95
|
-
.minuteStep=${this.minuteStep}
|
|
96
|
-
.minTime=${s.minTime}
|
|
97
|
-
.maxTime=${s.maxTime}
|
|
98
|
-
.disabledRanges=${this.disabledRanges}
|
|
99
|
-
.height=${this.height}
|
|
100
|
-
.itemHeight=${this.itemHeight}
|
|
101
|
-
.noAvailableTimesMessage=${this.noAvailableTimesMessage}
|
|
102
|
-
?disabled=${!this._workingIn}
|
|
103
|
-
?readonly=${this.readOnly}
|
|
104
|
-
@change=${this.onOutListChange}
|
|
105
|
-
></gui-time-list>
|
|
106
|
-
</div>
|
|
107
|
-
</div>` : T;
|
|
108
|
-
return m`
|
|
109
|
-
${k(
|
|
110
|
-
this.uid ?? "",
|
|
111
|
-
{
|
|
112
|
-
label: this.label,
|
|
113
|
-
hint: this.hint,
|
|
114
|
-
required: this.required
|
|
115
|
-
},
|
|
116
|
-
!1,
|
|
117
|
-
void 0,
|
|
118
|
-
!1
|
|
119
|
-
)}
|
|
120
|
-
|
|
121
|
-
<div
|
|
122
|
-
class="gui-widget"
|
|
123
|
-
@keydown=${this._popup.onAnchorKeyDown}
|
|
124
|
-
@click=${this._popup.onAnchorClick}
|
|
125
|
-
>
|
|
126
|
-
<gui-range-time
|
|
127
|
-
id="time-input"
|
|
128
|
-
class=${f(e.widgetClasses)}
|
|
129
|
-
.uid=${this.uid}
|
|
130
|
-
.hint=${this.hint}
|
|
131
|
-
.showErrors=${!1}
|
|
132
|
-
.errors=${this.errors}
|
|
133
|
-
?touched=${this.touched}
|
|
134
|
-
?required=${this.required}
|
|
135
|
-
?disabled=${this.disabled}
|
|
136
|
-
?readonly=${this.readOnly}
|
|
137
|
-
.allowCustomTime=${this.allowCustomTime ?? !1}
|
|
138
|
-
.value=${this.value}
|
|
139
|
-
.icon=${this.icon}
|
|
140
|
-
.localeId=${this.localeId}
|
|
141
|
-
.separator=${this.separator}
|
|
142
|
-
.hourFormat=${this.hourFormat}
|
|
143
|
-
.minuteStep=${this.minuteStep}
|
|
144
|
-
.minTime=${this.minTime}
|
|
145
|
-
.maxTime=${this.maxTime}
|
|
146
|
-
.disabledRanges=${this.disabledRanges}
|
|
147
|
-
.minTimeMessage=${this.minTimeMessage}
|
|
148
|
-
.maxTimeMessage=${this.maxTimeMessage}
|
|
149
|
-
.rangeOrderMessage=${this.rangeOrderMessage}
|
|
150
|
-
.disabledRangeMessage=${this.disabledRangeMessage}
|
|
151
|
-
.removePillAriaLabel=${this.removePillAriaLabel}
|
|
152
|
-
.startTimeAriaLabel=${this.startTimeAriaLabel}
|
|
153
|
-
.endTimeAriaLabel=${this.endTimeAriaLabel}
|
|
154
|
-
.hourAriaLabel=${this.hourAriaLabel}
|
|
155
|
-
.minuteAriaLabel=${this.minuteAriaLabel}
|
|
156
|
-
.dayPeriodAriaLabel=${this.dayPeriodAriaLabel}
|
|
157
|
-
@blur=${this.onInputBlur}
|
|
158
|
-
@focus=${this._popup.show}
|
|
159
|
-
@change=${this.onInputChange}
|
|
160
|
-
@partsChange=${this.onPartsChange}
|
|
161
|
-
@pillClick=${this.onPillClick}
|
|
162
|
-
></gui-range-time>
|
|
163
|
-
<button
|
|
164
|
-
type="button"
|
|
165
|
-
class="gui-range-time-picker__arrow"
|
|
166
|
-
aria-label=${this.toggleAriaLabel ?? "Show time list"}
|
|
167
|
-
aria-haspopup="dialog"
|
|
168
|
-
aria-expanded=${this._popup.open ? "true" : "false"}
|
|
169
|
-
aria-controls=${`${this.uid}_popup`}
|
|
170
|
-
?disabled=${this.disabled}
|
|
171
|
-
@click=${this.onToggleClick}
|
|
172
|
-
>
|
|
173
|
-
<svg
|
|
174
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
175
|
-
width="16"
|
|
176
|
-
height="16"
|
|
177
|
-
viewBox="0 0 256 256"
|
|
178
|
-
aria-hidden="true"
|
|
179
|
-
>
|
|
180
|
-
<path
|
|
181
|
-
d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"
|
|
182
|
-
></path>
|
|
183
|
-
</svg>
|
|
184
|
-
</button>
|
|
185
|
-
|
|
186
|
-
${r}
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
${this.showErrors ? I(this.uid ?? "", { errors: this.errors, touched: this.touched }) : ""}
|
|
190
|
-
`;
|
|
191
|
-
}
|
|
192
|
-
onInputChange(e) {
|
|
193
|
-
e.stopPropagation(), this._workingIn = void 0, this._workingOut = void 0, this.commitValue(e.detail.value);
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Mirrors the input's live, in-bounds start/end into the two lists, so typing
|
|
197
|
-
* a value that exists as a slot highlights it (and a typed start enables and
|
|
198
|
-
* floors the end list) — the reverse of a list pick filling the fields.
|
|
199
|
-
*/
|
|
200
|
-
onPartsChange(e) {
|
|
201
|
-
e.stopPropagation(), this._workingIn = e.detail.start ?? void 0, this._workingOut = e.detail.end ?? void 0;
|
|
202
|
-
}
|
|
203
|
-
onInputBlur() {
|
|
204
|
-
this.dispatchEvent(new CustomEvent("blur"));
|
|
205
|
-
}
|
|
206
|
-
onInListChange(e) {
|
|
207
|
-
e.stopPropagation();
|
|
208
|
-
const s = e.detail.value;
|
|
209
|
-
this._workingIn = s ?? void 0, this._workingOut = void 0, s && this._inputRef?.fillGroup("start", s);
|
|
210
|
-
}
|
|
211
|
-
onOutListChange(e) {
|
|
212
|
-
e.stopPropagation();
|
|
213
|
-
const s = e.detail.value;
|
|
214
|
-
if (!this._workingIn || !s || !this._inputRef) return;
|
|
215
|
-
this._inputRef.fillGroup("end", s), this._inputRef.commitFromParts() ? (this._workingIn = void 0, this._workingOut = void 0, this.updateComplete.then(() => {
|
|
216
|
-
this._inListRef()?.scrollToSelectedValue?.();
|
|
217
|
-
})) : (this._popup.close(), this.dispatchEvent(new CustomEvent("blur")));
|
|
218
|
-
}
|
|
219
|
-
_inListRef() {
|
|
220
|
-
return this.querySelector(
|
|
221
|
-
".gui-range-time-picker__column:first-child gui-time-list"
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
commitValue(e) {
|
|
225
|
-
this.value = e ?? void 0;
|
|
226
|
-
const s = this.validateBounds(this.value);
|
|
227
|
-
this.dispatchEvent(
|
|
228
|
-
new CustomEvent("change", {
|
|
229
|
-
detail: { value: e ?? null },
|
|
230
|
-
bubbles: !0,
|
|
231
|
-
composed: !0
|
|
232
|
-
})
|
|
233
|
-
), s && this.dispatchEvent(
|
|
234
|
-
new CustomEvent("inputError", {
|
|
235
|
-
detail: { message: s },
|
|
236
|
-
bubbles: !0,
|
|
237
|
-
composed: !0
|
|
238
|
-
})
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
validateBounds(e) {
|
|
242
|
-
if (!e || e.length === 0) return null;
|
|
243
|
-
for (const s of e) {
|
|
244
|
-
for (const o of [s.start, s.end])
|
|
245
|
-
if (o) {
|
|
246
|
-
if (this.minTime && u(o, this.minTime) < 0)
|
|
247
|
-
return this.minTimeMessage ?? C;
|
|
248
|
-
if (this.maxTime && u(o, this.maxTime) > 0)
|
|
249
|
-
return this.maxTimeMessage ?? M;
|
|
250
|
-
}
|
|
251
|
-
if (A(s.start, s.end, this.disabledRanges))
|
|
252
|
-
return this.disabledRangeMessage ?? x;
|
|
253
|
-
}
|
|
254
|
-
return null;
|
|
255
|
-
}
|
|
256
|
-
onPillClick() {
|
|
257
|
-
this._popup.show();
|
|
258
|
-
}
|
|
259
|
-
closePillsDropdown() {
|
|
260
|
-
this.querySelector("gui-pills")?.closeDropdown?.();
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
i([
|
|
264
|
-
a({ type: String })
|
|
265
|
-
], t.prototype, "uid", 2);
|
|
266
|
-
i([
|
|
267
|
-
a({ type: String })
|
|
268
|
-
], t.prototype, "label", 2);
|
|
269
|
-
i([
|
|
270
|
-
a({ type: String })
|
|
271
|
-
], t.prototype, "hint", 2);
|
|
272
|
-
i([
|
|
273
|
-
a({ type: String })
|
|
274
|
-
], t.prototype, "icon", 2);
|
|
275
|
-
i([
|
|
276
|
-
a({ type: String, attribute: "toggle-aria-label" })
|
|
277
|
-
], t.prototype, "toggleAriaLabel", 2);
|
|
278
|
-
i([
|
|
279
|
-
a({ type: String })
|
|
280
|
-
], t.prototype, "hourAriaLabel", 2);
|
|
281
|
-
i([
|
|
282
|
-
a({ type: String })
|
|
283
|
-
], t.prototype, "minuteAriaLabel", 2);
|
|
284
|
-
i([
|
|
285
|
-
a({ type: String })
|
|
286
|
-
], t.prototype, "dayPeriodAriaLabel", 2);
|
|
287
|
-
i([
|
|
288
|
-
a({ type: Array })
|
|
289
|
-
], t.prototype, "errors", 2);
|
|
290
|
-
i([
|
|
291
|
-
a({ type: Boolean })
|
|
292
|
-
], t.prototype, "showErrors", 2);
|
|
293
|
-
i([
|
|
294
|
-
a({ type: Boolean })
|
|
295
|
-
], t.prototype, "touched", 2);
|
|
296
|
-
i([
|
|
297
|
-
a({ type: Boolean })
|
|
298
|
-
], t.prototype, "required", 2);
|
|
299
|
-
i([
|
|
300
|
-
a({ type: Boolean })
|
|
301
|
-
], t.prototype, "disabled", 2);
|
|
302
|
-
i([
|
|
303
|
-
a({ type: Boolean, attribute: "readonly" })
|
|
304
|
-
], t.prototype, "readOnly", 2);
|
|
305
|
-
i([
|
|
306
|
-
a({ type: String, attribute: "locale-id" })
|
|
307
|
-
], t.prototype, "localeId", 2);
|
|
308
|
-
i([
|
|
309
|
-
a({ type: Array })
|
|
310
|
-
], t.prototype, "value", 2);
|
|
311
|
-
i([
|
|
312
|
-
a({ type: String })
|
|
313
|
-
], t.prototype, "separator", 2);
|
|
314
|
-
i([
|
|
315
|
-
a({ type: String, attribute: "remove-pill-aria-label" })
|
|
316
|
-
], t.prototype, "removePillAriaLabel", 2);
|
|
317
|
-
i([
|
|
318
|
-
a({ type: String, attribute: "start-time-aria-label" })
|
|
319
|
-
], t.prototype, "startTimeAriaLabel", 2);
|
|
320
|
-
i([
|
|
321
|
-
a({ type: String, attribute: "end-time-aria-label" })
|
|
322
|
-
], t.prototype, "endTimeAriaLabel", 2);
|
|
323
|
-
i([
|
|
324
|
-
a({ type: String, attribute: "start-time-label" })
|
|
325
|
-
], t.prototype, "startTimeLabel", 2);
|
|
326
|
-
i([
|
|
327
|
-
a({ type: String, attribute: "end-time-label" })
|
|
328
|
-
], t.prototype, "endTimeLabel", 2);
|
|
329
|
-
i([
|
|
330
|
-
a({ type: String, attribute: "hour-format" })
|
|
331
|
-
], t.prototype, "hourFormat", 2);
|
|
332
|
-
i([
|
|
333
|
-
a({ type: Number, attribute: "minute-step" })
|
|
334
|
-
], t.prototype, "minuteStep", 2);
|
|
335
|
-
i([
|
|
336
|
-
a({ type: String, attribute: "min-time" })
|
|
337
|
-
], t.prototype, "minTime", 2);
|
|
338
|
-
i([
|
|
339
|
-
a({ type: String, attribute: "max-time" })
|
|
340
|
-
], t.prototype, "maxTime", 2);
|
|
341
|
-
i([
|
|
342
|
-
a({ type: Array, attribute: "disabled-ranges" })
|
|
343
|
-
], t.prototype, "disabledRanges", 2);
|
|
344
|
-
i([
|
|
345
|
-
a({ type: Boolean, attribute: "allow-custom-time" })
|
|
346
|
-
], t.prototype, "allowCustomTime", 2);
|
|
347
|
-
i([
|
|
348
|
-
a({ type: Number })
|
|
349
|
-
], t.prototype, "height", 2);
|
|
350
|
-
i([
|
|
351
|
-
a({ type: Number, attribute: "item-height" })
|
|
352
|
-
], t.prototype, "itemHeight", 2);
|
|
353
|
-
i([
|
|
354
|
-
a({ type: String, attribute: "min-time-message" })
|
|
355
|
-
], t.prototype, "minTimeMessage", 2);
|
|
356
|
-
i([
|
|
357
|
-
a({ type: String, attribute: "max-time-message" })
|
|
358
|
-
], t.prototype, "maxTimeMessage", 2);
|
|
359
|
-
i([
|
|
360
|
-
a({ type: String, attribute: "range-order-message" })
|
|
361
|
-
], t.prototype, "rangeOrderMessage", 2);
|
|
362
|
-
i([
|
|
363
|
-
a({ type: String, attribute: "disabled-range-message" })
|
|
364
|
-
], t.prototype, "disabledRangeMessage", 2);
|
|
365
|
-
i([
|
|
366
|
-
a({ type: String, attribute: "no-available-times-message" })
|
|
367
|
-
], t.prototype, "noAvailableTimesMessage", 2);
|
|
368
|
-
i([
|
|
369
|
-
_("#time-input")
|
|
370
|
-
], t.prototype, "_inputRef", 2);
|
|
371
|
-
i([
|
|
372
|
-
c()
|
|
373
|
-
], t.prototype, "_workingIn", 2);
|
|
374
|
-
i([
|
|
375
|
-
c()
|
|
376
|
-
], t.prototype, "_workingOut", 2);
|
|
377
|
-
t = i([
|
|
378
|
-
b("gui-range-time-picker")
|
|
379
|
-
], t);
|
|
380
|
-
typeof customElements < "u" && !customElements.get("gui-range-time-picker") && customElements.define("gui-range-time-picker", t);
|
|
381
|
-
var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, h = (e, s, o, n) => {
|
|
382
|
-
for (var r = n > 1 ? void 0 : n ? B(s, o) : s, l = e.length - 1, p; l >= 0; l--)
|
|
383
|
-
(p = e[l]) && (r = (n ? p(s, o, r) : p(r)) || r);
|
|
384
|
-
return n && r && D(s, o, r), r;
|
|
385
|
-
};
|
|
386
|
-
let d = class extends g {
|
|
387
|
-
constructor() {
|
|
388
|
-
super(...arguments), this.adapter = new $(), this.subscriptions = [];
|
|
389
|
-
}
|
|
390
|
-
createRenderRoot() {
|
|
391
|
-
return this;
|
|
392
|
-
}
|
|
393
|
-
updated(e) {
|
|
394
|
-
super.updated(e);
|
|
395
|
-
const s = this.adapter.templateData.size;
|
|
396
|
-
s ? this.style.flex = String(s) : this.style.removeProperty("flex");
|
|
397
|
-
}
|
|
398
|
-
connectedCallback() {
|
|
399
|
-
super.connectedCallback(), this.classList.add("gui-range-time-picker", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
400
|
-
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
render() {
|
|
404
|
-
super.render();
|
|
405
|
-
const e = this.adapter.templateData;
|
|
406
|
-
return m`
|
|
407
|
-
<gui-range-time-picker
|
|
408
|
-
.uid=${this.widget.uid}
|
|
409
|
-
.label=${e.label}
|
|
410
|
-
.hint=${e.hint}
|
|
411
|
-
.errors=${e.errors}
|
|
412
|
-
?touched=${e.touched}
|
|
413
|
-
?required=${e.validator?.required}
|
|
414
|
-
?disabled=${e.disabled}
|
|
415
|
-
?readonly=${e.readonly}
|
|
416
|
-
.value=${e.value}
|
|
417
|
-
.icon=${e.icon}
|
|
418
|
-
.localeId=${e.lang}
|
|
419
|
-
.toggleAriaLabel=${e.toggleAriaLabel}
|
|
420
|
-
.hourAriaLabel=${e.hourAriaLabel}
|
|
421
|
-
.minuteAriaLabel=${e.minuteAriaLabel}
|
|
422
|
-
.dayPeriodAriaLabel=${e.dayPeriodAriaLabel}
|
|
423
|
-
.separator=${e.separator}
|
|
424
|
-
.removePillAriaLabel=${e.removePillAriaLabel}
|
|
425
|
-
.startTimeAriaLabel=${e.startTimeAriaLabel}
|
|
426
|
-
.endTimeAriaLabel=${e.endTimeAriaLabel}
|
|
427
|
-
.startTimeLabel=${e.startTimeLabel}
|
|
428
|
-
.endTimeLabel=${e.endTimeLabel}
|
|
429
|
-
.hourFormat=${e.hourFormat}
|
|
430
|
-
.minuteStep=${e.minuteStep}
|
|
431
|
-
.minTime=${e.minTime}
|
|
432
|
-
.maxTime=${e.maxTime}
|
|
433
|
-
.disabledRanges=${e.disabledRanges}
|
|
434
|
-
?allow-custom-time=${e.allowCustomTime}
|
|
435
|
-
.height=${e.height}
|
|
436
|
-
.itemHeight=${e.itemHeight}
|
|
437
|
-
.minTimeMessage=${e.minTimeMessage}
|
|
438
|
-
.maxTimeMessage=${e.maxTimeMessage}
|
|
439
|
-
.rangeOrderMessage=${e.rangeOrderMessage}
|
|
440
|
-
.disabledRangeMessage=${e.disabledRangeMessage}
|
|
441
|
-
.noAvailableTimesMessage=${e.noAvailableTimesMessage}
|
|
442
|
-
@inputError=${this.onInputError}
|
|
443
|
-
@blur=${() => this.adapter.onBlur()}
|
|
444
|
-
@change=${this.valueChanged}
|
|
445
|
-
></gui-range-time-picker>
|
|
446
|
-
`;
|
|
447
|
-
}
|
|
448
|
-
valueChanged(e) {
|
|
449
|
-
this.adapter.injectValidationIssues(null), this.adapter.valueChanged(e.detail.value);
|
|
450
|
-
}
|
|
451
|
-
onInputError(e) {
|
|
452
|
-
this.adapter.injectValidationIssues([e.detail.message]);
|
|
453
|
-
}
|
|
454
|
-
disconnectedCallback() {
|
|
455
|
-
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
h([
|
|
459
|
-
E({ context: y }),
|
|
460
|
-
a({ attribute: !1 })
|
|
461
|
-
], d.prototype, "formContext", 2);
|
|
462
|
-
h([
|
|
463
|
-
P({ context: v })
|
|
464
|
-
], d.prototype, "adapter", 2);
|
|
465
|
-
d = h([
|
|
466
|
-
b("gui-range-time-picker-input")
|
|
467
|
-
], d);
|
|
468
|
-
export {
|
|
469
|
-
d as RangeTimePickerElement
|
|
470
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { DisplayWidgetAdapter as d, formContext as c, displayWidgetContext as l } from "@golemui/lit";
|
|
2
|
-
import { consume as u, provide as m } from "@lit/context";
|
|
3
|
-
import { LitElement as h, html as f } from "lit";
|
|
4
|
-
import { property as b, customElement as g } from "lit/decorators.js";
|
|
5
|
-
import "rxjs";
|
|
6
|
-
var x = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (r, e, a, s) => {
|
|
7
|
-
for (var t = s > 1 ? void 0 : s ? v(e, a) : e, o = r.length - 1, p; o >= 0; o--)
|
|
8
|
-
(p = r[o]) && (t = (s ? p(e, a, t) : p(t)) || t);
|
|
9
|
-
return s && t && x(e, a, t), t;
|
|
10
|
-
};
|
|
11
|
-
let i = class extends h {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
14
|
-
}
|
|
15
|
-
createRenderRoot() {
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
updated(r) {
|
|
19
|
-
super.updated(r);
|
|
20
|
-
const e = this.adapter.templateData.size;
|
|
21
|
-
e ? this.style.flex = String(e) : this.style.removeProperty("flex");
|
|
22
|
-
}
|
|
23
|
-
connectedCallback() {
|
|
24
|
-
super.connectedCallback(), this.classList.add("gui-renderer", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
25
|
-
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
return f`
|
|
30
|
-
<div class="gui-widget" id=${this.widget.uid}>${this.adapter.templateData.render}</div>
|
|
31
|
-
`;
|
|
32
|
-
}
|
|
33
|
-
disconnectedCallback() {
|
|
34
|
-
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((r) => r.unsubscribe());
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
n([
|
|
38
|
-
u({ context: c }),
|
|
39
|
-
b({ attribute: !1 })
|
|
40
|
-
], i.prototype, "formContext", 2);
|
|
41
|
-
n([
|
|
42
|
-
m({ context: l })
|
|
43
|
-
], i.prototype, "adapter", 2);
|
|
44
|
-
i = n([
|
|
45
|
-
g("gui-renderer-component")
|
|
46
|
-
], i);
|
|
47
|
-
export {
|
|
48
|
-
i as RendererElement
|
|
49
|
-
};
|