@ghentcdh/json-forms-vue 1.1.0 → 2.0.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/composables/useFormEvents.d.ts +34 -0
- package/composables/useHttpClient.d.ts +12 -0
- package/forms/Dispatch.vue.d.ts +10 -0
- package/forms/FormComponent.properties.d.ts +64 -0
- package/forms/FormComponent.vue.d.ts +95 -0
- package/forms/errorMessages.d.ts +10 -0
- package/forms/errorMode.d.ts +5 -0
- package/forms/modal/FormModal.properties.d.ts +75 -0
- package/forms/modal/FormModal.vue.d.ts +353 -0
- package/forms/modal/FormModalService.d.ts +42 -0
- package/forms/renderers/array/ArrayRenderer.vue.d.ts +7 -0
- package/forms/renderers/array/ArrayRenderers.d.ts +10 -0
- package/forms/renderers/controls/AutocompleteControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/BooleanControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/MarkdownControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/MultiSelectControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/NumberControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/SelectControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/StringControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/TextAreaControlRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/composables/useControlBinding.d.ts +36 -0
- package/forms/renderers/controls/composables/useFetchOption.d.ts +17 -0
- package/forms/renderers/controls/composables/useInput.d.ts +24 -0
- package/forms/renderers/controls/composables/useReadonlyBinding.d.ts +135 -0
- package/forms/renderers/controls/composables/useSelectBinding.d.ts +29 -0
- package/forms/renderers/controls/index.d.ts +10 -0
- package/forms/renderers/controls/readonly/ControlReadonlyRenderer.vue.d.ts +7 -0
- package/forms/renderers/controls/readonly/ReadonlyLabel.vue.d.ts +254 -0
- package/forms/renderers/controls/readonly/__tests__/formatDate.spec.d.ts +1 -0
- package/forms/renderers/controls/readonly/constants.d.ts +2 -0
- package/forms/renderers/controls/readonly/displayValue/BooleanValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/DateValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/LinkValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/MarkdownValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/NotSetValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/NumberValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/ObjectValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/StringValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/ViewDetailValue.vue.d.ts +46 -0
- package/forms/renderers/controls/readonly/displayValue/displayValue.properties.d.ts +23 -0
- package/forms/renderers/controls/readonly/displayValue/formatDate.d.ts +25 -0
- package/forms/renderers/controls/readonly/displayValue/index.d.ts +1 -0
- package/forms/renderers/controls/readonly/index.d.ts +10 -0
- package/forms/renderers/controls/readonly/useDisplayValue.d.ts +1 -0
- package/forms/renderers/controls/resource.d.ts +262 -0
- package/forms/renderers/index.d.ts +43 -0
- package/forms/renderers/layout/CollapseLayoutRenderer.vue.d.ts +7 -0
- package/forms/renderers/layout/LayoutRenderer.vue.d.ts +7 -0
- package/forms/renderers/layout/LayoutRenderers.d.ts +20 -0
- package/forms/renderers/layout/ReadOnlyLayoutRenderer.vue.d.ts +7 -0
- package/forms/renderers/layout/colspan.d.ts +1 -0
- package/forms/renderers/registry.d.ts +7 -0
- package/forms/scope.d.ts +4 -0
- package/forms/types.d.ts +36 -0
- package/http-client.d.ts +14 -0
- package/index.d.ts +15 -8
- package/index.js +1702 -1077
- package/package.json +10 -18
- package/repository/CrudRepository.d.ts +34 -0
- package/repository/index.d.ts +1 -0
- package/table/TableComponent.properties.d.ts +49 -0
- package/table/TableComponent.vue.d.ts +92 -0
- package/table/TableToolbar.vue.d.ts +36 -0
- package/table/cells/index.d.ts +10 -0
- package/table/filter/FilterRowInput.vue.d.ts +17 -0
- package/table/filter/TableFilter.vue.d.ts +16 -0
- package/table/index.d.ts +6 -0
- package/testers/__tests__/jsonforms-testers.spec.d.ts +1 -0
- package/testers/__tests__/tester.spec.d.ts +1 -0
- package/testers/jsonforms-testers.d.ts +27 -0
- package/testers/tester.d.ts +16 -0
- package/view/modal/ViewModal.properties.d.ts +82 -0
- package/view/modal/ViewModal.vue.d.ts +357 -0
- package/form.store.d.ts +0 -8
- package/index.mjs +0 -1892
- package/testing.mjs +0 -1
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
/** Supported HTTP methods for resource operations. */
|
|
4
|
+
export declare const MethodSchema: z.ZodEnum<{
|
|
5
|
+
delete: "delete";
|
|
6
|
+
get: "get";
|
|
7
|
+
post: "post";
|
|
8
|
+
put: "put";
|
|
9
|
+
patch: "patch";
|
|
10
|
+
GET: "GET";
|
|
11
|
+
POST: "POST";
|
|
12
|
+
DELETE: "DELETE";
|
|
13
|
+
PUT: "PUT";
|
|
14
|
+
PATCH: "PATCH";
|
|
15
|
+
}>;
|
|
16
|
+
export type Method = z.infer<typeof MethodSchema>;
|
|
17
|
+
export declare const OperationSchema: z.ZodObject<{
|
|
18
|
+
uri: z.ZodString;
|
|
19
|
+
method: z.ZodEnum<{
|
|
20
|
+
delete: "delete";
|
|
21
|
+
get: "get";
|
|
22
|
+
post: "post";
|
|
23
|
+
put: "put";
|
|
24
|
+
patch: "patch";
|
|
25
|
+
GET: "GET";
|
|
26
|
+
POST: "POST";
|
|
27
|
+
DELETE: "DELETE";
|
|
28
|
+
PUT: "PUT";
|
|
29
|
+
PATCH: "PATCH";
|
|
30
|
+
}>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type Operation = z.infer<typeof OperationSchema>;
|
|
33
|
+
export declare const OperationsSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
34
|
+
uri: z.ZodString;
|
|
35
|
+
method: z.ZodEnum<{
|
|
36
|
+
delete: "delete";
|
|
37
|
+
get: "get";
|
|
38
|
+
post: "post";
|
|
39
|
+
put: "put";
|
|
40
|
+
patch: "patch";
|
|
41
|
+
GET: "GET";
|
|
42
|
+
POST: "POST";
|
|
43
|
+
DELETE: "DELETE";
|
|
44
|
+
PUT: "PUT";
|
|
45
|
+
PATCH: "PATCH";
|
|
46
|
+
}>;
|
|
47
|
+
}, z.core.$strip>]>;
|
|
48
|
+
export declare const BooleanOperationSchema: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
49
|
+
uri: z.ZodString;
|
|
50
|
+
method: z.ZodEnum<{
|
|
51
|
+
delete: "delete";
|
|
52
|
+
get: "get";
|
|
53
|
+
post: "post";
|
|
54
|
+
put: "put";
|
|
55
|
+
patch: "patch";
|
|
56
|
+
GET: "GET";
|
|
57
|
+
POST: "POST";
|
|
58
|
+
DELETE: "DELETE";
|
|
59
|
+
PUT: "PUT";
|
|
60
|
+
PATCH: "PATCH";
|
|
61
|
+
}>;
|
|
62
|
+
}, z.core.$strip>]>>>;
|
|
63
|
+
/**
|
|
64
|
+
* Zod schema that validates and transforms a resource definition from the API.
|
|
65
|
+
*
|
|
66
|
+
* Accepts a resource descriptor with an `id`, base `uri`, CRUD `operations`,
|
|
67
|
+
* and optional `schema` (JSON Schema + UI schema). During parsing:
|
|
68
|
+
*
|
|
69
|
+
* - If `schema.data` is present but `schema.ui` is missing, a UI schema is
|
|
70
|
+
* auto-generated via {@link uiFromJsonSchema} using a GridLayout.
|
|
71
|
+
* - Each operation is normalized to `{ uri, method }` or `null` based on
|
|
72
|
+
* its value (`true` inherits the base uri, a string overrides the uri,
|
|
73
|
+
* an object is used as-is, `false`/`undefined` maps to `null`).
|
|
74
|
+
*/
|
|
75
|
+
export declare const ResourceSchema: z.ZodPipe<z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
uri: z.ZodString;
|
|
78
|
+
operations: z.ZodObject<{
|
|
79
|
+
findAll: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
80
|
+
uri: z.ZodString;
|
|
81
|
+
method: z.ZodEnum<{
|
|
82
|
+
delete: "delete";
|
|
83
|
+
get: "get";
|
|
84
|
+
post: "post";
|
|
85
|
+
put: "put";
|
|
86
|
+
patch: "patch";
|
|
87
|
+
GET: "GET";
|
|
88
|
+
POST: "POST";
|
|
89
|
+
DELETE: "DELETE";
|
|
90
|
+
PUT: "PUT";
|
|
91
|
+
PATCH: "PATCH";
|
|
92
|
+
}>;
|
|
93
|
+
}, z.core.$strip>]>>>;
|
|
94
|
+
findOne: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
95
|
+
uri: z.ZodString;
|
|
96
|
+
method: z.ZodEnum<{
|
|
97
|
+
delete: "delete";
|
|
98
|
+
get: "get";
|
|
99
|
+
post: "post";
|
|
100
|
+
put: "put";
|
|
101
|
+
patch: "patch";
|
|
102
|
+
GET: "GET";
|
|
103
|
+
POST: "POST";
|
|
104
|
+
DELETE: "DELETE";
|
|
105
|
+
PUT: "PUT";
|
|
106
|
+
PATCH: "PATCH";
|
|
107
|
+
}>;
|
|
108
|
+
}, z.core.$strip>]>>>;
|
|
109
|
+
create: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
110
|
+
uri: z.ZodString;
|
|
111
|
+
method: z.ZodEnum<{
|
|
112
|
+
delete: "delete";
|
|
113
|
+
get: "get";
|
|
114
|
+
post: "post";
|
|
115
|
+
put: "put";
|
|
116
|
+
patch: "patch";
|
|
117
|
+
GET: "GET";
|
|
118
|
+
POST: "POST";
|
|
119
|
+
DELETE: "DELETE";
|
|
120
|
+
PUT: "PUT";
|
|
121
|
+
PATCH: "PATCH";
|
|
122
|
+
}>;
|
|
123
|
+
}, z.core.$strip>]>>>;
|
|
124
|
+
update: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
125
|
+
uri: z.ZodString;
|
|
126
|
+
method: z.ZodEnum<{
|
|
127
|
+
delete: "delete";
|
|
128
|
+
get: "get";
|
|
129
|
+
post: "post";
|
|
130
|
+
put: "put";
|
|
131
|
+
patch: "patch";
|
|
132
|
+
GET: "GET";
|
|
133
|
+
POST: "POST";
|
|
134
|
+
DELETE: "DELETE";
|
|
135
|
+
PUT: "PUT";
|
|
136
|
+
PATCH: "PATCH";
|
|
137
|
+
}>;
|
|
138
|
+
}, z.core.$strip>]>>>;
|
|
139
|
+
delete: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
140
|
+
uri: z.ZodString;
|
|
141
|
+
method: z.ZodEnum<{
|
|
142
|
+
delete: "delete";
|
|
143
|
+
get: "get";
|
|
144
|
+
post: "post";
|
|
145
|
+
put: "put";
|
|
146
|
+
patch: "patch";
|
|
147
|
+
GET: "GET";
|
|
148
|
+
POST: "POST";
|
|
149
|
+
DELETE: "DELETE";
|
|
150
|
+
PUT: "PUT";
|
|
151
|
+
PATCH: "PATCH";
|
|
152
|
+
}>;
|
|
153
|
+
}, z.core.$strip>]>>>;
|
|
154
|
+
lookup: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
155
|
+
uri: z.ZodString;
|
|
156
|
+
method: z.ZodEnum<{
|
|
157
|
+
delete: "delete";
|
|
158
|
+
get: "get";
|
|
159
|
+
post: "post";
|
|
160
|
+
put: "put";
|
|
161
|
+
patch: "patch";
|
|
162
|
+
GET: "GET";
|
|
163
|
+
POST: "POST";
|
|
164
|
+
DELETE: "DELETE";
|
|
165
|
+
PUT: "PUT";
|
|
166
|
+
PATCH: "PATCH";
|
|
167
|
+
}>;
|
|
168
|
+
}, z.core.$strip>]>>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
schema: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
ui: z.ZodOptional<z.ZodAny>;
|
|
172
|
+
data: z.ZodAny;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
schemas: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
form: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
ui: z.ZodOptional<z.ZodAny>;
|
|
177
|
+
data: z.ZodAny;
|
|
178
|
+
}, z.core.$strip>>;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
181
|
+
schema: {
|
|
182
|
+
data: any;
|
|
183
|
+
ui?: any;
|
|
184
|
+
};
|
|
185
|
+
operations: Record<"delete" | "create" | "update" | "findAll" | "findOne" | "lookup", {
|
|
186
|
+
uri: string;
|
|
187
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
188
|
+
} | null>;
|
|
189
|
+
id: string;
|
|
190
|
+
uri: string;
|
|
191
|
+
schemas?: {
|
|
192
|
+
form?: {
|
|
193
|
+
data: any;
|
|
194
|
+
ui?: any;
|
|
195
|
+
} | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
}, {
|
|
198
|
+
id: string;
|
|
199
|
+
uri: string;
|
|
200
|
+
operations: {
|
|
201
|
+
findAll: boolean | {
|
|
202
|
+
uri: string;
|
|
203
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
204
|
+
};
|
|
205
|
+
findOne: boolean | {
|
|
206
|
+
uri: string;
|
|
207
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
208
|
+
};
|
|
209
|
+
create: boolean | {
|
|
210
|
+
uri: string;
|
|
211
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
212
|
+
};
|
|
213
|
+
update: boolean | {
|
|
214
|
+
uri: string;
|
|
215
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
216
|
+
};
|
|
217
|
+
delete: boolean | {
|
|
218
|
+
uri: string;
|
|
219
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
220
|
+
};
|
|
221
|
+
lookup?: string | {
|
|
222
|
+
uri: string;
|
|
223
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
224
|
+
} | undefined;
|
|
225
|
+
};
|
|
226
|
+
schema?: {
|
|
227
|
+
data: any;
|
|
228
|
+
ui?: any;
|
|
229
|
+
} | undefined;
|
|
230
|
+
schemas?: {
|
|
231
|
+
form?: {
|
|
232
|
+
data: any;
|
|
233
|
+
ui?: any;
|
|
234
|
+
} | undefined;
|
|
235
|
+
} | undefined;
|
|
236
|
+
}>>;
|
|
237
|
+
/**
|
|
238
|
+
* Fetches and validates a resource definition from the given URI.
|
|
239
|
+
*
|
|
240
|
+
* @param resourceUri - Endpoint that returns the resource descriptor JSON.
|
|
241
|
+
* @param skipAuth - When `true`, uses plain axios instead of the authenticated API client.
|
|
242
|
+
* @returns Parsed and normalized resource with resolved operations and schemas.
|
|
243
|
+
* @throws If the response does not match {@link ResourceSchema}.
|
|
244
|
+
*/
|
|
245
|
+
export declare const getResourceSchema: (resourceUri: string, http: HttpClient) => Promise<{
|
|
246
|
+
schema: {
|
|
247
|
+
data: any;
|
|
248
|
+
ui?: any;
|
|
249
|
+
};
|
|
250
|
+
operations: Record<"delete" | "create" | "update" | "findAll" | "findOne" | "lookup", {
|
|
251
|
+
uri: string;
|
|
252
|
+
method: "delete" | "get" | "post" | "put" | "patch" | "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
|
|
253
|
+
} | null>;
|
|
254
|
+
id: string;
|
|
255
|
+
uri: string;
|
|
256
|
+
schemas?: {
|
|
257
|
+
form?: {
|
|
258
|
+
data: any;
|
|
259
|
+
ui?: any;
|
|
260
|
+
} | undefined;
|
|
261
|
+
} | undefined;
|
|
262
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export * from './array/ArrayRenderers';
|
|
2
|
+
export * from './controls';
|
|
3
|
+
export * from './controls/composables/useControlBinding';
|
|
4
|
+
export * from './controls/readonly';
|
|
5
|
+
export * from './layout/LayoutRenderers';
|
|
6
|
+
export declare const customRenderers: ({
|
|
7
|
+
tester: import('../../testers/jsonforms-testers').RankedTester;
|
|
8
|
+
renderer: import('vue').DefineComponent<{
|
|
9
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
10
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
11
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
12
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
13
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
14
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
} | {
|
|
16
|
+
tester: import('../../testers/jsonforms-testers').RankedTester;
|
|
17
|
+
renderer: import('vue').DefineComponent<{
|
|
18
|
+
uischema: import('@jsonforms/core').ControlElement;
|
|
19
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
20
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
21
|
+
uischema: import('@jsonforms/core').ControlElement;
|
|
22
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
23
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
})[];
|
|
25
|
+
export declare const readonlyRenderers: ({
|
|
26
|
+
tester: import('../../testers/jsonforms-testers').RankedTester;
|
|
27
|
+
renderer: import('vue').DefineComponent<{
|
|
28
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
29
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
30
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
31
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
32
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
33
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
34
|
+
} | {
|
|
35
|
+
tester: import('../../testers/jsonforms-testers').RankedTester;
|
|
36
|
+
renderer: import('vue').DefineComponent<{
|
|
37
|
+
uischema: import('@jsonforms/core').ControlElement;
|
|
38
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
39
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
40
|
+
uischema: import('@jsonforms/core').ControlElement;
|
|
41
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
42
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
})[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
uischema: UISchemaElement;
|
|
4
|
+
schema: JsonSchema;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
uischema: UISchemaElement;
|
|
4
|
+
schema: JsonSchema;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const layoutRenderers: {
|
|
2
|
+
tester: import('../../../testers/jsonforms-testers').RankedTester;
|
|
3
|
+
renderer: import('vue').DefineComponent<{
|
|
4
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
5
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
6
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
7
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
8
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
9
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
}[];
|
|
11
|
+
export declare const readonlyLayoutRenderers: {
|
|
12
|
+
tester: import('../../../testers/jsonforms-testers').RankedTester;
|
|
13
|
+
renderer: import('vue').DefineComponent<{
|
|
14
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
15
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
16
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
17
|
+
uischema: import('@jsonforms/core').UISchemaElement;
|
|
18
|
+
schema: import('@jsonforms/core').JsonSchema;
|
|
19
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
|
+
}[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
uischema: UISchemaElement;
|
|
4
|
+
schema: JsonSchema;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COLSPAN: Record<number, string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
export interface RendererEntry {
|
|
4
|
+
tester: (uischema: UISchemaElement, schema: JsonSchema, context?: unknown) => number;
|
|
5
|
+
renderer: Component;
|
|
6
|
+
}
|
|
7
|
+
export declare function findRenderer(registry: RendererEntry[], uischema: UISchemaElement, schema: JsonSchema): Component | null;
|
package/forms/scope.d.ts
ADDED
package/forms/types.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type { JsonSchema } from '@jsonforms/core';
|
|
2
|
+
export interface UiElementOptions {
|
|
3
|
+
format?: string;
|
|
4
|
+
colspan?: number;
|
|
5
|
+
styles?: {
|
|
6
|
+
width?: string;
|
|
7
|
+
control?: {
|
|
8
|
+
wrapper?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
uri?: string;
|
|
12
|
+
valueKey?: string;
|
|
13
|
+
labelKey?: string;
|
|
14
|
+
enableCreate?: boolean;
|
|
15
|
+
options?: Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
hideLabel?: boolean;
|
|
22
|
+
readonly?: boolean;
|
|
23
|
+
visible?: boolean;
|
|
24
|
+
layout?: 'row' | 'column';
|
|
25
|
+
hideActions?: boolean;
|
|
26
|
+
dataField?: string;
|
|
27
|
+
skipAuth?: boolean;
|
|
28
|
+
type?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UiElement {
|
|
31
|
+
type: 'Control' | 'GridLayout' | 'VerticalLayout' | 'HorizontalLayout' | 'CollapseLayout';
|
|
32
|
+
scope?: string;
|
|
33
|
+
elements?: UiElement[];
|
|
34
|
+
options?: UiElementOptions;
|
|
35
|
+
label?: string;
|
|
36
|
+
}
|
package/http-client.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface HttpClient {
|
|
2
|
+
get<T = any>(url: string, config?: any): Promise<{
|
|
3
|
+
data: T;
|
|
4
|
+
}>;
|
|
5
|
+
post<T = any>(url: string, data?: any, config?: any): Promise<{
|
|
6
|
+
data: T;
|
|
7
|
+
}>;
|
|
8
|
+
patch<T = any>(url: string, data?: any, config?: any): Promise<{
|
|
9
|
+
data: T;
|
|
10
|
+
}>;
|
|
11
|
+
delete<T = any>(url: string, config?: any): Promise<{
|
|
12
|
+
data: T;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './table';
|
|
3
|
-
export * from './repository';
|
|
4
|
-
export * from './composables/useFormEvents';
|
|
1
|
+
export { default as ReadonlyLabel } from './forms/renderers/controls/readonly/ReadonlyLabel.vue';
|
|
5
2
|
export type { ErrorMode } from './forms/errorMode';
|
|
6
|
-
export {
|
|
3
|
+
export type { HttpClient } from './http-client';
|
|
4
|
+
export type { FormModalProp, FormModalResult, } from './forms/modal/FormModal.properties';
|
|
5
|
+
export { useControlBinding, useCustomControlBinding, } from './forms/renderers/controls/composables/useControlBinding';
|
|
6
|
+
export * from './forms/renderers/controls/composables/useReadonlyBinding';
|
|
7
|
+
export { useDisplayValue } from './forms/renderers/controls/readonly/useDisplayValue';
|
|
8
|
+
export * from './composables/useFormEvents';
|
|
9
|
+
export { provideHttpClient, useHttpClient } from './composables/useHttpClient';
|
|
7
10
|
export { default as JsonForm } from './forms/FormComponent.vue';
|
|
8
|
-
export { default as JsonFormWithActions } from './forms/FormWithActions.vue';
|
|
9
|
-
export { default as JsonFormWithTable } from './forms/FormWithTable.vue';
|
|
10
11
|
export { default as JsonFormModal } from './forms/modal/FormModal.vue';
|
|
12
|
+
export { FormModalEmits, FormModalProperties, } from './forms/modal/FormModal.properties';
|
|
11
13
|
export { JsonFormModalService } from './forms/modal/FormModalService';
|
|
12
|
-
export {
|
|
14
|
+
export { customRenderers, readonlyRenderers } from './forms/renderers';
|
|
15
|
+
export { optionIsIgnoreCase } from './testers/tester';
|
|
16
|
+
export { formatError, registerZodErrorMap } from './forms/errorMessages';
|
|
17
|
+
export * from './repository';
|
|
18
|
+
export * from './table';
|
|
19
|
+
export * from './forms/renderers/controls/readonly/displayValue';
|