fcad-core-dragon 2.0.0-beta.7 → 2.0.0-beta.8

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 (58) hide show
  1. package/.editorconfig +33 -33
  2. package/.eslintignore +29 -29
  3. package/.eslintrc.cjs +81 -81
  4. package/CHANGELOG +6 -1
  5. package/README.md +71 -71
  6. package/bk.scss +117 -117
  7. package/package.json +1 -6
  8. package/src/assets/data/onboardingMessages.json +47 -47
  9. package/src/components/AppBase.vue +1 -1
  10. package/src/components/AppBaseErrorDisplay.vue +438 -438
  11. package/src/components/AppBaseFlipCard.vue +84 -84
  12. package/src/components/AppBaseModule.vue +0 -18
  13. package/src/components/AppBasePopover.vue +41 -41
  14. package/src/components/AppCompContainer.vue +1 -3
  15. package/src/components/AppCompInputRadioNext.vue +152 -152
  16. package/src/components/AppCompInputTextToFillNext.vue +171 -171
  17. package/src/components/AppCompJauge.vue +74 -74
  18. package/src/components/AppCompMenuItem.vue +228 -228
  19. package/src/components/AppCompPlayBarProgress.vue +82 -82
  20. package/src/components/AppCompSettingsMenu.vue +172 -172
  21. package/src/components/AppCompViewDisplay.vue +6 -6
  22. package/src/composables/useQuiz.js +206 -206
  23. package/src/externalComps/ModuleView.vue +22 -22
  24. package/src/externalComps/SummaryView.vue +91 -91
  25. package/src/mixins/$mediaMixins.js +819 -819
  26. package/src/mixins/timerMixin.js +155 -155
  27. package/src/module/xapi/Crypto/Hasher.js +241 -241
  28. package/src/module/xapi/Crypto/WordArray.js +278 -278
  29. package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
  30. package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -315
  31. package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
  32. package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
  33. package/src/module/xapi/Crypto/encoders/Base.js +105 -105
  34. package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
  35. package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
  36. package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
  37. package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
  38. package/src/module/xapi/Crypto/index.js +53 -53
  39. package/src/module/xapi/Statement/activity.js +47 -47
  40. package/src/module/xapi/Statement/agent.js +55 -55
  41. package/src/module/xapi/Statement/group.js +26 -26
  42. package/src/module/xapi/Statement/index.js +259 -259
  43. package/src/module/xapi/Statement/statement.js +253 -253
  44. package/src/module/xapi/Statement/statementRef.js +23 -23
  45. package/src/module/xapi/Statement/substatement.js +22 -22
  46. package/src/module/xapi/Statement/verb.js +36 -36
  47. package/src/module/xapi/activitytypes.js +17 -17
  48. package/src/module/xapi/utils.js +167 -167
  49. package/src/module/xapi/verbs.js +294 -294
  50. package/src/module/xapi/xapiStatement.js +444 -444
  51. package/src/plugins/bus.js +8 -8
  52. package/src/plugins/gsap.js +14 -14
  53. package/src/plugins/i18n.js +44 -44
  54. package/src/plugins/save.js +37 -37
  55. package/src/plugins/scorm.js +287 -287
  56. package/src/plugins/xapi.js +11 -11
  57. package/src/public/index.html +33 -33
  58. package/src/shared/generalfuncs.js +210 -210
@@ -1,155 +1,155 @@
1
- /*
2
- @ Description: Mixins to extends general fonctionnalities in a page of an activity. Add time tracker in activities
3
- @ Note: .
4
- */
5
- export const timerMixin = {
6
- data() {
7
- return {
8
- lessonTimeCounter: 0,
9
- activityTimeCounter: 0,
10
- elapsedCounter: 0, // count the elapse time since lesson started
11
- activityInterval: null,
12
- lessonInterval: null,
13
- fullInterval: null,
14
- timerState: 'stopped',
15
- elapsedInterval: null // interval of passed time since the lesson is started. used only for saving purposed
16
- }
17
- },
18
- methods: {
19
- /* Start the timer */
20
- startTimer(op) {
21
- if (op && !['activity', 'lesson'].includes(op))
22
- throw new Error('this is not a valid option for the timer')
23
- if (this.timerState === 'stopped') {
24
- switch (op) {
25
- case 'activity':
26
- this.activityInterval = setInterval(() => {
27
- this.activityTimeCounter += 1
28
- }, 1000)
29
- this.timerState = 'started'
30
-
31
- break
32
-
33
- case 'lesson':
34
- this.lessonInterval = setInterval(() => {
35
- this.lessonTimeCounter += 1
36
- }, 1000)
37
- break
38
-
39
- default:
40
- this.fullInterval = setInterval(() => {
41
- this.activityTimeCounter += 1
42
- this.lessonTimeCounter += 1
43
- }, 1000)
44
- }
45
- }
46
- },
47
- /* Stop the timer and reset thimer to zero */
48
- stopTimer(op) {
49
- if (op && !['activity', 'lesson'].includes(op))
50
- throw new Error('this is not a valid parameter')
51
-
52
- if (this.timerState === 'started') {
53
- if (op === 'activity' && this.activityTimeCounter > 0) {
54
- this.lessonTimeCounter =
55
- this.lessonTimeCounter + this.activityTimeCounter //add to the lesson counter
56
- clearInterval(this.activityInterval) //clear the interval
57
- this.activityTimeCounter = 0 // reset the counter
58
- this.timerState = 'stopped'
59
- } else if (op === 'lesson' && this.lessonTimeCounter > 0) {
60
- clearInterval(this.lessonInterval)
61
- this.lessonTimeCounter = 0
62
- } else {
63
- clearInterval(this.fullInterval)
64
- clearInterval(this.elapsedCounter)
65
- clearInterval(this.elapsedInterval)
66
-
67
- this.activityTimeCounter = 0
68
- this.lessonTimeCounter = 0
69
- this.elapsedCounter = 0
70
- }
71
- }
72
- },
73
- /* Pause the timer but does not reset to zero*/
74
- pauseTimer(op) {
75
- if (op && !['activity', 'lesson'].includes(op))
76
- throw new Error('this is not a valid parameter')
77
-
78
- if (op === 'activity' && this.activityTimeCounter > 0) {
79
- clearInterval(this.activityInterval)
80
- } else if (op === 'lesson') {
81
- clearInterval(this.lessonInterval)
82
- } else {
83
- clearInterval(this.fullInterval)
84
- clearInterval(this.elapsedInterval)
85
- }
86
- },
87
-
88
- /* Format seconds to ISO 8601 format */
89
- formatToISOString(seconds) {
90
- let d = new Date(null) //create a default date ref
91
- d.setSeconds(seconds) //set the time with passed numbers of seconds
92
- //Example of ISO 8601 time format of 24 chars: "1970-01-04T14:50:00.000Z"
93
- let ISOTime = d.toISOString()
94
-
95
- return ISOTime // YYYY-MM-DDTHH:mm:ss.sssZ
96
- },
97
-
98
- /* Parse a ISO string time period to the format of HH:mm:ss */
99
- ISOTimeParser(seconds) {
100
- let ISOTimePeriod = this.formatToISOString(seconds).substring(8, 19) // only the time portion of it
101
- ISOTimePeriod = ISOTimePeriod.split('T')
102
- const DDToHrs = (parseInt(ISOTimePeriod[0]) - 1) * 24 // convert xxT to hrs
103
- const periodOfTime = ISOTimePeriod[1] ? ISOTimePeriod[1].split(':') : null
104
-
105
- if (!periodOfTime) return '00:00:00'
106
-
107
- let timeString = ''
108
- let HH = (DDToHrs + parseInt(periodOfTime[0])).toString()
109
- let mm = periodOfTime[1]
110
- let ss = periodOfTime[2]
111
-
112
- if (HH.length === 1) HH = `0${HH}`
113
-
114
- timeString = `${HH}:${mm}:${ss}`
115
-
116
- return timeString
117
- }
118
- },
119
- beforeUnmount() {
120
- this.$bus.$off('start-timer', this.startTimer)
121
- this.$bus.$off('stop-timer', this.stopTimer)
122
- this.$bus.$off('pause-timer', this.pauseTimer)
123
- },
124
- mounted() {
125
- this.$bus.$on('start-timer', this.startTimer)
126
-
127
- this.$bus.$on('stop-timer', this.stopTimer)
128
-
129
- this.$bus.$on('pause-timer', this.pauseTimer)
130
-
131
- this.elapsedInterval = setInterval(() => {
132
- this.elapsedCounter += 1
133
- }, 1000)
134
- },
135
- computed: {
136
- activityDuration() {
137
- let duration
138
- if (this.activityTimeCounter > 0)
139
- duration = this.ISOTimeParser(this.activityTimeCounter)
140
- else duration = '00:00:00'
141
-
142
- return duration
143
- },
144
- lessonDuration() {
145
- this.lessonTimeCounter = this.lessonTimeCounter + this.activityTimeCounter
146
-
147
- let duration = this.ISOTimeParser(this.lessonTimeCounter)
148
- return duration
149
- },
150
- elapsedTime() {
151
- const eTime = this.elapsedCounter
152
- return eTime
153
- }
154
- }
155
- }
1
+ /*
2
+ @ Description: Mixins to extends general fonctionnalities in a page of an activity. Add time tracker in activities
3
+ @ Note: .
4
+ */
5
+ export const timerMixin = {
6
+ data() {
7
+ return {
8
+ lessonTimeCounter: 0,
9
+ activityTimeCounter: 0,
10
+ elapsedCounter: 0, // count the elapse time since lesson started
11
+ activityInterval: null,
12
+ lessonInterval: null,
13
+ fullInterval: null,
14
+ timerState: 'stopped',
15
+ elapsedInterval: null // interval of passed time since the lesson is started. used only for saving purposed
16
+ }
17
+ },
18
+ methods: {
19
+ /* Start the timer */
20
+ startTimer(op) {
21
+ if (op && !['activity', 'lesson'].includes(op))
22
+ throw new Error('this is not a valid option for the timer')
23
+ if (this.timerState === 'stopped') {
24
+ switch (op) {
25
+ case 'activity':
26
+ this.activityInterval = setInterval(() => {
27
+ this.activityTimeCounter += 1
28
+ }, 1000)
29
+ this.timerState = 'started'
30
+
31
+ break
32
+
33
+ case 'lesson':
34
+ this.lessonInterval = setInterval(() => {
35
+ this.lessonTimeCounter += 1
36
+ }, 1000)
37
+ break
38
+
39
+ default:
40
+ this.fullInterval = setInterval(() => {
41
+ this.activityTimeCounter += 1
42
+ this.lessonTimeCounter += 1
43
+ }, 1000)
44
+ }
45
+ }
46
+ },
47
+ /* Stop the timer and reset thimer to zero */
48
+ stopTimer(op) {
49
+ if (op && !['activity', 'lesson'].includes(op))
50
+ throw new Error('this is not a valid parameter')
51
+
52
+ if (this.timerState === 'started') {
53
+ if (op === 'activity' && this.activityTimeCounter > 0) {
54
+ this.lessonTimeCounter =
55
+ this.lessonTimeCounter + this.activityTimeCounter //add to the lesson counter
56
+ clearInterval(this.activityInterval) //clear the interval
57
+ this.activityTimeCounter = 0 // reset the counter
58
+ this.timerState = 'stopped'
59
+ } else if (op === 'lesson' && this.lessonTimeCounter > 0) {
60
+ clearInterval(this.lessonInterval)
61
+ this.lessonTimeCounter = 0
62
+ } else {
63
+ clearInterval(this.fullInterval)
64
+ clearInterval(this.elapsedCounter)
65
+ clearInterval(this.elapsedInterval)
66
+
67
+ this.activityTimeCounter = 0
68
+ this.lessonTimeCounter = 0
69
+ this.elapsedCounter = 0
70
+ }
71
+ }
72
+ },
73
+ /* Pause the timer but does not reset to zero*/
74
+ pauseTimer(op) {
75
+ if (op && !['activity', 'lesson'].includes(op))
76
+ throw new Error('this is not a valid parameter')
77
+
78
+ if (op === 'activity' && this.activityTimeCounter > 0) {
79
+ clearInterval(this.activityInterval)
80
+ } else if (op === 'lesson') {
81
+ clearInterval(this.lessonInterval)
82
+ } else {
83
+ clearInterval(this.fullInterval)
84
+ clearInterval(this.elapsedInterval)
85
+ }
86
+ },
87
+
88
+ /* Format seconds to ISO 8601 format */
89
+ formatToISOString(seconds) {
90
+ let d = new Date(null) //create a default date ref
91
+ d.setSeconds(seconds) //set the time with passed numbers of seconds
92
+ //Example of ISO 8601 time format of 24 chars: "1970-01-04T14:50:00.000Z"
93
+ let ISOTime = d.toISOString()
94
+
95
+ return ISOTime // YYYY-MM-DDTHH:mm:ss.sssZ
96
+ },
97
+
98
+ /* Parse a ISO string time period to the format of HH:mm:ss */
99
+ ISOTimeParser(seconds) {
100
+ let ISOTimePeriod = this.formatToISOString(seconds).substring(8, 19) // only the time portion of it
101
+ ISOTimePeriod = ISOTimePeriod.split('T')
102
+ const DDToHrs = (parseInt(ISOTimePeriod[0]) - 1) * 24 // convert xxT to hrs
103
+ const periodOfTime = ISOTimePeriod[1] ? ISOTimePeriod[1].split(':') : null
104
+
105
+ if (!periodOfTime) return '00:00:00'
106
+
107
+ let timeString = ''
108
+ let HH = (DDToHrs + parseInt(periodOfTime[0])).toString()
109
+ let mm = periodOfTime[1]
110
+ let ss = periodOfTime[2]
111
+
112
+ if (HH.length === 1) HH = `0${HH}`
113
+
114
+ timeString = `${HH}:${mm}:${ss}`
115
+
116
+ return timeString
117
+ }
118
+ },
119
+ beforeUnmount() {
120
+ this.$bus.$off('start-timer', this.startTimer)
121
+ this.$bus.$off('stop-timer', this.stopTimer)
122
+ this.$bus.$off('pause-timer', this.pauseTimer)
123
+ },
124
+ mounted() {
125
+ this.$bus.$on('start-timer', this.startTimer)
126
+
127
+ this.$bus.$on('stop-timer', this.stopTimer)
128
+
129
+ this.$bus.$on('pause-timer', this.pauseTimer)
130
+
131
+ this.elapsedInterval = setInterval(() => {
132
+ this.elapsedCounter += 1
133
+ }, 1000)
134
+ },
135
+ computed: {
136
+ activityDuration() {
137
+ let duration
138
+ if (this.activityTimeCounter > 0)
139
+ duration = this.ISOTimeParser(this.activityTimeCounter)
140
+ else duration = '00:00:00'
141
+
142
+ return duration
143
+ },
144
+ lessonDuration() {
145
+ this.lessonTimeCounter = this.lessonTimeCounter + this.activityTimeCounter
146
+
147
+ let duration = this.ISOTimeParser(this.lessonTimeCounter)
148
+ return duration
149
+ },
150
+ elapsedTime() {
151
+ const eTime = this.elapsedCounter
152
+ return eTime
153
+ }
154
+ }
155
+ }