@ck-ui/component-library 2.0.4 → 2.0.5
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/{DropdownFooter-W4D9bbd6.js → DropdownFooter-DYusPa5E.js} +4 -3
- package/dist/assets/TableChipCell-B2fEKEbC.css +1 -0
- package/dist/assets/index-BB_JksPb.css +1 -0
- package/dist/assets/{index-BJ3ki-dZ.css → index-C8_uOajQ.css} +1 -1
- package/dist/assets/index-Ceh4ivv5.css +1 -0
- package/dist/assets/styles-BYpypz4h.css +1 -0
- package/dist/assets/{styles-CnUruVcX.css → styles-DU_mFQrB.css} +1 -1
- package/dist/assets/styles-Dikgm2G4.css +1 -0
- package/dist/components/Breadcrumb/index.js +51 -51
- package/dist/components/CKBadge/_types/ckBadge.types.d.ts +3 -1
- package/dist/components/CKBadge/_types/ckBadge.types.d.ts.map +1 -1
- package/dist/components/CKBadge/index.d.ts +1 -1
- package/dist/components/CKBadge/index.d.ts.map +1 -1
- package/dist/components/CKBadge/index.js +35 -32
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +74 -42
- package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/helpers.js +5 -5
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +418 -389
- package/dist/components/GroupedMultiSelect/_constant/constants.d.ts +2 -0
- package/dist/components/GroupedMultiSelect/_constant/constants.d.ts.map +1 -0
- package/dist/components/GroupedMultiSelect/_constant/constants.js +4 -0
- package/dist/components/GroupedMultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/MenuItem.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/MenuList.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/OptionsList.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/SearchResult.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/TriggerButton.js +113 -67
- package/dist/components/GroupedMultiSelect/index.d.ts.map +1 -1
- package/dist/components/GroupedMultiSelect/index.js +187 -164
- package/dist/components/GroupedSingleSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/GroupedSingleSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/GroupedSingleSelect/_helpers/OptionsList.js +1 -1
- package/dist/components/GroupedSingleSelect/_helpers/TriggerButton.js +1 -1
- package/dist/components/GroupedSingleSelect/index.d.ts.map +1 -1
- package/dist/components/GroupedSingleSelect/index.js +113 -97
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +4 -3
- package/dist/components/SingleSelectDropdown/index.js +6 -5
- package/dist/components/Table/_helpers/ColumnManager/index.js +1 -1
- package/dist/components/Table/_helpers/FilterColumnToolbar.js +1 -1
- package/dist/components/Table/_helpers/TableChipCell.d.ts +21 -0
- package/dist/components/Table/_helpers/TableChipCell.d.ts.map +1 -0
- package/dist/components/Table/_helpers/TableChipCell.js +158 -0
- package/dist/components/Table/_types/table.types.d.ts +12 -1
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +673 -402
- package/dist/main.d.ts +4 -3
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +116 -114
- package/dist/styles.module-D5ab7LbM.js +40 -0
- package/dist/styles.module-Y7TzrS2V.js +51 -0
- package/dist/table-filter-BwC2jvAO.js +8 -0
- package/package.json +1 -1
- package/dist/assets/index-DZaWJ3P3.css +0 -1
- package/dist/assets/index-DlcdXqx_.css +0 -1
- package/dist/assets/styles-B4HnRCM5.css +0 -1
- package/dist/assets/styles-DVAtoUQM.css +0 -1
- package/dist/styles.module-DBuEcddZ.js +0 -29
- package/dist/styles.module-DKDRix10.js +0 -39
- package/dist/table-filter-C0zetUfo.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../lib/components/GroupedMultiSelect/_constant/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { s as a } from "../../../styles.module-
|
|
2
|
+
import { s as a } from "../../../styles.module-Y7TzrS2V.js";
|
|
3
3
|
import { CKButton as o } from "../../CKButton/index.js";
|
|
4
4
|
import { mergeClasses as r } from "../../../utils/mergeClasses.js";
|
|
5
5
|
const f = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as f, useState as l, useLayoutEffect as d } from "react";
|
|
3
3
|
import { Tooltip as u } from "../../Tooltip/index.js";
|
|
4
|
-
import { s as a } from "../../../styles.module-
|
|
4
|
+
import { s as a } from "../../../styles.module-Y7TzrS2V.js";
|
|
5
5
|
import { mergeClasses as p } from "../../../utils/mergeClasses.js";
|
|
6
6
|
const k = ({ item: { value: c, label: t } }) => {
|
|
7
7
|
const s = f(null), [m, i] = l(!1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { s } from "../../../styles.module-
|
|
2
|
+
import { s } from "../../../styles.module-Y7TzrS2V.js";
|
|
3
3
|
import i from "./MenuItem.js";
|
|
4
4
|
const a = ({ selected: t }) => /* @__PURE__ */ r("div", { className: s["menu-list"], children: t?.map((e, m) => m < 2 ? null : /* @__PURE__ */ r(i, { item: e }, e?.value)) });
|
|
5
5
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as a, useCallback as l } from "react";
|
|
3
|
-
import { s as m } from "../../../styles.module-
|
|
3
|
+
import { s as m } from "../../../styles.module-Y7TzrS2V.js";
|
|
4
4
|
import { CKCheckbox as d } from "../../CKCheckbox/index.js";
|
|
5
5
|
import { mergeClasses as t } from "../../../utils/mergeClasses.js";
|
|
6
6
|
const u = a(function({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { s as e } from "../../../styles.module-
|
|
2
|
+
import { s as e } from "../../../styles.module-Y7TzrS2V.js";
|
|
3
3
|
import { CKCheckbox as u } from "../../CKCheckbox/index.js";
|
|
4
4
|
import b from "./OptionRow.js";
|
|
5
5
|
import { mergeClasses as s } from "../../../utils/mergeClasses.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { s as e } from "../../../styles.module-
|
|
2
|
+
import { s as e } from "../../../styles.module-Y7TzrS2V.js";
|
|
3
3
|
import { Toggle as t } from "../../Toggle/index.js";
|
|
4
4
|
import { mergeClasses as r } from "../../../utils/mergeClasses.js";
|
|
5
5
|
const h = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import h, { useCallback as l, useRef as v, useState as g, useLayoutEffect as w } from "react";
|
|
3
3
|
import { S as C } from "../../../cancel-BAgTEOGD.js";
|
|
4
|
-
import { s } from "../../../styles.module-
|
|
4
|
+
import { s } from "../../../styles.module-Y7TzrS2V.js";
|
|
5
5
|
import { Tooltip as O } from "../../Tooltip/index.js";
|
|
6
6
|
const T = h.memo(function({
|
|
7
7
|
label: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerButton.d.ts","sourceRoot":"","sources":["../../../../lib/components/GroupedMultiSelect/_helpers/TriggerButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TriggerButton.d.ts","sourceRoot":"","sources":["../../../../lib/components/GroupedMultiSelect/_helpers/TriggerButton.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAIzD,QAAA,MAAM,aAAa,GAAI,8FASpB,kBAAkB,4CAsHpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,73 +1,119 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
import { jsxs as l, jsx as r, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as C, useCallback as M, useLayoutEffect as y } from "react";
|
|
3
|
+
import { s as e } from "../../../styles.module-Y7TzrS2V.js";
|
|
4
|
+
import { CKTag as B } from "../../CKTag/index.js";
|
|
5
|
+
import { S as R } from "../../../chevron-down-Cm9R64Fe.js";
|
|
6
|
+
import S from "./TagContent.js";
|
|
7
|
+
import x from "./MenuList.js";
|
|
8
|
+
import { mergeClasses as t } from "../../../utils/mergeClasses.js";
|
|
9
|
+
import { HOVER_CLOSE_DELAY as H } from "../_constant/constants.js";
|
|
10
|
+
const K = ({
|
|
11
|
+
open: u,
|
|
12
|
+
selected: n,
|
|
13
|
+
placeholder: b,
|
|
14
|
+
showMenu: E,
|
|
15
|
+
onToggleOpen: L,
|
|
16
|
+
onToggleMenu: k,
|
|
17
|
+
onRemove: p,
|
|
18
|
+
classNames: m
|
|
19
|
+
}) => {
|
|
20
|
+
const [N, f] = w(!1), [O, h] = w(!1), a = C(null), s = C(null), d = M((o) => {
|
|
21
|
+
o.stopPropagation(), s.current && (clearTimeout(s.current), s.current = null), f(!0);
|
|
22
|
+
}, []), g = M((o) => {
|
|
23
|
+
o.stopPropagation(), s.current = setTimeout(() => {
|
|
24
|
+
f(!1);
|
|
25
|
+
}, H);
|
|
26
|
+
}, []), c = E || N, v = n?.length > 2;
|
|
27
|
+
return y(() => {
|
|
28
|
+
if (!c || !a.current) return;
|
|
29
|
+
const i = a.current.getBoundingClientRect();
|
|
30
|
+
window.innerHeight - i.bottom < 0 ? h(!0) : h(!1);
|
|
31
|
+
}, [c]), /* @__PURE__ */ l(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
className: t(
|
|
35
|
+
e.trigger,
|
|
36
|
+
u ? e["trigger-open"] : "",
|
|
37
|
+
m?.dropdownOpenerWrapperClass
|
|
38
|
+
),
|
|
39
|
+
onClick: L,
|
|
40
|
+
type: "button",
|
|
41
|
+
children: [
|
|
42
|
+
n?.length > 0 ? /* @__PURE__ */ l(T, { children: [
|
|
43
|
+
/* @__PURE__ */ l("div", { className: e["selected-tags-container"], children: [
|
|
44
|
+
n?.map((o, i) => i > 1 ? null : /* @__PURE__ */ r(
|
|
45
|
+
B,
|
|
46
|
+
{
|
|
47
|
+
variation: "INFO",
|
|
48
|
+
size: "small",
|
|
49
|
+
fill: "soft",
|
|
50
|
+
children: /* @__PURE__ */ r(
|
|
51
|
+
S,
|
|
52
|
+
{
|
|
53
|
+
label: o?.label,
|
|
54
|
+
value: o?.value,
|
|
55
|
+
onRemove: p
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
},
|
|
59
|
+
o?.value
|
|
60
|
+
)),
|
|
61
|
+
v && /* @__PURE__ */ l(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: t(
|
|
65
|
+
"ckds-cap-med",
|
|
66
|
+
e["overflow-count"]
|
|
67
|
+
),
|
|
68
|
+
onMouseEnter: d,
|
|
69
|
+
onMouseLeave: g,
|
|
70
|
+
onClick: k,
|
|
71
|
+
children: [
|
|
72
|
+
"...+",
|
|
73
|
+
n?.length - 2
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] }),
|
|
78
|
+
v && c && /* @__PURE__ */ r(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref: a,
|
|
82
|
+
className: t(
|
|
83
|
+
e["overflow-menu-portal"],
|
|
84
|
+
O ? e["overflow-menu-portal-up"] : ""
|
|
85
|
+
),
|
|
86
|
+
onMouseEnter: d,
|
|
87
|
+
onMouseLeave: g,
|
|
88
|
+
children: /* @__PURE__ */ r(x, { selected: n, handleChecked: p })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] }) : /* @__PURE__ */ r(
|
|
38
92
|
"span",
|
|
39
93
|
{
|
|
40
|
-
className:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
94
|
+
className: t(
|
|
95
|
+
"ckds-body-sm-reg",
|
|
96
|
+
e.placeholder,
|
|
97
|
+
m?.placeholderClass
|
|
98
|
+
),
|
|
99
|
+
children: b
|
|
46
100
|
}
|
|
47
101
|
),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
className: l(r.chevron, s ? r["chevron-up"] : ""),
|
|
64
|
-
width: "14",
|
|
65
|
-
height: "14"
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
);
|
|
102
|
+
/* @__PURE__ */ r(
|
|
103
|
+
R,
|
|
104
|
+
{
|
|
105
|
+
className: t(
|
|
106
|
+
e.chevron,
|
|
107
|
+
u ? e["chevron-up"] : ""
|
|
108
|
+
),
|
|
109
|
+
width: "14",
|
|
110
|
+
height: "14"
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
};
|
|
71
117
|
export {
|
|
72
|
-
|
|
118
|
+
K as default
|
|
73
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/GroupedMultiSelect/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/GroupedMultiSelect/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAgB,MAAM,eAAe,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI/E,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,WAAgC,EAChC,iBAA4B,EAC5B,MAAM,EACN,eAAe,EACf,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAe,EACf,cAAc,GACf,EAAE,uBAAuB,2CAiOzB"}
|
|
@@ -1,176 +1,199 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { s as
|
|
4
|
-
import { Search as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { getDefaultSelected as
|
|
10
|
-
import { selectAllOptions as
|
|
11
|
-
import { getResponsePayload as
|
|
12
|
-
import { filterSeachedGroups as
|
|
13
|
-
import { computeApplyDisabled as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsxs as f, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as z, useEffect as ce, useMemo as b, useCallback as r } from "react";
|
|
3
|
+
import { s as t } from "../../styles.module-Y7TzrS2V.js";
|
|
4
|
+
import { Search as ie } from "../Search/index.js";
|
|
5
|
+
import de from "./_helpers/SearchResult.js";
|
|
6
|
+
import pe from "./_helpers/TriggerButton.js";
|
|
7
|
+
import me from "./_helpers/OptionsList.js";
|
|
8
|
+
import fe from "./_helpers/DropdownFooter.js";
|
|
9
|
+
import { getDefaultSelected as ue } from "./_utils/getDefaultSelected.js";
|
|
10
|
+
import { selectAllOptions as he } from "./_utils/selectAllOptions.js";
|
|
11
|
+
import { getResponsePayload as ge } from "./_utils/getResponsePayload.js";
|
|
12
|
+
import { filterSeachedGroups as Se } from "./_utils/filterSeachedGroups.js";
|
|
13
|
+
import { computeApplyDisabled as we } from "./_utils/computeApplyDisabled.js";
|
|
14
|
+
import { useDropdownDirection as Ce } from "../MultiSelect/_utils/useDropdownDirection.js";
|
|
15
|
+
import { S as be } from "../../info-icon-ooYw3va_.js";
|
|
16
|
+
import { mergeClasses as O } from "../../utils/mergeClasses.js";
|
|
17
|
+
function ze({
|
|
18
|
+
label: k,
|
|
19
|
+
helperText: v,
|
|
20
|
+
required: P,
|
|
21
|
+
placeholder: Q = "Choose parameter",
|
|
22
|
+
searchPlaceholder: W = "Search",
|
|
23
|
+
groups: n,
|
|
24
|
+
defaultSelected: q,
|
|
25
|
+
onApply: N,
|
|
25
26
|
exclude: y,
|
|
26
|
-
setExclude:
|
|
27
|
-
onSelect:
|
|
28
|
-
onClear:
|
|
29
|
-
classNames:
|
|
30
|
-
showExcludeBtn:
|
|
27
|
+
setExclude: x,
|
|
28
|
+
onSelect: T,
|
|
29
|
+
onClear: E,
|
|
30
|
+
classNames: u = {},
|
|
31
|
+
showExcludeBtn: B
|
|
31
32
|
}) {
|
|
32
|
-
const { labelWrapperClass:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
const { labelWrapperClass: F, helperClass: H, dividerClass: J } = u, [h, g] = m(!1), [S, G] = m(""), I = () => ue(q), [p, L] = m(I), [a, w] = m(I), [K, l] = m(!1), [U, C] = m(!1), D = z(null), $ = z(null), { vertical: A, horizontal: V } = Ce(
|
|
34
|
+
$,
|
|
35
|
+
h
|
|
36
|
+
);
|
|
37
|
+
ce(() => {
|
|
38
|
+
const e = (o) => {
|
|
39
|
+
D?.current && !D?.current?.contains(o.target) && (g(!1), l(!1));
|
|
36
40
|
};
|
|
37
41
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
38
42
|
}, []);
|
|
39
|
-
const
|
|
40
|
-
() =>
|
|
41
|
-
[
|
|
42
|
-
),
|
|
43
|
-
() =>
|
|
44
|
-
[
|
|
45
|
-
),
|
|
46
|
-
|
|
47
|
-
}, []),
|
|
48
|
-
() =>
|
|
49
|
-
[
|
|
50
|
-
),
|
|
51
|
-
(e,
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
return C(
|
|
55
|
-
}),
|
|
56
|
-
const
|
|
57
|
-
return C(
|
|
58
|
-
}),
|
|
43
|
+
const R = b(
|
|
44
|
+
() => Se(n, S),
|
|
45
|
+
[n, S]
|
|
46
|
+
), X = b(
|
|
47
|
+
() => R?.reduce((e, o) => e + o?.options?.length, 0),
|
|
48
|
+
[R]
|
|
49
|
+
), Y = r(() => {
|
|
50
|
+
G("");
|
|
51
|
+
}, []), M = b(
|
|
52
|
+
() => n?.reduce((e, o) => e + o?.options?.length, 0),
|
|
53
|
+
[n]
|
|
54
|
+
), j = r(
|
|
55
|
+
(e, o, se, ae) => {
|
|
56
|
+
se || l(!1), ae && L((c) => {
|
|
57
|
+
const i = c?.some((d) => d?.value === e) ? c?.filter((d) => d?.value !== e) : [...c, { value: e, label: o }];
|
|
58
|
+
return C(i?.length === M), i?.length <= 2 && l(!1), i;
|
|
59
|
+
}), w((c) => {
|
|
60
|
+
const i = c?.some((d) => d?.value === e) ? c?.filter((d) => d?.value !== e) : [...c, { value: e, label: o }];
|
|
61
|
+
return C(i?.length === M), i?.length <= 2 && l(!1), i;
|
|
62
|
+
}), T?.();
|
|
59
63
|
},
|
|
60
|
-
[
|
|
61
|
-
),
|
|
62
|
-
l(!1), C((e) => (
|
|
63
|
-
}, [
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
|
|
69
|
-
}, []),
|
|
70
|
-
e.stopPropagation(), l((
|
|
71
|
-
}, []),
|
|
72
|
-
l(!1),
|
|
73
|
-
}, [
|
|
74
|
-
|
|
75
|
-
}, []),
|
|
76
|
-
() =>
|
|
77
|
-
[
|
|
64
|
+
[T, M]
|
|
65
|
+
), Z = r(() => {
|
|
66
|
+
l(!1), C((e) => (w(() => e ? [] : he(n)), !e));
|
|
67
|
+
}, [n]), _ = r(() => {
|
|
68
|
+
w([]), C(!1), E?.();
|
|
69
|
+
}, [E]), ee = r(() => {
|
|
70
|
+
N(ge(n, a), y), g(!1), L(a);
|
|
71
|
+
}, [n, a, y, N]), te = r(() => {
|
|
72
|
+
g((e) => !e), l(!1);
|
|
73
|
+
}, []), oe = r((e) => {
|
|
74
|
+
e.stopPropagation(), l((o) => !o);
|
|
75
|
+
}, []), le = r(() => {
|
|
76
|
+
l(!1), w(p), g(!1);
|
|
77
|
+
}, [p]), re = r((e) => {
|
|
78
|
+
G(e);
|
|
79
|
+
}, []), ne = b(
|
|
80
|
+
() => we(a, p),
|
|
81
|
+
[a, p]
|
|
78
82
|
);
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
return /* @__PURE__ */ f(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: t["ckds-group-multi-select-wrapper"],
|
|
87
|
+
ref: D,
|
|
88
|
+
children: [
|
|
89
|
+
k && /* @__PURE__ */ f(
|
|
90
|
+
"span",
|
|
91
|
+
{
|
|
92
|
+
className: O(
|
|
93
|
+
"ckds-body-xs-med",
|
|
94
|
+
t["label-wrapper"],
|
|
95
|
+
F
|
|
96
|
+
),
|
|
97
|
+
children: [
|
|
98
|
+
k,
|
|
99
|
+
P && /* @__PURE__ */ s("span", { className: t.required, children: " *" })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
87
102
|
),
|
|
88
|
-
children: [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
103
|
+
/* @__PURE__ */ f("div", { className: t["trigger-wrapper"], ref: $, children: [
|
|
104
|
+
/* @__PURE__ */ s(
|
|
105
|
+
pe,
|
|
106
|
+
{
|
|
107
|
+
open: h,
|
|
108
|
+
selected: p,
|
|
109
|
+
placeholder: Q,
|
|
110
|
+
showMenu: K,
|
|
111
|
+
onToggleOpen: te,
|
|
112
|
+
onToggleMenu: oe,
|
|
113
|
+
onRemove: j,
|
|
114
|
+
classNames: u
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ f(
|
|
118
|
+
"div",
|
|
119
|
+
{
|
|
120
|
+
className: O(
|
|
121
|
+
"ckds-body-xs-reg",
|
|
122
|
+
t["helper-text"],
|
|
123
|
+
h ? t["helper-hide"] : "",
|
|
124
|
+
H
|
|
125
|
+
),
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ s(be, { width: "12", height: "12" }),
|
|
128
|
+
" ",
|
|
129
|
+
v
|
|
130
|
+
]
|
|
131
|
+
}
|
|
116
132
|
),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
133
|
+
h && /* @__PURE__ */ f(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
className: O(
|
|
137
|
+
t.dropdown,
|
|
138
|
+
t[`dropdown-align-${V}`],
|
|
139
|
+
A === "up" ? t["dropdown-up"] : "",
|
|
140
|
+
v && A === "down" ? t["dropdown-helper"] : "",
|
|
141
|
+
v && A === "up" ? t["dropdown-helper-up"] : ""
|
|
142
|
+
),
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ s(
|
|
145
|
+
ie,
|
|
146
|
+
{
|
|
147
|
+
size: "medium",
|
|
148
|
+
value: S,
|
|
149
|
+
placeholder: W,
|
|
150
|
+
onChange: re,
|
|
151
|
+
onClear: Y
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ s(
|
|
155
|
+
de,
|
|
156
|
+
{
|
|
157
|
+
totalSearchResults: X,
|
|
158
|
+
exclude: y,
|
|
159
|
+
setExclude: x,
|
|
160
|
+
isToggleDisable: p?.length === 0,
|
|
161
|
+
showExcludeBtn: B
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ s("div", { className: `${t.divider} ${J}` }),
|
|
165
|
+
/* @__PURE__ */ s(
|
|
166
|
+
me,
|
|
167
|
+
{
|
|
168
|
+
filteredGroups: R,
|
|
169
|
+
selected: a,
|
|
170
|
+
isAllSelected: U,
|
|
171
|
+
searchQuery: S,
|
|
172
|
+
onToggle: j,
|
|
173
|
+
onSelectAll: Z,
|
|
174
|
+
setShowMenu: l,
|
|
175
|
+
classNames: u
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ s(
|
|
179
|
+
fe,
|
|
180
|
+
{
|
|
181
|
+
onClear: _,
|
|
182
|
+
onCancel: le,
|
|
183
|
+
onApply: ee,
|
|
184
|
+
classNames: u,
|
|
185
|
+
isClearDisabled: a?.length === 0,
|
|
186
|
+
isApplyDisabled: ne
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
] })
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
173
196
|
}
|
|
174
197
|
export {
|
|
175
|
-
|
|
198
|
+
ze as GroupedMultiSelect
|
|
176
199
|
};
|