@jsonforms/core 3.1.0-beta.0 → 3.1.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.
@@ -278,6 +278,7 @@ export interface OwnPropsOfMasterListItem {
278
278
  index: number;
279
279
  selected: boolean;
280
280
  path: string;
281
+ enabled: boolean;
281
282
  schema: JsonSchema;
282
283
  handleSelect(index: number): () => void;
283
284
  removeItem(path: string, value: number): () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonforms/core",
3
- "version": "3.1.0-beta.0",
3
+ "version": "3.1.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",
@@ -99,5 +99,5 @@
99
99
  "typedoc": "^0.19.2",
100
100
  "typescript": "4.2.3"
101
101
  },
102
- "gitHead": "a5fdca6fb6afa9820eabe8051401785675f53ad7"
102
+ "gitHead": "7e0115feeced7711b0768d325566aaa6b054c32b"
103
103
  }
@@ -45,7 +45,7 @@ import {
45
45
  UPDATE_CORE,
46
46
  UpdateCoreAction,
47
47
  } from '../actions';
48
- import { createAjv, isOneOfEnumSchema, Reducer } from '../util';
48
+ import { createAjv, decode, isOneOfEnumSchema, Reducer } from '../util';
49
49
  import type { JsonSchema, UISchemaElement } from '../models';
50
50
 
51
51
  export const validate = (
@@ -356,13 +356,9 @@ const getInvalidProperty = (error: ErrorObject): string | undefined => {
356
356
  };
357
357
 
358
358
  export const getControlPath = (error: ErrorObject) => {
359
- const dataPath = (error as any).dataPath;
360
- // older AJV version
361
- if (dataPath) {
362
- return dataPath.replace(/\//g, '.').substr(1);
363
- }
364
- // dataPath was renamed to instancePath in AJV v8
365
- let controlPath: string = error.instancePath;
359
+ // Up until AJV v7 the path property was called 'dataPath'
360
+ // With AJV v8 the property was renamed to 'instancePath'
361
+ let controlPath = (error as any).dataPath || error.instancePath || '';
366
362
 
367
363
  // change '/' chars to '.'
368
364
  controlPath = controlPath.replace(/\//g, '.');
@@ -374,6 +370,9 @@ export const getControlPath = (error: ErrorObject) => {
374
370
 
375
371
  // remove '.' chars at the beginning of paths
376
372
  controlPath = controlPath.replace(/^./, '');
373
+
374
+ // decode JSON Pointer escape sequences
375
+ controlPath = decode(controlPath);
377
376
  return controlPath;
378
377
  };
379
378
 
@@ -682,6 +682,7 @@ export interface OwnPropsOfMasterListItem {
682
682
  index: number;
683
683
  selected: boolean;
684
684
  path: string;
685
+ enabled: boolean;
685
686
  schema: JsonSchema;
686
687
  handleSelect(index: number): () => void;
687
688
  removeItem(path: string, value: number): () => void;