@jsonforms/core 2.5.2-alpha.0 → 3.0.0-alpha.2
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 +1 -1
- package/docs/assets/js/search.json +1 -1
- package/docs/enums/ruleeffect.html +4 -4
- package/docs/globals.html +1061 -1120
- package/docs/index.html +64 -91
- package/docs/interfaces/addcellrendereraction.html +3 -3
- package/docs/interfaces/addrendereraction.html +3 -3
- package/docs/interfaces/adduischemaaction.html +3 -3
- package/docs/interfaces/andcondition.html +2 -2
- package/docs/interfaces/arraycontrolprops.html +22 -22
- package/docs/interfaces/arraylayoutprops.html +22 -22
- package/docs/interfaces/categorization.html +5 -5
- package/docs/interfaces/category.html +5 -5
- package/docs/interfaces/cellprops.html +14 -14
- package/docs/interfaces/combinatorrendererprops.html +13 -13
- package/docs/interfaces/combinatorsubschemarenderinfo.html +3 -3
- package/docs/interfaces/composablecondition.html +2 -2
- package/docs/interfaces/condition.html +1 -1
- package/docs/interfaces/controlelement.html +5 -5
- package/docs/interfaces/controlprops.html +17 -17
- package/docs/interfaces/controlstate.html +2 -2
- package/docs/interfaces/controlwithdetailprops.html +18 -18
- package/docs/interfaces/dispatchcellprops.html +13 -13
- package/docs/interfaces/dispatchcellstateprops.html +13 -13
- package/docs/interfaces/dispatchpropsofarraycontrol.html +4 -4
- package/docs/interfaces/dispatchpropsofcontrol.html +1 -1
- package/docs/interfaces/dispatchpropsofmultienumcontrol.html +2 -2
- package/docs/interfaces/enumcellprops.html +15 -15
- package/docs/interfaces/enumoption.html +2 -2
- package/docs/interfaces/formatted.html +2 -2
- package/docs/interfaces/grouplayout.html +5 -5
- package/docs/interfaces/horizontallayout.html +4 -4
- package/docs/interfaces/initaction.html +6 -6
- package/docs/interfaces/initactionoptions.html +3 -17
- package/docs/interfaces/jsonformscellrendererregistryentry.html +2 -2
- package/docs/interfaces/jsonformscore.html +7 -21
- package/docs/interfaces/jsonformsdefaultdataregistryentry.html +2 -2
- package/docs/interfaces/jsonformsextendedstate.html +1 -1
- package/docs/interfaces/{jsonformslocalestate.html → jsonformsi18nstate.html} +20 -20
- package/docs/interfaces/jsonformsprops.html +9 -24
- package/docs/interfaces/jsonformsrendererregistryentry.html +2 -2
- package/docs/interfaces/jsonformsstate.html +1 -1
- package/docs/interfaces/jsonformsstore.html +5 -5
- package/docs/interfaces/jsonformssubstates.html +18 -8
- package/docs/interfaces/jsonformsuischemaregistryentry.html +2 -2
- package/docs/interfaces/labeldescription.html +2 -2
- package/docs/interfaces/labelelement.html +4 -4
- package/docs/interfaces/layout.html +4 -4
- package/docs/interfaces/layoutprops.html +10 -10
- package/docs/interfaces/leafcondition.html +3 -3
- package/docs/interfaces/orcondition.html +2 -2
- package/docs/interfaces/ownpropsofcell.html +10 -10
- package/docs/interfaces/ownpropsofcontrol.html +9 -9
- package/docs/interfaces/ownpropsofenum.html +1 -1
- package/docs/interfaces/ownpropsofenumcell.html +11 -11
- package/docs/interfaces/ownpropsofjsonformsrenderer.html +8 -8
- package/docs/interfaces/ownpropsoflayout.html +9 -9
- package/docs/interfaces/ownpropsofmasterlistitem.html +6 -6
- package/docs/interfaces/ownpropsofrenderer.html +8 -8
- package/docs/interfaces/registerdefaultdataaction.html +3 -3
- package/docs/interfaces/removecellrendereraction.html +3 -3
- package/docs/interfaces/removerendereraction.html +3 -3
- package/docs/interfaces/removeuischemaaction.html +2 -2
- package/docs/interfaces/rendererprops.html +9 -9
- package/docs/interfaces/rule.html +2 -2
- package/docs/interfaces/schemabasedcondition.html +3 -3
- package/docs/interfaces/scopable.html +1 -1
- package/docs/interfaces/setajvaction.html +3 -3
- package/docs/interfaces/setconfigaction.html +2 -2
- package/docs/interfaces/setlocaleaction.html +3 -3
- package/docs/interfaces/setschemaaction.html +2 -2
- package/docs/interfaces/{setlocalizeduischemasaction.html → settranslatoraction.html} +29 -15
- package/docs/interfaces/setuischemaaction.html +2 -2
- package/docs/interfaces/setvalidationmodeaction.html +2 -2
- package/docs/interfaces/statepropsofarraycontrol.html +18 -18
- package/docs/interfaces/statepropsofarraylayout.html +18 -18
- package/docs/interfaces/statepropsofcell.html +13 -13
- package/docs/interfaces/statepropsofcombinator.html +12 -12
- package/docs/interfaces/statepropsofcontrol.html +16 -16
- package/docs/interfaces/statepropsofcontrolwithdetail.html +17 -17
- package/docs/interfaces/statepropsofenumcell.html +14 -14
- package/docs/interfaces/statepropsofjsonformsrenderer.html +9 -23
- package/docs/interfaces/statepropsoflayout.html +10 -10
- package/docs/interfaces/statepropsofmasteritem.html +7 -7
- package/docs/interfaces/statepropsofrenderer.html +9 -9
- package/docs/interfaces/statepropsofscopedrenderer.html +12 -12
- package/docs/interfaces/uischemaelement.html +3 -3
- package/docs/interfaces/unregisterdefaultdataaction.html +2 -2
- package/docs/interfaces/updateaction.html +3 -3
- package/docs/interfaces/updatecoreaction.html +6 -6
- package/docs/interfaces/updateerrorsaction.html +2 -2
- package/docs/interfaces/{setlocalizedschemasaction.html → updatei18naction.html} +43 -15
- package/docs/interfaces/verticallayout.html +4 -4
- package/docs/interfaces/withclassname.html +1 -1
- package/lib/Helpers.d.ts +5 -0
- package/lib/Helpers.js +33 -0
- package/lib/Helpers.js.map +1 -0
- package/lib/actions/actions.d.ts +181 -0
- package/lib/actions/actions.js +173 -0
- package/lib/actions/actions.js.map +1 -0
- package/lib/actions/index.d.ts +1 -180
- package/lib/actions/index.js +26 -122
- package/lib/actions/index.js.map +1 -1
- package/lib/configDefault.js +2 -1
- package/lib/configDefault.js.map +1 -1
- package/lib/generators/Generate.d.ts +6 -0
- package/lib/generators/Generate.js +35 -0
- package/lib/generators/Generate.js.map +1 -0
- package/lib/generators/index.d.ts +3 -10
- package/lib/generators/index.js +28 -9
- package/lib/generators/index.js.map +1 -1
- package/lib/generators/schema.d.ts +1 -1
- package/lib/generators/schema.js +3 -1
- package/lib/generators/schema.js.map +1 -1
- package/lib/generators/uischema.d.ts +1 -2
- package/lib/generators/uischema.js +12 -10
- package/lib/generators/uischema.js.map +1 -1
- package/lib/i18n/i18nTypes.d.ts +15 -0
- package/lib/i18n/i18nTypes.js +3 -0
- package/lib/i18n/i18nTypes.js.map +1 -0
- package/lib/i18n/i18nUtil.d.ts +11 -0
- package/lib/i18n/i18nUtil.js +58 -0
- package/lib/i18n/i18nUtil.js.map +1 -0
- package/lib/i18n/index.d.ts +2 -0
- package/lib/i18n/index.js +6 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/index.d.ts +6 -18
- package/lib/index.js +10 -15
- package/lib/index.js.map +1 -1
- package/lib/jsonforms-core.js +9 -12
- package/lib/jsonforms-core.js.map +1 -1
- package/lib/models/draft4.js +2 -1
- package/lib/models/draft4.js.map +1 -1
- package/lib/models/index.d.ts +5 -0
- package/lib/models/index.js +33 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/jsonSchema.js +24 -0
- package/lib/models/jsonSchema.js.map +1 -1
- package/lib/models/uischema.js +29 -2
- package/lib/models/uischema.js.map +1 -1
- package/lib/reducers/cells.d.ts +1 -1
- package/lib/reducers/cells.js +27 -1
- package/lib/reducers/cells.js.map +1 -1
- package/lib/reducers/config.d.ts +1 -1
- package/lib/reducers/config.js +5 -3
- package/lib/reducers/config.js.map +1 -1
- package/lib/reducers/core.d.ts +5 -7
- package/lib/reducers/core.js +78 -63
- package/lib/reducers/core.js.map +1 -1
- package/lib/reducers/default-data.d.ts +1 -1
- package/lib/reducers/default-data.js +6 -3
- package/lib/reducers/default-data.js.map +1 -1
- package/lib/reducers/i18n.d.ts +8 -11
- package/lib/reducers/i18n.js +40 -23
- package/lib/reducers/i18n.js.map +1 -1
- package/lib/reducers/index.d.ts +9 -49
- package/lib/reducers/index.js +33 -91
- package/lib/reducers/index.js.map +1 -1
- package/lib/reducers/reducers.d.ts +37 -0
- package/lib/reducers/reducers.js +107 -0
- package/lib/reducers/reducers.js.map +1 -0
- package/lib/reducers/renderers.d.ts +1 -1
- package/lib/reducers/renderers.js +27 -1
- package/lib/reducers/renderers.js.map +1 -1
- package/lib/reducers/selectors.d.ts +15 -0
- package/lib/reducers/selectors.js +56 -0
- package/lib/reducers/selectors.js.map +1 -0
- package/lib/reducers/uischemas.d.ts +2 -2
- package/lib/reducers/uischemas.js +9 -6
- package/lib/reducers/uischemas.js.map +1 -1
- package/lib/store.d.ts +5 -8
- package/lib/store.js +24 -0
- package/lib/store.js.map +1 -1
- package/lib/testers/index.d.ts +1 -204
- package/lib/testers/index.js +3 -376
- package/lib/testers/index.js.map +1 -1
- package/lib/testers/testers.d.ts +203 -0
- package/lib/testers/testers.js +421 -0
- package/lib/testers/testers.js.map +1 -0
- package/lib/util/Formatted.js +24 -0
- package/lib/util/Formatted.js.map +1 -1
- package/lib/util/array.js +25 -0
- package/lib/util/array.js.map +1 -1
- package/lib/util/cell.d.ts +11 -4
- package/lib/util/cell.js +61 -17
- package/lib/util/cell.js.map +1 -1
- package/lib/util/combinators.d.ts +2 -3
- package/lib/util/combinators.js +5 -2
- package/lib/util/combinators.js.map +1 -1
- package/lib/util/ids.js +8 -4
- package/lib/util/ids.js.map +1 -1
- package/lib/util/index.d.ts +11 -45
- package/lib/util/index.js +14 -104
- package/lib/util/index.js.map +1 -1
- package/lib/util/label.d.ts +1 -2
- package/lib/util/label.js +7 -4
- package/lib/util/label.js.map +1 -1
- package/lib/util/path.d.ts +2 -1
- package/lib/util/path.js +12 -6
- package/lib/util/path.js.map +1 -1
- package/lib/util/renderer.d.ts +17 -17
- package/lib/util/renderer.js +163 -76
- package/lib/util/renderer.js.map +1 -1
- package/lib/util/resolvers.d.ts +1 -14
- package/lib/util/resolvers.js +9 -215
- package/lib/util/resolvers.js.map +1 -1
- package/lib/util/runtime.d.ts +12 -2
- package/lib/util/runtime.js +59 -17
- package/lib/util/runtime.js.map +1 -1
- package/lib/util/schema.js +27 -1
- package/lib/util/schema.js.map +1 -1
- package/lib/util/uischema.d.ts +1 -1
- package/lib/util/uischema.js +11 -7
- package/lib/util/uischema.js.map +1 -1
- package/lib/util/util.d.ts +31 -0
- package/lib/util/util.js +112 -0
- package/lib/util/util.js.map +1 -0
- package/lib/util/validator.d.ts +3 -2
- package/lib/util/validator.js +6 -5
- package/lib/util/validator.js.map +1 -1
- package/package.json +7 -9
- package/src/Helpers.ts +38 -0
- package/src/actions/actions.ts +345 -0
- package/src/actions/index.ts +1 -312
- package/src/configDefault.ts +1 -0
- package/src/generators/Generate.ts +43 -0
- package/src/generators/index.ts +3 -21
- package/src/generators/schema.ts +1 -1
- package/src/generators/uischema.ts +4 -4
- package/src/i18n/i18nTypes.ts +17 -0
- package/src/i18n/i18nUtil.ts +76 -0
- package/src/i18n/index.ts +2 -0
- package/src/index.ts +7 -31
- package/src/models/draft4.ts +1 -0
- package/src/models/index.ts +30 -0
- package/src/models/jsonSchema.ts +1 -0
- package/src/models/uischema.ts +1 -0
- package/src/reducers/cells.ts +2 -1
- package/src/reducers/config.ts +2 -1
- package/src/reducers/core.ts +74 -81
- package/src/reducers/default-data.ts +2 -1
- package/src/reducers/i18n.ts +42 -35
- package/src/reducers/index.ts +9 -158
- package/src/reducers/reducers.ts +148 -0
- package/src/reducers/renderers.ts +2 -1
- package/src/reducers/selectors.ts +65 -0
- package/src/reducers/uischemas.ts +4 -2
- package/src/store.ts +11 -8
- package/src/testers/index.ts +1 -516
- package/src/testers/testers.ts +547 -0
- package/src/util/Formatted.ts +1 -0
- package/src/util/array.ts +25 -0
- package/src/util/cell.ts +91 -19
- package/src/util/combinators.ts +2 -4
- package/src/util/ids.ts +1 -0
- package/src/util/index.ts +11 -126
- package/src/util/label.ts +2 -2
- package/src/util/path.ts +4 -1
- package/src/util/renderer.ts +168 -85
- package/src/util/resolvers.ts +2 -261
- package/src/util/runtime.ts +46 -2
- package/src/util/schema.ts +26 -1
- package/src/util/uischema.ts +2 -1
- package/src/util/util.ts +127 -0
- package/src/util/validator.ts +5 -8
- package/test/reducers/core.test.ts +31 -223
- package/test/util/cell.test.ts +33 -2
- package/test/util/renderer.test.ts +483 -3
- package/test/util/resolvers.test.ts +1 -59
- package/test/util/runtime.test.ts +264 -4
- package/docs/interfaces/labels.html +0 -157
- package/docs/interfaces/schemaref.html +0 -160
- package/docs/interfaces/schemarefs.html +0 -138
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import AJV, { ErrorObject } from 'ajv';
|
|
2
|
+
import { JsonSchema, UISchemaElement } from '../models';
|
|
3
|
+
import { RankedTester } from '../testers';
|
|
4
|
+
import { UISchemaTester, ValidationMode } from '../reducers';
|
|
5
|
+
import { ErrorTranslator, Translator } from '../i18n';
|
|
6
|
+
export declare const INIT: 'jsonforms/INIT';
|
|
7
|
+
export declare const UPDATE_CORE: 'jsonforms/UPDATE_CORE';
|
|
8
|
+
export declare const SET_AJV: 'jsonforms/SET_AJV';
|
|
9
|
+
export declare const UPDATE_DATA: 'jsonforms/UPDATE';
|
|
10
|
+
export declare const UPDATE_ERRORS: 'jsonforms/UPDATE_ERRORS';
|
|
11
|
+
export declare const VALIDATE: 'jsonforms/VALIDATE';
|
|
12
|
+
export declare const ADD_RENDERER: 'jsonforms/ADD_RENDERER';
|
|
13
|
+
export declare const REMOVE_RENDERER: 'jsonforms/REMOVE_RENDERER';
|
|
14
|
+
export declare const ADD_CELL: 'jsonforms/ADD_CELL';
|
|
15
|
+
export declare const REMOVE_CELL: 'jsonforms/REMOVE_CELL';
|
|
16
|
+
export declare const SET_CONFIG: 'jsonforms/SET_CONFIG';
|
|
17
|
+
export declare const ADD_UI_SCHEMA: 'jsonforms/ADD_UI_SCHEMA';
|
|
18
|
+
export declare const REMOVE_UI_SCHEMA: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
19
|
+
export declare const SET_SCHEMA: 'jsonforms/SET_SCHEMA';
|
|
20
|
+
export declare const SET_UISCHEMA: 'jsonforms/SET_UISCHEMA';
|
|
21
|
+
export declare const SET_VALIDATION_MODE: 'jsonforms/SET_VALIDATION_MODE';
|
|
22
|
+
export declare const SET_LOCALE: 'jsonforms/SET_LOCALE';
|
|
23
|
+
export declare const SET_TRANSLATOR: 'jsonforms/SET_TRANSLATOR';
|
|
24
|
+
export declare const UPDATE_I18N: 'jsonforms/UPDATE_I18N';
|
|
25
|
+
export declare const ADD_DEFAULT_DATA: 'jsonforms/ADD_DEFAULT_DATA';
|
|
26
|
+
export declare const REMOVE_DEFAULT_DATA: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
27
|
+
export declare type CoreActions = InitAction | UpdateCoreAction | UpdateAction | UpdateErrorsAction | SetAjvAction | SetSchemaAction | SetUISchemaAction | SetValidationModeAction;
|
|
28
|
+
export interface UpdateAction {
|
|
29
|
+
type: 'jsonforms/UPDATE';
|
|
30
|
+
path: string;
|
|
31
|
+
updater(existingData?: any): any;
|
|
32
|
+
}
|
|
33
|
+
export interface UpdateErrorsAction {
|
|
34
|
+
type: 'jsonforms/UPDATE_ERRORS';
|
|
35
|
+
errors: ErrorObject[];
|
|
36
|
+
}
|
|
37
|
+
export interface InitAction {
|
|
38
|
+
type: 'jsonforms/INIT';
|
|
39
|
+
data: any;
|
|
40
|
+
schema: JsonSchema;
|
|
41
|
+
uischema: UISchemaElement;
|
|
42
|
+
options?: InitActionOptions | AJV;
|
|
43
|
+
}
|
|
44
|
+
export interface UpdateCoreAction {
|
|
45
|
+
type: 'jsonforms/UPDATE_CORE';
|
|
46
|
+
data?: any;
|
|
47
|
+
schema?: JsonSchema;
|
|
48
|
+
uischema?: UISchemaElement;
|
|
49
|
+
options?: InitActionOptions | AJV;
|
|
50
|
+
}
|
|
51
|
+
export interface InitActionOptions {
|
|
52
|
+
ajv?: AJV;
|
|
53
|
+
validationMode?: ValidationMode;
|
|
54
|
+
}
|
|
55
|
+
export interface SetValidationModeAction {
|
|
56
|
+
type: 'jsonforms/SET_VALIDATION_MODE';
|
|
57
|
+
validationMode: ValidationMode;
|
|
58
|
+
}
|
|
59
|
+
export declare const init: (data: any, schema?: JsonSchema, uischema?: UISchemaElement, options?: InitActionOptions | AJV) => {
|
|
60
|
+
type: "jsonforms/INIT";
|
|
61
|
+
data: any;
|
|
62
|
+
schema: JsonSchema;
|
|
63
|
+
uischema: UISchemaElement;
|
|
64
|
+
options: InitActionOptions | AJV;
|
|
65
|
+
};
|
|
66
|
+
export declare const updateCore: (data: any, schema: JsonSchema, uischema?: UISchemaElement, options?: AJV | InitActionOptions) => UpdateCoreAction;
|
|
67
|
+
export interface RegisterDefaultDataAction {
|
|
68
|
+
type: 'jsonforms/ADD_DEFAULT_DATA';
|
|
69
|
+
schemaPath: string;
|
|
70
|
+
data: any;
|
|
71
|
+
}
|
|
72
|
+
export declare const registerDefaultData: (schemaPath: string, data: any) => {
|
|
73
|
+
type: "jsonforms/ADD_DEFAULT_DATA";
|
|
74
|
+
schemaPath: string;
|
|
75
|
+
data: any;
|
|
76
|
+
};
|
|
77
|
+
export interface UnregisterDefaultDataAction {
|
|
78
|
+
type: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
79
|
+
schemaPath: string;
|
|
80
|
+
}
|
|
81
|
+
export declare const unregisterDefaultData: (schemaPath: string) => {
|
|
82
|
+
type: "jsonforms/REMOVE_DEFAULT_DATA";
|
|
83
|
+
schemaPath: string;
|
|
84
|
+
};
|
|
85
|
+
export interface SetAjvAction {
|
|
86
|
+
type: 'jsonforms/SET_AJV';
|
|
87
|
+
ajv: AJV;
|
|
88
|
+
}
|
|
89
|
+
export declare const setAjv: (ajv: AJV) => {
|
|
90
|
+
type: "jsonforms/SET_AJV";
|
|
91
|
+
ajv: AJV;
|
|
92
|
+
};
|
|
93
|
+
export declare const update: (path: string, updater: (existingData: any) => any) => UpdateAction;
|
|
94
|
+
export declare const updateErrors: (errors: ErrorObject[]) => UpdateErrorsAction;
|
|
95
|
+
export interface AddRendererAction {
|
|
96
|
+
type: 'jsonforms/ADD_RENDERER';
|
|
97
|
+
tester: RankedTester;
|
|
98
|
+
renderer: any;
|
|
99
|
+
}
|
|
100
|
+
export declare const registerRenderer: (tester: RankedTester, renderer: any) => {
|
|
101
|
+
type: "jsonforms/ADD_RENDERER";
|
|
102
|
+
tester: RankedTester;
|
|
103
|
+
renderer: any;
|
|
104
|
+
};
|
|
105
|
+
export interface AddCellRendererAction {
|
|
106
|
+
type: 'jsonforms/ADD_CELL';
|
|
107
|
+
tester: RankedTester;
|
|
108
|
+
cell: any;
|
|
109
|
+
}
|
|
110
|
+
export declare const registerCell: (tester: RankedTester, cell: any) => {
|
|
111
|
+
type: "jsonforms/ADD_CELL";
|
|
112
|
+
tester: RankedTester;
|
|
113
|
+
cell: any;
|
|
114
|
+
};
|
|
115
|
+
export interface RemoveCellRendererAction {
|
|
116
|
+
type: 'jsonforms/REMOVE_CELL';
|
|
117
|
+
tester: RankedTester;
|
|
118
|
+
cell: any;
|
|
119
|
+
}
|
|
120
|
+
export declare const unregisterCell: (tester: RankedTester, cell: any) => {
|
|
121
|
+
type: "jsonforms/REMOVE_CELL";
|
|
122
|
+
tester: RankedTester;
|
|
123
|
+
cell: any;
|
|
124
|
+
};
|
|
125
|
+
export interface RemoveRendererAction {
|
|
126
|
+
type: 'jsonforms/REMOVE_RENDERER';
|
|
127
|
+
tester: RankedTester;
|
|
128
|
+
renderer: any;
|
|
129
|
+
}
|
|
130
|
+
export declare const unregisterRenderer: (tester: RankedTester, renderer: any) => {
|
|
131
|
+
type: "jsonforms/REMOVE_RENDERER";
|
|
132
|
+
tester: RankedTester;
|
|
133
|
+
renderer: any;
|
|
134
|
+
};
|
|
135
|
+
export interface SetConfigAction {
|
|
136
|
+
type: 'jsonforms/SET_CONFIG';
|
|
137
|
+
config: any;
|
|
138
|
+
}
|
|
139
|
+
export declare const setConfig: (config: any) => SetConfigAction;
|
|
140
|
+
export declare const setValidationMode: (validationMode: ValidationMode) => SetValidationModeAction;
|
|
141
|
+
export declare type UISchemaActions = AddUISchemaAction | RemoveUISchemaAction;
|
|
142
|
+
export interface AddUISchemaAction {
|
|
143
|
+
type: 'jsonforms/ADD_UI_SCHEMA';
|
|
144
|
+
tester: UISchemaTester;
|
|
145
|
+
uischema: UISchemaElement;
|
|
146
|
+
}
|
|
147
|
+
export declare const registerUISchema: (tester: UISchemaTester, uischema: UISchemaElement) => AddUISchemaAction;
|
|
148
|
+
export interface RemoveUISchemaAction {
|
|
149
|
+
type: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
150
|
+
tester: UISchemaTester;
|
|
151
|
+
}
|
|
152
|
+
export declare const unregisterUISchema: (tester: UISchemaTester) => RemoveUISchemaAction;
|
|
153
|
+
export declare type I18nActions = SetLocaleAction | SetTranslatorAction | UpdateI18nAction;
|
|
154
|
+
export interface SetLocaleAction {
|
|
155
|
+
type: 'jsonforms/SET_LOCALE';
|
|
156
|
+
locale: string | undefined;
|
|
157
|
+
}
|
|
158
|
+
export declare const setLocale: (locale: string | undefined) => SetLocaleAction;
|
|
159
|
+
export interface SetSchemaAction {
|
|
160
|
+
type: 'jsonforms/SET_SCHEMA';
|
|
161
|
+
schema: JsonSchema;
|
|
162
|
+
}
|
|
163
|
+
export declare const setSchema: (schema: JsonSchema) => SetSchemaAction;
|
|
164
|
+
export interface SetTranslatorAction {
|
|
165
|
+
type: 'jsonforms/SET_TRANSLATOR';
|
|
166
|
+
translator?: Translator;
|
|
167
|
+
errorTranslator?: ErrorTranslator;
|
|
168
|
+
}
|
|
169
|
+
export declare const setTranslator: (translator?: Translator, errorTranslator?: ErrorTranslator) => SetTranslatorAction;
|
|
170
|
+
export interface UpdateI18nAction {
|
|
171
|
+
type: 'jsonforms/UPDATE_I18N';
|
|
172
|
+
locale: string | undefined;
|
|
173
|
+
translator: Translator | undefined;
|
|
174
|
+
errorTranslator: ErrorTranslator | undefined;
|
|
175
|
+
}
|
|
176
|
+
export declare const updateI18n: (locale: string | undefined, translator: Translator | undefined, errorTranslator: ErrorTranslator | undefined) => UpdateI18nAction;
|
|
177
|
+
export interface SetUISchemaAction {
|
|
178
|
+
type: 'jsonforms/SET_UISCHEMA';
|
|
179
|
+
uischema: UISchemaElement;
|
|
180
|
+
}
|
|
181
|
+
export declare const setUISchema: (uischema: UISchemaElement) => SetUISchemaAction;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
The MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2017-2019 EclipseSource Munich
|
|
6
|
+
https://github.com/eclipsesource/jsonforms
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.setUISchema = exports.updateI18n = exports.setTranslator = exports.setSchema = exports.setLocale = exports.unregisterUISchema = exports.registerUISchema = exports.setValidationMode = exports.setConfig = exports.unregisterRenderer = exports.unregisterCell = exports.registerCell = exports.registerRenderer = exports.updateErrors = exports.update = exports.setAjv = exports.unregisterDefaultData = exports.registerDefaultData = exports.updateCore = exports.init = exports.REMOVE_DEFAULT_DATA = exports.ADD_DEFAULT_DATA = exports.UPDATE_I18N = exports.SET_TRANSLATOR = exports.SET_LOCALE = exports.SET_VALIDATION_MODE = exports.SET_UISCHEMA = exports.SET_SCHEMA = exports.REMOVE_UI_SCHEMA = exports.ADD_UI_SCHEMA = exports.SET_CONFIG = exports.REMOVE_CELL = exports.ADD_CELL = exports.REMOVE_RENDERER = exports.ADD_RENDERER = exports.VALIDATE = exports.UPDATE_ERRORS = exports.UPDATE_DATA = exports.SET_AJV = exports.UPDATE_CORE = exports.INIT = void 0;
|
|
28
|
+
var generators_1 = require("../generators");
|
|
29
|
+
exports.INIT = 'jsonforms/INIT';
|
|
30
|
+
exports.UPDATE_CORE = "jsonforms/UPDATE_CORE";
|
|
31
|
+
exports.SET_AJV = 'jsonforms/SET_AJV';
|
|
32
|
+
exports.UPDATE_DATA = 'jsonforms/UPDATE';
|
|
33
|
+
exports.UPDATE_ERRORS = 'jsonforms/UPDATE_ERRORS';
|
|
34
|
+
exports.VALIDATE = 'jsonforms/VALIDATE';
|
|
35
|
+
exports.ADD_RENDERER = 'jsonforms/ADD_RENDERER';
|
|
36
|
+
exports.REMOVE_RENDERER = 'jsonforms/REMOVE_RENDERER';
|
|
37
|
+
exports.ADD_CELL = 'jsonforms/ADD_CELL';
|
|
38
|
+
exports.REMOVE_CELL = 'jsonforms/REMOVE_CELL';
|
|
39
|
+
exports.SET_CONFIG = 'jsonforms/SET_CONFIG';
|
|
40
|
+
exports.ADD_UI_SCHEMA = "jsonforms/ADD_UI_SCHEMA";
|
|
41
|
+
exports.REMOVE_UI_SCHEMA = "jsonforms/REMOVE_UI_SCHEMA";
|
|
42
|
+
exports.SET_SCHEMA = "jsonforms/SET_SCHEMA";
|
|
43
|
+
exports.SET_UISCHEMA = "jsonforms/SET_UISCHEMA";
|
|
44
|
+
exports.SET_VALIDATION_MODE = 'jsonforms/SET_VALIDATION_MODE';
|
|
45
|
+
exports.SET_LOCALE = "jsonforms/SET_LOCALE";
|
|
46
|
+
exports.SET_TRANSLATOR = 'jsonforms/SET_TRANSLATOR';
|
|
47
|
+
exports.UPDATE_I18N = 'jsonforms/UPDATE_I18N';
|
|
48
|
+
exports.ADD_DEFAULT_DATA = "jsonforms/ADD_DEFAULT_DATA";
|
|
49
|
+
exports.REMOVE_DEFAULT_DATA = "jsonforms/REMOVE_DEFAULT_DATA";
|
|
50
|
+
var init = function (data, schema, uischema, options) {
|
|
51
|
+
if (schema === void 0) { schema = generators_1.generateJsonSchema(data); }
|
|
52
|
+
return ({
|
|
53
|
+
type: exports.INIT,
|
|
54
|
+
data: data,
|
|
55
|
+
schema: schema,
|
|
56
|
+
uischema: typeof uischema === 'object' ? uischema : generators_1.generateDefaultUISchema(schema),
|
|
57
|
+
options: options
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
exports.init = init;
|
|
61
|
+
var updateCore = function (data, schema, uischema, options) { return ({
|
|
62
|
+
type: exports.UPDATE_CORE,
|
|
63
|
+
data: data,
|
|
64
|
+
schema: schema,
|
|
65
|
+
uischema: uischema,
|
|
66
|
+
options: options
|
|
67
|
+
}); };
|
|
68
|
+
exports.updateCore = updateCore;
|
|
69
|
+
var registerDefaultData = function (schemaPath, data) { return ({
|
|
70
|
+
type: exports.ADD_DEFAULT_DATA,
|
|
71
|
+
schemaPath: schemaPath,
|
|
72
|
+
data: data
|
|
73
|
+
}); };
|
|
74
|
+
exports.registerDefaultData = registerDefaultData;
|
|
75
|
+
var unregisterDefaultData = function (schemaPath) { return ({
|
|
76
|
+
type: exports.REMOVE_DEFAULT_DATA,
|
|
77
|
+
schemaPath: schemaPath
|
|
78
|
+
}); };
|
|
79
|
+
exports.unregisterDefaultData = unregisterDefaultData;
|
|
80
|
+
var setAjv = function (ajv) { return ({
|
|
81
|
+
type: exports.SET_AJV,
|
|
82
|
+
ajv: ajv
|
|
83
|
+
}); };
|
|
84
|
+
exports.setAjv = setAjv;
|
|
85
|
+
var update = function (path, updater) { return ({
|
|
86
|
+
type: exports.UPDATE_DATA,
|
|
87
|
+
path: path,
|
|
88
|
+
updater: updater
|
|
89
|
+
}); };
|
|
90
|
+
exports.update = update;
|
|
91
|
+
var updateErrors = function (errors) { return ({
|
|
92
|
+
type: exports.UPDATE_ERRORS,
|
|
93
|
+
errors: errors
|
|
94
|
+
}); };
|
|
95
|
+
exports.updateErrors = updateErrors;
|
|
96
|
+
var registerRenderer = function (tester, renderer) { return ({
|
|
97
|
+
type: exports.ADD_RENDERER,
|
|
98
|
+
tester: tester,
|
|
99
|
+
renderer: renderer
|
|
100
|
+
}); };
|
|
101
|
+
exports.registerRenderer = registerRenderer;
|
|
102
|
+
var registerCell = function (tester, cell) { return ({
|
|
103
|
+
type: exports.ADD_CELL,
|
|
104
|
+
tester: tester,
|
|
105
|
+
cell: cell
|
|
106
|
+
}); };
|
|
107
|
+
exports.registerCell = registerCell;
|
|
108
|
+
var unregisterCell = function (tester, cell) { return ({
|
|
109
|
+
type: exports.REMOVE_CELL,
|
|
110
|
+
tester: tester,
|
|
111
|
+
cell: cell
|
|
112
|
+
}); };
|
|
113
|
+
exports.unregisterCell = unregisterCell;
|
|
114
|
+
var unregisterRenderer = function (tester, renderer) { return ({
|
|
115
|
+
type: exports.REMOVE_RENDERER,
|
|
116
|
+
tester: tester,
|
|
117
|
+
renderer: renderer
|
|
118
|
+
}); };
|
|
119
|
+
exports.unregisterRenderer = unregisterRenderer;
|
|
120
|
+
var setConfig = function (config) { return ({
|
|
121
|
+
type: exports.SET_CONFIG,
|
|
122
|
+
config: config
|
|
123
|
+
}); };
|
|
124
|
+
exports.setConfig = setConfig;
|
|
125
|
+
var setValidationMode = function (validationMode) { return ({
|
|
126
|
+
type: exports.SET_VALIDATION_MODE,
|
|
127
|
+
validationMode: validationMode
|
|
128
|
+
}); };
|
|
129
|
+
exports.setValidationMode = setValidationMode;
|
|
130
|
+
var registerUISchema = function (tester, uischema) {
|
|
131
|
+
return {
|
|
132
|
+
type: exports.ADD_UI_SCHEMA,
|
|
133
|
+
tester: tester,
|
|
134
|
+
uischema: uischema
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
exports.registerUISchema = registerUISchema;
|
|
138
|
+
var unregisterUISchema = function (tester) {
|
|
139
|
+
return {
|
|
140
|
+
type: exports.REMOVE_UI_SCHEMA,
|
|
141
|
+
tester: tester
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
exports.unregisterUISchema = unregisterUISchema;
|
|
145
|
+
var setLocale = function (locale) { return ({
|
|
146
|
+
type: exports.SET_LOCALE,
|
|
147
|
+
locale: locale
|
|
148
|
+
}); };
|
|
149
|
+
exports.setLocale = setLocale;
|
|
150
|
+
var setSchema = function (schema) { return ({
|
|
151
|
+
type: exports.SET_SCHEMA,
|
|
152
|
+
schema: schema
|
|
153
|
+
}); };
|
|
154
|
+
exports.setSchema = setSchema;
|
|
155
|
+
var setTranslator = function (translator, errorTranslator) { return ({
|
|
156
|
+
type: exports.SET_TRANSLATOR,
|
|
157
|
+
translator: translator,
|
|
158
|
+
errorTranslator: errorTranslator
|
|
159
|
+
}); };
|
|
160
|
+
exports.setTranslator = setTranslator;
|
|
161
|
+
var updateI18n = function (locale, translator, errorTranslator) { return ({
|
|
162
|
+
type: exports.UPDATE_I18N,
|
|
163
|
+
locale: locale,
|
|
164
|
+
translator: translator,
|
|
165
|
+
errorTranslator: errorTranslator
|
|
166
|
+
}); };
|
|
167
|
+
exports.updateI18n = updateI18n;
|
|
168
|
+
var setUISchema = function (uischema) { return ({
|
|
169
|
+
type: exports.SET_UISCHEMA,
|
|
170
|
+
uischema: uischema
|
|
171
|
+
}); };
|
|
172
|
+
exports.setUISchema = setUISchema;
|
|
173
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions/actions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;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ACL,IAAI,EAAE,wBAAgB;QACtB,MAAM,QAAA;KACP,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B;AAYK,IAAM,SAAS,GAAG,UAAC,MAA0B,IAAsB,OAAA,CAAC;IACzE,IAAI,EAAE,kBAAU;IAChB,MAAM,QAAA;CACP,CAAC,EAHwE,CAGxE,CAAC;AAHU,QAAA,SAAS,aAGnB;AAOI,IAAM,SAAS,GAAG,UAAC,MAAkB,IAAsB,OAAA,CAAC;IACjE,IAAI,EAAE,kBAAU;IAChB,MAAM,QAAA;CACP,CAAC,EAHgE,CAGhE,CAAC;AAHU,QAAA,SAAS,aAGnB;AAQI,IAAM,aAAa,GAAG,UAC3B,UAAuB,EACvB,eAAiC,IACT,OAAA,CAAC;IACzB,IAAI,EAAE,sBAAc;IACpB,UAAU,YAAA;IACV,eAAe,iBAAA;CAChB,CAAC,EAJwB,CAIxB,CAAC;AAPU,QAAA,aAAa,iBAOvB;AASI,IAAM,UAAU,GAAG,UACxB,MAA0B,EAC1B,UAAkC,EAClC,eAA4C,IACvB,OAAA,CAAC;IACtB,IAAI,EAAE,mBAAW;IACjB,MAAM,QAAA;IACN,UAAU,YAAA;IACV,eAAe,iBAAA;CAChB,CAAC,EALqB,CAKrB,CAAC;AATU,QAAA,UAAU,cASpB;AAOI,IAAM,WAAW,GAAG,UAAC,QAAyB,IAAwB,OAAA,CAAC;IAC5E,IAAI,EAAE,oBAAY;IAClB,QAAQ,UAAA;CACT,CAAC,EAH2E,CAG3E,CAAC;AAHU,QAAA,WAAW,eAGrB"}
|
package/lib/actions/index.d.ts
CHANGED
|
@@ -1,180 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { JsonSchema, UISchemaElement } from '../';
|
|
3
|
-
import { RankedTester } from '../testers';
|
|
4
|
-
import RefParser from 'json-schema-ref-parser';
|
|
5
|
-
import { UISchemaTester } from '../reducers/uischemas';
|
|
6
|
-
import { ValidationMode } from '../reducers/core';
|
|
7
|
-
export declare const INIT: 'jsonforms/INIT';
|
|
8
|
-
export declare const UPDATE_CORE: 'jsonforms/UPDATE_CORE';
|
|
9
|
-
export declare const SET_AJV: 'jsonforms/SET_AJV';
|
|
10
|
-
export declare const UPDATE_DATA: 'jsonforms/UPDATE';
|
|
11
|
-
export declare const UPDATE_ERRORS: 'jsonforms/UPDATE_ERRORS';
|
|
12
|
-
export declare const VALIDATE: 'jsonforms/VALIDATE';
|
|
13
|
-
export declare const ADD_RENDERER: 'jsonforms/ADD_RENDERER';
|
|
14
|
-
export declare const REMOVE_RENDERER: 'jsonforms/REMOVE_RENDERER';
|
|
15
|
-
export declare const ADD_CELL: 'jsonforms/ADD_CELL';
|
|
16
|
-
export declare const REMOVE_CELL: 'jsonforms/REMOVE_CELL';
|
|
17
|
-
export declare const SET_CONFIG: 'jsonforms/SET_CONFIG';
|
|
18
|
-
export declare const ADD_UI_SCHEMA: 'jsonforms/ADD_UI_SCHEMA';
|
|
19
|
-
export declare const REMOVE_UI_SCHEMA: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
20
|
-
export declare const SET_SCHEMA: 'jsonforms/SET_SCHEMA';
|
|
21
|
-
export declare const SET_UISCHEMA: 'jsonforms/SET_UISCHEMA';
|
|
22
|
-
export declare const SET_VALIDATION_MODE: 'jsonforms/SET_VALIDATION_MODE';
|
|
23
|
-
export declare const SET_LOCALE: 'jsonforms/SET_LOCALE';
|
|
24
|
-
export declare const SET_LOCALIZED_SCHEMAS: 'jsonforms/SET_LOCALIZED_SCHEMAS';
|
|
25
|
-
export declare const SET_LOCALIZED_UISCHEMAS: 'jsonforms/SET_LOCALIZED_UISCHEMAS';
|
|
26
|
-
export declare const ADD_DEFAULT_DATA: 'jsonforms/ADD_DEFAULT_DATA';
|
|
27
|
-
export declare const REMOVE_DEFAULT_DATA: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
28
|
-
export declare type CoreActions = InitAction | UpdateCoreAction | UpdateAction | UpdateErrorsAction | SetAjvAction | SetSchemaAction | SetUISchemaAction | SetValidationModeAction;
|
|
29
|
-
export interface UpdateAction {
|
|
30
|
-
type: 'jsonforms/UPDATE';
|
|
31
|
-
path: string;
|
|
32
|
-
updater(existingData?: any): any;
|
|
33
|
-
}
|
|
34
|
-
export interface UpdateErrorsAction {
|
|
35
|
-
type: 'jsonforms/UPDATE_ERRORS';
|
|
36
|
-
errors: ErrorObject[];
|
|
37
|
-
}
|
|
38
|
-
export interface InitAction {
|
|
39
|
-
type: 'jsonforms/INIT';
|
|
40
|
-
data: any;
|
|
41
|
-
schema: JsonSchema;
|
|
42
|
-
uischema: UISchemaElement;
|
|
43
|
-
options?: InitActionOptions | AJV.Ajv;
|
|
44
|
-
}
|
|
45
|
-
export interface UpdateCoreAction {
|
|
46
|
-
type: 'jsonforms/UPDATE_CORE';
|
|
47
|
-
data?: any;
|
|
48
|
-
schema?: JsonSchema;
|
|
49
|
-
uischema?: UISchemaElement;
|
|
50
|
-
options?: InitActionOptions | AJV.Ajv;
|
|
51
|
-
}
|
|
52
|
-
export interface InitActionOptions {
|
|
53
|
-
ajv?: AJV.Ajv;
|
|
54
|
-
refParserOptions?: RefParser.Options;
|
|
55
|
-
validationMode?: ValidationMode;
|
|
56
|
-
}
|
|
57
|
-
export interface SetValidationModeAction {
|
|
58
|
-
type: 'jsonforms/SET_VALIDATION_MODE';
|
|
59
|
-
validationMode: ValidationMode;
|
|
60
|
-
}
|
|
61
|
-
export declare const init: (data: any, schema?: JsonSchema, uischema?: UISchemaElement, options?: AJV.Ajv | InitActionOptions) => {
|
|
62
|
-
type: "jsonforms/INIT";
|
|
63
|
-
data: any;
|
|
64
|
-
schema: JsonSchema;
|
|
65
|
-
uischema: UISchemaElement;
|
|
66
|
-
options: AJV.Ajv | InitActionOptions;
|
|
67
|
-
};
|
|
68
|
-
export declare const updateCore: (data: any, schema: JsonSchema, uischema?: UISchemaElement, options?: AJV.Ajv | InitActionOptions) => UpdateCoreAction;
|
|
69
|
-
export interface RegisterDefaultDataAction {
|
|
70
|
-
type: 'jsonforms/ADD_DEFAULT_DATA';
|
|
71
|
-
schemaPath: string;
|
|
72
|
-
data: any;
|
|
73
|
-
}
|
|
74
|
-
export declare const registerDefaultData: (schemaPath: string, data: any) => {
|
|
75
|
-
type: "jsonforms/ADD_DEFAULT_DATA";
|
|
76
|
-
schemaPath: string;
|
|
77
|
-
data: any;
|
|
78
|
-
};
|
|
79
|
-
export interface UnregisterDefaultDataAction {
|
|
80
|
-
type: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
81
|
-
schemaPath: string;
|
|
82
|
-
}
|
|
83
|
-
export declare const unregisterDefaultData: (schemaPath: string) => {
|
|
84
|
-
type: "jsonforms/REMOVE_DEFAULT_DATA";
|
|
85
|
-
schemaPath: string;
|
|
86
|
-
};
|
|
87
|
-
export interface SetAjvAction {
|
|
88
|
-
type: 'jsonforms/SET_AJV';
|
|
89
|
-
ajv: AJV.Ajv;
|
|
90
|
-
}
|
|
91
|
-
export declare const setAjv: (ajv: AJV.Ajv) => {
|
|
92
|
-
type: "jsonforms/SET_AJV";
|
|
93
|
-
ajv: AJV.Ajv;
|
|
94
|
-
};
|
|
95
|
-
export declare const update: (path: string, updater: (existingData: any) => any) => UpdateAction;
|
|
96
|
-
export declare const updateErrors: (errors: AJV.ErrorObject[]) => UpdateErrorsAction;
|
|
97
|
-
export interface AddRendererAction {
|
|
98
|
-
type: 'jsonforms/ADD_RENDERER';
|
|
99
|
-
tester: RankedTester;
|
|
100
|
-
renderer: any;
|
|
101
|
-
}
|
|
102
|
-
export declare const registerRenderer: (tester: RankedTester, renderer: any) => {
|
|
103
|
-
type: "jsonforms/ADD_RENDERER";
|
|
104
|
-
tester: RankedTester;
|
|
105
|
-
renderer: any;
|
|
106
|
-
};
|
|
107
|
-
export interface AddCellRendererAction {
|
|
108
|
-
type: 'jsonforms/ADD_CELL';
|
|
109
|
-
tester: RankedTester;
|
|
110
|
-
cell: any;
|
|
111
|
-
}
|
|
112
|
-
export declare const registerCell: (tester: RankedTester, cell: any) => {
|
|
113
|
-
type: "jsonforms/ADD_CELL";
|
|
114
|
-
tester: RankedTester;
|
|
115
|
-
cell: any;
|
|
116
|
-
};
|
|
117
|
-
export interface RemoveCellRendererAction {
|
|
118
|
-
type: 'jsonforms/REMOVE_CELL';
|
|
119
|
-
tester: RankedTester;
|
|
120
|
-
cell: any;
|
|
121
|
-
}
|
|
122
|
-
export declare const unregisterCell: (tester: RankedTester, cell: any) => {
|
|
123
|
-
type: "jsonforms/REMOVE_CELL";
|
|
124
|
-
tester: RankedTester;
|
|
125
|
-
cell: any;
|
|
126
|
-
};
|
|
127
|
-
export interface RemoveRendererAction {
|
|
128
|
-
type: 'jsonforms/REMOVE_RENDERER';
|
|
129
|
-
tester: RankedTester;
|
|
130
|
-
renderer: any;
|
|
131
|
-
}
|
|
132
|
-
export declare const unregisterRenderer: (tester: RankedTester, renderer: any) => {
|
|
133
|
-
type: "jsonforms/REMOVE_RENDERER";
|
|
134
|
-
tester: RankedTester;
|
|
135
|
-
renderer: any;
|
|
136
|
-
};
|
|
137
|
-
export interface SetConfigAction {
|
|
138
|
-
type: 'jsonforms/SET_CONFIG';
|
|
139
|
-
config: any;
|
|
140
|
-
}
|
|
141
|
-
export declare const setConfig: (config: any) => SetConfigAction;
|
|
142
|
-
export declare const setValidationMode: (validationMode: ValidationMode) => SetValidationModeAction;
|
|
143
|
-
export declare type UISchemaActions = AddUISchemaAction | RemoveUISchemaAction;
|
|
144
|
-
export interface AddUISchemaAction {
|
|
145
|
-
type: 'jsonforms/ADD_UI_SCHEMA';
|
|
146
|
-
tester: UISchemaTester;
|
|
147
|
-
uischema: UISchemaElement;
|
|
148
|
-
}
|
|
149
|
-
export declare const registerUISchema: (tester: UISchemaTester, uischema: UISchemaElement) => AddUISchemaAction;
|
|
150
|
-
export interface RemoveUISchemaAction {
|
|
151
|
-
type: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
152
|
-
tester: UISchemaTester;
|
|
153
|
-
}
|
|
154
|
-
export declare const unregisterUISchema: (tester: UISchemaTester) => RemoveUISchemaAction;
|
|
155
|
-
export declare type LocaleActions = SetLocaleAction | SetLocalizedSchemasAction | SetLocalizedUISchemasAction;
|
|
156
|
-
export interface SetLocaleAction {
|
|
157
|
-
type: 'jsonforms/SET_LOCALE';
|
|
158
|
-
locale: string;
|
|
159
|
-
}
|
|
160
|
-
export declare const setLocale: (locale: string) => SetLocaleAction;
|
|
161
|
-
export interface SetLocalizedSchemasAction {
|
|
162
|
-
type: 'jsonforms/SET_LOCALIZED_SCHEMAS';
|
|
163
|
-
localizedSchemas: Map<string, JsonSchema>;
|
|
164
|
-
}
|
|
165
|
-
export declare const setLocalizedSchemas: (localizedSchemas: Map<string, JsonSchema>) => SetLocalizedSchemasAction;
|
|
166
|
-
export interface SetSchemaAction {
|
|
167
|
-
type: 'jsonforms/SET_SCHEMA';
|
|
168
|
-
schema: JsonSchema;
|
|
169
|
-
}
|
|
170
|
-
export declare const setSchema: (schema: JsonSchema) => SetSchemaAction;
|
|
171
|
-
export interface SetLocalizedUISchemasAction {
|
|
172
|
-
type: 'jsonforms/SET_LOCALIZED_UISCHEMAS';
|
|
173
|
-
localizedUISchemas: Map<string, UISchemaElement>;
|
|
174
|
-
}
|
|
175
|
-
export declare const setLocalizedUISchemas: (localizedUISchemas: Map<string, UISchemaElement>) => SetLocalizedUISchemasAction;
|
|
176
|
-
export interface SetUISchemaAction {
|
|
177
|
-
type: 'jsonforms/SET_UISCHEMA';
|
|
178
|
-
uischema: UISchemaElement;
|
|
179
|
-
}
|
|
180
|
-
export declare const setUISchema: (uischema: UISchemaElement) => SetUISchemaAction;
|
|
1
|
+
export * from './actions';
|