@aziontech/webkit 1.1.0 → 1.3.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/package.json +5 -3
- package/src/components/azion-system-status/azion-system-status.vue +122 -0
- package/src/components/azion-system-status/azion-system-status.vue.d.ts +4 -0
- package/src/components/azion-system-status/azion-system-status.vue.d.ts.map +1 -0
- package/src/components/azion-system-status/package.json +11 -0
- package/src/core/form/field-auto-complete/field-auto-complete.vue +48 -45
- package/src/core/form/field-auto-complete/field-auto-complete.vue.d.ts +4 -4
- package/src/core/form/field-auto-complete/field-auto-complete.vue.d.ts.map +1 -1
- package/src/core/form/field-checkbox-block/field-checkbox-block.vue.d.ts +3 -3
- package/src/core/form/field-dropdown/field-dropdown.vue +68 -65
- package/src/core/form/field-dropdown/field-dropdown.vue.d.ts +5 -5
- package/src/core/form/field-dropdown/field-dropdown.vue.d.ts.map +1 -1
- package/src/core/form/field-dropdown-icon/field-dropdown-icon.vue +49 -46
- package/src/core/form/field-dropdown-icon/field-dropdown-icon.vue.d.ts +4 -4
- package/src/core/form/field-dropdown-icon/field-dropdown-icon.vue.d.ts.map +1 -1
- package/src/core/form/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue +116 -113
- package/src/core/form/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue.d.ts +2 -2
- package/src/core/form/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue.d.ts.map +1 -1
- package/src/core/form/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue +93 -90
- package/src/core/form/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue.d.ts +2 -2
- package/src/core/form/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue.d.ts.map +1 -1
- package/src/core/form/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue +111 -108
- package/src/core/form/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue.d.ts +2 -2
- package/src/core/form/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue.d.ts.map +1 -1
- package/src/core/form/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue +92 -89
- package/src/core/form/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue.d.ts +2 -2
- package/src/core/form/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue.d.ts.map +1 -1
- package/src/core/form/field-input-group/field-input-group.vue +44 -41
- package/src/core/form/field-input-group/field-input-group.vue.d.ts +3 -3
- package/src/core/form/field-input-group/field-input-group.vue.d.ts.map +1 -1
- package/src/core/form/field-multi-select/field-multi-select.vue +2 -2
- package/src/core/form/field-multi-select/field-multi-select.vue.d.ts +5 -5
- package/src/core/form/field-number/field-number.vue +46 -43
- package/src/core/form/field-number/field-number.vue.d.ts +3 -3
- package/src/core/form/field-number/field-number.vue.d.ts.map +1 -1
- package/src/core/form/field-phone-number/field-phone-number.vue +2 -2
- package/src/core/form/field-phone-number/field-phone-number.vue.d.ts +2 -2
- package/src/core/form/field-radio-block/field-radio-block.vue.d.ts +2 -2
- package/src/core/form/field-switch/field-switch.vue.d.ts +1 -1
- package/src/core/form/field-switch-block/field-switch-block.vue.d.ts +1 -1
- package/src/core/form/field-text/field-text.vue +43 -40
- package/src/core/form/field-text/field-text.vue.d.ts +3 -3
- package/src/core/form/field-text/field-text.vue.d.ts.map +1 -1
- package/src/core/form/field-text-area/field-text-area.vue +61 -58
- package/src/core/form/field-text-area/field-text-area.vue.d.ts +3 -3
- package/src/core/form/field-text-area/field-text-area.vue.d.ts.map +1 -1
- package/src/core/form/field-text-icon/field-text-icon.vue +48 -42
- package/src/core/form/field-text-icon/field-text-icon.vue.d.ts +4 -4
- package/src/core/form/field-text-icon/field-text-icon.vue.d.ts.map +1 -1
- package/src/core/form/field-text-password/field-text-password.vue +42 -39
- package/src/core/form/field-text-password/field-text-password.vue.d.ts +3 -3
- package/src/core/form/field-text-password/field-text-password.vue.d.ts.map +1 -1
- package/src/core/form/field-text-privacy/field-text-privacy.vue +132 -129
- package/src/core/form/field-text-privacy/field-text-privacy.vue.d.ts +3 -3
- package/src/core/form/field-text-privacy/field-text-privacy.vue.d.ts.map +1 -1
- package/src/core/form/slots/input-slot/input-slot.vue +8 -0
- package/src/core/form/slots/input-slot/input-slot.vue.d.ts +11 -0
- package/src/core/form/slots/input-slot/input-slot.vue.d.ts.map +1 -0
- package/src/core/form/slots/input-slot/package.json +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aziontech/webkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Reusable UI components and design system utilities for building Azion web interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"primevue": "3.35.0",
|
|
24
24
|
"vee-validate": "^4.15.1",
|
|
25
|
-
"vue-tsc": "^3.2.5"
|
|
25
|
+
"vue-tsc": "^3.2.5",
|
|
26
|
+
"@vueuse/core": "^10.11.1"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
"./field-text-password": "./src/core/form/field-text-password/field-text-password.vue",
|
|
67
68
|
"./field-text-privacy": "./src/core/form/field-text-privacy/field-text-privacy.vue",
|
|
68
69
|
"./label": "./src/core/form/label/label.vue",
|
|
69
|
-
"./selector-block": "./src/core/selector-block/selector-block.vue"
|
|
70
|
+
"./selector-block": "./src/core/selector-block/selector-block.vue",
|
|
71
|
+
"./azion-system-status": "./src/components/azion-system-status/azion-system-status.vue"
|
|
70
72
|
}
|
|
71
73
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import PrimeButton from 'primevue/button'
|
|
3
|
+
import { ref, computed, onMounted } from 'vue'
|
|
4
|
+
|
|
5
|
+
const STATUS_PAGE = {
|
|
6
|
+
none: 'operational',
|
|
7
|
+
minor: 'minor-outage',
|
|
8
|
+
major: 'partial-outage',
|
|
9
|
+
critical: 'major-outage',
|
|
10
|
+
maintenance: 'maintenance'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const STATUS_PAGE_COLORS = {
|
|
14
|
+
none: '#8bc249',
|
|
15
|
+
minor: '#fec111',
|
|
16
|
+
major: '#f3652b',
|
|
17
|
+
critical: '#ff4141',
|
|
18
|
+
maintenance: '#6e7cf7'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const OPERATIONAL_STATUS = {
|
|
22
|
+
indicator: 'none',
|
|
23
|
+
description: 'All Systems Operational'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const STATUS_API_BASE_URL = 'https://status.azion.com/api/v2'
|
|
27
|
+
|
|
28
|
+
async function fetchStatusApi(endpoint) {
|
|
29
|
+
const response = await fetch(`${STATUS_API_BASE_URL}${endpoint}`, {
|
|
30
|
+
method: 'GET'
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
throw new Error(`HTTP error! status: ${response.status}`)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return response.json()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const error = ref(false)
|
|
41
|
+
const status = ref('')
|
|
42
|
+
const label = ref('')
|
|
43
|
+
const link = ref('https://status.azion.com')
|
|
44
|
+
const color = ref(STATUS_PAGE_COLORS.none)
|
|
45
|
+
|
|
46
|
+
const colorStatus = computed(() => ({ color: color.value }))
|
|
47
|
+
|
|
48
|
+
function redirectToLink() {
|
|
49
|
+
window.open(link.value, '_blank')
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function fetchComponentsStatus() {
|
|
53
|
+
return fetchStatusApi('/components.json')
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function fetchStatusPage() {
|
|
57
|
+
const data = await fetchStatusApi('/status.json')
|
|
58
|
+
|
|
59
|
+
if (data && data.status) {
|
|
60
|
+
return {
|
|
61
|
+
indicator: data.status.indicator,
|
|
62
|
+
description: data.status.description
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return OPERATIONAL_STATUS
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function checkComponentStatus() {
|
|
70
|
+
try {
|
|
71
|
+
const data = await fetchComponentsStatus()
|
|
72
|
+
const components = data?.components || []
|
|
73
|
+
|
|
74
|
+
const checkComponents = (component) =>
|
|
75
|
+
component.status !== 'operational' && component.status !== 'partial_outage'
|
|
76
|
+
const hasImpactedComponent = components.some(checkComponents)
|
|
77
|
+
|
|
78
|
+
const statusResult = await getStatus(hasImpactedComponent)
|
|
79
|
+
updateSystemStatus(statusResult)
|
|
80
|
+
} catch (err) {
|
|
81
|
+
error.value = true
|
|
82
|
+
// eslint-disable-next-line no-console
|
|
83
|
+
console.error(err)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async function getStatus(checkStatusPage) {
|
|
88
|
+
if (checkStatusPage) {
|
|
89
|
+
return fetchStatusPage()
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return OPERATIONAL_STATUS
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function updateSystemStatus({ indicator, description }) {
|
|
96
|
+
status.value = STATUS_PAGE[indicator]
|
|
97
|
+
color.value = STATUS_PAGE_COLORS[indicator]
|
|
98
|
+
label.value = description
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
onMounted(() => {
|
|
102
|
+
checkComponentStatus()
|
|
103
|
+
})
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<template>
|
|
107
|
+
<PrimeButton
|
|
108
|
+
outlined
|
|
109
|
+
class="surface-section min-w-fit hover:surface-hover whitespace-nowrap"
|
|
110
|
+
icon="pi pi-circle-fill"
|
|
111
|
+
size="small"
|
|
112
|
+
v-show="!error"
|
|
113
|
+
:label="label"
|
|
114
|
+
:loading="!label"
|
|
115
|
+
:pt="{
|
|
116
|
+
root: { class: 'h-8 flex-row items-center' },
|
|
117
|
+
label: { class: 'font-normal text-sm min-w-[9rem]' },
|
|
118
|
+
icon: { style: colorStatus, class: 'text-xs' }
|
|
119
|
+
}"
|
|
120
|
+
@click="redirectToLink"
|
|
121
|
+
/>
|
|
122
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
//# sourceMappingURL=azion-system-status.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azion-system-status.vue.d.ts","sourceRoot":"","sources":["azion-system-status.vue"],"names":[],"mappings":"wBAwSqB,OAAO,YAAY;;AAFxC,0SACG"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ref, toRef } from 'vue'
|
|
3
3
|
import { useField } from 'vee-validate'
|
|
4
4
|
import AutoComplete from 'primevue/autocomplete'
|
|
5
|
+
import InputSlot from '../slots/input-slot'
|
|
5
6
|
|
|
6
7
|
const props = defineProps({
|
|
7
8
|
value: {
|
|
@@ -67,55 +68,57 @@
|
|
|
67
68
|
</script>
|
|
68
69
|
|
|
69
70
|
<template>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
<InputSlot>
|
|
72
|
+
<label
|
|
73
|
+
:for="props.name"
|
|
74
|
+
class="text-color text-base font-medium leading-5"
|
|
75
|
+
>
|
|
76
|
+
{{ props.label }}
|
|
77
|
+
</label>
|
|
76
78
|
|
|
77
|
-
<div
|
|
78
|
-
class="p-inputgroup h-fit"
|
|
79
|
-
:class="{ 'border border-red-500 rounded-md surface-border': errorMessage }"
|
|
80
|
-
>
|
|
81
79
|
<div
|
|
82
|
-
class="p-inputgroup-
|
|
83
|
-
:class="{ '
|
|
80
|
+
class="p-inputgroup h-fit"
|
|
81
|
+
:class="{ 'border border-red-500 rounded-md surface-border': errorMessage }"
|
|
84
82
|
>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
:class="props.
|
|
88
|
-
|
|
83
|
+
<div
|
|
84
|
+
class="p-inputgroup-addon"
|
|
85
|
+
:class="{ 'opacity-20': props.disabled }"
|
|
86
|
+
>
|
|
87
|
+
<i
|
|
88
|
+
v-if="props.icon"
|
|
89
|
+
:class="props.icon"
|
|
90
|
+
class="text-color-secondary"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
<AutoComplete
|
|
94
|
+
ref="autoCompleteRef"
|
|
95
|
+
:readonly="props.readonly"
|
|
96
|
+
class="w-full"
|
|
97
|
+
:placeholder="props.placeholder"
|
|
98
|
+
:id="props.name"
|
|
99
|
+
:name="props.name"
|
|
100
|
+
v-model="inputValue"
|
|
101
|
+
:suggestions="props.suggestions"
|
|
102
|
+
@complete="props.onComplete"
|
|
103
|
+
:disabled="props.disabled"
|
|
104
|
+
:completeOnFocus="props.completeOnFocus"
|
|
105
|
+
@input="handleChange"
|
|
106
|
+
@blur="handleBlur"
|
|
107
|
+
v-bind="$attrs"
|
|
89
108
|
/>
|
|
90
109
|
</div>
|
|
91
|
-
<AutoComplete
|
|
92
|
-
ref="autoCompleteRef"
|
|
93
|
-
:readonly="props.readonly"
|
|
94
|
-
class="w-full"
|
|
95
|
-
:placeholder="props.placeholder"
|
|
96
|
-
:id="props.name"
|
|
97
|
-
:name="props.name"
|
|
98
|
-
v-model="inputValue"
|
|
99
|
-
:suggestions="props.suggestions"
|
|
100
|
-
@complete="props.onComplete"
|
|
101
|
-
:disabled="props.disabled"
|
|
102
|
-
:completeOnFocus="props.completeOnFocus"
|
|
103
|
-
@input="handleChange"
|
|
104
|
-
@blur="handleBlur"
|
|
105
|
-
v-bind="$attrs"
|
|
106
|
-
/>
|
|
107
|
-
</div>
|
|
108
110
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
<small
|
|
112
|
+
v-if="errorMessage"
|
|
113
|
+
class="p-error text-xs font-normal leading-tight"
|
|
114
|
+
>
|
|
115
|
+
{{ errorMessage }}
|
|
116
|
+
</small>
|
|
117
|
+
<small
|
|
118
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
119
|
+
v-if="props.description"
|
|
120
|
+
>
|
|
121
|
+
{{ props.description }}
|
|
122
|
+
</small>
|
|
123
|
+
</InputSlot>
|
|
121
124
|
</template>
|
|
@@ -93,13 +93,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
93
93
|
default: boolean;
|
|
94
94
|
};
|
|
95
95
|
}>> & Readonly<{}>, {
|
|
96
|
-
value: string;
|
|
97
|
-
label: string;
|
|
98
|
-
placeholder: string;
|
|
99
96
|
description: string;
|
|
97
|
+
label: string;
|
|
98
|
+
icon: string;
|
|
100
99
|
disabled: boolean;
|
|
100
|
+
value: string;
|
|
101
|
+
placeholder: string;
|
|
101
102
|
readonly: boolean;
|
|
102
|
-
icon: string;
|
|
103
103
|
suggestions: unknown[];
|
|
104
104
|
onComplete: Function;
|
|
105
105
|
completeOnFocus: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-auto-complete.vue.d.ts","sourceRoot":"","sources":["field-auto-complete.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-auto-complete.vue.d.ts","sourceRoot":"","sources":["field-auto-complete.vue"],"names":[],"mappings":"wBAmYqB,OAAO,YAAY;;AAjDxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAgDG"}
|
|
@@ -43,7 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
43
43
|
required: true;
|
|
44
44
|
};
|
|
45
45
|
value: {
|
|
46
|
-
type: (
|
|
46
|
+
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
47
47
|
default: boolean;
|
|
48
48
|
};
|
|
49
49
|
binary: {
|
|
@@ -89,7 +89,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
89
89
|
required: true;
|
|
90
90
|
};
|
|
91
91
|
value: {
|
|
92
|
-
type: (
|
|
92
|
+
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
93
93
|
default: boolean;
|
|
94
94
|
};
|
|
95
95
|
binary: {
|
|
@@ -97,8 +97,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
97
97
|
default: boolean;
|
|
98
98
|
};
|
|
99
99
|
}>> & Readonly<{}>, {
|
|
100
|
-
value: string | boolean | Record<string, any>;
|
|
101
100
|
disabled: boolean;
|
|
101
|
+
value: string | boolean | Record<string, any>;
|
|
102
102
|
auto: boolean;
|
|
103
103
|
isCard: boolean;
|
|
104
104
|
hideSelector: boolean;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import Dropdown from 'primevue/dropdown'
|
|
3
3
|
import { useField } from 'vee-validate'
|
|
4
4
|
import { computed, toRef, useSlots, useAttrs } from 'vue'
|
|
5
|
-
import
|
|
5
|
+
import Label from '../label'
|
|
6
|
+
import InputSlot from '../slots/input-slot'
|
|
6
7
|
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
value: {
|
|
@@ -172,69 +173,71 @@
|
|
|
172
173
|
</script>
|
|
173
174
|
|
|
174
175
|
<template>
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<template
|
|
211
|
-
v-if="enableCustomLabel"
|
|
212
|
-
#value="slotProps"
|
|
176
|
+
<InputSlot>
|
|
177
|
+
<Label
|
|
178
|
+
:for="props.name"
|
|
179
|
+
:label="props.label"
|
|
180
|
+
:isRequired="$attrs.required"
|
|
181
|
+
:data-testid="customTestId.label"
|
|
182
|
+
v-if="props.label"
|
|
183
|
+
/>
|
|
184
|
+
<Dropdown
|
|
185
|
+
:dropdown-icon="isDisabledIcon"
|
|
186
|
+
:editable="props.editable"
|
|
187
|
+
appendTo="self"
|
|
188
|
+
:id="name"
|
|
189
|
+
:name="props.name"
|
|
190
|
+
:loading="props.loading"
|
|
191
|
+
v-model="inputValue"
|
|
192
|
+
:options="props.options"
|
|
193
|
+
:optionLabel="props.optionLabel"
|
|
194
|
+
:optionDisabled="props.optionDisabled"
|
|
195
|
+
:filter="props.filter"
|
|
196
|
+
:optionValue="props.optionValue"
|
|
197
|
+
:optionGroupLabel="props.optionGroupLabel"
|
|
198
|
+
:optionGroupChildren="props.optionGroupChildren"
|
|
199
|
+
:placeholder="props.placeholder"
|
|
200
|
+
:autoFilterFocus="props.filter"
|
|
201
|
+
:emptyMessage="props.emptyMessage"
|
|
202
|
+
:emptyFilterMessage="props.emptyFilterMessage"
|
|
203
|
+
@change="emitChange"
|
|
204
|
+
@blur="emitBlur"
|
|
205
|
+
:class="{ 'p-invalid': aditionalError || errorMessage }"
|
|
206
|
+
v-bind="$attrs"
|
|
207
|
+
:disabled="props.disabled"
|
|
208
|
+
class="w-full"
|
|
209
|
+
:pt="passThrough"
|
|
210
|
+
:data-testid="customTestId.dropdown"
|
|
213
211
|
>
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
212
|
+
<template
|
|
213
|
+
v-if="enableCustomLabel"
|
|
214
|
+
#value="slotProps"
|
|
215
|
+
>
|
|
216
|
+
<span :data-testid="customTestId.value">
|
|
217
|
+
{{ getLabelBySelectedValue(slotProps.value) }}
|
|
218
|
+
</span>
|
|
219
|
+
</template>
|
|
220
|
+
|
|
221
|
+
<template #footer>
|
|
222
|
+
<slot name="footer" />
|
|
223
|
+
</template>
|
|
224
|
+
</Dropdown>
|
|
225
|
+
|
|
226
|
+
<small
|
|
227
|
+
v-if="aditionalError || errorMessage"
|
|
228
|
+
:data-testid="customTestId.error"
|
|
229
|
+
class="p-error text-xs font-normal leading-tight"
|
|
230
|
+
>
|
|
231
|
+
{{ aditionalError || errorMessage }}
|
|
232
|
+
</small>
|
|
233
|
+
<small
|
|
234
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
235
|
+
:data-testid="customTestId.description"
|
|
236
|
+
v-if="props.description || hasDescriptionSlot"
|
|
237
|
+
>
|
|
238
|
+
<slot name="description">
|
|
239
|
+
{{ props.description }}
|
|
240
|
+
</slot>
|
|
241
|
+
</small>
|
|
242
|
+
</InputSlot>
|
|
240
243
|
</template>
|
|
@@ -175,18 +175,18 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
175
175
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
176
176
|
onOnSelectOption?: ((...args: any[]) => any) | undefined;
|
|
177
177
|
}>, {
|
|
178
|
-
value: string | number;
|
|
179
|
-
label: string;
|
|
180
|
-
placeholder: string;
|
|
181
178
|
description: string;
|
|
179
|
+
label: string;
|
|
180
|
+
loading: boolean;
|
|
181
|
+
pt: Record<string, any>;
|
|
182
182
|
disabled: boolean;
|
|
183
|
+
value: string | number;
|
|
184
|
+
placeholder: string;
|
|
183
185
|
filter: boolean;
|
|
184
186
|
optionLabel: string;
|
|
185
187
|
optionDisabled: string | Function;
|
|
186
188
|
optionGroupLabel: string;
|
|
187
189
|
optionGroupChildren: string;
|
|
188
|
-
loading: boolean;
|
|
189
|
-
pt: Record<string, any>;
|
|
190
190
|
optionValue: string;
|
|
191
191
|
options: unknown[];
|
|
192
192
|
enableWorkaroundLabelToDisabledOptions: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-dropdown.vue.d.ts","sourceRoot":"","sources":["field-dropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-dropdown.vue.d.ts","sourceRoot":"","sources":["field-dropdown.vue"],"names":[],"mappings":"wBAmrBqB,OAAO,YAAY;;AADxC,4BAA2B,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;qBAEtD,CAAC,EAAE,CAAC;;;AAvFzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAoFG"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ref, toRef } from 'vue'
|
|
3
3
|
import { useField } from 'vee-validate'
|
|
4
4
|
import Dropdown from 'primevue/dropdown'
|
|
5
|
+
import InputSlot from '../slots/input-slot'
|
|
5
6
|
|
|
6
7
|
const emit = defineEmits(['onChange'])
|
|
7
8
|
|
|
@@ -74,56 +75,58 @@
|
|
|
74
75
|
</script>
|
|
75
76
|
|
|
76
77
|
<template>
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
<InputSlot>
|
|
79
|
+
<label
|
|
80
|
+
:for="props.name"
|
|
81
|
+
class="text-color text-base font-medium leading-5"
|
|
82
|
+
>
|
|
83
|
+
{{ props.label }}
|
|
84
|
+
</label>
|
|
83
85
|
|
|
84
|
-
<div
|
|
85
|
-
class="p-inputgroup h-fit"
|
|
86
|
-
:class="{ 'border border-red-500 rounded-md surface-border': errorMessage }"
|
|
87
|
-
>
|
|
88
86
|
<div
|
|
89
|
-
class="p-inputgroup-
|
|
90
|
-
:class="{ '
|
|
87
|
+
class="p-inputgroup h-fit"
|
|
88
|
+
:class="{ 'border border-red-500 rounded-md surface-border': errorMessage }"
|
|
91
89
|
>
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
:class="props.
|
|
95
|
-
|
|
90
|
+
<div
|
|
91
|
+
class="p-inputgroup-addon"
|
|
92
|
+
:class="{ 'opacity-20': props.disabled }"
|
|
93
|
+
>
|
|
94
|
+
<i
|
|
95
|
+
v-if="props.icon"
|
|
96
|
+
:class="props.icon"
|
|
97
|
+
class="text-color-secondary"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
<Dropdown
|
|
101
|
+
ref="autoCompleteRef"
|
|
102
|
+
:readonly="props.readonly"
|
|
103
|
+
class="w-full"
|
|
104
|
+
:placeholder="props.placeholder"
|
|
105
|
+
:id="props.name"
|
|
106
|
+
:name="props.name"
|
|
107
|
+
v-model="inputValue"
|
|
108
|
+
:suggestions="props.suggestions"
|
|
109
|
+
@complete="props.onComplete"
|
|
110
|
+
:disabled="props.disabled"
|
|
111
|
+
:completeOnFocus="props.completeOnFocus"
|
|
112
|
+
@input="handleChange"
|
|
113
|
+
@blur="handleBlur"
|
|
114
|
+
v-bind="$attrs"
|
|
115
|
+
@change="handleChangeEvent"
|
|
96
116
|
/>
|
|
97
117
|
</div>
|
|
98
|
-
<Dropdown
|
|
99
|
-
ref="autoCompleteRef"
|
|
100
|
-
:readonly="props.readonly"
|
|
101
|
-
class="w-full"
|
|
102
|
-
:placeholder="props.placeholder"
|
|
103
|
-
:id="props.name"
|
|
104
|
-
:name="props.name"
|
|
105
|
-
v-model="inputValue"
|
|
106
|
-
:suggestions="props.suggestions"
|
|
107
|
-
@complete="props.onComplete"
|
|
108
|
-
:disabled="props.disabled"
|
|
109
|
-
:completeOnFocus="props.completeOnFocus"
|
|
110
|
-
@input="handleChange"
|
|
111
|
-
@blur="handleBlur"
|
|
112
|
-
v-bind="$attrs"
|
|
113
|
-
@change="handleChangeEvent"
|
|
114
|
-
/>
|
|
115
|
-
</div>
|
|
116
118
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
<small
|
|
120
|
+
v-if="errorMessage"
|
|
121
|
+
class="p-error text-xs font-normal leading-tight"
|
|
122
|
+
>
|
|
123
|
+
{{ errorMessage }}
|
|
124
|
+
</small>
|
|
125
|
+
<small
|
|
126
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
127
|
+
v-if="props.description"
|
|
128
|
+
>
|
|
129
|
+
{{ props.description }}
|
|
130
|
+
</small>
|
|
131
|
+
</InputSlot>
|
|
129
132
|
</template>
|
|
@@ -97,13 +97,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
97
97
|
}>> & Readonly<{
|
|
98
98
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
99
99
|
}>, {
|
|
100
|
-
value: string;
|
|
101
|
-
label: string;
|
|
102
|
-
placeholder: string;
|
|
103
100
|
description: string;
|
|
101
|
+
label: string;
|
|
102
|
+
icon: string;
|
|
104
103
|
disabled: boolean;
|
|
104
|
+
value: string;
|
|
105
|
+
placeholder: string;
|
|
105
106
|
readonly: boolean;
|
|
106
|
-
icon: string;
|
|
107
107
|
suggestions: unknown[];
|
|
108
108
|
onComplete: Function;
|
|
109
109
|
completeOnFocus: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-dropdown-icon.vue.d.ts","sourceRoot":"","sources":["field-dropdown-icon.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-dropdown-icon.vue.d.ts","sourceRoot":"","sources":["field-dropdown-icon.vue"],"names":[],"mappings":"wBA2ZqB,OAAO,YAAY;;AAlDxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAiDG"}
|