@lilaquadrat/design-core 0.2.1 → 0.3.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 (80) hide show
  1. package/README.md +76 -3
  2. package/html/index.server.html +1 -8
  3. package/package.json +54 -54
  4. package/src/client-entry.ts +8 -8
  5. package/src/components/partials/error.partial.vue +19 -19
  6. package/src/components/partials/main-components.partial.vue +75 -70
  7. package/src/components/partials/qrcode.partial.vue +8 -8
  8. package/src/functions/AuthProviderFactory.ts +30 -0
  9. package/src/functions/PaymenyProviderFactory.ts +11 -11
  10. package/src/functions/auth0.provider.ts +75 -0
  11. package/src/functions/keycloak.provider.ts +228 -0
  12. package/src/functions/lila-dom.ts +50 -50
  13. package/src/functions/shopify.provider.ts +176 -154
  14. package/src/functions/stripe.provider.ts +120 -108
  15. package/src/globals.d.ts +1 -2
  16. package/src/index.ts +9 -7
  17. package/src/interfaces/AuthCallbackResult.interface.ts +5 -0
  18. package/src/interfaces/AuthConfig.interface.ts +13 -0
  19. package/src/interfaces/AuthProvider.interface.ts +15 -0
  20. package/src/interfaces/FrontendConfig.interface.ts +11 -40
  21. package/src/interfaces/GenericEvents.interface.ts +1 -1
  22. package/src/interfaces/IdTokenExtended.interface.ts +13 -4
  23. package/src/interfaces/PaymentProvider.interface.ts +2 -2
  24. package/src/interfaces/RenderOptions.interface.ts +12 -0
  25. package/src/libs/ActionNotice.ts +125 -125
  26. package/src/libs/Models.class.ts +219 -221
  27. package/src/main.ts +41 -36
  28. package/src/mixins/createCookieString.ts +50 -36
  29. package/src/mixins/createModelDeclaration.ts +22 -19
  30. package/src/mixins/createRouter.ts +12 -12
  31. package/src/mixins/date.ts +4 -2
  32. package/src/mixins/formatSize.ts +5 -5
  33. package/src/mixins/getAnchor.ts +1 -1
  34. package/src/mixins/getRoutes.ts +13 -25
  35. package/src/mixins/hasSlotContent.ts +22 -16
  36. package/src/mixins/hooks.ts +101 -60
  37. package/src/mixins/loadComponents.ts +60 -58
  38. package/src/mixins/logger.ts +17 -13
  39. package/src/mixins/replaceVariables.ts +10 -8
  40. package/src/mixins/scroll.ts +61 -45
  41. package/src/models/Address.model.ts +7 -7
  42. package/src/models/Contact.model.ts +14 -14
  43. package/src/plugins/analytics.ts +198 -0
  44. package/src/plugins/auth.ts +74 -60
  45. package/src/plugins/currency.ts +10 -10
  46. package/src/plugins/events.ts +101 -97
  47. package/src/plugins/filters.ts +21 -18
  48. package/src/plugins/replacer.ts +7 -6
  49. package/src/plugins/signupFlow.ts +45 -43
  50. package/src/plugins/traceable.ts +28 -26
  51. package/src/plugins/translations.ts +9 -9
  52. package/src/plugins/youtube.ts +39 -34
  53. package/src/routes.ts +108 -108
  54. package/src/server-entry.ts +75 -77
  55. package/src/stores/calls.store.ts +14 -14
  56. package/src/stores/cart.store.ts +116 -107
  57. package/src/stores/content.store.ts +87 -45
  58. package/src/stores/editor.store.ts +16 -16
  59. package/src/stores/files.store.ts +72 -72
  60. package/src/stores/main.store.ts +155 -109
  61. package/src/stores/user.store.ts +72 -68
  62. package/src/translations/de.ts +127 -127
  63. package/src/views/content.view.vue +81 -143
  64. package/src/views/download.view.vue +25 -23
  65. package/src/views/editor.view.vue +150 -125
  66. package/src/views/login.view.vue +35 -36
  67. package/src/views/signup-account.view.vue +14 -14
  68. package/tooling/cypress/config.ts +68 -54
  69. package/tooling/cypress/manifest-utils.mjs +34 -22
  70. package/tooling/cypress/run-parallel.mjs +41 -35
  71. package/tooling/cypress/support/commands.ts +458 -300
  72. package/tooling/eslint.config.js +1 -223
  73. package/tooling/preview.plugin.js +132 -0
  74. package/tooling/ssr-test/index.mjs +205 -203
  75. package/tooling/vite.d.ts +36 -0
  76. package/tooling/vite.js +234 -0
  77. package/src/interfaces/EditorConfiguration.interface.ts +0 -15
  78. package/tooling/preview.plugin.ts +0 -134
  79. package/tooling/stylelint.config.mjs +0 -24
  80. package/tooling/vite.ts +0 -260
@@ -21,51 +21,53 @@ const isImage = computed(() => imageExtensions.has(extension.value ?? ''));
21
21
  const isVideo = computed(() => videoExtensions.has(extension.value ?? ''));
22
22
  const downloadUrl = computed(() => {
23
23
 
24
- const { company, project } = mainStore.config ?? {};
25
- const { secure } = mainStore.config?.cdn ?? {};
24
+ const { company, project } = mainStore;
25
+ const { secure } = mainStore.endpoints ?? {};
26
26
 
27
- if (!secure || !company) return undefined;
27
+ if (!secure || !company) return undefined;
28
28
 
29
- const parts = [secure, app.value, company];
29
+ const parts = [secure, app.value, company];
30
30
 
31
- if (app.value !== 'customers' && project) {
32
- parts.push(project);
33
- if (list.value) parts.push(list.value);
34
- }
31
+ if (app.value !== 'customers' && project) {
32
+
33
+ parts.push(project);
34
+ if (list.value) parts.push(list.value);
35
+
36
+ }
35
37
 
36
- parts.push(filename.value);
38
+ parts.push(filename.value);
37
39
 
38
- const queryParams = new URLSearchParams();
40
+ const queryParams = new URLSearchParams();
39
41
 
40
- if (customer.value) queryParams.set('customer', customer.value);
42
+ if (customer.value) queryParams.set('customer', customer.value);
41
43
 
42
- const token = filesStore.token?.token;
44
+ const token = filesStore.token?.token;
43
45
 
44
- if (token) queryParams.set('token', token);
46
+ if (token) queryParams.set('token', token);
45
47
 
46
- const queryString = queryParams.toString();
48
+ const queryString = queryParams.toString();
47
49
 
48
- return parts.join('/') + (queryString ? `?${queryString}` : '');
50
+ return parts.join('/') + (queryString ? `?${queryString}` : '');
49
51
 
50
52
  });
51
53
 
52
54
  onMounted(async () => {
53
55
 
54
- if (!filesStore.isTokenValid(app.value, scope.value)) {
56
+ if (!filesStore.isTokenValid(app.value, scope.value)) {
55
57
 
56
- try {
58
+ try {
57
59
 
58
- await filesStore.fetchToken(app.value, scope.value);
60
+ await filesStore.fetchToken(app.value, scope.value);
59
61
 
60
- } catch (e) {
62
+ } catch (e) {
61
63
 
62
- error.value = (e as Error)?.message || 'TOKEN_FETCH_FAILED';
64
+ error.value = (e as Error)?.message || 'TOKEN_FETCH_FAILED';
63
65
 
64
- }
66
+ }
65
67
 
66
- }
68
+ }
67
69
 
68
- loading.value = false;
70
+ loading.value = false;
69
71
 
70
72
  });
71
73
 
@@ -25,214 +25,239 @@ const settingsCache = ref<AppEditorConfiguration>();
25
25
  const active = ref<EditorActiveModule>();
26
26
  const mainStore = useMainStore();
27
27
  const init = ref<boolean>(false);
28
+ const target = ref<'browser'|'mail'>('browser');
28
29
 
29
30
  watch(siteSettings, () => {
30
31
 
31
- /**
32
+ /**
32
33
  * if the target type changes we need to update the available modules
33
34
  */
34
- const useTarget = siteSettings.value?.target || 'browser';
35
+ const useTarget = siteSettings.value?.target || 'browser';
35
36
 
36
- if(useTarget !== mainStore.target) {
37
+ if(useTarget !== target.value) {
37
38
 
38
- const target = siteSettings.value?.target === 'browser' || !siteSettings.value?.target
39
- ? 'browser'
40
- : siteSettings.value?.target
39
+ const moduleTarget = siteSettings.value?.target === 'browser' || !siteSettings.value?.target
40
+ ? 'browser'
41
+ : siteSettings.value?.target
41
42
 
42
- mainStore.target = useTarget;
43
+ target.value = useTarget;
43
44
 
44
- postModules();
45
- postCustomModules();
45
+ postModules();
46
+ postCustomModules();
46
47
 
47
- if (currentInstance) {
48
+ if (currentInstance) {
48
49
 
49
- loadViaDeclarationSync(target === 'browser' ? editorStore.modulesBrowser : editorStore.modulesMail, 'lila', 'module', currentInstance.appContext.app);
50
- loadViaDeclarationSync(target === 'browser' ? editorStore.partialsBrowser : editorStore.partialsMail, 'lila', 'partial', currentInstance.appContext.app);
50
+ loadViaDeclarationSync(moduleTarget === 'browser' ? editorStore.modulesBrowser : editorStore.modulesMail, 'lila', 'module', currentInstance.appContext.app);
51
+ loadViaDeclarationSync(moduleTarget === 'browser' ? editorStore.partialsBrowser : editorStore.partialsMail, 'lila', 'partial', currentInstance.appContext.app);
51
52
 
52
- }
53
+ }
53
54
 
54
- }
55
+ }
55
56
 
56
57
  })
57
58
 
58
- function messageHandler (message: StudioIframeMessage) {
59
+ function messageHandler(message: StudioIframeMessage) {
59
60
 
60
- if (message.data.type === 'studio-content') {
61
- console.groupCollapsed('MESSAGE_STUDIO_CONTENT');
62
- console.debug(message.data.data);
63
- console.groupEnd();
61
+ if (message.data.type === 'studio-content') {
64
62
 
65
- contentCache.value = message.data.data;
66
- updateContent();
67
- }
63
+ console.groupCollapsed('MESSAGE_STUDIO_CONTENT');
64
+ console.debug(message.data.data);
65
+ console.groupEnd();
66
+
67
+ contentCache.value = message.data.data;
68
+ updateContent();
69
+
70
+ }
68
71
 
69
- //editor main configuration
70
- if (message.data.type === 'studio-settings') {
71
- console.groupCollapsed('MESSAGE_STUDIO_SETTINGS');
72
- console.debug(message.data.data);
73
- console.groupEnd();
72
+ //editor main configuration
73
+ if (message.data.type === 'studio-settings') {
74
74
 
75
- settingsCache.value = message.data.data;
76
- mainStore.configuration = message.data.data;
77
- updateContent();
78
- }
75
+ console.groupCollapsed('MESSAGE_STUDIO_SETTINGS');
76
+ console.debug(message.data.data);
77
+ console.groupEnd();
79
78
 
80
- if (message.data.type === 'studio-editor-settings') {
81
- console.groupCollapsed('MESSAGE_STUDIO_EDITOR_SETTINGS');
82
- console.debug(message.data.data);
83
- console.groupEnd();
79
+ settingsCache.value = message.data.data;
80
+ mainStore.editor = message.data.data;
81
+ updateContent();
82
+
83
+ }
84
84
 
85
- siteSettings.value = message.data.data;
85
+ if (message.data.type === 'studio-editor-settings') {
86
86
 
87
- if(!init.value) {
87
+ console.groupCollapsed('MESSAGE_STUDIO_EDITOR_SETTINGS');
88
+ console.debug(message.data.data);
89
+ console.groupEnd();
88
90
 
89
- postModules();
90
- postCustomModules();
91
- postEvents();
92
- init.value = true;
91
+ siteSettings.value = message.data.data;
93
92
 
94
- }
93
+ if(!init.value) {
95
94
 
96
- updateContent();
97
- updateContext();
95
+ postModules();
96
+ postCustomModules();
97
+ postEvents();
98
+ init.value = true;
98
99
 
99
- }
100
+ }
100
101
 
101
- if (message.data.type === 'studio-active') {
102
- console.groupCollapsed('MESSAGE_STUDIO_ACTIVE');
103
- console.debug(message.data.data);
104
- console.groupEnd();
102
+ updateContent();
103
+ updateContext();
105
104
 
106
- active.value = message.data.data;
105
+ }
106
+
107
+ if (message.data.type === 'studio-active') {
108
+
109
+ console.groupCollapsed('MESSAGE_STUDIO_ACTIVE');
110
+ console.debug(message.data.data);
111
+ console.groupEnd();
112
+
113
+ active.value = message.data.data;
107
114
 
108
- if (active.value) {
115
+ if (active.value) {
109
116
 
110
- scrollToModule(active.value);
117
+ scrollToModule(active.value);
111
118
 
119
+ }
120
+
112
121
  }
113
- }
114
122
 
115
- if (message.data.type === 'studio-cookie-reset') {
116
- console.groupCollapsed('MESSAGE_STUDIO_COOKIE_RESET');
117
- console.debug(message.data.data);
118
- console.groupEnd();
123
+ if (message.data.type === 'studio-cookie-reset') {
124
+
125
+ console.groupCollapsed('MESSAGE_STUDIO_COOKIE_RESET');
126
+ console.debug(message.data.data);
127
+ console.groupEnd();
128
+
129
+ resetCookies();
130
+
131
+ }
119
132
 
120
- resetCookies();
121
- }
122
133
  }
123
134
 
124
135
  onMounted(() => {
125
136
 
126
- if (window.origin === 'null') {
127
- live.value = true;
128
- }
137
+ if (window.origin === 'null') {
138
+
139
+ live.value = true;
140
+
141
+ }
142
+
143
+ if (live.value) return;
129
144
 
130
- if (live.value) return;
145
+ removeListeners()
146
+ addListeners();
131
147
 
132
- removeListeners()
133
- addListeners();
148
+ window.parent.postMessage('studio-design-settings', '*');
149
+ window.parent.postMessage('studio-design-ready', '*');
134
150
 
135
- window.parent.postMessage('studio-design-settings', '*');
136
- window.parent.postMessage('studio-design-ready', '*');
137
151
  });
138
152
 
139
153
  onBeforeUnmount(() => removeListeners());
140
154
 
141
- function removeListeners () {
142
- window.removeEventListener('message', messageHandler, false);
155
+ function removeListeners() {
156
+
157
+ window.removeEventListener('message', messageHandler, false);
158
+
143
159
  }
144
160
 
145
- function addListeners () {
146
- window.addEventListener('message', messageHandler, false);
161
+ function addListeners() {
162
+
163
+ window.addEventListener('message', messageHandler, false);
164
+
147
165
  }
148
166
 
149
- function updateContent () {
150
- content.value = prepareContent({ modules: contentCache.value, ...siteSettings.value });
167
+ function updateContent() {
168
+
169
+ content.value = prepareContent({ modules: contentCache.value, ...siteSettings.value });
170
+
151
171
  }
152
172
 
153
- function postModules () {
173
+ function postModules() {
154
174
 
155
- console.log('POST MODULES', mainStore.target);
175
+ console.log('POST MODULES', target.value);
156
176
 
157
- const modules = mainStore.target === 'browser'
158
- ? editorStore.availableModulesWithRevision
159
- : editorStore.availableModulesWithRevisionMail
177
+ const modules = target.value === 'browser'
178
+ ? editorStore.availableModulesWithRevision
179
+ : editorStore.availableModulesWithRevisionMail
160
180
 
161
- window.parent.postMessage(
162
- {
163
- type: 'studio-design-modules-with-revision',
164
- data: hardCopy(modules),
165
- },
166
- '*',
167
- );
181
+ window.parent.postMessage(
182
+ {
183
+ type: 'studio-design-modules-with-revision',
184
+ data: hardCopy(modules),
185
+ },
186
+ '*',
187
+ );
168
188
 
169
189
  }
170
190
 
171
- function postCustomModules () {
191
+ function postCustomModules() {
172
192
 
173
- const modules = mainStore.target === 'browser'
174
- ? mainStore.customModulesBrowser
175
- : mainStore.customModulesMail
193
+ const modules = target.value === 'browser'
194
+ ? mainStore.customModulesBrowser
195
+ : mainStore.customModulesMail
176
196
 
177
- if (!modules) return;
197
+ if (!modules) return;
178
198
 
179
- window.parent.postMessage(
180
- {
181
- type: 'studio-design-custom-modules',
182
- data: hardCopy(modules),
183
- },
184
- '*',
185
- );
199
+ window.parent.postMessage(
200
+ {
201
+ type: 'studio-design-custom-modules',
202
+ data: hardCopy(modules),
203
+ },
204
+ '*',
205
+ );
186
206
 
187
207
  }
188
208
 
189
- function postEvents () {
209
+ function postEvents() {
190
210
 
191
- window.parent.postMessage(
192
- {
193
- type: 'studio-design-events',
194
- data: eventDeclarations,
195
- },
196
- '*',
197
- );
211
+ window.parent.postMessage(
212
+ {
213
+ type: 'studio-design-events',
214
+ data: eventDeclarations,
215
+ },
216
+ '*',
217
+ );
198
218
 
199
219
  }
200
220
 
201
221
  /**
202
222
  * sets sitetitle and description
203
223
  */
204
- function updateContext () {
224
+ function updateContext() {
205
225
 
206
- contentStore.setContext({
207
- sitetitle : siteSettings?.value?.settings?.title,
208
- description: siteSettings?.value?.settings?.description,
209
- })
226
+ contentStore.setContext({
227
+ sitetitle: siteSettings?.value?.settings?.title,
228
+ description: siteSettings?.value?.settings?.description,
229
+ })
210
230
 
211
231
  }
212
232
 
213
- function resetCookies () {
214
- const cookies = document.cookie.split(';').filter((single) => single);
233
+ function resetCookies() {
234
+
235
+ const cookies = document.cookie.split(';').filter((single) => single);
215
236
 
216
- cookies.forEach((single) => {
217
- const name = single.split('=');
237
+ cookies.forEach((single) => {
238
+
239
+ const name = single.split('=');
240
+
241
+ document.cookie = `${name[0].trim()}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=None;`;
242
+
243
+ });
218
244
 
219
- document.cookie = `${name[0].trim()}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=None;`;
220
- });
221
245
  }
222
246
 
223
- function scrollToModule (active: EditorActiveModule): void {
247
+ function scrollToModule(active: EditorActiveModule): void {
248
+
249
+ nextTick().then(() => {
224
250
 
225
- nextTick().then(() => {
226
- const baseModule = contentCache.value?.find((single) => single.uuid === active.uuid);
227
- const containerSelector = baseModule?.position === 'content' || !baseModule?.position ? '.lila-content-module .container:not(.top, .bottom)' : `.lila-content-module .container.${baseModule.position}`;
228
- const contentPosition: Content['modules'] = baseModule?.position === 'content' || !baseModule?.position ? content.value.content : content.value[baseModule.position];
229
- const index = contentPosition?.findIndex((single) => single.uuid === active.uuid);
251
+ const baseModule = contentCache.value?.find((single) => single.uuid === active.uuid);
252
+ const containerSelector = baseModule?.position === 'content' || !baseModule?.position ? '.lila-content-module .container:not(.top, .bottom)' : `.lila-content-module .container.${baseModule.position}`;
253
+ const contentPosition: Content['modules'] = baseModule?.position === 'content' || !baseModule?.position ? content.value.content : content.value[baseModule.position];
254
+ const index = contentPosition?.findIndex((single) => single.uuid === active.uuid);
230
255
 
231
- if (!index && index !== 0) return;
256
+ if (!index && index !== 0) return;
232
257
 
233
- scrollToSelector(`${containerSelector} .lila-module:nth-child(${index + 1}), ${containerSelector} .partial-container:nth-child(${index + 1})`,)
258
+ scrollToSelector(`${containerSelector} .lila-module:nth-child(${index + 1}), ${containerSelector} .partial-container:nth-child(${index + 1})`,)
234
259
 
235
- });
260
+ });
236
261
 
237
262
  }
238
263
  </script>
@@ -1,9 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type AppState from '../interfaces/AppState.interface';
2
+ import type AuthCallbackResult from '../interfaces/AuthCallbackResult.interface';
3
3
  import { auth } from '../plugins/auth';
4
4
  import useMainStore from '../stores/main.store';
5
5
  import useUserStore from '../stores/user.store';
6
- import type { RedirectLoginResult } from '@auth0/auth0-spa-js';
7
6
  import StudioSDK from '@lilaquadrat/sdk';
8
7
  import { onBeforeMount, ref } from 'vue';
9
8
  import { useRouter } from 'vue-router';
@@ -17,66 +16,66 @@ const hint = ref<string>();
17
16
 
18
17
  onBeforeMount(async () => {
19
18
 
20
- let loginResult: RedirectLoginResult<AppState>;
19
+ let loginResult: AuthCallbackResult;
21
20
 
22
- // Attempt to handle the authentication callback.
23
- try {
21
+ // Attempt to handle the authentication callback.
22
+ try {
24
23
 
25
- loginResult = await auth.handleCallback();
24
+ loginResult = await auth.handleCallback();
26
25
 
27
- } catch (e: any) {
26
+ } catch (e: unknown) {
28
27
 
29
- console.error(e);
30
- error.value = true;
31
- return;
28
+ console.error(e);
29
+ error.value = true;
30
+ return;
32
31
 
33
- }
32
+ }
34
33
 
35
- await userStore.updateLock();
34
+ await userStore.updateLock();
36
35
 
37
- console.log(userStore.locked, loginResult);
36
+ console.log(userStore.locked, loginResult);
38
37
 
39
- const sdk = new StudioSDK(mainStore.apiConfig);
38
+ const sdk = new StudioSDK(mainStore.apiConfig);
40
39
 
41
- if(userStore.locked === 'user-connect' && loginResult?.appState?.customerId) {
40
+ if(userStore.locked === 'user-connect' && loginResult?.appState?.customerId) {
42
41
 
43
- try {
42
+ try {
44
43
 
45
- // Attempt to connect the user with the provided customerId.
46
- await sdk.members.me.connect(loginResult?.appState?.customerId);
47
- await userStore.updateLock();
44
+ // Attempt to connect the user with the provided customerId.
45
+ await sdk.members.me.connect(loginResult?.appState?.customerId);
46
+ await userStore.updateLock();
48
47
 
49
- } catch (e) {
48
+ } catch (e) {
50
49
 
51
- console.error(e);
52
- console.error('CONNECT_ACCOUNT_TO_CUSTOMER_FAILED');
50
+ console.error(e);
51
+ console.error('CONNECT_ACCOUNT_TO_CUSTOMER_FAILED');
53
52
 
54
- }
53
+ }
55
54
 
56
- }
55
+ }
57
56
 
58
- if(!userStore.userData?.emailConfirmed && loginResult?.appState?.emailConfirmationCode) {
57
+ if(!userStore.userData?.emailConfirmed && loginResult?.appState?.emailConfirmationCode) {
59
58
 
60
- try {
59
+ try {
61
60
 
62
- // Attempt to confirm the email address with the provided code
63
- await sdk.members.me.confirmEmail(loginResult?.appState?.emailConfirmationCode)
64
- await userStore.updateLock();
61
+ // Attempt to confirm the email address with the provided code
62
+ await sdk.members.me.confirmEmail(loginResult?.appState?.emailConfirmationCode)
63
+ await userStore.updateLock();
65
64
 
66
- } catch (e) {
65
+ } catch (e) {
67
66
 
68
- console.error(e);
69
- console.error('EMAIL_CONFIRMATION_FAILED');
67
+ console.error(e);
68
+ console.error('EMAIL_CONFIRMATION_FAILED');
70
69
 
71
- }
70
+ }
72
71
 
73
- }
72
+ }
74
73
 
75
- router.replace(routeForLock(userStore.locked));
74
+ router.replace(routeForLock(userStore.locked));
76
75
 
77
76
  })
78
77
 
79
78
  </script>
80
79
  <template>
81
80
  <lila-error-partial v-if="error" :status="400" :hint="hint" type="members" />
82
- </template>
81
+ </template>
@@ -14,36 +14,36 @@ const store = useMainStore();
14
14
 
15
15
  onBeforeMount(() => {
16
16
 
17
- if(route.query.customerId) {
17
+ if(route.query.customerId) {
18
18
 
19
- userStore.setCustomer({ _id: route.query.customerId as string });
19
+ userStore.setCustomer({ _id: route.query.customerId as string });
20
20
 
21
- }
21
+ }
22
22
 
23
- if(route.query.emailConfirmationCode) {
23
+ if(route.query.emailConfirmationCode) {
24
24
 
25
- userStore.emailConfirmationCode = route.query.emailConfirmationCode as string;
25
+ userStore.emailConfirmationCode = route.query.emailConfirmationCode as string;
26
26
 
27
- }
27
+ }
28
28
 
29
- if(!auth.isAuth.value) {
29
+ if(!auth.isAuth.value) {
30
30
 
31
- auth.triggerSignup(userStore.customer?._id, userStore.emailConfirmationCode);
31
+ auth.triggerSignup(userStore.customer?._id, userStore.emailConfirmationCode);
32
32
 
33
- } else {
33
+ } else {
34
34
 
35
- router.push({ name: 'members' });
35
+ router.push({ name: 'members' });
36
36
 
37
- }
37
+ }
38
38
 
39
39
  });
40
40
 
41
41
  const contentMerged = computed(() => {
42
42
 
43
- const data = store.staticData?.redirect;
43
+ const data = store.staticData?.redirect;
44
44
 
45
- if(data) return prepareContent(data) as unknown as ContentWithPositions;
46
- return prepareContent({}) as unknown as ContentWithPositions;
45
+ if(data) return prepareContent(data) as unknown as ContentWithPositions;
46
+ return prepareContent({}) as unknown as ContentWithPositions;
47
47
 
48
48
  });
49
49