@simsustech/quasar-components 0.12.0 → 0.12.2
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/CHANGELOG.md +12 -0
- package/dist/LocaleSelect-BtwfPrmu.js +461 -0
- package/dist/QSubmitButton-CDKwJhmF.js +102 -0
- package/dist/authentication.js +1936 -2031
- package/dist/de-C-vWIfjC.js +12 -0
- package/dist/de-DC33TYVA.js +354 -0
- package/dist/de-DO8EeJ0Q.js +4 -0
- package/dist/de-Kz_vvc9w.js +106 -0
- package/dist/form.js +1092 -1226
- package/dist/general.js +319 -361
- package/dist/md3.js +407 -395
- package/dist/nl-DIfqXZG_.js +354 -0
- package/dist/nl-DWmQiCdO.js +12 -0
- package/dist/nl-DbV07Lx7.js +106 -0
- package/dist/nl-ZpgX9FUw.js +4 -0
- package/dist/quasar-components.css +5 -4
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/types/{ui → src/ui}/authentication/LoginForm.vue.d.ts +5 -0
- package/dist/types/src/ui/form/lang/nl.d.ts +3 -0
- package/dist/types/src/ui/general/lang/nl.d.ts +3 -0
- package/dist/types/src/ui/md3/lang/de.d.ts +3 -0
- package/dist/types/src/ui/md3/lang/en-US.d.ts +3 -0
- package/dist/types/src/ui/md3/lang/nl.d.ts +3 -0
- package/dist/virtualModules.js +62 -2
- package/dist/vite-plugin.js +50 -101
- package/package.json +33 -33
- package/src/ui/authentication/LoginForm.vue +9 -4
- package/src/ui/authentication/lang/de.ts +118 -0
- package/src/ui/authentication/lang/en-US.ts +1 -1
- package/src/ui/flags/lang/de.ts +384 -0
- package/src/ui/form/lang/de.ts +211 -0
- package/src/ui/general/lang/de.ts +13 -0
- package/src/ui/md3/lang/de.ts +7 -0
- package/tsconfig.json +1 -0
- package/tsconfig.node.json +2 -1
- package/tsconfig.types.json +2 -1
- package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-e2EDOyzk.js +0 -353
- package/dist/QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.js +0 -109
- package/dist/nl-BRjDNoaR.js +0 -209
- package/dist/nl-CneFq5NZ.js +0 -112
- package/dist/nl-NLgZUAKl.js +0 -6
- package/dist/nl-X50pmfG-.js +0 -12
- package/eslint.config.js +0 -29
- package/dist/types/{ui → src/ui}/authentication/AccountsTable.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/ConsentList.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/EmailChangeForm.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/EmailChangeStepper.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/LoginButton.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/LogoutButton.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/LogoutForm.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/OtpInput.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/PasswordChangeForm.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/PasswordChangeStepper.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/RegisterForm.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/RequestOtpForm.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/UserMenuButton.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/VerificationSlider.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/index.d.ts +0 -0
- package/dist/types/{ui/authentication/lang/en-US.d.ts → src/ui/authentication/lang/de.d.ts} +0 -0
- package/dist/types/{ui/flags → src/ui/authentication}/lang/en-US.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/lang/index.d.ts +0 -0
- package/dist/types/{ui → src/ui}/authentication/lang/nl.d.ts +0 -0
- package/dist/types/{ui → src/ui}/flags/index.d.ts +0 -0
- package/dist/types/{ui/flags/lang/nl.d.ts → src/ui/flags/lang/de.d.ts} +0 -0
- package/dist/types/{ui/general → src/ui/flags}/lang/en-US.d.ts +0 -0
- package/dist/types/{ui → src/ui}/flags/lang/index.d.ts +0 -0
- package/dist/types/{ui/general → src/ui/flags}/lang/nl.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/BooleanItem.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/BooleanSelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/CountrySelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/CronScheduleInput.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/CurrencySelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/DateInput.vue.d.ts +1 -1
- package/dist/types/{ui → src/ui}/form/DatePicker.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/EmailInput.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/FilteredModelSelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/FormInput.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/FormItem.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/GenderItem.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/GenderSelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/LocaleSelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/PostalCodeInput.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/TelephoneNumberInput.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/form/index.d.ts +0 -0
- package/dist/types/{ui/form/lang/en-US.d.ts → src/ui/form/lang/de.d.ts} +0 -0
- package/dist/types/{ui/form/lang/nl.d.ts → src/ui/form/lang/en-US.d.ts} +0 -0
- package/dist/types/{ui → src/ui}/form/lang/index.d.ts +2 -2
- package/dist/types/{ui → src/ui}/general/QDrawerList.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/general/QLanguageSelect.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/general/QStyledCard.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/general/QStyledLayout.vue.d.ts +0 -0
- package/dist/types/{ui → src/ui}/general/QSubmitButton.vue.d.ts +1 -1
- package/dist/types/{ui → src/ui}/general/ResourcePage.vue.d.ts +1 -1
- /package/dist/types/{ui → src/ui}/general/ResponsiveDialog.vue.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/general/index.d.ts +0 -0
- /package/dist/types/{ui/md3/lang/en-US.d.ts → src/ui/general/lang/de.d.ts} +0 -0
- /package/dist/types/{ui/md3/lang/nl.d.ts → src/ui/general/lang/en-US.d.ts} +0 -0
- /package/dist/types/{ui → src/ui}/general/lang/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/icons/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/icons/labels.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/md3/Md3Layout.vue.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/md3/NavigationRailFabs.vue.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/md3/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/md3/lang/index.d.ts +0 -0
- /package/dist/types/{virtualModules.d.ts → src/virtualModules.d.ts} +0 -0
- /package/dist/types/{vite-plugin.d.ts → src/vite-plugin.d.ts} +0 -0
package/dist/form.js
CHANGED
|
@@ -1,1243 +1,1109 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
}
|
|
1
|
+
import { n as loadLang, r as useLang, t as LocaleSelect_default } from "./LocaleSelect-BtwfPrmu.js";
|
|
2
|
+
import { QBtn, QDate, QEditor, QField, QIcon, QInput, QItem, QItemLabel, QItemSection, QPopupProxy, QSelect, QTooltip, useQuasar } from "quasar";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, ref, renderList, renderSlot, resolveDirective, resolveDynamicComponent, toDisplayString, toRefs, unref, useAttrs, useSlots, watch, withAsyncContext, withCtx, withDirectives } from "vue";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/ui/form/GenderSelect.vue
|
|
6
|
+
var GenderSelect_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "GenderSelect",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {},
|
|
10
|
+
disableOther: { type: Boolean },
|
|
11
|
+
required: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
async setup(__props) {
|
|
15
|
+
let __temp, __restore;
|
|
16
|
+
const props = __props;
|
|
17
|
+
const attrs = useAttrs();
|
|
18
|
+
const lang = useLang();
|
|
19
|
+
const $q = useQuasar();
|
|
20
|
+
if (lang.value.isoName !== $q.lang.isoName) [__temp, __restore] = withAsyncContext(() => loadLang($q.lang.isoName)), await __temp, __restore();
|
|
21
|
+
watch($q.lang, () => {
|
|
22
|
+
loadLang($q.lang.isoName);
|
|
23
|
+
});
|
|
24
|
+
const genderOptions = ref([{
|
|
25
|
+
label: lang.value.gender.male,
|
|
26
|
+
value: "male"
|
|
27
|
+
}, {
|
|
28
|
+
label: lang.value.gender.female,
|
|
29
|
+
value: "female"
|
|
30
|
+
}]);
|
|
31
|
+
if (!props.disableOther) genderOptions.value.push({
|
|
32
|
+
label: lang.value.gender.other,
|
|
33
|
+
value: "other"
|
|
34
|
+
});
|
|
35
|
+
const validations = ref([]);
|
|
36
|
+
if (props.required) validations.value.push((val) => !!val || lang.value.validations.fieldRequired);
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
39
|
+
rules: validations.value,
|
|
40
|
+
"model-value": __props.modelValue,
|
|
41
|
+
options: genderOptions.value,
|
|
42
|
+
label: `${unref(lang).gender.gender}${__props.required ? "*" : ""}`,
|
|
43
|
+
"emit-value": "",
|
|
44
|
+
"map-options": "",
|
|
45
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
46
|
+
}), null, 16, [
|
|
47
|
+
"rules",
|
|
48
|
+
"model-value",
|
|
49
|
+
"options",
|
|
50
|
+
"label"
|
|
51
|
+
]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
56
54
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
]),
|
|
88
|
-
_: 1
|
|
89
|
-
})
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
}, 16);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/ui/form/GenderItem.vue
|
|
57
|
+
var GenderItem_default = /* @__PURE__ */ defineComponent({
|
|
58
|
+
__name: "GenderItem",
|
|
59
|
+
props: { modelValue: {} },
|
|
60
|
+
setup(__props) {
|
|
61
|
+
const attrs = useAttrs();
|
|
62
|
+
const lang = useLang();
|
|
63
|
+
const $q = useQuasar();
|
|
64
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
|
|
65
|
+
watch($q.lang, () => {
|
|
66
|
+
loadLang($q.lang.isoName);
|
|
67
|
+
});
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createBlock(unref(QItem), normalizeProps(guardReactiveProps(unref(attrs))), {
|
|
70
|
+
default: withCtx(() => [createVNode(unref(QItemSection), null, {
|
|
71
|
+
default: withCtx(() => [createVNode(unref(QItemLabel), { overline: "" }, {
|
|
72
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).gender.gender), 1)]),
|
|
73
|
+
_: 1
|
|
74
|
+
}), createVNode(unref(QItemLabel), null, {
|
|
75
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.modelValue ? unref(lang).gender[__props.modelValue] : ""), 1)]),
|
|
76
|
+
_: 1
|
|
77
|
+
})]),
|
|
78
|
+
_: 1
|
|
79
|
+
})]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 16);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
95
84
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
138
|
-
}), null, 16, ["mask", "rules", "model-value", "label"]);
|
|
139
|
-
};
|
|
140
|
-
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/ui/form/PostalCodeInput.vue
|
|
87
|
+
var PostalCodeInput_default = /* @__PURE__ */ defineComponent({
|
|
88
|
+
__name: "PostalCodeInput",
|
|
89
|
+
props: {
|
|
90
|
+
modelValue: {},
|
|
91
|
+
country: {},
|
|
92
|
+
required: { type: Boolean }
|
|
93
|
+
},
|
|
94
|
+
emits: ["update:modelValue"],
|
|
95
|
+
setup(__props) {
|
|
96
|
+
const props = __props;
|
|
97
|
+
const lang = useLang();
|
|
98
|
+
const attrs = useAttrs();
|
|
99
|
+
const { country } = toRefs(props);
|
|
100
|
+
const masks = ref({ NL: "#### AA" });
|
|
101
|
+
const validations = ref({ NL: [(val) => !val || /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(val) || lang.value.postalCode.validations.invalidPostalCode] });
|
|
102
|
+
const computedMask = computed(() => {
|
|
103
|
+
if (country.value && masks.value[country.value]) return masks.value[country.value];
|
|
104
|
+
});
|
|
105
|
+
const computedValidations = computed(() => {
|
|
106
|
+
const val = [];
|
|
107
|
+
if (country.value && validations.value[country.value]) val.push(...validations.value[country.value]);
|
|
108
|
+
if (props.required) val.push((val) => !!val || lang.value.validations.fieldRequired);
|
|
109
|
+
return val;
|
|
110
|
+
});
|
|
111
|
+
return (_ctx, _cache) => {
|
|
112
|
+
return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
|
|
113
|
+
mask: computedMask.value,
|
|
114
|
+
rules: computedValidations.value,
|
|
115
|
+
"model-value": __props.modelValue,
|
|
116
|
+
label: `${unref(lang).postalCode.postalCode}${__props.required ? "*" : ""}`,
|
|
117
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
118
|
+
}), null, 16, [
|
|
119
|
+
"mask",
|
|
120
|
+
"rules",
|
|
121
|
+
"model-value",
|
|
122
|
+
"label"
|
|
123
|
+
]);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
141
126
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
renderSlot(_ctx.$slots, "side")
|
|
193
|
-
]),
|
|
194
|
-
_: 3
|
|
195
|
-
})) : createCommentVNode("", true)
|
|
196
|
-
]),
|
|
197
|
-
_: 3
|
|
198
|
-
}, 16);
|
|
199
|
-
};
|
|
200
|
-
}
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/ui/form/FormItem.vue
|
|
129
|
+
var FormItem_default = /* @__PURE__ */ defineComponent({
|
|
130
|
+
__name: "FormItem",
|
|
131
|
+
props: {
|
|
132
|
+
modelValue: {},
|
|
133
|
+
label: {},
|
|
134
|
+
field: {}
|
|
135
|
+
},
|
|
136
|
+
setup(__props) {
|
|
137
|
+
const attrs = useAttrs();
|
|
138
|
+
const slots = useSlots();
|
|
139
|
+
const lang = useLang();
|
|
140
|
+
const $q = useQuasar();
|
|
141
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
|
|
142
|
+
watch($q.lang, () => {
|
|
143
|
+
loadLang($q.lang.isoName);
|
|
144
|
+
});
|
|
145
|
+
return (_ctx, _cache) => {
|
|
146
|
+
return openBlock(), createBlock(unref(QItem), normalizeProps(guardReactiveProps(unref(attrs))), {
|
|
147
|
+
default: withCtx(() => [
|
|
148
|
+
unref(slots).avatar ? (openBlock(), createBlock(unref(QItemSection), {
|
|
149
|
+
key: 0,
|
|
150
|
+
avatar: ""
|
|
151
|
+
}, {
|
|
152
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "avatar")]),
|
|
153
|
+
_: 3
|
|
154
|
+
})) : createCommentVNode("", true),
|
|
155
|
+
createVNode(unref(QItemSection), null, {
|
|
156
|
+
default: withCtx(() => [createVNode(unref(QItemLabel), { overline: "" }, {
|
|
157
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.label ? __props.label : __props.field ? unref(lang).fields[__props.field] : ""), 1)]),
|
|
158
|
+
_: 1
|
|
159
|
+
}), createVNode(unref(QItemLabel), { class: "break-all" }, {
|
|
160
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.modelValue || "-"), 1)]),
|
|
161
|
+
_: 1
|
|
162
|
+
})]),
|
|
163
|
+
_: 1
|
|
164
|
+
}),
|
|
165
|
+
unref(slots).side ? (openBlock(), createBlock(unref(QItemSection), {
|
|
166
|
+
key: 1,
|
|
167
|
+
side: ""
|
|
168
|
+
}, {
|
|
169
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "side")]),
|
|
170
|
+
_: 3
|
|
171
|
+
})) : createCommentVNode("", true)
|
|
172
|
+
]),
|
|
173
|
+
_: 3
|
|
174
|
+
}, 16);
|
|
175
|
+
};
|
|
176
|
+
}
|
|
201
177
|
});
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/ui/form/FormInput.vue
|
|
180
|
+
var FormInput_default = /* @__PURE__ */ defineComponent({
|
|
181
|
+
__name: "FormInput",
|
|
182
|
+
props: {
|
|
183
|
+
modelValue: {},
|
|
184
|
+
field: {},
|
|
185
|
+
label: {},
|
|
186
|
+
required: { type: Boolean }
|
|
187
|
+
},
|
|
188
|
+
setup(__props) {
|
|
189
|
+
const props = __props;
|
|
190
|
+
const attrs = useAttrs();
|
|
191
|
+
const lang = useLang();
|
|
192
|
+
const $q = useQuasar();
|
|
193
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
|
|
194
|
+
watch($q.lang, () => {
|
|
195
|
+
loadLang($q.lang.isoName);
|
|
196
|
+
});
|
|
197
|
+
const validations = ref([]);
|
|
198
|
+
if (props.required) validations.value.push((val) => !!val || lang.value.validations.fieldRequired);
|
|
199
|
+
return (_ctx, _cache) => {
|
|
200
|
+
return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
|
|
201
|
+
rules: validations.value,
|
|
202
|
+
"model-value": __props.modelValue,
|
|
203
|
+
label: `${__props.field ? unref(lang).fields[__props.field] : __props.label ? __props.label : ""}${__props.required ? "*" : ""}`,
|
|
204
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
205
|
+
}), createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, slot) => {
|
|
206
|
+
return {
|
|
207
|
+
name: slot,
|
|
208
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))])
|
|
209
|
+
};
|
|
210
|
+
})]), 1040, [
|
|
211
|
+
"rules",
|
|
212
|
+
"model-value",
|
|
213
|
+
"label"
|
|
214
|
+
]);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
242
217
|
});
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/ui/form/TelephoneNumberInput.vue
|
|
220
|
+
var TelephoneNumberInput_default = /* @__PURE__ */ defineComponent({
|
|
221
|
+
__name: "TelephoneNumberInput",
|
|
222
|
+
props: {
|
|
223
|
+
modelValue: {},
|
|
224
|
+
required: { type: Boolean }
|
|
225
|
+
},
|
|
226
|
+
emits: ["update:modelValue"],
|
|
227
|
+
setup(__props) {
|
|
228
|
+
/**
|
|
229
|
+
* To do: add mask and country prefix
|
|
230
|
+
*/
|
|
231
|
+
const props = __props;
|
|
232
|
+
const lang = useLang();
|
|
233
|
+
const attrs = useAttrs();
|
|
234
|
+
const validations = ref([]);
|
|
235
|
+
if (props.required) validations.value.push((val) => !!val || lang.value.validations.fieldRequired);
|
|
236
|
+
return (_ctx, _cache) => {
|
|
237
|
+
return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
|
|
238
|
+
rules: validations.value,
|
|
239
|
+
"model-value": __props.modelValue,
|
|
240
|
+
label: `${unref(lang).fields.telephoneNumber}${__props.required ? "*" : ""}`,
|
|
241
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
242
|
+
}), null, 16, [
|
|
243
|
+
"rules",
|
|
244
|
+
"model-value",
|
|
245
|
+
"label"
|
|
246
|
+
]);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
268
249
|
});
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/ui/form/DateInput.vue?vue&type=script&setup=true&lang.ts
|
|
252
|
+
var _hoisted_1$2 = { class: "row" };
|
|
253
|
+
var _hoisted_2$1 = {
|
|
254
|
+
key: 0,
|
|
255
|
+
style: {
|
|
256
|
+
"margin-top": "1em",
|
|
257
|
+
"width": "1ch"
|
|
258
|
+
}
|
|
273
259
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}), {
|
|
493
|
-
default: withCtx(() => [
|
|
494
|
-
createElementVNode("div", _hoisted_3, [
|
|
495
|
-
withDirectives(createVNode(_component_q_btn, {
|
|
496
|
-
label: unref(lang).buttons.close,
|
|
497
|
-
color: "primary",
|
|
498
|
-
flat: ""
|
|
499
|
-
}, null, 8, ["label"]), [
|
|
500
|
-
[_directive_close_popup]
|
|
501
|
-
])
|
|
502
|
-
])
|
|
503
|
-
]),
|
|
504
|
-
_: 1
|
|
505
|
-
}, 16, ["model-value"])
|
|
506
|
-
]),
|
|
507
|
-
_: 1
|
|
508
|
-
})
|
|
509
|
-
]),
|
|
510
|
-
_: 1
|
|
511
|
-
}, 8, ["name"])
|
|
512
|
-
]),
|
|
513
|
-
_: 2
|
|
514
|
-
}, [
|
|
515
|
-
renderList(_ctx.$slots, (_2, slot) => {
|
|
516
|
-
return {
|
|
517
|
-
name: slot,
|
|
518
|
-
fn: withCtx((scope) => [
|
|
519
|
-
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))
|
|
520
|
-
])
|
|
521
|
-
};
|
|
522
|
-
})
|
|
523
|
-
]), 1032, ["model-value", "rules", "label"]);
|
|
524
|
-
};
|
|
525
|
-
}
|
|
260
|
+
var _hoisted_3 = { class: "row items-center justify-end" };
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region src/ui/form/DateInput.vue
|
|
263
|
+
var DateInput_default = /* @__PURE__ */ defineComponent({
|
|
264
|
+
__name: "DateInput",
|
|
265
|
+
props: {
|
|
266
|
+
modelValue: {},
|
|
267
|
+
format: { default: "YYYY-MM-DD" },
|
|
268
|
+
locale: { default: "en-US" },
|
|
269
|
+
label: { default: "" },
|
|
270
|
+
required: { type: Boolean },
|
|
271
|
+
clearable: { type: Boolean },
|
|
272
|
+
date: { default: () => ({}) },
|
|
273
|
+
icons: { default: () => ({
|
|
274
|
+
event: "event",
|
|
275
|
+
clear: "clear"
|
|
276
|
+
}) }
|
|
277
|
+
},
|
|
278
|
+
emits: ["update:modelValue"],
|
|
279
|
+
setup(__props, { emit: __emit }) {
|
|
280
|
+
const props = __props;
|
|
281
|
+
const emit = __emit;
|
|
282
|
+
const lang = useLang();
|
|
283
|
+
const { modelValue, format, locale } = toRefs(props);
|
|
284
|
+
const year = ref();
|
|
285
|
+
const month = ref();
|
|
286
|
+
const day = ref();
|
|
287
|
+
const setYear = (val) => {
|
|
288
|
+
const nr = Number(val);
|
|
289
|
+
if (nr && nr > 1e3 && nr < 1e4) year.value = nr;
|
|
290
|
+
else year.value = void 0;
|
|
291
|
+
};
|
|
292
|
+
const setMonth = (val) => {
|
|
293
|
+
const nr = Number(val);
|
|
294
|
+
if (nr && nr > 0 && nr < 13) month.value = nr;
|
|
295
|
+
else month.value = void 0;
|
|
296
|
+
};
|
|
297
|
+
const setDay = (val) => {
|
|
298
|
+
const nr = Number(val);
|
|
299
|
+
if (nr && nr > 0 && nr < 32) day.value = nr;
|
|
300
|
+
else day.value = void 0;
|
|
301
|
+
};
|
|
302
|
+
const setInternalDate = (dateString, separator = "-") => {
|
|
303
|
+
if (dateString) {
|
|
304
|
+
const [yearPart, monthPart, dayPart] = dateString.split(separator);
|
|
305
|
+
if (yearPart && monthPart && dayPart) {
|
|
306
|
+
year.value = Number(yearPart);
|
|
307
|
+
month.value = Number(monthPart);
|
|
308
|
+
day.value = Number(dayPart);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const setDate = (value) => {
|
|
313
|
+
setInternalDate(value, "/");
|
|
314
|
+
};
|
|
315
|
+
watch([
|
|
316
|
+
year,
|
|
317
|
+
month,
|
|
318
|
+
day
|
|
319
|
+
], () => {
|
|
320
|
+
const date = `${year.value}-${String(month.value).padStart(2, "0")}-${String(day.value).padStart(2, "0")}`;
|
|
321
|
+
if (year.value && month.value && day.value && !isNaN(Date.parse(date))) emit("update:modelValue", date);
|
|
322
|
+
else if (modelValue.value !== null) emit("update:modelValue", null);
|
|
323
|
+
});
|
|
324
|
+
const formattedDate = computed(() => {
|
|
325
|
+
if (modelValue.value) return new Date(Date.parse(modelValue.value)).toLocaleDateString(locale.value, {
|
|
326
|
+
weekday: "long",
|
|
327
|
+
year: "numeric",
|
|
328
|
+
month: "short",
|
|
329
|
+
day: "numeric"
|
|
330
|
+
});
|
|
331
|
+
return "";
|
|
332
|
+
});
|
|
333
|
+
watch(modelValue, (newVal) => {
|
|
334
|
+
if (newVal) setInternalDate(newVal);
|
|
335
|
+
else if (newVal === null) {
|
|
336
|
+
year.value = void 0;
|
|
337
|
+
month.value = void 0;
|
|
338
|
+
day.value = void 0;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
setInternalDate(modelValue.value);
|
|
342
|
+
const goToNextElement = (e) => {
|
|
343
|
+
if (["Minus", "Slash"].includes(e.code)) {
|
|
344
|
+
e.preventDefault();
|
|
345
|
+
const next = e.currentTarget.parentElement?.parentElement?.parentElement?.parentElement?.nextElementSibling;
|
|
346
|
+
if (next) next.focus();
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
const dateProps = computed(() => ({
|
|
350
|
+
YYYY: {
|
|
351
|
+
modelValue: year.value,
|
|
352
|
+
placeholder: lang.value.datePicker.YYYY,
|
|
353
|
+
style: {
|
|
354
|
+
"max-width": format.value === "YYYY-MM-DD" ? "8ch" : "7ch",
|
|
355
|
+
"margin-top": "-1.7em",
|
|
356
|
+
"margin-bottom": "-0.5em",
|
|
357
|
+
background: "transparent",
|
|
358
|
+
border: 0
|
|
359
|
+
},
|
|
360
|
+
class: format.value !== "YYYY-MM-DD" ? "q-mb-none q-ml-none" : void 0,
|
|
361
|
+
inputClass: "text-center",
|
|
362
|
+
"onUpdate:modelValue": setYear,
|
|
363
|
+
onKeydown: goToNextElement
|
|
364
|
+
},
|
|
365
|
+
MM: {
|
|
366
|
+
modelValue: month.value ? String(month.value).padStart(2, "0") : "",
|
|
367
|
+
placeholder: lang.value.datePicker.MM,
|
|
368
|
+
style: {
|
|
369
|
+
"max-width": "7ch",
|
|
370
|
+
"margin-top": "-1.7em",
|
|
371
|
+
"margin-bottom": "-0.5em",
|
|
372
|
+
background: "transparent",
|
|
373
|
+
border: 0
|
|
374
|
+
},
|
|
375
|
+
class: "q-ml-none",
|
|
376
|
+
inputClass: "text-center",
|
|
377
|
+
"onUpdate:modelValue": setMonth,
|
|
378
|
+
onKeydown: goToNextElement
|
|
379
|
+
},
|
|
380
|
+
DD: {
|
|
381
|
+
modelValue: day.value ? String(day.value).padStart(2, "0") : "",
|
|
382
|
+
placeholder: lang.value.datePicker.DD,
|
|
383
|
+
style: {
|
|
384
|
+
"max-width": format.value === "DD-MM-YYYY" ? "7ch" : "4ch",
|
|
385
|
+
"margin-top": "-1.7em",
|
|
386
|
+
"margin-bottom": "-0.5em",
|
|
387
|
+
background: "transparent",
|
|
388
|
+
border: 0
|
|
389
|
+
},
|
|
390
|
+
class: format.value === "YYYY-MM-DD" ? "q-ml-none" : void 0,
|
|
391
|
+
inputClass: "text-center",
|
|
392
|
+
"onUpdate:modelValue": setDay,
|
|
393
|
+
onKeydown: goToNextElement
|
|
394
|
+
}
|
|
395
|
+
}));
|
|
396
|
+
const validations = ref([(v) => {
|
|
397
|
+
if (v !== null) return /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/.test(v);
|
|
398
|
+
return true;
|
|
399
|
+
}]);
|
|
400
|
+
if (props.required) validations.value.push((val) => !!val || lang.value.validations.fieldRequired);
|
|
401
|
+
return (_ctx, _cache) => {
|
|
402
|
+
const _component_q_icon = QIcon;
|
|
403
|
+
const _component_q_tooltip = QTooltip;
|
|
404
|
+
const _component_q_btn = QBtn;
|
|
405
|
+
const _component_q_popup_proxy = QPopupProxy;
|
|
406
|
+
const _component_q_field = QField;
|
|
407
|
+
const _directive_close_popup = resolveDirective("close-popup");
|
|
408
|
+
return openBlock(), createBlock(_component_q_field, {
|
|
409
|
+
"model-value": unref(modelValue),
|
|
410
|
+
"bottom-slots": "",
|
|
411
|
+
rules: validations.value,
|
|
412
|
+
label: `${__props.label}${__props.required ? "*" : ""}`,
|
|
413
|
+
"stack-label": "",
|
|
414
|
+
"lazy-rules": ""
|
|
415
|
+
}, createSlots({
|
|
416
|
+
control: withCtx(() => [createElementVNode("div", _hoisted_1$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(format).split("-"), (part, index) => {
|
|
417
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(QInput)), mergeProps({
|
|
418
|
+
key: part,
|
|
419
|
+
class: "col-auto",
|
|
420
|
+
borderless: "",
|
|
421
|
+
filled: false,
|
|
422
|
+
outlined: false,
|
|
423
|
+
standout: false,
|
|
424
|
+
rounded: false
|
|
425
|
+
}, { ref_for: true }, dateProps.value[part], {
|
|
426
|
+
inputmode: "numeric",
|
|
427
|
+
dense: ""
|
|
428
|
+
}), {
|
|
429
|
+
after: withCtx(() => [index < 2 ? (openBlock(), createElementBlock("a", _hoisted_2$1, "-")) : createCommentVNode("", true)]),
|
|
430
|
+
_: 2
|
|
431
|
+
}, 1040);
|
|
432
|
+
}), 128))])]),
|
|
433
|
+
append: withCtx(() => [__props.clearable ? (openBlock(), createBlock(_component_q_icon, {
|
|
434
|
+
key: 0,
|
|
435
|
+
name: __props.icons.clear,
|
|
436
|
+
class: "cursor-pointer",
|
|
437
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", null))
|
|
438
|
+
}, null, 8, ["name"])) : createCommentVNode("", true), createVNode(_component_q_icon, {
|
|
439
|
+
name: __props.icons.event,
|
|
440
|
+
class: "cursor-pointer"
|
|
441
|
+
}, {
|
|
442
|
+
default: withCtx(() => [formattedDate.value ? (openBlock(), createBlock(_component_q_tooltip, { key: 0 }, {
|
|
443
|
+
default: withCtx(() => [createTextVNode(toDisplayString(formattedDate.value), 1)]),
|
|
444
|
+
_: 1
|
|
445
|
+
})) : createCommentVNode("", true), createVNode(_component_q_popup_proxy, {
|
|
446
|
+
cover: "",
|
|
447
|
+
"transition-show": "scale",
|
|
448
|
+
"transition-hide": "scale"
|
|
449
|
+
}, {
|
|
450
|
+
default: withCtx(() => [createVNode(unref(QDate), mergeProps(__props.date, {
|
|
451
|
+
"model-value": unref(modelValue)?.replaceAll("-", "/"),
|
|
452
|
+
"onUpdate:modelValue": setDate
|
|
453
|
+
}), {
|
|
454
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_3, [withDirectives(createVNode(_component_q_btn, {
|
|
455
|
+
label: unref(lang).buttons.close,
|
|
456
|
+
color: "primary",
|
|
457
|
+
flat: ""
|
|
458
|
+
}, null, 8, ["label"]), [[_directive_close_popup]])])]),
|
|
459
|
+
_: 1
|
|
460
|
+
}, 16, ["model-value"])]),
|
|
461
|
+
_: 1
|
|
462
|
+
})]),
|
|
463
|
+
_: 1
|
|
464
|
+
}, 8, ["name"])]),
|
|
465
|
+
_: 2
|
|
466
|
+
}, [renderList(_ctx.$slots, (_, slot) => {
|
|
467
|
+
return {
|
|
468
|
+
name: slot,
|
|
469
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))])
|
|
470
|
+
};
|
|
471
|
+
})]), 1032, [
|
|
472
|
+
"model-value",
|
|
473
|
+
"rules",
|
|
474
|
+
"label"
|
|
475
|
+
]);
|
|
476
|
+
};
|
|
477
|
+
}
|
|
526
478
|
});
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/ui/form/BooleanSelect.vue
|
|
481
|
+
var BooleanSelect_default = /* @__PURE__ */ defineComponent({
|
|
482
|
+
__name: "BooleanSelect",
|
|
483
|
+
props: {
|
|
484
|
+
modelValue: { type: [Boolean, null] },
|
|
485
|
+
label: {},
|
|
486
|
+
required: { type: Boolean }
|
|
487
|
+
},
|
|
488
|
+
emits: ["update:modelValue"],
|
|
489
|
+
setup(__props) {
|
|
490
|
+
const props = __props;
|
|
491
|
+
const attrs = useAttrs();
|
|
492
|
+
const lang = useLang();
|
|
493
|
+
const $q = useQuasar();
|
|
494
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
|
|
495
|
+
watch($q.lang, () => {
|
|
496
|
+
loadLang($q.lang.isoName);
|
|
497
|
+
});
|
|
498
|
+
const booleanOptions = ref([{
|
|
499
|
+
label: lang.value.yes,
|
|
500
|
+
value: true
|
|
501
|
+
}, {
|
|
502
|
+
label: lang.value.no,
|
|
503
|
+
value: false
|
|
504
|
+
}]);
|
|
505
|
+
const validations = ref([]);
|
|
506
|
+
if (props.required) validations.value.push((val) => val !== null || lang.value.validations.fieldRequired);
|
|
507
|
+
return (_ctx, _cache) => {
|
|
508
|
+
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
509
|
+
rules: validations.value,
|
|
510
|
+
"model-value": __props.modelValue,
|
|
511
|
+
options: booleanOptions.value,
|
|
512
|
+
label: `${__props.label}${__props.required ? "*" : ""}`,
|
|
513
|
+
"emit-value": "",
|
|
514
|
+
"map-options": "",
|
|
515
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
516
|
+
}), null, 16, [
|
|
517
|
+
"rules",
|
|
518
|
+
"model-value",
|
|
519
|
+
"options",
|
|
520
|
+
"label"
|
|
521
|
+
]);
|
|
522
|
+
};
|
|
523
|
+
}
|
|
571
524
|
});
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
_: 1
|
|
605
|
-
})
|
|
606
|
-
]),
|
|
607
|
-
_: 1
|
|
608
|
-
}, 16);
|
|
609
|
-
};
|
|
610
|
-
}
|
|
525
|
+
//#endregion
|
|
526
|
+
//#region src/ui/form/BooleanItem.vue
|
|
527
|
+
var BooleanItem_default = /* @__PURE__ */ defineComponent({
|
|
528
|
+
__name: "BooleanItem",
|
|
529
|
+
props: {
|
|
530
|
+
modelValue: { type: [Boolean, null] },
|
|
531
|
+
label: {}
|
|
532
|
+
},
|
|
533
|
+
setup(__props) {
|
|
534
|
+
const attrs = useAttrs();
|
|
535
|
+
const lang = useLang();
|
|
536
|
+
const $q = useQuasar();
|
|
537
|
+
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
|
|
538
|
+
watch($q.lang, () => {
|
|
539
|
+
loadLang($q.lang.isoName);
|
|
540
|
+
});
|
|
541
|
+
return (_ctx, _cache) => {
|
|
542
|
+
return openBlock(), createBlock(unref(QItem), normalizeProps(guardReactiveProps(unref(attrs))), {
|
|
543
|
+
default: withCtx(() => [createVNode(unref(QItemSection), null, {
|
|
544
|
+
default: withCtx(() => [createVNode(unref(QItemLabel), { overline: "" }, {
|
|
545
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.label), 1)]),
|
|
546
|
+
_: 1
|
|
547
|
+
}), createVNode(unref(QItemLabel), null, {
|
|
548
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.modelValue === null ? "-" : __props.modelValue ? unref(lang).yes : unref(lang).no), 1)]),
|
|
549
|
+
_: 1
|
|
550
|
+
})]),
|
|
551
|
+
_: 1
|
|
552
|
+
})]),
|
|
553
|
+
_: 1
|
|
554
|
+
}, 16);
|
|
555
|
+
};
|
|
556
|
+
}
|
|
611
557
|
});
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region src/ui/form/EmailInput.vue
|
|
560
|
+
var EmailInput_default = /* @__PURE__ */ defineComponent({
|
|
561
|
+
name: "EmailInput",
|
|
562
|
+
props: {
|
|
563
|
+
subject: {},
|
|
564
|
+
body: {}
|
|
565
|
+
},
|
|
566
|
+
emits: ["update:subject", "update:body"],
|
|
567
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
568
|
+
const emit = __emit;
|
|
569
|
+
const lang = useLang();
|
|
570
|
+
__expose({
|
|
571
|
+
variables: ref({}),
|
|
572
|
+
functions: ref({})
|
|
573
|
+
});
|
|
574
|
+
return (_ctx, _cache) => {
|
|
575
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(QInput), {
|
|
576
|
+
outlined: "",
|
|
577
|
+
placeholder: unref(lang).email.subject,
|
|
578
|
+
"model-value": __props.subject,
|
|
579
|
+
type: "text",
|
|
580
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:subject", $event))
|
|
581
|
+
}, null, 8, ["placeholder", "model-value"]), createVNode(unref(QEditor), {
|
|
582
|
+
"model-value": __props.body,
|
|
583
|
+
toolbar: [
|
|
584
|
+
[
|
|
585
|
+
"left",
|
|
586
|
+
"center",
|
|
587
|
+
"right",
|
|
588
|
+
"justify"
|
|
589
|
+
],
|
|
590
|
+
[
|
|
591
|
+
"bold",
|
|
592
|
+
"italic",
|
|
593
|
+
"underline",
|
|
594
|
+
"strike"
|
|
595
|
+
],
|
|
596
|
+
["undo", "redo"],
|
|
597
|
+
["link"]
|
|
598
|
+
],
|
|
599
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => emit("update:body", $event))
|
|
600
|
+
}, null, 8, ["model-value"])], 64);
|
|
601
|
+
};
|
|
602
|
+
}
|
|
657
603
|
});
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
return (_ctx, _cache) => {
|
|
711
|
-
const _component_q_date = QDate;
|
|
712
|
-
return openBlock(), createBlock(_component_q_date, mergeProps(unref(attrs), {
|
|
713
|
-
"model-value": __props.modelValue,
|
|
714
|
-
"onUpdate:modelValue": update,
|
|
715
|
-
options: dateOptions,
|
|
716
|
-
range: unref(range)
|
|
717
|
-
}), null, 16, ["model-value", "range"]);
|
|
718
|
-
};
|
|
719
|
-
}
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region src/ui/form/DatePicker.vue
|
|
606
|
+
var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
607
|
+
__name: "DatePicker",
|
|
608
|
+
props: {
|
|
609
|
+
modelValue: {},
|
|
610
|
+
periods: {},
|
|
611
|
+
range: { type: Boolean },
|
|
612
|
+
options: { type: Function }
|
|
613
|
+
},
|
|
614
|
+
emits: ["update:modelValue"],
|
|
615
|
+
setup(__props, { emit: __emit }) {
|
|
616
|
+
const props = __props;
|
|
617
|
+
const attrs = useAttrs();
|
|
618
|
+
const emit = __emit;
|
|
619
|
+
const $q = useQuasar();
|
|
620
|
+
const lang = useLang();
|
|
621
|
+
const { periods, range, options: parentOptions } = toRefs(props);
|
|
622
|
+
const update = (val) => {
|
|
623
|
+
if (val && typeof val !== "string") {
|
|
624
|
+
const parsedFrom = val.from.replaceAll("/", "-");
|
|
625
|
+
const parsedTo = val.to.replaceAll("/", "-");
|
|
626
|
+
const unavailablePeriods = periods?.value?.filter((period) => period.type === "unavailable");
|
|
627
|
+
if (unavailablePeriods) {
|
|
628
|
+
for (const period of unavailablePeriods) if (parsedFrom <= period.startDate && parsedTo >= period.endDate) return $q.notify({
|
|
629
|
+
message: lang.value.datePicker.validations.unavailableRange,
|
|
630
|
+
color: "red"
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
emit("update:modelValue", val);
|
|
635
|
+
};
|
|
636
|
+
const dateOptions = function(date) {
|
|
637
|
+
let parentResult = true;
|
|
638
|
+
if (parentOptions?.value) parentResult = parentOptions.value(date);
|
|
639
|
+
const parsedDate = date.replaceAll("/", "-");
|
|
640
|
+
const unavailablePeriods = periods?.value?.filter((period) => period.type === "unavailable");
|
|
641
|
+
if (unavailablePeriods) {
|
|
642
|
+
for (const period of unavailablePeriods) if (parsedDate >= period.startDate && parsedDate <= period.endDate) return false;
|
|
643
|
+
}
|
|
644
|
+
return parentResult;
|
|
645
|
+
};
|
|
646
|
+
return (_ctx, _cache) => {
|
|
647
|
+
const _component_q_date = QDate;
|
|
648
|
+
return openBlock(), createBlock(_component_q_date, mergeProps(unref(attrs), {
|
|
649
|
+
"model-value": __props.modelValue,
|
|
650
|
+
"onUpdate:modelValue": update,
|
|
651
|
+
options: dateOptions,
|
|
652
|
+
range: unref(range)
|
|
653
|
+
}), null, 16, ["model-value", "range"]);
|
|
654
|
+
};
|
|
655
|
+
}
|
|
720
656
|
});
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region src/ui/form/CurrencySelect.vue
|
|
659
|
+
var CurrencySelect_default = /* @__PURE__ */ defineComponent({
|
|
660
|
+
__name: "CurrencySelect",
|
|
661
|
+
props: {
|
|
662
|
+
modelValue: {},
|
|
663
|
+
required: { type: Boolean }
|
|
664
|
+
},
|
|
665
|
+
emits: ["update:modelValue"],
|
|
666
|
+
setup(__props) {
|
|
667
|
+
const props = __props;
|
|
668
|
+
const attrs = useAttrs();
|
|
669
|
+
const lang = useLang();
|
|
670
|
+
const currencyOptions = ref([{
|
|
671
|
+
label: lang.value.currency.EUR,
|
|
672
|
+
value: "EUR"
|
|
673
|
+
}, {
|
|
674
|
+
label: lang.value.currency.USD,
|
|
675
|
+
value: "USD"
|
|
676
|
+
}]);
|
|
677
|
+
const validations = ref([]);
|
|
678
|
+
if (props.required) validations.value.push((val) => !!val || lang.value.validations.fieldRequired);
|
|
679
|
+
return (_ctx, _cache) => {
|
|
680
|
+
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
681
|
+
rules: validations.value,
|
|
682
|
+
"model-value": __props.modelValue,
|
|
683
|
+
options: currencyOptions.value,
|
|
684
|
+
label: `${unref(lang).currency.currency}${__props.required ? "*" : ""}`,
|
|
685
|
+
"emit-value": "",
|
|
686
|
+
"map-options": "",
|
|
687
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
688
|
+
}), null, 16, [
|
|
689
|
+
"rules",
|
|
690
|
+
"model-value",
|
|
691
|
+
"options",
|
|
692
|
+
"label"
|
|
693
|
+
]);
|
|
694
|
+
};
|
|
695
|
+
}
|
|
759
696
|
});
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
createVNode(_component_q_item_section, { class: "text-italic text-grey" }, {
|
|
869
|
-
default: withCtx(() => [
|
|
870
|
-
createTextVNode(toDisplayString(unref(lang).noResultsAvailable), 1)
|
|
871
|
-
]),
|
|
872
|
-
_: 1
|
|
873
|
-
})
|
|
874
|
-
]),
|
|
875
|
-
_: 1
|
|
876
|
-
})
|
|
877
|
-
]),
|
|
878
|
-
_: 2
|
|
879
|
-
}, [
|
|
880
|
-
renderList(_ctx.$slots, (_2, slot) => {
|
|
881
|
-
return {
|
|
882
|
-
name: slot,
|
|
883
|
-
fn: withCtx((scope) => [
|
|
884
|
-
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))
|
|
885
|
-
])
|
|
886
|
-
};
|
|
887
|
-
})
|
|
888
|
-
]), 1040, ["model-value", "options", "label", "hint", "fill-input", "use-input", "hide-selected", "multiple", "bottom-slots", "rules"]);
|
|
889
|
-
};
|
|
890
|
-
}
|
|
697
|
+
//#endregion
|
|
698
|
+
//#region src/ui/form/FilteredModelSelect.vue
|
|
699
|
+
var FilteredModelSelect_default = /* @__PURE__ */ defineComponent({
|
|
700
|
+
__name: "FilteredModelSelect",
|
|
701
|
+
props: {
|
|
702
|
+
modelValue: {},
|
|
703
|
+
labelKey: {},
|
|
704
|
+
labelFunction: { type: Function },
|
|
705
|
+
valueKey: {},
|
|
706
|
+
extraFields: {},
|
|
707
|
+
filteredOptions: {},
|
|
708
|
+
required: { type: Boolean },
|
|
709
|
+
onFilter: {},
|
|
710
|
+
multiple: { type: Boolean },
|
|
711
|
+
label: {},
|
|
712
|
+
hint: {}
|
|
713
|
+
},
|
|
714
|
+
emits: ["update:model-value", "filter"],
|
|
715
|
+
setup(__props, { emit: __emit }) {
|
|
716
|
+
const props = __props;
|
|
717
|
+
const attrs = useAttrs();
|
|
718
|
+
const emit = __emit;
|
|
719
|
+
const lang = useLang();
|
|
720
|
+
const { modelValue, onFilter, filteredOptions, labelKey, valueKey, labelFunction, extraFields } = toRefs(props);
|
|
721
|
+
const options = computed(() => {
|
|
722
|
+
if (filteredOptions.value.length) return filteredOptions.value?.map((option) => ({
|
|
723
|
+
label: labelFunction.value ? labelFunction.value(option) : option[labelKey.value],
|
|
724
|
+
value: option[valueKey.value || "id"],
|
|
725
|
+
extraFields: extraFields.value?.reduce((result, key) => {
|
|
726
|
+
if (option.hasOwnProperty(key)) result[key] = option[key];
|
|
727
|
+
return result;
|
|
728
|
+
}, {})
|
|
729
|
+
}));
|
|
730
|
+
return [];
|
|
731
|
+
});
|
|
732
|
+
const requiredValidation = ref((val) => (Array.isArray(val) ? !!val.length : !!val) || lang.value.validations.fieldRequired);
|
|
733
|
+
const selectedIds = computed(() => {
|
|
734
|
+
if (Array.isArray(modelValue.value)) return [...modelValue.value];
|
|
735
|
+
else if (modelValue.value) return [modelValue.value];
|
|
736
|
+
return [];
|
|
737
|
+
});
|
|
738
|
+
const filterFn = (val, update) => {
|
|
739
|
+
if (!onFilter.value) update(() => {});
|
|
740
|
+
emit("filter", {
|
|
741
|
+
ids: selectedIds.value,
|
|
742
|
+
searchPhrase: val.toLowerCase(),
|
|
743
|
+
done: () => update(() => {})
|
|
744
|
+
});
|
|
745
|
+
};
|
|
746
|
+
const selectRef = ref();
|
|
747
|
+
watch(modelValue, () => {
|
|
748
|
+
if (!options.value?.find((val) => val.value === modelValue.value)) emit("filter", {
|
|
749
|
+
ids: selectedIds.value,
|
|
750
|
+
searchPhrase: "",
|
|
751
|
+
done: () => {}
|
|
752
|
+
});
|
|
753
|
+
});
|
|
754
|
+
return (_ctx, _cache) => {
|
|
755
|
+
const _component_q_item_section = QItemSection;
|
|
756
|
+
const _component_q_item = QItem;
|
|
757
|
+
return openBlock(), createBlock(unref(QSelect), mergeProps({
|
|
758
|
+
ref_key: "selectRef",
|
|
759
|
+
ref: selectRef
|
|
760
|
+
}, unref(attrs), {
|
|
761
|
+
"model-value": unref(modelValue),
|
|
762
|
+
options: options.value,
|
|
763
|
+
label: `${__props.label}${__props.required ? "*" : ""}`,
|
|
764
|
+
hint: __props.multiple ? unref(lang).selectMultiple : void 0,
|
|
765
|
+
"emit-value": "",
|
|
766
|
+
"map-options": "",
|
|
767
|
+
"fill-input": !__props.multiple,
|
|
768
|
+
"use-input": !!unref(onFilter),
|
|
769
|
+
"hide-selected": !__props.multiple && !!unref(onFilter) || Number.isNaN(unref(modelValue)),
|
|
770
|
+
multiple: __props.multiple,
|
|
771
|
+
"bottom-slots": !!__props.hint,
|
|
772
|
+
"input-debounce": "500",
|
|
773
|
+
rules: __props.required ? [requiredValidation.value] : [],
|
|
774
|
+
onFilter: filterFn,
|
|
775
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:model-value", $event))
|
|
776
|
+
}), createSlots({
|
|
777
|
+
hint: withCtx(() => [createTextVNode(toDisplayString(__props.hint), 1)]),
|
|
778
|
+
"no-option": withCtx(() => [createVNode(_component_q_item, null, {
|
|
779
|
+
default: withCtx(() => [createVNode(_component_q_item_section, { class: "text-italic text-grey" }, {
|
|
780
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).noResultsAvailable), 1)]),
|
|
781
|
+
_: 1
|
|
782
|
+
})]),
|
|
783
|
+
_: 1
|
|
784
|
+
})]),
|
|
785
|
+
_: 2
|
|
786
|
+
}, [renderList(_ctx.$slots, (_, slot) => {
|
|
787
|
+
return {
|
|
788
|
+
name: slot,
|
|
789
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))])
|
|
790
|
+
};
|
|
791
|
+
})]), 1040, [
|
|
792
|
+
"model-value",
|
|
793
|
+
"options",
|
|
794
|
+
"label",
|
|
795
|
+
"hint",
|
|
796
|
+
"fill-input",
|
|
797
|
+
"use-input",
|
|
798
|
+
"hide-selected",
|
|
799
|
+
"multiple",
|
|
800
|
+
"bottom-slots",
|
|
801
|
+
"rules"
|
|
802
|
+
]);
|
|
803
|
+
};
|
|
804
|
+
}
|
|
891
805
|
});
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region src/ui/form/CronScheduleInput.vue?vue&type=script&setup=true&lang.ts
|
|
808
|
+
var _hoisted_1$1 = { class: "row" };
|
|
809
|
+
var _hoisted_2 = {
|
|
810
|
+
key: 0,
|
|
811
|
+
class: "row"
|
|
896
812
|
};
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region src/ui/form/CronScheduleInput.vue
|
|
815
|
+
var CronScheduleInput_default = /* @__PURE__ */ defineComponent({
|
|
816
|
+
__name: "CronScheduleInput",
|
|
817
|
+
props: {
|
|
818
|
+
modelValue: {},
|
|
819
|
+
required: { type: Boolean },
|
|
820
|
+
showMinute: { type: Boolean },
|
|
821
|
+
showHour: { type: Boolean },
|
|
822
|
+
showDayOfWeek: { type: Boolean }
|
|
823
|
+
},
|
|
824
|
+
emits: ["update:modelValue"],
|
|
825
|
+
setup(__props, { emit: __emit }) {
|
|
826
|
+
const props = __props;
|
|
827
|
+
const emit = __emit;
|
|
828
|
+
const { modelValue } = toRefs(props);
|
|
829
|
+
const $q = useQuasar();
|
|
830
|
+
const lang = useLang();
|
|
831
|
+
const cronregex = /* @__PURE__ */ new RegExp(/(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})/);
|
|
832
|
+
const label = lang.value.cron.name;
|
|
833
|
+
const minute = ref(["0"]);
|
|
834
|
+
const hour = ref(["0"]);
|
|
835
|
+
const dayOfMonth = ref(["1"]);
|
|
836
|
+
const month = ref([]);
|
|
837
|
+
const dayOfWeek = ref([]);
|
|
838
|
+
const minuteOptions = ref([...Array(59).keys()].map(String));
|
|
839
|
+
const hourOptions = ref([...Array(24).keys()].map(String));
|
|
840
|
+
const dayOfMonthOptions = ref(Array.from({ length: 31 }, (_, i) => i + 1).map((dayOfMonth) => String(dayOfMonth)));
|
|
841
|
+
const monthOptions = ref([...Array.from({ length: 12 }, (_, i) => i + 1).map((month) => ({
|
|
842
|
+
label: $q.lang.date.months[month - 1],
|
|
843
|
+
value: String(month)
|
|
844
|
+
}))]);
|
|
845
|
+
const dayOfWeekOptions = ref([...Array(7).keys()].map((day) => ({
|
|
846
|
+
label: $q.lang.date.days[day],
|
|
847
|
+
value: String(day)
|
|
848
|
+
})));
|
|
849
|
+
const validations = ref([(val) => cronregex.test(val) || lang.value.cron.validations.invalidCron]);
|
|
850
|
+
watch([
|
|
851
|
+
minute,
|
|
852
|
+
hour,
|
|
853
|
+
dayOfMonth,
|
|
854
|
+
month,
|
|
855
|
+
dayOfWeek
|
|
856
|
+
], () => {
|
|
857
|
+
const cron = `${minute.value.join(",") || "*"} ${hour.value.join(",") || "*"} ${dayOfMonth.value.join(",") || "*"} ${month.value.join(",") || "*"} ${dayOfWeek.value.join(",") || "*"}`;
|
|
858
|
+
if (cronregex.test(cron)) emit("update:modelValue", cron);
|
|
859
|
+
else emit("update:modelValue", "0 0 1 * *");
|
|
860
|
+
});
|
|
861
|
+
function setInternalCron(cronString) {
|
|
862
|
+
if (cronregex.test(cronString)) {
|
|
863
|
+
const [newMinute, newHour, newDayOfMonth, newMonth, newDayOfWeek] = cronString.split(" ");
|
|
864
|
+
minute.value = newMinute.split(",").filter((val) => val !== "*");
|
|
865
|
+
hour.value = newHour.split(",").filter((val) => val !== "*");
|
|
866
|
+
dayOfMonth.value = newDayOfMonth.split(",").filter((val) => val !== "*");
|
|
867
|
+
month.value = newMonth.split(",").filter((val) => val !== "*");
|
|
868
|
+
dayOfWeek.value = newDayOfWeek.split(",").filter((val) => val !== "*");
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
const smallStyle = {
|
|
872
|
+
"margin-top": "-1.7em",
|
|
873
|
+
"margin-bottom": "-0.5em",
|
|
874
|
+
background: "transparent",
|
|
875
|
+
border: 0
|
|
876
|
+
};
|
|
877
|
+
const dayOfWeekStyle = {
|
|
878
|
+
"margin-bottom": "-0.5em",
|
|
879
|
+
background: "transparent",
|
|
880
|
+
border: 0
|
|
881
|
+
};
|
|
882
|
+
watch(modelValue, (newVal) => {
|
|
883
|
+
if (newVal) setInternalCron(newVal);
|
|
884
|
+
else if (newVal === null) setInternalCron("0 0 1 * *");
|
|
885
|
+
});
|
|
886
|
+
setInternalCron(modelValue.value);
|
|
887
|
+
return (_ctx, _cache) => {
|
|
888
|
+
const _component_q_select = QSelect;
|
|
889
|
+
const _component_q_field = QField;
|
|
890
|
+
return openBlock(), createBlock(_component_q_field, {
|
|
891
|
+
"model-value": unref(modelValue),
|
|
892
|
+
rules: validations.value,
|
|
893
|
+
label: `${unref(label)}${__props.required ? "*" : ""}`,
|
|
894
|
+
"stack-label": "",
|
|
895
|
+
borderless: ""
|
|
896
|
+
}, {
|
|
897
|
+
control: withCtx(() => [createElementVNode("div", _hoisted_1$1, [
|
|
898
|
+
__props.showHour ? (openBlock(), createBlock(_component_q_select, {
|
|
899
|
+
key: 0,
|
|
900
|
+
modelValue: hour.value,
|
|
901
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hour.value = $event),
|
|
902
|
+
class: "col-auto",
|
|
903
|
+
options: hourOptions.value,
|
|
904
|
+
hint: unref(lang).cron.hour,
|
|
905
|
+
"bottom-slots": "",
|
|
906
|
+
borderless: "",
|
|
907
|
+
filled: false,
|
|
908
|
+
outlined: false,
|
|
909
|
+
standout: false,
|
|
910
|
+
rounded: false,
|
|
911
|
+
style: smallStyle,
|
|
912
|
+
"map-options": "",
|
|
913
|
+
"emit-value": "",
|
|
914
|
+
multiple: ""
|
|
915
|
+
}, {
|
|
916
|
+
selected: withCtx(() => [createTextVNode(toDisplayString(hour.value.length ? hour.value.join(",") : unref(lang).cron.every.hour), 1)]),
|
|
917
|
+
_: 1
|
|
918
|
+
}, 8, [
|
|
919
|
+
"modelValue",
|
|
920
|
+
"options",
|
|
921
|
+
"hint"
|
|
922
|
+
])) : createCommentVNode("", true),
|
|
923
|
+
__props.showMinute ? (openBlock(), createBlock(_component_q_select, {
|
|
924
|
+
key: 1,
|
|
925
|
+
modelValue: minute.value,
|
|
926
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => minute.value = $event),
|
|
927
|
+
class: "col-auto",
|
|
928
|
+
options: minuteOptions.value,
|
|
929
|
+
hint: unref(lang).cron.minute,
|
|
930
|
+
"bottom-slots": "",
|
|
931
|
+
borderless: "",
|
|
932
|
+
filled: false,
|
|
933
|
+
outlined: false,
|
|
934
|
+
standout: false,
|
|
935
|
+
rounded: false,
|
|
936
|
+
style: smallStyle,
|
|
937
|
+
"map-options": "",
|
|
938
|
+
"emit-value": "",
|
|
939
|
+
multiple: ""
|
|
940
|
+
}, {
|
|
941
|
+
selected: withCtx(() => [createTextVNode(toDisplayString(minute.value.length ? minute.value.join(",") : unref(lang).cron.every.minute), 1)]),
|
|
942
|
+
_: 1
|
|
943
|
+
}, 8, [
|
|
944
|
+
"modelValue",
|
|
945
|
+
"options",
|
|
946
|
+
"hint"
|
|
947
|
+
])) : createCommentVNode("", true),
|
|
948
|
+
createVNode(_component_q_select, {
|
|
949
|
+
modelValue: dayOfMonth.value,
|
|
950
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dayOfMonth.value = $event),
|
|
951
|
+
class: "col-auto",
|
|
952
|
+
options: dayOfMonthOptions.value,
|
|
953
|
+
hint: unref(lang).cron.dayOfMonth,
|
|
954
|
+
"bottom-slots": "",
|
|
955
|
+
borderless: "",
|
|
956
|
+
filled: false,
|
|
957
|
+
outlined: false,
|
|
958
|
+
standout: false,
|
|
959
|
+
rounded: false,
|
|
960
|
+
style: smallStyle,
|
|
961
|
+
"map-options": "",
|
|
962
|
+
"emit-value": "",
|
|
963
|
+
multiple: ""
|
|
964
|
+
}, {
|
|
965
|
+
selected: withCtx(() => [createTextVNode(toDisplayString(dayOfMonth.value.length ? dayOfMonth.value.join(",") : unref(lang).cron.every.dayOfMonth), 1)]),
|
|
966
|
+
_: 1
|
|
967
|
+
}, 8, [
|
|
968
|
+
"modelValue",
|
|
969
|
+
"options",
|
|
970
|
+
"hint"
|
|
971
|
+
]),
|
|
972
|
+
createVNode(_component_q_select, {
|
|
973
|
+
modelValue: month.value,
|
|
974
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => month.value = $event),
|
|
975
|
+
class: "col-auto",
|
|
976
|
+
options: monthOptions.value,
|
|
977
|
+
hint: unref(lang).cron.month,
|
|
978
|
+
placeholder: unref(lang).cron.month,
|
|
979
|
+
"bottom-slots": "",
|
|
980
|
+
borderless: "",
|
|
981
|
+
filled: false,
|
|
982
|
+
outlined: false,
|
|
983
|
+
standout: false,
|
|
984
|
+
rounded: false,
|
|
985
|
+
style: smallStyle,
|
|
986
|
+
"map-options": "",
|
|
987
|
+
"emit-value": "",
|
|
988
|
+
multiple: ""
|
|
989
|
+
}, {
|
|
990
|
+
selected: withCtx(() => [createTextVNode(toDisplayString(month.value.length ? month.value.map((val) => unref($q).lang.date.months[Number(val) - 1]).join(",") : unref(lang).cron.every.month), 1)]),
|
|
991
|
+
_: 1
|
|
992
|
+
}, 8, [
|
|
993
|
+
"modelValue",
|
|
994
|
+
"options",
|
|
995
|
+
"hint",
|
|
996
|
+
"placeholder"
|
|
997
|
+
])
|
|
998
|
+
]), __props.showDayOfWeek ? (openBlock(), createElementBlock("div", _hoisted_2, [__props.showDayOfWeek ? (openBlock(), createBlock(_component_q_select, {
|
|
999
|
+
key: 0,
|
|
1000
|
+
modelValue: dayOfWeek.value,
|
|
1001
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => dayOfWeek.value = $event),
|
|
1002
|
+
class: "col-auto",
|
|
1003
|
+
options: dayOfWeekOptions.value,
|
|
1004
|
+
placeholder: unref(lang).cron.dayOfWeek,
|
|
1005
|
+
hint: unref(lang).cron.dayOfWeek,
|
|
1006
|
+
style: dayOfWeekStyle,
|
|
1007
|
+
"bottom-slots": "",
|
|
1008
|
+
borderless: "",
|
|
1009
|
+
filled: false,
|
|
1010
|
+
outlined: false,
|
|
1011
|
+
standout: false,
|
|
1012
|
+
rounded: false,
|
|
1013
|
+
"map-options": "",
|
|
1014
|
+
"emit-value": "",
|
|
1015
|
+
multiple: ""
|
|
1016
|
+
}, {
|
|
1017
|
+
selected: withCtx(() => [createTextVNode(toDisplayString(dayOfWeek.value.length ? dayOfWeek.value.map((val) => unref($q).lang.date.days[Number(val)]).join(",") : unref(lang).cron.every.dayOfWeek), 1)]),
|
|
1018
|
+
_: 1
|
|
1019
|
+
}, 8, [
|
|
1020
|
+
"modelValue",
|
|
1021
|
+
"options",
|
|
1022
|
+
"placeholder",
|
|
1023
|
+
"hint"
|
|
1024
|
+
])) : createCommentVNode("", true)])) : createCommentVNode("", true)]),
|
|
1025
|
+
_: 1
|
|
1026
|
+
}, 8, [
|
|
1027
|
+
"model-value",
|
|
1028
|
+
"rules",
|
|
1029
|
+
"label"
|
|
1030
|
+
]);
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1115
1033
|
});
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}, null, 8, ["name"]),
|
|
1190
|
-
createTextVNode(" " + toDisplayString(scope.opt.label), 1)
|
|
1191
|
-
])) : createCommentVNode("", true)
|
|
1192
|
-
]),
|
|
1193
|
-
option: withCtx((scope) => [
|
|
1194
|
-
createVNode(_component_q_item, normalizeProps(guardReactiveProps(scope.itemProps)), {
|
|
1195
|
-
default: withCtx(() => [
|
|
1196
|
-
createVNode(_component_q_item_section, { avatar: "" }, {
|
|
1197
|
-
default: withCtx(() => [
|
|
1198
|
-
createVNode(_component_q_icon, {
|
|
1199
|
-
name: scope.opt.icon
|
|
1200
|
-
}, null, 8, ["name"])
|
|
1201
|
-
]),
|
|
1202
|
-
_: 2
|
|
1203
|
-
}, 1024),
|
|
1204
|
-
createVNode(_component_q_item_section, null, {
|
|
1205
|
-
default: withCtx(() => [
|
|
1206
|
-
createVNode(_component_q_item_label, null, {
|
|
1207
|
-
default: withCtx(() => [
|
|
1208
|
-
createTextVNode(toDisplayString(scope.opt.label), 1)
|
|
1209
|
-
]),
|
|
1210
|
-
_: 2
|
|
1211
|
-
}, 1024)
|
|
1212
|
-
]),
|
|
1213
|
-
_: 2
|
|
1214
|
-
}, 1024)
|
|
1215
|
-
]),
|
|
1216
|
-
_: 2
|
|
1217
|
-
}, 1040)
|
|
1218
|
-
]),
|
|
1219
|
-
_: 1
|
|
1220
|
-
}, 16, ["options", "model-value"]);
|
|
1221
|
-
};
|
|
1222
|
-
}
|
|
1034
|
+
//#endregion
|
|
1035
|
+
//#region src/ui/form/CountrySelect.vue?vue&type=script&setup=true&lang.ts
|
|
1036
|
+
var _hoisted_1 = { key: 1 };
|
|
1037
|
+
//#endregion
|
|
1038
|
+
//#region src/ui/form/CountrySelect.vue
|
|
1039
|
+
var CountrySelect_default = /* @__PURE__ */ defineComponent({
|
|
1040
|
+
__name: "CountrySelect",
|
|
1041
|
+
props: {
|
|
1042
|
+
modelValue: {},
|
|
1043
|
+
countries: {},
|
|
1044
|
+
isItem: { type: Boolean }
|
|
1045
|
+
},
|
|
1046
|
+
emits: ["update:modelValue"],
|
|
1047
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1048
|
+
const props = __props;
|
|
1049
|
+
const emit = __emit;
|
|
1050
|
+
const { modelValue, countries } = toRefs(props);
|
|
1051
|
+
const lang = useLang();
|
|
1052
|
+
const attrs = useAttrs();
|
|
1053
|
+
const countryOptions = computed(() => {
|
|
1054
|
+
return countries.value.map((country) => ({
|
|
1055
|
+
label: lang.value.countries[country.iso3166],
|
|
1056
|
+
value: country.iso3166,
|
|
1057
|
+
icon: country.icon
|
|
1058
|
+
}));
|
|
1059
|
+
});
|
|
1060
|
+
__expose({
|
|
1061
|
+
variables: ref({}),
|
|
1062
|
+
functions: ref({})
|
|
1063
|
+
});
|
|
1064
|
+
return (_ctx, _cache) => {
|
|
1065
|
+
const _component_q_icon = QIcon;
|
|
1066
|
+
const _component_q_item_section = QItemSection;
|
|
1067
|
+
const _component_q_item_label = QItemLabel;
|
|
1068
|
+
const _component_q_item = QItem;
|
|
1069
|
+
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
1070
|
+
options: countryOptions.value,
|
|
1071
|
+
"model-value": unref(modelValue),
|
|
1072
|
+
filled: false,
|
|
1073
|
+
"emit-value": "",
|
|
1074
|
+
"map-options": "",
|
|
1075
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => emit("update:modelValue", val))
|
|
1076
|
+
}), {
|
|
1077
|
+
"selected-item": withCtx((scope) => [scope.opt && __props.isItem ? (openBlock(), createBlock(_component_q_item, { key: 0 }, {
|
|
1078
|
+
default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
|
|
1079
|
+
default: withCtx(() => [createVNode(_component_q_icon, { name: scope.opt.icon }, null, 8, ["name"])]),
|
|
1080
|
+
_: 2
|
|
1081
|
+
}, 1024), createVNode(_component_q_item_section, null, {
|
|
1082
|
+
default: withCtx(() => [createVNode(_component_q_item_label, null, {
|
|
1083
|
+
default: withCtx(() => [createTextVNode(toDisplayString(scope.opt.label), 1)]),
|
|
1084
|
+
_: 2
|
|
1085
|
+
}, 1024)]),
|
|
1086
|
+
_: 2
|
|
1087
|
+
}, 1024)]),
|
|
1088
|
+
_: 2
|
|
1089
|
+
}, 1024)) : scope.opt ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_q_icon, { name: scope.opt.icon }, null, 8, ["name"]), createTextVNode(" " + toDisplayString(scope.opt.label), 1)])) : createCommentVNode("", true)]),
|
|
1090
|
+
option: withCtx((scope) => [createVNode(_component_q_item, normalizeProps(guardReactiveProps(scope.itemProps)), {
|
|
1091
|
+
default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
|
|
1092
|
+
default: withCtx(() => [createVNode(_component_q_icon, { name: scope.opt.icon }, null, 8, ["name"])]),
|
|
1093
|
+
_: 2
|
|
1094
|
+
}, 1024), createVNode(_component_q_item_section, null, {
|
|
1095
|
+
default: withCtx(() => [createVNode(_component_q_item_label, null, {
|
|
1096
|
+
default: withCtx(() => [createTextVNode(toDisplayString(scope.opt.label), 1)]),
|
|
1097
|
+
_: 2
|
|
1098
|
+
}, 1024)]),
|
|
1099
|
+
_: 2
|
|
1100
|
+
}, 1024)]),
|
|
1101
|
+
_: 2
|
|
1102
|
+
}, 1040)]),
|
|
1103
|
+
_: 1
|
|
1104
|
+
}, 16, ["options", "model-value"]);
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1223
1107
|
});
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
_sfc_main$7 as BooleanSelect,
|
|
1227
|
-
_sfc_main as CountrySelect,
|
|
1228
|
-
_sfc_main$1 as CronScheduleInput,
|
|
1229
|
-
_sfc_main$3 as CurrencySelect,
|
|
1230
|
-
_sfc_main$8 as DateInput,
|
|
1231
|
-
_sfc_main$4 as DatePicker,
|
|
1232
|
-
_sfc_main$5 as EmailInput,
|
|
1233
|
-
_sfc_main$2 as FilteredModelSelect,
|
|
1234
|
-
_sfc_main$a as FormInput,
|
|
1235
|
-
_sfc_main$b as FormItem,
|
|
1236
|
-
_sfc_main$d as GenderItem,
|
|
1237
|
-
_sfc_main$e as GenderSelect,
|
|
1238
|
-
_ as LocaleSelect,
|
|
1239
|
-
_sfc_main$c as PostalCodeInput,
|
|
1240
|
-
_sfc_main$9 as TelephoneNumberInput,
|
|
1241
|
-
loadLang,
|
|
1242
|
-
useLang
|
|
1243
|
-
};
|
|
1108
|
+
//#endregion
|
|
1109
|
+
export { BooleanItem_default as BooleanItem, BooleanSelect_default as BooleanSelect, CountrySelect_default as CountrySelect, CronScheduleInput_default as CronScheduleInput, CurrencySelect_default as CurrencySelect, DateInput_default as DateInput, DatePicker_default as DatePicker, EmailInput_default as EmailInput, FilteredModelSelect_default as FilteredModelSelect, FormInput_default as FormInput, FormItem_default as FormItem, GenderItem_default as GenderItem, GenderSelect_default as GenderSelect, LocaleSelect_default as LocaleSelect, PostalCodeInput_default as PostalCodeInput, TelephoneNumberInput_default as TelephoneNumberInput, loadLang, useLang };
|