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