impact-nova 1.7.33 → 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-saved-views.js +176 -162
- package/dist/components/ui/filter-strip/filter-summary.js +173 -133
- 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,123 +1,135 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Popover as
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Badge as
|
|
9
|
-
import { Input as
|
|
10
|
-
import { Separator as
|
|
11
|
-
import { Skeleton as
|
|
12
|
-
import { Prompt as
|
|
13
|
-
import { useImpactNovaI18n as
|
|
14
|
-
function
|
|
15
|
-
return
|
|
1
|
+
import { jsxs as i, Fragment as W, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { ChevronDown as ge, Star as O, Search as ye, Bookmark as Ne, Pencil as we, Trash2 as Te } from "lucide-react";
|
|
4
|
+
import { cn as V } from "../../../lib/utils.js";
|
|
5
|
+
import { Popover as Ve, PopoverTrigger as ke, PopoverContent as Ce } from "../popover.js";
|
|
6
|
+
import { Tooltip as X, TooltipTrigger as Z, TooltipContent as q } from "../tooltip.js";
|
|
7
|
+
import { Button as m } from "../button.js";
|
|
8
|
+
import { Badge as E } from "../badge.js";
|
|
9
|
+
import { Input as De } from "../input.js";
|
|
10
|
+
import { Separator as ee } from "../separator.js";
|
|
11
|
+
import { Skeleton as I } from "../skeleton.js";
|
|
12
|
+
import { Prompt as Se } from "../prompt.js";
|
|
13
|
+
import { useImpactNovaI18n as ze } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
14
|
+
function Me(b) {
|
|
15
|
+
return b.isSystemView ? "system" : b.isDefaultView ? "default" : b.isActive ? "active" : "other";
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
isSaveViewEnabled:
|
|
19
|
-
views:
|
|
20
|
-
activeViewSummary:
|
|
21
|
-
viewTypeOptions:
|
|
22
|
-
menuOpen:
|
|
23
|
-
defaultMenuOpen:
|
|
24
|
-
onMenuOpenChange:
|
|
25
|
-
onSearch:
|
|
26
|
-
isLoadingViews:
|
|
27
|
-
customListContent:
|
|
28
|
-
disableApply:
|
|
29
|
-
className:
|
|
30
|
-
onSaveViewClick:
|
|
31
|
-
onApply:
|
|
32
|
-
onCancel:
|
|
33
|
-
onEditView:
|
|
34
|
-
onDeleteView:
|
|
35
|
-
onSetDefaultView:
|
|
17
|
+
const Ae = ["default", "active", "system"], Ye = ({
|
|
18
|
+
isSaveViewEnabled: b = !0,
|
|
19
|
+
views: o,
|
|
20
|
+
activeViewSummary: te,
|
|
21
|
+
viewTypeOptions: ae,
|
|
22
|
+
menuOpen: j,
|
|
23
|
+
defaultMenuOpen: ne = !1,
|
|
24
|
+
onMenuOpenChange: R,
|
|
25
|
+
onSearch: k,
|
|
26
|
+
isLoadingViews: L = !1,
|
|
27
|
+
customListContent: _,
|
|
28
|
+
disableApply: ie = !1,
|
|
29
|
+
className: le,
|
|
30
|
+
onSaveViewClick: re,
|
|
31
|
+
onApply: se,
|
|
32
|
+
onCancel: oe,
|
|
33
|
+
onEditView: de,
|
|
34
|
+
onDeleteView: ce,
|
|
35
|
+
onSetDefaultView: U
|
|
36
36
|
}) => {
|
|
37
|
-
const { t: a } =
|
|
38
|
-
|
|
39
|
-
),
|
|
37
|
+
const { t: a } = ze(), C = j !== void 0, [me, y] = n.useState(null), [ue, pe] = n.useState(
|
|
38
|
+
ne
|
|
39
|
+
), u = C ? !!j : ue, p = n.useCallback(
|
|
40
40
|
(e) => {
|
|
41
|
-
|
|
41
|
+
C || pe(e), R?.(e);
|
|
42
42
|
},
|
|
43
|
-
[
|
|
44
|
-
), [
|
|
45
|
-
|
|
46
|
-
const e = window.setTimeout(() =>
|
|
43
|
+
[C, R]
|
|
44
|
+
), [v, D] = n.useState("All"), [N, S] = n.useState(""), [F, z] = n.useState("");
|
|
45
|
+
n.useEffect(() => {
|
|
46
|
+
const e = window.setTimeout(() => z(N), 300);
|
|
47
47
|
return () => window.clearTimeout(e);
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
const
|
|
52
|
-
() =>
|
|
53
|
-
[
|
|
54
|
-
),
|
|
55
|
-
|
|
56
|
-
const e =
|
|
57
|
-
if (
|
|
58
|
-
const l =
|
|
59
|
-
|
|
48
|
+
}, [N]), n.useEffect(() => {
|
|
49
|
+
k && k(F);
|
|
50
|
+
}, [F, k]);
|
|
51
|
+
const Q = n.useMemo(
|
|
52
|
+
() => o.find((e) => e.isActive),
|
|
53
|
+
[o]
|
|
54
|
+
), d = Q ?? null, Y = te ?? Q?.viewName ?? a("dataTable.savedViewsNotApplicable"), [w, M] = n.useState(null), [x, $] = n.useState(null), K = n.useRef(!1);
|
|
55
|
+
n.useEffect(() => {
|
|
56
|
+
const e = u && !K.current;
|
|
57
|
+
if (K.current = u, e) {
|
|
58
|
+
const l = o.find((c) => c.isActive);
|
|
59
|
+
M(l?.id ?? null), D("All"), S(""), z("");
|
|
60
60
|
}
|
|
61
|
-
}, [
|
|
62
|
-
const
|
|
61
|
+
}, [u, o]);
|
|
62
|
+
const g = n.useMemo(() => v === "All" ? o : o.filter((e) => e.viewType === v), [o, v]), f = N.trim().toLowerCase(), T = n.useCallback(
|
|
63
63
|
(e, l) => l ? (e.viewName ?? "").trim().toLowerCase().includes(l) : !0,
|
|
64
64
|
[]
|
|
65
|
-
),
|
|
66
|
-
let e =
|
|
67
|
-
return
|
|
68
|
-
}, [
|
|
69
|
-
if (
|
|
70
|
-
const e = Object.groupBy(
|
|
71
|
-
return
|
|
65
|
+
), A = n.useMemo(() => {
|
|
66
|
+
let e = g;
|
|
67
|
+
return f && (e = e.filter((l) => T(l, f))), e;
|
|
68
|
+
}, [g, f, T]), h = n.useMemo(() => {
|
|
69
|
+
if (g.length === 0) return [];
|
|
70
|
+
const e = Object.groupBy(g, Me);
|
|
71
|
+
return Ae.flatMap((l) => {
|
|
72
72
|
const c = e[l]?.[0];
|
|
73
|
-
return c ?
|
|
73
|
+
return c ? f && !T(c, f) ? [] : [c] : [];
|
|
74
74
|
});
|
|
75
|
-
}, [
|
|
76
|
-
const e = new Set(
|
|
77
|
-
return
|
|
78
|
-
}, [
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
75
|
+
}, [g, f, T]), P = n.useMemo(() => {
|
|
76
|
+
const e = new Set(h.map((l) => l.id));
|
|
77
|
+
return A.filter((l) => !e.has(l.id));
|
|
78
|
+
}, [A, h]), G = w === null ? null : o.find((e) => e.id === w) ?? null, fe = () => {
|
|
79
|
+
se?.(G, { activeView: d }), p(!1);
|
|
80
|
+
}, he = () => {
|
|
81
|
+
oe?.({ activeView: d, pendingView: G }), p(!1);
|
|
82
|
+
}, be = (e) => {
|
|
83
|
+
p(e), e || (S(""), z(""));
|
|
84
84
|
};
|
|
85
|
-
if (!
|
|
85
|
+
if (!b)
|
|
86
86
|
return null;
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
return /* @__PURE__ */
|
|
87
|
+
const ve = o.length > 0, H = (e, l, c) => {
|
|
88
|
+
const B = w === e.id, s = me === e.id, J = l === "priority" && !!e.isActive, xe = l === "list" && !!e.isActive;
|
|
89
|
+
return /* @__PURE__ */ i(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
role: "button",
|
|
93
93
|
tabIndex: 0,
|
|
94
|
-
className:
|
|
95
|
-
"mb-1 flex cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-left text-sm font-medium font-['Manrope']
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
!
|
|
94
|
+
className: V(
|
|
95
|
+
"mb-1 flex cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-left text-sm font-medium font-['Manrope'] transition-all duration-300 relative overflow-hidden",
|
|
96
|
+
!s && "hover:bg-muted",
|
|
97
|
+
!s && J && !B && "bg-primary/10 dark:bg-primary/15",
|
|
98
|
+
!s && B && "bg-badge-info-muted text-badge-info-foreground",
|
|
99
|
+
!s && !B && !J && "text-foreground",
|
|
100
|
+
s && "pointer-events-none"
|
|
99
101
|
),
|
|
100
|
-
onClick: () =>
|
|
102
|
+
onClick: () => !s && M(e.id),
|
|
101
103
|
onKeyDown: (r) => {
|
|
102
|
-
(r.key === "Enter" || r.key === " ") && (r.preventDefault(),
|
|
104
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), s || M(e.id));
|
|
103
105
|
},
|
|
104
106
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
|
|
107
|
+
s && /* @__PURE__ */ t(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: "absolute inset-0 bg-gradient-to-r from-muted/80 via-primary/20 to-muted/80 opacity-80 rounded-lg",
|
|
111
|
+
style: {
|
|
112
|
+
animation: "shimmer 1.5s ease-in-out infinite",
|
|
113
|
+
backgroundSize: "200% 100%"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ i(X, { children: [
|
|
118
|
+
/* @__PURE__ */ t(Z, { asChild: !0, children: /* @__PURE__ */ t(
|
|
107
119
|
"span",
|
|
108
120
|
{
|
|
109
|
-
className:
|
|
110
|
-
"min-w-0 flex-1 truncate",
|
|
111
|
-
|
|
121
|
+
className: V(
|
|
122
|
+
"min-w-0 flex-1 truncate relative z-10",
|
|
123
|
+
xe && "underline decoration-primary decoration-2 underline-offset-2"
|
|
112
124
|
),
|
|
113
125
|
children: e.viewName
|
|
114
126
|
}
|
|
115
127
|
) }),
|
|
116
|
-
/* @__PURE__ */ t(
|
|
128
|
+
/* @__PURE__ */ t(q, { variant: "tertiary", side: "right", children: e.viewName })
|
|
117
129
|
] }),
|
|
118
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-0.5 relative z-10", children: [
|
|
119
131
|
e.isEditable ? /* @__PURE__ */ t(
|
|
120
|
-
|
|
132
|
+
m,
|
|
121
133
|
{
|
|
122
134
|
type: "button",
|
|
123
135
|
variant: "ghost",
|
|
@@ -125,13 +137,13 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
125
137
|
className: "text-foreground hover:text-content-charcoal",
|
|
126
138
|
"aria-label": a("dataTable.savedViewsEdit"),
|
|
127
139
|
onClick: (r) => {
|
|
128
|
-
r.stopPropagation(), r.preventDefault(),
|
|
140
|
+
r.stopPropagation(), r.preventDefault(), p(!1), de?.(e, { activeView: d });
|
|
129
141
|
},
|
|
130
|
-
children: /* @__PURE__ */ t(
|
|
142
|
+
children: /* @__PURE__ */ t(we, { className: "size-3.5" })
|
|
131
143
|
}
|
|
132
144
|
) : null,
|
|
133
145
|
e.isDeletable ? /* @__PURE__ */ t(
|
|
134
|
-
|
|
146
|
+
m,
|
|
135
147
|
{
|
|
136
148
|
type: "button",
|
|
137
149
|
variant: "ghost",
|
|
@@ -139,36 +151,38 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
139
151
|
className: "text-foreground hover:text-destructive",
|
|
140
152
|
"aria-label": a("dataTable.savedViewsDelete"),
|
|
141
153
|
onClick: (r) => {
|
|
142
|
-
r.stopPropagation(), r.preventDefault(),
|
|
154
|
+
r.stopPropagation(), r.preventDefault(), p(!1), $(e);
|
|
143
155
|
},
|
|
144
|
-
children: /* @__PURE__ */ t(
|
|
156
|
+
children: /* @__PURE__ */ t(Te, { className: "size-3.5" })
|
|
145
157
|
}
|
|
146
158
|
) : null,
|
|
147
159
|
e.hideDefaultStar ? null : e.isDefaultView ? /* @__PURE__ */ t(
|
|
148
|
-
|
|
160
|
+
m,
|
|
149
161
|
{
|
|
150
162
|
type: "button",
|
|
151
163
|
variant: "ghost",
|
|
152
164
|
size: "iconSm",
|
|
153
|
-
className: "text-yellow-500 hover:text-yellow-600",
|
|
165
|
+
className: "text-yellow-500 hover:text-yellow-600 disabled:opacity-50",
|
|
154
166
|
"aria-label": a("dataTable.savedViewsDefaultAction"),
|
|
167
|
+
disabled: s,
|
|
155
168
|
onClick: (r) => {
|
|
156
|
-
r.stopPropagation(), r.preventDefault(),
|
|
169
|
+
r.stopPropagation(), r.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), U?.(e, { activeView: d }));
|
|
157
170
|
},
|
|
158
|
-
children: /* @__PURE__ */ t(
|
|
171
|
+
children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin rounded-full border-2 border-yellow-500 border-t-transparent" }) : /* @__PURE__ */ t(O, { className: "size-3.5 fill-current" })
|
|
159
172
|
}
|
|
160
173
|
) : /* @__PURE__ */ t(
|
|
161
|
-
|
|
174
|
+
m,
|
|
162
175
|
{
|
|
163
176
|
type: "button",
|
|
164
177
|
variant: "ghost",
|
|
165
178
|
size: "iconSm",
|
|
166
|
-
className: "text-yellow-500 hover:text-yellow-600",
|
|
179
|
+
className: "text-yellow-500 hover:text-yellow-600 disabled:opacity-50",
|
|
167
180
|
"aria-label": a("dataTable.savedViewsSetDefault"),
|
|
181
|
+
disabled: s,
|
|
168
182
|
onClick: (r) => {
|
|
169
|
-
r.stopPropagation(), r.preventDefault(),
|
|
183
|
+
r.stopPropagation(), r.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), U?.(e, { activeView: d }));
|
|
170
184
|
},
|
|
171
|
-
children: /* @__PURE__ */ t(
|
|
185
|
+
children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin rounded-full border-2 border-yellow-500 border-t-transparent" }) : /* @__PURE__ */ t(O, { className: "size-3.5" })
|
|
172
186
|
}
|
|
173
187
|
)
|
|
174
188
|
] })
|
|
@@ -177,80 +191,80 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
177
191
|
c
|
|
178
192
|
);
|
|
179
193
|
};
|
|
180
|
-
return /* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ i(W, { children: [
|
|
195
|
+
/* @__PURE__ */ i(
|
|
182
196
|
"div",
|
|
183
197
|
{
|
|
184
198
|
"data-component": "data-table-saved-views",
|
|
185
|
-
className:
|
|
199
|
+
className: V(
|
|
186
200
|
"mb-2 mx-4 rounded-lg bg-[linear-gradient(83.74deg,#F5F9EC_72.68%,#D7E5B2_108.88%)] flex min-w-0 flex-wrap items-center justify-between gap-2 px-2 py-3",
|
|
187
|
-
|
|
201
|
+
le
|
|
188
202
|
),
|
|
189
203
|
children: [
|
|
190
|
-
|
|
191
|
-
/* @__PURE__ */ t(
|
|
192
|
-
/* @__PURE__ */ t(
|
|
193
|
-
] }) :
|
|
194
|
-
/* @__PURE__ */ t(
|
|
204
|
+
L ? /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center gap-1", children: [
|
|
205
|
+
/* @__PURE__ */ t(I, { className: "h-6 w-24 rounded-full bg-black/10" }),
|
|
206
|
+
/* @__PURE__ */ t(I, { className: "h-6 w-6 rounded-md bg-black/10" })
|
|
207
|
+
] }) : ve ? /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 items-center gap-1 sm:flex-initial", children: /* @__PURE__ */ i(Ve, { open: u, onOpenChange: be, children: [
|
|
208
|
+
/* @__PURE__ */ t(ke, { asChild: !0, children: /* @__PURE__ */ i(
|
|
195
209
|
"button",
|
|
196
210
|
{
|
|
197
211
|
type: "button",
|
|
198
212
|
className: "flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-md border-none bg-transparent p-0 text-left outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2",
|
|
199
|
-
"aria-expanded":
|
|
213
|
+
"aria-expanded": u,
|
|
200
214
|
"aria-haspopup": "dialog",
|
|
201
215
|
"aria-label": a("dataTable.savedViewsOpenMenu"),
|
|
202
216
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */ t(
|
|
205
|
-
|
|
217
|
+
/* @__PURE__ */ i(X, { children: [
|
|
218
|
+
/* @__PURE__ */ t(Z, { asChild: !0, children: /* @__PURE__ */ t(
|
|
219
|
+
E,
|
|
206
220
|
{
|
|
207
221
|
color: "success",
|
|
208
222
|
variant: "outline",
|
|
209
223
|
className: "max-w-[min(100%,200px)] shrink font-['Manrope']",
|
|
210
|
-
children: /* @__PURE__ */ t("span", { className: "truncate", children:
|
|
224
|
+
children: /* @__PURE__ */ t("span", { className: "truncate", children: Y })
|
|
211
225
|
}
|
|
212
226
|
) }),
|
|
213
|
-
/* @__PURE__ */ t(
|
|
227
|
+
/* @__PURE__ */ t(q, { variant: "tertiary", side: "top", children: Y })
|
|
214
228
|
] }),
|
|
215
229
|
/* @__PURE__ */ t(
|
|
216
230
|
"span",
|
|
217
231
|
{
|
|
218
|
-
className:
|
|
232
|
+
className: V(
|
|
219
233
|
"flex size-6 shrink-0 items-center justify-center rounded-md bg-white transition-transform duration-200",
|
|
220
|
-
|
|
234
|
+
u && "rotate-180"
|
|
221
235
|
),
|
|
222
236
|
"aria-hidden": !0,
|
|
223
|
-
children: /* @__PURE__ */ t(
|
|
237
|
+
children: /* @__PURE__ */ t(ge, { className: "size-3.5 text-content-charcoal" })
|
|
224
238
|
}
|
|
225
239
|
)
|
|
226
240
|
]
|
|
227
241
|
}
|
|
228
242
|
) }),
|
|
229
243
|
/* @__PURE__ */ t(
|
|
230
|
-
|
|
244
|
+
Ce,
|
|
231
245
|
{
|
|
232
246
|
align: "start",
|
|
233
247
|
className: "z-[50] w-[min(100vw-24px,280px)] p-0 shadow-[0_0_4px_0_rgba(0,0,0,0.12)] overflow-visible",
|
|
234
248
|
sideOffset: 8,
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ i("div", { className: "flex flex-col py-2", children: [
|
|
250
|
+
/* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-2 px-3 pb-2", children: [
|
|
237
251
|
/* @__PURE__ */ t("span", { className: "text-sm font-medium text-content-charcoal font-['Manrope']", children: a("dataTable.savedViewsTitle") }),
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */ t(
|
|
252
|
+
/* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-1 text-xs font-medium text-content-tertiary font-['Manrope']", children: [
|
|
253
|
+
/* @__PURE__ */ t(O, { className: "size-3.5 text-badge-warning-ink" }),
|
|
240
254
|
a("dataTable.savedViewsDefault")
|
|
241
255
|
] })
|
|
242
256
|
] }),
|
|
243
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ i("div", { className: "flex flex-wrap gap-1.5 px-3 pb-2", children: [
|
|
244
258
|
/* @__PURE__ */ t(
|
|
245
259
|
"button",
|
|
246
260
|
{
|
|
247
261
|
type: "button",
|
|
248
262
|
className: "border-none bg-transparent p-0",
|
|
249
|
-
onClick: () =>
|
|
263
|
+
onClick: () => D("All"),
|
|
250
264
|
children: /* @__PURE__ */ t(
|
|
251
|
-
|
|
265
|
+
E,
|
|
252
266
|
{
|
|
253
|
-
color:
|
|
267
|
+
color: v === "All" ? "primary" : "neutral",
|
|
254
268
|
variant: "outline",
|
|
255
269
|
size: "sm",
|
|
256
270
|
className: "cursor-pointer font-['Manrope']",
|
|
@@ -259,16 +273,16 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
259
273
|
)
|
|
260
274
|
}
|
|
261
275
|
),
|
|
262
|
-
|
|
276
|
+
ae?.map((e) => /* @__PURE__ */ t(
|
|
263
277
|
"button",
|
|
264
278
|
{
|
|
265
279
|
type: "button",
|
|
266
280
|
className: "border-none bg-transparent p-0",
|
|
267
|
-
onClick: () =>
|
|
281
|
+
onClick: () => D(e.value),
|
|
268
282
|
children: /* @__PURE__ */ t(
|
|
269
|
-
|
|
283
|
+
E,
|
|
270
284
|
{
|
|
271
|
-
color:
|
|
285
|
+
color: v === e.value ? "primary" : "neutral",
|
|
272
286
|
variant: "outline",
|
|
273
287
|
size: "sm",
|
|
274
288
|
className: "cursor-pointer font-['Manrope']",
|
|
@@ -280,14 +294,14 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
280
294
|
))
|
|
281
295
|
] }),
|
|
282
296
|
/* @__PURE__ */ t("div", { className: "px-3 pb-2", children: /* @__PURE__ */ t(
|
|
283
|
-
|
|
297
|
+
De,
|
|
284
298
|
{
|
|
285
299
|
size: "sm",
|
|
286
300
|
placeholder: a("dataTable.savedViewsSearchPlaceholder"),
|
|
287
|
-
value:
|
|
288
|
-
onChange: (e) =>
|
|
301
|
+
value: N,
|
|
302
|
+
onChange: (e) => S(e.target.value),
|
|
289
303
|
prefix: /* @__PURE__ */ t(
|
|
290
|
-
|
|
304
|
+
ye,
|
|
291
305
|
{
|
|
292
306
|
className: "size-4 shrink-0 text-content-muted",
|
|
293
307
|
"aria-hidden": !0
|
|
@@ -297,19 +311,19 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
297
311
|
"aria-label": a("dataTable.savedViewsSearchPlaceholder")
|
|
298
312
|
}
|
|
299
313
|
) }),
|
|
300
|
-
/* @__PURE__ */ t("div", { className: "min-h-[72px] px-1", children:
|
|
301
|
-
|
|
302
|
-
(e) =>
|
|
314
|
+
/* @__PURE__ */ t("div", { className: "min-h-[72px] px-1", children: _ || (L ? /* @__PURE__ */ t("div", { className: "flex max-h-[160px] flex-col gap-2 overflow-y-auto px-2 py-1", children: [1, 2, 3, 4, 5].map((e) => /* @__PURE__ */ t(I, { className: "h-9 w-full rounded-lg" }, e)) }) : A.length === 0 && h.length === 0 ? /* @__PURE__ */ t("div", { className: "flex min-h-[100px] flex-col items-center justify-center px-4 py-6 text-center", children: /* @__PURE__ */ t("span", { className: "text-sm leading-relaxed text-content-tertiary font-['Manrope']", children: a("dataTable.savedViewsEmptyList") }) }) : /* @__PURE__ */ i("div", { className: "flex max-h-[220px] flex-col gap-0 overflow-y-auto", children: [
|
|
315
|
+
h.length > 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col px-1 pb-1 ", children: h.map(
|
|
316
|
+
(e) => H(
|
|
303
317
|
e,
|
|
304
318
|
"priority",
|
|
305
319
|
`priority-${e.id}`
|
|
306
320
|
)
|
|
307
321
|
) }) : null,
|
|
308
|
-
|
|
309
|
-
|
|
322
|
+
h.length > 0 && P.length > 0 ? /* @__PURE__ */ t(ee, { className: "bg-[#D9DDE7] mb-2" }) : null,
|
|
323
|
+
P.length > 0 ? /* @__PURE__ */ i(W, { children: [
|
|
310
324
|
/* @__PURE__ */ t("div", { className: "px-3 pb-1.5 pt-0.5 text-xs font-medium tracking-wide text-[#B4BAC7] font-['Manrope']", children: a("dataTable.savedViewsAllSavedViews") }),
|
|
311
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col px-1 pb-1", children:
|
|
312
|
-
(e) =>
|
|
325
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col px-1 pb-1", children: P.map(
|
|
326
|
+
(e) => H(
|
|
313
327
|
e,
|
|
314
328
|
"list",
|
|
315
329
|
`list-${e.id}`
|
|
@@ -317,26 +331,26 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
317
331
|
) })
|
|
318
332
|
] }) : null
|
|
319
333
|
] })) }),
|
|
320
|
-
/* @__PURE__ */ t(
|
|
321
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ t(ee, { className: "my-1" }),
|
|
335
|
+
/* @__PURE__ */ i("div", { className: "flex justify-end gap-2 px-3 pt-1", children: [
|
|
322
336
|
/* @__PURE__ */ t(
|
|
323
|
-
|
|
337
|
+
m,
|
|
324
338
|
{
|
|
325
339
|
type: "button",
|
|
326
340
|
variant: "tertiary",
|
|
327
341
|
size: "md",
|
|
328
|
-
onClick:
|
|
342
|
+
onClick: he,
|
|
329
343
|
children: a("dataTable.savedViewsCancel")
|
|
330
344
|
}
|
|
331
345
|
),
|
|
332
346
|
/* @__PURE__ */ t(
|
|
333
|
-
|
|
347
|
+
m,
|
|
334
348
|
{
|
|
335
349
|
type: "button",
|
|
336
350
|
variant: "default",
|
|
337
351
|
size: "md",
|
|
338
|
-
disabled:
|
|
339
|
-
onClick:
|
|
352
|
+
disabled: ie || w === d?.id,
|
|
353
|
+
onClick: fe,
|
|
340
354
|
children: a("dataTable.savedViewsApply")
|
|
341
355
|
}
|
|
342
356
|
)
|
|
@@ -344,19 +358,19 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
344
358
|
] })
|
|
345
359
|
}
|
|
346
360
|
)
|
|
347
|
-
] }) }) : /* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */ t(
|
|
361
|
+
] }) }) : /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center gap-2 text-content-tertiary", children: [
|
|
362
|
+
/* @__PURE__ */ t(Ne, { className: "size-4 shrink-0", "aria-hidden": !0 }),
|
|
349
363
|
/* @__PURE__ */ t("span", { className: "text-sm font-medium font-['Manrope']", children: a("dataTable.savedViewsNoneYet") })
|
|
350
364
|
] }),
|
|
351
365
|
/* @__PURE__ */ t(
|
|
352
|
-
|
|
366
|
+
m,
|
|
353
367
|
{
|
|
354
368
|
type: "button",
|
|
355
369
|
variant: "tertiary",
|
|
356
370
|
size: "sm",
|
|
357
371
|
className: "shrink-0 font-['Manrope']",
|
|
358
372
|
onClick: () => {
|
|
359
|
-
|
|
373
|
+
p(!1), re?.({ activeView: d });
|
|
360
374
|
},
|
|
361
375
|
children: a("dataTable.savedViewsSave")
|
|
362
376
|
}
|
|
@@ -365,12 +379,12 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
365
379
|
}
|
|
366
380
|
),
|
|
367
381
|
/* @__PURE__ */ t(
|
|
368
|
-
|
|
382
|
+
Se,
|
|
369
383
|
{
|
|
370
384
|
variant: "destructive",
|
|
371
385
|
open: x !== null,
|
|
372
386
|
onOpenChange: (e) => {
|
|
373
|
-
e ||
|
|
387
|
+
e || $(null);
|
|
374
388
|
},
|
|
375
389
|
title: a("dataTable.savedViewsDeleteConfirmTitle"),
|
|
376
390
|
description: x ? a("dataTable.savedViewsDeleteConfirmDescription", {
|
|
@@ -378,12 +392,12 @@ const Se = ["default", "active", "system"], Fe = ({
|
|
|
378
392
|
}) : void 0,
|
|
379
393
|
confirmLabel: a("dataTable.savedViewsDeleteConfirmButton"),
|
|
380
394
|
onConfirm: () => {
|
|
381
|
-
x &&
|
|
395
|
+
x && ce?.(x, { activeView: d });
|
|
382
396
|
}
|
|
383
397
|
}
|
|
384
398
|
)
|
|
385
399
|
] });
|
|
386
400
|
};
|
|
387
401
|
export {
|
|
388
|
-
|
|
402
|
+
Ye as DataTableSavedViews
|
|
389
403
|
};
|