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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@ Description: This component is used to create a popover that is accessible via keyboard navigation (tab + space/enter)
|
|
3
|
+
-->
|
|
4
|
+
<template>
|
|
5
|
+
<v-tooltip
|
|
6
|
+
ref="tooltip"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
v-model="show"
|
|
9
|
+
transition="false"
|
|
10
|
+
:open-on-click="true"
|
|
11
|
+
:persistent="false"
|
|
12
|
+
>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</v-tooltip>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'AppBasePopover',
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
show: false,
|
|
23
|
+
alertContainer: null
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
watch: {
|
|
27
|
+
show: {
|
|
28
|
+
handler(newValue) {
|
|
29
|
+
if (newValue) {
|
|
30
|
+
const content = this.$refs.tooltip.contentEl.textContent
|
|
31
|
+
this.alertContainer.textContent = ''
|
|
32
|
+
this.alertContainer.textContent = content
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
mounted() {
|
|
38
|
+
this.alertContainer = document.getElementById('hiddenAlertContainer')
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section
|
|
3
|
+
:id="'audio_' + id"
|
|
4
|
+
ref="$media-container"
|
|
5
|
+
class="__media-container"
|
|
6
|
+
aria-label="Audio"
|
|
7
|
+
>
|
|
8
|
+
<!--Integration error display-->
|
|
9
|
+
<app-base-error-display
|
|
10
|
+
v-if="hasErr.length"
|
|
11
|
+
:error-group="'component'"
|
|
12
|
+
:error-title="`ERREUR: COMPOSANT D'AUDIO`"
|
|
13
|
+
:errors-list="hasErr"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<div v-else class="audio-card">
|
|
17
|
+
<!--Waiting and loading error -- skeleton-->
|
|
18
|
+
<div
|
|
19
|
+
v-if="isLoading || hasSourceLoadingError"
|
|
20
|
+
class="skeleton audio"
|
|
21
|
+
:class="{ isloading: isLoading, error: hasSourceLoadingError }"
|
|
22
|
+
>
|
|
23
|
+
<p v-if="hasSourceLoadingError">
|
|
24
|
+
Une erreur s'est produite lors du chargement du média, veuillez
|
|
25
|
+
réessayer
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
28
|
+
<!--Audio content-->
|
|
29
|
+
<div v-show="!isLoading && !hasSourceLoadingError" class="audio-content">
|
|
30
|
+
<img v-if="mPoster" class="audio-img" :src="mPoster" :alt="mAlt" />
|
|
31
|
+
<div class="audio-media">
|
|
32
|
+
<h5>{{ mTitle }}</h5>
|
|
33
|
+
<div class="audio-media-player">
|
|
34
|
+
<audio
|
|
35
|
+
:id="id"
|
|
36
|
+
ref="m-audio"
|
|
37
|
+
@loadedmetadata="updateMediaData($event)"
|
|
38
|
+
>
|
|
39
|
+
<source
|
|
40
|
+
v-for="(aSource, index) in mSources"
|
|
41
|
+
:key="index"
|
|
42
|
+
:src="aSource.src"
|
|
43
|
+
:type="aSource.type ? `audio/${aSource.type}` : 'audio/mp3'"
|
|
44
|
+
@error="errorHandling($event)"
|
|
45
|
+
/>
|
|
46
|
+
</audio>
|
|
47
|
+
<app-comp-play-bar-next
|
|
48
|
+
v-if="$audElement"
|
|
49
|
+
:ref="`plyr_${id}`"
|
|
50
|
+
:media-to-play="$audElement"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="audio-transcript">
|
|
56
|
+
<v-expansion-panels class="audio">
|
|
57
|
+
<v-expansion-panel>
|
|
58
|
+
<v-expansion-panel-title>
|
|
59
|
+
{{ $t('text.transcript') }}
|
|
60
|
+
</v-expansion-panel-title>
|
|
61
|
+
<v-expansion-panel-text>
|
|
62
|
+
<div v-html="mTranscript"></div>
|
|
63
|
+
</v-expansion-panel-text>
|
|
64
|
+
</v-expansion-panel>
|
|
65
|
+
</v-expansion-panels>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</section>
|
|
69
|
+
</template>
|
|
70
|
+
<script>
|
|
71
|
+
import { mapState, mapActions } from 'pinia'
|
|
72
|
+
import { useAppStore } from '../module/stores/appStore'
|
|
73
|
+
import { validateAudioData } from '../shared/validators'
|
|
74
|
+
import AppCompPlayBarNext from './AppCompPlayBarNext.vue'
|
|
75
|
+
|
|
76
|
+
export default {
|
|
77
|
+
components: { AppCompPlayBarNext },
|
|
78
|
+
props: {
|
|
79
|
+
audData: {
|
|
80
|
+
type: Object,
|
|
81
|
+
required: true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
id: this.audData.id,
|
|
87
|
+
mTitle: this.audData.mTitle,
|
|
88
|
+
mSources: this.audData.mSources,
|
|
89
|
+
mTranscript: this.audData.mTranscript,
|
|
90
|
+
mPoster: this.audData.mPoster,
|
|
91
|
+
mAlt: this.audData.mAlt ? this.audData.mAlt : ' ',
|
|
92
|
+
isSet: false,
|
|
93
|
+
hasSourceLoadingError: false,
|
|
94
|
+
hasErr: validateAudioData(this.audData)
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
computed: {
|
|
98
|
+
...mapState(useAppStore, ['getCurrentBrowser', 'getCurrentPage']),
|
|
99
|
+
$audElement() {
|
|
100
|
+
if (!this.isSet) return null
|
|
101
|
+
return {
|
|
102
|
+
id: this.id,
|
|
103
|
+
mTranscript: null,
|
|
104
|
+
mType: 'audio',
|
|
105
|
+
mSubtitles: null,
|
|
106
|
+
mElement: this.$refs['m-audio']
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
//MediaElement
|
|
110
|
+
mediaElement() {
|
|
111
|
+
if (!this.$audElement) return null
|
|
112
|
+
const { mElement } = this.$audElement
|
|
113
|
+
let thisElement = null
|
|
114
|
+
|
|
115
|
+
if (!mElement) return null
|
|
116
|
+
thisElement = mElement
|
|
117
|
+
|
|
118
|
+
return thisElement
|
|
119
|
+
},
|
|
120
|
+
//Loading display
|
|
121
|
+
isLoading() {
|
|
122
|
+
if (!this.isSet && !this.hasSourceLoadingError) return true
|
|
123
|
+
else return false
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
mounted() {},
|
|
127
|
+
beforeUnmount() {},
|
|
128
|
+
|
|
129
|
+
methods: {
|
|
130
|
+
...mapActions(useAppStore, ['updateCurrentMediaElements']),
|
|
131
|
+
/**
|
|
132
|
+
* @description update the information for the mediaElement in the store
|
|
133
|
+
* @param {htmlElement} e
|
|
134
|
+
* @fires update-page to AppBaseModule.vue
|
|
135
|
+
*/
|
|
136
|
+
updateMediaData(e) {
|
|
137
|
+
//dispatch loading status of for this component
|
|
138
|
+
this.$bus.$emit('set-comp-status', 'AppCompMediaPlayer', 'loading')
|
|
139
|
+
this.$bus.$emit('update-media-duration')
|
|
140
|
+
|
|
141
|
+
//Should Check that the the media Element is unique im Media Liste
|
|
142
|
+
const { mElements } = this.getCurrentPage
|
|
143
|
+
|
|
144
|
+
const hasEntry = mElements.findLastIndex(
|
|
145
|
+
(media) => media.id === e.target.id
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
if (hasEntry !== -1) {
|
|
149
|
+
// Should report Error to Console and Component template about this media
|
|
150
|
+
const errmsg = `Cet élément a le même ID q'un autre media. Vous ne devez pas avoir de médias avec le même ID dans une page.`
|
|
151
|
+
|
|
152
|
+
console.warn(
|
|
153
|
+
`%c WARNING!>>> You cannot use the same ID in your media elements for your page.`,
|
|
154
|
+
'background: orange; color: white; display: block; border-radius:5px; margin:5px;'
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
this.$bus.$emit('set-comp-status', 'AppCompMediaPlayer', 'ready')
|
|
158
|
+
return this.hasErr.push(errmsg)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
this.updateCurrentMediaElements(e.target).then(() => {
|
|
162
|
+
this.isSet = true
|
|
163
|
+
this.$bus.$emit('set-comp-status', 'AppCompMediaPlayer', 'ready')
|
|
164
|
+
})
|
|
165
|
+
},
|
|
166
|
+
errorHandling(e) {
|
|
167
|
+
this.hasSourceLoadingError = true
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
</script>
|
|
172
|
+
<style scoped lang="scss">
|
|
173
|
+
.audio-card {
|
|
174
|
+
// --primary100: #deeff8;
|
|
175
|
+
// --primary700: #005c8d;
|
|
176
|
+
position: relative;
|
|
177
|
+
border-radius: 4px;
|
|
178
|
+
padding: 24px;
|
|
179
|
+
max-width: 600px;
|
|
180
|
+
box-shadow: 0px 3px 6px rgb(26 25 25 / 0.16);
|
|
181
|
+
.audio-img {
|
|
182
|
+
width: 128px;
|
|
183
|
+
margin-right: 24px;
|
|
184
|
+
}
|
|
185
|
+
.audio-content {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: row;
|
|
188
|
+
align-items: center;
|
|
189
|
+
padding-bottom: 24px;
|
|
190
|
+
.audio-media {
|
|
191
|
+
width: 100%;
|
|
192
|
+
h5 {
|
|
193
|
+
margin-bottom: 16px;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
.audio-transcript {
|
|
198
|
+
padding-top: 24px;
|
|
199
|
+
}
|
|
200
|
+
.audio-transcript-header {
|
|
201
|
+
display: flex;
|
|
202
|
+
justify-content: space-between;
|
|
203
|
+
align-items: center;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.audio-transcript-button {
|
|
207
|
+
height: 52px;
|
|
208
|
+
width: 52px;
|
|
209
|
+
display: flex;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
align-items: center;
|
|
212
|
+
svg {
|
|
213
|
+
max-width: 18px;
|
|
214
|
+
height: 10.25px;
|
|
215
|
+
}
|
|
216
|
+
&.rotate svg {
|
|
217
|
+
transition: transform 0.5s;
|
|
218
|
+
transform-origin: center;
|
|
219
|
+
}
|
|
220
|
+
&.rotate.click svg {
|
|
221
|
+
transform: rotate(180deg);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.skeleton {
|
|
227
|
+
&.audio {
|
|
228
|
+
height: 100%;
|
|
229
|
+
width: 100%;
|
|
230
|
+
left: 0;
|
|
231
|
+
top: 0;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
</style>
|