@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,1145 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { ChartProgressColor, ChartSlot, TrendGood } from '../Charts';
|
|
3
|
+
import type { DataTableLabels } from './labels';
|
|
4
|
+
export type DataTableFlashColor = 'green' | 'red' | 'amber' | 'blue' | 'purple' | 'teal' | 'orange' | 'pink';
|
|
5
|
+
export interface DataTableFlashColors {
|
|
6
|
+
up?: DataTableFlashColor;
|
|
7
|
+
down?: DataTableFlashColor;
|
|
8
|
+
changed?: DataTableFlashColor;
|
|
9
|
+
}
|
|
10
|
+
export type DataTableCellFlashStyle = 'cell' | 'text' | 'border';
|
|
11
|
+
export type DataTableLayout = 'table' | 'cards' | 'split';
|
|
12
|
+
export interface DataTableCardFields {
|
|
13
|
+
title: string[];
|
|
14
|
+
subtitle: string[];
|
|
15
|
+
badge: string[];
|
|
16
|
+
details: string[];
|
|
17
|
+
more: string[];
|
|
18
|
+
}
|
|
19
|
+
export type DataTableCardField = keyof DataTableCardFields;
|
|
20
|
+
export declare const CARD_FIELD_LIMITS: Readonly<Record<DataTableCardField, number>>;
|
|
21
|
+
export interface DataTableListFields {
|
|
22
|
+
title: string[];
|
|
23
|
+
subtitle: string[];
|
|
24
|
+
badge: string[];
|
|
25
|
+
}
|
|
26
|
+
export type DataTableListField = keyof DataTableListFields;
|
|
27
|
+
export declare const LIST_FIELD_LIMITS: Readonly<Record<DataTableListField, number>>;
|
|
28
|
+
export type DataTableColumnType = 'string' | 'number' | 'date' | 'boolean' | 'select' | 'array';
|
|
29
|
+
export interface DataTableCellStyle {
|
|
30
|
+
color?: string;
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
fontWeight?: 'normal' | 'bold';
|
|
33
|
+
fontSize?: number;
|
|
34
|
+
align?: 'left' | 'center' | 'right';
|
|
35
|
+
}
|
|
36
|
+
export interface DataTableColumn<TData = any> {
|
|
37
|
+
key: string;
|
|
38
|
+
header: string;
|
|
39
|
+
type?: DataTableColumnType;
|
|
40
|
+
cell?: (value: any, row: TData, index: number) => ReactNode;
|
|
41
|
+
sortable?: boolean;
|
|
42
|
+
filterable?: boolean;
|
|
43
|
+
hideable?: boolean;
|
|
44
|
+
defaultHidden?: boolean;
|
|
45
|
+
summable?: boolean;
|
|
46
|
+
sticky?: 'left' | 'right';
|
|
47
|
+
align?: 'left' | 'center' | 'right';
|
|
48
|
+
width?: number;
|
|
49
|
+
minWidth?: number;
|
|
50
|
+
filterOptions?: Array<{
|
|
51
|
+
label: string;
|
|
52
|
+
value: any;
|
|
53
|
+
}>;
|
|
54
|
+
filterAccessor?: (value: any) => any;
|
|
55
|
+
field?: string;
|
|
56
|
+
groupable?: boolean;
|
|
57
|
+
authorized?: boolean;
|
|
58
|
+
license?: DataTableLicense;
|
|
59
|
+
flashStyle?: DataTableCellFlashStyle;
|
|
60
|
+
flashBadge?: boolean;
|
|
61
|
+
flashColors?: DataTableFlashColors;
|
|
62
|
+
statusColors?: Record<string, DataTableFlashColor>;
|
|
63
|
+
cellStyle?: (value: any, row: TData) => DataTableCellStyle | undefined;
|
|
64
|
+
exportValue?: (value: any, row: TData) => string | number;
|
|
65
|
+
exportHeader?: string;
|
|
66
|
+
exportable?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface DataTableFilterCondition {
|
|
69
|
+
id: string;
|
|
70
|
+
column: string;
|
|
71
|
+
operator: string;
|
|
72
|
+
value: any;
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface DataTableFilterGroup {
|
|
76
|
+
id: string;
|
|
77
|
+
logic: 'AND' | 'OR';
|
|
78
|
+
negated?: boolean;
|
|
79
|
+
conditions: (DataTableFilterCondition | DataTableFilterGroup)[];
|
|
80
|
+
}
|
|
81
|
+
export interface DataTableActiveFilter {
|
|
82
|
+
id: string;
|
|
83
|
+
column: string;
|
|
84
|
+
columnLabel: string;
|
|
85
|
+
operator: string;
|
|
86
|
+
operatorLabel: string;
|
|
87
|
+
value: any;
|
|
88
|
+
displayValue: string;
|
|
89
|
+
}
|
|
90
|
+
export interface DataTableQuickFilter {
|
|
91
|
+
id: string;
|
|
92
|
+
label: string;
|
|
93
|
+
conditions: DataTableFilterCondition[];
|
|
94
|
+
logic?: 'AND' | 'OR';
|
|
95
|
+
}
|
|
96
|
+
export type DataTableQuickFilterMode = 'single' | 'multi';
|
|
97
|
+
export interface DataTableSavedFilter {
|
|
98
|
+
id: string;
|
|
99
|
+
label: string;
|
|
100
|
+
filterGroup: DataTableFilterGroup;
|
|
101
|
+
isDefault?: boolean;
|
|
102
|
+
createdAt?: number;
|
|
103
|
+
disabled?: DataTableSavedFilterIssue;
|
|
104
|
+
}
|
|
105
|
+
export interface DataTableSavedFilterIssue {
|
|
106
|
+
reason: 'column' | 'operator' | 'value';
|
|
107
|
+
column: string;
|
|
108
|
+
}
|
|
109
|
+
export type DataTableLicense = Record<string, unknown>;
|
|
110
|
+
export type DataTableSummaryStrip = 'top' | 'bottom';
|
|
111
|
+
export declare const SUMMARY_STRIPS: readonly DataTableSummaryStrip[];
|
|
112
|
+
export interface DataTableSummaryFigure<TData = any> {
|
|
113
|
+
id: string;
|
|
114
|
+
compute?: (rows: TData[]) => number;
|
|
115
|
+
}
|
|
116
|
+
export interface DataTableSummarySubline<TData = any> {
|
|
117
|
+
label: string;
|
|
118
|
+
value: DataTableSummaryFigure<TData>;
|
|
119
|
+
text?: (formatted: string) => string;
|
|
120
|
+
}
|
|
121
|
+
export type DataTableSummaryChart = 'donut' | 'pie' | 'bars' | 'stacked' | 'treemap';
|
|
122
|
+
export type DataTableSummaryTrendChart = 'columns' | 'line' | 'area' | 'grouped' | 'stacked' | 'calendar';
|
|
123
|
+
export type DataTableSummaryValueChart = 'number' | 'numberTrend';
|
|
124
|
+
export type DataTableSummaryRatioChart = 'bar' | 'gauge' | 'ring' | 'donut' | 'pie';
|
|
125
|
+
export type DataTableSummaryAnyChart = DataTableSummaryChart | DataTableSummaryTrendChart | DataTableSummaryValueChart | DataTableSummaryRatioChart | 'funnel';
|
|
126
|
+
export declare const SUMMARY_KIND_CHARTS: {
|
|
127
|
+
readonly value: readonly ["number", "numberTrend"];
|
|
128
|
+
readonly ratio: readonly ["bar", "gauge", "ring", "donut", "pie"];
|
|
129
|
+
readonly breakdown: readonly ["donut", "pie", "bars", "stacked", "treemap"];
|
|
130
|
+
readonly trend: readonly ["columns", "line", "area", "grouped", "stacked", "calendar"];
|
|
131
|
+
readonly funnel: readonly ["funnel"];
|
|
132
|
+
};
|
|
133
|
+
export type DataTableSummaryWidth = 'auto' | 'quarter' | 'half' | 'full';
|
|
134
|
+
export declare const SUMMARY_WIDTHS: readonly DataTableSummaryWidth[];
|
|
135
|
+
export type DataTableSummaryShow = 'top5' | 'top10' | 'least5' | 'least10' | 'all';
|
|
136
|
+
export declare const SUMMARY_SHOWS: readonly DataTableSummaryShow[];
|
|
137
|
+
export type DataTableSummaryPart = {
|
|
138
|
+
from: 'top' | 'least';
|
|
139
|
+
count: number;
|
|
140
|
+
} | {
|
|
141
|
+
from: 'all';
|
|
142
|
+
};
|
|
143
|
+
export interface DataTableSummaryCardContext<TData = any> {
|
|
144
|
+
query: DataTableQuery;
|
|
145
|
+
serverMode: boolean;
|
|
146
|
+
rows: TData[];
|
|
147
|
+
}
|
|
148
|
+
interface DataTableSummaryCardBase {
|
|
149
|
+
id: string;
|
|
150
|
+
title: string;
|
|
151
|
+
showWhen?: (ctx: DataTableSummaryCardContext<any>) => boolean;
|
|
152
|
+
unavailable?: string;
|
|
153
|
+
default?: boolean;
|
|
154
|
+
strip?: DataTableSummaryStrip;
|
|
155
|
+
width?: DataTableSummaryWidth;
|
|
156
|
+
license?: DataTableLicense;
|
|
157
|
+
authorize?: () => boolean;
|
|
158
|
+
}
|
|
159
|
+
export type DataTableSummaryPeriod = 'month' | 'day';
|
|
160
|
+
export interface DataTableSummaryValueTrend {
|
|
161
|
+
column: string;
|
|
162
|
+
period: DataTableSummaryPeriod;
|
|
163
|
+
count: number;
|
|
164
|
+
good?: TrendGood;
|
|
165
|
+
}
|
|
166
|
+
export interface DataTableSummaryValueCard<TData = any> extends DataTableSummaryCardBase {
|
|
167
|
+
kind: 'value';
|
|
168
|
+
value: DataTableSummaryFigure<TData>;
|
|
169
|
+
sub?: DataTableSummarySubline<TData>;
|
|
170
|
+
chart?: DataTableSummaryValueChart;
|
|
171
|
+
trend?: DataTableSummaryValueTrend;
|
|
172
|
+
}
|
|
173
|
+
export interface DataTableSummaryRatioCard<TData = any> extends DataTableSummaryCardBase {
|
|
174
|
+
kind: 'ratio';
|
|
175
|
+
value: DataTableSummaryFigure<TData>;
|
|
176
|
+
total: DataTableSummaryFigure<TData>;
|
|
177
|
+
color?: ChartProgressColor;
|
|
178
|
+
sub?: DataTableSummarySubline<TData>;
|
|
179
|
+
chart?: DataTableSummaryRatioChart;
|
|
180
|
+
}
|
|
181
|
+
export interface DataTableSummaryBreakdownCard extends DataTableSummaryCardBase {
|
|
182
|
+
kind: 'breakdown';
|
|
183
|
+
column: string;
|
|
184
|
+
chart?: DataTableSummaryChart;
|
|
185
|
+
show?: DataTableSummaryShow;
|
|
186
|
+
slots?: Record<string, ChartSlot>;
|
|
187
|
+
within?: string;
|
|
188
|
+
}
|
|
189
|
+
export interface DataTableSummaryTrendCard extends DataTableSummaryCardBase {
|
|
190
|
+
kind: 'trend';
|
|
191
|
+
column: string;
|
|
192
|
+
period: DataTableSummaryPeriod;
|
|
193
|
+
count: number;
|
|
194
|
+
counts?: readonly number[];
|
|
195
|
+
chart?: DataTableSummaryTrendChart;
|
|
196
|
+
split?: string;
|
|
197
|
+
slots?: Record<string, ChartSlot>;
|
|
198
|
+
}
|
|
199
|
+
export interface DataTableSummaryFunnelStep<TData = any> {
|
|
200
|
+
id: string;
|
|
201
|
+
label: string;
|
|
202
|
+
value: DataTableSummaryFigure<TData>;
|
|
203
|
+
condition?: Pick<DataTableFilterCondition, 'column' | 'operator' | 'value'>;
|
|
204
|
+
slot?: ChartSlot;
|
|
205
|
+
}
|
|
206
|
+
export interface DataTableSummaryFunnelCard<TData = any> extends DataTableSummaryCardBase {
|
|
207
|
+
kind: 'funnel';
|
|
208
|
+
steps: DataTableSummaryFunnelStep<TData>[];
|
|
209
|
+
}
|
|
210
|
+
export type DataTableSummaryCard<TData = any> = DataTableSummaryValueCard<TData> | DataTableSummaryRatioCard<TData> | DataTableSummaryBreakdownCard | DataTableSummaryTrendCard | DataTableSummaryFunnelCard<TData>;
|
|
211
|
+
export interface DataTableSummaryConfig<TData = any> {
|
|
212
|
+
cards: DataTableSummaryCard<TData>[];
|
|
213
|
+
}
|
|
214
|
+
export declare const SUMMARY_TREND_COUNTS: {
|
|
215
|
+
readonly month: readonly [3, 6, 12, 24, 36];
|
|
216
|
+
readonly day: readonly [30, 91, 182, 365];
|
|
217
|
+
};
|
|
218
|
+
export declare const SUMMARY_TREND_COUNT_BOUNDS: {
|
|
219
|
+
readonly month: {
|
|
220
|
+
readonly min: 1;
|
|
221
|
+
readonly max: 60;
|
|
222
|
+
};
|
|
223
|
+
readonly day: {
|
|
224
|
+
readonly min: 7;
|
|
225
|
+
readonly max: 400;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
export declare const SUMMARY_USER_CARDS_MAX = 6;
|
|
229
|
+
export declare const SUMMARY_PLACEMENTS_MAX = 24;
|
|
230
|
+
export interface DataTableSummaryPlacement {
|
|
231
|
+
key: string;
|
|
232
|
+
card: string;
|
|
233
|
+
on: boolean;
|
|
234
|
+
title?: string;
|
|
235
|
+
chart?: DataTableSummaryAnyChart;
|
|
236
|
+
show?: DataTableSummaryShow;
|
|
237
|
+
count?: number;
|
|
238
|
+
width?: DataTableSummaryWidth;
|
|
239
|
+
}
|
|
240
|
+
export interface DataTableSummaryUserCard {
|
|
241
|
+
id: string;
|
|
242
|
+
column: string;
|
|
243
|
+
chart: DataTableSummaryChart;
|
|
244
|
+
}
|
|
245
|
+
export interface DataTableSummaryPrefs {
|
|
246
|
+
top?: DataTableSummaryPlacement[];
|
|
247
|
+
bottom?: DataTableSummaryPlacement[];
|
|
248
|
+
own?: DataTableSummaryUserCard[];
|
|
249
|
+
}
|
|
250
|
+
export type DataTableExportSummaryMode = 'shown' | 'chosen' | 'none';
|
|
251
|
+
export interface DataTableSummaryRequest {
|
|
252
|
+
values: string[];
|
|
253
|
+
cards: DataTableSummaryCardRequest[];
|
|
254
|
+
}
|
|
255
|
+
export type DataTableSummaryCardRequest = {
|
|
256
|
+
key: string;
|
|
257
|
+
id: string;
|
|
258
|
+
kind: 'breakdown';
|
|
259
|
+
field: string;
|
|
260
|
+
part: DataTableSummaryPart;
|
|
261
|
+
within?: string;
|
|
262
|
+
} | {
|
|
263
|
+
key: string;
|
|
264
|
+
id: string;
|
|
265
|
+
kind: 'trend';
|
|
266
|
+
field: string;
|
|
267
|
+
period: DataTableSummaryPeriod;
|
|
268
|
+
count: number;
|
|
269
|
+
split?: string;
|
|
270
|
+
} | {
|
|
271
|
+
key: string;
|
|
272
|
+
id: string;
|
|
273
|
+
kind: 'series';
|
|
274
|
+
value: string;
|
|
275
|
+
field: string;
|
|
276
|
+
period: DataTableSummaryPeriod;
|
|
277
|
+
count: number;
|
|
278
|
+
} | {
|
|
279
|
+
key: string;
|
|
280
|
+
id: string;
|
|
281
|
+
kind: 'funnel';
|
|
282
|
+
steps: string[];
|
|
283
|
+
};
|
|
284
|
+
export interface DataTableSummaryBucket {
|
|
285
|
+
value: string | number | boolean | null;
|
|
286
|
+
label?: string | null;
|
|
287
|
+
count: number;
|
|
288
|
+
children?: DataTableSummaryBucket[];
|
|
289
|
+
}
|
|
290
|
+
export interface DataTableSummaryPeriodCount {
|
|
291
|
+
period: string;
|
|
292
|
+
count: number;
|
|
293
|
+
split?: DataTableSummaryBucket[];
|
|
294
|
+
}
|
|
295
|
+
export interface DataTableSummaryBreakdown {
|
|
296
|
+
buckets: DataTableSummaryBucket[];
|
|
297
|
+
others: number;
|
|
298
|
+
values: number;
|
|
299
|
+
}
|
|
300
|
+
export interface DataTableSummaryFigures {
|
|
301
|
+
values?: Record<string, number>;
|
|
302
|
+
breakdowns?: Record<string, DataTableSummaryBreakdown>;
|
|
303
|
+
trends?: Record<string, DataTableSummaryPeriodCount[]>;
|
|
304
|
+
series?: Record<string, {
|
|
305
|
+
points: Array<{
|
|
306
|
+
period: string;
|
|
307
|
+
count: number;
|
|
308
|
+
}>;
|
|
309
|
+
previous: number;
|
|
310
|
+
}>;
|
|
311
|
+
funnels?: Record<string, Record<string, number>>;
|
|
312
|
+
}
|
|
313
|
+
type ActionVariant = 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
|
|
314
|
+
export interface DataTableRowAction<TData = any> {
|
|
315
|
+
id: string;
|
|
316
|
+
label?: string | ((row: TData) => string);
|
|
317
|
+
icon?: ReactNode | ((row: TData) => ReactNode);
|
|
318
|
+
onClick: (row: TData, index: number) => void;
|
|
319
|
+
variant?: ActionVariant | ((row: TData) => ActionVariant);
|
|
320
|
+
showWhen?: (row: TData) => boolean;
|
|
321
|
+
disabledWhen?: (row: TData) => boolean;
|
|
322
|
+
tooltip?: string | ((row: TData) => string);
|
|
323
|
+
primary?: boolean | ((row: TData) => boolean);
|
|
324
|
+
shortcut?: string;
|
|
325
|
+
}
|
|
326
|
+
export type DataTableKeyboardConfig = boolean | {
|
|
327
|
+
shortcuts?: boolean;
|
|
328
|
+
};
|
|
329
|
+
export interface DataTableShortcut<TData = any> {
|
|
330
|
+
key: string;
|
|
331
|
+
label: string;
|
|
332
|
+
run: (ctx: {
|
|
333
|
+
row: TData | null;
|
|
334
|
+
selectedRows: TData[];
|
|
335
|
+
query: DataTableQuery;
|
|
336
|
+
}) => void;
|
|
337
|
+
needsRow?: boolean;
|
|
338
|
+
showWhen?: (row: TData | null) => boolean;
|
|
339
|
+
disabledWhen?: (row: TData | null) => boolean;
|
|
340
|
+
}
|
|
341
|
+
export type DataTableVirtualizeConfig = boolean | {
|
|
342
|
+
overscan?: number;
|
|
343
|
+
estimateRowHeight?: number;
|
|
344
|
+
maxHeight?: number | string;
|
|
345
|
+
};
|
|
346
|
+
export interface DataTableGroupingConfig {
|
|
347
|
+
maxDepth?: number;
|
|
348
|
+
defaultGroupBy?: string[];
|
|
349
|
+
}
|
|
350
|
+
export interface DataTableGroupPathItem {
|
|
351
|
+
key: string;
|
|
352
|
+
field: string;
|
|
353
|
+
value: string | number | boolean | null;
|
|
354
|
+
}
|
|
355
|
+
export interface DataTableGroupResult {
|
|
356
|
+
value: string | number | boolean | null;
|
|
357
|
+
label?: string | null;
|
|
358
|
+
count: number;
|
|
359
|
+
aggregates?: Record<string, number | string>;
|
|
360
|
+
}
|
|
361
|
+
export interface DataTableGroupSummaryContext<TData = any> {
|
|
362
|
+
count: number;
|
|
363
|
+
rows?: TData[];
|
|
364
|
+
aggregates?: Record<string, number | string>;
|
|
365
|
+
}
|
|
366
|
+
export interface DataTableViewState {
|
|
367
|
+
search?: string;
|
|
368
|
+
filterGroup?: DataTableFilterGroup;
|
|
369
|
+
quickFilterIds?: string[];
|
|
370
|
+
sorting?: Array<{
|
|
371
|
+
key: string;
|
|
372
|
+
desc: boolean;
|
|
373
|
+
}>;
|
|
374
|
+
grouping?: string[];
|
|
375
|
+
layout?: DataTableLayout;
|
|
376
|
+
columns?: {
|
|
377
|
+
visibility?: Record<string, boolean>;
|
|
378
|
+
order?: string[];
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
export interface DataTableSharedView {
|
|
382
|
+
id: string;
|
|
383
|
+
viewKey: string;
|
|
384
|
+
label: string;
|
|
385
|
+
state: DataTableViewState;
|
|
386
|
+
ownerName: string;
|
|
387
|
+
mine?: boolean;
|
|
388
|
+
audienceIds?: string[];
|
|
389
|
+
}
|
|
390
|
+
export interface DataTableShareAudience {
|
|
391
|
+
id: string;
|
|
392
|
+
label: string;
|
|
393
|
+
group?: string;
|
|
394
|
+
}
|
|
395
|
+
export interface DataTableSharing {
|
|
396
|
+
listShared: (tableId: string) => Promise<DataTableSharedView[]>;
|
|
397
|
+
audiences: () => Promise<DataTableShareAudience[]>;
|
|
398
|
+
publish: (view: {
|
|
399
|
+
tableId: string;
|
|
400
|
+
viewKey: string;
|
|
401
|
+
label: string;
|
|
402
|
+
state: DataTableViewState;
|
|
403
|
+
}, audienceIds: string[]) => Promise<DataTableSharedView>;
|
|
404
|
+
unpublish: (viewId: string) => Promise<void>;
|
|
405
|
+
}
|
|
406
|
+
export type DataTableSelection<TData = any> = {
|
|
407
|
+
kind: 'none';
|
|
408
|
+
query: DataTableQuery;
|
|
409
|
+
count: number;
|
|
410
|
+
} | {
|
|
411
|
+
kind: 'rows';
|
|
412
|
+
query: DataTableQuery;
|
|
413
|
+
count: number;
|
|
414
|
+
ids: string[];
|
|
415
|
+
rows: TData[];
|
|
416
|
+
} | {
|
|
417
|
+
kind: 'query';
|
|
418
|
+
query: DataTableQuery;
|
|
419
|
+
count: number;
|
|
420
|
+
} | {
|
|
421
|
+
kind: 'group';
|
|
422
|
+
query: DataTableQuery;
|
|
423
|
+
count: number;
|
|
424
|
+
path: DataTableGroupPathItem[];
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
export interface DataTableBulkConfirm {
|
|
428
|
+
title?: string;
|
|
429
|
+
message?: ReactNode;
|
|
430
|
+
confirmLabel?: string;
|
|
431
|
+
danger?: boolean;
|
|
432
|
+
input?: {
|
|
433
|
+
label: string;
|
|
434
|
+
placeholder?: string;
|
|
435
|
+
required?: boolean;
|
|
436
|
+
maxLength?: number;
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
export interface DataTableBulkActionContext<TData = any> {
|
|
440
|
+
selection: DataTableSelection<TData>;
|
|
441
|
+
rows: TData[];
|
|
442
|
+
skipped: Array<{
|
|
443
|
+
row: TData;
|
|
444
|
+
reason: string;
|
|
445
|
+
}>;
|
|
446
|
+
input?: string;
|
|
447
|
+
}
|
|
448
|
+
export interface DataTableBulkActionResult {
|
|
449
|
+
done?: number;
|
|
450
|
+
skipped?: number;
|
|
451
|
+
reason?: string;
|
|
452
|
+
message?: string;
|
|
453
|
+
status?: 'success' | 'warning' | 'error';
|
|
454
|
+
undo?: () => Promise<void> | void;
|
|
455
|
+
keepSelection?: boolean;
|
|
456
|
+
}
|
|
457
|
+
export interface DataTableBulkAction<TData = any> {
|
|
458
|
+
id: string;
|
|
459
|
+
label: string;
|
|
460
|
+
icon?: ReactNode;
|
|
461
|
+
variant?: ActionVariant;
|
|
462
|
+
display?: 'icon' | 'label' | 'icon-label';
|
|
463
|
+
tooltip?: string;
|
|
464
|
+
views?: string[];
|
|
465
|
+
authorize?: () => boolean;
|
|
466
|
+
eligible?: (row: TData) => boolean | string;
|
|
467
|
+
minSelected?: number;
|
|
468
|
+
maxSelected?: number;
|
|
469
|
+
allowAllMatching?: boolean;
|
|
470
|
+
confirm?: boolean | DataTableBulkConfirm | ((ctx: {
|
|
471
|
+
count: number;
|
|
472
|
+
skipped: number;
|
|
473
|
+
selection: DataTableSelection<TData>;
|
|
474
|
+
}) => DataTableBulkConfirm | false);
|
|
475
|
+
undoTimeoutMs?: number;
|
|
476
|
+
onRun: (ctx: DataTableBulkActionContext<TData>) => Promise<DataTableBulkActionResult | void> | DataTableBulkActionResult | void;
|
|
477
|
+
}
|
|
478
|
+
export interface DataTableColumnPinning {
|
|
479
|
+
left: string[];
|
|
480
|
+
right: string[];
|
|
481
|
+
}
|
|
482
|
+
export interface DataTablePinningConfig {
|
|
483
|
+
selection?: boolean;
|
|
484
|
+
actions?: boolean;
|
|
485
|
+
enabled?: boolean;
|
|
486
|
+
firstColumn?: boolean;
|
|
487
|
+
}
|
|
488
|
+
export interface DataTableRowMenuItem<TData = any> {
|
|
489
|
+
id: string;
|
|
490
|
+
label: string | ((row: TData) => string);
|
|
491
|
+
icon?: ReactNode | ((row: TData) => ReactNode);
|
|
492
|
+
onClick: (row: TData) => void;
|
|
493
|
+
showWhen?: (row: TData) => boolean;
|
|
494
|
+
variant?: 'default' | 'danger';
|
|
495
|
+
shortcut?: string;
|
|
496
|
+
}
|
|
497
|
+
export type DataTableRowMenuBuiltIn = 'open' | 'copyCell' | 'copyRow' | 'select' | 'only' | 'hide' | 'openInNewTab';
|
|
498
|
+
export interface DataTableRowMenuIconAction<TData = any> {
|
|
499
|
+
id: string;
|
|
500
|
+
label: string | ((row: TData) => string);
|
|
501
|
+
shortLabel?: string;
|
|
502
|
+
icon: ReactNode;
|
|
503
|
+
onClick: (row: TData) => void;
|
|
504
|
+
showWhen?: (row: TData) => boolean;
|
|
505
|
+
disabledWhen?: (row: TData) => boolean;
|
|
506
|
+
shortcut?: string;
|
|
507
|
+
}
|
|
508
|
+
export interface DataTableRowMenuConfig<TData = any> {
|
|
509
|
+
enabled?: boolean;
|
|
510
|
+
items?: DataTableRowMenuItem<TData>[];
|
|
511
|
+
onOpen?: (row: TData) => void;
|
|
512
|
+
openView?: (row: TData) => ComponentType<{
|
|
513
|
+
row: TData;
|
|
514
|
+
closeModal: () => void;
|
|
515
|
+
}> | null | undefined;
|
|
516
|
+
openHeader?: ReactNode | ((row: TData) => ReactNode);
|
|
517
|
+
openSubheader?: ReactNode | ((row: TData) => ReactNode);
|
|
518
|
+
openFooter?: ReactNode | ((row: TData) => ReactNode);
|
|
519
|
+
openOn?: 'click' | 'doubleClick';
|
|
520
|
+
longPress?: 'menu' | 'open';
|
|
521
|
+
builtIns?: DataTableRowMenuBuiltIn[];
|
|
522
|
+
iconActions?: DataTableRowMenuIconAction<TData>[];
|
|
523
|
+
getRowHref?: (row: TData) => string | undefined;
|
|
524
|
+
}
|
|
525
|
+
export type DataTableDetailMode = 'pane' | 'drawer' | 'fullscreen';
|
|
526
|
+
export interface DataTableDetailContext {
|
|
527
|
+
id: string;
|
|
528
|
+
mode: DataTableDetailMode;
|
|
529
|
+
close: () => void;
|
|
530
|
+
position?: {
|
|
531
|
+
index: number;
|
|
532
|
+
count: number;
|
|
533
|
+
};
|
|
534
|
+
prev?: () => void;
|
|
535
|
+
next?: () => void;
|
|
536
|
+
}
|
|
537
|
+
export type DataTableDetailRenderer<TData = any> = (row: TData | null, ctx: DataTableDetailContext) => ReactNode;
|
|
538
|
+
export interface RowMenuState {
|
|
539
|
+
visible: boolean;
|
|
540
|
+
x: number;
|
|
541
|
+
y: number;
|
|
542
|
+
row: any | null;
|
|
543
|
+
}
|
|
544
|
+
export interface DataTableSingleRowField {
|
|
545
|
+
key: string;
|
|
546
|
+
label: string;
|
|
547
|
+
formatter?: (val: any, row: any) => ReactNode;
|
|
548
|
+
span?: number;
|
|
549
|
+
}
|
|
550
|
+
export interface DataTableSingleRowAction {
|
|
551
|
+
id: string;
|
|
552
|
+
label: string;
|
|
553
|
+
icon?: ReactNode;
|
|
554
|
+
onClick: (row: any) => void;
|
|
555
|
+
variant?: string;
|
|
556
|
+
}
|
|
557
|
+
export interface DataTableSingleRowView {
|
|
558
|
+
enabled?: boolean;
|
|
559
|
+
fields?: DataTableSingleRowField[];
|
|
560
|
+
actions?: DataTableSingleRowAction[];
|
|
561
|
+
}
|
|
562
|
+
export interface DataTableComponentProps<TData = any> {
|
|
563
|
+
data: TData[];
|
|
564
|
+
rows: TData[];
|
|
565
|
+
selectedRows: TData[];
|
|
566
|
+
resultData: TData[];
|
|
567
|
+
tabletitleaddon: string;
|
|
568
|
+
visibleColumns: string[];
|
|
569
|
+
allColumns: string[];
|
|
570
|
+
filters: DataTableActiveFilter[];
|
|
571
|
+
context?: Record<string, any>;
|
|
572
|
+
}
|
|
573
|
+
export interface DataTableSelectionConfig<TData = any> {
|
|
574
|
+
mode: 'single' | 'multiple';
|
|
575
|
+
onSelectionChange?: (rows: TData[]) => void;
|
|
576
|
+
isSelectable?: (row: TData) => boolean;
|
|
577
|
+
show?: DataTableSelectionShow;
|
|
578
|
+
}
|
|
579
|
+
export type DataTableSelectionShow = 'onDemand' | 'always';
|
|
580
|
+
export interface DataTablePaginationConfig {
|
|
581
|
+
pageSize?: number;
|
|
582
|
+
pageSizeOptions?: number[];
|
|
583
|
+
}
|
|
584
|
+
export interface DataTableSortingConfig {
|
|
585
|
+
multiSort?: boolean;
|
|
586
|
+
defaultSort?: Array<{
|
|
587
|
+
key: string;
|
|
588
|
+
desc: boolean;
|
|
589
|
+
}>;
|
|
590
|
+
}
|
|
591
|
+
export interface DataTableFilteringConfig {
|
|
592
|
+
advanced?: boolean;
|
|
593
|
+
quickFilters?: DataTableQuickFilter[];
|
|
594
|
+
quickFilterMode?: DataTableQuickFilterMode;
|
|
595
|
+
quickFilterLabel?: string;
|
|
596
|
+
filterRow?: boolean | {
|
|
597
|
+
defaultVisible?: boolean;
|
|
598
|
+
debounceMs?: number;
|
|
599
|
+
};
|
|
600
|
+
defaultFilter?: string;
|
|
601
|
+
}
|
|
602
|
+
export type DataTablePdfPageSize = 'auto' | 'A4' | 'A3' | 'A5' | 'LETTER' | 'LEGAL' | 'TABLOID';
|
|
603
|
+
export type DataTablePdfOrientation = 'auto' | 'portrait' | 'landscape';
|
|
604
|
+
export type DataTablePdfFontSize = 'auto' | number;
|
|
605
|
+
export type DataTablePdfMargins = 'default' | 'compact' | 'tight';
|
|
606
|
+
export interface DataTableExportMetadata {
|
|
607
|
+
businessName?: string;
|
|
608
|
+
businessAddress?: string;
|
|
609
|
+
businessPhone?: string;
|
|
610
|
+
taxNumber?: string;
|
|
611
|
+
taxNumberLabel?: string;
|
|
612
|
+
searchTerm?: string;
|
|
613
|
+
filters?: Array<{
|
|
614
|
+
column: string;
|
|
615
|
+
operator: string;
|
|
616
|
+
value: string;
|
|
617
|
+
}>;
|
|
618
|
+
totalRows: number;
|
|
619
|
+
filteredRows: number;
|
|
620
|
+
resultRows: number;
|
|
621
|
+
selectedRows: number;
|
|
622
|
+
labels?: Partial<DataTableLabels>;
|
|
623
|
+
locale?: string;
|
|
624
|
+
}
|
|
625
|
+
export type DataTableExportFormat = 'csv' | 'xlsx' | 'json' | 'pdf' | 'html' | 'xml';
|
|
626
|
+
export type DataTableExportAction = 'download' | 'share' | 'preview' | 'print';
|
|
627
|
+
export interface DataTableXlsxStyle {
|
|
628
|
+
columnStyles?: Record<string, {
|
|
629
|
+
numFmt?: string;
|
|
630
|
+
width?: number;
|
|
631
|
+
bold?: boolean;
|
|
632
|
+
align?: 'left' | 'center' | 'right';
|
|
633
|
+
wrapText?: boolean;
|
|
634
|
+
}>;
|
|
635
|
+
headerStyle?: {
|
|
636
|
+
fill?: string;
|
|
637
|
+
fontColor?: string;
|
|
638
|
+
bold?: boolean;
|
|
639
|
+
fontSize?: number;
|
|
640
|
+
};
|
|
641
|
+
totalsStyle?: {
|
|
642
|
+
fill?: string;
|
|
643
|
+
bold?: boolean;
|
|
644
|
+
border?: 'thin' | 'medium' | 'thick';
|
|
645
|
+
};
|
|
646
|
+
sheetName?: string;
|
|
647
|
+
freezeRows?: number;
|
|
648
|
+
freezeCols?: number;
|
|
649
|
+
autoFilter?: boolean;
|
|
650
|
+
}
|
|
651
|
+
export interface DataTablePdfConfig {
|
|
652
|
+
type?: 'table';
|
|
653
|
+
orientation?: 'portrait' | 'landscape';
|
|
654
|
+
pageSize?: 'A4' | 'A3' | 'A5' | 'letter' | 'legal' | 'tabloid';
|
|
655
|
+
title?: string;
|
|
656
|
+
subtitle?: string;
|
|
657
|
+
showLogo?: boolean;
|
|
658
|
+
showDate?: boolean;
|
|
659
|
+
showPageNumbers?: boolean;
|
|
660
|
+
showTotals?: boolean;
|
|
661
|
+
showSummary?: boolean;
|
|
662
|
+
columnStyles?: Record<string, {
|
|
663
|
+
width?: number | 'auto';
|
|
664
|
+
align?: 'left' | 'center' | 'right';
|
|
665
|
+
bold?: boolean;
|
|
666
|
+
}>;
|
|
667
|
+
headerStyle?: {
|
|
668
|
+
fontSize?: number;
|
|
669
|
+
color?: string;
|
|
670
|
+
background?: string;
|
|
671
|
+
};
|
|
672
|
+
fontSize?: number;
|
|
673
|
+
margin?: number | {
|
|
674
|
+
top: number;
|
|
675
|
+
right: number;
|
|
676
|
+
bottom: number;
|
|
677
|
+
left: number;
|
|
678
|
+
};
|
|
679
|
+
autoFit?: boolean;
|
|
680
|
+
}
|
|
681
|
+
export type DataTableExportResultStatus = 'success' | 'warning' | 'error';
|
|
682
|
+
export interface DataTableExportResult {
|
|
683
|
+
status: DataTableExportResultStatus;
|
|
684
|
+
message: string | ReactNode;
|
|
685
|
+
}
|
|
686
|
+
export interface DataTableExportGeneratorResult {
|
|
687
|
+
data: any;
|
|
688
|
+
result?: DataTableExportResult;
|
|
689
|
+
}
|
|
690
|
+
export type DataTableExportGenerator<TData = any> = (data: TData[], meta: DataTableExportMeta) => any | DataTableExportGeneratorResult | Promise<any | DataTableExportGeneratorResult>;
|
|
691
|
+
interface DataTableExportOptionBase {
|
|
692
|
+
id: string;
|
|
693
|
+
label: string;
|
|
694
|
+
hint?: string;
|
|
695
|
+
}
|
|
696
|
+
export interface DataTableExportToggleOption extends DataTableExportOptionBase {
|
|
697
|
+
type: 'toggle';
|
|
698
|
+
default?: boolean;
|
|
699
|
+
}
|
|
700
|
+
export interface DataTableExportChoiceOption extends DataTableExportOptionBase {
|
|
701
|
+
type: 'choice';
|
|
702
|
+
choices: Array<{
|
|
703
|
+
label: string;
|
|
704
|
+
value: string;
|
|
705
|
+
}>;
|
|
706
|
+
default?: string;
|
|
707
|
+
}
|
|
708
|
+
export type DataTableExportOption = DataTableExportToggleOption | DataTableExportChoiceOption;
|
|
709
|
+
export type DataTableExportOptionValues = Record<string, string | boolean>;
|
|
710
|
+
export interface DataTableExportOptionContext {
|
|
711
|
+
options: DataTableExportOptionValues;
|
|
712
|
+
}
|
|
713
|
+
export interface DataTableFilenameContext {
|
|
714
|
+
templateId: string;
|
|
715
|
+
format: DataTableExportFormat;
|
|
716
|
+
rowCount: number;
|
|
717
|
+
globalFilter: string;
|
|
718
|
+
activeFilters: DataTableActiveFilter[];
|
|
719
|
+
selectedRows: any[];
|
|
720
|
+
meta: Record<string, any>;
|
|
721
|
+
today: string;
|
|
722
|
+
options: DataTableExportOptionValues;
|
|
723
|
+
}
|
|
724
|
+
export interface DataTableExportMeta {
|
|
725
|
+
filename: string;
|
|
726
|
+
format: DataTableExportFormat;
|
|
727
|
+
action: DataTableExportAction;
|
|
728
|
+
filters: DataTableActiveFilter[];
|
|
729
|
+
globalFilter: string;
|
|
730
|
+
selectedCount: number;
|
|
731
|
+
totalCount: number;
|
|
732
|
+
meta: Record<string, any>;
|
|
733
|
+
}
|
|
734
|
+
export interface DataTableExportContext<TData = any> {
|
|
735
|
+
data: TData[];
|
|
736
|
+
selectedRows: TData[];
|
|
737
|
+
resultData: TData[];
|
|
738
|
+
meta: Record<string, any>;
|
|
739
|
+
}
|
|
740
|
+
export interface DataTableExportTemplate<TData = any> {
|
|
741
|
+
id: string;
|
|
742
|
+
label: string;
|
|
743
|
+
description: string;
|
|
744
|
+
icon?: ReactNode;
|
|
745
|
+
options?: DataTableExportOption[];
|
|
746
|
+
transform: (resultData: TData[], ctx: DataTableExportOptionContext) => any[];
|
|
747
|
+
columns: DataTableColumn[] | ((ctx: DataTableExportOptionContext) => DataTableColumn[]);
|
|
748
|
+
formats: DataTableExportFormat[];
|
|
749
|
+
params?: (ctx: DataTableExportOptionContext) => Record<string, unknown>;
|
|
750
|
+
totals?: string[];
|
|
751
|
+
summary?: (rows: any[]) => Record<string, string | number>;
|
|
752
|
+
filename?: string;
|
|
753
|
+
getFilename?: (ctx: DataTableFilenameContext) => string;
|
|
754
|
+
showWhen?: (ctx: DataTableExportContext<TData>) => boolean;
|
|
755
|
+
unavailable?: string;
|
|
756
|
+
validate?: (data: any[]) => {
|
|
757
|
+
valid: boolean;
|
|
758
|
+
warnings?: string[];
|
|
759
|
+
};
|
|
760
|
+
formatAvailability?: (format: DataTableExportFormat, ctx: DataTableExportContext<TData>) => true | string;
|
|
761
|
+
defaultVisible?: boolean;
|
|
762
|
+
customizable?: boolean;
|
|
763
|
+
generate?: Partial<Record<DataTableExportFormat, DataTableExportGenerator<TData>>>;
|
|
764
|
+
previewRows?: (data: TData[]) => {
|
|
765
|
+
headers: string[];
|
|
766
|
+
rows: Record<string, any>[];
|
|
767
|
+
};
|
|
768
|
+
onResult?: (data: TData[], meta: DataTableExportMeta) => DataTableExportResult | undefined;
|
|
769
|
+
license?: DataTableLicense;
|
|
770
|
+
}
|
|
771
|
+
export type DataTableFileNameAs = 'title' | 'title-date' | 'title-generated' | 'title-date-generated';
|
|
772
|
+
export interface DataTableQuickExport<TData = any> {
|
|
773
|
+
enabled?: boolean;
|
|
774
|
+
formats?: DataTableExportFormat[];
|
|
775
|
+
filename?: string;
|
|
776
|
+
fileNameAs?: DataTableFileNameAs;
|
|
777
|
+
getFilename?: (ctx: DataTableFilenameContext) => string;
|
|
778
|
+
totals?: boolean;
|
|
779
|
+
summary?: (rows: TData[]) => Record<string, string | number>;
|
|
780
|
+
xlsx?: DataTableXlsxStyle;
|
|
781
|
+
pdf?: DataTablePdfConfig;
|
|
782
|
+
generate?: Partial<Record<DataTableExportFormat, DataTableExportGenerator<TData>>>;
|
|
783
|
+
}
|
|
784
|
+
export interface DataTableExportConfig<TData = any> {
|
|
785
|
+
quick?: DataTableQuickExport<TData>;
|
|
786
|
+
templates?: DataTableExportTemplate<TData>[];
|
|
787
|
+
maxVisibleTemplates?: number;
|
|
788
|
+
meta?: Record<string, any>;
|
|
789
|
+
}
|
|
790
|
+
export interface DataTableExportSummaryTable {
|
|
791
|
+
id: string;
|
|
792
|
+
title: string;
|
|
793
|
+
header: [string, string];
|
|
794
|
+
rows: Array<{
|
|
795
|
+
label: string;
|
|
796
|
+
count: number;
|
|
797
|
+
}>;
|
|
798
|
+
}
|
|
799
|
+
export interface DataTableExportSummary {
|
|
800
|
+
items: Record<string, string | number>;
|
|
801
|
+
tables?: DataTableExportSummaryTable[];
|
|
802
|
+
}
|
|
803
|
+
export interface DataTableExportSettings {
|
|
804
|
+
includeTotals: boolean;
|
|
805
|
+
summary: DataTableExportSummaryMode;
|
|
806
|
+
summaryCards: string[];
|
|
807
|
+
includeBusinessData: boolean;
|
|
808
|
+
includeContext: boolean;
|
|
809
|
+
contextFilters: boolean;
|
|
810
|
+
contextSearch: boolean;
|
|
811
|
+
contextSelection: boolean;
|
|
812
|
+
contextRows: boolean;
|
|
813
|
+
columnMode: 'visible' | 'custom';
|
|
814
|
+
customExportColumns: string[];
|
|
815
|
+
pdfPageSize: DataTablePdfPageSize;
|
|
816
|
+
pdfOrientation: DataTablePdfOrientation;
|
|
817
|
+
pdfFontSize: DataTablePdfFontSize;
|
|
818
|
+
pdfMargins: DataTablePdfMargins;
|
|
819
|
+
}
|
|
820
|
+
export interface DataTableExportPrefs {
|
|
821
|
+
quick?: {
|
|
822
|
+
lastFormat?: DataTableExportFormat;
|
|
823
|
+
totals?: boolean;
|
|
824
|
+
summary?: DataTableExportSummaryMode;
|
|
825
|
+
summaryCards?: string[];
|
|
826
|
+
businessData?: boolean;
|
|
827
|
+
context?: boolean;
|
|
828
|
+
contextFilters?: boolean;
|
|
829
|
+
contextSearch?: boolean;
|
|
830
|
+
contextSelection?: boolean;
|
|
831
|
+
contextRows?: boolean;
|
|
832
|
+
columnMode?: 'visible' | 'custom';
|
|
833
|
+
customExportColumns?: string[];
|
|
834
|
+
pdfPageSize?: DataTablePdfPageSize;
|
|
835
|
+
pdfOrientation?: DataTablePdfOrientation;
|
|
836
|
+
pdfFontSize?: DataTablePdfFontSize;
|
|
837
|
+
pdfMargins?: DataTablePdfMargins;
|
|
838
|
+
};
|
|
839
|
+
templates?: Record<string, {
|
|
840
|
+
lastFormat?: DataTableExportFormat;
|
|
841
|
+
totals?: boolean;
|
|
842
|
+
summary?: DataTableExportSummaryMode;
|
|
843
|
+
summaryCards?: string[];
|
|
844
|
+
customColumns?: string[];
|
|
845
|
+
pdfPageSize?: DataTablePdfPageSize;
|
|
846
|
+
pdfOrientation?: DataTablePdfOrientation;
|
|
847
|
+
pdfFontSize?: DataTablePdfFontSize;
|
|
848
|
+
pdfMargins?: DataTablePdfMargins;
|
|
849
|
+
}>;
|
|
850
|
+
}
|
|
851
|
+
export interface DataTableManageList {
|
|
852
|
+
order?: string[];
|
|
853
|
+
hidden?: string[];
|
|
854
|
+
}
|
|
855
|
+
export type DataTableViewsPrefs = DataTableManageList;
|
|
856
|
+
export type DataTableExportTemplatePrefs = DataTableManageList;
|
|
857
|
+
export interface DataTableManagePrefs {
|
|
858
|
+
version?: number;
|
|
859
|
+
views?: DataTableViewsPrefs;
|
|
860
|
+
exportTemplates?: DataTableExportTemplatePrefs;
|
|
861
|
+
}
|
|
862
|
+
export interface DataTableView<TData = any> {
|
|
863
|
+
columns: DataTableColumn<TData>[];
|
|
864
|
+
resolveColumns?: (data: TData[]) => DataTableColumn<TData>[];
|
|
865
|
+
id: string;
|
|
866
|
+
renamed?: Record<string, string>;
|
|
867
|
+
label?: string;
|
|
868
|
+
defaultVisible?: boolean;
|
|
869
|
+
authorized?: boolean;
|
|
870
|
+
params?: Record<string, unknown>;
|
|
871
|
+
hint?: string;
|
|
872
|
+
rowKey?: string;
|
|
873
|
+
transform?: (data: any[]) => any[];
|
|
874
|
+
animateRows?: boolean;
|
|
875
|
+
flashColors?: DataTableFlashColors;
|
|
876
|
+
HeaderComponent?: ComponentType<DataTableComponentProps<TData> & Record<string, any>>;
|
|
877
|
+
FooterComponent?: ComponentType<DataTableComponentProps<TData> & Record<string, any>>;
|
|
878
|
+
headerProps?: Record<string, any>;
|
|
879
|
+
footerProps?: Record<string, any>;
|
|
880
|
+
selection?: boolean | DataTableSelectionShow | DataTableSelectionConfig<TData>;
|
|
881
|
+
pagination?: boolean | DataTablePaginationConfig;
|
|
882
|
+
sorting?: boolean | DataTableSortingConfig;
|
|
883
|
+
filtering?: boolean | DataTableFilteringConfig;
|
|
884
|
+
search?: boolean;
|
|
885
|
+
export?: DataTableExportConfig<TData>;
|
|
886
|
+
summary?: DataTableSummaryConfig<TData>;
|
|
887
|
+
grouping?: boolean | DataTableGroupingConfig;
|
|
888
|
+
groupSummary?: (path: DataTableGroupPathItem[], ctx: DataTableGroupSummaryContext<TData>) => ReactNode;
|
|
889
|
+
keyboard?: DataTableKeyboardConfig;
|
|
890
|
+
virtualize?: DataTableVirtualizeConfig;
|
|
891
|
+
expandRow?: (row: TData) => ReactNode;
|
|
892
|
+
actions?: DataTableRowAction<TData>[] | ((row: TData) => DataTableRowAction<TData>[]);
|
|
893
|
+
bulkActions?: DataTableBulkAction<TData>[];
|
|
894
|
+
hideBulkActions?: string[];
|
|
895
|
+
pinning?: DataTablePinningConfig;
|
|
896
|
+
devTools?: boolean;
|
|
897
|
+
singleRowView?: DataTableSingleRowView;
|
|
898
|
+
cardFields?: Partial<DataTableCardFields>;
|
|
899
|
+
listFields?: Partial<DataTableListFields>;
|
|
900
|
+
cardMinWidth?: number;
|
|
901
|
+
cardsExpanded?: boolean;
|
|
902
|
+
avatar?: false | ((row: TData) => ReactNode);
|
|
903
|
+
layouts?: DataTableLayout[];
|
|
904
|
+
defaultLayout?: DataTableLayout;
|
|
905
|
+
renderDetail?: DataTableDetailRenderer<TData>;
|
|
906
|
+
rowMenu?: DataTableRowMenuConfig<TData>;
|
|
907
|
+
context?: Record<string, any>;
|
|
908
|
+
compact?: boolean;
|
|
909
|
+
displayDefaults?: Partial<DataTableDisplayPrefs>;
|
|
910
|
+
striped?: boolean;
|
|
911
|
+
bordered?: boolean;
|
|
912
|
+
stickyHeader?: boolean;
|
|
913
|
+
emptyMessage?: string;
|
|
914
|
+
loadingMessage?: string;
|
|
915
|
+
loading?: boolean;
|
|
916
|
+
}
|
|
917
|
+
export interface DataTableProps<TData = any> {
|
|
918
|
+
data?: TData[];
|
|
919
|
+
views: DataTableView<TData>[];
|
|
920
|
+
tableId?: string;
|
|
921
|
+
title?: string;
|
|
922
|
+
className?: string;
|
|
923
|
+
dataSource?: DataTableDataSource<TData>;
|
|
924
|
+
persistence?: DataTablePersistence | null;
|
|
925
|
+
authorize?: DataTableAuthorize;
|
|
926
|
+
exportOptions?: DataTableExportOptions;
|
|
927
|
+
initialState?: DataTableInitialState;
|
|
928
|
+
onStateChange?: (state: DataTableQuery) => void;
|
|
929
|
+
onRowsChange?: (rows: TData[]) => void;
|
|
930
|
+
apiRef?: {
|
|
931
|
+
current: DataTableApi<TData> | null;
|
|
932
|
+
};
|
|
933
|
+
bulkActions?: DataTableBulkAction<TData>[];
|
|
934
|
+
labels?: Partial<DataTableLabels>;
|
|
935
|
+
locale?: string;
|
|
936
|
+
renderDetail?: DataTableDetailRenderer<TData>;
|
|
937
|
+
detailBar?: boolean;
|
|
938
|
+
openRowId?: string | null;
|
|
939
|
+
onOpenRowChange?: (id: string | null, row: TData | null) => void;
|
|
940
|
+
shortcuts?: DataTableShortcut<TData>[];
|
|
941
|
+
sharing?: DataTableSharing;
|
|
942
|
+
renamedViews?: Record<string, string>;
|
|
943
|
+
prefsVersion?: number;
|
|
944
|
+
migratePrefs?: (doc: Record<string, any>, fromVersion: number, key: string) => Record<string, any>;
|
|
945
|
+
}
|
|
946
|
+
export interface DataTableQuery {
|
|
947
|
+
viewId: string;
|
|
948
|
+
viewParams?: Record<string, unknown>;
|
|
949
|
+
search: string;
|
|
950
|
+
filterGroup: DataTableFilterGroup;
|
|
951
|
+
quickFilterIds: string[];
|
|
952
|
+
sorting: Array<{
|
|
953
|
+
key: string;
|
|
954
|
+
field: string;
|
|
955
|
+
desc: boolean;
|
|
956
|
+
}>;
|
|
957
|
+
pageIndex: number;
|
|
958
|
+
pageSize: number;
|
|
959
|
+
}
|
|
960
|
+
export interface DataTableRowsResult<TData = any> {
|
|
961
|
+
rows: TData[];
|
|
962
|
+
total: number;
|
|
963
|
+
}
|
|
964
|
+
export interface DataTableAllRowsResult<TData = any> {
|
|
965
|
+
rows: TData[];
|
|
966
|
+
total?: number;
|
|
967
|
+
capped?: boolean;
|
|
968
|
+
}
|
|
969
|
+
export interface DataTableCounts {
|
|
970
|
+
views?: Record<string, number>;
|
|
971
|
+
quickFilters?: Record<string, number>;
|
|
972
|
+
}
|
|
973
|
+
export interface DataTableDataSource<TData = any> {
|
|
974
|
+
fetchRows: (query: DataTableQuery, ctx: {
|
|
975
|
+
signal: AbortSignal;
|
|
976
|
+
}) => Promise<DataTableRowsResult<TData>>;
|
|
977
|
+
loadAllRows?: (query: DataTableQuery, ctx: {
|
|
978
|
+
format: DataTableExportFormat;
|
|
979
|
+
action: DataTableExportAction;
|
|
980
|
+
selection: DataTableSelection<TData>;
|
|
981
|
+
params?: Record<string, unknown>;
|
|
982
|
+
}) => Promise<DataTableAllRowsResult<TData>>;
|
|
983
|
+
summaries?: (query: DataTableQuery, ctx: {
|
|
984
|
+
selection: DataTableSelection<TData>;
|
|
985
|
+
request: DataTableSummaryRequest;
|
|
986
|
+
signal: AbortSignal;
|
|
987
|
+
}) => Promise<DataTableSummaryFigures>;
|
|
988
|
+
counts?: (query: DataTableQuery, ctx: {
|
|
989
|
+
signal: AbortSignal;
|
|
990
|
+
}) => Promise<DataTableCounts>;
|
|
991
|
+
groups?: (query: DataTableQuery, req: {
|
|
992
|
+
level: {
|
|
993
|
+
key: string;
|
|
994
|
+
field: string;
|
|
995
|
+
};
|
|
996
|
+
path: DataTableGroupPathItem[];
|
|
997
|
+
}, ctx: {
|
|
998
|
+
signal: AbortSignal;
|
|
999
|
+
}) => Promise<DataTableGroupResult[]>;
|
|
1000
|
+
operators?: readonly string[];
|
|
1001
|
+
summaryBreakdownFields?: readonly string[];
|
|
1002
|
+
subscribe?: (refetch: () => void) => () => void;
|
|
1003
|
+
searchDebounceMs?: number;
|
|
1004
|
+
pageSizeOptions?: number[];
|
|
1005
|
+
}
|
|
1006
|
+
export interface DataTableInitialState {
|
|
1007
|
+
viewId?: string;
|
|
1008
|
+
search?: string;
|
|
1009
|
+
filterGroup?: DataTableFilterGroup;
|
|
1010
|
+
quickFilterIds?: string[];
|
|
1011
|
+
sorting?: Array<{
|
|
1012
|
+
key: string;
|
|
1013
|
+
desc: boolean;
|
|
1014
|
+
}>;
|
|
1015
|
+
pageIndex?: number;
|
|
1016
|
+
pageSize?: number;
|
|
1017
|
+
}
|
|
1018
|
+
export interface DataTableApi<TData = any> {
|
|
1019
|
+
refresh: () => void;
|
|
1020
|
+
clearSelection: () => void;
|
|
1021
|
+
getQuery: () => DataTableQuery;
|
|
1022
|
+
getRows: () => TData[];
|
|
1023
|
+
openRow: (id: string | null) => void;
|
|
1024
|
+
}
|
|
1025
|
+
export interface DataTablePersistence {
|
|
1026
|
+
load: (key: string) => Promise<Record<string, any> | null>;
|
|
1027
|
+
save: (key: string, doc: Record<string, any>) => Promise<void>;
|
|
1028
|
+
list?: (prefix: string) => Promise<string[]>;
|
|
1029
|
+
remove?: (key: string) => Promise<void>;
|
|
1030
|
+
}
|
|
1031
|
+
export type DataTableGate = 'export' | 'export.format' | 'export.template' | 'manage' | 'selection' | 'columns' | 'cardFields' | 'savedFilters' | 'devTools' | 'license' | 'bulkAction' | 'copy' | 'layout' | 'grouping' | 'shareView' | 'rows';
|
|
1032
|
+
export type DataTableAuthorize = (gate: DataTableGate, subject?: unknown) => boolean;
|
|
1033
|
+
export interface DataTablePdfFonts {
|
|
1034
|
+
fonts?: Record<string, {
|
|
1035
|
+
normal: string;
|
|
1036
|
+
bold: string;
|
|
1037
|
+
italics: string;
|
|
1038
|
+
bolditalics: string;
|
|
1039
|
+
}>;
|
|
1040
|
+
vfs?: Record<string, string>;
|
|
1041
|
+
fontFor?: (text: string) => string | undefined;
|
|
1042
|
+
}
|
|
1043
|
+
export interface DataTableExportOptions {
|
|
1044
|
+
businessMeta?: () => Pick<DataTableExportMetadata, 'businessName' | 'businessAddress' | 'businessPhone' | 'taxNumber' | 'taxNumberLabel'>;
|
|
1045
|
+
branding?: {
|
|
1046
|
+
name: string;
|
|
1047
|
+
url?: string;
|
|
1048
|
+
};
|
|
1049
|
+
pdf?: DataTablePdfFonts;
|
|
1050
|
+
}
|
|
1051
|
+
export type DataTableDensity = 'compact' | 'default' | 'comfortable';
|
|
1052
|
+
export type DataTableFontSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
1053
|
+
export type DataTableColumnWidth = 'scroll' | 'fit' | 'compact';
|
|
1054
|
+
export type DataTableActionDisplay = 'icon' | 'label' | 'icon-label' | 'label-icon';
|
|
1055
|
+
export interface DataTableDisplayPrefs {
|
|
1056
|
+
density: DataTableDensity;
|
|
1057
|
+
fontSize: DataTableFontSize;
|
|
1058
|
+
columnWidth: DataTableColumnWidth;
|
|
1059
|
+
showActions: boolean;
|
|
1060
|
+
actionDisplayMode: DataTableActionDisplay;
|
|
1061
|
+
actionDisplayModeCard: DataTableActionDisplay;
|
|
1062
|
+
summaryTop: boolean;
|
|
1063
|
+
summaryBottom: boolean;
|
|
1064
|
+
}
|
|
1065
|
+
export interface DataTableViewPrefs {
|
|
1066
|
+
version?: number;
|
|
1067
|
+
visibility: Record<string, boolean>;
|
|
1068
|
+
order: string[];
|
|
1069
|
+
sizes: Record<string, number>;
|
|
1070
|
+
export?: DataTableExportPrefs;
|
|
1071
|
+
cardFields?: DataTableCardFields;
|
|
1072
|
+
listFields?: DataTableListFields;
|
|
1073
|
+
layout?: DataTableLayout;
|
|
1074
|
+
savedFilters?: DataTableSavedFilter[];
|
|
1075
|
+
display?: Partial<DataTableDisplayPrefs>;
|
|
1076
|
+
pinning?: DataTableColumnPinning;
|
|
1077
|
+
filterRow?: boolean;
|
|
1078
|
+
grouping?: string[];
|
|
1079
|
+
summary?: DataTableSummaryPrefs;
|
|
1080
|
+
}
|
|
1081
|
+
export interface ContextMenuState {
|
|
1082
|
+
visible: boolean;
|
|
1083
|
+
x: number;
|
|
1084
|
+
y: number;
|
|
1085
|
+
columnKey: string;
|
|
1086
|
+
}
|
|
1087
|
+
export interface UseTableReturn<TData = any> {
|
|
1088
|
+
table: any;
|
|
1089
|
+
resultData: TData[];
|
|
1090
|
+
allFilteredRows: TData[];
|
|
1091
|
+
selectedRows: TData[];
|
|
1092
|
+
visibleColumns: string[];
|
|
1093
|
+
allColumns: string[];
|
|
1094
|
+
filterGroup: DataTableFilterGroup;
|
|
1095
|
+
setFilterGroup: (group: DataTableFilterGroup) => void;
|
|
1096
|
+
activeFilters: DataTableActiveFilter[];
|
|
1097
|
+
removeFilter: (id: string) => void;
|
|
1098
|
+
clearAllFilters: () => void;
|
|
1099
|
+
globalFilter: string;
|
|
1100
|
+
setGlobalFilter: (value: string) => void;
|
|
1101
|
+
sorting: Array<{
|
|
1102
|
+
id: string;
|
|
1103
|
+
desc: boolean;
|
|
1104
|
+
}>;
|
|
1105
|
+
setSorting: (sorting: Array<{
|
|
1106
|
+
id: string;
|
|
1107
|
+
desc: boolean;
|
|
1108
|
+
}>) => void;
|
|
1109
|
+
columnOrder: string[];
|
|
1110
|
+
setColumnOrder: (order: string[] | ((prev: string[]) => string[])) => void;
|
|
1111
|
+
columnVisibility: Record<string, boolean>;
|
|
1112
|
+
setColumnVisibility: (visibility: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void;
|
|
1113
|
+
columnSizing: Record<string, number>;
|
|
1114
|
+
setColumnSizing: (sizing: Record<string, number>) => void;
|
|
1115
|
+
columnPinning: DataTableColumnPinning;
|
|
1116
|
+
setColumnPinning: (pinning: DataTableColumnPinning) => void;
|
|
1117
|
+
defaultPinning: DataTableColumnPinning;
|
|
1118
|
+
defaultVisibility: Record<string, boolean>;
|
|
1119
|
+
defaultOrder: string[];
|
|
1120
|
+
resetColumns: () => void;
|
|
1121
|
+
toggleRowSelection: (rowId: string) => void;
|
|
1122
|
+
toggleAllRowsSelection: () => void;
|
|
1123
|
+
clearRowSelection: () => void;
|
|
1124
|
+
isAllRowsSelected: boolean;
|
|
1125
|
+
isSomeRowsSelected: boolean;
|
|
1126
|
+
pagination: {
|
|
1127
|
+
pageIndex: number;
|
|
1128
|
+
pageSize: number;
|
|
1129
|
+
};
|
|
1130
|
+
setPagination: (updater: {
|
|
1131
|
+
pageIndex: number;
|
|
1132
|
+
pageSize: number;
|
|
1133
|
+
} | ((prev: {
|
|
1134
|
+
pageIndex: number;
|
|
1135
|
+
pageSize: number;
|
|
1136
|
+
}) => {
|
|
1137
|
+
pageIndex: number;
|
|
1138
|
+
pageSize: number;
|
|
1139
|
+
})) => void;
|
|
1140
|
+
serverMode: boolean;
|
|
1141
|
+
rowSelection: Record<string, boolean>;
|
|
1142
|
+
setRowSelection: (updater: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void;
|
|
1143
|
+
}
|
|
1144
|
+
export declare function isFilterGroup(item: DataTableFilterCondition | DataTableFilterGroup): item is DataTableFilterGroup;
|
|
1145
|
+
export {};
|