fcad-core-dragon 2.0.0-beta.1 → 2.0.0-beta.3
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/.editorconfig +33 -33
- package/.eslintignore +29 -29
- package/{.eslintrc.js → .eslintrc.cjs} +81 -86
- package/CHANGELOG +364 -364
- package/README.md +71 -71
- package/bk.scss +117 -0
- package/package.json +61 -63
- package/src/$locales/en.json +143 -179
- package/src/$locales/fr.json +105 -181
- package/src/assets/data/onboardingMessages.json +47 -47
- package/src/components/AppBase.vue +1054 -614
- package/src/components/AppBaseButton.vue +87 -63
- package/src/components/AppBaseErrorDisplay.vue +438 -420
- package/src/components/AppBaseFlipCard.vue +84 -83
- package/src/components/AppBaseModule.vue +1673 -1842
- package/src/components/AppBasePage.vue +779 -312
- package/src/components/AppBasePopover.vue +41 -0
- package/src/components/AppCompAudio.vue +234 -0
- package/src/components/AppCompBranchButtons.vue +552 -582
- package/src/components/AppCompButtonProgress.vue +126 -147
- package/src/components/AppCompCarousel.vue +298 -192
- package/src/components/AppCompInputCheckBoxNext.vue +195 -0
- package/src/components/AppCompInputDropdownNext.vue +159 -0
- package/src/components/AppCompInputRadioNext.vue +152 -0
- package/src/components/{AppCompInputTextBox.vue → AppCompInputTextNext.vue} +106 -91
- package/src/components/AppCompInputTextTableNext.vue +141 -0
- package/src/components/AppCompInputTextToFillDropdownNext.vue +230 -0
- package/src/components/{AppCompInputTextToFillText.vue → AppCompInputTextToFillNext.vue} +171 -164
- package/src/components/AppCompJauge.vue +74 -55
- package/src/components/AppCompMenu.vue +413 -209
- package/src/components/AppCompMenuItem.vue +228 -174
- package/src/components/AppCompNavigation.vue +960 -949
- package/src/components/AppCompNoteCall.vue +133 -126
- package/src/components/AppCompNoteCredit.vue +292 -164
- package/src/components/AppCompPlayBar.vue +1218 -1319
- package/src/components/AppCompPlayBarNext.vue +2052 -0
- package/src/components/AppCompPlayBarProgress.vue +82 -0
- package/src/components/AppCompPopUpNext.vue +503 -0
- package/src/components/{AppCompQuiz.vue → AppCompQuizNext.vue} +2904 -2989
- package/src/components/AppCompQuizRecall.vue +276 -250
- package/src/components/AppCompSVGNext.vue +347 -0
- package/src/components/AppCompSettingsMenu.vue +172 -171
- package/src/components/AppCompTableOfContent.vue +387 -264
- package/src/components/AppCompTranscript.vue +24 -19
- package/src/components/AppCompVideoPlayer.vue +368 -336
- package/src/components/AppCompViewDisplay.vue +6 -6
- package/src/components/BaseModule.vue +72 -67
- package/src/composables/useQuiz.js +206 -0
- package/src/externalComps/ModuleView.vue +22 -0
- package/src/externalComps/SummaryView.vue +91 -0
- package/src/main.js +272 -227
- package/src/mixins/$mediaMixins.js +819 -0
- package/src/mixins/timerMixin.js +155 -156
- package/src/module/stores/appStore.js +893 -0
- package/src/module/xapi/ADL.js +376 -339
- package/src/module/xapi/Crypto/Hasher.js +241 -241
- package/src/module/xapi/Crypto/WordArray.js +278 -278
- package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
- package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -319
- package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
- package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
- package/src/module/xapi/Crypto/encoders/Base.js +105 -105
- package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
- package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
- package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
- package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
- package/src/module/xapi/Crypto/index.js +53 -53
- package/src/module/xapi/Statement/activity.js +47 -47
- package/src/module/xapi/Statement/agent.js +55 -55
- package/src/module/xapi/Statement/group.js +26 -26
- package/src/module/xapi/Statement/index.js +259 -259
- package/src/module/xapi/Statement/statement.js +253 -253
- package/src/module/xapi/Statement/statementRef.js +23 -23
- package/src/module/xapi/Statement/substatement.js +22 -22
- package/src/module/xapi/Statement/verb.js +36 -36
- package/src/module/xapi/activitytypes.js +17 -17
- package/src/module/xapi/launch.js +157 -157
- package/src/module/xapi/utils.js +167 -167
- package/src/module/xapi/verbs.js +294 -294
- package/src/module/xapi/wrapper.js +1963 -1890
- package/src/module/xapi/xapiStatement.js +444 -444
- package/src/plugins/bus.js +8 -3
- package/src/plugins/gsap.js +14 -17
- package/src/plugins/helper.js +308 -295
- package/src/plugins/i18n.js +44 -31
- package/src/plugins/idb.js +219 -212
- package/src/plugins/save.js +37 -37
- package/src/plugins/scorm.js +287 -287
- package/src/plugins/xapi.js +11 -11
- package/src/public/index.html +33 -21
- package/src/router/index.js +43 -41
- package/src/router/routes.js +312 -337
- package/src/shared/generalfuncs.js +210 -188
- package/src/shared/validators.js +1069 -249
- package/vite.config.js +27 -0
- package/.prettierrc.js +0 -5
- package/babel.config.js +0 -3
- package/src/components/AppBaseDragChoice.vue +0 -91
- package/src/components/AppBaseDropZone.vue +0 -112
- package/src/components/AppCompBif.vue +0 -120
- package/src/components/AppCompDragAndDrop.vue +0 -339
- package/src/components/AppCompInputAssociation.vue +0 -332
- package/src/components/AppCompInputCheckBox.vue +0 -227
- package/src/components/AppCompInputDropdown.vue +0 -184
- package/src/components/AppCompInputRadio.vue +0 -169
- package/src/components/AppCompInputTextTable.vue +0 -155
- package/src/components/AppCompInputTextToFillDropdown.vue +0 -255
- package/src/components/AppCompMediaPlayer.vue +0 -397
- package/src/components/AppCompPopUp.vue +0 -522
- package/src/components/AppCompPopover.vue +0 -27
- package/src/components/AppCompSVG.vue +0 -309
- package/src/mixins/$pageMixins.js +0 -459
- package/src/mixins/$quizMixins.js +0 -456
- package/src/module/store.js +0 -895
- package/src/plugins/timeManager.js +0 -77
- package/src/routes_bckp.js +0 -313
- package/src/routes_static.js +0 -344
- package/vue.config.js +0 -83
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export default function timeManager(Vue) {
|
|
2
|
-
Vue.prototype.$timeManager = new Vue({
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
lessonTimeCounter: 0,
|
|
6
|
-
//activityTimeCounter: 0,
|
|
7
|
-
lessonDuration: 0,
|
|
8
|
-
activityDuration: 0,
|
|
9
|
-
activityInterval: null,
|
|
10
|
-
lessonInterval: null,
|
|
11
|
-
fullInterval: null
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
methods: {
|
|
15
|
-
/* Start the timer */
|
|
16
|
-
startTimer(op) {
|
|
17
|
-
if (op && !['activity', 'lesson'].includes(op))
|
|
18
|
-
throw new Error('this is not a valid option for the timer')
|
|
19
|
-
|
|
20
|
-
switch (op) {
|
|
21
|
-
case 'activity':
|
|
22
|
-
this.activityInterval = setInterval(() => {
|
|
23
|
-
this.activityDuration += 1
|
|
24
|
-
}, 1000)
|
|
25
|
-
|
|
26
|
-
break
|
|
27
|
-
|
|
28
|
-
case 'lesson':
|
|
29
|
-
this.lessonInterval = setInterval(() => {
|
|
30
|
-
this.lessonTimeCounter += 1
|
|
31
|
-
}, 1000)
|
|
32
|
-
break
|
|
33
|
-
|
|
34
|
-
default:
|
|
35
|
-
this.fullInterval = setInterval(() => {
|
|
36
|
-
this.activityDuration += 1
|
|
37
|
-
this.lessonDuration += 1
|
|
38
|
-
}, 1000)
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
/* Stop the timer and reset thimer to zero */
|
|
42
|
-
stopTimer(op) {
|
|
43
|
-
if (op && !['activity', 'lesson'].includes(op))
|
|
44
|
-
throw new Error('this is not a valid parameter')
|
|
45
|
-
|
|
46
|
-
if (op === 'activity' && this.activityDuration > 0) {
|
|
47
|
-
clearInterval(this.activityInterval)
|
|
48
|
-
this.activityDuration = 0
|
|
49
|
-
} else if (op === 'lesson' && this.lessonDuration > 0) {
|
|
50
|
-
clearInterval(this.lessonInterval)
|
|
51
|
-
this.lessonDuration = 0
|
|
52
|
-
} else {
|
|
53
|
-
clearInterval(this.fullInterval)
|
|
54
|
-
this.activityDuration = 0
|
|
55
|
-
this.lessonDuration = 0
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
/* Pause the timer but does not reset to zero*/
|
|
59
|
-
pauseTimer(op) {
|
|
60
|
-
if (op && !['activity', 'lesson'].includes(op))
|
|
61
|
-
throw new Error('this is not a valid parameter')
|
|
62
|
-
|
|
63
|
-
if (op === 'activity' && this.activityDuration > 0) {
|
|
64
|
-
window.clearInterval(this.activityDuration)
|
|
65
|
-
} else if (op === 'lesson') {
|
|
66
|
-
window.clearInterval(this.lessonDuration)
|
|
67
|
-
} else {
|
|
68
|
-
clearInterval(this.fullInterval)
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
formatTime(seconds) {
|
|
72
|
-
let t = new Date(null)
|
|
73
|
-
t.setSeconds(seconds)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
}
|
package/src/routes_bckp.js
DELETED
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import Router from 'vue-router'
|
|
2
|
-
import AppCompViewDisplay from './components/AppCompViewDisplay.vue'
|
|
3
|
-
import store from './module/store'
|
|
4
|
-
import { fileAssets } from './shared/generalfuncs'
|
|
5
|
-
import ModuleView from '@/views/ModuleView.vue'
|
|
6
|
-
import SummaryView from '@/views/SummaryView.vue'
|
|
7
|
-
/**
|
|
8
|
-
* The router Module defines the routes of the App by:
|
|
9
|
-
* loading the required files for module and activities pages,
|
|
10
|
-
* dynamically creating the navigation route of module base on the file in VIEWS folder
|
|
11
|
-
* dynamically creating the navigation routes of activities and branchings base on the files contained in the MODULE
|
|
12
|
-
* Creating Redirection routes for navigation error
|
|
13
|
-
* Adding the pages for the module in the STORE
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const _routes = [] // routes of the app
|
|
17
|
-
let errorType = null
|
|
18
|
-
let viewRoute = null // holder for views routes
|
|
19
|
-
let mappedFiles = null // routes definitions
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 1- Preparing the router to catch failing navigation error from browser by
|
|
23
|
-
* Redefining the Router push method
|
|
24
|
-
* ref: https://stackoverflow.com/questions/57837758/ navigationduplicated-navigating-to-current-location-search-is-not-allowed
|
|
25
|
-
*/
|
|
26
|
-
const originalPush = Router.prototype.push
|
|
27
|
-
Router.prototype.push = function push(location) {
|
|
28
|
-
return originalPush.call(this, location).catch((err) => err)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Creating 1st route: redirection for none existing route to home(Module)
|
|
32
|
-
_routes.push({
|
|
33
|
-
path: '*',
|
|
34
|
-
redirect: {
|
|
35
|
-
name: '404'
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 2 - Creating the 2nd route: The App module route
|
|
41
|
-
*/
|
|
42
|
-
// Load all the files in the VIEWS folder
|
|
43
|
-
|
|
44
|
-
const defaultRoute = {
|
|
45
|
-
path: '/',
|
|
46
|
-
component: AppCompViewDisplay,
|
|
47
|
-
children: [],
|
|
48
|
-
meta: {}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (fileAssets.getViews().length > 0) {
|
|
52
|
-
let hasModule = false
|
|
53
|
-
let hasSummary = false
|
|
54
|
-
let fileRef = null
|
|
55
|
-
let splitted = null
|
|
56
|
-
let fileName = null
|
|
57
|
-
let fileContent = null
|
|
58
|
-
|
|
59
|
-
for (let view of fileAssets.getViews()) {
|
|
60
|
-
fileRef = view.replace(/(\.\/)/g, '')
|
|
61
|
-
splitted = fileRef.split('/')
|
|
62
|
-
fileName = splitted[splitted.length - 1].replace(/(\.vue)/g, '')
|
|
63
|
-
fileContent = fileAssets.fetchFileContent(`./${fileRef}`).default
|
|
64
|
-
|
|
65
|
-
// Create route for the views
|
|
66
|
-
viewRoute = {
|
|
67
|
-
name: fileName.toLowerCase(),
|
|
68
|
-
|
|
69
|
-
meta: {}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (fileName.toLowerCase() === 'moduleview' && fileContent.data) {
|
|
73
|
-
viewRoute.path = ''
|
|
74
|
-
viewRoute.name = 'module'
|
|
75
|
-
// viewRoute.meta.type = 'normal'
|
|
76
|
-
viewRoute.component = ModuleView
|
|
77
|
-
viewRoute.children = []
|
|
78
|
-
viewRoute.meta.children = []
|
|
79
|
-
hasModule = true
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (fileName.toLowerCase() == 'summaryview' && fileContent.data) {
|
|
83
|
-
viewRoute.path = '/menu'
|
|
84
|
-
viewRoute.name = 'menu'
|
|
85
|
-
viewRoute.component = SummaryView
|
|
86
|
-
viewRoute.meta.type = 'page_menu'
|
|
87
|
-
hasSummary = true
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
defaultRoute.children.push(viewRoute)
|
|
91
|
-
}
|
|
92
|
-
// Create activities routes for the ModuleView
|
|
93
|
-
if (hasModule) {
|
|
94
|
-
const moduleRoute = defaultRoute.children.find((r) => r.name == 'module') //Get ModuleView route
|
|
95
|
-
//================== Routes For Activities ================//
|
|
96
|
-
// Load files in module folder
|
|
97
|
-
const _allFiles = fileAssets.getActivities()
|
|
98
|
-
mappedFiles = fileAssets.buildMapTree(_allFiles)
|
|
99
|
-
let abstractRouteForActivity = {}
|
|
100
|
-
if (!mappedFiles.size) errorType = 'errorPage'
|
|
101
|
-
|
|
102
|
-
//There is a file in the module folder
|
|
103
|
-
/**
|
|
104
|
-
* Define a route for each Activity and its pages
|
|
105
|
-
* Set all nested routes in Activities
|
|
106
|
-
* Set the activies routes as children of module route
|
|
107
|
-
*/
|
|
108
|
-
let activityCount = 0
|
|
109
|
-
|
|
110
|
-
const buildRouteWithNested = ($arr, $folderName, ctx = '') => {
|
|
111
|
-
let bCounter = 0 //branch counter
|
|
112
|
-
|
|
113
|
-
let mainRoute = {}
|
|
114
|
-
for (const [key, value] of $arr) {
|
|
115
|
-
let pgIDtoNum = parseInt(key.slice(1))
|
|
116
|
-
let firstEl = $arr.entries().next().value
|
|
117
|
-
|
|
118
|
-
if (value.constructor === Map)
|
|
119
|
-
buildRouteWithNested(value, $folderName, ctx)
|
|
120
|
-
if (key == firstEl[0]) {
|
|
121
|
-
mainRoute = {
|
|
122
|
-
path: `page-${pgIDtoNum}`,
|
|
123
|
-
name: `${ctx.replace('-', '_')}.page_${pgIDtoNum}`,
|
|
124
|
-
// name: `${$folderName}.page_${pgIDtoNum}`,
|
|
125
|
-
component: () =>
|
|
126
|
-
import(
|
|
127
|
-
/* webpackChunkName: "home" */
|
|
128
|
-
`@/${firstEl[1].ref}`
|
|
129
|
-
),
|
|
130
|
-
children: [],
|
|
131
|
-
meta: {
|
|
132
|
-
id: firstEl[0],
|
|
133
|
-
type: 'branching',
|
|
134
|
-
activity_ref: $folderName, // Axx
|
|
135
|
-
parent: {
|
|
136
|
-
_ref: 'P01',
|
|
137
|
-
_path: ctx, // activite-xx
|
|
138
|
-
_namedRoute: ctx.replace('-', '_') // activite_xx
|
|
139
|
-
},
|
|
140
|
-
children: []
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
} else {
|
|
144
|
-
bCounter += 1
|
|
145
|
-
// build abstract route for branching
|
|
146
|
-
let branchRoute = {
|
|
147
|
-
path: `:branche-${bCounter}`,
|
|
148
|
-
name: `${mainRoute.name}.branche_${bCounter}`,
|
|
149
|
-
component: () =>
|
|
150
|
-
import(
|
|
151
|
-
/* webpackChunkName: "gpNested" */
|
|
152
|
-
`@/${value.ref}`
|
|
153
|
-
),
|
|
154
|
-
meta: {
|
|
155
|
-
id: key,
|
|
156
|
-
type: 'branch_page',
|
|
157
|
-
activity_ref: $folderName,
|
|
158
|
-
_branchingRef: `${firstEl[0]}.branch_${bCounter}`,
|
|
159
|
-
parent: {
|
|
160
|
-
_ref: firstEl[0],
|
|
161
|
-
_path: mainRoute.path,
|
|
162
|
-
_namedRoute: mainRoute.name
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
mainRoute.children.push(branchRoute)
|
|
167
|
-
mainRoute.meta.children.push({
|
|
168
|
-
_ref: key,
|
|
169
|
-
_path: branchRoute.path,
|
|
170
|
-
_namedRoute: branchRoute.name
|
|
171
|
-
})
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return mainRoute
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
for (const [$folderName, $pages] of mappedFiles) {
|
|
178
|
-
let activityPageCount = 0 // page counter
|
|
179
|
-
//build a abstract route for each folder/activity
|
|
180
|
-
abstractRouteForActivity = {
|
|
181
|
-
component: AppCompViewDisplay,
|
|
182
|
-
meta: {
|
|
183
|
-
id: $folderName,
|
|
184
|
-
children: []
|
|
185
|
-
},
|
|
186
|
-
children: []
|
|
187
|
-
}
|
|
188
|
-
//Define the path for each folder
|
|
189
|
-
if ($folderName === 'A00') {
|
|
190
|
-
abstractRouteForActivity.path = 'introduction'
|
|
191
|
-
} else if ($folderName === 'A99') {
|
|
192
|
-
abstractRouteForActivity.path = 'conclusion'
|
|
193
|
-
} else {
|
|
194
|
-
activityCount++
|
|
195
|
-
abstractRouteForActivity.path = `activite-${activityCount}`
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
//Build the Route for each page of the Activity
|
|
199
|
-
for (const [$pageRef, $page] of $pages) {
|
|
200
|
-
let activityRoute
|
|
201
|
-
activityPageCount++
|
|
202
|
-
|
|
203
|
-
if ($page.constructor === Object) {
|
|
204
|
-
let firstPage = $pages.entries().next().value
|
|
205
|
-
|
|
206
|
-
if ($pageRef == firstPage[0]) {
|
|
207
|
-
activityRoute = {
|
|
208
|
-
path: 'page-1',
|
|
209
|
-
name: abstractRouteForActivity.path.replace('-', '_'), //activite_xx
|
|
210
|
-
component: () =>
|
|
211
|
-
import(/* webpackChunkName: "gpNested" */ `@/${$page.ref}`),
|
|
212
|
-
meta: {
|
|
213
|
-
id: `${$pageRef}`,
|
|
214
|
-
activity_ref: { $folderName },
|
|
215
|
-
parent: {
|
|
216
|
-
_ref: `${$pageRef}`,
|
|
217
|
-
_path: abstractRouteForActivity.path,
|
|
218
|
-
_namedRoute: abstractRouteForActivity.path.replace('-', '_')
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
223
|
-
activityRoute = {
|
|
224
|
-
path: `page-${activityPageCount}`,
|
|
225
|
-
name: (() => {
|
|
226
|
-
let str = abstractRouteForActivity.path.replace('-', '_')
|
|
227
|
-
|
|
228
|
-
if (activityPageCount > 1)
|
|
229
|
-
str = `${str}.page_${activityPageCount}`
|
|
230
|
-
|
|
231
|
-
return str
|
|
232
|
-
})(),
|
|
233
|
-
component: () =>
|
|
234
|
-
import(/* webpackChunkName: "gpNested" */ `@/${$page.ref}`),
|
|
235
|
-
meta: {
|
|
236
|
-
id: $pageRef,
|
|
237
|
-
activity_ref: $folderName,
|
|
238
|
-
parent: {
|
|
239
|
-
_ref: `${$pageRef}`,
|
|
240
|
-
_path: abstractRouteForActivity.path,
|
|
241
|
-
_namedRoute: abstractRouteForActivity.path.replace('-', '_')
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
//Handling Branching Routes
|
|
248
|
-
if ($page.constructor === Map) {
|
|
249
|
-
const ctx = abstractRouteForActivity.path
|
|
250
|
-
activityRoute = buildRouteWithNested($page, $folderName, ctx)
|
|
251
|
-
}
|
|
252
|
-
//add page route into activity children
|
|
253
|
-
abstractRouteForActivity.children.push(activityRoute)
|
|
254
|
-
|
|
255
|
-
//add page route reference into in activity meta
|
|
256
|
-
abstractRouteForActivity.meta.children.push({
|
|
257
|
-
_ref: activityRoute.meta.id,
|
|
258
|
-
_path: activityRoute.path,
|
|
259
|
-
_namedRoute: activityRoute.name
|
|
260
|
-
})
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
moduleRoute.meta.children.push({
|
|
264
|
-
_ref: $folderName,
|
|
265
|
-
_path: abstractRouteForActivity.path,
|
|
266
|
-
_namedRoute: abstractRouteForActivity.path.replace('-', '_')
|
|
267
|
-
})
|
|
268
|
-
|
|
269
|
-
moduleRoute.children.push(abstractRouteForActivity)
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// Add register Module pages to store
|
|
273
|
-
store.state.thisModule.activities = mappedFiles
|
|
274
|
-
|
|
275
|
-
// Set Module route as child of abstract route. Module will render inside abstract component
|
|
276
|
-
} else errorType = 'errorModule'
|
|
277
|
-
if (!hasSummary) errorType = 'errorMenu'
|
|
278
|
-
} else errorType = 'errorModule'
|
|
279
|
-
|
|
280
|
-
if (!errorType) {
|
|
281
|
-
// add the viewRoute to the routes array
|
|
282
|
-
_routes.push(defaultRoute)
|
|
283
|
-
} else {
|
|
284
|
-
// create Route for error non-existing files
|
|
285
|
-
_routes.push({
|
|
286
|
-
path: '/',
|
|
287
|
-
component: () =>
|
|
288
|
-
import(
|
|
289
|
-
/* webpackChunkName: "gpNested" */ `./components/AppBaseErrorDisplay.vue`
|
|
290
|
-
),
|
|
291
|
-
props: {
|
|
292
|
-
errorMessage: errorType
|
|
293
|
-
}
|
|
294
|
-
})
|
|
295
|
-
}
|
|
296
|
-
// Routes for errors : 404
|
|
297
|
-
_routes.push({
|
|
298
|
-
path: '/404',
|
|
299
|
-
name: '404',
|
|
300
|
-
component: () =>
|
|
301
|
-
import(
|
|
302
|
-
/* webpackChunkName: "gpNested" */ `./components/AppBaseErrorDisplay.vue`
|
|
303
|
-
),
|
|
304
|
-
props: {
|
|
305
|
-
errorMessage: '404'
|
|
306
|
-
}
|
|
307
|
-
})
|
|
308
|
-
|
|
309
|
-
// exporting routes object
|
|
310
|
-
export default {
|
|
311
|
-
base: process.env.BASE_URL,
|
|
312
|
-
routes: [..._routes]
|
|
313
|
-
}
|