@snmt-react-ui/async-select 1.13.0 → 1.13.1
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/async-select.js +337 -339
- package/package.json +3 -3
package/dist/async-select.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
2
|
import { jsx as t, Fragment as F, jsxs as c } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Select as b1, Tag as M1, Flex as y1, Checkbox as I1, Avatar as j1, Typography as
|
|
5
|
-
import { COLORS as r, SNMTUiContext as
|
|
3
|
+
import { forwardRef as X, useState as Z, useRef as T, useEffect as B, useCallback as I, useContext as e1, useImperativeHandle as s1, createContext as W1, useMemo as R1 } from "react";
|
|
4
|
+
import { Select as b1, Tag as M1, Flex as y1, Checkbox as I1, Avatar as j1, Typography as d1, Popover as T1 } from "antd";
|
|
5
|
+
import { COLORS as r, SNMTUiContext as n1 } from "@snmt-react-ui/core";
|
|
6
6
|
var O1 = Object.defineProperty, S1 = (o, i, e) => i in o ? O1(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e, F1 = (o, i, e) => S1(o, i + "", e), $1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
7
|
function P1() {
|
|
8
8
|
if (console && console.warn) {
|
|
9
9
|
for (var o = arguments.length, i = new Array(o), e = 0; e < o; e++)
|
|
10
10
|
i[e] = arguments[e];
|
|
11
|
-
|
|
11
|
+
Q(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), console.warn(...i);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
const x1 = {};
|
|
15
15
|
function N1() {
|
|
16
16
|
for (var o = arguments.length, i = new Array(o), e = 0; e < o; e++)
|
|
17
17
|
i[e] = arguments[e];
|
|
18
|
-
|
|
18
|
+
Q(i[0]) && x1[i[0]] || (Q(i[0]) && (x1[i[0]] = /* @__PURE__ */ new Date()), P1(...i));
|
|
19
19
|
}
|
|
20
20
|
const E1 = (o, i) => () => {
|
|
21
21
|
if (o.isInitialized)
|
|
@@ -31,7 +31,7 @@ const E1 = (o, i) => () => {
|
|
|
31
31
|
}, Z1 = (o, i, e) => {
|
|
32
32
|
o.loadNamespaces(i, E1(o, e));
|
|
33
33
|
}, _1 = (o, i, e, l) => {
|
|
34
|
-
|
|
34
|
+
Q(e) && (e = [e]), e.forEach((s) => {
|
|
35
35
|
o.options.ns.indexOf(s) < 0 && o.options.ns.push(s);
|
|
36
36
|
}), o.loadLanguages(i, E1(o, l));
|
|
37
37
|
}, z1 = function(o, i) {
|
|
@@ -51,7 +51,7 @@ const E1 = (o, i) => () => {
|
|
|
51
51
|
if (e.bindI18n && e.bindI18n.indexOf("languageChanging") > -1 && l.services.backendConnector.backend && l.isLanguageChangingTo && !s(l.isLanguageChangingTo, o)) return !1;
|
|
52
52
|
}
|
|
53
53
|
}) : z1(o, i, e);
|
|
54
|
-
},
|
|
54
|
+
}, Q = (o) => typeof o == "string", q1 = (o) => typeof o == "object" && o !== null, J1 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Q1 = {
|
|
55
55
|
"&": "&",
|
|
56
56
|
"&": "&",
|
|
57
57
|
"<": "<",
|
|
@@ -98,7 +98,7 @@ class n2 {
|
|
|
98
98
|
}
|
|
99
99
|
const C2 = (o, i) => {
|
|
100
100
|
const e = T();
|
|
101
|
-
return
|
|
101
|
+
return B(() => {
|
|
102
102
|
e.current = o;
|
|
103
103
|
}, [o, i]), e.current;
|
|
104
104
|
}, D1 = (o, i, e, l) => o.getFixedT(i, e, l), h2 = (o, i, e, l) => I(D1(o, i, e, l), [o, i, e, l]), r2 = function(o) {
|
|
@@ -108,11 +108,11 @@ const C2 = (o, i) => {
|
|
|
108
108
|
} = i, {
|
|
109
109
|
i18n: l,
|
|
110
110
|
defaultNS: s
|
|
111
|
-
} =
|
|
111
|
+
} = e1(s2) || {}, a = e || l || l2();
|
|
112
112
|
if (a && !a.reportNamespaces && (a.reportNamespaces = new n2()), !a) {
|
|
113
113
|
N1("You will need to pass in an i18next instance by using initReactI18next");
|
|
114
|
-
const V = (H, M) =>
|
|
115
|
-
return
|
|
114
|
+
const V = (H, M) => Q(M) ? M : q1(M) && Q(M.defaultValue) ? M.defaultValue : Array.isArray(H) ? H[H.length - 1] : H, v = [V, {}, !1];
|
|
115
|
+
return v.t = V, v.i18n = {}, v.ready = !1, v;
|
|
116
116
|
}
|
|
117
117
|
a.options.react && a.options.react.wait !== void 0 && N1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
118
118
|
const w = {
|
|
@@ -124,36 +124,36 @@ const C2 = (o, i) => {
|
|
|
124
124
|
keyPrefix: h
|
|
125
125
|
} = w;
|
|
126
126
|
let n = o;
|
|
127
|
-
n =
|
|
128
|
-
const C = (a.isInitialized || a.initializedStoreOnce) && n.every((V) => U1(V, a, w)),
|
|
129
|
-
let
|
|
130
|
-
i.lng && (
|
|
131
|
-
const p = C2(
|
|
132
|
-
|
|
127
|
+
n = Q(n) ? [n] : n || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(n);
|
|
128
|
+
const C = (a.isInitialized || a.initializedStoreOnce) && n.every((V) => U1(V, a, w)), _ = h2(a, i.lng || null, w.nsMode === "fallback" ? n : n[0], h), R = () => _, L = () => D1(a, i.lng || null, w.nsMode === "fallback" ? n : n[0], h), [u, k] = Z(R);
|
|
129
|
+
let f = n.join();
|
|
130
|
+
i.lng && (f = `${i.lng}${f}`);
|
|
131
|
+
const p = C2(f), E = T(!0);
|
|
132
|
+
B(() => {
|
|
133
133
|
const {
|
|
134
134
|
bindI18n: V,
|
|
135
|
-
bindI18nStore:
|
|
135
|
+
bindI18nStore: v
|
|
136
136
|
} = w;
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
E.current = !0, !C && !d && (i.lng ? _1(a, i.lng, n, () => {
|
|
138
|
+
E.current && k(L);
|
|
139
139
|
}) : Z1(a, n, () => {
|
|
140
|
-
|
|
141
|
-
})), C && p && p !==
|
|
140
|
+
E.current && k(L);
|
|
141
|
+
})), C && p && p !== f && E.current && k(L);
|
|
142
142
|
const H = () => {
|
|
143
|
-
|
|
143
|
+
E.current && k(L);
|
|
144
144
|
};
|
|
145
|
-
return V && a && a.on(V, H),
|
|
146
|
-
|
|
145
|
+
return V && a && a.on(V, H), v && a && a.store.on(v, H), () => {
|
|
146
|
+
E.current = !1, V && a && V.split(" ").forEach((M) => a.off(M, H)), v && a && v.split(" ").forEach((M) => a.store.off(M, H));
|
|
147
147
|
};
|
|
148
|
-
}, [a,
|
|
149
|
-
|
|
148
|
+
}, [a, f]), B(() => {
|
|
149
|
+
E.current && C && k(R);
|
|
150
150
|
}, [a, h, C]);
|
|
151
|
-
const O = [
|
|
152
|
-
if (O.t =
|
|
151
|
+
const O = [u, a, C];
|
|
152
|
+
if (O.t = u, O.i18n = a, O.ready = C, C || !C && !d) return O;
|
|
153
153
|
throw new Promise((V) => {
|
|
154
154
|
i.lng ? _1(a, i.lng, n, () => V()) : Z1(a, n, () => V());
|
|
155
155
|
});
|
|
156
|
-
},
|
|
156
|
+
}, a1 = ({
|
|
157
157
|
children: o,
|
|
158
158
|
direction: i = "row",
|
|
159
159
|
flexWrap: e = "nowrap",
|
|
@@ -175,12 +175,12 @@ const C2 = (o, i) => {
|
|
|
175
175
|
style: { padding: d },
|
|
176
176
|
children: o
|
|
177
177
|
}
|
|
178
|
-
), { Title: c2, Text: a2 } =
|
|
178
|
+
), { Title: c2, Text: a2 } = d1, d2 = {
|
|
179
179
|
h1: 1,
|
|
180
180
|
h2: 2,
|
|
181
181
|
h3: 3,
|
|
182
182
|
h4: 4
|
|
183
|
-
}, V1 =
|
|
183
|
+
}, V1 = X(
|
|
184
184
|
({
|
|
185
185
|
align: o = "inherit",
|
|
186
186
|
variant: i = "body1",
|
|
@@ -193,16 +193,16 @@ const C2 = (o, i) => {
|
|
|
193
193
|
trim: d = !1
|
|
194
194
|
}, h) => {
|
|
195
195
|
const n = T(null);
|
|
196
|
-
|
|
197
|
-
const [C,
|
|
198
|
-
|
|
196
|
+
s1(h, () => n.current);
|
|
197
|
+
const [C, _] = Z(!1);
|
|
198
|
+
B(() => {
|
|
199
199
|
var k;
|
|
200
200
|
if (!d) return;
|
|
201
|
-
const
|
|
202
|
-
n.current &&
|
|
201
|
+
const f = () => {
|
|
202
|
+
n.current && _(n.current.scrollWidth > n.current.clientWidth);
|
|
203
203
|
};
|
|
204
|
-
|
|
205
|
-
const p = new ResizeObserver(
|
|
204
|
+
f();
|
|
205
|
+
const p = new ResizeObserver(f);
|
|
206
206
|
return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
|
|
207
207
|
p.disconnect();
|
|
208
208
|
};
|
|
@@ -210,7 +210,7 @@ const C2 = (o, i) => {
|
|
|
210
210
|
const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
|
|
211
211
|
let L = `snmt-typography snmt-typography-${i}`;
|
|
212
212
|
o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
|
|
213
|
-
const
|
|
213
|
+
const u = {
|
|
214
214
|
className: L,
|
|
215
215
|
style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
|
|
216
216
|
onClick: s,
|
|
@@ -222,7 +222,7 @@ const C2 = (o, i) => {
|
|
|
222
222
|
}
|
|
223
223
|
} : void 0
|
|
224
224
|
};
|
|
225
|
-
return R ? /* @__PURE__ */ t(c2, { level: d2[i], ...
|
|
225
|
+
return R ? /* @__PURE__ */ t(c2, { level: d2[i], ...u, children: l }) : /* @__PURE__ */ t(a2, { ...u, children: l });
|
|
226
226
|
}
|
|
227
227
|
), w2 = ({ label: o, variant: i = "small", src: e, fallbackText: l }) => {
|
|
228
228
|
const s = e != null && e.trim() ? e : void 0, a = {
|
|
@@ -267,12 +267,12 @@ const C2 = (o, i) => {
|
|
|
267
267
|
]
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
|
-
}, { Title: g2, Text: L2 } =
|
|
270
|
+
}, { Title: g2, Text: L2 } = d1, k2 = {
|
|
271
271
|
h1: 1,
|
|
272
272
|
h2: 2,
|
|
273
273
|
h3: 3,
|
|
274
274
|
h4: 4
|
|
275
|
-
}, p2 =
|
|
275
|
+
}, p2 = X(
|
|
276
276
|
({
|
|
277
277
|
align: o = "inherit",
|
|
278
278
|
variant: i = "body1",
|
|
@@ -285,16 +285,16 @@ const C2 = (o, i) => {
|
|
|
285
285
|
trim: d = !1
|
|
286
286
|
}, h) => {
|
|
287
287
|
const n = T(null);
|
|
288
|
-
|
|
289
|
-
const [C,
|
|
290
|
-
|
|
288
|
+
s1(h, () => n.current);
|
|
289
|
+
const [C, _] = Z(!1);
|
|
290
|
+
B(() => {
|
|
291
291
|
var k;
|
|
292
292
|
if (!d) return;
|
|
293
|
-
const
|
|
294
|
-
n.current &&
|
|
293
|
+
const f = () => {
|
|
294
|
+
n.current && _(n.current.scrollWidth > n.current.clientWidth);
|
|
295
295
|
};
|
|
296
|
-
|
|
297
|
-
const p = new ResizeObserver(
|
|
296
|
+
f();
|
|
297
|
+
const p = new ResizeObserver(f);
|
|
298
298
|
return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
|
|
299
299
|
p.disconnect();
|
|
300
300
|
};
|
|
@@ -302,7 +302,7 @@ const C2 = (o, i) => {
|
|
|
302
302
|
const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
|
|
303
303
|
let L = `snmt-typography snmt-typography-${i}`;
|
|
304
304
|
o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
|
|
305
|
-
const
|
|
305
|
+
const u = {
|
|
306
306
|
className: L,
|
|
307
307
|
style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
|
|
308
308
|
onClick: s,
|
|
@@ -314,7 +314,7 @@ const C2 = (o, i) => {
|
|
|
314
314
|
}
|
|
315
315
|
} : void 0
|
|
316
316
|
};
|
|
317
|
-
return R ? /* @__PURE__ */ t(g2, { level: k2[i], ...
|
|
317
|
+
return R ? /* @__PURE__ */ t(g2, { level: k2[i], ...u, children: l }) : /* @__PURE__ */ t(L2, { ...u, children: l });
|
|
318
318
|
}
|
|
319
319
|
), m2 = ({
|
|
320
320
|
checked: o = !0,
|
|
@@ -324,19 +324,19 @@ const C2 = (o, i) => {
|
|
|
324
324
|
disabled: s = !1,
|
|
325
325
|
disableUncheck: a = !1
|
|
326
326
|
}) => {
|
|
327
|
-
const [w, d] =
|
|
328
|
-
|
|
327
|
+
const [w, d] = Z(o), [h, n] = Z(i);
|
|
328
|
+
B(() => {
|
|
329
329
|
d(o), n(i);
|
|
330
330
|
}, [o, i]);
|
|
331
|
-
const { theme: C } =
|
|
331
|
+
const { theme: C } = e1(n1);
|
|
332
332
|
return /* @__PURE__ */ t(
|
|
333
333
|
I1,
|
|
334
334
|
{
|
|
335
335
|
className: `snmt-checkbox snmt-checkbox-${C}`,
|
|
336
336
|
checked: w,
|
|
337
337
|
indeterminate: h,
|
|
338
|
-
onChange: (
|
|
339
|
-
a && w || (n(!1), d(
|
|
338
|
+
onChange: (_) => {
|
|
339
|
+
a && w || (n(!1), d(_.target.checked), l && l(_));
|
|
340
340
|
},
|
|
341
341
|
disabled: s,
|
|
342
342
|
children: e && /* @__PURE__ */ t(
|
|
@@ -820,7 +820,7 @@ const C2 = (o, i) => {
|
|
|
820
820
|
)
|
|
821
821
|
]
|
|
822
822
|
}
|
|
823
|
-
),
|
|
823
|
+
), G2 = ({
|
|
824
824
|
width: o = 20,
|
|
825
825
|
height: i = 20,
|
|
826
826
|
color: e = r.GREY_DARK_5,
|
|
@@ -860,7 +860,7 @@ const C2 = (o, i) => {
|
|
|
860
860
|
)
|
|
861
861
|
]
|
|
862
862
|
}
|
|
863
|
-
),
|
|
863
|
+
), B2 = ({
|
|
864
864
|
width: o = 20,
|
|
865
865
|
height: i = 20,
|
|
866
866
|
color: e = r.GREY_DARK_5,
|
|
@@ -2597,7 +2597,7 @@ const C2 = (o, i) => {
|
|
|
2597
2597
|
}
|
|
2598
2598
|
)
|
|
2599
2599
|
}
|
|
2600
|
-
),
|
|
2600
|
+
), c1 = ({
|
|
2601
2601
|
name: o,
|
|
2602
2602
|
width: i,
|
|
2603
2603
|
height: e,
|
|
@@ -2606,7 +2606,7 @@ const C2 = (o, i) => {
|
|
|
2606
2606
|
disabled: a = !1,
|
|
2607
2607
|
onClick: w
|
|
2608
2608
|
}) => {
|
|
2609
|
-
const { theme: d } =
|
|
2609
|
+
const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
|
|
2610
2610
|
return /* @__PURE__ */ t(F, { children: (() => {
|
|
2611
2611
|
switch (o) {
|
|
2612
2612
|
case "nextIcon":
|
|
@@ -2634,9 +2634,9 @@ const C2 = (o, i) => {
|
|
|
2634
2634
|
case "filter":
|
|
2635
2635
|
return D2({ width: i, height: e, color: h, className: C, onClick: n });
|
|
2636
2636
|
case "attention":
|
|
2637
|
-
return B2({ width: i, height: e, color: h, className: C, onClick: n });
|
|
2638
|
-
case "users":
|
|
2639
2637
|
return G2({ width: i, height: e, color: h, className: C, onClick: n });
|
|
2638
|
+
case "users":
|
|
2639
|
+
return B2({ width: i, height: e, color: h, className: C, onClick: n });
|
|
2640
2640
|
case "mySkillsMatrix":
|
|
2641
2641
|
return K2({
|
|
2642
2642
|
width: i,
|
|
@@ -2783,12 +2783,12 @@ const C2 = (o, i) => {
|
|
|
2783
2783
|
return /* @__PURE__ */ t(F, { children: "No Icon provided" });
|
|
2784
2784
|
}
|
|
2785
2785
|
})() });
|
|
2786
|
-
}, { Title: H5, Text: A5 } =
|
|
2786
|
+
}, { Title: H5, Text: A5 } = d1, E5 = {
|
|
2787
2787
|
h1: 1,
|
|
2788
2788
|
h2: 2,
|
|
2789
2789
|
h3: 3,
|
|
2790
2790
|
h4: 4
|
|
2791
|
-
}, D5 =
|
|
2791
|
+
}, D5 = X(
|
|
2792
2792
|
({
|
|
2793
2793
|
align: o = "inherit",
|
|
2794
2794
|
variant: i = "body1",
|
|
@@ -2801,16 +2801,16 @@ const C2 = (o, i) => {
|
|
|
2801
2801
|
trim: d = !1
|
|
2802
2802
|
}, h) => {
|
|
2803
2803
|
const n = T(null);
|
|
2804
|
-
|
|
2805
|
-
const [C,
|
|
2806
|
-
|
|
2804
|
+
s1(h, () => n.current);
|
|
2805
|
+
const [C, _] = Z(!1);
|
|
2806
|
+
B(() => {
|
|
2807
2807
|
var k;
|
|
2808
2808
|
if (!d) return;
|
|
2809
|
-
const
|
|
2810
|
-
n.current &&
|
|
2809
|
+
const f = () => {
|
|
2810
|
+
n.current && _(n.current.scrollWidth > n.current.clientWidth);
|
|
2811
2811
|
};
|
|
2812
|
-
|
|
2813
|
-
const p = new ResizeObserver(
|
|
2812
|
+
f();
|
|
2813
|
+
const p = new ResizeObserver(f);
|
|
2814
2814
|
return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
|
|
2815
2815
|
p.disconnect();
|
|
2816
2816
|
};
|
|
@@ -2818,7 +2818,7 @@ const C2 = (o, i) => {
|
|
|
2818
2818
|
const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
|
|
2819
2819
|
let L = `snmt-typography snmt-typography-${i}`;
|
|
2820
2820
|
o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
|
|
2821
|
-
const
|
|
2821
|
+
const u = {
|
|
2822
2822
|
className: L,
|
|
2823
2823
|
style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
|
|
2824
2824
|
onClick: s,
|
|
@@ -2830,9 +2830,9 @@ const C2 = (o, i) => {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
} : void 0
|
|
2832
2832
|
};
|
|
2833
|
-
return R ? /* @__PURE__ */ t(H5, { level: E5[i], ...
|
|
2833
|
+
return R ? /* @__PURE__ */ t(H5, { level: E5[i], ...u, children: l }) : /* @__PURE__ */ t(A5, { ...u, children: l });
|
|
2834
2834
|
}
|
|
2835
|
-
),
|
|
2835
|
+
), G5 = ({
|
|
2836
2836
|
width: o = 20,
|
|
2837
2837
|
height: i = 20,
|
|
2838
2838
|
color: e = "#001E52",
|
|
@@ -2859,7 +2859,7 @@ const C2 = (o, i) => {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
)
|
|
2861
2861
|
}
|
|
2862
|
-
),
|
|
2862
|
+
), B5 = ({
|
|
2863
2863
|
width: o = 20,
|
|
2864
2864
|
height: i = 20,
|
|
2865
2865
|
color: e = r.GREY_DARK_5,
|
|
@@ -4776,7 +4776,7 @@ const C2 = (o, i) => {
|
|
|
4776
4776
|
)
|
|
4777
4777
|
]
|
|
4778
4778
|
}
|
|
4779
|
-
),
|
|
4779
|
+
), G7 = ({
|
|
4780
4780
|
className: o,
|
|
4781
4781
|
color: i = r.GREY_DARK_5,
|
|
4782
4782
|
height: e = 24,
|
|
@@ -4803,7 +4803,7 @@ const C2 = (o, i) => {
|
|
|
4803
4803
|
}
|
|
4804
4804
|
)
|
|
4805
4805
|
}
|
|
4806
|
-
),
|
|
4806
|
+
), B7 = ({
|
|
4807
4807
|
className: o,
|
|
4808
4808
|
color: i = r.GREY_DARK_5,
|
|
4809
4809
|
height: e = 20,
|
|
@@ -5089,7 +5089,7 @@ const C2 = (o, i) => {
|
|
|
5089
5089
|
disabled: a = !1,
|
|
5090
5090
|
onClick: w
|
|
5091
5091
|
}) => {
|
|
5092
|
-
const { theme: d } =
|
|
5092
|
+
const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
|
|
5093
5093
|
return /* @__PURE__ */ t(F, { children: (() => {
|
|
5094
5094
|
switch (o) {
|
|
5095
5095
|
case "nextIcon":
|
|
@@ -5097,9 +5097,9 @@ const C2 = (o, i) => {
|
|
|
5097
5097
|
case "prevIcon":
|
|
5098
5098
|
return g7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5099
5099
|
case "arrowDown":
|
|
5100
|
-
return B5({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5101
|
-
case "info":
|
|
5102
5100
|
return G5({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5101
|
+
case "info":
|
|
5102
|
+
return B5({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5103
5103
|
case "arrowRight":
|
|
5104
5104
|
return K5({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5105
5105
|
case "calendar":
|
|
@@ -5243,9 +5243,9 @@ const C2 = (o, i) => {
|
|
|
5243
5243
|
case "image":
|
|
5244
5244
|
return D7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5245
5245
|
case "edit":
|
|
5246
|
-
return B7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5247
|
-
case "filledArrowRight":
|
|
5248
5246
|
return G7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5247
|
+
case "filledArrowRight":
|
|
5248
|
+
return B7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5249
5249
|
case "burgerMenu":
|
|
5250
5250
|
return K7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
5251
5251
|
case "refresh":
|
|
@@ -5266,7 +5266,7 @@ const C2 = (o, i) => {
|
|
|
5266
5266
|
return /* @__PURE__ */ t(F, { children: "No Icon provided" });
|
|
5267
5267
|
}
|
|
5268
5268
|
})() });
|
|
5269
|
-
},
|
|
5269
|
+
}, G1 = ({
|
|
5270
5270
|
children: o,
|
|
5271
5271
|
width: i,
|
|
5272
5272
|
size: e = "small",
|
|
@@ -5304,12 +5304,12 @@ const C2 = (o, i) => {
|
|
|
5304
5304
|
) : o
|
|
5305
5305
|
}
|
|
5306
5306
|
);
|
|
5307
|
-
}, { Title: S7, Text: F7 } =
|
|
5307
|
+
}, { Title: S7, Text: F7 } = d1, $7 = {
|
|
5308
5308
|
h1: 1,
|
|
5309
5309
|
h2: 2,
|
|
5310
5310
|
h3: 3,
|
|
5311
5311
|
h4: 4
|
|
5312
|
-
}, P7 =
|
|
5312
|
+
}, P7 = X(
|
|
5313
5313
|
({
|
|
5314
5314
|
align: o = "inherit",
|
|
5315
5315
|
variant: i = "body1",
|
|
@@ -5322,16 +5322,16 @@ const C2 = (o, i) => {
|
|
|
5322
5322
|
trim: d = !1
|
|
5323
5323
|
}, h) => {
|
|
5324
5324
|
const n = T(null);
|
|
5325
|
-
|
|
5326
|
-
const [C,
|
|
5327
|
-
|
|
5325
|
+
s1(h, () => n.current);
|
|
5326
|
+
const [C, _] = Z(!1);
|
|
5327
|
+
B(() => {
|
|
5328
5328
|
var k;
|
|
5329
5329
|
if (!d) return;
|
|
5330
|
-
const
|
|
5331
|
-
n.current &&
|
|
5330
|
+
const f = () => {
|
|
5331
|
+
n.current && _(n.current.scrollWidth > n.current.clientWidth);
|
|
5332
5332
|
};
|
|
5333
|
-
|
|
5334
|
-
const p = new ResizeObserver(
|
|
5333
|
+
f();
|
|
5334
|
+
const p = new ResizeObserver(f);
|
|
5335
5335
|
return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
|
|
5336
5336
|
p.disconnect();
|
|
5337
5337
|
};
|
|
@@ -5339,7 +5339,7 @@ const C2 = (o, i) => {
|
|
|
5339
5339
|
const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
|
|
5340
5340
|
let L = `snmt-typography snmt-typography-${i}`;
|
|
5341
5341
|
o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
|
|
5342
|
-
const
|
|
5342
|
+
const u = {
|
|
5343
5343
|
className: L,
|
|
5344
5344
|
style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
|
|
5345
5345
|
onClick: s,
|
|
@@ -5351,7 +5351,7 @@ const C2 = (o, i) => {
|
|
|
5351
5351
|
}
|
|
5352
5352
|
} : void 0
|
|
5353
5353
|
};
|
|
5354
|
-
return R ? /* @__PURE__ */ t(S7, { level: $7[i], ...
|
|
5354
|
+
return R ? /* @__PURE__ */ t(S7, { level: $7[i], ...u, children: l }) : /* @__PURE__ */ t(F7, { ...u, children: l });
|
|
5355
5355
|
}
|
|
5356
5356
|
), z7 = ({
|
|
5357
5357
|
children: o,
|
|
@@ -5362,7 +5362,7 @@ const C2 = (o, i) => {
|
|
|
5362
5362
|
noPadding: a = !1,
|
|
5363
5363
|
trigger: w = "click"
|
|
5364
5364
|
}) => {
|
|
5365
|
-
const [d, h] =
|
|
5365
|
+
const [d, h] = Z(!1);
|
|
5366
5366
|
return /* @__PURE__ */ t(
|
|
5367
5367
|
T1,
|
|
5368
5368
|
{
|
|
@@ -5378,12 +5378,12 @@ const C2 = (o, i) => {
|
|
|
5378
5378
|
children: /* @__PURE__ */ t("div", { className: "wrapper", children: o })
|
|
5379
5379
|
}
|
|
5380
5380
|
);
|
|
5381
|
-
}, { Title: U7, Text: q7 } =
|
|
5381
|
+
}, { Title: U7, Text: q7 } = d1, J7 = {
|
|
5382
5382
|
h1: 1,
|
|
5383
5383
|
h2: 2,
|
|
5384
5384
|
h3: 3,
|
|
5385
5385
|
h4: 4
|
|
5386
|
-
},
|
|
5386
|
+
}, B1 = X(
|
|
5387
5387
|
({
|
|
5388
5388
|
align: o = "inherit",
|
|
5389
5389
|
variant: i = "body1",
|
|
@@ -5396,16 +5396,16 @@ const C2 = (o, i) => {
|
|
|
5396
5396
|
trim: d = !1
|
|
5397
5397
|
}, h) => {
|
|
5398
5398
|
const n = T(null);
|
|
5399
|
-
|
|
5400
|
-
const [C,
|
|
5401
|
-
|
|
5399
|
+
s1(h, () => n.current);
|
|
5400
|
+
const [C, _] = Z(!1);
|
|
5401
|
+
B(() => {
|
|
5402
5402
|
var k;
|
|
5403
5403
|
if (!d) return;
|
|
5404
|
-
const
|
|
5405
|
-
n.current &&
|
|
5404
|
+
const f = () => {
|
|
5405
|
+
n.current && _(n.current.scrollWidth > n.current.clientWidth);
|
|
5406
5406
|
};
|
|
5407
|
-
|
|
5408
|
-
const p = new ResizeObserver(
|
|
5407
|
+
f();
|
|
5408
|
+
const p = new ResizeObserver(f);
|
|
5409
5409
|
return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
|
|
5410
5410
|
p.disconnect();
|
|
5411
5411
|
};
|
|
@@ -5413,7 +5413,7 @@ const C2 = (o, i) => {
|
|
|
5413
5413
|
const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
|
|
5414
5414
|
let L = `snmt-typography snmt-typography-${i}`;
|
|
5415
5415
|
o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
|
|
5416
|
-
const
|
|
5416
|
+
const u = {
|
|
5417
5417
|
className: L,
|
|
5418
5418
|
style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
|
|
5419
5419
|
onClick: s,
|
|
@@ -5425,7 +5425,7 @@ const C2 = (o, i) => {
|
|
|
5425
5425
|
}
|
|
5426
5426
|
} : void 0
|
|
5427
5427
|
};
|
|
5428
|
-
return R ? /* @__PURE__ */ t(U7, { level: J7[i], ...
|
|
5428
|
+
return R ? /* @__PURE__ */ t(U7, { level: J7[i], ...u, children: l }) : /* @__PURE__ */ t(q7, { ...u, children: l });
|
|
5429
5429
|
}
|
|
5430
5430
|
), Q7 = ({
|
|
5431
5431
|
width: o = 20,
|
|
@@ -6635,7 +6635,7 @@ const C2 = (o, i) => {
|
|
|
6635
6635
|
}
|
|
6636
6636
|
)
|
|
6637
6637
|
}
|
|
6638
|
-
),
|
|
6638
|
+
), G0 = ({
|
|
6639
6639
|
className: o,
|
|
6640
6640
|
color: i = r.GREY_DARK_5,
|
|
6641
6641
|
height: e = 20,
|
|
@@ -6662,7 +6662,7 @@ const C2 = (o, i) => {
|
|
|
6662
6662
|
}
|
|
6663
6663
|
)
|
|
6664
6664
|
}
|
|
6665
|
-
),
|
|
6665
|
+
), B0 = ({
|
|
6666
6666
|
className: o,
|
|
6667
6667
|
color: i = r.GREY_DARK_5,
|
|
6668
6668
|
height: e = 5,
|
|
@@ -7675,7 +7675,7 @@ const C2 = (o, i) => {
|
|
|
7675
7675
|
}
|
|
7676
7676
|
)
|
|
7677
7677
|
}
|
|
7678
|
-
),
|
|
7678
|
+
), v1 = ({
|
|
7679
7679
|
name: o,
|
|
7680
7680
|
width: i,
|
|
7681
7681
|
height: e,
|
|
@@ -7684,13 +7684,13 @@ const C2 = (o, i) => {
|
|
|
7684
7684
|
disabled: a = !1,
|
|
7685
7685
|
onClick: w
|
|
7686
7686
|
}) => {
|
|
7687
|
-
const { theme: d } =
|
|
7687
|
+
const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
|
|
7688
7688
|
return /* @__PURE__ */ t(F, { children: (() => {
|
|
7689
7689
|
switch (o) {
|
|
7690
7690
|
case "nextIcon":
|
|
7691
7691
|
return D0({ width: i, height: e, color: h, className: C, onClick: n });
|
|
7692
7692
|
case "prevIcon":
|
|
7693
|
-
return
|
|
7693
|
+
return G0({ width: i, height: e, color: h, className: C, onClick: n });
|
|
7694
7694
|
case "arrowDown":
|
|
7695
7695
|
return Q7({ width: i, height: e, color: h, className: C, onClick: n });
|
|
7696
7696
|
case "info":
|
|
@@ -7796,7 +7796,7 @@ const C2 = (o, i) => {
|
|
|
7796
7796
|
case "arrowUpFilled":
|
|
7797
7797
|
return K0({ width: i, height: e, color: h, className: C, onClick: n });
|
|
7798
7798
|
case "arrowDownFilled":
|
|
7799
|
-
return
|
|
7799
|
+
return B0({ width: i, height: e, color: h, className: C, onClick: n });
|
|
7800
7800
|
case "arrow2Up":
|
|
7801
7801
|
return i0({ width: i, height: e, color: h, className: C, onClick: n });
|
|
7802
7802
|
case "arrow2Right":
|
|
@@ -7884,7 +7884,7 @@ const C2 = (o, i) => {
|
|
|
7884
7884
|
background: w[a],
|
|
7885
7885
|
width: l ?? "fit-content"
|
|
7886
7886
|
},
|
|
7887
|
-
children: /* @__PURE__ */ t(
|
|
7887
|
+
children: /* @__PURE__ */ t(B1, { variant: s, color: r.GREY_DARK_4, children: o })
|
|
7888
7888
|
}
|
|
7889
7889
|
);
|
|
7890
7890
|
}, r9 = ({
|
|
@@ -7895,7 +7895,7 @@ const C2 = (o, i) => {
|
|
|
7895
7895
|
}) => {
|
|
7896
7896
|
const s = {
|
|
7897
7897
|
approved: /* @__PURE__ */ t(
|
|
7898
|
-
|
|
7898
|
+
v1,
|
|
7899
7899
|
{
|
|
7900
7900
|
name: "checkCircle",
|
|
7901
7901
|
width: 14,
|
|
@@ -7903,9 +7903,9 @@ const C2 = (o, i) => {
|
|
|
7903
7903
|
color: r.NOTIFICATION_SUCCESS_DARK
|
|
7904
7904
|
}
|
|
7905
7905
|
),
|
|
7906
|
-
pending: /* @__PURE__ */ t(
|
|
7906
|
+
pending: /* @__PURE__ */ t(v1, { name: "history", width: 14, height: 14, color: r.NOTIFICATION_WARNING_DARK }),
|
|
7907
7907
|
rejected: /* @__PURE__ */ t(
|
|
7908
|
-
|
|
7908
|
+
v1,
|
|
7909
7909
|
{
|
|
7910
7910
|
name: "cancelCircle",
|
|
7911
7911
|
width: 14,
|
|
@@ -7913,7 +7913,7 @@ const C2 = (o, i) => {
|
|
|
7913
7913
|
color: r.NOTIFICATION_ERROR_DARK
|
|
7914
7914
|
}
|
|
7915
7915
|
),
|
|
7916
|
-
canceled: /* @__PURE__ */ t(
|
|
7916
|
+
canceled: /* @__PURE__ */ t(v1, { name: "cancelCircle", width: 14, height: 14, color: r.GREY_DARK_2 })
|
|
7917
7917
|
}, a = {
|
|
7918
7918
|
approved: r.NOTIFICATION_SUCCESS_LIGHT,
|
|
7919
7919
|
pending: r.NOTIFICATION_WARNING_LIGHT,
|
|
@@ -7932,7 +7932,7 @@ const C2 = (o, i) => {
|
|
|
7932
7932
|
style: { background: a[i], width: l ?? "fit-content" },
|
|
7933
7933
|
children: [
|
|
7934
7934
|
e && s[i],
|
|
7935
|
-
/* @__PURE__ */ t(
|
|
7935
|
+
/* @__PURE__ */ t(B1, { variant: "body4", color: w[i], children: o })
|
|
7936
7936
|
]
|
|
7937
7937
|
}
|
|
7938
7938
|
);
|
|
@@ -7958,22 +7958,22 @@ const a9 = ({
|
|
|
7958
7958
|
extraOptions: w,
|
|
7959
7959
|
selectedItemVariant: d = "default"
|
|
7960
7960
|
}) => {
|
|
7961
|
-
const { locale: h } =
|
|
7962
|
-
if (
|
|
7963
|
-
o.length ||
|
|
7961
|
+
const { locale: h } = e1(n1), { t: n } = r2("common", { lng: h }), [C, _] = Z(!1);
|
|
7962
|
+
if (B(() => {
|
|
7963
|
+
o.length || _(!1);
|
|
7964
7964
|
}, [o]), !o.length)
|
|
7965
7965
|
return null;
|
|
7966
7966
|
const R = (L) => {
|
|
7967
|
-
var
|
|
7968
|
-
return ((
|
|
7967
|
+
var u, k;
|
|
7968
|
+
return ((u = a == null ? void 0 : a.find((p) => p.value === L)) == null ? void 0 : u.label) || ((k = w == null ? void 0 : w.find((p) => p.value === L)) == null ? void 0 : k.label) || L;
|
|
7969
7969
|
};
|
|
7970
7970
|
return /* @__PURE__ */ c(
|
|
7971
7971
|
z7,
|
|
7972
7972
|
{
|
|
7973
7973
|
content: (
|
|
7974
7974
|
// 90: paddings + margins + gaps and so on
|
|
7975
|
-
/* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(
|
|
7976
|
-
const
|
|
7975
|
+
/* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(a1, { gap: 6, flexWrap: "wrap", children: o.map(({ value: L }) => {
|
|
7976
|
+
const u = d === "badge" && a.find(
|
|
7977
7977
|
(k) => k.label === R(L)
|
|
7978
7978
|
);
|
|
7979
7979
|
return d === "badge" ? /* @__PURE__ */ t(
|
|
@@ -7981,12 +7981,12 @@ const a9 = ({
|
|
|
7981
7981
|
{
|
|
7982
7982
|
variant: "regular",
|
|
7983
7983
|
size: "small",
|
|
7984
|
-
color:
|
|
7984
|
+
color: u ? u.color : void 0,
|
|
7985
7985
|
text: R(L)
|
|
7986
7986
|
},
|
|
7987
7987
|
L
|
|
7988
7988
|
) : /* @__PURE__ */ t(
|
|
7989
|
-
|
|
7989
|
+
G1,
|
|
7990
7990
|
{
|
|
7991
7991
|
onClose: () => i(L),
|
|
7992
7992
|
closable: l,
|
|
@@ -7999,7 +7999,7 @@ const a9 = ({
|
|
|
7999
7999
|
),
|
|
8000
8000
|
placement: "bottomRight",
|
|
8001
8001
|
isOpen: C,
|
|
8002
|
-
setIsOpen:
|
|
8002
|
+
setIsOpen: _,
|
|
8003
8003
|
children: [
|
|
8004
8004
|
o.length,
|
|
8005
8005
|
" ",
|
|
@@ -8744,7 +8744,7 @@ const a9 = ({
|
|
|
8744
8744
|
)
|
|
8745
8745
|
]
|
|
8746
8746
|
}
|
|
8747
|
-
),
|
|
8747
|
+
), G9 = ({
|
|
8748
8748
|
width: o = 20,
|
|
8749
8749
|
height: i = 20,
|
|
8750
8750
|
color: e = r.GREY_DARK_5,
|
|
@@ -8777,7 +8777,7 @@ const a9 = ({
|
|
|
8777
8777
|
)
|
|
8778
8778
|
]
|
|
8779
8779
|
}
|
|
8780
|
-
),
|
|
8780
|
+
), B9 = ({
|
|
8781
8781
|
width: o = 20,
|
|
8782
8782
|
height: i = 20,
|
|
8783
8783
|
color: e = r.GREY_DARK_5,
|
|
@@ -10276,7 +10276,7 @@ const a9 = ({
|
|
|
10276
10276
|
disabled: a = !1,
|
|
10277
10277
|
onClick: w
|
|
10278
10278
|
}) => {
|
|
10279
|
-
const { theme: d } =
|
|
10279
|
+
const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
|
|
10280
10280
|
return /* @__PURE__ */ t(F, { children: (() => {
|
|
10281
10281
|
switch (o) {
|
|
10282
10282
|
case "nextIcon":
|
|
@@ -10328,9 +10328,9 @@ const a9 = ({
|
|
|
10328
10328
|
case "history":
|
|
10329
10329
|
return D9({ width: i, height: e, color: h, className: C, onClick: n });
|
|
10330
10330
|
case "logOut":
|
|
10331
|
-
return B9({ width: i, height: e, color: h, className: C, onClick: n });
|
|
10332
|
-
case "settings":
|
|
10333
10331
|
return G9({ width: i, height: e, color: h, className: C, onClick: n });
|
|
10332
|
+
case "settings":
|
|
10333
|
+
return B9({ width: i, height: e, color: h, className: C, onClick: n });
|
|
10334
10334
|
case "trash":
|
|
10335
10335
|
return K9({ width: i, height: e, color: h, className: C, onClick: n });
|
|
10336
10336
|
case "settings2":
|
|
@@ -10484,7 +10484,7 @@ function x4(o, i) {
|
|
|
10484
10484
|
function Z4(o, i) {
|
|
10485
10485
|
return i ? r.GREY_DARK_2 : o ? r.GREY_LIGHT_0 : r.GREY_DARK_4;
|
|
10486
10486
|
}
|
|
10487
|
-
const _4 =
|
|
10487
|
+
const _4 = X((o, i) => {
|
|
10488
10488
|
const {
|
|
10489
10489
|
value: e,
|
|
10490
10490
|
onChange: l,
|
|
@@ -10495,49 +10495,49 @@ const _4 = Q((o, i) => {
|
|
|
10495
10495
|
width: h,
|
|
10496
10496
|
disabled: n = !1,
|
|
10497
10497
|
required: C = !1,
|
|
10498
|
-
clearable:
|
|
10498
|
+
clearable: _ = !0,
|
|
10499
10499
|
scrollThresholdValue: R = 50,
|
|
10500
10500
|
onSearchChange: L,
|
|
10501
|
-
onDropdownVisibleChange:
|
|
10501
|
+
onDropdownVisibleChange: u,
|
|
10502
10502
|
onScrollToEnd: k,
|
|
10503
|
-
onPopupScroll:
|
|
10503
|
+
onPopupScroll: f,
|
|
10504
10504
|
id: p,
|
|
10505
|
-
extraOptions:
|
|
10505
|
+
extraOptions: E,
|
|
10506
10506
|
dropdownRender: O,
|
|
10507
10507
|
optionRender: V,
|
|
10508
|
-
isLoading:
|
|
10508
|
+
isLoading: v,
|
|
10509
10509
|
readOnly: H,
|
|
10510
10510
|
error: M,
|
|
10511
|
-
selectedItemVariant:
|
|
10512
|
-
variant:
|
|
10511
|
+
selectedItemVariant: D = "default",
|
|
10512
|
+
variant: Y = "outlined"
|
|
10513
10513
|
} = o;
|
|
10514
|
-
let
|
|
10515
|
-
a && a !== "single" && (
|
|
10516
|
-
const [b, P] =
|
|
10517
|
-
|
|
10514
|
+
let i1;
|
|
10515
|
+
a && a !== "single" && (i1 = o.overflowBehaviour ?? "responsive");
|
|
10516
|
+
const [b, P] = Z(!1), [z, w1] = Z(!1), [S, C1] = Z(!1), [h1, t1] = Z(!0), [x, U] = Z(e), r1 = T(null);
|
|
10517
|
+
B(() => {
|
|
10518
10518
|
U(e);
|
|
10519
10519
|
}, [e]);
|
|
10520
|
-
const
|
|
10521
|
-
P(g),
|
|
10522
|
-
},
|
|
10523
|
-
var
|
|
10524
|
-
return !!((
|
|
10525
|
-
}, L1 = () => {
|
|
10526
|
-
d1(!0);
|
|
10520
|
+
const g1 = (g) => {
|
|
10521
|
+
P(g), u && u(g);
|
|
10522
|
+
}, L1 = (g, m) => {
|
|
10523
|
+
var A;
|
|
10524
|
+
return !!((A = m == null ? void 0 : m.label) != null && A.toString().toLowerCase().includes(g.toLowerCase()));
|
|
10527
10525
|
}, k1 = () => {
|
|
10528
|
-
|
|
10526
|
+
w1(!0);
|
|
10527
|
+
}, p1 = () => {
|
|
10528
|
+
w1(!1);
|
|
10529
10529
|
}, $ = I(
|
|
10530
10530
|
(g) => {
|
|
10531
10531
|
if (U(g), a && a !== "single") {
|
|
10532
|
-
const
|
|
10533
|
-
l == null || l(
|
|
10532
|
+
const A = g;
|
|
10533
|
+
l == null || l(A);
|
|
10534
10534
|
return;
|
|
10535
10535
|
}
|
|
10536
|
-
let
|
|
10537
|
-
Array.isArray(g) &&
|
|
10536
|
+
let m = null;
|
|
10537
|
+
Array.isArray(g) && D === "badge" ? m = g.length > 0 ? g[0] : null : Array.isArray(g) || (m = g || null), l == null || l(m);
|
|
10538
10538
|
},
|
|
10539
|
-
[a, l,
|
|
10540
|
-
),
|
|
10539
|
+
[a, l, D]
|
|
10540
|
+
), m1 = I(() => {
|
|
10541
10541
|
if (!(H || n)) {
|
|
10542
10542
|
if (a) {
|
|
10543
10543
|
$([]);
|
|
@@ -10545,71 +10545,71 @@ const _4 = Q((o, i) => {
|
|
|
10545
10545
|
}
|
|
10546
10546
|
$("");
|
|
10547
10547
|
}
|
|
10548
|
-
}, [n, $, a, H]),
|
|
10548
|
+
}, [n, $, a, H]), J = I(
|
|
10549
10549
|
(g) => {
|
|
10550
|
-
const
|
|
10551
|
-
$(
|
|
10550
|
+
const m = x.filter((A) => A !== g);
|
|
10551
|
+
$(m), U(m);
|
|
10552
10552
|
},
|
|
10553
|
-
[$,
|
|
10554
|
-
),
|
|
10555
|
-
(g) => (
|
|
10553
|
+
[$, x]
|
|
10554
|
+
), u1 = I(
|
|
10555
|
+
(g) => (x == null ? void 0 : x.indexOf(g)) === 0 ? (
|
|
10556
10556
|
// if the search input is empty
|
|
10557
10557
|
// then display the placeholder, else do not display it
|
|
10558
|
-
/* @__PURE__ */ t("span", { className: "custom-placeholder", children:
|
|
10558
|
+
/* @__PURE__ */ t("span", { className: "custom-placeholder", children: h1 ? s : "" })
|
|
10559
10559
|
) : /* @__PURE__ */ t(F, {}),
|
|
10560
|
-
[
|
|
10561
|
-
),
|
|
10560
|
+
[h1, x, s]
|
|
10561
|
+
), N = (g) => {
|
|
10562
10562
|
g.preventDefault(), g.stopPropagation();
|
|
10563
|
-
},
|
|
10564
|
-
const { target:
|
|
10565
|
-
|
|
10563
|
+
}, G = async (g) => {
|
|
10564
|
+
const { target: m } = g;
|
|
10565
|
+
m.scrollTop + m.offsetHeight >= m.scrollHeight - R && (k == null || k(!0)), f && await f(g);
|
|
10566
10566
|
}, j = I(
|
|
10567
10567
|
(g) => {
|
|
10568
|
-
var
|
|
10569
|
-
return ((
|
|
10568
|
+
var m, A;
|
|
10569
|
+
return ((m = d.find((q) => q.value === g)) == null ? void 0 : m.label) || ((A = E == null ? void 0 : E.find((q) => q.value === g)) == null ? void 0 : A.label) || g;
|
|
10570
10570
|
},
|
|
10571
|
-
[
|
|
10572
|
-
),
|
|
10573
|
-
(g,
|
|
10574
|
-
var
|
|
10571
|
+
[E, d]
|
|
10572
|
+
), K = I(
|
|
10573
|
+
(g, m = "default") => {
|
|
10574
|
+
var A;
|
|
10575
10575
|
return /* @__PURE__ */ t(
|
|
10576
10576
|
a9,
|
|
10577
10577
|
{
|
|
10578
10578
|
values: g,
|
|
10579
|
-
onTagClose:
|
|
10580
|
-
maxWidth: ((
|
|
10579
|
+
onTagClose: J,
|
|
10580
|
+
maxWidth: ((A = r1.current) == null ? void 0 : A.clientWidth) || 0,
|
|
10581
10581
|
disabled: n,
|
|
10582
10582
|
closable: !H,
|
|
10583
10583
|
options: d,
|
|
10584
|
-
extraOptions:
|
|
10585
|
-
selectedItemVariant:
|
|
10584
|
+
extraOptions: E,
|
|
10585
|
+
selectedItemVariant: m
|
|
10586
10586
|
}
|
|
10587
10587
|
);
|
|
10588
10588
|
},
|
|
10589
|
-
[n,
|
|
10590
|
-
),
|
|
10591
|
-
({ label: g, value:
|
|
10592
|
-
if (
|
|
10593
|
-
return
|
|
10589
|
+
[n, E, J, d, H]
|
|
10590
|
+
), W = I(
|
|
10591
|
+
({ label: g, value: m, mode: A }) => {
|
|
10592
|
+
if (A === "filter")
|
|
10593
|
+
return u1(m);
|
|
10594
10594
|
{
|
|
10595
|
-
const
|
|
10596
|
-
return /* @__PURE__ */ t("div", { onMouseDown:
|
|
10595
|
+
const o1 = D === "badge" && d.find((Y1) => Y1.label === g), q = typeof g == "object" ? g : j(m);
|
|
10596
|
+
return /* @__PURE__ */ t("div", { onMouseDown: N, className: "tag-wrapper", children: D === "badge" ? /* @__PURE__ */ t(
|
|
10597
10597
|
K1,
|
|
10598
10598
|
{
|
|
10599
10599
|
variant: "regular",
|
|
10600
10600
|
size: "small",
|
|
10601
|
-
color:
|
|
10602
|
-
text:
|
|
10601
|
+
color: o1 ? o1.color : "cyan",
|
|
10602
|
+
text: q
|
|
10603
10603
|
}
|
|
10604
|
-
) : /* @__PURE__ */ t(
|
|
10604
|
+
) : /* @__PURE__ */ t(G1, { onClose: () => J(m), disabled: n, children: q }) });
|
|
10605
10605
|
}
|
|
10606
10606
|
},
|
|
10607
|
-
[n, j,
|
|
10608
|
-
), y = Array.isArray(
|
|
10607
|
+
[n, j, J, u1, D, d]
|
|
10608
|
+
), y = Array.isArray(x) && x.length > 0 || !!x && typeof x == "string" && x.trim() !== "";
|
|
10609
10609
|
return /* @__PURE__ */ c(
|
|
10610
10610
|
"div",
|
|
10611
10611
|
{
|
|
10612
|
-
className: `snmt-select-container ${
|
|
10612
|
+
className: `snmt-select-container ${Y === "borderless" ? "snmt-select-container-borderless" : ""}`,
|
|
10613
10613
|
children: [
|
|
10614
10614
|
/* @__PURE__ */ c(
|
|
10615
10615
|
"div",
|
|
@@ -10617,9 +10617,9 @@ const _4 = Q((o, i) => {
|
|
|
10617
10617
|
className: `snmt-select ${z ? "snmt-select-focused" : ""}
|
|
10618
10618
|
${a ? "" : "snmt-select-single"}
|
|
10619
10619
|
${H ? "snmt-select-read-only" : ""}
|
|
10620
|
-
${
|
|
10621
|
-
${
|
|
10622
|
-
ref:
|
|
10620
|
+
${i1 === "static" ? "snmt-select-static" : ""}
|
|
10621
|
+
${Y === "borderless" ? "snmt-select-borderless" : ""}`,
|
|
10622
|
+
ref: r1,
|
|
10623
10623
|
style: { width: h },
|
|
10624
10624
|
children: [
|
|
10625
10625
|
/* @__PURE__ */ t(
|
|
@@ -10630,42 +10630,42 @@ const _4 = Q((o, i) => {
|
|
|
10630
10630
|
id: p,
|
|
10631
10631
|
ref: i,
|
|
10632
10632
|
showSearch: !!w,
|
|
10633
|
-
filterOption: w &&
|
|
10634
|
-
onDropdownVisibleChange:
|
|
10633
|
+
filterOption: w && L1,
|
|
10634
|
+
onDropdownVisibleChange: g1,
|
|
10635
10635
|
disabled: n,
|
|
10636
|
-
value:
|
|
10636
|
+
value: x || void 0,
|
|
10637
10637
|
labelRender: (g) => {
|
|
10638
|
-
const
|
|
10639
|
-
return n ? /* @__PURE__ */ t("span", { style: { color: r.GREY_DARK_1 }, children:
|
|
10638
|
+
const m = j(g.value);
|
|
10639
|
+
return n ? /* @__PURE__ */ t("span", { style: { color: r.GREY_DARK_1 }, children: m }) : m;
|
|
10640
10640
|
},
|
|
10641
|
-
mode: V4(a,
|
|
10642
|
-
variant:
|
|
10641
|
+
mode: V4(a, D),
|
|
10642
|
+
variant: Y,
|
|
10643
10643
|
onChange: $,
|
|
10644
|
-
onFocus:
|
|
10645
|
-
onBlur:
|
|
10646
|
-
onMouseEnter: () =>
|
|
10647
|
-
onMouseLeave: () =>
|
|
10644
|
+
onFocus: k1,
|
|
10645
|
+
onBlur: p1,
|
|
10646
|
+
onMouseEnter: () => C1(!0),
|
|
10647
|
+
onMouseLeave: () => C1(!1),
|
|
10648
10648
|
onSearch: (g) => {
|
|
10649
|
-
|
|
10649
|
+
t1(!g), L && L(g);
|
|
10650
10650
|
},
|
|
10651
|
-
onSelect: () =>
|
|
10652
|
-
onDeselect: () =>
|
|
10653
|
-
tagRender: (g) =>
|
|
10654
|
-
maxTagCount:
|
|
10655
|
-
maxCount: a === "single" &&
|
|
10656
|
-
maxTagPlaceholder: (g) =>
|
|
10657
|
-
onPopupScroll:
|
|
10658
|
-
prefix:
|
|
10651
|
+
onSelect: () => t1(!0),
|
|
10652
|
+
onDeselect: () => t1(!0),
|
|
10653
|
+
tagRender: (g) => W({ ...g, mode: a }),
|
|
10654
|
+
maxTagCount: i1 === "responsive" ? "responsive" : void 0,
|
|
10655
|
+
maxCount: a === "single" && D === "badge" ? 1 : void 0,
|
|
10656
|
+
maxTagPlaceholder: (g) => K(g, D),
|
|
10657
|
+
onPopupScroll: G,
|
|
10658
|
+
prefix: v && /* @__PURE__ */ t(H1, { size: "small" }),
|
|
10659
10659
|
suffixIcon: /* @__PURE__ */ t("div", { className: "wrapper-suffix-icon", children: a !== "filter" && /* @__PURE__ */ c(F, { children: [
|
|
10660
|
-
|
|
10660
|
+
x && !!x.length && _ && /* @__PURE__ */ t(
|
|
10661
10661
|
"div",
|
|
10662
10662
|
{
|
|
10663
|
-
onClick:
|
|
10663
|
+
onClick: m1,
|
|
10664
10664
|
style: {
|
|
10665
10665
|
cursor: n ? "not-allowed" : "pointer"
|
|
10666
10666
|
},
|
|
10667
10667
|
children: /* @__PURE__ */ t(
|
|
10668
|
-
|
|
10668
|
+
c1,
|
|
10669
10669
|
{
|
|
10670
10670
|
name: "cancel",
|
|
10671
10671
|
color: n ? r.GREY_DARK_1 : r.GREY_DARK_2
|
|
@@ -10673,15 +10673,15 @@ const _4 = Q((o, i) => {
|
|
|
10673
10673
|
)
|
|
10674
10674
|
}
|
|
10675
10675
|
),
|
|
10676
|
-
|
|
10676
|
+
Y === "borderless" && (S || z) && /* @__PURE__ */ t(
|
|
10677
10677
|
R4,
|
|
10678
10678
|
{
|
|
10679
10679
|
isActive: b,
|
|
10680
10680
|
onClick: () => P(!b)
|
|
10681
10681
|
}
|
|
10682
10682
|
),
|
|
10683
|
-
|
|
10684
|
-
|
|
10683
|
+
Y === "outlined" && /* @__PURE__ */ t(
|
|
10684
|
+
c1,
|
|
10685
10685
|
{
|
|
10686
10686
|
name: "selectArrowIcon",
|
|
10687
10687
|
color: n ? r.GREY_DARK_1 : r.GREY_DARK_5,
|
|
@@ -10690,40 +10690,38 @@ const _4 = Q((o, i) => {
|
|
|
10690
10690
|
}
|
|
10691
10691
|
)
|
|
10692
10692
|
] }) }),
|
|
10693
|
-
removeIcon: /* @__PURE__ */ t(
|
|
10693
|
+
removeIcon: /* @__PURE__ */ t(c1, { name: "cancelCircle", color: r.GREY_DARK_1 }),
|
|
10694
10694
|
options: d,
|
|
10695
|
-
optionRender: (g) =>
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
{
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
!a && _ === g.value && /* @__PURE__ */ t(r1, { name: "check", color: r.BLUE_DARK_1 })
|
|
10716
|
-
] }),
|
|
10695
|
+
optionRender: (g) => {
|
|
10696
|
+
const m = a === "single" && D === "badge", A = Array.isArray(x) ? !!(x != null && x.includes(g.value)) : x === g.value, o1 = m ? x : void 0, q = m ? ((o1 == null ? void 0 : o1.length) || 0) > 0 : !1;
|
|
10697
|
+
return V ? V(g.data) : /* @__PURE__ */ c(a1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
|
|
10698
|
+
/* @__PURE__ */ c(a1, { alignItems: "center", gap: 12, children: [
|
|
10699
|
+
a && a !== "single" || m ? /* @__PURE__ */ t(m2, { checked: A, disabled: m && q && !A }) : null,
|
|
10700
|
+
/* @__PURE__ */ c(a1, { alignItems: "center", gap: 8, children: [
|
|
10701
|
+
g.data.image !== void 0 && /* @__PURE__ */ t(
|
|
10702
|
+
w2,
|
|
10703
|
+
{
|
|
10704
|
+
src: g.data.image,
|
|
10705
|
+
variant: "xsmall",
|
|
10706
|
+
fallbackText: g.data.imageFallbackText ? g.data.imageFallbackText : ""
|
|
10707
|
+
}
|
|
10708
|
+
),
|
|
10709
|
+
/* @__PURE__ */ t("span", { children: g.label })
|
|
10710
|
+
] })
|
|
10711
|
+
] }),
|
|
10712
|
+
!a && x === g.value && /* @__PURE__ */ t(c1, { name: "check", color: r.BLUE_DARK_1 })
|
|
10713
|
+
] });
|
|
10714
|
+
},
|
|
10717
10715
|
dropdownRender: (g) => /* @__PURE__ */ c("div", { className: "dropdown-container", children: [
|
|
10718
10716
|
/* @__PURE__ */ t("div", { className: "dropdown-menu", children: O ? O(g) : g }),
|
|
10719
|
-
|
|
10717
|
+
v && /* @__PURE__ */ t("div", { className: "loading-overlay", children: /* @__PURE__ */ t(H1, {}) })
|
|
10720
10718
|
] })
|
|
10721
10719
|
}
|
|
10722
10720
|
),
|
|
10723
|
-
s &&
|
|
10721
|
+
s && Y !== "borderless" && /* @__PURE__ */ t(
|
|
10724
10722
|
"label",
|
|
10725
10723
|
{
|
|
10726
|
-
className: `${z || y ? "label-floating" : ""} ${n ? "label-disabled" : ""} ${z ? "label-focused" : ""} ${
|
|
10724
|
+
className: `${z || y ? "label-floating" : ""} ${n ? "label-disabled" : ""} ${z ? "label-focused" : ""} ${v ? "label-loading" : ""} ${M ? "label-error" : ""}`,
|
|
10727
10725
|
children: C ? `${s}*` : s
|
|
10728
10726
|
}
|
|
10729
10727
|
),
|
|
@@ -10732,15 +10730,15 @@ const _4 = Q((o, i) => {
|
|
|
10732
10730
|
{
|
|
10733
10731
|
className: `${z ? "fieldset-focused" : ""} ${n ? "fieldset-disabled" : ""} ${y ? "fieldset-filled" : ""} ${M ? "fieldset-error" : ""}
|
|
10734
10732
|
${S ? "fieldset-hovered" : ""}`,
|
|
10735
|
-
children: /* @__PURE__ */ t("legend", { children: s &&
|
|
10733
|
+
children: /* @__PURE__ */ t("legend", { children: s && Y !== "borderless" && /* @__PURE__ */ t("span", { children: C ? `${s}*` : s }) })
|
|
10736
10734
|
}
|
|
10737
10735
|
)
|
|
10738
10736
|
]
|
|
10739
10737
|
}
|
|
10740
10738
|
),
|
|
10741
|
-
M && /* @__PURE__ */ c(
|
|
10739
|
+
M && /* @__PURE__ */ c(a1, { justifyContent: "flex-start", gap: 6, children: [
|
|
10742
10740
|
/* @__PURE__ */ t(
|
|
10743
|
-
|
|
10741
|
+
c1,
|
|
10744
10742
|
{
|
|
10745
10743
|
name: "attention",
|
|
10746
10744
|
color: r.NOTIFICATION_ERROR_DARK,
|
|
@@ -10759,7 +10757,7 @@ function V4(o, i) {
|
|
|
10759
10757
|
}
|
|
10760
10758
|
function H4(o, i = 500) {
|
|
10761
10759
|
const e = T();
|
|
10762
|
-
return
|
|
10760
|
+
return B(() => () => {
|
|
10763
10761
|
e.current && clearTimeout(e.current);
|
|
10764
10762
|
}, []), (...s) => {
|
|
10765
10763
|
const a = setTimeout(() => {
|
|
@@ -10770,13 +10768,13 @@ function H4(o, i = 500) {
|
|
|
10770
10768
|
}
|
|
10771
10769
|
function A1(o) {
|
|
10772
10770
|
const i = T(o);
|
|
10773
|
-
return
|
|
10771
|
+
return B(() => {
|
|
10774
10772
|
i.current = o;
|
|
10775
10773
|
}, [o]), i.current;
|
|
10776
10774
|
}
|
|
10777
|
-
const f1 = 100,
|
|
10775
|
+
const f1 = 100, l1 = {
|
|
10778
10776
|
offset: 0
|
|
10779
|
-
}, K4 =
|
|
10777
|
+
}, K4 = X((o, i) => {
|
|
10780
10778
|
const {
|
|
10781
10779
|
loadOptions: e,
|
|
10782
10780
|
width: l,
|
|
@@ -10787,165 +10785,165 @@ const f1 = 100, o1 = {
|
|
|
10787
10785
|
placeholder: h,
|
|
10788
10786
|
mode: n,
|
|
10789
10787
|
loadOnClosedState: C,
|
|
10790
|
-
preloadOptions:
|
|
10788
|
+
preloadOptions: _,
|
|
10791
10789
|
extraOptions: R,
|
|
10792
10790
|
onDropdownVisibleChange: L,
|
|
10793
|
-
optionRender:
|
|
10791
|
+
optionRender: u,
|
|
10794
10792
|
dropdownRender: k,
|
|
10795
|
-
readOnly:
|
|
10793
|
+
readOnly: f,
|
|
10796
10794
|
clearable: p = !0,
|
|
10797
|
-
required:
|
|
10795
|
+
required: E = !1,
|
|
10798
10796
|
error: O,
|
|
10799
10797
|
variant: V = "outlined"
|
|
10800
|
-
} = o, [
|
|
10798
|
+
} = o, [v, H] = Z(), [M, D] = Z(l1), [Y, i1] = Z(!1), [b, P] = Z(), [z, w1] = Z(!1), [S, C1] = Z(
|
|
10801
10799
|
R ?? []
|
|
10802
|
-
),
|
|
10800
|
+
), h1 = A1(M.offset), t1 = A1(b), [x, U] = Z(!1), r1 = T(!1), g1 = I(
|
|
10803
10801
|
async ({
|
|
10804
|
-
limit:
|
|
10805
|
-
offset:
|
|
10802
|
+
limit: N = f1,
|
|
10803
|
+
offset: G,
|
|
10806
10804
|
search: j
|
|
10807
10805
|
}) => {
|
|
10808
|
-
|
|
10806
|
+
i1(!0);
|
|
10809
10807
|
try {
|
|
10810
|
-
const
|
|
10811
|
-
limit:
|
|
10812
|
-
offset:
|
|
10808
|
+
const K = await e({
|
|
10809
|
+
limit: N,
|
|
10810
|
+
offset: G,
|
|
10813
10811
|
search: j
|
|
10814
10812
|
});
|
|
10815
10813
|
H(
|
|
10816
|
-
(
|
|
10817
|
-
),
|
|
10818
|
-
...
|
|
10819
|
-
count:
|
|
10814
|
+
(W) => G === 0 ? K.options : [...W ?? [], ...K.options]
|
|
10815
|
+
), D((W) => ({
|
|
10816
|
+
...W,
|
|
10817
|
+
count: K.count
|
|
10820
10818
|
}));
|
|
10821
|
-
} catch (
|
|
10822
|
-
return console.error("AsyncSelect. fetchOptions error",
|
|
10819
|
+
} catch (K) {
|
|
10820
|
+
return console.error("AsyncSelect. fetchOptions error", K), [];
|
|
10823
10821
|
} finally {
|
|
10824
|
-
|
|
10822
|
+
i1(!1);
|
|
10825
10823
|
}
|
|
10826
10824
|
},
|
|
10827
10825
|
[e]
|
|
10828
|
-
),
|
|
10829
|
-
P(
|
|
10830
|
-
}),
|
|
10831
|
-
(
|
|
10832
|
-
[
|
|
10833
|
-
),
|
|
10834
|
-
async (
|
|
10835
|
-
|
|
10836
|
-
...
|
|
10837
|
-
offset:
|
|
10826
|
+
), L1 = H4((N) => {
|
|
10827
|
+
P(N), N || D(l1);
|
|
10828
|
+
}), k1 = I(
|
|
10829
|
+
(N) => L1(N),
|
|
10830
|
+
[L1]
|
|
10831
|
+
), p1 = I(
|
|
10832
|
+
async (N) => {
|
|
10833
|
+
Y || N && M.count && M.count > ((v == null ? void 0 : v.length) ?? 0) && D((G) => ({
|
|
10834
|
+
...G,
|
|
10835
|
+
offset: G.offset + f1
|
|
10838
10836
|
}));
|
|
10839
10837
|
},
|
|
10840
|
-
[
|
|
10838
|
+
[Y, v == null ? void 0 : v.length, M.count]
|
|
10841
10839
|
), $ = I(
|
|
10842
|
-
(
|
|
10843
|
-
|
|
10840
|
+
(N) => {
|
|
10841
|
+
w1(N), !N && b && (P(void 0), D(l1), U(!0)), L == null || L(N);
|
|
10844
10842
|
},
|
|
10845
10843
|
[L, b]
|
|
10846
10844
|
);
|
|
10847
|
-
|
|
10848
|
-
if (!
|
|
10849
|
-
(
|
|
10850
|
-
}, [
|
|
10851
|
-
(C ||
|
|
10852
|
-
}, []),
|
|
10853
|
-
R &&
|
|
10854
|
-
const
|
|
10855
|
-
(j) => !
|
|
10845
|
+
B(() => {
|
|
10846
|
+
if (!r1.current || Y) return;
|
|
10847
|
+
(x || z && (h1 !== M.offset || t1 !== b || !v)) && (g1({ offset: M.offset, limit: f1, search: b }), x && U(!1));
|
|
10848
|
+
}, [x, z, M.offset, b, h1, t1, v, Y]), B(() => {
|
|
10849
|
+
(C || _) && g1(l1), r1.current = !0;
|
|
10850
|
+
}, []), B(() => {
|
|
10851
|
+
R && C1((N) => {
|
|
10852
|
+
const G = R.filter(
|
|
10853
|
+
(j) => !N.some((K) => K.value === j.value)
|
|
10856
10854
|
);
|
|
10857
|
-
return [...
|
|
10855
|
+
return [...N, ...G];
|
|
10858
10856
|
});
|
|
10859
10857
|
}, [R]);
|
|
10860
|
-
const
|
|
10861
|
-
(
|
|
10862
|
-
s && s(
|
|
10863
|
-
let
|
|
10864
|
-
if (n ?
|
|
10865
|
-
const j =
|
|
10866
|
-
(
|
|
10858
|
+
const m1 = I(
|
|
10859
|
+
(N) => {
|
|
10860
|
+
s && s(N);
|
|
10861
|
+
let G = [];
|
|
10862
|
+
if (n ? G = Array.isArray(N) ? N : [] : G = N ? [N] : [], b) {
|
|
10863
|
+
const j = G.filter(
|
|
10864
|
+
(K) => !(S != null && S.some((W) => W.value === K))
|
|
10867
10865
|
);
|
|
10868
|
-
j.length > 0 &&
|
|
10869
|
-
...
|
|
10870
|
-
...j.map((
|
|
10871
|
-
const y =
|
|
10866
|
+
j.length > 0 && C1((K = []) => [
|
|
10867
|
+
...K,
|
|
10868
|
+
...j.map((W) => {
|
|
10869
|
+
const y = v == null ? void 0 : v.find((g) => g.value === W);
|
|
10872
10870
|
return {
|
|
10873
|
-
value:
|
|
10874
|
-
label: (y == null ? void 0 : y.label) ??
|
|
10871
|
+
value: W,
|
|
10872
|
+
label: (y == null ? void 0 : y.label) ?? W,
|
|
10875
10873
|
imageFallbackText: (y == null ? void 0 : y.imageFallbackText) ?? "",
|
|
10876
10874
|
image: (y == null ? void 0 : y.image) ?? void 0
|
|
10877
10875
|
};
|
|
10878
10876
|
})
|
|
10879
|
-
]), P(void 0),
|
|
10877
|
+
]), P(void 0), D(l1), U(!0);
|
|
10880
10878
|
}
|
|
10881
10879
|
},
|
|
10882
|
-
[s, b, n,
|
|
10883
|
-
),
|
|
10880
|
+
[s, b, n, v, S]
|
|
10881
|
+
), J = R1(
|
|
10884
10882
|
() => ({
|
|
10885
10883
|
id: a,
|
|
10886
10884
|
width: l,
|
|
10887
|
-
onChange:
|
|
10885
|
+
onChange: m1,
|
|
10888
10886
|
ref: i,
|
|
10889
10887
|
placeholder: h,
|
|
10890
10888
|
search: !0,
|
|
10891
|
-
onSearchChange:
|
|
10889
|
+
onSearchChange: k1,
|
|
10892
10890
|
onDropdownVisibleChange: $,
|
|
10893
10891
|
scrollThresholdValue: d,
|
|
10894
|
-
onScrollToEnd:
|
|
10892
|
+
onScrollToEnd: p1,
|
|
10895
10893
|
disabled: w,
|
|
10896
|
-
isLoading:
|
|
10897
|
-
optionRender:
|
|
10894
|
+
isLoading: Y,
|
|
10895
|
+
optionRender: u,
|
|
10898
10896
|
dropdownRender: k,
|
|
10899
|
-
readOnly:
|
|
10897
|
+
readOnly: f,
|
|
10900
10898
|
clearable: p,
|
|
10901
|
-
required:
|
|
10899
|
+
required: E,
|
|
10902
10900
|
error: O,
|
|
10903
10901
|
variant: V
|
|
10904
10902
|
}),
|
|
10905
10903
|
[
|
|
10906
10904
|
a,
|
|
10907
10905
|
l,
|
|
10908
|
-
|
|
10906
|
+
m1,
|
|
10909
10907
|
i,
|
|
10910
10908
|
h,
|
|
10911
|
-
|
|
10909
|
+
k1,
|
|
10912
10910
|
$,
|
|
10913
10911
|
d,
|
|
10914
|
-
|
|
10912
|
+
p1,
|
|
10915
10913
|
w,
|
|
10916
|
-
|
|
10917
|
-
|
|
10914
|
+
Y,
|
|
10915
|
+
u,
|
|
10918
10916
|
k,
|
|
10919
|
-
|
|
10917
|
+
f,
|
|
10920
10918
|
p,
|
|
10921
|
-
|
|
10919
|
+
E,
|
|
10922
10920
|
O,
|
|
10923
10921
|
V
|
|
10924
10922
|
]
|
|
10925
10923
|
);
|
|
10926
|
-
|
|
10924
|
+
s1(i, () => ({
|
|
10927
10925
|
refetchOptions: async () => {
|
|
10928
|
-
|
|
10926
|
+
D(l1), P(void 0), U(!0);
|
|
10929
10927
|
}
|
|
10930
10928
|
}));
|
|
10931
|
-
const
|
|
10932
|
-
const
|
|
10929
|
+
const u1 = R1(() => {
|
|
10930
|
+
const N = n && n !== "single", G = o.selectedItemVariant === "badge", j = G ? v || [] : v || [], K = S, W = o, g = N ? {
|
|
10933
10931
|
mode: n,
|
|
10934
|
-
overflowBehaviour:
|
|
10935
|
-
value:
|
|
10932
|
+
overflowBehaviour: W.overflowBehaviour,
|
|
10933
|
+
value: W.value
|
|
10936
10934
|
} : {
|
|
10937
10935
|
mode: n,
|
|
10938
10936
|
value: o.value
|
|
10939
10937
|
};
|
|
10940
10938
|
return {
|
|
10941
|
-
...
|
|
10939
|
+
...J,
|
|
10942
10940
|
...g,
|
|
10943
10941
|
selectedItemVariant: o.selectedItemVariant,
|
|
10944
10942
|
options: j,
|
|
10945
|
-
extraOptions:
|
|
10943
|
+
extraOptions: K
|
|
10946
10944
|
};
|
|
10947
|
-
}, [n, o,
|
|
10948
|
-
return /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(_4, { ...
|
|
10945
|
+
}, [n, o, J, S, v]);
|
|
10946
|
+
return /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(_4, { ...u1 }) });
|
|
10949
10947
|
});
|
|
10950
10948
|
export {
|
|
10951
10949
|
K4 as AsyncSelect
|