fcad-core-dragon 2.0.0-beta.2 → 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.
Files changed (72) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/CHANGELOG +9 -0
  3. package/package.json +26 -12
  4. package/src/$locales/en.json +37 -87
  5. package/src/$locales/fr.json +17 -106
  6. package/src/assets/data/onboardingMessages.json +1 -1
  7. package/src/components/AppBase.vue +241 -143
  8. package/src/components/AppBaseButton.vue +2 -6
  9. package/src/components/AppBaseErrorDisplay.vue +193 -183
  10. package/src/components/AppBaseFlipCard.vue +1 -0
  11. package/src/components/AppBaseModule.vue +195 -225
  12. package/src/components/AppBasePage.vue +519 -64
  13. package/src/components/AppBasePopover.vue +41 -0
  14. package/src/components/AppCompAudio.vue +32 -64
  15. package/src/components/AppCompBranchButtons.vue +52 -71
  16. package/src/components/AppCompButtonProgress.vue +12 -18
  17. package/src/components/AppCompCarousel.vue +102 -0
  18. package/src/components/{AppCompInputCheckBox.vue → AppCompInputCheckBoxNext.vue} +56 -94
  19. package/src/components/AppCompInputDropdownNext.vue +159 -0
  20. package/src/components/{AppCompInputRadio.vue → AppCompInputRadioNext.vue} +53 -63
  21. package/src/components/AppCompInputTextNext.vue +106 -0
  22. package/src/components/AppCompInputTextTableNext.vue +141 -0
  23. package/src/components/AppCompInputTextToFillDropdownNext.vue +230 -0
  24. package/src/components/{AppCompInputTextToFillText.vue → AppCompInputTextToFillNext.vue} +71 -64
  25. package/src/components/AppCompJauge.vue +16 -9
  26. package/src/components/AppCompMenu.vue +50 -29
  27. package/src/components/AppCompMenuItem.vue +52 -15
  28. package/src/components/AppCompNavigation.vue +225 -211
  29. package/src/components/AppCompNoteCall.vue +22 -30
  30. package/src/components/AppCompNoteCredit.vue +45 -20
  31. package/src/components/AppCompPlayBar.vue +55 -108
  32. package/src/components/AppCompPlayBarNext.vue +2052 -0
  33. package/src/components/AppCompPlayBarProgress.vue +10 -1
  34. package/src/components/AppCompPopUpNext.vue +503 -0
  35. package/src/components/{AppCompQuiz.vue → AppCompQuizNext.vue} +632 -703
  36. package/src/components/AppCompQuizRecall.vue +74 -75
  37. package/src/components/{AppCompSVG.vue → AppCompSVGNext.vue} +111 -99
  38. package/src/components/AppCompSettingsMenu.vue +11 -8
  39. package/src/components/AppCompTableOfContent.vue +78 -76
  40. package/src/components/AppCompTranscript.vue +5 -0
  41. package/src/components/AppCompVideoPlayer.vue +30 -42
  42. package/src/components/BaseModule.vue +1 -0
  43. package/src/composables/useQuiz.js +206 -0
  44. package/src/externalComps/ModuleView.vue +22 -0
  45. package/src/externalComps/SummaryView.vue +91 -0
  46. package/src/main.js +99 -90
  47. package/src/mixins/$mediaMixins.js +13 -21
  48. package/src/mixins/timerMixin.js +1 -1
  49. package/src/module/stores/appStore.js +901 -0
  50. package/src/module/xapi/ADL.js +8 -4
  51. package/src/plugins/bus.js +7 -2
  52. package/src/plugins/gsap.js +4 -7
  53. package/src/plugins/helper.js +33 -13
  54. package/src/plugins/i18n.js +2 -2
  55. package/src/plugins/idb.js +44 -29
  56. package/src/plugins/save.js +1 -1
  57. package/src/plugins/scorm.js +2 -2
  58. package/src/plugins/xapi.js +2 -2
  59. package/src/public/index.html +22 -10
  60. package/src/router/index.js +13 -10
  61. package/src/router/routes.js +20 -25
  62. package/src/shared/generalfuncs.js +33 -18
  63. package/src/shared/validators.js +116 -6
  64. package/src/components/AppCompInputDropdown.vue +0 -182
  65. package/src/components/AppCompInputTextBox.vue +0 -91
  66. package/src/components/AppCompInputTextTable.vue +0 -158
  67. package/src/components/AppCompInputTextToFillDropdown.vue +0 -257
  68. package/src/components/AppCompPopUp.vue +0 -583
  69. package/src/components/AppCompPopover.vue +0 -27
  70. package/src/mixins/$pageMixins.js +0 -415
  71. package/src/mixins/$quizMixins.js +0 -442
  72. package/src/module/store.js +0 -1014
@@ -16,38 +16,36 @@
16
16
  >
17
17
  {{ $t('message.skip_content') }}
18
18
  </a>
19
- <b-row align-v="center" align-h="center" class="r-menu">
19
+ <div class="contain-lr">
20
20
  <div class="wrapper-lasRoute">
21
21
  <div class="box-menu">
22
22
  <h1>{{ getLessonid }}</h1>
23
23
  <h2 v-html="getLessonTitle"></h2>
24
+
24
25
  <p class="lesson-progess">
25
26
  {{ $t('message.progress_card') }} {{ lessonProg() }}
26
27
  </p>
27
- <b-link
28
+ <router-link
28
29
  id="btn_last_route"
29
30
  class="nav_last_route btn-main"
30
31
  :title="handelLabel"
31
32
  :to="{ name: GoToLastRoute() }"
33
+ data-test="menu-back-btn"
32
34
  >
33
35
  {{ handelLabel }}
34
- </b-link>
36
+ </router-link>
35
37
  </div>
36
38
  </div>
39
+ <v-row justify="center" align="center" class="r-menu">
40
+ <v-col id="menu-main" md="10" class="wrapper-MenuItem">
41
+ <h3>{{ $t('text.activity_title') }}</h3>
37
42
 
38
- <b-col
39
- id="menu-main"
40
- md="10"
41
- class="wrapper-MenuItem"
42
- title="table of content for this lesson"
43
- >
44
- <h3>{{ $t('text.activity_title') }}</h3>
45
-
46
- <app-comp-menu-item></app-comp-menu-item>
47
- </b-col>
48
- </b-row>
49
- <b-row align-v="center" align-h="center">
50
- <b-col md="7">
43
+ <app-comp-menu-item></app-comp-menu-item>
44
+ </v-col>
45
+ </v-row>
46
+ </div>
47
+ <v-row justify="center" align="center">
48
+ <v-col md="7">
51
49
  <div v-show="appDebugMode" id="_debug-area">
52
50
  <h5>Mode de débogage activé</h5>
53
51
  <p>
@@ -78,8 +76,8 @@
78
76
  </span>
79
77
  </div>
80
78
  </div>
81
- </b-col>
82
- </b-row>
79
+ </v-col>
80
+ </v-row>
83
81
  <div id="page_info" class="sr-only" aria-hidden="true">
84
82
  {{ $t('text.title_content_view') }}
85
83
  </div>
@@ -87,8 +85,8 @@
87
85
  </template>
88
86
  <script>
89
87
  // ...
90
- import { mapGetters } from 'vuex'
91
-
88
+ import { mapState } from 'pinia'
89
+ import { useAppStore } from '../module/stores/appStore'
92
90
  export default {
93
91
  name: 'AppCompMenu',
94
92
  data() {
@@ -100,14 +98,15 @@ export default {
100
98
  },
101
99
 
102
100
  computed: {
103
- ...mapGetters([
101
+ ...mapState(useAppStore, [
104
102
  'getRouteHistory',
105
103
  'getAllActivitiesState',
106
104
  'getAllCompleted',
107
105
  'getModuleInfo',
108
106
  'getMenuSettings',
109
107
  'getAppDebugMode',
110
- 'getAllCompleted'
108
+ 'getAllCompleted',
109
+ 'getDataFromServer'
111
110
  ]),
112
111
  appDebugMode() {
113
112
  return this.getAppDebugMode
@@ -120,15 +119,12 @@ export default {
120
119
  let completeActivity = Object.values(allCompleted)
121
120
 
122
121
  if (this.noProgress(activity)) {
123
- //console.log('dans handleLabel no progress a true')
124
122
  label = this.$t('button.menu_item.start')
125
123
  } else {
126
- // console.log('dans handleLabel no progress a false')
127
-
128
124
  if (activity.length == completeActivity.length) {
129
125
  label = this.$t('button.menu_item.end')
130
126
  } else {
131
- label = this.$t('button.menu_item.middle')
127
+ label = this.$t('button.menu_item.end')
132
128
  }
133
129
  }
134
130
  return label
@@ -170,10 +166,20 @@ export default {
170
166
  }
171
167
  }, 2000)
172
168
  },
169
+ // GoToLastRoute() {
170
+ // let lastRoute
171
+ // //Get all activity state (menu not included)
172
+
173
+ // //No route history Should link to introduction route
174
+ // if (!this.getRouteHistory.length) return 'introduction'
175
+ // //last Route should be the last element in route history
176
+ // lastRoute = this.getRouteHistory.toReversed()[0]
177
+ // //create the route link and return it
178
+ // return this.createdRoute(lastRoute)
179
+ // },
173
180
  GoToLastRoute() {
174
181
  let lastRoute
175
182
  let path
176
-
177
183
  //Get all activity state (menu not included)
178
184
  const { allActivitiesState } = this.progressWithMenu()
179
185
  let state = Object.values(allActivitiesState)
@@ -217,7 +223,7 @@ export default {
217
223
  activity = newRoute.type
218
224
  } else {
219
225
  activity =
220
- newRoute.activity_ref.charAt(1) == '0'
226
+ newRoute.activity_ref && newRoute.activity_ref.charAt(1) == '0'
221
227
  ? `activite_${newRoute.activity_ref.substring(2)}`
222
228
  : `activite_${newRoute.activity_ref.substring(1)}`
223
229
  }
@@ -228,7 +234,6 @@ export default {
228
234
 
229
235
  //Define path
230
236
  path = page !== ' ' ? `${activity}.page_${page}` : activity
231
-
232
237
  return path
233
238
  },
234
239
  progressWithMenu() {
@@ -297,6 +302,22 @@ export default {
297
302
  }
298
303
  </script>
299
304
  <style lang="scss">
305
+ .contain-lr {
306
+ display: flex;
307
+ flex-direction: column;
308
+ flex-wrap: wrap;
309
+ width: 100%;
310
+
311
+ .wrapper-lasRoute {
312
+ display: flex;
313
+ justify-content: flex-end;
314
+
315
+ .nav_last_route {
316
+ display: inline-block;
317
+ }
318
+ }
319
+ }
320
+
300
321
  .menu-container {
301
322
  width: 100%;
302
323
  height: 100%;
@@ -3,24 +3,26 @@
3
3
  @ What it does: Goes trougth all the activity in the router and create a card that open the Table of content (appCompTableOfContent) that display the anchor.Display the title and subtitle enter in menu.json. Must be used with AppCompTableOfContent and AppCompMenu.
4
4
  -->
5
5
  <template>
6
- <b-row v-if="activities.length" class="box-msa">
7
- <b-col
6
+ <v-row v-if="activities.length" class="box-msa">
7
+ <v-col
8
8
  v-for="activity of activities"
9
9
  :key="activity.id"
10
10
  cols="6"
11
11
  class="menu-section-activity"
12
12
  :aria-describedby="activity.id + '-subMenu'"
13
13
  >
14
- <b-link
14
+ <router-link
15
15
  :id="activity.id + '-subMenu'"
16
16
  :title="activity.title"
17
+ :data-test="`item-menu-${activity.id}`"
18
+ class="btn-menu"
17
19
  :to="{
18
20
  name: createRoutes(activity.id)
19
21
  }"
20
22
  @click="startActivity(activity)"
21
23
  >
22
24
  <div class="menu-card" tag="article">
23
- <b-row>
25
+ <v-row>
24
26
  <div v-if="activity.subtitle === undefined" class="title">
25
27
  <h4 v-html="activity.title"></h4>
26
28
  </div>
@@ -28,11 +30,11 @@
28
30
  <h4 v-html="`${activity.title} : ${activity.subtitle}`"></h4>
29
31
  </div>
30
32
 
31
- <div class="time">
33
+ <div class="cnt-time">
34
+ <svg :aria-label="$t('label.timer')">
35
+ <use href="#clock-icon" />
36
+ </svg>
32
37
  <p class="time">
33
- <svg width="18" height="21.01" :aria-label="$t('label.timer')">
34
- <use href="#clock-icon" />
35
- </svg>
36
38
  {{ activity.time || '00:00' }}
37
39
  </p>
38
40
  </div>
@@ -42,22 +44,23 @@
42
44
  :value="getPageComplete(activity.id)"
43
45
  />
44
46
  </div>
45
- </b-row>
47
+ </v-row>
46
48
  </div>
47
- </b-link>
48
- </b-col>
49
- </b-row>
49
+ </router-link>
50
+ </v-col>
51
+ </v-row>
50
52
  </template>
51
53
  <script>
52
54
  // ...
53
- import { mapGetters } from 'vuex'
55
+ import { mapState } from 'pinia'
56
+ import { useAppStore } from '../module/stores/appStore'
54
57
  import AppCompJauge from './AppCompJauge.vue'
55
58
  export default {
56
59
  components: {
57
60
  AppCompJauge
58
61
  },
59
62
  computed: {
60
- ...mapGetters([
63
+ ...mapState(useAppStore, [
61
64
  'getAllActivities',
62
65
  'getAllActivitiesState',
63
66
  'getAllCompleted',
@@ -183,9 +186,43 @@ export default {
183
186
  width: 100%;
184
187
  padding: 24px;
185
188
 
186
- .row {
189
+ .v-row {
187
190
  margin: 0;
188
191
  flex-direction: column;
192
+
193
+ .title {
194
+ flex-grow: 4;
195
+ width: 80%;
196
+ margin-bottom: 30px;
197
+
198
+ h3 {
199
+ text-align: left;
200
+ }
201
+ }
202
+
203
+ .cnt-time {
204
+ display: flex;
205
+ flex-direction: row;
206
+ align-items: center;
207
+ margin-bottom: 20px;
208
+
209
+ svg {
210
+ width: 18px;
211
+ height: 18px;
212
+ margin-right: 10px;
213
+ }
214
+ }
215
+
216
+ .box-gauge {
217
+ display: block;
218
+ width: 100%;
219
+
220
+ .box-g {
221
+ display: flex;
222
+ flex-direction: row;
223
+ align-items: center;
224
+ }
225
+ }
189
226
  }
190
227
  }
191
228
  </style>