@dcs-tech/ui 0.2.0 → 0.3.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 +31 -0
- package/dist/ChartImageMenu-gvNAYVkY.js +2938 -0
- package/dist/Charts-COljjy0x.js +1759 -0
- package/dist/SummaryChart-D4jcOv-K.js +31 -0
- package/dist/SummaryImage-BSbatHym.js +19 -0
- package/dist/SummarySeeAll-vnaL3pdy.js +97 -0
- package/dist/defaults-BbLB8QmD.js +709 -0
- package/dist/exportContext-CAX8VPrP.js +243 -0
- package/dist/exportEngine-C4n1MiOw.js +891 -0
- package/dist/fuseSearch-vLQR3O5a.js +37 -0
- package/dist/index.js +19289 -9411
- package/dist/style.css +1 -1
- package/dist/summaryChartData-CU_W5ocv.js +82 -0
- package/dist/types/published/dcs-ui/src/index.d.ts +0 -28
- package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -33
- package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -12
- package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -21
- package/dist/types/shared-logic/src/report/canvas.d.ts +0 -55
- package/dist/types/shared-logic/src/report/conditions.d.ts +0 -14
- package/dist/types/shared-logic/src/report/constants.d.ts +0 -39
- package/dist/types/shared-logic/src/report/dataset.d.ts +0 -26
- package/dist/types/shared-logic/src/report/edit.d.ts +0 -62
- package/dist/types/shared-logic/src/report/fields.d.ts +0 -51
- package/dist/types/shared-logic/src/report/format.d.ts +0 -22
- package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -30
- package/dist/types/shared-logic/src/report/layout.d.ts +1 -55
- package/dist/types/shared-logic/src/report/metrics.d.ts +0 -45
- package/dist/types/shared-logic/src/report/migrate.d.ts +0 -60
- package/dist/types/shared-logic/src/report/paginate.d.ts +0 -32
- package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -21
- package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -27
- package/dist/types/shared-logic/src/report/resolve.d.ts +0 -29
- package/dist/types/shared-logic/src/report/scope.d.ts +0 -28
- package/dist/types/shared-logic/src/report/storage.d.ts +0 -76
- package/dist/types/shared-logic/src/report/validate.d.ts +0 -18
- package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/chipinput.logic.d.ts +0 -12
- package/dist/types/shared-logic/src/ui/collapsible.logic.d.ts +0 -7
- package/dist/types/shared-logic/src/ui/colorScheme.d.ts +0 -14
- package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -11
- package/dist/types/shared-logic/src/ui/datePicker.logic.d.ts +136 -0
- package/dist/types/shared-logic/src/ui/editableTable.logic.d.ts +0 -27
- package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +2 -14
- package/dist/types/shared-logic/src/ui/form.logic.d.ts +0 -8
- package/dist/types/shared-logic/src/ui/index.d.ts +3 -29
- package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -60
- package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/popover.logic.d.ts +22 -20
- package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/quickAddGrid.logic.d.ts +183 -0
- package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -14
- package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -34
- package/dist/types/shared-logic/src/ui/tableSummary.logic.d.ts +0 -19
- package/dist/types/shared-logic/src/ui/timeField.logic.d.ts +26 -0
- package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -8
- package/dist/types/shared-types/src/report/bands.d.ts +0 -20
- package/dist/types/shared-types/src/report/blocks.d.ts +0 -59
- package/dist/types/shared-types/src/report/conditions.d.ts +0 -13
- package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
- package/dist/types/shared-types/src/report/document.d.ts +0 -80
- package/dist/types/shared-types/src/report/primitives.d.ts +0 -40
- package/dist/types/shared-types/src/report/registry.d.ts +0 -46
- package/dist/types/shared-types/src/report/storage.d.ts +0 -31
- package/dist/types/shared-types/src/report/template.d.ts +0 -60
- package/dist/types/shared-types/src/ui/button.types.d.ts +0 -11
- package/dist/types/shared-types/src/ui/checkbox.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/chipinput.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/collapsible.types.d.ts +0 -18
- package/dist/types/shared-types/src/ui/common.types.d.ts +0 -11
- package/dist/types/shared-types/src/ui/control.types.d.ts +0 -97
- package/dist/types/shared-types/src/ui/datePicker.types.d.ts +46 -0
- package/dist/types/shared-types/src/ui/editableTable.types.d.ts +0 -79
- package/dist/types/shared-types/src/ui/field.types.d.ts +4 -124
- package/dist/types/shared-types/src/ui/fieldWrapper.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/fields.types.d.ts +0 -45
- package/dist/types/shared-types/src/ui/form.types.d.ts +0 -30
- package/dist/types/shared-types/src/ui/index.d.ts +1 -16
- package/dist/types/shared-types/src/ui/input.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/keyboard.types.d.ts +2 -109
- package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -22
- package/dist/types/shared-types/src/ui/radio.types.d.ts +0 -6
- package/dist/types/shared-types/src/ui/select.types.d.ts +0 -41
- package/dist/types/shared-types/src/ui/suggest.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/switch.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/table.types.d.ts +0 -59
- package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -25
- package/dist/types/shared-types/src/ui/typography.types.d.ts +0 -4
- package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -9
- package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -19
- package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -14
- package/dist/types/shared-web-ui/src/Badge/Badge.d.ts +0 -11
- package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -52
- package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -16
- package/dist/types/shared-web-ui/src/Charts/AnchoredMenu.d.ts +17 -0
- package/dist/types/shared-web-ui/src/Charts/BarList.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/CalendarHeatmap.d.ts +17 -0
- package/dist/types/shared-web-ui/src/Charts/Chart.d.ts +20 -0
- package/dist/types/shared-web-ui/src/Charts/ChartIcon.d.ts +5 -0
- package/dist/types/shared-web-ui/src/Charts/ChartImageMenu.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Charts/ChartTable.d.ts +8 -0
- package/dist/types/shared-web-ui/src/Charts/ChartTooltip.d.ts +44 -0
- package/dist/types/shared-web-ui/src/Charts/ChartView.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/ColumnChart.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/Donut.d.ts +14 -0
- package/dist/types/shared-web-ui/src/Charts/Funnel.d.ts +10 -0
- package/dist/types/shared-web-ui/src/Charts/Gauge.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/Legend.d.ts +6 -0
- package/dist/types/shared-web-ui/src/Charts/LineChart.d.ts +13 -0
- package/dist/types/shared-web-ui/src/Charts/NumberTrend.d.ts +21 -0
- package/dist/types/shared-web-ui/src/Charts/Progress.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/StackedBar.d.ts +11 -0
- package/dist/types/shared-web-ui/src/Charts/Treemap.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/chartData.d.ts +69 -0
- package/dist/types/shared-web-ui/src/Charts/chartImage.d.ts +121 -0
- package/dist/types/shared-web-ui/src/Charts/geometry.d.ts +178 -0
- package/dist/types/shared-web-ui/src/Charts/index.d.ts +32 -0
- package/dist/types/shared-web-ui/src/Charts/labels.d.ts +46 -0
- package/dist/types/shared-web-ui/src/Charts/menuPlacement.d.ts +25 -0
- package/dist/types/shared-web-ui/src/Charts/palette.d.ts +81 -0
- package/dist/types/shared-web-ui/src/Charts/parts.d.ts +24 -0
- package/dist/types/shared-web-ui/src/Charts/pointer.d.ts +41 -0
- package/dist/types/shared-web-ui/src/Charts/types.d.ts +51 -0
- package/dist/types/shared-web-ui/src/Charts/ui.d.ts +3 -0
- package/dist/types/shared-web-ui/src/Charts/useBoxSize.d.ts +6 -0
- package/dist/types/shared-web-ui/src/Charts/useLegendFit.d.ts +1 -0
- package/dist/types/shared-web-ui/src/Collapsible/CollapsibleItem.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -15
- package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -27
- package/dist/types/shared-web-ui/src/DataTable/DataTable.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/DisplayPopover.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/HeaderMenu.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/ManageModal.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/SingleRowView.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/SortModal.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/StatusRow.d.ts +49 -0
- package/dist/types/shared-web-ui/src/DataTable/TableColumnModal.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/TableControls.d.ts +48 -0
- package/dist/types/shared-web-ui/src/DataTable/TablePagination.d.ts +38 -0
- package/dist/types/shared-web-ui/src/DataTable/TableScrollStrip.d.ts +2 -0
- package/dist/types/shared-web-ui/src/DataTable/TableToolbar.d.ts +69 -0
- package/dist/types/shared-web-ui/src/DataTable/TableView.d.ts +61 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/TableToast.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/bulkActions.d.ts +23 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/CardFieldsEditor.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/CardView.d.ts +50 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/cardFields.d.ts +32 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/rowParts.d.ts +38 -0
- package/dist/types/shared-web-ui/src/DataTable/data/useServerData.d.ts +28 -0
- package/dist/types/shared-web-ui/src/DataTable/defaults.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/detail/BuiltInDetail.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/detail/DetailHost.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportPopover.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportPreviewModal.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportSettingsModal.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportTemplateCards.d.ts +19 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportContext.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportEngine.d.ts +77 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportRows.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/export/templateDisplay.d.ts +7 -0
- package/dist/types/shared-web-ui/src/DataTable/export/templateOptions.d.ts +6 -0
- package/dist/types/shared-web-ui/src/DataTable/export/useTableExport.d.ts +53 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterConditionRow.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterGroup.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterModal.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterRow.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/columnFilterModel.d.ts +29 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/filterEngine.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/filterRowModel.d.ts +28 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/quickFilterMatch.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/GroupUi.d.ts +36 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/groupModel.d.ts +82 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/useGrouping.d.ts +39 -0
- package/dist/types/shared-web-ui/src/DataTable/host.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/index.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/shortcuts.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
- package/dist/types/shared-web-ui/src/DataTable/labels.d.ts +618 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/LayoutSwitcher.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/layouts.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/scrollArea.d.ts +2 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/useFillHeight.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/RowMenu.d.ts +56 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/buildRowMenu.d.ts +35 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/clipboard.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/valueFilter.d.ts +15 -0
- package/dist/types/shared-web-ui/src/DataTable/motion/useRowMotion.d.ts +32 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/adapters.d.ts +6 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/reconcile.d.ts +64 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useColumnPersistence.d.ts +51 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useManagePrefs.d.ts +23 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/pinning.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/rows/RowActions.d.ts +15 -0
- package/dist/types/shared-web-ui/src/DataTable/rows/rowPress.d.ts +35 -0
- package/dist/types/shared-web-ui/src/DataTable/sharing/Sharing.d.ts +21 -0
- package/dist/types/shared-web-ui/src/DataTable/split/SplitView.d.ts +29 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/ManageSummaryCards.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryChart.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryControls.d.ts +33 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryImage.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummarySeeAll.d.ts +17 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/TableSummary.d.ts +34 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryCatalogue.d.ts +64 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryChartData.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryModel.d.ts +152 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryWidth.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/useTableSummary.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/types.d.ts +1145 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/AutoHeight.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DateRangePicker.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/ReactModal.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/ui.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/useDataChangeTracker.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/useTable.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/columnOrder.d.ts +1 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/diff.d.ts +5 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/fileActions.d.ts +19 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/virtual/useVirtualLines.d.ts +27 -0
- package/dist/types/shared-web-ui/src/DatePicker/Calendar.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DatePicker/DatePicker.d.ts +5 -0
- package/dist/types/shared-web-ui/src/DatePicker/TimeField.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DatePicker/index.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DatePicker/useOneMonthPane.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -45
- package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -36
- package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +24 -24
- package/dist/types/shared-web-ui/src/EditableTable/EditableTable.d.ts +0 -5
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableCell.d.ts +0 -18
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -11
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -11
- package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -32
- package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -15
- package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -9
- package/dist/types/shared-web-ui/src/FieldContext/useField.d.ts +0 -27
- package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -23
- package/dist/types/shared-web-ui/src/FieldContext/useFormKeyboard.d.ts +0 -3
- package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -15
- package/dist/types/shared-web-ui/src/Floating/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/Floating/layers.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Floating/scrollLock.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Floating/useFloatingLayer.d.ts +20 -0
- package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +6 -25
- package/dist/types/shared-web-ui/src/Popover/floatingPosition.d.ts +17 -0
- package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -8
- package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -11
- package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -13
- package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
- package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -22
- package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -8
- package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -1
- package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -12
- package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -30
- package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -39
- package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -24
- package/dist/types/shared-web-ui/src/Scroll/ScrollRule.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Scroll/ScrollStrip.d.ts +9 -0
- package/dist/types/shared-web-ui/src/Scroll/index.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Scroll/labels.d.ts +5 -0
- package/dist/types/shared-web-ui/src/Scroll/scrollActivity.d.ts +14 -0
- package/dist/types/shared-web-ui/src/Scroll/ui.d.ts +1 -0
- package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -31
- package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -15
- package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -43
- package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -14
- package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -9
- package/dist/types/shared-web-ui/src/Toast/toast.types.d.ts +0 -13
- package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -16
- package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -9
- package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -14
- package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -41
- package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -8
- package/dist/types/shared-web-ui/src/index.d.ts +5 -0
- package/dist/ui-DJFwpPdX.js +4997 -0
- package/package.json +9 -7
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { At as e, J as t } from "./ChartImageMenu-gvNAYVkY.js";
|
|
3
|
+
//#region ../../shared-web-ui/src/DataTable/summary/summaryChartData.ts
|
|
4
|
+
function n(e, t) {
|
|
5
|
+
return {
|
|
6
|
+
type: "values",
|
|
7
|
+
values: t.map((t) => ({
|
|
8
|
+
key: t.key,
|
|
9
|
+
label: t.label,
|
|
10
|
+
count: t.count,
|
|
11
|
+
...t.others ? {
|
|
12
|
+
slot: "rest",
|
|
13
|
+
selectable: !1
|
|
14
|
+
} : e.card.slots?.[t.key] === void 0 ? {} : { slot: t.slot },
|
|
15
|
+
...t.children ? { children: t.children.map((e) => ({
|
|
16
|
+
key: e.key,
|
|
17
|
+
label: e.label,
|
|
18
|
+
count: e.count
|
|
19
|
+
})) } : {}
|
|
20
|
+
}))
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function r(e) {
|
|
24
|
+
switch (e.kind) {
|
|
25
|
+
case "unavailable": return {
|
|
26
|
+
type: "number",
|
|
27
|
+
value: 0
|
|
28
|
+
};
|
|
29
|
+
case "value": return {
|
|
30
|
+
type: "number",
|
|
31
|
+
value: e.value ?? 0,
|
|
32
|
+
...e.trend ? {
|
|
33
|
+
points: e.trend.points.map((e) => ({
|
|
34
|
+
key: e.key,
|
|
35
|
+
label: e.fullLabel,
|
|
36
|
+
value: e.count
|
|
37
|
+
})),
|
|
38
|
+
previous: e.trend.previous,
|
|
39
|
+
good: e.card.trend?.good
|
|
40
|
+
} : {}
|
|
41
|
+
};
|
|
42
|
+
case "ratio": return {
|
|
43
|
+
type: "part",
|
|
44
|
+
label: e.card.title,
|
|
45
|
+
value: e.value ?? 0,
|
|
46
|
+
total: e.total ?? 0,
|
|
47
|
+
color: e.card.color
|
|
48
|
+
};
|
|
49
|
+
case "trend": {
|
|
50
|
+
let t = e.periods ?? [], n = e.series.length > 0;
|
|
51
|
+
return {
|
|
52
|
+
type: "time",
|
|
53
|
+
period: e.card.period,
|
|
54
|
+
...n ? { series: e.series.map((e) => ({
|
|
55
|
+
key: e.key,
|
|
56
|
+
label: e.label,
|
|
57
|
+
slot: e.slot
|
|
58
|
+
})) } : {},
|
|
59
|
+
points: t.map((e) => ({
|
|
60
|
+
key: e.key,
|
|
61
|
+
label: e.label,
|
|
62
|
+
fullLabel: e.fullLabel,
|
|
63
|
+
...n ? { counts: e.split ?? {} } : { count: e.count }
|
|
64
|
+
}))
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
case "funnel": return {
|
|
68
|
+
type: "steps",
|
|
69
|
+
steps: (e.steps ?? []).map((e) => ({
|
|
70
|
+
key: e.key,
|
|
71
|
+
label: e.label,
|
|
72
|
+
count: e.count,
|
|
73
|
+
slot: e.slot,
|
|
74
|
+
selectable: e.selectable
|
|
75
|
+
}))
|
|
76
|
+
};
|
|
77
|
+
case "breakdown": return n(e, e.buckets ?? []);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
var i = (t) => e(t.card), a = (e, n) => t(r(e), i(e), n);
|
|
81
|
+
//#endregion
|
|
82
|
+
export { a as n, i as r, n as t };
|
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The public API of @dcs-tech/ui.
|
|
3
|
-
*
|
|
4
|
-
* The reference above is load-bearing: the declaration bundler builds its program
|
|
5
|
-
* from this entry file alone, ignoring tsconfig `include`, so without it the
|
|
6
|
-
* ambient `*.module.css` declaration is missing and every component that imports
|
|
7
|
-
* a stylesheet fails with TS2307.
|
|
8
|
-
*
|
|
9
|
-
* This barrel IS the published surface. Nothing reaches the registry unless it is
|
|
10
|
-
* re-exported here, which is why the library can live in a monorepo alongside
|
|
11
|
-
* private business code without leaking any of it.
|
|
12
|
-
*
|
|
13
|
-
* TWO KINDS OF LINE BELOW, and the difference matters:
|
|
14
|
-
*
|
|
15
|
-
* `export *` from shared-web-ui
|
|
16
|
-
* Automatic. That package is components-only — it imports UI types and
|
|
17
|
-
* nothing else — so a new component appears in the next release with no
|
|
18
|
-
* edit here.
|
|
19
|
-
*
|
|
20
|
-
* Named exports from shared-logic
|
|
21
|
-
* Deliberate. Those packages also contain this business's own domain, so
|
|
22
|
-
* exporting by name is the gate that keeps it private. NEVER turn these
|
|
23
|
-
* into `export *`.
|
|
24
|
-
*
|
|
25
|
-
* And note what this barrel does NOT govern: `tsc` emits declarations for the whole
|
|
26
|
-
* program, so it never controlled `dist/types/`. That is what `src/publicLogic.ts` and
|
|
27
|
-
* `src/publicTypes.ts` are for, and what `verify:no-leak` checks.
|
|
28
|
-
*/
|
|
29
1
|
export * from '../../../shared-web-ui/src';
|
|
30
2
|
export { buildFieldControlClassKeys, buildPopupListClassKeys, buildPopupRowClassKeys, computeTooltipPosition, normalizeTooltip, resolveTooltipPlacementOrder, shouldAnchorToPointer, useMergeRefs, } from './publicLogic';
|
|
31
3
|
export type { FieldControlClassOptions, PopupListClassOptions, PopupRowClassOptions, TooltipAnchorDecision, } from './publicLogic';
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What `@pdfinvoice/shared-logic` means INSIDE the published build.
|
|
3
|
-
*
|
|
4
|
-
* `tsconfig.json` maps the package specifier to this file, so every `from
|
|
5
|
-
* './publicLogic'` in the component sources — 58 of them in `shared-web-ui` alone —
|
|
6
|
-
* resolves here instead of to the package barrel. The domain folders beside `ui/` then never enter the TypeScript program, so no declaration is ever emitted for them.
|
|
7
|
-
*
|
|
8
|
-
* This is the fix for the leak audited on 2026-09-28: `tsc` emits declarations for the whole
|
|
9
|
-
* PROGRAM, so the `export *` gate in `index.ts` — which governs the JS surface, and does govern
|
|
10
|
-
* it correctly — never applied to `dist/types/`. Mapping the specifier is what makes the two
|
|
11
|
-
* surfaces agree.
|
|
12
|
-
*
|
|
13
|
-
* Anything added here ships publicly. The bar: is it generic UI, or is it this business?
|
|
14
|
-
*/
|
|
15
1
|
export * from '../../../shared-logic/src/ui';
|
|
16
|
-
/**
|
|
17
|
-
* The report engine, which is deliberately publishable.
|
|
18
|
-
*
|
|
19
|
-
* `ReportDesigner` is a published component and its props are typed in terms of these, so they
|
|
20
|
-
* are part of the public API whether or not they are named here. That is sound: the banded
|
|
21
|
-
* template model was designed DOMAIN-FREE from the start precisely so it could be published —
|
|
22
|
-
* it describes bands, columns and placeholders, not invoices. See `docs/REPORT_ENGINE.md`.
|
|
23
|
-
*
|
|
24
|
-
* `export *` here, unlike the package barrel, and the difference is verified rather than
|
|
25
|
-
* assumed: `report/` imports NO domain sibling at all (checked 2026-09-28 — not one relative
|
|
26
|
-
* import escapes the folder into a business module). It is a closed, generic module, so
|
|
27
|
-
* re-exporting it whole cannot pull the business in behind it.
|
|
28
|
-
*
|
|
29
|
-
* Listing these by name was tried first and is not practical: `ReportDesigner` and
|
|
30
|
-
* `ReportPreview` are published components typed against ~30 of these symbols, so a named list
|
|
31
|
-
* would be a second copy of `report/index` that silently rots whenever an editor gains a
|
|
32
|
-
* prop. The guard that matters is `verify:no-leak`, which fails the build if a domain term
|
|
33
|
-
* ever reaches `dist/` — including through this line, should `report/` stop being closed.
|
|
34
|
-
*/
|
|
35
2
|
export * from '../../../shared-logic/src/report/index';
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What `@pdfinvoice/shared-types` means INSIDE the published build.
|
|
3
|
-
*
|
|
4
|
-
* The twin of `publicLogic.ts`, for the same reason and by the same mechanism: `tsconfig.json`
|
|
5
|
-
* maps the package specifier here, so the component sources resolve to this instead of to the
|
|
6
|
-
* package barrel — so the folders describing this business's own records never enter the
|
|
7
|
-
* program, or the declarations emitted from it.
|
|
8
|
-
*
|
|
9
|
-
* Both halves are verified self-contained (2026-09-28): neither `shared-types/src/ui` nor
|
|
10
|
-
* `shared-types/src/report` imports a domain sibling, so re-exporting them whole cannot pull
|
|
11
|
-
* the business in behind them. `verify:no-leak` is the standing guard if that ever changes.
|
|
12
|
-
*/
|
|
13
1
|
export * from '../../../shared-types/src/ui';
|
|
14
2
|
export * from '../../../shared-types/src/report';
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report engine — the fixed aggregate set.
|
|
3
|
-
*
|
|
4
|
-
* Eight functions, and deliberately no ninth mechanism. Crystal Reports' expression language is
|
|
5
|
-
* a parser, an editor, a sandbox and a debugger, and it is where projects like this one die.
|
|
6
|
-
* Anything past this list becomes a field the app computes. See `docs/REPORT_ENGINE.md` §7.
|
|
7
|
-
*
|
|
8
|
-
* What an aggregate covers is named in the call itself:
|
|
9
|
-
* `agg.sum(row.total)` — the rows of the table or section the text sits in
|
|
10
|
-
* `agg.sum(group.qty)` — one group value, across the rows under a group column
|
|
11
|
-
* `agg.sum(items.total)` — a whole row set, exactly as the app passed it
|
|
12
|
-
*/
|
|
13
1
|
import type { ReportAggregate } from '../../../published/dcs-ui/src/publicTypes';
|
|
14
|
-
/** `%agg.sum(row.total)%` — parsed once so the resolver does not re-parse per row. */
|
|
15
2
|
export interface AggregateCall {
|
|
16
3
|
kind: ReportAggregate;
|
|
17
|
-
/** `row`, `group`, or a row set key. */
|
|
18
4
|
over: string;
|
|
19
|
-
/** Path within each row, e.g. `total`. */
|
|
20
5
|
field: string;
|
|
21
6
|
}
|
|
22
|
-
/** Returns null when `expr` is not an aggregate call, so callers can fall through to a path read. */
|
|
23
7
|
export declare const parseAggregate: (expr: string) => AggregateCall | null;
|
|
24
|
-
/**
|
|
25
|
-
* `count` counts rows, not values — a row with a blank total still happened. `distinct` counts the
|
|
26
|
-
* different non-blank values. Every other aggregate ignores rows where the field is absent, so an
|
|
27
|
-
* average is over the rows that have one.
|
|
28
|
-
*/
|
|
29
8
|
export declare const computeAggregate: (call: Pick<AggregateCall, "kind" | "field">, rows: Array<Record<string, unknown>>) => number;
|
|
@@ -1,21 +1,4 @@
|
|
|
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
1
|
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
2
|
export type DesignerSelection = {
|
|
20
3
|
kind: 'page';
|
|
21
4
|
} | {
|
|
@@ -44,63 +27,25 @@ export type DesignerSelection = {
|
|
|
44
27
|
rowId: string;
|
|
45
28
|
cellId: string;
|
|
46
29
|
};
|
|
47
|
-
/** The ids read off the element that was clicked — the nearest tagged band, block and column. */
|
|
48
30
|
export interface CanvasTarget {
|
|
49
31
|
bandId?: string;
|
|
50
32
|
blockId?: string;
|
|
51
33
|
columnId?: string;
|
|
52
34
|
}
|
|
53
|
-
/** One element to outline: `data-<attribute>-id` equal to `value`, or starting with it. */
|
|
54
35
|
export interface CanvasHighlight {
|
|
55
36
|
attribute: 'band' | 'block' | 'column';
|
|
56
37
|
value: string;
|
|
57
38
|
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
39
|
within?: {
|
|
63
40
|
attribute: 'block';
|
|
64
41
|
value: string;
|
|
65
42
|
};
|
|
66
43
|
}
|
|
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
44
|
export declare const parseBandId: (id: string) => {
|
|
72
45
|
bandId: string;
|
|
73
46
|
part?: string;
|
|
74
47
|
};
|
|
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
48
|
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
49
|
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
50
|
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
51
|
export declare const liveSelection: (template: ReportTemplate, selection: DesignerSelection) => DesignerSelection;
|
|
@@ -1,18 +1,4 @@
|
|
|
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
1
|
import type { ReportConditionGroup, ReportConditionRule } from '../../../published/dcs-ui/src/publicTypes';
|
|
12
2
|
import { type ResolveScope } from './scope';
|
|
13
3
|
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
4
|
export declare const evaluateReportCondition: (group: ReportConditionGroup | undefined, scope: ResolveScope) => boolean;
|
|
@@ -1,46 +1,7 @@
|
|
|
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
1
|
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
2
|
export declare const BAND_PART_SEPARATOR = "/";
|
|
32
3
|
export declare const TABLE_HEADER_SUFFIX = ":header";
|
|
33
4
|
export declare const TABLE_FOOTER_SUFFIX = ":footer";
|
|
34
5
|
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
6
|
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
7
|
export declare const REPORT_AGGREGATES: readonly ["sum", "count", "avg", "min", "max", "first", "last", "distinct"];
|
|
@@ -1,21 +1,10 @@
|
|
|
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
1
|
import type { TableData } from '../../../published/dcs-ui/src/publicTypes';
|
|
10
2
|
import type { GroupScope, ResolveScope } from './scope';
|
|
11
3
|
export type Row = Record<string, unknown>;
|
|
12
|
-
/** One printed row of a table, with the values it gathered when the table groups. */
|
|
13
4
|
export interface TableRow {
|
|
14
5
|
values: Row;
|
|
15
|
-
/** In display order. Present only when the table groups. */
|
|
16
6
|
groups?: GroupScope[];
|
|
17
7
|
}
|
|
18
|
-
/** A distinct group value across the whole table — one generated column. */
|
|
19
8
|
export interface GroupKey {
|
|
20
9
|
key: string;
|
|
21
10
|
label: string;
|
|
@@ -24,26 +13,11 @@ export interface GroupKey {
|
|
|
24
13
|
}
|
|
25
14
|
export interface BuiltTableRows {
|
|
26
15
|
rows: TableRow[];
|
|
27
|
-
/** Every group value any row gathered, in display order. Empty when the table does not group. */
|
|
28
16
|
groupKeys: GroupKey[];
|
|
29
17
|
}
|
|
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
18
|
export declare const buildTableRows: (data: TableData, rowSets: Record<string, Row[]> | undefined, scope: ResolveScope) => BuiltTableRows;
|
|
39
19
|
export interface TableSection {
|
|
40
|
-
/** The raw value the section is keyed on. */
|
|
41
20
|
key: unknown;
|
|
42
21
|
rows: TableRow[];
|
|
43
22
|
}
|
|
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
23
|
export declare const buildSections: (rows: TableRow[], by: string, sort?: "asc" | "desc") => TableSection[];
|
|
@@ -1,78 +1,36 @@
|
|
|
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
1
|
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
2
|
export declare const newBandId: (t: ReportTemplate) => string;
|
|
19
3
|
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
4
|
export declare const makeBand: (template: ReportTemplate, kind: BandKind) => Band;
|
|
22
5
|
export declare const addBand: (t: ReportTemplate, kind: BandKind, atIndex?: number) => ReportTemplate;
|
|
23
6
|
export declare const removeBand: (t: ReportTemplate, bandId: string) => ReportTemplate;
|
|
24
7
|
export declare const moveBand: (t: ReportTemplate, bandId: string, toIndex: number) => ReportTemplate;
|
|
25
8
|
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
9
|
export declare const duplicateBand: (t: ReportTemplate, bandId: string) => ReportTemplate;
|
|
28
10
|
export declare const addBlock: (t: ReportTemplate, bandId: string, block: Omit<Block, "id">, atIndex?: number) => ReportTemplate;
|
|
29
11
|
export declare const removeBlock: (t: ReportTemplate, bandId: string, blockId: string) => ReportTemplate;
|
|
30
12
|
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
13
|
export declare const moveBlockToBand: (t: ReportTemplate, fromBandId: string, blockId: string, toBandId: string, atIndex?: number) => ReportTemplate;
|
|
33
14
|
export declare const updateBlock: (t: ReportTemplate, bandId: string, blockId: string, patch: Record<string, unknown>) => ReportTemplate;
|
|
34
15
|
export declare const addTextRow: (t: ReportTemplate, bandId: string, blockId: string, atIndex?: number) => ReportTemplate;
|
|
35
16
|
export declare const removeTextRow: (t: ReportTemplate, bandId: string, blockId: string, rowId: string) => ReportTemplate;
|
|
36
17
|
export declare const moveTextRow: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, toIndex: number) => ReportTemplate;
|
|
37
18
|
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
19
|
export declare const addTextCell: (t: ReportTemplate, bandId: string, blockId: string, rowId: string) => ReportTemplate;
|
|
46
20
|
export declare const removeTextCell: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string) => ReportTemplate;
|
|
47
21
|
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
22
|
export declare const addLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, content?: string) => ReportTemplate;
|
|
50
23
|
export declare const removeLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, segmentId: string) => ReportTemplate;
|
|
51
24
|
export declare const moveLine: (t: ReportTemplate, bandId: string, blockId: string, rowId: string, cellId: string, segmentId: string, toIndex: number) => ReportTemplate;
|
|
52
25
|
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
26
|
export declare const makeTableBlock: (registry: ReportRegistry, rowSetKey: string, columnCount?: number) => Omit<TableBlock, "id">;
|
|
59
27
|
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
28
|
export declare const setTableData: (t: ReportTemplate, bandId: string, blockId: string, patch: Partial<TableData>, registry?: ReportRegistry) => ReportTemplate;
|
|
66
29
|
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
30
|
export declare const removeColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string) => ReportTemplate;
|
|
72
31
|
export declare const moveColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, toIndex: number) => ReportTemplate;
|
|
73
32
|
export declare const updateColumn: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, patch: Partial<Omit<ColumnSpec, "id">>) => ReportTemplate;
|
|
74
33
|
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
34
|
export declare const addCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, line?: Partial<Omit<CellLine, "id">>, atIndex?: number) => ReportTemplate;
|
|
77
35
|
export declare const updateCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, lineId: string, patch: Partial<Omit<CellLine, "id">>) => ReportTemplate;
|
|
78
36
|
export declare const removeCellLine: (t: ReportTemplate, bandId: string, blockId: string, columnId: string, lineId: string) => ReportTemplate;
|
|
@@ -80,9 +38,7 @@ export declare const moveCellLine: (t: ReportTemplate, bandId: string, blockId:
|
|
|
80
38
|
export declare const addHeaderGroup: (t: ReportTemplate, bandId: string, blockId: string, group: Omit<HeaderGroup, "id">) => ReportTemplate;
|
|
81
39
|
export declare const updateHeaderGroup: (t: ReportTemplate, bandId: string, blockId: string, groupId: string, patch: Partial<Omit<HeaderGroup, "id">>) => ReportTemplate;
|
|
82
40
|
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
41
|
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
42
|
export type AlignedRowsTarget = 'footer' | 'sectionHeader' | 'sectionFooter';
|
|
87
43
|
export declare const addAlignedRow: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, atIndex?: number) => ReportTemplate;
|
|
88
44
|
export declare const updateAlignedRow: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, patch: Partial<Omit<AlignedRow, "id" | "cells">>) => ReportTemplate;
|
|
@@ -95,7 +51,6 @@ export declare const addAlignedCell: (t: ReportTemplate, bandId: string, blockId
|
|
|
95
51
|
}) => ReportTemplate;
|
|
96
52
|
export declare const updateAlignedCell: (t: ReportTemplate, bandId: string, blockId: string, target: AlignedRowsTarget, rowId: string, cellId: string, patch: Partial<Omit<AlignedCell, "id">>) => ReportTemplate;
|
|
97
53
|
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
54
|
export type ConditionTarget = {
|
|
100
55
|
kind: 'band';
|
|
101
56
|
bandId: string;
|
|
@@ -149,15 +104,11 @@ export type ConditionTarget = {
|
|
|
149
104
|
} | {
|
|
150
105
|
kind: 'watermark';
|
|
151
106
|
};
|
|
152
|
-
/** Sets, or with `null` removes, the condition on one thing. */
|
|
153
107
|
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
108
|
export declare const getCondition: (t: ReportTemplate, target: ConditionTarget) => ReportConditionGroup | undefined;
|
|
156
109
|
export declare const setPage: (t: ReportTemplate, patch: Partial<Omit<ReportTemplate["page"], "watermark">>) => ReportTemplate;
|
|
157
|
-
/** Merges into the watermark, creating it; `null` removes it. */
|
|
158
110
|
export declare const setWatermark: (t: ReportTemplate, patch: Partial<Watermark> | null) => ReportTemplate;
|
|
159
111
|
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
112
|
export declare const updateOption: (t: ReportTemplate, key: string, patch: Partial<TemplateOption>) => ReportTemplate;
|
|
162
113
|
export declare const removeOption: (t: ReportTemplate, key: string) => ReportTemplate;
|
|
163
114
|
export declare const moveOption: (t: ReportTemplate, key: string, toIndex: number) => ReportTemplate;
|
|
@@ -165,22 +116,9 @@ export interface TemplateHistory {
|
|
|
165
116
|
past: ReportTemplate[];
|
|
166
117
|
present: ReportTemplate;
|
|
167
118
|
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
119
|
lastKey?: string;
|
|
173
120
|
}
|
|
174
121
|
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
122
|
export declare const applyTemplateEdit: (history: TemplateHistory, edit: (template: ReportTemplate) => ReportTemplate, coalesceKey?: string) => TemplateHistory;
|
|
185
123
|
export declare const canUndo: (h: TemplateHistory) => boolean;
|
|
186
124
|
export declare const canRedo: (h: TemplateHistory) => boolean;
|
|
@@ -1,80 +1,29 @@
|
|
|
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
1
|
import type { FieldType, ReportRegistry, TableBlock, TemplateOption } from '../../../published/dcs-ui/src/publicTypes';
|
|
12
2
|
export type FieldScope = 'source' | 'row' | 'group' | 'page' | 'computed' | 'option' | 'aggregate';
|
|
13
3
|
export interface FieldOption {
|
|
14
|
-
/** Exactly what to put into the template: `%party.name%`. */
|
|
15
4
|
insert: string;
|
|
16
|
-
/** The path inside it: `party.name`. */
|
|
17
5
|
path: string;
|
|
18
6
|
label: string;
|
|
19
|
-
/** Heading to file it under in a picker. */
|
|
20
7
|
group: string;
|
|
21
8
|
type: FieldType;
|
|
22
9
|
scope: FieldScope;
|
|
23
|
-
/** Shown as a hint where the plain label would be ambiguous. */
|
|
24
10
|
description?: string;
|
|
25
11
|
}
|
|
26
|
-
/** What an aggregate may cover: the rows in scope, one group value's rows, or a whole row set. */
|
|
27
12
|
export type AggregateOver = 'row' | 'group' | 'rowSets';
|
|
28
13
|
export interface FieldCatalogueOptions {
|
|
29
|
-
/** The table's row set: `%row.*%` and `%group.*%` fields, and the formats behind them. */
|
|
30
14
|
rowSet?: string;
|
|
31
|
-
/** Offer `%row.*%`. */
|
|
32
15
|
rowsInScope?: boolean;
|
|
33
|
-
/** Offer `%group.*%`. Only inside a table that groups. */
|
|
34
16
|
groupsInScope?: boolean;
|
|
35
|
-
/** The lookup row set naming group values, for `%group.lookup.*%`. */
|
|
36
17
|
lookupRowSet?: string;
|
|
37
|
-
/** Which aggregates to offer. Empty or absent offers none. */
|
|
38
18
|
aggregatesOver?: AggregateOver[];
|
|
39
|
-
/** Offer `%page.*%`. Only in a page header or footer. */
|
|
40
19
|
pageInScope?: boolean;
|
|
41
|
-
/** The template's print options, offered as `%option.*%`. */
|
|
42
20
|
templateOptions?: TemplateOption[];
|
|
43
21
|
}
|
|
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
22
|
export declare const listFields: (registry: ReportRegistry, options?: FieldCatalogueOptions) => FieldOption[];
|
|
50
|
-
/** Grouped for a picker with headings, preserving the order `listFields` chose. */
|
|
51
23
|
export declare const groupFields: (fields: FieldOption[]) => Array<{
|
|
52
24
|
group: string;
|
|
53
25
|
fields: FieldOption[];
|
|
54
26
|
}>;
|
|
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
27
|
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
28
|
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
29
|
export declare const scopeFor: (place: FieldPlace, table?: Pick<TableBlock, "data">, templateOptions?: TemplateOption[]) => FieldCatalogueOptions;
|
|
@@ -1,27 +1,5 @@
|
|
|
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
1
|
import type { DateFormat, NumberFormat, PlaceholderFormat } from '../../../published/dcs-ui/src/publicTypes';
|
|
8
2
|
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
3
|
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
4
|
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
5
|
export declare const applyTextCase: (text: string, textCase?: "upper" | "lower" | "title") => string;
|