@snmt-react-ui/async-select 1.13.10 → 1.13.11
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 +198 -146
- package/package.json +3 -3
package/dist/async-select.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import { jsx as i, Fragment as
|
|
2
|
+
import { jsx as i, Fragment as j, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as J, useState as V, useRef as O, useEffect as K, useCallback as y, useContext as Q, useImperativeHandle as o1, createContext as y1, useMemo as V1 } from "react";
|
|
4
4
|
import { Select as I1, Tag as u1, Flex as T1, Checkbox as O1, Avatar as S1, Typography as L1, Popover as W1 } from "antd";
|
|
5
5
|
import { COLORS as s, SNMTUiContext as s1 } from "@snmt-react-ui/core";
|
|
6
|
-
var $1 = Object.defineProperty,
|
|
6
|
+
var $1 = Object.defineProperty, F1 = (e, l, C) => l in e ? $1(e, l, { enumerable: !0, configurable: !0, writable: !0, value: C }) : e[l] = C, j1 = (e, l, C) => F1(e, l + "", C), P1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
7
|
function U1() {
|
|
8
8
|
if (console && console.warn) {
|
|
9
9
|
for (var e = arguments.length, l = new Array(e), C = 0; C < e; C++)
|
|
@@ -11,11 +11,11 @@ function U1() {
|
|
|
11
11
|
q(l[0]) && (l[0] = `react-i18next:: ${l[0]}`), console.warn(...l);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const H1 = {};
|
|
15
15
|
function Z1() {
|
|
16
16
|
for (var e = arguments.length, l = new Array(e), C = 0; C < e; C++)
|
|
17
17
|
l[C] = arguments[C];
|
|
18
|
-
q(l[0]) &&
|
|
18
|
+
q(l[0]) && H1[l[0]] || (q(l[0]) && (H1[l[0]] = /* @__PURE__ */ new Date()), U1(...l));
|
|
19
19
|
}
|
|
20
20
|
const E1 = (e, l) => () => {
|
|
21
21
|
if (e.isInitialized)
|
|
@@ -28,7 +28,7 @@ const E1 = (e, l) => () => {
|
|
|
28
28
|
};
|
|
29
29
|
e.on("initialized", C);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, _1 = (e, l, C) => {
|
|
32
32
|
e.loadNamespaces(l, E1(e, C));
|
|
33
33
|
}, R1 = (e, l, C, t) => {
|
|
34
34
|
q(C) && (C = [C]), C.forEach((h) => {
|
|
@@ -88,7 +88,7 @@ let t2;
|
|
|
88
88
|
const h2 = () => t2, o2 = y1();
|
|
89
89
|
class s2 {
|
|
90
90
|
constructor() {
|
|
91
|
-
|
|
91
|
+
j1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces)), this.usedNamespaces = {};
|
|
92
92
|
}
|
|
93
93
|
addUsedNamespaces(l) {
|
|
94
94
|
l.forEach((C) => {
|
|
@@ -125,7 +125,7 @@ const c2 = (e, l) => {
|
|
|
125
125
|
} = w;
|
|
126
126
|
let o = e;
|
|
127
127
|
o = q(o) ? [o] : o || ["translation"], r.reportNamespaces.addUsedNamespaces && r.reportNamespaces.addUsedNamespaces(o);
|
|
128
|
-
const c = (r.isInitialized || r.initializedStoreOnce) && o.every((x) => q1(x, r, w)),
|
|
128
|
+
const c = (r.isInitialized || r.initializedStoreOnce) && o.every((x) => q1(x, r, w)), H = a2(r, l.lng || null, w.nsMode === "fallback" ? o : o[0], a), u = () => H, g = () => G1(r, l.lng || null, w.nsMode === "fallback" ? o : o[0], a), [f, m] = V(u);
|
|
129
129
|
let M = o.join();
|
|
130
130
|
l.lng && (M = `${l.lng}${M}`);
|
|
131
131
|
const p = c2(M), E = O(!0);
|
|
@@ -136,7 +136,7 @@ const c2 = (e, l) => {
|
|
|
136
136
|
} = w;
|
|
137
137
|
E.current = !0, !c && !d && (l.lng ? R1(r, l.lng, o, () => {
|
|
138
138
|
E.current && m(g);
|
|
139
|
-
}) :
|
|
139
|
+
}) : _1(r, o, () => {
|
|
140
140
|
E.current && m(g);
|
|
141
141
|
})), c && p && p !== M && E.current && m(g);
|
|
142
142
|
const A = () => {
|
|
@@ -151,7 +151,7 @@ const c2 = (e, l) => {
|
|
|
151
151
|
const S = [f, r, c];
|
|
152
152
|
if (S.t = f, S.i18n = r, S.ready = c, c || !c && !d) return S;
|
|
153
153
|
throw new Promise((x) => {
|
|
154
|
-
l.lng ? R1(r, l.lng, o, () => x()) :
|
|
154
|
+
l.lng ? R1(r, l.lng, o, () => x()) : _1(r, o, () => x());
|
|
155
155
|
});
|
|
156
156
|
}, w1 = ({
|
|
157
157
|
children: e,
|
|
@@ -194,12 +194,12 @@ const c2 = (e, l) => {
|
|
|
194
194
|
}, a) => {
|
|
195
195
|
const o = O(null);
|
|
196
196
|
o1(a, () => o.current);
|
|
197
|
-
const [c,
|
|
197
|
+
const [c, H] = V(!1);
|
|
198
198
|
K(() => {
|
|
199
199
|
var m;
|
|
200
200
|
if (!d) return;
|
|
201
201
|
const M = () => {
|
|
202
|
-
o.current &&
|
|
202
|
+
o.current && H(o.current.scrollWidth > o.current.clientWidth);
|
|
203
203
|
};
|
|
204
204
|
M();
|
|
205
205
|
const p = new ResizeObserver(M);
|
|
@@ -286,12 +286,12 @@ const c2 = (e, l) => {
|
|
|
286
286
|
}, a) => {
|
|
287
287
|
const o = O(null);
|
|
288
288
|
o1(a, () => o.current);
|
|
289
|
-
const [c,
|
|
289
|
+
const [c, H] = V(!1);
|
|
290
290
|
K(() => {
|
|
291
291
|
var m;
|
|
292
292
|
if (!d) return;
|
|
293
293
|
const M = () => {
|
|
294
|
-
o.current &&
|
|
294
|
+
o.current && H(o.current.scrollWidth > o.current.clientWidth);
|
|
295
295
|
};
|
|
296
296
|
M();
|
|
297
297
|
const p = new ResizeObserver(M);
|
|
@@ -335,8 +335,8 @@ const c2 = (e, l) => {
|
|
|
335
335
|
className: `snmt-checkbox snmt-checkbox-${c}`,
|
|
336
336
|
checked: w,
|
|
337
337
|
indeterminate: a,
|
|
338
|
-
onChange: (
|
|
339
|
-
r && w || (o(!1), d(
|
|
338
|
+
onChange: (H) => {
|
|
339
|
+
r && w || (o(!1), d(H.target.checked), t && t(H));
|
|
340
340
|
},
|
|
341
341
|
disabled: h,
|
|
342
342
|
children: C && /* @__PURE__ */ i(
|
|
@@ -513,7 +513,7 @@ const c2 = (e, l) => {
|
|
|
513
513
|
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "clip0_1_2043", children: /* @__PURE__ */ i("rect", { width: "24", height: "24", fill: "white", transform: "translate(0.5 0.5)" }) }) })
|
|
514
514
|
]
|
|
515
515
|
}
|
|
516
|
-
),
|
|
516
|
+
), H2 = ({
|
|
517
517
|
width: e = 20,
|
|
518
518
|
height: l = 20,
|
|
519
519
|
color: C = s.GREY_DARK_5,
|
|
@@ -537,7 +537,7 @@ const c2 = (e, l) => {
|
|
|
537
537
|
}
|
|
538
538
|
)
|
|
539
539
|
}
|
|
540
|
-
),
|
|
540
|
+
), _2 = ({
|
|
541
541
|
width: e = 20,
|
|
542
542
|
height: l = 20,
|
|
543
543
|
color: C = s.GREY_DARK_5,
|
|
@@ -1228,7 +1228,7 @@ const c2 = (e, l) => {
|
|
|
1228
1228
|
)
|
|
1229
1229
|
]
|
|
1230
1230
|
}
|
|
1231
|
-
),
|
|
1231
|
+
), F2 = ({
|
|
1232
1232
|
width: e = 20,
|
|
1233
1233
|
height: l = 20,
|
|
1234
1234
|
color: C = s.GREY_DARK_5,
|
|
@@ -1261,7 +1261,7 @@ const c2 = (e, l) => {
|
|
|
1261
1261
|
)
|
|
1262
1262
|
]
|
|
1263
1263
|
}
|
|
1264
|
-
),
|
|
1264
|
+
), j2 = ({
|
|
1265
1265
|
width: e = 20,
|
|
1266
1266
|
height: l = 20,
|
|
1267
1267
|
color: C = s.GREY_DARK_5,
|
|
@@ -2479,7 +2479,7 @@ const c2 = (e, l) => {
|
|
|
2479
2479
|
)
|
|
2480
2480
|
]
|
|
2481
2481
|
}
|
|
2482
|
-
),
|
|
2482
|
+
), H5 = ({
|
|
2483
2483
|
width: e = 20,
|
|
2484
2484
|
height: l = 20,
|
|
2485
2485
|
color: C = s.GREY_DARK_5,
|
|
@@ -2540,13 +2540,13 @@ const c2 = (e, l) => {
|
|
|
2540
2540
|
)
|
|
2541
2541
|
]
|
|
2542
2542
|
}
|
|
2543
|
-
),
|
|
2543
|
+
), _5 = ({
|
|
2544
2544
|
width: e = 20,
|
|
2545
2545
|
height: l = 20,
|
|
2546
2546
|
color: C = s.GREY_DARK_5,
|
|
2547
2547
|
className: t,
|
|
2548
2548
|
onClick: h
|
|
2549
|
-
}) => /* @__PURE__ */
|
|
2549
|
+
}) => /* @__PURE__ */ n(
|
|
2550
2550
|
"svg",
|
|
2551
2551
|
{
|
|
2552
2552
|
width: e,
|
|
@@ -2556,16 +2556,29 @@ const c2 = (e, l) => {
|
|
|
2556
2556
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2557
2557
|
className: t,
|
|
2558
2558
|
onClick: h,
|
|
2559
|
-
children:
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2559
|
+
children: [
|
|
2560
|
+
/* @__PURE__ */ i(
|
|
2561
|
+
"path",
|
|
2562
|
+
{
|
|
2563
|
+
d: "M20.25 19V6.81055L16.1895 2.75L7 2.75C6.58579 2.75 6.25 2.41421 6.25 2C6.25 1.58579 6.58579 1.25 7 1.25L16.5 1.25C16.6989 1.25 16.8896 1.32907 17.0303 1.46973L21.5303 5.96973C21.6709 6.11038 21.75 6.30109 21.75 6.5V19C21.75 19.4142 21.4142 19.75 21 19.75C20.5858 19.75 20.25 19.4142 20.25 19Z",
|
|
2564
|
+
fill: C
|
|
2565
|
+
}
|
|
2566
|
+
),
|
|
2567
|
+
/* @__PURE__ */ i(
|
|
2568
|
+
"path",
|
|
2569
|
+
{
|
|
2570
|
+
d: "M18.75 20.5C18.75 21.7426 17.7426 22.75 16.5 22.75H4.5C3.25736 22.75 2.25 21.7426 2.25 20.5V6.5C2.25 5.25736 3.25736 4.25 4.5 4.25H14.252C14.6098 4.25013 14.953 4.39245 15.2061 4.64551L18.3545 7.79395C18.6076 8.04701 18.7499 8.39018 18.75 8.74805V20.5ZM3.75 20.5C3.75 20.9142 4.08579 21.25 4.5 21.25H16.5C16.9142 21.25 17.25 20.9142 17.25 20.5V8.81055L14.1895 5.75H4.5C4.08579 5.75 3.75 6.08579 3.75 6.5V20.5Z",
|
|
2571
|
+
fill: C
|
|
2572
|
+
}
|
|
2573
|
+
),
|
|
2574
|
+
/* @__PURE__ */ i(
|
|
2575
|
+
"path",
|
|
2576
|
+
{
|
|
2577
|
+
d: "M13.25 5C13.25 4.58579 13.5858 4.25 14 4.25C14.4142 4.25 14.75 4.58579 14.75 5V8.25H18C18.4142 8.25 18.75 8.58579 18.75 9C18.75 9.41421 18.4142 9.75 18 9.75H14.5996C13.8543 9.74979 13.2502 9.14567 13.25 8.40039V5Z",
|
|
2578
|
+
fill: C
|
|
2579
|
+
}
|
|
2580
|
+
)
|
|
2581
|
+
]
|
|
2569
2582
|
}
|
|
2570
2583
|
), R5 = ({
|
|
2571
2584
|
width: e = 20,
|
|
@@ -2601,7 +2614,7 @@ const c2 = (e, l) => {
|
|
|
2601
2614
|
onClick: w
|
|
2602
2615
|
}) => {
|
|
2603
2616
|
const { theme: d } = Q(s1), a = r ? d && d === "dark" ? s.GREY_LIGHT_4 : s.GREY_DARK_1 : t, o = r ? void 0 : w, c = w && !r ? `${h || ""} clickable` : h;
|
|
2604
|
-
return /* @__PURE__ */ i(
|
|
2617
|
+
return /* @__PURE__ */ i(j, { children: (() => {
|
|
2605
2618
|
switch (e) {
|
|
2606
2619
|
case "arrow1Down":
|
|
2607
2620
|
return v2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
@@ -2660,9 +2673,9 @@ const c2 = (e, l) => {
|
|
|
2660
2673
|
case "logOut":
|
|
2661
2674
|
return $2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2662
2675
|
case "settings":
|
|
2663
|
-
return j2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2664
|
-
case "trash":
|
|
2665
2676
|
return F2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2677
|
+
case "trash":
|
|
2678
|
+
return j2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2666
2679
|
case "settings2":
|
|
2667
2680
|
return P2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2668
2681
|
case "checkCircle":
|
|
@@ -2700,9 +2713,9 @@ const c2 = (e, l) => {
|
|
|
2700
2713
|
case "arrow2Up":
|
|
2701
2714
|
return V2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2702
2715
|
case "arrow2Right":
|
|
2703
|
-
return _2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2704
|
-
case "arrow2Down":
|
|
2705
2716
|
return H2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2717
|
+
case "arrow2Down":
|
|
2718
|
+
return _2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2706
2719
|
case "arrow2Left":
|
|
2707
2720
|
return R2({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2708
2721
|
case "link":
|
|
@@ -2748,13 +2761,13 @@ const c2 = (e, l) => {
|
|
|
2748
2761
|
case "status":
|
|
2749
2762
|
return V5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2750
2763
|
case "community":
|
|
2751
|
-
return _5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2752
|
-
case "docs":
|
|
2753
2764
|
return H5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2765
|
+
case "docs":
|
|
2766
|
+
return _5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2754
2767
|
case "unpaidLeave":
|
|
2755
2768
|
return R5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
2756
2769
|
default:
|
|
2757
|
-
return /* @__PURE__ */ i(
|
|
2770
|
+
return /* @__PURE__ */ i(j, { children: "No Icon provided" });
|
|
2758
2771
|
}
|
|
2759
2772
|
})() });
|
|
2760
2773
|
}, { Title: x5, Text: A5 } = L1, D5 = {
|
|
@@ -2776,12 +2789,12 @@ const c2 = (e, l) => {
|
|
|
2776
2789
|
}, a) => {
|
|
2777
2790
|
const o = O(null);
|
|
2778
2791
|
o1(a, () => o.current);
|
|
2779
|
-
const [c,
|
|
2792
|
+
const [c, H] = V(!1);
|
|
2780
2793
|
K(() => {
|
|
2781
2794
|
var m;
|
|
2782
2795
|
if (!d) return;
|
|
2783
2796
|
const M = () => {
|
|
2784
|
-
o.current &&
|
|
2797
|
+
o.current && H(o.current.scrollWidth > o.current.clientWidth);
|
|
2785
2798
|
};
|
|
2786
2799
|
M();
|
|
2787
2800
|
const p = new ResizeObserver(M);
|
|
@@ -3178,7 +3191,7 @@ const c2 = (e, l) => {
|
|
|
3178
3191
|
)
|
|
3179
3192
|
]
|
|
3180
3193
|
}
|
|
3181
|
-
),
|
|
3194
|
+
), F5 = ({
|
|
3182
3195
|
width: e = 20,
|
|
3183
3196
|
height: l = 20,
|
|
3184
3197
|
color: C = s.GREY_DARK_5,
|
|
@@ -3202,7 +3215,7 @@ const c2 = (e, l) => {
|
|
|
3202
3215
|
}
|
|
3203
3216
|
)
|
|
3204
3217
|
}
|
|
3205
|
-
),
|
|
3218
|
+
), j5 = ({
|
|
3206
3219
|
width: e = 20,
|
|
3207
3220
|
height: l = 20,
|
|
3208
3221
|
color: C = s.GREY_DARK_5,
|
|
@@ -4455,7 +4468,7 @@ const c2 = (e, l) => {
|
|
|
4455
4468
|
)
|
|
4456
4469
|
]
|
|
4457
4470
|
}
|
|
4458
|
-
),
|
|
4471
|
+
), H7 = ({
|
|
4459
4472
|
className: e,
|
|
4460
4473
|
color: l = s.GREY_DARK_5,
|
|
4461
4474
|
height: C = 20,
|
|
@@ -4495,7 +4508,7 @@ const c2 = (e, l) => {
|
|
|
4495
4508
|
)
|
|
4496
4509
|
]
|
|
4497
4510
|
}
|
|
4498
|
-
),
|
|
4511
|
+
), _7 = ({
|
|
4499
4512
|
className: e,
|
|
4500
4513
|
color: l = s.GREY_DARK_5,
|
|
4501
4514
|
height: C = 20,
|
|
@@ -5003,7 +5016,7 @@ const c2 = (e, l) => {
|
|
|
5003
5016
|
color: C = s.GREY_DARK_5,
|
|
5004
5017
|
className: t,
|
|
5005
5018
|
onClick: h
|
|
5006
|
-
}) => /* @__PURE__ */
|
|
5019
|
+
}) => /* @__PURE__ */ n(
|
|
5007
5020
|
"svg",
|
|
5008
5021
|
{
|
|
5009
5022
|
width: e,
|
|
@@ -5013,16 +5026,29 @@ const c2 = (e, l) => {
|
|
|
5013
5026
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5014
5027
|
className: t,
|
|
5015
5028
|
onClick: h,
|
|
5016
|
-
children:
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5029
|
+
children: [
|
|
5030
|
+
/* @__PURE__ */ i(
|
|
5031
|
+
"path",
|
|
5032
|
+
{
|
|
5033
|
+
d: "M20.25 19V6.81055L16.1895 2.75L7 2.75C6.58579 2.75 6.25 2.41421 6.25 2C6.25 1.58579 6.58579 1.25 7 1.25L16.5 1.25C16.6989 1.25 16.8896 1.32907 17.0303 1.46973L21.5303 5.96973C21.6709 6.11038 21.75 6.30109 21.75 6.5V19C21.75 19.4142 21.4142 19.75 21 19.75C20.5858 19.75 20.25 19.4142 20.25 19Z",
|
|
5034
|
+
fill: C
|
|
5035
|
+
}
|
|
5036
|
+
),
|
|
5037
|
+
/* @__PURE__ */ i(
|
|
5038
|
+
"path",
|
|
5039
|
+
{
|
|
5040
|
+
d: "M18.75 20.5C18.75 21.7426 17.7426 22.75 16.5 22.75H4.5C3.25736 22.75 2.25 21.7426 2.25 20.5V6.5C2.25 5.25736 3.25736 4.25 4.5 4.25H14.252C14.6098 4.25013 14.953 4.39245 15.2061 4.64551L18.3545 7.79395C18.6076 8.04701 18.7499 8.39018 18.75 8.74805V20.5ZM3.75 20.5C3.75 20.9142 4.08579 21.25 4.5 21.25H16.5C16.9142 21.25 17.25 20.9142 17.25 20.5V8.81055L14.1895 5.75H4.5C4.08579 5.75 3.75 6.08579 3.75 6.5V20.5Z",
|
|
5041
|
+
fill: C
|
|
5042
|
+
}
|
|
5043
|
+
),
|
|
5044
|
+
/* @__PURE__ */ i(
|
|
5045
|
+
"path",
|
|
5046
|
+
{
|
|
5047
|
+
d: "M13.25 5C13.25 4.58579 13.5858 4.25 14 4.25C14.4142 4.25 14.75 4.58579 14.75 5V8.25H18C18.4142 8.25 18.75 8.58579 18.75 9C18.75 9.41421 18.4142 9.75 18 9.75H14.5996C13.8543 9.74979 13.2502 9.14567 13.25 8.40039V5Z",
|
|
5048
|
+
fill: C
|
|
5049
|
+
}
|
|
5050
|
+
)
|
|
5051
|
+
]
|
|
5026
5052
|
}
|
|
5027
5053
|
), O7 = ({
|
|
5028
5054
|
width: e = 20,
|
|
@@ -5058,7 +5084,7 @@ const c2 = (e, l) => {
|
|
|
5058
5084
|
onClick: w
|
|
5059
5085
|
}) => {
|
|
5060
5086
|
const { theme: d } = Q(s1), a = r ? d && d === "dark" ? s.GREY_LIGHT_4 : s.GREY_DARK_1 : t, o = r ? void 0 : w, c = w && !r ? `${h || ""} clickable` : h;
|
|
5061
|
-
return /* @__PURE__ */ i(
|
|
5087
|
+
return /* @__PURE__ */ i(j, { children: (() => {
|
|
5062
5088
|
switch (e) {
|
|
5063
5089
|
case "arrow1Down":
|
|
5064
5090
|
return G5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
@@ -5077,9 +5103,9 @@ const c2 = (e, l) => {
|
|
|
5077
5103
|
case "calendar":
|
|
5078
5104
|
return $5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5079
5105
|
case "check":
|
|
5080
|
-
return j5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5081
|
-
case "cancel":
|
|
5082
5106
|
return F5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5107
|
+
case "cancel":
|
|
5108
|
+
return j5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5083
5109
|
case "add":
|
|
5084
5110
|
return P5({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5085
5111
|
case "list":
|
|
@@ -5179,9 +5205,9 @@ const c2 = (e, l) => {
|
|
|
5179
5205
|
case "plusCircle":
|
|
5180
5206
|
return V7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5181
5207
|
case "warning":
|
|
5182
|
-
return _7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5183
|
-
case "bell":
|
|
5184
5208
|
return H7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5209
|
+
case "bell":
|
|
5210
|
+
return _7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5185
5211
|
case "copy":
|
|
5186
5212
|
return R7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5187
5213
|
case "contract":
|
|
@@ -5211,7 +5237,7 @@ const c2 = (e, l) => {
|
|
|
5211
5237
|
case "unpaidLeave":
|
|
5212
5238
|
return O7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
5213
5239
|
default:
|
|
5214
|
-
return /* @__PURE__ */ i(
|
|
5240
|
+
return /* @__PURE__ */ i(j, { children: "No Icon provided" });
|
|
5215
5241
|
}
|
|
5216
5242
|
})() });
|
|
5217
5243
|
}, K1 = ({
|
|
@@ -5252,12 +5278,12 @@ const c2 = (e, l) => {
|
|
|
5252
5278
|
) : e
|
|
5253
5279
|
}
|
|
5254
5280
|
);
|
|
5255
|
-
}, { Title: W7, Text: $7 } = L1,
|
|
5281
|
+
}, { Title: W7, Text: $7 } = L1, F7 = {
|
|
5256
5282
|
h1: 1,
|
|
5257
5283
|
h2: 2,
|
|
5258
5284
|
h3: 3,
|
|
5259
5285
|
h4: 4
|
|
5260
|
-
},
|
|
5286
|
+
}, j7 = J(
|
|
5261
5287
|
({
|
|
5262
5288
|
align: e = "inherit",
|
|
5263
5289
|
variant: l = "body1",
|
|
@@ -5271,12 +5297,12 @@ const c2 = (e, l) => {
|
|
|
5271
5297
|
}, a) => {
|
|
5272
5298
|
const o = O(null);
|
|
5273
5299
|
o1(a, () => o.current);
|
|
5274
|
-
const [c,
|
|
5300
|
+
const [c, H] = V(!1);
|
|
5275
5301
|
K(() => {
|
|
5276
5302
|
var m;
|
|
5277
5303
|
if (!d) return;
|
|
5278
5304
|
const M = () => {
|
|
5279
|
-
o.current &&
|
|
5305
|
+
o.current && H(o.current.scrollWidth > o.current.clientWidth);
|
|
5280
5306
|
};
|
|
5281
5307
|
M();
|
|
5282
5308
|
const p = new ResizeObserver(M);
|
|
@@ -5299,7 +5325,7 @@ const c2 = (e, l) => {
|
|
|
5299
5325
|
}
|
|
5300
5326
|
} : void 0
|
|
5301
5327
|
};
|
|
5302
|
-
return u ? /* @__PURE__ */ i(W7, { level:
|
|
5328
|
+
return u ? /* @__PURE__ */ i(W7, { level: F7[l], ...f, children: t }) : /* @__PURE__ */ i($7, { ...f, children: t });
|
|
5303
5329
|
}
|
|
5304
5330
|
), P7 = ({
|
|
5305
5331
|
children: e,
|
|
@@ -5345,12 +5371,12 @@ const c2 = (e, l) => {
|
|
|
5345
5371
|
}, a) => {
|
|
5346
5372
|
const o = O(null);
|
|
5347
5373
|
o1(a, () => o.current);
|
|
5348
|
-
const [c,
|
|
5374
|
+
const [c, H] = V(!1);
|
|
5349
5375
|
K(() => {
|
|
5350
5376
|
var m;
|
|
5351
5377
|
if (!d) return;
|
|
5352
5378
|
const M = () => {
|
|
5353
|
-
o.current &&
|
|
5379
|
+
o.current && H(o.current.scrollWidth > o.current.clientWidth);
|
|
5354
5380
|
};
|
|
5355
5381
|
M();
|
|
5356
5382
|
const p = new ResizeObserver(M);
|
|
@@ -6393,7 +6419,7 @@ const c2 = (e, l) => {
|
|
|
6393
6419
|
)
|
|
6394
6420
|
]
|
|
6395
6421
|
}
|
|
6396
|
-
),
|
|
6422
|
+
), H9 = ({
|
|
6397
6423
|
width: e = 20,
|
|
6398
6424
|
height: l = 20,
|
|
6399
6425
|
color: C = s.GREY_DARK_5,
|
|
@@ -6426,7 +6452,7 @@ const c2 = (e, l) => {
|
|
|
6426
6452
|
)
|
|
6427
6453
|
]
|
|
6428
6454
|
}
|
|
6429
|
-
),
|
|
6455
|
+
), _9 = ({
|
|
6430
6456
|
width: e = 20,
|
|
6431
6457
|
height: l = 20,
|
|
6432
6458
|
color: C = "#070739",
|
|
@@ -7064,7 +7090,7 @@ const c2 = (e, l) => {
|
|
|
7064
7090
|
)
|
|
7065
7091
|
]
|
|
7066
7092
|
}
|
|
7067
|
-
),
|
|
7093
|
+
), F9 = ({
|
|
7068
7094
|
className: e,
|
|
7069
7095
|
color: l = s.GREY_DARK_5,
|
|
7070
7096
|
height: C = 20,
|
|
@@ -7097,7 +7123,7 @@ const c2 = (e, l) => {
|
|
|
7097
7123
|
)
|
|
7098
7124
|
]
|
|
7099
7125
|
}
|
|
7100
|
-
),
|
|
7126
|
+
), j9 = ({
|
|
7101
7127
|
className: e,
|
|
7102
7128
|
color: l = s.GREY_DARK_5,
|
|
7103
7129
|
height: C = 20,
|
|
@@ -7572,7 +7598,7 @@ const c2 = (e, l) => {
|
|
|
7572
7598
|
color: C = s.GREY_DARK_5,
|
|
7573
7599
|
className: t,
|
|
7574
7600
|
onClick: h
|
|
7575
|
-
}) => /* @__PURE__ */
|
|
7601
|
+
}) => /* @__PURE__ */ n(
|
|
7576
7602
|
"svg",
|
|
7577
7603
|
{
|
|
7578
7604
|
width: e,
|
|
@@ -7582,16 +7608,29 @@ const c2 = (e, l) => {
|
|
|
7582
7608
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7583
7609
|
className: t,
|
|
7584
7610
|
onClick: h,
|
|
7585
|
-
children:
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7611
|
+
children: [
|
|
7612
|
+
/* @__PURE__ */ i(
|
|
7613
|
+
"path",
|
|
7614
|
+
{
|
|
7615
|
+
d: "M20.25 19V6.81055L16.1895 2.75L7 2.75C6.58579 2.75 6.25 2.41421 6.25 2C6.25 1.58579 6.58579 1.25 7 1.25L16.5 1.25C16.6989 1.25 16.8896 1.32907 17.0303 1.46973L21.5303 5.96973C21.6709 6.11038 21.75 6.30109 21.75 6.5V19C21.75 19.4142 21.4142 19.75 21 19.75C20.5858 19.75 20.25 19.4142 20.25 19Z",
|
|
7616
|
+
fill: C
|
|
7617
|
+
}
|
|
7618
|
+
),
|
|
7619
|
+
/* @__PURE__ */ i(
|
|
7620
|
+
"path",
|
|
7621
|
+
{
|
|
7622
|
+
d: "M18.75 20.5C18.75 21.7426 17.7426 22.75 16.5 22.75H4.5C3.25736 22.75 2.25 21.7426 2.25 20.5V6.5C2.25 5.25736 3.25736 4.25 4.5 4.25H14.252C14.6098 4.25013 14.953 4.39245 15.2061 4.64551L18.3545 7.79395C18.6076 8.04701 18.7499 8.39018 18.75 8.74805V20.5ZM3.75 20.5C3.75 20.9142 4.08579 21.25 4.5 21.25H16.5C16.9142 21.25 17.25 20.9142 17.25 20.5V8.81055L14.1895 5.75H4.5C4.08579 5.75 3.75 6.08579 3.75 6.5V20.5Z",
|
|
7623
|
+
fill: C
|
|
7624
|
+
}
|
|
7625
|
+
),
|
|
7626
|
+
/* @__PURE__ */ i(
|
|
7627
|
+
"path",
|
|
7628
|
+
{
|
|
7629
|
+
d: "M13.25 5C13.25 4.58579 13.5858 4.25 14 4.25C14.4142 4.25 14.75 4.58579 14.75 5V8.25H18C18.4142 8.25 18.75 8.58579 18.75 9C18.75 9.41421 18.4142 9.75 18 9.75H14.5996C13.8543 9.74979 13.2502 9.14567 13.25 8.40039V5Z",
|
|
7630
|
+
fill: C
|
|
7631
|
+
}
|
|
7632
|
+
)
|
|
7633
|
+
]
|
|
7595
7634
|
}
|
|
7596
7635
|
), h4 = ({
|
|
7597
7636
|
width: e = 20,
|
|
@@ -7627,7 +7666,7 @@ const c2 = (e, l) => {
|
|
|
7627
7666
|
onClick: w
|
|
7628
7667
|
}) => {
|
|
7629
7668
|
const { theme: d } = Q(s1), a = r ? d && d === "dark" ? s.GREY_LIGHT_4 : s.GREY_DARK_1 : t, o = r ? void 0 : w, c = w && !r ? `${h || ""} clickable` : h;
|
|
7630
|
-
return /* @__PURE__ */ i(
|
|
7669
|
+
return /* @__PURE__ */ i(j, { children: (() => {
|
|
7631
7670
|
switch (e) {
|
|
7632
7671
|
case "arrow1Down":
|
|
7633
7672
|
return J7({ width: l, height: C, color: a, className: c, onClick: o });
|
|
@@ -7694,9 +7733,9 @@ const c2 = (e, l) => {
|
|
|
7694
7733
|
case "checkCircle":
|
|
7695
7734
|
return V9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7696
7735
|
case "cancelCircle":
|
|
7697
|
-
return
|
|
7736
|
+
return H9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7698
7737
|
case "visibilityIcon":
|
|
7699
|
-
return
|
|
7738
|
+
return _9({
|
|
7700
7739
|
width: l,
|
|
7701
7740
|
height: C,
|
|
7702
7741
|
color: a,
|
|
@@ -7750,9 +7789,9 @@ const c2 = (e, l) => {
|
|
|
7750
7789
|
case "warning":
|
|
7751
7790
|
return $9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7752
7791
|
case "bell":
|
|
7753
|
-
return j9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7754
|
-
case "copy":
|
|
7755
7792
|
return F9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7793
|
+
case "copy":
|
|
7794
|
+
return j9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7756
7795
|
case "contract":
|
|
7757
7796
|
return P9({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7758
7797
|
case "resourceManager":
|
|
@@ -7780,7 +7819,7 @@ const c2 = (e, l) => {
|
|
|
7780
7819
|
case "unpaidLeave":
|
|
7781
7820
|
return h4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
7782
7821
|
default:
|
|
7783
|
-
return /* @__PURE__ */ i(
|
|
7822
|
+
return /* @__PURE__ */ i(j, { children: "No Icon provided" });
|
|
7784
7823
|
}
|
|
7785
7824
|
})() });
|
|
7786
7825
|
}, o4 = ({
|
|
@@ -7880,9 +7919,9 @@ const a4 = ({
|
|
|
7880
7919
|
extraOptions: w,
|
|
7881
7920
|
selectedItemVariant: d = "default"
|
|
7882
7921
|
}) => {
|
|
7883
|
-
const { locale: a } = Q(s1), { t: o } = n2("common", { lng: a }), [c,
|
|
7922
|
+
const { locale: a } = Q(s1), { t: o } = n2("common", { lng: a }), [c, H] = V(!1);
|
|
7884
7923
|
if (K(() => {
|
|
7885
|
-
e.length ||
|
|
7924
|
+
e.length || H(!1);
|
|
7886
7925
|
}, [e]), !e.length)
|
|
7887
7926
|
return null;
|
|
7888
7927
|
const u = (g) => {
|
|
@@ -7921,7 +7960,7 @@ const a4 = ({
|
|
|
7921
7960
|
),
|
|
7922
7961
|
placement: "bottomRight",
|
|
7923
7962
|
isOpen: c,
|
|
7924
|
-
setIsOpen:
|
|
7963
|
+
setIsOpen: H,
|
|
7925
7964
|
children: [
|
|
7926
7965
|
e.length,
|
|
7927
7966
|
" ",
|
|
@@ -8385,7 +8424,7 @@ const a4 = ({
|
|
|
8385
8424
|
}
|
|
8386
8425
|
)
|
|
8387
8426
|
}
|
|
8388
|
-
),
|
|
8427
|
+
), H4 = ({
|
|
8389
8428
|
width: e = 20,
|
|
8390
8429
|
height: l = 20,
|
|
8391
8430
|
color: C = s.GREY_DARK_5,
|
|
@@ -8446,7 +8485,7 @@ const a4 = ({
|
|
|
8446
8485
|
)
|
|
8447
8486
|
]
|
|
8448
8487
|
}
|
|
8449
|
-
),
|
|
8488
|
+
), _4 = ({
|
|
8450
8489
|
width: e = 20,
|
|
8451
8490
|
height: l = 20,
|
|
8452
8491
|
color: C = s.GREY_DARK_5,
|
|
@@ -9126,7 +9165,7 @@ const a4 = ({
|
|
|
9126
9165
|
)
|
|
9127
9166
|
]
|
|
9128
9167
|
}
|
|
9129
|
-
),
|
|
9168
|
+
), F4 = ({
|
|
9130
9169
|
width: e = 20,
|
|
9131
9170
|
height: l = 20,
|
|
9132
9171
|
color: C = s.GREY_DARK_5,
|
|
@@ -9173,7 +9212,7 @@ const a4 = ({
|
|
|
9173
9212
|
)
|
|
9174
9213
|
]
|
|
9175
9214
|
}
|
|
9176
|
-
),
|
|
9215
|
+
), j4 = ({
|
|
9177
9216
|
className: e,
|
|
9178
9217
|
color: l = s.GREY_DARK_5,
|
|
9179
9218
|
height: C = 20,
|
|
@@ -10138,7 +10177,7 @@ const a4 = ({
|
|
|
10138
10177
|
color: C = s.GREY_DARK_5,
|
|
10139
10178
|
className: t,
|
|
10140
10179
|
onClick: h
|
|
10141
|
-
}) => /* @__PURE__ */
|
|
10180
|
+
}) => /* @__PURE__ */ n(
|
|
10142
10181
|
"svg",
|
|
10143
10182
|
{
|
|
10144
10183
|
width: e,
|
|
@@ -10148,16 +10187,29 @@ const a4 = ({
|
|
|
10148
10187
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10149
10188
|
className: t,
|
|
10150
10189
|
onClick: h,
|
|
10151
|
-
children:
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10190
|
+
children: [
|
|
10191
|
+
/* @__PURE__ */ i(
|
|
10192
|
+
"path",
|
|
10193
|
+
{
|
|
10194
|
+
d: "M20.25 19V6.81055L16.1895 2.75L7 2.75C6.58579 2.75 6.25 2.41421 6.25 2C6.25 1.58579 6.58579 1.25 7 1.25L16.5 1.25C16.6989 1.25 16.8896 1.32907 17.0303 1.46973L21.5303 5.96973C21.6709 6.11038 21.75 6.30109 21.75 6.5V19C21.75 19.4142 21.4142 19.75 21 19.75C20.5858 19.75 20.25 19.4142 20.25 19Z",
|
|
10195
|
+
fill: C
|
|
10196
|
+
}
|
|
10197
|
+
),
|
|
10198
|
+
/* @__PURE__ */ i(
|
|
10199
|
+
"path",
|
|
10200
|
+
{
|
|
10201
|
+
d: "M18.75 20.5C18.75 21.7426 17.7426 22.75 16.5 22.75H4.5C3.25736 22.75 2.25 21.7426 2.25 20.5V6.5C2.25 5.25736 3.25736 4.25 4.5 4.25H14.252C14.6098 4.25013 14.953 4.39245 15.2061 4.64551L18.3545 7.79395C18.6076 8.04701 18.7499 8.39018 18.75 8.74805V20.5ZM3.75 20.5C3.75 20.9142 4.08579 21.25 4.5 21.25H16.5C16.9142 21.25 17.25 20.9142 17.25 20.5V8.81055L14.1895 5.75H4.5C4.08579 5.75 3.75 6.08579 3.75 6.5V20.5Z",
|
|
10202
|
+
fill: C
|
|
10203
|
+
}
|
|
10204
|
+
),
|
|
10205
|
+
/* @__PURE__ */ i(
|
|
10206
|
+
"path",
|
|
10207
|
+
{
|
|
10208
|
+
d: "M13.25 5C13.25 4.58579 13.5858 4.25 14 4.25C14.4142 4.25 14.75 4.58579 14.75 5V8.25H18C18.4142 8.25 18.75 8.58579 18.75 9C18.75 9.41421 18.4142 9.75 18 9.75H14.5996C13.8543 9.74979 13.2502 9.14567 13.25 8.40039V5Z",
|
|
10209
|
+
fill: C
|
|
10210
|
+
}
|
|
10211
|
+
)
|
|
10212
|
+
]
|
|
10161
10213
|
}
|
|
10162
10214
|
), k0 = ({
|
|
10163
10215
|
width: e = 20,
|
|
@@ -10193,7 +10245,7 @@ const a4 = ({
|
|
|
10193
10245
|
onClick: w
|
|
10194
10246
|
}) => {
|
|
10195
10247
|
const { theme: d } = Q(s1), a = r ? d && d === "dark" ? s.GREY_LIGHT_4 : s.GREY_DARK_1 : t, o = r ? void 0 : w, c = w && !r ? `${h || ""} clickable` : h;
|
|
10196
|
-
return /* @__PURE__ */ i(
|
|
10248
|
+
return /* @__PURE__ */ i(j, { children: (() => {
|
|
10197
10249
|
switch (e) {
|
|
10198
10250
|
case "arrow1Down":
|
|
10199
10251
|
return r4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
@@ -10218,9 +10270,9 @@ const a4 = ({
|
|
|
10218
10270
|
case "add":
|
|
10219
10271
|
return V4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10220
10272
|
case "list":
|
|
10221
|
-
return _4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10222
|
-
case "dragAndDrop":
|
|
10223
10273
|
return H4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10274
|
+
case "dragAndDrop":
|
|
10275
|
+
return _4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10224
10276
|
case "filter1":
|
|
10225
10277
|
return R4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10226
10278
|
case "filter2":
|
|
@@ -10282,9 +10334,9 @@ const a4 = ({
|
|
|
10282
10334
|
case "sortDown":
|
|
10283
10335
|
return $4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10284
10336
|
case "sortDouble":
|
|
10285
|
-
return j4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10286
|
-
case "search":
|
|
10287
10337
|
return F4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10338
|
+
case "search":
|
|
10339
|
+
return j4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10288
10340
|
case "arrowUpFilled":
|
|
10289
10341
|
return U4({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10290
10342
|
case "arrowDownFilled":
|
|
@@ -10346,7 +10398,7 @@ const a4 = ({
|
|
|
10346
10398
|
case "unpaidLeave":
|
|
10347
10399
|
return k0({ width: l, height: C, color: a, className: c, onClick: o });
|
|
10348
10400
|
default:
|
|
10349
|
-
return /* @__PURE__ */ i(
|
|
10401
|
+
return /* @__PURE__ */ i(j, { children: "No Icon provided" });
|
|
10350
10402
|
}
|
|
10351
10403
|
})() });
|
|
10352
10404
|
}, M0 = ({
|
|
@@ -10391,7 +10443,7 @@ const u0 = J((e, l) => {
|
|
|
10391
10443
|
width: a,
|
|
10392
10444
|
disabled: o = !1,
|
|
10393
10445
|
required: c = !1,
|
|
10394
|
-
clearable:
|
|
10446
|
+
clearable: H = !0,
|
|
10395
10447
|
scrollThresholdValue: u = 50,
|
|
10396
10448
|
onSearchChange: g,
|
|
10397
10449
|
onDropdownVisibleChange: f,
|
|
@@ -10409,7 +10461,7 @@ const u0 = J((e, l) => {
|
|
|
10409
10461
|
} = e;
|
|
10410
10462
|
let X;
|
|
10411
10463
|
r && r !== "single" && (X = e.overflowBehaviour ?? "responsive");
|
|
10412
|
-
const [b, U] = V(!1), [z, g1] = V(!1), [W, c1] = V(!1), [a1, C1] = V(!0), [
|
|
10464
|
+
const [b, U] = V(!1), [z, g1] = V(!1), [W, c1] = V(!1), [a1, C1] = V(!0), [_, $] = V(C), n1 = O(null), l1 = r === "single" && I === "badge";
|
|
10413
10465
|
K(() => {
|
|
10414
10466
|
$(C);
|
|
10415
10467
|
}, [C]);
|
|
@@ -10450,20 +10502,20 @@ const u0 = J((e, l) => {
|
|
|
10450
10502
|
}
|
|
10451
10503
|
}, [o, P, r, A]), i1 = y(
|
|
10452
10504
|
(L) => {
|
|
10453
|
-
const v =
|
|
10505
|
+
const v = _.filter((R) => R !== L);
|
|
10454
10506
|
P(v), $(v);
|
|
10455
10507
|
},
|
|
10456
|
-
[P,
|
|
10508
|
+
[P, _]
|
|
10457
10509
|
), N = y(
|
|
10458
|
-
(L) => (
|
|
10510
|
+
(L) => (_ == null ? void 0 : _.indexOf(L)) === 0 ? (
|
|
10459
10511
|
// if the search input is empty
|
|
10460
10512
|
// then display the placeholder, else do not display it
|
|
10461
10513
|
/* @__PURE__ */ i("span", { className: "custom-placeholder", children: a1 ? h : "" })
|
|
10462
|
-
) : /* @__PURE__ */ i(
|
|
10463
|
-
[a1,
|
|
10514
|
+
) : /* @__PURE__ */ i(j, {}),
|
|
10515
|
+
[a1, _, h]
|
|
10464
10516
|
), G = (L) => {
|
|
10465
10517
|
L.preventDefault(), L.stopPropagation();
|
|
10466
|
-
},
|
|
10518
|
+
}, F = async (L) => {
|
|
10467
10519
|
const { target: v } = L;
|
|
10468
10520
|
v.scrollTop + v.offsetHeight >= v.scrollHeight - u && (m == null || m(!0)), M && await M(L);
|
|
10469
10521
|
}, D = y(
|
|
@@ -10508,7 +10560,7 @@ const u0 = J((e, l) => {
|
|
|
10508
10560
|
}
|
|
10509
10561
|
},
|
|
10510
10562
|
[o, D, i1, N, I, d]
|
|
10511
|
-
), e1 = Array.isArray(
|
|
10563
|
+
), e1 = Array.isArray(_) && _.length > 0 || !!_ && typeof _ == "string" && _.trim() !== "";
|
|
10512
10564
|
return /* @__PURE__ */ n(
|
|
10513
10565
|
"div",
|
|
10514
10566
|
{
|
|
@@ -10536,7 +10588,7 @@ const u0 = J((e, l) => {
|
|
|
10536
10588
|
filterOption: w && p1,
|
|
10537
10589
|
onDropdownVisibleChange: m1,
|
|
10538
10590
|
disabled: o,
|
|
10539
|
-
value:
|
|
10591
|
+
value: _ || void 0,
|
|
10540
10592
|
labelRender: (L) => {
|
|
10541
10593
|
const v = D(L.value);
|
|
10542
10594
|
return o ? /* @__PURE__ */ i("span", { style: { color: s.GREY_DARK_1 }, children: v }) : v;
|
|
@@ -10556,10 +10608,10 @@ const u0 = J((e, l) => {
|
|
|
10556
10608
|
tagRender: (L) => T({ ...L, mode: r }),
|
|
10557
10609
|
maxTagCount: X === "responsive" ? "responsive" : void 0,
|
|
10558
10610
|
maxTagPlaceholder: (L) => B(L, I),
|
|
10559
|
-
onPopupScroll:
|
|
10611
|
+
onPopupScroll: F,
|
|
10560
10612
|
prefix: k && /* @__PURE__ */ i(A1, { size: "small" }),
|
|
10561
|
-
suffixIcon: /* @__PURE__ */ i("div", { className: "wrapper-suffix-icon", children: r !== "filter" && /* @__PURE__ */ n(
|
|
10562
|
-
|
|
10613
|
+
suffixIcon: /* @__PURE__ */ i("div", { className: "wrapper-suffix-icon", children: r !== "filter" && /* @__PURE__ */ n(j, { children: [
|
|
10614
|
+
_ && !!_.length && H && /* @__PURE__ */ i(
|
|
10563
10615
|
"div",
|
|
10564
10616
|
{
|
|
10565
10617
|
onClick: v1,
|
|
@@ -10599,7 +10651,7 @@ const u0 = J((e, l) => {
|
|
|
10599
10651
|
r && /* @__PURE__ */ i(
|
|
10600
10652
|
k2,
|
|
10601
10653
|
{
|
|
10602
|
-
checked: !!(
|
|
10654
|
+
checked: !!(_ != null && _.includes(L.value))
|
|
10603
10655
|
}
|
|
10604
10656
|
),
|
|
10605
10657
|
/* @__PURE__ */ n(w1, { alignItems: "center", gap: 8, children: [
|
|
@@ -10614,7 +10666,7 @@ const u0 = J((e, l) => {
|
|
|
10614
10666
|
/* @__PURE__ */ i("span", { children: L.label })
|
|
10615
10667
|
] })
|
|
10616
10668
|
] }),
|
|
10617
|
-
!r &&
|
|
10669
|
+
!r && _ === L.value && /* @__PURE__ */ i(d1, { name: "check", color: s.BLUE_DARK_1 })
|
|
10618
10670
|
] }),
|
|
10619
10671
|
dropdownRender: (L) => /* @__PURE__ */ n("div", { className: "dropdown-container", children: [
|
|
10620
10672
|
/* @__PURE__ */ i("div", { className: "dropdown-menu", children: S ? S(L) : L }),
|
|
@@ -10650,7 +10702,7 @@ const u0 = J((e, l) => {
|
|
|
10650
10702
|
width: 16
|
|
10651
10703
|
}
|
|
10652
10704
|
),
|
|
10653
|
-
typeof Z == "string" ? /* @__PURE__ */ i(
|
|
10705
|
+
typeof Z == "string" ? /* @__PURE__ */ i(j7, { color: s.NOTIFICATION_ERROR_DARK, variant: "body4", children: Z }) : Z
|
|
10654
10706
|
] })
|
|
10655
10707
|
]
|
|
10656
10708
|
}
|
|
@@ -10659,7 +10711,7 @@ const u0 = J((e, l) => {
|
|
|
10659
10711
|
function V0(e, l) {
|
|
10660
10712
|
return e === "filter" || l ? "multiple" : e === "single" ? void 0 : e;
|
|
10661
10713
|
}
|
|
10662
|
-
function
|
|
10714
|
+
function H0(e, l = 500) {
|
|
10663
10715
|
const C = O();
|
|
10664
10716
|
return K(() => () => {
|
|
10665
10717
|
C.current && clearTimeout(C.current);
|
|
@@ -10689,7 +10741,7 @@ const N1 = 100, h1 = {
|
|
|
10689
10741
|
placeholder: a,
|
|
10690
10742
|
mode: o,
|
|
10691
10743
|
loadOnClosedState: c,
|
|
10692
|
-
preloadOptions:
|
|
10744
|
+
preloadOptions: H,
|
|
10693
10745
|
extraOptions: u,
|
|
10694
10746
|
onDropdownVisibleChange: g,
|
|
10695
10747
|
optionRender: f,
|
|
@@ -10701,18 +10753,18 @@ const N1 = 100, h1 = {
|
|
|
10701
10753
|
variant: x = "outlined"
|
|
10702
10754
|
} = e, [k, A] = V(), [Z, I] = V(h1), [Y, X] = V(!1), [b, U] = V(), [z, g1] = V(!1), [W, c1] = V(
|
|
10703
10755
|
u ?? []
|
|
10704
|
-
), a1 = D1(Z.offset), C1 = D1(b), [
|
|
10756
|
+
), a1 = D1(Z.offset), C1 = D1(b), [_, $] = V(!1), n1 = O(!1), l1 = y(
|
|
10705
10757
|
async ({
|
|
10706
10758
|
limit: N = N1,
|
|
10707
10759
|
offset: G,
|
|
10708
|
-
search:
|
|
10760
|
+
search: F
|
|
10709
10761
|
}) => {
|
|
10710
10762
|
X(!0);
|
|
10711
10763
|
try {
|
|
10712
10764
|
const D = await C({
|
|
10713
10765
|
limit: N,
|
|
10714
10766
|
offset: G,
|
|
10715
|
-
search:
|
|
10767
|
+
search: F
|
|
10716
10768
|
});
|
|
10717
10769
|
A(
|
|
10718
10770
|
(B) => G === 0 ? D.options : [...B ?? [], ...D.options]
|
|
@@ -10727,7 +10779,7 @@ const N1 = 100, h1 = {
|
|
|
10727
10779
|
}
|
|
10728
10780
|
},
|
|
10729
10781
|
[C]
|
|
10730
|
-
), m1 =
|
|
10782
|
+
), m1 = H0((N) => {
|
|
10731
10783
|
U(N), N || I(h1);
|
|
10732
10784
|
}), p1 = y(
|
|
10733
10785
|
(N) => m1(N),
|
|
@@ -10748,13 +10800,13 @@ const N1 = 100, h1 = {
|
|
|
10748
10800
|
);
|
|
10749
10801
|
K(() => {
|
|
10750
10802
|
if (!n1.current || Y) return;
|
|
10751
|
-
(
|
|
10752
|
-
}, [
|
|
10753
|
-
(c ||
|
|
10803
|
+
(_ || z && (a1 !== Z.offset || C1 !== b || !k)) && (l1({ offset: Z.offset, limit: N1, search: b }), _ && $(!1));
|
|
10804
|
+
}, [_, z, Z.offset, b, a1, C1, k, Y]), K(() => {
|
|
10805
|
+
(c || H) && l1(h1), n1.current = !0;
|
|
10754
10806
|
}, []), K(() => {
|
|
10755
10807
|
u && c1((N) => {
|
|
10756
10808
|
const G = u.filter(
|
|
10757
|
-
(
|
|
10809
|
+
(F) => !N.some((D) => D.value === F.value)
|
|
10758
10810
|
);
|
|
10759
10811
|
return [...N, ...G];
|
|
10760
10812
|
});
|
|
@@ -10764,12 +10816,12 @@ const N1 = 100, h1 = {
|
|
|
10764
10816
|
h && h(N);
|
|
10765
10817
|
let G = [];
|
|
10766
10818
|
if (o ? G = Array.isArray(N) ? N : [] : G = N ? [N] : [], b) {
|
|
10767
|
-
const
|
|
10819
|
+
const F = G.filter(
|
|
10768
10820
|
(D) => !(W != null && W.some((B) => B.value === D))
|
|
10769
10821
|
);
|
|
10770
|
-
|
|
10822
|
+
F.length > 0 && c1((D = []) => [
|
|
10771
10823
|
...D,
|
|
10772
|
-
...
|
|
10824
|
+
...F.map((B) => {
|
|
10773
10825
|
const T = k == null ? void 0 : k.find((e1) => e1.value === B);
|
|
10774
10826
|
return {
|
|
10775
10827
|
value: B,
|
|
@@ -10831,7 +10883,7 @@ const N1 = 100, h1 = {
|
|
|
10831
10883
|
}
|
|
10832
10884
|
}));
|
|
10833
10885
|
const i1 = V1(() => {
|
|
10834
|
-
const N = o && o !== "single", G = e.selectedItemVariant === "badge",
|
|
10886
|
+
const N = o && o !== "single", G = e.selectedItemVariant === "badge", F = G ? k || [] : k || [], D = W, B = e, e1 = N ? {
|
|
10835
10887
|
mode: o,
|
|
10836
10888
|
overflowBehaviour: B.overflowBehaviour,
|
|
10837
10889
|
value: B.value
|
|
@@ -10843,7 +10895,7 @@ const N1 = 100, h1 = {
|
|
|
10843
10895
|
...v1,
|
|
10844
10896
|
...e1,
|
|
10845
10897
|
selectedItemVariant: e.selectedItemVariant,
|
|
10846
|
-
options:
|
|
10898
|
+
options: F,
|
|
10847
10899
|
extraOptions: D
|
|
10848
10900
|
};
|
|
10849
10901
|
}, [o, e, v1, W, k]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snmt-react-ui/async-select",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/async-select.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@snmt-react-ui/select": "^1.29.
|
|
21
|
+
"@snmt-react-ui/select": "^1.29.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"antd": "^5.18.3",
|
|
25
25
|
"react": ">=18.2.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "70ef18b3879cb0bdaaf12ea2a202fc7194aadc2e"
|
|
28
28
|
}
|