impact-nova 1.7.32 → 1.7.34
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/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.d.ts +23 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +234 -73
- package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +1 -0
- package/dist/components/ui/create-item-flow/create-item-flow.d.ts +2 -16
- package/dist/components/ui/create-item-flow/create-item-flow.js +119 -155
- package/dist/components/ui/create-item-flow/index.d.ts +1 -1
- package/dist/components/ui/create-item-flow/index.js +10 -10
- package/dist/components/ui/data-table/data-table-column-list.js +135 -115
- package/dist/components/ui/data-table/data-table-saved-views.js +176 -162
- package/dist/components/ui/filter-strip/filter-summary.js +173 -133
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +19 -19
- package/dist/components/ui/select/select.js +310 -284
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +30 -30
- package/package.json +1 -1
|
@@ -1,86 +1,91 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Popover as
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Separator as
|
|
9
|
-
import { Tabs as
|
|
10
|
-
import { Input as
|
|
11
|
-
import { Badge as
|
|
12
|
-
import { Skeleton as
|
|
13
|
-
import { useImpactNovaI18n as
|
|
14
|
-
const
|
|
3
|
+
import { ChevronDown as ee, Search as te, Trash2 as ae, Pencil as le, Star as re } from "lucide-react";
|
|
4
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
5
|
+
import { Popover as ie, PopoverTrigger as ne, PopoverContent as se } from "../popover.js";
|
|
6
|
+
import { Tooltip as f, TooltipTrigger as u, TooltipContent as h } from "../tooltip.js";
|
|
7
|
+
import { Button as G } from "../button.js";
|
|
8
|
+
import { Separator as M } from "../separator.js";
|
|
9
|
+
import { Tabs as oe, TabsList as ce, TabsTrigger as $ } from "../tabs.js";
|
|
10
|
+
import { Input as de } from "../input.js";
|
|
11
|
+
import { Badge as pe } from "../badge.js";
|
|
12
|
+
import { Skeleton as fe } from "../skeleton.js";
|
|
13
|
+
import { useImpactNovaI18n as ue } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
14
|
+
const Ie = ({
|
|
15
15
|
selectedFilter: m,
|
|
16
|
-
onSelectedFilterChange:
|
|
17
|
-
savedFilters:
|
|
18
|
-
recentFilters:
|
|
19
|
-
onApplySavedFilter:
|
|
20
|
-
onSavedFilterSearch:
|
|
21
|
-
onSavedFiltersScroll:
|
|
22
|
-
onDropdownOpenChange:
|
|
23
|
-
isLoadingFilterPreferencesList:
|
|
24
|
-
onEditSavedFilter:
|
|
25
|
-
onDeleteSavedFilter:
|
|
26
|
-
onSetDefaultSavedFilter:
|
|
16
|
+
onSelectedFilterChange: L,
|
|
17
|
+
savedFilters: w,
|
|
18
|
+
recentFilters: S,
|
|
19
|
+
onApplySavedFilter: Q,
|
|
20
|
+
onSavedFilterSearch: N,
|
|
21
|
+
onSavedFiltersScroll: _,
|
|
22
|
+
onDropdownOpenChange: z,
|
|
23
|
+
isLoadingFilterPreferencesList: U = !1,
|
|
24
|
+
onEditSavedFilter: k,
|
|
25
|
+
onDeleteSavedFilter: I,
|
|
26
|
+
onSetDefaultSavedFilter: T
|
|
27
27
|
}) => {
|
|
28
|
-
const { t: r } =
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const { t: r } = ue(), [b, P] = i.useState(!1), [O, B] = i.useState(null), [A, R] = i.useState(null);
|
|
29
|
+
i.useEffect(() => {
|
|
30
|
+
const a = w?.find((d) => d.isDefault);
|
|
31
|
+
a && a.id !== A && R(a.id);
|
|
32
|
+
}, [w, A]);
|
|
33
|
+
const V = (a) => {
|
|
34
|
+
P(a), z?.(a);
|
|
35
|
+
}, [D, Y] = i.useState(""), [x, q] = i.useState(""), [c, H] = i.useState("All"), [p, j] = i.useState(null);
|
|
31
36
|
i.useEffect(() => {
|
|
32
37
|
const a = setTimeout(() => {
|
|
33
|
-
|
|
38
|
+
q(D);
|
|
34
39
|
}, 300);
|
|
35
40
|
return () => clearTimeout(a);
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
}, [D]), i.useEffect(() => {
|
|
42
|
+
N && N(
|
|
43
|
+
x,
|
|
44
|
+
c === "All" ? void 0 : c
|
|
40
45
|
);
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
46
|
+
}, [x, c, N]), i.useEffect(() => {
|
|
47
|
+
b && j({ label: m });
|
|
48
|
+
}, [b, m]);
|
|
49
|
+
const J = (a) => {
|
|
50
|
+
Y(a.target.value);
|
|
51
|
+
}, K = () => {
|
|
52
|
+
p && (L?.(p.label), p.savedItem && Q?.(p.savedItem), P(!1));
|
|
53
|
+
}, W = () => {
|
|
54
|
+
P(!1);
|
|
55
|
+
}, X = () => !S || S.length === 0 ? null : /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
|
|
51
56
|
/* @__PURE__ */ e("div", { className: "px-1 py-[6px] text-xs font-medium text-[#60697d] font-['Manrope']", children: "Recent" }),
|
|
52
|
-
/* @__PURE__ */ e("div", { className: "mb-[6px] flex flex-col", children:
|
|
53
|
-
const
|
|
57
|
+
/* @__PURE__ */ e("div", { className: "mb-[6px] flex flex-col", children: S.map((a, d) => {
|
|
58
|
+
const s = a.map((C) => C.label).join(", "), g = p?.label === s;
|
|
54
59
|
return /* @__PURE__ */ e(
|
|
55
60
|
"button",
|
|
56
61
|
{
|
|
57
62
|
type: "button",
|
|
58
|
-
className:
|
|
63
|
+
className: o(
|
|
59
64
|
"flex cursor-pointer flex-row px-3 py-2 rounded-lg hover:bg-[#f5f6fa] w-full text-left bg-transparent border-none",
|
|
60
|
-
|
|
65
|
+
g && "bg-[#edf0ff]"
|
|
61
66
|
),
|
|
62
|
-
onClick: () =>
|
|
63
|
-
children: /* @__PURE__ */ l(
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
/* @__PURE__ */ e(h, { variant: "tertiary", side: "right", children:
|
|
67
|
+
onClick: () => j({ label: s }),
|
|
68
|
+
children: /* @__PURE__ */ l(f, { children: [
|
|
69
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "text-sm font-['Manrope'] truncate text-[#1f2b4d]", children: s }) }),
|
|
70
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "right", children: s })
|
|
66
71
|
] })
|
|
67
72
|
},
|
|
68
73
|
d
|
|
69
74
|
);
|
|
70
75
|
}) }),
|
|
71
|
-
/* @__PURE__ */ e(
|
|
72
|
-
] }),
|
|
73
|
-
if (
|
|
74
|
-
return /* @__PURE__ */ e("div", { className: "flex max-h-[160px] flex-col overflow-y-auto px-3 py-2 space-y-2", children: [1, 2, 3, 4, 5].map((t) => /* @__PURE__ */ e(
|
|
75
|
-
let a =
|
|
76
|
-
(t) =>
|
|
76
|
+
/* @__PURE__ */ e(M, { className: "mb-2" })
|
|
77
|
+
] }), Z = () => {
|
|
78
|
+
if (U)
|
|
79
|
+
return /* @__PURE__ */ e("div", { className: "flex max-h-[160px] flex-col overflow-y-auto px-3 py-2 space-y-2", children: [1, 2, 3, 4, 5].map((t) => /* @__PURE__ */ e(fe, { className: "h-9 w-full rounded-lg" }, t)) });
|
|
80
|
+
let a = w?.filter(
|
|
81
|
+
(t) => c === "All" || t.type === c
|
|
77
82
|
);
|
|
78
|
-
if (!
|
|
79
|
-
(t) => t.label.toLowerCase().includes(
|
|
83
|
+
if (!N && x && (a = a?.filter(
|
|
84
|
+
(t) => t.label.toLowerCase().includes(x.toLowerCase())
|
|
80
85
|
)), !a || a.length === 0) {
|
|
81
86
|
let t = "No saved filters found";
|
|
82
|
-
if (!!
|
|
83
|
-
switch (
|
|
87
|
+
if (!!x)
|
|
88
|
+
switch (c) {
|
|
84
89
|
case "Personal":
|
|
85
90
|
t = "No personal filters match your search";
|
|
86
91
|
break;
|
|
@@ -91,7 +96,7 @@ const Ce = ({
|
|
|
91
96
|
t = "No saved filters match your search";
|
|
92
97
|
}
|
|
93
98
|
else
|
|
94
|
-
switch (
|
|
99
|
+
switch (c) {
|
|
95
100
|
case "Personal":
|
|
96
101
|
t = "You haven't created any personal filters yet.";
|
|
97
102
|
break;
|
|
@@ -103,87 +108,102 @@ const Ce = ({
|
|
|
103
108
|
}
|
|
104
109
|
return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-8 text-center min-h-[100px] px-6", children: /* @__PURE__ */ e("span", { className: "text-sm text-[#60697d] font-['Manrope'] leading-relaxed", children: t }) });
|
|
105
110
|
}
|
|
106
|
-
const d =
|
|
107
|
-
const
|
|
111
|
+
const d = k || I || T, s = a.find((t) => t.isDefault), g = a.filter((t) => !t.isDefault), C = (t, v = !1) => {
|
|
112
|
+
const E = p?.label === t.label, n = O === t.id;
|
|
108
113
|
return /* @__PURE__ */ l(
|
|
109
114
|
"button",
|
|
110
115
|
{
|
|
111
116
|
type: "button",
|
|
112
|
-
className:
|
|
113
|
-
"group mb-1 flex items-center justify-between cursor-pointer rounded-lg px-3 py-2 text-sm font-medium font-['Manrope']
|
|
114
|
-
|
|
117
|
+
className: o(
|
|
118
|
+
"group mb-1 flex items-center justify-between cursor-pointer rounded-lg px-3 py-2 text-sm font-medium font-['Manrope'] w-full text-left bg-transparent border-none transition-all duration-300 relative overflow-hidden",
|
|
119
|
+
!n && "hover:bg-[#f5f6fa]",
|
|
120
|
+
!n && E && "bg-[#edf0ff]",
|
|
121
|
+
!n && !E && "text-[#1f2b4d]",
|
|
122
|
+
n && "pointer-events-none"
|
|
115
123
|
),
|
|
116
|
-
onClick: () =>
|
|
124
|
+
onClick: () => !n && j({ label: t.label, savedItem: t }),
|
|
125
|
+
disabled: n,
|
|
117
126
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
127
|
+
n && /* @__PURE__ */ e(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
className: "absolute inset-0 bg-gradient-to-r from-[#e6e8f0] via-[#d5dafb] to-[#e6e8f0] opacity-60",
|
|
131
|
+
style: {
|
|
132
|
+
animation: "shimmer 1.5s ease-in-out infinite",
|
|
133
|
+
backgroundSize: "200% 100%"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ l(f, { children: [
|
|
138
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: t.label }) }),
|
|
120
139
|
/* @__PURE__ */ e(h, { variant: "tertiary", side: "right", children: t.label })
|
|
121
140
|
] }),
|
|
122
|
-
d && /* @__PURE__ */ l("div", { className:
|
|
141
|
+
d && /* @__PURE__ */ l("div", { className: o(
|
|
123
142
|
"flex items-center gap-1 ml-2 transition-opacity shrink-0",
|
|
124
|
-
|
|
143
|
+
v ? "opacity-100" : "opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto"
|
|
125
144
|
), children: [
|
|
126
|
-
|
|
127
|
-
/* @__PURE__ */ e(
|
|
145
|
+
I && /* @__PURE__ */ l(f, { children: [
|
|
146
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e(
|
|
128
147
|
"button",
|
|
129
148
|
{
|
|
130
149
|
type: "button",
|
|
131
150
|
tabIndex: -1,
|
|
132
151
|
"aria-label": `${r("filterStrip.deleteFilter")} ${t.label}`,
|
|
133
|
-
className:
|
|
152
|
+
className: o(
|
|
134
153
|
"p-1 rounded transition-colors hover:bg-[#e6e8f0]",
|
|
135
|
-
|
|
154
|
+
v && "opacity-0 group-hover:opacity-100"
|
|
136
155
|
),
|
|
137
|
-
onClick: (
|
|
138
|
-
|
|
156
|
+
onClick: (y) => {
|
|
157
|
+
y.stopPropagation(), I(t);
|
|
139
158
|
},
|
|
140
|
-
children: /* @__PURE__ */ e(
|
|
159
|
+
children: /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 text-[#60697d]" })
|
|
141
160
|
}
|
|
142
161
|
) }),
|
|
143
162
|
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: r("filterStrip.deleteFilter") })
|
|
144
163
|
] }),
|
|
145
|
-
|
|
146
|
-
/* @__PURE__ */ e(
|
|
164
|
+
k && /* @__PURE__ */ l(f, { children: [
|
|
165
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e(
|
|
147
166
|
"button",
|
|
148
167
|
{
|
|
149
168
|
type: "button",
|
|
150
169
|
tabIndex: -1,
|
|
151
170
|
"aria-label": `${r("filterStrip.editFilter")} ${t.label}`,
|
|
152
|
-
className:
|
|
171
|
+
className: o(
|
|
153
172
|
"p-1 rounded transition-colors hover:bg-[#e6e8f0]",
|
|
154
|
-
|
|
173
|
+
v && "opacity-0 group-hover:opacity-100"
|
|
155
174
|
),
|
|
156
|
-
onClick: (
|
|
157
|
-
|
|
175
|
+
onClick: (y) => {
|
|
176
|
+
y.stopPropagation(), k(t);
|
|
158
177
|
},
|
|
159
|
-
children: /* @__PURE__ */ e(
|
|
178
|
+
children: /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5 text-[#60697d]" })
|
|
160
179
|
}
|
|
161
180
|
) }),
|
|
162
181
|
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: r("filterStrip.editFilter") })
|
|
163
182
|
] }),
|
|
164
|
-
|
|
165
|
-
/* @__PURE__ */ e(
|
|
183
|
+
T && /* @__PURE__ */ l(f, { children: [
|
|
184
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e(
|
|
166
185
|
"button",
|
|
167
186
|
{
|
|
168
187
|
type: "button",
|
|
169
|
-
tabIndex:
|
|
188
|
+
tabIndex: v ? 0 : -1,
|
|
170
189
|
"aria-label": `${t.isDefault ? r("filterStrip.defaultFilter") : r("filterStrip.setAsDefault")} ${t.label}`,
|
|
171
|
-
className: "p-1 rounded hover:bg-[#e6e8f0] transition-colors",
|
|
172
|
-
|
|
173
|
-
|
|
190
|
+
className: "p-1 rounded hover:bg-[#e6e8f0] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
191
|
+
disabled: n,
|
|
192
|
+
onClick: (y) => {
|
|
193
|
+
y.stopPropagation(), B(t.id), T(t), setTimeout(() => B(null), 1200);
|
|
174
194
|
},
|
|
175
|
-
children: /* @__PURE__ */ e(
|
|
176
|
-
|
|
195
|
+
children: n ? /* @__PURE__ */ e("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-[#E1BC29] border-t-transparent" }) : /* @__PURE__ */ e(
|
|
196
|
+
re,
|
|
177
197
|
{
|
|
178
|
-
className:
|
|
179
|
-
"h-3.5 w-3.5",
|
|
198
|
+
className: o(
|
|
199
|
+
"h-3.5 w-3.5 transition-all duration-300",
|
|
180
200
|
t.isDefault ? "text-[#E1BC29] fill-[#E1BC29]" : "text-[#60697d]"
|
|
181
201
|
)
|
|
182
202
|
}
|
|
183
203
|
)
|
|
184
204
|
}
|
|
185
205
|
) }),
|
|
186
|
-
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: t.isDefault ? r("filterStrip.defaultFilter") : r("filterStrip.setAsDefault") })
|
|
206
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: n ? r("filterStrip.updating") : t.isDefault ? r("filterStrip.defaultFilter") : r("filterStrip.setAsDefault") })
|
|
187
207
|
] })
|
|
188
208
|
] })
|
|
189
209
|
]
|
|
@@ -192,34 +212,54 @@ const Ce = ({
|
|
|
192
212
|
);
|
|
193
213
|
};
|
|
194
214
|
return /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
215
|
+
s && /* @__PURE__ */ l(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
className: o(
|
|
219
|
+
"transition-all duration-500 ease-out",
|
|
220
|
+
A === s.id && "animate-in fade-in slide-in-from-bottom-2"
|
|
221
|
+
),
|
|
222
|
+
children: [
|
|
223
|
+
C(s, !0),
|
|
224
|
+
g.length > 0 && /* @__PURE__ */ e(M, { className: "my-1" })
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
`default-${s.id}`
|
|
228
|
+
),
|
|
229
|
+
g.length > 0 && /* @__PURE__ */ e(
|
|
200
230
|
"div",
|
|
201
231
|
{
|
|
202
232
|
className: "flex max-h-[160px] flex-col overflow-y-auto",
|
|
203
|
-
onScroll:
|
|
204
|
-
children:
|
|
233
|
+
onScroll: _,
|
|
234
|
+
children: g.map((t) => /* @__PURE__ */ e(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
className: o(
|
|
238
|
+
"transition-all duration-300",
|
|
239
|
+
O === t.id && "opacity-50"
|
|
240
|
+
),
|
|
241
|
+
children: C(t, !1)
|
|
242
|
+
},
|
|
243
|
+
t.id
|
|
244
|
+
))
|
|
205
245
|
}
|
|
206
246
|
)
|
|
207
247
|
] });
|
|
208
|
-
},
|
|
209
|
-
return /* @__PURE__ */ l(
|
|
210
|
-
/* @__PURE__ */ e(
|
|
248
|
+
}, F = p?.label !== m;
|
|
249
|
+
return /* @__PURE__ */ l(ie, { open: b, onOpenChange: V, children: [
|
|
250
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ l(
|
|
211
251
|
"button",
|
|
212
252
|
{
|
|
213
253
|
type: "button",
|
|
214
254
|
className: "flex cursor-pointer items-center gap-2 bg-transparent border-none p-0",
|
|
215
255
|
"aria-label": r("filterStrip.selectFilter"),
|
|
216
|
-
"aria-expanded":
|
|
256
|
+
"aria-expanded": b,
|
|
217
257
|
"aria-haspopup": "dialog",
|
|
218
258
|
children: [
|
|
219
259
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-[#60697d] font-['Manrope']", children: r("filterStrip.filtersApplied") }),
|
|
220
|
-
/* @__PURE__ */ l(
|
|
221
|
-
/* @__PURE__ */ e(
|
|
222
|
-
|
|
260
|
+
/* @__PURE__ */ l(f, { children: [
|
|
261
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e(
|
|
262
|
+
pe,
|
|
223
263
|
{
|
|
224
264
|
color: "primary",
|
|
225
265
|
variant: "outline",
|
|
@@ -232,19 +272,19 @@ const Ce = ({
|
|
|
232
272
|
/* @__PURE__ */ e(
|
|
233
273
|
"div",
|
|
234
274
|
{
|
|
235
|
-
className:
|
|
275
|
+
className: o(
|
|
236
276
|
"flex h-8 w-8 items-center justify-center rounded-lg bg-[#f5f6fa] transition-transform duration-200",
|
|
237
|
-
|
|
277
|
+
b && "rotate-180"
|
|
238
278
|
),
|
|
239
279
|
"aria-hidden": "true",
|
|
240
|
-
children: /* @__PURE__ */ e(
|
|
280
|
+
children: /* @__PURE__ */ e(ee, { className: "h-4 w-4 text-[#1f2b4d]" })
|
|
241
281
|
}
|
|
242
282
|
)
|
|
243
283
|
]
|
|
244
284
|
}
|
|
245
285
|
) }),
|
|
246
286
|
/* @__PURE__ */ e(
|
|
247
|
-
|
|
287
|
+
se,
|
|
248
288
|
{
|
|
249
289
|
align: "start",
|
|
250
290
|
className: "w-[280px] p-0 shadow-[0_0_4px_0_rgba(0,0,0,0.12)] overflow-visible",
|
|
@@ -254,47 +294,47 @@ const Ce = ({
|
|
|
254
294
|
(d.closest('[role="dialog"]') || d.closest("[data-radix-dialog-content]")) && a.preventDefault();
|
|
255
295
|
},
|
|
256
296
|
children: /* @__PURE__ */ l("div", { className: "flex w-full flex-col py-[8px] px-[6px]", children: [
|
|
257
|
-
|
|
297
|
+
X(),
|
|
258
298
|
/* @__PURE__ */ l("div", { className: "flex flex-col", children: [
|
|
259
299
|
/* @__PURE__ */ e("div", { className: "px-1 py-[6px] text-xs font-medium text-[#60697d] font-['Manrope']", children: r("filterStrip.savedFilters") }),
|
|
260
300
|
/* @__PURE__ */ l(
|
|
261
|
-
|
|
301
|
+
oe,
|
|
262
302
|
{
|
|
263
|
-
value:
|
|
264
|
-
onValueChange: (a) =>
|
|
303
|
+
value: c,
|
|
304
|
+
onValueChange: (a) => H(a),
|
|
265
305
|
variant: "outline",
|
|
266
306
|
size: "sm",
|
|
267
307
|
className: "w-full px-1",
|
|
268
308
|
children: [
|
|
269
|
-
/* @__PURE__ */ e("div", { className: "py-[8px]", children: /* @__PURE__ */ l(
|
|
270
|
-
/* @__PURE__ */ e(
|
|
271
|
-
/* @__PURE__ */ e(
|
|
272
|
-
/* @__PURE__ */ e(
|
|
309
|
+
/* @__PURE__ */ e("div", { className: "py-[8px]", children: /* @__PURE__ */ l(ce, { children: [
|
|
310
|
+
/* @__PURE__ */ e($, { value: "All", children: "All" }),
|
|
311
|
+
/* @__PURE__ */ e($, { value: "Global", children: "Global" }),
|
|
312
|
+
/* @__PURE__ */ e($, { value: "Personal", children: "Personal" })
|
|
273
313
|
] }) }),
|
|
274
314
|
/* @__PURE__ */ e("div", { className: "pb-[8px]", children: /* @__PURE__ */ e(
|
|
275
|
-
|
|
315
|
+
de,
|
|
276
316
|
{
|
|
277
|
-
prefix: /* @__PURE__ */ e(
|
|
317
|
+
prefix: /* @__PURE__ */ e(te, { className: "h-4 w-4 text-gray-500" }),
|
|
278
318
|
placeholder: r("filterStrip.searchFiltersPlaceholder"),
|
|
279
|
-
value:
|
|
280
|
-
onChange:
|
|
319
|
+
value: D,
|
|
320
|
+
onChange: J,
|
|
281
321
|
className: "h-9 px-1 border-none shadow-none focus-visible:ring-0"
|
|
282
322
|
}
|
|
283
323
|
) }),
|
|
284
|
-
/* @__PURE__ */ e("div", { className: "mt-0", children:
|
|
324
|
+
/* @__PURE__ */ e("div", { className: "mt-0", children: Z() })
|
|
285
325
|
]
|
|
286
326
|
}
|
|
287
327
|
)
|
|
288
328
|
] }),
|
|
289
|
-
/* @__PURE__ */ e(
|
|
329
|
+
/* @__PURE__ */ e(M, { className: "my-2" }),
|
|
290
330
|
/* @__PURE__ */ l("div", { className: "flex justify-end gap-2 px-3 pb-1", children: [
|
|
291
|
-
/* @__PURE__ */ e(
|
|
331
|
+
/* @__PURE__ */ e(G, { variant: "secondary", onClick: W, children: r("prompt.cancel") }),
|
|
292
332
|
/* @__PURE__ */ e(
|
|
293
|
-
|
|
333
|
+
G,
|
|
294
334
|
{
|
|
295
335
|
variant: "default",
|
|
296
|
-
onClick:
|
|
297
|
-
disabled: !
|
|
336
|
+
onClick: K,
|
|
337
|
+
disabled: !F,
|
|
298
338
|
children: r("filterStrip.applyFilter")
|
|
299
339
|
}
|
|
300
340
|
)
|
|
@@ -305,5 +345,5 @@ const Ce = ({
|
|
|
305
345
|
] });
|
|
306
346
|
};
|
|
307
347
|
export {
|
|
308
|
-
|
|
348
|
+
Ie as FilterSummary
|
|
309
349
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as S } from "react";
|
|
2
2
|
import { useSensors as Z, useSensor as V, MouseSensor as $, TouchSensor as E, closestCenter as p } from "@dnd-kit/core";
|
|
3
|
-
import { arrayMove as
|
|
3
|
+
import { arrayMove as A } from "@dnd-kit/sortable";
|
|
4
4
|
const W = "droppable-", y = /* @__PURE__ */ new Set(["root-frozen", "root-scrollable"]);
|
|
5
5
|
function X(h) {
|
|
6
6
|
if (h.startsWith(W)) {
|
|
@@ -65,7 +65,7 @@ const rn = ({
|
|
|
65
65
|
return null;
|
|
66
66
|
},
|
|
67
67
|
[]
|
|
68
|
-
),
|
|
68
|
+
), G = S(
|
|
69
69
|
(t, e, o) => t.map((r) => {
|
|
70
70
|
if (r.children && r.children.length > 0) {
|
|
71
71
|
const n = r.children.findIndex(
|
|
@@ -74,7 +74,7 @@ const rn = ({
|
|
|
74
74
|
(i) => i.id === o
|
|
75
75
|
);
|
|
76
76
|
if (n !== -1 && l !== -1) {
|
|
77
|
-
const i =
|
|
77
|
+
const i = A(r.children, n, l);
|
|
78
78
|
return {
|
|
79
79
|
...r,
|
|
80
80
|
children: i
|
|
@@ -82,7 +82,7 @@ const rn = ({
|
|
|
82
82
|
}
|
|
83
83
|
return {
|
|
84
84
|
...r,
|
|
85
|
-
children:
|
|
85
|
+
children: G(r.children, e, o)
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
return r;
|
|
@@ -98,7 +98,7 @@ const rn = ({
|
|
|
98
98
|
(i) => i.id === e
|
|
99
99
|
);
|
|
100
100
|
if (n !== -1 && l !== -1) {
|
|
101
|
-
const i =
|
|
101
|
+
const i = A(
|
|
102
102
|
t,
|
|
103
103
|
l,
|
|
104
104
|
n
|
|
@@ -112,7 +112,7 @@ const rn = ({
|
|
|
112
112
|
(t, e, o) => {
|
|
113
113
|
const r = t.findIndex((l) => l.id === e), n = t.findIndex((l) => l.id === o);
|
|
114
114
|
if (r !== -1 && n !== -1) {
|
|
115
|
-
const l =
|
|
115
|
+
const l = A(t, r, n);
|
|
116
116
|
return u?.(e, o), l;
|
|
117
117
|
}
|
|
118
118
|
return null;
|
|
@@ -120,20 +120,20 @@ const rn = ({
|
|
|
120
120
|
[u]
|
|
121
121
|
), z = S(
|
|
122
122
|
(t, e, o) => {
|
|
123
|
-
const r =
|
|
123
|
+
const r = G(t, e, o);
|
|
124
124
|
return u?.(e, o), r;
|
|
125
125
|
},
|
|
126
|
-
[
|
|
127
|
-
),
|
|
126
|
+
[G, u]
|
|
127
|
+
), N = S(
|
|
128
128
|
(t, e, o, r = !1) => {
|
|
129
129
|
const n = F(t, e);
|
|
130
130
|
if (!n) return null;
|
|
131
131
|
const l = (s) => s.filter((c) => c.id !== e).map(
|
|
132
132
|
(c) => c.children ? { ...c, children: l(c.children) } : c
|
|
133
|
-
).filter((c) => !(c.children && c.children.length === 0 && c.category === "group")), i = F(t, o), f = !n.children || n.children.length === 0, R = i?.children && i.children.length > 0, M = d[o] === !0,
|
|
133
|
+
).filter((c) => !(c.children && c.children.length === 0 && c.category === "group")), i = F(t, o), f = !n.children || n.children.length === 0, R = i?.children && i.children.length > 0, M = d[o] === !0, w = f && R && !M && r, g = (s) => {
|
|
134
134
|
for (let c = 0; c < s.length; c++) {
|
|
135
135
|
if (s[c].id === o)
|
|
136
|
-
if (
|
|
136
|
+
if (w) {
|
|
137
137
|
const L = {
|
|
138
138
|
...s[c],
|
|
139
139
|
children: [n, ...s[c].children || []]
|
|
@@ -156,7 +156,7 @@ const rn = ({
|
|
|
156
156
|
return Y ? (u?.(e, o), O) : null;
|
|
157
157
|
},
|
|
158
158
|
[u, d]
|
|
159
|
-
),
|
|
159
|
+
), _ = S(
|
|
160
160
|
(t, e, o) => {
|
|
161
161
|
const r = F(t, e);
|
|
162
162
|
if (!r) return t;
|
|
@@ -181,10 +181,10 @@ const rn = ({
|
|
|
181
181
|
}
|
|
182
182
|
const f = X(i);
|
|
183
183
|
if (f)
|
|
184
|
-
return
|
|
185
|
-
const R = C(n, l), M = C(n, i),
|
|
184
|
+
return _(n, l, f);
|
|
185
|
+
const R = C(n, l), M = C(n, i), w = T(n, l), g = T(n, i);
|
|
186
186
|
if (y.has(i) && R !== null && R > 0)
|
|
187
|
-
return
|
|
187
|
+
return _(n, l, i);
|
|
188
188
|
if (R === 0 && M !== null && M > 0)
|
|
189
189
|
return B(
|
|
190
190
|
n,
|
|
@@ -193,7 +193,7 @@ const rn = ({
|
|
|
193
193
|
) || n;
|
|
194
194
|
if (R === null || M === null)
|
|
195
195
|
return n;
|
|
196
|
-
if (R > 0 && M > 0 &&
|
|
196
|
+
if (R > 0 && M > 0 && w !== g) {
|
|
197
197
|
const P = j(n, l), O = j(n, i);
|
|
198
198
|
if (P && O && P !== O) {
|
|
199
199
|
const a = o.rect.current.translated, b = r.rect;
|
|
@@ -202,7 +202,7 @@ const rn = ({
|
|
|
202
202
|
const Q = a.top + a.height / 2, U = b.top + b.height / 2;
|
|
203
203
|
H = Q > U;
|
|
204
204
|
}
|
|
205
|
-
return
|
|
205
|
+
return N(n, l, i, H) || n;
|
|
206
206
|
}
|
|
207
207
|
const Y = o.rect.current.translated, s = r.rect;
|
|
208
208
|
let c = !1;
|
|
@@ -210,7 +210,7 @@ const rn = ({
|
|
|
210
210
|
const a = Y.top + Y.height / 2, b = s.top + s.height / 2;
|
|
211
211
|
c = a > b;
|
|
212
212
|
}
|
|
213
|
-
return
|
|
213
|
+
return N(n, l, i, c) || n;
|
|
214
214
|
}
|
|
215
215
|
return R === 0 ? k(n, l, i) || n : z(n, l, i);
|
|
216
216
|
});
|
|
@@ -221,8 +221,8 @@ const rn = ({
|
|
|
221
221
|
B,
|
|
222
222
|
k,
|
|
223
223
|
z,
|
|
224
|
-
G,
|
|
225
224
|
N,
|
|
225
|
+
_,
|
|
226
226
|
x
|
|
227
227
|
]
|
|
228
228
|
), K = S(
|