@autenticar-me/vue 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/components/AuthSwitcher.vue.d.ts +2 -2
  2. package/dist/components/AuthSwitcher.vue.d.ts.map +1 -0
  3. package/dist/components/Buttons/SignInButton.vue.d.ts +2 -2
  4. package/dist/components/Buttons/SignInButton.vue.d.ts.map +1 -0
  5. package/dist/components/Buttons/SignOutButton.vue.d.ts +2 -2
  6. package/dist/components/Buttons/SignOutButton.vue.d.ts.map +1 -0
  7. package/dist/components/Buttons/SignUpButton.vue.d.ts +2 -2
  8. package/dist/components/Buttons/SignUpButton.vue.d.ts.map +1 -0
  9. package/dist/components/Layout/SignedIn.vue.d.ts +12 -7
  10. package/dist/components/Layout/SignedIn.vue.d.ts.map +1 -0
  11. package/dist/components/Layout/SignedOut.vue.d.ts +12 -7
  12. package/dist/components/Layout/SignedOut.vue.d.ts.map +1 -0
  13. package/dist/components/Modals/Modal.vue.d.ts +15 -10
  14. package/dist/components/Modals/Modal.vue.d.ts.map +1 -0
  15. package/dist/components/Modals/SignInModal.vue.d.ts +4 -4
  16. package/dist/components/Modals/SignInModal.vue.d.ts.map +1 -0
  17. package/dist/components/Modals/SignUpModal.vue.d.ts +4 -4
  18. package/dist/components/Modals/SignUpModal.vue.d.ts.map +1 -0
  19. package/dist/components/Notification.vue.d.ts +3 -3
  20. package/dist/components/Notification.vue.d.ts.map +1 -0
  21. package/dist/components/SignIn.vue.d.ts +7 -4
  22. package/dist/components/SignIn.vue.d.ts.map +1 -0
  23. package/dist/components/SignUp.vue.d.ts +7 -4
  24. package/dist/components/SignUp.vue.d.ts.map +1 -0
  25. package/dist/components/UserProfile.vue.d.ts +4 -2
  26. package/dist/components/UserProfile.vue.d.ts.map +1 -0
  27. package/dist/composables/useAtm.d.ts +5 -4
  28. package/dist/composables/useAtm.d.ts.map +1 -0
  29. package/dist/composables/useAtmClient.d.ts +2 -1
  30. package/dist/composables/useAtmClient.d.ts.map +1 -0
  31. package/dist/composables/useAuth.d.ts +3 -2
  32. package/dist/composables/useAuth.d.ts.map +1 -0
  33. package/dist/index.cjs +2270 -0
  34. package/dist/index.cjs.map +1 -0
  35. package/dist/index.d.ts +18 -16
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +2269 -31
  38. package/dist/index.js.map +1 -0
  39. package/dist/plugin.d.ts +2 -1
  40. package/dist/plugin.d.ts.map +1 -0
  41. package/dist/types/configurations.type.d.ts +10 -0
  42. package/dist/types/configurations.type.d.ts.map +1 -0
  43. package/dist/types/session.type.d.ts +1 -0
  44. package/dist/types/session.type.d.ts.map +1 -0
  45. package/dist/types/user-attribute.type.d.ts +1 -0
  46. package/dist/types/user-attribute.type.d.ts.map +1 -0
  47. package/dist/types/user.type.d.ts +2 -1
  48. package/dist/types/user.type.d.ts.map +1 -0
  49. package/dist/utils/device.d.ts +2 -1
  50. package/dist/utils/device.d.ts.map +1 -0
  51. package/dist/utils/fetch-configurations.d.ts +3 -2
  52. package/dist/utils/fetch-configurations.d.ts.map +1 -0
  53. package/dist/utils/fetch-user.d.ts +3 -2
  54. package/dist/utils/fetch-user.d.ts.map +1 -0
  55. package/dist/utils/tokens.d.ts +1 -0
  56. package/dist/utils/tokens.d.ts.map +1 -0
  57. package/dist/vue.css +1761 -0
  58. package/package.json +29 -5
  59. package/.claude/settings.local.json +0 -7
  60. package/dist/components/AuthSwitcher.vue.js +0 -76
  61. package/dist/components/Buttons/SignInButton.vue.js +0 -110
  62. package/dist/components/Buttons/SignOutButton.vue.js +0 -68
  63. package/dist/components/Buttons/SignUpButton.vue.js +0 -86
  64. package/dist/components/Layout/SignedIn.vue.js +0 -54
  65. package/dist/components/Layout/SignedOut.vue.js +0 -54
  66. package/dist/components/Modals/Modal.vue.js +0 -133
  67. package/dist/components/Modals/SignInModal.vue.js +0 -149
  68. package/dist/components/Modals/SignUpModal.vue.js +0 -165
  69. package/dist/components/Notification.vue.js +0 -95
  70. package/dist/components/SignIn.vue.js +0 -485
  71. package/dist/components/SignUp.vue.js +0 -339
  72. package/dist/components/UserProfile.vue.js +0 -916
  73. package/dist/composables/useAtm.js +0 -11
  74. package/dist/composables/useAtmClient.js +0 -8
  75. package/dist/composables/useAuth.js +0 -38
  76. package/dist/plugin.js +0 -33
  77. package/dist/types/configurations.type.js +0 -2
  78. package/dist/types/session.type.js +0 -2
  79. package/dist/types/user-attribute.type.js +0 -2
  80. package/dist/types/user.type.js +0 -2
  81. package/dist/utils/device.js +0 -46
  82. package/dist/utils/fetch-configurations.js +0 -45
  83. package/dist/utils/fetch-user.js +0 -36
  84. package/dist/utils/tokens.js +0 -46
@@ -1,485 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- const vue_1 = require("vue");
46
- const useAtmClient_1 = require("../composables/useAtmClient");
47
- const useAuth_1 = require("../composables/useAuth");
48
- const useAtm_1 = require("../composables/useAtm");
49
- const tokens_1 = require("../utils/tokens");
50
- const device_1 = require("../utils/device");
51
- const emit = defineEmits([
52
- 'completed',
53
- 'sign-up',
54
- ]);
55
- const showNotification = (0, vue_1.inject)('showNotification');
56
- const form = (0, vue_1.ref)({
57
- emailAddress: '',
58
- password: '',
59
- });
60
- const currentStep = (0, vue_1.ref)('email');
61
- const signInStep = (0, vue_1.ref)(null);
62
- const availableStrategies = (0, vue_1.ref)([]);
63
- const selectedStrategy = (0, vue_1.ref)(null);
64
- const serverStep = (0, vue_1.ref)(null);
65
- const isLoading = (0, vue_1.ref)(false);
66
- const emailInput = (0, vue_1.ref)(null);
67
- const passwordInput = (0, vue_1.ref)(null);
68
- const client = (0, useAtmClient_1.useAtmClient)();
69
- const { signInByAccessToken } = (0, useAuth_1.useAuth)();
70
- const { configurations } = (0, useAtm_1.useAtm)();
71
- const atmPrimaryColor = (0, vue_1.computed)(() => { var _a, _b; return (_b = (_a = configurations.value) === null || _a === void 0 ? void 0 : _a.design) === null || _b === void 0 ? void 0 : _b.primaryColor; });
72
- const atmSecondaryColor = (0, vue_1.computed)(() => { var _a, _b; return (_b = (_a = configurations.value) === null || _a === void 0 ? void 0 : _a.design) === null || _b === void 0 ? void 0 : _b.secondaryColor; });
73
- const logoUrl = (0, vue_1.computed)(() => { var _a, _b; return ((_b = (_a = configurations.value) === null || _a === void 0 ? void 0 : _a.design) === null || _b === void 0 ? void 0 : _b.logoUrl) || ''; });
74
- const buttonText = (0, vue_1.computed)(() => {
75
- if (currentStep.value === 'email')
76
- return 'Entrar';
77
- if (currentStep.value === 'choose_strategy')
78
- return '';
79
- if (currentStep.value === 'forgot_password_message')
80
- return '';
81
- return 'Finalizar';
82
- });
83
- const showEmailField = (0, vue_1.computed)(() => currentStep.value === 'email' || currentStep.value === 'forgot_password_message');
84
- const showPasswordField = (0, vue_1.computed)(() => currentStep.value === 'password');
85
- const showStrategyChoice = (0, vue_1.computed)(() => currentStep.value === 'choose_strategy');
86
- const labelText = (0, vue_1.computed)(() => {
87
- var _a, _b;
88
- if (((_b = (_a = configurations.value) === null || _a === void 0 ? void 0 : _a.username) === null || _b === void 0 ? void 0 : _b.enable) === false) {
89
- return 'Email';
90
- }
91
- return 'Email ou Nome de usuário';
92
- });
93
- const inputPlaceholder = (0, vue_1.computed)(() => {
94
- var _a, _b;
95
- if (((_b = (_a = configurations.value) === null || _a === void 0 ? void 0 : _a.username) === null || _b === void 0 ? void 0 : _b.enable) === false) {
96
- return 'email@exemplo.com';
97
- }
98
- return "email@exemplo.com ou seu username";
99
- });
100
- const processAvailableStrategies = (stepData) => {
101
- var _a;
102
- const strategies = ((_a = stepData === null || stepData === void 0 ? void 0 : stepData.supported) === null || _a === void 0 ? void 0 : _a.first_factors) || [];
103
- return {
104
- password: strategies.find((s) => s.strategy === 'password'),
105
- emailLink: strategies.find((s) => s.strategy === 'email_link')
106
- };
107
- };
108
- const resetForm = () => {
109
- currentStep.value = 'email';
110
- signInStep.value = null;
111
- availableStrategies.value = [];
112
- selectedStrategy.value = null;
113
- form.value.password = '';
114
- serverStep.value = null;
115
- };
116
- const handleEmailStep = () => __awaiter(void 0, void 0, void 0, function* () {
117
- if (!form.value.emailAddress.trim()) {
118
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Email ou nome de usuário é obrigatório');
119
- return false;
120
- }
121
- try {
122
- const deviceToken = yield (0, device_1.getDeviceToken)(client);
123
- const stepData = yield client.auth().signInByEmailAddress(form.value.emailAddress, deviceToken);
124
- signInStep.value = stepData;
125
- serverStep.value = stepData.step;
126
- const strategies = processAvailableStrategies(stepData);
127
- if (strategies.password) {
128
- selectedStrategy.value = strategies.password;
129
- currentStep.value = 'password';
130
- }
131
- else if (strategies.emailLink) {
132
- availableStrategies.value = [strategies.emailLink].filter(Boolean);
133
- currentStep.value = 'choose_strategy';
134
- }
135
- else {
136
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Nenhum método de autenticação disponível');
137
- return false;
138
- }
139
- return true;
140
- }
141
- catch (error) {
142
- showNotification === null || showNotification === void 0 ? void 0 : showNotification(error.message || 'Erro ao verificar email');
143
- return false;
144
- }
145
- });
146
- const selectStrategy = (strategy) => {
147
- selectedStrategy.value = strategy;
148
- currentStep.value = strategy.strategy;
149
- if (strategy.strategy === 'email_link') {
150
- handleEmailLinkStep();
151
- }
152
- };
153
- const handlePasswordStep = () => __awaiter(void 0, void 0, void 0, function* () {
154
- if (!form.value.password.trim()) {
155
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Senha é obrigatória');
156
- return false;
157
- }
158
- try {
159
- if (!signInStep.value) {
160
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Estado de autenticação inválido');
161
- return false;
162
- }
163
- if (serverStep.value !== 'first_factor') {
164
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Etapa inválida para autenticação com senha');
165
- return false;
166
- }
167
- const attemptToken = signInStep.value.sign_in_attempt_token;
168
- if (!attemptToken) {
169
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Token de tentativa não encontrado');
170
- return false;
171
- }
172
- const response = yield client.auth().authenticateWithPassword(signInStep.value.id, attemptToken, form.value.password);
173
- if (response === null || response === void 0 ? void 0 : response.step) {
174
- serverStep.value = response.step;
175
- signInStep.value = Object.assign(Object.assign({}, signInStep.value), response);
176
- }
177
- return true;
178
- }
179
- catch (error) {
180
- showNotification === null || showNotification === void 0 ? void 0 : showNotification(error.message || 'Senha incorreta');
181
- return false;
182
- }
183
- });
184
- const handleEmailLinkStep = () => __awaiter(void 0, void 0, void 0, function* () {
185
- var _a;
186
- try {
187
- yield client.auth().sendEmailLink(signInStep.value.id, (_a = selectedStrategy.value) === null || _a === void 0 ? void 0 : _a.email_address_id);
188
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Link de verificação enviado para seu email', 'success');
189
- return true;
190
- }
191
- catch (error) {
192
- showNotification === null || showNotification === void 0 ? void 0 : showNotification(error.message || 'Erro ao enviar link de verificação');
193
- return false;
194
- }
195
- });
196
- const sendResetPasswordLink = () => __awaiter(void 0, void 0, void 0, function* () {
197
- if (!form.value.emailAddress.trim()) {
198
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Informe o email para enviar o link de recuperação');
199
- return;
200
- }
201
- try {
202
- yield client.auth().resetPassword({ email_address: form.value.emailAddress });
203
- currentStep.value = 'forgot_password_message';
204
- }
205
- catch (error) {
206
- showNotification === null || showNotification === void 0 ? void 0 : showNotification(error.message || 'Erro ao solicitar recuperação de senha');
207
- }
208
- });
209
- const completeAuthentication = () => __awaiter(void 0, void 0, void 0, function* () {
210
- try {
211
- const attemptToken = signInStep.value.sign_in_attempt_token;
212
- if (!attemptToken) {
213
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Token de tentativa não encontrado');
214
- isLoading.value = false;
215
- return;
216
- }
217
- const tokens = yield client.auth().generateTokens(signInStep.value.id, attemptToken);
218
- signInByAccessToken(tokens.access_token);
219
- (0, tokens_1.writeRefreshTokenInCookie)(tokens.refresh_token);
220
- showNotification === null || showNotification === void 0 ? void 0 : showNotification('Login realizado com sucesso!', 'success');
221
- setTimeout(() => {
222
- emit('completed');
223
- }, 1000);
224
- }
225
- catch (error) {
226
- showNotification === null || showNotification === void 0 ? void 0 : showNotification(error.message || 'Erro ao finalizar autenticação');
227
- isLoading.value = false;
228
- }
229
- });
230
- const submit = () => __awaiter(void 0, void 0, void 0, function* () {
231
- if (isLoading.value)
232
- return;
233
- try {
234
- isLoading.value = true;
235
- let stepSuccess = false;
236
- let shouldCompleteAuth = false;
237
- if (currentStep.value === 'email') {
238
- stepSuccess = yield handleEmailStep();
239
- if (stepSuccess) {
240
- isLoading.value = false;
241
- }
242
- }
243
- else if (currentStep.value === 'password') {
244
- stepSuccess = yield handlePasswordStep();
245
- if (stepSuccess) {
246
- shouldCompleteAuth = true;
247
- }
248
- }
249
- else if (currentStep.value === 'choose_strategy') {
250
- return;
251
- }
252
- else if (currentStep.value === 'email_link') {
253
- return;
254
- }
255
- else if (currentStep.value === 'forgot_password_message') {
256
- return;
257
- }
258
- if (shouldCompleteAuth) {
259
- yield completeAuthentication();
260
- }
261
- else if (!stepSuccess) {
262
- isLoading.value = false;
263
- }
264
- }
265
- catch (error) {
266
- showNotification === null || showNotification === void 0 ? void 0 : showNotification(error.message || 'Erro durante o processo de login');
267
- resetForm();
268
- isLoading.value = false;
269
- }
270
- });
271
- const signUp = () => emit('sign-up');
272
- (0, vue_1.onMounted)(() => {
273
- (0, vue_1.nextTick)(() => {
274
- if (emailInput.value) {
275
- emailInput.value.focus();
276
- }
277
- });
278
- });
279
- (0, vue_1.watch)(currentStep, (newStep) => {
280
- (0, vue_1.nextTick)(() => {
281
- if (newStep === 'password' && passwordInput.value) {
282
- passwordInput.value.focus();
283
- }
284
- });
285
- });
286
- const __VLS_ctx = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, {}), {}), {}), {}), {});
287
- let __VLS_components;
288
- let __VLS_intrinsics;
289
- let __VLS_directives;
290
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
291
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
292
- /** @type {__VLS_StyleScopedClasses['atm-forgot-password-link']} */ ;
293
- /** @type {__VLS_StyleScopedClasses['atm-forgot-password-link']} */ ;
294
- /** @type {__VLS_StyleScopedClasses['atm-strategy-button']} */ ;
295
- /** @type {__VLS_StyleScopedClasses['atm-strategy-button']} */ ;
296
- /** @type {__VLS_StyleScopedClasses['atm-login-button']} */ ;
297
- /** @type {__VLS_StyleScopedClasses['atm-login-button']} */ ;
298
- /** @type {__VLS_StyleScopedClasses['atm-signup-link']} */ ;
299
- /** @type {__VLS_StyleScopedClasses['atm-project-name']} */ ;
300
- /** @type {__VLS_StyleScopedClasses['atm-welcome-text']} */ ;
301
- /** @type {__VLS_StyleScopedClasses['atm-form-group']} */ ;
302
- /** @type {__VLS_StyleScopedClasses['atm-input-label']} */ ;
303
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
304
- /** @type {__VLS_StyleScopedClasses['atm-login-button']} */ ;
305
- /** @type {__VLS_StyleScopedClasses['atm-strategy-button']} */ ;
306
- /** @type {__VLS_StyleScopedClasses['atm-footer-links']} */ ;
307
- /** @type {__VLS_StyleScopedClasses['atm-logo-placeholder']} */ ;
308
- /** @type {__VLS_StyleScopedClasses['atm-logo-image']} */ ;
309
- /** @type {__VLS_StyleScopedClasses['atm-project-name']} */ ;
310
- /** @type {__VLS_StyleScopedClasses['atm-welcome-text']} */ ;
311
- /** @type {__VLS_StyleScopedClasses['atm-form-group']} */ ;
312
- /** @type {__VLS_StyleScopedClasses['atm-input-label']} */ ;
313
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
314
- /** @type {__VLS_StyleScopedClasses['atm-login-button']} */ ;
315
- /** @type {__VLS_StyleScopedClasses['atm-forgot-password-link']} */ ;
316
- /** @type {__VLS_StyleScopedClasses['atm-strategy-title']} */ ;
317
- /** @type {__VLS_StyleScopedClasses['atm-strategy-button']} */ ;
318
- /** @type {__VLS_StyleScopedClasses['atm-email-link-text']} */ ;
319
- /** @type {__VLS_StyleScopedClasses['atm-footer-links']} */ ;
320
- /** @type {__VLS_StyleScopedClasses['atm-powered-by']} */ ;
321
- /** @type {__VLS_StyleScopedClasses['spinner-svg']} */ ;
322
- /** @type {__VLS_StyleScopedClasses['button-spinner']} */ ;
323
- /** @type {__VLS_StyleScopedClasses['atm-logo-placeholder']} */ ;
324
- /** @type {__VLS_StyleScopedClasses['atm-logo-image']} */ ;
325
- /** @type {__VLS_StyleScopedClasses['atm-project-name']} */ ;
326
- /** @type {__VLS_StyleScopedClasses['atm-welcome-text']} */ ;
327
- /** @type {__VLS_StyleScopedClasses['atm-form-group']} */ ;
328
- /** @type {__VLS_StyleScopedClasses['atm-input-label']} */ ;
329
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
330
- /** @type {__VLS_StyleScopedClasses['atm-login-button']} */ ;
331
- /** @type {__VLS_StyleScopedClasses['atm-strategy-button']} */ ;
332
- /** @type {__VLS_StyleScopedClasses['atm-footer-links']} */ ;
333
- /** @type {__VLS_StyleScopedClasses['spinner-svg']} */ ;
334
- (__VLS_ctx.atmPrimaryColor);
335
- (__VLS_ctx.atmPrimaryColor);
336
- (__VLS_ctx.atmSecondaryColor);
337
- (__VLS_ctx.atmPrimaryColor);
338
- (__VLS_ctx.atmPrimaryColor);
339
- (__VLS_ctx.atmSecondaryColor);
340
- // @ts-ignore
341
- [atmPrimaryColor, atmPrimaryColor, atmPrimaryColor, atmPrimaryColor, atmSecondaryColor, atmSecondaryColor,];
342
- if (__VLS_ctx.configurations) {
343
- __VLS_asFunctionalElement1(__VLS_intrinsics.form, __VLS_intrinsics.form)(Object.assign({ onSubmit: (...[$event]) => {
344
- if (!(__VLS_ctx.configurations))
345
- return;
346
- __VLS_ctx.submit();
347
- // @ts-ignore
348
- [configurations, submit,];
349
- } }));
350
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-login-container" }));
351
- /** @type {__VLS_StyleScopedClasses['atm-login-container']} */ ;
352
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-logo-container" }));
353
- /** @type {__VLS_StyleScopedClasses['atm-logo-container']} */ ;
354
- if (__VLS_ctx.logoUrl) {
355
- __VLS_asFunctionalElement1(__VLS_intrinsics.img)(Object.assign({ src: (__VLS_ctx.logoUrl), alt: "Logo" }, { class: "atm-logo-image" }));
356
- /** @type {__VLS_StyleScopedClasses['atm-logo-image']} */ ;
357
- }
358
- else {
359
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-logo-placeholder" }));
360
- /** @type {__VLS_StyleScopedClasses['atm-logo-placeholder']} */ ;
361
- }
362
- __VLS_asFunctionalElement1(__VLS_intrinsics.h2, __VLS_intrinsics.h2)(Object.assign({ class: "atm-project-name" }));
363
- /** @type {__VLS_StyleScopedClasses['atm-project-name']} */ ;
364
- (__VLS_ctx.configurations.project.name);
365
- __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)(Object.assign({ class: "atm-welcome-text" }));
366
- /** @type {__VLS_StyleScopedClasses['atm-welcome-text']} */ ;
367
- if (__VLS_ctx.currentStep !== 'forgot_password_message') {
368
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({});
369
- if (__VLS_ctx.showEmailField) {
370
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-form-group" }));
371
- /** @type {__VLS_StyleScopedClasses['atm-form-group']} */ ;
372
- __VLS_asFunctionalElement1(__VLS_intrinsics.label, __VLS_intrinsics.label)(Object.assign({ class: "atm-input-label" }));
373
- /** @type {__VLS_StyleScopedClasses['atm-input-label']} */ ;
374
- (__VLS_ctx.labelText);
375
- __VLS_asFunctionalElement1(__VLS_intrinsics.input)(Object.assign(Object.assign({ ref: "emailInput", type: "text" }, { class: "atm-input-field" }), { placeholder: (__VLS_ctx.inputPlaceholder), value: (__VLS_ctx.form.emailAddress), disabled: (__VLS_ctx.currentStep !== 'email' || __VLS_ctx.isLoading) }));
376
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
377
- }
378
- if (__VLS_ctx.showPasswordField) {
379
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-form-group" }));
380
- /** @type {__VLS_StyleScopedClasses['atm-form-group']} */ ;
381
- __VLS_asFunctionalElement1(__VLS_intrinsics.label, __VLS_intrinsics.label)(Object.assign({ class: "atm-input-label" }));
382
- /** @type {__VLS_StyleScopedClasses['atm-input-label']} */ ;
383
- __VLS_asFunctionalElement1(__VLS_intrinsics.input)(Object.assign(Object.assign({ ref: "passwordInput", type: "password" }, { class: "atm-input-field" }), { placeholder: "Digite sua senha", disabled: (__VLS_ctx.isLoading) }));
384
- (__VLS_ctx.form.password);
385
- /** @type {__VLS_StyleScopedClasses['atm-input-field']} */ ;
386
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-alternative-options" }, { style: {} }));
387
- /** @type {__VLS_StyleScopedClasses['atm-alternative-options']} */ ;
388
- __VLS_asFunctionalElement1(__VLS_intrinsics.button, __VLS_intrinsics.button)(Object.assign(Object.assign(Object.assign({ onClick: (...[$event]) => {
389
- if (!(__VLS_ctx.configurations))
390
- return;
391
- if (!(__VLS_ctx.currentStep !== 'forgot_password_message'))
392
- return;
393
- if (!(__VLS_ctx.showPasswordField))
394
- return;
395
- __VLS_ctx.sendResetPasswordLink();
396
- // @ts-ignore
397
- [configurations, logoUrl, logoUrl, currentStep, currentStep, showEmailField, labelText, inputPlaceholder, form, form, isLoading, isLoading, showPasswordField, sendResetPasswordLink,];
398
- } }, { type: "button" }), { class: "atm-forgot-password-link" }), { disabled: (__VLS_ctx.isLoading) }));
399
- /** @type {__VLS_StyleScopedClasses['atm-forgot-password-link']} */ ;
400
- }
401
- if (__VLS_ctx.showStrategyChoice) {
402
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-strategy-choice" }));
403
- /** @type {__VLS_StyleScopedClasses['atm-strategy-choice']} */ ;
404
- __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)(Object.assign({ class: "atm-strategy-title" }));
405
- /** @type {__VLS_StyleScopedClasses['atm-strategy-title']} */ ;
406
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-strategy-buttons" }));
407
- /** @type {__VLS_StyleScopedClasses['atm-strategy-buttons']} */ ;
408
- for (const [strategy] of __VLS_vFor((__VLS_ctx.availableStrategies))) {
409
- __VLS_asFunctionalElement1(__VLS_intrinsics.button, __VLS_intrinsics.button)(Object.assign(Object.assign(Object.assign({ onClick: (...[$event]) => {
410
- if (!(__VLS_ctx.configurations))
411
- return;
412
- if (!(__VLS_ctx.currentStep !== 'forgot_password_message'))
413
- return;
414
- if (!(__VLS_ctx.showStrategyChoice))
415
- return;
416
- __VLS_ctx.selectStrategy(strategy);
417
- // @ts-ignore
418
- [isLoading, showStrategyChoice, availableStrategies, selectStrategy,];
419
- } }, { key: (strategy.strategy), type: "button" }), { class: "atm-strategy-button" }), { disabled: (__VLS_ctx.isLoading) }));
420
- /** @type {__VLS_StyleScopedClasses['atm-strategy-button']} */ ;
421
- if (strategy.strategy === 'email_link') {
422
- __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
423
- }
424
- // @ts-ignore
425
- [isLoading,];
426
- }
427
- }
428
- if (__VLS_ctx.currentStep === 'email_link') {
429
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-form-group" }));
430
- /** @type {__VLS_StyleScopedClasses['atm-form-group']} */ ;
431
- __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)(Object.assign({ class: "atm-email-link-text" }));
432
- /** @type {__VLS_StyleScopedClasses['atm-email-link-text']} */ ;
433
- }
434
- }
435
- else {
436
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-forgot-password-message" }, { style: {} }));
437
- /** @type {__VLS_StyleScopedClasses['atm-forgot-password-message']} */ ;
438
- __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)({});
439
- __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({});
440
- (__VLS_ctx.form.emailAddress);
441
- }
442
- if (__VLS_ctx.buttonText) {
443
- __VLS_asFunctionalElement1(__VLS_intrinsics.button, __VLS_intrinsics.button)(Object.assign(Object.assign({ type: "submit" }, { class: "atm-login-button" }), { disabled: (__VLS_ctx.isLoading) }));
444
- /** @type {__VLS_StyleScopedClasses['atm-login-button']} */ ;
445
- if (!__VLS_ctx.isLoading) {
446
- __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
447
- (__VLS_ctx.buttonText);
448
- }
449
- else {
450
- __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)(Object.assign({ class: "button-spinner" }));
451
- /** @type {__VLS_StyleScopedClasses['button-spinner']} */ ;
452
- __VLS_asFunctionalElement1(__VLS_intrinsics.svg, __VLS_intrinsics.svg)(Object.assign({ class: "spinner-svg" }, { viewBox: "0 0 50 50" }));
453
- /** @type {__VLS_StyleScopedClasses['spinner-svg']} */ ;
454
- __VLS_asFunctionalElement1(__VLS_intrinsics.circle)(Object.assign({ class: "spinner-circle" }, { cx: "25", cy: "25", r: "20", fill: "none", 'stroke-width': "5" }));
455
- /** @type {__VLS_StyleScopedClasses['spinner-circle']} */ ;
456
- if (__VLS_ctx.currentStep === 'email') {
457
- __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
458
- }
459
- else {
460
- __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
461
- }
462
- }
463
- }
464
- __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)(Object.assign({ class: "atm-footer-links" }));
465
- /** @type {__VLS_StyleScopedClasses['atm-footer-links']} */ ;
466
- __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)(Object.assign({ class: "atm-signup-text" }));
467
- /** @type {__VLS_StyleScopedClasses['atm-signup-text']} */ ;
468
- __VLS_asFunctionalElement1(__VLS_intrinsics.a, __VLS_intrinsics.a)(Object.assign({ onClick: (...[$event]) => {
469
- if (!(__VLS_ctx.configurations))
470
- return;
471
- __VLS_ctx.signUp();
472
- // @ts-ignore
473
- [currentStep, currentStep, form, isLoading, isLoading, buttonText, buttonText, signUp,];
474
- } }, { class: "atm-signup-link" }));
475
- /** @type {__VLS_StyleScopedClasses['atm-signup-link']} */ ;
476
- __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)(Object.assign({ class: "atm-powered-by" }));
477
- /** @type {__VLS_StyleScopedClasses['atm-powered-by']} */ ;
478
- __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({});
479
- }
480
- // @ts-ignore
481
- [];
482
- const __VLS_export = (await Promise.resolve().then(() => __importStar(require('vue')))).defineComponent({
483
- emits: {},
484
- });
485
- exports.default = {};