@dxos/react-ui-form 0.7.5-main.9d2a38b → 0.7.5-main.e94eead
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/lib/browser/index.mjs +1014 -571
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +1031 -599
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +1014 -571
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +1 -2
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
- package/dist/types/src/components/Form/ArrayField.d.ts +15 -0
- package/dist/types/src/components/Form/ArrayField.d.ts.map +1 -0
- package/dist/types/src/components/Form/Defaults.d.ts +6 -7
- package/dist/types/src/components/Form/Defaults.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.d.ts +12 -21
- package/dist/types/src/components/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.stories.d.ts +2 -1
- package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormActions.d.ts +6 -0
- package/dist/types/src/components/Form/FormActions.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormContent.d.ts +25 -0
- package/dist/types/src/components/Form/FormContent.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormContext.d.ts +23 -0
- package/dist/types/src/components/Form/FormContext.d.ts.map +1 -0
- package/dist/types/src/components/Form/Input.d.ts +7 -8
- package/dist/types/src/components/Form/Input.d.ts.map +1 -1
- package/dist/types/src/components/Form/custom/GeoPointInput.d.ts +1 -3
- package/dist/types/src/components/Form/custom/GeoPointInput.d.ts.map +1 -1
- package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts +3 -0
- package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts.map +1 -0
- package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts +7 -0
- package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/custom/TupleInput.d.ts +2 -4
- package/dist/types/src/components/Form/custom/TupleInput.d.ts.map +1 -1
- package/dist/types/src/components/Form/custom/index.d.ts +1 -0
- package/dist/types/src/components/Form/custom/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/factory.d.ts +2 -2
- package/dist/types/src/components/Form/factory.d.ts.map +1 -1
- package/dist/types/src/components/Form/index.d.ts +2 -0
- package/dist/types/src/components/Form/index.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor/Test.stories.d.ts +1 -2
- package/dist/types/src/components/ViewEditor/Test.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +1 -2
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/deprecated/Form.d.ts +1 -2
- package/dist/types/src/components/deprecated/Form.d.ts.map +1 -1
- package/dist/types/src/components/deprecated/Form.stories.d.ts +1 -2
- package/dist/types/src/components/deprecated/Form.stories.d.ts.map +1 -1
- package/dist/types/src/components/deprecated/FormInput.d.ts +6 -1
- package/dist/types/src/components/deprecated/FormInput.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +3 -3
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/hooks/useForm.d.ts +11 -11
- package/dist/types/src/hooks/useForm.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/util/field.d.ts.map +1 -1
- package/dist/types/src/util/formatting.d.ts.map +1 -1
- package/package.json +29 -27
- package/src/components/FieldEditor/FieldEditor.stories.tsx +1 -1
- package/src/components/FieldEditor/FieldEditor.tsx +7 -6
- package/src/components/Form/ArrayField.tsx +111 -0
- package/src/components/Form/Defaults.tsx +78 -34
- package/src/components/Form/Form.stories.tsx +15 -5
- package/src/components/Form/Form.tsx +50 -355
- package/src/components/Form/FormActions.tsx +41 -0
- package/src/components/Form/FormContent.tsx +170 -0
- package/src/components/Form/FormContext.tsx +96 -0
- package/src/components/Form/Input.tsx +5 -6
- package/src/components/Form/custom/GeoPointInput.tsx +44 -23
- package/src/components/Form/custom/SelectOptionsInput.stories.tsx +58 -0
- package/src/components/Form/custom/SelectOptionsInput.tsx +190 -0
- package/src/components/Form/custom/TupleInput.tsx +5 -9
- package/src/components/Form/custom/index.ts +1 -0
- package/src/components/Form/factory.tsx +6 -7
- package/src/components/Form/index.ts +3 -0
- package/src/components/ViewEditor/ViewEditor.tsx +7 -4
- package/src/components/deprecated/FormInput.tsx +20 -7
- package/src/hooks/useForm.ts +116 -79
- package/src/translations.ts +9 -1
- package/src/util/field.ts +19 -1
- package/src/util/formatting.ts +29 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytes":5683,"imports":[],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytes":4795,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytes":520,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx","kind":"import-statement","original":"./FormInput"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytes":3885,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytes":5782,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytes":5323,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytes":627,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx","kind":"import-statement","original":"./GeoPointInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx","kind":"import-statement","original":"./TupleInput"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytes":13248,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytes":2489,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytes":20874,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytes":502,"imports":[{"path":"packages/ui/react-ui-form/src/hooks/useForm.ts","kind":"import-statement","original":"./useForm"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytes":42773,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"},{"path":"packages/ui/react-ui-form/src/components/Form/factory.tsx","kind":"import-statement","original":"./factory"},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytes":764,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/Form.tsx","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytes":20284,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytes":531,"imports":[{"path":"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx","kind":"import-statement","original":"./FieldEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytes":17372,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"../FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytes":525,"imports":[{"path":"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/index.ts":{"bytes":787,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/index.ts","kind":"import-statement","original":"./deprecated"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"./FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/ViewEditor/index.ts","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/util/field.ts":{"bytes":12238,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytes":12559,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/index.ts":{"bytes":589,"imports":[{"path":"packages/ui/react-ui-form/src/util/field.ts","kind":"import-statement","original":"./field"},{"path":"packages/ui/react-ui-form/src/util/formatting.ts","kind":"import-statement","original":"./formatting"}],"format":"esm"},"packages/ui/react-ui-form/src/index.ts":{"bytes":916,"imports":[{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/ui/react-ui-form/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-form/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":85242},"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["BooleanInput","DeprecatedFormInput","FieldEditor","Form","FormActions","GeoPointInput","InputHeader","NumberInput","SelectInput","TextInput","TupleInput","ViewEditor","cellClassesForFieldType","cellClassesForRowSelection","formatForDisplay","formatForEditing","parseValue","pathNotUniqueError","translations","useForm"],"entryPoint":"packages/ui/react-ui-form/src/index.ts","inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytesInOutput":1666},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytesInOutput":1121},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytesInOutput":4646},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytesInOutput":1314},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytesInOutput":737},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytesInOutput":1144},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytesInOutput":3519},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytesInOutput":10450},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytesInOutput":332},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytesInOutput":3894},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytesInOutput":4410},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/field.ts":{"bytesInOutput":2809},"packages/ui/react-ui-form/src/util/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytesInOutput":2779}},"bytes":40337}}}
|
|
1
|
+
{"inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytes":6585,"imports":[],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytes":5961,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytes":520,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx","kind":"import-statement","original":"./FormInput"}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytes":23548,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytes":502,"imports":[{"path":"packages/ui/react-ui-form/src/hooks/useForm.ts","kind":"import-statement","original":"./useForm"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormContext.tsx":{"bytes":11396,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytes":3673,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytes":10549,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx":{"bytes":25575,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-pickers","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytes":5029,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytes":745,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx","kind":"import-statement","original":"./GeoPointInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx","kind":"import-statement","original":"./SelectOptionsInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx","kind":"import-statement","original":"./TupleInput"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytes":18066,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormActions.tsx":{"bytes":4249,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx":{"bytes":14112,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormContent.tsx","kind":"import-statement","original":"./FormContent"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytes":2710,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormContent.tsx":{"bytes":16769,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx","kind":"import-statement","original":"./ArrayField"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/factory.tsx","kind":"import-statement","original":"./factory"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytes":8385,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormActions.tsx","kind":"import-statement","original":"./FormActions"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContent.tsx","kind":"import-statement","original":"./FormContent"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytes":1029,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/Form.tsx","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytes":20607,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytes":531,"imports":[{"path":"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx","kind":"import-statement","original":"./FieldEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytes":17854,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"../FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytes":525,"imports":[{"path":"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/index.ts":{"bytes":787,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/index.ts","kind":"import-statement","original":"./deprecated"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"./FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/ViewEditor/index.ts","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/util/field.ts":{"bytes":14880,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytes":16034,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/index.ts":{"bytes":589,"imports":[{"path":"packages/ui/react-ui-form/src/util/field.ts","kind":"import-statement","original":"./field"},{"path":"packages/ui/react-ui-form/src/util/formatting.ts","kind":"import-statement","original":"./formatting"}],"format":"esm"},"packages/ui/react-ui-form/src/index.ts":{"bytes":916,"imports":[{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/ui/react-ui-form/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-form/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":116235},"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-pickers","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["BooleanInput","DeprecatedFormContainer","DeprecatedFormInput","FieldEditor","Form","GeoPointInput","InputHeader","MarkdownInput","NumberInput","SelectInput","SelectOptionInput","TextInput","TupleInput","ViewEditor","cellClassesForFieldType","cellClassesForRowSelection","formatForDisplay","formatForEditing","parseValue","pathNotUniqueError","translations","useForm","useFormValues"],"entryPoint":"packages/ui/react-ui-form/src/index.ts","inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytesInOutput":1964},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytesInOutput":1565},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytesInOutput":4746},"packages/ui/react-ui-form/src/components/Form/FormContext.tsx":{"bytesInOutput":2493},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytesInOutput":5001},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytesInOutput":2646},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytesInOutput":737},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx":{"bytesInOutput":6397},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytesInOutput":1114},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytesInOutput":4740},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytesInOutput":1295},"packages/ui/react-ui-form/src/components/Form/FormActions.tsx":{"bytesInOutput":1021},"packages/ui/react-ui-form/src/components/Form/FormContent.tsx":{"bytesInOutput":4044},"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx":{"bytesInOutput":3675},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytesInOutput":392},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytesInOutput":4497},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/field.ts":{"bytesInOutput":3379},"packages/ui/react-ui-form/src/util/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytesInOutput":3516}},"bytes":55280}}}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type SchemaRegistry } from '@dxos/echo-db';
|
|
3
2
|
import { type FieldType, type ViewType, type ViewProjection } from '@dxos/schema';
|
|
4
3
|
export type FieldEditorProps = {
|
|
@@ -12,5 +11,5 @@ export type FieldEditorProps = {
|
|
|
12
11
|
/**
|
|
13
12
|
* Displays a Form representing the metadata for a given `Field` and `View`.
|
|
14
13
|
*/
|
|
15
|
-
export declare const FieldEditor: ({ view, projection, field, registry, onSave, onCancel }: FieldEditorProps) =>
|
|
14
|
+
export declare const FieldEditor: ({ view, projection, field, registry, onSave, onCancel }: FieldEditorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
15
|
//# sourceMappingURL=FieldEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/FieldEditor/FieldEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/FieldEditor/FieldEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD,OAAO,EAIL,KAAK,SAAS,EAEd,KAAK,QAAQ,EACb,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAC;AAKtB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,4DAA6D,gBAAgB,mDA4JpG,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type SchemaProperty } from '@dxos/schema';
|
|
2
|
+
import { type ComponentLookup } from './Form';
|
|
3
|
+
import { type FormInputStateProps } from './FormContext';
|
|
4
|
+
import { type InputComponent } from './Input';
|
|
5
|
+
type ArrayFieldProps = {
|
|
6
|
+
property: SchemaProperty<any>;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
inputProps: FormInputStateProps;
|
|
9
|
+
path?: (string | number)[];
|
|
10
|
+
Custom?: Partial<Record<string, InputComponent>>;
|
|
11
|
+
lookupComponent?: ComponentLookup;
|
|
12
|
+
};
|
|
13
|
+
export declare const ArrayField: ({ property, readonly, path, inputProps, Custom, lookupComponent }: ArrayFieldProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=ArrayField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/ArrayField.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAK3D,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IACjD,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,sEAAuE,eAAe,mDA8E5G,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type BaseObject } from '@dxos/echo-schema';
|
|
3
1
|
import { type InputProps } from './Input';
|
|
4
|
-
export declare const TextInput:
|
|
5
|
-
export declare const NumberInput:
|
|
6
|
-
export declare const BooleanInput:
|
|
7
|
-
export type SelectInputOptions
|
|
2
|
+
export declare const TextInput: ({ type, label, inputOnly, disabled, placeholder, getStatus, getValue, onValueChange, onBlur, }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const NumberInput: ({ type, label, inputOnly, disabled, placeholder, getStatus, getValue, onValueChange, onBlur, }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const BooleanInput: ({ type, label, inputOnly, getStatus, getValue, onValueChange }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type SelectInputOptions = InputProps & {
|
|
8
6
|
options?: Array<{
|
|
9
7
|
value: string | number;
|
|
10
8
|
label?: string;
|
|
11
9
|
}>;
|
|
12
10
|
};
|
|
13
|
-
export declare const SelectInput:
|
|
11
|
+
export declare const SelectInput: ({ type, label, inputOnly, disabled, placeholder, options, getStatus, getValue, onValueChange, }: SelectInputOptions) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const MarkdownInput: ({ type, label, inputOnly, disabled, placeholder, getStatus, getValue, onValueChange, onBlur, }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
//# sourceMappingURL=Defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Defaults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Defaults.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,SAAS,mGAUnB,UAAU,4CAoBZ,CAAC;AAEF,eAAO,MAAM,WAAW,mGAUrB,UAAU,4CAqBZ,CAAC;AAEF,eAAO,MAAM,YAAY,mEAAoE,UAAU,4CAetG,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,WAAW,oGAUrB,kBAAkB,4CA6BpB,CAAC;AAEF,eAAO,MAAM,aAAa,mGAUvB,UAAU,4CA8CZ,CAAC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type BaseObject, S, type PropertyKey } from '@dxos/echo-schema';
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import { type BaseObject, type S, type PropertyKey } from '@dxos/echo-schema';
|
|
3
3
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
4
|
import { type SchemaProperty } from '@dxos/schema';
|
|
5
5
|
import { type InputProps, type InputComponent } from './Input';
|
|
6
6
|
import { type FormOptions } from '../../hooks';
|
|
7
7
|
export type PropsFilter<T extends BaseObject> = (props: SchemaProperty<T>[]) => SchemaProperty<T>[];
|
|
8
|
+
export type ComponentLookup = (args: {
|
|
9
|
+
prop: string;
|
|
10
|
+
schema: S.Schema<any>;
|
|
11
|
+
inputProps: InputProps;
|
|
12
|
+
}) => ReactElement | undefined;
|
|
13
|
+
export type CustomInputMap = Partial<Record<string, InputComponent>>;
|
|
8
14
|
export type FormProps<T extends BaseObject> = ThemedClassName<{
|
|
9
15
|
values: Partial<T>;
|
|
10
16
|
/** Path to the current object from the root. Used with nested forms. */
|
|
@@ -16,27 +22,12 @@ export type FormProps<T extends BaseObject> = ThemedClassName<{
|
|
|
16
22
|
autoSave?: boolean;
|
|
17
23
|
testId?: string;
|
|
18
24
|
onCancel?: () => void;
|
|
19
|
-
lookupComponent?:
|
|
20
|
-
prop: string;
|
|
21
|
-
schema: S.Schema<any>;
|
|
22
|
-
inputProps: InputProps<T>;
|
|
23
|
-
}) => React.ReactElement | undefined;
|
|
25
|
+
lookupComponent?: ComponentLookup;
|
|
24
26
|
/**
|
|
25
27
|
* Map of custom renderers for specific properties.
|
|
26
|
-
*
|
|
28
|
+
* Prefer lookupComponent for plugin specific input surfaces.
|
|
27
29
|
*/
|
|
28
|
-
Custom?:
|
|
30
|
+
Custom?: CustomInputMap;
|
|
29
31
|
} & Pick<FormOptions<T>, 'schema' | 'onValuesChanged' | 'onValidate' | 'onSave'>>;
|
|
30
|
-
|
|
31
|
-
* General purpose form component that displays field controls based on the given schema.
|
|
32
|
-
*/
|
|
33
|
-
export declare const Form: <T extends BaseObject>({ classNames, schema, values: initialValues, path, readonly, filter, sort, autoSave, testId, onValuesChanged, onValidate, onSave, onCancel, lookupComponent, Custom, }: FormProps<T>) => React.JSX.Element;
|
|
34
|
-
type FormActionsProps = {
|
|
35
|
-
readonly?: boolean;
|
|
36
|
-
canSubmit: boolean;
|
|
37
|
-
onCancel?: () => void;
|
|
38
|
-
onSubmit: () => void;
|
|
39
|
-
};
|
|
40
|
-
export declare const FormActions: ({ onCancel, onSubmit, canSubmit, readonly }: FormActionsProps) => React.JSX.Element;
|
|
41
|
-
export {};
|
|
32
|
+
export declare const Form: <T extends BaseObject>({ classNames, schema, values: initialValues, path, autoFocus, readonly, filter, sort, autoSave, testId, onValuesChanged, onValidate, onSave, onCancel, lookupComponent, Custom, }: FormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
42
33
|
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,YAAY,EAA8B,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,CAAC,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;AAEpG,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;CACxB,KAAK,YAAY,GAAG,SAAS,CAAC;AAE/B,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAErE,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,UAAU,IAAI,eAAe,CAC3D;IACE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAEnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAGhB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,iBAAiB,GAAG,YAAY,GAAG,QAAQ,CAAC,CACjF,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,UAAU,qLAiBtC,SAAS,CAAC,CAAC,CAAC,4CAwCd,CAAC"}
|
|
@@ -24,13 +24,14 @@ export default meta;
|
|
|
24
24
|
type Story<T extends BaseObject> = StoryObj<StoryProps<T>>;
|
|
25
25
|
export declare const Default: Story<TestType>;
|
|
26
26
|
export declare const Org: Story<Testing.OrgSchemaType>;
|
|
27
|
+
export declare const OrgAutoSave: Story<Testing.OrgSchemaType>;
|
|
27
28
|
declare const ShapeSchema: S.mutable<S.Struct<{
|
|
28
29
|
shape: S.optional<S.Union<[S.Struct<{
|
|
29
30
|
type: S.Literal<["circle"]>;
|
|
30
31
|
radius: S.optional<S.SchemaClass<number, number, never>>;
|
|
31
32
|
}>, S.Struct<{
|
|
32
33
|
type: S.Literal<["square"]>;
|
|
33
|
-
size: S.optional<S.
|
|
34
|
+
size: S.optional<S.refine<number, S.Schema<number, number, never>>>;
|
|
34
35
|
}>]>>;
|
|
35
36
|
}>>;
|
|
36
37
|
type ShapeType = S.Schema.Type<typeof ShapeSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAO,KAAK,UAAU,EAAU,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAI/C,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAY9C,QAAA,MAAM,UAAU;;;;;;;;;;;GAME,CAAC;AAEnB,KAAK,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAEjD,KAAK,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI;IAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAiB/E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAQ/B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,CAAC,CAAC,SAAS,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3D,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,QAAQ,CAWnC,CAAC;
|
|
1
|
+
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAO,KAAK,UAAU,EAAU,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAI/C,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAY9C,QAAA,MAAM,UAAU;;;;;;;;;;;GAME,CAAC;AAEnB,KAAK,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAEjD,KAAK,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI;IAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAiB/E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAQ/B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,CAAC,CAAC,SAAS,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3D,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,QAAQ,CAWnC,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAQ5C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CASpD,CAAC;AAkBF,QAAA,MAAM,WAAW;;;;;;;;GAaC,CAAC;AAEnB,KAAK,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAEnD,KAAK,4BAA4B,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAgCzD,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,4BAA4B,CAUrE,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;GAGA,CAAC;AAEnB,KAAK,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAiBrD,eAAO,MAAM,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAQlD,CAAC;AAEF,QAAA,MAAM,WAAW;;GAIC,CAAC;AAEnB,KAAK,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAiBnD,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,CAO/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormActions.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,2BAA4B,gBAAgB,4CAuBnE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { type SchemaProperty } from '@dxos/schema';
|
|
3
|
+
import { type ComponentLookup } from './Form';
|
|
4
|
+
import { type InputComponent } from './Input';
|
|
5
|
+
export type FormContentProps = {
|
|
6
|
+
schema: S.Schema.All;
|
|
7
|
+
path?: (string | number)[];
|
|
8
|
+
filter?: (props: SchemaProperty<any>[]) => SchemaProperty<any>[];
|
|
9
|
+
sort?: string[];
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
lookupComponent?: ComponentLookup;
|
|
12
|
+
Custom?: Partial<Record<string, InputComponent>>;
|
|
13
|
+
};
|
|
14
|
+
export type FormFieldProps = {
|
|
15
|
+
property: SchemaProperty<any>;
|
|
16
|
+
path?: (string | number)[];
|
|
17
|
+
readonly?: boolean;
|
|
18
|
+
/** Used to indicate if input should be presented inline (e.g. for array items). */
|
|
19
|
+
inline?: boolean;
|
|
20
|
+
lookupComponent?: ComponentLookup;
|
|
21
|
+
Custom?: Partial<Record<string, InputComponent>>;
|
|
22
|
+
};
|
|
23
|
+
export declare const FormField: ({ property, path, readonly, inline, lookupComponent, Custom }: FormFieldProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export declare const FormFields: ({ schema, path, filter, sort, readonly, lookupComponent, Custom }: FormContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=FormContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAO,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAKxE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;IACjE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,SAAS,kEAAmE,cAAc,mDAkGtG,CAAC;AAEF,eAAO,MAAM,UAAU,sEAAuE,gBAAgB,4CA4B7G,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { type FocusEvent, type PropsWithChildren } from 'react';
|
|
2
|
+
import { type BaseObject } from '@dxos/echo-schema';
|
|
3
|
+
import { type SimpleType } from '@dxos/effect';
|
|
4
|
+
import { type FormHandler, type FormOptions } from '../../hooks';
|
|
5
|
+
type FormContextValue<T extends BaseObject> = FormHandler<T>;
|
|
6
|
+
export declare const useFormContext: <T extends BaseObject>() => FormContextValue<T>;
|
|
7
|
+
export declare const useFormValues: (path?: (string | number)[]) => any;
|
|
8
|
+
export type FormInputStateProps = {
|
|
9
|
+
getStatus: () => {
|
|
10
|
+
status?: 'error';
|
|
11
|
+
error?: string;
|
|
12
|
+
};
|
|
13
|
+
getValue: <V>() => V | undefined;
|
|
14
|
+
onValueChange: (type: SimpleType, value: any) => void;
|
|
15
|
+
onBlur: (event: FocusEvent<HTMLElement>) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const useInputProps: (path?: (string | number)[]) => FormInputStateProps;
|
|
18
|
+
export declare const FormProvider: ({ children, formRef, autoSave, ...formOptions }: PropsWithChildren<FormOptions<any> & {
|
|
19
|
+
formRef?: React.RefObject<HTMLDivElement>;
|
|
20
|
+
autoSave?: boolean;
|
|
21
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=FormContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAiD,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGtH,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAW,MAAM,aAAa,CAAC;AAE1E,KAAK,gBAAgB,CAAC,CAAC,SAAS,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAI7D,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,UAAU,OAAK,gBAAgB,CAAC,CAAC,CAEzE,CAAC;AAEF,eAAO,MAAM,aAAa,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAQ,GAI9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACtD,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAQ,mBAa9D,CAAC;AAEF,eAAO,MAAM,YAAY,oDAKtB,iBAAiB,CAClB,WAAW,CAAC,GAAG,CAAC,GAAG;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACF,4CAqCA,CAAC"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type
|
|
1
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
2
|
+
import { type FormatEnum } from '@dxos/echo-schema';
|
|
3
3
|
import { type SimpleType } from '@dxos/effect';
|
|
4
|
-
import { type
|
|
4
|
+
import { type FormInputStateProps } from './FormContext';
|
|
5
5
|
/**
|
|
6
6
|
* Props passed to input components.
|
|
7
7
|
*/
|
|
8
|
-
export type InputProps
|
|
9
|
-
property: PropertyKey<T>;
|
|
8
|
+
export type InputProps = {
|
|
10
9
|
type: SimpleType;
|
|
11
10
|
format?: FormatEnum;
|
|
12
11
|
label?: string;
|
|
13
12
|
disabled?: boolean;
|
|
14
13
|
placeholder?: string;
|
|
15
14
|
inputOnly?: boolean;
|
|
16
|
-
} &
|
|
15
|
+
} & FormInputStateProps;
|
|
17
16
|
/**
|
|
18
17
|
* Form input component.
|
|
19
18
|
*/
|
|
20
|
-
export type InputComponent
|
|
19
|
+
export type InputComponent = FC<InputProps>;
|
|
21
20
|
export type InputHeaderProps = PropsWithChildren<{
|
|
22
21
|
error?: string;
|
|
23
22
|
}>;
|
|
24
|
-
export declare const InputHeader: ({ children, error }: InputHeaderProps) =>
|
|
23
|
+
export declare const InputHeader: ({ children, error }: InputHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
24
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Input.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Input.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,mBAAmB,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,wBAAyB,gBAAgB,4CAiBhE,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type BaseObject } from '@dxos/echo-schema';
|
|
3
1
|
import { type InputProps } from '../Input';
|
|
4
|
-
export declare const GeoPointInput:
|
|
2
|
+
export declare const GeoPointInput: ({ type, label, disabled, getStatus, getValue, onValueChange, onBlur }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
3
|
//# sourceMappingURL=GeoPointInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoPointInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/GeoPointInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GeoPointInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/GeoPointInput.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,aAAa,0EAA2E,UAAU,4CA4D9G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionsInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/SelectOptionsInput.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAGxD,eAAO,MAAM,iBAAiB,kEAAmE,UAAU,4CA4K1G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionsInput.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/SelectOptionsInput.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAuC5D,QAAA,MAAM,IAAI,EAAE,IAKX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type BaseObject } from '@dxos/echo-schema';
|
|
3
1
|
import { type InputProps } from '../Input';
|
|
4
|
-
export declare const TupleInput:
|
|
2
|
+
export declare const TupleInput: ({ binding, type, label, disabled, getStatus, getValue, onValueChange, onBlur, }: InputProps & {
|
|
5
3
|
binding: string[];
|
|
6
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
//# sourceMappingURL=TupleInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TupleInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/TupleInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TupleInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/TupleInput.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIxD,eAAO,MAAM,UAAU,oFASpB,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,4CAyBpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormatEnum } from '@dxos/echo-schema';
|
|
2
2
|
import { type SimpleType } from '@dxos/effect';
|
|
3
3
|
import { type InputComponent } from './Input';
|
|
4
4
|
/**
|
|
5
5
|
* Get property input component.
|
|
6
6
|
*/
|
|
7
|
-
export declare const getInputComponent:
|
|
7
|
+
export declare const getInputComponent: (type: SimpleType, format?: FormatEnum) => InputComponent | undefined;
|
|
8
8
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/factory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/factory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,SAAU,UAAU,WAAW,UAAU,KAAG,cAAc,GAAG,SAgB1F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,cAAc,UAAU,CAAC;AAEzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type Meta, type StoryObj } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
export type TestProps = {
|
|
4
3
|
onClick: () => void;
|
|
5
4
|
};
|
|
6
|
-
export declare const Test: ({ onClick }: TestProps) =>
|
|
5
|
+
export declare const Test: ({ onClick }: TestProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare const Primary: StoryObj<TestProps>;
|
|
8
7
|
declare const meta: Meta;
|
|
9
8
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Test.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/Test.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Test.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/Test.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAY5D,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,IAAI,gBAAiB,SAAS,4CAI1C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,SAAS,CAUvC,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type SchemaRegistry } from '@dxos/echo-db';
|
|
3
2
|
import { type EchoSchema } from '@dxos/echo-schema';
|
|
4
3
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
@@ -15,5 +14,5 @@ export type ViewEditorProps = ThemedClassName<{
|
|
|
15
14
|
/**
|
|
16
15
|
* Schema-based object form.
|
|
17
16
|
*/
|
|
18
|
-
export declare const ViewEditor: ({ classNames, schema, view, registry, readonly, showHeading, onTypenameChanged, onDelete, }: ViewEditorProps) =>
|
|
17
|
+
export declare const ViewEditor: ({ classNames, schema, view, registry, readonly, showHeading, onTypenameChanged, onDelete, }: ViewEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
//# sourceMappingURL=ViewEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAe,KAAK,UAAU,EAAK,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAc,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAA+B,KAAK,QAAQ,EAAoC,MAAM,cAAc,CAAC;AAmB5G,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,gGASpB,eAAe,4CAkHjB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type S } from '@dxos/effect';
|
|
3
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
3
|
import { type ViewType } from '@dxos/schema';
|
|
@@ -11,5 +10,5 @@ export type DeprecatedFormProps<T extends {} = {}> = ThemedClassName<{
|
|
|
11
10
|
/**
|
|
12
11
|
* Schema-based object form.
|
|
13
12
|
*/
|
|
14
|
-
export declare const DeprecatedForm: <T extends {} = {}>({ classNames, view, object, schema, readonly, }: DeprecatedFormProps<T>) =>
|
|
13
|
+
export declare const DeprecatedForm: <T extends {} = {}>({ classNames, view, object, schema, readonly, }: DeprecatedFormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/deprecated/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/deprecated/Form.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAO,KAAK,CAAC,EAAgB,MAAM,cAAc,CAAC;AACzD,OAAO,EAAS,KAAK,eAAe,EAA+C,MAAM,gBAAgB,CAAC;AAE1G,OAAO,EAAE,KAAK,QAAQ,EAAgC,MAAM,cAAc,CAAC;AAE3E,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,eAAe,CAAC;IACnE,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,CAAC,CAAC;IACV,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,EAAE,wDAMxC,mBAAmB,CAAC,CAAC,CAAC,4CA0DxB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
2
|
import { type Meta, type StoryObj } from '@storybook/react';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import { type TestType } from '@dxos/schema/testing';
|
|
5
4
|
import { type DeprecatedFormProps } from './Form';
|
|
6
|
-
declare const DefaultStory: (props: DeprecatedFormProps) =>
|
|
5
|
+
declare const DefaultStory: (props: DeprecatedFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
declare const meta: Meta<typeof DefaultStory>;
|
|
8
7
|
export default meta;
|
|
9
8
|
type Story = StoryObj<DeprecatedFormProps<TestType>>;
|