fcad-core-dragon 2.0.0-beta.0 → 2.0.0-beta.2
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/{.eslintrc.js → .eslintrc.cjs} +13 -18
- package/README.md +1 -1
- package/bk.scss +117 -0
- package/package.json +22 -40
- package/src/$locales/en.json +57 -19
- package/src/$locales/fr.json +66 -28
- package/src/components/AppBase.vue +790 -376
- package/src/components/AppBaseButton.vue +33 -5
- package/src/components/AppBaseErrorDisplay.vue +62 -25
- package/src/components/AppBaseModule.vue +831 -754
- package/src/components/AppBasePage.vue +60 -74
- package/src/components/AppCompAudio.vue +266 -0
- package/src/components/AppCompBranchButtons.vue +79 -89
- package/src/components/AppCompButtonProgress.vue +35 -61
- package/src/components/AppCompCarousel.vue +160 -249
- package/src/components/AppCompInputCheckBox.vue +9 -3
- package/src/components/AppCompInputDropdown.vue +2 -4
- package/src/components/AppCompInputRadio.vue +8 -15
- package/src/components/AppCompInputTextTable.vue +15 -12
- package/src/components/AppCompInputTextToFillDropdown.vue +16 -14
- package/src/components/AppCompInputTextToFillText.vue +2 -2
- package/src/components/AppCompJauge.vue +14 -3
- package/src/components/AppCompMenu.vue +284 -85
- package/src/components/AppCompMenuItem.vue +67 -92
- package/src/components/AppCompNavigation.vue +945 -0
- package/src/components/AppCompNoteCall.vue +141 -0
- package/src/components/AppCompNoteCredit.vue +267 -0
- package/src/components/AppCompPlayBar.vue +1122 -1391
- package/src/components/AppCompPlayBarProgress.vue +73 -0
- package/src/components/AppCompPopUp.vue +195 -135
- package/src/components/AppCompPopover.vue +27 -0
- package/src/components/AppCompQuiz.vue +90 -113
- package/src/components/AppCompQuizRecall.vue +277 -0
- package/src/components/AppCompSVG.vue +335 -0
- package/src/components/AppCompSettingsMenu.vue +7 -8
- package/src/components/AppCompTableOfContent.vue +264 -88
- package/src/components/AppCompTranscript.vue +19 -0
- package/src/components/AppCompVideoPlayer.vue +380 -0
- package/src/components/BaseModule.vue +37 -114
- package/src/main.js +130 -85
- package/src/mixins/$mediaMixins.js +827 -0
- package/src/mixins/$pageMixins.js +149 -115
- package/src/mixins/$quizMixins.js +12 -26
- package/src/mixins/timerMixin.js +39 -16
- package/src/module/store.js +218 -78
- package/src/module/xapi/ADL.js +90 -53
- package/src/module/xapi/Crypto/Hasher.js +8 -8
- package/src/module/xapi/Crypto/WordArray.js +6 -6
- package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +4 -4
- package/src/module/xapi/Crypto/algorithms/C_algo.js +14 -18
- package/src/module/xapi/Crypto/algorithms/HMAC.js +1 -1
- package/src/module/xapi/Crypto/algorithms/SHA1.js +1 -1
- package/src/module/xapi/Crypto/encoders/Base.js +7 -7
- package/src/module/xapi/Crypto/encoders/Base64.js +3 -3
- package/src/module/xapi/Crypto/encoders/Hex.js +4 -3
- package/src/module/xapi/Crypto/encoders/Latin1.js +3 -3
- package/src/module/xapi/Crypto/encoders/Utf8.js +3 -3
- package/src/module/xapi/Statement/index.js +1 -1
- package/src/module/xapi/launch.js +10 -10
- package/src/module/xapi/utils.js +17 -17
- package/src/module/xapi/wrapper.js +127 -54
- package/src/module/xapi/xapiStatement.js +29 -29
- package/src/plugins/gsap.js +4 -1
- package/src/plugins/helper.js +58 -24
- package/src/plugins/i18n.js +23 -10
- package/src/plugins/idb.js +1 -0
- package/src/plugins/scorm.js +14 -14
- package/src/public/index.html +1 -1
- package/src/router/index.js +40 -0
- package/src/router/routes.js +317 -0
- package/src/shared/generalfuncs.js +91 -9
- package/src/shared/validators.js +959 -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/AppCompDragAndDrop.vue +0 -339
- package/src/components/AppCompInputAssociation.vue +0 -332
- package/src/components/AppCompMediaPlayer.vue +0 -365
- package/src/components/AppCompNavigationFull.vue +0 -1791
- package/src/components/AppCompToolTip.vue +0 -94
- package/src/plugins/timeManager.js +0 -77
- package/src/routes.js +0 -734
- package/vue.config.js +0 -83
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-popover
|
|
3
|
-
ref="tooltip_1"
|
|
4
|
-
:show.sync="isShown"
|
|
5
|
-
:target="target"
|
|
6
|
-
:title="option.title"
|
|
7
|
-
triggers="manual"
|
|
8
|
-
placement="auto"
|
|
9
|
-
@hidden="onHidden()"
|
|
10
|
-
>
|
|
11
|
-
<div class="box-content-tooltip" v-html="option.content" />
|
|
12
|
-
<div>
|
|
13
|
-
<app-base-button
|
|
14
|
-
id="btn-cancel-tooltip"
|
|
15
|
-
:name-acces="'Annuler'"
|
|
16
|
-
class="btn-cancel"
|
|
17
|
-
:title="$t('button.cancel_pop')"
|
|
18
|
-
@click="$cancel(option.cb_$cancel)"
|
|
19
|
-
>
|
|
20
|
-
{{ $t('button.cancel_pop') }}
|
|
21
|
-
</app-base-button>
|
|
22
|
-
<app-base-button
|
|
23
|
-
id="btn-confirm-tooltip"
|
|
24
|
-
:name-acces="'Confirmer'"
|
|
25
|
-
class="btn-confirm"
|
|
26
|
-
:title="$t('button.confirm_pop')"
|
|
27
|
-
@click="$confirm(option.cb_$confirm)"
|
|
28
|
-
>
|
|
29
|
-
{{ $t('button.confirm_pop') }}
|
|
30
|
-
</app-base-button>
|
|
31
|
-
</div>
|
|
32
|
-
</b-popover>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
//https://bootstrap-vue.org/docs/components/popover
|
|
37
|
-
export default {
|
|
38
|
-
name: 'AppCompToolTip',
|
|
39
|
-
props: {
|
|
40
|
-
target: { type: String, default: '' }
|
|
41
|
-
},
|
|
42
|
-
data() {
|
|
43
|
-
return {
|
|
44
|
-
option: {},
|
|
45
|
-
confirmFunction: false,
|
|
46
|
-
isShown: false
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
computed: {},
|
|
50
|
-
mounted() {
|
|
51
|
-
this.$bus.$on('tooltip-close', () => {
|
|
52
|
-
this.isShown = false
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
this.$bus.$on('tooltip-open', (e) => {
|
|
56
|
-
if (e) {
|
|
57
|
-
this.option = e
|
|
58
|
-
this.isShown = true
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
},
|
|
62
|
-
methods: {
|
|
63
|
-
/**
|
|
64
|
-
* @description - method for action confirm
|
|
65
|
-
* @param {Function} cb
|
|
66
|
-
*/
|
|
67
|
-
$confirm(cb) {
|
|
68
|
-
this.confirmFunction = cb
|
|
69
|
-
this.isShown = false
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @description - method for action cancel
|
|
74
|
-
* @param {Function} cb
|
|
75
|
-
*/
|
|
76
|
-
$cancel(cb) {
|
|
77
|
-
this.confirmFunction = false
|
|
78
|
-
cb = cb || null
|
|
79
|
-
this.isShown = false
|
|
80
|
-
if (cb && typeof cb === 'function') cb()
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @description action to do when tooltip is hidden
|
|
85
|
-
*/
|
|
86
|
-
onHidden() {
|
|
87
|
-
//check if closed with confirm
|
|
88
|
-
let cb = this.confirmFunction
|
|
89
|
-
//calls close
|
|
90
|
-
if (cb && typeof cb === 'function') cb()
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
@@ -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
|
-
}
|