impact-nova 1.5.14 → 1.6.0
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/accordion.d.ts +4 -1
- package/dist/components/ui/accordion.js +28 -22
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/checkbox-display-renderer.js +12 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +30 -30
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/percent-progress-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +16 -16
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +17 -17
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +2 -2
- package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +11 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +8 -8
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.js +14 -14
- package/dist/components/ui/ag-grid-react/cell-renderers/switch-display-renderer.js +18 -18
- package/dist/components/ui/ag-grid-react/cell-renderers/textarea-display-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +14 -14
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +35 -35
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +49 -49
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +29 -29
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +9 -9
- package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +20 -20
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +10 -10
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +76 -76
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +118 -118
- package/dist/components/ui/ag-grid-react/index.js +121 -102
- package/dist/components/ui/alert-dialog.js +6 -6
- package/dist/components/ui/alert.d.ts +4 -3
- package/dist/components/ui/alert.js +182 -64
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +7 -2
- package/dist/components/ui/badge.js +105 -32
- package/dist/components/ui/breadcrumb.js +26 -21
- package/dist/components/ui/button-group.d.ts +7 -0
- package/dist/components/ui/button-group.js +116 -91
- package/dist/components/ui/button-variants.d.ts +7 -2
- package/dist/components/ui/button-variants.js +31 -16
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +10 -10
- package/dist/components/ui/calendar.js +185 -184
- package/dist/components/ui/card.js +24 -24
- package/dist/components/ui/chart/chart.js +27 -27
- package/dist/components/ui/chart/chart.utils.js +50 -50
- package/dist/components/ui/checkbox.js +22 -22
- package/dist/components/ui/chips.d.ts +19 -3
- package/dist/components/ui/chips.js +140 -41
- package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
- package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
- package/dist/components/ui/command-palette/command-palette.js +254 -264
- package/dist/components/ui/command-palette/index.d.ts +1 -1
- package/dist/components/ui/command-palette/index.js +42 -41
- package/dist/components/ui/command-palette/kbd.js +18 -18
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +105 -111
- package/dist/components/ui/command-palette/utils.d.ts +6 -1
- package/dist/components/ui/command-palette/utils.js +81 -74
- package/dist/components/ui/data-table/data-table-column-list.js +31 -31
- package/dist/components/ui/data-table/data-table-constants.d.ts +6 -0
- package/dist/components/ui/data-table/data-table-constants.js +4 -0
- package/dist/components/ui/data-table/data-table-context.d.ts +4 -0
- package/dist/components/ui/data-table/data-table-format-options.js +35 -35
- package/dist/components/ui/data-table/data-table-sheet.d.ts +4 -4
- package/dist/components/ui/data-table/data-table-sheet.js +91 -58
- package/dist/components/ui/data-table/data-table-view-options.js +29 -29
- package/dist/components/ui/data-table/data-table.js +84 -52
- package/dist/components/ui/data-table/index.d.ts +1 -0
- package/dist/components/ui/data-table/index.js +15 -13
- package/dist/components/ui/date-picker/date-picker.js +35 -35
- package/dist/components/ui/date-picker/date-range-picker.js +166 -164
- package/dist/components/ui/date-picker/month-picker.js +14 -14
- package/dist/components/ui/date-picker/month-range-picker.js +198 -189
- package/dist/components/ui/date-picker/multi-date-picker.js +14 -14
- package/dist/components/ui/date-picker/multi-month-picker.js +1 -1
- package/dist/components/ui/date-picker/multi-week-picker.js +1 -1
- package/dist/components/ui/date-picker/week-picker.js +2 -2
- package/dist/components/ui/date-picker/week-range-picker.js +164 -162
- package/dist/components/ui/dialog.js +25 -28
- package/dist/components/ui/drawer.js +40 -40
- package/dist/components/ui/dropdown-menu.js +72 -72
- package/dist/components/ui/empty-container.js +73 -69
- package/dist/components/ui/file-upload.js +137 -135
- package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
- package/dist/components/ui/filter-panel/filter-panel.js +175 -97
- package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
- package/dist/components/ui/filter-strip/filter-strip.js +63 -50
- package/dist/components/ui/filter-strip/filter-summary.d.ts +4 -1
- package/dist/components/ui/filter-strip/filter-summary.js +230 -146
- package/dist/components/ui/filter-strip/filter-tag-list.js +125 -91
- package/dist/components/ui/header.d.ts +7 -3
- package/dist/components/ui/header.js +87 -79
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +44 -44
- package/dist/components/ui/hover-card.js +10 -10
- package/dist/components/ui/input.js +79 -70
- package/dist/components/ui/loader.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListCategoryFilters.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.js +27 -27
- package/dist/components/ui/nested-list/components/SortableItem.js +58 -58
- package/dist/components/ui/notification-panel/notification-item.js +32 -32
- package/dist/components/ui/notification-panel/notification-list.js +24 -24
- package/dist/components/ui/notification-panel/notification-panel.js +26 -26
- package/dist/components/ui/popover.js +22 -22
- package/dist/components/ui/progress.js +34 -34
- package/dist/components/ui/prompt.js +48 -48
- package/dist/components/ui/radio-group.js +63 -54
- package/dist/components/ui/select/components/LabelWithSequence.js +6 -6
- package/dist/components/ui/select/components/Submenu.js +33 -33
- package/dist/components/ui/select/select.js +425 -376
- package/dist/components/ui/sheet.js +88 -66
- package/dist/components/ui/sidebar.js +342 -296
- package/dist/components/ui/skeleton.js +6 -6
- package/dist/components/ui/slider.js +17 -17
- package/dist/components/ui/statistics-card.d.ts +86 -0
- package/dist/components/ui/statistics-card.hooks.d.ts +150 -0
- package/dist/components/ui/statistics-card.hooks.js +100 -0
- package/dist/components/ui/statistics-card.js +259 -0
- package/dist/components/ui/stepper.js +51 -51
- package/dist/components/ui/switch.js +7 -7
- package/dist/components/ui/tabs.js +70 -70
- package/dist/components/ui/tag-group.d.ts +1 -0
- package/dist/components/ui/tag-group.js +14 -13
- package/dist/components/ui/tag.js +43 -43
- package/dist/components/ui/textarea.js +86 -58
- package/dist/components/ui/toast.js +39 -39
- package/dist/components/ui/tooltip.js +23 -23
- package/dist/components/ui/types/date-picker.types.d.ts +1 -0
- package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
- package/dist/components/ui/types/filter-strip.types.d.ts +14 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
- package/dist/components/ui/types/statistics-card.types.d.ts +1 -0
- package/dist/i18n/defaultMessages.d.ts +8 -0
- package/dist/i18n/defaultMessages.js +15 -9
- package/dist/i18n/locales/de.js +7 -1
- package/dist/i18n/locales/es.js +7 -1
- package/dist/i18n/locales/hi.js +7 -1
- package/dist/i18n/locales/kn.js +7 -1
- package/dist/icons/assets/bulk-edit.svg.js +5 -0
- package/dist/icons/assets/clock.svg.js +5 -0
- package/dist/icons/assets/statistics.svg.js +5 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +254 -206
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +361 -347
- package/package.json +3 -2
- package/tailwind.config.js +259 -152
- /package/dist/icons/assets/{PivotMode.svg.js → pivotMode.svg.js} +0 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Settings as F, Checkmark as h, Search as _ } from "../../../../../icons/index.js";
|
|
4
|
-
import { DropdownMenu as E, DropdownMenuTrigger as G, DropdownMenuContent as L, DropdownMenuLabel as k, DropdownMenuSeparator as z, DropdownMenuSub as p, DropdownMenuSubTrigger as f, DropdownMenuSubContent as g, DropdownMenuItem as
|
|
4
|
+
import { DropdownMenu as E, DropdownMenuTrigger as G, DropdownMenuContent as L, DropdownMenuLabel as k, DropdownMenuSeparator as z, DropdownMenuSub as p, DropdownMenuSubTrigger as f, DropdownMenuSubContent as g, DropdownMenuItem as i } from "../../../dropdown-menu.js";
|
|
5
5
|
import { useGridHeader as R } from "../context/grid-header-context.js";
|
|
6
6
|
import { useImpactNovaI18n as B } from "../../../../../i18n/ImpactNovaI18nContext.js";
|
|
7
7
|
const U = ({
|
|
8
8
|
isOpen: O,
|
|
9
9
|
onClose: c,
|
|
10
10
|
columnId: l,
|
|
11
|
-
gridApi:
|
|
11
|
+
gridApi: s,
|
|
12
12
|
anchor: A
|
|
13
13
|
}) => {
|
|
14
|
-
const { t
|
|
15
|
-
if (!
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
state: [{ colId: l, sort:
|
|
14
|
+
const { t } = B(), C = R(), o = s.getColumn(l);
|
|
15
|
+
if (!o) return null;
|
|
16
|
+
const a = o.getColDef(), x = o.getSort(), S = o.getPinned(), M = a?.sortable !== !1, y = a?.filter || "agTextColumnFilter", H = y === "agNumberColumnFilter" || (Array.isArray(a?.type) ? a.type.includes("numericColumn") : a?.type === "numericColumn"), b = y === "agDateColumnFilter" || (Array.isArray(a?.type) ? a.type.includes("dateColumn") : a?.type === "dateColumn"), u = (n) => {
|
|
17
|
+
s.applyColumnState({
|
|
18
|
+
state: [{ colId: l, sort: n }],
|
|
19
19
|
defaultState: { sort: null }
|
|
20
20
|
}), c();
|
|
21
|
-
}, m = (
|
|
22
|
-
|
|
23
|
-
state: [{ colId: l, pinned:
|
|
21
|
+
}, m = (n) => {
|
|
22
|
+
s.applyColumnState({
|
|
23
|
+
state: [{ colId: l, pinned: n }],
|
|
24
24
|
defaultState: { pinned: null }
|
|
25
25
|
}), c();
|
|
26
|
-
}, w = (
|
|
27
|
-
|
|
26
|
+
}, w = (n) => {
|
|
27
|
+
n ? s.autoSizeAllColumns() : s.autoSizeColumns([l]), c();
|
|
28
28
|
}, P = () => {
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
const n = s.getGridOption("context") || {};
|
|
30
|
+
s.setGridOption("context", { ...n, activeSearchColumnId: l }), s.refreshHeader(), c();
|
|
31
31
|
}, T = () => {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
return /* @__PURE__ */ r(E, { open: O, onOpenChange: (
|
|
36
|
-
|
|
32
|
+
const n = a?.headerComponentParams;
|
|
33
|
+
n?.onAdvanceSearchClick ? n.onAdvanceSearchClick(o) : n?.toggleAdvanceSearch ? n.toggleAdvanceSearch(l) : C && C.openAdvancedFilter(l), c();
|
|
34
|
+
}, d = A?.getBoundingClientRect(), D = a?.headerComponentParams, N = D?.isSearchable, v = D?.advanceSearchEnabled;
|
|
35
|
+
return /* @__PURE__ */ r(E, { open: O, onOpenChange: (n) => !n && c(), children: [
|
|
36
|
+
d && /* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
style: {
|
|
40
40
|
position: "fixed",
|
|
41
|
-
left:
|
|
42
|
-
top:
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
41
|
+
left: d.left,
|
|
42
|
+
top: d.top,
|
|
43
|
+
width: d.width,
|
|
44
|
+
height: d.height,
|
|
45
45
|
pointerEvents: "none",
|
|
46
46
|
visibility: "hidden"
|
|
47
47
|
}
|
|
@@ -54,58 +54,58 @@ const U = ({
|
|
|
54
54
|
side: "bottom",
|
|
55
55
|
sideOffset: 5,
|
|
56
56
|
className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)]",
|
|
57
|
-
onCloseAutoFocus: (
|
|
57
|
+
onCloseAutoFocus: (n) => n.preventDefault(),
|
|
58
58
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
59
|
-
/* @__PURE__ */ r(k, { className: "flex items-center gap-2 text-
|
|
59
|
+
/* @__PURE__ */ r(k, { className: "flex items-center gap-2 text-content-tertiary", children: [
|
|
60
60
|
/* @__PURE__ */ e(F, { size: "xs" }),
|
|
61
61
|
" ",
|
|
62
|
-
|
|
62
|
+
t("gridHeader.columnSettings")
|
|
63
63
|
] }),
|
|
64
64
|
/* @__PURE__ */ e(z, {}),
|
|
65
65
|
M && /* @__PURE__ */ r(p, { children: [
|
|
66
|
-
/* @__PURE__ */ e(f, { inset: !0, children:
|
|
66
|
+
/* @__PURE__ */ e(f, { inset: !0, children: t("gridHeader.sort") }),
|
|
67
67
|
/* @__PURE__ */ r(g, { sideOffset: 10, alignOffset: -5, children: [
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
/* @__PURE__ */ e("span", { children:
|
|
70
|
-
x === "asc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-
|
|
68
|
+
/* @__PURE__ */ e(i, { onClick: () => u("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
69
|
+
/* @__PURE__ */ e("span", { children: t(H ? "gridHeader.sortAscNumber" : b ? "gridHeader.sortAscDate" : "gridHeader.sortAscText") }),
|
|
70
|
+
x === "asc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
71
71
|
] }) }),
|
|
72
|
-
/* @__PURE__ */ e(
|
|
73
|
-
/* @__PURE__ */ e("span", { children:
|
|
74
|
-
x === "desc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-
|
|
72
|
+
/* @__PURE__ */ e(i, { onClick: () => u("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
73
|
+
/* @__PURE__ */ e("span", { children: t(H ? "gridHeader.sortDescNumber" : b ? "gridHeader.sortDescDate" : "gridHeader.sortDescText") }),
|
|
74
|
+
x === "desc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
75
75
|
] }) }),
|
|
76
|
-
/* @__PURE__ */ e(
|
|
76
|
+
/* @__PURE__ */ e(i, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.reset") }) })
|
|
77
77
|
] })
|
|
78
78
|
] }),
|
|
79
79
|
/* @__PURE__ */ r(p, { children: [
|
|
80
|
-
/* @__PURE__ */ e(f, { inset: !0, children:
|
|
80
|
+
/* @__PURE__ */ e(f, { inset: !0, children: t("gridHeader.freezeColumn") }),
|
|
81
81
|
/* @__PURE__ */ r(g, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
82
|
-
/* @__PURE__ */ e(
|
|
83
|
-
/* @__PURE__ */ e("span", { children:
|
|
84
|
-
S === "left" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-
|
|
82
|
+
/* @__PURE__ */ e(i, { onClick: () => m("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
83
|
+
/* @__PURE__ */ e("span", { children: t("gridHeader.pinLeft") }),
|
|
84
|
+
S === "left" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
85
85
|
] }) }),
|
|
86
|
-
/* @__PURE__ */ e(
|
|
87
|
-
/* @__PURE__ */ e("span", { children:
|
|
88
|
-
S === "right" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-
|
|
86
|
+
/* @__PURE__ */ e(i, { onClick: () => m("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
|
|
87
|
+
/* @__PURE__ */ e("span", { children: t("gridHeader.pinRight") }),
|
|
88
|
+
S === "right" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
|
|
89
89
|
] }) }),
|
|
90
|
-
/* @__PURE__ */ e(
|
|
90
|
+
/* @__PURE__ */ e(i, { onClick: () => m(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.noPin") }) })
|
|
91
91
|
] })
|
|
92
92
|
] }),
|
|
93
93
|
/* @__PURE__ */ r(p, { children: [
|
|
94
|
-
/* @__PURE__ */ e(f, { inset: !0, children:
|
|
94
|
+
/* @__PURE__ */ e(f, { inset: !0, children: t("gridHeader.columnWidth") }),
|
|
95
95
|
/* @__PURE__ */ r(g, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
|
|
96
|
-
/* @__PURE__ */ e(
|
|
97
|
-
/* @__PURE__ */ e(
|
|
96
|
+
/* @__PURE__ */ e(i, { onClick: () => w(!1), children: t("gridHeader.autosizeThisColumn") }),
|
|
97
|
+
/* @__PURE__ */ e(i, { onClick: () => w(!0), children: t("gridHeader.autosizeAllColumns") })
|
|
98
98
|
] })
|
|
99
99
|
] }),
|
|
100
100
|
(N || v) && /* @__PURE__ */ r(j, { children: [
|
|
101
101
|
/* @__PURE__ */ e(z, {}),
|
|
102
|
-
/* @__PURE__ */ r(k, { className: "flex items-center gap-2 text-
|
|
102
|
+
/* @__PURE__ */ r(k, { className: "flex items-center gap-2 text-content-tertiary", children: [
|
|
103
103
|
/* @__PURE__ */ e(_, { size: "xs" }),
|
|
104
104
|
" ",
|
|
105
|
-
|
|
105
|
+
t("gridHeader.searchOptions")
|
|
106
106
|
] }),
|
|
107
|
-
N && /* @__PURE__ */ e(
|
|
108
|
-
v && /* @__PURE__ */ e(
|
|
107
|
+
N && /* @__PURE__ */ e(i, { inset: !0, onClick: P, children: t("gridHeader.search") }),
|
|
108
|
+
v && /* @__PURE__ */ e(i, { inset: !0, onClick: T, children: t("gridHeader.advanceSearch") })
|
|
109
109
|
] })
|
|
110
110
|
] })
|
|
111
111
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as n, jsxs as p, Fragment as h } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as u } from "react";
|
|
3
3
|
import { cn as f } from "../../../../../lib/utils.js";
|
|
4
|
-
import { Info as
|
|
5
|
-
import { LazyTooltip as
|
|
4
|
+
import { Info as I } from "../../../../../icons/index.js";
|
|
5
|
+
import { LazyTooltip as d } from "./lazy-tooltip.js";
|
|
6
6
|
import { InfoModal as g } from "./info-modal.js";
|
|
7
7
|
import { useImpactNovaI18n as k } from "../../../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
-
const
|
|
8
|
+
const m = ({ onClick: t, className: e }) => {
|
|
9
9
|
const o = (i) => {
|
|
10
10
|
i.stopPropagation(), t && t(i);
|
|
11
11
|
};
|
|
@@ -13,42 +13,42 @@ const d = ({ onClick: t, className: r }) => {
|
|
|
13
13
|
"span",
|
|
14
14
|
{
|
|
15
15
|
className: f(
|
|
16
|
-
"cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-
|
|
17
|
-
|
|
16
|
+
"cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-content-tertiary hover:bg-muted active:bg-stroke-hairline",
|
|
17
|
+
e
|
|
18
18
|
),
|
|
19
19
|
onClick: o,
|
|
20
20
|
role: "button",
|
|
21
|
-
children: /* @__PURE__ */ n(
|
|
21
|
+
children: /* @__PURE__ */ n(I, { size: 16 })
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
|
-
},
|
|
24
|
+
}, v = ({
|
|
25
25
|
content: t,
|
|
26
|
-
className:
|
|
26
|
+
className: e,
|
|
27
27
|
onInfoClick: o
|
|
28
|
-
}) => /* @__PURE__ */ n(
|
|
28
|
+
}) => /* @__PURE__ */ n(d, { content: t, children: /* @__PURE__ */ n(m, { onClick: o, className: e }) }), C = ({
|
|
29
29
|
infoData: t,
|
|
30
|
-
className:
|
|
30
|
+
className: e,
|
|
31
31
|
onInfoClick: o
|
|
32
32
|
}) => {
|
|
33
|
-
const { t: i } = k(), [a, s] =
|
|
34
|
-
|
|
33
|
+
const { t: i } = k(), [a, s] = u(!1), l = (r) => {
|
|
34
|
+
r.stopPropagation(), s(!0);
|
|
35
35
|
};
|
|
36
36
|
return /* @__PURE__ */ p(h, { children: [
|
|
37
|
-
/* @__PURE__ */ n(
|
|
38
|
-
|
|
37
|
+
/* @__PURE__ */ n(d, { content: i("gridHeader.clickForDetails"), children: /* @__PURE__ */ n(
|
|
38
|
+
m,
|
|
39
39
|
{
|
|
40
|
-
onClick: (
|
|
41
|
-
l(
|
|
40
|
+
onClick: (r) => {
|
|
41
|
+
l(r), o && o(r);
|
|
42
42
|
},
|
|
43
43
|
className: f(
|
|
44
|
-
"hover:bg-
|
|
45
|
-
|
|
44
|
+
"hover:bg-muted hover:shadow-sm hover:text-brand-variant-hover hover:-translate-y-0.5 active:scale-95",
|
|
45
|
+
e
|
|
46
46
|
)
|
|
47
47
|
}
|
|
48
48
|
) }),
|
|
49
49
|
a && t && // Stop propagation to prevent the click from bubbling to the header group
|
|
50
50
|
// regardless of whether the modal is portaled or not.
|
|
51
|
-
/* @__PURE__ */ n("div", { onClick: (
|
|
51
|
+
/* @__PURE__ */ n("div", { onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ n(
|
|
52
52
|
g,
|
|
53
53
|
{
|
|
54
54
|
open: a,
|
|
@@ -59,20 +59,20 @@ const d = ({ onClick: t, className: r }) => {
|
|
|
59
59
|
] });
|
|
60
60
|
}, M = (t) => {
|
|
61
61
|
const {
|
|
62
|
-
showInfoIcon:
|
|
62
|
+
showInfoIcon: e,
|
|
63
63
|
displayName: o,
|
|
64
64
|
displayMode: i = "tooltip",
|
|
65
65
|
infoTooltip: a,
|
|
66
66
|
infoData: s,
|
|
67
67
|
className: l,
|
|
68
|
-
onInfoClick:
|
|
68
|
+
onInfoClick: r
|
|
69
69
|
} = t;
|
|
70
|
-
if (!
|
|
70
|
+
if (!e || !o || o.trim() === "") return null;
|
|
71
71
|
const c = () => {
|
|
72
|
-
|
|
72
|
+
r && r(t);
|
|
73
73
|
};
|
|
74
74
|
return i === "modal" ? /* @__PURE__ */ n(
|
|
75
|
-
|
|
75
|
+
C,
|
|
76
76
|
{
|
|
77
77
|
infoData: s,
|
|
78
78
|
displayName: o,
|
|
@@ -80,7 +80,7 @@ const d = ({ onClick: t, className: r }) => {
|
|
|
80
80
|
onInfoClick: c
|
|
81
81
|
}
|
|
82
82
|
) : /* @__PURE__ */ n(
|
|
83
|
-
|
|
83
|
+
v,
|
|
84
84
|
{
|
|
85
85
|
content: a || `Info about ${o}`,
|
|
86
86
|
className: l,
|
|
@@ -90,7 +90,7 @@ const d = ({ onClick: t, className: r }) => {
|
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
92
|
M as HeaderInfo,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
m as InfoIconTrigger,
|
|
94
|
+
C as ModalInfoTrigger,
|
|
95
|
+
v as TooltipInfoTrigger
|
|
96
96
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Dialog as
|
|
3
|
+
import { Dialog as s, DialogContent as d, DialogHeader as p, DialogTitle as g, DialogBody as f } from "../../../dialog.js";
|
|
4
4
|
import { SectionRenderer as h } from "./section-renderers.js";
|
|
5
5
|
import { useImpactNovaI18n as x } from "../../../../../i18n/ImpactNovaI18nContext.js";
|
|
6
|
-
const H = ({ open: a, onClose: l, data:
|
|
7
|
-
const { t } = x();
|
|
8
|
-
if (!
|
|
9
|
-
const { title: m, sections:
|
|
10
|
-
return /* @__PURE__ */ e(
|
|
11
|
-
/* @__PURE__ */ e(
|
|
6
|
+
const H = ({ open: a, onClose: l, data: o }) => {
|
|
7
|
+
const { t: n } = x();
|
|
8
|
+
if (!o) return null;
|
|
9
|
+
const { title: m, sections: r = [] } = o;
|
|
10
|
+
return /* @__PURE__ */ e(s, { open: a, onOpenChange: (t) => !t && l(), children: /* @__PURE__ */ i(d, { className: "max-w-2xl", children: [
|
|
11
|
+
/* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(g, { children: m || n("gridHeader.information") }) }),
|
|
12
12
|
/* @__PURE__ */ i(f, { className: "space-y-6 py-8", children: [
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
r.map((t, c) => /* @__PURE__ */ e(h, { section: t }, `${t.type}-${c}`)),
|
|
14
|
+
r.length === 0 && /* @__PURE__ */ e("p", { className: "text-sm text-content-muted text-center py-4", children: n("gridHeader.noInformationAvailable") })
|
|
15
15
|
] })
|
|
16
16
|
] }) });
|
|
17
17
|
};
|
|
@@ -3,24 +3,24 @@ import "react";
|
|
|
3
3
|
import { Badge as o } from "../../../badge.js";
|
|
4
4
|
import { cn as i } from "../../../../../lib/utils.js";
|
|
5
5
|
const d = ({ section: t }) => {
|
|
6
|
-
const r = t.variant || "paragraph", { label:
|
|
7
|
-
r === "heading" ? "text-lg font-semibold text-
|
|
6
|
+
const r = t.variant || "paragraph", { label: n, content: l } = t.data || {}, a = i(
|
|
7
|
+
r === "heading" ? "text-lg font-semibold text-content" : r === "caption" ? "text-xs text-content-muted" : "text-sm text-content-tertiary leading-relaxed"
|
|
8
8
|
);
|
|
9
9
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */ e("p", { className: a, children:
|
|
10
|
+
n && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: n }),
|
|
11
|
+
/* @__PURE__ */ e("p", { className: a, children: l })
|
|
12
12
|
] });
|
|
13
13
|
}, x = ({ section: t }) => {
|
|
14
14
|
const r = t.data?.items || [];
|
|
15
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: r.map((
|
|
16
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-
|
|
17
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-
|
|
18
|
-
] }, `${
|
|
15
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: r.map((n, l) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
|
|
16
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-normal", children: n.label }),
|
|
17
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-content font-semibold", children: String(n.value) })
|
|
18
|
+
] }, `${n.label}-${l}`)) });
|
|
19
19
|
}, m = ({ section: t }) => {
|
|
20
|
-
const { label: r, items:
|
|
20
|
+
const { label: r, items: n = [] } = t.data || {}, l = n.filter((a) => a.label && a.label.trim().length > 0);
|
|
21
21
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
|
|
22
|
-
r && /* @__PURE__ */ e("span", { className: "text-xs text-
|
|
23
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children:
|
|
22
|
+
r && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: r }),
|
|
23
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: l.map((a, c) => /* @__PURE__ */ e(
|
|
24
24
|
o,
|
|
25
25
|
{
|
|
26
26
|
variant: a.variant,
|
|
@@ -31,17 +31,17 @@ const d = ({ section: t }) => {
|
|
|
31
31
|
)) })
|
|
32
32
|
] });
|
|
33
33
|
}, p = ({ section: t }) => {
|
|
34
|
-
const { label: r, text:
|
|
34
|
+
const { label: r, text: n, url: l } = t.data || {};
|
|
35
35
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
36
|
-
r && /* @__PURE__ */ e("span", { className: "text-xs text-
|
|
36
|
+
r && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: r }),
|
|
37
37
|
/* @__PURE__ */ e(
|
|
38
38
|
"a",
|
|
39
39
|
{
|
|
40
|
-
href:
|
|
40
|
+
href: l,
|
|
41
41
|
target: "_blank",
|
|
42
42
|
rel: "noopener noreferrer",
|
|
43
|
-
className: "text-sm text-
|
|
44
|
-
children:
|
|
43
|
+
className: "text-sm text-brand hover:underline font-medium inline-flex items-center gap-1",
|
|
44
|
+
children: n
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
] });
|
|
@@ -59,14 +59,14 @@ const d = ({ section: t }) => {
|
|
|
59
59
|
default:
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, n = (l) => {
|
|
63
63
|
const { separator: a } = t;
|
|
64
|
-
return a ? a === !0 || a ===
|
|
64
|
+
return a ? a === !0 || a === l || a === "both" : !1;
|
|
65
65
|
};
|
|
66
66
|
return /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
67
|
-
|
|
67
|
+
n("top") && /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline my-6" }),
|
|
68
68
|
r(),
|
|
69
|
-
|
|
69
|
+
n("bottom") && /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline my-6" })
|
|
70
70
|
] });
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
@@ -7,23 +7,23 @@ const b = (n) => {
|
|
|
7
7
|
displayName: i,
|
|
8
8
|
showInfoIcon: d = !1,
|
|
9
9
|
columnGroup: e,
|
|
10
|
-
setExpanded:
|
|
11
|
-
} = n,
|
|
12
|
-
l && l.stopPropagation(),
|
|
13
|
-
},
|
|
14
|
-
return !
|
|
10
|
+
setExpanded: t
|
|
11
|
+
} = n, o = e ? e.isExpanded() : !1, r = e ? e.isExpandable() : !1, c = (l) => {
|
|
12
|
+
l && l.stopPropagation(), t && e && t(!o);
|
|
13
|
+
}, s = i || "";
|
|
14
|
+
return !s && d === !1 ? null : /* @__PURE__ */ p(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: "ag-header-group-cell-label ag-sticky-label flex items-center h-full cursor-pointer select-none",
|
|
18
|
-
onClick:
|
|
18
|
+
onClick: r ? c : void 0,
|
|
19
19
|
role: "presentation",
|
|
20
20
|
children: [
|
|
21
|
-
/* @__PURE__ */ a("span", { className: "ag-header-group-text font-semibold text-
|
|
21
|
+
/* @__PURE__ */ a("span", { className: "ag-header-group-text font-semibold text-content", "data-ref": "agLabel", role: "presentation", children: s }),
|
|
22
22
|
/* @__PURE__ */ a(x, { ...n, className: "ml-1" }),
|
|
23
|
-
|
|
23
|
+
r && /* @__PURE__ */ a("span", { className: f(
|
|
24
24
|
"ag-header-icon ag-header-expand-icon ml-[6px] flex items-center justify-center transition-transform duration-200",
|
|
25
|
-
|
|
26
|
-
), children: /* @__PURE__ */ a(m, { size: 16, className: "text-
|
|
25
|
+
o ? "ag-header-expand-icon-expanded rotate-180" : "ag-header-expand-icon-collapsed"
|
|
26
|
+
), children: /* @__PURE__ */ a(m, { size: 16, className: "text-content-tertiary" }) })
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
);
|