@cratis/components 1.5.0 → 1.6.6

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 (382) hide show
  1. package/dist/cjs/CommandDialog/CommandDialog.js +11 -4
  2. package/dist/cjs/CommandDialog/CommandDialog.js.map +1 -1
  3. package/dist/cjs/CommandDialog/StepperCommandDialog.js +23 -4
  4. package/dist/cjs/CommandDialog/StepperCommandDialog.js.map +1 -1
  5. package/dist/cjs/CommandDialog/index.js +2 -1
  6. package/dist/cjs/CommandDialog/index.js.map +1 -1
  7. package/dist/cjs/CommandForm/fields/CalendarField.js.map +1 -1
  8. package/dist/cjs/CommandForm/fields/CheckboxField.js.map +1 -1
  9. package/dist/cjs/CommandForm/fields/ChipsField.js.map +1 -1
  10. package/dist/cjs/CommandForm/fields/ColorPickerField.js.map +1 -1
  11. package/dist/cjs/CommandForm/fields/DropdownField.js.map +1 -1
  12. package/dist/cjs/CommandForm/fields/InputTextField.js.map +1 -1
  13. package/dist/cjs/CommandForm/fields/MultiSelectField.js.map +1 -1
  14. package/dist/cjs/CommandForm/fields/NumberField.js.map +1 -1
  15. package/dist/cjs/CommandForm/fields/SliderField.js.map +1 -1
  16. package/dist/cjs/CommandForm/fields/TextAreaField.js.map +1 -1
  17. package/dist/cjs/CommandForm/index.js +2 -34
  18. package/dist/cjs/CommandForm/index.js.map +1 -1
  19. package/dist/cjs/Common/ErrorBoundary.js.map +1 -1
  20. package/dist/cjs/Common/FormElement.js.map +1 -1
  21. package/dist/cjs/Common/Page.js.map +1 -1
  22. package/dist/cjs/Common/Tooltip.js +4 -0
  23. package/dist/cjs/Common/Tooltip.js.map +1 -1
  24. package/dist/cjs/Common/index.js +2 -1
  25. package/dist/cjs/Common/index.js.map +1 -1
  26. package/dist/cjs/DataPage/DataPage.js +6 -0
  27. package/dist/cjs/DataPage/DataPage.js.map +1 -1
  28. package/dist/cjs/DataPage/index.js +2 -1
  29. package/dist/cjs/DataPage/index.js.map +1 -1
  30. package/dist/cjs/DataTables/DataTableForObservableQuery.js +5 -0
  31. package/dist/cjs/DataTables/DataTableForObservableQuery.js.map +1 -1
  32. package/dist/cjs/DataTables/DataTableForQuery.js +5 -0
  33. package/dist/cjs/DataTables/DataTableForQuery.js.map +1 -1
  34. package/dist/cjs/DataTables/index.js +2 -1
  35. package/dist/cjs/DataTables/index.js.map +1 -1
  36. package/dist/cjs/Dialogs/BusyIndicatorDialog.js.map +1 -1
  37. package/dist/cjs/Dialogs/ConfirmationDialog.js.map +1 -1
  38. package/dist/cjs/Dialogs/Dialog.js +8 -2
  39. package/dist/cjs/Dialogs/Dialog.js.map +1 -1
  40. package/dist/cjs/Dialogs/index.js +2 -1
  41. package/dist/cjs/Dialogs/index.js.map +1 -1
  42. package/dist/cjs/Dropdown/Dropdown.js +1 -0
  43. package/dist/cjs/Dropdown/Dropdown.js.map +1 -1
  44. package/dist/cjs/Dropdown/index.js +2 -1
  45. package/dist/cjs/Dropdown/index.js.map +1 -1
  46. package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
  47. package/dist/cjs/ObjectContentEditor/index.js +2 -1
  48. package/dist/cjs/ObjectContentEditor/index.js.map +1 -1
  49. package/dist/cjs/ObjectContentEditor/objectHelpers.js +6 -0
  50. package/dist/cjs/ObjectContentEditor/objectHelpers.js.map +1 -1
  51. package/dist/cjs/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -1
  52. package/dist/cjs/ObjectNavigationalBar/breadcrumbHelpers.js +6 -0
  53. package/dist/cjs/ObjectNavigationalBar/breadcrumbHelpers.js.map +1 -1
  54. package/dist/cjs/ObjectNavigationalBar/index.js +2 -1
  55. package/dist/cjs/ObjectNavigationalBar/index.js.map +1 -1
  56. package/dist/cjs/PivotViewer/PivotViewer.js +28 -0
  57. package/dist/cjs/PivotViewer/PivotViewer.js.map +1 -1
  58. package/dist/cjs/PivotViewer/components/AxisLabels.js +4 -0
  59. package/dist/cjs/PivotViewer/components/AxisLabels.js.map +1 -1
  60. package/dist/cjs/PivotViewer/components/DetailPanel.js.map +1 -1
  61. package/dist/cjs/PivotViewer/components/FilterPanel.js +4 -0
  62. package/dist/cjs/PivotViewer/components/FilterPanel.js.map +1 -1
  63. package/dist/cjs/PivotViewer/components/FilterPanelContainer.js.map +1 -1
  64. package/dist/cjs/PivotViewer/components/PivotCanvas.js +138 -2
  65. package/dist/cjs/PivotViewer/components/PivotCanvas.js.map +1 -1
  66. package/dist/cjs/PivotViewer/components/PivotViewerMain.js +4 -0
  67. package/dist/cjs/PivotViewer/components/PivotViewerMain.js.map +1 -1
  68. package/dist/cjs/PivotViewer/components/RangeHistogramFilter.js.map +1 -1
  69. package/dist/cjs/PivotViewer/components/Spinner.js.map +1 -1
  70. package/dist/cjs/PivotViewer/components/Toolbar.js.map +1 -1
  71. package/dist/cjs/PivotViewer/components/ToolbarContainer.js.map +1 -1
  72. package/dist/cjs/PivotViewer/components/pivot/animation.js +8 -1
  73. package/dist/cjs/PivotViewer/components/pivot/animation.js.map +1 -1
  74. package/dist/cjs/PivotViewer/components/pivot/colorResolver.js +3 -1
  75. package/dist/cjs/PivotViewer/components/pivot/colorResolver.js.map +1 -1
  76. package/dist/cjs/PivotViewer/components/pivot/constants.js +8 -5
  77. package/dist/cjs/PivotViewer/components/pivot/constants.js.map +1 -1
  78. package/dist/cjs/PivotViewer/components/pivot/groups.js +15 -0
  79. package/dist/cjs/PivotViewer/components/pivot/groups.js.map +1 -1
  80. package/dist/cjs/PivotViewer/components/pivot/sprites.js +32 -13
  81. package/dist/cjs/PivotViewer/components/pivot/sprites.js.map +1 -1
  82. package/dist/cjs/PivotViewer/components/pivot/visibility.js +102 -3
  83. package/dist/cjs/PivotViewer/components/pivot/visibility.js.map +1 -1
  84. package/dist/cjs/PivotViewer/constants.js +2 -0
  85. package/dist/cjs/PivotViewer/constants.js.map +1 -1
  86. package/dist/cjs/PivotViewer/engine/layout.js +23 -0
  87. package/dist/cjs/PivotViewer/engine/layout.js.map +1 -1
  88. package/dist/cjs/PivotViewer/engine/store.js +29 -0
  89. package/dist/cjs/PivotViewer/engine/store.js.map +1 -1
  90. package/dist/cjs/PivotViewer/hooks/useAnimationModeTracking.js +8 -0
  91. package/dist/cjs/PivotViewer/hooks/useAnimationModeTracking.js.map +1 -1
  92. package/dist/cjs/PivotViewer/hooks/useCardSelection.js +10 -1
  93. package/dist/cjs/PivotViewer/hooks/useCardSelection.js.map +1 -1
  94. package/dist/cjs/PivotViewer/hooks/useContainerDimensions.js +11 -0
  95. package/dist/cjs/PivotViewer/hooks/useContainerDimensions.js.map +1 -1
  96. package/dist/cjs/PivotViewer/hooks/useCurrentFilters.js +6 -0
  97. package/dist/cjs/PivotViewer/hooks/useCurrentFilters.js.map +1 -1
  98. package/dist/cjs/PivotViewer/hooks/useDetailPanelClose.js +11 -1
  99. package/dist/cjs/PivotViewer/hooks/useDetailPanelClose.js.map +1 -1
  100. package/dist/cjs/PivotViewer/hooks/useDimensionState.js +2 -0
  101. package/dist/cjs/PivotViewer/hooks/useDimensionState.js.map +1 -1
  102. package/dist/cjs/PivotViewer/hooks/useFieldExtractors.js +2 -0
  103. package/dist/cjs/PivotViewer/hooks/useFieldExtractors.js.map +1 -1
  104. package/dist/cjs/PivotViewer/hooks/useFilterOptions.js +2 -0
  105. package/dist/cjs/PivotViewer/hooks/useFilterOptions.js.map +1 -1
  106. package/dist/cjs/PivotViewer/hooks/useFilterState.js +5 -0
  107. package/dist/cjs/PivotViewer/hooks/useFilterState.js.map +1 -1
  108. package/dist/cjs/PivotViewer/hooks/usePanning.js +14 -0
  109. package/dist/cjs/PivotViewer/hooks/usePanning.js.map +1 -1
  110. package/dist/cjs/PivotViewer/hooks/usePivotEngine.js +7 -0
  111. package/dist/cjs/PivotViewer/hooks/usePivotEngine.js.map +1 -1
  112. package/dist/cjs/PivotViewer/hooks/useScrollSync.js +6 -0
  113. package/dist/cjs/PivotViewer/hooks/useScrollSync.js.map +1 -1
  114. package/dist/cjs/PivotViewer/hooks/useViewModeScrollHandling.js +9 -0
  115. package/dist/cjs/PivotViewer/hooks/useViewModeScrollHandling.js.map +1 -1
  116. package/dist/cjs/PivotViewer/hooks/useWheelZoom.js +8 -2
  117. package/dist/cjs/PivotViewer/hooks/useWheelZoom.js.map +1 -1
  118. package/dist/cjs/PivotViewer/hooks/useZoomState.js +2 -0
  119. package/dist/cjs/PivotViewer/hooks/useZoomState.js.map +1 -1
  120. package/dist/cjs/PivotViewer/index.js +2 -1
  121. package/dist/cjs/PivotViewer/index.js.map +1 -1
  122. package/dist/cjs/PivotViewer/types.js +11 -0
  123. package/dist/cjs/PivotViewer/types.js.map +1 -1
  124. package/dist/cjs/PivotViewer/utils/animations.js +35 -2
  125. package/dist/cjs/PivotViewer/utils/animations.js.map +1 -1
  126. package/dist/cjs/PivotViewer/utils/cardPosition.js +21 -3
  127. package/dist/cjs/PivotViewer/utils/cardPosition.js.map +1 -1
  128. package/dist/cjs/PivotViewer/utils/constants.js +3 -0
  129. package/dist/cjs/PivotViewer/utils/constants.js.map +1 -1
  130. package/dist/cjs/PivotViewer/utils/idResolution.js +16 -0
  131. package/dist/cjs/PivotViewer/utils/idResolution.js.map +1 -1
  132. package/dist/cjs/PivotViewer/utils/selection.js +25 -0
  133. package/dist/cjs/PivotViewer/utils/selection.js.map +1 -1
  134. package/dist/cjs/PivotViewer/utils/utils.js +5 -0
  135. package/dist/cjs/PivotViewer/utils/utils.js.map +1 -1
  136. package/dist/cjs/SchemaEditor/NameCell.js.map +1 -1
  137. package/dist/cjs/SchemaEditor/SchemaEditor.js.map +1 -1
  138. package/dist/cjs/SchemaEditor/TypeCell.js.map +1 -1
  139. package/dist/cjs/SchemaEditor/index.js +2 -1
  140. package/dist/cjs/SchemaEditor/index.js.map +1 -1
  141. package/dist/cjs/SchemaEditor/schemaHelpers.js +8 -0
  142. package/dist/cjs/SchemaEditor/schemaHelpers.js.map +1 -1
  143. package/dist/cjs/TimeMachine/EventsView.js +2 -0
  144. package/dist/cjs/TimeMachine/EventsView.js.map +1 -1
  145. package/dist/cjs/TimeMachine/Properties.js.map +1 -1
  146. package/dist/cjs/TimeMachine/ReadModelView.js +1 -0
  147. package/dist/cjs/TimeMachine/ReadModelView.js.map +1 -1
  148. package/dist/cjs/TimeMachine/TimeMachine.js +11 -1
  149. package/dist/cjs/TimeMachine/TimeMachine.js.map +1 -1
  150. package/dist/cjs/TimeMachine/index.js +2 -1
  151. package/dist/cjs/TimeMachine/index.js.map +1 -1
  152. package/dist/cjs/TimeMachine/propertiesHelpers.js +5 -0
  153. package/dist/cjs/TimeMachine/propertiesHelpers.js.map +1 -1
  154. package/dist/cjs/Toolbar/Toolbar.css +8 -0
  155. package/dist/cjs/Toolbar/Toolbar.js +7 -1
  156. package/dist/cjs/Toolbar/Toolbar.js.map +1 -1
  157. package/dist/cjs/Toolbar/ToolbarButton.js +16 -2
  158. package/dist/cjs/Toolbar/ToolbarButton.js.map +1 -1
  159. package/dist/cjs/Toolbar/ToolbarContext.js +8 -0
  160. package/dist/cjs/Toolbar/ToolbarContext.js.map +1 -1
  161. package/dist/cjs/Toolbar/ToolbarDragContext.js +24 -0
  162. package/dist/cjs/Toolbar/ToolbarDragContext.js.map +1 -0
  163. package/dist/cjs/Toolbar/ToolbarFanOutItem.js +11 -0
  164. package/dist/cjs/Toolbar/ToolbarFanOutItem.js.map +1 -1
  165. package/dist/cjs/Toolbar/ToolbarSection.js +18 -1
  166. package/dist/cjs/Toolbar/ToolbarSection.js.map +1 -1
  167. package/dist/cjs/Toolbar/ToolbarSeparator.js +6 -0
  168. package/dist/cjs/Toolbar/ToolbarSeparator.js.map +1 -1
  169. package/dist/cjs/Toolbar/index.js +2 -1
  170. package/dist/cjs/Toolbar/index.js.map +1 -1
  171. package/dist/cjs/tailwind-utilities.css +16 -1
  172. package/dist/cjs/types/TypeFormat.js +2 -0
  173. package/dist/cjs/types/TypeFormat.js.map +1 -1
  174. package/dist/cjs/types/index.js +2 -1
  175. package/dist/cjs/types/index.js.map +1 -1
  176. package/dist/cjs/useOverlayZIndex.js +10 -0
  177. package/dist/cjs/useOverlayZIndex.js.map +1 -1
  178. package/dist/esm/CommandDialog/CommandDialog.d.ts +2 -2
  179. package/dist/esm/CommandDialog/CommandDialog.d.ts.map +1 -1
  180. package/dist/esm/CommandDialog/CommandDialog.js +11 -4
  181. package/dist/esm/CommandDialog/CommandDialog.js.map +1 -1
  182. package/dist/esm/CommandDialog/CommandDialog.stories.d.ts +1 -0
  183. package/dist/esm/CommandDialog/CommandDialog.stories.d.ts.map +1 -1
  184. package/dist/esm/CommandDialog/CommandDialog.stories.js +52 -0
  185. package/dist/esm/CommandDialog/CommandDialog.stories.js.map +1 -1
  186. package/dist/esm/CommandDialog/StepperCommandDialog.d.ts +5 -4
  187. package/dist/esm/CommandDialog/StepperCommandDialog.d.ts.map +1 -1
  188. package/dist/esm/CommandDialog/StepperCommandDialog.js +23 -4
  189. package/dist/esm/CommandDialog/StepperCommandDialog.js.map +1 -1
  190. package/dist/esm/CommandDialog/StepperCommandDialog.stories.d.ts +1 -0
  191. package/dist/esm/CommandDialog/StepperCommandDialog.stories.d.ts.map +1 -1
  192. package/dist/esm/CommandDialog/StepperCommandDialog.stories.js +54 -0
  193. package/dist/esm/CommandDialog/StepperCommandDialog.stories.js.map +1 -1
  194. package/dist/esm/CommandDialog/index.js +3 -0
  195. package/dist/esm/CommandDialog/index.js.map +1 -1
  196. package/dist/esm/CommandForm/fields/CalendarField.js.map +1 -1
  197. package/dist/esm/CommandForm/fields/CheckboxField.js.map +1 -1
  198. package/dist/esm/CommandForm/fields/ChipsField.js.map +1 -1
  199. package/dist/esm/CommandForm/fields/ColorPickerField.js.map +1 -1
  200. package/dist/esm/CommandForm/fields/DropdownField.js.map +1 -1
  201. package/dist/esm/CommandForm/fields/InputTextField.js.map +1 -1
  202. package/dist/esm/CommandForm/fields/MultiSelectField.js.map +1 -1
  203. package/dist/esm/CommandForm/fields/NumberField.js.map +1 -1
  204. package/dist/esm/CommandForm/fields/SliderField.js.map +1 -1
  205. package/dist/esm/CommandForm/fields/TextAreaField.js.map +1 -1
  206. package/dist/esm/CommandForm/index.d.ts +0 -1
  207. package/dist/esm/CommandForm/index.d.ts.map +1 -1
  208. package/dist/esm/CommandForm/index.js +3 -1
  209. package/dist/esm/CommandForm/index.js.map +1 -1
  210. package/dist/esm/Common/ErrorBoundary.js.map +1 -1
  211. package/dist/esm/Common/FormElement.js.map +1 -1
  212. package/dist/esm/Common/Page.js.map +1 -1
  213. package/dist/esm/Common/Tooltip.js +4 -0
  214. package/dist/esm/Common/Tooltip.js.map +1 -1
  215. package/dist/esm/Common/index.js +3 -0
  216. package/dist/esm/Common/index.js.map +1 -1
  217. package/dist/esm/DataPage/DataPage.js +6 -0
  218. package/dist/esm/DataPage/DataPage.js.map +1 -1
  219. package/dist/esm/DataPage/index.js +3 -0
  220. package/dist/esm/DataPage/index.js.map +1 -1
  221. package/dist/esm/DataTables/DataTableForObservableQuery.js +5 -0
  222. package/dist/esm/DataTables/DataTableForObservableQuery.js.map +1 -1
  223. package/dist/esm/DataTables/DataTableForQuery.js +5 -0
  224. package/dist/esm/DataTables/DataTableForQuery.js.map +1 -1
  225. package/dist/esm/DataTables/index.js +3 -0
  226. package/dist/esm/DataTables/index.js.map +1 -1
  227. package/dist/esm/Dialogs/BusyIndicatorDialog.js.map +1 -1
  228. package/dist/esm/Dialogs/ConfirmationDialog.js.map +1 -1
  229. package/dist/esm/Dialogs/Dialog.d.ts +5 -3
  230. package/dist/esm/Dialogs/Dialog.d.ts.map +1 -1
  231. package/dist/esm/Dialogs/Dialog.js +8 -2
  232. package/dist/esm/Dialogs/Dialog.js.map +1 -1
  233. package/dist/esm/Dialogs/index.js +3 -0
  234. package/dist/esm/Dialogs/index.js.map +1 -1
  235. package/dist/esm/Dropdown/Dropdown.js +1 -0
  236. package/dist/esm/Dropdown/Dropdown.js.map +1 -1
  237. package/dist/esm/Dropdown/index.js +3 -0
  238. package/dist/esm/Dropdown/index.js.map +1 -1
  239. package/dist/esm/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
  240. package/dist/esm/ObjectContentEditor/index.js +3 -0
  241. package/dist/esm/ObjectContentEditor/index.js.map +1 -1
  242. package/dist/esm/ObjectContentEditor/objectHelpers.js +6 -0
  243. package/dist/esm/ObjectContentEditor/objectHelpers.js.map +1 -1
  244. package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -1
  245. package/dist/esm/ObjectNavigationalBar/breadcrumbHelpers.js +6 -0
  246. package/dist/esm/ObjectNavigationalBar/breadcrumbHelpers.js.map +1 -1
  247. package/dist/esm/ObjectNavigationalBar/index.js +3 -0
  248. package/dist/esm/ObjectNavigationalBar/index.js.map +1 -1
  249. package/dist/esm/PivotViewer/PivotViewer.js +28 -0
  250. package/dist/esm/PivotViewer/PivotViewer.js.map +1 -1
  251. package/dist/esm/PivotViewer/components/AxisLabels.js +4 -0
  252. package/dist/esm/PivotViewer/components/AxisLabels.js.map +1 -1
  253. package/dist/esm/PivotViewer/components/DetailPanel.js.map +1 -1
  254. package/dist/esm/PivotViewer/components/FilterPanel.js +4 -0
  255. package/dist/esm/PivotViewer/components/FilterPanel.js.map +1 -1
  256. package/dist/esm/PivotViewer/components/FilterPanelContainer.js.map +1 -1
  257. package/dist/esm/PivotViewer/components/PivotCanvas.js +138 -2
  258. package/dist/esm/PivotViewer/components/PivotCanvas.js.map +1 -1
  259. package/dist/esm/PivotViewer/components/PivotViewerMain.js +4 -0
  260. package/dist/esm/PivotViewer/components/PivotViewerMain.js.map +1 -1
  261. package/dist/esm/PivotViewer/components/RangeHistogramFilter.js.map +1 -1
  262. package/dist/esm/PivotViewer/components/Spinner.js.map +1 -1
  263. package/dist/esm/PivotViewer/components/Toolbar.js.map +1 -1
  264. package/dist/esm/PivotViewer/components/ToolbarContainer.js.map +1 -1
  265. package/dist/esm/PivotViewer/components/pivot/animation.js +8 -1
  266. package/dist/esm/PivotViewer/components/pivot/animation.js.map +1 -1
  267. package/dist/esm/PivotViewer/components/pivot/colorResolver.js +3 -1
  268. package/dist/esm/PivotViewer/components/pivot/colorResolver.js.map +1 -1
  269. package/dist/esm/PivotViewer/components/pivot/constants.js +8 -5
  270. package/dist/esm/PivotViewer/components/pivot/constants.js.map +1 -1
  271. package/dist/esm/PivotViewer/components/pivot/groups.js +15 -0
  272. package/dist/esm/PivotViewer/components/pivot/groups.js.map +1 -1
  273. package/dist/esm/PivotViewer/components/pivot/sprites.js +19 -0
  274. package/dist/esm/PivotViewer/components/pivot/sprites.js.map +1 -1
  275. package/dist/esm/PivotViewer/components/pivot/visibility.js +102 -3
  276. package/dist/esm/PivotViewer/components/pivot/visibility.js.map +1 -1
  277. package/dist/esm/PivotViewer/constants.js +2 -0
  278. package/dist/esm/PivotViewer/constants.js.map +1 -1
  279. package/dist/esm/PivotViewer/engine/layout.js +23 -0
  280. package/dist/esm/PivotViewer/engine/layout.js.map +1 -1
  281. package/dist/esm/PivotViewer/engine/store.js +29 -0
  282. package/dist/esm/PivotViewer/engine/store.js.map +1 -1
  283. package/dist/esm/PivotViewer/hooks/useAnimationModeTracking.js +8 -0
  284. package/dist/esm/PivotViewer/hooks/useAnimationModeTracking.js.map +1 -1
  285. package/dist/esm/PivotViewer/hooks/useCardSelection.js +10 -1
  286. package/dist/esm/PivotViewer/hooks/useCardSelection.js.map +1 -1
  287. package/dist/esm/PivotViewer/hooks/useContainerDimensions.js +11 -0
  288. package/dist/esm/PivotViewer/hooks/useContainerDimensions.js.map +1 -1
  289. package/dist/esm/PivotViewer/hooks/useCurrentFilters.js +6 -0
  290. package/dist/esm/PivotViewer/hooks/useCurrentFilters.js.map +1 -1
  291. package/dist/esm/PivotViewer/hooks/useDetailPanelClose.js +11 -1
  292. package/dist/esm/PivotViewer/hooks/useDetailPanelClose.js.map +1 -1
  293. package/dist/esm/PivotViewer/hooks/useDimensionState.js +2 -0
  294. package/dist/esm/PivotViewer/hooks/useDimensionState.js.map +1 -1
  295. package/dist/esm/PivotViewer/hooks/useFieldExtractors.js +2 -0
  296. package/dist/esm/PivotViewer/hooks/useFieldExtractors.js.map +1 -1
  297. package/dist/esm/PivotViewer/hooks/useFilterOptions.js +2 -0
  298. package/dist/esm/PivotViewer/hooks/useFilterOptions.js.map +1 -1
  299. package/dist/esm/PivotViewer/hooks/useFilterState.js +5 -0
  300. package/dist/esm/PivotViewer/hooks/useFilterState.js.map +1 -1
  301. package/dist/esm/PivotViewer/hooks/usePanning.js +14 -0
  302. package/dist/esm/PivotViewer/hooks/usePanning.js.map +1 -1
  303. package/dist/esm/PivotViewer/hooks/usePivotEngine.js +7 -0
  304. package/dist/esm/PivotViewer/hooks/usePivotEngine.js.map +1 -1
  305. package/dist/esm/PivotViewer/hooks/useScrollSync.js +6 -0
  306. package/dist/esm/PivotViewer/hooks/useScrollSync.js.map +1 -1
  307. package/dist/esm/PivotViewer/hooks/useViewModeScrollHandling.js +9 -0
  308. package/dist/esm/PivotViewer/hooks/useViewModeScrollHandling.js.map +1 -1
  309. package/dist/esm/PivotViewer/hooks/useWheelZoom.js +8 -2
  310. package/dist/esm/PivotViewer/hooks/useWheelZoom.js.map +1 -1
  311. package/dist/esm/PivotViewer/hooks/useZoomState.js +2 -0
  312. package/dist/esm/PivotViewer/hooks/useZoomState.js.map +1 -1
  313. package/dist/esm/PivotViewer/index.js +3 -0
  314. package/dist/esm/PivotViewer/index.js.map +1 -1
  315. package/dist/esm/PivotViewer/types.js +11 -0
  316. package/dist/esm/PivotViewer/types.js.map +1 -1
  317. package/dist/esm/PivotViewer/utils/animations.js +35 -2
  318. package/dist/esm/PivotViewer/utils/animations.js.map +1 -1
  319. package/dist/esm/PivotViewer/utils/cardPosition.js +21 -3
  320. package/dist/esm/PivotViewer/utils/cardPosition.js.map +1 -1
  321. package/dist/esm/PivotViewer/utils/constants.js +3 -0
  322. package/dist/esm/PivotViewer/utils/constants.js.map +1 -1
  323. package/dist/esm/PivotViewer/utils/idResolution.js +16 -0
  324. package/dist/esm/PivotViewer/utils/idResolution.js.map +1 -1
  325. package/dist/esm/PivotViewer/utils/selection.js +25 -0
  326. package/dist/esm/PivotViewer/utils/selection.js.map +1 -1
  327. package/dist/esm/PivotViewer/utils/utils.js +5 -0
  328. package/dist/esm/PivotViewer/utils/utils.js.map +1 -1
  329. package/dist/esm/SchemaEditor/NameCell.js.map +1 -1
  330. package/dist/esm/SchemaEditor/SchemaEditor.js.map +1 -1
  331. package/dist/esm/SchemaEditor/TypeCell.js.map +1 -1
  332. package/dist/esm/SchemaEditor/index.js +3 -0
  333. package/dist/esm/SchemaEditor/index.js.map +1 -1
  334. package/dist/esm/SchemaEditor/schemaHelpers.js +8 -0
  335. package/dist/esm/SchemaEditor/schemaHelpers.js.map +1 -1
  336. package/dist/esm/TimeMachine/EventsView.js +2 -0
  337. package/dist/esm/TimeMachine/EventsView.js.map +1 -1
  338. package/dist/esm/TimeMachine/Properties.js.map +1 -1
  339. package/dist/esm/TimeMachine/ReadModelView.js +1 -0
  340. package/dist/esm/TimeMachine/ReadModelView.js.map +1 -1
  341. package/dist/esm/TimeMachine/TimeMachine.js +11 -1
  342. package/dist/esm/TimeMachine/TimeMachine.js.map +1 -1
  343. package/dist/esm/TimeMachine/index.js +3 -0
  344. package/dist/esm/TimeMachine/index.js.map +1 -1
  345. package/dist/esm/TimeMachine/propertiesHelpers.js +5 -0
  346. package/dist/esm/TimeMachine/propertiesHelpers.js.map +1 -1
  347. package/dist/esm/Toolbar/Toolbar.css +8 -0
  348. package/dist/esm/Toolbar/Toolbar.d.ts +3 -1
  349. package/dist/esm/Toolbar/Toolbar.d.ts.map +1 -1
  350. package/dist/esm/Toolbar/Toolbar.js +7 -1
  351. package/dist/esm/Toolbar/Toolbar.js.map +1 -1
  352. package/dist/esm/Toolbar/Toolbar.stories.d.ts +1 -0
  353. package/dist/esm/Toolbar/Toolbar.stories.d.ts.map +1 -1
  354. package/dist/esm/Toolbar/Toolbar.stories.js +23 -0
  355. package/dist/esm/Toolbar/Toolbar.stories.js.map +1 -1
  356. package/dist/esm/Toolbar/ToolbarButton.d.ts +4 -1
  357. package/dist/esm/Toolbar/ToolbarButton.d.ts.map +1 -1
  358. package/dist/esm/Toolbar/ToolbarButton.js +16 -2
  359. package/dist/esm/Toolbar/ToolbarButton.js.map +1 -1
  360. package/dist/esm/Toolbar/ToolbarContext.js +8 -0
  361. package/dist/esm/Toolbar/ToolbarContext.js.map +1 -1
  362. package/dist/esm/Toolbar/ToolbarDragContext.d.ts +7 -0
  363. package/dist/esm/Toolbar/ToolbarDragContext.d.ts.map +1 -0
  364. package/dist/esm/Toolbar/ToolbarDragContext.js +21 -0
  365. package/dist/esm/Toolbar/ToolbarDragContext.js.map +1 -0
  366. package/dist/esm/Toolbar/ToolbarFanOutItem.js +11 -0
  367. package/dist/esm/Toolbar/ToolbarFanOutItem.js.map +1 -1
  368. package/dist/esm/Toolbar/ToolbarSection.js +18 -1
  369. package/dist/esm/Toolbar/ToolbarSection.js.map +1 -1
  370. package/dist/esm/Toolbar/ToolbarSeparator.js +6 -0
  371. package/dist/esm/Toolbar/ToolbarSeparator.js.map +1 -1
  372. package/dist/esm/Toolbar/index.js +3 -0
  373. package/dist/esm/Toolbar/index.js.map +1 -1
  374. package/dist/esm/tailwind-utilities.css +16 -1
  375. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  376. package/dist/esm/types/TypeFormat.js +2 -0
  377. package/dist/esm/types/TypeFormat.js.map +1 -1
  378. package/dist/esm/types/index.js +3 -0
  379. package/dist/esm/types/index.js.map +1 -1
  380. package/dist/esm/useOverlayZIndex.js +10 -0
  381. package/dist/esm/useOverlayZIndex.js.map +1 -1
  382. package/package.json +8 -8
@@ -6,7 +6,7 @@ var Dialog = require('../Dialogs/Dialog.js');
6
6
  var React = require('react');
7
7
  var commands = require('@cratis/arc.react/commands');
8
8
 
9
- const CommandDialogWrapper = ({ title, visible, width, style, resizable, buttons, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, onBeforeExecute, children }) => {
9
+ const CommandDialogWrapper = ({ title, visible, width, style, contentStyle, resizable, buttons, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, onSuccess, onValidationFailure, onFailed, onBeforeExecute, children }) => {
10
10
  const { setCommandValues, setCommandResult, isValid: isCommandFormValid } = commands.useCommandFormContext();
11
11
  const commandInstance = commands.useCommandInstance();
12
12
  const [isBusy, setIsBusy] = React.useState(false);
@@ -24,9 +24,16 @@ const CommandDialogWrapper = ({ title, visible, width, style, resizable, buttons
24
24
  setIsBusy(false);
25
25
  }
26
26
  if (!result.isSuccess) {
27
+ if (!result.isValid) {
28
+ await onValidationFailure?.(result.validationResults);
29
+ }
30
+ else {
31
+ await onFailed?.(result);
32
+ }
27
33
  setCommandResult(result);
28
34
  return false;
29
35
  }
36
+ await onSuccess?.(result.response);
30
37
  if (onConfirm) {
31
38
  const closeResult = await onConfirm();
32
39
  return closeResult === true;
@@ -56,11 +63,11 @@ const CommandDialogWrapper = ({ title, visible, width, style, resizable, buttons
56
63
  };
57
64
  const processedChildren = processChildren(children);
58
65
  const isDialogValid = (isValid !== false) && isCommandFormValid;
59
- return (jsxRuntime.jsx(Dialog.Dialog, { title: title, visible: visible, width: width, style: style, resizable: resizable, buttons: buttons, onClose: onClose, onConfirm: handleConfirm, onCancel: onCancel, okLabel: okLabel, cancelLabel: cancelLabel, yesLabel: yesLabel, noLabel: noLabel, isValid: isDialogValid, isBusy: isBusy, children: jsxRuntime.jsx("div", { style: { display: 'flex', flexDirection: 'column', width: '100%' }, children: processedChildren }) }));
66
+ return (jsxRuntime.jsx(Dialog.Dialog, { title: title, visible: visible, width: width, style: style, contentStyle: contentStyle, resizable: resizable, buttons: buttons, onClose: onClose, onConfirm: handleConfirm, onCancel: onCancel, okLabel: okLabel, cancelLabel: cancelLabel, yesLabel: yesLabel, noLabel: noLabel, isValid: isDialogValid, isBusy: isBusy, children: jsxRuntime.jsx("div", { style: { display: 'flex', flexDirection: 'column', width: '100%' }, children: processedChildren }) }));
60
67
  };
61
68
  const CommandDialogComponent = (props) => {
62
- const { title, visible, width, style, resizable, buttons = dialogs.DialogButtons.OkCancel, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, children, ...commandFormProps } = props;
63
- return (jsxRuntime.jsx(commands.CommandForm, { ...commandFormProps, children: jsxRuntime.jsx(CommandDialogWrapper, { title: title, visible: visible, width: width, style: style, resizable: resizable, buttons: buttons, okLabel: okLabel, cancelLabel: cancelLabel, yesLabel: yesLabel, noLabel: noLabel, isValid: isValid, onClose: onClose, onConfirm: onConfirm, onCancel: onCancel, onBeforeExecute: commandFormProps.onBeforeExecute, children: children }) }));
69
+ const { title, visible, width, style, contentStyle, resizable, buttons = dialogs.DialogButtons.OkCancel, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, children, ...commandFormProps } = props;
70
+ return (jsxRuntime.jsx(commands.CommandForm, { ...commandFormProps, children: jsxRuntime.jsx(CommandDialogWrapper, { title: title, visible: visible, width: width, style: style, contentStyle: contentStyle, resizable: resizable, buttons: buttons, okLabel: okLabel, cancelLabel: cancelLabel, yesLabel: yesLabel, noLabel: noLabel, isValid: isValid, onClose: onClose, onConfirm: onConfirm, onCancel: onCancel, onSuccess: props.onSuccess, onValidationFailure: props.onValidationFailure, onFailed: props.onFailed, onBeforeExecute: commandFormProps.onBeforeExecute, children: children }) }));
64
71
  };
65
72
  const CommandDialogColumnWrapper = ({ children }) => (jsxRuntime.jsx(commands.CommandForm.Column, { children: children }));
66
73
  CommandDialogColumnWrapper.displayName = 'CommandFormColumn';
@@ -1 +1 @@
1
- {"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ICommandResult } from '@cratis/arc/commands';\nimport { DialogButtons, DialogResult } from '@cratis/arc.react/dialogs';\nimport { Dialog, type DialogProps } from '../Dialogs/Dialog';\nimport React, { useState } from 'react';\nimport {\n CommandForm,\n CommandFormFieldWrapper,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps\n} from '@cratis/arc.react/commands';\n\nexport interface CommandDialogProps<TCommand extends object>\n extends Omit<CommandFormProps<TCommand>, 'children'>,\n Omit<DialogProps, 'children'> {\n children?: React.ReactNode;\n}\n\nconst CommandDialogWrapper = <TCommand extends object>({\n title,\n visible,\n width,\n style,\n resizable,\n buttons,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onBeforeExecute,\n children\n}: {\n title: string;\n visible?: boolean;\n width?: string;\n style?: DialogProps['style'];\n resizable?: boolean;\n buttons?: DialogProps['buttons'];\n okLabel?: string;\n cancelLabel?: string;\n yesLabel?: string;\n noLabel?: string;\n isValid?: boolean;\n onClose?: DialogProps['onClose'];\n onConfirm?: DialogProps['onConfirm'];\n onCancel?: DialogProps['onCancel'];\n onBeforeExecute?: (values: TCommand) => TCommand;\n children?: React.ReactNode;\n}) => {\n const { setCommandValues, setCommandResult, isValid: isCommandFormValid } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const [isBusy, setIsBusy] = useState(false);\n\n const handleConfirm = async () => {\n if (onBeforeExecute) {\n const transformedValues = onBeforeExecute(commandInstance);\n setCommandValues(transformedValues);\n }\n\n setIsBusy(true);\n let result: ICommandResult<unknown>;\n try {\n result = await (commandInstance as unknown as { execute: () => Promise<ICommandResult<unknown>> }).execute();\n } finally {\n setIsBusy(false);\n }\n\n if (!result.isSuccess) {\n setCommandResult(result);\n return false;\n }\n\n if (onConfirm) {\n const closeResult = await onConfirm();\n return closeResult === true;\n }\n\n if (onClose) {\n const closeResult = await onClose(DialogResult.Ok);\n return closeResult !== false;\n }\n\n return true;\n };\n\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return React.Children.map(nodes, (child) => {\n if (!React.isValidElement(child)) return child;\n\n const component = child.type as React.ComponentType<unknown>;\n if (component.displayName === 'CommandFormField') {\n type FieldElement = Parameters<typeof CommandFormFieldWrapper>[0]['field'];\n return <CommandFormFieldWrapper field={child as unknown as FieldElement} />;\n }\n\n const childProps = child.props as Record<string, unknown>;\n if (childProps.children != null) {\n return React.cloneElement(child as React.ReactElement<Record<string, unknown>>, {\n children: processChildren(childProps.children as React.ReactNode)\n });\n }\n\n return child;\n });\n };\n\n const processedChildren = processChildren(children);\n const isDialogValid = (isValid !== false) && isCommandFormValid;\n\n return (\n <Dialog\n title={title}\n visible={visible}\n width={width}\n style={style}\n resizable={resizable}\n buttons={buttons}\n onClose={onClose}\n onConfirm={handleConfirm}\n onCancel={onCancel}\n okLabel={okLabel}\n cancelLabel={cancelLabel}\n yesLabel={yesLabel}\n noLabel={noLabel}\n isValid={isDialogValid}\n isBusy={isBusy}\n >\n <div style={{ display: 'flex', flexDirection: 'column', width: '100%' }}>\n {processedChildren}\n </div>\n </Dialog>\n );\n};\n\nconst CommandDialogComponent = <TCommand extends object = object>(props: CommandDialogProps<TCommand>) => {\n const {\n title,\n visible,\n width,\n style,\n resizable,\n buttons = DialogButtons.OkCancel,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n children,\n ...commandFormProps\n } = props;\n\n return (\n <CommandForm<TCommand> {...commandFormProps}>\n <CommandDialogWrapper<TCommand>\n title={title}\n visible={visible}\n width={width}\n style={style}\n resizable={resizable}\n buttons={buttons}\n okLabel={okLabel}\n cancelLabel={cancelLabel}\n yesLabel={yesLabel}\n noLabel={noLabel}\n isValid={isValid}\n onClose={onClose}\n onConfirm={onConfirm}\n onCancel={onCancel}\n onBeforeExecute={commandFormProps.onBeforeExecute}\n >\n {children}\n </CommandDialogWrapper>\n </CommandForm>\n );\n};\n\nconst CommandDialogColumnWrapper = ({ children }: { children: React.ReactNode }) => (\n <CommandForm.Column>{children}</CommandForm.Column>\n);\nCommandDialogColumnWrapper.displayName = 'CommandFormColumn';\n\nCommandDialogComponent.Column = CommandDialogColumnWrapper;\n\nexport const CommandDialog = CommandDialogComponent;\n"],"names":["useCommandFormContext","useCommandInstance","useState","DialogResult","_jsx","CommandFormFieldWrapper","Dialog","DialogButtons","CommandForm"],"mappings":";;;;;;;;AAqBA,MAAM,oBAAoB,GAAG,CAA0B,EACnD,KAAK,EACL,OAAO,EACP,KAAK,EACL,KAAK,EACL,SAAS,EACT,OAAO,EACP,OAAO,EACP,WAAW,EACX,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,eAAe,EACf,QAAQ,EAkBX,KAAI;AACD,IAAA,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAGA,8BAAqB,EAAY;AAC7G,IAAA,MAAM,eAAe,GAAGC,2BAAkB,EAAY;IACtD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC;AAE3C,IAAA,MAAM,aAAa,GAAG,YAAW;QAC7B,IAAI,eAAe,EAAE;AACjB,YAAA,MAAM,iBAAiB,GAAG,eAAe,CAAC,eAAe,CAAC;YAC1D,gBAAgB,CAAC,iBAAiB,CAAC;QACvC;QAEA,SAAS,CAAC,IAAI,CAAC;AACf,QAAA,IAAI,MAA+B;AACnC,QAAA,IAAI;AACA,YAAA,MAAM,GAAG,MAAO,eAAkF,CAAC,OAAO,EAAE;QAChH;gBAAU;YACN,SAAS,CAAC,KAAK,CAAC;QACpB;AAEA,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YACnB,gBAAgB,CAAC,MAAM,CAAC;AACxB,YAAA,OAAO,KAAK;QAChB;QAEA,IAAI,SAAS,EAAE;AACX,YAAA,MAAM,WAAW,GAAG,MAAM,SAAS,EAAE;YACrC,OAAO,WAAW,KAAK,IAAI;QAC/B;QAEA,IAAI,OAAO,EAAE;YACT,MAAM,WAAW,GAAG,MAAM,OAAO,CAACC,oBAAY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,MAAM,cAAE,QAAQ,EAAA,CAAsB,CACtD;AACD,0BAA0B,CAAC,WAAW,GAAG,mBAAmB;AAE5D,sBAAsB,CAAC,MAAM,GAAG,0BAA0B;AAEnD,MAAM,aAAa,GAAG;;;;"}
1
+ {"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":[null],"names":["useCommandFormContext","useCommandInstance","useState","DialogResult","_jsx","CommandFormFieldWrapper","Dialog","DialogButtons","CommandForm"],"mappings":";;;;;;;;AAqBA,MAAM,oBAAoB,GAAG,CAA8C,EACvE,KAAK,EACL,OAAO,EACP,KAAK,EACL,KAAK,EACL,YAAY,EACZ,SAAS,EACT,OAAO,EACP,OAAO,EACP,WAAW,EACX,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,QAAQ,EAsBX,KAAI;AACD,IAAA,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAGA,8BAAqB,EAAY;AAC7G,IAAA,MAAM,eAAe,GAAGC,2BAAkB,EAAY;IACtD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC;AAE3C,IAAA,MAAM,aAAa,GAAG,YAAW;QAC7B,IAAI,eAAe,EAAE;AACjB,YAAA,MAAM,iBAAiB,GAAG,eAAe,CAAC,eAAe,CAAC;YAC1D,gBAAgB,CAAC,iBAAiB,CAAC;QACvC;QAEA,SAAS,CAAC,IAAI,CAAC;AACf,QAAA,IAAI,MAAiC;AACrC,QAAA,IAAI;AACA,YAAA,MAAM,GAAG,MAAO,eAAoF,CAAC,OAAO,EAAE;QAClH;gBAAU;YACN,SAAS,CAAC,KAAK,CAAC;QACpB;AAEA,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,YAAA,IAAI,CAAC,MAAM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,EACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,eAAe,EAAE,gBAAgB,CAAC,eAAe,YAEhD,QAAQ,EAAA,CACU,EAAA,CACb;AAEtB,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,EAAE,QAAQ,EAAiC,MAC3EA,cAAA,CAACI,oBAAW,CAAC,MAAM,cAAE,QAAQ,EAAA,CAAsB,CACtD;AACD,0BAA0B,CAAC,WAAW,GAAG,mBAAmB;AAE5D,sBAAsB,CAAC,MAAM,GAAG,0BAA0B;AAEnD,MAAM,aAAa,GAAG;;;;"}
@@ -9,6 +9,7 @@ var React = require('react');
9
9
  var commands = require('@cratis/arc.react/commands');
10
10
  require('./StepperCommandDialog.css');
11
11
 
12
+ /** Extracts the property name from an accessor function like `c => c.name`. */
12
13
  const getPropertyName = (accessor) => {
13
14
  if (typeof accessor !== 'function')
14
15
  return '';
@@ -16,6 +17,7 @@ const getPropertyName = (accessor) => {
16
17
  const match = fnStr.match(/\.([a-zA-Z_$][a-zA-Z0-9_$]*)/);
17
18
  return match ? match[1] : '';
18
19
  };
20
+ /** Recursively collects all CommandFormField property names from a React node tree. */
19
21
  const extractFieldNamesFromNode = (nodes) => {
20
22
  const names = [];
21
23
  React.Children.forEach(nodes, (child) => {
@@ -35,7 +37,7 @@ const extractFieldNamesFromNode = (nodes) => {
35
37
  });
36
38
  return names;
37
39
  };
38
- const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', style, resizable = false, isValid, onClose, onConfirm, onCancel, onBeforeExecute, okLabel = 'Submit', nextLabel = 'Next', previousLabel = 'Previous', orientation = 'horizontal', headerPosition, linear = true, onChangeStep, start, end, pt, ptOptions, unstyled, children }) => {
40
+ const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', style, contentStyle, resizable = false, isValid, onClose, onConfirm, onCancel, onSuccess, onValidationFailure, onFailed, onBeforeExecute, okLabel = 'Submit', nextLabel = 'Next', previousLabel = 'Previous', orientation = 'horizontal', headerPosition, linear = true, onChangeStep, start, end, pt, ptOptions, unstyled, children }) => {
39
41
  const { setCommandValues, setCommandResult, isValid: isCommandFormValid, getFieldError } = commands.useCommandFormContext();
40
42
  const commandInstance = commands.useCommandInstance();
41
43
  const [isBusy, setIsBusy] = React.useState(false);
@@ -53,6 +55,8 @@ const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', s
53
55
  const isLastStep = activeStep === stepCount - 1;
54
56
  const isFirstStep = activeStep === 0;
55
57
  const isDialogValid = isValid !== false && isCommandFormValid;
58
+ // Pre-compute the command property names for each StepperPanel step.
59
+ // Used to determine whether a step has validation errors for the indicator badge.
56
60
  const stepFieldNames = React.useMemo(() => React.Children.toArray(children).map((step) => {
57
61
  if (!React.isValidElement(step))
58
62
  return [];
@@ -100,9 +104,16 @@ const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', s
100
104
  setIsBusy(false);
101
105
  }
102
106
  if (!result.isSuccess) {
107
+ if (!result.isValid) {
108
+ await onValidationFailure?.(result.validationResults);
109
+ }
110
+ else {
111
+ await onFailed?.(result);
112
+ }
103
113
  setCommandResult(result);
104
114
  return;
105
115
  }
116
+ await onSuccess?.(result.response);
106
117
  await handleClose(dialogs.DialogResult.Ok);
107
118
  };
108
119
  const processChildren = (nodes) => {
@@ -122,6 +133,14 @@ const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', s
122
133
  return child;
123
134
  });
124
135
  };
136
+ /**
137
+ * Builds the passthrough `pt` object for PrimeStepper, injecting an inline
138
+ * style onto the step *number* span to colour it red (errors) or green (visited
139
+ * and valid). Targeting the number span — rather than the header `<li>` — means
140
+ * PrimeReact's default `p-stepper-header` class and all its layout/separator
141
+ * CSS are never disturbed.
142
+ * Merges with any user-supplied `pt` prop.
143
+ */
125
144
  const stepperPt = React.useMemo(() => {
126
145
  const userPt = pt;
127
146
  const userStepperPanelPt = userPt?.stepperpanel;
@@ -158,11 +177,11 @@ const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', s
158
177
  setVisitedSteps(prev => new Set(prev).add(activeStep));
159
178
  setActiveStep(s => s + 1);
160
179
  }, disabled: isBusy || stepHasError(activeStep) })), isLastStep && isDialogValid && (jsxRuntime.jsx(button.Button, { label: okLabel, icon: "pi pi-check", onClick: handleSubmit, loading: isBusy, disabled: isBusy, autoFocus: true }))] }));
161
- return (jsxRuntime.jsx(dialog.Dialog, { header: headerElement, modal: true, footer: footer, onHide: () => handleClose(dialogs.DialogResult.Cancelled), visible: visible, style: { width, ...style }, resizable: resizable, closable: true, children: jsxRuntime.jsx(stepper.Stepper, { activeStep: activeStep, linear: linear, orientation: orientation, headerPosition: headerPosition, onChangeStep: onChangeStep, start: start, end: end, pt: stepperPt, ptOptions: ptOptions, unstyled: unstyled, children: processChildren(children) }) }));
180
+ return (jsxRuntime.jsx(dialog.Dialog, { header: headerElement, modal: true, footer: footer, onHide: () => handleClose(dialogs.DialogResult.Cancelled), visible: visible, style: { width, ...style }, contentStyle: contentStyle, resizable: resizable, closable: true, children: jsxRuntime.jsx(stepper.Stepper, { activeStep: activeStep, linear: linear, orientation: orientation, headerPosition: headerPosition, onChangeStep: onChangeStep, start: start, end: end, pt: stepperPt, ptOptions: ptOptions, unstyled: unstyled, children: processChildren(children) }) }));
162
181
  };
163
182
  const StepperCommandDialogComponent = (props) => {
164
- const { title, visible, width, style, resizable, isValid, onClose, onConfirm, onCancel, okLabel, nextLabel, previousLabel, orientation, headerPosition, linear, onChangeStep, start, end, pt, ptOptions, unstyled, children, ...commandFormProps } = props;
165
- return (jsxRuntime.jsx(commands.CommandForm, { ...commandFormProps, children: jsxRuntime.jsx(StepperCommandDialogWrapper, { title: title, visible: visible, width: width, style: style, resizable: resizable, isValid: isValid, onClose: onClose, onConfirm: onConfirm, onCancel: onCancel, onBeforeExecute: commandFormProps.onBeforeExecute, okLabel: okLabel, nextLabel: nextLabel, previousLabel: previousLabel, orientation: orientation, headerPosition: headerPosition, linear: linear, onChangeStep: onChangeStep, start: start, end: end, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: children }) }));
183
+ const { title, visible, width, style, contentStyle, resizable, isValid, onClose, onConfirm, onCancel, okLabel, nextLabel, previousLabel, orientation, headerPosition, linear, onChangeStep, start, end, pt, ptOptions, unstyled, children, ...commandFormProps } = props;
184
+ return (jsxRuntime.jsx(commands.CommandForm, { ...commandFormProps, children: jsxRuntime.jsx(StepperCommandDialogWrapper, { title: title, visible: visible, width: width, style: style, contentStyle: contentStyle, resizable: resizable, isValid: isValid, onClose: onClose, onConfirm: onConfirm, onCancel: onCancel, onSuccess: props.onSuccess, onValidationFailure: props.onValidationFailure, onFailed: props.onFailed, onBeforeExecute: commandFormProps.onBeforeExecute, okLabel: okLabel, nextLabel: nextLabel, previousLabel: previousLabel, orientation: orientation, headerPosition: headerPosition, linear: linear, onChangeStep: onChangeStep, start: start, end: end, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: children }) }));
166
185
  };
167
186
  const StepperCommandDialog = StepperCommandDialogComponent;
168
187
 
@@ -1 +1 @@
1
- {"version":3,"file":"StepperCommandDialog.js","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ICommandResult } from '@cratis/arc/commands';\nimport { DialogResult, useDialogContext } from '@cratis/arc.react/dialogs';\nimport { Dialog as PrimeDialog } from 'primereact/dialog';\nimport { Stepper as PrimeStepper, type StepperProps } from 'primereact/stepper';\nimport { Button } from 'primereact/button';\nimport React, { useMemo, useState } from 'react';\nimport {\n CommandForm,\n CommandFormFieldWrapper,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps\n} from '@cratis/arc.react/commands';\nimport type { CloseDialog, ConfirmCallback, CancelCallback } from '../Dialogs/Dialog';\nimport { CSSProperties } from 'react';\nimport './StepperCommandDialog.css';\n\n/** Extracts the property name from an accessor function like `c => c.name`. */\nconst getPropertyName = (accessor: ((obj: unknown) => unknown) | unknown): string => {\n if (typeof accessor !== 'function') return '';\n const fnStr = accessor.toString();\n const match = fnStr.match(/\\.([a-zA-Z_$][a-zA-Z0-9_$]*)/);\n return match ? match[1] : '';\n};\n\n/** Recursively collects all CommandFormField property names from a React node tree. */\nconst extractFieldNamesFromNode = (nodes: React.ReactNode): string[] => {\n const names: string[] = [];\n React.Children.forEach(nodes, (child) => {\n if (!React.isValidElement(child)) return;\n const component = child.type as React.ComponentType<unknown>;\n if ((component as { displayName?: string }).displayName === 'CommandFormField') {\n const fieldProps = child.props as { value?: (obj: unknown) => unknown };\n const name = getPropertyName(fieldProps.value);\n if (name) names.push(name);\n }\n const childProps = child.props as Record<string, unknown>;\n if (childProps.children != null) {\n names.push(...extractFieldNamesFromNode(childProps.children as React.ReactNode));\n }\n });\n return names;\n};\n\n/**\n * Stepper-specific customization props forwarded directly to PrimeReact Stepper.\n * `activeStep` and `children` are managed internally and are excluded.\n */\ntype StepperCustomizationProps = Pick<StepperProps,\n 'orientation' | 'headerPosition' | 'linear' | 'onChangeStep' | 'start' | 'end' | 'pt' | 'ptOptions' | 'unstyled'\n>;\n\nexport interface StepperCommandDialogProps<TCommand extends object>\n extends Omit<CommandFormProps<TCommand>, 'children'>,\n StepperCustomizationProps {\n /** Dialog title text. */\n title: string;\n /** Controls dialog visibility. Defaults to `true`. */\n visible?: boolean;\n /** Dialog width. */\n width?: string;\n /** Custom CSS styles applied to the dialog. */\n style?: CSSProperties;\n /** Whether the dialog can be resized. Defaults to `false`. */\n resizable?: boolean;\n /** Additional validity gate combined with command form validity. */\n isValid?: boolean;\n /** Fallback close callback. */\n onClose?: CloseDialog;\n /** Confirm callback — called only after successful command execution. */\n onConfirm?: ConfirmCallback;\n /** Cancel callback — invoked when the dialog X button is clicked. */\n onCancel?: CancelCallback;\n /** Label for the submit button shown on the last step when valid. Defaults to `'Submit'`. */\n okLabel?: string;\n /** Label for the next step button. Defaults to `'Next'`. */\n nextLabel?: string;\n /** Label for the previous step button. Defaults to `'Previous'`. */\n previousLabel?: string;\n /** StepperPanel children defining each wizard step. */\n children?: React.ReactNode;\n}\n\nconst StepperCommandDialogWrapper = <TCommand extends object>({\n title,\n visible = true,\n width = '600px',\n style,\n resizable = false,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onBeforeExecute,\n okLabel = 'Submit',\n nextLabel = 'Next',\n previousLabel = 'Previous',\n orientation = 'horizontal',\n headerPosition,\n linear = true,\n onChangeStep,\n start,\n end,\n pt,\n ptOptions,\n unstyled,\n children\n}: {\n title: string;\n visible?: boolean;\n width?: string;\n style?: CSSProperties;\n resizable?: boolean;\n isValid?: boolean;\n onClose?: CloseDialog;\n onConfirm?: ConfirmCallback;\n onCancel?: CancelCallback;\n onBeforeExecute?: (values: TCommand) => TCommand;\n okLabel?: string;\n nextLabel?: string;\n previousLabel?: string;\n children?: React.ReactNode;\n} & StepperCustomizationProps) => {\n const { setCommandValues, setCommandResult, isValid: isCommandFormValid, getFieldError } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const [isBusy, setIsBusy] = useState(false);\n const [activeStep, setActiveStep] = useState(0);\n const [visitedSteps, setVisitedSteps] = useState<Set<number>>(new Set([0]));\n\n let contextCloseDialog: ((result: DialogResult) => void) | undefined;\n try {\n const context = useDialogContext();\n contextCloseDialog = context?.closeDialog;\n } catch {\n contextCloseDialog = undefined;\n }\n\n const stepCount = React.Children.count(children);\n const isLastStep = activeStep === stepCount - 1;\n const isFirstStep = activeStep === 0;\n const isDialogValid = isValid !== false && isCommandFormValid;\n\n // Pre-compute the command property names for each StepperPanel step.\n // Used to determine whether a step has validation errors for the indicator badge.\n const stepFieldNames = useMemo(\n () => React.Children.toArray(children).map((step) => {\n if (!React.isValidElement(step)) return [] as string[];\n const stepProps = step.props as Record<string, unknown>;\n return extractFieldNamesFromNode(stepProps.children as React.ReactNode);\n }),\n [children]\n );\n\n const stepHasError = (stepIndex: number): boolean =>\n stepFieldNames[stepIndex]?.some(fieldName => !!(getFieldError?.(fieldName))) ?? false;\n\n const handleClose = async (result: DialogResult) => {\n let shouldCloseThroughContext = true;\n\n if (result === DialogResult.Ok || result === DialogResult.Yes) {\n if (onConfirm) {\n const closeResult = await onConfirm();\n shouldCloseThroughContext = closeResult === true;\n } else if (onClose) {\n const closeResult = await onClose(result);\n shouldCloseThroughContext = closeResult !== false;\n }\n } else {\n if (onCancel) {\n const closeResult = await onCancel();\n shouldCloseThroughContext = closeResult === true;\n } else if (onClose) {\n const closeResult = await onClose(result);\n shouldCloseThroughContext = closeResult !== false;\n }\n }\n\n if (shouldCloseThroughContext) {\n contextCloseDialog?.(result);\n }\n };\n\n const handleSubmit = async () => {\n if (onBeforeExecute) {\n const transformedValues = onBeforeExecute(commandInstance);\n setCommandValues(transformedValues);\n }\n\n setIsBusy(true);\n let result: ICommandResult<unknown>;\n\n try {\n result = await (commandInstance as unknown as { execute: () => Promise<ICommandResult<unknown>> }).execute();\n } finally {\n setIsBusy(false);\n }\n\n if (!result.isSuccess) {\n setCommandResult(result);\n return;\n }\n\n await handleClose(DialogResult.Ok);\n };\n\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return React.Children.map(nodes, (child) => {\n if (!React.isValidElement(child)) return child;\n\n const component = child.type as React.ComponentType<unknown>;\n if (component.displayName === 'CommandFormField') {\n type FieldElement = Parameters<typeof CommandFormFieldWrapper>[0]['field'];\n return <CommandFormFieldWrapper field={child as unknown as FieldElement} />;\n }\n\n const childProps = child.props as Record<string, unknown>;\n if (childProps.children != null) {\n return React.cloneElement(child as React.ReactElement<Record<string, unknown>>, {\n children: processChildren(childProps.children as React.ReactNode)\n });\n }\n\n return child;\n });\n };\n\n /**\n * Builds the passthrough `pt` object for PrimeStepper, injecting an inline\n * style onto the step *number* span to colour it red (errors) or green (visited\n * and valid). Targeting the number span — rather than the header `<li>` — means\n * PrimeReact's default `p-stepper-header` class and all its layout/separator\n * CSS are never disturbed.\n * Merges with any user-supplied `pt` prop.\n */\n const stepperPt = useMemo(() => {\n type StepContext = { context: { index: number } };\n type NumberPtFn = (opts: StepContext) => Record<string, unknown>;\n\n const userPt = pt as Record<string, unknown> | undefined;\n const userStepperPanelPt = userPt?.stepperpanel as Record<string, unknown> | undefined;\n const userNumberPt = userStepperPanelPt?.number;\n\n return {\n ...userPt,\n stepperpanel: {\n ...userStepperPanelPt,\n number: (opts: StepContext) => {\n const existing: Record<string, unknown> =\n typeof userNumberPt === 'function'\n ? (userNumberPt as NumberPtFn)(opts)\n : (userNumberPt as Record<string, unknown> | undefined) ?? {};\n const idx = opts.context.index;\n const hasError = stepFieldNames[idx]?.some(fieldName => !!(getFieldError?.(fieldName))) ?? false;\n const isVisited = visitedSteps.has(idx);\n\n const bgColor = hasError\n ? 'var(--red-500, #ef4444)'\n : isVisited\n ? 'var(--green-500, #22c55e)'\n : null;\n\n if (!bgColor) return existing;\n const existingStyle = existing.style as Record<string, unknown> | undefined;\n return {\n ...existing,\n style: { ...existingStyle, backgroundColor: bgColor, color: '#fff' }\n };\n }\n }\n };\n }, [pt, stepFieldNames, getFieldError, visitedSteps]);\n\n const headerElement = (\n <div className=\"inline-flex align-items-center justify-content-center gap-2\">\n <span className=\"font-bold white-space-nowrap\">{title}</span>\n </div>\n );\n\n const footer = (\n <div className=\"flex align-items-center w-full gap-3\">\n {!isFirstStep && (\n <Button\n label={previousLabel}\n icon=\"pi pi-arrow-left\"\n onClick={() => setActiveStep(s => s - 1)}\n disabled={isBusy}\n outlined\n />\n )}\n <div className=\"flex-1\" />\n {!isLastStep && (\n <Button\n label={nextLabel}\n icon=\"pi pi-arrow-right\"\n iconPos=\"right\"\n onClick={() => {\n setVisitedSteps(prev => new Set(prev).add(activeStep));\n setActiveStep(s => s + 1);\n }}\n disabled={isBusy || stepHasError(activeStep)}\n />\n )}\n {isLastStep && isDialogValid && (\n <Button\n label={okLabel}\n icon=\"pi pi-check\"\n onClick={handleSubmit}\n loading={isBusy}\n disabled={isBusy}\n autoFocus\n />\n )}\n </div>\n );\n\n return (\n <PrimeDialog\n header={headerElement}\n modal\n footer={footer}\n onHide={() => handleClose(DialogResult.Cancelled)}\n visible={visible}\n style={{ width, ...style }}\n resizable={resizable}\n closable\n >\n <PrimeStepper\n activeStep={activeStep}\n linear={linear}\n orientation={orientation}\n headerPosition={headerPosition}\n onChangeStep={onChangeStep}\n start={start}\n end={end}\n pt={stepperPt as StepperProps['pt']}\n ptOptions={ptOptions}\n unstyled={unstyled}\n >\n {processChildren(children)}\n </PrimeStepper>\n </PrimeDialog>\n );\n};\n\nconst StepperCommandDialogComponent = <TCommand extends object = object>(\n props: StepperCommandDialogProps<TCommand>\n) => {\n const {\n title,\n visible,\n width,\n style,\n resizable,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n okLabel,\n nextLabel,\n previousLabel,\n orientation,\n headerPosition,\n linear,\n onChangeStep,\n start,\n end,\n pt,\n ptOptions,\n unstyled,\n children,\n ...commandFormProps\n } = props;\n\n return (\n <CommandForm<TCommand> {...commandFormProps}>\n <StepperCommandDialogWrapper<TCommand>\n title={title}\n visible={visible}\n width={width}\n style={style}\n resizable={resizable}\n isValid={isValid}\n onClose={onClose}\n onConfirm={onConfirm}\n onCancel={onCancel}\n onBeforeExecute={commandFormProps.onBeforeExecute}\n okLabel={okLabel}\n nextLabel={nextLabel}\n previousLabel={previousLabel}\n orientation={orientation}\n headerPosition={headerPosition}\n linear={linear}\n onChangeStep={onChangeStep}\n start={start}\n end={end}\n pt={pt}\n ptOptions={ptOptions}\n unstyled={unstyled}\n >\n {children}\n </StepperCommandDialogWrapper>\n </CommandForm>\n );\n};\n\nexport const StepperCommandDialog = StepperCommandDialogComponent;\n"],"names":["useCommandFormContext","useCommandInstance","useState","useDialogContext","useMemo","DialogResult","_jsx","CommandFormFieldWrapper","_jsxs","Button","PrimeDialog","PrimeStepper","CommandForm"],"mappings":";;;;;;;;;;;AAqBA,MAAM,eAAe,GAAG,CAAC,QAA+C,KAAY;IAChF,IAAI,OAAO,QAAQ,KAAK,UAAU;AAAE,QAAA,OAAO,EAAE;AAC7C,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,8BAA8B,CAAC;AACzD,IAAA,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE;AAChC,CAAC;AAGD,MAAM,yBAAyB,GAAG,CAAC,KAAsB,KAAc;IACnE,MAAM,KAAK,GAAa,EAAE;IAC1B,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,KAAI;AACpC,QAAA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;YAAE;AAClC,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,IAAoC;AAC5D,QAAA,IAAK,SAAsC,CAAC,WAAW,KAAK,kBAAkB,EAAE;AAC5E,YAAA,MAAM,UAAU,GAAG,KAAK,CAAC,KAA8C;YACvE,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC;AAC9C,YAAA,IAAI,IAAI;AAAE,gBAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B;AACA,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,KAAgC;AACzD,QAAA,IAAI,UAAU,CAAC,QAAQ,IAAI,IAAI,EAAE;YAC7B,KAAK,CAAC,IAAI,CAAC,GAAG,yBAA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,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,gBAAgB,CAAC,eAAe,EACjD,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,EAAA,CACiB,EAAA,CACpB;AAEtB,CAAC;AAEM,MAAM,oBAAoB,GAAG;;;;"}
1
+ {"version":3,"file":"StepperCommandDialog.js","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"sourcesContent":[null],"names":["useCommandFormContext","useCommandInstance","useState","useDialogContext","useMemo","DialogResult","_jsx","CommandFormFieldWrapper","_jsxs","Button","PrimeDialog","PrimeStepper","CommandForm"],"mappings":";;;;;;;;;;;AAmBA;AACA,MAAM,eAAe,GAAG,CAAC,QAA+C,KAAY;IAChF,IAAI,OAAO,QAAQ,KAAK,UAAU;AAAE,QAAA,OAAO,EAAE;AAC7C,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,8BAA8B,CAAC;AACzD,IAAA,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE;AAChC,CAAC;AAED;AACA,MAAM,yBAAyB,GAAG,CAAC,KAAsB,KAAc;IACnE,MAAM,KAAK,GAAa,EAAE;IAC1B,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KA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SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAAA,QAAA,EAEjB,QAAQ,EAAA,CACiB,EAAA,CACpB;AAEtB,CAAC;AAEM,MAAM,oBAAoB,GAAG;;;;"}
@@ -3,7 +3,8 @@
3
3
  var CommandDialog = require('./CommandDialog.js');
4
4
  var StepperCommandDialog = require('./StepperCommandDialog.js');
5
5
 
6
-
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
8
 
8
9
  exports.CommandDialog = CommandDialog.CommandDialog;
9
10
  exports.StepperCommandDialog = StepperCommandDialog.StepperCommandDialog;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../CommandDialog/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;AACA;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarField.js","sources":["../../../../CommandForm/fields/CalendarField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\nimport { Calendar } from 'primereact/calendar';\nimport React from 'react';\n\ninterface CalendarFieldComponentProps extends WrappedFieldProps<Date | null> {\n placeholder?: string;\n dateFormat?: string;\n showIcon?: boolean;\n showTime?: boolean;\n hourFormat?: '12' | '24';\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport const CalendarField = asCommandFormField<CalendarFieldComponentProps>(\n (props) => (\n <Calendar\n value={props.value}\n onChange={(e: { value: Date | null | undefined }) => props.onChange(e.value ?? null)}\n onBlur={props.onBlur}\n invalid={props.invalid}\n placeholder={props.placeholder}\n dateFormat={props.dateFormat}\n showIcon={props.showIcon}\n showTime={props.showTime}\n hourFormat={props.hourFormat}\n minDate={props.minDate}\n maxDate={props.maxDate}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: null,\n extractValue: (e: unknown) => e instanceof Date ? e : null\n }\n);\n"],"names":["asCommandFormField","_jsx","Calendar"],"mappings":";;;;;;MAiBa,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,cAAA,CAACC,iBAAQ,EAAA,EACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAqC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,EACpF,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK,CAAC,YAAY,IAAI,GAAG,CAAC,GAAG;AACzD,CAAA;;;;"}
1
+ {"version":3,"file":"CalendarField.js","sources":["../../../../CommandForm/fields/CalendarField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","Calendar"],"mappings":";;;;;;MAiBa,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,cAAA,CAACC,iBAAQ,EAAA,EACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAqC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,EACpF,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK,CAAC,YAAY,IAAI,GAAG,CAAC,GAAG;AACzD,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxField.js","sources":["../../../../CommandForm/fields/CheckboxField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Checkbox } from 'primereact/checkbox';\nimport React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\n\ninterface CheckboxFieldComponentProps extends WrappedFieldProps<boolean> {\n label?: string;\n}\n\nexport const CheckboxField = asCommandFormField<CheckboxFieldComponentProps>(\n (props) => (\n <div className=\"flex align-items-center\">\n <Checkbox\n checked={props.value}\n onChange={props.onChange}\n onBlur={props.onBlur}\n invalid={props.invalid}\n />\n {props.label && <label className=\"ml-2\">{props.label}</label>}\n </div>\n ),\n {\n defaultValue: false,\n extractValue: (e: { checked: boolean }) => e.checked\n }\n);\n"],"names":["asCommandFormField","_jsxs","_jsx","Checkbox"],"mappings":";;;;;;AAWO,MAAM,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yBAAyB,EAAA,QAAA,EAAA,CACpCC,cAAA,CAACC,iBAAQ,EAAA,EACL,OAAO,EAAE,KAAK,CAAC,KAAK,EACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EAAA,CACxB,EACD,KAAK,CAAC,KAAK,IAAID,cAAA,CAAA,OAAA,EAAA,EAAO,SAAS,EAAC,MAAM,EAAA,QAAA,EAAE,KAAK,CAAC,KAAK,EAAA,CAAS,CAAA,EAAA,CAC3D,CACT,EACD;AACI,IAAA,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,CAAC,CAAuB,KAAK,CAAC,CAAC;AAChD,CAAA;;;;"}
1
+ {"version":3,"file":"CheckboxField.js","sources":["../../../../CommandForm/fields/CheckboxField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsxs","_jsx","Checkbox"],"mappings":";;;;;;AAWO,MAAM,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yBAAyB,EAAA,QAAA,EAAA,CACpCC,cAAA,CAACC,iBAAQ,EAAA,EACL,OAAO,EAAE,KAAK,CAAC,KAAK,EACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EAAA,CACxB,EACD,KAAK,CAAC,KAAK,IAAID,cAAA,CAAA,OAAA,EAAA,EAAO,SAAS,EAAC,MAAM,EAAA,QAAA,EAAE,KAAK,CAAC,KAAK,EAAA,CAAS,CAAA,EAAA,CAC3D,CACT,EACD;AACI,IAAA,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,CAAC,CAAuB,KAAK,CAAC,CAAC;AAChD,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChipsField.js","sources":["../../../../CommandForm/fields/ChipsField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\nimport { Chips } from 'primereact/chips';\nimport React from 'react';\n\ninterface ChipsFieldComponentProps extends WrappedFieldProps<string[]> {\n placeholder?: string;\n max?: number;\n separator?: string;\n addOnBlur?: boolean;\n allowDuplicate?: boolean;\n}\n\nexport const ChipsField = asCommandFormField<ChipsFieldComponentProps>(\n (props) => (\n <Chips\n value={props.value}\n onChange={(e: { value: string[] | null | undefined }) => props.onChange(e.value ?? [])}\n onBlur={props.onBlur}\n invalid={props.invalid}\n placeholder={props.placeholder}\n max={props.max}\n separator={props.separator}\n addOnBlur={props.addOnBlur}\n allowDuplicate={props.allowDuplicate}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: [],\n extractValue: (e: unknown) => {\n if (!Array.isArray(e)) {\n return [];\n }\n\n return e.filter((item): item is string => typeof item === 'string');\n }\n }\n);\n"],"names":["asCommandFormField","_jsx","Chips"],"mappings":";;;;;;AAeO,MAAM,UAAU,GAAGA,2BAAkB,CACxC,CAAC,KAAK,MACFC,cAAA,CAACC,WAAK,IACF,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAyC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,EACtF,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAI;QACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;AACnB,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAqB,OAAO,IAAI,KAAK,QAAQ,CAAC;IACvE;AACH,CAAA;;;;"}
1
+ {"version":3,"file":"ChipsField.js","sources":["../../../../CommandForm/fields/ChipsField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","Chips"],"mappings":";;;;;;AAeO,MAAM,UAAU,GAAGA,2BAAkB,CACxC,CAAC,KAAK,MACFC,cAAA,CAACC,WAAK,IACF,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAyC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,EACtF,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAI;QACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;AACnB,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAqB,OAAO,IAAI,KAAK,QAAQ,CAAC;IACvE;AACH,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPickerField.js","sources":["../../../../CommandForm/fields/ColorPickerField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\nimport { ColorPicker } from 'primereact/colorpicker';\nimport React from 'react';\n\ninterface ColorPickerFieldComponentProps extends WrappedFieldProps<string> {\n inline?: boolean;\n defaultColor?: string;\n}\n\nexport const ColorPickerField = asCommandFormField<ColorPickerFieldComponentProps>(\n (props) => {\n const defaultColor = props.defaultColor ?? '000000';\n const value = typeof props.value === 'string' && props.value.length > 0 ? props.value : defaultColor;\n\n return (\n <ColorPicker\n value={value}\n onChange={(e: { value: unknown }) => props.onChange(typeof e.value === 'string' ? e.value : '')}\n onBlur={props.onBlur}\n inline={props.inline}\n defaultColor={defaultColor}\n className={props.invalid ? 'p-invalid' : undefined}\n />\n );\n },\n {\n defaultValue: '',\n extractValue: (e: unknown) => typeof e === 'string' ? e : ''\n }\n);\n"],"names":["asCommandFormField","_jsx","ColorPicker"],"mappings":";;;;;;MAYa,gBAAgB,GAAGA,2BAAkB,CAC9C,CAAC,KAAK,KAAI;AACN,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,QAAQ;IACnD,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,YAAY;AAEpG,IAAA,QACIC,cAAA,CAACC,uBAAW,EAAA,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAqB,KAAK,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,EAC/F,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,KAAK,CAAC,OAAO,GAAG,WAAW,GAAG,SAAS,EAAA,CACpD;AAEV,CAAC,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG;AAC7D,CAAA;;;;"}
1
+ {"version":3,"file":"ColorPickerField.js","sources":["../../../../CommandForm/fields/ColorPickerField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","ColorPicker"],"mappings":";;;;;;MAYa,gBAAgB,GAAGA,2BAAkB,CAC9C,CAAC,KAAK,KAAI;AACN,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,QAAQ;IACnD,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,YAAY;AAEpG,IAAA,QACIC,cAAA,CAACC,uBAAW,EAAA,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAqB,KAAK,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,EAC/F,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,KAAK,CAAC,OAAO,GAAG,WAAW,GAAG,SAAS,EAAA,CACpD;AAEV,CAAC,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG;AAC7D,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownField.js","sources":["../../../../CommandForm/fields/DropdownField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Dropdown } from 'primereact/dropdown';\nimport React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\n\ninterface DropdownFieldComponentProps extends WrappedFieldProps<string | number> {\n options: Array<{ [key: string]: unknown }>;\n optionValue: string;\n optionLabel: string;\n placeholder?: string;\n}\n\nexport const DropdownField = asCommandFormField<DropdownFieldComponentProps>(\n (props) => (\n <Dropdown\n value={props.value}\n onChange={(e) => props.onChange(e.value)}\n onBlur={props.onBlur}\n options={props.options}\n optionValue={props.optionValue}\n optionLabel={props.optionLabel}\n placeholder={props.placeholder}\n invalid={props.invalid}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: '',\n extractValue: (e: unknown) => e as string | number\n }\n);\n"],"names":["asCommandFormField","_jsx","Dropdown"],"mappings":";;;;;;AAcO,MAAM,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,cAAA,CAACC,iBAAQ,EAAA,EACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK;AACjC,CAAA;;;;"}
1
+ {"version":3,"file":"DropdownField.js","sources":["../../../../CommandForm/fields/DropdownField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","Dropdown"],"mappings":";;;;;;AAcO,MAAM,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,cAAA,CAACC,iBAAQ,EAAA,EACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK;AACjC,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputTextField.js","sources":["../../../../CommandForm/fields/InputTextField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { InputText } from 'primereact/inputtext';\nimport React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\n\ninterface InputTextComponentProps extends WrappedFieldProps<string> {\n type?: 'text' | 'email' | 'password' | 'color' | 'date' | 'datetime-local' | 'time' | 'url' | 'tel' | 'search';\n placeholder?: string;\n}\n\nexport const InputTextField = asCommandFormField<InputTextComponentProps>(\n (props) => (\n <InputText\n type={props.type || 'text'}\n value={props.value}\n onChange={props.onChange}\n onBlur={props.onBlur}\n invalid={props.invalid}\n placeholder={props.placeholder}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: '',\n extractValue: (e: React.ChangeEvent<HTMLInputElement>) => e.target.value\n }\n);\n"],"names":["asCommandFormField","_jsx","InputText"],"mappings":";;;;;;AAYO,MAAM,cAAc,GAAGA,2BAAkB,CAC5C,CAAC,KAAK,MACFC,cAAA,CAACC,mBAAS,EAAA,EACN,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,MAAM,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,CAAC,CAAsC,KAAK,CAAC,CAAC,MAAM,CAAC;AACtE,CAAA;;;;"}
1
+ {"version":3,"file":"InputTextField.js","sources":["../../../../CommandForm/fields/InputTextField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","InputText"],"mappings":";;;;;;AAYO,MAAM,cAAc,GAAGA,2BAAkB,CAC5C,CAAC,KAAK,MACFC,cAAA,CAACC,mBAAS,EAAA,EACN,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,MAAM,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,CAAC,CAAsC,KAAK,CAAC,CAAC,MAAM,CAAC;AACtE,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectField.js","sources":["../../../../CommandForm/fields/MultiSelectField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\nimport { MultiSelect } from 'primereact/multiselect';\nimport React from 'react';\n\ninterface MultiSelectFieldComponentProps extends WrappedFieldProps<Array<string | number>> {\n options: Array<Record<string, unknown>>;\n optionValue?: string;\n optionLabel?: string;\n placeholder?: string;\n display?: 'comma' | 'chip';\n maxSelectedLabels?: number;\n filter?: boolean;\n showClear?: boolean;\n}\n\nexport const MultiSelectField = asCommandFormField<MultiSelectFieldComponentProps>(\n (props) => (\n <MultiSelect\n value={props.value}\n onChange={(e: { value: Array<string | number> | undefined }) => props.onChange(e.value ?? [])}\n onBlur={props.onBlur}\n options={props.options}\n optionValue={props.optionValue}\n optionLabel={props.optionLabel}\n placeholder={props.placeholder}\n display={props.display}\n maxSelectedLabels={props.maxSelectedLabels}\n filter={props.filter}\n showClear={props.showClear}\n invalid={props.invalid}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: [],\n extractValue: (e: unknown) => {\n if (!Array.isArray(e)) {\n return [];\n }\n\n return e.filter((item): item is string | number => typeof item === 'string' || typeof item === 'number');\n }\n }\n);\n"],"names":["asCommandFormField","_jsx","MultiSelect"],"mappings":";;;;;;MAkBa,gBAAgB,GAAGA,2BAAkB,CAC9C,CAAC,KAAK,MACFC,cAAA,CAACC,uBAAW,EAAA,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAgD,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,EAC7F,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAC1C,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAI;QACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;AACnB,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAA8B,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC;IAC5G;AACH,CAAA;;;;"}
1
+ {"version":3,"file":"MultiSelectField.js","sources":["../../../../CommandForm/fields/MultiSelectField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","MultiSelect"],"mappings":";;;;;;MAkBa,gBAAgB,GAAGA,2BAAkB,CAC9C,CAAC,KAAK,MACFC,cAAA,CAACC,uBAAW,EAAA,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAgD,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,EAC7F,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAC1C,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAI;QACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;AACnB,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAA8B,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC;IAC5G;AACH,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.js","sources":["../../../../CommandForm/fields/NumberField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { InputNumber } from 'primereact/inputnumber';\nimport React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\n\ninterface NumberFieldComponentProps extends WrappedFieldProps<number> {\n placeholder?: string;\n min?: number;\n max?: number;\n step?: number;\n}\n\nexport const NumberField = asCommandFormField<NumberFieldComponentProps>(\n (props) => (\n <InputNumber\n value={props.value}\n onValueChange={(e) => props.onChange(e.value ?? 0)}\n onBlur={props.onBlur}\n invalid={props.invalid}\n placeholder={props.placeholder}\n min={props.min}\n max={props.max}\n step={props.step}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: 0,\n extractValue: (e: unknown) => (typeof e === 'number' ? e : 0)\n }\n);\n"],"names":["asCommandFormField","_jsx","InputNumber"],"mappings":";;;;;;AAcO,MAAM,WAAW,GAAGA,2BAAkB,CACzC,CAAC,KAAK,MACFC,cAAA,CAACC,uBAAW,EAAA,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,aAAa,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAClD,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,YAAY,EAAE,CAAC,CAAU,MAAM,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC;AAC/D,CAAA;;;;"}
1
+ {"version":3,"file":"NumberField.js","sources":["../../../../CommandForm/fields/NumberField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","InputNumber"],"mappings":";;;;;;AAcO,MAAM,WAAW,GAAGA,2BAAkB,CACzC,CAAC,KAAK,MACFC,cAAA,CAACC,uBAAW,EAAA,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,aAAa,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAClD,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,YAAY,EAAE,CAAC,CAAU,MAAM,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC;AAC/D,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SliderField.js","sources":["../../../../CommandForm/fields/SliderField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Slider } from 'primereact/slider';\nimport React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\n\ninterface SliderFieldComponentProps extends WrappedFieldProps<number> {\n min?: number;\n max?: number;\n step?: number;\n}\n\nexport const SliderField = asCommandFormField<SliderFieldComponentProps>(\n (props) => (\n <div className=\"w-full\" onBlur={props.onBlur}>\n <Slider\n value={props.value}\n onChange={(e) => props.onChange(e.value)}\n min={props.min ?? 0}\n max={props.max ?? 100}\n step={props.step ?? 1}\n className=\"w-full\"\n />\n <div className=\"text-center mt-2\">\n <span className=\"font-semibold\">{props.value}</span>\n </div>\n </div>\n ),\n {\n defaultValue: 0,\n extractValue: (e: unknown) => (typeof e === 'number' ? e : 0)\n }\n);\n"],"names":["asCommandFormField","_jsxs","_jsx","Slider"],"mappings":";;;;;;MAaa,WAAW,GAAGA,2BAAkB,CACzC,CAAC,KAAK,MACFC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,QAAQ,EAAC,MAAM,EAAE,KAAK,CAAC,MAAM,aACxCC,cAAA,CAACC,aAAM,IACH,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,EACnB,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,GAAG,EACrB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,EACrB,SAAS,EAAC,QAAQ,EAAA,CACpB,EACFD,wBAAK,SAAS,EAAC,kBAAkB,EAAA,QAAA,EAC7BA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,eAAe,YAAE,KAAK,CAAC,KAAK,EAAA,CAAQ,EAAA,CAClD,CAAA,EAAA,CACJ,CACT,EACD;AACI,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,YAAY,EAAE,CAAC,CAAU,MAAM,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC;AAC/D,CAAA;;;;"}
1
+ {"version":3,"file":"SliderField.js","sources":["../../../../CommandForm/fields/SliderField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsxs","_jsx","Slider"],"mappings":";;;;;;MAaa,WAAW,GAAGA,2BAAkB,CACzC,CAAC,KAAK,MACFC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,QAAQ,EAAC,MAAM,EAAE,KAAK,CAAC,MAAM,aACxCC,cAAA,CAACC,aAAM,IACH,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,EACnB,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,GAAG,EACrB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,EACrB,SAAS,EAAC,QAAQ,EAAA,CACpB,EACFD,wBAAK,SAAS,EAAC,kBAAkB,EAAA,QAAA,EAC7BA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,eAAe,YAAE,KAAK,CAAC,KAAK,EAAA,CAAQ,EAAA,CAClD,CAAA,EAAA,CACJ,CACT,EACD;AACI,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,YAAY,EAAE,CAAC,CAAU,MAAM,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC;AAC/D,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextAreaField.js","sources":["../../../../CommandForm/fields/TextAreaField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { InputTextarea } from 'primereact/inputtextarea';\nimport React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\n\ninterface TextAreaFieldComponentProps extends WrappedFieldProps<string> {\n placeholder?: string;\n rows?: number;\n cols?: number;\n}\n\nexport const TextAreaField = asCommandFormField<TextAreaFieldComponentProps>(\n (props) => (\n <InputTextarea\n value={props.value}\n onChange={props.onChange}\n onBlur={props.onBlur}\n invalid={props.invalid}\n placeholder={props.placeholder}\n rows={props.rows ?? 5}\n cols={props.cols}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: '',\n extractValue: (e: React.ChangeEvent<HTMLTextAreaElement>) => e.target.value\n }\n);\n"],"names":["asCommandFormField","_jsx","InputTextarea"],"mappings":";;;;;;AAaO,MAAM,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,eAACC,2BAAa,EAAA,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,EACrB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,CAAC,CAAyC,KAAK,CAAC,CAAC,MAAM,CAAC;AACzE,CAAA;;;;"}
1
+ {"version":3,"file":"TextAreaField.js","sources":["../../../../CommandForm/fields/TextAreaField.tsx"],"sourcesContent":[null],"names":["asCommandFormField","_jsx","InputTextarea"],"mappings":";;;;;;AAaO,MAAM,aAAa,GAAGA,2BAAkB,CAC3C,CAAC,KAAK,MACFC,eAACC,2BAAa,EAAA,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,EACrB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,CAAC,CAAyC,KAAK,CAAC,CAAC,MAAM,CAAC;AACzE,CAAA;;;;"}
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var commands = require('@cratis/arc.react/commands');
4
3
  var InputTextField = require('./fields/InputTextField.js');
5
4
  var NumberField = require('./fields/NumberField.js');
6
5
  var CheckboxField = require('./fields/CheckboxField.js');
@@ -12,40 +11,9 @@ var ColorPickerField = require('./fields/ColorPickerField.js');
12
11
  var MultiSelectField = require('./fields/MultiSelectField.js');
13
12
  var ChipsField = require('./fields/ChipsField.js');
14
13
 
14
+ // Copyright (c) Cratis. All rights reserved.
15
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
15
16
 
16
-
17
- Object.defineProperty(exports, "CommandForm", {
18
- enumerable: true,
19
- get: function () { return commands.CommandForm; }
20
- });
21
- Object.defineProperty(exports, "CommandFormField", {
22
- enumerable: true,
23
- get: function () { return commands.CommandFormField; }
24
- });
25
- Object.defineProperty(exports, "CommandFormFields", {
26
- enumerable: true,
27
- get: function () { return commands.CommandFormFields; }
28
- });
29
- Object.defineProperty(exports, "ValidationMessage", {
30
- enumerable: true,
31
- get: function () { return commands.ValidationMessage; }
32
- });
33
- Object.defineProperty(exports, "asCommandFormField", {
34
- enumerable: true,
35
- get: function () { return commands.asCommandFormField; }
36
- });
37
- Object.defineProperty(exports, "useCommandFormContext", {
38
- enumerable: true,
39
- get: function () { return commands.useCommandFormContext; }
40
- });
41
- Object.defineProperty(exports, "useCommandInstance", {
42
- enumerable: true,
43
- get: function () { return commands.useCommandInstance; }
44
- });
45
- Object.defineProperty(exports, "useSetCommandResult", {
46
- enumerable: true,
47
- get: function () { return commands.useSetCommandResult; }
48
- });
49
17
  exports.InputTextField = InputTextField.InputTextField;
50
18
  exports.NumberField = NumberField.NumberField;
51
19
  exports.CheckboxField = CheckboxField.CheckboxField;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../CommandForm/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sources":["../../../Common/ErrorBoundary.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Component, ErrorInfo, ReactNode } from 'react';\n\ninterface Props {\n children: ReactNode;\n}\ninterface State {\n hasError: boolean;\n error: Error;\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n public state: State = {\n hasError: false,\n error: new Error(),\n };\n\n public static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error: error };\n }\n\n public componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('Uncaught error:', error, errorInfo);\n }\n\n public render() {\n if (this.state.hasError) {\n return (\n <div className='p-4'>\n <h1 className='text-3xl m-3'>Error</h1>\n <p>{this.state.error.message}</p>\n <p>{this.state.error.stack}</p>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n"],"names":["Component","_jsxs","_jsx"],"mappings":";;;;;AAaM,MAAO,aAAc,SAAQA,eAAuB,CAAA;AAC/C,IAAA,KAAK,GAAU;AAClB,QAAA,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,IAAI,KAAK,EAAE;KACrB;IAEM,OAAO,wBAAwB,CAAC,KAAY,EAAA;QAC/C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;IAC3C;IAEO,iBAAiB,CAAC,KAAY,EAAE,SAAoB,EAAA;QACvD,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,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,QAAA,EAAA,OAAA,EAAA,CAAW,EACvCA,cAAA,CAAA,GAAA,EAAA,EAAA,QAAA,EAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAA,CAAK,EACjCA,gCAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAA,CAAK,CAAA,EAAA,CAC7B;QAEd;AAEA,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ;IAC9B;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormElement.js","sources":["../../../Common/FormElement.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nexport interface FormElementProps {\n children: React.ReactNode;\n icon: React.ReactNode;\n}\n\nexport const FormElement = (props: FormElementProps) => {\n return (\n <div className=\"card flex flex-column md:flex-row gap-3\">\n <div className=\"p-inputgroup flex-1\">\n <span className=\"p-inputgroup-addon\">\n {props.icon}\n </span>\n {props.children}\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAQO,MAAM,WAAW,GAAG,CAAC,KAAuB,KAAI;IACnD,QACIA,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yCAAyC,EAAA,QAAA,EACpDC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAAA,CAChCD,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,oBAAoB,EAAA,QAAA,EAC/B,KAAK,CAAC,IAAI,EAAA,CACR,EACN,KAAK,CAAC,QAAQ,CAAA,EAAA,CACb,EAAA,CACJ;AAEd;;;;"}
1
+ {"version":3,"file":"FormElement.js","sources":["../../../Common/FormElement.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;AAQO,MAAM,WAAW,GAAG,CAAC,KAAuB,KAAI;IACnD,QACIA,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yCAAyC,EAAA,QAAA,EACpDC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAAA,CAChCD,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,oBAAoB,EAAA,QAAA,EAC/B,KAAK,CAAC,IAAI,EAAA,CACR,EACN,KAAK,CAAC,QAAQ,CAAA,EAAA,CACb,EAAA,CACJ;AAEd;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Page.js","sources":["../../../Common/Page.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes, ReactNode } from 'react';\n\nexport interface PageProps extends HTMLAttributes<HTMLDivElement> {\n title: string;\n showTitle?: boolean;\n children?: ReactNode;\n panel?: boolean\n}\n\nexport const Page = ({ title, showTitle = false, children, panel, ...rest }: PageProps) => {\n return (\n <div className='flex flex-col h-full flex-1' {...rest}>\n {showTitle && <h1 className='text-3xl mt-3 mb-4'>{title}</h1>}\n <main className={`overflow-hidden h-full flex flex-col flex-1 ${panel ? 'panel' : ''}`}>\n {children}\n </main>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;MAYa,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAa,KAAI;AACtF,IAAA,QACIA,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,KAAK,IAAI,EAAA,QAAA,EAAA,CAChD,SAAS,IAAIC,uBAAI,SAAS,EAAC,oBAAoB,EAAA,QAAA,EAAE,KAAK,EAAA,CAAM,EAC7DA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,CAAA,4CAAA,EAA+C,KAAK,GAAG,OAAO,GAAG,EAAE,CAAA,CAAE,EAAA,QAAA,EACjF,QAAQ,EAAA,CACN,CAAA,EAAA,CACL;AAEd;;;;"}
1
+ {"version":3,"file":"Page.js","sources":["../../../Common/Page.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;MAYa,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAa,KAAI;AACtF,IAAA,QACIA,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,KAAK,IAAI,EAAA,QAAA,EAAA,CAChD,SAAS,IAAIC,uBAAI,SAAS,EAAC,oBAAoB,EAAA,QAAA,EAAE,KAAK,EAAA,CAAM,EAC7DA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,CAAA,4CAAA,EAA+C,KAAK,GAAG,OAAO,GAAG,EAAE,CAAA,CAAE,EAAA,QAAA,EACjF,QAAQ,EAAA,CACN,CAAA,EAAA,CACL;AAEd;;;;"}
@@ -9,6 +9,10 @@ const POSITION_CLASSES = {
9
9
  top: 'bottom-full mb-2 left-1/2 -translate-x-1/2',
10
10
  bottom: 'top-full mt-2 left-1/2 -translate-x-1/2',
11
11
  };
12
+ /**
13
+ * A CSS-only hover tooltip wrapper. Wraps any child element and displays
14
+ * a styled floating label on hover without relying on native browser tooltips.
15
+ */
12
16
  const Tooltip = ({ content, position = 'top', children }) => (jsxRuntime.jsxs("div", { className: 'relative group inline-flex', children: [children, jsxRuntime.jsx("div", { role: 'tooltip', className: `tooltip-bubble pointer-events-none absolute ${POSITION_CLASSES[position]} z-50
13
17
  text-xs px-2 py-1 rounded
14
18
  whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-150 delay-200`, style: { fontFamily: 'system-ui, sans-serif' }, children: content })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../Common/Tooltip.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React from 'react';\nimport './Tooltip.css';\n\n/** Position of the tooltip relative to its trigger element. */\nexport type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';\n\n/** Props for the {@link Tooltip} component. */\nexport interface TooltipProps {\n /** The text to display inside the tooltip. */\n content: string;\n /** Where the tooltip appears relative to the trigger (default: 'top'). */\n position?: TooltipPosition;\n /** The element that triggers the tooltip on hover. */\n children: React.ReactNode;\n}\n\nconst POSITION_CLASSES: Record<TooltipPosition, string> = {\n right: 'left-full ml-2 top-1/2 -translate-y-1/2',\n left: 'right-full mr-2 top-1/2 -translate-y-1/2',\n top: 'bottom-full mb-2 left-1/2 -translate-x-1/2',\n bottom: 'top-full mt-2 left-1/2 -translate-x-1/2',\n};\n\n/**\n * A CSS-only hover tooltip wrapper. Wraps any child element and displays\n * a styled floating label on hover without relying on native browser tooltips.\n */\nexport const Tooltip: React.FC<TooltipProps> = ({ content, position = 'top', children }) => (\n <div className='relative group inline-flex'>\n {children}\n <div\n role='tooltip'\n className={`tooltip-bubble pointer-events-none absolute ${POSITION_CLASSES[position]} z-50\n text-xs px-2 py-1 rounded\n whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-150 delay-200`}\n style={{ fontFamily: 'system-ui, sans-serif' }}\n >\n {content}\n </div>\n </div>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;AAmBA,MAAM,gBAAgB,GAAoC;AACtD,IAAA,KAAK,EAAG,yCAAyC;AACjD,IAAA,IAAI,EAAI,0CAA0C;AAClD,IAAA,GAAG,EAAK,4CAA4C;AACpD,IAAA,MAAM,EAAE,yCAAyC;CACpD;AAMM,MAAM,OAAO,GAA2B,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,MACnFA,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EAAA,CACtC,QAAQ,EACTC,wBACI,IAAI,EAAC,SAAS,EACd,SAAS,EAAE,CAAA,4CAAA,EAA+C,gBAAgB,CAAC,QAAQ,CAAC,CAAA;;AAEc,6GAAA,CAAA,EAClG,KAAK,EAAE,EAAE,UAAU,EAAE,uBAAuB,EAAE,EAAA,QAAA,EAE7C,OAAO,EAAA,CACN,CAAA,EAAA,CACJ;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../Common/Tooltip.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;AAmBA,MAAM,gBAAgB,GAAoC;AACtD,IAAA,KAAK,EAAG,yCAAyC;AACjD,IAAA,IAAI,EAAI,0CAA0C;AAClD,IAAA,GAAG,EAAK,4CAA4C;AACpD,IAAA,MAAM,EAAE,yCAAyC;CACpD;AAED;;;AAGG;AACI,MAAM,OAAO,GAA2B,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,MACnFA,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EAAA,CACtC,QAAQ,EACTC,wBACI,IAAI,EAAC,SAAS,EACd,SAAS,EAAE,CAAA,4CAAA,EAA+C,gBAAgB,CAAC,QAAQ,CAAC,CAAA;;AAEc,6GAAA,CAAA,EAClG,KAAK,EAAE,EAAE,UAAU,EAAE,uBAAuB,EAAE,EAAA,QAAA,EAE7C,OAAO,EAAA,CACN,CAAA,EAAA,CACJ;;;;"}
@@ -5,7 +5,8 @@ var Page = require('./Page.js');
5
5
  var FormElement = require('./FormElement.js');
6
6
  var Tooltip = require('./Tooltip.js');
7
7
 
8
-
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
9
10
 
10
11
  exports.ErrorBoundary = ErrorBoundary.ErrorBoundary;
11
12
  exports.Page = Page.Page;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../Common/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;"}
@@ -9,6 +9,7 @@ var DataTableForObservableQuery = require('../DataTables/DataTableForObservableQ
9
9
  var DataTableForQuery = require('../DataTables/DataTableForQuery.js');
10
10
  var allotment = require('allotment');
11
11
 
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
12
13
  const MenuItem = (_) => {
13
14
  return null;
14
15
  };
@@ -42,6 +43,11 @@ const Columns = ({ children }) => {
42
43
  }
43
44
  };
44
45
  const DataPageContext = React.createContext(null);
46
+ /**
47
+ * Represents a data driven page with a menu and custom defined columns for the data table.
48
+ * @param props Props for the DataPage component
49
+ * @returns Function to render the DataPage component
50
+ */
45
51
  const DataPage = (props) => {
46
52
  const [selectedItem, setSelectedItem] = React.useState(undefined);
47
53
  const selectionChanged = (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"DataPage.js","sources":["../../../DataPage/DataPage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode, useMemo } from 'react';\nimport { Page } from '../Common/Page';\nimport React from 'react';\nimport { MenuItem as PrimeMenuItem } from 'primereact/menuitem';\nimport { Menubar } from 'primereact/menubar';\nimport { IObservableQueryFor, IQueryFor, QueryFor } from '@cratis/arc/queries';\nimport { DataTableForObservableQuery } from '../DataTables/DataTableForObservableQuery';\nimport { DataTableFilterMeta, DataTableSelectionSingleChangeEvent } from 'primereact/datatable';\nimport { DataTableForQuery } from '../DataTables/DataTableForQuery';\nimport { Allotment } from 'allotment';\nimport { Constructor } from '@cratis/fundamentals';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport interface MenuItemProps extends PrimeMenuItem {\n disableOnUnselected?: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const MenuItem = (_: MenuItemProps) => {\n return null;\n};\n\nexport interface MenuItemsProps {\n children: ReactNode;\n}\n\nexport interface ColumnProps {\n children: ReactNode;\n}\n\nexport const MenuItems = ({ children }: MenuItemsProps) => {\n const context = React.useContext(DataPageContext);\n\n const isDisabled = useMemo(() => {\n return !context.selectedItem;\n }, [context.selectedItem]);\n\n const items = useMemo(() => {\n const menuItems: PrimeMenuItem[] = [];\n React.Children.forEach(children, (child) => {\n if (React.isValidElement<MenuItemProps>(child) && child.type == MenuItem) {\n const Icon = child.props.icon;\n const menuItem = { ...child.props };\n menuItem.icon = <Icon className='mr-2' />;\n menuItem.disabled = isDisabled && child.props.disableOnUnselected;\n menuItems.push(menuItem);\n }\n });\n\n return menuItems;\n }, [children, context.selectedItem]);\n\n return (\n <div className=\"px-4 py-2\">\n <Menubar aria-label=\"Actions\" model={items} />\n </div>);\n};\n\nexport const Columns = ({ children }: ColumnProps) => {\n\n const context = React.useContext(DataPageContext);\n\n if (context.query.prototype instanceof QueryFor) {\n return (\n <DataTableForQuery\n {...context}\n selection={context.selectedItem}\n onSelectionChange={context.onSelectionChanged}\n clientFiltering={context.clientFiltering}>\n {children}\n </DataTableForQuery>);\n\n } else {\n return (\n <DataTableForObservableQuery\n {...context}\n selection={context.selectedItem}\n onSelectionChange={context.onSelectionChanged}\n clientFiltering={context.clientFiltering}>\n {children}\n </DataTableForObservableQuery>);\n }\n};\n\nexport interface IDetailsComponentProps<TDataType> {\n item: TDataType;\n onRefresh?: () => void;\n}\n\ninterface IDataPageContext extends DataPageProps<any, any, any> {\n selectedItem: any;\n onSelectionChanged: (e: DataTableSelectionSingleChangeEvent<any>) => void;\n}\n\nconst DataPageContext = React.createContext<IDataPageContext>(null as any);\n\n/**\n * Props for the DataPage component\n */\nexport interface DataPageProps<TQuery extends IQueryFor<TDataType> | IObservableQueryFor<TDataType>, TDataType, TArguments> {\n /**\n * The title of the page\n */\n title: string;\n\n /**\n * Children to render, for this it means menu items and columns. Use <DataPage.MenuItems> and <DataPage.Columns> for this.\n */\n children: ReactNode;\n\n /**\n * Component to render when the selection changes\n */\n detailsComponent?: React.FC<IDetailsComponentProps<any>>;\n\n /**\n * The type of query to use\n */\n query: Constructor<TQuery>;\n\n /**\n * Optional arguments to pass to the query\n */\n queryArguments?: TArguments;\n\n /**\n * The message to show when there is no data\n */\n emptyMessage: string;\n\n /**\n * The key to use for the data\n */\n dataKey?: string | undefined;\n\n /**\n * The current selection.\n */\n selection?: any | undefined | null;\n\n /**\n * Callback for when the selection changes\n */\n onSelectionChange?(event: DataTableSelectionSingleChangeEvent<any>): void;\n\n /**\n * Fields to use for global filtering\n */\n globalFilterFields?: string[] | undefined;\n\n /**\n * Default filters to use\n */\n defaultFilters?: DataTableFilterMeta;\n\n /**\n * When true, filtering is performed client-side only\n */\n clientFiltering?: boolean;\n\n /**\n * Callback triggered to signal data refresh\n */\n onRefresh?(): void;\n}\n\n/**\n * Represents a data driven page with a menu and custom defined columns for the data table.\n * @param props Props for the DataPage component\n * @returns Function to render the DataPage component\n */\nconst DataPage = <TQuery extends IQueryFor<TDataType> | IObservableQueryFor<TDataType, TArguments>, TDataType, TArguments extends object>(props: DataPageProps<TQuery, TDataType, TArguments>) => {\n const [selectedItem, setSelectedItem] = React.useState(undefined);\n\n const selectionChanged = (e: DataTableSelectionSingleChangeEvent<any>) => {\n setSelectedItem(e.value);\n if (props.onSelectionChange) {\n props.onSelectionChange(e);\n }\n };\n\n const context = { ...props, selectedItem, onSelectionChanged: selectionChanged };\n\n return (\n <DataPageContext.Provider value={context}>\n <Page title={props.title} panel={true}>\n <Allotment className=\"h-full\" proportionalLayout={false}>\n <Allotment.Pane className=\"flex-grow\">\n {props.children}\n </Allotment.Pane>\n {props.detailsComponent && selectedItem &&\n <Allotment.Pane preferredSize=\"450px\">\n <props.detailsComponent item={selectedItem} onRefresh={props.onRefresh} />\n </Allotment.Pane>\n }\n </Allotment>\n </Page>\n </DataPageContext.Provider>\n );\n};\n\nDataPage.MenuItems = MenuItems;\nDataPage.Columns = Columns;\n\nexport { DataPage };\n"],"names":["useMemo","_jsx","Menubar","QueryFor","DataTableForQuery","DataTableForObservableQuery","Page","_jsxs","Allotment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,QAAA,EACpCA,cAAA,CAACK,SAAI,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAA,QAAA,EACjCC,eAAA,CAACC,mBAAS,EAAA,EAAC,SAAS,EAAC,QAAQ,EAAC,kBAAkB,EAAE,KAAK,aACnDP,cAAA,CAACO,mBAAS,CAAC,IAAI,EAAA,EAAC,SAAS,EAAC,WAAW,EAAA,QAAA,EAChC,KAAK,CAAC,QAAQ,EAAA,CACF,EAChB,KAAK,CAAC,gBAAgB,IAAI,YAAY;AACnC,wBAAAP,cAAA,CAACO,mBAAS,CAAC,IAAI,EAAA,EAAC,aAAa,EAAC,OAAO,EAAA,QAAA,EACjCP,cAAA,CAAC,KAAK,CAAC,gBAAgB,EAAA,EAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAA,CAAI,EAAA,CAC7D,CAAA,EAAA,CAEb,EAAA,CACT,EAAA,CACgB;AAEnC;AAEA,QAAQ,CAAC,SAAS,GAAG,SAAS;AAC9B,QAAQ,CAAC,OAAO,GAAG,OAAO;;;;;;;"}
1
+ {"version":3,"file":"DataPage.js","sources":["../../../DataPage/DataPage.tsx"],"sourcesContent":[null],"names":["useMemo","_jsx","Menubar","QueryFor","DataTableForQuery","DataTableForObservableQuery","Page","_jsxs","Allotment"],"mappings":";;;;;;;;;;;AAqBA;AACO,MAAM,QAAQ,GAAG,CAAC,CAAgB,KAAI;AACzC,IAAA,OAAO,IAAI;AACf;MAUa,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAkB,KAAI;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC;AAEjD,IAAA,MAAM,UAAU,GAAGA,aAAO,CAAC,MAAK;AAC5B,QAAA,OAAO,CAAC,OAAO,CAAC,YAAY;AAChC,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAE1B,IAAA,MAAM,KAAK,GAAGA,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AAC,IAAI,EAAA,EAAC,aAAa,EAAC,OAAO,EAAA,QAAA,EACjCP,cAAA,CAAC,KAAK,CAAC,gBAAgB,EAAA,EAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAA,CAAI,EAAA,CAC7D,CAAA,EAAA,CAEb,EAAA,CACT,EAAA,CACgB;AAEnC;AAEA,QAAQ,CAAC,SAAS,GAAG,SAAS;AAC9B,QAAQ,CAAC,OAAO,GAAG,OAAO;;;;;;;"}
@@ -2,7 +2,8 @@
2
2
 
3
3
  var DataPage = require('./DataPage.js');
4
4
 
5
-
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
6
7
 
7
8
  exports.Columns = DataPage.Columns;
8
9
  exports.DataPage = DataPage.DataPage;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../DataPage/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;"}
@@ -8,6 +8,11 @@ var queries$1 = require('@cratis/arc.react/queries');
8
8
  var React = require('react');
9
9
 
10
10
  const paging = new queries.Paging(0, 20);
11
+ /**
12
+ * Represents a DataTable for a query.
13
+ * @param props Props for the component
14
+ * @returns Function to render the DataTableForQuery component
15
+ */
11
16
  const DataTableForObservableQuery = (props) => {
12
17
  const [filters, setFilters] = React.useState(props.defaultFilters ?? {});
13
18
  const [filteredTotal, setFilteredTotal] = React.useState(undefined);