@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.
@@ -5,7 +5,6 @@ import range from 'lodash/range';
5
5
  import get from 'lodash/get';
6
6
  import has from 'lodash/has';
7
7
  import find from 'lodash/find';
8
- import isArray from 'lodash/isArray';
9
8
  import includes from 'lodash/includes';
10
9
  import Ajv from 'ajv';
11
10
  import addFormats from 'ajv-formats';
@@ -735,7 +734,7 @@ const deriveTypes = (jsonSchema) => {
735
734
  if (!isEmpty(jsonSchema.type) && typeof jsonSchema.type === 'string') {
736
735
  return [jsonSchema.type];
737
736
  }
738
- if (isArray(jsonSchema.type)) {
737
+ if (Array.isArray(jsonSchema.type)) {
739
738
  return jsonSchema.type;
740
739
  }
741
740
  if (!isEmpty(jsonSchema.properties) ||
@@ -1774,7 +1773,7 @@ const isObjectArray = and(schemaMatches((schema, rootSchema) => hasType(schema,
1774
1773
  }));
1775
1774
  const isObjectArrayControl = and(uiTypeIs('Control'), isObjectArray);
1776
1775
  const traverse = (any, pred, rootSchema) => {
1777
- if (isArray(any)) {
1776
+ if (Array.isArray(any)) {
1778
1777
  return reduce(any, (acc, el) => acc || traverse(el, pred, rootSchema), false);
1779
1778
  }
1780
1779
  if (pred(any)) {
@@ -2168,13 +2167,13 @@ const oneOfToEnumOptionMapper = (e, t, fallbackI18nKey) => {
2168
2167
  (typeof e.const === 'string' ? e.const : JSON.stringify(e.const));
2169
2168
  if (t) {
2170
2169
  if (e.i18n) {
2171
- label = t(e.i18n, label);
2170
+ label = t(e.i18n, label, { schema: e });
2172
2171
  }
2173
2172
  else if (fallbackI18nKey) {
2174
- label = t(`${fallbackI18nKey}.${label}`, label);
2173
+ label = t(`${fallbackI18nKey}.${label}`, label, { schema: e });
2175
2174
  }
2176
2175
  else {
2177
- label = t(label, label);
2176
+ label = t(label, label, { schema: e });
2178
2177
  }
2179
2178
  }
2180
2179
  return {