@oslokommune/punkt-react 18.7.0 → 18.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/components/combobox/Combobox.preselection.test.d.ts +0 -0
- package/dist/components/combobox/types.d.ts +2 -0
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +809 -787
- package/dist/shared-strings/nb.d.ts +1 -0
- package/package.json +8 -10
- package/src/components/combobox/Combobox.accessibility.test.tsx +8 -7
- package/src/components/combobox/Combobox.interaction.test.tsx +38 -0
- package/src/components/combobox/Combobox.preselection.test.tsx +247 -0
- package/src/components/combobox/ComboboxInput.tsx +14 -3
- package/src/components/combobox/Listbox.tsx +2 -1
- package/src/components/combobox/types.ts +2 -0
- package/src/components/combobox/useComboboxState.ts +51 -17
package/dist/punkt-react.js
CHANGED
|
@@ -297,6 +297,7 @@ var ce = {
|
|
|
297
297
|
tooManySelected: "For mange valgt",
|
|
298
298
|
alreadySelected: "Verdien er allerede valgt",
|
|
299
299
|
valueAdded: "Ny verdi lagt til",
|
|
300
|
+
valueSelected: "{value} er valgt",
|
|
300
301
|
noValidValue: "Ingen gyldig verdi valgt"
|
|
301
302
|
},
|
|
302
303
|
fileupload: {
|
|
@@ -331,16 +332,16 @@ var ce = {
|
|
|
331
332
|
function B(e, t) {
|
|
332
333
|
return t ? e.replace(z, (n, r) => {
|
|
333
334
|
let i = t[r];
|
|
334
|
-
return i == null ? (
|
|
335
|
+
return i == null ? (H(r, e), n) : String(i);
|
|
335
336
|
}) : e;
|
|
336
337
|
}
|
|
337
|
-
function
|
|
338
|
+
function le(e, t, n) {
|
|
338
339
|
return e === 1 ? t : n;
|
|
339
340
|
}
|
|
340
|
-
var
|
|
341
|
-
function
|
|
341
|
+
var V = /* @__PURE__ */ new Set();
|
|
342
|
+
function H(e, t) {
|
|
342
343
|
let n = `${e}::${t}`;
|
|
343
|
-
|
|
344
|
+
V.has(n) || (V.add(n), console.warn(`[punkt] Mangler verdi for plassholderen {${e}} i teksten «${t}»`));
|
|
344
345
|
}
|
|
345
346
|
//#endregion
|
|
346
347
|
//#region ../../shared-strings/store.ts
|
|
@@ -352,7 +353,7 @@ function U() {
|
|
|
352
353
|
listeners: /* @__PURE__ */ new Set()
|
|
353
354
|
}), e[ue];
|
|
354
355
|
}
|
|
355
|
-
function
|
|
356
|
+
function W(e) {
|
|
356
357
|
let t = U(), n = { ...t.overrides };
|
|
357
358
|
for (let t of Object.keys(e)) {
|
|
358
359
|
let r = e[t];
|
|
@@ -363,14 +364,14 @@ function de(e) {
|
|
|
363
364
|
}
|
|
364
365
|
t.overrides = n, t.listeners.forEach((e) => e());
|
|
365
366
|
}
|
|
366
|
-
function
|
|
367
|
+
function G() {
|
|
367
368
|
return U().overrides;
|
|
368
369
|
}
|
|
369
|
-
function
|
|
370
|
+
function K() {
|
|
370
371
|
let e = U();
|
|
371
372
|
e.overrides = {}, e.listeners.forEach((e) => e());
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function q(e) {
|
|
374
375
|
let t = U();
|
|
375
376
|
return t.listeners.add(e), () => {
|
|
376
377
|
t.listeners.delete(e);
|
|
@@ -378,44 +379,44 @@ function K(e) {
|
|
|
378
379
|
}
|
|
379
380
|
//#endregion
|
|
380
381
|
//#region ../../shared-strings/resolve.ts
|
|
381
|
-
var
|
|
382
|
-
function
|
|
382
|
+
var de = /* @__PURE__ */ new Map();
|
|
383
|
+
function J(e, t) {
|
|
383
384
|
if (t) for (let n of Object.keys(t)) {
|
|
384
385
|
let r = t[n];
|
|
385
386
|
r !== void 0 && (e[n] = r);
|
|
386
387
|
}
|
|
387
388
|
}
|
|
388
|
-
function
|
|
389
|
+
function Y(e) {
|
|
389
390
|
return !!e && Object.keys(e).length > 0;
|
|
390
391
|
}
|
|
391
|
-
function
|
|
392
|
-
let t =
|
|
392
|
+
function fe(e) {
|
|
393
|
+
let t = G(), n = de.get(e);
|
|
393
394
|
if (n && n.overrides === t) return n.value;
|
|
394
395
|
let r = t[e], i;
|
|
395
|
-
if (
|
|
396
|
+
if (Y(r)) {
|
|
396
397
|
let t = { ...ce[e] };
|
|
397
|
-
|
|
398
|
+
J(t, r), i = t;
|
|
398
399
|
} else i = ce[e];
|
|
399
|
-
return
|
|
400
|
+
return de.set(e, {
|
|
400
401
|
overrides: t,
|
|
401
402
|
value: i
|
|
402
403
|
}), i;
|
|
403
404
|
}
|
|
404
|
-
function
|
|
405
|
-
let n = t.filter((t) =>
|
|
405
|
+
function pe(e, ...t) {
|
|
406
|
+
let n = t.filter((t) => Y(t?.[e])), r = fe(e);
|
|
406
407
|
if (n.length === 0) return r;
|
|
407
408
|
let i = { ...r };
|
|
408
|
-
for (let t of n)
|
|
409
|
+
for (let t of n) J(i, t?.[e]);
|
|
409
410
|
return i;
|
|
410
411
|
}
|
|
411
|
-
function
|
|
412
|
+
function me(e, ...t) {
|
|
412
413
|
let n = {};
|
|
413
|
-
for (let r of e) n[r] =
|
|
414
|
+
for (let r of e) n[r] = pe(r, ...t);
|
|
414
415
|
return n;
|
|
415
416
|
}
|
|
416
417
|
//#endregion
|
|
417
418
|
//#region ../../shared-strings/consent.ts
|
|
418
|
-
var
|
|
419
|
+
var X = {
|
|
419
420
|
i18n: {
|
|
420
421
|
nb: {
|
|
421
422
|
contentPresentation: {
|
|
@@ -528,7 +529,7 @@ var he = {
|
|
|
528
529
|
//#endregion
|
|
529
530
|
//#region src/components/button/Button.tsx
|
|
530
531
|
typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/18.7/animations/");
|
|
531
|
-
var
|
|
532
|
+
var Z = i(({ children: e, className: t, iconName: n = "user", secondIconName: r = "user", iconPath: i, secondIconPath: a, size: o = "medium", fullWidth: s = !1, fullWidthOnMobile: c = !1, skin: l = "primary", type: u = "button", variant: d = "label-only", state: f, color: p, isLoading: m = void 0, disabled: h = void 0, loadingAnimationPath: g = window.pktAnimationPath, ...y }, b) => {
|
|
532
533
|
let x = [
|
|
533
534
|
t,
|
|
534
535
|
"pkt-btn",
|
|
@@ -572,11 +573,11 @@ var X = i(({ children: e, className: t, iconName: n = "user", secondIconName: r
|
|
|
572
573
|
]
|
|
573
574
|
});
|
|
574
575
|
});
|
|
575
|
-
|
|
576
|
+
Z.displayName = "PktButton";
|
|
576
577
|
//#endregion
|
|
577
578
|
//#region src/components/strings/PktStringsProvider.tsx
|
|
578
|
-
var
|
|
579
|
-
let n = s(
|
|
579
|
+
var he = n(void 0), Q = ({ strings: e, children: t }) => {
|
|
580
|
+
let n = s(he), r = f(() => {
|
|
580
581
|
if (!n) return e;
|
|
581
582
|
let t = { ...n };
|
|
582
583
|
for (let n of Object.keys(e)) t[n] = {
|
|
@@ -585,7 +586,7 @@ var Z = n(void 0), Q = ({ strings: e, children: t }) => {
|
|
|
585
586
|
};
|
|
586
587
|
return t;
|
|
587
588
|
}, [n, e]);
|
|
588
|
-
return /* @__PURE__ */ _(
|
|
589
|
+
return /* @__PURE__ */ _(he.Provider, {
|
|
589
590
|
value: r,
|
|
590
591
|
children: t
|
|
591
592
|
});
|
|
@@ -593,8 +594,8 @@ var Z = n(void 0), Q = ({ strings: e, children: t }) => {
|
|
|
593
594
|
//#endregion
|
|
594
595
|
//#region src/hooks/usePktStrings.ts
|
|
595
596
|
function ge(e, t) {
|
|
596
|
-
let n = h(
|
|
597
|
-
return f(() =>
|
|
597
|
+
let n = h(q, G, G), r = s(he), i = e.join("|");
|
|
598
|
+
return f(() => me(e, r, t), [
|
|
598
599
|
i,
|
|
599
600
|
n,
|
|
600
601
|
r,
|
|
@@ -603,7 +604,7 @@ function ge(e, t) {
|
|
|
603
604
|
}
|
|
604
605
|
//#endregion
|
|
605
606
|
//#region src/components/alert/Alert.tsx
|
|
606
|
-
var
|
|
607
|
+
var $ = ({ children: e, closeAlert: t, compact: n, size: r = n ? "small" : "medium", title: i, date: a, ariaLive: s, "aria-live": c = "polite", role: l = "status", skin: u = "info", className: d, strings: f, ...p }) => {
|
|
607
608
|
let [h, g] = m(!1), y = ge(["generic", "alert"], f), b = {
|
|
608
609
|
"pkt-alert": !0,
|
|
609
610
|
[`pkt-alert--${r}`]: r,
|
|
@@ -635,7 +636,7 @@ var _e = ({ children: e, closeAlert: t, compact: n, size: r = n ? "small" : "med
|
|
|
635
636
|
}),
|
|
636
637
|
t && /* @__PURE__ */ _("div", {
|
|
637
638
|
className: "pkt-alert__close",
|
|
638
|
-
children: /* @__PURE__ */ _(
|
|
639
|
+
children: /* @__PURE__ */ _(Z, {
|
|
639
640
|
tabIndex: 0,
|
|
640
641
|
"aria-label": "close",
|
|
641
642
|
size: r,
|
|
@@ -666,10 +667,10 @@ var _e = ({ children: e, closeAlert: t, compact: n, size: r = n ? "small" : "med
|
|
|
666
667
|
})
|
|
667
668
|
});
|
|
668
669
|
};
|
|
669
|
-
|
|
670
|
+
$.displayName = "PktAlert";
|
|
670
671
|
//#endregion
|
|
671
672
|
//#region src/components/backlink/BackLink.tsx
|
|
672
|
-
var
|
|
673
|
+
var _e = i(({ href: e = "/", text: t = "Forsiden", ariaLabel: n, renderLink: r, className: i, strings: a, ...o }, s) => {
|
|
673
674
|
let c = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(L, {
|
|
674
675
|
className: "pkt-back-link__icon pkt-icon pkt-link__icon",
|
|
675
676
|
name: "chevron-thin-left",
|
|
@@ -695,10 +696,10 @@ var ve = i(({ href: e = "/", text: t = "Forsiden", ariaLabel: n, renderLink: r,
|
|
|
695
696
|
})
|
|
696
697
|
});
|
|
697
698
|
});
|
|
698
|
-
|
|
699
|
+
_e.displayName = "PktBackLink";
|
|
699
700
|
//#endregion
|
|
700
701
|
//#region src/components/breadcrumbs/Breadcrumbs.tsx
|
|
701
|
-
var
|
|
702
|
+
var ve = i(({ breadcrumbs: e, navigationType: t, renderLink: n, className: r, strings: i, ...a }, o) => {
|
|
702
703
|
let s = e, c = s[s.length - 2], l = ge(["breadcrumbs"], i), u = [r, "pkt-breadcrumbs"].filter(Boolean).join(" "), d = n || (t === "router" ? ({ href: e, className: t, children: n, props: r }) => /* @__PURE__ */ _(y, {
|
|
703
704
|
to: e,
|
|
704
705
|
className: t,
|
|
@@ -754,44 +755,44 @@ var ye = i(({ breadcrumbs: e, navigationType: t, renderLink: n, className: r, st
|
|
|
754
755
|
})]
|
|
755
756
|
});
|
|
756
757
|
});
|
|
757
|
-
|
|
758
|
+
ve.displayName = "PktBreadcrumbs";
|
|
758
759
|
//#endregion
|
|
759
760
|
//#region ../../node_modules/date-fns/constants.js
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
var
|
|
761
|
+
var ye = 365.2425, be = 6048e5, xe = 864e5, Se = 86400;
|
|
762
|
+
Se * 7, Se * ye / 12 * 3;
|
|
763
|
+
var Ce = Symbol.for("constructDateFrom");
|
|
763
764
|
//#endregion
|
|
764
765
|
//#region ../../node_modules/date-fns/constructFrom.js
|
|
765
|
-
function
|
|
766
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
766
|
+
function we(e, t) {
|
|
767
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && Ce in e ? e[Ce](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
767
768
|
}
|
|
768
769
|
//#endregion
|
|
769
770
|
//#region ../../node_modules/date-fns/toDate.js
|
|
770
|
-
function
|
|
771
|
-
return
|
|
771
|
+
function Te(e, t) {
|
|
772
|
+
return we(t || e, e);
|
|
772
773
|
}
|
|
773
774
|
//#endregion
|
|
774
775
|
//#region ../../node_modules/date-fns/addDays.js
|
|
775
|
-
function
|
|
776
|
-
let r =
|
|
777
|
-
return isNaN(t) ?
|
|
776
|
+
function Ee(e, t, n) {
|
|
777
|
+
let r = Te(e, n?.in);
|
|
778
|
+
return isNaN(t) ? we(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
778
779
|
}
|
|
779
780
|
//#endregion
|
|
780
781
|
//#region ../../node_modules/date-fns/_lib/defaultOptions.js
|
|
781
|
-
var
|
|
782
|
-
function
|
|
783
|
-
return
|
|
782
|
+
var De = {};
|
|
783
|
+
function Oe() {
|
|
784
|
+
return De;
|
|
784
785
|
}
|
|
785
786
|
//#endregion
|
|
786
787
|
//#region ../../node_modules/date-fns/startOfWeek.js
|
|
787
|
-
function
|
|
788
|
-
let n =
|
|
788
|
+
function ke(e, t) {
|
|
789
|
+
let n = Oe(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = Te(e, t?.in), a = i.getDay(), o = (a < r ? 7 : 0) + a - r;
|
|
789
790
|
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
790
791
|
}
|
|
791
792
|
//#endregion
|
|
792
793
|
//#region ../../node_modules/date-fns/startOfISOWeek.js
|
|
793
794
|
function Ae(e, t) {
|
|
794
|
-
return
|
|
795
|
+
return ke(e, {
|
|
795
796
|
...t,
|
|
796
797
|
weekStartsOn: 1
|
|
797
798
|
});
|
|
@@ -799,9 +800,9 @@ function Ae(e, t) {
|
|
|
799
800
|
//#endregion
|
|
800
801
|
//#region ../../node_modules/date-fns/getISOWeekYear.js
|
|
801
802
|
function je(e, t) {
|
|
802
|
-
let n =
|
|
803
|
+
let n = Te(e, t?.in), r = n.getFullYear(), i = we(n, 0);
|
|
803
804
|
i.setFullYear(r + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
804
|
-
let a = Ae(i), o =
|
|
805
|
+
let a = Ae(i), o = we(n, 0);
|
|
805
806
|
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
806
807
|
let s = Ae(o);
|
|
807
808
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
@@ -809,31 +810,31 @@ function je(e, t) {
|
|
|
809
810
|
//#endregion
|
|
810
811
|
//#region ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
811
812
|
function Me(e) {
|
|
812
|
-
let t =
|
|
813
|
+
let t = Te(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
813
814
|
return n.setUTCFullYear(t.getFullYear()), e - +n;
|
|
814
815
|
}
|
|
815
816
|
//#endregion
|
|
816
817
|
//#region ../../node_modules/date-fns/_lib/normalizeDates.js
|
|
817
818
|
function Ne(e, ...t) {
|
|
818
|
-
let n =
|
|
819
|
+
let n = we.bind(null, e || t.find((e) => typeof e == "object"));
|
|
819
820
|
return t.map(n);
|
|
820
821
|
}
|
|
821
822
|
//#endregion
|
|
822
823
|
//#region ../../node_modules/date-fns/startOfDay.js
|
|
823
824
|
function Pe(e, t) {
|
|
824
|
-
let n =
|
|
825
|
+
let n = Te(e, t?.in);
|
|
825
826
|
return n.setHours(0, 0, 0, 0), n;
|
|
826
827
|
}
|
|
827
828
|
//#endregion
|
|
828
829
|
//#region ../../node_modules/date-fns/differenceInCalendarDays.js
|
|
829
830
|
function Fe(e, t, n) {
|
|
830
831
|
let [r, i] = Ne(n?.in, e, t), a = Pe(r), o = Pe(i), s = +a - Me(a), c = +o - Me(o);
|
|
831
|
-
return Math.round((s - c) /
|
|
832
|
+
return Math.round((s - c) / xe);
|
|
832
833
|
}
|
|
833
834
|
//#endregion
|
|
834
835
|
//#region ../../node_modules/date-fns/startOfISOWeekYear.js
|
|
835
836
|
function Ie(e, t) {
|
|
836
|
-
let n = je(e, t), r =
|
|
837
|
+
let n = je(e, t), r = we(t?.in || e, 0);
|
|
837
838
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Ae(r);
|
|
838
839
|
}
|
|
839
840
|
//#endregion
|
|
@@ -844,12 +845,12 @@ function Le(e) {
|
|
|
844
845
|
//#endregion
|
|
845
846
|
//#region ../../node_modules/date-fns/isValid.js
|
|
846
847
|
function Re(e) {
|
|
847
|
-
return !(!Le(e) && typeof e != "number" || isNaN(+
|
|
848
|
+
return !(!Le(e) && typeof e != "number" || isNaN(+Te(e)));
|
|
848
849
|
}
|
|
849
850
|
//#endregion
|
|
850
851
|
//#region ../../node_modules/date-fns/endOfDay.js
|
|
851
852
|
function ze(e, t) {
|
|
852
|
-
let n =
|
|
853
|
+
let n = Te(e, t?.in);
|
|
853
854
|
return n.setHours(23, 59, 59, 999), n;
|
|
854
855
|
}
|
|
855
856
|
//#endregion
|
|
@@ -870,13 +871,13 @@ function Ve(e, t) {
|
|
|
870
871
|
if (!s) return [];
|
|
871
872
|
s < 0 && (s = -s, i = !i);
|
|
872
873
|
let c = [];
|
|
873
|
-
for (; +o <= a;) c.push(
|
|
874
|
+
for (; +o <= a;) c.push(we(n, o)), o.setDate(o.getDate() + s), o.setHours(0, 0, 0, 0);
|
|
874
875
|
return i ? c.reverse() : c;
|
|
875
876
|
}
|
|
876
877
|
//#endregion
|
|
877
878
|
//#region ../../node_modules/date-fns/startOfYear.js
|
|
878
879
|
function He(e, t) {
|
|
879
|
-
let n =
|
|
880
|
+
let n = Te(e, t?.in);
|
|
880
881
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
881
882
|
}
|
|
882
883
|
//#endregion
|
|
@@ -1380,36 +1381,36 @@ var tt = {
|
|
|
1380
1381
|
//#endregion
|
|
1381
1382
|
//#region ../../node_modules/date-fns/getDayOfYear.js
|
|
1382
1383
|
function nt(e, t) {
|
|
1383
|
-
let n =
|
|
1384
|
+
let n = Te(e, t?.in);
|
|
1384
1385
|
return Fe(n, He(n)) + 1;
|
|
1385
1386
|
}
|
|
1386
1387
|
//#endregion
|
|
1387
1388
|
//#region ../../node_modules/date-fns/getISOWeek.js
|
|
1388
1389
|
function rt(e, t) {
|
|
1389
|
-
let n =
|
|
1390
|
-
return Math.round(r /
|
|
1390
|
+
let n = Te(e, t?.in), r = Ae(n) - +Ie(n);
|
|
1391
|
+
return Math.round(r / be) + 1;
|
|
1391
1392
|
}
|
|
1392
1393
|
//#endregion
|
|
1393
1394
|
//#region ../../node_modules/date-fns/getWeekYear.js
|
|
1394
1395
|
function it(e, t) {
|
|
1395
|
-
let n =
|
|
1396
|
+
let n = Te(e, t?.in), r = n.getFullYear(), i = Oe(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = we(t?.in || e, 0);
|
|
1396
1397
|
o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
1397
|
-
let s =
|
|
1398
|
+
let s = ke(o, t), c = we(t?.in || e, 0);
|
|
1398
1399
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
1399
|
-
let l =
|
|
1400
|
+
let l = ke(c, t);
|
|
1400
1401
|
return +n >= +s ? r + 1 : +n >= +l ? r : r - 1;
|
|
1401
1402
|
}
|
|
1402
1403
|
//#endregion
|
|
1403
1404
|
//#region ../../node_modules/date-fns/startOfWeekYear.js
|
|
1404
1405
|
function at(e, t) {
|
|
1405
|
-
let n =
|
|
1406
|
-
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0),
|
|
1406
|
+
let n = Oe(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = it(e, t), a = we(t?.in || e, 0);
|
|
1407
|
+
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0), ke(a, t);
|
|
1407
1408
|
}
|
|
1408
1409
|
//#endregion
|
|
1409
1410
|
//#region ../../node_modules/date-fns/getWeek.js
|
|
1410
1411
|
function ot(e, t) {
|
|
1411
|
-
let n =
|
|
1412
|
-
return Math.round(r /
|
|
1412
|
+
let n = Te(e, t?.in), r = ke(n, t) - +at(n, t);
|
|
1413
|
+
return Math.round(r / be) + 1;
|
|
1413
1414
|
}
|
|
1414
1415
|
//#endregion
|
|
1415
1416
|
//#region ../../node_modules/date-fns/_lib/addLeadingZeros.js
|
|
@@ -1888,7 +1889,7 @@ function Ct(e, t, n) {
|
|
|
1888
1889
|
//#region ../../node_modules/date-fns/format.js
|
|
1889
1890
|
var wt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Tt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Et = /^'([^]*?)'?$/, Dt = /''/g, Ot = /[a-zA-Z]/;
|
|
1890
1891
|
function kt(e, t, n) {
|
|
1891
|
-
let r =
|
|
1892
|
+
let r = Oe(), i = n?.locale ?? r.locale ?? tt, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = Te(e, n?.in);
|
|
1892
1893
|
if (!Re(s)) throw RangeError("Invalid time value");
|
|
1893
1894
|
let c = t.match(Tt).map((e) => {
|
|
1894
1895
|
let t = e[0];
|
|
@@ -1938,7 +1939,7 @@ function At(e) {
|
|
|
1938
1939
|
//#endregion
|
|
1939
1940
|
//#region ../../node_modules/date-fns/getISODay.js
|
|
1940
1941
|
function jt(e, t) {
|
|
1941
|
-
let n =
|
|
1942
|
+
let n = Te(e, t?.in).getDay();
|
|
1942
1943
|
return n === 0 ? 7 : n;
|
|
1943
1944
|
}
|
|
1944
1945
|
//#endregion
|
|
@@ -2269,10 +2270,10 @@ function On(e) {
|
|
|
2269
2270
|
return t === "INPUT" || t === "SELECT" || t === "BUTTON" && !e.dataset?.date;
|
|
2270
2271
|
}
|
|
2271
2272
|
function kn(e, t, n) {
|
|
2272
|
-
let r =
|
|
2273
|
+
let r = Ee(e, t);
|
|
2273
2274
|
if (!r) return null;
|
|
2274
2275
|
let i = n(`button[data-date="${Yt(r)}"]`);
|
|
2275
|
-
for (; i instanceof HTMLButtonElement && i.dataset.disabled;) if (r =
|
|
2276
|
+
for (; i instanceof HTMLButtonElement && i.dataset.disabled;) if (r = Ee(r, t), i = n(`button[data-date="${Yt(r)}"]`), !i) return null;
|
|
2276
2277
|
return r;
|
|
2277
2278
|
}
|
|
2278
2279
|
function An(e) {
|
|
@@ -2290,7 +2291,7 @@ function jn(e) {
|
|
|
2290
2291
|
months: E.dates.months,
|
|
2291
2292
|
prevMonth: E.calendar.prevMonth,
|
|
2292
2293
|
nextMonth: E.calendar.nextMonth
|
|
2293
|
-
}), [E]), O = f(() => v ? Jt(v) : qt(), [v]), k = f(() => u ? u.map((e) => typeof e == "string" ? Jt(e) : e) : [], [u]), A = t !== void 0, [j, M] = m([]), N = A ? t : j, P = f(() => _n(N), [N]), [ee, te] = m(0), [ne, F] = m(0), [re, ie] = m({}), [ae, oe] = m(null), [se, I] = m(null), L = p(null), R = p([]), ce = p(0), z = p(!1), B = p(!1),
|
|
2294
|
+
}), [E]), O = f(() => v ? Jt(v) : qt(), [v]), k = f(() => u ? u.map((e) => typeof e == "string" ? Jt(e) : e) : [], [u]), A = t !== void 0, [j, M] = m([]), N = A ? t : j, P = f(() => _n(N), [N]), [ee, te] = m(0), [ne, F] = m(0), [re, ie] = m({}), [ae, oe] = m(null), [se, I] = m(null), L = p(null), R = p([]), ce = p(0), z = p(!1), B = p(!1), le = f(() => ({
|
|
2294
2295
|
earliest: a,
|
|
2295
2296
|
latest: s,
|
|
2296
2297
|
excludedates: k,
|
|
@@ -2326,9 +2327,9 @@ function jn(e) {
|
|
|
2326
2327
|
}, [N]), c(() => {
|
|
2327
2328
|
i && P.length === 2 ? ie(vn(P[0], P[1])) : (!i || P.length < 2) && ie({});
|
|
2328
2329
|
}, [i, P]);
|
|
2329
|
-
let
|
|
2330
|
+
let V = o((e) => {
|
|
2330
2331
|
A || M(e), b?.(e);
|
|
2331
|
-
}, [A, b]),
|
|
2332
|
+
}, [A, b]), H = o(() => {
|
|
2332
2333
|
x?.();
|
|
2333
2334
|
}, [x]), ue = o((e, t) => {
|
|
2334
2335
|
te(typeof e == "string" ? parseInt(e) : e), F(typeof t == "string" ? parseInt(t) : t), ce.current = 0, I(null), R.current = [], z.current = !0;
|
|
@@ -2339,23 +2340,23 @@ function jn(e) {
|
|
|
2339
2340
|
ee,
|
|
2340
2341
|
ne,
|
|
2341
2342
|
ue
|
|
2342
|
-
]),
|
|
2343
|
+
]), W = o(() => {
|
|
2343
2344
|
let e = ne === 11 ? 0 : ne + 1, t = ne === 11 ? ee + 1 : ee;
|
|
2344
2345
|
ue(t, e);
|
|
2345
2346
|
}, [
|
|
2346
2347
|
ee,
|
|
2347
2348
|
ne,
|
|
2348
2349
|
ue
|
|
2349
|
-
]),
|
|
2350
|
+
]), G = o((e) => pn(e, le), [le]), K = o((e, t) => mn(e, t, le, {
|
|
2350
2351
|
multiple: n,
|
|
2351
2352
|
maxMultiple: r,
|
|
2352
2353
|
selectedCount: N.length
|
|
2353
2354
|
}), [
|
|
2354
|
-
|
|
2355
|
+
le,
|
|
2355
2356
|
n,
|
|
2356
2357
|
r,
|
|
2357
2358
|
N.length
|
|
2358
|
-
]),
|
|
2359
|
+
]), q = o(() => typeof N == "string" ? N.split(",") : N, [N]), de = o((e) => {
|
|
2359
2360
|
if (!i || P.length !== 1 || !yn(e, P, k, d) || P[0] >= e) {
|
|
2360
2361
|
oe(null);
|
|
2361
2362
|
return;
|
|
@@ -2366,50 +2367,50 @@ function jn(e) {
|
|
|
2366
2367
|
P,
|
|
2367
2368
|
k,
|
|
2368
2369
|
d
|
|
2369
|
-
]),
|
|
2370
|
+
]), J = o((e) => {
|
|
2370
2371
|
if (!e) return;
|
|
2371
2372
|
let t;
|
|
2372
|
-
if (i) t = Cn(e,
|
|
2373
|
+
if (i) t = Cn(e, q(), {
|
|
2373
2374
|
excludedates: k,
|
|
2374
2375
|
excludeweekdays: d
|
|
2375
|
-
}), A || M(t), t.length === 2 ? (b?.(t),
|
|
2376
|
-
else if (n) t = Sn(e,
|
|
2376
|
+
}), A || M(t), t.length === 2 ? (b?.(t), H()) : (t.length === 1 && ie({}), b?.(t));
|
|
2377
|
+
else if (n) t = Sn(e, q(), r), V(t);
|
|
2377
2378
|
else {
|
|
2378
2379
|
let n = Yt(e);
|
|
2379
|
-
t = N.includes(n) ? [] : [n],
|
|
2380
|
+
t = N.includes(n) ? [] : [n], V(t), H();
|
|
2380
2381
|
}
|
|
2381
2382
|
}, [
|
|
2382
2383
|
i,
|
|
2383
2384
|
n,
|
|
2384
2385
|
r,
|
|
2385
|
-
|
|
2386
|
+
q,
|
|
2386
2387
|
N,
|
|
2387
2388
|
k,
|
|
2388
2389
|
d,
|
|
2389
2390
|
A,
|
|
2391
|
+
V,
|
|
2390
2392
|
H,
|
|
2391
|
-
le,
|
|
2392
2393
|
b
|
|
2393
|
-
]),
|
|
2394
|
-
let t = bn(e,
|
|
2395
|
-
A || M(t), i && t.length === 2 && (b?.(t),
|
|
2394
|
+
]), Y = o((e) => {
|
|
2395
|
+
let t = bn(e, q());
|
|
2396
|
+
A || M(t), i && t.length === 2 && (b?.(t), H());
|
|
2396
2397
|
}, [
|
|
2397
|
-
|
|
2398
|
+
q,
|
|
2398
2399
|
A,
|
|
2399
2400
|
i,
|
|
2400
2401
|
b,
|
|
2401
|
-
|
|
2402
|
-
]),
|
|
2403
|
-
let t = xn(e,
|
|
2402
|
+
H
|
|
2403
|
+
]), fe = o((e) => {
|
|
2404
|
+
let t = xn(e, q());
|
|
2404
2405
|
A || M(t);
|
|
2405
|
-
}, [
|
|
2406
|
-
let t = Sn(e,
|
|
2406
|
+
}, [q, A]), pe = o((e) => {
|
|
2407
|
+
let t = Sn(e, q(), r);
|
|
2407
2408
|
A || M(t);
|
|
2408
2409
|
}, [
|
|
2409
|
-
|
|
2410
|
+
q,
|
|
2410
2411
|
r,
|
|
2411
2412
|
A
|
|
2412
|
-
]),
|
|
2413
|
+
]), me = o(() => {
|
|
2413
2414
|
let e = Yt(en(O)), t = L.current?.querySelector(`button[data-date="${e}"]`);
|
|
2414
2415
|
if (t instanceof HTMLButtonElement) {
|
|
2415
2416
|
I(e), t.focus();
|
|
@@ -2420,11 +2421,11 @@ function jn(e) {
|
|
|
2420
2421
|
let e = L.current?.querySelector(`button[data-date="${n.currentDateISO}"]`);
|
|
2421
2422
|
e instanceof HTMLButtonElement && (I(n.currentDateISO), e.focus());
|
|
2422
2423
|
}
|
|
2423
|
-
}, []),
|
|
2424
|
+
}, []), X = o((e, t) => {
|
|
2424
2425
|
let n = e.target;
|
|
2425
2426
|
if (On(n)) return;
|
|
2426
2427
|
if (e.preventDefault(), !se) {
|
|
2427
|
-
|
|
2428
|
+
me();
|
|
2428
2429
|
return;
|
|
2429
2430
|
}
|
|
2430
2431
|
let r = kn(Qt(se), t, L.current.querySelector.bind(L.current));
|
|
@@ -2432,7 +2433,7 @@ function jn(e) {
|
|
|
2432
2433
|
let e = L.current.querySelector(`button[data-date="${Yt(r)}"]`);
|
|
2433
2434
|
e instanceof HTMLButtonElement && !e.dataset.disabled && (I(Yt(r)), e.focus());
|
|
2434
2435
|
}
|
|
2435
|
-
}, [se,
|
|
2436
|
+
}, [se, me]);
|
|
2436
2437
|
return {
|
|
2437
2438
|
componentId: T,
|
|
2438
2439
|
strings: D,
|
|
@@ -2453,34 +2454,34 @@ function jn(e) {
|
|
|
2453
2454
|
excludedates: k,
|
|
2454
2455
|
excludeweekdays: d,
|
|
2455
2456
|
className: C,
|
|
2456
|
-
dateConstraints:
|
|
2457
|
+
dateConstraints: le,
|
|
2457
2458
|
calendarRef: L,
|
|
2458
2459
|
selectableDatesRef: R,
|
|
2459
2460
|
tabIndexSetRef: ce,
|
|
2460
2461
|
prevMonth: U,
|
|
2461
|
-
nextMonth:
|
|
2462
|
+
nextMonth: W,
|
|
2462
2463
|
changeMonth: ue,
|
|
2463
|
-
handleDateSelect:
|
|
2464
|
-
addToSelected:
|
|
2465
|
-
removeFromSelected:
|
|
2466
|
-
toggleSelectedDate:
|
|
2467
|
-
handleRangeHover:
|
|
2468
|
-
isExcluded:
|
|
2469
|
-
isDayDisabled:
|
|
2470
|
-
focusOnCurrentDate:
|
|
2464
|
+
handleDateSelect: J,
|
|
2465
|
+
addToSelected: Y,
|
|
2466
|
+
removeFromSelected: fe,
|
|
2467
|
+
toggleSelectedDate: pe,
|
|
2468
|
+
handleRangeHover: de,
|
|
2469
|
+
isExcluded: G,
|
|
2470
|
+
isDayDisabled: K,
|
|
2471
|
+
focusOnCurrentDate: me,
|
|
2471
2472
|
handleKeydown: o((e) => {
|
|
2472
2473
|
if (e.key === "Escape") {
|
|
2473
|
-
e.preventDefault(),
|
|
2474
|
+
e.preventDefault(), H();
|
|
2474
2475
|
return;
|
|
2475
2476
|
}
|
|
2476
2477
|
let t = An(e.key);
|
|
2477
|
-
t !== null &&
|
|
2478
|
-
}, [
|
|
2478
|
+
t !== null && X(e.nativeEvent, t);
|
|
2479
|
+
}, [H, X]),
|
|
2479
2480
|
handleFocusOut: o((e) => {
|
|
2480
2481
|
let t = e.target, n = e.relatedTarget;
|
|
2481
|
-
L.current && L.current.contains(n) || t.classList.contains("pkt-hide") || t.closest(".pkt-cal-month-picker") ||
|
|
2482
|
-
}, [
|
|
2483
|
-
close:
|
|
2482
|
+
L.current && L.current.contains(n) || t.classList.contains("pkt-hide") || t.closest(".pkt-cal-month-picker") || H();
|
|
2483
|
+
}, [H]),
|
|
2484
|
+
close: H,
|
|
2484
2485
|
setFocusedDate: I
|
|
2485
2486
|
};
|
|
2486
2487
|
}
|
|
@@ -3186,7 +3187,7 @@ var nr = i(({ forId: e, label: t, helptext: n, helptextDropdown: r, helptextDrop
|
|
|
3186
3187
|
F && /* @__PURE__ */ _(oe, {}),
|
|
3187
3188
|
m && h && /* @__PURE__ */ _("div", {
|
|
3188
3189
|
className: "pkt-inputwrapper__alert-wrapper",
|
|
3189
|
-
children: /* @__PURE__ */ _(
|
|
3190
|
+
children: /* @__PURE__ */ _($, {
|
|
3190
3191
|
skin: "error",
|
|
3191
3192
|
size: R,
|
|
3192
3193
|
"aria-live": "assertive",
|
|
@@ -3403,47 +3404,51 @@ var rr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3403
3404
|
children: o
|
|
3404
3405
|
});
|
|
3405
3406
|
}, Cr = ({ state: e }) => {
|
|
3406
|
-
let { id: t, inputId: n, listboxId: r, values: i, options: a, isOpen: o, multiple: s, typeahead: c, allowUserInput: l, tagPlacement: u, placeholder: d, disabled: f, fullwidth: p, hasError: m, label: h, inputFocus: g,
|
|
3407
|
+
let { id: t, inputId: n, listboxId: r, values: i, options: a, isOpen: o, multiple: s, typeahead: c, allowUserInput: l, tagPlacement: u, placeholder: d, disabled: f, fullwidth: p, hasError: m, label: h, inputFocus: g, skipInputTab: y, restoreInputTab: b, inputRef: x, triggerRef: S, handleInputChange: C, handleInputKeydown: w, handleInputFocus: T, handleInputBlur: E, handleInputClick: D, handlePlaceholderClick: O, handleSelectOnlyKeydown: k, name: A, inputSize: j } = e, M = [
|
|
3407
3408
|
"pkt-combobox__input",
|
|
3408
|
-
`pkt-combobox__input--${
|
|
3409
|
+
`pkt-combobox__input--${j}`,
|
|
3409
3410
|
p && "pkt-combobox__input--fullwidth",
|
|
3410
3411
|
o && "pkt-combobox__input--open",
|
|
3411
3412
|
m && "pkt-combobox__input--error",
|
|
3412
3413
|
f && "pkt-combobox__input--disabled"
|
|
3413
|
-
].filter(Boolean).join(" "),
|
|
3414
|
+
].filter(Boolean).join(" "), N = ["pkt-combobox__arrow-icon", o && "pkt-combobox__arrow-icon--open"].filter(Boolean).join(" "), P = c || l, ee = !P && d && (!i.length || s && u === "outside") && !g, te = u !== "outside", ne = o && i[0] && rr(a, i[0]) ? `${r}-${ir(a, i[0])}` : void 0, F = s && i.length > 0 ? `${i.length} valgt` : void 0, re = P ? { tabIndex: -1 } : {
|
|
3414
3415
|
id: `${t}-combobox`,
|
|
3415
3416
|
role: "combobox",
|
|
3416
3417
|
"aria-expanded": o ? "true" : "false",
|
|
3417
3418
|
"aria-controls": r,
|
|
3418
3419
|
"aria-haspopup": "listbox",
|
|
3419
3420
|
"aria-labelledby": `${t}-combobox-label`,
|
|
3420
|
-
"aria-activedescendant":
|
|
3421
|
-
"aria-description":
|
|
3421
|
+
"aria-activedescendant": ne,
|
|
3422
|
+
"aria-description": F,
|
|
3422
3423
|
tabIndex: f ? -1 : 0,
|
|
3423
|
-
onKeyDown:
|
|
3424
|
+
onKeyDown: k
|
|
3424
3425
|
};
|
|
3425
3426
|
return /* @__PURE__ */ v("div", {
|
|
3426
|
-
ref:
|
|
3427
|
-
className:
|
|
3428
|
-
onClick:
|
|
3429
|
-
|
|
3427
|
+
ref: S,
|
|
3428
|
+
className: M,
|
|
3429
|
+
onClick: D,
|
|
3430
|
+
onBlur: (e) => {
|
|
3431
|
+
e.target === e.currentTarget && b();
|
|
3432
|
+
},
|
|
3433
|
+
...re,
|
|
3430
3434
|
children: [
|
|
3431
|
-
|
|
3435
|
+
ee ? /* @__PURE__ */ _("span", {
|
|
3432
3436
|
className: "pkt-combobox__placeholder",
|
|
3433
|
-
onClick:
|
|
3437
|
+
onClick: O,
|
|
3434
3438
|
children: d
|
|
3435
|
-
}) :
|
|
3436
|
-
|
|
3439
|
+
}) : te ? s ? /* @__PURE__ */ _(xr, { state: e }) : P ? null : /* @__PURE__ */ _(Sr, { state: e }) : null,
|
|
3440
|
+
P ? /* @__PURE__ */ _("div", {
|
|
3437
3441
|
className: "pkt-combobox__input-div combobox__input",
|
|
3438
3442
|
children: /* @__PURE__ */ _("input", {
|
|
3439
|
-
ref:
|
|
3443
|
+
ref: x,
|
|
3440
3444
|
type: "text",
|
|
3441
3445
|
id: n,
|
|
3442
|
-
name: `${
|
|
3443
|
-
onChange:
|
|
3444
|
-
onKeyDown:
|
|
3445
|
-
onFocus:
|
|
3446
|
-
onBlur:
|
|
3446
|
+
name: `${A || t}-input`,
|
|
3447
|
+
onChange: C,
|
|
3448
|
+
onKeyDown: w,
|
|
3449
|
+
onFocus: T,
|
|
3450
|
+
onBlur: E,
|
|
3451
|
+
tabIndex: y ? -1 : void 0,
|
|
3447
3452
|
placeholder: !i.length || s && u === "outside" ? d : void 0,
|
|
3448
3453
|
autoComplete: "off",
|
|
3449
3454
|
role: "combobox",
|
|
@@ -3451,20 +3456,19 @@ var rr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3451
3456
|
"aria-label": h,
|
|
3452
3457
|
"aria-autocomplete": c ? "both" : l ? "list" : "none",
|
|
3453
3458
|
"aria-controls": r,
|
|
3454
|
-
"aria-activedescendant":
|
|
3455
|
-
"aria-description":
|
|
3459
|
+
"aria-activedescendant": ne,
|
|
3460
|
+
"aria-description": F,
|
|
3456
3461
|
disabled: f
|
|
3457
3462
|
})
|
|
3458
3463
|
}) : /* @__PURE__ */ _("input", {
|
|
3459
|
-
ref:
|
|
3464
|
+
ref: x,
|
|
3460
3465
|
type: "hidden",
|
|
3461
3466
|
id: n,
|
|
3462
|
-
name: `${
|
|
3463
|
-
value: i.join(",")
|
|
3464
|
-
readOnly: !0
|
|
3467
|
+
name: `${A || t}-input`,
|
|
3468
|
+
value: i.join(",")
|
|
3465
3469
|
}),
|
|
3466
3470
|
/* @__PURE__ */ _(L, {
|
|
3467
|
-
className:
|
|
3471
|
+
className: N,
|
|
3468
3472
|
name: "chevron-thin-down",
|
|
3469
3473
|
"aria-hidden": "true"
|
|
3470
3474
|
})
|
|
@@ -3574,10 +3578,11 @@ var rr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3574
3578
|
s ? /* @__PURE__ */ _("input", {
|
|
3575
3579
|
className: "pkt-input-check__input-checkbox",
|
|
3576
3580
|
type: "checkbox",
|
|
3581
|
+
inert: !0,
|
|
3577
3582
|
tabIndex: -1,
|
|
3578
3583
|
value: e.value,
|
|
3579
3584
|
checked: e.selected || !1,
|
|
3580
|
-
|
|
3585
|
+
onChange: () => {},
|
|
3581
3586
|
"aria-hidden": "true",
|
|
3582
3587
|
disabled: i
|
|
3583
3588
|
}) : e.selected ? /* @__PURE__ */ _(L, { name: "check-big" }) : null,
|
|
@@ -3614,9 +3619,13 @@ function Tr(e, t) {
|
|
|
3614
3619
|
}));
|
|
3615
3620
|
}
|
|
3616
3621
|
function Er(t, n) {
|
|
3617
|
-
let { id: r = "", label: i, value: s, defaultValue: l, options: d, defaultOptions: h, multiple: g = !1, maxlength: _, typeahead: v = !1, includeSearch: y = !1, allowUserInput: b = !1, displayValueAs: x = "label", tagPlacement: S, searchPlaceholder: C, placeholder: w, disabled: T = !1, required: E = !1, fullwidth: D = !1, hasError: O = !1, errorMessage: k, helptext: A, helptextDropdown: j, helptextDropdownButton: M, optionalTag: N = !1, optionalText: P, requiredTag: ee = !1, requiredText: te, tagText: ne, useWrapper: F = !0, inline: re = !1, counter: ie, inputSize: ae = "medium", name: oe, className: se, onChange: I, onValueChange: L, children: R, strings: ce } = t, z = `${r}-input`,
|
|
3618
|
-
V ? H.current?.focus() :
|
|
3619
|
-
}, [V]),
|
|
3622
|
+
let { id: r = "", label: i, value: s, defaultValue: l, options: d, defaultOptions: h, multiple: g = !1, maxlength: _, typeahead: v = !1, includeSearch: y = !1, allowUserInput: b = !1, displayValueAs: x = "label", tagPlacement: S, searchPlaceholder: C, placeholder: w, disabled: T = !1, required: E = !1, fullwidth: D = !1, hasError: O = !1, errorMessage: k, helptext: A, helptextDropdown: j, helptextDropdownButton: M, optionalTag: N = !1, optionalText: P, requiredTag: ee = !1, requiredText: te, tagText: ne, useWrapper: F = !0, inline: re = !1, counter: ie, inputSize: ae = "medium", name: oe, className: se, onChange: I, onValueChange: L, children: R, strings: ce } = t, z = `${r}-input`, le = `${r}-listbox`, V = v || b, H = p(null), ue = p(null), U = p(null), W = p(null), G = p(null), K = o(() => {
|
|
3623
|
+
V ? H.current?.focus() : U.current?.focus();
|
|
3624
|
+
}, [V]), q = o(() => {
|
|
3625
|
+
je(!0);
|
|
3626
|
+
let e = H.current;
|
|
3627
|
+
e && e.type !== "hidden" && e.setAttribute("tabindex", "-1"), U.current?.focus();
|
|
3628
|
+
}, []), de = f(() => {
|
|
3620
3629
|
let t = [];
|
|
3621
3630
|
return e.forEach(R, (e) => {
|
|
3622
3631
|
if (a(e) && e.type === "option") {
|
|
@@ -3629,90 +3638,93 @@ function Er(t, n) {
|
|
|
3629
3638
|
});
|
|
3630
3639
|
}
|
|
3631
3640
|
}), t;
|
|
3632
|
-
}, [R]),
|
|
3641
|
+
}, [R]), J = f(() => h && h.length > 0 ? h.map((e) => ({
|
|
3633
3642
|
...e,
|
|
3634
3643
|
fulltext: or(e)
|
|
3635
3644
|
})) : d && d.length > 0 ? d.map((e) => ({
|
|
3636
3645
|
...e,
|
|
3637
3646
|
fulltext: or(e)
|
|
3638
|
-
})) :
|
|
3647
|
+
})) : de.length > 0 ? de.map((e) => ({
|
|
3639
3648
|
...e,
|
|
3640
3649
|
fulltext: or(e)
|
|
3641
3650
|
})) : [], [
|
|
3642
3651
|
h,
|
|
3643
3652
|
d,
|
|
3644
|
-
|
|
3645
|
-
]),
|
|
3653
|
+
de
|
|
3654
|
+
]), Y = s !== void 0, [fe, pe] = m(() => {
|
|
3655
|
+
let e = lr(s ?? l, g), t = J.filter((t) => t.selected && !e.includes(t.value)).map((e) => e.value);
|
|
3656
|
+
return t.length ? g ? [...e, ...t] : e.length ? e : [t[0]] : e;
|
|
3657
|
+
}), me = p(fe);
|
|
3646
3658
|
c(() => {
|
|
3647
|
-
|
|
3659
|
+
Y && pe(lr(s, g));
|
|
3648
3660
|
}, [
|
|
3649
3661
|
s,
|
|
3650
|
-
|
|
3662
|
+
Y,
|
|
3651
3663
|
g
|
|
3652
3664
|
]);
|
|
3653
|
-
let
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
]), [
|
|
3658
|
-
|
|
3659
|
-
|
|
3665
|
+
let X = Y ? lr(s, g) : fe, [Z, he] = m([]), Q = f(() => Tr([...Z.filter((e) => !J.some((t) => t.value === e.value)), ...J], X), [
|
|
3666
|
+
J,
|
|
3667
|
+
Z,
|
|
3668
|
+
X
|
|
3669
|
+
]), [$, _e] = m(!1), [ve, ye] = m(""), [be, xe] = m(""), [Se, Ce] = m(""), [we, Te] = m(null), [Ee, De] = m(null), [Oe, ke] = m(!1), [Ae, je] = m(!1), Me = p(!1), [Ne, Pe] = m(!1), [Fe, Ie] = m(-1), Le = ge(["combobox"], ce), Re = Se ? B(Le.combobox[Se], { value: we ?? "" }) : "", ze = sr(X.length, _ ?? null), Be = ie ?? (g && _ != null), Ve = f(() => ve ? v ? ur(Q, ve).filtered : ar(Q, ve) : Q, [
|
|
3670
|
+
Q,
|
|
3671
|
+
ve,
|
|
3660
3672
|
v
|
|
3661
|
-
]),
|
|
3662
|
-
let t =
|
|
3663
|
-
if (!t || !
|
|
3673
|
+
]), He = f(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), Ue = o((e) => {
|
|
3674
|
+
let t = ue.current;
|
|
3675
|
+
if (!t || !He) return;
|
|
3664
3676
|
let n = g ? e.join(",") : e[0] || "";
|
|
3665
|
-
|
|
3666
|
-
}, [
|
|
3677
|
+
He.call(t, n), t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
3678
|
+
}, [He, g]), We = g ? X.join(",") : X[0] || "";
|
|
3667
3679
|
c(() => {
|
|
3668
|
-
|
|
3669
|
-
}, [
|
|
3670
|
-
if (
|
|
3671
|
-
let e = !g &&
|
|
3680
|
+
ue.current && (ue.current.value = We);
|
|
3681
|
+
}, [We]), c(() => {
|
|
3682
|
+
if ($ || !H.current) return;
|
|
3683
|
+
let e = !g && X[0] ? mr(X[0], Q, x) : "";
|
|
3672
3684
|
H.current.value !== e && (H.current.value = e);
|
|
3673
3685
|
}, [
|
|
3674
|
-
J,
|
|
3675
3686
|
X,
|
|
3687
|
+
Q,
|
|
3676
3688
|
x,
|
|
3677
3689
|
g,
|
|
3678
|
-
|
|
3690
|
+
$
|
|
3679
3691
|
]);
|
|
3680
|
-
let
|
|
3681
|
-
|
|
3692
|
+
let Ge = o((e, t = !0) => {
|
|
3693
|
+
Y || pe(e), t && (L?.(e), Ue(e));
|
|
3682
3694
|
}, [
|
|
3683
|
-
|
|
3695
|
+
Y,
|
|
3684
3696
|
L,
|
|
3685
|
-
|
|
3686
|
-
]),
|
|
3687
|
-
if (!e ||
|
|
3688
|
-
if (g && sr(
|
|
3689
|
-
|
|
3697
|
+
Ue
|
|
3698
|
+
]), Ke = o((e) => {
|
|
3699
|
+
if (!e || X.includes(e)) return;
|
|
3700
|
+
if (g && sr(X.length, _ ?? null)) {
|
|
3701
|
+
Ce("maxSelected");
|
|
3690
3702
|
return;
|
|
3691
3703
|
}
|
|
3692
|
-
let t = g ? [...
|
|
3693
|
-
|
|
3704
|
+
let t = g ? [...X, e] : [e];
|
|
3705
|
+
Ge(t);
|
|
3694
3706
|
}, [
|
|
3695
|
-
|
|
3707
|
+
X,
|
|
3696
3708
|
g,
|
|
3697
3709
|
_,
|
|
3698
|
-
|
|
3699
|
-
]),
|
|
3710
|
+
Ge
|
|
3711
|
+
]), qe = o((e) => {
|
|
3700
3712
|
if (!e) return;
|
|
3701
|
-
let t =
|
|
3702
|
-
rr(
|
|
3713
|
+
let t = X.filter((t) => t !== e);
|
|
3714
|
+
rr(Q, e)?.userAdded && he((t) => t.filter((t) => t.value !== e)), Ge(t);
|
|
3703
3715
|
}, [
|
|
3704
|
-
J,
|
|
3705
3716
|
X,
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3717
|
+
Q,
|
|
3718
|
+
Ge
|
|
3719
|
+
]), Je = o(() => {
|
|
3720
|
+
he([]), Ge([]);
|
|
3721
|
+
}, [Ge]), Ye = o((e) => {
|
|
3710
3722
|
if (!e || e.trim() === "") return;
|
|
3711
3723
|
let t;
|
|
3712
3724
|
if (!g) t = [e];
|
|
3713
3725
|
else {
|
|
3714
|
-
if (rr(
|
|
3715
|
-
t = [...
|
|
3726
|
+
if (rr(Q, e) || sr(X.length, _ ?? null)) return;
|
|
3727
|
+
t = [...X, e];
|
|
3716
3728
|
}
|
|
3717
3729
|
let n = {
|
|
3718
3730
|
value: e,
|
|
@@ -3720,180 +3732,182 @@ function Er(t, n) {
|
|
|
3720
3732
|
userAdded: !0,
|
|
3721
3733
|
selected: !0
|
|
3722
3734
|
};
|
|
3723
|
-
he((t) => [n, ...t.filter((t) => t.value !== e)]),
|
|
3735
|
+
he((t) => [n, ...t.filter((t) => t.value !== e)]), Ge(t);
|
|
3724
3736
|
}, [
|
|
3725
3737
|
g,
|
|
3738
|
+
Q,
|
|
3726
3739
|
X,
|
|
3727
|
-
J,
|
|
3728
3740
|
_,
|
|
3729
|
-
|
|
3730
|
-
]),
|
|
3731
|
-
if (
|
|
3732
|
-
|
|
3733
|
-
let e = t === void 0 ?
|
|
3734
|
-
!g && e ? H.current.value = mr(e,
|
|
3741
|
+
Ge
|
|
3742
|
+
]), Xe = o((e = !0, t) => {
|
|
3743
|
+
if (De(null), e && H.current && H.current.type !== "hidden") {
|
|
3744
|
+
ye(""), xe("");
|
|
3745
|
+
let e = t === void 0 ? X[0] : t;
|
|
3746
|
+
!g && e ? H.current.value = mr(e, Q, x) : H.current.value = "", g || (Pe(!1), Ce(""));
|
|
3735
3747
|
}
|
|
3736
3748
|
}, [
|
|
3737
3749
|
g,
|
|
3738
|
-
J,
|
|
3739
3750
|
X,
|
|
3751
|
+
Q,
|
|
3740
3752
|
x
|
|
3741
|
-
]),
|
|
3753
|
+
]), Ze = o((e) => {
|
|
3742
3754
|
if (T) return;
|
|
3743
|
-
|
|
3744
|
-
let t = rr(
|
|
3745
|
-
i || (!r && b && !a ? (
|
|
3746
|
-
|
|
3747
|
-
}, 0))
|
|
3755
|
+
Ce(""), De(null);
|
|
3756
|
+
let t = rr(Q, e)?.value || null, n = X.includes(e || t || ""), r = !!t, i = Q.find((t) => t.value === e)?.disabled || !1, a = !e?.trim(), o = !g, s = g, c = sr(X.length, _ ?? null), l = !1, u = !0, d = "", f = null, p = "", m;
|
|
3757
|
+
i || (!r && b && !a ? (Ye(e), d = "valueAdded", l = s, o && (m = e || "")) : !r && !b ? (o && X[0] && qe(X[0]), u = !1, l = !0, d = "noResults") : n ? (qe(t), l = !0, m = "", o && V && H.current && H.current.type !== "hidden" && (H.current.value = "")) : a && o ? (Je(), l = !0, m = "") : o ? (X[0] && qe(X[0]), Ke(t), l = !1, m = t || "", d = "valueSelected", f = V ? mr(t || "", Q, x) : cr(rr(Q, t), x)) : s && !c ? (Ke(t), l = !0) : s && c ? (d = "maxSelected", u = !1, p = e || "") : (o && Je(), d = "noValidValue", u = !1, l = !0, p = e || "", m = ""), _e(l), ye(p), Xe(u, m), Ce(d), Te(f), l || window.setTimeout(() => {
|
|
3758
|
+
q();
|
|
3759
|
+
}, 0));
|
|
3748
3760
|
}, [
|
|
3749
3761
|
T,
|
|
3762
|
+
Q,
|
|
3750
3763
|
X,
|
|
3751
|
-
J,
|
|
3752
3764
|
g,
|
|
3753
3765
|
_,
|
|
3754
3766
|
b,
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3767
|
+
Ye,
|
|
3768
|
+
qe,
|
|
3769
|
+
Je,
|
|
3770
|
+
Ke,
|
|
3771
|
+
Xe,
|
|
3772
|
+
q,
|
|
3773
|
+
V,
|
|
3774
|
+
x
|
|
3775
|
+
]), Qe = o(() => {
|
|
3776
|
+
if (ke(!1), De(null), Ce(""), ye(""), H.current && H.current.type !== "hidden") {
|
|
3777
|
+
let e = H.current.value, t = X[0];
|
|
3764
3778
|
if (!g) {
|
|
3765
|
-
if (!e)
|
|
3779
|
+
if (!e) X[0] && qe(X[0]), t = void 0;
|
|
3766
3780
|
else {
|
|
3767
|
-
let n = rr(
|
|
3768
|
-
n && n.value !==
|
|
3781
|
+
let n = rr(Q, e);
|
|
3782
|
+
n && n.value !== X[0] ? (X[0] && qe(X[0]), Ke(n.value), t = n.value) : !n && b && (X[0] && qe(X[0]), Ye(e), t = e);
|
|
3769
3783
|
}
|
|
3770
3784
|
} else if (e !== "") {
|
|
3771
|
-
let { action: t, value: n } = pr(e,
|
|
3785
|
+
let { action: t, value: n } = pr(e, X, Q, b, g);
|
|
3772
3786
|
switch (t) {
|
|
3773
3787
|
case "addUserValue":
|
|
3774
|
-
|
|
3788
|
+
Ye(n);
|
|
3775
3789
|
break;
|
|
3776
3790
|
case "selectOption":
|
|
3777
|
-
|
|
3791
|
+
Ke(n);
|
|
3778
3792
|
break;
|
|
3779
|
-
case "removeValue":
|
|
3793
|
+
case "removeValue": qe(n);
|
|
3780
3794
|
}
|
|
3781
3795
|
}
|
|
3782
|
-
!g && t ? H.current.value = mr(t,
|
|
3796
|
+
!g && t ? H.current.value = mr(t, Q, x) : H.current.value = "";
|
|
3783
3797
|
}
|
|
3784
|
-
|
|
3798
|
+
_e(!1), Pe(!1);
|
|
3785
3799
|
}, [
|
|
3786
|
-
J,
|
|
3787
3800
|
X,
|
|
3801
|
+
Q,
|
|
3788
3802
|
b,
|
|
3789
3803
|
g,
|
|
3790
3804
|
x,
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
]),
|
|
3805
|
+
Ye,
|
|
3806
|
+
Ke,
|
|
3807
|
+
qe
|
|
3808
|
+
]), $e = o((e) => {
|
|
3795
3809
|
if (!e.trim().toLowerCase()) {
|
|
3796
|
-
|
|
3810
|
+
De(null), Ce(""), !g && X[0] && qe(X[0]);
|
|
3797
3811
|
return;
|
|
3798
3812
|
}
|
|
3799
|
-
let t = dr(e,
|
|
3800
|
-
|
|
3813
|
+
let t = dr(e, X, Q, b);
|
|
3814
|
+
De(t.addValueText), Ce(t.userInfoMessage);
|
|
3801
3815
|
}, [
|
|
3802
|
-
J,
|
|
3803
3816
|
X,
|
|
3817
|
+
Q,
|
|
3804
3818
|
b,
|
|
3805
3819
|
g,
|
|
3806
|
-
|
|
3807
|
-
]),
|
|
3820
|
+
qe
|
|
3821
|
+
]), et = o((e) => {
|
|
3808
3822
|
if (T) return;
|
|
3809
3823
|
let t = e.target.value;
|
|
3810
|
-
if (
|
|
3811
|
-
let { suggestion: n } = ur(
|
|
3824
|
+
if (xe(t), ye(t), $e(t), v && t) {
|
|
3825
|
+
let { suggestion: n } = ur(Q, t);
|
|
3812
3826
|
n?.label && H.current && !e.nativeEvent.inputType?.includes("deleteContent") && (H.current.value = n.label, window.setTimeout(() => H.current?.setSelectionRange(t.length, n.label.length), 0));
|
|
3813
3827
|
}
|
|
3814
3828
|
}, [
|
|
3815
3829
|
T,
|
|
3816
3830
|
v,
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
]),
|
|
3831
|
+
Q,
|
|
3832
|
+
$e
|
|
3833
|
+
]), tt = o((e) => {
|
|
3820
3834
|
if (e.key === "Backspace") {
|
|
3821
3835
|
let t = !H.current?.value;
|
|
3822
|
-
if (!
|
|
3836
|
+
if (!ve && t && g && X.length > 0) {
|
|
3823
3837
|
e.preventDefault();
|
|
3824
|
-
let t =
|
|
3825
|
-
|
|
3838
|
+
let t = X[X.length - 1];
|
|
3839
|
+
qe(t);
|
|
3826
3840
|
}
|
|
3827
3841
|
return;
|
|
3828
3842
|
}
|
|
3829
|
-
if (e.key === "ArrowLeft" && g &&
|
|
3830
|
-
e.preventDefault(),
|
|
3843
|
+
if (e.key === "ArrowLeft" && g && X.length > 0 && (H.current?.selectionStart ?? 0) === 0 && !H.current?.value) {
|
|
3844
|
+
e.preventDefault(), Ie(X.length - 1);
|
|
3831
3845
|
return;
|
|
3832
3846
|
}
|
|
3833
3847
|
let t = fr(e.key, e.shiftKey, g);
|
|
3834
|
-
if (t && !(e.key === "Tab" &&
|
|
3835
|
-
if (t === "focusListbox" && e.key === "Tab" && !
|
|
3836
|
-
|
|
3848
|
+
if (t && !(e.key === "Tab" && !$)) {
|
|
3849
|
+
if (t === "focusListbox" && e.key === "Tab" && !W.current?.querySelector("[role=\"option\"]:not([data-disabled]), [data-type=\"new-option\"]")) {
|
|
3850
|
+
Qe();
|
|
3837
3851
|
return;
|
|
3838
3852
|
}
|
|
3839
3853
|
switch (e.preventDefault(), t) {
|
|
3840
3854
|
case "addValue": {
|
|
3841
3855
|
let e = H.current?.value.trim() || "";
|
|
3842
|
-
if (
|
|
3843
|
-
|
|
3856
|
+
if (ye(e), e && X.includes(e)) {
|
|
3857
|
+
Xe(!0), Ce("alreadySelected");
|
|
3844
3858
|
break;
|
|
3845
3859
|
}
|
|
3846
|
-
|
|
3860
|
+
Ze(e);
|
|
3847
3861
|
break;
|
|
3848
3862
|
}
|
|
3849
3863
|
case "focusListbox":
|
|
3850
|
-
|
|
3864
|
+
W.current && ($ || _e(!0), br(W.current, {
|
|
3851
3865
|
disabled: T,
|
|
3852
3866
|
allowUserInput: b,
|
|
3853
|
-
customUserInput:
|
|
3867
|
+
customUserInput: Ee,
|
|
3854
3868
|
includeSearch: y
|
|
3855
3869
|
}));
|
|
3856
3870
|
break;
|
|
3857
|
-
case "closeOptions":
|
|
3871
|
+
case "closeOptions": _e(!1);
|
|
3858
3872
|
}
|
|
3859
3873
|
}
|
|
3860
3874
|
}, [
|
|
3861
|
-
|
|
3862
|
-
|
|
3875
|
+
ve,
|
|
3876
|
+
X,
|
|
3863
3877
|
g,
|
|
3864
3878
|
T,
|
|
3865
3879
|
b,
|
|
3866
|
-
|
|
3880
|
+
Ee,
|
|
3867
3881
|
y,
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
]),
|
|
3882
|
+
$,
|
|
3883
|
+
qe,
|
|
3884
|
+
Ze,
|
|
3885
|
+
K
|
|
3886
|
+
]), nt = o(() => {
|
|
3873
3887
|
if (!T) {
|
|
3874
|
-
if (
|
|
3875
|
-
|
|
3888
|
+
if (je(!1), Me.current) {
|
|
3889
|
+
Me.current = !1, ke(!0);
|
|
3876
3890
|
return;
|
|
3877
3891
|
}
|
|
3878
|
-
!g &&
|
|
3892
|
+
!g && X[0] && H.current && H.current.type !== "hidden" && (Pe(!0), H.current.value = mr(X[0], Q, x)), ke(!0), ye(""), _e(!0);
|
|
3879
3893
|
}
|
|
3880
3894
|
}, [
|
|
3881
3895
|
T,
|
|
3882
3896
|
g,
|
|
3883
|
-
J,
|
|
3884
3897
|
X,
|
|
3898
|
+
Q,
|
|
3885
3899
|
x
|
|
3886
|
-
]),
|
|
3887
|
-
|
|
3888
|
-
}, []),
|
|
3889
|
-
if (T ||
|
|
3890
|
-
let t = e.relatedTarget, n =
|
|
3891
|
-
n && t && n.contains(t) ||
|
|
3900
|
+
]), rt = o(() => {
|
|
3901
|
+
ke(!1), Pe(!1);
|
|
3902
|
+
}, []), it = o((e) => {
|
|
3903
|
+
if (T || !$) return;
|
|
3904
|
+
let t = e.relatedTarget, n = G.current;
|
|
3905
|
+
n && t && n.contains(t) || Qe();
|
|
3892
3906
|
}, [
|
|
3893
3907
|
T,
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
]),
|
|
3908
|
+
$,
|
|
3909
|
+
Qe
|
|
3910
|
+
]), at = o((e) => {
|
|
3897
3911
|
if (T) {
|
|
3898
3912
|
e.preventDefault(), e.stopPropagation();
|
|
3899
3913
|
return;
|
|
@@ -3901,208 +3915,216 @@ function Er(t, n) {
|
|
|
3901
3915
|
if (V) H.current?.focus();
|
|
3902
3916
|
else {
|
|
3903
3917
|
e.stopPropagation(), e.preventDefault();
|
|
3904
|
-
let t =
|
|
3905
|
-
|
|
3918
|
+
let t = !$;
|
|
3919
|
+
_e(t), t && W.current && br(W.current, {
|
|
3906
3920
|
disabled: T,
|
|
3907
3921
|
allowUserInput: b,
|
|
3908
|
-
customUserInput:
|
|
3922
|
+
customUserInput: Ee,
|
|
3909
3923
|
includeSearch: y
|
|
3910
3924
|
});
|
|
3911
3925
|
}
|
|
3912
3926
|
}, [
|
|
3913
3927
|
T,
|
|
3914
3928
|
V,
|
|
3915
|
-
|
|
3929
|
+
$,
|
|
3916
3930
|
b,
|
|
3917
|
-
|
|
3931
|
+
Ee,
|
|
3918
3932
|
y
|
|
3919
|
-
]),
|
|
3920
|
-
T || (e.stopPropagation(), V && H.current ? (H.current.focus(),
|
|
3921
|
-
}, [T, V]),
|
|
3933
|
+
]), ot = o((e) => {
|
|
3934
|
+
T || (e.stopPropagation(), V && H.current ? (H.current.focus(), ke(!0)) : _e((e) => !e));
|
|
3935
|
+
}, [T, V]), st = o((e) => {
|
|
3922
3936
|
if (!T) switch (e.key) {
|
|
3923
3937
|
case "Enter":
|
|
3924
3938
|
case " ":
|
|
3925
3939
|
case "ArrowDown":
|
|
3926
3940
|
case "ArrowUp":
|
|
3927
|
-
e.preventDefault(),
|
|
3928
|
-
|
|
3941
|
+
e.preventDefault(), $ ? _e(!1) : (_e(!0), W.current && window.setTimeout(() => {
|
|
3942
|
+
W.current && br(W.current, {
|
|
3929
3943
|
disabled: T,
|
|
3930
|
-
allowUserInput: b && !
|
|
3931
|
-
customUserInput:
|
|
3944
|
+
allowUserInput: b && !ze,
|
|
3945
|
+
customUserInput: Ee,
|
|
3932
3946
|
includeSearch: y
|
|
3933
3947
|
});
|
|
3934
3948
|
}, 0));
|
|
3935
3949
|
break;
|
|
3936
3950
|
case "Escape":
|
|
3937
|
-
|
|
3951
|
+
$ && (e.preventDefault(), _e(!1));
|
|
3938
3952
|
break;
|
|
3939
3953
|
case "Home":
|
|
3940
3954
|
case "End":
|
|
3941
|
-
e.preventDefault(),
|
|
3942
|
-
|
|
3955
|
+
e.preventDefault(), $ || _e(!0), W.current && window.setTimeout(() => {
|
|
3956
|
+
W.current && br(W.current, {
|
|
3943
3957
|
disabled: T,
|
|
3944
|
-
allowUserInput: b && !
|
|
3945
|
-
customUserInput:
|
|
3958
|
+
allowUserInput: b && !ze,
|
|
3959
|
+
customUserInput: Ee,
|
|
3946
3960
|
includeSearch: y
|
|
3947
3961
|
});
|
|
3948
3962
|
}, 0);
|
|
3949
3963
|
break;
|
|
3950
3964
|
case "ArrowLeft":
|
|
3951
|
-
g &&
|
|
3965
|
+
g && X.length > 0 && (e.preventDefault(), Ie(X.length - 1));
|
|
3952
3966
|
break;
|
|
3953
3967
|
case "Backspace":
|
|
3954
|
-
case "Delete": if (g &&
|
|
3968
|
+
case "Delete": if (g && X.length > 0) {
|
|
3955
3969
|
e.preventDefault();
|
|
3956
|
-
let t =
|
|
3957
|
-
|
|
3970
|
+
let t = X[X.length - 1];
|
|
3971
|
+
qe(t);
|
|
3958
3972
|
}
|
|
3959
3973
|
}
|
|
3960
3974
|
}, [
|
|
3961
3975
|
T,
|
|
3962
|
-
|
|
3976
|
+
$,
|
|
3963
3977
|
b,
|
|
3964
|
-
|
|
3965
|
-
|
|
3978
|
+
ze,
|
|
3979
|
+
Ee,
|
|
3966
3980
|
y,
|
|
3967
3981
|
g,
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
]),
|
|
3971
|
-
|
|
3972
|
-
}, [
|
|
3982
|
+
X,
|
|
3983
|
+
qe
|
|
3984
|
+
]), ct = o((e) => {
|
|
3985
|
+
Ze(e);
|
|
3986
|
+
}, [Ze]), lt = o((e, t) => {
|
|
3973
3987
|
switch (e.key) {
|
|
3974
3988
|
case "Enter":
|
|
3975
3989
|
case " ":
|
|
3976
|
-
e.preventDefault(),
|
|
3990
|
+
e.preventDefault(), Ze(t);
|
|
3977
3991
|
break;
|
|
3978
3992
|
case "ArrowDown":
|
|
3979
3993
|
e.preventDefault(), _r(e.currentTarget);
|
|
3980
3994
|
break;
|
|
3981
3995
|
case "ArrowUp":
|
|
3982
|
-
e.preventDefault(),
|
|
3996
|
+
e.preventDefault(), W.current && vr(e.currentTarget, W.current, y);
|
|
3983
3997
|
break;
|
|
3984
3998
|
case "Escape":
|
|
3985
|
-
e.preventDefault(),
|
|
3999
|
+
e.preventDefault(), _e(!1), V && (Me.current = !0), K();
|
|
3986
4000
|
break;
|
|
3987
|
-
case "Tab":
|
|
4001
|
+
case "Tab": Qe();
|
|
3988
4002
|
}
|
|
3989
4003
|
}, [
|
|
3990
|
-
|
|
4004
|
+
Ze,
|
|
3991
4005
|
y,
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
4006
|
+
K,
|
|
4007
|
+
Qe,
|
|
4008
|
+
V
|
|
4009
|
+
]), ut = o((e) => {
|
|
4010
|
+
qe(e), Ie(-1), V && H.current && (ke(!0), H.current.focus());
|
|
4011
|
+
}, [qe, V]), dt = o((e, t) => {
|
|
3997
4012
|
switch (e.stopPropagation(), e.key) {
|
|
3998
4013
|
case "ArrowLeft":
|
|
3999
|
-
e.preventDefault(), t > 0 &&
|
|
4014
|
+
e.preventDefault(), t > 0 && Ie(t - 1);
|
|
4000
4015
|
break;
|
|
4001
4016
|
case "ArrowRight":
|
|
4002
|
-
e.preventDefault(), t <
|
|
4017
|
+
e.preventDefault(), t < X.length - 1 ? Ie(t + 1) : (Ie(-1), V && H.current ? H.current.focus() : U.current?.focus());
|
|
4003
4018
|
break;
|
|
4004
4019
|
case "Backspace":
|
|
4005
4020
|
case "Delete":
|
|
4006
4021
|
e.preventDefault();
|
|
4007
4022
|
{
|
|
4008
|
-
let e =
|
|
4009
|
-
|
|
4023
|
+
let e = X[t], n = t >= X.length - 1 ? t - 1 : t;
|
|
4024
|
+
qe(e), n >= 0 ? Ie(n) : (Ie(-1), V && H.current ? H.current.focus() : U.current?.focus());
|
|
4010
4025
|
}
|
|
4011
4026
|
break;
|
|
4012
4027
|
case "Tab":
|
|
4013
|
-
|
|
4028
|
+
Ie(-1);
|
|
4014
4029
|
break;
|
|
4015
|
-
case "Escape": e.preventDefault(),
|
|
4030
|
+
case "Escape": e.preventDefault(), Ie(-1), V && H.current ? H.current.focus() : U.current?.focus();
|
|
4016
4031
|
}
|
|
4017
4032
|
}, [
|
|
4018
|
-
|
|
4033
|
+
X,
|
|
4019
4034
|
V,
|
|
4020
|
-
|
|
4021
|
-
]),
|
|
4022
|
-
|
|
4023
|
-
}, [
|
|
4035
|
+
qe
|
|
4036
|
+
]), ft = o((e) => {
|
|
4037
|
+
ye(e.target.value), $e(e.target.value);
|
|
4038
|
+
}, [$e]), pt = o((e) => {
|
|
4024
4039
|
switch (e.key) {
|
|
4025
4040
|
case "ArrowDown":
|
|
4026
|
-
e.preventDefault(),
|
|
4041
|
+
e.preventDefault(), W.current && W.current.querySelector("[role=\"option\"]:not([data-disabled]), [data-type=\"new-option\"]")?.focus();
|
|
4027
4042
|
break;
|
|
4028
4043
|
case "Tab":
|
|
4029
|
-
|
|
4044
|
+
Qe();
|
|
4030
4045
|
break;
|
|
4031
|
-
case "Escape": e.preventDefault(),
|
|
4046
|
+
case "Escape": e.preventDefault(), _e(!1), V && (Me.current = !0), K();
|
|
4032
4047
|
}
|
|
4033
|
-
}, [
|
|
4034
|
-
|
|
4035
|
-
|
|
4048
|
+
}, [
|
|
4049
|
+
K,
|
|
4050
|
+
Qe,
|
|
4051
|
+
V
|
|
4052
|
+
]), mt = o((e) => {
|
|
4053
|
+
Ze(e);
|
|
4054
|
+
}, [Ze]), ht = o((e) => {
|
|
4036
4055
|
switch (e.key) {
|
|
4037
4056
|
case "Enter":
|
|
4038
4057
|
case " ":
|
|
4039
|
-
e.preventDefault(),
|
|
4058
|
+
e.preventDefault(), Ze(e.currentTarget.dataset.value || "");
|
|
4040
4059
|
break;
|
|
4041
4060
|
case "ArrowDown":
|
|
4042
|
-
e.preventDefault(),
|
|
4061
|
+
e.preventDefault(), W.current && yr(W.current);
|
|
4043
4062
|
break;
|
|
4044
4063
|
case "ArrowUp":
|
|
4045
|
-
e.preventDefault(),
|
|
4064
|
+
e.preventDefault(), W.current && vr(e.currentTarget, W.current, y);
|
|
4046
4065
|
break;
|
|
4047
|
-
case "Escape": e.preventDefault(),
|
|
4066
|
+
case "Escape": e.preventDefault(), _e(!1), V && (Me.current = !0), K();
|
|
4048
4067
|
}
|
|
4049
4068
|
}, [
|
|
4050
|
-
|
|
4069
|
+
Ze,
|
|
4051
4070
|
y,
|
|
4052
|
-
|
|
4071
|
+
K,
|
|
4072
|
+
V
|
|
4053
4073
|
]);
|
|
4054
4074
|
return c(() => {
|
|
4055
|
-
if (
|
|
4075
|
+
if (!$) return;
|
|
4056
4076
|
let e = (e) => {
|
|
4057
4077
|
let t = e.target;
|
|
4058
|
-
|
|
4078
|
+
G.current && !G.current.contains(t) && Qe();
|
|
4059
4079
|
};
|
|
4060
4080
|
return document.addEventListener("click", e, !0), () => {
|
|
4061
4081
|
document.removeEventListener("click", e, !0);
|
|
4062
4082
|
};
|
|
4063
|
-
}, [
|
|
4064
|
-
let e =
|
|
4083
|
+
}, [$, Qe]), c(() => {
|
|
4084
|
+
let e = G.current?.closest("form");
|
|
4065
4085
|
if (!e) return;
|
|
4066
4086
|
let t = () => {
|
|
4067
4087
|
window.setTimeout(() => {
|
|
4068
|
-
if (pe(me.current), he([]),
|
|
4088
|
+
if (pe(me.current), he([]), xe(""), ye(""), De(null), Ce(""), ue.current) {
|
|
4069
4089
|
let e = g ? me.current.join(",") : me.current[0] || "";
|
|
4070
|
-
|
|
4090
|
+
ue.current.value = e;
|
|
4071
4091
|
}
|
|
4072
4092
|
}, 0);
|
|
4073
4093
|
};
|
|
4074
4094
|
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
4075
4095
|
}, [g]), u(n, () => ({
|
|
4076
4096
|
get value() {
|
|
4077
|
-
return
|
|
4097
|
+
return ue.current?.value ?? "";
|
|
4078
4098
|
},
|
|
4079
4099
|
set value(e) {
|
|
4080
4100
|
let t = Array.isArray(e) ? e : e ? String(e).split(",").filter(Boolean) : [];
|
|
4081
|
-
|
|
4101
|
+
Y || pe(t), ue.current && (ue.current.value = t.join(","));
|
|
4082
4102
|
},
|
|
4083
4103
|
focus() {
|
|
4084
|
-
V ? H.current?.focus() :
|
|
4104
|
+
V ? H.current?.focus() : U.current?.focus();
|
|
4085
4105
|
},
|
|
4086
4106
|
blur() {
|
|
4087
|
-
V ? H.current?.blur() :
|
|
4107
|
+
V ? H.current?.blur() : U.current?.blur();
|
|
4088
4108
|
}
|
|
4089
|
-
}), [
|
|
4109
|
+
}), [Y]), {
|
|
4090
4110
|
id: r,
|
|
4091
4111
|
inputId: z,
|
|
4092
|
-
listboxId:
|
|
4093
|
-
values:
|
|
4094
|
-
inputValue:
|
|
4095
|
-
searchValue:
|
|
4096
|
-
options:
|
|
4097
|
-
filteredOptions:
|
|
4098
|
-
isOpen:
|
|
4099
|
-
userInfoMessage:
|
|
4112
|
+
listboxId: le,
|
|
4113
|
+
values: X,
|
|
4114
|
+
inputValue: be,
|
|
4115
|
+
searchValue: ve,
|
|
4116
|
+
options: Q,
|
|
4117
|
+
filteredOptions: Ve,
|
|
4118
|
+
isOpen: $,
|
|
4119
|
+
userInfoMessage: Re,
|
|
4120
|
+
skipInputTab: Ae,
|
|
4121
|
+
restoreInputTab: () => je(!1),
|
|
4100
4122
|
strings: ce,
|
|
4101
|
-
addValueText:
|
|
4102
|
-
maxIsReached:
|
|
4103
|
-
editingSingleValue:
|
|
4104
|
-
inputFocus:
|
|
4105
|
-
focusedTagIndex:
|
|
4123
|
+
addValueText: Ee,
|
|
4124
|
+
maxIsReached: ze,
|
|
4125
|
+
editingSingleValue: Ne,
|
|
4126
|
+
inputFocus: Oe,
|
|
4127
|
+
focusedTagIndex: Fe,
|
|
4106
4128
|
label: i,
|
|
4107
4129
|
multiple: g,
|
|
4108
4130
|
maxlength: _,
|
|
@@ -4131,28 +4153,28 @@ function Er(t, n) {
|
|
|
4131
4153
|
inputSize: ae,
|
|
4132
4154
|
name: oe,
|
|
4133
4155
|
className: se,
|
|
4134
|
-
hasCounter:
|
|
4156
|
+
hasCounter: Be,
|
|
4135
4157
|
inputRef: H,
|
|
4136
|
-
changeInputRef:
|
|
4137
|
-
triggerRef:
|
|
4138
|
-
listboxRef:
|
|
4139
|
-
wrapperRef:
|
|
4140
|
-
handleInputChange:
|
|
4141
|
-
handleInputKeydown:
|
|
4142
|
-
handleInputFocus:
|
|
4143
|
-
handleInputBlur:
|
|
4144
|
-
handleFocusOut:
|
|
4145
|
-
handleInputClick:
|
|
4146
|
-
handlePlaceholderClick:
|
|
4147
|
-
handleSelectOnlyKeydown:
|
|
4148
|
-
handleOptionClick:
|
|
4149
|
-
handleOptionKeydown:
|
|
4150
|
-
handleTagRemove:
|
|
4151
|
-
handleTagKeydown:
|
|
4152
|
-
handleSearchInput:
|
|
4153
|
-
handleSearchKeydown:
|
|
4154
|
-
handleNewOptionClick:
|
|
4155
|
-
handleNewOptionKeydown:
|
|
4158
|
+
changeInputRef: ue,
|
|
4159
|
+
triggerRef: U,
|
|
4160
|
+
listboxRef: W,
|
|
4161
|
+
wrapperRef: G,
|
|
4162
|
+
handleInputChange: et,
|
|
4163
|
+
handleInputKeydown: tt,
|
|
4164
|
+
handleInputFocus: nt,
|
|
4165
|
+
handleInputBlur: rt,
|
|
4166
|
+
handleFocusOut: it,
|
|
4167
|
+
handleInputClick: at,
|
|
4168
|
+
handlePlaceholderClick: ot,
|
|
4169
|
+
handleSelectOnlyKeydown: st,
|
|
4170
|
+
handleOptionClick: ct,
|
|
4171
|
+
handleOptionKeydown: lt,
|
|
4172
|
+
handleTagRemove: ut,
|
|
4173
|
+
handleTagKeydown: dt,
|
|
4174
|
+
handleSearchInput: ft,
|
|
4175
|
+
handleSearchKeydown: pt,
|
|
4176
|
+
handleNewOptionClick: mt,
|
|
4177
|
+
handleNewOptionKeydown: ht,
|
|
4156
4178
|
onChange: I
|
|
4157
4179
|
};
|
|
4158
4180
|
}
|
|
@@ -4248,7 +4270,7 @@ var Or = null, kr = () => Or || (Or = new Promise((e, t) => {
|
|
|
4248
4270
|
hotjarId: i,
|
|
4249
4271
|
googleAnalyticsId: a
|
|
4250
4272
|
};
|
|
4251
|
-
let g = p(() => {}), v = o in
|
|
4273
|
+
let g = p(() => {}), v = o in X.i18n ? o : "nb", y = l ?? X.i18n[v].contentPresentation.buttons.settings;
|
|
4252
4274
|
c(() => {
|
|
4253
4275
|
let e = !1, t, n = h.current;
|
|
4254
4276
|
window.cookieBanner_googleAnalyticsId = n.googleAnalyticsId, window.cookieBanner_hotjarId = n.hotjarId, n.cookieDomain && (window.cookieBanner_cookieDomain = n.cookieDomain), n.cookieSecure && (window.cookieBanner_cookieSecure = n.cookieSecure), n.cookieExpiryDays && (window.cookieBanner_cookieExpiryDays = n.cookieExpiryDays), n.devMode && (window.cookieBanner_devMode = n.devMode);
|
|
@@ -4298,7 +4320,7 @@ var Or = null, kr = () => Or || (Or = new Promise((e, t) => {
|
|
|
4298
4320
|
"aria-haspopup": "dialog",
|
|
4299
4321
|
onClick: b,
|
|
4300
4322
|
children: y
|
|
4301
|
-
}) : s === "icon" ? /* @__PURE__ */ _(
|
|
4323
|
+
}) : s === "icon" ? /* @__PURE__ */ _(Z, {
|
|
4302
4324
|
ref: f,
|
|
4303
4325
|
skin: "tertiary",
|
|
4304
4326
|
variant: "icon-only",
|
|
@@ -4306,7 +4328,7 @@ var Or = null, kr = () => Or || (Or = new Promise((e, t) => {
|
|
|
4306
4328
|
"aria-haspopup": "dialog",
|
|
4307
4329
|
onClick: b,
|
|
4308
4330
|
children: y
|
|
4309
|
-
}) : /* @__PURE__ */ _(
|
|
4331
|
+
}) : /* @__PURE__ */ _(Z, {
|
|
4310
4332
|
ref: f,
|
|
4311
4333
|
"aria-haspopup": "dialog",
|
|
4312
4334
|
onClick: b,
|
|
@@ -4550,24 +4572,24 @@ var Nr = () => {
|
|
|
4550
4572
|
//#endregion
|
|
4551
4573
|
//#region src/components/datepicker/useDatepickerState.ts
|
|
4552
4574
|
function Kr(e, t) {
|
|
4553
|
-
let { id: n, label: r, value: i, defaultValue: a, dateformat: s = "dd.MM.yyyy", multiple: l = !1, maxlength: d, range: h = !1, showRangeLabels: g = !1, weeknumbers: _ = !1, withcontrols: v = !1, excludedates: y, excludeweekdays: b, currentmonth: x, today: S, calendarOpen: C, timezone: w, fullwidth: T = !1, inputSize: E = "medium", hasFieldset: D = !1, counter: O, inline: k = !1, helptext: A, helptextDropdown: j, helptextDropdownButton: M, hasError: N = !1, errorMessage: P, optionalTag: ee = !1, optionalText: te, requiredTag: ne = !1, requiredText: F, tagText: re, useWrapper: ie = !0, strings: ae, disabled: oe = !1, readOnly: se = !1, required: I = !1, name: L, min: R, max: ce, placeholder: z, onChange: B, onValueChange:
|
|
4575
|
+
let { id: n, label: r, value: i, defaultValue: a, dateformat: s = "dd.MM.yyyy", multiple: l = !1, maxlength: d, range: h = !1, showRangeLabels: g = !1, weeknumbers: _ = !1, withcontrols: v = !1, excludedates: y, excludeweekdays: b, currentmonth: x, today: S, calendarOpen: C, timezone: w, fullwidth: T = !1, inputSize: E = "medium", hasFieldset: D = !1, counter: O, inline: k = !1, helptext: A, helptextDropdown: j, helptextDropdownButton: M, hasError: N = !1, errorMessage: P, optionalTag: ee = !1, optionalText: te, requiredTag: ne = !1, requiredText: F, tagText: re, useWrapper: ie = !0, strings: ae, disabled: oe = !1, readOnly: se = !1, required: I = !1, name: L, min: R, max: ce, placeholder: z, onChange: B, onValueChange: le, className: V, ...H } = e, ue = o((e) => e === void 0 ? [] : Gr(e), []), U = i !== void 0, W = typeof a == "number" ? void 0 : a, [G, K] = m(() => ue(i ?? W)), q = U ? ue(i) : G, de = p(G);
|
|
4554
4576
|
c(() => {
|
|
4555
|
-
U &&
|
|
4577
|
+
U && K(ue(i));
|
|
4556
4578
|
}, [
|
|
4557
4579
|
i,
|
|
4558
4580
|
U,
|
|
4559
4581
|
ue
|
|
4560
4582
|
]);
|
|
4561
|
-
let [
|
|
4583
|
+
let [J, Y] = m(C ?? !1);
|
|
4562
4584
|
c(() => {
|
|
4563
|
-
C !== void 0 &&
|
|
4585
|
+
C !== void 0 && Y(C);
|
|
4564
4586
|
}, [C]);
|
|
4565
|
-
let
|
|
4587
|
+
let fe = p(null), pe = p(null), me = p(null), X = p(null), Z = p(null), he = f(() => Pr(), []), Q = f(() => Nr(), []), $ = ge([
|
|
4566
4588
|
"generic",
|
|
4567
4589
|
"datepicker",
|
|
4568
4590
|
"validation"
|
|
4569
|
-
], ae),
|
|
4570
|
-
let e = Ir(T, g, l, h, se,
|
|
4591
|
+
], ae), _e = ae, ve = typeof R == "string" ? R : R === void 0 ? void 0 : String(R), ye = typeof ce == "string" ? ce : ce === void 0 ? void 0 : String(ce), be = f(() => {
|
|
4592
|
+
let e = Ir(T, g, l, h, se, he, E);
|
|
4571
4593
|
return Object.entries(e).filter(([, e]) => e).map(([e]) => e).join(" ");
|
|
4572
4594
|
}, [
|
|
4573
4595
|
T,
|
|
@@ -4575,92 +4597,92 @@ function Kr(e, t) {
|
|
|
4575
4597
|
l,
|
|
4576
4598
|
h,
|
|
4577
4599
|
se,
|
|
4578
|
-
|
|
4600
|
+
he,
|
|
4579
4601
|
E
|
|
4580
|
-
]),
|
|
4602
|
+
]), xe = Object.entries(Lr(E)).filter(([, e]) => e).map(([e]) => e).join(" "), Se = f(() => {
|
|
4581
4603
|
let e = Rr(g);
|
|
4582
4604
|
return Object.entries(e).filter(([, e]) => e).map(([e]) => e).join(" ");
|
|
4583
|
-
}, [g]),
|
|
4605
|
+
}, [g]), Ce = f(() => ["pkt-datepicker__inputs", h && "pkt-input__range-inputs"].filter(Boolean).join(" "), [h, g]), we = f(() => {
|
|
4584
4606
|
if (x) return x;
|
|
4585
|
-
if (
|
|
4586
|
-
}, [x,
|
|
4607
|
+
if (ye) return ye.slice(0, 7);
|
|
4608
|
+
}, [x, ye]), Te = oe || l && d != null && q.length >= d, Ee = O ?? (l && d != null), De = `${n}-input`, Oe = q.join(",");
|
|
4587
4609
|
c(() => {
|
|
4588
|
-
|
|
4589
|
-
}, [
|
|
4610
|
+
me.current && (me.current.value = Oe);
|
|
4611
|
+
}, [Oe]), c(() => {
|
|
4590
4612
|
w && typeof window < "u" && w !== window.pktTz && (window.pktTz = w);
|
|
4591
4613
|
}, [w]);
|
|
4592
|
-
let
|
|
4593
|
-
U ||
|
|
4594
|
-
}, [U,
|
|
4614
|
+
let ke = o((e, t = !0) => {
|
|
4615
|
+
U || K(e), t && le?.(e);
|
|
4616
|
+
}, [U, le]), Ae = f(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), je = o((e) => {
|
|
4595
4617
|
if (h && e.length === 1) return;
|
|
4596
|
-
let t =
|
|
4618
|
+
let t = me.current;
|
|
4597
4619
|
!t || !Ae || (Ae.call(t, e.join(",")), t.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
4598
4620
|
}, [Ae, h]), Me = o(() => {
|
|
4599
|
-
oe ||
|
|
4621
|
+
oe || Y((e) => !e);
|
|
4600
4622
|
}, [oe]), Ne = o(() => {
|
|
4601
|
-
|
|
4623
|
+
Y(!1);
|
|
4602
4624
|
}, []);
|
|
4603
4625
|
c(() => {
|
|
4604
|
-
if (!
|
|
4626
|
+
if (!J) return;
|
|
4605
4627
|
let e = (e) => {
|
|
4606
4628
|
let t = e.target;
|
|
4607
|
-
|
|
4629
|
+
Z.current && !Z.current.contains(t) && !t.closest?.(".pkt-calendar-popup") && Ne();
|
|
4608
4630
|
}, t = (e) => {
|
|
4609
|
-
e.key === "Escape" && (Ne(),
|
|
4631
|
+
e.key === "Escape" && (Ne(), fe.current?.focus());
|
|
4610
4632
|
};
|
|
4611
4633
|
return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
|
|
4612
4634
|
document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
|
|
4613
4635
|
};
|
|
4614
|
-
}, [
|
|
4636
|
+
}, [J, Ne]);
|
|
4615
4637
|
let Pe = o(() => {
|
|
4616
|
-
Q && !
|
|
4617
|
-
}, [Q,
|
|
4638
|
+
Q && !J && Y(!0);
|
|
4639
|
+
}, [Q, J]), Fe = o((e) => {
|
|
4618
4640
|
let t = Gr(zr(e, l, h));
|
|
4619
|
-
|
|
4641
|
+
ke(t), je(t), !l && !h && (Ne(), fe.current?.focus());
|
|
4620
4642
|
}, [
|
|
4621
4643
|
l,
|
|
4622
4644
|
h,
|
|
4623
|
-
|
|
4645
|
+
ke,
|
|
4624
4646
|
je,
|
|
4625
4647
|
Ne
|
|
4626
4648
|
]), Ie = o(() => {
|
|
4627
|
-
Ne(),
|
|
4649
|
+
Ne(), fe.current?.focus();
|
|
4628
4650
|
}, [Ne]), Le = o((e) => {
|
|
4629
4651
|
let t = e.target.value, n = t ? [t] : [];
|
|
4630
|
-
|
|
4631
|
-
}, [
|
|
4632
|
-
let t = [e.target.value,
|
|
4633
|
-
|
|
4652
|
+
ke(n), je(n);
|
|
4653
|
+
}, [ke, je]), Re = o((e) => {
|
|
4654
|
+
let t = [e.target.value, q[1] ?? ""].filter(Boolean);
|
|
4655
|
+
ke(t), je(t);
|
|
4634
4656
|
}, [
|
|
4635
|
-
|
|
4636
|
-
|
|
4657
|
+
q,
|
|
4658
|
+
ke,
|
|
4637
4659
|
je
|
|
4638
4660
|
]), ze = o((e) => {
|
|
4639
|
-
let t = [
|
|
4640
|
-
|
|
4661
|
+
let t = [q[0] ?? "", e.target.value].filter(Boolean);
|
|
4662
|
+
ke(t), je(t);
|
|
4641
4663
|
}, [
|
|
4642
|
-
|
|
4643
|
-
|
|
4664
|
+
q,
|
|
4665
|
+
ke,
|
|
4644
4666
|
je
|
|
4645
4667
|
]), Be = o(() => {
|
|
4646
|
-
|
|
4668
|
+
q.length === 2 && !Fr(q) && (ke([q[0]]), je([q[0]]));
|
|
4647
4669
|
}, [
|
|
4648
|
-
|
|
4649
|
-
|
|
4670
|
+
q,
|
|
4671
|
+
ke,
|
|
4650
4672
|
je
|
|
4651
4673
|
]), Ve = o((e) => {
|
|
4652
|
-
let t = Qt(e), n =
|
|
4674
|
+
let t = Qt(e), n = ve ? Qt(ve) : null, r = ye ? Qt(ye) : null;
|
|
4653
4675
|
if (t && !isNaN(t.getTime()) && (!n || t >= n) && (!r || t <= r)) {
|
|
4654
|
-
let t = ln([...
|
|
4655
|
-
|
|
4676
|
+
let t = ln([...q, e], ve, ye, y, b), n = [...new Set(t)];
|
|
4677
|
+
ke(n), je(n);
|
|
4656
4678
|
}
|
|
4657
4679
|
}, [
|
|
4658
|
-
|
|
4680
|
+
q,
|
|
4681
|
+
ve,
|
|
4659
4682
|
ye,
|
|
4660
|
-
be,
|
|
4661
4683
|
y,
|
|
4662
4684
|
b,
|
|
4663
|
-
|
|
4685
|
+
ke,
|
|
4664
4686
|
je
|
|
4665
4687
|
]), He = o((e) => {
|
|
4666
4688
|
let t = e.target;
|
|
@@ -4669,57 +4691,57 @@ function Kr(e, t) {
|
|
|
4669
4691
|
let t = e.target;
|
|
4670
4692
|
t.value &&= (Ve(t.value.split(",")[0]), "");
|
|
4671
4693
|
}, [Ve]), We = o((e) => {
|
|
4672
|
-
let t =
|
|
4673
|
-
|
|
4694
|
+
let t = q.filter((t) => t !== e);
|
|
4695
|
+
ke(t), je(t);
|
|
4674
4696
|
}, [
|
|
4675
|
-
|
|
4676
|
-
|
|
4697
|
+
q,
|
|
4698
|
+
ke,
|
|
4677
4699
|
je
|
|
4678
4700
|
]), Ge = o((e) => {
|
|
4679
4701
|
let t = e?.closest("form");
|
|
4680
4702
|
t ? t.requestSubmit() : e?.blur();
|
|
4681
4703
|
}, []), Ke = o((e) => {
|
|
4682
|
-
Vr(e.nativeEvent, () => Me(), () => Ge(
|
|
4704
|
+
Vr(e.nativeEvent, () => Me(), () => Ge(fe.current), void 0, () => fe.current?.blur());
|
|
4683
4705
|
}, [Me, Ge]), qe = o((e) => {
|
|
4684
|
-
Vr(e.nativeEvent, () => Me(), () => Ge(
|
|
4706
|
+
Vr(e.nativeEvent, () => Me(), () => Ge(fe.current), () => pe.current?.focus(), () => fe.current?.blur());
|
|
4685
4707
|
}, [Me, Ge]), Je = o((e) => {
|
|
4686
|
-
Vr(e.nativeEvent, () => Me(), () => Ge(
|
|
4708
|
+
Vr(e.nativeEvent, () => Me(), () => Ge(pe.current), void 0, () => pe.current?.blur());
|
|
4687
4709
|
}, [Me, Ge]), Ye = o((e) => {
|
|
4688
|
-
Vr(e.nativeEvent, () => Me(), () => Ge(
|
|
4710
|
+
Vr(e.nativeEvent, () => Me(), () => Ge(fe.current), void 0, () => fe.current?.blur(), Ue);
|
|
4689
4711
|
}, [
|
|
4690
4712
|
Me,
|
|
4691
4713
|
Ge,
|
|
4692
4714
|
Ue
|
|
4693
4715
|
]);
|
|
4694
4716
|
return c(() => {
|
|
4695
|
-
let e =
|
|
4717
|
+
let e = Z.current?.closest("form");
|
|
4696
4718
|
if (!e) return;
|
|
4697
4719
|
let t = () => {
|
|
4698
4720
|
window.setTimeout(() => {
|
|
4699
|
-
|
|
4721
|
+
K(de.current), Y(!1), me.current && (me.current.value = de.current.join(","));
|
|
4700
4722
|
}, 0);
|
|
4701
4723
|
};
|
|
4702
4724
|
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
4703
4725
|
}, []), u(t, () => ({
|
|
4704
4726
|
get value() {
|
|
4705
|
-
return
|
|
4727
|
+
return me.current?.value ?? "";
|
|
4706
4728
|
},
|
|
4707
4729
|
set value(e) {
|
|
4708
4730
|
let t = e ? e.split(",").filter(Boolean) : [];
|
|
4709
|
-
|
|
4731
|
+
K(t), me.current && (me.current.value = e ?? "");
|
|
4710
4732
|
},
|
|
4711
4733
|
focus() {
|
|
4712
|
-
|
|
4734
|
+
fe.current?.focus();
|
|
4713
4735
|
},
|
|
4714
4736
|
blur() {
|
|
4715
|
-
|
|
4737
|
+
fe.current?.blur();
|
|
4716
4738
|
}
|
|
4717
4739
|
}), []), {
|
|
4718
4740
|
id: n,
|
|
4719
|
-
inputId:
|
|
4741
|
+
inputId: De,
|
|
4720
4742
|
label: r,
|
|
4721
|
-
values:
|
|
4722
|
-
calendarOpen:
|
|
4743
|
+
values: q,
|
|
4744
|
+
calendarOpen: J,
|
|
4723
4745
|
dateformat: s,
|
|
4724
4746
|
multiple: l,
|
|
4725
4747
|
maxlength: d,
|
|
@@ -4749,26 +4771,26 @@ function Kr(e, t) {
|
|
|
4749
4771
|
requiredText: F,
|
|
4750
4772
|
tagText: re,
|
|
4751
4773
|
useWrapper: ie,
|
|
4752
|
-
className:
|
|
4753
|
-
minStr:
|
|
4754
|
-
maxStr:
|
|
4755
|
-
effectiveCurrentMonth:
|
|
4774
|
+
className: V,
|
|
4775
|
+
minStr: ve,
|
|
4776
|
+
maxStr: ye,
|
|
4777
|
+
effectiveCurrentMonth: we,
|
|
4756
4778
|
today: S,
|
|
4757
|
-
inputType:
|
|
4779
|
+
inputType: he,
|
|
4758
4780
|
isIOSDevice: Q,
|
|
4759
|
-
strings:
|
|
4760
|
-
stringsOverride:
|
|
4761
|
-
inputClasses:
|
|
4762
|
-
buttonClasses:
|
|
4763
|
-
rangeLabelClasses:
|
|
4764
|
-
datepickerInputsClasses:
|
|
4765
|
-
isInputDisabled:
|
|
4766
|
-
hasCounter:
|
|
4767
|
-
inputRef:
|
|
4768
|
-
inputRefTo:
|
|
4769
|
-
changeInputRef:
|
|
4770
|
-
btnRef:
|
|
4771
|
-
wrapperRef:
|
|
4781
|
+
strings: $,
|
|
4782
|
+
stringsOverride: _e,
|
|
4783
|
+
inputClasses: be,
|
|
4784
|
+
buttonClasses: xe,
|
|
4785
|
+
rangeLabelClasses: Se,
|
|
4786
|
+
datepickerInputsClasses: Ce,
|
|
4787
|
+
isInputDisabled: Te,
|
|
4788
|
+
hasCounter: Ee,
|
|
4789
|
+
inputRef: fe,
|
|
4790
|
+
inputRefTo: pe,
|
|
4791
|
+
changeInputRef: me,
|
|
4792
|
+
btnRef: X,
|
|
4793
|
+
wrapperRef: Z,
|
|
4772
4794
|
onChange: B,
|
|
4773
4795
|
toggleCalendar: Me,
|
|
4774
4796
|
hideCalendar: Ne,
|
|
@@ -4785,7 +4807,7 @@ function Kr(e, t) {
|
|
|
4785
4807
|
handleRangeFromKeydown: qe,
|
|
4786
4808
|
handleRangeToKeydown: Je,
|
|
4787
4809
|
handleMultipleKeydown: Ye,
|
|
4788
|
-
restProps:
|
|
4810
|
+
restProps: H
|
|
4789
4811
|
};
|
|
4790
4812
|
}
|
|
4791
4813
|
//#endregion
|
|
@@ -5289,7 +5311,7 @@ var Ti = "comments", Ei = (e) => {
|
|
|
5289
5311
|
disabled: t,
|
|
5290
5312
|
defaultValue: i?.text
|
|
5291
5313
|
}),
|
|
5292
|
-
/* @__PURE__ */ _(
|
|
5314
|
+
/* @__PURE__ */ _(Z, {
|
|
5293
5315
|
skin: "secondary",
|
|
5294
5316
|
size: "small",
|
|
5295
5317
|
disabled: t,
|
|
@@ -5302,7 +5324,7 @@ var Ti = "comments", Ei = (e) => {
|
|
|
5302
5324
|
},
|
|
5303
5325
|
children: o ? "Lagre kommentar" : "Legg til kommentar"
|
|
5304
5326
|
}),
|
|
5305
|
-
/* @__PURE__ */ _(
|
|
5327
|
+
/* @__PURE__ */ _(Z, {
|
|
5306
5328
|
skin: "tertiary",
|
|
5307
5329
|
size: "small",
|
|
5308
5330
|
disabled: t,
|
|
@@ -5402,14 +5424,14 @@ var Ti = "comments", Ei = (e) => {
|
|
|
5402
5424
|
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), o()), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), r());
|
|
5403
5425
|
}
|
|
5404
5426
|
}),
|
|
5405
|
-
/* @__PURE__ */ _(
|
|
5427
|
+
/* @__PURE__ */ _(Z, {
|
|
5406
5428
|
skin: "secondary",
|
|
5407
5429
|
size: "small",
|
|
5408
5430
|
disabled: t,
|
|
5409
5431
|
onClick: o,
|
|
5410
5432
|
children: "Lagre"
|
|
5411
5433
|
}),
|
|
5412
|
-
/* @__PURE__ */ _(
|
|
5434
|
+
/* @__PURE__ */ _(Z, {
|
|
5413
5435
|
skin: "tertiary",
|
|
5414
5436
|
size: "small",
|
|
5415
5437
|
disabled: t,
|
|
@@ -5638,7 +5660,7 @@ var Hi = "is-scroll-locked", Ui = 0, Wi = 0, Gi = () => typeof document < "u" &&
|
|
|
5638
5660
|
}) : /* @__PURE__ */ _("div", { className: "pkt-modal__headingText" }),
|
|
5639
5661
|
i ? /* @__PURE__ */ _("div", { className: "pkt-modal__noCloseButton" }) : /* @__PURE__ */ _("div", {
|
|
5640
5662
|
className: (0, M.default)("pkt-modal__closeButton", { [`pkt-modal__closeButton--${u}`]: !0 }),
|
|
5641
|
-
children: /* @__PURE__ */ _(
|
|
5663
|
+
children: /* @__PURE__ */ _(Z, {
|
|
5642
5664
|
onClick: C,
|
|
5643
5665
|
"aria-label": "close",
|
|
5644
5666
|
iconName: "close",
|
|
@@ -5825,7 +5847,7 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
5825
5847
|
}), l = !!t;
|
|
5826
5848
|
return /* @__PURE__ */ v("div", {
|
|
5827
5849
|
className: `pkt-fileupload__queue-display__item__thumbnail${n && !i ? "" : " pkt-fileupload__queue-display__item__thumbnail--fallback"}`,
|
|
5828
|
-
children: [/* @__PURE__ */ v(
|
|
5850
|
+
children: [/* @__PURE__ */ v(Z, {
|
|
5829
5851
|
className: "pkt-fileupload__queue-display__item__thumbnail__image-wrapper",
|
|
5830
5852
|
"aria-label": `Forhåndsvis bilde ${e.attributes.targetFilename}`,
|
|
5831
5853
|
type: "button",
|
|
@@ -5881,7 +5903,7 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
5881
5903
|
children: /* @__PURE__ */ v("div", {
|
|
5882
5904
|
className: "pkt-fileupload__image-preview",
|
|
5883
5905
|
children: [
|
|
5884
|
-
f && /* @__PURE__ */ _(
|
|
5906
|
+
f && /* @__PURE__ */ _(Z, {
|
|
5885
5907
|
variant: "icon-only",
|
|
5886
5908
|
iconName: "chevron-thin-left",
|
|
5887
5909
|
skin: "secondary",
|
|
@@ -5910,7 +5932,7 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
5910
5932
|
t.length
|
|
5911
5933
|
]
|
|
5912
5934
|
}),
|
|
5913
|
-
f && /* @__PURE__ */ _(
|
|
5935
|
+
f && /* @__PURE__ */ _(Z, {
|
|
5914
5936
|
variant: "icon-only",
|
|
5915
5937
|
iconName: "chevron-thin-right",
|
|
5916
5938
|
skin: "secondary",
|
|
@@ -6051,19 +6073,19 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
6051
6073
|
filename: la,
|
|
6052
6074
|
thumbnail: ua
|
|
6053
6075
|
}, Sa = i(({ value: e, defaultValue: t, id: n, multiple: r = !1, uploadStrategy: i = "form", addCommentsEnabled: a = !1, renameFilesEnabled: s = !1, truncateTail: d = 4, onFilesChanged: h, onFileUploadRequested: g, extraOperations: y = [], itemRenderer: b = xa.filename, fullwidth: x = !1, allowedFormats: S, formatErrorMessage: C, maxFileSize: w, sizeErrorMessage: T, onFileValidation: E, onFileValidate: D, errorMessage: O, hasError: k = !1, disabled: A = !1, label: j, helptext: N, helptextDropdown: P, helptextDropdownButton: ee, optionalTag: te, optionalText: ne, requiredTag: F, requiredText: re, tagText: ie, required: ae = !1, enableImagePreview: oe = !1, "aria-describedby": se, "aria-invalid": I, strings: L, ...R }, ce) => {
|
|
6054
|
-
let z = l(),
|
|
6055
|
-
u(ce, () =>
|
|
6056
|
-
let ue = "transfers" in R ? R.transfers : void 0, U = ge(["fileupload"], L).fileupload, [
|
|
6076
|
+
let z = l(), V = n ?? `pkt-fileupload-${z}`, H = p(null);
|
|
6077
|
+
u(ce, () => H.current, []);
|
|
6078
|
+
let ue = "transfers" in R ? R.transfers : void 0, U = ge(["fileupload"], L).fileupload, [W, G] = m(null), [K, q] = m("");
|
|
6057
6079
|
c(() => {
|
|
6058
|
-
if (!
|
|
6059
|
-
let e = setTimeout(() =>
|
|
6080
|
+
if (!K) return;
|
|
6081
|
+
let e = setTimeout(() => q(""), 1500);
|
|
6060
6082
|
return () => clearTimeout(e);
|
|
6061
|
-
}, [
|
|
6062
|
-
let
|
|
6083
|
+
}, [K]);
|
|
6084
|
+
let de = W ?? O ?? null, J = k || !!W || !!(O && O.trim()), Y = de ? `${V}-error` : void 0, fe = [
|
|
6063
6085
|
se,
|
|
6064
|
-
N ? `${
|
|
6065
|
-
|
|
6066
|
-
].filter(Boolean).join(" ") || void 0,
|
|
6086
|
+
N ? `${V}-helptext` : void 0,
|
|
6087
|
+
Y
|
|
6088
|
+
].filter(Boolean).join(" ") || void 0, pe = J || I === !0 || I === "true", me = o((e) => {
|
|
6067
6089
|
let t = ti(e, {
|
|
6068
6090
|
allowedFormats: S,
|
|
6069
6091
|
maxFileSize: w,
|
|
@@ -6089,24 +6111,24 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
6089
6111
|
D
|
|
6090
6112
|
]);
|
|
6091
6113
|
e !== void 0 && t !== void 0 && console.warn("PktFileupload: Både value og defaultValue er angitt. Komponenten kan være enten 'controlled' eller 'uncontrolled', ikke begge deler. Bruk kun én av dem. Se https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable"), e !== void 0 && h === void 0 && console.warn("PktFileupload: value-prop er angitt uten onFilesChanged-callback. Når en komponent er 'controlled', må endringer håndteres via en callback. Vennligst legg til onFilesChanged-callback for å håndtere endringer i fil-listen. Se https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable");
|
|
6092
|
-
let
|
|
6093
|
-
Bi(
|
|
6114
|
+
let X = e !== void 0, [Z, he] = m(() => t ?? []), Q = X ? e : Z;
|
|
6115
|
+
Bi(H, {
|
|
6094
6116
|
uploadStrategy: i,
|
|
6095
6117
|
required: ae,
|
|
6096
6118
|
currentFileCount: Q.length,
|
|
6097
|
-
onMissingFiles: o(() =>
|
|
6119
|
+
onMissingFiles: o(() => G(U.requiredMissing), [U])
|
|
6098
6120
|
});
|
|
6099
|
-
let
|
|
6121
|
+
let _e = typeof b == "string" ? xa[b] : b, ve = b === "thumbnail", ye = typeof R.accept == "string" ? R.accept.trim() : void 0, be = f(() => $r(ye, S) || void 0, [ye, S]), xe = s && !ve, Se = a && !ve, Ce = o((e) => {
|
|
6100
6122
|
for (let t of e) {
|
|
6101
|
-
let e =
|
|
6123
|
+
let e = me(t.file);
|
|
6102
6124
|
if (e) {
|
|
6103
|
-
|
|
6125
|
+
G(e);
|
|
6104
6126
|
return;
|
|
6105
6127
|
}
|
|
6106
6128
|
}
|
|
6107
|
-
|
|
6129
|
+
G(null);
|
|
6108
6130
|
let t = r ? [...Q, ...e] : [e[0]], n = r ? e : [e[0]];
|
|
6109
|
-
|
|
6131
|
+
q(n.length === 1 ? B(U.srFileAdded, { filename: n[0].attributes.targetFilename }) : B(U.srFilesAdded, { count: n.length })), X || he(t), h?.(t), i === "custom" && g && e.forEach((e) => {
|
|
6110
6132
|
g?.(e);
|
|
6111
6133
|
});
|
|
6112
6134
|
}, [
|
|
@@ -6115,39 +6137,39 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
6115
6137
|
r,
|
|
6116
6138
|
i,
|
|
6117
6139
|
g,
|
|
6118
|
-
|
|
6119
|
-
|
|
6140
|
+
me,
|
|
6141
|
+
X,
|
|
6120
6142
|
U
|
|
6121
|
-
]),
|
|
6143
|
+
]), we = o((e, t) => {
|
|
6122
6144
|
let n = Q.map((n) => n.fileId === e ? {
|
|
6123
6145
|
...n,
|
|
6124
6146
|
...t
|
|
6125
6147
|
} : n);
|
|
6126
|
-
|
|
6148
|
+
X || he(n), h?.(n);
|
|
6127
6149
|
}, [
|
|
6128
6150
|
h,
|
|
6129
6151
|
Q,
|
|
6130
|
-
|
|
6131
|
-
]),
|
|
6152
|
+
X
|
|
6153
|
+
]), Te = o((e) => {
|
|
6132
6154
|
let t = Q.filter((t) => t.fileId !== e);
|
|
6133
|
-
|
|
6155
|
+
X || he(t), h?.(t), "onTransferCancelled" in R && R.onTransferCancelled && R.onTransferCancelled?.(e);
|
|
6134
6156
|
}, [
|
|
6135
6157
|
h,
|
|
6136
6158
|
Q,
|
|
6137
6159
|
R,
|
|
6138
|
-
|
|
6139
|
-
]), { buildAttributeAccessors:
|
|
6160
|
+
X
|
|
6161
|
+
]), { buildAttributeAccessors: Ee } = Li(Q, we), De = f(() => {
|
|
6140
6162
|
let e = [];
|
|
6141
|
-
return
|
|
6163
|
+
return xe && e.push(Ii), Se && e.push(ji), e.push(...y), e.push(Mi(Te)), e;
|
|
6142
6164
|
}, [
|
|
6165
|
+
xe,
|
|
6143
6166
|
Se,
|
|
6144
|
-
Ce,
|
|
6145
6167
|
y,
|
|
6146
|
-
|
|
6147
|
-
]), { totalCount:
|
|
6168
|
+
Te
|
|
6169
|
+
]), { totalCount: Oe, uploadedCount: ke, failedCount: Ae } = f(() => mi(Q, ue), [Q, ue]), je = le(Oe, U.fileLabelOne, U.fileLabelOther), Me = /* @__PURE__ */ _("div", {
|
|
6148
6170
|
className: (0, M.default)("pkt-fileupload", {
|
|
6149
6171
|
"pkt-fileupload--full-width": x,
|
|
6150
|
-
"pkt-fileupload--error":
|
|
6172
|
+
"pkt-fileupload--error": J,
|
|
6151
6173
|
"pkt-fileupload--disabled": A
|
|
6152
6174
|
}),
|
|
6153
6175
|
"aria-disabled": A,
|
|
@@ -6156,16 +6178,16 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
6156
6178
|
value: {
|
|
6157
6179
|
name: R.name || "",
|
|
6158
6180
|
multiple: !!r,
|
|
6159
|
-
id:
|
|
6181
|
+
id: V
|
|
6160
6182
|
},
|
|
6161
6183
|
children: [
|
|
6162
6184
|
/* @__PURE__ */ _("div", {
|
|
6163
6185
|
className: "pkt-sr-only",
|
|
6164
6186
|
"aria-live": "polite",
|
|
6165
6187
|
"aria-atomic": "true",
|
|
6166
|
-
children:
|
|
6167
|
-
uploaded:
|
|
6168
|
-
total:
|
|
6188
|
+
children: K || (Oe > 0 && ke > 0 ? B(U.srFilesUploadedOfTotal, {
|
|
6189
|
+
uploaded: ke,
|
|
6190
|
+
total: Oe,
|
|
6169
6191
|
label: je
|
|
6170
6192
|
}) : "")
|
|
6171
6193
|
}),
|
|
@@ -6173,51 +6195,51 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
6173
6195
|
className: "pkt-sr-only",
|
|
6174
6196
|
"aria-live": "assertive",
|
|
6175
6197
|
"aria-atomic": "true",
|
|
6176
|
-
children:
|
|
6198
|
+
children: Oe > 0 && Ae > 0 && B(U.srFilesFailedOfTotal, {
|
|
6177
6199
|
failed: Ae,
|
|
6178
|
-
total:
|
|
6200
|
+
total: Oe,
|
|
6179
6201
|
label: je
|
|
6180
6202
|
})
|
|
6181
6203
|
}),
|
|
6182
6204
|
/* @__PURE__ */ _(xi, {
|
|
6183
|
-
id:
|
|
6205
|
+
id: V,
|
|
6184
6206
|
name: R.name || "",
|
|
6185
6207
|
value: Q,
|
|
6186
|
-
onFilesAdded:
|
|
6208
|
+
onFilesAdded: Ce,
|
|
6187
6209
|
multiple: r,
|
|
6188
6210
|
uploadStrategy: i,
|
|
6189
|
-
ref:
|
|
6190
|
-
accept:
|
|
6191
|
-
isThumbnailView:
|
|
6211
|
+
ref: H,
|
|
6212
|
+
accept: ve ? hi : be,
|
|
6213
|
+
isThumbnailView: ve,
|
|
6192
6214
|
disabled: A,
|
|
6193
6215
|
required: ae && i === "form",
|
|
6194
6216
|
"aria-required": ae ? "true" : void 0,
|
|
6195
|
-
"aria-invalid":
|
|
6196
|
-
"aria-describedby":
|
|
6217
|
+
"aria-invalid": pe ? "true" : void 0,
|
|
6218
|
+
"aria-describedby": fe,
|
|
6197
6219
|
hasVisibleLabel: !!j,
|
|
6198
6220
|
strings: L
|
|
6199
6221
|
}),
|
|
6200
|
-
|
|
6222
|
+
J && de && /* @__PURE__ */ _($, {
|
|
6201
6223
|
skin: "error",
|
|
6202
6224
|
"aria-live": "assertive",
|
|
6203
6225
|
role: "alert",
|
|
6204
6226
|
compact: !0,
|
|
6205
|
-
id:
|
|
6227
|
+
id: Y,
|
|
6206
6228
|
className: "pkt-fileupload__error-alert",
|
|
6207
|
-
children:
|
|
6229
|
+
children: de
|
|
6208
6230
|
}),
|
|
6209
6231
|
Q.length > 0 && /* @__PURE__ */ _(ba, {
|
|
6210
6232
|
files: Q,
|
|
6211
|
-
cancelTransfer:
|
|
6233
|
+
cancelTransfer: Te,
|
|
6212
6234
|
truncateTail: d,
|
|
6213
6235
|
transfers: ue,
|
|
6214
6236
|
uploadStrategy: i,
|
|
6215
|
-
ItemRenderer:
|
|
6216
|
-
enableImagePreview:
|
|
6237
|
+
ItemRenderer: _e,
|
|
6238
|
+
enableImagePreview: ve && oe,
|
|
6217
6239
|
disabled: A,
|
|
6218
6240
|
inputName: R.name || "",
|
|
6219
|
-
buildAttributeAccessors:
|
|
6220
|
-
queueItemOperations:
|
|
6241
|
+
buildAttributeAccessors: Ee,
|
|
6242
|
+
queueItemOperations: De
|
|
6221
6243
|
})
|
|
6222
6244
|
]
|
|
6223
6245
|
})
|
|
@@ -6226,13 +6248,13 @@ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
|
|
|
6226
6248
|
className: "pkt-fileupload-component",
|
|
6227
6249
|
children: /* @__PURE__ */ _(nr, {
|
|
6228
6250
|
strings: L,
|
|
6229
|
-
forId:
|
|
6251
|
+
forId: V,
|
|
6230
6252
|
label: j,
|
|
6231
6253
|
helptext: N,
|
|
6232
6254
|
helptextDropdown: P,
|
|
6233
6255
|
helptextDropdownButton: ee,
|
|
6234
6256
|
disabled: A,
|
|
6235
|
-
hasError:
|
|
6257
|
+
hasError: J,
|
|
6236
6258
|
optionalTag: te,
|
|
6237
6259
|
optionalText: ne,
|
|
6238
6260
|
requiredTag: F,
|
|
@@ -7100,7 +7122,7 @@ var ho = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1
|
|
|
7100
7122
|
e.key === "Enter" && (e.preventDefault(), m(l));
|
|
7101
7123
|
}),
|
|
7102
7124
|
...b
|
|
7103
|
-
}), /* @__PURE__ */ _(
|
|
7125
|
+
}), /* @__PURE__ */ _(Z, {
|
|
7104
7126
|
className: `pkt-searchinput__button ${e === "local" ? "pkt-input-icon" : ""}`,
|
|
7105
7127
|
variant: "icon-only",
|
|
7106
7128
|
iconName: "magnifying-glass-big",
|
|
@@ -7148,7 +7170,7 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7148
7170
|
}, [N]), c(() => {
|
|
7149
7171
|
R.current = P;
|
|
7150
7172
|
}, [P]);
|
|
7151
|
-
let { setRef: ce, isMobile: z, isTablet: B, isFixed:
|
|
7173
|
+
let { setRef: ce, isMobile: z, isTablet: B, isFixed: le, isSticky: V, hidden: H, captureFocus: ue, flagRestoreFocus: U, restoreFocus: W } = Qa({
|
|
7152
7174
|
forwardedRef: te,
|
|
7153
7175
|
mobileBreakpoint: A,
|
|
7154
7176
|
tabletBreakpoint: j,
|
|
@@ -7157,12 +7179,12 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7157
7179
|
pauseScrollHide: F !== "none"
|
|
7158
7180
|
});
|
|
7159
7181
|
$a(F === "menu" || F === "search");
|
|
7160
|
-
let
|
|
7161
|
-
|
|
7182
|
+
let G = p(null), K = o((e) => {
|
|
7183
|
+
G.current = e, ce(e);
|
|
7162
7184
|
}, [ce]);
|
|
7163
7185
|
d(() => {
|
|
7164
7186
|
if (F !== "menu" && F !== "search") return;
|
|
7165
|
-
let e = document.getElementById(F === "menu" ? _o : yo), t =
|
|
7187
|
+
let e = document.getElementById(F === "menu" ? _o : yo), t = G.current?.getBoundingClientRect();
|
|
7166
7188
|
!e || !t || (e.style.setProperty("--pkt-header-global-top", `${t.top}px`), e.style.setProperty("--pkt-header-global-left", `${t.left}px`), e.style.setProperty("--pkt-header-global-width", `${t.width}px`));
|
|
7167
7189
|
}, [
|
|
7168
7190
|
F,
|
|
@@ -7179,7 +7201,7 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7179
7201
|
e.name !== "AbortError" && (se(!0), R.current?.(e));
|
|
7180
7202
|
}), () => e.abort();
|
|
7181
7203
|
}, [r, n]);
|
|
7182
|
-
let
|
|
7204
|
+
let q = r ?? ie, de = f(() => ka(q, i), [q, i]);
|
|
7183
7205
|
c(() => {
|
|
7184
7206
|
let e = (e) => {
|
|
7185
7207
|
let t = e.target;
|
|
@@ -7190,10 +7212,10 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7190
7212
|
if (F !== "none") return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
|
|
7191
7213
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
7192
7214
|
};
|
|
7193
|
-
|
|
7215
|
+
W();
|
|
7194
7216
|
}, [
|
|
7195
7217
|
F,
|
|
7196
|
-
|
|
7218
|
+
W,
|
|
7197
7219
|
U
|
|
7198
7220
|
]), c(() => {
|
|
7199
7221
|
if (F !== "menu" && F !== "search") return;
|
|
@@ -7223,18 +7245,18 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7223
7245
|
document.removeEventListener("keydown", a), document.removeEventListener("focusin", o);
|
|
7224
7246
|
};
|
|
7225
7247
|
}, [F]);
|
|
7226
|
-
let
|
|
7248
|
+
let J = f(() => {
|
|
7227
7249
|
if (x?.lastLoggedIn) return typeof x.lastLoggedIn == "string" ? x.lastLoggedIn : new Date(x.lastLoggedIn).toLocaleString("nb-NO", {
|
|
7228
7250
|
year: "numeric",
|
|
7229
7251
|
month: "long",
|
|
7230
7252
|
day: "numeric"
|
|
7231
7253
|
});
|
|
7232
|
-
}, [x?.lastLoggedIn]),
|
|
7254
|
+
}, [x?.lastLoggedIn]), Y = o((e) => {
|
|
7233
7255
|
re((t) => t === e ? "none" : (ue(), e));
|
|
7234
|
-
}, [ue]),
|
|
7235
|
-
className: (0, M.default)("pkt-header-global", z && "pkt-header-global--mobile", B && "pkt-header-global--tablet",
|
|
7256
|
+
}, [ue]), fe = E === "userMenu" || E === "both", pe = ge(["header"], ee).header, me = de?.search, X = de?.header?.contact, he = de?.i18n?.menu || pe.menu, Q = de?.i18n?.search || pe.search, $ = F === "menu", _e = F === "user", ve = F === "search", ye = z, be = !!(u && me), xe = me?.input.id || "pkt-header-global-search", Se = !de && !oe, Ce = /* @__PURE__ */ v("header", {
|
|
7257
|
+
className: (0, M.default)("pkt-header-global", z && "pkt-header-global--mobile", B && "pkt-header-global--tablet", le && "pkt-header-global--fixed", V && "pkt-header-global--sticky", ne && "pkt-header-global--scroll-to-hide", H && "pkt-header-global--hidden", e),
|
|
7236
7258
|
"data-mode": t,
|
|
7237
|
-
ref:
|
|
7259
|
+
ref: K,
|
|
7238
7260
|
children: [
|
|
7239
7261
|
/* @__PURE__ */ _("div", {
|
|
7240
7262
|
className: "pkt-header-global__logo-area",
|
|
@@ -7255,56 +7277,56 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7255
7277
|
/* @__PURE__ */ v("div", {
|
|
7256
7278
|
className: "pkt-header-global__content",
|
|
7257
7279
|
children: [
|
|
7258
|
-
!
|
|
7280
|
+
!ye && be && me && /* @__PURE__ */ _("div", {
|
|
7259
7281
|
className: "pkt-header-global__search",
|
|
7260
7282
|
children: /* @__PURE__ */ _(ho, {
|
|
7261
7283
|
appearance: "global",
|
|
7262
7284
|
inputSize: B ? "small" : "medium",
|
|
7263
7285
|
fullwidth: !0,
|
|
7264
|
-
id:
|
|
7265
|
-
name:
|
|
7286
|
+
id: xe,
|
|
7287
|
+
name: me.input.name,
|
|
7266
7288
|
"aria-label": Q,
|
|
7267
|
-
placeholder: h ??
|
|
7268
|
-
action:
|
|
7289
|
+
placeholder: h ?? me.input.placeholder,
|
|
7290
|
+
action: me.endpoint,
|
|
7269
7291
|
method: "get",
|
|
7270
7292
|
onSearch: y,
|
|
7271
7293
|
onChange: () => {}
|
|
7272
7294
|
})
|
|
7273
7295
|
}),
|
|
7274
|
-
|
|
7296
|
+
ye && be && /* @__PURE__ */ _(Z, {
|
|
7275
7297
|
id: bo,
|
|
7276
7298
|
className: "pkt-header-global__search-toggle",
|
|
7277
7299
|
skin: "primary",
|
|
7278
|
-
color:
|
|
7300
|
+
color: ve ? void 0 : "yellow",
|
|
7279
7301
|
variant: "icon-only",
|
|
7280
|
-
iconName:
|
|
7302
|
+
iconName: ve ? "close" : "magnifying-glass-big",
|
|
7281
7303
|
size: z ? "small" : "medium",
|
|
7282
|
-
state:
|
|
7283
|
-
"aria-expanded":
|
|
7304
|
+
state: ve ? "active" : "normal",
|
|
7305
|
+
"aria-expanded": ve,
|
|
7284
7306
|
"aria-controls": yo,
|
|
7285
|
-
onClick: () =>
|
|
7307
|
+
onClick: () => Y("search"),
|
|
7286
7308
|
children: Q
|
|
7287
7309
|
}),
|
|
7288
|
-
/* @__PURE__ */ _(
|
|
7310
|
+
/* @__PURE__ */ _(Z, {
|
|
7289
7311
|
id: vo,
|
|
7290
7312
|
className: "pkt-header-global__menu-toggle",
|
|
7291
|
-
skin:
|
|
7292
|
-
variant:
|
|
7293
|
-
iconName:
|
|
7313
|
+
skin: ye ? "tertiary" : "secondary",
|
|
7314
|
+
variant: ye ? "icon-only" : "icon-right",
|
|
7315
|
+
iconName: $ ? "close" : "menu",
|
|
7294
7316
|
size: B ? "small" : "medium",
|
|
7295
|
-
state:
|
|
7296
|
-
"aria-expanded":
|
|
7317
|
+
state: $ ? "active" : "normal",
|
|
7318
|
+
"aria-expanded": $,
|
|
7297
7319
|
"aria-controls": _o,
|
|
7298
|
-
disabled:
|
|
7299
|
-
onClick: () =>
|
|
7300
|
-
children:
|
|
7320
|
+
disabled: Se,
|
|
7321
|
+
onClick: () => Y("menu"),
|
|
7322
|
+
children: he
|
|
7301
7323
|
}),
|
|
7302
|
-
!
|
|
7324
|
+
!ye && b && X && !x && /* @__PURE__ */ _("a", {
|
|
7303
7325
|
className: (0, M.default)("pkt-header-global__contact", "pkt-btn", "pkt-btn--secondary", "pkt-btn--label-only", B ? "pkt-btn--small" : "pkt-btn--medium"),
|
|
7304
|
-
href:
|
|
7326
|
+
href: X.url,
|
|
7305
7327
|
children: /* @__PURE__ */ _("span", {
|
|
7306
7328
|
className: "pkt-btn__text",
|
|
7307
|
-
children:
|
|
7329
|
+
children: X.text
|
|
7308
7330
|
})
|
|
7309
7331
|
})
|
|
7310
7332
|
]
|
|
@@ -7312,16 +7334,16 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7312
7334
|
x && /* @__PURE__ */ _("div", {
|
|
7313
7335
|
className: "pkt-header-global__user",
|
|
7314
7336
|
children: /* @__PURE__ */ v("div", {
|
|
7315
|
-
className: (0, M.default)("pkt-header-global__user-container",
|
|
7316
|
-
children: [/* @__PURE__ */ v(
|
|
7337
|
+
className: (0, M.default)("pkt-header-global__user-container", _e && "is-open"),
|
|
7338
|
+
children: [/* @__PURE__ */ v(Z, {
|
|
7317
7339
|
className: "pkt-header-global__user-button",
|
|
7318
7340
|
skin: "secondary",
|
|
7319
7341
|
size: B ? "small" : "medium",
|
|
7320
|
-
state:
|
|
7342
|
+
state: _e ? "active" : "normal",
|
|
7321
7343
|
variant: "icons-right-and-left",
|
|
7322
7344
|
iconName: "user",
|
|
7323
|
-
secondIconName:
|
|
7324
|
-
onClick: () =>
|
|
7345
|
+
secondIconName: _e ? "chevron-thin-up" : "chevron-thin-down",
|
|
7346
|
+
onClick: () => Y("user"),
|
|
7325
7347
|
children: [/* @__PURE__ */ _("span", {
|
|
7326
7348
|
className: "pkt-sr-only",
|
|
7327
7349
|
children: "Brukermeny: "
|
|
@@ -7329,26 +7351,26 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7329
7351
|
translate: "no",
|
|
7330
7352
|
children: C?.name || x.name
|
|
7331
7353
|
})]
|
|
7332
|
-
}),
|
|
7354
|
+
}), _e && /* @__PURE__ */ _("div", {
|
|
7333
7355
|
className: "pkt-header-global__user-menu is-open",
|
|
7334
7356
|
children: /* @__PURE__ */ _(mo, {
|
|
7335
7357
|
user: x,
|
|
7336
|
-
formattedLastLoggedIn:
|
|
7358
|
+
formattedLastLoggedIn: J,
|
|
7337
7359
|
representing: C,
|
|
7338
7360
|
userMenu: S,
|
|
7339
7361
|
canChangeRepresentation: w,
|
|
7340
7362
|
changeRepresentation: T,
|
|
7341
|
-
logoutOnClick:
|
|
7363
|
+
logoutOnClick: fe ? D : void 0
|
|
7342
7364
|
})
|
|
7343
7365
|
})]
|
|
7344
7366
|
})
|
|
7345
7367
|
})
|
|
7346
7368
|
]
|
|
7347
|
-
}),
|
|
7369
|
+
}), we = $ && /* @__PURE__ */ _("div", {
|
|
7348
7370
|
className: (0, M.default)("pkt-header-global__menu", z && "pkt-header-global__menu--mobile", B && !z && "pkt-header-global__menu--tablet"),
|
|
7349
7371
|
id: _o,
|
|
7350
|
-
children:
|
|
7351
|
-
data:
|
|
7372
|
+
children: de ? /* @__PURE__ */ _(eo, {
|
|
7373
|
+
data: q,
|
|
7352
7374
|
locale: i,
|
|
7353
7375
|
open: !0,
|
|
7354
7376
|
mobileBreakpoint: A
|
|
@@ -7359,7 +7381,7 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7359
7381
|
children: "Kunne ikke laste meny."
|
|
7360
7382
|
})
|
|
7361
7383
|
})
|
|
7362
|
-
}),
|
|
7384
|
+
}), Te = ve && be && me && /* @__PURE__ */ _("div", {
|
|
7363
7385
|
className: (0, M.default)("pkt-header-global__search-panel", z && "pkt-header-global__search-panel--mobile", B && !z && "pkt-header-global__search-panel--tablet"),
|
|
7364
7386
|
id: yo,
|
|
7365
7387
|
children: /* @__PURE__ */ _("div", {
|
|
@@ -7367,11 +7389,11 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7367
7389
|
children: /* @__PURE__ */ _(ho, {
|
|
7368
7390
|
appearance: "global",
|
|
7369
7391
|
fullwidth: !0,
|
|
7370
|
-
id:
|
|
7371
|
-
name:
|
|
7392
|
+
id: xe,
|
|
7393
|
+
name: me.input.name,
|
|
7372
7394
|
"aria-label": Q,
|
|
7373
|
-
placeholder: h ??
|
|
7374
|
-
action:
|
|
7395
|
+
placeholder: h ?? me.input.placeholder,
|
|
7396
|
+
action: me.endpoint,
|
|
7375
7397
|
method: "get",
|
|
7376
7398
|
onSearch: y,
|
|
7377
7399
|
onChange: () => {},
|
|
@@ -7379,37 +7401,37 @@ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "p
|
|
|
7379
7401
|
})
|
|
7380
7402
|
})
|
|
7381
7403
|
});
|
|
7382
|
-
return
|
|
7404
|
+
return le ? /* @__PURE__ */ v("div", {
|
|
7383
7405
|
className: "pkt-header-global-wrapper",
|
|
7384
7406
|
children: [
|
|
7385
|
-
|
|
7407
|
+
Ce,
|
|
7386
7408
|
/* @__PURE__ */ _("div", { className: (0, M.default)("pkt-header-global-spacer", z && "pkt-header-global-spacer--mobile", B && !z && "pkt-header-global-spacer--tablet", x && "pkt-header-global-spacer--has-user") }),
|
|
7387
|
-
|
|
7388
|
-
|
|
7409
|
+
Te,
|
|
7410
|
+
we
|
|
7389
7411
|
]
|
|
7390
7412
|
}) : /* @__PURE__ */ v(g, { children: [
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7413
|
+
Ce,
|
|
7414
|
+
Te,
|
|
7415
|
+
we
|
|
7394
7416
|
] });
|
|
7395
7417
|
});
|
|
7396
7418
|
xo.displayName = "PktHeaderGlobal";
|
|
7397
7419
|
//#endregion
|
|
7398
7420
|
//#region src/components/textinput/Textinput.tsx
|
|
7399
|
-
var So = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "off", counter: i, hasFieldset: a, counterMaxLength: o, className: s, disabled: l = !1, errorMessage: u, hasError: d = !1, helptext: f, helptextDropdown: p, helptextDropdownButton: h, iconNameRight: g, inline: y = !1, fullwidth: b = !1, label: x, name: S, optionalTag: C = !1, optionalText: w, requiredTag: T = !1, requiredText: E, tagText: D = null, placeholder: O, prefix: k, suffix: A, type: j = "text", useWrapper: M = !0, omitSearchIcon: N = !1, value: P, minLength: ee, maxLength: te, min: ne, max: F, step: re, size: ie, readonly: ae, required: oe, dataTestid: se, onChange: I, skipForwardTestid: R = !1, inputSize: ce = "medium", strings: z, ...B },
|
|
7400
|
-
let
|
|
7401
|
-
|
|
7421
|
+
var So = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "off", counter: i, hasFieldset: a, counterMaxLength: o, className: s, disabled: l = !1, errorMessage: u, hasError: d = !1, helptext: f, helptextDropdown: p, helptextDropdownButton: h, iconNameRight: g, inline: y = !1, fullwidth: b = !1, label: x, name: S, optionalTag: C = !1, optionalText: w, requiredTag: T = !1, requiredText: E, tagText: D = null, placeholder: O, prefix: k, suffix: A, type: j = "text", useWrapper: M = !0, omitSearchIcon: N = !1, value: P, minLength: ee, maxLength: te, min: ne, max: F, step: re, size: ie, readonly: ae, required: oe, dataTestid: se, onChange: I, skipForwardTestid: R = !1, inputSize: ce = "medium", strings: z, ...B }, le) => {
|
|
7422
|
+
let V = i ?? (o ?? 0) > 0, H = [s, "pkt-textinput"].filter(Boolean).join(" "), ue = j === "search" && !g && !N, U = j === "date" && P ? P.slice(0, 10) : P, [W, G] = m(P?.length || 0), K = Ci(e), q = `${K}`, de = `${q}-label`, J = n || de, Y = (e) => {
|
|
7423
|
+
V && G(e.currentTarget?.value?.length || 0), I && I(e);
|
|
7402
7424
|
};
|
|
7403
7425
|
return c(() => {
|
|
7404
|
-
P !== void 0 &&
|
|
7426
|
+
P !== void 0 && G(P?.length || 0);
|
|
7405
7427
|
}, [P]), /* @__PURE__ */ _("div", {
|
|
7406
|
-
className:
|
|
7428
|
+
className: H,
|
|
7407
7429
|
children: /* @__PURE__ */ _(nr, {
|
|
7408
7430
|
strings: z,
|
|
7409
7431
|
ariaDescribedby: t,
|
|
7410
7432
|
disabled: l,
|
|
7411
7433
|
errorMessage: u,
|
|
7412
|
-
forId:
|
|
7434
|
+
forId: q,
|
|
7413
7435
|
hasError: d,
|
|
7414
7436
|
helptext: f,
|
|
7415
7437
|
helptextDropdown: p,
|
|
@@ -7422,8 +7444,8 @@ var So = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "o
|
|
|
7422
7444
|
requiredText: E,
|
|
7423
7445
|
tagText: D,
|
|
7424
7446
|
useWrapper: M,
|
|
7425
|
-
counter:
|
|
7426
|
-
counterCurrent:
|
|
7447
|
+
counter: V,
|
|
7448
|
+
counterCurrent: W,
|
|
7427
7449
|
counterMaxLength: o,
|
|
7428
7450
|
hasFieldset: a ?? !1,
|
|
7429
7451
|
size: ce,
|
|
@@ -7438,27 +7460,27 @@ var So = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "o
|
|
|
7438
7460
|
}),
|
|
7439
7461
|
/* @__PURE__ */ _("input", {
|
|
7440
7462
|
...B,
|
|
7441
|
-
ref:
|
|
7442
|
-
className: `pkt-input pkt-input--${ce} ${b ? "pkt-input--fullwidth" : ""} ${o &&
|
|
7463
|
+
ref: le,
|
|
7464
|
+
className: `pkt-input pkt-input--${ce} ${b ? "pkt-input--fullwidth" : ""} ${o && W > o ? "pkt-input--counter-error" : ""}`,
|
|
7443
7465
|
type: j,
|
|
7444
|
-
name: `${S ||
|
|
7466
|
+
name: `${S || K}`,
|
|
7445
7467
|
value: U,
|
|
7446
|
-
id:
|
|
7468
|
+
id: q,
|
|
7447
7469
|
placeholder: O,
|
|
7448
7470
|
autoComplete: r,
|
|
7449
7471
|
disabled: l,
|
|
7450
7472
|
"aria-invalid": d,
|
|
7451
|
-
"aria-errormessage": d ? `${
|
|
7473
|
+
"aria-errormessage": d ? `${K}-error` : void 0,
|
|
7452
7474
|
"aria-describedby": Jn({
|
|
7453
|
-
id:
|
|
7475
|
+
id: q,
|
|
7454
7476
|
hasHelptext: !!f,
|
|
7455
|
-
hasCounter:
|
|
7477
|
+
hasCounter: V,
|
|
7456
7478
|
ariaDescribedby: t
|
|
7457
7479
|
}),
|
|
7458
|
-
"aria-labelledby":
|
|
7480
|
+
"aria-labelledby": J,
|
|
7459
7481
|
min: ne,
|
|
7460
7482
|
max: F,
|
|
7461
|
-
onChange:
|
|
7483
|
+
onChange: Y,
|
|
7462
7484
|
step: re,
|
|
7463
7485
|
minLength: ee,
|
|
7464
7486
|
maxLength: te,
|
|
@@ -7519,25 +7541,25 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7519
7541
|
c(() => {
|
|
7520
7542
|
u !== void 0 && B(u);
|
|
7521
7543
|
}, [u]);
|
|
7522
|
-
let [
|
|
7544
|
+
let [le, V] = m(!1), [H, ue] = m(!1), U = p(null), W = p(null), G = p(null), K = p(null), q = p(null), { setRef: de, isMobile: J, isTablet: Y, isFixed: fe, isSticky: pe, hidden: me, captureFocus: X, flagRestoreFocus: he, restoreFocus: Q } = Qa({
|
|
7523
7545
|
forwardedRef: oe,
|
|
7524
7546
|
mobileBreakpoint: e,
|
|
7525
7547
|
tabletBreakpoint: t,
|
|
7526
7548
|
position: ne,
|
|
7527
7549
|
scrollBehavior: F
|
|
7528
7550
|
});
|
|
7529
|
-
$a((
|
|
7530
|
-
let
|
|
7551
|
+
$a((fe || pe) && J && z !== "none");
|
|
7552
|
+
let $ = o((e, t) => {
|
|
7531
7553
|
let n = e.relatedTarget, r;
|
|
7532
7554
|
switch (t) {
|
|
7533
7555
|
case "user":
|
|
7534
7556
|
r = U;
|
|
7535
7557
|
break;
|
|
7536
7558
|
case "slot":
|
|
7537
|
-
r =
|
|
7559
|
+
r = W;
|
|
7538
7560
|
break;
|
|
7539
7561
|
case "search":
|
|
7540
|
-
r =
|
|
7562
|
+
r = G;
|
|
7541
7563
|
break;
|
|
7542
7564
|
default: return;
|
|
7543
7565
|
}
|
|
@@ -7548,7 +7570,7 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7548
7570
|
let e = (e) => {
|
|
7549
7571
|
E && z === "user" && !e.target.closest(".pkt-header-service__user-container") && B("none"), z === "slot" && !e.target.closest(".pkt-header-service__slot-container") && B("none"), z === "search" && !e.target.closest(".pkt-header-service__search-container") && !e.target.closest(".pkt-header-service__search-input") && B("none");
|
|
7550
7572
|
}, t = (e) => {
|
|
7551
|
-
e.key === "Escape" && z !== "none" && (e.preventDefault(),
|
|
7573
|
+
e.key === "Escape" && z !== "none" && (e.preventDefault(), he(), B("none"));
|
|
7552
7574
|
};
|
|
7553
7575
|
if (z !== "none") return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
|
|
7554
7576
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
@@ -7558,29 +7580,29 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7558
7580
|
z,
|
|
7559
7581
|
E,
|
|
7560
7582
|
Q,
|
|
7561
|
-
|
|
7583
|
+
he
|
|
7562
7584
|
]);
|
|
7563
|
-
let
|
|
7564
|
-
let t = e === "slot" ?
|
|
7565
|
-
if (!t.current || !n.current || !
|
|
7585
|
+
let _e = o((e) => {
|
|
7586
|
+
let t = e === "slot" ? W : G, n = e === "slot" ? K : q;
|
|
7587
|
+
if (!t.current || !n.current || !Y || J) return;
|
|
7566
7588
|
let r = t.current.getBoundingClientRect(), i = n.current.offsetWidth, a = r.left + i > window.innerWidth;
|
|
7567
|
-
e === "slot" ?
|
|
7568
|
-
}, [
|
|
7569
|
-
if (!
|
|
7589
|
+
e === "slot" ? V(a) : ue(a);
|
|
7590
|
+
}, [Y, J]), ve = o((e) => {
|
|
7591
|
+
if (!Y || z !== "slot") return;
|
|
7570
7592
|
let t = e.target.closest("a[href], button, [role=\"link\"], [role=\"button\"], [role=\"menuitem\"], [role=\"menuitemradio\"], [role=\"menuitemcheckbox\"]");
|
|
7571
|
-
!t || !
|
|
7572
|
-
}, [
|
|
7573
|
-
z === "none" ? (
|
|
7574
|
-
}, [z,
|
|
7593
|
+
!t || !K.current?.contains(t) || t.closest("[data-pkt-header-keep-open]") || t.disabled || t.getAttribute("aria-disabled") === "true" || B("none");
|
|
7594
|
+
}, [Y, z]), ye = o((e) => {
|
|
7595
|
+
z === "none" ? (X(), B(e)) : B("none");
|
|
7596
|
+
}, [z, X]);
|
|
7575
7597
|
c(() => {
|
|
7576
7598
|
(z === "slot" || z === "search") && requestAnimationFrame(() => {
|
|
7577
|
-
|
|
7599
|
+
_e(z);
|
|
7578
7600
|
});
|
|
7579
|
-
}, [z,
|
|
7580
|
-
let
|
|
7581
|
-
className: (0, M.default)("pkt-header-service", i && "pkt-header-service--compact",
|
|
7601
|
+
}, [z, _e]);
|
|
7602
|
+
let be = /* @__PURE__ */ v("header", {
|
|
7603
|
+
className: (0, M.default)("pkt-header-service", i && "pkt-header-service--compact", J && "pkt-header-service--mobile", Y && "pkt-header-service--tablet", fe && "pkt-header-service--fixed", pe && "pkt-header-service--sticky", se && "pkt-header-service--scroll-to-hide", me && "pkt-header-service--hidden", r),
|
|
7582
7604
|
"data-mode": a,
|
|
7583
|
-
ref:
|
|
7605
|
+
ref: de,
|
|
7584
7606
|
children: [
|
|
7585
7607
|
/* @__PURE__ */ v("div", {
|
|
7586
7608
|
className: (0, M.default)("pkt-header-service__logo-area", (!T || T === "") && "pkt-header-service__logo-area--without-service"),
|
|
@@ -7613,55 +7635,55 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7613
7635
|
})
|
|
7614
7636
|
})]
|
|
7615
7637
|
}),
|
|
7616
|
-
n || d ||
|
|
7638
|
+
n || d || Y && l && (s === "header" || s === "both") ? /* @__PURE__ */ v("div", {
|
|
7617
7639
|
className: "pkt-header-service__content",
|
|
7618
7640
|
children: [
|
|
7619
7641
|
/* @__PURE__ */ v("div", {
|
|
7620
7642
|
className: (0, M.default)("pkt-header-service__slot-container", z === "slot" && "is-open"),
|
|
7621
|
-
onBlur: (e) =>
|
|
7622
|
-
ref:
|
|
7623
|
-
children: [
|
|
7643
|
+
onBlur: (e) => $(e, "slot"),
|
|
7644
|
+
ref: W,
|
|
7645
|
+
children: [Y && n && /* @__PURE__ */ _(Z, {
|
|
7624
7646
|
skin: "secondary",
|
|
7625
7647
|
variant: re,
|
|
7626
7648
|
iconName: "menu",
|
|
7627
|
-
size:
|
|
7649
|
+
size: J ? "small" : "medium",
|
|
7628
7650
|
state: z === "slot" ? "active" : "normal",
|
|
7629
|
-
onClick: () =>
|
|
7651
|
+
onClick: () => ye("slot"),
|
|
7630
7652
|
"aria-expanded": z === "slot",
|
|
7631
7653
|
"aria-controls": "mobile-slot-menu",
|
|
7632
7654
|
"aria-label": I.openMenu,
|
|
7633
7655
|
children: ie
|
|
7634
7656
|
}), /* @__PURE__ */ _("div", {
|
|
7635
|
-
className: (0, M.default)("pkt-header-service__slot-content",
|
|
7657
|
+
className: (0, M.default)("pkt-header-service__slot-content", le && "align-right"),
|
|
7636
7658
|
id: "mobile-slot-menu",
|
|
7637
|
-
role:
|
|
7638
|
-
"aria-label":
|
|
7639
|
-
ref:
|
|
7640
|
-
onClick:
|
|
7659
|
+
role: Y ? "group" : void 0,
|
|
7660
|
+
"aria-label": Y ? "Meny" : void 0,
|
|
7661
|
+
ref: K,
|
|
7662
|
+
onClick: ve,
|
|
7641
7663
|
children: /* @__PURE__ */ _("div", {
|
|
7642
7664
|
className: "pkt-contents",
|
|
7643
7665
|
children: n
|
|
7644
7666
|
})
|
|
7645
7667
|
})]
|
|
7646
7668
|
}),
|
|
7647
|
-
d && /* @__PURE__ */ _(g, { children:
|
|
7669
|
+
d && /* @__PURE__ */ _(g, { children: Y ? /* @__PURE__ */ v("div", {
|
|
7648
7670
|
className: (0, M.default)("pkt-header-service__search-container", z === "search" && "is-open"),
|
|
7649
|
-
onBlur: (e) =>
|
|
7650
|
-
ref:
|
|
7651
|
-
children: [/* @__PURE__ */ _(
|
|
7671
|
+
onBlur: (e) => $(e, "search"),
|
|
7672
|
+
ref: G,
|
|
7673
|
+
children: [/* @__PURE__ */ _(Z, {
|
|
7652
7674
|
skin: "secondary",
|
|
7653
7675
|
variant: "icon-only",
|
|
7654
7676
|
iconName: "magnifying-glass-big",
|
|
7655
|
-
size:
|
|
7656
|
-
onClick: () =>
|
|
7677
|
+
size: J ? "small" : "medium",
|
|
7678
|
+
onClick: () => ye("search"),
|
|
7657
7679
|
state: z === "search" ? "active" : "normal",
|
|
7658
7680
|
"aria-expanded": z === "search",
|
|
7659
7681
|
"aria-controls": "mobile-search-menu",
|
|
7660
7682
|
"aria-label": I.openSearch,
|
|
7661
7683
|
children: "Søk"
|
|
7662
7684
|
}), /* @__PURE__ */ _("div", {
|
|
7663
|
-
className: (0, M.default)("pkt-header-service__mobile-menu", z === "search" && "is-open",
|
|
7664
|
-
ref:
|
|
7685
|
+
className: (0, M.default)("pkt-header-service__mobile-menu", z === "search" && "is-open", H && "align-right"),
|
|
7686
|
+
ref: q,
|
|
7665
7687
|
children: z === "search" && /* @__PURE__ */ _(So, {
|
|
7666
7688
|
id: "mobile-search-menu",
|
|
7667
7689
|
className: "pkt-header-service__search-input",
|
|
@@ -7691,9 +7713,9 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7691
7713
|
e.key === "Enter" && h?.(e.target.value);
|
|
7692
7714
|
}
|
|
7693
7715
|
}) }),
|
|
7694
|
-
|
|
7716
|
+
J && l && (s === "header" || s === "both") && /* @__PURE__ */ _(Z, {
|
|
7695
7717
|
skin: "secondary",
|
|
7696
|
-
size:
|
|
7718
|
+
size: J ? "small" : "medium",
|
|
7697
7719
|
variant: "icon-only",
|
|
7698
7720
|
iconName: "exit",
|
|
7699
7721
|
onClick: l,
|
|
@@ -7701,21 +7723,21 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7701
7723
|
})
|
|
7702
7724
|
]
|
|
7703
7725
|
}) : null,
|
|
7704
|
-
(E || !
|
|
7726
|
+
(E || !J && l && (s === "header" || s === "both")) && /* @__PURE__ */ v("div", {
|
|
7705
7727
|
className: "pkt-header-service__user",
|
|
7706
7728
|
children: [E && /* @__PURE__ */ v("div", {
|
|
7707
7729
|
className: "pkt-header-service__user-container",
|
|
7708
|
-
onBlur: (e) =>
|
|
7730
|
+
onBlur: (e) => $(e, "user"),
|
|
7709
7731
|
ref: U,
|
|
7710
|
-
children: [/* @__PURE__ */ v(
|
|
7711
|
-
className: (0, M.default)("pkt-header-service__user-button",
|
|
7732
|
+
children: [/* @__PURE__ */ v(Z, {
|
|
7733
|
+
className: (0, M.default)("pkt-header-service__user-button", J && "pkt-header-service__user-button--mobile"),
|
|
7712
7734
|
skin: "secondary",
|
|
7713
|
-
size:
|
|
7735
|
+
size: J ? "small" : "medium",
|
|
7714
7736
|
state: z === "user" ? "active" : "normal",
|
|
7715
7737
|
variant: "icons-right-and-left",
|
|
7716
7738
|
iconName: "user",
|
|
7717
7739
|
secondIconName: z === "user" ? "chevron-thin-up" : "chevron-thin-down",
|
|
7718
|
-
onClick: () =>
|
|
7740
|
+
onClick: () => ye("user"),
|
|
7719
7741
|
children: [/* @__PURE__ */ _("span", {
|
|
7720
7742
|
className: "pkt-sr-only",
|
|
7721
7743
|
children: "Brukermeny: "
|
|
@@ -7724,7 +7746,7 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7724
7746
|
children: S?.name || E.name
|
|
7725
7747
|
})]
|
|
7726
7748
|
}), z === "user" && E && /* @__PURE__ */ _("div", {
|
|
7727
|
-
className: (0, M.default)(
|
|
7749
|
+
className: (0, M.default)(J ? "pkt-header-service__mobile-menu" : "pkt-header-service__user-menu", "is-open"),
|
|
7728
7750
|
children: /* @__PURE__ */ _(mo, {
|
|
7729
7751
|
user: E,
|
|
7730
7752
|
formattedLastLoggedIn: ce,
|
|
@@ -7735,7 +7757,7 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7735
7757
|
logoutOnClick: s === "userMenu" || s === "both" ? l : void 0
|
|
7736
7758
|
})
|
|
7737
7759
|
})]
|
|
7738
|
-
}), !
|
|
7760
|
+
}), !J && l && (s === "header" || s === "both") && /* @__PURE__ */ _(Z, {
|
|
7739
7761
|
skin: "tertiary",
|
|
7740
7762
|
size: "medium",
|
|
7741
7763
|
variant: "icon-right",
|
|
@@ -7746,10 +7768,10 @@ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7746
7768
|
})
|
|
7747
7769
|
]
|
|
7748
7770
|
});
|
|
7749
|
-
return
|
|
7771
|
+
return fe ? /* @__PURE__ */ v("div", {
|
|
7750
7772
|
className: "pkt-header-service-wrapper",
|
|
7751
|
-
children: [
|
|
7752
|
-
}) :
|
|
7773
|
+
children: [be, /* @__PURE__ */ _("div", { className: (0, M.default)("pkt-header-service-spacer", i && "pkt-header-service-spacer--compact", E && "pkt-header-service-spacer--has-user", J && "pkt-header-service-spacer--mobile", Y && "pkt-header-service-spacer--tablet") })]
|
|
7774
|
+
}) : be;
|
|
7753
7775
|
});
|
|
7754
7776
|
wo.displayName = "PktHeaderService";
|
|
7755
7777
|
//#endregion
|
|
@@ -8316,27 +8338,27 @@ function rs(e) {
|
|
|
8316
8338
|
return e === 3600 || e < 3600 && 3600 % e == 0 && e % 60 == 0;
|
|
8317
8339
|
}
|
|
8318
8340
|
function is(e, t) {
|
|
8319
|
-
let { id: n, label: r, value: i, defaultValue: a, min: s, max: l, step: h = 60, hidePicker: g = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, disabled: b = !1, required: x = !1, helptext: S, helptextDropdown: C, helptextDropdownButton: w, hasError: T = !1, errorMessage: E, optionalTag: D = !1, optionalText: O, requiredTag: k = !1, requiredText: A, tagText: j, inline: M = !1, useWrapper: N = !0, ariaDescribedby: P, strings: ee, className: te, inputSize: ne = "medium", onValueChange: F, onFocus: re, onBlur: ie } = e, ae = ge(["timepicker", "validation"], ee), oe = ae.timepicker, se = ee, I = i !== void 0, L = i === void 0 ? a ?? "" : i ?? "", R = p(L), [ce, z] = m(() => L), B = I ? i ?? "" : ce, [
|
|
8320
|
-
U.current = e,
|
|
8321
|
-
}, []),
|
|
8322
|
-
|
|
8323
|
-
}, []), [
|
|
8341
|
+
let { id: n, label: r, value: i, defaultValue: a, min: s, max: l, step: h = 60, hidePicker: g = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, disabled: b = !1, required: x = !1, helptext: S, helptextDropdown: C, helptextDropdownButton: w, hasError: T = !1, errorMessage: E, optionalTag: D = !1, optionalText: O, requiredTag: k = !1, requiredText: A, tagText: j, inline: M = !1, useWrapper: N = !0, ariaDescribedby: P, strings: ee, className: te, inputSize: ne = "medium", onValueChange: F, onFocus: re, onBlur: ie } = e, ae = ge(["timepicker", "validation"], ee), oe = ae.timepicker, se = ee, I = i !== void 0, L = i === void 0 ? a ?? "" : i ?? "", R = p(L), [ce, z] = m(() => L), B = I ? i ?? "" : ce, [le, V] = m(() => es(i === void 0 ? a : i)[0]), [H, ue] = m(() => es(i === void 0 ? a : i)[1]), U = p(le), W = p(H), G = o((e) => {
|
|
8342
|
+
U.current = e, V(e);
|
|
8343
|
+
}, []), K = o((e) => {
|
|
8344
|
+
W.current = e, ue(e);
|
|
8345
|
+
}, []), [q, de] = m(!1), [J, Y] = m(!1), fe = p(i);
|
|
8324
8346
|
c(() => {
|
|
8325
|
-
if (!I || i ===
|
|
8326
|
-
|
|
8347
|
+
if (!I || i === fe.current) return;
|
|
8348
|
+
fe.current = i;
|
|
8327
8349
|
let [e, t] = es(i);
|
|
8328
|
-
|
|
8350
|
+
G(e), K(t);
|
|
8329
8351
|
}, [
|
|
8330
8352
|
i,
|
|
8331
8353
|
I,
|
|
8332
|
-
|
|
8333
|
-
|
|
8354
|
+
G,
|
|
8355
|
+
K
|
|
8334
8356
|
]), c(() => {
|
|
8335
8357
|
h != null && !rs(h) && console.warn(`PktTimepicker: step="${h}" er ikke en gyldig verdi. Step må være et multiplum av 60 (hele minutter) eller nøyaktig 3600 (hel time).`);
|
|
8336
8358
|
}, [h]);
|
|
8337
|
-
let
|
|
8359
|
+
let pe = p(null), me = p(null), X = p(null), Z = p(null), he = p(null), Q = p(null), $ = p(0), _e = p(-1), ve = p(0), ye = p(-1), [be, xe] = m(!1), Se = f(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), Ce = f(() => Jo(h), [h]), we = f(() => Yo(s, l), [s, l]), Te = f(() => Xo(h), [h]), Ee = `${n}-hours`, De = `${n}-minutes`, Oe = `${n}-popup`, ke = `${n}-input`;
|
|
8338
8360
|
c(() => {
|
|
8339
|
-
let e =
|
|
8361
|
+
let e = pe.current;
|
|
8340
8362
|
if (!e) return;
|
|
8341
8363
|
let t = ns(B, {
|
|
8342
8364
|
required: x,
|
|
@@ -8344,39 +8366,39 @@ function is(e, t) {
|
|
|
8344
8366
|
max: l,
|
|
8345
8367
|
step: h
|
|
8346
8368
|
}, ae.validation);
|
|
8347
|
-
e.setCustomValidity(t.valid ? "" : t.message ?? ""),
|
|
8369
|
+
e.setCustomValidity(t.valid ? "" : t.message ?? ""), Y(be && !t.valid);
|
|
8348
8370
|
}, [
|
|
8349
8371
|
B,
|
|
8350
8372
|
x,
|
|
8351
8373
|
s,
|
|
8352
8374
|
l,
|
|
8353
8375
|
h,
|
|
8354
|
-
|
|
8376
|
+
be,
|
|
8355
8377
|
ae.validation
|
|
8356
8378
|
]);
|
|
8357
8379
|
let Ae = o((e) => {
|
|
8358
8380
|
I || z(e);
|
|
8359
8381
|
let t = Q.current;
|
|
8360
|
-
!t || !
|
|
8382
|
+
!t || !Se || (Se.call(t, e), t.dispatchEvent(new Event("input", { bubbles: !0 })), F?.(e));
|
|
8361
8383
|
}, [
|
|
8362
8384
|
I,
|
|
8363
|
-
|
|
8385
|
+
Se,
|
|
8364
8386
|
F
|
|
8365
8387
|
]), je = o(() => {
|
|
8366
|
-
let e = U.current, t =
|
|
8388
|
+
let e = U.current, t = W.current;
|
|
8367
8389
|
if (e !== "" && t !== "") {
|
|
8368
8390
|
let n = ts(e, t);
|
|
8369
8391
|
n !== B && Ae(n);
|
|
8370
8392
|
} else B !== "" && Ae("");
|
|
8371
8393
|
}, [B, Ae]), Me = o(() => {
|
|
8372
|
-
let e = U.current, t =
|
|
8394
|
+
let e = U.current, t = W.current;
|
|
8373
8395
|
if (e !== "" && t !== "") {
|
|
8374
8396
|
let n = ts(e, t);
|
|
8375
8397
|
n === B ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae(n);
|
|
8376
8398
|
} else B === "" ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae("");
|
|
8377
8399
|
}, [B, Ae]), Ne = o(() => {
|
|
8378
|
-
|
|
8379
|
-
let e =
|
|
8400
|
+
xe(!0), je();
|
|
8401
|
+
let e = pe.current, t = Q.current;
|
|
8380
8402
|
if (!e) return;
|
|
8381
8403
|
let n = ns(t?.value ?? "", {
|
|
8382
8404
|
required: x,
|
|
@@ -8394,7 +8416,7 @@ function is(e, t) {
|
|
|
8394
8416
|
ae.validation
|
|
8395
8417
|
]);
|
|
8396
8418
|
c(() => {
|
|
8397
|
-
let e =
|
|
8419
|
+
let e = he.current?.closest("form");
|
|
8398
8420
|
if (!e) return;
|
|
8399
8421
|
let t = (t) => {
|
|
8400
8422
|
let n = t;
|
|
@@ -8409,11 +8431,11 @@ function is(e, t) {
|
|
|
8409
8431
|
Q.current && (Q.current.value = B);
|
|
8410
8432
|
}, [B]);
|
|
8411
8433
|
let Pe = o(() => {
|
|
8412
|
-
|
|
8434
|
+
de(!1), je();
|
|
8413
8435
|
}, [je]);
|
|
8414
8436
|
d(() => {
|
|
8415
|
-
if (!
|
|
8416
|
-
let e =
|
|
8437
|
+
if (!q) return;
|
|
8438
|
+
let e = Z.current;
|
|
8417
8439
|
if (!e) return;
|
|
8418
8440
|
e.querySelectorAll(".pkt-timepicker-popup__col").forEach((e) => {
|
|
8419
8441
|
let t = e.querySelector(".pkt-timepicker-popup__option--selected");
|
|
@@ -8423,16 +8445,16 @@ function is(e, t) {
|
|
|
8423
8445
|
if (!t) return;
|
|
8424
8446
|
let n = t.querySelector(".pkt-timepicker-popup__option--selected"), r = t.querySelector(".pkt-timepicker-popup__option");
|
|
8425
8447
|
(n || r)?.focus();
|
|
8426
|
-
}, [
|
|
8427
|
-
if (!
|
|
8448
|
+
}, [q]), c(() => {
|
|
8449
|
+
if (!q) return;
|
|
8428
8450
|
let e = (e) => {
|
|
8429
8451
|
let t = e.target;
|
|
8430
|
-
|
|
8452
|
+
he.current && !he.current.contains(t) && Pe();
|
|
8431
8453
|
};
|
|
8432
8454
|
return document.addEventListener("click", e, !0), () => document.removeEventListener("click", e, !0);
|
|
8433
|
-
}, [
|
|
8455
|
+
}, [q, Pe]);
|
|
8434
8456
|
let Fe = o((e) => {
|
|
8435
|
-
let t =
|
|
8457
|
+
let t = Z.current;
|
|
8436
8458
|
if (!t) return;
|
|
8437
8459
|
let n = t.querySelectorAll(".pkt-timepicker-popup__col"), r = e === "hour" ? n[0] : n[1];
|
|
8438
8460
|
if (!r) return;
|
|
@@ -8440,34 +8462,34 @@ function is(e, t) {
|
|
|
8440
8462
|
(i || a)?.focus();
|
|
8441
8463
|
}, []), Ie = o((e, t) => {
|
|
8442
8464
|
let n = String(e).padStart(2, "0");
|
|
8443
|
-
if (t === "hour")
|
|
8465
|
+
if (t === "hour") G(n), requestAnimationFrame(() => Fe("minute"));
|
|
8444
8466
|
else {
|
|
8445
|
-
|
|
8467
|
+
K(n), de(!1);
|
|
8446
8468
|
let e = U.current;
|
|
8447
|
-
e !== "" && Ae(`${e}:${n}`), requestAnimationFrame(() =>
|
|
8469
|
+
e !== "" && Ae(`${e}:${n}`), requestAnimationFrame(() => X.current?.focus());
|
|
8448
8470
|
}
|
|
8449
8471
|
}, [
|
|
8450
8472
|
Ae,
|
|
8451
8473
|
Fe,
|
|
8452
|
-
|
|
8453
|
-
|
|
8474
|
+
G,
|
|
8475
|
+
K
|
|
8454
8476
|
]), Le = o((e) => {
|
|
8455
|
-
let t = Zo(U.current,
|
|
8456
|
-
|
|
8477
|
+
let t = Zo(U.current, W.current, e, Ce);
|
|
8478
|
+
G(t.hours), K(t.minutes), `${t.hours}:${t.minutes}` !== B && Ae(`${t.hours}:${t.minutes}`);
|
|
8457
8479
|
}, [
|
|
8458
|
-
|
|
8480
|
+
Ce,
|
|
8459
8481
|
B,
|
|
8460
8482
|
Ae,
|
|
8461
|
-
|
|
8462
|
-
|
|
8483
|
+
G,
|
|
8484
|
+
K
|
|
8463
8485
|
]), Re = o((e) => {
|
|
8464
|
-
|
|
8465
|
-
let t = e.currentTarget, n =
|
|
8486
|
+
pe.current?.setCustomValidity("");
|
|
8487
|
+
let t = e.currentTarget, n = W.current;
|
|
8466
8488
|
switch (e.key) {
|
|
8467
8489
|
case "ArrowUp": {
|
|
8468
8490
|
e.preventDefault();
|
|
8469
8491
|
let t = U.current === "" ? 0 : parseInt(U.current, 10), r = String((t + 1) % 24).padStart(2, "0");
|
|
8470
|
-
if (
|
|
8492
|
+
if (G(r), n !== "") {
|
|
8471
8493
|
let e = `${r}:${n}`;
|
|
8472
8494
|
e === B ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae(e);
|
|
8473
8495
|
}
|
|
@@ -8476,20 +8498,20 @@ function is(e, t) {
|
|
|
8476
8498
|
case "ArrowDown": {
|
|
8477
8499
|
e.preventDefault();
|
|
8478
8500
|
let t = U.current === "" ? 0 : parseInt(U.current, 10), r = String((t - 1 + 24) % 24).padStart(2, "0");
|
|
8479
|
-
if (
|
|
8501
|
+
if (G(r), n !== "") {
|
|
8480
8502
|
let e = `${r}:${n}`;
|
|
8481
8503
|
e === B ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae(e);
|
|
8482
8504
|
}
|
|
8483
8505
|
break;
|
|
8484
8506
|
}
|
|
8485
8507
|
case "ArrowRight":
|
|
8486
|
-
e.preventDefault(),
|
|
8508
|
+
e.preventDefault(), me.current?.focus();
|
|
8487
8509
|
break;
|
|
8488
8510
|
case "Backspace":
|
|
8489
8511
|
case "Delete": {
|
|
8490
|
-
e.preventDefault(),
|
|
8512
|
+
e.preventDefault(), $.current = 0, _e.current = -1;
|
|
8491
8513
|
let t = U.current;
|
|
8492
|
-
t.length > 0 &&
|
|
8514
|
+
t.length > 0 && G(t.slice(0, -1)), Me();
|
|
8493
8515
|
break;
|
|
8494
8516
|
}
|
|
8495
8517
|
case "Tab": break;
|
|
@@ -8502,36 +8524,36 @@ function is(e, t) {
|
|
|
8502
8524
|
default: if (/^\d$/.test(e.key)) {
|
|
8503
8525
|
e.preventDefault();
|
|
8504
8526
|
let t = parseInt(e.key, 10);
|
|
8505
|
-
if (
|
|
8506
|
-
|
|
8527
|
+
if ($.current === 0) {
|
|
8528
|
+
_e.current = t;
|
|
8507
8529
|
let e = String(t).padStart(2, "0");
|
|
8508
|
-
|
|
8530
|
+
G(e), $.current = 1, Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })), t >= 3 && (_e.current = -1, $.current = 0, Me(), me.current?.focus());
|
|
8509
8531
|
} else {
|
|
8510
|
-
let e =
|
|
8511
|
-
|
|
8532
|
+
let e = _e.current * 10 + t, n = e <= 23 ? String(e).padStart(2, "0") : String(t).padStart(2, "0");
|
|
8533
|
+
G(n), _e.current = -1, $.current = 0, Me(), me.current?.focus();
|
|
8512
8534
|
}
|
|
8513
8535
|
} else e.preventDefault();
|
|
8514
8536
|
}
|
|
8515
8537
|
}, [
|
|
8516
8538
|
B,
|
|
8517
8539
|
Ae,
|
|
8518
|
-
|
|
8540
|
+
G,
|
|
8519
8541
|
Me,
|
|
8520
8542
|
Ne
|
|
8521
8543
|
]), ze = o(() => {
|
|
8522
|
-
if (
|
|
8544
|
+
if (xe(!0), U.current !== "") {
|
|
8523
8545
|
let e = String(parseInt(U.current, 10)).padStart(2, "0");
|
|
8524
|
-
|
|
8546
|
+
G(e);
|
|
8525
8547
|
}
|
|
8526
|
-
|
|
8527
|
-
}, [
|
|
8528
|
-
|
|
8548
|
+
$.current = 0, _e.current = -1, je();
|
|
8549
|
+
}, [G, je]), Be = o((e) => {
|
|
8550
|
+
pe.current?.setCustomValidity("");
|
|
8529
8551
|
let t = e.currentTarget, n = U.current;
|
|
8530
8552
|
switch (e.key) {
|
|
8531
8553
|
case "ArrowUp": {
|
|
8532
8554
|
e.preventDefault();
|
|
8533
|
-
let t =
|
|
8534
|
-
if (
|
|
8555
|
+
let t = W.current === "" ? 0 : parseInt(W.current, 10), r = String((t + Ce) % 60).padStart(2, "0");
|
|
8556
|
+
if (K(r), n !== "") {
|
|
8535
8557
|
let e = `${n}:${r}`;
|
|
8536
8558
|
e === B ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae(e);
|
|
8537
8559
|
}
|
|
@@ -8539,21 +8561,21 @@ function is(e, t) {
|
|
|
8539
8561
|
}
|
|
8540
8562
|
case "ArrowDown": {
|
|
8541
8563
|
e.preventDefault();
|
|
8542
|
-
let t =
|
|
8543
|
-
if (
|
|
8564
|
+
let t = W.current === "" ? 0 : parseInt(W.current, 10), r = String((t - Ce + 60) % 60).padStart(2, "0");
|
|
8565
|
+
if (K(r), n !== "") {
|
|
8544
8566
|
let e = `${n}:${r}`;
|
|
8545
8567
|
e === B ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae(e);
|
|
8546
8568
|
}
|
|
8547
8569
|
break;
|
|
8548
8570
|
}
|
|
8549
8571
|
case "ArrowLeft":
|
|
8550
|
-
e.preventDefault(),
|
|
8572
|
+
e.preventDefault(), pe.current?.focus();
|
|
8551
8573
|
break;
|
|
8552
8574
|
case "Backspace":
|
|
8553
8575
|
case "Delete": {
|
|
8554
|
-
e.preventDefault(),
|
|
8555
|
-
let t =
|
|
8556
|
-
t.length > 0 &&
|
|
8576
|
+
e.preventDefault(), ve.current = 0, ye.current = -1;
|
|
8577
|
+
let t = W.current;
|
|
8578
|
+
t.length > 0 && K(t.slice(0, -1)), Me();
|
|
8557
8579
|
break;
|
|
8558
8580
|
}
|
|
8559
8581
|
case "Tab": break;
|
|
@@ -8566,36 +8588,36 @@ function is(e, t) {
|
|
|
8566
8588
|
default: if (/^\d$/.test(e.key)) {
|
|
8567
8589
|
e.preventDefault();
|
|
8568
8590
|
let t = parseInt(e.key, 10);
|
|
8569
|
-
if (
|
|
8570
|
-
|
|
8591
|
+
if (ve.current === 0) {
|
|
8592
|
+
ye.current = t;
|
|
8571
8593
|
let e = String(t).padStart(2, "0");
|
|
8572
|
-
|
|
8594
|
+
K(e), ve.current = 1, Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })), t >= 6 && (ye.current = -1, ve.current = 0, Me());
|
|
8573
8595
|
} else {
|
|
8574
|
-
let e =
|
|
8575
|
-
|
|
8596
|
+
let e = ye.current * 10 + t, n = e <= 59 ? String(e).padStart(2, "0") : String(t).padStart(2, "0");
|
|
8597
|
+
K(n), ye.current = -1, ve.current = 0, Me();
|
|
8576
8598
|
}
|
|
8577
8599
|
} else e.preventDefault();
|
|
8578
8600
|
}
|
|
8579
8601
|
}, [
|
|
8580
|
-
|
|
8602
|
+
Ce,
|
|
8581
8603
|
B,
|
|
8582
8604
|
Ae,
|
|
8583
|
-
|
|
8605
|
+
K,
|
|
8584
8606
|
Me,
|
|
8585
8607
|
Ne
|
|
8586
8608
|
]), Ve = o(() => {
|
|
8587
|
-
if (
|
|
8588
|
-
let e = String(parseInt(
|
|
8589
|
-
|
|
8609
|
+
if (xe(!0), W.current !== "") {
|
|
8610
|
+
let e = String(parseInt(W.current, 10)).padStart(2, "0");
|
|
8611
|
+
K(e);
|
|
8590
8612
|
}
|
|
8591
|
-
|
|
8592
|
-
}, [
|
|
8613
|
+
ve.current = 0, ye.current = -1, je();
|
|
8614
|
+
}, [K, je]), He = o((e) => {
|
|
8593
8615
|
let t = document.activeElement, n = t.closest(".pkt-timepicker-popup__col");
|
|
8594
8616
|
if (!n) return;
|
|
8595
8617
|
let r = Array.from(n.querySelectorAll(".pkt-timepicker-popup__option")), i = r.indexOf(t), a = (e) => {
|
|
8596
8618
|
if (!e) return;
|
|
8597
8619
|
let n = parseInt(e.dataset.value ?? "0", 10), r = String(n).padStart(2, "0");
|
|
8598
|
-
t.dataset.type === "hour" ?
|
|
8620
|
+
t.dataset.type === "hour" ? G(r) : K(r), e.focus();
|
|
8599
8621
|
};
|
|
8600
8622
|
switch (e.key) {
|
|
8601
8623
|
case "ArrowDown":
|
|
@@ -8613,8 +8635,8 @@ function is(e, t) {
|
|
|
8613
8635
|
case "ArrowRight":
|
|
8614
8636
|
if (e.preventDefault(), t.dataset.type === "hour") {
|
|
8615
8637
|
let e = parseInt(t.dataset.value ?? "0", 10);
|
|
8616
|
-
|
|
8617
|
-
|
|
8638
|
+
G(String(e).padStart(2, "0")), requestAnimationFrame(() => {
|
|
8639
|
+
Z.current?.querySelectorAll(".pkt-timepicker-popup__col").forEach((e) => {
|
|
8618
8640
|
e.querySelector(".pkt-timepicker-popup__option--selected")?.scrollIntoView({ block: "center" });
|
|
8619
8641
|
}), Fe("minute");
|
|
8620
8642
|
});
|
|
@@ -8623,8 +8645,8 @@ function is(e, t) {
|
|
|
8623
8645
|
case "ArrowLeft":
|
|
8624
8646
|
if (e.preventDefault(), t.dataset.type === "minute") {
|
|
8625
8647
|
let e = parseInt(t.dataset.value ?? "0", 10);
|
|
8626
|
-
|
|
8627
|
-
|
|
8648
|
+
K(String(e).padStart(2, "0")), requestAnimationFrame(() => {
|
|
8649
|
+
Z.current?.querySelectorAll(".pkt-timepicker-popup__col").forEach((e) => {
|
|
8628
8650
|
e.querySelector(".pkt-timepicker-popup__option--selected")?.scrollIntoView({ block: "center" });
|
|
8629
8651
|
}), Fe("hour");
|
|
8630
8652
|
});
|
|
@@ -8634,33 +8656,33 @@ function is(e, t) {
|
|
|
8634
8656
|
case " ":
|
|
8635
8657
|
e.preventDefault(), t.click();
|
|
8636
8658
|
break;
|
|
8637
|
-
case "Escape": e.preventDefault(), Pe(),
|
|
8659
|
+
case "Escape": e.preventDefault(), Pe(), X.current?.focus();
|
|
8638
8660
|
}
|
|
8639
8661
|
}, [
|
|
8640
8662
|
Pe,
|
|
8641
8663
|
Fe,
|
|
8642
|
-
|
|
8643
|
-
|
|
8664
|
+
G,
|
|
8665
|
+
K
|
|
8644
8666
|
]), Ue = o((e) => {
|
|
8645
|
-
let t =
|
|
8667
|
+
let t = Z.current;
|
|
8646
8668
|
if (!t) return;
|
|
8647
8669
|
let n = e.relatedTarget;
|
|
8648
8670
|
(!n || !t.contains(n)) && Pe();
|
|
8649
8671
|
}, [Pe]), We = o((e) => {
|
|
8650
|
-
let t =
|
|
8672
|
+
let t = he.current;
|
|
8651
8673
|
if (!t) return;
|
|
8652
8674
|
let n = e.relatedTarget;
|
|
8653
8675
|
n && t.contains(n) || re?.(e);
|
|
8654
8676
|
}, [re]), Ge = o((e) => {
|
|
8655
|
-
let t =
|
|
8677
|
+
let t = he.current;
|
|
8656
8678
|
if (!t) return;
|
|
8657
8679
|
let n = e.relatedTarget;
|
|
8658
8680
|
n && t.contains(n) || ie?.(e);
|
|
8659
8681
|
}, [ie]), Ke = o(() => {
|
|
8660
|
-
b || (
|
|
8682
|
+
b || (q ? Pe() : de(!0));
|
|
8661
8683
|
}, [
|
|
8662
8684
|
b,
|
|
8663
|
-
|
|
8685
|
+
q,
|
|
8664
8686
|
Pe
|
|
8665
8687
|
]);
|
|
8666
8688
|
return u(t, () => ({
|
|
@@ -8671,35 +8693,35 @@ function is(e, t) {
|
|
|
8671
8693
|
let t = e ?? "";
|
|
8672
8694
|
I || z(t);
|
|
8673
8695
|
let [n, r] = es(t);
|
|
8674
|
-
|
|
8696
|
+
G(n), K(r), Q.current && (Q.current.value = t);
|
|
8675
8697
|
},
|
|
8676
8698
|
focus() {
|
|
8677
|
-
|
|
8699
|
+
pe.current?.focus();
|
|
8678
8700
|
},
|
|
8679
8701
|
blur() {
|
|
8680
|
-
|
|
8702
|
+
pe.current?.blur();
|
|
8681
8703
|
}
|
|
8682
8704
|
}), [
|
|
8683
8705
|
I,
|
|
8684
|
-
|
|
8685
|
-
|
|
8706
|
+
G,
|
|
8707
|
+
K
|
|
8686
8708
|
]), c(() => {
|
|
8687
|
-
let e =
|
|
8709
|
+
let e = he.current?.closest("form");
|
|
8688
8710
|
if (!e) return;
|
|
8689
8711
|
let t = () => {
|
|
8690
8712
|
window.setTimeout(() => {
|
|
8691
8713
|
let e = R.current, [t, n] = es(e);
|
|
8692
|
-
|
|
8714
|
+
G(t), K(n), I || z(e), Q.current && (Q.current.value = e), de(!1), xe(!1);
|
|
8693
8715
|
}, 0);
|
|
8694
8716
|
};
|
|
8695
8717
|
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
8696
8718
|
}, [
|
|
8697
8719
|
I,
|
|
8698
|
-
|
|
8699
|
-
|
|
8720
|
+
G,
|
|
8721
|
+
K
|
|
8700
8722
|
]), {
|
|
8701
8723
|
id: n,
|
|
8702
|
-
containerRef:
|
|
8724
|
+
containerRef: he,
|
|
8703
8725
|
outerClasses: [
|
|
8704
8726
|
"pkt-timepicker",
|
|
8705
8727
|
`pkt-timepicker--${ne}`,
|
|
@@ -8717,7 +8739,7 @@ function is(e, t) {
|
|
|
8717
8739
|
helptextDropdown: C,
|
|
8718
8740
|
helptextDropdownButton: w,
|
|
8719
8741
|
hasError: T,
|
|
8720
|
-
isInvalid:
|
|
8742
|
+
isInvalid: J,
|
|
8721
8743
|
errorMessage: E,
|
|
8722
8744
|
optionalTag: D,
|
|
8723
8745
|
optionalText: O,
|
|
@@ -8732,20 +8754,20 @@ function is(e, t) {
|
|
|
8732
8754
|
min: s,
|
|
8733
8755
|
max: l,
|
|
8734
8756
|
step: h,
|
|
8735
|
-
hours:
|
|
8736
|
-
minutes:
|
|
8737
|
-
hoursId:
|
|
8738
|
-
minutesId:
|
|
8739
|
-
popupId:
|
|
8740
|
-
hiddenInputId:
|
|
8757
|
+
hours: le,
|
|
8758
|
+
minutes: H,
|
|
8759
|
+
hoursId: Ee,
|
|
8760
|
+
minutesId: De,
|
|
8761
|
+
popupId: Oe,
|
|
8762
|
+
hiddenInputId: ke,
|
|
8741
8763
|
name: y ?? n,
|
|
8742
|
-
isOpen:
|
|
8743
|
-
hourOptions:
|
|
8744
|
-
minuteOptions:
|
|
8745
|
-
hoursInputRef:
|
|
8746
|
-
minutesInputRef:
|
|
8747
|
-
buttonRef:
|
|
8748
|
-
popupRef:
|
|
8764
|
+
isOpen: q,
|
|
8765
|
+
hourOptions: we,
|
|
8766
|
+
minuteOptions: Te,
|
|
8767
|
+
hoursInputRef: pe,
|
|
8768
|
+
minutesInputRef: me,
|
|
8769
|
+
buttonRef: X,
|
|
8770
|
+
popupRef: Z,
|
|
8749
8771
|
changeInputRef: Q,
|
|
8750
8772
|
handleHoursKeydown: Re,
|
|
8751
8773
|
handleHoursBlur: ze,
|
|
@@ -8972,4 +8994,4 @@ var as = i((e, t) => {
|
|
|
8972
8994
|
});
|
|
8973
8995
|
as.displayName = "PktTimepicker";
|
|
8974
8996
|
//#endregion
|
|
8975
|
-
export { yi as FileItem, xa as ItemRenderers, j as PktAccordion, R as PktAccordionItem,
|
|
8997
|
+
export { yi as FileItem, xa as ItemRenderers, j as PktAccordion, R as PktAccordionItem, $ as PktAlert, _e as PktBackLink, ve as PktBreadcrumbs, Z as PktButton, Ln as PktCalendar, Gn as PktCard, Kn as PktCheckbox, Dr as PktCombobox, Mr as PktConsent, qr as PktDatepicker, Sa as PktFileUpload, Ja as PktFooter, Xa as PktFooterSimple, To as PktHeader, xo as PktHeaderGlobal, eo as PktHeaderMenu, wo as PktHeaderService, Un as PktHeading, tr as PktHelptext, L as PktIcon, Eo as PktInput, nr as PktInputWrapper, lo as PktLink, Do as PktLinkCard, ko as PktLoader, Ao as PktMessagebox, Qi as PktModal, Vi as PktProgressbar, jo as PktRadioButton, ho as PktSearchInput, Mo as PktSelect, Io as PktStep, Lo as PktStepper, Q as PktStringsProvider, Wo as PktTabItem, Ro as PktTable, zo as PktTableBody, Bo as PktTableDataCell, Vo as PktTableHeader, Ho as PktTableHeaderCell, Uo as PktTableRow, qo as PktTabs, Wn as PktTag, wi as PktTextarea, So as PktTextinput, as as PktTimepicker, G as getPktStrings, ce as pktStringsNb, K as resetPktStrings, W as setPktStrings, q as subscribePktStrings };
|