@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
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:title="displayLabel ? '' : label"
|
|
10
10
|
:data-selenium="selenium"
|
|
11
11
|
:tabindex="isSwitch ? '-1' : '0'"
|
|
12
|
-
@input="
|
|
12
|
+
@input="emit('update:textInit', !textInit)"
|
|
13
13
|
@click="emitClickAction"
|
|
14
14
|
/>
|
|
15
15
|
<button
|
|
@@ -29,39 +29,35 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
|
-
<script lang="ts">
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<script setup lang="ts">
|
|
33
|
+
//Props
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
idCheckbox: { default: "", type: String },
|
|
36
|
+
label: { default: "", type: String },
|
|
37
|
+
isDisabled: { default: false, type: Boolean },
|
|
38
|
+
textInit: { default: false, type: Boolean },
|
|
39
|
+
isSwitch: { default: false, type: Boolean },
|
|
40
|
+
displayLabel: { default: true, type: Boolean },
|
|
41
|
+
classLabel: { default: "", type: String },
|
|
42
|
+
selenium: { default: "", type: String },
|
|
43
|
+
})
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
this.$emit("clickAction");
|
|
51
|
-
},
|
|
52
|
-
clickSlider() {
|
|
53
|
-
if (!this.isDisabled) {
|
|
54
|
-
this.$emit("update:textInit", !this.textInit);
|
|
55
|
-
this.emitClickAction();
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
});
|
|
45
|
+
//Emits
|
|
46
|
+
const emit = defineEmits(["update:textInit", "clickAction"]);
|
|
47
|
+
|
|
48
|
+
//Methods
|
|
49
|
+
function emitClickAction(): void {
|
|
50
|
+
emit("clickAction");
|
|
51
|
+
}
|
|
52
|
+
function clickSlider() {
|
|
53
|
+
if (!props.isDisabled) {
|
|
54
|
+
emit("update:textInit", !props.textInit);
|
|
55
|
+
emitClickAction();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
60
58
|
</script>
|
|
61
59
|
|
|
62
60
|
<style lang="scss">
|
|
63
|
-
|
|
64
|
-
|
|
65
61
|
.octopus-app {
|
|
66
62
|
.octopus-form-switch {
|
|
67
63
|
position: relative;
|
|
@@ -10,40 +10,44 @@
|
|
|
10
10
|
/>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
updateContent(
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
emitUpdate() {
|
|
38
|
-
if (null !== (this.$refs.element as HTMLElement)) {
|
|
39
|
-
this.$emit(
|
|
40
|
-
"update:modelValue",
|
|
41
|
-
(this.$refs.element as HTMLElement).innerText,
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
},
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { onMounted, useTemplateRef, watch } from 'vue';
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
//Props
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
tag: { default: "span", type: String },
|
|
20
|
+
modelValue: { default: "", type: String },
|
|
21
|
+
placeholder: { default: "", type: String },
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
//Emits
|
|
25
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
26
|
+
|
|
27
|
+
//Data
|
|
28
|
+
const elementRef = useTemplateRef('element');
|
|
29
|
+
|
|
30
|
+
//Watch
|
|
31
|
+
watch(()=>props.modelValue, () => {
|
|
32
|
+
const element = elementRef?.value as HTMLElement;
|
|
33
|
+
if (element.innerText !== props.modelValue) {
|
|
34
|
+
updateContent(props.modelValue);
|
|
35
|
+
}
|
|
46
36
|
});
|
|
37
|
+
|
|
38
|
+
onMounted(()=>updateContent(props.modelValue))
|
|
39
|
+
|
|
40
|
+
//Methods
|
|
41
|
+
function updateContent(newcontent: string) {
|
|
42
|
+
const element = elementRef?.value as HTMLElement;
|
|
43
|
+
element.innerText = newcontent;
|
|
44
|
+
}
|
|
45
|
+
function emitUpdate() {
|
|
46
|
+
const element = elementRef?.value as HTMLElement;
|
|
47
|
+
if (null !== element) {
|
|
48
|
+
emit( "update:modelValue",element.innerText);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
47
51
|
</script>
|
|
48
52
|
<style lang="scss">
|
|
49
53
|
|
|
@@ -14,52 +14,48 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
|
-
<script lang="ts">
|
|
17
|
+
<script setup lang="ts">
|
|
18
18
|
import SnackBar from "../misc/SnackBar.vue";
|
|
19
19
|
import displayHelper from "../../helper/displayHelper";
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
name: "ClassicCopyButton",
|
|
20
|
+
import { computed, ref, useTemplateRef } from "vue";
|
|
21
|
+
import { useI18n } from "vue-i18n";
|
|
23
22
|
|
|
24
|
-
components: {
|
|
25
|
-
SnackBar,
|
|
26
|
-
},
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
}
|
|
24
|
+
//Props
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
text: { default: undefined, type: String },
|
|
27
|
+
textAfterCopy: { default: undefined, type: String },
|
|
28
|
+
dataToCopy: { default: undefined, type: String },
|
|
29
|
+
snackbarText: { default: undefined, type: String },
|
|
30
|
+
classBtn: { default: "btn btn-primary w-fit-content my-3", type: String },
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
//Data
|
|
34
|
+
const hasBeenCopied = ref(false);
|
|
35
|
+
const lazyLoadingSnackbar = ref(false);
|
|
36
|
+
const snackBarRef = useTemplateRef('snackbar');
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
//Composables
|
|
40
|
+
const { t } = useI18n();
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
//Computed
|
|
44
|
+
const textDisplayed = computed(() => hasBeenCopied.value ? props.textAfterCopy : props.text);
|
|
45
|
+
|
|
46
|
+
//Methods
|
|
47
|
+
function onCopyCode(callback: () => void){
|
|
48
|
+
displayHelper.onCopyCode(props.dataToCopy??"", callback);
|
|
49
|
+
}
|
|
50
|
+
function afterCopy(): void {
|
|
51
|
+
hasBeenCopied.value = true;
|
|
52
|
+
if (!lazyLoadingSnackbar.value) {
|
|
53
|
+
lazyLoadingSnackbar.value = true;
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
afterCopy();
|
|
56
|
+
}, 500);
|
|
57
|
+
} else {
|
|
58
|
+
(snackBarRef?.value as InstanceType<typeof SnackBar>).open(props.snackbarText ?? t("Data in clipboard"));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
65
61
|
</script>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:text-input="true"
|
|
16
16
|
:readonly="readonly"
|
|
17
17
|
:teleport="useTeleport"
|
|
18
|
-
:locale="
|
|
18
|
+
:locale="locale"
|
|
19
19
|
:format="format"
|
|
20
20
|
:auto-apply="true"
|
|
21
21
|
:enable-seconds="displaySeconds"
|
|
@@ -38,128 +38,128 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
|
-
<script lang="ts">
|
|
41
|
+
<script setup lang="ts">
|
|
42
42
|
import ClockOutlineIcon from "vue-material-design-icons/ClockOutline.vue";
|
|
43
43
|
import dayjs from "dayjs";
|
|
44
44
|
import VueDatePicker from "@vuepic/vue-datepicker";
|
|
45
|
-
import {
|
|
46
|
-
|
|
47
|
-
components: {
|
|
48
|
-
VueDatePicker,
|
|
49
|
-
ClockOutlineIcon,
|
|
50
|
-
},
|
|
51
|
-
props: {
|
|
52
|
-
id:{ default: undefined, type: String },
|
|
53
|
-
time: {
|
|
54
|
-
default: undefined,
|
|
55
|
-
type: Object as () => { hours: number; minutes: number; seconds: number },
|
|
56
|
-
},
|
|
57
|
-
date: { default: undefined, type: Date },
|
|
58
|
-
range: { default: undefined, type: Array as () => Array<Date> },
|
|
59
|
-
isMaxDate: { default: false, type: Boolean },
|
|
60
|
-
dateLimit: { default: undefined, type: Date },
|
|
61
|
-
isMinDate: { default: false, type: Boolean },
|
|
62
|
-
columnNumber: { default: 1, type: Number },
|
|
63
|
-
displaySeconds: { default: false, type: Boolean },
|
|
64
|
-
displayTimePicker: { default: true, type: Boolean },
|
|
65
|
-
isTimePicker: { default: false, type: Boolean },
|
|
66
|
-
useTeleport: { default: false, type: Boolean },
|
|
67
|
-
templateClass: { default: undefined, type: String },
|
|
68
|
-
readonly: { default: false, type: Boolean },
|
|
69
|
-
maxTime: {
|
|
70
|
-
default: null,
|
|
71
|
-
type: Object as () => {
|
|
72
|
-
hours?: number | string;
|
|
73
|
-
minutes?: number | string;
|
|
74
|
-
seconds?: number | string;
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
forceFormat: { default: undefined, type: String },
|
|
78
|
-
monthPicker: { default: false, type: Boolean },
|
|
79
|
-
customPosition: { default: null, type: Function },
|
|
80
|
-
isInline: { default: false, type: Boolean },
|
|
81
|
-
timePickerInline: { default: false, type: Boolean },
|
|
82
|
-
label: { default: undefined, type: String },
|
|
83
|
-
displayLabel: { default: false, type: Boolean },
|
|
84
|
-
},
|
|
45
|
+
import { computed, useTemplateRef } from "vue";
|
|
46
|
+
import { useI18n } from "vue-i18n";
|
|
85
47
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
48
|
+
//Props
|
|
49
|
+
const props = defineProps({
|
|
50
|
+
id:{ default: undefined, type: String },
|
|
51
|
+
time: {
|
|
52
|
+
default: undefined,
|
|
53
|
+
type: Object as () => { hours: number; minutes: number; seconds: number },
|
|
89
54
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
month: this.date.getMonth(),
|
|
109
|
-
year: this.date.getFullYear(),
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
return this.date;
|
|
113
|
-
},
|
|
114
|
-
formatLocale() {
|
|
115
|
-
return this.$i18n.locale;
|
|
116
|
-
},
|
|
117
|
-
format() {
|
|
118
|
-
if (this.forceFormat) {
|
|
119
|
-
return this.forceFormat;
|
|
120
|
-
}
|
|
121
|
-
if (this.monthPicker) {
|
|
122
|
-
return "MM/yyyy";
|
|
123
|
-
}
|
|
124
|
-
let timeString = "";
|
|
125
|
-
if (this.displayTimePicker || this.isTimePicker) {
|
|
126
|
-
timeString = "HH:mm";
|
|
127
|
-
if (this.displaySeconds) {
|
|
128
|
-
timeString = "HH:mm:ss";
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const dayString = this.isTimePicker
|
|
132
|
-
? timeString
|
|
133
|
-
: "dd/MM/yyyy " + timeString;
|
|
134
|
-
return this.range ? dayString + " - " + dayString : dayString;
|
|
135
|
-
},
|
|
136
|
-
now(): Date {
|
|
137
|
-
if (this.dateLimit) {
|
|
138
|
-
return this.dateLimit;
|
|
139
|
-
}
|
|
140
|
-
return dayjs().toDate();
|
|
55
|
+
date: { default: undefined, type: Date },
|
|
56
|
+
range: { default: undefined, type: Array as () => Array<Date> },
|
|
57
|
+
isMaxDate: { default: false, type: Boolean },
|
|
58
|
+
dateLimit: { default: undefined, type: Date },
|
|
59
|
+
isMinDate: { default: false, type: Boolean },
|
|
60
|
+
columnNumber: { default: 1, type: Number },
|
|
61
|
+
displaySeconds: { default: false, type: Boolean },
|
|
62
|
+
displayTimePicker: { default: true, type: Boolean },
|
|
63
|
+
isTimePicker: { default: false, type: Boolean },
|
|
64
|
+
useTeleport: { default: false, type: Boolean },
|
|
65
|
+
templateClass: { default: undefined, type: String },
|
|
66
|
+
readonly: { default: false, type: Boolean },
|
|
67
|
+
maxTime: {
|
|
68
|
+
default: null,
|
|
69
|
+
type: Object as () => {
|
|
70
|
+
hours?: number | string;
|
|
71
|
+
minutes?: number | string;
|
|
72
|
+
seconds?: number | string;
|
|
141
73
|
},
|
|
142
74
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
75
|
+
forceFormat: { default: undefined, type: String },
|
|
76
|
+
monthPicker: { default: false, type: Boolean },
|
|
77
|
+
customPosition: { default: null, type: Function },
|
|
78
|
+
isInline: { default: false, type: Boolean },
|
|
79
|
+
timePickerInline: { default: false, type: Boolean },
|
|
80
|
+
label: { default: undefined, type: String },
|
|
81
|
+
displayLabel: { default: false, type: Boolean },
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
//Emits
|
|
85
|
+
const emit = defineEmits(["updateDate", "update:date"]);
|
|
86
|
+
|
|
87
|
+
//Data
|
|
88
|
+
const divContainerRef = useTemplateRef('divContainer');
|
|
89
|
+
|
|
90
|
+
//Composables
|
|
91
|
+
const {locale} = useI18n();
|
|
92
|
+
|
|
93
|
+
//Computed
|
|
94
|
+
const ariaLabels = computed(() => {
|
|
95
|
+
return {
|
|
96
|
+
input: props.date ? formatDate(props.date) : undefined,
|
|
97
|
+
day: (value: { value: Date }) => {
|
|
98
|
+
return formatDate(value.value);
|
|
160
99
|
},
|
|
161
|
-
}
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
const modelVal = computed(() => {
|
|
103
|
+
if (props.time) {
|
|
104
|
+
return props.time;
|
|
105
|
+
}
|
|
106
|
+
if (props.range) {
|
|
107
|
+
return props.range;
|
|
108
|
+
}
|
|
109
|
+
if (props.date && props.monthPicker) {
|
|
110
|
+
return {
|
|
111
|
+
month: props.date.getMonth(),
|
|
112
|
+
year: props.date.getFullYear(),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return props.date;
|
|
116
|
+
});
|
|
117
|
+
const format = computed(() => {
|
|
118
|
+
if (props.forceFormat) {
|
|
119
|
+
return props.forceFormat;
|
|
120
|
+
}
|
|
121
|
+
if (props.monthPicker) {
|
|
122
|
+
return "MM/yyyy";
|
|
123
|
+
}
|
|
124
|
+
let timeString = "";
|
|
125
|
+
if (props.displayTimePicker || props.isTimePicker) {
|
|
126
|
+
timeString = "HH:mm";
|
|
127
|
+
if (props.displaySeconds) {
|
|
128
|
+
timeString = "HH:mm:ss";
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const dayString = props.isTimePicker
|
|
132
|
+
? timeString
|
|
133
|
+
: "dd/MM/yyyy " + timeString;
|
|
134
|
+
return props.range ? dayString + " - " + dayString : dayString;
|
|
135
|
+
});
|
|
136
|
+
const now = computed(() => {
|
|
137
|
+
if (props.dateLimit) {
|
|
138
|
+
return props.dateLimit;
|
|
139
|
+
}
|
|
140
|
+
return dayjs().toDate();
|
|
162
141
|
});
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
//Methods
|
|
145
|
+
function updateValue(date: Date) {
|
|
146
|
+
if (!props.isInline) {
|
|
147
|
+
(divContainerRef?.value as HTMLElement)?.focus();
|
|
148
|
+
}
|
|
149
|
+
emit("updateDate", date);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function formatDate(value: Date): string {
|
|
153
|
+
const realMonth = value.getMonth() + 1;
|
|
154
|
+
return (
|
|
155
|
+
value.getDate() +
|
|
156
|
+
"/" +
|
|
157
|
+
(realMonth < 10 ? "0" : "") +
|
|
158
|
+
realMonth +
|
|
159
|
+
"/" +
|
|
160
|
+
value.getFullYear()
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
163
|
</script>
|
|
164
164
|
<style lang="scss">
|
|
165
165
|
@use "@vuepic/vue-datepicker/dist/main.css";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:id="'emoji-picker-dropdown'+id"
|
|
5
5
|
ref="emojiButton"
|
|
6
6
|
class="btn btn-transparent d-flex align-items-center justify-content-center"
|
|
7
|
-
:title="
|
|
7
|
+
:title="t('Pick your emoji')"
|
|
8
8
|
>
|
|
9
9
|
<EmoticonExcitedOutlineIcon :size="34" />
|
|
10
10
|
</button>
|
|
@@ -19,46 +19,38 @@
|
|
|
19
19
|
>
|
|
20
20
|
<Picker
|
|
21
21
|
:data="emojiIndex"
|
|
22
|
-
:title="
|
|
22
|
+
:title="t('Pick your emoji')"
|
|
23
23
|
emoji="point_up"
|
|
24
|
-
@select="
|
|
24
|
+
@select="emit('emojiSelected', $event.native)"
|
|
25
25
|
/>
|
|
26
26
|
</ClassicPopover>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
|
-
<script lang="ts">
|
|
30
|
+
<script setup lang="ts">
|
|
31
31
|
import {useResizePhone} from "../composable/useResizePhone";
|
|
32
32
|
import EmoticonExcitedOutlineIcon from "vue-material-design-icons/EmoticonExcitedOutline.vue";
|
|
33
33
|
import ClassicPopover from "../misc/ClassicPopover.vue";
|
|
34
34
|
import data from "emoji-mart-vue-fast/data/all.json";
|
|
35
35
|
import "emoji-mart-vue-fast/css/emoji-mart.css";
|
|
36
36
|
import { Picker, EmojiIndex } from "emoji-mart-vue-fast/src";
|
|
37
|
+
import { useI18n } from "vue-i18n";
|
|
38
|
+
|
|
39
|
+
//Props
|
|
40
|
+
defineProps({
|
|
41
|
+
popoverRelativeClass: { default: undefined, type: String },
|
|
42
|
+
isTopPosition: { default: false, type: Boolean },
|
|
43
|
+
id: { default: "", type: String },
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
//Emits
|
|
47
|
+
const emit = defineEmits(["emojiSelected"]);
|
|
48
|
+
|
|
49
|
+
//Data
|
|
37
50
|
const emojiIndex = new EmojiIndex(data);
|
|
38
|
-
import { defineComponent } from "vue";
|
|
39
|
-
export default defineComponent({
|
|
40
|
-
name: "ClassicEmojiPicker",
|
|
41
|
-
components: {
|
|
42
|
-
Picker,
|
|
43
|
-
ClassicPopover,
|
|
44
|
-
EmoticonExcitedOutlineIcon,
|
|
45
|
-
},
|
|
46
|
-
props: {
|
|
47
|
-
popoverRelativeClass: { default: undefined, type: String },
|
|
48
|
-
isTopPosition: { default: false, type: Boolean },
|
|
49
|
-
id: { default: "", type: String },
|
|
50
|
-
},
|
|
51
|
-
emits: ["emojiSelected"],
|
|
52
|
-
setup(){
|
|
53
|
-
const { isPhone } = useResizePhone();
|
|
54
|
-
return { isPhone }
|
|
55
|
-
},
|
|
56
51
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
});
|
|
52
|
+
//Composables
|
|
53
|
+
const { t } = useI18n();
|
|
54
|
+
const { isPhone } = useResizePhone();
|
|
63
55
|
</script>
|
|
64
56
|
|