@remoteoss/json-schema-form 0.11.9-dev.20241213082826 → 0.11.10-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.
- package/CHANGELOG.md +26 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/dist/standalone.js +5 -5
- package/package.json +2 -2
- package/src/tests/checkIfConditionMatches.test.js +57 -51
- package/src/tests/conditions.test.js +204 -42
- package/src/tests/createHeadlessForm.customValidations.test.js +2 -1
- package/src/tests/createHeadlessForm.test.js +1077 -1074
- package/src/tests/helpers.js +37 -0
- package/src/tests/utils.test.jsx +1 -1
package/src/tests/helpers.js
CHANGED
|
@@ -1201,6 +1201,43 @@ export const schemaInputTypeCheckboxBooleans = JSONSchemaBuilder()
|
|
|
1201
1201
|
.setRequiredFields(['boolean_required'])
|
|
1202
1202
|
.build();
|
|
1203
1203
|
|
|
1204
|
+
export const schemaInputTypeCheckboxBooleanConditional = {
|
|
1205
|
+
type: 'object',
|
|
1206
|
+
additionalProperties: false,
|
|
1207
|
+
properties: {
|
|
1208
|
+
has_pet: {
|
|
1209
|
+
title: 'Has Pet',
|
|
1210
|
+
'x-jsf-presentation': {
|
|
1211
|
+
inputType: 'checkbox',
|
|
1212
|
+
},
|
|
1213
|
+
type: 'boolean',
|
|
1214
|
+
},
|
|
1215
|
+
pet_is_cat: {
|
|
1216
|
+
title: 'Pet is cat',
|
|
1217
|
+
'x-jsf-presentation': {
|
|
1218
|
+
inputType: 'checkbox',
|
|
1219
|
+
},
|
|
1220
|
+
type: 'boolean',
|
|
1221
|
+
},
|
|
1222
|
+
},
|
|
1223
|
+
allOf: [
|
|
1224
|
+
{
|
|
1225
|
+
if: {
|
|
1226
|
+
properties: {
|
|
1227
|
+
has_pet: { const: true },
|
|
1228
|
+
},
|
|
1229
|
+
required: ['has_pet'],
|
|
1230
|
+
},
|
|
1231
|
+
then: {},
|
|
1232
|
+
else: {
|
|
1233
|
+
properties: {
|
|
1234
|
+
pet_is_cat: false,
|
|
1235
|
+
},
|
|
1236
|
+
},
|
|
1237
|
+
},
|
|
1238
|
+
],
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1204
1241
|
export const schemaInputTypeNull = {
|
|
1205
1242
|
additionalProperties: false,
|
|
1206
1243
|
type: 'object',
|
package/src/tests/utils.test.jsx
CHANGED