@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
@@ -1,4 +1,4 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  import React from 'react';
3
3
  import { type ThemedClassName } from '@dxos/react-ui';
4
4
  import { type ProjectionModel, type SchemaProperty } from '@dxos/schema';
@@ -14,8 +14,8 @@ export type FormFieldProps = {
14
14
  projection?: ProjectionModel;
15
15
  lookupComponent?: ComponentLookup;
16
16
  Custom?: Partial<Record<string, InputComponent>>;
17
- } & Pick<RefFieldProps, 'readonly' | 'onQueryRefOptions' | 'createOptionLabel' | 'createOptionIcon' | 'onCreateFromQuery'>;
18
- export declare const FormField: ({ property, path, readonly, inline, projection, onQueryRefOptions, createOptionLabel, createOptionIcon, onCreateFromQuery, lookupComponent, Custom, }: FormFieldProps) => React.JSX.Element | null;
17
+ } & Pick<RefFieldProps, 'readonly' | 'onQueryRefOptions' | 'createOptionLabel' | 'createOptionIcon' | 'onCreate' | 'createSchema' | 'createInitialValuePath'>;
18
+ export declare const FormField: ({ property, path, readonly, inline, projection, onQueryRefOptions, createOptionLabel, createOptionIcon, onCreate, createSchema, createInitialValuePath, lookupComponent, Custom, }: FormFieldProps) => React.JSX.Element | null;
19
19
  export type FormFieldsProps = ThemedClassName<{
20
20
  testId?: string;
21
21
  schema: Schema.Schema.All;
@@ -36,7 +36,7 @@ export type FormFieldsProps = ThemedClassName<{
36
36
  */
37
37
  Custom?: Partial<Record<string, InputComponent>>;
38
38
  onQueryRefOptions?: QueryRefOptions;
39
- } & Pick<FormFieldProps, 'readonly'> & Pick<RefFieldProps, 'onQueryRefOptions' | 'createOptionLabel' | 'createOptionIcon' | 'onCreateFromQuery'>>;
39
+ } & Pick<FormFieldProps, 'readonly'> & Pick<RefFieldProps, 'onQueryRefOptions' | 'createOptionLabel' | 'createOptionIcon' | 'onCreate' | 'createSchema' | 'createInitialValuePath'>>;
40
40
  export declare const FormFields: React.ForwardRefExoticComponent<Omit<{
41
41
  testId?: string;
42
42
  schema: Schema.Schema.All;
@@ -57,7 +57,7 @@ export declare const FormFields: React.ForwardRefExoticComponent<Omit<{
57
57
  */
58
58
  Custom?: Partial<Record<string, InputComponent>>;
59
59
  onQueryRefOptions?: QueryRefOptions;
60
- } & Pick<FormFieldProps, "readonly"> & Pick<RefFieldProps, "onQueryRefOptions" | "createOptionLabel" | "createOptionIcon" | "onCreateFromQuery">, "className"> & {
60
+ } & Pick<FormFieldProps, "readonly"> & Pick<RefFieldProps, "onQueryRefOptions" | "createOptionLabel" | "createOptionIcon" | "onCreate" | "createSchema" | "createInitialValuePath">, "className"> & {
61
61
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
62
62
  } & React.RefAttributes<HTMLDivElement>>;
63
63
  //# sourceMappingURL=FormContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAEjD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAuB,MAAM,cAAc,CAAC;AAG9F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAMnD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3B,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CAClD,GAAG,IAAI,CACN,aAAa,E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1B;;OAEG;IACH,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;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,eAAe,CAAC;CACrC,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAClC,IAAI,CACF,aAAa,EACX,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,UAAU,GACV,cAAc,GACd,wBAAwB,CAC3B,CACJ,CAAC;AAEF,eAAO,MAAM,UAAU;aA/BV,MAAM;YACP,MAAM,CAAC,MAAM,CAAC,GAAG;IACzB;;OAEG;WACI,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;aACjB,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK,cAAc,CAAC,GAAG,CAAC,EAAE;WACzD,MAAM,EAAE;IACf;;OAEG;iBACU,eAAe;sBACV,eAAe;IACjC;;;OAGG;aACM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;wBAC5B,eAAe;;;wCAwFtC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React, { type FocusEvent, type PropsWithChildren, type RefObject } from 'react';
2
- import { type BaseObject } from '@dxos/echo-schema';
2
+ import { type AnyProperties } from '@dxos/echo/internal';
3
3
  import { type SimpleType } from '@dxos/effect';
4
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>;
5
+ type FormContextValue<T extends AnyProperties> = FormHandler<T>;
6
+ export declare const useFormContext: <T extends AnyProperties>() => FormContextValue<T>;
7
7
  export declare const useFormValues: (path?: (string | number)[]) => any;
8
8
  export type FormInputStateProps = {
9
9
  getStatus: () => {
@@ -16,7 +16,7 @@ export type FormInputStateProps = {
16
16
  };
17
17
  export declare const useInputProps: (path?: (string | number)[]) => FormInputStateProps;
18
18
  export declare const FormProvider: ({ children, formRef, autoSave, ...formOptions }: PropsWithChildren<FormOptions<any> & {
19
- formRef?: RefObject<HTMLDivElement>;
19
+ formRef?: RefObject<HTMLDivElement | null>;
20
20
  autoSave?: boolean;
21
21
  }>) => React.JSX.Element;
22
22
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"FormContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EACZ,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAkB,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,GAAI,OAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAO,KAAG,GAI9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KA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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,GAAI,OAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAO,KAAG,mBAa9D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,iDAK1B,iBAAiB,CAClB,WAAW,CAAC,GAAG,CAAC,GAAG;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACF,sBA0CA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React, { type FC } from 'react';
2
- import { type FormatEnum } from '@dxos/echo-schema';
2
+ import { type Format } from '@dxos/echo/internal';
3
3
  import { type SimpleType } from '@dxos/effect';
4
4
  import { type FormInputStateProps } from './FormContext';
5
5
  /**
@@ -7,7 +7,7 @@ import { type FormInputStateProps } from './FormContext';
7
7
  */
8
8
  export type InputProps = {
9
9
  type: SimpleType;
10
- format?: FormatEnum;
10
+ format?: Format.TypeFormat;
11
11
  label: string;
12
12
  placeholder?: string;
13
13
  inputOnly?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO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AAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,gBAAgB,GAAG,QAAQ,GAAG,KAAK,CAAC;CAChD,GAAG,mBAAmB,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,4BAA4B,gBAAgB,sBAavE,CAAC"}
@@ -1,18 +1,22 @@
1
- import { type SchemaAST } from 'effect';
1
+ import '@dxos/lit-ui/dx-tag-picker.pcss';
2
+ import type * as Schema from 'effect/Schema';
3
+ import type * as SchemaAST from 'effect/SchemaAST';
2
4
  import React from 'react';
3
- import { type TypeAnnotation } from '@dxos/echo-schema';
4
- import { type MaybePromise } from '@dxos/util';
5
+ import { type EchoSchema } from '@dxos/echo/internal';
5
6
  import { type QueryRefOptions } from '../../hooks';
6
7
  import { type InputProps } from './Input';
7
8
  export type RefFieldProps = InputProps & {
8
9
  ast?: SchemaAST.AST;
9
10
  array?: boolean;
10
- onQueryRefOptions?: QueryRefOptions;
11
11
  createOptionLabel?: [string, {
12
12
  ns: string;
13
13
  }];
14
14
  createOptionIcon?: string;
15
- onCreateFromQuery?: (type: TypeAnnotation, query: string) => MaybePromise<void>;
15
+ onCreate?: (values: any) => void;
16
+ createSchema?: Schema.Schema.AnyNoContext;
17
+ createInitialValuePath?: string;
18
+ onQueryRefOptions?: QueryRefOptions;
19
+ schema?: EchoSchema;
16
20
  };
17
- export declare const RefField: ({ type, label, readonly, placeholder, inputOnly, array, ast, getValue, onBlur, onQueryRefOptions, createOptionLabel, createOptionIcon, onCreateFromQuery, onValueChange, ...restInputProps }: RefFieldProps) => React.JSX.Element | null;
21
+ export declare const RefField: ({ type, label, readonly, placeholder, inputOnly, array, ast, getValue, createOptionLabel, createOptionIcon, onBlur, onCreate, createSchema, createInitialValuePath, onQueryRefOptions, onValueChange, ...restInputProps }: RefFieldProps) => React.JSX.Element | null;
18
22
  //# sourceMappingURL=RefField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RefField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/RefField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAKL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,YAAY,CAAC;AAE9D,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,aAAa,CAAC;AAIvE,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IACvC,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CACjF,CAAC;AAOF,eAAO,MAAM,QAAQ,GAAI,8LAgBtB,aAAa,6BA8Lf,CAAC"}
1
+ {"version":3,"file":"RefField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/RefField.tsx"],"names":[],"mappings":"AAIA,OAAO,iCAAiC,CAAC;AAEzC,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EACL,KAAK,UAAU,EAMhB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,aAAa,CAAC;AAKvE,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IACvC,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAOF,eAAO,MAAM,QAAQ,GAAI,2NAkBtB,aAAa,6BAuKf,CAAC"}
@@ -1,4 +1,3 @@
1
- import '@dxos-theme';
2
1
  import { type StoryObj } from '@storybook/react-vite';
3
2
  import React from 'react';
4
3
  declare const meta: {
@@ -7,13 +6,14 @@ declare const meta: {
7
6
  render: () => React.JSX.Element;
8
7
  decorators: import("@storybook/react").Decorator[];
9
8
  parameters: {
9
+ layout: string;
10
10
  translations: [{
11
11
  readonly 'en-US': {
12
12
  readonly "react-ui-form": {
13
13
  readonly 'fields label': "Fields";
14
14
  readonly 'hidden fields label': "Hidden Fields";
15
15
  readonly 'empty readonly ref field label': "(none)";
16
- readonly 'button add property': "Add property";
16
+ readonly 'add property button label': "Add property";
17
17
  readonly 'field property label': "Property";
18
18
  readonly 'field property placeholder': "Property name";
19
19
  readonly 'field format label': "Type";
@@ -26,10 +26,11 @@ declare const meta: {
26
26
  readonly 'show field label': "Show field";
27
27
  readonly 'hide field label': "Hide field";
28
28
  readonly 'delete field label': "Delete field";
29
+ readonly 'ref field combobox input placeholder': "Search…";
29
30
  readonly 'ref field placeholder_one': "Select…";
30
31
  readonly 'ref field placeholder_other': "Select items…";
31
- readonly 'button cancel': "Cancel";
32
- readonly 'button save': "Save";
32
+ readonly 'cancel button label': "Cancel";
33
+ readonly 'save button label': "Save";
33
34
  readonly 'format boolean': "Boolean";
34
35
  readonly 'format currency': "Currency";
35
36
  readonly 'format date': "Date";
@@ -42,7 +43,7 @@ declare const meta: {
42
43
  readonly 'format hostname': "Hostname";
43
44
  readonly 'format integer': "Integer";
44
45
  readonly 'format json': "JSON";
45
- readonly 'format latlng': "Geopoint";
46
+ readonly 'format lnglat': "Geopoint";
46
47
  readonly 'format markdown': "Markdown";
47
48
  readonly 'format percent': "Percent";
48
49
  readonly 'format ref': "Reference";
@@ -65,8 +66,8 @@ declare const meta: {
65
66
  readonly 'select option color': "Color";
66
67
  readonly 'select option delete': "Delete";
67
68
  readonly 'select option add': "Add option";
68
- readonly 'system schema title': "System record type";
69
- readonly 'system schema description': "This is a system record type and cannot be modified, though the view can still be configured.";
69
+ readonly 'system schema title': "System type";
70
+ readonly 'system schema description': "This is a system type and cannot be modified, though the view can still be configured.";
70
71
  };
71
72
  };
72
73
  }];
@@ -1 +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,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAuCxC,QAAA,MAAM,IAAI;;eAEwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMA,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"SelectOptionsInput.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/SelectOptionsInput.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAuCxC,QAAA,MAAM,IAAI;;eAEwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOA,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1,8 +1,8 @@
1
- import { FormatEnum } from '@dxos/echo-schema';
1
+ import { Format } from '@dxos/echo/internal';
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: (type: SimpleType, format?: FormatEnum | string) => InputComponent | undefined;
7
+ export declare const getInputComponent: (type: SimpleType, format?: Format.TypeFormat | string) => 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,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,UAAU,EAAE,SAAS,UAAU,GAAG,MAAM,KAAG,cAAc,GAAG,SAgBnG,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/factory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,MAAM,UAAU,EAChB,SAAS,MAAM,CAAC,UAAU,GAAG,MAAM,KAClC,cAAc,GAAG,SAgBnB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type * as Schema from 'effect/Schema';
2
+ import React from 'react';
3
+ import { type ThemedClassName } from '@dxos/react-ui';
4
+ import { type QueryTag } from '../../hooks';
5
+ export type ObjectPickerContentProps = ThemedClassName<{
6
+ options: QueryTag[];
7
+ selectedIds?: string[];
8
+ createSchema?: Schema.Schema.AnyNoContext;
9
+ createOptionLabel?: [string, {
10
+ ns: string;
11
+ }];
12
+ createOptionIcon?: string;
13
+ createInitialValuePath?: string;
14
+ onSelect: (id: string) => void;
15
+ onCreate?: (values: any) => void;
16
+ }>;
17
+ export declare const ObjectPicker: {
18
+ Root: ({ modal, modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children, }: import("@dxos/react-ui-searchlist").ComboboxRootProps) => React.JSX.Element;
19
+ Trigger: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
+ VirtualTrigger: {
21
+ (props: import("@dxos/react-ui").PopoverVirtualTriggerProps & {
22
+ __scopePopover?: import("@radix-ui/react-context").Scope;
23
+ }): React.JSX.Element;
24
+ displayName: string;
25
+ };
26
+ Content: React.ForwardRefExoticComponent<Omit<{
27
+ options: QueryTag[];
28
+ selectedIds?: string[];
29
+ createSchema?: Schema.Schema.AnyNoContext;
30
+ createOptionLabel?: [string, {
31
+ ns: string;
32
+ }];
33
+ createOptionIcon?: string;
34
+ createInitialValuePath?: string;
35
+ onSelect: (id: string) => void;
36
+ onCreate?: (values: any) => void;
37
+ }, "className"> & {
38
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
39
+ } & React.RefAttributes<HTMLDivElement>>;
40
+ };
41
+ //# sourceMappingURL=ObjectPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/ObjectPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAA0F,MAAM,OAAO,CAAC;AAE/G,OAAO,EAAiB,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAGrF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI5C,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1C,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC,CAAC,CAAC;AAoIH,eAAO,MAAM,YAAY;;;;;0BA/F+E,CAAC;;;;;iBA7C9F,QAAQ,EAAE;sBACL,MAAM,EAAE;uBACP,MAAM,CAAC,MAAM,CAAC,YAAY;4BACrB,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;2BACzB,MAAM;iCACA,MAAM;kBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;mBACnB,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI;;;;CA0IjC,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ render: () => React.JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ controls: {
10
+ disable: boolean;
11
+ };
12
+ translations: [{
13
+ readonly 'en-US': {
14
+ readonly "react-ui-form": {
15
+ readonly 'fields label': "Fields";
16
+ readonly 'hidden fields label': "Hidden Fields";
17
+ readonly 'empty readonly ref field label': "(none)";
18
+ readonly 'add property button label': "Add property";
19
+ readonly 'field property label': "Property";
20
+ readonly 'field property placeholder': "Property name";
21
+ readonly 'field format label': "Type";
22
+ readonly 'field path label': "Field path";
23
+ readonly 'add field': "Add field";
24
+ readonly 'delete field': "Delete field";
25
+ readonly 'field limit reached': "Maximum number of fields reached";
26
+ readonly 'boolean input true value': "Yes";
27
+ readonly 'boolean input false value': "No";
28
+ readonly 'show field label': "Show field";
29
+ readonly 'hide field label': "Hide field";
30
+ readonly 'delete field label': "Delete field";
31
+ readonly 'ref field combobox input placeholder': "Search…";
32
+ readonly 'ref field placeholder_one': "Select…";
33
+ readonly 'ref field placeholder_other': "Select items…";
34
+ readonly 'cancel button label': "Cancel";
35
+ readonly 'save button label': "Save";
36
+ readonly 'format boolean': "Boolean";
37
+ readonly 'format currency': "Currency";
38
+ readonly 'format date': "Date";
39
+ readonly 'format date-time': "DateTime";
40
+ readonly 'format did': "DID";
41
+ readonly 'format duration': "Duration";
42
+ readonly 'format dxn': "DXN";
43
+ readonly 'format email': "Email";
44
+ readonly 'format formula': "Formula";
45
+ readonly 'format hostname': "Hostname";
46
+ readonly 'format integer': "Integer";
47
+ readonly 'format json': "JSON";
48
+ readonly 'format lnglat': "Geopoint";
49
+ readonly 'format markdown': "Markdown";
50
+ readonly 'format percent': "Percent";
51
+ readonly 'format ref': "Reference";
52
+ readonly 'format regex': "RegExp";
53
+ readonly 'format string': "String";
54
+ readonly 'format single-select': "Select";
55
+ readonly 'format multi-select': "Multi-select";
56
+ readonly 'format text': "Long text";
57
+ readonly 'format time': "Time";
58
+ readonly 'format timestamp': "Timestamp";
59
+ readonly 'format user': "User";
60
+ readonly 'format number': "Number";
61
+ readonly 'format uri': "URI";
62
+ readonly 'format url': "URL";
63
+ readonly 'format uuid': "UUID";
64
+ readonly 'latitude label': "Latitude";
65
+ readonly 'longitude label': "Longitude";
66
+ readonly 'select option label': "Label";
67
+ readonly 'select option label placeholder': "Option label";
68
+ readonly 'select option color': "Color";
69
+ readonly 'select option delete': "Delete";
70
+ readonly 'select option add': "Add option";
71
+ readonly 'system schema title': "System type";
72
+ readonly 'system schema description': "This is a system type and cannot be modified, though the view can still be configured.";
73
+ };
74
+ };
75
+ }];
76
+ };
77
+ };
78
+ export default meta;
79
+ type Story = StoryObj<typeof meta>;
80
+ export declare const Default: Story;
81
+ export declare const WithTest: Story;
82
+ //# sourceMappingURL=ObjectPicker.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectPicker.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/ObjectPicker.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAoD,MAAM,OAAO,CAAC;AA2FzE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB2B,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,KAqFtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ObjectPicker';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -1,20 +1,34 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  import React from 'react';
3
+ import { QueryAST } from '@dxos/echo';
3
4
  import { type SchemaRegistry } from '@dxos/echo-db';
4
5
  import { type ThemedClassName } from '@dxos/react-ui';
5
- import { type DataType } from '@dxos/schema';
6
+ import { type QueryFormProps } from '@dxos/react-ui-components';
7
+ import { ProjectionModel, type View } from '@dxos/schema';
6
8
  import { type FormProps } from '../Form';
7
9
  export type ViewEditorProps = ThemedClassName<{
8
10
  schema: Schema.Schema.AnyNoContext;
9
- view: DataType.View;
11
+ view: View.View;
12
+ mode?: 'schema' | 'tag';
10
13
  registry?: SchemaRegistry;
11
14
  readonly?: boolean;
12
15
  showHeading?: boolean;
13
- onTypenameChanged?: (typename: string) => void;
16
+ onQueryChanged?: (query: QueryAST.Query, target?: string) => void;
14
17
  onDelete?: (fieldId: string) => void;
15
- } & Pick<FormProps<any>, 'outerSpacing'>>;
18
+ } & Pick<FormProps<any>, 'outerSpacing'> & Pick<QueryFormProps, 'types' | 'tags'>>;
16
19
  /**
17
20
  * Schema-based object form.
18
21
  */
19
- export declare const ViewEditor: ({ classNames, schema, view, registry, readonly, showHeading, onTypenameChanged, onDelete, outerSpacing, }: ViewEditorProps) => React.JSX.Element;
22
+ export declare const ViewEditor: React.ForwardRefExoticComponent<Omit<{
23
+ schema: Schema.Schema.AnyNoContext;
24
+ view: View.View;
25
+ mode?: "schema" | "tag";
26
+ registry?: SchemaRegistry;
27
+ readonly?: boolean;
28
+ showHeading?: boolean;
29
+ onQueryChanged?: (query: QueryAST.Query, target?: string) => void;
30
+ onDelete?: (fieldId: string) => void;
31
+ } & Pick<FormProps<any>, "outerSpacing"> & Pick<QueryFormProps, "types" | "tags">, "className"> & {
32
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
33
+ } & React.RefAttributes<ProjectionModel>>;
20
34
  //# sourceMappingURL=ViewEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAuB,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAI3F,OAAO,EAAE,KAAK,QAAQ,EAAkE,MAAM,cAAc,CAAC;AAI7G,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAa/C,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,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EF;;GAEG;AACH,eAAO,MAAM,UAAU;YAfX,MAAM,CAAC,MAAM,CAAC,YAAY;UAC5B,IAAI,CAAC,IAAI;WACR,QAAQ,GAAG,KAAK;eACZ,cAAc;eACd,OAAO;kBACJ,OAAO;qBACJ,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI;eACtD,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;;;yCAqQvC,CAAC"}
@@ -1,27 +1,27 @@
1
- import '@dxos-theme';
2
1
  import { type StoryObj } from '@storybook/react-vite';
3
2
  import React from 'react';
4
- import { type EchoSchema } from '@dxos/echo-schema';
5
- import { DataType, ProjectionModel } from '@dxos/schema';
3
+ import { type EchoSchema } from '@dxos/echo/internal';
4
+ import { type ProjectionModel, View } from '@dxos/schema';
6
5
  import { type ViewEditorProps } from './ViewEditor';
7
6
  export type ViewEditorDebugObjects = {
8
7
  schema: EchoSchema;
9
- view: DataType.View;
8
+ view: View.View;
10
9
  projection: ProjectionModel;
11
10
  };
12
- type StoryProps = Pick<ViewEditorProps, 'readonly'>;
11
+ type StoryProps = Pick<ViewEditorProps, 'readonly' | 'mode'>;
13
12
  declare const meta: {
14
13
  title: string;
15
14
  render: (props: StoryProps) => React.JSX.Element;
16
15
  decorators: import("@storybook/react").Decorator[];
17
16
  parameters: {
17
+ layout: string;
18
18
  translations: [{
19
19
  readonly 'en-US': {
20
20
  readonly "react-ui-form": {
21
21
  readonly 'fields label': "Fields";
22
22
  readonly 'hidden fields label': "Hidden Fields";
23
23
  readonly 'empty readonly ref field label': "(none)";
24
- readonly 'button add property': "Add property";
24
+ readonly 'add property button label': "Add property";
25
25
  readonly 'field property label': "Property";
26
26
  readonly 'field property placeholder': "Property name";
27
27
  readonly 'field format label': "Type";
@@ -34,10 +34,11 @@ declare const meta: {
34
34
  readonly 'show field label': "Show field";
35
35
  readonly 'hide field label': "Hide field";
36
36
  readonly 'delete field label': "Delete field";
37
+ readonly 'ref field combobox input placeholder': "Search…";
37
38
  readonly 'ref field placeholder_one': "Select…";
38
39
  readonly 'ref field placeholder_other': "Select items…";
39
- readonly 'button cancel': "Cancel";
40
- readonly 'button save': "Save";
40
+ readonly 'cancel button label': "Cancel";
41
+ readonly 'save button label': "Save";
41
42
  readonly 'format boolean': "Boolean";
42
43
  readonly 'format currency': "Currency";
43
44
  readonly 'format date': "Date";
@@ -50,7 +51,7 @@ declare const meta: {
50
51
  readonly 'format hostname': "Hostname";
51
52
  readonly 'format integer': "Integer";
52
53
  readonly 'format json': "JSON";
53
- readonly 'format latlng': "Geopoint";
54
+ readonly 'format lnglat': "Geopoint";
54
55
  readonly 'format markdown': "Markdown";
55
56
  readonly 'format percent': "Percent";
56
57
  readonly 'format ref': "Reference";
@@ -73,8 +74,8 @@ declare const meta: {
73
74
  readonly 'select option color': "Color";
74
75
  readonly 'select option delete': "Delete";
75
76
  readonly 'select option add': "Add option";
76
- readonly 'system schema title': "System record type";
77
- readonly 'system schema description': "This is a system record type and cannot be modified, though the view can still be configured.";
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.";
78
79
  };
79
80
  };
80
81
  }];
@@ -84,4 +85,5 @@ export default meta;
84
85
  type Story = StoryObj<typeof meta>;
85
86
  export declare const Default: Story;
86
87
  export declare const Readonly: Story;
88
+ export declare const TagQueryMode: Story;
87
89
  //# sourceMappingURL=ViewEditor.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,KAAK,UAAU,EAAqC,MAAM,mBAAmB,CAAC;AAIvF,OAAO,EAAE,QAAQ,EAA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D,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,5 +1,6 @@
1
1
  export * from './ControlSection';
2
2
  export * from './FieldEditor';
3
3
  export * from './Form';
4
+ export * from './ObjectPicker';
4
5
  export * from './ViewEditor';
5
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,cAAc,CAAC"}
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,12 +1,12 @@
1
- import { type Schema } from 'effect';
2
- import { type BaseObject } from '@dxos/echo-schema';
1
+ import type * as Schema from 'effect/Schema';
2
+ import { type AnyProperties } from '@dxos/echo/internal';
3
3
  import { type JsonPath, type SimpleType } from '@dxos/effect';
4
4
  import { type ValidationError } from '@dxos/schema';
5
5
  import { type MaybePromise } from '@dxos/util';
6
6
  /**
7
7
  * Return type from `useForm` hook.
8
8
  */
9
- export type FormHandler<T extends BaseObject> = {
9
+ export type FormHandler<T extends AnyProperties> = {
10
10
  values: Partial<T>;
11
11
  errors: Record<JsonPath, string>;
12
12
  touched: Record<JsonPath, boolean>;
@@ -25,7 +25,7 @@ export type FormHandler<T extends BaseObject> = {
25
25
  /**
26
26
  * Hook options.
27
27
  */
28
- export interface FormOptions<T extends BaseObject> {
28
+ export interface FormOptions<T extends AnyProperties> {
29
29
  /**
30
30
  * Effect schema (Type literal).
31
31
  */
@@ -63,5 +63,5 @@ export interface FormOptions<T extends BaseObject> {
63
63
  * Creates a hook for managing form state, including values, validation, and submission.
64
64
  * Deeply integrated with `@dxos/schema` for schema-based validation.
65
65
  */
66
- export declare const useForm: <T extends BaseObject>({ schema, initialValues, onValuesChanged, onValidate, onValid, onSave, }: FormOptions<T>) => FormHandler<T>;
66
+ export declare const useForm: <T extends AnyProperties>({ schema, initialValues, onValuesChanged, onValidate, onValid, onSave, }: FormOptions<T>) => FormHandler<T>;
67
67
  //# sourceMappingURL=useForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useForm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAa,MAAM,QAAQ,CAAC;AAGhD,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAA4C,MAAM,cAAc,CAAC;AAGxG,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,UAAU,IAAI;IAK9C,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC,QAA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M,OAAO,GAAI,CAAC,SAAS,aAAa,EAAE,0EAO9C,WAAW,CAAC,CAAC,CAAC,KAAG,WAAW,CAAC,CAAC,CAsLhC,CAAC"}
@@ -1,12 +1,17 @@
1
- import { type TypeAnnotation } from '@dxos/echo-schema';
1
+ import { type TypeAnnotation } from '@dxos/echo/internal';
2
2
  import { type DXN } from '@dxos/keys';
3
- import { type TagPickerItemData } from '@dxos/react-ui-tag-picker';
3
+ import { type Palette } from '@dxos/react-ui-types';
4
4
  import { type MaybePromise } from '@dxos/util';
5
5
  export type RefOption = {
6
6
  dxn: DXN;
7
7
  label?: string;
8
8
  };
9
9
  export type QueryRefOptions = (type: TypeAnnotation) => MaybePromise<RefOption[]>;
10
+ export type QueryTag = {
11
+ id: string;
12
+ label: string;
13
+ hue?: Palette;
14
+ };
10
15
  type UseQueryRefOptionsProps = {
11
16
  refTypeInfo: TypeAnnotation | undefined;
12
17
  onQueryRefOptions?: QueryRefOptions;
@@ -16,7 +21,8 @@ type UseQueryRefOptionsProps = {
16
21
  * Used internally within forms to fetch and format reference options for reference fields.
17
22
  */
18
23
  export declare const useQueryRefOptions: ({ refTypeInfo, onQueryRefOptions }: UseQueryRefOptionsProps) => {
19
- options: TagPickerItemData[];
24
+ options: QueryTag[];
25
+ update: () => void;
20
26
  loading: boolean;
21
27
  };
22
28
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryRefOptions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useQueryRefOptions.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,KAA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efQueryLookupHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useRefQueryLookupHandler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,KAAK,sBAAsB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEhD,eAAO,MAAM,wBAAwB,GAAI,WAAW,sBAAsB,KAAG,eAwB5E,CAAC"}
1
+ {"version":3,"file":"useRefQueryLookupHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useRefQueryLookupHandler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,KAAK,sBAAsB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEhD,eAAO,MAAM,wBAAwB,GAAI,WAAW,sBAAsB,KAAG,eAuB5E,CAAC"}