@dxos/react-ui-form 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +0 -1
  2. package/dist/lib/browser/index.mjs +2319 -2347
  3. package/dist/lib/browser/index.mjs.map +4 -4
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/node-esm/index.mjs +2319 -2347
  6. package/dist/lib/node-esm/index.mjs.map +4 -4
  7. package/dist/lib/node-esm/meta.json +1 -1
  8. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +8 -7
  9. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  10. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +66 -60
  11. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
  12. package/dist/types/src/components/Form/Form.d.ts +87 -27
  13. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  14. package/dist/types/src/components/Form/Form.stories.d.ts +111 -150
  15. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  16. package/dist/types/src/components/Form/FormField.d.ts +43 -0
  17. package/dist/types/src/components/Form/FormField.d.ts.map +1 -0
  18. package/dist/types/src/components/Form/FormFieldComponent.d.ts +77 -0
  19. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +1 -0
  20. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts +9 -0
  21. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +1 -0
  22. package/dist/types/src/components/Form/FormFieldSet.d.ts +18 -0
  23. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +1 -0
  24. package/dist/types/src/components/Form/fields/ArrayField.d.ts +18 -0
  25. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +1 -0
  26. package/dist/types/src/components/Form/fields/BooleanField.d.ts +4 -0
  27. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +1 -0
  28. package/dist/types/src/components/Form/fields/GeoPointField.d.ts +5 -0
  29. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +1 -0
  30. package/dist/types/src/components/Form/fields/MarkdownField.d.ts +4 -0
  31. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +1 -0
  32. package/dist/types/src/components/Form/fields/NumberField.d.ts +4 -0
  33. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +1 -0
  34. package/dist/types/src/components/Form/fields/RefField.d.ts +16 -0
  35. package/dist/types/src/components/Form/fields/RefField.d.ts.map +1 -0
  36. package/dist/types/src/components/Form/fields/SelectField.d.ts +10 -0
  37. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +1 -0
  38. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +5 -0
  39. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +1 -0
  40. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts +82 -0
  41. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +1 -0
  42. package/dist/types/src/components/Form/fields/TextAreaField.d.ts +4 -0
  43. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +1 -0
  44. package/dist/types/src/components/Form/fields/TextField.d.ts +4 -0
  45. package/dist/types/src/components/Form/fields/TextField.d.ts.map +1 -0
  46. package/dist/types/src/components/Form/fields/TupleField.d.ts +6 -0
  47. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +1 -0
  48. package/dist/types/src/components/Form/fields/index.d.ts +12 -0
  49. package/dist/types/src/components/Form/fields/index.d.ts.map +1 -0
  50. package/dist/types/src/components/Form/index.d.ts +2 -4
  51. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  52. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +23 -10
  53. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
  54. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +62 -59
  55. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -1
  56. package/dist/types/src/components/Settings/Settings.d.ts +39 -0
  57. package/dist/types/src/components/Settings/Settings.d.ts.map +1 -0
  58. package/dist/types/src/components/Settings/Settings.stories.d.ts +81 -0
  59. package/dist/types/src/components/Settings/Settings.stories.d.ts.map +1 -0
  60. package/dist/types/src/components/Settings/index.d.ts +2 -0
  61. package/dist/types/src/components/Settings/index.d.ts.map +1 -0
  62. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +9 -11
  63. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  64. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +66 -62
  65. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  66. package/dist/types/src/components/index.d.ts +1 -1
  67. package/dist/types/src/components/index.d.ts.map +1 -1
  68. package/dist/types/src/components/testing.d.ts +0 -2
  69. package/dist/types/src/components/testing.d.ts.map +1 -1
  70. package/dist/types/src/hooks/index.d.ts +2 -3
  71. package/dist/types/src/hooks/index.d.ts.map +1 -1
  72. package/dist/types/src/hooks/useFormHandler.d.ts +82 -0
  73. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -0
  74. package/dist/types/src/hooks/useKeyHandler.d.ts +7 -0
  75. package/dist/types/src/hooks/useKeyHandler.d.ts.map +1 -0
  76. package/dist/types/src/translations.d.ts +63 -60
  77. package/dist/types/src/translations.d.ts.map +1 -1
  78. package/dist/types/src/util/index.d.ts +1 -1
  79. package/dist/types/src/util/index.d.ts.map +1 -1
  80. package/dist/types/src/util/properties.d.ts +7 -0
  81. package/dist/types/src/util/properties.d.ts.map +1 -0
  82. package/dist/types/src/util/refs.d.ts +2 -2
  83. package/dist/types/src/util/refs.d.ts.map +1 -1
  84. package/dist/types/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +51 -48
  86. package/src/components/FieldEditor/FieldEditor.stories.tsx +43 -25
  87. package/src/components/FieldEditor/FieldEditor.test.tsx +0 -1
  88. package/src/components/FieldEditor/FieldEditor.tsx +73 -77
  89. package/src/components/Form/AUDIT.md +17 -0
  90. package/src/components/Form/Form.stories.tsx +147 -249
  91. package/src/components/Form/Form.tsx +324 -110
  92. package/src/components/Form/FormField.tsx +304 -0
  93. package/src/components/Form/FormFieldComponent.stories.tsx +65 -0
  94. package/src/components/Form/FormFieldComponent.tsx +171 -0
  95. package/src/components/Form/FormFieldSet.tsx +128 -0
  96. package/src/components/Form/README.md +3 -0
  97. package/src/components/Form/fields/ArrayField.tsx +154 -0
  98. package/src/components/Form/fields/BooleanField.tsx +22 -0
  99. package/src/components/Form/fields/GeoPointField.tsx +120 -0
  100. package/src/components/Form/fields/MarkdownField.tsx +78 -0
  101. package/src/components/Form/fields/NumberField.tsx +39 -0
  102. package/src/components/Form/fields/RefField.tsx +198 -0
  103. package/src/components/Form/fields/SelectField.tsx +65 -0
  104. package/src/components/Form/{custom/SelectOptionsInput.stories.tsx → fields/SelectOptionField.stories.tsx} +19 -17
  105. package/src/components/Form/{custom/SelectOptionsInput.tsx → fields/SelectOptionField.tsx} +29 -24
  106. package/src/components/Form/fields/TextAreaField.tsx +38 -0
  107. package/src/components/Form/fields/TextField.tsx +38 -0
  108. package/src/components/Form/{custom/TupleInput.tsx → fields/TupleField.tsx} +16 -9
  109. package/src/components/Form/fields/index.ts +15 -0
  110. package/src/components/Form/index.ts +3 -4
  111. package/src/components/ObjectPicker/ObjectPicker.stories.tsx +18 -16
  112. package/src/components/ObjectPicker/ObjectPicker.tsx +103 -78
  113. package/src/components/Settings/Settings.stories.tsx +55 -0
  114. package/src/components/Settings/Settings.tsx +129 -0
  115. package/src/components/{ControlSection → Settings}/index.ts +1 -1
  116. package/src/components/ViewEditor/ViewEditor.stories.tsx +44 -39
  117. package/src/components/ViewEditor/ViewEditor.test.tsx +5 -5
  118. package/src/components/ViewEditor/ViewEditor.tsx +295 -197
  119. package/src/components/index.ts +1 -1
  120. package/src/components/testing.tsx +23 -9
  121. package/src/hooks/index.ts +2 -3
  122. package/src/hooks/useFormHandler.ts +380 -0
  123. package/src/hooks/useKeyHandler.tsx +37 -0
  124. package/src/translations.ts +66 -65
  125. package/src/util/index.ts +1 -1
  126. package/src/util/properties.ts +18 -0
  127. package/src/util/refs.ts +13 -15
  128. package/dist/types/src/components/ControlSection/ControlSection.d.ts +0 -23
  129. package/dist/types/src/components/ControlSection/ControlSection.d.ts.map +0 -1
  130. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts +0 -84
  131. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts.map +0 -1
  132. package/dist/types/src/components/ControlSection/index.d.ts +0 -2
  133. package/dist/types/src/components/ControlSection/index.d.ts.map +0 -1
  134. package/dist/types/src/components/Form/ArrayField.d.ts +0 -16
  135. package/dist/types/src/components/Form/ArrayField.d.ts.map +0 -1
  136. package/dist/types/src/components/Form/Defaults.d.ts +0 -14
  137. package/dist/types/src/components/Form/Defaults.d.ts.map +0 -1
  138. package/dist/types/src/components/Form/FormActions.d.ts +0 -9
  139. package/dist/types/src/components/Form/FormActions.d.ts.map +0 -1
  140. package/dist/types/src/components/Form/FormContent.d.ts +0 -63
  141. package/dist/types/src/components/Form/FormContent.d.ts.map +0 -1
  142. package/dist/types/src/components/Form/FormContext.d.ts +0 -23
  143. package/dist/types/src/components/Form/FormContext.d.ts.map +0 -1
  144. package/dist/types/src/components/Form/Input.d.ts +0 -29
  145. package/dist/types/src/components/Form/Input.d.ts.map +0 -1
  146. package/dist/types/src/components/Form/RefField.d.ts +0 -22
  147. package/dist/types/src/components/Form/RefField.d.ts.map +0 -1
  148. package/dist/types/src/components/Form/custom/GeoPointInput.d.ts +0 -4
  149. package/dist/types/src/components/Form/custom/GeoPointInput.d.ts.map +0 -1
  150. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts +0 -4
  151. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts.map +0 -1
  152. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts +0 -79
  153. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts.map +0 -1
  154. package/dist/types/src/components/Form/custom/TupleInput.d.ts +0 -6
  155. package/dist/types/src/components/Form/custom/TupleInput.d.ts.map +0 -1
  156. package/dist/types/src/components/Form/custom/index.d.ts +0 -4
  157. package/dist/types/src/components/Form/custom/index.d.ts.map +0 -1
  158. package/dist/types/src/components/Form/factory.d.ts +0 -8
  159. package/dist/types/src/components/Form/factory.d.ts.map +0 -1
  160. package/dist/types/src/hooks/useForm.d.ts +0 -67
  161. package/dist/types/src/hooks/useForm.d.ts.map +0 -1
  162. package/dist/types/src/hooks/useQueryRefOptions.d.ts +0 -29
  163. package/dist/types/src/hooks/useQueryRefOptions.d.ts.map +0 -1
  164. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts +0 -8
  165. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts.map +0 -1
  166. package/dist/types/src/util/schema.d.ts +0 -3
  167. package/dist/types/src/util/schema.d.ts.map +0 -1
  168. package/src/components/ControlSection/ControlSection.stories.tsx +0 -38
  169. package/src/components/ControlSection/ControlSection.tsx +0 -153
  170. package/src/components/Form/ArrayField.tsx +0 -127
  171. package/src/components/Form/Defaults.tsx +0 -205
  172. package/src/components/Form/FormActions.tsx +0 -59
  173. package/src/components/Form/FormContent.tsx +0 -362
  174. package/src/components/Form/FormContext.tsx +0 -110
  175. package/src/components/Form/Input.tsx +0 -54
  176. package/src/components/Form/RefField.tsx +0 -283
  177. package/src/components/Form/custom/GeoPointInput.tsx +0 -80
  178. package/src/components/Form/custom/index.ts +0 -7
  179. package/src/components/Form/factory.tsx +0 -34
  180. package/src/hooks/useForm.ts +0 -296
  181. package/src/hooks/useQueryRefOptions.ts +0 -62
  182. package/src/hooks/useRefQueryLookupHandler.ts +0 -39
  183. package/src/util/schema.ts +0 -12
@@ -1,81 +1,85 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
+ import { type View } from '@dxos/echo';
3
4
  import { type EchoSchema } from '@dxos/echo/internal';
4
- import { type ProjectionModel, View } from '@dxos/schema';
5
+ import { type ProjectionModel } from '@dxos/schema';
5
6
  import { type ViewEditorProps } from './ViewEditor';
6
7
  export type ViewEditorDebugObjects = {
7
8
  schema: EchoSchema;
8
9
  view: View.View;
9
10
  projection: ProjectionModel;
10
11
  };
11
- type StoryProps = Pick<ViewEditorProps, 'readonly' | 'mode'>;
12
+ type DefaultStoryProps = Pick<ViewEditorProps, 'readonly' | 'mode'>;
12
13
  declare const meta: {
13
14
  title: string;
14
- render: (props: StoryProps) => React.JSX.Element;
15
+ render: (props: DefaultStoryProps) => React.JSX.Element;
15
16
  decorators: import("@storybook/react").Decorator[];
16
17
  parameters: {
17
18
  layout: string;
18
19
  translations: [{
19
20
  readonly 'en-US': {
20
- readonly "react-ui-form": {
21
- readonly 'fields label': "Fields";
22
- readonly 'hidden fields label': "Hidden Fields";
23
- readonly 'empty readonly ref field label': "(none)";
24
- readonly 'add property button label': "Add property";
25
- readonly 'field property label': "Property";
26
- readonly 'field property placeholder': "Property name";
27
- readonly 'field format label': "Type";
28
- readonly 'field path label': "Field path";
29
- readonly 'add field': "Add field";
30
- readonly 'delete field': "Delete field";
31
- readonly 'field limit reached': "Maximum number of fields reached";
32
- readonly 'boolean input true value': "Yes";
33
- readonly 'boolean input false value': "No";
34
- readonly 'show field label': "Show field";
35
- readonly 'hide field label': "Hide field";
36
- readonly 'delete field label': "Delete field";
37
- readonly 'ref field combobox input placeholder': "Search…";
38
- readonly 'ref field placeholder_one': "Select…";
39
- readonly 'ref field placeholder_other': "Select items…";
40
- readonly 'cancel button label': "Cancel";
41
- readonly 'save button label': "Save";
42
- readonly 'format boolean': "Boolean";
43
- readonly 'format currency': "Currency";
44
- readonly 'format date': "Date";
45
- readonly 'format date-time': "DateTime";
46
- readonly 'format did': "DID";
47
- readonly 'format duration': "Duration";
48
- readonly 'format dxn': "DXN";
49
- readonly 'format email': "Email";
50
- readonly 'format formula': "Formula";
51
- readonly 'format hostname': "Hostname";
52
- readonly 'format integer': "Integer";
53
- readonly 'format json': "JSON";
54
- readonly 'format lnglat': "Geopoint";
55
- readonly 'format markdown': "Markdown";
56
- readonly 'format percent': "Percent";
57
- readonly 'format ref': "Reference";
58
- readonly 'format regex': "RegExp";
59
- readonly 'format string': "String";
60
- readonly 'format single-select': "Select";
61
- readonly 'format multi-select': "Multi-select";
62
- readonly 'format text': "Long text";
63
- readonly 'format time': "Time";
64
- readonly 'format timestamp': "Timestamp";
65
- readonly 'format user': "User";
66
- readonly 'format number': "Number";
67
- readonly 'format uri': "URI";
68
- readonly 'format url': "URL";
69
- readonly 'format uuid': "UUID";
70
- readonly 'latitude label': "Latitude";
71
- readonly 'longitude label': "Longitude";
72
- readonly 'select option label': "Label";
73
- readonly 'select option label placeholder': "Option label";
74
- readonly 'select option color': "Color";
75
- readonly 'select option delete': "Delete";
76
- readonly 'select option add': "Add option";
77
- readonly 'system schema title': "System type";
78
- readonly 'system schema description': "This is a system type and cannot be modified, though the view can still be configured.";
21
+ readonly "@dxos/react-ui-form": {
22
+ readonly 'fields.label': "Fields";
23
+ readonly 'hidden-fields.label': "Hidden Fields";
24
+ readonly 'empty-readonly-ref-field.label': "(none)";
25
+ readonly 'add-property-button.label': "Add property";
26
+ readonly 'field-property.label': "Property";
27
+ readonly 'field-property.placeholder': "Property name";
28
+ readonly 'field-format.label': "Type";
29
+ readonly 'field-path.label': "Field path";
30
+ readonly 'add-field.button': "Add field";
31
+ readonly 'boolean-input-true.value': "Yes";
32
+ readonly 'boolean-input-false.value': "No";
33
+ readonly 'show-field.label': "Show field";
34
+ readonly 'hide-field.label': "Hide field";
35
+ readonly 'delete-field.label': "Delete field";
36
+ readonly 'ref-field-combobox-input.placeholder': "Search…";
37
+ readonly 'ref-field.placeholder': "Select…";
38
+ readonly 'ref-field.placeholder_one': "Select…";
39
+ readonly 'ref-field.placeholder_other': "Select items…";
40
+ readonly 'create-option.label': "Create";
41
+ readonly 'example.placeholder': "Example";
42
+ readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
43
+ readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
44
+ readonly 'cancel-button.label': "Cancel";
45
+ readonly 'save-button.label': "Save";
46
+ readonly 'format.boolean.label': "Boolean";
47
+ readonly 'format.currency.label': "Currency";
48
+ readonly 'format.date.label': "Date";
49
+ readonly 'format.date-time.label': "DateTime";
50
+ readonly 'format.did.label': "DID";
51
+ readonly 'format.duration.label': "Duration";
52
+ readonly 'format.dxn.label': "DXN";
53
+ readonly 'format.email.label': "Email";
54
+ readonly 'format.formula.label': "Formula";
55
+ readonly 'format.hostname.label': "Hostname";
56
+ readonly 'format.integer.label': "Integer";
57
+ readonly 'format.json.label': "JSON";
58
+ readonly 'format.lnglat.label': "Geopoint";
59
+ readonly 'format.markdown.label': "Markdown";
60
+ readonly 'format.percent.label': "Percent";
61
+ readonly 'format.ref.label': "Reference";
62
+ readonly 'format.regex.label': "RegExp";
63
+ readonly 'format.string.label': "String";
64
+ readonly 'format.single-select.label': "Select";
65
+ readonly 'format.multi-select.label': "Multi-select";
66
+ readonly 'format.text.label': "Long text";
67
+ readonly 'format.time.label': "Time";
68
+ readonly 'format.timestamp.label': "Timestamp";
69
+ readonly 'format.user.label': "User";
70
+ readonly 'format.number.label': "Number";
71
+ readonly 'format.uri.label': "URI";
72
+ readonly 'format.url.label': "URL";
73
+ readonly 'format.uuid.label': "UUID";
74
+ readonly 'latitude.label': "Latitude";
75
+ readonly 'longitude.label': "Longitude";
76
+ readonly 'select-option.label': "Label";
77
+ readonly 'select-option-label.placeholder': "Option label";
78
+ readonly 'select-option-delete.button': "Delete";
79
+ readonly 'select-option-add.button': "Add option";
80
+ readonly 'system-schema.title': "System type";
81
+ readonly 'system-schema.description': "System type: cannot add or remove fields.";
82
+ readonly 'remove.button': "Remove";
79
83
  };
80
84
  };
81
85
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAK9D,OAAO,EAAE,KAAK,eAAe,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAMhF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAWhE,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AA2H7D,QAAA,MAAM,IAAI;;oBAzHmB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4IF,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC"}
1
+ {"version":3,"file":"ViewEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,KAAK,UAAU,EAAwB,MAAM,qBAAqB,CAAC;AAK5E,OAAO,EAAE,KAAK,eAAe,EAAmC,MAAM,cAAc,CAAC;AAKrF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAWhE,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AA+HpE,QAAA,MAAM,IAAI;;oBA7HmB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiJT,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC"}
@@ -1,6 +1,6 @@
1
- export * from './ControlSection';
2
1
  export * from './FieldEditor';
3
2
  export * from './Form';
4
3
  export * from './ObjectPicker';
4
+ export * from './Settings';
5
5
  export * from './ViewEditor';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
@@ -4,8 +4,6 @@ type TestLayoutProps = ThemedClassName<PropsWithChildren<{
4
4
  json?: any;
5
5
  }>>;
6
6
  export declare const TestLayout: ({ classNames, children, json }: TestLayoutProps) => React.JSX.Element;
7
- type TestPanelProps = ThemedClassName<PropsWithChildren>;
8
- export declare const TestPanel: ({ classNames, children }: TestPanelProps) => React.JSX.Element;
9
7
  export declare const VIEW_EDITOR_DEBUG_SYMBOL: unique symbol;
10
8
  export declare const FIELD_EDITOR_DEBUG_SYMBOL: unique symbol;
11
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,KAAK,eAAe,GAAG,eAAe,CAAC,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,CAAC;AAE1E,eAAO,MAAM,UAAU,GAAI,gCAAgC,eAAe,sBAOzE,CAAC;AAEF,KAAK,cAAc,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAEzD,eAAO,MAAM,SAAS,GAAI,0BAA0B,cAAc,sBAEjE,CAAC;AAGF,eAAO,MAAM,wBAAwB,eAA4B,CAAC;AAClE,eAAO,MAAM,yBAAyB,eAA6B,CAAC"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI9D,KAAK,eAAe,GAAG,eAAe,CAAC,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,CAAC;AAE1E,eAAO,MAAM,UAAU,GAAI,gCAAgC,eAAe,sBAkBzE,CAAC;AAaF,eAAO,MAAM,wBAAwB,eAA4B,CAAC;AAClE,eAAO,MAAM,yBAAyB,eAA6B,CAAC"}
@@ -1,4 +1,3 @@
1
- export * from './useForm';
2
- export * from './useRefQueryLookupHandler';
3
- export * from './useQueryRefOptions';
1
+ export * from './useFormHandler';
2
+ export * from './useKeyHandler';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,82 @@
1
+ import type * as Schema from 'effect/Schema';
2
+ import type * as SchemaAST from 'effect/SchemaAST';
3
+ import { type AnyProperties } from '@dxos/echo/internal';
4
+ import { type JsonPath } from '@dxos/effect';
5
+ import { type ValidationError } from '@dxos/schema';
6
+ import { type MaybePromise } from '@dxos/util';
7
+ export type FormFieldStatus = {
8
+ status?: 'error';
9
+ error?: string;
10
+ };
11
+ /**
12
+ * Form properties.
13
+ */
14
+ export interface FormHandlerProps<T extends AnyProperties> {
15
+ /**
16
+ * Effect schema (Type literal).
17
+ */
18
+ schema?: Schema.Schema<T, any>;
19
+ /**
20
+ * Values for the form if controlled.
21
+ */
22
+ values?: Partial<T>;
23
+ /**
24
+ * Default values for the form which will be used if values is not provided.
25
+ */
26
+ defaultValues?: Partial<T>;
27
+ /**
28
+ * Auto-save the form when the values change.
29
+ */
30
+ autoSave?: boolean;
31
+ /**
32
+ * Callback for value changes. Note: This is called even when values are invalid.
33
+ * Sometimes the parent component may want to know about changes even if the form is
34
+ * in an invalid state.
35
+ */
36
+ onValuesChanged?: (values: Partial<T>, meta: FormUpdateMeta<T>) => void;
37
+ /**
38
+ * Custom validation function that runs only after schema validation passes.
39
+ * Use this for complex validation logic that can't be expressed in the schema.
40
+ * @returns Array of validation errors, or undefined if validation passes
41
+ */
42
+ onValidate?: (values: T) => ValidationError[] | undefined;
43
+ /**
44
+ * Called when the form is submitted and passes validation.
45
+ */
46
+ onSave?: (values: T, meta: FormUpdateMeta<T>) => MaybePromise<void>;
47
+ /**
48
+ * Called when the form is canceled.
49
+ */
50
+ onCancel?: () => void;
51
+ }
52
+ export type FormUpdateMeta<T extends AnyProperties> = {
53
+ changed: FormHandler<T>['changed'];
54
+ isValid: boolean;
55
+ };
56
+ /**
57
+ * Form handler properties and methods.
58
+ */
59
+ export type FormHandler<T extends AnyProperties> = Pick<FormHandlerProps<T>, 'schema' | 'autoSave'> & {
60
+ /** Initial values (which may not pass validation). */
61
+ values: Partial<T>;
62
+ /** Map of changed fields. */
63
+ changed: Record<JsonPath, boolean>;
64
+ touched: Record<JsonPath, boolean>;
65
+ /** Map of error strings. */
66
+ errors: Record<JsonPath, string>;
67
+ /** Whether the form can be saved (i.e., data is valid). */
68
+ isValid: boolean;
69
+ canSave: boolean;
70
+ onSave: () => void;
71
+ onCancel: () => void;
72
+ getStatus: (path: string | (string | number)[]) => FormFieldStatus;
73
+ getValue: <V>(path: (string | number)[]) => V | undefined;
74
+ onBlur: (path: (string | number)[]) => void;
75
+ onValueChange: <V>(path: (string | number)[], type: SchemaAST.AST, value: V) => void;
76
+ };
77
+ /**
78
+ * Creates a hook for managing form state, including values, validation, and submission.
79
+ * Deeply integrated with `@dxos/schema` for schema-based validation.
80
+ */
81
+ export declare const useFormHandler: <T extends AnyProperties>({ schema, autoSave, values: valuesProp, defaultValues: defaultValuesProp, onValuesChanged, onValidate, onSave, onCancel, ...props }: FormHandlerProps<T>) => FormHandler<T>;
82
+ //# sourceMappingURL=useFormHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useFormHandler.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,7 @@
1
+ import { type RefObject } from 'react';
2
+ import { type FormHandler } from './useFormHandler';
3
+ /**
4
+ * Key handler.
5
+ */
6
+ export declare const useKeyHandler: (elRef: RefObject<HTMLDivElement | null>, form: FormHandler<any>) => void;
7
+ //# sourceMappingURL=useKeyHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useKeyHandler.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,MAAM,WAAW,CAAC,GAAG,CAAC,SAuB5F,CAAC"}
@@ -1,65 +1,68 @@
1
- export declare const translationKey = "react-ui-form";
1
+ export declare const translationKey = "@dxos/react-ui-form";
2
2
  export declare const translations: [{
3
3
  readonly 'en-US': {
4
- readonly "react-ui-form": {
5
- readonly 'fields label': "Fields";
6
- readonly 'hidden fields label': "Hidden Fields";
7
- readonly 'empty readonly ref field label': "(none)";
8
- readonly 'add property button label': "Add property";
9
- readonly 'field property label': "Property";
10
- readonly 'field property placeholder': "Property name";
11
- readonly 'field format label': "Type";
12
- readonly 'field path label': "Field path";
13
- readonly 'add field': "Add field";
14
- readonly 'delete field': "Delete field";
15
- readonly 'field limit reached': "Maximum number of fields reached";
16
- readonly 'boolean input true value': "Yes";
17
- readonly 'boolean input false value': "No";
18
- readonly 'show field label': "Show field";
19
- readonly 'hide field label': "Hide field";
20
- readonly 'delete field label': "Delete field";
21
- readonly 'ref field combobox input placeholder': "Search…";
22
- readonly 'ref field placeholder_one': "Select…";
23
- readonly 'ref field placeholder_other': "Select items…";
24
- readonly 'cancel button label': "Cancel";
25
- readonly 'save button label': "Save";
26
- readonly 'format boolean': "Boolean";
27
- readonly 'format currency': "Currency";
28
- readonly 'format date': "Date";
29
- readonly 'format date-time': "DateTime";
30
- readonly 'format did': "DID";
31
- readonly 'format duration': "Duration";
32
- readonly 'format dxn': "DXN";
33
- readonly 'format email': "Email";
34
- readonly 'format formula': "Formula";
35
- readonly 'format hostname': "Hostname";
36
- readonly 'format integer': "Integer";
37
- readonly 'format json': "JSON";
38
- readonly 'format lnglat': "Geopoint";
39
- readonly 'format markdown': "Markdown";
40
- readonly 'format percent': "Percent";
41
- readonly 'format ref': "Reference";
42
- readonly 'format regex': "RegExp";
43
- readonly 'format string': "String";
44
- readonly 'format single-select': "Select";
45
- readonly 'format multi-select': "Multi-select";
46
- readonly 'format text': "Long text";
47
- readonly 'format time': "Time";
48
- readonly 'format timestamp': "Timestamp";
49
- readonly 'format user': "User";
50
- readonly 'format number': "Number";
51
- readonly 'format uri': "URI";
52
- readonly 'format url': "URL";
53
- readonly 'format uuid': "UUID";
54
- readonly 'latitude label': "Latitude";
55
- readonly 'longitude label': "Longitude";
56
- readonly 'select option label': "Label";
57
- readonly 'select option label placeholder': "Option label";
58
- readonly 'select option color': "Color";
59
- readonly 'select option delete': "Delete";
60
- readonly 'select option add': "Add option";
61
- readonly 'system schema title': "System type";
62
- readonly 'system schema description': "This is a system type and cannot be modified, though the view can still be configured.";
4
+ readonly "@dxos/react-ui-form": {
5
+ readonly 'fields.label': "Fields";
6
+ readonly 'hidden-fields.label': "Hidden Fields";
7
+ readonly 'empty-readonly-ref-field.label': "(none)";
8
+ readonly 'add-property-button.label': "Add property";
9
+ readonly 'field-property.label': "Property";
10
+ readonly 'field-property.placeholder': "Property name";
11
+ readonly 'field-format.label': "Type";
12
+ readonly 'field-path.label': "Field path";
13
+ readonly 'add-field.button': "Add field";
14
+ readonly 'boolean-input-true.value': "Yes";
15
+ readonly 'boolean-input-false.value': "No";
16
+ readonly 'show-field.label': "Show field";
17
+ readonly 'hide-field.label': "Hide field";
18
+ readonly 'delete-field.label': "Delete field";
19
+ readonly 'ref-field-combobox-input.placeholder': "Search…";
20
+ readonly 'ref-field.placeholder': "Select…";
21
+ readonly 'ref-field.placeholder_one': "Select…";
22
+ readonly 'ref-field.placeholder_other': "Select items…";
23
+ readonly 'create-option.label': "Create";
24
+ readonly 'example.placeholder': "Example";
25
+ readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
26
+ readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
27
+ readonly 'cancel-button.label': "Cancel";
28
+ readonly 'save-button.label': "Save";
29
+ readonly 'format.boolean.label': "Boolean";
30
+ readonly 'format.currency.label': "Currency";
31
+ readonly 'format.date.label': "Date";
32
+ readonly 'format.date-time.label': "DateTime";
33
+ readonly 'format.did.label': "DID";
34
+ readonly 'format.duration.label': "Duration";
35
+ readonly 'format.dxn.label': "DXN";
36
+ readonly 'format.email.label': "Email";
37
+ readonly 'format.formula.label': "Formula";
38
+ readonly 'format.hostname.label': "Hostname";
39
+ readonly 'format.integer.label': "Integer";
40
+ readonly 'format.json.label': "JSON";
41
+ readonly 'format.lnglat.label': "Geopoint";
42
+ readonly 'format.markdown.label': "Markdown";
43
+ readonly 'format.percent.label': "Percent";
44
+ readonly 'format.ref.label': "Reference";
45
+ readonly 'format.regex.label': "RegExp";
46
+ readonly 'format.string.label': "String";
47
+ readonly 'format.single-select.label': "Select";
48
+ readonly 'format.multi-select.label': "Multi-select";
49
+ readonly 'format.text.label': "Long text";
50
+ readonly 'format.time.label': "Time";
51
+ readonly 'format.timestamp.label': "Timestamp";
52
+ readonly 'format.user.label': "User";
53
+ readonly 'format.number.label': "Number";
54
+ readonly 'format.uri.label': "URI";
55
+ readonly 'format.url.label': "URL";
56
+ readonly 'format.uuid.label': "UUID";
57
+ readonly 'latitude.label': "Latitude";
58
+ readonly 'longitude.label': "Longitude";
59
+ readonly 'select-option.label': "Label";
60
+ readonly 'select-option-label.placeholder': "Option label";
61
+ readonly 'select-option-delete.button': "Delete";
62
+ readonly 'select-option-add.button': "Add option";
63
+ readonly 'system-schema.title': "System type";
64
+ readonly 'system-schema.description': "System type: cannot add or remove fields.";
65
+ readonly 'remove.button': "Remove";
63
66
  };
64
67
  };
65
68
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EM,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,wBAAwB,CAAC;AAEpD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EM,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from './field';
2
2
  export * from './formatting';
3
+ export * from './properties';
3
4
  export * from './refs';
4
- export * from './schema';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type * as SchemaAST from 'effect/SchemaAST';
2
+ import { type SchemaProperty } from '@dxos/effect';
3
+ /**
4
+ * Get the property types of an AST and filter out properties that are not form inputs.
5
+ */
6
+ export declare const getFormProperties: (ast: SchemaAST.AST) => SchemaProperty[];
7
+ //# sourceMappingURL=properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../../src/util/properties.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,KAAK,cAAc,EAAiB,MAAM,cAAc,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,SAAS,CAAC,GAAG,KAAG,cAAc,EAIpE,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import type * as SchemaAST from 'effect/SchemaAST';
2
- import { type SchemaProperty } from '@dxos/schema';
3
2
  type RefProps = {
4
3
  ast: SchemaAST.AST;
5
4
  isArray: boolean;
5
+ typename?: string;
6
6
  };
7
- export declare const getRefProps: (property: SchemaProperty<any>) => RefProps | undefined;
7
+ export declare const getRefProps: (ast: SchemaAST.AST) => RefProps | undefined;
8
8
  export {};
9
9
  //# sourceMappingURL=refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../../src/util/refs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAInD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,KAAK,QAAQ,GAAG;IACd,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,UAAU,cAAc,CAAC,GAAG,CAAC,KAAG,QAAQ,GAAG,SAoBtE,CAAC"}
1
+ {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../../src/util/refs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAMnD,KAAK,QAAQ,GAAG;IACd,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,CAAC,GAAG,KAAG,QAAQ,GAAG,SAmB3D,CAAC"}