@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
package/src/actions/index.ts
CHANGED
|
@@ -22,316 +22,5 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import AJV, { ErrorObject } from 'ajv';
|
|
26
|
-
import { JsonSchema, UISchemaElement } from '../';
|
|
27
|
-
import { generateDefaultUISchema, generateJsonSchema } from '../generators';
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
import RefParser from 'json-schema-ref-parser';
|
|
31
|
-
import { UISchemaTester } from '../reducers/uischemas';
|
|
32
|
-
import { ValidationMode } from '../reducers/core';
|
|
33
|
-
|
|
34
|
-
export const INIT: 'jsonforms/INIT' = 'jsonforms/INIT';
|
|
35
|
-
export const UPDATE_CORE: 'jsonforms/UPDATE_CORE' = `jsonforms/UPDATE_CORE`;
|
|
36
|
-
export const SET_AJV: 'jsonforms/SET_AJV' = 'jsonforms/SET_AJV';
|
|
37
|
-
export const UPDATE_DATA: 'jsonforms/UPDATE' = 'jsonforms/UPDATE';
|
|
38
|
-
export const UPDATE_ERRORS: 'jsonforms/UPDATE_ERRORS' =
|
|
39
|
-
'jsonforms/UPDATE_ERRORS';
|
|
40
|
-
export const VALIDATE: 'jsonforms/VALIDATE' = 'jsonforms/VALIDATE';
|
|
41
|
-
export const ADD_RENDERER: 'jsonforms/ADD_RENDERER' = 'jsonforms/ADD_RENDERER';
|
|
42
|
-
export const REMOVE_RENDERER: 'jsonforms/REMOVE_RENDERER' =
|
|
43
|
-
'jsonforms/REMOVE_RENDERER';
|
|
44
|
-
export const ADD_CELL: 'jsonforms/ADD_CELL' = 'jsonforms/ADD_CELL';
|
|
45
|
-
export const REMOVE_CELL: 'jsonforms/REMOVE_CELL' = 'jsonforms/REMOVE_CELL';
|
|
46
|
-
export const SET_CONFIG: 'jsonforms/SET_CONFIG' = 'jsonforms/SET_CONFIG';
|
|
47
|
-
export const ADD_UI_SCHEMA: 'jsonforms/ADD_UI_SCHEMA' = `jsonforms/ADD_UI_SCHEMA`;
|
|
48
|
-
export const REMOVE_UI_SCHEMA: 'jsonforms/REMOVE_UI_SCHEMA' = `jsonforms/REMOVE_UI_SCHEMA`;
|
|
49
|
-
export const SET_SCHEMA: 'jsonforms/SET_SCHEMA' = `jsonforms/SET_SCHEMA`;
|
|
50
|
-
export const SET_UISCHEMA: 'jsonforms/SET_UISCHEMA' = `jsonforms/SET_UISCHEMA`;
|
|
51
|
-
export const SET_VALIDATION_MODE: 'jsonforms/SET_VALIDATION_MODE' =
|
|
52
|
-
'jsonforms/SET_VALIDATION_MODE';
|
|
53
|
-
|
|
54
|
-
export const SET_LOCALE: 'jsonforms/SET_LOCALE' = `jsonforms/SET_LOCALE`;
|
|
55
|
-
export const SET_LOCALIZED_SCHEMAS: 'jsonforms/SET_LOCALIZED_SCHEMAS' =
|
|
56
|
-
'jsonforms/SET_LOCALIZED_SCHEMAS';
|
|
57
|
-
export const SET_LOCALIZED_UISCHEMAS: 'jsonforms/SET_LOCALIZED_UISCHEMAS' =
|
|
58
|
-
'jsonforms/SET_LOCALIZED_UISCHEMAS';
|
|
59
|
-
|
|
60
|
-
export const ADD_DEFAULT_DATA: 'jsonforms/ADD_DEFAULT_DATA' = `jsonforms/ADD_DEFAULT_DATA`;
|
|
61
|
-
export const REMOVE_DEFAULT_DATA: 'jsonforms/REMOVE_DEFAULT_DATA' = `jsonforms/REMOVE_DEFAULT_DATA`;
|
|
62
|
-
|
|
63
|
-
export type CoreActions =
|
|
64
|
-
| InitAction
|
|
65
|
-
| UpdateCoreAction
|
|
66
|
-
| UpdateAction
|
|
67
|
-
| UpdateErrorsAction
|
|
68
|
-
| SetAjvAction
|
|
69
|
-
| SetSchemaAction
|
|
70
|
-
| SetUISchemaAction
|
|
71
|
-
| SetValidationModeAction;
|
|
72
|
-
|
|
73
|
-
export interface UpdateAction {
|
|
74
|
-
type: 'jsonforms/UPDATE';
|
|
75
|
-
path: string;
|
|
76
|
-
updater(existingData?: any): any;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface UpdateErrorsAction {
|
|
80
|
-
type: 'jsonforms/UPDATE_ERRORS';
|
|
81
|
-
errors: ErrorObject[];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface InitAction {
|
|
85
|
-
type: 'jsonforms/INIT';
|
|
86
|
-
data: any;
|
|
87
|
-
schema: JsonSchema;
|
|
88
|
-
uischema: UISchemaElement;
|
|
89
|
-
options?: InitActionOptions | AJV.Ajv;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface UpdateCoreAction {
|
|
93
|
-
type: 'jsonforms/UPDATE_CORE';
|
|
94
|
-
data?: any;
|
|
95
|
-
schema?: JsonSchema;
|
|
96
|
-
uischema?: UISchemaElement;
|
|
97
|
-
options?: InitActionOptions | AJV.Ajv;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface InitActionOptions {
|
|
101
|
-
ajv?: AJV.Ajv;
|
|
102
|
-
refParserOptions?: RefParser.Options;
|
|
103
|
-
validationMode?: ValidationMode;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export interface SetValidationModeAction {
|
|
107
|
-
type: 'jsonforms/SET_VALIDATION_MODE'
|
|
108
|
-
validationMode: ValidationMode
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export const init = (
|
|
112
|
-
data: any,
|
|
113
|
-
schema: JsonSchema = generateJsonSchema(data),
|
|
114
|
-
uischema?: UISchemaElement,
|
|
115
|
-
options?: InitActionOptions | AJV.Ajv
|
|
116
|
-
) => ({
|
|
117
|
-
type: INIT,
|
|
118
|
-
data,
|
|
119
|
-
schema,
|
|
120
|
-
uischema:
|
|
121
|
-
typeof uischema === 'object' ? uischema : generateDefaultUISchema(schema),
|
|
122
|
-
options
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
export const updateCore = (
|
|
126
|
-
data: any,
|
|
127
|
-
schema: JsonSchema,
|
|
128
|
-
uischema?: UISchemaElement,
|
|
129
|
-
options?: AJV.Ajv | InitActionOptions
|
|
130
|
-
): UpdateCoreAction => ({
|
|
131
|
-
type: UPDATE_CORE,
|
|
132
|
-
data,
|
|
133
|
-
schema,
|
|
134
|
-
uischema,
|
|
135
|
-
options
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
export interface RegisterDefaultDataAction {
|
|
139
|
-
type: 'jsonforms/ADD_DEFAULT_DATA';
|
|
140
|
-
schemaPath: string;
|
|
141
|
-
data: any;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export const registerDefaultData = (schemaPath: string, data: any) => ({
|
|
145
|
-
type: ADD_DEFAULT_DATA,
|
|
146
|
-
schemaPath,
|
|
147
|
-
data
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
export interface UnregisterDefaultDataAction {
|
|
151
|
-
type: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
152
|
-
schemaPath: string;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export const unregisterDefaultData = (schemaPath: string) => ({
|
|
156
|
-
type: REMOVE_DEFAULT_DATA,
|
|
157
|
-
schemaPath
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
export interface SetAjvAction {
|
|
161
|
-
type: 'jsonforms/SET_AJV';
|
|
162
|
-
ajv: AJV.Ajv;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export const setAjv = (ajv: AJV.Ajv) => ({
|
|
166
|
-
type: SET_AJV,
|
|
167
|
-
ajv
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
export const update = (
|
|
171
|
-
path: string,
|
|
172
|
-
updater: (existingData: any) => any
|
|
173
|
-
): UpdateAction => ({
|
|
174
|
-
type: UPDATE_DATA,
|
|
175
|
-
path,
|
|
176
|
-
updater
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
export const updateErrors = (errors: ErrorObject[]): UpdateErrorsAction => ({
|
|
180
|
-
type: UPDATE_ERRORS,
|
|
181
|
-
errors
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
export interface AddRendererAction {
|
|
185
|
-
type: 'jsonforms/ADD_RENDERER';
|
|
186
|
-
tester: RankedTester;
|
|
187
|
-
renderer: any;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export const registerRenderer = (tester: RankedTester, renderer: any) => ({
|
|
191
|
-
type: ADD_RENDERER,
|
|
192
|
-
tester,
|
|
193
|
-
renderer
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
export interface AddCellRendererAction {
|
|
197
|
-
type: 'jsonforms/ADD_CELL';
|
|
198
|
-
tester: RankedTester;
|
|
199
|
-
cell: any;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export const registerCell = (tester: RankedTester, cell: any) => ({
|
|
203
|
-
type: ADD_CELL,
|
|
204
|
-
tester,
|
|
205
|
-
cell
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
export interface RemoveCellRendererAction {
|
|
209
|
-
type: 'jsonforms/REMOVE_CELL';
|
|
210
|
-
tester: RankedTester;
|
|
211
|
-
cell: any;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
export const unregisterCell = (tester: RankedTester, cell: any) => ({
|
|
215
|
-
type: REMOVE_CELL,
|
|
216
|
-
tester,
|
|
217
|
-
cell
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
export interface RemoveRendererAction {
|
|
221
|
-
type: 'jsonforms/REMOVE_RENDERER';
|
|
222
|
-
tester: RankedTester;
|
|
223
|
-
renderer: any;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export const unregisterRenderer = (tester: RankedTester, renderer: any) => ({
|
|
227
|
-
type: REMOVE_RENDERER,
|
|
228
|
-
tester,
|
|
229
|
-
renderer
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
export interface SetConfigAction {
|
|
233
|
-
type: 'jsonforms/SET_CONFIG';
|
|
234
|
-
config: any;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export const setConfig = (config: any): SetConfigAction => ({
|
|
238
|
-
type: SET_CONFIG,
|
|
239
|
-
config
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
export const setValidationMode = (validationMode: ValidationMode): SetValidationModeAction => ({
|
|
243
|
-
type: SET_VALIDATION_MODE,
|
|
244
|
-
validationMode
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
export type UISchemaActions = AddUISchemaAction | RemoveUISchemaAction;
|
|
248
|
-
|
|
249
|
-
export interface AddUISchemaAction {
|
|
250
|
-
type: 'jsonforms/ADD_UI_SCHEMA';
|
|
251
|
-
tester: UISchemaTester;
|
|
252
|
-
uischema: UISchemaElement;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export const registerUISchema = (
|
|
256
|
-
tester: UISchemaTester,
|
|
257
|
-
uischema: UISchemaElement
|
|
258
|
-
): AddUISchemaAction => {
|
|
259
|
-
return {
|
|
260
|
-
type: ADD_UI_SCHEMA,
|
|
261
|
-
tester,
|
|
262
|
-
uischema
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export interface RemoveUISchemaAction {
|
|
267
|
-
type: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
268
|
-
tester: UISchemaTester;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export const unregisterUISchema = (
|
|
272
|
-
tester: UISchemaTester
|
|
273
|
-
): RemoveUISchemaAction => {
|
|
274
|
-
return {
|
|
275
|
-
type: REMOVE_UI_SCHEMA,
|
|
276
|
-
tester
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
export type LocaleActions =
|
|
281
|
-
| SetLocaleAction
|
|
282
|
-
| SetLocalizedSchemasAction
|
|
283
|
-
| SetLocalizedUISchemasAction;
|
|
284
|
-
|
|
285
|
-
export interface SetLocaleAction {
|
|
286
|
-
type: 'jsonforms/SET_LOCALE';
|
|
287
|
-
locale: string;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export const setLocale = (locale: string): SetLocaleAction => ({
|
|
291
|
-
type: SET_LOCALE,
|
|
292
|
-
locale
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
export interface SetLocalizedSchemasAction {
|
|
296
|
-
type: 'jsonforms/SET_LOCALIZED_SCHEMAS';
|
|
297
|
-
localizedSchemas: Map<string, JsonSchema>;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export const setLocalizedSchemas = (
|
|
301
|
-
localizedSchemas: Map<string, JsonSchema>
|
|
302
|
-
): SetLocalizedSchemasAction => ({
|
|
303
|
-
type: SET_LOCALIZED_SCHEMAS,
|
|
304
|
-
localizedSchemas
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
export interface SetSchemaAction {
|
|
308
|
-
type: 'jsonforms/SET_SCHEMA';
|
|
309
|
-
schema: JsonSchema;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export const setSchema = (schema: JsonSchema): SetSchemaAction => ({
|
|
313
|
-
type: SET_SCHEMA,
|
|
314
|
-
schema
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
export interface SetLocalizedUISchemasAction {
|
|
318
|
-
type: 'jsonforms/SET_LOCALIZED_UISCHEMAS';
|
|
319
|
-
localizedUISchemas: Map<string, UISchemaElement>;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export const setLocalizedUISchemas = (
|
|
323
|
-
localizedUISchemas: Map<string, UISchemaElement>
|
|
324
|
-
): SetLocalizedUISchemasAction => ({
|
|
325
|
-
type: SET_LOCALIZED_UISCHEMAS,
|
|
326
|
-
localizedUISchemas
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
export interface SetUISchemaAction {
|
|
330
|
-
type: 'jsonforms/SET_UISCHEMA';
|
|
331
|
-
uischema: UISchemaElement;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export const setUISchema = (uischema: UISchemaElement): SetUISchemaAction => ({
|
|
335
|
-
type: SET_UISCHEMA,
|
|
336
|
-
uischema
|
|
337
|
-
});
|
|
26
|
+
export * from './actions';
|
package/src/configDefault.ts
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2017-2019 EclipseSource Munich
|
|
5
|
+
https://github.com/eclipsesource/jsonforms
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { generateJsonSchema } from './schema';
|
|
27
|
+
import { createControlElement, generateDefaultUISchema } from './uischema';
|
|
28
|
+
import { ControlElement, JsonSchema, UISchemaElement } from '../';
|
|
29
|
+
|
|
30
|
+
export const Generate: {
|
|
31
|
+
jsonSchema(instance: Object, options?: any): JsonSchema;
|
|
32
|
+
uiSchema(
|
|
33
|
+
jsonSchema: JsonSchema,
|
|
34
|
+
layoutType?: string,
|
|
35
|
+
prefix?: string,
|
|
36
|
+
rootSchema?: JsonSchema
|
|
37
|
+
): UISchemaElement;
|
|
38
|
+
controlElement(ref: string): ControlElement;
|
|
39
|
+
} = {
|
|
40
|
+
jsonSchema: generateJsonSchema,
|
|
41
|
+
uiSchema: generateDefaultUISchema,
|
|
42
|
+
controlElement: createControlElement
|
|
43
|
+
};
|
package/src/generators/index.ts
CHANGED
|
@@ -22,25 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { ControlElement, JsonSchema, UISchemaElement } from '../';
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export const Generate: {
|
|
31
|
-
jsonSchema(instance: Object, options?: any): JsonSchema;
|
|
32
|
-
uiSchema(
|
|
33
|
-
jsonSchema: JsonSchema,
|
|
34
|
-
layoutType?: string,
|
|
35
|
-
prefix?: string,
|
|
36
|
-
rootSchema?: JsonSchema
|
|
37
|
-
): UISchemaElement;
|
|
38
|
-
controlElement(ref: string): ControlElement;
|
|
39
|
-
} = {
|
|
40
|
-
jsonSchema: generateJsonSchema,
|
|
41
|
-
uiSchema: generateDefaultUISchema,
|
|
42
|
-
controlElement: createControlElement
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { generateJsonSchema };
|
|
46
|
-
export { generateDefaultUISchema };
|
|
26
|
+
export * from './Generate';
|
|
27
|
+
export * from './schema';
|
|
28
|
+
export * from './uischema';
|
package/src/generators/schema.ts
CHANGED
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
+
|
|
25
26
|
import isEmpty from 'lodash/isEmpty';
|
|
26
27
|
import startCase from 'lodash/startCase';
|
|
27
28
|
import keys from 'lodash/keys';
|
|
28
|
-
import { JsonSchema } from '../models/jsonSchema';
|
|
29
29
|
import {
|
|
30
30
|
ControlElement,
|
|
31
31
|
isGroup,
|
|
32
32
|
isLayout,
|
|
33
|
+
JsonSchema,
|
|
33
34
|
LabelElement,
|
|
34
35
|
Layout,
|
|
35
36
|
UISchemaElement
|
|
36
|
-
} from '../models
|
|
37
|
-
import { resolveSchema } from '../util
|
|
38
|
-
import { deriveTypes } from '../util';
|
|
37
|
+
} from '../models';
|
|
38
|
+
import { deriveTypes, resolveSchema } from '../util';
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Creates a new ILayout.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ErrorObject } from 'ajv';
|
|
2
|
+
import { JsonSchema, UISchemaElement } from '../models';
|
|
3
|
+
|
|
4
|
+
export type Translator = {
|
|
5
|
+
(id: string, defaultMessage: string, values?: any): string;
|
|
6
|
+
(id: string, defaultMessage: undefined, values?: any): string | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type ErrorTranslator = (error: ErrorObject, translate: Translator, uischema?: UISchemaElement) => string;
|
|
10
|
+
|
|
11
|
+
export interface JsonFormsI18nState {
|
|
12
|
+
locale?: string;
|
|
13
|
+
translate?: Translator;
|
|
14
|
+
translateError?: ErrorTranslator;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type i18nJsonSchema = JsonSchema & {i18n?: string};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ErrorObject } from 'ajv';
|
|
2
|
+
import { UISchemaElement } from '../models';
|
|
3
|
+
import { formatErrorMessage } from '../util';
|
|
4
|
+
import { i18nJsonSchema, ErrorTranslator, Translator } from './i18nTypes';
|
|
5
|
+
|
|
6
|
+
export const getI18nKey = (
|
|
7
|
+
schema: i18nJsonSchema | undefined,
|
|
8
|
+
uischema: UISchemaElement | undefined,
|
|
9
|
+
key: string
|
|
10
|
+
): string | undefined => {
|
|
11
|
+
if (uischema?.options?.i18n) {
|
|
12
|
+
return `${uischema.options.i18n}.${key}`;
|
|
13
|
+
}
|
|
14
|
+
if (schema?.i18n) {
|
|
15
|
+
return `${schema.i18n}.${key}`;
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const defaultTranslator: Translator = (_id: string, defaultMessage: string | undefined) => defaultMessage;
|
|
21
|
+
|
|
22
|
+
export const defaultErrorTranslator: ErrorTranslator = (error, t, uischema) => {
|
|
23
|
+
// check whether there is a special keyword message
|
|
24
|
+
const keyInSchemas = getI18nKey(
|
|
25
|
+
error.parentSchema,
|
|
26
|
+
uischema,
|
|
27
|
+
`error.${error.keyword}`
|
|
28
|
+
);
|
|
29
|
+
const specializedKeywordMessage = keyInSchemas && t(keyInSchemas, undefined);
|
|
30
|
+
if (specializedKeywordMessage !== undefined) {
|
|
31
|
+
return specializedKeywordMessage;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// check whether there is a generic keyword message
|
|
35
|
+
const genericKeywordMessage = t(`error.${error.keyword}`, undefined);
|
|
36
|
+
if (genericKeywordMessage !== undefined) {
|
|
37
|
+
return genericKeywordMessage;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// check whether there is a customization for the default message
|
|
41
|
+
const messageCustomization = t(error.message, undefined);
|
|
42
|
+
if (messageCustomization !== undefined) {
|
|
43
|
+
return messageCustomization;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// rewrite required property messages (if they were not customized) as we place them next to the respective input
|
|
47
|
+
if (error.keyword === 'required') {
|
|
48
|
+
return t('is a required property', 'is a required property');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return error.message;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the determined error message for the given errors.
|
|
56
|
+
* All errors must correspond to the given schema and uischema.
|
|
57
|
+
*/
|
|
58
|
+
export const getCombinedErrorMessage = (
|
|
59
|
+
errors: ErrorObject[],
|
|
60
|
+
et: ErrorTranslator,
|
|
61
|
+
t: Translator,
|
|
62
|
+
schema?: i18nJsonSchema,
|
|
63
|
+
uischema?: UISchemaElement
|
|
64
|
+
) => {
|
|
65
|
+
if (errors.length > 0 && t) {
|
|
66
|
+
// check whether there is a special message which overwrites all others
|
|
67
|
+
const keyInSchemas = getI18nKey(schema, uischema, 'error.custom');
|
|
68
|
+
const specializedErrorMessage = keyInSchemas && t(keyInSchemas, undefined);
|
|
69
|
+
if (specializedErrorMessage !== undefined) {
|
|
70
|
+
return specializedErrorMessage;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return formatErrorMessage(
|
|
74
|
+
errors.map(error => et(error, t, uischema))
|
|
75
|
+
);
|
|
76
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -22,40 +22,16 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
export * from './util';
|
|
26
25
|
|
|
27
|
-
export { JsonSchema } from './models/jsonSchema';
|
|
28
|
-
export { JsonSchema4 } from './models/jsonSchema4';
|
|
29
|
-
export { JsonSchema7 } from './models/jsonSchema7';
|
|
30
|
-
export * from './store';
|
|
31
26
|
export * from './actions';
|
|
32
|
-
|
|
33
|
-
export { Actions };
|
|
34
|
-
export * from './reducers';
|
|
27
|
+
export * as Actions from './actions';
|
|
35
28
|
export * from './generators';
|
|
36
|
-
|
|
37
|
-
export * from './
|
|
38
|
-
|
|
39
|
-
import * as Test from './testers';
|
|
29
|
+
export * from './models';
|
|
30
|
+
export * from './reducers';
|
|
40
31
|
export * from './testers';
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
import { convertToValidClassName, createLabelDescriptionFrom } from './util';
|
|
44
|
-
import { ControlElement, LabelDescription } from './models/uischema';
|
|
45
|
-
import { JsonSchema } from './models/jsonSchema';
|
|
46
|
-
|
|
47
|
-
const Helpers: {
|
|
48
|
-
createLabelDescriptionFrom(
|
|
49
|
-
withLabel: ControlElement,
|
|
50
|
-
schema: JsonSchema
|
|
51
|
-
): LabelDescription;
|
|
52
|
-
convertToValidClassName(s: string): string;
|
|
53
|
-
} = {
|
|
54
|
-
createLabelDescriptionFrom,
|
|
55
|
-
convertToValidClassName
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { Helpers };
|
|
59
|
-
|
|
32
|
+
export * as Test from './testers';
|
|
60
33
|
export * from './util';
|
|
34
|
+
|
|
35
|
+
export * from './Helpers';
|
|
61
36
|
export * from './store';
|
|
37
|
+
export * from './i18n';
|
package/src/models/draft4.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2017-2019 EclipseSource Munich
|
|
5
|
+
https://github.com/eclipsesource/jsonforms
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export * from './draft4';
|
|
27
|
+
export * from './jsonSchema';
|
|
28
|
+
export * from './jsonSchema4';
|
|
29
|
+
export * from './jsonSchema7';
|
|
30
|
+
export * from './uischema';
|
package/src/models/jsonSchema.ts
CHANGED
package/src/models/uischema.ts
CHANGED
package/src/reducers/cells.ts
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
+
|
|
25
26
|
import { RankedTester } from '../testers';
|
|
26
27
|
import {
|
|
27
28
|
ADD_CELL,
|
|
@@ -29,7 +30,7 @@ import {
|
|
|
29
30
|
REMOVE_CELL,
|
|
30
31
|
RemoveCellRendererAction
|
|
31
32
|
} from '../actions';
|
|
32
|
-
import { Reducer } from '../util
|
|
33
|
+
import { Reducer } from '../util';
|
|
33
34
|
|
|
34
35
|
type ValidCellReducerActions = AddCellRendererAction | RemoveCellRendererAction;
|
|
35
36
|
|
package/src/reducers/config.ts
CHANGED
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
+
|
|
25
26
|
import merge from 'lodash/merge';
|
|
26
27
|
import { SET_CONFIG, SetConfigAction } from '../actions';
|
|
27
28
|
import { configDefault } from '../configDefault';
|
|
28
|
-
import { Reducer } from '../util
|
|
29
|
+
import { Reducer } from '../util';
|
|
29
30
|
|
|
30
31
|
const applyDefaultConfiguration = (config: any = {}) =>
|
|
31
32
|
merge({}, configDefault, config);
|