@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
|
-
* Report engine — what a table prints, and the rows it prints them from.
|
|
3
|
-
*
|
|
4
|
-
* Every table shapes its own rows (`TableData`), because a report has more than one table and each
|
|
5
|
-
* wants different rows: items combined by item, tax by rate, tax by HSN, services apart from goods.
|
|
6
|
-
* v1 gave that power to one "main grid" only, which is why a tax table by HSN could not be built.
|
|
7
|
-
* See `docs/REPORT_ENGINE.md` §14.4.
|
|
8
|
-
*/
|
|
9
|
-
import type { ReportConditionGroup } from './conditions';
|
|
10
|
-
import type { Alignment, PlaceholderFormat, PlaceholderFormats, TextStyle } from './primitives';
|
|
11
|
-
/**
|
|
12
|
-
* One line inside a table cell.
|
|
13
|
-
*
|
|
14
|
-
* A description cell is rarely one line: the name, then the description, then the product code,
|
|
15
|
-
* then the item's colours. Each is a line, so its height is known before anything is drawn.
|
|
16
|
-
*/
|
|
17
|
-
export interface CellLine {
|
|
18
|
-
id: string;
|
|
19
|
-
/** Literal text and `%source.key%` placeholders. */
|
|
20
|
-
content: string;
|
|
21
|
-
style?: TextStyle;
|
|
22
|
-
/**
|
|
23
|
-
* How individual placeholders on this line print, keyed by the token itself — `%row.sn%`.
|
|
24
|
-
*
|
|
25
|
-
* A line can name several fields, and they rarely want the same treatment: a serial number as a
|
|
26
|
-
* plain integer beside an amount to two decimals. A token with no entry here falls back to the
|
|
27
|
-
* column's own `format`, and then to the field's default from the registry.
|
|
28
|
-
*/
|
|
29
|
-
formats?: PlaceholderFormats;
|
|
30
|
-
condition?: ReportConditionGroup;
|
|
31
|
-
/**
|
|
32
|
-
* Print once per group value of the row (`TableData.group`), with `%group.*%` in scope — an
|
|
33
|
-
* item's colours, with their quantities.
|
|
34
|
-
*/
|
|
35
|
-
repeat?: 'groups';
|
|
36
|
-
/** For `repeat: 'groups'`: a line each (default), or all on one running line. */
|
|
37
|
-
display?: 'lines' | 'inline';
|
|
38
|
-
/** For `display: 'inline'`: what goes between values. Defaults to ", ". */
|
|
39
|
-
separator?: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* `field` — an ordinary column.
|
|
43
|
-
* `groupColumns` — expands into one column per distinct group value across the table (a column per
|
|
44
|
-
* size), in lookup order. Its `header` and `value` read `%group.*%`.
|
|
45
|
-
*/
|
|
46
|
-
export type ColumnKind = 'field' | 'groupColumns';
|
|
47
|
-
export interface ColumnSpec {
|
|
48
|
-
id: string;
|
|
49
|
-
/** Absent means `field`. */
|
|
50
|
-
kind?: ColumnKind;
|
|
51
|
-
/** May contain placeholders. */
|
|
52
|
-
header: string;
|
|
53
|
-
/** What each row prints here: `%row.total%`, or several lines for a rich cell. */
|
|
54
|
-
value: string | CellLine[];
|
|
55
|
-
width: number | '*' | 'auto';
|
|
56
|
-
align?: Alignment;
|
|
57
|
-
/** The default for every placeholder in this column that has none of its own. */
|
|
58
|
-
format?: PlaceholderFormat;
|
|
59
|
-
/** How individual placeholders print, keyed by the token — `%row.hsn%`. Beats `format`. */
|
|
60
|
-
formats?: PlaceholderFormats;
|
|
61
|
-
style?: TextStyle;
|
|
62
|
-
headerStyle?: TextStyle;
|
|
63
|
-
/** Alignment of the heading when it differs from the values' — a left heading over right-aligned figures. */
|
|
64
|
-
headerAlign?: Alignment;
|
|
65
|
-
/** Column is dropped entirely when this fails. */
|
|
66
|
-
condition?: ReportConditionGroup;
|
|
67
|
-
}
|
|
68
|
-
/** Rows agreeing on every `by` field become one row; `sum` fields add up, the rest keep the first. */
|
|
69
|
-
export interface CombineSpec {
|
|
70
|
-
by: string[];
|
|
71
|
-
sum?: string[];
|
|
72
|
-
}
|
|
73
|
-
/** A row set used to name and order group values. Filled from the row set's `LookupDef` by default. */
|
|
74
|
-
export interface LookupRef {
|
|
75
|
-
rowSet: string;
|
|
76
|
-
key: string;
|
|
77
|
-
label: string;
|
|
78
|
-
order?: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* "Grouping usage": each row gathers the values of `by` from the rows combined into it — the item
|
|
82
|
-
* gathers its colours. Every group value carries the fields of the rows it gathered (`sum` fields
|
|
83
|
-
* added up, others first-seen), plus `key`, `label`, `order` and the lookup row as `lookup.*`.
|
|
84
|
-
*/
|
|
85
|
-
export interface GroupValuesSpec {
|
|
86
|
-
by: string;
|
|
87
|
-
lookup?: LookupRef;
|
|
88
|
-
sum?: string[];
|
|
89
|
-
}
|
|
90
|
-
export interface SortSpec {
|
|
91
|
-
by: string;
|
|
92
|
-
dir: 'asc' | 'desc';
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* The rows one table prints. Runs in this order: filter → combine and group → sort.
|
|
96
|
-
*
|
|
97
|
-
* Without `group` this is "direct usage": one printed row per (combined) data row.
|
|
98
|
-
*/
|
|
99
|
-
export interface TableData {
|
|
100
|
-
/** A `rowSets` key in the `ReportContext`. */
|
|
101
|
-
rowSet: string;
|
|
102
|
-
filter?: ReportConditionGroup;
|
|
103
|
-
combine?: CombineSpec;
|
|
104
|
-
group?: GroupValuesSpec;
|
|
105
|
-
sort?: SortSpec[];
|
|
106
|
-
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — the two documents downstream of a template.
|
|
3
|
-
*
|
|
4
|
-
* A template is a design. Resolving it against data gives a **layout document**: every
|
|
5
|
-
* placeholder substituted, every table expanded into its heading, rows, sections and closing rows,
|
|
6
|
-
* every block reduced to rows of cells of already-wrapped lines, each carrying its measured height.
|
|
7
|
-
* Paginating that gives a **paged document**: the same bands, dealt onto pages.
|
|
8
|
-
*
|
|
9
|
-
* The split is what lets a 2-inch till roll and an A4 invoice come out of one model. A continuous
|
|
10
|
-
* roll stops at layout — it has no pages to assign anything to. See `docs/REPORT_ENGINE.md` §5.
|
|
11
|
-
*
|
|
12
|
-
* Renderers consume these, never the template. Nothing here mentions pdfmake, HTML or ESC/POS.
|
|
13
|
-
*/
|
|
14
|
-
import type { BandKind } from './bands';
|
|
15
|
-
import type { Alignment, PageConfig, StrokeStyle, TextStyle } from './primitives';
|
|
16
|
-
/**
|
|
17
|
-
* One wrapped line. It carries its own style because a template's segments are line-level in
|
|
18
|
-
* practice — a bold label above a plain value — and flattening that to one style per cell would
|
|
19
|
-
* lose it.
|
|
20
|
-
*/
|
|
21
|
-
export interface LayoutLine {
|
|
22
|
-
text: string;
|
|
23
|
-
style?: TextStyle;
|
|
24
|
-
}
|
|
25
|
-
/** One cell, with its text already wrapped to `widthPt`. */
|
|
26
|
-
export interface LayoutCell {
|
|
27
|
-
widthPt: number;
|
|
28
|
-
align?: Alignment;
|
|
29
|
-
/** The template column this cell prints for, so a designer can point at one column of a table. */
|
|
30
|
-
columnId?: string;
|
|
31
|
-
style?: TextStyle;
|
|
32
|
-
/** Wrapped lines. An empty array is an empty cell that still occupies its row. */
|
|
33
|
-
lines: LayoutLine[];
|
|
34
|
-
/**
|
|
35
|
-
* Measured content height, padding excluded.
|
|
36
|
-
*
|
|
37
|
-
* Carried rather than recomputed from `lines`, because the line count is not always the whole
|
|
38
|
-
* story — shaped text that had to be force-broken costs more than its lines suggest, and a
|
|
39
|
-
* consumer counting lines would silently lose that.
|
|
40
|
-
*/
|
|
41
|
-
heightPt: number;
|
|
42
|
-
/** Drawn at the left of the cell; `heightPt` already covers it, the lines sit beside it. */
|
|
43
|
-
image?: {
|
|
44
|
-
src: string;
|
|
45
|
-
widthPt: number;
|
|
46
|
-
heightPt: number;
|
|
47
|
-
gapPt: number;
|
|
48
|
-
};
|
|
49
|
-
/** The row's bottom line is not drawn under this cell — a heading that spans two rows. */
|
|
50
|
-
noBottomLine?: boolean;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Lines drawn around one row, in points. `heightPt` of the row already includes `top` and
|
|
54
|
-
* `bottom`, and the cells' widths already exclude `left`, `right` and `inner` — a renderer draws
|
|
55
|
-
* these and adds nothing.
|
|
56
|
-
*/
|
|
57
|
-
export interface RowBorder {
|
|
58
|
-
top: number;
|
|
59
|
-
bottom: number;
|
|
60
|
-
left: number;
|
|
61
|
-
right: number;
|
|
62
|
-
/** Between cells. */
|
|
63
|
-
inner: number;
|
|
64
|
-
}
|
|
65
|
-
export interface LayoutRow {
|
|
66
|
-
cells: LayoutCell[];
|
|
67
|
-
/** Includes `border.top` and `border.bottom`. */
|
|
68
|
-
heightPt: number;
|
|
69
|
-
border?: RowBorder;
|
|
70
|
-
/**
|
|
71
|
-
* Height added beyond the tallest cell to meet a row's minimum. Renderers that do not set a row
|
|
72
|
-
* height themselves (pdfmake) add it under the first cell, so the row comes out as planned.
|
|
73
|
-
*/
|
|
74
|
-
extraHeightPt?: number;
|
|
75
|
-
/** Drawn under this row. Renderers without rules ignore it. */
|
|
76
|
-
separator?: StrokeStyle;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* What a block became.
|
|
80
|
-
*
|
|
81
|
-
* `rows` covers text blocks and table rows — everything textual collapses to the same shape, so a
|
|
82
|
-
* renderer implements it once. The rest are leaves with a height and their own payload.
|
|
83
|
-
*/
|
|
84
|
-
export type LayoutBlockKind = 'rows' | 'image' | 'barcode' | 'qr' | 'separator' | 'spacer';
|
|
85
|
-
export interface LayoutBlock {
|
|
86
|
-
id: string;
|
|
87
|
-
kind: LayoutBlockKind;
|
|
88
|
-
heightPt: number;
|
|
89
|
-
style?: TextStyle;
|
|
90
|
-
/** [top, right, bottom, left], points. */
|
|
91
|
-
marginPt?: [number, number, number, number];
|
|
92
|
-
rows?: LayoutRow[];
|
|
93
|
-
image?: {
|
|
94
|
-
src: string;
|
|
95
|
-
widthPt: number;
|
|
96
|
-
heightPt: number;
|
|
97
|
-
align?: Alignment;
|
|
98
|
-
};
|
|
99
|
-
barcode?: {
|
|
100
|
-
value: string;
|
|
101
|
-
symbology: string;
|
|
102
|
-
widthPt: number;
|
|
103
|
-
heightPt: number;
|
|
104
|
-
showValue: boolean;
|
|
105
|
-
align?: Alignment;
|
|
106
|
-
};
|
|
107
|
-
qr?: {
|
|
108
|
-
value: string;
|
|
109
|
-
sizePt: number;
|
|
110
|
-
errorCorrection?: string;
|
|
111
|
-
align?: Alignment;
|
|
112
|
-
};
|
|
113
|
-
separator?: {
|
|
114
|
-
stroke: StrokeStyle;
|
|
115
|
-
thicknessPt: number;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* `space` is not something a template can declare: it is vertical space pagination puts between a
|
|
120
|
-
* page's content and its footer, so the footer sits at the foot of the page. It has its own kind
|
|
121
|
-
* so nothing mistakes it for the footer it pushes down.
|
|
122
|
-
*/
|
|
123
|
-
export type LayoutBandKind = BandKind | 'space';
|
|
124
|
-
/**
|
|
125
|
-
* One appearance of something with a height, in print order. A content band becomes one of these
|
|
126
|
-
* — or several, when a table inside it flows: the blocks before the table, then one band per table
|
|
127
|
-
* row, then the blocks after.
|
|
128
|
-
*/
|
|
129
|
-
export interface LayoutBand {
|
|
130
|
-
id: string;
|
|
131
|
-
kind: LayoutBandKind;
|
|
132
|
-
heightPt: number;
|
|
133
|
-
keepTogether?: boolean;
|
|
134
|
-
/** Must not end a page: moves on with the next band when that one does not fit here. */
|
|
135
|
-
keepWithNext?: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* Part of a flowing table: its rows, its section rows and its closing rows. Pagination repeats the
|
|
138
|
-
* table's heading above these, closes the box after the last of them on a page, and fills below.
|
|
139
|
-
*/
|
|
140
|
-
tableId?: string;
|
|
141
|
-
/** The table's heading, re-emitted on each page. */
|
|
142
|
-
tableHeader?: boolean;
|
|
143
|
-
/** Rows that close the table. Pagination puts empty rows above these, not below. */
|
|
144
|
-
tableFooter?: boolean;
|
|
145
|
-
/** The block the table came from, so a designer can map a click on any row back to it. */
|
|
146
|
-
blockId?: string;
|
|
147
|
-
blocks: LayoutBlock[];
|
|
148
|
-
}
|
|
149
|
-
/** What pagination needs to head, close and fill one flowing table. */
|
|
150
|
-
export interface LayoutTable {
|
|
151
|
-
/** The template band the table sits in, for ids the engine mints later — the rows filling a page. */
|
|
152
|
-
bandId: string;
|
|
153
|
-
/** The heading band, repeated on every page the table continues onto when `repeat` allows. */
|
|
154
|
-
header?: LayoutBand;
|
|
155
|
-
repeatHeader: boolean;
|
|
156
|
-
/** Box thickness; the last row of the table on a page is given at least this as its bottom line. */
|
|
157
|
-
outerPt: number;
|
|
158
|
-
fill: 'none' | 'lastPage' | 'everyPage';
|
|
159
|
-
/** One empty row, bordered like a table row — what a filled page is made of. */
|
|
160
|
-
emptyRow: LayoutRow;
|
|
161
|
-
}
|
|
162
|
-
/** A watermark with its placeholders resolved and its condition already decided. */
|
|
163
|
-
export interface LayoutWatermark {
|
|
164
|
-
text?: string;
|
|
165
|
-
image?: string;
|
|
166
|
-
imageWidthPt?: number;
|
|
167
|
-
opacity: number;
|
|
168
|
-
angle: number;
|
|
169
|
-
fontSize: number;
|
|
170
|
-
color: string;
|
|
171
|
-
bold: boolean;
|
|
172
|
-
}
|
|
173
|
-
export interface LayoutDocument {
|
|
174
|
-
page: PageConfig;
|
|
175
|
-
contentWidthPt: number;
|
|
176
|
-
/** Height available for flowing bands, page header and footer already deducted. */
|
|
177
|
-
contentHeightPt: number;
|
|
178
|
-
/** Bands in print order, tables already expanded. */
|
|
179
|
-
flow: LayoutBand[];
|
|
180
|
-
/** Repeated at the top of every page. */
|
|
181
|
-
pageHeader: LayoutBand[];
|
|
182
|
-
/** Repeated at the bottom of every page. */
|
|
183
|
-
pageFooter: LayoutBand[];
|
|
184
|
-
/** Flowing tables, by table id. */
|
|
185
|
-
tables: Record<string, LayoutTable>;
|
|
186
|
-
watermark?: LayoutWatermark;
|
|
187
|
-
}
|
|
188
|
-
export interface LayoutPage {
|
|
189
|
-
/** 1-based. */
|
|
190
|
-
number: number;
|
|
191
|
-
bands: LayoutBand[];
|
|
192
|
-
/** Height left unused after the last band — what filler rows would occupy. */
|
|
193
|
-
freeHeightPt: number;
|
|
194
|
-
}
|
|
195
|
-
export interface PagedDocument {
|
|
196
|
-
page: PageConfig;
|
|
197
|
-
contentWidthPt: number;
|
|
198
|
-
contentHeightPt: number;
|
|
199
|
-
pages: LayoutPage[];
|
|
200
|
-
watermark?: LayoutWatermark;
|
|
201
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './primitives';
|
|
2
|
-
export * from './registry';
|
|
3
|
-
export * from './conditions';
|
|
4
|
-
export * from './dataset';
|
|
5
|
-
export * from './blocks';
|
|
6
|
-
export * from './bands';
|
|
7
|
-
export * from './template';
|
|
8
|
-
export * from './document';
|
|
9
|
-
export * from './storage';
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — leaf types.
|
|
3
|
-
*
|
|
4
|
-
* Deliberately compatible with the equivalents in the client's `LabelDesigner/types.ts`, which is
|
|
5
|
-
* live and stays where it is. When that folder is eventually pointed at this package (see
|
|
6
|
-
* `docs/REPORT_ENGINE.md` §2) the change should be an import swap, not a redesign — so keep these
|
|
7
|
-
* shapes identical unless there is a reason not to.
|
|
8
|
-
*/
|
|
9
|
-
import type { ReportConditionGroup } from './conditions';
|
|
10
|
-
export type Alignment = 'left' | 'center' | 'right';
|
|
11
|
-
/** Applied to the printed text before it is measured, so it wraps exactly as it prints. */
|
|
12
|
-
export type TextCase = 'upper' | 'lower' | 'title';
|
|
13
|
-
export interface TextStyle {
|
|
14
|
-
fontFamily?: string;
|
|
15
|
-
fontSize?: number;
|
|
16
|
-
bold?: boolean;
|
|
17
|
-
italic?: boolean;
|
|
18
|
-
underline?: boolean;
|
|
19
|
-
strike?: boolean;
|
|
20
|
-
color?: string;
|
|
21
|
-
/** Cell/box background. Renderers without colour ignore it. */
|
|
22
|
-
fill?: string;
|
|
23
|
-
textCase?: TextCase;
|
|
24
|
-
}
|
|
25
|
-
export type StrokeStyle = 'solid' | 'dashed' | 'dotted' | 'dash-dot' | 'long-dash' | 'double' | 'none';
|
|
26
|
-
export type NumberFormatMode = 'none' | 'fixed' | 'round' | 'ceil' | 'floor';
|
|
27
|
-
export interface NumberFormat {
|
|
28
|
-
mode: NumberFormatMode;
|
|
29
|
-
decimals: number;
|
|
30
|
-
/** Digit grouping. 'in' = 1,23,456.00 (lakh/crore); 'en' = 123,456.00; absent = none. */
|
|
31
|
-
grouping?: 'in' | 'en';
|
|
32
|
-
/** A plus sign before a positive value — a round-off printed as "+0.24". */
|
|
33
|
-
signed?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface DateFormat {
|
|
36
|
-
/** Pattern, e.g. `dd-mm-yyyy` or `dd-mm-yyyy hh:mm`. */
|
|
37
|
-
format: string;
|
|
38
|
-
/** Compute from today + offsetDays rather than reading the source value. */
|
|
39
|
-
computed?: boolean;
|
|
40
|
-
offsetDays?: number | string;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* How one placeholder renders. This is the whole of "date or date and time?", "two decimals or
|
|
44
|
-
* three?", "show a dash when empty" — the questions that otherwise become format variants.
|
|
45
|
-
*/
|
|
46
|
-
export interface PlaceholderFormat {
|
|
47
|
-
type: 'text' | 'number' | 'date';
|
|
48
|
-
numberFormat?: NumberFormat;
|
|
49
|
-
dateFormat?: DateFormat;
|
|
50
|
-
prefix?: string;
|
|
51
|
-
suffix?: string;
|
|
52
|
-
/** Printed when the value is empty. Absent means print nothing. */
|
|
53
|
-
defaultValue?: string;
|
|
54
|
-
}
|
|
55
|
-
/** Keyed by the placeholder token, e.g. `'%row.total%'`. */
|
|
56
|
-
export type PlaceholderFormats = Record<string, PlaceholderFormat>;
|
|
57
|
-
/**
|
|
58
|
-
* A run of text. `content` may mix literals and `%source.key%` placeholders; the resolver
|
|
59
|
-
* substitutes them and applies `formats`.
|
|
60
|
-
*/
|
|
61
|
-
export interface TextSegment {
|
|
62
|
-
id: string;
|
|
63
|
-
content: string;
|
|
64
|
-
/** Inherit the enclosing block's style rather than carrying one. */
|
|
65
|
-
useOwnStyle?: boolean;
|
|
66
|
-
style?: TextStyle;
|
|
67
|
-
/** Break to a new line after this segment. */
|
|
68
|
-
newLine?: boolean;
|
|
69
|
-
formats?: PlaceholderFormats;
|
|
70
|
-
/** Printed only when this holds — a labelled line appears only when its value exists. */
|
|
71
|
-
condition?: ReportConditionGroup;
|
|
72
|
-
}
|
|
73
|
-
export type PaperSize = 'A3' | 'A4' | 'A5' | 'A6' | 'Letter' | 'Legal' | 'Roll' | 'custom';
|
|
74
|
-
export type PageOrientation = 'portrait' | 'landscape';
|
|
75
|
-
/**
|
|
76
|
-
* Drawn behind every page, centred. A page property rather than a band: it takes no room and
|
|
77
|
-
* must never take part in pagination.
|
|
78
|
-
*/
|
|
79
|
-
export interface Watermark {
|
|
80
|
-
/** Text, placeholders allowed. Ignored when `image` resolves to something. */
|
|
81
|
-
text?: string;
|
|
82
|
-
/** A URL, a data URI, or a placeholder resolving to one. */
|
|
83
|
-
image?: string;
|
|
84
|
-
/** Width of the image in points. Defaults to half the page width. */
|
|
85
|
-
imageWidthPt?: number;
|
|
86
|
-
/** 0–1. Defaults to 0.15. */
|
|
87
|
-
opacity?: number;
|
|
88
|
-
/** Degrees, text only. Defaults to -45. */
|
|
89
|
-
angle?: number;
|
|
90
|
-
/** Text only. Defaults to 60. */
|
|
91
|
-
fontSize?: number;
|
|
92
|
-
/** Text only. Defaults to a dark blue. */
|
|
93
|
-
color?: string;
|
|
94
|
-
bold?: boolean;
|
|
95
|
-
/** Drawn only when this holds — "only on a proforma", "only when the shop turned it on". */
|
|
96
|
-
condition?: ReportConditionGroup;
|
|
97
|
-
}
|
|
98
|
-
export interface PageConfig {
|
|
99
|
-
size: PaperSize;
|
|
100
|
-
orientation: PageOrientation;
|
|
101
|
-
/** Required for 'custom'; for 'Roll', `heightMm` is 'auto' — a continuous, unpaged document. */
|
|
102
|
-
widthMm?: number;
|
|
103
|
-
heightMm?: number | 'auto';
|
|
104
|
-
marginTopMm: number;
|
|
105
|
-
marginRightMm: number;
|
|
106
|
-
marginBottomMm: number;
|
|
107
|
-
marginLeftMm: number;
|
|
108
|
-
watermark?: Watermark;
|
|
109
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — the contract between the engine and whatever app is using it.
|
|
3
|
-
*
|
|
4
|
-
* THIS FILE IS WHY THE ENGINE IS GENERIC. The engine knows there are named scalar sources and
|
|
5
|
-
* named row sets; it does not know that one of them is an invoice. Every domain word — invoice,
|
|
6
|
-
* item, customer, size, colour — arrives at runtime through a `ReportRegistry` the app declares.
|
|
7
|
-
*
|
|
8
|
-
* If a domain term ever appears in `packages/shared-types/src/report/` or
|
|
9
|
-
* `shared-logic/src/report/`, the abstraction has failed and the engine is an invoice renderer
|
|
10
|
-
* with extra steps. See `docs/REPORT_ENGINE.md` §6 and §14.
|
|
11
|
-
*/
|
|
12
|
-
import type { PlaceholderFormat } from './primitives';
|
|
13
|
-
export type FieldType = 'text' | 'number' | 'date' | 'boolean' | 'image';
|
|
14
|
-
/**
|
|
15
|
-
* One addressable value. The engine uses `type` and `format` to render it and `label` to show it
|
|
16
|
-
* in a picker; it never interprets `key`.
|
|
17
|
-
*/
|
|
18
|
-
export interface FieldDef {
|
|
19
|
-
key: string;
|
|
20
|
-
label: string;
|
|
21
|
-
type: FieldType;
|
|
22
|
-
/** Applied when a placeholder does not override it. */
|
|
23
|
-
format?: PlaceholderFormat;
|
|
24
|
-
/** Whether `agg.*` may be taken over this field. Validation rejects aggregates over the rest. */
|
|
25
|
-
aggregatable?: boolean;
|
|
26
|
-
/** Optional grouping for the field picker, e.g. 'Totals', 'Tax'. */
|
|
27
|
-
group?: string;
|
|
28
|
-
}
|
|
29
|
-
/** A bag of scalars addressed as `%<key>.<field>%` — 'business', 'customer', 'summary'. */
|
|
30
|
-
export interface SourceDef {
|
|
31
|
-
key: string;
|
|
32
|
-
label: string;
|
|
33
|
-
fields: FieldDef[];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* How a row set serves as a LOOKUP — sizes, colours, dias — for a table that groups rows by an id.
|
|
37
|
-
*
|
|
38
|
-
* Only the app knows that `sizeid` "XL" sorts after "L"; it says so by passing the sizes as a row
|
|
39
|
-
* set and naming which of its fields is the id, the name and the display order. The table then
|
|
40
|
-
* points at it (`TableData.group.lookup`), and the designer offers it as a choice — which a
|
|
41
|
-
* function in app code could never be.
|
|
42
|
-
*/
|
|
43
|
-
export interface LookupDef {
|
|
44
|
-
/** Field holding the id rows are grouped by. */
|
|
45
|
-
key: string;
|
|
46
|
-
/** Field printed as the value's name. */
|
|
47
|
-
label: string;
|
|
48
|
-
/** Numeric field giving the display order. Absent: the order the rows arrive in. */
|
|
49
|
-
order?: string;
|
|
50
|
-
}
|
|
51
|
-
/** An iterable set of rows addressed as `%row.<field>%` inside a table. */
|
|
52
|
-
export interface RowSetDef {
|
|
53
|
-
key: string;
|
|
54
|
-
label: string;
|
|
55
|
-
fields: FieldDef[];
|
|
56
|
-
/** Present when this row set can be used to name and order grouped values. */
|
|
57
|
-
lookup?: LookupDef;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Everything an app publishes about its data. Drives the field picker, validation, and resolution.
|
|
61
|
-
* One registry per document kind ('invoice', 'stock-report', 'ageing', …).
|
|
62
|
-
*/
|
|
63
|
-
export interface ReportRegistry {
|
|
64
|
-
key: string;
|
|
65
|
-
label: string;
|
|
66
|
-
sources: SourceDef[];
|
|
67
|
-
rowSets: RowSetDef[];
|
|
68
|
-
/**
|
|
69
|
-
* Named values computed in code and offered to templates as ordinary fields.
|
|
70
|
-
*
|
|
71
|
-
* This is the deliberate replacement for a formula language (`docs/REPORT_ENGINE.md` §7).
|
|
72
|
-
* Anything a template cannot express with placeholders, conditions and the fixed aggregate
|
|
73
|
-
* list becomes an entry here — reviewed, typed and testable — rather than a string a user
|
|
74
|
-
* typed into a box.
|
|
75
|
-
*/
|
|
76
|
-
computed?: FieldDef[];
|
|
77
|
-
}
|
|
78
|
-
/** The data itself, at render time. Shapes are opaque to the engine. */
|
|
79
|
-
export interface ReportContext {
|
|
80
|
-
sources: Record<string, Record<string, unknown>>;
|
|
81
|
-
rowSets: Record<string, Array<Record<string, unknown>>>;
|
|
82
|
-
computed?: Record<string, (ctx: ReportContext) => unknown>;
|
|
83
|
-
/** What the user picked for the template's print options, by option key. */
|
|
84
|
-
options?: Record<string, unknown>;
|
|
85
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — how a template is stored.
|
|
3
|
-
*
|
|
4
|
-
* A shipped format is a SEED that lives in code. What a customer saves is a DIFF against that
|
|
5
|
-
* seed, so a seed can be improved later without overwriting their work, and "this shop wants the
|
|
6
|
-
* lorry number under the address" never becomes a file in the repository. See
|
|
7
|
-
* `docs/REPORT_ENGINE.md` §8.
|
|
8
|
-
*
|
|
9
|
-
* NO RUNTIME VALUES IN THIS FOLDER — see the note at the top of `template.ts`. The doc name, the
|
|
10
|
-
* diff and the resolver all live in `shared-logic/report/storage`.
|
|
11
|
-
*/
|
|
12
|
-
import type { ReportTemplate } from './template';
|
|
13
|
-
/**
|
|
14
|
-
* One entry in the templates settings document. The map key is the template id, so `id` is never
|
|
15
|
-
* stored inside the entry — it would be a second copy of the same fact, free to disagree.
|
|
16
|
-
*/
|
|
17
|
-
export interface StoredReportTemplate {
|
|
18
|
-
/**
|
|
19
|
-
* Id of the shipped seed this diffs against. Absent means the customer authored the whole
|
|
20
|
-
* template, and `template` then holds all of it rather than a difference.
|
|
21
|
-
*/
|
|
22
|
-
seed?: string;
|
|
23
|
-
/**
|
|
24
|
-
* `REPORT_SCHEMA_VERSION` when the diff was written. The diff is migrated to the current
|
|
25
|
-
* version BEFORE it meets the seed — merging an old diff onto a new seed would produce a
|
|
26
|
-
* document that is half one shape and half the other.
|
|
27
|
-
*/
|
|
28
|
-
schemaVersion?: number;
|
|
29
|
-
/** false hides a format from the pickers without deleting the customer's edits. */
|
|
30
|
-
active?: boolean;
|
|
31
|
-
/** Set by the app on write; the engine neither reads nor produces these. */
|
|
32
|
-
createdts?: unknown;
|
|
33
|
-
updatedts?: unknown;
|
|
34
|
-
/**
|
|
35
|
-
* The difference from the seed, by whole top-level key. A key absent here is taken from the
|
|
36
|
-
* seed, which is how a seed improvement reaches a customer who never touched that key.
|
|
37
|
-
*/
|
|
38
|
-
template?: Partial<ReportTemplate>;
|
|
39
|
-
}
|
|
40
|
-
/** The templates settings document: template id → entry. */
|
|
41
|
-
export type ReportTemplatesStoredMap = Record<string, StoredReportTemplate>;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — the authored document.
|
|
3
|
-
*
|
|
4
|
-
* A `ReportTemplate` is data. It is stored, diffed against a shipped seed, and edited by people
|
|
5
|
-
* who are not developers, which is why `schemaVersion` is not optional and never will be: the day
|
|
6
|
-
* a customer saves one of these, the shape is frozen for everybody and the only way forward is a
|
|
7
|
-
* migration ladder. See `docs/REPORT_ENGINE.md` §8 and §14.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* NO RUNTIME VALUES IN THIS FOLDER.
|
|
11
|
-
*
|
|
12
|
-
* `REPORT_SCHEMA_VERSION` and `REPORT_AGGREGATES` were declared here and took the client's dev
|
|
13
|
-
* server down. The client resolves `shared-types` to its CommonJS `dist/index.js`, and Vite finds
|
|
14
|
-
* that file's named exports by static analysis which follows one hop of `__exportStar`. The
|
|
15
|
-
* report model is a nested barrel — `index.js` → `report/index.js` → `template.js` — so a value
|
|
16
|
-
* declared here is two hops away and simply is not found. Types are unaffected: they are erased
|
|
17
|
-
* and never ask the loader for anything.
|
|
18
|
-
*
|
|
19
|
-
* Both constants now live in `shared-logic/report/constants`, which is where the client already
|
|
20
|
-
* gets its runtime code.
|
|
21
|
-
*/
|
|
22
|
-
import type { Band } from './bands';
|
|
23
|
-
import type { PageConfig } from './primitives';
|
|
24
|
-
export type TemplateOptionType = 'boolean' | 'select' | 'text' | 'number';
|
|
25
|
-
/**
|
|
26
|
-
* A choice made when printing — "Tax table by HSN or by rate", "Show the summary". The template
|
|
27
|
-
* declares it, the app's print dialog shows it, and conditions and text read it as `%option.key%`.
|
|
28
|
-
*/
|
|
29
|
-
export interface TemplateOption {
|
|
30
|
-
key: string;
|
|
31
|
-
label: string;
|
|
32
|
-
type: TemplateOptionType;
|
|
33
|
-
/** For `select`. */
|
|
34
|
-
choices?: Array<{
|
|
35
|
-
value: string;
|
|
36
|
-
label: string;
|
|
37
|
-
}>;
|
|
38
|
-
/** Used when the app passes no value. */
|
|
39
|
-
default?: string | number | boolean;
|
|
40
|
-
description?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface ReportTemplate {
|
|
43
|
-
/** `REPORT_SCHEMA_VERSION` at authoring time. Migrations run oldest → newest on read. */
|
|
44
|
-
schemaVersion: number;
|
|
45
|
-
id: string;
|
|
46
|
-
name: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
/** Which `ReportRegistry` this template is written against. */
|
|
49
|
-
registry: string;
|
|
50
|
-
page: PageConfig;
|
|
51
|
-
options?: TemplateOption[];
|
|
52
|
-
/** In print order. */
|
|
53
|
-
bands: Band[];
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Line thicknesses for a table, in points. Absent or 0 draws nothing.
|
|
57
|
-
*
|
|
58
|
-
* Lines are GEOMETRY, not decoration: a 1pt line under a row makes that row 1pt taller, and a
|
|
59
|
-
* vertical line makes the table 1pt wider. The engine budgets both, which is why this is four
|
|
60
|
-
* numbers rather than a pdfmake `layout` callback — a callback can draw anything, and the planner
|
|
61
|
-
* would have no way to know how tall it made the page.
|
|
62
|
-
*/
|
|
63
|
-
export interface GridLines {
|
|
64
|
-
/** The box: above the heading, down both sides, and closing the table on every page. */
|
|
65
|
-
outer?: number;
|
|
66
|
-
/** Between columns. */
|
|
67
|
-
columns?: number;
|
|
68
|
-
/** Under the heading. */
|
|
69
|
-
header?: number;
|
|
70
|
-
/** Between rows. */
|
|
71
|
-
rows?: number;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Empty rows added after a table's last row, so the box runs down to what follows.
|
|
75
|
-
*
|
|
76
|
-
* `lastPage` fills only the page the table ends on — the classic invoice, whose totals sit at the
|
|
77
|
-
* foot of the page. `everyPage` also fills pages the table continues from, so a tall row that moved
|
|
78
|
-
* to the next page does not leave a gap under the box.
|
|
79
|
-
*/
|
|
80
|
-
export type GridFill = 'none' | 'lastPage' | 'everyPage';
|
|
81
|
-
/**
|
|
82
|
-
* The fixed aggregate set. There is no expression language and there will not be one; anything
|
|
83
|
-
* beyond this becomes a field the app computes.
|
|
84
|
-
*
|
|
85
|
-
* Written `%agg.sum(row.total)%` inside a table's closing or section rows (that table's or section's
|
|
86
|
-
* rows), `%agg.sum(group.qty)%` under a group column, or `%agg.sum(items.total)%` anywhere (a whole
|
|
87
|
-
* row set as passed). `distinct` counts different values — `agg.distinct(items.sizeid)`.
|
|
88
|
-
*
|
|
89
|
-
* The matching runtime list lives in `shared-logic/report/constants` — see the note at the top of
|
|
90
|
-
* this file for why it cannot live here.
|
|
91
|
-
*/
|
|
92
|
-
export type ReportAggregate = 'sum' | 'count' | 'avg' | 'min' | 'max' | 'first' | 'last' | 'distinct';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared contract every web component in @pdfinvoice/shared-web-ui satisfies.
|
|
3
|
-
*
|
|
4
|
-
* Each component enumerates the props it understands. Without this, anything not
|
|
5
|
-
* on that allow-list is silently dropped — including `data-*` attributes, which
|
|
6
|
-
* test harnesses (Storybook/Testing Library) and the editable-table cell
|
|
7
|
-
* addressing both rely on.
|
|
8
|
-
*
|
|
9
|
-
* A `data-${string}` template index signature is used rather than
|
|
10
|
-
* `[key: string]: any` so arbitrary misspelled props are still rejected.
|
|
11
|
-
*/
|
|
12
|
-
export interface DataAttributes {
|
|
13
|
-
[dataAttr: `data-${string}`]: unknown;
|
|
14
|
-
}
|