@saooti/octopus-sdk 40.2.19 → 41.0.0
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/index.ts +2 -1
- package/package.json +4 -3
- package/src/App.vue +71 -95
- package/src/components/composable/player/usePlayerLive.ts +13 -4
- package/src/components/composable/player/usePlayerLogic.ts +6 -6
- package/src/components/composable/player/usePlayerVast.ts +7 -7
- package/src/components/composable/podcasts/usePodcastView.ts +3 -3
- package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
- package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
- package/src/components/composable/route/useSimplePageParam.ts +15 -8
- package/src/components/composable/useInit.ts +2 -2
- package/src/components/composable/useMetaTitleWatch.ts +2 -2
- package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
- package/src/components/display/categories/CategoryChooser.vue +144 -145
- package/src/components/display/categories/CategoryFilter.vue +172 -198
- package/src/components/display/categories/CategoryList.vue +122 -147
- package/src/components/display/comments/CommentInput.vue +100 -122
- package/src/components/display/comments/CommentList.vue +169 -191
- package/src/components/display/comments/CommentName.vue +35 -45
- package/src/components/display/comments/CommentParentInfo.vue +28 -34
- package/src/components/display/comments/CommentPlayer.vue +38 -50
- package/src/components/display/comments/CommentSection.vue +85 -103
- package/src/components/display/comments/item/CommentBasicView.vue +48 -61
- package/src/components/display/comments/item/CommentItem.vue +104 -115
- package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
- package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
- package/src/components/display/comments/like/LikeButton.vue +36 -41
- package/src/components/display/comments/like/LikeSection.vue +128 -136
- package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
- package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
- package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
- package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
- package/src/components/display/edit/EditBox.vue +9 -8
- package/src/components/display/edit/EditBoxRadio.vue +1 -5
- package/src/components/display/emission/EmissionInlineList.vue +82 -97
- package/src/components/display/emission/EmissionItem.vue +57 -69
- package/src/components/display/emission/EmissionList.vue +189 -218
- package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
- package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
- package/src/components/display/emission/EmissionPresentationList.vue +51 -61
- package/src/components/display/filter/AdvancedSearch.vue +151 -176
- package/src/components/display/filter/CategorySearchFilter.vue +43 -46
- package/src/components/display/filter/DateFilter.vue +76 -91
- package/src/components/display/filter/MonetizableFilter.vue +27 -30
- package/src/components/display/filter/ProductorSearch.vue +87 -90
- package/src/components/display/filter/RubriqueChoice.vue +58 -63
- package/src/components/display/filter/RubriqueFilter.vue +154 -169
- package/src/components/display/filter/SearchOrder.vue +35 -35
- package/src/components/display/list/ListPaginate.vue +72 -93
- package/src/components/display/list/PaginateParams.vue +36 -40
- package/src/components/display/list/PaginateSection.vue +113 -124
- package/src/components/display/list/SwiperList.vue +97 -109
- package/src/components/display/live/CountDown.vue +15 -9
- package/src/components/display/live/CountdownOctopus.vue +16 -10
- package/src/components/display/live/LiveHorizontalList.vue +95 -103
- package/src/components/display/live/LiveItem.vue +64 -73
- package/src/components/display/live/LiveList.vue +125 -137
- package/src/components/display/live/RadioCurrently.vue +66 -73
- package/src/components/display/live/RadioImage.vue +39 -50
- package/src/components/display/live/RadioItem.vue +9 -14
- package/src/components/display/live/RadioList.vue +39 -53
- package/src/components/display/live/RadioPlanning.vue +210 -222
- package/src/components/display/organisation/OrganisationChooser.vue +116 -122
- package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
- package/src/components/display/participant/ParticipantInlineList.vue +42 -58
- package/src/components/display/participant/ParticipantItem.vue +66 -74
- package/src/components/display/participant/ParticipantList.vue +116 -141
- package/src/components/display/playlist/PlaylistItem.vue +33 -46
- package/src/components/display/playlist/PlaylistList.vue +115 -144
- package/src/components/display/playlist/PodcastList.vue +90 -103
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
- package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
- package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
- package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
- package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
- package/src/components/display/podcasts/PodcastFilterList.vue +62 -56
- package/src/components/display/podcasts/PodcastImage.vue +96 -99
- package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
- package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
- package/src/components/display/podcasts/PodcastItem.vue +48 -63
- package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
- package/src/components/display/podcasts/PodcastList.vue +182 -206
- package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
- package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
- package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
- package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
- package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
- package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
- package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
- package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
- package/src/components/display/podcasts/TagList.vue +48 -50
- package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
- package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
- package/src/components/display/rubriques/RubriqueList.vue +140 -160
- package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
- package/src/components/display/sharing/FormatSwitch.vue +16 -11
- package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
- package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
- package/src/components/display/sharing/PlayerParameters.vue +69 -71
- package/src/components/display/sharing/QrCode.vue +55 -67
- package/src/components/display/sharing/ShareAnonymous.vue +160 -178
- package/src/components/display/sharing/ShareDistribution.vue +103 -117
- package/src/components/display/sharing/ShareNewsletter.vue +154 -161
- package/src/components/display/sharing/SharePlayer.vue +273 -295
- package/src/components/display/sharing/SharePlayerColors.vue +25 -16
- package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
- package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
- package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
- package/src/components/display/sharing/SubscribeButtons.vue +184 -207
- package/src/components/display/studio/RecordingItemButton.vue +1 -4
- package/src/components/form/ClassicCheckbox.vue +26 -30
- package/src/components/form/ClassicContentEditable.vue +37 -33
- package/src/components/form/ClassicCopyButton.vue +40 -44
- package/src/components/form/ClassicDatePicker.vue +114 -114
- package/src/components/form/ClassicEmojiPicker.vue +20 -28
- package/src/components/form/ClassicInputText.vue +116 -120
- package/src/components/form/ClassicLoading.vue +7 -12
- package/src/components/form/ClassicMultiselect.vue +115 -117
- package/src/components/form/ClassicRadio.vue +21 -16
- package/src/components/form/ClassicRadioLabel.vue +23 -22
- package/src/components/form/ClassicSearch.vue +24 -19
- package/src/components/form/ClassicSelect.vue +47 -38
- package/src/components/form/ClassicWysiwyg.vue +116 -123
- package/src/components/icons/AmazonMusicIcon.vue +7 -10
- package/src/components/icons/ApplePodcastIcon.vue +7 -11
- package/src/components/icons/BlueSkyIcon.vue +8 -11
- package/src/components/icons/DeezerIcon.vue +8 -11
- package/src/components/icons/EditFtpIcon.vue +8 -11
- package/src/components/icons/IHeartIcon.vue +8 -11
- package/src/components/icons/PlayVideoIcon.vue +7 -10
- package/src/components/icons/PlayerFmIcon.vue +7 -10
- package/src/components/icons/PocketCastIcon.vue +8 -11
- package/src/components/icons/PodcastAddictIcon.vue +7 -10
- package/src/components/icons/RadiolineIcon.vue +8 -11
- package/src/components/icons/TuninIcon.vue +8 -11
- package/src/components/icons/XIcon.vue +7 -10
- package/src/components/misc/AcpmImage.vue +6 -7
- package/src/components/misc/ClassicAccordion.vue +26 -31
- package/src/components/misc/ClassicLazy.vue +86 -90
- package/src/components/misc/ClassicNav.vue +16 -20
- package/src/components/misc/ClassicPopover.vue +271 -282
- package/src/components/misc/ClassicSpinner.vue +5 -27
- package/src/components/misc/ErrorMessage.vue +11 -12
- package/src/components/misc/FooterGarSection.vue +33 -41
- package/src/components/misc/FooterSection.vue +94 -131
- package/src/components/misc/HomeDropdown.vue +83 -105
- package/src/components/misc/MobileMenu.vue +101 -111
- package/src/components/misc/ProgressBar.vue +53 -62
- package/src/components/misc/TopBar.vue +98 -120
- package/src/components/misc/TopBarMainContent.vue +114 -133
- package/src/components/misc/modal/ClassicModal.vue +40 -33
- package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
- package/src/components/misc/modal/ClipboardModal.vue +27 -30
- package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
- package/src/components/misc/modal/MessageModal.vue +50 -47
- package/src/components/misc/modal/NewsletterModal.vue +30 -31
- package/src/components/misc/modal/QrCodeModal.vue +21 -21
- package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
- package/src/components/misc/player/PlayerCompact.vue +6 -4
- package/src/components/misc/player/PlayerComponent.vue +8 -9
- package/src/components/misc/player/PlayerLarge.vue +9 -8
- package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
- package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
- package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
- package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
- package/src/components/misc/player/elements/PlayerImage.vue +51 -57
- package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
- package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
- package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
- package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
- package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
- package/src/components/misc/player/radio/RadioHistory.vue +80 -99
- package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
- package/src/components/misc/player/video/PlayerVideo.vue +27 -40
- package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
- package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
- package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
- package/src/components/pages/CategoryPage.vue +28 -33
- package/src/components/pages/EmissionPage.vue +113 -132
- package/src/components/pages/EmissionsPage.vue +2 -0
- package/src/components/pages/Error403Page.vue +21 -20
- package/src/components/pages/HomePage.vue +91 -100
- package/src/components/pages/LivesPage.vue +35 -37
- package/src/components/pages/MapPage.vue +209 -241
- package/src/components/pages/PageLogout.vue +8 -11
- package/src/components/pages/PageNotFound.vue +9 -5
- package/src/components/pages/ParticipantPage.vue +96 -110
- package/src/components/pages/ParticipantsPage.vue +3 -0
- package/src/components/pages/PlaylistPage.vue +112 -117
- package/src/components/pages/PlaylistsPage.vue +9 -2
- package/src/components/pages/PodcastPage.vue +224 -238
- package/src/components/pages/PodcastsPage.vue +9 -2
- package/src/components/pages/RadioPage.vue +56 -70
- package/src/components/pages/RubriquePage.vue +7 -3
- package/src/components/pages/SearchPage.vue +31 -36
- package/src/components/pages/TagPage.vue +11 -9
- package/src/components/pages/VideoPage.vue +14 -11
- package/src/helper/displayHelper.ts +1 -1
- package/src/helper/loadScript.ts +4 -4
- package/src/i18n.ts +2 -2
- package/src/main.ts +1 -1
- package/src/router/router.ts +17 -4
- package/src/stores/AuthStore.ts +12 -12
- package/src/stores/FilterStore.ts +1 -1
- package/src/stores/VastStore.ts +2 -2
- package/src/stores/class/general/player.ts +1 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +0 -113
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/icomoon.woff2 +0 -0
- package/public/css/fonts/style.css +0 -352
- package/sonarqube-scanner.js +0 -10
|
@@ -28,288 +28,277 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
|
-
<script lang="ts">
|
|
32
|
-
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}, 500);
|
|
303
|
-
},
|
|
304
|
-
clearData() {
|
|
305
|
-
if (this.isClick) {
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
this.show = false;
|
|
309
|
-
this.posX = 0;
|
|
310
|
-
this.posY = 0;
|
|
311
|
-
},
|
|
312
|
-
},
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import { computed, nextTick, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch } from 'vue';
|
|
33
|
+
import { useRouter } from 'vue-router';
|
|
34
|
+
|
|
35
|
+
//Props
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
content: { type: String, default: "" },
|
|
38
|
+
title: { type: String, default: "" },
|
|
39
|
+
target: { type: String, required: true },
|
|
40
|
+
disable: { type: Boolean, default: false },
|
|
41
|
+
onlyClick: { type: Boolean, default: false },
|
|
42
|
+
onlyMouse: { type: Boolean, default: false },
|
|
43
|
+
isFixed: { type: Boolean, default: false },
|
|
44
|
+
relativeClass: { type: String, default: undefined },
|
|
45
|
+
leftPos: { type: Boolean, default: false },
|
|
46
|
+
topPos: { type: Boolean, default: false },
|
|
47
|
+
popoverClass: { type: String, default: undefined },
|
|
48
|
+
isTopLayer: { type: Boolean, default: false },
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
//Emits
|
|
52
|
+
const emit = defineEmits(["updateVisibility"]);
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
//Data
|
|
56
|
+
const show = ref(false);
|
|
57
|
+
const isClick = ref(false);
|
|
58
|
+
const posX = ref(0);
|
|
59
|
+
const posY = ref(0);
|
|
60
|
+
const targetElement: Ref<HTMLElement | null> = ref(null);
|
|
61
|
+
const overPopover = ref(false);
|
|
62
|
+
const isTabAction = ref(false);
|
|
63
|
+
const maxHeight = ref('80dvh');
|
|
64
|
+
const clearTimeout: Ref<ReturnType<typeof setTimeout> | undefined> = ref(undefined);
|
|
65
|
+
const popoverRef = useTemplateRef('popover');
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
//Composables
|
|
69
|
+
const router= useRouter();
|
|
70
|
+
|
|
71
|
+
//Computed
|
|
72
|
+
const popoverId = computed(() => "popover" + props.target);
|
|
73
|
+
const positionInlineStyle = computed(() => `left: ${posX.value}px; top: ${posY.value}px;max-height:${maxHeight.value}`);
|
|
74
|
+
const displayPopover = computed(() => show.value && !props.disable);
|
|
75
|
+
const isTopLayerPopover = computed(() => (props.isTopLayer || "octopus-modal"===props.relativeClass) && Object.hasOwn(HTMLElement.prototype, "popover"));
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
//Watch
|
|
79
|
+
watch(displayPopover, async () => {
|
|
80
|
+
if(!isTopLayerPopover.value){return;}
|
|
81
|
+
if(displayPopover.value){
|
|
82
|
+
(popoverRef.value as HTMLElement).showPopover();
|
|
83
|
+
}else{
|
|
84
|
+
(popoverRef.value as HTMLElement).hidePopover();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
watch(show, async () => {
|
|
88
|
+
emit("updateVisibility", show.value);
|
|
89
|
+
if (show.value) {
|
|
90
|
+
window.addEventListener("keyup", addAccessibilityControl);
|
|
91
|
+
} else {
|
|
92
|
+
window.removeEventListener("keyup", addAccessibilityControl);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
onMounted(()=>init())
|
|
97
|
+
|
|
98
|
+
onUnmounted(()=>removeListeners())
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
//Methods
|
|
102
|
+
function addAccessibilityControl(event: KeyboardEvent): void {
|
|
103
|
+
if (!event || null === event) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if ("Tab" !== event.key) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const myElement = event.target as HTMLElement;
|
|
110
|
+
const parent = popoverRef?.value as HTMLElement;
|
|
111
|
+
if (parent?.contains(myElement)) {
|
|
112
|
+
isTabAction.value = true;
|
|
113
|
+
} else {
|
|
114
|
+
clearClick();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function init() {
|
|
118
|
+
targetElement.value = document.getElementById(props.target);
|
|
119
|
+
if (targetElement.value) {
|
|
120
|
+
if (!props.onlyClick) {
|
|
121
|
+
targetElement.value.addEventListener( "mouseenter",setPopoverData);
|
|
122
|
+
targetElement.value.addEventListener("mouseleave",clearDataTimeout);
|
|
123
|
+
}
|
|
124
|
+
if (!props.onlyMouse) {
|
|
125
|
+
targetElement.value.addEventListener("click", setPopoverData);
|
|
126
|
+
}
|
|
127
|
+
targetElement.value.addEventListener("focusout", clearDataBlur);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function removeListeners() {
|
|
131
|
+
if (targetElement.value) {
|
|
132
|
+
if (!props.onlyClick) {
|
|
133
|
+
targetElement.value.removeEventListener("mouseenter",setPopoverData,);
|
|
134
|
+
targetElement.value.removeEventListener("mouseleave",clearDataTimeout,);
|
|
135
|
+
}
|
|
136
|
+
if (!props.onlyMouse) {
|
|
137
|
+
targetElement.value.removeEventListener("click", setPopoverData);
|
|
138
|
+
}
|
|
139
|
+
targetElement.value.removeEventListener("focusout", clearDataBlur);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function handleClickEvent(){
|
|
143
|
+
if (show.value && isClick.value) {
|
|
144
|
+
isClick.value = false;
|
|
145
|
+
clearData();
|
|
146
|
+
return -1;
|
|
147
|
+
}
|
|
148
|
+
if (show.value && isTopLayerPopover.value) {
|
|
149
|
+
const popover = popoverRef?.value as HTMLElement;
|
|
150
|
+
popover.showPopover();
|
|
151
|
+
isClick.value = true;
|
|
152
|
+
return -1;
|
|
153
|
+
}
|
|
154
|
+
isClick.value = true;
|
|
155
|
+
return 0;
|
|
156
|
+
}
|
|
157
|
+
function handleLeftPos(rectElement: DOMRect, parentLeft: number, sizeAvailable: number, sizePopover: number){
|
|
158
|
+
const elementRightRelative = rectElement.right - parentLeft;
|
|
159
|
+
const hasPlaceRightButton = (sizeAvailable - (sizeAvailable - elementRightRelative)) > sizePopover;
|
|
160
|
+
if(hasPlaceRightButton){
|
|
161
|
+
posX.value =
|
|
162
|
+
rectElement.right -
|
|
163
|
+
parentLeft -
|
|
164
|
+
sizePopover;
|
|
165
|
+
}else{
|
|
166
|
+
posX.value =parentLeft;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function handleRightPos(rectElement: DOMRect, parentLeft: number, sizeAvailable: number, sizePopover: number){
|
|
170
|
+
const elementLeftRelative = rectElement.left - parentLeft;
|
|
171
|
+
const hasPlaceRightButton = (sizeAvailable - elementLeftRelative) > sizePopover;
|
|
172
|
+
if(hasPlaceRightButton){
|
|
173
|
+
posX.value = elementLeftRelative;
|
|
174
|
+
}else{
|
|
175
|
+
posX.value = sizeAvailable - sizePopover + parentLeft;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function setPopoverData(e: MouseEvent | PointerEvent) {
|
|
179
|
+
clearInterval(clearTimeout.value as unknown as number);
|
|
180
|
+
if (props.disable || !e || !e.target) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if ("click" === e.type && -1 === handleClickEvent()) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
show.value = true;
|
|
187
|
+
let parentLeft = 0;
|
|
188
|
+
let parentTop = 0;
|
|
189
|
+
let parentScrollTop = 0;
|
|
190
|
+
let parentBottom = 0;
|
|
191
|
+
let parentWidth=0;
|
|
192
|
+
const popover = popoverRef?.value as HTMLElement;
|
|
193
|
+
if (!isTopLayerPopover.value && props.relativeClass) {
|
|
194
|
+
const modalBody = document.getElementsByClassName(props.relativeClass,)[0];
|
|
195
|
+
if (undefined === modalBody) {
|
|
196
|
+
popover.style.display = "block";
|
|
197
|
+
posX.value = 0;
|
|
198
|
+
posY.value = 0;
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const modalBodyRect = modalBody.getBoundingClientRect();
|
|
202
|
+
parentLeft = modalBodyRect.left;
|
|
203
|
+
parentTop = modalBodyRect.top;
|
|
204
|
+
parentScrollTop = modalBody.scrollTop;
|
|
205
|
+
parentBottom=modalBodyRect.bottom;
|
|
206
|
+
parentWidth = modalBodyRect.width;
|
|
207
|
+
}
|
|
208
|
+
const rectElement = (e.target as HTMLElement).getBoundingClientRect();
|
|
209
|
+
popover.style.display = "block";
|
|
210
|
+
const sizePopover = popover.clientWidth;
|
|
211
|
+
const sizeAvailable = parentWidth || window.innerWidth;
|
|
212
|
+
if (props.leftPos) {
|
|
213
|
+
handleLeftPos(rectElement, parentLeft, sizeAvailable, sizePopover);
|
|
214
|
+
} else {
|
|
215
|
+
handleRightPos(rectElement, parentLeft, sizeAvailable, sizePopover);
|
|
216
|
+
}
|
|
217
|
+
posX.value = Math.max(0, posX.value);
|
|
218
|
+
const yPosParent = props.topPos ? rectElement.top : rectElement.bottom;
|
|
219
|
+
const yGap = props.topPos
|
|
220
|
+
? -5 - popover.clientHeight
|
|
221
|
+
: 5;
|
|
222
|
+
|
|
223
|
+
posY.value =
|
|
224
|
+
yPosParent +
|
|
225
|
+
parentScrollTop -
|
|
226
|
+
parentTop +
|
|
227
|
+
(props.isFixed ? 0 : window.scrollY) +
|
|
228
|
+
yGap;
|
|
229
|
+
if(isTopLayerPopover.value){
|
|
230
|
+
posY.value = Math.max(0, posY.value);
|
|
231
|
+
maxHeight.value = (window.innerHeight - posY.value) + "px";
|
|
232
|
+
}else if(props.relativeClass){
|
|
233
|
+
maxHeight.value = (parentBottom- posY.value -parentTop) + "px";
|
|
234
|
+
}else{
|
|
235
|
+
maxHeight.value = '80dvh';
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function clearDataBlur(e: FocusEvent) {
|
|
239
|
+
if (isTabAction.value) {
|
|
240
|
+
isTabAction.value = false;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
//Exception timepicker in popover
|
|
244
|
+
const result = Array.from(e?.target?.classList ?? []).findIndex((val) => { return val.startsWith("dp__");});
|
|
245
|
+
if (-1!==result) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (!e.relatedTarget) {
|
|
249
|
+
return clearClick();
|
|
250
|
+
}
|
|
251
|
+
const myElement = e.relatedTarget as HTMLElement;
|
|
252
|
+
if (popoverId.value === myElement.id) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const parent =popoverRef?.value as HTMLElement;
|
|
256
|
+
if (null === parent || !parent.contains(myElement)) {
|
|
257
|
+
return clearClick();
|
|
258
|
+
}
|
|
259
|
+
if (
|
|
260
|
+
null === myElement.classList ||
|
|
261
|
+
!myElement.classList.contains("octopus-dropdown-item")
|
|
262
|
+
) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
if (!(myElement as HTMLAnchorElement).href) {
|
|
266
|
+
return clearClick();
|
|
267
|
+
}
|
|
268
|
+
if (myElement.classList.contains("realLink")) {
|
|
269
|
+
myElement.click();
|
|
270
|
+
} else {
|
|
271
|
+
router.push((myElement as HTMLAnchorElement).pathname);
|
|
272
|
+
}
|
|
273
|
+
nextTick(() => {
|
|
274
|
+
isClick.value = false;
|
|
275
|
+
clearData();
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
function clearClick() {
|
|
279
|
+
isClick.value = false;
|
|
280
|
+
clearData();
|
|
281
|
+
}
|
|
282
|
+
function clearDataTimeout() {
|
|
283
|
+
clearTimeout.value = setTimeout(() => {
|
|
284
|
+
if (!overPopover.value) {
|
|
285
|
+
clearData();
|
|
286
|
+
}
|
|
287
|
+
clearTimeout.value=undefined;
|
|
288
|
+
}, 500);
|
|
289
|
+
}
|
|
290
|
+
function clearData() {
|
|
291
|
+
if (isClick.value) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
show.value = false;
|
|
295
|
+
posX.value = 0;
|
|
296
|
+
posY.value = 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
//Expose
|
|
300
|
+
defineExpose({
|
|
301
|
+
clearClick
|
|
313
302
|
});
|
|
314
303
|
</script>
|
|
315
304
|
<style lang="scss">
|
|
@@ -4,14 +4,11 @@
|
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script lang="ts">
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
small: { default: false, type: Boolean },
|
|
13
|
-
},
|
|
14
|
-
});
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
//Props
|
|
9
|
+
defineProps({
|
|
10
|
+
small: { default: false, type: Boolean },
|
|
11
|
+
})
|
|
15
12
|
</script>
|
|
16
13
|
<style lang="scss">
|
|
17
14
|
.octopus-app .octopus-spinner {
|
|
@@ -97,24 +94,5 @@ export default defineComponent({
|
|
|
97
94
|
opacity: 0;
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
|
-
/* display: inline-block;
|
|
101
|
-
width: 2rem;
|
|
102
|
-
height: 2rem;
|
|
103
|
-
border-radius: 50%;
|
|
104
|
-
animation: 0.75s linear infinite spinner-border;
|
|
105
|
-
border: 2px solid currentcolor;
|
|
106
|
-
border-right-color: transparent;
|
|
107
|
-
flex-shrink: 0;
|
|
108
|
-
|
|
109
|
-
&.small {
|
|
110
|
-
width: 1rem;
|
|
111
|
-
height: 1rem;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@keyframes spinner-border {
|
|
115
|
-
to {
|
|
116
|
-
transform: rotate(360deg);
|
|
117
|
-
}
|
|
118
|
-
} */
|
|
119
97
|
}
|
|
120
98
|
</style>
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex">
|
|
3
3
|
<div class="d-flex align-items-center bg-warning p-2 rounded my-1">
|
|
4
|
-
<AlertIcon :title="
|
|
4
|
+
<AlertIcon :title="t('Warning')" class="me-1 text-danger" :size="16" />
|
|
5
5
|
<div class="text-danger">
|
|
6
6
|
{{ message }}
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
11
|
-
<script lang="ts">
|
|
11
|
+
<script setup lang="ts">
|
|
12
12
|
import AlertIcon from "vue-material-design-icons/Alert.vue";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
13
|
+
import { useI18n } from "vue-i18n";
|
|
14
|
+
|
|
15
|
+
//Props
|
|
16
|
+
defineProps({
|
|
17
|
+
message: { default: undefined, type: String },
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
//Composables
|
|
21
|
+
const { t } = useI18n();
|
|
23
22
|
</script>
|