@dxos/react-ui-form 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d

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 (91) hide show
  1. package/dist/lib/browser/index.mjs +534 -348
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +534 -348
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts +8 -7
  8. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts.map +1 -1
  9. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  10. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +8 -7
  11. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
  12. package/dist/types/src/components/Form/ArrayField.d.ts.map +1 -1
  13. package/dist/types/src/components/Form/Form.d.ts +6 -5
  14. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  15. package/dist/types/src/components/Form/Form.stories.d.ts +52 -37
  16. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  17. package/dist/types/src/components/Form/FormActions.d.ts.map +1 -1
  18. package/dist/types/src/components/Form/FormContent.d.ts +5 -5
  19. package/dist/types/src/components/Form/FormContent.d.ts.map +1 -1
  20. package/dist/types/src/components/Form/FormContext.d.ts +4 -4
  21. package/dist/types/src/components/Form/FormContext.d.ts.map +1 -1
  22. package/dist/types/src/components/Form/Input.d.ts +2 -2
  23. package/dist/types/src/components/Form/Input.d.ts.map +1 -1
  24. package/dist/types/src/components/Form/RefField.d.ts +10 -6
  25. package/dist/types/src/components/Form/RefField.d.ts.map +1 -1
  26. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts +8 -7
  27. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Form/factory.d.ts +2 -2
  29. package/dist/types/src/components/Form/factory.d.ts.map +1 -1
  30. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +41 -0
  31. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -0
  32. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +82 -0
  33. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -0
  34. package/dist/types/src/components/ObjectPicker/index.d.ts +2 -0
  35. package/dist/types/src/components/ObjectPicker/index.d.ts.map +1 -0
  36. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +20 -6
  37. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  38. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +13 -11
  39. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  40. package/dist/types/src/components/index.d.ts +1 -0
  41. package/dist/types/src/components/index.d.ts.map +1 -1
  42. package/dist/types/src/hooks/useForm.d.ts +5 -5
  43. package/dist/types/src/hooks/useForm.d.ts.map +1 -1
  44. package/dist/types/src/hooks/useQueryRefOptions.d.ts +9 -3
  45. package/dist/types/src/hooks/useQueryRefOptions.d.ts.map +1 -1
  46. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts.map +1 -1
  47. package/dist/types/src/translations.d.ts +7 -6
  48. package/dist/types/src/translations.d.ts.map +1 -1
  49. package/dist/types/src/util/field.d.ts +3 -3
  50. package/dist/types/src/util/field.d.ts.map +1 -1
  51. package/dist/types/src/util/formatting.d.ts +2 -2
  52. package/dist/types/src/util/formatting.d.ts.map +1 -1
  53. package/dist/types/src/util/refs.d.ts +1 -1
  54. package/dist/types/src/util/refs.d.ts.map +1 -1
  55. package/dist/types/src/util/schema.d.ts +1 -1
  56. package/dist/types/src/util/schema.d.ts.map +1 -1
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +40 -37
  59. package/src/components/ControlSection/ControlSection.stories.tsx +4 -5
  60. package/src/components/ControlSection/ControlSection.tsx +1 -1
  61. package/src/components/FieldEditor/FieldEditor.stories.tsx +8 -7
  62. package/src/components/FieldEditor/FieldEditor.tsx +7 -4
  63. package/src/components/Form/ArrayField.tsx +7 -4
  64. package/src/components/Form/Defaults.tsx +1 -1
  65. package/src/components/Form/Form.stories.tsx +52 -52
  66. package/src/components/Form/Form.tsx +19 -9
  67. package/src/components/Form/FormActions.tsx +7 -2
  68. package/src/components/Form/FormContent.tsx +83 -23
  69. package/src/components/Form/FormContext.tsx +6 -6
  70. package/src/components/Form/Input.tsx +2 -2
  71. package/src/components/Form/RefField.tsx +50 -66
  72. package/src/components/Form/custom/GeoPointInput.tsx +1 -1
  73. package/src/components/Form/custom/SelectOptionsInput.stories.tsx +5 -6
  74. package/src/components/Form/custom/SelectOptionsInput.tsx +2 -2
  75. package/src/components/Form/factory.tsx +7 -4
  76. package/src/components/ObjectPicker/ObjectPicker.stories.tsx +207 -0
  77. package/src/components/ObjectPicker/ObjectPicker.tsx +161 -0
  78. package/src/components/ObjectPicker/index.ts +5 -0
  79. package/src/components/ViewEditor/ViewEditor.stories.tsx +112 -49
  80. package/src/components/ViewEditor/ViewEditor.test.tsx +6 -5
  81. package/src/components/ViewEditor/ViewEditor.tsx +277 -208
  82. package/src/components/index.ts +1 -0
  83. package/src/components/testing.tsx +2 -2
  84. package/src/hooks/useForm.ts +11 -8
  85. package/src/hooks/useQueryRefOptions.ts +15 -6
  86. package/src/hooks/useRefQueryLookupHandler.ts +5 -5
  87. package/src/translations.ts +7 -6
  88. package/src/util/field.ts +25 -25
  89. package/src/util/formatting.ts +22 -22
  90. package/src/util/refs.ts +7 -7
  91. package/src/util/schema.ts +2 -4
@@ -5,7 +5,7 @@ export declare const translations: [{
5
5
  readonly 'fields label': "Fields";
6
6
  readonly 'hidden fields label': "Hidden Fields";
7
7
  readonly 'empty readonly ref field label': "(none)";
8
- readonly 'button add property': "Add property";
8
+ readonly 'add property button label': "Add property";
9
9
  readonly 'field property label': "Property";
10
10
  readonly 'field property placeholder': "Property name";
11
11
  readonly 'field format label': "Type";
@@ -18,10 +18,11 @@ export declare const translations: [{
18
18
  readonly 'show field label': "Show field";
19
19
  readonly 'hide field label': "Hide field";
20
20
  readonly 'delete field label': "Delete field";
21
+ readonly 'ref field combobox input placeholder': "Search…";
21
22
  readonly 'ref field placeholder_one': "Select…";
22
23
  readonly 'ref field placeholder_other': "Select items…";
23
- readonly 'button cancel': "Cancel";
24
- readonly 'button save': "Save";
24
+ readonly 'cancel button label': "Cancel";
25
+ readonly 'save button label': "Save";
25
26
  readonly 'format boolean': "Boolean";
26
27
  readonly 'format currency': "Currency";
27
28
  readonly 'format date': "Date";
@@ -34,7 +35,7 @@ export declare const translations: [{
34
35
  readonly 'format hostname': "Hostname";
35
36
  readonly 'format integer': "Integer";
36
37
  readonly 'format json': "JSON";
37
- readonly 'format latlng': "Geopoint";
38
+ readonly 'format lnglat': "Geopoint";
38
39
  readonly 'format markdown': "Markdown";
39
40
  readonly 'format percent': "Percent";
40
41
  readonly 'format ref': "Reference";
@@ -57,8 +58,8 @@ export declare const translations: [{
57
58
  readonly 'select option color': "Color";
58
59
  readonly 'select option delete': "Delete";
59
60
  readonly 'select option add': "Add option";
60
- readonly 'system schema title': "System record type";
61
- readonly 'system schema description': "This is a system record type and cannot be modified, though the view can still be configured.";
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.";
62
63
  };
63
64
  };
64
65
  }];
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6EM,CAAC"}
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,4 +1,4 @@
1
- import { FormatEnum, TypeEnum } from '@dxos/echo-schema';
1
+ import { Format, TypeEnum } from '@dxos/echo/internal';
2
2
  import { type ValidationError } from '@dxos/schema';
3
3
  /**
4
4
  * Parse value by field value type.
@@ -8,13 +8,13 @@ import { type ValidationError } from '@dxos/schema';
8
8
  */
9
9
  export type ParseProps = {
10
10
  type?: TypeEnum;
11
- format?: FormatEnum;
11
+ format?: Format.TypeFormat;
12
12
  value: any;
13
13
  };
14
14
  export declare const parseValue: ({ type, format, value }: ParseProps) => any;
15
15
  export type CellClassesForFieldTypeProps = {
16
16
  type?: TypeEnum;
17
- format?: FormatEnum;
17
+ format?: Format.TypeFormat;
18
18
  };
19
19
  export declare const cellClassesForFieldType: ({ type, format }: CellClassesForFieldTypeProps) => string[] | undefined;
20
20
  export declare const pathNotUniqueError: (path: string) => ValidationError;
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/util/field.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAe,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,yBAAyB,UAAU,QAsF7D,CAAC;AAGF,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAAkB,4BAA4B,KAAG,MAAM,EAAE,GAAG,SAyBnG,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,eAGhD,CAAC"}
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/util/field.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAe,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC3B,KAAK,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,yBAAyB,UAAU,QAsF7D,CAAC;AAGF,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAAkB,4BAA4B,KAAG,MAAM,EAAE,GAAG,SAyBnG,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,eAGhD,CAAC"}
@@ -1,7 +1,7 @@
1
- import { FormatEnum, TypeEnum } from '@dxos/echo-schema';
1
+ import { Format, TypeEnum } from '@dxos/echo/internal';
2
2
  type ValueFormatProps = {
3
3
  type: TypeEnum;
4
- format?: FormatEnum | undefined;
4
+ format?: Format.TypeFormat | undefined;
5
5
  value: any;
6
6
  locale?: string | undefined;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../src/util/formatting.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAe,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEtE,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AAGH,eAAO,MAAM,gBAAgB,GAAI,iCAA6C,gBAAgB,KAAG,MAqFhG,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,iCAA6C,gBAAgB,KAAG,MA8DhG,CAAC"}
1
+ {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../src/util/formatting.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAe,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpE,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;IACvC,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AAGH,eAAO,MAAM,gBAAgB,GAAI,iCAA6C,gBAAgB,KAAG,MAqFhG,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,iCAA6C,gBAAgB,KAAG,MA8DhG,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type SchemaAST } from 'effect';
1
+ import type * as SchemaAST from 'effect/SchemaAST';
2
2
  import { type SchemaProperty } from '@dxos/schema';
3
3
  type RefProps = {
4
4
  ast: SchemaAST.AST;
@@ -1 +1 @@
1
- {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../../src/util/refs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC,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;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,3 +1,3 @@
1
- import { SchemaAST } from 'effect';
1
+ import * as SchemaAST from 'effect/SchemaAST';
2
2
  export declare const findArrayElementType: (ast: SchemaAST.AST) => SchemaAST.AST | undefined;
3
3
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/util/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAInC,eAAO,MAAM,oBAAoB,GAAI,KAAK,SAAS,CAAC,GAAG,8BAKtD,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/util/schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAI9C,eAAO,MAAM,oBAAoB,GAAI,KAAK,SAAS,CAAC,GAAG,8BAGtD,CAAC"}