@es-joy/jsoe 0.20.0 → 0.20.1
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/CHANGES.md +6 -0
- package/dist/index.js +5 -3
- package/dist/typeChoices.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/formats/schema.js +1 -1
- package/src/formats/structuredCloning.js +1 -1
- package/src/typeChoices.js +3 -1
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CHANGES TO `@es-joy/jsoe`
|
|
2
2
|
|
|
3
|
+
## 0.20.1
|
|
4
|
+
|
|
5
|
+
- fix: allow detection of matching schema which are copies and not references
|
|
6
|
+
- fix: should pass original schema to editUI for `schemaContent`
|
|
7
|
+
- fix: refer to original JSON
|
|
8
|
+
|
|
3
9
|
## 0.20.0
|
|
4
10
|
|
|
5
11
|
- feat: make `getTypesForSchema` public
|
package/dist/index.js
CHANGED
|
@@ -2796,7 +2796,9 @@ const buildTypeChoices = ({
|
|
|
2796
2796
|
*/
|
|
2797
2797
|
$setTypeNoEditUI ({type, specificSchema}) {
|
|
2798
2798
|
if (schemaObjs && specificSchema) {
|
|
2799
|
-
const idx = schemaObjs.
|
|
2799
|
+
const idx = schemaObjs.map((obj) => {
|
|
2800
|
+
return JSON.stringify(obj);
|
|
2801
|
+
}).indexOf(JSON.stringify(specificSchema));
|
|
2800
2802
|
this.selectedIndex = idx + 1;
|
|
2801
2803
|
} else {
|
|
2802
2804
|
this.value = type;
|
|
@@ -3377,7 +3379,7 @@ const encapsulateObserver = (stateObj) => {
|
|
|
3377
3379
|
buildTypeChoices,
|
|
3378
3380
|
format,
|
|
3379
3381
|
specificSchemaObject: schema,
|
|
3380
|
-
schemaContent
|
|
3382
|
+
schemaContent,
|
|
3381
3383
|
value: newValue,
|
|
3382
3384
|
hasValue: true,
|
|
3383
3385
|
// Not currently in use but may be convenient for a
|
|
@@ -9135,7 +9137,7 @@ const schema = {
|
|
|
9135
9137
|
}
|
|
9136
9138
|
const schemaObjects = [...getTypesForSchema(
|
|
9137
9139
|
/** @type {import('zodex').SzType} */ (currentSchema),
|
|
9138
|
-
/** @type {import('zodex').SzType} */ (
|
|
9140
|
+
/** @type {import('zodex').SzType} */ (stateObj.schemaContent)
|
|
9139
9141
|
)];
|
|
9140
9142
|
// console.log(
|
|
9141
9143
|
// 'vvv', v, currentSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeChoices.d.ts","sourceRoot":"","sources":["../src/typeChoices.js"],"names":[],"mappings":"AASA;;;;;;;GAOG;AAEH;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;GAEG;AACH,+BAFU,gBAAgB,
|
|
1
|
+
{"version":3,"file":"typeChoices.d.ts","sourceRoot":"","sources":["../src/typeChoices.js"],"names":[],"mappings":"AASA;;;;;;;GAOG;AAEH;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;GAEG;AACH,+BAFU,gBAAgB,CAmUxB;sBA/ZW,CAAC,GAAG,EAAE;IAClB,IAAQ,EAAE,MAAM,CAAC;IACjB,SAAa,CAAC,EAAE,OAAO,cAAc,EAAE,oBAAoB,CAAC;IAC5D,cAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAe,CAAC,EAAE,OAAO,CAAA;CACtB,KAAK,IAAI;+BAIA,CAAC,IAAI,EAAE;IACnB,IAAQ,EAAE,MAAM,CAAC;IACjB,MAAU,EAAE,OAAO,CAAC;IACpB,cAAkB,CAAC,EAAE,OAAO,OAAO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EAAE,WAAW,CAAC;IACrE,aAAiB,CAAC,EAAE,OAAO,2BAA2B,EAAE,WAAW,CAAC;CACjE,KACS;IACZ,QAAY,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;IAChE,QAAY,EAAE,QAAQ,CAAC;IACvB,OAAW,EAAE,OAAO,CAAC;IACrB,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAA;CACnB"}
|
package/package.json
CHANGED
package/src/formats/schema.js
CHANGED
|
@@ -651,7 +651,7 @@ const schema = {
|
|
|
651
651
|
}
|
|
652
652
|
const schemaObjects = [...getTypesForSchema(
|
|
653
653
|
/** @type {import('zodex').SzType} */ (currentSchema),
|
|
654
|
-
/** @type {import('zodex').SzType} */ (
|
|
654
|
+
/** @type {import('zodex').SzType} */ (stateObj.schemaContent)
|
|
655
655
|
)];
|
|
656
656
|
// console.log(
|
|
657
657
|
// 'vvv', v, currentSchema,
|
|
@@ -214,7 +214,7 @@ const encapsulateObserver = (stateObj) => {
|
|
|
214
214
|
buildTypeChoices,
|
|
215
215
|
format,
|
|
216
216
|
specificSchemaObject: schema,
|
|
217
|
-
schemaContent
|
|
217
|
+
schemaContent,
|
|
218
218
|
value: newValue,
|
|
219
219
|
hasValue: true,
|
|
220
220
|
// Not currently in use but may be convenient for a
|
package/src/typeChoices.js
CHANGED
|
@@ -174,7 +174,9 @@ export const buildTypeChoices = ({
|
|
|
174
174
|
*/
|
|
175
175
|
$setTypeNoEditUI ({type, specificSchema}) {
|
|
176
176
|
if (schemaObjs && specificSchema) {
|
|
177
|
-
const idx = schemaObjs.
|
|
177
|
+
const idx = schemaObjs.map((obj) => {
|
|
178
|
+
return JSON.stringify(obj);
|
|
179
|
+
}).indexOf(JSON.stringify(specificSchema));
|
|
178
180
|
this.selectedIndex = idx + 1;
|
|
179
181
|
} else {
|
|
180
182
|
this.value = type;
|