@aziontech/webkit 0.0.1
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 +46 -0
- package/src/core/field-auto-complete/field-auto-complete.vue +121 -0
- package/src/core/field-auto-complete/field-auto-complete.vue.d.ts +107 -0
- package/src/core/field-auto-complete/field-auto-complete.vue.d.ts.map +1 -0
- package/src/core/field-auto-complete/package.json +11 -0
- package/src/core/field-checkbox-block/field-checkbox-block.vue +106 -0
- package/src/core/field-checkbox-block/field-checkbox-block.vue.d.ts +111 -0
- package/src/core/field-checkbox-block/field-checkbox-block.vue.d.ts.map +1 -0
- package/src/core/field-checkbox-block/package.json +11 -0
- package/src/core/field-dropdown/field-dropdown.vue +240 -0
- package/src/core/field-dropdown/field-dropdown.vue.d.ts +203 -0
- package/src/core/field-dropdown/field-dropdown.vue.d.ts.map +1 -0
- package/src/core/field-dropdown/package.json +11 -0
- package/src/core/field-dropdown-icon/field-dropdown-icon.vue +129 -0
- package/src/core/field-dropdown-icon/field-dropdown-icon.vue.d.ts +111 -0
- package/src/core/field-dropdown-icon/field-dropdown-icon.vue.d.ts.map +1 -0
- package/src/core/field-dropdown-icon/package.json +11 -0
- package/src/core/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue +631 -0
- package/src/core/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue.d.ts +196 -0
- package/src/core/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue.d.ts.map +1 -0
- package/src/core/field-dropdown-lazy-loader/package.json +11 -0
- package/src/core/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue +426 -0
- package/src/core/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue.d.ts +158 -0
- package/src/core/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue.d.ts.map +1 -0
- package/src/core/field-dropdown-lazy-loader-dynamic/package.json +11 -0
- package/src/core/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue +527 -0
- package/src/core/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue.d.ts +203 -0
- package/src/core/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue.d.ts.map +1 -0
- package/src/core/field-dropdown-lazy-loader-with-filter/package.json +11 -0
- package/src/core/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue +439 -0
- package/src/core/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue.d.ts +162 -0
- package/src/core/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue.d.ts.map +1 -0
- package/src/core/field-dropdown-multi-select-lazy-loader/package.json +11 -0
- package/src/core/field-group-checkbox/field-group-checkbox.vue +102 -0
- package/src/core/field-group-checkbox/field-group-checkbox.vue.d.ts +87 -0
- package/src/core/field-group-checkbox/field-group-checkbox.vue.d.ts.map +1 -0
- package/src/core/field-group-checkbox/package.json +11 -0
- package/src/core/field-group-radio/field-group-radio.vue +149 -0
- package/src/core/field-group-radio/field-group-radio.vue.d.ts +99 -0
- package/src/core/field-group-radio/field-group-radio.vue.d.ts.map +1 -0
- package/src/core/field-group-radio/package.json +11 -0
- package/src/core/field-group-switch/field-group-switch.vue +121 -0
- package/src/core/field-group-switch/field-group-switch.vue.d.ts +87 -0
- package/src/core/field-group-switch/field-group-switch.vue.d.ts.map +1 -0
- package/src/core/field-group-switch/package.json +11 -0
- package/src/core/field-input-group/field-input-group.vue +111 -0
- package/src/core/field-input-group/field-input-group.vue.d.ts +87 -0
- package/src/core/field-input-group/field-input-group.vue.d.ts.map +1 -0
- package/src/core/field-input-group/package.json +11 -0
- package/src/core/field-multi-select/field-multi-select.vue +167 -0
- package/src/core/field-multi-select/field-multi-select.vue.d.ts +136 -0
- package/src/core/field-multi-select/field-multi-select.vue.d.ts.map +1 -0
- package/src/core/field-multi-select/package.json +11 -0
- package/src/core/field-number/field-number.vue +144 -0
- package/src/core/field-number/field-number.vue.d.ts +132 -0
- package/src/core/field-number/field-number.vue.d.ts.map +1 -0
- package/src/core/field-number/package.json +11 -0
- package/src/core/field-phone-number/field-phone-number.vue +151 -0
- package/src/core/field-phone-number/field-phone-number.vue.d.ts +76 -0
- package/src/core/field-phone-number/field-phone-number.vue.d.ts.map +1 -0
- package/src/core/field-phone-number/package.json +11 -0
- package/src/core/field-phone-number-country/field-phone-number-country.vue +60 -0
- package/src/core/field-phone-number-country/field-phone-number-country.vue.d.ts +18 -0
- package/src/core/field-phone-number-country/field-phone-number-country.vue.d.ts.map +1 -0
- package/src/core/field-phone-number-country/package.json +11 -0
- package/src/core/field-pick-list/field-pick-list.vue +285 -0
- package/src/core/field-pick-list/field-pick-list.vue.d.ts +43 -0
- package/src/core/field-pick-list/field-pick-list.vue.d.ts.map +1 -0
- package/src/core/field-pick-list/package.json +11 -0
- package/src/core/field-radio-block/field-radio-block.vue +108 -0
- package/src/core/field-radio-block/field-radio-block.vue.d.ts +115 -0
- package/src/core/field-radio-block/field-radio-block.vue.d.ts.map +1 -0
- package/src/core/field-radio-block/package.json +11 -0
- package/src/core/field-switch/field-switch.vue +41 -0
- package/src/core/field-switch/field-switch.vue.d.ts +33 -0
- package/src/core/field-switch/field-switch.vue.d.ts.map +1 -0
- package/src/core/field-switch/package.json +11 -0
- package/src/core/field-switch-block/field-switch-block.vue +123 -0
- package/src/core/field-switch-block/field-switch-block.vue.d.ts +123 -0
- package/src/core/field-switch-block/field-switch-block.vue.d.ts.map +1 -0
- package/src/core/field-switch-block/package.json +11 -0
- package/src/core/field-text/field-text.vue +128 -0
- package/src/core/field-text/field-text.vue.d.ts +108 -0
- package/src/core/field-text/field-text.vue.d.ts.map +1 -0
- package/src/core/field-text/package.json +11 -0
- package/src/core/field-text-area/field-text-area.vue +178 -0
- package/src/core/field-text-area/field-text-area.vue.d.ts +142 -0
- package/src/core/field-text-area/field-text-area.vue.d.ts.map +1 -0
- package/src/core/field-text-area/package.json +11 -0
- package/src/core/field-text-icon/field-text-icon.vue +127 -0
- package/src/core/field-text-icon/field-text-icon.vue.d.ts +100 -0
- package/src/core/field-text-icon/field-text-icon.vue.d.ts.map +1 -0
- package/src/core/field-text-icon/package.json +11 -0
- package/src/core/field-text-password/field-text-password.vue +127 -0
- package/src/core/field-text-password/field-text-password.vue.d.ts +108 -0
- package/src/core/field-text-password/field-text-password.vue.d.ts.map +1 -0
- package/src/core/field-text-password/package.json +11 -0
- package/src/core/label/label.vue +35 -0
- package/src/core/label/label.vue.d.ts +24 -0
- package/src/core/label/label.vue.d.ts.map +1 -0
- package/src/core/label/package.json +11 -0
- package/src/core/selector-block/package.json +11 -0
- package/src/core/selector-block/selector-block.vue +128 -0
- package/src/core/selector-block/selector-block.vue.d.ts +99 -0
- package/src/core/selector-block/selector-block.vue.d.ts.map +1 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
value: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
name: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
label: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
placeholder: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
description: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
optionLabel: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
optionValue: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
moreOptions: {
|
|
37
|
+
type: ArrayConstructor;
|
|
38
|
+
default: null;
|
|
39
|
+
};
|
|
40
|
+
optionDisabled: {
|
|
41
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
service: {
|
|
45
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
46
|
+
required: true;
|
|
47
|
+
};
|
|
48
|
+
loadService: {
|
|
49
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
50
|
+
required: true;
|
|
51
|
+
};
|
|
52
|
+
enableWorkaroundLabelToDisabledOptions: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
enableClearOption: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
disableEmitFirstRender: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
validationRules: {
|
|
65
|
+
type: ObjectConstructor;
|
|
66
|
+
default: () => {};
|
|
67
|
+
};
|
|
68
|
+
}>, {
|
|
69
|
+
refreshData: () => Promise<void>;
|
|
70
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
|
+
onBlur: (...args: any[]) => void;
|
|
72
|
+
onChange: (...args: any[]) => void;
|
|
73
|
+
onSelectOption: (...args: any[]) => void;
|
|
74
|
+
onAccessDenied: (...args: any[]) => void;
|
|
75
|
+
onClear: (...args: any[]) => void;
|
|
76
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
77
|
+
value: {
|
|
78
|
+
type: ArrayConstructor;
|
|
79
|
+
default: () => never[];
|
|
80
|
+
};
|
|
81
|
+
name: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
required: true;
|
|
84
|
+
};
|
|
85
|
+
label: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
placeholder: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
description: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
97
|
+
optionLabel: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
optionValue: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
moreOptions: {
|
|
106
|
+
type: ArrayConstructor;
|
|
107
|
+
default: null;
|
|
108
|
+
};
|
|
109
|
+
optionDisabled: {
|
|
110
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
service: {
|
|
114
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
115
|
+
required: true;
|
|
116
|
+
};
|
|
117
|
+
loadService: {
|
|
118
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
119
|
+
required: true;
|
|
120
|
+
};
|
|
121
|
+
enableWorkaroundLabelToDisabledOptions: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
enableClearOption: {
|
|
126
|
+
type: BooleanConstructor;
|
|
127
|
+
default: boolean;
|
|
128
|
+
};
|
|
129
|
+
disableEmitFirstRender: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
132
|
+
};
|
|
133
|
+
validationRules: {
|
|
134
|
+
type: ObjectConstructor;
|
|
135
|
+
default: () => {};
|
|
136
|
+
};
|
|
137
|
+
}>> & Readonly<{
|
|
138
|
+
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
139
|
+
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
140
|
+
onOnSelectOption?: ((...args: any[]) => any) | undefined;
|
|
141
|
+
onOnAccessDenied?: ((...args: any[]) => any) | undefined;
|
|
142
|
+
onOnClear?: ((...args: any[]) => any) | undefined;
|
|
143
|
+
}>, {
|
|
144
|
+
value: unknown[];
|
|
145
|
+
label: string;
|
|
146
|
+
placeholder: string;
|
|
147
|
+
description: string;
|
|
148
|
+
optionLabel: string;
|
|
149
|
+
optionDisabled: string | Function;
|
|
150
|
+
optionValue: string;
|
|
151
|
+
enableWorkaroundLabelToDisabledOptions: boolean;
|
|
152
|
+
moreOptions: unknown[];
|
|
153
|
+
enableClearOption: boolean;
|
|
154
|
+
disableEmitFirstRender: boolean;
|
|
155
|
+
validationRules: Record<string, any>;
|
|
156
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
157
|
+
type __VLS_Slots = {
|
|
158
|
+
footer?: ((props: {}) => any) | undefined;
|
|
159
|
+
} & {
|
|
160
|
+
description?: ((props: {}) => any) | undefined;
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=field-dropdown-multi-select-lazy-loader.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-dropdown-multi-select-lazy-loader.vue.d.ts","sourceRoot":"","sources":["field-dropdown-multi-select-lazy-loader.vue"],"names":[],"mappings":"wBAukCqB,OAAO,YAAY;;AADxC,4BAA2B,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;qBAEtD,CAAC,EAAE,CAAC;;;AApEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAiEG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "./field-dropdown-multi-select-lazy-loader.vue",
|
|
3
|
+
"module": "./field-dropdown-multi-select-lazy-loader.vue",
|
|
4
|
+
"types": "./field-dropdown-multi-select-lazy-loader.vue.d.ts",
|
|
5
|
+
"browser": {
|
|
6
|
+
"./sfc": "./field-dropdown-multi-select-lazy-loader.vue"
|
|
7
|
+
},
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"*.vue"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import FieldCheckboxBlock from '../field-checkbox-block'
|
|
3
|
+
import { computed, ref } from 'vue'
|
|
4
|
+
import PrimeDivider from 'primevue/divider'
|
|
5
|
+
|
|
6
|
+
defineOptions({ name: 'FieldGroupCheckbox' })
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
hideSelector: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
auto: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
isCard: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
25
|
+
options: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
helpText: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ''
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
hasDivider: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
const pickListSize = ref(props.options.length - 1)
|
|
44
|
+
|
|
45
|
+
const classStateRoot = computed(() => ({
|
|
46
|
+
'p-disabled': props.disabled
|
|
47
|
+
}))
|
|
48
|
+
|
|
49
|
+
const classListSelector = computed(() => ({
|
|
50
|
+
'flex-wrap': props.auto,
|
|
51
|
+
'flex-col': !props.auto,
|
|
52
|
+
'gap-3': props.isCard
|
|
53
|
+
}))
|
|
54
|
+
|
|
55
|
+
const showDivider = (position) => {
|
|
56
|
+
return position < pickListSize.value && !props.isCard
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const isRenderDivider = (index) => {
|
|
60
|
+
return showDivider(index) && props.hasDivider
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<div :class="['flex flex-col gap-2', classStateRoot]">
|
|
66
|
+
<label class="text-color text-base font-medium leading-5">
|
|
67
|
+
{{ props.label }}
|
|
68
|
+
</label>
|
|
69
|
+
<div
|
|
70
|
+
class="flex"
|
|
71
|
+
:class="classListSelector"
|
|
72
|
+
>
|
|
73
|
+
<template
|
|
74
|
+
v-for="(item, index) in props.options"
|
|
75
|
+
:key="index"
|
|
76
|
+
>
|
|
77
|
+
<FieldCheckboxBlock
|
|
78
|
+
:nameField="item.nameField"
|
|
79
|
+
:name="`${item.nameField}-checkbox-${index}`"
|
|
80
|
+
:auto="props.auto"
|
|
81
|
+
:hideSelector="props.hideSelector"
|
|
82
|
+
:isCard="props.isCard"
|
|
83
|
+
v-bind="item"
|
|
84
|
+
>
|
|
85
|
+
<template #footer>
|
|
86
|
+
<slot :item="item" />
|
|
87
|
+
</template>
|
|
88
|
+
</FieldCheckboxBlock>
|
|
89
|
+
<PrimeDivider
|
|
90
|
+
v-if="isRenderDivider(index)"
|
|
91
|
+
class="my-2"
|
|
92
|
+
/>
|
|
93
|
+
</template>
|
|
94
|
+
</div>
|
|
95
|
+
<small
|
|
96
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
97
|
+
v-if="props.helpText"
|
|
98
|
+
>
|
|
99
|
+
{{ props.helpText }}
|
|
100
|
+
</small>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
hideSelector: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
auto: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
isCard: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
label: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
options: {
|
|
25
|
+
type: ArrayConstructor;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
helpText: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
hasDivider: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
hideSelector: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
auto: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
isCard: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
label: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
options: {
|
|
58
|
+
type: ArrayConstructor;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
helpText: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
disabled: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
69
|
+
hasDivider: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
}>> & Readonly<{}>, {
|
|
74
|
+
label: string;
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
auto: boolean;
|
|
77
|
+
isCard: boolean;
|
|
78
|
+
hideSelector: boolean;
|
|
79
|
+
helpText: string;
|
|
80
|
+
hasDivider: boolean;
|
|
81
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
82
|
+
type __VLS_Slots = {
|
|
83
|
+
default?: ((props: {
|
|
84
|
+
item: unknown;
|
|
85
|
+
}) => any) | undefined;
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=field-group-checkbox.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-checkbox.vue.d.ts","sourceRoot":"","sources":["field-group-checkbox.vue"],"names":[],"mappings":"wBAsTqB,OAAO,YAAY;;AADxC,4BAA2B,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;qBAEtD,CAAC,EAAE,CAAC;;;AAtCzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAmCG"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import FieldRadioBlock from '../field-radio-block'
|
|
3
|
+
import { useField } from 'vee-validate'
|
|
4
|
+
import { computed, ref, toRefs, useAttrs } from 'vue'
|
|
5
|
+
import PrimeDivider from 'primevue/divider'
|
|
6
|
+
|
|
7
|
+
defineOptions({ name: 'FieldGroupRadio' })
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits(['onRadioChange'])
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
hideSelector: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
auto: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
isCard: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ''
|
|
27
|
+
},
|
|
28
|
+
options: {
|
|
29
|
+
type: Array,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
helpText: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ''
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
nameField: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
isRequired: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const { nameField } = toRefs(props)
|
|
51
|
+
const { errorMessage } = useField(nameField)
|
|
52
|
+
const pickListSize = ref(props.options.length - 1)
|
|
53
|
+
|
|
54
|
+
const classStateRoot = computed(() => ({
|
|
55
|
+
'p-disabled': props.disabled
|
|
56
|
+
}))
|
|
57
|
+
|
|
58
|
+
const classListSelector = computed(() => ({
|
|
59
|
+
'flex-wrap': props.auto,
|
|
60
|
+
'flex-col': !props.auto,
|
|
61
|
+
'gap-3': props.isCard
|
|
62
|
+
}))
|
|
63
|
+
|
|
64
|
+
const showDivider = (position) => {
|
|
65
|
+
return position < pickListSize.value && !props.isCard
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const attrs = useAttrs()
|
|
69
|
+
|
|
70
|
+
const customTestId = computed(() => {
|
|
71
|
+
const id = attrs['data-testid'] || 'field-radio'
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
label: `${id}__label`,
|
|
75
|
+
radio: `${id}__radio`,
|
|
76
|
+
description: `${id}__description`,
|
|
77
|
+
error: `${id}__error-message`
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const radioTestId = (name, nameField, index) => {
|
|
82
|
+
const remainder = name ?? `${nameField}-radio-${index}`
|
|
83
|
+
return `${customTestId.value.radio}__${remainder}`
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<template>
|
|
88
|
+
<div :class="['flex flex-col gap-2', classStateRoot]">
|
|
89
|
+
<label
|
|
90
|
+
class="text-color text-base font-medium leading-5 flex gap-1 align-items-center"
|
|
91
|
+
:data-testid="customTestId.label"
|
|
92
|
+
>
|
|
93
|
+
{{ props.label }}
|
|
94
|
+
<div
|
|
95
|
+
v-if="props.isRequired"
|
|
96
|
+
class="text-sm text-orange-500 flex gap-1"
|
|
97
|
+
>
|
|
98
|
+
*
|
|
99
|
+
<span class="text-[0.625rem] text-color-secondary">(Required)</span>
|
|
100
|
+
</div>
|
|
101
|
+
</label>
|
|
102
|
+
<div
|
|
103
|
+
class="flex"
|
|
104
|
+
:class="classListSelector"
|
|
105
|
+
>
|
|
106
|
+
<template
|
|
107
|
+
v-for="(item, index) in props.options"
|
|
108
|
+
:key="index"
|
|
109
|
+
>
|
|
110
|
+
<FieldRadioBlock
|
|
111
|
+
v-show="!item.hide"
|
|
112
|
+
:nameField="props.nameField"
|
|
113
|
+
:name="item.name ?? `${props.nameField}-radio-${index}`"
|
|
114
|
+
:auto="props.auto"
|
|
115
|
+
:hideSelector="props.hideSelector"
|
|
116
|
+
:isCard="props.isCard"
|
|
117
|
+
v-bind="item"
|
|
118
|
+
@onRadioChange="emit('onRadioChange', item.inputValue)"
|
|
119
|
+
:data-testid="radioTestId(item.name, props.nameField, index)"
|
|
120
|
+
>
|
|
121
|
+
<template #footer>
|
|
122
|
+
<slot
|
|
123
|
+
name="footer"
|
|
124
|
+
:item="item"
|
|
125
|
+
/>
|
|
126
|
+
</template>
|
|
127
|
+
</FieldRadioBlock>
|
|
128
|
+
<PrimeDivider
|
|
129
|
+
v-if="showDivider(index)"
|
|
130
|
+
class="my-2"
|
|
131
|
+
/>
|
|
132
|
+
</template>
|
|
133
|
+
</div>
|
|
134
|
+
<small
|
|
135
|
+
class="text-xs text-color-secondary font-normal leading-5"
|
|
136
|
+
v-if="props.helpText"
|
|
137
|
+
:data-testid="customTestId.description"
|
|
138
|
+
>
|
|
139
|
+
{{ props.helpText }}
|
|
140
|
+
</small>
|
|
141
|
+
<small
|
|
142
|
+
v-if="errorMessage"
|
|
143
|
+
:data-testid="customTestId.error"
|
|
144
|
+
class="p-error text-xs font-normal leading-tight"
|
|
145
|
+
>
|
|
146
|
+
{{ errorMessage }}
|
|
147
|
+
</small>
|
|
148
|
+
</div>
|
|
149
|
+
</template>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
hideSelector: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
auto: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
isCard: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
label: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
options: {
|
|
25
|
+
type: ArrayConstructor;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
helpText: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
nameField: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
isRequired: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
+
onRadioChange: (...args: any[]) => void;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
hideSelector: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
auto: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
isCard: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
label: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
options: {
|
|
64
|
+
type: ArrayConstructor;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
helpText: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
disabled: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
nameField: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
required: true;
|
|
78
|
+
};
|
|
79
|
+
isRequired: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
}>> & Readonly<{
|
|
84
|
+
onOnRadioChange?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
}>, {
|
|
86
|
+
label: string;
|
|
87
|
+
disabled: boolean;
|
|
88
|
+
auto: boolean;
|
|
89
|
+
isCard: boolean;
|
|
90
|
+
hideSelector: boolean;
|
|
91
|
+
helpText: string;
|
|
92
|
+
isRequired: boolean;
|
|
93
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
94
|
+
type __VLS_Slots = {
|
|
95
|
+
footer?: ((props: {
|
|
96
|
+
item: unknown;
|
|
97
|
+
}) => any) | undefined;
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=field-group-radio.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-radio.vue.d.ts","sourceRoot":"","sources":["field-group-radio.vue"],"names":[],"mappings":"wBAmbqB,OAAO,YAAY;;AADxC,4BAA2B,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;qBAEtD,CAAC,EAAE,CAAC;;;AA3CzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAwCG"}
|