fcad-core-dragon 2.0.0-beta.3 → 2.0.0-beta.4
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.cjs +81 -81
- package/CHANGELOG +373 -364
- package/README.md +71 -71
- package/bk.scss +117 -117
- package/package.json +61 -61
- package/src/$locales/en.json +143 -143
- package/src/$locales/fr.json +105 -105
- package/src/assets/data/onboardingMessages.json +47 -47
- package/src/components/AppBase.vue +1147 -1054
- package/src/components/AppBaseButton.vue +87 -87
- package/src/components/AppBaseErrorDisplay.vue +438 -438
- package/src/components/AppBaseFlipCard.vue +84 -84
- package/src/components/AppBaseModule.vue +1636 -1673
- package/src/components/AppBasePage.vue +779 -779
- package/src/components/AppBasePopover.vue +41 -41
- package/src/components/AppCompAudio.vue +234 -234
- package/src/components/AppCompBranchButtons.vue +552 -552
- package/src/components/AppCompButtonProgress.vue +126 -126
- package/src/components/AppCompCarousel.vue +298 -298
- package/src/components/AppCompInputCheckBoxNext.vue +195 -195
- package/src/components/AppCompInputDropdownNext.vue +159 -159
- package/src/components/AppCompInputRadioNext.vue +152 -152
- package/src/components/AppCompInputTextNext.vue +106 -106
- package/src/components/AppCompInputTextTableNext.vue +141 -141
- package/src/components/AppCompInputTextToFillDropdownNext.vue +230 -230
- package/src/components/AppCompInputTextToFillNext.vue +171 -171
- package/src/components/AppCompJauge.vue +74 -74
- package/src/components/AppCompMenu.vue +423 -413
- package/src/components/AppCompMenuItem.vue +228 -228
- package/src/components/AppCompNavigation.vue +959 -960
- package/src/components/AppCompNoteCall.vue +133 -133
- package/src/components/AppCompNoteCredit.vue +292 -292
- package/src/components/AppCompPlayBar.vue +1218 -1218
- package/src/components/AppCompPlayBarNext.vue +2052 -2052
- package/src/components/AppCompPlayBarProgress.vue +82 -82
- package/src/components/AppCompPopUpNext.vue +503 -503
- package/src/components/AppCompQuizNext.vue +2904 -2904
- package/src/components/AppCompQuizRecall.vue +276 -276
- package/src/components/AppCompSVGNext.vue +347 -347
- package/src/components/AppCompSettingsMenu.vue +172 -172
- package/src/components/AppCompTableOfContent.vue +387 -387
- package/src/components/AppCompTranscript.vue +24 -24
- package/src/components/AppCompVideoPlayer.vue +368 -368
- package/src/components/AppCompViewDisplay.vue +6 -6
- package/src/components/BaseModule.vue +72 -72
- package/src/composables/useQuiz.js +206 -206
- package/src/externalComps/ModuleView.vue +22 -22
- package/src/externalComps/SummaryView.vue +91 -91
- package/src/main.js +272 -272
- package/src/mixins/$mediaMixins.js +819 -819
- package/src/mixins/timerMixin.js +155 -155
- package/src/module/stores/appStore.js +901 -893
- package/src/module/xapi/ADL.js +380 -376
- 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 -315
- 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 -1963
- package/src/module/xapi/xapiStatement.js +444 -444
- package/src/plugins/bus.js +8 -8
- package/src/plugins/gsap.js +14 -14
- package/src/plugins/helper.js +314 -308
- package/src/plugins/i18n.js +44 -44
- package/src/plugins/idb.js +227 -219
- 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 -33
- package/src/router/index.js +43 -43
- package/src/router/routes.js +312 -312
- package/src/shared/generalfuncs.js +210 -210
- package/src/shared/validators.js +1069 -1069
- package/vite.config.js +0 -27
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
<!-- About this Component--
|
|
2
|
-
* Renders a checkboxe input type for the Quiz component
|
|
3
|
-
* Related Quiz to question: REPONSE_MULTIPLE
|
|
4
|
-
* Receives the a data object defined by user
|
|
5
|
-
* Used by AppCompQuizNext
|
|
6
|
-
-->
|
|
7
|
-
<template>
|
|
8
|
-
<div class="input-box">
|
|
9
|
-
<fieldset>
|
|
10
|
-
<legend
|
|
11
|
-
:id="`lgd_${inputDataId}`"
|
|
12
|
-
class="sr-only"
|
|
13
|
-
tabindex="-1"
|
|
14
|
-
v-html="$t('quizState.answers')"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<template
|
|
18
|
-
v-for="choixReponse in inputDataValue"
|
|
19
|
-
:Key="`div_chx_${inputDataId}_${choixReponse.id}`"
|
|
20
|
-
>
|
|
21
|
-
<div class="box-checkbox" role="group">
|
|
22
|
-
<label
|
|
23
|
-
:key="`lbl_chx_${inputDataId}-${choixReponse.id}`"
|
|
24
|
-
:for="`chx_${inputDataId}_${choixReponse.id}`"
|
|
25
|
-
:class="classInput(choixReponse.id)"
|
|
26
|
-
class="checkbox-label"
|
|
27
|
-
>
|
|
28
|
-
<input
|
|
29
|
-
:id="`chx_${inputDataId}_${choixReponse.id}`"
|
|
30
|
-
:key="`chx_${inputDataId}_${inputDataId}-${choixReponse.id}`"
|
|
31
|
-
v-model="quizInputMultipleValue"
|
|
32
|
-
type="checkbox"
|
|
33
|
-
:value="choixReponse.id"
|
|
34
|
-
:name="`btn-checkbox-${inputDataId}`"
|
|
35
|
-
:disabled="quizLimitActive"
|
|
36
|
-
class="checkbox-input"
|
|
37
|
-
:aria-labelledby="`span_${inputDataId}_${choixReponse.id}`"
|
|
38
|
-
/>
|
|
39
|
-
<span
|
|
40
|
-
:id="`span_${inputDataId}_${choixReponse.id}`"
|
|
41
|
-
class="checkbox-contenu"
|
|
42
|
-
aria-hidden="true"
|
|
43
|
-
v-html="choixReponse.value"
|
|
44
|
-
></span>
|
|
45
|
-
<span
|
|
46
|
-
:id="`${inputDataId}_${choixReponse.id}-msg-erreur`"
|
|
47
|
-
:key="`msg_chx_${inputDataId}_${choixReponse.id}`"
|
|
48
|
-
class="sr-only"
|
|
49
|
-
>
|
|
50
|
-
{{ messageAccessibility(choixReponse.id) }}
|
|
51
|
-
</span>
|
|
52
|
-
</label>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
</fieldset>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
58
|
-
<script>
|
|
59
|
-
import { useQuiz } from '../composables/useQuiz'
|
|
60
|
-
import { toRefs } from 'vue'
|
|
61
|
-
export default {
|
|
62
|
-
name: 'AppCompInputCheckBoxNext',
|
|
63
|
-
|
|
64
|
-
props: {
|
|
65
|
-
quizType: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: ''
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
inputDataId: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: ''
|
|
73
|
-
},
|
|
74
|
-
inputData: {
|
|
75
|
-
type: Array,
|
|
76
|
-
default: () => []
|
|
77
|
-
},
|
|
78
|
-
quizInputType: {
|
|
79
|
-
type: Array,
|
|
80
|
-
default: () => []
|
|
81
|
-
},
|
|
82
|
-
solution: {
|
|
83
|
-
type: Array,
|
|
84
|
-
default: () => []
|
|
85
|
-
},
|
|
86
|
-
showSolution: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: false
|
|
89
|
-
},
|
|
90
|
-
shuffleAnswers: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: false
|
|
93
|
-
},
|
|
94
|
-
quizLimitActive: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: false
|
|
97
|
-
}, //use to set if quiz should be active or not
|
|
98
|
-
|
|
99
|
-
quizSubmit: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: false
|
|
102
|
-
} //use to call a submit
|
|
103
|
-
},
|
|
104
|
-
emits: ['input-change'],
|
|
105
|
-
setup(props) {
|
|
106
|
-
const { containsValue, shuffleArray, classInput, messageAccessibility } =
|
|
107
|
-
useQuiz(toRefs(props))
|
|
108
|
-
|
|
109
|
-
return { containsValue, shuffleArray, classInput, messageAccessibility }
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
data() {
|
|
113
|
-
return {
|
|
114
|
-
inputDataValue: [],
|
|
115
|
-
quizInputMultipleValue: [], //not using quizInputMultiple because quizInputMultiple is a prop
|
|
116
|
-
quizSolution: null
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
watch: {
|
|
121
|
-
/**
|
|
122
|
-
* @description to pass value to AppCompQuiz
|
|
123
|
-
* @fires input-change to AppCompQuiz.vue
|
|
124
|
-
*/
|
|
125
|
-
quizInputMultipleValue: {
|
|
126
|
-
deep: true,
|
|
127
|
-
handler(newValue) {
|
|
128
|
-
this.$emit('input-change', newValue)
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
mounted() {
|
|
134
|
-
this.initQuiz()
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
methods: {
|
|
138
|
-
initQuiz() {
|
|
139
|
-
this.quizSolution = this.solution
|
|
140
|
-
if (this.quizSolution !== null) {
|
|
141
|
-
this.quizSolution.sort(function (a, b) {
|
|
142
|
-
return a - b
|
|
143
|
-
})
|
|
144
|
-
}
|
|
145
|
-
this.quizInputMultipleValue = this.quizInputType
|
|
146
|
-
|
|
147
|
-
if (this.shuffleAnswers)
|
|
148
|
-
return (this.inputDataValue = this.shuffleArray(this.inputData))
|
|
149
|
-
|
|
150
|
-
this.inputDataValue = this.inputData
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
</script>
|
|
155
|
-
<style lang="scss">
|
|
156
|
-
fieldset {
|
|
157
|
-
border: inherit;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.custom-control-input:focus ~ .custom-control-label::before {
|
|
161
|
-
border: inherit;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.custom-control-input:focus ~ .custom-control-label::before {
|
|
165
|
-
box-shadow: inherit;
|
|
166
|
-
-webkit-box-shadow: inherit;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.custom-checkbox {
|
|
170
|
-
width: 100%;
|
|
171
|
-
height: 100%;
|
|
172
|
-
padding-left: 0;
|
|
173
|
-
|
|
174
|
-
input {
|
|
175
|
-
width: 100%;
|
|
176
|
-
height: 100%;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
label {
|
|
180
|
-
width: 100%;
|
|
181
|
-
height: 100%;
|
|
182
|
-
|
|
183
|
-
&:after,
|
|
184
|
-
&:before {
|
|
185
|
-
border: inherit;
|
|
186
|
-
top: 0px;
|
|
187
|
-
left: 0px;
|
|
188
|
-
height: 0;
|
|
189
|
-
width: 0;
|
|
190
|
-
background-color: inherit;
|
|
191
|
-
border: inherit;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
</style>
|
|
1
|
+
<!-- About this Component--
|
|
2
|
+
* Renders a checkboxe input type for the Quiz component
|
|
3
|
+
* Related Quiz to question: REPONSE_MULTIPLE
|
|
4
|
+
* Receives the a data object defined by user
|
|
5
|
+
* Used by AppCompQuizNext
|
|
6
|
+
-->
|
|
7
|
+
<template>
|
|
8
|
+
<div class="input-box">
|
|
9
|
+
<fieldset>
|
|
10
|
+
<legend
|
|
11
|
+
:id="`lgd_${inputDataId}`"
|
|
12
|
+
class="sr-only"
|
|
13
|
+
tabindex="-1"
|
|
14
|
+
v-html="$t('quizState.answers')"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<template
|
|
18
|
+
v-for="choixReponse in inputDataValue"
|
|
19
|
+
:Key="`div_chx_${inputDataId}_${choixReponse.id}`"
|
|
20
|
+
>
|
|
21
|
+
<div class="box-checkbox" role="group">
|
|
22
|
+
<label
|
|
23
|
+
:key="`lbl_chx_${inputDataId}-${choixReponse.id}`"
|
|
24
|
+
:for="`chx_${inputDataId}_${choixReponse.id}`"
|
|
25
|
+
:class="classInput(choixReponse.id)"
|
|
26
|
+
class="checkbox-label"
|
|
27
|
+
>
|
|
28
|
+
<input
|
|
29
|
+
:id="`chx_${inputDataId}_${choixReponse.id}`"
|
|
30
|
+
:key="`chx_${inputDataId}_${inputDataId}-${choixReponse.id}`"
|
|
31
|
+
v-model="quizInputMultipleValue"
|
|
32
|
+
type="checkbox"
|
|
33
|
+
:value="choixReponse.id"
|
|
34
|
+
:name="`btn-checkbox-${inputDataId}`"
|
|
35
|
+
:disabled="quizLimitActive"
|
|
36
|
+
class="checkbox-input"
|
|
37
|
+
:aria-labelledby="`span_${inputDataId}_${choixReponse.id}`"
|
|
38
|
+
/>
|
|
39
|
+
<span
|
|
40
|
+
:id="`span_${inputDataId}_${choixReponse.id}`"
|
|
41
|
+
class="checkbox-contenu"
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
v-html="choixReponse.value"
|
|
44
|
+
></span>
|
|
45
|
+
<span
|
|
46
|
+
:id="`${inputDataId}_${choixReponse.id}-msg-erreur`"
|
|
47
|
+
:key="`msg_chx_${inputDataId}_${choixReponse.id}`"
|
|
48
|
+
class="sr-only"
|
|
49
|
+
>
|
|
50
|
+
{{ messageAccessibility(choixReponse.id) }}
|
|
51
|
+
</span>
|
|
52
|
+
</label>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
</fieldset>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
<script>
|
|
59
|
+
import { useQuiz } from '../composables/useQuiz'
|
|
60
|
+
import { toRefs } from 'vue'
|
|
61
|
+
export default {
|
|
62
|
+
name: 'AppCompInputCheckBoxNext',
|
|
63
|
+
|
|
64
|
+
props: {
|
|
65
|
+
quizType: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ''
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
inputDataId: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ''
|
|
73
|
+
},
|
|
74
|
+
inputData: {
|
|
75
|
+
type: Array,
|
|
76
|
+
default: () => []
|
|
77
|
+
},
|
|
78
|
+
quizInputType: {
|
|
79
|
+
type: Array,
|
|
80
|
+
default: () => []
|
|
81
|
+
},
|
|
82
|
+
solution: {
|
|
83
|
+
type: Array,
|
|
84
|
+
default: () => []
|
|
85
|
+
},
|
|
86
|
+
showSolution: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false
|
|
89
|
+
},
|
|
90
|
+
shuffleAnswers: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false
|
|
93
|
+
},
|
|
94
|
+
quizLimitActive: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
}, //use to set if quiz should be active or not
|
|
98
|
+
|
|
99
|
+
quizSubmit: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: false
|
|
102
|
+
} //use to call a submit
|
|
103
|
+
},
|
|
104
|
+
emits: ['input-change'],
|
|
105
|
+
setup(props) {
|
|
106
|
+
const { containsValue, shuffleArray, classInput, messageAccessibility } =
|
|
107
|
+
useQuiz(toRefs(props))
|
|
108
|
+
|
|
109
|
+
return { containsValue, shuffleArray, classInput, messageAccessibility }
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
data() {
|
|
113
|
+
return {
|
|
114
|
+
inputDataValue: [],
|
|
115
|
+
quizInputMultipleValue: [], //not using quizInputMultiple because quizInputMultiple is a prop
|
|
116
|
+
quizSolution: null
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
watch: {
|
|
121
|
+
/**
|
|
122
|
+
* @description to pass value to AppCompQuiz
|
|
123
|
+
* @fires input-change to AppCompQuiz.vue
|
|
124
|
+
*/
|
|
125
|
+
quizInputMultipleValue: {
|
|
126
|
+
deep: true,
|
|
127
|
+
handler(newValue) {
|
|
128
|
+
this.$emit('input-change', newValue)
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
mounted() {
|
|
134
|
+
this.initQuiz()
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
methods: {
|
|
138
|
+
initQuiz() {
|
|
139
|
+
this.quizSolution = this.solution
|
|
140
|
+
if (this.quizSolution !== null) {
|
|
141
|
+
this.quizSolution.sort(function (a, b) {
|
|
142
|
+
return a - b
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
this.quizInputMultipleValue = this.quizInputType
|
|
146
|
+
|
|
147
|
+
if (this.shuffleAnswers)
|
|
148
|
+
return (this.inputDataValue = this.shuffleArray(this.inputData))
|
|
149
|
+
|
|
150
|
+
this.inputDataValue = this.inputData
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
</script>
|
|
155
|
+
<style lang="scss">
|
|
156
|
+
fieldset {
|
|
157
|
+
border: inherit;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.custom-control-input:focus ~ .custom-control-label::before {
|
|
161
|
+
border: inherit;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.custom-control-input:focus ~ .custom-control-label::before {
|
|
165
|
+
box-shadow: inherit;
|
|
166
|
+
-webkit-box-shadow: inherit;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.custom-checkbox {
|
|
170
|
+
width: 100%;
|
|
171
|
+
height: 100%;
|
|
172
|
+
padding-left: 0;
|
|
173
|
+
|
|
174
|
+
input {
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
label {
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 100%;
|
|
182
|
+
|
|
183
|
+
&:after,
|
|
184
|
+
&:before {
|
|
185
|
+
border: inherit;
|
|
186
|
+
top: 0px;
|
|
187
|
+
left: 0px;
|
|
188
|
+
height: 0;
|
|
189
|
+
width: 0;
|
|
190
|
+
background-color: inherit;
|
|
191
|
+
border: inherit;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
</style>
|