@povio/ui 5.0.0 → 5.0.1-rc.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/dist/{Autocomplete-DbALLWP0.js → Autocomplete-BKJ5sYdA.js} +5 -5
- package/dist/{Autocomplete.bound-DCPZBYKR.js → Autocomplete.bound-B6RmJlR6.js} +2 -2
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-B7i7tj1S.js} +1 -1
- package/dist/{Calendar-B9jqOJB6.js → Calendar-DLlUsZP2.js} +3 -3
- package/dist/{Calendar.lazy-4d7pbB4k.js → Calendar.lazy-9hn-y6c8.js} +3 -3
- package/dist/{Checkbox.bound-DyQFIVCw.js → Checkbox.bound-DQYJMtCs.js} +1 -1
- package/dist/{CheckboxGroup-CK_tTvvI.js → CheckboxGroup-CneFMbCF.js} +1 -1
- package/dist/{CheckboxGroup.bound-DyCp83EI.js → CheckboxGroup.bound-BddvGfb_.js} +2 -2
- package/dist/{DatePicker-CJj3Gp_S.js → DatePicker-DUCe_SVM.js} +7 -6
- package/dist/{DatePicker.bound-BWPOirPV.js → DatePicker.bound-r5FQhOff.js} +2 -2
- package/dist/{DatePickerInput-C5-kkdpq.js → DatePickerInput-C9wcjFvV.js} +9 -7
- package/dist/{DateRangePicker-BO92JO3A.js → DateRangePicker-CkiT1lEf.js} +8 -7
- package/dist/{DateRangePicker.bound-cDWQPCUj.js → DateRangePicker.bound-Chl_cUUj.js} +2 -2
- package/dist/{DateTimePicker-DSzd33fp.js → DateTimePicker-B7qiGRqC.js} +7 -6
- package/dist/{DateTimePicker.bound-BQUJXvBQ.js → DateTimePicker.bound-LMdGgruS.js} +2 -2
- package/dist/{Dialog-DN5703sy.js → Dialog-B10YV23i.js} +1 -1
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-Dt8nr5qS.js} +2 -2
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-BjGcbdmX.js} +1 -1
- package/dist/{FileInput-dTcR3V93.js → FileInput-CDzclNi2.js} +2 -2
- package/dist/{FileInput.bound-B5b7BLGg.js → FileInput.bound-Vz2EeuOP.js} +2 -2
- package/dist/{FileUpload-JogkVfav.js → FileUpload-u81ZwwEt.js} +2 -2
- package/dist/{FileUpload.bound-TTr9FNMS.js → FileUpload.bound-LBo4ERNC.js} +2 -2
- package/dist/{FormField-dduTMkNH.js → FormField-ClLu7Hix.js} +2 -2
- package/dist/{Input-Dq2Raco6.js → Input-g9gG6FBB.js} +5 -4
- package/dist/{Input.bound-CB0WNCLI.js → Input.bound-lFOANQBr.js} +2 -2
- package/dist/{InputContent-5WKp0yNK.js → InputContent-qLj8x_zH.js} +7 -5
- package/dist/{NumberField-BQwc6a7u.js → NumberField-DodaCw5J.js} +5 -4
- package/dist/{NumberField.bound-Ha6jrlsv.js → NumberField.bound-DxgcOvm1.js} +2 -2
- package/dist/{NumberRangeInput-KngK-OvN.js → NumberRangeInput-BIBCaGE4.js} +4 -3
- package/dist/{NumberRangeInput.bound-VafOPEAu.js → NumberRangeInput.bound-BIWKaOMj.js} +2 -2
- package/dist/{PasswordInput.bound-D4tGX20e.js → PasswordInput.bound-BqTCYsLj.js} +2 -2
- package/dist/{RadioGroup-Dvq0TiEB.js → RadioGroup-HMm5cKXh.js} +1 -1
- package/dist/{RadioGroup.bound-B-xm1dwo.js → RadioGroup.bound-Bj5CLIlT.js} +2 -2
- package/dist/{RangeCalendar-p7ajg_wH.js → RangeCalendar-DQ6Ls8z7.js} +3 -3
- package/dist/{RichTextEditor-DLBfexN_.js → RichTextEditor-CHmqhNmA.js} +13 -9
- package/dist/{Select-hIRIXRz1.js → Select-s_1onwY9.js} +7 -7
- package/dist/{Select.bound-BrAIDjfv.js → Select.bound-CaNRXZDU.js} +2 -2
- package/dist/{SelectListBox-ysubv-kl.js → SelectListBox-BuKr994Y.js} +13 -4
- package/dist/{Slider-DCsCCPFx.js → Slider-8J-Ny6BX.js} +1 -1
- package/dist/{Slider.bound-CByTXPTr.js → Slider.bound-DgNK0NK1.js} +2 -2
- package/dist/{Switch.bound-Dv0cHsMM.js → Switch.bound-D8QsLsS4.js} +1 -1
- package/dist/{TabsFilters-ka2sUZPi.js → TabsFilters-DtZrvnTC.js} +1 -1
- package/dist/{TextArea-CqT0_Bn-.js → TextArea-CsTjCZIE.js} +2 -2
- package/dist/{TextArea.bound-kHkY_d9o.js → TextArea.bound-JYXWI2Vn.js} +2 -2
- package/dist/{TimePicker-Duw94UIt.js → TimePicker-BSM4Ioa_.js} +11 -9
- package/dist/{TimePicker.bound-DX5pXlgZ.js → TimePicker.bound-DGNPAcDB.js} +2 -2
- package/dist/{TimePickerForm-BiWPFcsD.js → TimePickerForm-Bv8S3M_p.js} +2 -2
- package/dist/{ToastContainer-DtpZaefx.js → ToastContainer-Cdp4jsgT.js} +24 -1
- package/dist/{ToggleGroup-Co1-A0Ti.js → ToggleGroup-BDKfPYek.js} +1 -1
- package/dist/{ToggleGroup.bound-DphkH_jH.js → ToggleGroup.bound-CF5hXyw8.js} +2 -2
- package/dist/{TooltipWrapper-DcrEabVw.js → TooltipWrapper-DmcWMIp0.js} +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/bottom-sheet-header.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/input-frame.js +5 -4
- package/dist/components/input.js +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/password-input.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/split-button.js +1 -1
- package/dist/components/style-definitions.js +2 -2
- package/dist/components/tabs-filters.js +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/confirmation.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/{confirmation.context-Bc2yEVp_.js → confirmation.context-ByjNx2uA.js} +1 -1
- package/dist/{dist-fFtzh872.js → dist-C8Tl4DGt.js} +1 -1
- package/dist/{dropdownMenu.cva-DwSOcbmR.js → dropdownMenu.cva-CcFuz2Yo.js} +1 -1
- package/dist/{form.binding-DOR5gIQf.js → form.binding-Ddx5NGCq.js} +1 -1
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-D8vXIoiq.js → i18n-DxbqkvyK.js} +14 -6
- package/dist/{i18n-DM-PUcxQ.d.ts → i18n-JT8Yui4a.d.ts} +12 -4
- package/dist/{import-C7W0Wv2r.js → import-Duf36Dbs.js} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +42 -42
- package/dist/inputRow.clsx-BbcaXVta.js +6 -0
- package/dist/{logger-CqZjM-sn.js → logger-CW24po62.js} +10 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/{routing.utils-DfxEt0_Y.js → routing.utils-C5FAT_Qg.js} +2 -2
- package/dist/{selectDesktop.cva-DStkOdwm.js → selectDesktop.cva-30JAvtgB.js} +1 -1
- package/dist/{staticDateTimeSegments-BVvFHWOs.js → staticDateTimeSegments-DeeSpTzj.js} +1 -1
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +2 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +2 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/{tanstack-CJKor9l-.d.ts → tanstack-DzNVI2Rj.d.ts} +1 -1
- package/dist/tanstack.d.ts +3 -3
- package/dist/tanstack.js +42 -42
- package/dist/{toast.runtime-BWQLlbZW.js → toast.runtime-CvmhLbUP.js} +1 -1
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-BVZ1va2U.js} +67 -14
- package/dist/{useFilters-DMi94RZK.js → useFilters-Bp9x3-09.js} +71 -78
- package/dist/{useForm-Cb7KWLds.js → useForm-C7wrpJ2t.js} +1 -1
- package/dist/{useFormAutosave-BPGlChiY.js → useFormAutosave-Cy0wTigY.js} +2 -2
- package/dist/{useTableColumnConfig-D4BGhlBT.js → useTableColumnConfig-yf7pvTbe.js} +694 -223
- package/dist/{useTableNav-hQCt_TbI.d.ts → useTableNav-DxuUTKn5.d.ts} +4 -1
- package/dist/utils/logger.js +1 -1
- package/package.json +1 -1
- package/dist/TableDnd-CuHxANWh.js +0 -133
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as logger } from "./logger-
|
|
1
|
+
import { n as __exportAll, t as logger } from "./logger-CW24po62.js";
|
|
2
2
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
3
3
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
4
4
|
import { t as IconSlot } from "./IconSlot-CqNuZl0E.js";
|
|
@@ -8,22 +8,26 @@ import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
|
8
8
|
import { t as Spinner } from "./Spinner-DqjP06T1.js";
|
|
9
9
|
import { t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
10
10
|
import { n as uiOutlineClass } from "./outline.clsx-DGGQQRkM.js";
|
|
11
|
+
import { t as Button } from "./Button-dRFJundh.js";
|
|
11
12
|
import { IconButton } from "./components/icon-button.js";
|
|
12
13
|
import { t as useBreakpoint } from "./useBreakpoint-CJ3mx7UF.js";
|
|
13
|
-
import "./i18n-
|
|
14
|
-
import { t as Dialog } from "./Dialog-
|
|
14
|
+
import "./i18n-DxbqkvyK.js";
|
|
15
|
+
import { t as Dialog } from "./Dialog-B10YV23i.js";
|
|
15
16
|
import { Drawer } from "./components/drawer.js";
|
|
16
17
|
import { a as tableDetailsPanelDefinition, c as tableHeaderTextDefinition, d as tableSidePanelDefinition, f as tableSidePanelHeaderDefinition, i as tableDetailsCellDefinition, l as tableRowDefinition, n as tableContainerDefinition, o as tableHeadDataDefinition, p as theadDefinition, r as tableDataDefinition, s as tableHeadRowDefinition, t as tableCellTextDefinition, u as tableSidePanelBodyDefinition } from "./table.cva-DkcsOmZG.js";
|
|
17
|
-
import { t as useTranslationMemo } from "./useTranslationMemo-CrZbeyBv.js";
|
|
18
18
|
import { t as useIntersectionObserver } from "./useIntersectionObserver-DFAhTsV0.js";
|
|
19
19
|
import { t as UIRouter } from "./router.context-MckTbHw9.js";
|
|
20
|
-
import { t as RoutingUtils } from "./routing.utils-
|
|
20
|
+
import { t as RoutingUtils } from "./routing.utils-C5FAT_Qg.js";
|
|
21
21
|
import { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight, GripVertical, Pin, X } from "lucide-react";
|
|
22
22
|
import { c } from "react/compiler-runtime";
|
|
23
23
|
import { Fragment, Suspense, createContext, lazy, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
24
24
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
25
25
|
import i18next from "i18next";
|
|
26
26
|
import { useTranslation } from "react-i18next";
|
|
27
|
+
import { DndContext, KeyboardSensor, MouseSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
28
|
+
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
29
|
+
import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
30
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
27
31
|
import { createPaginatedRowModel, createSortedRowModel, flexRender, stockFeatures, tableFeatures, useTable } from "@tanstack/react-table";
|
|
28
32
|
//#region src/components/table/CellText.tsx
|
|
29
33
|
const CellText = (props) => {
|
|
@@ -40,6 +44,630 @@ const CellText = (props) => {
|
|
|
40
44
|
});
|
|
41
45
|
};
|
|
42
46
|
//#endregion
|
|
47
|
+
//#region src/components/table/TableDnd.tsx
|
|
48
|
+
var TableDnd_exports = /* @__PURE__ */ __exportAll({
|
|
49
|
+
DndProvider: () => DndProvider$1,
|
|
50
|
+
DragHandle: () => DragHandle$1,
|
|
51
|
+
DraggableRow: () => DraggableRow$1,
|
|
52
|
+
SortableItem: () => SortableItem,
|
|
53
|
+
SortableRows: () => SortableRows$1
|
|
54
|
+
});
|
|
55
|
+
const DndProvider$1 = (t0) => {
|
|
56
|
+
const $ = c(5);
|
|
57
|
+
const { children, onDragEnd } = t0;
|
|
58
|
+
const sensors = useSensors(useSensor(MouseSensor), useSensor(TouchSensor), useSensor(KeyboardSensor));
|
|
59
|
+
let t1;
|
|
60
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
61
|
+
t1 = [restrictToVerticalAxis];
|
|
62
|
+
$[0] = t1;
|
|
63
|
+
} else t1 = $[0];
|
|
64
|
+
let t2;
|
|
65
|
+
if ($[1] !== children || $[2] !== onDragEnd || $[3] !== sensors) {
|
|
66
|
+
t2 = /* @__PURE__ */ jsx(DndContext, {
|
|
67
|
+
collisionDetection: closestCenter,
|
|
68
|
+
modifiers: t1,
|
|
69
|
+
onDragEnd,
|
|
70
|
+
sensors,
|
|
71
|
+
children
|
|
72
|
+
});
|
|
73
|
+
$[1] = children;
|
|
74
|
+
$[2] = onDragEnd;
|
|
75
|
+
$[3] = sensors;
|
|
76
|
+
$[4] = t2;
|
|
77
|
+
} else t2 = $[4];
|
|
78
|
+
return t2;
|
|
79
|
+
};
|
|
80
|
+
const SortableRows$1 = (t0) => {
|
|
81
|
+
const $ = c(3);
|
|
82
|
+
const { children, items } = t0;
|
|
83
|
+
let t1;
|
|
84
|
+
if ($[0] !== children || $[1] !== items) {
|
|
85
|
+
t1 = /* @__PURE__ */ jsx(SortableContext, {
|
|
86
|
+
items,
|
|
87
|
+
strategy: verticalListSortingStrategy,
|
|
88
|
+
children
|
|
89
|
+
});
|
|
90
|
+
$[0] = children;
|
|
91
|
+
$[1] = items;
|
|
92
|
+
$[2] = t1;
|
|
93
|
+
} else t1 = $[2];
|
|
94
|
+
return t1;
|
|
95
|
+
};
|
|
96
|
+
const DraggableRow$1 = (t0) => {
|
|
97
|
+
const $ = c(18);
|
|
98
|
+
const { id, className, isClickable, isSelected, onClick, onDoubleClick, children } = t0;
|
|
99
|
+
let t1;
|
|
100
|
+
if ($[0] !== id) {
|
|
101
|
+
t1 = { id };
|
|
102
|
+
$[0] = id;
|
|
103
|
+
$[1] = t1;
|
|
104
|
+
} else t1 = $[1];
|
|
105
|
+
const { transform, transition, setNodeRef, isDragging } = useSortable(t1);
|
|
106
|
+
let t2;
|
|
107
|
+
if ($[2] !== transform) {
|
|
108
|
+
t2 = CSS.Transform.toString(transform);
|
|
109
|
+
$[2] = transform;
|
|
110
|
+
$[3] = t2;
|
|
111
|
+
} else t2 = $[3];
|
|
112
|
+
const t3 = isDragging ? .8 : 1;
|
|
113
|
+
const t4 = isDragging ? 1 : 0;
|
|
114
|
+
let t5;
|
|
115
|
+
if ($[4] !== t2 || $[5] !== t3 || $[6] !== t4 || $[7] !== transition) {
|
|
116
|
+
t5 = {
|
|
117
|
+
transform: t2,
|
|
118
|
+
transition,
|
|
119
|
+
opacity: t3,
|
|
120
|
+
zIndex: t4,
|
|
121
|
+
position: "relative"
|
|
122
|
+
};
|
|
123
|
+
$[4] = t2;
|
|
124
|
+
$[5] = t3;
|
|
125
|
+
$[6] = t4;
|
|
126
|
+
$[7] = transition;
|
|
127
|
+
$[8] = t5;
|
|
128
|
+
} else t5 = $[8];
|
|
129
|
+
const style = t5;
|
|
130
|
+
const t6 = isClickable || void 0;
|
|
131
|
+
const t7 = isSelected || void 0;
|
|
132
|
+
let t8;
|
|
133
|
+
if ($[9] !== children || $[10] !== className || $[11] !== onClick || $[12] !== onDoubleClick || $[13] !== setNodeRef || $[14] !== style || $[15] !== t6 || $[16] !== t7) {
|
|
134
|
+
t8 = /* @__PURE__ */ jsx("tr", {
|
|
135
|
+
ref: setNodeRef,
|
|
136
|
+
style,
|
|
137
|
+
className,
|
|
138
|
+
"data-clickable": t6,
|
|
139
|
+
"data-selected": t7,
|
|
140
|
+
onClick,
|
|
141
|
+
onDoubleClick,
|
|
142
|
+
children
|
|
143
|
+
});
|
|
144
|
+
$[9] = children;
|
|
145
|
+
$[10] = className;
|
|
146
|
+
$[11] = onClick;
|
|
147
|
+
$[12] = onDoubleClick;
|
|
148
|
+
$[13] = setNodeRef;
|
|
149
|
+
$[14] = style;
|
|
150
|
+
$[15] = t6;
|
|
151
|
+
$[16] = t7;
|
|
152
|
+
$[17] = t8;
|
|
153
|
+
} else t8 = $[17];
|
|
154
|
+
return t8;
|
|
155
|
+
};
|
|
156
|
+
const SortableItem = (t0) => {
|
|
157
|
+
const $ = c(10);
|
|
158
|
+
const { id, children } = t0;
|
|
159
|
+
let t1;
|
|
160
|
+
if ($[0] !== id) {
|
|
161
|
+
t1 = { id };
|
|
162
|
+
$[0] = id;
|
|
163
|
+
$[1] = t1;
|
|
164
|
+
} else t1 = $[1];
|
|
165
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable(t1);
|
|
166
|
+
let t2;
|
|
167
|
+
if ($[2] !== attributes || $[3] !== children || $[4] !== isDragging || $[5] !== listeners || $[6] !== setNodeRef || $[7] !== transform || $[8] !== transition) {
|
|
168
|
+
t2 = children({
|
|
169
|
+
ref: setNodeRef,
|
|
170
|
+
style: {
|
|
171
|
+
transform: CSS.Transform.toString(transform),
|
|
172
|
+
transition,
|
|
173
|
+
zIndex: isDragging ? 1 : 0,
|
|
174
|
+
position: "relative"
|
|
175
|
+
},
|
|
176
|
+
isDragging,
|
|
177
|
+
handleProps: {
|
|
178
|
+
...attributes,
|
|
179
|
+
...listeners
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
$[2] = attributes;
|
|
183
|
+
$[3] = children;
|
|
184
|
+
$[4] = isDragging;
|
|
185
|
+
$[5] = listeners;
|
|
186
|
+
$[6] = setNodeRef;
|
|
187
|
+
$[7] = transform;
|
|
188
|
+
$[8] = transition;
|
|
189
|
+
$[9] = t2;
|
|
190
|
+
} else t2 = $[9];
|
|
191
|
+
return t2;
|
|
192
|
+
};
|
|
193
|
+
const DragHandle$1 = (t0) => {
|
|
194
|
+
const $ = c(6);
|
|
195
|
+
const { id, children } = t0;
|
|
196
|
+
let t1;
|
|
197
|
+
if ($[0] !== id) {
|
|
198
|
+
t1 = { id };
|
|
199
|
+
$[0] = id;
|
|
200
|
+
$[1] = t1;
|
|
201
|
+
} else t1 = $[1];
|
|
202
|
+
const { attributes, listeners } = useSortable(t1);
|
|
203
|
+
let t2;
|
|
204
|
+
if ($[2] !== attributes || $[3] !== children || $[4] !== listeners) {
|
|
205
|
+
t2 = children({
|
|
206
|
+
...attributes,
|
|
207
|
+
...listeners
|
|
208
|
+
});
|
|
209
|
+
$[2] = attributes;
|
|
210
|
+
$[3] = children;
|
|
211
|
+
$[4] = listeners;
|
|
212
|
+
$[5] = t2;
|
|
213
|
+
} else t2 = $[5];
|
|
214
|
+
return t2;
|
|
215
|
+
};
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/components/table/ColumnConfig.tsx
|
|
218
|
+
const getColumnId = (column) => column.id ?? column.accessorKey;
|
|
219
|
+
function ColumnConfigModal(t0) {
|
|
220
|
+
const $ = c(114);
|
|
221
|
+
const { isOpen, onClose, configColumns, visibleColumns, onVisibilityChange, onOrderChange, onReset } = t0;
|
|
222
|
+
const { t } = useTranslation("ui");
|
|
223
|
+
const headingId = useId();
|
|
224
|
+
let t1;
|
|
225
|
+
if ($[0] !== configColumns || $[1] !== visibleColumns) {
|
|
226
|
+
let t2;
|
|
227
|
+
if ($[3] !== visibleColumns) {
|
|
228
|
+
t2 = (column) => {
|
|
229
|
+
const id = getColumnId(column);
|
|
230
|
+
return {
|
|
231
|
+
id,
|
|
232
|
+
label: typeof column.header === "string" && column.header ? column.header : id,
|
|
233
|
+
visible: visibleColumns?.[id] ?? true
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
$[3] = visibleColumns;
|
|
237
|
+
$[4] = t2;
|
|
238
|
+
} else t2 = $[4];
|
|
239
|
+
t1 = configColumns.map(t2);
|
|
240
|
+
$[0] = configColumns;
|
|
241
|
+
$[1] = visibleColumns;
|
|
242
|
+
$[2] = t1;
|
|
243
|
+
} else t1 = $[2];
|
|
244
|
+
const items = t1;
|
|
245
|
+
let T0;
|
|
246
|
+
let T1;
|
|
247
|
+
let handleDragEnd;
|
|
248
|
+
let handleShowAll;
|
|
249
|
+
let handleToggle;
|
|
250
|
+
let t10;
|
|
251
|
+
let t11;
|
|
252
|
+
let t12;
|
|
253
|
+
let t13;
|
|
254
|
+
let t14;
|
|
255
|
+
let t2;
|
|
256
|
+
let t3;
|
|
257
|
+
let t4;
|
|
258
|
+
let t5;
|
|
259
|
+
let t6;
|
|
260
|
+
let t7;
|
|
261
|
+
let t8;
|
|
262
|
+
let t9;
|
|
263
|
+
let visibleCount;
|
|
264
|
+
if ($[5] !== headingId || $[6] !== isOpen || $[7] !== items || $[8] !== onClose || $[9] !== onOrderChange || $[10] !== onVisibilityChange || $[11] !== t || $[12] !== visibleColumns) {
|
|
265
|
+
t14 = Symbol.for("react.early_return_sentinel");
|
|
266
|
+
bb0: {
|
|
267
|
+
visibleCount = items.filter(_temp$3).length;
|
|
268
|
+
let t15;
|
|
269
|
+
if ($[32] !== onVisibilityChange || $[33] !== visibleColumns) {
|
|
270
|
+
t15 = (id_0, visible) => {
|
|
271
|
+
onVisibilityChange({
|
|
272
|
+
...visibleColumns,
|
|
273
|
+
[id_0]: visible
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
$[32] = onVisibilityChange;
|
|
277
|
+
$[33] = visibleColumns;
|
|
278
|
+
$[34] = t15;
|
|
279
|
+
} else t15 = $[34];
|
|
280
|
+
handleToggle = t15;
|
|
281
|
+
let t16;
|
|
282
|
+
if ($[35] !== items || $[36] !== onVisibilityChange) {
|
|
283
|
+
t16 = () => {
|
|
284
|
+
onVisibilityChange(Object.fromEntries(items.map(_temp2$3)));
|
|
285
|
+
};
|
|
286
|
+
$[35] = items;
|
|
287
|
+
$[36] = onVisibilityChange;
|
|
288
|
+
$[37] = t16;
|
|
289
|
+
} else t16 = $[37];
|
|
290
|
+
handleShowAll = t16;
|
|
291
|
+
let t17;
|
|
292
|
+
if ($[38] !== items || $[39] !== onOrderChange) {
|
|
293
|
+
t17 = (t18) => {
|
|
294
|
+
const { active, over } = t18;
|
|
295
|
+
if (!over || active.id === over.id) return;
|
|
296
|
+
const ids = items.map(_temp3$2);
|
|
297
|
+
const oldIndex = ids.indexOf(String(active.id));
|
|
298
|
+
const newIndex = ids.indexOf(String(over.id));
|
|
299
|
+
if (oldIndex === -1 || newIndex === -1) return;
|
|
300
|
+
const [moved] = ids.splice(oldIndex, 1);
|
|
301
|
+
ids.splice(newIndex, 0, moved);
|
|
302
|
+
onOrderChange(ids);
|
|
303
|
+
};
|
|
304
|
+
$[38] = items;
|
|
305
|
+
$[39] = onOrderChange;
|
|
306
|
+
$[40] = t17;
|
|
307
|
+
} else t17 = $[40];
|
|
308
|
+
handleDragEnd = t17;
|
|
309
|
+
if (!isOpen) {
|
|
310
|
+
t14 = null;
|
|
311
|
+
break bb0;
|
|
312
|
+
}
|
|
313
|
+
T1 = Dialog;
|
|
314
|
+
t7 = isOpen;
|
|
315
|
+
t8 = onClose;
|
|
316
|
+
t9 = true;
|
|
317
|
+
t10 = "w-modal";
|
|
318
|
+
t11 = "top-7.5! right-6!";
|
|
319
|
+
t12 = headingId;
|
|
320
|
+
let t18;
|
|
321
|
+
if ($[41] !== t) {
|
|
322
|
+
t18 = t(_temp4$1);
|
|
323
|
+
$[41] = t;
|
|
324
|
+
$[42] = t18;
|
|
325
|
+
} else t18 = $[42];
|
|
326
|
+
let t19;
|
|
327
|
+
if ($[43] !== headingId || $[44] !== t18) {
|
|
328
|
+
t19 = /* @__PURE__ */ jsx(Typography, {
|
|
329
|
+
as: "h2",
|
|
330
|
+
id: headingId,
|
|
331
|
+
size: "h3",
|
|
332
|
+
className: "font-semibold text-foreground",
|
|
333
|
+
children: t18
|
|
334
|
+
});
|
|
335
|
+
$[43] = headingId;
|
|
336
|
+
$[44] = t18;
|
|
337
|
+
$[45] = t19;
|
|
338
|
+
} else t19 = $[45];
|
|
339
|
+
let t20;
|
|
340
|
+
if ($[46] !== t) {
|
|
341
|
+
t20 = t(_temp5);
|
|
342
|
+
$[46] = t;
|
|
343
|
+
$[47] = t20;
|
|
344
|
+
} else t20 = $[47];
|
|
345
|
+
let t21;
|
|
346
|
+
if ($[48] !== t20) {
|
|
347
|
+
t21 = /* @__PURE__ */ jsx(Typography, {
|
|
348
|
+
size: "body",
|
|
349
|
+
className: "text-pretty text-muted-foreground",
|
|
350
|
+
children: t20
|
|
351
|
+
});
|
|
352
|
+
$[48] = t20;
|
|
353
|
+
$[49] = t21;
|
|
354
|
+
} else t21 = $[49];
|
|
355
|
+
if ($[50] !== t19 || $[51] !== t21) {
|
|
356
|
+
t13 = /* @__PURE__ */ jsxs("div", {
|
|
357
|
+
className: "flex flex-col gap-1.5 pr-6",
|
|
358
|
+
children: [t19, t21]
|
|
359
|
+
});
|
|
360
|
+
$[50] = t19;
|
|
361
|
+
$[51] = t21;
|
|
362
|
+
$[52] = t13;
|
|
363
|
+
} else t13 = $[52];
|
|
364
|
+
t6 = "flex flex-col gap-2";
|
|
365
|
+
t5 = "flex items-center justify-between";
|
|
366
|
+
T0 = Typography;
|
|
367
|
+
t2 = "small";
|
|
368
|
+
t3 = "text-muted-foreground";
|
|
369
|
+
t4 = t(_temp6, {
|
|
370
|
+
visible: visibleCount,
|
|
371
|
+
total: items.length
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
$[5] = headingId;
|
|
375
|
+
$[6] = isOpen;
|
|
376
|
+
$[7] = items;
|
|
377
|
+
$[8] = onClose;
|
|
378
|
+
$[9] = onOrderChange;
|
|
379
|
+
$[10] = onVisibilityChange;
|
|
380
|
+
$[11] = t;
|
|
381
|
+
$[12] = visibleColumns;
|
|
382
|
+
$[13] = T0;
|
|
383
|
+
$[14] = T1;
|
|
384
|
+
$[15] = handleDragEnd;
|
|
385
|
+
$[16] = handleShowAll;
|
|
386
|
+
$[17] = handleToggle;
|
|
387
|
+
$[18] = t10;
|
|
388
|
+
$[19] = t11;
|
|
389
|
+
$[20] = t12;
|
|
390
|
+
$[21] = t13;
|
|
391
|
+
$[22] = t14;
|
|
392
|
+
$[23] = t2;
|
|
393
|
+
$[24] = t3;
|
|
394
|
+
$[25] = t4;
|
|
395
|
+
$[26] = t5;
|
|
396
|
+
$[27] = t6;
|
|
397
|
+
$[28] = t7;
|
|
398
|
+
$[29] = t8;
|
|
399
|
+
$[30] = t9;
|
|
400
|
+
$[31] = visibleCount;
|
|
401
|
+
} else {
|
|
402
|
+
T0 = $[13];
|
|
403
|
+
T1 = $[14];
|
|
404
|
+
handleDragEnd = $[15];
|
|
405
|
+
handleShowAll = $[16];
|
|
406
|
+
handleToggle = $[17];
|
|
407
|
+
t10 = $[18];
|
|
408
|
+
t11 = $[19];
|
|
409
|
+
t12 = $[20];
|
|
410
|
+
t13 = $[21];
|
|
411
|
+
t14 = $[22];
|
|
412
|
+
t2 = $[23];
|
|
413
|
+
t3 = $[24];
|
|
414
|
+
t4 = $[25];
|
|
415
|
+
t5 = $[26];
|
|
416
|
+
t6 = $[27];
|
|
417
|
+
t7 = $[28];
|
|
418
|
+
t8 = $[29];
|
|
419
|
+
t9 = $[30];
|
|
420
|
+
visibleCount = $[31];
|
|
421
|
+
}
|
|
422
|
+
if (t14 !== Symbol.for("react.early_return_sentinel")) return t14;
|
|
423
|
+
let t15;
|
|
424
|
+
if ($[53] !== T0 || $[54] !== t2 || $[55] !== t3 || $[56] !== t4) {
|
|
425
|
+
t15 = /* @__PURE__ */ jsx(T0, {
|
|
426
|
+
size: t2,
|
|
427
|
+
className: t3,
|
|
428
|
+
children: t4
|
|
429
|
+
});
|
|
430
|
+
$[53] = T0;
|
|
431
|
+
$[54] = t2;
|
|
432
|
+
$[55] = t3;
|
|
433
|
+
$[56] = t4;
|
|
434
|
+
$[57] = t15;
|
|
435
|
+
} else t15 = $[57];
|
|
436
|
+
const t16 = visibleCount === items.length;
|
|
437
|
+
let t17;
|
|
438
|
+
if ($[58] !== t) {
|
|
439
|
+
t17 = t(_temp7);
|
|
440
|
+
$[58] = t;
|
|
441
|
+
$[59] = t17;
|
|
442
|
+
} else t17 = $[59];
|
|
443
|
+
let t18;
|
|
444
|
+
if ($[60] !== handleShowAll || $[61] !== t16 || $[62] !== t17) {
|
|
445
|
+
t18 = /* @__PURE__ */ jsx(Button, {
|
|
446
|
+
variant: "ghost",
|
|
447
|
+
color: "secondary",
|
|
448
|
+
size: "sm",
|
|
449
|
+
width: "hug",
|
|
450
|
+
isDisabled: t16,
|
|
451
|
+
onPress: handleShowAll,
|
|
452
|
+
children: t17
|
|
453
|
+
});
|
|
454
|
+
$[60] = handleShowAll;
|
|
455
|
+
$[61] = t16;
|
|
456
|
+
$[62] = t17;
|
|
457
|
+
$[63] = t18;
|
|
458
|
+
} else t18 = $[63];
|
|
459
|
+
let t19;
|
|
460
|
+
if ($[64] !== t15 || $[65] !== t18 || $[66] !== t5) {
|
|
461
|
+
t19 = /* @__PURE__ */ jsxs("div", {
|
|
462
|
+
className: t5,
|
|
463
|
+
children: [t15, t18]
|
|
464
|
+
});
|
|
465
|
+
$[64] = t15;
|
|
466
|
+
$[65] = t18;
|
|
467
|
+
$[66] = t5;
|
|
468
|
+
$[67] = t19;
|
|
469
|
+
} else t19 = $[67];
|
|
470
|
+
let t20;
|
|
471
|
+
if ($[68] !== items) {
|
|
472
|
+
t20 = items.map(_temp8);
|
|
473
|
+
$[68] = items;
|
|
474
|
+
$[69] = t20;
|
|
475
|
+
} else t20 = $[69];
|
|
476
|
+
let t21;
|
|
477
|
+
if ($[70] !== handleToggle || $[71] !== items || $[72] !== t) {
|
|
478
|
+
let t22;
|
|
479
|
+
if ($[74] !== handleToggle || $[75] !== t) {
|
|
480
|
+
t22 = (item_3) => /* @__PURE__ */ jsx(SortableItem, {
|
|
481
|
+
id: item_3.id,
|
|
482
|
+
children: (t23) => {
|
|
483
|
+
const { ref, style, isDragging, handleProps } = t23;
|
|
484
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
485
|
+
ref,
|
|
486
|
+
style,
|
|
487
|
+
className: clsx("flex h-11 items-center gap-2 border-b border-border bg-background pr-3 pl-1 last:border-b-0", isDragging && "shadow-md"),
|
|
488
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
489
|
+
...handleProps,
|
|
490
|
+
className: "cursor-move p-1 text-muted-foreground",
|
|
491
|
+
label: t(_temp9, { column: item_3.label }),
|
|
492
|
+
icon: GripVertical,
|
|
493
|
+
variant: "text",
|
|
494
|
+
width: "hug",
|
|
495
|
+
disableTooltip: true,
|
|
496
|
+
size: "sm"
|
|
497
|
+
}), /* @__PURE__ */ jsx(Checkbox, {
|
|
498
|
+
isSelected: item_3.visible,
|
|
499
|
+
onChange: (isSelected) => handleToggle(item_3.id, isSelected),
|
|
500
|
+
hideError: true,
|
|
501
|
+
className: "flex-1 flex-row-reverse justify-between",
|
|
502
|
+
labelClassName: item_3.visible ? "text-foreground" : "text-muted-foreground",
|
|
503
|
+
children: item_3.label
|
|
504
|
+
})]
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
}, item_3.id);
|
|
508
|
+
$[74] = handleToggle;
|
|
509
|
+
$[75] = t;
|
|
510
|
+
$[76] = t22;
|
|
511
|
+
} else t22 = $[76];
|
|
512
|
+
t21 = items.map(t22);
|
|
513
|
+
$[70] = handleToggle;
|
|
514
|
+
$[71] = items;
|
|
515
|
+
$[72] = t;
|
|
516
|
+
$[73] = t21;
|
|
517
|
+
} else t21 = $[73];
|
|
518
|
+
let t22;
|
|
519
|
+
if ($[77] !== t21) {
|
|
520
|
+
t22 = /* @__PURE__ */ jsx("ul", {
|
|
521
|
+
className: "max-h-96 overflow-y-auto rounded-lg border border-border",
|
|
522
|
+
children: t21
|
|
523
|
+
});
|
|
524
|
+
$[77] = t21;
|
|
525
|
+
$[78] = t22;
|
|
526
|
+
} else t22 = $[78];
|
|
527
|
+
let t23;
|
|
528
|
+
if ($[79] !== t20 || $[80] !== t22) {
|
|
529
|
+
t23 = /* @__PURE__ */ jsx(SortableRows$1, {
|
|
530
|
+
items: t20,
|
|
531
|
+
children: t22
|
|
532
|
+
});
|
|
533
|
+
$[79] = t20;
|
|
534
|
+
$[80] = t22;
|
|
535
|
+
$[81] = t23;
|
|
536
|
+
} else t23 = $[81];
|
|
537
|
+
let t24;
|
|
538
|
+
if ($[82] !== handleDragEnd || $[83] !== t23) {
|
|
539
|
+
t24 = /* @__PURE__ */ jsx(DndProvider$1, {
|
|
540
|
+
onDragEnd: handleDragEnd,
|
|
541
|
+
children: t23
|
|
542
|
+
});
|
|
543
|
+
$[82] = handleDragEnd;
|
|
544
|
+
$[83] = t23;
|
|
545
|
+
$[84] = t24;
|
|
546
|
+
} else t24 = $[84];
|
|
547
|
+
let t25;
|
|
548
|
+
if ($[85] !== t19 || $[86] !== t24 || $[87] !== t6) {
|
|
549
|
+
t25 = /* @__PURE__ */ jsxs("div", {
|
|
550
|
+
className: t6,
|
|
551
|
+
children: [t19, t24]
|
|
552
|
+
});
|
|
553
|
+
$[85] = t19;
|
|
554
|
+
$[86] = t24;
|
|
555
|
+
$[87] = t6;
|
|
556
|
+
$[88] = t25;
|
|
557
|
+
} else t25 = $[88];
|
|
558
|
+
const t26 = onReset ? "justify-between" : "justify-end";
|
|
559
|
+
let t27;
|
|
560
|
+
if ($[89] !== t26) {
|
|
561
|
+
t27 = clsx("flex items-center gap-2", t26);
|
|
562
|
+
$[89] = t26;
|
|
563
|
+
$[90] = t27;
|
|
564
|
+
} else t27 = $[90];
|
|
565
|
+
let t28;
|
|
566
|
+
if ($[91] !== onReset || $[92] !== t) {
|
|
567
|
+
t28 = onReset && /* @__PURE__ */ jsx(Button, {
|
|
568
|
+
variant: "ghost",
|
|
569
|
+
color: "secondary",
|
|
570
|
+
width: "hug",
|
|
571
|
+
onPress: onReset,
|
|
572
|
+
children: t(_temp0)
|
|
573
|
+
});
|
|
574
|
+
$[91] = onReset;
|
|
575
|
+
$[92] = t;
|
|
576
|
+
$[93] = t28;
|
|
577
|
+
} else t28 = $[93];
|
|
578
|
+
let t29;
|
|
579
|
+
if ($[94] !== t) {
|
|
580
|
+
t29 = t(_temp1);
|
|
581
|
+
$[94] = t;
|
|
582
|
+
$[95] = t29;
|
|
583
|
+
} else t29 = $[95];
|
|
584
|
+
let t30;
|
|
585
|
+
if ($[96] !== onClose || $[97] !== t29) {
|
|
586
|
+
t30 = /* @__PURE__ */ jsx(Button, {
|
|
587
|
+
variant: "contained",
|
|
588
|
+
color: "primary",
|
|
589
|
+
width: "hug",
|
|
590
|
+
onPress: onClose,
|
|
591
|
+
children: t29
|
|
592
|
+
});
|
|
593
|
+
$[96] = onClose;
|
|
594
|
+
$[97] = t29;
|
|
595
|
+
$[98] = t30;
|
|
596
|
+
} else t30 = $[98];
|
|
597
|
+
let t31;
|
|
598
|
+
if ($[99] !== t27 || $[100] !== t28 || $[101] !== t30) {
|
|
599
|
+
t31 = /* @__PURE__ */ jsxs("div", {
|
|
600
|
+
className: t27,
|
|
601
|
+
children: [t28, t30]
|
|
602
|
+
});
|
|
603
|
+
$[99] = t27;
|
|
604
|
+
$[100] = t28;
|
|
605
|
+
$[101] = t30;
|
|
606
|
+
$[102] = t31;
|
|
607
|
+
} else t31 = $[102];
|
|
608
|
+
let t32;
|
|
609
|
+
if ($[103] !== T1 || $[104] !== t10 || $[105] !== t11 || $[106] !== t12 || $[107] !== t13 || $[108] !== t25 || $[109] !== t31 || $[110] !== t7 || $[111] !== t8 || $[112] !== t9) {
|
|
610
|
+
t32 = /* @__PURE__ */ jsxs(T1, {
|
|
611
|
+
isOpen: t7,
|
|
612
|
+
onClose: t8,
|
|
613
|
+
showCloseIcon: t9,
|
|
614
|
+
dialogClassName: t10,
|
|
615
|
+
closeIconClassName: t11,
|
|
616
|
+
"aria-labelledby": t12,
|
|
617
|
+
children: [
|
|
618
|
+
t13,
|
|
619
|
+
t25,
|
|
620
|
+
t31
|
|
621
|
+
]
|
|
622
|
+
});
|
|
623
|
+
$[103] = T1;
|
|
624
|
+
$[104] = t10;
|
|
625
|
+
$[105] = t11;
|
|
626
|
+
$[106] = t12;
|
|
627
|
+
$[107] = t13;
|
|
628
|
+
$[108] = t25;
|
|
629
|
+
$[109] = t31;
|
|
630
|
+
$[110] = t7;
|
|
631
|
+
$[111] = t8;
|
|
632
|
+
$[112] = t9;
|
|
633
|
+
$[113] = t32;
|
|
634
|
+
} else t32 = $[113];
|
|
635
|
+
return t32;
|
|
636
|
+
}
|
|
637
|
+
function _temp1($_5) {
|
|
638
|
+
return $_5.ui.table.done;
|
|
639
|
+
}
|
|
640
|
+
function _temp0($_4) {
|
|
641
|
+
return $_4.ui.table.reset;
|
|
642
|
+
}
|
|
643
|
+
function _temp9($_3) {
|
|
644
|
+
return $_3.ui.table.reorderColumn;
|
|
645
|
+
}
|
|
646
|
+
function _temp8(item_2) {
|
|
647
|
+
return item_2.id;
|
|
648
|
+
}
|
|
649
|
+
function _temp7($_2) {
|
|
650
|
+
return $_2.ui.table.showAll;
|
|
651
|
+
}
|
|
652
|
+
function _temp6($_1) {
|
|
653
|
+
return $_1.ui.table.visibleCount;
|
|
654
|
+
}
|
|
655
|
+
function _temp5($_0) {
|
|
656
|
+
return $_0.ui.table.configureColumnsDescription;
|
|
657
|
+
}
|
|
658
|
+
function _temp4$1($) {
|
|
659
|
+
return $.ui.table.configureColumns;
|
|
660
|
+
}
|
|
661
|
+
function _temp3$2(item_1) {
|
|
662
|
+
return item_1.id;
|
|
663
|
+
}
|
|
664
|
+
function _temp2$3(item_0) {
|
|
665
|
+
return [item_0.id, true];
|
|
666
|
+
}
|
|
667
|
+
function _temp$3(item) {
|
|
668
|
+
return item.visible;
|
|
669
|
+
}
|
|
670
|
+
//#endregion
|
|
43
671
|
//#region src/components/table/HeaderText.tsx
|
|
44
672
|
const HeaderText = (props) => {
|
|
45
673
|
const uiConfig = UIConfig.useConfig();
|
|
@@ -727,12 +1355,12 @@ const useColumnResize = (t0) => {
|
|
|
727
1355
|
$[11] = t4;
|
|
728
1356
|
} else t4 = $[11];
|
|
729
1357
|
const tableStyle = t4;
|
|
730
|
-
const clamp = _temp$
|
|
1358
|
+
const clamp = _temp$2;
|
|
731
1359
|
let t5;
|
|
732
1360
|
if ($[12] !== columnSizing || $[13] !== columns || $[14] !== theadRef) {
|
|
733
1361
|
t5 = () => {
|
|
734
1362
|
const sizes_0 = { ...columnSizing };
|
|
735
|
-
const leafColumnIds = new Set(columns.map(_temp2$
|
|
1363
|
+
const leafColumnIds = new Set(columns.map(_temp2$2));
|
|
736
1364
|
theadRef.current?.querySelectorAll("th[data-column-id]").forEach((header) => {
|
|
737
1365
|
const columnId_0 = header.dataset.columnId;
|
|
738
1366
|
if (leafColumnIds.has(columnId_0)) sizes_0[columnId_0] = Math.round(header.getBoundingClientRect().width);
|
|
@@ -867,10 +1495,10 @@ const useColumnResize = (t0) => {
|
|
|
867
1495
|
} else t10 = $[38];
|
|
868
1496
|
return t10;
|
|
869
1497
|
};
|
|
870
|
-
function _temp$
|
|
1498
|
+
function _temp$2(column_0, width) {
|
|
871
1499
|
return Math.round(Math.min(column_0.maxSize ?? Infinity, Math.max(column_0.minSize ?? 60, width)));
|
|
872
1500
|
}
|
|
873
|
-
function _temp2$
|
|
1501
|
+
function _temp2$2(column_1) {
|
|
874
1502
|
return column_1.id;
|
|
875
1503
|
}
|
|
876
1504
|
function _temp3$1(col_0) {
|
|
@@ -878,10 +1506,10 @@ function _temp3$1(col_0) {
|
|
|
878
1506
|
}
|
|
879
1507
|
//#endregion
|
|
880
1508
|
//#region src/components/table/Table.tsx
|
|
881
|
-
const DndProvider = lazy(() =>
|
|
882
|
-
const SortableRows = lazy(() =>
|
|
883
|
-
const DraggableRow = lazy(() =>
|
|
884
|
-
const DragHandle = lazy(() =>
|
|
1509
|
+
const DndProvider = lazy(() => Promise.resolve().then(() => TableDnd_exports).then((module) => ({ default: module.DndProvider })));
|
|
1510
|
+
const SortableRows = lazy(() => Promise.resolve().then(() => TableDnd_exports).then((module) => ({ default: module.SortableRows })));
|
|
1511
|
+
const DraggableRow = lazy(() => Promise.resolve().then(() => TableDnd_exports).then((module) => ({ default: module.DraggableRow })));
|
|
1512
|
+
const DragHandle = lazy(() => Promise.resolve().then(() => TableDnd_exports).then((module) => ({ default: module.DragHandle })));
|
|
885
1513
|
const tableFeaturesConfig = tableFeatures({
|
|
886
1514
|
...stockFeatures,
|
|
887
1515
|
sortedRowModel: createSortedRowModel(),
|
|
@@ -1448,183 +2076,6 @@ const Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, clas
|
|
|
1448
2076
|
return tableElement;
|
|
1449
2077
|
};
|
|
1450
2078
|
//#endregion
|
|
1451
|
-
//#region src/components/table/ColumnConfig.tsx
|
|
1452
|
-
const VisibilityCell = (t0) => {
|
|
1453
|
-
const $ = c(7);
|
|
1454
|
-
const { original, onToggle } = t0;
|
|
1455
|
-
let t1;
|
|
1456
|
-
if ($[0] !== onToggle || $[1] !== original.id) {
|
|
1457
|
-
t1 = () => onToggle(original.id);
|
|
1458
|
-
$[0] = onToggle;
|
|
1459
|
-
$[1] = original.id;
|
|
1460
|
-
$[2] = t1;
|
|
1461
|
-
} else t1 = $[2];
|
|
1462
|
-
const t2 = original.label;
|
|
1463
|
-
let t3;
|
|
1464
|
-
if ($[3] !== original.visible || $[4] !== t1 || $[5] !== t2) {
|
|
1465
|
-
t3 = /* @__PURE__ */ jsx(Checkbox, {
|
|
1466
|
-
isSelected: original.visible,
|
|
1467
|
-
onChange: t1,
|
|
1468
|
-
hideLabel: true,
|
|
1469
|
-
children: t2
|
|
1470
|
-
});
|
|
1471
|
-
$[3] = original.visible;
|
|
1472
|
-
$[4] = t1;
|
|
1473
|
-
$[5] = t2;
|
|
1474
|
-
$[6] = t3;
|
|
1475
|
-
} else t3 = $[6];
|
|
1476
|
-
return t3;
|
|
1477
|
-
};
|
|
1478
|
-
const getColumns = (t, handleToggleVisibility) => [{
|
|
1479
|
-
id: "name",
|
|
1480
|
-
header: t(($) => $.ui.table.column, { ns: "ui" }),
|
|
1481
|
-
meta: { width: "flex-1" },
|
|
1482
|
-
accessorKey: "label"
|
|
1483
|
-
}, {
|
|
1484
|
-
id: "visible",
|
|
1485
|
-
header: t(($) => $.ui.table.show, { ns: "ui" }),
|
|
1486
|
-
meta: { width: "w-20" },
|
|
1487
|
-
cell: ({ original }) => /* @__PURE__ */ jsx(VisibilityCell, {
|
|
1488
|
-
original,
|
|
1489
|
-
onToggle: handleToggleVisibility
|
|
1490
|
-
})
|
|
1491
|
-
}];
|
|
1492
|
-
function ColumnConfigModal(t0) {
|
|
1493
|
-
const $ = c(27);
|
|
1494
|
-
const { isOpen, onClose, configColumns, visibleColumns, onVisibilityChange, onOrderChange } = t0;
|
|
1495
|
-
const { t } = useTranslation("ui");
|
|
1496
|
-
let t1;
|
|
1497
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1498
|
-
t1 = [];
|
|
1499
|
-
$[0] = t1;
|
|
1500
|
-
} else t1 = $[0];
|
|
1501
|
-
const [data, setData] = useState(t1);
|
|
1502
|
-
let t2;
|
|
1503
|
-
let t3;
|
|
1504
|
-
if ($[1] !== configColumns || $[2] !== visibleColumns) {
|
|
1505
|
-
t2 = () => {
|
|
1506
|
-
setData(configColumns.map((column) => {
|
|
1507
|
-
const columnId = column.id ?? column.accessorKey;
|
|
1508
|
-
return {
|
|
1509
|
-
id: columnId,
|
|
1510
|
-
label: column.header,
|
|
1511
|
-
visible: visibleColumns?.[columnId] ?? true
|
|
1512
|
-
};
|
|
1513
|
-
}));
|
|
1514
|
-
};
|
|
1515
|
-
t3 = [configColumns, visibleColumns];
|
|
1516
|
-
$[1] = configColumns;
|
|
1517
|
-
$[2] = visibleColumns;
|
|
1518
|
-
$[3] = t2;
|
|
1519
|
-
$[4] = t3;
|
|
1520
|
-
} else {
|
|
1521
|
-
t2 = $[3];
|
|
1522
|
-
t3 = $[4];
|
|
1523
|
-
}
|
|
1524
|
-
useEffect(t2, t3);
|
|
1525
|
-
let t4;
|
|
1526
|
-
if ($[5] !== onVisibilityChange || $[6] !== visibleColumns) {
|
|
1527
|
-
t4 = (columnId_0) => {
|
|
1528
|
-
const newVisible = {
|
|
1529
|
-
...visibleColumns,
|
|
1530
|
-
[columnId_0]: !visibleColumns[columnId_0]
|
|
1531
|
-
};
|
|
1532
|
-
onVisibilityChange(newVisible);
|
|
1533
|
-
};
|
|
1534
|
-
$[5] = onVisibilityChange;
|
|
1535
|
-
$[6] = visibleColumns;
|
|
1536
|
-
$[7] = t4;
|
|
1537
|
-
} else t4 = $[7];
|
|
1538
|
-
const handleToggleVisibility = t4;
|
|
1539
|
-
let t5;
|
|
1540
|
-
if ($[8] !== handleToggleVisibility) {
|
|
1541
|
-
t5 = (translateFn) => getColumns(translateFn, handleToggleVisibility);
|
|
1542
|
-
$[8] = handleToggleVisibility;
|
|
1543
|
-
$[9] = t5;
|
|
1544
|
-
} else t5 = $[9];
|
|
1545
|
-
const columns = useTranslationMemo(t5);
|
|
1546
|
-
let t6;
|
|
1547
|
-
if ($[10] !== onOrderChange) {
|
|
1548
|
-
t6 = (reorderedItems) => {
|
|
1549
|
-
setData(reorderedItems);
|
|
1550
|
-
onOrderChange(reorderedItems.map(_temp$2));
|
|
1551
|
-
};
|
|
1552
|
-
$[10] = onOrderChange;
|
|
1553
|
-
$[11] = t6;
|
|
1554
|
-
} else t6 = $[11];
|
|
1555
|
-
const handleReorder = t6;
|
|
1556
|
-
if (!isOpen) return null;
|
|
1557
|
-
let t7;
|
|
1558
|
-
if ($[12] !== t) {
|
|
1559
|
-
t7 = t(_temp2$2);
|
|
1560
|
-
$[12] = t;
|
|
1561
|
-
$[13] = t7;
|
|
1562
|
-
} else t7 = $[13];
|
|
1563
|
-
let t8;
|
|
1564
|
-
if ($[14] !== t7) {
|
|
1565
|
-
t8 = /* @__PURE__ */ jsx(Typography, {
|
|
1566
|
-
as: "h2",
|
|
1567
|
-
className: "font-semibold",
|
|
1568
|
-
size: "h3",
|
|
1569
|
-
children: t7
|
|
1570
|
-
});
|
|
1571
|
-
$[14] = t7;
|
|
1572
|
-
$[15] = t8;
|
|
1573
|
-
} else t8 = $[15];
|
|
1574
|
-
let t9;
|
|
1575
|
-
if ($[16] !== columns || $[17] !== data || $[18] !== handleReorder) {
|
|
1576
|
-
t9 = /* @__PURE__ */ jsx("div", {
|
|
1577
|
-
className: "max-h-96 overflow-y-auto",
|
|
1578
|
-
children: /* @__PURE__ */ jsx(Table, {
|
|
1579
|
-
items: data,
|
|
1580
|
-
columns,
|
|
1581
|
-
showCellBorder: true,
|
|
1582
|
-
className: "w-full",
|
|
1583
|
-
enableDragDrop: true,
|
|
1584
|
-
getRowId: _temp3,
|
|
1585
|
-
onReorder: handleReorder
|
|
1586
|
-
})
|
|
1587
|
-
});
|
|
1588
|
-
$[16] = columns;
|
|
1589
|
-
$[17] = data;
|
|
1590
|
-
$[18] = handleReorder;
|
|
1591
|
-
$[19] = t9;
|
|
1592
|
-
} else t9 = $[19];
|
|
1593
|
-
let t10;
|
|
1594
|
-
if ($[20] !== t8 || $[21] !== t9) {
|
|
1595
|
-
t10 = /* @__PURE__ */ jsxs("div", {
|
|
1596
|
-
className: "flex flex-col gap-2 p-4",
|
|
1597
|
-
children: [t8, t9]
|
|
1598
|
-
});
|
|
1599
|
-
$[20] = t8;
|
|
1600
|
-
$[21] = t9;
|
|
1601
|
-
$[22] = t10;
|
|
1602
|
-
} else t10 = $[22];
|
|
1603
|
-
let t11;
|
|
1604
|
-
if ($[23] !== isOpen || $[24] !== onClose || $[25] !== t10) {
|
|
1605
|
-
t11 = /* @__PURE__ */ jsx(Dialog, {
|
|
1606
|
-
isOpen,
|
|
1607
|
-
onClose,
|
|
1608
|
-
showCloseIcon: true,
|
|
1609
|
-
children: t10
|
|
1610
|
-
});
|
|
1611
|
-
$[23] = isOpen;
|
|
1612
|
-
$[24] = onClose;
|
|
1613
|
-
$[25] = t10;
|
|
1614
|
-
$[26] = t11;
|
|
1615
|
-
} else t11 = $[26];
|
|
1616
|
-
return t11;
|
|
1617
|
-
}
|
|
1618
|
-
function _temp3(row) {
|
|
1619
|
-
return row.id;
|
|
1620
|
-
}
|
|
1621
|
-
function _temp2$2($) {
|
|
1622
|
-
return $.ui.table.configureColumns;
|
|
1623
|
-
}
|
|
1624
|
-
function _temp$2(item) {
|
|
1625
|
-
return item.id;
|
|
1626
|
-
}
|
|
1627
|
-
//#endregion
|
|
1628
2079
|
//#region src/components/table/InfiniteTable.tsx
|
|
1629
2080
|
const InfiniteTable = (t0) => {
|
|
1630
2081
|
const $ = c(20);
|
|
@@ -1780,7 +2231,7 @@ function sortByKeyOrder(data, orderedKeys = []) {
|
|
|
1780
2231
|
});
|
|
1781
2232
|
}
|
|
1782
2233
|
function useTableColumnConfig(defaultColumns, t0) {
|
|
1783
|
-
const $ = c(
|
|
2234
|
+
const $ = c(36);
|
|
1784
2235
|
let t1;
|
|
1785
2236
|
if ($[0] !== t0) {
|
|
1786
2237
|
t1 = t0 === void 0 ? {} : t0;
|
|
@@ -1853,46 +2304,66 @@ function useTableColumnConfig(defaultColumns, t0) {
|
|
|
1853
2304
|
} else t9 = $[15];
|
|
1854
2305
|
const handleOrderChange = t9;
|
|
1855
2306
|
let t10;
|
|
1856
|
-
if ($[16] !== defaultColumns || $[17] !==
|
|
1857
|
-
t10 =
|
|
2307
|
+
if ($[16] !== defaultColumns || $[17] !== handleOrderChange || $[18] !== handleVisibilityChange) {
|
|
2308
|
+
t10 = () => {
|
|
2309
|
+
handleVisibilityChange(Object.fromEntries(defaultColumns.map(_temp3)));
|
|
2310
|
+
handleOrderChange(defaultColumns.map(_temp4));
|
|
2311
|
+
};
|
|
1858
2312
|
$[16] = defaultColumns;
|
|
1859
|
-
$[17] =
|
|
1860
|
-
$[18] =
|
|
1861
|
-
|
|
1862
|
-
|
|
2313
|
+
$[17] = handleOrderChange;
|
|
2314
|
+
$[18] = handleVisibilityChange;
|
|
2315
|
+
$[19] = t10;
|
|
2316
|
+
} else t10 = $[19];
|
|
2317
|
+
const resetColumns = t10;
|
|
1863
2318
|
let t11;
|
|
1864
|
-
if ($[
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
t11 = configColumns.filter(t12);
|
|
1872
|
-
$[19] = configColumns;
|
|
1873
|
-
$[20] = internalVisibleColumns;
|
|
1874
|
-
$[21] = t11;
|
|
1875
|
-
} else t11 = $[21];
|
|
1876
|
-
const columns = t11;
|
|
2319
|
+
if ($[20] !== defaultColumns || $[21] !== internalColumnOrder) {
|
|
2320
|
+
t11 = sortByKeyOrder(defaultColumns, internalColumnOrder);
|
|
2321
|
+
$[20] = defaultColumns;
|
|
2322
|
+
$[21] = internalColumnOrder;
|
|
2323
|
+
$[22] = t11;
|
|
2324
|
+
} else t11 = $[22];
|
|
2325
|
+
const configColumns = t11;
|
|
1877
2326
|
let t12;
|
|
1878
|
-
if ($[
|
|
1879
|
-
|
|
2327
|
+
if ($[23] !== configColumns || $[24] !== internalVisibleColumns) {
|
|
2328
|
+
let t13;
|
|
2329
|
+
if ($[26] !== internalVisibleColumns) {
|
|
2330
|
+
t13 = (col_3) => internalVisibleColumns?.[col_3.id ?? col_3.accessorKey] ?? true;
|
|
2331
|
+
$[26] = internalVisibleColumns;
|
|
2332
|
+
$[27] = t13;
|
|
2333
|
+
} else t13 = $[27];
|
|
2334
|
+
t12 = configColumns.filter(t13);
|
|
2335
|
+
$[23] = configColumns;
|
|
2336
|
+
$[24] = internalVisibleColumns;
|
|
2337
|
+
$[25] = t12;
|
|
2338
|
+
} else t12 = $[25];
|
|
2339
|
+
const columns = t12;
|
|
2340
|
+
let t13;
|
|
2341
|
+
if ($[28] !== columns || $[29] !== configColumns || $[30] !== handleOrderChange || $[31] !== handleVisibilityChange || $[32] !== internalColumnOrder || $[33] !== internalVisibleColumns || $[34] !== resetColumns) {
|
|
2342
|
+
t13 = {
|
|
1880
2343
|
configColumns,
|
|
1881
2344
|
columns,
|
|
1882
2345
|
visibleColumns: internalVisibleColumns,
|
|
1883
2346
|
columnOrder: internalColumnOrder,
|
|
1884
2347
|
onVisibilityChange: handleVisibilityChange,
|
|
1885
|
-
onOrderChange: handleOrderChange
|
|
2348
|
+
onOrderChange: handleOrderChange,
|
|
2349
|
+
resetColumns
|
|
1886
2350
|
};
|
|
1887
|
-
$[
|
|
1888
|
-
$[
|
|
1889
|
-
$[
|
|
1890
|
-
$[
|
|
1891
|
-
$[
|
|
1892
|
-
$[
|
|
1893
|
-
$[
|
|
1894
|
-
|
|
1895
|
-
|
|
2351
|
+
$[28] = columns;
|
|
2352
|
+
$[29] = configColumns;
|
|
2353
|
+
$[30] = handleOrderChange;
|
|
2354
|
+
$[31] = handleVisibilityChange;
|
|
2355
|
+
$[32] = internalColumnOrder;
|
|
2356
|
+
$[33] = internalVisibleColumns;
|
|
2357
|
+
$[34] = resetColumns;
|
|
2358
|
+
$[35] = t13;
|
|
2359
|
+
} else t13 = $[35];
|
|
2360
|
+
return t13;
|
|
2361
|
+
}
|
|
2362
|
+
function _temp4(col_2) {
|
|
2363
|
+
return col_2.id ?? col_2.accessorKey;
|
|
2364
|
+
}
|
|
2365
|
+
function _temp3(col_1) {
|
|
2366
|
+
return [col_1.id ?? col_1.accessorKey, true];
|
|
1896
2367
|
}
|
|
1897
2368
|
function _temp2(col_0) {
|
|
1898
2369
|
return col_0.id ?? col_0.accessorKey;
|
|
@@ -1903,4 +2374,4 @@ function _temp(acc, col) {
|
|
|
1903
2374
|
return acc;
|
|
1904
2375
|
}
|
|
1905
2376
|
//#endregion
|
|
1906
|
-
export {
|
|
2377
|
+
export { useTableNav as a, CellText as c, Table as i, useSorting as n, HeaderText as o, InfiniteTable as r, ColumnConfigModal as s, useTableColumnConfig as t };
|