@jsonforms/core 3.7.0-beta.0 → 3.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonforms/core",
3
- "version": "3.7.0-beta.0",
3
+ "version": "3.8.0-alpha.0",
4
4
  "description": "Core module of JSON Forms",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@types/json-schema": "^7.0.3",
62
- "ajv": "^8.6.1",
62
+ "ajv": "^8.18.0",
63
63
  "ajv-formats": "^2.1.0",
64
64
  "lodash": "^4.17.21"
65
65
  },
@@ -349,11 +349,11 @@ export const oneOfToEnumOptionMapper = (
349
349
  if (t) {
350
350
  // prefer schema keys as they can be more specialized
351
351
  if (e.i18n) {
352
- label = t(e.i18n, label);
352
+ label = t(e.i18n, label, { schema: e });
353
353
  } else if (fallbackI18nKey) {
354
- label = t(`${fallbackI18nKey}.${label}`, label);
354
+ label = t(`${fallbackI18nKey}.${label}`, label, { schema: e });
355
355
  } else {
356
- label = t(label, label);
356
+ label = t(label, label, { schema: e });
357
357
  }
358
358
  }
359
359
  return {
@@ -27,7 +27,6 @@ import isEmpty from 'lodash/isEmpty';
27
27
  import get from 'lodash/get';
28
28
  import endsWith from 'lodash/endsWith';
29
29
  import last from 'lodash/last';
30
- import isArray from 'lodash/isArray';
31
30
  import reduce from 'lodash/reduce';
32
31
  import toPairs from 'lodash/toPairs';
33
32
  import includes from 'lodash/includes';
@@ -483,7 +482,7 @@ const traverse = (
483
482
  pred: (obj: JsonSchema) => boolean,
484
483
  rootSchema: JsonSchema
485
484
  ): boolean => {
486
- if (isArray(any)) {
485
+ if (Array.isArray(any)) {
487
486
  return reduce(
488
487
  any,
489
488
  (acc, el) => acc || traverse(el, pred, rootSchema),
package/src/util/util.ts CHANGED
@@ -24,7 +24,6 @@
24
24
  */
25
25
 
26
26
  import isEmpty from 'lodash/isEmpty';
27
- import isArray from 'lodash/isArray';
28
27
  import includes from 'lodash/includes';
29
28
  import find from 'lodash/find';
30
29
  import { resolveData, resolveSchema } from './resolvers';
@@ -100,7 +99,7 @@ export const deriveTypes = (jsonSchema: JsonSchema): string[] => {
100
99
  if (!isEmpty(jsonSchema.type) && typeof jsonSchema.type === 'string') {
101
100
  return [jsonSchema.type];
102
101
  }
103
- if (isArray(jsonSchema.type)) {
102
+ if (Array.isArray(jsonSchema.type)) {
104
103
  return jsonSchema.type;
105
104
  }
106
105
  if (