@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,32 @@
|
|
|
1
|
+
import { type DataTableCardField, type DataTableCardFields, type DataTableColumn, type DataTableListField, type DataTableListFields } from '../types';
|
|
2
|
+
export interface FieldSet<K extends string> {
|
|
3
|
+
kind: 'card' | 'list';
|
|
4
|
+
parts: readonly K[];
|
|
5
|
+
limits: Readonly<Record<K, number>>;
|
|
6
|
+
addTo: readonly K[];
|
|
7
|
+
}
|
|
8
|
+
export type Fields<K extends string> = Record<K, string[]>;
|
|
9
|
+
export declare const CARD_FIELD_SET: FieldSet<DataTableCardField>;
|
|
10
|
+
export declare const LIST_FIELD_SET: FieldSet<DataTableListField>;
|
|
11
|
+
export declare function isFieldsOf<K extends string>(set: FieldSet<K>, value: unknown): value is Partial<Fields<K>>;
|
|
12
|
+
export declare function normalizeFields<K extends string>(set: FieldSet<K>, raw: Partial<Fields<K>> | undefined, columns: DataTableColumn[]): Fields<K>;
|
|
13
|
+
export declare function sameFields<K extends string>(set: FieldSet<K>, a: Fields<K>, b: Fields<K>): boolean;
|
|
14
|
+
export declare function unplacedColumns<K extends string>(set: FieldSet<K>, fields: Fields<K>, columns: DataTableColumn[]): DataTableColumn[];
|
|
15
|
+
export declare function placeField<K extends string>(set: FieldSet<K>, fields: Fields<K>, key: string, part: K | null, opts?: {
|
|
16
|
+
replace?: boolean;
|
|
17
|
+
}): Fields<K>;
|
|
18
|
+
export declare function partForAdd<K extends string>(set: FieldSet<K>, fields: Fields<K>): K | null;
|
|
19
|
+
export declare const isCardFields: (value: unknown) => value is Partial<DataTableCardFields>;
|
|
20
|
+
export declare const normalizeCardFields: (raw: Partial<DataTableCardFields> | undefined, columns: DataTableColumn[]) => DataTableCardFields;
|
|
21
|
+
export declare function defaultCardFields(columns: DataTableColumn[], configured?: Partial<DataTableCardFields>): DataTableCardFields;
|
|
22
|
+
export declare const isListFields: (value: unknown) => value is Partial<DataTableListFields>;
|
|
23
|
+
export declare const normalizeListFields: (raw: Partial<DataTableListFields> | undefined, columns: DataTableColumn[]) => DataTableListFields;
|
|
24
|
+
export declare function defaultListFields(columns: DataTableColumn[], configured: Partial<DataTableListFields> | undefined, card: DataTableCardFields): DataTableListFields;
|
|
25
|
+
export interface CellTextLabels {
|
|
26
|
+
yes: string;
|
|
27
|
+
no: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function cellText(column: DataTableColumn, row: unknown, labels: CellTextLabels): string;
|
|
30
|
+
export declare function valueText(column: DataTableColumn, value: unknown, labels: CellTextLabels): string;
|
|
31
|
+
export declare function initialsOf(text: string): string;
|
|
32
|
+
export declare function hueOf(text: string): number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { DataTableCardFields, DataTableColumn, DataTableListFields, DataTableView } from '../types';
|
|
3
|
+
import { type CellTextLabels } from './cardFields';
|
|
4
|
+
export interface RowField {
|
|
5
|
+
key: string;
|
|
6
|
+
header: string;
|
|
7
|
+
node: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface RowParts {
|
|
10
|
+
title: string;
|
|
11
|
+
titleKey?: string;
|
|
12
|
+
subtitle: string;
|
|
13
|
+
subtitleKey?: string;
|
|
14
|
+
badge: RowField | null;
|
|
15
|
+
details: RowField[];
|
|
16
|
+
more: RowField[];
|
|
17
|
+
avatar: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export interface ListParts {
|
|
20
|
+
title: string;
|
|
21
|
+
titleKey?: string;
|
|
22
|
+
subtitle: Array<{
|
|
23
|
+
key: string;
|
|
24
|
+
text: string;
|
|
25
|
+
}>;
|
|
26
|
+
badge: RowField | null;
|
|
27
|
+
avatar: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export type AvatarOption<T> = DataTableView<T>['avatar'];
|
|
30
|
+
export declare function renderCell<T>(col: DataTableColumn<T>, row: T, index: number, labels: CellTextLabels): ReactNode;
|
|
31
|
+
export declare function RowAvatar({ text, size }: {
|
|
32
|
+
text: string;
|
|
33
|
+
size?: 'sm' | 'md' | 'lg';
|
|
34
|
+
}): React.JSX.Element;
|
|
35
|
+
export declare function rowParts<T>(row: T, index: number, fields: DataTableCardFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>, labels: CellTextLabels): RowParts;
|
|
36
|
+
export declare function listParts<T>(row: T, index: number, fields: DataTableListFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>, labels: CellTextLabels): ListParts;
|
|
37
|
+
export declare function sampleRowParts<T>(fields: DataTableCardFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>): RowParts;
|
|
38
|
+
export declare function sampleListParts<T>(fields: DataTableListFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>): ListParts;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DataTableDataSource, DataTableQuery } from '../types';
|
|
2
|
+
export interface ServerDataState<TData> {
|
|
3
|
+
rows: TData[];
|
|
4
|
+
total: number;
|
|
5
|
+
rowsKey: string;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
fetching: boolean;
|
|
8
|
+
error: unknown;
|
|
9
|
+
refetch: () => void;
|
|
10
|
+
tick: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function filterPartOf(q: DataTableQuery): {
|
|
13
|
+
viewId: string;
|
|
14
|
+
viewParams: Record<string, unknown> | undefined;
|
|
15
|
+
search: string;
|
|
16
|
+
filterGroup: import("..").DataTableFilterGroup;
|
|
17
|
+
quickFilterIds: string[];
|
|
18
|
+
};
|
|
19
|
+
export declare function useServerData<TData>(dataSource: DataTableDataSource<TData> | undefined, query: DataTableQuery | null, opts?: {
|
|
20
|
+
rows?: boolean;
|
|
21
|
+
}): ServerDataState<TData>;
|
|
22
|
+
export interface ServerFiguresState<T> {
|
|
23
|
+
value: T | null;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
error: unknown;
|
|
26
|
+
retry: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function useServerFigures<T>(load: ((signal: AbortSignal) => Promise<T>) | undefined, key: string | null, tick: number): ServerFiguresState<T>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type DataTableView, type DataTablePaginationConfig, type DataTableSortingConfig, type DataTableFilteringConfig, type DataTableSelectionConfig, type DataTableFilterGroup, type DataTableExportConfig, type DataTableExportFormat } from './types';
|
|
2
|
+
export declare const DEFAULT_PAGE_SIZE = 25;
|
|
3
|
+
export declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
4
|
+
export declare const DEFAULT_PAGINATION: DataTablePaginationConfig;
|
|
5
|
+
export declare const DEFAULT_SORTING: DataTableSortingConfig;
|
|
6
|
+
export declare const DEFAULT_FILTERING: DataTableFilteringConfig;
|
|
7
|
+
export declare const DEFAULT_EXPORT_FORMATS: DataTableExportFormat[];
|
|
8
|
+
export declare const DEFAULT_SELECTION: DataTableSelectionConfig;
|
|
9
|
+
export declare function createEmptyFilterGroup(): DataTableFilterGroup;
|
|
10
|
+
export declare function resolvePagination(config: DataTableView): DataTablePaginationConfig | false;
|
|
11
|
+
export declare function resolveSorting(config: DataTableView): DataTableSortingConfig | false;
|
|
12
|
+
export declare function resolveFiltering(config: DataTableView): DataTableFilteringConfig | false;
|
|
13
|
+
export declare function resolveExport(config: DataTableView): DataTableExportConfig | false;
|
|
14
|
+
export declare function resolveSelection(config: DataTableView): (DataTableSelectionConfig & {
|
|
15
|
+
show: 'onDemand' | 'always';
|
|
16
|
+
}) | false;
|
|
17
|
+
export declare function generateId(): string;
|
|
18
|
+
export declare function getNestedValue(obj: any, path: string): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataTableRowMenuConfig, DataTableColumn } from '../types';
|
|
3
|
+
interface BuiltInDetailProps<T> {
|
|
4
|
+
row: T;
|
|
5
|
+
columns: DataTableColumn<T>[];
|
|
6
|
+
menu?: DataTableRowMenuConfig<T>;
|
|
7
|
+
close: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function BuiltInDetail<T>({ row, columns, menu, close }: BuiltInDetailProps<T>): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { DataTableDetailContext } from '../types';
|
|
3
|
+
interface DetailFrameProps {
|
|
4
|
+
ctx: DataTableDetailContext;
|
|
5
|
+
title: string;
|
|
6
|
+
bar?: boolean;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function DetailDrawer({ ctx, title, bar, children }: DetailFrameProps): React.ReactPortal | null;
|
|
10
|
+
export declare function DetailFullScreen({ ctx, title, bar, children }: DetailFrameProps): React.ReactPortal | null;
|
|
11
|
+
export declare function DetailPane({ ctx, title, bar, children }: DetailFrameProps): React.JSX.Element;
|
|
12
|
+
export declare function DetailEmpty(): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableExportFormat, type DataTableExportAction, type DataTableExportResult } from '../types';
|
|
3
|
+
interface ExportPopoverProps {
|
|
4
|
+
formats: DataTableExportFormat[];
|
|
5
|
+
onExport: (format: DataTableExportFormat, action: DataTableExportAction) => Promise<DataTableExportResult | undefined>;
|
|
6
|
+
totalRows: number;
|
|
7
|
+
selectedCount: number;
|
|
8
|
+
includeTotals: boolean;
|
|
9
|
+
includeSummary: boolean;
|
|
10
|
+
includeContext: boolean;
|
|
11
|
+
onToggleTotals: (val: boolean) => void;
|
|
12
|
+
onToggleSummary: (val: boolean) => void;
|
|
13
|
+
onToggleContext: (val: boolean) => void;
|
|
14
|
+
hasSummary: boolean;
|
|
15
|
+
onOpenSettings?: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const ExportPopover: React.FC<ExportPopoverProps>;
|
|
18
|
+
export default ExportPopover;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ExportPreviewModalProps {
|
|
3
|
+
headers: string[];
|
|
4
|
+
rows: Record<string, any>[];
|
|
5
|
+
totalRowCount: number;
|
|
6
|
+
templateLabel: string;
|
|
7
|
+
onDownload: () => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ExportPreviewModal: React.FC<ExportPreviewModalProps>;
|
|
11
|
+
export default ExportPreviewModal;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableColumn, type DataTableExportSettings, type DataTablePdfPageSize, type DataTablePdfOrientation, type DataTablePdfFontSize, type DataTablePdfMargins } from '../types';
|
|
3
|
+
import { type SummaryChoiceCard } from '../summary/SummaryControls';
|
|
4
|
+
export interface TemplateExportSettings {
|
|
5
|
+
customColumns: string[];
|
|
6
|
+
pdfPageSize: DataTablePdfPageSize;
|
|
7
|
+
pdfOrientation: DataTablePdfOrientation;
|
|
8
|
+
pdfFontSize: DataTablePdfFontSize;
|
|
9
|
+
pdfMargins: DataTablePdfMargins;
|
|
10
|
+
}
|
|
11
|
+
interface ExportSettingsModalProps {
|
|
12
|
+
settings: DataTableExportSettings;
|
|
13
|
+
columns: DataTableColumn[];
|
|
14
|
+
visibleColumns: string[];
|
|
15
|
+
columnOrder: string[];
|
|
16
|
+
summaryCards: SummaryChoiceCard[];
|
|
17
|
+
hasSummary: boolean;
|
|
18
|
+
onApply: (settings: DataTableExportSettings) => void;
|
|
19
|
+
onSave: (settings: DataTableExportSettings) => void;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
templateMode?: {
|
|
22
|
+
templateId: string;
|
|
23
|
+
templateLabel: string;
|
|
24
|
+
templateColumns: DataTableColumn[];
|
|
25
|
+
templateSettings?: TemplateExportSettings;
|
|
26
|
+
onApply: (templateId: string, settings: TemplateExportSettings) => void;
|
|
27
|
+
onSave: (templateId: string, settings: TemplateExportSettings) => void;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
declare const ExportSettingsModal: React.FC<ExportSettingsModalProps>;
|
|
31
|
+
export default ExportSettingsModal;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableExportTemplate, type DataTableExportFormat, type DataTableExportAction, type DataTableExportResult, type DataTableExportOptionValues } from '../types';
|
|
3
|
+
interface ExportTemplateCardsProps {
|
|
4
|
+
visibleTemplates: DataTableExportTemplate[];
|
|
5
|
+
hiddenTemplates: DataTableExportTemplate[];
|
|
6
|
+
onExport: (templateId: string, format: DataTableExportFormat, action: DataTableExportAction) => Promise<DataTableExportResult | undefined>;
|
|
7
|
+
getRowCount: (templateId: string) => number;
|
|
8
|
+
getFormatAvailability: (templateId: string, format: DataTableExportFormat) => true | string;
|
|
9
|
+
templatePrefs?: Record<string, {
|
|
10
|
+
lastFormat?: DataTableExportFormat;
|
|
11
|
+
}>;
|
|
12
|
+
totalDataRows: number;
|
|
13
|
+
onOpenSettings?: (templateId: string) => void;
|
|
14
|
+
optionValues?: Record<string, DataTableExportOptionValues>;
|
|
15
|
+
onOptionChange?: (templateId: string, optionId: string, value: string | boolean) => void;
|
|
16
|
+
unavailableReasons?: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
declare const ExportTemplateCards: React.FC<ExportTemplateCardsProps>;
|
|
19
|
+
export default ExportTemplateCards;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type DataTableLabels } from '../labels';
|
|
2
|
+
import type { DataTableActiveFilter, DataTableExportMetadata } from '../types';
|
|
3
|
+
export declare const labelsOf: (meta?: DataTableExportMetadata) => DataTableLabels;
|
|
4
|
+
export declare const taxLabel: (meta: DataTableExportMetadata) => string;
|
|
5
|
+
export declare function contextFilters(filters: DataTableActiveFilter[], names?: ReadonlyMap<string, string>): NonNullable<DataTableExportMetadata['filters']>;
|
|
6
|
+
export interface ContextLineOptions {
|
|
7
|
+
rows?: 'export' | 'shown';
|
|
8
|
+
}
|
|
9
|
+
export declare function formatContextLine(meta: DataTableExportMetadata, opts?: ContextLineOptions): string;
|
|
10
|
+
export declare function formatMetadataLines(meta: DataTableExportMetadata): Array<[string, string]>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type DataTableExportFormat, type DataTableExportMetadata, type DataTableXlsxStyle, type DataTablePdfConfig, type DataTableColumn, type DataTableCellStyle, type DataTableExportSummary } from '../types';
|
|
2
|
+
export { autoFormatValue, prepareExportRows, buildBusinessMeta } from './exportRows';
|
|
3
|
+
export { formatContextLine, formatMetadataLines } from './exportContext';
|
|
4
|
+
export type PdfFontFor = (text: string) => string | undefined;
|
|
5
|
+
export interface ColumnMeta {
|
|
6
|
+
header: string;
|
|
7
|
+
align?: 'left' | 'center' | 'right';
|
|
8
|
+
type?: 'string' | 'number' | 'date' | 'boolean' | 'select' | 'array';
|
|
9
|
+
width?: number;
|
|
10
|
+
format?: 'text' | 'number' | 'currency' | 'date' | 'percentage';
|
|
11
|
+
cellStyle?: (value: any, row: any) => DataTableCellStyle | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function buildColumnMeta(columns: DataTableColumn[], headers: string[]): ColumnMeta[];
|
|
14
|
+
export declare function generateCSV(headers: string[], rows: Record<string, any>[], totals?: Record<string, any> | null, summary?: DataTableExportSummary | null, metadata?: DataTableExportMetadata, subtitle?: string): Blob;
|
|
15
|
+
export declare function generateXLSX(headers: string[], rows: Record<string, any>[], config?: {
|
|
16
|
+
totals?: Record<string, any> | null;
|
|
17
|
+
summary?: DataTableExportSummary | null;
|
|
18
|
+
style?: DataTableXlsxStyle;
|
|
19
|
+
sheetName?: string;
|
|
20
|
+
columnMeta?: ColumnMeta[];
|
|
21
|
+
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
22
|
+
metadata?: DataTableExportMetadata;
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
}): Promise<Blob>;
|
|
25
|
+
export declare function generateJSON(rows: Record<string, any>[], summary?: DataTableExportSummary | null, metadata?: DataTableExportMetadata, subtitle?: string): Blob;
|
|
26
|
+
export declare function generateHTML(headers: string[], rows: Record<string, any>[], config?: {
|
|
27
|
+
title?: string;
|
|
28
|
+
subtitle?: string;
|
|
29
|
+
totals?: Record<string, any> | null;
|
|
30
|
+
summary?: DataTableExportSummary | null;
|
|
31
|
+
customStyles?: string;
|
|
32
|
+
columnMeta?: ColumnMeta[];
|
|
33
|
+
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
34
|
+
metadata?: DataTableExportMetadata;
|
|
35
|
+
branding?: {
|
|
36
|
+
name: string;
|
|
37
|
+
url?: string;
|
|
38
|
+
};
|
|
39
|
+
}): Blob;
|
|
40
|
+
export declare function generateTablePDFDocDef(headers: string[], rows: Record<string, any>[], config?: {
|
|
41
|
+
pdfConfig?: DataTablePdfConfig;
|
|
42
|
+
totals?: Record<string, any> | null;
|
|
43
|
+
summary?: DataTableExportSummary | null;
|
|
44
|
+
subtitle?: string;
|
|
45
|
+
columnMeta?: ColumnMeta[];
|
|
46
|
+
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
47
|
+
metadata?: DataTableExportMetadata;
|
|
48
|
+
fontFor?: PdfFontFor;
|
|
49
|
+
}): any;
|
|
50
|
+
export { rawDataToBlob, downloadBlob, shareFile, openPreview, executeFileAction, getExtension, getFormatLabel, } from '../vendor';
|
|
51
|
+
export declare function generateXML(headers: string[], rows: Record<string, any>[], config?: {
|
|
52
|
+
title?: string;
|
|
53
|
+
subtitle?: string;
|
|
54
|
+
totals?: Record<string, any> | null;
|
|
55
|
+
summary?: DataTableExportSummary | null;
|
|
56
|
+
metadata?: DataTableExportMetadata;
|
|
57
|
+
}): Blob;
|
|
58
|
+
export declare function buildExportBlob(format: DataTableExportFormat, headers: string[], rows: Record<string, any>[], config?: {
|
|
59
|
+
title?: string;
|
|
60
|
+
subtitle?: string;
|
|
61
|
+
totals?: Record<string, any> | null;
|
|
62
|
+
summary?: DataTableExportSummary | null;
|
|
63
|
+
xlsx?: DataTableXlsxStyle;
|
|
64
|
+
pdf?: DataTablePdfConfig;
|
|
65
|
+
html?: {
|
|
66
|
+
title?: string;
|
|
67
|
+
styles?: string;
|
|
68
|
+
};
|
|
69
|
+
totalKeys?: string[];
|
|
70
|
+
columns?: DataTableColumn[];
|
|
71
|
+
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
72
|
+
metadata?: DataTableExportMetadata;
|
|
73
|
+
branding?: {
|
|
74
|
+
name: string;
|
|
75
|
+
url?: string;
|
|
76
|
+
};
|
|
77
|
+
}): Promise<Blob>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type DataTableColumn, type DataTableCellStyle, type DataTableExportMetadata, type DataTableExportOptions } from '../types';
|
|
2
|
+
import { type DataTableLabels } from '../labels';
|
|
3
|
+
export declare function autoFormatValue(value: any, labels?: DataTableLabels): string | number;
|
|
4
|
+
export declare function prepareExportRows<TData>(data: TData[], columns: DataTableColumn<TData>[], visibleKeys: string[], labels?: DataTableLabels): {
|
|
5
|
+
headers: string[];
|
|
6
|
+
rows: Record<string, any>[];
|
|
7
|
+
exportColumns: DataTableColumn<TData>[];
|
|
8
|
+
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
9
|
+
};
|
|
10
|
+
export declare function buildBusinessMeta(host?: DataTableExportOptions): Pick<DataTableExportMetadata, 'businessName' | 'businessAddress' | 'businessPhone' | 'taxNumber' | 'taxNumberLabel'>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type DataTableExportTemplate, type DataTableExportTemplatePrefs } from '../types';
|
|
2
|
+
export declare function isTemplateShown(template: DataTableExportTemplate, prefs: DataTableExportTemplatePrefs | undefined): boolean;
|
|
3
|
+
export declare function orderTemplates<T extends DataTableExportTemplate>(templates: T[], prefs: DataTableExportTemplatePrefs | undefined): T[];
|
|
4
|
+
export declare function splitTemplates(templates: DataTableExportTemplate[], prefs: DataTableExportTemplatePrefs | undefined, upfront: number): {
|
|
5
|
+
visible: DataTableExportTemplate[];
|
|
6
|
+
hidden: DataTableExportTemplate[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DataTableColumn, DataTableExportOption, DataTableExportOptionContext, DataTableExportOptionValues, DataTableExportTemplate } from '../types';
|
|
2
|
+
export declare const optionsOf: (template: Pick<DataTableExportTemplate, "options">) => DataTableExportOption[];
|
|
3
|
+
export declare const resolveOptionValues: (template: Pick<DataTableExportTemplate, "options">, stored?: DataTableExportOptionValues) => DataTableExportOptionValues;
|
|
4
|
+
export declare const optionContext: (values: DataTableExportOptionValues) => DataTableExportOptionContext;
|
|
5
|
+
export declare const resolveTemplateColumns: (template: Pick<DataTableExportTemplate, "columns">, ctx: DataTableExportOptionContext) => DataTableColumn[];
|
|
6
|
+
export declare const resolveTemplateParams: (template: Pick<DataTableExportTemplate, "params">, ctx: DataTableExportOptionContext) => Record<string, unknown> | undefined;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type DataTableColumn, type DataTableExportTemplate, type DataTableExportFormat, type DataTableExportAction, type DataTableExportSettings, type DataTableActiveFilter, type DataTableExportResult, type DataTableExportConfig, type DataTablePdfConfig, type DataTableExportSummary, type DataTableExportTemplatePrefs, type DataTableExportOptions, type DataTableAllRowsResult, type DataTableAuthorize, type DataTableSelection } from '../types';
|
|
2
|
+
import type { DataTableExportOptionValues } from '../types';
|
|
3
|
+
import { type DataTableLabels } from '../labels';
|
|
4
|
+
interface UseTableExportOptions<TData> {
|
|
5
|
+
columns: DataTableColumn<TData>[];
|
|
6
|
+
exportConfig?: DataTableExportConfig<TData>;
|
|
7
|
+
selection: DataTableSelection<TData>;
|
|
8
|
+
rows: TData[];
|
|
9
|
+
visibleColumns: string[];
|
|
10
|
+
globalFilter: string;
|
|
11
|
+
activeFilters: DataTableActiveFilter[];
|
|
12
|
+
tableId?: string;
|
|
13
|
+
exportColumns?: string[];
|
|
14
|
+
totalDataRows: number;
|
|
15
|
+
matchingCount: number;
|
|
16
|
+
exportSettings: DataTableExportSettings;
|
|
17
|
+
context?: Record<string, any>;
|
|
18
|
+
templateColumnOverrides?: Record<string, {
|
|
19
|
+
customColumns?: string[];
|
|
20
|
+
options?: DataTableExportOptionValues;
|
|
21
|
+
}>;
|
|
22
|
+
templatePrefs?: DataTableExportTemplatePrefs;
|
|
23
|
+
exportOptions?: DataTableExportOptions;
|
|
24
|
+
authorize?: DataTableAuthorize;
|
|
25
|
+
loadAllRows?: (format: DataTableExportFormat, action: DataTableExportAction, params?: Record<string, unknown>) => Promise<DataTableAllRowsResult<TData>>;
|
|
26
|
+
labels?: DataTableLabels;
|
|
27
|
+
locale?: string;
|
|
28
|
+
}
|
|
29
|
+
interface UseTableExportReturn {
|
|
30
|
+
hasExport: boolean;
|
|
31
|
+
hasQuickExport: boolean;
|
|
32
|
+
quickFormats: DataTableExportFormat[];
|
|
33
|
+
visibleTemplates: DataTableExportTemplate[];
|
|
34
|
+
hiddenTemplates: DataTableExportTemplate[];
|
|
35
|
+
unavailableReasons: Record<string, string>;
|
|
36
|
+
executeQuickExport: (format: DataTableExportFormat, action: DataTableExportAction, options?: ExportOptions) => Promise<DataTableExportResult | undefined>;
|
|
37
|
+
executeTemplateExport: (templateId: string, format: DataTableExportFormat, action: DataTableExportAction, options?: ExportOptions) => Promise<DataTableExportResult | undefined>;
|
|
38
|
+
getTemplateRowCount: (templateId: string) => number;
|
|
39
|
+
getPreviewData: (templateId?: string) => Promise<{
|
|
40
|
+
headers: string[];
|
|
41
|
+
rows: Record<string, any>[];
|
|
42
|
+
totalCount: number;
|
|
43
|
+
} | null>;
|
|
44
|
+
getFormatAvailability: (templateId: string, format: DataTableExportFormat) => true | string;
|
|
45
|
+
}
|
|
46
|
+
interface ExportOptions {
|
|
47
|
+
includeTotals?: boolean;
|
|
48
|
+
includeSummary?: boolean;
|
|
49
|
+
computedSummary?: DataTableExportSummary;
|
|
50
|
+
pdfConfig?: DataTablePdfConfig;
|
|
51
|
+
}
|
|
52
|
+
export declare function useTableExport<TData>(options: UseTableExportOptions<TData>): UseTableExportReturn;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
|
+
import type { DataTableFilterGroup, DataTableColumn } from '../types';
|
|
3
|
+
import { type ColumnFilterKind } from './columnFilterModel';
|
|
4
|
+
interface ColumnFilterPopoverProps {
|
|
5
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
6
|
+
column: DataTableColumn;
|
|
7
|
+
kind: ColumnFilterKind;
|
|
8
|
+
filterGroup: DataTableFilterGroup;
|
|
9
|
+
setFilterGroup: (group: DataTableFilterGroup) => void;
|
|
10
|
+
operators?: readonly string[];
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function ColumnFilterPopover({ anchorRef, column, kind, filterGroup, setFilterGroup, operators, onClose }: ColumnFilterPopoverProps): React.JSX.Element;
|
|
14
|
+
export default ColumnFilterPopover;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableActiveFilter } from '../types';
|
|
3
|
+
interface FilterChipsProps {
|
|
4
|
+
filters: DataTableActiveFilter[];
|
|
5
|
+
onRemove: (id: string) => void;
|
|
6
|
+
onClearAll: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const FilterChips: React.FC<FilterChipsProps>;
|
|
9
|
+
export default FilterChips;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableFilterCondition, type DataTableColumn } from '../types';
|
|
3
|
+
interface FilterConditionRowProps {
|
|
4
|
+
condition: DataTableFilterCondition;
|
|
5
|
+
columns: DataTableColumn[];
|
|
6
|
+
onChange: (updated: DataTableFilterCondition) => void;
|
|
7
|
+
onRemove: () => void;
|
|
8
|
+
table?: any;
|
|
9
|
+
}
|
|
10
|
+
declare const FilterConditionRow: React.FC<FilterConditionRowProps>;
|
|
11
|
+
export default FilterConditionRow;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableFilterGroup as FilterGroupType, type DataTableColumn } from '../types';
|
|
3
|
+
interface FilterGroupProps {
|
|
4
|
+
group: FilterGroupType;
|
|
5
|
+
columns: DataTableColumn[];
|
|
6
|
+
onChange: (updated: FilterGroupType) => void;
|
|
7
|
+
onRemove?: () => void;
|
|
8
|
+
isRoot?: boolean;
|
|
9
|
+
table?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const FilterGroupEditor: React.FC<FilterGroupProps>;
|
|
12
|
+
export default FilterGroupEditor;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTableFilterGroup as FilterGroupType, type DataTableColumn, type DataTableSavedFilter } from '../types';
|
|
3
|
+
interface FilterModalProps {
|
|
4
|
+
filterGroup: FilterGroupType;
|
|
5
|
+
setFilterGroup: (group: FilterGroupType) => void;
|
|
6
|
+
columns: DataTableColumn[];
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
table?: any;
|
|
9
|
+
savedFilters?: DataTableSavedFilter[];
|
|
10
|
+
onSaveFilter?: (preset: DataTableSavedFilter) => void;
|
|
11
|
+
onDeleteFilter?: (id: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const FilterModal: React.FC<FilterModalProps>;
|
|
14
|
+
export default FilterModal;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataTableFilterGroup, DataTableColumn } from '../types';
|
|
3
|
+
export interface FilterRowCellPlacement {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
}
|
|
7
|
+
interface FilterRowProps {
|
|
8
|
+
columnKeys: string[];
|
|
9
|
+
columns: DataTableColumn[];
|
|
10
|
+
filterGroup: DataTableFilterGroup;
|
|
11
|
+
setFilterGroup: (group: DataTableFilterGroup) => void;
|
|
12
|
+
debounceMs: number;
|
|
13
|
+
hasSelection: boolean;
|
|
14
|
+
hasActionColumn: boolean;
|
|
15
|
+
placement: (columnKey: string) => FilterRowCellPlacement;
|
|
16
|
+
selectionCellClassName?: string;
|
|
17
|
+
actionCellClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const FilterRow: React.FC<FilterRowProps>;
|
|
20
|
+
export default FilterRow;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type DataTableFilterCondition, type DataTableFilterGroup, type DataTableColumn } from '../types';
|
|
2
|
+
export type ColumnFilterKind = 'options' | 'text' | 'number' | 'date' | 'boolean';
|
|
3
|
+
export type ColumnFilterState = {
|
|
4
|
+
kind: 'options';
|
|
5
|
+
mode: 'any' | 'none';
|
|
6
|
+
values: string[];
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'text';
|
|
9
|
+
op: 'contains' | 'equals';
|
|
10
|
+
text: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'number';
|
|
13
|
+
min: string;
|
|
14
|
+
max: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'date';
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'boolean';
|
|
21
|
+
value: '' | 'true' | 'false';
|
|
22
|
+
};
|
|
23
|
+
export declare function columnFilterKind(col: DataTableColumn, operators?: readonly string[]): ColumnFilterKind | null;
|
|
24
|
+
export declare function columnFilterNoneOffered(col: DataTableColumn, operators?: readonly string[]): boolean;
|
|
25
|
+
export declare function columnFilterEqualsOffered(operators?: readonly string[]): boolean;
|
|
26
|
+
export declare function emptyColumnFilter(kind: ColumnFilterKind): ColumnFilterState;
|
|
27
|
+
export declare function readColumnFilter(group: DataTableFilterGroup, col: DataTableColumn, kind: ColumnFilterKind): ColumnFilterState;
|
|
28
|
+
export declare function columnFilterCondition(col: DataTableColumn, state: ColumnFilterState): DataTableFilterCondition | null;
|
|
29
|
+
export declare function writeColumnFilter(group: DataTableFilterGroup, col: DataTableColumn, kind: ColumnFilterKind, state: ColumnFilterState | null): DataTableFilterGroup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type DataTableFilterCondition, type DataTableFilterGroup, type DataTableActiveFilter, type DataTableColumn, type DataTableColumnType } from '../types';
|
|
2
|
+
import { type DataTableLabels } from '../labels';
|
|
3
|
+
export declare function columnOperators(type: string): readonly string[];
|
|
4
|
+
export declare const OPTION_OPERATORS: readonly string[];
|
|
5
|
+
export declare function operatorLabel(operator: string, labels?: DataTableLabels): string;
|
|
6
|
+
export declare function getOperatorsForType(type: string, labels?: DataTableLabels): Array<{
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function inferColumnType(value: any): DataTableColumnType;
|
|
11
|
+
export declare function dayKey(v: unknown): string | null;
|
|
12
|
+
export declare function evaluateCondition(row: any, condition: DataTableFilterCondition, columns?: DataTableColumn[]): boolean;
|
|
13
|
+
export declare function evaluateGroup(row: any, group: DataTableFilterGroup, columns?: DataTableColumn[]): boolean;
|
|
14
|
+
export declare function flattenActiveFilters(group: DataTableFilterGroup, columns: DataTableColumn[], labels?: DataTableLabels): DataTableActiveFilter[];
|
|
15
|
+
export declare function removeConditionById(group: DataTableFilterGroup, id: string): DataTableFilterGroup;
|
|
16
|
+
export declare function hasActiveConditions(group: DataTableFilterGroup): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type DataTableFilterCondition, type DataTableFilterGroup, type DataTableColumn } from '../types';
|
|
2
|
+
export declare const FILTER_ROW_ID_PREFIX = "filter-row:";
|
|
3
|
+
export type FilterRowKind = 'text' | 'number' | 'date' | 'select' | 'boolean';
|
|
4
|
+
export type FilterRowValue = {
|
|
5
|
+
kind: 'text';
|
|
6
|
+
text: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'number';
|
|
9
|
+
min: string;
|
|
10
|
+
max: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'date';
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'select';
|
|
17
|
+
value: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'boolean';
|
|
20
|
+
value: '' | 'true' | 'false';
|
|
21
|
+
};
|
|
22
|
+
export declare function filterRowKind(col: DataTableColumn, operators?: readonly string[]): FilterRowKind | null;
|
|
23
|
+
export declare const emptyFilterRowValue: (kind: FilterRowKind) => FilterRowValue;
|
|
24
|
+
export declare function filterRowCondition(col: DataTableColumn, value: FilterRowValue): DataTableFilterCondition | null;
|
|
25
|
+
export declare function filterRowValueOf(kind: FilterRowKind, cond: DataTableFilterCondition | undefined): FilterRowValue;
|
|
26
|
+
export declare function readFilterRowCondition(group: DataTableFilterGroup, columnKey: string): DataTableFilterCondition | undefined;
|
|
27
|
+
export declare function writeFilterRowCondition(group: DataTableFilterGroup, columnKey: string, cond: DataTableFilterCondition | null): DataTableFilterGroup;
|
|
28
|
+
export declare function clearFilterRowConditions(group: DataTableFilterGroup): DataTableFilterGroup;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type DataTableFilterCondition, type DataTableFilterGroup, type DataTableQuickFilter, type DataTableSavedFilter } from '../types';
|
|
2
|
+
export declare function conditionsStillApplied(group: DataTableFilterGroup, conditions: DataTableFilterCondition[]): boolean;
|
|
3
|
+
export declare function quickFiltersStillOn(ids: string[], group: DataTableFilterGroup, quickFilters: DataTableQuickFilter[] | undefined, savedFilters: DataTableSavedFilter[]): string[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { DataTableColumn } from '../types';
|
|
3
|
+
import type { DisplayItem, GroupNode } from './groupModel';
|
|
4
|
+
interface GroupLineProps {
|
|
5
|
+
item: DisplayItem;
|
|
6
|
+
place: 'table' | 'card' | 'split';
|
|
7
|
+
keyboard: boolean;
|
|
8
|
+
tabbable: boolean;
|
|
9
|
+
columnHeader?: string;
|
|
10
|
+
onToggle: (key: string) => void;
|
|
11
|
+
selection?: {
|
|
12
|
+
checked: boolean;
|
|
13
|
+
indeterminate: boolean;
|
|
14
|
+
onToggle: () => void;
|
|
15
|
+
} | null;
|
|
16
|
+
summary?: ReactNode;
|
|
17
|
+
onShowAll: (node: GroupNode) => void;
|
|
18
|
+
onRetry: (node: GroupNode) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function GroupLine({ item, place, keyboard, tabbable, columnHeader, onToggle, selection, summary, onShowAll, onRetry }: GroupLineProps): React.JSX.Element | null;
|
|
21
|
+
export declare function GroupButton({ columns, levels, maxDepth, onChange }: {
|
|
22
|
+
columns: DataTableColumn[];
|
|
23
|
+
levels: string[];
|
|
24
|
+
maxDepth: number;
|
|
25
|
+
onChange: (levels: string[]) => void;
|
|
26
|
+
}): React.JSX.Element | null;
|
|
27
|
+
interface GroupChipsProps {
|
|
28
|
+
columns: DataTableColumn[];
|
|
29
|
+
levels: string[];
|
|
30
|
+
maxDepth: number;
|
|
31
|
+
onChange: (levels: string[]) => void;
|
|
32
|
+
onExpandAll: () => void;
|
|
33
|
+
onCollapseAll: () => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function GroupChips({ columns, levels, maxDepth, onChange, onExpandAll, onCollapseAll }: GroupChipsProps): React.JSX.Element | null;
|
|
36
|
+
export {};
|