@simsustech/quasar-components 0.1.1 → 0.1.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 +6 -0
- package/dist/QSubmitButton.vue_vue_type_script_setup_true_lang.fe90878f.js +93 -0
- package/dist/authentication.js +1633 -0
- package/dist/flags.js +217 -0
- package/dist/general.js +81 -0
- package/dist/icons.js +23 -0
- package/dist/nl.6b0aedb7.js +89 -0
- package/dist/nl.7787ff31.js +9 -0
- package/dist/nl.b1ad9de9.js +134 -0
- package/dist/style.css +4 -0
- package/dist/types/ui/authentication/ConsentList.vue.d.ts +85 -0
- package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +147 -0
- package/dist/types/ui/authentication/EmailChangeStepper.vue.d.ts +168 -0
- package/dist/types/ui/authentication/LoginButton.vue.d.ts +69 -0
- package/dist/types/ui/authentication/LoginForm.vue.d.ts +157 -0
- package/dist/types/ui/authentication/OtpInput.vue.d.ts +69 -0
- package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +187 -0
- package/dist/types/ui/authentication/PasswordChangeStepper.vue.d.ts +168 -0
- package/dist/types/ui/authentication/RegisterForm.vue.d.ts +230 -0
- package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +132 -0
- package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +82 -0
- package/dist/types/ui/authentication/VerificationSlider.vue.d.ts +77 -0
- package/dist/types/ui/authentication/index.d.ts +12 -0
- package/dist/types/ui/authentication/lang/en-US.d.ts +3 -0
- package/dist/types/ui/authentication/lang/index.d.ts +176 -0
- package/dist/types/ui/authentication/lang/nl.d.ts +3 -0
- package/dist/types/ui/flags/index.d.ts +3 -0
- package/dist/types/ui/flags/lang/en-US.d.ts +3 -0
- package/dist/types/ui/flags/lang/index.d.ts +266 -0
- package/dist/types/ui/flags/lang/nl.d.ts +3 -0
- package/dist/types/ui/general/QStyledCard.vue.d.ts +74 -0
- package/dist/types/ui/general/QStyledLayout.vue.d.ts +69 -0
- package/dist/types/ui/general/QSubmitButton.vue.d.ts +138 -0
- package/dist/types/ui/general/index.d.ts +2 -0
- package/dist/types/ui/general/lang/en-US.d.ts +3 -0
- package/dist/types/ui/general/lang/index.d.ts +16 -0
- package/dist/types/ui/general/lang/nl.d.ts +3 -0
- package/dist/types/ui/icons/icons.d.ts +6 -0
- package/dist/types/ui/icons/index.d.ts +2 -0
- package/dist/types/ui/index.d.ts +2 -0
- package/dist/types/vite-plugin.d.ts +2 -0
- package/dist/vite-plugin.d.ts +2 -0
- package/dist/vite-plugin.js +66 -0
- package/package.json +1 -1
- package/src/ui/authentication/EmailChangeForm.vue +2 -2
- package/src/ui/authentication/RequestOtpForm.vue +1 -1
|
@@ -0,0 +1,1633 @@
|
|
|
1
|
+
import { useQuasar, QForm, QInput, QStep, QStepperNavigation, QStepper, QIcon, QBtn, QSlider, QItemSection, QItem, QList, QMenu } from "quasar";
|
|
2
|
+
import { ref, defineComponent, watch, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toRef, createCommentVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
3
|
+
import { _ as _sfc_main$c } from "./QSubmitButton.vue_vue_type_script_setup_true_lang.fe90878f.js";
|
|
4
|
+
const lang$1 = {
|
|
5
|
+
isoName: "en-US",
|
|
6
|
+
myAccount: "Account",
|
|
7
|
+
signOut: "Sign out",
|
|
8
|
+
unprocessableRequest: "The server was unable to process the request.",
|
|
9
|
+
consent: {
|
|
10
|
+
message: (name) => `${name} is requesting access to your data.`,
|
|
11
|
+
deny: "Deny",
|
|
12
|
+
allow: "Allow"
|
|
13
|
+
},
|
|
14
|
+
email: {
|
|
15
|
+
fields: {
|
|
16
|
+
email: "Email address",
|
|
17
|
+
newEmail: "Your new email address",
|
|
18
|
+
repeatNewEmail: "Repeat your new email address"
|
|
19
|
+
},
|
|
20
|
+
validations: {
|
|
21
|
+
fieldRequired: "Field is required.",
|
|
22
|
+
invalidEmail: "A valid email address is required.",
|
|
23
|
+
emailsDoNotMatch: "The email addresses do not match."
|
|
24
|
+
},
|
|
25
|
+
changeEmail: "Change your email address.",
|
|
26
|
+
emailChanged: "Your email address has been changed."
|
|
27
|
+
},
|
|
28
|
+
otp: {
|
|
29
|
+
fields: {
|
|
30
|
+
email: "Email"
|
|
31
|
+
},
|
|
32
|
+
validations: {
|
|
33
|
+
fieldRequired: "Field is required.",
|
|
34
|
+
invalidEmail: "A valid email address is required."
|
|
35
|
+
},
|
|
36
|
+
request: "Request a one-time password",
|
|
37
|
+
checkEmail: "You will receive a verification code in your email. Please use this verification code in the next step.",
|
|
38
|
+
verificationCode: "Verification code"
|
|
39
|
+
},
|
|
40
|
+
login: {
|
|
41
|
+
fields: {
|
|
42
|
+
email: "Email",
|
|
43
|
+
password: "Password",
|
|
44
|
+
username: "Username"
|
|
45
|
+
},
|
|
46
|
+
validations: {
|
|
47
|
+
fieldRequired: "Field is required.",
|
|
48
|
+
invalidEmail: "A valid email address is required."
|
|
49
|
+
},
|
|
50
|
+
login: "Login",
|
|
51
|
+
loginWith: "Login with",
|
|
52
|
+
createAccount: "Create account",
|
|
53
|
+
forgotPassword: "Forgot your password?",
|
|
54
|
+
invalidCredentials: "Email address or password is incorrect."
|
|
55
|
+
},
|
|
56
|
+
password: {
|
|
57
|
+
fields: {
|
|
58
|
+
password: "Password",
|
|
59
|
+
repeatPassword: "Repeat password"
|
|
60
|
+
},
|
|
61
|
+
validations: {
|
|
62
|
+
fieldRequired: "Field is required",
|
|
63
|
+
minimumPasswordLength: (minimumPasswordLength) => `The minimum length of the password is ${minimumPasswordLength} characters.`,
|
|
64
|
+
passwordsDoNotMatch: "The password do not match."
|
|
65
|
+
},
|
|
66
|
+
changePassword: "Change your password.",
|
|
67
|
+
passwordChanged: "Your password has been changed."
|
|
68
|
+
},
|
|
69
|
+
register: {
|
|
70
|
+
fields: {
|
|
71
|
+
email: "Email",
|
|
72
|
+
password: "Password",
|
|
73
|
+
username: "Username",
|
|
74
|
+
repeatPassword: "Repeat password"
|
|
75
|
+
},
|
|
76
|
+
validations: {
|
|
77
|
+
fieldRequired: "Field is required",
|
|
78
|
+
invalidEmail: "A valid email address is required.",
|
|
79
|
+
notAlphaNumeric: "Veld mag geen speciale tekens bevatten."
|
|
80
|
+
},
|
|
81
|
+
register: "Register",
|
|
82
|
+
forgotPassword: "Forgot your password?",
|
|
83
|
+
accountCreated: "Your account has been sucessfully created. You can now login with your credentials.",
|
|
84
|
+
alreadyRegistered: "Email address is already registered."
|
|
85
|
+
},
|
|
86
|
+
verification: {
|
|
87
|
+
slider: "Sleep a.u.b. de onderstaande balk helemaal naar rechts tot deze groen wordt."
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91
|
+
__proto__: null,
|
|
92
|
+
default: lang$1
|
|
93
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
94
|
+
const lang = ref(lang$1);
|
|
95
|
+
const locales = /* @__PURE__ */ Object.assign({ "./en-US.ts": () => Promise.resolve().then(() => enUS), "./nl.ts": () => import("./nl.6b0aedb7.js") });
|
|
96
|
+
const useLang = () => {
|
|
97
|
+
return lang;
|
|
98
|
+
};
|
|
99
|
+
let loadingLanguage = false;
|
|
100
|
+
const loadLang = async (isoName) => {
|
|
101
|
+
if (!loadingLanguage) {
|
|
102
|
+
loadingLanguage = true;
|
|
103
|
+
try {
|
|
104
|
+
const data = (await locales[`./${isoName}.ts`]()).default;
|
|
105
|
+
if (data) {
|
|
106
|
+
lang.value = data;
|
|
107
|
+
}
|
|
108
|
+
} catch (e) {
|
|
109
|
+
if ({ "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true }.DEBUG)
|
|
110
|
+
console.error(e);
|
|
111
|
+
throw new Error(
|
|
112
|
+
`[quasar-components] Failed to load ${isoName} language file.`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
loadingLanguage = false;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
function _typeof$1(obj) {
|
|
119
|
+
"@babel/helpers - typeof";
|
|
120
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
121
|
+
_typeof$1 = function _typeof2(obj2) {
|
|
122
|
+
return typeof obj2;
|
|
123
|
+
};
|
|
124
|
+
} else {
|
|
125
|
+
_typeof$1 = function _typeof2(obj2) {
|
|
126
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return _typeof$1(obj);
|
|
130
|
+
}
|
|
131
|
+
function assertString(input) {
|
|
132
|
+
var isString = typeof input === "string" || input instanceof String;
|
|
133
|
+
if (!isString) {
|
|
134
|
+
var invalidType = _typeof$1(input);
|
|
135
|
+
if (input === null)
|
|
136
|
+
invalidType = "null";
|
|
137
|
+
else if (invalidType === "object")
|
|
138
|
+
invalidType = input.constructor.name;
|
|
139
|
+
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function merge() {
|
|
143
|
+
var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
144
|
+
var defaults = arguments.length > 1 ? arguments[1] : void 0;
|
|
145
|
+
for (var key in defaults) {
|
|
146
|
+
if (typeof obj[key] === "undefined") {
|
|
147
|
+
obj[key] = defaults[key];
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return obj;
|
|
151
|
+
}
|
|
152
|
+
function _typeof(obj) {
|
|
153
|
+
"@babel/helpers - typeof";
|
|
154
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
155
|
+
_typeof = function _typeof2(obj2) {
|
|
156
|
+
return typeof obj2;
|
|
157
|
+
};
|
|
158
|
+
} else {
|
|
159
|
+
_typeof = function _typeof2(obj2) {
|
|
160
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return _typeof(obj);
|
|
164
|
+
}
|
|
165
|
+
function isByteLength(str, options) {
|
|
166
|
+
assertString(str);
|
|
167
|
+
var min;
|
|
168
|
+
var max;
|
|
169
|
+
if (_typeof(options) === "object") {
|
|
170
|
+
min = options.min || 0;
|
|
171
|
+
max = options.max;
|
|
172
|
+
} else {
|
|
173
|
+
min = arguments[1];
|
|
174
|
+
max = arguments[2];
|
|
175
|
+
}
|
|
176
|
+
var len = encodeURI(str).split(/%..|./).length - 1;
|
|
177
|
+
return len >= min && (typeof max === "undefined" || len <= max);
|
|
178
|
+
}
|
|
179
|
+
var default_fqdn_options = {
|
|
180
|
+
require_tld: true,
|
|
181
|
+
allow_underscores: false,
|
|
182
|
+
allow_trailing_dot: false,
|
|
183
|
+
allow_numeric_tld: false,
|
|
184
|
+
allow_wildcard: false
|
|
185
|
+
};
|
|
186
|
+
function isFQDN(str, options) {
|
|
187
|
+
assertString(str);
|
|
188
|
+
options = merge(options, default_fqdn_options);
|
|
189
|
+
if (options.allow_trailing_dot && str[str.length - 1] === ".") {
|
|
190
|
+
str = str.substring(0, str.length - 1);
|
|
191
|
+
}
|
|
192
|
+
if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
|
|
193
|
+
str = str.substring(2);
|
|
194
|
+
}
|
|
195
|
+
var parts = str.split(".");
|
|
196
|
+
var tld = parts[parts.length - 1];
|
|
197
|
+
if (options.require_tld) {
|
|
198
|
+
if (parts.length < 2) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
if (!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
if (/\s/.test(tld)) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
return parts.every(function(part) {
|
|
212
|
+
if (part.length > 63) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
if (/[\uff01-\uff5e]/.test(part)) {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
if (/^-|-$/.test(part)) {
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
if (!options.allow_underscores && /_/.test(part)) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
return true;
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
|
|
231
|
+
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
232
|
+
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
233
|
+
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
|
234
|
+
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
|
235
|
+
function isIP(str) {
|
|
236
|
+
var version = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
237
|
+
assertString(str);
|
|
238
|
+
version = String(version);
|
|
239
|
+
if (!version) {
|
|
240
|
+
return isIP(str, 4) || isIP(str, 6);
|
|
241
|
+
}
|
|
242
|
+
if (version === "4") {
|
|
243
|
+
if (!IPv4AddressRegExp.test(str)) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
var parts = str.split(".").sort(function(a, b) {
|
|
247
|
+
return a - b;
|
|
248
|
+
});
|
|
249
|
+
return parts[3] <= 255;
|
|
250
|
+
}
|
|
251
|
+
if (version === "6") {
|
|
252
|
+
return !!IPv6AddressRegExp.test(str);
|
|
253
|
+
}
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
var default_email_options = {
|
|
257
|
+
allow_display_name: false,
|
|
258
|
+
require_display_name: false,
|
|
259
|
+
allow_utf8_local_part: true,
|
|
260
|
+
require_tld: true,
|
|
261
|
+
blacklisted_chars: "",
|
|
262
|
+
ignore_max_length: false,
|
|
263
|
+
host_blacklist: []
|
|
264
|
+
};
|
|
265
|
+
var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i;
|
|
266
|
+
var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
|
|
267
|
+
var gmailUserPart = /^[a-z\d]+$/;
|
|
268
|
+
var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i;
|
|
269
|
+
var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
|
|
270
|
+
var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;
|
|
271
|
+
var defaultMaxEmailLength = 254;
|
|
272
|
+
function validateDisplayName(display_name) {
|
|
273
|
+
var display_name_without_quotes = display_name.replace(/^"(.+)"$/, "$1");
|
|
274
|
+
if (!display_name_without_quotes.trim()) {
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
var contains_illegal = /[\.";<>]/.test(display_name_without_quotes);
|
|
278
|
+
if (contains_illegal) {
|
|
279
|
+
if (display_name_without_quotes === display_name) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length;
|
|
283
|
+
if (!all_start_with_back_slash) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
function isEmail(str, options) {
|
|
290
|
+
assertString(str);
|
|
291
|
+
options = merge(options, default_email_options);
|
|
292
|
+
if (options.require_display_name || options.allow_display_name) {
|
|
293
|
+
var display_email = str.match(splitNameAddress);
|
|
294
|
+
if (display_email) {
|
|
295
|
+
var display_name = display_email[1];
|
|
296
|
+
str = str.replace(display_name, "").replace(/(^<|>$)/g, "");
|
|
297
|
+
if (display_name.endsWith(" ")) {
|
|
298
|
+
display_name = display_name.substr(0, display_name.length - 1);
|
|
299
|
+
}
|
|
300
|
+
if (!validateDisplayName(display_name)) {
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
} else if (options.require_display_name) {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
var parts = str.split("@");
|
|
311
|
+
var domain = parts.pop();
|
|
312
|
+
var lower_domain = domain.toLowerCase();
|
|
313
|
+
if (options.host_blacklist.includes(lower_domain)) {
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
var user = parts.join("@");
|
|
317
|
+
if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) {
|
|
318
|
+
user = user.toLowerCase();
|
|
319
|
+
var username = user.split("+")[0];
|
|
320
|
+
if (!isByteLength(username.replace(/\./g, ""), {
|
|
321
|
+
min: 6,
|
|
322
|
+
max: 30
|
|
323
|
+
})) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
var _user_parts = username.split(".");
|
|
327
|
+
for (var i = 0; i < _user_parts.length; i++) {
|
|
328
|
+
if (!gmailUserPart.test(_user_parts[i])) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if (options.ignore_max_length === false && (!isByteLength(user, {
|
|
334
|
+
max: 64
|
|
335
|
+
}) || !isByteLength(domain, {
|
|
336
|
+
max: 254
|
|
337
|
+
}))) {
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
if (!isFQDN(domain, {
|
|
341
|
+
require_tld: options.require_tld
|
|
342
|
+
})) {
|
|
343
|
+
if (!options.allow_ip_domain) {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
if (!isIP(domain)) {
|
|
347
|
+
if (!domain.startsWith("[") || !domain.endsWith("]")) {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
var noBracketdomain = domain.substr(1, domain.length - 2);
|
|
351
|
+
if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
if (user[0] === '"') {
|
|
357
|
+
user = user.slice(1, user.length - 1);
|
|
358
|
+
return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
|
|
359
|
+
}
|
|
360
|
+
var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
|
|
361
|
+
var user_parts = user.split(".");
|
|
362
|
+
for (var _i = 0; _i < user_parts.length; _i++) {
|
|
363
|
+
if (!pattern.test(user_parts[_i])) {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (options.blacklisted_chars) {
|
|
368
|
+
if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1)
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
const __default__$a = {
|
|
374
|
+
name: "RequestOtpForm"
|
|
375
|
+
};
|
|
376
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
377
|
+
...__default__$a,
|
|
378
|
+
props: {
|
|
379
|
+
form: null,
|
|
380
|
+
input: null
|
|
381
|
+
},
|
|
382
|
+
emits: ["submit"],
|
|
383
|
+
setup(__props, { expose, emit }) {
|
|
384
|
+
const $q = useQuasar();
|
|
385
|
+
const lang2 = useLang();
|
|
386
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
387
|
+
loadLang($q.lang.isoName);
|
|
388
|
+
watch($q.lang, (val) => {
|
|
389
|
+
loadLang($q.lang.isoName);
|
|
390
|
+
});
|
|
391
|
+
const email = ref("");
|
|
392
|
+
const header = computed(() => lang2.value.otp.request);
|
|
393
|
+
const formRef = ref();
|
|
394
|
+
const validations = computed(() => ({
|
|
395
|
+
email: [
|
|
396
|
+
(val) => !!val || lang2.value.otp.validations.fieldRequired,
|
|
397
|
+
(val) => isEmail(val) || lang2.value.otp.validations.invalidEmail
|
|
398
|
+
]
|
|
399
|
+
}));
|
|
400
|
+
const submit = ({
|
|
401
|
+
done
|
|
402
|
+
}) => {
|
|
403
|
+
var _a;
|
|
404
|
+
(_a = formRef.value) == null ? void 0 : _a.validate().then((success) => {
|
|
405
|
+
if (success) {
|
|
406
|
+
emit("submit", {
|
|
407
|
+
email: email.value.trim(),
|
|
408
|
+
done
|
|
409
|
+
});
|
|
410
|
+
} else
|
|
411
|
+
done();
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
const variables = ref({ header });
|
|
415
|
+
const functions = ref({ submit });
|
|
416
|
+
expose({
|
|
417
|
+
variables,
|
|
418
|
+
functions
|
|
419
|
+
});
|
|
420
|
+
return (_ctx, _cache) => {
|
|
421
|
+
const _component_q_input = QInput;
|
|
422
|
+
return openBlock(), createBlock(unref(QForm), mergeProps({
|
|
423
|
+
ref_key: "formRef",
|
|
424
|
+
ref: formRef
|
|
425
|
+
}, __props.form), {
|
|
426
|
+
default: withCtx(() => [
|
|
427
|
+
createVNode(_component_q_input, mergeProps(__props.input, {
|
|
428
|
+
id: "email",
|
|
429
|
+
modelValue: email.value,
|
|
430
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
|
|
431
|
+
modelModifiers: { trim: true },
|
|
432
|
+
name: "email",
|
|
433
|
+
type: "text",
|
|
434
|
+
label: unref(lang2).otp.fields.email,
|
|
435
|
+
rules: unref(validations)["email"],
|
|
436
|
+
"lazy-rules": "",
|
|
437
|
+
autofocus: ""
|
|
438
|
+
}), null, 16, ["modelValue", "label", "rules"]),
|
|
439
|
+
renderSlot(_ctx.$slots, "default", { submit })
|
|
440
|
+
]),
|
|
441
|
+
_: 3
|
|
442
|
+
}, 16);
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
447
|
+
__name: "OtpInput",
|
|
448
|
+
props: {
|
|
449
|
+
modelValue: null
|
|
450
|
+
},
|
|
451
|
+
emits: ["update:modelValue"],
|
|
452
|
+
setup(__props) {
|
|
453
|
+
const lang2 = useLang();
|
|
454
|
+
const validations = computed(() => ({
|
|
455
|
+
otp: [(val) => !!val || lang2.value.otp.validations.fieldRequired]
|
|
456
|
+
}));
|
|
457
|
+
return (_ctx, _cache) => {
|
|
458
|
+
return openBlock(), createBlock(unref(QInput), {
|
|
459
|
+
id: "otp",
|
|
460
|
+
name: "otp",
|
|
461
|
+
"model-value": __props.modelValue,
|
|
462
|
+
"bottom-slots": "",
|
|
463
|
+
"lazy-rules": "",
|
|
464
|
+
label: unref(lang2).otp.verificationCode,
|
|
465
|
+
rules: unref(validations)["otp"],
|
|
466
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
467
|
+
}, null, 8, ["model-value", "label", "rules"]);
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
const __default__$9 = {
|
|
472
|
+
name: "EmailChangeForm"
|
|
473
|
+
};
|
|
474
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
475
|
+
...__default__$9,
|
|
476
|
+
props: {
|
|
477
|
+
email: null,
|
|
478
|
+
form: null,
|
|
479
|
+
input: null
|
|
480
|
+
},
|
|
481
|
+
emits: ["submit"],
|
|
482
|
+
setup(__props, { expose, emit }) {
|
|
483
|
+
const props = __props;
|
|
484
|
+
const $q = useQuasar();
|
|
485
|
+
const lang2 = useLang();
|
|
486
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
487
|
+
loadLang($q.lang.isoName);
|
|
488
|
+
watch($q.lang, (val) => {
|
|
489
|
+
loadLang($q.lang.isoName);
|
|
490
|
+
});
|
|
491
|
+
const email = toRef(props, "email");
|
|
492
|
+
const otp = ref("");
|
|
493
|
+
const newEmail = ref("");
|
|
494
|
+
const repeatNewEmail = ref("");
|
|
495
|
+
const header = computed(() => lang2.value.email.changeEmail);
|
|
496
|
+
const formRef = ref();
|
|
497
|
+
const validations = computed(() => ({
|
|
498
|
+
newEmail: [
|
|
499
|
+
(val) => !!val || lang2.value.email.validations.fieldRequired,
|
|
500
|
+
(val) => isEmail(val) || lang2.value.email.validations.invalidEmail
|
|
501
|
+
],
|
|
502
|
+
repeatNewEmail: [
|
|
503
|
+
(val) => !!val || lang2.value.email.validations.fieldRequired,
|
|
504
|
+
(val) => isEmail(val) || lang2.value.email.validations.emailsDoNotMatch
|
|
505
|
+
]
|
|
506
|
+
}));
|
|
507
|
+
const submit = (evt) => {
|
|
508
|
+
var _a;
|
|
509
|
+
(_a = formRef.value) == null ? void 0 : _a.validate().then((success) => {
|
|
510
|
+
if (success) {
|
|
511
|
+
emit("submit", {
|
|
512
|
+
email: email.value.trim(),
|
|
513
|
+
newEmail: newEmail.value.trim(),
|
|
514
|
+
otp: otp.value,
|
|
515
|
+
done: evt.done
|
|
516
|
+
});
|
|
517
|
+
} else
|
|
518
|
+
evt.done();
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
const variables = ref({
|
|
522
|
+
header
|
|
523
|
+
});
|
|
524
|
+
const functions = ref({
|
|
525
|
+
submit
|
|
526
|
+
});
|
|
527
|
+
expose({
|
|
528
|
+
variables,
|
|
529
|
+
functions
|
|
530
|
+
});
|
|
531
|
+
return (_ctx, _cache) => {
|
|
532
|
+
const _component_q_input = QInput;
|
|
533
|
+
return openBlock(), createBlock(unref(QForm), mergeProps({
|
|
534
|
+
ref_key: "formRef",
|
|
535
|
+
ref: formRef,
|
|
536
|
+
class: "q-gutter-md"
|
|
537
|
+
}, __props.form), {
|
|
538
|
+
default: withCtx(() => [
|
|
539
|
+
createVNode(_sfc_main$a, mergeProps(__props.input, {
|
|
540
|
+
modelValue: otp.value,
|
|
541
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
|
|
542
|
+
}), null, 16, ["modelValue"]),
|
|
543
|
+
createVNode(_component_q_input, mergeProps(__props.input, {
|
|
544
|
+
id: "newEmail",
|
|
545
|
+
modelValue: newEmail.value,
|
|
546
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => newEmail.value = $event),
|
|
547
|
+
name: "newEmail",
|
|
548
|
+
label: unref(lang2).email.fields.newEmail,
|
|
549
|
+
"bottom-slots": "",
|
|
550
|
+
rules: unref(validations)["newEmail"],
|
|
551
|
+
"lazy-rules": ""
|
|
552
|
+
}), null, 16, ["modelValue", "label", "rules"]),
|
|
553
|
+
createVNode(_component_q_input, mergeProps(__props.input, {
|
|
554
|
+
id: "repeatNewEmail",
|
|
555
|
+
modelValue: repeatNewEmail.value,
|
|
556
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => repeatNewEmail.value = $event),
|
|
557
|
+
name: "repeatNewEmail",
|
|
558
|
+
label: unref(lang2).email.fields.repeatNewEmail,
|
|
559
|
+
"bottom-slots": "",
|
|
560
|
+
rules: unref(validations)["repeatNewEmail"],
|
|
561
|
+
"lazy-rules": ""
|
|
562
|
+
}), null, 16, ["modelValue", "label", "rules"]),
|
|
563
|
+
renderSlot(_ctx.$slots, "default", { submit })
|
|
564
|
+
]),
|
|
565
|
+
_: 3
|
|
566
|
+
}, 16);
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
const __default__$8 = {
|
|
571
|
+
name: "EmailChangeStepper"
|
|
572
|
+
};
|
|
573
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
574
|
+
...__default__$8,
|
|
575
|
+
props: {
|
|
576
|
+
input: null
|
|
577
|
+
},
|
|
578
|
+
emits: ["requestOtp", "changeEmail"],
|
|
579
|
+
setup(__props, { expose, emit }) {
|
|
580
|
+
const $q = useQuasar();
|
|
581
|
+
const lang2 = useLang();
|
|
582
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
583
|
+
loadLang($q.lang.isoName);
|
|
584
|
+
watch($q.lang, (val) => {
|
|
585
|
+
loadLang($q.lang.isoName);
|
|
586
|
+
});
|
|
587
|
+
const steps = ["requestOtp", "changeEmail"];
|
|
588
|
+
const step = ref("requestOtp");
|
|
589
|
+
const email = ref("");
|
|
590
|
+
const header = computed(() => lang2.value.email.changeEmail);
|
|
591
|
+
const emailChanged = computed(() => lang2.value.email.emailChanged);
|
|
592
|
+
const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
|
|
593
|
+
const checkEmail = computed(() => lang2.value.otp.checkEmail);
|
|
594
|
+
const requestOtpFormRef = ref();
|
|
595
|
+
const emailChangeFormRef = ref();
|
|
596
|
+
const requestOtpHeader = computed(
|
|
597
|
+
() => {
|
|
598
|
+
var _a;
|
|
599
|
+
return ((_a = requestOtpFormRef.value) == null ? void 0 : _a.variables.header) || "";
|
|
600
|
+
}
|
|
601
|
+
);
|
|
602
|
+
const emailChangeHeader = computed(
|
|
603
|
+
() => {
|
|
604
|
+
var _a;
|
|
605
|
+
return ((_a = emailChangeFormRef.value) == null ? void 0 : _a.variables.header) || "";
|
|
606
|
+
}
|
|
607
|
+
);
|
|
608
|
+
const requestOtp = ({
|
|
609
|
+
email: emittedEmail,
|
|
610
|
+
done
|
|
611
|
+
}) => {
|
|
612
|
+
emit("requestOtp", {
|
|
613
|
+
email: emittedEmail,
|
|
614
|
+
done: () => {
|
|
615
|
+
email.value = emittedEmail;
|
|
616
|
+
done();
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
};
|
|
620
|
+
const changeEmail = ({ email: email2, newEmail, otp, done }) => {
|
|
621
|
+
emit("changeEmail", {
|
|
622
|
+
email: email2,
|
|
623
|
+
newEmail,
|
|
624
|
+
otp,
|
|
625
|
+
done
|
|
626
|
+
});
|
|
627
|
+
};
|
|
628
|
+
const variables = ref({
|
|
629
|
+
header,
|
|
630
|
+
emailChanged,
|
|
631
|
+
unprocessableRequest,
|
|
632
|
+
checkEmail,
|
|
633
|
+
steps
|
|
634
|
+
});
|
|
635
|
+
const functions = ref({
|
|
636
|
+
goToStep: (newStep) => step.value = newStep
|
|
637
|
+
});
|
|
638
|
+
expose({
|
|
639
|
+
variables,
|
|
640
|
+
functions
|
|
641
|
+
});
|
|
642
|
+
return (_ctx, _cache) => {
|
|
643
|
+
const _component_q_step = QStep;
|
|
644
|
+
const _component_q_stepper_navigation = QStepperNavigation;
|
|
645
|
+
const _component_q_stepper = QStepper;
|
|
646
|
+
return openBlock(), createBlock(_component_q_stepper, {
|
|
647
|
+
modelValue: step.value,
|
|
648
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
|
|
649
|
+
}, {
|
|
650
|
+
navigation: withCtx(() => [
|
|
651
|
+
createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
|
|
652
|
+
default: withCtx(() => {
|
|
653
|
+
var _a, _b;
|
|
654
|
+
return [
|
|
655
|
+
step.value === "requestOtp" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
656
|
+
key: 0,
|
|
657
|
+
"is-next-button": "",
|
|
658
|
+
onSubmit: (_a = requestOtpFormRef.value) == null ? void 0 : _a.functions.submit
|
|
659
|
+
}, null, 8, ["onSubmit"])) : createCommentVNode("", true),
|
|
660
|
+
step.value === "changeEmail" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
661
|
+
key: 1,
|
|
662
|
+
onSubmit: (_b = emailChangeFormRef.value) == null ? void 0 : _b.functions.submit
|
|
663
|
+
}, null, 8, ["onSubmit"])) : createCommentVNode("", true)
|
|
664
|
+
];
|
|
665
|
+
}),
|
|
666
|
+
_: 1
|
|
667
|
+
})
|
|
668
|
+
]),
|
|
669
|
+
default: withCtx(() => [
|
|
670
|
+
createVNode(_component_q_step, {
|
|
671
|
+
name: "requestOtp",
|
|
672
|
+
title: unref(requestOtpHeader)
|
|
673
|
+
}, {
|
|
674
|
+
default: withCtx(() => [
|
|
675
|
+
createVNode(_sfc_main$b, {
|
|
676
|
+
ref_key: "requestOtpFormRef",
|
|
677
|
+
ref: requestOtpFormRef,
|
|
678
|
+
input: __props.input,
|
|
679
|
+
onSubmit: requestOtp
|
|
680
|
+
}, null, 8, ["input"])
|
|
681
|
+
]),
|
|
682
|
+
_: 1
|
|
683
|
+
}, 8, ["title"]),
|
|
684
|
+
createVNode(_component_q_step, {
|
|
685
|
+
name: "changeEmail",
|
|
686
|
+
title: unref(emailChangeHeader)
|
|
687
|
+
}, {
|
|
688
|
+
default: withCtx(() => [
|
|
689
|
+
createVNode(_sfc_main$9, {
|
|
690
|
+
ref_key: "emailChangeFormRef",
|
|
691
|
+
ref: emailChangeFormRef,
|
|
692
|
+
email: email.value,
|
|
693
|
+
input: __props.input,
|
|
694
|
+
onSubmit: changeEmail
|
|
695
|
+
}, null, 8, ["email", "input"])
|
|
696
|
+
]),
|
|
697
|
+
_: 1
|
|
698
|
+
}, 8, ["title"])
|
|
699
|
+
]),
|
|
700
|
+
_: 1
|
|
701
|
+
}, 8, ["modelValue"]);
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
function equals(str, comparison) {
|
|
706
|
+
assertString(str);
|
|
707
|
+
return str === comparison;
|
|
708
|
+
}
|
|
709
|
+
const __default__$7 = {
|
|
710
|
+
name: "PasswordChangeForm"
|
|
711
|
+
};
|
|
712
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
713
|
+
...__default__$7,
|
|
714
|
+
props: {
|
|
715
|
+
email: null,
|
|
716
|
+
minimumPasswordLength: { default: 8 },
|
|
717
|
+
form: { default: void 0 },
|
|
718
|
+
input: { default: void 0 }
|
|
719
|
+
},
|
|
720
|
+
emits: ["submit"],
|
|
721
|
+
setup(__props, { expose, emit }) {
|
|
722
|
+
const props = __props;
|
|
723
|
+
const $q = useQuasar();
|
|
724
|
+
const lang2 = useLang();
|
|
725
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
726
|
+
loadLang($q.lang.isoName);
|
|
727
|
+
watch($q.lang, (val) => {
|
|
728
|
+
loadLang($q.lang.isoName);
|
|
729
|
+
});
|
|
730
|
+
const email = toRef(props, "email");
|
|
731
|
+
const minimumPasswordLength = toRef(props, "minimumPasswordLength");
|
|
732
|
+
const otp = ref("");
|
|
733
|
+
const newPassword = ref("");
|
|
734
|
+
const repeatNewPassword = ref("");
|
|
735
|
+
const showPassword = ref(false);
|
|
736
|
+
const showRepeatPassword = ref(false);
|
|
737
|
+
const header = computed(() => lang2.value.password.changePassword);
|
|
738
|
+
const formRef = ref();
|
|
739
|
+
const validations = computed(() => ({
|
|
740
|
+
password: [
|
|
741
|
+
(val) => !!val || lang2.value.password.validations.fieldRequired,
|
|
742
|
+
(val) => val.length >= minimumPasswordLength.value || lang2.value.password.validations.minimumPasswordLength(
|
|
743
|
+
minimumPasswordLength.value
|
|
744
|
+
)
|
|
745
|
+
],
|
|
746
|
+
repeatPassword: [
|
|
747
|
+
(val) => !!val || lang2.value.password.validations.fieldRequired,
|
|
748
|
+
(val) => equals(val, newPassword.value) || lang2.value.password.validations.passwordsDoNotMatch
|
|
749
|
+
]
|
|
750
|
+
}));
|
|
751
|
+
const submit = (evt) => {
|
|
752
|
+
var _a;
|
|
753
|
+
(_a = formRef.value) == null ? void 0 : _a.validate().then((success) => {
|
|
754
|
+
if (success) {
|
|
755
|
+
emit("submit", {
|
|
756
|
+
email: email.value,
|
|
757
|
+
newPassword: newPassword.value,
|
|
758
|
+
otp: otp.value,
|
|
759
|
+
done: evt.done
|
|
760
|
+
});
|
|
761
|
+
} else
|
|
762
|
+
evt.done();
|
|
763
|
+
});
|
|
764
|
+
};
|
|
765
|
+
const variables = ref({
|
|
766
|
+
header
|
|
767
|
+
});
|
|
768
|
+
const functions = ref({
|
|
769
|
+
submit
|
|
770
|
+
});
|
|
771
|
+
expose({
|
|
772
|
+
variables,
|
|
773
|
+
functions
|
|
774
|
+
});
|
|
775
|
+
return (_ctx, _cache) => {
|
|
776
|
+
const _component_q_icon = QIcon;
|
|
777
|
+
const _component_q_input = QInput;
|
|
778
|
+
return openBlock(), createBlock(unref(QForm), mergeProps({
|
|
779
|
+
ref_key: "formRef",
|
|
780
|
+
ref: formRef,
|
|
781
|
+
class: "q-gutter-md"
|
|
782
|
+
}, __props.form), {
|
|
783
|
+
default: withCtx(() => [
|
|
784
|
+
createVNode(_sfc_main$a, mergeProps(__props.input, {
|
|
785
|
+
modelValue: otp.value,
|
|
786
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
|
|
787
|
+
}), null, 16, ["modelValue"]),
|
|
788
|
+
createVNode(_component_q_input, mergeProps(__props.input, {
|
|
789
|
+
id: "newPassword",
|
|
790
|
+
modelValue: newPassword.value,
|
|
791
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => newPassword.value = $event),
|
|
792
|
+
name: "newPassword",
|
|
793
|
+
type: showPassword.value ? "text" : "password",
|
|
794
|
+
label: unref(lang2).password.fields.password,
|
|
795
|
+
"bottom-slots": "",
|
|
796
|
+
rules: unref(validations)["newPassword"],
|
|
797
|
+
"lazy-rules": ""
|
|
798
|
+
}), {
|
|
799
|
+
append: withCtx(() => [
|
|
800
|
+
createVNode(_component_q_icon, {
|
|
801
|
+
name: showPassword.value ? "visibility" : "visibility_off",
|
|
802
|
+
class: "cursor-pointer",
|
|
803
|
+
onClick: _cache[1] || (_cache[1] = ($event) => showPassword.value = !showPassword.value)
|
|
804
|
+
}, null, 8, ["name"])
|
|
805
|
+
]),
|
|
806
|
+
_: 1
|
|
807
|
+
}, 16, ["modelValue", "type", "label", "rules"]),
|
|
808
|
+
createVNode(_component_q_input, mergeProps(__props.input, {
|
|
809
|
+
id: "repeatNewPassword",
|
|
810
|
+
modelValue: repeatNewPassword.value,
|
|
811
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => repeatNewPassword.value = $event),
|
|
812
|
+
name: "repeatNewPassword",
|
|
813
|
+
type: showRepeatPassword.value ? "text" : "password",
|
|
814
|
+
label: unref(lang2).password.fields.repeatPassword,
|
|
815
|
+
"bottom-slots": "",
|
|
816
|
+
rules: unref(validations)["repeatNewPassword"],
|
|
817
|
+
"lazy-rules": ""
|
|
818
|
+
}), {
|
|
819
|
+
append: withCtx(() => [
|
|
820
|
+
createVNode(_component_q_icon, {
|
|
821
|
+
name: showRepeatPassword.value ? "visibility" : "visibility_off",
|
|
822
|
+
class: "cursor-pointer",
|
|
823
|
+
onClick: _cache[3] || (_cache[3] = ($event) => showRepeatPassword.value = !showRepeatPassword.value)
|
|
824
|
+
}, null, 8, ["name"])
|
|
825
|
+
]),
|
|
826
|
+
_: 1
|
|
827
|
+
}, 16, ["modelValue", "type", "label", "rules"]),
|
|
828
|
+
renderSlot(_ctx.$slots, "default", { submit })
|
|
829
|
+
]),
|
|
830
|
+
_: 3
|
|
831
|
+
}, 16);
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
const __default__$6 = {
|
|
836
|
+
name: "PasswordChangeStepper"
|
|
837
|
+
};
|
|
838
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
839
|
+
...__default__$6,
|
|
840
|
+
props: {
|
|
841
|
+
input: null
|
|
842
|
+
},
|
|
843
|
+
emits: ["requestOtp", "changePassword"],
|
|
844
|
+
setup(__props, { expose, emit }) {
|
|
845
|
+
const $q = useQuasar();
|
|
846
|
+
const lang2 = useLang();
|
|
847
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
848
|
+
loadLang($q.lang.isoName);
|
|
849
|
+
watch($q.lang, (val) => {
|
|
850
|
+
loadLang($q.lang.isoName);
|
|
851
|
+
});
|
|
852
|
+
const steps = ["requestOtp", "changePassword"];
|
|
853
|
+
const step = ref("requestOtp");
|
|
854
|
+
const email = ref("");
|
|
855
|
+
const header = computed(() => lang2.value.password.changePassword);
|
|
856
|
+
const passwordChanged = computed(() => lang2.value.password.passwordChanged);
|
|
857
|
+
const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
|
|
858
|
+
const checkEmail = computed(() => lang2.value.otp.checkEmail);
|
|
859
|
+
const requestOtpFormRef = ref();
|
|
860
|
+
const passwordChangeFormRef = ref();
|
|
861
|
+
const requestOtpHeader = computed(
|
|
862
|
+
() => {
|
|
863
|
+
var _a;
|
|
864
|
+
return ((_a = requestOtpFormRef.value) == null ? void 0 : _a.variables.header) || "";
|
|
865
|
+
}
|
|
866
|
+
);
|
|
867
|
+
const passwordChangeHeader = computed(
|
|
868
|
+
() => {
|
|
869
|
+
var _a;
|
|
870
|
+
return ((_a = passwordChangeFormRef.value) == null ? void 0 : _a.variables.header) || "";
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
const requestOtp = ({
|
|
874
|
+
email: emittedEmail,
|
|
875
|
+
done
|
|
876
|
+
}) => {
|
|
877
|
+
emit("requestOtp", {
|
|
878
|
+
email: emittedEmail,
|
|
879
|
+
done: () => {
|
|
880
|
+
email.value = emittedEmail;
|
|
881
|
+
done();
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
};
|
|
885
|
+
const changePassword = ({ email: email2, newPassword, otp, done }) => {
|
|
886
|
+
emit("changePassword", {
|
|
887
|
+
email: email2,
|
|
888
|
+
newPassword,
|
|
889
|
+
otp,
|
|
890
|
+
done
|
|
891
|
+
});
|
|
892
|
+
};
|
|
893
|
+
const variables = ref({
|
|
894
|
+
header,
|
|
895
|
+
passwordChanged,
|
|
896
|
+
unprocessableRequest,
|
|
897
|
+
checkEmail,
|
|
898
|
+
steps
|
|
899
|
+
});
|
|
900
|
+
const functions = ref({
|
|
901
|
+
goToStep: (newStep) => step.value = newStep
|
|
902
|
+
});
|
|
903
|
+
expose({
|
|
904
|
+
variables,
|
|
905
|
+
functions
|
|
906
|
+
});
|
|
907
|
+
return (_ctx, _cache) => {
|
|
908
|
+
const _component_q_step = QStep;
|
|
909
|
+
const _component_q_stepper_navigation = QStepperNavigation;
|
|
910
|
+
const _component_q_stepper = QStepper;
|
|
911
|
+
return openBlock(), createBlock(_component_q_stepper, {
|
|
912
|
+
modelValue: step.value,
|
|
913
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
|
|
914
|
+
}, {
|
|
915
|
+
navigation: withCtx(() => [
|
|
916
|
+
createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
|
|
917
|
+
default: withCtx(() => {
|
|
918
|
+
var _a, _b;
|
|
919
|
+
return [
|
|
920
|
+
step.value === "requestOtp" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
921
|
+
key: 0,
|
|
922
|
+
"is-next-button": "",
|
|
923
|
+
onSubmit: (_a = requestOtpFormRef.value) == null ? void 0 : _a.functions.submit
|
|
924
|
+
}, null, 8, ["onSubmit"])) : createCommentVNode("", true),
|
|
925
|
+
step.value === "changePassword" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
926
|
+
key: 1,
|
|
927
|
+
onSubmit: (_b = passwordChangeFormRef.value) == null ? void 0 : _b.functions.submit
|
|
928
|
+
}, null, 8, ["onSubmit"])) : createCommentVNode("", true)
|
|
929
|
+
];
|
|
930
|
+
}),
|
|
931
|
+
_: 1
|
|
932
|
+
})
|
|
933
|
+
]),
|
|
934
|
+
default: withCtx(() => [
|
|
935
|
+
createVNode(_component_q_step, {
|
|
936
|
+
name: "requestOtp",
|
|
937
|
+
title: unref(requestOtpHeader)
|
|
938
|
+
}, {
|
|
939
|
+
default: withCtx(() => [
|
|
940
|
+
createVNode(_sfc_main$b, {
|
|
941
|
+
ref_key: "requestOtpFormRef",
|
|
942
|
+
ref: requestOtpFormRef,
|
|
943
|
+
input: __props.input,
|
|
944
|
+
onSubmit: requestOtp
|
|
945
|
+
}, null, 8, ["input"])
|
|
946
|
+
]),
|
|
947
|
+
_: 1
|
|
948
|
+
}, 8, ["title"]),
|
|
949
|
+
createVNode(_component_q_step, {
|
|
950
|
+
name: "changePassword",
|
|
951
|
+
title: unref(passwordChangeHeader)
|
|
952
|
+
}, {
|
|
953
|
+
default: withCtx(() => [
|
|
954
|
+
createVNode(_sfc_main$7, {
|
|
955
|
+
ref_key: "passwordChangeFormRef",
|
|
956
|
+
ref: passwordChangeFormRef,
|
|
957
|
+
email: email.value,
|
|
958
|
+
input: __props.input,
|
|
959
|
+
onSubmit: changePassword
|
|
960
|
+
}, null, 8, ["email", "input"])
|
|
961
|
+
]),
|
|
962
|
+
_: 1
|
|
963
|
+
}, 8, ["title"])
|
|
964
|
+
]),
|
|
965
|
+
_: 1
|
|
966
|
+
}, 8, ["modelValue"]);
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
const __default__$5 = {
|
|
971
|
+
name: "LoginForm"
|
|
972
|
+
};
|
|
973
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
974
|
+
...__default__$5,
|
|
975
|
+
props: {
|
|
976
|
+
useUsername: { type: Boolean },
|
|
977
|
+
passwordForgotUrl: null,
|
|
978
|
+
form: null,
|
|
979
|
+
input: null
|
|
980
|
+
},
|
|
981
|
+
emits: ["submit"],
|
|
982
|
+
setup(__props, { expose, emit }) {
|
|
983
|
+
const $q = useQuasar();
|
|
984
|
+
const lang2 = useLang();
|
|
985
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
986
|
+
loadLang($q.lang.isoName);
|
|
987
|
+
watch($q.lang, (val) => {
|
|
988
|
+
loadLang($q.lang.isoName);
|
|
989
|
+
});
|
|
990
|
+
const email = ref("");
|
|
991
|
+
const password = ref("");
|
|
992
|
+
const username = ref("");
|
|
993
|
+
const showPassword = ref(false);
|
|
994
|
+
const header = computed(() => lang2.value.login.login);
|
|
995
|
+
const createAccount = computed(() => lang2.value.login.createAccount);
|
|
996
|
+
const invalidCredentials = computed(() => lang2.value.login.invalidCredentials);
|
|
997
|
+
const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
|
|
998
|
+
const formRef = ref();
|
|
999
|
+
const validations = computed(() => ({
|
|
1000
|
+
email: [
|
|
1001
|
+
(val) => !!val || lang2.value.login.validations.fieldRequired,
|
|
1002
|
+
(val) => isEmail(val) || lang2.value.login.validations.invalidEmail
|
|
1003
|
+
],
|
|
1004
|
+
username: [(val) => !!val || lang2.value.login.validations.fieldRequired],
|
|
1005
|
+
password: [(val) => !!val || lang2.value.login.validations.fieldRequired]
|
|
1006
|
+
}));
|
|
1007
|
+
const submit = (evt) => {
|
|
1008
|
+
var _a;
|
|
1009
|
+
(_a = formRef.value) == null ? void 0 : _a.validate().then((success) => {
|
|
1010
|
+
if (success) {
|
|
1011
|
+
emit("submit", {
|
|
1012
|
+
email: email.value.trim(),
|
|
1013
|
+
password: password.value,
|
|
1014
|
+
username: username.value.trim(),
|
|
1015
|
+
done: evt.done
|
|
1016
|
+
});
|
|
1017
|
+
} else
|
|
1018
|
+
evt.done();
|
|
1019
|
+
});
|
|
1020
|
+
};
|
|
1021
|
+
const variables = ref({
|
|
1022
|
+
header,
|
|
1023
|
+
createAccount,
|
|
1024
|
+
invalidCredentials,
|
|
1025
|
+
unprocessableRequest
|
|
1026
|
+
});
|
|
1027
|
+
const functions = ref({
|
|
1028
|
+
submit
|
|
1029
|
+
});
|
|
1030
|
+
expose({
|
|
1031
|
+
variables,
|
|
1032
|
+
functions
|
|
1033
|
+
});
|
|
1034
|
+
return (_ctx, _cache) => {
|
|
1035
|
+
const _component_q_input = QInput;
|
|
1036
|
+
const _component_q_icon = QIcon;
|
|
1037
|
+
const _component_q_btn = QBtn;
|
|
1038
|
+
return openBlock(), createBlock(unref(QForm), mergeProps({
|
|
1039
|
+
ref_key: "formRef",
|
|
1040
|
+
ref: formRef,
|
|
1041
|
+
class: "q-gutter-md"
|
|
1042
|
+
}, __props.form), {
|
|
1043
|
+
default: withCtx(() => [
|
|
1044
|
+
!__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
|
|
1045
|
+
id: "email",
|
|
1046
|
+
modelValue: email.value,
|
|
1047
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
|
|
1048
|
+
name: "email",
|
|
1049
|
+
label: unref(lang2).login.fields.email,
|
|
1050
|
+
"bottom-slots": "",
|
|
1051
|
+
rules: unref(validations)["email"],
|
|
1052
|
+
"lazy-rules": ""
|
|
1053
|
+
}), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
|
|
1054
|
+
__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
|
|
1055
|
+
id: "username",
|
|
1056
|
+
modelValue: username.value,
|
|
1057
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
|
|
1058
|
+
name: "username",
|
|
1059
|
+
label: unref(lang2).login.fields.username,
|
|
1060
|
+
"bottom-slots": "",
|
|
1061
|
+
rules: unref(validations)["username"],
|
|
1062
|
+
"lazy-rules": ""
|
|
1063
|
+
}), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
|
|
1064
|
+
createVNode(_component_q_input, mergeProps({
|
|
1065
|
+
id: "password",
|
|
1066
|
+
modelValue: password.value,
|
|
1067
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
|
|
1068
|
+
class: "q-pt-none"
|
|
1069
|
+
}, __props.input, {
|
|
1070
|
+
name: "password",
|
|
1071
|
+
type: showPassword.value ? "text" : "password",
|
|
1072
|
+
label: unref(lang2).login.fields.password,
|
|
1073
|
+
rules: unref(validations)["password"],
|
|
1074
|
+
"lazy-rules": "",
|
|
1075
|
+
"bottom-slots": ""
|
|
1076
|
+
}), {
|
|
1077
|
+
append: withCtx(() => [
|
|
1078
|
+
createVNode(_component_q_icon, {
|
|
1079
|
+
name: showPassword.value ? "visibility" : "visibility_off",
|
|
1080
|
+
class: "cursor-pointer",
|
|
1081
|
+
onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
|
|
1082
|
+
}, null, 8, ["name"])
|
|
1083
|
+
]),
|
|
1084
|
+
_: 1
|
|
1085
|
+
}, 16, ["modelValue", "type", "label", "rules"]),
|
|
1086
|
+
__props.passwordForgotUrl ? (openBlock(), createBlock(_component_q_btn, {
|
|
1087
|
+
key: 2,
|
|
1088
|
+
class: "q-pt-none",
|
|
1089
|
+
label: unref(lang2).login.forgotPassword,
|
|
1090
|
+
size: "sm",
|
|
1091
|
+
flat: "",
|
|
1092
|
+
to: __props.passwordForgotUrl
|
|
1093
|
+
}, null, 8, ["label", "to"])) : createCommentVNode("", true),
|
|
1094
|
+
renderSlot(_ctx.$slots, "default", { submit })
|
|
1095
|
+
]),
|
|
1096
|
+
_: 3
|
|
1097
|
+
}, 16);
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
var alphanumeric = {
|
|
1102
|
+
"en-US": /^[0-9A-Z]+$/i,
|
|
1103
|
+
"az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
|
1104
|
+
"bg-BG": /^[0-9А-Я]+$/i,
|
|
1105
|
+
"cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
|
1106
|
+
"da-DK": /^[0-9A-ZÆØÅ]+$/i,
|
|
1107
|
+
"de-DE": /^[0-9A-ZÄÖÜß]+$/i,
|
|
1108
|
+
"el-GR": /^[0-9Α-ω]+$/i,
|
|
1109
|
+
"es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
|
|
1110
|
+
"fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
|
|
1111
|
+
"fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
|
1112
|
+
"it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
|
1113
|
+
"hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
|
1114
|
+
"nb-NO": /^[0-9A-ZÆØÅ]+$/i,
|
|
1115
|
+
"nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
|
|
1116
|
+
"nn-NO": /^[0-9A-ZÆØÅ]+$/i,
|
|
1117
|
+
"pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
|
1118
|
+
"pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
|
1119
|
+
"ru-RU": /^[0-9А-ЯЁ]+$/i,
|
|
1120
|
+
"sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
|
|
1121
|
+
"sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
|
1122
|
+
"sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
|
|
1123
|
+
"sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
|
|
1124
|
+
"sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
|
|
1125
|
+
"th-TH": /^[ก-๙\s]+$/i,
|
|
1126
|
+
"tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
|
|
1127
|
+
"uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
|
|
1128
|
+
"ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
|
1129
|
+
"vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
|
1130
|
+
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
|
1131
|
+
he: /^[0-9א-ת]+$/,
|
|
1132
|
+
fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
|
|
1133
|
+
"hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i
|
|
1134
|
+
};
|
|
1135
|
+
var englishLocales = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"];
|
|
1136
|
+
for (var locale, i = 0; i < englishLocales.length; i++) {
|
|
1137
|
+
locale = "en-".concat(englishLocales[i]);
|
|
1138
|
+
alphanumeric[locale] = alphanumeric["en-US"];
|
|
1139
|
+
}
|
|
1140
|
+
var arabicLocales = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"];
|
|
1141
|
+
for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
|
|
1142
|
+
_locale = "ar-".concat(arabicLocales[_i]);
|
|
1143
|
+
alphanumeric[_locale] = alphanumeric.ar;
|
|
1144
|
+
}
|
|
1145
|
+
var farsiLocales = ["IR", "AF"];
|
|
1146
|
+
for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {
|
|
1147
|
+
_locale2 = "fa-".concat(farsiLocales[_i2]);
|
|
1148
|
+
alphanumeric[_locale2] = alphanumeric.fa;
|
|
1149
|
+
}
|
|
1150
|
+
alphanumeric["fr-CA"] = alphanumeric["fr-FR"];
|
|
1151
|
+
alphanumeric["pt-BR"] = alphanumeric["pt-PT"];
|
|
1152
|
+
alphanumeric["pl-Pl"] = alphanumeric["pl-PL"];
|
|
1153
|
+
function isAlphanumeric(_str) {
|
|
1154
|
+
var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
|
|
1155
|
+
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1156
|
+
assertString(_str);
|
|
1157
|
+
var str = _str;
|
|
1158
|
+
var ignore = options.ignore;
|
|
1159
|
+
if (ignore) {
|
|
1160
|
+
if (ignore instanceof RegExp) {
|
|
1161
|
+
str = str.replace(ignore, "");
|
|
1162
|
+
} else if (typeof ignore === "string") {
|
|
1163
|
+
str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
|
|
1164
|
+
} else {
|
|
1165
|
+
throw new Error("ignore should be instance of a String or RegExp");
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
if (locale in alphanumeric) {
|
|
1169
|
+
return alphanumeric[locale].test(str);
|
|
1170
|
+
}
|
|
1171
|
+
throw new Error("Invalid locale '".concat(locale, "'"));
|
|
1172
|
+
}
|
|
1173
|
+
const __default__$4 = {
|
|
1174
|
+
name: "RegisterForm"
|
|
1175
|
+
};
|
|
1176
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1177
|
+
...__default__$4,
|
|
1178
|
+
props: {
|
|
1179
|
+
useUsername: { type: Boolean },
|
|
1180
|
+
extraFields: { default: void 0 },
|
|
1181
|
+
minimumPasswordLength: { default: 8 },
|
|
1182
|
+
form: { default: void 0 },
|
|
1183
|
+
input: { default: void 0 }
|
|
1184
|
+
},
|
|
1185
|
+
emits: ["submit"],
|
|
1186
|
+
setup(__props, { expose, emit }) {
|
|
1187
|
+
const props = __props;
|
|
1188
|
+
const $q = useQuasar();
|
|
1189
|
+
const lang2 = useLang();
|
|
1190
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
1191
|
+
loadLang($q.lang.isoName);
|
|
1192
|
+
watch($q.lang, (val) => {
|
|
1193
|
+
loadLang($q.lang.isoName);
|
|
1194
|
+
});
|
|
1195
|
+
const email = ref("");
|
|
1196
|
+
const password = ref("");
|
|
1197
|
+
const repeatPassword = ref("");
|
|
1198
|
+
const extraFieldValues = ref({});
|
|
1199
|
+
const username = ref("");
|
|
1200
|
+
const showPassword = ref(false);
|
|
1201
|
+
const header = computed(() => lang2.value.register.register);
|
|
1202
|
+
const forgotPassword = computed(() => lang2.value.register.forgotPassword);
|
|
1203
|
+
const accountCreated = computed(() => lang2.value.register.accountCreated);
|
|
1204
|
+
const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
|
|
1205
|
+
const alreadyRegistered = computed(() => lang2.value.register.alreadyRegistered);
|
|
1206
|
+
const minimumPasswordLength = toRef(props, "minimumPasswordLength");
|
|
1207
|
+
const formRef = ref();
|
|
1208
|
+
const validations = computed(() => ({
|
|
1209
|
+
email: [
|
|
1210
|
+
(val) => !!val || lang2.value.register.validations.fieldRequired,
|
|
1211
|
+
(val) => isEmail(val) || lang2.value.register.validations.invalidEmail
|
|
1212
|
+
],
|
|
1213
|
+
username: [
|
|
1214
|
+
(val) => !!val || lang2.value.register.validations.fieldRequired,
|
|
1215
|
+
(val) => isAlphanumeric(val) || lang2.value.register.validations.notAlphaNumeric
|
|
1216
|
+
],
|
|
1217
|
+
password: [
|
|
1218
|
+
(val) => !!val || lang2.value.password.validations.fieldRequired,
|
|
1219
|
+
(val) => val.length >= minimumPasswordLength.value || lang2.value.password.validations.minimumPasswordLength(
|
|
1220
|
+
minimumPasswordLength.value
|
|
1221
|
+
)
|
|
1222
|
+
],
|
|
1223
|
+
repeatPassword: [
|
|
1224
|
+
(val) => !!val || lang2.value.password.validations.fieldRequired,
|
|
1225
|
+
(val) => equals(val, password.value) || lang2.value.password.validations.passwordsDoNotMatch
|
|
1226
|
+
]
|
|
1227
|
+
}));
|
|
1228
|
+
const submit = (evt) => {
|
|
1229
|
+
var _a;
|
|
1230
|
+
(_a = formRef.value) == null ? void 0 : _a.validate().then((success) => {
|
|
1231
|
+
if (success) {
|
|
1232
|
+
emit("submit", {
|
|
1233
|
+
email: email.value.trim(),
|
|
1234
|
+
password: password.value,
|
|
1235
|
+
username: username.value.trim(),
|
|
1236
|
+
extraFields: extraFieldValues.value,
|
|
1237
|
+
done: evt.done
|
|
1238
|
+
});
|
|
1239
|
+
} else
|
|
1240
|
+
evt.done();
|
|
1241
|
+
});
|
|
1242
|
+
};
|
|
1243
|
+
const variables = ref({
|
|
1244
|
+
header,
|
|
1245
|
+
forgotPassword,
|
|
1246
|
+
accountCreated,
|
|
1247
|
+
unprocessableRequest,
|
|
1248
|
+
alreadyRegistered
|
|
1249
|
+
});
|
|
1250
|
+
const functions = ref({
|
|
1251
|
+
submit
|
|
1252
|
+
});
|
|
1253
|
+
expose({
|
|
1254
|
+
variables,
|
|
1255
|
+
functions
|
|
1256
|
+
});
|
|
1257
|
+
return (_ctx, _cache) => {
|
|
1258
|
+
const _component_q_input = QInput;
|
|
1259
|
+
const _component_q_icon = QIcon;
|
|
1260
|
+
return openBlock(), createBlock(unref(QForm), mergeProps({
|
|
1261
|
+
ref_key: "formRef",
|
|
1262
|
+
ref: formRef,
|
|
1263
|
+
class: "q-gutter-md"
|
|
1264
|
+
}, __props.form), {
|
|
1265
|
+
default: withCtx(() => [
|
|
1266
|
+
!__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
|
|
1267
|
+
id: "email",
|
|
1268
|
+
modelValue: email.value,
|
|
1269
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
|
|
1270
|
+
name: "email",
|
|
1271
|
+
label: unref(lang2).register.fields.email,
|
|
1272
|
+
"bottom-slots": "",
|
|
1273
|
+
rules: unref(validations)["email"],
|
|
1274
|
+
"lazy-rules": ""
|
|
1275
|
+
}), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
|
|
1276
|
+
__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
|
|
1277
|
+
id: "username",
|
|
1278
|
+
modelValue: username.value,
|
|
1279
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
|
|
1280
|
+
name: "username",
|
|
1281
|
+
label: unref(lang2).register.fields.username,
|
|
1282
|
+
"bottom-slots": "",
|
|
1283
|
+
rules: unref(validations)["username"],
|
|
1284
|
+
"lazy-rules": ""
|
|
1285
|
+
}), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
|
|
1286
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.extraFields, (field) => {
|
|
1287
|
+
return openBlock(), createBlock(_component_q_input, {
|
|
1288
|
+
key: field.name,
|
|
1289
|
+
modelValue: extraFieldValues.value[field.name],
|
|
1290
|
+
"onUpdate:modelValue": ($event) => extraFieldValues.value[field.name] = $event,
|
|
1291
|
+
type: "text",
|
|
1292
|
+
name: field.name,
|
|
1293
|
+
label: field.label,
|
|
1294
|
+
rules: field.rules,
|
|
1295
|
+
"bottom-slots": ""
|
|
1296
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "label", "rules"]);
|
|
1297
|
+
}), 128)),
|
|
1298
|
+
createVNode(_component_q_input, mergeProps(__props.input, {
|
|
1299
|
+
id: "password",
|
|
1300
|
+
modelValue: password.value,
|
|
1301
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
|
|
1302
|
+
name: "password",
|
|
1303
|
+
type: showPassword.value ? "text" : "password",
|
|
1304
|
+
label: unref(lang2).register.fields.password,
|
|
1305
|
+
rules: unref(validations)["password"],
|
|
1306
|
+
"lazy-rules": "",
|
|
1307
|
+
"bottom-slots": ""
|
|
1308
|
+
}), {
|
|
1309
|
+
append: withCtx(() => [
|
|
1310
|
+
createVNode(_component_q_icon, {
|
|
1311
|
+
name: showPassword.value ? "visibility" : "visibility_off",
|
|
1312
|
+
class: "cursor-pointer",
|
|
1313
|
+
onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
|
|
1314
|
+
}, null, 8, ["name"])
|
|
1315
|
+
]),
|
|
1316
|
+
_: 1
|
|
1317
|
+
}, 16, ["modelValue", "type", "label", "rules"]),
|
|
1318
|
+
createVNode(_component_q_input, {
|
|
1319
|
+
id: "repeatPassword",
|
|
1320
|
+
modelValue: repeatPassword.value,
|
|
1321
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => repeatPassword.value = $event),
|
|
1322
|
+
type: showPassword.value ? "text" : "password",
|
|
1323
|
+
label: unref(lang2).register.fields.repeatPassword,
|
|
1324
|
+
"bottom-slots": "",
|
|
1325
|
+
required: "",
|
|
1326
|
+
rules: unref(validations)["repeatPassword"],
|
|
1327
|
+
"lazy-rules": ""
|
|
1328
|
+
}, {
|
|
1329
|
+
append: withCtx(() => [
|
|
1330
|
+
createVNode(_component_q_icon, {
|
|
1331
|
+
name: showPassword.value ? "visibility" : "visibility_off",
|
|
1332
|
+
class: "cursor-pointer",
|
|
1333
|
+
onClick: _cache[4] || (_cache[4] = ($event) => showPassword.value = !showPassword.value)
|
|
1334
|
+
}, null, 8, ["name"])
|
|
1335
|
+
]),
|
|
1336
|
+
_: 1
|
|
1337
|
+
}, 8, ["modelValue", "type", "label", "rules"]),
|
|
1338
|
+
renderSlot(_ctx.$slots, "default", { submit })
|
|
1339
|
+
]),
|
|
1340
|
+
_: 3
|
|
1341
|
+
}, 16);
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
const __default__$3 = {
|
|
1346
|
+
name: "VerificationSlider"
|
|
1347
|
+
};
|
|
1348
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1349
|
+
...__default__$3,
|
|
1350
|
+
props: {
|
|
1351
|
+
useVerificationSlider: { type: Boolean }
|
|
1352
|
+
},
|
|
1353
|
+
emits: ["verified"],
|
|
1354
|
+
setup(__props, { expose, emit }) {
|
|
1355
|
+
const $q = useQuasar();
|
|
1356
|
+
const lang2 = useLang();
|
|
1357
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
1358
|
+
loadLang($q.lang.isoName);
|
|
1359
|
+
watch($q.lang, (val) => {
|
|
1360
|
+
loadLang($q.lang.isoName);
|
|
1361
|
+
});
|
|
1362
|
+
const sliderValue = ref(0);
|
|
1363
|
+
const sliderColor = ref("red");
|
|
1364
|
+
const completed = ref(false);
|
|
1365
|
+
watch(sliderValue, (newVal, oldVal) => {
|
|
1366
|
+
if (newVal > 80) {
|
|
1367
|
+
sliderColor.value = "green";
|
|
1368
|
+
setTimeout(() => {
|
|
1369
|
+
sliderValue.value = 100;
|
|
1370
|
+
completed.value = true;
|
|
1371
|
+
}, 500);
|
|
1372
|
+
emit("verified");
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
const variables = ref({});
|
|
1376
|
+
const functions = ref({});
|
|
1377
|
+
expose({
|
|
1378
|
+
variables,
|
|
1379
|
+
functions
|
|
1380
|
+
});
|
|
1381
|
+
return (_ctx, _cache) => {
|
|
1382
|
+
const _component_q_slider = QSlider;
|
|
1383
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
1384
|
+
createTextVNode(toDisplayString(unref(lang2).verification.slider) + " ", 1),
|
|
1385
|
+
createVNode(_component_q_slider, {
|
|
1386
|
+
modelValue: sliderValue.value,
|
|
1387
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sliderValue.value = $event),
|
|
1388
|
+
color: sliderColor.value,
|
|
1389
|
+
readonly: completed.value
|
|
1390
|
+
}, null, 8, ["modelValue", "color", "readonly"])
|
|
1391
|
+
], 64);
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
const __default__$2 = {
|
|
1396
|
+
name: "ConsentList"
|
|
1397
|
+
};
|
|
1398
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1399
|
+
...__default__$2,
|
|
1400
|
+
props: {
|
|
1401
|
+
scopes: null,
|
|
1402
|
+
claims: null,
|
|
1403
|
+
resourceScopes: null
|
|
1404
|
+
},
|
|
1405
|
+
setup(__props, { expose }) {
|
|
1406
|
+
const $q = useQuasar();
|
|
1407
|
+
const lang2 = useLang();
|
|
1408
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
1409
|
+
loadLang($q.lang.isoName);
|
|
1410
|
+
watch($q.lang, (val) => {
|
|
1411
|
+
loadLang($q.lang.isoName);
|
|
1412
|
+
});
|
|
1413
|
+
const message = computed(() => lang2.value.consent.message);
|
|
1414
|
+
const allow = computed(() => lang2.value.consent.allow);
|
|
1415
|
+
const deny = computed(() => lang2.value.consent.deny);
|
|
1416
|
+
const variables = ref({
|
|
1417
|
+
message,
|
|
1418
|
+
allow,
|
|
1419
|
+
deny
|
|
1420
|
+
});
|
|
1421
|
+
const functions = ref({});
|
|
1422
|
+
expose({
|
|
1423
|
+
variables,
|
|
1424
|
+
functions
|
|
1425
|
+
});
|
|
1426
|
+
return (_ctx, _cache) => {
|
|
1427
|
+
const _component_q_icon = QIcon;
|
|
1428
|
+
const _component_q_item_section = QItemSection;
|
|
1429
|
+
const _component_q_item = QItem;
|
|
1430
|
+
const _component_q_list = QList;
|
|
1431
|
+
return openBlock(), createBlock(_component_q_list, null, {
|
|
1432
|
+
default: withCtx(() => [
|
|
1433
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.scopes, (scope) => {
|
|
1434
|
+
return openBlock(), createBlock(_component_q_item, {
|
|
1435
|
+
key: scope.name
|
|
1436
|
+
}, {
|
|
1437
|
+
default: withCtx(() => [
|
|
1438
|
+
createVNode(_component_q_item_section, { avatar: "" }, {
|
|
1439
|
+
default: withCtx(() => [
|
|
1440
|
+
createVNode(_component_q_icon, {
|
|
1441
|
+
color: "green",
|
|
1442
|
+
name: "check"
|
|
1443
|
+
})
|
|
1444
|
+
]),
|
|
1445
|
+
_: 1
|
|
1446
|
+
}),
|
|
1447
|
+
createVNode(_component_q_item_section, null, {
|
|
1448
|
+
default: withCtx(() => [
|
|
1449
|
+
createTextVNode(toDisplayString(scope.name), 1)
|
|
1450
|
+
]),
|
|
1451
|
+
_: 2
|
|
1452
|
+
}, 1024)
|
|
1453
|
+
]),
|
|
1454
|
+
_: 2
|
|
1455
|
+
}, 1024);
|
|
1456
|
+
}), 128)),
|
|
1457
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.claims, (claim) => {
|
|
1458
|
+
return openBlock(), createBlock(_component_q_item, {
|
|
1459
|
+
key: claim.name
|
|
1460
|
+
}, {
|
|
1461
|
+
default: withCtx(() => [
|
|
1462
|
+
createVNode(_component_q_item_section, { avatar: "" }, {
|
|
1463
|
+
default: withCtx(() => [
|
|
1464
|
+
createVNode(_component_q_icon, {
|
|
1465
|
+
color: "green",
|
|
1466
|
+
name: "check"
|
|
1467
|
+
})
|
|
1468
|
+
]),
|
|
1469
|
+
_: 1
|
|
1470
|
+
}),
|
|
1471
|
+
createVNode(_component_q_item_section, null, {
|
|
1472
|
+
default: withCtx(() => [
|
|
1473
|
+
createTextVNode(toDisplayString(claim.name), 1)
|
|
1474
|
+
]),
|
|
1475
|
+
_: 2
|
|
1476
|
+
}, 1024)
|
|
1477
|
+
]),
|
|
1478
|
+
_: 2
|
|
1479
|
+
}, 1024);
|
|
1480
|
+
}), 128)),
|
|
1481
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.resourceScopes, (resourceScope) => {
|
|
1482
|
+
return openBlock(), createBlock(_component_q_item, {
|
|
1483
|
+
key: resourceScope.name
|
|
1484
|
+
}, {
|
|
1485
|
+
default: withCtx(() => [
|
|
1486
|
+
createVNode(_component_q_item_section, { avatar: "" }, {
|
|
1487
|
+
default: withCtx(() => [
|
|
1488
|
+
createVNode(_component_q_icon, {
|
|
1489
|
+
color: "green",
|
|
1490
|
+
name: "check"
|
|
1491
|
+
})
|
|
1492
|
+
]),
|
|
1493
|
+
_: 1
|
|
1494
|
+
}),
|
|
1495
|
+
createVNode(_component_q_item_section, null, {
|
|
1496
|
+
default: withCtx(() => [
|
|
1497
|
+
createTextVNode(toDisplayString(resourceScope.name), 1)
|
|
1498
|
+
]),
|
|
1499
|
+
_: 2
|
|
1500
|
+
}, 1024)
|
|
1501
|
+
]),
|
|
1502
|
+
_: 2
|
|
1503
|
+
}, 1024);
|
|
1504
|
+
}), 128))
|
|
1505
|
+
]),
|
|
1506
|
+
_: 1
|
|
1507
|
+
});
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
});
|
|
1511
|
+
const __default__$1 = {
|
|
1512
|
+
name: "UserMenuButton"
|
|
1513
|
+
};
|
|
1514
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1515
|
+
...__default__$1,
|
|
1516
|
+
props: {
|
|
1517
|
+
userRoute: null
|
|
1518
|
+
},
|
|
1519
|
+
emits: ["signOut"],
|
|
1520
|
+
setup(__props, { expose, emit }) {
|
|
1521
|
+
const $q = useQuasar();
|
|
1522
|
+
const lang2 = useLang();
|
|
1523
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
1524
|
+
loadLang($q.lang.isoName);
|
|
1525
|
+
watch($q.lang, (val) => {
|
|
1526
|
+
loadLang($q.lang.isoName);
|
|
1527
|
+
});
|
|
1528
|
+
const variables = ref({});
|
|
1529
|
+
const functions = ref({});
|
|
1530
|
+
expose({
|
|
1531
|
+
variables,
|
|
1532
|
+
functions
|
|
1533
|
+
});
|
|
1534
|
+
return (_ctx, _cache) => {
|
|
1535
|
+
const _component_q_item_section = QItemSection;
|
|
1536
|
+
const _component_q_item = QItem;
|
|
1537
|
+
const _component_q_list = QList;
|
|
1538
|
+
const _component_q_menu = QMenu;
|
|
1539
|
+
const _component_q_btn = QBtn;
|
|
1540
|
+
return openBlock(), createBlock(_component_q_btn, { icon: "person" }, {
|
|
1541
|
+
default: withCtx(() => [
|
|
1542
|
+
createVNode(_component_q_menu, null, {
|
|
1543
|
+
default: withCtx(() => [
|
|
1544
|
+
createVNode(_component_q_list, null, {
|
|
1545
|
+
default: withCtx(() => [
|
|
1546
|
+
createVNode(_component_q_item, { to: __props.userRoute }, {
|
|
1547
|
+
default: withCtx(() => [
|
|
1548
|
+
createVNode(_component_q_item_section, null, {
|
|
1549
|
+
default: withCtx(() => [
|
|
1550
|
+
createTextVNode(toDisplayString(unref(lang2).myAccount), 1)
|
|
1551
|
+
]),
|
|
1552
|
+
_: 1
|
|
1553
|
+
})
|
|
1554
|
+
]),
|
|
1555
|
+
_: 1
|
|
1556
|
+
}, 8, ["to"]),
|
|
1557
|
+
renderSlot(_ctx.$slots, "default"),
|
|
1558
|
+
createVNode(_component_q_item, {
|
|
1559
|
+
clickable: "",
|
|
1560
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("signOut"))
|
|
1561
|
+
}, {
|
|
1562
|
+
default: withCtx(() => [
|
|
1563
|
+
createVNode(_component_q_item_section, null, {
|
|
1564
|
+
default: withCtx(() => [
|
|
1565
|
+
createTextVNode(toDisplayString(unref(lang2).signOut), 1)
|
|
1566
|
+
]),
|
|
1567
|
+
_: 1
|
|
1568
|
+
})
|
|
1569
|
+
]),
|
|
1570
|
+
_: 1
|
|
1571
|
+
})
|
|
1572
|
+
]),
|
|
1573
|
+
_: 3
|
|
1574
|
+
})
|
|
1575
|
+
]),
|
|
1576
|
+
_: 3
|
|
1577
|
+
})
|
|
1578
|
+
]),
|
|
1579
|
+
_: 3
|
|
1580
|
+
});
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
});
|
|
1584
|
+
const _hoisted_1 = { key: 0 };
|
|
1585
|
+
const _hoisted_2 = { key: 1 };
|
|
1586
|
+
const __default__ = {
|
|
1587
|
+
name: "LoginButton"
|
|
1588
|
+
};
|
|
1589
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1590
|
+
...__default__,
|
|
1591
|
+
props: {
|
|
1592
|
+
withNetwork: null
|
|
1593
|
+
},
|
|
1594
|
+
setup(__props, { expose }) {
|
|
1595
|
+
const $q = useQuasar();
|
|
1596
|
+
const lang2 = useLang();
|
|
1597
|
+
if (lang2.value.isoName !== $q.lang.isoName)
|
|
1598
|
+
loadLang($q.lang.isoName);
|
|
1599
|
+
watch($q.lang, (val) => {
|
|
1600
|
+
loadLang($q.lang.isoName);
|
|
1601
|
+
});
|
|
1602
|
+
const variables = ref({});
|
|
1603
|
+
const functions = ref({});
|
|
1604
|
+
expose({
|
|
1605
|
+
variables,
|
|
1606
|
+
functions
|
|
1607
|
+
});
|
|
1608
|
+
return (_ctx, _cache) => {
|
|
1609
|
+
const _component_q_btn = QBtn;
|
|
1610
|
+
return openBlock(), createBlock(_component_q_btn, null, {
|
|
1611
|
+
default: withCtx(() => [
|
|
1612
|
+
renderSlot(_ctx.$slots, "icon"),
|
|
1613
|
+
__props.withNetwork ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(unref(lang2).login.loginWith) + " " + toDisplayString(__props.withNetwork), 1)) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(lang2).login.login), 1))
|
|
1614
|
+
]),
|
|
1615
|
+
_: 3
|
|
1616
|
+
});
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
export {
|
|
1621
|
+
_sfc_main$2 as ConsentList,
|
|
1622
|
+
_sfc_main$9 as EmailChangeForm,
|
|
1623
|
+
_sfc_main$8 as EmailChangeStepper,
|
|
1624
|
+
_sfc_main as LoginButton,
|
|
1625
|
+
_sfc_main$5 as LoginForm,
|
|
1626
|
+
_sfc_main$a as OtpInput,
|
|
1627
|
+
_sfc_main$7 as PasswordChangeForm,
|
|
1628
|
+
_sfc_main$6 as PasswordChangeStepper,
|
|
1629
|
+
_sfc_main$4 as RegisterForm,
|
|
1630
|
+
_sfc_main$b as RequestOtpForm,
|
|
1631
|
+
_sfc_main$1 as UserMenuButton,
|
|
1632
|
+
_sfc_main$3 as VerificationSlider
|
|
1633
|
+
};
|