@narrative.io/jsonforms-provider-protocols 2.9.0 → 2.11.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jsonforms-provider-protocols.css +2 -2
- package/dist/vue/components/ProviderAutocomplete.vue.d.ts.map +1 -1
- package/dist/vue/components/ProviderAutocomplete.vue.js +3 -3
- package/dist/vue/components/ProviderAutocomplete.vue.js.map +1 -1
- package/dist/vue/components/ProviderMultiSelect.vue.d.ts.map +1 -1
- package/dist/vue/components/ProviderMultiSelect.vue.js +1 -1
- package/dist/vue/components/ProviderMultiSelect.vue2.js +20 -4
- package/dist/vue/components/ProviderMultiSelect.vue2.js.map +1 -1
- package/dist/vue/components/ProviderSelect.vue.d.ts.map +1 -1
- package/dist/vue/components/ProviderSelect.vue.js +1 -1
- package/dist/vue/components/ProviderSelect.vue2.js +3 -3
- package/dist/vue/components/ProviderSelect.vue2.js.map +1 -1
- package/dist/vue/primevue/JfBoolean.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfBoolean.vue.js +8 -2
- package/dist/vue/primevue/JfBoolean.vue.js.map +1 -1
- package/dist/vue/primevue/JfEnum.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfEnum.vue.js +3 -3
- package/dist/vue/primevue/JfEnum.vue.js.map +1 -1
- package/dist/vue/primevue/JfEnumArray.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfEnumArray.vue.js +20 -4
- package/dist/vue/primevue/JfEnumArray.vue.js.map +1 -1
- package/dist/vue/primevue/JfNumber.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfNumber.vue.js +3 -3
- package/dist/vue/primevue/JfNumber.vue.js.map +1 -1
- package/dist/vue/primevue/JfText.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfText.vue.js +3 -3
- package/dist/vue/primevue/JfText.vue.js.map +1 -1
- package/dist/vue/primevue/JfTextArea.vue.d.ts.map +1 -1
- package/dist/vue/primevue/JfTextArea.vue.js +3 -3
- package/dist/vue/primevue/JfTextArea.vue.js.map +1 -1
- package/dist/vue/primevue/index.d.ts.map +1 -1
- package/dist/vue/primevue/index.js +26 -1
- package/dist/vue/primevue/index.js.map +1 -1
- package/dist/vue/utils/autoSelect.d.ts +19 -2
- package/dist/vue/utils/autoSelect.d.ts.map +1 -1
- package/dist/vue/utils/autoSelect.js +21 -1
- package/dist/vue/utils/autoSelect.js.map +1 -1
- package/package.json +7 -3
- package/src/index.ts +2 -0
- package/src/vue/components/ProviderAutocomplete.vue +3 -3
- package/src/vue/components/ProviderMultiSelect.vue +24 -4
- package/src/vue/components/ProviderSelect.vue +3 -3
- package/src/vue/primevue/JfBoolean.vue +2 -2
- package/src/vue/primevue/JfEnum.vue +3 -3
- package/src/vue/primevue/JfEnumArray.vue +24 -4
- package/src/vue/primevue/JfNumber.vue +3 -3
- package/src/vue/primevue/JfText.vue +3 -3
- package/src/vue/primevue/JfTextArea.vue +3 -3
- package/src/vue/primevue/index.ts +26 -1
- package/src/vue/styles.css +26 -1
- package/src/vue/utils/autoSelect.ts +46 -2
|
@@ -4,14 +4,14 @@ import { useProvider } from "../composables/useProvider.js";
|
|
|
4
4
|
import { useDerive } from "../composables/useDerive.js";
|
|
5
5
|
import InputText from "primevue/inputtext";
|
|
6
6
|
import AutoComplete from "primevue/autocomplete";
|
|
7
|
-
const _hoisted_1 = { class: "
|
|
7
|
+
const _hoisted_1 = { class: "jf-control" };
|
|
8
8
|
const _hoisted_2 = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "
|
|
10
|
+
class: "jf-label"
|
|
11
11
|
};
|
|
12
12
|
const _hoisted_3 = {
|
|
13
13
|
key: 1,
|
|
14
|
-
class: "
|
|
14
|
+
class: "jf-description"
|
|
15
15
|
};
|
|
16
16
|
const _hoisted_4 = {
|
|
17
17
|
key: 4,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JfText.vue.js","sources":["../../../src/vue/primevue/JfText.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: \"JfText\",\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, inject, watch, getCurrentInstance } from \"vue\";\nimport { useProvider } from \"../composables/useProvider\";\nimport { useDerive } from \"../composables/useDerive\";\nimport InputText from \"primevue/inputtext\";\nimport AutoComplete from \"primevue/autocomplete\";\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\n// Provider support for autocomplete functionality\nconst binding = computed(() => {\n const provider = control.value.uischema?.options?.provider;\n // Ensure load property is set to 'query' by default for autocomplete\n if (provider && typeof provider === \"object\" && !provider.load) {\n return { ...provider, load: \"query\" };\n }\n return provider;\n});\n\nconst deps = computed(\n () =>\n ((\n (control.value.schema as Record<string, unknown>)?.[\n \"x-provider\"\n ] as Record<string, unknown>\n )?.dependsOn as string[]) ?? [],\n);\nconst depValues = computed(() => {\n return deps.value.map((dep) => {\n // Resolve dependency value from form data using JSON pointer-like path\n const path = dep.startsWith(\"#/\") ? dep.slice(2) : dep;\n const keys = path.replace(/\\//g, \".\").split(\".\");\n let value: unknown = rootData.value;\n for (const key of keys) {\n if (value && typeof value === \"object\" && key in value) {\n value = (value as Record<string, unknown>)[key];\n } else {\n return null;\n }\n }\n return value;\n });\n});\n\n// Get the root form data from JSONForms context for template URL resolution\nconst injectedFormData = inject<{ value: unknown }>(\"formData\", { value: {} });\nconst rootData = computed(() => injectedFormData.value || {});\n\nconst query = ref(\"\");\nconst { items, loading, error, reload } = useProvider(binding, {\n data: rootData,\n path: control.value.path,\n uiQuery: query.value,\n dependsOnValues: depValues.value,\n});\n\nwatch(query, () => {\n if (binding.value?.load === \"query\") reload();\n});\n\nconst placeholder = computed<string | undefined>(() => {\n if (loading.value) return \"Loading…\";\n return (\n (control.value.uischema as { options?: { placeholder?: string } })?.options\n ?.placeholder ?? control.value.description\n );\n});\n\nconst isAutocomplete = computed(() => !!binding.value);\n\n// Add derive functionality\nuseDerive({ control, handleChange });\n\n// Track user interaction\nconst hasInteracted = ref(false);\nconst hasFocused = 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 if (hasFocused.value) {\n hasInteracted.value = true;\n }\n}\n\nfunction onFocus() {\n hasFocused.value = true;\n}\n\n// Autocomplete specific handlers\nconst onComplete = (event: { query: string }) => {\n query.value = event.query;\n};\n\nconst onSelect = (event: { value?: { value?: unknown } | unknown }) => {\n const newValue = (event.value as { value?: unknown })?.value ?? event.value;\n handleChange(control.value.path, newValue);\n};\n</script>\n\n<template>\n <div class=\"
|
|
1
|
+
{"version":3,"file":"JfText.vue.js","sources":["../../../src/vue/primevue/JfText.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: \"JfText\",\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, inject, watch, getCurrentInstance } from \"vue\";\nimport { useProvider } from \"../composables/useProvider\";\nimport { useDerive } from \"../composables/useDerive\";\nimport InputText from \"primevue/inputtext\";\nimport AutoComplete from \"primevue/autocomplete\";\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\n// Provider support for autocomplete functionality\nconst binding = computed(() => {\n const provider = control.value.uischema?.options?.provider;\n // Ensure load property is set to 'query' by default for autocomplete\n if (provider && typeof provider === \"object\" && !provider.load) {\n return { ...provider, load: \"query\" };\n }\n return provider;\n});\n\nconst deps = computed(\n () =>\n ((\n (control.value.schema as Record<string, unknown>)?.[\n \"x-provider\"\n ] as Record<string, unknown>\n )?.dependsOn as string[]) ?? [],\n);\nconst depValues = computed(() => {\n return deps.value.map((dep) => {\n // Resolve dependency value from form data using JSON pointer-like path\n const path = dep.startsWith(\"#/\") ? dep.slice(2) : dep;\n const keys = path.replace(/\\//g, \".\").split(\".\");\n let value: unknown = rootData.value;\n for (const key of keys) {\n if (value && typeof value === \"object\" && key in value) {\n value = (value as Record<string, unknown>)[key];\n } else {\n return null;\n }\n }\n return value;\n });\n});\n\n// Get the root form data from JSONForms context for template URL resolution\nconst injectedFormData = inject<{ value: unknown }>(\"formData\", { value: {} });\nconst rootData = computed(() => injectedFormData.value || {});\n\nconst query = ref(\"\");\nconst { items, loading, error, reload } = useProvider(binding, {\n data: rootData,\n path: control.value.path,\n uiQuery: query.value,\n dependsOnValues: depValues.value,\n});\n\nwatch(query, () => {\n if (binding.value?.load === \"query\") reload();\n});\n\nconst placeholder = computed<string | undefined>(() => {\n if (loading.value) return \"Loading…\";\n return (\n (control.value.uischema as { options?: { placeholder?: string } })?.options\n ?.placeholder ?? control.value.description\n );\n});\n\nconst isAutocomplete = computed(() => !!binding.value);\n\n// Add derive functionality\nuseDerive({ control, handleChange });\n\n// Track user interaction\nconst hasInteracted = ref(false);\nconst hasFocused = 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 if (hasFocused.value) {\n hasInteracted.value = true;\n }\n}\n\nfunction onFocus() {\n hasFocused.value = true;\n}\n\n// Autocomplete specific handlers\nconst onComplete = (event: { query: string }) => {\n query.value = event.query;\n};\n\nconst onSelect = (event: { value?: { value?: unknown } | unknown }) => {\n const newValue = (event.value as { value?: unknown })?.value ?? event.value;\n handleChange(control.value.path, newValue);\n};\n</script>\n\n<template>\n <div class=\"jf-control\">\n <label v-if=\"control.label\" class=\"jf-label\">{{\n control.label\n }}</label>\n <div v-if=\"control.description\" class=\"jf-description\">\n {{ control.description }}\n </div>\n <AutoComplete\n v-if=\"isAutocomplete\"\n class=\"w-full\"\n :model-value=\"control.data ?? ''\"\n :suggestions=\"items\"\n option-label=\"label\"\n :placeholder=\"placeholder\"\n :disabled=\"!control.enabled\"\n :aria-invalid=\"!!showErrors || undefined\"\n @complete=\"onComplete\"\n @item-select=\"onSelect\"\n @update:model-value=\"onInput\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n />\n <InputText\n v-else\n class=\"w-full\"\n :model-value=\"control.data ?? ''\"\n :disabled=\"!control.enabled\"\n :aria-invalid=\"!!showErrors || undefined\"\n :placeholder=\"placeholder\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n @update:model-value=\"onInput\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n />\n <small v-if=\"error\" class=\"p-error\" role=\"alert\">Failed: {{ error }}</small>\n <small v-else-if=\"showErrors\" class=\"p-error\">{{ control.errors }}</small>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_unref","_toDisplayString","_createBlock"],"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,CAAK,GAAA,CAAA,KAC/C,WAAA,SAAlBF,UAAA,GAAAC,mBAA0E,SAA1E,YAA0EE,gBAAzBD,MAAA,OAAA,EAAQ,MAAM,GAAA,CAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JfTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/primevue/JfTextArea.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,
|
|
1
|
+
{"version":3,"file":"JfTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/primevue/JfTextArea.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,wBA2MK"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, computed, ref, createElementBlock, openBlock, createCommentVNode, createVNode, unref, toDisplayString } from "vue";
|
|
2
2
|
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
3
3
|
import Textarea from "primevue/textarea";
|
|
4
|
-
const _hoisted_1 = { class: "
|
|
4
|
+
const _hoisted_1 = { class: "jf-control" };
|
|
5
5
|
const _hoisted_2 = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "
|
|
7
|
+
class: "jf-label"
|
|
8
8
|
};
|
|
9
9
|
const _hoisted_3 = {
|
|
10
10
|
key: 1,
|
|
11
|
-
class: "
|
|
11
|
+
class: "jf-description"
|
|
12
12
|
};
|
|
13
13
|
const _hoisted_4 = {
|
|
14
14
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
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=\"
|
|
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=\"jf-control\">\n <label v-if=\"control.label\" class=\"jf-label\">{{\n control.label\n }}</label>\n <div v-if=\"control.description\" class=\"jf-description\">\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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AAA,GAAAC,mBAAqE,SAArE,YAAqEE,gBAAzBD,MAAA,OAAA,EAAQ,MAAM,GAAA,CAAA;;;;;"}
|
|
@@ -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;
|
|
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;AA2DxC,eAAO,MAAM,iBAAiB,EAAE,OAAO,EAAO,CAAC;AAK/C,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,GAAG,GAAG,OAAO,EAAE,CAqFvE;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -15,13 +15,38 @@ const injectLayoutStyles = () => {
|
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
align-items: flex-start;
|
|
18
|
-
gap:
|
|
18
|
+
gap: 24px;
|
|
19
19
|
width: 100%;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.vertical-layout-item {
|
|
23
23
|
width: 100%;
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
/* Form control wrapper */
|
|
27
|
+
.jf-control {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: 12px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Form control label typography */
|
|
34
|
+
.jf-label {
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
line-height: 14px;
|
|
38
|
+
color: #031553;
|
|
39
|
+
text-align: left;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Form control description typography */
|
|
43
|
+
.jf-description {
|
|
44
|
+
font-weight: 400;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
line-height: 14px;
|
|
47
|
+
color: #415290;
|
|
48
|
+
text-align: left;
|
|
49
|
+
}
|
|
25
50
|
`;
|
|
26
51
|
document.head.appendChild(style);
|
|
27
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/vue/primevue/index.ts"],"sourcesContent":["import JfText from \"./JfText.vue\";\nimport JfTextArea from \"./JfTextArea.vue\";\nimport JfNumber from \"./JfNumber.vue\";\nimport JfEnum from \"./JfEnum.vue\";\nimport JfEnumArray from \"./JfEnumArray.vue\";\nimport JfBoolean from \"./JfBoolean.vue\";\n\n// Auto-inject layout styles\nconst injectLayoutStyles = () => {\n if (typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n if (!document.getElementById(\"jsonforms-primevue-styles\")) {\n const style = document.createElement(\"style\");\n style.id = \"jsonforms-primevue-styles\";\n style.textContent = `\n/* JSONForms PrimeVue Provider Protocols Layout Styles */\n.vertical-layout {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/vue/primevue/index.ts"],"sourcesContent":["import JfText from \"./JfText.vue\";\nimport JfTextArea from \"./JfTextArea.vue\";\nimport JfNumber from \"./JfNumber.vue\";\nimport JfEnum from \"./JfEnum.vue\";\nimport JfEnumArray from \"./JfEnumArray.vue\";\nimport JfBoolean from \"./JfBoolean.vue\";\n\n// Auto-inject layout styles\nconst injectLayoutStyles = () => {\n if (typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n if (!document.getElementById(\"jsonforms-primevue-styles\")) {\n const style = document.createElement(\"style\");\n style.id = \"jsonforms-primevue-styles\";\n style.textContent = `\n/* JSONForms PrimeVue Provider Protocols Layout Styles */\n.vertical-layout {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 24px;\n width: 100%;\n}\n\n.vertical-layout-item {\n width: 100%;\n}\n\n/* Form control wrapper */\n.jf-control {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n/* Form control label typography */\n.jf-label {\n font-weight: 600;\n font-size: 14px;\n line-height: 14px;\n color: #031553;\n text-align: left;\n}\n\n/* Form control description typography */\n.jf-description {\n font-weight: 400;\n font-size: 14px;\n line-height: 14px;\n color: #415290;\n text-align: left;\n}\n `;\n document.head.appendChild(style);\n }\n }\n};\n\n// Inject styles when this module is imported\ninjectLayoutStyles();\n\n// Track whether renderers have been registered to avoid duplicate registrations\nlet renderersInitialized = false;\n\n// Return empty renderers array initially\nexport const primevueRenderers: unknown[] = [];\n\n// Export a function that can be called by the consumer to register renderers\n// This should only be called once during application initialization\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function registerPrimevueRenderers(jsonformsCore: any): unknown[] {\n // Prevent duplicate registration which causes AJV schema recompilation\n if (renderersInitialized) {\n return primevueRenderers as unknown[];\n }\n\n const {\n rankWith,\n isStringControl,\n isNumberControl,\n isIntegerControl,\n and,\n isControl,\n schemaMatches,\n isBooleanControl,\n } = jsonformsCore;\n\n // Give PrimeVue renderers a high base rank; vanilla commonly uses small ranks (2–5)\n const PRIME = 100;\n\n // helpers for enum detection - using simple schema checks instead of JSONForms internal functions\n const isScalarEnum = (s?: object) => {\n const schema = s as {\n type?: string;\n enum?: unknown[];\n oneOf?: unknown[];\n };\n return (\n schema &&\n schema.type !== \"array\" &&\n (Array.isArray(schema.enum) || Array.isArray(schema.oneOf))\n );\n };\n\n const isEnumArray = (s?: object) => {\n const schema = s as {\n type?: string;\n items?: { enum?: unknown[]; oneOf?: unknown[] };\n };\n return (\n schema?.type === \"array\" &&\n (Array.isArray(schema.items?.enum) || Array.isArray(schema.items?.oneOf))\n );\n };\n\n // helper for multiline detection\n const isMultilineString = (uischema: unknown, schema: unknown) => {\n const controlUischema = uischema as { options?: { multi?: boolean } };\n return and(isStringControl, () => controlUischema?.options?.multi === true)(\n uischema as Parameters<typeof isStringControl>[0],\n schema as Parameters<typeof isStringControl>[1],\n {} as Parameters<typeof isStringControl>[2],\n );\n };\n\n const renderers = [\n // Multiline text has higher priority than regular text\n { tester: rankWith(PRIME + 4, isMultilineString), renderer: JfTextArea },\n { tester: rankWith(PRIME + 3, isStringControl), renderer: JfText },\n {\n tester: rankWith(PRIME + 6, isIntegerControl),\n renderer: JfNumber,\n },\n {\n tester: rankWith(PRIME + 4, isNumberControl),\n renderer: JfNumber,\n },\n {\n tester: rankWith(PRIME + 7, and(isControl, schemaMatches(isScalarEnum))),\n renderer: JfEnum,\n },\n {\n tester: rankWith(PRIME + 8, and(isControl, schemaMatches(isEnumArray))),\n renderer: JfEnumArray,\n },\n { tester: rankWith(PRIME + 3, isBooleanControl), renderer: JfBoolean },\n ];\n\n // Update the exported array\n primevueRenderers.splice(0, primevueRenderers.length, ...renderers);\n\n // Mark as initialized to prevent duplicate registrations\n renderersInitialized = true;\n\n return renderers;\n}\n\nexport { JfText, JfTextArea, JfNumber, JfEnum, JfEnumArray, JfBoolean };\n"],"names":["JfTextArea","JfText","JfNumber","JfEnum","JfEnumArray","JfBoolean"],"mappings":";;;;;;AAQA,MAAM,qBAAqB,MAAM;AAC/B,MAAI,OAAO,WAAW,eAAe,OAAO,aAAa,aAAa;AACpE,QAAI,CAAC,SAAS,eAAe,2BAA2B,GAAG;AACzD,YAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,YAAM,KA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AAUC,YAAA;AAAA,IAC1D;AAAA,MACE,QAAQ,SAAS,QAAQ,GAAG,gBAAgB;AAAA,MAC5C,UAAUC;AAAAA,IAAA;AAAA,IAEZ;AAAA,MACE,QAAQ,SAAS,QAAQ,GAAG,eAAe;AAAA,MAC3C,UAAUA;AAAAA,IAAA;AAAA,IAEZ;AAAA,MACE,QAAQ,SAAS,QAAQ,GAAG,IAAI,WAAW,cAAc,YAAY,CAAC,CAAC;AAAA,MACvE,UAAUC;AAAAA,IAAA;AAAA,IAEZ;AAAA,MACE,QAAQ,SAAS,QAAQ,GAAG,IAAI,WAAW,cAAc,WAAW,CAAC,CAAC;AAAA,MACtE,UAAUC;AAAAA,IAAA;AAAA,IAEZ,EAAE,QAAQ,SAAS,QAAQ,GAAG,gBAAgB,GAAG,UAAUC,YAAA;AAAA,EAAU;AAIvE,oBAAkB,OAAO,GAAG,kBAAkB,QAAQ,GAAG,SAAS;AAGlE,yBAAuB;AAEvB,SAAO;AACT;"}
|
|
@@ -6,14 +6,31 @@ export interface AutoSelectParams {
|
|
|
6
6
|
currentValue: unknown;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Determines if auto-select should trigger
|
|
9
|
+
* Determines if auto-select should trigger for single-select dropdowns.
|
|
10
10
|
* Returns null if auto-select should not trigger.
|
|
11
11
|
*
|
|
12
12
|
* Auto-select triggers when:
|
|
13
|
-
* - autoSelectSingle option is enabled
|
|
13
|
+
* - autoSelectSingle option is enabled (default: true for single-select)
|
|
14
14
|
* - Provider has finished loading
|
|
15
15
|
* - Exactly one item is available
|
|
16
16
|
* - Current value is empty (undefined/null) OR not in the current options
|
|
17
17
|
*/
|
|
18
18
|
export declare function shouldAutoSelect(params: AutoSelectParams): unknown | null;
|
|
19
|
+
export interface AutoSelectMultiParams {
|
|
20
|
+
autoSelectSingle: boolean;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
items: ProviderItem[];
|
|
23
|
+
currentValue: unknown[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Determines if auto-select should trigger for multiselect dropdowns.
|
|
27
|
+
* Returns null if auto-select should not trigger, otherwise returns an array with the single value.
|
|
28
|
+
*
|
|
29
|
+
* Auto-select triggers when:
|
|
30
|
+
* - autoSelectSingle option is explicitly enabled (default: false for multiselect)
|
|
31
|
+
* - Provider has finished loading
|
|
32
|
+
* - Exactly one item is available
|
|
33
|
+
* - Current value is empty array OR current selection is not in the current options
|
|
34
|
+
*/
|
|
35
|
+
export declare function shouldAutoSelectMulti(params: AutoSelectMultiParams): unknown[] | null;
|
|
19
36
|
//# sourceMappingURL=autoSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoSelect.d.ts","sourceRoot":"","sources":["../../../src/vue/utils/autoSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,GAAG,IAAI,CAoBzE"}
|
|
1
|
+
{"version":3,"file":"autoSelect.d.ts","sourceRoot":"","sources":["../../../src/vue/utils/autoSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,GAAG,IAAI,CAoBzE;AAED,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,EAAE,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,EAAE,GAAG,IAAI,CAuBlB"}
|
|
@@ -14,7 +14,27 @@ function shouldAutoSelect(params) {
|
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
|
+
function shouldAutoSelectMulti(params) {
|
|
18
|
+
const { autoSelectSingle, isLoading, items, currentValue } = params;
|
|
19
|
+
if (!autoSelectSingle || isLoading || items.length !== 1) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const singleItem = items[0];
|
|
23
|
+
if (!singleItem) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const currentArray = Array.isArray(currentValue) ? currentValue : [];
|
|
27
|
+
const isValueEmpty = currentArray.length === 0;
|
|
28
|
+
const hasValidSelection = currentArray.some(
|
|
29
|
+
(val) => items.some((item) => item.value === val)
|
|
30
|
+
);
|
|
31
|
+
if (isValueEmpty || !hasValidSelection) {
|
|
32
|
+
return [singleItem.value];
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
17
36
|
export {
|
|
18
|
-
shouldAutoSelect
|
|
37
|
+
shouldAutoSelect,
|
|
38
|
+
shouldAutoSelectMulti
|
|
19
39
|
};
|
|
20
40
|
//# sourceMappingURL=autoSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoSelect.js","sources":["../../../src/vue/utils/autoSelect.ts"],"sourcesContent":["import type { ProviderItem } from \"../../core/types\";\n\nexport interface AutoSelectParams {\n autoSelectSingle: boolean;\n isLoading: boolean;\n items: ProviderItem[];\n currentValue: unknown;\n}\n\n/**\n * Determines if auto-select should trigger
|
|
1
|
+
{"version":3,"file":"autoSelect.js","sources":["../../../src/vue/utils/autoSelect.ts"],"sourcesContent":["import type { ProviderItem } from \"../../core/types\";\n\nexport interface AutoSelectParams {\n autoSelectSingle: boolean;\n isLoading: boolean;\n items: ProviderItem[];\n currentValue: unknown;\n}\n\n/**\n * Determines if auto-select should trigger for single-select dropdowns.\n * Returns null if auto-select should not trigger.\n *\n * Auto-select triggers when:\n * - autoSelectSingle option is enabled (default: true for single-select)\n * - Provider has finished loading\n * - Exactly one item is available\n * - Current value is empty (undefined/null) OR not in the current options\n */\nexport function shouldAutoSelect(params: AutoSelectParams): unknown | null {\n const { autoSelectSingle, isLoading, items, currentValue } = params;\n\n if (!autoSelectSingle || isLoading || items.length !== 1) {\n return null;\n }\n\n const singleItem = items[0];\n if (!singleItem) {\n return null;\n }\n\n const isValueEmpty = currentValue === undefined || currentValue === null;\n const isValueInOptions = items.some((item) => item.value === currentValue);\n\n if (isValueEmpty || !isValueInOptions) {\n return singleItem.value;\n }\n\n return null;\n}\n\nexport interface AutoSelectMultiParams {\n autoSelectSingle: boolean;\n isLoading: boolean;\n items: ProviderItem[];\n currentValue: unknown[];\n}\n\n/**\n * Determines if auto-select should trigger for multiselect dropdowns.\n * Returns null if auto-select should not trigger, otherwise returns an array with the single value.\n *\n * Auto-select triggers when:\n * - autoSelectSingle option is explicitly enabled (default: false for multiselect)\n * - Provider has finished loading\n * - Exactly one item is available\n * - Current value is empty array OR current selection is not in the current options\n */\nexport function shouldAutoSelectMulti(\n params: AutoSelectMultiParams\n): unknown[] | null {\n const { autoSelectSingle, isLoading, items, currentValue } = params;\n\n if (!autoSelectSingle || isLoading || items.length !== 1) {\n return null;\n }\n\n const singleItem = items[0];\n if (!singleItem) {\n return null;\n }\n\n const currentArray = Array.isArray(currentValue) ? currentValue : [];\n const isValueEmpty = currentArray.length === 0;\n const hasValidSelection = currentArray.some((val) =>\n items.some((item) => item.value === val)\n );\n\n if (isValueEmpty || !hasValidSelection) {\n return [singleItem.value];\n }\n\n return null;\n}\n"],"names":[],"mappings":"AAmBO,SAAS,iBAAiB,QAA0C;AACzE,QAAM,EAAE,kBAAkB,WAAW,OAAO,iBAAiB;AAE7D,MAAI,CAAC,oBAAoB,aAAa,MAAM,WAAW,GAAG;AACxD,WAAO;AAAA,EACT;AAEA,QAAM,aAAa,MAAM,CAAC;AAC1B,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,iBAAiB,UAAa,iBAAiB;AACpE,QAAM,mBAAmB,MAAM,KAAK,CAAC,SAAS,KAAK,UAAU,YAAY;AAEzE,MAAI,gBAAgB,CAAC,kBAAkB;AACrC,WAAO,WAAW;AAAA,EACpB;AAEA,SAAO;AACT;AAmBO,SAAS,sBACd,QACkB;AAClB,QAAM,EAAE,kBAAkB,WAAW,OAAO,iBAAiB;AAE7D,MAAI,CAAC,oBAAoB,aAAa,MAAM,WAAW,GAAG;AACxD,WAAO;AAAA,EACT;AAEA,QAAM,aAAa,MAAM,CAAC;AAC1B,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,MAAM,QAAQ,YAAY,IAAI,eAAe,CAAA;AAClE,QAAM,eAAe,aAAa,WAAW;AAC7C,QAAM,oBAAoB,aAAa;AAAA,IAAK,CAAC,QAC3C,MAAM,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG;AAAA,EAAA;AAGzC,MAAI,gBAAgB,CAAC,mBAAmB;AACtC,WAAO,CAAC,WAAW,KAAK;AAAA,EAC1B;AAEA,SAAO;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/jsonforms-provider-protocols",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0-beta.0",
|
|
4
4
|
"description": "Dynamic data provider capabilities for JSONForms with Vue 3 integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Narrative I/O",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"build:lib": "vite build",
|
|
59
59
|
"build:types": "vue-tsc -p tsconfig.build.json --declaration --emitDeclarationOnly",
|
|
60
60
|
"build:clean": "rm -rf dist",
|
|
61
|
+
"dev": "vite build --watch",
|
|
61
62
|
"prepare": "bun-git-hooks",
|
|
62
63
|
"prepublishOnly": "bun run build",
|
|
63
64
|
"test": "bun test",
|
|
@@ -65,13 +66,16 @@
|
|
|
65
66
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
|
66
67
|
"lint:check": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
|
|
67
68
|
"format": "prettier --write src/",
|
|
69
|
+
"check:built": "node scripts/ensureBuild.js",
|
|
70
|
+
"link:global": "bun run build && bun run check:built && bun link",
|
|
71
|
+
"pack:dist": "bun run build && bun run check:built && bun pm pack",
|
|
68
72
|
"demo": "cd demo && npm start",
|
|
69
73
|
"demo:install": "cd demo && npm install",
|
|
70
74
|
"demo:dev": "cd demo && npm run dev",
|
|
71
75
|
"demo:api": "cd demo && npm run api"
|
|
72
76
|
},
|
|
73
77
|
"devDependencies": {
|
|
74
|
-
"@commitlint/config-conventional": "^
|
|
78
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
75
79
|
"@eslint/js": "^9.34.0",
|
|
76
80
|
"@jsonforms/core": "^3.6.0",
|
|
77
81
|
"@jsonforms/vue": "^3.6.0",
|
|
@@ -81,7 +85,7 @@
|
|
|
81
85
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
82
86
|
"@vue/runtime-core": "^3.5.20",
|
|
83
87
|
"bun-git-hooks": "^0.2.19",
|
|
84
|
-
"commitlint": "^
|
|
88
|
+
"commitlint": "^20.0.0",
|
|
85
89
|
"eslint": "^9.34.0",
|
|
86
90
|
"eslint-config-prettier": "^10.1.8",
|
|
87
91
|
"eslint-plugin-vue": "^10.4.0",
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { cache as globalCache } from "./core/cache";
|
|
|
3
3
|
import { registry as globalRegistry } from "./core/registry";
|
|
4
4
|
import type { Protocol, AuthConfig } from "./core/types";
|
|
5
5
|
|
|
6
|
+
console.log("[jsonforms-provider-protocols] loaded v2.10.0");
|
|
7
|
+
|
|
6
8
|
export { cache } from "./core/cache";
|
|
7
9
|
export * from "./core/jsonpath";
|
|
8
10
|
export { registry } from "./core/registry";
|
|
@@ -51,11 +51,11 @@ const onSelect = (event: { value?: { value?: unknown } | unknown }) => {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<template>
|
|
54
|
-
<div class="
|
|
55
|
-
<label v-if="control.schema.title" class="
|
|
54
|
+
<div class="jf-control">
|
|
55
|
+
<label v-if="control.schema.title" class="jf-label">{{
|
|
56
56
|
control.schema.title
|
|
57
57
|
}}</label>
|
|
58
|
-
<div v-if="control.description" class="
|
|
58
|
+
<div v-if="control.description" class="jf-description">
|
|
59
59
|
{{ control.description }}
|
|
60
60
|
</div>
|
|
61
61
|
<AutoComplete
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ControlElement, JsonSchema } from "@jsonforms/core";
|
|
3
3
|
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
4
|
-
import { computed, inject } from "vue";
|
|
4
|
+
import { computed, inject, watch } from "vue";
|
|
5
5
|
import { useProvider } from "../composables/useProvider";
|
|
6
|
+
import { shouldAutoSelectMulti } from "../utils/autoSelect";
|
|
6
7
|
import MultiSelect from "primevue/multiselect";
|
|
7
8
|
|
|
8
9
|
const props = defineProps<{
|
|
@@ -43,6 +44,25 @@ const { items, loading, error } = useProvider(binding, {
|
|
|
43
44
|
|
|
44
45
|
// Provider will automatically reload when rootData changes due to reactive cache key
|
|
45
46
|
|
|
47
|
+
// Auto-select when provider returns only one item (opt-in for multiselect)
|
|
48
|
+
watch(
|
|
49
|
+
[items, loading],
|
|
50
|
+
([newItems, isLoading]) => {
|
|
51
|
+
const valueToSelect = shouldAutoSelectMulti({
|
|
52
|
+
autoSelectSingle:
|
|
53
|
+
control.value.uischema?.options?.autoSelectSingle === true,
|
|
54
|
+
isLoading,
|
|
55
|
+
items: newItems,
|
|
56
|
+
currentValue: Array.isArray(control.value.data) ? control.value.data : [],
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
if (valueToSelect !== null) {
|
|
60
|
+
handleChange(control.value.path, valueToSelect);
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{ immediate: true }
|
|
64
|
+
);
|
|
65
|
+
|
|
46
66
|
// order-insensitive shallow equality for primitive arrays
|
|
47
67
|
const sameSet = (a: unknown[], b: unknown[]) => {
|
|
48
68
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length)
|
|
@@ -76,11 +96,11 @@ const placeholder = computed(() => {
|
|
|
76
96
|
</script>
|
|
77
97
|
|
|
78
98
|
<template>
|
|
79
|
-
<div class="
|
|
80
|
-
<label v-if="control.schema.title" class="
|
|
99
|
+
<div class="jf-control">
|
|
100
|
+
<label v-if="control.schema.title" class="jf-label">{{
|
|
81
101
|
control.schema.title
|
|
82
102
|
}}</label>
|
|
83
|
-
<div v-if="control.description" class="
|
|
103
|
+
<div v-if="control.description" class="jf-description">
|
|
84
104
|
{{ control.description }}
|
|
85
105
|
</div>
|
|
86
106
|
<MultiSelect
|
|
@@ -79,11 +79,11 @@ const placeholder = computed(() => {
|
|
|
79
79
|
</script>
|
|
80
80
|
|
|
81
81
|
<template>
|
|
82
|
-
<div class="
|
|
83
|
-
<label v-if="control.schema.title" class="
|
|
82
|
+
<div class="jf-control">
|
|
83
|
+
<label v-if="control.schema.title" class="jf-label">{{
|
|
84
84
|
control.schema.title
|
|
85
85
|
}}</label>
|
|
86
|
-
<div v-if="control.description" class="
|
|
86
|
+
<div v-if="control.description" class="jf-description">
|
|
87
87
|
{{ control.description }}
|
|
88
88
|
</div>
|
|
89
89
|
<Dropdown
|
|
@@ -49,7 +49,7 @@ const onToggle = (val: boolean) => handleChange(control.value.path, val);
|
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<template>
|
|
52
|
-
<div class="flex items
|
|
52
|
+
<div class="jf-control" style="flex-direction: row; align-items: center">
|
|
53
53
|
<Checkbox
|
|
54
54
|
:binary="true"
|
|
55
55
|
:model-value="!!control.data"
|
|
@@ -57,7 +57,7 @@ const onToggle = (val: boolean) => handleChange(control.value.path, val);
|
|
|
57
57
|
:aria-invalid="!!control.errors || undefined"
|
|
58
58
|
@update:model-value="onToggle"
|
|
59
59
|
/>
|
|
60
|
-
<label v-if="control.label">{{ control.label }}</label>
|
|
60
|
+
<label v-if="control.label" class="jf-label">{{ control.label }}</label>
|
|
61
61
|
<small v-if="control.errors" class="p-error">{{ control.errors }}</small>
|
|
62
62
|
</div>
|
|
63
63
|
</template>
|
|
@@ -170,11 +170,11 @@ const onBlur = () => {
|
|
|
170
170
|
</script>
|
|
171
171
|
|
|
172
172
|
<template>
|
|
173
|
-
<div class="
|
|
174
|
-
<label v-if="control.label" class="
|
|
173
|
+
<div class="jf-control">
|
|
174
|
+
<label v-if="control.label" class="jf-label">{{
|
|
175
175
|
control.label
|
|
176
176
|
}}</label>
|
|
177
|
-
<div v-if="control.description" class="
|
|
177
|
+
<div v-if="control.description" class="jf-description">
|
|
178
178
|
{{ control.description }}
|
|
179
179
|
</div>
|
|
180
180
|
<Dropdown
|
|
@@ -38,9 +38,10 @@ export default {
|
|
|
38
38
|
import type { JsonSchema } from "@jsonforms/core";
|
|
39
39
|
import type { ControlProps } from "@jsonforms/vue";
|
|
40
40
|
import { useJsonFormsControl } from "@jsonforms/vue";
|
|
41
|
-
import { computed, inject, getCurrentInstance } from "vue";
|
|
41
|
+
import { computed, inject, getCurrentInstance, watch } from "vue";
|
|
42
42
|
import { useProvider } from "../composables/useProvider";
|
|
43
43
|
import { useDerive } from "../composables/useDerive";
|
|
44
|
+
import { shouldAutoSelectMulti } from "../utils/autoSelect";
|
|
44
45
|
import MultiSelect from "primevue/multiselect";
|
|
45
46
|
|
|
46
47
|
// Access props from the component instance
|
|
@@ -126,6 +127,25 @@ const options = computed(() => {
|
|
|
126
127
|
// Add derive functionality
|
|
127
128
|
useDerive({ control, handleChange });
|
|
128
129
|
|
|
130
|
+
// Auto-select when provider returns only one item (opt-in for multiselect)
|
|
131
|
+
watch(
|
|
132
|
+
[providerItems, loading],
|
|
133
|
+
([items, isLoading]) => {
|
|
134
|
+
const valueToSelect = shouldAutoSelectMulti({
|
|
135
|
+
autoSelectSingle:
|
|
136
|
+
control.value.uischema?.options?.autoSelectSingle === true,
|
|
137
|
+
isLoading,
|
|
138
|
+
items,
|
|
139
|
+
currentValue: Array.isArray(control.value.data) ? control.value.data : [],
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
if (valueToSelect !== null) {
|
|
143
|
+
handleChange(control.value.path, valueToSelect);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{ immediate: true }
|
|
147
|
+
);
|
|
148
|
+
|
|
129
149
|
const placeholder = computed<string | undefined>(() => {
|
|
130
150
|
if (loading.value) return "Loading…";
|
|
131
151
|
return (
|
|
@@ -158,11 +178,11 @@ const model = computed<unknown[]>({
|
|
|
158
178
|
</script>
|
|
159
179
|
|
|
160
180
|
<template>
|
|
161
|
-
<div class="
|
|
162
|
-
<label v-if="control.label" class="
|
|
181
|
+
<div class="jf-control">
|
|
182
|
+
<label v-if="control.label" class="jf-label">{{
|
|
163
183
|
control.label
|
|
164
184
|
}}</label>
|
|
165
|
-
<div v-if="control.description" class="
|
|
185
|
+
<div v-if="control.description" class="jf-description">
|
|
166
186
|
{{ control.description }}
|
|
167
187
|
</div>
|
|
168
188
|
|
|
@@ -110,11 +110,11 @@ const onBlur = () => {
|
|
|
110
110
|
</script>
|
|
111
111
|
|
|
112
112
|
<template>
|
|
113
|
-
<div class="
|
|
114
|
-
<label v-if="control.label" class="
|
|
113
|
+
<div class="jf-control">
|
|
114
|
+
<label v-if="control.label" class="jf-label">{{
|
|
115
115
|
control.label
|
|
116
116
|
}}</label>
|
|
117
|
-
<div v-if="control.description" class="
|
|
117
|
+
<div v-if="control.description" class="jf-description">
|
|
118
118
|
{{ control.description }}
|
|
119
119
|
</div>
|
|
120
120
|
<InputNumber
|
|
@@ -148,11 +148,11 @@ const onSelect = (event: { value?: { value?: unknown } | unknown }) => {
|
|
|
148
148
|
</script>
|
|
149
149
|
|
|
150
150
|
<template>
|
|
151
|
-
<div class="
|
|
152
|
-
<label v-if="control.label" class="
|
|
151
|
+
<div class="jf-control">
|
|
152
|
+
<label v-if="control.label" class="jf-label">{{
|
|
153
153
|
control.label
|
|
154
154
|
}}</label>
|
|
155
|
-
<div v-if="control.description" class="
|
|
155
|
+
<div v-if="control.description" class="jf-description">
|
|
156
156
|
{{ control.description }}
|
|
157
157
|
</div>
|
|
158
158
|
<AutoComplete
|
|
@@ -70,11 +70,11 @@ function onBlur() {
|
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
|
-
<div class="
|
|
74
|
-
<label v-if="control.label" class="
|
|
73
|
+
<div class="jf-control">
|
|
74
|
+
<label v-if="control.label" class="jf-label">{{
|
|
75
75
|
control.label
|
|
76
76
|
}}</label>
|
|
77
|
-
<div v-if="control.description" class="
|
|
77
|
+
<div v-if="control.description" class="jf-description">
|
|
78
78
|
{{ control.description }}
|
|
79
79
|
</div>
|
|
80
80
|
<Textarea
|
|
@@ -17,13 +17,38 @@ const injectLayoutStyles = () => {
|
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: flex-start;
|
|
20
|
-
gap:
|
|
20
|
+
gap: 24px;
|
|
21
21
|
width: 100%;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.vertical-layout-item {
|
|
25
25
|
width: 100%;
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
/* Form control wrapper */
|
|
29
|
+
.jf-control {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Form control label typography */
|
|
36
|
+
.jf-label {
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
line-height: 14px;
|
|
40
|
+
color: #031553;
|
|
41
|
+
text-align: left;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Form control description typography */
|
|
45
|
+
.jf-description {
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
line-height: 14px;
|
|
49
|
+
color: #415290;
|
|
50
|
+
text-align: left;
|
|
51
|
+
}
|
|
27
52
|
`;
|
|
28
53
|
document.head.appendChild(style);
|
|
29
54
|
}
|
package/src/vue/styles.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: flex-start;
|
|
8
|
-
gap:
|
|
8
|
+
gap: 24px;
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -14,6 +14,31 @@
|
|
|
14
14
|
width: 100%;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/* Form control wrapper */
|
|
18
|
+
.jf-control {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 12px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Form control label typography */
|
|
25
|
+
.jf-label {
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
line-height: 14px;
|
|
29
|
+
color: #031553;
|
|
30
|
+
text-align: left;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Form control description typography */
|
|
34
|
+
.jf-description {
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
line-height: 14px;
|
|
38
|
+
color: #415290;
|
|
39
|
+
text-align: left;
|
|
40
|
+
}
|
|
41
|
+
|
|
17
42
|
/* PrimeVue dropdown text alignment fix */
|
|
18
43
|
.p-dropdown-label {
|
|
19
44
|
text-align: left !important;
|