@jsonforms/core 3.0.0-alpha.3 → 3.0.0-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/docs/globals.html +37 -37
- package/docs/interfaces/arraycontrolprops.html +21 -21
- package/docs/interfaces/arraylayoutprops.html +21 -21
- package/docs/interfaces/cellprops.html +12 -12
- package/docs/interfaces/combinatorrendererprops.html +13 -13
- package/docs/interfaces/controlprops.html +16 -16
- package/docs/interfaces/controlstate.html +2 -2
- package/docs/interfaces/controlwithdetailprops.html +17 -17
- package/docs/interfaces/dispatchcellprops.html +10 -10
- package/docs/interfaces/dispatchcellstateprops.html +10 -10
- package/docs/interfaces/dispatchpropsofarraycontrol.html +4 -4
- package/docs/interfaces/dispatchpropsofcontrol.html +1 -1
- package/docs/interfaces/dispatchpropsofmultienumcontrol.html +2 -2
- package/docs/interfaces/enumcellprops.html +13 -13
- package/docs/interfaces/enumoption.html +2 -2
- package/docs/interfaces/jsonformsprops.html +9 -9
- package/docs/interfaces/layoutprops.html +10 -10
- package/docs/interfaces/ownpropsofcell.html +9 -9
- package/docs/interfaces/ownpropsofcontrol.html +9 -9
- package/docs/interfaces/ownpropsofenum.html +1 -1
- package/docs/interfaces/ownpropsofenumcell.html +10 -10
- package/docs/interfaces/ownpropsofjsonformsrenderer.html +8 -8
- package/docs/interfaces/ownpropsoflayout.html +9 -9
- package/docs/interfaces/ownpropsofmasterlistitem.html +6 -6
- package/docs/interfaces/ownpropsofrenderer.html +8 -8
- package/docs/interfaces/rendererprops.html +9 -9
- package/docs/interfaces/statepropsofarraycontrol.html +17 -17
- package/docs/interfaces/statepropsofarraylayout.html +17 -17
- package/docs/interfaces/statepropsofcell.html +11 -11
- package/docs/interfaces/statepropsofcombinator.html +12 -12
- package/docs/interfaces/statepropsofcontrol.html +15 -15
- package/docs/interfaces/statepropsofcontrolwithdetail.html +16 -16
- package/docs/interfaces/statepropsofenumcell.html +12 -12
- package/docs/interfaces/statepropsofjsonformsrenderer.html +9 -9
- package/docs/interfaces/statepropsoflayout.html +10 -10
- package/docs/interfaces/statepropsofmasteritem.html +7 -7
- package/docs/interfaces/statepropsofrenderer.html +9 -9
- package/docs/interfaces/statepropsofscopedrenderer.html +12 -12
- package/docs/interfaces/withclassname.html +1 -1
- package/lib/Helpers.d.ts +5 -5
- package/lib/actions/actions.d.ts +181 -181
- package/lib/actions/index.d.ts +1 -1
- package/lib/configDefault.d.ts +6 -6
- package/lib/generators/Generate.d.ts +6 -6
- package/lib/generators/index.d.ts +3 -3
- package/lib/generators/schema.d.ts +8 -8
- package/lib/generators/uischema.d.ts +12 -12
- package/lib/i18n/i18nTypes.d.ts +15 -15
- package/lib/i18n/i18nUtil.d.ts +18 -18
- package/lib/i18n/index.d.ts +2 -2
- package/lib/index.d.ts +11 -11
- package/lib/jsonforms-core.cjs.js +2445 -0
- package/lib/jsonforms-core.cjs.js.map +1 -0
- package/lib/jsonforms-core.esm.js +2164 -0
- package/lib/jsonforms-core.esm.js.map +1 -0
- package/lib/models/draft4.d.ts +198 -198
- package/lib/models/index.d.ts +5 -5
- package/lib/models/jsonSchema.d.ts +3 -3
- package/lib/models/jsonSchema4.d.ts +110 -110
- package/lib/models/jsonSchema7.d.ts +119 -119
- package/lib/models/uischema.d.ts +201 -201
- package/lib/reducers/cells.d.ts +11 -11
- package/lib/reducers/config.d.ts +3 -3
- package/lib/reducers/core.d.ts +24 -24
- package/lib/reducers/default-data.d.ts +10 -10
- package/lib/reducers/i18n.d.ts +8 -8
- package/lib/reducers/index.d.ts +9 -9
- package/lib/reducers/reducers.d.ts +29 -29
- package/lib/reducers/renderers.d.ts +10 -10
- package/lib/reducers/selectors.d.ts +15 -15
- package/lib/reducers/uischemas.d.ts +10 -10
- package/lib/store.d.ts +53 -53
- package/lib/testers/index.d.ts +1 -1
- package/lib/testers/testers.d.ts +203 -203
- package/lib/util/Formatted.d.ts +19 -19
- package/lib/util/array.d.ts +3 -3
- package/lib/util/cell.d.ts +79 -79
- package/lib/util/combinators.d.ts +10 -10
- package/lib/util/ids.d.ts +3 -3
- package/lib/util/index.d.ts +15 -15
- package/lib/util/label.d.ts +9 -9
- package/lib/util/path.d.ts +25 -25
- package/lib/util/renderer.d.ts +398 -397
- package/lib/util/resolvers.d.ts +25 -25
- package/lib/util/runtime.d.ts +18 -18
- package/lib/util/schema.d.ts +1 -1
- package/lib/util/type.d.ts +174 -174
- package/lib/util/uischema.d.ts +5 -5
- package/lib/util/util.d.ts +31 -31
- package/lib/util/validator.d.ts +3 -3
- package/package.json +16 -13
- package/rollup.config.js +44 -0
- package/src/reducers/reducers.ts +2 -2
- package/src/util/cell.ts +4 -4
- package/src/util/renderer.ts +9 -8
- package/stats.html +3279 -0
- package/lib/Helpers.js +0 -33
- package/lib/Helpers.js.map +0 -1
- package/lib/actions/actions.js +0 -173
- package/lib/actions/actions.js.map +0 -1
- package/lib/actions/index.js +0 -29
- package/lib/actions/index.js.map +0 -1
- package/lib/configDefault.js +0 -48
- package/lib/configDefault.js.map +0 -1
- package/lib/generators/Generate.js +0 -35
- package/lib/generators/Generate.js.map +0 -1
- package/lib/generators/index.js +0 -31
- package/lib/generators/index.js.map +0 -1
- package/lib/generators/schema.js +0 -154
- package/lib/generators/schema.js.map +0 -1
- package/lib/generators/uischema.js +0 -169
- package/lib/generators/uischema.js.map +0 -1
- package/lib/i18n/i18nTypes.js +0 -3
- package/lib/i18n/i18nTypes.js.map +0 -1
- package/lib/i18n/i18nUtil.js +0 -71
- package/lib/i18n/i18nUtil.js.map +0 -1
- package/lib/i18n/index.js +0 -6
- package/lib/i18n/index.js.map +0 -1
- package/lib/index.js +0 -40
- package/lib/index.js.map +0 -1
- package/lib/jsonforms-core.js +0 -25
- package/lib/jsonforms-core.js.map +0 -1
- package/lib/models/draft4.js +0 -174
- package/lib/models/draft4.js.map +0 -1
- package/lib/models/index.js +0 -33
- package/lib/models/index.js.map +0 -1
- package/lib/models/jsonSchema.js +0 -27
- package/lib/models/jsonSchema.js.map +0 -1
- package/lib/models/jsonSchema4.js +0 -30
- package/lib/models/jsonSchema4.js.map +0 -1
- package/lib/models/jsonSchema7.js +0 -30
- package/lib/models/jsonSchema7.js.map +0 -1
- package/lib/models/uischema.js +0 -58
- package/lib/models/uischema.js.map +0 -1
- package/lib/reducers/cells.js +0 -42
- package/lib/reducers/cells.js.map +0 -1
- package/lib/reducers/config.js +0 -46
- package/lib/reducers/config.js.map +0 -1
- package/lib/reducers/core.js +0 -294
- package/lib/reducers/core.js.map +0 -1
- package/lib/reducers/default-data.js +0 -45
- package/lib/reducers/default-data.js.map +0 -1
- package/lib/reducers/i18n.js +0 -83
- package/lib/reducers/i18n.js.map +0 -1
- package/lib/reducers/index.js +0 -37
- package/lib/reducers/index.js.map +0 -1
- package/lib/reducers/reducers.js +0 -98
- package/lib/reducers/reducers.js.map +0 -1
- package/lib/reducers/renderers.js +0 -43
- package/lib/reducers/renderers.js.map +0 -1
- package/lib/reducers/selectors.js +0 -56
- package/lib/reducers/selectors.js.map +0 -1
- package/lib/reducers/uischemas.js +0 -60
- package/lib/reducers/uischemas.js.map +0 -1
- package/lib/store.js +0 -27
- package/lib/store.js.map +0 -1
- package/lib/testers/index.js +0 -29
- package/lib/testers/index.js.map +0 -1
- package/lib/testers/testers.js +0 -421
- package/lib/testers/testers.js.map +0 -1
- package/lib/util/Formatted.js +0 -27
- package/lib/util/Formatted.js.map +0 -1
- package/lib/util/array.js +0 -44
- package/lib/util/array.js.map +0 -1
- package/lib/util/cell.js +0 -148
- package/lib/util/cell.js.map +0 -1
- package/lib/util/combinators.js +0 -59
- package/lib/util/combinators.js.map +0 -1
- package/lib/util/ids.js +0 -54
- package/lib/util/ids.js.map +0 -1
- package/lib/util/index.js +0 -43
- package/lib/util/index.js.map +0 -1
- package/lib/util/label.js +0 -73
- package/lib/util/label.js.map +0 -1
- package/lib/util/path.js +0 -90
- package/lib/util/path.js.map +0 -1
- package/lib/util/renderer.js +0 -530
- package/lib/util/renderer.js.map +0 -1
- package/lib/util/resolvers.js +0 -169
- package/lib/util/resolvers.js.map +0 -1
- package/lib/util/runtime.js +0 -167
- package/lib/util/runtime.js.map +0 -1
- package/lib/util/schema.js +0 -42
- package/lib/util/schema.js.map +0 -1
- package/lib/util/type.js +0 -27
- package/lib/util/type.js.map +0 -1
- package/lib/util/uischema.js +0 -56
- package/lib/util/uischema.js.map +0 -1
- package/lib/util/util.js +0 -112
- package/lib/util/util.js.map +0 -1
- package/lib/util/validator.js +0 -37
- package/lib/util/validator.js.map +0 -1
- package/webpack.build.js +0 -13
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
export interface JsonSchema7 {
|
|
2
|
-
$ref?: string;
|
|
3
|
-
/**
|
|
4
|
-
* This is important because it tells refs where
|
|
5
|
-
* the root of the document is located
|
|
6
|
-
*/
|
|
7
|
-
$id?: string;
|
|
8
|
-
/**
|
|
9
|
-
* It is recommended that the meta-schema is
|
|
10
|
-
* included in the root of any JSON Schema
|
|
11
|
-
*/
|
|
12
|
-
$schema?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Title of the schema
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Schema description
|
|
19
|
-
*/
|
|
20
|
-
description?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Default json for the object represented by
|
|
23
|
-
* this schema
|
|
24
|
-
*/
|
|
25
|
-
default?: any;
|
|
26
|
-
/**
|
|
27
|
-
* The value must be a multiple of the number
|
|
28
|
-
* (e.g. 10 is a multiple of 5)
|
|
29
|
-
*/
|
|
30
|
-
multipleOf?: number;
|
|
31
|
-
maximum?: number;
|
|
32
|
-
/**
|
|
33
|
-
* If true maximum must be > value, >= otherwise
|
|
34
|
-
*/
|
|
35
|
-
exclusiveMaximum?: number;
|
|
36
|
-
minimum?: number;
|
|
37
|
-
/**
|
|
38
|
-
* If true minimum must be < value, <= otherwise
|
|
39
|
-
*/
|
|
40
|
-
exclusiveMinimum?: number;
|
|
41
|
-
maxLength?: number;
|
|
42
|
-
minLength?: number;
|
|
43
|
-
/**
|
|
44
|
-
* This is a regex string that the value must
|
|
45
|
-
* conform to
|
|
46
|
-
*/
|
|
47
|
-
pattern?: string;
|
|
48
|
-
additionalItems?: boolean | JsonSchema7;
|
|
49
|
-
items?: JsonSchema7 | JsonSchema7[];
|
|
50
|
-
maxItems?: number;
|
|
51
|
-
minItems?: number;
|
|
52
|
-
uniqueItems?: boolean;
|
|
53
|
-
maxProperties?: number;
|
|
54
|
-
minProperties?: number;
|
|
55
|
-
required?: string[];
|
|
56
|
-
additionalProperties?: boolean | JsonSchema7;
|
|
57
|
-
/**
|
|
58
|
-
* Holds simple JSON Schema definitions for
|
|
59
|
-
* referencing from elsewhere.
|
|
60
|
-
*/
|
|
61
|
-
definitions?: {
|
|
62
|
-
[key: string]: JsonSchema7;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* The keys that can exist on the object with the
|
|
66
|
-
* json schema that should validate their value
|
|
67
|
-
*/
|
|
68
|
-
properties?: {
|
|
69
|
-
[property: string]: JsonSchema7;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* The key of this object is a regex for which
|
|
73
|
-
* properties the schema applies to
|
|
74
|
-
*/
|
|
75
|
-
patternProperties?: {
|
|
76
|
-
[pattern: string]: JsonSchema7;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* If the key is present as a property then the
|
|
80
|
-
* string of properties must also be present.
|
|
81
|
-
* If the value is a JSON Schema then it must
|
|
82
|
-
* also be valid for the object if the key is
|
|
83
|
-
* present.
|
|
84
|
-
*/
|
|
85
|
-
dependencies?: {
|
|
86
|
-
[key: string]: JsonSchema7 | string[];
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Enumerates the values that this schema can be
|
|
90
|
-
* e.g.
|
|
91
|
-
* {"type": "string",
|
|
92
|
-
* "enum": ["red", "green", "blue"]}
|
|
93
|
-
*/
|
|
94
|
-
enum?: any[];
|
|
95
|
-
/**
|
|
96
|
-
* The basic type of this schema, can be one of
|
|
97
|
-
* [string, number, object, array, boolean, null]
|
|
98
|
-
* or an array of the acceptable types
|
|
99
|
-
*/
|
|
100
|
-
type?: string | string[];
|
|
101
|
-
allOf?: JsonSchema7[];
|
|
102
|
-
anyOf?: JsonSchema7[];
|
|
103
|
-
oneOf?: JsonSchema7[];
|
|
104
|
-
/**
|
|
105
|
-
* The entity being validated must not match this schema
|
|
106
|
-
*/
|
|
107
|
-
not?: JsonSchema7;
|
|
108
|
-
format?: string;
|
|
109
|
-
readOnly?: boolean;
|
|
110
|
-
writeOnly?: boolean;
|
|
111
|
-
examples?: any[];
|
|
112
|
-
contains?: JsonSchema7;
|
|
113
|
-
propertyNames?: JsonSchema7;
|
|
114
|
-
const?: any;
|
|
115
|
-
if?: JsonSchema7;
|
|
116
|
-
then?: JsonSchema7;
|
|
117
|
-
else?: JsonSchema7;
|
|
118
|
-
errorMessage?: any;
|
|
119
|
-
}
|
|
1
|
+
export interface JsonSchema7 {
|
|
2
|
+
$ref?: string;
|
|
3
|
+
/**
|
|
4
|
+
* This is important because it tells refs where
|
|
5
|
+
* the root of the document is located
|
|
6
|
+
*/
|
|
7
|
+
$id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* It is recommended that the meta-schema is
|
|
10
|
+
* included in the root of any JSON Schema
|
|
11
|
+
*/
|
|
12
|
+
$schema?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Title of the schema
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Schema description
|
|
19
|
+
*/
|
|
20
|
+
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Default json for the object represented by
|
|
23
|
+
* this schema
|
|
24
|
+
*/
|
|
25
|
+
default?: any;
|
|
26
|
+
/**
|
|
27
|
+
* The value must be a multiple of the number
|
|
28
|
+
* (e.g. 10 is a multiple of 5)
|
|
29
|
+
*/
|
|
30
|
+
multipleOf?: number;
|
|
31
|
+
maximum?: number;
|
|
32
|
+
/**
|
|
33
|
+
* If true maximum must be > value, >= otherwise
|
|
34
|
+
*/
|
|
35
|
+
exclusiveMaximum?: number;
|
|
36
|
+
minimum?: number;
|
|
37
|
+
/**
|
|
38
|
+
* If true minimum must be < value, <= otherwise
|
|
39
|
+
*/
|
|
40
|
+
exclusiveMinimum?: number;
|
|
41
|
+
maxLength?: number;
|
|
42
|
+
minLength?: number;
|
|
43
|
+
/**
|
|
44
|
+
* This is a regex string that the value must
|
|
45
|
+
* conform to
|
|
46
|
+
*/
|
|
47
|
+
pattern?: string;
|
|
48
|
+
additionalItems?: boolean | JsonSchema7;
|
|
49
|
+
items?: JsonSchema7 | JsonSchema7[];
|
|
50
|
+
maxItems?: number;
|
|
51
|
+
minItems?: number;
|
|
52
|
+
uniqueItems?: boolean;
|
|
53
|
+
maxProperties?: number;
|
|
54
|
+
minProperties?: number;
|
|
55
|
+
required?: string[];
|
|
56
|
+
additionalProperties?: boolean | JsonSchema7;
|
|
57
|
+
/**
|
|
58
|
+
* Holds simple JSON Schema definitions for
|
|
59
|
+
* referencing from elsewhere.
|
|
60
|
+
*/
|
|
61
|
+
definitions?: {
|
|
62
|
+
[key: string]: JsonSchema7;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The keys that can exist on the object with the
|
|
66
|
+
* json schema that should validate their value
|
|
67
|
+
*/
|
|
68
|
+
properties?: {
|
|
69
|
+
[property: string]: JsonSchema7;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The key of this object is a regex for which
|
|
73
|
+
* properties the schema applies to
|
|
74
|
+
*/
|
|
75
|
+
patternProperties?: {
|
|
76
|
+
[pattern: string]: JsonSchema7;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* If the key is present as a property then the
|
|
80
|
+
* string of properties must also be present.
|
|
81
|
+
* If the value is a JSON Schema then it must
|
|
82
|
+
* also be valid for the object if the key is
|
|
83
|
+
* present.
|
|
84
|
+
*/
|
|
85
|
+
dependencies?: {
|
|
86
|
+
[key: string]: JsonSchema7 | string[];
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Enumerates the values that this schema can be
|
|
90
|
+
* e.g.
|
|
91
|
+
* {"type": "string",
|
|
92
|
+
* "enum": ["red", "green", "blue"]}
|
|
93
|
+
*/
|
|
94
|
+
enum?: any[];
|
|
95
|
+
/**
|
|
96
|
+
* The basic type of this schema, can be one of
|
|
97
|
+
* [string, number, object, array, boolean, null]
|
|
98
|
+
* or an array of the acceptable types
|
|
99
|
+
*/
|
|
100
|
+
type?: string | string[];
|
|
101
|
+
allOf?: JsonSchema7[];
|
|
102
|
+
anyOf?: JsonSchema7[];
|
|
103
|
+
oneOf?: JsonSchema7[];
|
|
104
|
+
/**
|
|
105
|
+
* The entity being validated must not match this schema
|
|
106
|
+
*/
|
|
107
|
+
not?: JsonSchema7;
|
|
108
|
+
format?: string;
|
|
109
|
+
readOnly?: boolean;
|
|
110
|
+
writeOnly?: boolean;
|
|
111
|
+
examples?: any[];
|
|
112
|
+
contains?: JsonSchema7;
|
|
113
|
+
propertyNames?: JsonSchema7;
|
|
114
|
+
const?: any;
|
|
115
|
+
if?: JsonSchema7;
|
|
116
|
+
then?: JsonSchema7;
|
|
117
|
+
else?: JsonSchema7;
|
|
118
|
+
errorMessage?: any;
|
|
119
|
+
}
|
package/lib/models/uischema.d.ts
CHANGED
|
@@ -1,201 +1,201 @@
|
|
|
1
|
-
import { JsonSchema } from './jsonSchema';
|
|
2
|
-
/**
|
|
3
|
-
* Interface for describing an UI schema element that is referencing
|
|
4
|
-
* a subschema. The value of the scope must be a JSON Pointer.
|
|
5
|
-
*/
|
|
6
|
-
export interface Scopable {
|
|
7
|
-
/**
|
|
8
|
-
* The scope that determines to which part this element should be bound to.
|
|
9
|
-
*/
|
|
10
|
-
scope: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A rule that may be attached to any UI schema element.
|
|
14
|
-
*/
|
|
15
|
-
export interface Rule {
|
|
16
|
-
/**
|
|
17
|
-
* The effect of the rule
|
|
18
|
-
*/
|
|
19
|
-
effect: RuleEffect;
|
|
20
|
-
/**
|
|
21
|
-
* The condition of the rule that must evaluate to true in order
|
|
22
|
-
* to trigger the effect.
|
|
23
|
-
*/
|
|
24
|
-
condition: Condition;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The different rule effects.
|
|
28
|
-
*/
|
|
29
|
-
export declare enum RuleEffect {
|
|
30
|
-
/**
|
|
31
|
-
* Effect that hides the associated element.
|
|
32
|
-
*/
|
|
33
|
-
HIDE = "HIDE",
|
|
34
|
-
/**
|
|
35
|
-
* Effect that shows the associated element.
|
|
36
|
-
*/
|
|
37
|
-
SHOW = "SHOW",
|
|
38
|
-
/**
|
|
39
|
-
* Effect that enables the associated element.
|
|
40
|
-
*/
|
|
41
|
-
ENABLE = "ENABLE",
|
|
42
|
-
/**
|
|
43
|
-
* Effect that disables the associated element.
|
|
44
|
-
*/
|
|
45
|
-
DISABLE = "DISABLE"
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Represents a condition to be evaluated.
|
|
49
|
-
*/
|
|
50
|
-
export interface Condition {
|
|
51
|
-
/**
|
|
52
|
-
* The type of condition.
|
|
53
|
-
*/
|
|
54
|
-
readonly type?: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* A leaf condition.
|
|
58
|
-
*/
|
|
59
|
-
export interface LeafCondition extends Condition, Scopable {
|
|
60
|
-
type: 'LEAF';
|
|
61
|
-
/**
|
|
62
|
-
* The expected value when evaluating the condition
|
|
63
|
-
*/
|
|
64
|
-
expectedValue: any;
|
|
65
|
-
}
|
|
66
|
-
export interface SchemaBasedCondition extends Condition, Scopable {
|
|
67
|
-
schema: JsonSchema;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* A composable condition.
|
|
71
|
-
*/
|
|
72
|
-
export interface ComposableCondition extends Condition {
|
|
73
|
-
conditions: Condition[];
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* An or condition.
|
|
77
|
-
*/
|
|
78
|
-
export interface OrCondition extends ComposableCondition {
|
|
79
|
-
type: 'OR';
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* An and condition.
|
|
83
|
-
*/
|
|
84
|
-
export interface AndCondition extends ComposableCondition {
|
|
85
|
-
type: 'AND';
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Common base interface for any UI schema element.
|
|
89
|
-
*/
|
|
90
|
-
export interface UISchemaElement {
|
|
91
|
-
/**
|
|
92
|
-
* The type of this UI schema element.
|
|
93
|
-
*/
|
|
94
|
-
type: string;
|
|
95
|
-
/**
|
|
96
|
-
* An optional rule.
|
|
97
|
-
*/
|
|
98
|
-
rule?: Rule;
|
|
99
|
-
/**
|
|
100
|
-
* Any additional options.
|
|
101
|
-
*/
|
|
102
|
-
options?: {
|
|
103
|
-
[key: string]: any;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Represents a layout element which can order its children
|
|
108
|
-
* in a specific way.
|
|
109
|
-
*/
|
|
110
|
-
export interface Layout extends UISchemaElement {
|
|
111
|
-
/**
|
|
112
|
-
* The child elements of this layout.
|
|
113
|
-
*/
|
|
114
|
-
elements: UISchemaElement[];
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* A layout which orders its child elements vertically (i.e. from top to bottom).
|
|
118
|
-
*/
|
|
119
|
-
export interface VerticalLayout extends Layout {
|
|
120
|
-
type: 'VerticalLayout';
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* A layout which orders its children horizontally (i.e. from left to right).
|
|
124
|
-
*/
|
|
125
|
-
export interface HorizontalLayout extends Layout {
|
|
126
|
-
type: 'HorizontalLayout';
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* A group resembles a vertical layout, but additionally might have a label.
|
|
130
|
-
* This layout is useful when grouping different elements by a certain criteria.
|
|
131
|
-
*/
|
|
132
|
-
export interface GroupLayout extends Layout {
|
|
133
|
-
type: 'Group';
|
|
134
|
-
/**
|
|
135
|
-
* The label of this group layout.
|
|
136
|
-
*/
|
|
137
|
-
label?: string;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Represents an object that can be used to configure a label.
|
|
141
|
-
*/
|
|
142
|
-
export interface LabelDescription {
|
|
143
|
-
/**
|
|
144
|
-
* An optional text to be displayed.
|
|
145
|
-
*/
|
|
146
|
-
text?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Optional property that determines whether to show this label.
|
|
149
|
-
*/
|
|
150
|
-
show?: boolean;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* A label element.
|
|
154
|
-
*/
|
|
155
|
-
export interface LabelElement extends UISchemaElement {
|
|
156
|
-
type: 'Label';
|
|
157
|
-
/**
|
|
158
|
-
* The text of label.
|
|
159
|
-
*/
|
|
160
|
-
text: string;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* A control element. The scope property of the control determines
|
|
164
|
-
* to which part of the schema the control should be bound.
|
|
165
|
-
*/
|
|
166
|
-
export interface ControlElement extends UISchemaElement, Scopable {
|
|
167
|
-
type: 'Control';
|
|
168
|
-
/**
|
|
169
|
-
* An optional label that will be associated with the control
|
|
170
|
-
*/
|
|
171
|
-
label?: string | boolean | LabelDescription;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* The category layout.
|
|
175
|
-
*/
|
|
176
|
-
export interface Category extends Layout {
|
|
177
|
-
type: 'Category';
|
|
178
|
-
/**
|
|
179
|
-
* The label associated with this category layout.
|
|
180
|
-
*/
|
|
181
|
-
label: string;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* The categorization element, which may have children elements.
|
|
185
|
-
* A child element may either be itself a Categorization or a Category, hence
|
|
186
|
-
* the categorization element can be used to represent recursive structures like trees.
|
|
187
|
-
*/
|
|
188
|
-
export interface Categorization extends UISchemaElement {
|
|
189
|
-
type: 'Categorization';
|
|
190
|
-
/**
|
|
191
|
-
* The label of this categorization.
|
|
192
|
-
*/
|
|
193
|
-
label: string;
|
|
194
|
-
/**
|
|
195
|
-
* The child elements of this categorization which are either of type
|
|
196
|
-
* {@link Category} or {@link Categorization}.
|
|
197
|
-
*/
|
|
198
|
-
elements: (Category | Categorization)[];
|
|
199
|
-
}
|
|
200
|
-
export declare const isGroup: (layout: Layout) => layout is GroupLayout;
|
|
201
|
-
export declare const isLayout: (uischema: UISchemaElement) => uischema is Layout;
|
|
1
|
+
import { JsonSchema } from './jsonSchema';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for describing an UI schema element that is referencing
|
|
4
|
+
* a subschema. The value of the scope must be a JSON Pointer.
|
|
5
|
+
*/
|
|
6
|
+
export interface Scopable {
|
|
7
|
+
/**
|
|
8
|
+
* The scope that determines to which part this element should be bound to.
|
|
9
|
+
*/
|
|
10
|
+
scope: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A rule that may be attached to any UI schema element.
|
|
14
|
+
*/
|
|
15
|
+
export interface Rule {
|
|
16
|
+
/**
|
|
17
|
+
* The effect of the rule
|
|
18
|
+
*/
|
|
19
|
+
effect: RuleEffect;
|
|
20
|
+
/**
|
|
21
|
+
* The condition of the rule that must evaluate to true in order
|
|
22
|
+
* to trigger the effect.
|
|
23
|
+
*/
|
|
24
|
+
condition: Condition;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The different rule effects.
|
|
28
|
+
*/
|
|
29
|
+
export declare enum RuleEffect {
|
|
30
|
+
/**
|
|
31
|
+
* Effect that hides the associated element.
|
|
32
|
+
*/
|
|
33
|
+
HIDE = "HIDE",
|
|
34
|
+
/**
|
|
35
|
+
* Effect that shows the associated element.
|
|
36
|
+
*/
|
|
37
|
+
SHOW = "SHOW",
|
|
38
|
+
/**
|
|
39
|
+
* Effect that enables the associated element.
|
|
40
|
+
*/
|
|
41
|
+
ENABLE = "ENABLE",
|
|
42
|
+
/**
|
|
43
|
+
* Effect that disables the associated element.
|
|
44
|
+
*/
|
|
45
|
+
DISABLE = "DISABLE"
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Represents a condition to be evaluated.
|
|
49
|
+
*/
|
|
50
|
+
export interface Condition {
|
|
51
|
+
/**
|
|
52
|
+
* The type of condition.
|
|
53
|
+
*/
|
|
54
|
+
readonly type?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A leaf condition.
|
|
58
|
+
*/
|
|
59
|
+
export interface LeafCondition extends Condition, Scopable {
|
|
60
|
+
type: 'LEAF';
|
|
61
|
+
/**
|
|
62
|
+
* The expected value when evaluating the condition
|
|
63
|
+
*/
|
|
64
|
+
expectedValue: any;
|
|
65
|
+
}
|
|
66
|
+
export interface SchemaBasedCondition extends Condition, Scopable {
|
|
67
|
+
schema: JsonSchema;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A composable condition.
|
|
71
|
+
*/
|
|
72
|
+
export interface ComposableCondition extends Condition {
|
|
73
|
+
conditions: Condition[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* An or condition.
|
|
77
|
+
*/
|
|
78
|
+
export interface OrCondition extends ComposableCondition {
|
|
79
|
+
type: 'OR';
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* An and condition.
|
|
83
|
+
*/
|
|
84
|
+
export interface AndCondition extends ComposableCondition {
|
|
85
|
+
type: 'AND';
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Common base interface for any UI schema element.
|
|
89
|
+
*/
|
|
90
|
+
export interface UISchemaElement {
|
|
91
|
+
/**
|
|
92
|
+
* The type of this UI schema element.
|
|
93
|
+
*/
|
|
94
|
+
type: string;
|
|
95
|
+
/**
|
|
96
|
+
* An optional rule.
|
|
97
|
+
*/
|
|
98
|
+
rule?: Rule;
|
|
99
|
+
/**
|
|
100
|
+
* Any additional options.
|
|
101
|
+
*/
|
|
102
|
+
options?: {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Represents a layout element which can order its children
|
|
108
|
+
* in a specific way.
|
|
109
|
+
*/
|
|
110
|
+
export interface Layout extends UISchemaElement {
|
|
111
|
+
/**
|
|
112
|
+
* The child elements of this layout.
|
|
113
|
+
*/
|
|
114
|
+
elements: UISchemaElement[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A layout which orders its child elements vertically (i.e. from top to bottom).
|
|
118
|
+
*/
|
|
119
|
+
export interface VerticalLayout extends Layout {
|
|
120
|
+
type: 'VerticalLayout';
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* A layout which orders its children horizontally (i.e. from left to right).
|
|
124
|
+
*/
|
|
125
|
+
export interface HorizontalLayout extends Layout {
|
|
126
|
+
type: 'HorizontalLayout';
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A group resembles a vertical layout, but additionally might have a label.
|
|
130
|
+
* This layout is useful when grouping different elements by a certain criteria.
|
|
131
|
+
*/
|
|
132
|
+
export interface GroupLayout extends Layout {
|
|
133
|
+
type: 'Group';
|
|
134
|
+
/**
|
|
135
|
+
* The label of this group layout.
|
|
136
|
+
*/
|
|
137
|
+
label?: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Represents an object that can be used to configure a label.
|
|
141
|
+
*/
|
|
142
|
+
export interface LabelDescription {
|
|
143
|
+
/**
|
|
144
|
+
* An optional text to be displayed.
|
|
145
|
+
*/
|
|
146
|
+
text?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Optional property that determines whether to show this label.
|
|
149
|
+
*/
|
|
150
|
+
show?: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* A label element.
|
|
154
|
+
*/
|
|
155
|
+
export interface LabelElement extends UISchemaElement {
|
|
156
|
+
type: 'Label';
|
|
157
|
+
/**
|
|
158
|
+
* The text of label.
|
|
159
|
+
*/
|
|
160
|
+
text: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* A control element. The scope property of the control determines
|
|
164
|
+
* to which part of the schema the control should be bound.
|
|
165
|
+
*/
|
|
166
|
+
export interface ControlElement extends UISchemaElement, Scopable {
|
|
167
|
+
type: 'Control';
|
|
168
|
+
/**
|
|
169
|
+
* An optional label that will be associated with the control
|
|
170
|
+
*/
|
|
171
|
+
label?: string | boolean | LabelDescription;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* The category layout.
|
|
175
|
+
*/
|
|
176
|
+
export interface Category extends Layout {
|
|
177
|
+
type: 'Category';
|
|
178
|
+
/**
|
|
179
|
+
* The label associated with this category layout.
|
|
180
|
+
*/
|
|
181
|
+
label: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The categorization element, which may have children elements.
|
|
185
|
+
* A child element may either be itself a Categorization or a Category, hence
|
|
186
|
+
* the categorization element can be used to represent recursive structures like trees.
|
|
187
|
+
*/
|
|
188
|
+
export interface Categorization extends UISchemaElement {
|
|
189
|
+
type: 'Categorization';
|
|
190
|
+
/**
|
|
191
|
+
* The label of this categorization.
|
|
192
|
+
*/
|
|
193
|
+
label: string;
|
|
194
|
+
/**
|
|
195
|
+
* The child elements of this categorization which are either of type
|
|
196
|
+
* {@link Category} or {@link Categorization}.
|
|
197
|
+
*/
|
|
198
|
+
elements: (Category | Categorization)[];
|
|
199
|
+
}
|
|
200
|
+
export declare const isGroup: (layout: Layout) => layout is GroupLayout;
|
|
201
|
+
export declare const isLayout: (uischema: UISchemaElement) => uischema is Layout;
|
package/lib/reducers/cells.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RankedTester } from '../testers';
|
|
2
|
-
import { AddCellRendererAction, RemoveCellRendererAction } from '../actions';
|
|
3
|
-
import { Reducer } from '../util';
|
|
4
|
-
declare type ValidCellReducerActions = AddCellRendererAction | RemoveCellRendererAction;
|
|
5
|
-
export declare type JsonFormsCellRendererRegistryState = JsonFormsCellRendererRegistryEntry[];
|
|
6
|
-
export interface JsonFormsCellRendererRegistryEntry {
|
|
7
|
-
tester: RankedTester;
|
|
8
|
-
cell: any;
|
|
9
|
-
}
|
|
10
|
-
export declare const cellReducer: Reducer<JsonFormsCellRendererRegistryState, ValidCellReducerActions>;
|
|
11
|
-
export {};
|
|
1
|
+
import { RankedTester } from '../testers';
|
|
2
|
+
import { AddCellRendererAction, RemoveCellRendererAction } from '../actions';
|
|
3
|
+
import { Reducer } from '../util';
|
|
4
|
+
declare type ValidCellReducerActions = AddCellRendererAction | RemoveCellRendererAction;
|
|
5
|
+
export declare type JsonFormsCellRendererRegistryState = JsonFormsCellRendererRegistryEntry[];
|
|
6
|
+
export interface JsonFormsCellRendererRegistryEntry {
|
|
7
|
+
tester: RankedTester;
|
|
8
|
+
cell: any;
|
|
9
|
+
}
|
|
10
|
+
export declare const cellReducer: Reducer<JsonFormsCellRendererRegistryState, ValidCellReducerActions>;
|
|
11
|
+
export {};
|
package/lib/reducers/config.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SetConfigAction } from '../actions';
|
|
2
|
-
import { Reducer } from '../util';
|
|
3
|
-
export declare const configReducer: Reducer<any, SetConfigAction>;
|
|
1
|
+
import { SetConfigAction } from '../actions';
|
|
2
|
+
import { Reducer } from '../util';
|
|
3
|
+
export declare const configReducer: Reducer<any, SetConfigAction>;
|