@jsonforms/core 3.0.0-alpha.0 → 3.0.0-beta.0
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 +1095 -703
- package/docs/index.html +70 -43
- 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 -3
- package/docs/interfaces/jsonformscellrendererregistryentry.html +2 -2
- package/docs/interfaces/jsonformscore.html +7 -7
- 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 -9
- 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/{setlocalizedschemasaction.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 -9
- 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/{setlocalizeduischemasaction.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/actions/actions.d.ts +181 -0
- package/lib/actions/index.d.ts +1 -178
- package/lib/configDefault.d.ts +6 -6
- package/lib/generators/Generate.d.ts +6 -0
- package/lib/generators/index.d.ts +3 -10
- package/lib/generators/schema.d.ts +8 -8
- package/lib/generators/uischema.d.ts +12 -13
- package/lib/i18n/i18nTypes.d.ts +15 -0
- package/lib/i18n/i18nUtil.d.ts +18 -0
- package/lib/i18n/index.d.ts +2 -0
- package/lib/index.d.ts +11 -23
- package/lib/jsonforms-core.cjs.js +2445 -0
- package/lib/jsonforms-core.cjs.js.map +1 -0
- package/lib/jsonforms-core.esm.js +2164 -0
- package/lib/jsonforms-core.esm.js.map +1 -0
- package/lib/models/draft4.d.ts +198 -198
- package/lib/models/index.d.ts +5 -0
- package/lib/models/jsonSchema.d.ts +3 -3
- package/lib/models/jsonSchema4.d.ts +110 -110
- package/lib/models/jsonSchema7.d.ts +119 -119
- package/lib/models/uischema.d.ts +201 -201
- package/lib/reducers/cells.d.ts +11 -11
- package/lib/reducers/config.d.ts +3 -3
- package/lib/reducers/core.d.ts +24 -23
- package/lib/reducers/default-data.d.ts +10 -10
- package/lib/reducers/i18n.d.ts +8 -11
- package/lib/reducers/index.d.ts +9 -47
- package/lib/reducers/reducers.d.ts +29 -0
- package/lib/reducers/renderers.d.ts +10 -10
- package/lib/reducers/selectors.d.ts +15 -0
- package/lib/reducers/uischemas.d.ts +10 -10
- package/lib/store.d.ts +53 -56
- package/lib/testers/index.d.ts +1 -204
- package/lib/testers/testers.d.ts +203 -0
- package/lib/util/Formatted.d.ts +19 -19
- package/lib/util/array.d.ts +3 -3
- package/lib/util/cell.d.ts +79 -79
- package/lib/util/combinators.d.ts +10 -11
- package/lib/util/ids.d.ts +3 -3
- package/lib/util/index.d.ts +15 -49
- package/lib/util/label.d.ts +9 -10
- package/lib/util/path.d.ts +25 -24
- package/lib/util/renderer.d.ts +398 -395
- package/lib/util/resolvers.d.ts +25 -25
- package/lib/util/runtime.d.ts +18 -19
- package/lib/util/schema.d.ts +1 -1
- package/lib/util/type.d.ts +174 -174
- package/lib/util/uischema.d.ts +5 -5
- package/lib/util/util.d.ts +31 -0
- package/lib/util/validator.d.ts +3 -2
- package/package.json +18 -14
- package/rollup.config.js +44 -0
- package/{lib/models/jsonSchema4.js → src/Helpers.ts} +16 -8
- package/src/actions/actions.ts +345 -0
- package/src/actions/index.ts +1 -310
- package/src/configDefault.ts +1 -0
- package/{lib/util/validator.js → src/generators/Generate.ts} +18 -11
- 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 +105 -0
- package/src/i18n/index.ts +2 -0
- package/src/index.ts +7 -31
- package/src/models/draft4.ts +1 -0
- package/{lib/util/type.js → src/models/index.ts} +10 -7
- 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 -52
- package/src/reducers/default-data.ts +2 -1
- package/src/reducers/i18n.ts +42 -35
- package/src/reducers/index.ts +9 -154
- package/src/reducers/reducers.ts +128 -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 +45 -10
- package/src/util/combinators.ts +2 -4
- package/src/util/ids.ts +1 -0
- package/src/util/index.ts +11 -123
- package/src/util/label.ts +2 -2
- package/src/util/path.ts +4 -1
- package/src/util/renderer.ts +139 -66
- package/src/util/resolvers.ts +2 -1
- package/src/util/runtime.ts +3 -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/stats.html +3279 -0
- package/{lib/configDefault.js → test/i18n/i18nUtil.test.ts} +25 -24
- package/test/reducers/core.test.ts +31 -44
- package/test/util/cell.test.ts +2 -2
- package/test/util/renderer.test.ts +543 -31
- package/docs/interfaces/labels.html +0 -157
- package/lib/actions/index.js +0 -125
- package/lib/actions/index.js.map +0 -1
- package/lib/configDefault.js.map +0 -1
- package/lib/generators/index.js +0 -12
- package/lib/generators/index.js.map +0 -1
- package/lib/generators/schema.js +0 -152
- package/lib/generators/schema.js.map +0 -1
- package/lib/generators/uischema.js +0 -167
- package/lib/generators/uischema.js.map +0 -1
- package/lib/index.js +0 -45
- package/lib/index.js.map +0 -1
- package/lib/jsonforms-core.js +0 -19
- package/lib/jsonforms-core.js.map +0 -1
- package/lib/models/draft4.js +0 -173
- package/lib/models/draft4.js.map +0 -1
- package/lib/models/jsonSchema.js +0 -3
- package/lib/models/jsonSchema.js.map +0 -1
- package/lib/models/jsonSchema4.js.map +0 -1
- package/lib/models/jsonSchema7.js +0 -30
- package/lib/models/jsonSchema7.js.map +0 -1
- package/lib/models/uischema.js +0 -31
- package/lib/models/uischema.js.map +0 -1
- package/lib/reducers/cells.js +0 -16
- package/lib/reducers/cells.js.map +0 -1
- package/lib/reducers/config.js +0 -44
- package/lib/reducers/config.js.map +0 -1
- package/lib/reducers/core.js +0 -259
- package/lib/reducers/core.js.map +0 -1
- package/lib/reducers/default-data.js +0 -42
- package/lib/reducers/default-data.js.map +0 -1
- package/lib/reducers/i18n.js +0 -66
- package/lib/reducers/i18n.js.map +0 -1
- package/lib/reducers/index.js +0 -92
- package/lib/reducers/index.js.map +0 -1
- package/lib/reducers/renderers.js +0 -17
- package/lib/reducers/renderers.js.map +0 -1
- package/lib/reducers/uischemas.js +0 -57
- package/lib/reducers/uischemas.js.map +0 -1
- package/lib/store.js +0 -3
- package/lib/store.js.map +0 -1
- package/lib/testers/index.js +0 -402
- package/lib/testers/index.js.map +0 -1
- package/lib/util/Formatted.js +0 -3
- package/lib/util/Formatted.js.map +0 -1
- package/lib/util/array.js +0 -19
- package/lib/util/array.js.map +0 -1
- package/lib/util/cell.js +0 -133
- package/lib/util/cell.js.map +0 -1
- package/lib/util/combinators.js +0 -56
- package/lib/util/combinators.js.map +0 -1
- package/lib/util/ids.js +0 -50
- package/lib/util/ids.js.map +0 -1
- package/lib/util/index.js +0 -132
- package/lib/util/index.js.map +0 -1
- package/lib/util/label.js +0 -70
- package/lib/util/label.js.map +0 -1
- package/lib/util/path.js +0 -84
- package/lib/util/path.js.map +0 -1
- package/lib/util/renderer.js +0 -447
- package/lib/util/renderer.js.map +0 -1
- package/lib/util/resolvers.js +0 -165
- package/lib/util/resolvers.js.map +0 -1
- package/lib/util/runtime.js +0 -159
- package/lib/util/runtime.js.map +0 -1
- package/lib/util/schema.js +0 -16
- package/lib/util/schema.js.map +0 -1
- package/lib/util/type.js.map +0 -1
- package/lib/util/uischema.js +0 -52
- package/lib/util/uischema.js.map +0 -1
- package/lib/util/validator.js.map +0 -1
- package/webpack.build.js +0 -13
package/lib/util/runtime.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
/*
|
|
5
|
-
The MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2019 EclipseSource Munich
|
|
8
|
-
https://github.com/eclipsesource/jsonforms
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in
|
|
18
|
-
all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
-
THE SOFTWARE.
|
|
27
|
-
*/
|
|
28
|
-
var has_1 = tslib_1.__importDefault(require("lodash/has"));
|
|
29
|
-
var uischema_1 = require("../models/uischema");
|
|
30
|
-
var resolvers_1 = require("./resolvers");
|
|
31
|
-
var path_1 = require("./path");
|
|
32
|
-
var reducers_1 = require("../reducers");
|
|
33
|
-
var isOrCondition = function (condition) {
|
|
34
|
-
return condition.type === 'OR';
|
|
35
|
-
};
|
|
36
|
-
var isAndCondition = function (condition) {
|
|
37
|
-
return condition.type === 'AND';
|
|
38
|
-
};
|
|
39
|
-
var isLeafCondition = function (condition) {
|
|
40
|
-
return condition.type === 'LEAF';
|
|
41
|
-
};
|
|
42
|
-
var isSchemaCondition = function (condition) { return has_1.default(condition, 'schema'); };
|
|
43
|
-
var getConditionScope = function (condition, path) {
|
|
44
|
-
return path_1.composeWithUi(condition, path);
|
|
45
|
-
};
|
|
46
|
-
var evaluateCondition = function (data, condition, path, ajv) {
|
|
47
|
-
if (isAndCondition(condition)) {
|
|
48
|
-
return condition.conditions.reduce(function (acc, cur) { return acc && evaluateCondition(data, cur, path, ajv); }, true);
|
|
49
|
-
}
|
|
50
|
-
else if (isOrCondition(condition)) {
|
|
51
|
-
return condition.conditions.reduce(function (acc, cur) { return acc || evaluateCondition(data, cur, path, ajv); }, false);
|
|
52
|
-
}
|
|
53
|
-
else if (isLeafCondition(condition)) {
|
|
54
|
-
var value = resolvers_1.resolveData(data, getConditionScope(condition, path));
|
|
55
|
-
return value === condition.expectedValue;
|
|
56
|
-
}
|
|
57
|
-
else if (isSchemaCondition(condition)) {
|
|
58
|
-
var value = resolvers_1.resolveData(data, getConditionScope(condition, path));
|
|
59
|
-
return ajv.validate(condition.schema, value);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
// unknown condition
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var isRuleFulfilled = function (uischema, data, path, ajv) {
|
|
67
|
-
var condition = uischema.rule.condition;
|
|
68
|
-
return evaluateCondition(data, condition, path, ajv);
|
|
69
|
-
};
|
|
70
|
-
exports.evalVisibility = function (uischema, data, path, ajv) {
|
|
71
|
-
if (path === void 0) { path = undefined; }
|
|
72
|
-
var fulfilled = isRuleFulfilled(uischema, data, path, ajv);
|
|
73
|
-
switch (uischema.rule.effect) {
|
|
74
|
-
case uischema_1.RuleEffect.HIDE:
|
|
75
|
-
return !fulfilled;
|
|
76
|
-
case uischema_1.RuleEffect.SHOW:
|
|
77
|
-
return fulfilled;
|
|
78
|
-
// visible by default
|
|
79
|
-
default:
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
exports.evalEnablement = function (uischema, data, path, ajv) {
|
|
84
|
-
if (path === void 0) { path = undefined; }
|
|
85
|
-
var fulfilled = isRuleFulfilled(uischema, data, path, ajv);
|
|
86
|
-
switch (uischema.rule.effect) {
|
|
87
|
-
case uischema_1.RuleEffect.DISABLE:
|
|
88
|
-
return !fulfilled;
|
|
89
|
-
case uischema_1.RuleEffect.ENABLE:
|
|
90
|
-
return fulfilled;
|
|
91
|
-
// enabled by default
|
|
92
|
-
default:
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
exports.hasShowRule = function (uischema) {
|
|
97
|
-
if (uischema.rule &&
|
|
98
|
-
(uischema.rule.effect === uischema_1.RuleEffect.SHOW ||
|
|
99
|
-
uischema.rule.effect === uischema_1.RuleEffect.HIDE)) {
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
return false;
|
|
103
|
-
};
|
|
104
|
-
exports.hasEnableRule = function (uischema) {
|
|
105
|
-
if (uischema.rule &&
|
|
106
|
-
(uischema.rule.effect === uischema_1.RuleEffect.ENABLE ||
|
|
107
|
-
uischema.rule.effect === uischema_1.RuleEffect.DISABLE)) {
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
return false;
|
|
111
|
-
};
|
|
112
|
-
exports.isVisible = function (uischema, data, path, ajv) {
|
|
113
|
-
if (path === void 0) { path = undefined; }
|
|
114
|
-
if (uischema.rule) {
|
|
115
|
-
return exports.evalVisibility(uischema, data, path, ajv);
|
|
116
|
-
}
|
|
117
|
-
return true;
|
|
118
|
-
};
|
|
119
|
-
exports.isEnabled = function (uischema, data, path, ajv) {
|
|
120
|
-
if (path === void 0) { path = undefined; }
|
|
121
|
-
if (uischema.rule) {
|
|
122
|
-
return exports.evalEnablement(uischema, data, path, ajv);
|
|
123
|
-
}
|
|
124
|
-
return true;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Indicates whether the given `uischema` element shall be enabled or disabled.
|
|
128
|
-
* Checks the global readonly flag, uischema rule, uischema options (including the config),
|
|
129
|
-
* the schema and the enablement indicator of the parent.
|
|
130
|
-
*/
|
|
131
|
-
exports.isInherentlyEnabled = function (state, ownProps, uischema, schema, rootData, config) {
|
|
132
|
-
var _a, _b, _c;
|
|
133
|
-
if ((_a = state === null || state === void 0 ? void 0 : state.jsonforms) === null || _a === void 0 ? void 0 : _a.readonly) {
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
if (uischema && exports.hasEnableRule(uischema)) {
|
|
137
|
-
return exports.isEnabled(uischema, rootData, ownProps === null || ownProps === void 0 ? void 0 : ownProps.path, reducers_1.getAjv(state));
|
|
138
|
-
}
|
|
139
|
-
if (typeof ((_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.readonly) === 'boolean') {
|
|
140
|
-
return !uischema.options.readonly;
|
|
141
|
-
}
|
|
142
|
-
if (typeof ((_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.readOnly) === 'boolean') {
|
|
143
|
-
return !uischema.options.readOnly;
|
|
144
|
-
}
|
|
145
|
-
if (typeof (config === null || config === void 0 ? void 0 : config.readonly) === 'boolean') {
|
|
146
|
-
return !config.readonly;
|
|
147
|
-
}
|
|
148
|
-
if (typeof (config === null || config === void 0 ? void 0 : config.readOnly) === 'boolean') {
|
|
149
|
-
return !config.readOnly;
|
|
150
|
-
}
|
|
151
|
-
if ((schema === null || schema === void 0 ? void 0 : schema.readOnly) === true) {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
if (typeof (ownProps === null || ownProps === void 0 ? void 0 : ownProps.enabled) === 'boolean') {
|
|
155
|
-
return ownProps.enabled;
|
|
156
|
-
}
|
|
157
|
-
return true;
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=runtime.js.map
|
package/lib/util/runtime.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/util/runtime.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,2DAA6B;AAC7B,+CAS4B;AAC5B,yCAA0C;AAC1C,+BAAuC;AAEvC,wCAAqC;AAIrC,IAAM,aAAa,GAAG,UAAC,SAAoB;IACzC,OAAA,SAAS,CAAC,IAAI,KAAK,IAAI;AAAvB,CAAuB,CAAC;AAE1B,IAAM,cAAc,GAAG,UAAC,SAAoB;IAC1C,OAAA,SAAS,CAAC,IAAI,KAAK,KAAK;AAAxB,CAAwB,CAAC;AAE3B,IAAM,eAAe,GAAG,UAAC,SAAoB;IAC3C,OAAA,SAAS,CAAC,IAAI,KAAK,MAAM;AAAzB,CAAyB,CAAC;AAE5B,IAAM,iBAAiB,GAAG,UACxB,SAAoB,IACkB,OAAA,aAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAxB,CAAwB,CAAC;AAEjE,IAAM,iBAAiB,GAAG,UAAC,SAAmB,EAAE,IAAY;IAC1D,OAAO,oBAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,IAAM,iBAAiB,GAAG,UACxB,IAAS,EACT,SAAoB,EACpB,IAAY,EACZ,GAAQ;IAER,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE;QAC7B,OAAO,SAAS,CAAC,UAAU,CAAC,MAAM,CAChC,UAAC,GAAG,EAAE,GAAG,IAAK,OAAA,GAAG,I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CAAA,KAAK,SAAS,EAAE;QACpD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;KACnC;IACD,IAAI,QAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAA,KAAK,SAAS,EAAE;QACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;KACzB;IACD,IAAI,QAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAA,KAAK,SAAS,EAAE;QACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;KACzB;IACD,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,MAAK,IAAI,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,QAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAA,KAAK,SAAS,EAAE;QAC1C,OAAO,QAAQ,CAAC,OAAO,CAAC;KACzB;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
package/lib/util/schema.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var find_1 = tslib_1.__importDefault(require("lodash/find"));
|
|
5
|
-
exports.getFirstPrimitiveProp = function (schema) {
|
|
6
|
-
if (schema.properties) {
|
|
7
|
-
return find_1.default(Object.keys(schema.properties), function (propName) {
|
|
8
|
-
var prop = schema.properties[propName];
|
|
9
|
-
return (prop.type === 'string' ||
|
|
10
|
-
prop.type === 'number' ||
|
|
11
|
-
prop.type === 'integer');
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return undefined;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=schema.js.map
|
package/lib/util/schema.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/util/schema.ts"],"names":[],"mappings":";;;AAAA,6DAA+B;AAElB,QAAA,qBAAqB,GAAG,UAAC,MAAW;IAC/C,IAAI,MAAM,CAAC,UAAU,EAAE;QACrB,OAAO,cAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,UAAA,QAAQ;YAClD,IAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACzC,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACtB,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACtB,IAAI,CAAC,IAAI,KAAK,SAAS,CACxB,CAAC;QACJ,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
package/lib/util/type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/util/type.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE"}
|
package/lib/util/uischema.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
/*
|
|
5
|
-
The MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2019 EclipseSource Munich
|
|
8
|
-
https://github.com/eclipsesource/jsonforms
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in
|
|
18
|
-
all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
-
THE SOFTWARE.
|
|
27
|
-
*/
|
|
28
|
-
var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
|
|
29
|
-
var uischema_1 = require("../models/uischema");
|
|
30
|
-
var setReadonlyPropertyValue = function (value) { return function (child) {
|
|
31
|
-
if (!child.options) {
|
|
32
|
-
child.options = {};
|
|
33
|
-
}
|
|
34
|
-
child.options.readonly = value;
|
|
35
|
-
}; };
|
|
36
|
-
exports.setReadonly = function (uischema) {
|
|
37
|
-
exports.iterateSchema(uischema, setReadonlyPropertyValue(true));
|
|
38
|
-
};
|
|
39
|
-
exports.unsetReadonly = function (uischema) {
|
|
40
|
-
exports.iterateSchema(uischema, setReadonlyPropertyValue(false));
|
|
41
|
-
};
|
|
42
|
-
exports.iterateSchema = function (uischema, toApply) {
|
|
43
|
-
if (isEmpty_1.default(uischema)) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (uischema_1.isLayout(uischema)) {
|
|
47
|
-
uischema.elements.forEach(function (child) { return exports.iterateSchema(child, toApply); });
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
toApply(uischema);
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=uischema.js.map
|
package/lib/util/uischema.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uischema.js","sourceRoot":"","sources":["../../src/util/uischema.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,mEAAqC;AACrC,+CAA+D;AAI/D,IAAM,wBAAwB,GAAG,UAAC,KAAc,IAAsB,OAAA,UACpE,KAAsB;IAEtB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;QAClB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;KACpB;IACD,KAAK,CAAC,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;AACjC,CAAC,EAPqE,CAOrE,CAAC;AACW,QAAA,WAAW,GAAG,UAAC,QAAyB;IACnD,qBAAa,CAAC,QAAQ,EAAE,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,CAAC;AACW,QAAA,aAAa,GAAG,UAAC,QAAyB;IACrD,qBAAa,CAAC,QAAQ,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3D,CAAC,CAAC;AACW,QAAA,aAAa,GAAG,UAC3B,QAAyB,EACzB,OAAwB;IAExB,IAAI,iBAAO,CAAC,QAAQ,CAAC,EAAE;QACrB,OAAO;KACR;IACD,IAAI,mBAAQ,CAAC,QAAQ,CAAC,EAAE;QACtB,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,KAAK,IAAI,OAAA,qBAAa,CAAC,KAAK,EAAE,OAAO,CAAC,EAA7B,CAA6B,CAAC,CAAC;QAClE,OAAO;KACR;IACD,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/util/validator.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,oDAAsB;AAEtB,2CAA0C;AAE7B,QAAA,SAAS,GAAG,UAAC,OAAiB;IACzC,IAAM,GAAG,GAAG,IAAI,aAAG,oBACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,IAAI,EAClB,aAAa,EAAE,UAAU,EACzB,OAAO,EAAE,IAAI,IACV,OAAO,EACV,CAAC;IACH,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;IAC1D,GAAG,CAAC,aAAa,CAAC,eAAM,CAAC,CAAC;IAC1B,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
package/webpack.build.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const merge = require('webpack-merge');
|
|
2
|
-
const baseConfig = require('../../webpack/webpack.build.base.js');
|
|
3
|
-
|
|
4
|
-
module.exports = merge(baseConfig, {
|
|
5
|
-
output: {
|
|
6
|
-
filename: "jsonforms-core.js",
|
|
7
|
-
library: "JSONFormsCore"
|
|
8
|
-
},
|
|
9
|
-
externals: {
|
|
10
|
-
"redux": "Redux"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
});
|