@jsonforms/core 3.4.0-alpha.3 → 3.4.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.
@@ -3,7 +3,7 @@ import type { RankedTester } from '../testers';
3
3
  import { CoreActions } from '../actions';
4
4
  import type { ErrorObject } from 'ajv';
5
5
  import type { AnyAction, Dispatch, JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonFormsState, JsonFormsUISchemaRegistryEntry } from '../store';
6
- import { CombinatorTranslations, ArrayTranslations } from '../i18n';
6
+ import { ArrayTranslations } from '../i18n';
7
7
  import { Translator } from '../store';
8
8
  import { CombinatorKeyword } from './combinators';
9
9
  export declare const moveUp: (array: any[], toMove: number) => void;
@@ -310,7 +310,6 @@ export interface ControlWithDetailProps extends StatePropsOfControlWithDetail, D
310
310
  * State-based props of a table control.
311
311
  */
312
312
  export interface StatePropsOfArrayControl extends StatePropsOfControlWithDetail {
313
- translations: ArrayTranslations;
314
313
  childErrors?: ErrorObject[];
315
314
  }
316
315
  /**
@@ -384,7 +383,6 @@ export interface StatePropsOfCombinator extends StatePropsOfControl {
384
383
  indexOfFittingSchema: number;
385
384
  uischemas: JsonFormsUISchemaRegistryEntry[];
386
385
  data: any;
387
- translations: CombinatorTranslations;
388
386
  }
389
387
  export declare const mapStateToCombinatorRendererProps: (state: JsonFormsState, ownProps: OwnPropsOfControl, keyword: CombinatorKeyword) => StatePropsOfCombinator;
390
388
  export interface CombinatorRendererProps extends StatePropsOfCombinator, DispatchPropsOfControl {
@@ -400,7 +398,6 @@ export declare const mapStateToAnyOfProps: (state: JsonFormsState, ownProps: Own
400
398
  export declare const mapStateToOneOfProps: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfCombinator;
401
399
  export interface StatePropsOfArrayLayout extends StatePropsOfControlWithDetail {
402
400
  data: number;
403
- translations: ArrayTranslations;
404
401
  minItems?: number;
405
402
  disableRemove?: boolean;
406
403
  disableAdd?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonforms/core",
3
- "version": "3.4.0-alpha.3",
3
+ "version": "3.4.0-beta.0",
4
4
  "description": "Core module of JSON Forms",
5
5
  "repository": "https://github.com/eclipsesource/jsonforms",
6
6
  "bugs": "https://github.com/eclipsesource/jsonforms/issues",
@@ -47,13 +47,8 @@ import {
47
47
  getI18nKey,
48
48
  getI18nKeyPrefix,
49
49
  getI18nKeyPrefixBySchema,
50
- getArrayTranslations,
51
- CombinatorTranslations,
52
- getCombinatorTranslations,
53
- combinatorDefaultTranslations,
54
50
  getTranslator,
55
51
  getErrorTranslator,
56
- arrayDefaultTranslations,
57
52
  ArrayTranslations,
58
53
  } from '../i18n';
59
54
  import cloneDeep from 'lodash/cloneDeep';
@@ -790,7 +785,6 @@ export interface ControlWithDetailProps
790
785
  */
791
786
  export interface StatePropsOfArrayControl
792
787
  extends StatePropsOfControlWithDetail {
793
- translations: ArrayTranslations;
794
788
  childErrors?: ErrorObject[];
795
789
  }
796
790
 
@@ -805,12 +799,11 @@ export const mapStateToArrayControlProps = (
805
799
  state: JsonFormsState,
806
800
  ownProps: OwnPropsOfControl
807
801
  ): StatePropsOfArrayControl => {
808
- const { path, schema, uischema, i18nKeyPrefix, label, ...props } =
802
+ const { path, schema, uischema, label, ...props } =
809
803
  mapStateToControlWithDetailProps(state, ownProps);
810
804
 
811
805
  const resolvedSchema = Resolve.schema(schema, 'items', props.rootSchema);
812
806
  const childErrors = getSubErrorsAt(path, resolvedSchema)(state);
813
- const t = getTranslator()(state);
814
807
 
815
808
  return {
816
809
  ...props,
@@ -821,12 +814,6 @@ export const mapStateToArrayControlProps = (
821
814
  childErrors,
822
815
  renderers: ownProps.renderers || getRenderers(state),
823
816
  cells: ownProps.cells || getCells(state),
824
- translations: getArrayTranslations(
825
- t,
826
- arrayDefaultTranslations,
827
- i18nKeyPrefix,
828
- label
829
- ),
830
817
  };
831
818
  };
832
819
 
@@ -1061,7 +1048,6 @@ export interface StatePropsOfCombinator extends StatePropsOfControl {
1061
1048
  indexOfFittingSchema: number;
1062
1049
  uischemas: JsonFormsUISchemaRegistryEntry[];
1063
1050
  data: any;
1064
- translations: CombinatorTranslations;
1065
1051
  }
1066
1052
 
1067
1053
  export const mapStateToCombinatorRendererProps = (
@@ -1073,13 +1059,6 @@ export const mapStateToCombinatorRendererProps = (
1073
1059
  mapStateToControlProps(state, ownProps);
1074
1060
 
1075
1061
  const ajv = state.jsonforms.core.ajv;
1076
- const t = getTranslator()(state);
1077
- const translations = getCombinatorTranslations(
1078
- t,
1079
- combinatorDefaultTranslations,
1080
- i18nKeyPrefix,
1081
- label
1082
- );
1083
1062
  const structuralKeywords = [
1084
1063
  'required',
1085
1064
  'additionalProperties',
@@ -1126,7 +1105,6 @@ export const mapStateToCombinatorRendererProps = (
1126
1105
  label,
1127
1106
  indexOfFittingSchema,
1128
1107
  uischemas: getUISchemas(state),
1129
- translations,
1130
1108
  };
1131
1109
  };
1132
1110
 
@@ -1161,7 +1139,6 @@ export const mapStateToOneOfProps = (
1161
1139
 
1162
1140
  export interface StatePropsOfArrayLayout extends StatePropsOfControlWithDetail {
1163
1141
  data: number;
1164
- translations: ArrayTranslations;
1165
1142
  minItems?: number;
1166
1143
  disableRemove?: boolean;
1167
1144
  disableAdd?: boolean;
@@ -1177,7 +1154,7 @@ export const mapStateToArrayLayoutProps = (
1177
1154
  state: JsonFormsState,
1178
1155
  ownProps: OwnPropsOfControl
1179
1156
  ): StatePropsOfArrayLayout => {
1180
- const { path, schema, uischema, errors, i18nKeyPrefix, label, ...props } =
1157
+ const { path, schema, uischema, errors, label, ...props } =
1181
1158
  mapStateToControlWithDetailProps(state, ownProps);
1182
1159
 
1183
1160
  const resolvedSchema = Resolve.schema(schema, 'items', props.rootSchema);
@@ -1205,12 +1182,6 @@ export const mapStateToArrayLayoutProps = (
1205
1182
  data: props.data ? props.data.length : 0,
1206
1183
  errors: allErrors,
1207
1184
  minItems: schema.minItems,
1208
- translations: getArrayTranslations(
1209
- t,
1210
- arrayDefaultTranslations,
1211
- i18nKeyPrefix,
1212
- label
1213
- ),
1214
1185
  };
1215
1186
  };
1216
1187