impact-nova 1.3.0 → 1.5.2
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/README.md +49 -0
- package/dist/components/layout/dashboard-layout.d.ts +15 -1
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
- package/dist/components/ui/accordion.js +38 -34
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
- package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
- package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
- package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
- package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
- package/dist/components/ui/alert.js +62 -58
- package/dist/components/ui/breadcrumb.js +81 -74
- package/dist/components/ui/calendar.js +354 -354
- package/dist/components/ui/chart/chart.js +63 -62
- package/dist/components/ui/chips.js +42 -38
- package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
- package/dist/components/ui/command-palette/command-palette-context.js +110 -0
- package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
- package/dist/components/ui/command-palette/command-palette.js +402 -0
- package/dist/components/ui/command-palette/index.d.ts +23 -0
- package/dist/components/ui/command-palette/index.js +44 -0
- package/dist/components/ui/command-palette/kbd.d.ts +28 -0
- package/dist/components/ui/command-palette/kbd.js +52 -0
- package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
- package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
- package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
- package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
- package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
- package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
- package/dist/components/ui/command-palette/use-shortcut.js +49 -0
- package/dist/components/ui/command-palette/utils.d.ts +119 -0
- package/dist/components/ui/command-palette/utils.js +248 -0
- package/dist/components/ui/data-table/data-table-column-list.js +87 -86
- package/dist/components/ui/data-table/data-table-format-options.js +45 -44
- package/dist/components/ui/data-table/data-table-view-options.js +39 -38
- package/dist/components/ui/date-picker/date-picker.js +89 -87
- package/dist/components/ui/date-picker/date-range-picker.js +140 -138
- package/dist/components/ui/date-picker/month-picker.js +82 -81
- package/dist/components/ui/date-picker/month-range-picker.js +108 -105
- package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
- package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
- package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
- package/dist/components/ui/date-picker/week-picker.js +117 -115
- package/dist/components/ui/date-picker/week-range-picker.js +166 -164
- package/dist/components/ui/dialog.js +78 -73
- package/dist/components/ui/drawer.js +71 -66
- package/dist/components/ui/file-upload.js +131 -127
- package/dist/components/ui/filter-panel/filter-panel.js +98 -94
- package/dist/components/ui/filter-strip/filter-strip.js +95 -91
- package/dist/components/ui/filter-strip/filter-summary.js +91 -90
- package/dist/components/ui/header.js +57 -53
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
- package/dist/components/ui/loader.js +17 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
- package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
- package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
- package/dist/components/ui/nested-list/nested-list.js +184 -182
- package/dist/components/ui/notification-panel/notification-panel.js +60 -53
- package/dist/components/ui/popover.js +45 -40
- package/dist/components/ui/prompt.js +90 -86
- package/dist/components/ui/select/select.js +206 -209
- package/dist/components/ui/sheet.d.ts +1 -0
- package/dist/components/ui/sheet.js +50 -48
- package/dist/components/ui/sidebar.js +273 -267
- package/dist/components/ui/stepper.js +75 -63
- package/dist/components/ui/tag.js +48 -44
- package/dist/components/ui/toast.js +46 -41
- package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
- package/dist/i18n/ImpactNovaI18nContext.js +76 -0
- package/dist/i18n/defaultMessages.d.ts +231 -0
- package/dist/i18n/defaultMessages.js +206 -0
- package/dist/i18n/getDateFnsLocale.d.ts +11 -0
- package/dist/i18n/getDateFnsLocale.js +21 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.js +206 -0
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.js +206 -0
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.js +206 -0
- package/dist/i18n/locales/index.d.ts +4 -0
- package/dist/i18n/locales/kn.d.ts +2 -0
- package/dist/i18n/locales/kn.js +206 -0
- package/dist/icons/assets/boxAdd.svg.js +5 -0
- package/dist/icons/assets/boxed.svg.js +5 -0
- package/dist/icons/assets/trolley.svg.js +5 -0
- package/dist/icons/assets/unlocked.svg.js +5 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +179 -171
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +232 -172
- package/package.json +36 -4
- package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
|
@@ -1,88 +1,89 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import { NestedList as
|
|
5
|
-
import { SelectionMode as
|
|
6
|
-
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useRef as R, useCallback as p, useEffect as A } from "react";
|
|
3
|
+
import { useDataTable as B } from "./data-table-context.js";
|
|
4
|
+
import { NestedList as H } from "../nested-list/nested-list.js";
|
|
5
|
+
import { SelectionMode as J } from "../types/nested-list.types.js";
|
|
6
|
+
import { useImpactNovaI18n as K } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
7
|
+
function Q(d, I) {
|
|
7
8
|
let f = null;
|
|
8
|
-
return ((...
|
|
9
|
-
f && clearTimeout(f), f = setTimeout(() => d(...
|
|
9
|
+
return ((...S) => {
|
|
10
|
+
f && clearTimeout(f), f = setTimeout(() => d(...S), I);
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
|
-
const
|
|
13
|
+
const le = ({
|
|
13
14
|
enableApplyDiscard: d = !1,
|
|
14
|
-
showSearch:
|
|
15
|
+
showSearch: I = !0,
|
|
15
16
|
showSelectAll: f = !0,
|
|
16
|
-
showCollapse:
|
|
17
|
+
showCollapse: S = !0
|
|
17
18
|
}) => {
|
|
18
|
-
const { gridApi:
|
|
19
|
-
if (!
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const s =
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
id:
|
|
29
|
-
label:
|
|
19
|
+
const { gridApi: r } = B(), { t: h } = K(), [F, x] = j([]), [U, V] = j(!1), y = R(!1), W = R(/* @__PURE__ */ new Map()), g = p(() => {
|
|
20
|
+
if (!r || y.current) return;
|
|
21
|
+
const o = r.getColumnState(), n = new Map(o.map((t) => [t.colId, t]));
|
|
22
|
+
W.current = n;
|
|
23
|
+
const s = r.getColumns() || [], i = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], T = /* @__PURE__ */ new Map(), k = (t, c) => {
|
|
24
|
+
const l = t.getGroupId();
|
|
25
|
+
let a = T.get(l);
|
|
26
|
+
if (a) return a;
|
|
27
|
+
const m = t.getOriginalParent(), b = m ? k(m, c).children : c, D = t.getColGroupDef();
|
|
28
|
+
return a = {
|
|
29
|
+
id: l,
|
|
30
|
+
label: D?.headerName || l,
|
|
30
31
|
checked: !0,
|
|
31
32
|
children: [],
|
|
32
33
|
category: "group"
|
|
33
|
-
},
|
|
34
|
+
}, T.set(l, a), b.push(a), a;
|
|
34
35
|
};
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
const c =
|
|
36
|
+
let v = 0, L = 0, M = 0, P = 0;
|
|
37
|
+
o.forEach((t) => {
|
|
38
|
+
const c = i.get(t.colId);
|
|
38
39
|
if (!c) return;
|
|
39
|
-
let
|
|
40
|
-
if (
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
|
|
40
|
+
let l = r.getDisplayNameForColumn(c, "header");
|
|
41
|
+
if (l === "") return;
|
|
42
|
+
if (l == null) {
|
|
43
|
+
const E = c.getColDef();
|
|
44
|
+
if (E.headerName === "") return;
|
|
45
|
+
l = E.headerName || E.field || t.colId;
|
|
45
46
|
}
|
|
46
|
-
if (!
|
|
47
|
+
if (!l || l.trim() === "")
|
|
47
48
|
return;
|
|
48
|
-
const
|
|
49
|
+
const a = !t.hide, m = {
|
|
49
50
|
id: t.colId,
|
|
50
|
-
label:
|
|
51
|
-
checked:
|
|
51
|
+
label: l,
|
|
52
|
+
checked: a
|
|
52
53
|
};
|
|
53
|
-
t.pinned ? (
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
t.pinned ? (v++, a && L++) : (M++, a && P++);
|
|
55
|
+
const b = t.pinned ? u : e, D = c.getOriginalParent();
|
|
56
|
+
D ? k(D, b).children.push(m) : b.push(m);
|
|
56
57
|
});
|
|
57
58
|
const G = (t) => {
|
|
58
59
|
let c = t.length > 0;
|
|
59
|
-
for (const
|
|
60
|
-
|
|
60
|
+
for (const l of t)
|
|
61
|
+
l.children && (l.checked = G(l.children)), l.checked || (c = !1);
|
|
61
62
|
return c;
|
|
62
63
|
};
|
|
63
64
|
G(u), G(e);
|
|
64
|
-
const
|
|
65
|
-
u.length > 0 &&
|
|
65
|
+
const N = [];
|
|
66
|
+
u.length > 0 && N.push({
|
|
66
67
|
id: "root-frozen",
|
|
67
|
-
label: "
|
|
68
|
-
checked:
|
|
68
|
+
label: h("dataTable.frozenColumns"),
|
|
69
|
+
checked: v > 0 && L === v,
|
|
69
70
|
children: u,
|
|
70
71
|
category: "structure",
|
|
71
72
|
isDragDisabled: !0
|
|
72
|
-
}), e.length > 0 &&
|
|
73
|
+
}), e.length > 0 && N.push({
|
|
73
74
|
id: "root-scrollable",
|
|
74
|
-
label: "
|
|
75
|
-
checked:
|
|
75
|
+
label: h("dataTable.scrollableColumns"),
|
|
76
|
+
checked: M > 0 && P === M,
|
|
76
77
|
children: e,
|
|
77
78
|
category: "structure",
|
|
78
79
|
isDragDisabled: !0
|
|
79
|
-
}),
|
|
80
|
-
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, [
|
|
84
|
-
if (!
|
|
85
|
-
const
|
|
80
|
+
}), x(N), V(!0);
|
|
81
|
+
}, [r, h]), z = R(null);
|
|
82
|
+
A(() => {
|
|
83
|
+
z.current = Q(g, 150);
|
|
84
|
+
}, [g]), A(() => {
|
|
85
|
+
if (!r) return;
|
|
86
|
+
const o = setTimeout(() => g(), 0), n = [
|
|
86
87
|
"columnVisible",
|
|
87
88
|
"columnPinned",
|
|
88
89
|
"columnMoved",
|
|
@@ -93,15 +94,15 @@ const $ = ({
|
|
|
93
94
|
"columnPivotModeChanged",
|
|
94
95
|
"columnEverythingChanged"
|
|
95
96
|
], s = () => {
|
|
96
|
-
|
|
97
|
+
z.current?.();
|
|
97
98
|
};
|
|
98
|
-
return
|
|
99
|
-
clearTimeout(
|
|
99
|
+
return r.isDestroyed() || n.forEach((i) => r.addEventListener(i, s)), () => {
|
|
100
|
+
clearTimeout(o), r.isDestroyed() || n.forEach((i) => r.removeEventListener(i, s));
|
|
100
101
|
};
|
|
101
|
-
}, [
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
}, [r, g]);
|
|
103
|
+
const O = p((o) => {
|
|
104
|
+
const n = [], s = (i, u) => {
|
|
105
|
+
i.forEach((e) => {
|
|
105
106
|
if (e.id === "root-frozen") {
|
|
106
107
|
e.children && s(e.children, "left");
|
|
107
108
|
return;
|
|
@@ -110,47 +111,47 @@ const $ = ({
|
|
|
110
111
|
e.children && s(e.children, null);
|
|
111
112
|
return;
|
|
112
113
|
}
|
|
113
|
-
e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) :
|
|
114
|
+
e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : r?.getColumn(e.id) && n.push({
|
|
114
115
|
colId: e.id,
|
|
115
116
|
pinned: u,
|
|
116
117
|
hide: !e.checked
|
|
117
118
|
});
|
|
118
119
|
});
|
|
119
120
|
};
|
|
120
|
-
return s(
|
|
121
|
-
}, [
|
|
122
|
-
if (!
|
|
121
|
+
return s(o, null), n;
|
|
122
|
+
}, [r]), C = p((o) => {
|
|
123
|
+
if (!r) return;
|
|
123
124
|
y.current = !0;
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
state:
|
|
125
|
+
const n = O(o);
|
|
126
|
+
n.length > 0 && r.applyColumnState({
|
|
127
|
+
state: n,
|
|
127
128
|
applyOrder: !0
|
|
128
129
|
}), setTimeout(() => {
|
|
129
130
|
y.current = !1;
|
|
130
131
|
}, 300);
|
|
131
|
-
}, [
|
|
132
|
-
|
|
133
|
-
}, [
|
|
134
|
-
d ||
|
|
135
|
-
}, [d,
|
|
136
|
-
return
|
|
137
|
-
|
|
132
|
+
}, [r, O]), _ = p((o) => {
|
|
133
|
+
C(o);
|
|
134
|
+
}, [C]), q = p((o) => {
|
|
135
|
+
d || C(o), x(o);
|
|
136
|
+
}, [d, C]);
|
|
137
|
+
return U ? /* @__PURE__ */ w("div", { className: "flex flex-col h-full bg-white", children: /* @__PURE__ */ w(
|
|
138
|
+
H,
|
|
138
139
|
{
|
|
139
|
-
items:
|
|
140
|
-
onChange:
|
|
141
|
-
onSubmit:
|
|
140
|
+
items: F,
|
|
141
|
+
onChange: q,
|
|
142
|
+
onSubmit: _,
|
|
142
143
|
enableApplyDiscard: d,
|
|
143
|
-
enableSearch:
|
|
144
|
+
enableSearch: I,
|
|
144
145
|
enableSelectAll: f,
|
|
145
146
|
enableDragDrop: !0,
|
|
146
147
|
enableCollapse: !0,
|
|
147
|
-
enableGlobalCollapse:
|
|
148
|
-
selectionMode:
|
|
149
|
-
searchPlaceholder: "
|
|
148
|
+
enableGlobalCollapse: S,
|
|
149
|
+
selectionMode: J.CASCADE_DOWN,
|
|
150
|
+
searchPlaceholder: h("dataTable.searchColumnsPlaceholder"),
|
|
150
151
|
className: "h-full"
|
|
151
152
|
}
|
|
152
|
-
) }) : /* @__PURE__ */
|
|
153
|
+
) }) : /* @__PURE__ */ w("div", { className: "p-4 text-[13px] text-slate-400", children: h("dataTable.loadingColumns") });
|
|
153
154
|
};
|
|
154
155
|
export {
|
|
155
|
-
|
|
156
|
+
le as DataTableColumnList
|
|
156
157
|
};
|
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import { RadioGroup as
|
|
5
|
-
import { Label as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { useDataTable as d } from "./data-table-context.js";
|
|
4
|
+
import { RadioGroup as m, RadioGroupItem as l } from "../radio-group.js";
|
|
5
|
+
import { Label as r } from "../label.js";
|
|
6
|
+
import { useImpactNovaI18n as x } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
7
|
+
const b = () => {
|
|
8
|
+
const { t } = x(), {
|
|
9
|
+
fontSize: s,
|
|
10
|
+
setFontSize: o,
|
|
10
11
|
numericFormat: i,
|
|
11
|
-
setNumericFormat:
|
|
12
|
-
} =
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: "
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
12
|
+
setNumericFormat: c
|
|
13
|
+
} = d();
|
|
14
|
+
return /* @__PURE__ */ a("div", { className: "flex flex-col gap-6 px-1 py-1", children: [
|
|
15
|
+
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
16
|
+
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: t("dataTable.fontSize") }),
|
|
17
|
+
/* @__PURE__ */ a(
|
|
18
|
+
m,
|
|
18
19
|
{
|
|
19
|
-
value:
|
|
20
|
+
value: s,
|
|
20
21
|
orientation: "vertical",
|
|
21
|
-
onValueChange: (
|
|
22
|
+
onValueChange: (n) => o(n),
|
|
22
23
|
className: "flex flex-col",
|
|
23
24
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
26
|
+
/* @__PURE__ */ e(l, { value: "small", id: "font-small" }),
|
|
27
|
+
/* @__PURE__ */ e(r, { htmlFor: "font-small", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontSmall") })
|
|
27
28
|
] }),
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
-
/* @__PURE__ */ e(
|
|
29
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
30
|
+
/* @__PURE__ */ e(l, { value: "medium", id: "font-medium" }),
|
|
31
|
+
/* @__PURE__ */ e(r, { htmlFor: "font-medium", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontMediumDefault") })
|
|
31
32
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
33
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
34
|
+
/* @__PURE__ */ e(l, { value: "large", id: "font-large" }),
|
|
35
|
+
/* @__PURE__ */ e(r, { htmlFor: "font-large", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontLarge") })
|
|
35
36
|
] })
|
|
36
37
|
]
|
|
37
38
|
}
|
|
38
39
|
)
|
|
39
40
|
] }),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: "
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
41
|
+
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
42
|
+
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: t("dataTable.numericValues") }),
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
|
+
m,
|
|
44
45
|
{
|
|
45
46
|
value: i,
|
|
46
47
|
orientation: "vertical",
|
|
47
|
-
onValueChange: (
|
|
48
|
+
onValueChange: (n) => c(n),
|
|
48
49
|
className: "flex flex-col",
|
|
49
50
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
/* @__PURE__ */ e(
|
|
51
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
52
|
+
/* @__PURE__ */ e(l, { value: "full", id: "num-full" }),
|
|
53
|
+
/* @__PURE__ */ e(r, { htmlFor: "num-full", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericFull") })
|
|
53
54
|
] }),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */ e(
|
|
56
|
-
/* @__PURE__ */ e(
|
|
55
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
56
|
+
/* @__PURE__ */ e(l, { value: "k", id: "num-k" }),
|
|
57
|
+
/* @__PURE__ */ e(r, { htmlFor: "num-k", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericK") })
|
|
57
58
|
] }),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ e(
|
|
59
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
60
|
+
/* @__PURE__ */ e(l, { value: "m", id: "num-m" }),
|
|
61
|
+
/* @__PURE__ */ e(r, { htmlFor: "num-m", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericM") })
|
|
61
62
|
] }),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
/* @__PURE__ */ e(
|
|
63
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
64
|
+
/* @__PURE__ */ e(l, { value: "b", id: "num-b" }),
|
|
65
|
+
/* @__PURE__ */ e(r, { htmlFor: "num-b", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericB") })
|
|
65
66
|
] })
|
|
66
67
|
]
|
|
67
68
|
}
|
|
@@ -70,5 +71,5 @@ const h = () => {
|
|
|
70
71
|
] });
|
|
71
72
|
};
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
b as DataTableFormatOptions
|
|
74
75
|
};
|
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
1
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { DropdownMenu as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { ThreeDots as
|
|
3
|
+
import { DropdownMenu as p, DropdownMenuTrigger as m, DropdownMenuContent as d, DropdownMenuItem as u, DropdownMenuSub as g, DropdownMenuSubTrigger as h, DropdownMenuSubContent as f, DropdownMenuRadioGroup as x, DropdownMenuRadioItem as n } from "../dropdown-menu.js";
|
|
4
|
+
import { Button as D } from "../button.js";
|
|
5
|
+
import { ThreeDots as N, Settings as b, Density as w, Stack as C, StackCompact as T, StackComfort as S } from "../../../icons/index.js";
|
|
6
6
|
import { useDataTable as v } from "./data-table-context.js";
|
|
7
|
-
import { DataTableSheetTrigger as
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { DataTableSheetTrigger as M } from "./data-table-sheet.js";
|
|
8
|
+
import { useImpactNovaI18n as P } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
9
|
+
const B = ({
|
|
10
|
+
enableTableSettings: s = !0,
|
|
10
11
|
enableContentDensity: r = !0,
|
|
11
|
-
trigger:
|
|
12
|
+
trigger: l
|
|
12
13
|
}) => {
|
|
13
|
-
const { rowHeight: i, setRowHeight:
|
|
14
|
-
return /* @__PURE__ */ t(
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
14
|
+
const { t: o } = P(), { rowHeight: i, setRowHeight: c } = v();
|
|
15
|
+
return /* @__PURE__ */ t(p, { children: [
|
|
16
|
+
/* @__PURE__ */ a(m, { asChild: !0, children: l || /* @__PURE__ */ t(D, { variant: "secondary", size: "icon", "aria-label": o("dataTable.more"), children: [
|
|
17
|
+
/* @__PURE__ */ a(N, { size: "sm" }),
|
|
18
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: o("dataTable.openMenu") })
|
|
18
19
|
] }) }),
|
|
19
|
-
/* @__PURE__ */ t(
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
/* @__PURE__ */ t(d, { align: "end", className: "w-[240px] flex flex-col gap-[2px]", children: [
|
|
21
|
+
s && /* @__PURE__ */ a(M, { asChild: !0, children: /* @__PURE__ */ a(
|
|
22
|
+
u,
|
|
22
23
|
{
|
|
23
24
|
className: "flex cursor-pointer gap-2",
|
|
24
25
|
onClick: (e) => e.stopPropagation(),
|
|
25
26
|
onSelect: (e) => e.stopPropagation(),
|
|
26
27
|
children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ a(b, { size: "sm", className: "text-slate-500" }),
|
|
29
|
+
/* @__PURE__ */ a("span", { children: o("dataTable.tableSettings") })
|
|
29
30
|
] })
|
|
30
31
|
}
|
|
31
32
|
) }),
|
|
32
|
-
r && /* @__PURE__ */ t(
|
|
33
|
+
r && /* @__PURE__ */ t(g, { children: [
|
|
33
34
|
/* @__PURE__ */ t(
|
|
34
|
-
|
|
35
|
+
h,
|
|
35
36
|
{
|
|
36
37
|
className: "flex items-center gap-2 cursor-pointer",
|
|
37
38
|
onClick: (e) => e.stopPropagation(),
|
|
38
39
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ a(w, { size: "sm", className: "text-slate-500" }),
|
|
41
|
+
/* @__PURE__ */ a("span", { children: o("dataTable.contentDensity") })
|
|
41
42
|
]
|
|
42
43
|
}
|
|
43
44
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
45
|
+
/* @__PURE__ */ a(f, { className: "w-[190px]", children: /* @__PURE__ */ t(
|
|
46
|
+
x,
|
|
46
47
|
{
|
|
47
48
|
value: i,
|
|
48
|
-
onValueChange: (e) =>
|
|
49
|
+
onValueChange: (e) => c(e),
|
|
49
50
|
className: "flex flex-col gap-0.5",
|
|
50
51
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
52
|
+
/* @__PURE__ */ a(
|
|
53
|
+
n,
|
|
53
54
|
{
|
|
54
55
|
value: "default",
|
|
55
56
|
onClick: (e) => e.stopPropagation(),
|
|
56
57
|
onSelect: (e) => e.stopPropagation(),
|
|
57
58
|
children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
"
|
|
59
|
+
/* @__PURE__ */ a(C, { size: "sm", className: "text-slate-500" }),
|
|
60
|
+
o("dataTable.densityDefault")
|
|
60
61
|
] })
|
|
61
62
|
}
|
|
62
63
|
),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
64
|
+
/* @__PURE__ */ a(
|
|
65
|
+
n,
|
|
65
66
|
{
|
|
66
67
|
value: "compact",
|
|
67
68
|
onClick: (e) => e.stopPropagation(),
|
|
68
69
|
onSelect: (e) => e.stopPropagation(),
|
|
69
70
|
children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
"
|
|
71
|
+
/* @__PURE__ */ a(T, { size: "sm", className: "text-slate-500" }),
|
|
72
|
+
o("dataTable.densityCompact")
|
|
72
73
|
] })
|
|
73
74
|
}
|
|
74
75
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
76
|
+
/* @__PURE__ */ a(
|
|
77
|
+
n,
|
|
77
78
|
{
|
|
78
79
|
value: "comfort",
|
|
79
80
|
onClick: (e) => e.stopPropagation(),
|
|
80
81
|
onSelect: (e) => e.stopPropagation(),
|
|
81
82
|
children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
"
|
|
83
|
+
/* @__PURE__ */ a(S, { size: "sm", className: "text-slate-500" }),
|
|
84
|
+
o("dataTable.densityComfort")
|
|
84
85
|
] })
|
|
85
86
|
}
|
|
86
87
|
)
|
|
@@ -92,5 +93,5 @@ const H = ({
|
|
|
92
93
|
] });
|
|
93
94
|
};
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
B as DataTableViewOptions
|
|
96
97
|
};
|