asma-ui-core 3.122.0 → 3.123.1
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/asma-ui-core.css +1 -1
- package/dist/components/custom/pathfinder-card/PathfinderCard.js +16 -16
- package/dist/index.js +66 -63
- package/dist/src/table/components/table-header/SortIndicator.d.ts +12 -0
- package/dist/src/table/custom-features/order-columns/columnLayout.d.ts +24 -0
- package/dist/src/table/custom-features/order-columns/columnLayout.test.d.ts +1 -0
- package/dist/src/table/custom-features/order-columns/types.d.ts +8 -0
- package/dist/src/table/custom-features/order-columns/usePersistColumnOrder.d.ts +5 -0
- package/dist/src/table/helpers/columnIds.d.ts +27 -0
- package/dist/src/table/helpers/columnIds.test.d.ts +1 -0
- package/dist/src/table/helpers/tableStorage.d.ts +12 -0
- package/dist/src/table/helpers/tableStorage.test.d.ts +1 -0
- package/dist/src/table/hooks/useColumnSizingPersistence.d.ts +16 -3
- package/dist/src/table/hooks/useColumnSizingPersistence.test.d.ts +1 -0
- package/dist/src/table/hooks/usePersistedSorting.d.ts +54 -0
- package/dist/src/table/hooks/usePersistedSorting.test.d.ts +1 -0
- package/dist/src/table/hooks/usePersistedStateWriter.d.ts +30 -0
- package/dist/src/table/hooks/useTranslations.d.ts +6 -4
- package/dist/src/table/index.d.ts +1 -0
- package/dist/src/table/types.d.ts +9 -2
- package/dist/table/components/StyledTable.module.js +59 -56
- package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +61 -54
- package/dist/table/components/columns/action-column/components/TableActions.module.js +4 -4
- package/dist/table/components/table-header/SortIndicator.js +23 -0
- package/dist/table/components/table-header/TableHeader.js +30 -30
- package/dist/table/components/table-header/TableHeaderCell.js +30 -31
- package/dist/table/custom-features/order-columns/OrderColumnsFeature.js +7 -8
- package/dist/table/custom-features/order-columns/columnLayout.js +9 -0
- package/dist/table/custom-features/order-columns/usePersistColumnOrder.js +12 -11
- package/dist/table/custom-features/order-columns/usePersistedColumnOrder.js +7 -12
- package/dist/table/helpers/columnIds.js +28 -0
- package/dist/table/helpers/tableStorage.js +33 -0
- package/dist/table/hooks/useColumnSizingPersistence.js +16 -34
- package/dist/table/hooks/usePersistedPageSize.js +11 -16
- package/dist/table/hooks/usePersistedSorting.js +58 -0
- package/dist/table/hooks/usePersistedStateWriter.js +36 -0
- package/dist/table/hooks/useStyledTable.js +90 -60
- package/dist/table/hooks/useTranslations.js +13 -11
- package/dist/table/index.js +3 -2
- package/dist/table/shared-components/DropDownIcon.js +4 -2
- package/dist/table/shared-components/DropUpIcon.js +5 -3
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@ import { cn as g } from "../../../helpers/cn.js";
|
|
|
2
2
|
import { ChevronDownIcon as j } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
3
3
|
import { ChevronUpIcon as z } from "../../icons/chevron-up-icon/ChevronUpIcon.js";
|
|
4
4
|
import o from "./Pathfinder.module.js";
|
|
5
|
-
import { useCallback as C, useEffect as
|
|
5
|
+
import { useCallback as C, useEffect as y, useLayoutEffect as O, useMemo as x, useRef as I, useState as M, useSyncExternalStore as P } from "react";
|
|
6
6
|
import { Fragment as D, jsx as e, jsxs as R } from "react/jsx-runtime";
|
|
7
|
-
var _ = typeof window < "u" ? O :
|
|
7
|
+
var _ = typeof window < "u" ? O : y;
|
|
8
8
|
function q() {
|
|
9
|
-
const [i, n] =
|
|
9
|
+
const [i, n] = M(null), a = C((t) => {
|
|
10
10
|
n(t);
|
|
11
11
|
}, []), s = C(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
|
|
12
12
|
return {
|
|
@@ -31,12 +31,12 @@ function A(i) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
function K(i) {
|
|
34
|
-
const { items: n, leadSlot: a, actionSlot: s } = i, t = I({}), d = I(null), l = I(null), [m, v] =
|
|
34
|
+
const { items: n, leadSlot: a, actionSlot: s } = i, t = I({}), d = I(null), l = I(null), [m, v] = M({
|
|
35
35
|
itemWidths: {},
|
|
36
36
|
leadWidth: 0,
|
|
37
37
|
actionWidth: 0
|
|
38
38
|
}), p = I(m);
|
|
39
|
-
|
|
39
|
+
y(() => {
|
|
40
40
|
p.current = m;
|
|
41
41
|
}, [m]);
|
|
42
42
|
const h = C((r) => (u) => {
|
|
@@ -45,11 +45,11 @@ function K(i) {
|
|
|
45
45
|
return _(() => {
|
|
46
46
|
const r = {};
|
|
47
47
|
for (const f of n) {
|
|
48
|
-
const k = t.current[f.id],
|
|
49
|
-
r[f.id] =
|
|
48
|
+
const k = t.current[f.id], W = Math.ceil(k?.getBoundingClientRect().width ?? f.estimatedWidth ?? 0);
|
|
49
|
+
r[f.id] = W;
|
|
50
50
|
}
|
|
51
|
-
const u = a ? Math.ceil(d.current?.getBoundingClientRect().width ?? 0) : 0, N = s ? Math.ceil(l.current?.getBoundingClientRect().width ?? 0) : 0,
|
|
52
|
-
(!(Object.keys(
|
|
51
|
+
const u = a ? Math.ceil(d.current?.getBoundingClientRect().width ?? 0) : 0, N = s ? Math.ceil(l.current?.getBoundingClientRect().width ?? 0) : 0, w = p.current;
|
|
52
|
+
(!(Object.keys(w.itemWidths).length === Object.keys(r).length && n.every((f) => w.itemWidths[f.id] === r[f.id])) || w.leadWidth !== u || w.actionWidth !== N) && v({
|
|
53
53
|
itemWidths: r,
|
|
54
54
|
leadWidth: u,
|
|
55
55
|
actionWidth: N
|
|
@@ -79,11 +79,11 @@ function b({ item: i, compact: n }) {
|
|
|
79
79
|
return /* @__PURE__ */ e(D, { children: i.render({ compact: n }) });
|
|
80
80
|
}
|
|
81
81
|
function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot: t, className: d, leadReservePx: l = 140, actionReservePx: m = 44 }) {
|
|
82
|
-
const { ref: v, width: p } = q(), h = !n, r =
|
|
82
|
+
const { ref: v, width: p } = q(), h = !n, r = x(() => A(i), [i]), { measurements: u, registerItemRef: N, leadRef: w, actionRef: f } = K({
|
|
83
83
|
items: r,
|
|
84
84
|
leadSlot: s,
|
|
85
85
|
actionSlot: t
|
|
86
|
-
}), k =
|
|
86
|
+
}), k = x(() => {
|
|
87
87
|
if (n) return r;
|
|
88
88
|
const c = 24, L = 48, B = s ? Math.max(l, u.leadWidth + 12) : 0, F = t ? Math.max(m, u.actionWidth) : 0;
|
|
89
89
|
return U({
|
|
@@ -101,7 +101,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
|
|
|
101
101
|
l,
|
|
102
102
|
m,
|
|
103
103
|
u
|
|
104
|
-
]),
|
|
104
|
+
]), W = h && k.length < Math.min(2, r.length), E = W ? r.slice(0, 2) : k;
|
|
105
105
|
return /* @__PURE__ */ R("div", {
|
|
106
106
|
ref: v,
|
|
107
107
|
className: g(o.root, "asma-pressable", h ? "overflow-hidden" : "overflow-visible", d),
|
|
@@ -121,9 +121,9 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
|
|
|
121
121
|
}) : null, /* @__PURE__ */ e("div", {
|
|
122
122
|
className: g(o.content, h && o.contentCompact),
|
|
123
123
|
children: h ? /* @__PURE__ */ e("div", {
|
|
124
|
-
className: g(o.compactItems,
|
|
124
|
+
className: g(o.compactItems, W && o.compactItemsStacked),
|
|
125
125
|
children: E.map((c) => /* @__PURE__ */ e("div", {
|
|
126
|
-
className: g("min-w-0 whitespace-nowrap",
|
|
126
|
+
className: g("min-w-0 whitespace-nowrap", W ? "w-full" : "shrink"),
|
|
127
127
|
children: /* @__PURE__ */ e(b, {
|
|
128
128
|
item: c,
|
|
129
129
|
compact: h
|
|
@@ -132,7 +132,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
|
|
|
132
132
|
}) : /* @__PURE__ */ R("div", {
|
|
133
133
|
className: o.expandedItems,
|
|
134
134
|
children: [r.map((c) => /* @__PURE__ */ e("div", {
|
|
135
|
-
className: "shrink-0 whitespace-nowrap",
|
|
135
|
+
className: "min-w-0 max-w-full shrink-0 whitespace-nowrap",
|
|
136
136
|
children: /* @__PURE__ */ e(b, {
|
|
137
137
|
item: c,
|
|
138
138
|
compact: h
|
|
@@ -161,7 +161,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
|
|
|
161
161
|
s ? /* @__PURE__ */ e("div", {
|
|
162
162
|
className: "shrink-0",
|
|
163
163
|
children: /* @__PURE__ */ e("div", {
|
|
164
|
-
ref:
|
|
164
|
+
ref: w,
|
|
165
165
|
children: s
|
|
166
166
|
})
|
|
167
167
|
}) : null,
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { ChevronRightIcon as C } from "./components/icons/chevron-right-icon/Che
|
|
|
11
11
|
import { ChevronLeftIcon as g } from "./components/icons/chevron-left-icon/ChevronLeftIcon.js";
|
|
12
12
|
import { ChevronDoubleLeftIcon as D } from "./components/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.js";
|
|
13
13
|
import { ChevronDoubleRightIcon as k } from "./components/icons/chevron-double-right-icon/ChevronDoubleRightIcon.js";
|
|
14
|
-
import { QnrIcon as
|
|
14
|
+
import { QnrIcon as L } from "./components/icons/qnr-icon/QnrIcon.js";
|
|
15
15
|
import { PdfIcon as T } from "./components/icons/pdf-icon/PdfIcon.js";
|
|
16
16
|
import { DashboardViewIcon as R } from "./components/icons/dashboard-view-icon/DashboardViewIcon.js";
|
|
17
17
|
import { DashboardViewOutlineIcon as B } from "./components/icons/dashboard-view-outline-icon/DashboardViewOutlineIcon.js";
|
|
@@ -37,7 +37,7 @@ import { FindReplaceIcon as yo } from "./components/icons/find-replace-icon/Find
|
|
|
37
37
|
import { FindReplacePeopleIcon as Oo } from "./components/icons/find-replace-people-icon/FindReplacePeopleIcon.js";
|
|
38
38
|
import { PersonIcon as ho } from "./components/icons/person-icon/PersonIcon.js";
|
|
39
39
|
import { PersonOutlineIcon as bo } from "./components/icons/person-outline-icon/PersonOutlineIcon.js";
|
|
40
|
-
import { DotsVerticalIcon as
|
|
40
|
+
import { DotsVerticalIcon as Po } from "./components/icons/dots-vertical-icon/DotsVerticalIcon.js";
|
|
41
41
|
import { SearchIcon as Fo } from "./components/icons/search-icon/SearchIcon.js";
|
|
42
42
|
import { LoadingIcon as Ao } from "./components/icons/loading-icon/LoadingIcon.js";
|
|
43
43
|
import { DropUpIcon as Mo } from "./components/icons/drop-up-icon/DropUpIcon.js";
|
|
@@ -64,7 +64,7 @@ import { LockIcon as yr } from "./components/icons/lock-icon/LockIcon.js";
|
|
|
64
64
|
import { DvrIcon as Or } from "./components/icons/dvr-icon/DvrIcon.js";
|
|
65
65
|
import { ErrorOutlineIcon as hr } from "./components/icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
66
66
|
import { ReplayIcon as br } from "./components/icons/replay-icon/ReplayIcon.js";
|
|
67
|
-
import { CalendarBlankOutlineIcon as
|
|
67
|
+
import { CalendarBlankOutlineIcon as Pr } from "./components/icons/calendar-blank-outline-icon/CalendarBlankOutlineIcon.js";
|
|
68
68
|
import { LinkOutlineIcon as Fr } from "./components/icons/link-outline-icon/LinkOutlineIcon.js";
|
|
69
69
|
import { FastCheckOutlineIcon as Ar } from "./components/icons/fast-check-outline-icon/FastCheckOutlineIcon.js";
|
|
70
70
|
import { UnknownDocumentOutlineRoundedIcon as Mr } from "./components/icons/unknown-document-outline-rounded-icon/UnknownDocumentOutlineRoundedIcon.js";
|
|
@@ -91,7 +91,7 @@ import { PinIcon as ym } from "./components/icons/pin-icon/PinIcon.js";
|
|
|
91
91
|
import { WorkIcon as Om } from "./components/icons/work-icon/WorkIcon.js";
|
|
92
92
|
import { LocationIcon as hm } from "./components/icons/location-icon/LocationIcon.js";
|
|
93
93
|
import { FormIcon as bm } from "./components/icons/form-icon/FormIcon.js";
|
|
94
|
-
import { RepeatOutlineIcon as
|
|
94
|
+
import { RepeatOutlineIcon as Pm } from "./components/icons/repeat-outline-icon/RepeatOutlineIcon.js";
|
|
95
95
|
import { ClockOutlineIcon as Fm } from "./components/icons/clock-outline-icon/ClockOutlineIcon.js";
|
|
96
96
|
import { TodayIcon as Am } from "./components/icons/today-icon/TodayIcon.js";
|
|
97
97
|
import { MicrosoftOutlookIcon as Mm } from "./components/icons/microsoft-outlook-icon/MicrosoftOutlookIcon.js";
|
|
@@ -118,7 +118,7 @@ import { ContentCopyIcon as yt } from "./components/icons/content-copy-icon/Cont
|
|
|
118
118
|
import { ContentCutIcon as Ot } from "./components/icons/content-cut-icon/ContentCutIcon.js";
|
|
119
119
|
import { ContentPasteIcon as ht } from "./components/icons/content-paste-icon/ContentPasteIcon.js";
|
|
120
120
|
import { ContentCopyOutlineIcon as bt } from "./components/icons/content-copy-outline-icon/ContentCopyOutlineIcon.js";
|
|
121
|
-
import { RefreshIcon as
|
|
121
|
+
import { RefreshIcon as Pt } from "./components/icons/refresh-icon/RefreshIcon.js";
|
|
122
122
|
import { SettingsNoteIcon as Ft } from "./components/icons/settings-note-icon/SettingsNoteIcon.js";
|
|
123
123
|
import { InheritancePointerIcon as At } from "./components/icons/inheritance-pointer-icon/InheritancePointerIcon.js";
|
|
124
124
|
import { CloudDoneOutlineIcon as Mt } from "./components/icons/cloud-done-outline-icon/CloudDoneOutlineIcon.js";
|
|
@@ -145,7 +145,7 @@ import { RemoveIcon as yi } from "./components/icons/remove-icon/RemoveIcon.js";
|
|
|
145
145
|
import { EnvelopeIcon as Oi } from "./components/icons/envelope-icon/EnvelopeIcon.js";
|
|
146
146
|
import { FingerprintIcon as hi } from "./components/icons/fingerprint-icon/FingerprintIcon.js";
|
|
147
147
|
import { UploadIcon as bi } from "./components/icons/upload-icon/UploadIcon.js";
|
|
148
|
-
import { CancelOutlineIcon as
|
|
148
|
+
import { CancelOutlineIcon as Pi } from "./components/icons/cancel-outline-icon/CancelOutlineIcon.js";
|
|
149
149
|
import { InfoOutlineIcon as Fi } from "./components/icons/info-outline-icon/InfoOutlineIcon.js";
|
|
150
150
|
import { TuneIcon as Ai } from "./components/icons/tune-icon/TuneIcon.js";
|
|
151
151
|
import { FileDocIcon as Mi } from "./components/icons/file-doc-icon/FileDocIcon.js";
|
|
@@ -172,7 +172,7 @@ import { HistoryToggleOffIcon as ye } from "./components/icons/history-toggle-of
|
|
|
172
172
|
import { CheckReadIcon as Oe } from "./components/icons/check-read-icon/CheckReadIcon.js";
|
|
173
173
|
import { EditNotesIcon as he } from "./components/icons/edit-notes-icon/EditNotesIcon.js";
|
|
174
174
|
import { FileXlsIcon as be } from "./components/icons/file-xls-icon/FileXlsIcon.js";
|
|
175
|
-
import { FileImageIcon as
|
|
175
|
+
import { FileImageIcon as Pe } from "./components/icons/file-image-icon/FileImageIcon.js";
|
|
176
176
|
import { DrawIcon as Fe } from "./components/icons/draw-icon/DrawIcon.js";
|
|
177
177
|
import { ProhibitionIcon as Ae } from "./components/icons/prohibition-icon/ProhibitionIcon.js";
|
|
178
178
|
import { ProhibitionLargeIcon as Me } from "./components/icons/prohibition-large-icon/ProhibitionLargeIcon.js";
|
|
@@ -199,7 +199,7 @@ import { StyledInteractiveChip as Cn } from "./components/data-display/interacti
|
|
|
199
199
|
import { VirtualizedList as gn } from "./components/data-display/virtualized-list/VirtualizedList.js";
|
|
200
200
|
import { StyledTypography as Dn } from "./components/data-display/typography/StyledTypography.js";
|
|
201
201
|
import { StyledFormLabel as kn } from "./components/data-display/form-label/components/StyledFormLabel.js";
|
|
202
|
-
import { StyledAIDisclosure as
|
|
202
|
+
import { StyledAIDisclosure as Ln } from "./components/data-display/ai-disclosure/StyledAIDisclosure.js";
|
|
203
203
|
import { DialogBusyContext as Tn, useDialogBusyBoundary as An, useReportDialogBusy as Rn } from "./components/feedback/dialog/DialogBusyContext.js";
|
|
204
204
|
import { StyledButton as Bn } from "./components/inputs/button/StyledButton.js";
|
|
205
205
|
import { OverlayBackOwnerContext as wn, useBackCloses as xn } from "./hooks/useBackCloses.hook.js";
|
|
@@ -221,7 +221,7 @@ import { StyledFilteredEmptyState as Sp } from "./components/feedback/filtered-e
|
|
|
221
221
|
import { StyledLoading as Cp } from "./components/feedback/loading/StyledLoading.js";
|
|
222
222
|
import { StyledAlert as gp } from "./components/feedback/snack-bar/StyledAlert.js";
|
|
223
223
|
import { closeSnackbar as Dp, enqueueSnackbar as bp } from "./components/feedback/snack-bar/snackbarHost.js";
|
|
224
|
-
import { SnackbarProvider as
|
|
224
|
+
import { SnackbarProvider as Pp } from "./components/feedback/snack-bar/SnackbarProvider.js";
|
|
225
225
|
import { StyledSnackbar as Fp } from "./components/feedback/snack-bar/StyledSnackbar.js";
|
|
226
226
|
import { processAlertSnackBar as Ap } from "./components/feedback/snack-bar/processAlertSnackBar.js";
|
|
227
227
|
import { processDefaultSnackbar as Mp } from "./components/feedback/snack-bar/processDefaultSnackbar.js";
|
|
@@ -247,7 +247,7 @@ import { StyledPhoneField as Cf } from "./components/inputs/phone-field/StyledPh
|
|
|
247
247
|
import { StyledCountryFlag as gf } from "./components/inputs/phone-field/StyledCountryFlag.js";
|
|
248
248
|
import { StyledFieldPair as Df } from "./components/inputs/form-layout/StyledFieldPair.js";
|
|
249
249
|
import { StyledFormColumn as kf } from "./components/inputs/form-layout/StyledFormColumn.js";
|
|
250
|
-
import { StyledFormControl as
|
|
250
|
+
import { StyledFormControl as Lf } from "./components/miscellaneous/StyledFormControl.js";
|
|
251
251
|
import { defaultDatePickerValidationMessages as Tf, useDatePickerValidation as Af } from "./datetime/components/date-picker/hooks/useDatePickerValidation.js";
|
|
252
252
|
import { StyledDrawer as Mf } from "./components/navigation/drawer/StyledDrawer.js";
|
|
253
253
|
import { StyledDatePicker as vf } from "./datetime/components/date-picker/StyledDatePicker.js";
|
|
@@ -271,31 +271,32 @@ import { StyledFormGroup as Cc } from "./components/miscellaneous/StyledFormGrou
|
|
|
271
271
|
import { StyledTab as gc } from "./components/navigation/tabs/StyledTab.js";
|
|
272
272
|
import { StyledTabs as Dc } from "./components/navigation/tabs/StyledTabs.js";
|
|
273
273
|
import { StyledTitleChevron as kc } from "./components/navigation/title-chevron/StyledTitleChevron.js";
|
|
274
|
-
import { Listbox as
|
|
274
|
+
import { Listbox as Lc } from "./components/navigation/listbox/Listbox.js";
|
|
275
275
|
import { StyledAccordion as Tc } from "./components/utils/accordion/base-ui/StyledAccordion.js";
|
|
276
276
|
import { StyledAccordionSummary as Rc } from "./components/utils/accordion/base-ui/StyledAccordionSummary.js";
|
|
277
277
|
import { StyledAccordionDetails as Bc } from "./components/utils/accordion/base-ui/StyledAccordionDetails.js";
|
|
278
278
|
import { ACTIONS_COLUMN_ID as wc, DND_HANDLE_COLUMN_ID as xc, EXPAND_COLUMN_ID as Nc, INTERNAL_COLUMN_IDS as Hc, SELECT_COLUMN_ID as _c, SHOW_FULL_TEXT_ID as Ec, isCustomAction as Wc } from "./table/types.js";
|
|
279
|
-
import {
|
|
280
|
-
import {
|
|
281
|
-
import {
|
|
282
|
-
import {
|
|
283
|
-
import {
|
|
284
|
-
import {
|
|
285
|
-
import {
|
|
286
|
-
import {
|
|
287
|
-
import {
|
|
288
|
-
import {
|
|
289
|
-
import {
|
|
290
|
-
import {
|
|
291
|
-
import {
|
|
292
|
-
import {
|
|
293
|
-
import {
|
|
294
|
-
import {
|
|
295
|
-
import {
|
|
296
|
-
import {
|
|
297
|
-
import {
|
|
298
|
-
import {
|
|
279
|
+
import { readPersistedSorting as Vc, usePersistedSorting as zc } from "./table/hooks/usePersistedSorting.js";
|
|
280
|
+
import { RowDragHandleCell as Xc } from "./table/components/columns/dndHandleColumn.js";
|
|
281
|
+
import { StyledTable as Kc } from "./table/components/StyledTableIndex.js";
|
|
282
|
+
import { createColumnHelper as Zc } from "./table/index.js";
|
|
283
|
+
import { DynamicToolbarLayoutContext as Jc, useDynamicToolbarLayout as Yc } from "./components/custom/module/header-layout/DynamicToolbarLayoutContext.js";
|
|
284
|
+
import { StyledFilterButton as ol } from "./components/utils/filter-menu/StyledFilterButton.js";
|
|
285
|
+
import { StyledFilterMenu as ml } from "./components/utils/filter-menu/StyledFilterMenu.js";
|
|
286
|
+
import { CopyButton as il } from "./components/utils/copy-wrapper/CopyButton.js";
|
|
287
|
+
import { CopyWrapper as nl } from "./components/utils/copy-wrapper/CopyWrapper.js";
|
|
288
|
+
import { VirtualList as fl } from "./components/utils/virtual-list/VirtualList.js";
|
|
289
|
+
import { StyledWidgetTitle as ll } from "./components/custom/widget/widget-title/StyledWidgetTitle.js";
|
|
290
|
+
import { StyledWidgetHeader as Il } from "./components/custom/widget/widget-header/StyledWidgetHeader.js";
|
|
291
|
+
import { StyledWidget as ul } from "./components/custom/widget/widget/StyledWidget.js";
|
|
292
|
+
import { StyledModuleTitle as Sl } from "./components/custom/module/module-title/StyledModuleTitle.js";
|
|
293
|
+
import { DynamicToolbar as Cl } from "./components/custom/module/header-layout/DynamicToolbar.js";
|
|
294
|
+
import { PageHeader as gl } from "./components/custom/page/page-header/PageHeader.js";
|
|
295
|
+
import { MinimizableDialog as Dl } from "./components/feedback/minimizable-dialog/MinimizableDialog.js";
|
|
296
|
+
import { MinimizableDialogV2 as kl } from "./components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js";
|
|
297
|
+
import { createDialogStack as Ll } from "./components/feedback/minimizable-dialog/stack/createDialogStack.js";
|
|
298
|
+
import { PathfinderCard as Tl } from "./components/custom/pathfinder-card/PathfinderCard.js";
|
|
299
|
+
import { useRouteHeadingFocus as Rl } from "./hooks/useRouteHeadingFocus.js";
|
|
299
300
|
export {
|
|
300
301
|
wc as ACTIONS_COLUMN_ID,
|
|
301
302
|
ep as ACTION_GAP_PX,
|
|
@@ -314,12 +315,12 @@ export {
|
|
|
314
315
|
em as BadgeIcon,
|
|
315
316
|
u as BellIcon,
|
|
316
317
|
I as BellOutlineIcon,
|
|
317
|
-
|
|
318
|
+
Pr as CalendarBlankOutlineIcon,
|
|
318
319
|
G as CalendarIcon,
|
|
319
320
|
Q as CalendarRangeIcon,
|
|
320
321
|
j as CalendarRangeOutlineIcon,
|
|
321
322
|
fn as CallIcon,
|
|
322
|
-
|
|
323
|
+
Pi as CancelOutlineIcon,
|
|
323
324
|
Et as CardIdIcon,
|
|
324
325
|
zt as CardIdIconOutlined,
|
|
325
326
|
Eo as CheckBoxCheckedIcon,
|
|
@@ -349,8 +350,8 @@ export {
|
|
|
349
350
|
Ot as ContentCutIcon,
|
|
350
351
|
ht as ContentPasteIcon,
|
|
351
352
|
ti as ConversionPathIcon,
|
|
352
|
-
|
|
353
|
-
|
|
353
|
+
il as CopyButton,
|
|
354
|
+
nl as CopyWrapper,
|
|
354
355
|
xc as DND_HANDLE_COLUMN_ID,
|
|
355
356
|
R as DashboardViewIcon,
|
|
356
357
|
B as DashboardViewOutlineIcon,
|
|
@@ -361,7 +362,7 @@ export {
|
|
|
361
362
|
Jm as DnsIcon,
|
|
362
363
|
$m as DnsOutlineIcon,
|
|
363
364
|
Km as DoneAllIcon,
|
|
364
|
-
|
|
365
|
+
Po as DotsVerticalIcon,
|
|
365
366
|
Ho as DownloadIcon,
|
|
366
367
|
Hi as DownloadTrayIcon,
|
|
367
368
|
Ei as DownloadingIcon,
|
|
@@ -371,8 +372,8 @@ export {
|
|
|
371
372
|
Mo as DropUpIcon,
|
|
372
373
|
Or as DvrIcon,
|
|
373
374
|
vi as DvrIconOutline,
|
|
374
|
-
|
|
375
|
-
|
|
375
|
+
Cl as DynamicToolbar,
|
|
376
|
+
Jc as DynamicToolbarLayoutContext,
|
|
376
377
|
Nc as EXPAND_COLUMN_ID,
|
|
377
378
|
Ur as EarthIcon,
|
|
378
379
|
he as EditNotesIcon,
|
|
@@ -383,7 +384,7 @@ export {
|
|
|
383
384
|
rc as Fade,
|
|
384
385
|
Ar as FastCheckOutlineIcon,
|
|
385
386
|
Mi as FileDocIcon,
|
|
386
|
-
|
|
387
|
+
Pe as FileImageIcon,
|
|
387
388
|
cr as FilePdfIcon,
|
|
388
389
|
Ui as FileRtfIcon,
|
|
389
390
|
be as FileXlsIcon,
|
|
@@ -422,7 +423,7 @@ export {
|
|
|
422
423
|
Er as ListSettingsLineIcon,
|
|
423
424
|
vr as ListStatusIcon,
|
|
424
425
|
xr as ListViewOutlineIcon,
|
|
425
|
-
|
|
426
|
+
Lc as Listbox,
|
|
426
427
|
rn as LoadCurrentIcon,
|
|
427
428
|
Ao as LoadingIcon,
|
|
428
429
|
hm as LocationIcon,
|
|
@@ -435,8 +436,8 @@ export {
|
|
|
435
436
|
no as MessageProcessingOutlineIcon,
|
|
436
437
|
tm as MessageReplyIcon,
|
|
437
438
|
Mm as MicrosoftOutlookIcon,
|
|
438
|
-
|
|
439
|
-
|
|
439
|
+
Dl as MinimizableDialog,
|
|
440
|
+
kl as MinimizableDialogV2,
|
|
440
441
|
$r as MinimizeIcon,
|
|
441
442
|
nn as MoveUpIcon,
|
|
442
443
|
q as NewCalendarIcon,
|
|
@@ -448,9 +449,9 @@ export {
|
|
|
448
449
|
$t as OutlineCheckboxIconIndeterminate,
|
|
449
450
|
Xt as OutlineNotificationsIcon,
|
|
450
451
|
wn as OverlayBackOwnerContext,
|
|
451
|
-
|
|
452
|
+
gl as PageHeader,
|
|
452
453
|
zf as Paper,
|
|
453
|
-
|
|
454
|
+
Tl as PathfinderCard,
|
|
454
455
|
T as PdfIcon,
|
|
455
456
|
Xr as PencilOutlineIcon,
|
|
456
457
|
N as PeopleIcon,
|
|
@@ -470,17 +471,17 @@ export {
|
|
|
470
471
|
He as PrintIcon,
|
|
471
472
|
Ae as ProhibitionIcon,
|
|
472
473
|
Me as ProhibitionLargeIcon,
|
|
473
|
-
|
|
474
|
-
|
|
474
|
+
L as QnrIcon,
|
|
475
|
+
Pt as RefreshIcon,
|
|
475
476
|
yi as RemoveIcon,
|
|
476
|
-
|
|
477
|
+
Pm as RepeatOutlineIcon,
|
|
477
478
|
br as ReplayIcon,
|
|
478
479
|
fo as ReportBoxIcon,
|
|
479
480
|
lo as ReportBoxOutlineIcon,
|
|
480
481
|
se as ResetSettingsIcon,
|
|
481
482
|
$e as RocketLaunchIcon,
|
|
482
483
|
tn as RotateAutoIcon,
|
|
483
|
-
|
|
484
|
+
Xc as RowDragHandleCell,
|
|
484
485
|
dt as RuleIcon,
|
|
485
486
|
st as RuleOutlineIcon,
|
|
486
487
|
_c as SELECT_COLUMN_ID,
|
|
@@ -496,9 +497,9 @@ export {
|
|
|
496
497
|
Ji as ShareIcon,
|
|
497
498
|
Jf as Skeleton,
|
|
498
499
|
pe as SmsIcon,
|
|
499
|
-
|
|
500
|
+
Pp as SnackbarProvider,
|
|
500
501
|
Xf as Stack,
|
|
501
|
-
|
|
502
|
+
Ln as StyledAIDisclosure,
|
|
502
503
|
Tc as StyledAccordion,
|
|
503
504
|
Bc as StyledAccordionDetails,
|
|
504
505
|
Rc as StyledAccordionSummary,
|
|
@@ -519,11 +520,11 @@ export {
|
|
|
519
520
|
uf as StyledDynamicSelect,
|
|
520
521
|
up as StyledEmptyPage,
|
|
521
522
|
Df as StyledFieldPair,
|
|
522
|
-
|
|
523
|
-
|
|
523
|
+
ol as StyledFilterButton,
|
|
524
|
+
ml as StyledFilterMenu,
|
|
524
525
|
Sp as StyledFilteredEmptyState,
|
|
525
526
|
kf as StyledFormColumn,
|
|
526
|
-
|
|
527
|
+
Lf as StyledFormControl,
|
|
527
528
|
Ic as StyledFormControlLabel,
|
|
528
529
|
Cc as StyledFormGroup,
|
|
529
530
|
uc as StyledFormHelperText,
|
|
@@ -537,7 +538,7 @@ export {
|
|
|
537
538
|
rp as StyledMenu,
|
|
538
539
|
tp as StyledMenuItem,
|
|
539
540
|
$n as StyledMenuList,
|
|
540
|
-
|
|
541
|
+
Sl as StyledModuleTitle,
|
|
541
542
|
Cf as StyledPhoneField,
|
|
542
543
|
Xn as StyledPopover,
|
|
543
544
|
Sn as StyledRadio,
|
|
@@ -550,16 +551,16 @@ export {
|
|
|
550
551
|
Fp as StyledSnackbar,
|
|
551
552
|
ff as StyledSwitch,
|
|
552
553
|
gc as StyledTab,
|
|
553
|
-
|
|
554
|
+
Kc as StyledTable,
|
|
554
555
|
Dc as StyledTabs,
|
|
555
556
|
Kp as StyledTextarea,
|
|
556
557
|
pc as StyledTimePicker,
|
|
557
558
|
kc as StyledTitleChevron,
|
|
558
559
|
l as StyledTooltip,
|
|
559
560
|
Dn as StyledTypography,
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
ul as StyledWidget,
|
|
562
|
+
Il as StyledWidgetHeader,
|
|
563
|
+
ll as StyledWidgetTitle,
|
|
563
564
|
ve as StylusNoteIcon,
|
|
564
565
|
xe as StylusNoteLargeIcon,
|
|
565
566
|
Kt as SyncIcon,
|
|
@@ -573,7 +574,7 @@ export {
|
|
|
573
574
|
Mr as UnknownDocumentOutlineRoundedIcon,
|
|
574
575
|
Zm as UnlockIcon,
|
|
575
576
|
bi as UploadIcon,
|
|
576
|
-
|
|
577
|
+
fl as VirtualList,
|
|
577
578
|
gn as VirtualizedList,
|
|
578
579
|
ee as VisibilityOffOutlineIcon,
|
|
579
580
|
te as VisibilityOutlineIcon,
|
|
@@ -587,8 +588,8 @@ export {
|
|
|
587
588
|
_f as bindTrigger,
|
|
588
589
|
Dp as closeSnackbar,
|
|
589
590
|
m as cn,
|
|
590
|
-
|
|
591
|
-
|
|
591
|
+
Zc as createColumnHelper,
|
|
592
|
+
Ll as createDialogStack,
|
|
592
593
|
Tf as defaultDatePickerValidationMessages,
|
|
593
594
|
ec as defaultTimePickerHelperMessages,
|
|
594
595
|
bp as enqueueSnackbar,
|
|
@@ -606,6 +607,7 @@ export {
|
|
|
606
607
|
Ap as processAlertSnackBar,
|
|
607
608
|
Mp as processDefaultSnackbar,
|
|
608
609
|
vp as processInfoSnackbar,
|
|
610
|
+
Vc as readPersistedSorting,
|
|
609
611
|
lp as resolveToolbarActionWidth,
|
|
610
612
|
cc as setMidnightTime,
|
|
611
613
|
lc as setZeroTime,
|
|
@@ -613,9 +615,10 @@ export {
|
|
|
613
615
|
xn as useBackCloses,
|
|
614
616
|
Af as useDatePickerValidation,
|
|
615
617
|
An as useDialogBusyBoundary,
|
|
616
|
-
|
|
618
|
+
Yc as useDynamicToolbarLayout,
|
|
619
|
+
zc as usePersistedSorting,
|
|
617
620
|
Ef as usePopupState,
|
|
618
621
|
Rn as useReportDialogBusy,
|
|
619
|
-
|
|
622
|
+
Rl as useRouteHeadingFocus,
|
|
620
623
|
Hp as useSnackbar
|
|
621
624
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sort indicator slot of a sortable header (Figma "Header with sorting", the 20 × 28 `Sorting` frame).
|
|
3
|
+
* It is decorative: `aria-sort` on the header cell carries the state. A sorted column always shows the
|
|
4
|
+
* glyph in the primary colour; an unsorted one shows it, grey and pointing the way the next click will
|
|
5
|
+
* sort, only while the header is hovered or keyboard-focused. The glyph is in the DOM either way, so the
|
|
6
|
+
* slot never changes the layout.
|
|
7
|
+
*/
|
|
8
|
+
export declare function SortIndicator({ sorted, nextDirection, }: {
|
|
9
|
+
sorted: false | 'asc' | 'desc';
|
|
10
|
+
/** Where a click sorts next: `column.getFirstSortDir()` for an unsorted column. */
|
|
11
|
+
nextDirection: 'asc' | 'desc';
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
/**
|
|
3
|
+
* The leaf column ids of the table's current column definitions, in definition order (group columns
|
|
4
|
+
* flattened). Read live on every call: the column definitions may change while the table stays mounted, so
|
|
5
|
+
* a default captured once would go stale (ASMA-8597, trap A).
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDefinitionColumnOrder: <TData>(table: Table<TData>) => string[];
|
|
8
|
+
/** The leaf column ids as the table shows them now, with the saved column order applied. */
|
|
9
|
+
export declare const getEffectiveColumnOrder: <TData>(table: Table<TData>) => string[];
|
|
10
|
+
/** `true` when no column has been moved away from its definition position. */
|
|
11
|
+
export declare const isDefaultColumnOrder: <TData>(table: Table<TData>) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* `true` when the user has moved a column the popover lists. It compares the popover's columns in their
|
|
14
|
+
* effective order with the same columns in definition order, so a stored order that matches the current
|
|
15
|
+
* definitions shows nothing, and a column that disappeared from `columns` does not count as a move.
|
|
16
|
+
*/
|
|
17
|
+
export declare const hasReorderedColumns: <TData>(table: Table<TData>) => boolean;
|
|
18
|
+
/** `true` when a column the user may hide is hidden. Internal columns and columns fixed visible don't count. */
|
|
19
|
+
export declare const hasHiddenColumns: <TData>(table: Table<TData>) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the user's column layout differs from the table's defaults: a hidden column or a moved one. This
|
|
22
|
+
* is what the dot on the column settings pin shows (ASMA-8597, Q9, Q10). Widths and sorting never count.
|
|
23
|
+
*/
|
|
24
|
+
export declare const hasChangedColumnLayout: <TData>(table: Table<TData>) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,3 +6,11 @@ export interface OrderedColumnsOptions {
|
|
|
6
6
|
onColumnOrderChange?: OnChangeFn<ColumnOrderState>;
|
|
7
7
|
persistColumnOrderKey?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface ColumnSettingsInstance {
|
|
10
|
+
/**
|
|
11
|
+
* Reset columns (ASMA-8597): puts the column order and the widths back to the table's defaults, and the
|
|
12
|
+
* sorting too when the table has `persistSorting`. It never unhides columns, and it removes the saved
|
|
13
|
+
* entries of what it resets. Set by `StyledTable`, which knows the defaults.
|
|
14
|
+
*/
|
|
15
|
+
resetColumnSettings: () => void;
|
|
16
|
+
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
+
/**
|
|
3
|
+
* Saves the column order under `key` when it changes. An order that is `[]` or that matches the live
|
|
4
|
+
* definition order removes the entry instead (ASMA-8597, REQ-004), so a table the user has put back to its
|
|
5
|
+
* defaults stores nothing. Mounting never writes.
|
|
6
|
+
*/
|
|
2
7
|
export declare function usePersistColumnOrder<TData = unknown>(table: Table<TData>, key?: string | null): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the persistence code needs to know about one leaf column, resolved the way TanStack resolves it
|
|
3
|
+
* (`core/column.js`, `features/RowSorting.js`, v8.21.3), because a saved value has to be checked against the
|
|
4
|
+
* columns before the table exists. U-I01 pins this file against a real table.
|
|
5
|
+
*/
|
|
6
|
+
export interface LeafColumnInfo {
|
|
7
|
+
id: string;
|
|
8
|
+
canSort: boolean;
|
|
9
|
+
canMultiSort: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** The parts of a TanStack column definition that decide a column's id and whether it can sort. */
|
|
12
|
+
export interface ColumnDefLike {
|
|
13
|
+
id?: string;
|
|
14
|
+
accessorKey?: unknown;
|
|
15
|
+
accessorFn?: unknown;
|
|
16
|
+
header?: unknown;
|
|
17
|
+
enableSorting?: boolean;
|
|
18
|
+
enableMultiSort?: boolean;
|
|
19
|
+
columns?: readonly ColumnDefLike[];
|
|
20
|
+
}
|
|
21
|
+
export interface ColumnResolutionOptions {
|
|
22
|
+
defaultColumn?: ColumnDefLike;
|
|
23
|
+
enableSorting?: boolean;
|
|
24
|
+
enableMultiSort?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Leaf columns in definition order (group columns flattened), with the ids TanStack gives them. */
|
|
27
|
+
export declare const getLeafColumnInfos: (columns: readonly ColumnDefLike[], options?: ColumnResolutionOptions) => LeafColumnInfo[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one door to `localStorage` for everything a table saves (ASMA-8597, REQ-007). Blocked, full or
|
|
3
|
+
* private-mode storage, and a `localStorage` getter that itself throws (`SecurityError`), must leave the
|
|
4
|
+
* table working in memory: no throw, no console output, no error UI.
|
|
5
|
+
*/
|
|
6
|
+
export declare const tableStorage: {
|
|
7
|
+
get(key: string): string | null;
|
|
8
|
+
set(key: string, value: string): void;
|
|
9
|
+
remove(key: string): void;
|
|
10
|
+
};
|
|
11
|
+
/** Parses a saved value; anything that is not valid JSON counts as nothing saved. */
|
|
12
|
+
export declare const readJson: (key: string) => unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
import { ColumnSizingState
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
import { ColumnSizingState } from '@tanstack/react-table';
|
|
2
|
+
export declare const getColumnSizingStorageKey: (uniqueKey?: string) => string | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Checks a parsed `:column-sizing` value, which keeps its legacy unversioned shape `{ "<columnId>": <px> }` so
|
|
5
|
+
* entries saved before ASMA-8597 still load. Every width that is a finite number above 0 is kept, including the
|
|
6
|
+
* width of a column that is not there at the moment: TanStack applies a width only to a column that exists and
|
|
7
|
+
* picks it up when the column appears, which is what master does (ASMA-8597, DEC-W). An id that matches no column
|
|
8
|
+
* therefore has no effect and causes no error. Values that are not widths are dropped. `undefined` means there is
|
|
9
|
+
* no usable saved object.
|
|
10
|
+
*/
|
|
11
|
+
export declare const sanitizeColumnSizing: (raw: unknown) => ColumnSizingState | undefined;
|
|
12
|
+
/** The app's widths with the saved ones on top, or `undefined` when nothing is saved for this key. */
|
|
13
|
+
export declare const usePersistedColumnSizing: (uniqueKey: string | undefined, defaultSizing: ColumnSizingState) => ColumnSizingState | undefined;
|
|
14
|
+
/** Same entries in any key order count as the same widths. */
|
|
15
|
+
export declare const columnSizingSignature: (sizing: ColumnSizingState) => string;
|
|
16
|
+
export declare const serializeColumnSizing: (sizing: ColumnSizingState) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { OnChangeFn, SortingState } from '@tanstack/react-table';
|
|
2
|
+
export declare const getSortingStorageKey: (uniqueKey?: string) => string | undefined;
|
|
3
|
+
/** What a saved sort is checked against: the columns that can sort, and the multi-sort rules. */
|
|
4
|
+
export interface SortingRules {
|
|
5
|
+
sortableColumns: readonly {
|
|
6
|
+
id: string;
|
|
7
|
+
canMultiSort: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
/** `false` keeps only the first saved entry. */
|
|
10
|
+
enableMultiSort?: boolean;
|
|
11
|
+
maxMultiSortColCount?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Checks a parsed `:sorting` value (`{"v":1,"sorting":[{"id","desc"}]}`) and returns the valid rest, or
|
|
15
|
+
* `undefined` when it holds nothing usable and the app's default sorting should apply. A saved empty list
|
|
16
|
+
* is a real answer (sorting turned off) and returns `[]`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const sanitizeSorting: (raw: unknown, rules: SortingRules) => SortingState | undefined;
|
|
19
|
+
export declare const serializeSorting: (sorting: SortingState) => string;
|
|
20
|
+
export declare const sortingSignature: (sorting: SortingState) => string;
|
|
21
|
+
export declare const readSortingFromStorage: (uniqueKey: string | undefined, rules: SortingRules) => SortingState | undefined;
|
|
22
|
+
export interface PersistedSortingOptions {
|
|
23
|
+
/** Ids of the columns the table can sort by; saved entries for any other column are dropped. */
|
|
24
|
+
sortableColumnIds: readonly string[];
|
|
25
|
+
/** Multi-sort rules of the table; both default to TanStack's (allowed, no cap). */
|
|
26
|
+
enableMultiSort?: boolean;
|
|
27
|
+
maxMultiSortColCount?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reads the sorting `StyledTable` saved for `uniqueKey` (with `persistSorting`), checked against the columns
|
|
31
|
+
* the caller can sort by. Synchronous and pure, so a table that owns its sorting state (for example because
|
|
32
|
+
* the server sorts) can use the saved sort for its first request. Returns `undefined` when nothing valid is
|
|
33
|
+
* saved, and `[]` when the user turned sorting off.
|
|
34
|
+
*/
|
|
35
|
+
export declare const readPersistedSorting: (uniqueKey: string | undefined, options: PersistedSortingOptions) => SortingState | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Sorting state for a table that owns `state.sorting`: the saved sort on the first render (before the first
|
|
38
|
+
* request), `defaultSorting` when nothing valid is saved, and the new key's sort after `uniqueKey` changes.
|
|
39
|
+
* It never writes: `StyledTable` with `persistSorting` is the only writer, and it takes the same default
|
|
40
|
+
* from `initialState.sorting`, which Reset columns restores.
|
|
41
|
+
*
|
|
42
|
+
* ```tsx
|
|
43
|
+
* const { sorting, onSortingChange } = usePersistedSorting({ uniqueKey, defaultSorting, sortableColumnIds })
|
|
44
|
+
* <StyledTable uniqueKey={uniqueKey} persistSorting manualSorting state={{ sorting }}
|
|
45
|
+
* onSortingChange={onSortingChange} initialState={{ sorting: defaultSorting }} … />
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const usePersistedSorting: ({ uniqueKey, defaultSorting, ...options }: PersistedSortingOptions & {
|
|
49
|
+
uniqueKey?: string;
|
|
50
|
+
defaultSorting?: SortingState;
|
|
51
|
+
}) => {
|
|
52
|
+
sorting: SortingState;
|
|
53
|
+
onSortingChange: OnChangeFn<SortingState>;
|
|
54
|
+
};
|