fcad-core-dragon 2.1.0-beta.4 → 2.1.1

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 (73) hide show
  1. package/.editorconfig +8 -33
  2. package/.prettierrc +11 -0
  3. package/.vscode/extensions.json +8 -0
  4. package/.vscode/settings.json +16 -0
  5. package/CHANGELOG +20 -0
  6. package/eslint.config.js +60 -0
  7. package/package.json +9 -9
  8. package/src/$locales/en.json +3 -3
  9. package/src/$locales/fr.json +3 -3
  10. package/src/assets/data/onboardingMessages.json +47 -47
  11. package/src/components/AppBase.vue +5 -6
  12. package/src/components/AppBaseErrorDisplay.vue +438 -438
  13. package/src/components/AppBaseFlipCard.vue +84 -84
  14. package/src/components/AppBaseModule.vue +15 -17
  15. package/src/components/AppBasePage.vue +91 -8
  16. package/src/components/AppBasePopover.vue +41 -41
  17. package/src/components/AppBaseSkeleton.vue +24 -3
  18. package/src/components/AppCompAudio.vue +12 -2
  19. package/src/components/AppCompInputCheckBoxNx.vue +1 -2
  20. package/src/components/AppCompInputRadioNx.vue +8 -2
  21. package/src/components/AppCompInputTextToFillDropdownNx.vue +45 -0
  22. package/src/components/AppCompMenu.vue +423 -423
  23. package/src/components/AppCompNavigation.vue +2 -2
  24. package/src/components/AppCompPlayBarNext.vue +123 -94
  25. package/src/components/AppCompPopUpNext.vue +2 -2
  26. package/src/components/AppCompQuizNext.vue +12 -2
  27. package/src/components/AppCompQuizRecall.vue +10 -4
  28. package/src/components/AppCompSettingsMenu.vue +172 -172
  29. package/src/components/AppCompTableOfContent.vue +1 -4
  30. package/src/components/AppCompVideoPlayer.vue +7 -0
  31. package/src/components/AppCompViewDisplay.vue +6 -6
  32. package/src/composables/useTimer.js +17 -20
  33. package/src/externalComps/ModuleView.vue +22 -22
  34. package/src/externalComps/SummaryView.vue +91 -91
  35. package/src/main.js +5 -5
  36. package/src/module/stores/appStore.js +0 -1
  37. package/src/module/xapi/Crypto/Hasher.js +241 -241
  38. package/src/module/xapi/Crypto/WordArray.js +278 -278
  39. package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
  40. package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -315
  41. package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
  42. package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
  43. package/src/module/xapi/Crypto/encoders/Base.js +105 -105
  44. package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
  45. package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
  46. package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
  47. package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
  48. package/src/module/xapi/Crypto/index.js +53 -53
  49. package/src/module/xapi/Statement/activity.js +47 -47
  50. package/src/module/xapi/Statement/agent.js +55 -55
  51. package/src/module/xapi/Statement/group.js +26 -26
  52. package/src/module/xapi/Statement/index.js +259 -259
  53. package/src/module/xapi/Statement/statement.js +253 -253
  54. package/src/module/xapi/Statement/statementRef.js +23 -23
  55. package/src/module/xapi/Statement/substatement.js +22 -22
  56. package/src/module/xapi/Statement/verb.js +36 -36
  57. package/src/module/xapi/activitytypes.js +17 -17
  58. package/src/module/xapi/utils.js +167 -167
  59. package/src/module/xapi/verbs.js +294 -294
  60. package/src/module/xapi/xapiStatement.js +444 -444
  61. package/src/plugins/analytics.js +4 -4
  62. package/src/plugins/bus.js +8 -8
  63. package/src/plugins/gsap.js +4 -2
  64. package/src/plugins/helper.js +8 -4
  65. package/src/plugins/save.js +37 -37
  66. package/src/plugins/scorm.js +287 -287
  67. package/src/plugins/xapi.js +11 -11
  68. package/src/public/index.html +33 -33
  69. package/src/router/index.js +1 -1
  70. package/src/shared/validators.js +22 -6
  71. package/.eslintignore +0 -29
  72. package/.eslintrc.cjs +0 -81
  73. package/bk.scss +0 -117
@@ -1,9 +1,9 @@
1
1
  import { event } from 'vue-gtag'
2
2
  import VueGtag from 'vue-gtag'
3
3
 
4
- export default function analytics(app, name) {
5
- Object.defineProperty(app.config.globalProperties, name, {
6
- value: {
4
+ export default {
5
+ install: (app) => {
6
+ app.config.globalProperties.$analytics = {
7
7
  analyticsEnabled: false,
8
8
  //Initialize the vue-gtag plugin if a valid analytics id is provided in App.vue
9
9
  init(analytics_id, router) {
@@ -30,5 +30,5 @@ export default function analytics(app, name) {
30
30
  }
31
31
  }
32
32
  }
33
- })
33
+ }
34
34
  }
@@ -1,8 +1,8 @@
1
- import emitter from 'tiny-emitter/instance'
2
-
3
- export default {
4
- $on: (...args) => emitter.on(...args),
5
- $once: (...args) => emitter.once(...args),
6
- $off: (...args) => emitter.off(...args),
7
- $emit: (...args) => emitter.emit(...args)
8
- }
1
+ import emitter from 'tiny-emitter/instance'
2
+
3
+ export default {
4
+ $on: (...args) => emitter.on(...args),
5
+ $once: (...args) => emitter.once(...args),
6
+ $off: (...args) => emitter.off(...args),
7
+ $emit: (...args) => emitter.emit(...args)
8
+ }
@@ -10,6 +10,8 @@ import { Flip } from 'gsap/Flip'
10
10
 
11
11
  gsap.registerPlugin(MotionPathPlugin, ScrollTrigger, Flip)
12
12
  gsap.ScrollTrigger = ScrollTrigger
13
- export default function GsapPlugin(app, name) {
14
- app.config.globalProperties.$gsap = gsap
13
+ export default {
14
+ install: (app) => {
15
+ app.config.globalProperties.$gsap = gsap
16
+ }
15
17
  }
@@ -7,9 +7,9 @@ import axios from 'axios'
7
7
  import locale_en from '../$locales/en.json'
8
8
  import locale_fr from '../$locales/fr.json'
9
9
 
10
- export default function helper(app, name) {
11
- Object.defineProperty(app.config.globalProperties, name, {
12
- value: {
10
+ export default {
11
+ install: (app) => {
12
+ app.config.globalProperties.$helper = {
13
13
  /***
14
14
  * @description: helper to get the collection of routes of activies from vue-Router.
15
15
  * @note If need more info from the router , use directly the vue-router
@@ -157,6 +157,10 @@ export default function helper(app, name) {
157
157
  // HyperText Markup Language (HTML)
158
158
  mimeType = 'text/html'
159
159
  break
160
+ case aType.endsWith('.ggb') || aType.endsWith('.ggb'):
161
+ // HyperText Markup Language (HTML)
162
+ mimeType = 'text/xml'
163
+ break
160
164
  }
161
165
 
162
166
  return mimeType
@@ -350,5 +354,5 @@ export default function helper(app, name) {
350
354
  return array.includes(value)
351
355
  }
352
356
  }
353
- })
357
+ }
354
358
  }
@@ -1,37 +1,37 @@
1
- /* creating a small save plug-in to save store state in the localStorage
2
- * the plugin listen for mutations made to the Pinia store and store them in the local browser storage.
3
- * This prevent reseting the store to initial state when the browser refreshes
4
- * Note: the plugin is used in the store.js
5
- */
6
- export function saveStatePlugin(store) {
7
- store.subscribe((mutation, state) => {
8
- // save the user data
9
- if (Object.entries(state.$appStore.userMetaData).length) {
10
- localStorage.setItem(
11
- 'userData',
12
- JSON.stringify(state.$appStore.userMetaData)
13
- )
14
- } else if (
15
- !localStorage.getItem('userData') &&
16
- !Object.entries(state.$appStore.userMetaData).length
17
- ) {
18
- localStorage.setItem('userData', JSON.stringify({}))
19
- }
20
- })
21
- }
22
-
23
- /**
24
- * creating a small save plug-in to get stored state from the localStorage
25
- */
26
- export function getSavedStatePlugin(type, id) {
27
- if (localStorage.getItem('thisModule')) {
28
- const savedData = JSON.parse(localStorage.getItem('thisModule'))
29
-
30
- if (type === 'module' && savedData.id === id) return savedData
31
- if (type === 'page' && savedData.children.length) {
32
- return savedData.children.find((p) => id === p.id)
33
- }
34
- return JSON.parse(localStorage.getItem('thisModule'))
35
- }
36
- return null
37
- }
1
+ /* creating a small save plug-in to save store state in the localStorage
2
+ * the plugin listen for mutations made to the Pinia store and store them in the local browser storage.
3
+ * This prevent reseting the store to initial state when the browser refreshes
4
+ * Note: the plugin is used in the store.js
5
+ */
6
+ export function saveStatePlugin(store) {
7
+ store.subscribe((mutation, state) => {
8
+ // save the user data
9
+ if (Object.entries(state.$appStore.userMetaData).length) {
10
+ localStorage.setItem(
11
+ 'userData',
12
+ JSON.stringify(state.$appStore.userMetaData)
13
+ )
14
+ } else if (
15
+ !localStorage.getItem('userData') &&
16
+ !Object.entries(state.$appStore.userMetaData).length
17
+ ) {
18
+ localStorage.setItem('userData', JSON.stringify({}))
19
+ }
20
+ })
21
+ }
22
+
23
+ /**
24
+ * creating a small save plug-in to get stored state from the localStorage
25
+ */
26
+ export function getSavedStatePlugin(type, id) {
27
+ if (localStorage.getItem('thisModule')) {
28
+ const savedData = JSON.parse(localStorage.getItem('thisModule'))
29
+
30
+ if (type === 'module' && savedData.id === id) return savedData
31
+ if (type === 'page' && savedData.children.length) {
32
+ return savedData.children.find((p) => id === p.id)
33
+ }
34
+ return JSON.parse(localStorage.getItem('thisModule'))
35
+ }
36
+ return null
37
+ }