@dcs-tech/ui 0.2.0 → 0.4.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 +32 -6
- package/dist/ChartImageMenu-HILSfn5A.js +1115 -0
- package/dist/ChartView-Cehrcr05.js +1703 -0
- package/dist/SummaryChart-y27q_BBN.js +29 -0
- package/dist/SummaryImage-DDNEEu_K.js +18 -0
- package/dist/SummarySeeAll-0dX-_LFe.js +101 -0
- package/dist/defaults-DL745PK1.js +708 -0
- package/dist/exportContext-CdpsOzE8.js +235 -0
- package/dist/exportEngine-DL-jEXFU.js +890 -0
- package/dist/geometry-CG2nOEnw.js +1796 -0
- package/dist/index.js +23238 -15993
- package/dist/scrollArea-CkPGDYH2.js +210 -0
- package/dist/style.css +1 -1
- package/dist/summaryChartData-Djo73zb8.js +81 -0
- package/dist/types/components/AppBar/AppBar.d.ts +16 -0
- package/dist/types/components/ArrowKeyFocus/useArrowKeyFocus.d.ts +10 -0
- package/dist/types/components/Avatar/Avatar.d.ts +22 -0
- package/dist/types/{shared-web-ui/src → components}/Badge/Badge.d.ts +0 -11
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/types/{shared-web-ui/src → components}/Button/Button.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroup.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroupContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/index.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +17 -0
- package/dist/types/components/Charts/AnchoredMenu.d.ts +17 -0
- package/dist/types/components/Charts/BarList.d.ts +12 -0
- package/dist/types/components/Charts/CalendarHeatmap.d.ts +17 -0
- package/dist/types/components/Charts/Chart.d.ts +20 -0
- package/dist/types/components/Charts/ChartIcon.d.ts +5 -0
- package/dist/types/components/Charts/ChartImageMenu.d.ts +4 -0
- package/dist/types/components/Charts/ChartTable.d.ts +8 -0
- package/dist/types/components/Charts/ChartTooltip.d.ts +58 -0
- package/dist/types/components/Charts/ChartView.d.ts +15 -0
- package/dist/types/components/Charts/ColumnChart.d.ts +15 -0
- package/dist/types/components/Charts/Donut.d.ts +14 -0
- package/dist/types/components/Charts/Funnel.d.ts +10 -0
- package/dist/types/components/Charts/Gauge.d.ts +15 -0
- package/dist/types/components/Charts/Legend.d.ts +6 -0
- package/dist/types/components/Charts/LineChart.d.ts +13 -0
- package/dist/types/components/Charts/NumberTrend.d.ts +21 -0
- package/dist/types/components/Charts/Progress.d.ts +12 -0
- package/dist/types/components/Charts/StackedBar.d.ts +11 -0
- package/dist/types/components/Charts/Treemap.d.ts +12 -0
- package/dist/types/components/Charts/chartData.d.ts +69 -0
- package/dist/types/components/Charts/chartImage.d.ts +121 -0
- package/dist/types/components/Charts/geometry.d.ts +180 -0
- package/dist/types/components/Charts/index.d.ts +32 -0
- package/dist/types/components/Charts/labels.d.ts +46 -0
- package/dist/types/components/Charts/menuPlacement.d.ts +25 -0
- package/dist/types/components/Charts/palette.d.ts +81 -0
- package/dist/types/components/Charts/parts.d.ts +25 -0
- package/dist/types/components/Charts/pointer.d.ts +41 -0
- package/dist/types/components/Charts/types.d.ts +51 -0
- package/dist/types/components/Charts/ui.d.ts +3 -0
- package/dist/types/components/Charts/useBoxSize.d.ts +6 -0
- package/dist/types/components/Charts/useLegendFit.d.ts +1 -0
- package/dist/types/components/Charts/useUiScale.d.ts +1 -0
- package/dist/types/{shared-web-ui/src → components}/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroupContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Checkbox/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/ChipInput/ChipInput.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/ChipInput/index.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/ChipInput/useChipSuggestions.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/Collapsible.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleItem.d.ts +1 -3
- package/dist/types/{shared-web-ui/src → components}/Collapsible/index.d.ts +1 -1
- package/dist/types/components/ColorSchemeSelect/ColorSchemeSelect.d.ts +11 -0
- package/dist/types/components/CommandPalette/CommandPalette.d.ts +25 -0
- package/dist/types/components/DataTable/DataTable.d.ts +16 -0
- package/dist/types/components/DataTable/DataTable.storyData.d.ts +23 -0
- package/dist/types/components/DataTable/DisplayPopover.d.ts +22 -0
- package/dist/types/components/DataTable/HeaderMenu.d.ts +31 -0
- package/dist/types/components/DataTable/ManageModal.d.ts +31 -0
- package/dist/types/components/DataTable/PressButton.d.ts +2 -0
- package/dist/types/components/DataTable/SingleRowView.d.ts +9 -0
- package/dist/types/components/DataTable/SortModal.d.ts +16 -0
- package/dist/types/components/DataTable/StatusRow.d.ts +49 -0
- package/dist/types/components/DataTable/TableColumnModal.d.ts +18 -0
- package/dist/types/components/DataTable/TableControls.d.ts +48 -0
- package/dist/types/components/DataTable/TablePagination.d.ts +38 -0
- package/dist/types/components/DataTable/TableScrollStrip.d.ts +2 -0
- package/dist/types/components/DataTable/TableToolbar.d.ts +69 -0
- package/dist/types/components/DataTable/TableView.d.ts +61 -0
- package/dist/types/components/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
- package/dist/types/components/DataTable/bulk/TableToast.d.ts +13 -0
- package/dist/types/components/DataTable/bulk/bulkActions.d.ts +23 -0
- package/dist/types/components/DataTable/cards/CardFieldsEditor.d.ts +16 -0
- package/dist/types/components/DataTable/cards/CardView.d.ts +50 -0
- package/dist/types/components/DataTable/cards/cardFields.d.ts +32 -0
- package/dist/types/components/DataTable/cards/rowParts.d.ts +38 -0
- package/dist/types/components/DataTable/data/useServerData.d.ts +28 -0
- package/dist/types/components/DataTable/defaults.d.ts +18 -0
- package/dist/types/components/DataTable/detail/BuiltInDetail.d.ts +10 -0
- package/dist/types/components/DataTable/detail/DetailHost.d.ts +13 -0
- package/dist/types/components/DataTable/export/ExportPopover.d.ts +18 -0
- package/dist/types/components/DataTable/export/ExportPreviewModal.d.ts +11 -0
- package/dist/types/components/DataTable/export/ExportSettingsModal.d.ts +31 -0
- package/dist/types/components/DataTable/export/ExportTemplateCards.d.ts +19 -0
- package/dist/types/components/DataTable/export/exportContext.d.ts +10 -0
- package/dist/types/components/DataTable/export/exportEngine.d.ts +77 -0
- package/dist/types/components/DataTable/export/exportRows.d.ts +10 -0
- package/dist/types/components/DataTable/export/templateDisplay.d.ts +7 -0
- package/dist/types/components/DataTable/export/templateOptions.d.ts +6 -0
- package/dist/types/components/DataTable/export/useTableExport.d.ts +53 -0
- package/dist/types/components/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
- package/dist/types/components/DataTable/filters/FilterChips.d.ts +9 -0
- package/dist/types/components/DataTable/filters/FilterConditionRow.d.ts +11 -0
- package/dist/types/components/DataTable/filters/FilterGroup.d.ts +12 -0
- package/dist/types/components/DataTable/filters/FilterModal.d.ts +14 -0
- package/dist/types/components/DataTable/filters/FilterRow.d.ts +20 -0
- package/dist/types/components/DataTable/filters/columnFilterModel.d.ts +29 -0
- package/dist/types/components/DataTable/filters/filterEngine.d.ts +16 -0
- package/dist/types/components/DataTable/filters/filterRowModel.d.ts +28 -0
- package/dist/types/components/DataTable/filters/quickFilterMatch.d.ts +3 -0
- package/dist/types/components/DataTable/grouping/GroupUi.d.ts +36 -0
- package/dist/types/components/DataTable/grouping/groupModel.d.ts +82 -0
- package/dist/types/components/DataTable/grouping/useGrouping.d.ts +39 -0
- package/dist/types/components/DataTable/host.d.ts +14 -0
- package/dist/types/components/DataTable/index.d.ts +18 -0
- package/dist/types/components/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
- package/dist/types/components/DataTable/keyboard/shortcuts.d.ts +22 -0
- package/dist/types/components/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
- package/dist/types/components/DataTable/labels.d.ts +618 -0
- package/dist/types/components/DataTable/layout/LayoutSwitcher.d.ts +9 -0
- package/dist/types/components/DataTable/layout/layouts.d.ts +20 -0
- package/dist/types/components/DataTable/layout/scrollArea.d.ts +2 -0
- package/dist/types/components/DataTable/layout/useFillHeight.d.ts +11 -0
- package/dist/types/components/DataTable/menu/RowMenu.d.ts +56 -0
- package/dist/types/components/DataTable/menu/buildRowMenu.d.ts +35 -0
- package/dist/types/components/DataTable/menu/clipboard.d.ts +4 -0
- package/dist/types/components/DataTable/menu/layers.d.ts +1 -0
- package/dist/types/components/DataTable/menu/valueFilter.d.ts +15 -0
- package/dist/types/components/DataTable/motion/useRowMotion.d.ts +32 -0
- package/dist/types/components/DataTable/persistence/adapters.d.ts +6 -0
- package/dist/types/components/DataTable/persistence/reconcile.d.ts +64 -0
- package/dist/types/components/DataTable/persistence/useColumnPersistence.d.ts +51 -0
- package/dist/types/components/DataTable/persistence/useManagePrefs.d.ts +23 -0
- package/dist/types/components/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
- package/dist/types/components/DataTable/pinning.d.ts +10 -0
- package/dist/types/components/DataTable/rows/PressRow.d.ts +7 -0
- package/dist/types/components/DataTable/rows/RowActions.d.ts +15 -0
- package/dist/types/components/DataTable/rows/rowPress.d.ts +35 -0
- package/dist/types/components/DataTable/sharing/Sharing.d.ts +21 -0
- package/dist/types/components/DataTable/split/SplitView.d.ts +29 -0
- package/dist/types/components/DataTable/summary/ManageSummaryCards.d.ts +18 -0
- package/dist/types/components/DataTable/summary/SummaryChart.d.ts +11 -0
- package/dist/types/components/DataTable/summary/SummaryControls.d.ts +33 -0
- package/dist/types/components/DataTable/summary/SummaryImage.d.ts +12 -0
- package/dist/types/components/DataTable/summary/SummarySeeAll.d.ts +17 -0
- package/dist/types/components/DataTable/summary/TableSummary.d.ts +34 -0
- package/dist/types/components/DataTable/summary/summaryCatalogue.d.ts +64 -0
- package/dist/types/components/DataTable/summary/summaryChartData.d.ts +9 -0
- package/dist/types/components/DataTable/summary/summaryModel.d.ts +152 -0
- package/dist/types/components/DataTable/summary/summaryWidth.d.ts +22 -0
- package/dist/types/components/DataTable/summary/useTableSummary.d.ts +18 -0
- package/dist/types/components/DataTable/types.d.ts +1145 -0
- package/dist/types/components/DataTable/ui-local/AutoHeight.d.ts +9 -0
- package/dist/types/components/DataTable/ui-local/DateRangePicker.d.ts +16 -0
- package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
- package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
- package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
- package/dist/types/components/DataTable/ui-local/ReactModal.d.ts +20 -0
- package/dist/types/components/DataTable/ui-local/scrollLock.d.ts +1 -0
- package/dist/types/components/DataTable/ui.d.ts +13 -0
- package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -0
- package/dist/types/components/DataTable/useTable.d.ts +12 -0
- package/dist/types/components/DataTable/vendor/columnOrder.d.ts +1 -0
- package/dist/types/components/DataTable/vendor/diff.d.ts +5 -0
- package/dist/types/components/DataTable/vendor/fileActions.d.ts +19 -0
- package/dist/types/components/DataTable/vendor/index.d.ts +3 -0
- package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +27 -0
- package/dist/types/components/DatePicker/Calendar.d.ts +14 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +5 -0
- package/dist/types/components/DatePicker/TimeField.d.ts +16 -0
- package/dist/types/components/DatePicker/index.d.ts +4 -0
- package/dist/types/components/DatePicker/useOneMonthPane.d.ts +2 -0
- package/dist/types/components/Dialog/Dialog.d.ts +56 -0
- package/dist/types/components/Dialog/DialogHost.d.ts +44 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +49 -0
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTable.d.ts +1 -6
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableActions.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableCell.d.ts +2 -20
- package/dist/types/components/EditableTable/EditableTableRow.d.ts +14 -0
- package/dist/types/components/EditableTable/EditableTableSummary.d.ts +11 -0
- package/dist/types/{shared-web-ui/src → components}/EditableTable/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/EditableTable/useEditableTable.d.ts +3 -3
- package/dist/types/components/EditableTable/useRowAnimation.d.ts +12 -0
- package/dist/types/components/FieldContext/FieldContext.d.ts +3 -0
- package/dist/types/components/FieldContext/FieldProvider.d.ts +4 -0
- package/dist/types/{shared-web-ui/src → components}/FieldContext/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldContext/useField.d.ts +2 -29
- package/dist/types/components/FieldContext/useFieldSurface.d.ts +34 -0
- package/dist/types/{shared-web-ui/src → components}/FieldContext/useFormKeyboard.d.ts +1 -4
- package/dist/types/{shared-web-ui/src → components}/FieldWrapper/FieldWrapper.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldWrapper/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/Field.d.ts +1 -1
- package/dist/types/components/Fields/FieldButton.d.ts +17 -0
- package/dist/types/{shared-web-ui/src → components}/Fields/Fields.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldBlur.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldChange.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldCondition.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldDisabled.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldRender.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldSelect.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValidation.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValue.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/index.d.ts +1 -1
- package/dist/types/components/Floating/index.d.ts +3 -0
- package/dist/types/components/Floating/layers.d.ts +4 -0
- package/dist/types/components/Floating/scrollLock.d.ts +2 -0
- package/dist/types/components/Floating/useFloatingLayer.d.ts +20 -0
- package/dist/types/{shared-web-ui/src → components}/Form/Form.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Form/index.d.ts +1 -1
- package/dist/types/components/Image/ImagePicker.d.ts +23 -0
- package/dist/types/components/Image/ImageStrip.d.ts +13 -0
- package/dist/types/components/Image/ImageViewer.d.ts +16 -0
- package/dist/types/components/Image/index.d.ts +8 -0
- package/dist/types/components/Image/prepareImage.d.ts +19 -0
- package/dist/types/{shared-web-ui/src → components}/Input/Input.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Input/index.d.ts +1 -1
- package/dist/types/components/Popover/Popover.d.ts +25 -0
- package/dist/types/components/Popover/floatingPosition.d.ts +17 -0
- package/dist/types/components/Press/index.d.ts +2 -0
- package/dist/types/components/Press/usePress.d.ts +9 -0
- package/dist/types/{shared-web-ui/src → components}/Radio/Radio.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroup.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroupContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Radio/index.d.ts +1 -1
- package/dist/types/components/Scroll/ScrollRule.d.ts +2 -0
- package/dist/types/components/Scroll/ScrollStrip.d.ts +9 -0
- package/dist/types/components/Scroll/index.d.ts +4 -0
- package/dist/types/components/Scroll/labels.d.ts +5 -0
- package/dist/types/components/Scroll/scrollActivity.d.ts +14 -0
- package/dist/types/components/Scroll/ui.d.ts +1 -0
- package/dist/types/{shared-web-ui/src → components}/Select/Select.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Select/index.d.ts +1 -1
- package/dist/types/components/Select/useSelect.d.ts +2 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +24 -0
- package/dist/types/components/Skeleton/Skeleton.d.ts +18 -0
- package/dist/types/components/Stepper/Stepper.d.ts +17 -0
- package/dist/types/components/Stepper/index.d.ts +2 -0
- package/dist/types/{shared-web-ui/src → components}/Suggest/Suggest.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Suggest/SuggestionList.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Suggest/index.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/Suggest/searchFilters.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Suggest/useSuggest.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Switch/Switch.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Switch/index.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +36 -0
- package/dist/types/components/Toast/ToastHost.d.ts +8 -0
- package/dist/types/components/Toast/ToastItem.d.ts +10 -0
- package/dist/types/{shared-web-ui/src → components}/Toast/toast.types.d.ts +0 -13
- package/dist/types/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/types/components/Tooltip/useTooltip.d.ts +15 -0
- package/dist/types/{shared-web-ui/src → components}/Typography/Typography.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Typography/index.d.ts +1 -1
- package/dist/types/components/UIProvider/UIPortalContext.d.ts +2 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +13 -0
- package/dist/types/components/UIProvider/UIThemeContext.d.ts +9 -0
- package/dist/types/core/hooks/index.d.ts +3 -0
- package/dist/types/core/hooks/useDebounced.d.ts +7 -0
- package/dist/types/core/hooks/usePresence.d.ts +5 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/button.logic.d.ts +1 -1
- package/dist/types/core/logic/cellRules.logic.d.ts +32 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/chipinput.logic.d.ts +1 -13
- package/dist/types/{shared-logic/src/ui → core/logic}/collapsible.logic.d.ts +1 -8
- package/dist/types/{shared-logic/src/ui → core/logic}/colorScheme.d.ts +0 -14
- package/dist/types/core/logic/columnOrder.logic.d.ts +1 -0
- package/dist/types/core/logic/datePicker.logic.d.ts +136 -0
- package/dist/types/core/logic/displayOrder.logic.d.ts +4 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/editableTable.logic.d.ts +5 -28
- package/dist/types/core/logic/fieldControl.logic.d.ts +12 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/fieldWrapper.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/fields.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/form.logic.d.ts +0 -8
- package/dist/types/core/logic/index.d.ts +33 -0
- package/dist/types/core/logic/keyboard.logic.d.ts +12 -0
- package/dist/types/core/logic/motion.logic.d.ts +1 -0
- package/dist/types/core/logic/navigation.logic.d.ts +6 -0
- package/dist/types/core/logic/popover.logic.d.ts +59 -0
- package/dist/types/core/logic/popupList.logic.d.ts +19 -0
- package/dist/types/core/logic/press.logic.d.ts +14 -0
- package/dist/types/core/logic/quickAddGrid.logic.d.ts +183 -0
- package/dist/types/core/logic/select.logic.d.ts +17 -0
- package/dist/types/core/logic/stepper.logic.d.ts +6 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/suggest.logic.d.ts +1 -1
- package/dist/types/core/logic/tableLayout.logic.d.ts +13 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/tableSummary.logic.d.ts +1 -20
- package/dist/types/core/logic/timeField.logic.d.ts +26 -0
- package/dist/types/core/logic/tooltip.logic.d.ts +11 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/typography.logic.d.ts +1 -1
- package/dist/types/core/logic/uiScale.logic.d.ts +1 -0
- package/dist/types/core/logic/useMergeRefs.d.ts +2 -0
- package/dist/types/{shared-types/src/ui → core/types}/button.types.d.ts +1 -11
- package/dist/types/{shared-types/src/ui → core/types}/checkbox.types.d.ts +0 -4
- package/dist/types/{shared-types/src/ui → core/types}/chipinput.types.d.ts +0 -10
- package/dist/types/{shared-types/src/ui → core/types}/collapsible.types.d.ts +0 -18
- package/dist/types/core/types/common.types.d.ts +3 -0
- package/dist/types/core/types/control.types.d.ts +36 -0
- package/dist/types/core/types/datePicker.types.d.ts +46 -0
- package/dist/types/{shared-types/src/ui → core/types}/editableTable.types.d.ts +0 -79
- package/dist/types/core/types/field.types.d.ts +80 -0
- package/dist/types/{shared-types/src/ui → core/types}/fieldWrapper.types.d.ts +0 -10
- package/dist/types/{shared-types/src/ui → core/types}/fields.types.d.ts +0 -45
- package/dist/types/{shared-types/src/ui → core/types}/form.types.d.ts +0 -30
- package/dist/types/core/types/index.d.ts +22 -0
- package/dist/types/{shared-types/src/ui → core/types}/input.types.d.ts +0 -4
- package/dist/types/core/types/keyboard.types.d.ts +48 -0
- package/dist/types/core/types/navigation.types.d.ts +13 -0
- package/dist/types/{shared-types/src/ui → core/types}/radio.types.d.ts +0 -6
- package/dist/types/{shared-types/src/ui → core/types}/select.types.d.ts +0 -41
- package/dist/types/{shared-types/src/ui → core/types}/suggest.types.d.ts +1 -10
- package/dist/types/{shared-types/src/ui → core/types}/switch.types.d.ts +0 -4
- package/dist/types/{shared-types/src/ui → core/types}/table.types.d.ts +0 -59
- package/dist/types/core/types/tooltip.types.d.ts +43 -0
- package/dist/types/{shared-types/src/ui → core/types}/typography.types.d.ts +0 -4
- package/dist/types/index.d.ts +86 -0
- package/package.json +27 -26
- package/dist/types/published/dcs-ui/src/index.d.ts +0 -32
- package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -35
- package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -14
- package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -29
- package/dist/types/shared-logic/src/report/canvas.d.ts +0 -106
- package/dist/types/shared-logic/src/report/conditions.d.ts +0 -18
- package/dist/types/shared-logic/src/report/constants.d.ts +0 -46
- package/dist/types/shared-logic/src/report/dataset.d.ts +0 -49
- package/dist/types/shared-logic/src/report/edit.d.ts +0 -188
- package/dist/types/shared-logic/src/report/fields.d.ts +0 -80
- package/dist/types/shared-logic/src/report/format.d.ts +0 -27
- package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -61
- package/dist/types/shared-logic/src/report/index.d.ts +0 -19
- package/dist/types/shared-logic/src/report/layout.d.ts +0 -85
- package/dist/types/shared-logic/src/report/metrics.d.ts +0 -62
- package/dist/types/shared-logic/src/report/migrate.d.ts +0 -77
- package/dist/types/shared-logic/src/report/paginate.d.ts +0 -40
- package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -29
- package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -45
- package/dist/types/shared-logic/src/report/resolve.d.ts +0 -40
- package/dist/types/shared-logic/src/report/scope.d.ts +0 -52
- package/dist/types/shared-logic/src/report/storage.d.ts +0 -112
- package/dist/types/shared-logic/src/report/validate.d.ts +0 -28
- package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -67
- package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -12
- package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/index.d.ts +0 -55
- package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -72
- package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -30
- package/dist/types/shared-logic/src/ui/popover.logic.d.ts +0 -57
- package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -54
- package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -31
- package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -47
- package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -10
- package/dist/types/shared-types/src/report/bands.d.ts +0 -32
- package/dist/types/shared-types/src/report/blocks.d.ts +0 -181
- package/dist/types/shared-types/src/report/conditions.d.ts +0 -24
- package/dist/types/shared-types/src/report/dataset.d.ts +0 -106
- package/dist/types/shared-types/src/report/document.d.ts +0 -201
- package/dist/types/shared-types/src/report/index.d.ts +0 -9
- package/dist/types/shared-types/src/report/primitives.d.ts +0 -109
- package/dist/types/shared-types/src/report/registry.d.ts +0 -85
- package/dist/types/shared-types/src/report/storage.d.ts +0 -41
- package/dist/types/shared-types/src/report/template.d.ts +0 -92
- package/dist/types/shared-types/src/ui/common.types.d.ts +0 -14
- package/dist/types/shared-types/src/ui/control.types.d.ts +0 -133
- package/dist/types/shared-types/src/ui/field.types.d.ts +0 -200
- package/dist/types/shared-types/src/ui/index.d.ts +0 -37
- package/dist/types/shared-types/src/ui/keyboard.types.d.ts +0 -155
- package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -35
- package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -68
- package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -25
- package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -29
- package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -36
- package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -70
- package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -33
- package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -26
- package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -52
- package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -101
- package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -80
- package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +0 -49
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -25
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -22
- package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -44
- package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -18
- package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -13
- package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -57
- package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -32
- package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +0 -44
- package/dist/types/shared-web-ui/src/ReportDesigner/AlignedRowsEditor.d.ts +0 -4
- package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -26
- package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -44
- package/dist/types/shared-web-ui/src/ReportDesigner/ColumnEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -7
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -25
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldSelect.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/FormatEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -14
- package/dist/types/shared-web-ui/src/ReportDesigner/OptionsEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -34
- package/dist/types/shared-web-ui/src/ReportDesigner/StyleEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -10
- package/dist/types/shared-web-ui/src/ReportDesigner/WatermarkEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -6
- package/dist/types/shared-web-ui/src/ReportDesigner/icons.d.ts +0 -21
- package/dist/types/shared-web-ui/src/ReportDesigner/index.d.ts +0 -16
- package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -34
- package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -63
- package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -106
- package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -44
- package/dist/types/shared-web-ui/src/ReportPreview/index.d.ts +0 -1
- package/dist/types/shared-web-ui/src/Select/useSelect.d.ts +0 -2
- package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -55
- package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -33
- package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -79
- package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -22
- package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -19
- package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -25
- package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -24
- package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -16
- package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -54
- package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -17
- package/dist/types/shared-web-ui/src/index.d.ts +0 -78
- /package/dist/types/{shared-web-ui/src → components}/AppBar/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Avatar/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Badge/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Breadcrumbs/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Card/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/ColorSchemeSelect/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/CommandPalette/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Dialog/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DropdownMenu/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Popover/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Sidebar/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Skeleton/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Suggest/fuseSearch.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Tabs/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Toast/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Tooltip/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/UIProvider/index.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/checkbox.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/input.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/radio.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/switch.logic.d.ts +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { DataTableDensity, DataTableFontSize } from '../types';
|
|
3
|
+
export interface RowMenuIcon {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
shortLabel: string;
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
shortcut?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface RowMenuItem {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
shortcut?: string;
|
|
17
|
+
danger?: boolean;
|
|
18
|
+
tone?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
onSelect: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface RowMenuFilterEntry {
|
|
24
|
+
id: string;
|
|
25
|
+
field: string;
|
|
26
|
+
value: string;
|
|
27
|
+
options: Array<{
|
|
28
|
+
kind: 'only' | 'add' | 'hide';
|
|
29
|
+
label: string;
|
|
30
|
+
onSelect: () => void;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export interface RowMenuModel {
|
|
34
|
+
title: string;
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
avatar?: ReactNode;
|
|
37
|
+
icons: RowMenuIcon[];
|
|
38
|
+
items: RowMenuItem[];
|
|
39
|
+
danger: RowMenuItem[];
|
|
40
|
+
filterEntries?: RowMenuFilterEntry[];
|
|
41
|
+
}
|
|
42
|
+
export interface RowMenuPlacement {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
sheet: boolean;
|
|
46
|
+
alignRight?: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface RowMenuProps {
|
|
49
|
+
model: RowMenuModel;
|
|
50
|
+
placement: RowMenuPlacement;
|
|
51
|
+
onClose: () => void;
|
|
52
|
+
density?: DataTableDensity;
|
|
53
|
+
fontSize?: DataTableFontSize;
|
|
54
|
+
}
|
|
55
|
+
export declare function RowMenu({ model, placement, onClose, density, fontSize }: RowMenuProps): React.JSX.Element;
|
|
56
|
+
export default RowMenu;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { DataTableCardFields, DataTableFilterGroup, DataTableRowMenuConfig, DataTableRowMenuBuiltIn, DataTableRowAction, DataTableColumn } from '../types';
|
|
3
|
+
import type { DataTableLabels } from '../labels';
|
|
4
|
+
import type { RowMenuModel } from './RowMenu';
|
|
5
|
+
export declare function NotEqualIcon(): React.JSX.Element;
|
|
6
|
+
export declare const DEFAULT_BUILT_INS: DataTableRowMenuBuiltIn[];
|
|
7
|
+
export interface RowMenuContext<T> {
|
|
8
|
+
row: T;
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
columnKey: string | null;
|
|
11
|
+
labels: DataTableLabels;
|
|
12
|
+
columns: DataTableColumn<T>[];
|
|
13
|
+
visibleColumns: DataTableColumn<T>[];
|
|
14
|
+
menu?: DataTableRowMenuConfig<T>;
|
|
15
|
+
actions: DataTableRowAction<T>[];
|
|
16
|
+
slots: DataTableCardFields;
|
|
17
|
+
title: string;
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
avatar?: ReactNode;
|
|
20
|
+
canOpen: boolean;
|
|
21
|
+
onOpen: () => void;
|
|
22
|
+
selectable: boolean;
|
|
23
|
+
selected: boolean;
|
|
24
|
+
selecting: boolean;
|
|
25
|
+
selectedRows: T[];
|
|
26
|
+
onToggleSelect: () => void;
|
|
27
|
+
canCopy: boolean;
|
|
28
|
+
onCopy: (text: string, what: 'cell' | 'row' | 'rows', count: number) => void;
|
|
29
|
+
filtering: boolean;
|
|
30
|
+
operators?: readonly string[];
|
|
31
|
+
filterGroup: DataTableFilterGroup;
|
|
32
|
+
onFilter: (group: DataTableFilterGroup) => void;
|
|
33
|
+
format: (n: number) => string;
|
|
34
|
+
}
|
|
35
|
+
export declare function buildRowMenu<T>(ctx: RowMenuContext<T>): RowMenuModel;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DataTableColumn } from '../types';
|
|
2
|
+
import { type CellTextLabels } from '../cards/cardFields';
|
|
3
|
+
export declare function rowsToTsv<T>(rows: T[], columns: DataTableColumn<T>[], labels: CellTextLabels, withHeader: boolean): string;
|
|
4
|
+
export declare function copyText(text: string): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isTopLayer, ownsFocus, LAYER_ATTR } from '../../Floating';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type DataTableFilterGroup, type DataTableColumn } from '../types';
|
|
2
|
+
import { type CellTextLabels } from '../cards/cardFields';
|
|
3
|
+
export type DataTableValueFilterKind = 'only' | 'add' | 'hide';
|
|
4
|
+
export interface DataTableCellFilterValue {
|
|
5
|
+
value: string | number | boolean | null;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const VALUE_FILTER_ID_PREFIX = "value-filter:";
|
|
9
|
+
export declare function canFilterByValue(col: DataTableColumn | undefined, operators?: readonly string[]): boolean;
|
|
10
|
+
export declare function cellFilterValues(col: DataTableColumn, row: unknown, labels: CellTextLabels & {
|
|
11
|
+
chipEmpty: string;
|
|
12
|
+
}): DataTableCellFilterValue[];
|
|
13
|
+
export declare function valueFilterKinds(group: DataTableFilterGroup, col: DataTableColumn, v: DataTableCellFilterValue, operators?: readonly string[]): DataTableValueFilterKind[];
|
|
14
|
+
export declare function applyValueFilter(group: DataTableFilterGroup, col: DataTableColumn, v: DataTableCellFilterValue, kind: DataTableValueFilterKind): DataTableFilterGroup;
|
|
15
|
+
export declare function chipShape(operator: string): 'is' | 'not' | 'empty' | 'notEmpty' | 'op';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export type RowMotion = 'enter' | 'exit';
|
|
3
|
+
export interface MotionItem<T> {
|
|
4
|
+
key: string;
|
|
5
|
+
item: T;
|
|
6
|
+
motion?: RowMotion;
|
|
7
|
+
}
|
|
8
|
+
export declare const EXIT_MS = 240;
|
|
9
|
+
export declare const ENTER_MS = 1400;
|
|
10
|
+
export declare function prefersReducedMotion(): boolean;
|
|
11
|
+
interface Exit<T> {
|
|
12
|
+
key: string;
|
|
13
|
+
item: T;
|
|
14
|
+
at: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function diffRows(before: string[], after: string[]): {
|
|
17
|
+
added: string[];
|
|
18
|
+
removed: Array<{
|
|
19
|
+
key: string;
|
|
20
|
+
at: number;
|
|
21
|
+
}>;
|
|
22
|
+
} | null;
|
|
23
|
+
export declare function mergeExits<T>(items: Array<MotionItem<T>>, exits: Array<Exit<T>>): Array<MotionItem<T>>;
|
|
24
|
+
export declare function useRowMotion<T>(items: T[], keyOf: (item: T) => string, opts: {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
resetKey: string | undefined;
|
|
27
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
28
|
+
}): {
|
|
29
|
+
items: Array<MotionItem<T>>;
|
|
30
|
+
heightOf: (key: string) => number | undefined;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DataTablePersistence } from '../types';
|
|
2
|
+
export declare function localStorageAdapter(prefix?: string): DataTablePersistence;
|
|
3
|
+
export declare function memoryAdapter(initial?: Record<string, Record<string, any>>): DataTablePersistence & {
|
|
4
|
+
store: Map<string, Record<string, any>>;
|
|
5
|
+
};
|
|
6
|
+
export declare const defaultPersistence: DataTablePersistence;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type DataTableColumnType, type DataTableFilterCondition, type DataTableFilterGroup, type DataTableInitialState, type DataTableLayout, type DataTableSavedFilterIssue, type DataTableSummaryCard, type DataTableView } from '../types';
|
|
2
|
+
export interface PrefsColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
type: DataTableColumnType;
|
|
5
|
+
filterable: boolean;
|
|
6
|
+
options?: ReadonlySet<string>;
|
|
7
|
+
}
|
|
8
|
+
export interface PrefsVersioning {
|
|
9
|
+
version?: number;
|
|
10
|
+
migrate?: (doc: Record<string, any>, fromVersion: number, key: string) => Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
export interface ViewPrefsContext extends PrefsVersioning {
|
|
13
|
+
key: string;
|
|
14
|
+
columns: ReadonlyMap<string, PrefsColumn>;
|
|
15
|
+
renamed?: Readonly<Record<string, string>>;
|
|
16
|
+
operators?: readonly string[];
|
|
17
|
+
layouts: readonly DataTableLayout[];
|
|
18
|
+
groupable: ReadonlySet<string>;
|
|
19
|
+
maxGroupDepth: number;
|
|
20
|
+
templates: ReadonlyMap<string, ReadonlySet<string>>;
|
|
21
|
+
summaryCards: ReadonlyMap<string, DataTableSummaryCard['kind']>;
|
|
22
|
+
summaryCharts?: ReadonlyMap<string, readonly string[]>;
|
|
23
|
+
summaryCounts?: ReadonlyMap<string, readonly number[]>;
|
|
24
|
+
summaryBreakdowns: ReadonlySet<string>;
|
|
25
|
+
}
|
|
26
|
+
export interface ManagePrefsContext extends PrefsVersioning {
|
|
27
|
+
key: string;
|
|
28
|
+
views: ReadonlySet<string>;
|
|
29
|
+
renamedViews?: Readonly<Record<string, string>>;
|
|
30
|
+
templates: ReadonlySet<string>;
|
|
31
|
+
}
|
|
32
|
+
export interface PrefsReport {
|
|
33
|
+
removedColumns: string[];
|
|
34
|
+
disabledFilters: string[];
|
|
35
|
+
reset: string[];
|
|
36
|
+
}
|
|
37
|
+
export interface PrefsReconciled {
|
|
38
|
+
doc: Record<string, any>;
|
|
39
|
+
changed: boolean;
|
|
40
|
+
report: PrefsReport;
|
|
41
|
+
}
|
|
42
|
+
export declare const reportsUserChange: (r: PrefsReport) => boolean;
|
|
43
|
+
export declare function viewPrefsContext(view: DataTableView, opts: {
|
|
44
|
+
key: string;
|
|
45
|
+
serverMode: boolean;
|
|
46
|
+
hasGroupsSource: boolean;
|
|
47
|
+
operators?: readonly string[];
|
|
48
|
+
summaryBreakdownFields?: readonly string[];
|
|
49
|
+
} & PrefsVersioning): ViewPrefsContext;
|
|
50
|
+
export declare function managePrefsContext(views: DataTableView[], opts: {
|
|
51
|
+
key: string;
|
|
52
|
+
renamedViews?: Record<string, string>;
|
|
53
|
+
} & PrefsVersioning): ManagePrefsContext;
|
|
54
|
+
export declare function renamedKey(key: string, renamed: Readonly<Record<string, string>> | undefined): string;
|
|
55
|
+
export declare function renameFilterColumns(group: DataTableFilterGroup, renamed: Readonly<Record<string, string>> | undefined): DataTableFilterGroup;
|
|
56
|
+
export declare function conditionIssue(c: DataTableFilterCondition, ctx: Pick<ViewPrefsContext, 'columns' | 'operators'>): DataTableSavedFilterIssue | null;
|
|
57
|
+
export declare function filterIssue(group: DataTableFilterGroup, ctx: Pick<ViewPrefsContext, 'columns' | 'operators'>): DataTableSavedFilterIssue | null;
|
|
58
|
+
export declare function withoutStaleConditions(group: DataTableFilterGroup, ctx: Pick<ViewPrefsContext, 'columns' | 'operators'>): DataTableFilterGroup;
|
|
59
|
+
export declare function reconcileViewPrefs(saved: Record<string, any>, ctx: ViewPrefsContext): PrefsReconciled;
|
|
60
|
+
export declare function reconcileManagePrefs(saved: Record<string, any>, ctx: ManagePrefsContext): PrefsReconciled;
|
|
61
|
+
export declare function reconcileInitialState(state: DataTableInitialState | undefined, views: DataTableView[], opts: {
|
|
62
|
+
renamedViews?: Record<string, string>;
|
|
63
|
+
operators?: readonly string[];
|
|
64
|
+
}): DataTableInitialState | undefined;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type DataTableExportSettings, type DataTableCardFields, type DataTableListFields, type DataTableLayout, type DataTableSavedFilter, type DataTableDisplayPrefs, type DataTablePdfPageSize, type DataTablePdfOrientation, type DataTablePdfFontSize, type DataTablePdfMargins, type DataTablePersistence, type DataTableColumnPinning, type DataTableExportSummaryMode, type DataTableSummaryPrefs, type DataTableExportOptionValues } from '../types';
|
|
2
|
+
import type { PrefsReconciled, PrefsReport } from './reconcile';
|
|
3
|
+
export declare const PREFS_SAVE_DEBOUNCE_MS = 500;
|
|
4
|
+
export declare const EXPORT_SETTINGS_DEFAULTS: DataTableExportSettings;
|
|
5
|
+
export interface TemplateExportPrefs {
|
|
6
|
+
summary?: DataTableExportSummaryMode;
|
|
7
|
+
summaryCards?: string[];
|
|
8
|
+
customColumns?: string[];
|
|
9
|
+
options?: DataTableExportOptionValues;
|
|
10
|
+
pdfPageSize?: DataTablePdfPageSize;
|
|
11
|
+
pdfOrientation?: DataTablePdfOrientation;
|
|
12
|
+
pdfFontSize?: DataTablePdfFontSize;
|
|
13
|
+
pdfMargins?: DataTablePdfMargins;
|
|
14
|
+
}
|
|
15
|
+
interface UseColumnPersistenceReturn {
|
|
16
|
+
saveQuickExportPrefs: (settings: DataTableExportSettings) => void;
|
|
17
|
+
saveTemplateExportPrefs: (templateId: string, prefs: TemplateExportPrefs) => void;
|
|
18
|
+
saveCardFields: (slots: DataTableCardFields | undefined) => void;
|
|
19
|
+
saveListFields: (fields: DataTableListFields | undefined) => void;
|
|
20
|
+
saveLayout: (layout: DataTableLayout | undefined) => void;
|
|
21
|
+
saveSavedFilters: (presets: DataTableSavedFilter[]) => void;
|
|
22
|
+
saveDisplay: (settings: DataTableDisplayPrefs) => void;
|
|
23
|
+
saveFilterRow: (visible: boolean | undefined) => void;
|
|
24
|
+
saveGrouping: (levels: string[] | undefined) => void;
|
|
25
|
+
saveViewParts: (parts: ViewDocParts) => void;
|
|
26
|
+
loaded: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ViewExtras {
|
|
29
|
+
pinning: DataTableColumnPinning;
|
|
30
|
+
defaultPinning: DataTableColumnPinning;
|
|
31
|
+
defaultVisibility?: Record<string, boolean>;
|
|
32
|
+
defaultOrder?: string[];
|
|
33
|
+
unauthorized?: string[];
|
|
34
|
+
setPinning: (p: DataTableColumnPinning) => void;
|
|
35
|
+
setFilterRow: (visible: boolean) => void;
|
|
36
|
+
setLayout?: (layout: DataTableLayout) => void;
|
|
37
|
+
setListFields?: (fields: DataTableListFields) => void;
|
|
38
|
+
setGrouping?: (levels: string[]) => void;
|
|
39
|
+
setSummary?: (prefs: DataTableSummaryPrefs) => void;
|
|
40
|
+
}
|
|
41
|
+
export interface ViewDocSync {
|
|
42
|
+
reconcile: (doc: Record<string, any>, key: string) => PrefsReconciled;
|
|
43
|
+
previousViewIds: string[];
|
|
44
|
+
onReport: (report: PrefsReport) => void;
|
|
45
|
+
version?: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function useColumnPersistence(persistence: DataTablePersistence | null, tableId: string | undefined, viewId: string | undefined, columnVisibility: Record<string, boolean>, columnOrder: string[], columnSizing: Record<string, number>, setColumnVisibility: (vis: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void, setColumnOrder: (order: string[] | ((prev: string[]) => string[])) => void, setColumnSizing: (sizing: Record<string, number>) => void, setExportSettings?: (s: DataTableExportSettings) => void, setCardFields?: (slots: DataTableCardFields) => void, setSavedFilters?: (filters: DataTableSavedFilter[]) => void, setDisplaySettings?: (s: DataTableDisplayPrefs) => void, setTemplateColumnOverrides?: (overrides: Record<string, TemplateExportPrefs>) => void, enabled?: boolean, onViewReset?: () => void, extra?: ViewExtras, sync?: ViewDocSync): UseColumnPersistenceReturn;
|
|
48
|
+
export type ViewDocParts = Record<string, unknown>;
|
|
49
|
+
export declare function readStoredViewDoc(persistence: DataTablePersistence, key: string, reconcile: (doc: Record<string, any>, key: string) => PrefsReconciled): Promise<Record<string, any> | null>;
|
|
50
|
+
export declare function saveStoredViewParts(persistence: DataTablePersistence, key: string, reconcile: (doc: Record<string, any>, key: string) => PrefsReconciled, parts: ViewDocParts, version?: number): Promise<void>;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type DataTableView, type DataTableManageList, type DataTableManagePrefs, type DataTablePersistence } from '../types';
|
|
2
|
+
import type { PrefsReconciled } from './reconcile';
|
|
3
|
+
export interface ResolvedView {
|
|
4
|
+
config: DataTableView;
|
|
5
|
+
key: string;
|
|
6
|
+
index: number;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
locked: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function orderIds(ids: string[], saved: DataTableManageList | undefined): string[];
|
|
11
|
+
export declare function isShown(id: string, saved: DataTableManageList | undefined, byDefault: boolean): boolean;
|
|
12
|
+
export declare function withShown(saved: DataTableManageList | undefined, ids: string[], byDefault: (id: string) => boolean, id: string, shown: boolean): DataTableManageList;
|
|
13
|
+
export declare function withOrder(saved: DataTableManageList | undefined, ids: string[], byDefault: (id: string) => boolean, ordered: string[]): DataTableManageList;
|
|
14
|
+
export declare function resolveAllViews(configs: DataTableView[], prefs: DataTableManagePrefs): ResolvedView[];
|
|
15
|
+
export declare function resolveVisibleViews(configs: DataTableView[], prefs: DataTableManagePrefs): ResolvedView[];
|
|
16
|
+
export interface ManageDocSync {
|
|
17
|
+
reconcile: (doc: Record<string, any>, key: string) => PrefsReconciled;
|
|
18
|
+
version?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function useManagePrefs(persistence: DataTablePersistence | null, tableId: string | undefined, sync?: ManageDocSync): {
|
|
21
|
+
prefs: DataTableManagePrefs;
|
|
22
|
+
setPrefs: (next: DataTableManagePrefs) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DataTablePersistence } from '../types';
|
|
2
|
+
export declare function orphanPrefsKeys(keys: readonly string[], tableId: string, viewIds: readonly string[], renamedFrom: readonly string[]): string[];
|
|
3
|
+
export declare function useOrphanPrefs(persistence: DataTablePersistence | null, tableId: string | undefined, viewIds: readonly string[], renamedFrom: readonly string[]): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { DataTableColumnPinning, DataTableColumn } from './types';
|
|
3
|
+
export type PinSide = 'left' | 'right';
|
|
4
|
+
export declare function defaultPinning(columns: DataTableColumn[], opts?: {
|
|
5
|
+
firstColumn?: boolean;
|
|
6
|
+
}): DataTableColumnPinning;
|
|
7
|
+
export declare function pinSideOf(pinning: DataTableColumnPinning, key: string): PinSide | null;
|
|
8
|
+
export declare function pinColumn(pinning: DataTableColumnPinning, key: string, side: PinSide | null): DataTableColumnPinning;
|
|
9
|
+
export declare function samePinning(a: DataTableColumnPinning, b: DataTableColumnPinning): boolean;
|
|
10
|
+
export declare function usePinOffsets(tableRef: RefObject<HTMLTableElement | null>, active: boolean, key: string): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PressRowProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
as: 'tr' | 'div';
|
|
4
|
+
pressable: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const PressRow: React.ForwardRefExoticComponent<PressRowProps & React.RefAttributes<HTMLElement>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataTableActionDisplay, DataTableRowAction } from '../types';
|
|
3
|
+
import type { RowMenuRequest } from './rowPress';
|
|
4
|
+
export declare function primaryActionOf<T>(actions: DataTableRowAction<T>[], row: T): DataTableRowAction<T> | undefined;
|
|
5
|
+
interface RowActionsProps<T> {
|
|
6
|
+
row: T;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
title: string;
|
|
9
|
+
actions: DataTableRowAction<T>[];
|
|
10
|
+
displayMode: DataTableActionDisplay;
|
|
11
|
+
onMenu?: (at: RowMenuRequest) => void;
|
|
12
|
+
reserveSlot?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function RowActions<T>({ row, rowIndex, title, actions, displayMode, onMenu, reserveSlot }: RowActionsProps<T>): React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function isInteractiveTarget(target: EventTarget | null, rowEl: HTMLElement): boolean;
|
|
3
|
+
export declare function isSelectingText(rowEl: HTMLElement): boolean;
|
|
4
|
+
export declare function fieldAt(target: EventTarget | null, rowEl: HTMLElement): string | null;
|
|
5
|
+
export declare const LONG_PRESS_MS = 500;
|
|
6
|
+
export interface RowMenuRequest {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
columnKey: string | null;
|
|
10
|
+
touch: boolean;
|
|
11
|
+
alignRight?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface RowPressOptions<R> {
|
|
14
|
+
canOpen: boolean;
|
|
15
|
+
openOn: 'click' | 'doubleClick';
|
|
16
|
+
longPress: 'menu' | 'open';
|
|
17
|
+
menuEnabled: boolean;
|
|
18
|
+
selecting: boolean;
|
|
19
|
+
selectable: (row: R) => boolean;
|
|
20
|
+
onOpen: (row: R) => void;
|
|
21
|
+
onToggle: (row: R) => void;
|
|
22
|
+
onMenu: (row: R, at: RowMenuRequest) => void;
|
|
23
|
+
onOtherClick?: (row: R) => void;
|
|
24
|
+
}
|
|
25
|
+
export interface RowPressHandlers {
|
|
26
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
27
|
+
onClick: (e: React.MouseEvent) => void;
|
|
28
|
+
onDoubleClick: (e: React.MouseEvent) => void;
|
|
29
|
+
onContextMenu: (e: React.MouseEvent) => void;
|
|
30
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
31
|
+
onTouchMove: (e: React.TouchEvent) => void;
|
|
32
|
+
onTouchEnd: () => void;
|
|
33
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function useRowPress<R>(opts: RowPressOptions<R>): (row: R) => RowPressHandlers;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataTableSharedView, DataTableSharing } from '../types';
|
|
3
|
+
export declare function useSharedViews(sharing: DataTableSharing | undefined, tableId: string | undefined): {
|
|
4
|
+
views: DataTableSharedView[];
|
|
5
|
+
reload: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const SHARED_PREFIX = "shared:";
|
|
8
|
+
export declare function ViewTabMenu({ label, items }: {
|
|
9
|
+
label: string;
|
|
10
|
+
items: Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
onSelect: () => void;
|
|
14
|
+
}>;
|
|
15
|
+
}): React.JSX.Element | null;
|
|
16
|
+
export declare function ShareViewDialog({ sharing, defaultName, onShare, onClose }: {
|
|
17
|
+
sharing: DataTableSharing;
|
|
18
|
+
defaultName: string;
|
|
19
|
+
onShare: (name: string, audienceIds: string[]) => Promise<void>;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { RowPressHandlers } from '../rows/rowPress';
|
|
3
|
+
import type { CardLine, CardRow, MotionOptions } from '../cards/CardView';
|
|
4
|
+
import type { ListParts } from '../cards/rowParts';
|
|
5
|
+
import { type ScrollApi, type VirtualOptions } from '../virtual/useVirtualLines';
|
|
6
|
+
interface SplitViewProps {
|
|
7
|
+
rows: CardRow[];
|
|
8
|
+
lines?: CardLine[];
|
|
9
|
+
openId: string | null;
|
|
10
|
+
checkboxes: boolean;
|
|
11
|
+
onToggle: (id: string) => void;
|
|
12
|
+
press: (id: string) => RowPressHandlers;
|
|
13
|
+
renderActions?: (id: string) => ReactNode;
|
|
14
|
+
pane: ReactNode | null;
|
|
15
|
+
narrowList: boolean;
|
|
16
|
+
focusable: boolean;
|
|
17
|
+
activeKey?: string | null;
|
|
18
|
+
placeholder?: ReactNode;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
virtual?: VirtualOptions | null;
|
|
21
|
+
scrollApi?: React.MutableRefObject<ScrollApi | null>;
|
|
22
|
+
listFooter?: ReactNode;
|
|
23
|
+
motion?: MotionOptions;
|
|
24
|
+
}
|
|
25
|
+
export declare function SplitItemContent({ parts }: {
|
|
26
|
+
parts: ListParts;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
export declare function SplitView({ rows, lines: linesProp, openId, checkboxes, onToggle, press, renderActions, pane, narrowList, focusable, activeKey, placeholder, loading, virtual, scrollApi, listFooter, motion }: SplitViewProps): React.JSX.Element;
|
|
29
|
+
export default SplitView;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableColumn, type DataTableSummaryConfig, type DataTableSummaryPrefs, type DataTableSummaryStrip } from '../types';
|
|
3
|
+
import type { DataTableLabels } from '../labels';
|
|
4
|
+
import { type SummaryLayout } from './summaryCatalogue';
|
|
5
|
+
interface ManageSummaryCardsProps {
|
|
6
|
+
strip: DataTableSummaryStrip;
|
|
7
|
+
config: DataTableSummaryConfig | undefined;
|
|
8
|
+
layout: SummaryLayout;
|
|
9
|
+
prefs: DataTableSummaryPrefs | undefined;
|
|
10
|
+
strips: Record<DataTableSummaryStrip, boolean>;
|
|
11
|
+
columns: DataTableColumn[];
|
|
12
|
+
breakdownColumns: DataTableColumn[];
|
|
13
|
+
onPrefs: (next: DataTableSummaryPrefs) => void;
|
|
14
|
+
onStrips: (next: Record<DataTableSummaryStrip, boolean>) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const stripName: (strip: DataTableSummaryStrip, L: DataTableLabels) => string;
|
|
17
|
+
export declare function ManageSummaryCards({ strip: tab, config, layout, prefs, strips, columns, breakdownColumns, onPrefs, onStrips }: ManageSummaryCardsProps): React.JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ChartLabels } from '../../Charts';
|
|
2
|
+
import { type ResolvedSummaryCard } from './summaryModel';
|
|
3
|
+
export interface SummaryChartProps {
|
|
4
|
+
item: ResolvedSummaryCard;
|
|
5
|
+
onSelect?: (key: string) => void;
|
|
6
|
+
format: (n: number) => string;
|
|
7
|
+
locale?: string;
|
|
8
|
+
labels: Partial<ChartLabels> & Pick<ChartLabels, 'count' | 'rest'>;
|
|
9
|
+
onLegendCut?: (hidden: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export default function SummaryChart({ item, onSelect, format, locale, labels, onLegendCut }: SummaryChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DataTableLabels } from '../labels';
|
|
2
|
+
import { type ChartLabels } from '../../Charts/labels';
|
|
3
|
+
import type { DataTableExportSummaryMode, DataTableSummaryCard } from '../types';
|
|
4
|
+
export declare function Segmented<V extends string | number>({ label, options, value, onChange }: {
|
|
5
|
+
label: string;
|
|
6
|
+
options: Array<{
|
|
7
|
+
value: V;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
value: V;
|
|
11
|
+
onChange: (value: V) => void;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
export declare const chartKindNames: (L: DataTableLabels) => ChartLabels["kinds"];
|
|
14
|
+
export declare const summaryChartLabels: (L: DataTableLabels) => ChartLabels;
|
|
15
|
+
export declare const kindLabel: (kind: DataTableSummaryCard["kind"], L: DataTableLabels) => string;
|
|
16
|
+
export declare function KindChip({ kind }: {
|
|
17
|
+
kind: DataTableSummaryCard['kind'];
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export interface SummaryChoiceCard {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
kind: DataTableSummaryCard['kind'];
|
|
23
|
+
copy: number;
|
|
24
|
+
}
|
|
25
|
+
interface SummaryChoiceProps {
|
|
26
|
+
name: string;
|
|
27
|
+
mode: DataTableExportSummaryMode;
|
|
28
|
+
cards: readonly string[];
|
|
29
|
+
options: SummaryChoiceCard[];
|
|
30
|
+
onChange: (mode: DataTableExportSummaryMode, cards: string[]) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function SummaryChoice({ name, mode, cards, options, onChange }: SummaryChoiceProps): import("react").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChartLabels } from '../../Charts/labels';
|
|
2
|
+
import type { ResolvedSummaryCard } from './summaryModel';
|
|
3
|
+
export interface SummaryImageMenuProps {
|
|
4
|
+
item: ResolvedSummaryCard;
|
|
5
|
+
report?: string;
|
|
6
|
+
context: string;
|
|
7
|
+
branding?: string;
|
|
8
|
+
format: (n: number) => string;
|
|
9
|
+
locale?: string;
|
|
10
|
+
labels: Partial<ChartLabels> & Pick<ChartLabels, 'count' | 'rest'>;
|
|
11
|
+
}
|
|
12
|
+
export default function SummaryImageMenu({ item, report, context, branding, format, locale, labels }: SummaryImageMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ChartLabels } from '../../Charts';
|
|
2
|
+
import type { GroupValue } from '../grouping/groupModel';
|
|
3
|
+
import type { TableSummaryImage } from './TableSummary';
|
|
4
|
+
import { type ResolvedSummaryCard, type SummaryBucketView } from './summaryModel';
|
|
5
|
+
type BreakdownItem = Extract<ResolvedSummaryCard, {
|
|
6
|
+
kind: 'breakdown';
|
|
7
|
+
}>;
|
|
8
|
+
export interface SummarySeeAllProps {
|
|
9
|
+
item: BreakdownItem;
|
|
10
|
+
all: SummaryBucketView[] | 'failed';
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
onSelect?: (key: string, value: GroupValue) => void;
|
|
13
|
+
image?: TableSummaryImage;
|
|
14
|
+
labels: ChartLabels;
|
|
15
|
+
}
|
|
16
|
+
export default function SummarySeeAll({ item, all, onClose, onSelect, image, labels }: SummarySeeAllProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { type Ref } from 'react';
|
|
2
|
+
import '../../Charts/Charts.css';
|
|
3
|
+
import type { DataTableSummaryBreakdownCard, DataTableSummaryStrip } from '../types';
|
|
4
|
+
import type { GroupValue } from '../grouping/groupModel';
|
|
5
|
+
import { type ResolvedSummaryCard, type SummaryBucketView, type SummaryChartCard } from './summaryModel';
|
|
6
|
+
export interface TableSummaryImage {
|
|
7
|
+
report?: string;
|
|
8
|
+
context: string;
|
|
9
|
+
branding?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TableSummaryStatus {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
failed: boolean;
|
|
14
|
+
onRetry: () => void;
|
|
15
|
+
}
|
|
16
|
+
interface TableSummaryProps {
|
|
17
|
+
strip: DataTableSummaryStrip;
|
|
18
|
+
cards: ResolvedSummaryCard[];
|
|
19
|
+
open: boolean;
|
|
20
|
+
onToggle: () => void;
|
|
21
|
+
context: string;
|
|
22
|
+
status?: TableSummaryStatus;
|
|
23
|
+
onSelect: (card: SummaryChartCard, key: string, value?: GroupValue) => void;
|
|
24
|
+
selectable: (card: SummaryChartCard) => boolean;
|
|
25
|
+
loadAll: (card: DataTableSummaryBreakdownCard) => Promise<SummaryBucketView[]>;
|
|
26
|
+
image?: TableSummaryImage;
|
|
27
|
+
rootRef?: Ref<HTMLElement>;
|
|
28
|
+
}
|
|
29
|
+
type BreakdownItem = Extract<ResolvedSummaryCard, {
|
|
30
|
+
kind: 'breakdown';
|
|
31
|
+
}>;
|
|
32
|
+
export declare function visibleValues(item: BreakdownItem, cut?: number): number;
|
|
33
|
+
declare function TableSummary({ strip, cards, open, onToggle, context, status, onSelect, selectable, loadAll, image, rootRef }: TableSummaryProps): React.JSX.Element;
|
|
34
|
+
export default TableSummary;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type DataTableAuthorize, type DataTableSummaryPeriod, type DataTableColumn, type DataTableSummaryBreakdownCard, type DataTableSummaryCard, type DataTableSummaryChart, type DataTableSummaryConfig, type DataTableSummaryPlacement, type DataTableSummaryPrefs, type DataTableSummaryTrendCard, type DataTableSummaryShow, type DataTableSummaryStrip, type DataTableSummaryUserCard, type DataTableSummaryWidth } from '../types';
|
|
2
|
+
import type { DataTableLabels } from '../labels';
|
|
3
|
+
import { type SummaryItem } from './summaryModel';
|
|
4
|
+
export interface SummaryEntry<T = any> {
|
|
5
|
+
key: string;
|
|
6
|
+
strip: DataTableSummaryStrip;
|
|
7
|
+
on: boolean;
|
|
8
|
+
card: DataTableSummaryCard<T>;
|
|
9
|
+
width: DataTableSummaryWidth;
|
|
10
|
+
own: boolean;
|
|
11
|
+
copy: number;
|
|
12
|
+
defaultTitle: string;
|
|
13
|
+
}
|
|
14
|
+
export type SummaryLayout<T = any> = Record<DataTableSummaryStrip, SummaryEntry<T>[]>;
|
|
15
|
+
export type SummaryArrangement = Record<DataTableSummaryStrip, DataTableSummaryPlacement[]>;
|
|
16
|
+
export declare function summaryBreakdownColumns<T>(columns: DataTableColumn<T>[], opts: {
|
|
17
|
+
serverMode: boolean;
|
|
18
|
+
fields?: readonly string[];
|
|
19
|
+
}): DataTableColumn<T>[];
|
|
20
|
+
export declare const userCardTitle: (column: DataTableColumn | undefined, key: string, byColumn: (header: string) => string) => string;
|
|
21
|
+
export declare function userCard(own: DataTableSummaryUserCard, title: string): DataTableSummaryBreakdownCard;
|
|
22
|
+
export declare const defaultWidth: (card: DataTableSummaryCard) => DataTableSummaryWidth;
|
|
23
|
+
export declare function placedCard<T>(card: DataTableSummaryCard<T>, p: DataTableSummaryPlacement): DataTableSummaryCard<T>;
|
|
24
|
+
export declare const trendCountAllowed: (period: DataTableSummaryPeriod, count: number) => boolean;
|
|
25
|
+
export declare function trendCounts(card: DataTableSummaryTrendCard): readonly number[];
|
|
26
|
+
export declare function trendRange(period: DataTableSummaryPeriod, count: number): {
|
|
27
|
+
unit: 'day' | 'month' | 'year';
|
|
28
|
+
n: number;
|
|
29
|
+
};
|
|
30
|
+
export declare function trendRangeName(period: DataTableSummaryPeriod, count: number, L: Pick<DataTableLabels, 'summaryDays' | 'summaryMonths' | 'summaryYears'>, num?: (n: number) => string): string;
|
|
31
|
+
export declare function defaultArrangement(config: DataTableSummaryConfig | undefined, own?: readonly DataTableSummaryUserCard[]): SummaryArrangement;
|
|
32
|
+
export declare function summaryArrangement(config: DataTableSummaryConfig | undefined, prefs: DataTableSummaryPrefs | undefined): SummaryArrangement;
|
|
33
|
+
export interface SummaryCatalogueContext<T> {
|
|
34
|
+
columns: DataTableColumn<T>[];
|
|
35
|
+
authorize?: DataTableAuthorize;
|
|
36
|
+
breakdownColumns: ReadonlySet<string>;
|
|
37
|
+
byColumn: (header: string) => string;
|
|
38
|
+
}
|
|
39
|
+
export declare function summaryCards<T>(config: DataTableSummaryConfig<T> | undefined, prefs: DataTableSummaryPrefs | undefined, ctx: SummaryCatalogueContext<T>): Map<string, {
|
|
40
|
+
card: DataTableSummaryCard<T>;
|
|
41
|
+
own: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function summaryLayout<T>(config: DataTableSummaryConfig<T> | undefined, prefs: DataTableSummaryPrefs | undefined, ctx: SummaryCatalogueContext<T>): SummaryLayout<T>;
|
|
44
|
+
export declare const shownItems: <T>(entries: SummaryEntry<T>[]) => SummaryItem<T>[];
|
|
45
|
+
export declare const allEntries: <T>(layout: SummaryLayout<T>) => SummaryEntry<T>[];
|
|
46
|
+
export type SummaryPlacementChange = Partial<Pick<DataTableSummaryPlacement, 'title' | 'chart' | 'show' | 'count' | 'width'>>;
|
|
47
|
+
export declare function arrangementPrefs(config: DataTableSummaryConfig | undefined, prefs: DataTableSummaryPrefs | undefined, next: SummaryArrangement): DataTableSummaryPrefs;
|
|
48
|
+
export declare const placementCount: (a: SummaryArrangement) => number;
|
|
49
|
+
export declare const withPlacementOn: (prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, key: string, on: boolean) => DataTableSummaryPrefs;
|
|
50
|
+
export declare function withPlacementChange(prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, key: string, change: SummaryPlacementChange): DataTableSummaryPrefs;
|
|
51
|
+
export declare function withStripOrder(prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, order: Record<DataTableSummaryStrip, string[]>): DataTableSummaryPrefs;
|
|
52
|
+
export declare const newPlacementKey: () => string;
|
|
53
|
+
export declare const newUserCardId: () => string;
|
|
54
|
+
export declare function withDuplicate(prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, key: string, strip: DataTableSummaryStrip, copyKey?: string): DataTableSummaryPrefs;
|
|
55
|
+
export declare function withMove(prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, key: string, strip: DataTableSummaryStrip): DataTableSummaryPrefs;
|
|
56
|
+
export declare const withoutCopy: (prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, key: string) => DataTableSummaryPrefs;
|
|
57
|
+
export interface SummaryUserCardDraft {
|
|
58
|
+
column: string;
|
|
59
|
+
chart: DataTableSummaryChart;
|
|
60
|
+
show?: DataTableSummaryShow;
|
|
61
|
+
strip: DataTableSummaryStrip;
|
|
62
|
+
}
|
|
63
|
+
export declare function withUserCard(prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, draft: SummaryUserCardDraft, id?: string): DataTableSummaryPrefs;
|
|
64
|
+
export declare function withoutUserCard(prefs: DataTableSummaryPrefs | undefined, config: DataTableSummaryConfig | undefined, id: string): DataTableSummaryPrefs;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChartData, type ChartDataWords, type ChartKind } from '../../Charts/chartData';
|
|
2
|
+
import type { ChartImageChart } from '../../Charts/chartImage';
|
|
3
|
+
import { type ResolvedSummaryCard, type SummaryBucketView } from './summaryModel';
|
|
4
|
+
export declare function bucketValues(item: Extract<ResolvedSummaryCard, {
|
|
5
|
+
kind: 'breakdown';
|
|
6
|
+
}>, buckets: readonly SummaryBucketView[]): ChartData;
|
|
7
|
+
export declare function summaryData(item: ResolvedSummaryCard): ChartData;
|
|
8
|
+
export declare const summaryKind: (item: ResolvedSummaryCard) => ChartKind;
|
|
9
|
+
export declare const summaryChartData: (item: ResolvedSummaryCard, words: ChartDataWords) => ChartImageChart;
|