@simsustech/quasar-components 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/LocaleSelect-BqkjbcKS.js +460 -0
  3. package/dist/QSubmitButton-Chc7dndx.js +101 -0
  4. package/dist/authentication.js +1935 -2031
  5. package/dist/form.js +1092 -1226
  6. package/dist/general.js +319 -361
  7. package/dist/md3.js +406 -395
  8. package/dist/nl-DIfqXZG_.js +354 -0
  9. package/dist/nl-DWmQiCdO.js +12 -0
  10. package/dist/nl-DbV07Lx7.js +106 -0
  11. package/dist/nl-ZpgX9FUw.js +4 -0
  12. package/dist/quasar-components.css +5 -4
  13. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  14. package/dist/types/{ui → src/ui}/authentication/LoginForm.vue.d.ts +5 -0
  15. package/dist/virtualModules.js +62 -2
  16. package/dist/vite-plugin.js +50 -101
  17. package/package.json +33 -33
  18. package/src/ui/authentication/LoginForm.vue +9 -4
  19. package/tsconfig.json +1 -0
  20. package/tsconfig.node.json +2 -1
  21. package/tsconfig.types.json +2 -1
  22. package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-e2EDOyzk.js +0 -353
  23. package/dist/QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.js +0 -109
  24. package/dist/nl-BRjDNoaR.js +0 -209
  25. package/dist/nl-CneFq5NZ.js +0 -112
  26. package/dist/nl-NLgZUAKl.js +0 -6
  27. package/dist/nl-X50pmfG-.js +0 -12
  28. package/eslint.config.js +0 -29
  29. package/dist/types/{ui → src/ui}/authentication/AccountsTable.vue.d.ts +0 -0
  30. package/dist/types/{ui → src/ui}/authentication/ConsentList.vue.d.ts +0 -0
  31. package/dist/types/{ui → src/ui}/authentication/EmailChangeForm.vue.d.ts +0 -0
  32. package/dist/types/{ui → src/ui}/authentication/EmailChangeStepper.vue.d.ts +0 -0
  33. package/dist/types/{ui → src/ui}/authentication/LoginButton.vue.d.ts +0 -0
  34. package/dist/types/{ui → src/ui}/authentication/LogoutButton.vue.d.ts +0 -0
  35. package/dist/types/{ui → src/ui}/authentication/LogoutForm.vue.d.ts +0 -0
  36. package/dist/types/{ui → src/ui}/authentication/OtpInput.vue.d.ts +0 -0
  37. package/dist/types/{ui → src/ui}/authentication/PasswordChangeForm.vue.d.ts +0 -0
  38. package/dist/types/{ui → src/ui}/authentication/PasswordChangeStepper.vue.d.ts +0 -0
  39. package/dist/types/{ui → src/ui}/authentication/RegisterForm.vue.d.ts +0 -0
  40. package/dist/types/{ui → src/ui}/authentication/RequestOtpForm.vue.d.ts +0 -0
  41. package/dist/types/{ui → src/ui}/authentication/UserMenuButton.vue.d.ts +0 -0
  42. package/dist/types/{ui → src/ui}/authentication/VerificationSlider.vue.d.ts +0 -0
  43. package/dist/types/{ui → src/ui}/authentication/index.d.ts +0 -0
  44. package/dist/types/{ui → src/ui}/authentication/lang/en-US.d.ts +0 -0
  45. package/dist/types/{ui → src/ui}/authentication/lang/index.d.ts +0 -0
  46. package/dist/types/{ui → src/ui}/authentication/lang/nl.d.ts +0 -0
  47. package/dist/types/{ui → src/ui}/flags/index.d.ts +0 -0
  48. package/dist/types/{ui → src/ui}/flags/lang/en-US.d.ts +0 -0
  49. package/dist/types/{ui → src/ui}/flags/lang/index.d.ts +0 -0
  50. package/dist/types/{ui → src/ui}/flags/lang/nl.d.ts +0 -0
  51. package/dist/types/{ui → src/ui}/form/BooleanItem.vue.d.ts +0 -0
  52. package/dist/types/{ui → src/ui}/form/BooleanSelect.vue.d.ts +0 -0
  53. package/dist/types/{ui → src/ui}/form/CountrySelect.vue.d.ts +0 -0
  54. package/dist/types/{ui → src/ui}/form/CronScheduleInput.vue.d.ts +0 -0
  55. package/dist/types/{ui → src/ui}/form/CurrencySelect.vue.d.ts +0 -0
  56. package/dist/types/{ui → src/ui}/form/DateInput.vue.d.ts +1 -1
  57. package/dist/types/{ui → src/ui}/form/DatePicker.vue.d.ts +0 -0
  58. package/dist/types/{ui → src/ui}/form/EmailInput.vue.d.ts +0 -0
  59. package/dist/types/{ui → src/ui}/form/FilteredModelSelect.vue.d.ts +0 -0
  60. package/dist/types/{ui → src/ui}/form/FormInput.vue.d.ts +0 -0
  61. package/dist/types/{ui → src/ui}/form/FormItem.vue.d.ts +0 -0
  62. package/dist/types/{ui → src/ui}/form/GenderItem.vue.d.ts +0 -0
  63. package/dist/types/{ui → src/ui}/form/GenderSelect.vue.d.ts +0 -0
  64. package/dist/types/{ui → src/ui}/form/LocaleSelect.vue.d.ts +0 -0
  65. package/dist/types/{ui → src/ui}/form/PostalCodeInput.vue.d.ts +0 -0
  66. package/dist/types/{ui → src/ui}/form/TelephoneNumberInput.vue.d.ts +0 -0
  67. package/dist/types/{ui → src/ui}/form/index.d.ts +0 -0
  68. package/dist/types/{ui → src/ui}/form/lang/en-US.d.ts +0 -0
  69. package/dist/types/{ui → src/ui}/form/lang/index.d.ts +0 -0
  70. package/dist/types/{ui → src/ui}/form/lang/nl.d.ts +0 -0
  71. package/dist/types/{ui → src/ui}/general/QDrawerList.vue.d.ts +0 -0
  72. package/dist/types/{ui → src/ui}/general/QLanguageSelect.vue.d.ts +0 -0
  73. package/dist/types/{ui → src/ui}/general/QStyledCard.vue.d.ts +0 -0
  74. package/dist/types/{ui → src/ui}/general/QStyledLayout.vue.d.ts +0 -0
  75. package/dist/types/{ui → src/ui}/general/QSubmitButton.vue.d.ts +1 -1
  76. package/dist/types/{ui → src/ui}/general/ResourcePage.vue.d.ts +1 -1
  77. /package/dist/types/{ui → src/ui}/general/ResponsiveDialog.vue.d.ts +0 -0
  78. /package/dist/types/{ui → src/ui}/general/index.d.ts +0 -0
  79. /package/dist/types/{ui → src/ui}/general/lang/en-US.d.ts +0 -0
  80. /package/dist/types/{ui → src/ui}/general/lang/index.d.ts +0 -0
  81. /package/dist/types/{ui → src/ui}/general/lang/nl.d.ts +0 -0
  82. /package/dist/types/{ui → src/ui}/icons/index.d.ts +0 -0
  83. /package/dist/types/{ui → src/ui}/icons/labels.d.ts +0 -0
  84. /package/dist/types/{ui → src/ui}/md3/Md3Layout.vue.d.ts +0 -0
  85. /package/dist/types/{ui → src/ui}/md3/NavigationRailFabs.vue.d.ts +0 -0
  86. /package/dist/types/{ui → src/ui}/md3/index.d.ts +0 -0
  87. /package/dist/types/{ui → src/ui}/md3/lang/en-US.d.ts +0 -0
  88. /package/dist/types/{ui → src/ui}/md3/lang/index.d.ts +0 -0
  89. /package/dist/types/{ui → src/ui}/md3/lang/nl.d.ts +0 -0
  90. /package/dist/types/{virtualModules.d.ts → src/virtualModules.d.ts} +0 -0
  91. /package/dist/types/{vite-plugin.d.ts → src/vite-plugin.d.ts} +0 -0
@@ -1,286 +1,291 @@
1
- import { useQuasar, QForm, QInput, QStepper, QStep, QStepperNavigation, QIcon, QBtn, QSlider, QList, QItem, QItemSection, QMenu, QTable, QTr, QTd, QItemLabel, QSelect, QTh } from "quasar";
2
- import { ref, defineComponent, watch, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toRef, createCommentVNode, toRefs, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode } from "vue";
3
- import { _ as _sfc_main$f } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.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: "Your (current) email address"
31
- },
32
- validations: {
33
- fieldRequired: "Field is required.",
34
- invalidEmail: "A valid email address is required."
35
- },
36
- messages: {
37
- unknownEmail: "Email address is not registered."
38
- },
39
- request: "Request a one-time password",
40
- checkEmail: "You will receive a verification code in your email. Please use this verification code in the next step.",
41
- verificationCode: "Verification code"
42
- },
43
- login: {
44
- fields: {
45
- email: "Email",
46
- password: "Password",
47
- username: "Username"
48
- },
49
- validations: {
50
- fieldRequired: "Field is required.",
51
- invalidEmail: "A valid email address is required."
52
- },
53
- login: "Login",
54
- loginWith: "Login with",
55
- createAccount: "Create account",
56
- forgotPassword: "Forgot your password?",
57
- invalidCredentials: "Email address or password is incorrect."
58
- },
59
- password: {
60
- fields: {
61
- password: "Password",
62
- repeatPassword: "Repeat password"
63
- },
64
- validations: {
65
- fieldRequired: "Field is required",
66
- minimumPasswordLength: (minimumPasswordLength) => `The minimum length of the password is ${minimumPasswordLength} characters.`,
67
- passwordsDoNotMatch: "The password do not match."
68
- },
69
- changePassword: "Change your password.",
70
- passwordChanged: "Your password has been changed."
71
- },
72
- register: {
73
- fields: {
74
- email: "Email",
75
- password: "Password",
76
- username: "Username",
77
- repeatPassword: "Repeat password"
78
- },
79
- validations: {
80
- fieldRequired: "Field is required",
81
- invalidEmail: "A valid email address is required.",
82
- notAlphaNumeric: "Veld mag geen speciale tekens bevatten."
83
- },
84
- register: "Register",
85
- forgotPassword: "Forgot your password?",
86
- accountCreated: "Your account has been sucessfully created. You can now login with your credentials.",
87
- alreadyRegistered: "Email address is already registered."
88
- },
89
- verification: {
90
- slider: "Please drag the slider below all the way to the right."
91
- },
92
- account: {
93
- title: "Accounts",
94
- fields: {
95
- name: "Name",
96
- email: "Email",
97
- roles: "Roles"
98
- },
99
- labels: {
100
- addRole: "Add role",
101
- removeRole: "Remove role"
102
- },
103
- messages: {
104
- addRole: ({ email }) => `Select the role which you want to add to ${email}.`,
105
- removeRole: ({ email }) => `Select the role which you want to remove from ${email}.`
106
- }
107
- },
108
- logout: {
109
- confirmation: "Are you sure you want to log out?",
110
- logout: "Log out"
111
- }
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { t as QSubmitButton_default } from "./QSubmitButton-Chc7dndx.js";
3
+ import { QBtn, QForm, QIcon, QInput, QItem, QItemLabel, QItemSection, QList, QMenu, QSelect, QSlider, QStep, QStepper, QStepperNavigation, QTable, QTd, QTh, QTr, useQuasar } from "quasar";
4
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, renderSlot, toDisplayString, toRef, toRefs, unref, watch, withCtx } from "vue";
5
+ //#region src/ui/authentication/lang/en-US.ts
6
+ var en_US_exports = /* @__PURE__ */ __exportAll({ default: () => lang$1 });
7
+ var lang$1 = {
8
+ isoName: "en-US",
9
+ myAccount: "Account",
10
+ signOut: "Sign out",
11
+ unprocessableRequest: "The server was unable to process the request.",
12
+ consent: {
13
+ message: (name) => `${name} is requesting access to your data.`,
14
+ deny: "Deny",
15
+ allow: "Allow"
16
+ },
17
+ email: {
18
+ fields: {
19
+ email: "Email address",
20
+ newEmail: "Your new email address",
21
+ repeatNewEmail: "Repeat your new email address"
22
+ },
23
+ validations: {
24
+ fieldRequired: "Field is required.",
25
+ invalidEmail: "A valid email address is required.",
26
+ emailsDoNotMatch: "The email addresses do not match."
27
+ },
28
+ changeEmail: "Change your email address.",
29
+ emailChanged: "Your email address has been changed."
30
+ },
31
+ otp: {
32
+ fields: { email: "Your (current) email address" },
33
+ validations: {
34
+ fieldRequired: "Field is required.",
35
+ invalidEmail: "A valid email address is required."
36
+ },
37
+ messages: { unknownEmail: "Email address is not registered." },
38
+ request: "Request a one-time password",
39
+ checkEmail: "You will receive a verification code in your email. Please use this verification code in the next step.",
40
+ verificationCode: "Verification code"
41
+ },
42
+ login: {
43
+ fields: {
44
+ email: "Email",
45
+ password: "Password",
46
+ username: "Username"
47
+ },
48
+ validations: {
49
+ fieldRequired: "Field is required.",
50
+ invalidEmail: "A valid email address is required."
51
+ },
52
+ login: "Login",
53
+ loginWith: "Login with",
54
+ createAccount: "Create account",
55
+ forgotPassword: "Forgot your password?",
56
+ invalidCredentials: "Email address or password is incorrect."
57
+ },
58
+ password: {
59
+ fields: {
60
+ password: "Password",
61
+ repeatPassword: "Repeat password"
62
+ },
63
+ validations: {
64
+ fieldRequired: "Field is required",
65
+ minimumPasswordLength: (minimumPasswordLength) => `The minimum length of the password is ${minimumPasswordLength} characters.`,
66
+ passwordsDoNotMatch: "The password do not match."
67
+ },
68
+ changePassword: "Change your password.",
69
+ passwordChanged: "Your password has been changed."
70
+ },
71
+ register: {
72
+ fields: {
73
+ email: "Email",
74
+ password: "Password",
75
+ username: "Username",
76
+ repeatPassword: "Repeat password"
77
+ },
78
+ validations: {
79
+ fieldRequired: "Field is required",
80
+ invalidEmail: "A valid email address is required.",
81
+ notAlphaNumeric: "Veld mag geen speciale tekens bevatten."
82
+ },
83
+ register: "Register",
84
+ forgotPassword: "Forgot your password?",
85
+ accountCreated: "Your account has been sucessfully created. You can now login with your credentials.",
86
+ alreadyRegistered: "Email address is already registered."
87
+ },
88
+ verification: { slider: "Please drag the slider below all the way to the right." },
89
+ account: {
90
+ title: "Accounts",
91
+ fields: {
92
+ name: "Name",
93
+ email: "Email",
94
+ roles: "Roles"
95
+ },
96
+ labels: {
97
+ addRole: "Add role",
98
+ removeRole: "Remove role"
99
+ },
100
+ messages: {
101
+ addRole: ({ email }) => `Select the role which you want to add to ${email}.`,
102
+ removeRole: ({ email }) => `Select the role which you want to remove from ${email}.`
103
+ }
104
+ },
105
+ logout: {
106
+ confirmation: "Are you sure you want to log out?",
107
+ logout: "Log out"
108
+ }
112
109
  };
113
- const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
114
- __proto__: null,
115
- default: lang$1
116
- }, Symbol.toStringTag, { value: "Module" }));
117
- const lang = ref(lang$1);
118
- const locales = /* @__PURE__ */ Object.assign({
119
- "./en-US.ts": () => Promise.resolve().then(() => enUS),
120
- "./nl.ts": () => import("./nl-CneFq5NZ.js")
110
+ //#endregion
111
+ //#region src/ui/authentication/lang/index.ts
112
+ var lang = ref(lang$1);
113
+ var locales = /* @__PURE__ */ Object.assign({
114
+ "./en-US.ts": () => Promise.resolve().then(() => en_US_exports),
115
+ "./nl.ts": () => import("./nl-DbV07Lx7.js")
121
116
  });
122
- const useLang = () => {
123
- return lang;
117
+ var useLang = () => {
118
+ return lang;
124
119
  };
125
- let loadingLanguage = false;
126
- const loadLang = async (isoName) => {
127
- if (!loadingLanguage) {
128
- loadingLanguage = true;
129
- try {
130
- const data = (await locales[`./${isoName}.ts`]()).default;
131
- if (data) {
132
- lang.value = data;
133
- }
134
- } catch (e) {
135
- throw new Error(
136
- `[quasar-components] Failed to load ${isoName} language file.`
137
- );
138
- }
139
- loadingLanguage = false;
140
- }
120
+ var loadingLanguage = false;
121
+ var loadLang = async (isoName) => {
122
+ if (!loadingLanguage) {
123
+ loadingLanguage = true;
124
+ try {
125
+ const data = (await locales[`./${isoName}.ts`]()).default;
126
+ if (data) lang.value = data;
127
+ } catch (e) {
128
+ throw new Error(`[quasar-components] Failed to load ${isoName} language file.`);
129
+ }
130
+ loadingLanguage = false;
131
+ }
141
132
  };
133
+ //#endregion
134
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/util/assertString.js
142
135
  function assertString(input) {
143
- if (input === void 0 || input === null) throw new TypeError("Expected a string but received a ".concat(input));
144
- if (input.constructor.name !== "String") throw new TypeError("Expected a string but received a ".concat(input.constructor.name));
136
+ if (input === void 0 || input === null) throw new TypeError("Expected a string but received a ".concat(input));
137
+ if (input.constructor.name !== "String") throw new TypeError("Expected a string but received a ".concat(input.constructor.name));
145
138
  }
139
+ //#endregion
140
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/util/checkHost.js
146
141
  function isRegExp(obj) {
147
- return Object.prototype.toString.call(obj) === "[object RegExp]";
142
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
148
143
  }
149
144
  function checkHost(host, matches) {
150
- for (var i = 0; i < matches.length; i++) {
151
- var match = matches[i];
152
- if (host === match || isRegExp(match) && match.test(host)) {
153
- return true;
154
- }
155
- }
156
- return false;
145
+ for (var i = 0; i < matches.length; i++) {
146
+ var match = matches[i];
147
+ if (host === match || isRegExp(match) && match.test(host)) return true;
148
+ }
149
+ return false;
157
150
  }
158
- function _typeof$1(o) {
159
- "@babel/helpers - typeof";
160
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
161
- return typeof o2;
162
- } : function(o2) {
163
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
164
- }, _typeof$1(o);
151
+ //#endregion
152
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isByteLength.js
153
+ function _typeof$2(o) {
154
+ "@babel/helpers - typeof";
155
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
156
+ return typeof o;
157
+ } : function(o) {
158
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
159
+ }, _typeof$2(o);
165
160
  }
166
161
  function isByteLength(str, options) {
167
- assertString(str);
168
- var min;
169
- var max;
170
- if (_typeof$1(options) === "object") {
171
- min = options.min || 0;
172
- max = options.max;
173
- } else {
174
- min = arguments[1];
175
- max = arguments[2];
176
- }
177
- var len = encodeURI(str).split(/%..|./).length - 1;
178
- return len >= min && (typeof max === "undefined" || len <= max);
162
+ assertString(str);
163
+ var min;
164
+ var max;
165
+ if (_typeof$2(options) === "object") {
166
+ min = options.min || 0;
167
+ max = options.max;
168
+ } else {
169
+ min = arguments[1];
170
+ max = arguments[2];
171
+ }
172
+ var len = encodeURI(str).split(/%..|./).length - 1;
173
+ return len >= min && (typeof max === "undefined" || len <= max);
174
+ }
175
+ //#endregion
176
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/util/merge.js
177
+ function _typeof$1(o) {
178
+ "@babel/helpers - typeof";
179
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
180
+ return typeof o;
181
+ } : function(o) {
182
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
183
+ }, _typeof$1(o);
179
184
  }
180
185
  function merge() {
181
- var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
182
- var defaults = arguments.length > 1 ? arguments[1] : void 0;
183
- for (var key in defaults) {
184
- if (typeof obj[key] === "undefined") {
185
- obj[key] = defaults[key];
186
- }
187
- }
188
- return obj;
186
+ var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
187
+ var defaults = arguments.length > 1 ? arguments[1] : void 0;
188
+ if (_typeof$1(obj) !== "object" || obj === null) obj = {};
189
+ for (var key in defaults) if (typeof obj[key] === "undefined") obj[key] = defaults[key];
190
+ return obj;
189
191
  }
192
+ //#endregion
193
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isFQDN.js
190
194
  var default_fqdn_options = {
191
- require_tld: true,
192
- allow_underscores: false,
193
- allow_trailing_dot: false,
194
- allow_numeric_tld: false,
195
- allow_wildcard: false,
196
- ignore_max_length: false
195
+ require_tld: true,
196
+ allow_underscores: false,
197
+ allow_trailing_dot: false,
198
+ allow_numeric_tld: false,
199
+ allow_wildcard: false,
200
+ ignore_max_length: false
197
201
  };
198
202
  function isFQDN(str, options) {
199
- assertString(str);
200
- options = merge(options, default_fqdn_options);
201
- if (options.allow_trailing_dot && str[str.length - 1] === ".") {
202
- str = str.substring(0, str.length - 1);
203
- }
204
- if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
205
- str = str.substring(2);
206
- }
207
- var parts = str.split(".");
208
- var tld = parts[parts.length - 1];
209
- if (options.require_tld) {
210
- if (parts.length < 2) {
211
- return false;
212
- }
213
- if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
214
- return false;
215
- }
216
- if (/\s/.test(tld)) {
217
- return false;
218
- }
219
- }
220
- if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
221
- return false;
222
- }
223
- return parts.every(function(part) {
224
- if (part.length > 63 && !options.ignore_max_length) {
225
- return false;
226
- }
227
- if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
228
- return false;
229
- }
230
- if (/[\uff01-\uff5e]/.test(part)) {
231
- return false;
232
- }
233
- if (/^-|-$/.test(part)) {
234
- return false;
235
- }
236
- if (!options.allow_underscores && /_/.test(part)) {
237
- return false;
238
- }
239
- return true;
240
- });
203
+ assertString(str);
204
+ options = merge(options, default_fqdn_options);
205
+ if (options.allow_trailing_dot && str[str.length - 1] === ".") str = str.substring(0, str.length - 1);
206
+ if (options.allow_wildcard === true && str.indexOf("*.") === 0) str = str.substring(2);
207
+ var parts = str.split(".");
208
+ var tld = parts[parts.length - 1];
209
+ if (options.require_tld) {
210
+ if (parts.length < 2) return false;
211
+ if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) return false;
212
+ if (/\s/.test(tld)) return false;
213
+ }
214
+ if (!options.allow_numeric_tld && /^\d+$/.test(tld)) return false;
215
+ return parts.every(function(part) {
216
+ if (part.length > 63 && !options.ignore_max_length) return false;
217
+ if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) return false;
218
+ if (/[\uff01-\uff5e]/.test(part)) return false;
219
+ if (/^-|-$/.test(part)) return false;
220
+ if (!options.allow_underscores && /_/.test(part)) return false;
221
+ return true;
222
+ });
241
223
  }
224
+ //#endregion
225
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isIP.js
242
226
  function _typeof(o) {
243
- "@babel/helpers - typeof";
244
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
245
- return typeof o2;
246
- } : function(o2) {
247
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
248
- }, _typeof(o);
227
+ "@babel/helpers - typeof";
228
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
229
+ return typeof o;
230
+ } : function(o) {
231
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
232
+ }, _typeof(o);
249
233
  }
234
+ /**
235
+ 11.3. Examples
236
+
237
+ The following addresses
238
+
239
+ fe80::1234 (on the 1st link of the node)
240
+ ff02::5678 (on the 5th link of the node)
241
+ ff08::9abc (on the 10th organization of the node)
242
+
243
+ would be represented as follows:
244
+
245
+ fe80::1234%1
246
+ ff02::5678%5
247
+ ff08::9abc%10
248
+
249
+ (Here we assume a natural translation from a zone index to the
250
+ <zone_id> part, where the Nth zone of any scope is translated into
251
+ "N".)
252
+
253
+ If we use interface names as <zone_id>, those addresses could also be
254
+ represented as follows:
255
+
256
+ fe80::1234%ne0
257
+ ff02::5678%pvc1.3
258
+ ff08::9abc%interface10
259
+
260
+ where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
261
+ to the 5th link, and "interface10" belongs to the 10th organization.
262
+ * * */
250
263
  var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
251
264
  var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
252
265
  var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
253
266
  var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
254
267
  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,})?$");
255
268
  function isIP(ipAddress) {
256
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
257
- assertString(ipAddress);
258
- var version = (_typeof(options) === "object" ? options.version : arguments[1]) || "";
259
- if (!version) {
260
- return isIP(ipAddress, {
261
- version: 4
262
- }) || isIP(ipAddress, {
263
- version: 6
264
- });
265
- }
266
- if (version.toString() === "4") {
267
- return IPv4AddressRegExp.test(ipAddress);
268
- }
269
- if (version.toString() === "6") {
270
- return IPv6AddressRegExp.test(ipAddress);
271
- }
272
- return false;
269
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
270
+ assertString(ipAddress);
271
+ var version = (_typeof(options) === "object" ? options.version : arguments[1]) || "";
272
+ if (!version) return isIP(ipAddress, { version: 4 }) || isIP(ipAddress, { version: 6 });
273
+ if (version.toString() === "4") return IPv4AddressRegExp.test(ipAddress);
274
+ if (version.toString() === "6") return IPv6AddressRegExp.test(ipAddress);
275
+ return false;
273
276
  }
277
+ //#endregion
278
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isEmail.js
274
279
  var default_email_options = {
275
- allow_display_name: false,
276
- allow_underscores: false,
277
- require_display_name: false,
278
- allow_utf8_local_part: true,
279
- require_tld: true,
280
- blacklisted_chars: "",
281
- ignore_max_length: false,
282
- host_blacklist: [],
283
- host_whitelist: []
280
+ allow_display_name: false,
281
+ allow_underscores: false,
282
+ require_display_name: false,
283
+ allow_utf8_local_part: true,
284
+ require_tld: true,
285
+ blacklisted_chars: "",
286
+ ignore_max_length: false,
287
+ host_blacklist: [],
288
+ host_whitelist: []
284
289
  };
285
290
  var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i;
286
291
  var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
@@ -289,1818 +294,1717 @@ var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e
289
294
  var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
290
295
  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;
291
296
  var defaultMaxEmailLength = 254;
297
+ /**
298
+ * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2
299
+ * @param {String} display_name
300
+ */
292
301
  function validateDisplayName(display_name) {
293
- var display_name_without_quotes = display_name.replace(/^"(.+)"$/, "$1");
294
- if (!display_name_without_quotes.trim()) {
295
- return false;
296
- }
297
- var contains_illegal = /[\.";<>]/.test(display_name_without_quotes);
298
- if (contains_illegal) {
299
- if (display_name_without_quotes === display_name) {
300
- return false;
301
- }
302
- var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length;
303
- if (!all_start_with_back_slash) {
304
- return false;
305
- }
306
- }
307
- return true;
302
+ var display_name_without_quotes = display_name.replace(/^"(.+)"$/, "$1");
303
+ if (!display_name_without_quotes.trim()) return false;
304
+ if (/[\.";<>]/.test(display_name_without_quotes)) {
305
+ if (display_name_without_quotes === display_name) return false;
306
+ if (!(display_name_without_quotes.split("\"").length === display_name_without_quotes.split("\\\"").length)) return false;
307
+ }
308
+ return true;
308
309
  }
309
310
  function isEmail(str, options) {
310
- assertString(str);
311
- options = merge(options, default_email_options);
312
- if (options.require_display_name || options.allow_display_name) {
313
- var display_email = str.match(splitNameAddress);
314
- if (display_email) {
315
- var display_name = display_email[1];
316
- str = str.replace(display_name, "").replace(/(^<|>$)/g, "");
317
- if (display_name.endsWith(" ")) {
318
- display_name = display_name.slice(0, -1);
319
- }
320
- if (!validateDisplayName(display_name)) {
321
- return false;
322
- }
323
- } else if (options.require_display_name) {
324
- return false;
325
- }
326
- }
327
- if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {
328
- return false;
329
- }
330
- var parts = str.split("@");
331
- var domain = parts.pop();
332
- var lower_domain = domain.toLowerCase();
333
- if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) {
334
- return false;
335
- }
336
- if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) {
337
- return false;
338
- }
339
- var user = parts.join("@");
340
- if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) {
341
- user = user.toLowerCase();
342
- var username = user.split("+")[0];
343
- if (!isByteLength(username.replace(/\./g, ""), {
344
- min: 6,
345
- max: 30
346
- })) {
347
- return false;
348
- }
349
- var _user_parts = username.split(".");
350
- for (var i = 0; i < _user_parts.length; i++) {
351
- if (!gmailUserPart.test(_user_parts[i])) {
352
- return false;
353
- }
354
- }
355
- }
356
- if (options.ignore_max_length === false && (!isByteLength(user, {
357
- max: 64
358
- }) || !isByteLength(domain, {
359
- max: 254
360
- }))) {
361
- return false;
362
- }
363
- if (!isFQDN(domain, {
364
- require_tld: options.require_tld,
365
- ignore_max_length: options.ignore_max_length,
366
- allow_underscores: options.allow_underscores
367
- })) {
368
- if (!options.allow_ip_domain) {
369
- return false;
370
- }
371
- if (!isIP(domain)) {
372
- if (!domain.startsWith("[") || !domain.endsWith("]")) {
373
- return false;
374
- }
375
- var noBracketdomain = domain.slice(1, -1);
376
- if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) {
377
- return false;
378
- }
379
- }
380
- }
381
- if (options.blacklisted_chars) {
382
- if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1) return false;
383
- }
384
- if (user[0] === '"' && user[user.length - 1] === '"') {
385
- user = user.slice(1, user.length - 1);
386
- return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
387
- }
388
- var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
389
- var user_parts = user.split(".");
390
- for (var _i = 0; _i < user_parts.length; _i++) {
391
- if (!pattern.test(user_parts[_i])) {
392
- return false;
393
- }
394
- }
395
- return true;
311
+ assertString(str);
312
+ options = merge(options, default_email_options);
313
+ if (options.require_display_name || options.allow_display_name) {
314
+ var display_email = str.match(splitNameAddress);
315
+ if (display_email) {
316
+ var display_name = display_email[1];
317
+ str = str.replace(display_name, "").replace(/(^<|>$)/g, "");
318
+ if (display_name.endsWith(" ")) display_name = display_name.slice(0, -1);
319
+ if (!validateDisplayName(display_name)) return false;
320
+ } else if (options.require_display_name) return false;
321
+ }
322
+ if (!options.ignore_max_length && str.length > defaultMaxEmailLength) return false;
323
+ var parts = str.split("@");
324
+ var domain = parts.pop();
325
+ var lower_domain = domain.toLowerCase();
326
+ if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) return false;
327
+ if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) return false;
328
+ var user = parts.join("@");
329
+ if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) {
330
+ user = user.toLowerCase();
331
+ var username = user.split("+")[0];
332
+ if (!isByteLength(username.replace(/\./g, ""), {
333
+ min: 6,
334
+ max: 30
335
+ })) return false;
336
+ var _user_parts = username.split(".");
337
+ for (var i = 0; i < _user_parts.length; i++) if (!gmailUserPart.test(_user_parts[i])) return false;
338
+ }
339
+ if (options.ignore_max_length === false && (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 254 }))) return false;
340
+ if (!isFQDN(domain, {
341
+ require_tld: options.require_tld,
342
+ ignore_max_length: options.ignore_max_length,
343
+ allow_underscores: options.allow_underscores
344
+ })) {
345
+ if (!options.allow_ip_domain) return false;
346
+ if (!isIP(domain)) {
347
+ if (!domain.startsWith("[") || !domain.endsWith("]")) return false;
348
+ var noBracketdomain = domain.slice(1, -1);
349
+ if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) return false;
350
+ }
351
+ }
352
+ if (options.blacklisted_chars) {
353
+ if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1) return false;
354
+ }
355
+ if (user[0] === "\"" && user[user.length - 1] === "\"") {
356
+ user = user.slice(1, user.length - 1);
357
+ return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
358
+ }
359
+ var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
360
+ var user_parts = user.split(".");
361
+ for (var _i = 0; _i < user_parts.length; _i++) if (!pattern.test(user_parts[_i])) return false;
362
+ return true;
396
363
  }
397
- const __default__$c = {
398
- name: "RequestOtpForm"
399
- };
400
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
401
- ...__default__$c,
402
- props: {
403
- form: {},
404
- input: {}
405
- },
406
- emits: ["submit"],
407
- setup(__props, { expose: __expose, emit: __emit }) {
408
- const emit = __emit;
409
- const $q = useQuasar();
410
- const lang2 = useLang();
411
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
412
- watch($q.lang, (val) => {
413
- loadLang($q.lang.isoName);
414
- });
415
- const email = ref("");
416
- const formRef = ref();
417
- const validations = computed(() => ({
418
- email: [
419
- (val) => !!val || lang2.value.otp.validations.fieldRequired,
420
- (val) => isEmail(val) || lang2.value.otp.validations.invalidEmail
421
- ]
422
- }));
423
- const submit = ({
424
- done
425
- }) => {
426
- formRef.value?.validate().then((success) => {
427
- if (success) {
428
- emit("submit", {
429
- email: email.value.trim(),
430
- done
431
- });
432
- } else done();
433
- });
434
- };
435
- const variables = ref({});
436
- const functions = ref({ submit });
437
- __expose({
438
- variables,
439
- functions
440
- });
441
- return (_ctx, _cache) => {
442
- const _component_q_input = QInput;
443
- return openBlock(), createBlock(unref(QForm), mergeProps({
444
- ref_key: "formRef",
445
- ref: formRef
446
- }, __props.form, {
447
- onSubmit: _cache[1] || (_cache[1] = (e) => submit)
448
- }), {
449
- default: withCtx(() => [
450
- createVNode(_component_q_input, mergeProps(__props.input, {
451
- id: "email",
452
- modelValue: email.value,
453
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
454
- modelModifiers: { trim: true },
455
- name: "email",
456
- type: "text",
457
- label: unref(lang2).otp.fields.email,
458
- rules: validations.value["email"],
459
- "lazy-rules": "",
460
- autofocus: ""
461
- }), null, 16, ["modelValue", "label", "rules"]),
462
- renderSlot(_ctx.$slots, "default", { submit })
463
- ]),
464
- _: 3
465
- }, 16);
466
- };
467
- }
364
+ //#endregion
365
+ //#region src/ui/authentication/RequestOtpForm.vue
366
+ var RequestOtpForm_default = /* @__PURE__ */ defineComponent({
367
+ name: "RequestOtpForm",
368
+ props: {
369
+ form: {},
370
+ input: {}
371
+ },
372
+ emits: ["submit"],
373
+ setup(__props, { expose: __expose, emit: __emit }) {
374
+ const emit = __emit;
375
+ const $q = useQuasar();
376
+ const lang = useLang();
377
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
378
+ watch($q.lang, (val) => {
379
+ loadLang($q.lang.isoName);
380
+ });
381
+ const email = ref("");
382
+ const formRef = ref();
383
+ const validations = computed(() => ({ email: [(val) => !!val || lang.value.otp.validations.fieldRequired, (val) => isEmail(val) || lang.value.otp.validations.invalidEmail] }));
384
+ const submit = ({ done }) => {
385
+ formRef.value?.validate().then((success) => {
386
+ if (success) emit("submit", {
387
+ email: email.value.trim(),
388
+ done
389
+ });
390
+ else done();
391
+ });
392
+ };
393
+ __expose({
394
+ variables: ref({}),
395
+ functions: ref({ submit })
396
+ });
397
+ return (_ctx, _cache) => {
398
+ const _component_q_input = QInput;
399
+ return openBlock(), createBlock(unref(QForm), mergeProps({
400
+ ref_key: "formRef",
401
+ ref: formRef
402
+ }, __props.form, { onSubmit: _cache[1] || (_cache[1] = (e) => submit) }), {
403
+ default: withCtx(() => [createVNode(_component_q_input, mergeProps(__props.input, {
404
+ id: "email",
405
+ modelValue: email.value,
406
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
407
+ modelModifiers: { trim: true },
408
+ name: "email",
409
+ type: "text",
410
+ label: unref(lang).otp.fields.email,
411
+ rules: validations.value["email"],
412
+ "lazy-rules": "",
413
+ autofocus: ""
414
+ }), null, 16, [
415
+ "modelValue",
416
+ "label",
417
+ "rules"
418
+ ]), renderSlot(_ctx.$slots, "default", { submit })]),
419
+ _: 3
420
+ }, 16);
421
+ };
422
+ }
468
423
  });
469
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
470
- __name: "OtpInput",
471
- props: {
472
- modelValue: {}
473
- },
474
- emits: ["update:modelValue"],
475
- setup(__props) {
476
- const lang2 = useLang();
477
- const validations = computed(() => ({
478
- otp: [(val) => !!val || lang2.value.otp.validations.fieldRequired]
479
- }));
480
- return (_ctx, _cache) => {
481
- return openBlock(), createBlock(unref(QInput), {
482
- id: "otp",
483
- name: "otp",
484
- "model-value": __props.modelValue,
485
- "bottom-slots": "",
486
- "lazy-rules": "",
487
- label: unref(lang2).otp.verificationCode,
488
- rules: validations.value["otp"],
489
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
490
- }, null, 8, ["model-value", "label", "rules"]);
491
- };
492
- }
424
+ //#endregion
425
+ //#region src/ui/authentication/OtpInput.vue
426
+ var OtpInput_default = /* @__PURE__ */ defineComponent({
427
+ __name: "OtpInput",
428
+ props: { modelValue: {} },
429
+ emits: ["update:modelValue"],
430
+ setup(__props) {
431
+ const lang = useLang();
432
+ const validations = computed(() => ({ otp: [(val) => !!val || lang.value.otp.validations.fieldRequired] }));
433
+ return (_ctx, _cache) => {
434
+ return openBlock(), createBlock(unref(QInput), {
435
+ id: "otp",
436
+ name: "otp",
437
+ "model-value": __props.modelValue,
438
+ "bottom-slots": "",
439
+ "lazy-rules": "",
440
+ label: unref(lang).otp.verificationCode,
441
+ rules: validations.value["otp"],
442
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
443
+ }, null, 8, [
444
+ "model-value",
445
+ "label",
446
+ "rules"
447
+ ]);
448
+ };
449
+ }
493
450
  });
494
- const __default__$b = {
495
- name: "EmailChangeForm"
496
- };
497
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
498
- ...__default__$b,
499
- props: {
500
- email: {},
501
- form: {},
502
- input: {}
503
- },
504
- emits: ["submit"],
505
- setup(__props, { expose: __expose, emit: __emit }) {
506
- const props = __props;
507
- const emit = __emit;
508
- const $q = useQuasar();
509
- const lang2 = useLang();
510
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
511
- watch($q.lang, (val) => {
512
- loadLang($q.lang.isoName);
513
- });
514
- const email = toRef(props, "email");
515
- const otp = ref("");
516
- const newEmail = ref("");
517
- const repeatNewEmail = ref("");
518
- const header = computed(() => lang2.value.email.changeEmail);
519
- const formRef = ref();
520
- const validations = computed(() => ({
521
- newEmail: [
522
- (val) => !!val || lang2.value.email.validations.fieldRequired,
523
- (val) => isEmail(val) || lang2.value.email.validations.invalidEmail
524
- ],
525
- repeatNewEmail: [
526
- (val) => !!val || lang2.value.email.validations.fieldRequired,
527
- (val) => isEmail(val) || lang2.value.email.validations.emailsDoNotMatch
528
- ]
529
- }));
530
- const submit = (evt) => {
531
- formRef.value?.validate().then((success) => {
532
- if (success) {
533
- emit("submit", {
534
- email: email.value.trim(),
535
- newEmail: newEmail.value.trim(),
536
- otp: otp.value,
537
- done: evt.done
538
- });
539
- } else evt.done();
540
- });
541
- };
542
- const variables = ref({
543
- header
544
- });
545
- const functions = ref({
546
- submit
547
- });
548
- __expose({
549
- variables,
550
- functions
551
- });
552
- return (_ctx, _cache) => {
553
- const _component_q_input = QInput;
554
- return openBlock(), createBlock(unref(QForm), mergeProps({
555
- ref_key: "formRef",
556
- ref: formRef,
557
- class: "q-gutter-md"
558
- }, __props.form, {
559
- onSubmit: _cache[3] || (_cache[3] = (e) => submit)
560
- }), {
561
- default: withCtx(() => [
562
- createVNode(_sfc_main$d, mergeProps(__props.input, {
563
- modelValue: otp.value,
564
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
565
- }), null, 16, ["modelValue"]),
566
- createVNode(_component_q_input, mergeProps(__props.input, {
567
- id: "newEmail",
568
- modelValue: newEmail.value,
569
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => newEmail.value = $event),
570
- name: "newEmail",
571
- label: unref(lang2).email.fields.newEmail,
572
- "bottom-slots": "",
573
- rules: validations.value["newEmail"],
574
- "lazy-rules": ""
575
- }), null, 16, ["modelValue", "label", "rules"]),
576
- createVNode(_component_q_input, mergeProps(__props.input, {
577
- id: "repeatNewEmail",
578
- modelValue: repeatNewEmail.value,
579
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => repeatNewEmail.value = $event),
580
- name: "repeatNewEmail",
581
- label: unref(lang2).email.fields.repeatNewEmail,
582
- "bottom-slots": "",
583
- rules: validations.value["repeatNewEmail"],
584
- "lazy-rules": ""
585
- }), null, 16, ["modelValue", "label", "rules"]),
586
- renderSlot(_ctx.$slots, "default", { submit })
587
- ]),
588
- _: 3
589
- }, 16);
590
- };
591
- }
451
+ //#endregion
452
+ //#region src/ui/authentication/EmailChangeForm.vue
453
+ var EmailChangeForm_default = /* @__PURE__ */ defineComponent({
454
+ name: "EmailChangeForm",
455
+ props: {
456
+ email: {},
457
+ form: {},
458
+ input: {}
459
+ },
460
+ emits: ["submit"],
461
+ setup(__props, { expose: __expose, emit: __emit }) {
462
+ const props = __props;
463
+ const emit = __emit;
464
+ const $q = useQuasar();
465
+ const lang = useLang();
466
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
467
+ watch($q.lang, (val) => {
468
+ loadLang($q.lang.isoName);
469
+ });
470
+ const email = toRef(props, "email");
471
+ const otp = ref("");
472
+ const newEmail = ref("");
473
+ const repeatNewEmail = ref("");
474
+ const header = computed(() => lang.value.email.changeEmail);
475
+ const formRef = ref();
476
+ const validations = computed(() => ({
477
+ newEmail: [(val) => !!val || lang.value.email.validations.fieldRequired, (val) => isEmail(val) || lang.value.email.validations.invalidEmail],
478
+ repeatNewEmail: [(val) => !!val || lang.value.email.validations.fieldRequired, (val) => isEmail(val) || lang.value.email.validations.emailsDoNotMatch]
479
+ }));
480
+ const submit = (evt) => {
481
+ formRef.value?.validate().then((success) => {
482
+ if (success) emit("submit", {
483
+ email: email.value.trim(),
484
+ newEmail: newEmail.value.trim(),
485
+ otp: otp.value,
486
+ done: evt.done
487
+ });
488
+ else evt.done();
489
+ });
490
+ };
491
+ __expose({
492
+ variables: ref({ header }),
493
+ functions: ref({ submit })
494
+ });
495
+ return (_ctx, _cache) => {
496
+ const _component_q_input = QInput;
497
+ return openBlock(), createBlock(unref(QForm), mergeProps({
498
+ ref_key: "formRef",
499
+ ref: formRef,
500
+ class: "q-gutter-md"
501
+ }, __props.form, { onSubmit: _cache[3] || (_cache[3] = (e) => submit) }), {
502
+ default: withCtx(() => [
503
+ createVNode(OtpInput_default, mergeProps(__props.input, {
504
+ modelValue: otp.value,
505
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
506
+ }), null, 16, ["modelValue"]),
507
+ createVNode(_component_q_input, mergeProps(__props.input, {
508
+ id: "newEmail",
509
+ modelValue: newEmail.value,
510
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => newEmail.value = $event),
511
+ name: "newEmail",
512
+ label: unref(lang).email.fields.newEmail,
513
+ "bottom-slots": "",
514
+ rules: validations.value["newEmail"],
515
+ "lazy-rules": ""
516
+ }), null, 16, [
517
+ "modelValue",
518
+ "label",
519
+ "rules"
520
+ ]),
521
+ createVNode(_component_q_input, mergeProps(__props.input, {
522
+ id: "repeatNewEmail",
523
+ modelValue: repeatNewEmail.value,
524
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => repeatNewEmail.value = $event),
525
+ name: "repeatNewEmail",
526
+ label: unref(lang).email.fields.repeatNewEmail,
527
+ "bottom-slots": "",
528
+ rules: validations.value["repeatNewEmail"],
529
+ "lazy-rules": ""
530
+ }), null, 16, [
531
+ "modelValue",
532
+ "label",
533
+ "rules"
534
+ ]),
535
+ renderSlot(_ctx.$slots, "default", { submit })
536
+ ]),
537
+ _: 3
538
+ }, 16);
539
+ };
540
+ }
592
541
  });
593
- const __default__$a = {
594
- name: "EmailChangeStepper"
595
- };
596
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
597
- ...__default__$a,
598
- props: {
599
- input: {}
600
- },
601
- emits: ["requestOtp", "changeEmail"],
602
- setup(__props, { expose: __expose, emit: __emit }) {
603
- const emit = __emit;
604
- const $q = useQuasar();
605
- const lang2 = useLang();
606
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
607
- watch($q.lang, (val) => {
608
- loadLang($q.lang.isoName);
609
- });
610
- const steps = ["requestOtp", "changeEmail"];
611
- const step = ref("requestOtp");
612
- const email = ref("");
613
- const header = computed(() => lang2.value.email.changeEmail);
614
- const emailChanged = computed(() => lang2.value.email.emailChanged);
615
- const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
616
- const checkEmail = computed(() => lang2.value.otp.checkEmail);
617
- const requestOtpFormRef = ref();
618
- const emailChangeFormRef = ref();
619
- const requestOtpHeader = computed(
620
- () => requestOtpFormRef.value?.variables.header || ""
621
- );
622
- const emailChangeHeader = computed(
623
- () => emailChangeFormRef.value?.variables.header || ""
624
- );
625
- const requestOtp = ({
626
- email: emittedEmail,
627
- done
628
- }) => {
629
- emit("requestOtp", {
630
- email: emittedEmail,
631
- done: () => {
632
- email.value = emittedEmail;
633
- done();
634
- }
635
- });
636
- };
637
- const changeEmail = ({ email: email2, newEmail, otp, done }) => {
638
- emit("changeEmail", {
639
- email: email2,
640
- newEmail,
641
- otp,
642
- done
643
- });
644
- };
645
- const variables = ref({
646
- header,
647
- emailChanged,
648
- unprocessableRequest,
649
- checkEmail,
650
- steps
651
- });
652
- const functions = ref({
653
- goToStep: (newStep) => step.value = newStep
654
- });
655
- __expose({
656
- variables,
657
- functions
658
- });
659
- return (_ctx, _cache) => {
660
- const _component_q_step = QStep;
661
- const _component_q_stepper_navigation = QStepperNavigation;
662
- const _component_q_stepper = QStepper;
663
- return openBlock(), createBlock(_component_q_stepper, {
664
- modelValue: step.value,
665
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
666
- }, {
667
- navigation: withCtx(() => [
668
- createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
669
- default: withCtx(() => [
670
- step.value === "requestOtp" ? (openBlock(), createBlock(_sfc_main$f, {
671
- key: 0,
672
- "is-next-button": "",
673
- form: "requestOtpForm",
674
- onSubmit: requestOtpFormRef.value?.functions.submit
675
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true),
676
- step.value === "changeEmail" ? (openBlock(), createBlock(_sfc_main$f, {
677
- key: 1,
678
- form: "emailChangeForm",
679
- onSubmit: emailChangeFormRef.value?.functions.submit
680
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true)
681
- ]),
682
- _: 1
683
- })
684
- ]),
685
- default: withCtx(() => [
686
- createVNode(_component_q_step, {
687
- name: "requestOtp",
688
- title: requestOtpHeader.value
689
- }, {
690
- default: withCtx(() => [
691
- createVNode(_sfc_main$e, {
692
- ref_key: "requestOtpFormRef",
693
- ref: requestOtpFormRef,
694
- form: { id: "requestOtpForm" },
695
- input: __props.input,
696
- onSubmit: requestOtp
697
- }, null, 8, ["input"])
698
- ]),
699
- _: 1
700
- }, 8, ["title"]),
701
- createVNode(_component_q_step, {
702
- name: "changeEmail",
703
- title: emailChangeHeader.value
704
- }, {
705
- default: withCtx(() => [
706
- createVNode(_sfc_main$c, {
707
- ref_key: "emailChangeFormRef",
708
- ref: emailChangeFormRef,
709
- form: { id: "emailChangeForm" },
710
- email: email.value,
711
- input: __props.input,
712
- onSubmit: changeEmail
713
- }, null, 8, ["email", "input"])
714
- ]),
715
- _: 1
716
- }, 8, ["title"])
717
- ]),
718
- _: 1
719
- }, 8, ["modelValue"]);
720
- };
721
- }
542
+ //#endregion
543
+ //#region src/ui/authentication/EmailChangeStepper.vue
544
+ var EmailChangeStepper_default = /* @__PURE__ */ defineComponent({
545
+ name: "EmailChangeStepper",
546
+ props: { input: {} },
547
+ emits: ["requestOtp", "changeEmail"],
548
+ setup(__props, { expose: __expose, emit: __emit }) {
549
+ const emit = __emit;
550
+ const $q = useQuasar();
551
+ const lang = useLang();
552
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
553
+ watch($q.lang, (val) => {
554
+ loadLang($q.lang.isoName);
555
+ });
556
+ const steps = ["requestOtp", "changeEmail"];
557
+ const step = ref("requestOtp");
558
+ const email = ref("");
559
+ const header = computed(() => lang.value.email.changeEmail);
560
+ const emailChanged = computed(() => lang.value.email.emailChanged);
561
+ const unprocessableRequest = computed(() => lang.value.unprocessableRequest);
562
+ const checkEmail = computed(() => lang.value.otp.checkEmail);
563
+ const requestOtpFormRef = ref();
564
+ const emailChangeFormRef = ref();
565
+ const requestOtpHeader = computed(() => requestOtpFormRef.value?.variables.header || "");
566
+ const emailChangeHeader = computed(() => emailChangeFormRef.value?.variables.header || "");
567
+ const requestOtp = ({ email: emittedEmail, done }) => {
568
+ emit("requestOtp", {
569
+ email: emittedEmail,
570
+ done: () => {
571
+ email.value = emittedEmail;
572
+ done();
573
+ }
574
+ });
575
+ };
576
+ const changeEmail = ({ email, newEmail, otp, done }) => {
577
+ emit("changeEmail", {
578
+ email,
579
+ newEmail,
580
+ otp,
581
+ done
582
+ });
583
+ };
584
+ __expose({
585
+ variables: ref({
586
+ header,
587
+ emailChanged,
588
+ unprocessableRequest,
589
+ checkEmail,
590
+ steps
591
+ }),
592
+ functions: ref({ goToStep: (newStep) => step.value = newStep })
593
+ });
594
+ return (_ctx, _cache) => {
595
+ const _component_q_step = QStep;
596
+ const _component_q_stepper_navigation = QStepperNavigation;
597
+ const _component_q_stepper = QStepper;
598
+ return openBlock(), createBlock(_component_q_stepper, {
599
+ modelValue: step.value,
600
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
601
+ }, {
602
+ navigation: withCtx(() => [createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
603
+ default: withCtx(() => [step.value === "requestOtp" ? (openBlock(), createBlock(QSubmitButton_default, {
604
+ key: 0,
605
+ "is-next-button": "",
606
+ form: "requestOtpForm",
607
+ onSubmit: requestOtpFormRef.value?.functions.submit
608
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true), step.value === "changeEmail" ? (openBlock(), createBlock(QSubmitButton_default, {
609
+ key: 1,
610
+ form: "emailChangeForm",
611
+ onSubmit: emailChangeFormRef.value?.functions.submit
612
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true)]),
613
+ _: 1
614
+ })]),
615
+ default: withCtx(() => [createVNode(_component_q_step, {
616
+ name: "requestOtp",
617
+ title: requestOtpHeader.value
618
+ }, {
619
+ default: withCtx(() => [createVNode(RequestOtpForm_default, {
620
+ ref_key: "requestOtpFormRef",
621
+ ref: requestOtpFormRef,
622
+ form: { id: "requestOtpForm" },
623
+ input: __props.input,
624
+ onSubmit: requestOtp
625
+ }, null, 8, ["input"])]),
626
+ _: 1
627
+ }, 8, ["title"]), createVNode(_component_q_step, {
628
+ name: "changeEmail",
629
+ title: emailChangeHeader.value
630
+ }, {
631
+ default: withCtx(() => [createVNode(EmailChangeForm_default, {
632
+ ref_key: "emailChangeFormRef",
633
+ ref: emailChangeFormRef,
634
+ form: { id: "emailChangeForm" },
635
+ email: email.value,
636
+ input: __props.input,
637
+ onSubmit: changeEmail
638
+ }, null, 8, ["email", "input"])]),
639
+ _: 1
640
+ }, 8, ["title"])]),
641
+ _: 1
642
+ }, 8, ["modelValue"]);
643
+ };
644
+ }
722
645
  });
646
+ //#endregion
647
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/equals.js
723
648
  function equals(str, comparison) {
724
- assertString(str);
725
- return str === comparison;
649
+ assertString(str);
650
+ return str === comparison;
726
651
  }
727
- const __default__$9 = {
728
- name: "PasswordChangeForm"
729
- };
730
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
731
- ...__default__$9,
732
- props: {
733
- email: {},
734
- minimumPasswordLength: { default: 8 },
735
- form: { default: void 0 },
736
- input: { default: void 0 },
737
- icons: { default: () => ({
738
- visibility: "visibility",
739
- visibilityOff: "visibility_off"
740
- }) }
741
- },
742
- emits: ["submit"],
743
- setup(__props, { expose: __expose, emit: __emit }) {
744
- const props = __props;
745
- const emit = __emit;
746
- const $q = useQuasar();
747
- const lang2 = useLang();
748
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
749
- watch($q.lang, (val) => {
750
- loadLang($q.lang.isoName);
751
- });
752
- const email = toRef(props, "email");
753
- const minimumPasswordLength = toRef(props, "minimumPasswordLength");
754
- const otp = ref("");
755
- const newPassword = ref("");
756
- const repeatNewPassword = ref("");
757
- const showPassword = ref(false);
758
- const showRepeatPassword = ref(false);
759
- const formRef = ref();
760
- const validations = computed(() => ({
761
- password: [
762
- (val) => !!val || lang2.value.password.validations.fieldRequired,
763
- (val) => val.length >= minimumPasswordLength.value || lang2.value.password.validations.minimumPasswordLength(
764
- minimumPasswordLength.value
765
- )
766
- ],
767
- repeatPassword: [
768
- (val) => !!val || lang2.value.password.validations.fieldRequired,
769
- (val) => equals(val, newPassword.value) || lang2.value.password.validations.passwordsDoNotMatch
770
- ]
771
- }));
772
- const submit = (evt) => {
773
- formRef.value?.validate().then((success) => {
774
- if (success) {
775
- emit("submit", {
776
- email: email.value,
777
- newPassword: newPassword.value,
778
- otp: otp.value,
779
- done: evt.done
780
- });
781
- } else evt.done();
782
- });
783
- };
784
- const variables = ref({});
785
- const functions = ref({
786
- submit
787
- });
788
- __expose({
789
- variables,
790
- functions
791
- });
792
- return (_ctx, _cache) => {
793
- const _component_q_icon = QIcon;
794
- const _component_q_input = QInput;
795
- return openBlock(), createBlock(unref(QForm), mergeProps({
796
- ref_key: "formRef",
797
- ref: formRef,
798
- class: "q-gutter-md"
799
- }, __props.form, {
800
- onSubmit: _cache[5] || (_cache[5] = (e) => submit)
801
- }), {
802
- default: withCtx(() => [
803
- createVNode(_sfc_main$d, mergeProps(__props.input, {
804
- modelValue: otp.value,
805
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
806
- }), null, 16, ["modelValue"]),
807
- createVNode(_component_q_input, mergeProps(__props.input, {
808
- id: "newPassword",
809
- modelValue: newPassword.value,
810
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => newPassword.value = $event),
811
- name: "newPassword",
812
- type: showPassword.value ? "text" : "password",
813
- label: unref(lang2).password.fields.password,
814
- "bottom-slots": "",
815
- rules: validations.value["newPassword"],
816
- "lazy-rules": ""
817
- }), {
818
- append: withCtx(() => [
819
- createVNode(_component_q_icon, {
820
- name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
821
- class: "cursor-pointer",
822
- onClick: _cache[1] || (_cache[1] = ($event) => showPassword.value = !showPassword.value)
823
- }, null, 8, ["name"])
824
- ]),
825
- _: 1
826
- }, 16, ["modelValue", "type", "label", "rules"]),
827
- createVNode(_component_q_input, mergeProps(__props.input, {
828
- id: "repeatNewPassword",
829
- modelValue: repeatNewPassword.value,
830
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => repeatNewPassword.value = $event),
831
- name: "repeatNewPassword",
832
- type: showRepeatPassword.value ? "text" : "password",
833
- label: unref(lang2).password.fields.repeatPassword,
834
- "bottom-slots": "",
835
- rules: validations.value["repeatNewPassword"],
836
- "lazy-rules": ""
837
- }), {
838
- append: withCtx(() => [
839
- createVNode(_component_q_icon, {
840
- name: showRepeatPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
841
- class: "cursor-pointer",
842
- onClick: _cache[3] || (_cache[3] = ($event) => showRepeatPassword.value = !showRepeatPassword.value)
843
- }, null, 8, ["name"])
844
- ]),
845
- _: 1
846
- }, 16, ["modelValue", "type", "label", "rules"]),
847
- renderSlot(_ctx.$slots, "default", { submit })
848
- ]),
849
- _: 3
850
- }, 16);
851
- };
852
- }
652
+ //#endregion
653
+ //#region src/ui/authentication/PasswordChangeForm.vue
654
+ var PasswordChangeForm_default = /* @__PURE__ */ defineComponent({
655
+ name: "PasswordChangeForm",
656
+ props: {
657
+ email: {},
658
+ minimumPasswordLength: { default: 8 },
659
+ form: { default: void 0 },
660
+ input: { default: void 0 },
661
+ icons: { default: () => ({
662
+ visibility: "visibility",
663
+ visibilityOff: "visibility_off"
664
+ }) }
665
+ },
666
+ emits: ["submit"],
667
+ setup(__props, { expose: __expose, emit: __emit }) {
668
+ const props = __props;
669
+ const emit = __emit;
670
+ const $q = useQuasar();
671
+ const lang = useLang();
672
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
673
+ watch($q.lang, (val) => {
674
+ loadLang($q.lang.isoName);
675
+ });
676
+ const email = toRef(props, "email");
677
+ const minimumPasswordLength = toRef(props, "minimumPasswordLength");
678
+ const otp = ref("");
679
+ const newPassword = ref("");
680
+ const repeatNewPassword = ref("");
681
+ const showPassword = ref(false);
682
+ const showRepeatPassword = ref(false);
683
+ const formRef = ref();
684
+ const validations = computed(() => ({
685
+ password: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => val.length >= minimumPasswordLength.value || lang.value.password.validations.minimumPasswordLength(minimumPasswordLength.value)],
686
+ repeatPassword: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => equals(val, newPassword.value) || lang.value.password.validations.passwordsDoNotMatch]
687
+ }));
688
+ const submit = (evt) => {
689
+ formRef.value?.validate().then((success) => {
690
+ if (success) emit("submit", {
691
+ email: email.value,
692
+ newPassword: newPassword.value,
693
+ otp: otp.value,
694
+ done: evt.done
695
+ });
696
+ else evt.done();
697
+ });
698
+ };
699
+ __expose({
700
+ variables: ref({}),
701
+ functions: ref({ submit })
702
+ });
703
+ return (_ctx, _cache) => {
704
+ const _component_q_icon = QIcon;
705
+ const _component_q_input = QInput;
706
+ return openBlock(), createBlock(unref(QForm), mergeProps({
707
+ ref_key: "formRef",
708
+ ref: formRef,
709
+ class: "q-gutter-md"
710
+ }, __props.form, { onSubmit: _cache[5] || (_cache[5] = (e) => submit) }), {
711
+ default: withCtx(() => [
712
+ createVNode(OtpInput_default, mergeProps(__props.input, {
713
+ modelValue: otp.value,
714
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
715
+ }), null, 16, ["modelValue"]),
716
+ createVNode(_component_q_input, mergeProps(__props.input, {
717
+ id: "newPassword",
718
+ modelValue: newPassword.value,
719
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => newPassword.value = $event),
720
+ name: "newPassword",
721
+ type: showPassword.value ? "text" : "password",
722
+ label: unref(lang).password.fields.password,
723
+ "bottom-slots": "",
724
+ rules: validations.value["newPassword"],
725
+ "lazy-rules": ""
726
+ }), {
727
+ append: withCtx(() => [createVNode(_component_q_icon, {
728
+ name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
729
+ class: "cursor-pointer",
730
+ onClick: _cache[1] || (_cache[1] = ($event) => showPassword.value = !showPassword.value)
731
+ }, null, 8, ["name"])]),
732
+ _: 1
733
+ }, 16, [
734
+ "modelValue",
735
+ "type",
736
+ "label",
737
+ "rules"
738
+ ]),
739
+ createVNode(_component_q_input, mergeProps(__props.input, {
740
+ id: "repeatNewPassword",
741
+ modelValue: repeatNewPassword.value,
742
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => repeatNewPassword.value = $event),
743
+ name: "repeatNewPassword",
744
+ type: showRepeatPassword.value ? "text" : "password",
745
+ label: unref(lang).password.fields.repeatPassword,
746
+ "bottom-slots": "",
747
+ rules: validations.value["repeatNewPassword"],
748
+ "lazy-rules": ""
749
+ }), {
750
+ append: withCtx(() => [createVNode(_component_q_icon, {
751
+ name: showRepeatPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
752
+ class: "cursor-pointer",
753
+ onClick: _cache[3] || (_cache[3] = ($event) => showRepeatPassword.value = !showRepeatPassword.value)
754
+ }, null, 8, ["name"])]),
755
+ _: 1
756
+ }, 16, [
757
+ "modelValue",
758
+ "type",
759
+ "label",
760
+ "rules"
761
+ ]),
762
+ renderSlot(_ctx.$slots, "default", { submit })
763
+ ]),
764
+ _: 3
765
+ }, 16);
766
+ };
767
+ }
853
768
  });
854
- const __default__$8 = {
855
- name: "PasswordChangeStepper",
856
- useLang
857
- };
858
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
859
- ...__default__$8,
860
- props: {
861
- input: { default: void 0 },
862
- icons: { default: () => ({
863
- visibility: "visibility",
864
- visibilityOff: "visibility_off"
865
- }) }
866
- },
867
- emits: ["requestOtp", "changePassword"],
868
- setup(__props, { expose: __expose, emit: __emit }) {
869
- const emit = __emit;
870
- const $q = useQuasar();
871
- const lang2 = useLang();
872
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
873
- watch($q.lang, (val) => {
874
- loadLang($q.lang.isoName);
875
- });
876
- const steps = ["requestOtp", "changePassword"];
877
- const step = ref("requestOtp");
878
- const email = ref("");
879
- const requestOtpFormRef = ref();
880
- const passwordChangeFormRef = ref();
881
- const requestOtpHeader = computed(() => lang2.value.otp.request);
882
- const passwordChangeHeader = computed(() => lang2.value.password.changePassword);
883
- const requestOtp = ({
884
- email: emittedEmail,
885
- done
886
- }) => {
887
- emit("requestOtp", {
888
- email: emittedEmail,
889
- done: () => {
890
- email.value = emittedEmail;
891
- done();
892
- }
893
- });
894
- };
895
- const changePassword = ({ email: email2, newPassword, otp, done }) => {
896
- emit("changePassword", {
897
- email: email2,
898
- newPassword,
899
- otp,
900
- done
901
- });
902
- };
903
- const variables = ref({
904
- steps
905
- });
906
- const functions = ref({
907
- goToStep: (newStep) => step.value = newStep
908
- });
909
- __expose({
910
- variables,
911
- functions
912
- });
913
- return (_ctx, _cache) => {
914
- const _component_q_step = QStep;
915
- const _component_q_stepper_navigation = QStepperNavigation;
916
- const _component_q_stepper = QStepper;
917
- return openBlock(), createBlock(_component_q_stepper, {
918
- modelValue: step.value,
919
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
920
- }, {
921
- navigation: withCtx(() => [
922
- createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
923
- default: withCtx(() => [
924
- step.value === "requestOtp" ? (openBlock(), createBlock(_sfc_main$f, {
925
- key: 0,
926
- "is-next-button": "",
927
- form: "requestOtpForm",
928
- onSubmit: requestOtpFormRef.value?.functions.submit
929
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true),
930
- step.value === "changePassword" ? (openBlock(), createBlock(_sfc_main$f, {
931
- key: 1,
932
- form: "passwordChangeForm",
933
- onSubmit: passwordChangeFormRef.value?.functions.submit
934
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true)
935
- ]),
936
- _: 1
937
- })
938
- ]),
939
- default: withCtx(() => [
940
- createVNode(_component_q_step, {
941
- name: "requestOtp",
942
- title: requestOtpHeader.value
943
- }, {
944
- default: withCtx(() => [
945
- createVNode(_sfc_main$e, {
946
- ref_key: "requestOtpFormRef",
947
- ref: requestOtpFormRef,
948
- form: { id: "requestOtpForm" },
949
- input: __props.input,
950
- onSubmit: requestOtp
951
- }, null, 8, ["input"])
952
- ]),
953
- _: 1
954
- }, 8, ["title"]),
955
- createVNode(_component_q_step, {
956
- name: "changePassword",
957
- title: passwordChangeHeader.value
958
- }, {
959
- default: withCtx(() => [
960
- createVNode(_sfc_main$a, {
961
- ref_key: "passwordChangeFormRef",
962
- ref: passwordChangeFormRef,
963
- form: { id: "passwordChangeForm" },
964
- email: email.value,
965
- input: __props.input,
966
- icons: __props.icons,
967
- onSubmit: changePassword
968
- }, null, 8, ["email", "input", "icons"])
969
- ]),
970
- _: 1
971
- }, 8, ["title"])
972
- ]),
973
- _: 1
974
- }, 8, ["modelValue"]);
975
- };
976
- }
769
+ //#endregion
770
+ //#region src/ui/authentication/PasswordChangeStepper.vue
771
+ var PasswordChangeStepper_default = /* @__PURE__ */ defineComponent({
772
+ name: "PasswordChangeStepper",
773
+ useLang,
774
+ props: {
775
+ input: { default: void 0 },
776
+ icons: { default: () => ({
777
+ visibility: "visibility",
778
+ visibilityOff: "visibility_off"
779
+ }) }
780
+ },
781
+ emits: ["requestOtp", "changePassword"],
782
+ setup(__props, { expose: __expose, emit: __emit }) {
783
+ const emit = __emit;
784
+ const $q = useQuasar();
785
+ const lang = useLang();
786
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
787
+ watch($q.lang, (val) => {
788
+ loadLang($q.lang.isoName);
789
+ });
790
+ const steps = ["requestOtp", "changePassword"];
791
+ const step = ref("requestOtp");
792
+ const email = ref("");
793
+ const requestOtpFormRef = ref();
794
+ const passwordChangeFormRef = ref();
795
+ const requestOtpHeader = computed(() => lang.value.otp.request);
796
+ const passwordChangeHeader = computed(() => lang.value.password.changePassword);
797
+ const requestOtp = ({ email: emittedEmail, done }) => {
798
+ emit("requestOtp", {
799
+ email: emittedEmail,
800
+ done: () => {
801
+ email.value = emittedEmail;
802
+ done();
803
+ }
804
+ });
805
+ };
806
+ const changePassword = ({ email, newPassword, otp, done }) => {
807
+ emit("changePassword", {
808
+ email,
809
+ newPassword,
810
+ otp,
811
+ done
812
+ });
813
+ };
814
+ __expose({
815
+ variables: ref({ steps }),
816
+ functions: ref({ goToStep: (newStep) => step.value = newStep })
817
+ });
818
+ return (_ctx, _cache) => {
819
+ const _component_q_step = QStep;
820
+ const _component_q_stepper_navigation = QStepperNavigation;
821
+ const _component_q_stepper = QStepper;
822
+ return openBlock(), createBlock(_component_q_stepper, {
823
+ modelValue: step.value,
824
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
825
+ }, {
826
+ navigation: withCtx(() => [createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
827
+ default: withCtx(() => [step.value === "requestOtp" ? (openBlock(), createBlock(QSubmitButton_default, {
828
+ key: 0,
829
+ "is-next-button": "",
830
+ form: "requestOtpForm",
831
+ onSubmit: requestOtpFormRef.value?.functions.submit
832
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true), step.value === "changePassword" ? (openBlock(), createBlock(QSubmitButton_default, {
833
+ key: 1,
834
+ form: "passwordChangeForm",
835
+ onSubmit: passwordChangeFormRef.value?.functions.submit
836
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true)]),
837
+ _: 1
838
+ })]),
839
+ default: withCtx(() => [createVNode(_component_q_step, {
840
+ name: "requestOtp",
841
+ title: requestOtpHeader.value
842
+ }, {
843
+ default: withCtx(() => [createVNode(RequestOtpForm_default, {
844
+ ref_key: "requestOtpFormRef",
845
+ ref: requestOtpFormRef,
846
+ form: { id: "requestOtpForm" },
847
+ input: __props.input,
848
+ onSubmit: requestOtp
849
+ }, null, 8, ["input"])]),
850
+ _: 1
851
+ }, 8, ["title"]), createVNode(_component_q_step, {
852
+ name: "changePassword",
853
+ title: passwordChangeHeader.value
854
+ }, {
855
+ default: withCtx(() => [createVNode(PasswordChangeForm_default, {
856
+ ref_key: "passwordChangeFormRef",
857
+ ref: passwordChangeFormRef,
858
+ form: { id: "passwordChangeForm" },
859
+ email: email.value,
860
+ input: __props.input,
861
+ icons: __props.icons,
862
+ onSubmit: changePassword
863
+ }, null, 8, [
864
+ "email",
865
+ "input",
866
+ "icons"
867
+ ])]),
868
+ _: 1
869
+ }, 8, ["title"])]),
870
+ _: 1
871
+ }, 8, ["modelValue"]);
872
+ };
873
+ }
977
874
  });
978
- const __default__$7 = {
979
- name: "LoginForm"
980
- };
981
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
982
- ...__default__$7,
983
- props: {
984
- useUsername: { type: Boolean },
985
- passwordForgotUrl: {},
986
- form: {},
987
- input: {},
988
- icons: {}
989
- },
990
- emits: ["submit"],
991
- setup(__props, { expose: __expose, emit: __emit }) {
992
- const props = __props;
993
- const { icons } = toRefs(props);
994
- const emit = __emit;
995
- const $q = useQuasar();
996
- const lang2 = useLang();
997
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
998
- watch($q.lang, (val) => {
999
- loadLang($q.lang.isoName);
1000
- });
1001
- const email = ref("");
1002
- const password = ref("");
1003
- const username = ref("");
1004
- const showPassword = ref(false);
1005
- const header = computed(() => lang2.value.login.login);
1006
- const createAccount = computed(() => lang2.value.login.createAccount);
1007
- const invalidCredentials = computed(() => lang2.value.login.invalidCredentials);
1008
- const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
1009
- const formRef = ref();
1010
- const validations = computed(() => ({
1011
- email: [
1012
- (val) => !!val || lang2.value.login.validations.fieldRequired,
1013
- (val) => isEmail(val) || lang2.value.login.validations.invalidEmail
1014
- ],
1015
- username: [(val) => !!val || lang2.value.login.validations.fieldRequired],
1016
- password: [(val) => !!val || lang2.value.login.validations.fieldRequired]
1017
- }));
1018
- const submit = (evt) => {
1019
- formRef.value?.validate().then((success) => {
1020
- if (success) {
1021
- emit("submit", {
1022
- email: email.value.trim(),
1023
- password: password.value,
1024
- username: username.value.trim(),
1025
- done: evt.done
1026
- });
1027
- } else evt.done();
1028
- });
1029
- };
1030
- const visibilityIcon = icons.value?.visibility ?? "visibility";
1031
- const visibilityOffIcon = icons.value?.visibilifyOff ?? "visibility_off";
1032
- const variables = ref({
1033
- header,
1034
- createAccount,
1035
- invalidCredentials,
1036
- unprocessableRequest
1037
- });
1038
- const functions = ref({
1039
- submit
1040
- });
1041
- __expose({
1042
- variables,
1043
- functions
1044
- });
1045
- return (_ctx, _cache) => {
1046
- const _component_q_input = QInput;
1047
- const _component_q_icon = QIcon;
1048
- const _component_q_btn = QBtn;
1049
- return openBlock(), createBlock(unref(QForm), mergeProps({
1050
- ref_key: "formRef",
1051
- ref: formRef,
1052
- class: "q-gutter-md"
1053
- }, __props.form, {
1054
- onSubmit: _cache[4] || (_cache[4] = (e) => submit)
1055
- }), {
1056
- default: withCtx(() => [
1057
- !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
1058
- id: "email",
1059
- modelValue: email.value,
1060
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
1061
- name: "email",
1062
- label: unref(lang2).login.fields.email,
1063
- "bottom-slots": "",
1064
- rules: validations.value["email"],
1065
- "lazy-rules": "",
1066
- autcomplete: "email"
1067
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1068
- __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
1069
- id: "username",
1070
- modelValue: username.value,
1071
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
1072
- name: "username",
1073
- label: unref(lang2).login.fields.username,
1074
- "bottom-slots": "",
1075
- rules: validations.value["username"],
1076
- "lazy-rules": "",
1077
- autocomplete: "username"
1078
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1079
- createVNode(_component_q_input, mergeProps({
1080
- id: "password",
1081
- modelValue: password.value,
1082
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
1083
- class: "q-pt-none"
1084
- }, __props.input, {
1085
- name: "password",
1086
- type: showPassword.value ? "text" : "password",
1087
- label: unref(lang2).login.fields.password,
1088
- rules: validations.value["password"],
1089
- "lazy-rules": "",
1090
- "bottom-slots": "",
1091
- autcomplete: "current-password"
1092
- }), {
1093
- append: withCtx(() => [
1094
- createVNode(_component_q_icon, {
1095
- name: showPassword.value ? unref(visibilityIcon) : unref(visibilityOffIcon),
1096
- class: "cursor-pointer",
1097
- onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1098
- }, null, 8, ["name"])
1099
- ]),
1100
- _: 1
1101
- }, 16, ["modelValue", "type", "label", "rules"]),
1102
- __props.passwordForgotUrl ? (openBlock(), createBlock(_component_q_btn, {
1103
- key: 2,
1104
- class: "q-pt-none text-primary",
1105
- label: unref(lang2).login.forgotPassword,
1106
- size: "sm",
1107
- flat: "",
1108
- to: __props.passwordForgotUrl
1109
- }, null, 8, ["label", "to"])) : createCommentVNode("", true),
1110
- renderSlot(_ctx.$slots, "default", { submit })
1111
- ]),
1112
- _: 3
1113
- }, 16);
1114
- };
1115
- }
875
+ //#endregion
876
+ //#region src/ui/authentication/LoginForm.vue
877
+ var LoginForm_default = /* @__PURE__ */ defineComponent({
878
+ name: "LoginForm",
879
+ props: {
880
+ useUsername: { type: Boolean },
881
+ passwordForgotUrl: {},
882
+ form: {},
883
+ input: {},
884
+ icons: {},
885
+ defaultCredentials: {}
886
+ },
887
+ emits: ["submit"],
888
+ setup(__props, { expose: __expose, emit: __emit }) {
889
+ const { icons, defaultCredentials } = toRefs(__props);
890
+ const emit = __emit;
891
+ const $q = useQuasar();
892
+ const lang = useLang();
893
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
894
+ watch($q.lang, (val) => {
895
+ loadLang($q.lang.isoName);
896
+ });
897
+ const email = ref(defaultCredentials.value?.email ?? "");
898
+ const password = ref(defaultCredentials.value?.password ?? "");
899
+ const username = ref(defaultCredentials.value?.username ?? "");
900
+ const showPassword = ref(false);
901
+ const header = computed(() => lang.value.login.login);
902
+ const createAccount = computed(() => lang.value.login.createAccount);
903
+ const invalidCredentials = computed(() => lang.value.login.invalidCredentials);
904
+ const unprocessableRequest = computed(() => lang.value.unprocessableRequest);
905
+ const formRef = ref();
906
+ const validations = computed(() => ({
907
+ email: [(val) => !!val || lang.value.login.validations.fieldRequired, (val) => isEmail(val) || lang.value.login.validations.invalidEmail],
908
+ username: [(val) => !!val || lang.value.login.validations.fieldRequired],
909
+ password: [(val) => !!val || lang.value.login.validations.fieldRequired]
910
+ }));
911
+ const submit = (evt) => {
912
+ formRef.value?.validate().then((success) => {
913
+ if (success) emit("submit", {
914
+ email: email.value.trim(),
915
+ password: password.value,
916
+ username: username.value.trim(),
917
+ done: evt.done
918
+ });
919
+ else evt.done();
920
+ });
921
+ };
922
+ const visibilityIcon = icons.value?.visibility ?? "visibility";
923
+ const visibilityOffIcon = icons.value?.visibilifyOff ?? "visibility_off";
924
+ __expose({
925
+ variables: ref({
926
+ header,
927
+ createAccount,
928
+ invalidCredentials,
929
+ unprocessableRequest
930
+ }),
931
+ functions: ref({ submit })
932
+ });
933
+ return (_ctx, _cache) => {
934
+ const _component_q_input = QInput;
935
+ const _component_q_icon = QIcon;
936
+ const _component_q_btn = QBtn;
937
+ return openBlock(), createBlock(unref(QForm), mergeProps({
938
+ ref_key: "formRef",
939
+ ref: formRef,
940
+ class: "q-gutter-md"
941
+ }, __props.form, { onSubmit: _cache[4] || (_cache[4] = (e) => submit) }), {
942
+ default: withCtx(() => [
943
+ !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
944
+ id: "email",
945
+ modelValue: email.value,
946
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
947
+ name: "email",
948
+ label: unref(lang).login.fields.email,
949
+ "bottom-slots": "",
950
+ rules: validations.value["email"],
951
+ "lazy-rules": "",
952
+ autcomplete: "email"
953
+ }), null, 16, [
954
+ "modelValue",
955
+ "label",
956
+ "rules"
957
+ ])) : createCommentVNode("", true),
958
+ __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
959
+ id: "username",
960
+ modelValue: username.value,
961
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
962
+ name: "username",
963
+ label: unref(lang).login.fields.username,
964
+ "bottom-slots": "",
965
+ rules: validations.value["username"],
966
+ "lazy-rules": "",
967
+ autocomplete: "username"
968
+ }), null, 16, [
969
+ "modelValue",
970
+ "label",
971
+ "rules"
972
+ ])) : createCommentVNode("", true),
973
+ createVNode(_component_q_input, mergeProps({
974
+ id: "password",
975
+ modelValue: password.value,
976
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
977
+ class: "q-pt-none"
978
+ }, __props.input, {
979
+ name: "password",
980
+ type: showPassword.value ? "text" : "password",
981
+ label: unref(lang).login.fields.password,
982
+ rules: validations.value["password"],
983
+ "lazy-rules": "",
984
+ "bottom-slots": "",
985
+ autcomplete: "current-password"
986
+ }), {
987
+ append: withCtx(() => [createVNode(_component_q_icon, {
988
+ name: showPassword.value ? unref(visibilityIcon) : unref(visibilityOffIcon),
989
+ class: "cursor-pointer",
990
+ onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
991
+ }, null, 8, ["name"])]),
992
+ _: 1
993
+ }, 16, [
994
+ "modelValue",
995
+ "type",
996
+ "label",
997
+ "rules"
998
+ ]),
999
+ __props.passwordForgotUrl ? (openBlock(), createBlock(_component_q_btn, {
1000
+ key: 2,
1001
+ class: "q-pt-none text-primary",
1002
+ label: unref(lang).login.forgotPassword,
1003
+ size: "sm",
1004
+ flat: "",
1005
+ to: __props.passwordForgotUrl
1006
+ }, null, 8, ["label", "to"])) : createCommentVNode("", true),
1007
+ renderSlot(_ctx.$slots, "default", { submit })
1008
+ ]),
1009
+ _: 3
1010
+ }, 16);
1011
+ };
1012
+ }
1116
1013
  });
1014
+ //#endregion
1015
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/alpha.js
1016
+ var alpha = {
1017
+ "en-US": /^[A-Z]+$/i,
1018
+ "az-AZ": /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
1019
+ "bg-BG": /^[А-Я]+$/i,
1020
+ "cs-CZ": /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
1021
+ "da-DK": /^[A-ZÆØÅ]+$/i,
1022
+ "de-DE": /^[A-ZÄÖÜß]+$/i,
1023
+ "el-GR": /^[Α-ώ]+$/i,
1024
+ "es-ES": /^[A-ZÁÉÍÑÓÚÜ]+$/i,
1025
+ "fa-IR": /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,
1026
+ "fi-FI": /^[A-ZÅÄÖ]+$/i,
1027
+ "fr-FR": /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1028
+ "it-IT": /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
1029
+ "ja-JP": /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
1030
+ "nb-NO": /^[A-ZÆØÅ]+$/i,
1031
+ "nl-NL": /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
1032
+ "nn-NO": /^[A-ZÆØÅ]+$/i,
1033
+ "hu-HU": /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1034
+ "pl-PL": /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1035
+ "pt-PT": /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
1036
+ "ru-RU": /^[А-ЯЁ]+$/i,
1037
+ "kk-KZ": /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
1038
+ "sl-SI": /^[A-ZČĆĐŠŽ]+$/i,
1039
+ "sk-SK": /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
1040
+ "sr-RS@latin": /^[A-ZČĆŽŠĐ]+$/i,
1041
+ "sr-RS": /^[А-ЯЂЈЉЊЋЏ]+$/i,
1042
+ "sv-SE": /^[A-ZÅÄÖ]+$/i,
1043
+ "th-TH": /^[ก-๐\s]+$/i,
1044
+ "tr-TR": /^[A-ZÇĞİıÖŞÜ]+$/i,
1045
+ "uk-UA": /^[А-ЩЬЮЯЄIЇҐі]+$/i,
1046
+ "vi-VN": /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
1047
+ "ko-KR": /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
1048
+ "ku-IQ": /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
1049
+ ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
1050
+ he: /^[א-ת]+$/,
1051
+ fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,
1052
+ bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
1053
+ eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
1054
+ "hi-IN": /^[\u0900-\u0961]+[\u0972-\u097F]*$/i,
1055
+ "si-LK": /^[\u0D80-\u0DFF]+$/,
1056
+ "ta-IN": /^[\u0B80-\u0BFF]+$/i,
1057
+ "te-IN": /^[\u0C00-\u0C7F]+$/i,
1058
+ "kn-IN": /^[\u0C80-\u0CFF]+$/i,
1059
+ "ml-IN": /^[\u0D00-\u0D7F]+$/i,
1060
+ "gu-IN": /^[\u0A80-\u0AFF]+$/i,
1061
+ "pa-IN": /^[\u0A00-\u0A7F]+$/i,
1062
+ "or-IN": /^[\u0B00-\u0B7F]+$/i
1063
+ };
1117
1064
  var alphanumeric = {
1118
- "en-US": /^[0-9A-Z]+$/i,
1119
- "az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
1120
- "bg-BG": /^[0-9А-Я]+$/i,
1121
- "cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
1122
- "da-DK": /^[0-9A-ZÆØÅ]+$/i,
1123
- "de-DE": /^[0-9A-ZÄÖÜß]+$/i,
1124
- "el-GR": /^[0-9Α-ω]+$/i,
1125
- "es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
1126
- "fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
1127
- "fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1128
- "it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
1129
- "ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
1130
- "hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1131
- "nb-NO": /^[0-9A-ZÆØÅ]+$/i,
1132
- "nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
1133
- "nn-NO": /^[0-9A-ZÆØÅ]+$/i,
1134
- "pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1135
- "pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
1136
- "ru-RU": /^[0-9А-ЯЁ]+$/i,
1137
- "kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
1138
- "sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
1139
- "sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
1140
- "sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
1141
- "sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
1142
- "sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
1143
- "th-TH": /^[ก-๙\s]+$/i,
1144
- "tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
1145
- "uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
1146
- "ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
1147
- "ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
1148
- "vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
1149
- ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
1150
- he: /^[0-9א-ת]+$/,
1151
- fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
1152
- bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
1153
- eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
1154
- "hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
1155
- "si-LK": /^[0-9\u0D80-\u0DFF]+$/,
1156
- "ta-IN": /^[0-9\u0B80-\u0BFF.]+$/i,
1157
- "te-IN": /^[0-9\u0C00-\u0C7F.]+$/i,
1158
- "kn-IN": /^[0-9\u0C80-\u0CFF.]+$/i,
1159
- "ml-IN": /^[0-9\u0D00-\u0D7F.]+$/i,
1160
- "gu-IN": /^[0-9\u0A80-\u0AFF.]+$/i,
1161
- "pa-IN": /^[0-9\u0A00-\u0A7F.]+$/i,
1162
- "or-IN": /^[0-9\u0B00-\u0B7F.]+$/i
1065
+ "en-US": /^[0-9A-Z]+$/i,
1066
+ "az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
1067
+ "bg-BG": /^[0-9А-Я]+$/i,
1068
+ "cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
1069
+ "da-DK": /^[0-9A-ZÆØÅ]+$/i,
1070
+ "de-DE": /^[0-9A-ZÄÖÜß]+$/i,
1071
+ "el-GR": /^[0-9Α-ω]+$/i,
1072
+ "es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
1073
+ "fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
1074
+ "fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1075
+ "it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
1076
+ "ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
1077
+ "hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1078
+ "nb-NO": /^[0-9A-ZÆØÅ]+$/i,
1079
+ "nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
1080
+ "nn-NO": /^[0-9A-ZÆØÅ]+$/i,
1081
+ "pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1082
+ "pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
1083
+ "ru-RU": /^[0-9А-ЯЁ]+$/i,
1084
+ "kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
1085
+ "sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
1086
+ "sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
1087
+ "sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
1088
+ "sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
1089
+ "sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
1090
+ "th-TH": /^[ก-๙\s]+$/i,
1091
+ "tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
1092
+ "uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
1093
+ "ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
1094
+ "ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
1095
+ "vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
1096
+ ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
1097
+ he: /^[0-9א-ת]+$/,
1098
+ fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
1099
+ bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
1100
+ eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
1101
+ "hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
1102
+ "si-LK": /^[0-9\u0D80-\u0DFF]+$/,
1103
+ "ta-IN": /^[0-9\u0B80-\u0BFF.]+$/i,
1104
+ "te-IN": /^[0-9\u0C00-\u0C7F.]+$/i,
1105
+ "kn-IN": /^[0-9\u0C80-\u0CFF.]+$/i,
1106
+ "ml-IN": /^[0-9\u0D00-\u0D7F.]+$/i,
1107
+ "gu-IN": /^[0-9\u0A80-\u0AFF.]+$/i,
1108
+ "pa-IN": /^[0-9\u0A00-\u0A7F.]+$/i,
1109
+ "or-IN": /^[0-9\u0B00-\u0B7F.]+$/i
1163
1110
  };
1164
- var englishLocales = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"];
1111
+ var decimal = {
1112
+ "en-US": ".",
1113
+ ar: "٫"
1114
+ };
1115
+ var englishLocales = [
1116
+ "AU",
1117
+ "GB",
1118
+ "HK",
1119
+ "IN",
1120
+ "NZ",
1121
+ "ZA",
1122
+ "ZM"
1123
+ ];
1165
1124
  for (var locale, i = 0; i < englishLocales.length; i++) {
1166
- locale = "en-".concat(englishLocales[i]);
1167
- alphanumeric[locale] = alphanumeric["en-US"];
1125
+ locale = "en-".concat(englishLocales[i]);
1126
+ alpha[locale] = alpha["en-US"];
1127
+ alphanumeric[locale] = alphanumeric["en-US"];
1128
+ decimal[locale] = decimal["en-US"];
1168
1129
  }
1169
- var arabicLocales = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"];
1130
+ var arabicLocales = [
1131
+ "AE",
1132
+ "BH",
1133
+ "DZ",
1134
+ "EG",
1135
+ "IQ",
1136
+ "JO",
1137
+ "KW",
1138
+ "LB",
1139
+ "LY",
1140
+ "MA",
1141
+ "QM",
1142
+ "QA",
1143
+ "SA",
1144
+ "SD",
1145
+ "SY",
1146
+ "TN",
1147
+ "YE"
1148
+ ];
1170
1149
  for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
1171
- _locale = "ar-".concat(arabicLocales[_i]);
1172
- alphanumeric[_locale] = alphanumeric.ar;
1150
+ _locale = "ar-".concat(arabicLocales[_i]);
1151
+ alpha[_locale] = alpha.ar;
1152
+ alphanumeric[_locale] = alphanumeric.ar;
1153
+ decimal[_locale] = decimal.ar;
1173
1154
  }
1174
1155
  var farsiLocales = ["IR", "AF"];
1175
1156
  for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {
1176
- _locale2 = "fa-".concat(farsiLocales[_i2]);
1177
- alphanumeric[_locale2] = alphanumeric.fa;
1157
+ _locale2 = "fa-".concat(farsiLocales[_i2]);
1158
+ alphanumeric[_locale2] = alphanumeric.fa;
1159
+ decimal[_locale2] = decimal.ar;
1178
1160
  }
1179
1161
  var bengaliLocales = ["BD", "IN"];
1180
1162
  for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) {
1181
- _locale3 = "bn-".concat(bengaliLocales[_i3]);
1182
- alphanumeric[_locale3] = alphanumeric.bn;
1163
+ _locale3 = "bn-".concat(bengaliLocales[_i3]);
1164
+ alpha[_locale3] = alpha.bn;
1165
+ alphanumeric[_locale3] = alphanumeric.bn;
1166
+ decimal[_locale3] = decimal["en-US"];
1183
1167
  }
1168
+ var dotDecimal = [
1169
+ "ar-EG",
1170
+ "ar-LB",
1171
+ "ar-LY"
1172
+ ];
1173
+ var commaDecimal = [
1174
+ "bg-BG",
1175
+ "cs-CZ",
1176
+ "da-DK",
1177
+ "de-DE",
1178
+ "el-GR",
1179
+ "en-ZM",
1180
+ "eo",
1181
+ "es-ES",
1182
+ "fr-CA",
1183
+ "fr-FR",
1184
+ "gu-IN",
1185
+ "hi-IN",
1186
+ "hu-HU",
1187
+ "id-ID",
1188
+ "it-IT",
1189
+ "kk-KZ",
1190
+ "kn-IN",
1191
+ "ku-IQ",
1192
+ "ml-IN",
1193
+ "nb-NO",
1194
+ "nl-NL",
1195
+ "nn-NO",
1196
+ "or-IN",
1197
+ "pa-IN",
1198
+ "pl-PL",
1199
+ "pt-PT",
1200
+ "ru-RU",
1201
+ "si-LK",
1202
+ "sl-SI",
1203
+ "sr-RS",
1204
+ "sr-RS@latin",
1205
+ "sv-SE",
1206
+ "ta-IN",
1207
+ "te-IN",
1208
+ "tr-TR",
1209
+ "uk-UA",
1210
+ "vi-VN"
1211
+ ];
1212
+ for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) decimal[dotDecimal[_i4]] = decimal["en-US"];
1213
+ for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) decimal[commaDecimal[_i5]] = ",";
1214
+ alpha["fr-CA"] = alpha["fr-FR"];
1184
1215
  alphanumeric["fr-CA"] = alphanumeric["fr-FR"];
1216
+ alpha["pt-BR"] = alpha["pt-PT"];
1185
1217
  alphanumeric["pt-BR"] = alphanumeric["pt-PT"];
1218
+ decimal["pt-BR"] = decimal["pt-PT"];
1219
+ alpha["pl-Pl"] = alpha["pl-PL"];
1186
1220
  alphanumeric["pl-Pl"] = alphanumeric["pl-PL"];
1221
+ decimal["pl-Pl"] = decimal["pl-PL"];
1222
+ alpha["fa-AF"] = alpha.fa;
1223
+ //#endregion
1224
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isAlphanumeric.js
1187
1225
  function isAlphanumeric(_str) {
1188
- var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
1189
- var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1190
- assertString(_str);
1191
- var str = _str;
1192
- var ignore = options.ignore;
1193
- if (ignore) {
1194
- if (ignore instanceof RegExp) {
1195
- str = str.replace(ignore, "");
1196
- } else if (typeof ignore === "string") {
1197
- str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
1198
- } else {
1199
- throw new Error("ignore should be instance of a String or RegExp");
1200
- }
1201
- }
1202
- if (locale in alphanumeric) {
1203
- return alphanumeric[locale].test(str);
1204
- }
1205
- throw new Error("Invalid locale '".concat(locale, "'"));
1226
+ var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
1227
+ var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1228
+ assertString(_str);
1229
+ var str = _str;
1230
+ var ignore = options.ignore;
1231
+ if (ignore) if (ignore instanceof RegExp) str = str.replace(ignore, "");
1232
+ else if (typeof ignore === "string") str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
1233
+ else throw new Error("ignore should be instance of a String or RegExp");
1234
+ if (locale in alphanumeric) return alphanumeric[locale].test(str);
1235
+ throw new Error("Invalid locale '".concat(locale, "'"));
1206
1236
  }
1207
- const __default__$6 = {
1208
- name: "RegisterForm"
1209
- };
1210
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1211
- ...__default__$6,
1212
- props: {
1213
- useUsername: { type: Boolean },
1214
- extraFields: { default: void 0 },
1215
- minimumPasswordLength: { default: 8 },
1216
- form: { default: void 0 },
1217
- input: { default: void 0 },
1218
- icons: { default: () => ({
1219
- visibility: "visibility",
1220
- visibilityOff: "visibility_off"
1221
- }) }
1222
- },
1223
- emits: ["submit"],
1224
- setup(__props, { expose: __expose, emit: __emit }) {
1225
- const props = __props;
1226
- const emit = __emit;
1227
- const $q = useQuasar();
1228
- const lang2 = useLang();
1229
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1230
- watch($q.lang, (val) => {
1231
- loadLang($q.lang.isoName);
1232
- });
1233
- const email = ref("");
1234
- const password = ref("");
1235
- const repeatPassword = ref("");
1236
- const extraFieldValues = ref({});
1237
- const username = ref("");
1238
- const showPassword = ref(false);
1239
- const header = computed(() => lang2.value.register.register);
1240
- const forgotPassword = computed(() => lang2.value.register.forgotPassword);
1241
- const accountCreated = computed(() => lang2.value.register.accountCreated);
1242
- const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
1243
- const alreadyRegistered = computed(() => lang2.value.register.alreadyRegistered);
1244
- const minimumPasswordLength = toRef(props, "minimumPasswordLength");
1245
- const formRef = ref();
1246
- const validations = computed(() => ({
1247
- email: [
1248
- (val) => !!val || lang2.value.register.validations.fieldRequired,
1249
- (val) => isEmail(val) || lang2.value.register.validations.invalidEmail
1250
- ],
1251
- username: [
1252
- (val) => !!val || lang2.value.register.validations.fieldRequired,
1253
- (val) => isAlphanumeric(val) || lang2.value.register.validations.notAlphaNumeric
1254
- ],
1255
- password: [
1256
- (val) => !!val || lang2.value.password.validations.fieldRequired,
1257
- (val) => val.length >= minimumPasswordLength.value || lang2.value.password.validations.minimumPasswordLength(
1258
- minimumPasswordLength.value
1259
- )
1260
- ],
1261
- repeatPassword: [
1262
- (val) => !!val || lang2.value.password.validations.fieldRequired,
1263
- (val) => equals(val, password.value) || lang2.value.password.validations.passwordsDoNotMatch
1264
- ]
1265
- }));
1266
- const submit = (evt) => {
1267
- formRef.value?.validate().then((success) => {
1268
- if (success) {
1269
- emit("submit", {
1270
- email: email.value.trim(),
1271
- password: password.value,
1272
- username: username.value.trim(),
1273
- extraFields: extraFieldValues.value,
1274
- done: evt.done
1275
- });
1276
- } else evt.done();
1277
- });
1278
- };
1279
- const variables = ref({
1280
- header,
1281
- forgotPassword,
1282
- accountCreated,
1283
- unprocessableRequest,
1284
- alreadyRegistered
1285
- });
1286
- const functions = ref({
1287
- submit
1288
- });
1289
- __expose({
1290
- variables,
1291
- functions
1292
- });
1293
- return (_ctx, _cache) => {
1294
- const _component_q_input = QInput;
1295
- const _component_q_icon = QIcon;
1296
- return openBlock(), createBlock(unref(QForm), mergeProps({
1297
- ref_key: "formRef",
1298
- ref: formRef,
1299
- class: "q-gutter-md"
1300
- }, __props.form, {
1301
- onSubmit: _cache[6] || (_cache[6] = (e) => submit)
1302
- }), {
1303
- default: withCtx(() => [
1304
- !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
1305
- id: "email",
1306
- modelValue: email.value,
1307
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
1308
- name: "email",
1309
- label: unref(lang2).register.fields.email,
1310
- "bottom-slots": "",
1311
- rules: validations.value["email"],
1312
- "lazy-rules": ""
1313
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1314
- __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
1315
- id: "username",
1316
- modelValue: username.value,
1317
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
1318
- name: "username",
1319
- label: unref(lang2).register.fields.username,
1320
- "bottom-slots": "",
1321
- rules: validations.value["username"],
1322
- "lazy-rules": ""
1323
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1324
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.extraFields, (field) => {
1325
- return openBlock(), createBlock(_component_q_input, {
1326
- key: field.name,
1327
- modelValue: extraFieldValues.value[field.name],
1328
- "onUpdate:modelValue": ($event) => extraFieldValues.value[field.name] = $event,
1329
- type: "text",
1330
- name: field.name,
1331
- label: field.label,
1332
- rules: field.rules,
1333
- "bottom-slots": ""
1334
- }, null, 8, ["modelValue", "onUpdate:modelValue", "name", "label", "rules"]);
1335
- }), 128)),
1336
- createVNode(_component_q_input, mergeProps(__props.input, {
1337
- id: "password",
1338
- modelValue: password.value,
1339
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
1340
- name: "password",
1341
- type: showPassword.value ? "text" : "password",
1342
- label: unref(lang2).register.fields.password,
1343
- rules: validations.value["password"],
1344
- "lazy-rules": "",
1345
- "bottom-slots": ""
1346
- }), {
1347
- append: withCtx(() => [
1348
- createVNode(_component_q_icon, {
1349
- name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1350
- class: "cursor-pointer",
1351
- onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1352
- }, null, 8, ["name"])
1353
- ]),
1354
- _: 1
1355
- }, 16, ["modelValue", "type", "label", "rules"]),
1356
- createVNode(_component_q_input, {
1357
- id: "repeatPassword",
1358
- modelValue: repeatPassword.value,
1359
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => repeatPassword.value = $event),
1360
- type: showPassword.value ? "text" : "password",
1361
- label: unref(lang2).register.fields.repeatPassword,
1362
- "bottom-slots": "",
1363
- required: "",
1364
- rules: validations.value["repeatPassword"],
1365
- "lazy-rules": ""
1366
- }, {
1367
- append: withCtx(() => [
1368
- createVNode(_component_q_icon, {
1369
- name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1370
- class: "cursor-pointer",
1371
- onClick: _cache[4] || (_cache[4] = ($event) => showPassword.value = !showPassword.value)
1372
- }, null, 8, ["name"])
1373
- ]),
1374
- _: 1
1375
- }, 8, ["modelValue", "type", "label", "rules"]),
1376
- renderSlot(_ctx.$slots, "default", { submit })
1377
- ]),
1378
- _: 3
1379
- }, 16);
1380
- };
1381
- }
1237
+ //#endregion
1238
+ //#region src/ui/authentication/RegisterForm.vue
1239
+ var RegisterForm_default = /* @__PURE__ */ defineComponent({
1240
+ name: "RegisterForm",
1241
+ props: {
1242
+ useUsername: { type: Boolean },
1243
+ extraFields: { default: void 0 },
1244
+ minimumPasswordLength: { default: 8 },
1245
+ form: { default: void 0 },
1246
+ input: { default: void 0 },
1247
+ icons: { default: () => ({
1248
+ visibility: "visibility",
1249
+ visibilityOff: "visibility_off"
1250
+ }) }
1251
+ },
1252
+ emits: ["submit"],
1253
+ setup(__props, { expose: __expose, emit: __emit }) {
1254
+ const props = __props;
1255
+ const emit = __emit;
1256
+ const $q = useQuasar();
1257
+ const lang = useLang();
1258
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1259
+ watch($q.lang, (val) => {
1260
+ loadLang($q.lang.isoName);
1261
+ });
1262
+ const email = ref("");
1263
+ const password = ref("");
1264
+ const repeatPassword = ref("");
1265
+ const extraFieldValues = ref({});
1266
+ const username = ref("");
1267
+ const showPassword = ref(false);
1268
+ const header = computed(() => lang.value.register.register);
1269
+ const forgotPassword = computed(() => lang.value.register.forgotPassword);
1270
+ const accountCreated = computed(() => lang.value.register.accountCreated);
1271
+ const unprocessableRequest = computed(() => lang.value.unprocessableRequest);
1272
+ const alreadyRegistered = computed(() => lang.value.register.alreadyRegistered);
1273
+ const minimumPasswordLength = toRef(props, "minimumPasswordLength");
1274
+ const formRef = ref();
1275
+ const validations = computed(() => ({
1276
+ email: [(val) => !!val || lang.value.register.validations.fieldRequired, (val) => isEmail(val) || lang.value.register.validations.invalidEmail],
1277
+ username: [(val) => !!val || lang.value.register.validations.fieldRequired, (val) => isAlphanumeric(val) || lang.value.register.validations.notAlphaNumeric],
1278
+ password: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => val.length >= minimumPasswordLength.value || lang.value.password.validations.minimumPasswordLength(minimumPasswordLength.value)],
1279
+ repeatPassword: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => equals(val, password.value) || lang.value.password.validations.passwordsDoNotMatch]
1280
+ }));
1281
+ const submit = (evt) => {
1282
+ formRef.value?.validate().then((success) => {
1283
+ if (success) emit("submit", {
1284
+ email: email.value.trim(),
1285
+ password: password.value,
1286
+ username: username.value.trim(),
1287
+ extraFields: extraFieldValues.value,
1288
+ done: evt.done
1289
+ });
1290
+ else evt.done();
1291
+ });
1292
+ };
1293
+ __expose({
1294
+ variables: ref({
1295
+ header,
1296
+ forgotPassword,
1297
+ accountCreated,
1298
+ unprocessableRequest,
1299
+ alreadyRegistered
1300
+ }),
1301
+ functions: ref({ submit })
1302
+ });
1303
+ return (_ctx, _cache) => {
1304
+ const _component_q_input = QInput;
1305
+ const _component_q_icon = QIcon;
1306
+ return openBlock(), createBlock(unref(QForm), mergeProps({
1307
+ ref_key: "formRef",
1308
+ ref: formRef,
1309
+ class: "q-gutter-md"
1310
+ }, __props.form, { onSubmit: _cache[6] || (_cache[6] = (e) => submit) }), {
1311
+ default: withCtx(() => [
1312
+ !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
1313
+ id: "email",
1314
+ modelValue: email.value,
1315
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
1316
+ name: "email",
1317
+ label: unref(lang).register.fields.email,
1318
+ "bottom-slots": "",
1319
+ rules: validations.value["email"],
1320
+ "lazy-rules": ""
1321
+ }), null, 16, [
1322
+ "modelValue",
1323
+ "label",
1324
+ "rules"
1325
+ ])) : createCommentVNode("", true),
1326
+ __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
1327
+ id: "username",
1328
+ modelValue: username.value,
1329
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
1330
+ name: "username",
1331
+ label: unref(lang).register.fields.username,
1332
+ "bottom-slots": "",
1333
+ rules: validations.value["username"],
1334
+ "lazy-rules": ""
1335
+ }), null, 16, [
1336
+ "modelValue",
1337
+ "label",
1338
+ "rules"
1339
+ ])) : createCommentVNode("", true),
1340
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.extraFields, (field) => {
1341
+ return openBlock(), createBlock(_component_q_input, {
1342
+ key: field.name,
1343
+ modelValue: extraFieldValues.value[field.name],
1344
+ "onUpdate:modelValue": ($event) => extraFieldValues.value[field.name] = $event,
1345
+ type: "text",
1346
+ name: field.name,
1347
+ label: field.label,
1348
+ rules: field.rules,
1349
+ "bottom-slots": ""
1350
+ }, null, 8, [
1351
+ "modelValue",
1352
+ "onUpdate:modelValue",
1353
+ "name",
1354
+ "label",
1355
+ "rules"
1356
+ ]);
1357
+ }), 128)),
1358
+ createVNode(_component_q_input, mergeProps(__props.input, {
1359
+ id: "password",
1360
+ modelValue: password.value,
1361
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
1362
+ name: "password",
1363
+ type: showPassword.value ? "text" : "password",
1364
+ label: unref(lang).register.fields.password,
1365
+ rules: validations.value["password"],
1366
+ "lazy-rules": "",
1367
+ "bottom-slots": ""
1368
+ }), {
1369
+ append: withCtx(() => [createVNode(_component_q_icon, {
1370
+ name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1371
+ class: "cursor-pointer",
1372
+ onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1373
+ }, null, 8, ["name"])]),
1374
+ _: 1
1375
+ }, 16, [
1376
+ "modelValue",
1377
+ "type",
1378
+ "label",
1379
+ "rules"
1380
+ ]),
1381
+ createVNode(_component_q_input, {
1382
+ id: "repeatPassword",
1383
+ modelValue: repeatPassword.value,
1384
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => repeatPassword.value = $event),
1385
+ type: showPassword.value ? "text" : "password",
1386
+ label: unref(lang).register.fields.repeatPassword,
1387
+ "bottom-slots": "",
1388
+ required: "",
1389
+ rules: validations.value["repeatPassword"],
1390
+ "lazy-rules": ""
1391
+ }, {
1392
+ append: withCtx(() => [createVNode(_component_q_icon, {
1393
+ name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1394
+ class: "cursor-pointer",
1395
+ onClick: _cache[4] || (_cache[4] = ($event) => showPassword.value = !showPassword.value)
1396
+ }, null, 8, ["name"])]),
1397
+ _: 1
1398
+ }, 8, [
1399
+ "modelValue",
1400
+ "type",
1401
+ "label",
1402
+ "rules"
1403
+ ]),
1404
+ renderSlot(_ctx.$slots, "default", { submit })
1405
+ ]),
1406
+ _: 3
1407
+ }, 16);
1408
+ };
1409
+ }
1382
1410
  });
1383
- const __default__$5 = {
1384
- name: "VerificationSlider"
1385
- };
1386
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1387
- ...__default__$5,
1388
- props: {
1389
- useVerificationSlider: { type: Boolean }
1390
- },
1391
- emits: ["verified"],
1392
- setup(__props, { expose: __expose, emit: __emit }) {
1393
- const emit = __emit;
1394
- const $q = useQuasar();
1395
- const lang2 = useLang();
1396
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1397
- watch($q.lang, (val) => {
1398
- loadLang($q.lang.isoName);
1399
- });
1400
- const sliderValue = ref(0);
1401
- const sliderColor = ref("red");
1402
- const completed = ref(false);
1403
- watch(sliderValue, (newVal, oldVal) => {
1404
- if (newVal > 80) {
1405
- sliderColor.value = "green";
1406
- setTimeout(() => {
1407
- sliderValue.value = 100;
1408
- completed.value = true;
1409
- }, 500);
1410
- emit("verified");
1411
- }
1412
- });
1413
- const variables = ref({
1414
- // header: lang.value.some.nested.prop
1415
- });
1416
- const functions = ref({
1417
- // submit
1418
- });
1419
- __expose({
1420
- variables,
1421
- functions
1422
- });
1423
- return (_ctx, _cache) => {
1424
- const _component_q_slider = QSlider;
1425
- return openBlock(), createElementBlock(Fragment, null, [
1426
- createTextVNode(toDisplayString(unref(lang2).verification.slider) + " ", 1),
1427
- createVNode(_component_q_slider, {
1428
- modelValue: sliderValue.value,
1429
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sliderValue.value = $event),
1430
- color: sliderColor.value,
1431
- readonly: completed.value
1432
- }, null, 8, ["modelValue", "color", "readonly"])
1433
- ], 64);
1434
- };
1435
- }
1411
+ //#endregion
1412
+ //#region src/ui/authentication/VerificationSlider.vue
1413
+ var VerificationSlider_default = /* @__PURE__ */ defineComponent({
1414
+ name: "VerificationSlider",
1415
+ props: { useVerificationSlider: { type: Boolean } },
1416
+ emits: ["verified"],
1417
+ setup(__props, { expose: __expose, emit: __emit }) {
1418
+ const emit = __emit;
1419
+ const $q = useQuasar();
1420
+ const lang = useLang();
1421
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1422
+ watch($q.lang, (val) => {
1423
+ loadLang($q.lang.isoName);
1424
+ });
1425
+ const sliderValue = ref(0);
1426
+ const sliderColor = ref("red");
1427
+ const completed = ref(false);
1428
+ watch(sliderValue, (newVal, oldVal) => {
1429
+ if (newVal > 80) {
1430
+ sliderColor.value = "green";
1431
+ setTimeout(() => {
1432
+ sliderValue.value = 100;
1433
+ completed.value = true;
1434
+ }, 500);
1435
+ emit("verified");
1436
+ }
1437
+ });
1438
+ __expose({
1439
+ variables: ref({}),
1440
+ functions: ref({})
1441
+ });
1442
+ return (_ctx, _cache) => {
1443
+ const _component_q_slider = QSlider;
1444
+ return openBlock(), createElementBlock(Fragment, null, [createTextVNode(toDisplayString(unref(lang).verification.slider) + " ", 1), createVNode(_component_q_slider, {
1445
+ modelValue: sliderValue.value,
1446
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sliderValue.value = $event),
1447
+ color: sliderColor.value,
1448
+ readonly: completed.value
1449
+ }, null, 8, [
1450
+ "modelValue",
1451
+ "color",
1452
+ "readonly"
1453
+ ])], 64);
1454
+ };
1455
+ }
1436
1456
  });
1437
- const __default__$4 = {
1438
- name: "ConsentList"
1439
- };
1440
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1441
- ...__default__$4,
1442
- props: {
1443
- scopes: {},
1444
- claims: {},
1445
- resourceScopes: {},
1446
- icons: {}
1447
- },
1448
- setup(__props, { expose: __expose }) {
1449
- const props = __props;
1450
- const { icons } = toRefs(props);
1451
- const $q = useQuasar();
1452
- const lang2 = useLang();
1453
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1454
- watch($q.lang, (val) => {
1455
- loadLang($q.lang.isoName);
1456
- });
1457
- const message = computed(() => lang2.value.consent.message);
1458
- const allow = computed(() => lang2.value.consent.allow);
1459
- const deny = computed(() => lang2.value.consent.deny);
1460
- const checkIcon = icons.value?.check ?? "check";
1461
- const variables = ref({
1462
- message,
1463
- allow,
1464
- deny
1465
- });
1466
- const functions = ref({
1467
- // submit
1468
- });
1469
- __expose({
1470
- variables,
1471
- functions
1472
- });
1473
- return (_ctx, _cache) => {
1474
- const _component_q_icon = QIcon;
1475
- const _component_q_item_section = QItemSection;
1476
- const _component_q_item = QItem;
1477
- const _component_q_list = QList;
1478
- return openBlock(), createBlock(_component_q_list, null, {
1479
- default: withCtx(() => [
1480
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.scopes, (scope) => {
1481
- return openBlock(), createBlock(_component_q_item, {
1482
- key: scope.name
1483
- }, {
1484
- default: withCtx(() => [
1485
- createVNode(_component_q_item_section, { avatar: "" }, {
1486
- default: withCtx(() => [
1487
- createVNode(_component_q_icon, {
1488
- color: "green",
1489
- name: unref(checkIcon)
1490
- }, null, 8, ["name"])
1491
- ]),
1492
- _: 1
1493
- }),
1494
- createVNode(_component_q_item_section, null, {
1495
- default: withCtx(() => [
1496
- createTextVNode(toDisplayString(scope.name), 1)
1497
- ]),
1498
- _: 2
1499
- }, 1024)
1500
- ]),
1501
- _: 2
1502
- }, 1024);
1503
- }), 128)),
1504
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.claims, (claim) => {
1505
- return openBlock(), createBlock(_component_q_item, {
1506
- key: claim.name
1507
- }, {
1508
- default: withCtx(() => [
1509
- createVNode(_component_q_item_section, { avatar: "" }, {
1510
- default: withCtx(() => [
1511
- createVNode(_component_q_icon, {
1512
- color: "green",
1513
- name: unref(checkIcon)
1514
- }, null, 8, ["name"])
1515
- ]),
1516
- _: 1
1517
- }),
1518
- createVNode(_component_q_item_section, null, {
1519
- default: withCtx(() => [
1520
- createTextVNode(toDisplayString(claim.name), 1)
1521
- ]),
1522
- _: 2
1523
- }, 1024)
1524
- ]),
1525
- _: 2
1526
- }, 1024);
1527
- }), 128)),
1528
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.resourceScopes, (resourceScope) => {
1529
- return openBlock(), createBlock(_component_q_item, {
1530
- key: resourceScope.name
1531
- }, {
1532
- default: withCtx(() => [
1533
- createVNode(_component_q_item_section, { avatar: "" }, {
1534
- default: withCtx(() => [
1535
- createVNode(_component_q_icon, {
1536
- color: "green",
1537
- name: unref(checkIcon)
1538
- }, null, 8, ["name"])
1539
- ]),
1540
- _: 1
1541
- }),
1542
- createVNode(_component_q_item_section, null, {
1543
- default: withCtx(() => [
1544
- createTextVNode(toDisplayString(resourceScope.name), 1)
1545
- ]),
1546
- _: 2
1547
- }, 1024)
1548
- ]),
1549
- _: 2
1550
- }, 1024);
1551
- }), 128))
1552
- ]),
1553
- _: 1
1554
- });
1555
- };
1556
- }
1457
+ //#endregion
1458
+ //#region src/ui/authentication/ConsentList.vue
1459
+ var ConsentList_default = /* @__PURE__ */ defineComponent({
1460
+ name: "ConsentList",
1461
+ props: {
1462
+ scopes: {},
1463
+ claims: {},
1464
+ resourceScopes: {},
1465
+ icons: {}
1466
+ },
1467
+ setup(__props, { expose: __expose }) {
1468
+ const { icons } = toRefs(__props);
1469
+ const $q = useQuasar();
1470
+ const lang = useLang();
1471
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1472
+ watch($q.lang, (val) => {
1473
+ loadLang($q.lang.isoName);
1474
+ });
1475
+ const message = computed(() => lang.value.consent.message);
1476
+ const allow = computed(() => lang.value.consent.allow);
1477
+ const deny = computed(() => lang.value.consent.deny);
1478
+ const checkIcon = icons.value?.check ?? "check";
1479
+ __expose({
1480
+ variables: ref({
1481
+ message,
1482
+ allow,
1483
+ deny
1484
+ }),
1485
+ functions: ref({})
1486
+ });
1487
+ return (_ctx, _cache) => {
1488
+ const _component_q_icon = QIcon;
1489
+ const _component_q_item_section = QItemSection;
1490
+ const _component_q_item = QItem;
1491
+ const _component_q_list = QList;
1492
+ return openBlock(), createBlock(_component_q_list, null, {
1493
+ default: withCtx(() => [
1494
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.scopes, (scope) => {
1495
+ return openBlock(), createBlock(_component_q_item, { key: scope.name }, {
1496
+ default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
1497
+ default: withCtx(() => [createVNode(_component_q_icon, {
1498
+ color: "green",
1499
+ name: unref(checkIcon)
1500
+ }, null, 8, ["name"])]),
1501
+ _: 1
1502
+ }), createVNode(_component_q_item_section, null, {
1503
+ default: withCtx(() => [createTextVNode(toDisplayString(scope.name), 1)]),
1504
+ _: 2
1505
+ }, 1024)]),
1506
+ _: 2
1507
+ }, 1024);
1508
+ }), 128)),
1509
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.claims, (claim) => {
1510
+ return openBlock(), createBlock(_component_q_item, { key: claim.name }, {
1511
+ default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
1512
+ default: withCtx(() => [createVNode(_component_q_icon, {
1513
+ color: "green",
1514
+ name: unref(checkIcon)
1515
+ }, null, 8, ["name"])]),
1516
+ _: 1
1517
+ }), createVNode(_component_q_item_section, null, {
1518
+ default: withCtx(() => [createTextVNode(toDisplayString(claim.name), 1)]),
1519
+ _: 2
1520
+ }, 1024)]),
1521
+ _: 2
1522
+ }, 1024);
1523
+ }), 128)),
1524
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.resourceScopes, (resourceScope) => {
1525
+ return openBlock(), createBlock(_component_q_item, { key: resourceScope.name }, {
1526
+ default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
1527
+ default: withCtx(() => [createVNode(_component_q_icon, {
1528
+ color: "green",
1529
+ name: unref(checkIcon)
1530
+ }, null, 8, ["name"])]),
1531
+ _: 1
1532
+ }), createVNode(_component_q_item_section, null, {
1533
+ default: withCtx(() => [createTextVNode(toDisplayString(resourceScope.name), 1)]),
1534
+ _: 2
1535
+ }, 1024)]),
1536
+ _: 2
1537
+ }, 1024);
1538
+ }), 128))
1539
+ ]),
1540
+ _: 1
1541
+ });
1542
+ };
1543
+ }
1557
1544
  });
1558
- const __default__$3 = {
1559
- name: "UserMenuButton"
1560
- };
1561
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1562
- ...__default__$3,
1563
- props: {
1564
- userRoute: {},
1565
- icons: {}
1566
- },
1567
- emits: ["signOut"],
1568
- setup(__props, { expose: __expose, emit: __emit }) {
1569
- const props = __props;
1570
- const { icons } = toRefs(props);
1571
- const emit = __emit;
1572
- const $q = useQuasar();
1573
- const lang2 = useLang();
1574
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1575
- watch($q.lang, (val) => {
1576
- loadLang($q.lang.isoName);
1577
- });
1578
- const personIcon = icons.value?.person ?? "person";
1579
- const variables = ref({
1580
- // header: lang.value.some.nested.prop
1581
- });
1582
- const functions = ref({
1583
- // submit
1584
- });
1585
- __expose({
1586
- variables,
1587
- functions
1588
- });
1589
- return (_ctx, _cache) => {
1590
- const _component_q_item_section = QItemSection;
1591
- const _component_q_item = QItem;
1592
- const _component_q_list = QList;
1593
- const _component_q_menu = QMenu;
1594
- const _component_q_btn = QBtn;
1595
- return openBlock(), createBlock(_component_q_btn, {
1596
- icon: unref(personIcon),
1597
- round: ""
1598
- }, {
1599
- default: withCtx(() => [
1600
- createVNode(_component_q_menu, null, {
1601
- default: withCtx(() => [
1602
- createVNode(_component_q_list, null, {
1603
- default: withCtx(() => [
1604
- createVNode(_component_q_item, { to: __props.userRoute }, {
1605
- default: withCtx(() => [
1606
- createVNode(_component_q_item_section, null, {
1607
- default: withCtx(() => [
1608
- createTextVNode(toDisplayString(unref(lang2).myAccount), 1)
1609
- ]),
1610
- _: 1
1611
- })
1612
- ]),
1613
- _: 1
1614
- }, 8, ["to"]),
1615
- renderSlot(_ctx.$slots, "default"),
1616
- createVNode(_component_q_item, {
1617
- clickable: "",
1618
- onClick: _cache[0] || (_cache[0] = ($event) => emit("signOut"))
1619
- }, {
1620
- default: withCtx(() => [
1621
- createVNode(_component_q_item_section, null, {
1622
- default: withCtx(() => [
1623
- createTextVNode(toDisplayString(unref(lang2).signOut), 1)
1624
- ]),
1625
- _: 1
1626
- })
1627
- ]),
1628
- _: 1
1629
- })
1630
- ]),
1631
- _: 3
1632
- })
1633
- ]),
1634
- _: 3
1635
- })
1636
- ]),
1637
- _: 3
1638
- }, 8, ["icon"]);
1639
- };
1640
- }
1545
+ //#endregion
1546
+ //#region src/ui/authentication/UserMenuButton.vue
1547
+ var UserMenuButton_default = /* @__PURE__ */ defineComponent({
1548
+ name: "UserMenuButton",
1549
+ props: {
1550
+ userRoute: {},
1551
+ icons: {}
1552
+ },
1553
+ emits: ["signOut"],
1554
+ setup(__props, { expose: __expose, emit: __emit }) {
1555
+ const { icons } = toRefs(__props);
1556
+ const emit = __emit;
1557
+ const $q = useQuasar();
1558
+ const lang = useLang();
1559
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1560
+ watch($q.lang, (val) => {
1561
+ loadLang($q.lang.isoName);
1562
+ });
1563
+ const personIcon = icons.value?.person ?? "person";
1564
+ __expose({
1565
+ variables: ref({}),
1566
+ functions: ref({})
1567
+ });
1568
+ return (_ctx, _cache) => {
1569
+ const _component_q_item_section = QItemSection;
1570
+ const _component_q_item = QItem;
1571
+ const _component_q_list = QList;
1572
+ const _component_q_menu = QMenu;
1573
+ const _component_q_btn = QBtn;
1574
+ return openBlock(), createBlock(_component_q_btn, {
1575
+ icon: unref(personIcon),
1576
+ round: ""
1577
+ }, {
1578
+ default: withCtx(() => [createVNode(_component_q_menu, null, {
1579
+ default: withCtx(() => [createVNode(_component_q_list, null, {
1580
+ default: withCtx(() => [
1581
+ createVNode(_component_q_item, { to: __props.userRoute }, {
1582
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1583
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).myAccount), 1)]),
1584
+ _: 1
1585
+ })]),
1586
+ _: 1
1587
+ }, 8, ["to"]),
1588
+ renderSlot(_ctx.$slots, "default"),
1589
+ createVNode(_component_q_item, {
1590
+ clickable: "",
1591
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("signOut"))
1592
+ }, {
1593
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1594
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).signOut), 1)]),
1595
+ _: 1
1596
+ })]),
1597
+ _: 1
1598
+ })
1599
+ ]),
1600
+ _: 3
1601
+ })]),
1602
+ _: 3
1603
+ })]),
1604
+ _: 3
1605
+ }, 8, ["icon"]);
1606
+ };
1607
+ }
1641
1608
  });
1642
- const _hoisted_1$2 = { key: 0 };
1643
- const _hoisted_2 = { key: 1 };
1644
- const __default__$2 = {
1645
- name: "LoginButton"
1646
- };
1647
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1648
- ...__default__$2,
1649
- props: {
1650
- withNetwork: {}
1651
- },
1652
- setup(__props) {
1653
- const $q = useQuasar();
1654
- const lang2 = useLang();
1655
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1656
- watch($q.lang, (val) => {
1657
- loadLang($q.lang.isoName);
1658
- });
1659
- return (_ctx, _cache) => {
1660
- return openBlock(), createBlock(_sfc_main$f, null, {
1661
- default: withCtx(() => [
1662
- renderSlot(_ctx.$slots, "icon"),
1663
- __props.withNetwork ? (openBlock(), createElementBlock("div", _hoisted_1$2, toDisplayString(unref(lang2).login.loginWith) + " " + toDisplayString(__props.withNetwork), 1)) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(lang2).login.login), 1))
1664
- ]),
1665
- _: 3
1666
- });
1667
- };
1668
- }
1609
+ //#endregion
1610
+ //#region src/ui/authentication/LoginButton.vue?vue&type=script&setup=true&lang.ts
1611
+ var _hoisted_1$2 = { key: 0 };
1612
+ var _hoisted_2 = { key: 1 };
1613
+ //#endregion
1614
+ //#region src/ui/authentication/LoginButton.vue
1615
+ var LoginButton_default = /* @__PURE__ */ defineComponent({
1616
+ name: "LoginButton",
1617
+ props: { withNetwork: {} },
1618
+ setup(__props) {
1619
+ const $q = useQuasar();
1620
+ const lang = useLang();
1621
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1622
+ watch($q.lang, (val) => {
1623
+ loadLang($q.lang.isoName);
1624
+ });
1625
+ return (_ctx, _cache) => {
1626
+ return openBlock(), createBlock(QSubmitButton_default, null, {
1627
+ default: withCtx(() => [renderSlot(_ctx.$slots, "icon"), __props.withNetwork ? (openBlock(), createElementBlock("div", _hoisted_1$2, toDisplayString(unref(lang).login.loginWith) + " " + toDisplayString(__props.withNetwork), 1)) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(lang).login.login), 1))]),
1628
+ _: 3
1629
+ });
1630
+ };
1631
+ }
1669
1632
  });
1670
- const _hoisted_1$1 = { class: "q-pa-sm" };
1671
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1672
- __name: "AccountsTable",
1673
- props: {
1674
- modelValue: {},
1675
- count: {},
1676
- pagination: {},
1677
- mappedRoles: {},
1678
- columns: {},
1679
- icons: {}
1680
- },
1681
- emits: ["update:pagination", "update:criteria", "addRole", "removeRole"],
1682
- setup(__props, { emit: __emit }) {
1683
- const props = __props;
1684
- const emit = __emit;
1685
- const { modelValue, count, mappedRoles, columns, icons } = toRefs(props);
1686
- const lang2 = useLang();
1687
- const $q = useQuasar();
1688
- const sortBy = ref(props.pagination.sortBy);
1689
- const descending = ref(props.pagination.descending);
1690
- const rowsPerPage = ref(props.pagination.limit);
1691
- const page = ref(props.pagination.offset / props.pagination.limit + 1);
1692
- const name = ref("");
1693
- const email = ref("");
1694
- const roles = ref([]);
1695
- const criteria = computed(() => ({
1696
- name: name.value,
1697
- email: email.value,
1698
- roles: roles.value
1699
- }));
1700
- const tablePagination = computed({
1701
- // getter
1702
- get() {
1703
- return {
1704
- sortBy: sortBy.value,
1705
- descending: descending.value,
1706
- page: page.value,
1707
- rowsPerPage: rowsPerPage.value,
1708
- rowsNumber: count.value || 0
1709
- };
1710
- },
1711
- // setter
1712
- set(newValue) {
1713
- sortBy.value = newValue.sortBy;
1714
- descending.value = newValue.descending;
1715
- page.value = newValue.page;
1716
- rowsPerPage.value = newValue.rowsPerPage;
1717
- }
1718
- });
1719
- watch(criteria, () => emit("update:criteria", criteria.value));
1720
- const onRequest = ({ pagination }) => {
1721
- descending.value = pagination.descending;
1722
- sortBy.value = pagination.sortBy;
1723
- page.value = pagination.page;
1724
- rowsPerPage.value = pagination.rowsPerPage;
1725
- emit("update:pagination", {
1726
- limit: rowsPerPage.value,
1727
- offset: (page.value - 1) * rowsPerPage.value,
1728
- sortBy: sortBy.value,
1729
- descending: descending.value
1730
- });
1731
- return;
1732
- };
1733
- const accountColumns = ref([
1734
- {
1735
- name: "id",
1736
- required: true,
1737
- label: "#",
1738
- align: "left",
1739
- field: (row) => row.id,
1740
- format: (val) => `${val}`,
1741
- sortable: true
1742
- },
1743
- {
1744
- name: "name",
1745
- required: true,
1746
- label: lang2.value.account.fields.name,
1747
- align: "left",
1748
- field: (row) => row.name,
1749
- format: (val) => `${val || ""}`,
1750
- sortable: false
1751
- },
1752
- {
1753
- name: "email",
1754
- required: true,
1755
- label: lang2.value.account.fields.email,
1756
- align: "left",
1757
- field: (row) => row.email,
1758
- format: (val) => `${val}`,
1759
- sortable: false
1760
- },
1761
- {
1762
- name: "roles",
1763
- required: true,
1764
- label: lang2.value.account.fields.roles,
1765
- align: "right",
1766
- field: (row) => row.roles,
1767
- format: (val) => val.map((role) => mappedRoles.value[role]).join(", ")
1768
- }
1769
- ]);
1770
- if (columns?.value) accountColumns.value.push(...columns.value);
1771
- const roleOptions = computed(
1772
- () => Object.entries(mappedRoles.value).map(([key, value]) => ({
1773
- label: value,
1774
- value: key
1775
- }))
1776
- );
1777
- const openAddRoleDialog = (account) => {
1778
- $q.dialog({
1779
- message: lang2.value.account.messages.addRole(account),
1780
- options: {
1781
- type: "radio",
1782
- model: "role",
1783
- items: roleOptions.value.filter(
1784
- (newRole) => !account.roles.includes(newRole.value)
1785
- )
1786
- },
1787
- cancel: true,
1788
- persistent: true
1789
- }).onOk((role) => {
1790
- emit("addRole", { id: account.id, role });
1791
- });
1792
- };
1793
- const openRemoveRoleDialog = (account) => {
1794
- $q.dialog({
1795
- message: lang2.value.account.messages.removeRole(account),
1796
- options: {
1797
- type: "radio",
1798
- model: "role",
1799
- items: account.roles?.map((role) => ({
1800
- label: mappedRoles.value[role],
1801
- value: role
1802
- }))
1803
- },
1804
- cancel: true,
1805
- persistent: true
1806
- }).onOk((role) => {
1807
- emit("removeRole", { id: account.id, role });
1808
- });
1809
- };
1810
- const searchIcon = icons.value?.search ?? "search";
1811
- const cancelIcon = icons.value?.cancel ?? "cancel";
1812
- const moreVertIcon = icons.value?.moreVert ?? "more_vert";
1813
- return (_ctx, _cache) => {
1814
- const _component_q_th = QTh;
1815
- const _component_q_tr = QTr;
1816
- const _component_q_icon = QIcon;
1817
- const _component_q_input = QInput;
1818
- const _component_q_select = QSelect;
1819
- const _component_q_menu = QMenu;
1820
- const _component_q_btn = QBtn;
1821
- const _component_q_td = QTd;
1822
- const _component_q_item_label = QItemLabel;
1823
- const _component_q_item_section = QItemSection;
1824
- const _component_q_item = QItem;
1825
- const _component_q_list = QList;
1826
- return unref(modelValue) ? (openBlock(), createBlock(unref(QTable), {
1827
- key: 0,
1828
- pagination: tablePagination.value,
1829
- "onUpdate:pagination": _cache[6] || (_cache[6] = ($event) => tablePagination.value = $event),
1830
- title: unref(lang2).account.title,
1831
- class: "full-width",
1832
- rows: unref(modelValue),
1833
- columns: accountColumns.value,
1834
- "row-key": "id",
1835
- onRequest
1836
- }, {
1837
- header: withCtx((props2) => [
1838
- createVNode(_component_q_tr, { props: props2 }, {
1839
- default: withCtx(() => [
1840
- (openBlock(true), createElementBlock(Fragment, null, renderList(props2.cols, (col) => {
1841
- return openBlock(), createBlock(_component_q_th, {
1842
- key: col.name,
1843
- props: props2
1844
- }, {
1845
- default: withCtx(() => [
1846
- createTextVNode(toDisplayString(col.label), 1)
1847
- ]),
1848
- _: 2
1849
- }, 1032, ["props"]);
1850
- }), 128))
1851
- ]),
1852
- _: 2
1853
- }, 1032, ["props"])
1854
- ]),
1855
- "top-right": withCtx(() => [
1856
- createVNode(_component_q_btn, {
1857
- icon: unref(searchIcon),
1858
- "data-testid": "search-button"
1859
- }, {
1860
- default: withCtx(() => [
1861
- createVNode(_component_q_menu, null, {
1862
- default: withCtx(() => [
1863
- createElementVNode("div", _hoisted_1$1, [
1864
- createVNode(_component_q_input, {
1865
- modelValue: name.value,
1866
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => name.value = $event),
1867
- label: unref(lang2).account.fields.name
1868
- }, {
1869
- append: withCtx(() => [
1870
- name.value ? (openBlock(), createBlock(_component_q_icon, {
1871
- key: 0,
1872
- class: "q-field__focusable-action",
1873
- role: "button",
1874
- name: unref(cancelIcon),
1875
- onClick: _cache[0] || (_cache[0] = ($event) => name.value = "")
1876
- }, null, 8, ["name"])) : createCommentVNode("", true)
1877
- ]),
1878
- _: 1
1879
- }, 8, ["modelValue", "label"]),
1880
- createVNode(_component_q_input, {
1881
- modelValue: email.value,
1882
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => email.value = $event),
1883
- label: unref(lang2).account.fields.email
1884
- }, {
1885
- append: withCtx(() => [
1886
- email.value ? (openBlock(), createBlock(_component_q_icon, {
1887
- key: 0,
1888
- class: "q-field__focusable-action",
1889
- role: "button",
1890
- name: unref(cancelIcon),
1891
- onClick: _cache[2] || (_cache[2] = ($event) => email.value = "")
1892
- }, null, 8, ["name"])) : createCommentVNode("", true)
1893
- ]),
1894
- _: 1
1895
- }, 8, ["modelValue", "label"]),
1896
- createVNode(_component_q_select, {
1897
- modelValue: roles.value,
1898
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => roles.value = $event),
1899
- multiple: "",
1900
- style: { "min-width": "200px" },
1901
- label: unref(lang2).account.fields.roles,
1902
- options: roleOptions.value,
1903
- "map-options": "",
1904
- "emit-value": ""
1905
- }, {
1906
- append: withCtx(() => [
1907
- roles.value.length ? (openBlock(), createBlock(_component_q_icon, {
1908
- key: 0,
1909
- class: "q-field__focusable-action",
1910
- role: "button",
1911
- name: unref(cancelIcon),
1912
- onClick: _cache[4] || (_cache[4] = ($event) => roles.value = [])
1913
- }, null, 8, ["name"])) : createCommentVNode("", true)
1914
- ]),
1915
- _: 1
1916
- }, 8, ["modelValue", "label", "options"])
1917
- ])
1918
- ]),
1919
- _: 1
1920
- })
1921
- ]),
1922
- _: 1
1923
- }, 8, ["icon"])
1924
- ]),
1925
- body: withCtx((props2) => [
1926
- createVNode(_component_q_tr, { props: props2 }, {
1927
- default: withCtx(() => [
1928
- (openBlock(true), createElementBlock(Fragment, null, renderList(props2.cols, (col) => {
1929
- return openBlock(), createBlock(_component_q_td, {
1930
- key: col.name,
1931
- props: props2
1932
- }, {
1933
- default: withCtx(() => [
1934
- createTextVNode(toDisplayString(col.value), 1)
1935
- ]),
1936
- _: 2
1937
- }, 1032, ["props"]);
1938
- }), 128)),
1939
- createVNode(_component_q_td, { "auto-width": "" }, {
1940
- default: withCtx(() => [
1941
- createVNode(_component_q_btn, {
1942
- size: "sm",
1943
- round: "",
1944
- flat: "",
1945
- icon: unref(moreVertIcon)
1946
- }, {
1947
- default: withCtx(() => [
1948
- createVNode(_component_q_menu, null, {
1949
- default: withCtx(() => [
1950
- createVNode(_component_q_list, null, {
1951
- default: withCtx(() => [
1952
- createVNode(_component_q_item, {
1953
- clickable: "",
1954
- onClick: ($event) => openAddRoleDialog(props2.row)
1955
- }, {
1956
- default: withCtx(() => [
1957
- createVNode(_component_q_item_section, null, {
1958
- default: withCtx(() => [
1959
- createVNode(_component_q_item_label, null, {
1960
- default: withCtx(() => [
1961
- createTextVNode(toDisplayString(unref(lang2).account.labels.addRole), 1)
1962
- ]),
1963
- _: 1
1964
- })
1965
- ]),
1966
- _: 1
1967
- })
1968
- ]),
1969
- _: 1
1970
- }, 8, ["onClick"]),
1971
- createVNode(_component_q_item, {
1972
- clickable: "",
1973
- onClick: ($event) => openRemoveRoleDialog(props2.row)
1974
- }, {
1975
- default: withCtx(() => [
1976
- createVNode(_component_q_item_section, null, {
1977
- default: withCtx(() => [
1978
- createVNode(_component_q_item_label, null, {
1979
- default: withCtx(() => [
1980
- createTextVNode(toDisplayString(unref(lang2).account.labels.removeRole), 1)
1981
- ]),
1982
- _: 1
1983
- })
1984
- ]),
1985
- _: 1
1986
- })
1987
- ]),
1988
- _: 1
1989
- }, 8, ["onClick"])
1990
- ]),
1991
- _: 2
1992
- }, 1024)
1993
- ]),
1994
- _: 2
1995
- }, 1024)
1996
- ]),
1997
- _: 2
1998
- }, 1032, ["icon"])
1999
- ]),
2000
- _: 2
2001
- }, 1024)
2002
- ]),
2003
- _: 2
2004
- }, 1032, ["props"])
2005
- ]),
2006
- _: 1
2007
- }, 8, ["pagination", "title", "rows", "columns"])) : createCommentVNode("", true);
2008
- };
2009
- }
1633
+ //#endregion
1634
+ //#region src/ui/authentication/AccountsTable.vue?vue&type=script&setup=true&lang.ts
1635
+ var _hoisted_1$1 = { class: "q-pa-sm" };
1636
+ //#endregion
1637
+ //#region src/ui/authentication/AccountsTable.vue
1638
+ var AccountsTable_default = /* @__PURE__ */ defineComponent({
1639
+ __name: "AccountsTable",
1640
+ props: {
1641
+ modelValue: {},
1642
+ count: {},
1643
+ pagination: {},
1644
+ mappedRoles: {},
1645
+ columns: {},
1646
+ icons: {}
1647
+ },
1648
+ emits: [
1649
+ "update:pagination",
1650
+ "update:criteria",
1651
+ "addRole",
1652
+ "removeRole"
1653
+ ],
1654
+ setup(__props, { emit: __emit }) {
1655
+ const props = __props;
1656
+ const emit = __emit;
1657
+ const { modelValue, count, mappedRoles, columns, icons } = toRefs(props);
1658
+ const lang = useLang();
1659
+ const $q = useQuasar();
1660
+ const sortBy = ref(props.pagination.sortBy);
1661
+ const descending = ref(props.pagination.descending);
1662
+ const rowsPerPage = ref(props.pagination.limit);
1663
+ const page = ref(props.pagination.offset / props.pagination.limit + 1);
1664
+ const name = ref("");
1665
+ const email = ref("");
1666
+ const roles = ref([]);
1667
+ const criteria = computed(() => ({
1668
+ name: name.value,
1669
+ email: email.value,
1670
+ roles: roles.value
1671
+ }));
1672
+ const tablePagination = computed({
1673
+ get() {
1674
+ return {
1675
+ sortBy: sortBy.value,
1676
+ descending: descending.value,
1677
+ page: page.value,
1678
+ rowsPerPage: rowsPerPage.value,
1679
+ rowsNumber: count.value || 0
1680
+ };
1681
+ },
1682
+ set(newValue) {
1683
+ sortBy.value = newValue.sortBy;
1684
+ descending.value = newValue.descending;
1685
+ page.value = newValue.page;
1686
+ rowsPerPage.value = newValue.rowsPerPage;
1687
+ }
1688
+ });
1689
+ watch(criteria, () => emit("update:criteria", criteria.value));
1690
+ const onRequest = ({ pagination }) => {
1691
+ descending.value = pagination.descending;
1692
+ sortBy.value = pagination.sortBy;
1693
+ page.value = pagination.page;
1694
+ rowsPerPage.value = pagination.rowsPerPage;
1695
+ emit("update:pagination", {
1696
+ limit: rowsPerPage.value,
1697
+ offset: (page.value - 1) * rowsPerPage.value,
1698
+ sortBy: sortBy.value,
1699
+ descending: descending.value
1700
+ });
1701
+ };
1702
+ const accountColumns = ref([
1703
+ {
1704
+ name: "id",
1705
+ required: true,
1706
+ label: "#",
1707
+ align: "left",
1708
+ field: (row) => row.id,
1709
+ format: (val) => `${val}`,
1710
+ sortable: true
1711
+ },
1712
+ {
1713
+ name: "name",
1714
+ required: true,
1715
+ label: lang.value.account.fields.name,
1716
+ align: "left",
1717
+ field: (row) => row.name,
1718
+ format: (val) => `${val || ""}`,
1719
+ sortable: false
1720
+ },
1721
+ {
1722
+ name: "email",
1723
+ required: true,
1724
+ label: lang.value.account.fields.email,
1725
+ align: "left",
1726
+ field: (row) => row.email,
1727
+ format: (val) => `${val}`,
1728
+ sortable: false
1729
+ },
1730
+ {
1731
+ name: "roles",
1732
+ required: true,
1733
+ label: lang.value.account.fields.roles,
1734
+ align: "right",
1735
+ field: (row) => row.roles,
1736
+ format: (val) => val.map((role) => mappedRoles.value[role]).join(", ")
1737
+ }
1738
+ ]);
1739
+ if (columns?.value) accountColumns.value.push(...columns.value);
1740
+ const roleOptions = computed(() => Object.entries(mappedRoles.value).map(([key, value]) => ({
1741
+ label: value,
1742
+ value: key
1743
+ })));
1744
+ const openAddRoleDialog = (account) => {
1745
+ $q.dialog({
1746
+ message: lang.value.account.messages.addRole(account),
1747
+ options: {
1748
+ type: "radio",
1749
+ model: "role",
1750
+ items: roleOptions.value.filter((newRole) => !account.roles.includes(newRole.value))
1751
+ },
1752
+ cancel: true,
1753
+ persistent: true
1754
+ }).onOk((role) => {
1755
+ emit("addRole", {
1756
+ id: account.id,
1757
+ role
1758
+ });
1759
+ });
1760
+ };
1761
+ const openRemoveRoleDialog = (account) => {
1762
+ $q.dialog({
1763
+ message: lang.value.account.messages.removeRole(account),
1764
+ options: {
1765
+ type: "radio",
1766
+ model: "role",
1767
+ items: account.roles?.map((role) => ({
1768
+ label: mappedRoles.value[role],
1769
+ value: role
1770
+ }))
1771
+ },
1772
+ cancel: true,
1773
+ persistent: true
1774
+ }).onOk((role) => {
1775
+ emit("removeRole", {
1776
+ id: account.id,
1777
+ role
1778
+ });
1779
+ });
1780
+ };
1781
+ const searchIcon = icons.value?.search ?? "search";
1782
+ const cancelIcon = icons.value?.cancel ?? "cancel";
1783
+ const moreVertIcon = icons.value?.moreVert ?? "more_vert";
1784
+ return (_ctx, _cache) => {
1785
+ const _component_q_th = QTh;
1786
+ const _component_q_tr = QTr;
1787
+ const _component_q_icon = QIcon;
1788
+ const _component_q_input = QInput;
1789
+ const _component_q_select = QSelect;
1790
+ const _component_q_menu = QMenu;
1791
+ const _component_q_btn = QBtn;
1792
+ const _component_q_td = QTd;
1793
+ const _component_q_item_label = QItemLabel;
1794
+ const _component_q_item_section = QItemSection;
1795
+ const _component_q_item = QItem;
1796
+ const _component_q_list = QList;
1797
+ return unref(modelValue) ? (openBlock(), createBlock(unref(QTable), {
1798
+ key: 0,
1799
+ pagination: tablePagination.value,
1800
+ "onUpdate:pagination": _cache[6] || (_cache[6] = ($event) => tablePagination.value = $event),
1801
+ title: unref(lang).account.title,
1802
+ class: "full-width",
1803
+ rows: unref(modelValue),
1804
+ columns: accountColumns.value,
1805
+ "row-key": "id",
1806
+ onRequest
1807
+ }, {
1808
+ header: withCtx((props) => [createVNode(_component_q_tr, { props }, {
1809
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col) => {
1810
+ return openBlock(), createBlock(_component_q_th, {
1811
+ key: col.name,
1812
+ props
1813
+ }, {
1814
+ default: withCtx(() => [createTextVNode(toDisplayString(col.label), 1)]),
1815
+ _: 2
1816
+ }, 1032, ["props"]);
1817
+ }), 128))]),
1818
+ _: 2
1819
+ }, 1032, ["props"])]),
1820
+ "top-right": withCtx(() => [createVNode(_component_q_btn, {
1821
+ icon: unref(searchIcon),
1822
+ "data-testid": "search-button"
1823
+ }, {
1824
+ default: withCtx(() => [createVNode(_component_q_menu, null, {
1825
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [
1826
+ createVNode(_component_q_input, {
1827
+ modelValue: name.value,
1828
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => name.value = $event),
1829
+ label: unref(lang).account.fields.name
1830
+ }, {
1831
+ append: withCtx(() => [name.value ? (openBlock(), createBlock(_component_q_icon, {
1832
+ key: 0,
1833
+ class: "q-field__focusable-action",
1834
+ role: "button",
1835
+ name: unref(cancelIcon),
1836
+ onClick: _cache[0] || (_cache[0] = ($event) => name.value = "")
1837
+ }, null, 8, ["name"])) : createCommentVNode("", true)]),
1838
+ _: 1
1839
+ }, 8, ["modelValue", "label"]),
1840
+ createVNode(_component_q_input, {
1841
+ modelValue: email.value,
1842
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => email.value = $event),
1843
+ label: unref(lang).account.fields.email
1844
+ }, {
1845
+ append: withCtx(() => [email.value ? (openBlock(), createBlock(_component_q_icon, {
1846
+ key: 0,
1847
+ class: "q-field__focusable-action",
1848
+ role: "button",
1849
+ name: unref(cancelIcon),
1850
+ onClick: _cache[2] || (_cache[2] = ($event) => email.value = "")
1851
+ }, null, 8, ["name"])) : createCommentVNode("", true)]),
1852
+ _: 1
1853
+ }, 8, ["modelValue", "label"]),
1854
+ createVNode(_component_q_select, {
1855
+ modelValue: roles.value,
1856
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => roles.value = $event),
1857
+ multiple: "",
1858
+ style: { "min-width": "200px" },
1859
+ label: unref(lang).account.fields.roles,
1860
+ options: roleOptions.value,
1861
+ "map-options": "",
1862
+ "emit-value": ""
1863
+ }, {
1864
+ append: withCtx(() => [roles.value.length ? (openBlock(), createBlock(_component_q_icon, {
1865
+ key: 0,
1866
+ class: "q-field__focusable-action",
1867
+ role: "button",
1868
+ name: unref(cancelIcon),
1869
+ onClick: _cache[4] || (_cache[4] = ($event) => roles.value = [])
1870
+ }, null, 8, ["name"])) : createCommentVNode("", true)]),
1871
+ _: 1
1872
+ }, 8, [
1873
+ "modelValue",
1874
+ "label",
1875
+ "options"
1876
+ ])
1877
+ ])]),
1878
+ _: 1
1879
+ })]),
1880
+ _: 1
1881
+ }, 8, ["icon"])]),
1882
+ body: withCtx((props) => [createVNode(_component_q_tr, { props }, {
1883
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col) => {
1884
+ return openBlock(), createBlock(_component_q_td, {
1885
+ key: col.name,
1886
+ props
1887
+ }, {
1888
+ default: withCtx(() => [createTextVNode(toDisplayString(col.value), 1)]),
1889
+ _: 2
1890
+ }, 1032, ["props"]);
1891
+ }), 128)), createVNode(_component_q_td, { "auto-width": "" }, {
1892
+ default: withCtx(() => [createVNode(_component_q_btn, {
1893
+ size: "sm",
1894
+ round: "",
1895
+ flat: "",
1896
+ icon: unref(moreVertIcon)
1897
+ }, {
1898
+ default: withCtx(() => [createVNode(_component_q_menu, null, {
1899
+ default: withCtx(() => [createVNode(_component_q_list, null, {
1900
+ default: withCtx(() => [createVNode(_component_q_item, {
1901
+ clickable: "",
1902
+ onClick: ($event) => openAddRoleDialog(props.row)
1903
+ }, {
1904
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1905
+ default: withCtx(() => [createVNode(_component_q_item_label, null, {
1906
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).account.labels.addRole), 1)]),
1907
+ _: 1
1908
+ })]),
1909
+ _: 1
1910
+ })]),
1911
+ _: 1
1912
+ }, 8, ["onClick"]), createVNode(_component_q_item, {
1913
+ clickable: "",
1914
+ onClick: ($event) => openRemoveRoleDialog(props.row)
1915
+ }, {
1916
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1917
+ default: withCtx(() => [createVNode(_component_q_item_label, null, {
1918
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).account.labels.removeRole), 1)]),
1919
+ _: 1
1920
+ })]),
1921
+ _: 1
1922
+ })]),
1923
+ _: 1
1924
+ }, 8, ["onClick"])]),
1925
+ _: 2
1926
+ }, 1024)]),
1927
+ _: 2
1928
+ }, 1024)]),
1929
+ _: 2
1930
+ }, 1032, ["icon"])]),
1931
+ _: 2
1932
+ }, 1024)]),
1933
+ _: 2
1934
+ }, 1032, ["props"])]),
1935
+ _: 1
1936
+ }, 8, [
1937
+ "pagination",
1938
+ "title",
1939
+ "rows",
1940
+ "columns"
1941
+ ])) : createCommentVNode("", true);
1942
+ };
1943
+ }
2010
1944
  });
2011
- const _hoisted_1 = ["value"];
2012
- const __default__$1 = {
2013
- name: "LoginForm"
2014
- };
2015
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2016
- ...__default__$1,
2017
- props: {
2018
- form: {},
2019
- action: {},
2020
- xsrfSecret: {}
2021
- },
2022
- setup(__props, { expose: __expose }) {
2023
- const $q = useQuasar();
2024
- const lang2 = useLang();
2025
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
2026
- watch($q.lang, (val) => {
2027
- loadLang($q.lang.isoName);
2028
- });
2029
- const formRef = ref();
2030
- const variables = ref({});
2031
- const functions = ref({});
2032
- __expose({
2033
- variables,
2034
- functions
2035
- });
2036
- return (_ctx, _cache) => {
2037
- return openBlock(), createElementBlock(Fragment, null, [
2038
- createTextVNode(toDisplayString(unref(lang2).logout.confirmation) + " ", 1),
2039
- createVNode(unref(QForm), mergeProps({
2040
- ref_key: "formRef",
2041
- ref: formRef,
2042
- "data-allow-mismatch": "props",
2043
- class: "q-gutter-md"
2044
- }, __props.form, {
2045
- method: "post",
2046
- action: __props.action
2047
- }), {
2048
- default: withCtx(() => [
2049
- createElementVNode("input", {
2050
- type: "hidden",
2051
- name: "xsrf",
2052
- value: __props.xsrfSecret
2053
- }, null, 8, _hoisted_1),
2054
- renderSlot(_ctx.$slots, "default")
2055
- ]),
2056
- _: 3
2057
- }, 16, ["action"])
2058
- ], 64);
2059
- };
2060
- }
1945
+ //#endregion
1946
+ //#region src/ui/authentication/LogoutForm.vue?vue&type=script&setup=true&lang.ts
1947
+ var _hoisted_1 = ["value"];
1948
+ //#endregion
1949
+ //#region src/ui/authentication/LogoutForm.vue
1950
+ var LogoutForm_default = /* @__PURE__ */ defineComponent({
1951
+ name: "LoginForm",
1952
+ props: {
1953
+ form: {},
1954
+ action: {},
1955
+ xsrfSecret: {}
1956
+ },
1957
+ setup(__props, { expose: __expose }) {
1958
+ const $q = useQuasar();
1959
+ const lang = useLang();
1960
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1961
+ watch($q.lang, (val) => {
1962
+ loadLang($q.lang.isoName);
1963
+ });
1964
+ const formRef = ref();
1965
+ __expose({
1966
+ variables: ref({}),
1967
+ functions: ref({})
1968
+ });
1969
+ return (_ctx, _cache) => {
1970
+ return openBlock(), createElementBlock(Fragment, null, [createTextVNode(toDisplayString(unref(lang).logout.confirmation) + " ", 1), createVNode(unref(QForm), mergeProps({
1971
+ ref_key: "formRef",
1972
+ ref: formRef,
1973
+ "data-allow-mismatch": "props",
1974
+ class: "q-gutter-md"
1975
+ }, __props.form, {
1976
+ method: "post",
1977
+ action: __props.action
1978
+ }), {
1979
+ default: withCtx(() => [createElementVNode("input", {
1980
+ type: "hidden",
1981
+ name: "xsrf",
1982
+ value: __props.xsrfSecret
1983
+ }, null, 8, _hoisted_1), renderSlot(_ctx.$slots, "default")]),
1984
+ _: 3
1985
+ }, 16, ["action"])], 64);
1986
+ };
1987
+ }
2061
1988
  });
2062
- const __default__ = {
2063
- name: "LogoutButton"
2064
- };
2065
- const _sfc_main = /* @__PURE__ */ defineComponent({
2066
- ...__default__,
2067
- props: {
2068
- withNetwork: {}
2069
- },
2070
- setup(__props) {
2071
- const $q = useQuasar();
2072
- const lang2 = useLang();
2073
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
2074
- watch($q.lang, (val) => {
2075
- loadLang($q.lang.isoName);
2076
- });
2077
- return (_ctx, _cache) => {
2078
- return openBlock(), createBlock(_sfc_main$f, null, {
2079
- default: withCtx(() => [
2080
- renderSlot(_ctx.$slots, "icon"),
2081
- createTextVNode(" " + toDisplayString(unref(lang2).logout.logout), 1)
2082
- ]),
2083
- _: 3
2084
- });
2085
- };
2086
- }
1989
+ //#endregion
1990
+ //#region src/ui/authentication/LogoutButton.vue
1991
+ var LogoutButton_default = /* @__PURE__ */ defineComponent({
1992
+ name: "LogoutButton",
1993
+ props: { withNetwork: {} },
1994
+ setup(__props) {
1995
+ const $q = useQuasar();
1996
+ const lang = useLang();
1997
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1998
+ watch($q.lang, (val) => {
1999
+ loadLang($q.lang.isoName);
2000
+ });
2001
+ return (_ctx, _cache) => {
2002
+ return openBlock(), createBlock(QSubmitButton_default, null, {
2003
+ default: withCtx(() => [renderSlot(_ctx.$slots, "icon"), createTextVNode(" " + toDisplayString(unref(lang).logout.logout), 1)]),
2004
+ _: 3
2005
+ });
2006
+ };
2007
+ }
2087
2008
  });
2088
- export {
2089
- _sfc_main$2 as AccountsTable,
2090
- _sfc_main$5 as ConsentList,
2091
- _sfc_main$c as EmailChangeForm,
2092
- _sfc_main$b as EmailChangeStepper,
2093
- _sfc_main$3 as LoginButton,
2094
- _sfc_main$8 as LoginForm,
2095
- _sfc_main as LogoutButton,
2096
- _sfc_main$1 as LogoutForm,
2097
- _sfc_main$d as OtpInput,
2098
- _sfc_main$a as PasswordChangeForm,
2099
- _sfc_main$9 as PasswordChangeStepper,
2100
- _sfc_main$7 as RegisterForm,
2101
- _sfc_main$e as RequestOtpForm,
2102
- _sfc_main$4 as UserMenuButton,
2103
- _sfc_main$6 as VerificationSlider,
2104
- loadLang,
2105
- useLang
2106
- };
2009
+ //#endregion
2010
+ export { AccountsTable_default as AccountsTable, ConsentList_default as ConsentList, EmailChangeForm_default as EmailChangeForm, EmailChangeStepper_default as EmailChangeStepper, LoginButton_default as LoginButton, LoginForm_default as LoginForm, LogoutButton_default as LogoutButton, LogoutForm_default as LogoutForm, OtpInput_default as OtpInput, PasswordChangeForm_default as PasswordChangeForm, PasswordChangeStepper_default as PasswordChangeStepper, RegisterForm_default as RegisterForm, RequestOtpForm_default as RequestOtpForm, UserMenuButton_default as UserMenuButton, VerificationSlider_default as VerificationSlider, loadLang, useLang };