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.
Files changed (163) hide show
  1. package/.editorconfig +6 -31
  2. package/.prettierrc +11 -0
  3. package/.vscode/extensions.json +8 -0
  4. package/.vscode/settings.json +16 -0
  5. package/CHANGELOG +153 -0
  6. package/README.md +28 -43
  7. package/documentation/.vitepress/config.js +114 -0
  8. package/documentation/api-examples.md +49 -0
  9. package/documentation/composants/app-base-button.md +58 -0
  10. package/documentation/composants/app-base-error-display.md +59 -0
  11. package/documentation/composants/app-base-popover.md +68 -0
  12. package/documentation/composants/app-comp-audio.md +75 -0
  13. package/documentation/composants/app-comp-branch-buttons.md +111 -0
  14. package/documentation/composants/app-comp-button-progress.md +53 -0
  15. package/documentation/composants/app-comp-carousel.md +53 -0
  16. package/documentation/composants/app-comp-container.md +53 -0
  17. package/documentation/composants/app-comp-input-checkbox-next.md +42 -0
  18. package/documentation/composants/app-comp-input-dropdown-next.md +34 -0
  19. package/documentation/composants/app-comp-input-radio-next.md +39 -0
  20. package/documentation/composants/app-comp-input-text-next.md +35 -0
  21. package/documentation/composants/app-comp-input-text-table-next.md +34 -0
  22. package/documentation/composants/app-comp-input-text-to-fill-dropdown-next.md +53 -0
  23. package/documentation/composants/app-comp-input-text-to-fill-next.md +31 -0
  24. package/documentation/composants/app-comp-jauge.md +31 -0
  25. package/documentation/composants/app-comp-menu-item.md +55 -0
  26. package/documentation/composants/app-comp-menu.md +29 -0
  27. package/documentation/composants/app-comp-navigation.md +41 -0
  28. package/documentation/composants/app-comp-note-call.md +53 -0
  29. package/documentation/composants/app-comp-note-credit.md +53 -0
  30. package/documentation/composants/app-comp-play-bar-next.md +53 -0
  31. package/documentation/composants/app-comp-pop-up-next.md +93 -0
  32. package/documentation/composants/app-comp-quiz-next.md +235 -0
  33. package/documentation/composants/app-comp-quiz-recall.md +53 -0
  34. package/documentation/composants/app-comp-svg-next.md +53 -0
  35. package/documentation/composants/app-comp-table-of-content.md +50 -0
  36. package/documentation/composants/app-comp-video-player.md +82 -0
  37. package/documentation/composants.md +46 -0
  38. package/documentation/composants_critiques/ModelPageComposant.md +53 -0
  39. package/documentation/composants_critiques/app-base-module.md +43 -0
  40. package/documentation/composants_critiques/app-base-page.md +48 -0
  41. package/documentation/composants_critiques/app-base.md +311 -0
  42. package/documentation/composants_critiques/main.md +15 -0
  43. package/documentation/demarrage.md +50 -0
  44. package/documentation/deploiement.md +58 -0
  45. package/documentation/index.md +33 -0
  46. package/documentation/markdown-examples.md +85 -0
  47. package/documentation/public/npm_version.png +0 -0
  48. package/documentation/public/vite.svg +15 -0
  49. package/documentation/public/vuejs.svg +2 -0
  50. package/documentation/public/vuetify.svg +6 -0
  51. package/eslint.config.js +60 -0
  52. package/package.json +43 -47
  53. package/src/$locales/en.json +86 -108
  54. package/src/$locales/fr.json +66 -127
  55. package/src/assets/data/onboardingMessages.json +1 -1
  56. package/src/components/AppBase.vue +960 -405
  57. package/src/components/AppBaseButton.test.js +21 -0
  58. package/src/components/AppBaseButton.vue +42 -10
  59. package/src/components/AppBaseErrorDisplay.vue +207 -189
  60. package/src/components/AppBaseFlipCard.vue +1 -0
  61. package/src/components/AppBaseModule.vue +769 -977
  62. package/src/components/AppBasePage.vue +635 -81
  63. package/src/components/AppBasePopover.vue +41 -0
  64. package/src/components/AppBaseSkeleton.vue +66 -0
  65. package/src/components/AppCompAudio.vue +256 -0
  66. package/src/components/AppCompBranchButtons.vue +79 -153
  67. package/src/components/AppCompButtonProgress.vue +21 -36
  68. package/src/components/AppCompCarousel.vue +231 -87
  69. package/src/components/{AppCompTranscript.vue → AppCompContainer.vue} +12 -2
  70. package/src/components/AppCompInputCheckBoxNx.vue +323 -0
  71. package/src/components/AppCompInputDropdownNx.vue +299 -0
  72. package/src/components/AppCompInputRadioNx.vue +284 -0
  73. package/src/components/AppCompInputTextNx.vue +153 -0
  74. package/src/components/AppCompInputTextTableNx.vue +202 -0
  75. package/src/components/AppCompInputTextToFillDropdownNx.vue +340 -0
  76. package/src/components/AppCompInputTextToFillNx.vue +313 -0
  77. package/src/components/AppCompJauge.vue +36 -10
  78. package/src/components/AppCompMenu.vue +246 -32
  79. package/src/components/AppCompMenuItem.vue +87 -21
  80. package/src/components/AppCompNavigation.vue +470 -447
  81. package/src/components/AppCompNoteCall.vue +93 -58
  82. package/src/components/AppCompNoteCredit.vue +423 -96
  83. package/src/components/AppCompPlayBarNext.vue +2288 -0
  84. package/src/components/AppCompPopUpNext.vue +504 -0
  85. package/src/components/AppCompQuizNext.vue +510 -0
  86. package/src/components/AppCompQuizRecall.vue +199 -99
  87. package/src/components/AppCompSVGNext.vue +346 -0
  88. package/src/components/AppCompSettingsMenu.vue +17 -16
  89. package/src/components/AppCompTableOfContent.vue +262 -99
  90. package/src/components/AppCompVideoPlayer.vue +183 -142
  91. package/src/components/BaseModule.vue +8 -20
  92. package/src/components/tests__/AppBaseButton.spec.js +53 -0
  93. package/src/components/tests__/useTimer.spec.js +91 -0
  94. package/src/composables/useIdleDetector.js +56 -0
  95. package/src/composables/useQuiz.js +89 -0
  96. package/src/composables/useTimer.js +172 -0
  97. package/src/directives/nvdaFix.js +53 -0
  98. package/src/externalComps/ModuleView.vue +22 -0
  99. package/src/externalComps/SummaryView.vue +91 -0
  100. package/src/main.js +397 -148
  101. package/src/module/stores/appStore.js +947 -0
  102. package/src/module/xapi/ADL.js +241 -60
  103. package/src/module/xapi/Crypto/Hasher.js +8 -8
  104. package/src/module/xapi/Crypto/WordArray.js +6 -6
  105. package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +4 -4
  106. package/src/module/xapi/Crypto/algorithms/C_algo.js +14 -18
  107. package/src/module/xapi/Crypto/algorithms/HMAC.js +1 -1
  108. package/src/module/xapi/Crypto/algorithms/SHA1.js +1 -1
  109. package/src/module/xapi/Crypto/encoders/Base.js +7 -7
  110. package/src/module/xapi/Crypto/encoders/Base64.js +3 -3
  111. package/src/module/xapi/Crypto/encoders/Hex.js +2 -2
  112. package/src/module/xapi/Crypto/encoders/Latin1.js +3 -3
  113. package/src/module/xapi/Crypto/encoders/Utf8.js +3 -3
  114. package/src/module/xapi/Statement/index.js +3 -3
  115. package/src/module/xapi/launch.js +10 -10
  116. package/src/module/xapi/utils.js +17 -17
  117. package/src/module/xapi/wrapper.js +219 -214
  118. package/src/module/xapi/xapiStatement.js +29 -29
  119. package/src/plugins/analytics.js +34 -0
  120. package/src/plugins/bus.js +7 -2
  121. package/src/plugins/gsap.js +5 -7
  122. package/src/plugins/helper.js +97 -34
  123. package/src/plugins/i18n.js +13 -18
  124. package/src/plugins/idb.js +45 -30
  125. package/src/plugins/save.js +1 -1
  126. package/src/plugins/scorm.js +15 -15
  127. package/src/plugins/xapi.js +2 -2
  128. package/src/public/index.html +22 -10
  129. package/src/router/index.js +29 -13
  130. package/src/router/routes.js +29 -54
  131. package/src/shared/generalfuncs.js +186 -30
  132. package/src/shared/validators.js +809 -40
  133. package/vitest.config.js +19 -0
  134. package/.eslintignore +0 -29
  135. package/.eslintrc.js +0 -86
  136. package/.prettierrc.js +0 -5
  137. package/babel.config.js +0 -3
  138. package/src/components/AppBaseDragChoice.vue +0 -91
  139. package/src/components/AppBaseDropZone.vue +0 -112
  140. package/src/components/AppCompBif.vue +0 -120
  141. package/src/components/AppCompDragAndDrop.vue +0 -339
  142. package/src/components/AppCompInputAssociation.vue +0 -332
  143. package/src/components/AppCompInputCheckBox.vue +0 -227
  144. package/src/components/AppCompInputDropdown.vue +0 -184
  145. package/src/components/AppCompInputRadio.vue +0 -169
  146. package/src/components/AppCompInputTextBox.vue +0 -91
  147. package/src/components/AppCompInputTextTable.vue +0 -155
  148. package/src/components/AppCompInputTextToFillDropdown.vue +0 -255
  149. package/src/components/AppCompInputTextToFillText.vue +0 -164
  150. package/src/components/AppCompMediaPlayer.vue +0 -397
  151. package/src/components/AppCompPlayBar.vue +0 -1319
  152. package/src/components/AppCompPopUp.vue +0 -522
  153. package/src/components/AppCompPopover.vue +0 -27
  154. package/src/components/AppCompQuiz.vue +0 -2989
  155. package/src/components/AppCompSVG.vue +0 -309
  156. package/src/mixins/$pageMixins.js +0 -459
  157. package/src/mixins/$quizMixins.js +0 -456
  158. package/src/mixins/timerMixin.js +0 -156
  159. package/src/module/store.js +0 -895
  160. package/src/plugins/timeManager.js +0 -77
  161. package/src/routes_bckp.js +0 -313
  162. package/src/routes_static.js +0 -344
  163. package/vue.config.js +0 -83
@@ -0,0 +1,21 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { mount } from '@vue/test-utils'
3
+ import AppBaseButton from './AppBaseButton.vue'
4
+
5
+ const defaultProps = { isDisabled: false, type: 'button' }
6
+
7
+ describe('AppBaseButton Tests', () => {
8
+ it('should render', () => {
9
+ const wrapper = mount(AppBaseButton, {
10
+ props: defaultProps
11
+ })
12
+ expect(wrapper.find('button').exists()).toBeTruthy()
13
+ })
14
+ it('should fire click event', async () => {
15
+ const wrapper = mount(AppBaseButton, {
16
+ props: defaultProps
17
+ })
18
+ wrapper.find('button').trigger('click')
19
+ expect(wrapper.emitted()).toHaveProperty('click')
20
+ })
21
+ })
@@ -5,12 +5,19 @@
5
5
  -->
6
6
 
7
7
  <button
8
- type="button"
8
+ :type="type"
9
9
  class="btn"
10
- :class="{ click: isClick, 'btn-visited': isVisited }"
11
- :disabled="isActive"
10
+ :class="{
11
+ click: isClick,
12
+ 'btn-visited': isVisited,
13
+ md_disabled: isDisabled
14
+ }"
15
+ :aria-disabled="isDisabled ? true : null"
12
16
  @click="click"
13
17
  @focus="focus"
18
+ @blur="blur"
19
+ @mouseenter="mouseenter"
20
+ @mouseleave="mouseleave"
14
21
  >
15
22
  <slot>Button</slot>
16
23
  </button>
@@ -20,15 +27,21 @@
20
27
  export default {
21
28
  name: 'AppBaseButton',
22
29
  props: {
23
- isActive: {
30
+ isDisabled: {
24
31
  type: Boolean,
25
32
  default: false
33
+ },
34
+ type: {
35
+ type: String,
36
+ default: 'button'
26
37
  }
27
38
  },
39
+ emits: ['click', 'focus', 'blur', 'mouseenter', 'mouseleave'],
28
40
  data() {
29
41
  return {
30
42
  isClick: false,
31
- isVisited: false
43
+ isVisited: false,
44
+ count: 0
32
45
  }
33
46
  },
34
47
  methods: {
@@ -36,17 +49,38 @@ export default {
36
49
  * @fires click to parent component or page
37
50
  */
38
51
  click() {
52
+ if (this.isDisabled) return // prevent bouton action on click if button not available
53
+
39
54
  this.$emit('click', this.$el)
55
+ // this.$emit('click', (this.count += 2))
40
56
  this.isClick = !this.isClick
41
57
  if (!this.isVisited) {
42
58
  this.isVisited = true
43
59
  }
44
60
  },
45
61
  /**
46
- * @fires click to parent component or page
62
+ * @fires focus to parent component or page
47
63
  */
48
64
  focus() {
49
65
  this.$emit('focus', this.$el)
66
+ },
67
+ /**
68
+ * @fires blur to parent component or page
69
+ */
70
+ blur() {
71
+ this.$emit('blur', this.$el)
72
+ },
73
+ /**
74
+ * @fires mouseenter to parent component or page
75
+ */
76
+ mouseenter() {
77
+ this.$emit('mouseenter', this.$el)
78
+ },
79
+ /**
80
+ * @fires mouseenter to parent component or page
81
+ */
82
+ mouseleave() {
83
+ this.$emit('mouseleave', this.$el)
50
84
  }
51
85
  }
52
86
  }
@@ -55,9 +89,7 @@ export default {
55
89
  .btn {
56
90
  display: flex;
57
91
  align-items: center;
58
-
59
- &.md_disabled {
60
- pointer-events: none;
61
- }
92
+ //test
93
+ //test
62
94
  }
63
95
  </style>
@@ -4,199 +4,205 @@
4
4
  -->
5
5
 
6
6
  <template>
7
- <div class="fd_Error-message">
8
- <div v-show="errorMessage === 'errorModule'" class="box-error">
9
- <div class="red-box">
10
- <div class="box">
11
- <h2>
12
- <b-icon icon="exclamation-triangle" />
13
- Cette page est affichée parce que vous n'avez pas encore créé le
14
- module.
15
- </h2>
16
- <br />
17
- <p>
18
- Pour créer le module
19
- <br />
20
- </p>
21
- <ol type="number">
22
- <li>
23
- Ajoutez un fichier
24
- <strong>module.vue</strong>
25
- dans le dossier
26
- <strong>views</strong>
27
- </li>
28
- <li>
29
- Définissez le
30
- <strong>$data</strong>
31
- du module.vue
32
- </li>
33
- </ol>
34
- </div>
35
- </div>
36
- <div class="box">
37
- <p class="doc">
38
- Visitez
39
- <a :href="docLink" target="blank">la documentation</a>
40
- pour plus de details
41
- </p>
7
+ <div>
8
+ <!------------------------ ERRORS APPLICATION ------------------->
9
+ <div v-if="errorGroup === 'application'" class="fd_Error-type">
10
+ <div class="box-error">
11
+ <!--------------------------- Module --------------------->
12
+ <template v-if="errorType === 'errorModule'">
13
+ <div class="red-box">
14
+ <div class="box">
15
+ <h2>
16
+ Cette page est affichée parce que le fichier ModuleView n'existe
17
+ pas où est mal configuré
18
+ </h2>
19
+
20
+ <p>Pour la vue du Module</p>
21
+ <ol type="number">
22
+ <li>
23
+ Créez un fichier
24
+ <i>.vue</i>
25
+ avec pour nom
26
+ <strong>ModuleView.vue</strong>
27
+ dans le dossier
28
+ <strong>views</strong>
29
+ </li>
30
+
31
+ <li>
32
+ Referez-vous wnauirw à la documentation pour la création et la
33
+ configuration de la vue du Module
34
+ </li>
35
+ </ol>
36
+ </div>
37
+ </div>
38
+ <div class="box">
39
+ <p class="doc">
40
+ Visitez
41
+ <a :href="docLink" target="blank">la documentation</a>
42
+ pour plus de details ...
43
+ </p>
44
+ </div>
45
+ </template>
46
+ <!---------------------------- Menu ---------------------->
47
+ <template v-if="errorType === 'errorMenu'">
48
+ <div class="red-box">
49
+ <div class="box">
50
+ <h2>
51
+ Cette page est affichée parce que le fichier SummaryView
52
+ n'existe pas où est mal configuré
53
+ </h2>
54
+
55
+ <p>Pour la vue du Sommaire (page de MENU)</p>
56
+ <ol type="number">
57
+ <li>
58
+ Créez un fichier
59
+ <i>.vue</i>
60
+ avec pour nom
61
+ <strong>SummaryView.vue</strong>
62
+ dans le dossier
63
+ <strong>views</strong>
64
+ </li>
65
+ <li>
66
+ Referez-vous ensuite à la documentation pour la création et la
67
+ configuration de la vue du sommaire
68
+ </li>
69
+ </ol>
70
+ </div>
71
+ </div>
72
+ <div class="box">
73
+ <p class="doc">
74
+ Visitez
75
+ <a :href="docLink" target="blank">la documentation</a>
76
+ pour plus de details ...
77
+ </p>
78
+ </div>
79
+ </template>
80
+ <!---------------------------- Page ---------------------->
81
+ <template v-if="errorType === 'errorPage'">
82
+ <div class="red-box">
83
+ <div class="box">
84
+ <h2>
85
+ Cette page est affichée parce que vous n'avez pas encore de page
86
+ d'activité pour votre module.
87
+ </h2>
88
+
89
+ <p>Pour créer une page</p>
90
+ <ol type="number">
91
+ <li>
92
+ Ajoutez un dossier pour votre activité avec un nom de type
93
+ <strong>Axx</strong>
94
+ dans le dossier
95
+ <strong>module</strong>
96
+ <i>( exemple A00 )</i>
97
+ </li>
98
+ <li>
99
+ Ajoutez un fichier pour votre page avec un nom de type
100
+ <strong>Pxx.vue</strong>
101
+ dans le dossier
102
+ <strong>Axx</strong>
103
+ <i>( exemple P01.vue )</i>
104
+ </li>
105
+ <li>
106
+ Definissez le
107
+ <strong>$data</strong>
108
+ de la page
109
+ </li>
110
+ </ol>
111
+ </div>
112
+ </div>
113
+ <div class="box">
114
+ <p class="doc">
115
+ Visitez
116
+ <a :href="docLink" target="blank">la documentation</a>
117
+ pour plus de details ...
118
+ </p>
119
+ </div>
120
+ </template>
121
+ <!----------------------- Branching ---------------------->
122
+ <template v-if="errorType === 'errorMenuBranching'">
123
+ <div class="red-box">
124
+ <div class="box">
125
+ <h2>Erreur d'embranchement.</h2>
126
+
127
+ <p>
128
+ Vous ne pouvez pas avoir de pages d'embranchement(s) dans le
129
+ dossier A00
130
+ </p>
131
+ </div>
132
+ </div>
133
+ <div class="box">
134
+ <p class="doc">
135
+ Visitez
136
+ <a
137
+ :href="`https://fcaddocumentation.netlify.app/guide/structure.html#pages-d-embranchements-dans-un-dossier`"
138
+ target="blank"
139
+ >
140
+ la documentation
141
+ </a>
142
+ pour plus de details ...
143
+ </p>
144
+ </div>
145
+ </template>
146
+ <!------------------------- 404 -------------------------->
147
+ <template v-if="errorType === '404'">
148
+ <div class="red-box">
149
+ <div class="box">
150
+ <h2>404 OOPSSS!</h2>
151
+ <p>Il semble que la page que vous cherchez n'existe pas.</p>
152
+ </div>
153
+ </div>
154
+ <div class="box">
155
+ <p class="doc">
156
+ Retrourner à la
157
+ <router-link :to="{ name: 'menu' }">page d'accueil</router-link>
158
+ </p>
159
+ </div>
160
+ </template>
42
161
  </div>
43
162
  </div>
44
- <!---------------------------------------------------->
45
- <div v-if="errorMessage === 'errorMenu'" class="box-error">
46
- <div class="red-box">
47
- <div class="box">
163
+ <!------------------- END ERRORS COMPONENTS -------------------->
164
+ <v-row v-if="errorGroup === 'component'" class="warning-error">
165
+ <v-col class="box-error">
166
+ <div class="yellow-box">
48
167
  <h2>
49
- <b-icon icon="exclamation-triangle" />
50
- Cette page est affichée parce que vous n'avez pas encore de page de
51
- MENU pour votre activité
168
+ {{ errorTitle || 'Attention erreur dans le composant' }}
52
169
  </h2>
53
-
54
- <p>Pour créer la PAGE DE MENU</p>
55
- <ol type="number">
56
- <li>
57
- Ajoutez un dossier avec le nom
58
- <strong>A00</strong>
59
- dans le dossier
60
- <strong>module</strong>
61
- </li>
62
- <li>
63
- Ajoutez un fichier pour votre page de MENU avec un nom de type
64
- <strong>Pxx.vue</strong>
65
- dans le dossier
66
- <strong>A00</strong>
67
- <i>( exemple P01.vue )</i>
68
- </li>
69
- <li>
70
- Dans le
71
- <strong>$data</strong>
72
- de ce la page, mettez la valeur de la variable
73
- <strong>type</strong>
74
- à
75
- <strong>"pg_menu"</strong>
76
- </li>
77
- </ol>
78
- </div>
79
- </div>
80
- <div class="box">
81
- <p class="doc">
82
- Visitez
83
- <a :href="docLink" target="blank">la documentation</a>
84
- pour plus de details ...
85
- </p>
86
- </div>
87
- </div>
88
- <!---------------------------------------------------->
89
- <div v-if="errorMessage === 'errorPage'" class="box-error">
90
- <div class="red-box">
91
- <div class="box">
92
- <h2>
93
- <b-icon icon="exclamation-triangle" />
94
- Cette page est affichée parce que vous n'avez pas encore de page
95
- d'activité pour votre module.
96
- </h2>
97
-
98
- <p>Pour créer une page</p>
99
- <ol type="number">
100
- <li>
101
- Ajoutez un dossier pour votre activité avec un nom de type
102
- <strong>Axx</strong>
103
- dans le dossier
104
- <strong>module</strong>
105
- <i>( exemple A00 )</i>
106
- </li>
107
- <li>
108
- Ajoutez un fichier pour votre page avec un nom de type
109
- <strong>Pxx.vue</strong>
110
- dans le dossier
111
- <strong>Axx</strong>
112
- <i>( exemple P01.vue )</i>
113
- </li>
114
- <li>
115
- Definissez le
116
- <strong>$data</strong>
117
- de la page
118
- </li>
119
- </ol>
120
- </div>
121
- </div>
122
- <div class="box">
123
- <p class="doc">
124
- Visitez
125
- <a :href="docLink" target="blank">la documentation</a>
126
- pour plus de details ...
127
- </p>
128
- </div>
129
- </div>
130
- <div v-if="errorMessage === 'errorMenuBranching'" class="box-error">
131
- <div class="red-box">
132
- <div class="box">
133
- <h2>
134
- <b-icon icon="exclamation-triangle" />
135
- Erreur d'embranchement.
136
- </h2>
137
-
138
- <p>
139
- Vous ne pouvez pas avoir de pages d'embranchement(s) dans le dossier
140
- A00
141
- </p>
142
- </div>
143
- </div>
144
- <div class="box">
145
- <p class="doc">
146
- Visitez
147
- <a
148
- :href="
149
- `https://fcaddocumentation.netlify.app/guide/structure.html#pages-d-embranchements-dans-un-dossier`
170
+ <p>{{ errorText }}</p>
171
+ <br />
172
+ <p>Veuillez corriger:</p>
173
+ <template
174
+ v-if="
175
+ errorsList.constructor == Array ||
176
+ errorsList.constructor == Object
150
177
  "
151
- target="blank"
152
178
  >
153
- la documentation
154
- </a>
155
- pour plus de details ...
156
- </p>
157
- </div>
158
- </div>
159
- <div v-if="errorMessage === '404'" class="box-error">
160
- <div class="red-box">
161
- <div class="box">
162
- <h2>
163
- <b-icon icon="exclamation-triangle" />
164
- 404 OOPSSS!
165
- </h2>
166
- <p>Il semble que la page que vous cherchez n'existe pas.</p>
179
+ <ul>
180
+ <li
181
+ v-for="err in errorsList"
182
+ :key="`error_type_${err}`"
183
+ v-html="err"
184
+ ></li>
185
+ </ul>
186
+ </template>
187
+ <template v-if="errorsList.constructor == String">
188
+ <ul>
189
+ <li v-html="errorsList"></li>
190
+ </ul>
191
+ </template>
167
192
  </div>
168
- </div>
169
- <div class="box">
170
- <p class="doc">
171
- Retrourner à la
172
- <router-link :to="{ name: 'menu' }">
173
- page d'accueil
174
- </router-link>
175
- </p>
176
- </div>
177
- </div>
178
- <div v-if="errorsList.length > 0" class="box-error">
179
- <div class="red-box">
180
193
  <div class="box">
181
- <h2>
182
- <b-icon icon="exclamation-triangle" />
183
- Error: Creation de POPUP!
184
- </h2>
185
- <ul>
186
- <li v-for="(error, index) of errorsList" :key="`${error}_${index}`">
187
- {{ error }}
188
- </li>
189
- </ul>
194
+ <p class="doc">
195
+ Visitez
196
+ <a href="https://fcaddocumentation.netlify.app/" target="blank">
197
+ la documentation
198
+ </a>
199
+ pour plus de details
200
+ </p>
190
201
  </div>
191
- </div>
192
- <div class="box">
193
- <p class="doc">
194
- Visitez
195
- <a :href="docLink" target="blank">la documentation</a>
196
- pour plus de details ...
197
- </p>
198
- </div>
199
- </div>
202
+ </v-col>
203
+ </v-row>
204
+
205
+ <!---------------------- END ERRORS COMPONENTS ------------------->
200
206
  </div>
201
207
  </template>
202
208
 
@@ -204,13 +210,25 @@
204
210
  export default {
205
211
  name: 'AppBaseErrorDisplay',
206
212
  props: {
207
- errorMessage: { type: String, note: 'Error Message', default: '' },
213
+ errorGroup: { type: String, default: 'application' }, //group can be: application or component
214
+ errorType: { type: String, note: 'Error Message', default: '' },
215
+ errorTitle: {
216
+ type: String,
217
+ note: 'Title to display for the error',
218
+ default: ''
219
+ },
220
+ errorText: {
221
+ type: String,
222
+ note: 'text to display for the error',
223
+ default:
224
+ 'Vous avez une/des erreure(s) qui empêche(ent) le bon rendu du composant'
225
+ },
226
+ errorsList: { type: Array, default: () => [] },
208
227
  docLink: {
209
228
  type: String,
210
229
  default: 'https://fcaddocumentation.netlify.com/guide/proceduries.html',
211
230
  note: 'Documentation link'
212
- },
213
- errorsList: { type: Array, default: () => [] }
231
+ }
214
232
  }
215
233
  }
216
234
  </script>
@@ -218,7 +236,7 @@ export default {
218
236
  <style lang="scss">
219
237
  //**** DO NOT TOUCHE ****/
220
238
  //**** ERROR ****/
221
- .fd_Error-message {
239
+ .fd_Error-type {
222
240
  display: flex;
223
241
  flex-direction: row;
224
242
  flex-wrap: wrap;
@@ -386,7 +404,7 @@ export default {
386
404
  width: 100%;
387
405
  height: 100%;
388
406
 
389
- .fd_Error-message {
407
+ .fd_Error-type {
390
408
  width: 100%;
391
409
  padding-bottom: 30px;
392
410
  background-color: white;
@@ -21,6 +21,7 @@ export default {
21
21
  default: false
22
22
  }
23
23
  },
24
+ emits: ['click'],
24
25
  data() {
25
26
  return {
26
27
  isFlipped: false