@jsonforms/core 3.2.0 → 3.3.0-alpha.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
CHANGED
|
@@ -18,16 +18,10 @@ The following seeds are available:
|
|
|
18
18
|
- [Angular Seed](https://github.com/eclipsesource/jsonforms-angular-seed)
|
|
19
19
|
- [Vue Seed](https://github.com/eclipsesource/jsonforms-vue-seed)
|
|
20
20
|
|
|
21
|
-
See the official [documentation](https://jsonforms.io/)
|
|
21
|
+
See the official [documentation](https://jsonforms.io/) for more information.
|
|
22
22
|
|
|
23
23
|
Check <https://www.npmjs.com/search?q=%40jsonforms> for all published JSON Forms packages.
|
|
24
24
|
|
|
25
|
-
## Upgrading to JSON Forms 3.0
|
|
26
|
-
|
|
27
|
-
With version 3.0 of JSON Forms we removed `json-schema-ref-parser` from the core package.
|
|
28
|
-
This change only affects users of the React variant (Vue and Angular are not affected) and even for React only a few users will need to adjust their code.
|
|
29
|
-
To avoid issues and for more information, please have a look at our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md).
|
|
30
|
-
|
|
31
25
|
## License
|
|
32
26
|
|
|
33
27
|
The JSON Forms project is licensed under the MIT License. See the [LICENSE file](https://github.com/eclipsesource/jsonforms/blob/master/LICENSE) for more information.
|
|
@@ -21,6 +21,7 @@ var isArray = require('lodash/isArray');
|
|
|
21
21
|
var reduce = require('lodash/reduce');
|
|
22
22
|
var toPairs = require('lodash/toPairs');
|
|
23
23
|
var includes = require('lodash/includes');
|
|
24
|
+
var isUndefined = require('lodash/isUndefined');
|
|
24
25
|
var find = require('lodash/find');
|
|
25
26
|
var range = require('lodash/range');
|
|
26
27
|
var has = require('lodash/has');
|
|
@@ -48,6 +49,7 @@ var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray);
|
|
|
48
49
|
var reduce__default = /*#__PURE__*/_interopDefaultLegacy(reduce);
|
|
49
50
|
var toPairs__default = /*#__PURE__*/_interopDefaultLegacy(toPairs);
|
|
50
51
|
var includes__default = /*#__PURE__*/_interopDefaultLegacy(includes);
|
|
52
|
+
var isUndefined__default = /*#__PURE__*/_interopDefaultLegacy(isUndefined);
|
|
51
53
|
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
|
|
52
54
|
var range__default = /*#__PURE__*/_interopDefaultLegacy(range);
|
|
53
55
|
var has__default = /*#__PURE__*/_interopDefaultLegacy(has);
|
|
@@ -1005,6 +1007,15 @@ var optionIs = function (optionName, optionValue) {
|
|
|
1005
1007
|
return !isEmpty__default["default"](options) && options[optionName] === optionValue;
|
|
1006
1008
|
};
|
|
1007
1009
|
};
|
|
1010
|
+
var hasOption = function (optionName) {
|
|
1011
|
+
return function (uischema) {
|
|
1012
|
+
if (isEmpty__default["default"](uischema)) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
var options = uischema.options;
|
|
1016
|
+
return !isEmpty__default["default"](options) && !isUndefined__default["default"](options[optionName]);
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1008
1019
|
var scopeEndsWith = function (expected) {
|
|
1009
1020
|
return function (uischema) {
|
|
1010
1021
|
if (isEmpty__default["default"](expected) || !isControl(uischema)) {
|
|
@@ -1215,6 +1226,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
1215
1226
|
formatIs: formatIs,
|
|
1216
1227
|
uiTypeIs: uiTypeIs,
|
|
1217
1228
|
optionIs: optionIs,
|
|
1229
|
+
hasOption: hasOption,
|
|
1218
1230
|
scopeEndsWith: scopeEndsWith,
|
|
1219
1231
|
scopeEndIs: scopeEndIs,
|
|
1220
1232
|
and: and,
|
|
@@ -2678,6 +2690,7 @@ exports.getUISchemas = getUISchemas;
|
|
|
2678
2690
|
exports.getUiSchema = getUiSchema;
|
|
2679
2691
|
exports.hasCategory = hasCategory;
|
|
2680
2692
|
exports.hasEnableRule = hasEnableRule;
|
|
2693
|
+
exports.hasOption = hasOption;
|
|
2681
2694
|
exports.hasShowRule = hasShowRule;
|
|
2682
2695
|
exports.hasType = hasType;
|
|
2683
2696
|
exports.i18nReducer = i18nReducer;
|