react-formule 1.0.0 → 1.1.1
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 +44 -11
- package/dist/admin/components/Draggable.d.ts +1 -1
- package/dist/admin/components/EditablePreview.d.ts +5 -0
- package/dist/admin/components/FormPreview.d.ts +2 -1
- package/dist/admin/components/PropKeyEditorForm.d.ts +1 -1
- package/dist/admin/components/SchemaPreview.d.ts +1 -1
- package/dist/admin/formComponents/ArrayFieldTemplate.d.ts +1 -1
- package/dist/admin/formComponents/FieldTemplate.d.ts +1 -1
- package/dist/admin/formComponents/HoverBox.d.ts +1 -1
- package/dist/admin/formComponents/ObjectFieldTemplate.d.ts +1 -1
- package/dist/admin/formComponents/SortableBox.d.ts +1 -1
- package/dist/admin/formComponents/widgets/SliderWidget.d.ts +1 -1
- package/dist/admin/formComponents/widgets/index.d.ts +1 -1
- package/dist/admin/utils/fieldTypes.d.ts +105 -0
- package/dist/contexts/CustomizationContext.d.ts +1 -2
- package/dist/exposed.d.ts +8 -5
- package/dist/forms/Form.d.ts +7 -2
- package/dist/forms/fields/{index.d.ts → base/index.d.ts} +3 -3
- package/dist/forms/fields/{services → base/services}/Orcid.d.ts +1 -1
- package/dist/forms/fields/{services → base/services}/Ror.d.ts +1 -1
- package/dist/forms/fields/{services → base/services}/Zenodo.d.ts +1 -1
- package/dist/forms/fields/internal/TitleField.d.ts +4 -2
- package/dist/forms/fields/published/CodeEditorField.d.ts +5 -0
- package/dist/forms/fields/published/index.d.ts +5 -0
- package/dist/forms/index.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/AccordionArrayFieldTemplate.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/ArrayFieldTemplateItem.d.ts +3 -3
- package/dist/forms/templates/ArrayFieldTemplates/ArrayUtils.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/EmptyArrayField.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/FixedArrayFieldTemplate.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/ImportListModal.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/LayerArrayFieldTemplate.d.ts +1 -1
- package/dist/forms/templates/ArrayFieldTemplates/NormalArrayFieldTemplate.d.ts +2 -3
- package/dist/forms/templates/ArrayFieldTemplates/index.d.ts +2 -2
- package/dist/forms/templates/Field/FieldHeader.d.ts +5 -2
- package/dist/forms/templates/Field/FieldTemplate.d.ts +1 -1
- package/dist/forms/templates/Field/WrapIfAdditional.d.ts +1 -1
- package/dist/forms/templates/ObjectFieldTemplate.d.ts +1 -1
- package/dist/forms/templates/Tabs/TabField.d.ts +4 -2
- package/dist/forms/templates/Tabs/TabFieldMenu.d.ts +1 -1
- package/dist/forms/templates/utils/index.d.ts +2 -2
- package/dist/forms/widgets/base/MaskedInput/index.d.ts +1 -0
- package/dist/forms/widgets/{RichEditorPreviewPlugin.d.ts → base/RichEditorPreviewPlugin.d.ts} +2 -2
- package/dist/forms/widgets/{RichEditorWidget.d.ts → base/RichEditorWidget.d.ts} +1 -1
- package/dist/forms/widgets/{SelectWidget.d.ts → base/SelectWidget.d.ts} +1 -1
- package/dist/forms/widgets/{TextWidget.d.ts → base/TextWidget.d.ts} +1 -1
- package/dist/forms/widgets/base/index.d.ts +20 -0
- package/dist/forms/widgets/published/RichEditorWidget.d.ts +10 -0
- package/dist/forms/widgets/published/TextWidget.d.ts +10 -0
- package/dist/forms/widgets/published/UriWidget.d.ts +10 -0
- package/dist/forms/widgets/published/index.d.ts +11 -0
- package/dist/index.d.ts +15 -10
- package/dist/main.d.ts +1 -1
- package/dist/partials/Markdown/Markdown.d.ts +1 -1
- package/dist/partials/Markdown/index.d.ts +1 -1
- package/dist/react-formule.js +114647 -119388
- package/dist/react-formule.umd.cjs +574 -652
- package/dist/store/configureStore.d.ts +3 -3
- package/dist/store/schemaWizard.d.ts +22 -3
- package/dist/utils/CodeDiffViewer.d.ts +8 -0
- package/dist/utils/CodeEditor.d.ts +15 -14
- package/dist/utils/CodeViewer.d.ts +15 -12
- package/dist/utils/index.d.ts +10 -0
- package/package.json +9 -12
- package/dist/forms/widgets/MaskedInput/index.d.ts +0 -1
- package/dist/forms/widgets/index.d.ts +0 -20
- /package/dist/forms/fields/{CodeEditorField.d.ts → base/CodeEditorField.d.ts} +0 -0
- /package/dist/forms/fields/{IdFetcher.d.ts → base/IdFetcher.d.ts} +0 -0
- /package/dist/forms/fields/{TagsField.d.ts → base/TagsField.d.ts} +0 -0
- /package/dist/forms/fields/{services → base/services}/svg/OrcidSvg.d.ts +0 -0
- /package/dist/forms/fields/{services → base/services}/svg/RorSvg.d.ts +0 -0
- /package/dist/forms/fields/{services → base/services}/svg/ZenodoSvg.d.ts +0 -0
- /package/dist/forms/widgets/{CheckboxWidget.d.ts → base/CheckboxWidget.d.ts} +0 -0
- /package/dist/forms/widgets/{DateWidget.d.ts → base/DateWidget.d.ts} +0 -0
- /package/dist/forms/widgets/{MaskedInput → base/MaskedInput}/MaskedInput.d.ts +0 -0
- /package/dist/forms/widgets/{RequiredWidget.d.ts → base/RequiredWidget.d.ts} +0 -0
- /package/dist/forms/widgets/{SwitchWidget.d.ts → base/SwitchWidget.d.ts} +0 -0
- /package/dist/forms/widgets/{UriWidget.d.ts → base/UriWidget.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
<
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
<
|
|
3
|
+
<img src="https://raw.githubusercontent.com/cern-sis/react-formule/master/docs/logo_horizontal.png" width="800px" />
|
|
4
4
|
|
|
5
|
-
[](https://cern-sis.github.io/react-formule/)
|
|
6
|
+
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://www.npmjs.com/package/react-formule?activeTab=readme)
|
|
11
|
+
[](https://github.com/cern-sis/react-formule/commits/master/)
|
|
12
|
+
[](https://github.com/cern-sis/react-formule/pulls)
|
|
13
|
+
[](https://github.com/cern-sis/react-formule/issues)
|
|
14
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
15
|
+
[](https://github.com/cern-sis/react-formule/actions/workflows/cypress.yml)
|
|
16
|
+
[](https://github.com/cern-sis/react-formule/actions/workflows/commit-lint.yml)
|
|
6
17
|
|
|
7
18
|
## :horse: What is Formule?
|
|
8
19
|
|
|
@@ -17,7 +28,7 @@ It originated from the need of a flexible tool for physicists at CERN to create
|
|
|
17
28
|
|
|
18
29
|
A simple setup (see `./formule-demo`) could look like this:
|
|
19
30
|
|
|
20
|
-
<p align="center"><img src="docs/demo.gif"/></p>
|
|
31
|
+
<p align="center"><img src="https://raw.githubusercontent.com/cern-sis/react-formule/master/docs/demo.gif"/></p>
|
|
21
32
|
|
|
22
33
|
## :racehorse: How it works
|
|
23
34
|
|
|
@@ -27,14 +38,20 @@ Formule consists of the following main components:
|
|
|
27
38
|
- The form editor, which has been split into three different components that work together for more flexibility:
|
|
28
39
|
- **`SelectOrEdit`** (or, separately, **`SelectFieldType`** and **`PropertyEditor`**): You can select fields to add to the form and customize their properties.
|
|
29
40
|
- **`SchemaPreview`**: A tree view of the fields where you can rearrange or select fields to be edited.
|
|
30
|
-
- **`FormPreview`**: A live, iteractive preview of the form.
|
|
31
|
-
- **`FormuleForm`**: You can use it to display a form (JSON Schema) generated by Formule.
|
|
41
|
+
- **`FormPreview`**: A live, iteractive preview of the form which lets you toggle between the editable and the published version. If you only want to show the editable version, use **`EditablePreview`** instead.
|
|
42
|
+
- **`FormuleForm`**: You can use it to display a form (JSON Schema) generated by Formule. The editable version will be displayed by default. You can pass `isPublished` if you want to see the published version.
|
|
32
43
|
|
|
33
44
|
It also exports the following functions:
|
|
34
45
|
|
|
35
|
-
- **`initFormuleSchema`**: Inits the JSONSchema, _needs_ to be run on startup.
|
|
46
|
+
- **`initFormuleSchema`**: Inits the JSONSchema, **_needs_** to be run on startup.
|
|
36
47
|
- **`getFormuleState`**: Formule has its own internal redux state. You can retrieve it at any moment if you so require for more advanced use cases. If you want to continuosly synchronize the Formule state in your app, you can pass a callback function to FormuleContext instead (see below), which will be called every time the form state changes.
|
|
37
48
|
|
|
49
|
+
And the following utilities:
|
|
50
|
+
|
|
51
|
+
- **`CodeEditor`**: Useful if you want to edit the JSON schemas (or any other code) manually.
|
|
52
|
+
- **`CodeViewer`**: Useful if you want to visualize the JSON schemas that are being generated (as you can see in the demo).
|
|
53
|
+
- **`CodeDiffViewer`**: Useful if you want to compare two different JSON schemas, for example to see the changes since the last save.
|
|
54
|
+
|
|
38
55
|
### Field types
|
|
39
56
|
|
|
40
57
|
Formule includes a variety of predefined field types, grouped in three categories:
|
|
@@ -46,7 +63,7 @@ Formule includes a variety of predefined field types, grouped in three categorie
|
|
|
46
63
|
- `Accordion`: When containing a `List`, it works as a `List` with collapsible entries.
|
|
47
64
|
- `Layer`: When containing a `List`, it works as a `List` whose entries will open in a dialog window.
|
|
48
65
|
- `Tab`: It's commonly supposed to be used as a wrapper around the rest of the elements. You will normally want to add an `Object` inside and you can use it to separate the form in different pages or sections.
|
|
49
|
-
- **Advanced fields**: More complex or situational fields such as `URI`, `Rich/Latex editor`, `Tags` and `
|
|
66
|
+
- **Advanced fields**: More complex or situational fields such as `URI`, `Rich/Latex editor`, `Tags`, `ID Fetcher` and `Code Editor`.
|
|
50
67
|
|
|
51
68
|
You can freely remove some of these predefined fields and add your own custom fields and widgets following the JSON Schema specifications. More details below.
|
|
52
69
|
|
|
@@ -85,7 +102,11 @@ const useEffect(() => initFormuleSchema(), []);
|
|
|
85
102
|
### Customizing and adding new field types
|
|
86
103
|
|
|
87
104
|
```jsx
|
|
88
|
-
<FormuleContext
|
|
105
|
+
<FormuleContext
|
|
106
|
+
theme={{token: {colorPrimary: "blue"}}}
|
|
107
|
+
customFieldTypes={...}
|
|
108
|
+
customFields={...}
|
|
109
|
+
customWidgets={...}>
|
|
89
110
|
// ...
|
|
90
111
|
</FormuleContext>
|
|
91
112
|
```
|
|
@@ -98,7 +119,19 @@ const transformSchema = (schema) => {
|
|
|
98
119
|
return transformedSchema;
|
|
99
120
|
};
|
|
100
121
|
|
|
101
|
-
<FormuleContext transformSchema={transformSchema}
|
|
122
|
+
<FormuleContext transformSchema={transformSchema}>/* ... */</FormuleContext>;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Handling and customizing errors
|
|
126
|
+
|
|
127
|
+
You can add a custom `transformErrors` function to process, edit or filter the errors from RJSF in the way that best suits our needs:
|
|
128
|
+
|
|
129
|
+
```jsx
|
|
130
|
+
const transformErrors = (errors) => {
|
|
131
|
+
return errors.filter(...)
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
<FormuleForm transformErrors={transformErrors} />
|
|
102
135
|
```
|
|
103
136
|
|
|
104
137
|
### Syncing Formule state
|
|
@@ -122,4 +155,4 @@ Alternatively, you can pull the current state on demand by calling `getFormuleSt
|
|
|
122
155
|
|
|
123
156
|
## :space_invader: Local demo & how to contribute
|
|
124
157
|
|
|
125
|
-
|
|
158
|
+
Apart from trying the online [demo](https://cern-sis.github.io/react-formule/) you can clone the repo and run `formule-demo` to play around. Follow the instructions in its [README](./formule-demo/README.md): it will explain how to install `react-formule` as a local dependency so that you can modify Formule and test the changes live in your host app, which will be ideal if you want to troubleshoot or contribute to the project.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default Draggable;
|
|
2
3
|
declare function Draggable({ data, type, children }: {
|
|
3
4
|
data: any;
|
|
@@ -11,4 +12,3 @@ declare namespace Draggable {
|
|
|
11
12
|
let type: PropTypes.Requireable<string>;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default PropertyKeyEditorForm;
|
|
2
3
|
declare function PropertyKeyEditorForm({ uiSchema, schema, formData, onChange, optionsSchemaObject, optionsUiSchemaObject, }: {
|
|
3
4
|
uiSchema?: {} | undefined;
|
|
@@ -17,4 +18,3 @@ declare namespace PropertyKeyEditorForm {
|
|
|
17
18
|
let optionsUiSchemaObject: PropTypes.Requireable<object>;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default SchemaPreview;
|
|
2
3
|
declare function SchemaPreview(): import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare namespace SchemaPreview {
|
|
@@ -6,4 +7,3 @@ declare namespace SchemaPreview {
|
|
|
6
7
|
let selectProperty: PropTypes.Requireable<(...args: any[]) => any>;
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default ArrayFieldTemplate;
|
|
2
3
|
declare function ArrayFieldTemplate(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare namespace ArrayFieldTemplate {
|
|
@@ -10,4 +11,3 @@ declare namespace ArrayFieldTemplate {
|
|
|
10
11
|
let id: PropTypes.Requireable<string>;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default FieldTemplate;
|
|
2
3
|
declare function FieldTemplate(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare namespace FieldTemplate {
|
|
@@ -10,4 +11,3 @@ declare namespace FieldTemplate {
|
|
|
10
11
|
let schema: PropTypes.Requireable<object>;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default HoverBox;
|
|
2
3
|
declare function HoverBox({ path, propKey, addProperty, children, shouldHideChildren, }: {
|
|
3
4
|
path: any;
|
|
@@ -15,4 +16,3 @@ declare namespace HoverBox {
|
|
|
15
16
|
let shouldHideChildren: PropTypes.Requireable<boolean>;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default ObjectFieldTemplate;
|
|
2
3
|
declare function ObjectFieldTemplate({ properties, uiSchema, formContext, idSchema }: {
|
|
3
4
|
properties: any;
|
|
@@ -14,4 +15,3 @@ declare namespace ObjectFieldTemplate {
|
|
|
14
15
|
let uiSchema: PropTypes.Requireable<object>;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default SortableBox;
|
|
2
3
|
declare function SortableBox({ parent, children, id, index, moveCard }: {
|
|
3
4
|
parent: any;
|
|
@@ -15,4 +16,3 @@ declare namespace SortableBox {
|
|
|
15
16
|
let moveCard: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default SliderWidget;
|
|
2
3
|
declare function SliderWidget({ schema, onChange, value }: {
|
|
3
4
|
schema: any;
|
|
@@ -11,4 +12,3 @@ declare namespace SliderWidget {
|
|
|
11
12
|
let value: PropTypes.Requireable<number>;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
import PropTypes from "prop-types";
|
|
@@ -76,6 +76,11 @@ export namespace common {
|
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
|
+
"ui:label": {
|
|
80
|
+
title: string;
|
|
81
|
+
type: string;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
79
84
|
};
|
|
80
85
|
}
|
|
81
86
|
let optionsUiSchemaUiSchema: {
|
|
@@ -96,6 +101,9 @@ export namespace common {
|
|
|
96
101
|
};
|
|
97
102
|
"ui:order": string[];
|
|
98
103
|
};
|
|
104
|
+
"ui:label": {
|
|
105
|
+
"ui:widget": string;
|
|
106
|
+
};
|
|
99
107
|
};
|
|
100
108
|
}
|
|
101
109
|
export namespace extra {
|
|
@@ -185,6 +193,9 @@ export namespace hiddenFields {
|
|
|
185
193
|
};
|
|
186
194
|
"ui:order": string[];
|
|
187
195
|
};
|
|
196
|
+
"ui:label": {
|
|
197
|
+
"ui:widget": string;
|
|
198
|
+
};
|
|
188
199
|
};
|
|
189
200
|
export { optionsUiSchemaUiSchema_1 as optionsUiSchemaUiSchema };
|
|
190
201
|
namespace _default {
|
|
@@ -310,6 +321,11 @@ declare namespace collections_1 {
|
|
|
310
321
|
};
|
|
311
322
|
};
|
|
312
323
|
};
|
|
324
|
+
"ui:label": {
|
|
325
|
+
title: string;
|
|
326
|
+
type: string;
|
|
327
|
+
default: boolean;
|
|
328
|
+
};
|
|
313
329
|
};
|
|
314
330
|
export { properties_3 as properties };
|
|
315
331
|
}
|
|
@@ -332,6 +348,9 @@ declare namespace collections_1 {
|
|
|
332
348
|
};
|
|
333
349
|
"ui:order": string[];
|
|
334
350
|
};
|
|
351
|
+
"ui:label": {
|
|
352
|
+
"ui:widget": string;
|
|
353
|
+
};
|
|
335
354
|
};
|
|
336
355
|
export { optionsUiSchemaUiSchema_2 as optionsUiSchemaUiSchema };
|
|
337
356
|
namespace _default_1 {
|
|
@@ -398,6 +417,11 @@ declare namespace collections_1 {
|
|
|
398
417
|
};
|
|
399
418
|
};
|
|
400
419
|
};
|
|
420
|
+
"ui:label": {
|
|
421
|
+
title: string;
|
|
422
|
+
type: string;
|
|
423
|
+
default: boolean;
|
|
424
|
+
};
|
|
401
425
|
};
|
|
402
426
|
export { properties_6 as properties };
|
|
403
427
|
}
|
|
@@ -436,6 +460,9 @@ declare namespace collections_1 {
|
|
|
436
460
|
};
|
|
437
461
|
"ui:order": string[];
|
|
438
462
|
};
|
|
463
|
+
"ui:label": {
|
|
464
|
+
"ui:widget": string;
|
|
465
|
+
};
|
|
439
466
|
};
|
|
440
467
|
export { optionsUiSchemaUiSchema_3 as optionsUiSchemaUiSchema };
|
|
441
468
|
namespace _default_2 {
|
|
@@ -490,6 +517,9 @@ declare namespace collections_1 {
|
|
|
490
517
|
};
|
|
491
518
|
"ui:order": string[];
|
|
492
519
|
};
|
|
520
|
+
"ui:label": {
|
|
521
|
+
"ui:widget": string;
|
|
522
|
+
};
|
|
493
523
|
};
|
|
494
524
|
export { optionsUiSchemaUiSchema_4 as optionsUiSchemaUiSchema };
|
|
495
525
|
namespace _default_3 {
|
|
@@ -547,6 +577,9 @@ declare namespace collections_1 {
|
|
|
547
577
|
};
|
|
548
578
|
"ui:order": string[];
|
|
549
579
|
};
|
|
580
|
+
"ui:label": {
|
|
581
|
+
"ui:widget": string;
|
|
582
|
+
};
|
|
550
583
|
};
|
|
551
584
|
export { optionsUiSchemaUiSchema_5 as optionsUiSchemaUiSchema };
|
|
552
585
|
namespace _default_4 {
|
|
@@ -604,6 +637,9 @@ declare namespace collections_1 {
|
|
|
604
637
|
};
|
|
605
638
|
"ui:order": string[];
|
|
606
639
|
};
|
|
640
|
+
"ui:label": {
|
|
641
|
+
"ui:widget": string;
|
|
642
|
+
};
|
|
607
643
|
};
|
|
608
644
|
export { optionsUiSchemaUiSchema_6 as optionsUiSchemaUiSchema };
|
|
609
645
|
namespace _default_5 {
|
|
@@ -742,6 +778,11 @@ declare namespace simple_1 {
|
|
|
742
778
|
};
|
|
743
779
|
};
|
|
744
780
|
};
|
|
781
|
+
"ui:label": {
|
|
782
|
+
title: string;
|
|
783
|
+
type: string;
|
|
784
|
+
default: boolean;
|
|
785
|
+
};
|
|
745
786
|
};
|
|
746
787
|
export { properties_14 as properties };
|
|
747
788
|
}
|
|
@@ -771,6 +812,9 @@ declare namespace simple_1 {
|
|
|
771
812
|
};
|
|
772
813
|
"ui:order": string[];
|
|
773
814
|
};
|
|
815
|
+
"ui:label": {
|
|
816
|
+
"ui:widget": string;
|
|
817
|
+
};
|
|
774
818
|
};
|
|
775
819
|
export { optionsUiSchemaUiSchema_7 as optionsUiSchemaUiSchema };
|
|
776
820
|
namespace _default_6 {
|
|
@@ -896,6 +940,11 @@ declare namespace simple_1 {
|
|
|
896
940
|
};
|
|
897
941
|
};
|
|
898
942
|
};
|
|
943
|
+
"ui:label": {
|
|
944
|
+
title: string;
|
|
945
|
+
type: string;
|
|
946
|
+
default: boolean;
|
|
947
|
+
};
|
|
899
948
|
};
|
|
900
949
|
export { properties_16 as properties };
|
|
901
950
|
}
|
|
@@ -918,6 +967,9 @@ declare namespace simple_1 {
|
|
|
918
967
|
};
|
|
919
968
|
"ui:order": string[];
|
|
920
969
|
};
|
|
970
|
+
"ui:label": {
|
|
971
|
+
"ui:widget": string;
|
|
972
|
+
};
|
|
921
973
|
};
|
|
922
974
|
export { optionsUiSchemaUiSchema_8 as optionsUiSchemaUiSchema };
|
|
923
975
|
namespace _default_7 {
|
|
@@ -995,6 +1047,9 @@ declare namespace simple_1 {
|
|
|
995
1047
|
};
|
|
996
1048
|
"ui:order": string[];
|
|
997
1049
|
};
|
|
1050
|
+
"ui:label": {
|
|
1051
|
+
"ui:widget": string;
|
|
1052
|
+
};
|
|
998
1053
|
};
|
|
999
1054
|
export { optionsUiSchemaUiSchema_9 as optionsUiSchemaUiSchema };
|
|
1000
1055
|
namespace _default_8 {
|
|
@@ -1117,6 +1172,9 @@ declare namespace simple_1 {
|
|
|
1117
1172
|
};
|
|
1118
1173
|
"ui:order": string[];
|
|
1119
1174
|
};
|
|
1175
|
+
"ui:label": {
|
|
1176
|
+
"ui:widget": string;
|
|
1177
|
+
};
|
|
1120
1178
|
};
|
|
1121
1179
|
export { optionsUiSchemaUiSchema_10 as optionsUiSchemaUiSchema };
|
|
1122
1180
|
namespace _default_9 {
|
|
@@ -1249,6 +1307,11 @@ declare namespace simple_1 {
|
|
|
1249
1307
|
};
|
|
1250
1308
|
};
|
|
1251
1309
|
};
|
|
1310
|
+
"ui:label": {
|
|
1311
|
+
title: string;
|
|
1312
|
+
type: string;
|
|
1313
|
+
default: boolean;
|
|
1314
|
+
};
|
|
1252
1315
|
};
|
|
1253
1316
|
export { properties_20 as properties };
|
|
1254
1317
|
}
|
|
@@ -1271,6 +1334,9 @@ declare namespace simple_1 {
|
|
|
1271
1334
|
};
|
|
1272
1335
|
"ui:order": string[];
|
|
1273
1336
|
};
|
|
1337
|
+
"ui:label": {
|
|
1338
|
+
"ui:widget": string;
|
|
1339
|
+
};
|
|
1274
1340
|
};
|
|
1275
1341
|
export { optionsUiSchemaUiSchema_11 as optionsUiSchemaUiSchema };
|
|
1276
1342
|
namespace _default_10 {
|
|
@@ -1353,6 +1419,9 @@ declare namespace simple_1 {
|
|
|
1353
1419
|
};
|
|
1354
1420
|
"ui:order": string[];
|
|
1355
1421
|
};
|
|
1422
|
+
"ui:label": {
|
|
1423
|
+
"ui:widget": string;
|
|
1424
|
+
};
|
|
1356
1425
|
};
|
|
1357
1426
|
export { optionsUiSchemaUiSchema_12 as optionsUiSchemaUiSchema };
|
|
1358
1427
|
namespace _default_11 {
|
|
@@ -1482,6 +1551,9 @@ declare namespace simple_1 {
|
|
|
1482
1551
|
};
|
|
1483
1552
|
"ui:order": string[];
|
|
1484
1553
|
};
|
|
1554
|
+
"ui:label": {
|
|
1555
|
+
"ui:widget": string;
|
|
1556
|
+
};
|
|
1485
1557
|
};
|
|
1486
1558
|
export { optionsUiSchemaUiSchema_13 as optionsUiSchemaUiSchema };
|
|
1487
1559
|
namespace _default_12 {
|
|
@@ -1597,6 +1669,9 @@ declare namespace simple_1 {
|
|
|
1597
1669
|
};
|
|
1598
1670
|
"ui:order": string[];
|
|
1599
1671
|
};
|
|
1672
|
+
"ui:label": {
|
|
1673
|
+
"ui:widget": string;
|
|
1674
|
+
};
|
|
1600
1675
|
};
|
|
1601
1676
|
export { optionsUiSchemaUiSchema_14 as optionsUiSchemaUiSchema };
|
|
1602
1677
|
namespace _default_14 {
|
|
@@ -1709,6 +1784,11 @@ declare namespace advanced_1 {
|
|
|
1709
1784
|
};
|
|
1710
1785
|
};
|
|
1711
1786
|
};
|
|
1787
|
+
"ui:label": {
|
|
1788
|
+
title: string;
|
|
1789
|
+
type: string;
|
|
1790
|
+
default: boolean;
|
|
1791
|
+
};
|
|
1712
1792
|
};
|
|
1713
1793
|
export { properties_25 as properties };
|
|
1714
1794
|
}
|
|
@@ -1731,6 +1811,9 @@ declare namespace advanced_1 {
|
|
|
1731
1811
|
};
|
|
1732
1812
|
"ui:order": string[];
|
|
1733
1813
|
};
|
|
1814
|
+
"ui:label": {
|
|
1815
|
+
"ui:widget": string;
|
|
1816
|
+
};
|
|
1734
1817
|
};
|
|
1735
1818
|
export { optionsUiSchemaUiSchema_15 as optionsUiSchemaUiSchema };
|
|
1736
1819
|
namespace _default_15 {
|
|
@@ -1798,6 +1881,9 @@ declare namespace advanced_1 {
|
|
|
1798
1881
|
};
|
|
1799
1882
|
"ui:order": string[];
|
|
1800
1883
|
};
|
|
1884
|
+
"ui:label": {
|
|
1885
|
+
"ui:widget": string;
|
|
1886
|
+
};
|
|
1801
1887
|
};
|
|
1802
1888
|
export { optionsUiSchemaUiSchema_16 as optionsUiSchemaUiSchema };
|
|
1803
1889
|
namespace _default_16 {
|
|
@@ -1879,6 +1965,9 @@ declare namespace advanced_1 {
|
|
|
1879
1965
|
};
|
|
1880
1966
|
"ui:order": string[];
|
|
1881
1967
|
};
|
|
1968
|
+
"ui:label": {
|
|
1969
|
+
"ui:widget": string;
|
|
1970
|
+
};
|
|
1882
1971
|
};
|
|
1883
1972
|
export { optionsUiSchemaUiSchema_17 as optionsUiSchemaUiSchema };
|
|
1884
1973
|
namespace _default_17 {
|
|
@@ -2001,6 +2090,11 @@ declare namespace advanced_1 {
|
|
|
2001
2090
|
};
|
|
2002
2091
|
};
|
|
2003
2092
|
};
|
|
2093
|
+
"ui:label": {
|
|
2094
|
+
title: string;
|
|
2095
|
+
type: string;
|
|
2096
|
+
default: boolean;
|
|
2097
|
+
};
|
|
2004
2098
|
};
|
|
2005
2099
|
export { properties_29 as properties };
|
|
2006
2100
|
}
|
|
@@ -2026,6 +2120,9 @@ declare namespace advanced_1 {
|
|
|
2026
2120
|
};
|
|
2027
2121
|
"ui:order": string[];
|
|
2028
2122
|
};
|
|
2123
|
+
"ui:label": {
|
|
2124
|
+
"ui:widget": string;
|
|
2125
|
+
};
|
|
2029
2126
|
};
|
|
2030
2127
|
export { optionsUiSchemaUiSchema_18 as optionsUiSchemaUiSchema };
|
|
2031
2128
|
namespace _default_18 {
|
|
@@ -2221,6 +2318,11 @@ declare namespace advanced_1 {
|
|
|
2221
2318
|
};
|
|
2222
2319
|
};
|
|
2223
2320
|
};
|
|
2321
|
+
"ui:label": {
|
|
2322
|
+
title: string;
|
|
2323
|
+
type: string;
|
|
2324
|
+
default: boolean;
|
|
2325
|
+
};
|
|
2224
2326
|
};
|
|
2225
2327
|
export { properties_32 as properties };
|
|
2226
2328
|
}
|
|
@@ -2243,6 +2345,9 @@ declare namespace advanced_1 {
|
|
|
2243
2345
|
};
|
|
2244
2346
|
"ui:order": string[];
|
|
2245
2347
|
};
|
|
2348
|
+
"ui:label": {
|
|
2349
|
+
"ui:widget": string;
|
|
2350
|
+
};
|
|
2246
2351
|
};
|
|
2247
2352
|
export { optionsUiSchemaUiSchema_19 as optionsUiSchemaUiSchema };
|
|
2248
2353
|
namespace _default_19 {
|
package/dist/exposed.d.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { ThemeConfig } from
|
|
2
|
-
import {
|
|
3
|
-
import { RJSFSchema } from
|
|
1
|
+
import { ThemeConfig } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
4
|
+
import { SchemaWizardState } from './store/schemaWizard';
|
|
5
|
+
|
|
4
6
|
type FormuleContextProps = {
|
|
5
7
|
children: ReactNode;
|
|
6
8
|
customFieldTypes?: object;
|
|
7
9
|
customFields?: object;
|
|
8
10
|
customWidgets?: object;
|
|
9
11
|
theme?: ThemeConfig;
|
|
10
|
-
|
|
12
|
+
separator?: string;
|
|
13
|
+
synchronizeState?: (state: SchemaWizardState) => void;
|
|
11
14
|
transformSchema?: (schema: object) => object;
|
|
12
15
|
};
|
|
13
|
-
export declare const FormuleContext:
|
|
16
|
+
export declare const FormuleContext: ({ children, customFieldTypes, customFields, customWidgets, theme, separator, synchronizeState, transformSchema, }: FormuleContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
17
|
export declare const initFormuleSchema: (data?: RJSFSchema, name?: string, description?: string) => void;
|
|
15
18
|
export declare const getFormuleState: () => {
|
|
16
19
|
current: {
|
package/dist/forms/Form.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default RJSFForm;
|
|
2
|
-
declare function RJSFForm({ formRef, schema, uiSchema, formData, extraErrors, onChange, formContext, readonly, className, ObjectFieldTemplate: Objects, ArrayFieldTemplate: Arrays, FieldTemplate: Fields, fields, widgets, validate, tagName, liveValidate, showErrorList, transformErrors, }: {
|
|
3
|
+
declare function RJSFForm({ formRef, schema, uiSchema, formData, extraErrors, onChange, formContext, readonly, className, ObjectFieldTemplate: Objects, ArrayFieldTemplate: Arrays, FieldTemplate: Fields, fields, widgets, validate, tagName, liveValidate, showErrorList, transformErrors, hideAnchors, isPublished, }: {
|
|
3
4
|
formRef: any;
|
|
4
5
|
schema: any;
|
|
5
6
|
uiSchema: any;
|
|
@@ -19,6 +20,8 @@ declare function RJSFForm({ formRef, schema, uiSchema, formData, extraErrors, on
|
|
|
19
20
|
liveValidate?: boolean | undefined;
|
|
20
21
|
showErrorList?: boolean | undefined;
|
|
21
22
|
transformErrors: any;
|
|
23
|
+
hideAnchors: any;
|
|
24
|
+
isPublished: any;
|
|
22
25
|
}): import("react/jsx-runtime").JSX.Element;
|
|
23
26
|
declare namespace RJSFForm {
|
|
24
27
|
namespace propTypes {
|
|
@@ -41,6 +44,8 @@ declare namespace RJSFForm {
|
|
|
41
44
|
let FieldTemplate: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
42
45
|
let ObjectFieldTemplate: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
43
46
|
let ArrayFieldTemplate: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
47
|
+
let hideAnchors: PropTypes.Requireable<boolean>;
|
|
48
|
+
let transformErrors: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
|
+
let isPublished: PropTypes.Requireable<boolean>;
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
|
-
import PropTypes from "prop-types";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { default as TagsField } from './TagsField';
|
|
2
|
+
import { default as IdFetcher } from './IdFetcher';
|
|
3
|
+
import { default as CodeEditorField } from './CodeEditorField';
|
|
1
4
|
export default fields;
|
|
2
5
|
declare namespace fields {
|
|
3
6
|
export { TagsField as tags };
|
|
4
7
|
export { IdFetcher as idFetcher };
|
|
5
8
|
export { CodeEditorField as codeEditor };
|
|
6
9
|
}
|
|
7
|
-
import TagsField from "./TagsField";
|
|
8
|
-
import IdFetcher from "./IdFetcher";
|
|
9
|
-
import CodeEditorField from "./CodeEditorField";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
1
2
|
export default TitleField;
|
|
2
|
-
declare function TitleField({ formContext, id, prefixCls, required, title, uiEmail, uiImport, uiLatex, enableEmail, enableImport, enableLatex, readonly, titleIsMarkdown, isObject, }: {
|
|
3
|
+
declare function TitleField({ formContext, id, fieldId, prefixCls, required, title, uiEmail, uiImport, uiLatex, enableEmail, enableImport, enableLatex, readonly, titleIsMarkdown, isObject, hideAnchors, }: {
|
|
3
4
|
formContext: any;
|
|
4
5
|
id: any;
|
|
6
|
+
fieldId: any;
|
|
5
7
|
prefixCls: any;
|
|
6
8
|
required: any;
|
|
7
9
|
title: any;
|
|
@@ -14,6 +16,7 @@ declare function TitleField({ formContext, id, prefixCls, required, title, uiEma
|
|
|
14
16
|
readonly: any;
|
|
15
17
|
titleIsMarkdown: any;
|
|
16
18
|
isObject: any;
|
|
19
|
+
hideAnchors: any;
|
|
17
20
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
18
21
|
declare namespace TitleField {
|
|
19
22
|
namespace propTypes {
|
|
@@ -32,4 +35,3 @@ declare namespace TitleField {
|
|
|
32
35
|
export { formContext_1 as formContext };
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
|
-
import PropTypes from "prop-types";
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Form';
|