@jsonforms/examples 3.9.0-alpha.2 → 3.9.0-alpha.3
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/lib/examples/adornments.d.ts +101 -0
- package/lib/index.d.ts +2 -1
- package/lib/jsonforms-examples.cjs.js +157 -41
- package/lib/jsonforms-examples.cjs.js.map +1 -1
- package/lib/jsonforms-examples.esm.js +157 -42
- package/lib/jsonforms-examples.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/examples/adornments.ts +136 -0
- package/src/index.ts +2 -0
- package/stats.html +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export declare const schema: {
|
|
2
|
+
type: string;
|
|
3
|
+
properties: {
|
|
4
|
+
price: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
weight: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
quantity: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
website: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
username: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
voltage: {
|
|
20
|
+
type: string;
|
|
21
|
+
enum: string[];
|
|
22
|
+
};
|
|
23
|
+
frequency: {
|
|
24
|
+
type: string;
|
|
25
|
+
oneOf: {
|
|
26
|
+
const: string;
|
|
27
|
+
title: string;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const uischema: {
|
|
33
|
+
type: string;
|
|
34
|
+
elements: ({
|
|
35
|
+
type: string;
|
|
36
|
+
elements: ({
|
|
37
|
+
type: string;
|
|
38
|
+
scope: string;
|
|
39
|
+
options: {
|
|
40
|
+
startAdornment: string;
|
|
41
|
+
endAdornment?: undefined;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
type: string;
|
|
45
|
+
scope: string;
|
|
46
|
+
options: {
|
|
47
|
+
endAdornment: string;
|
|
48
|
+
startAdornment?: undefined;
|
|
49
|
+
};
|
|
50
|
+
})[];
|
|
51
|
+
} | {
|
|
52
|
+
type: string;
|
|
53
|
+
elements: ({
|
|
54
|
+
type: string;
|
|
55
|
+
scope: string;
|
|
56
|
+
options: {
|
|
57
|
+
startAdornment: string;
|
|
58
|
+
endAdornment?: undefined;
|
|
59
|
+
};
|
|
60
|
+
} | {
|
|
61
|
+
type: string;
|
|
62
|
+
scope: string;
|
|
63
|
+
options: {
|
|
64
|
+
startAdornment: string;
|
|
65
|
+
endAdornment: string;
|
|
66
|
+
};
|
|
67
|
+
})[];
|
|
68
|
+
} | {
|
|
69
|
+
type: string;
|
|
70
|
+
elements: ({
|
|
71
|
+
type: string;
|
|
72
|
+
scope: string;
|
|
73
|
+
label: string;
|
|
74
|
+
options: {
|
|
75
|
+
endAdornment: string;
|
|
76
|
+
autocomplete?: undefined;
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
type: string;
|
|
80
|
+
scope: string;
|
|
81
|
+
label: string;
|
|
82
|
+
options: {
|
|
83
|
+
autocomplete: boolean;
|
|
84
|
+
endAdornment: string;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
type: string;
|
|
88
|
+
scope: string;
|
|
89
|
+
options: {
|
|
90
|
+
autocomplete: boolean;
|
|
91
|
+
endAdornment: string;
|
|
92
|
+
};
|
|
93
|
+
label?: undefined;
|
|
94
|
+
})[];
|
|
95
|
+
})[];
|
|
96
|
+
};
|
|
97
|
+
export declare const data: {
|
|
98
|
+
weight: number;
|
|
99
|
+
username: string;
|
|
100
|
+
voltage: string;
|
|
101
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as issue_1884 from './examples/1884';
|
|
|
2
2
|
import * as issue_1948 from './examples/1948';
|
|
3
3
|
import * as additionalErrors from './examples/additional-errors';
|
|
4
4
|
import * as additionalProperties from './examples/additional-properties';
|
|
5
|
+
import * as adornments from './examples/adornments';
|
|
5
6
|
import * as allOf from './examples/allOf';
|
|
6
7
|
import * as anyOf from './examples/anyOf';
|
|
7
8
|
import * as anyOfOneOfAllOfResolve from './examples/anyOf-oneOf-allOf-resolve';
|
|
@@ -63,4 +64,4 @@ export * from './register';
|
|
|
63
64
|
import * as ifThenElse from './examples/if_then_else';
|
|
64
65
|
import * as jsoneditor from './examples/json-editor';
|
|
65
66
|
import * as jsonschema from './examples/jsonschema';
|
|
66
|
-
export { additionalErrors, additionalProperties, allOf, anyOf, anyOfOneOfAllOfResolve, array, arrayI18n, arrayWithCustomChildLabel, arrayWithDefaults, arrayWithDetail, arrayWithDetailAndRule, arrayWithSorting, arrayWithTranslatedCustomChildLabel, categorization, conditionalSchemaComposition, config, controlOptions, dates, defaultExample, enumExample, enumI18n, enumInArray, generateDynamic, generateSchema, generateUISchema, huge, i18n, ifThenElse, issue_1884, issue_1948, jsoneditor, jsonschema, layout, listWithDetail, listWithDetailPrimitives, listWithDetailRegistered, login, mixed, mixedObject, multiEnum, multiEnumWithLabelAndDesc, nestedArray, nestedCategorization, numbers, object, onChange, oneOf, oneOfArray, oneOfRecursive, person, prependAppendSlots, radioGroupExample, readonly, rule, ruleInheritance, scope, specialPropertyNames, stepper, steppershownav, string, stringArray, text, validationNestedSameName, };
|
|
67
|
+
export { additionalErrors, additionalProperties, adornments, allOf, anyOf, anyOfOneOfAllOfResolve, array, arrayI18n, arrayWithCustomChildLabel, arrayWithDefaults, arrayWithDetail, arrayWithDetailAndRule, arrayWithSorting, arrayWithTranslatedCustomChildLabel, categorization, conditionalSchemaComposition, config, controlOptions, dates, defaultExample, enumExample, enumI18n, enumInArray, generateDynamic, generateSchema, generateUISchema, huge, i18n, ifThenElse, issue_1884, issue_1948, jsoneditor, jsonschema, layout, listWithDetail, listWithDetailPrimitives, listWithDetailRegistered, login, mixed, mixedObject, multiEnum, multiEnumWithLabelAndDesc, nestedArray, nestedCategorization, numbers, object, onChange, oneOf, oneOfArray, oneOfRecursive, person, prependAppendSlots, radioGroupExample, readonly, rule, ruleInheritance, scope, specialPropertyNames, stepper, steppershownav, string, stringArray, text, validationNestedSameName, };
|
|
@@ -23,7 +23,7 @@ var getExamples = function () {
|
|
|
23
23
|
return examples;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var schema$
|
|
26
|
+
var schema$X = {
|
|
27
27
|
type: 'object',
|
|
28
28
|
required: ['age'],
|
|
29
29
|
properties: {
|
|
@@ -78,7 +78,7 @@ var schema$W = {
|
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
80
|
};
|
|
81
|
-
var uischema$
|
|
81
|
+
var uischema$X = {
|
|
82
82
|
type: 'VerticalLayout',
|
|
83
83
|
elements: [
|
|
84
84
|
{
|
|
@@ -171,7 +171,7 @@ var uischema$W = {
|
|
|
171
171
|
},
|
|
172
172
|
],
|
|
173
173
|
};
|
|
174
|
-
var data$
|
|
174
|
+
var data$Z = {
|
|
175
175
|
firstName: 'Max',
|
|
176
176
|
lastName: 'Power',
|
|
177
177
|
committer: false,
|
|
@@ -180,20 +180,20 @@ registerExamples([
|
|
|
180
180
|
{
|
|
181
181
|
name: '1884',
|
|
182
182
|
label: 'Issue 1884 - Nested enable/disable',
|
|
183
|
-
data: data$
|
|
184
|
-
schema: schema$
|
|
185
|
-
uischema: uischema$
|
|
183
|
+
data: data$Z,
|
|
184
|
+
schema: schema$X,
|
|
185
|
+
uischema: uischema$X,
|
|
186
186
|
},
|
|
187
187
|
]);
|
|
188
188
|
|
|
189
189
|
var _1884 = /*#__PURE__*/Object.freeze({
|
|
190
190
|
__proto__: null,
|
|
191
|
-
schema: schema$
|
|
192
|
-
uischema: uischema$
|
|
193
|
-
data: data$
|
|
191
|
+
schema: schema$X,
|
|
192
|
+
uischema: uischema$X,
|
|
193
|
+
data: data$Z
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
-
var schema$
|
|
196
|
+
var schema$W = {
|
|
197
197
|
type: 'object',
|
|
198
198
|
definitions: {
|
|
199
199
|
import: {
|
|
@@ -224,8 +224,8 @@ var schema$V = {
|
|
|
224
224
|
},
|
|
225
225
|
},
|
|
226
226
|
};
|
|
227
|
-
var uischema$
|
|
228
|
-
var data$
|
|
227
|
+
var uischema$W = undefined;
|
|
228
|
+
var data$Y = {
|
|
229
229
|
import: [
|
|
230
230
|
{
|
|
231
231
|
document: 'Document1',
|
|
@@ -238,24 +238,24 @@ registerExamples([
|
|
|
238
238
|
{
|
|
239
239
|
name: '1948_with',
|
|
240
240
|
label: 'Issue 1948 - Array renderer selection (with schema)',
|
|
241
|
-
data: data$
|
|
242
|
-
schema: schema$
|
|
243
|
-
uischema: uischema$
|
|
241
|
+
data: data$Y,
|
|
242
|
+
schema: schema$W,
|
|
243
|
+
uischema: uischema$W,
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
name: '1948_without',
|
|
247
247
|
label: 'Issue 1948 - Array renderer selection (w/o schema)',
|
|
248
|
-
data: data$
|
|
248
|
+
data: data$Y,
|
|
249
249
|
schema: undefined,
|
|
250
|
-
uischema: uischema$
|
|
250
|
+
uischema: uischema$W,
|
|
251
251
|
},
|
|
252
252
|
]);
|
|
253
253
|
|
|
254
254
|
var _1948 = /*#__PURE__*/Object.freeze({
|
|
255
255
|
__proto__: null,
|
|
256
|
-
schema: schema$
|
|
257
|
-
uischema: uischema$
|
|
258
|
-
data: data$
|
|
256
|
+
schema: schema$W,
|
|
257
|
+
uischema: uischema$W,
|
|
258
|
+
data: data$Y
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
/******************************************************************************
|
|
@@ -321,7 +321,7 @@ var personCoreSchema = {
|
|
|
321
321
|
},
|
|
322
322
|
},
|
|
323
323
|
};
|
|
324
|
-
var schema$
|
|
324
|
+
var schema$V = {
|
|
325
325
|
type: 'object',
|
|
326
326
|
properties: __assign(__assign({}, personCoreSchema.properties), { personalData: {
|
|
327
327
|
type: 'object',
|
|
@@ -354,7 +354,7 @@ var schema$U = {
|
|
|
354
354
|
} }),
|
|
355
355
|
required: ['occupation', 'nationality'],
|
|
356
356
|
};
|
|
357
|
-
var uischema$
|
|
357
|
+
var uischema$V = {
|
|
358
358
|
type: 'VerticalLayout',
|
|
359
359
|
elements: [
|
|
360
360
|
{
|
|
@@ -409,7 +409,7 @@ var uischema$U = {
|
|
|
409
409
|
},
|
|
410
410
|
],
|
|
411
411
|
};
|
|
412
|
-
var data$
|
|
412
|
+
var data$X = {
|
|
413
413
|
name: 'John Doe',
|
|
414
414
|
vegetarian: false,
|
|
415
415
|
birthDate: '1985-06-02',
|
|
@@ -422,18 +422,18 @@ registerExamples([
|
|
|
422
422
|
{
|
|
423
423
|
name: 'person',
|
|
424
424
|
label: 'Person',
|
|
425
|
-
data: data$
|
|
426
|
-
schema: schema$
|
|
427
|
-
uischema: uischema$
|
|
425
|
+
data: data$X,
|
|
426
|
+
schema: schema$V,
|
|
427
|
+
uischema: uischema$V,
|
|
428
428
|
},
|
|
429
429
|
]);
|
|
430
430
|
|
|
431
431
|
var person = /*#__PURE__*/Object.freeze({
|
|
432
432
|
__proto__: null,
|
|
433
433
|
personCoreSchema: personCoreSchema,
|
|
434
|
-
schema: schema$
|
|
435
|
-
uischema: uischema$
|
|
436
|
-
data: data$
|
|
434
|
+
schema: schema$V,
|
|
435
|
+
uischema: uischema$V,
|
|
436
|
+
data: data$X
|
|
437
437
|
});
|
|
438
438
|
|
|
439
439
|
var additionalErrors = [];
|
|
@@ -456,9 +456,9 @@ registerExamples([
|
|
|
456
456
|
{
|
|
457
457
|
name: 'additional-errors',
|
|
458
458
|
label: 'Additional errors',
|
|
459
|
-
data: data$
|
|
460
|
-
schema: schema$
|
|
461
|
-
uischema: uischema$
|
|
459
|
+
data: data$X,
|
|
460
|
+
schema: schema$V,
|
|
461
|
+
uischema: uischema$V,
|
|
462
462
|
actions: actions$7,
|
|
463
463
|
},
|
|
464
464
|
]);
|
|
@@ -469,7 +469,7 @@ var additionalErrors$1 = /*#__PURE__*/Object.freeze({
|
|
|
469
469
|
actions: actions$7
|
|
470
470
|
});
|
|
471
471
|
|
|
472
|
-
var schema$
|
|
472
|
+
var schema$U = {
|
|
473
473
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
474
474
|
type: 'object',
|
|
475
475
|
properties: {
|
|
@@ -543,11 +543,11 @@ var schema$T = {
|
|
|
543
543
|
},
|
|
544
544
|
maxProperties: 15,
|
|
545
545
|
};
|
|
546
|
-
var uischema$
|
|
546
|
+
var uischema$U = {
|
|
547
547
|
type: 'Control',
|
|
548
548
|
scope: '#/',
|
|
549
549
|
};
|
|
550
|
-
var data$
|
|
550
|
+
var data$W = {
|
|
551
551
|
propertiesString: 'data',
|
|
552
552
|
string: 'string value',
|
|
553
553
|
number: 10.2,
|
|
@@ -566,16 +566,131 @@ registerExamples([
|
|
|
566
566
|
{
|
|
567
567
|
name: 'additional-properties',
|
|
568
568
|
label: 'Additional Properties',
|
|
569
|
+
data: data$W,
|
|
570
|
+
schema: schema$U,
|
|
571
|
+
uischema: uischema$U,
|
|
572
|
+
},
|
|
573
|
+
]);
|
|
574
|
+
|
|
575
|
+
var additionalProperties = /*#__PURE__*/Object.freeze({
|
|
576
|
+
__proto__: null,
|
|
577
|
+
schema: schema$U,
|
|
578
|
+
uischema: uischema$U
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
var schema$T = {
|
|
582
|
+
type: 'object',
|
|
583
|
+
properties: {
|
|
584
|
+
price: {
|
|
585
|
+
type: 'number',
|
|
586
|
+
},
|
|
587
|
+
weight: {
|
|
588
|
+
type: 'number',
|
|
589
|
+
},
|
|
590
|
+
quantity: {
|
|
591
|
+
type: 'integer',
|
|
592
|
+
},
|
|
593
|
+
website: {
|
|
594
|
+
type: 'string',
|
|
595
|
+
},
|
|
596
|
+
username: {
|
|
597
|
+
type: 'string',
|
|
598
|
+
},
|
|
599
|
+
voltage: {
|
|
600
|
+
type: 'string',
|
|
601
|
+
enum: ['110', '230', '400'],
|
|
602
|
+
},
|
|
603
|
+
frequency: {
|
|
604
|
+
type: 'string',
|
|
605
|
+
oneOf: [
|
|
606
|
+
{ const: '50', title: '50' },
|
|
607
|
+
{ const: '60', title: '60' },
|
|
608
|
+
],
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
};
|
|
612
|
+
var uischema$T = {
|
|
613
|
+
type: 'VerticalLayout',
|
|
614
|
+
elements: [
|
|
615
|
+
{
|
|
616
|
+
type: 'HorizontalLayout',
|
|
617
|
+
elements: [
|
|
618
|
+
{
|
|
619
|
+
type: 'Control',
|
|
620
|
+
scope: '#/properties/price',
|
|
621
|
+
options: { startAdornment: '€' },
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
type: 'Control',
|
|
625
|
+
scope: '#/properties/weight',
|
|
626
|
+
options: { endAdornment: 'kg' },
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
type: 'Control',
|
|
630
|
+
scope: '#/properties/quantity',
|
|
631
|
+
options: { endAdornment: 'pcs' },
|
|
632
|
+
},
|
|
633
|
+
],
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
type: 'HorizontalLayout',
|
|
637
|
+
elements: [
|
|
638
|
+
{
|
|
639
|
+
type: 'Control',
|
|
640
|
+
scope: '#/properties/website',
|
|
641
|
+
options: { startAdornment: 'https://' },
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
type: 'Control',
|
|
645
|
+
scope: '#/properties/username',
|
|
646
|
+
options: { startAdornment: '@', endAdornment: '.example.com' },
|
|
647
|
+
},
|
|
648
|
+
],
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
type: 'HorizontalLayout',
|
|
652
|
+
elements: [
|
|
653
|
+
{
|
|
654
|
+
type: 'Control',
|
|
655
|
+
scope: '#/properties/voltage',
|
|
656
|
+
label: 'Voltage (autocomplete)',
|
|
657
|
+
options: { endAdornment: 'V' },
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
type: 'Control',
|
|
661
|
+
scope: '#/properties/voltage',
|
|
662
|
+
label: 'Voltage (select)',
|
|
663
|
+
options: { autocomplete: false, endAdornment: 'V' },
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
type: 'Control',
|
|
667
|
+
scope: '#/properties/frequency',
|
|
668
|
+
options: { autocomplete: false, endAdornment: 'Hz' },
|
|
669
|
+
},
|
|
670
|
+
],
|
|
671
|
+
},
|
|
672
|
+
],
|
|
673
|
+
};
|
|
674
|
+
var data$V = {
|
|
675
|
+
weight: 12.5,
|
|
676
|
+
username: 'jane',
|
|
677
|
+
voltage: '230',
|
|
678
|
+
};
|
|
679
|
+
registerExamples([
|
|
680
|
+
{
|
|
681
|
+
name: 'adornments',
|
|
682
|
+
label: 'Adornments',
|
|
569
683
|
data: data$V,
|
|
570
684
|
schema: schema$T,
|
|
571
685
|
uischema: uischema$T,
|
|
572
686
|
},
|
|
573
687
|
]);
|
|
574
688
|
|
|
575
|
-
var
|
|
689
|
+
var adornments = /*#__PURE__*/Object.freeze({
|
|
576
690
|
__proto__: null,
|
|
577
691
|
schema: schema$T,
|
|
578
|
-
uischema: uischema$T
|
|
692
|
+
uischema: uischema$T,
|
|
693
|
+
data: data$V
|
|
579
694
|
});
|
|
580
695
|
|
|
581
696
|
var schema$S = {
|
|
@@ -3211,7 +3326,7 @@ var enumInArray = /*#__PURE__*/Object.freeze({
|
|
|
3211
3326
|
|
|
3212
3327
|
var schema$u = undefined;
|
|
3213
3328
|
var uischema$u = undefined;
|
|
3214
|
-
var data$w = data$
|
|
3329
|
+
var data$w = data$X;
|
|
3215
3330
|
registerExamples([
|
|
3216
3331
|
{
|
|
3217
3332
|
name: 'generate',
|
|
@@ -3255,7 +3370,7 @@ var generateDynamic = /*#__PURE__*/Object.freeze({
|
|
|
3255
3370
|
|
|
3256
3371
|
var schema$t = personCoreSchema;
|
|
3257
3372
|
var uischema$t = undefined;
|
|
3258
|
-
var data$v = data$
|
|
3373
|
+
var data$v = data$X;
|
|
3259
3374
|
registerExamples([
|
|
3260
3375
|
{
|
|
3261
3376
|
name: 'generate-ui',
|
|
@@ -4723,7 +4838,7 @@ var i18n = /*#__PURE__*/Object.freeze({
|
|
|
4723
4838
|
translate: translate
|
|
4724
4839
|
});
|
|
4725
4840
|
|
|
4726
|
-
var schema$r = schema$
|
|
4841
|
+
var schema$r = schema$V;
|
|
4727
4842
|
var uischemaVertical = {
|
|
4728
4843
|
type: 'VerticalLayout',
|
|
4729
4844
|
elements: [
|
|
@@ -4811,7 +4926,7 @@ var uischemaComplex = {
|
|
|
4811
4926
|
},
|
|
4812
4927
|
],
|
|
4813
4928
|
};
|
|
4814
|
-
var data$s = data$
|
|
4929
|
+
var data$s = data$X;
|
|
4815
4930
|
registerExamples([
|
|
4816
4931
|
{
|
|
4817
4932
|
name: 'layout-vertical',
|
|
@@ -7813,6 +7928,7 @@ var jsonschema = /*#__PURE__*/Object.freeze({
|
|
|
7813
7928
|
|
|
7814
7929
|
exports.additionalErrors = additionalErrors$1;
|
|
7815
7930
|
exports.additionalProperties = additionalProperties;
|
|
7931
|
+
exports.adornments = adornments;
|
|
7816
7932
|
exports.allOf = allOf;
|
|
7817
7933
|
exports.anyOf = anyOf;
|
|
7818
7934
|
exports.anyOfOneOfAllOfResolve = anyOfOneOfAllOfResolve;
|