@exxatdesignux/ui 0.2.19 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -7
- package/bin/sync-extras.mjs +116 -29
- package/consumer-extras/README.md +42 -7
- package/consumer-extras/cursor-rules/exxat-accessibility.mdc +39 -0
- package/consumer-extras/cursor-rules/exxat-board-cards.mdc +26 -0
- package/consumer-extras/cursor-rules/exxat-breadcrumbs-no-back.mdc +21 -0
- package/consumer-extras/cursor-rules/exxat-card-vs-list-rows.mdc +21 -0
- package/consumer-extras/cursor-rules/exxat-centralized-list-dataset.mdc +44 -0
- package/consumer-extras/cursor-rules/exxat-collaboration-access.mdc +32 -0
- package/consumer-extras/cursor-rules/exxat-command-menu.mdc +22 -0
- package/consumer-extras/cursor-rules/exxat-dashboard-view-charts.mdc +53 -0
- package/consumer-extras/cursor-rules/exxat-data-tables.mdc +41 -0
- package/consumer-extras/cursor-rules/exxat-dedicated-search-surfaces.mdc +25 -0
- package/consumer-extras/cursor-rules/exxat-drawer-vs-dialog.mdc +22 -0
- package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +56 -0
- package/consumer-extras/cursor-rules/exxat-fontawesome-icons.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-kbd-shortcuts.mdc +100 -0
- package/consumer-extras/cursor-rules/exxat-kpi-flat-band.mdc +28 -0
- package/consumer-extras/cursor-rules/exxat-kpi-max-four.mdc +21 -0
- package/consumer-extras/cursor-rules/exxat-kpi-trends.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-list-page-connected-views.mdc +24 -0
- package/consumer-extras/cursor-rules/exxat-list-page-view-shells.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-mono-ids.mdc +30 -0
- package/consumer-extras/cursor-rules/exxat-no-slds-leakage.mdc +78 -0
- package/consumer-extras/cursor-rules/exxat-no-toast.mdc +25 -0
- package/consumer-extras/cursor-rules/exxat-page-vs-drawer.mdc +23 -0
- package/consumer-extras/cursor-rules/exxat-person-identity-display.mdc +47 -0
- package/consumer-extras/cursor-rules/exxat-primary-nav-secondary-panel.mdc +52 -0
- package/consumer-extras/cursor-rules/exxat-question-bank-hub-header.mdc +28 -0
- package/consumer-extras/cursor-rules/exxat-reuse-before-custom.mdc +34 -0
- package/consumer-extras/cursor-rules/exxat-table-properties-drawer.mdc +77 -0
- package/consumer-extras/cursor-rules/exxat-token-discipline.mdc +103 -0
- package/consumer-extras/cursor-skills/exxat-accessibility/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-board-cards/SKILL.md +2 -2
- package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +4 -15
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +13 -28
- package/consumer-extras/cursor-skills/exxat-ds-skill/references/data-table-pattern.md +1 -1
- package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +2 -4
- package/consumer-extras/handbook/HANDBOOK.md +185 -0
- package/consumer-extras/handbook/glossary.md +57 -0
- package/consumer-extras/handbook/reference-implementations.md +126 -0
- package/consumer-extras/handbook/voice-and-tone.md +262 -0
- package/consumer-extras/patterns/command-menu-pattern.md +1 -1
- package/consumer-extras/patterns/consumer-upgrade-checklist.md +0 -20
- package/consumer-extras/patterns/data-views-pattern.md +17 -54
- package/consumer-extras/patterns/shell-surface-elevation-pattern.md +3 -5
- package/dist/components/data-table/filter-date-calendar.d.ts +10 -0
- package/dist/components/data-table/filter-date-calendar.js +280 -0
- package/dist/components/data-table/filter-date-calendar.js.map +1 -0
- package/dist/components/data-table/filter-text-value-input.d.ts +15 -0
- package/dist/components/data-table/filter-text-value-input.js +561 -0
- package/dist/components/data-table/filter-text-value-input.js.map +1 -0
- package/dist/components/data-table/index.d.ts +45 -0
- package/dist/components/data-table/index.js +3085 -0
- package/dist/components/data-table/index.js.map +1 -0
- package/dist/components/data-table/pagination.d.ts +28 -0
- package/dist/components/data-table/pagination.js +3264 -0
- package/dist/components/data-table/pagination.js.map +1 -0
- package/dist/components/data-table/types.d.ts +84 -0
- package/dist/components/data-table/types.js +3 -0
- package/dist/components/data-table/types.js.map +1 -0
- package/dist/components/data-table/use-table-state.d.ts +116 -0
- package/dist/components/data-table/use-table-state.js +670 -0
- package/dist/components/data-table/use-table-state.js.map +1 -0
- package/dist/components/data-views/board-card-primitives.d.ts +22 -0
- package/dist/components/data-views/board-card-primitives.js +84 -0
- package/dist/components/data-views/board-card-primitives.js.map +1 -0
- package/dist/components/data-views/data-row-list.d.ts +33 -0
- package/dist/components/data-views/data-row-list.js +106 -0
- package/dist/components/data-views/data-row-list.js.map +1 -0
- package/dist/components/data-views/finder-panel-view.d.ts +54 -0
- package/dist/components/data-views/finder-panel-view.js +388 -0
- package/dist/components/data-views/finder-panel-view.js.map +1 -0
- package/dist/components/data-views/folder-grid-view.d.ts +22 -0
- package/dist/components/data-views/folder-grid-view.js +58 -0
- package/dist/components/data-views/folder-grid-view.js.map +1 -0
- package/dist/components/data-views/hub-table.d.ts +167 -0
- package/dist/components/data-views/hub-table.js +5561 -0
- package/dist/components/data-views/hub-table.js.map +1 -0
- package/dist/components/data-views/index.d.ts +27 -0
- package/dist/components/data-views/index.js +6575 -0
- package/dist/components/data-views/index.js.map +1 -0
- package/dist/components/data-views/list-page-board-card.d.ts +72 -0
- package/dist/components/data-views/list-page-board-card.js +264 -0
- package/dist/components/data-views/list-page-board-card.js.map +1 -0
- package/dist/components/data-views/list-page-board-template.d.ts +24 -0
- package/dist/components/data-views/list-page-board-template.js +137 -0
- package/dist/components/data-views/list-page-board-template.js.map +1 -0
- package/dist/components/data-views/list-page-connected-view-body.d.ts +19 -0
- package/dist/components/data-views/list-page-connected-view-body.js +116 -0
- package/dist/components/data-views/list-page-connected-view-body.js.map +1 -0
- package/dist/components/data-views/list-page-split-details-placeholder.d.ts +14 -0
- package/dist/components/data-views/list-page-split-details-placeholder.js +38 -0
- package/dist/components/data-views/list-page-split-details-placeholder.js.map +1 -0
- package/dist/components/data-views/list-page-split-hub-chrome.d.ts +17 -0
- package/dist/components/data-views/list-page-split-hub-chrome.js +54 -0
- package/dist/components/data-views/list-page-split-hub-chrome.js.map +1 -0
- package/dist/components/data-views/list-page-split-hub-tokens.d.ts +12 -0
- package/dist/components/data-views/list-page-split-hub-tokens.js +8 -0
- package/dist/components/data-views/list-page-split-hub-tokens.js.map +1 -0
- package/dist/components/data-views/list-page-tree-column-header.d.ts +15 -0
- package/dist/components/data-views/list-page-tree-column-header.js +22 -0
- package/dist/components/data-views/list-page-tree-column-header.js.map +1 -0
- package/dist/components/data-views/list-page-tree-panel-shell.d.ts +25 -0
- package/dist/components/data-views/list-page-tree-panel-shell.js +146 -0
- package/dist/components/data-views/list-page-tree-panel-shell.js.map +1 -0
- package/dist/components/data-views/os-folder-glyph.d.ts +35 -0
- package/dist/components/data-views/os-folder-glyph.js +104 -0
- package/dist/components/data-views/os-folder-glyph.js.map +1 -0
- package/dist/components/data-views/outline-tree-menu.d.ts +36 -0
- package/dist/components/data-views/outline-tree-menu.js +131 -0
- package/dist/components/data-views/outline-tree-menu.js.map +1 -0
- package/dist/components/table-properties/column-row.d.ts +22 -0
- package/dist/components/table-properties/column-row.js +153 -0
- package/dist/components/table-properties/column-row.js.map +1 -0
- package/dist/components/table-properties/draggable-list.d.ts +24 -0
- package/dist/components/table-properties/draggable-list.js +53 -0
- package/dist/components/table-properties/draggable-list.js.map +1 -0
- package/dist/components/table-properties/drawer-button.d.ts +110 -0
- package/dist/components/table-properties/drawer-button.js +2748 -0
- package/dist/components/table-properties/drawer-button.js.map +1 -0
- package/dist/components/table-properties/drawer.d.ts +100 -0
- package/dist/components/table-properties/drawer.js +2595 -0
- package/dist/components/table-properties/drawer.js.map +1 -0
- package/dist/components/table-properties/filter-card.d.ts +24 -0
- package/dist/components/table-properties/filter-card.js +854 -0
- package/dist/components/table-properties/filter-card.js.map +1 -0
- package/dist/components/table-properties/index.d.ts +14 -0
- package/dist/components/table-properties/index.js +2768 -0
- package/dist/components/table-properties/index.js.map +1 -0
- package/dist/components/table-properties/sort-card.d.ts +20 -0
- package/dist/components/table-properties/sort-card.js +102 -0
- package/dist/components/table-properties/sort-card.js.map +1 -0
- package/dist/components/templates/dedicated-search-landing-template.d.ts +21 -0
- package/dist/components/templates/dedicated-search-landing-template.js +254 -0
- package/dist/components/templates/dedicated-search-landing-template.js.map +1 -0
- package/dist/components/templates/dedicated-search-results-template.d.ts +15 -0
- package/dist/components/templates/dedicated-search-results-template.js +16 -0
- package/dist/components/templates/dedicated-search-results-template.js.map +1 -0
- package/dist/components/templates/index.d.ts +9 -0
- package/dist/components/templates/index.js +2720 -0
- package/dist/components/templates/index.js.map +1 -0
- package/dist/components/templates/list-page.d.ts +83 -0
- package/dist/components/templates/list-page.js +2433 -0
- package/dist/components/templates/list-page.js.map +1 -0
- package/dist/components/templates/nested-secondary-panel-shell.d.ts +20 -0
- package/dist/components/templates/nested-secondary-panel-shell.js +54 -0
- package/dist/components/templates/nested-secondary-panel-shell.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +10 -0
- package/dist/components/ui/accordion.js +74 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +37 -0
- package/dist/components/ui/alert-dialog.js +201 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +84 -0
- package/dist/components/ui/avatar.js +328 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +13 -0
- package/dist/components/ui/badge.js +49 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/banner.d.ts +62 -0
- package/dist/components/ui/banner.js +364 -0
- package/dist/components/ui/banner.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +14 -0
- package/dist/components/ui/breadcrumb.js +114 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +16 -0
- package/dist/components/ui/button.js +59 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +13 -0
- package/dist/components/ui/calendar.js +238 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.js +102 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/chart.d.ts +58 -0
- package/dist/components/ui/chart.js +292 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +23 -0
- package/dist/components/ui/checkbox.js +155 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/coach-mark.d.ts +27 -0
- package/dist/components/ui/coach-mark.js +306 -0
- package/dist/components/ui/coach-mark.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +8 -0
- package/dist/components/ui/collapsible.js +35 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +36 -0
- package/dist/components/ui/command.js +274 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.js +245 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/date-picker-field.d.ts +38 -0
- package/dist/components/ui/date-picker-field.js +550 -0
- package/dist/components/ui/date-picker-field.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +200 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dot-pattern.d.ts +21 -0
- package/dist/components/ui/dot-pattern.js +139 -0
- package/dist/components/ui/dot-pattern.js.map +1 -0
- package/dist/components/ui/drag-handle-grip.d.ts +10 -0
- package/dist/components/ui/drag-handle-grip.js +15 -0
- package/dist/components/ui/drag-handle-grip.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +16 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +45 -0
- package/dist/components/ui/dropdown-menu.js +353 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/export-drawer.d.ts +11 -0
- package/dist/components/ui/export-drawer.js +1658 -0
- package/dist/components/ui/export-drawer.js.map +1 -0
- package/dist/components/ui/field.d.ts +30 -0
- package/dist/components/ui/field.js +249 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +28 -0
- package/dist/components/ui/form.js +110 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +9 -0
- package/dist/components/ui/hover-card.js +43 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +219 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-mask.d.ts +39 -0
- package/dist/components/ui/input-mask.js +118 -0
- package/dist/components/ui/input-mask.js.map +1 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +30 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +20 -0
- package/dist/components/ui/kbd.js +45 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/key-metrics-context.d.ts +19 -0
- package/dist/components/ui/key-metrics-context.js +26 -0
- package/dist/components/ui/key-metrics-context.js.map +1 -0
- package/dist/components/ui/key-metrics.d.ts +131 -0
- package/dist/components/ui/key-metrics.js +1015 -0
- package/dist/components/ui/key-metrics.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.js +28 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/list-page-view-frame.d.ts +22 -0
- package/dist/components/ui/list-page-view-frame.js +24 -0
- package/dist/components/ui/list-page-view-frame.js.map +1 -0
- package/dist/components/ui/page-header.d.ts +51 -0
- package/dist/components/ui/page-header.js +372 -0
- package/dist/components/ui/page-header.js.map +1 -0
- package/dist/components/ui/payment-card-fields.d.ts +10 -0
- package/dist/components/ui/payment-card-fields.js +80 -0
- package/dist/components/ui/payment-card-fields.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +47 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +29 -0
- package/dist/components/ui/radio-group.js +190 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +16 -0
- package/dist/components/ui/resizable.js +51 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +8 -0
- package/dist/components/ui/scroll-area.js +66 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.js +186 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/selection-tile-grid.d.ts +52 -0
- package/dist/components/ui/selection-tile-grid.js +347 -0
- package/dist/components/ui/selection-tile-grid.js.map +1 -0
- package/dist/components/ui/separator.d.ts +7 -0
- package/dist/components/ui/separator.js +33 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +18 -0
- package/dist/components/ui/sheet.js +181 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +94 -0
- package/dist/components/ui/sidebar.js +805 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +5 -0
- package/dist/components/ui/skeleton.js +22 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +7 -0
- package/dist/components/ui/slider.js +66 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/sonner.js +38 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/status-badge.d.ts +38 -0
- package/dist/components/ui/status-badge.js +77 -0
- package/dist/components/ui/status-badge.js.map +1 -0
- package/dist/components/ui/table.d.ts +13 -0
- package/dist/components/ui/table.js +115 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +15 -0
- package/dist/components/ui/tabs.js +93 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.js +25 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tip.d.ts +12 -0
- package/dist/components/ui/tip.js +61 -0
- package/dist/components/ui/tip.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +14 -0
- package/dist/components/ui/toggle-group.js +104 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle-switch.d.ts +10 -0
- package/dist/components/ui/toggle-switch.js +33 -0
- package/dist/components/ui/toggle-switch.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.js +51 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/components/ui/tooltip.js +68 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/view-segmented-control.d.ts +31 -0
- package/dist/components/ui/view-segmented-control.js +167 -0
- package/dist/components/ui/view-segmented-control.js.map +1 -0
- package/dist/data-list-view-registry-CyBoBML4.d.ts +73 -0
- package/dist/hooks/use-app-theme.d.ts +24 -0
- package/dist/hooks/use-app-theme.js +286 -0
- package/dist/hooks/use-app-theme.js.map +1 -0
- package/dist/hooks/use-coach-mark.d.ts +86 -0
- package/dist/hooks/use-coach-mark.js +218 -0
- package/dist/hooks/use-coach-mark.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +29 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-mod-key-label.d.ts +6 -0
- package/dist/hooks/use-mod-key-label.js +25 -0
- package/dist/hooks/use-mod-key-label.js.map +1 -0
- package/dist/index.d.ts +120 -0
- package/dist/index.js +13324 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/compose-refs.d.ts +6 -0
- package/dist/lib/compose-refs.js +17 -0
- package/dist/lib/compose-refs.js.map +1 -0
- package/dist/lib/conditional-rule-match.d.ts +30 -0
- package/dist/lib/conditional-rule-match.js +66 -0
- package/dist/lib/conditional-rule-match.js.map +1 -0
- package/dist/lib/data-list-display-options.d.ts +26 -0
- package/dist/lib/data-list-display-options.js +14 -0
- package/dist/lib/data-list-display-options.js.map +1 -0
- package/dist/lib/data-list-view-registry.d.ts +2 -0
- package/dist/lib/data-list-view-registry.js +102 -0
- package/dist/lib/data-list-view-registry.js.map +1 -0
- package/dist/lib/data-list-view-surface.d.ts +2 -0
- package/dist/lib/data-list-view-surface.js +80 -0
- package/dist/lib/data-list-view-surface.js.map +1 -0
- package/dist/lib/data-list-view.d.ts +21 -0
- package/dist/lib/data-list-view.js +25 -0
- package/dist/lib/data-list-view.js.map +1 -0
- package/dist/lib/date-filter.d.ts +22 -0
- package/dist/lib/date-filter.js +61 -0
- package/dist/lib/date-filter.js.map +1 -0
- package/dist/lib/dev-log.d.ts +8 -0
- package/dist/lib/dev-log.js +10 -0
- package/dist/lib/dev-log.js.map +1 -0
- package/dist/lib/dropdown-menu-surface.d.ts +14 -0
- package/dist/lib/dropdown-menu-surface.js +6 -0
- package/dist/lib/dropdown-menu-surface.js.map +1 -0
- package/dist/lib/editable-target.d.ts +12 -0
- package/dist/lib/editable-target.js +12 -0
- package/dist/lib/editable-target.js.map +1 -0
- package/dist/lib/list-page-table-properties.d.ts +35 -0
- package/dist/lib/list-page-table-properties.js +81 -0
- package/dist/lib/list-page-table-properties.js.map +1 -0
- package/dist/lib/raf-throttle.d.ts +23 -0
- package/dist/lib/raf-throttle.js +27 -0
- package/dist/lib/raf-throttle.js.map +1 -0
- package/dist/lib/row-height.d.ts +16 -0
- package/dist/lib/row-height.js +10 -0
- package/dist/lib/row-height.js.map +1 -0
- package/dist/lib/table-properties-types.d.ts +83 -0
- package/dist/lib/table-properties-types.js +19 -0
- package/dist/lib/table-properties-types.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +83 -19
- package/src/components/data-table/filter-date-calendar.tsx +38 -0
- package/src/components/data-table/filter-text-value-input.tsx +77 -0
- package/src/components/data-table/index.tsx +1678 -0
- package/src/components/data-table/pagination.tsx +255 -0
- package/src/components/data-table/types.ts +96 -0
- package/src/components/data-table/use-table-state.ts +767 -0
- package/src/components/data-views/board-card-primitives.tsx +93 -0
- package/src/components/data-views/data-row-list.tsx +183 -0
- package/src/components/data-views/finder-panel-view.tsx +405 -0
- package/src/components/data-views/folder-grid-view.tsx +86 -0
- package/src/components/data-views/hub-table.tsx +498 -0
- package/src/components/data-views/index.ts +28 -0
- package/src/components/data-views/list-page-board-card.tsx +192 -0
- package/src/components/data-views/list-page-board-template.tsx +122 -0
- package/src/components/data-views/list-page-connected-view-body.tsx +66 -0
- package/src/components/data-views/list-page-split-details-placeholder.tsx +39 -0
- package/src/components/data-views/list-page-split-hub-chrome.tsx +60 -0
- package/src/components/data-views/list-page-split-hub-tokens.ts +16 -0
- package/src/components/data-views/list-page-tree-column-header.tsx +31 -0
- package/src/components/data-views/list-page-tree-panel-shell.tsx +91 -0
- package/src/components/data-views/os-folder-glyph.tsx +141 -0
- package/src/components/data-views/outline-tree-menu.tsx +157 -0
- package/src/components/table-properties/column-row.tsx +90 -0
- package/src/components/table-properties/draggable-list.ts +54 -0
- package/src/components/table-properties/drawer-button.tsx +300 -0
- package/src/components/table-properties/drawer.tsx +1148 -0
- package/src/components/table-properties/filter-card.tsx +251 -0
- package/src/components/table-properties/index.ts +36 -0
- package/src/components/table-properties/sort-card.tsx +63 -0
- package/src/components/templates/dedicated-search-landing-template.tsx +124 -0
- package/src/components/templates/dedicated-search-results-template.tsx +19 -0
- package/src/components/templates/index.ts +33 -0
- package/src/components/templates/list-page.tsx +602 -0
- package/src/components/templates/nested-secondary-panel-shell.tsx +70 -0
- package/src/components/ui/accordion.tsx +92 -0
- package/src/components/ui/alert-dialog.tsx +221 -0
- package/src/components/ui/avatar.tsx +13 -2
- package/src/components/ui/banner.tsx +2 -2
- package/src/components/ui/button.tsx +4 -4
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/coach-mark.tsx +1 -1
- package/src/components/ui/context-menu.tsx +291 -0
- package/src/components/ui/date-picker-field.tsx +2 -2
- package/src/components/ui/dot-pattern.tsx +183 -0
- package/src/components/ui/export-drawer.tsx +375 -0
- package/src/components/ui/hover-card.tsx +66 -0
- package/src/components/ui/key-metrics-context.tsx +78 -0
- package/src/components/ui/key-metrics.tsx +1133 -0
- package/src/components/ui/list-page-view-frame.tsx +64 -0
- package/src/components/ui/page-header.tsx +244 -0
- package/src/components/ui/payment-card-fields.tsx +2 -2
- package/src/components/ui/resizable.tsx +68 -0
- package/src/components/ui/scroll-area.tsx +72 -0
- package/src/components/ui/selection-tile-grid.tsx +9 -2
- package/src/components/ui/sidebar.tsx +84 -12
- package/src/components/ui/slider.tsx +83 -0
- package/src/globals.css +2201 -7
- package/src/globals.d.ts +20 -0
- package/src/index.ts +68 -1
- package/src/lib/conditional-rule-match.ts +119 -0
- package/src/lib/data-list-display-options.ts +35 -0
- package/src/lib/data-list-view-registry.ts +104 -0
- package/src/lib/data-list-view-surface.ts +83 -0
- package/src/lib/data-list-view.ts +47 -0
- package/src/lib/dev-log.ts +10 -0
- package/src/lib/editable-target.ts +20 -0
- package/src/lib/list-page-table-properties.ts +48 -0
- package/src/lib/raf-throttle.ts +45 -0
- package/src/lib/row-height.ts +19 -0
- package/src/lib/table-properties-types.ts +98 -0
- package/template/.cursor/rules/exxat-command-menu.mdc +1 -1
- package/template/.cursor/rules/exxat-dashboard-view-charts.mdc +3 -3
- package/template/.cursor/rules/exxat-data-tables.mdc +1 -1
- package/template/.cursor/rules/exxat-ds-agents.mdc +2 -2
- package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +2 -2
- package/template/.cursor/rules/exxat-table-properties-drawer.mdc +1 -1
- package/template/AGENTS.md +104 -78
- package/template/app/(app)/dashboard/loading.tsx +15 -3
- package/template/app/(app)/dashboard/page.tsx +14 -2
- package/template/app/(app)/examples/page.tsx +0 -2
- package/template/app/(app)/layout.tsx +17 -4
- package/template/app/(app)/loading.tsx +18 -1
- package/template/app/(app)/question-bank/find/page.tsx +1 -2
- package/template/app/(app)/question-bank/layout.tsx +1 -1
- package/template/app/(app)/question-bank/library/page.tsx +1 -2
- package/template/app/(app)/question-bank/list/page.tsx +1 -2
- package/template/app/(app)/question-bank/new/page.tsx +15 -20
- package/template/app/(app)/question-bank/page.tsx +1 -2
- package/template/app/(app)/settings/page.tsx +5 -4
- package/template/app/globals.css +14 -16
- package/template/components/ask-leo-sidebar.tsx +5 -1
- package/template/components/brand-color-picker.tsx +2 -2
- package/template/components/charts-overview.tsx +1 -1
- package/template/components/compliance-board-view.tsx +142 -0
- package/template/components/compliance-client.tsx +92 -0
- package/template/components/compliance-page-header.tsx +89 -0
- package/template/components/compliance-table.tsx +468 -0
- package/template/components/dashboard-report-charts.tsx +1 -1
- package/template/components/dashboard-tabs.tsx +1 -1
- package/template/components/data-table/filter-date-calendar.tsx +1 -38
- package/template/components/data-table/filter-text-value-input.tsx +1 -77
- package/template/components/data-table/index.tsx +1 -1634
- package/template/components/data-table/pagination.tsx +1 -255
- package/template/components/data-table/types.ts +1 -94
- package/template/components/data-table/use-table-state.test.ts +420 -0
- package/template/components/data-table/use-table-state.ts +1 -758
- package/template/components/data-view-dashboard-charts-compliance.tsx +963 -0
- package/template/components/data-view-dashboard-charts-team.tsx +971 -0
- package/template/components/data-view-dashboard-charts.tsx +1503 -0
- package/template/components/data-views/board-card-primitives.tsx +1 -93
- package/template/components/data-views/data-row-list.tsx +1 -183
- package/template/components/data-views/finder-panel-view.tsx +1 -405
- package/template/components/data-views/folder-grid-view.tsx +1 -86
- package/template/components/data-views/hub-table.tsx +1 -0
- package/template/components/data-views/index.ts +50 -37
- package/template/components/data-views/list-page-board-card.tsx +1 -192
- package/template/components/data-views/list-page-board-template.tsx +1 -122
- package/template/components/data-views/list-page-connected-view-body.tsx +1 -66
- package/template/components/data-views/list-page-split-details-placeholder.tsx +1 -39
- package/template/components/data-views/list-page-split-hub-chrome.tsx +1 -68
- package/template/components/data-views/list-page-split-hub-tokens.ts +1 -16
- package/template/components/data-views/list-page-tree-column-header.tsx +1 -31
- package/template/components/data-views/list-page-tree-panel-shell.tsx +1 -91
- package/template/components/data-views/list-page-view-frame.tsx +5 -53
- package/template/components/data-views/os-folder-glyph.tsx +1 -129
- package/template/components/data-views/outline-tree-menu.tsx +1 -157
- package/template/components/export-drawer.test.tsx +71 -0
- package/template/components/export-drawer.tsx +1 -375
- package/template/components/exxat-product-logo.tsx +5 -5
- package/template/components/hub-tree-panel-view.tsx +2 -2
- package/template/components/invite-collaborators-drawer.tsx +3 -3
- package/template/components/key-metrics-ask-leo-bridge.tsx +40 -0
- package/template/components/key-metrics.tsx +1 -1063
- package/template/components/leo-insight-indicator.tsx +2 -2
- package/template/components/new-placement-back-btn.tsx +28 -0
- package/template/components/new-placement-form.tsx +942 -0
- package/template/components/new-question-composer.tsx +456 -408
- package/template/components/onboarding/index.ts +9 -0
- package/template/components/onboarding/onboarding-01.tsx +1 -1
- package/template/components/onboarding/onboarding-02.tsx +1 -1
- package/template/components/onboarding/onboarding-03.tsx +1 -1
- package/template/components/onboarding/onboarding-04.tsx +1 -1
- package/template/components/page-header.tsx +8 -226
- package/template/components/placement-board-card.tsx +250 -0
- package/template/components/placement-detail.tsx +438 -0
- package/template/components/placements-board-view.tsx +397 -0
- package/template/components/placements-client.tsx +220 -0
- package/template/components/placements-list-view.tsx +124 -0
- package/template/components/placements-page-header.tsx +166 -0
- package/template/components/placements-table-cells.test.tsx +22 -0
- package/template/components/placements-table-cells.tsx +173 -0
- package/template/components/placements-table-columns.tsx +210 -0
- package/template/components/placements-table.tsx +934 -0
- package/template/components/product-switcher.tsx +3 -4
- package/template/components/product-wordmark.tsx +2 -1
- package/template/components/question-bank-client.tsx +5 -5
- package/template/components/question-bank-hub-client.tsx +1 -1
- package/template/components/question-bank-new-folder-sheet.tsx +2 -2
- package/template/components/question-bank-secondary-nav.tsx +3 -3
- package/template/components/question-bank-table.tsx +541 -431
- package/template/components/rotations-empty-state.tsx +50 -0
- package/template/components/rotations-panel-activator.tsx +8 -0
- package/template/components/settings-appearance-card.tsx +3 -4
- package/template/components/settings-client.tsx +15 -59
- package/template/components/settings-form-row.tsx +4 -9
- package/template/components/{app-sidebar-dynamic.tsx → sidebar/app-sidebar-dynamic.tsx} +1 -1
- package/template/components/{app-sidebar.tsx → sidebar/app-sidebar.tsx} +59 -74
- package/template/components/sidebar/index.ts +16 -0
- package/template/components/{secondary-nav.tsx → sidebar/secondary-nav.tsx} +2 -2
- package/template/components/{secondary-panel.tsx → sidebar/secondary-panel.tsx} +50 -7
- package/template/components/{sidebar-auto-collapse.tsx → sidebar/sidebar-auto-collapse.tsx} +6 -2
- package/template/components/{sidebar-shell.tsx → sidebar/sidebar-shell.tsx} +1 -1
- package/template/components/site-header.tsx +1 -1
- package/template/components/sites-board-view.tsx +67 -0
- package/template/components/sites-client.tsx +154 -0
- package/template/components/sites-table.tsx +249 -0
- package/template/components/table-properties/column-row.tsx +1 -90
- package/template/components/table-properties/draggable-list.ts +1 -49
- package/template/components/table-properties/drawer-button.tsx +1 -262
- package/template/components/table-properties/drawer.tsx +1 -1166
- package/template/components/table-properties/filter-card.tsx +1 -251
- package/template/components/table-properties/sort-card.tsx +1 -59
- package/template/components/table-properties/types.ts +28 -71
- package/template/components/team-board-view.tsx +122 -0
- package/template/components/team-client.tsx +100 -0
- package/template/components/team-page-header.tsx +92 -0
- package/template/components/team-table.tsx +553 -0
- package/template/components/templates/dedicated-search-landing-template.tsx +1 -124
- package/template/components/templates/dedicated-search-results-template.tsx +1 -19
- package/template/components/templates/list-page.tsx +1 -608
- package/template/components/templates/nested-secondary-panel-shell.tsx +1 -63
- package/template/components/templates/new-focus-template.tsx +659 -0
- package/template/components/templates/secondary-panel-hub-template.tsx +1 -1
- package/template/components/ui/accordion.tsx +1 -0
- package/template/components/ui/alert-dialog.tsx +1 -0
- package/template/components/ui/context-menu.tsx +1 -0
- package/template/components/ui/dot-pattern.tsx +1 -183
- package/template/components/ui/hover-card.tsx +1 -0
- package/template/components/ui/resizable.tsx +1 -68
- package/template/components/ui/scroll-area.tsx +1 -0
- package/template/components/ui/slider.tsx +1 -0
- package/template/docs/blueprints/README.md +86 -0
- package/template/docs/blueprints/_template.md +91 -0
- package/template/docs/blueprints/board-card.md +123 -0
- package/template/docs/blueprints/data-table.md +139 -0
- package/template/docs/blueprints/key-metrics.md +128 -0
- package/template/docs/blueprints/list-page-template.md +123 -0
- package/template/docs/blueprints/page-header.md +130 -0
- package/template/docs/command-menu-pattern.md +1 -1
- package/template/docs/component-selection-guide.md +224 -0
- package/template/docs/components-audit-2026-05.md +158 -0
- package/template/docs/data-views-pattern.md +17 -54
- package/template/docs/drawer-vs-dialog-pattern.md +1 -3
- package/template/docs/migrations/0001-brand-deep-alias-stabilization.md +95 -0
- package/template/docs/migrations/0002-exxat-token-namespace.md +154 -0
- package/template/docs/migrations/0003-globals-css-canonical.md +110 -0
- package/template/docs/migrations/README.md +100 -0
- package/template/docs/migrations/_template.md +64 -0
- package/template/docs/shell-surface-elevation-pattern.md +3 -5
- package/template/docs/token-taxonomy.md +416 -0
- package/template/eslint.config.mjs +27 -0
- package/template/hooks/use-secondary-panel-hub-nav.ts +1 -1
- package/template/lib/command-menu-config.ts +0 -1
- package/template/lib/command-menu-search-data.ts +27 -11
- package/template/lib/compliance-supported-views.ts +10 -0
- package/template/lib/conditional-rule-match.ts +6 -97
- package/template/lib/data-list-display-options.ts +1 -49
- package/template/lib/data-list-view-registry.ts +1 -104
- package/template/lib/data-list-view-surface.ts +1 -83
- package/template/lib/data-list-view.ts +1 -47
- package/template/lib/data-view-dashboard-placements-layout.ts +215 -0
- package/template/lib/data-view-dashboard-storage.ts +35 -38
- package/template/lib/dev-log.ts +1 -8
- package/template/lib/editable-target.ts +1 -10
- package/template/lib/list-page-table-properties.ts +1 -48
- package/template/lib/list-status-badges.ts +97 -4
- package/template/lib/mock/compliance-kpi.ts +61 -0
- package/template/lib/mock/compliance.ts +146 -0
- package/template/lib/mock/navigation.tsx +0 -9
- package/template/lib/mock/placements-kpi.ts +134 -0
- package/template/lib/mock/placements.ts +176 -0
- package/template/lib/mock/sites-directory.ts +16 -0
- package/template/lib/mock/sites-kpi.ts +25 -0
- package/template/lib/mock/team-kpi.ts +60 -0
- package/template/lib/mock/team.ts +118 -0
- package/template/lib/placement-board-card-layout.ts +79 -0
- package/template/lib/placements-supported-views.ts +12 -0
- package/template/lib/question-bank-supported-views.ts +0 -1
- package/template/lib/raf-throttle.ts +1 -45
- package/template/lib/row-height.ts +4 -10
- package/template/lib/sidebar-state-cookie.ts +11 -2
- package/template/lib/sites-supported-views.ts +10 -0
- package/template/lib/table-state-lifecycle.ts +2 -2
- package/template/lib/team-supported-views.ts +10 -0
- package/template/package.json +1 -0
- package/template/tests/setup.ts +25 -0
- package/consumer-extras/AGENTS.md +0 -76
- package/consumer-extras/cursor-skills/exxat-consumer-app/SKILL.md +0 -37
- package/consumer-extras/cursor-skills/exxat-focused-workflow-page/SKILL.md +0 -57
- package/consumer-extras/patterns/consumer-app-pattern.md +0 -39
- package/consumer-extras/patterns/focused-workflow-page-pattern.md +0 -84
- package/src/components/ui/button-group.tsx +0 -81
- package/src/theme.css +0 -16
- package/src/tokens/README.md +0 -15
- package/src/tokens/base.css +0 -337
- package/src/tokens/high-contrast.css +0 -1195
- package/src/tokens/layers.css +0 -224
- package/src/tokens/tailwind-bridge.css +0 -118
- package/src/tokens/themes.css +0 -201
- package/template/app/(app)/data-list/layout.tsx +0 -43
- package/template/app/(app)/data-list/page.tsx +0 -10
- package/template/app/(app)/examples/focused-workflow/page.tsx +0 -5
- package/template/components/app-route-loading.tsx +0 -14
- package/template/components/dashboard-onboarding-gallery.tsx +0 -13
- package/template/components/dashboard-onboarding.tsx +0 -21
- package/template/components/data-views/list-page-calendar-view.tsx +0 -593
- package/template/components/data-views/list-page-folder-columns-panel.tsx +0 -345
- package/template/components/examples/focused-workflow-showcase.tsx +0 -183
- package/template/components/list-hub-board-view.tsx +0 -68
- package/template/components/list-hub-client.tsx +0 -186
- package/template/components/list-hub-list-view.tsx +0 -36
- package/template/components/list-hub-panel-activator.tsx +0 -8
- package/template/components/list-hub-secondary-nav.tsx +0 -121
- package/template/components/list-hub-table.tsx +0 -336
- package/template/components/question-bank-folder-columns-panel.tsx +0 -104
- package/template/components/question-bank-list-view.tsx +0 -53
- package/template/components/secondary-panel/nav-link-rows.tsx +0 -83
- package/template/components/secondary-panels/list-hub-panel.tsx +0 -39
- package/template/components/secondary-panels/question-bank-panel.tsx +0 -39
- package/template/components/secondary-panels/registry.tsx +0 -15
- package/template/components/section-cards.tsx +0 -106
- package/template/components/templates/focused-workflow-layouts.tsx +0 -448
- package/template/components/templates/focused-workflow-page-template.tsx +0 -69
- package/template/components/templates/page-loading-shell.tsx +0 -262
- package/template/components/ui/button-group.tsx +0 -1
- package/template/docs/consumer-app-pattern.md +0 -39
- package/template/docs/focused-workflow-page-pattern.md +0 -84
- package/template/lib/list-hub-nav.ts +0 -121
- package/template/lib/mock/list-hub-directory.ts +0 -27
- package/template/lib/mock/list-hub-kpi.ts +0 -27
- package/template/lib/page-loading-variant.ts +0 -40
- /package/template/components/{getting-started.tsx → onboarding/getting-started.tsx} +0 -0
- /package/template/components/{nav-documents.tsx → sidebar/nav-documents.tsx} +0 -0
- /package/template/components/{nav-main.tsx → sidebar/nav-main.tsx} +0 -0
- /package/template/components/{nav-secondary.tsx → sidebar/nav-secondary.tsx} +0 -0
- /package/template/components/{nav-user.tsx → sidebar/nav-user.tsx} +0 -0
- /package/template/components/{sidebar-auto-open.tsx → sidebar/sidebar-auto-open.tsx} +0 -0
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Display options for Data list (table / board / calendar / etc.) — shared across view types
|
|
3
|
-
* so hide/show preferences persist when switching views.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type BoardLineCount = 1 | 2 | 3
|
|
7
|
-
|
|
8
|
-
/** Right-hand calendar body: month grid vs week rows (scroll stack uses the same months). */
|
|
9
|
-
export type CalendarMainView = "month" | "week"
|
|
10
|
-
|
|
11
|
-
export interface DataListDisplayOptions {
|
|
12
|
-
/**
|
|
13
|
-
* Board swimlanes: dataset field (table column key) used to split cards into columns.
|
|
14
|
-
* Each hub passes allowed keys via `TablePropertiesDrawer` `boardGroupByColumnOptions`.
|
|
15
|
-
*/
|
|
16
|
-
boardGroupByColumnKey: string
|
|
17
|
-
/** Max lines for primary text blocks on board cards */
|
|
18
|
-
boardLineCount: BoardLineCount
|
|
19
|
-
/** Page title block */
|
|
20
|
-
showViewTitle: boolean
|
|
21
|
-
/** Board: phase column titles + descriptions. Table: column header row. */
|
|
22
|
-
showColumnLabels: boolean
|
|
23
|
-
/** Board: “N cards” under each phase column */
|
|
24
|
-
showBoardColumnCounts: boolean
|
|
25
|
-
boardNewCardAbove: boolean
|
|
26
|
-
/** Toolbar search control (table view) */
|
|
27
|
-
showToolbarSearch: boolean
|
|
28
|
-
/** Calendar: left column — mini month, event list, layout tiles */
|
|
29
|
-
showCalendarSummaryPanel: boolean
|
|
30
|
-
/** Calendar: main scrollable body layout */
|
|
31
|
-
calendarMainView: CalendarMainView
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const DEFAULT_DATA_LIST_DISPLAY_OPTIONS: DataListDisplayOptions = {
|
|
35
|
-
boardGroupByColumnKey: "topic",
|
|
36
|
-
boardLineCount: 2,
|
|
37
|
-
showViewTitle: true,
|
|
38
|
-
showColumnLabels: true,
|
|
39
|
-
showBoardColumnCounts: true,
|
|
40
|
-
boardNewCardAbove: true,
|
|
41
|
-
showToolbarSearch: true,
|
|
42
|
-
showCalendarSummaryPanel: false,
|
|
43
|
-
calendarMainView: "month",
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const CALENDAR_MAIN_VIEW_TILES = [
|
|
47
|
-
{ value: "month" as const, label: "Month", icon: "fa-calendar-days" },
|
|
48
|
-
{ value: "week" as const, label: "Week", icon: "fa-calendar-week" },
|
|
49
|
-
]
|
|
1
|
+
export * from "@exxatdesignux/ui/lib/data-list-display-options"
|
|
@@ -1,104 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Central registry for list-page view types — labels, render kinds, and hub chrome rules.
|
|
3
|
-
*
|
|
4
|
-
* **Add a new view once here** (plus a body in `components/data-views/`). Hubs declare
|
|
5
|
-
* `supportedViewTypes` on `ListPageTemplate`; table components branch with
|
|
6
|
-
* `getDataListViewRenderKind` + `ListPageConnectedViewBody` (never a dashboard fallback).
|
|
7
|
-
*
|
|
8
|
-
* @see `docs/data-views-pattern.md` — "View registry and connected bodies"
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
DATA_LIST_VIEW_TILES,
|
|
13
|
-
type DataListViewType,
|
|
14
|
-
dataListViewAddShortcut,
|
|
15
|
-
dataListViewIcon,
|
|
16
|
-
dataListViewLabel,
|
|
17
|
-
} from "@/lib/data-list-view"
|
|
18
|
-
import {
|
|
19
|
-
getDataListViewRenderKind,
|
|
20
|
-
type DataListViewRenderKind,
|
|
21
|
-
} from "@/lib/data-list-view-surface"
|
|
22
|
-
|
|
23
|
-
export interface DataListViewDefinition {
|
|
24
|
-
value: DataListViewType
|
|
25
|
-
label: string
|
|
26
|
-
icon: string
|
|
27
|
-
renderKind: DataListViewRenderKind
|
|
28
|
-
/** `ListPageTemplate` metrics slot above the views toolbar. */
|
|
29
|
-
hubMetricsStrip: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const DEFINITIONS: DataListViewDefinition[] = DATA_LIST_VIEW_TILES.map(tile => {
|
|
33
|
-
const renderKind = getDataListViewRenderKind(tile.value)
|
|
34
|
-
const hubMetricsStrip = renderKind !== "calendar-with-toolbar" && renderKind !== "dashboard-with-toolbar"
|
|
35
|
-
return {
|
|
36
|
-
value: tile.value,
|
|
37
|
-
label: tile.label,
|
|
38
|
-
icon: tile.icon,
|
|
39
|
-
renderKind,
|
|
40
|
-
hubMetricsStrip,
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
const BY_VALUE = new Map<DataListViewType, DataListViewDefinition>(
|
|
45
|
-
DEFINITIONS.map(d => [d.value, d]),
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
export const DATA_LIST_VIEW_REGISTRY: readonly DataListViewDefinition[] = DEFINITIONS
|
|
49
|
-
|
|
50
|
-
export function dataListViewDefinition(view: DataListViewType): DataListViewDefinition {
|
|
51
|
-
const def = BY_VALUE.get(view)
|
|
52
|
-
if (!def) {
|
|
53
|
-
throw new Error(`Unknown DataListViewType: ${view}`)
|
|
54
|
-
}
|
|
55
|
-
return def
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** `ListPageTemplate` hub KPI strip — false for calendar and dashboard (inline KPIs). */
|
|
59
|
-
export function showsListPageHubMetricsStrip(view: DataListViewType): boolean {
|
|
60
|
-
return dataListViewDefinition(view).hubMetricsStrip
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/** Tiles for Add view + Properties when a hub only supports a subset of views. */
|
|
64
|
-
export function dataListViewTilesForHub(supported: readonly DataListViewType[]) {
|
|
65
|
-
const allowed = new Set(supported)
|
|
66
|
-
return DATA_LIST_VIEW_REGISTRY.filter(d => allowed.has(d.value)).map(d => ({
|
|
67
|
-
type: d.value,
|
|
68
|
-
label: d.label,
|
|
69
|
-
icon: d.icon,
|
|
70
|
-
}))
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** `SelectionTileGrid` options for Properties when a hub supports a subset of views. */
|
|
74
|
-
export function dataListViewSelectionTilesForHub(supported: readonly DataListViewType[]) {
|
|
75
|
-
return dataListViewTilesForHub(supported).map(t => ({
|
|
76
|
-
value: t.type,
|
|
77
|
-
label: t.label,
|
|
78
|
-
icon: t.icon,
|
|
79
|
-
}))
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** View types that expose Table Properties (all registered `DataListViewType` values). */
|
|
83
|
-
export const DATA_LIST_SURFACE_VIEW_TYPES: ReadonlySet<DataListViewType> = new Set(
|
|
84
|
-
DATA_LIST_VIEW_REGISTRY.map(d => d.value),
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
export function isDataListSurfaceViewType(viewType: string): viewType is DataListViewType {
|
|
88
|
-
return DATA_LIST_SURFACE_VIEW_TYPES.has(viewType as DataListViewType)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export function isDataListViewTypeSupported(
|
|
92
|
-
view: DataListViewType,
|
|
93
|
-
supported: readonly DataListViewType[],
|
|
94
|
-
): boolean {
|
|
95
|
-
return supported.includes(view)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export {
|
|
99
|
-
dataListViewAddShortcut,
|
|
100
|
-
dataListViewIcon,
|
|
101
|
-
dataListViewLabel,
|
|
102
|
-
getDataListViewRenderKind,
|
|
103
|
-
type DataListViewRenderKind,
|
|
104
|
-
}
|
|
1
|
+
export * from "@exxatdesignux/ui/lib/data-list-view-registry"
|
|
@@ -1,83 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Maps `DataListViewType` to the UI surface pattern for list pages.
|
|
3
|
-
*
|
|
4
|
-
* **Data:** One `useTableState(fullRows, columns, …)` per tab; **filtered/sorted rows**
|
|
5
|
-
* (`tableState.rows`) are the single source of truth for List, Board, and Dashboard.
|
|
6
|
-
* Table view renders the same state via `DataTable`.
|
|
7
|
-
*
|
|
8
|
-
* | View | Surface |
|
|
9
|
-
* |------------|---------|
|
|
10
|
-
* | `table` | `DataTable` |
|
|
11
|
-
* | `list` | `DataTableToolbar` + list layout |
|
|
12
|
-
* | `board` | `DataTableToolbar` + board / kanban |
|
|
13
|
-
* | `dashboard`| `DataTableToolbar` + KPI (`KeyMetrics`) + optional charts (`ChartCard`, Recharts, etc.) |
|
|
14
|
-
* | `calendar` | `DataTableToolbar` + `ListPageCalendarView` (month grid + day detail) |
|
|
15
|
-
* | `folder` | `DataTableToolbar` + icon grid (macOS-Finder-style) |
|
|
16
|
-
* | `panel` | `DataTableToolbar` + resizable split (list / tree column + detail inspector) |
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import type { DataListViewType } from "@/lib/data-list-view"
|
|
20
|
-
|
|
21
|
-
export { showsListPageHubMetricsStrip } from "@/lib/data-list-view-registry"
|
|
22
|
-
|
|
23
|
-
/** What to render for the active view tab (routing / branching). */
|
|
24
|
-
export type DataListViewRenderKind =
|
|
25
|
-
| "data-table"
|
|
26
|
-
| "list-with-toolbar"
|
|
27
|
-
| "board-with-toolbar"
|
|
28
|
-
| "dashboard-with-toolbar"
|
|
29
|
-
| "calendar-with-toolbar"
|
|
30
|
-
| "folder-with-toolbar"
|
|
31
|
-
| "panel-with-toolbar"
|
|
32
|
-
| "tree-panel-with-toolbar"
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Stable classification for switch/if chains. **Every** `DataListViewType` maps to exactly one kind.
|
|
36
|
-
* Use this so `dashboard` is never mistaken for `board` (a common bug when only `list` is special-cased).
|
|
37
|
-
*/
|
|
38
|
-
export function getDataListViewRenderKind(view: DataListViewType): DataListViewRenderKind {
|
|
39
|
-
switch (view) {
|
|
40
|
-
case "table":
|
|
41
|
-
return "data-table"
|
|
42
|
-
case "list":
|
|
43
|
-
return "list-with-toolbar"
|
|
44
|
-
case "board":
|
|
45
|
-
return "board-with-toolbar"
|
|
46
|
-
case "dashboard":
|
|
47
|
-
return "dashboard-with-toolbar"
|
|
48
|
-
case "calendar":
|
|
49
|
-
return "calendar-with-toolbar"
|
|
50
|
-
case "folder":
|
|
51
|
-
return "folder-with-toolbar"
|
|
52
|
-
case "panel":
|
|
53
|
-
return "panel-with-toolbar"
|
|
54
|
-
case "tree-panel":
|
|
55
|
-
return "tree-panel-with-toolbar"
|
|
56
|
-
default: {
|
|
57
|
-
const _x: never = view
|
|
58
|
-
return _x
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function usesDataTableComponent(view: DataListViewType): boolean {
|
|
64
|
-
return view === "table"
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/** KPI band + optional charts — not the kanban board. */
|
|
68
|
-
export function usesDashboardSurface(view: DataListViewType): boolean {
|
|
69
|
-
return view === "dashboard"
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** Shared toolbar (search, filters, properties); body differs by view. */
|
|
73
|
-
export function usesToolbarWithFilteredRows(view: DataListViewType): boolean {
|
|
74
|
-
return (
|
|
75
|
-
view === "list" ||
|
|
76
|
-
view === "board" ||
|
|
77
|
-
view === "dashboard" ||
|
|
78
|
-
view === "calendar" ||
|
|
79
|
-
view === "folder" ||
|
|
80
|
-
view === "panel" ||
|
|
81
|
-
view === "tree-panel"
|
|
82
|
-
)
|
|
83
|
-
}
|
|
1
|
+
export * from "@exxatdesignux/ui/lib/data-list-view-surface"
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Data list “view type” — shared by Properties drawer, ListPageTemplate tabs, and client state.
|
|
3
|
-
*
|
|
4
|
-
* **Single source of truth** for view labels/icons: use `DATA_LIST_VIEW_TILES` and
|
|
5
|
-
* `dataListViewLabel` / `dataListViewIcon` on every page so Table / List / Board / Dashboard
|
|
6
|
-
* stay consistent and stay wired to the same `useTableState` dataset (see `docs/data-views-pattern.md`).
|
|
7
|
-
*/
|
|
8
|
-
export type DataListViewType =
|
|
9
|
-
| "table"
|
|
10
|
-
| "list"
|
|
11
|
-
| "board"
|
|
12
|
-
| "dashboard"
|
|
13
|
-
| "calendar"
|
|
14
|
-
| "folder"
|
|
15
|
-
| "panel"
|
|
16
|
-
| "tree-panel"
|
|
17
|
-
|
|
18
|
-
export const DATA_LIST_VIEW_TILES: readonly {
|
|
19
|
-
value: DataListViewType
|
|
20
|
-
label: string
|
|
21
|
-
icon: string
|
|
22
|
-
}[] = [
|
|
23
|
-
{ value: "table", icon: "fa-table", label: "Table view" },
|
|
24
|
-
{ value: "list", icon: "fa-list", label: "List view" },
|
|
25
|
-
{ value: "board", icon: "fa-table-columns", label: "Board view" },
|
|
26
|
-
{ value: "dashboard", icon: "fa-chart-mixed", label: "Dashboard view" },
|
|
27
|
-
{ value: "calendar", icon: "fa-calendar-days", label: "Calendar view" },
|
|
28
|
-
{ value: "folder", icon: "fa-grid-2", label: "Folder view" },
|
|
29
|
-
{ value: "panel", icon: "fa-sidebar", label: "List & details" },
|
|
30
|
-
{ value: "tree-panel", icon: "fa-sitemap", label: "Tree & details" },
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
/** User-facing name for tabs, Properties summary rows, and tooltips (not entity-specific). */
|
|
34
|
-
export function dataListViewLabel(view: DataListViewType): string {
|
|
35
|
-
return DATA_LIST_VIEW_TILES.find(t => t.value === view)?.label ?? view
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Font Awesome icon class (no prefix) for tab / toolbar state when view changes. */
|
|
39
|
-
export function dataListViewIcon(view: DataListViewType): string {
|
|
40
|
-
return DATA_LIST_VIEW_TILES.find(t => t.value === view)?.icon ?? "fa-table"
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** Add-view menu hint + `<Shortcut>` keys (1–9). Skipped in inputs via `useShortcut`. */
|
|
44
|
-
export function dataListViewAddShortcut(index: number): string | undefined {
|
|
45
|
-
if (index < 0 || index > 8) return undefined
|
|
46
|
-
return String(index + 1)
|
|
47
|
-
}
|
|
1
|
+
export * from "@exxatdesignux/ui/lib/data-list-view"
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placements **Data** view dashboard — card ids, defaults, and persistence.
|
|
3
|
+
* Split from `data-view-dashboard-charts.tsx` so list-hub code can import layout
|
|
4
|
+
* without pulling Recharts / chart canvas into the main chunk.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
KEY_METRICS_KPI_COUNT_DEFAULT,
|
|
9
|
+
mergeDashboardLayoutGeneric,
|
|
10
|
+
} from "@/lib/dashboard-layout-merge"
|
|
11
|
+
import {
|
|
12
|
+
loadDataViewLayout as loadStoredDataViewLayout,
|
|
13
|
+
saveDataViewLayout as saveStoredDataViewLayout,
|
|
14
|
+
} from "@/lib/data-view-dashboard-storage"
|
|
15
|
+
|
|
16
|
+
export type ChartType =
|
|
17
|
+
| "bar"
|
|
18
|
+
| "horizontal-bar"
|
|
19
|
+
| "pie"
|
|
20
|
+
| "area"
|
|
21
|
+
| "line"
|
|
22
|
+
| "radial"
|
|
23
|
+
| "stacked-bar"
|
|
24
|
+
|
|
25
|
+
export interface ChartTypeOption {
|
|
26
|
+
type: ChartType
|
|
27
|
+
label: string
|
|
28
|
+
icon: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DashboardCardDef {
|
|
32
|
+
id: string
|
|
33
|
+
title: string
|
|
34
|
+
description: string
|
|
35
|
+
defaultSpan: 1 | 2
|
|
36
|
+
defaultChartType: ChartType
|
|
37
|
+
chartTypes: ChartTypeOption[]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Virtual “card” for the KPI strip — reorderable with charts in edit mode */
|
|
41
|
+
export const KEY_METRICS_CARD_ID = "key-metrics"
|
|
42
|
+
|
|
43
|
+
export const ALL_DASHBOARD_CARDS: DashboardCardDef[] = [
|
|
44
|
+
{
|
|
45
|
+
id: KEY_METRICS_CARD_ID,
|
|
46
|
+
title: "Key metrics",
|
|
47
|
+
description: "Summary KPIs for filtered placements",
|
|
48
|
+
defaultSpan: 1,
|
|
49
|
+
defaultChartType: "bar",
|
|
50
|
+
chartTypes: [],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "status-pipeline",
|
|
54
|
+
title: "Status Pipeline",
|
|
55
|
+
description: "Where placements are in the workflow",
|
|
56
|
+
defaultSpan: 1,
|
|
57
|
+
defaultChartType: "bar",
|
|
58
|
+
chartTypes: [
|
|
59
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
60
|
+
{ type: "horizontal-bar", label: "Horizontal Bar", icon: "fa-light fa-chart-bar fa-rotate-90" },
|
|
61
|
+
{ type: "pie", label: "Donut", icon: "fa-light fa-chart-pie" },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "program-mix",
|
|
66
|
+
title: "Placements by Program",
|
|
67
|
+
description: "Distribution across active programs",
|
|
68
|
+
defaultSpan: 1,
|
|
69
|
+
defaultChartType: "pie",
|
|
70
|
+
chartTypes: [
|
|
71
|
+
{ type: "pie", label: "Donut", icon: "fa-light fa-chart-pie" },
|
|
72
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
73
|
+
{ type: "horizontal-bar", label: "Horizontal Bar", icon: "fa-light fa-chart-bar fa-rotate-90" },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "compliance-status",
|
|
78
|
+
title: "Compliance Status",
|
|
79
|
+
description: "Document readiness for upcoming placements",
|
|
80
|
+
defaultSpan: 1,
|
|
81
|
+
defaultChartType: "horizontal-bar",
|
|
82
|
+
chartTypes: [
|
|
83
|
+
{ type: "horizontal-bar", label: "Horizontal Bar", icon: "fa-light fa-chart-bar fa-rotate-90" },
|
|
84
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
85
|
+
{ type: "pie", label: "Donut", icon: "fa-light fa-chart-pie" },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "readiness-overview",
|
|
90
|
+
title: "Student Readiness",
|
|
91
|
+
description: "How prepared students are for their placements",
|
|
92
|
+
defaultSpan: 1,
|
|
93
|
+
defaultChartType: "bar",
|
|
94
|
+
chartTypes: [
|
|
95
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
96
|
+
{ type: "horizontal-bar", label: "Horizontal Bar", icon: "fa-light fa-chart-bar fa-rotate-90" },
|
|
97
|
+
{ type: "pie", label: "Donut", icon: "fa-light fa-chart-pie" },
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "progress-tracker",
|
|
102
|
+
title: "Ongoing Progress",
|
|
103
|
+
description: "How far along each ongoing placement is",
|
|
104
|
+
defaultSpan: 2,
|
|
105
|
+
defaultChartType: "stacked-bar",
|
|
106
|
+
chartTypes: [
|
|
107
|
+
{ type: "stacked-bar", label: "Stacked Bar", icon: "fa-light fa-layer-group" },
|
|
108
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "site-utilisation",
|
|
113
|
+
title: "Site Utilisation",
|
|
114
|
+
description: "Which clinical sites have the most placements",
|
|
115
|
+
defaultSpan: 1,
|
|
116
|
+
defaultChartType: "horizontal-bar",
|
|
117
|
+
chartTypes: [
|
|
118
|
+
{ type: "horizontal-bar", label: "Horizontal Bar", icon: "fa-light fa-chart-bar fa-rotate-90" },
|
|
119
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
120
|
+
{ type: "pie", label: "Donut", icon: "fa-light fa-chart-pie" },
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "completion-outcomes",
|
|
125
|
+
title: "Completion Outcomes",
|
|
126
|
+
description: "Pass rate and average ratings for completed placements",
|
|
127
|
+
defaultSpan: 1,
|
|
128
|
+
defaultChartType: "radial",
|
|
129
|
+
chartTypes: [
|
|
130
|
+
{ type: "radial", label: "Radial", icon: "fa-light fa-circle-notch" },
|
|
131
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "upcoming-timeline",
|
|
136
|
+
title: "Upcoming Start Dates",
|
|
137
|
+
description: "New placements starting in the next 8 weeks",
|
|
138
|
+
defaultSpan: 2,
|
|
139
|
+
defaultChartType: "area",
|
|
140
|
+
chartTypes: [
|
|
141
|
+
{ type: "area", label: "Area", icon: "fa-light fa-chart-area" },
|
|
142
|
+
{ type: "line", label: "Line", icon: "fa-light fa-chart-line" },
|
|
143
|
+
{ type: "bar", label: "Bar", icon: "fa-light fa-chart-bar" },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
]
|
|
147
|
+
|
|
148
|
+
export const DEFAULT_VISIBLE_CARDS = ALL_DASHBOARD_CARDS.map(c => c.id)
|
|
149
|
+
export const DEFAULT_SPANS: Record<string, 1 | 2> = Object.fromEntries(
|
|
150
|
+
ALL_DASHBOARD_CARDS.map(c => [c.id, c.defaultSpan]),
|
|
151
|
+
)
|
|
152
|
+
export const DEFAULT_CHART_TYPES: Record<string, ChartType> = Object.fromEntries(
|
|
153
|
+
ALL_DASHBOARD_CARDS.map(c => [c.id, c.defaultChartType]),
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
export interface DashboardLayout {
|
|
157
|
+
visible: string[]
|
|
158
|
+
order: string[]
|
|
159
|
+
spans?: Record<string, 1 | 2>
|
|
160
|
+
chartTypes?: Record<string, ChartType>
|
|
161
|
+
keyMetricsKpiCount?: number
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function loadDashboardLayout(): DashboardLayout | null {
|
|
165
|
+
const v = loadStoredDataViewLayout("placements")
|
|
166
|
+
if (!v) return null
|
|
167
|
+
return {
|
|
168
|
+
visible: v.visible,
|
|
169
|
+
order: v.order,
|
|
170
|
+
spans: v.spans,
|
|
171
|
+
chartTypes: v.chartTypes as Record<string, ChartType> | undefined,
|
|
172
|
+
keyMetricsKpiCount: v.keyMetricsKpiCount,
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function mergeDashboardLayout(saved: DashboardLayout | null): DashboardLayout {
|
|
177
|
+
const defaults = {
|
|
178
|
+
visible: [...DEFAULT_VISIBLE_CARDS],
|
|
179
|
+
order: ALL_DASHBOARD_CARDS.map(c => c.id),
|
|
180
|
+
spans: { ...DEFAULT_SPANS },
|
|
181
|
+
chartTypes: { ...DEFAULT_CHART_TYPES } as Record<string, string>,
|
|
182
|
+
keyMetricsKpiCount: KEY_METRICS_KPI_COUNT_DEFAULT,
|
|
183
|
+
}
|
|
184
|
+
const ids = ALL_DASHBOARD_CARDS.map(c => c.id)
|
|
185
|
+
const m = mergeDashboardLayoutGeneric(saved, defaults, ids)
|
|
186
|
+
return {
|
|
187
|
+
visible: m.visible,
|
|
188
|
+
order: m.order,
|
|
189
|
+
spans: m.spans as Record<string, 1 | 2>,
|
|
190
|
+
chartTypes: m.chartTypes as Record<string, ChartType>,
|
|
191
|
+
keyMetricsKpiCount: m.keyMetricsKpiCount,
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function saveDashboardLayout(layout: DashboardLayout) {
|
|
196
|
+
saveStoredDataViewLayout("placements", {
|
|
197
|
+
visible: layout.visible,
|
|
198
|
+
order: layout.order,
|
|
199
|
+
spans: layout.spans,
|
|
200
|
+
chartTypes: layout.chartTypes as Record<string, string> | undefined,
|
|
201
|
+
keyMetricsKpiCount: layout.keyMetricsKpiCount,
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function applyVisibleReorder(
|
|
206
|
+
fullOrder: string[],
|
|
207
|
+
visible: Set<string>,
|
|
208
|
+
newVisibleOrder: string[],
|
|
209
|
+
): string[] {
|
|
210
|
+
let vi = 0
|
|
211
|
+
return fullOrder.map(id => {
|
|
212
|
+
if (!visible.has(id)) return id
|
|
213
|
+
return newVisibleOrder[vi++]!
|
|
214
|
+
})
|
|
215
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Centralized localStorage for **Data** view dashboard canvas (
|
|
2
|
+
* Centralized localStorage for **Data** view dashboard canvas (Placements, Team, Compliance).
|
|
3
3
|
* Single bundle key; per-scope slices. Migrates legacy per-hub keys when a scope is missing.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -9,16 +9,14 @@ const BUNDLE_KEY = "exxat-ds:data-view-dashboards:v1"
|
|
|
9
9
|
|
|
10
10
|
/** Legacy keys (pre-bundle) — read when that scope is absent from the bundle. */
|
|
11
11
|
const LEGACY_KEYS: Record<DataViewScope, string> = {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
placements: "exxat-dashboard-cards",
|
|
13
|
+
team: "exxat-team-dashboard-cards",
|
|
14
|
+
compliance: "exxat-compliance-dashboard-cards",
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
const LEGACY_SCOPES = ["placements", "team", "compliance"] as const
|
|
17
|
+
export type DataViewScope = "placements" | "team" | "compliance"
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type LayoutBundle = Partial<Record<DataViewScope | (typeof LEGACY_SCOPES)[number], DashboardLayoutV1>>
|
|
19
|
+
type LayoutBundle = Partial<Record<DataViewScope, DashboardLayoutV1>>
|
|
22
20
|
|
|
23
21
|
function parseLayout(raw: unknown): DashboardLayoutV1 | null {
|
|
24
22
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null
|
|
@@ -53,52 +51,51 @@ function readBundleRaw(): LayoutBundle {
|
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
function
|
|
54
|
+
function writeBundle(bundle: LayoutBundle) {
|
|
57
55
|
if (typeof window === "undefined") return
|
|
58
56
|
try {
|
|
59
57
|
localStorage.setItem(BUNDLE_KEY, JSON.stringify(bundle))
|
|
60
58
|
} catch {
|
|
61
|
-
/* quota
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function migrateLegacyScope(scope: DataViewScope): DashboardLayoutV1 | null {
|
|
66
|
-
const legacyKey = LEGACY_KEYS[scope]
|
|
67
|
-
if (typeof window === "undefined") return null
|
|
68
|
-
try {
|
|
69
|
-
const raw = localStorage.getItem(legacyKey)
|
|
70
|
-
if (!raw) return null
|
|
71
|
-
return parseLayout(JSON.parse(raw))
|
|
72
|
-
} catch {
|
|
73
|
-
return null
|
|
59
|
+
/* ignore quota */
|
|
74
60
|
}
|
|
75
61
|
}
|
|
76
62
|
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Merge any missing scopes from legacy keys into the bundle (one-time per scope per session edge cases OK).
|
|
65
|
+
*/
|
|
66
|
+
function ensureBundleWithLegacy(): LayoutBundle {
|
|
67
|
+
let bundle = readBundleRaw()
|
|
68
|
+
let changed = false
|
|
69
|
+
for (const scope of ["placements", "team", "compliance"] as const) {
|
|
70
|
+
if (bundle[scope]) continue
|
|
71
|
+
try {
|
|
72
|
+
const raw = localStorage.getItem(LEGACY_KEYS[scope])
|
|
73
|
+
if (!raw) continue
|
|
74
|
+
const layout = parseLayout(JSON.parse(raw) as unknown)
|
|
75
|
+
if (layout) {
|
|
76
|
+
bundle = { ...bundle, [scope]: layout }
|
|
77
|
+
changed = true
|
|
78
|
+
}
|
|
79
|
+
} catch {
|
|
80
|
+
/* ignore */
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
|
-
|
|
87
|
-
if (fromPlacementsKey) return { ...bundle, "list-hub": fromPlacementsKey }
|
|
83
|
+
if (changed) writeBundle(bundle)
|
|
88
84
|
return bundle
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
/**
|
|
92
|
-
* Load persisted layout for a hub Data view.
|
|
88
|
+
* Load persisted layout for a hub (Placements / Team / Compliance Data view).
|
|
93
89
|
*/
|
|
94
90
|
export function loadDataViewLayout(scope: DataViewScope): DashboardLayoutV1 | null {
|
|
95
|
-
const bundle =
|
|
96
|
-
return bundle[scope] ??
|
|
91
|
+
const bundle = ensureBundleWithLegacy()
|
|
92
|
+
return bundle[scope] ?? null
|
|
97
93
|
}
|
|
98
94
|
|
|
99
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Save layout for one hub; updates the shared bundle atomically.
|
|
97
|
+
*/
|
|
100
98
|
export function saveDataViewLayout(scope: DataViewScope, layout: DashboardLayoutV1) {
|
|
101
|
-
const bundle =
|
|
102
|
-
bundle[scope]
|
|
103
|
-
writeBundleRaw(bundle)
|
|
99
|
+
const bundle = ensureBundleWithLegacy()
|
|
100
|
+
writeBundle({ ...bundle, [scope]: layout })
|
|
104
101
|
}
|
package/template/lib/dev-log.ts
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Logs only in development. Use for mock flows (export, submit) instead of raw console.log.
|
|
3
|
-
*/
|
|
4
|
-
export function devLog(...args: unknown[]): void {
|
|
5
|
-
if (process.env.NODE_ENV === "development") {
|
|
6
|
-
console.log(...args)
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
export * from "@exxatdesignux/ui/lib/dev-log"
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* True when focus is in a field where global shortcuts should not fire.
|
|
3
|
-
*/
|
|
4
|
-
export function isEditableTarget(target: EventTarget | null): boolean {
|
|
5
|
-
const el = target as HTMLElement | null
|
|
6
|
-
if (!el) return false
|
|
7
|
-
if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement || el instanceof HTMLSelectElement)
|
|
8
|
-
return true
|
|
9
|
-
return el.getAttribute?.("contenteditable") === "true"
|
|
10
|
-
}
|
|
1
|
+
export { isEditableTarget } from "@exxatdesignux/ui/lib/editable-target"
|