@ghentcdh/json-forms-vue 1.1.1 → 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.
Files changed (65) hide show
  1. package/composables/useFormEvents.d.ts +4 -2
  2. package/composables/useHttpClient.d.ts +12 -0
  3. package/forms/FormComponent.properties.d.ts +16 -0
  4. package/forms/FormComponent.vue.d.ts +28 -1
  5. package/forms/errorMode.d.ts +1 -0
  6. package/forms/modal/FormModal.properties.d.ts +11 -0
  7. package/forms/modal/FormModal.vue.d.ts +83 -5
  8. package/forms/modal/FormModalService.d.ts +29 -1
  9. package/forms/renderers/array/ArrayRenderers.d.ts +1 -1
  10. package/forms/renderers/controls/{composable/UseControlBinding.d.ts → composables/useControlBinding.d.ts} +8 -1
  11. package/forms/renderers/controls/{composable/UseFetchOption.d.ts → composables/useFetchOption.d.ts} +4 -3
  12. package/forms/renderers/controls/composables/useReadonlyBinding.d.ts +135 -0
  13. package/forms/renderers/controls/{composable/UseSelectBinding.d.ts → composables/useSelectBinding.d.ts} +6 -0
  14. package/forms/renderers/controls/index.d.ts +2 -2
  15. package/forms/renderers/controls/readonly/ControlReadonlyRenderer.vue.d.ts +7 -0
  16. package/forms/renderers/controls/readonly/ReadonlyLabel.vue.d.ts +254 -0
  17. package/forms/renderers/controls/readonly/__tests__/formatDate.spec.d.ts +1 -0
  18. package/forms/renderers/controls/readonly/constants.d.ts +2 -0
  19. package/forms/renderers/controls/readonly/displayValue/BooleanValue.vue.d.ts +46 -0
  20. package/forms/renderers/controls/readonly/displayValue/DateValue.vue.d.ts +46 -0
  21. package/forms/renderers/controls/readonly/displayValue/LinkValue.vue.d.ts +46 -0
  22. package/forms/renderers/controls/readonly/displayValue/MarkdownValue.vue.d.ts +46 -0
  23. package/forms/renderers/controls/readonly/displayValue/NotSetValue.vue.d.ts +46 -0
  24. package/forms/renderers/controls/readonly/displayValue/NumberValue.vue.d.ts +46 -0
  25. package/forms/renderers/controls/readonly/displayValue/ObjectValue.vue.d.ts +46 -0
  26. package/forms/renderers/controls/readonly/displayValue/StringValue.vue.d.ts +46 -0
  27. package/forms/renderers/controls/readonly/displayValue/ViewDetailValue.vue.d.ts +46 -0
  28. package/forms/renderers/controls/readonly/displayValue/displayValue.properties.d.ts +23 -0
  29. package/forms/renderers/controls/readonly/displayValue/formatDate.d.ts +25 -0
  30. package/forms/renderers/controls/readonly/displayValue/index.d.ts +1 -0
  31. package/forms/renderers/{layout/LayoutRenders.d.ts → controls/readonly/index.d.ts} +4 -4
  32. package/forms/renderers/controls/readonly/useDisplayValue.d.ts +1 -0
  33. package/forms/renderers/controls/{composable/resource.d.ts → resource.d.ts} +88 -13
  34. package/forms/renderers/index.d.ts +42 -2
  35. package/forms/{renderes.d.ts → renderers/layout/LayoutRenderers.d.ts} +9 -8
  36. package/forms/renderers/layout/ReadOnlyLayoutRenderer.vue.d.ts +7 -0
  37. package/http-client.d.ts +14 -0
  38. package/index.d.ts +15 -8
  39. package/index.js +1702 -1077
  40. package/package.json +14 -22
  41. package/repository/{crud.repository.d.ts → CrudRepository.d.ts} +9 -7
  42. package/repository/index.d.ts +1 -1
  43. package/table/TableComponent.properties.d.ts +49 -0
  44. package/table/TableComponent.vue.d.ts +92 -0
  45. package/table/TableToolbar.vue.d.ts +36 -0
  46. package/table/cells/index.d.ts +10 -0
  47. package/table/filter/{table-filter.vue.d.ts → FilterRowInput.vue.d.ts} +11 -7
  48. package/table/filter/TableFilter.vue.d.ts +16 -0
  49. package/table/index.d.ts +6 -2
  50. package/testers/__tests__/jsonforms-testers.spec.d.ts +1 -0
  51. package/testers/__tests__/tester.spec.d.ts +1 -0
  52. package/testers/jsonforms-testers.d.ts +27 -0
  53. package/testers/tester.d.ts +16 -0
  54. package/view/modal/ViewModal.properties.d.ts +82 -0
  55. package/{forms/FormWithActions.vue.d.ts → view/modal/ViewModal.vue.d.ts} +150 -51
  56. package/form.store.d.ts +0 -8
  57. package/forms/FormWithActions.properties.d.ts +0 -52
  58. package/forms/FormWithTable.properties.d.ts +0 -65
  59. package/forms/FormWithTable.vue.d.ts +0 -90
  60. package/renderes/tester.d.ts +0 -11
  61. package/table/table.component.properties.d.ts +0 -34
  62. package/table/table.component.vue.d.ts +0 -60
  63. package/table/table.store.d.ts +0 -29
  64. /package/forms/renderers/controls/{composable/UseInput.d.ts → composables/useInput.d.ts} +0 -0
  65. /package/forms/{renderer-registry.d.ts → renderers/registry.d.ts} +0 -0
@@ -2,7 +2,7 @@
2
2
  * Event names that renderers can dispatch up to the form host. Expand this
3
3
  * union as new events are needed.
4
4
  */
5
- export type FormEventName = 'create';
5
+ export type FormEventName = 'create' | 'view';
6
6
  /**
7
7
  * Payload passed along with every form event. `type` is user-defined (e.g.
8
8
  * `'author'`, `'keyword'`) so the host can decide what entity to act on.
@@ -11,7 +11,9 @@ export type FormEventPayload<TData = any, TResult = any> = {
11
11
  event: FormEventName;
12
12
  type: string;
13
13
  data?: TData;
14
- onSuccess: (result: TResult) => void;
14
+ id?: string | number;
15
+ options?: Record<string, any>;
16
+ onSuccess?: (result: TResult) => void;
15
17
  onError?: (error: unknown) => void;
16
18
  };
17
19
  export type FormEventDispatch = <TData = any, TResult = any>(payload: FormEventPayload<TData, TResult>) => void;
@@ -0,0 +1,12 @@
1
+ import { HttpClient } from '../http-client';
2
+ /**
3
+ * Provide an HttpClient instance to all descendant renderers.
4
+ * Call this in the component that hosts `<JsonForm>`.
5
+ */
6
+ export declare const provideHttpClient: (http: HttpClient) => void;
7
+ /**
8
+ * Inject the HttpClient inside a renderer.
9
+ * Throws if no provider is found — consumers must provide one via `provideHttpClient`
10
+ * or the `http` prop on `<JsonForm>` when using HTTP-dependent renderers.
11
+ */
12
+ export declare const useHttpClient: () => HttpClient;
@@ -1,4 +1,5 @@
1
1
  import { ExtractPublicPropTypes, PropType } from 'vue';
2
+ import { HttpClient } from '../http-client';
2
3
  import { ErrorMode } from './errorMode';
3
4
  export type Data = {
4
5
  [key: string]: any;
@@ -33,6 +34,11 @@ export declare const JsonFormComponentProperties: {
33
34
  type: BooleanConstructor;
34
35
  default: boolean;
35
36
  };
37
+ /** Make all form controls readonly. */
38
+ readonly: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
36
42
  /** Current form data object. */
37
43
  formData: {
38
44
  type: PropType<Data>;
@@ -43,6 +49,16 @@ export declare const JsonFormComponentProperties: {
43
49
  type: PropType<ErrorMode>;
44
50
  default: "onChanges";
45
51
  };
52
+ /** HTTP client used by renderers that fetch remote data (e.g. autocomplete). */
53
+ http: {
54
+ type: PropType<HttpClient>;
55
+ default: null;
56
+ };
57
+ /** Custom renderer registry. Overrides the default `customRenderers` when provided. */
58
+ renderers: {
59
+ type: PropType<any[]>;
60
+ default: null;
61
+ };
46
62
  };
47
63
  export type JsonFormComponentProp = ExtractPublicPropTypes<typeof JsonFormComponentProperties>;
48
64
  export declare const JsonFormComponentEmits: string[];
@@ -20,6 +20,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
20
20
  type: BooleanConstructor;
21
21
  default: boolean;
22
22
  };
23
+ readonly: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
23
27
  formData: {
24
28
  type: import('vue').PropType<Data>;
25
29
  default: () => {};
@@ -28,6 +32,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
28
32
  type: import('vue').PropType<import('./errorMode').ErrorMode>;
29
33
  default: "onChanges";
30
34
  };
35
+ http: {
36
+ type: import('vue').PropType<import('..').HttpClient>;
37
+ default: null;
38
+ };
39
+ renderers: {
40
+ type: import('vue').PropType<any[]>;
41
+ default: null;
42
+ };
31
43
  }>, {
32
44
  markSubmitted: () => void;
33
45
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -51,6 +63,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
51
63
  type: BooleanConstructor;
52
64
  default: boolean;
53
65
  };
66
+ readonly: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
54
70
  formData: {
55
71
  type: import('vue').PropType<Data>;
56
72
  default: () => {};
@@ -59,10 +75,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
59
75
  type: import('vue').PropType<import('./errorMode').ErrorMode>;
60
76
  default: "onChanges";
61
77
  };
78
+ http: {
79
+ type: import('vue').PropType<import('..').HttpClient>;
80
+ default: null;
81
+ };
82
+ renderers: {
83
+ type: import('vue').PropType<any[]>;
84
+ default: null;
85
+ };
62
86
  }>> & Readonly<{}>, {
63
- errorMode: import('./errorMode').ErrorMode;
64
87
  disabled: boolean;
65
88
  name: string;
89
+ readonly: boolean;
90
+ http: import('..').HttpClient;
91
+ errorMode: import('./errorMode').ErrorMode;
92
+ renderers: any[];
66
93
  formData: Data;
67
94
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLFormElement>;
68
95
  export default _default;
@@ -2,3 +2,4 @@ import { InjectionKey, Ref } from 'vue';
2
2
  export type ErrorMode = 'onBlur' | 'onChange' | 'onSubmit' | 'always';
3
3
  export declare const ERROR_MODE_KEY: InjectionKey<Ref<ErrorMode>>;
4
4
  export declare const FORM_SUBMITTED_KEY: InjectionKey<Ref<boolean>>;
5
+ export declare const FORM_READONLY_KEY: InjectionKey<Ref<boolean>>;
@@ -1,6 +1,7 @@
1
1
  import { ExtractPublicPropTypes, PropType } from 'vue';
2
2
  import { SizeType } from '../../../../core/src/index.ts';
3
3
  import { FormEventPayload } from '../../composables/useFormEvents';
4
+ import { HttpClient } from '../../http-client';
4
5
  import { ErrorMode } from '../errorMode';
5
6
  export declare const FormModalProperties: {
6
7
  /** Title displayed in the modal header. */
@@ -52,6 +53,16 @@ export declare const FormModalProperties: {
52
53
  type: PropType<ErrorMode>;
53
54
  default: "onBlur";
54
55
  };
56
+ /** HTTP client passed through to the inner JsonForm for remote renderers (e.g. autocomplete). */
57
+ http: {
58
+ type: PropType<HttpClient>;
59
+ default: null;
60
+ };
61
+ /** Custom renderer registry passed to the inner JsonForm. */
62
+ renderers: {
63
+ type: PropType<any[]>;
64
+ default: null;
65
+ };
55
66
  };
56
67
  export type FormModalProp = ExtractPublicPropTypes<typeof FormModalProperties>;
57
68
  export declare const FormModalEmits: string[];
@@ -26,6 +26,10 @@ declare function __VLS_template(): {
26
26
  type: BooleanConstructor;
27
27
  default: boolean;
28
28
  };
29
+ readonly: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
29
33
  formData: {
30
34
  type: import('vue').PropType<import('../FormComponent.properties').Data>;
31
35
  default: () => {};
@@ -34,12 +38,23 @@ declare function __VLS_template(): {
34
38
  type: import('vue').PropType<import('../errorMode').ErrorMode>;
35
39
  default: "onChanges";
36
40
  };
41
+ http: {
42
+ type: import('vue').PropType<import('../..').HttpClient>;
43
+ default: null;
44
+ };
45
+ renderers: {
46
+ type: import('vue').PropType<any[]>;
47
+ default: null;
48
+ };
37
49
  }>> & Readonly<{}>, {
38
50
  markSubmitted: () => void;
39
51
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
40
- errorMode: import('../errorMode').ErrorMode;
41
52
  disabled: boolean;
42
53
  name: string;
54
+ readonly: boolean;
55
+ http: import('../..').HttpClient;
56
+ errorMode: import('../errorMode').ErrorMode;
57
+ renderers: any[];
43
58
  formData: import('../FormComponent.properties').Data;
44
59
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLFormElement, import('vue').ComponentProvideOptions, {
45
60
  P: {};
@@ -69,6 +84,10 @@ declare function __VLS_template(): {
69
84
  type: BooleanConstructor;
70
85
  default: boolean;
71
86
  };
87
+ readonly: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
72
91
  formData: {
73
92
  type: import('vue').PropType<import('../FormComponent.properties').Data>;
74
93
  default: () => {};
@@ -77,12 +96,23 @@ declare function __VLS_template(): {
77
96
  type: import('vue').PropType<import('../errorMode').ErrorMode>;
78
97
  default: "onChanges";
79
98
  };
99
+ http: {
100
+ type: import('vue').PropType<import('../..').HttpClient>;
101
+ default: null;
102
+ };
103
+ renderers: {
104
+ type: import('vue').PropType<any[]>;
105
+ default: null;
106
+ };
80
107
  }>> & Readonly<{}>, {
81
108
  markSubmitted: () => void;
82
109
  }, {}, {}, {}, {
83
- errorMode: import('../errorMode').ErrorMode;
84
110
  disabled: boolean;
85
111
  name: string;
112
+ readonly: boolean;
113
+ http: import('../..').HttpClient;
114
+ errorMode: import('../errorMode').ErrorMode;
115
+ renderers: any[];
86
116
  formData: import('../FormComponent.properties').Data;
87
117
  }> | null;
88
118
  };
@@ -129,6 +159,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
129
159
  type: import('vue').PropType<import('../errorMode').ErrorMode>;
130
160
  default: "onBlur";
131
161
  };
162
+ http: {
163
+ type: import('vue').PropType<import('../..').HttpClient>;
164
+ default: null;
165
+ };
166
+ renderers: {
167
+ type: import('vue').PropType<any[]>;
168
+ default: null;
169
+ };
132
170
  modelValue: {
133
171
  type: import('vue').PropType<any>;
134
172
  };
@@ -174,16 +212,26 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
174
212
  type: import('vue').PropType<import('../errorMode').ErrorMode>;
175
213
  default: "onBlur";
176
214
  };
215
+ http: {
216
+ type: import('vue').PropType<import('../..').HttpClient>;
217
+ default: null;
218
+ };
219
+ renderers: {
220
+ type: import('vue').PropType<any[]>;
221
+ default: null;
222
+ };
177
223
  modelValue: {
178
224
  type: import('vue').PropType<any>;
179
225
  };
180
226
  }>> & Readonly<{
181
227
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
182
228
  }>, {
229
+ cancelLabel: string;
230
+ http: import('../..').HttpClient;
183
231
  errorMode: import('../errorMode').ErrorMode;
184
232
  saveLabel: string;
185
- cancelLabel: string;
186
233
  modalSize: "xs" | "sm" | "lg" | "xl";
234
+ renderers: any[];
187
235
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
188
236
  formRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
189
237
  id: {
@@ -206,6 +254,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
206
254
  type: BooleanConstructor;
207
255
  default: boolean;
208
256
  };
257
+ readonly: {
258
+ type: BooleanConstructor;
259
+ default: boolean;
260
+ };
209
261
  formData: {
210
262
  type: import('vue').PropType<import('../FormComponent.properties').Data>;
211
263
  default: () => {};
@@ -214,12 +266,23 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
214
266
  type: import('vue').PropType<import('../errorMode').ErrorMode>;
215
267
  default: "onChanges";
216
268
  };
269
+ http: {
270
+ type: import('vue').PropType<import('../..').HttpClient>;
271
+ default: null;
272
+ };
273
+ renderers: {
274
+ type: import('vue').PropType<any[]>;
275
+ default: null;
276
+ };
217
277
  }>> & Readonly<{}>, {
218
278
  markSubmitted: () => void;
219
279
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
220
- errorMode: import('../errorMode').ErrorMode;
221
280
  disabled: boolean;
222
281
  name: string;
282
+ readonly: boolean;
283
+ http: import('../..').HttpClient;
284
+ errorMode: import('../errorMode').ErrorMode;
285
+ renderers: any[];
223
286
  formData: import('../FormComponent.properties').Data;
224
287
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLFormElement, import('vue').ComponentProvideOptions, {
225
288
  P: {};
@@ -249,6 +312,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
249
312
  type: BooleanConstructor;
250
313
  default: boolean;
251
314
  };
315
+ readonly: {
316
+ type: BooleanConstructor;
317
+ default: boolean;
318
+ };
252
319
  formData: {
253
320
  type: import('vue').PropType<import('../FormComponent.properties').Data>;
254
321
  default: () => {};
@@ -257,12 +324,23 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
257
324
  type: import('vue').PropType<import('../errorMode').ErrorMode>;
258
325
  default: "onChanges";
259
326
  };
327
+ http: {
328
+ type: import('vue').PropType<import('../..').HttpClient>;
329
+ default: null;
330
+ };
331
+ renderers: {
332
+ type: import('vue').PropType<any[]>;
333
+ default: null;
334
+ };
260
335
  }>> & Readonly<{}>, {
261
336
  markSubmitted: () => void;
262
337
  }, {}, {}, {}, {
263
- errorMode: import('../errorMode').ErrorMode;
264
338
  disabled: boolean;
265
339
  name: string;
340
+ readonly: boolean;
341
+ http: import('../..').HttpClient;
342
+ errorMode: import('../errorMode').ErrorMode;
343
+ renderers: any[];
266
344
  formData: import('../FormComponent.properties').Data;
267
345
  }> | null;
268
346
  }, HTMLDialogElement>;
@@ -1,8 +1,9 @@
1
1
  import { SizeType } from '../../../../core/src/index.ts';
2
2
  import { FormModalResult } from './FormModal.properties';
3
3
  import { FormEventPayload } from '../../composables/useFormEvents';
4
+ import { HttpClient } from '../../http-client';
4
5
  export declare class JsonFormModalService {
5
- static openModal<DATA = any>({ initialData, modalTitle, schema, uiSchema, modalSize, onClose, onEvents, }: {
6
+ static openModal<DATA = any>({ initialData, modalTitle, schema, uiSchema, modalSize, onClose, onEvents, http, renderers, }: {
6
7
  initialData?: DATA;
7
8
  schema: any;
8
9
  uiSchema: any;
@@ -10,5 +11,32 @@ export declare class JsonFormModalService {
10
11
  modalTitle: string;
11
12
  onClose: (result: FormModalResult) => void;
12
13
  onEvents?: (payload: FormEventPayload) => void;
14
+ http?: HttpClient;
15
+ renderers?: any[];
16
+ }): void;
17
+ static openViewModal<DATA = any>({ data, modalTitle, schema, uiSchema, modalSize, onClose, onEdit, onDelete, renderers, onView, }: {
18
+ data?: DATA;
19
+ schema: any;
20
+ uiSchema: any;
21
+ modalSize?: SizeType;
22
+ renderers?: any[];
23
+ modalTitle: string;
24
+ onClose?: () => void;
25
+ /**
26
+ * Called when the user clicks Edit.
27
+ * Passed as `onEdit` so Vue's v-bind spread in modalWrapper wires it as
28
+ * a listener for the `edit` event emitted by ViewModal.
29
+ */
30
+ onEdit?: (data: DATA) => void;
31
+ /**
32
+ * Called when the user clicks Delete.
33
+ * Passed as `onDelete` so Vue's v-bind spread in modalWrapper wires it as
34
+ * a listener for the `delete` event emitted by ViewModal.
35
+ */
36
+ onDelete?: (data: DATA) => void;
37
+ /**
38
+ * Called when the user clicks view in the form.
39
+ */
40
+ onView?: (data: any) => void;
13
41
  }): void;
14
42
  }
@@ -1,5 +1,5 @@
1
1
  export declare const arrayRenderers: {
2
- tester: (uischema: import('@jsonforms/core').UISchemaElement, schema: import('@jsonforms/core').JsonSchema, context: import('@jsonforms/core').TesterContext) => number;
2
+ tester: import('../../../testers/jsonforms-testers').RankedTester;
3
3
  renderer: import('vue').DefineComponent<{
4
4
  uischema: import('@jsonforms/core').UISchemaElement;
5
5
  schema: import('@jsonforms/core').JsonSchema;
@@ -2,12 +2,16 @@ import { ControlElement, JsonSchema } from '@jsonforms/core';
2
2
  import { FieldContext } from 'vee-validate';
3
3
  import { Ref } from 'vue';
4
4
  import { ControlOption } from '../../../../../../core/src/index.ts';
5
- import { UseInputOptions } from './UseInput';
5
+ import { UseInputOptions } from './useInput';
6
6
  export type useCustomProps = (uischema: ControlElement, schema: JsonSchema, field: FieldContext, options: any) => Ref<any>;
7
7
  export declare const useCustomControlBinding: <CONTROL_OPTION extends ControlOption = ControlOption>({ useProps, setDefaultValue, }?: {
8
8
  useProps?: useCustomProps;
9
+ additionalProps?: useCustomProps;
9
10
  setDefaultValue?: (field: FieldContext) => void;
10
11
  }) => (uischema: ControlElement, schema: JsonSchema, options?: {}) => {
12
+ formValues: import('vee-validate').GenericObject;
13
+ uischema: ControlElement;
14
+ schema: JsonSchema;
11
15
  wrapper: import('vue').ComputedRef<any>;
12
16
  value: Ref<unknown, unknown>;
13
17
  field: FieldContext<unknown>;
@@ -18,6 +22,9 @@ export declare const useCustomControlBinding: <CONTROL_OPTION extends ControlOpt
18
22
  } | CONTROL_OPTION>;
19
23
  };
20
24
  export declare const useControlBinding: (uischema: ControlElement, schema: JsonSchema, options?: UseInputOptions) => {
25
+ formValues: import('vee-validate').GenericObject;
26
+ uischema: ControlElement;
27
+ schema: JsonSchema;
21
28
  wrapper: import('vue').ComputedRef<any>;
22
29
  value: Ref<unknown, unknown>;
23
30
  field: FieldContext<unknown>;
@@ -1,4 +1,5 @@
1
1
  import { AutocompleteAllOptions } from '../../../../../../core/src/index.ts';
2
+ import { HttpClient } from '../../../../http-client';
2
3
  /**
3
4
  * Resolves autocomplete configuration from control options.
4
5
  *
@@ -7,10 +8,10 @@ import { AutocompleteAllOptions } from '../../../../../../core/src/index.ts';
7
8
  * config object with `fetchOptions`, label/value keys, and optional
8
9
  * inline-create form details.
9
10
  */
10
- export declare const useFetchOptions: (options: AutocompleteAllOptions) => Promise<{
11
- fetchOptions: null;
11
+ export declare const useFetchOptions: (options: AutocompleteAllOptions, http: HttpClient, formValues?: any) => Promise<{
12
+ fetchOptions: ((searchTerm: string, signal: AbortSignal) => Promise<any>) | null;
12
13
  labelKey: string | undefined;
13
14
  valueKey: string | undefined;
14
15
  enableCreate: boolean;
15
- form: null;
16
+ form: Record<string, any> | null;
16
17
  }>;
@@ -0,0 +1,135 @@
1
+ import { ControlElement, JsonSchema } from '@jsonforms/core';
2
+ import { FieldContext } from 'vee-validate';
3
+ import { ControlOption } from '../../../../../../core/src/index.ts';
4
+ import { useCustomProps } from './useControlBinding';
5
+ import { UseInputOptions } from './useInput';
6
+ export declare const isLink: (value: string) => boolean;
7
+ export declare const getNestedValue: (value: any, opts: any, formValues: any) => any;
8
+ export declare const useCustomReadonlyControlBinding: <CONTROL_OPTION extends ControlOption = ControlOption>({ useProps, setDefaultValue, }?: {
9
+ useProps?: useCustomProps;
10
+ additionalProps?: useCustomProps;
11
+ setDefaultValue?: (field: FieldContext) => void;
12
+ }) => (uischema: ControlElement, schema: JsonSchema, options?: {}) => {
13
+ wrapper: import('vue').ComputedRef<any>;
14
+ appliedOptions: import('vue').ComputedRef<{
15
+ [key: string]: any;
16
+ } | CONTROL_OPTION>;
17
+ displayWrapper: import('vue').ComputedRef<{
18
+ component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
19
+ direction: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ path: {
24
+ type: StringConstructor;
25
+ required: true;
26
+ };
27
+ displayValue: {
28
+ type: import('vue').PropType<unknown>;
29
+ required: true;
30
+ };
31
+ options: {
32
+ type: ObjectConstructor;
33
+ required: true;
34
+ };
35
+ value: {
36
+ type: import('vue').PropType<unknown>;
37
+ required: true;
38
+ };
39
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
40
+ direction: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ path: {
45
+ type: StringConstructor;
46
+ required: true;
47
+ };
48
+ displayValue: {
49
+ type: import('vue').PropType<unknown>;
50
+ required: true;
51
+ };
52
+ options: {
53
+ type: ObjectConstructor;
54
+ required: true;
55
+ };
56
+ value: {
57
+ type: import('vue').PropType<unknown>;
58
+ required: true;
59
+ };
60
+ }>> & Readonly<{}>, {
61
+ direction: string;
62
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
63
+ value: {
64
+ value: unknown;
65
+ path: string;
66
+ displayValue: any;
67
+ options: {
68
+ [key: string]: any;
69
+ };
70
+ direction: "ltr" | "rtl";
71
+ };
72
+ }>;
73
+ };
74
+ export declare const useReadonlyControlBinding: (uischema: ControlElement, schema: JsonSchema, options?: UseInputOptions) => {
75
+ wrapper: import('vue').ComputedRef<any>;
76
+ appliedOptions: import('vue').ComputedRef<ControlOption | {
77
+ [key: string]: any;
78
+ }>;
79
+ displayWrapper: import('vue').ComputedRef<{
80
+ component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
81
+ direction: {
82
+ type: StringConstructor;
83
+ default: string;
84
+ };
85
+ path: {
86
+ type: StringConstructor;
87
+ required: true;
88
+ };
89
+ displayValue: {
90
+ type: import('vue').PropType<unknown>;
91
+ required: true;
92
+ };
93
+ options: {
94
+ type: ObjectConstructor;
95
+ required: true;
96
+ };
97
+ value: {
98
+ type: import('vue').PropType<unknown>;
99
+ required: true;
100
+ };
101
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
102
+ direction: {
103
+ type: StringConstructor;
104
+ default: string;
105
+ };
106
+ path: {
107
+ type: StringConstructor;
108
+ required: true;
109
+ };
110
+ displayValue: {
111
+ type: import('vue').PropType<unknown>;
112
+ required: true;
113
+ };
114
+ options: {
115
+ type: ObjectConstructor;
116
+ required: true;
117
+ };
118
+ value: {
119
+ type: import('vue').PropType<unknown>;
120
+ required: true;
121
+ };
122
+ }>> & Readonly<{}>, {
123
+ direction: string;
124
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
125
+ value: {
126
+ value: unknown;
127
+ path: string;
128
+ displayValue: any;
129
+ options: {
130
+ [key: string]: any;
131
+ };
132
+ direction: "ltr" | "rtl";
133
+ };
134
+ }>;
135
+ };
@@ -2,6 +2,9 @@ import { ControlElement, JsonSchema } from '@jsonforms/core';
2
2
  import { FieldContext } from 'vee-validate';
3
3
  import { AutocompleteAllOptions, SelectOptions } from '../../../../../../core/src/index.ts';
4
4
  export declare const useSelectBinding: (uischema: ControlElement, schema: JsonSchema, options?: {}) => {
5
+ formValues: import('vee-validate').GenericObject;
6
+ uischema: ControlElement;
7
+ schema: JsonSchema;
5
8
  wrapper: import('vue').ComputedRef<any>;
6
9
  value: import('vue').Ref<unknown, unknown>;
7
10
  field: FieldContext<unknown>;
@@ -12,6 +15,9 @@ export declare const useSelectBinding: (uischema: ControlElement, schema: JsonSc
12
15
  }>;
13
16
  };
14
17
  export declare const useAutocompleteBinding: (uischema: ControlElement, schema: JsonSchema, options?: {}) => {
18
+ formValues: import('vee-validate').GenericObject;
19
+ uischema: ControlElement;
20
+ schema: JsonSchema;
15
21
  wrapper: import('vue').ComputedRef<any>;
16
22
  value: import('vue').Ref<unknown, unknown>;
17
23
  field: FieldContext<unknown>;
@@ -1,5 +1,5 @@
1
- export declare const index: {
2
- tester: (uischema: import('@jsonforms/core').UISchemaElement, schema: import('@jsonforms/core').JsonSchema, context: import('@jsonforms/core').TesterContext) => number;
1
+ export declare const controlRenderers: {
2
+ tester: import('../../../testers/jsonforms-testers').RankedTester;
3
3
  renderer: import('vue').DefineComponent<{
4
4
  uischema: import('@jsonforms/core').ControlElement;
5
5
  schema: import('@jsonforms/core').JsonSchema;
@@ -0,0 +1,7 @@
1
+ import { ControlElement, JsonSchema } from '@jsonforms/core';
2
+ type __VLS_Props = {
3
+ uischema: ControlElement;
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;