@saooti/octopus-sdk 40.0.3 → 40.1.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 +31 -31
- package/package.json +1 -1
- package/plateform.conf +1 -1
- package/src/App.vue +9 -3
- package/src/api/classicApi.ts +1 -1
- package/src/components/composable/player/usePlayerDisplayTime.ts +33 -0
- package/src/components/composable/player/usePlayerLive.ts +150 -0
- package/src/components/composable/player/usePlayerLogic.ts +265 -0
- package/src/components/composable/player/usePlayerLogicProgress.ts +135 -0
- package/src/components/composable/player/usePlayerStitching.ts +213 -0
- package/src/components/composable/player/usePlayerTranscript.ts +120 -0
- package/src/components/composable/player/usePlayerVast.ts +207 -0
- package/src/components/composable/podcasts/useCountdown.ts +53 -0
- package/src/components/composable/podcasts/usePodcastView.ts +85 -0
- package/src/components/composable/radio/usefetchRadioData.ts +75 -0
- package/src/components/composable/route/useAdvancedParamInit.ts +165 -0
- package/src/components/composable/route/useRouteUpdateParams.ts +48 -0
- package/src/components/composable/route/useRubriquesFilterComputed.ts +24 -0
- package/src/components/composable/route/useRubriquesFilterParam.ts +32 -0
- package/src/components/composable/route/useSeoTitleUrl.ts +30 -0
- package/src/components/composable/route/useSimplePageParam.ts +50 -0
- package/src/components/composable/useErrorHandler.ts +25 -0
- package/src/components/composable/useImageProxy.ts +28 -0
- package/src/components/composable/useInit.ts +38 -0
- package/src/components/composable/useMetaTitle.ts +19 -0
- package/src/components/composable/useMetaTitleWatch.ts +14 -0
- package/src/components/composable/useOrgaComputed.ts +23 -0
- package/src/components/composable/useOrganisationFilter.ts +65 -0
- package/src/components/composable/useResizePhone.ts +27 -0
- package/src/components/composable/useSelenium.ts +10 -0
- package/src/components/composable/useTagOf.ts +21 -0
- package/src/components/display/accessibility/AccessibilityModal.vue +136 -0
- package/src/components/display/aggregator/RssSection.vue +1 -4
- package/src/components/display/categories/CategoryChooser.vue +1 -1
- package/src/components/display/categories/CategoryFilter.vue +7 -3
- package/src/components/display/categories/CategoryList.vue +5 -2
- package/src/components/display/comments/CommentInput.vue +0 -3
- package/src/components/display/comments/CommentList.vue +6 -2
- package/src/components/display/comments/CommentPlayer.vue +5 -2
- package/src/components/display/comments/CommentSection.vue +0 -2
- package/src/components/display/comments/item/CommentBasicView.vue +4 -4
- package/src/components/display/comments/item/CommentItem.vue +0 -4
- package/src/components/display/comments/item/CommentMoreActions.vue +6 -2
- package/src/components/display/emission/EmissionInlineList.vue +6 -6
- package/src/components/display/emission/EmissionItem.vue +13 -6
- package/src/components/display/emission/EmissionList.vue +5 -2
- package/src/components/display/emission/EmissionPlayerItem.vue +8 -5
- package/src/components/display/emission/EmissionPresentationItem.vue +16 -7
- package/src/components/display/emission/EmissionPresentationList.vue +10 -7
- package/src/components/display/filter/AdvancedSearch.vue +9 -6
- package/src/components/display/filter/CategorySearchFilter.vue +0 -2
- package/src/components/display/filter/ProductorSearch.vue +8 -3
- package/src/components/display/filter/RubriqueFilter.vue +6 -2
- package/src/components/display/list/ListPaginate.vue +9 -6
- package/src/components/display/list/SwiperList.vue +6 -5
- package/src/components/display/live/CountDown.vue +7 -15
- package/src/components/display/live/CountdownOctopus.vue +10 -30
- package/src/components/display/live/LiveItem.vue +0 -2
- package/src/components/display/live/LiveList.vue +9 -4
- package/src/components/display/live/RadioCurrently.vue +9 -5
- package/src/components/display/live/RadioImage.vue +6 -4
- package/src/components/display/live/RadioItem.vue +1 -2
- package/src/components/display/live/RadioList.vue +5 -3
- package/src/components/display/live/RadioPlanning.vue +10 -7
- package/src/components/display/organisation/OrganisationChooser.vue +8 -4
- package/src/components/display/participant/ParticipantInlineList.vue +5 -5
- package/src/components/display/participant/ParticipantItem.vue +13 -5
- package/src/components/display/participant/ParticipantList.vue +6 -3
- package/src/components/display/playlist/PlaylistItem.vue +12 -5
- package/src/components/display/playlist/PlaylistList.vue +6 -3
- package/src/components/display/playlist/PodcastList.vue +8 -4
- package/src/components/display/podcastmaker/PodcastmakerHeader.vue +6 -3
- package/src/components/display/podcasts/DownloadPodcastButton.vue +2 -4
- package/src/components/display/podcasts/PodcastImage.vue +6 -3
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +7 -4
- package/src/components/display/podcasts/PodcastItem.vue +1 -1
- package/src/components/display/podcasts/PodcastItemInfo.vue +6 -3
- package/src/components/display/podcasts/PodcastList.vue +6 -3
- package/src/components/display/podcasts/PodcastModuleBox.vue +22 -9
- package/src/components/display/podcasts/PodcastPlayBar.vue +1 -3
- package/src/components/display/podcasts/PodcastPlayButton.vue +1 -3
- package/src/components/display/podcasts/PodcastRawTranscript.vue +79 -10
- package/src/components/display/podcasts/PodcastRubriqueList.vue +4 -3
- package/src/components/display/podcasts/TagList.vue +5 -2
- package/src/components/display/podcasts/VideoModuleBox.vue +6 -3
- package/src/components/display/rubriques/RubriqueChooser.vue +0 -2
- package/src/components/display/rubriques/RubriqueList.vue +7 -5
- package/src/components/display/sharing/ShareButtons.vue +4 -2
- package/src/components/display/sharing/ShareDistribution.vue +4 -2
- package/src/components/form/ClassicEmojiPicker.vue +5 -3
- package/src/components/misc/ClassicLazy.vue +2 -2
- package/src/components/misc/FooterGarSection.vue +2 -3
- package/src/components/misc/FooterSection.vue +9 -5
- package/src/components/misc/MobileMenu.vue +5 -3
- package/src/components/misc/TopBar.vue +8 -6
- package/src/components/misc/TopBarMainContent.vue +8 -4
- package/src/components/misc/modal/ClassicModalInBody.vue +2 -3
- package/src/components/misc/modal/ClipboardModal.vue +4 -3
- package/src/components/misc/modal/NewsletterModal.vue +4 -3
- package/src/components/misc/modal/ShareModalPlayer.vue +4 -2
- package/src/components/misc/player/PlayerCompact.vue +30 -41
- package/src/components/misc/player/PlayerComponent.vue +69 -84
- package/src/components/misc/player/PlayerLarge.vue +43 -58
- package/src/components/misc/player/elements/PlayerImage.vue +6 -3
- package/src/components/misc/player/elements/PlayerTitle.vue +6 -2
- package/src/components/misc/player/radio/RadioHistory.vue +2 -4
- package/src/components/misc/player/video/PlayerVideoHls.vue +6 -7
- package/src/components/pages/EmissionPage.vue +19 -7
- package/src/components/pages/EmissionsPage.vue +31 -23
- package/src/components/pages/HomePage.vue +5 -2
- package/src/components/pages/PageLogout.vue +0 -2
- package/src/components/pages/PageNotFound.vue +11 -15
- package/src/components/pages/ParticipantPage.vue +18 -7
- package/src/components/pages/ParticipantsPage.vue +16 -21
- package/src/components/pages/PlaylistPage.vue +18 -7
- package/src/components/pages/PlaylistsPage.vue +20 -29
- package/src/components/pages/PodcastPage.vue +12 -6
- package/src/components/pages/PodcastsPage.vue +46 -48
- package/src/components/pages/RadioPage.vue +9 -6
- package/src/components/pages/RubriquePage.vue +41 -52
- package/src/components/pages/VideoPage.vue +152 -166
- package/src/helper/cookiesHelper.ts +20 -0
- package/src/helper/displayHelper.ts +15 -0
- package/src/helper/downloadHelper.ts +30 -0
- package/src/helper/{fetch.ts → fetchHelper.ts} +0 -1
- package/src/helper/loadScript.ts +22 -0
- package/src/helper/radio/radioHelper.ts +15 -0
- package/src/helper/{string.ts → stringHelper.ts} +5 -0
- package/src/locale/de.ts +4 -0
- package/src/locale/en.ts +4 -0
- package/src/locale/es.ts +4 -0
- package/src/locale/fr.ts +4 -0
- package/src/locale/it.ts +4 -0
- package/src/locale/sl.ts +4 -0
- package/src/stores/AuthStore.ts +1 -2
- package/src/stores/CommentStore.ts +8 -8
- package/src/stores/PlayerStore.ts +1 -1
- package/src/style/general.scss +15 -1
- package/src/components/mixins/cookies.ts +0 -22
- package/src/components/mixins/displayMethods.ts +0 -17
- package/src/components/mixins/download.ts +0 -33
- package/src/components/mixins/fetchParameters.ts +0 -16
- package/src/components/mixins/handle403.ts +0 -22
- package/src/components/mixins/imageProxy.ts +0 -28
- package/src/components/mixins/init.ts +0 -34
- package/src/components/mixins/loadScript.ts +0 -25
- package/src/components/mixins/metaTitle.ts +0 -15
- package/src/components/mixins/metaTitleWatch.ts +0 -26
- package/src/components/mixins/orgaComputed.ts +0 -23
- package/src/components/mixins/organisationFilter.ts +0 -56
- package/src/components/mixins/player/playerDisplayTime.ts +0 -35
- package/src/components/mixins/player/playerLive.ts +0 -144
- package/src/components/mixins/player/playerLogic.ts +0 -275
- package/src/components/mixins/player/playerLogicProgress.ts +0 -135
- package/src/components/mixins/player/playerStitching.ts +0 -202
- package/src/components/mixins/player/playerTranscript.ts +0 -113
- package/src/components/mixins/player/playerVast.ts +0 -198
- package/src/components/mixins/podcast/countdown.ts +0 -45
- package/src/components/mixins/podcast/podcastView.ts +0 -63
- package/src/components/mixins/radio/fetchRadioData.ts +0 -77
- package/src/components/mixins/resizePhone.ts +0 -26
- package/src/components/mixins/routeParam/advancedParamInit.ts +0 -202
- package/src/components/mixins/routeParam/paginateParamInit.ts +0 -43
- package/src/components/mixins/routeParam/routeParams.ts +0 -33
- package/src/components/mixins/routeParam/rubriquesFilterComputed.ts +0 -22
- package/src/components/mixins/routeParam/rubriquesFilterParam.ts +0 -29
- package/src/components/mixins/selenium.ts +0 -7
- package/src/components/mixins/seoTitleUrl.ts +0 -26
- package/src/components/mixins/tagOfMixins.ts +0 -19
- package/src/helper/uuidGenerator.ts +0 -7
- /package/src/{helper → components/composable}/useEventListener.ts +0 -0
- /package/src/{components/mixins/debounce.ts → helper/debounceHelper.ts} +0 -0
- /package/src/helper/{dom.ts → domHelper.ts} +0 -0
- /package/src/helper/{duration.ts → durationHelper.ts} +0 -0
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { useFilterStore } from "../../../stores/FilterStore";
|
|
2
|
-
import { orgaComputed } from "../orgaComputed";
|
|
3
|
-
import { paginateParamInit } from "./paginateParamInit";
|
|
4
|
-
import { rubriquesFilterParam } from "./rubriquesFilterParam";
|
|
5
|
-
import { defineComponent } from 'vue';
|
|
6
|
-
import { mapState } from "pinia";
|
|
7
|
-
import { RubriquageFilter } from "../../../stores/class/rubrique/rubriquageFilter";
|
|
8
|
-
import dayjs from "dayjs";
|
|
9
|
-
import { useAuthStore } from "../../../stores/AuthStore";
|
|
10
|
-
export const advancedParamInit = defineComponent({
|
|
11
|
-
mixins: [orgaComputed, paginateParamInit, rubriquesFilterParam],
|
|
12
|
-
props: {
|
|
13
|
-
productor: { default: undefined, type: String },
|
|
14
|
-
routeQuery: { default: "", type: String },
|
|
15
|
-
routeMonetisable: { default: "UNDEFINED", type: String },
|
|
16
|
-
routeIab: { default: undefined, type: Number },
|
|
17
|
-
routeSort: { default: "DATE", type: String },
|
|
18
|
-
routeIncludeHidden: { default: "", type: String },
|
|
19
|
-
routeFrom: { default: undefined, type: String },
|
|
20
|
-
routeTo: { default: undefined, type: String },
|
|
21
|
-
routeOrga: { default: undefined, type: String },
|
|
22
|
-
routeRubriques: { default: "", type: String },
|
|
23
|
-
routeValidity: { default: "", type: String },
|
|
24
|
-
},
|
|
25
|
-
data() {
|
|
26
|
-
return {
|
|
27
|
-
isInit: false as boolean,
|
|
28
|
-
searchPattern: "" as string,
|
|
29
|
-
organisationId: undefined as string | undefined,
|
|
30
|
-
monetisable: "UNDEFINED" as string, // UNDEFINED, YES, NO
|
|
31
|
-
fromDate: undefined as string | undefined,
|
|
32
|
-
toDate: undefined as string | undefined,
|
|
33
|
-
includeHidden: false as boolean,
|
|
34
|
-
sort: "DATE" as string, // SCORE, DATE, POPULARITY, NAME, LAST_PODCAST_DESC
|
|
35
|
-
validity: 'true' as string,
|
|
36
|
-
iabId: undefined as number | undefined,
|
|
37
|
-
noRubriquageId: [] as Array<number>,
|
|
38
|
-
rubriquageId: [] as Array<number>,
|
|
39
|
-
rubriqueId: [] as Array<number>,
|
|
40
|
-
isEmission: false as boolean,
|
|
41
|
-
rubriqueFilter:[] as Array<RubriquageFilter>,
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
computed:{
|
|
45
|
-
...mapState(useAuthStore, ["isRoleContribution",]),
|
|
46
|
-
...mapState(useFilterStore, ["filterRubrique", "filterIab"]),
|
|
47
|
-
organisationRight(): boolean {
|
|
48
|
-
return this.isEditRights(this.organisationId);
|
|
49
|
-
},
|
|
50
|
-
organisation(): string | undefined {
|
|
51
|
-
return this.organisationId ? this.organisationId : this.filterOrgaId;
|
|
52
|
-
},
|
|
53
|
-
searchMinSize(): string{
|
|
54
|
-
return this.searchPattern.length>3 ? this.searchPattern : "";
|
|
55
|
-
},
|
|
56
|
-
rubriquesFilterArrayIds(){
|
|
57
|
-
const allRubriquageId: Array<number> = [];
|
|
58
|
-
const noRubriquageId: Array<number> = [];
|
|
59
|
-
const rubriqueId: Array<number> = [];
|
|
60
|
-
for(const filter of this.rubriqueFilter){
|
|
61
|
-
if (-1 === filter.rubriqueId) {
|
|
62
|
-
noRubriquageId.push(filter.rubriquageId);
|
|
63
|
-
} else if (0 === filter.rubriqueId) {
|
|
64
|
-
allRubriquageId.push(filter.rubriquageId);
|
|
65
|
-
} else {
|
|
66
|
-
rubriqueId.push(filter.rubriqueId);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
rubriquageId: allRubriquageId,
|
|
71
|
-
rubriqueId: rubriqueId,
|
|
72
|
-
noRubriquageId: noRubriquageId
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
watch: {
|
|
78
|
-
organisationId(): void {
|
|
79
|
-
if (!this.isInit) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
// TODO si oldValue !=null
|
|
83
|
-
this.rubriqueFilter = [];
|
|
84
|
-
},
|
|
85
|
-
routeQuery(){
|
|
86
|
-
this.initSearchPattern();
|
|
87
|
-
},
|
|
88
|
-
routeMonetisable(){
|
|
89
|
-
this.initMonetisable();
|
|
90
|
-
},
|
|
91
|
-
routeSort(){
|
|
92
|
-
this.initSort();
|
|
93
|
-
},
|
|
94
|
-
routeIncludeHidden(){
|
|
95
|
-
this.initIncludeHidden();
|
|
96
|
-
},
|
|
97
|
-
routeValidity(){
|
|
98
|
-
this.initValidity();
|
|
99
|
-
},
|
|
100
|
-
routeFrom(){
|
|
101
|
-
this.initFromDate();
|
|
102
|
-
},
|
|
103
|
-
routeTo(){
|
|
104
|
-
this.initToDate();
|
|
105
|
-
},
|
|
106
|
-
routeIab(){
|
|
107
|
-
this.iabId = this.routeIab;
|
|
108
|
-
},
|
|
109
|
-
routeOrga(){
|
|
110
|
-
this.initOrga();
|
|
111
|
-
},
|
|
112
|
-
routeRubriques(){
|
|
113
|
-
this.initRubriquageFilter();
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
created() {
|
|
118
|
-
this.initAdvancedParams();
|
|
119
|
-
},
|
|
120
|
-
methods:{
|
|
121
|
-
initAdvancedParams(){
|
|
122
|
-
this.initOrga();
|
|
123
|
-
this.initSearchPattern();
|
|
124
|
-
this.iabId = this.filterIab?.id ?? this.routeIab;
|
|
125
|
-
this.initRubriquageFilter();
|
|
126
|
-
this.initIncludeHidden();
|
|
127
|
-
this.initValidity();
|
|
128
|
-
this.initMonetisable();
|
|
129
|
-
this.initSort();
|
|
130
|
-
this.initFromDate();
|
|
131
|
-
this.initToDate();
|
|
132
|
-
this.$nextTick(() => {
|
|
133
|
-
this.isInit = true;
|
|
134
|
-
});
|
|
135
|
-
},
|
|
136
|
-
initOrga(){
|
|
137
|
-
this.organisationId = this.filterOrgaId ?? this.routeOrga;
|
|
138
|
-
},
|
|
139
|
-
initFromDate(){
|
|
140
|
-
if(dayjs(this.routeFrom).isValid()){
|
|
141
|
-
this.fromDate = this.routeFrom;
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
initToDate(){
|
|
145
|
-
if(dayjs(this.routeTo).isValid()){
|
|
146
|
-
this.toDate = this.routeTo;
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
initSearchPattern(){
|
|
150
|
-
if(this.routeQuery){
|
|
151
|
-
this.searchPattern = this.routeQuery;
|
|
152
|
-
}else{
|
|
153
|
-
this.searchPattern = "";
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
initMonetisable(){
|
|
157
|
-
if(["YES", "NO"].includes(this.routeMonetisable)){
|
|
158
|
-
this.monetisable = this.routeMonetisable;
|
|
159
|
-
}else{
|
|
160
|
-
this.monetisable = "UNDEFINED";
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
initSort(){
|
|
164
|
-
if(["SCORE", "POPULARITY", "NAME", "DATE_ASC"].includes(this.routeSort)){
|
|
165
|
-
this.sort = this.routeSort;
|
|
166
|
-
}else{
|
|
167
|
-
this.sort = this.isEmission ? "LAST_PODCAST_DESC" : "DATE";
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
initIncludeHidden(){
|
|
171
|
-
this.includeHidden = undefined !== this.organisation && this.organisationRight && "false"!==this.routeIncludeHidden;
|
|
172
|
-
},
|
|
173
|
-
initValidity(){
|
|
174
|
-
const cantDisplay = this.isPodcastmaker || this.isEmission || !this.includeHidden || !this.isRoleContribution || !this.organisationRight;
|
|
175
|
-
if(cantDisplay){
|
|
176
|
-
this.validity = "true";
|
|
177
|
-
}else{
|
|
178
|
-
this.validity = this.routeValidity;
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
initRubriquageFilter(){
|
|
182
|
-
if(this.routeRubriques === this.stringifyRubriquesFilter(this.rubriqueFilter)){
|
|
183
|
-
return
|
|
184
|
-
}
|
|
185
|
-
const rubriqueFilterToUpdate = [];
|
|
186
|
-
if(this.routeRubriques.trim().length){
|
|
187
|
-
const arrayFilter = this.routeRubriques.split(",");
|
|
188
|
-
for(const filter of arrayFilter){
|
|
189
|
-
const rubriqueFilter = filter.split(":");
|
|
190
|
-
rubriqueFilterToUpdate.push({
|
|
191
|
-
rubriquageId: parseInt(rubriqueFilter[0]),
|
|
192
|
-
rubriqueId: parseInt(rubriqueFilter[1]),
|
|
193
|
-
nameRubriquage: "",
|
|
194
|
-
nameRubrique: "",
|
|
195
|
-
})
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
this.rubriqueFilter = rubriqueFilterToUpdate;
|
|
199
|
-
},
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { useFilterStore } from '../../../stores/FilterStore';
|
|
2
|
-
import { routeParams } from "../../mixins/routeParam/routeParams";
|
|
3
|
-
import { mapState } from 'pinia';
|
|
4
|
-
import { defineComponent } from 'vue';
|
|
5
|
-
export const paginateParamInit = defineComponent({
|
|
6
|
-
mixins: [ routeParams],
|
|
7
|
-
props: {
|
|
8
|
-
pr: { default: 0, type: Number },
|
|
9
|
-
ps: { default: 30, type: Number },
|
|
10
|
-
routeOrga: { default: undefined, type: String },
|
|
11
|
-
routeQuery: { default: "", type: String },
|
|
12
|
-
},
|
|
13
|
-
data() {
|
|
14
|
-
return {
|
|
15
|
-
organisationId: undefined as string | undefined,
|
|
16
|
-
searchPattern: "" as string,
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
computed:{
|
|
20
|
-
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
21
|
-
paginateFirst(){
|
|
22
|
-
if(!this.pr){
|
|
23
|
-
return 0;
|
|
24
|
-
}
|
|
25
|
-
return Math.max((this.pr - 1 ) * this.ps, 0);
|
|
26
|
-
},
|
|
27
|
-
searchMinSize(): string{
|
|
28
|
-
return this.searchPattern.length>3 ? this.searchPattern : "";
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
watch: {
|
|
32
|
-
searchPattern(value: string): void {
|
|
33
|
-
this.updateRouteParam({
|
|
34
|
-
q: this.searchMinSize.length ? this.searchMinSize : undefined,
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
created() {
|
|
39
|
-
this.organisationId = this.filterOrgaId ?? this.routeOrga;
|
|
40
|
-
this.searchPattern = this.routeQuery ?? "";
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from 'vue';
|
|
2
|
-
export const routeParams = defineComponent({
|
|
3
|
-
methods: {
|
|
4
|
-
checkPage(): boolean{
|
|
5
|
-
return ['podcasts', 'emissions', 'participants', 'playlists', 'productors', 'rubrique'].includes(this.$route.name?.toString()??"");
|
|
6
|
-
},
|
|
7
|
-
checkPageAdvanced(): boolean{
|
|
8
|
-
return ['podcasts', 'emissions'].includes(this.$route.name?.toString()??"");
|
|
9
|
-
},
|
|
10
|
-
updatePaginateSize(ps:number){
|
|
11
|
-
if(this.checkPage()){
|
|
12
|
-
this.$router.push({query: {...this.$route.query, ...{ps:ps, pr:1}}});
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
updateRouteParam(update: {[key:string]: string|undefined}){
|
|
16
|
-
if(this.checkPage()){
|
|
17
|
-
this.$router.push({query: {...this.$route.query, ...update}});
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
updateRouteParamAdvanced(update: {[key:string]: string|undefined}){
|
|
21
|
-
if(this.checkPageAdvanced()){
|
|
22
|
-
this.$router.push({query: {...this.$route.query, ...update}});
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
updateFiltersParam(update: {[key:string]: string|undefined}, advancedUpdate: {[key:string]: string|undefined}){
|
|
26
|
-
if(this.checkPageAdvanced()){
|
|
27
|
-
this.$router.push({query: {...this.$route.query, ...update, ...advancedUpdate}});
|
|
28
|
-
}else{
|
|
29
|
-
this.$router.push({query: {...this.$route.query, ...update}});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
|
|
2
|
-
import { useFilterStore } from "../../../stores/FilterStore";
|
|
3
|
-
import { mapState } from 'pinia';
|
|
4
|
-
import { defineComponent } from 'vue';
|
|
5
|
-
export const rubriquesFilterComputed = defineComponent({
|
|
6
|
-
computed:{
|
|
7
|
-
...mapState(useFilterStore, [
|
|
8
|
-
"filterRubrique",
|
|
9
|
-
]),
|
|
10
|
-
rubriqueQueryParam(): string | undefined {
|
|
11
|
-
if (this.filterRubrique?.length) {
|
|
12
|
-
return this.filterRubrique
|
|
13
|
-
.map(
|
|
14
|
-
(value: RubriquageFilter) =>
|
|
15
|
-
value.rubriquageId + ":" + value.rubriqueId,
|
|
16
|
-
)
|
|
17
|
-
.join();
|
|
18
|
-
}
|
|
19
|
-
return undefined;
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { routeParams } from "./routeParams";
|
|
2
|
-
import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
|
|
3
|
-
import { useFilterStore } from "../../../stores/FilterStore";
|
|
4
|
-
import { mapState } from 'pinia';
|
|
5
|
-
import { defineComponent } from 'vue';
|
|
6
|
-
export const rubriquesFilterParam = defineComponent({
|
|
7
|
-
mixins:[routeParams],
|
|
8
|
-
computed:{
|
|
9
|
-
...mapState(useFilterStore, [
|
|
10
|
-
"filterRubrique",
|
|
11
|
-
]),
|
|
12
|
-
},
|
|
13
|
-
methods: {
|
|
14
|
-
stringifyRubriquesFilter(filter :Array<RubriquageFilter>|undefined): string{
|
|
15
|
-
if(!filter){
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
return filter
|
|
19
|
-
.map((value) => value.rubriquageId + ":" + value.rubriqueId)
|
|
20
|
-
.join();
|
|
21
|
-
},
|
|
22
|
-
modifyRubriquesFilter(modifyFunction: (a: Array<RubriquageFilter>)=> Array<RubriquageFilter>){
|
|
23
|
-
const newFilter = modifyFunction( Array.from(this.filterRubrique));
|
|
24
|
-
const queryString = this.stringifyRubriquesFilter(newFilter);
|
|
25
|
-
const valToUpdate = "" !== queryString ? queryString : undefined;
|
|
26
|
-
this.updateFiltersParam({ rubriquesId: valToUpdate }, {r: valToUpdate});
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { mapState } from 'pinia';
|
|
2
|
-
import { useGeneralStore } from '../../stores/GeneralStore';
|
|
3
|
-
import { defineComponent } from 'vue';
|
|
4
|
-
export const seoTitleUrl = defineComponent({
|
|
5
|
-
computed:{
|
|
6
|
-
...mapState(useGeneralStore, ["metaTitle"]),
|
|
7
|
-
},
|
|
8
|
-
methods: {
|
|
9
|
-
updatePathParams(text: string) {
|
|
10
|
-
const seoText = this.stringUrlEncode(text);
|
|
11
|
-
if(seoText !== this.$route.params.title){
|
|
12
|
-
this.$router.replace({ params: { ...this.$route.params, ...{title:seoText}}, query: this.$route.query});
|
|
13
|
-
}
|
|
14
|
-
document.title = text + " - "+ this.metaTitle;
|
|
15
|
-
},
|
|
16
|
-
stringUrlEncode(text: string): string {
|
|
17
|
-
if(!text.length){
|
|
18
|
-
return "";
|
|
19
|
-
}
|
|
20
|
-
const withoutSpecialChar = text.replaceAll(
|
|
21
|
-
/[!"`'#%&,:;<>=\-_@{}~$.()*+/\\?[\]^|]+/gm, ' ');
|
|
22
|
-
const trimText = withoutSpecialChar.trim();
|
|
23
|
-
return "-"+trimText.replaceAll(/\s+/gm, '-');
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from "vue";
|
|
2
|
-
export default defineComponent({
|
|
3
|
-
name: "TagOfMixins",
|
|
4
|
-
methods: {
|
|
5
|
-
isOuestFranceTag(tag: string): boolean {
|
|
6
|
-
return "[of]" === tag.substring(0, 4);
|
|
7
|
-
},
|
|
8
|
-
formateOfTag(tag: string): string {
|
|
9
|
-
if (!this.isOuestFranceTag(tag)) {
|
|
10
|
-
return tag;
|
|
11
|
-
}
|
|
12
|
-
const lastSlash = tag.lastIndexOf("/");
|
|
13
|
-
if (-1 !== lastSlash) {
|
|
14
|
-
return tag.substring(lastSlash + 1, tag.length);
|
|
15
|
-
}
|
|
16
|
-
return tag.substring(4, tag.length);
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|