@oslokommune/punkt-elements 13.15.3 → 13.15.4
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 +18 -0
- package/dist/{calendar-DtJh7UYD.js → calendar-Bz27nuTP.js} +161 -158
- package/dist/calendar-Dz1Cnzx5.cjs +115 -0
- package/dist/{checkbox-DgTtlDZM.js → checkbox-CCFBIf44.js} +1 -1
- package/dist/{checkbox-BIph-958.cjs → checkbox-UT6D1Wi0.cjs} +1 -1
- package/dist/{combobox-BX1YbDHV.cjs → combobox-6WP1urZS.cjs} +1 -1
- package/dist/{combobox-BdDZU1bk.js → combobox-CtHgl1n2.js} +3 -3
- package/dist/{datepicker-C4joeEiQ.cjs → datepicker-DEO1C69C.cjs} +47 -47
- package/dist/{datepicker-lnxklOi4.js → datepicker-q9haFM81.js} +178 -203
- package/dist/{helptext-DuvVSH7d.js → helptext-Cs3QHeEy.js} +1 -1
- package/dist/helptext-EPTR9AIl.cjs +24 -0
- package/dist/{input-element-BcFmygSF.js → input-element-Dqu8udwd.js} +1 -1
- package/dist/input-element-KUsQQ-1d.cjs +1 -0
- package/dist/{input-wrapper-D9kFsTCN.cjs → input-wrapper-B-Qseywc.cjs} +2 -2
- package/dist/{input-wrapper-CiqUL7my.js → input-wrapper-Wu3Yv-bn.js} +2 -2
- package/dist/{listbox-CsGiqzD0.cjs → listbox-DnoqOo5u.cjs} +1 -1
- package/dist/{listbox-DlJevu8O.js → listbox-mvKKzH-v.js} +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +12 -12
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-CazcIzVT.cjs → progressbar-8gzOtJyh.cjs} +1 -1
- package/dist/{progressbar-BbVei20_.js → progressbar-kxcBEspG.js} +1 -1
- package/dist/{radiobutton-DODROIBF.js → radiobutton-DuAo3CdN.js} +1 -1
- package/dist/{radiobutton-D1fihs8R.cjs → radiobutton-FwxpKELo.cjs} +1 -1
- package/dist/{select-D7Ne5gv0.cjs → select-BbmLn1qh.cjs} +1 -1
- package/dist/{select-_KoHkDbx.js → select-wak-jukY.js} +2 -2
- package/dist/{textarea-DuOBX5is.js → textarea-CIb4VWtN.js} +2 -2
- package/dist/{textarea-CYHYvdCf.cjs → textarea-CzN0E0TV.cjs} +1 -1
- package/dist/{textinput-CrcXv_is.js → textinput-D5_RTkRY.js} +2 -2
- package/dist/{textinput-DYVtoRMy.cjs → textinput-D8v6D6ie.cjs} +1 -1
- package/dist/utils-DznhwRXm.js +8 -0
- package/dist/utils-byXsEz1u.cjs +1 -0
- package/package.json +2 -4
- package/src/components/calendar/calendar.constraints.test.ts +1 -1
- package/src/components/calendar/calendar.core.test.ts +1 -1
- package/src/components/calendar/calendar.selection.test.ts +1 -1
- package/src/components/calendar/calendar.ts +1 -1
- package/src/components/datepicker/date-tags.ts +4 -4
- package/src/components/datepicker/datepicker-multiple.ts +3 -2
- package/src/components/datepicker/datepicker-range.ts +4 -3
- package/src/components/datepicker/datepicker-single.ts +3 -2
- package/src/components/datepicker/datepicker-utils.ts +7 -69
- package/src/components/datepicker/datepicker.core.test.ts +1 -1
- package/src/components/datepicker/datepicker.ts +11 -10
- package/src/components/helptext/helptext.ts +1 -1
- package/src/components/input-wrapper/input-wrapper.ts +1 -1
- package/src/components/listbox/listbox.ts +1 -1
- package/src/components/progressbar/progressbar.ts +1 -1
- package/dist/calendar-BaMrdMDZ.cjs +0 -115
- package/dist/helptext-CVQP3pis.cjs +0 -24
- package/dist/input-element-j9znzLWz.cjs +0 -1
- package/dist/stringutils-CkVRq4jP.cjs +0 -1
- package/dist/stringutils-DJjRa8dG.js +0 -7
|
@@ -1,75 +1,104 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { r as
|
|
3
|
-
import {
|
|
4
|
-
import { P as
|
|
1
|
+
import { P as I, E as A, x as d, n as a, a as R } from "./element-CRDRygXu.js";
|
|
2
|
+
import { r as q } from "./state-DS_kr2Fy.js";
|
|
3
|
+
import { s as U, f as N, n as j, a as W, i as H, b as L, v as O, d as G, e as J, p as Q, g as z } from "./calendar-Bz27nuTP.js";
|
|
4
|
+
import { P as X } from "./input-element-Dqu8udwd.js";
|
|
5
5
|
import { e as u, n as c } from "./ref-Xa5dbh--.js";
|
|
6
6
|
import "./icon-1dy7UZcu.js";
|
|
7
|
-
import "./input-wrapper-
|
|
8
|
-
import { e as
|
|
9
|
-
import { c as
|
|
7
|
+
import "./input-wrapper-Wu3Yv-bn.js";
|
|
8
|
+
import { e as k } from "./class-map-wy7PUk0P.js";
|
|
9
|
+
import { c as Y } from "./repeat-CJ79egkN.js";
|
|
10
10
|
import "./tag-CqMgt01I.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { o as
|
|
13
|
-
import { P as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
import { u as Z, s as tt } from "./utils-DznhwRXm.js";
|
|
12
|
+
import { o as C } from "./if-defined-BWZGb3bh.js";
|
|
13
|
+
import { P as et } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
14
|
+
var st = Object.defineProperty, it = Object.getOwnPropertyDescriptor, P = (t, e, s, n) => {
|
|
15
|
+
for (var i = n > 1 ? void 0 : n ? it(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
16
|
+
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
17
|
+
return n && i && st(e, s, i), i;
|
|
18
|
+
};
|
|
19
|
+
let T = class extends I {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = Z();
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
render() {
|
|
24
|
+
return this.classes = {
|
|
25
|
+
"pkt-date-tags": !0,
|
|
26
|
+
[this.className]: !0
|
|
27
|
+
}, d`
|
|
28
|
+
<div class=${k(this.classes)} aria-live="polite">
|
|
29
|
+
${Array.isArray(this.dates) && this.dates[0] ? Y(
|
|
30
|
+
U((this.dates ?? []).filter(Boolean)),
|
|
31
|
+
(t) => t,
|
|
32
|
+
(t) => {
|
|
33
|
+
var e;
|
|
34
|
+
return d` <pkt-tag
|
|
35
|
+
id=${this.idBase + t + "-tag"}
|
|
36
|
+
closeTag
|
|
37
|
+
@close=${() => {
|
|
38
|
+
this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: t }));
|
|
39
|
+
}}
|
|
40
|
+
.ariaLabel=${`${(e = this.strings) == null ? void 0 : e.calendar.deleteDate} ${N(t, this.dateformat)}`}
|
|
41
|
+
>
|
|
42
|
+
<time datetime=${t}>${N(t, this.dateformat)}</time>
|
|
43
|
+
</pkt-tag>`;
|
|
44
|
+
}
|
|
45
|
+
) : A}
|
|
46
|
+
</div>
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
P([
|
|
51
|
+
a({ type: Array })
|
|
52
|
+
], T.prototype, "dates", 2);
|
|
53
|
+
P([
|
|
54
|
+
a({ type: String })
|
|
55
|
+
], T.prototype, "dateformat", 2);
|
|
56
|
+
P([
|
|
57
|
+
a({ type: String, attribute: "class" })
|
|
58
|
+
], T.prototype, "className", 2);
|
|
59
|
+
P([
|
|
60
|
+
a({ type: String, attribute: "id-base" })
|
|
61
|
+
], T.prototype, "idBase", 2);
|
|
62
|
+
T = P([
|
|
63
|
+
R("pkt-date-tags")
|
|
64
|
+
], T);
|
|
65
|
+
const at = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }, withcontrols: { default: !1 }, multiple: { default: !1 }, range: { default: !1 } }, _ = {
|
|
66
|
+
props: at
|
|
67
|
+
}, E = () => {
|
|
68
|
+
const t = navigator.userAgent;
|
|
69
|
+
return !!(/iP(hone|od|ad)/.test(t) || /Macintosh/.test(t) && "ontouchend" in document);
|
|
70
|
+
}, B = {
|
|
36
71
|
/**
|
|
37
72
|
* Ensures name attribute ends with [] for multiple/range inputs
|
|
38
73
|
*/
|
|
39
74
|
normalizeNameForMultiple(t, e, s) {
|
|
40
75
|
return t ? (e || s) && !t.endsWith("[]") ? t + "[]" : t : null;
|
|
41
76
|
},
|
|
42
|
-
/**
|
|
43
|
-
* Converts string arrays to proper arrays if they come as strings
|
|
44
|
-
*/
|
|
45
|
-
normalizeStringArray(t) {
|
|
46
|
-
return typeof t == "string" ? t.split(",").filter(Boolean) : Array.isArray(t) ? t : [];
|
|
47
|
-
},
|
|
48
77
|
/**
|
|
49
78
|
* Validates that a range has valid order (start <= end)
|
|
50
79
|
*/
|
|
51
80
|
validateRangeOrder(t) {
|
|
52
|
-
return !t || t.length !== 2 ? !0 :
|
|
81
|
+
return !t || t.length !== 2 ? !0 : H(t[0], t[1]);
|
|
53
82
|
},
|
|
54
83
|
/**
|
|
55
84
|
* Sorts date strings chronologically
|
|
56
85
|
*/
|
|
57
86
|
sortDates(t) {
|
|
58
|
-
return
|
|
87
|
+
return U(t);
|
|
59
88
|
},
|
|
60
89
|
/**
|
|
61
90
|
* Filters dates to only include selectable ones based on constraints
|
|
62
91
|
*/
|
|
63
92
|
filterSelectableDates(t, e, s, n, i) {
|
|
64
|
-
return
|
|
93
|
+
return W(t, e, s, n, i);
|
|
65
94
|
}
|
|
66
|
-
},
|
|
95
|
+
}, nt = {
|
|
67
96
|
/**
|
|
68
97
|
* Determines the appropriate input type based on device
|
|
69
98
|
* Mobile Safari does not play well with type="date" amd custom datepickers
|
|
70
99
|
*/
|
|
71
100
|
getInputType() {
|
|
72
|
-
return
|
|
101
|
+
return E() ? "text" : "date";
|
|
73
102
|
}
|
|
74
103
|
}, D = {
|
|
75
104
|
/**
|
|
@@ -91,7 +120,7 @@ const Z = (t) => new Promise((e) => setTimeout(e, t)), T = {
|
|
|
91
120
|
* Validates a date input and sets validity state
|
|
92
121
|
*/
|
|
93
122
|
validateDateInput(t, e, s, n, i) {
|
|
94
|
-
var r, h, V,
|
|
123
|
+
var r, h, V, K;
|
|
95
124
|
const l = t.value;
|
|
96
125
|
l && (s && s > l ? e.setValidity(
|
|
97
126
|
{ rangeUnderflow: !0 },
|
|
@@ -99,18 +128,18 @@ const Z = (t) => new Promise((e) => setTimeout(e, t)), T = {
|
|
|
99
128
|
t
|
|
100
129
|
) : n && n < l && e.setValidity(
|
|
101
130
|
{ rangeOverflow: !0 },
|
|
102
|
-
((
|
|
131
|
+
((K = (V = i == null ? void 0 : i.forms) == null ? void 0 : V.messages) == null ? void 0 : K.rangeOverflow) || "Value is above maximum",
|
|
103
132
|
t
|
|
104
133
|
));
|
|
105
134
|
}
|
|
106
|
-
},
|
|
135
|
+
}, F = {
|
|
107
136
|
/**
|
|
108
137
|
* Adds a date to selected dates if it's valid
|
|
109
138
|
*/
|
|
110
139
|
addToSelected(t, e, s, n) {
|
|
111
140
|
const i = t.target;
|
|
112
141
|
if (!i.value) return;
|
|
113
|
-
const l = s ?
|
|
142
|
+
const l = s ? j(s) : null, r = n ? j(n) : null, h = j(i.value.split(",")[0]);
|
|
114
143
|
h && !isNaN(h.getTime()) && (!l || h >= l) && (!r || h <= r) && e.value && e.value.handleDateSelect(h), i.value = "";
|
|
115
144
|
},
|
|
116
145
|
/**
|
|
@@ -123,7 +152,7 @@ const Z = (t) => new Promise((e) => setTimeout(e, t)), T = {
|
|
|
123
152
|
let r = s ? "calc(100% - 30px)" : "100%";
|
|
124
153
|
n && n.top + l > window.innerHeight && n.top - l > 0 && (r = `calc(100% - ${i}px - ${l}px)`), t.value.style.top = r;
|
|
125
154
|
}
|
|
126
|
-
},
|
|
155
|
+
}, S = {
|
|
127
156
|
/**
|
|
128
157
|
* Generates input classes for datepicker
|
|
129
158
|
*/
|
|
@@ -159,7 +188,7 @@ const Z = (t) => new Promise((e) => setTimeout(e, t)), T = {
|
|
|
159
188
|
"pkt-hide": !t
|
|
160
189
|
};
|
|
161
190
|
}
|
|
162
|
-
},
|
|
191
|
+
}, M = {
|
|
163
192
|
/**
|
|
164
193
|
* Handles date selection from calendar events
|
|
165
194
|
*/
|
|
@@ -180,11 +209,11 @@ const Z = (t) => new Promise((e) => setTimeout(e, t)), T = {
|
|
|
180
209
|
const l = t.target;
|
|
181
210
|
if (l.value) {
|
|
182
211
|
i(l);
|
|
183
|
-
const h =
|
|
212
|
+
const h = L(l.value);
|
|
184
213
|
h && e[0] !== l.value && e[1] && (n(), (r = s == null ? void 0 : s.value) == null || r.handleDateSelect(h));
|
|
185
214
|
} else e[0] && n();
|
|
186
215
|
}
|
|
187
|
-
},
|
|
216
|
+
}, x = {
|
|
188
217
|
/**
|
|
189
218
|
* Handles common keyboard interactions for datepicker inputs
|
|
190
219
|
*/
|
|
@@ -200,66 +229,12 @@ const Z = (t) => new Promise((e) => setTimeout(e, t)), T = {
|
|
|
200
229
|
(s === "Enter" || s === " " || s === "Space") && (t.preventDefault(), e(t));
|
|
201
230
|
}
|
|
202
231
|
};
|
|
203
|
-
var
|
|
204
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
205
|
-
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
206
|
-
return n && i && et(e, s, i), i;
|
|
207
|
-
};
|
|
208
|
-
let R = class extends O {
|
|
209
|
-
constructor() {
|
|
210
|
-
super(...arguments), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = X();
|
|
211
|
-
}
|
|
212
|
-
render() {
|
|
213
|
-
return this.classes = {
|
|
214
|
-
"pkt-date-tags": !0,
|
|
215
|
-
[this.className]: !0
|
|
216
|
-
}, d`
|
|
217
|
-
<div class=${x(this.classes)} aria-live="polite">
|
|
218
|
-
${Array.isArray(this.dates) && this.dates[0] ? Q(
|
|
219
|
-
k.sortDates((this.dates ?? []).filter(Boolean)),
|
|
220
|
-
(t) => t,
|
|
221
|
-
(t) => {
|
|
222
|
-
var e;
|
|
223
|
-
return d` <pkt-tag
|
|
224
|
-
id=${this.idBase + t + "-tag"}
|
|
225
|
-
closeTag
|
|
226
|
-
@close=${() => {
|
|
227
|
-
this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: t }));
|
|
228
|
-
}}
|
|
229
|
-
.ariaLabel=${`${(e = this.strings) == null ? void 0 : e.calendar.deleteDate} ${z(t, this.dateformat)}`}
|
|
230
|
-
>
|
|
231
|
-
<time datetime=${t}>${z(t, this.dateformat)}</time>
|
|
232
|
-
</pkt-tag>`;
|
|
233
|
-
}
|
|
234
|
-
) : B}
|
|
235
|
-
</div>
|
|
236
|
-
`;
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
P([
|
|
240
|
-
a({ type: Array })
|
|
241
|
-
], R.prototype, "dates", 2);
|
|
242
|
-
P([
|
|
243
|
-
a({ type: String })
|
|
244
|
-
], R.prototype, "dateformat", 2);
|
|
245
|
-
P([
|
|
246
|
-
a({ type: String, attribute: "class" })
|
|
247
|
-
], R.prototype, "className", 2);
|
|
248
|
-
P([
|
|
249
|
-
a({ type: String, attribute: "id-base" })
|
|
250
|
-
], R.prototype, "idBase", 2);
|
|
251
|
-
R = P([
|
|
252
|
-
_("pkt-date-tags")
|
|
253
|
-
], R);
|
|
254
|
-
const it = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }, withcontrols: { default: !1 }, multiple: { default: !1 }, range: { default: !1 } }, S = {
|
|
255
|
-
props: it
|
|
256
|
-
};
|
|
257
|
-
var at = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, v = (t, e, s, n) => {
|
|
258
|
-
for (var i = n > 1 ? void 0 : n ? nt(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
232
|
+
var lt = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, v = (t, e, s, n) => {
|
|
233
|
+
for (var i = n > 1 ? void 0 : n ? rt(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
259
234
|
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
260
|
-
return n && i &&
|
|
235
|
+
return n && i && lt(e, s, i), i;
|
|
261
236
|
};
|
|
262
|
-
let g = class extends
|
|
237
|
+
let g = class extends I {
|
|
263
238
|
constructor() {
|
|
264
239
|
super(...arguments), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.popupRef = u(), this.calendarRef = u(), this.handleDocumentClick = (t) => {
|
|
265
240
|
if (!this.open) return;
|
|
@@ -294,8 +269,8 @@ let g = class extends O {
|
|
|
294
269
|
t && typeof t.focusOnCurrentDate == "function" && t.focusOnCurrentDate();
|
|
295
270
|
}
|
|
296
271
|
addToSelected(t, e, s) {
|
|
297
|
-
if (typeof
|
|
298
|
-
return
|
|
272
|
+
if (typeof F.addToSelected == "function")
|
|
273
|
+
return F.addToSelected(t, this.calendarRef, e, s);
|
|
299
274
|
}
|
|
300
275
|
handleDateSelect(t) {
|
|
301
276
|
const e = this.calendarRef.value;
|
|
@@ -305,7 +280,7 @@ let g = class extends O {
|
|
|
305
280
|
const t = { "pkt-calendar-popup": !0, show: this.open, hide: !this.open };
|
|
306
281
|
return d`
|
|
307
282
|
<div
|
|
308
|
-
class="${
|
|
283
|
+
class="${k(t)}"
|
|
309
284
|
${c(this.popupRef)}
|
|
310
285
|
id="date-popup"
|
|
311
286
|
?hidden=${!this.open}
|
|
@@ -374,14 +349,14 @@ v([
|
|
|
374
349
|
a({ type: String })
|
|
375
350
|
], g.prototype, "currentmonth", 2);
|
|
376
351
|
g = v([
|
|
377
|
-
|
|
352
|
+
R("pkt-datepicker-popup")
|
|
378
353
|
], g);
|
|
379
|
-
var
|
|
380
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
354
|
+
var pt = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, w = (t, e, s, n) => {
|
|
355
|
+
for (var i = n > 1 ? void 0 : n ? ot(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
381
356
|
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
382
|
-
return n && i &&
|
|
357
|
+
return n && i && pt(e, s, i), i;
|
|
383
358
|
};
|
|
384
|
-
let y = class extends
|
|
359
|
+
let y = class extends I {
|
|
385
360
|
constructor() {
|
|
386
361
|
super(...arguments), this.value = "", this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.strings = { calendar: { buttonAltText: "Åpne kalender" } }, this.inputRef = u(), this.btnRef = u();
|
|
387
362
|
}
|
|
@@ -454,13 +429,13 @@ let y = class extends O {
|
|
|
454
429
|
return d`
|
|
455
430
|
<div class="pkt-input__container">
|
|
456
431
|
<input
|
|
457
|
-
class="${
|
|
432
|
+
class="${k(this.inputClasses)}"
|
|
458
433
|
.type=${this.inputType}
|
|
459
434
|
id="${this.id}-input"
|
|
460
435
|
.value=${this.value}
|
|
461
|
-
min=${
|
|
462
|
-
max=${
|
|
463
|
-
placeholder=${
|
|
436
|
+
min=${C(this.min)}
|
|
437
|
+
max=${C(this.max)}
|
|
438
|
+
placeholder=${C(this.placeholder)}
|
|
464
439
|
?readonly=${this.isInputReadonly}
|
|
465
440
|
aria-describedby="${this.id}-helptext"
|
|
466
441
|
@click=${(t) => {
|
|
@@ -470,7 +445,7 @@ let y = class extends O {
|
|
|
470
445
|
t.preventDefault(), this.dispatchToggleCalendar(t);
|
|
471
446
|
}}
|
|
472
447
|
?disabled=${this.disabled}
|
|
473
|
-
@keydown=${(t) =>
|
|
448
|
+
@keydown=${(t) => x.handleInputKeydown(
|
|
474
449
|
t,
|
|
475
450
|
(e) => this.dispatchToggleCalendar(e),
|
|
476
451
|
() => D.submitFormOrFallback(this.internals, () => {
|
|
@@ -487,7 +462,7 @@ let y = class extends O {
|
|
|
487
462
|
this.dispatchInput(t), t.stopImmediatePropagation();
|
|
488
463
|
}}
|
|
489
464
|
@focus=${() => {
|
|
490
|
-
this.dispatchFocus(),
|
|
465
|
+
this.dispatchFocus(), E() && this.dispatchToggleCalendar(new Event("focus"));
|
|
491
466
|
}}
|
|
492
467
|
@blur=${(t) => {
|
|
493
468
|
this.dispatchBlur(t), this.dispatchManageValidity(t.target), this.dispatchEvent(
|
|
@@ -504,10 +479,10 @@ let y = class extends O {
|
|
|
504
479
|
${c(this.inputRef)}
|
|
505
480
|
/>
|
|
506
481
|
<button
|
|
507
|
-
class="${
|
|
482
|
+
class="${k(S.getButtonClasses())}"
|
|
508
483
|
type="button"
|
|
509
484
|
@click=${(t) => this.dispatchToggleCalendar(t)}
|
|
510
|
-
@keydown=${(t) =>
|
|
485
|
+
@keydown=${(t) => x.handleButtonKeydown(t, (e) => this.dispatchToggleCalendar(e))}
|
|
511
486
|
?disabled=${this.disabled}
|
|
512
487
|
${c(this.btnRef)}
|
|
513
488
|
>
|
|
@@ -518,48 +493,48 @@ let y = class extends O {
|
|
|
518
493
|
`;
|
|
519
494
|
}
|
|
520
495
|
};
|
|
521
|
-
|
|
496
|
+
w([
|
|
522
497
|
a({ type: String })
|
|
523
498
|
], y.prototype, "value", 2);
|
|
524
|
-
|
|
499
|
+
w([
|
|
525
500
|
a({ type: String })
|
|
526
501
|
], y.prototype, "inputType", 2);
|
|
527
|
-
|
|
502
|
+
w([
|
|
528
503
|
a({ type: String })
|
|
529
504
|
], y.prototype, "id", 2);
|
|
530
|
-
|
|
505
|
+
w([
|
|
531
506
|
a({ type: String })
|
|
532
507
|
], y.prototype, "min", 2);
|
|
533
|
-
|
|
508
|
+
w([
|
|
534
509
|
a({ type: String })
|
|
535
510
|
], y.prototype, "max", 2);
|
|
536
|
-
|
|
511
|
+
w([
|
|
537
512
|
a({ type: String })
|
|
538
513
|
], y.prototype, "placeholder", 2);
|
|
539
|
-
|
|
514
|
+
w([
|
|
540
515
|
a({ type: Boolean })
|
|
541
516
|
], y.prototype, "readonly", 2);
|
|
542
|
-
|
|
517
|
+
w([
|
|
543
518
|
a({ type: Boolean })
|
|
544
519
|
], y.prototype, "disabled", 2);
|
|
545
|
-
|
|
520
|
+
w([
|
|
546
521
|
a({ type: Object })
|
|
547
522
|
], y.prototype, "inputClasses", 2);
|
|
548
|
-
|
|
523
|
+
w([
|
|
549
524
|
a({ type: Object })
|
|
550
525
|
], y.prototype, "internals", 2);
|
|
551
|
-
|
|
526
|
+
w([
|
|
552
527
|
a({ type: Object })
|
|
553
528
|
], y.prototype, "strings", 2);
|
|
554
|
-
y =
|
|
555
|
-
|
|
529
|
+
y = w([
|
|
530
|
+
R("pkt-datepicker-single")
|
|
556
531
|
], y);
|
|
557
|
-
var
|
|
558
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
532
|
+
var ut = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, b = (t, e, s, n) => {
|
|
533
|
+
for (var i = n > 1 ? void 0 : n ? ht(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
559
534
|
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
560
|
-
return n && i &&
|
|
535
|
+
return n && i && ut(e, s, i), i;
|
|
561
536
|
};
|
|
562
|
-
let m = class extends
|
|
537
|
+
let m = class extends I {
|
|
563
538
|
constructor() {
|
|
564
539
|
super(...arguments), this.value = [], this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.showRangeLabels = !1, this.inputClasses = {}, this.strings = { generic: { from: "Fra", to: "Til" } }, this.inputRef = u(), this.inputRefTo = u(), this.btnRef = u();
|
|
565
540
|
}
|
|
@@ -632,18 +607,18 @@ let m = class extends O {
|
|
|
632
607
|
return this;
|
|
633
608
|
}
|
|
634
609
|
render() {
|
|
635
|
-
const t =
|
|
610
|
+
const t = S.getRangeLabelClasses(this.showRangeLabels);
|
|
636
611
|
return d`
|
|
637
612
|
<div class="pkt-input__container">
|
|
638
|
-
${this.showRangeLabels ? d` <div class="pkt-input-prefix">${this.strings.generic.from}</div> ` :
|
|
613
|
+
${this.showRangeLabels ? d` <div class="pkt-input-prefix">${this.strings.generic.from}</div> ` : A}
|
|
639
614
|
<input
|
|
640
|
-
class=${
|
|
615
|
+
class=${k(this.inputClasses)}
|
|
641
616
|
.type=${this.inputType}
|
|
642
617
|
id="${this.id}-input"
|
|
643
618
|
.value=${this.value[0] ?? ""}
|
|
644
|
-
min=${
|
|
645
|
-
max=${
|
|
646
|
-
placeholder=${
|
|
619
|
+
min=${C(this.min)}
|
|
620
|
+
max=${C(this.max)}
|
|
621
|
+
placeholder=${C(this.placeholder)}
|
|
647
622
|
?readonly=${this.isInputReadonly}
|
|
648
623
|
?disabled=${this.disabled}
|
|
649
624
|
@click=${(e) => {
|
|
@@ -652,7 +627,7 @@ let m = class extends O {
|
|
|
652
627
|
@touchend=${(e) => {
|
|
653
628
|
e.preventDefault(), this.dispatchToggleCalendar(e);
|
|
654
629
|
}}
|
|
655
|
-
@keydown=${(e) =>
|
|
630
|
+
@keydown=${(e) => x.handleInputKeydown(
|
|
656
631
|
e,
|
|
657
632
|
(s) => this.dispatchToggleCalendar(s),
|
|
658
633
|
() => D.submitFormOrFallback(
|
|
@@ -675,7 +650,7 @@ let m = class extends O {
|
|
|
675
650
|
this.dispatchInput(e), e.stopImmediatePropagation();
|
|
676
651
|
}}
|
|
677
652
|
@focus=${() => {
|
|
678
|
-
this.dispatchFocus(),
|
|
653
|
+
this.dispatchFocus(), E() && this.dispatchToggleCalendar(new Event("focus"));
|
|
679
654
|
}}
|
|
680
655
|
@blur=${(e) => {
|
|
681
656
|
this.dispatchEvent(
|
|
@@ -695,19 +670,19 @@ let m = class extends O {
|
|
|
695
670
|
}}
|
|
696
671
|
${c(this.inputRef)}
|
|
697
672
|
/>
|
|
698
|
-
<div class="${
|
|
673
|
+
<div class="${k(t)}" id="${this.id}-to-label">
|
|
699
674
|
${this.strings.generic.to}
|
|
700
675
|
</div>
|
|
701
|
-
${this.showRangeLabels ?
|
|
676
|
+
${this.showRangeLabels ? A : d` <div class="pkt-input-separator">–</div> `}
|
|
702
677
|
<input
|
|
703
|
-
class=${
|
|
678
|
+
class=${k(this.inputClasses)}
|
|
704
679
|
.type=${this.inputType}
|
|
705
680
|
id="${this.id}-to"
|
|
706
681
|
aria-labelledby="${this.id}-to-label"
|
|
707
682
|
.value=${this.value[1] ?? ""}
|
|
708
|
-
min=${
|
|
709
|
-
max=${
|
|
710
|
-
placeholder=${
|
|
683
|
+
min=${C(this.min)}
|
|
684
|
+
max=${C(this.max)}
|
|
685
|
+
placeholder=${C(this.placeholder)}
|
|
711
686
|
?readonly=${this.isInputReadonly}
|
|
712
687
|
?disabled=${this.disabled}
|
|
713
688
|
@click=${(e) => {
|
|
@@ -716,7 +691,7 @@ let m = class extends O {
|
|
|
716
691
|
@touchend=${(e) => {
|
|
717
692
|
e.preventDefault(), this.dispatchToggleCalendar(e);
|
|
718
693
|
}}
|
|
719
|
-
@keydown=${(e) =>
|
|
694
|
+
@keydown=${(e) => x.handleInputKeydown(
|
|
720
695
|
e,
|
|
721
696
|
(s) => this.dispatchToggleCalendar(s),
|
|
722
697
|
() => D.submitFormOrFallback(this.internals, () => {
|
|
@@ -733,7 +708,7 @@ let m = class extends O {
|
|
|
733
708
|
this.dispatchInput(e), e.stopImmediatePropagation();
|
|
734
709
|
}}
|
|
735
710
|
@focus=${() => {
|
|
736
|
-
this.dispatchFocus(),
|
|
711
|
+
this.dispatchFocus(), E() && this.dispatchToggleCalendar(new Event("focus"));
|
|
737
712
|
}}
|
|
738
713
|
@blur=${(e) => {
|
|
739
714
|
this.dispatchBlur(e), e.target.value && (this.dispatchManageValidity(e.target), this.dispatchEvent(
|
|
@@ -756,10 +731,10 @@ let m = class extends O {
|
|
|
756
731
|
${c(this.inputRefTo)}
|
|
757
732
|
/>
|
|
758
733
|
<button
|
|
759
|
-
class="${
|
|
734
|
+
class="${k(S.getButtonClasses())}"
|
|
760
735
|
type="button"
|
|
761
736
|
@click=${(e) => this.dispatchToggleCalendar(e)}
|
|
762
|
-
@keydown=${(e) =>
|
|
737
|
+
@keydown=${(e) => x.handleButtonKeydown(e, (s) => this.dispatchToggleCalendar(s))}
|
|
763
738
|
?disabled=${this.disabled}
|
|
764
739
|
${c(this.btnRef)}
|
|
765
740
|
>
|
|
@@ -807,14 +782,14 @@ b([
|
|
|
807
782
|
a({ type: Object })
|
|
808
783
|
], m.prototype, "strings", 2);
|
|
809
784
|
m = b([
|
|
810
|
-
|
|
785
|
+
R("pkt-datepicker-range")
|
|
811
786
|
], m);
|
|
812
|
-
var
|
|
813
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
787
|
+
var dt = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, $ = (t, e, s, n) => {
|
|
788
|
+
for (var i = n > 1 ? void 0 : n ? ct(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
814
789
|
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
815
|
-
return n && i &&
|
|
790
|
+
return n && i && dt(e, s, i), i;
|
|
816
791
|
};
|
|
817
|
-
let f = class extends
|
|
792
|
+
let f = class extends I {
|
|
818
793
|
constructor() {
|
|
819
794
|
super(...arguments), this.value = [], this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.strings = { calendar: { buttonAltText: "Åpne kalender" } }, this.inputRef = u(), this.btnRef = u();
|
|
820
795
|
}
|
|
@@ -890,12 +865,12 @@ let f = class extends O {
|
|
|
890
865
|
return d`
|
|
891
866
|
<div class="pkt-input__container">
|
|
892
867
|
<input
|
|
893
|
-
class=${
|
|
868
|
+
class=${k(this.inputClasses)}
|
|
894
869
|
.type=${this.inputType}
|
|
895
870
|
id="${this.id}-input"
|
|
896
|
-
min=${
|
|
897
|
-
max=${
|
|
898
|
-
placeholder=${
|
|
871
|
+
min=${C(this.min)}
|
|
872
|
+
max=${C(this.max)}
|
|
873
|
+
placeholder=${C(this.placeholder)}
|
|
899
874
|
?readonly=${this.isInputReadonly}
|
|
900
875
|
?disabled=${this.isInputDisabled}
|
|
901
876
|
@click=${(t) => {
|
|
@@ -911,9 +886,9 @@ let f = class extends O {
|
|
|
911
886
|
this.dispatchInput(t), t.stopImmediatePropagation();
|
|
912
887
|
}}
|
|
913
888
|
@focus=${() => {
|
|
914
|
-
this.dispatchFocus(),
|
|
889
|
+
this.dispatchFocus(), E() && this.dispatchToggleCalendar(new Event("focus"));
|
|
915
890
|
}}
|
|
916
|
-
@keydown=${(t) =>
|
|
891
|
+
@keydown=${(t) => x.handleInputKeydown(
|
|
917
892
|
t,
|
|
918
893
|
(e) => this.dispatchToggleCalendar(e),
|
|
919
894
|
() => D.submitFormOrFallback(this.internals, () => {
|
|
@@ -930,10 +905,10 @@ let f = class extends O {
|
|
|
930
905
|
${c(this.inputRef)}
|
|
931
906
|
/>
|
|
932
907
|
<button
|
|
933
|
-
class="${
|
|
908
|
+
class="${k(S.getButtonClasses())}"
|
|
934
909
|
type="button"
|
|
935
910
|
@click=${(t) => this.dispatchToggleCalendar(t)}
|
|
936
|
-
@keydown=${(t) =>
|
|
911
|
+
@keydown=${(t) => x.handleButtonKeydown(t, (e) => this.dispatchToggleCalendar(e))}
|
|
937
912
|
?disabled=${this.disabled}
|
|
938
913
|
${c(this.btnRef)}
|
|
939
914
|
>
|
|
@@ -981,22 +956,22 @@ $([
|
|
|
981
956
|
a({ type: Object })
|
|
982
957
|
], f.prototype, "strings", 2);
|
|
983
958
|
f = $([
|
|
984
|
-
|
|
959
|
+
R("pkt-datepicker-multiple")
|
|
985
960
|
], f);
|
|
986
|
-
var
|
|
987
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
961
|
+
var gt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, o = (t, e, s, n) => {
|
|
962
|
+
for (var i = n > 1 ? void 0 : n ? mt(e, s) : e, l = t.length - 1, r; l >= 0; l--)
|
|
988
963
|
(r = t[l]) && (i = (n ? r(e, s, i) : r(i)) || i);
|
|
989
|
-
return n && i &&
|
|
964
|
+
return n && i && gt(e, s, i), i;
|
|
990
965
|
};
|
|
991
|
-
let p = class extends
|
|
966
|
+
let p = class extends X {
|
|
992
967
|
/**
|
|
993
968
|
* Housekeeping / lifecycle methods
|
|
994
969
|
*/
|
|
995
970
|
constructor() {
|
|
996
|
-
super(), this._valueProperty = "", this.datepickerPopupRef = u(), this._value = [], this.label = "Datovelger", this.dateformat =
|
|
971
|
+
super(), this._valueProperty = "", this.datepickerPopupRef = u(), this._value = [], this.label = "Datovelger", this.dateformat = _.props.dateformat.default, this.multiple = _.props.multiple.default, this.maxlength = null, this.range = _.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = _.props.weeknumbers.default, this.withcontrols = _.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.calRef = u(), this.popupRef = u(), this.helptextSlot = u(), this.singleInputRef = u(), this.rangeInputRef = u(), this.multipleInputRef = u(), this.addToSelected = (t) => {
|
|
997
972
|
const e = this.datepickerPopupRef.value;
|
|
998
|
-
return e && typeof e.addToSelected == "function" ? e.addToSelected(t, this.min, this.max) :
|
|
999
|
-
}, this.slotController = new
|
|
973
|
+
return e && typeof e.addToSelected == "function" ? e.addToSelected(t, this.min, this.max) : F.addToSelected(t, this.calRef, this.min, this.max);
|
|
974
|
+
}, this.slotController = new et(this, this.helptextSlot);
|
|
1000
975
|
}
|
|
1001
976
|
get value() {
|
|
1002
977
|
return this._valueProperty;
|
|
@@ -1009,10 +984,10 @@ let p = class extends J {
|
|
|
1009
984
|
* Computed properties
|
|
1010
985
|
*/
|
|
1011
986
|
get inputType() {
|
|
1012
|
-
return
|
|
987
|
+
return nt.getInputType();
|
|
1013
988
|
}
|
|
1014
989
|
connectedCallback() {
|
|
1015
|
-
super.connectedCallback(), this.timezone && this.timezone !== window.pktTz && (window.pktTz = this.timezone), this.name =
|
|
990
|
+
super.connectedCallback(), this.timezone && this.timezone !== window.pktTz && (window.pktTz = this.timezone), this.name = B.normalizeNameForMultiple(this.name, this.multiple, this.range) || this.name;
|
|
1016
991
|
}
|
|
1017
992
|
disconnectedCallback() {
|
|
1018
993
|
super.disconnectedCallback();
|
|
@@ -1022,30 +997,30 @@ let p = class extends J {
|
|
|
1022
997
|
}
|
|
1023
998
|
valueChanged(t, e) {
|
|
1024
999
|
if (t === e) return;
|
|
1025
|
-
const s =
|
|
1000
|
+
const s = O(t), n = this.multiple && s.length > 1 ? B.filterSelectableDates(
|
|
1026
1001
|
s,
|
|
1027
1002
|
this.min,
|
|
1028
1003
|
this.max,
|
|
1029
1004
|
this.excludedates,
|
|
1030
1005
|
this.excludeweekdays
|
|
1031
1006
|
) : s;
|
|
1032
|
-
if (this.range && !
|
|
1007
|
+
if (this.range && !B.validateRangeOrder(n)) {
|
|
1033
1008
|
this._value = [], this._valueProperty = "", super.valueChanged("", e);
|
|
1034
1009
|
return;
|
|
1035
1010
|
}
|
|
1036
1011
|
this._value = n;
|
|
1037
|
-
const i =
|
|
1012
|
+
const i = G(n);
|
|
1038
1013
|
this._valueProperty !== i && (this._valueProperty = i), super.valueChanged(i, e);
|
|
1039
1014
|
}
|
|
1040
1015
|
attributeChangedCallback(t, e, s) {
|
|
1041
|
-
t === "value" && this.value !== e && this.valueChanged(s, e), t === "excludedates" && typeof this.excludedates == "string" && (this.excludedates =
|
|
1016
|
+
t === "value" && this.value !== e && this.valueChanged(s, e), t === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = O(s || "")), t === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = O(s || "")), super.attributeChangedCallback(t, e, s);
|
|
1042
1017
|
}
|
|
1043
1018
|
updated(t) {
|
|
1044
1019
|
if (t.has("value")) {
|
|
1045
1020
|
const e = Array.isArray(this.value) ? this.value.join(",") : this.value, s = t.get("value"), n = Array.isArray(s) ? s.join(",") : s;
|
|
1046
1021
|
this.valueChanged(e, n);
|
|
1047
1022
|
}
|
|
1048
|
-
(t.has("multiple") || t.has("range")) && (this.name =
|
|
1023
|
+
(t.has("multiple") || t.has("range")) && (this.name = B.normalizeNameForMultiple(this.name, this.multiple, this.range) || this.name), t.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value = O(this.value) : !this.multiple && Array.isArray(this._value) && (this._value = this._value.filter(Boolean)), !this.multiple && !this.range && Array.isArray(this._value) && (this._value = [this._value[0] ?? ""])), super.updated(t);
|
|
1049
1024
|
}
|
|
1050
1025
|
/**
|
|
1051
1026
|
* Element references
|
|
@@ -1133,7 +1108,7 @@ let p = class extends J {
|
|
|
1133
1108
|
(e = this.calRef.value) != null && e.contains(t.detail.relatedTarget) || this.onBlur();
|
|
1134
1109
|
}}
|
|
1135
1110
|
@range-blur=${(t) => {
|
|
1136
|
-
|
|
1111
|
+
M.processRangeBlur(
|
|
1137
1112
|
t.detail.event,
|
|
1138
1113
|
t.detail.values,
|
|
1139
1114
|
this.calRef,
|
|
@@ -1147,8 +1122,8 @@ let p = class extends J {
|
|
|
1147
1122
|
}}
|
|
1148
1123
|
@handle-date-select=${(t) => {
|
|
1149
1124
|
var s, n;
|
|
1150
|
-
const e =
|
|
1151
|
-
e && this._value[1] !==
|
|
1125
|
+
const e = L(t.detail);
|
|
1126
|
+
e && this._value[1] !== J(e) && ((n = (s = this.calRef) == null ? void 0 : s.value) == null || n.handleDateSelect(e));
|
|
1152
1127
|
}}
|
|
1153
1128
|
@input-changed=${() => {
|
|
1154
1129
|
this.touched = !0;
|
|
@@ -1202,9 +1177,9 @@ let p = class extends J {
|
|
|
1202
1177
|
.latest=${this.max}
|
|
1203
1178
|
.excludedates=${Array.isArray(this.excludedates) ? this.excludedates : this.excludedates.split(",")}
|
|
1204
1179
|
.excludeweekdays=${this.excludeweekdays}
|
|
1205
|
-
.currentmonth=${this.currentmonth ?
|
|
1180
|
+
.currentmonth=${this.currentmonth ? Q(this.currentmonth) : null}
|
|
1206
1181
|
@date-selected=${(t) => {
|
|
1207
|
-
this.value =
|
|
1182
|
+
this.value = M.processDateSelection(t.detail, this.multiple, this.range), this._value = t.detail, M.updateInputValues(
|
|
1208
1183
|
this.inputRef,
|
|
1209
1184
|
this.inputRefTo,
|
|
1210
1185
|
this._value,
|
|
@@ -1221,7 +1196,7 @@ let p = class extends J {
|
|
|
1221
1196
|
`;
|
|
1222
1197
|
}
|
|
1223
1198
|
render() {
|
|
1224
|
-
return this.inputClasses =
|
|
1199
|
+
return this.inputClasses = S.getInputClasses(
|
|
1225
1200
|
this.fullwidth,
|
|
1226
1201
|
this.showRangeLabels,
|
|
1227
1202
|
this.multiple,
|
|
@@ -1261,10 +1236,10 @@ let p = class extends J {
|
|
|
1261
1236
|
id-base=${this.id}
|
|
1262
1237
|
@date-tag-removed=${(t) => {
|
|
1263
1238
|
var n;
|
|
1264
|
-
const e = this.datepickerPopupRef.value, s =
|
|
1239
|
+
const e = this.datepickerPopupRef.value, s = L(t.detail);
|
|
1265
1240
|
e && s && typeof e.handleDateSelect == "function" ? e.handleDateSelect(s) : (n = this.calRef.value) == null || n.handleDateSelect(s);
|
|
1266
1241
|
}}
|
|
1267
|
-
></pkt-date-tags>` :
|
|
1242
|
+
></pkt-date-tags>` : A}
|
|
1268
1243
|
<div
|
|
1269
1244
|
class="pkt-datepicker__inputs ${this.range && this.showRangeLabels ? "pkt-input__range-inputs" : ""}"
|
|
1270
1245
|
>
|
|
@@ -1279,16 +1254,16 @@ let p = class extends J {
|
|
|
1279
1254
|
*/
|
|
1280
1255
|
handleCalendarPosition() {
|
|
1281
1256
|
const t = this.multiple && !!this.maxlength;
|
|
1282
|
-
|
|
1257
|
+
F.handleCalendarPosition(this.popupRef, this.inputRef, t);
|
|
1283
1258
|
}
|
|
1284
1259
|
async showCalendar() {
|
|
1285
1260
|
var e;
|
|
1286
1261
|
const t = this.datepickerPopupRef.value;
|
|
1287
1262
|
if (this.calendarOpen = !0, t && typeof t.show == "function") {
|
|
1288
|
-
t.show(),
|
|
1263
|
+
t.show(), E() && t.focusOnCurrentDate();
|
|
1289
1264
|
return;
|
|
1290
1265
|
}
|
|
1291
|
-
await
|
|
1266
|
+
await tt(20), this.handleCalendarPosition(), E() && ((e = this.calRef.value) == null || e.focusOnCurrentDate());
|
|
1292
1267
|
}
|
|
1293
1268
|
hideCalendar() {
|
|
1294
1269
|
const t = this.datepickerPopupRef.value;
|
|
@@ -1351,10 +1326,10 @@ o([
|
|
|
1351
1326
|
a({ type: Boolean, reflect: !0 })
|
|
1352
1327
|
], p.prototype, "withcontrols", 2);
|
|
1353
1328
|
o([
|
|
1354
|
-
a({ converter:
|
|
1329
|
+
a({ converter: z.csvToArray })
|
|
1355
1330
|
], p.prototype, "excludedates", 2);
|
|
1356
1331
|
o([
|
|
1357
|
-
a({ converter:
|
|
1332
|
+
a({ converter: z.csvToArray })
|
|
1358
1333
|
], p.prototype, "excludeweekdays", 2);
|
|
1359
1334
|
o([
|
|
1360
1335
|
a({ type: String })
|
|
@@ -1366,13 +1341,13 @@ o([
|
|
|
1366
1341
|
a({ type: String })
|
|
1367
1342
|
], p.prototype, "timezone", 2);
|
|
1368
1343
|
o([
|
|
1369
|
-
|
|
1344
|
+
q()
|
|
1370
1345
|
], p.prototype, "inputClasses", 2);
|
|
1371
1346
|
p = o([
|
|
1372
|
-
|
|
1347
|
+
R("pkt-datepicker")
|
|
1373
1348
|
], p);
|
|
1374
1349
|
export {
|
|
1375
|
-
|
|
1350
|
+
T as P,
|
|
1376
1351
|
p as a,
|
|
1377
1352
|
y as b,
|
|
1378
1353
|
m as c,
|