fcad-core-dragon 2.0.0-beta.0 → 2.0.0-beta.1
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/README.md +1 -1
- package/package.json +7 -9
- package/src/$locales/en.json +39 -15
- package/src/$locales/fr.json +48 -23
- package/src/components/AppBase.vue +245 -266
- package/src/components/AppBaseErrorDisplay.vue +29 -0
- package/src/components/AppBaseModule.vue +485 -232
- package/src/components/AppBasePage.vue +28 -54
- package/src/components/AppCompBif.vue +120 -0
- package/src/components/AppCompBranchButtons.vue +31 -30
- package/src/components/AppCompButtonProgress.vue +35 -46
- package/src/components/AppCompCarousel.vue +154 -247
- package/src/components/AppCompJauge.vue +1 -2
- package/src/components/AppCompMediaPlayer.vue +106 -74
- package/src/components/AppCompMenu.vue +87 -81
- package/src/components/AppCompMenuItem.vue +48 -90
- package/src/components/AppCompNavigation.vue +949 -0
- package/src/components/AppCompNoteCall.vue +126 -0
- package/src/components/AppCompNoteCredit.vue +164 -0
- package/src/components/AppCompPlayBar.vue +864 -1085
- package/src/components/AppCompPopUp.vue +26 -27
- package/src/components/AppCompPopover.vue +27 -0
- package/src/components/AppCompQuiz.vue +27 -36
- package/src/components/AppCompQuizRecall.vue +250 -0
- package/src/components/AppCompSVG.vue +309 -0
- package/src/components/AppCompSettingsMenu.vue +1 -0
- package/src/components/AppCompTableOfContent.vue +140 -85
- package/src/components/AppCompTranscript.vue +19 -0
- package/src/components/AppCompVideoPlayer.vue +336 -0
- package/src/components/BaseModule.vue +24 -105
- package/src/main.js +18 -9
- package/src/mixins/$pageMixins.js +106 -28
- package/src/mixins/timerMixin.js +31 -7
- package/src/module/store.js +33 -12
- package/src/module/xapi/Crypto/encoders/Hex.js +2 -1
- package/src/module/xapi/wrapper.js +4 -4
- package/src/plugins/gsap.js +4 -1
- package/src/plugins/helper.js +53 -18
- package/src/plugins/idb.js +1 -0
- package/src/public/index.html +1 -1
- package/src/router/index.js +41 -0
- package/src/router/routes.js +337 -0
- package/src/routes_bckp.js +313 -0
- package/src/routes_static.js +344 -0
- package/src/shared/generalfuncs.js +79 -4
- package/src/shared/validators.js +249 -0
- package/src/components/AppCompNavigationFull.vue +0 -1791
- package/src/components/AppCompToolTip.vue +0 -94
- package/src/routes.js +0 -734
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@DESCRIPTION: A component used to define and provide a list of svg icones that can simply be integreted by calling the <use> attribute of SVG element
|
|
3
|
+
@INTEGRATION: component is instantiated once in AppBase component by calling <app-icons>.
|
|
4
|
+
To add new icon simply add it with id{String} and paths{ARRAY OF Object} in the IconList variable
|
|
5
|
+
ex:{id: 'pause-icon',paths: [{
|
|
6
|
+
d:'M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z'}
|
|
7
|
+
]}
|
|
8
|
+
@USAGE: Icons can be use in any component by calling their ID in the svg <use> element
|
|
9
|
+
ex: <svg><use href="#pause-icon"></svg>
|
|
10
|
+
ref: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use
|
|
11
|
+
-->
|
|
12
|
+
<script>
|
|
13
|
+
//import { h } from 'vue'
|
|
14
|
+
|
|
15
|
+
const IconsList = [
|
|
16
|
+
{
|
|
17
|
+
id: 'pause-icon',
|
|
18
|
+
paths: [
|
|
19
|
+
{
|
|
20
|
+
d:
|
|
21
|
+
'M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z'
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'replay-icon',
|
|
27
|
+
paths: [
|
|
28
|
+
{
|
|
29
|
+
d:
|
|
30
|
+
'M8,4V0L3,5l5,5V6c3.3,0,6,2.7,6,6s-2.7,6-6,6s-6-2.7-6-6H0c0,4.4,3.6,8,8,8s8-3.6,8-8 S12.4,4,8,4z'
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'play-icon',
|
|
36
|
+
paths: [{ d: 'M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z' }]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'volume-high-icon',
|
|
40
|
+
paths: [
|
|
41
|
+
{
|
|
42
|
+
d:
|
|
43
|
+
'M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z'
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'volume-low-icon',
|
|
49
|
+
paths: [
|
|
50
|
+
{
|
|
51
|
+
d:
|
|
52
|
+
'M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z'
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'volume-mute-icon',
|
|
58
|
+
paths: [
|
|
59
|
+
{
|
|
60
|
+
d:
|
|
61
|
+
'M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z'
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'fullscreen-icon',
|
|
67
|
+
paths: [
|
|
68
|
+
{
|
|
69
|
+
d:
|
|
70
|
+
'M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z'
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'fullscreen-exit-icon',
|
|
76
|
+
paths: [
|
|
77
|
+
{
|
|
78
|
+
d:
|
|
79
|
+
'M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z'
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'pip-icon',
|
|
85
|
+
paths: [
|
|
86
|
+
{
|
|
87
|
+
d:
|
|
88
|
+
'M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z'
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'subtitle-on-icon',
|
|
94
|
+
paths: [
|
|
95
|
+
{
|
|
96
|
+
d:
|
|
97
|
+
'M20,4H4A2.006,2.006,0,0,0,2,6V18a2.006,2.006,0,0,0,2,2H20a2.006,2.006,0,0,0,2-2V6A2.006,2.006,0,0,0,20,4ZM4,12H8v2H4Zm10,6H4V16H14Zm6,0H16V16h4Zm0-4H10V12H20Z'
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'subtitle-off-icon',
|
|
103
|
+
paths: [
|
|
104
|
+
{
|
|
105
|
+
d:
|
|
106
|
+
'M20,4H6.83l8,8H20v2H16.83l4.93,4.93A1.949,1.949,0,0,0,22,18V6A2.006,2.006,0,0,0,20,4Z M1.04,3.87l1.2,1.2A1.949,1.949,0,0,0,2,6V18a2.006,2.006,0,0,0,2,2H17.17l2.96,2.96,1.41-1.41L2.45,2.45ZM8,12v2H4V12Zm6,4.83V18H4V16h9.17Z'
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'transcript-on-icon',
|
|
112
|
+
paths: [
|
|
113
|
+
{
|
|
114
|
+
d:
|
|
115
|
+
'M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z'
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'close-square-icon',
|
|
121
|
+
viewBox: '0 0 16 16',
|
|
122
|
+
paths: [
|
|
123
|
+
{
|
|
124
|
+
d:
|
|
125
|
+
'M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
d:
|
|
129
|
+
'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708'
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'branch-crochet-icon',
|
|
135
|
+
paths: [
|
|
136
|
+
{
|
|
137
|
+
id: 'Tracé_3833',
|
|
138
|
+
'data-name': 'Tracé 3833',
|
|
139
|
+
d: 'M0,0H24V24H0Z',
|
|
140
|
+
fill: 'none'
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
{
|
|
144
|
+
id: 'Tracé_3834',
|
|
145
|
+
'data-name': 'Tracé 3834',
|
|
146
|
+
d: 'M9,16.2,4.8,12,3.4,13.4,9,19,21,7,19.6,5.6Z',
|
|
147
|
+
fill: '#e6f5ff'
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'navigate-next-icon',
|
|
153
|
+
viewBox: '0 0 7.41 12',
|
|
154
|
+
paths: [
|
|
155
|
+
{
|
|
156
|
+
id: 'Path_3899',
|
|
157
|
+
'data-name': 'Path 3899',
|
|
158
|
+
d: 'M0,0H24V24H0Z',
|
|
159
|
+
fill: 'none'
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
{
|
|
163
|
+
id: 'Path_3900',
|
|
164
|
+
'data-name': 'Path 3900',
|
|
165
|
+
d: 'M10.02,6,8.61,7.41,13.19,12,8.61,16.59,10.02,18l6-6Z',
|
|
166
|
+
transform: 'translate(-8.61 -6)'
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: 'navigate-previous-icon',
|
|
172
|
+
paths: [
|
|
173
|
+
{
|
|
174
|
+
id: 'Path_3899',
|
|
175
|
+
'data-name': 'Path 3899',
|
|
176
|
+
d: 'M24 24H0V0h24Z',
|
|
177
|
+
fill: 'none'
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'Path_3900',
|
|
181
|
+
'data-name': 'Path 3900',
|
|
182
|
+
d: 'm13.98 18 1.41-1.41L10.81 12l4.58-4.59L13.98 6l-6 6Z'
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 'fleche-gauche-icon',
|
|
188
|
+
paths: [
|
|
189
|
+
{
|
|
190
|
+
id: 'arrow_forward_FILL0_wght400_GRAD0_opsz48',
|
|
191
|
+
d:
|
|
192
|
+
'M11.7 23.4c-.3 0-.6-.1-.8-.3L.3 12.5c-.1-.1-.2-.2-.3-.4v-.4c0-.1 0-.3.1-.4.1-.1.2-.3.3-.4L10.9.3c.5-.4 1.1-.4 1.6 0 .4.5.4 1.2 0 1.6l-8.6 8.6h19c.6 0 1.1.5 1.1 1.2 0 .6-.5 1.1-1.2 1.1H3.9l8.6 8.6c.4.5.4 1.1 0 1.6-.2.3-.5.4-.8.4z'
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: 'fleche-droite-icon',
|
|
198
|
+
paths: [
|
|
199
|
+
{
|
|
200
|
+
id: 'arrow_forward_FILL0_wght400_GRAD0_opsz48',
|
|
201
|
+
d:
|
|
202
|
+
'M11.4 23.1c-.4-.5-.4-1.1 0-1.6l8.6-8.6H1.1c-.6 0-1.2-.5-1.2-1.1 0-.6.5-1.2 1.1-1.2h19L11.4 2c-.4-.5-.4-1.2 0-1.6.5-.4 1.1-.4 1.6 0L23.6 11c.1.1.2.2.3.4.1.1.1.3.1.4 0 .1 0 .3-.1.4-.1.2-.2.3-.3.4L13 23.2c-.2.2-.5.3-.8.3-.3-.1-.6-.2-.8-.4z'
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: 'fleche-retour-icon',
|
|
208
|
+
viewBox: '0 0 11.667 11.46',
|
|
209
|
+
paths: [
|
|
210
|
+
{
|
|
211
|
+
'data-name': 'Path 4230',
|
|
212
|
+
d:
|
|
213
|
+
'M433.865,369.022H433.6v-.005h-7.548l2.014-2.171-1.1-1.182-3.9,4.19,3.9,4.191,1.1-1.182-2.014-2.171H433v4.57h-2.5v1.861h3.366a.9.9,0,0,0,.866-.93v-6.346A.811.811,0,0,0,433.865,369.022Z',
|
|
214
|
+
transform: 'translate(-423.065 -365.664)'
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: 'home-icon',
|
|
220
|
+
viewBox: '0 0 20 17',
|
|
221
|
+
paths: [
|
|
222
|
+
{
|
|
223
|
+
id: 'Path_3912',
|
|
224
|
+
'data-name': 'Path 3912',
|
|
225
|
+
d: 'M10,20V14h4v6h5V12h3L12,3,2,12H5v8Z',
|
|
226
|
+
transform: 'translate(-2 -3)'
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: 'timeline-icon',
|
|
232
|
+
viewBox: '0 0 33 18',
|
|
233
|
+
paths: [
|
|
234
|
+
{
|
|
235
|
+
id: 'timeline_FILL0_wght400_GRAD0_opsz48',
|
|
236
|
+
'data-name': 'timeline FILL0 wght400 GRAD0 opsz48',
|
|
237
|
+
d:
|
|
238
|
+
'M2.93,18.46a2.63,2.63,0,0,1,0-5.25l.39,0a4.21,4.21,0,0,1,.49.09l7.5-7.5a2.73,2.73,0,0,1-.1-.48c0-.13,0-.26,0-.39a2.62,2.62,0,0,1,4.48-1.84A2.51,2.51,0,0,1,16.43,5s0,.33-.11.85L20.45,10a2.73,2.73,0,0,1,.48-.1l.38,0,.37,0a2.66,2.66,0,0,1,.49.1l6-6a4.21,4.21,0,0,1-.09-.49c0-.12,0-.25,0-.38a2.63,2.63,0,1,1,2.63,2.63l-.38,0a3.86,3.86,0,0,1-.49-.09l-6,6a4,4,0,0,1,.09.48,2.55,2.55,0,0,1,0,.39,2.63,2.63,0,0,1-5.25,0c0-.13,0-.26,0-.39a2.73,2.73,0,0,1,.1-.48L14.67,7.47a2.66,2.66,0,0,1-.49.1l-.38,0L13,7.47,5.45,15a4.21,4.21,0,0,1,.09.49c0,.13,0,.25,0,.38A2.63,2.63,0,0,1,2.93,18.46Z',
|
|
239
|
+
transform: 'translate(-0.31 -0.46)'
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: 'info-icon',
|
|
245
|
+
viewBox: '0 0 17.9 17.91',
|
|
246
|
+
paths: [
|
|
247
|
+
{
|
|
248
|
+
d:
|
|
249
|
+
'M9.07 13.41a.65.65 0 0 0 .67-.63V8.66a.63.63 0 0 0-.2-.46.67.67 0 0 0-.47-.2.65.65 0 0 0-.67.63v4.08a.59.59 0 0 0 .2.46.67.67 0 0 0 .47.24ZM9 6.34a.69.69 0 0 0 .53-.2.67.67 0 0 0 .21-.52.74.74 0 0 0-.21-.54.73.73 0 0 0-1 0 .74.74 0 0 0-.21.54.67.67 0 0 0 .21.52.69.69 0 0 0 .47.2Zm0 11.57a9 9 0 0 1-3.55-.69 8.68 8.68 0 0 1-4.76-4.76 9.45 9.45 0 0 1 0-7.09 8.79 8.79 0 0 1 1.9-2.85 9.05 9.05 0 0 1 12.8 12.8 8.88 8.88 0 0 1-2.86 1.9 9.1 9.1 0 0 1-3.53.69Z'
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
id: 'clock-icon',
|
|
255
|
+
viewBox: '0 0 18 21.01',
|
|
256
|
+
paths: [
|
|
257
|
+
{
|
|
258
|
+
id: 'Path_3904',
|
|
259
|
+
d:
|
|
260
|
+
'M12 0H6v2h6V0zM8 13h2V7H8v6zm8.03-6.61 1.42-1.42c-.43-.51-.9-.98-1.41-1.41l-1.42 1.42c-3.88-3.1-9.55-2.47-12.65 1.41S-.5 15.94 3.38 19.04s9.55 2.47 12.65-1.41a8.992 8.992 0 0 0 0-11.24zM9 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7c0 3.86-3.13 7-6.99 7H9z'
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
|
|
266
|
+
export default {
|
|
267
|
+
props: {
|
|
268
|
+
viewBox: {
|
|
269
|
+
type: String,
|
|
270
|
+
default: '0 0 24 24'
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
methods: {},
|
|
275
|
+
|
|
276
|
+
render(h) {
|
|
277
|
+
return h('svg', { style: 'display: none', class: 'app-icons' }, [
|
|
278
|
+
h(
|
|
279
|
+
'defs',
|
|
280
|
+
{},
|
|
281
|
+
IconsList.map((icon) => {
|
|
282
|
+
return h(
|
|
283
|
+
'symbol',
|
|
284
|
+
{
|
|
285
|
+
attrs: {
|
|
286
|
+
id: icon.id,
|
|
287
|
+
viewBox: (() => (icon.viewBox ? icon.viewBox : '0 0 24 24'))()
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
icon.paths.map((_p) => {
|
|
291
|
+
return h('path', { attrs: { ..._p } })
|
|
292
|
+
})
|
|
293
|
+
)
|
|
294
|
+
})
|
|
295
|
+
)
|
|
296
|
+
])
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
</script>
|
|
300
|
+
|
|
301
|
+
<style lang="scss" scoped>
|
|
302
|
+
svg {
|
|
303
|
+
width: 28px;
|
|
304
|
+
height: 28px;
|
|
305
|
+
fill: #fff;
|
|
306
|
+
stroke: #fff;
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
}
|
|
309
|
+
</style>
|
|
@@ -1,45 +1,39 @@
|
|
|
1
1
|
<!--
|
|
2
|
+
----------------- MUST ADD OVERAY TO CLOSE WIDGET ------------------
|
|
3
|
+
----------------- MUST ADD ERROR GESTION ------------------
|
|
4
|
+
----------------- MUST ADD label terminer ------------------
|
|
5
|
+
----------------- MUST ADD css ------------------
|
|
6
|
+
|
|
2
7
|
@ Description: This component is used to display the sub menu to show the anchor of a activity.
|
|
3
8
|
@ What it does: The component show the data that was enter in menu.json and create de link to the anchor from those information. This componant must be use with app-comp-menu-Item and app-comp-menu.
|
|
4
9
|
-->
|
|
5
10
|
|
|
6
11
|
<template>
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div class="box-contenu">
|
|
14
|
-
<div class="box-ttl">
|
|
15
|
-
<h2>{{ title }}</h2>
|
|
12
|
+
<div id="sidebar-submenu" :class="{ isOpen: open }">
|
|
13
|
+
<app-base-button id="close-toc" @click="close()">X</app-base-button>
|
|
14
|
+
<p>{{ $t('text.you_are_here') }}</p>
|
|
15
|
+
<p v-html="title"></p>
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
<div>
|
|
18
|
+
<p>{{ actProgress }} {{ $t('text.activity_progress') }}</p>
|
|
19
|
+
</div>
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@click="scrollToAnchor($event)"
|
|
33
|
-
>
|
|
34
|
-
<span @click="scrollToAnchor($event)">
|
|
35
|
-
{{ anchor.anchorName }}
|
|
36
|
-
</span>
|
|
37
|
-
</b-link>
|
|
38
|
-
</div>
|
|
21
|
+
<div class="box">
|
|
22
|
+
<b-link
|
|
23
|
+
v-for="anchor of anchors"
|
|
24
|
+
:key="anchor.title"
|
|
25
|
+
:to="{
|
|
26
|
+
name: anchor.path
|
|
27
|
+
}"
|
|
28
|
+
@click="close()"
|
|
29
|
+
>
|
|
30
|
+
<div>
|
|
31
|
+
<p>{{ anchor.title }}</p>
|
|
32
|
+
<p></p>
|
|
39
33
|
</div>
|
|
40
|
-
</
|
|
34
|
+
</b-link>
|
|
41
35
|
</div>
|
|
42
|
-
</
|
|
36
|
+
</div>
|
|
43
37
|
</template>
|
|
44
38
|
|
|
45
39
|
<script>
|
|
@@ -48,25 +42,42 @@ import { mapGetters } from 'vuex'
|
|
|
48
42
|
export default {
|
|
49
43
|
data() {
|
|
50
44
|
return {
|
|
51
|
-
//activitiSubMenu: [],
|
|
52
|
-
activityId: null,
|
|
53
45
|
title: '',
|
|
54
|
-
subtitle: '',
|
|
55
|
-
time: '',
|
|
56
46
|
anchors: [],
|
|
57
|
-
activity: ''
|
|
47
|
+
activity: '',
|
|
48
|
+
open: false,
|
|
49
|
+
menuInfo: null,
|
|
50
|
+
actProgress: null
|
|
58
51
|
}
|
|
59
52
|
},
|
|
60
53
|
computed: {
|
|
61
|
-
...mapGetters([
|
|
54
|
+
...mapGetters([
|
|
55
|
+
'getMenuSettings',
|
|
56
|
+
'getAnchorsForActivity',
|
|
57
|
+
'getBifChoice',
|
|
58
|
+
'getAllCompleted',
|
|
59
|
+
'getAllActivitiesState'
|
|
60
|
+
])
|
|
62
61
|
},
|
|
63
62
|
mounted() {
|
|
63
|
+
this.$bus.$on('toggle-widget', (data) => {
|
|
64
|
+
if (data == 'toc') this.open = !this.open
|
|
65
|
+
else this.open = false
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
this.$bus.$on('close-widget', (data) => {
|
|
69
|
+
this.open = false
|
|
70
|
+
this.reset()
|
|
71
|
+
})
|
|
72
|
+
|
|
64
73
|
this.$bus.$on('info-activity', (data) => {
|
|
65
74
|
//should be condition to avoid event fireing multiple time on call
|
|
75
|
+
|
|
66
76
|
if (data) {
|
|
77
|
+
this.reset()
|
|
67
78
|
this.activity = data
|
|
68
|
-
//this.getInfoSubMenu(this.activity)
|
|
69
79
|
this.getInfoSubMenu(data)
|
|
80
|
+
this.getProgressActivity(data)
|
|
70
81
|
}
|
|
71
82
|
})
|
|
72
83
|
},
|
|
@@ -76,25 +87,54 @@ export default {
|
|
|
76
87
|
*/
|
|
77
88
|
//
|
|
78
89
|
getInfoSubMenu(activity) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
//get the anchors for this activity from the store
|
|
91
|
+
let menuInfo = this.getMenuSettings
|
|
92
|
+
let nb = null
|
|
93
|
+
|
|
94
|
+
//Get title are if no title construct acitivty
|
|
95
|
+
if (menuInfo[activity] && menuInfo[activity].title)
|
|
96
|
+
this.title = menuInfo[activity].title
|
|
97
|
+
|
|
98
|
+
if (activity.charAt(1) == '0' || activity.charAt(1) == 0)
|
|
99
|
+
nb = activity.substr(2)
|
|
100
|
+
else nb = activity.substr(1)
|
|
101
|
+
|
|
102
|
+
this.title = `${this.$t('text.activity')} ${nb} : ${
|
|
103
|
+
menuInfo[activity].subTitle
|
|
104
|
+
}`
|
|
105
|
+
|
|
106
|
+
let count = 0
|
|
107
|
+
|
|
108
|
+
//create anchors title and path
|
|
109
|
+
if (menuInfo[activity] && menuInfo[activity].anchors) {
|
|
110
|
+
menuInfo[activity].anchors.forEach((element) => {
|
|
111
|
+
count++
|
|
112
|
+
|
|
113
|
+
//
|
|
114
|
+
let _path = null
|
|
115
|
+
let b = null
|
|
116
|
+
if (nb == 0 || nb == '0') {
|
|
117
|
+
b = `introduction`
|
|
118
|
+
} else {
|
|
119
|
+
b = `activite_${nb}`
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (element.page == 'page_1') {
|
|
123
|
+
_path = `${b}`
|
|
124
|
+
} else {
|
|
125
|
+
_path = `${b}.${element.page}`
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
let info = {
|
|
129
|
+
title: `${this.$t('text.anchors')} ${count} : ${
|
|
130
|
+
element.anchorName
|
|
131
|
+
}`,
|
|
132
|
+
path: _path
|
|
133
|
+
}
|
|
134
|
+
this.anchors.push(info)
|
|
135
|
+
})
|
|
95
136
|
}
|
|
96
137
|
},
|
|
97
|
-
|
|
98
138
|
disable(data) {
|
|
99
139
|
let page = data.pageRef
|
|
100
140
|
let act = this.getAct(data.path)
|
|
@@ -112,7 +152,7 @@ export default {
|
|
|
112
152
|
}
|
|
113
153
|
},
|
|
114
154
|
getAct(data) {
|
|
115
|
-
//return
|
|
155
|
+
//return the id need it
|
|
116
156
|
if (data) {
|
|
117
157
|
if (data.substring(data.indexOf('_') + 1).length == 1) {
|
|
118
158
|
return `A0${data.substring(data.indexOf('_') + 1)}`
|
|
@@ -121,43 +161,58 @@ export default {
|
|
|
121
161
|
}
|
|
122
162
|
}
|
|
123
163
|
},
|
|
124
|
-
/* @Description:build the route for the anchors in the menu
|
|
125
|
-
*/
|
|
126
|
-
buildAnchorsRoutes(anchors) {
|
|
127
|
-
//build the route for each anchors
|
|
128
|
-
for (let a of anchors) {
|
|
129
|
-
let _path = ''
|
|
130
|
-
if (a.page === 'page_1') _path = this.activity.path
|
|
131
|
-
else _path = `${this.activity.path}.${a.page}`
|
|
132
|
-
a.path = _path
|
|
133
|
-
}
|
|
134
|
-
this.anchors = anchors
|
|
135
|
-
},
|
|
136
|
-
|
|
137
164
|
/**
|
|
138
|
-
* @description
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* - Send a scoll message to the $bus
|
|
142
|
-
* - THIS METHODE DOES NOT PERFORM Scroll. scroll action will be perform by the PAGE after receiving the scroll message
|
|
143
|
-
* @param {Object} event - the element that is the scoll target
|
|
165
|
+
* @description Gives gives length of completed page for an activity
|
|
166
|
+
* @param {String} idActivity
|
|
167
|
+
* @returns {Number}
|
|
144
168
|
*/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (this
|
|
150
|
-
this
|
|
151
|
-
this.$store.commit('UPDATE_ANCHOR_STATE', false)
|
|
152
|
-
this.$bus.$emit('target-to-scroll', event.target)
|
|
169
|
+
getProgressActivity(idActivity) {
|
|
170
|
+
/// give all the page that are complete to the gauge
|
|
171
|
+
if (idActivity) {
|
|
172
|
+
let completed = []
|
|
173
|
+
if (this.getAllCompleted[idActivity]) {
|
|
174
|
+
completed = this.getAllCompleted[idActivity] //get all completed page for the activity
|
|
153
175
|
}
|
|
154
|
-
|
|
176
|
+
|
|
177
|
+
const allActivitiesState = JSON.parse(
|
|
178
|
+
JSON.stringify(this.getAllActivitiesState)
|
|
179
|
+
)
|
|
180
|
+
let size = allActivitiesState[idActivity]
|
|
181
|
+
? allActivitiesState[idActivity].size
|
|
182
|
+
: 0
|
|
183
|
+
|
|
184
|
+
// reduce the size if in A00
|
|
185
|
+
if (idActivity === 'A00' && size > 0) size = size - 1
|
|
186
|
+
|
|
187
|
+
// return pourcent of activity completion
|
|
188
|
+
this.actProgress = `${Math.round((completed.length * 100) / size)} %`
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
close() {
|
|
192
|
+
this.open = !this.open
|
|
193
|
+
this.reset()
|
|
194
|
+
},
|
|
195
|
+
reset() {
|
|
196
|
+
this.anchors = []
|
|
197
|
+
this.activity = ''
|
|
198
|
+
this.activity = ''
|
|
155
199
|
}
|
|
156
200
|
}
|
|
157
201
|
}
|
|
158
202
|
</script>
|
|
159
203
|
<style lang="scss">
|
|
160
204
|
#sidebar-submenu {
|
|
205
|
+
display: none;
|
|
206
|
+
position: absolute;
|
|
207
|
+
left: 200%;
|
|
208
|
+
top: 0;
|
|
209
|
+
background: white;
|
|
210
|
+
width: 450px;
|
|
211
|
+
|
|
212
|
+
&.isOpen {
|
|
213
|
+
display: block;
|
|
214
|
+
}
|
|
215
|
+
|
|
161
216
|
.b-sidebar-header {
|
|
162
217
|
display: none;
|
|
163
218
|
pointer-events: none;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="transcript-container" v-html="content"></div>
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
export default {
|
|
6
|
+
props: {
|
|
7
|
+
content: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: `Hello Wolrd!`
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style lang="scss">
|
|
16
|
+
#transcript-container {
|
|
17
|
+
padding: 30px;
|
|
18
|
+
}
|
|
19
|
+
</style>
|