@jsonforms/examples 3.9.0-alpha.1 → 3.9.0-alpha.2
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/enum-multi.d.ts +19 -2
- package/lib/jsonforms-examples.cjs.js +86 -1
- package/lib/jsonforms-examples.cjs.js.map +1 -1
- package/lib/jsonforms-examples.esm.js +85 -1
- package/lib/jsonforms-examples.esm.js.map +1 -1
- package/package.json +5 -5
- package/src/examples/categorization.ts +65 -0
- package/src/examples/enum-multi.ts +21 -1
- package/stats.html +1 -1
|
@@ -19,16 +19,33 @@ export declare const schema: {
|
|
|
19
19
|
enum: string[];
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
multiSelect: {
|
|
23
|
+
type: string;
|
|
24
|
+
title: string;
|
|
25
|
+
uniqueItems: boolean;
|
|
26
|
+
items: {
|
|
27
|
+
type: string;
|
|
28
|
+
enum: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
22
31
|
};
|
|
23
32
|
};
|
|
24
33
|
export declare const uischema: {
|
|
25
34
|
type: string;
|
|
26
|
-
elements: {
|
|
35
|
+
elements: ({
|
|
27
36
|
type: string;
|
|
28
37
|
scope: string;
|
|
29
|
-
|
|
38
|
+
options?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
type: string;
|
|
41
|
+
scope: string;
|
|
42
|
+
options: {
|
|
43
|
+
format: string;
|
|
44
|
+
};
|
|
45
|
+
})[];
|
|
30
46
|
};
|
|
31
47
|
export declare const data: {
|
|
32
48
|
oneOfMultiEnum: string[];
|
|
33
49
|
multiEnum: string[];
|
|
50
|
+
multiSelect: string[];
|
|
34
51
|
};
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var core = require('@jsonforms/core');
|
|
6
6
|
var get = require('lodash/get');
|
|
7
|
+
var cloneDeep = require('lodash/cloneDeep');
|
|
7
8
|
var localize = require('ajv-i18n/localize');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
11
12
|
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
13
|
+
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
|
12
14
|
var localize__default = /*#__PURE__*/_interopDefaultLegacy(localize);
|
|
13
15
|
|
|
14
16
|
var knownExamples = {};
|
|
@@ -2016,6 +2018,62 @@ var uischema_1713 = {
|
|
|
2016
2018
|
},
|
|
2017
2019
|
],
|
|
2018
2020
|
};
|
|
2021
|
+
var schema_2343 = {
|
|
2022
|
+
type: 'object',
|
|
2023
|
+
properties: {
|
|
2024
|
+
parc: {
|
|
2025
|
+
type: 'array',
|
|
2026
|
+
items: {
|
|
2027
|
+
type: 'object',
|
|
2028
|
+
properties: {
|
|
2029
|
+
id: {
|
|
2030
|
+
type: 'string',
|
|
2031
|
+
},
|
|
2032
|
+
},
|
|
2033
|
+
},
|
|
2034
|
+
},
|
|
2035
|
+
},
|
|
2036
|
+
};
|
|
2037
|
+
var arrayControl_2343 = {
|
|
2038
|
+
type: 'Control',
|
|
2039
|
+
scope: '#/properties/parc',
|
|
2040
|
+
options: {
|
|
2041
|
+
detail: {
|
|
2042
|
+
type: 'VerticalLayout',
|
|
2043
|
+
elements: [
|
|
2044
|
+
{
|
|
2045
|
+
type: 'HorizontalLayout',
|
|
2046
|
+
elements: [
|
|
2047
|
+
{
|
|
2048
|
+
type: 'Control',
|
|
2049
|
+
scope: '#/properties/id',
|
|
2050
|
+
},
|
|
2051
|
+
],
|
|
2052
|
+
},
|
|
2053
|
+
],
|
|
2054
|
+
},
|
|
2055
|
+
},
|
|
2056
|
+
};
|
|
2057
|
+
var uischema_2343 = {
|
|
2058
|
+
type: 'VerticalLayout',
|
|
2059
|
+
elements: [
|
|
2060
|
+
{
|
|
2061
|
+
type: 'Categorization',
|
|
2062
|
+
elements: [
|
|
2063
|
+
{
|
|
2064
|
+
type: 'Category',
|
|
2065
|
+
label: 'A1',
|
|
2066
|
+
elements: [cloneDeep__default["default"](arrayControl_2343)],
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
type: 'Category',
|
|
2070
|
+
label: 'A2',
|
|
2071
|
+
elements: [cloneDeep__default["default"](arrayControl_2343)],
|
|
2072
|
+
},
|
|
2073
|
+
],
|
|
2074
|
+
},
|
|
2075
|
+
],
|
|
2076
|
+
};
|
|
2019
2077
|
var translations$2 = {
|
|
2020
2078
|
categoryLabelKey: 'Basic',
|
|
2021
2079
|
address: {
|
|
@@ -2042,6 +2100,13 @@ registerExamples([
|
|
|
2042
2100
|
schema: schema_1713,
|
|
2043
2101
|
uischema: uischema_1713,
|
|
2044
2102
|
},
|
|
2103
|
+
{
|
|
2104
|
+
name: 'categorization_2343',
|
|
2105
|
+
label: 'Categorization - Issue 2343',
|
|
2106
|
+
data: {},
|
|
2107
|
+
schema: schema_2343,
|
|
2108
|
+
uischema: uischema_2343,
|
|
2109
|
+
},
|
|
2045
2110
|
]);
|
|
2046
2111
|
|
|
2047
2112
|
var categorization = /*#__PURE__*/Object.freeze({
|
|
@@ -2870,6 +2935,15 @@ var schema$y = {
|
|
|
2870
2935
|
enum: ['foo', 'bar', 'foobar'],
|
|
2871
2936
|
},
|
|
2872
2937
|
},
|
|
2938
|
+
multiSelect: {
|
|
2939
|
+
type: 'array',
|
|
2940
|
+
title: 'Select Fruits',
|
|
2941
|
+
uniqueItems: true,
|
|
2942
|
+
items: {
|
|
2943
|
+
type: 'string',
|
|
2944
|
+
enum: ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry'],
|
|
2945
|
+
},
|
|
2946
|
+
},
|
|
2873
2947
|
},
|
|
2874
2948
|
};
|
|
2875
2949
|
var uischema$y = {
|
|
@@ -2883,9 +2957,20 @@ var uischema$y = {
|
|
|
2883
2957
|
type: 'Control',
|
|
2884
2958
|
scope: '#/properties/multiEnum',
|
|
2885
2959
|
},
|
|
2960
|
+
{
|
|
2961
|
+
type: 'Control',
|
|
2962
|
+
scope: '#/properties/multiSelect',
|
|
2963
|
+
options: {
|
|
2964
|
+
format: 'multiselect',
|
|
2965
|
+
},
|
|
2966
|
+
},
|
|
2886
2967
|
],
|
|
2887
2968
|
};
|
|
2888
|
-
var data$A = {
|
|
2969
|
+
var data$A = {
|
|
2970
|
+
oneOfMultiEnum: ['foo'],
|
|
2971
|
+
multiEnum: ['bar'],
|
|
2972
|
+
multiSelect: ['Banana', 'Cherry'],
|
|
2973
|
+
};
|
|
2889
2974
|
registerExamples([
|
|
2890
2975
|
{
|
|
2891
2976
|
name: 'multi-enum',
|