@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
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<script lang="ts">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
</script>
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
//Props
|
|
24
|
+
defineProps({
|
|
25
|
+
size: { default: 24, type: Number },
|
|
26
|
+
title: { default: undefined, type: String },
|
|
27
|
+
fillColor: { default: "currentColor", type: String },
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
@@ -21,14 +21,11 @@
|
|
|
21
21
|
</span>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
|
-
<script lang="ts">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
</script>
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
//Props
|
|
26
|
+
defineProps({
|
|
27
|
+
size: { default: 24, type: Number },
|
|
28
|
+
title: { default: undefined, type: String },
|
|
29
|
+
fillColor: { default: "currentColor", type: String },
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<script lang="ts">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fillColor: { default: "currentColor", type: String },
|
|
30
|
-
},
|
|
31
|
-
});
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
//Props
|
|
24
|
+
defineProps({
|
|
25
|
+
size: { default: 24, type: Number },
|
|
26
|
+
title: { default: undefined, type: String },
|
|
27
|
+
fillColor: { default: "currentColor", type: String },
|
|
28
|
+
})
|
|
32
29
|
</script>
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
|
-
<script lang="ts">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
fillColor: { default: "currentColor", type: String },
|
|
29
|
-
},
|
|
30
|
-
});
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
//Props
|
|
23
|
+
defineProps({
|
|
24
|
+
size: { default: 24, type: Number },
|
|
25
|
+
title: { default: undefined, type: String },
|
|
26
|
+
fillColor: { default: "currentColor", type: String },
|
|
27
|
+
})
|
|
31
28
|
</script>
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
|
-
<script lang="ts">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
</script>
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
//Props
|
|
23
|
+
defineProps({
|
|
24
|
+
size: { default: 24, type: Number },
|
|
25
|
+
title: { default: undefined, type: String },
|
|
26
|
+
fillColor: { default: "currentColor", type: String },
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<script lang="ts">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fillColor: { default: "currentColor", type: String },
|
|
30
|
-
},
|
|
31
|
-
});
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
//Props
|
|
24
|
+
defineProps({
|
|
25
|
+
size: { default: 24, type: Number },
|
|
26
|
+
title: { default: undefined, type: String },
|
|
27
|
+
fillColor: { default: "currentColor", type: String },
|
|
28
|
+
})
|
|
32
29
|
</script>
|
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<script lang="ts">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
</script>
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
//Props
|
|
24
|
+
defineProps({
|
|
25
|
+
size: { default: 24, type: Number },
|
|
26
|
+
title: { default: undefined, type: String },
|
|
27
|
+
fillColor: { default: "currentColor", type: String },
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
|
-
<script lang="ts">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
</script>
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
//Props
|
|
23
|
+
defineProps({
|
|
24
|
+
size: { default: 24, type: Number },
|
|
25
|
+
title: { default: undefined, type: String },
|
|
26
|
+
fillColor: { default: "currentColor", type: String },
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
|
-
<script lang="ts">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
fillColor: { default: "currentColor", type: String },
|
|
29
|
-
},
|
|
30
|
-
});
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
//Props
|
|
23
|
+
defineProps({
|
|
24
|
+
size: { default: 24, type: Number },
|
|
25
|
+
title: { default: undefined, type: String },
|
|
26
|
+
fillColor: { default: "currentColor", type: String },
|
|
27
|
+
})
|
|
31
28
|
</script>
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
height="44"
|
|
5
5
|
class="acpm-image"
|
|
6
6
|
src="/img/ACPM.webp"
|
|
7
|
-
:title="
|
|
8
|
-
:alt="
|
|
7
|
+
:title="t('Octopus is ACPM Podcast accredited')"
|
|
8
|
+
:alt="t('Octopus is ACPM Podcast accredited')"
|
|
9
9
|
/>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script lang="ts">
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { useI18n } from "vue-i18n";
|
|
14
|
+
//Composables
|
|
15
|
+
const { t } = useI18n();
|
|
17
16
|
</script>
|
|
18
17
|
|
|
19
18
|
<style lang="scss">
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
height="30"
|
|
20
20
|
class="img-accordion"
|
|
21
21
|
:src="imageUrl"
|
|
22
|
-
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
alt=""
|
|
23
24
|
|
|
24
25
|
/>
|
|
25
26
|
<span class="flex-grow-1">{{ title }}</span>
|
|
@@ -33,42 +34,36 @@
|
|
|
33
34
|
</div>
|
|
34
35
|
</template>
|
|
35
36
|
|
|
36
|
-
<script lang="ts">
|
|
37
|
+
<script setup lang="ts">
|
|
37
38
|
import ChevronDownIcon from "vue-material-design-icons/ChevronDown.vue";
|
|
38
|
-
import { defineAsyncComponent,
|
|
39
|
+
import { defineAsyncComponent, onMounted, ref, watch } from "vue";
|
|
39
40
|
const AlertIcon = defineAsyncComponent(
|
|
40
41
|
() => import("vue-material-design-icons/Alert.vue"),
|
|
41
42
|
);
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
idComposer: { default: "", type: String },
|
|
52
|
-
isWarning: { default: false, type: Boolean },
|
|
53
|
-
imageUrl: { default: undefined, type: String },
|
|
54
|
-
displayAccordion: { default: true, type: Boolean },
|
|
55
|
-
initOpen: { default: false, type: Boolean },
|
|
56
|
-
},
|
|
57
|
-
emits: ["open"],
|
|
58
|
-
data() {
|
|
59
|
-
return {
|
|
60
|
-
isOpen: false as boolean,
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
watch: {
|
|
64
|
-
isOpen() {
|
|
65
|
-
this.$emit("open");
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
created() {
|
|
69
|
-
this.isOpen = this.initOpen;
|
|
70
|
-
},
|
|
44
|
+
//Props
|
|
45
|
+
const props = defineProps({
|
|
46
|
+
title: { default: "", type: String },
|
|
47
|
+
idComposer: { default: "", type: String },
|
|
48
|
+
isWarning: { default: false, type: Boolean },
|
|
49
|
+
imageUrl: { default: undefined, type: String },
|
|
50
|
+
displayAccordion: { default: true, type: Boolean },
|
|
51
|
+
initOpen: { default: false, type: Boolean },
|
|
71
52
|
});
|
|
53
|
+
|
|
54
|
+
//Emits
|
|
55
|
+
const emit = defineEmits(["open"]);
|
|
56
|
+
|
|
57
|
+
//Data
|
|
58
|
+
const isOpen = ref(false);
|
|
59
|
+
|
|
60
|
+
//Watch
|
|
61
|
+
watch(isOpen, () => emit("open"));
|
|
62
|
+
|
|
63
|
+
onMounted(()=>{
|
|
64
|
+
isOpen.value = props.initOpen;
|
|
65
|
+
})
|
|
66
|
+
|
|
72
67
|
</script>
|
|
73
68
|
<style lang="scss">
|
|
74
69
|
|
|
@@ -4,10 +4,95 @@
|
|
|
4
4
|
<slot v-else name="preview" />
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
|
-
<script lang="ts">
|
|
7
|
+
<script setup lang="ts">
|
|
8
8
|
import { useIntersectionObserver } from "@vueuse/core";
|
|
9
9
|
import { ref, nextTick, watch } from "vue";
|
|
10
10
|
|
|
11
|
+
//Props
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
renderOnIdle: Boolean,
|
|
14
|
+
unrender: Boolean,
|
|
15
|
+
minHeight: {type: Number,default: 0},
|
|
16
|
+
initRenderDelay: {type: Number, default: 0},
|
|
17
|
+
unrenderDelay: {type: Number,default: 10000},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//Emits
|
|
21
|
+
const emit = defineEmits(["isRender"]);
|
|
22
|
+
|
|
23
|
+
//Data
|
|
24
|
+
const waitBeforeInit = ref(true);
|
|
25
|
+
const shouldRender = ref(false);
|
|
26
|
+
const targetEl = ref();
|
|
27
|
+
let unrenderTimer: ReturnType<typeof setTimeout> | undefined;
|
|
28
|
+
let renderTimer: ReturnType<typeof setTimeout> | undefined;
|
|
29
|
+
|
|
30
|
+
//Composables
|
|
31
|
+
const { pause, resume } = useIntersectionObserver(
|
|
32
|
+
targetEl,
|
|
33
|
+
([{ isIntersecting }]) => {
|
|
34
|
+
if (waitBeforeInit.value) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (isIntersecting) {
|
|
38
|
+
// perhaps the user re-scrolled to a component that was set to unrender. In that case stop the unrendering timer
|
|
39
|
+
clearTimeout(unrenderTimer);
|
|
40
|
+
// if we're dealing underndering lets add a waiting period of 200ms before rendering. If a component enters the viewport and also leaves it within 200ms it will not render at all. This saves work and improves performance when user scrolls very fast
|
|
41
|
+
|
|
42
|
+
renderTimer = setTimeout(
|
|
43
|
+
() => {
|
|
44
|
+
shouldRender.value = true;
|
|
45
|
+
emit("isRender", true);
|
|
46
|
+
},
|
|
47
|
+
props.unrender ? 200 : 0,
|
|
48
|
+
);
|
|
49
|
+
if (!props.unrender) {
|
|
50
|
+
pause();
|
|
51
|
+
}
|
|
52
|
+
} else if (props.unrender) {
|
|
53
|
+
// if the component was set to render, cancel that
|
|
54
|
+
clearTimeout(renderTimer);
|
|
55
|
+
unrenderTimer = setTimeout(() => {
|
|
56
|
+
shouldRender.value = false;
|
|
57
|
+
emit("isRender", false);
|
|
58
|
+
}, props.unrenderDelay);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
rootMargin: "600px",
|
|
63
|
+
},
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
//Logic
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
waitBeforeInit.value = false;
|
|
69
|
+
}, props.initRenderDelay);
|
|
70
|
+
if (props.renderOnIdle) {
|
|
71
|
+
onIdle(() => {
|
|
72
|
+
shouldRender.value = true;
|
|
73
|
+
emit("isRender", true);
|
|
74
|
+
if (!props.unrender) {
|
|
75
|
+
pause();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//Watch
|
|
81
|
+
watch(
|
|
82
|
+
() => props.unrender,
|
|
83
|
+
(newValue) => {
|
|
84
|
+
if (newValue) {
|
|
85
|
+
clearTimeout(renderTimer);
|
|
86
|
+
unrenderTimer = setTimeout(() => {
|
|
87
|
+
shouldRender.value = false;
|
|
88
|
+
emit("isRender", false);
|
|
89
|
+
resume();
|
|
90
|
+
}, props.unrenderDelay);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
//Methods
|
|
11
96
|
function onIdle(cb = () => {}) {
|
|
12
97
|
if ("requestIdleCallback" in window) {
|
|
13
98
|
window.requestIdleCallback(cb);
|
|
@@ -17,93 +102,4 @@ function onIdle(cb = () => {}) {
|
|
|
17
102
|
}, 300);
|
|
18
103
|
}
|
|
19
104
|
}
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
props: {
|
|
23
|
-
renderOnIdle: Boolean,
|
|
24
|
-
unrender: Boolean,
|
|
25
|
-
minHeight: {
|
|
26
|
-
type: Number,
|
|
27
|
-
default: 0,
|
|
28
|
-
},
|
|
29
|
-
initRenderDelay: {
|
|
30
|
-
type: Number,
|
|
31
|
-
default: 0,
|
|
32
|
-
},
|
|
33
|
-
unrenderDelay: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 10000,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
emits: ["isRender"],
|
|
39
|
-
setup(props, context) {
|
|
40
|
-
const waitBeforeInit = ref(true);
|
|
41
|
-
const shouldRender = ref(false);
|
|
42
|
-
const targetEl = ref();
|
|
43
|
-
let unrenderTimer: ReturnType<typeof setTimeout> | undefined;
|
|
44
|
-
let renderTimer: ReturnType<typeof setTimeout> | undefined;
|
|
45
|
-
setTimeout(() => {
|
|
46
|
-
waitBeforeInit.value = false;
|
|
47
|
-
}, props.initRenderDelay);
|
|
48
|
-
const { pause, resume } = useIntersectionObserver(
|
|
49
|
-
targetEl,
|
|
50
|
-
([{ isIntersecting }]) => {
|
|
51
|
-
if (waitBeforeInit.value) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (isIntersecting) {
|
|
55
|
-
// perhaps the user re-scrolled to a component that was set to unrender. In that case stop the unrendering timer
|
|
56
|
-
clearTimeout(unrenderTimer);
|
|
57
|
-
// if we're dealing underndering lets add a waiting period of 200ms before rendering. If a component enters the viewport and also leaves it within 200ms it will not render at all. This saves work and improves performance when user scrolls very fast
|
|
58
|
-
|
|
59
|
-
renderTimer = setTimeout(
|
|
60
|
-
() => {
|
|
61
|
-
shouldRender.value = true;
|
|
62
|
-
context.emit("isRender", true);
|
|
63
|
-
},
|
|
64
|
-
props.unrender ? 200 : 0,
|
|
65
|
-
);
|
|
66
|
-
if (!props.unrender) {
|
|
67
|
-
pause();
|
|
68
|
-
}
|
|
69
|
-
} else if (props.unrender) {
|
|
70
|
-
// if the component was set to render, cancel that
|
|
71
|
-
clearTimeout(renderTimer);
|
|
72
|
-
unrenderTimer = setTimeout(() => {
|
|
73
|
-
shouldRender.value = false;
|
|
74
|
-
context.emit("isRender", false);
|
|
75
|
-
}, props.unrenderDelay);
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
rootMargin: "600px",
|
|
80
|
-
},
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
if (props.renderOnIdle) {
|
|
84
|
-
onIdle(() => {
|
|
85
|
-
shouldRender.value = true;
|
|
86
|
-
context.emit("isRender", true);
|
|
87
|
-
if (!props.unrender) {
|
|
88
|
-
pause();
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
watch(
|
|
93
|
-
() => props.unrender,
|
|
94
|
-
(newValue) => {
|
|
95
|
-
if (newValue) {
|
|
96
|
-
clearTimeout(renderTimer);
|
|
97
|
-
unrenderTimer = setTimeout(() => {
|
|
98
|
-
shouldRender.value = false;
|
|
99
|
-
context.emit("isRender", false);
|
|
100
|
-
resume();
|
|
101
|
-
}, props.unrenderDelay);
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
return { targetEl, shouldRender };
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
105
|
</script>
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<ul class="octopus-nav" :class="light ? 'light' : ''">
|
|
3
3
|
<li
|
|
4
4
|
v-for="index in tabNumber"
|
|
5
|
-
v-show="
|
|
5
|
+
v-show="$slots[index - 1]"
|
|
6
6
|
:key="index - 1"
|
|
7
7
|
class="octopus-nav-item"
|
|
8
8
|
>
|
|
9
9
|
<button
|
|
10
10
|
class="octopus-nav-link"
|
|
11
11
|
:class="activeTab === index - 1 ? 'active' : ''"
|
|
12
|
-
@click="
|
|
12
|
+
@click="emit('update:activeTab', index - 1)"
|
|
13
13
|
>
|
|
14
14
|
<slot :name="index - 1" />
|
|
15
15
|
</button>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
>
|
|
25
25
|
<div
|
|
26
26
|
v-for="index in tabNumber"
|
|
27
|
-
v-show="
|
|
27
|
+
v-show="$slots['tab' + (index - 1)]"
|
|
28
28
|
:key="index - 1"
|
|
29
29
|
class="octopus-tab-pane"
|
|
30
30
|
:class="activeTab === index - 1 ? 'active' : ''"
|
|
@@ -34,23 +34,19 @@
|
|
|
34
34
|
</div>
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
|
-
<script lang="ts">
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return !!this.$slots[name];
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
});
|
|
37
|
+
<script setup lang="ts">
|
|
38
|
+
|
|
39
|
+
//Props
|
|
40
|
+
defineProps({
|
|
41
|
+
tabNumber: { default: 0, type: Number },
|
|
42
|
+
activeTab: { default: 0, type: Number },
|
|
43
|
+
transparent: { default: false, type: Boolean },
|
|
44
|
+
light: { default: false, type: Boolean },
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
//Emits
|
|
48
|
+
const emit = defineEmits(["update:activeTab"]);
|
|
49
|
+
|
|
54
50
|
</script>
|
|
55
51
|
|
|
56
52
|
<style lang="scss">
|