@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.
Files changed (283) hide show
  1. package/README.md +31 -0
  2. package/dist/ChartImageMenu-gvNAYVkY.js +2938 -0
  3. package/dist/Charts-COljjy0x.js +1759 -0
  4. package/dist/SummaryChart-D4jcOv-K.js +31 -0
  5. package/dist/SummaryImage-BSbatHym.js +19 -0
  6. package/dist/SummarySeeAll-vnaL3pdy.js +97 -0
  7. package/dist/defaults-BbLB8QmD.js +709 -0
  8. package/dist/exportContext-CAX8VPrP.js +243 -0
  9. package/dist/exportEngine-C4n1MiOw.js +891 -0
  10. package/dist/fuseSearch-vLQR3O5a.js +37 -0
  11. package/dist/index.js +19289 -9411
  12. package/dist/style.css +1 -1
  13. package/dist/summaryChartData-CU_W5ocv.js +82 -0
  14. package/dist/types/published/dcs-ui/src/index.d.ts +0 -28
  15. package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -33
  16. package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -12
  17. package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -21
  18. package/dist/types/shared-logic/src/report/canvas.d.ts +0 -55
  19. package/dist/types/shared-logic/src/report/conditions.d.ts +0 -14
  20. package/dist/types/shared-logic/src/report/constants.d.ts +0 -39
  21. package/dist/types/shared-logic/src/report/dataset.d.ts +0 -26
  22. package/dist/types/shared-logic/src/report/edit.d.ts +0 -62
  23. package/dist/types/shared-logic/src/report/fields.d.ts +0 -51
  24. package/dist/types/shared-logic/src/report/format.d.ts +0 -22
  25. package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -30
  26. package/dist/types/shared-logic/src/report/layout.d.ts +1 -55
  27. package/dist/types/shared-logic/src/report/metrics.d.ts +0 -45
  28. package/dist/types/shared-logic/src/report/migrate.d.ts +0 -60
  29. package/dist/types/shared-logic/src/report/paginate.d.ts +0 -32
  30. package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -21
  31. package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -27
  32. package/dist/types/shared-logic/src/report/resolve.d.ts +0 -29
  33. package/dist/types/shared-logic/src/report/scope.d.ts +0 -28
  34. package/dist/types/shared-logic/src/report/storage.d.ts +0 -76
  35. package/dist/types/shared-logic/src/report/validate.d.ts +0 -18
  36. package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -35
  37. package/dist/types/shared-logic/src/ui/chipinput.logic.d.ts +0 -12
  38. package/dist/types/shared-logic/src/ui/collapsible.logic.d.ts +0 -7
  39. package/dist/types/shared-logic/src/ui/colorScheme.d.ts +0 -14
  40. package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -11
  41. package/dist/types/shared-logic/src/ui/datePicker.logic.d.ts +136 -0
  42. package/dist/types/shared-logic/src/ui/editableTable.logic.d.ts +0 -27
  43. package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +2 -14
  44. package/dist/types/shared-logic/src/ui/form.logic.d.ts +0 -8
  45. package/dist/types/shared-logic/src/ui/index.d.ts +3 -29
  46. package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -60
  47. package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -24
  48. package/dist/types/shared-logic/src/ui/popover.logic.d.ts +22 -20
  49. package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -35
  50. package/dist/types/shared-logic/src/ui/quickAddGrid.logic.d.ts +183 -0
  51. package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -14
  52. package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -34
  53. package/dist/types/shared-logic/src/ui/tableSummary.logic.d.ts +0 -19
  54. package/dist/types/shared-logic/src/ui/timeField.logic.d.ts +26 -0
  55. package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -24
  56. package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -8
  57. package/dist/types/shared-types/src/report/bands.d.ts +0 -20
  58. package/dist/types/shared-types/src/report/blocks.d.ts +0 -59
  59. package/dist/types/shared-types/src/report/conditions.d.ts +0 -13
  60. package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
  61. package/dist/types/shared-types/src/report/document.d.ts +0 -80
  62. package/dist/types/shared-types/src/report/primitives.d.ts +0 -40
  63. package/dist/types/shared-types/src/report/registry.d.ts +0 -46
  64. package/dist/types/shared-types/src/report/storage.d.ts +0 -31
  65. package/dist/types/shared-types/src/report/template.d.ts +0 -60
  66. package/dist/types/shared-types/src/ui/button.types.d.ts +0 -11
  67. package/dist/types/shared-types/src/ui/checkbox.types.d.ts +0 -4
  68. package/dist/types/shared-types/src/ui/chipinput.types.d.ts +0 -10
  69. package/dist/types/shared-types/src/ui/collapsible.types.d.ts +0 -18
  70. package/dist/types/shared-types/src/ui/common.types.d.ts +0 -11
  71. package/dist/types/shared-types/src/ui/control.types.d.ts +0 -97
  72. package/dist/types/shared-types/src/ui/datePicker.types.d.ts +46 -0
  73. package/dist/types/shared-types/src/ui/editableTable.types.d.ts +0 -79
  74. package/dist/types/shared-types/src/ui/field.types.d.ts +4 -124
  75. package/dist/types/shared-types/src/ui/fieldWrapper.types.d.ts +0 -10
  76. package/dist/types/shared-types/src/ui/fields.types.d.ts +0 -45
  77. package/dist/types/shared-types/src/ui/form.types.d.ts +0 -30
  78. package/dist/types/shared-types/src/ui/index.d.ts +1 -16
  79. package/dist/types/shared-types/src/ui/input.types.d.ts +0 -4
  80. package/dist/types/shared-types/src/ui/keyboard.types.d.ts +2 -109
  81. package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -22
  82. package/dist/types/shared-types/src/ui/radio.types.d.ts +0 -6
  83. package/dist/types/shared-types/src/ui/select.types.d.ts +0 -41
  84. package/dist/types/shared-types/src/ui/suggest.types.d.ts +0 -10
  85. package/dist/types/shared-types/src/ui/switch.types.d.ts +0 -4
  86. package/dist/types/shared-types/src/ui/table.types.d.ts +0 -59
  87. package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -25
  88. package/dist/types/shared-types/src/ui/typography.types.d.ts +0 -4
  89. package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -9
  90. package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -19
  91. package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -14
  92. package/dist/types/shared-web-ui/src/Badge/Badge.d.ts +0 -11
  93. package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -52
  94. package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -16
  95. package/dist/types/shared-web-ui/src/Charts/AnchoredMenu.d.ts +17 -0
  96. package/dist/types/shared-web-ui/src/Charts/BarList.d.ts +12 -0
  97. package/dist/types/shared-web-ui/src/Charts/CalendarHeatmap.d.ts +17 -0
  98. package/dist/types/shared-web-ui/src/Charts/Chart.d.ts +20 -0
  99. package/dist/types/shared-web-ui/src/Charts/ChartIcon.d.ts +5 -0
  100. package/dist/types/shared-web-ui/src/Charts/ChartImageMenu.d.ts +4 -0
  101. package/dist/types/shared-web-ui/src/Charts/ChartTable.d.ts +8 -0
  102. package/dist/types/shared-web-ui/src/Charts/ChartTooltip.d.ts +44 -0
  103. package/dist/types/shared-web-ui/src/Charts/ChartView.d.ts +15 -0
  104. package/dist/types/shared-web-ui/src/Charts/ColumnChart.d.ts +15 -0
  105. package/dist/types/shared-web-ui/src/Charts/Donut.d.ts +14 -0
  106. package/dist/types/shared-web-ui/src/Charts/Funnel.d.ts +10 -0
  107. package/dist/types/shared-web-ui/src/Charts/Gauge.d.ts +15 -0
  108. package/dist/types/shared-web-ui/src/Charts/Legend.d.ts +6 -0
  109. package/dist/types/shared-web-ui/src/Charts/LineChart.d.ts +13 -0
  110. package/dist/types/shared-web-ui/src/Charts/NumberTrend.d.ts +21 -0
  111. package/dist/types/shared-web-ui/src/Charts/Progress.d.ts +12 -0
  112. package/dist/types/shared-web-ui/src/Charts/StackedBar.d.ts +11 -0
  113. package/dist/types/shared-web-ui/src/Charts/Treemap.d.ts +12 -0
  114. package/dist/types/shared-web-ui/src/Charts/chartData.d.ts +69 -0
  115. package/dist/types/shared-web-ui/src/Charts/chartImage.d.ts +121 -0
  116. package/dist/types/shared-web-ui/src/Charts/geometry.d.ts +178 -0
  117. package/dist/types/shared-web-ui/src/Charts/index.d.ts +32 -0
  118. package/dist/types/shared-web-ui/src/Charts/labels.d.ts +46 -0
  119. package/dist/types/shared-web-ui/src/Charts/menuPlacement.d.ts +25 -0
  120. package/dist/types/shared-web-ui/src/Charts/palette.d.ts +81 -0
  121. package/dist/types/shared-web-ui/src/Charts/parts.d.ts +24 -0
  122. package/dist/types/shared-web-ui/src/Charts/pointer.d.ts +41 -0
  123. package/dist/types/shared-web-ui/src/Charts/types.d.ts +51 -0
  124. package/dist/types/shared-web-ui/src/Charts/ui.d.ts +3 -0
  125. package/dist/types/shared-web-ui/src/Charts/useBoxSize.d.ts +6 -0
  126. package/dist/types/shared-web-ui/src/Charts/useLegendFit.d.ts +1 -0
  127. package/dist/types/shared-web-ui/src/Collapsible/CollapsibleItem.d.ts +0 -2
  128. package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -15
  129. package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -27
  130. package/dist/types/shared-web-ui/src/DataTable/DataTable.d.ts +16 -0
  131. package/dist/types/shared-web-ui/src/DataTable/DisplayPopover.d.ts +22 -0
  132. package/dist/types/shared-web-ui/src/DataTable/HeaderMenu.d.ts +31 -0
  133. package/dist/types/shared-web-ui/src/DataTable/ManageModal.d.ts +31 -0
  134. package/dist/types/shared-web-ui/src/DataTable/SingleRowView.d.ts +9 -0
  135. package/dist/types/shared-web-ui/src/DataTable/SortModal.d.ts +16 -0
  136. package/dist/types/shared-web-ui/src/DataTable/StatusRow.d.ts +49 -0
  137. package/dist/types/shared-web-ui/src/DataTable/TableColumnModal.d.ts +18 -0
  138. package/dist/types/shared-web-ui/src/DataTable/TableControls.d.ts +48 -0
  139. package/dist/types/shared-web-ui/src/DataTable/TablePagination.d.ts +38 -0
  140. package/dist/types/shared-web-ui/src/DataTable/TableScrollStrip.d.ts +2 -0
  141. package/dist/types/shared-web-ui/src/DataTable/TableToolbar.d.ts +69 -0
  142. package/dist/types/shared-web-ui/src/DataTable/TableView.d.ts +61 -0
  143. package/dist/types/shared-web-ui/src/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
  144. package/dist/types/shared-web-ui/src/DataTable/bulk/TableToast.d.ts +13 -0
  145. package/dist/types/shared-web-ui/src/DataTable/bulk/bulkActions.d.ts +23 -0
  146. package/dist/types/shared-web-ui/src/DataTable/cards/CardFieldsEditor.d.ts +16 -0
  147. package/dist/types/shared-web-ui/src/DataTable/cards/CardView.d.ts +50 -0
  148. package/dist/types/shared-web-ui/src/DataTable/cards/cardFields.d.ts +32 -0
  149. package/dist/types/shared-web-ui/src/DataTable/cards/rowParts.d.ts +38 -0
  150. package/dist/types/shared-web-ui/src/DataTable/data/useServerData.d.ts +28 -0
  151. package/dist/types/shared-web-ui/src/DataTable/defaults.d.ts +18 -0
  152. package/dist/types/shared-web-ui/src/DataTable/detail/BuiltInDetail.d.ts +10 -0
  153. package/dist/types/shared-web-ui/src/DataTable/detail/DetailHost.d.ts +13 -0
  154. package/dist/types/shared-web-ui/src/DataTable/export/ExportPopover.d.ts +18 -0
  155. package/dist/types/shared-web-ui/src/DataTable/export/ExportPreviewModal.d.ts +11 -0
  156. package/dist/types/shared-web-ui/src/DataTable/export/ExportSettingsModal.d.ts +31 -0
  157. package/dist/types/shared-web-ui/src/DataTable/export/ExportTemplateCards.d.ts +19 -0
  158. package/dist/types/shared-web-ui/src/DataTable/export/exportContext.d.ts +10 -0
  159. package/dist/types/shared-web-ui/src/DataTable/export/exportEngine.d.ts +77 -0
  160. package/dist/types/shared-web-ui/src/DataTable/export/exportRows.d.ts +10 -0
  161. package/dist/types/shared-web-ui/src/DataTable/export/templateDisplay.d.ts +7 -0
  162. package/dist/types/shared-web-ui/src/DataTable/export/templateOptions.d.ts +6 -0
  163. package/dist/types/shared-web-ui/src/DataTable/export/useTableExport.d.ts +53 -0
  164. package/dist/types/shared-web-ui/src/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
  165. package/dist/types/shared-web-ui/src/DataTable/filters/FilterConditionRow.d.ts +11 -0
  166. package/dist/types/shared-web-ui/src/DataTable/filters/FilterGroup.d.ts +12 -0
  167. package/dist/types/shared-web-ui/src/DataTable/filters/FilterModal.d.ts +14 -0
  168. package/dist/types/shared-web-ui/src/DataTable/filters/FilterRow.d.ts +20 -0
  169. package/dist/types/shared-web-ui/src/DataTable/filters/columnFilterModel.d.ts +29 -0
  170. package/dist/types/shared-web-ui/src/DataTable/filters/filterEngine.d.ts +16 -0
  171. package/dist/types/shared-web-ui/src/DataTable/filters/filterRowModel.d.ts +28 -0
  172. package/dist/types/shared-web-ui/src/DataTable/filters/quickFilterMatch.d.ts +3 -0
  173. package/dist/types/shared-web-ui/src/DataTable/grouping/GroupUi.d.ts +36 -0
  174. package/dist/types/shared-web-ui/src/DataTable/grouping/groupModel.d.ts +82 -0
  175. package/dist/types/shared-web-ui/src/DataTable/grouping/useGrouping.d.ts +39 -0
  176. package/dist/types/shared-web-ui/src/DataTable/host.d.ts +14 -0
  177. package/dist/types/shared-web-ui/src/DataTable/index.d.ts +18 -0
  178. package/dist/types/shared-web-ui/src/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
  179. package/dist/types/shared-web-ui/src/DataTable/keyboard/shortcuts.d.ts +22 -0
  180. package/dist/types/shared-web-ui/src/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
  181. package/dist/types/shared-web-ui/src/DataTable/labels.d.ts +618 -0
  182. package/dist/types/shared-web-ui/src/DataTable/layout/LayoutSwitcher.d.ts +9 -0
  183. package/dist/types/shared-web-ui/src/DataTable/layout/layouts.d.ts +20 -0
  184. package/dist/types/shared-web-ui/src/DataTable/layout/scrollArea.d.ts +2 -0
  185. package/dist/types/shared-web-ui/src/DataTable/layout/useFillHeight.d.ts +11 -0
  186. package/dist/types/shared-web-ui/src/DataTable/menu/RowMenu.d.ts +56 -0
  187. package/dist/types/shared-web-ui/src/DataTable/menu/buildRowMenu.d.ts +35 -0
  188. package/dist/types/shared-web-ui/src/DataTable/menu/clipboard.d.ts +4 -0
  189. package/dist/types/shared-web-ui/src/DataTable/menu/valueFilter.d.ts +15 -0
  190. package/dist/types/shared-web-ui/src/DataTable/motion/useRowMotion.d.ts +32 -0
  191. package/dist/types/shared-web-ui/src/DataTable/persistence/adapters.d.ts +6 -0
  192. package/dist/types/shared-web-ui/src/DataTable/persistence/reconcile.d.ts +64 -0
  193. package/dist/types/shared-web-ui/src/DataTable/persistence/useColumnPersistence.d.ts +51 -0
  194. package/dist/types/shared-web-ui/src/DataTable/persistence/useManagePrefs.d.ts +23 -0
  195. package/dist/types/shared-web-ui/src/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
  196. package/dist/types/shared-web-ui/src/DataTable/pinning.d.ts +10 -0
  197. package/dist/types/shared-web-ui/src/DataTable/rows/RowActions.d.ts +15 -0
  198. package/dist/types/shared-web-ui/src/DataTable/rows/rowPress.d.ts +35 -0
  199. package/dist/types/shared-web-ui/src/DataTable/sharing/Sharing.d.ts +21 -0
  200. package/dist/types/shared-web-ui/src/DataTable/split/SplitView.d.ts +29 -0
  201. package/dist/types/shared-web-ui/src/DataTable/summary/ManageSummaryCards.d.ts +18 -0
  202. package/dist/types/shared-web-ui/src/DataTable/summary/SummaryChart.d.ts +11 -0
  203. package/dist/types/shared-web-ui/src/DataTable/summary/SummaryControls.d.ts +33 -0
  204. package/dist/types/shared-web-ui/src/DataTable/summary/SummaryImage.d.ts +12 -0
  205. package/dist/types/shared-web-ui/src/DataTable/summary/SummarySeeAll.d.ts +17 -0
  206. package/dist/types/shared-web-ui/src/DataTable/summary/TableSummary.d.ts +34 -0
  207. package/dist/types/shared-web-ui/src/DataTable/summary/summaryCatalogue.d.ts +64 -0
  208. package/dist/types/shared-web-ui/src/DataTable/summary/summaryChartData.d.ts +9 -0
  209. package/dist/types/shared-web-ui/src/DataTable/summary/summaryModel.d.ts +152 -0
  210. package/dist/types/shared-web-ui/src/DataTable/summary/summaryWidth.d.ts +22 -0
  211. package/dist/types/shared-web-ui/src/DataTable/summary/useTableSummary.d.ts +18 -0
  212. package/dist/types/shared-web-ui/src/DataTable/types.d.ts +1145 -0
  213. package/dist/types/shared-web-ui/src/DataTable/ui-local/AutoHeight.d.ts +9 -0
  214. package/dist/types/shared-web-ui/src/DataTable/ui-local/DateRangePicker.d.ts +16 -0
  215. package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
  216. package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
  217. package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
  218. package/dist/types/shared-web-ui/src/DataTable/ui-local/ReactModal.d.ts +20 -0
  219. package/dist/types/shared-web-ui/src/DataTable/ui.d.ts +13 -0
  220. package/dist/types/shared-web-ui/src/DataTable/useDataChangeTracker.d.ts +11 -0
  221. package/dist/types/shared-web-ui/src/DataTable/useTable.d.ts +12 -0
  222. package/dist/types/shared-web-ui/src/DataTable/vendor/columnOrder.d.ts +1 -0
  223. package/dist/types/shared-web-ui/src/DataTable/vendor/diff.d.ts +5 -0
  224. package/dist/types/shared-web-ui/src/DataTable/vendor/fileActions.d.ts +19 -0
  225. package/dist/types/shared-web-ui/src/DataTable/vendor/index.d.ts +3 -0
  226. package/dist/types/shared-web-ui/src/DataTable/virtual/useVirtualLines.d.ts +27 -0
  227. package/dist/types/shared-web-ui/src/DatePicker/Calendar.d.ts +14 -0
  228. package/dist/types/shared-web-ui/src/DatePicker/DatePicker.d.ts +5 -0
  229. package/dist/types/shared-web-ui/src/DatePicker/TimeField.d.ts +16 -0
  230. package/dist/types/shared-web-ui/src/DatePicker/index.d.ts +4 -0
  231. package/dist/types/shared-web-ui/src/DatePicker/useOneMonthPane.d.ts +2 -0
  232. package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -45
  233. package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -36
  234. package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +24 -24
  235. package/dist/types/shared-web-ui/src/EditableTable/EditableTable.d.ts +0 -5
  236. package/dist/types/shared-web-ui/src/EditableTable/EditableTableCell.d.ts +0 -18
  237. package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -11
  238. package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -11
  239. package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -32
  240. package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -15
  241. package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -9
  242. package/dist/types/shared-web-ui/src/FieldContext/useField.d.ts +0 -27
  243. package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -23
  244. package/dist/types/shared-web-ui/src/FieldContext/useFormKeyboard.d.ts +0 -3
  245. package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -15
  246. package/dist/types/shared-web-ui/src/Floating/index.d.ts +3 -0
  247. package/dist/types/shared-web-ui/src/Floating/layers.d.ts +4 -0
  248. package/dist/types/shared-web-ui/src/Floating/scrollLock.d.ts +2 -0
  249. package/dist/types/shared-web-ui/src/Floating/useFloatingLayer.d.ts +20 -0
  250. package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +6 -25
  251. package/dist/types/shared-web-ui/src/Popover/floatingPosition.d.ts +17 -0
  252. package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -8
  253. package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -11
  254. package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -2
  255. package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -13
  256. package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
  257. package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -22
  258. package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -8
  259. package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -1
  260. package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -12
  261. package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -30
  262. package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -39
  263. package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -24
  264. package/dist/types/shared-web-ui/src/Scroll/ScrollRule.d.ts +2 -0
  265. package/dist/types/shared-web-ui/src/Scroll/ScrollStrip.d.ts +9 -0
  266. package/dist/types/shared-web-ui/src/Scroll/index.d.ts +4 -0
  267. package/dist/types/shared-web-ui/src/Scroll/labels.d.ts +5 -0
  268. package/dist/types/shared-web-ui/src/Scroll/scrollActivity.d.ts +14 -0
  269. package/dist/types/shared-web-ui/src/Scroll/ui.d.ts +1 -0
  270. package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -31
  271. package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -15
  272. package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -43
  273. package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -14
  274. package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -9
  275. package/dist/types/shared-web-ui/src/Toast/toast.types.d.ts +0 -13
  276. package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -16
  277. package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -9
  278. package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -14
  279. package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -41
  280. package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -8
  281. package/dist/types/shared-web-ui/src/index.d.ts +5 -0
  282. package/dist/ui-DJFwpPdX.js +4997 -0
  283. package/package.json +9 -7
@@ -0,0 +1,183 @@
1
+ export type QuickAddAxisMode = 'variant' | 'reference';
2
+ export interface QuickAddAxis {
3
+ key: string;
4
+ mode: QuickAddAxisMode;
5
+ }
6
+ export type QuickAddHeaderBehavior = 'none' | 'copy' | 'split' | 'dependentSplit';
7
+ export type QuickAddCellFormula = {
8
+ op: 'value';
9
+ key: string;
10
+ } | {
11
+ op: 'number';
12
+ value: number;
13
+ } | {
14
+ op: 'add';
15
+ args: QuickAddCellFormula[];
16
+ } | {
17
+ op: 'mul';
18
+ args: QuickAddCellFormula[];
19
+ };
20
+ export type QuickAddTotalRule = {
21
+ mode: 'off';
22
+ } | {
23
+ mode: 'sum';
24
+ formula?: QuickAddCellFormula;
25
+ };
26
+ export interface QuickAddFieldSpec {
27
+ key: string;
28
+ numeric?: boolean;
29
+ decimalScale?: number;
30
+ defaultValue?: unknown;
31
+ isSubmitKey?: boolean;
32
+ onHeader?: QuickAddHeaderBehavior;
33
+ dependsOn?: string;
34
+ totalRule?: QuickAddTotalRule;
35
+ }
36
+ export type QuickAddCombo = Record<string, string>;
37
+ export type QuickAddCell = Record<string, unknown>;
38
+ export type QuickAddCells = Record<string, QuickAddCell>;
39
+ export declare function buildQuickAddSpecs(config: {
40
+ axes?: string[];
41
+ refaxes?: string[];
42
+ fields?: string[];
43
+ split?: string[];
44
+ fieldMeta?: Record<string, {
45
+ decimalScale?: number;
46
+ isSubmitKey?: boolean;
47
+ editable?: boolean;
48
+ totalRule?: QuickAddTotalRule;
49
+ }>;
50
+ }): {
51
+ axes: QuickAddAxis[];
52
+ fields: QuickAddFieldSpec[];
53
+ };
54
+ export declare function comboKey(axes: QuickAddAxis[], combo: QuickAddCombo): string;
55
+ export declare function variantComboKey(axes: QuickAddAxis[], combo: QuickAddCombo): string;
56
+ export declare function buildVariantKeySet(axes: QuickAddAxis[], variants: Array<Record<string, unknown>>): Set<string>;
57
+ export declare function isComboAvailable(combo: QuickAddCombo, params: {
58
+ axes: QuickAddAxis[];
59
+ variantKeys: Set<string>;
60
+ requireVariantMatch?: boolean;
61
+ }): boolean;
62
+ export declare function resolveVariant<T extends Record<string, unknown>>(combo: QuickAddCombo, params: {
63
+ axes: QuickAddAxis[];
64
+ variants: T[];
65
+ itemid?: string;
66
+ itemKey?: string;
67
+ }): T | undefined;
68
+ export declare function quickAddLayout(axes: QuickAddAxis[]): {
69
+ columnAxis?: QuickAddAxis;
70
+ rowAxis?: QuickAddAxis;
71
+ slicerAxes: QuickAddAxis[];
72
+ };
73
+ export declare function axisValues<T extends {
74
+ value: string;
75
+ }>(params: {
76
+ axis: QuickAddAxis;
77
+ options: T[];
78
+ variants: Array<Record<string, unknown>>;
79
+ emptyOption: T;
80
+ }): T[];
81
+ export declare function orderValues(picked: string[], order: string[]): string[];
82
+ export declare function planQuickEntry(params: {
83
+ axes: QuickAddAxis[];
84
+ picked: Record<string, string | undefined>;
85
+ variantKeys?: Set<string>;
86
+ requireVariantMatch?: boolean;
87
+ }): {
88
+ key: string;
89
+ missingAxes: string[];
90
+ available: boolean;
91
+ };
92
+ export declare function selectionFromRows(params: {
93
+ rows: Array<Record<string, unknown>>;
94
+ axes: QuickAddAxis[];
95
+ isEmpty?: (row: Record<string, unknown>) => boolean;
96
+ }): Record<string, string[]>;
97
+ export declare function singleAnswerAxes<T extends {
98
+ value: string;
99
+ }>(params: {
100
+ axes: QuickAddAxis[];
101
+ valuesByAxis: Record<string, T[] | undefined>;
102
+ }): {
103
+ auto: Record<string, string>;
104
+ preset: Record<string, string>;
105
+ };
106
+ export declare function dropAxisValue(params: {
107
+ cells: QuickAddCells;
108
+ axes: QuickAddAxis[];
109
+ axisKey: string;
110
+ value: string;
111
+ }): QuickAddCells;
112
+ export declare function buildCombos(params: {
113
+ axes: QuickAddAxis[];
114
+ selected: Record<string, string[]>;
115
+ variantKeys?: Set<string>;
116
+ requireVariantMatch?: boolean;
117
+ }): Array<{
118
+ key: string;
119
+ combo: QuickAddCombo;
120
+ }>;
121
+ export declare function buildCellDefaults(fields: QuickAddFieldSpec[]): QuickAddCell;
122
+ export declare function clampScale(scale: unknown): number;
123
+ export declare function roundToScale(value: number, scale: number): number;
124
+ export declare function isNumericField(field: QuickAddFieldSpec): boolean;
125
+ export declare function cellNumber(cell: QuickAddCell | undefined, key: string): number;
126
+ export declare function parseHeaderValue(field: QuickAddFieldSpec, raw: unknown): number | string | null;
127
+ export declare function distributeEvenly(totalUnits: number, count: number): number[];
128
+ export declare function distributeByWeights(totalUnits: number, weights: number[]): number[];
129
+ export declare function applyHeaderValue(params: {
130
+ cells: QuickAddCells;
131
+ targetKeys: string[];
132
+ fields: QuickAddFieldSpec[];
133
+ field: QuickAddFieldSpec;
134
+ rawValue: unknown;
135
+ }): QuickAddCells;
136
+ export declare function evaluateCellFormula(cell: QuickAddCell | undefined, formula: QuickAddCellFormula): number;
137
+ export declare function scopeTotal(cells: QuickAddCells, keys: string[], field: QuickAddFieldSpec): number;
138
+ export type QuickAddDuplicates = 'first' | 'last' | 'merge';
139
+ export declare function prefillCellsFromRows(params: {
140
+ rows: Array<Record<string, unknown>>;
141
+ axes: QuickAddAxis[];
142
+ fields: QuickAddFieldSpec[];
143
+ allowedKeys?: Iterable<string>;
144
+ duplicates?: QuickAddDuplicates;
145
+ rowKeyMap?: Record<string, string>;
146
+ }): QuickAddCells;
147
+ export declare function buildSubmitCombos(params: {
148
+ cells: QuickAddCells;
149
+ axes: QuickAddAxis[];
150
+ fields: QuickAddFieldSpec[];
151
+ keys: string[];
152
+ valueOrder?: Record<string, string[]>;
153
+ }): Array<{
154
+ key: string;
155
+ combo: QuickAddCombo;
156
+ values: Record<string, unknown>;
157
+ }>;
158
+ export type SingleEntryBy = 'item' | 'variant' | 'sku';
159
+ export declare function singleEntryViolations(params: {
160
+ rows: Array<Record<string, unknown>>;
161
+ by: SingleEntryBy;
162
+ itemKey?: string;
163
+ variantKey?: string;
164
+ isBlank?: (row: Record<string, unknown>) => boolean;
165
+ }): number[];
166
+ export declare function planRowUpsert(params: {
167
+ submitted: Array<{
168
+ combo: QuickAddCombo;
169
+ values: Record<string, unknown>;
170
+ }>;
171
+ rows: Array<Record<string, unknown>>;
172
+ axes: QuickAddAxis[];
173
+ }): {
174
+ update: Array<{
175
+ index: number;
176
+ values: Record<string, unknown>;
177
+ }>;
178
+ create: Array<{
179
+ combo: QuickAddCombo;
180
+ values: Record<string, unknown>;
181
+ }>;
182
+ remove: number[];
183
+ };
@@ -10,20 +10,6 @@ export declare function buildSelectClassKeys(opts: SelectClassOpts): string[];
10
10
  export declare function normalizeSelectOptions(options: (string | number | SelectOption)[]): SelectOption[];
11
11
  export declare function sortSelectOptions(options: SelectOption[], sortConfig?: boolean | SortConfig): SelectOption[];
12
12
  export declare function filterSelectOptions(options: SelectOption[], searchTerm: string, searchConfig?: boolean | SearchConfig): SelectOption[];
13
- /**
14
- * Type-ahead for a closed or open Select: the index of the next option whose label
15
- * starts with `query`, searching forward from `fromIndex` and wrapping.
16
- *
17
- * Spec (FIELD_KEYBOARD_NAVIGATION.md §6.4): a printable key on a Select jumps to the
18
- * matching option. An operator entering sizes types `M`, not ↓↓↓. Starting AFTER
19
- * `fromIndex` is what makes a repeated letter cycle — `S`, `S` walks Small → S-Slim.
20
- *
21
- * Case-insensitive, disabled options skipped. Single-character cycling only: a
22
- * multi-key buffer ("me" typed quickly) needs a timer, and a timer-driven buffer is
23
- * exactly what throttles unpredictably in a background tab.
24
- *
25
- * @returns the matching index, or -1 when nothing matches.
26
- */
27
13
  export declare function findTypeaheadIndex(options: Array<{
28
14
  name: string | number;
29
15
  disabled?: boolean;
@@ -1,47 +1,13 @@
1
1
  import type { ColumnAlign, EditableTableColumnDefinition, ResolvedColumnLayout, ResolvedTableLayout } from '../../../published/dcs-ui/src/publicTypes';
2
- /**
3
- * Column layout, decided once and purely.
4
- *
5
- * The client editable table has no layout props at all, so every column in the
6
- * Program table renders at exactly 300px — a 2700px table in a 1542px
7
- * container, Qty as wide as Notes. This resolves each column's frame from its
8
- * props, and where a column names none, from a default for the kind of field it
9
- * holds. **Prop → default**, the same order `size` and `keyboard` resolve in.
10
- */
11
- /** What a column holds, as far as layout is concerned. */
12
2
  export type ColumnWidget = 'suggest' | 'select' | 'number' | 'derivedNumber' | 'date' | 'text' | 'derivedText' | 'toggle' | 'button' | 'other';
13
3
  interface ColumnDefault {
14
- /** Present = fixed width. Absent = flexible, sharing the remaining space. */
15
4
  width?: number;
16
5
  minWidth: number;
17
6
  align: ColumnAlign;
18
7
  }
19
- /**
20
- * The defaults by widget. Tuned against a real production program table's columns:
21
- * an item name needs room to be read, a quantity does not.
22
- */
23
8
  export declare const COLUMN_LAYOUT_DEFAULTS: Readonly<Record<ColumnWidget, ColumnDefault>>;
24
9
  export declare function classifyColumn(column: EditableTableColumnDefinition<any>): ColumnWidget;
25
- /**
26
- * One column's frame.
27
- *
28
- * - An explicit `width` makes the column fixed, and a fixed column's floor IS its
29
- * width — a `minWidth` beside a `width` has nothing left to decide.
30
- * - A **sticky** column is always fixed. Pinned columns stack by offset, and an
31
- * offset can only be exact if every pinned width is known; a flexible pinned
32
- * column would push the next one to the wrong place. Unsized, it pins at its
33
- * floor.
34
- */
35
10
  export declare function resolveColumnLayout(column: EditableTableColumnDefinition<any>): ResolvedColumnLayout;
36
- /**
37
- * Every column's frame, plus the pinned-column offsets and the table's floor.
38
- *
39
- * Pinned columns stay pinned in the order they appear: left-pinned offsets
40
- * accumulate left to right, right-pinned offsets right to left. The innermost
41
- * pinned column on each side is its `stickyEdge`, which is where scrolling
42
- * content passes under and a divider belongs.
43
- */
44
11
  export declare function resolveTableLayout(columns: EditableTableColumnDefinition<any>[]): ResolvedTableLayout;
45
- /** A read-only cell renders text instead of a field — and the keyboard skips it. */
46
12
  export declare function isReadOnlyColumn(column: EditableTableColumnDefinition<any>): boolean;
47
13
  export {};
@@ -1,32 +1,13 @@
1
1
  import type { ColumnSummaryConfig, EditableTableColumnDefinition, ResolvedColumnTotal, ResolvedSummaryEntry, ResolvedSummaryGroup, SummaryAggregation, SummaryContext, SummaryFormat, TableSummaryConfig } from '../../../published/dcs-ui/src/publicTypes';
2
- /**
3
- * Totals and summaries, pure.
4
- *
5
- * A port of the client Table's `useTableSummary`
6
- * (`apps/web/client/src/Utils/CustomElements/Table/summary/useTableSummary.ts`) —
7
- * the same aggregation, the same `en-IN` formatting, the same id scheme for
8
- * column totals, the same "a group key the compute omitted is hidden" rule — so a
9
- * summary configured for a report table computes identically on an editable one.
10
- * Moved out of the hook because it makes no decision that needs React, and here
11
- * it can be asserted directly.
12
- *
13
- * One deliberate difference: the Table lists column totals among its summary
14
- * entries. The editable table renders them in a pinned footer row under their
15
- * columns instead, so they are returned separately — but they are still fed to
16
- * every item's `compute` as `resolved`, under the Table's ids.
17
- */
18
2
  export declare function formatSummaryValue(value: number, format?: SummaryFormat, decimals?: number, prefix?: string, suffix?: string, formatter?: (value: any) => string): string;
19
3
  export declare function aggregateValues(values: number[], type: SummaryAggregation): number;
20
- /** `summable: true` is shorthand for `summary: { type: 'sum' }`; an explicit `summary` wins. */
21
4
  export declare function columnSummaryConfig(column: EditableTableColumnDefinition<any>): ColumnSummaryConfig | undefined;
22
5
  export declare function computeColumnTotals<T>(columns: EditableTableColumnDefinition<T>[], rows: T[]): ResolvedColumnTotal[];
23
6
  export interface ResolvedTableSummary {
24
7
  columnTotals: ResolvedColumnTotal[];
25
- /** Column totals keyed by column name — what a render-form summary and the footer row read. */
26
8
  totalsByColumn: Record<string, number>;
27
9
  entries: ResolvedSummaryEntry[];
28
10
  groups: ResolvedSummaryGroup[];
29
- /** Every resolved value by id — column totals first, then items in order. */
30
11
  resolved: Record<string, number | string>;
31
12
  hasColumnTotals: boolean;
32
13
  hasSummary: boolean;
@@ -0,0 +1,26 @@
1
+ export type TimeOfDay = string;
2
+ export declare const MINUTES_IN_DAY: number;
3
+ export declare function timeToMinutes(time: TimeOfDay): number;
4
+ export declare function minutesToTime(minutes: number): TimeOfDay;
5
+ export declare const isTimeOfDay: (time: unknown) => boolean;
6
+ export declare function to12Hour(hour24: number): {
7
+ h12: number;
8
+ meridiem: 'AM' | 'PM';
9
+ };
10
+ export declare function from12Hour(h12: number, meridiem: 'AM' | 'PM'): number;
11
+ export declare function formatTimeText(time: TimeOfDay, hour12?: boolean): string;
12
+ export declare const timePlaceholder: (hour12?: boolean) => string;
13
+ export declare function parseTimeText(text: string, opts?: {
14
+ within?: TimeOfDay;
15
+ }): TimeOfDay | null;
16
+ export interface TimeColumns {
17
+ hours: number[];
18
+ minutes: number[];
19
+ meridiems: ('AM' | 'PM')[];
20
+ }
21
+ export declare function buildTimeColumns(time: TimeOfDay, opts?: {
22
+ hour12?: boolean;
23
+ minuteStep?: number;
24
+ }): TimeColumns;
25
+ export declare function setTimePart(time: TimeOfDay, part: 'hour' | 'minute' | 'meridiem', value: number | 'AM' | 'PM', hour12?: boolean): TimeOfDay;
26
+ export declare function isTimePartActive(time: TimeOfDay, part: 'hour' | 'minute' | 'meridiem', value: number | 'AM' | 'PM', hour12?: boolean): boolean;
@@ -1,35 +1,11 @@
1
1
  import type { TooltipAnchorTo, TooltipConfig, TooltipPlacement, TooltipPosition, TooltipPositionInput, TooltipProp } from '../../../published/dcs-ui/src/publicTypes';
2
- /**
3
- * A `tooltip` prop is either bare content or a config object. Anything that is
4
- * a React element counts as content — only a plain object carrying `content`
5
- * is treated as configuration.
6
- */
7
2
  export declare function normalizeTooltip(value: TooltipProp | undefined): TooltipConfig | null;
8
3
  export interface TooltipAnchorDecision {
9
4
  anchorTo: TooltipAnchorTo;
10
- /** Keyboard focus has no cursor, so it can never be pointer-anchored. */
11
5
  openedBy: 'pointer' | 'focus';
12
6
  anchorWidth: number;
13
7
  tooltipWidth: number;
14
8
  }
15
- /**
16
- * Whether to place the tooltip at the cursor rather than against the trigger.
17
- *
18
- * The `auto` rule: element-anchoring only reads as "attached to this thing" while
19
- * the trigger is no wider than the tip. Past that — block text, a table row, a
20
- * full-width header — the tip centres on the element and lands far from where the
21
- * pointer actually is, so it follows the pointer instead.
22
- */
23
9
  export declare function shouldAnchorToPointer(decision: TooltipAnchorDecision): boolean;
24
- /** Requested placement first, then its opposite, then the perpendicular pair. */
25
10
  export declare function resolveTooltipPlacementOrder(placement: TooltipPlacement): TooltipPlacement[];
26
- /**
27
- * Viewport-coordinate position for a tooltip, flipping to the first placement
28
- * that fits and then clamping along the cross axis so it never leaves the
29
- * screen. Pure geometry — the caller measures the DOM and applies the result.
30
- *
31
- * Only the fallback path for browsers without CSS anchor positioning uses this;
32
- * where anchor positioning is supported the same behaviour comes from
33
- * `position-try-fallbacks`.
34
- */
35
11
  export declare function computeTooltipPosition(input: TooltipPositionInput): TooltipPosition;
@@ -1,10 +1,2 @@
1
1
  import type { Ref, RefCallback } from 'react';
2
- /**
3
- * Merge several refs into one stable ref callback.
4
- *
5
- * The callback identity never changes, which matters: memoising on the spread
6
- * `refs` array instead produces a new callback on every render, and React
7
- * responds by calling the old callback with `null` and the new one with the
8
- * node — detaching and re-attaching the ref on every single render.
9
- */
10
2
  export declare function useMergeRefs<T>(...refs: (Ref<T> | undefined | null)[]): RefCallback<T>;
@@ -1,32 +1,12 @@
1
- /**
2
- * Report engine — bands, the sections of a page.
3
- *
4
- * Three kinds, and the order of `template.bands` is the print order:
5
- *
6
- * - `pageHeader` — the top of every page.
7
- * - `content` — prints once, where it stands. Tables inside it flow across pages.
8
- * - `pageFooter` — the foot of every page.
9
- *
10
- * v1 also had detail, group and report header/footer bands. They existed to serve the one main
11
- * grid; a table now carries its own rows, sections and closing rows, and "report header" is simply
12
- * the first content band. See `docs/REPORT_ENGINE.md` §14.3.
13
- */
14
1
  import type { Block } from './blocks';
15
2
  import type { ReportConditionGroup } from './conditions';
16
3
  export type BandKind = 'pageHeader' | 'content' | 'pageFooter';
17
4
  export interface Band {
18
5
  id: string;
19
6
  kind: BandKind;
20
- /**
21
- * For `content`: print it on every page, under the page header — the business and buyer block
22
- * that several invoice formats repeat. Ignored for page bands, which repeat by definition.
23
- */
24
7
  repeatOnEveryPage?: boolean;
25
- /** Never split this band across a page break; move it whole to the next page instead. */
26
8
  keepTogether?: boolean;
27
- /** Never end a page with this band: if the band after it moves on, this band moves with it. */
28
9
  keepWithNext?: boolean;
29
- /** Suppress the band entirely when this fails. */
30
10
  condition?: ReportConditionGroup;
31
11
  blocks: Block[];
32
12
  }
@@ -1,11 +1,3 @@
1
- /**
2
- * Report engine — blocks, the things a band is made of.
3
- *
4
- * A table is a block like any other and can go anywhere, as many times as a report needs. There is
5
- * no special "main grid": everything v1 did for it — a heading on every page, a closed box, empty
6
- * rows down the page, closing rows kept with what follows — belongs to every table that flows.
7
- * See `docs/REPORT_ENGINE.md` §14.4.
8
- */
9
1
  import type { ReportConditionGroup } from './conditions';
10
2
  import type { ColumnSpec, TableData } from './dataset';
11
3
  import type { GridFill, GridLines } from './template';
@@ -14,19 +6,14 @@ export interface BlockBase {
14
6
  id: string;
15
7
  condition?: ReportConditionGroup;
16
8
  style?: TextStyle;
17
- /** Points, [top, right, bottom, left]. A negative side widens the block into the page margin. */
18
9
  margin?: [number, number, number, number];
19
10
  }
20
- /** An image at the left of a cell, the text beside it — a logo before the business name. */
21
11
  export interface CellImage {
22
- /** A URL or data URI, or a placeholder resolving to one. Empty draws no image. */
23
12
  src: string;
24
13
  widthPt: number;
25
14
  heightPt: number;
26
- /** Space between the image and the text. */
27
15
  gapPt?: number;
28
16
  }
29
- /** One cell of a text block's row. Width is a percentage of the block, or 'auto'. */
30
17
  export interface TextCell {
31
18
  id: string;
32
19
  width: number | 'auto';
@@ -34,7 +21,6 @@ export interface TextCell {
34
21
  style?: TextStyle;
35
22
  segments: TextSegment[];
36
23
  condition?: ReportConditionGroup;
37
- /** A fixed width in points, overriding `width`; the other cells share what is left. */
38
24
  widthPt?: number;
39
25
  image?: CellImage;
40
26
  }
@@ -42,46 +28,25 @@ export interface TextRow {
42
28
  id: string;
43
29
  cells: TextCell[];
44
30
  condition?: ReportConditionGroup;
45
- /**
46
- * The row is at least this tall, points, padding included and lines excluded — room left for a
47
- * signature, or a box that must not collapse when its fields are empty.
48
- */
49
31
  minHeightPt?: number;
50
- /** A line above this row when it sits inside a box — the rule over a total. */
51
32
  lineAbovePt?: number;
52
33
  }
53
- /**
54
- * One cell of a column-aligned row, covering the columns `from` through `to`, by column id.
55
- *
56
- * On a `groupColumns` column (with no `to`, or `to` the same column) the cell repeats once per
57
- * generated column, with that value's `%group.*%` in scope — a total under every size.
58
- */
59
34
  export interface AlignedCell {
60
35
  id: string;
61
36
  from: string;
62
- /** Absent covers `from` alone. */
63
37
  to?: string;
64
38
  segments: TextSegment[];
65
39
  align?: Alignment;
66
40
  style?: TextStyle;
67
- /** Format for every placeholder in the cell that has none of its own. */
68
41
  format?: PlaceholderFormat;
69
42
  }
70
- /**
71
- * A row laid out on a table's own columns rather than by percentages, so a figure sits exactly
72
- * under its column — a tax amount under Amount, "Total" spanning everything before it. A column no
73
- * cell covers prints empty, with its column lines. Cells name columns by id, which keeps them right
74
- * when a column is hidden by a condition or expanded per group value.
75
- */
76
43
  export interface AlignedRow {
77
44
  id: string;
78
45
  cells: AlignedCell[];
79
46
  condition?: ReportConditionGroup;
80
47
  minHeightPt?: number;
81
- /** A line above this row — the rule over a grand total. */
82
48
  lineAbovePt?: number;
83
49
  }
84
- /** A heading above several column headings — "Central Tax" over Rate | Amount, "Sizes" over the size columns. */
85
50
  export interface HeaderGroup {
86
51
  id: string;
87
52
  label: string;
@@ -92,33 +57,19 @@ export interface HeaderGroup {
92
57
  export interface TextBlock extends BlockBase {
93
58
  type: 'text';
94
59
  rows: TextRow[];
95
- /**
96
- * Draws the block as a box: `outer` around it, `columns` between cells, `rows` between rows.
97
- * `header` is unused here. These take space and are planned with.
98
- */
99
60
  lines?: GridLines;
100
61
  }
101
62
  export interface TableHeader {
102
- /** Default true. */
103
63
  show?: boolean;
104
- /** Print the heading again at the top of every page the table continues onto. Default true. */
105
64
  repeat?: boolean;
106
65
  style?: TextStyle;
107
- /** A heading row above the column headings, each label spanning the columns it groups. */
108
66
  groups?: HeaderGroup[];
109
67
  }
110
- /**
111
- * Rows split into sections each time `by` changes — a category heading, an ageing bucket with its
112
- * subtotal. Not the same thing as grouping values (`TableData.group`), and named apart for that.
113
- */
114
68
  export interface SectionSpec {
115
69
  by: string;
116
70
  sort?: 'asc' | 'desc';
117
- /** Printed above each section. `%row.*%` is its first row; `%agg.*(row.x)%` covers the section. */
118
71
  header?: AlignedRow[];
119
- /** Printed below each section, with the same scope. */
120
72
  footer?: AlignedRow[];
121
- /** Try to keep a section on one page. */
122
73
  keepTogether?: boolean;
123
74
  }
124
75
  export interface TableBlock extends BlockBase {
@@ -127,23 +78,14 @@ export interface TableBlock extends BlockBase {
127
78
  columns: ColumnSpec[];
128
79
  header?: TableHeader;
129
80
  sections?: SectionSpec;
130
- /** Rows closing the table after its last row — tax, round off, total — under their columns. */
131
81
  footer?: AlignedRow[];
132
- /** Keep the closing rows on the page with whatever follows the table. */
133
82
  footerKeepWithNext?: boolean;
134
- /** Ruling — box, between columns, under the heading, between rows. */
135
83
  lines?: GridLines;
136
- /** Empty rows under the last row, so the box runs down the page. */
137
84
  fill?: GridFill;
138
- /**
139
- * true: the table moves to the next page whole rather than splitting — a small summary.
140
- * false (default): it flows across pages, row by row, its heading repeating.
141
- */
142
85
  keepTogether?: boolean;
143
86
  }
144
87
  export interface ImageBlock extends BlockBase {
145
88
  type: 'image';
146
- /** Literal URL/data-URI, or a placeholder resolving to one. */
147
89
  src: string;
148
90
  widthPt: number;
149
91
  heightPt?: number | 'auto';
@@ -172,7 +114,6 @@ export interface SeparatorBlock extends BlockBase {
172
114
  stroke: StrokeStyle;
173
115
  thicknessPt?: number;
174
116
  }
175
- /** Vertical whitespace — a signature gap, a spacer above totals. */
176
117
  export interface SpacerBlock extends BlockBase {
177
118
  type: 'spacer';
178
119
  heightPt: number;
@@ -1,21 +1,8 @@
1
- /**
2
- * Report engine — conditional visibility.
3
- *
4
- * Prefixed `Report*` because `ui/fields.types.ts` already exports a `ConditionOperator` — a
5
- * different thing (form-field visibility, generic over the form's own shape) that happens to
6
- * share the obvious name.
7
- *
8
- * Carried over from `ReceiptDesigner/types.ts` unchanged in meaning: the operator set was arrived
9
- * at by use and there is no reason to redesign it. The one change is that the legacy single-rule
10
- * shape is gone — nothing in production authored one, so the union does not need to survive.
11
- */
12
1
  export type ReportConditionOperator = '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'in' | 'notIn' | 'exists' | 'notExists';
13
2
  export interface ReportConditionRule {
14
3
  id: string;
15
- /** `source.field` or `row.field`, resolved against the registry. */
16
4
  field: string;
17
5
  operator: ReportConditionOperator;
18
- /** Omitted for `exists` / `notExists`. */
19
6
  value?: string | number | boolean | Array<string | number>;
20
7
  }
21
8
  export interface ReportConditionGroup {
@@ -1,87 +1,40 @@
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
1
  import type { ReportConditionGroup } from './conditions';
10
2
  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
3
  export interface CellLine {
18
4
  id: string;
19
- /** Literal text and `%source.key%` placeholders. */
20
5
  content: string;
21
6
  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
7
  formats?: PlaceholderFormats;
30
8
  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
9
  repeat?: 'groups';
36
- /** For `repeat: 'groups'`: a line each (default), or all on one running line. */
37
10
  display?: 'lines' | 'inline';
38
- /** For `display: 'inline'`: what goes between values. Defaults to ", ". */
39
11
  separator?: string;
40
12
  }
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
13
  export type ColumnKind = 'field' | 'groupColumns';
47
14
  export interface ColumnSpec {
48
15
  id: string;
49
- /** Absent means `field`. */
50
16
  kind?: ColumnKind;
51
- /** May contain placeholders. */
52
17
  header: string;
53
- /** What each row prints here: `%row.total%`, or several lines for a rich cell. */
54
18
  value: string | CellLine[];
55
19
  width: number | '*' | 'auto';
56
20
  align?: Alignment;
57
- /** The default for every placeholder in this column that has none of its own. */
58
21
  format?: PlaceholderFormat;
59
- /** How individual placeholders print, keyed by the token — `%row.hsn%`. Beats `format`. */
60
22
  formats?: PlaceholderFormats;
61
23
  style?: TextStyle;
62
24
  headerStyle?: TextStyle;
63
- /** Alignment of the heading when it differs from the values' — a left heading over right-aligned figures. */
64
25
  headerAlign?: Alignment;
65
- /** Column is dropped entirely when this fails. */
66
26
  condition?: ReportConditionGroup;
67
27
  }
68
- /** Rows agreeing on every `by` field become one row; `sum` fields add up, the rest keep the first. */
69
28
  export interface CombineSpec {
70
29
  by: string[];
71
30
  sum?: string[];
72
31
  }
73
- /** A row set used to name and order group values. Filled from the row set's `LookupDef` by default. */
74
32
  export interface LookupRef {
75
33
  rowSet: string;
76
34
  key: string;
77
35
  label: string;
78
36
  order?: string;
79
37
  }
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
38
  export interface GroupValuesSpec {
86
39
  by: string;
87
40
  lookup?: LookupRef;
@@ -91,13 +44,7 @@ export interface SortSpec {
91
44
  by: string;
92
45
  dir: 'asc' | 'desc';
93
46
  }
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
47
  export interface TableData {
100
- /** A `rowSets` key in the `ReportContext`. */
101
48
  rowSet: string;
102
49
  filter?: ReportConditionGroup;
103
50
  combine?: CombineSpec;