asma-ui-core 3.122.0 → 3.123.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.
Files changed (41) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/index.js +66 -63
  3. package/dist/src/table/components/table-header/SortIndicator.d.ts +12 -0
  4. package/dist/src/table/custom-features/order-columns/columnLayout.d.ts +24 -0
  5. package/dist/src/table/custom-features/order-columns/columnLayout.test.d.ts +1 -0
  6. package/dist/src/table/custom-features/order-columns/types.d.ts +8 -0
  7. package/dist/src/table/custom-features/order-columns/usePersistColumnOrder.d.ts +5 -0
  8. package/dist/src/table/helpers/columnIds.d.ts +27 -0
  9. package/dist/src/table/helpers/columnIds.test.d.ts +1 -0
  10. package/dist/src/table/helpers/tableStorage.d.ts +12 -0
  11. package/dist/src/table/helpers/tableStorage.test.d.ts +1 -0
  12. package/dist/src/table/hooks/useColumnSizingPersistence.d.ts +16 -3
  13. package/dist/src/table/hooks/useColumnSizingPersistence.test.d.ts +1 -0
  14. package/dist/src/table/hooks/usePersistedSorting.d.ts +54 -0
  15. package/dist/src/table/hooks/usePersistedSorting.test.d.ts +1 -0
  16. package/dist/src/table/hooks/usePersistedStateWriter.d.ts +30 -0
  17. package/dist/src/table/hooks/useTranslations.d.ts +6 -4
  18. package/dist/src/table/index.d.ts +1 -0
  19. package/dist/src/table/types.d.ts +9 -2
  20. package/dist/table/components/StyledTable.module.js +59 -56
  21. package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +61 -54
  22. package/dist/table/components/columns/action-column/components/TableActions.module.js +4 -4
  23. package/dist/table/components/table-header/SortIndicator.js +23 -0
  24. package/dist/table/components/table-header/TableHeader.js +30 -30
  25. package/dist/table/components/table-header/TableHeaderCell.js +30 -31
  26. package/dist/table/custom-features/order-columns/OrderColumnsFeature.js +7 -8
  27. package/dist/table/custom-features/order-columns/columnLayout.js +9 -0
  28. package/dist/table/custom-features/order-columns/usePersistColumnOrder.js +12 -11
  29. package/dist/table/custom-features/order-columns/usePersistedColumnOrder.js +7 -12
  30. package/dist/table/helpers/columnIds.js +28 -0
  31. package/dist/table/helpers/tableStorage.js +33 -0
  32. package/dist/table/hooks/useColumnSizingPersistence.js +16 -34
  33. package/dist/table/hooks/usePersistedPageSize.js +11 -16
  34. package/dist/table/hooks/usePersistedSorting.js +58 -0
  35. package/dist/table/hooks/usePersistedStateWriter.js +36 -0
  36. package/dist/table/hooks/useStyledTable.js +90 -60
  37. package/dist/table/hooks/useTranslations.js +13 -11
  38. package/dist/table/index.js +3 -2
  39. package/dist/table/shared-components/DropDownIcon.js +4 -2
  40. package/dist/table/shared-components/DropUpIcon.js +5 -3
  41. package/package.json +1 -1
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 P } from "./components/icons/qnr-icon/QnrIcon.js";
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 Lo } from "./components/icons/dots-vertical-icon/DotsVerticalIcon.js";
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 Lr } from "./components/icons/calendar-blank-outline-icon/CalendarBlankOutlineIcon.js";
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 Lm } from "./components/icons/repeat-outline-icon/RepeatOutlineIcon.js";
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 Lt } from "./components/icons/refresh-icon/RefreshIcon.js";
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 Li } from "./components/icons/cancel-outline-icon/CancelOutlineIcon.js";
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 Le } from "./components/icons/file-image-icon/FileImageIcon.js";
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 Pn } from "./components/data-display/ai-disclosure/StyledAIDisclosure.js";
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 Lp } from "./components/feedback/snack-bar/SnackbarProvider.js";
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 Pf } from "./components/miscellaneous/StyledFormControl.js";
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 Pc } from "./components/navigation/listbox/Listbox.js";
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 { RowDragHandleCell as Vc } from "./table/components/columns/dndHandleColumn.js";
280
- import { StyledTable as Gc } from "./table/components/StyledTableIndex.js";
281
- import { createColumnHelper as qc } from "./table/index.js";
282
- import { DynamicToolbarLayoutContext as Qc, useDynamicToolbarLayout as Zc } from "./components/custom/module/header-layout/DynamicToolbarLayoutContext.js";
283
- import { StyledFilterButton as Jc } from "./components/utils/filter-menu/StyledFilterButton.js";
284
- import { StyledFilterMenu as $c } from "./components/utils/filter-menu/StyledFilterMenu.js";
285
- import { CopyButton as rl } from "./components/utils/copy-wrapper/CopyButton.js";
286
- import { CopyWrapper as tl } from "./components/utils/copy-wrapper/CopyWrapper.js";
287
- import { VirtualList as el } from "./components/utils/virtual-list/VirtualList.js";
288
- import { StyledWidgetTitle as pl } from "./components/custom/widget/widget-title/StyledWidgetTitle.js";
289
- import { StyledWidgetHeader as cl } from "./components/custom/widget/widget-header/StyledWidgetHeader.js";
290
- import { StyledWidget as al } from "./components/custom/widget/widget/StyledWidget.js";
291
- import { StyledModuleTitle as dl } from "./components/custom/module/module-title/StyledModuleTitle.js";
292
- import { DynamicToolbar as sl } from "./components/custom/module/header-layout/DynamicToolbar.js";
293
- import { PageHeader as yl } from "./components/custom/page/page-header/PageHeader.js";
294
- import { MinimizableDialog as Ol } from "./components/feedback/minimizable-dialog/MinimizableDialog.js";
295
- import { MinimizableDialogV2 as hl } from "./components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js";
296
- import { createDialogStack as bl } from "./components/feedback/minimizable-dialog/stack/createDialogStack.js";
297
- import { PathfinderCard as Ll } from "./components/custom/pathfinder-card/PathfinderCard.js";
298
- import { useRouteHeadingFocus as Fl } from "./hooks/useRouteHeadingFocus.js";
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
- Lr as CalendarBlankOutlineIcon,
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
- Li as CancelOutlineIcon,
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
- rl as CopyButton,
353
- tl as CopyWrapper,
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
- Lo as DotsVerticalIcon,
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
- sl as DynamicToolbar,
375
- Qc as DynamicToolbarLayoutContext,
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
- Le as FileImageIcon,
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
- Pc as Listbox,
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
- Ol as MinimizableDialog,
439
- hl as MinimizableDialogV2,
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
- yl as PageHeader,
452
+ gl as PageHeader,
452
453
  zf as Paper,
453
- Ll as PathfinderCard,
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
- P as QnrIcon,
474
- Lt as RefreshIcon,
474
+ L as QnrIcon,
475
+ Pt as RefreshIcon,
475
476
  yi as RemoveIcon,
476
- Lm as RepeatOutlineIcon,
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
- Vc as RowDragHandleCell,
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
- Lp as SnackbarProvider,
500
+ Pp as SnackbarProvider,
500
501
  Xf as Stack,
501
- Pn as StyledAIDisclosure,
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
- Jc as StyledFilterButton,
523
- $c as StyledFilterMenu,
523
+ ol as StyledFilterButton,
524
+ ml as StyledFilterMenu,
524
525
  Sp as StyledFilteredEmptyState,
525
526
  kf as StyledFormColumn,
526
- Pf as StyledFormControl,
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
- dl as StyledModuleTitle,
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
- Gc as StyledTable,
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
- al as StyledWidget,
561
- cl as StyledWidgetHeader,
562
- pl as StyledWidgetTitle,
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
- el as VirtualList,
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
- qc as createColumnHelper,
591
- bl as createDialogStack,
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
- Zc as useDynamicToolbarLayout,
618
+ Yc as useDynamicToolbarLayout,
619
+ zc as usePersistedSorting,
617
620
  Ef as usePopupState,
618
621
  Rn as useReportDialogBusy,
619
- Fl as useRouteHeadingFocus,
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;
@@ -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, Table } from '@tanstack/react-table';
2
- export declare const usePersistedColumnSizing: (uniqueKey?: string) => ColumnSizingState | undefined;
3
- export declare const usePersistColumnSizing: <TData>(table: Table<TData>, uniqueKey?: string) => void;
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,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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ interface PersistedStateWriterOptions<T> {
2
+ /** The entry this state is saved under; `undefined` means nothing is saved. */
3
+ storageKey: string | undefined;
4
+ /** The table's current value, controlled state included. */
5
+ state: T;
6
+ /** The app's default, taken from props on every render (never from `table.initialState`). */
7
+ defaultValue: T;
8
+ /** The current key's validated saved value; `undefined` when nothing valid is saved. */
9
+ saved: T | undefined;
10
+ /** `false` while the value is still being changed by a drag; nothing is written until it ends. */
11
+ settled?: boolean;
12
+ /** The app owns this state: a key change blocks writes but does not set the state itself. */
13
+ controlled?: boolean;
14
+ toSignature: (value: T) => string;
15
+ toStorage: (value: T) => string;
16
+ applyState: (value: T) => void;
17
+ }
18
+ /**
19
+ * The storage rule for one saved table setting (ASMA-8597, REQ-004 and REQ-005).
20
+ *
21
+ * - A value equal to the default removes the entry; any other value writes it.
22
+ * - Mounting, and loading a key, never write: only a change after that does.
23
+ * - When `storageKey` changes, the new key's values are loaded into the table state in a layout effect, and
24
+ * nothing is written or removed under the new key until the state equals what was loaded. The old key's
25
+ * entry is never touched, so the old value can't be copied over the new key.
26
+ * - When the key goes away (`undefined`), the table goes back to the app's defaults and writes nothing, so
27
+ * one user's values are not left on screen for whoever is shown next.
28
+ */
29
+ export declare const usePersistedStateWriter: <T>(options: PersistedStateWriterOptions<T>) => void;
30
+ export {};
@@ -3,17 +3,19 @@ declare const translations: {
3
3
  column_reorder: string;
4
4
  column_hidden: string;
5
5
  column_reorder_and_hidden: string;
6
- reset_order: string;
7
- column_order_reset: string;
6
+ reset_columns: string;
7
+ columns_reset: string;
8
8
  column_settings: string;
9
+ column_settings_changed: string;
9
10
  };
10
11
  no: {
11
12
  column_reorder: string;
12
13
  column_hidden: string;
13
14
  column_reorder_and_hidden: string;
14
- reset_order: string;
15
- column_order_reset: string;
15
+ reset_columns: string;
16
+ columns_reset: string;
16
17
  column_settings: string;
18
+ column_settings_changed: string;
17
19
  };
18
20
  };
19
21
  export declare function useTranslations(locale?: 'no' | 'en'): typeof translations.en;
@@ -1,4 +1,5 @@
1
1
  export * from './types';
2
2
  export * from './components/StyledTableIndex';
3
3
  export { RowDragHandleCell } from './components/columns/dndHandleColumn';
4
+ export { readPersistedSorting, usePersistedSorting, type PersistedSortingOptions, } from './hooks/usePersistedSorting';
4
5
  export { createColumnHelper, type Table, type Row, type ColumnDef, type CellContext } from '@tanstack/react-table';