@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
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface FieldControlClassOptions {
|
|
2
|
-
/** FieldSize: 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' */
|
|
3
|
-
size?: string;
|
|
4
|
-
/** FieldVariant: 'outlined' | 'filled' | 'standard' | 'underlined' */
|
|
5
|
-
variant?: string;
|
|
6
|
-
error?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
readOnly?: boolean;
|
|
9
|
-
/** Reserve trailing space for in-field affixes (select arrow, clear button, …). */
|
|
10
|
-
hasAffix?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* A joined popup is open beneath this control, so its bottom corners must square to meet
|
|
13
|
-
* the list. Ignored for variants with no box — those get a floating panel instead.
|
|
14
|
-
*/
|
|
15
|
-
popupOpen?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Class keys for the shared control surface used by Input, Select and Suggest.
|
|
19
|
-
*
|
|
20
|
-
* All three map these keys against the SAME CSS module
|
|
21
|
-
* (shared-web-ui/src/styles/fieldControl.module.css), so a given size/variant
|
|
22
|
-
* resolves to one identical set of rules regardless of which control renders it.
|
|
23
|
-
*/
|
|
24
|
-
export declare const buildFieldControlClassKeys: ({ size, variant, error, disabled, readOnly, hasAffix, popupOpen, }: FieldControlClassOptions) => string[];
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The UI half of `shared-logic`, on its own.
|
|
3
|
-
*
|
|
4
|
-
* WHY THIS FILE EXISTS — it is a privacy boundary, not a convenience.
|
|
5
|
-
*
|
|
6
|
-
* The package barrel (`shared-logic/src/index.ts`) re-exports this folder AND every domain
|
|
7
|
-
* folder beside it. Anything that imports the barrel therefore pulls the whole package into
|
|
8
|
-
* its TypeScript program — and `tsc` emits declarations for a whole program, not for the
|
|
9
|
-
* subset a barrel happens to re-export.
|
|
10
|
-
*
|
|
11
|
-
* That is how `@dcs-tech/ui@0.1.0` shipped this business's domain type surface to the public
|
|
12
|
-
* npm registry (audited 2026-09-28): the JS bundle was clean, because a bundler tree-shakes,
|
|
13
|
-
* but the emitted `dist/types/` carried the domain declarations — signatures, field names and
|
|
14
|
-
* doc comments. The `export *` gate in `dcs-ui/src/index.ts` guards the JS surface only; it
|
|
15
|
-
* never governed the declaration emit.
|
|
16
|
-
*
|
|
17
|
-
* (This comment names no domain folder on purpose: it ships, as the leak it describes proves.)
|
|
18
|
-
*
|
|
19
|
-
* So the published build maps `@pdfinvoice/shared-logic` to this file instead, and the domain
|
|
20
|
-
* never enters the program. Keep it that way:
|
|
21
|
-
*
|
|
22
|
-
* - ONLY `./ui/*` modules belong here. Never add a domain module, however small, and never
|
|
23
|
-
* re-export the parent barrel.
|
|
24
|
-
* - A UI module that starts importing domain code re-opens the hole silently — the guard in
|
|
25
|
-
* `dcs-ui` (`npm run verify:no-leak`) is what catches it.
|
|
26
|
-
*
|
|
27
|
-
* It is also the import the API should use. `apps/api` must never touch the package barrel:
|
|
28
|
-
* that pulls React in through `useMergeRefs` and kills every Cloud Run function at startup.
|
|
29
|
-
*/
|
|
30
|
-
export * from './button.logic';
|
|
31
|
-
export * from './cellRules.logic';
|
|
32
|
-
export * from './checkbox.logic';
|
|
33
|
-
export * from './chipinput.logic';
|
|
34
|
-
export * from './collapsible.logic';
|
|
35
|
-
export * from './colorScheme';
|
|
36
|
-
export * from './columnOrder.logic';
|
|
37
|
-
export * from './editableTable.logic';
|
|
38
|
-
export * from './fieldControl.logic';
|
|
39
|
-
export * from './fieldWrapper.logic';
|
|
40
|
-
export * from './fields.logic';
|
|
41
|
-
export * from './form.logic';
|
|
42
|
-
export * from './input.logic';
|
|
43
|
-
export * from './keyboard.logic';
|
|
44
|
-
export * from './navigation.logic';
|
|
45
|
-
export * from './popover.logic';
|
|
46
|
-
export * from './popupList.logic';
|
|
47
|
-
export * from './radio.logic';
|
|
48
|
-
export * from './select.logic';
|
|
49
|
-
export * from './suggest.logic';
|
|
50
|
-
export * from './switch.logic';
|
|
51
|
-
export * from './tableLayout.logic';
|
|
52
|
-
export * from './tableSummary.logic';
|
|
53
|
-
export * from './tooltip.logic';
|
|
54
|
-
export * from './typography.logic';
|
|
55
|
-
export * from './useMergeRefs';
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { FieldKeyboardConfig, KeyEventLike, KeyResolution, KeyResolutionContext, NavAction } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
|
-
/**
|
|
3
|
-
* The one place that decides who owns a key.
|
|
4
|
-
*
|
|
5
|
-
* Pure, and deliberately free of React and the DOM: it takes a `KeyEventLike`
|
|
6
|
-
* (which a `React.KeyboardEvent` satisfies structurally) and returns a verdict.
|
|
7
|
-
* That is what lets the whole truth table run under plain `node`, and what keeps
|
|
8
|
-
* it mechanically portable to the mobile core package if mobile ever grows a grid.
|
|
9
|
-
*
|
|
10
|
-
* ── The two laws ────────────────────────────────────────────────────────────
|
|
11
|
-
*
|
|
12
|
-
* **L1** — in `navigate` mode the container owns every arrow, Enter, Tab,
|
|
13
|
-
* Home/End and PageUp/Down.
|
|
14
|
-
*
|
|
15
|
-
* **L2** — an open popup owns ↑ ↓ Enter Escape for as long as it is open,
|
|
16
|
-
* whichever widget opened it and whatever mode the cell is in.
|
|
17
|
-
*
|
|
18
|
-
* Everything below is a consequence of those two. L2 is checked before L1
|
|
19
|
-
* because it is the narrower claim: a Select with its list down is not "a cell
|
|
20
|
-
* being navigated", it is a list being navigated, and the grid must not see
|
|
21
|
-
* those keys at all.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Canonical form: modifiers alphabetically, then the key, all lower-case —
|
|
25
|
-
* `alt+ctrl+shift+enter`. Sorting is what makes `'ctrl+shift+enter'` and
|
|
26
|
-
* `'shift+ctrl+enter'` the same binding, so a consumer cannot write an override
|
|
27
|
-
* that silently never matches because they ordered the modifiers differently.
|
|
28
|
-
*/
|
|
29
|
-
export declare function parseBinding(binding: string): string;
|
|
30
|
-
/** The canonical binding string an event represents. */
|
|
31
|
-
export declare function eventBinding(event: KeyEventLike): string;
|
|
32
|
-
export declare function matchBinding(event: KeyEventLike, binding: string): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The container bindings a grid starts with.
|
|
35
|
-
*
|
|
36
|
-
* The `ctrl+arrow*` and `alt+arrow*` entries are **aliases kept on purpose**.
|
|
37
|
-
* They are what the current editable table binds, because Input owned no keys
|
|
38
|
-
* and plain arrows never reached the grid. Keeping them means existing screens
|
|
39
|
-
* and existing muscle memory survive the switch to plain arrows instead of
|
|
40
|
-
* breaking on the day the new grid lands.
|
|
41
|
-
*/
|
|
42
|
-
export declare const DEFAULT_GRID_BINDINGS: Record<string, NavAction>;
|
|
43
|
-
/** A form is a one-column grid: no rows to add, and Ctrl+Enter submits. */
|
|
44
|
-
export declare const DEFAULT_FORM_BINDINGS: Record<string, NavAction>;
|
|
45
|
-
export declare const DEFAULT_KEYBOARD_CONFIG: Required<Pick<FieldKeyboardConfig, 'mode' | 'enter' | 'arrows' | 'arrowsInEdit' | 'typeBehaviour' | 'editKey' | 'openOn' | 'advanceOnSelect' | 'stepKeys'>>;
|
|
46
|
-
/** What a cell wants when nothing overrides it: grid mode, Enter moves on, type to open. */
|
|
47
|
-
export declare const GRID_CELL_KEYBOARD_DEFAULTS: FieldKeyboardConfig;
|
|
48
|
-
/**
|
|
49
|
-
* A key that produces a character. `metaKey`/`ctrlKey` exclude shortcuts;
|
|
50
|
-
* `altKey` is *not* excluded because AltGr (which reports `ctrlKey && altKey`)
|
|
51
|
-
* is how a great many non-US layouts type ordinary characters.
|
|
52
|
-
*/
|
|
53
|
-
export declare function isPrintableKey(event: KeyEventLike): boolean;
|
|
54
|
-
export declare function resolveFieldKey(event: KeyEventLike, ctx: KeyResolutionContext): KeyResolution;
|
|
55
|
-
/**
|
|
56
|
-
* The next index in a linear list, skipping the ones a predicate rejects.
|
|
57
|
-
*
|
|
58
|
-
* A form is a one-column grid, so this is the one-dimensional sibling of
|
|
59
|
-
* `findNextFocusableCell`. Kept pure and separate from any DOM query: what
|
|
60
|
-
* counts as "focusable" is the caller's business, and this way the traversal is
|
|
61
|
-
* testable without a browser.
|
|
62
|
-
*
|
|
63
|
-
* @returns the next usable index, or `-1` when the list runs out.
|
|
64
|
-
*/
|
|
65
|
-
export declare function nextFocusableIndex(count: number, current: number, direction: 'forward' | 'backward', isDisabled?: (index: number) => boolean, wrap?: boolean): number;
|
|
66
|
-
/**
|
|
67
|
-
* Resolves the config a field actually runs on: own prop → container → default.
|
|
68
|
-
*
|
|
69
|
-
* The same order `useFieldSurface` uses for `size`, and for the same reason — a
|
|
70
|
-
* field must be able to tell "nobody said" from "someone said grid mode".
|
|
71
|
-
*/
|
|
72
|
-
export declare function resolveKeyboardConfig(own: FieldKeyboardConfig | undefined, inherited: FieldKeyboardConfig | undefined): FieldKeyboardConfig;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { NavItem } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Path from the root to the item with `id`, inclusive. `[]` when not found.
|
|
4
|
-
*
|
|
5
|
-
* This one function serves both surfaces, which is the point of a single `NavItem` shape:
|
|
6
|
-
* a **Sidebar highlights** the trail (every ancestor of the active row reads as active), and
|
|
7
|
-
* **Breadcrumbs render** it. Computing "where am I" twice, in two components, is how the two
|
|
8
|
-
* end up disagreeing about it.
|
|
9
|
-
*/
|
|
10
|
-
export declare function findNavTrail(items: NavItem[], id: string | null | undefined): NavItem[];
|
|
11
|
-
/** Depth-first list of every item, groups included. */
|
|
12
|
-
export declare function flattenNav(items: NavItem[]): NavItem[];
|
|
13
|
-
/**
|
|
14
|
-
* Drop items a predicate rejects, pruning branches bottom-up.
|
|
15
|
-
*
|
|
16
|
-
* A parent whose children are ALL removed is removed too — unless it is reachable in its own
|
|
17
|
-
* right (it has an `href` or is a `group`). Otherwise a permission filter leaves behind
|
|
18
|
-
* headings that expand to nothing.
|
|
19
|
-
*/
|
|
20
|
-
export declare function filterNav(items: NavItem[], keep: (item: NavItem) => boolean): NavItem[];
|
|
21
|
-
/** The ids on the trail to `activeId`, for "is this row on the active path" checks. */
|
|
22
|
-
export declare function navTrailIds(items: NavItem[], activeId: string | null | undefined): Set<string>;
|
|
23
|
-
/**
|
|
24
|
-
* The item whose `href` best matches a pathname — longest match wins, so
|
|
25
|
-
* `/reports/monthly/sales` prefers that over `/reports`.
|
|
26
|
-
*
|
|
27
|
-
* For apps that track location rather than an id. Returns null when nothing matches; callers
|
|
28
|
-
* that know their active id should pass it directly instead.
|
|
29
|
-
*/
|
|
30
|
-
export declare function findNavItemByPath(items: NavItem[], pathname: string): NavItem | null;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export type PopoverSide = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
-
export type PopoverAlign = 'start' | 'center' | 'end';
|
|
3
|
-
/** `side` plus optional alignment, e.g. `bottom-start`. Bare `bottom` means `bottom-center`. */
|
|
4
|
-
export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
5
|
-
export interface PopoverRect {
|
|
6
|
-
top: number;
|
|
7
|
-
left: number;
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
}
|
|
11
|
-
export interface ComputePopoverPositionInput {
|
|
12
|
-
/** Trigger box in VIEWPORT coordinates — i.e. straight from getBoundingClientRect(). */
|
|
13
|
-
anchor: PopoverRect;
|
|
14
|
-
/** Measured content box. Pass zeroes on the first pass; re-run once it is measured. */
|
|
15
|
-
content: {
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
};
|
|
19
|
-
viewport: {
|
|
20
|
-
width: number;
|
|
21
|
-
height: number;
|
|
22
|
-
};
|
|
23
|
-
/** Page scroll, added to the result so the caller can position in DOCUMENT coordinates. */
|
|
24
|
-
scroll: {
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
};
|
|
28
|
-
placement?: PopoverPlacement;
|
|
29
|
-
/** Gap between anchor and content, px. Default 4. */
|
|
30
|
-
offset?: number;
|
|
31
|
-
/** Force the content to the anchor's width (what a Select dropdown wants). */
|
|
32
|
-
matchAnchorWidth?: boolean;
|
|
33
|
-
/** Flip to the opposite side when the preferred one doesn't fit. Default true. */
|
|
34
|
-
flip?: boolean;
|
|
35
|
-
/** Slide along the cross axis to stay on screen. Default true. */
|
|
36
|
-
shift?: boolean;
|
|
37
|
-
/** Minimum gap from the viewport edge, px. Default 8. */
|
|
38
|
-
padding?: number;
|
|
39
|
-
}
|
|
40
|
-
export interface PopoverPosition {
|
|
41
|
-
/** DOCUMENT coordinates — scroll already added. */
|
|
42
|
-
top: number;
|
|
43
|
-
left: number;
|
|
44
|
-
/** Only set when `matchAnchorWidth`. */
|
|
45
|
-
width?: number;
|
|
46
|
-
/** Where it actually ended up, which may differ from the request after a flip. */
|
|
47
|
-
placement: PopoverPlacement;
|
|
48
|
-
/** True when `flip` changed the side. Useful for pointing an arrow the right way. */
|
|
49
|
-
flipped: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Where to put a floating box relative to its anchor.
|
|
53
|
-
*
|
|
54
|
-
* Returns DOCUMENT coordinates (viewport rect + scroll), because a portalled layer is
|
|
55
|
-
* positioned absolutely against the page, not the viewport.
|
|
56
|
-
*/
|
|
57
|
-
export declare function computePopoverPosition(input: ComputePopoverPositionInput): PopoverPosition;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { FieldSize, FieldVariant, SelectOption, GroupConfig } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Class keys for the shared option-list surface (styles/popupList.module.css),
|
|
4
|
-
* used by both Select's dropdown and Suggest's suggestion list.
|
|
5
|
-
*/
|
|
6
|
-
export interface PopupListClassOptions {
|
|
7
|
-
size: FieldSize;
|
|
8
|
-
variant: FieldVariant;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The popup takes its shape from the field it hangs off:
|
|
12
|
-
*
|
|
13
|
-
* - `outlined` / `filled` have a box, so the list **joins** it — no top border,
|
|
14
|
-
* square top corners, flush against the field's lower edge.
|
|
15
|
-
* - `standard` / `underlined` have only a rule under the text, so a box glued to
|
|
16
|
-
* that edge reads as a mistake. Those get a **floating** panel instead: closed
|
|
17
|
-
* border, all corners rounded, sitting just below the underline.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Does this variant's field have a box the popup can continue?
|
|
21
|
-
*
|
|
22
|
-
* Exported because BOTH sides of the joint need the same answer: the list squares its top
|
|
23
|
-
* (here) and the control squares its bottom (buildFieldControlClassKeys). Deciding it twice is
|
|
24
|
-
* how you get a rounded control meeting a square list.
|
|
25
|
-
*/
|
|
26
|
-
export declare const isJoinedPopupVariant: (variant: string | undefined) => boolean;
|
|
27
|
-
export declare function buildPopupListClassKeys(opts: PopupListClassOptions): string[];
|
|
28
|
-
export interface PopupRowClassOptions {
|
|
29
|
-
/** The keyboard/hover cursor is on this row. Neutral fill. */
|
|
30
|
-
isCursor?: boolean;
|
|
31
|
-
/** This row is the current value. Accent tint + tick. */
|
|
32
|
-
isSelected?: boolean;
|
|
33
|
-
isDisabled?: boolean;
|
|
34
|
-
/** Multi-select rows carry a checkbox, so the tick is suppressed. */
|
|
35
|
-
isMulti?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export declare function buildPopupRowClassKeys(opts: PopupRowClassOptions): string[];
|
|
38
|
-
/** One rendered group: its heading and the options under it. */
|
|
39
|
-
export interface OptionGroup {
|
|
40
|
-
name: string;
|
|
41
|
-
options: SelectOption[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Splits options into ordered groups for a grouped list.
|
|
45
|
-
*
|
|
46
|
-
* Order: `groupOrder` if given (array = explicit order, function = comparator),
|
|
47
|
-
* otherwise first-appearance order, which keeps a hand-written options array
|
|
48
|
-
* rendering in the order it was written. Options with no group are emitted first
|
|
49
|
-
* under an empty name so the caller can render them without a heading.
|
|
50
|
-
*
|
|
51
|
-
* Returns a single unnamed group when grouping is off, so callers have one shape
|
|
52
|
-
* to render either way.
|
|
53
|
-
*/
|
|
54
|
-
export declare function groupSelectOptions(options: SelectOption[], config?: GroupConfig): OptionGroup[];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { SelectOption, SortConfig, SearchConfig } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
|
-
interface SelectClassOpts {
|
|
3
|
-
size: string;
|
|
4
|
-
isOpen?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
error?: boolean;
|
|
7
|
-
isInModal?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function buildSelectClassKeys(opts: SelectClassOpts): string[];
|
|
10
|
-
export declare function normalizeSelectOptions(options: (string | number | SelectOption)[]): SelectOption[];
|
|
11
|
-
export declare function sortSelectOptions(options: SelectOption[], sortConfig?: boolean | SortConfig): SelectOption[];
|
|
12
|
-
export declare function filterSelectOptions(options: SelectOption[], searchTerm: string, searchConfig?: boolean | SearchConfig): SelectOption[];
|
|
13
|
-
/**
|
|
14
|
-
* Type-ahead for a closed or open Select: the index of the next option whose label
|
|
15
|
-
* starts with `query`, searching forward from `fromIndex` and wrapping.
|
|
16
|
-
*
|
|
17
|
-
* Spec (FIELD_KEYBOARD_NAVIGATION.md §6.4): a printable key on a Select jumps to the
|
|
18
|
-
* matching option. An operator entering sizes types `M`, not ↓↓↓. Starting AFTER
|
|
19
|
-
* `fromIndex` is what makes a repeated letter cycle — `S`, `S` walks Small → S-Slim.
|
|
20
|
-
*
|
|
21
|
-
* Case-insensitive, disabled options skipped. Single-character cycling only: a
|
|
22
|
-
* multi-key buffer ("me" typed quickly) needs a timer, and a timer-driven buffer is
|
|
23
|
-
* exactly what throttles unpredictably in a background tab.
|
|
24
|
-
*
|
|
25
|
-
* @returns the matching index, or -1 when nothing matches.
|
|
26
|
-
*/
|
|
27
|
-
export declare function findTypeaheadIndex(options: Array<{
|
|
28
|
-
name: string | number;
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
}>, query: string, fromIndex: number): number;
|
|
31
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { ColumnAlign, EditableTableColumnDefinition, ResolvedColumnLayout, ResolvedTableLayout } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Column layout, decided once and purely.
|
|
4
|
-
*
|
|
5
|
-
* The client editable table has no layout props at all, so every column in the
|
|
6
|
-
* Program table renders at exactly 300px — a 2700px table in a 1542px
|
|
7
|
-
* container, Qty as wide as Notes. This resolves each column's frame from its
|
|
8
|
-
* props, and where a column names none, from a default for the kind of field it
|
|
9
|
-
* holds. **Prop → default**, the same order `size` and `keyboard` resolve in.
|
|
10
|
-
*/
|
|
11
|
-
/** What a column holds, as far as layout is concerned. */
|
|
12
|
-
export type ColumnWidget = 'suggest' | 'select' | 'number' | 'derivedNumber' | 'date' | 'text' | 'derivedText' | 'toggle' | 'button' | 'other';
|
|
13
|
-
interface ColumnDefault {
|
|
14
|
-
/** Present = fixed width. Absent = flexible, sharing the remaining space. */
|
|
15
|
-
width?: number;
|
|
16
|
-
minWidth: number;
|
|
17
|
-
align: ColumnAlign;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The defaults by widget. Tuned against a real production program table's columns:
|
|
21
|
-
* an item name needs room to be read, a quantity does not.
|
|
22
|
-
*/
|
|
23
|
-
export declare const COLUMN_LAYOUT_DEFAULTS: Readonly<Record<ColumnWidget, ColumnDefault>>;
|
|
24
|
-
export declare function classifyColumn(column: EditableTableColumnDefinition<any>): ColumnWidget;
|
|
25
|
-
/**
|
|
26
|
-
* One column's frame.
|
|
27
|
-
*
|
|
28
|
-
* - An explicit `width` makes the column fixed, and a fixed column's floor IS its
|
|
29
|
-
* width — a `minWidth` beside a `width` has nothing left to decide.
|
|
30
|
-
* - A **sticky** column is always fixed. Pinned columns stack by offset, and an
|
|
31
|
-
* offset can only be exact if every pinned width is known; a flexible pinned
|
|
32
|
-
* column would push the next one to the wrong place. Unsized, it pins at its
|
|
33
|
-
* floor.
|
|
34
|
-
*/
|
|
35
|
-
export declare function resolveColumnLayout(column: EditableTableColumnDefinition<any>): ResolvedColumnLayout;
|
|
36
|
-
/**
|
|
37
|
-
* Every column's frame, plus the pinned-column offsets and the table's floor.
|
|
38
|
-
*
|
|
39
|
-
* Pinned columns stay pinned in the order they appear: left-pinned offsets
|
|
40
|
-
* accumulate left to right, right-pinned offsets right to left. The innermost
|
|
41
|
-
* pinned column on each side is its `stickyEdge`, which is where scrolling
|
|
42
|
-
* content passes under and a divider belongs.
|
|
43
|
-
*/
|
|
44
|
-
export declare function resolveTableLayout(columns: EditableTableColumnDefinition<any>[]): ResolvedTableLayout;
|
|
45
|
-
/** A read-only cell renders text instead of a field — and the keyboard skips it. */
|
|
46
|
-
export declare function isReadOnlyColumn(column: EditableTableColumnDefinition<any>): boolean;
|
|
47
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { TooltipAnchorTo, TooltipConfig, TooltipPlacement, TooltipPosition, TooltipPositionInput, TooltipProp } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
|
-
/**
|
|
3
|
-
* A `tooltip` prop is either bare content or a config object. Anything that is
|
|
4
|
-
* a React element counts as content — only a plain object carrying `content`
|
|
5
|
-
* is treated as configuration.
|
|
6
|
-
*/
|
|
7
|
-
export declare function normalizeTooltip(value: TooltipProp | undefined): TooltipConfig | null;
|
|
8
|
-
export interface TooltipAnchorDecision {
|
|
9
|
-
anchorTo: TooltipAnchorTo;
|
|
10
|
-
/** Keyboard focus has no cursor, so it can never be pointer-anchored. */
|
|
11
|
-
openedBy: 'pointer' | 'focus';
|
|
12
|
-
anchorWidth: number;
|
|
13
|
-
tooltipWidth: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Whether to place the tooltip at the cursor rather than against the trigger.
|
|
17
|
-
*
|
|
18
|
-
* The `auto` rule: element-anchoring only reads as "attached to this thing" while
|
|
19
|
-
* the trigger is no wider than the tip. Past that — block text, a table row, a
|
|
20
|
-
* full-width header — the tip centres on the element and lands far from where the
|
|
21
|
-
* pointer actually is, so it follows the pointer instead.
|
|
22
|
-
*/
|
|
23
|
-
export declare function shouldAnchorToPointer(decision: TooltipAnchorDecision): boolean;
|
|
24
|
-
/** Requested placement first, then its opposite, then the perpendicular pair. */
|
|
25
|
-
export declare function resolveTooltipPlacementOrder(placement: TooltipPlacement): TooltipPlacement[];
|
|
26
|
-
/**
|
|
27
|
-
* Viewport-coordinate position for a tooltip, flipping to the first placement
|
|
28
|
-
* that fits and then clamping along the cross axis so it never leaves the
|
|
29
|
-
* screen. Pure geometry — the caller measures the DOM and applies the result.
|
|
30
|
-
*
|
|
31
|
-
* Only the fallback path for browsers without CSS anchor positioning uses this;
|
|
32
|
-
* where anchor positioning is supported the same behaviour comes from
|
|
33
|
-
* `position-try-fallbacks`.
|
|
34
|
-
*/
|
|
35
|
-
export declare function computeTooltipPosition(input: TooltipPositionInput): TooltipPosition;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Ref, RefCallback } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Merge several refs into one stable ref callback.
|
|
4
|
-
*
|
|
5
|
-
* The callback identity never changes, which matters: memoising on the spread
|
|
6
|
-
* `refs` array instead produces a new callback on every render, and React
|
|
7
|
-
* responds by calling the old callback with `null` and the new one with the
|
|
8
|
-
* node — detaching and re-attaching the ref on every single render.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useMergeRefs<T>(...refs: (Ref<T> | undefined | null)[]): RefCallback<T>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — bands, the sections of a page.
|
|
3
|
-
*
|
|
4
|
-
* Three kinds, and the order of `template.bands` is the print order:
|
|
5
|
-
*
|
|
6
|
-
* - `pageHeader` — the top of every page.
|
|
7
|
-
* - `content` — prints once, where it stands. Tables inside it flow across pages.
|
|
8
|
-
* - `pageFooter` — the foot of every page.
|
|
9
|
-
*
|
|
10
|
-
* v1 also had detail, group and report header/footer bands. They existed to serve the one main
|
|
11
|
-
* grid; a table now carries its own rows, sections and closing rows, and "report header" is simply
|
|
12
|
-
* the first content band. See `docs/REPORT_ENGINE.md` §14.3.
|
|
13
|
-
*/
|
|
14
|
-
import type { Block } from './blocks';
|
|
15
|
-
import type { ReportConditionGroup } from './conditions';
|
|
16
|
-
export type BandKind = 'pageHeader' | 'content' | 'pageFooter';
|
|
17
|
-
export interface Band {
|
|
18
|
-
id: string;
|
|
19
|
-
kind: BandKind;
|
|
20
|
-
/**
|
|
21
|
-
* For `content`: print it on every page, under the page header — the business and buyer block
|
|
22
|
-
* that several invoice formats repeat. Ignored for page bands, which repeat by definition.
|
|
23
|
-
*/
|
|
24
|
-
repeatOnEveryPage?: boolean;
|
|
25
|
-
/** Never split this band across a page break; move it whole to the next page instead. */
|
|
26
|
-
keepTogether?: boolean;
|
|
27
|
-
/** Never end a page with this band: if the band after it moves on, this band moves with it. */
|
|
28
|
-
keepWithNext?: boolean;
|
|
29
|
-
/** Suppress the band entirely when this fails. */
|
|
30
|
-
condition?: ReportConditionGroup;
|
|
31
|
-
blocks: Block[];
|
|
32
|
-
}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — blocks, the things a band is made of.
|
|
3
|
-
*
|
|
4
|
-
* A table is a block like any other and can go anywhere, as many times as a report needs. There is
|
|
5
|
-
* no special "main grid": everything v1 did for it — a heading on every page, a closed box, empty
|
|
6
|
-
* rows down the page, closing rows kept with what follows — belongs to every table that flows.
|
|
7
|
-
* See `docs/REPORT_ENGINE.md` §14.4.
|
|
8
|
-
*/
|
|
9
|
-
import type { ReportConditionGroup } from './conditions';
|
|
10
|
-
import type { ColumnSpec, TableData } from './dataset';
|
|
11
|
-
import type { GridFill, GridLines } from './template';
|
|
12
|
-
import type { Alignment, PlaceholderFormat, PlaceholderFormats, StrokeStyle, TextSegment, TextStyle } from './primitives';
|
|
13
|
-
export interface BlockBase {
|
|
14
|
-
id: string;
|
|
15
|
-
condition?: ReportConditionGroup;
|
|
16
|
-
style?: TextStyle;
|
|
17
|
-
/** Points, [top, right, bottom, left]. A negative side widens the block into the page margin. */
|
|
18
|
-
margin?: [number, number, number, number];
|
|
19
|
-
}
|
|
20
|
-
/** An image at the left of a cell, the text beside it — a logo before the business name. */
|
|
21
|
-
export interface CellImage {
|
|
22
|
-
/** A URL or data URI, or a placeholder resolving to one. Empty draws no image. */
|
|
23
|
-
src: string;
|
|
24
|
-
widthPt: number;
|
|
25
|
-
heightPt: number;
|
|
26
|
-
/** Space between the image and the text. */
|
|
27
|
-
gapPt?: number;
|
|
28
|
-
}
|
|
29
|
-
/** One cell of a text block's row. Width is a percentage of the block, or 'auto'. */
|
|
30
|
-
export interface TextCell {
|
|
31
|
-
id: string;
|
|
32
|
-
width: number | 'auto';
|
|
33
|
-
align?: Alignment;
|
|
34
|
-
style?: TextStyle;
|
|
35
|
-
segments: TextSegment[];
|
|
36
|
-
condition?: ReportConditionGroup;
|
|
37
|
-
/** A fixed width in points, overriding `width`; the other cells share what is left. */
|
|
38
|
-
widthPt?: number;
|
|
39
|
-
image?: CellImage;
|
|
40
|
-
}
|
|
41
|
-
export interface TextRow {
|
|
42
|
-
id: string;
|
|
43
|
-
cells: TextCell[];
|
|
44
|
-
condition?: ReportConditionGroup;
|
|
45
|
-
/**
|
|
46
|
-
* The row is at least this tall, points, padding included and lines excluded — room left for a
|
|
47
|
-
* signature, or a box that must not collapse when its fields are empty.
|
|
48
|
-
*/
|
|
49
|
-
minHeightPt?: number;
|
|
50
|
-
/** A line above this row when it sits inside a box — the rule over a total. */
|
|
51
|
-
lineAbovePt?: number;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* One cell of a column-aligned row, covering the columns `from` through `to`, by column id.
|
|
55
|
-
*
|
|
56
|
-
* On a `groupColumns` column (with no `to`, or `to` the same column) the cell repeats once per
|
|
57
|
-
* generated column, with that value's `%group.*%` in scope — a total under every size.
|
|
58
|
-
*/
|
|
59
|
-
export interface AlignedCell {
|
|
60
|
-
id: string;
|
|
61
|
-
from: string;
|
|
62
|
-
/** Absent covers `from` alone. */
|
|
63
|
-
to?: string;
|
|
64
|
-
segments: TextSegment[];
|
|
65
|
-
align?: Alignment;
|
|
66
|
-
style?: TextStyle;
|
|
67
|
-
/** Format for every placeholder in the cell that has none of its own. */
|
|
68
|
-
format?: PlaceholderFormat;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* A row laid out on a table's own columns rather than by percentages, so a figure sits exactly
|
|
72
|
-
* under its column — a tax amount under Amount, "Total" spanning everything before it. A column no
|
|
73
|
-
* cell covers prints empty, with its column lines. Cells name columns by id, which keeps them right
|
|
74
|
-
* when a column is hidden by a condition or expanded per group value.
|
|
75
|
-
*/
|
|
76
|
-
export interface AlignedRow {
|
|
77
|
-
id: string;
|
|
78
|
-
cells: AlignedCell[];
|
|
79
|
-
condition?: ReportConditionGroup;
|
|
80
|
-
minHeightPt?: number;
|
|
81
|
-
/** A line above this row — the rule over a grand total. */
|
|
82
|
-
lineAbovePt?: number;
|
|
83
|
-
}
|
|
84
|
-
/** A heading above several column headings — "Central Tax" over Rate | Amount, "Sizes" over the size columns. */
|
|
85
|
-
export interface HeaderGroup {
|
|
86
|
-
id: string;
|
|
87
|
-
label: string;
|
|
88
|
-
from: string;
|
|
89
|
-
to: string;
|
|
90
|
-
style?: TextStyle;
|
|
91
|
-
}
|
|
92
|
-
export interface TextBlock extends BlockBase {
|
|
93
|
-
type: 'text';
|
|
94
|
-
rows: TextRow[];
|
|
95
|
-
/**
|
|
96
|
-
* Draws the block as a box: `outer` around it, `columns` between cells, `rows` between rows.
|
|
97
|
-
* `header` is unused here. These take space and are planned with.
|
|
98
|
-
*/
|
|
99
|
-
lines?: GridLines;
|
|
100
|
-
}
|
|
101
|
-
export interface TableHeader {
|
|
102
|
-
/** Default true. */
|
|
103
|
-
show?: boolean;
|
|
104
|
-
/** Print the heading again at the top of every page the table continues onto. Default true. */
|
|
105
|
-
repeat?: boolean;
|
|
106
|
-
style?: TextStyle;
|
|
107
|
-
/** A heading row above the column headings, each label spanning the columns it groups. */
|
|
108
|
-
groups?: HeaderGroup[];
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Rows split into sections each time `by` changes — a category heading, an ageing bucket with its
|
|
112
|
-
* subtotal. Not the same thing as grouping values (`TableData.group`), and named apart for that.
|
|
113
|
-
*/
|
|
114
|
-
export interface SectionSpec {
|
|
115
|
-
by: string;
|
|
116
|
-
sort?: 'asc' | 'desc';
|
|
117
|
-
/** Printed above each section. `%row.*%` is its first row; `%agg.*(row.x)%` covers the section. */
|
|
118
|
-
header?: AlignedRow[];
|
|
119
|
-
/** Printed below each section, with the same scope. */
|
|
120
|
-
footer?: AlignedRow[];
|
|
121
|
-
/** Try to keep a section on one page. */
|
|
122
|
-
keepTogether?: boolean;
|
|
123
|
-
}
|
|
124
|
-
export interface TableBlock extends BlockBase {
|
|
125
|
-
type: 'table';
|
|
126
|
-
data: TableData;
|
|
127
|
-
columns: ColumnSpec[];
|
|
128
|
-
header?: TableHeader;
|
|
129
|
-
sections?: SectionSpec;
|
|
130
|
-
/** Rows closing the table after its last row — tax, round off, total — under their columns. */
|
|
131
|
-
footer?: AlignedRow[];
|
|
132
|
-
/** Keep the closing rows on the page with whatever follows the table. */
|
|
133
|
-
footerKeepWithNext?: boolean;
|
|
134
|
-
/** Ruling — box, between columns, under the heading, between rows. */
|
|
135
|
-
lines?: GridLines;
|
|
136
|
-
/** Empty rows under the last row, so the box runs down the page. */
|
|
137
|
-
fill?: GridFill;
|
|
138
|
-
/**
|
|
139
|
-
* true: the table moves to the next page whole rather than splitting — a small summary.
|
|
140
|
-
* false (default): it flows across pages, row by row, its heading repeating.
|
|
141
|
-
*/
|
|
142
|
-
keepTogether?: boolean;
|
|
143
|
-
}
|
|
144
|
-
export interface ImageBlock extends BlockBase {
|
|
145
|
-
type: 'image';
|
|
146
|
-
/** Literal URL/data-URI, or a placeholder resolving to one. */
|
|
147
|
-
src: string;
|
|
148
|
-
widthPt: number;
|
|
149
|
-
heightPt?: number | 'auto';
|
|
150
|
-
align?: Alignment;
|
|
151
|
-
}
|
|
152
|
-
export interface BarcodeBlock extends BlockBase {
|
|
153
|
-
type: 'barcode';
|
|
154
|
-
content: string;
|
|
155
|
-
formats?: PlaceholderFormats;
|
|
156
|
-
symbology: 'CODE128' | 'CODE39' | 'EAN13' | 'EAN8' | 'UPC' | 'ITF14';
|
|
157
|
-
showValue?: boolean;
|
|
158
|
-
barWidth?: number;
|
|
159
|
-
heightPt: number;
|
|
160
|
-
align?: Alignment;
|
|
161
|
-
}
|
|
162
|
-
export interface QRBlock extends BlockBase {
|
|
163
|
-
type: 'qr';
|
|
164
|
-
content: string;
|
|
165
|
-
formats?: PlaceholderFormats;
|
|
166
|
-
sizePt: number;
|
|
167
|
-
errorCorrection?: 'L' | 'M' | 'Q' | 'H';
|
|
168
|
-
align?: Alignment;
|
|
169
|
-
}
|
|
170
|
-
export interface SeparatorBlock extends BlockBase {
|
|
171
|
-
type: 'separator';
|
|
172
|
-
stroke: StrokeStyle;
|
|
173
|
-
thicknessPt?: number;
|
|
174
|
-
}
|
|
175
|
-
/** Vertical whitespace — a signature gap, a spacer above totals. */
|
|
176
|
-
export interface SpacerBlock extends BlockBase {
|
|
177
|
-
type: 'spacer';
|
|
178
|
-
heightPt: number;
|
|
179
|
-
}
|
|
180
|
-
export type Block = TextBlock | TableBlock | ImageBlock | BarcodeBlock | QRBlock | SeparatorBlock | SpacerBlock;
|
|
181
|
-
export type BlockType = Block['type'];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — conditional visibility.
|
|
3
|
-
*
|
|
4
|
-
* Prefixed `Report*` because `ui/fields.types.ts` already exports a `ConditionOperator` — a
|
|
5
|
-
* different thing (form-field visibility, generic over the form's own shape) that happens to
|
|
6
|
-
* share the obvious name.
|
|
7
|
-
*
|
|
8
|
-
* Carried over from `ReceiptDesigner/types.ts` unchanged in meaning: the operator set was arrived
|
|
9
|
-
* at by use and there is no reason to redesign it. The one change is that the legacy single-rule
|
|
10
|
-
* shape is gone — nothing in production authored one, so the union does not need to survive.
|
|
11
|
-
*/
|
|
12
|
-
export type ReportConditionOperator = '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'in' | 'notIn' | 'exists' | 'notExists';
|
|
13
|
-
export interface ReportConditionRule {
|
|
14
|
-
id: string;
|
|
15
|
-
/** `source.field` or `row.field`, resolved against the registry. */
|
|
16
|
-
field: string;
|
|
17
|
-
operator: ReportConditionOperator;
|
|
18
|
-
/** Omitted for `exists` / `notExists`. */
|
|
19
|
-
value?: string | number | boolean | Array<string | number>;
|
|
20
|
-
}
|
|
21
|
-
export interface ReportConditionGroup {
|
|
22
|
-
match: 'all' | 'any';
|
|
23
|
-
rules: ReportConditionRule[];
|
|
24
|
-
}
|