fcad-core-dragon 2.0.0-beta.1 → 2.0.0-beta.10
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 +6 -31
- package/.prettierrc +11 -0
- package/.vscode/extensions.json +8 -0
- package/.vscode/settings.json +16 -0
- package/CHANGELOG +153 -0
- package/README.md +28 -43
- package/documentation/.vitepress/config.js +114 -0
- package/documentation/api-examples.md +49 -0
- package/documentation/composants/app-base-button.md +58 -0
- package/documentation/composants/app-base-error-display.md +59 -0
- package/documentation/composants/app-base-popover.md +68 -0
- package/documentation/composants/app-comp-audio.md +75 -0
- package/documentation/composants/app-comp-branch-buttons.md +111 -0
- package/documentation/composants/app-comp-button-progress.md +53 -0
- package/documentation/composants/app-comp-carousel.md +53 -0
- package/documentation/composants/app-comp-container.md +53 -0
- package/documentation/composants/app-comp-input-checkbox-next.md +42 -0
- package/documentation/composants/app-comp-input-dropdown-next.md +34 -0
- package/documentation/composants/app-comp-input-radio-next.md +39 -0
- package/documentation/composants/app-comp-input-text-next.md +35 -0
- package/documentation/composants/app-comp-input-text-table-next.md +34 -0
- package/documentation/composants/app-comp-input-text-to-fill-dropdown-next.md +53 -0
- package/documentation/composants/app-comp-input-text-to-fill-next.md +31 -0
- package/documentation/composants/app-comp-jauge.md +31 -0
- package/documentation/composants/app-comp-menu-item.md +55 -0
- package/documentation/composants/app-comp-menu.md +29 -0
- package/documentation/composants/app-comp-navigation.md +41 -0
- package/documentation/composants/app-comp-note-call.md +53 -0
- package/documentation/composants/app-comp-note-credit.md +53 -0
- package/documentation/composants/app-comp-play-bar-next.md +53 -0
- package/documentation/composants/app-comp-pop-up-next.md +93 -0
- package/documentation/composants/app-comp-quiz-next.md +235 -0
- package/documentation/composants/app-comp-quiz-recall.md +53 -0
- package/documentation/composants/app-comp-svg-next.md +53 -0
- package/documentation/composants/app-comp-table-of-content.md +50 -0
- package/documentation/composants/app-comp-video-player.md +82 -0
- package/documentation/composants.md +46 -0
- package/documentation/composants_critiques/ModelPageComposant.md +53 -0
- package/documentation/composants_critiques/app-base-module.md +43 -0
- package/documentation/composants_critiques/app-base-page.md +48 -0
- package/documentation/composants_critiques/app-base.md +311 -0
- package/documentation/composants_critiques/main.md +15 -0
- package/documentation/demarrage.md +50 -0
- package/documentation/deploiement.md +58 -0
- package/documentation/index.md +33 -0
- package/documentation/markdown-examples.md +85 -0
- package/documentation/public/npm_version.png +0 -0
- package/documentation/public/vite.svg +15 -0
- package/documentation/public/vuejs.svg +2 -0
- package/documentation/public/vuetify.svg +6 -0
- package/eslint.config.js +60 -0
- package/package.json +43 -47
- package/src/$locales/en.json +86 -108
- package/src/$locales/fr.json +66 -127
- package/src/assets/data/onboardingMessages.json +1 -1
- package/src/components/AppBase.vue +960 -405
- package/src/components/AppBaseButton.test.js +21 -0
- package/src/components/AppBaseButton.vue +42 -10
- package/src/components/AppBaseErrorDisplay.vue +207 -189
- package/src/components/AppBaseFlipCard.vue +1 -0
- package/src/components/AppBaseModule.vue +769 -977
- package/src/components/AppBasePage.vue +635 -81
- package/src/components/AppBasePopover.vue +41 -0
- package/src/components/AppBaseSkeleton.vue +66 -0
- package/src/components/AppCompAudio.vue +256 -0
- package/src/components/AppCompBranchButtons.vue +79 -153
- package/src/components/AppCompButtonProgress.vue +21 -36
- package/src/components/AppCompCarousel.vue +231 -87
- package/src/components/{AppCompTranscript.vue → AppCompContainer.vue} +12 -2
- package/src/components/AppCompInputCheckBoxNx.vue +323 -0
- package/src/components/AppCompInputDropdownNx.vue +299 -0
- package/src/components/AppCompInputRadioNx.vue +284 -0
- package/src/components/AppCompInputTextNx.vue +153 -0
- package/src/components/AppCompInputTextTableNx.vue +202 -0
- package/src/components/AppCompInputTextToFillDropdownNx.vue +340 -0
- package/src/components/AppCompInputTextToFillNx.vue +313 -0
- package/src/components/AppCompJauge.vue +36 -10
- package/src/components/AppCompMenu.vue +246 -32
- package/src/components/AppCompMenuItem.vue +87 -21
- package/src/components/AppCompNavigation.vue +470 -447
- package/src/components/AppCompNoteCall.vue +93 -58
- package/src/components/AppCompNoteCredit.vue +423 -96
- package/src/components/AppCompPlayBarNext.vue +2288 -0
- package/src/components/AppCompPopUpNext.vue +504 -0
- package/src/components/AppCompQuizNext.vue +510 -0
- package/src/components/AppCompQuizRecall.vue +199 -99
- package/src/components/AppCompSVGNext.vue +346 -0
- package/src/components/AppCompSettingsMenu.vue +17 -16
- package/src/components/AppCompTableOfContent.vue +262 -99
- package/src/components/AppCompVideoPlayer.vue +183 -142
- package/src/components/BaseModule.vue +8 -20
- package/src/components/tests__/AppBaseButton.spec.js +53 -0
- package/src/components/tests__/useTimer.spec.js +91 -0
- package/src/composables/useIdleDetector.js +56 -0
- package/src/composables/useQuiz.js +89 -0
- package/src/composables/useTimer.js +172 -0
- package/src/directives/nvdaFix.js +53 -0
- package/src/externalComps/ModuleView.vue +22 -0
- package/src/externalComps/SummaryView.vue +91 -0
- package/src/main.js +397 -148
- package/src/module/stores/appStore.js +947 -0
- package/src/module/xapi/ADL.js +241 -60
- 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 +2 -2
- 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 +3 -3
- package/src/module/xapi/launch.js +10 -10
- package/src/module/xapi/utils.js +17 -17
- package/src/module/xapi/wrapper.js +219 -214
- package/src/module/xapi/xapiStatement.js +29 -29
- package/src/plugins/analytics.js +34 -0
- package/src/plugins/bus.js +7 -2
- package/src/plugins/gsap.js +5 -7
- package/src/plugins/helper.js +97 -34
- package/src/plugins/i18n.js +13 -18
- package/src/plugins/idb.js +45 -30
- package/src/plugins/save.js +1 -1
- package/src/plugins/scorm.js +15 -15
- package/src/plugins/xapi.js +2 -2
- package/src/public/index.html +22 -10
- package/src/router/index.js +29 -13
- package/src/router/routes.js +29 -54
- package/src/shared/generalfuncs.js +186 -30
- package/src/shared/validators.js +809 -40
- package/vitest.config.js +19 -0
- package/.eslintignore +0 -29
- package/.eslintrc.js +0 -86
- 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/AppCompInputTextBox.vue +0 -91
- package/src/components/AppCompInputTextTable.vue +0 -155
- package/src/components/AppCompInputTextToFillDropdown.vue +0 -255
- package/src/components/AppCompInputTextToFillText.vue +0 -164
- package/src/components/AppCompMediaPlayer.vue +0 -397
- package/src/components/AppCompPlayBar.vue +0 -1319
- package/src/components/AppCompPopUp.vue +0 -522
- package/src/components/AppCompPopover.vue +0 -27
- package/src/components/AppCompQuiz.vue +0 -2989
- package/src/components/AppCompSVG.vue +0 -309
- package/src/mixins/$pageMixins.js +0 -459
- package/src/mixins/$quizMixins.js +0 -456
- package/src/mixins/timerMixin.js +0 -156
- 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,106 +1,141 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
----------------- MUST DO STYLE!! -----------------------
|
|
3
2
|
@ Description:
|
|
4
3
|
@ What it does:
|
|
5
4
|
-->
|
|
6
|
-
|
|
7
5
|
<template>
|
|
8
6
|
<div
|
|
9
|
-
:id="`rnt_${stripRefNote}`"
|
|
7
|
+
:id="`rnt_${pageRef}__${stripRefNote}`"
|
|
10
8
|
:ref="`#rnt_${stripRefNote}`"
|
|
9
|
+
:data-ref="`nt_${pageRef}__${stripRefNote}`"
|
|
11
10
|
class="callEndNote"
|
|
12
|
-
:dataRef="`nt_${stripRefNote}`"
|
|
13
11
|
>
|
|
14
|
-
<
|
|
12
|
+
<button
|
|
15
13
|
v-if="!error"
|
|
16
14
|
class="nrlm"
|
|
17
15
|
tabindex="0"
|
|
18
16
|
:title="$t('text.title_link_call')"
|
|
17
|
+
:aria-label="`${$t('label.note_reference')} ${stripRefNote}`"
|
|
19
18
|
@click="openNote()"
|
|
20
19
|
>
|
|
21
20
|
<sup>{{ stripRefNote }}</sup>
|
|
22
|
-
</
|
|
21
|
+
</button>
|
|
23
22
|
|
|
24
|
-
<div v-else>
|
|
25
|
-
<sup>error</sup>
|
|
23
|
+
<div v-else class="nrlm error-Nc" tabindex="0">
|
|
24
|
+
<sup>{{ $t('text.error') }}</sup>
|
|
26
25
|
</div>
|
|
27
26
|
</div>
|
|
28
27
|
</template>
|
|
29
28
|
<script>
|
|
29
|
+
import { mapState } from 'pinia'
|
|
30
|
+
import { useAppStore } from '../module/stores/appStore'
|
|
30
31
|
export default {
|
|
31
32
|
props: {
|
|
32
33
|
refNote: {
|
|
33
34
|
type: String,
|
|
34
35
|
default: ' '
|
|
36
|
+
},
|
|
37
|
+
pageRef: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ' '
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
data() {
|
|
38
43
|
return {
|
|
39
|
-
|
|
40
|
-
notes: null,
|
|
41
|
-
jsons: null
|
|
44
|
+
notes: null
|
|
42
45
|
}
|
|
43
46
|
},
|
|
44
47
|
computed: {
|
|
48
|
+
...mapState(useAppStore, ['getNotes', 'getWidgetOpen']),
|
|
45
49
|
// Return the number for the note
|
|
46
50
|
stripRefNote() {
|
|
47
|
-
let ref = this.refNote
|
|
48
51
|
let newRef
|
|
52
|
+
|
|
53
|
+
let ref = this.refNote
|
|
49
54
|
let toStrip = ref.indexOf('_')
|
|
50
55
|
newRef = this.refNote.substr(toStrip + 1)
|
|
51
|
-
|
|
52
56
|
return newRef
|
|
53
57
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
linkedNote() {
|
|
59
|
+
const _notes = this.getNotes(
|
|
60
|
+
this.$route.meta.activity_ref,
|
|
61
|
+
this.$route.meta.id
|
|
62
|
+
)
|
|
63
|
+
if (!_notes) return null
|
|
64
|
+
let thisPageNotes = null
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// info.note.value[this.stripRefNote - 1] === ' ' ||
|
|
68
|
-
// info.note.value[this.stripRefNote - 1] === undefined
|
|
69
|
-
// ) {
|
|
70
|
-
// er = true
|
|
71
|
-
// console.warn(
|
|
72
|
-
// '%c WARNING!>>> AppCompNoteCall: The note you try to call doesnt existe.',
|
|
73
|
-
// 'background: orange; color: white; display: block; margin:5px;'
|
|
74
|
-
// )
|
|
75
|
-
// } else {
|
|
76
|
-
// //check if value are the same :
|
|
77
|
-
// ///https://stackoverflow.com/questions/7376598/in-javascript-how-do-i-check-if-an-array-has-duplicate-values
|
|
78
|
-
// const items = [...document.getElementsByClassName('callEndNote')]
|
|
79
|
-
|
|
80
|
-
// let cltn = []
|
|
81
|
-
// items.forEach((element) => {
|
|
82
|
-
// cltn.push(element.getAttribute('dataref'))
|
|
83
|
-
// })
|
|
84
|
-
// const l = cltn.some((e, i) => cltn.indexOf(e) < i)
|
|
85
|
-
// if (l) {
|
|
86
|
-
// er = true
|
|
87
|
-
// console.warn(
|
|
88
|
-
// '%c WARNING!>>> AppCompNoteCall: You call this note twice',
|
|
89
|
-
// 'background: orange; color: white; display: block; margin:5px;'
|
|
90
|
-
// )
|
|
91
|
-
// }
|
|
92
|
-
// }
|
|
93
|
-
// }
|
|
66
|
+
for (let p of _notes) {
|
|
67
|
+
//find the related page and get its notes
|
|
68
|
+
if (Object.keys(p)[0] !== this.pageRef) continue
|
|
69
|
+
thisPageNotes = p[this.pageRef]
|
|
70
|
+
}
|
|
71
|
+
//return weither the note exist or note
|
|
72
|
+
return thisPageNotes && thisPageNotes.find((n) => n.id == this.refNote)
|
|
73
|
+
},
|
|
94
74
|
|
|
95
|
-
|
|
75
|
+
error() {
|
|
76
|
+
let err = false
|
|
77
|
+
if (!this.linkedNote) {
|
|
78
|
+
err = true
|
|
79
|
+
console.warn(
|
|
80
|
+
`%c WARNING!>>> AppCompNoteCall: cette note n'existe pas nt_${this.pageRef}__${this.stripRefNote}.`,
|
|
81
|
+
'background: orange; color: white; display: block; margin:5px;'
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
return err
|
|
96
85
|
}
|
|
97
86
|
},
|
|
98
|
-
|
|
87
|
+
beforeUnmount() {
|
|
88
|
+
this.$bus.$off('close-widget', this.onCloseWidget)
|
|
89
|
+
this.$bus.$off('credit-note', this.onCreditNote)
|
|
90
|
+
},
|
|
91
|
+
mounted() {
|
|
92
|
+
this.$bus.$on('close-widget', this.onCloseWidget)
|
|
93
|
+
this.$bus.$on('credit-note', this.onCreditNote)
|
|
94
|
+
},
|
|
99
95
|
methods: {
|
|
96
|
+
onCreditNote(data) {
|
|
97
|
+
this.notes = data.note
|
|
98
|
+
},
|
|
99
|
+
onCloseWidget() {
|
|
100
|
+
let el = document.getElementsByClassName('callEndNote')
|
|
101
|
+
|
|
102
|
+
for (let element of el) {
|
|
103
|
+
element.setAttribute('datacurrentnote', false)
|
|
104
|
+
}
|
|
105
|
+
},
|
|
100
106
|
//open the widget and give information to highlight
|
|
101
107
|
openNote() {
|
|
102
|
-
|
|
108
|
+
if (!this.getWidgetOpen) {
|
|
109
|
+
this.$bus.$emit('open-notes')
|
|
110
|
+
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
this.$bus.$emit('note-to-show', this.$el)
|
|
113
|
+
|
|
114
|
+
let e = document.getElementsByClassName('callEndNote')
|
|
115
|
+
let t = this.$el.getAttribute('id')
|
|
116
|
+
|
|
117
|
+
for (let element of e) {
|
|
118
|
+
element.setAttribute('dataCurrentnote', false)
|
|
119
|
+
if (element.id === t) {
|
|
120
|
+
element.setAttribute('dataCurrentnote', true)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, 200)
|
|
124
|
+
} else {
|
|
125
|
+
this.$bus.$emit('close-widget')
|
|
126
|
+
this.$bus.$emit('note-to-show', this.$el)
|
|
127
|
+
let e = document.getElementsByClassName('callEndNote')
|
|
128
|
+
let t = this.$el.getAttribute('id')
|
|
129
|
+
|
|
130
|
+
for (let element of e) {
|
|
131
|
+
element.setAttribute('dataCurrentnote', false)
|
|
132
|
+
if (element.id === t) {
|
|
133
|
+
element.setAttribute('dataCurrentnote', true)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
103
137
|
},
|
|
138
|
+
|
|
104
139
|
lookForElement(elId) {
|
|
105
140
|
let clcn = document.getElementsByClassName('endNoteLink')
|
|
106
141
|
|
|
@@ -118,9 +153,9 @@ export default {
|
|
|
118
153
|
display: inline-block;
|
|
119
154
|
margin-left: -4px;
|
|
120
155
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
156
|
+
.error-Nc {
|
|
157
|
+
color: red;
|
|
158
|
+
font-weight: bold;
|
|
124
159
|
}
|
|
125
160
|
}
|
|
126
161
|
</style>
|