@dcs-tech/ui 0.2.0 → 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/README.md +31 -0
- package/dist/ChartImageMenu-gvNAYVkY.js +2938 -0
- package/dist/Charts-COljjy0x.js +1759 -0
- package/dist/SummaryChart-D4jcOv-K.js +31 -0
- package/dist/SummaryImage-BSbatHym.js +19 -0
- package/dist/SummarySeeAll-vnaL3pdy.js +97 -0
- package/dist/defaults-BbLB8QmD.js +709 -0
- package/dist/exportContext-CAX8VPrP.js +243 -0
- package/dist/exportEngine-C4n1MiOw.js +891 -0
- package/dist/fuseSearch-vLQR3O5a.js +37 -0
- package/dist/index.js +19289 -9411
- package/dist/style.css +1 -1
- package/dist/summaryChartData-CU_W5ocv.js +82 -0
- package/dist/types/published/dcs-ui/src/index.d.ts +0 -28
- package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -33
- package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -12
- package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -21
- package/dist/types/shared-logic/src/report/canvas.d.ts +0 -55
- package/dist/types/shared-logic/src/report/conditions.d.ts +0 -14
- package/dist/types/shared-logic/src/report/constants.d.ts +0 -39
- package/dist/types/shared-logic/src/report/dataset.d.ts +0 -26
- package/dist/types/shared-logic/src/report/edit.d.ts +0 -62
- package/dist/types/shared-logic/src/report/fields.d.ts +0 -51
- package/dist/types/shared-logic/src/report/format.d.ts +0 -22
- package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -30
- package/dist/types/shared-logic/src/report/layout.d.ts +1 -55
- package/dist/types/shared-logic/src/report/metrics.d.ts +0 -45
- package/dist/types/shared-logic/src/report/migrate.d.ts +0 -60
- package/dist/types/shared-logic/src/report/paginate.d.ts +0 -32
- package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -21
- package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -27
- package/dist/types/shared-logic/src/report/resolve.d.ts +0 -29
- package/dist/types/shared-logic/src/report/scope.d.ts +0 -28
- package/dist/types/shared-logic/src/report/storage.d.ts +0 -76
- package/dist/types/shared-logic/src/report/validate.d.ts +0 -18
- package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/chipinput.logic.d.ts +0 -12
- package/dist/types/shared-logic/src/ui/collapsible.logic.d.ts +0 -7
- package/dist/types/shared-logic/src/ui/colorScheme.d.ts +0 -14
- package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -11
- package/dist/types/shared-logic/src/ui/datePicker.logic.d.ts +136 -0
- package/dist/types/shared-logic/src/ui/editableTable.logic.d.ts +0 -27
- package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +2 -14
- package/dist/types/shared-logic/src/ui/form.logic.d.ts +0 -8
- package/dist/types/shared-logic/src/ui/index.d.ts +3 -29
- package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -60
- package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/popover.logic.d.ts +22 -20
- package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/quickAddGrid.logic.d.ts +183 -0
- package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -14
- package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -34
- package/dist/types/shared-logic/src/ui/tableSummary.logic.d.ts +0 -19
- package/dist/types/shared-logic/src/ui/timeField.logic.d.ts +26 -0
- package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -8
- package/dist/types/shared-types/src/report/bands.d.ts +0 -20
- package/dist/types/shared-types/src/report/blocks.d.ts +0 -59
- package/dist/types/shared-types/src/report/conditions.d.ts +0 -13
- package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
- package/dist/types/shared-types/src/report/document.d.ts +0 -80
- package/dist/types/shared-types/src/report/primitives.d.ts +0 -40
- package/dist/types/shared-types/src/report/registry.d.ts +0 -46
- package/dist/types/shared-types/src/report/storage.d.ts +0 -31
- package/dist/types/shared-types/src/report/template.d.ts +0 -60
- package/dist/types/shared-types/src/ui/button.types.d.ts +0 -11
- package/dist/types/shared-types/src/ui/checkbox.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/chipinput.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/collapsible.types.d.ts +0 -18
- package/dist/types/shared-types/src/ui/common.types.d.ts +0 -11
- package/dist/types/shared-types/src/ui/control.types.d.ts +0 -97
- package/dist/types/shared-types/src/ui/datePicker.types.d.ts +46 -0
- package/dist/types/shared-types/src/ui/editableTable.types.d.ts +0 -79
- package/dist/types/shared-types/src/ui/field.types.d.ts +4 -124
- package/dist/types/shared-types/src/ui/fieldWrapper.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/fields.types.d.ts +0 -45
- package/dist/types/shared-types/src/ui/form.types.d.ts +0 -30
- package/dist/types/shared-types/src/ui/index.d.ts +1 -16
- package/dist/types/shared-types/src/ui/input.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/keyboard.types.d.ts +2 -109
- package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -22
- package/dist/types/shared-types/src/ui/radio.types.d.ts +0 -6
- package/dist/types/shared-types/src/ui/select.types.d.ts +0 -41
- package/dist/types/shared-types/src/ui/suggest.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/switch.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/table.types.d.ts +0 -59
- package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -25
- package/dist/types/shared-types/src/ui/typography.types.d.ts +0 -4
- package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -9
- package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -19
- package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -14
- package/dist/types/shared-web-ui/src/Badge/Badge.d.ts +0 -11
- package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -52
- package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -16
- package/dist/types/shared-web-ui/src/Charts/AnchoredMenu.d.ts +17 -0
- package/dist/types/shared-web-ui/src/Charts/BarList.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/CalendarHeatmap.d.ts +17 -0
- package/dist/types/shared-web-ui/src/Charts/Chart.d.ts +20 -0
- package/dist/types/shared-web-ui/src/Charts/ChartIcon.d.ts +5 -0
- package/dist/types/shared-web-ui/src/Charts/ChartImageMenu.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Charts/ChartTable.d.ts +8 -0
- package/dist/types/shared-web-ui/src/Charts/ChartTooltip.d.ts +44 -0
- package/dist/types/shared-web-ui/src/Charts/ChartView.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/ColumnChart.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/Donut.d.ts +14 -0
- package/dist/types/shared-web-ui/src/Charts/Funnel.d.ts +10 -0
- package/dist/types/shared-web-ui/src/Charts/Gauge.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/Legend.d.ts +6 -0
- package/dist/types/shared-web-ui/src/Charts/LineChart.d.ts +13 -0
- package/dist/types/shared-web-ui/src/Charts/NumberTrend.d.ts +21 -0
- package/dist/types/shared-web-ui/src/Charts/Progress.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/StackedBar.d.ts +11 -0
- package/dist/types/shared-web-ui/src/Charts/Treemap.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/chartData.d.ts +69 -0
- package/dist/types/shared-web-ui/src/Charts/chartImage.d.ts +121 -0
- package/dist/types/shared-web-ui/src/Charts/geometry.d.ts +178 -0
- package/dist/types/shared-web-ui/src/Charts/index.d.ts +32 -0
- package/dist/types/shared-web-ui/src/Charts/labels.d.ts +46 -0
- package/dist/types/shared-web-ui/src/Charts/menuPlacement.d.ts +25 -0
- package/dist/types/shared-web-ui/src/Charts/palette.d.ts +81 -0
- package/dist/types/shared-web-ui/src/Charts/parts.d.ts +24 -0
- package/dist/types/shared-web-ui/src/Charts/pointer.d.ts +41 -0
- package/dist/types/shared-web-ui/src/Charts/types.d.ts +51 -0
- package/dist/types/shared-web-ui/src/Charts/ui.d.ts +3 -0
- package/dist/types/shared-web-ui/src/Charts/useBoxSize.d.ts +6 -0
- package/dist/types/shared-web-ui/src/Charts/useLegendFit.d.ts +1 -0
- package/dist/types/shared-web-ui/src/Collapsible/CollapsibleItem.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -15
- package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -27
- package/dist/types/shared-web-ui/src/DataTable/DataTable.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/DisplayPopover.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/HeaderMenu.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/ManageModal.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/SingleRowView.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/SortModal.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/StatusRow.d.ts +49 -0
- package/dist/types/shared-web-ui/src/DataTable/TableColumnModal.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/TableControls.d.ts +48 -0
- package/dist/types/shared-web-ui/src/DataTable/TablePagination.d.ts +38 -0
- package/dist/types/shared-web-ui/src/DataTable/TableScrollStrip.d.ts +2 -0
- package/dist/types/shared-web-ui/src/DataTable/TableToolbar.d.ts +69 -0
- package/dist/types/shared-web-ui/src/DataTable/TableView.d.ts +61 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/TableToast.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/bulkActions.d.ts +23 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/CardFieldsEditor.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/CardView.d.ts +50 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/cardFields.d.ts +32 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/rowParts.d.ts +38 -0
- package/dist/types/shared-web-ui/src/DataTable/data/useServerData.d.ts +28 -0
- package/dist/types/shared-web-ui/src/DataTable/defaults.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/detail/BuiltInDetail.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/detail/DetailHost.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportPopover.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportPreviewModal.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportSettingsModal.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportTemplateCards.d.ts +19 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportContext.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportEngine.d.ts +77 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportRows.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/export/templateDisplay.d.ts +7 -0
- package/dist/types/shared-web-ui/src/DataTable/export/templateOptions.d.ts +6 -0
- package/dist/types/shared-web-ui/src/DataTable/export/useTableExport.d.ts +53 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterConditionRow.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterGroup.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterModal.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterRow.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/columnFilterModel.d.ts +29 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/filterEngine.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/filterRowModel.d.ts +28 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/quickFilterMatch.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/GroupUi.d.ts +36 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/groupModel.d.ts +82 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/useGrouping.d.ts +39 -0
- package/dist/types/shared-web-ui/src/DataTable/host.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/index.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/shortcuts.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
- package/dist/types/shared-web-ui/src/DataTable/labels.d.ts +618 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/LayoutSwitcher.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/layouts.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/scrollArea.d.ts +2 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/useFillHeight.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/RowMenu.d.ts +56 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/buildRowMenu.d.ts +35 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/clipboard.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/valueFilter.d.ts +15 -0
- package/dist/types/shared-web-ui/src/DataTable/motion/useRowMotion.d.ts +32 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/adapters.d.ts +6 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/reconcile.d.ts +64 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useColumnPersistence.d.ts +51 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useManagePrefs.d.ts +23 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/pinning.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/rows/RowActions.d.ts +15 -0
- package/dist/types/shared-web-ui/src/DataTable/rows/rowPress.d.ts +35 -0
- package/dist/types/shared-web-ui/src/DataTable/sharing/Sharing.d.ts +21 -0
- package/dist/types/shared-web-ui/src/DataTable/split/SplitView.d.ts +29 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/ManageSummaryCards.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryChart.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryControls.d.ts +33 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryImage.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummarySeeAll.d.ts +17 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/TableSummary.d.ts +34 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryCatalogue.d.ts +64 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryChartData.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryModel.d.ts +152 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryWidth.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/useTableSummary.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/types.d.ts +1145 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/AutoHeight.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DateRangePicker.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/ReactModal.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/ui.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/useDataChangeTracker.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/useTable.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/columnOrder.d.ts +1 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/diff.d.ts +5 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/fileActions.d.ts +19 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/virtual/useVirtualLines.d.ts +27 -0
- package/dist/types/shared-web-ui/src/DatePicker/Calendar.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DatePicker/DatePicker.d.ts +5 -0
- package/dist/types/shared-web-ui/src/DatePicker/TimeField.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DatePicker/index.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DatePicker/useOneMonthPane.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -45
- package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -36
- package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +24 -24
- package/dist/types/shared-web-ui/src/EditableTable/EditableTable.d.ts +0 -5
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableCell.d.ts +0 -18
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -11
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -11
- package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -32
- package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -15
- package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -9
- package/dist/types/shared-web-ui/src/FieldContext/useField.d.ts +0 -27
- package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -23
- package/dist/types/shared-web-ui/src/FieldContext/useFormKeyboard.d.ts +0 -3
- package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -15
- package/dist/types/shared-web-ui/src/Floating/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/Floating/layers.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Floating/scrollLock.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Floating/useFloatingLayer.d.ts +20 -0
- package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +6 -25
- package/dist/types/shared-web-ui/src/Popover/floatingPosition.d.ts +17 -0
- package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -8
- package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -11
- package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -13
- package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
- package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -22
- package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -8
- package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -1
- package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -12
- package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -30
- package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -39
- package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -24
- package/dist/types/shared-web-ui/src/Scroll/ScrollRule.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Scroll/ScrollStrip.d.ts +9 -0
- package/dist/types/shared-web-ui/src/Scroll/index.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Scroll/labels.d.ts +5 -0
- package/dist/types/shared-web-ui/src/Scroll/scrollActivity.d.ts +14 -0
- package/dist/types/shared-web-ui/src/Scroll/ui.d.ts +1 -0
- package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -31
- package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -15
- package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -43
- package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -14
- package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -9
- package/dist/types/shared-web-ui/src/Toast/toast.types.d.ts +0 -13
- package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -16
- package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -9
- package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -14
- package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -41
- package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -8
- package/dist/types/shared-web-ui/src/index.d.ts +5 -0
- package/dist/ui-DJFwpPdX.js +4997 -0
- package/package.json +9 -7
|
@@ -4,8 +4,6 @@ import type { FieldDefinition, ErrorObject, TouchedObject } from './fields.types
|
|
|
4
4
|
import type { ControlSize } from './control.types';
|
|
5
5
|
import type { FieldKeyboardConfig } from './keyboard.types';
|
|
6
6
|
export type FormLayout = 'vertical' | 'horizontal' | 'grid' | 'inline';
|
|
7
|
-
/** @see ControlSize — a Form's size is the density every field inside it
|
|
8
|
-
inherits, so it has to span the same six steps the fields do. */
|
|
9
7
|
export type FormSize = ControlSize;
|
|
10
8
|
export type FormVariant = 'default' | 'card' | 'outlined' | 'elevated';
|
|
11
9
|
export interface FormSection<T = any> {
|
|
@@ -24,20 +22,13 @@ export interface FormSection<T = any> {
|
|
|
24
22
|
style?: CSSProperties;
|
|
25
23
|
}
|
|
26
24
|
export interface FormValidation<T = any> {
|
|
27
|
-
/** Validation schema (e.g. Yup schema) — passed to validate function */
|
|
28
25
|
schema?: any;
|
|
29
26
|
validateOnChange?: boolean;
|
|
30
27
|
validateOnBlur?: boolean;
|
|
31
28
|
validateOnSubmit?: boolean;
|
|
32
29
|
debounceMs?: number;
|
|
33
|
-
/** Custom validation function (runs after schema validation) */
|
|
34
30
|
customValidator?: (data: T) => Promise<ErrorObject> | ErrorObject;
|
|
35
31
|
showErrorsAfterTouched?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* App-provided validation function.
|
|
38
|
-
* Called with (schema, data) — should return { valid, errors }.
|
|
39
|
-
* Decouples the form from any specific validation library (Yup, Zod, etc).
|
|
40
|
-
*/
|
|
41
32
|
validate?: (schema: any, data: T) => Promise<{
|
|
42
33
|
valid: boolean;
|
|
43
34
|
errors: ErrorObject;
|
|
@@ -87,9 +78,7 @@ export interface FormHeader {
|
|
|
87
78
|
subtitle?: string | ReactNode;
|
|
88
79
|
icon?: ReactNode;
|
|
89
80
|
divider?: boolean;
|
|
90
|
-
/** Navigation link — app provides onNavigate callback to handle it */
|
|
91
81
|
navLink?: string;
|
|
92
|
-
/** Icon for the nav link button */
|
|
93
82
|
navIcon?: ReactNode;
|
|
94
83
|
actions?: ReactNode;
|
|
95
84
|
customHeader?: ReactNode;
|
|
@@ -102,12 +91,6 @@ export interface FormFooter {
|
|
|
102
91
|
className?: string;
|
|
103
92
|
}
|
|
104
93
|
export interface FormCallbacks<T = any> {
|
|
105
|
-
/**
|
|
106
|
-
* The generic here used to sit on the *implementer* — `<R = void>(...) => R | Promise<R>`
|
|
107
|
-
* — which meant the caller chose `R` and no ordinary callback could satisfy
|
|
108
|
-
* it: `onSubmit={(data) => {...}}` did not type-check without a cast. The
|
|
109
|
-
* return value is awaited and discarded, so the generic bought nothing.
|
|
110
|
-
*/
|
|
111
94
|
onSubmit?: (data: T, methods: FormMethods<T>, event?: FormEvent<HTMLFormElement>) => unknown;
|
|
112
95
|
onReset?: (methods: FormMethods<T>) => void;
|
|
113
96
|
onChange?: (data: T, changedField?: string, methods?: FormMethods<T>) => void;
|
|
@@ -115,9 +98,7 @@ export interface FormCallbacks<T = any> {
|
|
|
115
98
|
onError?: (errors: ErrorObject, methods: FormMethods<T>) => void;
|
|
116
99
|
onValidationSuccess?: (methods: FormMethods<T>) => void;
|
|
117
100
|
onUnhandledError?: (error: Error, methods: FormMethods<T>) => void;
|
|
118
|
-
/** Toast callback — replaces direct ReactToast import. Called with (type, message). */
|
|
119
101
|
onToast?: (type: 'success' | 'error' | 'info' | 'warning', message: string) => void;
|
|
120
|
-
/** Navigation callback — replaces direct useNavigate import. Called with (path). */
|
|
121
102
|
onNavigate?: (path: string) => void;
|
|
122
103
|
}
|
|
123
104
|
export interface FormProps<T = any> extends FormCallbacks<T> {
|
|
@@ -144,13 +125,6 @@ export interface FormProps<T = any> extends FormCallbacks<T> {
|
|
|
144
125
|
loadingMessage?: string;
|
|
145
126
|
disabled?: boolean;
|
|
146
127
|
readonly?: boolean;
|
|
147
|
-
/**
|
|
148
|
-
* The keyboard policy for every field in this form.
|
|
149
|
-
*
|
|
150
|
-
* `{ enter: 'next' }` gives traditional ERP entry — Enter walks the fields
|
|
151
|
-
* and, past the last one, submits; Ctrl+Enter submits from anywhere. The
|
|
152
|
-
* default stays `'submit'`, which is what a `<form>` does on the web.
|
|
153
|
-
*/
|
|
154
128
|
keyboard?: FieldKeyboardConfig;
|
|
155
129
|
formRef?: MutableRefObject<FormMethods<T> | null>;
|
|
156
130
|
children?: ReactNode | ((data: T, methods: FormMethods<T>) => ReactNode);
|
|
@@ -164,13 +138,9 @@ export interface FormProps<T = any> extends FormCallbacks<T> {
|
|
|
164
138
|
requiredIndicator?: ReactNode;
|
|
165
139
|
enableNestedFields?: boolean;
|
|
166
140
|
debug?: boolean;
|
|
167
|
-
/** Render prop for loading overlay — replaces direct FullPageLoading import */
|
|
168
141
|
renderLoading?: (isOpen: boolean, message?: string) => ReactNode;
|
|
169
|
-
/** Render prop for authorize wrapping — passed through to Fields */
|
|
170
142
|
renderAuthorize?: (authorize: any, children: ReactNode) => ReactNode;
|
|
171
|
-
/** Render prop for tooltip wrapping — passed through to Fields */
|
|
172
143
|
renderTooltip?: (tooltipProps: any, children: ReactNode) => ReactNode;
|
|
173
|
-
/** Component registry — passed through to Fields */
|
|
174
144
|
componentRegistry?: any;
|
|
175
145
|
}
|
|
176
146
|
export interface FormState<T = any> {
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The UI half of `shared-types`, on its own — a privacy boundary, like its twin in
|
|
3
|
-
* `shared-logic/src/ui/index.ts`.
|
|
4
|
-
*
|
|
5
|
-
* The package barrel (`shared-types/src/index.ts`) re-exports this folder alongside the
|
|
6
|
-
* folders describing this business's own records. Anything importing the barrel pulls all of
|
|
7
|
-
* it into the TypeScript program, and `tsc` emits
|
|
8
|
-
* declarations for a whole program, so the domain then ships wherever those declarations do.
|
|
9
|
-
* That is how `@dcs-tech/ui@0.1.0` reached the public registry carrying them (audited
|
|
10
|
-
* 2026-09-28).
|
|
11
|
-
*
|
|
12
|
-
* `navigation.types` and `common.types` are included because the app-shell components are
|
|
13
|
-
* published and typed against them; neither describes any business record.
|
|
14
|
-
*
|
|
15
|
-
* ONLY `./ui/*` belongs here. Never add a domain module, and never re-export the parent barrel.
|
|
16
|
-
*/
|
|
17
1
|
export * from './control.types';
|
|
18
2
|
export * from './tooltip.types';
|
|
19
3
|
export * from './typography.types';
|
|
@@ -25,6 +9,7 @@ export * from './checkbox.types';
|
|
|
25
9
|
export * from './radio.types';
|
|
26
10
|
export * from './switch.types';
|
|
27
11
|
export * from './input.types';
|
|
12
|
+
export * from './datePicker.types';
|
|
28
13
|
export * from './select.types';
|
|
29
14
|
export * from './suggest.types';
|
|
30
15
|
export * from './collapsible.types';
|
|
@@ -21,10 +21,6 @@ export interface IconConfig {
|
|
|
21
21
|
end?: ReactNode;
|
|
22
22
|
onClick?: (type: 'start' | 'end') => void;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* @see FieldCellContext — the one grid-cell contract, in `control.types`.
|
|
26
|
-
* Kept as a name because Select imports it and the published barrel exports it.
|
|
27
|
-
*/
|
|
28
24
|
export type InputEditableTableCellProps = FieldCellContext;
|
|
29
25
|
export interface InputProps extends TextFieldProps<string | number, HTMLInputElement | HTMLTextAreaElement, ChangeEvent<HTMLInputElement | HTMLTextAreaElement>> {
|
|
30
26
|
type?: InputType;
|
|
@@ -1,59 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
* The keyboard contract — one truth table for every field, in every container.
|
|
3
|
-
*
|
|
4
|
-
* Key handling used to be **field-first**: each field ran its own `handleKeyDown`
|
|
5
|
-
* and *might* forward what was left to the container. Three incompatible rules
|
|
6
|
-
* had grown out of that:
|
|
7
|
-
*
|
|
8
|
-
* - Input had no key logic at all, so the grid could only use keys an input
|
|
9
|
-
* ignores — which is why the editable table navigated on **Ctrl/Alt+Arrow**
|
|
10
|
-
* instead of the plain arrows every native ERP grid uses.
|
|
11
|
-
* - Suggest swallowed ArrowUp/ArrowDown/Enter/Escape unconditionally, open or
|
|
12
|
-
* closed, so a closed suggest cell ate the grid's arrows.
|
|
13
|
-
* - Select kept an ad-hoc allow-list of keys to forward *and* a boolean return
|
|
14
|
-
* from its hook — two arbitration mechanisms inside one component.
|
|
15
|
-
*
|
|
16
|
-
* Which key reached the grid therefore depended on which widget a cell happened
|
|
17
|
-
* to hold, and no truth table existed to test against.
|
|
18
|
-
*
|
|
19
|
-
* This inverts it. The **container arbitrates**; a field only reports what it
|
|
20
|
-
* currently needs, and one pure resolver decides. A field author never writes
|
|
21
|
-
* key handling — they spread the handlers `useField` returns.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* What kind of keyboard behaviour a field has. Not the same as the component:
|
|
25
|
-
* a number Input and a text Input are one component and two widgets, because
|
|
26
|
-
* they answer differently on the arrow keys.
|
|
27
|
-
*/
|
|
28
|
-
export type FieldWidget = 'text' | 'number' | 'textarea' | 'select' | 'suggest' | 'toggle'
|
|
29
|
-
/** A cell that ACTS instead of holding a value: Space presses it, Enter walks on. */
|
|
30
|
-
| 'button' | 'custom';
|
|
31
|
-
/** What the container is being asked to do. */
|
|
1
|
+
export type FieldWidget = 'text' | 'number' | 'textarea' | 'select' | 'suggest' | 'date' | 'toggle' | 'button' | 'custom';
|
|
32
2
|
export type NavAction = 'next' | 'prev' | 'up' | 'down' | 'left' | 'right' | 'firstCell' | 'lastCell' | 'firstCellOfTable' | 'lastCellOfTable' | 'pageUp' | 'pageDown' | 'newRow' | 'copyRow' | 'deleteRow' | 'edit' | 'commit' | 'revert' | 'clear' | 'submit' | 'exitGrid' | 'none';
|
|
33
|
-
/** Which half of the cell's two-mode state is live. @see FIELD_KEYBOARD_NAVIGATION.md §2 */
|
|
34
3
|
export type GridMode = 'navigate' | 'edit';
|
|
35
|
-
/**
|
|
36
|
-
* The live field state the resolver needs. Everything here is knowable without
|
|
37
|
-
* touching the DOM at the point of decision, which is what keeps the resolver
|
|
38
|
-
* pure and its truth table runnable under plain Node.
|
|
39
|
-
*/
|
|
40
4
|
export interface FieldKeyState {
|
|
41
5
|
mode: GridMode;
|
|
42
6
|
isOpen: boolean;
|
|
43
|
-
/** A popup with nothing in it must not swallow Enter. */
|
|
44
7
|
hasOptions?: boolean;
|
|
45
8
|
caretAtStart?: boolean;
|
|
46
9
|
caretAtEnd?: boolean;
|
|
47
10
|
hasSelection?: boolean;
|
|
48
11
|
isEmpty?: boolean;
|
|
49
|
-
/** Multi-select keeps its popup open on Enter where single-select closes it. */
|
|
50
12
|
multi?: boolean;
|
|
51
13
|
}
|
|
52
|
-
/**
|
|
53
|
-
* A `React.KeyboardEvent` satisfies this structurally — the same trick
|
|
54
|
-
* `FieldChangeEvent` uses. The resolver takes the minimum so it can live in
|
|
55
|
-
* shared-logic with no React or DOM import, and stay mechanically portable.
|
|
56
|
-
*/
|
|
57
14
|
export interface KeyEventLike {
|
|
58
15
|
key: string;
|
|
59
16
|
ctrlKey?: boolean;
|
|
@@ -61,21 +18,7 @@ export interface KeyEventLike {
|
|
|
61
18
|
altKey?: boolean;
|
|
62
19
|
metaKey?: boolean;
|
|
63
20
|
}
|
|
64
|
-
|
|
65
|
-
export type FieldKeyAction = 'native' | 'open' | 'close' | 'highlightNext' | 'highlightPrev' | 'highlightFirst' | 'highlightLast' | 'pick' | 'toggleOption' | 'beginEdit' | 'clear' | 'stepUp' | 'stepDown'
|
|
66
|
-
/**
|
|
67
|
-
* Put a line break in a multi-line cell (Alt+Enter, the Excel/Sheets convention).
|
|
68
|
-
*
|
|
69
|
-
* It needs an action of its own because a grid has no spare Enter: plain Enter moves to the
|
|
70
|
-
* next cell, Shift+Enter to the previous one, Ctrl+Enter adds a row. Alt+Enter is the one
|
|
71
|
-
* combination left, and the browser inserts nothing for it on its own — so unlike every
|
|
72
|
-
* other textual key this cannot resolve to `'native'`.
|
|
73
|
-
*/
|
|
74
|
-
| 'insertNewline';
|
|
75
|
-
/**
|
|
76
|
-
* Exactly one owner per key, always. A resolution that named neither owner is
|
|
77
|
-
* how keys used to go missing between a field and its container.
|
|
78
|
-
*/
|
|
21
|
+
export type FieldKeyAction = 'native' | 'open' | 'close' | 'highlightNext' | 'highlightPrev' | 'highlightFirst' | 'highlightLast' | 'highlightLeft' | 'highlightRight' | 'highlightPrevPage' | 'highlightNextPage' | 'pick' | 'toggleOption' | 'beginEdit' | 'clear' | 'stepUp' | 'stepDown' | 'insertNewline';
|
|
79
22
|
export type KeyResolution = {
|
|
80
23
|
owner: 'field';
|
|
81
24
|
action: FieldKeyAction;
|
|
@@ -85,69 +28,19 @@ export type KeyResolution = {
|
|
|
85
28
|
action: NavAction;
|
|
86
29
|
preventDefault: boolean;
|
|
87
30
|
};
|
|
88
|
-
/**
|
|
89
|
-
* How a field or container behaves on the keyboard.
|
|
90
|
-
*
|
|
91
|
-
* This is the **Interaction axis** of `BaseFieldProps`, so it lands on all seven
|
|
92
|
-
* fields at once rather than the three that happen to have `onKeyDown` today.
|
|
93
|
-
* A container sets it once through `FieldContext` and every field beneath obeys;
|
|
94
|
-
* resolution is the same own prop → provider → default order as `size`.
|
|
95
|
-
*/
|
|
96
31
|
export interface FieldKeyboardConfig {
|
|
97
|
-
/**
|
|
98
|
-
* `'field'` — an ordinary standalone field; the browser's behaviour, plus
|
|
99
|
-
* whatever `enter` says.
|
|
100
|
-
* `'grid'` — the two-mode navigate/edit model a cell needs.
|
|
101
|
-
*/
|
|
102
32
|
mode?: 'field' | 'grid';
|
|
103
|
-
/**
|
|
104
|
-
* What Enter does when no popup is open.
|
|
105
|
-
*
|
|
106
|
-
* The library default is `'submit'`, because a `<form>` submitting on Enter
|
|
107
|
-
* is the web standard and this package is published. Our apps set `'next'`
|
|
108
|
-
* once on the provider: traditional ERP data entry moves on Enter and
|
|
109
|
-
* submits on Ctrl+Enter or the action button.
|
|
110
|
-
*/
|
|
111
33
|
enter?: 'next' | 'submit' | 'native' | 'none';
|
|
112
|
-
/** Arrow keys in navigate mode. `'container'` moves between cells. */
|
|
113
34
|
arrows?: 'container' | 'native';
|
|
114
|
-
/**
|
|
115
|
-
* Up/Down while editing. `'cell'` commits and moves row — Sheets' "enter
|
|
116
|
-
* mode", which is what makes column-down entry fast. `'caret'` leaves them
|
|
117
|
-
* to the browser; a textarea forces this regardless.
|
|
118
|
-
*/
|
|
119
35
|
arrowsInEdit?: 'cell' | 'caret';
|
|
120
|
-
/** Navigate + a printable key. `'replace'` wipes the old value; `'append'` keeps it. */
|
|
121
36
|
typeBehaviour?: 'replace' | 'append';
|
|
122
|
-
/**
|
|
123
|
-
* Navigate → edit **without** wiping the value — the "alter" key, as
|
|
124
|
-
* against type-to-replace. Default `'Insert'`.
|
|
125
|
-
*
|
|
126
|
-
* A binding string rather than a fixed key so any table or form overrides it
|
|
127
|
-
* for its own audience: `Insert` is absent from Mac keyboards and most
|
|
128
|
-
* compact laptops, and those consumers pass `'F2'` or `'alt+enter'`.
|
|
129
|
-
*/
|
|
130
37
|
editKey?: string;
|
|
131
|
-
/**
|
|
132
|
-
* When a popup opens. `'focus'` is right for a standalone field and wrong in
|
|
133
|
-
* a grid, where arrowing across a row would pop a list in every cell.
|
|
134
|
-
*/
|
|
135
38
|
openOn?: 'focus' | 'type' | 'manual';
|
|
136
|
-
/** After picking from a popup: stay in the cell (default), or move on like Enter. */
|
|
137
39
|
advanceOnSelect?: boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Whether Up/Down step a number's value. `'none'` everywhere by default —
|
|
140
|
-
* in a grid the arrows belong to navigation, and a key that silently edits
|
|
141
|
-
* a number while the user believes they are moving is a data-integrity bug,
|
|
142
|
-
* not a convenience.
|
|
143
|
-
*/
|
|
144
40
|
stepKeys?: 'none' | 'arrows' | 'ctrlArrows';
|
|
145
|
-
/** Overrides, keyed by binding string: `{ 'ctrl+enter': 'newRow' }`. */
|
|
146
41
|
bindings?: Record<string, NavAction>;
|
|
147
|
-
/** Supplied by the container, never by a consumer. */
|
|
148
42
|
onNavigate?: (action: NavAction, event: KeyEventLike) => void;
|
|
149
43
|
}
|
|
150
|
-
/** Everything `resolveFieldKey` needs, and nothing it does not. */
|
|
151
44
|
export interface KeyResolutionContext {
|
|
152
45
|
widget: FieldWidget;
|
|
153
46
|
state: FieldKeyState;
|
|
@@ -1,35 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* One entry in a navigation structure — a sidebar row, a breadcrumb, a palette result, a tab.
|
|
4
|
-
*
|
|
5
|
-
* ONE shape on purpose. An app builds its route registry once and feeds Sidebar, Breadcrumbs
|
|
6
|
-
* and CommandPalette from the same array, instead of three parallel structures that drift.
|
|
7
|
-
* Nothing here knows where the items came from, which is exactly what makes a registry that
|
|
8
|
-
* changes at runtime — per-business reports generated from `businesses × templates` — work
|
|
9
|
-
* with no special support: it is just a different array.
|
|
10
|
-
*/
|
|
11
2
|
export interface NavItem {
|
|
12
|
-
/** Stable identity. Used for the active match and as the React key. */
|
|
13
3
|
id: string;
|
|
14
4
|
label: ReactNode;
|
|
15
5
|
icon?: ReactNode;
|
|
16
|
-
/** Trailing marker — a count, a status dot. */
|
|
17
6
|
badge?: ReactNode;
|
|
18
|
-
/** Extra terms for search surfaces (CommandPalette). Not rendered. */
|
|
19
7
|
keywords?: string;
|
|
20
8
|
disabled?: boolean;
|
|
21
|
-
/** Plain link target. */
|
|
22
9
|
href?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Extra props spread onto the rendered element — how a router link gets its target,
|
|
25
|
-
* e.g. `{ to: '/reports/monthly/sales' }` with `as={NavLink}`. Router-agnostic on purpose.
|
|
26
|
-
*/
|
|
27
10
|
props?: Record<string, unknown>;
|
|
28
|
-
/** Nested entries. Depth is not assumed anywhere. */
|
|
29
11
|
children?: NavItem[];
|
|
30
|
-
/**
|
|
31
|
-
* Render as a non-interactive section heading rather than a link. Its `children` still
|
|
32
|
-
* render beneath it.
|
|
33
|
-
*/
|
|
34
12
|
group?: boolean;
|
|
35
13
|
}
|
|
@@ -19,13 +19,7 @@ export interface RadioGroupContextValue {
|
|
|
19
19
|
export interface RadioProps extends ToggleFieldProps<string | number, HTMLInputElement, ChangeEvent<HTMLInputElement>> {
|
|
20
20
|
checked?: boolean;
|
|
21
21
|
defaultChecked?: boolean;
|
|
22
|
-
/** Required here, unlike every other field: a radio without a value cannot
|
|
23
|
-
report which option it is. */
|
|
24
22
|
value: string | number;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `hint` — the shared name for this slot, which is what
|
|
27
|
-
* FieldWrapper renders. Kept until the components migrate (step 0c).
|
|
28
|
-
*/
|
|
29
23
|
helperText?: string | ReactNode;
|
|
30
24
|
radioClassName?: string;
|
|
31
25
|
checkedIcon?: ReactNode;
|
|
@@ -60,15 +60,6 @@ export interface VirtualScrollConfig {
|
|
|
60
60
|
overscan?: number;
|
|
61
61
|
maxHeight?: number;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
* @deprecated Superseded by `FieldKeyboardConfig`, which every field now takes.
|
|
65
|
-
*
|
|
66
|
-
* All six were per-component restatements of decisions the shared resolver
|
|
67
|
-
* makes: `preventEnter`/`preventEnterToOpen`/`selectOnEnter` are what Enter does
|
|
68
|
-
* given the popup state, `closeOnEscape`/`closeOnTab` are what Escape and Tab
|
|
69
|
-
* do, and `navigateWithArrows` is law L1. They are accepted and ignored so
|
|
70
|
-
* existing call sites keep compiling; nothing reads them.
|
|
71
|
-
*/
|
|
72
63
|
export interface KeyboardConfig {
|
|
73
64
|
preventEnter?: boolean;
|
|
74
65
|
preventEnterToOpen?: boolean;
|
|
@@ -96,10 +87,6 @@ export interface LoadingConfig {
|
|
|
96
87
|
loadingText?: string;
|
|
97
88
|
renderLoadingState?: () => ReactNode;
|
|
98
89
|
}
|
|
99
|
-
/**
|
|
100
|
-
* @deprecated Superseded by `FieldA11yProps` in `field.types`, which every field
|
|
101
|
-
* now gets from `BaseFieldProps`. Kept because the published barrel exports it.
|
|
102
|
-
*/
|
|
103
90
|
export interface SelectAccessibilityConfig {
|
|
104
91
|
'aria-label'?: string;
|
|
105
92
|
'aria-labelledby'?: string;
|
|
@@ -107,19 +94,9 @@ export interface SelectAccessibilityConfig {
|
|
|
107
94
|
'aria-required'?: boolean;
|
|
108
95
|
'aria-invalid'?: boolean;
|
|
109
96
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Select has no DOM event to forward, so it emits the shared shape directly.
|
|
112
|
-
*
|
|
113
|
-
* It used to carry `target.attributes.cellindex.value`, mimicking a DOM node so
|
|
114
|
-
* a grid could read the cell back off the event. Nothing ever read it — the
|
|
115
|
-
* grid tracks focus through `onCellFocus` — and its presence meant a handler
|
|
116
|
-
* typed for any other field could not be passed to a Select. Removing it is
|
|
117
|
-
* what makes one `(e: FieldChangeEvent) => void` work across the whole family.
|
|
118
|
-
*/
|
|
119
97
|
export type SelectEvent = FieldChangeEvent<any>;
|
|
120
98
|
export interface SelectProps extends TextFieldProps<any, HTMLDivElement, SelectEvent>, FieldPopupProps {
|
|
121
99
|
options: (string | number | SelectOption)[];
|
|
122
|
-
/** Required, unlike the base: a Select that cannot report a choice is inert. */
|
|
123
100
|
onChange: (event: SelectEvent) => void;
|
|
124
101
|
defaultText?: string;
|
|
125
102
|
autoFocusSearch?: boolean;
|
|
@@ -130,15 +107,6 @@ export interface SelectProps extends TextFieldProps<any, HTMLDivElement, SelectE
|
|
|
130
107
|
reorder?: boolean | ReorderConfig;
|
|
131
108
|
group?: boolean | GroupConfig;
|
|
132
109
|
virtualScroll?: boolean | VirtualScrollConfig;
|
|
133
|
-
/**
|
|
134
|
-
* The shared policy, intersected with Select's own six booleans.
|
|
135
|
-
*
|
|
136
|
-
* `KeyboardConfig`'s members are all expressible in `FieldKeyboardConfig`
|
|
137
|
-
* — `preventEnter`, `selectOnEnter` and `navigateWithArrows` are exactly the
|
|
138
|
-
* per-widget rules the shared resolver owns — so this intersection is the
|
|
139
|
-
* transition state, not the destination. Step 0c folds the six in and
|
|
140
|
-
* deletes `KeyboardConfig`.
|
|
141
|
-
*/
|
|
142
110
|
keyboard?: FieldKeyboardConfig & KeyboardConfig;
|
|
143
111
|
position?: DropdownPosition | PositionConfig;
|
|
144
112
|
emptyState?: EmptyStateConfig;
|
|
@@ -159,9 +127,7 @@ export interface SelectProps extends TextFieldProps<any, HTMLDivElement, SelectE
|
|
|
159
127
|
renderOption?: (option: SelectOption, isSelected: boolean, isHighlighted: boolean) => ReactNode;
|
|
160
128
|
renderSelectedValue?: (value: any | any[], options: SelectOption[]) => ReactNode;
|
|
161
129
|
renderChip?: (option: SelectOption, onRemove: () => void) => ReactNode;
|
|
162
|
-
/** @deprecated Use `onOpenChange`, which reports *why* — the grid needs the reason. */
|
|
163
130
|
onOpen?: () => void;
|
|
164
|
-
/** @deprecated Use `onOpenChange`. */
|
|
165
131
|
onClose?: () => void;
|
|
166
132
|
onSearch?: (searchTerm: string) => void;
|
|
167
133
|
onSelect?: (value: any) => void;
|
|
@@ -194,17 +160,10 @@ export interface UseSelectReturn {
|
|
|
194
160
|
handleToggle: () => void;
|
|
195
161
|
handleSelect: (option: SelectOption) => void;
|
|
196
162
|
handleMultiSelect: (option: SelectOption) => void;
|
|
197
|
-
/**
|
|
198
|
-
* Highlight primitives, driven by `resolveFieldKey` through `useField`.
|
|
199
|
-
* They replace a `handleKeyDown` that returned a boolean telling the
|
|
200
|
-
* parent whether to also handle the key — the second of this
|
|
201
|
-
* component's two arbitration mechanisms.
|
|
202
|
-
*/
|
|
203
163
|
highlightNext: () => void;
|
|
204
164
|
highlightPrev: () => void;
|
|
205
165
|
highlightFirst: () => void;
|
|
206
166
|
highlightLast: () => void;
|
|
207
|
-
/** @returns whether an option was actually picked. */
|
|
208
167
|
pickHighlighted: () => boolean;
|
|
209
168
|
handleSearchChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
210
169
|
handleClickOutside: (event: MouseEvent) => void;
|
|
@@ -47,9 +47,7 @@ export interface SuggestionItemProps {
|
|
|
47
47
|
export interface SuggestionListProps<T = any> {
|
|
48
48
|
suggestions: T[];
|
|
49
49
|
renderKeys: RenderKey[];
|
|
50
|
-
/** Drives the shared popup list's size variables. Defaults to `small`. */
|
|
51
50
|
size?: SuggestSize;
|
|
52
|
-
/** Decides the popup's shape — joined to a boxed field, or a floating panel. */
|
|
53
51
|
variant?: SuggestVariant;
|
|
54
52
|
onSelect: (item: T) => void;
|
|
55
53
|
highlightedIndex: number;
|
|
@@ -72,9 +70,7 @@ export interface SuggestionListProps<T = any> {
|
|
|
72
70
|
export interface SuggestProps extends TextFieldProps<string, HTMLInputElement, ChangeEvent<HTMLInputElement>>, FieldPopupProps {
|
|
73
71
|
data: any[];
|
|
74
72
|
config: SuggestionConfig;
|
|
75
|
-
/** Required, unlike the base: a Suggest with no value has nothing to search on. */
|
|
76
73
|
value: string;
|
|
77
|
-
/** Required, unlike the base: a Suggest that cannot report typing is inert. */
|
|
78
74
|
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
79
75
|
onSelect?: (item: any, inputName?: string) => void;
|
|
80
76
|
onClear?: () => void;
|
|
@@ -119,16 +115,10 @@ export interface UseSuggestReturn {
|
|
|
119
115
|
loading: boolean;
|
|
120
116
|
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
121
117
|
handleSelect: (item: any, index: number) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Highlight primitives, driven by `resolveFieldKey` through `useField`.
|
|
124
|
-
* These replace the hook's old `handleKeyDown`, which claimed the arrow keys
|
|
125
|
-
* whether or not the list was open.
|
|
126
|
-
*/
|
|
127
118
|
highlightNext: () => void;
|
|
128
119
|
highlightPrev: () => void;
|
|
129
120
|
highlightFirst: () => void;
|
|
130
121
|
highlightLast: () => void;
|
|
131
|
-
/** @returns whether an item was actually picked. */
|
|
132
122
|
pickHighlighted: () => boolean;
|
|
133
123
|
handleFocus: () => void;
|
|
134
124
|
handleBlur: () => void;
|
|
@@ -8,10 +8,6 @@ export type SwitchColor = FieldColor;
|
|
|
8
8
|
export interface SwitchProps extends ToggleFieldProps<string | number, HTMLInputElement, ChangeEvent<HTMLInputElement>> {
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
defaultChecked?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use `hint` — the shared name for this slot, which is what
|
|
13
|
-
* FieldWrapper renders. Kept until the components migrate (step 0c).
|
|
14
|
-
*/
|
|
15
11
|
helperText?: string | ReactNode;
|
|
16
12
|
onText?: string;
|
|
17
13
|
offText?: string;
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The table vocabulary, shared.
|
|
4
|
-
*
|
|
5
|
-
* These are the client `Table`'s own column and summary props
|
|
6
|
-
* (`apps/web/client/src/Utils/CustomElements/Table/types.ts`), lifted into the
|
|
7
|
-
* shared layer so the editable table can speak the same language. A developer
|
|
8
|
-
* who has configured a report table already knows every name here — `width`,
|
|
9
|
-
* `minWidth`, `align`, `sticky`, `summable`, `summary`, `cell`, `cellStyle` —
|
|
10
|
-
* and a summary written for a report table works on an editable one unchanged.
|
|
11
|
-
*
|
|
12
|
-
* The rule the editable table follows: **everything is a prop, and where the
|
|
13
|
-
* Table already has a prop for something, use that exact prop.**
|
|
14
|
-
*/
|
|
15
2
|
export type ColumnAlign = 'left' | 'center' | 'right';
|
|
16
3
|
export type ColumnSticky = 'left' | 'right';
|
|
17
4
|
export interface CellStyle {
|
|
@@ -31,11 +18,6 @@ export interface ColumnSummaryConfig<T = any> {
|
|
|
31
18
|
filter?: (row: T) => boolean;
|
|
32
19
|
formatter?: (value: number, rows: T[]) => string;
|
|
33
20
|
}
|
|
34
|
-
/**
|
|
35
|
-
* What a summary `compute` receives. Shaped like the Table's context so a
|
|
36
|
-
* summary written there runs here; the members an editable table has no
|
|
37
|
-
* equivalent for (selection, filters) are optional.
|
|
38
|
-
*/
|
|
39
21
|
export interface SummaryContext {
|
|
40
22
|
allRows: any[];
|
|
41
23
|
visibleColumns: string[];
|
|
@@ -43,7 +25,6 @@ export interface SummaryContext {
|
|
|
43
25
|
filters?: unknown[];
|
|
44
26
|
context?: Record<string, any>;
|
|
45
27
|
}
|
|
46
|
-
/** The Table names this `LicenseConfig`; renamed here only to avoid a barrel collision. */
|
|
47
28
|
export interface SummaryLicenseConfig {
|
|
48
29
|
tab: string;
|
|
49
30
|
subtab: string;
|
|
@@ -52,12 +33,6 @@ export interface SummaryLicenseConfig {
|
|
|
52
33
|
export interface SummaryItem<T = any> {
|
|
53
34
|
id: string;
|
|
54
35
|
label: string;
|
|
55
|
-
/**
|
|
56
|
-
* `resolved` carries every column total and every earlier item, keyed by id —
|
|
57
|
-
* so *average cost = total cost / total qty* reads the column totals rather
|
|
58
|
-
* than recomputing them. Column totals use the Table's id scheme,
|
|
59
|
-
* `col_<column>_<type>`, unless the column's summary names its own `id`.
|
|
60
|
-
*/
|
|
61
36
|
compute: (data: T[], context: SummaryContext, resolved: Record<string, number | string>) => string | number;
|
|
62
37
|
format?: SummaryFormat;
|
|
63
38
|
decimals?: number;
|
|
@@ -81,7 +56,6 @@ export interface SummaryGroupKey {
|
|
|
81
56
|
formatter?: (value: any) => string;
|
|
82
57
|
bold?: boolean;
|
|
83
58
|
color?: string;
|
|
84
|
-
/** Force-hide. Left unset, a key the group's `compute` omitted is hidden automatically. */
|
|
85
59
|
hidden?: boolean;
|
|
86
60
|
}
|
|
87
61
|
export interface SummaryGroup<T = any> {
|
|
@@ -121,71 +95,38 @@ export interface ResolvedSummaryGroup {
|
|
|
121
95
|
hidden: boolean;
|
|
122
96
|
license?: SummaryLicenseConfig;
|
|
123
97
|
}
|
|
124
|
-
/** One column's total, for the footer row. */
|
|
125
98
|
export interface ResolvedColumnTotal {
|
|
126
|
-
/** The column's `name`. */
|
|
127
99
|
column: string;
|
|
128
|
-
/** Table-compatible id — `summary.id` or `col_<column>_<type>`. */
|
|
129
100
|
id: string;
|
|
130
101
|
type: SummaryAggregation;
|
|
131
102
|
label: string;
|
|
132
103
|
rawValue: number;
|
|
133
104
|
value: string;
|
|
134
105
|
}
|
|
135
|
-
/**
|
|
136
|
-
* The layout and display half of a table column — the Table's props.
|
|
137
|
-
*
|
|
138
|
-
* On an editable table these sit beside the field definition (`field`, `name`,
|
|
139
|
-
* `fprop`…). Every one is optional: when a column names none of them,
|
|
140
|
-
* `resolveColumnLayout` supplies a default by widget, so an unconfigured column
|
|
141
|
-
* still lays out well. **Prop → default**, the same order as `size` and
|
|
142
|
-
* `keyboard`.
|
|
143
|
-
*/
|
|
144
106
|
export interface TableColumnDisplayProps<T = any> {
|
|
145
|
-
/** Fixed width in px. A column with a width is fixed; one without shares the remaining space. */
|
|
146
107
|
width?: number;
|
|
147
|
-
/** Floor in px before the table scrolls sideways. Ignored for a fixed column, whose floor is its width. */
|
|
148
108
|
minWidth?: number;
|
|
149
109
|
align?: ColumnAlign;
|
|
150
|
-
/** Pin while scrolling sideways. A sticky column is always fixed-width, so offsets stay exact. */
|
|
151
110
|
sticky?: ColumnSticky;
|
|
152
|
-
/** Shorthand for `summary: { type: 'sum' }`. */
|
|
153
111
|
summable?: boolean;
|
|
154
112
|
summary?: ColumnSummaryConfig<T>;
|
|
155
|
-
/**
|
|
156
|
-
* Render the value as text instead of a field. For derived values — T.Cost —
|
|
157
|
-
* that are results, not inputs. Keyboard navigation skips a read-only cell.
|
|
158
|
-
*/
|
|
159
113
|
readOnly?: boolean;
|
|
160
|
-
/** Custom read-only content. Implies `readOnly`. */
|
|
161
114
|
cell?: (value: any, row: T, index: number) => ReactNode;
|
|
162
115
|
cellStyle?: (value: any, row: T) => CellStyle | undefined;
|
|
163
116
|
}
|
|
164
|
-
/** What `resolveColumnLayout` hands the renderer — every decision made, nothing optional left to guess. */
|
|
165
117
|
export interface ResolvedColumnLayout {
|
|
166
|
-
/** Present for fixed columns; absent for flexible ones, which share the remainder. */
|
|
167
118
|
width?: number;
|
|
168
119
|
minWidth: number;
|
|
169
120
|
align: ColumnAlign;
|
|
170
121
|
fixed: boolean;
|
|
171
122
|
sticky?: ColumnSticky;
|
|
172
|
-
/** px from the pinned edge, cumulative across pinned columns on the same side. */
|
|
173
123
|
stickyOffset?: number;
|
|
174
|
-
/** The innermost pinned column on its side — draws the divider where scrolling content passes under. */
|
|
175
124
|
stickyEdge?: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Flexible columns only: this column's share of the space the fixed columns leave,
|
|
178
|
-
* in proportion to its floor. Proportional rather than equal on purpose — an equal
|
|
179
|
-
* split can hand a 300px-floor column less than its floor while a 50px one gets
|
|
180
|
-
* spare, even though the table as a whole is above its minimum width.
|
|
181
|
-
*/
|
|
182
125
|
flexShare?: number;
|
|
183
126
|
}
|
|
184
127
|
export interface ResolvedTableLayout {
|
|
185
128
|
columns: ResolvedColumnLayout[];
|
|
186
|
-
/** Σ of every column's floor. The table scrolls sideways only below this. */
|
|
187
129
|
minTableWidth: number;
|
|
188
|
-
/** Σ of the fixed columns' widths — what a flexible column's share is taken from the rest of. */
|
|
189
130
|
fixedWidthTotal: number;
|
|
190
131
|
hasSticky: boolean;
|
|
191
132
|
}
|
|
@@ -1,39 +1,18 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
2
|
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
-
/**
|
|
4
|
-
* Where a field's tooltip is triggered from: a help icon beside the label
|
|
5
|
-
* (default — never fires while someone is typing), or the control itself.
|
|
6
|
-
*/
|
|
7
3
|
export type TooltipTrigger = 'icon' | 'control';
|
|
8
|
-
/**
|
|
9
|
-
* What a hover tooltip is positioned against.
|
|
10
|
-
*
|
|
11
|
-
* `auto` (default) anchors to the trigger's box, except when that box is wider
|
|
12
|
-
* than the tooltip itself — a full-width line of text, a table row — where
|
|
13
|
-
* centring on the element puts the tip nowhere near the cursor. Those anchor to
|
|
14
|
-
* the pointer instead.
|
|
15
|
-
*
|
|
16
|
-
* Keyboard focus always anchors to the element: there is no cursor involved.
|
|
17
|
-
*/
|
|
18
4
|
export type TooltipAnchorTo = 'auto' | 'element' | 'pointer';
|
|
19
5
|
export interface TooltipConfig {
|
|
20
6
|
content: ReactNode;
|
|
21
7
|
placement?: TooltipPlacement;
|
|
22
8
|
anchorTo?: TooltipAnchorTo;
|
|
23
|
-
/** ms before showing. Default 500 — 0 while another tooltip is still warm. */
|
|
24
9
|
delay?: number;
|
|
25
|
-
/** ms before hiding. Default 100. */
|
|
26
10
|
closeDelay?: number;
|
|
27
11
|
disabled?: boolean;
|
|
28
12
|
className?: string;
|
|
29
13
|
}
|
|
30
|
-
/**
|
|
31
|
-
* What every `tooltip` prop accepts: bare content for the common case
|
|
32
|
-
* (`tooltip="Delete row"`), or a config object when placement/delay matter.
|
|
33
|
-
*/
|
|
34
14
|
export type TooltipProp = ReactNode | TooltipConfig;
|
|
35
15
|
export interface TooltipProps extends TooltipConfig {
|
|
36
|
-
/** A single element — Tooltip clones it rather than wrapping it in a div. */
|
|
37
16
|
children: ReactElement;
|
|
38
17
|
id?: string;
|
|
39
18
|
}
|
|
@@ -44,7 +23,6 @@ export interface TooltipRect {
|
|
|
44
23
|
height: number;
|
|
45
24
|
}
|
|
46
25
|
export interface TooltipPositionInput {
|
|
47
|
-
/** Trigger box in viewport coordinates. */
|
|
48
26
|
anchor: TooltipRect;
|
|
49
27
|
tooltip: {
|
|
50
28
|
width: number;
|
|
@@ -55,14 +33,11 @@ export interface TooltipPositionInput {
|
|
|
55
33
|
height: number;
|
|
56
34
|
};
|
|
57
35
|
placement: TooltipPlacement;
|
|
58
|
-
/** Gap between trigger and tooltip. */
|
|
59
36
|
offset: number;
|
|
60
|
-
/** Minimum distance kept from the viewport edge. */
|
|
61
37
|
margin?: number;
|
|
62
38
|
}
|
|
63
39
|
export interface TooltipPosition {
|
|
64
40
|
top: number;
|
|
65
41
|
left: number;
|
|
66
|
-
/** Placement actually used — may differ from the request after flipping. */
|
|
67
42
|
placement: TooltipPlacement;
|
|
68
43
|
}
|