@dxos/react-ui-form 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/lib/browser/index.mjs +620 -583
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +620 -583
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +3 -3
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
- package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +61 -61
- package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.d.ts +18 -15
- package/dist/types/src/components/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.stories.d.ts +67 -67
- package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormField.d.ts +7 -1
- package/dist/types/src/components/Form/FormField.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormFieldComponent.d.ts +0 -1
- package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts +2 -2
- package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormFieldSet.d.ts +9 -10
- package/dist/types/src/components/Form/FormFieldSet.d.ts.map +1 -1
- package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +1 -1
- package/dist/types/src/components/Form/fields/RefField.d.ts +7 -5
- package/dist/types/src/components/Form/fields/RefField.d.ts.map +1 -1
- package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +1 -1
- package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts +61 -61
- package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +10 -2
- package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
- package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +61 -61
- package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -1
- package/dist/types/src/components/Settings/Settings.d.ts +39 -0
- package/dist/types/src/components/Settings/Settings.d.ts.map +1 -0
- package/dist/types/src/components/Settings/Settings.stories.d.ts +81 -0
- package/dist/types/src/components/Settings/Settings.stories.d.ts.map +1 -0
- package/dist/types/src/components/Settings/index.d.ts +2 -0
- package/dist/types/src/components/Settings/index.d.ts.map +1 -0
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +5 -5
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +65 -64
- package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +61 -61
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +0 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/refs.d.ts +1 -0
- package/dist/types/src/util/refs.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -38
- package/src/components/FieldEditor/FieldEditor.stories.tsx +4 -6
- package/src/components/FieldEditor/FieldEditor.tsx +3 -4
- package/src/components/Form/AUDIT.md +17 -0
- package/src/components/Form/Form.stories.tsx +23 -24
- package/src/components/Form/Form.tsx +58 -65
- package/src/components/Form/FormField.tsx +27 -8
- package/src/components/Form/FormFieldComponent.stories.tsx +5 -5
- package/src/components/Form/FormFieldComponent.tsx +17 -20
- package/src/components/Form/FormFieldSet.tsx +108 -104
- package/src/components/Form/fields/ArrayField.tsx +11 -8
- package/src/components/Form/fields/GeoPointField.tsx +6 -6
- package/src/components/Form/fields/MarkdownField.tsx +1 -1
- package/src/components/Form/fields/RefField.tsx +35 -17
- package/src/components/Form/fields/SelectField.tsx +1 -1
- package/src/components/Form/fields/SelectOptionField.stories.tsx +2 -2
- package/src/components/Form/fields/SelectOptionField.tsx +9 -10
- package/src/components/Form/fields/TupleField.tsx +1 -1
- package/src/components/ObjectPicker/ObjectPicker.stories.tsx +10 -14
- package/src/components/ObjectPicker/ObjectPicker.tsx +71 -60
- package/src/components/Settings/Settings.stories.tsx +56 -0
- package/src/components/Settings/Settings.tsx +129 -0
- package/src/components/{ControlSection → Settings}/index.ts +1 -1
- package/src/components/ViewEditor/ViewEditor.stories.tsx +22 -20
- package/src/components/ViewEditor/ViewEditor.test.tsx +3 -6
- package/src/components/ViewEditor/ViewEditor.tsx +99 -70
- package/src/components/index.ts +1 -1
- package/src/components/testing.tsx +20 -8
- package/src/hooks/useFormHandler.ts +42 -24
- package/src/translations.ts +62 -63
- package/src/util/index.ts +0 -1
- package/src/util/refs.ts +7 -3
- package/dist/types/src/components/ControlSection/ControlSection.d.ts +0 -23
- package/dist/types/src/components/ControlSection/ControlSection.d.ts.map +0 -1
- package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts +0 -87
- package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts.map +0 -1
- package/dist/types/src/components/ControlSection/index.d.ts +0 -2
- package/dist/types/src/components/ControlSection/index.d.ts.map +0 -1
- package/dist/types/src/components/Form/Form-old.stories.d.ts +0 -131
- package/dist/types/src/components/Form/Form-old.stories.d.ts.map +0 -1
- package/dist/types/src/util/echo.d.ts +0 -6
- package/dist/types/src/util/echo.d.ts.map +0 -1
- package/src/components/ControlSection/ControlSection.stories.tsx +0 -38
- package/src/components/ControlSection/ControlSection.tsx +0 -153
- package/src/components/Form/Form-old.stories.tsx +0 -314
- package/src/util/echo.ts +0 -25
|
@@ -10,21 +10,21 @@ declare const Organization: Type.Obj<{
|
|
|
10
10
|
export interface Organization extends Schema.Schema.Type<typeof Organization> {
|
|
11
11
|
}
|
|
12
12
|
declare const Person: Type.Obj<{
|
|
13
|
+
readonly name: string;
|
|
13
14
|
readonly address?: {
|
|
14
15
|
readonly state: string;
|
|
15
16
|
readonly street: string;
|
|
16
17
|
readonly city: string;
|
|
17
18
|
readonly zip: number;
|
|
18
19
|
} | undefined;
|
|
19
|
-
readonly name: string;
|
|
20
20
|
readonly status?: "active" | "inactive" | undefined;
|
|
21
21
|
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
22
22
|
readonly tags?: readonly import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
23
|
-
readonly label: string;
|
|
24
23
|
readonly hue?: string | undefined;
|
|
24
|
+
readonly label: string;
|
|
25
25
|
}>[] | undefined;
|
|
26
|
-
readonly active?: boolean | undefined;
|
|
27
26
|
readonly ignore?: string | undefined;
|
|
27
|
+
readonly active?: boolean | undefined;
|
|
28
28
|
readonly employer?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
29
29
|
readonly name: string;
|
|
30
30
|
}> | undefined;
|
|
@@ -38,7 +38,7 @@ declare const Person: Type.Obj<{
|
|
|
38
38
|
}, Schema.Struct.Fields>;
|
|
39
39
|
export interface Person extends Schema.Schema.Type<typeof Person> {
|
|
40
40
|
}
|
|
41
|
-
type
|
|
41
|
+
type DefaultStoryProps<T extends AnyProperties> = {
|
|
42
42
|
debug?: boolean;
|
|
43
43
|
schema: Schema.Schema<T>;
|
|
44
44
|
} & FormRootProps<T>;
|
|
@@ -48,81 +48,81 @@ declare const meta: {
|
|
|
48
48
|
<T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
|
|
49
49
|
displayName: string;
|
|
50
50
|
};
|
|
51
|
-
render: <T extends AnyProperties = AnyProperties>({ debug, schema, values: valuesProp, ...props }:
|
|
51
|
+
render: <T extends AnyProperties = AnyProperties>({ debug, schema, values: valuesProp, ...props }: DefaultStoryProps<T>) => React.JSX.Element;
|
|
52
52
|
decorators: import("@storybook/react").Decorator[];
|
|
53
53
|
parameters: {
|
|
54
54
|
layout: string;
|
|
55
55
|
translations: [{
|
|
56
56
|
readonly 'en-US': {
|
|
57
57
|
readonly "@dxos/react-ui-form": {
|
|
58
|
-
readonly 'fields
|
|
59
|
-
readonly 'hidden
|
|
60
|
-
readonly 'empty
|
|
61
|
-
readonly 'add
|
|
62
|
-
readonly 'field
|
|
63
|
-
readonly 'field
|
|
64
|
-
readonly 'field
|
|
65
|
-
readonly 'field
|
|
66
|
-
readonly 'add
|
|
67
|
-
readonly '
|
|
68
|
-
readonly '
|
|
69
|
-
readonly '
|
|
70
|
-
readonly '
|
|
71
|
-
readonly '
|
|
72
|
-
readonly '
|
|
73
|
-
readonly '
|
|
74
|
-
readonly 'ref
|
|
75
|
-
readonly 'ref
|
|
76
|
-
readonly '
|
|
77
|
-
readonly 'example
|
|
78
|
-
readonly 'latitude
|
|
79
|
-
readonly 'longitude
|
|
80
|
-
readonly 'cancel
|
|
81
|
-
readonly 'save
|
|
82
|
-
readonly 'format
|
|
83
|
-
readonly 'format
|
|
84
|
-
readonly 'format
|
|
85
|
-
readonly 'format
|
|
86
|
-
readonly 'format
|
|
87
|
-
readonly 'format
|
|
88
|
-
readonly 'format
|
|
89
|
-
readonly 'format
|
|
90
|
-
readonly 'format
|
|
91
|
-
readonly 'format
|
|
92
|
-
readonly 'format
|
|
93
|
-
readonly 'format
|
|
94
|
-
readonly 'format
|
|
95
|
-
readonly 'format
|
|
96
|
-
readonly 'format
|
|
97
|
-
readonly 'format
|
|
98
|
-
readonly 'format
|
|
99
|
-
readonly 'format
|
|
100
|
-
readonly 'format
|
|
101
|
-
readonly 'format
|
|
102
|
-
readonly 'format
|
|
103
|
-
readonly 'format
|
|
104
|
-
readonly 'format
|
|
105
|
-
readonly 'format
|
|
106
|
-
readonly 'format
|
|
107
|
-
readonly 'format
|
|
108
|
-
readonly 'format
|
|
109
|
-
readonly 'format
|
|
110
|
-
readonly 'latitude
|
|
111
|
-
readonly 'longitude
|
|
112
|
-
readonly 'select
|
|
113
|
-
readonly 'select
|
|
114
|
-
readonly 'select
|
|
115
|
-
readonly 'select
|
|
116
|
-
readonly '
|
|
117
|
-
readonly 'system
|
|
118
|
-
readonly '
|
|
58
|
+
readonly 'fields.label': "Fields";
|
|
59
|
+
readonly 'hidden-fields.label': "Hidden Fields";
|
|
60
|
+
readonly 'empty-readonly-ref-field.label': "(none)";
|
|
61
|
+
readonly 'add-property-button.label': "Add property";
|
|
62
|
+
readonly 'field-property.label': "Property";
|
|
63
|
+
readonly 'field-property.placeholder': "Property name";
|
|
64
|
+
readonly 'field-format.label': "Type";
|
|
65
|
+
readonly 'field-path.label': "Field path";
|
|
66
|
+
readonly 'add-field.button': "Add field";
|
|
67
|
+
readonly 'boolean-input-true.value': "Yes";
|
|
68
|
+
readonly 'boolean-input-false.value': "No";
|
|
69
|
+
readonly 'show-field.label': "Show field";
|
|
70
|
+
readonly 'hide-field.label': "Hide field";
|
|
71
|
+
readonly 'delete-field.label': "Delete field";
|
|
72
|
+
readonly 'ref-field-combobox-input.placeholder': "Search…";
|
|
73
|
+
readonly 'ref-field.placeholder': "Select…";
|
|
74
|
+
readonly 'ref-field.placeholder_one': "Select…";
|
|
75
|
+
readonly 'ref-field.placeholder_other': "Select items…";
|
|
76
|
+
readonly 'create-option.label': "Create";
|
|
77
|
+
readonly 'example.placeholder': "Example";
|
|
78
|
+
readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
|
|
79
|
+
readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
|
|
80
|
+
readonly 'cancel-button.label': "Cancel";
|
|
81
|
+
readonly 'save-button.label': "Save";
|
|
82
|
+
readonly 'format.boolean.label': "Boolean";
|
|
83
|
+
readonly 'format.currency.label': "Currency";
|
|
84
|
+
readonly 'format.date.label': "Date";
|
|
85
|
+
readonly 'format.date-time.label': "DateTime";
|
|
86
|
+
readonly 'format.did.label': "DID";
|
|
87
|
+
readonly 'format.duration.label': "Duration";
|
|
88
|
+
readonly 'format.dxn.label': "DXN";
|
|
89
|
+
readonly 'format.email.label': "Email";
|
|
90
|
+
readonly 'format.formula.label': "Formula";
|
|
91
|
+
readonly 'format.hostname.label': "Hostname";
|
|
92
|
+
readonly 'format.integer.label': "Integer";
|
|
93
|
+
readonly 'format.json.label': "JSON";
|
|
94
|
+
readonly 'format.lnglat.label': "Geopoint";
|
|
95
|
+
readonly 'format.markdown.label': "Markdown";
|
|
96
|
+
readonly 'format.percent.label': "Percent";
|
|
97
|
+
readonly 'format.ref.label': "Reference";
|
|
98
|
+
readonly 'format.regex.label': "RegExp";
|
|
99
|
+
readonly 'format.string.label': "String";
|
|
100
|
+
readonly 'format.single-select.label': "Select";
|
|
101
|
+
readonly 'format.multi-select.label': "Multi-select";
|
|
102
|
+
readonly 'format.text.label': "Long text";
|
|
103
|
+
readonly 'format.time.label': "Time";
|
|
104
|
+
readonly 'format.timestamp.label': "Timestamp";
|
|
105
|
+
readonly 'format.user.label': "User";
|
|
106
|
+
readonly 'format.number.label': "Number";
|
|
107
|
+
readonly 'format.uri.label': "URI";
|
|
108
|
+
readonly 'format.url.label': "URL";
|
|
109
|
+
readonly 'format.uuid.label': "UUID";
|
|
110
|
+
readonly 'latitude.label': "Latitude";
|
|
111
|
+
readonly 'longitude.label': "Longitude";
|
|
112
|
+
readonly 'select-option.label': "Label";
|
|
113
|
+
readonly 'select-option-label.placeholder': "Option label";
|
|
114
|
+
readonly 'select-option-delete.button': "Delete";
|
|
115
|
+
readonly 'select-option-add.button': "Add option";
|
|
116
|
+
readonly 'system-schema.title': "System type";
|
|
117
|
+
readonly 'system-schema.description': "System type: cannot add or remove fields.";
|
|
118
|
+
readonly 'remove.button': "Remove";
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
}];
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
export default meta;
|
|
125
|
-
type Story<T extends AnyProperties> = StoryObj<
|
|
125
|
+
type Story<T extends AnyProperties> = StoryObj<DefaultStoryProps<T>>;
|
|
126
126
|
export declare const Default: Story<ExcludeId<typeof Person>>;
|
|
127
127
|
export declare const Readonly: Story<ExcludeId<typeof Person>>;
|
|
128
128
|
export declare const Static: Story<ExcludeId<typeof Person>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,
|
|
1
|
+
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAqC,IAAI,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUzD,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,aAAa,EAAU,MAAM,QAAQ,CAAC;AAE1E,QAAA,MAAM,YAAY;;wBAOjB,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC;CAAG;AAEhF,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsCX,CAAC;AAEF,MAAM,WAAW,MAAO,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC;CAAG;AAEpE,KAAK,iBAAiB,CAAC,CAAC,SAAS,aAAa,IAAI;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC1B,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAkDrB,QAAA,MAAM,IAAI;;;;;;aAhDY,CAAC,SAAS,aAAa,mEAK1C,iBAAiB,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEiB,CAAC;AAEzC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,CAAC,CAAC,SAAS,aAAa,IAAI,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAQrE,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,MAAM,CAAC,CAMnD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,MAAM,CAAC,CAMpD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,MAAM,CAAC,CAMlD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,MAAM,CAAC,CAajD,CAAC"}
|
|
@@ -29,7 +29,13 @@ export type FormFieldProps = {
|
|
|
29
29
|
* Function to lookup custom renderers for specific properties.
|
|
30
30
|
*/
|
|
31
31
|
fieldProvider?: FormFieldProvider;
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Typename of the ref type that the create props apply to.
|
|
34
|
+
* When set, createOptionLabel/createOptionIcon/createInitialValuePath/createFieldMap/onCreate
|
|
35
|
+
* are only passed to ref fields whose typename matches.
|
|
36
|
+
*/
|
|
37
|
+
createTypename?: string;
|
|
38
|
+
} & Pick<FormFieldComponentProps, 'autoFocus' | 'readonly' | 'layout'> & Pick<RefFieldProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap' | 'db' | 'schemaHook' | 'getOptions' | 'onCreate'>;
|
|
33
39
|
export declare const FormField: {
|
|
34
40
|
(props: FormFieldProps): React.JSX.Element | null;
|
|
35
41
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormField.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAcvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,EAOL,KAAK,aAAa,EAInB,MAAM,UAAU,CAAC;AAElB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormField.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAcvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,EAOL,KAAK,aAAa,EAInB,MAAM,UAAU,CAAC;AAElB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC,GACpE,IAAI,CACF,aAAa,EACX,mBAAmB,GACnB,kBAAkB,GAClB,wBAAwB,GACxB,gBAAgB,GAChB,IAAI,GACJ,YAAY,GACZ,YAAY,GACZ,UAAU,CACb,CAAC;AAEJ,eAAO,MAAM,SAAS;YAAW,cAAc;;CAgK9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldComponent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,EACZ,SAAS,EACT,KAAK,EAAE,EACP,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,M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AE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,qBAAa,sBAAuB,SAAQ,SAAS,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;IACrG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE;IAItD,KAAK;;MAAwB;IAE7B,kBAAkB,CAAC,SAAS,EAAE,2BAA2B;IAMzD,MAAM;IAaf,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type FormFieldComponentProps } from './FormFieldComponent';
|
|
4
|
-
declare const
|
|
5
|
-
declare const meta: Meta<typeof
|
|
4
|
+
declare const DefaultStory: ({ type, placeholder, readonly, onBlur, onValueChange, ...props }: FormFieldComponentProps<string>) => React.JSX.Element;
|
|
5
|
+
declare const meta: Meta<typeof DefaultStory>;
|
|
6
6
|
export default meta;
|
|
7
7
|
type Story = StoryObj<typeof meta>;
|
|
8
8
|
export declare const Default: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldComponent.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldComponent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAwC,MAAM,OAAO,CAAC;AAK7D,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,sBAAsB,CAAC;AAEtF,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"FormFieldComponent.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldComponent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAwC,MAAM,OAAO,CAAC;AAK7D,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,sBAAsB,CAAC;AAEtF,QAAA,MAAM,YAAY,GAAI,kEAOnB,uBAAuB,CAAC,MAAM,CAAC,sBAsBjC,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAOnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AnyProperties } from '@dxos/echo/internal';
|
|
3
3
|
import { type SchemaProperty } from '@dxos/effect';
|
|
4
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
5
4
|
import { type FormHandlerProps } from '../../hooks';
|
|
6
5
|
import { type FormFieldProps } from './FormField';
|
|
7
|
-
export type FormFieldSetProps<T extends AnyProperties> =
|
|
6
|
+
export type FormFieldSetProps<T extends AnyProperties> = {
|
|
8
7
|
label?: string;
|
|
9
|
-
exclude?: (props: SchemaProperty[]) => SchemaProperty[];
|
|
10
8
|
sort?: string[];
|
|
11
|
-
} & Pick<FormHandlerProps<T>, 'schema'> & Pick<FormFieldProps, 'path' | 'autoFocus' | 'readonly' | 'layout' | 'projection' | 'fieldMap' | 'fieldProvider' | 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'db' | 'schemaHook' | 'getOptions' | 'onCreate'>>;
|
|
12
|
-
export declare const FormFieldSet: React.ForwardRefExoticComponent<Omit<{
|
|
13
|
-
label?: string;
|
|
14
9
|
exclude?: (props: SchemaProperty[]) => SchemaProperty[];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
} & Pick<FormHandlerProps<T>, 'schema'> & Pick<FormFieldProps, 'path' | 'autoFocus' | 'readonly' | 'layout' | 'projection' | 'fieldMap' | 'fieldProvider' | 'createTypename' | 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap' | 'db' | 'schemaHook' | 'getOptions' | 'onCreate'>;
|
|
11
|
+
/**
|
|
12
|
+
* Renders a set of form fields derived from a schema object.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FormFieldSet: {
|
|
15
|
+
({ label, schema, readonly, path, sort, exclude, projection, layout, ...props }: FormFieldSetProps<any>): React.JSX.Element | null;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
19
18
|
//# sourceMappingURL=FormFieldSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldSet.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"FormFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldSet.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7D,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,aAAa,IAAI;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,CAAC;CACzD,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GACrC,IAAI,CACF,cAAc,EACZ,MAAM,GACN,WAAW,GACX,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,wBAAwB,GACxB,gBAAgB,GAChB,IAAI,GACJ,YAAY,GACZ,YAAY,GACZ,UAAU,CACb,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY;qFAUtB,iBAAiB,CAAC,GAAG,CAAC;;CAsExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/ArrayField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/ArrayField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,mBAAmB,CAAC;CACjC,GAAG,cAAc,CAAC;AAEnB,eAAO,MAAM,UAAU;gFAQpB,eAAe;;CA4FjB,CAAC;AAIF;;;GAGG;AAEH,eAAO,MAAM,eAAe,GAAI,MAAM,SAAS,CAAC,GAAG,KAAG,GAsBrD,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import '@dxos/lit-ui/dx-tag-picker.pcss';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type Database, Entity,
|
|
3
|
+
import { type Database, Entity, Type } from '@dxos/echo';
|
|
4
4
|
import { type ObjectPickerContentProps, type RefOption } from '../../ObjectPicker';
|
|
5
5
|
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
6
|
-
export type RefFieldProps = FormFieldComponentProps & Pick<ObjectPickerContentProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath'> & {
|
|
6
|
+
export type RefFieldProps = FormFieldComponentProps & Pick<ObjectPickerContentProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap'> & {
|
|
7
7
|
db?: Database.Database;
|
|
8
8
|
resultsHook?: (db?: Database.Database, typename?: string) => Entity.Any[];
|
|
9
|
-
schemaHook?: (db?: Database.Database, typename?: string) => Type.
|
|
10
|
-
getOptions?: (objects: Entity.Any[]
|
|
11
|
-
|
|
9
|
+
schemaHook?: (db?: Database.Database, typename?: string) => Type.AnyEntity;
|
|
10
|
+
getOptions?: (objects: Entity.Any[], options?: {
|
|
11
|
+
parentLabel?: boolean;
|
|
12
|
+
}) => RefOption[];
|
|
13
|
+
onCreate?: (schema: Type.AnyEntity, values: any) => void;
|
|
12
14
|
};
|
|
13
15
|
export declare const RefField: (props: RefFieldProps) => React.JSX.Element | null;
|
|
14
16
|
//# sourceMappingURL=RefField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/RefField.tsx"],"names":[],"mappings":"AAIA,OAAO,iCAAiC,CAAC;AAEzC,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RefField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/RefField.tsx"],"names":[],"mappings":"AAIA,OAAO,iCAAiC,CAAC;AAEzC,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAoB,IAAI,EAAE,MAAM,YAAY,CAAC;AAW3E,OAAO,EAAgB,KAAK,wBAAwB,EAAE,KAAK,SAAS,E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AAS,CAAC,
|
|
1
|
+
{"version":3,"file":"SelectOptionField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/SelectOptionField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyF,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQxD,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AAErF,eAAO,MAAM,iBAAiB,GAAI,gEAO/B,uBAAuB,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,sBA4KrD,CAAC"}
|
|
@@ -10,67 +10,67 @@ declare const meta: {
|
|
|
10
10
|
translations: [{
|
|
11
11
|
readonly 'en-US': {
|
|
12
12
|
readonly "@dxos/react-ui-form": {
|
|
13
|
-
readonly 'fields
|
|
14
|
-
readonly 'hidden
|
|
15
|
-
readonly 'empty
|
|
16
|
-
readonly 'add
|
|
17
|
-
readonly 'field
|
|
18
|
-
readonly 'field
|
|
19
|
-
readonly 'field
|
|
20
|
-
readonly 'field
|
|
21
|
-
readonly 'add
|
|
22
|
-
readonly '
|
|
23
|
-
readonly '
|
|
24
|
-
readonly '
|
|
25
|
-
readonly '
|
|
26
|
-
readonly '
|
|
27
|
-
readonly '
|
|
28
|
-
readonly '
|
|
29
|
-
readonly 'ref
|
|
30
|
-
readonly 'ref
|
|
31
|
-
readonly '
|
|
32
|
-
readonly 'example
|
|
33
|
-
readonly 'latitude
|
|
34
|
-
readonly 'longitude
|
|
35
|
-
readonly 'cancel
|
|
36
|
-
readonly 'save
|
|
37
|
-
readonly 'format
|
|
38
|
-
readonly 'format
|
|
39
|
-
readonly 'format
|
|
40
|
-
readonly 'format
|
|
41
|
-
readonly 'format
|
|
42
|
-
readonly 'format
|
|
43
|
-
readonly 'format
|
|
44
|
-
readonly 'format
|
|
45
|
-
readonly 'format
|
|
46
|
-
readonly 'format
|
|
47
|
-
readonly 'format
|
|
48
|
-
readonly 'format
|
|
49
|
-
readonly 'format
|
|
50
|
-
readonly 'format
|
|
51
|
-
readonly 'format
|
|
52
|
-
readonly 'format
|
|
53
|
-
readonly 'format
|
|
54
|
-
readonly 'format
|
|
55
|
-
readonly 'format
|
|
56
|
-
readonly 'format
|
|
57
|
-
readonly 'format
|
|
58
|
-
readonly 'format
|
|
59
|
-
readonly 'format
|
|
60
|
-
readonly 'format
|
|
61
|
-
readonly 'format
|
|
62
|
-
readonly 'format
|
|
63
|
-
readonly 'format
|
|
64
|
-
readonly 'format
|
|
65
|
-
readonly 'latitude
|
|
66
|
-
readonly 'longitude
|
|
67
|
-
readonly 'select
|
|
68
|
-
readonly 'select
|
|
69
|
-
readonly 'select
|
|
70
|
-
readonly 'select
|
|
71
|
-
readonly '
|
|
72
|
-
readonly 'system
|
|
73
|
-
readonly '
|
|
13
|
+
readonly 'fields.label': "Fields";
|
|
14
|
+
readonly 'hidden-fields.label': "Hidden Fields";
|
|
15
|
+
readonly 'empty-readonly-ref-field.label': "(none)";
|
|
16
|
+
readonly 'add-property-button.label': "Add property";
|
|
17
|
+
readonly 'field-property.label': "Property";
|
|
18
|
+
readonly 'field-property.placeholder': "Property name";
|
|
19
|
+
readonly 'field-format.label': "Type";
|
|
20
|
+
readonly 'field-path.label': "Field path";
|
|
21
|
+
readonly 'add-field.button': "Add field";
|
|
22
|
+
readonly 'boolean-input-true.value': "Yes";
|
|
23
|
+
readonly 'boolean-input-false.value': "No";
|
|
24
|
+
readonly 'show-field.label': "Show field";
|
|
25
|
+
readonly 'hide-field.label': "Hide field";
|
|
26
|
+
readonly 'delete-field.label': "Delete field";
|
|
27
|
+
readonly 'ref-field-combobox-input.placeholder': "Search…";
|
|
28
|
+
readonly 'ref-field.placeholder': "Select…";
|
|
29
|
+
readonly 'ref-field.placeholder_one': "Select…";
|
|
30
|
+
readonly 'ref-field.placeholder_other': "Select items…";
|
|
31
|
+
readonly 'create-option.label': "Create";
|
|
32
|
+
readonly 'example.placeholder': "Example";
|
|
33
|
+
readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
|
|
34
|
+
readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
|
|
35
|
+
readonly 'cancel-button.label': "Cancel";
|
|
36
|
+
readonly 'save-button.label': "Save";
|
|
37
|
+
readonly 'format.boolean.label': "Boolean";
|
|
38
|
+
readonly 'format.currency.label': "Currency";
|
|
39
|
+
readonly 'format.date.label': "Date";
|
|
40
|
+
readonly 'format.date-time.label': "DateTime";
|
|
41
|
+
readonly 'format.did.label': "DID";
|
|
42
|
+
readonly 'format.duration.label': "Duration";
|
|
43
|
+
readonly 'format.dxn.label': "DXN";
|
|
44
|
+
readonly 'format.email.label': "Email";
|
|
45
|
+
readonly 'format.formula.label': "Formula";
|
|
46
|
+
readonly 'format.hostname.label': "Hostname";
|
|
47
|
+
readonly 'format.integer.label': "Integer";
|
|
48
|
+
readonly 'format.json.label': "JSON";
|
|
49
|
+
readonly 'format.lnglat.label': "Geopoint";
|
|
50
|
+
readonly 'format.markdown.label': "Markdown";
|
|
51
|
+
readonly 'format.percent.label': "Percent";
|
|
52
|
+
readonly 'format.ref.label': "Reference";
|
|
53
|
+
readonly 'format.regex.label': "RegExp";
|
|
54
|
+
readonly 'format.string.label': "String";
|
|
55
|
+
readonly 'format.single-select.label': "Select";
|
|
56
|
+
readonly 'format.multi-select.label': "Multi-select";
|
|
57
|
+
readonly 'format.text.label': "Long text";
|
|
58
|
+
readonly 'format.time.label': "Time";
|
|
59
|
+
readonly 'format.timestamp.label': "Timestamp";
|
|
60
|
+
readonly 'format.user.label': "User";
|
|
61
|
+
readonly 'format.number.label': "Number";
|
|
62
|
+
readonly 'format.uri.label': "URI";
|
|
63
|
+
readonly 'format.url.label': "URL";
|
|
64
|
+
readonly 'format.uuid.label': "UUID";
|
|
65
|
+
readonly 'latitude.label': "Latitude";
|
|
66
|
+
readonly 'longitude.label': "Longitude";
|
|
67
|
+
readonly 'select-option.label': "Label";
|
|
68
|
+
readonly 'select-option-label.placeholder': "Option label";
|
|
69
|
+
readonly 'select-option-delete.button': "Delete";
|
|
70
|
+
readonly 'select-option-add.button': "Add option";
|
|
71
|
+
readonly 'system-schema.title': "System type";
|
|
72
|
+
readonly 'system-schema.description': "System type: cannot add or remove fields.";
|
|
73
|
+
readonly 'remove.button': "Remove";
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
}];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as Schema from 'effect/Schema';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type Palette, type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
+
import { type FormFieldMap } from '../Form/FormFieldComponent';
|
|
4
5
|
export type RefOption = {
|
|
5
6
|
id: string;
|
|
6
7
|
label: string;
|
|
@@ -15,12 +16,18 @@ export type ObjectPickerContentProps = ThemedClassName<{
|
|
|
15
16
|
createOptionIcon?: string;
|
|
16
17
|
createSchema?: Schema.Schema.AnyNoContext;
|
|
17
18
|
createInitialValuePath?: string;
|
|
19
|
+
createFieldMap?: FormFieldMap;
|
|
18
20
|
onCreate?: (values: any) => void;
|
|
19
21
|
onSelect: (id: string) => void;
|
|
20
22
|
}>;
|
|
21
23
|
export declare const ObjectPicker: {
|
|
22
|
-
Root: ({ modal, modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children, }: import("@dxos/react-ui-
|
|
23
|
-
Portal:
|
|
24
|
+
Root: ({ modal, modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children, }: import("@dxos/react-ui-search").ComboboxRootProps) => React.JSX.Element;
|
|
25
|
+
Portal: {
|
|
26
|
+
(props: import("@dxos/react-ui").PopoverPortalProps & {
|
|
27
|
+
__scopePopover?: import("@radix-ui/react-context").Scope;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
24
31
|
Trigger: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
32
|
VirtualTrigger: {
|
|
26
33
|
(props: import("@dxos/react-ui").PopoverVirtualTriggerProps & {
|
|
@@ -37,6 +44,7 @@ export declare const ObjectPicker: {
|
|
|
37
44
|
createOptionIcon?: string;
|
|
38
45
|
createSchema?: Schema.Schema.AnyNoContext;
|
|
39
46
|
createInitialValuePath?: string;
|
|
47
|
+
createFieldMap?: FormFieldMap;
|
|
40
48
|
onCreate?: (values: any) => void;
|
|
41
49
|
onSelect: (id: string) => void;
|
|
42
50
|
}, "className"> & {
|
|
@@ -1 +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,KAAgE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,KAAK,OAAO,EAAW,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;
|
|
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,KAAgE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,KAAK,OAAO,EAAW,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAK7F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,S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