@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.
@@ -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',
@@ -1,6 +1,6 @@
1
1
  import { convertDiskSizeFromTo } from '../utils';
2
2
 
3
- describe('utils', () => {
3
+ describe('convertDiskSizeFromTo()', () => {
4
4
  it('should convert bytes to KB', () => {
5
5
  const convert = convertDiskSizeFromTo('Bytes', 'KB');
6
6
  expect(convert(1024)).toBe(1);