@aziontech/webkit 0.0.1 → 0.0.3
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/package.json +28 -4
- package/src/core/{field-checkbox-block → form/field-checkbox-block}/field-checkbox-block.vue +1 -1
- package/src/core/{field-dropdown-lazy-loader → form/field-dropdown-lazy-loader}/field-dropdown-lazy-loader.vue +151 -134
- package/src/core/{field-dropdown-multi-select-lazy-loader → form/field-dropdown-multi-select-lazy-loader}/field-dropdown-multi-select-lazy-loader.vue +105 -95
- package/src/core/{field-radio-block → form/field-radio-block}/field-radio-block.vue +1 -1
- package/src/core/{field-switch-block → form/field-switch-block}/field-switch-block.vue +1 -1
- /package/src/core/{field-auto-complete → form/field-auto-complete}/field-auto-complete.vue +0 -0
- /package/src/core/{field-auto-complete → form/field-auto-complete}/field-auto-complete.vue.d.ts +0 -0
- /package/src/core/{field-auto-complete → form/field-auto-complete}/field-auto-complete.vue.d.ts.map +0 -0
- /package/src/core/{field-auto-complete → form/field-auto-complete}/package.json +0 -0
- /package/src/core/{field-checkbox-block → form/field-checkbox-block}/field-checkbox-block.vue.d.ts +0 -0
- /package/src/core/{field-checkbox-block → form/field-checkbox-block}/field-checkbox-block.vue.d.ts.map +0 -0
- /package/src/core/{field-checkbox-block → form/field-checkbox-block}/package.json +0 -0
- /package/src/core/{field-dropdown → form/field-dropdown}/field-dropdown.vue +0 -0
- /package/src/core/{field-dropdown → form/field-dropdown}/field-dropdown.vue.d.ts +0 -0
- /package/src/core/{field-dropdown → form/field-dropdown}/field-dropdown.vue.d.ts.map +0 -0
- /package/src/core/{field-dropdown → form/field-dropdown}/package.json +0 -0
- /package/src/core/{field-dropdown-icon → form/field-dropdown-icon}/field-dropdown-icon.vue +0 -0
- /package/src/core/{field-dropdown-icon → form/field-dropdown-icon}/field-dropdown-icon.vue.d.ts +0 -0
- /package/src/core/{field-dropdown-icon → form/field-dropdown-icon}/field-dropdown-icon.vue.d.ts.map +0 -0
- /package/src/core/{field-dropdown-icon → form/field-dropdown-icon}/package.json +0 -0
- /package/src/core/{field-dropdown-lazy-loader → form/field-dropdown-lazy-loader}/field-dropdown-lazy-loader.vue.d.ts +0 -0
- /package/src/core/{field-dropdown-lazy-loader → form/field-dropdown-lazy-loader}/field-dropdown-lazy-loader.vue.d.ts.map +0 -0
- /package/src/core/{field-dropdown-lazy-loader → form/field-dropdown-lazy-loader}/package.json +0 -0
- /package/src/core/{field-dropdown-lazy-loader-dynamic → form/field-dropdown-lazy-loader-dynamic}/field-dropdown-lazy-loader-dynamic.vue +0 -0
- /package/src/core/{field-dropdown-lazy-loader-dynamic → form/field-dropdown-lazy-loader-dynamic}/field-dropdown-lazy-loader-dynamic.vue.d.ts +0 -0
- /package/src/core/{field-dropdown-lazy-loader-dynamic → form/field-dropdown-lazy-loader-dynamic}/field-dropdown-lazy-loader-dynamic.vue.d.ts.map +0 -0
- /package/src/core/{field-dropdown-lazy-loader-dynamic → form/field-dropdown-lazy-loader-dynamic}/package.json +0 -0
- /package/src/core/{field-dropdown-lazy-loader-with-filter → form/field-dropdown-lazy-loader-with-filter}/field-dropdown-lazy-loader-with-filter.vue +0 -0
- /package/src/core/{field-dropdown-lazy-loader-with-filter → form/field-dropdown-lazy-loader-with-filter}/field-dropdown-lazy-loader-with-filter.vue.d.ts +0 -0
- /package/src/core/{field-dropdown-lazy-loader-with-filter → form/field-dropdown-lazy-loader-with-filter}/field-dropdown-lazy-loader-with-filter.vue.d.ts.map +0 -0
- /package/src/core/{field-dropdown-lazy-loader-with-filter → form/field-dropdown-lazy-loader-with-filter}/package.json +0 -0
- /package/src/core/{field-dropdown-multi-select-lazy-loader → form/field-dropdown-multi-select-lazy-loader}/field-dropdown-multi-select-lazy-loader.vue.d.ts +0 -0
- /package/src/core/{field-dropdown-multi-select-lazy-loader → form/field-dropdown-multi-select-lazy-loader}/field-dropdown-multi-select-lazy-loader.vue.d.ts.map +0 -0
- /package/src/core/{field-dropdown-multi-select-lazy-loader → form/field-dropdown-multi-select-lazy-loader}/package.json +0 -0
- /package/src/core/{field-group-checkbox → form/field-group-checkbox}/field-group-checkbox.vue +0 -0
- /package/src/core/{field-group-checkbox → form/field-group-checkbox}/field-group-checkbox.vue.d.ts +0 -0
- /package/src/core/{field-group-checkbox → form/field-group-checkbox}/field-group-checkbox.vue.d.ts.map +0 -0
- /package/src/core/{field-group-checkbox → form/field-group-checkbox}/package.json +0 -0
- /package/src/core/{field-group-radio → form/field-group-radio}/field-group-radio.vue +0 -0
- /package/src/core/{field-group-radio → form/field-group-radio}/field-group-radio.vue.d.ts +0 -0
- /package/src/core/{field-group-radio → form/field-group-radio}/field-group-radio.vue.d.ts.map +0 -0
- /package/src/core/{field-group-radio → form/field-group-radio}/package.json +0 -0
- /package/src/core/{field-group-switch → form/field-group-switch}/field-group-switch.vue +0 -0
- /package/src/core/{field-group-switch → form/field-group-switch}/field-group-switch.vue.d.ts +0 -0
- /package/src/core/{field-group-switch → form/field-group-switch}/field-group-switch.vue.d.ts.map +0 -0
- /package/src/core/{field-group-switch → form/field-group-switch}/package.json +0 -0
- /package/src/core/{field-input-group → form/field-input-group}/field-input-group.vue +0 -0
- /package/src/core/{field-input-group → form/field-input-group}/field-input-group.vue.d.ts +0 -0
- /package/src/core/{field-input-group → form/field-input-group}/field-input-group.vue.d.ts.map +0 -0
- /package/src/core/{field-input-group → form/field-input-group}/package.json +0 -0
- /package/src/core/{field-multi-select → form/field-multi-select}/field-multi-select.vue +0 -0
- /package/src/core/{field-multi-select → form/field-multi-select}/field-multi-select.vue.d.ts +0 -0
- /package/src/core/{field-multi-select → form/field-multi-select}/field-multi-select.vue.d.ts.map +0 -0
- /package/src/core/{field-multi-select → form/field-multi-select}/package.json +0 -0
- /package/src/core/{field-number → form/field-number}/field-number.vue +0 -0
- /package/src/core/{field-number → form/field-number}/field-number.vue.d.ts +0 -0
- /package/src/core/{field-number → form/field-number}/field-number.vue.d.ts.map +0 -0
- /package/src/core/{field-number → form/field-number}/package.json +0 -0
- /package/src/core/{field-phone-number → form/field-phone-number}/field-phone-number.vue +0 -0
- /package/src/core/{field-phone-number → form/field-phone-number}/field-phone-number.vue.d.ts +0 -0
- /package/src/core/{field-phone-number → form/field-phone-number}/field-phone-number.vue.d.ts.map +0 -0
- /package/src/core/{field-phone-number → form/field-phone-number}/package.json +0 -0
- /package/src/core/{field-phone-number-country → form/field-phone-number-country}/field-phone-number-country.vue +0 -0
- /package/src/core/{field-phone-number-country → form/field-phone-number-country}/field-phone-number-country.vue.d.ts +0 -0
- /package/src/core/{field-phone-number-country → form/field-phone-number-country}/field-phone-number-country.vue.d.ts.map +0 -0
- /package/src/core/{field-phone-number-country → form/field-phone-number-country}/package.json +0 -0
- /package/src/core/{field-pick-list → form/field-pick-list}/field-pick-list.vue +0 -0
- /package/src/core/{field-pick-list → form/field-pick-list}/field-pick-list.vue.d.ts +0 -0
- /package/src/core/{field-pick-list → form/field-pick-list}/field-pick-list.vue.d.ts.map +0 -0
- /package/src/core/{field-pick-list → form/field-pick-list}/package.json +0 -0
- /package/src/core/{field-radio-block → form/field-radio-block}/field-radio-block.vue.d.ts +0 -0
- /package/src/core/{field-radio-block → form/field-radio-block}/field-radio-block.vue.d.ts.map +0 -0
- /package/src/core/{field-radio-block → form/field-radio-block}/package.json +0 -0
- /package/src/core/{field-switch → form/field-switch}/field-switch.vue +0 -0
- /package/src/core/{field-switch → form/field-switch}/field-switch.vue.d.ts +0 -0
- /package/src/core/{field-switch → form/field-switch}/field-switch.vue.d.ts.map +0 -0
- /package/src/core/{field-switch → form/field-switch}/package.json +0 -0
- /package/src/core/{field-switch-block → form/field-switch-block}/field-switch-block.vue.d.ts +0 -0
- /package/src/core/{field-switch-block → form/field-switch-block}/field-switch-block.vue.d.ts.map +0 -0
- /package/src/core/{field-switch-block → form/field-switch-block}/package.json +0 -0
- /package/src/core/{field-text → form/field-text}/field-text.vue +0 -0
- /package/src/core/{field-text → form/field-text}/field-text.vue.d.ts +0 -0
- /package/src/core/{field-text → form/field-text}/field-text.vue.d.ts.map +0 -0
- /package/src/core/{field-text → form/field-text}/package.json +0 -0
- /package/src/core/{field-text-area → form/field-text-area}/field-text-area.vue +0 -0
- /package/src/core/{field-text-area → form/field-text-area}/field-text-area.vue.d.ts +0 -0
- /package/src/core/{field-text-area → form/field-text-area}/field-text-area.vue.d.ts.map +0 -0
- /package/src/core/{field-text-area → form/field-text-area}/package.json +0 -0
- /package/src/core/{field-text-icon → form/field-text-icon}/field-text-icon.vue +0 -0
- /package/src/core/{field-text-icon → form/field-text-icon}/field-text-icon.vue.d.ts +0 -0
- /package/src/core/{field-text-icon → form/field-text-icon}/field-text-icon.vue.d.ts.map +0 -0
- /package/src/core/{field-text-icon → form/field-text-icon}/package.json +0 -0
- /package/src/core/{field-text-password → form/field-text-password}/field-text-password.vue +0 -0
- /package/src/core/{field-text-password → form/field-text-password}/field-text-password.vue.d.ts +0 -0
- /package/src/core/{field-text-password → form/field-text-password}/field-text-password.vue.d.ts.map +0 -0
- /package/src/core/{field-text-password → form/field-text-password}/package.json +0 -0
- /package/src/core/{label → form/label}/label.vue +0 -0
- /package/src/core/{label → form/label}/label.vue.d.ts +0 -0
- /package/src/core/{label → form/label}/label.vue.d.ts.map +0 -0
- /package/src/core/{label → form/label}/package.json +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aziontech/webkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Reusable UI components and design system utilities for building Azion web interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"clean": "rm -rf dist/",
|
|
16
|
-
"clean:dts": "rm -rf src/core/**/*.d.ts src/core/**/*.d.ts.map",
|
|
16
|
+
"clean:dts": "rm -rf src/core/form/**/*.d.ts src/core/form/**/*.d.ts.map",
|
|
17
17
|
"build:dts": "vue-tsc --declaration --emitDeclarationOnly",
|
|
18
18
|
"build": "npm run clean:dts; npm run build:dts",
|
|
19
19
|
"publish": "npm publish",
|
|
@@ -40,7 +40,31 @@
|
|
|
40
40
|
"package.json"
|
|
41
41
|
],
|
|
42
42
|
"exports": {
|
|
43
|
-
"./field-
|
|
44
|
-
"./field-
|
|
43
|
+
"./field-auto-complete": "./src/core/form/field-auto-complete/field-auto-complete.vue",
|
|
44
|
+
"./field-checkbox-block": "./src/core/form/field-checkbox-block/field-checkbox-block.vue",
|
|
45
|
+
"./field-dropdown": "./src/core/form/field-dropdown/field-dropdown.vue",
|
|
46
|
+
"./field-dropdown-icon": "./src/core/form/field-dropdown-icon/field-dropdown-icon.vue",
|
|
47
|
+
"./field-dropdown-lazy-loader": "./src/core/form/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue",
|
|
48
|
+
"./field-dropdown-lazy-loader-dynamic": "./src/core/form/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue",
|
|
49
|
+
"./field-dropdown-lazy-loader-with-filter": "./src/core/form/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue",
|
|
50
|
+
"./field-dropdown-multi-select-lazy-loader": "./src/core/form/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue",
|
|
51
|
+
"./field-group-checkbox": "./src/core/form/field-group-checkbox/field-group-checkbox.vue",
|
|
52
|
+
"./field-group-radio": "./src/core/form/field-group-radio/field-group-radio.vue",
|
|
53
|
+
"./field-group-switch": "./src/core/form/field-group-switch/field-group-switch.vue",
|
|
54
|
+
"./field-input-group": "./src/core/form/field-input-group/field-input-group.vue",
|
|
55
|
+
"./field-multi-select": "./src/core/form/field-multi-select/field-multi-select.vue",
|
|
56
|
+
"./field-number": "./src/core/form/field-number/field-number.vue",
|
|
57
|
+
"./field-phone-number": "./src/core/form/field-phone-number/field-phone-number.vue",
|
|
58
|
+
"./field-phone-number-country": "./src/core/form/field-phone-number-country/field-phone-number-country.vue",
|
|
59
|
+
"./field-pick-list": "./src/core/form/field-pick-list/field-pick-list.vue",
|
|
60
|
+
"./field-radio-block": "./src/core/form/field-radio-block/field-radio-block.vue",
|
|
61
|
+
"./field-switch": "./src/core/form/field-switch/field-switch.vue",
|
|
62
|
+
"./field-switch-block": "./src/core/form/field-switch-block/field-switch-block.vue",
|
|
63
|
+
"./field-text": "./src/core/form/field-text/field-text.vue",
|
|
64
|
+
"./field-text-area": "./src/core/form/field-text-area/field-text-area.vue",
|
|
65
|
+
"./field-text-icon": "./src/core/form/field-text-icon/field-text-icon.vue",
|
|
66
|
+
"./field-text-password": "./src/core/form/field-text-password/field-text-password.vue",
|
|
67
|
+
"./label": "./src/core/form/label/label.vue",
|
|
68
|
+
"./selector-block": "./src/core/selector-block/selector-block.vue"
|
|
45
69
|
}
|
|
46
70
|
}
|
package/src/core/{field-checkbox-block → form/field-checkbox-block}/field-checkbox-block.vue
RENAMED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
26
26
|
import PrimeCheckbox from 'primevue/checkbox'
|
|
27
|
-
import SelectorBlock from '
|
|
27
|
+
import SelectorBlock from '../../selector-block/selector-block.vue'
|
|
28
28
|
|
|
29
29
|
import { useField } from 'vee-validate'
|
|
30
30
|
import { toRefs } from 'vue'
|
|
@@ -1,132 +1,9 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<LabelBlock
|
|
3
|
-
v-if="props.label"
|
|
4
|
-
:for="props.name"
|
|
5
|
-
:label="props.label"
|
|
6
|
-
:isRequired="$attrs.required"
|
|
7
|
-
:data-testid="customTestId.label"
|
|
8
|
-
/>
|
|
9
|
-
<Dropdown
|
|
10
|
-
appendTo="self"
|
|
11
|
-
:id="name"
|
|
12
|
-
:name="props.name"
|
|
13
|
-
:loading="loading"
|
|
14
|
-
v-model="inputValue"
|
|
15
|
-
:options="data"
|
|
16
|
-
:optionLabel="props.optionLabel"
|
|
17
|
-
:optionDisabled="props.optionDisabled"
|
|
18
|
-
:optionValue="props.optionValue"
|
|
19
|
-
:optionGroupLabel="props.optionGroupLabel"
|
|
20
|
-
:optionGroupChildren="props.optionGroupChildren"
|
|
21
|
-
:placeholder="props.placeholder"
|
|
22
|
-
:showClear="props.enableClearOption"
|
|
23
|
-
@change="emitChange"
|
|
24
|
-
@blur="emitBlur"
|
|
25
|
-
:class="errorMessage ? 'p-invalid' : ''"
|
|
26
|
-
v-bind="$attrs"
|
|
27
|
-
class="w-full"
|
|
28
|
-
:pt="{
|
|
29
|
-
clearIcon: {
|
|
30
|
-
'data-testid': customTestId.clearIcon
|
|
31
|
-
},
|
|
32
|
-
filterInput: {
|
|
33
|
-
class: 'w-full',
|
|
34
|
-
'data-testid': customTestId.filterInput
|
|
35
|
-
},
|
|
36
|
-
trigger: {
|
|
37
|
-
'data-testid': customTestId.trigger
|
|
38
|
-
},
|
|
39
|
-
loadingIcon: {
|
|
40
|
-
'data-testid': customTestId.loadingIcon
|
|
41
|
-
}
|
|
42
|
-
}"
|
|
43
|
-
:data-testid="customTestId.dropdown"
|
|
44
|
-
:virtualScrollerOptions="VIRTUAL_SCROLLER_CONFIG"
|
|
45
|
-
>
|
|
46
|
-
<template
|
|
47
|
-
v-if="enableCustomLabel"
|
|
48
|
-
#value="slotProps"
|
|
49
|
-
>
|
|
50
|
-
<span
|
|
51
|
-
class="flex align-items-center gap-2 max-w-full"
|
|
52
|
-
:data-testid="customTestId.value"
|
|
53
|
-
>
|
|
54
|
-
<i
|
|
55
|
-
v-if="showIcon"
|
|
56
|
-
:class="`pi ${iconSelected} ${applyIconColor(iconSelected)}`"
|
|
57
|
-
></i>
|
|
58
|
-
<span
|
|
59
|
-
class="truncate max-w-full"
|
|
60
|
-
:title="getLabelBySelectedValue(slotProps.value)"
|
|
61
|
-
>
|
|
62
|
-
{{ getLabelBySelectedValue(slotProps.value) }}
|
|
63
|
-
</span>
|
|
64
|
-
</span>
|
|
65
|
-
</template>
|
|
66
|
-
<template #option="slotProps">
|
|
67
|
-
<div class="flex align-items-center gap-2">
|
|
68
|
-
<i
|
|
69
|
-
v-if="slotProps.option.icon"
|
|
70
|
-
:class="`pi ${slotProps.option.icon} ${applyIconColor(slotProps.option.icon)}`"
|
|
71
|
-
></i>
|
|
72
|
-
<span
|
|
73
|
-
v-else-if="!slotProps.option.icon && showIcon"
|
|
74
|
-
class="w-4"
|
|
75
|
-
></span>
|
|
76
|
-
<div>{{ slotProps.option.name }}</div>
|
|
77
|
-
</div>
|
|
78
|
-
</template>
|
|
79
|
-
|
|
80
|
-
<template #header>
|
|
81
|
-
<div class="p-2 flex">
|
|
82
|
-
<div class="p-inputgroup">
|
|
83
|
-
<InputText
|
|
84
|
-
type="text"
|
|
85
|
-
v-model="search"
|
|
86
|
-
placeholder="Search"
|
|
87
|
-
class="w-full rounded-r-none"
|
|
88
|
-
ref="focusSearch"
|
|
89
|
-
:data-testid="customTestId.search"
|
|
90
|
-
/>
|
|
91
|
-
<span
|
|
92
|
-
class="p-inputgroup-addon"
|
|
93
|
-
@click="searchFilter"
|
|
94
|
-
>
|
|
95
|
-
<i class="pi pi-search"></i>
|
|
96
|
-
</span>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</template>
|
|
100
|
-
|
|
101
|
-
<template #footer>
|
|
102
|
-
<slot name="footer" />
|
|
103
|
-
</template>
|
|
104
|
-
</Dropdown>
|
|
105
|
-
|
|
106
|
-
<small
|
|
107
|
-
v-if="errorMessage"
|
|
108
|
-
:data-testid="customTestId.error"
|
|
109
|
-
class="p-error text-xs font-normal leading-tight"
|
|
110
|
-
>
|
|
111
|
-
{{ errorMessage }}
|
|
112
|
-
</small>
|
|
113
|
-
<small
|
|
114
|
-
class="text-xs text-color-secondary font-normal leading-5"
|
|
115
|
-
:data-testid="customTestId.description"
|
|
116
|
-
v-if="props.description || hasDescriptionSlot"
|
|
117
|
-
>
|
|
118
|
-
<slot name="description">
|
|
119
|
-
{{ props.description }}
|
|
120
|
-
</slot>
|
|
121
|
-
</small>
|
|
122
|
-
</template>
|
|
123
|
-
|
|
124
1
|
<script setup>
|
|
2
|
+
import { computed, toRef, useSlots, useAttrs, ref, onMounted, watchEffect, watch, inject } from 'vue'
|
|
3
|
+
import { watchDebounced } from '@vueuse/core'
|
|
125
4
|
import Dropdown from 'primevue/dropdown'
|
|
126
5
|
import InputText from 'primevue/inputtext'
|
|
127
6
|
import { useField } from 'vee-validate'
|
|
128
|
-
import { computed, toRef, useSlots, useAttrs, ref, onMounted, watchEffect, watch } from 'vue'
|
|
129
|
-
import { watchDebounced } from '@vueuse/core'
|
|
130
7
|
import LabelBlock from '../label'
|
|
131
8
|
|
|
132
9
|
const props = defineProps({
|
|
@@ -208,7 +85,7 @@
|
|
|
208
85
|
}
|
|
209
86
|
})
|
|
210
87
|
|
|
211
|
-
const emit = defineEmits(['onBlur', 'onChange', 'onSelectOption', 'onAccessDenied'])
|
|
88
|
+
const emit = defineEmits(['onBlur', 'onChange', 'onSelectOption', 'onAccessDenied', 'onLoaded'])
|
|
212
89
|
|
|
213
90
|
const PAGE_INCREMENT = 1
|
|
214
91
|
const PAGE_SIZE = 100
|
|
@@ -231,8 +108,13 @@
|
|
|
231
108
|
const disableEmitInit = ref(props.disableEmitFirstRender)
|
|
232
109
|
const alreadyLoadedData = ref(false)
|
|
233
110
|
|
|
111
|
+
const registerAsyncFormChild = inject('registerAsyncFormChild', null)
|
|
112
|
+
const notifyFormChildReady = registerAsyncFormChild?.()
|
|
113
|
+
|
|
234
114
|
onMounted(async () => {
|
|
235
115
|
await fetchData()
|
|
116
|
+
notifyFormChildReady?.()
|
|
117
|
+
emit('onLoaded')
|
|
236
118
|
})
|
|
237
119
|
|
|
238
120
|
const hasDescriptionSlot = !!slots.description
|
|
@@ -376,9 +258,9 @@
|
|
|
376
258
|
[props.optionLabel]: item.name,
|
|
377
259
|
[props.optionValue]: item.id,
|
|
378
260
|
...props?.moreOptions?.reduce(
|
|
379
|
-
(additionalFields,
|
|
261
|
+
(additionalFields, fieldKey) => ({
|
|
380
262
|
...additionalFields,
|
|
381
|
-
[
|
|
263
|
+
[fieldKey]: item[fieldKey]
|
|
382
264
|
}),
|
|
383
265
|
{}
|
|
384
266
|
)
|
|
@@ -480,9 +362,9 @@
|
|
|
480
362
|
[props.optionLabel]: results.name,
|
|
481
363
|
[props.optionValue]: results.id,
|
|
482
364
|
...props?.moreOptions?.reduce(
|
|
483
|
-
(additionalFields,
|
|
365
|
+
(additionalFields, fieldKey) => ({
|
|
484
366
|
...additionalFields,
|
|
485
|
-
[
|
|
367
|
+
[fieldKey]: results[fieldKey]
|
|
486
368
|
}),
|
|
487
369
|
{}
|
|
488
370
|
)
|
|
@@ -609,11 +491,23 @@
|
|
|
609
491
|
loading
|
|
610
492
|
}
|
|
611
493
|
|
|
612
|
-
const checkValueInList = (value) => {
|
|
613
|
-
const
|
|
494
|
+
const checkValueInList = async (value) => {
|
|
495
|
+
const isGroupedData =
|
|
496
|
+
data.value.length > 0 &&
|
|
497
|
+
data.value.some((item) => item[props.optionGroupLabel] && item[props.optionGroupChildren])
|
|
498
|
+
|
|
499
|
+
let existsInList = false
|
|
500
|
+
|
|
501
|
+
if (isGroupedData) {
|
|
502
|
+
existsInList = data.value.some((group) =>
|
|
503
|
+
group[props.optionGroupChildren]?.some((item) => item[props.optionValue] === value)
|
|
504
|
+
)
|
|
505
|
+
} else {
|
|
506
|
+
existsInList = data.value?.some((item) => item[props.optionValue] === value)
|
|
507
|
+
}
|
|
614
508
|
|
|
615
|
-
if (!
|
|
616
|
-
loadSelectedValue(value)
|
|
509
|
+
if (!existsInList) {
|
|
510
|
+
await loadSelectedValue(value)
|
|
617
511
|
alreadyLoadedData.value = true
|
|
618
512
|
}
|
|
619
513
|
}
|
|
@@ -629,3 +523,126 @@
|
|
|
629
523
|
refreshData
|
|
630
524
|
})
|
|
631
525
|
</script>
|
|
526
|
+
|
|
527
|
+
<template>
|
|
528
|
+
<LabelBlock
|
|
529
|
+
v-if="props.label"
|
|
530
|
+
:for="props.name"
|
|
531
|
+
:label="props.label"
|
|
532
|
+
:isRequired="$attrs.required"
|
|
533
|
+
:data-testid="customTestId.label"
|
|
534
|
+
/>
|
|
535
|
+
<Dropdown
|
|
536
|
+
appendTo="self"
|
|
537
|
+
:id="name"
|
|
538
|
+
:name="props.name"
|
|
539
|
+
:loading="loading"
|
|
540
|
+
v-model="inputValue"
|
|
541
|
+
:options="data"
|
|
542
|
+
:optionLabel="props.optionLabel"
|
|
543
|
+
:optionDisabled="props.optionDisabled"
|
|
544
|
+
:optionValue="props.optionValue"
|
|
545
|
+
:optionGroupLabel="props.optionGroupLabel"
|
|
546
|
+
:optionGroupChildren="props.optionGroupChildren"
|
|
547
|
+
:placeholder="props.placeholder"
|
|
548
|
+
:showClear="props.enableClearOption"
|
|
549
|
+
@change="emitChange"
|
|
550
|
+
@blur="emitBlur"
|
|
551
|
+
:class="errorMessage ? 'p-invalid' : ''"
|
|
552
|
+
v-bind="$attrs"
|
|
553
|
+
class="w-full"
|
|
554
|
+
:pt="{
|
|
555
|
+
clearIcon: {
|
|
556
|
+
'data-testid': customTestId.clearIcon
|
|
557
|
+
},
|
|
558
|
+
filterInput: {
|
|
559
|
+
class: 'w-full',
|
|
560
|
+
'data-testid': customTestId.filterInput
|
|
561
|
+
},
|
|
562
|
+
trigger: {
|
|
563
|
+
'data-testid': customTestId.trigger
|
|
564
|
+
},
|
|
565
|
+
loadingIcon: {
|
|
566
|
+
'data-testid': customTestId.loadingIcon
|
|
567
|
+
}
|
|
568
|
+
}"
|
|
569
|
+
:data-testid="customTestId.dropdown"
|
|
570
|
+
:virtualScrollerOptions="VIRTUAL_SCROLLER_CONFIG"
|
|
571
|
+
>
|
|
572
|
+
<template
|
|
573
|
+
v-if="enableCustomLabel"
|
|
574
|
+
#value="slotProps"
|
|
575
|
+
>
|
|
576
|
+
<span
|
|
577
|
+
class="flex align-items-center gap-2 max-w-full"
|
|
578
|
+
:data-testid="customTestId.value"
|
|
579
|
+
>
|
|
580
|
+
<i
|
|
581
|
+
v-if="showIcon"
|
|
582
|
+
:class="`pi ${iconSelected} ${applyIconColor(iconSelected)}`"
|
|
583
|
+
></i>
|
|
584
|
+
<span
|
|
585
|
+
class="truncate max-w-full"
|
|
586
|
+
:title="getLabelBySelectedValue(slotProps.value)"
|
|
587
|
+
>
|
|
588
|
+
{{ getLabelBySelectedValue(slotProps.value) }}
|
|
589
|
+
</span>
|
|
590
|
+
</span>
|
|
591
|
+
</template>
|
|
592
|
+
<template #option="slotProps">
|
|
593
|
+
<div class="flex align-items-center gap-2">
|
|
594
|
+
<i
|
|
595
|
+
v-if="slotProps.option.icon"
|
|
596
|
+
:class="`pi ${slotProps.option.icon} ${applyIconColor(slotProps.option.icon)}`"
|
|
597
|
+
></i>
|
|
598
|
+
<span
|
|
599
|
+
v-else-if="!slotProps.option.icon && showIcon"
|
|
600
|
+
class="w-4"
|
|
601
|
+
></span>
|
|
602
|
+
<div>{{ slotProps.option.name }}</div>
|
|
603
|
+
</div>
|
|
604
|
+
</template>
|
|
605
|
+
|
|
606
|
+
<template #header>
|
|
607
|
+
<div class="p-2 flex">
|
|
608
|
+
<div class="p-inputgroup">
|
|
609
|
+
<InputText
|
|
610
|
+
type="text"
|
|
611
|
+
v-model="search"
|
|
612
|
+
placeholder="Search"
|
|
613
|
+
class="w-full rounded-r-none"
|
|
614
|
+
ref="focusSearch"
|
|
615
|
+
:data-testid="customTestId.search"
|
|
616
|
+
/>
|
|
617
|
+
<span
|
|
618
|
+
class="p-inputgroup-addon"
|
|
619
|
+
@click="searchFilter"
|
|
620
|
+
>
|
|
621
|
+
<i class="pi pi-search"></i>
|
|
622
|
+
</span>
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
</template>
|
|
626
|
+
|
|
627
|
+
<template #footer>
|
|
628
|
+
<slot name="footer" />
|
|
629
|
+
</template>
|
|
630
|
+
</Dropdown>
|
|
631
|
+
|
|
632
|
+
<small
|
|
633
|
+
v-if="errorMessage"
|
|
634
|
+
:data-testid="customTestId.error"
|
|
635
|
+
class="p-error text-xs font-normal leading-tight"
|
|
636
|
+
>
|
|
637
|
+
{{ errorMessage }}
|
|
638
|
+
</small>
|
|
639
|
+
<small
|
|
640
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
641
|
+
:data-testid="customTestId.description"
|
|
642
|
+
v-if="props.description || hasDescriptionSlot"
|
|
643
|
+
>
|
|
644
|
+
<slot name="description">
|
|
645
|
+
{{ props.description }}
|
|
646
|
+
</slot>
|
|
647
|
+
</small>
|
|
648
|
+
</template>
|
|
@@ -1,101 +1,9 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<LabelBlock
|
|
3
|
-
v-if="props.label"
|
|
4
|
-
:for="props.name"
|
|
5
|
-
:label="props.label"
|
|
6
|
-
:isRequired="$attrs.required"
|
|
7
|
-
:data-testid="customTestId.label"
|
|
8
|
-
/>
|
|
9
|
-
<MultiSelect
|
|
10
|
-
:id="name"
|
|
11
|
-
:name="props.name"
|
|
12
|
-
:loading="loading"
|
|
13
|
-
v-model="inputValue"
|
|
14
|
-
:options="data"
|
|
15
|
-
:optionLabel="props.optionLabel"
|
|
16
|
-
:optionDisabled="props.optionDisabled"
|
|
17
|
-
:optionValue="props.optionValue"
|
|
18
|
-
:placeholder="props.placeholder"
|
|
19
|
-
:showClear="props.enableClearOption"
|
|
20
|
-
@change="emitChange"
|
|
21
|
-
@blur="emitBlur"
|
|
22
|
-
:class="errorMessage ? 'p-invalid' : ''"
|
|
23
|
-
v-bind="$attrs"
|
|
24
|
-
class="w-full md:w-80"
|
|
25
|
-
display="chip"
|
|
26
|
-
:pt="{
|
|
27
|
-
clearIcon: {
|
|
28
|
-
'data-testid': customTestId.clearIcon
|
|
29
|
-
},
|
|
30
|
-
filterInput: {
|
|
31
|
-
class: 'w-full',
|
|
32
|
-
'data-testid': customTestId.filterInput
|
|
33
|
-
},
|
|
34
|
-
trigger: {
|
|
35
|
-
'data-testid': customTestId.trigger
|
|
36
|
-
},
|
|
37
|
-
loadingIcon: {
|
|
38
|
-
'data-testid': customTestId.loadingIcon
|
|
39
|
-
}
|
|
40
|
-
}"
|
|
41
|
-
:data-testid="customTestId.multiselect"
|
|
42
|
-
:virtualScrollerOptions="VIRTUAL_SCROLLER_CONFIG"
|
|
43
|
-
>
|
|
44
|
-
<template
|
|
45
|
-
v-if="enableCustomLabel"
|
|
46
|
-
#value="slotProps"
|
|
47
|
-
>
|
|
48
|
-
<span :data-testid="customTestId.value">
|
|
49
|
-
{{ getLabelsForSelectedValues(slotProps.value) }}
|
|
50
|
-
</span>
|
|
51
|
-
</template>
|
|
52
|
-
<template #header>
|
|
53
|
-
<div class="p-2 flex">
|
|
54
|
-
<div class="p-inputgroup">
|
|
55
|
-
<InputText
|
|
56
|
-
type="text"
|
|
57
|
-
v-model="search"
|
|
58
|
-
placeholder="Search"
|
|
59
|
-
class="w-full rounded-r-none"
|
|
60
|
-
ref="focusSearch"
|
|
61
|
-
:data-testid="customTestId.search"
|
|
62
|
-
/>
|
|
63
|
-
<span
|
|
64
|
-
class="p-inputgroup-addon"
|
|
65
|
-
@click="searchFilter"
|
|
66
|
-
>
|
|
67
|
-
<i class="pi pi-search"></i>
|
|
68
|
-
</span>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</template>
|
|
72
|
-
<template #footer>
|
|
73
|
-
<slot name="footer" />
|
|
74
|
-
</template>
|
|
75
|
-
</MultiSelect>
|
|
76
|
-
<small
|
|
77
|
-
v-if="errorMessage"
|
|
78
|
-
:data-testid="customTestId.error"
|
|
79
|
-
class="p-error text-xs font-normal leading-tight"
|
|
80
|
-
>
|
|
81
|
-
{{ errorMessage }}
|
|
82
|
-
</small>
|
|
83
|
-
<small
|
|
84
|
-
class="text-xs text-color-secondary font-normal leading-5"
|
|
85
|
-
:data-testid="customTestId.description"
|
|
86
|
-
v-if="props.description || hasDescriptionSlot"
|
|
87
|
-
>
|
|
88
|
-
<slot name="description">
|
|
89
|
-
{{ props.description }}
|
|
90
|
-
</slot>
|
|
91
|
-
</small>
|
|
92
|
-
</template>
|
|
93
1
|
<script setup>
|
|
2
|
+
import { computed, toRef, useSlots, useAttrs, ref, onMounted, watchEffect, watch } from 'vue'
|
|
3
|
+
import { watchDebounced } from '@vueuse/core'
|
|
94
4
|
import MultiSelect from 'primevue/multiselect'
|
|
95
5
|
import InputText from 'primevue/inputtext'
|
|
96
6
|
import { useField } from 'vee-validate'
|
|
97
|
-
import { computed, toRef, useSlots, useAttrs, ref, onMounted, watchEffect, watch } from 'vue'
|
|
98
|
-
import { watchDebounced } from '@vueuse/core'
|
|
99
7
|
import LabelBlock from '../label'
|
|
100
8
|
|
|
101
9
|
const props = defineProps({
|
|
@@ -161,7 +69,14 @@
|
|
|
161
69
|
}
|
|
162
70
|
})
|
|
163
71
|
|
|
164
|
-
const emit = defineEmits([
|
|
72
|
+
const emit = defineEmits([
|
|
73
|
+
'onBlur',
|
|
74
|
+
'onChange',
|
|
75
|
+
'onSelectOption',
|
|
76
|
+
'onAccessDenied',
|
|
77
|
+
'onClear',
|
|
78
|
+
'onLoaded'
|
|
79
|
+
])
|
|
165
80
|
const PAGE_INCREMENT = 1
|
|
166
81
|
const PAGE_SIZE = 100
|
|
167
82
|
const INITIAL_PAGE = 1
|
|
@@ -184,6 +99,7 @@
|
|
|
184
99
|
|
|
185
100
|
onMounted(async () => {
|
|
186
101
|
await fetchData()
|
|
102
|
+
emit('onLoaded')
|
|
187
103
|
})
|
|
188
104
|
|
|
189
105
|
const hasDescriptionSlot = !!slots.description
|
|
@@ -437,3 +353,97 @@
|
|
|
437
353
|
refreshData
|
|
438
354
|
})
|
|
439
355
|
</script>
|
|
356
|
+
|
|
357
|
+
<template>
|
|
358
|
+
<LabelBlock
|
|
359
|
+
v-if="props.label"
|
|
360
|
+
:for="props.name"
|
|
361
|
+
:label="props.label"
|
|
362
|
+
:isRequired="$attrs.required"
|
|
363
|
+
:data-testid="customTestId.label"
|
|
364
|
+
/>
|
|
365
|
+
<MultiSelect
|
|
366
|
+
:id="name"
|
|
367
|
+
:name="props.name"
|
|
368
|
+
:loading="loading"
|
|
369
|
+
v-model="inputValue"
|
|
370
|
+
:options="data"
|
|
371
|
+
:optionLabel="props.optionLabel"
|
|
372
|
+
:optionDisabled="props.optionDisabled"
|
|
373
|
+
:optionValue="props.optionValue"
|
|
374
|
+
:placeholder="props.placeholder"
|
|
375
|
+
:showClear="props.enableClearOption"
|
|
376
|
+
@change="emitChange"
|
|
377
|
+
@blur="emitBlur"
|
|
378
|
+
:class="errorMessage ? 'p-invalid' : ''"
|
|
379
|
+
v-bind="$attrs"
|
|
380
|
+
class="w-full md:w-80"
|
|
381
|
+
display="chip"
|
|
382
|
+
:pt="{
|
|
383
|
+
clearIcon: {
|
|
384
|
+
'data-testid': customTestId.clearIcon
|
|
385
|
+
},
|
|
386
|
+
filterInput: {
|
|
387
|
+
class: 'w-full',
|
|
388
|
+
'data-testid': customTestId.filterInput
|
|
389
|
+
},
|
|
390
|
+
trigger: {
|
|
391
|
+
'data-testid': customTestId.trigger
|
|
392
|
+
},
|
|
393
|
+
loadingIcon: {
|
|
394
|
+
'data-testid': customTestId.loadingIcon
|
|
395
|
+
}
|
|
396
|
+
}"
|
|
397
|
+
:data-testid="customTestId.multiselect"
|
|
398
|
+
:virtualScrollerOptions="VIRTUAL_SCROLLER_CONFIG"
|
|
399
|
+
>
|
|
400
|
+
<template
|
|
401
|
+
v-if="enableCustomLabel"
|
|
402
|
+
#value="slotProps"
|
|
403
|
+
>
|
|
404
|
+
<span :data-testid="customTestId.value">
|
|
405
|
+
{{ getLabelsForSelectedValues(slotProps.value) }}
|
|
406
|
+
</span>
|
|
407
|
+
</template>
|
|
408
|
+
<template #header>
|
|
409
|
+
<div class="p-2 flex">
|
|
410
|
+
<div class="p-inputgroup">
|
|
411
|
+
<InputText
|
|
412
|
+
type="text"
|
|
413
|
+
v-model="search"
|
|
414
|
+
placeholder="Search"
|
|
415
|
+
class="w-full rounded-r-none"
|
|
416
|
+
ref="focusSearch"
|
|
417
|
+
:data-testid="customTestId.search"
|
|
418
|
+
/>
|
|
419
|
+
<span
|
|
420
|
+
class="p-inputgroup-addon"
|
|
421
|
+
@click="searchFilter"
|
|
422
|
+
>
|
|
423
|
+
<i class="pi pi-search"></i>
|
|
424
|
+
</span>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
</template>
|
|
428
|
+
<template #footer>
|
|
429
|
+
<slot name="footer" />
|
|
430
|
+
</template>
|
|
431
|
+
</MultiSelect>
|
|
432
|
+
<small
|
|
433
|
+
v-if="errorMessage"
|
|
434
|
+
:data-testid="customTestId.error"
|
|
435
|
+
class="p-error text-xs font-normal leading-tight"
|
|
436
|
+
>
|
|
437
|
+
{{ errorMessage }}
|
|
438
|
+
</small>
|
|
439
|
+
<small
|
|
440
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
441
|
+
:data-testid="customTestId.description"
|
|
442
|
+
v-if="props.description || hasDescriptionSlot"
|
|
443
|
+
>
|
|
444
|
+
<slot name="description">
|
|
445
|
+
{{ props.description }}
|
|
446
|
+
</slot>
|
|
447
|
+
</small>
|
|
448
|
+
</template>
|
|
449
|
+
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<script setup>
|
|
27
27
|
import PrimeRadio from 'primevue/radiobutton'
|
|
28
|
-
import SelectorBlock from '
|
|
28
|
+
import SelectorBlock from '../../selector-block/selector-block.vue'
|
|
29
29
|
|
|
30
30
|
import { useField } from 'vee-validate'
|
|
31
31
|
import { toRefs } from 'vue'
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<script setup>
|
|
29
29
|
import InputSwitch from 'primevue/inputswitch'
|
|
30
|
-
import SelectorBlock from '
|
|
30
|
+
import SelectorBlock from '../../selector-block/selector-block.vue'
|
|
31
31
|
|
|
32
32
|
import { useField } from 'vee-validate'
|
|
33
33
|
import { toRefs, useAttrs, computed } from 'vue'
|
|
File without changes
|
/package/src/core/{field-auto-complete → form/field-auto-complete}/field-auto-complete.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-auto-complete → form/field-auto-complete}/field-auto-complete.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/core/{field-checkbox-block → form/field-checkbox-block}/field-checkbox-block.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-dropdown-icon → form/field-dropdown-icon}/field-dropdown-icon.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-dropdown-icon → form/field-dropdown-icon}/field-dropdown-icon.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-dropdown-lazy-loader → form/field-dropdown-lazy-loader}/package.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-group-checkbox → form/field-group-checkbox}/field-group-checkbox.vue
RENAMED
|
File without changes
|
/package/src/core/{field-group-checkbox → form/field-group-checkbox}/field-group-checkbox.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-group-radio → form/field-group-radio}/field-group-radio.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-group-switch → form/field-group-switch}/field-group-switch.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-group-switch → form/field-group-switch}/field-group-switch.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-input-group → form/field-input-group}/field-input-group.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-multi-select → form/field-multi-select}/field-multi-select.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-multi-select → form/field-multi-select}/field-multi-select.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-phone-number → form/field-phone-number}/field-phone-number.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-phone-number → form/field-phone-number}/field-phone-number.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-phone-number-country → form/field-phone-number-country}/package.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-radio-block → form/field-radio-block}/field-radio-block.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-switch-block → form/field-switch-block}/field-switch-block.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-switch-block → form/field-switch-block}/field-switch-block.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/core/{field-text-password → form/field-text-password}/field-text-password.vue.d.ts
RENAMED
|
File without changes
|
/package/src/core/{field-text-password → form/field-text-password}/field-text-password.vue.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|