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.
Files changed (118) hide show
  1. package/.editorconfig +33 -33
  2. package/.eslintignore +29 -29
  3. package/{.eslintrc.js → .eslintrc.cjs} +81 -86
  4. package/CHANGELOG +364 -364
  5. package/README.md +71 -71
  6. package/bk.scss +117 -0
  7. package/package.json +61 -63
  8. package/src/$locales/en.json +143 -179
  9. package/src/$locales/fr.json +105 -181
  10. package/src/assets/data/onboardingMessages.json +47 -47
  11. package/src/components/AppBase.vue +1054 -614
  12. package/src/components/AppBaseButton.vue +87 -63
  13. package/src/components/AppBaseErrorDisplay.vue +438 -420
  14. package/src/components/AppBaseFlipCard.vue +84 -83
  15. package/src/components/AppBaseModule.vue +1673 -1842
  16. package/src/components/AppBasePage.vue +779 -312
  17. package/src/components/AppBasePopover.vue +41 -0
  18. package/src/components/AppCompAudio.vue +234 -0
  19. package/src/components/AppCompBranchButtons.vue +552 -582
  20. package/src/components/AppCompButtonProgress.vue +126 -147
  21. package/src/components/AppCompCarousel.vue +298 -192
  22. package/src/components/AppCompInputCheckBoxNext.vue +195 -0
  23. package/src/components/AppCompInputDropdownNext.vue +159 -0
  24. package/src/components/AppCompInputRadioNext.vue +152 -0
  25. package/src/components/{AppCompInputTextBox.vue → AppCompInputTextNext.vue} +106 -91
  26. package/src/components/AppCompInputTextTableNext.vue +141 -0
  27. package/src/components/AppCompInputTextToFillDropdownNext.vue +230 -0
  28. package/src/components/{AppCompInputTextToFillText.vue → AppCompInputTextToFillNext.vue} +171 -164
  29. package/src/components/AppCompJauge.vue +74 -55
  30. package/src/components/AppCompMenu.vue +413 -209
  31. package/src/components/AppCompMenuItem.vue +228 -174
  32. package/src/components/AppCompNavigation.vue +960 -949
  33. package/src/components/AppCompNoteCall.vue +133 -126
  34. package/src/components/AppCompNoteCredit.vue +292 -164
  35. package/src/components/AppCompPlayBar.vue +1218 -1319
  36. package/src/components/AppCompPlayBarNext.vue +2052 -0
  37. package/src/components/AppCompPlayBarProgress.vue +82 -0
  38. package/src/components/AppCompPopUpNext.vue +503 -0
  39. package/src/components/{AppCompQuiz.vue → AppCompQuizNext.vue} +2904 -2989
  40. package/src/components/AppCompQuizRecall.vue +276 -250
  41. package/src/components/AppCompSVGNext.vue +347 -0
  42. package/src/components/AppCompSettingsMenu.vue +172 -171
  43. package/src/components/AppCompTableOfContent.vue +387 -264
  44. package/src/components/AppCompTranscript.vue +24 -19
  45. package/src/components/AppCompVideoPlayer.vue +368 -336
  46. package/src/components/AppCompViewDisplay.vue +6 -6
  47. package/src/components/BaseModule.vue +72 -67
  48. package/src/composables/useQuiz.js +206 -0
  49. package/src/externalComps/ModuleView.vue +22 -0
  50. package/src/externalComps/SummaryView.vue +91 -0
  51. package/src/main.js +272 -227
  52. package/src/mixins/$mediaMixins.js +819 -0
  53. package/src/mixins/timerMixin.js +155 -156
  54. package/src/module/stores/appStore.js +893 -0
  55. package/src/module/xapi/ADL.js +376 -339
  56. package/src/module/xapi/Crypto/Hasher.js +241 -241
  57. package/src/module/xapi/Crypto/WordArray.js +278 -278
  58. package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
  59. package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -319
  60. package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
  61. package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
  62. package/src/module/xapi/Crypto/encoders/Base.js +105 -105
  63. package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
  64. package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
  65. package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
  66. package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
  67. package/src/module/xapi/Crypto/index.js +53 -53
  68. package/src/module/xapi/Statement/activity.js +47 -47
  69. package/src/module/xapi/Statement/agent.js +55 -55
  70. package/src/module/xapi/Statement/group.js +26 -26
  71. package/src/module/xapi/Statement/index.js +259 -259
  72. package/src/module/xapi/Statement/statement.js +253 -253
  73. package/src/module/xapi/Statement/statementRef.js +23 -23
  74. package/src/module/xapi/Statement/substatement.js +22 -22
  75. package/src/module/xapi/Statement/verb.js +36 -36
  76. package/src/module/xapi/activitytypes.js +17 -17
  77. package/src/module/xapi/launch.js +157 -157
  78. package/src/module/xapi/utils.js +167 -167
  79. package/src/module/xapi/verbs.js +294 -294
  80. package/src/module/xapi/wrapper.js +1963 -1890
  81. package/src/module/xapi/xapiStatement.js +444 -444
  82. package/src/plugins/bus.js +8 -3
  83. package/src/plugins/gsap.js +14 -17
  84. package/src/plugins/helper.js +308 -295
  85. package/src/plugins/i18n.js +44 -31
  86. package/src/plugins/idb.js +219 -212
  87. package/src/plugins/save.js +37 -37
  88. package/src/plugins/scorm.js +287 -287
  89. package/src/plugins/xapi.js +11 -11
  90. package/src/public/index.html +33 -21
  91. package/src/router/index.js +43 -41
  92. package/src/router/routes.js +312 -337
  93. package/src/shared/generalfuncs.js +210 -188
  94. package/src/shared/validators.js +1069 -249
  95. package/vite.config.js +27 -0
  96. package/.prettierrc.js +0 -5
  97. package/babel.config.js +0 -3
  98. package/src/components/AppBaseDragChoice.vue +0 -91
  99. package/src/components/AppBaseDropZone.vue +0 -112
  100. package/src/components/AppCompBif.vue +0 -120
  101. package/src/components/AppCompDragAndDrop.vue +0 -339
  102. package/src/components/AppCompInputAssociation.vue +0 -332
  103. package/src/components/AppCompInputCheckBox.vue +0 -227
  104. package/src/components/AppCompInputDropdown.vue +0 -184
  105. package/src/components/AppCompInputRadio.vue +0 -169
  106. package/src/components/AppCompInputTextTable.vue +0 -155
  107. package/src/components/AppCompInputTextToFillDropdown.vue +0 -255
  108. package/src/components/AppCompMediaPlayer.vue +0 -397
  109. package/src/components/AppCompPopUp.vue +0 -522
  110. package/src/components/AppCompPopover.vue +0 -27
  111. package/src/components/AppCompSVG.vue +0 -309
  112. package/src/mixins/$pageMixins.js +0 -459
  113. package/src/mixins/$quizMixins.js +0 -456
  114. package/src/module/store.js +0 -895
  115. package/src/plugins/timeManager.js +0 -77
  116. package/src/routes_bckp.js +0 -313
  117. package/src/routes_static.js +0 -344
  118. package/vue.config.js +0 -83
@@ -1,344 +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
- // const _path = require('path')
6
-
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 newRoute = null // wrapper for module routes
19
- const _allFiles = fileAssets.getActivities()
20
- let mappedFiles = fileAssets.buildMapTree(_allFiles)
21
- let menuCreated = false
22
-
23
- /**
24
- * 1- Preparing the router to catch failing navigation error from browser by
25
- * Redefining the Router push method
26
- * ref: https://stackoverflow.com/questions/57837758/ navigationduplicated-navigating-to-current-location-search-is-not-allowed
27
- */
28
- const originalPush = Router.prototype.push
29
- Router.prototype.push = function push(location) {
30
- return originalPush.call(this, location).catch((err) => err)
31
- }
32
-
33
- // Creating 1st route: redirection for none existing route to home(Module)
34
- _routes.push({
35
- path: '*',
36
- redirect: {
37
- name: '404'
38
- }
39
- })
40
-
41
- /**
42
- * 2 - Creating the 2nd route: The App module route
43
- */
44
- // Load all the files in the VIEWS folder
45
-
46
- const defaultRoute = {
47
- path: '/',
48
- component: AppCompViewDisplay,
49
- children: []
50
- }
51
- errorType = false
52
-
53
- const staticSummary = {
54
- path: '/menu',
55
- component: () =>
56
- import(/* webpackChunkName: "menu" */ `@/views/SummaryView.vue`),
57
- name: 'menu',
58
- meta: {
59
- type: 'page_menu'
60
- }
61
- }
62
-
63
- const staticModule = {
64
- path: '',
65
- component: () =>
66
- import(/* webpackChunkName: "home" */ `@/views/ModuleView.vue`),
67
- name: 'module',
68
- children: [
69
- {
70
- path: 'introduction',
71
- component: AppCompViewDisplay,
72
- children: [
73
- {
74
- path: 'page-1',
75
- name: 'introduction',
76
- component: () =>
77
- import(/* webpackChunkName: "gpNested" */ `@/module/A02/P01.vue`),
78
- meta: {
79
- id: 'P01',
80
- activity_ref: 'A00',
81
- type: 'normal',
82
- parent: {
83
- _ref: 'P01',
84
- _path: 'introduction',
85
- _namedRoute: 'introduction'
86
- }
87
- }
88
- }
89
- ],
90
- meta: {
91
- id: 'A00',
92
- children: [
93
- {
94
- _ref: 'P01',
95
- _path: 'page-1',
96
- _namedRoute: 'introduction'
97
- }
98
- ]
99
- }
100
- },
101
- {
102
- path: 'activite-1',
103
- component: AppCompViewDisplay,
104
- children: [
105
- {
106
- path: 'page-1',
107
- name: 'activite_1',
108
- component: () =>
109
- import(/* webpackChunkName: "gpNested" */ `@/module/A01/P01.vue`),
110
- meta: {
111
- id: 'P01',
112
- activity_ref: 'A01',
113
- type: 'normal',
114
- parent: {
115
- _ref: 'P01',
116
- _path: 'activite-1',
117
- _namedRoute: 'activity_1'
118
- }
119
- }
120
- },
121
- {
122
- path: 'page-2',
123
- name: 'activite_1.page_2',
124
- component: () =>
125
- import(/* webpackChunkName: "gpNested" */ `@/module/A01/P02.vue`),
126
- meta: {
127
- id: 'P02',
128
- activity_ref: 'A01',
129
- type: 'branching',
130
- parent: {
131
- _ref: 'P01',
132
- _path: 'activite-1',
133
- _namedRoute: 'activity_1'
134
- },
135
- children: [
136
- {
137
- _ref: 'P02_E01',
138
- _path: 'branch-1',
139
- _namedRoute: 'A01.page_2.branching_1.branch_1'
140
- },
141
- {
142
- _ref: 'P02_E02',
143
- _path: 'branch-2',
144
- _namedRoute: 'A01.page_2.branching_1.branch_2'
145
- },
146
- {
147
- _ref: 'P02_E03',
148
- _path: 'branch-3',
149
- _namedRoute: 'A01.page_2.branching_1.branch_3'
150
- }
151
- ]
152
- },
153
- children: [
154
- {
155
- path: 'branch-1',
156
- name: 'A01.page_2.branching_1.branch_1',
157
- component: () =>
158
- import(
159
- /* webpackChunkName: "gpNested" */ `@/module/A01/P02_E01.vue`
160
- ),
161
- meta: {
162
- id: 'P02_E01',
163
- activity_ref: 'A01',
164
- type: 'branch',
165
- branching_ref: 'A01.P02.branching_1',
166
- parent: {
167
- _ref: 'P02',
168
- _path: 'activite-1.page-2',
169
- _namedRoute: 'activity_1.page_2'
170
- }
171
- }
172
- },
173
- {
174
- path: 'branch-2',
175
- name: 'A01.page_2.branching_1.branch_2',
176
- component: () =>
177
- import(
178
- /* webpackChunkName: "gpNested" */ `@/module/A01/P02_E02.vue`
179
- ),
180
- meta: {
181
- id: 'P02_E02',
182
- activity_ref: 'A01',
183
- type: 'branch',
184
- branching_ref: 'A01.P02.branching_1',
185
- parent: {
186
- _ref: 'P02',
187
- _path: 'activite-1.page-2',
188
- _namedRoute: 'activity_1.page_2'
189
- }
190
- }
191
- },
192
- {
193
- path: 'branch-3',
194
- name: 'A01.page_2.branching_1.branch_3',
195
- component: () =>
196
- import(
197
- /* webpackChunkName: "gpNested" */ `@/module/A01/P02_E03.vue`
198
- ),
199
- meta: {
200
- id: 'P02_E03',
201
- activity_ref: 'A01',
202
- type: 'branch',
203
- branching_ref: 'A01.P02.branching_1',
204
- parent: {
205
- _ref: 'P02',
206
- _path: 'activite-1.page-2',
207
- _namedRoute: 'activity_1.page_2'
208
- }
209
- }
210
- }
211
- ]
212
- },
213
- {
214
- path: 'page-3',
215
- name: 'activite_1.page_3',
216
- component: () =>
217
- import(/* webpackChunkName: "gpNested" */ `@/module/A01/P03.vue`),
218
- meta: {
219
- id: 'P03',
220
- activity_ref: 'A01',
221
- type: 'normal',
222
- parent: {
223
- _ref: 'P01',
224
- _path: 'activite-1',
225
- _namedRoute: 'activity_1'
226
- }
227
- }
228
- }
229
- ],
230
- meta: {
231
- id: 'A01',
232
- children: [
233
- {
234
- _ref: 'P01',
235
- _path: 'page-1',
236
- _namedRoute: 'activite_1'
237
- },
238
- {
239
- _ref: 'P02',
240
- _path: 'page-2',
241
- _namedRoute: 'activite_1.page_2'
242
- },
243
- {
244
- _ref: 'P03',
245
- _path: 'page-3',
246
- _namedRoute: 'activite_1.page_3'
247
- }
248
- ]
249
- }
250
- },
251
- {
252
- path: 'activite-2',
253
- component: AppCompViewDisplay,
254
- children: [
255
- {
256
- path: 'page-1',
257
- name: 'activite_2',
258
- component: () =>
259
- import(/* webpackChunkName: "gpNested" */ `@/module/A02/P01.vue`),
260
- meta: {
261
- id: 'P01',
262
- activity_ref: 'A02',
263
- type: 'normal',
264
- parent: {
265
- _ref: 'P01',
266
- _path: 'activite-2',
267
- _namedRoute: 'activity_2'
268
- }
269
- }
270
- }
271
- ],
272
- meta: {
273
- id: 'A02',
274
- children: [
275
- {
276
- _ref: 'P01',
277
- _path: 'page-1',
278
- _namedRoute: 'activite_2'
279
- }
280
- ]
281
- }
282
- }
283
- ],
284
- meta: {
285
- id: 'mod_00100',
286
- type: 'normal',
287
- children: [
288
- {
289
- _ref: 'A01',
290
- _path: 'introduction',
291
- _namedRoute: 'introduction'
292
- },
293
- {
294
- _ref: 'A01',
295
- _path: 'activite-1',
296
- _namedRoute: 'activite_1'
297
- },
298
- {
299
- _ref: 'A02',
300
- _path: 'activite-2',
301
- _namedRoute: 'activite_2'
302
- }
303
- ]
304
- }
305
- }
306
- defaultRoute.children.push(staticModule)
307
- defaultRoute.children.push(staticSummary)
308
- if (!errorType) {
309
- // add the newRoute to the routes array
310
- _routes.push(defaultRoute)
311
- } else {
312
- // create Route for error non-existing files
313
- _routes.push({
314
- path: '/',
315
- component: () =>
316
- import(
317
- /* webpackChunkName: "gpNested" */ `./components/AppBaseErrorDisplay.vue`
318
- ),
319
- props: {
320
- errorMessage: errorType
321
- }
322
- })
323
- }
324
- // Routes for errors : 404
325
- _routes.push({
326
- path: '/404',
327
- name: '404',
328
- component: () =>
329
- import(
330
- /* webpackChunkName: "gpNested" */ `./components/AppBaseErrorDisplay.vue`
331
- ),
332
- props: {
333
- errorMessage: '404'
334
- }
335
- })
336
-
337
- // Add register Module pages to store
338
- store.state.thisModule.activities = mappedFiles
339
-
340
- // exporting routes object
341
- export default {
342
- base: process.env.BASE_URL,
343
- routes: [..._routes]
344
- }
package/vue.config.js DELETED
@@ -1,83 +0,0 @@
1
- //const path = require('path')
2
- module.exports = {
3
- chainWebpack: (config) => {
4
- config.module
5
- .rule('vue')
6
- .use('vue-loader')
7
- .loader('vue-loader')
8
- .tap((options) => {
9
- options['transformAssetUrls'] = {
10
- 'b-embend': ['src', 'poster'],
11
- video: ['src', 'poster'],
12
- source: ['src'],
13
- track: 'src',
14
- img: ['src'],
15
- image: 'xlink:href',
16
- 'b-img': 'src',
17
- 'b-img-lazy': ['src', 'blank-src'],
18
- 'b-card': 'img-src',
19
- 'b-card-img': 'src',
20
- 'b-card-img-lazy': ['src', 'blank-src'],
21
- 'b-carousel-slide': 'img-src'
22
- }
23
- return options
24
- })
25
- //.alias.set('rootscr', path.resolve(__dirname, 'src'))
26
- //config.resolve.alias.set('@rootsrc', path.resolve(__dirname, '../src'))
27
-
28
- // adjusting the media rule to include vtt files
29
- config.module
30
- .rule('media')
31
- .test(/\.(vtt|mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/)
32
- //adjusted rule for pdf files
33
- config.module
34
- .rule('pdf')
35
- .test(/\.pdf$/)
36
- .use('file-loader')
37
- .loader('file-loader')
38
- .options({
39
- name: 'docs/[name].[hash:8].[ext]'
40
- })
41
-
42
- // adjusted rule for doc files
43
- config.module
44
- .rule('doc')
45
- .test(/\.(doc|docx)$/)
46
- .use('file-loader')
47
- .loader('file-loader')
48
- .options({
49
- name: 'docs/[name].[hash:8].[ext]'
50
- })
51
-
52
- // adjusted rule for excel files
53
- config.module
54
- .rule('xlsx')
55
- .test(/\.(csv|xlsx|xls)$/)
56
- .use('file-loader')
57
- .loader('file-loader')
58
- .options({
59
- name: 'docs/[name].[hash:8].[ext]'
60
- })
61
-
62
- // adjusted rule for txt files
63
- config.module
64
- .rule('txt')
65
- .test(/\.(txt)$/)
66
- .use('file-loader')
67
- .loader('file-loader')
68
- .options({
69
- name: 'docs/[name].[hash:8].[ext]'
70
- })
71
- },
72
-
73
- //production config path
74
- publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
75
- pluginOptions: {
76
- i18n: {
77
- locale: 'fr',
78
- fallbackLocale: 'fr',
79
- localeDir: 'locales',
80
- enableInSFC: false
81
- }
82
- }
83
- }