@ekzo-dev/bootstrap-addons 5.2.2 → 5.2.4
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekzo-dev/bootstrap-addons",
|
|
3
3
|
"description": "Aurelia Bootstrap additional component",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.4",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,7 +9,7 @@ import Ajv, { ErrorObject, Options } from 'ajv';
|
|
|
9
9
|
import Ajv2019 from 'ajv/dist/2019';
|
|
10
10
|
import Ajv2020 from 'ajv/dist/2020';
|
|
11
11
|
import addFormats from 'ajv-formats';
|
|
12
|
-
import { bindable, customElement } from 'aurelia';
|
|
12
|
+
import { bindable, BindingMode, customElement } from 'aurelia';
|
|
13
13
|
import { JSONValue, parsePath } from 'immutable-json-patch';
|
|
14
14
|
import {
|
|
15
15
|
JSONEditorPropsOptional,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
dependencies: [JsonEditor],
|
|
30
30
|
})
|
|
31
31
|
export class BsJsonInput {
|
|
32
|
-
@bindable()
|
|
32
|
+
@bindable({ mode: BindingMode.twoWay })
|
|
33
33
|
value: unknown;
|
|
34
34
|
|
|
35
35
|
@bindable(coerceBoolean)
|
|
@@ -112,7 +112,8 @@ export class BsJsonInput {
|
|
|
112
112
|
const ajv = rawThis.#initAjv(jsonSchema.$schema as string);
|
|
113
113
|
|
|
114
114
|
addFormats(ajv);
|
|
115
|
-
const
|
|
115
|
+
const clonedSchema = JSON.parse(JSON.stringify(jsonSchema)) as JSONSchema;
|
|
116
|
+
const validate = ajv.compile(clonedSchema);
|
|
116
117
|
|
|
117
118
|
if (validate.errors) {
|
|
118
119
|
throw validate.errors[0];
|