@rjsf/utils 5.22.4 → 5.23.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.
- package/dist/index.js +166 -55
- package/dist/index.js.map +2 -2
- package/dist/utils.esm.js +166 -55
- package/dist/utils.esm.js.map +2 -2
- package/dist/utils.umd.js +178 -59
- package/lib/ErrorSchemaBuilder.js +3 -3
- package/lib/ErrorSchemaBuilder.js.map +1 -1
- package/lib/createSchemaUtils.js +7 -7
- package/lib/createSchemaUtils.js.map +1 -1
- package/lib/schema/getClosestMatchingOption.d.ts +5 -3
- package/lib/schema/getClosestMatchingOption.js +11 -7
- package/lib/schema/getClosestMatchingOption.js.map +1 -1
- package/lib/schema/getDefaultFormState.d.ts +1 -1
- package/lib/schema/getDefaultFormState.js +28 -11
- package/lib/schema/getDefaultFormState.js.map +1 -1
- package/lib/schema/getDisplayLabel.d.ts +3 -2
- package/lib/schema/getDisplayLabel.js +4 -3
- package/lib/schema/getDisplayLabel.js.map +1 -1
- package/lib/schema/isFilesArray.d.ts +3 -2
- package/lib/schema/isFilesArray.js +3 -2
- package/lib/schema/isFilesArray.js.map +1 -1
- package/lib/schema/isMultiSelect.d.ts +3 -2
- package/lib/schema/isMultiSelect.js +3 -2
- package/lib/schema/isMultiSelect.js.map +1 -1
- package/lib/schema/isSelect.d.ts +3 -2
- package/lib/schema/isSelect.js +3 -2
- package/lib/schema/isSelect.js.map +1 -1
- package/lib/schema/retrieveSchema.d.ts +2 -1
- package/lib/schema/retrieveSchema.js +5 -4
- package/lib/schema/retrieveSchema.js.map +1 -1
- package/lib/schema/sanitizeDataForNewSchema.d.ts +3 -2
- package/lib/schema/sanitizeDataForNewSchema.js +8 -7
- package/lib/schema/sanitizeDataForNewSchema.js.map +1 -1
- package/lib/schema/toIdSchema.js +1 -1
- package/lib/schema/toIdSchema.js.map +1 -1
- package/lib/schema/toPathSchema.d.ts +3 -2
- package/lib/schema/toPathSchema.js +13 -11
- package/lib/schema/toPathSchema.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types.d.ts +12 -0
- package/package.json +2 -2
- package/src/ErrorSchemaBuilder.ts +3 -3
- package/src/createSchemaUtils.ts +29 -7
- package/src/schema/getClosestMatchingOption.ts +31 -8
- package/src/schema/getDefaultFormState.ts +35 -10
- package/src/schema/getDisplayLabel.ts +6 -3
- package/src/schema/isFilesArray.ts +18 -3
- package/src/schema/isMultiSelect.ts +9 -3
- package/src/schema/isSelect.ts +5 -3
- package/src/schema/retrieveSchema.ts +19 -4
- package/src/schema/sanitizeDataForNewSchema.ts +49 -8
- package/src/schema/toIdSchema.ts +1 -1
- package/src/schema/toPathSchema.ts +45 -12
- package/src/types.ts +12 -0
package/dist/utils.umd.js
CHANGED
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
}
|
|
514
514
|
return isEqual4(schema, resolvedSchema) ? schema : resolvedSchema;
|
|
515
515
|
}
|
|
516
|
-
function stubExistingAdditionalProperties(validator, theSchema, rootSchema, aFormData) {
|
|
516
|
+
function stubExistingAdditionalProperties(validator, theSchema, rootSchema, aFormData, experimental_customMergeAllOf) {
|
|
517
517
|
const schema = {
|
|
518
518
|
...theSchema,
|
|
519
519
|
properties: { ...theSchema.properties }
|
|
@@ -530,7 +530,8 @@
|
|
|
530
530
|
validator,
|
|
531
531
|
{ $ref: get8(schema.additionalProperties, [REF_KEY]) },
|
|
532
532
|
rootSchema,
|
|
533
|
-
formData
|
|
533
|
+
formData,
|
|
534
|
+
experimental_customMergeAllOf
|
|
534
535
|
);
|
|
535
536
|
} else if ("type" in schema.additionalProperties) {
|
|
536
537
|
additionalProperties = { ...schema.additionalProperties };
|
|
@@ -560,7 +561,8 @@
|
|
|
560
561
|
rootSchema,
|
|
561
562
|
expandAllBranches,
|
|
562
563
|
recurseList,
|
|
563
|
-
rawFormData
|
|
564
|
+
rawFormData,
|
|
565
|
+
experimental_customMergeAllOf
|
|
564
566
|
);
|
|
565
567
|
return resolvedSchemas.flatMap((s) => {
|
|
566
568
|
let resolvedSchema = s;
|
|
@@ -607,7 +609,13 @@
|
|
|
607
609
|
}
|
|
608
610
|
const hasAdditionalProperties = ADDITIONAL_PROPERTIES_KEY in resolvedSchema && resolvedSchema.additionalProperties !== false;
|
|
609
611
|
if (hasAdditionalProperties) {
|
|
610
|
-
return stubExistingAdditionalProperties(
|
|
612
|
+
return stubExistingAdditionalProperties(
|
|
613
|
+
validator,
|
|
614
|
+
resolvedSchema,
|
|
615
|
+
rootSchema,
|
|
616
|
+
rawFormData,
|
|
617
|
+
experimental_customMergeAllOf
|
|
618
|
+
);
|
|
611
619
|
}
|
|
612
620
|
return resolvedSchema;
|
|
613
621
|
});
|
|
@@ -792,7 +800,7 @@
|
|
|
792
800
|
}
|
|
793
801
|
}
|
|
794
802
|
};
|
|
795
|
-
function calculateIndexScore(validator, rootSchema, schema, formData) {
|
|
803
|
+
function calculateIndexScore(validator, rootSchema, schema, formData, experimental_customMergeAllOf) {
|
|
796
804
|
let totalScore = 0;
|
|
797
805
|
if (schema) {
|
|
798
806
|
if (isObject2(schema.properties)) {
|
|
@@ -804,8 +812,20 @@
|
|
|
804
812
|
return score;
|
|
805
813
|
}
|
|
806
814
|
if (has3(value, REF_KEY)) {
|
|
807
|
-
const newSchema = retrieveSchema(
|
|
808
|
-
|
|
815
|
+
const newSchema = retrieveSchema(
|
|
816
|
+
validator,
|
|
817
|
+
value,
|
|
818
|
+
rootSchema,
|
|
819
|
+
formValue,
|
|
820
|
+
experimental_customMergeAllOf
|
|
821
|
+
);
|
|
822
|
+
return score + calculateIndexScore(
|
|
823
|
+
validator,
|
|
824
|
+
rootSchema,
|
|
825
|
+
newSchema,
|
|
826
|
+
formValue || {},
|
|
827
|
+
experimental_customMergeAllOf
|
|
828
|
+
);
|
|
809
829
|
}
|
|
810
830
|
if ((has3(value, ONE_OF_KEY) || has3(value, ANY_OF_KEY)) && formValue) {
|
|
811
831
|
const key2 = has3(value, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;
|
|
@@ -816,14 +836,15 @@
|
|
|
816
836
|
formValue,
|
|
817
837
|
get8(value, key2),
|
|
818
838
|
-1,
|
|
819
|
-
discriminator
|
|
839
|
+
discriminator,
|
|
840
|
+
experimental_customMergeAllOf
|
|
820
841
|
);
|
|
821
842
|
}
|
|
822
843
|
if (value.type === "object") {
|
|
823
844
|
if (isObject2(formValue)) {
|
|
824
845
|
score += 1;
|
|
825
846
|
}
|
|
826
|
-
return score + calculateIndexScore(validator, rootSchema, value, formValue);
|
|
847
|
+
return score + calculateIndexScore(validator, rootSchema, value, formValue, experimental_customMergeAllOf);
|
|
827
848
|
}
|
|
828
849
|
if (value.type === guessType(formValue)) {
|
|
829
850
|
let newScore = score + 1;
|
|
@@ -844,7 +865,7 @@
|
|
|
844
865
|
}
|
|
845
866
|
return totalScore;
|
|
846
867
|
}
|
|
847
|
-
function getClosestMatchingOption(validator, rootSchema, formData, options, selectedOption = -1, discriminatorField) {
|
|
868
|
+
function getClosestMatchingOption(validator, rootSchema, formData, options, selectedOption = -1, discriminatorField, experimental_customMergeAllOf) {
|
|
848
869
|
const resolvedOptions = options.map((option) => {
|
|
849
870
|
return resolveAllReferences(option, rootSchema, []);
|
|
850
871
|
});
|
|
@@ -871,7 +892,7 @@
|
|
|
871
892
|
(scoreData, index) => {
|
|
872
893
|
const { bestScore } = scoreData;
|
|
873
894
|
const option = resolvedOptions[index];
|
|
874
|
-
const score = calculateIndexScore(validator, rootSchema, option, formData);
|
|
895
|
+
const score = calculateIndexScore(validator, rootSchema, option, formData, experimental_customMergeAllOf);
|
|
875
896
|
scoreCount.add(score);
|
|
876
897
|
if (score > bestScore) {
|
|
877
898
|
return { bestIndex: index, bestScore: score };
|
|
@@ -957,8 +978,8 @@
|
|
|
957
978
|
}
|
|
958
979
|
|
|
959
980
|
// src/schema/isSelect.ts
|
|
960
|
-
function isSelect(validator, theSchema, rootSchema = {}) {
|
|
961
|
-
const schema = retrieveSchema(validator, theSchema, rootSchema, void 0);
|
|
981
|
+
function isSelect(validator, theSchema, rootSchema = {}, experimental_customMergeAllOf) {
|
|
982
|
+
const schema = retrieveSchema(validator, theSchema, rootSchema, void 0, experimental_customMergeAllOf);
|
|
962
983
|
const altSchemas = schema.oneOf || schema.anyOf;
|
|
963
984
|
if (Array.isArray(schema.enum)) {
|
|
964
985
|
return true;
|
|
@@ -970,14 +991,15 @@
|
|
|
970
991
|
}
|
|
971
992
|
|
|
972
993
|
// src/schema/isMultiSelect.ts
|
|
973
|
-
function isMultiSelect(validator, schema, rootSchema) {
|
|
994
|
+
function isMultiSelect(validator, schema, rootSchema, experimental_customMergeAllOf) {
|
|
974
995
|
if (!schema.uniqueItems || !schema.items || typeof schema.items === "boolean") {
|
|
975
996
|
return false;
|
|
976
997
|
}
|
|
977
|
-
return isSelect(validator, schema.items, rootSchema);
|
|
998
|
+
return isSelect(validator, schema.items, rootSchema, experimental_customMergeAllOf);
|
|
978
999
|
}
|
|
979
1000
|
|
|
980
1001
|
// src/schema/getDefaultFormState.ts
|
|
1002
|
+
var PRIMITIVE_TYPES = ["string", "number", "integer", "boolean", "null"];
|
|
981
1003
|
function getInnerSchemaForArrayItem(schema, additionalItems = 0 /* Ignore */, idx = -1) {
|
|
982
1004
|
if (idx >= 0) {
|
|
983
1005
|
if (Array.isArray(schema.items) && idx < schema.items.length) {
|
|
@@ -1033,8 +1055,9 @@
|
|
|
1033
1055
|
const schema = isObject(rawSchema) ? rawSchema : {};
|
|
1034
1056
|
let defaults = parentDefaults;
|
|
1035
1057
|
let schemaToCompute = null;
|
|
1058
|
+
let experimental_dfsb_to_compute = experimental_defaultFormStateBehavior;
|
|
1036
1059
|
let updatedRecurseList = _recurseList;
|
|
1037
|
-
if (
|
|
1060
|
+
if (schema[CONST_KEY] && experimental_defaultFormStateBehavior?.constAsDefaults !== "never") {
|
|
1038
1061
|
defaults = schema.const;
|
|
1039
1062
|
} else if (isObject(defaults) && isObject(schema.default)) {
|
|
1040
1063
|
defaults = mergeObjects(defaults, schema.default);
|
|
@@ -1068,6 +1091,7 @@
|
|
|
1068
1091
|
includeUndefinedValues,
|
|
1069
1092
|
_recurseList,
|
|
1070
1093
|
experimental_defaultFormStateBehavior,
|
|
1094
|
+
experimental_customMergeAllOf,
|
|
1071
1095
|
parentDefaults: Array.isArray(parentDefaults) ? parentDefaults[idx] : void 0,
|
|
1072
1096
|
rawFormData: formData,
|
|
1073
1097
|
required
|
|
@@ -1079,13 +1103,18 @@
|
|
|
1079
1103
|
return void 0;
|
|
1080
1104
|
}
|
|
1081
1105
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
1106
|
+
const { type = "null" } = remaining;
|
|
1107
|
+
if (!Array.isArray(type) && PRIMITIVE_TYPES.includes(type) && experimental_dfsb_to_compute?.constAsDefaults === "skipOneOf") {
|
|
1108
|
+
experimental_dfsb_to_compute = { ...experimental_dfsb_to_compute, constAsDefaults: "never" };
|
|
1109
|
+
}
|
|
1082
1110
|
schemaToCompute = oneOf[getClosestMatchingOption(
|
|
1083
1111
|
validator,
|
|
1084
1112
|
rootSchema,
|
|
1085
1113
|
isEmpty(formData) ? void 0 : formData,
|
|
1086
1114
|
oneOf,
|
|
1087
1115
|
0,
|
|
1088
|
-
discriminator
|
|
1116
|
+
discriminator,
|
|
1117
|
+
experimental_customMergeAllOf
|
|
1089
1118
|
)];
|
|
1090
1119
|
schemaToCompute = mergeSchemas(remaining, schemaToCompute);
|
|
1091
1120
|
} else if (ANY_OF_KEY in schema) {
|
|
@@ -1100,7 +1129,8 @@
|
|
|
1100
1129
|
isEmpty(formData) ? void 0 : formData,
|
|
1101
1130
|
anyOf,
|
|
1102
1131
|
0,
|
|
1103
|
-
discriminator
|
|
1132
|
+
discriminator,
|
|
1133
|
+
experimental_customMergeAllOf
|
|
1104
1134
|
)];
|
|
1105
1135
|
schemaToCompute = mergeSchemas(remaining, schemaToCompute);
|
|
1106
1136
|
}
|
|
@@ -1109,7 +1139,8 @@
|
|
|
1109
1139
|
rootSchema,
|
|
1110
1140
|
includeUndefinedValues,
|
|
1111
1141
|
_recurseList: updatedRecurseList,
|
|
1112
|
-
experimental_defaultFormStateBehavior,
|
|
1142
|
+
experimental_defaultFormStateBehavior: experimental_dfsb_to_compute,
|
|
1143
|
+
experimental_customMergeAllOf,
|
|
1113
1144
|
parentDefaults: defaults,
|
|
1114
1145
|
rawFormData: formData,
|
|
1115
1146
|
required
|
|
@@ -1139,7 +1170,7 @@
|
|
|
1139
1170
|
(acc, key) => {
|
|
1140
1171
|
const propertySchema = get8(retrievedSchema, [PROPERTIES_KEY, key]);
|
|
1141
1172
|
const hasParentConst = isObject(parentConst) && parentConst[key] !== void 0;
|
|
1142
|
-
const hasConst = isObject(propertySchema) && CONST_KEY in propertySchema || hasParentConst;
|
|
1173
|
+
const hasConst = (isObject(propertySchema) && CONST_KEY in propertySchema || hasParentConst) && experimental_defaultFormStateBehavior?.constAsDefaults !== "never";
|
|
1143
1174
|
const computedDefault = computeDefaults(validator, propertySchema, {
|
|
1144
1175
|
rootSchema,
|
|
1145
1176
|
_recurseList,
|
|
@@ -1180,6 +1211,7 @@
|
|
|
1180
1211
|
rootSchema,
|
|
1181
1212
|
_recurseList,
|
|
1182
1213
|
experimental_defaultFormStateBehavior,
|
|
1214
|
+
experimental_customMergeAllOf,
|
|
1183
1215
|
includeUndefinedValues: includeUndefinedValues === true,
|
|
1184
1216
|
parentDefaults: get8(defaults, [key]),
|
|
1185
1217
|
rawFormData: get8(formData, [key]),
|
|
@@ -1203,6 +1235,7 @@
|
|
|
1203
1235
|
rootSchema = {},
|
|
1204
1236
|
_recurseList = [],
|
|
1205
1237
|
experimental_defaultFormStateBehavior = void 0,
|
|
1238
|
+
experimental_customMergeAllOf = void 0,
|
|
1206
1239
|
required
|
|
1207
1240
|
} = {}, defaults) {
|
|
1208
1241
|
const schema = rawSchema;
|
|
@@ -1221,6 +1254,7 @@
|
|
|
1221
1254
|
rootSchema,
|
|
1222
1255
|
_recurseList,
|
|
1223
1256
|
experimental_defaultFormStateBehavior,
|
|
1257
|
+
experimental_customMergeAllOf,
|
|
1224
1258
|
parentDefaults: item,
|
|
1225
1259
|
required
|
|
1226
1260
|
});
|
|
@@ -1236,6 +1270,7 @@
|
|
|
1236
1270
|
rootSchema,
|
|
1237
1271
|
_recurseList,
|
|
1238
1272
|
experimental_defaultFormStateBehavior,
|
|
1273
|
+
experimental_customMergeAllOf,
|
|
1239
1274
|
rawFormData: item,
|
|
1240
1275
|
parentDefaults: get8(defaults, [idx]),
|
|
1241
1276
|
required
|
|
@@ -1245,7 +1280,7 @@
|
|
|
1245
1280
|
defaults = mergeDefaultsWithFormData(defaults, itemDefaults, mergeExtraDefaults);
|
|
1246
1281
|
}
|
|
1247
1282
|
}
|
|
1248
|
-
const hasConst = isObject(schema) && CONST_KEY in schema;
|
|
1283
|
+
const hasConst = isObject(schema) && CONST_KEY in schema && experimental_defaultFormStateBehavior?.constAsDefaults !== "never";
|
|
1249
1284
|
if (hasConst === false) {
|
|
1250
1285
|
if (neverPopulate) {
|
|
1251
1286
|
return defaults ?? emptyDefault;
|
|
@@ -1255,7 +1290,7 @@
|
|
|
1255
1290
|
}
|
|
1256
1291
|
}
|
|
1257
1292
|
const defaultsLength = Array.isArray(defaults) ? defaults.length : 0;
|
|
1258
|
-
if (!schema.minItems || isMultiSelect(validator, schema, rootSchema) || computeSkipPopulate(validator, schema, rootSchema) || schema.minItems <= defaultsLength) {
|
|
1293
|
+
if (!schema.minItems || isMultiSelect(validator, schema, rootSchema, experimental_customMergeAllOf) || computeSkipPopulate(validator, schema, rootSchema) || schema.minItems <= defaultsLength) {
|
|
1259
1294
|
return defaults ? defaults : emptyDefault;
|
|
1260
1295
|
}
|
|
1261
1296
|
const defaultEntries = defaults || [];
|
|
@@ -1267,6 +1302,7 @@
|
|
|
1267
1302
|
rootSchema,
|
|
1268
1303
|
_recurseList,
|
|
1269
1304
|
experimental_defaultFormStateBehavior,
|
|
1305
|
+
experimental_customMergeAllOf,
|
|
1270
1306
|
required
|
|
1271
1307
|
})
|
|
1272
1308
|
);
|
|
@@ -1319,25 +1355,31 @@
|
|
|
1319
1355
|
}
|
|
1320
1356
|
|
|
1321
1357
|
// src/schema/isFilesArray.ts
|
|
1322
|
-
function isFilesArray(validator, schema, uiSchema = {}, rootSchema) {
|
|
1358
|
+
function isFilesArray(validator, schema, uiSchema = {}, rootSchema, experimental_customMergeAllOf) {
|
|
1323
1359
|
if (uiSchema[UI_WIDGET_KEY] === "files") {
|
|
1324
1360
|
return true;
|
|
1325
1361
|
}
|
|
1326
1362
|
if (schema.items) {
|
|
1327
|
-
const itemsSchema = retrieveSchema(
|
|
1363
|
+
const itemsSchema = retrieveSchema(
|
|
1364
|
+
validator,
|
|
1365
|
+
schema.items,
|
|
1366
|
+
rootSchema,
|
|
1367
|
+
void 0,
|
|
1368
|
+
experimental_customMergeAllOf
|
|
1369
|
+
);
|
|
1328
1370
|
return itemsSchema.type === "string" && itemsSchema.format === "data-url";
|
|
1329
1371
|
}
|
|
1330
1372
|
return false;
|
|
1331
1373
|
}
|
|
1332
1374
|
|
|
1333
1375
|
// src/schema/getDisplayLabel.ts
|
|
1334
|
-
function getDisplayLabel(validator, schema, uiSchema = {}, rootSchema, globalOptions) {
|
|
1376
|
+
function getDisplayLabel(validator, schema, uiSchema = {}, rootSchema, globalOptions, experimental_customMergeAllOf) {
|
|
1335
1377
|
const uiOptions = getUiOptions(uiSchema, globalOptions);
|
|
1336
1378
|
const { label = true } = uiOptions;
|
|
1337
1379
|
let displayLabel = !!label;
|
|
1338
1380
|
const schemaType = getSchemaType(schema);
|
|
1339
1381
|
if (schemaType === "array") {
|
|
1340
|
-
displayLabel = isMultiSelect(validator, schema, rootSchema) || isFilesArray(validator, schema, uiSchema, rootSchema) || isCustomWidget(uiSchema);
|
|
1382
|
+
displayLabel = isMultiSelect(validator, schema, rootSchema, experimental_customMergeAllOf) || isFilesArray(validator, schema, uiSchema, rootSchema, experimental_customMergeAllOf) || isCustomWidget(uiSchema);
|
|
1341
1383
|
}
|
|
1342
1384
|
if (schemaType === "object") {
|
|
1343
1385
|
displayLabel = false;
|
|
@@ -1364,7 +1406,7 @@
|
|
|
1364
1406
|
return { errorSchema, errors };
|
|
1365
1407
|
}
|
|
1366
1408
|
var NO_VALUE = Symbol("no Value");
|
|
1367
|
-
function sanitizeDataForNewSchema(validator, rootSchema, newSchema, oldSchema, data = {}) {
|
|
1409
|
+
function sanitizeDataForNewSchema(validator, rootSchema, newSchema, oldSchema, data = {}, experimental_customMergeAllOf) {
|
|
1368
1410
|
let newFormData;
|
|
1369
1411
|
if (has3(newSchema, PROPERTIES_KEY)) {
|
|
1370
1412
|
const removeOldSchemaData = {};
|
|
@@ -1383,10 +1425,22 @@
|
|
|
1383
1425
|
let oldKeyedSchema = get8(oldSchema, [PROPERTIES_KEY, key], {});
|
|
1384
1426
|
let newKeyedSchema = get8(newSchema, [PROPERTIES_KEY, key], {});
|
|
1385
1427
|
if (has3(oldKeyedSchema, REF_KEY)) {
|
|
1386
|
-
oldKeyedSchema = retrieveSchema(
|
|
1428
|
+
oldKeyedSchema = retrieveSchema(
|
|
1429
|
+
validator,
|
|
1430
|
+
oldKeyedSchema,
|
|
1431
|
+
rootSchema,
|
|
1432
|
+
formValue,
|
|
1433
|
+
experimental_customMergeAllOf
|
|
1434
|
+
);
|
|
1387
1435
|
}
|
|
1388
1436
|
if (has3(newKeyedSchema, REF_KEY)) {
|
|
1389
|
-
newKeyedSchema = retrieveSchema(
|
|
1437
|
+
newKeyedSchema = retrieveSchema(
|
|
1438
|
+
validator,
|
|
1439
|
+
newKeyedSchema,
|
|
1440
|
+
rootSchema,
|
|
1441
|
+
formValue,
|
|
1442
|
+
experimental_customMergeAllOf
|
|
1443
|
+
);
|
|
1390
1444
|
}
|
|
1391
1445
|
const oldSchemaTypeForKey = get8(oldKeyedSchema, "type");
|
|
1392
1446
|
const newSchemaTypeForKey = get8(newKeyedSchema, "type");
|
|
@@ -1400,7 +1454,8 @@
|
|
|
1400
1454
|
rootSchema,
|
|
1401
1455
|
newKeyedSchema,
|
|
1402
1456
|
oldKeyedSchema,
|
|
1403
|
-
formValue
|
|
1457
|
+
formValue,
|
|
1458
|
+
experimental_customMergeAllOf
|
|
1404
1459
|
);
|
|
1405
1460
|
if (itemData !== void 0 || newSchemaTypeForKey === "array") {
|
|
1406
1461
|
nestedData[key] = itemData;
|
|
@@ -1433,10 +1488,22 @@
|
|
|
1433
1488
|
let newSchemaItems = get8(newSchema, "items");
|
|
1434
1489
|
if (typeof oldSchemaItems === "object" && typeof newSchemaItems === "object" && !Array.isArray(oldSchemaItems) && !Array.isArray(newSchemaItems)) {
|
|
1435
1490
|
if (has3(oldSchemaItems, REF_KEY)) {
|
|
1436
|
-
oldSchemaItems = retrieveSchema(
|
|
1491
|
+
oldSchemaItems = retrieveSchema(
|
|
1492
|
+
validator,
|
|
1493
|
+
oldSchemaItems,
|
|
1494
|
+
rootSchema,
|
|
1495
|
+
data,
|
|
1496
|
+
experimental_customMergeAllOf
|
|
1497
|
+
);
|
|
1437
1498
|
}
|
|
1438
1499
|
if (has3(newSchemaItems, REF_KEY)) {
|
|
1439
|
-
newSchemaItems = retrieveSchema(
|
|
1500
|
+
newSchemaItems = retrieveSchema(
|
|
1501
|
+
validator,
|
|
1502
|
+
newSchemaItems,
|
|
1503
|
+
rootSchema,
|
|
1504
|
+
data,
|
|
1505
|
+
experimental_customMergeAllOf
|
|
1506
|
+
);
|
|
1440
1507
|
}
|
|
1441
1508
|
const oldSchemaType = get8(oldSchemaItems, "type");
|
|
1442
1509
|
const newSchemaType = get8(newSchemaItems, "type");
|
|
@@ -1449,7 +1516,8 @@
|
|
|
1449
1516
|
rootSchema,
|
|
1450
1517
|
newSchemaItems,
|
|
1451
1518
|
oldSchemaItems,
|
|
1452
|
-
aValue
|
|
1519
|
+
aValue,
|
|
1520
|
+
experimental_customMergeAllOf
|
|
1453
1521
|
);
|
|
1454
1522
|
if (itemValue !== void 0 && (maxItems < 0 || newValue.length < maxItems)) {
|
|
1455
1523
|
newValue.push(itemValue);
|
|
@@ -1468,7 +1536,7 @@
|
|
|
1468
1536
|
}
|
|
1469
1537
|
function toIdSchemaInternal(validator, schema, idPrefix, idSeparator, id, rootSchema, formData, _recurseList = [], experimental_customMergeAllOf) {
|
|
1470
1538
|
if (REF_KEY in schema || DEPENDENCIES_KEY in schema || ALL_OF_KEY in schema) {
|
|
1471
|
-
const _schema = retrieveSchema(validator, schema, rootSchema, formData);
|
|
1539
|
+
const _schema = retrieveSchema(validator, schema, rootSchema, formData, experimental_customMergeAllOf);
|
|
1472
1540
|
const sameSchemaIndex = _recurseList.findIndex((item) => isEqual4(item, _schema));
|
|
1473
1541
|
if (sameSchemaIndex === -1) {
|
|
1474
1542
|
return toIdSchemaInternal(
|
|
@@ -1479,7 +1547,9 @@
|
|
|
1479
1547
|
id,
|
|
1480
1548
|
rootSchema,
|
|
1481
1549
|
formData,
|
|
1482
|
-
_recurseList.concat(_schema)
|
|
1550
|
+
_recurseList.concat(_schema),
|
|
1551
|
+
experimental_customMergeAllOf
|
|
1552
|
+
);
|
|
1483
1553
|
}
|
|
1484
1554
|
}
|
|
1485
1555
|
if (ITEMS_KEY in schema && !get8(schema, [ITEMS_KEY, REF_KEY])) {
|
|
@@ -1491,7 +1561,9 @@
|
|
|
1491
1561
|
id,
|
|
1492
1562
|
rootSchema,
|
|
1493
1563
|
formData,
|
|
1494
|
-
_recurseList
|
|
1564
|
+
_recurseList,
|
|
1565
|
+
experimental_customMergeAllOf
|
|
1566
|
+
);
|
|
1495
1567
|
}
|
|
1496
1568
|
const $id = id || idPrefix;
|
|
1497
1569
|
const idSchema = { $id };
|
|
@@ -1509,7 +1581,9 @@
|
|
|
1509
1581
|
// It's possible that formData is not an object -- this can happen if an
|
|
1510
1582
|
// array item has just been added, but not populated with data yet
|
|
1511
1583
|
get8(formData, [name]),
|
|
1512
|
-
_recurseList
|
|
1584
|
+
_recurseList,
|
|
1585
|
+
experimental_customMergeAllOf
|
|
1586
|
+
);
|
|
1513
1587
|
}
|
|
1514
1588
|
}
|
|
1515
1589
|
return idSchema;
|
|
@@ -1523,11 +1597,13 @@
|
|
|
1523
1597
|
id,
|
|
1524
1598
|
rootSchema,
|
|
1525
1599
|
formData,
|
|
1526
|
-
void 0
|
|
1600
|
+
void 0,
|
|
1601
|
+
experimental_customMergeAllOf
|
|
1602
|
+
);
|
|
1527
1603
|
}
|
|
1528
|
-
function toPathSchemaInternal(validator, schema, name, rootSchema, formData, _recurseList = []) {
|
|
1604
|
+
function toPathSchemaInternal(validator, schema, name, rootSchema, formData, _recurseList = [], experimental_customMergeAllOf) {
|
|
1529
1605
|
if (REF_KEY in schema || DEPENDENCIES_KEY in schema || ALL_OF_KEY in schema) {
|
|
1530
|
-
const _schema = retrieveSchema(validator, schema, rootSchema, formData);
|
|
1606
|
+
const _schema = retrieveSchema(validator, schema, rootSchema, formData, experimental_customMergeAllOf);
|
|
1531
1607
|
const sameSchemaIndex = _recurseList.findIndex((item) => isEqual4(item, _schema));
|
|
1532
1608
|
if (sameSchemaIndex === -1) {
|
|
1533
1609
|
return toPathSchemaInternal(
|
|
@@ -1536,7 +1612,8 @@
|
|
|
1536
1612
|
name,
|
|
1537
1613
|
rootSchema,
|
|
1538
1614
|
formData,
|
|
1539
|
-
_recurseList.concat(_schema)
|
|
1615
|
+
_recurseList.concat(_schema),
|
|
1616
|
+
experimental_customMergeAllOf
|
|
1540
1617
|
);
|
|
1541
1618
|
}
|
|
1542
1619
|
}
|
|
@@ -1546,11 +1623,27 @@
|
|
|
1546
1623
|
if (ONE_OF_KEY in schema || ANY_OF_KEY in schema) {
|
|
1547
1624
|
const xxxOf = ONE_OF_KEY in schema ? schema.oneOf : schema.anyOf;
|
|
1548
1625
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
1549
|
-
const index = getClosestMatchingOption(
|
|
1626
|
+
const index = getClosestMatchingOption(
|
|
1627
|
+
validator,
|
|
1628
|
+
rootSchema,
|
|
1629
|
+
formData,
|
|
1630
|
+
xxxOf,
|
|
1631
|
+
0,
|
|
1632
|
+
discriminator,
|
|
1633
|
+
experimental_customMergeAllOf
|
|
1634
|
+
);
|
|
1550
1635
|
const _schema = xxxOf[index];
|
|
1551
1636
|
pathSchema = {
|
|
1552
1637
|
...pathSchema,
|
|
1553
|
-
...toPathSchemaInternal(
|
|
1638
|
+
...toPathSchemaInternal(
|
|
1639
|
+
validator,
|
|
1640
|
+
_schema,
|
|
1641
|
+
name,
|
|
1642
|
+
rootSchema,
|
|
1643
|
+
formData,
|
|
1644
|
+
_recurseList,
|
|
1645
|
+
experimental_customMergeAllOf
|
|
1646
|
+
)
|
|
1554
1647
|
};
|
|
1555
1648
|
}
|
|
1556
1649
|
if (ADDITIONAL_PROPERTIES_KEY in schema && schema[ADDITIONAL_PROPERTIES_KEY] !== false) {
|
|
@@ -1567,7 +1660,8 @@
|
|
|
1567
1660
|
`${name}.${i}`,
|
|
1568
1661
|
rootSchema,
|
|
1569
1662
|
element,
|
|
1570
|
-
_recurseList
|
|
1663
|
+
_recurseList,
|
|
1664
|
+
experimental_customMergeAllOf
|
|
1571
1665
|
);
|
|
1572
1666
|
} else if (schemaAdditionalItems) {
|
|
1573
1667
|
pathSchema[i] = toPathSchemaInternal(
|
|
@@ -1576,7 +1670,8 @@
|
|
|
1576
1670
|
`${name}.${i}`,
|
|
1577
1671
|
rootSchema,
|
|
1578
1672
|
element,
|
|
1579
|
-
_recurseList
|
|
1673
|
+
_recurseList,
|
|
1674
|
+
experimental_customMergeAllOf
|
|
1580
1675
|
);
|
|
1581
1676
|
} else {
|
|
1582
1677
|
console.warn(`Unable to generate path schema for "${name}.${i}". No schema defined for it`);
|
|
@@ -1590,7 +1685,8 @@
|
|
|
1590
1685
|
`${name}.${i}`,
|
|
1591
1686
|
rootSchema,
|
|
1592
1687
|
element,
|
|
1593
|
-
_recurseList
|
|
1688
|
+
_recurseList,
|
|
1689
|
+
experimental_customMergeAllOf
|
|
1594
1690
|
);
|
|
1595
1691
|
});
|
|
1596
1692
|
}
|
|
@@ -1605,14 +1701,15 @@
|
|
|
1605
1701
|
// It's possible that formData is not an object -- this can happen if an
|
|
1606
1702
|
// array item has just been added, but not populated with data yet
|
|
1607
1703
|
get8(formData, [property]),
|
|
1608
|
-
_recurseList
|
|
1704
|
+
_recurseList,
|
|
1705
|
+
experimental_customMergeAllOf
|
|
1609
1706
|
);
|
|
1610
1707
|
}
|
|
1611
1708
|
}
|
|
1612
1709
|
return pathSchema;
|
|
1613
1710
|
}
|
|
1614
|
-
function toPathSchema(validator, schema, name = "", rootSchema, formData) {
|
|
1615
|
-
return toPathSchemaInternal(validator, schema, name, rootSchema, formData);
|
|
1711
|
+
function toPathSchema(validator, schema, name = "", rootSchema, formData, experimental_customMergeAllOf) {
|
|
1712
|
+
return toPathSchemaInternal(validator, schema, name, rootSchema, formData, void 0, experimental_customMergeAllOf);
|
|
1616
1713
|
}
|
|
1617
1714
|
|
|
1618
1715
|
// src/createSchemaUtils.ts
|
|
@@ -1683,7 +1780,14 @@
|
|
|
1683
1780
|
* @returns - True if the label should be displayed or false if it should not
|
|
1684
1781
|
*/
|
|
1685
1782
|
getDisplayLabel(schema, uiSchema, globalOptions) {
|
|
1686
|
-
return getDisplayLabel(
|
|
1783
|
+
return getDisplayLabel(
|
|
1784
|
+
this.validator,
|
|
1785
|
+
schema,
|
|
1786
|
+
uiSchema,
|
|
1787
|
+
this.rootSchema,
|
|
1788
|
+
globalOptions,
|
|
1789
|
+
this.experimental_customMergeAllOf
|
|
1790
|
+
);
|
|
1687
1791
|
}
|
|
1688
1792
|
/** Determines which of the given `options` provided most closely matches the `formData`.
|
|
1689
1793
|
* Returns the index of the option that is valid and is the closest match, or 0 if there is no match.
|
|
@@ -1705,7 +1809,8 @@
|
|
|
1705
1809
|
formData,
|
|
1706
1810
|
options,
|
|
1707
1811
|
selectedOption,
|
|
1708
|
-
discriminatorField
|
|
1812
|
+
discriminatorField,
|
|
1813
|
+
this.experimental_customMergeAllOf
|
|
1709
1814
|
);
|
|
1710
1815
|
}
|
|
1711
1816
|
/** Given the `formData` and list of `options`, attempts to find the index of the first option that matches the data.
|
|
@@ -1740,7 +1845,7 @@
|
|
|
1740
1845
|
* @returns - True if schema/uiSchema contains an array of files, otherwise false
|
|
1741
1846
|
*/
|
|
1742
1847
|
isFilesArray(schema, uiSchema) {
|
|
1743
|
-
return isFilesArray(this.validator, schema, uiSchema, this.rootSchema);
|
|
1848
|
+
return isFilesArray(this.validator, schema, uiSchema, this.rootSchema, this.experimental_customMergeAllOf);
|
|
1744
1849
|
}
|
|
1745
1850
|
/** Checks to see if the `schema` combination represents a multi-select
|
|
1746
1851
|
*
|
|
@@ -1748,7 +1853,7 @@
|
|
|
1748
1853
|
* @returns - True if schema contains a multi-select, otherwise false
|
|
1749
1854
|
*/
|
|
1750
1855
|
isMultiSelect(schema) {
|
|
1751
|
-
return isMultiSelect(this.validator, schema, this.rootSchema);
|
|
1856
|
+
return isMultiSelect(this.validator, schema, this.rootSchema, this.experimental_customMergeAllOf);
|
|
1752
1857
|
}
|
|
1753
1858
|
/** Checks to see if the `schema` combination represents a select
|
|
1754
1859
|
*
|
|
@@ -1756,7 +1861,7 @@
|
|
|
1756
1861
|
* @returns - True if schema contains a select, otherwise false
|
|
1757
1862
|
*/
|
|
1758
1863
|
isSelect(schema) {
|
|
1759
|
-
return isSelect(this.validator, schema, this.rootSchema);
|
|
1864
|
+
return isSelect(this.validator, schema, this.rootSchema, this.experimental_customMergeAllOf);
|
|
1760
1865
|
}
|
|
1761
1866
|
/** Merges the errors in `additionalErrorSchema` into the existing `validationData` by combining the hierarchies in
|
|
1762
1867
|
* the two `ErrorSchema`s and then appending the error list from the `additionalErrorSchema` obtained by calling
|
|
@@ -1801,7 +1906,14 @@
|
|
|
1801
1906
|
* to `undefined`. Will return `undefined` if the new schema is not an object containing properties.
|
|
1802
1907
|
*/
|
|
1803
1908
|
sanitizeDataForNewSchema(newSchema, oldSchema, data) {
|
|
1804
|
-
return sanitizeDataForNewSchema(
|
|
1909
|
+
return sanitizeDataForNewSchema(
|
|
1910
|
+
this.validator,
|
|
1911
|
+
this.rootSchema,
|
|
1912
|
+
newSchema,
|
|
1913
|
+
oldSchema,
|
|
1914
|
+
data,
|
|
1915
|
+
this.experimental_customMergeAllOf
|
|
1916
|
+
);
|
|
1805
1917
|
}
|
|
1806
1918
|
/** Generates an `IdSchema` object for the `schema`, recursively
|
|
1807
1919
|
*
|
|
@@ -1832,7 +1944,14 @@
|
|
|
1832
1944
|
* @returns - The `PathSchema` object for the `schema`
|
|
1833
1945
|
*/
|
|
1834
1946
|
toPathSchema(schema, name, formData) {
|
|
1835
|
-
return toPathSchema(
|
|
1947
|
+
return toPathSchema(
|
|
1948
|
+
this.validator,
|
|
1949
|
+
schema,
|
|
1950
|
+
name,
|
|
1951
|
+
this.rootSchema,
|
|
1952
|
+
formData,
|
|
1953
|
+
this.experimental_customMergeAllOf
|
|
1954
|
+
);
|
|
1836
1955
|
}
|
|
1837
1956
|
};
|
|
1838
1957
|
function createSchemaUtils(validator, rootSchema, experimental_defaultFormStateBehavior = {}, experimental_customMergeAllOf) {
|
|
@@ -2024,9 +2143,9 @@
|
|
|
2024
2143
|
errorBlock[ERRORS_KEY] = errorsList;
|
|
2025
2144
|
}
|
|
2026
2145
|
if (Array.isArray(errorOrList)) {
|
|
2027
|
-
|
|
2146
|
+
set3(errorBlock, ERRORS_KEY, [.../* @__PURE__ */ new Set([...errorsList, ...errorOrList])]);
|
|
2028
2147
|
} else {
|
|
2029
|
-
errorsList
|
|
2148
|
+
set3(errorBlock, ERRORS_KEY, [.../* @__PURE__ */ new Set([...errorsList, errorOrList])]);
|
|
2030
2149
|
}
|
|
2031
2150
|
return this;
|
|
2032
2151
|
}
|
|
@@ -2040,7 +2159,7 @@
|
|
|
2040
2159
|
*/
|
|
2041
2160
|
setErrors(errorOrList, pathOfError) {
|
|
2042
2161
|
const errorBlock = this.getOrCreateErrorBlock(pathOfError);
|
|
2043
|
-
const listToAdd = Array.isArray(errorOrList) ? [...errorOrList] : [errorOrList];
|
|
2162
|
+
const listToAdd = Array.isArray(errorOrList) ? [.../* @__PURE__ */ new Set([...errorOrList])] : [errorOrList];
|
|
2044
2163
|
set3(errorBlock, ERRORS_KEY, listToAdd);
|
|
2045
2164
|
return this;
|
|
2046
2165
|
}
|
|
@@ -66,10 +66,10 @@ export default class ErrorSchemaBuilder {
|
|
|
66
66
|
errorBlock[ERRORS_KEY] = errorsList;
|
|
67
67
|
}
|
|
68
68
|
if (Array.isArray(errorOrList)) {
|
|
69
|
-
|
|
69
|
+
set(errorBlock, ERRORS_KEY, [...new Set([...errorsList, ...errorOrList])]);
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
|
-
errorsList
|
|
72
|
+
set(errorBlock, ERRORS_KEY, [...new Set([...errorsList, errorOrList])]);
|
|
73
73
|
}
|
|
74
74
|
return this;
|
|
75
75
|
}
|
|
@@ -84,7 +84,7 @@ export default class ErrorSchemaBuilder {
|
|
|
84
84
|
setErrors(errorOrList, pathOfError) {
|
|
85
85
|
const errorBlock = this.getOrCreateErrorBlock(pathOfError);
|
|
86
86
|
// Effectively clone the array being given to prevent accidental outside manipulation of the given list
|
|
87
|
-
const listToAdd = Array.isArray(errorOrList) ? [...errorOrList] : [errorOrList];
|
|
87
|
+
const listToAdd = Array.isArray(errorOrList) ? [...new Set([...errorOrList])] : [errorOrList];
|
|
88
88
|
set(errorBlock, ERRORS_KEY, listToAdd);
|
|
89
89
|
return this;
|
|
90
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorSchemaBuilder.js","sourceRoot":"","sources":["../src/ErrorSchemaBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAGrC,OAAO,EAAE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