@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,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quoin — between the rendered page and the template, for a designer.
|
|
3
|
-
*
|
|
4
|
-
* The HTML renderer tags every band and block it draws with the id it came from. A designer needs
|
|
5
|
-
* two answers from those tags: what did the author just click, and what should be outlined as
|
|
6
|
-
* selected. Both depend on ids the ENGINE mints — a table's repeated heading, one band per table
|
|
7
|
-
* row, a band continued onto the next page, the empty rows filling a page — so the answers live
|
|
8
|
-
* here, beside the constants that mint them, rather than in a React component that would have to
|
|
9
|
-
* know the conventions by heart.
|
|
10
|
-
*/
|
|
11
|
-
import type { ReportTemplate } from '../../../published/dcs-ui/src/publicTypes';
|
|
12
|
-
/**
|
|
13
|
-
* What a designer is working on. One thing at a time, which is what makes the inspector simple.
|
|
14
|
-
*
|
|
15
|
-
* EVERY level an author can edit is addressable, down to one column of one row of a text block.
|
|
16
|
-
* A level with no address here can only be reached by opening something inside a panel, which
|
|
17
|
-
* leaves it with no highlight on the page, no place in the tree, and no way back to it.
|
|
18
|
-
*/
|
|
19
|
-
export type DesignerSelection = {
|
|
20
|
-
kind: 'page';
|
|
21
|
-
} | {
|
|
22
|
-
kind: 'options';
|
|
23
|
-
} | {
|
|
24
|
-
kind: 'band';
|
|
25
|
-
bandId: string;
|
|
26
|
-
} | {
|
|
27
|
-
kind: 'block';
|
|
28
|
-
bandId: string;
|
|
29
|
-
blockId: string;
|
|
30
|
-
} | {
|
|
31
|
-
kind: 'column';
|
|
32
|
-
bandId: string;
|
|
33
|
-
blockId: string;
|
|
34
|
-
columnId: string;
|
|
35
|
-
} | {
|
|
36
|
-
kind: 'textRow';
|
|
37
|
-
bandId: string;
|
|
38
|
-
blockId: string;
|
|
39
|
-
rowId: string;
|
|
40
|
-
} | {
|
|
41
|
-
kind: 'textCell';
|
|
42
|
-
bandId: string;
|
|
43
|
-
blockId: string;
|
|
44
|
-
rowId: string;
|
|
45
|
-
cellId: string;
|
|
46
|
-
};
|
|
47
|
-
/** The ids read off the element that was clicked — the nearest tagged band, block and column. */
|
|
48
|
-
export interface CanvasTarget {
|
|
49
|
-
bandId?: string;
|
|
50
|
-
blockId?: string;
|
|
51
|
-
columnId?: string;
|
|
52
|
-
}
|
|
53
|
-
/** One element to outline: `data-<attribute>-id` equal to `value`, or starting with it. */
|
|
54
|
-
export interface CanvasHighlight {
|
|
55
|
-
attribute: 'band' | 'block' | 'column';
|
|
56
|
-
value: string;
|
|
57
|
-
prefix?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Narrows the match to inside one element. A column id is only unique within its own table, so
|
|
60
|
-
* a column highlight names the block it belongs to.
|
|
61
|
-
*/
|
|
62
|
-
within?: {
|
|
63
|
-
attribute: 'block';
|
|
64
|
-
value: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* An engine-minted band id, taken apart: the template band it belongs to, and the piece after the
|
|
69
|
-
* separator — `items:row3`, `items:fill:2`, `part2` — when there is one.
|
|
70
|
-
*/
|
|
71
|
-
export declare const parseBandId: (id: string) => {
|
|
72
|
-
bandId: string;
|
|
73
|
-
part?: string;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* The selection a click on the page means, or null when it landed on nothing the template owns —
|
|
77
|
-
* the space pagination puts above a page footer, say.
|
|
78
|
-
*
|
|
79
|
-
* A click on any row of a table selects the TABLE: the row exists once in the template but prints
|
|
80
|
-
* once per data row, and what an author means by clicking one is "this table". The block is found by
|
|
81
|
-
* the tagged block id, or failing that by the table id a table's band part starts with.
|
|
82
|
-
*/
|
|
83
|
-
export declare const selectionFromCanvas: (template: ReportTemplate, target: CanvasTarget, current?: DesignerSelection) => DesignerSelection | null;
|
|
84
|
-
/**
|
|
85
|
-
* The chain from the document down to a selection, nearest last — what a breadcrumb renders.
|
|
86
|
-
*
|
|
87
|
-
* Structure only: how each step is NAMED belongs to the designer, which speaks the author's
|
|
88
|
-
* language, so nothing here decides wording.
|
|
89
|
-
*/
|
|
90
|
-
export declare const selectionAncestors: (template: ReportTemplate, selection: DesignerSelection) => DesignerSelection[];
|
|
91
|
-
/**
|
|
92
|
-
* What to outline for a selection. A band is outlined with every piece of it — the parts around a
|
|
93
|
-
* flowing table, the table's rows, and its continuation onto later pages; a block by the block id,
|
|
94
|
-
* which every row of a flowing table is tagged with.
|
|
95
|
-
*
|
|
96
|
-
* A COLUMN is outlined by its own cells rather than by its table. A table prints one cell per row
|
|
97
|
-
* per column, so the cells of one column are a vertical strip — outlining the whole table for a
|
|
98
|
-
* column selection told an author nothing about which column they had picked.
|
|
99
|
-
*/
|
|
100
|
-
export declare const canvasHighlight: (_template: ReportTemplate, selection: DesignerSelection) => CanvasHighlight[];
|
|
101
|
-
/**
|
|
102
|
-
* A selection that still points at something. Removing the selected band, undoing past the block
|
|
103
|
-
* that was selected, or deleting the selected column must not leave the inspector editing a thing
|
|
104
|
-
* that no longer exists — it falls back to the nearest thing that does.
|
|
105
|
-
*/
|
|
106
|
-
export declare const liveSelection: (template: ReportTemplate, selection: DesignerSelection) => DesignerSelection;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — evaluating a condition group.
|
|
3
|
-
*
|
|
4
|
-
* Named `evaluateReportCondition` rather than the obvious `evaluateCondition`, which
|
|
5
|
-
* `ui/fields.logic.ts` already owns for form-field visibility — a different mechanism over a
|
|
6
|
-
* different shape. Matches the `ReportCondition*` types.
|
|
7
|
-
*
|
|
8
|
-
* "Show the business name or not", "print the bank block only when there is a bank", "this column
|
|
9
|
-
* only on GST invoices" — all one mechanism, so none of them is a reason to fork a format.
|
|
10
|
-
*/
|
|
11
|
-
import type { ReportConditionGroup, ReportConditionRule } from '../../../published/dcs-ui/src/publicTypes';
|
|
12
|
-
import { type ResolveScope } from './scope';
|
|
13
|
-
export declare const evaluateReportRule: (rule: ReportConditionRule, scope: ResolveScope) => boolean;
|
|
14
|
-
/**
|
|
15
|
-
* A group with no rules is TRUE — an unconfigured condition must not blank the thing it guards.
|
|
16
|
-
* `undefined` is likewise true, so `condition?:` reads as "always, unless told otherwise".
|
|
17
|
-
*/
|
|
18
|
-
export declare const evaluateReportCondition: (group: ReportConditionGroup | undefined, scope: ResolveScope) => boolean;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quoin — the report engine's runtime constants.
|
|
3
|
-
*
|
|
4
|
-
* WHY THESE ARE NOT IN `shared-types` BESIDE THEIR TYPES
|
|
5
|
-
*
|
|
6
|
-
* The client resolves `shared-types` to its CommonJS `dist/index.js`, and Vite works out that
|
|
7
|
-
* file's named exports by static analysis. It follows ONE hop of `__exportStar`: that is why
|
|
8
|
-
* `DEFAULT_CONTROL_SIZE` and `UQC_CODES` — re-exported straight from `./ui/control.types` and
|
|
9
|
-
* `./business/uqc.types` — have always worked.
|
|
10
|
-
*
|
|
11
|
-
* The report model has a nested barrel: `index.js` → `report/index.js` → `template.js`. Two hops,
|
|
12
|
-
* and the analysis gives up. Declaring these two constants there took the dev server down with
|
|
13
|
-
* "does not provide an export named 'REPORT_AGGREGATES'" while every type around them was fine,
|
|
14
|
-
* because a type is erased and never asks the loader for anything.
|
|
15
|
-
*
|
|
16
|
-
* Flattening the barrel would also fix it, and would break again the first time someone adds a
|
|
17
|
-
* nested `export *`. Keeping runtime values in `shared-logic` cannot be violated by accident.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Ids the engine mints for things a template never declared — a table's repeated heading, a band
|
|
21
|
-
* continued across a page break, the empty rows that fill a page. Named here, once, because a
|
|
22
|
-
* designer maps a click on the rendered page back to the template by reading them, and a literal
|
|
23
|
-
* copied into two places is a mapping that breaks silently the day one of them changes.
|
|
24
|
-
*/
|
|
25
|
-
export declare const CONTINUATION_SUFFIX = ":cont";
|
|
26
|
-
/**
|
|
27
|
-
* Between a template band's id and the piece of it a flowing table produced — `band2/items:row3`.
|
|
28
|
-
* Everything before the first separator is the template band, which is how a click on any row maps
|
|
29
|
-
* back to the band and block it came from.
|
|
30
|
-
*/
|
|
31
|
-
export declare const BAND_PART_SEPARATOR = "/";
|
|
32
|
-
export declare const TABLE_HEADER_SUFFIX = ":header";
|
|
33
|
-
export declare const TABLE_FOOTER_SUFFIX = ":footer";
|
|
34
|
-
export declare const TABLE_FILL_INFIX = ":fill";
|
|
35
|
-
/**
|
|
36
|
-
* Bump when a released template shape changes, and add a step to the migration ladder.
|
|
37
|
-
*
|
|
38
|
-
* 2 — tables carry their own data, sections and closing rows; no main grid (`docs/REPORT_ENGINE.md`
|
|
39
|
-
* §14). No step: version 1 was never shipped, and a stored v1 diff falls back to its seed.
|
|
40
|
-
*/
|
|
41
|
-
export declare const REPORT_SCHEMA_VERSION = 2;
|
|
42
|
-
/**
|
|
43
|
-
* The fixed aggregate set. There is no expression language and there will not be one; anything
|
|
44
|
-
* beyond this becomes a field the app computes.
|
|
45
|
-
*/
|
|
46
|
-
export declare const REPORT_AGGREGATES: readonly ["sum", "count", "avg", "min", "max", "first", "last", "distinct"];
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — the rows one table prints.
|
|
3
|
-
*
|
|
4
|
-
* filter → combine and group → sort, then sections. Pure, and knows nothing about invoices: a
|
|
5
|
-
* group is "the values of a field gathered on a row", a lookup is "a row set that names and orders
|
|
6
|
-
* those values". Which field and which row set is the template's business, and what they mean is
|
|
7
|
-
* the app's. See `docs/REPORT_ENGINE.md` §14.4.
|
|
8
|
-
*/
|
|
9
|
-
import type { TableData } from '../../../published/dcs-ui/src/publicTypes';
|
|
10
|
-
import type { GroupScope, ResolveScope } from './scope';
|
|
11
|
-
export type Row = Record<string, unknown>;
|
|
12
|
-
/** One printed row of a table, with the values it gathered when the table groups. */
|
|
13
|
-
export interface TableRow {
|
|
14
|
-
values: Row;
|
|
15
|
-
/** In display order. Present only when the table groups. */
|
|
16
|
-
groups?: GroupScope[];
|
|
17
|
-
}
|
|
18
|
-
/** A distinct group value across the whole table — one generated column. */
|
|
19
|
-
export interface GroupKey {
|
|
20
|
-
key: string;
|
|
21
|
-
label: string;
|
|
22
|
-
order: number;
|
|
23
|
-
lookup?: Row;
|
|
24
|
-
}
|
|
25
|
-
export interface BuiltTableRows {
|
|
26
|
-
rows: TableRow[];
|
|
27
|
-
/** Every group value any row gathered, in display order. Empty when the table does not group. */
|
|
28
|
-
groupKeys: GroupKey[];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The rows a table prints.
|
|
32
|
-
*
|
|
33
|
-
* Combining and grouping happen in one pass: a row joins the combined row it matches on
|
|
34
|
-
* `combine.by`, adding its `combine.sum` fields, and drops its `group.by` value into that row's
|
|
35
|
-
* gathered values, adding `group.sum` fields there. A table that groups but does not combine
|
|
36
|
-
* gathers one value per row — harmless, and what a user building the table step by step sees first.
|
|
37
|
-
*/
|
|
38
|
-
export declare const buildTableRows: (data: TableData, rowSets: Record<string, Row[]> | undefined, scope: ResolveScope) => BuiltTableRows;
|
|
39
|
-
export interface TableSection {
|
|
40
|
-
/** The raw value the section is keyed on. */
|
|
41
|
-
key: unknown;
|
|
42
|
-
rows: TableRow[];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Rows split each time `by` changes. With `sort`, sections are ordered by their key and every row
|
|
46
|
-
* of a key lands in its one section; without, sections follow the rows' order, so a run of the
|
|
47
|
-
* same key after a different one starts a new section — the classic report behaviour.
|
|
48
|
-
*/
|
|
49
|
-
export declare const buildSections: (rows: TableRow[], by: string, sort?: "asc" | "desc") => TableSection[];
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quoin — editing a template, and being able to take it back.
|
|
3
|
-
*
|
|
4
|
-
* Every change a designer makes goes through here rather than through spread-updates scattered
|
|
5
|
-
* across components. Two reasons, and the second is the real one:
|
|
6
|
-
*
|
|
7
|
-
* - Undo/redo is only correct if every edit is a pure replacement of the whole template. Get
|
|
8
|
-
* that right once and the history is three lines; get it wrong and undo silently loses work.
|
|
9
|
-
* - These operations are testable without a browser, and a designer's edit rules — what a new
|
|
10
|
-
* band may hold, what removing a column also removes — are worth asserting.
|
|
11
|
-
*
|
|
12
|
-
* Nothing here mutates. Nothing here validates either: a template is malformed for most of the
|
|
13
|
-
* time it is being edited, and refusing an intermediate state is how an editor becomes unusable.
|
|
14
|
-
* `validateTemplate` is what a Save button asks. An operation that finds nothing to change returns
|
|
15
|
-
* the template it was given, so a caller can skip a re-render.
|
|
16
|
-
*/
|
|
17
|
-
import type { AlignedCell, AlignedRow, Band, BandKind, Block, CellLine, ColumnSpec, HeaderGroup, ReportConditionGroup, ReportRegistry, ReportTemplate, SectionSpec, TableBlock, TableData, TemplateOption, TextRow, Watermark } from '../../../published/dcs-ui/src/publicTypes';
|
|
18
|
-
export declare const newBandId: (t: ReportTemplate) => string;
|
|
19
|
-
export declare const newBlockId: (t: ReportTemplate) => string;
|
|
20
|
-
/** An empty band of the requested kind, with one empty text block so it is visible in a preview. */
|
|
21
|
-
export declare const makeBand: (template: ReportTemplate, kind: BandKind) => Band;
|
|
22
|
-
export declare const addBand: (t: ReportTemplate, kind: BandKind, atIndex?: number) => ReportTemplate;
|
|
23
|
-
export declare const removeBand: (t: ReportTemplate, bandId: string) => ReportTemplate;
|
|
24
|
-
export declare const moveBand: (t: ReportTemplate, bandId: string, toIndex: number) => ReportTemplate;
|
|
25
|
-
export declare const updateBand: (t: ReportTemplate, bandId: string, patch: Partial<Omit<Band, "id">>) => ReportTemplate;
|
|
26
|
-
/** A copy, with fresh band and block ids so the two can be edited apart. */
|
|
27
|
-
export declare const duplicateBand: (t: ReportTemplate, bandId: string) => ReportTemplate;
|
|
28
|
-
export declare const addBlock: (t: ReportTemplate, bandId: string, block: Omit<Block, "id">, atIndex?: number) => ReportTemplate;
|
|
29
|
-
export declare const removeBlock: (t: ReportTemplate, bandId: string, blockId: string) => ReportTemplate;
|
|
30
|
-
export declare const moveBlock: (t: ReportTemplate, bandId: string, blockId: string, toIndex: number) => ReportTemplate;
|
|
31
|
-
/** Moves a block into another band — "put the tax table in the footer". */
|
|
32
|
-
export declare const moveBlockToBand: (t: ReportTemplate, fromBandId: string, blockId: string, toBandId: string, atIndex?: number) => ReportTemplate;
|
|
33
|
-
export declare const updateBlock: (t: ReportTemplate, bandId: string, blockId: string, patch: Record<string, unknown>) => ReportTemplate;
|
|
34
|
-
export declare const addTextRow: (t: ReportTemplate, bandId: string, blockId: string, atIndex?: number) => ReportTemplate;
|
|
35
|
-
export declare const removeTextRow: (t: ReportTemplate, bandId: string, blockId: string, rowId: string) => ReportTemplate;
|
|
36
|
-
export declare const moveTextRow: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, toIndex: number) => ReportTemplate;
|
|
37
|
-
export declare const updateTextRow: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, patch: Partial<Omit<TextRow, "id" | "cells">>) => ReportTemplate;
|
|
38
|
-
/**
|
|
39
|
-
* Adds a cell and re-divides the row evenly.
|
|
40
|
-
*
|
|
41
|
-
* Widths are percentages of the row, so adding a cell without redistributing leaves the row
|
|
42
|
-
* adding up to more than 100 and the last cell running off the page. Splitting evenly is the only
|
|
43
|
-
* behaviour that is always safe; an author can then set the widths they want.
|
|
44
|
-
*/
|
|
45
|
-
export declare const addTextCell: (t: ReportTemplate, bandId: string, blockId: string, rowId: string) => ReportTemplate;
|
|
46
|
-
export declare const removeTextCell: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string) => ReportTemplate;
|
|
47
|
-
export declare const updateTextCell: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, patch: Record<string, unknown>) => ReportTemplate;
|
|
48
|
-
/** One styled line inside a cell. */
|
|
49
|
-
export declare const addLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, content?: string) => ReportTemplate;
|
|
50
|
-
export declare const removeLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, segmentId: string) => ReportTemplate;
|
|
51
|
-
export declare const moveLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, segmentId: string, toIndex: number) => ReportTemplate;
|
|
52
|
-
export declare const updateLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, segmentId: string, patch: Record<string, unknown>) => ReportTemplate;
|
|
53
|
-
/**
|
|
54
|
-
* A new table over a row set: its first few fields as columns, the first taking the spare width,
|
|
55
|
-
* numbers right-aligned, a heading shown, in a box. Something a user sees immediately and edits
|
|
56
|
-
* from, rather than an empty table that prints nothing.
|
|
57
|
-
*/
|
|
58
|
-
export declare const makeTableBlock: (registry: ReportRegistry, rowSetKey: string, columnCount?: number) => Omit<TableBlock, "id">;
|
|
59
|
-
export declare const updateTable: (t: ReportTemplate, bandId: string, blockId: string, patch: Partial<Omit<TableBlock, "id" | "type">>) => ReportTemplate;
|
|
60
|
-
/**
|
|
61
|
-
* Merges into the table's data; a key set to `undefined` is removed (`{ group: undefined }` stops
|
|
62
|
-
* grouping). A group whose lookup names only a row set is completed from that row set's `lookup`
|
|
63
|
-
* declaration, so a designer can offer "Sizes" and never ask which field is the id.
|
|
64
|
-
*/
|
|
65
|
-
export declare const setTableData: (t: ReportTemplate, bandId: string, blockId: string, patch: Partial<TableData>, registry?: ReportRegistry) => ReportTemplate;
|
|
66
|
-
export declare const addColumn: (t: ReportTemplate, bandId: string, blockId: string, column?: Partial<ColumnSpec>, atIndex?: number) => ReportTemplate;
|
|
67
|
-
/**
|
|
68
|
-
* Removing a column also removes the heading groups and closing-row cells that name it. Left
|
|
69
|
-
* behind, they point at nothing and the table fails validation for a reason the author never saw.
|
|
70
|
-
*/
|
|
71
|
-
export declare const removeColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string) => ReportTemplate;
|
|
72
|
-
export declare const moveColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, toIndex: number) => ReportTemplate;
|
|
73
|
-
export declare const updateColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, patch: Partial<Omit<ColumnSpec, "id">>) => ReportTemplate;
|
|
74
|
-
export declare const duplicateColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string) => ReportTemplate;
|
|
75
|
-
/** Adds a line; a column holding a single value is turned into lines first, keeping that value as line 1. */
|
|
76
|
-
export declare const addCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, line?: Partial<Omit<CellLine, "id">>, atIndex?: number) => ReportTemplate;
|
|
77
|
-
export declare const updateCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, lineId: string, patch: Partial<Omit<CellLine, "id">>) => ReportTemplate;
|
|
78
|
-
export declare const removeCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, lineId: string) => ReportTemplate;
|
|
79
|
-
export declare const moveCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, lineId: string, toIndex: number) => ReportTemplate;
|
|
80
|
-
export declare const addHeaderGroup: (t: ReportTemplate, bandId: string, blockId: string, group: Omit<HeaderGroup, "id">) => ReportTemplate;
|
|
81
|
-
export declare const updateHeaderGroup: (t: ReportTemplate, bandId: string, blockId: string, groupId: string, patch: Partial<Omit<HeaderGroup, "id">>) => ReportTemplate;
|
|
82
|
-
export declare const removeHeaderGroup: (t: ReportTemplate, bandId: string, blockId: string, groupId: string) => ReportTemplate;
|
|
83
|
-
/** Merges into `sections`, creating them; `null` removes sections along with their rows. */
|
|
84
|
-
export declare const setSections: (t: ReportTemplate, bandId: string, blockId: string, patch: Partial<SectionSpec> | null) => ReportTemplate;
|
|
85
|
-
/** Which aligned rows of a table: the closing rows, or a section's heading or subtotal rows. */
|
|
86
|
-
export type AlignedRowsTarget = 'footer' | 'sectionHeader' | 'sectionFooter';
|
|
87
|
-
export declare const addAlignedRow: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, atIndex?: number) => ReportTemplate;
|
|
88
|
-
export declare const updateAlignedRow: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, patch: Partial<Omit<AlignedRow, "id" | "cells">>) => ReportTemplate;
|
|
89
|
-
export declare const removeAlignedRow: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string) => ReportTemplate;
|
|
90
|
-
export declare const moveAlignedRow: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, toIndex: number) => ReportTemplate;
|
|
91
|
-
export declare const addAlignedCell: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, cell: {
|
|
92
|
-
from: string;
|
|
93
|
-
to?: string;
|
|
94
|
-
content?: string;
|
|
95
|
-
}) => ReportTemplate;
|
|
96
|
-
export declare const updateAlignedCell: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, cellId: string, patch: Partial<Omit<AlignedCell, "id">>) => ReportTemplate;
|
|
97
|
-
export declare const removeAlignedCell: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, cellId: string) => ReportTemplate;
|
|
98
|
-
/** Everything that can carry a condition, addressed the way a designer's inspector reaches it. */
|
|
99
|
-
export type ConditionTarget = {
|
|
100
|
-
kind: 'band';
|
|
101
|
-
bandId: string;
|
|
102
|
-
} | {
|
|
103
|
-
kind: 'block';
|
|
104
|
-
bandId: string;
|
|
105
|
-
blockId: string;
|
|
106
|
-
} | {
|
|
107
|
-
kind: 'textRow';
|
|
108
|
-
bandId: string;
|
|
109
|
-
blockId: string;
|
|
110
|
-
rowId: string;
|
|
111
|
-
} | {
|
|
112
|
-
kind: 'textCell';
|
|
113
|
-
bandId: string;
|
|
114
|
-
blockId: string;
|
|
115
|
-
rowId: string;
|
|
116
|
-
cellId: string;
|
|
117
|
-
} | {
|
|
118
|
-
kind: 'segment';
|
|
119
|
-
bandId: string;
|
|
120
|
-
blockId: string;
|
|
121
|
-
rowId: string;
|
|
122
|
-
cellId: string;
|
|
123
|
-
segmentId: string;
|
|
124
|
-
} | {
|
|
125
|
-
kind: 'column';
|
|
126
|
-
bandId: string;
|
|
127
|
-
blockId: string;
|
|
128
|
-
columnId: string;
|
|
129
|
-
} | {
|
|
130
|
-
kind: 'cellLine';
|
|
131
|
-
bandId: string;
|
|
132
|
-
blockId: string;
|
|
133
|
-
columnId: string;
|
|
134
|
-
lineId: string;
|
|
135
|
-
} | {
|
|
136
|
-
kind: 'alignedRow';
|
|
137
|
-
bandId: string;
|
|
138
|
-
blockId: string;
|
|
139
|
-
rows: AlignedRowsTarget;
|
|
140
|
-
rowId: string;
|
|
141
|
-
} | {
|
|
142
|
-
kind: 'alignedSegment';
|
|
143
|
-
bandId: string;
|
|
144
|
-
blockId: string;
|
|
145
|
-
rows: AlignedRowsTarget;
|
|
146
|
-
rowId: string;
|
|
147
|
-
cellId: string;
|
|
148
|
-
segmentId: string;
|
|
149
|
-
} | {
|
|
150
|
-
kind: 'watermark';
|
|
151
|
-
};
|
|
152
|
-
/** Sets, or with `null` removes, the condition on one thing. */
|
|
153
|
-
export declare const setCondition: (t: ReportTemplate, target: ConditionTarget, group: ReportConditionGroup | null) => ReportTemplate;
|
|
154
|
-
/** The condition currently on one thing, for an inspector to show. */
|
|
155
|
-
export declare const getCondition: (t: ReportTemplate, target: ConditionTarget) => ReportConditionGroup | undefined;
|
|
156
|
-
export declare const setPage: (t: ReportTemplate, patch: Partial<Omit<ReportTemplate["page"], "watermark">>) => ReportTemplate;
|
|
157
|
-
/** Merges into the watermark, creating it; `null` removes it. */
|
|
158
|
-
export declare const setWatermark: (t: ReportTemplate, patch: Partial<Watermark> | null) => ReportTemplate;
|
|
159
|
-
export declare const addOption: (t: ReportTemplate, option?: Partial<TemplateOption>, atIndex?: number) => ReportTemplate;
|
|
160
|
-
/** Renaming the key is allowed; placeholders and conditions reading the old key are the author's to update. */
|
|
161
|
-
export declare const updateOption: (t: ReportTemplate, key: string, patch: Partial<TemplateOption>) => ReportTemplate;
|
|
162
|
-
export declare const removeOption: (t: ReportTemplate, key: string) => ReportTemplate;
|
|
163
|
-
export declare const moveOption: (t: ReportTemplate, key: string, toIndex: number) => ReportTemplate;
|
|
164
|
-
export interface TemplateHistory {
|
|
165
|
-
past: ReportTemplate[];
|
|
166
|
-
present: ReportTemplate;
|
|
167
|
-
future: ReportTemplate[];
|
|
168
|
-
/**
|
|
169
|
-
* What produced `present`, when it was coalescing. Consecutive edits sharing a key replace
|
|
170
|
-
* each other instead of stacking, so typing a header is one undo, not one per keystroke.
|
|
171
|
-
*/
|
|
172
|
-
lastKey?: string;
|
|
173
|
-
}
|
|
174
|
-
export declare const createHistory: (template: ReportTemplate) => TemplateHistory;
|
|
175
|
-
/**
|
|
176
|
-
* Applies an edit and records it.
|
|
177
|
-
*
|
|
178
|
-
* Named `applyTemplateEdit` because `bulk/bulkChangeDetection` already owns `applyEdit` for
|
|
179
|
-
* editing a spreadsheet cell — a different thing entirely.
|
|
180
|
-
*
|
|
181
|
-
* `coalesceKey` groups a run of related edits into one undo step — pass something stable for the
|
|
182
|
-
* thing being edited, e.g. `header:col2`. Omit it for a discrete action like adding a band.
|
|
183
|
-
*/
|
|
184
|
-
export declare const applyTemplateEdit: (history: TemplateHistory, edit: (template: ReportTemplate) => ReportTemplate, coalesceKey?: string) => TemplateHistory;
|
|
185
|
-
export declare const canUndo: (h: TemplateHistory) => boolean;
|
|
186
|
-
export declare const canRedo: (h: TemplateHistory) => boolean;
|
|
187
|
-
export declare const undo: (h: TemplateHistory) => TemplateHistory;
|
|
188
|
-
export declare const redo: (h: TemplateHistory) => TemplateHistory;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quoin — what a template author is allowed to insert.
|
|
3
|
-
*
|
|
4
|
-
* The designer's field picker, as data. A user must never type `%party.mobil%` and discover the
|
|
5
|
-
* mistake on a printed invoice, so they should not be typing paths at all: they pick from this
|
|
6
|
-
* list, and validation exists for the cases where a template outlives the registry that made it.
|
|
7
|
-
*
|
|
8
|
-
* It is also the honest answer to "why no formula language" — the whole vocabulary is here, it
|
|
9
|
-
* fits on a screen, and everything in it was declared in code by someone who meant it.
|
|
10
|
-
*/
|
|
11
|
-
import type { FieldType, ReportRegistry, TableBlock, TemplateOption } from '../../../published/dcs-ui/src/publicTypes';
|
|
12
|
-
export type FieldScope = 'source' | 'row' | 'group' | 'page' | 'computed' | 'option' | 'aggregate';
|
|
13
|
-
export interface FieldOption {
|
|
14
|
-
/** Exactly what to put into the template: `%party.name%`. */
|
|
15
|
-
insert: string;
|
|
16
|
-
/** The path inside it: `party.name`. */
|
|
17
|
-
path: string;
|
|
18
|
-
label: string;
|
|
19
|
-
/** Heading to file it under in a picker. */
|
|
20
|
-
group: string;
|
|
21
|
-
type: FieldType;
|
|
22
|
-
scope: FieldScope;
|
|
23
|
-
/** Shown as a hint where the plain label would be ambiguous. */
|
|
24
|
-
description?: string;
|
|
25
|
-
}
|
|
26
|
-
/** What an aggregate may cover: the rows in scope, one group value's rows, or a whole row set. */
|
|
27
|
-
export type AggregateOver = 'row' | 'group' | 'rowSets';
|
|
28
|
-
export interface FieldCatalogueOptions {
|
|
29
|
-
/** The table's row set: `%row.*%` and `%group.*%` fields, and the formats behind them. */
|
|
30
|
-
rowSet?: string;
|
|
31
|
-
/** Offer `%row.*%`. */
|
|
32
|
-
rowsInScope?: boolean;
|
|
33
|
-
/** Offer `%group.*%`. Only inside a table that groups. */
|
|
34
|
-
groupsInScope?: boolean;
|
|
35
|
-
/** The lookup row set naming group values, for `%group.lookup.*%`. */
|
|
36
|
-
lookupRowSet?: string;
|
|
37
|
-
/** Which aggregates to offer. Empty or absent offers none. */
|
|
38
|
-
aggregatesOver?: AggregateOver[];
|
|
39
|
-
/** Offer `%page.*%`. Only in a page header or footer. */
|
|
40
|
-
pageInScope?: boolean;
|
|
41
|
-
/** The template's print options, offered as `%option.*%`. */
|
|
42
|
-
templateOptions?: TemplateOption[];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Everything insertable in one context, in the order a picker should show it: the rows first when
|
|
46
|
-
* they are in scope (that is what an author reaches for most), then the group values, then the
|
|
47
|
-
* document's own values, then the machinery.
|
|
48
|
-
*/
|
|
49
|
-
export declare const listFields: (registry: ReportRegistry, options?: FieldCatalogueOptions) => FieldOption[];
|
|
50
|
-
/** Grouped for a picker with headings, preserving the order `listFields` chose. */
|
|
51
|
-
export declare const groupFields: (fields: FieldOption[]) => Array<{
|
|
52
|
-
group: string;
|
|
53
|
-
fields: FieldOption[];
|
|
54
|
-
}>;
|
|
55
|
-
/**
|
|
56
|
-
* Filter for a search box. Matches the label, the path and the group, so both "mobile" and
|
|
57
|
-
* "party." find the same thing.
|
|
58
|
-
*/
|
|
59
|
-
export declare const searchFields: (fields: FieldOption[], query: string) => FieldOption[];
|
|
60
|
-
/**
|
|
61
|
-
* Where a placeholder is being written.
|
|
62
|
-
*
|
|
63
|
-
* - `text` — a text block in a content band.
|
|
64
|
-
* - `pageBand` — a text block in a page header or footer.
|
|
65
|
-
* - `column` — a table column's value or a plain line in it.
|
|
66
|
-
* - `groupLine` — a column line repeating over group values.
|
|
67
|
-
* - `groupColumn` — the header or value of a column generated per group value.
|
|
68
|
-
* - `closingRow` — a row closing a table: tax, round off, total.
|
|
69
|
-
* - `closingGroupCell` — a closing-row cell under a generated column.
|
|
70
|
-
* - `sectionRow` — a section's heading or subtotal row.
|
|
71
|
-
* - `condition` — a condition rule, inside the table when one is given.
|
|
72
|
-
*/
|
|
73
|
-
export type FieldPlace = 'text' | 'pageBand' | 'column' | 'groupLine' | 'groupColumn' | 'closingRow' | 'closingGroupCell' | 'sectionRow' | 'condition';
|
|
74
|
-
/**
|
|
75
|
-
* Which scopes a place may read, so a picker offers only what will resolve there.
|
|
76
|
-
*
|
|
77
|
-
* This is the same truth `validateTemplate` enforces; keeping it in one function means the picker
|
|
78
|
-
* cannot offer something the validator will then reject.
|
|
79
|
-
*/
|
|
80
|
-
export declare const scopeFor: (place: FieldPlace, table?: Pick<TableBlock, "data">, templateOptions?: TemplateOption[]) => FieldCatalogueOptions;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — rendering one value as text.
|
|
3
|
-
*
|
|
4
|
-
* This is where "date, or date and time?" and "two decimals or three?" stop being reasons to fork
|
|
5
|
-
* a PDF format. They are `PlaceholderFormat`s on the same field.
|
|
6
|
-
*/
|
|
7
|
-
import type { DateFormat, NumberFormat, PlaceholderFormat } from '../../../published/dcs-ui/src/publicTypes';
|
|
8
|
-
export declare const formatNumber: (value: number, fmt?: NumberFormat) => string;
|
|
9
|
-
/**
|
|
10
|
-
* Pattern tokens, longest first so `yyyy` is not eaten by `yy`:
|
|
11
|
-
* `yyyy` `yy` `mmm` (Jan) `mm` `dd` `HH` (24h) `hh` (12h) `nn` (minutes) `ss` `AP` (AM/PM).
|
|
12
|
-
* Anything else is a literal.
|
|
13
|
-
*/
|
|
14
|
-
export declare const formatDate: (value: unknown, fmt?: DateFormat) => string;
|
|
15
|
-
/**
|
|
16
|
-
* The single place a value becomes text.
|
|
17
|
-
*
|
|
18
|
-
* An empty value yields `defaultValue` if one is set, otherwise the empty string — and NOT the
|
|
19
|
-
* prefix/suffix, because a stray "Mobile : " on an invoice with no mobile number is exactly the
|
|
20
|
-
* kind of thing the old formats each solved with their own `!!x ? … : ''`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const applyFormat: (value: unknown, fmt?: PlaceholderFormat) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Upper, lower or title case. Applied to the whole printed text of a line — literals and values
|
|
25
|
-
* alike — before it is measured, so a heading set in capitals wraps where capitals wrap.
|
|
26
|
-
*/
|
|
27
|
-
export declare const applyTextCase: (text: string, textCase?: "upper" | "lower" | "title") => string;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quoin — a template built from a column list.
|
|
3
|
-
*
|
|
4
|
-
* Most reports are a title, a table, optional sections and a totals row. Hand-writing a template
|
|
5
|
-
* for each of those would be as much work as the hand-written generators this replaces, so this
|
|
6
|
-
* derives one. Give it the columns a screen table already has and it returns a template plus the
|
|
7
|
-
* registry describing them — no template file, no field declarations.
|
|
8
|
-
*
|
|
9
|
-
* Deliberately generic: it knows nothing about the Table component, or invoices. An app maps its
|
|
10
|
-
* own column type onto `GridColumn` and gets a report.
|
|
11
|
-
*
|
|
12
|
-
* Totals and subtotals are rows laid on the table's own columns, so each figure sits under its
|
|
13
|
-
* column whatever width the columns declare.
|
|
14
|
-
*/
|
|
15
|
-
import type { PageConfig, ReportRegistry, ReportTemplate } from '../../../published/dcs-ui/src/publicTypes';
|
|
16
|
-
export type GridColumnType = 'text' | 'number' | 'date' | 'boolean';
|
|
17
|
-
export interface GridColumn {
|
|
18
|
-
key: string;
|
|
19
|
-
header: string;
|
|
20
|
-
type?: GridColumnType;
|
|
21
|
-
align?: 'left' | 'center' | 'right';
|
|
22
|
-
/** Decimals for a number column. Defaults to 2 for money-ish values, 0 for counts. */
|
|
23
|
-
decimals?: number;
|
|
24
|
-
/** Digit grouping for numbers. */
|
|
25
|
-
grouping?: 'in' | 'en';
|
|
26
|
-
/** Date pattern; only meaningful for a date column. */
|
|
27
|
-
dateFormat?: string;
|
|
28
|
-
/** Totalled in the closing row, and in each section's subtotal row when grouping. */
|
|
29
|
-
summable?: boolean;
|
|
30
|
-
/** Defaults to an equal share of the width. */
|
|
31
|
-
width?: number | '*' | 'auto';
|
|
32
|
-
}
|
|
33
|
-
export interface GridReportOptions {
|
|
34
|
-
/** Printed once at the top. */
|
|
35
|
-
title?: string;
|
|
36
|
-
/** Second line under the title — a date range, a filter description. */
|
|
37
|
-
subtitle?: string;
|
|
38
|
-
/** Repeat the title block on every page rather than page one only. */
|
|
39
|
-
repeatTitle?: boolean;
|
|
40
|
-
page?: Partial<PageConfig>;
|
|
41
|
-
/** Column key to split the rows into sections by. A heading row opens each section; subtotals close it. */
|
|
42
|
-
groupBy?: string;
|
|
43
|
-
/** Print `Page n of m` at the foot of every page. Default true. */
|
|
44
|
-
pageNumbers?: boolean;
|
|
45
|
-
/** Print a totals row at the end. Default true when any column is summable. */
|
|
46
|
-
totals?: boolean;
|
|
47
|
-
/** Label of the totals row. */
|
|
48
|
-
totalsLabel?: string;
|
|
49
|
-
id?: string;
|
|
50
|
-
name?: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The registry for a derived report: one row set called `rows`, plus the handful of scalars a
|
|
54
|
-
* heading needs. An app that wants more can extend the result before rendering.
|
|
55
|
-
*/
|
|
56
|
-
export declare const registryFromColumns: (columns: GridColumn[], key?: string) => ReportRegistry;
|
|
57
|
-
export interface GridReportResult {
|
|
58
|
-
template: ReportTemplate;
|
|
59
|
-
registry: ReportRegistry;
|
|
60
|
-
}
|
|
61
|
-
export declare const templateFromColumns: (columns: GridColumn[], options?: GridReportOptions) => GridReportResult;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { REPORT_SCHEMA_VERSION, REPORT_AGGREGATES, CONTINUATION_SUFFIX, BAND_PART_SEPARATOR, TABLE_HEADER_SUFFIX, TABLE_FOOTER_SUFFIX, TABLE_FILL_INFIX, } from './constants';
|
|
2
|
-
export { applyFormat, formatNumber, formatDate, applyTextCase } from './format';
|
|
3
|
-
export { readPath, aggregateRows, type ResolveScope, type GroupScope, type ScopeRow } from './scope';
|
|
4
|
-
export { evaluateReportRule, evaluateReportCondition } from './conditions';
|
|
5
|
-
export { parseAggregate, computeAggregate, type AggregateCall } from './aggregate';
|
|
6
|
-
export { resolveText, buildFormatLookup, PLACEHOLDER, type FormatLookup, type ResolveOptions } from './resolve';
|
|
7
|
-
export { buildTableRows, buildSections, type Row, type TableRow, type GroupKey, type BuiltTableRows, type TableSection, } from './dataset';
|
|
8
|
-
export { lineHeight, textWidth, textHeight, wrapToWidth, minTextWidth, containsNonAscii, mmToPt, PT_PER_MM, PAPER_SIZES_PT, } from './metrics';
|
|
9
|
-
export { layoutDocument, pageContentSize, resolveColumnWidths, expandColumns, resolveOptions, CELL_PAD_X, CELL_PAD_Y, AUTO_COLUMN_SLACK_PT, type LayoutResult, type LayoutOptions, type PlacedColumn, } from './layout';
|
|
10
|
-
export { paginate, type PaginateOptions } from './paginate';
|
|
11
|
-
export { renderToPdfMake, PDFMAKE_CAPABILITIES, type PdfMakeRenderOptions } from './renderers/pdfmake';
|
|
12
|
-
export { validateTemplate, isTemplateValid, formatIssues, type ValidationIssue, type IssueSeverity, } from './validate';
|
|
13
|
-
export { migrateTemplate, migrateTemplatePart, MIGRATIONS, ASSUMED_SCHEMA_VERSION, type MigrationStep, type MigrationResult, } from './migrate';
|
|
14
|
-
export { REPORT_TEMPLATES_SETTINGS_DOC, DIFFABLE_TEMPLATE_KEYS, diffTemplate, buildTemplateEntry, resolveStoredTemplate, loadReportTemplates, activeReportTemplates, type DiffableTemplateKey, type TemplateDiff, type EntryOptions, type TemplateLoadProblem, type LoadedTemplate, } from './storage';
|
|
15
|
-
export { templateFromColumns, registryFromColumns, type GridColumn, type GridColumnType, type GridReportOptions, type GridReportResult, } from './fromColumns';
|
|
16
|
-
export { renderToHtml, type HtmlRenderOptions } from './renderers/html';
|
|
17
|
-
export { listFields, groupFields, searchFields, scopeFor, type FieldOption, type FieldScope, type FieldCatalogueOptions, type AggregateOver, type FieldPlace, } from './fields';
|
|
18
|
-
export { makeBand, addBand, removeBand, moveBand, updateBand, duplicateBand, addBlock, removeBlock, moveBlock, moveBlockToBand, updateBlock, addTextRow, removeTextRow, moveTextRow, updateTextRow, addTextCell, removeTextCell, updateTextCell, addLine, removeLine, moveLine, updateLine, makeTableBlock, updateTable, setTableData, addColumn, removeColumn, moveColumn, updateColumn, duplicateColumn, addCellLine, updateCellLine, removeCellLine, moveCellLine, addHeaderGroup, updateHeaderGroup, removeHeaderGroup, setSections, addAlignedRow, updateAlignedRow, removeAlignedRow, moveAlignedRow, addAlignedCell, updateAlignedCell, removeAlignedCell, setCondition, getCondition, setPage, setWatermark, addOption, updateOption, removeOption, moveOption, newBandId, newBlockId, createHistory, applyTemplateEdit, undo, redo, canUndo, canRedo, type TemplateHistory, type AlignedRowsTarget, type ConditionTarget, } from './edit';
|
|
19
|
-
export { selectionFromCanvas, canvasHighlight, liveSelection, parseBandId, selectionAncestors, type DesignerSelection, type CanvasTarget, type CanvasHighlight, } from './canvas';
|