@cratis/components 1.10.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +475 -4
- package/dist/cjs/CommandDialog/CommandDialog.js +94 -4
- package/dist/cjs/CommandDialog/CommandDialog.js.map +1 -1
- package/dist/cjs/CommandDialog/CommandStepper.js +63 -3
- package/dist/cjs/CommandDialog/CommandStepper.js.map +1 -1
- package/dist/cjs/CommandDialog/StepperCommandDialog.js +95 -6
- package/dist/cjs/CommandDialog/StepperCommandDialog.js.map +1 -1
- package/dist/cjs/CommandForm/fields/CalendarField.js +14 -1
- package/dist/cjs/CommandForm/fields/CalendarField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/CheckboxField.js +10 -1
- package/dist/cjs/CommandForm/fields/CheckboxField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/ChipsField.js +11 -1
- package/dist/cjs/CommandForm/fields/ChipsField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/ColorPickerField.js +17 -1
- package/dist/cjs/CommandForm/fields/ColorPickerField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/DropdownField.js +16 -1
- package/dist/cjs/CommandForm/fields/DropdownField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/InputTextField.js +41 -1
- package/dist/cjs/CommandForm/fields/InputTextField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/MultiSelectField.js +13 -1
- package/dist/cjs/CommandForm/fields/MultiSelectField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/NumberField.js +11 -1
- package/dist/cjs/CommandForm/fields/NumberField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/RadioButtonField.js +23 -0
- package/dist/cjs/CommandForm/fields/RadioButtonField.js.map +1 -0
- package/dist/cjs/CommandForm/fields/RadioGroupField.js +40 -0
- package/dist/cjs/CommandForm/fields/RadioGroupField.js.map +1 -0
- package/dist/cjs/CommandForm/fields/SliderField.js +10 -1
- package/dist/cjs/CommandForm/fields/SliderField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/TextAreaField.js +12 -1
- package/dist/cjs/CommandForm/fields/TextAreaField.js.map +1 -1
- package/dist/cjs/CommandForm/index.js +4 -0
- package/dist/cjs/CommandForm/index.js.map +1 -1
- package/dist/cjs/Common/CratisComponentsProvider.js +44 -0
- package/dist/cjs/Common/CratisComponentsProvider.js.map +1 -0
- package/dist/cjs/Common/ErrorBoundary.js +32 -0
- package/dist/cjs/Common/ErrorBoundary.js.map +1 -1
- package/dist/cjs/Common/FormElement.css +26 -0
- package/dist/cjs/Common/FormElement.js +14 -1
- package/dist/cjs/Common/FormElement.js.map +1 -1
- package/dist/cjs/Common/Page.js +13 -0
- package/dist/cjs/Common/Page.js.map +1 -1
- package/dist/cjs/Common/Tooltip.css +3 -3
- package/dist/cjs/Common/index.js +4 -0
- package/dist/cjs/Common/index.js.map +1 -1
- package/dist/cjs/DataPage/DataPage.js +113 -8
- package/dist/cjs/DataPage/DataPage.js.map +1 -1
- package/dist/cjs/DataTables/DataTableForObservableQuery.js +65 -6
- package/dist/cjs/DataTables/DataTableForObservableQuery.js.map +1 -1
- package/dist/cjs/DataTables/DataTableForQuery.js +62 -6
- package/dist/cjs/DataTables/DataTableForQuery.js.map +1 -1
- package/dist/cjs/Dialogs/BusyIndicatorDialog.js +47 -0
- package/dist/cjs/Dialogs/BusyIndicatorDialog.js.map +1 -1
- package/dist/cjs/Dialogs/Dialog.js +79 -6
- package/dist/cjs/Dialogs/Dialog.js.map +1 -1
- package/dist/cjs/Dropdown/Dropdown.js +13 -0
- package/dist/cjs/Dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js +37 -21
- package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
- package/dist/cjs/ObjectNavigationalBar/ObjectNavigationalBar.css +6 -0
- package/dist/cjs/ObjectNavigationalBar/ObjectNavigationalBar.js +14 -2
- package/dist/cjs/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -1
- package/dist/cjs/PivotViewer/PivotViewer.css +131 -134
- package/dist/cjs/PivotViewer/PivotViewer.js +19 -0
- package/dist/cjs/PivotViewer/PivotViewer.js.map +1 -1
- package/dist/cjs/PivotViewer/components/Spinner.css +8 -8
- package/dist/cjs/SchemaEditor/NameCell.js +2 -2
- package/dist/cjs/SchemaEditor/NameCell.js.map +1 -1
- package/dist/cjs/SchemaEditor/SchemaEditor.js +15 -3
- package/dist/cjs/SchemaEditor/SchemaEditor.js.map +1 -1
- package/dist/cjs/SchemaEditor/SchemaEditor.module.css +5 -1
- package/dist/cjs/SchemaEditor/TypeCell.js +3 -3
- package/dist/cjs/SchemaEditor/TypeCell.js.map +1 -1
- package/dist/cjs/TimeMachine/EventsView.css +17 -17
- package/dist/cjs/TimeMachine/EventsView.js +13 -2
- package/dist/cjs/TimeMachine/EventsView.js.map +1 -1
- package/dist/cjs/TimeMachine/Properties.css +57 -0
- package/dist/cjs/TimeMachine/Properties.js +9 -28
- package/dist/cjs/TimeMachine/Properties.js.map +1 -1
- package/dist/cjs/TimeMachine/ReadModelView.js +10 -0
- package/dist/cjs/TimeMachine/ReadModelView.js.map +1 -1
- package/dist/cjs/TimeMachine/TimeMachine.css +38 -18
- package/dist/cjs/Toolbar/Toolbar.css +34 -17
- package/dist/cjs/Toolbar/ToolbarLayout.js +19 -20
- package/dist/cjs/Toolbar/ToolbarLayout.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tailwind-utilities.css +444 -7
- package/dist/cjs/tokens.css +83 -0
- package/dist/esm/CommandDialog/CommandDialog.d.ts.map +1 -1
- package/dist/esm/CommandDialog/CommandDialog.js +94 -4
- package/dist/esm/CommandDialog/CommandDialog.js.map +1 -1
- package/dist/esm/CommandDialog/CommandStepper.d.ts.map +1 -1
- package/dist/esm/CommandDialog/CommandStepper.js +63 -3
- package/dist/esm/CommandDialog/CommandStepper.js.map +1 -1
- package/dist/esm/CommandDialog/StepperCommandDialog.d.ts +4 -0
- package/dist/esm/CommandDialog/StepperCommandDialog.d.ts.map +1 -1
- package/dist/esm/CommandDialog/StepperCommandDialog.js +95 -6
- package/dist/esm/CommandDialog/StepperCommandDialog.js.map +1 -1
- package/dist/esm/CommandForm/fields/CalendarField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/CalendarField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/CalendarField.js +14 -1
- package/dist/esm/CommandForm/fields/CalendarField.js.map +1 -1
- package/dist/esm/CommandForm/fields/CheckboxField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/CheckboxField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/CheckboxField.js +10 -1
- package/dist/esm/CommandForm/fields/CheckboxField.js.map +1 -1
- package/dist/esm/CommandForm/fields/ChipsField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/ChipsField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/ChipsField.js +11 -1
- package/dist/esm/CommandForm/fields/ChipsField.js.map +1 -1
- package/dist/esm/CommandForm/fields/ColorPickerField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/ColorPickerField.js +17 -1
- package/dist/esm/CommandForm/fields/ColorPickerField.js.map +1 -1
- package/dist/esm/CommandForm/fields/DropdownField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/DropdownField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/DropdownField.js +16 -1
- package/dist/esm/CommandForm/fields/DropdownField.js.map +1 -1
- package/dist/esm/CommandForm/fields/InputTextField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/InputTextField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/InputTextField.js +41 -1
- package/dist/esm/CommandForm/fields/InputTextField.js.map +1 -1
- package/dist/esm/CommandForm/fields/MultiSelectField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/MultiSelectField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/MultiSelectField.js +13 -1
- package/dist/esm/CommandForm/fields/MultiSelectField.js.map +1 -1
- package/dist/esm/CommandForm/fields/NumberField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/NumberField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/NumberField.js +11 -1
- package/dist/esm/CommandForm/fields/NumberField.js.map +1 -1
- package/dist/esm/CommandForm/fields/RadioButtonField.d.ts +17 -0
- package/dist/esm/CommandForm/fields/RadioButtonField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/RadioButtonField.js +21 -0
- package/dist/esm/CommandForm/fields/RadioButtonField.js.map +1 -0
- package/dist/esm/CommandForm/fields/RadioGroupField.d.ts +19 -0
- package/dist/esm/CommandForm/fields/RadioGroupField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/RadioGroupField.js +38 -0
- package/dist/esm/CommandForm/fields/RadioGroupField.js.map +1 -0
- package/dist/esm/CommandForm/fields/SliderField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/SliderField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/SliderField.js +10 -1
- package/dist/esm/CommandForm/fields/SliderField.js.map +1 -1
- package/dist/esm/CommandForm/fields/TextAreaField.d.ts +5 -0
- package/dist/esm/CommandForm/fields/TextAreaField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/TextAreaField.js +12 -1
- package/dist/esm/CommandForm/fields/TextAreaField.js.map +1 -1
- package/dist/esm/CommandForm/fields/index.d.ts +2 -0
- package/dist/esm/CommandForm/fields/index.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/index.js +2 -0
- package/dist/esm/CommandForm/fields/index.js.map +1 -1
- package/dist/esm/CommandForm/index.js +2 -0
- package/dist/esm/CommandForm/index.js.map +1 -1
- package/dist/esm/Common/CratisComponentsProvider.d.ts +11 -0
- package/dist/esm/Common/CratisComponentsProvider.d.ts.map +1 -0
- package/dist/esm/Common/CratisComponentsProvider.js +40 -0
- package/dist/esm/Common/CratisComponentsProvider.js.map +1 -0
- package/dist/esm/Common/ErrorBoundary.d.ts.map +1 -1
- package/dist/esm/Common/ErrorBoundary.js +32 -0
- package/dist/esm/Common/ErrorBoundary.js.map +1 -1
- package/dist/esm/Common/FormElement.css +26 -0
- package/dist/esm/Common/FormElement.d.ts +1 -0
- package/dist/esm/Common/FormElement.d.ts.map +1 -1
- package/dist/esm/Common/FormElement.js +14 -1
- package/dist/esm/Common/FormElement.js.map +1 -1
- package/dist/esm/Common/Page.d.ts.map +1 -1
- package/dist/esm/Common/Page.js +13 -0
- package/dist/esm/Common/Page.js.map +1 -1
- package/dist/esm/Common/Tooltip.css +3 -3
- package/dist/esm/Common/index.d.ts +1 -0
- package/dist/esm/Common/index.d.ts.map +1 -1
- package/dist/esm/Common/index.js +1 -0
- package/dist/esm/Common/index.js.map +1 -1
- package/dist/esm/DataPage/DataPage.d.ts +12 -3
- package/dist/esm/DataPage/DataPage.d.ts.map +1 -1
- package/dist/esm/DataPage/DataPage.js +113 -8
- package/dist/esm/DataPage/DataPage.js.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts +9 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.js +65 -6
- package/dist/esm/DataTables/DataTableForObservableQuery.js.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.d.ts +9 -1
- package/dist/esm/DataTables/DataTableForQuery.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.js +62 -6
- package/dist/esm/DataTables/DataTableForQuery.js.map +1 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.d.ts.map +1 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.js +47 -0
- package/dist/esm/Dialogs/BusyIndicatorDialog.js.map +1 -1
- package/dist/esm/Dialogs/Dialog.d.ts +5 -1
- package/dist/esm/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/esm/Dialogs/Dialog.js +79 -6
- package/dist/esm/Dialogs/Dialog.js.map +1 -1
- package/dist/esm/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/Dropdown/Dropdown.js +13 -0
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts +2 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts.map +1 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js +37 -21
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.css +6 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.d.ts +3 -1
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.d.ts.map +1 -1
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.js +14 -2
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -1
- package/dist/esm/PivotViewer/PivotViewer.css +131 -134
- package/dist/esm/PivotViewer/PivotViewer.d.ts.map +1 -1
- package/dist/esm/PivotViewer/PivotViewer.js +19 -0
- package/dist/esm/PivotViewer/PivotViewer.js.map +1 -1
- package/dist/esm/PivotViewer/components/Spinner.css +8 -8
- package/dist/esm/SchemaEditor/NameCell.d.ts.map +1 -1
- package/dist/esm/SchemaEditor/NameCell.js +2 -2
- package/dist/esm/SchemaEditor/NameCell.js.map +1 -1
- package/dist/esm/SchemaEditor/SchemaEditor.d.ts +2 -1
- package/dist/esm/SchemaEditor/SchemaEditor.d.ts.map +1 -1
- package/dist/esm/SchemaEditor/SchemaEditor.js +15 -3
- package/dist/esm/SchemaEditor/SchemaEditor.js.map +1 -1
- package/dist/esm/SchemaEditor/SchemaEditor.module.css +5 -1
- package/dist/esm/SchemaEditor/TypeCell.d.ts.map +1 -1
- package/dist/esm/SchemaEditor/TypeCell.js +3 -3
- package/dist/esm/SchemaEditor/TypeCell.js.map +1 -1
- package/dist/esm/TimeMachine/EventsView.css +17 -17
- package/dist/esm/TimeMachine/EventsView.d.ts +5 -0
- package/dist/esm/TimeMachine/EventsView.d.ts.map +1 -1
- package/dist/esm/TimeMachine/EventsView.js +13 -2
- package/dist/esm/TimeMachine/EventsView.js.map +1 -1
- package/dist/esm/TimeMachine/Properties.css +57 -0
- package/dist/esm/TimeMachine/Properties.d.ts +1 -0
- package/dist/esm/TimeMachine/Properties.d.ts.map +1 -1
- package/dist/esm/TimeMachine/Properties.js +9 -28
- package/dist/esm/TimeMachine/Properties.js.map +1 -1
- package/dist/esm/TimeMachine/ReadModelView.d.ts.map +1 -1
- package/dist/esm/TimeMachine/ReadModelView.js +10 -0
- package/dist/esm/TimeMachine/ReadModelView.js.map +1 -1
- package/dist/esm/TimeMachine/TimeMachine.css +38 -18
- package/dist/esm/Toolbar/Toolbar.css +34 -17
- package/dist/esm/Toolbar/ToolbarFanOutItem.d.ts +1 -1
- package/dist/esm/Toolbar/ToolbarFanOutItem.d.ts.map +1 -1
- package/dist/esm/Toolbar/ToolbarLayout.d.ts.map +1 -1
- package/dist/esm/Toolbar/ToolbarLayout.js +20 -21
- package/dist/esm/Toolbar/ToolbarLayout.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tailwind-utilities.css +444 -7
- package/dist/esm/tokens.css +83 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +53 -25
- package/dist/esm/CommandDialog/CommandDialog.stories.d.ts +0 -21
- package/dist/esm/CommandDialog/CommandDialog.stories.d.ts.map +0 -1
- package/dist/esm/CommandDialog/CommandDialog.stories.js +0 -353
- package/dist/esm/CommandDialog/CommandDialog.stories.js.map +0 -1
- package/dist/esm/CommandDialog/CommandStepper.stories.d.ts +0 -11
- package/dist/esm/CommandDialog/CommandStepper.stories.d.ts.map +0 -1
- package/dist/esm/CommandDialog/CommandStepper.stories.js +0 -84
- package/dist/esm/CommandDialog/CommandStepper.stories.js.map +0 -1
- package/dist/esm/CommandDialog/StepperCommandDialog.stories.d.ts +0 -12
- package/dist/esm/CommandDialog/StepperCommandDialog.stories.d.ts.map +0 -1
- package/dist/esm/CommandDialog/StepperCommandDialog.stories.js +0 -158
- package/dist/esm/CommandDialog/StepperCommandDialog.stories.js.map +0 -1
- package/dist/esm/CommandForm/fields/Fields.stories.d.ts +0 -17
- package/dist/esm/CommandForm/fields/Fields.stories.d.ts.map +0 -1
- package/dist/esm/CommandForm/fields/Fields.stories.js +0 -179
- package/dist/esm/CommandForm/fields/Fields.stories.js.map +0 -1
- package/dist/esm/Common/ErrorBoundary.stories.d.ts +0 -8
- package/dist/esm/Common/ErrorBoundary.stories.d.ts.map +0 -1
- package/dist/esm/Common/ErrorBoundary.stories.js +0 -22
- package/dist/esm/Common/ErrorBoundary.stories.js.map +0 -1
- package/dist/esm/Common/FormElement.stories.d.ts +0 -9
- package/dist/esm/Common/FormElement.stories.d.ts.map +0 -1
- package/dist/esm/Common/FormElement.stories.js +0 -27
- package/dist/esm/Common/FormElement.stories.js.map +0 -1
- package/dist/esm/Common/Icon.stories.d.ts +0 -11
- package/dist/esm/Common/Icon.stories.d.ts.map +0 -1
- package/dist/esm/Common/Icon.stories.js +0 -26
- package/dist/esm/Common/Icon.stories.js.map +0 -1
- package/dist/esm/Common/Page.stories.d.ts +0 -10
- package/dist/esm/Common/Page.stories.d.ts.map +0 -1
- package/dist/esm/Common/Page.stories.js +0 -35
- package/dist/esm/Common/Page.stories.js.map +0 -1
- package/dist/esm/DataPage/DataPage.stories.d.ts +0 -10
- package/dist/esm/DataPage/DataPage.stories.d.ts.map +0 -1
- package/dist/esm/DataPage/DataPage.stories.js +0 -69
- package/dist/esm/DataPage/DataPage.stories.js.map +0 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.d.ts +0 -8
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.d.ts.map +0 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.js +0 -79
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.js.map +0 -1
- package/dist/esm/DataTables/DataTableForQuery.stories.d.ts +0 -8
- package/dist/esm/DataTables/DataTableForQuery.stories.d.ts.map +0 -1
- package/dist/esm/DataTables/DataTableForQuery.stories.js +0 -54
- package/dist/esm/DataTables/DataTableForQuery.stories.js.map +0 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.stories.d.ts +0 -7
- package/dist/esm/Dialogs/BusyIndicatorDialog.stories.d.ts.map +0 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.stories.js +0 -15
- package/dist/esm/Dialogs/BusyIndicatorDialog.stories.js.map +0 -1
- package/dist/esm/Dialogs/ConfirmationDialog.stories.d.ts +0 -7
- package/dist/esm/Dialogs/ConfirmationDialog.stories.d.ts.map +0 -1
- package/dist/esm/Dialogs/ConfirmationDialog.stories.js +0 -20
- package/dist/esm/Dialogs/ConfirmationDialog.stories.js.map +0 -1
- package/dist/esm/Dialogs/Dialog.stories.d.ts +0 -13
- package/dist/esm/Dialogs/Dialog.stories.d.ts.map +0 -1
- package/dist/esm/Dialogs/Dialog.stories.js +0 -85
- package/dist/esm/Dialogs/Dialog.stories.js.map +0 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.d.ts +0 -12
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.d.ts.map +0 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.js +0 -184
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.js.map +0 -1
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.d.ts +0 -10
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.d.ts.map +0 -1
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.js +0 -45
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.js.map +0 -1
- package/dist/esm/PivotViewer/PivotViewer.stories.d.ts +0 -8
- package/dist/esm/PivotViewer/PivotViewer.stories.d.ts.map +0 -1
- package/dist/esm/PivotViewer/PivotViewer.stories.js +0 -233
- package/dist/esm/PivotViewer/PivotViewer.stories.js.map +0 -1
- package/dist/esm/SchemaEditor/SchemaEditor.stories.d.ts +0 -12
- package/dist/esm/SchemaEditor/SchemaEditor.stories.d.ts.map +0 -1
- package/dist/esm/SchemaEditor/SchemaEditor.stories.js +0 -157
- package/dist/esm/SchemaEditor/SchemaEditor.stories.js.map +0 -1
- package/dist/esm/TimeMachine/EventsView.stories.d.ts +0 -9
- package/dist/esm/TimeMachine/EventsView.stories.d.ts.map +0 -1
- package/dist/esm/TimeMachine/EventsView.stories.js +0 -82
- package/dist/esm/TimeMachine/EventsView.stories.js.map +0 -1
- package/dist/esm/TimeMachine/Properties.stories.d.ts +0 -10
- package/dist/esm/TimeMachine/Properties.stories.d.ts.map +0 -1
- package/dist/esm/TimeMachine/Properties.stories.js +0 -51
- package/dist/esm/TimeMachine/Properties.stories.js.map +0 -1
- package/dist/esm/TimeMachine/ReadModelView.stories.d.ts +0 -8
- package/dist/esm/TimeMachine/ReadModelView.stories.d.ts.map +0 -1
- package/dist/esm/TimeMachine/ReadModelView.stories.js +0 -80
- package/dist/esm/TimeMachine/ReadModelView.stories.js.map +0 -1
- package/dist/esm/TimeMachine/TimeMachine.stories.d.ts +0 -9
- package/dist/esm/TimeMachine/TimeMachine.stories.d.ts.map +0 -1
- package/dist/esm/TimeMachine/TimeMachine.stories.js +0 -115
- package/dist/esm/TimeMachine/TimeMachine.stories.js.map +0 -1
- package/dist/esm/Toolbar/Toolbar.stories.d.ts +0 -26
- package/dist/esm/Toolbar/Toolbar.stories.d.ts.map +0 -1
- package/dist/esm/Toolbar/Toolbar.stories.js +0 -240
- package/dist/esm/Toolbar/Toolbar.stories.js.map +0 -1
- package/dist/esm/given.d.ts +0 -5
- package/dist/esm/given.d.ts.map +0 -1
- package/dist/esm/given.js +0 -7
- package/dist/esm/given.js.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* Copyright (c) Cratis. All rights reserved. */
|
|
2
|
+
/* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Cratis Components — CSS variable tokens.
|
|
6
|
+
*
|
|
7
|
+
* Every internal component references the --cratis-* variables defined here
|
|
8
|
+
* instead of PrimeReact's theme variables directly. This indirection is the
|
|
9
|
+
* single seam that lets the library span PrimeReact major versions: each token
|
|
10
|
+
* resolves the PrimeReact v11 design token first, falling back to the legacy
|
|
11
|
+
* v10 theme variable, so the same build works whether the consumer is on
|
|
12
|
+
* PrimeReact 10 or 11 during the upgrade window.
|
|
13
|
+
*
|
|
14
|
+
* --cratis-surface-border: var(--p-content-border-color, var(--surface-border));
|
|
15
|
+
* ^ PrimeReact v11 (@primeuix/themes) ^ v10 legacy
|
|
16
|
+
*
|
|
17
|
+
* - Consumer on v11: the --p-* token resolves and wins.
|
|
18
|
+
* - Consumer on v10: --p-* is undefined, so the legacy --surface-* value wins.
|
|
19
|
+
*
|
|
20
|
+
* v11 is not a rename of v10 — it is a different token vocabulary (a primitive
|
|
21
|
+
* palette plus semantic content/surface/text/primary/highlight tokens). Where
|
|
22
|
+
* v11 has no 1:1 equivalent for a v10 concept (surface-ground / surface-section
|
|
23
|
+
* / surface-overlay / the composite focus-ring), the closest durable v11
|
|
24
|
+
* semantic token is used and noted inline; consumers can always override.
|
|
25
|
+
*
|
|
26
|
+
* To take full control of the look and feel (with or without PrimeReact's
|
|
27
|
+
* unstyled / pt mechanism, Tailwind, or your own CSS), override the relevant
|
|
28
|
+
* --cratis-* tokens on :root (or any ancestor element):
|
|
29
|
+
*
|
|
30
|
+
* :root {
|
|
31
|
+
* --cratis-surface-card: #1f2937;
|
|
32
|
+
* --cratis-text-color: #f3f4f6;
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* Tokens are intentionally fallback-free at the end of the chain — if neither a
|
|
36
|
+
* PrimeReact theme (v10 or v11) nor a consumer override is present, the variable
|
|
37
|
+
* resolves to nothing and the affected rule no-ops. That keeps the library
|
|
38
|
+
* theme-agnostic without imposing a default palette on consumers.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
:root {
|
|
42
|
+
/* Surfaces */
|
|
43
|
+
--cratis-surface-0: var(--p-surface-0, var(--surface-0));
|
|
44
|
+
--cratis-surface-100: var(--p-surface-100, var(--surface-100));
|
|
45
|
+
/* v11 has no page-canvas/section token — map to the neutral content surface;
|
|
46
|
+
* separation in v11 comes from borders (content-border-color), not fills. */
|
|
47
|
+
--cratis-surface-ground: var(--p-content-background, var(--surface-ground));
|
|
48
|
+
--cratis-surface-section: var(--p-content-hover-background, var(--surface-section));
|
|
49
|
+
--cratis-surface-card: var(--p-content-background, var(--surface-card));
|
|
50
|
+
/* v11 splits overlay backgrounds by type — use the modal surface as the general overlay. */
|
|
51
|
+
--cratis-surface-overlay: var(--p-overlay-modal-background, var(--surface-overlay));
|
|
52
|
+
--cratis-surface-hover: var(--p-content-hover-background, var(--surface-hover));
|
|
53
|
+
--cratis-surface-border: var(--p-content-border-color, var(--surface-border));
|
|
54
|
+
|
|
55
|
+
/* Text */
|
|
56
|
+
--cratis-text-color: var(--p-text-color, var(--text-color));
|
|
57
|
+
--cratis-text-color-secondary: var(--p-text-muted-color, var(--text-color-secondary));
|
|
58
|
+
|
|
59
|
+
/* Primary brand */
|
|
60
|
+
--cratis-primary-color: var(--p-primary-color, var(--primary-color));
|
|
61
|
+
--cratis-primary-color-text: var(--p-primary-contrast-color, var(--primary-color-text));
|
|
62
|
+
--cratis-primary-300: var(--p-primary-300, var(--primary-300));
|
|
63
|
+
--cratis-primary-400: var(--p-primary-400, var(--primary-400));
|
|
64
|
+
--cratis-primary-500: var(--p-primary-500, var(--primary-500));
|
|
65
|
+
--cratis-primary-600: var(--p-primary-600, var(--primary-600));
|
|
66
|
+
|
|
67
|
+
/* Highlight / selection */
|
|
68
|
+
--cratis-highlight-bg: var(--p-highlight-background, var(--highlight-bg));
|
|
69
|
+
--cratis-highlight-text-color: var(--p-highlight-color, var(--highlight-text-color));
|
|
70
|
+
|
|
71
|
+
/* Semantic accents (primitive palette) */
|
|
72
|
+
--cratis-green-500: var(--p-green-500, var(--green-500));
|
|
73
|
+
--cratis-orange-500: var(--p-orange-500, var(--orange-500));
|
|
74
|
+
--cratis-red-500: var(--p-red-500, var(--red-500));
|
|
75
|
+
|
|
76
|
+
/* Geometry */
|
|
77
|
+
--cratis-border-radius: var(--p-content-border-radius, var(--border-radius));
|
|
78
|
+
|
|
79
|
+
/* Effects */
|
|
80
|
+
/* v11 decomposes the focus ring; --p-focus-ring-shadow is the box-shadow form. */
|
|
81
|
+
--cratis-focus-ring: var(--p-focus-ring-shadow, var(--focus-ring));
|
|
82
|
+
--cratis-maskbg: var(--p-mask-background, var(--maskbg));
|
|
83
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandDialog.d.ts","sourceRoot":"","sources":["../../../CommandDialog/CommandDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAKH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"CommandDialog.d.ts","sourceRoot":"","sources":["../../../CommandDialog/CommandDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAKH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAC;AAWpC,MAAM,WAAW,kBAAkB,CAAC,QAAQ,SAAS,MAAM,EAAE,SAAS,GAAG,MAAM,CAC3E,SAAQ,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,EAC3D,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IAMjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAiTD,eAAO,MAAM,aAAa;KAjEM,QAAQ,SAAS,MAAM,WAAW,SAAS,kBAAkB,kBAAkB,CAAC,QAAQ,EAAE,SAAS,CAAC;;uBA0DlF;YAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;SAAE;;;CAO5B,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { Dialog } from '../Dialogs/Dialog.js';
|
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { CommandForm, useCommandFormContext, useCommandInstance, CommandFormFieldWrapper } from '@cratis/arc.react/commands';
|
|
6
6
|
|
|
7
|
-
const CommandDialogWrapper = ({ title, visible, width, style, contentStyle, resizable, buttons, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, onSuccess, onValidationFailure, onFailed, onBeforeExecute, children }) => {
|
|
7
|
+
const CommandDialogWrapper = ({ title, visible, width, style, contentStyle, resizable, buttons, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, onSuccess, onValidationFailure, onFailed, onBeforeExecute, className, pt, ptOptions, unstyled, children }) => {
|
|
8
8
|
const { setCommandValues, setCommandResult, isValid: isCommandFormValid } = useCommandFormContext();
|
|
9
9
|
const commandInstance = useCommandInstance();
|
|
10
10
|
const [isBusy, setIsBusy] = useState(false);
|
|
@@ -61,11 +61,101 @@ const CommandDialogWrapper = ({ title, visible, width, style, contentStyle, resi
|
|
|
61
61
|
};
|
|
62
62
|
const processedChildren = processChildren(children);
|
|
63
63
|
const isDialogValid = (isValid !== false) && isCommandFormValid;
|
|
64
|
-
return (jsx(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: jsx("div", { style: { display: 'flex', flexDirection: 'column', width: '100%' }, children: processedChildren }) }));
|
|
64
|
+
return (jsx(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, className: className, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: jsx("div", { style: { display: 'flex', flexDirection: 'column', width: '100%' }, children: processedChildren }) }));
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound
|
|
68
|
+
* command on confirm, and only closes when the command succeeds. This is
|
|
69
|
+
* the standard pattern for "user fills in a form, clicks OK, command runs
|
|
70
|
+
* server-side, dialog dismisses" — `CommandDialog` collapses about thirty
|
|
71
|
+
* lines of orchestration into the props on a single component.
|
|
72
|
+
*
|
|
73
|
+
* ## Where `TCommand` comes from
|
|
74
|
+
*
|
|
75
|
+
* `TCommand` is an auto-generated TypeScript class produced by the Arc proxy
|
|
76
|
+
* generator from a C# `[Command]` record. `dotnet build` writes a `.ts` file
|
|
77
|
+
* per command with the right property types and a typed `execute()` method;
|
|
78
|
+
* importing the class is all the connection-to-the-backend you need. The
|
|
79
|
+
* class also exposes a `.use()` hook for direct (non-dialog) usage and a
|
|
80
|
+
* `useWithChangeTracking()` variant.
|
|
81
|
+
*
|
|
82
|
+
* ## What happens on confirm
|
|
83
|
+
*
|
|
84
|
+
* 1. If `onBeforeExecute` is supplied, it transforms the command values.
|
|
85
|
+
* Used for generated IDs (`Guid.create()`) that the user did not type in.
|
|
86
|
+
* 2. The command's `execute()` runs through Arc's command pipeline. The
|
|
87
|
+
* backend handler returns either a typed response (mapped to `TResponse`)
|
|
88
|
+
* or a `ValidationResult[]`.
|
|
89
|
+
* 3. On `IsSuccess: true`, `onSuccess(response)` fires and the dialog closes
|
|
90
|
+
* through the dialog host context.
|
|
91
|
+
* 4. On a validation failure, `onValidationFailure(errors)` fires and the
|
|
92
|
+
* form's per-field error display is updated. The dialog stays open.
|
|
93
|
+
* 5. On a domain or transport failure, `onFailed(result)` fires. The dialog
|
|
94
|
+
* stays open and the `CommandResult` is set on the form context so the
|
|
95
|
+
* UI can surface the error to the user.
|
|
96
|
+
*
|
|
97
|
+
* Throughout, the dialog is in the `isBusy` state — every action button is
|
|
98
|
+
* disabled and the confirm button shows a spinner.
|
|
99
|
+
*
|
|
100
|
+
* ## Field binding
|
|
101
|
+
*
|
|
102
|
+
* Children that are `CommandFormField` instances (`InputTextField`,
|
|
103
|
+
* `NumberField`, `DropdownField`, every `@cratis/components/CommandForm/fields`
|
|
104
|
+
* widget) bind to a property on the command via the `value` accessor:
|
|
105
|
+
*
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <InputTextField value={c => c.name} title="Name" />
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* The accessor's argument is the command instance — TypeScript infers
|
|
111
|
+
* `c.name` is a string and the field type-checks against that. Arbitrary
|
|
112
|
+
* non-field children (custom layout, additional text, decorative elements)
|
|
113
|
+
* are rendered as plain content.
|
|
114
|
+
*
|
|
115
|
+
* ## Typed dialog host usage
|
|
116
|
+
*
|
|
117
|
+
* Combine with `useDialog<CommandResult<TResponse>>()` from
|
|
118
|
+
* `@cratis/arc.react/dialogs` to get a fully-typed result at the call site:
|
|
119
|
+
*
|
|
120
|
+
* ```tsx
|
|
121
|
+
* import { useDialog, DialogResult } from '@cratis/arc.react/dialogs';
|
|
122
|
+
* import { CommandDialog } from '@cratis/components/CommandDialog';
|
|
123
|
+
* import { RegisterAuthor } from './RegisterAuthor'; // proxy from C#
|
|
124
|
+
*
|
|
125
|
+
* type RegisterAuthorResponse = { authorId: string };
|
|
126
|
+
*
|
|
127
|
+
* const RegisterAuthorDialog = () => {
|
|
128
|
+
* const { closeDialog } = useDialogContext<CommandResult<RegisterAuthorResponse>>();
|
|
129
|
+
* return (
|
|
130
|
+
* <CommandDialog<RegisterAuthor, RegisterAuthorResponse>
|
|
131
|
+
* command={RegisterAuthor}
|
|
132
|
+
* title="Register author"
|
|
133
|
+
* okLabel="Register"
|
|
134
|
+
* onSuccess={(response) => closeDialog(DialogResult.Ok)}
|
|
135
|
+
* onCancel={() => closeDialog(DialogResult.Cancelled)}>
|
|
136
|
+
* <InputTextField value={c => c.name} title="Name" />
|
|
137
|
+
* <InputTextField value={c => c.email} title="Email" />
|
|
138
|
+
* </CommandDialog>
|
|
139
|
+
* );
|
|
140
|
+
* };
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* ## What's special vs. raw Dialog + CommandForm
|
|
144
|
+
*
|
|
145
|
+
* - Confirm wiring (`onConfirm` → `commandInstance.execute()`) is handled
|
|
146
|
+
* internally; you only supply `onSuccess` / `onValidationFailure` / `onFailed`.
|
|
147
|
+
* - The dialog's `isBusy` state tracks the in-flight command without manual
|
|
148
|
+
* `useState`.
|
|
149
|
+
* - Field error propagation from `CommandResult.validationResults` to the
|
|
150
|
+
* form context is automatic.
|
|
151
|
+
*
|
|
152
|
+
* @typeParam TCommand - The command class (proxy generated from C# `[Command]`).
|
|
153
|
+
* @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.
|
|
154
|
+
* @param props - {@link CommandDialogProps}.
|
|
155
|
+
*/
|
|
66
156
|
const CommandDialogComponent = (props) => {
|
|
67
|
-
const { title, visible, width, style, contentStyle, resizable, buttons = DialogButtons.OkCancel, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, children, ...commandFormProps } = props;
|
|
68
|
-
return (jsx(CommandForm, { ...commandFormProps, children: 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 }) }));
|
|
157
|
+
const { title, visible, width, style, contentStyle, resizable, buttons = DialogButtons.OkCancel, okLabel, cancelLabel, yesLabel, noLabel, isValid, onClose, onConfirm, onCancel, className, pt, ptOptions, unstyled, children, ...commandFormProps } = props;
|
|
158
|
+
return (jsx(CommandForm, { ...commandFormProps, children: 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, className: className, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: children }) }));
|
|
69
159
|
};
|
|
70
160
|
const CommandDialogColumnWrapper = ({ children }) => (jsx(CommandForm.Column, { children: children }));
|
|
71
161
|
CommandDialogColumnWrapper.displayName = 'CommandFormColumn';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;AAmCA,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,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,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,EAC3D,IAAI,CAAC,0BAA0B,EAAE,YAAY,GAAG,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,eAAe,GAAG,cAAc,GAAG,kBAAkB,GAAG,UAAU,CAAC;IAExL,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAmDD,eAAO,MAAM,qBAAqB,GAAI,+TA0BnC,0BAA0B,4CAmJ5B,CAAC;AAmKF,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,MAAM,GAAG,MAAM,EAAE,SAAS,GAAG,MAAM,EAC/E,OAAO,mBAAmB,CAAC,QAAQ,EAAE,SAAS,CAAC,4CAmDlD,CAAC"}
|
|
@@ -82,16 +82,16 @@ const CommandStepperContent = ({ activeStep, visitedSteps, children, onActiveSte
|
|
|
82
82
|
const hasError = stepErrors[idx] ?? false;
|
|
83
83
|
const isVisited = visitedSteps.has(idx);
|
|
84
84
|
const bgColor = hasError
|
|
85
|
-
? 'var(--red-500, #ef4444)'
|
|
85
|
+
? 'var(--cratis-red-500, #ef4444)'
|
|
86
86
|
: isVisited
|
|
87
|
-
? 'var(--green-500, #22c55e)'
|
|
87
|
+
? 'var(--cratis-green-500, #22c55e)'
|
|
88
88
|
: null;
|
|
89
89
|
if (!bgColor)
|
|
90
90
|
return existing;
|
|
91
91
|
const existingStyle = existing.style;
|
|
92
92
|
return {
|
|
93
93
|
...existing,
|
|
94
|
-
style: { ...existingStyle, backgroundColor: bgColor, color: '
|
|
94
|
+
style: { ...existingStyle, backgroundColor: bgColor, color: 'var(--cratis-primary-color-text)' }
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -155,6 +155,66 @@ const CommandStepperWrapper = ({ children, onStepErrorsChange, showNavigation, s
|
|
|
155
155
|
};
|
|
156
156
|
return (jsx(CommandStepperContent, { activeStep: activeStep, visitedSteps: visitedSteps, onActiveStepChange: setActiveStep, onVisitedStepsChange: setVisitedSteps, onStepErrorsChange: onStepErrorsChange, getFieldError: getFieldError, showNavigation: showNavigation, showSubmit: showSubmit, nextLabel: nextLabel, previousLabel: previousLabel, okLabel: okLabel, isBusy: isBusy, isSubmitting: isSubmitting, isSubmitDisabled: !isCommandFormValid, onSubmit: handleSubmit, orientation: orientation, headerPosition: headerPosition, linear: linear, onChangeStep: onChangeStep, start: start, end: end, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: children }));
|
|
157
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* A multi-step wizard backed by a single Cratis Arc command — the embedded,
|
|
160
|
+
* non-modal counterpart of {@link StepperCommandDialog}. Renders directly
|
|
161
|
+
* inside a page region (a panel, a route, a wizard view) rather than inside
|
|
162
|
+
* a modal dialog. Use this when the wizard *is* the page; use
|
|
163
|
+
* {@link StepperCommandDialog} when the same wizard should appear over the
|
|
164
|
+
* current page in a modal.
|
|
165
|
+
*
|
|
166
|
+
* ## Mechanics
|
|
167
|
+
*
|
|
168
|
+
* - Wraps PrimeReact's `Stepper` inside an Arc `CommandForm` so each
|
|
169
|
+
* `<StepperPanel>` becomes a logical grouping of fields that all bind to
|
|
170
|
+
* the same single command.
|
|
171
|
+
* - Provides a built-in Previous / Next / Submit footer. The Submit button
|
|
172
|
+
* only appears on the last step and only when the form passes its
|
|
173
|
+
* validity gate.
|
|
174
|
+
* - Steps with field errors are visually marked (red step indicator) so
|
|
175
|
+
* the user can see at a glance which step needs attention — useful in
|
|
176
|
+
* wizards long enough that a missed-required-field on page 1 would
|
|
177
|
+
* otherwise be hidden behind page 4.
|
|
178
|
+
* - On final Submit, the bound command runs through Arc's command pipeline.
|
|
179
|
+
* Failure paths (`onValidationFailure` / `onFailed`) keep the wizard
|
|
180
|
+
* open and re-surface field errors automatically.
|
|
181
|
+
*
|
|
182
|
+
* ## What `TCommand` is
|
|
183
|
+
*
|
|
184
|
+
* `TCommand` is the auto-generated TypeScript class produced by the Arc
|
|
185
|
+
* proxy generator from a C# `[Command]` record. The wizard's UI is a
|
|
186
|
+
* presentation grouping of one command's fields — every panel binds to
|
|
187
|
+
* properties on the same single command instance.
|
|
188
|
+
*
|
|
189
|
+
* ## What's unique vs. {@link StepperCommandDialog}
|
|
190
|
+
*
|
|
191
|
+
* Mechanically identical, but lives inline on a page instead of inside a
|
|
192
|
+
* modal Dialog. There is no `dialogPt` / `dialogUnstyled` prop because
|
|
193
|
+
* there is no outer dialog — `pt` / `ptOptions` / `unstyled` target the
|
|
194
|
+
* Stepper directly.
|
|
195
|
+
*
|
|
196
|
+
* ```tsx
|
|
197
|
+
* import { CommandStepper } from '@cratis/components/CommandStepper';
|
|
198
|
+
* import { StepperPanel } from 'primereact/stepperpanel';
|
|
199
|
+
* import { RegisterAuthor } from './RegisterAuthor'; // proxy from C#
|
|
200
|
+
*
|
|
201
|
+
* export const RegisterAuthorPage = () => (
|
|
202
|
+
* <CommandStepper<RegisterAuthor> command={RegisterAuthor}
|
|
203
|
+
* onSuccess={() => navigate('/authors')}>
|
|
204
|
+
* <StepperPanel header="Basics">
|
|
205
|
+
* <InputTextField value={c => c.name} title="Name" />
|
|
206
|
+
* </StepperPanel>
|
|
207
|
+
* <StepperPanel header="Contact">
|
|
208
|
+
* <InputTextField value={c => c.email} title="Email" />
|
|
209
|
+
* </StepperPanel>
|
|
210
|
+
* </CommandStepper>
|
|
211
|
+
* );
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* @typeParam TCommand - The command class (proxy generated from C# `[Command]`).
|
|
215
|
+
* @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.
|
|
216
|
+
* @param props - {@link CommandStepperProps}.
|
|
217
|
+
*/
|
|
158
218
|
const CommandStepper = (props) => {
|
|
159
219
|
const { children, onStepErrorsChange, showNavigation, showSubmit, nextLabel, previousLabel, okLabel, isBusy, orientation, headerPosition, linear, onChangeStep, start, end, pt, ptOptions, unstyled, ...commandFormProps } = props;
|
|
160
220
|
return (jsx(CommandForm, { ...commandFormProps, children: jsx(CommandStepperWrapper, { onStepErrorsChange: onStepErrorsChange, showNavigation: showNavigation, showSubmit: showSubmit, nextLabel: nextLabel, previousLabel: previousLabel, okLabel: okLabel, isBusy: isBusy, orientation: orientation, headerPosition: headerPosition, linear: linear, onChangeStep: onChangeStep, start: start, end: end, pt: pt, ptOptions: ptOptions, unstyled: unstyled, onSuccess: props.onSuccess, onValidationFailure: props.onValidationFailure, onFailed: props.onFailed, onBeforeExecute: commandFormProps.onBeforeExecute, children: children }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandStepper.js","sources":["../../../CommandDialog/CommandStepper.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","PrimeStepper"],"mappings":";;;;;;;AAkEA;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,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;AAC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el?: string;
|
|
19
19
|
previousLabel?: string;
|
|
20
|
+
dialogClassName?: string;
|
|
21
|
+
dialogPt?: PrimeDialogProps['pt'];
|
|
22
|
+
dialogPtOptions?: PrimeDialogProps['ptOptions'];
|
|
23
|
+
dialogUnstyled?: boolean;
|
|
20
24
|
children?: React.ReactNode;
|
|
21
25
|
}
|
|
22
26
|
export declare const StepperCommandDialog: <TCommand extends object = object, TResponse = object>(props: StepperCommandDialogProps<TCommand, TResponse>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepperCommandDialog.d.ts","sourceRoot":"","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,WAAW,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAIH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAyB,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"StepperCommandDialog.d.ts","sourceRoot":"","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,WAAW,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAIH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAyB,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAczF,MAAM,WAAW,yBAAyB,CAAC,QAAQ,SAAS,MAAM,EAAE,SAAS,GAAG,MAAM,CAClF,SAAQ,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,EAC3D,yBAAyB;IAE7B,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAElC,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAEhD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;IAKvB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAElC,eAAe,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAEhD,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AA8XD,eAAO,MAAM,oBAAoB,GA1EM,QAAQ,SAAS,MAAM,WAAW,SAAS,kBACvE,yBAAyB,CAAC,QAAQ,EAAE,SAAS,CAAC,4CAyEQ,CAAC"}
|
|
@@ -6,13 +6,16 @@ import React, { useState } from 'react';
|
|
|
6
6
|
import { CommandForm, useCommandFormContext, useCommandInstance } from '@cratis/arc.react/commands';
|
|
7
7
|
import { CommandStepperContent } from './CommandStepper.js';
|
|
8
8
|
|
|
9
|
-
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 }) => {
|
|
9
|
+
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, dialogClassName, dialogPt, dialogPtOptions, dialogUnstyled, children }) => {
|
|
10
10
|
const { setCommandValues, setCommandResult, isValid: isCommandFormValid, getFieldError } = useCommandFormContext();
|
|
11
11
|
const commandInstance = useCommandInstance();
|
|
12
12
|
const [isBusy, setIsBusy] = useState(false);
|
|
13
13
|
const [activeStep, setActiveStep] = useState(0);
|
|
14
14
|
const [visitedSteps, setVisitedSteps] = useState(new Set([0]));
|
|
15
15
|
const [stepErrors, setStepErrors] = useState([]);
|
|
16
|
+
// useDialogContext() is called unconditionally on every render — the try/catch only suppresses
|
|
17
|
+
// the exception when the dialog is used standalone (outside a provider). React's Rules of Hooks
|
|
18
|
+
// are not violated because the hook is always called; the try/catch never skips the call.
|
|
16
19
|
let contextCloseDialog;
|
|
17
20
|
try {
|
|
18
21
|
const context = useDialogContext();
|
|
@@ -78,16 +81,102 @@ const StepperCommandDialogWrapper = ({ title, visible = true, width = '600px', s
|
|
|
78
81
|
await onSuccess?.(result.response);
|
|
79
82
|
await handleClose(DialogResult.Ok);
|
|
80
83
|
};
|
|
81
|
-
const headerElement = (jsx("div", { className: "inline-flex
|
|
82
|
-
const footer = (jsxs("div", { className: "flex
|
|
84
|
+
const headerElement = (jsx("div", { className: "inline-flex items-center justify-center gap-2", children: jsx("span", { className: "font-bold whitespace-nowrap", children: title }) }));
|
|
85
|
+
const footer = (jsxs("div", { className: "flex items-center w-full gap-3", children: [!isFirstStep && (jsx(Button, { label: previousLabel, icon: "pi pi-arrow-left", onClick: () => setActiveStep(s => s - 1), disabled: isBusy, outlined: true })), jsx("div", { className: "flex-1" }), !isLastStep && (jsx(Button, { label: nextLabel, icon: "pi pi-arrow-right", iconPos: "right", onClick: () => {
|
|
83
86
|
setVisitedSteps(prev => new Set(prev).add(activeStep));
|
|
84
87
|
setActiveStep(s => s + 1);
|
|
85
88
|
}, disabled: isBusy || isCurrentStepInvalid })), isLastStep && isDialogValid && (jsx(Button, { label: okLabel, icon: "pi pi-check", onClick: handleSubmit, loading: isBusy, disabled: isBusy, autoFocus: true }))] }));
|
|
86
|
-
return (jsx(Dialog, { header: headerElement, modal: true, footer: footer, onHide: () => handleClose(DialogResult.Cancelled), visible: visible, style: { width, ...style }, contentStyle: contentStyle, resizable: resizable, closable: true, children: jsx(CommandStepperContent, { activeStep: activeStep, visitedSteps: visitedSteps, getFieldError: getFieldError, onActiveStepChange: setActiveStep, onVisitedStepsChange: setVisitedSteps, onStepErrorsChange: setStepErrors, showNavigation: false, showSubmit: false, linear: linear, orientation: orientation, headerPosition: headerPosition, onChangeStep: onChangeStep, start: start, end: end, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: children }) }));
|
|
89
|
+
return (jsx(Dialog, { header: headerElement, modal: true, footer: footer, onHide: () => handleClose(DialogResult.Cancelled), visible: visible, style: { width, ...style }, contentStyle: contentStyle, resizable: resizable, closable: true, className: dialogClassName, pt: dialogPt, ptOptions: dialogPtOptions, unstyled: dialogUnstyled, children: jsx(CommandStepperContent, { activeStep: activeStep, visitedSteps: visitedSteps, getFieldError: getFieldError, onActiveStepChange: setActiveStep, onVisitedStepsChange: setVisitedSteps, onStepErrorsChange: setStepErrors, showNavigation: false, showSubmit: false, linear: linear, orientation: orientation, headerPosition: headerPosition, onChangeStep: onChangeStep, start: start, end: end, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: children }) }));
|
|
87
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* A multi-step wizard dialog backed by a single Cratis Arc command. Wraps
|
|
93
|
+
* PrimeReact's `Stepper` inside a Cratis {@link Dialog}, tracks per-step
|
|
94
|
+
* visit state, surfaces inline error indicators on steps with invalid
|
|
95
|
+
* fields, and executes the bound command when the user submits the last
|
|
96
|
+
* step. Use it when one command has enough fields that they should be
|
|
97
|
+
* broken into named stages; for single-stage commands, use
|
|
98
|
+
* {@link CommandDialog}.
|
|
99
|
+
*
|
|
100
|
+
* ## What `TCommand` is
|
|
101
|
+
*
|
|
102
|
+
* `TCommand` is the auto-generated TypeScript class produced by the Arc
|
|
103
|
+
* proxy generator from a C# `[Command]` record. The wizard fields all bind
|
|
104
|
+
* to properties on this single command — the multi-step UI is purely a
|
|
105
|
+
* presentation grouping of one command's fields, not multiple commands.
|
|
106
|
+
*
|
|
107
|
+
* ## What's unique vs. {@link CommandDialog}
|
|
108
|
+
*
|
|
109
|
+
* - **Progressive disclosure**: fields are grouped into `<StepperPanel>`
|
|
110
|
+
* children and the user advances through them with explicit Previous /
|
|
111
|
+
* Next buttons before reaching Submit on the last step.
|
|
112
|
+
* - **Per-step error indicators**: the step number circle paints red when
|
|
113
|
+
* any field inside that step has a validation error and the step has
|
|
114
|
+
* been visited, so a long wizard doesn't hide a single-field error on
|
|
115
|
+
* page 1 behind page 4. The CratisStepper handles this by reading
|
|
116
|
+
* `getFieldError` from the form context and inspecting which fields
|
|
117
|
+
* belong to which step.
|
|
118
|
+
* - **Visited tracking**: only visited steps show error indicators; an
|
|
119
|
+
* un-visited step is never marked red just because its fields are blank.
|
|
120
|
+
* - **Linear mode (default)**: the user must complete a step before
|
|
121
|
+
* advancing. Set `linear={false}` to allow free navigation.
|
|
122
|
+
* - **Submit only fires on the last step**: the command runs through Arc's
|
|
123
|
+
* command pipeline only when the user clicks the final Submit button —
|
|
124
|
+
* not on every Next click. Failure paths
|
|
125
|
+
* (`onValidationFailure` / `onFailed`) work exactly like
|
|
126
|
+
* {@link CommandDialog}: dialog stays open, errors surface back to the
|
|
127
|
+
* form.
|
|
128
|
+
*
|
|
129
|
+
* ## Typed dialog host usage
|
|
130
|
+
*
|
|
131
|
+
* Same pattern as {@link CommandDialog} — combine with
|
|
132
|
+
* `useDialog<CommandResult<TResponse>>()` from `@cratis/arc.react/dialogs`
|
|
133
|
+
* to get a fully-typed result at the call site:
|
|
134
|
+
*
|
|
135
|
+
* ```tsx
|
|
136
|
+
* import { useDialog, DialogResult } from '@cratis/arc.react/dialogs';
|
|
137
|
+
* import { StepperCommandDialog } from '@cratis/components/CommandDialog';
|
|
138
|
+
* import { StepperPanel } from 'primereact/stepperpanel';
|
|
139
|
+
* import { RegisterOrder } from './RegisterOrder'; // proxy from C#
|
|
140
|
+
*
|
|
141
|
+
* const RegisterOrderDialog = () => {
|
|
142
|
+
* const { closeDialog } = useDialogContext<CommandResult<RegisterOrderResponse>>();
|
|
143
|
+
* return (
|
|
144
|
+
* <StepperCommandDialog<RegisterOrder, RegisterOrderResponse>
|
|
145
|
+
* command={RegisterOrder}
|
|
146
|
+
* title="New order"
|
|
147
|
+
* onSuccess={() => closeDialog(DialogResult.Ok)}
|
|
148
|
+
* onCancel={() => closeDialog(DialogResult.Cancelled)}>
|
|
149
|
+
* <StepperPanel header="Customer">
|
|
150
|
+
* <InputTextField value={c => c.customerName} title="Name" />
|
|
151
|
+
* <InputTextField value={c => c.email} title="Email" />
|
|
152
|
+
* </StepperPanel>
|
|
153
|
+
* <StepperPanel header="Items">
|
|
154
|
+
* <ChipsField value={c => c.items} title="Items" />
|
|
155
|
+
* <NumberField value={c => c.quantity} title="Quantity" min={1} />
|
|
156
|
+
* </StepperPanel>
|
|
157
|
+
* <StepperPanel header="Confirm">
|
|
158
|
+
* <CheckboxField value={c => c.confirmed} label="I confirm the order" />
|
|
159
|
+
* </StepperPanel>
|
|
160
|
+
* </StepperCommandDialog>
|
|
161
|
+
* );
|
|
162
|
+
* };
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* ## Styling
|
|
166
|
+
*
|
|
167
|
+
* The inherited `pt` / `ptOptions` / `unstyled` props target the inner
|
|
168
|
+
* **Stepper**. Use `dialogPt` / `dialogPtOptions` / `dialogUnstyled` /
|
|
169
|
+
* `dialogClassName` to style the outer **Dialog** independently. See the
|
|
170
|
+
* [pass-through cheat sheet](../../Documentation/Styling/pass-through.md)
|
|
171
|
+
* for the slot reference.
|
|
172
|
+
*
|
|
173
|
+
* @typeParam TCommand - The command class (proxy generated from C# `[Command]`).
|
|
174
|
+
* @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.
|
|
175
|
+
* @param props - {@link StepperCommandDialogProps}.
|
|
176
|
+
*/
|
|
88
177
|
const StepperCommandDialogComponent = (props) => {
|
|
89
|
-
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;
|
|
90
|
-
return (jsx(CommandForm, { ...commandFormProps, children: 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 }) }));
|
|
178
|
+
const { title, visible, width, style, contentStyle, resizable, isValid, onClose, onConfirm, onCancel, okLabel, nextLabel, previousLabel, orientation, headerPosition, linear, onChangeStep, start, end, pt, ptOptions, unstyled, dialogClassName, dialogPt, dialogPtOptions, dialogUnstyled, children, ...commandFormProps } = props;
|
|
179
|
+
return (jsx(CommandForm, { ...commandFormProps, children: 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, dialogClassName: dialogClassName, dialogPt: dialogPt, dialogPtOptions: dialogPtOptions, dialogUnstyled: dialogUnstyled, children: children }) }));
|
|
91
180
|
};
|
|
92
181
|
const StepperCommandDialog = StepperCommandDialogComponent;
|
|
93
182
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepperCommandDialog.js","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","PrimeDialog"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"StepperCommandDialog.js","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","PrimeDialog"],"mappings":";;;;;;;;AAyEA,MAAM,2BAA2B,GAAG,CAA8C,EAC9E,KAAK,EACL,OAAO,GAAG,IAAI,EACd,KAAK,GAAG,OAAO,EACf,KAAK,EACL,YAAY,EACZ,SAAS,GAAG,KAAK,EACjB,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,MAAM,EAClB,aAAa,GAAG,UAAU,EAC1B,WAAW,GAAG,YAAY,EAC1B,cAAc,EACd,MAAM,GAAG,IAAI,EACb,YAAY,EACZ,KAAK,EACL,GAAG,EACH,EAAE,EACF,SAAS,EACT,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,eAAe,EACf,cAAc,EACd,QAAQ,EA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G;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WrappedFieldProps } from '@cratis/arc.react/commands';
|
|
2
|
+
import { type CalendarProps } from 'primereact/calendar';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
interface CalendarFieldComponentProps extends WrappedFieldProps<Date | null> {
|
|
4
5
|
placeholder?: string;
|
|
@@ -8,6 +9,10 @@ interface CalendarFieldComponentProps extends WrappedFieldProps<Date | null> {
|
|
|
8
9
|
hourFormat?: '12' | '24';
|
|
9
10
|
minDate?: Date;
|
|
10
11
|
maxDate?: Date;
|
|
12
|
+
className?: string;
|
|
13
|
+
pt?: CalendarProps['pt'];
|
|
14
|
+
ptOptions?: CalendarProps['ptOptions'];
|
|
15
|
+
unstyled?: boolean;
|
|
11
16
|
}
|
|
12
17
|
export declare const CalendarField: {
|
|
13
18
|
<TCommand = unknown>(props: import("@cratis/arc.react/commands").CommandFormFieldComponentProps<CalendarFieldComponentProps, TCommand>): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/CalendarField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"CalendarField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/CalendarField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,2BAA4B,SAAQ,iBAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;IAExE,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGzB,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,EAAE,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAGzB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAGvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAeD,eAAO,MAAM,aAAa;;;CAwBzB,CAAC"}
|
|
@@ -2,7 +2,20 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
3
3
|
import { Calendar } from 'primereact/calendar';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* A date (or date-time) picker field bound to a `Date | null` property on a
|
|
7
|
+
* Cratis Arc command. Set `showTime` to add a time selector alongside the
|
|
8
|
+
* date. See {@link InputTextField} for the full `value={c => c.prop}`
|
|
9
|
+
* binding model.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <CalendarField value={c => c.dueDate}
|
|
13
|
+
* title="Due date"
|
|
14
|
+
* showIcon
|
|
15
|
+
* minDate={new Date()} />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const CalendarField = asCommandFormField((props) => (jsx(Calendar, { value: props.value, onChange: (e) => props.onChange(e.value ?? null), onBlur: props.onBlur, invalid: props.invalid, placeholder: props.placeholder, dateFormat: props.dateFormat, showIcon: props.showIcon, showTime: props.showTime, hourFormat: props.hourFormat, minDate: props.minDate, maxDate: props.maxDate, className: props.className ? `w-full ${props.className}` : 'w-full', pt: props.pt, ptOptions: props.ptOptions, unstyled: props.unstyled })), {
|
|
6
19
|
defaultValue: null,
|
|
7
20
|
extractValue: (e) => e instanceof Date ? e : null
|
|
8
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarField.js","sources":["../../../../CommandForm/fields/CalendarField.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"CalendarField.js","sources":["../../../../CommandForm/fields/CalendarField.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AA6CA;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,kBAAkB,CAC3C,CAAC,KAAK,MACFA,GAAA,CAAC,QAAQ,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,EAAE,KAAK,CAAC,SAAS,GAAG,CAAA,OAAA,EAAU,KAAK,CAAC,SAAS,CAAA,CAAE,GAAG,QAAQ,EACnE,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAA,CAC1B,CACL,EACD;AACI,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAK,CAAC,YAAY,IAAI,GAAG,CAAC,GAAG;AACzD,CAAA;;;;"}
|