@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
|
@@ -60,15 +60,6 @@ export interface VirtualScrollConfig {
|
|
|
60
60
|
overscan?: number;
|
|
61
61
|
maxHeight?: number;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
* @deprecated Superseded by `FieldKeyboardConfig`, which every field now takes.
|
|
65
|
-
*
|
|
66
|
-
* All six were per-component restatements of decisions the shared resolver
|
|
67
|
-
* makes: `preventEnter`/`preventEnterToOpen`/`selectOnEnter` are what Enter does
|
|
68
|
-
* given the popup state, `closeOnEscape`/`closeOnTab` are what Escape and Tab
|
|
69
|
-
* do, and `navigateWithArrows` is law L1. They are accepted and ignored so
|
|
70
|
-
* existing call sites keep compiling; nothing reads them.
|
|
71
|
-
*/
|
|
72
63
|
export interface KeyboardConfig {
|
|
73
64
|
preventEnter?: boolean;
|
|
74
65
|
preventEnterToOpen?: boolean;
|
|
@@ -96,10 +87,6 @@ export interface LoadingConfig {
|
|
|
96
87
|
loadingText?: string;
|
|
97
88
|
renderLoadingState?: () => ReactNode;
|
|
98
89
|
}
|
|
99
|
-
/**
|
|
100
|
-
* @deprecated Superseded by `FieldA11yProps` in `field.types`, which every field
|
|
101
|
-
* now gets from `BaseFieldProps`. Kept because the published barrel exports it.
|
|
102
|
-
*/
|
|
103
90
|
export interface SelectAccessibilityConfig {
|
|
104
91
|
'aria-label'?: string;
|
|
105
92
|
'aria-labelledby'?: string;
|
|
@@ -107,19 +94,9 @@ export interface SelectAccessibilityConfig {
|
|
|
107
94
|
'aria-required'?: boolean;
|
|
108
95
|
'aria-invalid'?: boolean;
|
|
109
96
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Select has no DOM event to forward, so it emits the shared shape directly.
|
|
112
|
-
*
|
|
113
|
-
* It used to carry `target.attributes.cellindex.value`, mimicking a DOM node so
|
|
114
|
-
* a grid could read the cell back off the event. Nothing ever read it — the
|
|
115
|
-
* grid tracks focus through `onCellFocus` — and its presence meant a handler
|
|
116
|
-
* typed for any other field could not be passed to a Select. Removing it is
|
|
117
|
-
* what makes one `(e: FieldChangeEvent) => void` work across the whole family.
|
|
118
|
-
*/
|
|
119
97
|
export type SelectEvent = FieldChangeEvent<any>;
|
|
120
98
|
export interface SelectProps extends TextFieldProps<any, HTMLDivElement, SelectEvent>, FieldPopupProps {
|
|
121
99
|
options: (string | number | SelectOption)[];
|
|
122
|
-
/** Required, unlike the base: a Select that cannot report a choice is inert. */
|
|
123
100
|
onChange: (event: SelectEvent) => void;
|
|
124
101
|
defaultText?: string;
|
|
125
102
|
autoFocusSearch?: boolean;
|
|
@@ -130,15 +107,6 @@ export interface SelectProps extends TextFieldProps<any, HTMLDivElement, SelectE
|
|
|
130
107
|
reorder?: boolean | ReorderConfig;
|
|
131
108
|
group?: boolean | GroupConfig;
|
|
132
109
|
virtualScroll?: boolean | VirtualScrollConfig;
|
|
133
|
-
/**
|
|
134
|
-
* The shared policy, intersected with Select's own six booleans.
|
|
135
|
-
*
|
|
136
|
-
* `KeyboardConfig`'s members are all expressible in `FieldKeyboardConfig`
|
|
137
|
-
* — `preventEnter`, `selectOnEnter` and `navigateWithArrows` are exactly the
|
|
138
|
-
* per-widget rules the shared resolver owns — so this intersection is the
|
|
139
|
-
* transition state, not the destination. Step 0c folds the six in and
|
|
140
|
-
* deletes `KeyboardConfig`.
|
|
141
|
-
*/
|
|
142
110
|
keyboard?: FieldKeyboardConfig & KeyboardConfig;
|
|
143
111
|
position?: DropdownPosition | PositionConfig;
|
|
144
112
|
emptyState?: EmptyStateConfig;
|
|
@@ -159,9 +127,7 @@ export interface SelectProps extends TextFieldProps<any, HTMLDivElement, SelectE
|
|
|
159
127
|
renderOption?: (option: SelectOption, isSelected: boolean, isHighlighted: boolean) => ReactNode;
|
|
160
128
|
renderSelectedValue?: (value: any | any[], options: SelectOption[]) => ReactNode;
|
|
161
129
|
renderChip?: (option: SelectOption, onRemove: () => void) => ReactNode;
|
|
162
|
-
/** @deprecated Use `onOpenChange`, which reports *why* — the grid needs the reason. */
|
|
163
130
|
onOpen?: () => void;
|
|
164
|
-
/** @deprecated Use `onOpenChange`. */
|
|
165
131
|
onClose?: () => void;
|
|
166
132
|
onSearch?: (searchTerm: string) => void;
|
|
167
133
|
onSelect?: (value: any) => void;
|
|
@@ -194,17 +160,10 @@ export interface UseSelectReturn {
|
|
|
194
160
|
handleToggle: () => void;
|
|
195
161
|
handleSelect: (option: SelectOption) => void;
|
|
196
162
|
handleMultiSelect: (option: SelectOption) => void;
|
|
197
|
-
/**
|
|
198
|
-
* Highlight primitives, driven by `resolveFieldKey` through `useField`.
|
|
199
|
-
* They replace a `handleKeyDown` that returned a boolean telling the
|
|
200
|
-
* parent whether to also handle the key — the second of this
|
|
201
|
-
* component's two arbitration mechanisms.
|
|
202
|
-
*/
|
|
203
163
|
highlightNext: () => void;
|
|
204
164
|
highlightPrev: () => void;
|
|
205
165
|
highlightFirst: () => void;
|
|
206
166
|
highlightLast: () => void;
|
|
207
|
-
/** @returns whether an option was actually picked. */
|
|
208
167
|
pickHighlighted: () => boolean;
|
|
209
168
|
handleSearchChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
210
169
|
handleClickOutside: (event: MouseEvent) => void;
|
|
@@ -47,9 +47,7 @@ export interface SuggestionItemProps {
|
|
|
47
47
|
export interface SuggestionListProps<T = any> {
|
|
48
48
|
suggestions: T[];
|
|
49
49
|
renderKeys: RenderKey[];
|
|
50
|
-
/** Drives the shared popup list's size variables. Defaults to `small`. */
|
|
51
50
|
size?: SuggestSize;
|
|
52
|
-
/** Decides the popup's shape — joined to a boxed field, or a floating panel. */
|
|
53
51
|
variant?: SuggestVariant;
|
|
54
52
|
onSelect: (item: T) => void;
|
|
55
53
|
highlightedIndex: number;
|
|
@@ -65,6 +63,7 @@ export interface SuggestionListProps<T = any> {
|
|
|
65
63
|
containerRef: RefObject<HTMLDivElement | null>;
|
|
66
64
|
portal?: boolean;
|
|
67
65
|
zIndex?: number;
|
|
66
|
+
exiting?: boolean;
|
|
68
67
|
renderItem?: (item: T, isHighlighted: boolean, searchValue: string) => ReactNode;
|
|
69
68
|
renderEmptyState?: (searchValue: string) => ReactNode;
|
|
70
69
|
renderGroup?: (groupName: string, items: T[]) => ReactNode;
|
|
@@ -72,9 +71,7 @@ export interface SuggestionListProps<T = any> {
|
|
|
72
71
|
export interface SuggestProps extends TextFieldProps<string, HTMLInputElement, ChangeEvent<HTMLInputElement>>, FieldPopupProps {
|
|
73
72
|
data: any[];
|
|
74
73
|
config: SuggestionConfig;
|
|
75
|
-
/** Required, unlike the base: a Suggest with no value has nothing to search on. */
|
|
76
74
|
value: string;
|
|
77
|
-
/** Required, unlike the base: a Suggest that cannot report typing is inert. */
|
|
78
75
|
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
79
76
|
onSelect?: (item: any, inputName?: string) => void;
|
|
80
77
|
onClear?: () => void;
|
|
@@ -119,16 +116,10 @@ export interface UseSuggestReturn {
|
|
|
119
116
|
loading: boolean;
|
|
120
117
|
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
121
118
|
handleSelect: (item: any, index: number) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Highlight primitives, driven by `resolveFieldKey` through `useField`.
|
|
124
|
-
* These replace the hook's old `handleKeyDown`, which claimed the arrow keys
|
|
125
|
-
* whether or not the list was open.
|
|
126
|
-
*/
|
|
127
119
|
highlightNext: () => void;
|
|
128
120
|
highlightPrev: () => void;
|
|
129
121
|
highlightFirst: () => void;
|
|
130
122
|
highlightLast: () => void;
|
|
131
|
-
/** @returns whether an item was actually picked. */
|
|
132
123
|
pickHighlighted: () => boolean;
|
|
133
124
|
handleFocus: () => void;
|
|
134
125
|
handleBlur: () => void;
|
|
@@ -8,10 +8,6 @@ export type SwitchColor = FieldColor;
|
|
|
8
8
|
export interface SwitchProps extends ToggleFieldProps<string | number, HTMLInputElement, ChangeEvent<HTMLInputElement>> {
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
defaultChecked?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use `hint` — the shared name for this slot, which is what
|
|
13
|
-
* FieldWrapper renders. Kept until the components migrate (step 0c).
|
|
14
|
-
*/
|
|
15
11
|
helperText?: string | ReactNode;
|
|
16
12
|
onText?: string;
|
|
17
13
|
offText?: string;
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The table vocabulary, shared.
|
|
4
|
-
*
|
|
5
|
-
* These are the client `Table`'s own column and summary props
|
|
6
|
-
* (`apps/web/client/src/Utils/CustomElements/Table/types.ts`), lifted into the
|
|
7
|
-
* shared layer so the editable table can speak the same language. A developer
|
|
8
|
-
* who has configured a report table already knows every name here — `width`,
|
|
9
|
-
* `minWidth`, `align`, `sticky`, `summable`, `summary`, `cell`, `cellStyle` —
|
|
10
|
-
* and a summary written for a report table works on an editable one unchanged.
|
|
11
|
-
*
|
|
12
|
-
* The rule the editable table follows: **everything is a prop, and where the
|
|
13
|
-
* Table already has a prop for something, use that exact prop.**
|
|
14
|
-
*/
|
|
15
2
|
export type ColumnAlign = 'left' | 'center' | 'right';
|
|
16
3
|
export type ColumnSticky = 'left' | 'right';
|
|
17
4
|
export interface CellStyle {
|
|
@@ -31,11 +18,6 @@ export interface ColumnSummaryConfig<T = any> {
|
|
|
31
18
|
filter?: (row: T) => boolean;
|
|
32
19
|
formatter?: (value: number, rows: T[]) => string;
|
|
33
20
|
}
|
|
34
|
-
/**
|
|
35
|
-
* What a summary `compute` receives. Shaped like the Table's context so a
|
|
36
|
-
* summary written there runs here; the members an editable table has no
|
|
37
|
-
* equivalent for (selection, filters) are optional.
|
|
38
|
-
*/
|
|
39
21
|
export interface SummaryContext {
|
|
40
22
|
allRows: any[];
|
|
41
23
|
visibleColumns: string[];
|
|
@@ -43,7 +25,6 @@ export interface SummaryContext {
|
|
|
43
25
|
filters?: unknown[];
|
|
44
26
|
context?: Record<string, any>;
|
|
45
27
|
}
|
|
46
|
-
/** The Table names this `LicenseConfig`; renamed here only to avoid a barrel collision. */
|
|
47
28
|
export interface SummaryLicenseConfig {
|
|
48
29
|
tab: string;
|
|
49
30
|
subtab: string;
|
|
@@ -52,12 +33,6 @@ export interface SummaryLicenseConfig {
|
|
|
52
33
|
export interface SummaryItem<T = any> {
|
|
53
34
|
id: string;
|
|
54
35
|
label: string;
|
|
55
|
-
/**
|
|
56
|
-
* `resolved` carries every column total and every earlier item, keyed by id —
|
|
57
|
-
* so *average cost = total cost / total qty* reads the column totals rather
|
|
58
|
-
* than recomputing them. Column totals use the Table's id scheme,
|
|
59
|
-
* `col_<column>_<type>`, unless the column's summary names its own `id`.
|
|
60
|
-
*/
|
|
61
36
|
compute: (data: T[], context: SummaryContext, resolved: Record<string, number | string>) => string | number;
|
|
62
37
|
format?: SummaryFormat;
|
|
63
38
|
decimals?: number;
|
|
@@ -81,7 +56,6 @@ export interface SummaryGroupKey {
|
|
|
81
56
|
formatter?: (value: any) => string;
|
|
82
57
|
bold?: boolean;
|
|
83
58
|
color?: string;
|
|
84
|
-
/** Force-hide. Left unset, a key the group's `compute` omitted is hidden automatically. */
|
|
85
59
|
hidden?: boolean;
|
|
86
60
|
}
|
|
87
61
|
export interface SummaryGroup<T = any> {
|
|
@@ -121,71 +95,38 @@ export interface ResolvedSummaryGroup {
|
|
|
121
95
|
hidden: boolean;
|
|
122
96
|
license?: SummaryLicenseConfig;
|
|
123
97
|
}
|
|
124
|
-
/** One column's total, for the footer row. */
|
|
125
98
|
export interface ResolvedColumnTotal {
|
|
126
|
-
/** The column's `name`. */
|
|
127
99
|
column: string;
|
|
128
|
-
/** Table-compatible id — `summary.id` or `col_<column>_<type>`. */
|
|
129
100
|
id: string;
|
|
130
101
|
type: SummaryAggregation;
|
|
131
102
|
label: string;
|
|
132
103
|
rawValue: number;
|
|
133
104
|
value: string;
|
|
134
105
|
}
|
|
135
|
-
/**
|
|
136
|
-
* The layout and display half of a table column — the Table's props.
|
|
137
|
-
*
|
|
138
|
-
* On an editable table these sit beside the field definition (`field`, `name`,
|
|
139
|
-
* `fprop`…). Every one is optional: when a column names none of them,
|
|
140
|
-
* `resolveColumnLayout` supplies a default by widget, so an unconfigured column
|
|
141
|
-
* still lays out well. **Prop → default**, the same order as `size` and
|
|
142
|
-
* `keyboard`.
|
|
143
|
-
*/
|
|
144
106
|
export interface TableColumnDisplayProps<T = any> {
|
|
145
|
-
/** Fixed width in px. A column with a width is fixed; one without shares the remaining space. */
|
|
146
107
|
width?: number;
|
|
147
|
-
/** Floor in px before the table scrolls sideways. Ignored for a fixed column, whose floor is its width. */
|
|
148
108
|
minWidth?: number;
|
|
149
109
|
align?: ColumnAlign;
|
|
150
|
-
/** Pin while scrolling sideways. A sticky column is always fixed-width, so offsets stay exact. */
|
|
151
110
|
sticky?: ColumnSticky;
|
|
152
|
-
/** Shorthand for `summary: { type: 'sum' }`. */
|
|
153
111
|
summable?: boolean;
|
|
154
112
|
summary?: ColumnSummaryConfig<T>;
|
|
155
|
-
/**
|
|
156
|
-
* Render the value as text instead of a field. For derived values — T.Cost —
|
|
157
|
-
* that are results, not inputs. Keyboard navigation skips a read-only cell.
|
|
158
|
-
*/
|
|
159
113
|
readOnly?: boolean;
|
|
160
|
-
/** Custom read-only content. Implies `readOnly`. */
|
|
161
114
|
cell?: (value: any, row: T, index: number) => ReactNode;
|
|
162
115
|
cellStyle?: (value: any, row: T) => CellStyle | undefined;
|
|
163
116
|
}
|
|
164
|
-
/** What `resolveColumnLayout` hands the renderer — every decision made, nothing optional left to guess. */
|
|
165
117
|
export interface ResolvedColumnLayout {
|
|
166
|
-
/** Present for fixed columns; absent for flexible ones, which share the remainder. */
|
|
167
118
|
width?: number;
|
|
168
119
|
minWidth: number;
|
|
169
120
|
align: ColumnAlign;
|
|
170
121
|
fixed: boolean;
|
|
171
122
|
sticky?: ColumnSticky;
|
|
172
|
-
/** px from the pinned edge, cumulative across pinned columns on the same side. */
|
|
173
123
|
stickyOffset?: number;
|
|
174
|
-
/** The innermost pinned column on its side — draws the divider where scrolling content passes under. */
|
|
175
124
|
stickyEdge?: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Flexible columns only: this column's share of the space the fixed columns leave,
|
|
178
|
-
* in proportion to its floor. Proportional rather than equal on purpose — an equal
|
|
179
|
-
* split can hand a 300px-floor column less than its floor while a 50px one gets
|
|
180
|
-
* spare, even though the table as a whole is above its minimum width.
|
|
181
|
-
*/
|
|
182
125
|
flexShare?: number;
|
|
183
126
|
}
|
|
184
127
|
export interface ResolvedTableLayout {
|
|
185
128
|
columns: ResolvedColumnLayout[];
|
|
186
|
-
/** Σ of every column's floor. The table scrolls sideways only below this. */
|
|
187
129
|
minTableWidth: number;
|
|
188
|
-
/** Σ of the fixed columns' widths — what a flexible column's share is taken from the rest of. */
|
|
189
130
|
fixedWidthTotal: number;
|
|
190
131
|
hasSticky: boolean;
|
|
191
132
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export type TooltipTrigger = 'icon' | 'control';
|
|
4
|
+
export type TooltipAnchorTo = 'auto' | 'element' | 'pointer';
|
|
5
|
+
export interface TooltipConfig {
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
placement?: TooltipPlacement;
|
|
8
|
+
anchorTo?: TooltipAnchorTo;
|
|
9
|
+
delay?: number;
|
|
10
|
+
closeDelay?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export type TooltipProp = ReactNode | TooltipConfig;
|
|
15
|
+
export interface TooltipProps extends TooltipConfig {
|
|
16
|
+
children: ReactElement;
|
|
17
|
+
id?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface TooltipRect {
|
|
20
|
+
top: number;
|
|
21
|
+
left: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
}
|
|
25
|
+
export interface TooltipPositionInput {
|
|
26
|
+
anchor: TooltipRect;
|
|
27
|
+
tooltip: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
viewport: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
placement: TooltipPlacement;
|
|
36
|
+
offset: number;
|
|
37
|
+
margin?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface TooltipPosition {
|
|
40
|
+
top: number;
|
|
41
|
+
left: number;
|
|
42
|
+
placement: TooltipPlacement;
|
|
43
|
+
}
|
|
@@ -28,10 +28,6 @@ export interface TypographyProps extends DataAttributes {
|
|
|
28
28
|
gutterBottom?: boolean;
|
|
29
29
|
noWrap?: boolean;
|
|
30
30
|
truncate?: boolean | TruncateConfig;
|
|
31
|
-
/**
|
|
32
|
-
* Explicit tooltip. Without it, `truncate.tooltip` supplies one from the text
|
|
33
|
-
* itself — and that one only appears when the text is genuinely clipped.
|
|
34
|
-
*/
|
|
35
31
|
tooltip?: TooltipProp;
|
|
36
32
|
inline?: boolean;
|
|
37
33
|
gradient?: GradientConfig;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export { Tooltip, TooltipHelpIcon, useTooltip } from './components/Tooltip';
|
|
2
|
+
export type { TooltipHelpIconProps, UseTooltipResult } from './components/Tooltip';
|
|
3
|
+
export type { TooltipProps, TooltipProp, TooltipConfig, TooltipPlacement, TooltipTrigger, } from './core/types';
|
|
4
|
+
export { Typography } from './components/Typography';
|
|
5
|
+
export type { TypographyProps, TypographyVariant, TypographyColor, TypographyAlign, TypographyWeight, TypographyTransform, TypographyDecoration, TypographyComponent, TruncateConfig, GradientConfig, } from './components/Typography';
|
|
6
|
+
export { Button, ButtonGroup } from './components/Button';
|
|
7
|
+
export type { ButtonProps, ButtonGroupProps, ButtonVariant, ButtonSize, ButtonColor, ButtonShape, LoadingPosition, GroupOrientation, ButtonGroupContextValue, } from './components/Button';
|
|
8
|
+
export { FieldWrapper } from './components/FieldWrapper';
|
|
9
|
+
export type { FieldWrapperProps, FieldLayout, FieldSize, } from './components/FieldWrapper';
|
|
10
|
+
export { FieldContext, FieldProvider, useFieldContext, useFieldSurface, useToggleSurface, useField, useFormKeyboard, } from './components/FieldContext';
|
|
11
|
+
export type { FieldContextValue, FieldProviderProps, FieldSurfaceInput, FieldSurfaceDefaults, ResolvedFieldSurface, ResolvedToggleSurface, UseFieldOptions, UseFieldResult, UseFormKeyboardOptions, } from './components/FieldContext';
|
|
12
|
+
export type { BaseFieldProps, TextFieldProps, ToggleFieldProps, FieldIdentityProps, FieldChromeProps, FieldA11yProps, FieldInteractionProps, FieldSurfaceProps, ControlSurfaceProps, ToggleSurfaceProps, FieldPopupProps, FieldHandle, FieldFocusEvent, OpenReason, FieldKeyboardConfig, FieldWidget, FieldKeyState, FieldKeyAction, KeyResolution, KeyEventLike, NavAction, GridMode, } from './core/types';
|
|
13
|
+
export type { ControlSize, ControlVariant, ControlLayout, ControlLabelPosition, ToggleVariant, SemanticColor, FieldColor, FieldChangeEvent, FieldChangeTarget, FieldCellContext, } from './core/types';
|
|
14
|
+
export { DEFAULT_CONTROL_SIZE } from './core/types';
|
|
15
|
+
export { Checkbox, CheckboxGroup } from './components/Checkbox';
|
|
16
|
+
export type { CheckboxProps, CheckboxGroupProps, CheckboxVariant, CheckboxSize, CheckboxLabelPosition, CheckboxColor, CheckboxGroupContextValue, } from './components/Checkbox';
|
|
17
|
+
export { Radio, RadioGroup } from './components/Radio';
|
|
18
|
+
export type { RadioProps, RadioGroupProps, RadioVariant, RadioSize, RadioLabelPosition, RadioColor, RadioGroupContextValue, } from './components/Radio';
|
|
19
|
+
export { Switch } from './components/Switch';
|
|
20
|
+
export type { SwitchProps, SwitchSize, SwitchLabelPosition, SwitchColor, } from './components/Switch';
|
|
21
|
+
export { Input } from './components/Input';
|
|
22
|
+
export type { InputProps, InputType, InputVariant, InputSize, InputLayout, ValidationConfig, IconConfig, } from './components/Input';
|
|
23
|
+
export { Select, useSelect } from './components/Select';
|
|
24
|
+
export type { SelectProps, SelectOption, SelectSize, SelectLayout, SelectState, SelectEvent, SelectAccessibilityConfig, UseSelectReturn, UseSelectConfig, MultiSelectConfig, SearchConfig, SortConfig, ReorderConfig, GroupConfig, VirtualScrollConfig, KeyboardConfig, DropdownPosition, PositionConfig, EmptyStateConfig, LoadingConfig, ChipProps, GroupDisplayProps, OptionItemProps, AutoScrollState, DropdownDimensions, OptionValue, } from './components/Select';
|
|
25
|
+
export { DatePicker, Calendar } from './components/DatePicker';
|
|
26
|
+
export type { DatePickerProps, DatePickerBaseProps, DatePickerSingleProps, DatePickerRangeProps, DateRangeValue, DateDisplayFormat, DateTextOrder, CalendarProps, } from './components/DatePicker';
|
|
27
|
+
export { Suggest, SuggestionList, useSuggest } from './components/Suggest';
|
|
28
|
+
export { FORMATTER_UTILITY_CLASSES, SUGGEST_SEARCH_ENGINE_OPTIONS, SUGGEST_SEARCH_MODE_OPTIONS, } from './components/Suggest';
|
|
29
|
+
export type { SuggestProps, SuggestSize, SuggestLayout, SuggestSearchEngine, SuggestSearchMode, RenderKey, SuggestionConfig, SuggestionItemProps, SuggestionListProps, SuggestionGroup, UseSuggestOptions, UseSuggestReturn, SuggestSearchOptions, } from './components/Suggest';
|
|
30
|
+
export { Collapsible, CollapsibleItem, CollapsibleContext, useCollapsibleContext } from './components/Collapsible';
|
|
31
|
+
export type { CollapsibleProps, CollapsibleItemProps, CollapsibleContextValue, CollapsibleVariant, CollapsibleSize, CollapsibleColor, CollapsibleIconPosition, CollapsibleExpansionMode, CollapsibleAuthorize, } from './components/Collapsible';
|
|
32
|
+
export { Fields, Field } from './components/Fields';
|
|
33
|
+
export { useFieldCondition, useFieldRender, useFieldDisabled, useFieldValue, useFieldChange, useFieldBlur, useFieldValidation, useFieldSelect, } from './components/Fields';
|
|
34
|
+
export type { FieldsProps, FieldProps, FieldsBaseProps, FieldsWithSetState, FieldsWithOnChange, FieldDefinition, FieldsDefinition, FieldAuthorize, FieldTooltipProps, FieldComponentRegistry, FieldEditableTableProps, BaseFieldDefinition, InputFieldDefinition, SwitchFieldDefinition, SelectFieldDefinition, SuggestFieldDefinition, RadioFieldDefinition, CheckboxFieldDefinition, ButtonFieldDefinition, ChildFieldDefinition, EditableTableFieldDefinition, ChipInputFieldDefinition, ConditionOperator, ConditionCompareType, ConditionObject, ConditionRegexObject, ConditionFunction, ConditionSimpleKey, Condition, ConditionContext, NestedKeys, NestedValue, ResetKeyConfig, SelectCopyKeyConfig, ChangeContext, ChangeAdditionalDataContext, SelectAdditionalDataContext, EditableTableCustomPropContext, ErrorObject, TouchedObject, } from './components/Fields';
|
|
35
|
+
export { Form } from './components/Form';
|
|
36
|
+
export type { FormProps, FormMethods, FormSection, FormAction, FormValidation, FormHeader, FormFooter, FormCallbacks, FormState, FormLayout, FormSize, FormVariant, } from './components/Form';
|
|
37
|
+
export { ChipInput, useChipSuggestions } from './components/ChipInput';
|
|
38
|
+
export { parseFormat, resolveFormat, extractPlaceholders, validateFormat, } from './components/ChipInput';
|
|
39
|
+
export type { ChipInputProps, ChipInputSize, ChipInputLayout, ChipKey, ChipSource, ChipSources, ChipSuggestionItem, GroupedSuggestions, ParsedSegment, ResolveOptions, ExtractedPlaceholder, FormatValidationResult, UseChipSuggestionsOptions, UseChipSuggestionsReturn, } from './components/ChipInput';
|
|
40
|
+
export { EditableTable, EditableTableRow, EditableTableActions, EditableTableCell, EditableTableSummary, useEditableTable } from './components/EditableTable';
|
|
41
|
+
export type { EditableTableProps, EditableTableRowProps, EditableTableActionsProps, EditableTableColumnDefinition, EditableTableFocusState, EditableTableCopyConfig, EditableTableAddConfig, EditableTableDeleteConfig, EditableTableFooterConfig, EditableTableSummaryContext, EditableTableSummaryActions, TableColumnDisplayProps, TableSummaryConfig, ColumnSummaryConfig, SummaryItem, SummaryGroup, CellStyle, ColumnAlign, ColumnSticky, } from './components/EditableTable';
|
|
42
|
+
export * from './components/DataTable';
|
|
43
|
+
export * from './components/Charts';
|
|
44
|
+
export * from './components/Scroll';
|
|
45
|
+
export { ColorSchemeSelect } from './components/ColorSchemeSelect';
|
|
46
|
+
export type { ColorSchemeSelectProps } from './components/ColorSchemeSelect';
|
|
47
|
+
export { UIProvider, useUIPortalContainer, useUITheme } from './components/UIProvider';
|
|
48
|
+
export type { UIProviderProps, UITheme, ResolvedUITheme, UIThemeValue } from './components/UIProvider';
|
|
49
|
+
export { Skeleton } from './components/Skeleton';
|
|
50
|
+
export type { SkeletonProps, SkeletonVariant, SkeletonAnimation } from './components/Skeleton';
|
|
51
|
+
export { Badge } from './components/Badge';
|
|
52
|
+
export type { BadgeProps, BadgeColor, BadgeVariant, BadgeSize } from './components/Badge';
|
|
53
|
+
export { Avatar, AvatarGroup } from './components/Avatar';
|
|
54
|
+
export type { AvatarProps, AvatarGroupProps, AvatarSize, AvatarShape } from './components/Avatar';
|
|
55
|
+
export { Card } from './components/Card';
|
|
56
|
+
export type { CardProps, CardVariant, CardPadding } from './components/Card';
|
|
57
|
+
export { Popover } from './components/Popover';
|
|
58
|
+
export type { PopoverProps } from './components/Popover';
|
|
59
|
+
export { DropdownMenu } from './components/DropdownMenu';
|
|
60
|
+
export type { DropdownMenuProps, DropdownMenuItem } from './components/DropdownMenu';
|
|
61
|
+
export { ImagePicker, ImageStrip, ImageViewer, prepareImage, ImagePrepareError } from './components/Image';
|
|
62
|
+
export type { ImagePickerProps, ImagePickerItem, ImageStripProps, StripImage, ImageViewerProps, ViewerImage, PrepareImageOptions, PreparedImage, } from './components/Image';
|
|
63
|
+
export { Dialog } from './components/Dialog';
|
|
64
|
+
export type { DialogProps, DialogPlacement, DialogSize } from './components/Dialog';
|
|
65
|
+
export { useDialog } from './components/Dialog/DialogHost';
|
|
66
|
+
export type { DialogApi, DialogChoice, DialogActionProps, ConfirmOptions, ChooseOptions, AlertOptions, } from './components/Dialog/DialogHost';
|
|
67
|
+
export { ToastHost, useToast } from './components/Toast';
|
|
68
|
+
export type { ToastApi, ToastDefaults, ToastOptions, ToastPosition, ToastRecord, ToastType, ToastHostProps, } from './components/Toast';
|
|
69
|
+
export { Stepper } from './components/Stepper';
|
|
70
|
+
export type { StepperProps, StepperStep } from './components/Stepper';
|
|
71
|
+
export { Tabs, TabPanel } from './components/Tabs';
|
|
72
|
+
export type { TabsProps, TabItem, TabsVariant, TabsSize, TabPanelProps } from './components/Tabs';
|
|
73
|
+
export { CommandPalette } from './components/CommandPalette';
|
|
74
|
+
export type { CommandPaletteProps, CommandPaletteItem } from './components/CommandPalette';
|
|
75
|
+
export { Sidebar } from './components/Sidebar';
|
|
76
|
+
export type { SidebarProps } from './components/Sidebar';
|
|
77
|
+
export { AppBar } from './components/AppBar';
|
|
78
|
+
export type { AppBarProps, AppBarSize, AppBarVariant } from './components/AppBar';
|
|
79
|
+
export { Breadcrumbs } from './components/Breadcrumbs';
|
|
80
|
+
export type { BreadcrumbsProps } from './components/Breadcrumbs';
|
|
81
|
+
export type { NavItem } from './core/types';
|
|
82
|
+
export { useArrowKeyFocus } from './components/ArrowKeyFocus/useArrowKeyFocus';
|
|
83
|
+
export type { ArrowKeyFocusOptions, ArrowKeyFocusHandlers } from './components/ArrowKeyFocus/useArrowKeyFocus';
|
|
84
|
+
export { buildFieldControlClassKeys, buildPopupListClassKeys, buildPopupRowClassKeys, computeTooltipPosition, normalizeTooltip, resolveTooltipPlacementOrder, shouldAnchorToPointer, useMergeRefs, } from './core/logic';
|
|
85
|
+
export type { FieldControlClassOptions, PopupListClassOptions, PopupRowClassOptions, TooltipAnchorDecision, } from './core/logic';
|
|
86
|
+
import './styles/index.css';
|
package/package.json
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcs-tech/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "React UI component library — fields, buttons, tooltips, tables and design tokens.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
8
8
|
"*.css"
|
|
9
9
|
],
|
|
10
|
-
"//files": "Allowlist, not a denylist: only dist ships. package.json, README and LICENSE are always included. Verify with `npm pack --dry-run` before every release.",
|
|
11
10
|
"files": [
|
|
12
11
|
"dist"
|
|
13
12
|
],
|
|
14
13
|
"main": "./dist/index.js",
|
|
15
|
-
"types": "./dist/types/
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
16
15
|
"exports": {
|
|
17
16
|
".": {
|
|
18
|
-
"types": "./dist/types/
|
|
17
|
+
"types": "./dist/types/index.d.ts",
|
|
19
18
|
"import": "./dist/index.js"
|
|
20
19
|
},
|
|
21
20
|
"./style.css": "./dist/style.css",
|
|
22
21
|
"./package.json": "./package.json"
|
|
23
22
|
},
|
|
24
|
-
"//publishConfig": "Scoped packages default to restricted; this makes every publish public without needing --access public each time.",
|
|
25
23
|
"publishConfig": {
|
|
26
24
|
"access": "public"
|
|
27
25
|
},
|
|
28
26
|
"scripts": {
|
|
29
|
-
"build": "vite build && npm run build:types && npm run verify:types && npm run verify:no-leak",
|
|
30
|
-
"
|
|
31
|
-
"pack:check": "npm run build && npm pack --dry-run",
|
|
32
|
-
"clean": "rm -rf dist",
|
|
33
|
-
"build:types": "tsc -p tsconfig.json && node scripts/relativize-types.mjs",
|
|
27
|
+
"build": "vite build && npm run build:types && npm run verify:types && npm run verify:no-leak && npm run verify:tokens",
|
|
28
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
34
29
|
"verify:types": "tsc -p tsconfig.verify.json",
|
|
35
|
-
"
|
|
36
|
-
"verify:
|
|
30
|
+
"verify:no-leak": "node scripts/verify-no-leak.mjs",
|
|
31
|
+
"verify:tokens": "node scripts/verify-tokens.ts",
|
|
32
|
+
"verify:contrast": "node scripts/verify-contrast.ts",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"pack:check": "npm run build && npm pack --dry-run",
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
|
+
"clean": "rm -rf dist"
|
|
37
38
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@tanstack/match-sorter-utils": "^8.19.4",
|
|
41
|
+
"@tanstack/react-table": "^8.21.3",
|
|
42
|
+
"@tanstack/react-virtual": "3.14.13",
|
|
43
|
+
"exceljs": "^4.4.0",
|
|
44
|
+
"fuse.js": "^7.5.0",
|
|
45
|
+
"match-sorter": "^8.1.0",
|
|
46
|
+
"pdfmake": "^0.2.7",
|
|
47
|
+
"react-icons": "^5.7.0"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"react": ">=18",
|
|
50
51
|
"react-dom": ">=18"
|
|
51
52
|
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@storybook/react-vite": "^10.5.5",
|
|
55
|
+
"@types/pdfmake": "^0.2.7"
|
|
56
|
+
},
|
|
52
57
|
"keywords": [
|
|
53
58
|
"react",
|
|
54
59
|
"ui",
|
|
55
60
|
"components",
|
|
56
61
|
"design-system"
|
|
57
|
-
]
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"fuse.js": "^7.5.0",
|
|
60
|
-
"match-sorter": "^8.1.0"
|
|
61
|
-
}
|
|
62
|
+
]
|
|
62
63
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The public API of @dcs-tech/ui.
|
|
3
|
-
*
|
|
4
|
-
* The reference above is load-bearing: the declaration bundler builds its program
|
|
5
|
-
* from this entry file alone, ignoring tsconfig `include`, so without it the
|
|
6
|
-
* ambient `*.module.css` declaration is missing and every component that imports
|
|
7
|
-
* a stylesheet fails with TS2307.
|
|
8
|
-
*
|
|
9
|
-
* This barrel IS the published surface. Nothing reaches the registry unless it is
|
|
10
|
-
* re-exported here, which is why the library can live in a monorepo alongside
|
|
11
|
-
* private business code without leaking any of it.
|
|
12
|
-
*
|
|
13
|
-
* TWO KINDS OF LINE BELOW, and the difference matters:
|
|
14
|
-
*
|
|
15
|
-
* `export *` from shared-web-ui
|
|
16
|
-
* Automatic. That package is components-only — it imports UI types and
|
|
17
|
-
* nothing else — so a new component appears in the next release with no
|
|
18
|
-
* edit here.
|
|
19
|
-
*
|
|
20
|
-
* Named exports from shared-logic
|
|
21
|
-
* Deliberate. Those packages also contain this business's own domain, so
|
|
22
|
-
* exporting by name is the gate that keeps it private. NEVER turn these
|
|
23
|
-
* into `export *`.
|
|
24
|
-
*
|
|
25
|
-
* And note what this barrel does NOT govern: `tsc` emits declarations for the whole
|
|
26
|
-
* program, so it never controlled `dist/types/`. That is what `src/publicLogic.ts` and
|
|
27
|
-
* `src/publicTypes.ts` are for, and what `verify:no-leak` checks.
|
|
28
|
-
*/
|
|
29
|
-
export * from '../../../shared-web-ui/src';
|
|
30
|
-
export { buildFieldControlClassKeys, buildPopupListClassKeys, buildPopupRowClassKeys, computeTooltipPosition, normalizeTooltip, resolveTooltipPlacementOrder, shouldAnchorToPointer, useMergeRefs, } from './publicLogic';
|
|
31
|
-
export type { FieldControlClassOptions, PopupListClassOptions, PopupRowClassOptions, TooltipAnchorDecision, } from './publicLogic';
|
|
32
|
-
import '../../../shared-styles/index.css';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What `@pdfinvoice/shared-logic` means INSIDE the published build.
|
|
3
|
-
*
|
|
4
|
-
* `tsconfig.json` maps the package specifier to this file, so every `from
|
|
5
|
-
* './publicLogic'` in the component sources — 58 of them in `shared-web-ui` alone —
|
|
6
|
-
* resolves here instead of to the package barrel. The domain folders beside `ui/` then never enter the TypeScript program, so no declaration is ever emitted for them.
|
|
7
|
-
*
|
|
8
|
-
* This is the fix for the leak audited on 2026-09-28: `tsc` emits declarations for the whole
|
|
9
|
-
* PROGRAM, so the `export *` gate in `index.ts` — which governs the JS surface, and does govern
|
|
10
|
-
* it correctly — never applied to `dist/types/`. Mapping the specifier is what makes the two
|
|
11
|
-
* surfaces agree.
|
|
12
|
-
*
|
|
13
|
-
* Anything added here ships publicly. The bar: is it generic UI, or is it this business?
|
|
14
|
-
*/
|
|
15
|
-
export * from '../../../shared-logic/src/ui';
|
|
16
|
-
/**
|
|
17
|
-
* The report engine, which is deliberately publishable.
|
|
18
|
-
*
|
|
19
|
-
* `ReportDesigner` is a published component and its props are typed in terms of these, so they
|
|
20
|
-
* are part of the public API whether or not they are named here. That is sound: the banded
|
|
21
|
-
* template model was designed DOMAIN-FREE from the start precisely so it could be published —
|
|
22
|
-
* it describes bands, columns and placeholders, not invoices. See `docs/REPORT_ENGINE.md`.
|
|
23
|
-
*
|
|
24
|
-
* `export *` here, unlike the package barrel, and the difference is verified rather than
|
|
25
|
-
* assumed: `report/` imports NO domain sibling at all (checked 2026-09-28 — not one relative
|
|
26
|
-
* import escapes the folder into a business module). It is a closed, generic module, so
|
|
27
|
-
* re-exporting it whole cannot pull the business in behind it.
|
|
28
|
-
*
|
|
29
|
-
* Listing these by name was tried first and is not practical: `ReportDesigner` and
|
|
30
|
-
* `ReportPreview` are published components typed against ~30 of these symbols, so a named list
|
|
31
|
-
* would be a second copy of `report/index` that silently rots whenever an editor gains a
|
|
32
|
-
* prop. The guard that matters is `verify:no-leak`, which fails the build if a domain term
|
|
33
|
-
* ever reaches `dist/` — including through this line, should `report/` stop being closed.
|
|
34
|
-
*/
|
|
35
|
-
export * from '../../../shared-logic/src/report/index';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What `@pdfinvoice/shared-types` means INSIDE the published build.
|
|
3
|
-
*
|
|
4
|
-
* The twin of `publicLogic.ts`, for the same reason and by the same mechanism: `tsconfig.json`
|
|
5
|
-
* maps the package specifier here, so the component sources resolve to this instead of to the
|
|
6
|
-
* package barrel — so the folders describing this business's own records never enter the
|
|
7
|
-
* program, or the declarations emitted from it.
|
|
8
|
-
*
|
|
9
|
-
* Both halves are verified self-contained (2026-09-28): neither `shared-types/src/ui` nor
|
|
10
|
-
* `shared-types/src/report` imports a domain sibling, so re-exporting them whole cannot pull
|
|
11
|
-
* the business in behind them. `verify:no-leak` is the standing guard if that ever changes.
|
|
12
|
-
*/
|
|
13
|
-
export * from '../../../shared-types/src/ui';
|
|
14
|
-
export * from '../../../shared-types/src/report';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — the fixed aggregate set.
|
|
3
|
-
*
|
|
4
|
-
* Eight functions, and deliberately no ninth mechanism. Crystal Reports' expression language is
|
|
5
|
-
* a parser, an editor, a sandbox and a debugger, and it is where projects like this one die.
|
|
6
|
-
* Anything past this list becomes a field the app computes. See `docs/REPORT_ENGINE.md` §7.
|
|
7
|
-
*
|
|
8
|
-
* What an aggregate covers is named in the call itself:
|
|
9
|
-
* `agg.sum(row.total)` — the rows of the table or section the text sits in
|
|
10
|
-
* `agg.sum(group.qty)` — one group value, across the rows under a group column
|
|
11
|
-
* `agg.sum(items.total)` — a whole row set, exactly as the app passed it
|
|
12
|
-
*/
|
|
13
|
-
import type { ReportAggregate } from '../../../published/dcs-ui/src/publicTypes';
|
|
14
|
-
/** `%agg.sum(row.total)%` — parsed once so the resolver does not re-parse per row. */
|
|
15
|
-
export interface AggregateCall {
|
|
16
|
-
kind: ReportAggregate;
|
|
17
|
-
/** `row`, `group`, or a row set key. */
|
|
18
|
-
over: string;
|
|
19
|
-
/** Path within each row, e.g. `total`. */
|
|
20
|
-
field: string;
|
|
21
|
-
}
|
|
22
|
-
/** Returns null when `expr` is not an aggregate call, so callers can fall through to a path read. */
|
|
23
|
-
export declare const parseAggregate: (expr: string) => AggregateCall | null;
|
|
24
|
-
/**
|
|
25
|
-
* `count` counts rows, not values — a row with a blank total still happened. `distinct` counts the
|
|
26
|
-
* different non-blank values. Every other aggregate ignores rows where the field is absent, so an
|
|
27
|
-
* average is over the rows that have one.
|
|
28
|
-
*/
|
|
29
|
-
export declare const computeAggregate: (call: Pick<AggregateCall, "kind" | "field">, rows: Array<Record<string, unknown>>) => number;
|