@dxos/react-ui-form 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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 +2774 -2137
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +82 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2774 -2137
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +84 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +8 -8
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
- package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +84 -5
- package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.d.ts +109 -25
- package/dist/types/src/components/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.stories.d.ts +130 -56
- package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormField.d.ts +43 -0
- package/dist/types/src/components/Form/FormField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldComponent.d.ts +79 -0
- package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts +9 -0
- package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldSet.d.ts +15 -0
- package/dist/types/src/components/Form/FormFieldSet.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/ArrayField.d.ts +18 -0
- package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/BooleanField.d.ts +4 -0
- package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/GeoPointField.d.ts +5 -0
- package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/MarkdownField.d.ts +11 -0
- package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts +83 -0
- package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/NumberField.d.ts +4 -0
- package/dist/types/src/components/Form/fields/NumberField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/RefField.d.ts +22 -0
- package/dist/types/src/components/Form/fields/RefField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/SelectField.d.ts +10 -0
- package/dist/types/src/components/Form/fields/SelectField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +5 -0
- package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts +84 -0
- package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/TextAreaField.d.ts +4 -0
- package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/TextField.d.ts +4 -0
- package/dist/types/src/components/Form/fields/TextField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/TupleField.d.ts +6 -0
- package/dist/types/src/components/Form/fields/TupleField.d.ts.map +1 -0
- package/dist/types/src/components/Form/fields/index.d.ts +12 -0
- package/dist/types/src/components/Form/fields/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/index.d.ts +2 -4
- package/dist/types/src/components/Form/index.d.ts.map +1 -1
- package/dist/types/src/components/ObjectForm/ObjectForm.d.ts +9 -0
- package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectForm/index.d.ts +2 -0
- package/dist/types/src/components/ObjectForm/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +68 -0
- package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -0
- package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +87 -0
- package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObjectPicker/index.d.ts +2 -0
- package/dist/types/src/components/ObjectPicker/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +9 -0
- package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -0
- package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts +127 -0
- package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObjectProperties/ObjectProperties.test.d.ts +2 -0
- package/dist/types/src/components/ObjectProperties/ObjectProperties.test.d.ts.map +1 -0
- package/dist/types/src/components/ObjectProperties/index.d.ts +2 -0
- package/dist/types/src/components/ObjectProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/Settings/Settings.d.ts +51 -0
- package/dist/types/src/components/Settings/Settings.d.ts.map +1 -0
- package/dist/types/src/components/Settings/Settings.stories.d.ts +84 -0
- package/dist/types/src/components/Settings/Settings.stories.d.ts.map +1 -0
- package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +43 -0
- package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +1 -0
- package/dist/types/src/components/Settings/SettingsItem.d.ts +16 -0
- package/dist/types/src/components/Settings/SettingsItem.d.ts.map +1 -0
- package/dist/types/src/components/Settings/SettingsSelectField.d.ts +18 -0
- package/dist/types/src/components/Settings/SettingsSelectField.d.ts.map +1 -0
- package/dist/types/src/components/Settings/index.d.ts +4 -0
- package/dist/types/src/components/Settings/index.d.ts.map +1 -0
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +22 -10
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +86 -8
- package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +5 -4
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useFormHandler.d.ts +82 -0
- package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -0
- package/dist/types/src/hooks/useKeyHandler.d.ts +7 -0
- package/dist/types/src/hooks/useKeyHandler.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +65 -55
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/util/field-type.d.ts +19 -0
- package/dist/types/src/util/field-type.d.ts.map +1 -0
- package/dist/types/src/util/field.d.ts +3 -3
- package/dist/types/src/util/field.d.ts.map +1 -1
- package/dist/types/src/util/formatting.d.ts +2 -2
- package/dist/types/src/util/formatting.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/properties.d.ts +7 -0
- package/dist/types/src/util/properties.d.ts.map +1 -0
- package/dist/types/src/util/refs.d.ts +3 -3
- package/dist/types/src/util/refs.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -46
- package/src/components/FieldEditor/FieldEditor.stories.tsx +49 -31
- package/src/components/FieldEditor/FieldEditor.test.tsx +0 -1
- package/src/components/FieldEditor/FieldEditor.tsx +86 -91
- package/src/components/Form/AUDIT.md +17 -0
- package/src/components/Form/Form.stories.tsx +147 -224
- package/src/components/Form/Form.tsx +376 -96
- package/src/components/Form/FormField.tsx +306 -0
- package/src/components/Form/FormFieldComponent.stories.tsx +65 -0
- package/src/components/Form/FormFieldComponent.tsx +174 -0
- package/src/components/Form/FormFieldSet.tsx +144 -0
- package/src/components/Form/README.md +3 -0
- package/src/components/Form/fields/ArrayField.tsx +159 -0
- package/src/components/Form/fields/BooleanField.tsx +22 -0
- package/src/components/Form/fields/GeoPointField.tsx +121 -0
- package/src/components/Form/fields/MarkdownField.stories.tsx +152 -0
- package/src/components/Form/fields/MarkdownField.tsx +168 -0
- package/src/components/Form/fields/NumberField.tsx +39 -0
- package/src/components/Form/fields/RefField.tsx +229 -0
- package/src/components/Form/fields/SelectField.tsx +65 -0
- package/src/components/Form/fields/SelectOptionField.stories.tsx +66 -0
- package/src/components/Form/{custom/SelectOptionsInput.tsx → fields/SelectOptionField.tsx} +37 -31
- package/src/components/Form/fields/TextAreaField.tsx +38 -0
- package/src/components/Form/fields/TextField.tsx +38 -0
- package/src/components/Form/{custom/TupleInput.tsx → fields/TupleField.tsx} +17 -10
- package/src/components/Form/fields/index.ts +15 -0
- package/src/components/Form/index.ts +3 -4
- package/src/components/ObjectForm/ObjectForm.tsx +114 -0
- package/src/components/{ControlSection → ObjectForm}/index.ts +1 -1
- package/src/components/ObjectPicker/ObjectPicker.stories.tsx +212 -0
- package/src/components/ObjectPicker/ObjectPicker.tsx +194 -0
- package/src/components/ObjectPicker/index.ts +5 -0
- package/src/components/ObjectProperties/ObjectProperties.stories.tsx +362 -0
- package/src/components/ObjectProperties/ObjectProperties.test.tsx +101 -0
- package/src/components/ObjectProperties/ObjectProperties.tsx +141 -0
- package/src/components/ObjectProperties/index.ts +5 -0
- package/src/components/Settings/AUDIT.md +52 -0
- package/src/components/Settings/Settings.stories.tsx +104 -0
- package/src/components/Settings/Settings.tsx +82 -0
- package/src/components/Settings/SettingsFieldSet.tsx +257 -0
- package/src/components/Settings/SettingsItem.tsx +62 -0
- package/src/components/Settings/SettingsSelectField.tsx +59 -0
- package/src/components/Settings/index.ts +7 -0
- package/src/components/ViewEditor/ViewEditor.stories.tsx +140 -63
- package/src/components/ViewEditor/ViewEditor.test.tsx +12 -15
- package/src/components/ViewEditor/ViewEditor.tsx +348 -212
- package/src/components/index.ts +4 -3
- package/src/components/testing.tsx +31 -12
- package/src/hooks/index.ts +2 -3
- package/src/hooks/useFormHandler.ts +380 -0
- package/src/hooks/useKeyHandler.tsx +37 -0
- package/src/index.ts +0 -4
- package/src/translations.ts +70 -59
- package/src/util/field-type.ts +60 -0
- package/src/util/field.ts +33 -43
- package/src/util/formatting.ts +22 -22
- package/src/util/index.ts +2 -1
- package/src/util/properties.ts +18 -0
- package/src/util/refs.ts +17 -19
- 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 -8
- 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/ArrayField.d.ts +0 -16
- package/dist/types/src/components/Form/ArrayField.d.ts.map +0 -1
- package/dist/types/src/components/Form/Defaults.d.ts +0 -14
- package/dist/types/src/components/Form/Defaults.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormActions.d.ts +0 -9
- package/dist/types/src/components/Form/FormActions.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormContent.d.ts +0 -57
- package/dist/types/src/components/Form/FormContent.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormContext.d.ts +0 -23
- package/dist/types/src/components/Form/FormContext.d.ts.map +0 -1
- package/dist/types/src/components/Form/Input.d.ts +0 -26
- package/dist/types/src/components/Form/Input.d.ts.map +0 -1
- package/dist/types/src/components/Form/RefField.d.ts +0 -12
- package/dist/types/src/components/Form/RefField.d.ts.map +0 -1
- package/dist/types/src/components/Form/custom/GeoPointInput.d.ts +0 -4
- package/dist/types/src/components/Form/custom/GeoPointInput.d.ts.map +0 -1
- package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts +0 -4
- package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts.map +0 -1
- package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts +0 -7
- package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts.map +0 -1
- package/dist/types/src/components/Form/custom/TupleInput.d.ts +0 -6
- package/dist/types/src/components/Form/custom/TupleInput.d.ts.map +0 -1
- package/dist/types/src/components/Form/custom/index.d.ts +0 -4
- package/dist/types/src/components/Form/custom/index.d.ts.map +0 -1
- package/dist/types/src/components/Form/factory.d.ts +0 -8
- package/dist/types/src/components/Form/factory.d.ts.map +0 -1
- package/dist/types/src/components/deprecated/Form.d.ts +0 -15
- package/dist/types/src/components/deprecated/Form.d.ts.map +0 -1
- package/dist/types/src/components/deprecated/Form.stories.d.ts +0 -13
- package/dist/types/src/components/deprecated/Form.stories.d.ts.map +0 -1
- package/dist/types/src/components/deprecated/FormInput.d.ts +0 -16
- package/dist/types/src/components/deprecated/FormInput.d.ts.map +0 -1
- package/dist/types/src/components/deprecated/index.d.ts +0 -2
- package/dist/types/src/components/deprecated/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useForm.d.ts +0 -67
- package/dist/types/src/hooks/useForm.d.ts.map +0 -1
- package/dist/types/src/hooks/useQueryRefOptions.d.ts +0 -23
- package/dist/types/src/hooks/useQueryRefOptions.d.ts.map +0 -1
- package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts +0 -8
- package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts.map +0 -1
- package/dist/types/src/util/schema.d.ts +0 -3
- package/dist/types/src/util/schema.d.ts.map +0 -1
- package/src/components/ControlSection/ControlSection.stories.tsx +0 -42
- package/src/components/ControlSection/ControlSection.tsx +0 -139
- package/src/components/Form/ArrayField.tsx +0 -125
- package/src/components/Form/Defaults.tsx +0 -204
- package/src/components/Form/FormActions.tsx +0 -54
- package/src/components/Form/FormContent.tsx +0 -241
- package/src/components/Form/FormContext.tsx +0 -110
- package/src/components/Form/Input.tsx +0 -51
- package/src/components/Form/RefField.tsx +0 -214
- package/src/components/Form/custom/GeoPointInput.tsx +0 -72
- package/src/components/Form/custom/SelectOptionsInput.stories.tsx +0 -62
- package/src/components/Form/custom/index.ts +0 -7
- package/src/components/Form/factory.tsx +0 -31
- package/src/components/deprecated/Form.stories.tsx +0 -63
- package/src/components/deprecated/Form.tsx +0 -119
- package/src/components/deprecated/FormInput.tsx +0 -71
- package/src/components/deprecated/index.ts +0 -5
- package/src/hooks/useForm.ts +0 -293
- package/src/hooks/useQueryRefOptions.ts +0 -53
- package/src/hooks/useRefQueryLookupHandler.ts +0 -39
- package/src/util/schema.ts +0 -14
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
decorators: import("@storybook/react").Decorator[];
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
translations: [{
|
|
8
|
+
readonly 'en-US': {
|
|
9
|
+
readonly "@dxos/react-ui-form": {
|
|
10
|
+
readonly 'fields.label': 'Fields';
|
|
11
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
12
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
13
|
+
readonly 'field-property.label': 'Property';
|
|
14
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
15
|
+
readonly 'field-format.label': 'Type';
|
|
16
|
+
readonly 'field-path.label': 'Field path';
|
|
17
|
+
readonly 'add-item.button': 'Add item';
|
|
18
|
+
readonly 'add-property-button.label': 'Add property';
|
|
19
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
20
|
+
readonly 'boolean-input-false.value': 'No';
|
|
21
|
+
readonly 'show-field.label': 'Show field';
|
|
22
|
+
readonly 'hide-field.label': 'Hide field';
|
|
23
|
+
readonly 'delete-field.label': 'Delete field';
|
|
24
|
+
readonly 'create-option.label': 'Create';
|
|
25
|
+
readonly 'add-tag.label': 'Add tag';
|
|
26
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
27
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
28
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
29
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
30
|
+
readonly 'example.placeholder': 'Example';
|
|
31
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
32
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
33
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
34
|
+
readonly 'save-button.label': 'Save';
|
|
35
|
+
readonly 'create-text.label': 'Create text';
|
|
36
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
37
|
+
readonly 'format.currency.label': 'Currency';
|
|
38
|
+
readonly 'format.date.label': 'Date';
|
|
39
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
40
|
+
readonly 'format.did.label': 'DID';
|
|
41
|
+
readonly 'format.duration.label': 'Duration';
|
|
42
|
+
readonly 'format.dxn.label': 'DXN';
|
|
43
|
+
readonly 'format.email.label': 'Email';
|
|
44
|
+
readonly 'format.formula.label': 'Formula';
|
|
45
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
46
|
+
readonly 'format.integer.label': 'Integer';
|
|
47
|
+
readonly 'format.json.label': 'JSON';
|
|
48
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
49
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
50
|
+
readonly 'format.percent.label': 'Percent';
|
|
51
|
+
readonly 'format.ref.label': 'Reference';
|
|
52
|
+
readonly 'format.regex.label': 'RegExp';
|
|
53
|
+
readonly 'format.string.label': 'String';
|
|
54
|
+
readonly 'format.single-select.label': 'Select';
|
|
55
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
56
|
+
readonly 'format.text.label': 'Long text';
|
|
57
|
+
readonly 'format.time.label': 'Time';
|
|
58
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
59
|
+
readonly 'format.user.label': 'User';
|
|
60
|
+
readonly 'format.number.label': 'Number';
|
|
61
|
+
readonly 'format.uri.label': 'URI';
|
|
62
|
+
readonly 'format.url.label': 'URL';
|
|
63
|
+
readonly 'format.uuid.label': '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-delete.button': 'Delete';
|
|
69
|
+
readonly 'select-option-add.button': 'Add option';
|
|
70
|
+
readonly 'system-schema.title': 'System type';
|
|
71
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
72
|
+
readonly 'remove.button': 'Remove';
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export default meta;
|
|
79
|
+
type Story = StoryObj<typeof meta>;
|
|
80
|
+
export declare const StringBacked: Story;
|
|
81
|
+
export declare const RefPopulated: Story;
|
|
82
|
+
export declare const RefEmpty: Story;
|
|
83
|
+
//# sourceMappingURL=MarkdownField.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownField.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/MarkdownField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA2GjE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOM,CAAC;eAEF,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
3
|
+
export declare const NumberField: ({ type, readonly, placeholder, onValueChange, onBlur, ...props }: FormFieldComponentProps<number>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=NumberField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/NumberField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,uBAAuB,CAAC;AAEvF,eAAO,MAAM,WAAW,qEAOrB,uBAAuB,CAAC,MAAM,CAAC,sBAoBjC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@dxos/lit-ui/dx-tag-picker.pcss';
|
|
3
|
+
import { type Database, Entity, Obj, Type } from '@dxos/echo';
|
|
4
|
+
import { type ObjectPickerContentProps, type RefOption } from '../../ObjectPicker';
|
|
5
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
6
|
+
export type RefFieldProps = FormFieldComponentProps & Pick<ObjectPickerContentProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap'> & {
|
|
7
|
+
db?: Database.Database;
|
|
8
|
+
useSchema?: (db?: Database.Database, typename?: string) => Type.AnyEntity;
|
|
9
|
+
useResults?: (db?: Database.Database, typename?: string) => Entity.Any[];
|
|
10
|
+
getOptions?: (objects: Entity.Any[], options?: {
|
|
11
|
+
parentLabel?: boolean;
|
|
12
|
+
}) => RefOption[];
|
|
13
|
+
/**
|
|
14
|
+
* Persist a newly-created object. Called after the user fills out the
|
|
15
|
+
* inline create form and clicks Save. Should add the object to the
|
|
16
|
+
* database and return it (sync or async). The returned object is then
|
|
17
|
+
* wired into this slot's form value as a Ref.
|
|
18
|
+
*/
|
|
19
|
+
onCreate?: (schema: Type.AnyEntity, values: any) => Obj.Unknown | Promise<Obj.Unknown> | undefined | void;
|
|
20
|
+
};
|
|
21
|
+
export declare const RefField: (props: RefFieldProps) => React.JSX.Element | null;
|
|
22
|
+
//# sourceMappingURL=RefField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RefField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/RefField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAU,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAW3E,OAAO,EAAgB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AA0BrF,MAAM,MAAM,aAAa,GAAG,uBAAuB,GACjD,IAAI,CACF,wBAAwB,EACxB,mBAAmB,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,gBAAgB,CACvF,GAAG;IACF,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAEvB,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC;IAC1E,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC;IACzE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,EAAE,CAAC;IACzF;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;CAC3G,CAAC;AAEJ,eAAO,MAAM,QAAQ,UAAW,aAAa,6BAmK5C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
3
|
+
export type SelectFieldOptions = FormFieldComponentProps & {
|
|
4
|
+
options?: Array<{
|
|
5
|
+
value: string | number;
|
|
6
|
+
label?: string;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
export declare const SelectField: ({ type, readonly, label, layout, placeholder, options, getStatus, getValue, onValueChange, }: SelectFieldOptions) => React.JSX.Element | null;
|
|
10
|
+
//# sourceMappingURL=SelectField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/SelectField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AAErF,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,WAAW,iGAUrB,kBAAkB,6BAwCpB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SelectOption } from '@dxos/echo/internal';
|
|
3
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
4
|
+
export declare const SelectOptionField: ({ type, readonly, label, getStatus, getValue, onValueChange, }: FormFieldComponentProps<SelectOption[] | undefined>) => React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=SelectOptionField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AASxD,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AAErF,eAAO,MAAM,iBAAiB,mEAO3B,uBAAuB,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,sBA4KrD,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: any;
|
|
6
|
+
render: () => React.JSX.Element;
|
|
7
|
+
decorators: import("@storybook/react").Decorator[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
translations: [{
|
|
11
|
+
readonly 'en-US': {
|
|
12
|
+
readonly "@dxos/react-ui-form": {
|
|
13
|
+
readonly 'fields.label': 'Fields';
|
|
14
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
15
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
16
|
+
readonly 'field-property.label': 'Property';
|
|
17
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
18
|
+
readonly 'field-format.label': 'Type';
|
|
19
|
+
readonly 'field-path.label': 'Field path';
|
|
20
|
+
readonly 'add-item.button': 'Add item';
|
|
21
|
+
readonly 'add-property-button.label': 'Add property';
|
|
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 'create-option.label': 'Create';
|
|
28
|
+
readonly 'add-tag.label': 'Add tag';
|
|
29
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
30
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
31
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
32
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
33
|
+
readonly 'example.placeholder': 'Example';
|
|
34
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
35
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
36
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
37
|
+
readonly 'save-button.label': 'Save';
|
|
38
|
+
readonly 'create-text.label': 'Create text';
|
|
39
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
40
|
+
readonly 'format.currency.label': 'Currency';
|
|
41
|
+
readonly 'format.date.label': 'Date';
|
|
42
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
43
|
+
readonly 'format.did.label': 'DID';
|
|
44
|
+
readonly 'format.duration.label': 'Duration';
|
|
45
|
+
readonly 'format.dxn.label': 'DXN';
|
|
46
|
+
readonly 'format.email.label': 'Email';
|
|
47
|
+
readonly 'format.formula.label': 'Formula';
|
|
48
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
49
|
+
readonly 'format.integer.label': 'Integer';
|
|
50
|
+
readonly 'format.json.label': 'JSON';
|
|
51
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
52
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
53
|
+
readonly 'format.percent.label': 'Percent';
|
|
54
|
+
readonly 'format.ref.label': 'Reference';
|
|
55
|
+
readonly 'format.regex.label': 'RegExp';
|
|
56
|
+
readonly 'format.string.label': 'String';
|
|
57
|
+
readonly 'format.single-select.label': 'Select';
|
|
58
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
59
|
+
readonly 'format.text.label': 'Long text';
|
|
60
|
+
readonly 'format.time.label': 'Time';
|
|
61
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
62
|
+
readonly 'format.user.label': 'User';
|
|
63
|
+
readonly 'format.number.label': 'Number';
|
|
64
|
+
readonly 'format.uri.label': 'URI';
|
|
65
|
+
readonly 'format.url.label': 'URL';
|
|
66
|
+
readonly 'format.uuid.label': 'UUID';
|
|
67
|
+
readonly 'latitude.label': 'Latitude';
|
|
68
|
+
readonly 'longitude.label': 'Longitude';
|
|
69
|
+
readonly 'select-option.label': 'Label';
|
|
70
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
71
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
72
|
+
readonly 'select-option-add.button': 'Add option';
|
|
73
|
+
readonly 'system-schema.title': 'System type';
|
|
74
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
75
|
+
readonly 'remove.button': 'Remove';
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export default meta;
|
|
82
|
+
type Story = StoryObj<typeof meta>;
|
|
83
|
+
export declare const Default: Story;
|
|
84
|
+
//# sourceMappingURL=SelectOptionField.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionField.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/SelectOptionField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AA4CxC,QAAA,MAAM,IAAI;;eAEwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOA,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
3
|
+
export declare const TextAreaField: ({ type, readonly, placeholder, onValueChange, onBlur, ...props }: FormFieldComponentProps<string>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=TextAreaField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/TextAreaField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,uBAAuB,CAAC;AAEvF,eAAO,MAAM,aAAa,qEAOvB,uBAAuB,CAAC,MAAM,CAAC,sBAoBjC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
3
|
+
export declare const TextField: ({ type, readonly, placeholder, onBlur, onValueChange, ...props }: FormFieldComponentProps<string>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,uBAAuB,CAAC;AAEvF,eAAO,MAAM,SAAS,qEAOnB,uBAAuB,CAAC,MAAM,CAAC,sBAoBjC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldComponentProps } from '../FormFieldComponent';
|
|
3
|
+
export declare const TupleField: ({ binding, type, readonly, label, getStatus, getValue, onValueChange, onBlur, }: FormFieldComponentProps<Record<string, number>> & {
|
|
4
|
+
binding: string[];
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
|
+
//# sourceMappingURL=TupleField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TupleField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/TupleField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AAIrF,eAAO,MAAM,UAAU,oFASpB,uBAAuB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG;IACnD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,sBA4BA,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './ArrayField';
|
|
2
|
+
export * from './BooleanField';
|
|
3
|
+
export * from './GeoPointField';
|
|
4
|
+
export * from './MarkdownField';
|
|
5
|
+
export * from './NumberField';
|
|
6
|
+
export * from './RefField';
|
|
7
|
+
export * from './SelectField';
|
|
8
|
+
export * from './SelectOptionField';
|
|
9
|
+
export * from './TextField';
|
|
10
|
+
export * from './TextAreaField';
|
|
11
|
+
export * from './TupleField';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Obj } from '@dxos/echo';
|
|
4
|
+
export type ObjectFormProps = {
|
|
5
|
+
schema: Schema.Schema.AnyNoContext;
|
|
6
|
+
object: Obj.Unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare const ObjectForm: ({ object, schema }: ObjectFormProps) => React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ObjectForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectForm/ObjectForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAO,GAAG,EAAkB,MAAM,YAAY,CAAC;AAUtD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB,CAAC;AAeF,eAAO,MAAM,UAAU,uBAAwB,eAAe,sBA8E7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectForm/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type * as Schema from 'effect/Schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type Palette, type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
+
import { type FormFieldMap } from '../Form/FormFieldComponent';
|
|
5
|
+
export type RefOption = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
hue?: Palette;
|
|
9
|
+
};
|
|
10
|
+
export type ObjectPickerContentProps = ThemedClassName<{
|
|
11
|
+
options: RefOption[];
|
|
12
|
+
selectedIds?: string[];
|
|
13
|
+
createOptionLabel?: [string, {
|
|
14
|
+
ns: string;
|
|
15
|
+
}];
|
|
16
|
+
createOptionIcon?: string;
|
|
17
|
+
createSchema?: Schema.Schema.AnyNoContext;
|
|
18
|
+
createInitialValuePath?: string;
|
|
19
|
+
createFieldMap?: FormFieldMap;
|
|
20
|
+
/**
|
|
21
|
+
* Persist a newly-created object given the form values. May be async (e.g.
|
|
22
|
+
* to write to a database). The Promise is awaited before the inline create
|
|
23
|
+
* form is collapsed back to the picker list, so consumers can complete
|
|
24
|
+
* follow-up work (assign the new ref to a parent slot, close the popover)
|
|
25
|
+
* before the picker UI re-renders.
|
|
26
|
+
*/
|
|
27
|
+
onCreate?: (values: any) => unknown | Promise<unknown>;
|
|
28
|
+
onSelect: (id: string) => void;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const ObjectPicker: {
|
|
31
|
+
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;
|
|
32
|
+
Portal: {
|
|
33
|
+
(props: import("@dxos/react-ui").PopoverPortalProps & {
|
|
34
|
+
__scopePopover?: import("@radix-ui/react-context").Scope;
|
|
35
|
+
}): React.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
Trigger: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
VirtualTrigger: {
|
|
40
|
+
(props: import("@dxos/react-ui").PopoverVirtualTriggerProps & {
|
|
41
|
+
__scopePopover?: import("@radix-ui/react-context").Scope;
|
|
42
|
+
}): React.JSX.Element;
|
|
43
|
+
displayName: string;
|
|
44
|
+
};
|
|
45
|
+
Content: React.ForwardRefExoticComponent<Omit<{
|
|
46
|
+
options: RefOption[];
|
|
47
|
+
selectedIds?: string[];
|
|
48
|
+
createOptionLabel?: [string, {
|
|
49
|
+
ns: string;
|
|
50
|
+
}];
|
|
51
|
+
createOptionIcon?: string;
|
|
52
|
+
createSchema?: Schema.Schema.AnyNoContext;
|
|
53
|
+
createInitialValuePath?: string;
|
|
54
|
+
createFieldMap?: FormFieldMap;
|
|
55
|
+
/**
|
|
56
|
+
* Persist a newly-created object given the form values. May be async (e.g.
|
|
57
|
+
* to write to a database). The Promise is awaited before the inline create
|
|
58
|
+
* form is collapsed back to the picker list, so consumers can complete
|
|
59
|
+
* follow-up work (assign the new ref to a parent slot, close the popover)
|
|
60
|
+
* before the picker UI re-renders.
|
|
61
|
+
*/
|
|
62
|
+
onCreate?: (values: any) => unknown | Promise<unknown>;
|
|
63
|
+
onSelect: (id: string) => void;
|
|
64
|
+
}, "className"> & {
|
|
65
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
66
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
};
|
|
68
|
+
//# 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,KAAgE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,KAAK,OAAO,EAAW,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAM7F,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,SAAS,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC,CAAC;AAqJH,eAAO,MAAM,YAAY;IACvB,IAAI;IACJ,MAAM;;;;;;IACN,OAAO;IACP,cAAc;;;;;;IACd,OAAO;iBA1KE,SAAS,EAAE;sBACN,MAAM,EAAE;4BACF,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;2BACzB,MAAM;uBACV,MAAM,CAAC,MAAM,CAAC,YAAY;iCAChB,MAAM;yBACd,YAAY;QAC7B;;;;;;WAMG;mBACQ,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;kBAC5C,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;;;;CA4J/B,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
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 "@dxos/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 'field-property.label': 'Property';
|
|
19
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
20
|
+
readonly 'field-format.label': 'Type';
|
|
21
|
+
readonly 'field-path.label': 'Field path';
|
|
22
|
+
readonly 'add-item.button': 'Add item';
|
|
23
|
+
readonly 'add-property-button.label': 'Add property';
|
|
24
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
25
|
+
readonly 'boolean-input-false.value': 'No';
|
|
26
|
+
readonly 'show-field.label': 'Show field';
|
|
27
|
+
readonly 'hide-field.label': 'Hide field';
|
|
28
|
+
readonly 'delete-field.label': 'Delete field';
|
|
29
|
+
readonly 'create-option.label': 'Create';
|
|
30
|
+
readonly 'add-tag.label': 'Add tag';
|
|
31
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
32
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
33
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
34
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
35
|
+
readonly 'example.placeholder': 'Example';
|
|
36
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
37
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
38
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
39
|
+
readonly 'save-button.label': 'Save';
|
|
40
|
+
readonly 'create-text.label': 'Create text';
|
|
41
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
42
|
+
readonly 'format.currency.label': 'Currency';
|
|
43
|
+
readonly 'format.date.label': 'Date';
|
|
44
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
45
|
+
readonly 'format.did.label': 'DID';
|
|
46
|
+
readonly 'format.duration.label': 'Duration';
|
|
47
|
+
readonly 'format.dxn.label': 'DXN';
|
|
48
|
+
readonly 'format.email.label': 'Email';
|
|
49
|
+
readonly 'format.formula.label': 'Formula';
|
|
50
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
51
|
+
readonly 'format.integer.label': 'Integer';
|
|
52
|
+
readonly 'format.json.label': 'JSON';
|
|
53
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
54
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
55
|
+
readonly 'format.percent.label': 'Percent';
|
|
56
|
+
readonly 'format.ref.label': 'Reference';
|
|
57
|
+
readonly 'format.regex.label': 'RegExp';
|
|
58
|
+
readonly 'format.string.label': 'String';
|
|
59
|
+
readonly 'format.single-select.label': 'Select';
|
|
60
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
61
|
+
readonly 'format.text.label': 'Long text';
|
|
62
|
+
readonly 'format.time.label': 'Time';
|
|
63
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
64
|
+
readonly 'format.user.label': 'User';
|
|
65
|
+
readonly 'format.number.label': 'Number';
|
|
66
|
+
readonly 'format.uri.label': 'URI';
|
|
67
|
+
readonly 'format.url.label': 'URL';
|
|
68
|
+
readonly 'format.uuid.label': 'UUID';
|
|
69
|
+
readonly 'latitude.label': 'Latitude';
|
|
70
|
+
readonly 'longitude.label': 'Longitude';
|
|
71
|
+
readonly 'select-option.label': 'Label';
|
|
72
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
73
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
74
|
+
readonly 'select-option-add.button': 'Add option';
|
|
75
|
+
readonly 'system-schema.title': 'System type';
|
|
76
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
77
|
+
readonly 'remove.button': 'Remove';
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
}];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default meta;
|
|
84
|
+
type Story = StoryObj<typeof meta>;
|
|
85
|
+
export declare const Default: Story;
|
|
86
|
+
export declare const WithTest: Story;
|
|
87
|
+
//# 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;AA8FzE,QAAA,MAAM,IAAI;;;;;;;YAaM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGc,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAuFtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { Obj } from '@dxos/echo';
|
|
3
|
+
export type ObjectPropertiesProps = PropsWithChildren<{
|
|
4
|
+
object: Obj.Unknown;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ObjectProperties: React.ForwardRefExoticComponent<Omit<ObjectPropertiesProps, "className"> & {
|
|
7
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
8
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=ObjectProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectProperties/ObjectProperties.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAO,GAAG,EAAkB,MAAM,YAAY,CAAC;AAYtD,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE,CAAC,CAAC;AAG/E,eAAO,MAAM,gBAAgB;;2HAkG5B,CAAC"}
|