@cratis/components 0.1.19 → 1.0.4
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/dist/cjs/CommandDialog/CommandDialog.js +35 -24
- package/dist/cjs/CommandDialog/CommandDialog.js.map +1 -1
- package/dist/cjs/CommandForm/fields/CheckboxField.js +2 -2
- package/dist/cjs/CommandForm/fields/CheckboxField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/DropdownField.js +5 -5
- package/dist/cjs/CommandForm/fields/DropdownField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/InputTextField.js +2 -2
- package/dist/cjs/CommandForm/fields/InputTextField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/NumberField.js +2 -2
- package/dist/cjs/CommandForm/fields/NumberField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/SliderField.js +5 -9
- package/dist/cjs/CommandForm/fields/SliderField.js.map +1 -1
- package/dist/cjs/CommandForm/fields/TextAreaField.js +2 -2
- package/dist/cjs/CommandForm/fields/TextAreaField.js.map +1 -1
- package/dist/cjs/CommandForm/index.js +35 -15
- package/dist/cjs/CommandForm/index.js.map +1 -1
- package/dist/cjs/DataTables/DataTableForObservableQuery.js +53 -1
- package/dist/cjs/DataTables/DataTableForObservableQuery.js.map +1 -1
- package/dist/cjs/DataTables/DataTableForQuery.js +19 -1
- package/dist/cjs/DataTables/DataTableForQuery.js.map +1 -1
- package/dist/cjs/Dialogs/BusyIndicatorDialog.js +2 -3
- package/dist/cjs/Dialogs/BusyIndicatorDialog.js.map +1 -1
- package/dist/cjs/Dialogs/ConfirmationDialog.js +4 -21
- package/dist/cjs/Dialogs/ConfirmationDialog.js.map +1 -1
- package/dist/cjs/Dialogs/Dialog.js +66 -0
- package/dist/cjs/Dialogs/Dialog.js.map +1 -0
- package/dist/cjs/Dialogs/index.js +4 -2
- package/dist/cjs/Dialogs/index.js.map +1 -1
- package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js +156 -0
- package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js.map +1 -0
- package/dist/cjs/ObjectContentEditor/index.js +8 -0
- package/dist/cjs/{EventModeling → ObjectContentEditor}/index.js.map +1 -1
- package/dist/cjs/ObjectNavigationalBar/ObjectNavigationalBar.js +45 -0
- package/dist/cjs/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -0
- package/dist/cjs/ObjectNavigationalBar/index.js +8 -0
- package/dist/cjs/ObjectNavigationalBar/index.js.map +1 -0
- package/dist/cjs/SchemaEditor/NameCell.js +38 -0
- package/dist/cjs/SchemaEditor/NameCell.js.map +1 -0
- package/dist/cjs/SchemaEditor/SchemaEditor.js +352 -0
- package/dist/cjs/SchemaEditor/SchemaEditor.js.map +1 -0
- package/dist/cjs/SchemaEditor/SchemaEditor.module.css +11 -0
- package/dist/cjs/SchemaEditor/TypeCell.js +102 -0
- package/dist/cjs/SchemaEditor/TypeCell.js.map +1 -0
- package/dist/cjs/SchemaEditor/index.js +10 -0
- package/dist/cjs/SchemaEditor/index.js.map +1 -0
- package/dist/cjs/index.js +10 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/TypeFormat.js +20 -0
- package/dist/cjs/types/TypeFormat.js.map +1 -0
- package/dist/esm/CommandDialog/CommandDialog.d.ts +22 -1
- package/dist/esm/CommandDialog/CommandDialog.d.ts.map +1 -1
- package/dist/esm/CommandDialog/CommandDialog.js +35 -24
- package/dist/esm/CommandDialog/CommandDialog.js.map +1 -1
- package/dist/esm/CommandDialog/CommandDialog.stories.d.ts +11 -0
- package/dist/esm/CommandDialog/CommandDialog.stories.d.ts.map +1 -1
- package/dist/esm/CommandDialog/CommandDialog.stories.js +208 -3
- package/dist/esm/CommandDialog/CommandDialog.stories.js.map +1 -1
- package/dist/esm/CommandForm/fields/CheckboxField.d.ts +3 -2
- package/dist/esm/CommandForm/fields/CheckboxField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/CheckboxField.js +1 -1
- package/dist/esm/CommandForm/fields/CheckboxField.js.map +1 -1
- package/dist/esm/CommandForm/fields/DropdownField.d.ts +7 -6
- package/dist/esm/CommandForm/fields/DropdownField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/DropdownField.js +6 -6
- package/dist/esm/CommandForm/fields/DropdownField.js.map +1 -1
- package/dist/esm/CommandForm/fields/Fields.stories.d.ts +13 -0
- package/dist/esm/CommandForm/fields/Fields.stories.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/Fields.stories.js +137 -0
- package/dist/esm/CommandForm/fields/Fields.stories.js.map +1 -0
- package/dist/esm/CommandForm/fields/InputTextField.d.ts +3 -2
- package/dist/esm/CommandForm/fields/InputTextField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/InputTextField.js +1 -1
- package/dist/esm/CommandForm/fields/InputTextField.js.map +1 -1
- package/dist/esm/CommandForm/fields/NumberField.d.ts +3 -2
- package/dist/esm/CommandForm/fields/NumberField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/NumberField.js +1 -1
- package/dist/esm/CommandForm/fields/NumberField.js.map +1 -1
- package/dist/esm/CommandForm/fields/SliderField.d.ts +5 -4
- package/dist/esm/CommandForm/fields/SliderField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/SliderField.js +5 -9
- package/dist/esm/CommandForm/fields/SliderField.js.map +1 -1
- package/dist/esm/CommandForm/fields/TextAreaField.d.ts +3 -2
- package/dist/esm/CommandForm/fields/TextAreaField.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/TextAreaField.js +1 -1
- package/dist/esm/CommandForm/fields/TextAreaField.js.map +1 -1
- package/dist/esm/CommandForm/fields/index.d.ts +2 -2
- package/dist/esm/CommandForm/fields/index.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/index.js +2 -2
- package/dist/esm/CommandForm/fields/index.js.map +1 -1
- package/dist/esm/CommandForm/index.d.ts +1 -5
- package/dist/esm/CommandForm/index.d.ts.map +1 -1
- package/dist/esm/CommandForm/index.js +3 -7
- package/dist/esm/CommandForm/index.js.map +1 -1
- package/dist/esm/Common/ErrorBoundary.d.ts +1 -1
- package/dist/esm/Common/ErrorBoundary.stories.d.ts +7 -7
- package/dist/esm/Common/ErrorBoundary.stories.d.ts.map +1 -1
- package/dist/esm/Common/ErrorBoundary.stories.js +21 -5
- package/dist/esm/Common/ErrorBoundary.stories.js.map +1 -1
- package/dist/esm/Common/FormElement.stories.d.ts +8 -7
- package/dist/esm/Common/FormElement.stories.d.ts.map +1 -1
- package/dist/esm/Common/FormElement.stories.js +25 -4
- package/dist/esm/Common/FormElement.stories.js.map +1 -1
- package/dist/esm/Common/Page.stories.d.ts +7 -7
- package/dist/esm/Common/Page.stories.d.ts.map +1 -1
- package/dist/esm/Common/Page.stories.js +20 -5
- package/dist/esm/Common/Page.stories.js.map +1 -1
- package/dist/esm/DataPage/DataPage.stories.d.ts +7 -7
- package/dist/esm/DataPage/DataPage.stories.d.ts.map +1 -1
- package/dist/esm/DataPage/DataPage.stories.js +56 -5
- package/dist/esm/DataPage/DataPage.stories.js.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts +1 -0
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.js +55 -3
- package/dist/esm/DataTables/DataTableForObservableQuery.js.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.d.ts +7 -7
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.js +78 -5
- package/dist/esm/DataTables/DataTableForObservableQuery.stories.js.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.d.ts +1 -0
- package/dist/esm/DataTables/DataTableForQuery.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.js +21 -3
- package/dist/esm/DataTables/DataTableForQuery.js.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.stories.d.ts +7 -7
- package/dist/esm/DataTables/DataTableForQuery.stories.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.stories.js +53 -5
- package/dist/esm/DataTables/DataTableForQuery.stories.js.map +1 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.d.ts.map +1 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.js +3 -4
- package/dist/esm/Dialogs/BusyIndicatorDialog.js.map +1 -1
- package/dist/esm/Dialogs/ConfirmationDialog.d.ts.map +1 -1
- package/dist/esm/Dialogs/ConfirmationDialog.js +6 -23
- package/dist/esm/Dialogs/ConfirmationDialog.js.map +1 -1
- package/dist/esm/Dialogs/Dialog.d.ts +23 -0
- package/dist/esm/Dialogs/Dialog.d.ts.map +1 -0
- package/dist/esm/Dialogs/Dialog.js +64 -0
- package/dist/esm/Dialogs/Dialog.js.map +1 -0
- package/dist/esm/Dialogs/Dialog.stories.d.ts +12 -0
- package/dist/esm/Dialogs/Dialog.stories.d.ts.map +1 -0
- package/dist/esm/Dialogs/Dialog.stories.js +44 -0
- package/dist/esm/Dialogs/Dialog.stories.js.map +1 -0
- package/dist/esm/Dialogs/index.d.ts +2 -1
- package/dist/esm/Dialogs/index.d.ts.map +1 -1
- package/dist/esm/Dialogs/index.js +2 -1
- package/dist/esm/Dialogs/index.js.map +1 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts +8 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts.map +1 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js +135 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js.map +1 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.d.ts +10 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.d.ts.map +1 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.js +144 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.stories.js.map +1 -0
- package/dist/esm/ObjectContentEditor/index.d.ts +2 -0
- package/dist/esm/ObjectContentEditor/index.d.ts.map +1 -0
- package/dist/esm/ObjectContentEditor/index.js +2 -0
- package/dist/esm/ObjectContentEditor/index.js.map +1 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.d.ts +6 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.d.ts.map +1 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.js +24 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.d.ts +10 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.d.ts.map +1 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.js +46 -0
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.stories.js.map +1 -0
- package/dist/esm/ObjectNavigationalBar/index.d.ts +2 -0
- package/dist/esm/ObjectNavigationalBar/index.d.ts.map +1 -0
- package/dist/esm/ObjectNavigationalBar/index.js +2 -0
- package/dist/esm/ObjectNavigationalBar/index.js.map +1 -0
- package/dist/esm/SchemaEditor/NameCell.d.ts +9 -0
- package/dist/esm/SchemaEditor/NameCell.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/NameCell.js +17 -0
- package/dist/esm/SchemaEditor/NameCell.js.map +1 -0
- package/dist/esm/SchemaEditor/SchemaEditor.d.ts +17 -0
- package/dist/esm/SchemaEditor/SchemaEditor.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/SchemaEditor.js +331 -0
- package/dist/esm/SchemaEditor/SchemaEditor.js.map +1 -0
- package/dist/esm/SchemaEditor/SchemaEditor.module.css +11 -0
- package/dist/esm/SchemaEditor/SchemaEditor.stories.d.ts +12 -0
- package/dist/esm/SchemaEditor/SchemaEditor.stories.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/SchemaEditor.stories.js +158 -0
- package/dist/esm/SchemaEditor/SchemaEditor.stories.js.map +1 -0
- package/dist/esm/SchemaEditor/TypeCell.d.ts +14 -0
- package/dist/esm/SchemaEditor/TypeCell.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/TypeCell.js +81 -0
- package/dist/esm/SchemaEditor/TypeCell.js.map +1 -0
- package/dist/esm/SchemaEditor/index.d.ts +4 -0
- package/dist/esm/SchemaEditor/index.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/index.js +3 -0
- package/dist/esm/TimeMachine/EventsView.stories.d.ts +8 -7
- package/dist/esm/TimeMachine/EventsView.stories.d.ts.map +1 -1
- package/dist/esm/TimeMachine/EventsView.stories.js +80 -4
- package/dist/esm/TimeMachine/EventsView.stories.js.map +1 -1
- package/dist/esm/TimeMachine/Properties.stories.d.ts +9 -7
- package/dist/esm/TimeMachine/Properties.stories.d.ts.map +1 -1
- package/dist/esm/TimeMachine/Properties.stories.js +49 -4
- package/dist/esm/TimeMachine/Properties.stories.js.map +1 -1
- package/dist/esm/TimeMachine/ReadModelView.stories.d.ts +7 -7
- package/dist/esm/TimeMachine/ReadModelView.stories.d.ts.map +1 -1
- package/dist/esm/TimeMachine/ReadModelView.stories.js +79 -5
- package/dist/esm/TimeMachine/ReadModelView.stories.js.map +1 -1
- package/dist/esm/TimeMachine/TimeMachine.stories.d.ts +8 -7
- package/dist/esm/TimeMachine/TimeMachine.stories.d.ts.map +1 -1
- package/dist/esm/TimeMachine/TimeMachine.stories.js +113 -4
- package/dist/esm/TimeMachine/TimeMachine.stories.js.map +1 -1
- package/dist/esm/index.d.ts +4 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +10 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/types/JsonSchema.d.ts +32 -0
- package/dist/esm/types/JsonSchema.d.ts.map +1 -0
- package/dist/esm/types/JsonSchema.js +2 -0
- package/dist/esm/types/JsonSchema.js.map +1 -0
- package/dist/esm/types/TypeFormat.d.ts +6 -0
- package/dist/esm/types/TypeFormat.d.ts.map +1 -0
- package/dist/esm/types/TypeFormat.js +18 -0
- package/dist/esm/types/TypeFormat.js.map +1 -0
- package/package.json +12 -7
- package/dist/cjs/CommandForm/CommandForm.js +0 -183
- package/dist/cjs/CommandForm/CommandForm.js.map +0 -1
- package/dist/cjs/CommandForm/CommandFormField.js +0 -11
- package/dist/cjs/CommandForm/CommandFormField.js.map +0 -1
- package/dist/cjs/CommandForm/CommandFormFields.js +0 -73
- package/dist/cjs/CommandForm/CommandFormFields.js.map +0 -1
- package/dist/cjs/CommandForm/ValidationMessage.js +0 -24
- package/dist/cjs/CommandForm/ValidationMessage.js.map +0 -1
- package/dist/cjs/CommandForm/asCommandFormField.js +0 -47
- package/dist/cjs/CommandForm/asCommandFormField.js.map +0 -1
- package/dist/cjs/EventModeling/EventModeling.css +0 -146
- package/dist/cjs/EventModeling/EventModeling.js +0 -209
- package/dist/cjs/EventModeling/EventModeling.js.map +0 -1
- package/dist/cjs/EventModeling/components/Canvas.js +0 -403
- package/dist/cjs/EventModeling/components/Canvas.js.map +0 -1
- package/dist/cjs/EventModeling/components/CanvasControls.js +0 -10
- package/dist/cjs/EventModeling/components/CanvasControls.js.map +0 -1
- package/dist/cjs/EventModeling/components/Toolbox.js +0 -18
- package/dist/cjs/EventModeling/components/Toolbox.js.map +0 -1
- package/dist/cjs/EventModeling/engine/connectorGraphics.js +0 -173
- package/dist/cjs/EventModeling/engine/connectorGraphics.js.map +0 -1
- package/dist/cjs/EventModeling/engine/elementSprites.js +0 -301
- package/dist/cjs/EventModeling/engine/elementSprites.js.map +0 -1
- package/dist/cjs/EventModeling/index.js +0 -12
- package/dist/cjs/EventModeling/types.js +0 -60
- package/dist/cjs/EventModeling/types.js.map +0 -1
- package/dist/esm/CommandForm/CommandForm.d.ts +0 -49
- package/dist/esm/CommandForm/CommandForm.d.ts.map +0 -1
- package/dist/esm/CommandForm/CommandForm.js +0 -178
- package/dist/esm/CommandForm/CommandForm.js.map +0 -1
- package/dist/esm/CommandForm/CommandForm.stories.d.ts +0 -8
- package/dist/esm/CommandForm/CommandForm.stories.d.ts.map +0 -1
- package/dist/esm/CommandForm/CommandForm.stories.js +0 -45
- package/dist/esm/CommandForm/CommandForm.stories.js.map +0 -1
- package/dist/esm/CommandForm/CommandFormField.d.ts +0 -18
- package/dist/esm/CommandForm/CommandFormField.d.ts.map +0 -1
- package/dist/esm/CommandForm/CommandFormField.js +0 -9
- package/dist/esm/CommandForm/CommandFormField.js.map +0 -1
- package/dist/esm/CommandForm/CommandFormFields.d.ts +0 -11
- package/dist/esm/CommandForm/CommandFormFields.d.ts.map +0 -1
- package/dist/esm/CommandForm/CommandFormFields.js +0 -71
- package/dist/esm/CommandForm/CommandFormFields.js.map +0 -1
- package/dist/esm/CommandForm/UserRegistrationCommand.d.ts +0 -63
- package/dist/esm/CommandForm/UserRegistrationCommand.d.ts.map +0 -1
- package/dist/esm/CommandForm/UserRegistrationCommand.js +0 -143
- package/dist/esm/CommandForm/UserRegistrationCommand.js.map +0 -1
- package/dist/esm/CommandForm/ValidationMessage.d.ts +0 -8
- package/dist/esm/CommandForm/ValidationMessage.d.ts.map +0 -1
- package/dist/esm/CommandForm/ValidationMessage.js +0 -22
- package/dist/esm/CommandForm/ValidationMessage.js.map +0 -1
- package/dist/esm/CommandForm/asCommandFormField.d.ts +0 -32
- package/dist/esm/CommandForm/asCommandFormField.d.ts.map +0 -1
- package/dist/esm/CommandForm/asCommandFormField.js +0 -45
- package/dist/esm/CommandForm/asCommandFormField.js.map +0 -1
- package/dist/esm/EventModeling/EventModeling.css +0 -146
- package/dist/esm/EventModeling/EventModeling.d.ts +0 -11
- package/dist/esm/EventModeling/EventModeling.d.ts.map +0 -1
- package/dist/esm/EventModeling/EventModeling.js +0 -207
- package/dist/esm/EventModeling/EventModeling.js.map +0 -1
- package/dist/esm/EventModeling/EventModeling.stories.d.ts +0 -10
- package/dist/esm/EventModeling/EventModeling.stories.d.ts.map +0 -1
- package/dist/esm/EventModeling/EventModeling.stories.js +0 -252
- package/dist/esm/EventModeling/EventModeling.stories.js.map +0 -1
- package/dist/esm/EventModeling/components/Canvas.d.ts +0 -23
- package/dist/esm/EventModeling/components/Canvas.d.ts.map +0 -1
- package/dist/esm/EventModeling/components/Canvas.js +0 -382
- package/dist/esm/EventModeling/components/Canvas.js.map +0 -1
- package/dist/esm/EventModeling/components/CanvasControls.d.ts +0 -10
- package/dist/esm/EventModeling/components/CanvasControls.d.ts.map +0 -1
- package/dist/esm/EventModeling/components/CanvasControls.js +0 -8
- package/dist/esm/EventModeling/components/CanvasControls.js.map +0 -1
- package/dist/esm/EventModeling/components/Toolbox.d.ts +0 -9
- package/dist/esm/EventModeling/components/Toolbox.d.ts.map +0 -1
- package/dist/esm/EventModeling/components/Toolbox.js +0 -16
- package/dist/esm/EventModeling/components/Toolbox.js.map +0 -1
- package/dist/esm/EventModeling/engine/connectorGraphics.d.ts +0 -12
- package/dist/esm/EventModeling/engine/connectorGraphics.d.ts.map +0 -1
- package/dist/esm/EventModeling/engine/connectorGraphics.js +0 -151
- package/dist/esm/EventModeling/engine/connectorGraphics.js.map +0 -1
- package/dist/esm/EventModeling/engine/elementSprites.d.ts +0 -23
- package/dist/esm/EventModeling/engine/elementSprites.d.ts.map +0 -1
- package/dist/esm/EventModeling/engine/elementSprites.js +0 -276
- package/dist/esm/EventModeling/engine/elementSprites.js.map +0 -1
- package/dist/esm/EventModeling/index.d.ts +0 -3
- package/dist/esm/EventModeling/index.d.ts.map +0 -1
- package/dist/esm/EventModeling/index.js +0 -3
- package/dist/esm/EventModeling/types.d.ts +0 -79
- package/dist/esm/EventModeling/types.d.ts.map +0 -1
- package/dist/esm/EventModeling/types.js +0 -56
- package/dist/esm/EventModeling/types.js.map +0 -1
- /package/dist/esm/{EventModeling → SchemaEditor}/index.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/DropdownField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DropdownField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/DropdownField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,UAAU,2BAA4B,SAAQ,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC;IAC5E,OAAO,EAAE,KAAK,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,aAAa;;;CAiBzB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Dropdown } from 'primereact/dropdown';
|
|
3
|
+
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
3
4
|
|
|
4
|
-
const
|
|
5
|
-
const SelectField = asCommandFormField(SelectComponent, {
|
|
5
|
+
const DropdownField = asCommandFormField((props) => (jsx(Dropdown, { value: props.value, onChange: (e) => props.onChange(e.value), options: props.options, optionValue: props.optionValue, optionLabel: props.optionLabel, placeholder: props.placeholder, invalid: props.invalid, className: "w-full" })), {
|
|
6
6
|
defaultValue: '',
|
|
7
|
-
extractValue: (e) => e
|
|
7
|
+
extractValue: (e) => e
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
export {
|
|
10
|
+
export { DropdownField };
|
|
11
11
|
//# sourceMappingURL=DropdownField.js.map
|
|
@@ -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 React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '
|
|
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 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":["_jsx"],"mappings":";;;;AAcO,MAAM,aAAa,GAAG,kBAAkB,CAC3C,CAAC,KAAK,MACFA,GAAA,CAAC,QAAQ,IACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,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;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import '@cratis/arc/validation';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj;
|
|
6
|
+
export declare const AllFields: Story;
|
|
7
|
+
export declare const InputTextFieldExample: Story;
|
|
8
|
+
export declare const NumberFieldExample: Story;
|
|
9
|
+
export declare const TextAreaFieldExample: Story;
|
|
10
|
+
export declare const DropdownFieldExample: Story;
|
|
11
|
+
export declare const SliderFieldExample: Story;
|
|
12
|
+
export declare const CheckboxFieldExample: Story;
|
|
13
|
+
//# sourceMappingURL=Fields.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fields.stories.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/Fields.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,wBAAwB,CAAC;AAUhC,QAAA,MAAM,IAAI,EAAE,IAKX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAkEtB,eAAO,MAAM,SAAS,EAAE,KAsMvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAkCnC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAuBhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAqBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAuBlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAwBlC,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { CommandForm } from '@cratis/arc.react/commands';
|
|
4
|
+
import { Command, CommandValidator } from '@cratis/arc/commands';
|
|
5
|
+
import { PropertyDescriptor } from '@cratis/arc/reflection';
|
|
6
|
+
import { StoryContainer, StorySection, StoryDivider } from '@cratis/arc.react/stories';
|
|
7
|
+
import '@cratis/arc/validation';
|
|
8
|
+
import { InputTextField, NumberField, TextAreaField, CheckboxField, SliderField, DropdownField } from './index';
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'CommandForm/PrimeReact Fields',
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
class FormFieldsCommand extends Command {
|
|
17
|
+
route = '/api/fields';
|
|
18
|
+
validation = new FormFieldsCommandValidator();
|
|
19
|
+
propertyDescriptors = [
|
|
20
|
+
new PropertyDescriptor('textInput', String),
|
|
21
|
+
new PropertyDescriptor('emailInput', String),
|
|
22
|
+
new PropertyDescriptor('passwordInput', String),
|
|
23
|
+
new PropertyDescriptor('numberInput', Number),
|
|
24
|
+
new PropertyDescriptor('textArea', String),
|
|
25
|
+
new PropertyDescriptor('checkbox', Boolean),
|
|
26
|
+
new PropertyDescriptor('slider', Number),
|
|
27
|
+
new PropertyDescriptor('dropdown', String),
|
|
28
|
+
];
|
|
29
|
+
textInput = '';
|
|
30
|
+
emailInput = '';
|
|
31
|
+
passwordInput = '';
|
|
32
|
+
numberInput = 0;
|
|
33
|
+
textArea = '';
|
|
34
|
+
checkbox = false;
|
|
35
|
+
slider = 50;
|
|
36
|
+
dropdown = '';
|
|
37
|
+
constructor() {
|
|
38
|
+
super(Object, false);
|
|
39
|
+
}
|
|
40
|
+
get requestParameters() {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
get properties() {
|
|
44
|
+
return [
|
|
45
|
+
'textInput',
|
|
46
|
+
'emailInput',
|
|
47
|
+
'passwordInput',
|
|
48
|
+
'numberInput',
|
|
49
|
+
'textArea',
|
|
50
|
+
'checkbox',
|
|
51
|
+
'slider',
|
|
52
|
+
'dropdown'
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
class FormFieldsCommandValidator extends CommandValidator {
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.ruleFor(c => c.textInput).notEmpty().minLength(3);
|
|
60
|
+
this.ruleFor(c => c.emailInput).notEmpty().emailAddress();
|
|
61
|
+
this.ruleFor(c => c.passwordInput).notEmpty().minLength(6);
|
|
62
|
+
this.ruleFor(c => c.numberInput).greaterThanOrEqual(1).lessThanOrEqual(100);
|
|
63
|
+
this.ruleFor(c => c.dropdown).notEmpty();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const dropdownOptions = [
|
|
67
|
+
{ id: 'option1', name: 'Option 1' },
|
|
68
|
+
{ id: 'option2', name: 'Option 2' },
|
|
69
|
+
{ id: 'option3', name: 'Option 3' },
|
|
70
|
+
{ id: 'option4', name: 'Option 4' }
|
|
71
|
+
];
|
|
72
|
+
export const AllFields = {
|
|
73
|
+
render: () => {
|
|
74
|
+
const [validationState, setValidationState] = useState({ errors: {}, canSubmit: false });
|
|
75
|
+
return (_jsxs(StoryContainer, { size: "md", asCard: true, children: [_jsx("h1", { children: "PrimeReact Form Fields" }), _jsx("p", { children: "This showcase demonstrates all available PrimeReact-based form fields integrated with CommandForm from @cratis/arc.react." }), _jsx(StoryDivider, {}), _jsxs(CommandForm, { command: FormFieldsCommand, initialValues: {
|
|
76
|
+
textInput: '',
|
|
77
|
+
emailInput: '',
|
|
78
|
+
passwordInput: '',
|
|
79
|
+
numberInput: 25,
|
|
80
|
+
textArea: '',
|
|
81
|
+
checkbox: false,
|
|
82
|
+
slider: 50,
|
|
83
|
+
dropdown: '',
|
|
84
|
+
}, onFieldChange: async (command, fieldName) => {
|
|
85
|
+
const result = await command.validate();
|
|
86
|
+
if (!result.isValid) {
|
|
87
|
+
const fieldError = result.validationResults.find(v => v.members.includes(fieldName));
|
|
88
|
+
if (fieldError) {
|
|
89
|
+
setValidationState(prev => ({
|
|
90
|
+
errors: { ...prev.errors, [fieldName]: fieldError.message },
|
|
91
|
+
canSubmit: false
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
setValidationState(prev => {
|
|
97
|
+
const { [fieldName]: removed, ...rest } = prev.errors;
|
|
98
|
+
return {
|
|
99
|
+
errors: rest,
|
|
100
|
+
canSubmit: Object.keys(rest).length === 0
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}, children: [_jsxs(StorySection, { children: [_jsx("h3", { children: "Text Inputs" }), _jsx(InputTextField, { value: c => c.textInput, title: "Text Input", placeholder: "Enter at least 3 characters", description: "Standard text input field with validation" }), validationState.errors.textInput && (_jsx("div", { style: { color: 'var(--red-500)', fontSize: '0.875rem', marginTop: '0.25rem', marginBottom: '1rem' }, children: validationState.errors.textInput })), _jsx(InputTextField, { value: c => c.emailInput, title: "Email Input", type: "email", placeholder: "Enter a valid email address", description: "Email input with email validation" }), validationState.errors.emailInput && (_jsx("div", { style: { color: 'var(--red-500)', fontSize: '0.875rem', marginTop: '0.25rem', marginBottom: '1rem' }, children: validationState.errors.emailInput })), _jsx(InputTextField, { value: c => c.passwordInput, title: "Password Input", type: "password", placeholder: "Enter at least 6 characters", description: "Password input field (min 6 characters)" }), validationState.errors.passwordInput && (_jsx("div", { style: { color: 'var(--red-500)', fontSize: '0.875rem', marginTop: '0.25rem', marginBottom: '1rem' }, children: validationState.errors.passwordInput }))] }), _jsx(StoryDivider, {}), _jsxs(StorySection, { children: [_jsx("h3", { children: "Number Input" }), _jsx(NumberField, { value: c => c.numberInput, title: "Number Field", placeholder: "Enter a number (1-100)", description: "Number input with min/max boundaries", min: 1, max: 100, step: 1 }), validationState.errors.numberInput && (_jsx("div", { style: { color: 'var(--red-500)', fontSize: '0.875rem', marginTop: '0.25rem', marginBottom: '1rem' }, children: validationState.errors.numberInput }))] }), _jsx(StoryDivider, {}), _jsxs(StorySection, { children: [_jsx("h3", { children: "Text Area" }), _jsx(TextAreaField, { value: c => c.textArea, title: "Text Area Field", placeholder: "Enter a longer text...", description: "Multi-line text input", rows: 5 })] }), _jsx(StoryDivider, {}), _jsxs(StorySection, { children: [_jsx("h3", { children: "Dropdown" }), _jsx(DropdownField, { value: c => c.dropdown, title: "Dropdown Field", placeholder: "Select an option", description: "PrimeReact dropdown component", options: dropdownOptions, optionValue: "id", optionLabel: "name" }), validationState.errors.dropdown && (_jsx("div", { style: { color: 'var(--red-500)', fontSize: '0.875rem', marginTop: '0.25rem', marginBottom: '1rem' }, children: validationState.errors.dropdown }))] }), _jsx(StoryDivider, {}), _jsxs(StorySection, { children: [_jsx("h3", { children: "Slider" }), _jsx(SliderField, { value: c => c.slider, title: "Slider Field", description: "Slider for numeric values", min: 0, max: 100, step: 5 })] }), _jsx(StoryDivider, {}), _jsxs(StorySection, { children: [_jsx("h3", { children: "Checkbox" }), _jsx(CheckboxField, { value: c => c.checkbox, label: "I agree to the terms and conditions" })] }), _jsx(StoryDivider, {}), _jsxs("div", { style: { marginTop: '1.5rem', display: 'flex', gap: '0.5rem', alignItems: 'center' }, children: [_jsx("button", { type: "submit", disabled: !validationState.canSubmit, className: "p-button p-component", children: "Submit Form" }), !validationState.canSubmit && Object.keys(validationState.errors).length > 0 && (_jsx("span", { style: { color: 'var(--orange-500)', fontSize: '0.875rem' }, children: "Please fix validation errors" }))] })] })] }));
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
export const InputTextFieldExample = {
|
|
108
|
+
render: () => {
|
|
109
|
+
return (_jsxs(StoryContainer, { size: "sm", asCard: true, children: [_jsx("h2", { children: "InputTextField" }), _jsx("p", { children: "PrimeReact InputText component wrapped for CommandForm." }), _jsxs(CommandForm, { command: FormFieldsCommand, initialValues: { textInput: '', emailInput: '', passwordInput: '' }, children: [_jsx(InputTextField, { value: c => c.textInput, title: "Standard Text", placeholder: "Type here..." }), _jsx(InputTextField, { value: c => c.emailInput, title: "Email", type: "email", placeholder: "your@email.com" }), _jsx(InputTextField, { value: c => c.passwordInput, title: "Password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
export const NumberFieldExample = {
|
|
113
|
+
render: () => {
|
|
114
|
+
return (_jsxs(StoryContainer, { size: "sm", asCard: true, children: [_jsx("h2", { children: "NumberField" }), _jsx("p", { children: "PrimeReact InputNumber component with spinners and constraints." }), _jsx(CommandForm, { command: FormFieldsCommand, initialValues: { numberInput: 42 }, children: _jsx(NumberField, { value: c => c.numberInput, title: "Quantity", placeholder: "Enter a number", min: 0, max: 100, step: 1 }) })] }));
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
export const TextAreaFieldExample = {
|
|
118
|
+
render: () => {
|
|
119
|
+
return (_jsxs(StoryContainer, { size: "sm", asCard: true, children: [_jsx("h2", { children: "TextAreaField" }), _jsx("p", { children: "PrimeReact InputTextarea for multi-line text input." }), _jsx(CommandForm, { command: FormFieldsCommand, initialValues: { textArea: '' }, children: _jsx(TextAreaField, { value: c => c.textArea, title: "Description", placeholder: "Enter a detailed description...", rows: 6 }) })] }));
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export const DropdownFieldExample = {
|
|
123
|
+
render: () => {
|
|
124
|
+
return (_jsxs(StoryContainer, { size: "sm", asCard: true, children: [_jsx("h2", { children: "DropdownField" }), _jsx("p", { children: "PrimeReact Dropdown for selecting from a list of options." }), _jsx(CommandForm, { command: FormFieldsCommand, initialValues: { dropdown: '' }, children: _jsx(DropdownField, { value: c => c.dropdown, title: "Select Option", placeholder: "Choose...", options: dropdownOptions, optionValue: "id", optionLabel: "name" }) })] }));
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
export const SliderFieldExample = {
|
|
128
|
+
render: () => {
|
|
129
|
+
return (_jsxs(StoryContainer, { size: "sm", asCard: true, children: [_jsx("h2", { children: "SliderField" }), _jsx("p", { children: "PrimeReact Slider for selecting numeric values visually." }), _jsx(CommandForm, { command: FormFieldsCommand, initialValues: { slider: 75 }, children: _jsx(SliderField, { value: c => c.slider, title: "Volume", min: 0, max: 100, step: 5 }) })] }));
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
export const CheckboxFieldExample = {
|
|
133
|
+
render: () => {
|
|
134
|
+
return (_jsxs(StoryContainer, { size: "sm", asCard: true, children: [_jsx("h2", { children: "CheckboxField" }), _jsx("p", { children: "PrimeReact Checkbox for boolean values." }), _jsxs(CommandForm, { command: FormFieldsCommand, initialValues: { checkbox: false }, children: [_jsx(CheckboxField, { value: c => c.checkbox, label: "Enable notifications" }), _jsx(CheckboxField, { value: c => c.checkbox, label: "I have read and agree to the terms" })] })] }));
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=Fields.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fields.stories.js","sourceRoot":"","sources":["../../../../CommandForm/fields/Fields.stories.tsx"],"names":[],"mappings":";AAGA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,wBAAwB,CAAC;AAChC,OAAO,EACH,cAAc,EACd,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,IAAI,GAAS;IACf,KAAK,EAAE,+BAA+B;IACtC,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,iBAAkB,SAAQ,OAAO;IAC1B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EAAC,IAAI,EAAC,MAAM,mBAC5B,yCAAsB,EACtB,kEAA8C,EAE9C,MAAC,WAAW,IACR,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,aAElC,KAAC,aAAa,IACV,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EACtB,KAAK,EAAC,sBAAsB,GAC9B,EAEF,KAAC,aAAa,IACV,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EACtB,KAAK,EAAC,oCAAoC,GAC5C,IACQ,IACD,CACpB,CAAC;IACN,CAAC;CACJ,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WrappedFieldProps } from '@cratis/arc.react/commands';
|
|
2
3
|
interface InputTextComponentProps extends WrappedFieldProps<string> {
|
|
3
4
|
type?: 'text' | 'email' | 'password' | 'color' | 'date' | 'datetime-local' | 'time' | 'url' | 'tel' | 'search';
|
|
4
5
|
placeholder?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const InputTextField: {
|
|
7
|
-
<TCommand>(props:
|
|
8
|
+
<TCommand = unknown>(props: import("@cratis/arc.react/commands").CommandFormFieldComponentProps<InputTextComponentProps, TCommand>): React.ReactElement;
|
|
8
9
|
displayName: string;
|
|
9
10
|
};
|
|
10
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTextField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/InputTextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputTextField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/InputTextField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,UAAU,uBAAwB,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IAC/D,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC/G,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;CAe1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { InputText } from 'primereact/inputtext';
|
|
3
|
-
import { asCommandFormField } from '
|
|
3
|
+
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
4
4
|
|
|
5
5
|
const InputTextField = asCommandFormField((props) => (jsx(InputText, { type: props.type || 'text', value: props.value, onChange: props.onChange, invalid: props.invalid, placeholder: props.placeholder, className: "w-full" })), {
|
|
6
6
|
defaultValue: '',
|
|
@@ -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 '
|
|
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 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":["_jsx"],"mappings":";;;;AAYO,MAAM,cAAc,GAAG,kBAAkB,CAC5C,CAAC,KAAK,MACFA,IAAC,SAAS,EAAA,EACN,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,MAAM,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,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,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WrappedFieldProps } from '@cratis/arc.react/commands';
|
|
2
3
|
interface NumberFieldComponentProps extends WrappedFieldProps<number> {
|
|
3
4
|
placeholder?: string;
|
|
4
5
|
min?: number;
|
|
@@ -6,7 +7,7 @@ interface NumberFieldComponentProps extends WrappedFieldProps<number> {
|
|
|
6
7
|
step?: number;
|
|
7
8
|
}
|
|
8
9
|
export declare const NumberField: {
|
|
9
|
-
<TCommand>(props:
|
|
10
|
+
<TCommand = unknown>(props: import("@cratis/arc.react/commands").CommandFormFieldComponentProps<NumberFieldComponentProps, TCommand>): React.ReactElement;
|
|
10
11
|
displayName: string;
|
|
11
12
|
};
|
|
12
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/NumberField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/NumberField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,UAAU,yBAA0B,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW;;;CAiBvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { InputNumber } from 'primereact/inputnumber';
|
|
3
|
-
import { asCommandFormField } from '
|
|
3
|
+
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
4
4
|
|
|
5
5
|
const NumberField = asCommandFormField((props) => (jsx(InputNumber, { value: props.value, onValueChange: (e) => props.onChange(e.value ?? 0), invalid: props.invalid, placeholder: props.placeholder, min: props.min, max: props.max, step: props.step, className: "w-full" })), {
|
|
6
6
|
defaultValue: 0,
|
|
@@ -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 '
|
|
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 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":["_jsx"],"mappings":";;;;AAcO,MAAM,WAAW,GAAG,kBAAkB,CACzC,CAAC,KAAK,MACFA,GAAA,CAAC,WAAW,IACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,aAAa,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAClD,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,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WrappedFieldProps } from '@cratis/arc.react/commands';
|
|
3
|
+
interface SliderFieldComponentProps extends WrappedFieldProps<number> {
|
|
3
4
|
min?: number;
|
|
4
5
|
max?: number;
|
|
5
6
|
step?: number;
|
|
6
7
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
<TCommand>(props:
|
|
8
|
+
export declare const SliderField: {
|
|
9
|
+
<TCommand = unknown>(props: import("@cratis/arc.react/commands").CommandFormFieldComponentProps<SliderFieldComponentProps, TCommand>): React.ReactElement;
|
|
9
10
|
displayName: string;
|
|
10
11
|
};
|
|
11
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/SliderField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SliderField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/SliderField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,UAAU,yBAA0B,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW;;;CAoBvB,CAAC"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { Slider } from 'primereact/slider';
|
|
3
|
+
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
3
4
|
|
|
4
|
-
const
|
|
5
|
-
const min = props.min ?? 0;
|
|
6
|
-
const max = props.max ?? 100;
|
|
7
|
-
const step = props.step ?? 1;
|
|
8
|
-
return (jsxs("div", { className: "w-full flex items-center gap-4 p-3 border border-gray-300 rounded-md", children: [jsx("input", { type: "range", value: props.value, onChange: props.onChange, min: min, max: max, step: step, required: props.required, className: "flex-1" }), jsx("span", { className: "min-w-[3rem] text-right font-semibold", children: props.value })] }));
|
|
9
|
-
}, {
|
|
5
|
+
const SliderField = asCommandFormField((props) => (jsxs("div", { className: "w-full", children: [jsx(Slider, { value: props.value, onChange: (e) => props.onChange(e.value), min: props.min ?? 0, max: props.max ?? 100, step: props.step ?? 1, className: "w-full" }), jsx("div", { className: "text-center mt-2", children: jsx("span", { className: "font-semibold", children: props.value }) })] })), {
|
|
10
6
|
defaultValue: 0,
|
|
11
|
-
extractValue: (e) =>
|
|
7
|
+
extractValue: (e) => (typeof e === 'number' ? e : 0)
|
|
12
8
|
});
|
|
13
9
|
|
|
14
|
-
export {
|
|
10
|
+
export { SliderField };
|
|
15
11
|
//# sourceMappingURL=SliderField.js.map
|
|
@@ -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 React from 'react';\nimport { asCommandFormField, WrappedFieldProps } from '
|
|
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\">\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":["_jsxs","_jsx"],"mappings":";;;;AAaO,MAAM,WAAW,GAAG,kBAAkB,CACzC,CAAC,KAAK,MACFA,cAAK,SAAS,EAAC,QAAQ,EAAA,QAAA,EAAA,CACnBC,GAAA,CAAC,MAAM,EAAA,EACH,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,GACpB,EACFA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,kBAAkB,YAC7BA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,eAAe,EAAA,QAAA,EAAE,KAAK,CAAC,KAAK,GAAQ,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,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WrappedFieldProps } from '@cratis/arc.react/commands';
|
|
2
3
|
interface TextAreaFieldComponentProps extends WrappedFieldProps<string> {
|
|
3
4
|
placeholder?: string;
|
|
4
5
|
rows?: number;
|
|
5
6
|
cols?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const TextAreaField: {
|
|
8
|
-
<TCommand>(props:
|
|
9
|
+
<TCommand = unknown>(props: import("@cratis/arc.react/commands").CommandFormFieldComponentProps<TextAreaFieldComponentProps, TCommand>): React.ReactElement;
|
|
9
10
|
displayName: string;
|
|
10
11
|
};
|
|
11
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/TextAreaField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/TextAreaField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,UAAU,2BAA4B,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa;;;CAgBzB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { InputTextarea } from 'primereact/inputtextarea';
|
|
3
|
-
import { asCommandFormField } from '
|
|
3
|
+
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
4
4
|
|
|
5
5
|
const TextAreaField = asCommandFormField((props) => (jsx(InputTextarea, { value: props.value, onChange: props.onChange, invalid: props.invalid, placeholder: props.placeholder, rows: props.rows ?? 5, cols: props.cols, className: "w-full" })), {
|
|
6
6
|
defaultValue: '',
|
|
@@ -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 '
|
|
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 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":["_jsx"],"mappings":";;;;AAaO,MAAM,aAAa,GAAG,kBAAkB,CAC3C,CAAC,KAAK,MACFA,GAAA,CAAC,aAAa,EAAA,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,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;;;;"}
|
|
@@ -2,6 +2,6 @@ export * from './InputTextField';
|
|
|
2
2
|
export * from './NumberField';
|
|
3
3
|
export * from './CheckboxField';
|
|
4
4
|
export * from './TextAreaField';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export * from './DropdownField';
|
|
6
|
+
export * from './SliderField';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -2,6 +2,6 @@ export * from './InputTextField';
|
|
|
2
2
|
export * from './NumberField';
|
|
3
3
|
export * from './CheckboxField';
|
|
4
4
|
export * from './TextAreaField';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export * from './DropdownField';
|
|
6
|
+
export * from './SliderField';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './CommandFormField';
|
|
3
|
-
export * from './ValidationMessage';
|
|
4
|
-
export * from './CommandFormFields';
|
|
5
|
-
export * from './asCommandFormField';
|
|
1
|
+
export { CommandForm, CommandFormField, ValidationMessage, CommandFormFields, asCommandFormField, useCommandFormContext, useCommandInstance, useSetCommandResult, type CommandFormProps, type CommandFormFieldProps, type CommandFormFieldComponentProps, type BaseCommandFormFieldProps, type WrappedFieldProps, type CommandFormFieldConfig, type InjectedCommandFormFieldProps, type ColumnInfo } from '@cratis/arc.react/commands';
|
|
6
2
|
export * from './fields';
|
|
7
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../CommandForm/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../CommandForm/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,UAAU,EAClB,MAAM,4BAA4B,CAAC;AAGpC,cAAc,UAAU,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
export { CommandForm, useCommandFormContext, useCommandInstance, useSetCommandResult } from '
|
|
2
|
-
export { CommandFormField } from './CommandFormField.js';
|
|
3
|
-
export { ValidationMessage } from './ValidationMessage.js';
|
|
4
|
-
export { CommandFormFields } from './CommandFormFields.js';
|
|
5
|
-
export { asCommandFormField } from './asCommandFormField.js';
|
|
1
|
+
export { CommandForm, CommandFormField, CommandFormFields, ValidationMessage, asCommandFormField, useCommandFormContext, useCommandInstance, useSetCommandResult } from '@cratis/arc.react/commands';
|
|
6
2
|
export { InputTextField } from './fields/InputTextField.js';
|
|
7
3
|
export { NumberField } from './fields/NumberField.js';
|
|
8
4
|
export { CheckboxField } from './fields/CheckboxField.js';
|
|
9
5
|
export { TextAreaField } from './fields/TextAreaField.js';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
6
|
+
export { DropdownField } from './fields/DropdownField.js';
|
|
7
|
+
export { SliderField } from './fields/SliderField.js';
|
|
12
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -10,7 +10,7 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
10
10
|
state: State;
|
|
11
11
|
static getDerivedStateFromError(error: Error): State;
|
|
12
12
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
13
|
-
render(): string | number | bigint | boolean |
|
|
13
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export declare const
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ErrorBoundary } from './ErrorBoundary';
|
|
3
|
+
declare const meta: Meta<typeof ErrorBoundary>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ErrorBoundary>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithError: Story;
|
|
8
8
|
//# sourceMappingURL=ErrorBoundary.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.stories.d.ts","sourceRoot":"","sources":["../../../Common/ErrorBoundary.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.stories.d.ts","sourceRoot":"","sources":["../../../Common/ErrorBoundary.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAGpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAuB5C,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { ErrorBoundary } from './ErrorBoundary';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Common/ErrorBoundary',
|
|
6
|
+
component: ErrorBoundary,
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
const ErrorThrowingComponent = () => {
|
|
10
|
+
const [shouldThrow, setShouldThrow] = useState(false);
|
|
11
|
+
if (shouldThrow) {
|
|
12
|
+
throw new Error('This is a simulated error to demonstrate ErrorBoundary!');
|
|
13
|
+
}
|
|
14
|
+
return (_jsxs("div", { className: "p-4", children: [_jsx("h2", { className: "text-xl mb-3", children: "Click the button to trigger an error" }), _jsx("button", { className: "p-button p-component", onClick: () => setShouldThrow(true), children: "Throw Error" })] }));
|
|
15
|
+
};
|
|
16
|
+
export const Default = {
|
|
17
|
+
render: () => (_jsx(ErrorBoundary, { children: _jsxs("div", { className: "p-4", children: [_jsx("h1", { className: "text-2xl mb-3", children: "Normal Content" }), _jsx("p", { children: "This content is wrapped in an ErrorBoundary. Everything works fine here." })] }) })),
|
|
18
|
+
};
|
|
19
|
+
export const WithError = {
|
|
20
|
+
render: () => (_jsx(ErrorBoundary, { children: _jsx(ErrorThrowingComponent, {}) })),
|
|
21
|
+
};
|
|
6
22
|
//# sourceMappingURL=ErrorBoundary.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.stories.js","sourceRoot":"","sources":["../../../Common/ErrorBoundary.stories.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.stories.js","sourceRoot":"","sources":["../../../Common/ErrorBoundary.stories.tsx"],"names":[],"mappings":";AAGA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,IAAI,GAA+B;IACrC,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,aAAa;CAC3B,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,sBAAsB,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,IAAI,WAAW,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,CACH,eAAK,SAAS,EAAC,KAAK,aAChB,aAAI,SAAS,EAAC,cAAc,qDAA0C,EACtE,iBACI,SAAS,EAAC,sBAAsB,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,4BAG9B,IACP,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,MAAM,EAAE,GAAG,EAAE,CAAC,CACV,KAAC,aAAa,cACV,eAAK,SAAS,EAAC,KAAK,aAChB,aAAI,SAAS,EAAC,eAAe,+BAAoB,EACjD,mGAA+E,IAC7E,GACM,CACnB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,CACV,KAAC,aAAa,cACV,KAAC,sBAAsB,KAAG,GACd,CACnB;CACJ,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export declare const
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormElement } from './FormElement';
|
|
3
|
+
declare const meta: Meta<typeof FormElement>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FormElement>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithEmailIcon: Story;
|
|
8
|
+
export declare const WithSearchIcon: Story;
|
|
8
9
|
//# sourceMappingURL=FormElement.stories.d.ts.map
|