@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.
- package/README.md +76 -3
- package/html/index.server.html +1 -8
- package/package.json +54 -54
- package/src/client-entry.ts +8 -8
- package/src/components/partials/error.partial.vue +19 -19
- package/src/components/partials/main-components.partial.vue +75 -70
- package/src/components/partials/qrcode.partial.vue +8 -8
- package/src/functions/AuthProviderFactory.ts +30 -0
- package/src/functions/PaymenyProviderFactory.ts +11 -11
- package/src/functions/auth0.provider.ts +75 -0
- package/src/functions/keycloak.provider.ts +228 -0
- package/src/functions/lila-dom.ts +50 -50
- package/src/functions/shopify.provider.ts +176 -154
- package/src/functions/stripe.provider.ts +120 -108
- package/src/globals.d.ts +1 -2
- package/src/index.ts +9 -7
- package/src/interfaces/AuthCallbackResult.interface.ts +5 -0
- package/src/interfaces/AuthConfig.interface.ts +13 -0
- package/src/interfaces/AuthProvider.interface.ts +15 -0
- package/src/interfaces/FrontendConfig.interface.ts +11 -40
- package/src/interfaces/GenericEvents.interface.ts +1 -1
- package/src/interfaces/IdTokenExtended.interface.ts +13 -4
- package/src/interfaces/PaymentProvider.interface.ts +2 -2
- package/src/interfaces/RenderOptions.interface.ts +12 -0
- package/src/libs/ActionNotice.ts +125 -125
- package/src/libs/Models.class.ts +219 -221
- package/src/main.ts +41 -36
- package/src/mixins/createCookieString.ts +50 -36
- package/src/mixins/createModelDeclaration.ts +22 -19
- package/src/mixins/createRouter.ts +12 -12
- package/src/mixins/date.ts +4 -2
- package/src/mixins/formatSize.ts +5 -5
- package/src/mixins/getAnchor.ts +1 -1
- package/src/mixins/getRoutes.ts +13 -25
- package/src/mixins/hasSlotContent.ts +22 -16
- package/src/mixins/hooks.ts +101 -60
- package/src/mixins/loadComponents.ts +60 -58
- package/src/mixins/logger.ts +17 -13
- package/src/mixins/replaceVariables.ts +10 -8
- package/src/mixins/scroll.ts +61 -45
- package/src/models/Address.model.ts +7 -7
- package/src/models/Contact.model.ts +14 -14
- package/src/plugins/analytics.ts +198 -0
- package/src/plugins/auth.ts +74 -60
- package/src/plugins/currency.ts +10 -10
- package/src/plugins/events.ts +101 -97
- package/src/plugins/filters.ts +21 -18
- package/src/plugins/replacer.ts +7 -6
- package/src/plugins/signupFlow.ts +45 -43
- package/src/plugins/traceable.ts +28 -26
- package/src/plugins/translations.ts +9 -9
- package/src/plugins/youtube.ts +39 -34
- package/src/routes.ts +108 -108
- package/src/server-entry.ts +75 -77
- package/src/stores/calls.store.ts +14 -14
- package/src/stores/cart.store.ts +116 -107
- package/src/stores/content.store.ts +87 -45
- package/src/stores/editor.store.ts +16 -16
- package/src/stores/files.store.ts +72 -72
- package/src/stores/main.store.ts +155 -109
- package/src/stores/user.store.ts +72 -68
- package/src/translations/de.ts +127 -127
- package/src/views/content.view.vue +81 -143
- package/src/views/download.view.vue +25 -23
- package/src/views/editor.view.vue +150 -125
- package/src/views/login.view.vue +35 -36
- package/src/views/signup-account.view.vue +14 -14
- package/tooling/cypress/config.ts +68 -54
- package/tooling/cypress/manifest-utils.mjs +34 -22
- package/tooling/cypress/run-parallel.mjs +41 -35
- package/tooling/cypress/support/commands.ts +458 -300
- package/tooling/eslint.config.js +1 -223
- package/tooling/preview.plugin.js +132 -0
- package/tooling/ssr-test/index.mjs +205 -203
- package/tooling/vite.d.ts +36 -0
- package/tooling/vite.js +234 -0
- package/src/interfaces/EditorConfiguration.interface.ts +0 -15
- package/tooling/preview.plugin.ts +0 -134
- package/tooling/stylelint.config.mjs +0 -24
- package/tooling/vite.ts +0 -260
|
@@ -18,71 +18,73 @@ const STEP_ORDER: SignupStepKey[] = ['register', 'account', 'connect', 'verify']
|
|
|
18
18
|
* maps a lock state to the route the user has to complete next.
|
|
19
19
|
* keep this the single place that knows about the lock string values.
|
|
20
20
|
*/
|
|
21
|
-
function routeForLock
|
|
21
|
+
function routeForLock(locked?: string): { name: string } {
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (locked === 'user-connect') return { name: 'signup-connect' };
|
|
24
|
+
if (locked === 'email-verified') return { name: 'signup-verify' };
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
return { name: 'members' };
|
|
27
27
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function useSignupFlow
|
|
30
|
+
function useSignupFlow() {
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const userStore = useUserStore();
|
|
33
|
+
const route = useRoute();
|
|
34
|
+
// DEBUG: ?step=<1|2|3|4> forces the active step (dev only)
|
|
35
|
+
const debugStep = computed<SignupStepKey | undefined>(() => {
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
const step = route?.query?.step;
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
if (import.meta.env.DEV && typeof step === 'string') {
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const index = Number(step) - 1;
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
if (index >= 0 && index < STEP_ORDER.length) return STEP_ORDER[index];
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
return undefined;
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
});
|
|
50
|
+
// the furthest step the user has reached, derived from auth + lock state.
|
|
51
|
+
// being authenticated implies register + account are done, even when there
|
|
52
|
+
// is no local customer (e.g. connecting from a different browser).
|
|
53
|
+
const currentKey = computed<SignupStepKey>(() => {
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
if (debugStep.value) return debugStep.value;
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
return (userStore.customer || userStore.userData) ? 'account' : 'register';
|
|
59
|
-
}
|
|
57
|
+
if (!auth.isAuth.value) {
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
return (userStore.customer || userStore.userData) ? 'account' : 'register';
|
|
60
|
+
|
|
61
|
+
}
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
if (userStore.locked === 'user-connect') return 'connect';
|
|
64
|
+
if (userStore.locked === 'email-verified') return 'verify';
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
const isComplete = computed(() => !debugStep.value && auth.isAuth.value && !userStore.locked);
|
|
68
|
-
// steps are monotonic: everything before the current step counts as done
|
|
69
|
-
const steps = computed<SignupStep[]>(() => {
|
|
66
|
+
return 'verify';
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
});
|
|
69
|
+
const isComplete = computed(() => !debugStep.value && auth.isAuth.value && !userStore.locked);
|
|
70
|
+
// steps are monotonic: everything before the current step counts as done
|
|
71
|
+
const steps = computed<SignupStep[]>(() => {
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
key,
|
|
75
|
-
label : `signup-step-${key}`,
|
|
76
|
-
status: isComplete.value || index < currentIndex
|
|
77
|
-
? 'done'
|
|
78
|
-
: index === currentIndex
|
|
79
|
-
? 'current'
|
|
80
|
-
: 'upcoming',
|
|
81
|
-
}));
|
|
73
|
+
const currentIndex = STEP_ORDER.indexOf(currentKey.value);
|
|
82
74
|
|
|
83
|
-
|
|
75
|
+
return STEP_ORDER.map((key, index) => ({
|
|
76
|
+
key,
|
|
77
|
+
label: `signup-step-${key}`,
|
|
78
|
+
status: isComplete.value || index < currentIndex
|
|
79
|
+
? 'done'
|
|
80
|
+
: index === currentIndex
|
|
81
|
+
? 'current'
|
|
82
|
+
: 'upcoming',
|
|
83
|
+
}));
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
return { steps, currentKey, isComplete, routeForLock };
|
|
86
88
|
|
|
87
89
|
}
|
|
88
90
|
|
package/src/plugins/traceable.ts
CHANGED
|
@@ -3,51 +3,53 @@ import useCallStore from '../stores/calls.store';
|
|
|
3
3
|
import type { Ref } from 'vue';
|
|
4
4
|
|
|
5
5
|
const plugin = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
install: (): void => {
|
|
7
|
+
|
|
8
|
+
logger.plugins('traceable installed')
|
|
9
|
+
|
|
10
|
+
},
|
|
9
11
|
};
|
|
10
12
|
const useTraceable = () => {
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
const { addCall, updateCall } = useCallStore();
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
async function traceable<T>(promise: Promise<T>, traceId?: Ref<string|undefined>, options: {time: number} = {time: 3000}) {
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
// add the new call to vuex and fetch the id
|
|
19
|
+
const id = addCall();
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
if(traceId) traceId.value = id;
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
const minimum = new Promise<void>((resolve) => {
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
setTimeout(() => resolve(), options.time);
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
});
|
|
28
|
+
// the minimum promise will hold the execution of allsettled
|
|
29
|
+
const results = await Promise.allSettled([minimum, promise]);
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
// no error will be thrown, we need to check the result of the given promise
|
|
32
|
+
if (results[1].status === 'rejected') {
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
updateCall(id, 'rejected');
|
|
35
|
+
throw results[1].reason;
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
} else {
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
updateCall(id, 'resolved');
|
|
40
|
+
return results[1].value;
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
}
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
}
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
return {
|
|
47
|
+
traceable
|
|
48
|
+
}
|
|
47
49
|
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
export default plugin;
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
useTraceable
|
|
53
55
|
}
|
|
@@ -2,13 +2,13 @@ import { createI18n } from 'vue-i18n';
|
|
|
2
2
|
import de from '../translations/de';
|
|
3
3
|
|
|
4
4
|
const i18n = createI18n({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
legacy: false,
|
|
6
|
+
locale: 'de',
|
|
7
|
+
fallbackLocale: 'de',
|
|
8
|
+
missingWarn: false,
|
|
9
|
+
fallbackWarn: false,
|
|
10
|
+
missing: (_locale, key) => key,
|
|
11
|
+
messages: { de },
|
|
12
12
|
});
|
|
13
13
|
const { t } = i18n.global;
|
|
14
14
|
|
|
@@ -19,9 +19,9 @@ const { t } = i18n.global;
|
|
|
19
19
|
* the strings it renders itself - so a project calls this once at startup with
|
|
20
20
|
* its own translation file.
|
|
21
21
|
*/
|
|
22
|
-
function addMessages
|
|
22
|
+
function addMessages(locale: string, messages: Record<string, unknown>) {
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
i18n.global.mergeLocaleMessage(locale, messages);
|
|
25
25
|
|
|
26
26
|
}
|
|
27
27
|
|
package/src/plugins/youtube.ts
CHANGED
|
@@ -3,78 +3,83 @@ import { ref } from 'vue';
|
|
|
3
3
|
|
|
4
4
|
class Youtube {
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
youtubeApiState = ref<boolean>(false);
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
loadState = ref<boolean>(false);
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
loadApi() {
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
if(this.loadState.value) return Promise.resolve();
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
return new Promise<void>((resolve) => {
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const script = document.createElement('script');
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
script.src = 'https://www.youtube.com/iframe_api';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
script.onload = () => {
|
|
21
|
+
|
|
22
|
+
resolve();
|
|
23
|
+
|
|
24
|
+
};
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
document.body.appendChild(script);
|
|
27
|
+
this.loadState.value = true;
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
}
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
/**
|
|
31
34
|
* load the youtube iframe api and changes the youtubeApiState to true when all is ready
|
|
32
35
|
*/
|
|
33
|
-
|
|
36
|
+
addYoutube() {
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
if(!this.youtubeApiState.value) {
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
this.loadApi()
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
}
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
const youtubePlugin = new Youtube();
|
|
46
49
|
const plugin = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
install: (): void => {
|
|
51
|
+
|
|
52
|
+
// this exists only for initialization purposes
|
|
53
|
+
logger.plugins('youtube installed');
|
|
54
|
+
|
|
55
|
+
},
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
if(typeof window !== 'undefined') {
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
window.onYouTubeIframeAPIReady = () => {
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
youtubePlugin.youtubeApiState.value = true;
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
};
|
|
60
65
|
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
function useYoutube
|
|
68
|
+
function useYoutube() {
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
return {
|
|
71
|
+
youtubeApiState: youtubePlugin.youtubeApiState,
|
|
72
|
+
/**
|
|
68
73
|
* loads the youtube iframe api and changes the youtubeApiState to true when all is ready
|
|
69
74
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
addYoutube: () => youtubePlugin.addYoutube()
|
|
76
|
+
};
|
|
72
77
|
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
export default plugin;
|
|
76
81
|
|
|
77
82
|
export {
|
|
78
|
-
|
|
83
|
+
useYoutube
|
|
79
84
|
};
|
|
80
85
|
|
package/src/routes.ts
CHANGED
|
@@ -7,126 +7,126 @@ import SignupAccountView from './views/signup-account.view.vue';
|
|
|
7
7
|
import DownloadView from './views/download.view.vue';
|
|
8
8
|
|
|
9
9
|
const dynamicRoutes: readonly RouteRecordRaw[] = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
10
|
+
{
|
|
11
|
+
path: '/m/:pathMatch(.*)?',
|
|
12
|
+
name: 'members',
|
|
13
|
+
component: ContentView,
|
|
14
|
+
meta: {
|
|
15
|
+
contentType: 'members'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
path: '/login-callback',
|
|
20
|
+
name: 'login-callback',
|
|
21
|
+
component: LoginView
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
path: '/signup/account',
|
|
25
|
+
name: 'signup-account',
|
|
26
|
+
component: SignupAccountView
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
path: '/signup',
|
|
30
|
+
name: 'signup',
|
|
31
|
+
component: ContentView,
|
|
32
|
+
meta: {
|
|
33
|
+
contentType: 'public'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
path: '/signup/connect',
|
|
38
|
+
name: 'signup-connect',
|
|
39
|
+
component: ContentView,
|
|
40
|
+
meta: {
|
|
41
|
+
contentType: 'public'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
path: '/signup/verify',
|
|
46
|
+
name: 'signup-verify',
|
|
47
|
+
component: ContentView,
|
|
48
|
+
meta: {
|
|
49
|
+
contentType: 'public'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
path: '/signup/done',
|
|
54
|
+
name: 'signup-done',
|
|
55
|
+
component: ContentView,
|
|
56
|
+
meta: {
|
|
57
|
+
contentType: 'public'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: '/download/:app/:filename',
|
|
62
|
+
name: 'download',
|
|
63
|
+
component: DownloadView,
|
|
64
|
+
meta: {
|
|
65
|
+
contentType: 'members'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
path: '',
|
|
70
|
+
name: 'public-home',
|
|
71
|
+
component: ContentView,
|
|
72
|
+
meta: {
|
|
73
|
+
contentType: 'public'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
path: '/:pathMatch(.*)*',
|
|
78
|
+
name: 'public-content',
|
|
79
|
+
component: ContentView,
|
|
80
|
+
meta: {
|
|
81
|
+
contentType: 'public'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
84
|
];
|
|
85
85
|
const editorRoutes: readonly RouteRecordRaw[] = [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
{
|
|
87
|
+
path: '/:pathMatch(.*)*',
|
|
88
|
+
name: 'editor',
|
|
89
|
+
component: EditorView
|
|
90
|
+
},
|
|
91
91
|
];
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* the module gallery is the design itself, so the project provides the views.
|
|
95
95
|
* testView is dev only and is left out of a production build.
|
|
96
96
|
*/
|
|
97
|
-
function createPreviewRoutes
|
|
97
|
+
function createPreviewRoutes(previewView: Component, testView?: Component): readonly RouteRecordRaw[] {
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
const testRoutes: RouteRecordRaw[] = testView && import.meta.env.DEV
|
|
100
|
+
? [
|
|
101
|
+
{
|
|
102
|
+
path: '/test/:name',
|
|
103
|
+
name: 'test-view',
|
|
104
|
+
component: testView,
|
|
105
|
+
meta: {
|
|
106
|
+
testOnly: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
]
|
|
110
|
+
: [];
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
112
|
+
return [
|
|
113
|
+
...testRoutes,
|
|
114
|
+
{
|
|
115
|
+
path: '/:pathMatch(.*)*',
|
|
116
|
+
name: 'preview',
|
|
117
|
+
component: previewView
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
path: '',
|
|
121
|
+
name: 'preview-home',
|
|
122
|
+
component: previewView
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
125
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
dynamicRoutes,
|
|
130
|
+
editorRoutes,
|
|
131
|
+
createPreviewRoutes
|
|
132
132
|
};
|