@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,23 +1,23 @@
|
|
|
1
1
|
import { LitElement as f, nothing as l, html as h } from "lit";
|
|
2
|
-
import { property as
|
|
3
|
-
import { classMap as
|
|
4
|
-
import { G as k } from "./templates-
|
|
5
|
-
import { G as w, a as
|
|
6
|
-
import { G as
|
|
7
|
-
import "./pills-
|
|
8
|
-
import "./time-picker-
|
|
9
|
-
import { p, t as m, i as O, D as v } from "./date-
|
|
10
|
-
import { r as x, f as
|
|
11
|
-
import { i as
|
|
12
|
-
import { p as
|
|
13
|
-
var
|
|
14
|
-
for (var o = i > 1 ? void 0 : i ?
|
|
2
|
+
import { property as n, state as g, customElement as S } from "lit/decorators.js";
|
|
3
|
+
import { classMap as p } from "lit/directives/class-map.js";
|
|
4
|
+
import { G as k } from "./templates-Dmr34nwp.js";
|
|
5
|
+
import { G as w, a as $, r as R, b as I, c as M, d as L, e as E } from "./day-status-CsWStVQV.js";
|
|
6
|
+
import { G as C } from "./focus-leave.controller-2gV0pQd5.js";
|
|
7
|
+
import "./pills-BDMO2NiR.js";
|
|
8
|
+
import "./time-picker-g337F8d0.js";
|
|
9
|
+
import { p as c, t as m, i as O, g as A, D as v } from "./date-DBuYpvcO.js";
|
|
10
|
+
import { r as x, f as P, b as B, s as F } from "./pill-ranges-DpvWwP-3.js";
|
|
11
|
+
import { i as G, s as N, r as y } from "./range-selection-CU3hxLJE.js";
|
|
12
|
+
import { p as Y, e as D, f as _, i as q, o as U, c as H, m as K, d as j, h as V, j as b, k as W, l as T } from "./part-templates-VORbpgs2.js";
|
|
13
|
+
var z = Object.defineProperty, J = Object.getOwnPropertyDescriptor, r = (e, t, a, i) => {
|
|
14
|
+
for (var o = i > 1 ? void 0 : i ? J(t, a) : t, d = e.length - 1, u; d >= 0; d--)
|
|
15
15
|
(u = e[d]) && (o = (i ? u(t, a, o) : u(o)) || o);
|
|
16
|
-
return i && o &&
|
|
16
|
+
return i && o && z(t, a, o), o;
|
|
17
17
|
};
|
|
18
18
|
let s = class extends f {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = void 0, this.errors = [], this.touched = void 0, this.required = !1, this.disabled = !1, this.readOnly = !1, this.prevMonthIcon = "", this.nextMonthIcon = "", this.prevMonthAriaLabel = "", this.nextMonthAriaLabel = "", this.dayFormat = "numeric", this.weekdayFormat = "narrow", this.monthFormat = "long", this.minDate = void 0, this.maxDate = void 0, this.disabledRanges = void 0, this.numberOfMonths = 1, this.value = [], this.focusDate = void 0, this.hidePills = !1, this.removePillAriaLabel = void 0, this.disabledDateRangeMessage = void 0, this.invalidRange = null, this.hourFormat = void 0, this.minuteStep = void 0, this.allowCustomTime = !1, this.startTimeLabel = void 0, this.endTimeLabel = void 0, this.minDateTime = void 0, this.maxDateTime = void 0, this.minDateTimeMessage = void 0, this.maxDateTimeMessage = void 0, this.disabledRangeMessage = void 0, this.noAvailableTimesMessage = void 0, this.dayCountAriaLabel = void 0, this.disabledDayCountAriaLabel = void 0, this._selection =
|
|
20
|
+
super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = void 0, this.errors = [], this.touched = void 0, this.required = !1, this.disabled = !1, this.readOnly = !1, this.prevMonthIcon = "", this.nextMonthIcon = "", this.prevMonthAriaLabel = "", this.nextMonthAriaLabel = "", this.selectYearAriaLabel = void 0, this.yearGridAriaLabel = void 0, this.dayFormat = "numeric", this.weekdayFormat = "narrow", this.monthFormat = "long", this.minDate = void 0, this.maxDate = void 0, this.disabledRanges = void 0, this.numberOfMonths = 1, this.value = [], this.focusDate = void 0, this.hidePills = !1, this.removePillAriaLabel = void 0, this.disabledDateRangeMessage = void 0, this.invalidRange = null, this.hourFormat = void 0, this.minuteStep = void 0, this.allowCustomTime = !1, this.startTimeLabel = void 0, this.endTimeLabel = void 0, this.minDateTime = void 0, this.maxDateTime = void 0, this.minDateTimeMessage = void 0, this.maxDateTimeMessage = void 0, this.disabledRangeMessage = void 0, this.noAvailableTimesMessage = void 0, this.dayCountAriaLabel = void 0, this.disabledDayCountAriaLabel = void 0, this._selection = G(), this._invalidRange = null, this._workingDateStart = void 0, this._workingDateEnd = void 0, this._workingTimeIn = void 0, this._workingTimeOut = void 0, this._openList = null, this._skipValueNavigation = !1, this._nav = new w(this, {
|
|
21
21
|
getMinDate: () => this.minDate,
|
|
22
22
|
getMaxDate: () => this.maxDate,
|
|
23
23
|
getNumberOfMonths: () => this.numberOfMonths,
|
|
@@ -32,10 +32,11 @@ let s = class extends f {
|
|
|
32
32
|
errors: this.errors,
|
|
33
33
|
readonly: this.readOnly,
|
|
34
34
|
disabled: this.disabled,
|
|
35
|
-
touched: this.touched
|
|
35
|
+
touched: this.touched,
|
|
36
|
+
required: this.required
|
|
36
37
|
}
|
|
37
38
|
})
|
|
38
|
-
}), this._keyboard = new
|
|
39
|
+
}), this._keyboard = new $(this, {
|
|
39
40
|
canGoPrev: () => this._nav.canGoPrev(),
|
|
40
41
|
canGoNext: () => this._nav.canGoNext(),
|
|
41
42
|
goPrev: () => this._nav.prevMonth(),
|
|
@@ -44,7 +45,7 @@ let s = class extends f {
|
|
|
44
45
|
onSelectYear: (e) => this._nav.selectYear(e),
|
|
45
46
|
onCloseYearGrid: () => this._nav.closeYearSelector(),
|
|
46
47
|
isYearGridOpen: () => this._nav.yearSelectorOpen
|
|
47
|
-
}), this._focusLeave = new
|
|
48
|
+
}), this._focusLeave = new C(this, {
|
|
48
49
|
onLeave: () => this.dispatchEvent(new CustomEvent("blur", { bubbles: !0, composed: !0 }))
|
|
49
50
|
}), this.onPillRemoveEvent = (e) => {
|
|
50
51
|
if (this.disabled || this.readOnly) return;
|
|
@@ -57,7 +58,7 @@ let s = class extends f {
|
|
|
57
58
|
})
|
|
58
59
|
));
|
|
59
60
|
}, this.onPillClickEvent = (e) => {
|
|
60
|
-
const t =
|
|
61
|
+
const t = P(this.getSortedPills(), e.detail.key);
|
|
61
62
|
t && this.navigateToDate(t.start);
|
|
62
63
|
};
|
|
63
64
|
}
|
|
@@ -80,14 +81,14 @@ let s = class extends f {
|
|
|
80
81
|
* time, so two ranges on the same day still sort by time.
|
|
81
82
|
*/
|
|
82
83
|
parseEndpoint(e) {
|
|
83
|
-
return
|
|
84
|
+
return Y(e);
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
87
|
* Midnight-truncated calendar day of an endpoint, used to highlight the day
|
|
87
88
|
* grid.
|
|
88
89
|
*/
|
|
89
90
|
endpointDay(e) {
|
|
90
|
-
return
|
|
91
|
+
return c(e.split("T")[0]);
|
|
91
92
|
}
|
|
92
93
|
/** Pill text for one committed range. */
|
|
93
94
|
formatPillLabel(e) {
|
|
@@ -98,8 +99,8 @@ let s = class extends f {
|
|
|
98
99
|
get workingRange() {
|
|
99
100
|
if (!(!this._workingDateStart || !this._workingDateEnd))
|
|
100
101
|
return {
|
|
101
|
-
start:
|
|
102
|
-
end:
|
|
102
|
+
start: c(this._workingDateStart),
|
|
103
|
+
end: c(this._workingDateEnd)
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
106
|
createRenderRoot() {
|
|
@@ -124,12 +125,12 @@ let s = class extends f {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
if (e.has("focusDate") && this.focusDate) {
|
|
127
|
-
const t =
|
|
128
|
+
const t = c(this.focusDate);
|
|
128
129
|
isNaN(t.getTime()) || (this._nav.navigateToDate(t), this.focusDate = void 0);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
render() {
|
|
132
|
-
return
|
|
133
|
+
return R({
|
|
133
134
|
uid: this.uid,
|
|
134
135
|
label: this.label,
|
|
135
136
|
hint: this.hint,
|
|
@@ -138,6 +139,8 @@ let s = class extends f {
|
|
|
138
139
|
required: this.required,
|
|
139
140
|
disabled: this.disabled,
|
|
140
141
|
numberOfMonths: this.numberOfMonths,
|
|
142
|
+
localeId: this.localeId,
|
|
143
|
+
currentDate: this._nav.currentDate,
|
|
141
144
|
prevMonthIcon: this.prevMonthIcon,
|
|
142
145
|
nextMonthIcon: this.nextMonthIcon,
|
|
143
146
|
prevMonthAriaLabel: this.prevMonthAriaLabel,
|
|
@@ -154,6 +157,7 @@ let s = class extends f {
|
|
|
154
157
|
localeId: this.localeId,
|
|
155
158
|
monthFormat: this.monthFormat,
|
|
156
159
|
yearSelectorOpen: this._nav.yearSelectorOpen,
|
|
160
|
+
selectYearAriaLabel: this.selectYearAriaLabel,
|
|
157
161
|
onToggleYearSelector: () => this.toggleYearSelector(),
|
|
158
162
|
renderBelowHeader: (t) => this.renderBelowHeader(t),
|
|
159
163
|
renderPanelBody: (t) => this.renderPanelBody(t)
|
|
@@ -167,9 +171,9 @@ let s = class extends f {
|
|
|
167
171
|
"is-list-open": this._openList !== null
|
|
168
172
|
};
|
|
169
173
|
return h`
|
|
170
|
-
<div class=${
|
|
174
|
+
<div class=${p(d)}>
|
|
171
175
|
<div
|
|
172
|
-
class=${
|
|
176
|
+
class=${p({
|
|
173
177
|
"gui-range-date-time-calendar__time-column": !0,
|
|
174
178
|
"is-open": this._openList === "start"
|
|
175
179
|
})}
|
|
@@ -199,7 +203,7 @@ let s = class extends f {
|
|
|
199
203
|
</div>
|
|
200
204
|
|
|
201
205
|
<div
|
|
202
|
-
class=${
|
|
206
|
+
class=${p({
|
|
203
207
|
"gui-range-date-time-calendar__time-column": !0,
|
|
204
208
|
"is-open": this._openList === "end"
|
|
205
209
|
})}
|
|
@@ -239,6 +243,8 @@ let s = class extends f {
|
|
|
239
243
|
onSelectYear: (t) => this._keyboard.selectYear(t),
|
|
240
244
|
onYearKeydown: this._keyboard.handleYearKeydown,
|
|
241
245
|
localeId: this.localeId,
|
|
246
|
+
currentDate: this._nav.currentDate,
|
|
247
|
+
yearGridAriaLabel: this.yearGridAriaLabel,
|
|
242
248
|
getDays: (t) => this.getDaysInMonth(t),
|
|
243
249
|
renderDay: (t) => this.renderDay(t)
|
|
244
250
|
});
|
|
@@ -252,7 +258,7 @@ let s = class extends f {
|
|
|
252
258
|
*/
|
|
253
259
|
isDisabled(e) {
|
|
254
260
|
const t = m(e);
|
|
255
|
-
return O(t, this.minDate, this.maxDate) ? !0 :
|
|
261
|
+
return O(t, this.minDate, this.maxDate) ? !0 : q(t, this.disabledRanges);
|
|
256
262
|
}
|
|
257
263
|
/**
|
|
258
264
|
* Rebuilds the day context for an Enter/Space activation from the button's
|
|
@@ -261,10 +267,11 @@ let s = class extends f {
|
|
|
261
267
|
* `selectDate`.
|
|
262
268
|
*/
|
|
263
269
|
activationDay(e) {
|
|
270
|
+
const t = c(e);
|
|
264
271
|
return {
|
|
265
|
-
date:
|
|
272
|
+
date: t,
|
|
266
273
|
isCurrentMonth: !0,
|
|
267
|
-
isDisabled:
|
|
274
|
+
isDisabled: this.isDisabled(t),
|
|
268
275
|
isFocusable: !0,
|
|
269
276
|
dayLabel: "",
|
|
270
277
|
isToday: !1,
|
|
@@ -300,9 +307,12 @@ let s = class extends f {
|
|
|
300
307
|
<button
|
|
301
308
|
type="button"
|
|
302
309
|
role="gridcell"
|
|
303
|
-
class=${
|
|
310
|
+
class=${p(a)}
|
|
304
311
|
tabindex=${e.isFocusable ? 0 : -1}
|
|
305
|
-
?disabled=${!e.isCurrentMonth
|
|
312
|
+
?disabled=${!e.isCurrentMonth}
|
|
313
|
+
aria-disabled=${e.isCurrentMonth && e.isDisabled ? "true" : l}
|
|
314
|
+
aria-label=${A(this.localeId, e.date)}
|
|
315
|
+
aria-current=${e.isToday ? "date" : l}
|
|
306
316
|
data-date=${m(e.date)}
|
|
307
317
|
@click=${(i) => this.selectDate(e, i)}
|
|
308
318
|
@mouseover=${() => this.onMouseOver(e)}
|
|
@@ -319,14 +329,14 @@ let s = class extends f {
|
|
|
319
329
|
start: this.endpointDay(i.start),
|
|
320
330
|
end: i.end ? this.endpointDay(i.end) : void 0
|
|
321
331
|
})), a = N(this._selection);
|
|
322
|
-
return
|
|
332
|
+
return L({
|
|
323
333
|
currentDate: this._currentDate,
|
|
324
334
|
offset: e,
|
|
325
335
|
localeId: this.localeId,
|
|
326
336
|
numberOfMonths: this.numberOfMonths ?? 1,
|
|
327
337
|
isDisabled: (i) => this.isDisabled(i),
|
|
328
338
|
toDay: (i) => {
|
|
329
|
-
const o =
|
|
339
|
+
const o = E(i.date, {
|
|
330
340
|
ranges: t,
|
|
331
341
|
workingRange: this.workingRange,
|
|
332
342
|
anchor: this._selection.anchor,
|
|
@@ -358,7 +368,7 @@ let s = class extends f {
|
|
|
358
368
|
});
|
|
359
369
|
}
|
|
360
370
|
selectDate(e, t = null) {
|
|
361
|
-
if (!e.isCurrentMonth || this.disabled || this.readOnly) return;
|
|
371
|
+
if (!e.isCurrentMonth || e.isDisabled || this.disabled || this.readOnly) return;
|
|
362
372
|
const { state: a, commit: i } = y(this._selection, {
|
|
363
373
|
type: "pick",
|
|
364
374
|
date: e.date
|
|
@@ -384,10 +394,10 @@ let s = class extends f {
|
|
|
384
394
|
return !1;
|
|
385
395
|
}
|
|
386
396
|
onMouseOver(e) {
|
|
387
|
-
this._selection = y(this._selection, {
|
|
397
|
+
e.isDisabled || (this._selection = y(this._selection, {
|
|
388
398
|
type: "hover",
|
|
389
399
|
date: e.date
|
|
390
|
-
}).state;
|
|
400
|
+
}).state);
|
|
391
401
|
}
|
|
392
402
|
onStartTimeChange(e) {
|
|
393
403
|
if (e.stopPropagation(), e.detail.commit !== !0) return;
|
|
@@ -416,15 +426,15 @@ let s = class extends f {
|
|
|
416
426
|
this._workingTimeOut = t, this.emitInputError(a);
|
|
417
427
|
return;
|
|
418
428
|
}
|
|
419
|
-
const i =
|
|
429
|
+
const i = U(
|
|
420
430
|
`${this._workingDateStart}T${this._workingTimeIn}`,
|
|
421
431
|
`${this._workingDateEnd}T${t}`
|
|
422
432
|
);
|
|
423
|
-
if (
|
|
433
|
+
if (H(i, this.disabledRanges)) {
|
|
424
434
|
this._workingTimeOut = t, this.emitInputError(this.disabledRangeMessage ?? v);
|
|
425
435
|
return;
|
|
426
436
|
}
|
|
427
|
-
this._skipValueNavigation = !0, this.value =
|
|
437
|
+
this._skipValueNavigation = !0, this.value = K([...this.value ?? [], i]), this.resetWorking(), this.dispatchEvent(
|
|
428
438
|
new CustomEvent("change", { detail: { value: this.value }, bubbles: !0, composed: !0 })
|
|
429
439
|
);
|
|
430
440
|
}
|
|
@@ -433,11 +443,11 @@ let s = class extends f {
|
|
|
433
443
|
* window, or landing on a disabled slot.
|
|
434
444
|
*/
|
|
435
445
|
timeError(e, t, a) {
|
|
436
|
-
const i =
|
|
446
|
+
const i = j(`${t}T${e}`, this.minDateTime, this.maxDateTime, {
|
|
437
447
|
minDateTimeMessage: this.minDateTimeMessage,
|
|
438
448
|
maxDateTimeMessage: this.maxDateTimeMessage
|
|
439
449
|
});
|
|
440
|
-
return i || (
|
|
450
|
+
return i || (V(e, a) ? this.disabledRangeMessage ?? v : null);
|
|
441
451
|
}
|
|
442
452
|
resetWorking() {
|
|
443
453
|
this._workingDateStart = void 0, this._workingDateEnd = void 0, this._workingTimeIn = void 0, this._workingTimeOut = void 0, this._openList = null, this.resetPicker(this.startPicker), this.resetPicker(this.endPicker);
|
|
@@ -486,7 +496,7 @@ let s = class extends f {
|
|
|
486
496
|
if (!this._workingDateEnd) return {};
|
|
487
497
|
const e = this.dayClampedBounds(this._workingDateEnd);
|
|
488
498
|
if (this._workingDateEnd !== this._workingDateStart || !this._workingTimeIn) return e;
|
|
489
|
-
const t =
|
|
499
|
+
const t = W(this._workingTimeIn, this.minuteStep);
|
|
490
500
|
return t ? { minTime: t, maxTime: e.maxTime } : { minTime: "23:59:59", maxTime: "00:00:00" };
|
|
491
501
|
}
|
|
492
502
|
renderDayContent(e) {
|
|
@@ -546,14 +556,12 @@ let s = class extends f {
|
|
|
546
556
|
if (this.hidePills) return l;
|
|
547
557
|
const e = this.getSortedPills();
|
|
548
558
|
if (e.length === 0) return l;
|
|
549
|
-
const t =
|
|
550
|
-
e,
|
|
551
|
-
(a) => this.formatPillLabel(a),
|
|
552
|
-
this.removePillAriaLabel ?? "Remove date"
|
|
553
|
-
);
|
|
559
|
+
const t = B(e, (a) => this.formatPillLabel(a));
|
|
554
560
|
return h`
|
|
555
561
|
<gui-pills
|
|
556
562
|
class="gui-range-calendar__pills"
|
|
563
|
+
.uid=${this.uid}
|
|
564
|
+
.toolbarAriaLabel=${"Selected date-time ranges"}
|
|
557
565
|
.items=${t}
|
|
558
566
|
.removable=${!0}
|
|
559
567
|
.clickable=${!0}
|
|
@@ -567,7 +575,7 @@ let s = class extends f {
|
|
|
567
575
|
`;
|
|
568
576
|
}
|
|
569
577
|
getSortedPills() {
|
|
570
|
-
return
|
|
578
|
+
return F(
|
|
571
579
|
this.value,
|
|
572
580
|
(e, t) => this.parseEndpoint(e).getTime() - this.parseEndpoint(t).getTime()
|
|
573
581
|
);
|
|
@@ -576,145 +584,151 @@ let s = class extends f {
|
|
|
576
584
|
this._nav.navigateToDate(this.endpointDay(e));
|
|
577
585
|
}
|
|
578
586
|
};
|
|
579
|
-
|
|
580
|
-
|
|
587
|
+
r([
|
|
588
|
+
n({ type: String })
|
|
581
589
|
], s.prototype, "uid", 2);
|
|
582
|
-
|
|
583
|
-
|
|
590
|
+
r([
|
|
591
|
+
n({ type: String })
|
|
584
592
|
], s.prototype, "label", 2);
|
|
585
|
-
|
|
586
|
-
|
|
593
|
+
r([
|
|
594
|
+
n({ type: String })
|
|
587
595
|
], s.prototype, "hint", 2);
|
|
588
|
-
|
|
589
|
-
|
|
596
|
+
r([
|
|
597
|
+
n({ type: String, attribute: "locale-id" })
|
|
590
598
|
], s.prototype, "localeId", 2);
|
|
591
|
-
|
|
592
|
-
|
|
599
|
+
r([
|
|
600
|
+
n({ type: Array })
|
|
593
601
|
], s.prototype, "errors", 2);
|
|
594
|
-
|
|
595
|
-
|
|
602
|
+
r([
|
|
603
|
+
n({ type: Boolean })
|
|
596
604
|
], s.prototype, "touched", 2);
|
|
597
|
-
|
|
598
|
-
|
|
605
|
+
r([
|
|
606
|
+
n({ type: Boolean })
|
|
599
607
|
], s.prototype, "required", 2);
|
|
600
|
-
|
|
601
|
-
|
|
608
|
+
r([
|
|
609
|
+
n({ type: Boolean })
|
|
602
610
|
], s.prototype, "disabled", 2);
|
|
603
|
-
|
|
604
|
-
|
|
611
|
+
r([
|
|
612
|
+
n({ type: Boolean, attribute: "readonly" })
|
|
605
613
|
], s.prototype, "readOnly", 2);
|
|
606
|
-
|
|
607
|
-
|
|
614
|
+
r([
|
|
615
|
+
n({ type: String, attribute: "prev-month-icon" })
|
|
608
616
|
], s.prototype, "prevMonthIcon", 2);
|
|
609
|
-
|
|
610
|
-
|
|
617
|
+
r([
|
|
618
|
+
n({ type: String, attribute: "next-month-icon" })
|
|
611
619
|
], s.prototype, "nextMonthIcon", 2);
|
|
612
|
-
|
|
613
|
-
|
|
620
|
+
r([
|
|
621
|
+
n({ type: String, attribute: "prev-month-aria-label" })
|
|
614
622
|
], s.prototype, "prevMonthAriaLabel", 2);
|
|
615
|
-
|
|
616
|
-
|
|
623
|
+
r([
|
|
624
|
+
n({ type: String, attribute: "next-month-aria-label" })
|
|
617
625
|
], s.prototype, "nextMonthAriaLabel", 2);
|
|
618
|
-
|
|
619
|
-
|
|
626
|
+
r([
|
|
627
|
+
n({ type: String, attribute: "select-year-aria-label" })
|
|
628
|
+
], s.prototype, "selectYearAriaLabel", 2);
|
|
629
|
+
r([
|
|
630
|
+
n({ type: String, attribute: "year-grid-aria-label" })
|
|
631
|
+
], s.prototype, "yearGridAriaLabel", 2);
|
|
632
|
+
r([
|
|
633
|
+
n({ type: String })
|
|
620
634
|
], s.prototype, "dayFormat", 2);
|
|
621
|
-
|
|
622
|
-
|
|
635
|
+
r([
|
|
636
|
+
n({ type: String })
|
|
623
637
|
], s.prototype, "weekdayFormat", 2);
|
|
624
|
-
|
|
625
|
-
|
|
638
|
+
r([
|
|
639
|
+
n({ type: String })
|
|
626
640
|
], s.prototype, "monthFormat", 2);
|
|
627
|
-
|
|
628
|
-
|
|
641
|
+
r([
|
|
642
|
+
n({ type: String })
|
|
629
643
|
], s.prototype, "minDate", 2);
|
|
630
|
-
|
|
631
|
-
|
|
644
|
+
r([
|
|
645
|
+
n({ type: String })
|
|
632
646
|
], s.prototype, "maxDate", 2);
|
|
633
|
-
|
|
634
|
-
|
|
647
|
+
r([
|
|
648
|
+
n({ type: Array, attribute: "disabled-ranges" })
|
|
635
649
|
], s.prototype, "disabledRanges", 2);
|
|
636
|
-
|
|
637
|
-
|
|
650
|
+
r([
|
|
651
|
+
n({ type: Number })
|
|
638
652
|
], s.prototype, "numberOfMonths", 2);
|
|
639
|
-
|
|
640
|
-
|
|
653
|
+
r([
|
|
654
|
+
n({ type: Array })
|
|
641
655
|
], s.prototype, "value", 2);
|
|
642
|
-
|
|
643
|
-
|
|
656
|
+
r([
|
|
657
|
+
n({ type: String })
|
|
644
658
|
], s.prototype, "focusDate", 2);
|
|
645
|
-
|
|
646
|
-
|
|
659
|
+
r([
|
|
660
|
+
n({ type: Boolean })
|
|
647
661
|
], s.prototype, "hidePills", 2);
|
|
648
|
-
|
|
649
|
-
|
|
662
|
+
r([
|
|
663
|
+
n({ type: String })
|
|
650
664
|
], s.prototype, "removePillAriaLabel", 2);
|
|
651
|
-
|
|
652
|
-
|
|
665
|
+
r([
|
|
666
|
+
n({ type: String, attribute: "disabled-date-range-message" })
|
|
653
667
|
], s.prototype, "disabledDateRangeMessage", 2);
|
|
654
|
-
|
|
655
|
-
|
|
668
|
+
r([
|
|
669
|
+
n({ attribute: !1 })
|
|
656
670
|
], s.prototype, "invalidRange", 2);
|
|
657
|
-
|
|
658
|
-
|
|
671
|
+
r([
|
|
672
|
+
n({ type: String, attribute: "hour-format" })
|
|
659
673
|
], s.prototype, "hourFormat", 2);
|
|
660
|
-
|
|
661
|
-
|
|
674
|
+
r([
|
|
675
|
+
n({ type: Number, attribute: "minute-step" })
|
|
662
676
|
], s.prototype, "minuteStep", 2);
|
|
663
|
-
|
|
664
|
-
|
|
677
|
+
r([
|
|
678
|
+
n({ type: Boolean, attribute: "allow-custom-time" })
|
|
665
679
|
], s.prototype, "allowCustomTime", 2);
|
|
666
|
-
|
|
667
|
-
|
|
680
|
+
r([
|
|
681
|
+
n({ type: String, attribute: "start-time-label" })
|
|
668
682
|
], s.prototype, "startTimeLabel", 2);
|
|
669
|
-
|
|
670
|
-
|
|
683
|
+
r([
|
|
684
|
+
n({ type: String, attribute: "end-time-label" })
|
|
671
685
|
], s.prototype, "endTimeLabel", 2);
|
|
672
|
-
|
|
673
|
-
|
|
686
|
+
r([
|
|
687
|
+
n({ type: String, attribute: "min-date-time" })
|
|
674
688
|
], s.prototype, "minDateTime", 2);
|
|
675
|
-
|
|
676
|
-
|
|
689
|
+
r([
|
|
690
|
+
n({ type: String, attribute: "max-date-time" })
|
|
677
691
|
], s.prototype, "maxDateTime", 2);
|
|
678
|
-
|
|
679
|
-
|
|
692
|
+
r([
|
|
693
|
+
n({ type: String, attribute: "min-date-time-message" })
|
|
680
694
|
], s.prototype, "minDateTimeMessage", 2);
|
|
681
|
-
|
|
682
|
-
|
|
695
|
+
r([
|
|
696
|
+
n({ type: String, attribute: "max-date-time-message" })
|
|
683
697
|
], s.prototype, "maxDateTimeMessage", 2);
|
|
684
|
-
|
|
685
|
-
|
|
698
|
+
r([
|
|
699
|
+
n({ type: String, attribute: "disabled-range-message" })
|
|
686
700
|
], s.prototype, "disabledRangeMessage", 2);
|
|
687
|
-
|
|
688
|
-
|
|
701
|
+
r([
|
|
702
|
+
n({ type: String, attribute: "no-available-times-message" })
|
|
689
703
|
], s.prototype, "noAvailableTimesMessage", 2);
|
|
690
|
-
|
|
691
|
-
|
|
704
|
+
r([
|
|
705
|
+
n({ type: String, attribute: "day-count-aria-label" })
|
|
692
706
|
], s.prototype, "dayCountAriaLabel", 2);
|
|
693
|
-
|
|
694
|
-
|
|
707
|
+
r([
|
|
708
|
+
n({ type: String, attribute: "disabled-day-count-aria-label" })
|
|
695
709
|
], s.prototype, "disabledDayCountAriaLabel", 2);
|
|
696
|
-
|
|
710
|
+
r([
|
|
697
711
|
g()
|
|
698
712
|
], s.prototype, "_selection", 2);
|
|
699
|
-
|
|
713
|
+
r([
|
|
700
714
|
g()
|
|
701
715
|
], s.prototype, "_invalidRange", 2);
|
|
702
|
-
|
|
716
|
+
r([
|
|
703
717
|
g()
|
|
704
718
|
], s.prototype, "_workingDateStart", 2);
|
|
705
|
-
|
|
719
|
+
r([
|
|
706
720
|
g()
|
|
707
721
|
], s.prototype, "_workingDateEnd", 2);
|
|
708
|
-
|
|
722
|
+
r([
|
|
709
723
|
g()
|
|
710
724
|
], s.prototype, "_workingTimeIn", 2);
|
|
711
|
-
|
|
725
|
+
r([
|
|
712
726
|
g()
|
|
713
727
|
], s.prototype, "_workingTimeOut", 2);
|
|
714
|
-
|
|
728
|
+
r([
|
|
715
729
|
g()
|
|
716
730
|
], s.prototype, "_openList", 2);
|
|
717
|
-
s =
|
|
731
|
+
s = r([
|
|
718
732
|
S("gui-range-date-time-calendar")
|
|
719
733
|
], s);
|
|
720
734
|
typeof customElements < "u" && !customElements.get("gui-range-date-time-calendar") && customElements.define("gui-range-date-time-calendar", s);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { InputWidgetAdapter as d, formContext as m, inputContext as u } from "@golemui/lit";
|
|
2
|
-
import "./range-date-time-calendar-
|
|
2
|
+
import "./range-date-time-calendar-B3EMgN1E.js";
|
|
3
3
|
import { consume as p, provide as h } from "@lit/context";
|
|
4
4
|
import { LitElement as c, html as b } from "lit";
|
|
5
5
|
import { property as $, customElement as g } from "lit/decorators.js";
|
|
6
6
|
import "rxjs";
|
|
7
|
-
var v = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (e,
|
|
8
|
-
for (var
|
|
9
|
-
(o = e[n]) && (
|
|
10
|
-
return r &&
|
|
7
|
+
var v = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (e, a, s, r) => {
|
|
8
|
+
for (var t = r > 1 ? void 0 : r ? f(a, s) : a, n = e.length - 1, o; n >= 0; n--)
|
|
9
|
+
(o = e[n]) && (t = (r ? o(a, s, t) : o(t)) || t);
|
|
10
|
+
return r && t && v(a, s, t), t;
|
|
11
11
|
};
|
|
12
12
|
let i = class extends c {
|
|
13
13
|
constructor() {
|
|
@@ -18,8 +18,8 @@ let i = class extends c {
|
|
|
18
18
|
}
|
|
19
19
|
updated(e) {
|
|
20
20
|
super.updated(e);
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const a = this.adapter.templateData.size;
|
|
22
|
+
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
23
23
|
}
|
|
24
24
|
connectedCallback() {
|
|
25
25
|
super.connectedCallback(), this.classList.add("gui-range-date-time-calendar", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
@@ -44,6 +44,8 @@ let i = class extends c {
|
|
|
44
44
|
.nextMonthIcon=${e.nextMonthIcon}
|
|
45
45
|
.prevMonthAriaLabel=${e.prevMonthAriaLabel}
|
|
46
46
|
.nextMonthAriaLabel=${e.nextMonthAriaLabel}
|
|
47
|
+
.selectYearAriaLabel=${e.selectYearAriaLabel}
|
|
48
|
+
.yearGridAriaLabel=${e.yearGridAriaLabel}
|
|
47
49
|
.dayFormat=${e.dayFormat}
|
|
48
50
|
.weekdayFormat=${e.weekdayFormat}
|
|
49
51
|
.monthFormat=${e.monthFormat}
|