@jsonforms/core 3.3.0-beta.0 → 3.3.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/lib/Helpers.d.ts +5 -5
- package/lib/actions/actions.d.ts +198 -198
- 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/arrayTranslations.d.ts +24 -24
- package/lib/i18n/combinatorTranslations.d.ts +14 -14
- package/lib/i18n/i18nTypes.d.ts +16 -16
- package/lib/i18n/i18nUtil.d.ts +28 -28
- package/lib/i18n/index.d.ts +4 -4
- package/lib/index.d.ts +11 -11
- 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 +231 -231
- package/lib/reducers/cells.d.ts +11 -11
- package/lib/reducers/config.d.ts +3 -3
- package/lib/reducers/core.d.ts +26 -26
- package/lib/reducers/default-data.d.ts +10 -10
- package/lib/reducers/i18n.d.ts +8 -8
- package/lib/reducers/index.d.ts +10 -10
- package/lib/reducers/middleware.d.ts +6 -6
- 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 +220 -220
- package/lib/util/Formatted.d.ts +19 -19
- package/lib/util/array.d.ts +3 -3
- package/lib/util/cell.d.ts +78 -78
- package/lib/util/combinators.d.ts +9 -9
- package/lib/util/defaultDateFormat.d.ts +3 -3
- package/lib/util/ids.d.ts +3 -3
- package/lib/util/index.d.ts +16 -16
- package/lib/util/label.d.ts +21 -21
- package/lib/util/path.d.ts +38 -38
- package/lib/util/renderer.d.ts +429 -429
- package/lib/util/resolvers.d.ts +25 -25
- package/lib/util/runtime.d.ts +17 -17
- package/lib/util/schema.d.ts +10 -10
- package/lib/util/type.d.ts +174 -174
- package/lib/util/uischema.d.ts +18 -18
- package/lib/util/util.d.ts +57 -57
- package/lib/util/validator.d.ts +3 -3
- package/package.json +2 -2
package/lib/Helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ControlElement, JsonSchema, LabelDescription } from './models';
|
|
2
|
-
export declare const Helpers: {
|
|
3
|
-
createLabelDescriptionFrom(withLabel: ControlElement, schema: JsonSchema): LabelDescription;
|
|
4
|
-
convertToValidClassName(s: string): string;
|
|
5
|
-
};
|
|
1
|
+
import type { ControlElement, JsonSchema, LabelDescription } from './models';
|
|
2
|
+
export declare const Helpers: {
|
|
3
|
+
createLabelDescriptionFrom(withLabel: ControlElement, schema: JsonSchema): LabelDescription;
|
|
4
|
+
convertToValidClassName(s: string): string;
|
|
5
|
+
};
|
package/lib/actions/actions.d.ts
CHANGED
|
@@ -1,198 +1,198 @@
|
|
|
1
|
-
import type AJV from 'ajv';
|
|
2
|
-
import type { ErrorObject } from 'ajv';
|
|
3
|
-
import type { JsonSchema, UISchemaElement } from '../models';
|
|
4
|
-
import type { RankedTester } from '../testers';
|
|
5
|
-
import type { UISchemaTester, ValidationMode } from '../reducers';
|
|
6
|
-
import type { ErrorTranslator, Translator } from '../i18n';
|
|
7
|
-
export declare const INIT: "jsonforms/INIT";
|
|
8
|
-
export declare const UPDATE_CORE: "jsonforms/UPDATE_CORE";
|
|
9
|
-
export declare const SET_AJV: "jsonforms/SET_AJV";
|
|
10
|
-
export declare const UPDATE_DATA: "jsonforms/UPDATE";
|
|
11
|
-
export declare const UPDATE_ERRORS: "jsonforms/UPDATE_ERRORS";
|
|
12
|
-
export declare const VALIDATE: "jsonforms/VALIDATE";
|
|
13
|
-
export declare const ADD_RENDERER: "jsonforms/ADD_RENDERER";
|
|
14
|
-
export declare const REMOVE_RENDERER: "jsonforms/REMOVE_RENDERER";
|
|
15
|
-
export declare const ADD_CELL: "jsonforms/ADD_CELL";
|
|
16
|
-
export declare const REMOVE_CELL: "jsonforms/REMOVE_CELL";
|
|
17
|
-
export declare const SET_CONFIG: "jsonforms/SET_CONFIG";
|
|
18
|
-
export declare const ADD_UI_SCHEMA: "jsonforms/ADD_UI_SCHEMA";
|
|
19
|
-
export declare const REMOVE_UI_SCHEMA: "jsonforms/REMOVE_UI_SCHEMA";
|
|
20
|
-
export declare const SET_SCHEMA: "jsonforms/SET_SCHEMA";
|
|
21
|
-
export declare const SET_UISCHEMA: "jsonforms/SET_UISCHEMA";
|
|
22
|
-
export declare const SET_VALIDATION_MODE: "jsonforms/SET_VALIDATION_MODE";
|
|
23
|
-
export declare const SET_LOCALE: "jsonforms/SET_LOCALE";
|
|
24
|
-
export declare const SET_TRANSLATOR: "jsonforms/SET_TRANSLATOR";
|
|
25
|
-
export declare const UPDATE_I18N: "jsonforms/UPDATE_I18N";
|
|
26
|
-
export declare const ADD_DEFAULT_DATA: "jsonforms/ADD_DEFAULT_DATA";
|
|
27
|
-
export declare const REMOVE_DEFAULT_DATA: "jsonforms/REMOVE_DEFAULT_DATA";
|
|
28
|
-
export type UpdateArrayContext = {
|
|
29
|
-
type: 'ADD';
|
|
30
|
-
values: any[];
|
|
31
|
-
} | {
|
|
32
|
-
type: 'REMOVE';
|
|
33
|
-
indices: number[];
|
|
34
|
-
} | {
|
|
35
|
-
type: 'MOVE';
|
|
36
|
-
moves: {
|
|
37
|
-
from: number;
|
|
38
|
-
to: number;
|
|
39
|
-
}[];
|
|
40
|
-
};
|
|
41
|
-
export declare const isUpdateArrayContext: (context: object) => context is UpdateArrayContext;
|
|
42
|
-
export type CoreActions = InitAction | UpdateCoreAction | UpdateAction | UpdateErrorsAction | SetAjvAction | SetSchemaAction | SetUISchemaAction | SetValidationModeAction;
|
|
43
|
-
export interface UpdateAction {
|
|
44
|
-
type: 'jsonforms/UPDATE';
|
|
45
|
-
path: string;
|
|
46
|
-
updater(existingData?: any): any;
|
|
47
|
-
context?: object;
|
|
48
|
-
}
|
|
49
|
-
export interface UpdateErrorsAction {
|
|
50
|
-
type: 'jsonforms/UPDATE_ERRORS';
|
|
51
|
-
errors: ErrorObject[];
|
|
52
|
-
}
|
|
53
|
-
export interface InitAction {
|
|
54
|
-
type: 'jsonforms/INIT';
|
|
55
|
-
data: any;
|
|
56
|
-
schema: JsonSchema;
|
|
57
|
-
uischema: UISchemaElement;
|
|
58
|
-
options?: InitActionOptions | AJV;
|
|
59
|
-
}
|
|
60
|
-
export interface UpdateCoreAction {
|
|
61
|
-
type: 'jsonforms/UPDATE_CORE';
|
|
62
|
-
data?: any;
|
|
63
|
-
schema?: JsonSchema;
|
|
64
|
-
uischema?: UISchemaElement;
|
|
65
|
-
options?: InitActionOptions | AJV;
|
|
66
|
-
}
|
|
67
|
-
export interface InitActionOptions {
|
|
68
|
-
ajv?: AJV;
|
|
69
|
-
validationMode?: ValidationMode;
|
|
70
|
-
additionalErrors?: ErrorObject[];
|
|
71
|
-
}
|
|
72
|
-
export interface SetValidationModeAction {
|
|
73
|
-
type: 'jsonforms/SET_VALIDATION_MODE';
|
|
74
|
-
validationMode: ValidationMode;
|
|
75
|
-
}
|
|
76
|
-
export declare const init: (data: any, schema?: JsonSchema, uischema?: UISchemaElement, options?: InitActionOptions | AJV) => {
|
|
77
|
-
type: "jsonforms/INIT";
|
|
78
|
-
data: any;
|
|
79
|
-
schema: JsonSchema;
|
|
80
|
-
uischema: UISchemaElement;
|
|
81
|
-
options: InitActionOptions | AJV;
|
|
82
|
-
};
|
|
83
|
-
export declare const updateCore: (data: any, schema: JsonSchema, uischema?: UISchemaElement, options?: AJV | InitActionOptions) => UpdateCoreAction;
|
|
84
|
-
export interface RegisterDefaultDataAction {
|
|
85
|
-
type: 'jsonforms/ADD_DEFAULT_DATA';
|
|
86
|
-
schemaPath: string;
|
|
87
|
-
data: any;
|
|
88
|
-
}
|
|
89
|
-
export declare const registerDefaultData: (schemaPath: string, data: any) => {
|
|
90
|
-
type: "jsonforms/ADD_DEFAULT_DATA";
|
|
91
|
-
schemaPath: string;
|
|
92
|
-
data: any;
|
|
93
|
-
};
|
|
94
|
-
export interface UnregisterDefaultDataAction {
|
|
95
|
-
type: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
96
|
-
schemaPath: string;
|
|
97
|
-
}
|
|
98
|
-
export declare const unregisterDefaultData: (schemaPath: string) => {
|
|
99
|
-
type: "jsonforms/REMOVE_DEFAULT_DATA";
|
|
100
|
-
schemaPath: string;
|
|
101
|
-
};
|
|
102
|
-
export interface SetAjvAction {
|
|
103
|
-
type: 'jsonforms/SET_AJV';
|
|
104
|
-
ajv: AJV;
|
|
105
|
-
}
|
|
106
|
-
export declare const setAjv: (ajv: AJV) => {
|
|
107
|
-
type: "jsonforms/SET_AJV";
|
|
108
|
-
ajv: AJV;
|
|
109
|
-
};
|
|
110
|
-
export declare const update: (path: string, updater: (existingData: any) => any, context?: object) => UpdateAction;
|
|
111
|
-
export declare const updateErrors: (errors: ErrorObject[]) => UpdateErrorsAction;
|
|
112
|
-
export interface AddRendererAction {
|
|
113
|
-
type: 'jsonforms/ADD_RENDERER';
|
|
114
|
-
tester: RankedTester;
|
|
115
|
-
renderer: any;
|
|
116
|
-
}
|
|
117
|
-
export declare const registerRenderer: (tester: RankedTester, renderer: any) => {
|
|
118
|
-
type: "jsonforms/ADD_RENDERER";
|
|
119
|
-
tester: RankedTester;
|
|
120
|
-
renderer: any;
|
|
121
|
-
};
|
|
122
|
-
export interface AddCellRendererAction {
|
|
123
|
-
type: 'jsonforms/ADD_CELL';
|
|
124
|
-
tester: RankedTester;
|
|
125
|
-
cell: any;
|
|
126
|
-
}
|
|
127
|
-
export declare const registerCell: (tester: RankedTester, cell: any) => {
|
|
128
|
-
type: "jsonforms/ADD_CELL";
|
|
129
|
-
tester: RankedTester;
|
|
130
|
-
cell: any;
|
|
131
|
-
};
|
|
132
|
-
export interface RemoveCellRendererAction {
|
|
133
|
-
type: 'jsonforms/REMOVE_CELL';
|
|
134
|
-
tester: RankedTester;
|
|
135
|
-
cell: any;
|
|
136
|
-
}
|
|
137
|
-
export declare const unregisterCell: (tester: RankedTester, cell: any) => {
|
|
138
|
-
type: "jsonforms/REMOVE_CELL";
|
|
139
|
-
tester: RankedTester;
|
|
140
|
-
cell: any;
|
|
141
|
-
};
|
|
142
|
-
export interface RemoveRendererAction {
|
|
143
|
-
type: 'jsonforms/REMOVE_RENDERER';
|
|
144
|
-
tester: RankedTester;
|
|
145
|
-
renderer: any;
|
|
146
|
-
}
|
|
147
|
-
export declare const unregisterRenderer: (tester: RankedTester, renderer: any) => {
|
|
148
|
-
type: "jsonforms/REMOVE_RENDERER";
|
|
149
|
-
tester: RankedTester;
|
|
150
|
-
renderer: any;
|
|
151
|
-
};
|
|
152
|
-
export interface SetConfigAction {
|
|
153
|
-
type: 'jsonforms/SET_CONFIG';
|
|
154
|
-
config: any;
|
|
155
|
-
}
|
|
156
|
-
export declare const setConfig: (config: any) => SetConfigAction;
|
|
157
|
-
export declare const setValidationMode: (validationMode: ValidationMode) => SetValidationModeAction;
|
|
158
|
-
export type UISchemaActions = AddUISchemaAction | RemoveUISchemaAction;
|
|
159
|
-
export interface AddUISchemaAction {
|
|
160
|
-
type: 'jsonforms/ADD_UI_SCHEMA';
|
|
161
|
-
tester: UISchemaTester;
|
|
162
|
-
uischema: UISchemaElement;
|
|
163
|
-
}
|
|
164
|
-
export declare const registerUISchema: (tester: UISchemaTester, uischema: UISchemaElement) => AddUISchemaAction;
|
|
165
|
-
export interface RemoveUISchemaAction {
|
|
166
|
-
type: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
167
|
-
tester: UISchemaTester;
|
|
168
|
-
}
|
|
169
|
-
export declare const unregisterUISchema: (tester: UISchemaTester) => RemoveUISchemaAction;
|
|
170
|
-
export type I18nActions = SetLocaleAction | SetTranslatorAction | UpdateI18nAction;
|
|
171
|
-
export interface SetLocaleAction {
|
|
172
|
-
type: 'jsonforms/SET_LOCALE';
|
|
173
|
-
locale: string | undefined;
|
|
174
|
-
}
|
|
175
|
-
export declare const setLocale: (locale: string | undefined) => SetLocaleAction;
|
|
176
|
-
export interface SetSchemaAction {
|
|
177
|
-
type: 'jsonforms/SET_SCHEMA';
|
|
178
|
-
schema: JsonSchema;
|
|
179
|
-
}
|
|
180
|
-
export declare const setSchema: (schema: JsonSchema) => SetSchemaAction;
|
|
181
|
-
export interface SetTranslatorAction {
|
|
182
|
-
type: 'jsonforms/SET_TRANSLATOR';
|
|
183
|
-
translator?: Translator;
|
|
184
|
-
errorTranslator?: ErrorTranslator;
|
|
185
|
-
}
|
|
186
|
-
export declare const setTranslator: (translator?: Translator, errorTranslator?: ErrorTranslator) => SetTranslatorAction;
|
|
187
|
-
export interface UpdateI18nAction {
|
|
188
|
-
type: 'jsonforms/UPDATE_I18N';
|
|
189
|
-
locale: string | undefined;
|
|
190
|
-
translator: Translator | undefined;
|
|
191
|
-
errorTranslator: ErrorTranslator | undefined;
|
|
192
|
-
}
|
|
193
|
-
export declare const updateI18n: (locale: string | undefined, translator: Translator | undefined, errorTranslator: ErrorTranslator | undefined) => UpdateI18nAction;
|
|
194
|
-
export interface SetUISchemaAction {
|
|
195
|
-
type: 'jsonforms/SET_UISCHEMA';
|
|
196
|
-
uischema: UISchemaElement;
|
|
197
|
-
}
|
|
198
|
-
export declare const setUISchema: (uischema: UISchemaElement) => SetUISchemaAction;
|
|
1
|
+
import type AJV from 'ajv';
|
|
2
|
+
import type { ErrorObject } from 'ajv';
|
|
3
|
+
import type { JsonSchema, UISchemaElement } from '../models';
|
|
4
|
+
import type { RankedTester } from '../testers';
|
|
5
|
+
import type { UISchemaTester, ValidationMode } from '../reducers';
|
|
6
|
+
import type { ErrorTranslator, Translator } from '../i18n';
|
|
7
|
+
export declare const INIT: "jsonforms/INIT";
|
|
8
|
+
export declare const UPDATE_CORE: "jsonforms/UPDATE_CORE";
|
|
9
|
+
export declare const SET_AJV: "jsonforms/SET_AJV";
|
|
10
|
+
export declare const UPDATE_DATA: "jsonforms/UPDATE";
|
|
11
|
+
export declare const UPDATE_ERRORS: "jsonforms/UPDATE_ERRORS";
|
|
12
|
+
export declare const VALIDATE: "jsonforms/VALIDATE";
|
|
13
|
+
export declare const ADD_RENDERER: "jsonforms/ADD_RENDERER";
|
|
14
|
+
export declare const REMOVE_RENDERER: "jsonforms/REMOVE_RENDERER";
|
|
15
|
+
export declare const ADD_CELL: "jsonforms/ADD_CELL";
|
|
16
|
+
export declare const REMOVE_CELL: "jsonforms/REMOVE_CELL";
|
|
17
|
+
export declare const SET_CONFIG: "jsonforms/SET_CONFIG";
|
|
18
|
+
export declare const ADD_UI_SCHEMA: "jsonforms/ADD_UI_SCHEMA";
|
|
19
|
+
export declare const REMOVE_UI_SCHEMA: "jsonforms/REMOVE_UI_SCHEMA";
|
|
20
|
+
export declare const SET_SCHEMA: "jsonforms/SET_SCHEMA";
|
|
21
|
+
export declare const SET_UISCHEMA: "jsonforms/SET_UISCHEMA";
|
|
22
|
+
export declare const SET_VALIDATION_MODE: "jsonforms/SET_VALIDATION_MODE";
|
|
23
|
+
export declare const SET_LOCALE: "jsonforms/SET_LOCALE";
|
|
24
|
+
export declare const SET_TRANSLATOR: "jsonforms/SET_TRANSLATOR";
|
|
25
|
+
export declare const UPDATE_I18N: "jsonforms/UPDATE_I18N";
|
|
26
|
+
export declare const ADD_DEFAULT_DATA: "jsonforms/ADD_DEFAULT_DATA";
|
|
27
|
+
export declare const REMOVE_DEFAULT_DATA: "jsonforms/REMOVE_DEFAULT_DATA";
|
|
28
|
+
export type UpdateArrayContext = {
|
|
29
|
+
type: 'ADD';
|
|
30
|
+
values: any[];
|
|
31
|
+
} | {
|
|
32
|
+
type: 'REMOVE';
|
|
33
|
+
indices: number[];
|
|
34
|
+
} | {
|
|
35
|
+
type: 'MOVE';
|
|
36
|
+
moves: {
|
|
37
|
+
from: number;
|
|
38
|
+
to: number;
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
export declare const isUpdateArrayContext: (context: object) => context is UpdateArrayContext;
|
|
42
|
+
export type CoreActions = InitAction | UpdateCoreAction | UpdateAction | UpdateErrorsAction | SetAjvAction | SetSchemaAction | SetUISchemaAction | SetValidationModeAction;
|
|
43
|
+
export interface UpdateAction {
|
|
44
|
+
type: 'jsonforms/UPDATE';
|
|
45
|
+
path: string;
|
|
46
|
+
updater(existingData?: any): any;
|
|
47
|
+
context?: object;
|
|
48
|
+
}
|
|
49
|
+
export interface UpdateErrorsAction {
|
|
50
|
+
type: 'jsonforms/UPDATE_ERRORS';
|
|
51
|
+
errors: ErrorObject[];
|
|
52
|
+
}
|
|
53
|
+
export interface InitAction {
|
|
54
|
+
type: 'jsonforms/INIT';
|
|
55
|
+
data: any;
|
|
56
|
+
schema: JsonSchema;
|
|
57
|
+
uischema: UISchemaElement;
|
|
58
|
+
options?: InitActionOptions | AJV;
|
|
59
|
+
}
|
|
60
|
+
export interface UpdateCoreAction {
|
|
61
|
+
type: 'jsonforms/UPDATE_CORE';
|
|
62
|
+
data?: any;
|
|
63
|
+
schema?: JsonSchema;
|
|
64
|
+
uischema?: UISchemaElement;
|
|
65
|
+
options?: InitActionOptions | AJV;
|
|
66
|
+
}
|
|
67
|
+
export interface InitActionOptions {
|
|
68
|
+
ajv?: AJV;
|
|
69
|
+
validationMode?: ValidationMode;
|
|
70
|
+
additionalErrors?: ErrorObject[];
|
|
71
|
+
}
|
|
72
|
+
export interface SetValidationModeAction {
|
|
73
|
+
type: 'jsonforms/SET_VALIDATION_MODE';
|
|
74
|
+
validationMode: ValidationMode;
|
|
75
|
+
}
|
|
76
|
+
export declare const init: (data: any, schema?: JsonSchema, uischema?: UISchemaElement, options?: InitActionOptions | AJV) => {
|
|
77
|
+
type: "jsonforms/INIT";
|
|
78
|
+
data: any;
|
|
79
|
+
schema: JsonSchema;
|
|
80
|
+
uischema: UISchemaElement;
|
|
81
|
+
options: InitActionOptions | AJV;
|
|
82
|
+
};
|
|
83
|
+
export declare const updateCore: (data: any, schema: JsonSchema, uischema?: UISchemaElement, options?: AJV | InitActionOptions) => UpdateCoreAction;
|
|
84
|
+
export interface RegisterDefaultDataAction {
|
|
85
|
+
type: 'jsonforms/ADD_DEFAULT_DATA';
|
|
86
|
+
schemaPath: string;
|
|
87
|
+
data: any;
|
|
88
|
+
}
|
|
89
|
+
export declare const registerDefaultData: (schemaPath: string, data: any) => {
|
|
90
|
+
type: "jsonforms/ADD_DEFAULT_DATA";
|
|
91
|
+
schemaPath: string;
|
|
92
|
+
data: any;
|
|
93
|
+
};
|
|
94
|
+
export interface UnregisterDefaultDataAction {
|
|
95
|
+
type: 'jsonforms/REMOVE_DEFAULT_DATA';
|
|
96
|
+
schemaPath: string;
|
|
97
|
+
}
|
|
98
|
+
export declare const unregisterDefaultData: (schemaPath: string) => {
|
|
99
|
+
type: "jsonforms/REMOVE_DEFAULT_DATA";
|
|
100
|
+
schemaPath: string;
|
|
101
|
+
};
|
|
102
|
+
export interface SetAjvAction {
|
|
103
|
+
type: 'jsonforms/SET_AJV';
|
|
104
|
+
ajv: AJV;
|
|
105
|
+
}
|
|
106
|
+
export declare const setAjv: (ajv: AJV) => {
|
|
107
|
+
type: "jsonforms/SET_AJV";
|
|
108
|
+
ajv: AJV;
|
|
109
|
+
};
|
|
110
|
+
export declare const update: (path: string, updater: (existingData: any) => any, context?: object) => UpdateAction;
|
|
111
|
+
export declare const updateErrors: (errors: ErrorObject[]) => UpdateErrorsAction;
|
|
112
|
+
export interface AddRendererAction {
|
|
113
|
+
type: 'jsonforms/ADD_RENDERER';
|
|
114
|
+
tester: RankedTester;
|
|
115
|
+
renderer: any;
|
|
116
|
+
}
|
|
117
|
+
export declare const registerRenderer: (tester: RankedTester, renderer: any) => {
|
|
118
|
+
type: "jsonforms/ADD_RENDERER";
|
|
119
|
+
tester: RankedTester;
|
|
120
|
+
renderer: any;
|
|
121
|
+
};
|
|
122
|
+
export interface AddCellRendererAction {
|
|
123
|
+
type: 'jsonforms/ADD_CELL';
|
|
124
|
+
tester: RankedTester;
|
|
125
|
+
cell: any;
|
|
126
|
+
}
|
|
127
|
+
export declare const registerCell: (tester: RankedTester, cell: any) => {
|
|
128
|
+
type: "jsonforms/ADD_CELL";
|
|
129
|
+
tester: RankedTester;
|
|
130
|
+
cell: any;
|
|
131
|
+
};
|
|
132
|
+
export interface RemoveCellRendererAction {
|
|
133
|
+
type: 'jsonforms/REMOVE_CELL';
|
|
134
|
+
tester: RankedTester;
|
|
135
|
+
cell: any;
|
|
136
|
+
}
|
|
137
|
+
export declare const unregisterCell: (tester: RankedTester, cell: any) => {
|
|
138
|
+
type: "jsonforms/REMOVE_CELL";
|
|
139
|
+
tester: RankedTester;
|
|
140
|
+
cell: any;
|
|
141
|
+
};
|
|
142
|
+
export interface RemoveRendererAction {
|
|
143
|
+
type: 'jsonforms/REMOVE_RENDERER';
|
|
144
|
+
tester: RankedTester;
|
|
145
|
+
renderer: any;
|
|
146
|
+
}
|
|
147
|
+
export declare const unregisterRenderer: (tester: RankedTester, renderer: any) => {
|
|
148
|
+
type: "jsonforms/REMOVE_RENDERER";
|
|
149
|
+
tester: RankedTester;
|
|
150
|
+
renderer: any;
|
|
151
|
+
};
|
|
152
|
+
export interface SetConfigAction {
|
|
153
|
+
type: 'jsonforms/SET_CONFIG';
|
|
154
|
+
config: any;
|
|
155
|
+
}
|
|
156
|
+
export declare const setConfig: (config: any) => SetConfigAction;
|
|
157
|
+
export declare const setValidationMode: (validationMode: ValidationMode) => SetValidationModeAction;
|
|
158
|
+
export type UISchemaActions = AddUISchemaAction | RemoveUISchemaAction;
|
|
159
|
+
export interface AddUISchemaAction {
|
|
160
|
+
type: 'jsonforms/ADD_UI_SCHEMA';
|
|
161
|
+
tester: UISchemaTester;
|
|
162
|
+
uischema: UISchemaElement;
|
|
163
|
+
}
|
|
164
|
+
export declare const registerUISchema: (tester: UISchemaTester, uischema: UISchemaElement) => AddUISchemaAction;
|
|
165
|
+
export interface RemoveUISchemaAction {
|
|
166
|
+
type: 'jsonforms/REMOVE_UI_SCHEMA';
|
|
167
|
+
tester: UISchemaTester;
|
|
168
|
+
}
|
|
169
|
+
export declare const unregisterUISchema: (tester: UISchemaTester) => RemoveUISchemaAction;
|
|
170
|
+
export type I18nActions = SetLocaleAction | SetTranslatorAction | UpdateI18nAction;
|
|
171
|
+
export interface SetLocaleAction {
|
|
172
|
+
type: 'jsonforms/SET_LOCALE';
|
|
173
|
+
locale: string | undefined;
|
|
174
|
+
}
|
|
175
|
+
export declare const setLocale: (locale: string | undefined) => SetLocaleAction;
|
|
176
|
+
export interface SetSchemaAction {
|
|
177
|
+
type: 'jsonforms/SET_SCHEMA';
|
|
178
|
+
schema: JsonSchema;
|
|
179
|
+
}
|
|
180
|
+
export declare const setSchema: (schema: JsonSchema) => SetSchemaAction;
|
|
181
|
+
export interface SetTranslatorAction {
|
|
182
|
+
type: 'jsonforms/SET_TRANSLATOR';
|
|
183
|
+
translator?: Translator;
|
|
184
|
+
errorTranslator?: ErrorTranslator;
|
|
185
|
+
}
|
|
186
|
+
export declare const setTranslator: (translator?: Translator, errorTranslator?: ErrorTranslator) => SetTranslatorAction;
|
|
187
|
+
export interface UpdateI18nAction {
|
|
188
|
+
type: 'jsonforms/UPDATE_I18N';
|
|
189
|
+
locale: string | undefined;
|
|
190
|
+
translator: Translator | undefined;
|
|
191
|
+
errorTranslator: ErrorTranslator | undefined;
|
|
192
|
+
}
|
|
193
|
+
export declare const updateI18n: (locale: string | undefined, translator: Translator | undefined, errorTranslator: ErrorTranslator | undefined) => UpdateI18nAction;
|
|
194
|
+
export interface SetUISchemaAction {
|
|
195
|
+
type: 'jsonforms/SET_UISCHEMA';
|
|
196
|
+
uischema: UISchemaElement;
|
|
197
|
+
}
|
|
198
|
+
export declare const setUISchema: (uischema: UISchemaElement) => SetUISchemaAction;
|
package/lib/actions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './actions';
|
|
1
|
+
export * from './actions';
|
package/lib/configDefault.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const configDefault: {
|
|
2
|
-
restrict: boolean;
|
|
3
|
-
trim: boolean;
|
|
4
|
-
showUnfocusedDescription: boolean;
|
|
5
|
-
hideRequiredAsterisk: boolean;
|
|
6
|
-
};
|
|
1
|
+
export declare const configDefault: {
|
|
2
|
+
restrict: boolean;
|
|
3
|
+
trim: boolean;
|
|
4
|
+
showUnfocusedDescription: boolean;
|
|
5
|
+
hideRequiredAsterisk: boolean;
|
|
6
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ControlElement, JsonSchema, UISchemaElement } from '../';
|
|
2
|
-
export declare const Generate: {
|
|
3
|
-
jsonSchema(instance: Object, options?: any): JsonSchema;
|
|
4
|
-
uiSchema(jsonSchema: JsonSchema, layoutType?: string, prefix?: string, rootSchema?: JsonSchema): UISchemaElement;
|
|
5
|
-
controlElement(ref: string): ControlElement;
|
|
6
|
-
};
|
|
1
|
+
import type { ControlElement, JsonSchema, UISchemaElement } from '../';
|
|
2
|
+
export declare const Generate: {
|
|
3
|
+
jsonSchema(instance: Object, options?: any): JsonSchema;
|
|
4
|
+
uiSchema(jsonSchema: JsonSchema, layoutType?: string, prefix?: string, rootSchema?: JsonSchema): UISchemaElement;
|
|
5
|
+
controlElement(ref: string): ControlElement;
|
|
6
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Generate';
|
|
2
|
-
export * from './schema';
|
|
3
|
-
export * from './uischema';
|
|
1
|
+
export * from './Generate';
|
|
2
|
+
export * from './schema';
|
|
3
|
+
export * from './uischema';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { JsonSchema4 } from '../models';
|
|
2
|
-
/**
|
|
3
|
-
* Generate a JSON schema based on the given data and any additional options.
|
|
4
|
-
* @param {Object} instance the data to create a JSON schema for
|
|
5
|
-
* @param {any} options any additional options that may alter the generated JSON schema
|
|
6
|
-
* @returns {JsonSchema} the generated schema
|
|
7
|
-
*/
|
|
8
|
-
export declare const generateJsonSchema: (instance: Object, options?: any) => JsonSchema4;
|
|
1
|
+
import type { JsonSchema4 } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* Generate a JSON schema based on the given data and any additional options.
|
|
4
|
+
* @param {Object} instance the data to create a JSON schema for
|
|
5
|
+
* @param {any} options any additional options that may alter the generated JSON schema
|
|
6
|
+
* @returns {JsonSchema} the generated schema
|
|
7
|
+
*/
|
|
8
|
+
export declare const generateJsonSchema: (instance: Object, options?: any) => JsonSchema4;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ControlElement, JsonSchema, UISchemaElement } from '../models';
|
|
2
|
-
/**
|
|
3
|
-
* Creates a IControlObject with the given label referencing the given ref
|
|
4
|
-
*/
|
|
5
|
-
export declare const createControlElement: (ref: string) => ControlElement;
|
|
6
|
-
/**
|
|
7
|
-
* Generate a default UI schema.
|
|
8
|
-
* @param {JsonSchema} jsonSchema the JSON schema to generated a UI schema for
|
|
9
|
-
* @param {string} layoutType the desired layout type for the root layout
|
|
10
|
-
* of the generated UI schema
|
|
11
|
-
*/
|
|
12
|
-
export declare const generateDefaultUISchema: (jsonSchema: JsonSchema, layoutType?: string, prefix?: string, rootSchema?: JsonSchema) => UISchemaElement;
|
|
1
|
+
import { ControlElement, JsonSchema, UISchemaElement } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a IControlObject with the given label referencing the given ref
|
|
4
|
+
*/
|
|
5
|
+
export declare const createControlElement: (ref: string) => ControlElement;
|
|
6
|
+
/**
|
|
7
|
+
* Generate a default UI schema.
|
|
8
|
+
* @param {JsonSchema} jsonSchema the JSON schema to generated a UI schema for
|
|
9
|
+
* @param {string} layoutType the desired layout type for the root layout
|
|
10
|
+
* of the generated UI schema
|
|
11
|
+
*/
|
|
12
|
+
export declare const generateDefaultUISchema: (jsonSchema: JsonSchema, layoutType?: string, prefix?: string, rootSchema?: JsonSchema) => UISchemaElement;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export interface ArrayDefaultTranslation {
|
|
2
|
-
key: ArrayTranslationEnum;
|
|
3
|
-
default: (variable?: string) => string;
|
|
4
|
-
}
|
|
5
|
-
export declare enum ArrayTranslationEnum {
|
|
6
|
-
addTooltip = "addTooltip",
|
|
7
|
-
addAriaLabel = "addAriaLabel",
|
|
8
|
-
removeTooltip = "removeTooltip",
|
|
9
|
-
upAriaLabel = "upAriaLabel",
|
|
10
|
-
downAriaLabel = "downAriaLabel",
|
|
11
|
-
noSelection = "noSelection",
|
|
12
|
-
removeAriaLabel = "removeAriaLabel",
|
|
13
|
-
noDataMessage = "noDataMessage",
|
|
14
|
-
deleteDialogTitle = "deleteDialogTitle",
|
|
15
|
-
deleteDialogMessage = "deleteDialogMessage",
|
|
16
|
-
deleteDialogAccept = "deleteDialogAccept",
|
|
17
|
-
deleteDialogDecline = "deleteDialogDecline",
|
|
18
|
-
up = "up",
|
|
19
|
-
down = "down"
|
|
20
|
-
}
|
|
21
|
-
export type ArrayTranslations = {
|
|
22
|
-
[key in ArrayTranslationEnum]?: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const arrayDefaultTranslations: ArrayDefaultTranslation[];
|
|
1
|
+
export interface ArrayDefaultTranslation {
|
|
2
|
+
key: ArrayTranslationEnum;
|
|
3
|
+
default: (variable?: string) => string;
|
|
4
|
+
}
|
|
5
|
+
export declare enum ArrayTranslationEnum {
|
|
6
|
+
addTooltip = "addTooltip",
|
|
7
|
+
addAriaLabel = "addAriaLabel",
|
|
8
|
+
removeTooltip = "removeTooltip",
|
|
9
|
+
upAriaLabel = "upAriaLabel",
|
|
10
|
+
downAriaLabel = "downAriaLabel",
|
|
11
|
+
noSelection = "noSelection",
|
|
12
|
+
removeAriaLabel = "removeAriaLabel",
|
|
13
|
+
noDataMessage = "noDataMessage",
|
|
14
|
+
deleteDialogTitle = "deleteDialogTitle",
|
|
15
|
+
deleteDialogMessage = "deleteDialogMessage",
|
|
16
|
+
deleteDialogAccept = "deleteDialogAccept",
|
|
17
|
+
deleteDialogDecline = "deleteDialogDecline",
|
|
18
|
+
up = "up",
|
|
19
|
+
down = "down"
|
|
20
|
+
}
|
|
21
|
+
export type ArrayTranslations = {
|
|
22
|
+
[key in ArrayTranslationEnum]?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const arrayDefaultTranslations: ArrayDefaultTranslation[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface CombinatorDefaultTranslation {
|
|
2
|
-
key: CombinatorTranslationEnum;
|
|
3
|
-
default: (variable?: string) => string;
|
|
4
|
-
}
|
|
5
|
-
export declare enum CombinatorTranslationEnum {
|
|
6
|
-
clearDialogTitle = "clearDialogTitle",
|
|
7
|
-
clearDialogMessage = "clearDialogMessage",
|
|
8
|
-
clearDialogAccept = "clearDialogAccept",
|
|
9
|
-
clearDialogDecline = "clearDialogDecline"
|
|
10
|
-
}
|
|
11
|
-
export type CombinatorTranslations = {
|
|
12
|
-
[key in CombinatorTranslationEnum]?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const combinatorDefaultTranslations: CombinatorDefaultTranslation[];
|
|
1
|
+
export interface CombinatorDefaultTranslation {
|
|
2
|
+
key: CombinatorTranslationEnum;
|
|
3
|
+
default: (variable?: string) => string;
|
|
4
|
+
}
|
|
5
|
+
export declare enum CombinatorTranslationEnum {
|
|
6
|
+
clearDialogTitle = "clearDialogTitle",
|
|
7
|
+
clearDialogMessage = "clearDialogMessage",
|
|
8
|
+
clearDialogAccept = "clearDialogAccept",
|
|
9
|
+
clearDialogDecline = "clearDialogDecline"
|
|
10
|
+
}
|
|
11
|
+
export type CombinatorTranslations = {
|
|
12
|
+
[key in CombinatorTranslationEnum]?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const combinatorDefaultTranslations: CombinatorDefaultTranslation[];
|
package/lib/i18n/i18nTypes.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ErrorObject } from 'ajv';
|
|
2
|
-
import type { JsonSchema, UISchemaElement } from '../models';
|
|
3
|
-
export type Translator = {
|
|
4
|
-
(id: string, defaultMessage: string, values?: any): string;
|
|
5
|
-
(id: string, defaultMessage: undefined, values?: any): string | undefined;
|
|
6
|
-
(id: string, defaultMessage?: string, values?: any): string | undefined;
|
|
7
|
-
};
|
|
8
|
-
export type ErrorTranslator = (error: ErrorObject, translate: Translator, uischema?: UISchemaElement) => string;
|
|
9
|
-
export interface JsonFormsI18nState {
|
|
10
|
-
locale?: string;
|
|
11
|
-
translate?: Translator;
|
|
12
|
-
translateError?: ErrorTranslator;
|
|
13
|
-
}
|
|
14
|
-
export type i18nJsonSchema = JsonSchema & {
|
|
15
|
-
i18n?: string;
|
|
16
|
-
};
|
|
1
|
+
import type { ErrorObject } from 'ajv';
|
|
2
|
+
import type { JsonSchema, UISchemaElement } from '../models';
|
|
3
|
+
export type Translator = {
|
|
4
|
+
(id: string, defaultMessage: string, values?: any): string;
|
|
5
|
+
(id: string, defaultMessage: undefined, values?: any): string | undefined;
|
|
6
|
+
(id: string, defaultMessage?: string, values?: any): string | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type ErrorTranslator = (error: ErrorObject, translate: Translator, uischema?: UISchemaElement) => string;
|
|
9
|
+
export interface JsonFormsI18nState {
|
|
10
|
+
locale?: string;
|
|
11
|
+
translate?: Translator;
|
|
12
|
+
translateError?: ErrorTranslator;
|
|
13
|
+
}
|
|
14
|
+
export type i18nJsonSchema = JsonSchema & {
|
|
15
|
+
i18n?: string;
|
|
16
|
+
};
|