@snmt-react-ui/user-select 2.11.0 → 2.11.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/dist/user-select.js +228 -222
- package/package.json +4 -4
package/dist/user-select.js
CHANGED
|
@@ -151,8 +151,8 @@ const c5 = (i, e) => {
|
|
|
151
151
|
}, [h, p]), Y(() => {
|
|
152
152
|
A.current && a && f(g);
|
|
153
153
|
}, [h, l, a]);
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
154
|
+
const b = [L, h, a];
|
|
155
|
+
if (b.t = L, b.i18n = h, b.ready = a, a || !a && !C) return b;
|
|
156
156
|
throw new Promise((m) => {
|
|
157
157
|
e.lng ? s2(h, e.lng, r, () => m()) : i2(h, r, () => m());
|
|
158
158
|
});
|
|
@@ -696,7 +696,7 @@ const R5 = ({
|
|
|
696
696
|
}
|
|
697
697
|
)
|
|
698
698
|
}
|
|
699
|
-
),
|
|
699
|
+
), b5 = ({
|
|
700
700
|
width: i = 20,
|
|
701
701
|
height: e = 20,
|
|
702
702
|
color: t = k.GREY_DARK_5,
|
|
@@ -757,7 +757,7 @@ const R5 = ({
|
|
|
757
757
|
)
|
|
758
758
|
]
|
|
759
759
|
}
|
|
760
|
-
),
|
|
760
|
+
), y5 = ({
|
|
761
761
|
width: i = 20,
|
|
762
762
|
height: e = 20,
|
|
763
763
|
color: t = k.GREY_DARK_5,
|
|
@@ -2652,9 +2652,9 @@ const R5 = ({
|
|
|
2652
2652
|
case "add":
|
|
2653
2653
|
return G5({ width: e, height: t, color: l, className: a, onClick: r });
|
|
2654
2654
|
case "list":
|
|
2655
|
-
return y5({ width: e, height: t, color: l, className: a, onClick: r });
|
|
2656
|
-
case "dragAndDrop":
|
|
2657
2655
|
return b5({ width: e, height: t, color: l, className: a, onClick: r });
|
|
2656
|
+
case "dragAndDrop":
|
|
2657
|
+
return y5({ width: e, height: t, color: l, className: a, onClick: r });
|
|
2658
2658
|
case "filter":
|
|
2659
2659
|
return D5({ width: e, height: t, color: l, className: a, onClick: r });
|
|
2660
2660
|
case "attention":
|
|
@@ -2807,7 +2807,7 @@ const R5 = ({
|
|
|
2807
2807
|
return /* @__PURE__ */ n(l1, { children: "No Icon provided" });
|
|
2808
2808
|
}
|
|
2809
2809
|
})() });
|
|
2810
|
-
}, { Title: G7, Text:
|
|
2810
|
+
}, { Title: G7, Text: b7 } = H1, y7 = {
|
|
2811
2811
|
h1: 1,
|
|
2812
2812
|
h2: 2,
|
|
2813
2813
|
h3: 3,
|
|
@@ -2854,7 +2854,7 @@ const R5 = ({
|
|
|
2854
2854
|
}
|
|
2855
2855
|
} : void 0
|
|
2856
2856
|
};
|
|
2857
|
-
return g ? /* @__PURE__ */ n(G7, { level:
|
|
2857
|
+
return g ? /* @__PURE__ */ n(G7, { level: y7[e], ...L, children: s }) : /* @__PURE__ */ n(b7, { ...L, children: s });
|
|
2858
2858
|
}
|
|
2859
2859
|
);
|
|
2860
2860
|
var v = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_0_5 = "var(--grey-light-0-5)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_0_5 = "var(--blue-light-0-5)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.CYAN_LIGHT = "var(--cyan-light)", i.CYAN_DARK = "var(--cyan-dark)", i.MAGENTA_LIGHT = "var(--magenta-light)", i.MAGENTA_DARK = "var(--magenta-dark)", i.GOLD_LIGHT = "var(--gold-light)", i.GOLD_DARK = "var(--gold-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(v || {});
|
|
@@ -4632,7 +4632,7 @@ const T7 = ({
|
|
|
4632
4632
|
)
|
|
4633
4633
|
]
|
|
4634
4634
|
}
|
|
4635
|
-
),
|
|
4635
|
+
), b0 = ({
|
|
4636
4636
|
className: i,
|
|
4637
4637
|
color: e = v.GREY_DARK_5,
|
|
4638
4638
|
height: t = 24,
|
|
@@ -4701,7 +4701,7 @@ const T7 = ({
|
|
|
4701
4701
|
)
|
|
4702
4702
|
]
|
|
4703
4703
|
}
|
|
4704
|
-
),
|
|
4704
|
+
), y0 = ({
|
|
4705
4705
|
className: i,
|
|
4706
4706
|
color: e = v.GREY_DARK_5,
|
|
4707
4707
|
height: t = 24,
|
|
@@ -5268,9 +5268,9 @@ const T7 = ({
|
|
|
5268
5268
|
case "copy":
|
|
5269
5269
|
return G0({ width: e, height: t, color: l, className: a, onClick: r });
|
|
5270
5270
|
case "contract":
|
|
5271
|
-
return y0({ width: e, height: t, color: l, className: a, onClick: r });
|
|
5272
|
-
case "resourceManager":
|
|
5273
5271
|
return b0({ width: e, height: t, color: l, className: a, onClick: r });
|
|
5272
|
+
case "resourceManager":
|
|
5273
|
+
return y0({ width: e, height: t, color: l, className: a, onClick: r });
|
|
5274
5274
|
case "image":
|
|
5275
5275
|
return D0({ width: e, height: t, color: l, className: a, onClick: r });
|
|
5276
5276
|
case "edit":
|
|
@@ -6531,7 +6531,7 @@ const o9 = ({
|
|
|
6531
6531
|
)
|
|
6532
6532
|
]
|
|
6533
6533
|
}
|
|
6534
|
-
),
|
|
6534
|
+
), b9 = ({
|
|
6535
6535
|
width: i = 20,
|
|
6536
6536
|
height: e = 20,
|
|
6537
6537
|
color: t = "#004ED7",
|
|
@@ -6560,7 +6560,7 @@ const o9 = ({
|
|
|
6560
6560
|
)
|
|
6561
6561
|
]
|
|
6562
6562
|
}
|
|
6563
|
-
),
|
|
6563
|
+
), y9 = ({
|
|
6564
6564
|
width: i = 10,
|
|
6565
6565
|
height: e = 10,
|
|
6566
6566
|
color: t = "#001E52",
|
|
@@ -7726,7 +7726,7 @@ const o9 = ({
|
|
|
7726
7726
|
}
|
|
7727
7727
|
)
|
|
7728
7728
|
}
|
|
7729
|
-
),
|
|
7729
|
+
), b1 = ({
|
|
7730
7730
|
name: i,
|
|
7731
7731
|
width: e,
|
|
7732
7732
|
height: t,
|
|
@@ -7831,7 +7831,7 @@ const o9 = ({
|
|
|
7831
7831
|
onClick: r
|
|
7832
7832
|
});
|
|
7833
7833
|
case "expandActiveArrowIcon":
|
|
7834
|
-
return
|
|
7834
|
+
return b9({
|
|
7835
7835
|
width: e,
|
|
7836
7836
|
height: t,
|
|
7837
7837
|
color: l,
|
|
@@ -7839,7 +7839,7 @@ const o9 = ({
|
|
|
7839
7839
|
onClick: r
|
|
7840
7840
|
});
|
|
7841
7841
|
case "sortUp":
|
|
7842
|
-
return
|
|
7842
|
+
return y9({ width: e, height: t, color: l, className: a, onClick: r });
|
|
7843
7843
|
case "sortDown":
|
|
7844
7844
|
return D9({ width: e, height: t, color: l, className: a, onClick: r });
|
|
7845
7845
|
case "search":
|
|
@@ -7946,7 +7946,7 @@ const o9 = ({
|
|
|
7946
7946
|
}) => {
|
|
7947
7947
|
const o = {
|
|
7948
7948
|
approved: /* @__PURE__ */ n(
|
|
7949
|
-
|
|
7949
|
+
b1,
|
|
7950
7950
|
{
|
|
7951
7951
|
name: "checkCircle",
|
|
7952
7952
|
width: 14,
|
|
@@ -7954,9 +7954,9 @@ const o9 = ({
|
|
|
7954
7954
|
color: W.NOTIFICATION_SUCCESS_DARK
|
|
7955
7955
|
}
|
|
7956
7956
|
),
|
|
7957
|
-
pending: /* @__PURE__ */ n(
|
|
7957
|
+
pending: /* @__PURE__ */ n(b1, { name: "history", width: 14, height: 14, color: W.NOTIFICATION_WARNING_DARK }),
|
|
7958
7958
|
rejected: /* @__PURE__ */ n(
|
|
7959
|
-
|
|
7959
|
+
b1,
|
|
7960
7960
|
{
|
|
7961
7961
|
name: "cancelCircle",
|
|
7962
7962
|
width: 14,
|
|
@@ -7964,7 +7964,7 @@ const o9 = ({
|
|
|
7964
7964
|
color: W.NOTIFICATION_ERROR_DARK
|
|
7965
7965
|
}
|
|
7966
7966
|
),
|
|
7967
|
-
canceled: /* @__PURE__ */ n(
|
|
7967
|
+
canceled: /* @__PURE__ */ n(b1, { name: "cancelCircle", width: 14, height: 14, color: W.GREY_DARK_2 })
|
|
7968
7968
|
}, h = {
|
|
7969
7969
|
approved: W.NOTIFICATION_SUCCESS_LIGHT,
|
|
7970
7970
|
pending: W.NOTIFICATION_WARNING_LIGHT,
|
|
@@ -8588,7 +8588,7 @@ const m4 = ({
|
|
|
8588
8588
|
)
|
|
8589
8589
|
]
|
|
8590
8590
|
}
|
|
8591
|
-
),
|
|
8591
|
+
), b4 = ({
|
|
8592
8592
|
width: i = 20,
|
|
8593
8593
|
height: e = 20,
|
|
8594
8594
|
color: t = R.GREY_DARK_5,
|
|
@@ -8635,7 +8635,7 @@ const m4 = ({
|
|
|
8635
8635
|
)
|
|
8636
8636
|
]
|
|
8637
8637
|
}
|
|
8638
|
-
),
|
|
8638
|
+
), y4 = ({
|
|
8639
8639
|
width: i = 20,
|
|
8640
8640
|
height: e = 20,
|
|
8641
8641
|
color: t = R.GREY_DARK_5,
|
|
@@ -10364,9 +10364,9 @@ const m4 = ({
|
|
|
10364
10364
|
case "attention":
|
|
10365
10365
|
return G4({ width: e, height: t, color: l, className: a, onClick: r });
|
|
10366
10366
|
case "users":
|
|
10367
|
-
return
|
|
10367
|
+
return b4({ width: e, height: t, color: l, className: a, onClick: r });
|
|
10368
10368
|
case "mySkillsMatrix":
|
|
10369
|
-
return
|
|
10369
|
+
return y4({
|
|
10370
10370
|
width: e,
|
|
10371
10371
|
height: t,
|
|
10372
10372
|
color: l,
|
|
@@ -10561,17 +10561,17 @@ const G3 = d1((i, e) => {
|
|
|
10561
10561
|
onPopupScroll: p,
|
|
10562
10562
|
id: H,
|
|
10563
10563
|
extraOptions: A,
|
|
10564
|
-
dropdownRender:
|
|
10564
|
+
dropdownRender: b,
|
|
10565
10565
|
optionRender: m,
|
|
10566
10566
|
isLoading: x,
|
|
10567
10567
|
readOnly: V,
|
|
10568
10568
|
error: M,
|
|
10569
10569
|
selectedItemVariant: K = "default",
|
|
10570
|
-
variant:
|
|
10570
|
+
variant: P = "outlined"
|
|
10571
10571
|
} = i;
|
|
10572
10572
|
let s1;
|
|
10573
10573
|
h && h !== "single" && (s1 = i.overflowBehaviour ?? "responsive");
|
|
10574
|
-
const [I, B] = O(!1), [
|
|
10574
|
+
const [I, B] = O(!1), [F, $] = O(!1), [y, j] = O(!1), [J, Z] = O(!0), [G, S] = O(t), C1 = e1(null);
|
|
10575
10575
|
Y(() => {
|
|
10576
10576
|
S(t);
|
|
10577
10577
|
}, [t]);
|
|
@@ -10664,152 +10664,158 @@ const G3 = d1((i, e) => {
|
|
|
10664
10664
|
},
|
|
10665
10665
|
[r, o1, g1, G1, K, C]
|
|
10666
10666
|
), n1 = Array.isArray(G) && G.length > 0 || !!G && typeof G == "string" && G.trim() !== "";
|
|
10667
|
-
return /* @__PURE__ */ d(
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
{
|
|
10671
|
-
|
|
10667
|
+
return /* @__PURE__ */ d(
|
|
10668
|
+
"div",
|
|
10669
|
+
{
|
|
10670
|
+
className: `snmt-select-container ${P === "borderless" ? "snmt-select-container-borderless" : ""}`,
|
|
10671
|
+
children: [
|
|
10672
|
+
/* @__PURE__ */ d(
|
|
10673
|
+
"div",
|
|
10674
|
+
{
|
|
10675
|
+
className: `snmt-select ${F ? "snmt-select-focused" : ""}
|
|
10672
10676
|
${h ? "" : "snmt-select-single"}
|
|
10673
10677
|
${V ? "snmt-select-read-only" : ""}
|
|
10674
10678
|
${s1 === "static" ? "snmt-select-static" : ""}
|
|
10675
|
-
${
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
{
|
|
10717
|
-
onClick: Z1,
|
|
10718
|
-
style: {
|
|
10719
|
-
cursor: r ? "not-allowed" : "pointer"
|
|
10720
|
-
},
|
|
10721
|
-
children: /* @__PURE__ */ n(
|
|
10722
|
-
v1,
|
|
10679
|
+
${P === "borderless" ? "snmt-select-borderless" : ""}`,
|
|
10680
|
+
ref: C1,
|
|
10681
|
+
style: { width: l },
|
|
10682
|
+
children: [
|
|
10683
|
+
/* @__PURE__ */ n(
|
|
10684
|
+
B2,
|
|
10685
|
+
{
|
|
10686
|
+
className: "snmt-select-blank",
|
|
10687
|
+
popupClassName: V ? "dropdown-read-only" : "",
|
|
10688
|
+
id: H,
|
|
10689
|
+
ref: e,
|
|
10690
|
+
showSearch: !!c,
|
|
10691
|
+
filterOption: c && E1,
|
|
10692
|
+
onDropdownVisibleChange: V1,
|
|
10693
|
+
disabled: r,
|
|
10694
|
+
value: G || void 0,
|
|
10695
|
+
labelRender: (_) => {
|
|
10696
|
+
const T = o1(_.value);
|
|
10697
|
+
return r ? /* @__PURE__ */ n("span", { style: { color: X.GREY_DARK_1 }, children: T }) : T;
|
|
10698
|
+
},
|
|
10699
|
+
mode: b3(h, K),
|
|
10700
|
+
variant: P,
|
|
10701
|
+
onChange: h1,
|
|
10702
|
+
onFocus: A1,
|
|
10703
|
+
onBlur: I1,
|
|
10704
|
+
onMouseEnter: () => j(!0),
|
|
10705
|
+
onMouseLeave: () => j(!1),
|
|
10706
|
+
onSearch: (_) => {
|
|
10707
|
+
Z(!_), u && u(_);
|
|
10708
|
+
},
|
|
10709
|
+
onSelect: () => Z(!0),
|
|
10710
|
+
onDeselect: () => Z(!0),
|
|
10711
|
+
tagRender: (_) => t1({ ..._, mode: h }),
|
|
10712
|
+
maxTagCount: s1 === "responsive" ? "responsive" : void 0,
|
|
10713
|
+
maxCount: h === "single" && K === "badge" ? 1 : void 0,
|
|
10714
|
+
maxTagPlaceholder: (_) => Q(_, K),
|
|
10715
|
+
onPopupScroll: q,
|
|
10716
|
+
prefix: x && /* @__PURE__ */ n(n2, { size: "small" }),
|
|
10717
|
+
suffixIcon: /* @__PURE__ */ n("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ d(l1, { children: [
|
|
10718
|
+
G && !!G.length && w && /* @__PURE__ */ n(
|
|
10719
|
+
"div",
|
|
10723
10720
|
{
|
|
10724
|
-
|
|
10725
|
-
|
|
10721
|
+
onClick: Z1,
|
|
10722
|
+
style: {
|
|
10723
|
+
cursor: r ? "not-allowed" : "pointer"
|
|
10724
|
+
},
|
|
10725
|
+
children: /* @__PURE__ */ n(
|
|
10726
|
+
v1,
|
|
10727
|
+
{
|
|
10728
|
+
name: "cancel",
|
|
10729
|
+
color: r ? X.GREY_DARK_1 : X.GREY_DARK_2
|
|
10730
|
+
}
|
|
10731
|
+
)
|
|
10726
10732
|
}
|
|
10727
|
-
)
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
F === "borderless" && (b || P) && /* @__PURE__ */ n(
|
|
10731
|
-
A3,
|
|
10732
|
-
{
|
|
10733
|
-
isActive: I,
|
|
10734
|
-
onClick: () => B(!I)
|
|
10735
|
-
}
|
|
10736
|
-
),
|
|
10737
|
-
F === "outlined" && /* @__PURE__ */ n(
|
|
10738
|
-
v1,
|
|
10739
|
-
{
|
|
10740
|
-
name: "selectArrowIcon",
|
|
10741
|
-
color: r ? X.GREY_DARK_1 : X.GREY_DARK_5,
|
|
10742
|
-
className: I ? "select-arrow-rotated" : "select-arrow",
|
|
10743
|
-
onClick: () => B(!I)
|
|
10744
|
-
}
|
|
10745
|
-
)
|
|
10746
|
-
] }) }),
|
|
10747
|
-
removeIcon: /* @__PURE__ */ n(v1, { name: "cancelCircle", color: X.GREY_DARK_1 }),
|
|
10748
|
-
options: C,
|
|
10749
|
-
optionRender: (_) => m ? m(_.data) : /* @__PURE__ */ d(R1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
|
|
10750
|
-
/* @__PURE__ */ d(R1, { alignItems: "center", gap: 12, children: [
|
|
10751
|
-
h && /* @__PURE__ */ n(
|
|
10752
|
-
N5,
|
|
10753
|
-
{
|
|
10754
|
-
checked: !!(G != null && G.includes(_.value))
|
|
10755
|
-
}
|
|
10756
|
-
),
|
|
10757
|
-
/* @__PURE__ */ d(R1, { alignItems: "center", gap: 8, children: [
|
|
10758
|
-
_.data.image !== void 0 && /* @__PURE__ */ n(
|
|
10759
|
-
L5,
|
|
10733
|
+
),
|
|
10734
|
+
P === "borderless" && (y || F) && /* @__PURE__ */ n(
|
|
10735
|
+
A3,
|
|
10760
10736
|
{
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
fallbackText: _.data.imageFallbackText ? _.data.imageFallbackText : ""
|
|
10737
|
+
isActive: I,
|
|
10738
|
+
onClick: () => B(!I)
|
|
10764
10739
|
}
|
|
10765
10740
|
),
|
|
10766
|
-
/* @__PURE__ */ n(
|
|
10741
|
+
P === "outlined" && /* @__PURE__ */ n(
|
|
10742
|
+
v1,
|
|
10743
|
+
{
|
|
10744
|
+
name: "selectArrowIcon",
|
|
10745
|
+
color: r ? X.GREY_DARK_1 : X.GREY_DARK_5,
|
|
10746
|
+
className: I ? "select-arrow-rotated" : "select-arrow",
|
|
10747
|
+
onClick: () => B(!I)
|
|
10748
|
+
}
|
|
10749
|
+
)
|
|
10750
|
+
] }) }),
|
|
10751
|
+
removeIcon: /* @__PURE__ */ n(v1, { name: "cancelCircle", color: X.GREY_DARK_1 }),
|
|
10752
|
+
options: C,
|
|
10753
|
+
optionRender: (_) => m ? m(_.data) : /* @__PURE__ */ d(R1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
|
|
10754
|
+
/* @__PURE__ */ d(R1, { alignItems: "center", gap: 12, children: [
|
|
10755
|
+
h && /* @__PURE__ */ n(
|
|
10756
|
+
N5,
|
|
10757
|
+
{
|
|
10758
|
+
checked: !!(G != null && G.includes(_.value))
|
|
10759
|
+
}
|
|
10760
|
+
),
|
|
10761
|
+
/* @__PURE__ */ d(R1, { alignItems: "center", gap: 8, children: [
|
|
10762
|
+
_.data.image !== void 0 && /* @__PURE__ */ n(
|
|
10763
|
+
L5,
|
|
10764
|
+
{
|
|
10765
|
+
src: _.data.image,
|
|
10766
|
+
variant: "xsmall",
|
|
10767
|
+
fallbackText: _.data.imageFallbackText ? _.data.imageFallbackText : ""
|
|
10768
|
+
}
|
|
10769
|
+
),
|
|
10770
|
+
/* @__PURE__ */ n("span", { children: _.label })
|
|
10771
|
+
] })
|
|
10772
|
+
] }),
|
|
10773
|
+
!h && G === _.value && /* @__PURE__ */ n(v1, { name: "check", color: X.BLUE_DARK_1 })
|
|
10774
|
+
] }),
|
|
10775
|
+
dropdownRender: (_) => /* @__PURE__ */ d("div", { className: "dropdown-container", children: [
|
|
10776
|
+
/* @__PURE__ */ n("div", { className: "dropdown-menu", children: b ? b(_) : _ }),
|
|
10777
|
+
x && /* @__PURE__ */ n("div", { className: "loading-overlay", children: /* @__PURE__ */ n(n2, {}) })
|
|
10767
10778
|
] })
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10779
|
+
}
|
|
10780
|
+
),
|
|
10781
|
+
o && P !== "borderless" && /* @__PURE__ */ n(
|
|
10782
|
+
"label",
|
|
10783
|
+
{
|
|
10784
|
+
className: `${F || n1 ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${F ? "label-focused" : ""} ${x ? "label-loading" : ""} ${M ? "label-error" : ""}`,
|
|
10785
|
+
children: a ? `${o}*` : o
|
|
10786
|
+
}
|
|
10787
|
+
),
|
|
10788
|
+
/* @__PURE__ */ n(
|
|
10789
|
+
"fieldset",
|
|
10790
|
+
{
|
|
10791
|
+
className: `${F ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${n1 ? "fieldset-filled" : ""} ${M ? "fieldset-error" : ""}
|
|
10792
|
+
${y ? "fieldset-hovered" : ""}`,
|
|
10793
|
+
children: /* @__PURE__ */ n("legend", { children: o && P !== "borderless" && /* @__PURE__ */ n("span", { children: a ? `${o}*` : o }) })
|
|
10794
|
+
}
|
|
10795
|
+
)
|
|
10796
|
+
]
|
|
10797
|
+
}
|
|
10798
|
+
),
|
|
10799
|
+
M && /* @__PURE__ */ d(R1, { justifyContent: "flex-start", gap: 6, children: [
|
|
10784
10800
|
/* @__PURE__ */ n(
|
|
10785
|
-
|
|
10801
|
+
v1,
|
|
10786
10802
|
{
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10803
|
+
name: "attention",
|
|
10804
|
+
color: X.NOTIFICATION_ERROR_DARK,
|
|
10805
|
+
height: 16,
|
|
10806
|
+
width: 16
|
|
10790
10807
|
}
|
|
10791
|
-
)
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
v1,
|
|
10798
|
-
{
|
|
10799
|
-
name: "attention",
|
|
10800
|
-
color: X.NOTIFICATION_ERROR_DARK,
|
|
10801
|
-
height: 16,
|
|
10802
|
-
width: 16
|
|
10803
|
-
}
|
|
10804
|
-
),
|
|
10805
|
-
typeof M == "string" ? /* @__PURE__ */ n(Q0, { color: X.NOTIFICATION_ERROR_DARK, variant: "body4", children: M }) : M
|
|
10806
|
-
] })
|
|
10807
|
-
] });
|
|
10808
|
+
),
|
|
10809
|
+
typeof M == "string" ? /* @__PURE__ */ n(Q0, { color: X.NOTIFICATION_ERROR_DARK, variant: "body4", children: M }) : M
|
|
10810
|
+
] })
|
|
10811
|
+
]
|
|
10812
|
+
}
|
|
10813
|
+
);
|
|
10808
10814
|
});
|
|
10809
|
-
function
|
|
10815
|
+
function b3(i, e) {
|
|
10810
10816
|
return i === "filter" || i === "single" && e === "badge" ? "multiple" : i === "single" ? void 0 : i;
|
|
10811
10817
|
}
|
|
10812
|
-
function
|
|
10818
|
+
function y3(i, e = 500) {
|
|
10813
10819
|
const t = e1();
|
|
10814
10820
|
return Y(() => () => {
|
|
10815
10821
|
t.current && clearTimeout(t.current);
|
|
@@ -10847,9 +10853,9 @@ const S1 = 100, f1 = {
|
|
|
10847
10853
|
readOnly: p,
|
|
10848
10854
|
clearable: H = !0,
|
|
10849
10855
|
required: A = !1,
|
|
10850
|
-
error:
|
|
10856
|
+
error: b,
|
|
10851
10857
|
variant: m = "outlined"
|
|
10852
|
-
} = i, [x, V] = O(), [M, K] = O(f1), [
|
|
10858
|
+
} = i, [x, V] = O(), [M, K] = O(f1), [P, s1] = O(!1), [I, B] = O(), [F, $] = O(!1), [y, j] = O(
|
|
10853
10859
|
g ?? []
|
|
10854
10860
|
), J = r2(M.offset), Z = r2(I), [G, S] = O(!1), C1 = e1(!1), V1 = U(
|
|
10855
10861
|
async ({
|
|
@@ -10877,19 +10883,19 @@ const S1 = 100, f1 = {
|
|
|
10877
10883
|
}
|
|
10878
10884
|
},
|
|
10879
10885
|
[t]
|
|
10880
|
-
), E1 =
|
|
10886
|
+
), E1 = y3((D) => {
|
|
10881
10887
|
B(D), D || K(f1);
|
|
10882
10888
|
}), A1 = U(
|
|
10883
10889
|
(D) => E1(D),
|
|
10884
10890
|
[E1]
|
|
10885
10891
|
), I1 = U(
|
|
10886
10892
|
async (D) => {
|
|
10887
|
-
|
|
10893
|
+
P || D && M.count && M.count > ((x == null ? void 0 : x.length) ?? 0) && K((q) => ({
|
|
10888
10894
|
...q,
|
|
10889
10895
|
offset: q.offset + S1
|
|
10890
10896
|
}));
|
|
10891
10897
|
},
|
|
10892
|
-
[
|
|
10898
|
+
[P, x == null ? void 0 : x.length, M.count]
|
|
10893
10899
|
), h1 = U(
|
|
10894
10900
|
(D) => {
|
|
10895
10901
|
$(D), !D && I && (B(void 0), K(f1), S(!0)), u == null || u(D);
|
|
@@ -10897,8 +10903,8 @@ const S1 = 100, f1 = {
|
|
|
10897
10903
|
[u, I]
|
|
10898
10904
|
);
|
|
10899
10905
|
Y(() => {
|
|
10900
|
-
!C1.current ||
|
|
10901
|
-
}, [G,
|
|
10906
|
+
!C1.current || P || (G || F && (J !== M.offset || Z !== I || !x)) && (V1({ offset: M.offset, limit: S1, search: I }), G && S(!1));
|
|
10907
|
+
}, [G, F, M.offset, I, J, Z, x, P]), Y(() => {
|
|
10902
10908
|
(a || w) && V1(f1), C1.current = !0;
|
|
10903
10909
|
}, []), Y(() => {
|
|
10904
10910
|
g && j((D) => {
|
|
@@ -10914,7 +10920,7 @@ const S1 = 100, f1 = {
|
|
|
10914
10920
|
let q = [];
|
|
10915
10921
|
if (r ? q = Array.isArray(D) ? D : [] : q = D ? [D] : [], I) {
|
|
10916
10922
|
const o1 = q.filter(
|
|
10917
|
-
(Q) => !(
|
|
10923
|
+
(Q) => !(y != null && y.some((t1) => t1.value === Q))
|
|
10918
10924
|
);
|
|
10919
10925
|
o1.length > 0 && j((Q = []) => [
|
|
10920
10926
|
...Q,
|
|
@@ -10930,7 +10936,7 @@ const S1 = 100, f1 = {
|
|
|
10930
10936
|
]), B(void 0), K(f1), S(!0);
|
|
10931
10937
|
}
|
|
10932
10938
|
},
|
|
10933
|
-
[o, I, r, x,
|
|
10939
|
+
[o, I, r, x, y]
|
|
10934
10940
|
), g1 = e2(
|
|
10935
10941
|
() => ({
|
|
10936
10942
|
id: h,
|
|
@@ -10944,13 +10950,13 @@ const S1 = 100, f1 = {
|
|
|
10944
10950
|
scrollThresholdValue: C,
|
|
10945
10951
|
onScrollToEnd: I1,
|
|
10946
10952
|
disabled: c,
|
|
10947
|
-
isLoading:
|
|
10953
|
+
isLoading: P,
|
|
10948
10954
|
optionRender: L,
|
|
10949
10955
|
dropdownRender: f,
|
|
10950
10956
|
readOnly: p,
|
|
10951
10957
|
clearable: H,
|
|
10952
10958
|
required: A,
|
|
10953
|
-
error:
|
|
10959
|
+
error: b,
|
|
10954
10960
|
variant: m
|
|
10955
10961
|
}),
|
|
10956
10962
|
[
|
|
@@ -10964,13 +10970,13 @@ const S1 = 100, f1 = {
|
|
|
10964
10970
|
C,
|
|
10965
10971
|
I1,
|
|
10966
10972
|
c,
|
|
10967
|
-
|
|
10973
|
+
P,
|
|
10968
10974
|
L,
|
|
10969
10975
|
f,
|
|
10970
10976
|
p,
|
|
10971
10977
|
H,
|
|
10972
10978
|
A,
|
|
10973
|
-
|
|
10979
|
+
b,
|
|
10974
10980
|
m
|
|
10975
10981
|
]
|
|
10976
10982
|
);
|
|
@@ -10980,7 +10986,7 @@ const S1 = 100, f1 = {
|
|
|
10980
10986
|
}
|
|
10981
10987
|
}));
|
|
10982
10988
|
const G1 = e2(() => {
|
|
10983
|
-
const D = r && r !== "single", q = i.selectedItemVariant === "badge", o1 = q ? x || [] : x || [], Q =
|
|
10989
|
+
const D = r && r !== "single", q = i.selectedItemVariant === "badge", o1 = q ? x || [] : x || [], Q = y, t1 = i, n1 = D ? {
|
|
10984
10990
|
mode: r,
|
|
10985
10991
|
overflowBehaviour: t1.overflowBehaviour,
|
|
10986
10992
|
value: t1.value
|
|
@@ -10995,7 +11001,7 @@ const S1 = 100, f1 = {
|
|
|
10995
11001
|
options: o1,
|
|
10996
11002
|
extraOptions: Q
|
|
10997
11003
|
};
|
|
10998
|
-
}, [r, i, g1,
|
|
11004
|
+
}, [r, i, g1, y, x]);
|
|
10999
11005
|
return /* @__PURE__ */ n("div", { className: "snmt-async-select", children: /* @__PURE__ */ n(G3, { ...G1 }) });
|
|
11000
11006
|
});
|
|
11001
11007
|
var D1 = /* @__PURE__ */ ((i) => (i.ACTIVE = "Active", i.ARCHIVED = "Archived", i))(D1 || {});
|
|
@@ -11123,7 +11129,7 @@ const X3 = (i, e) => {
|
|
|
11123
11129
|
return Y(() => {
|
|
11124
11130
|
t.current = i;
|
|
11125
11131
|
}, [i, e]), t.current;
|
|
11126
|
-
},
|
|
11132
|
+
}, b2 = (i, e, t, s) => i.getFixedT(e, t, s), e6 = (i, e, t, s) => U(b2(i, e, t, s), [i, e, t, s]), t6 = function(i) {
|
|
11127
11133
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11128
11134
|
const {
|
|
11129
11135
|
i18n: t
|
|
@@ -11147,7 +11153,7 @@ const X3 = (i, e) => {
|
|
|
11147
11153
|
} = c;
|
|
11148
11154
|
let r = i;
|
|
11149
11155
|
r = w1(r) ? [r] : r || ["translation"], h.reportNamespaces.addUsedNamespaces && h.reportNamespaces.addUsedNamespaces(r);
|
|
11150
|
-
const a = (h.isInitialized || h.initializedStoreOnce) && r.every((m) => B3(m, h, c)), w = e6(h, e.lng || null, c.nsMode === "fallback" ? r : r[0], l), g = () => w, u = () =>
|
|
11156
|
+
const a = (h.isInitialized || h.initializedStoreOnce) && r.every((m) => B3(m, h, c)), w = e6(h, e.lng || null, c.nsMode === "fallback" ? r : r[0], l), g = () => w, u = () => b2(h, e.lng || null, c.nsMode === "fallback" ? r : r[0], l), [L, f] = O(g);
|
|
11151
11157
|
let p = r.join();
|
|
11152
11158
|
e.lng && (p = `${e.lng}${p}`);
|
|
11153
11159
|
const H = X3(p), A = e1(!0);
|
|
@@ -11170,8 +11176,8 @@ const X3 = (i, e) => {
|
|
|
11170
11176
|
}, [h, p]), Y(() => {
|
|
11171
11177
|
A.current && a && f(g);
|
|
11172
11178
|
}, [h, l, a]);
|
|
11173
|
-
const
|
|
11174
|
-
if (
|
|
11179
|
+
const b = [L, h, a];
|
|
11180
|
+
if (b.t = L, b.i18n = h, b.ready = a, a || !a && !C) return b;
|
|
11175
11181
|
throw new Promise((m) => {
|
|
11176
11182
|
e.lng ? c2(h, e.lng, r, () => m()) : h2(h, r, () => m());
|
|
11177
11183
|
});
|
|
@@ -11226,9 +11232,9 @@ const X3 = (i, e) => {
|
|
|
11226
11232
|
}, n6 = (i, e, t) => {
|
|
11227
11233
|
const s = T1(i, t);
|
|
11228
11234
|
return s !== void 0 ? s : T1(e, t);
|
|
11229
|
-
},
|
|
11235
|
+
}, y2 = (i, e, t) => {
|
|
11230
11236
|
for (const s in e)
|
|
11231
|
-
s !== "__proto__" && s !== "constructor" && (s in i ? E(i[s]) || i[s] instanceof String || E(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) :
|
|
11237
|
+
s !== "__proto__" && s !== "constructor" && (s in i ? E(i[s]) || i[s] instanceof String || E(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) : y2(i[s], e[s], t) : i[s] = e[s]);
|
|
11232
11238
|
return i;
|
|
11233
11239
|
}, m1 = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
11234
11240
|
var r6 = {
|
|
@@ -11423,7 +11429,7 @@ class w2 extends Y1 {
|
|
|
11423
11429
|
}, C = [e, t];
|
|
11424
11430
|
e.indexOf(".") > -1 && (C = e.split("."), o = s, s = t, t = C[1]), this.addNamespaces(t);
|
|
11425
11431
|
let l = T1(this.data, C) || {};
|
|
11426
|
-
c.skipCopy || (s = JSON.parse(JSON.stringify(s))), o ?
|
|
11432
|
+
c.skipCopy || (s = JSON.parse(JSON.stringify(s))), o ? y2(l, s, h) : l = {
|
|
11427
11433
|
...l,
|
|
11428
11434
|
...s
|
|
11429
11435
|
}, u2(this.data, C, l), c.silent || this.emit("added", e, t, s);
|
|
@@ -11532,8 +11538,8 @@ class B1 extends Y1 {
|
|
|
11532
11538
|
}
|
|
11533
11539
|
const w = this.resolve(e, t);
|
|
11534
11540
|
let g = w && w.res;
|
|
11535
|
-
const u = w && w.usedKey || c, L = w && w.exactUsedKey || c, f = Object.prototype.toString.apply(g), p = ["[object Number]", "[object Function]", "[object RegExp]"], H = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, A = !this.i18nFormat || this.i18nFormat.handleAsObject,
|
|
11536
|
-
if (A && g &&
|
|
11541
|
+
const u = w && w.usedKey || c, L = w && w.exactUsedKey || c, f = Object.prototype.toString.apply(g), p = ["[object Number]", "[object Function]", "[object RegExp]"], H = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, A = !this.i18nFormat || this.i18nFormat.handleAsObject, b = !E(g) && typeof g != "boolean" && typeof g != "number";
|
|
11542
|
+
if (A && g && b && p.indexOf(f) < 0 && !(E(H) && Array.isArray(g))) {
|
|
11537
11543
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
11538
11544
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
11539
11545
|
const m = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(u, g, {
|
|
@@ -11559,11 +11565,11 @@ class B1 extends Y1 {
|
|
|
11559
11565
|
g = g.join(H), g && (g = this.extendTranslation(g, e, t, s));
|
|
11560
11566
|
else {
|
|
11561
11567
|
let m = !1, x = !1;
|
|
11562
|
-
const V = t.count !== void 0 && !E(t.count), M = B1.hasDefaultValue(t), K = V ? this.pluralResolver.getSuffix(r, t.count, t) : "",
|
|
11568
|
+
const V = t.count !== void 0 && !E(t.count), M = B1.hasDefaultValue(t), K = V ? this.pluralResolver.getSuffix(r, t.count, t) : "", P = t.ordinal && V ? this.pluralResolver.getSuffix(r, t.count, {
|
|
11563
11569
|
ordinal: !1
|
|
11564
|
-
}) : "", s1 = V && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), I = s1 && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${K}`] || t[`defaultValue${
|
|
11570
|
+
}) : "", s1 = V && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), I = s1 && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${K}`] || t[`defaultValue${P}`] || t.defaultValue;
|
|
11565
11571
|
!this.isValidLookup(g) && M && (m = !0, g = I), this.isValidLookup(g) || (x = !0, g = c);
|
|
11566
|
-
const
|
|
11572
|
+
const F = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && x ? void 0 : g, $ = M && I !== g && this.options.updateMissing;
|
|
11567
11573
|
if (x || m || $) {
|
|
11568
11574
|
if (this.logger.log($ ? "updateKey" : "missingKey", r, l, c, $ ? I : g), h) {
|
|
11569
11575
|
const Z = this.resolve(c, {
|
|
@@ -11572,22 +11578,22 @@ class B1 extends Y1 {
|
|
|
11572
11578
|
});
|
|
11573
11579
|
Z && Z.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
11574
11580
|
}
|
|
11575
|
-
let
|
|
11581
|
+
let y = [];
|
|
11576
11582
|
const j = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
|
|
11577
11583
|
if (this.options.saveMissingTo === "fallback" && j && j[0])
|
|
11578
11584
|
for (let Z = 0; Z < j.length; Z++)
|
|
11579
|
-
|
|
11580
|
-
else this.options.saveMissingTo === "all" ?
|
|
11585
|
+
y.push(j[Z]);
|
|
11586
|
+
else this.options.saveMissingTo === "all" ? y = this.languageUtils.toResolveHierarchy(t.lng || this.language) : y.push(t.lng || this.language);
|
|
11581
11587
|
const J = (Z, G, S) => {
|
|
11582
|
-
const C1 = M && S !== g ? S :
|
|
11588
|
+
const C1 = M && S !== g ? S : F;
|
|
11583
11589
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(Z, l, G, C1, $, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(Z, l, G, C1, $, t), this.emit("missingKey", Z, l, G, g);
|
|
11584
11590
|
};
|
|
11585
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && V ?
|
|
11591
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && V ? y.forEach((Z) => {
|
|
11586
11592
|
const G = this.pluralResolver.getSuffixes(Z, t);
|
|
11587
11593
|
s1 && t[`defaultValue${this.options.pluralSeparator}zero`] && G.indexOf(`${this.options.pluralSeparator}zero`) < 0 && G.push(`${this.options.pluralSeparator}zero`), G.forEach((S) => {
|
|
11588
11594
|
J([Z], c + S, t[`defaultValue${S}`] || I);
|
|
11589
11595
|
});
|
|
11590
|
-
}) : J(
|
|
11596
|
+
}) : J(y, c, I));
|
|
11591
11597
|
}
|
|
11592
11598
|
g = this.extendTranslation(g, e, t, w, s), x && g === c && this.options.appendNamespaceToMissingKey && (g = `${l}:${c}`), (x || m) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${c}` : c, m ? g : void 0) : g = this.options.parseMissingKeyHandler(g));
|
|
11593
11599
|
}
|
|
@@ -11664,9 +11670,9 @@ class B1 extends Y1 {
|
|
|
11664
11670
|
A.push(M), g && (A.push(M + m), t.ordinal && m.indexOf(V) === 0 && A.push(M + m.replace(V, this.options.pluralSeparator)), u && A.push(M + x));
|
|
11665
11671
|
}
|
|
11666
11672
|
}
|
|
11667
|
-
let
|
|
11668
|
-
for (;
|
|
11669
|
-
this.isValidLookup(s) || (h =
|
|
11673
|
+
let b;
|
|
11674
|
+
for (; b = A.pop(); )
|
|
11675
|
+
this.isValidLookup(s) || (h = b, s = this.getResource(H, p, b, t));
|
|
11670
11676
|
}));
|
|
11671
11677
|
});
|
|
11672
11678
|
}), {
|
|
@@ -12405,7 +12411,7 @@ const k2 = () => ({
|
|
|
12405
12411
|
maxReplaces: 1e3,
|
|
12406
12412
|
skipOnVariables: !0
|
|
12407
12413
|
}
|
|
12408
|
-
}), v2 = (i) => (E(i.ns) && (i.ns = [i.ns]), E(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), E(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i),
|
|
12414
|
+
}), v2 = (i) => (E(i.ns) && (i.ns = [i.ns]), E(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), E(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), y1 = () => {
|
|
12409
12415
|
}, _6 = (i) => {
|
|
12410
12416
|
Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
|
|
12411
12417
|
typeof i[t] == "function" && (i[t] = i[t].bind(i));
|
|
@@ -12463,7 +12469,7 @@ class M1 extends Y1 {
|
|
|
12463
12469
|
u.init && u.init(this);
|
|
12464
12470
|
});
|
|
12465
12471
|
}
|
|
12466
|
-
if (this.format = this.options.interpolation.format, s || (s =
|
|
12472
|
+
if (this.format = this.options.interpolation.format, s || (s = y1), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
12467
12473
|
const a = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
12468
12474
|
a.length > 0 && a[0] !== "dev" && (this.options.lng = a[0]);
|
|
12469
12475
|
}
|
|
@@ -12486,7 +12492,7 @@ class M1 extends Y1 {
|
|
|
12486
12492
|
return this.options.resources || !this.options.initImmediate ? r() : setTimeout(r, 0), l;
|
|
12487
12493
|
}
|
|
12488
12494
|
loadResources(e) {
|
|
12489
|
-
let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
12495
|
+
let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : y1;
|
|
12490
12496
|
const o = E(e) ? e : this.language;
|
|
12491
12497
|
if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
12492
12498
|
if (o && o.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
|
|
@@ -12504,7 +12510,7 @@ class M1 extends Y1 {
|
|
|
12504
12510
|
}
|
|
12505
12511
|
reloadResources(e, t, s) {
|
|
12506
12512
|
const o = N1();
|
|
12507
|
-
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s =
|
|
12513
|
+
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = y1), this.services.backendConnector.reload(e, t, (h) => {
|
|
12508
12514
|
o.resolve(), s(h);
|
|
12509
12515
|
}), o;
|
|
12510
12516
|
}
|
|
@@ -12617,7 +12623,7 @@ class M1 extends Y1 {
|
|
|
12617
12623
|
return new M1(e, t);
|
|
12618
12624
|
}
|
|
12619
12625
|
cloneInstance() {
|
|
12620
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
12626
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : y1;
|
|
12621
12627
|
const s = e.forkResourceStore;
|
|
12622
12628
|
s && delete e.forkResourceStore;
|
|
12623
12629
|
const o = {
|
|
@@ -12699,7 +12705,7 @@ const T6 = d1(
|
|
|
12699
12705
|
required: a,
|
|
12700
12706
|
error: w
|
|
12701
12707
|
}, g) => {
|
|
12702
|
-
const { axiosPeople: u, locale: L } = c1(P2), { t: f } = t6("common", { lng: L }), [p, H] = O([]), [A,
|
|
12708
|
+
const { axiosPeople: u, locale: L } = c1(P2), { t: f } = t6("common", { lng: L }), [p, H] = O([]), [A, b] = O(!0), m = e1(p), x = e1(null);
|
|
12703
12709
|
if (p1(g, () => x.current), !u)
|
|
12704
12710
|
throw new Error(
|
|
12705
12711
|
`UserSelect requires "axiosPeople" to fetch users.
|
|
@@ -12715,14 +12721,14 @@ const T6 = d1(
|
|
|
12715
12721
|
async ({
|
|
12716
12722
|
offset: I,
|
|
12717
12723
|
limit: B,
|
|
12718
|
-
search:
|
|
12724
|
+
search: F
|
|
12719
12725
|
}) => {
|
|
12720
|
-
var $,
|
|
12726
|
+
var $, y, j;
|
|
12721
12727
|
try {
|
|
12722
12728
|
const J = await u.post("v1/users/search", {
|
|
12723
12729
|
offset: I,
|
|
12724
12730
|
limit: B,
|
|
12725
|
-
search:
|
|
12731
|
+
search: F,
|
|
12726
12732
|
...i,
|
|
12727
12733
|
includeCount: !0
|
|
12728
12734
|
}), { data: Z, metadata: G } = J.data;
|
|
@@ -12738,7 +12744,7 @@ const T6 = d1(
|
|
|
12738
12744
|
} catch (J) {
|
|
12739
12745
|
return c && c({
|
|
12740
12746
|
status: (($ = J.response) == null ? void 0 : $.status) ?? 500,
|
|
12741
|
-
message: ((j = (
|
|
12747
|
+
message: ((j = (y = J.response) == null ? void 0 : y.data) == null ? void 0 : j.message) ?? "Error while fetching options"
|
|
12742
12748
|
}), {
|
|
12743
12749
|
options: [],
|
|
12744
12750
|
count: 0
|
|
@@ -12748,15 +12754,15 @@ const T6 = d1(
|
|
|
12748
12754
|
[u, i, V, l, c]
|
|
12749
12755
|
), K = U(
|
|
12750
12756
|
async (I) => {
|
|
12751
|
-
var B,
|
|
12757
|
+
var B, F, $;
|
|
12752
12758
|
try {
|
|
12753
|
-
const
|
|
12759
|
+
const y = I.filter(
|
|
12754
12760
|
(Z) => !m.current.some((G) => G.value === Z)
|
|
12755
12761
|
);
|
|
12756
12762
|
let j = [];
|
|
12757
|
-
|
|
12763
|
+
y.length && (j = (await u.post("v1/users/search", {
|
|
12758
12764
|
filters: {
|
|
12759
|
-
id:
|
|
12765
|
+
id: y,
|
|
12760
12766
|
status: [D1.ACTIVE, D1.ARCHIVED]
|
|
12761
12767
|
}
|
|
12762
12768
|
})).data.data);
|
|
@@ -12767,10 +12773,10 @@ const T6 = d1(
|
|
|
12767
12773
|
imageFallbackText: Z.avatarUrl ? "" : N2(`${Z.firstName} ${Z.lastName}`)
|
|
12768
12774
|
}));
|
|
12769
12775
|
return [...m.current, ...J];
|
|
12770
|
-
} catch (
|
|
12776
|
+
} catch (y) {
|
|
12771
12777
|
return c && c({
|
|
12772
|
-
status: ((B =
|
|
12773
|
-
message: (($ = (
|
|
12778
|
+
status: ((B = y.response) == null ? void 0 : B.status) ?? 500,
|
|
12779
|
+
message: (($ = (F = y.response) == null ? void 0 : F.data) == null ? void 0 : $.message) ?? "Error while fetching selected items"
|
|
12774
12780
|
}), [];
|
|
12775
12781
|
}
|
|
12776
12782
|
},
|
|
@@ -12783,26 +12789,26 @@ const T6 = d1(
|
|
|
12783
12789
|
(I = x.current) == null || I.refetchOptions();
|
|
12784
12790
|
}, [i]), Y(() => {
|
|
12785
12791
|
if (!o) {
|
|
12786
|
-
|
|
12792
|
+
b(!1);
|
|
12787
12793
|
return;
|
|
12788
12794
|
}
|
|
12789
12795
|
(async () => {
|
|
12790
|
-
const B = Array.isArray(o) ? o : [o],
|
|
12791
|
-
H(
|
|
12796
|
+
const B = Array.isArray(o) ? o : [o], F = await K(B);
|
|
12797
|
+
H(F), b(!1);
|
|
12792
12798
|
})();
|
|
12793
12799
|
}, [K, o]);
|
|
12794
|
-
const
|
|
12800
|
+
const P = U(
|
|
12795
12801
|
async ({
|
|
12796
12802
|
limit: I,
|
|
12797
12803
|
offset: B,
|
|
12798
|
-
search:
|
|
12804
|
+
search: F
|
|
12799
12805
|
}) => {
|
|
12800
|
-
const { count: $, ...
|
|
12806
|
+
const { count: $, ...y } = await M({
|
|
12801
12807
|
offset: B,
|
|
12802
12808
|
limit: I,
|
|
12803
|
-
search:
|
|
12809
|
+
search: F
|
|
12804
12810
|
});
|
|
12805
|
-
let j =
|
|
12811
|
+
let j = y.options;
|
|
12806
12812
|
return C && B === 0 && (j = [{ value: null, label: "None" }, ...j]), {
|
|
12807
12813
|
options: j,
|
|
12808
12814
|
count: $,
|
|
@@ -12828,7 +12834,7 @@ const T6 = d1(
|
|
|
12828
12834
|
mode: e,
|
|
12829
12835
|
value: o,
|
|
12830
12836
|
onChange: h,
|
|
12831
|
-
loadOptions:
|
|
12837
|
+
loadOptions: P,
|
|
12832
12838
|
preloadOptions: !0,
|
|
12833
12839
|
extraOptions: p
|
|
12834
12840
|
}
|
|
@@ -12839,7 +12845,7 @@ const T6 = d1(
|
|
|
12839
12845
|
value: o,
|
|
12840
12846
|
mode: void 0,
|
|
12841
12847
|
onChange: h,
|
|
12842
|
-
loadOptions:
|
|
12848
|
+
loadOptions: P,
|
|
12843
12849
|
preloadOptions: !0,
|
|
12844
12850
|
extraOptions: p
|
|
12845
12851
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snmt-react-ui/user-select",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.11.
|
|
4
|
+
"version": "2.11.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/user-select.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@snmt-react-ui/async-select": "^1.12.
|
|
21
|
+
"@snmt-react-ui/async-select": "^1.12.2",
|
|
22
22
|
"@snmt-react-ui/core": "^2.8.1",
|
|
23
23
|
"@snmt-react-ui/loader": "^2.2.0",
|
|
24
|
-
"@snmt-react-ui/select": "^1.26.
|
|
24
|
+
"@snmt-react-ui/select": "^1.26.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"antd": "^5.22.3",
|
|
28
28
|
"i18next": "^23.11.1",
|
|
29
29
|
"react-i18next": "^14.1.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "42d20da0aeaaa5f031b320255ef5d879870f8989"
|
|
32
32
|
}
|