@narrative.io/jsonforms-provider-protocols 1.1.0-beta.6 → 1.1.0-beta.8
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonforms-provider-protocols.css +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/primevue/JfBoolean.vue.d.ts +20 -32
- package/dist/vue/primevue/JfBoolean.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfBoolean.vue.js +38 -6
- package/dist/vue/primevue/JfBoolean.vue.js.map +1 -1
- package/dist/vue/primevue/JfEnum.vue.d.ts +20 -32
- package/dist/vue/primevue/JfEnum.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfEnum.vue.js +1 -1
- package/dist/vue/primevue/JfEnum.vue2.js +38 -6
- package/dist/vue/primevue/JfEnum.vue2.js.map +1 -1
- package/dist/vue/primevue/JfEnumArray.vue.d.ts +20 -32
- package/dist/vue/primevue/JfEnumArray.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfEnumArray.vue.js +38 -6
- package/dist/vue/primevue/JfEnumArray.vue.js.map +1 -1
- package/dist/vue/primevue/JfNumber.vue.d.ts +20 -32
- package/dist/vue/primevue/JfNumber.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfNumber.vue.js +38 -6
- package/dist/vue/primevue/JfNumber.vue.js.map +1 -1
- package/dist/vue/primevue/JfText.vue.d.ts +20 -32
- package/dist/vue/primevue/JfText.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfText.vue.js +38 -6
- package/dist/vue/primevue/JfText.vue.js.map +1 -1
- package/dist/vue/primevue/JfTextArea.vue.d.ts +20 -32
- package/dist/vue/primevue/JfTextArea.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfTextArea.vue.js +38 -6
- package/dist/vue/primevue/JfTextArea.vue.js.map +1 -1
- package/dist/vue/primevue/index.d.ts +20 -31
- package/dist/vue/primevue/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +15 -2
- package/src/vue/index.ts +10 -1
- package/src/vue/primevue/JfBoolean.vue +42 -5
- package/src/vue/primevue/JfEnum.vue +44 -6
- package/src/vue/primevue/JfEnumArray.vue +43 -6
- package/src/vue/primevue/JfNumber.vue +42 -6
- package/src/vue/primevue/JfText.vue +42 -6
- package/src/vue/primevue/JfTextArea.vue +42 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JfTextArea.vue.js","sources":["../../../src/vue/primevue/JfTextArea.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {
|
|
1
|
+
{"version":3,"file":"JfTextArea.vue.js","sources":["../../../src/vue/primevue/JfTextArea.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: \"JfTextArea\",\n props: {\n uischema: {\n type: Object,\n required: true,\n },\n schema: {\n type: Object,\n required: true,\n },\n path: {\n type: String,\n required: true,\n },\n enabled: {\n type: Boolean,\n default: undefined,\n },\n renderers: {\n type: Array,\n required: false,\n },\n cells: {\n type: Array,\n required: false,\n },\n config: {\n type: Object,\n required: false,\n },\n },\n};\n</script>\n\n<script setup lang=\"ts\">\nimport type { ControlProps } from \"@jsonforms/vue\";\nimport { useJsonFormsControl } from \"@jsonforms/vue\";\nimport { computed, ref, getCurrentInstance } from \"vue\";\nimport Textarea from \"primevue/textarea\";\n\n// Access props from the component instance\nconst instance = getCurrentInstance()!;\nconst props = instance.props as unknown as ControlProps;\nconst { control, handleChange } = useJsonFormsControl(props);\n\nconst placeholder = computed<string | undefined>(\n () =>\n (control.value.uischema as { options?: { placeholder?: string } })?.options\n ?.placeholder ?? control.value.description,\n);\n\n// Track user interaction\nconst hasInteracted = ref(false);\n\nconst showErrors = computed(() => hasInteracted.value && control.value.errors);\n\nfunction onInput(val: string | undefined) {\n // Convert empty strings to undefined for proper required field validation\n const newValue = val && val.trim() !== \"\" ? val : undefined;\n if (control.value.data !== newValue) {\n handleChange(control.value.path, newValue);\n }\n}\n\nfunction onBlur() {\n hasInteracted.value = true;\n}\n</script>\n\n<template>\n <div class=\"flex flex-column gap-2\">\n <label v-if=\"control.label\" class=\"text-color text-left\">{{\n control.label\n }}</label>\n <div v-if=\"control.description\" class=\"text-color-secondary text-left\">\n {{ control.description }}\n </div>\n <Textarea\n class=\"w-full\"\n :model-value=\"control.data ?? ''\"\n :disabled=\"!control.enabled\"\n :aria-invalid=\"!!showErrors || undefined\"\n :placeholder=\"placeholder\"\n :rows=\"4\"\n :auto-resize=\"true\"\n @update:model-value=\"onInput\"\n @blur=\"onBlur\"\n />\n <small v-if=\"showErrors\" class=\"p-error\">{{ control.errors }}</small>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_unref","_toDisplayString","_createVNode"],"mappings":";;;;;;;;;;;;;;;;AACA,MAAA,cAAe;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,IAEX,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;;;;AAUA,UAAM,WAAW,mBAAA;AACjB,UAAM,QAAQ,SAAS;AACvB,UAAM,EAAE,SAAS,iBAAiB,oBAAoB,KAAK;AAE3D,UAAM,cAAc;AAAA,MAClB,MACG,QAAQ,MAAM,UAAqD,SAChE,eAAe,QAAQ,MAAM;AAAA,IAAA;AAIrC,UAAM,gBAAgB,IAAI,KAAK;AAE/B,UAAM,aAAa,SAAS,MAAM,cAAc,SAAS,QAAQ,MAAM,MAAM;AAE7E,aAAS,QAAQ,KAAyB;AAExC,YAAM,WAAW,OAAO,IAAI,KAAA,MAAW,KAAK,MAAM;AAClD,UAAI,QAAQ,MAAM,SAAS,UAAU;AACnC,qBAAa,QAAQ,MAAM,MAAM,QAAQ;AAAA,MAC3C;AAAA,IACF;AAEA,aAAS,SAAS;AAChB,oBAAc,QAAQ;AAAA,IACxB;;AAIE,aAAAA,UAAA,GAAAC,mBAmBM,OAnBN,YAmBM;AAAA,QAlBSC,MAAA,OAAA,EAAQ,SAArBF,UAAA,GAAAC,mBAEU,SAFV,YAEUE,gBADRD,MAAA,OAAA,EAAQ,KAAK,GAAA,CAAA;QAEJA,MAAA,OAAA,EAAQ,eAAnBF,UAAA,GAAAC,mBAEM,OAFN,YAEME,gBADDD,MAAA,OAAA,EAAQ,WAAW,GAAA,CAAA;QAExBE,YAUEF,MAAA,QAAA,GAAA;AAAA,UATA,OAAM;AAAA,UACL,eAAaA,MAAA,OAAA,EAAQ,QAAI;AAAA,UACzB,UAAQ,CAAGA,MAAA,OAAA,EAAQ;AAAA,UACnB,gBAAY,CAAA,CAAI,WAAA,SAAc;AAAA,UAC9B,aAAa,YAAA;AAAA,UACb,MAAM;AAAA,UACN,eAAa;AAAA,UACb,uBAAoB;AAAA,UACpB;AAAA,QAAA;QAEU,WAAA,SAAbF,UAAA,GAAAC,mBAAqE,SAArE,YAAqEE,gBAAzBD,MAAA,OAAA,EAAQ,MAAM,GAAA,CAAA;;;;;"}
|
|
@@ -7,76 +7,65 @@ import JfBoolean from "./JfBoolean.vue";
|
|
|
7
7
|
export declare const primevueRenderers: {
|
|
8
8
|
tester: (uischema: import("@jsonforms/core").UISchemaElement, schema: import("@jsonforms/core").JsonSchema, context: import("@jsonforms/core").TesterContext) => number;
|
|
9
9
|
renderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
-
|
|
10
|
+
uischema: {
|
|
11
|
+
type: ObjectConstructor;
|
|
11
12
|
required: true;
|
|
12
|
-
type: import("vue").PropType<import("@jsonforms/core").JsonSchema>;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
schema: {
|
|
15
|
+
type: ObjectConstructor;
|
|
15
16
|
required: true;
|
|
16
|
-
type: import("vue").PropType<import("@jsonforms/core").ControlElement>;
|
|
17
17
|
};
|
|
18
18
|
path: {
|
|
19
|
-
required: true;
|
|
20
19
|
type: StringConstructor;
|
|
20
|
+
required: true;
|
|
21
21
|
};
|
|
22
22
|
enabled: {
|
|
23
|
-
required: false;
|
|
24
23
|
type: BooleanConstructor;
|
|
25
24
|
default: undefined;
|
|
26
25
|
};
|
|
27
26
|
renderers: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
default: undefined;
|
|
27
|
+
type: ArrayConstructor;
|
|
28
|
+
required: false;
|
|
31
29
|
};
|
|
32
30
|
cells: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
default: undefined;
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
required: false;
|
|
36
33
|
};
|
|
37
34
|
config: {
|
|
38
|
-
required: boolean;
|
|
39
35
|
type: ObjectConstructor;
|
|
40
|
-
|
|
36
|
+
required: false;
|
|
41
37
|
};
|
|
42
38
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
-
|
|
39
|
+
uischema: {
|
|
40
|
+
type: ObjectConstructor;
|
|
44
41
|
required: true;
|
|
45
|
-
type: import("vue").PropType<import("@jsonforms/core").JsonSchema>;
|
|
46
42
|
};
|
|
47
|
-
|
|
43
|
+
schema: {
|
|
44
|
+
type: ObjectConstructor;
|
|
48
45
|
required: true;
|
|
49
|
-
type: import("vue").PropType<import("@jsonforms/core").ControlElement>;
|
|
50
46
|
};
|
|
51
47
|
path: {
|
|
52
|
-
required: true;
|
|
53
48
|
type: StringConstructor;
|
|
49
|
+
required: true;
|
|
54
50
|
};
|
|
55
51
|
enabled: {
|
|
56
|
-
required: false;
|
|
57
52
|
type: BooleanConstructor;
|
|
58
53
|
default: undefined;
|
|
59
54
|
};
|
|
60
55
|
renderers: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
default: undefined;
|
|
56
|
+
type: ArrayConstructor;
|
|
57
|
+
required: false;
|
|
64
58
|
};
|
|
65
59
|
cells: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
default: undefined;
|
|
60
|
+
type: ArrayConstructor;
|
|
61
|
+
required: false;
|
|
69
62
|
};
|
|
70
63
|
config: {
|
|
71
|
-
required: boolean;
|
|
72
64
|
type: ObjectConstructor;
|
|
73
|
-
|
|
65
|
+
required: false;
|
|
74
66
|
};
|
|
75
67
|
}>> & Readonly<{}>, {
|
|
76
|
-
config: Record<string, any>;
|
|
77
68
|
enabled: boolean;
|
|
78
|
-
renderers: import("@jsonforms/core").JsonFormsRendererRegistryEntry[];
|
|
79
|
-
cells: import("@jsonforms/core").JsonFormsCellRendererRegistryEntry[];
|
|
80
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
81
70
|
}[];
|
|
82
71
|
export { JfText, JfTextArea, JfNumber, JfEnum, JfEnumArray, JfBoolean };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vue/primevue/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,SAAS,MAAM,iBAAiB,CAAC;AA0ExC,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vue/primevue/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,SAAS,MAAM,iBAAiB,CAAC;AA0ExC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiB7B,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -13,8 +13,21 @@ export * from "./core/types";
|
|
|
13
13
|
// Protocol exports
|
|
14
14
|
export { RestApiProtocol } from "./protocols/rest_api";
|
|
15
15
|
|
|
16
|
-
// Vue exports
|
|
17
|
-
export
|
|
16
|
+
// Vue exports - using named imports to avoid potential bundling issues
|
|
17
|
+
export {
|
|
18
|
+
providerRenderers,
|
|
19
|
+
primevueRenderers,
|
|
20
|
+
ProviderAutocomplete,
|
|
21
|
+
ProviderSelect,
|
|
22
|
+
ProviderMultiSelect,
|
|
23
|
+
useProvider,
|
|
24
|
+
JfText,
|
|
25
|
+
JfTextArea,
|
|
26
|
+
JfNumber,
|
|
27
|
+
JfEnum,
|
|
28
|
+
JfEnumArray,
|
|
29
|
+
JfBoolean,
|
|
30
|
+
} from "./vue";
|
|
18
31
|
|
|
19
32
|
export interface ProviderConfig {
|
|
20
33
|
protocols?: Protocol[];
|
package/src/vue/index.ts
CHANGED
|
@@ -70,4 +70,13 @@ export { primevueRenderers } from "./primevue";
|
|
|
70
70
|
export { ProviderAutocomplete, ProviderSelect, ProviderMultiSelect };
|
|
71
71
|
export { useProvider } from "./composables/useProvider";
|
|
72
72
|
export * from "./testers";
|
|
73
|
-
|
|
73
|
+
|
|
74
|
+
// Export individual PrimeVue components using lazy evaluation to avoid circular deps
|
|
75
|
+
export {
|
|
76
|
+
JfText,
|
|
77
|
+
JfTextArea,
|
|
78
|
+
JfNumber,
|
|
79
|
+
JfEnum,
|
|
80
|
+
JfEnumArray,
|
|
81
|
+
JfBoolean,
|
|
82
|
+
} from "./primevue";
|
|
@@ -1,11 +1,48 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: "JfBoolean",
|
|
4
|
+
props: {
|
|
5
|
+
uischema: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
path: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
renderers: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
25
|
+
cells: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
config: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
1
37
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
38
|
+
import type { ControlProps } from "@jsonforms/vue";
|
|
39
|
+
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
40
|
+
import { getCurrentInstance } from "vue";
|
|
4
41
|
import Checkbox from "primevue/checkbox";
|
|
5
42
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const props =
|
|
43
|
+
// Access props from the component instance
|
|
44
|
+
const instance = getCurrentInstance()!;
|
|
45
|
+
const props = instance.props as unknown as ControlProps;
|
|
9
46
|
const { control, handleChange } = useJsonFormsControl(props);
|
|
10
47
|
|
|
11
48
|
const onToggle = (val: boolean) => handleChange(control.value.path, val);
|
|
@@ -1,14 +1,52 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Define props manually to avoid any potential circular dependency issues
|
|
3
|
+
export default {
|
|
4
|
+
name: "JfEnum",
|
|
5
|
+
props: {
|
|
6
|
+
uischema: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
schema: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
path: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
enabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: undefined,
|
|
21
|
+
},
|
|
22
|
+
renderers: {
|
|
23
|
+
type: Array,
|
|
24
|
+
required: false,
|
|
25
|
+
},
|
|
26
|
+
cells: {
|
|
27
|
+
type: Array,
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
config: {
|
|
31
|
+
type: Object,
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
1
38
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
39
|
+
import type { JsonSchema } from "@jsonforms/core";
|
|
40
|
+
import type { ControlProps } from "@jsonforms/vue";
|
|
41
|
+
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
42
|
+
import { computed, ref, inject, getCurrentInstance } from "vue";
|
|
5
43
|
import { useProvider } from "../composables/useProvider";
|
|
6
44
|
import { useDerive } from "../composables/useDerive";
|
|
7
45
|
import Dropdown from "primevue/dropdown";
|
|
8
46
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const props =
|
|
47
|
+
// Access props from the component instance
|
|
48
|
+
const instance = getCurrentInstance()!;
|
|
49
|
+
const props = instance.props as unknown as ControlProps;
|
|
12
50
|
const { control, handleChange } = useJsonFormsControl(props);
|
|
13
51
|
|
|
14
52
|
type Opt = { label: string; value: unknown };
|
|
@@ -1,14 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: "JfEnumArray",
|
|
4
|
+
props: {
|
|
5
|
+
uischema: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
path: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
renderers: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
25
|
+
cells: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
config: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
1
37
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
38
|
+
import type { JsonSchema } from "@jsonforms/core";
|
|
39
|
+
import type { ControlProps } from "@jsonforms/vue";
|
|
40
|
+
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
41
|
+
import { computed, inject, getCurrentInstance } from "vue";
|
|
5
42
|
import { useProvider } from "../composables/useProvider";
|
|
6
43
|
import { useDerive } from "../composables/useDerive";
|
|
7
44
|
import MultiSelect from "primevue/multiselect";
|
|
8
45
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const props =
|
|
46
|
+
// Access props from the component instance
|
|
47
|
+
const instance = getCurrentInstance()!;
|
|
48
|
+
const props = instance.props as unknown as ControlProps;
|
|
12
49
|
const { control, handleChange } = useJsonFormsControl(props);
|
|
13
50
|
|
|
14
51
|
type Opt = { label: string; value: unknown };
|
|
@@ -1,13 +1,49 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: "JfNumber",
|
|
4
|
+
props: {
|
|
5
|
+
uischema: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
path: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
renderers: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
25
|
+
cells: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
config: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
1
37
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import { computed, ref } from "vue";
|
|
38
|
+
import type { ControlProps } from "@jsonforms/vue";
|
|
39
|
+
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
40
|
+
import { computed, ref, getCurrentInstance } from "vue";
|
|
5
41
|
import { useDerive } from "../composables/useDerive";
|
|
6
42
|
import InputNumber from "primevue/inputnumber";
|
|
7
43
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const props =
|
|
44
|
+
// Access props from the component instance
|
|
45
|
+
const instance = getCurrentInstance()!;
|
|
46
|
+
const props = instance.props as unknown as ControlProps;
|
|
11
47
|
const { control, handleChange } = useJsonFormsControl(props);
|
|
12
48
|
|
|
13
49
|
const options = computed(
|
|
@@ -1,15 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: "JfText",
|
|
4
|
+
props: {
|
|
5
|
+
uischema: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
path: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
renderers: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
25
|
+
cells: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
config: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
1
37
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import { computed, ref, inject, watch } from "vue";
|
|
38
|
+
import type { ControlProps } from "@jsonforms/vue";
|
|
39
|
+
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
40
|
+
import { computed, ref, inject, watch, getCurrentInstance } from "vue";
|
|
5
41
|
import { useProvider } from "../composables/useProvider";
|
|
6
42
|
import { useDerive } from "../composables/useDerive";
|
|
7
43
|
import InputText from "primevue/inputtext";
|
|
8
44
|
import AutoComplete from "primevue/autocomplete";
|
|
9
45
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const props =
|
|
46
|
+
// Access props from the component instance
|
|
47
|
+
const instance = getCurrentInstance()!;
|
|
48
|
+
const props = instance.props as unknown as ControlProps;
|
|
13
49
|
const { control, handleChange } = useJsonFormsControl(props);
|
|
14
50
|
|
|
15
51
|
// Provider support for autocomplete functionality
|
|
@@ -1,12 +1,48 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: "JfTextArea",
|
|
4
|
+
props: {
|
|
5
|
+
uischema: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
path: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
renderers: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
25
|
+
cells: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
config: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
1
37
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import { computed, ref } from "vue";
|
|
38
|
+
import type { ControlProps } from "@jsonforms/vue";
|
|
39
|
+
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
40
|
+
import { computed, ref, getCurrentInstance } from "vue";
|
|
5
41
|
import Textarea from "primevue/textarea";
|
|
6
42
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const props =
|
|
43
|
+
// Access props from the component instance
|
|
44
|
+
const instance = getCurrentInstance()!;
|
|
45
|
+
const props = instance.props as unknown as ControlProps;
|
|
10
46
|
const { control, handleChange } = useJsonFormsControl(props);
|
|
11
47
|
|
|
12
48
|
const placeholder = computed<string | undefined>(
|