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,164 +1,292 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
----------------- MUST ADD ERROR GESTION ------------------
|
|
3
|
-
----------------- MUST ADD css ------------------
|
|
4
|
-
|
|
5
|
-
@ Description:
|
|
6
|
-
@ What it does:
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<div
|
|
10
|
-
<app-base-button
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
async created() {},
|
|
78
|
-
|
|
79
|
-
this.$bus.$
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
element.
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
<!--
|
|
2
|
+
----------------- MUST ADD ERROR GESTION ------------------
|
|
3
|
+
----------------- MUST ADD css ------------------
|
|
4
|
+
|
|
5
|
+
@ Description:
|
|
6
|
+
@ What it does:
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div id="noteCredit" :class="{ openW: showWidget }">
|
|
10
|
+
<app-base-button
|
|
11
|
+
id="close-nc"
|
|
12
|
+
:title="$t('button.closePopUp')"
|
|
13
|
+
@click="close()"
|
|
14
|
+
>
|
|
15
|
+
<svg>
|
|
16
|
+
<use href="#close-square-icon" />
|
|
17
|
+
</svg>
|
|
18
|
+
</app-base-button>
|
|
19
|
+
<div class="box-nc">
|
|
20
|
+
<div v-if="getNote != null" class="ctn-note">
|
|
21
|
+
<p class="t-note">{{ $t('text.title_note') }}</p>
|
|
22
|
+
<ol id="notes-list">
|
|
23
|
+
<li
|
|
24
|
+
v-for="(note, index) of getNote"
|
|
25
|
+
:id="`nt_${index + 1}`"
|
|
26
|
+
:key="`note_${index}`"
|
|
27
|
+
:dataRef="`rnt_${index + 1}`"
|
|
28
|
+
:class="note.hasError ? 'widget-note note-error' : 'widget-note'"
|
|
29
|
+
>
|
|
30
|
+
<button
|
|
31
|
+
:noteRef="`rnt_${index + 1}`"
|
|
32
|
+
class="btn backToNoteRef"
|
|
33
|
+
:title="$t('text.title_link_bas')"
|
|
34
|
+
@click="focusNote($event)"
|
|
35
|
+
>
|
|
36
|
+
<span class="note-txt" v-html="note.text"></span>
|
|
37
|
+
</button>
|
|
38
|
+
</li>
|
|
39
|
+
</ol>
|
|
40
|
+
</div>
|
|
41
|
+
<div v-if="getCredit != null" class="ctn-credit">
|
|
42
|
+
<p class="t-crdt">{{ $t('text.title_credit') }}</p>
|
|
43
|
+
|
|
44
|
+
<ul id="credits-list">
|
|
45
|
+
<li
|
|
46
|
+
v-for="(credit, index) of getCredit"
|
|
47
|
+
:key="`note_${index}`"
|
|
48
|
+
:ref="`#nt_${index + 1}`"
|
|
49
|
+
v-html="credit"
|
|
50
|
+
></li>
|
|
51
|
+
</ul>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
<script>
|
|
57
|
+
import { mapState, mapActions } from 'pinia'
|
|
58
|
+
import { useAppStore } from '../module/stores/appStore'
|
|
59
|
+
export default {
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
notes: null,
|
|
63
|
+
credits: null,
|
|
64
|
+
current: false,
|
|
65
|
+
showWidget: false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
...mapState(useAppStore, ['getDataNoteCredit']),
|
|
70
|
+
getNote() {
|
|
71
|
+
return this.error(this.getDataNoteCredit.note)
|
|
72
|
+
},
|
|
73
|
+
getCredit() {
|
|
74
|
+
return this.getDataNoteCredit.credit
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
async created() {},
|
|
78
|
+
beforeUnmount() {
|
|
79
|
+
this.$bus.$off('credit-note', this.onCreditNote)
|
|
80
|
+
this.$bus.$off('toggle-widget', this.onToggleWidget)
|
|
81
|
+
this.$bus.$off('close-widget', this.onCloseWidget)
|
|
82
|
+
this.$bus.$off('note-to-show', this.onNoteToShow)
|
|
83
|
+
},
|
|
84
|
+
mounted() {
|
|
85
|
+
// close or open widget depending which btn was click
|
|
86
|
+
this.$bus.$on('toggle-widget', this.onToggleWidget)
|
|
87
|
+
//close widget
|
|
88
|
+
this.$bus.$on('close-widget', this.onCloseWidget)
|
|
89
|
+
// show widget when note click and higligth note
|
|
90
|
+
this.$bus.$on('note-to-show', this.onNoteToShow)
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
...mapActions(useAppStore, ['updateWidgetOpen']),
|
|
94
|
+
onNoteToShow(el) {
|
|
95
|
+
this.showWidget = true
|
|
96
|
+
this.updateWidgetOpen(true)
|
|
97
|
+
|
|
98
|
+
if (el) {
|
|
99
|
+
let ref = el.getAttribute('data-Ref')
|
|
100
|
+
|
|
101
|
+
this.removehighlight()
|
|
102
|
+
|
|
103
|
+
let elAtt = document.getElementsByClassName('widget-note')
|
|
104
|
+
let arr = Array.from(elAtt)
|
|
105
|
+
|
|
106
|
+
for (let element of arr) {
|
|
107
|
+
if (ref == element.getAttribute('id')) {
|
|
108
|
+
element.setAttribute('dataCurrent', true)
|
|
109
|
+
element.focus()
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
onCloseWidget() {
|
|
115
|
+
this.showWidget = false
|
|
116
|
+
this.updateWidgetOpen(false)
|
|
117
|
+
let el = document.getElementsByClassName('widget-note')
|
|
118
|
+
|
|
119
|
+
for (let element of el) {
|
|
120
|
+
element.setAttribute('datacurrent', false)
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
onToggleWidget(data) {
|
|
124
|
+
if (data == 'noteCredit') {
|
|
125
|
+
this.showWidget = !this.showWidget
|
|
126
|
+
|
|
127
|
+
if (this.showWidget) this.updateWidgetOpen(true)
|
|
128
|
+
} else {
|
|
129
|
+
this.showWidget = false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
close() {
|
|
133
|
+
let elNote = document.getElementsByClassName('widget-note')
|
|
134
|
+
let elCall = document.getElementsByClassName('callEndNote')
|
|
135
|
+
|
|
136
|
+
let arrNote = Array.from(elNote)
|
|
137
|
+
let arrCall = Array.from(elCall)
|
|
138
|
+
|
|
139
|
+
for (let element of arrNote) {
|
|
140
|
+
element.setAttribute('dataCurrent', false)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
for (let element of arrCall) {
|
|
144
|
+
element.setAttribute('datacurrentnote', false)
|
|
145
|
+
}
|
|
146
|
+
this.showWidget = !this.showWidget
|
|
147
|
+
this.$bus.$emit('close-widget')
|
|
148
|
+
},
|
|
149
|
+
removehighlight() {
|
|
150
|
+
let elAtt = document.querySelectorAll("[dataCurrent='true']")
|
|
151
|
+
|
|
152
|
+
let arr = Array.from(elAtt)
|
|
153
|
+
|
|
154
|
+
for (let element of arr) {
|
|
155
|
+
element.setAttribute('dataCurrent', false)
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
focusNote(el) {
|
|
159
|
+
this.remove()
|
|
160
|
+
let e = document.getElementsByClassName('callEndNote')
|
|
161
|
+
let t = el.target.getAttribute('noteref')
|
|
162
|
+
let s = document.querySelectorAll(`[dataref="${t}"]`)
|
|
163
|
+
s[0].setAttribute('dataCurrent', true)
|
|
164
|
+
|
|
165
|
+
for (let element of e) {
|
|
166
|
+
element.setAttribute('dataCurrentnote', false)
|
|
167
|
+
if (element.id === t) {
|
|
168
|
+
element.setAttribute('dataCurrentnote', true)
|
|
169
|
+
element.childNodes[0].focus()
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
remove() {
|
|
174
|
+
let e = document.getElementsByClassName('widget-note')
|
|
175
|
+
for (let element of e) {
|
|
176
|
+
element.setAttribute('dataCurrent', false)
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
error(e) {
|
|
180
|
+
const returnArray = []
|
|
181
|
+
// ---------------- MUST BE REDO BECAUSE INFO CHANGE ----------------------
|
|
182
|
+
let arr = e
|
|
183
|
+
let err = false
|
|
184
|
+
if (e) {
|
|
185
|
+
arr.forEach((element, index) => {
|
|
186
|
+
err = false
|
|
187
|
+
if (!document.getElementById(`rnt_${index + 1}`)) {
|
|
188
|
+
err = true
|
|
189
|
+
}
|
|
190
|
+
returnArray.push({
|
|
191
|
+
text: err ? `${element} : ${this.$t('text.err_credit')}` : element,
|
|
192
|
+
hasError: err
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
return returnArray.length === 0 ? null : returnArray
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
</script>
|
|
201
|
+
<style lang="scss">
|
|
202
|
+
#noteCredit {
|
|
203
|
+
display: none;
|
|
204
|
+
pointer-events: none;
|
|
205
|
+
position: absolute;
|
|
206
|
+
left: 75px;
|
|
207
|
+
top: 0;
|
|
208
|
+
width: 419px;
|
|
209
|
+
transition: left 0.5s ease-in-out;
|
|
210
|
+
|
|
211
|
+
&.openW {
|
|
212
|
+
pointer-events: all;
|
|
213
|
+
display: block;
|
|
214
|
+
opacity: 1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
#close-nc {
|
|
218
|
+
padding: 11px;
|
|
219
|
+
position: absolute;
|
|
220
|
+
right: 24px;
|
|
221
|
+
margin-bottom: 0;
|
|
222
|
+
|
|
223
|
+
&:focus {
|
|
224
|
+
box-shadow: inherit !important;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.note-txt {
|
|
229
|
+
pointer-events: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.box-nc {
|
|
233
|
+
margin-top: 54px;
|
|
234
|
+
overflow-y: auto;
|
|
235
|
+
min-height: 160px;
|
|
236
|
+
max-height: 321px;
|
|
237
|
+
padding-right: 26px;
|
|
238
|
+
|
|
239
|
+
.t-note {
|
|
240
|
+
margin-bottom: 8px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
#notes-list {
|
|
244
|
+
margin-bottom: 10px;
|
|
245
|
+
|
|
246
|
+
li {
|
|
247
|
+
.backToNoteRef {
|
|
248
|
+
text-align: left;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
ul#credits-list {
|
|
255
|
+
list-style-type: none;
|
|
256
|
+
padding: 0;
|
|
257
|
+
margin: 0;
|
|
258
|
+
}
|
|
259
|
+
ol#notes-list {
|
|
260
|
+
list-style-position: inside;
|
|
261
|
+
padding: 0;
|
|
262
|
+
margin: 0;
|
|
263
|
+
.widget-note {
|
|
264
|
+
padding: 5px 0;
|
|
265
|
+
&.note-error {
|
|
266
|
+
background-color: firebrick;
|
|
267
|
+
}
|
|
268
|
+
.backToNoteRef {
|
|
269
|
+
display: inline-block;
|
|
270
|
+
width: 90%;
|
|
271
|
+
vertical-align: top;
|
|
272
|
+
padding: 0 4px;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
.overlay-w {
|
|
277
|
+
width: 100%;
|
|
278
|
+
height: 100%;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.app-nav {
|
|
283
|
+
&.show,
|
|
284
|
+
&:hover {
|
|
285
|
+
.ctn-w {
|
|
286
|
+
#noteCredit {
|
|
287
|
+
left: 120px;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
</style>
|