@saooti/octopus-sdk 37.0.6 → 37.0.8

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.
Files changed (236) hide show
  1. package/README.md +2 -2
  2. package/index.ts +22 -22
  3. package/package.json +26 -22
  4. package/src/App.vue +69 -60
  5. package/src/api/classicCrud.ts +12 -12
  6. package/src/api/initialize.ts +1 -1
  7. package/src/assets/transition.scss +34 -22
  8. package/src/components/display/aggregator/RssSection.vue +3 -3
  9. package/src/components/display/categories/CategoryChooser.vue +73 -60
  10. package/src/components/display/categories/CategoryFilter.vue +134 -90
  11. package/src/components/display/categories/CategoryList.vue +76 -62
  12. package/src/components/display/comments/AddCommentModal.vue +44 -44
  13. package/src/components/display/comments/CommentBasicView.vue +38 -30
  14. package/src/components/display/comments/CommentInput.vue +121 -106
  15. package/src/components/display/comments/CommentItem.vue +144 -102
  16. package/src/components/display/comments/CommentList.vue +117 -85
  17. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  18. package/src/components/display/comments/CommentPlayer.vue +39 -41
  19. package/src/components/display/comments/CommentSection.vue +68 -53
  20. package/src/components/display/edit/EditBox.vue +7 -7
  21. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  22. package/src/components/display/edit/EditCommentBox.vue +34 -36
  23. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  24. package/src/components/display/emission/EmissionItem.vue +47 -35
  25. package/src/components/display/emission/EmissionList.vue +118 -83
  26. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  27. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  28. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  29. package/src/components/display/filter/DateFilter.vue +38 -38
  30. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  31. package/src/components/display/filter/ProductorSearch.vue +55 -47
  32. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  33. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  34. package/src/components/display/filter/SearchOrder.vue +16 -11
  35. package/src/components/display/list/ListPaginate.vue +72 -70
  36. package/src/components/display/list/PaginateParams.vue +29 -30
  37. package/src/components/display/list/PaginateSection.vue +210 -0
  38. package/src/components/display/list/SwiperList.vue +28 -32
  39. package/src/components/display/live/CountDown.vue +12 -14
  40. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  41. package/src/components/display/live/LiveItem.vue +42 -26
  42. package/src/components/display/live/LiveList.vue +92 -65
  43. package/src/components/display/live/RadioCurrently.vue +47 -42
  44. package/src/components/display/live/RadioImage.vue +40 -42
  45. package/src/components/display/live/RadioItem.vue +15 -22
  46. package/src/components/display/live/RadioList.vue +24 -21
  47. package/src/components/display/live/RadioPlanning.vue +105 -68
  48. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  49. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  50. package/src/components/display/participant/ParticipantItem.vue +89 -77
  51. package/src/components/display/participant/ParticipantList.vue +90 -60
  52. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  53. package/src/components/display/playlist/PlaylistList.vue +70 -52
  54. package/src/components/display/playlist/PodcastList.vue +61 -50
  55. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  56. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  57. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  58. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  59. package/src/components/display/podcasts/PodcastImage.vue +129 -131
  60. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  61. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  62. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  63. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  64. package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
  65. package/src/components/display/podcasts/PodcastList.vue +115 -84
  66. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  67. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  68. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  69. package/src/components/display/podcasts/TagList.vue +33 -37
  70. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  71. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  72. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  73. package/src/components/display/sharing/QrCode.vue +52 -46
  74. package/src/components/display/sharing/ShareButtons.vue +18 -18
  75. package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
  76. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  77. package/src/components/display/sharing/SharePlayer.vue +207 -127
  78. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  79. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  80. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  81. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  82. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  83. package/src/components/form/ClassicCheckbox.vue +32 -31
  84. package/src/components/form/ClassicDatePicker.vue +47 -49
  85. package/src/components/form/ClassicInputText.vue +99 -98
  86. package/src/components/form/ClassicLoading.vue +11 -14
  87. package/src/components/form/ClassicMultiselect.vue +125 -126
  88. package/src/components/form/ClassicRadio.vue +15 -18
  89. package/src/components/form/ClassicSearch.vue +17 -23
  90. package/src/components/form/ClassicSelect.vue +35 -27
  91. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
  92. package/src/components/misc/AcpmImage.vue +6 -6
  93. package/src/components/misc/ClassicAccordion.vue +73 -0
  94. package/src/components/misc/ClassicNav.vue +117 -0
  95. package/src/components/misc/ClassicPopover.vue +212 -0
  96. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  97. package/src/components/misc/ErrorMessage.vue +9 -17
  98. package/src/components/misc/FooterSection.vue +198 -0
  99. package/src/components/misc/HomeDropdown.vue +60 -60
  100. package/src/components/misc/LeftMenu.vue +115 -79
  101. package/src/components/misc/ProgressBar.vue +36 -32
  102. package/src/components/misc/SnackBar.vue +169 -0
  103. package/src/components/misc/TopBar.vue +162 -116
  104. package/src/components/misc/modal/ClassicModal.vue +99 -103
  105. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  106. package/src/components/misc/modal/MessageModal.vue +22 -28
  107. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  108. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  109. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  110. package/src/components/misc/player/PlayerCompact.vue +47 -62
  111. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  112. package/src/components/misc/player/PlayerLarge.vue +62 -61
  113. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  114. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  115. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  116. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  117. package/src/components/mixins/cookies.ts +11 -10
  118. package/src/components/mixins/displayMethods.ts +5 -4
  119. package/src/components/mixins/handle403.ts +9 -9
  120. package/src/components/mixins/imageProxy.ts +14 -7
  121. package/src/components/mixins/init.ts +31 -16
  122. package/src/components/mixins/orgaComputed.ts +7 -7
  123. package/src/components/mixins/organisationFilter.ts +36 -22
  124. package/src/components/mixins/player/playerComment.ts +46 -37
  125. package/src/components/mixins/player/playerDisplay.ts +122 -87
  126. package/src/components/mixins/player/playerLive.ts +65 -43
  127. package/src/components/mixins/player/playerLogic.ts +133 -88
  128. package/src/components/mixins/player/playerTranscript.ts +48 -30
  129. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  130. package/src/components/mixins/selenium.ts +2 -2
  131. package/src/components/mixins/tagOfMixins.ts +11 -11
  132. package/src/components/pages/CategoryPage.vue +43 -0
  133. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  134. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  135. package/src/components/pages/Error403Page.vue +20 -19
  136. package/src/components/pages/HomePage.vue +144 -0
  137. package/src/components/pages/LivesPage.vue +66 -0
  138. package/src/components/pages/PageNotFound.vue +33 -22
  139. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  140. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  141. package/src/components/pages/PlaylistPage.vue +175 -0
  142. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  143. package/src/components/pages/PodcastPage.vue +365 -0
  144. package/src/components/pages/PodcastsPage.vue +152 -0
  145. package/src/components/pages/RadioPage.vue +131 -0
  146. package/src/components/pages/RubriquePage.vue +45 -0
  147. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  148. package/src/helper/dom.ts +1 -1
  149. package/src/helper/duration.ts +10 -4
  150. package/src/helper/useEventListener.ts +7 -8
  151. package/src/i18n.ts +31 -30
  152. package/src/locale/de.ts +272 -257
  153. package/src/locale/educationen.ts +13 -13
  154. package/src/locale/educationfr.ts +1 -1
  155. package/src/locale/en.ts +332 -324
  156. package/src/locale/es.ts +334 -318
  157. package/src/locale/fr.ts +339 -324
  158. package/src/locale/it.ts +341 -328
  159. package/src/locale/messages.ts +9 -9
  160. package/src/locale/sl.ts +324 -319
  161. package/src/main.ts +28 -31
  162. package/src/router/router.ts +218 -198
  163. package/src/shims-tsx.d.ts +1 -1
  164. package/src/shims-vue.d.ts +1 -1
  165. package/src/stores/ApiStore.ts +44 -44
  166. package/src/stores/AuthStore.ts +21 -15
  167. package/src/stores/CommentStore.ts +13 -11
  168. package/src/stores/FilterStore.ts +25 -15
  169. package/src/stores/GeneralStore.ts +15 -15
  170. package/src/stores/ParamSdkStore.ts +179 -137
  171. package/src/stores/PlayerStore.ts +139 -125
  172. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  173. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  174. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  175. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  176. package/src/stores/class/conference/conference.ts +10 -9
  177. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  178. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  179. package/src/stores/class/conference/studioCall.ts +6 -6
  180. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  181. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  182. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  183. package/src/stores/class/general/audioView.ts +19 -19
  184. package/src/stores/class/general/category.ts +1 -1
  185. package/src/stores/class/general/classicSelectType.ts +2 -3
  186. package/src/stores/class/general/customPlayer.ts +8 -8
  187. package/src/stores/class/general/emission.ts +20 -20
  188. package/src/stores/class/general/fetchParam.ts +8 -2
  189. package/src/stores/class/general/initState.ts +31 -31
  190. package/src/stores/class/general/interfacePageable.ts +13 -13
  191. package/src/stores/class/general/ituneCategory.ts +4 -4
  192. package/src/stores/class/general/listReturn.ts +12 -12
  193. package/src/stores/class/general/media.ts +7 -7
  194. package/src/stores/class/general/organisation.ts +9 -9
  195. package/src/stores/class/general/pageable.ts +10 -10
  196. package/src/stores/class/general/participant.ts +7 -7
  197. package/src/stores/class/general/player.ts +30 -28
  198. package/src/stores/class/general/playlist.ts +17 -19
  199. package/src/stores/class/general/podcast.ts +19 -19
  200. package/src/stores/class/general/sortPageable.ts +4 -4
  201. package/src/stores/class/general/soundcastCategory.ts +7 -7
  202. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  203. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  204. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  205. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  206. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  207. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  208. package/src/stores/class/radio/canal.ts +4 -4
  209. package/src/stores/class/radio/live.ts +6 -6
  210. package/src/stores/class/radio/mix.ts +16 -16
  211. package/src/stores/class/radio/playlistMedia.ts +7 -7
  212. package/src/stores/class/radio/recurrence.ts +54 -54
  213. package/src/stores/class/rss/rssEmission.ts +13 -13
  214. package/src/stores/class/rss/rssInfo.ts +7 -7
  215. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  216. package/src/stores/class/rubrique/rubrique.ts +1 -1
  217. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  218. package/src/stores/class/stat/statArrayObject.ts +26 -26
  219. package/src/stores/class/stat/statGraph.ts +6 -6
  220. package/src/stores/class/user/person.ts +4 -2
  221. package/src/stores/class/user/profile.ts +4 -2
  222. package/src/stores/class/user/userKeycloak.ts +4 -5
  223. package/src/components/display/list/Paginate.vue +0 -181
  224. package/src/components/misc/Accordion.vue +0 -78
  225. package/src/components/misc/Footer.vue +0 -169
  226. package/src/components/misc/Nav.vue +0 -119
  227. package/src/components/misc/Popover.vue +0 -193
  228. package/src/components/misc/Snackbar.vue +0 -168
  229. package/src/components/pages/Category.vue +0 -41
  230. package/src/components/pages/Home.vue +0 -125
  231. package/src/components/pages/Lives.vue +0 -64
  232. package/src/components/pages/Playlist.vue +0 -164
  233. package/src/components/pages/Podcast.vue +0 -307
  234. package/src/components/pages/Podcasts.vue +0 -146
  235. package/src/components/pages/Radio.vue +0 -122
  236. package/src/components/pages/Rubrique.vue +0 -42
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div class="paginate">
3
3
  <div class="d-flex align-items-center justify-content-center">
4
- <label for="rows-per-page-select">{{ $t('Items per page :') }}</label>
4
+ <label for="rows-per-page-select">{{ $t("Items per page :") }}</label>
5
5
  <select
6
6
  id="rows-per-page-select"
7
7
  :value="rowsPerPage"
8
8
  class="c-hand p-1 mx-2"
9
- @change="$emit('update:rowsPerPage',parseInt($event.target.value,10))"
9
+ @change="$emit('update:rowsPerPage', parseInt($event.target.value, 10))"
10
10
  >
11
11
  <option
12
12
  v-for="option in optionsRowsPerPage"
@@ -20,47 +20,46 @@
20
20
  </div>
21
21
  </template>
22
22
  <script lang="ts">
23
- import { defineComponent } from 'vue';
23
+ import { defineComponent } from "vue";
24
24
  export default defineComponent({
25
- name: "Paginate",
25
+ name: "PaginateParams",
26
26
 
27
- props: {
28
- rowsPerPage:{ default:0, type:Number}
27
+ props: {
28
+ rowsPerPage: { default: 0, type: Number },
29
29
  },
30
30
 
31
- emits:['update:rowsPerPage'],
31
+ emits: ["update:rowsPerPage"],
32
32
 
33
33
  data() {
34
34
  return {
35
- optionsRowsPerPage: [10, 20, 30, 40, 50, 60] as Array<number>,
36
- };
35
+ optionsRowsPerPage: [10, 20, 30, 40, 50, 60] as Array<number>,
36
+ };
37
37
  },
38
- created(){
39
- this.initRowsPerPage();
40
- },
41
-
42
- methods:{
43
- initRowsPerPage(){
44
- if(this.optionsRowsPerPage.includes(this.rowsPerPage)){
38
+ created() {
39
+ this.initRowsPerPage();
40
+ },
41
+
42
+ methods: {
43
+ initRowsPerPage() {
44
+ if (this.optionsRowsPerPage.includes(this.rowsPerPage)) {
45
45
  return;
46
46
  }
47
47
  this.optionsRowsPerPage.push(this.rowsPerPage);
48
- this.optionsRowsPerPage.sort((a,b)=>a-b);
48
+ this.optionsRowsPerPage.sort((a, b) => a - b);
49
49
  },
50
- }
51
-
50
+ },
52
51
  });
53
52
  </script>
54
53
  <style lang="scss">
55
- @import '@scss/_variables.scss';
56
- .octopus-app .paginate{
57
- display: flex;
58
- justify-content: flex-end;
59
- select{
60
- border-top: 0;
61
- border-right: 0;
62
- border-left: 0;
63
- background: transparent !important;
64
- }
54
+ @import "@scss/_variables.scss";
55
+ .octopus-app .paginate {
56
+ display: flex;
57
+ justify-content: flex-end;
58
+ select {
59
+ border-top: 0;
60
+ border-right: 0;
61
+ border-left: 0;
62
+ background: transparent !important;
63
+ }
65
64
  }
66
- </style>
65
+ </style>
@@ -0,0 +1,210 @@
1
+ <template>
2
+ <div class="paginate-fixed" :style="'bottom:' + playerHeight">
3
+ <div class="mx-2">
4
+ {{ $t("Showing items number", { page: page + 1, totalPage: totalPage }) }}
5
+ </div>
6
+ <div class="d-flex flex-nowrap">
7
+ <button
8
+ v-for="paginateButton in buttonsLeft"
9
+ :key="paginateButton.title"
10
+ class="btn"
11
+ :title="paginateButton.title"
12
+ :disabled="paginateButton.disabled"
13
+ @click="paginateButton.action"
14
+ >
15
+ <svg
16
+ xmlns="http://www.w3.org/2000/svg"
17
+ width="16"
18
+ height="16"
19
+ fill="currentColor"
20
+ viewBox="0 0 16 16"
21
+ >
22
+ <path fill-rule="evenodd" :d="paginateButton.path" />
23
+ </svg>
24
+ </button>
25
+ <div v-for="pageNumber in pagination" :key="pageNumber">
26
+ <span v-if="null === pageNumber" class="btn"> ... </span>
27
+ <button
28
+ v-else
29
+ class="btn"
30
+ :class="{ active: page === pageNumber - 1 }"
31
+ @click="changeFirst((pageNumber - 1) * rowsPerPage)"
32
+ >
33
+ {{ pageNumber }}
34
+ </button>
35
+ </div>
36
+ <button
37
+ v-for="paginateButton in buttonsRight"
38
+ :key="paginateButton.title"
39
+ class="btn"
40
+ :title="paginateButton.title"
41
+ :disabled="paginateButton.disabled"
42
+ @click="paginateButton.action"
43
+ >
44
+ <svg
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ width="16"
47
+ height="16"
48
+ fill="currentColor"
49
+ viewBox="0 0 16 16"
50
+ >
51
+ <path fill-rule="evenodd" :d="paginateButton.path" />
52
+ </svg>
53
+ </button>
54
+ </div>
55
+ </div>
56
+ </template>
57
+ <script lang="ts">
58
+ import { usePlayerStore } from "@/stores/PlayerStore";
59
+ import { mapState } from "pinia";
60
+ import { defineComponent } from "vue";
61
+ export default defineComponent({
62
+ name: "PaginateSection",
63
+
64
+ props: {
65
+ totalCount: { default: 0, type: Number },
66
+ first: { default: 0, type: Number },
67
+ rowsPerPage: { default: 0, type: Number },
68
+ rangeSize: { default: 1, type: Number },
69
+ },
70
+
71
+ emits: ["update:first"],
72
+
73
+ computed: {
74
+ ...mapState(usePlayerStore, ["playerHeight"]),
75
+ buttonsLeft() {
76
+ return [
77
+ {
78
+ title: this.$t("Go to first page"),
79
+ disabled: 0 === this.first,
80
+ action: () => {
81
+ this.changeFirst(0);
82
+ },
83
+ path: "M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0zM4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5z",
84
+ },
85
+ {
86
+ title: this.$t("Go to previous page"),
87
+ disabled: 0 === this.first,
88
+ action: () => {
89
+ this.changeFirst(this.first - this.rowsPerPage);
90
+ },
91
+ path: "M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z",
92
+ },
93
+ ];
94
+ },
95
+ buttonsRight() {
96
+ return [
97
+ {
98
+ title: this.$t("Go to next page"),
99
+ disabled: this.lastFirst === this.first,
100
+ action: () => {
101
+ this.changeFirst(this.first + this.rowsPerPage);
102
+ },
103
+ path: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z",
104
+ },
105
+ {
106
+ title: this.$t("Go to last page"),
107
+ disabled: this.lastFirst === this.first,
108
+ action: () => {
109
+ this.changeFirst(this.lastFirst);
110
+ },
111
+ path: "M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0zM11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5z",
112
+ },
113
+ ];
114
+ },
115
+ page() {
116
+ return Math.floor(this.first / this.rowsPerPage);
117
+ },
118
+ totalPage() {
119
+ return Math.ceil(this.totalCount / this.rowsPerPage);
120
+ },
121
+ pagination(): (number | null)[] {
122
+ if (-1 === this.rangeSize) {
123
+ return [];
124
+ }
125
+ const minPaginationElems = 5 + this.rangeSize * 2;
126
+ let rangeStart =
127
+ this.totalPage <= minPaginationElems
128
+ ? 1
129
+ : this.page + 1 - this.rangeSize;
130
+ let rangeEnd =
131
+ this.totalPage <= minPaginationElems
132
+ ? this.totalPage
133
+ : this.page + 1 + this.rangeSize;
134
+ rangeEnd = rangeEnd > this.totalPage ? this.totalPage : rangeEnd;
135
+ rangeStart = rangeStart < 1 ? 1 : rangeStart;
136
+ if (this.totalPage > minPaginationElems) {
137
+ return this.getPaginationArrayWithEllipsis(
138
+ rangeStart,
139
+ rangeEnd,
140
+ minPaginationElems,
141
+ );
142
+ }
143
+ const res = [];
144
+ for (let i = rangeStart; i <= rangeEnd; i++) {
145
+ res.push(i);
146
+ }
147
+ return res;
148
+ },
149
+ lastFirst(): number {
150
+ return (this.totalPage - 1) * this.rowsPerPage;
151
+ },
152
+ },
153
+
154
+ methods: {
155
+ getPaginationArrayWithEllipsis(
156
+ rangeStart: number,
157
+ rangeEnd: number,
158
+ minPaginationElems: number,
159
+ ) {
160
+ const res = [];
161
+ const isStartBoundaryReached = rangeStart - 1 < 3;
162
+ const isEndBoundaryReached = this.totalPage - rangeEnd < 3;
163
+ if (isStartBoundaryReached) {
164
+ rangeEnd = minPaginationElems - 2;
165
+ for (let i = 1; i < rangeStart; i++) {
166
+ res.push(i);
167
+ }
168
+ } else {
169
+ res.push(1);
170
+ res.push(null);
171
+ }
172
+ if (isEndBoundaryReached) {
173
+ rangeStart = this.totalPage - (minPaginationElems - 3);
174
+ for (let i = rangeStart; i <= this.totalPage; i++) {
175
+ res.push(i);
176
+ }
177
+ } else {
178
+ for (let i = rangeStart; i <= rangeEnd; i++) {
179
+ res.push(i);
180
+ }
181
+ res.push(null);
182
+ res.push(this.totalPage);
183
+ }
184
+ return res;
185
+ },
186
+ changeFirst(newFirst: number) {
187
+ this.$emit("update:first", newFirst);
188
+ },
189
+ },
190
+ });
191
+ </script>
192
+ <style lang="scss">
193
+ @import "@scss/_variables.scss";
194
+ .octopus-app .paginate-fixed {
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: flex-end;
198
+ width: 100%;
199
+ position: sticky;
200
+ background: $octopus-background;
201
+ padding: 0.5rem 0;
202
+ z-index: 10;
203
+ .btn {
204
+ border-radius: 0;
205
+ &.active {
206
+ background: $primaryColorMoreTransparent;
207
+ }
208
+ }
209
+ }
210
+ </style>
@@ -2,67 +2,62 @@
2
2
  <swiper
3
3
  :slides-per-view="numberItem"
4
4
  :space-between="0"
5
- :loop="listObject.length>=numberItem"
5
+ :loop="listObject.length >= numberItem"
6
6
  :navigation="true"
7
7
  :modules="modules"
8
8
  >
9
- <swiper-slide
10
- v-for="(obj, index) in listObject"
11
- :key="obj"
12
- >
13
- <slot
14
- name="octopusSlide"
15
- :option="obj"
16
- :index="index"
17
- />
9
+ <swiper-slide v-for="(obj, index) in listObject" :key="obj">
10
+ <slot name="octopusSlide" :option="obj" :index="index" />
18
11
  </swiper-slide>
19
12
  </swiper>
20
13
  </template>
21
14
 
22
15
  <script lang="ts">
23
- import domHelper from '../../../helper/dom';
24
- import { state } from '../../../stores/ParamSdkStore';
16
+ import domHelper from "../../../helper/dom";
17
+ import { state } from "../../../stores/ParamSdkStore";
25
18
  import { Swiper, SwiperSlide } from "swiper/vue";
26
- import { Navigation } from "swiper";
19
+ import { Navigation } from "swiper/modules";
27
20
  import "swiper/css";
28
21
  import "swiper/css/navigation";
29
- import { defineComponent } from 'vue'
22
+ import { defineComponent } from "vue";
30
23
  export default defineComponent({
31
- name: 'SwiperList',
32
-
24
+ name: "SwiperList",
25
+
33
26
  components: {
34
27
  Swiper,
35
28
  SwiperSlide,
36
29
  },
37
30
 
38
31
  props: {
39
- listObject: { default: ()=>[], type: Array as ()=> Array<unknown>},
40
- sizeItemOverload:{default: undefined, type: Number}
32
+ listObject: { default: () => [], type: Array as () => Array<unknown> },
33
+ sizeItemOverload: { default: undefined, type: Number },
41
34
  },
42
35
 
43
36
  data() {
44
37
  return {
45
38
  modules: [Navigation],
46
- numberItem: 5 as number
39
+ numberItem: 5 as number,
47
40
  };
48
41
  },
49
42
  computed: {
50
43
  sizeItem(): number {
51
- if(this.sizeItemOverload){
44
+ if (this.sizeItemOverload) {
52
45
  return this.sizeItemOverload;
53
46
  }
54
47
  if (window.innerWidth <= 450) {
55
48
  return 12.5;
56
49
  }
57
- return state.generalParameters.podcastItem ? state.generalParameters.podcastItem: 13.5;
50
+ return state.generalParameters.podcastItem
51
+ ? state.generalParameters.podcastItem
52
+ : 13.5;
58
53
  },
59
54
  },
60
-
55
+
61
56
  created() {
62
- window.addEventListener('resize', this.handleResize);
57
+ window.addEventListener("resize", this.handleResize);
63
58
  },
64
59
  unmounted() {
65
- window.removeEventListener('resize', this.handleResize);
60
+ window.removeEventListener("resize", this.handleResize);
66
61
  },
67
62
 
68
63
  mounted() {
@@ -72,29 +67,30 @@ export default defineComponent({
72
67
  handleResize(): void {
73
68
  if (!this.$el) return;
74
69
  const width = (this.$el as HTMLElement).offsetWidth - 95;
75
- const sixteen = domHelper.convertRemToPixels(this.sizeItem+ 0.5);
70
+ const sixteen = domHelper.convertRemToPixels(this.sizeItem + 0.5);
76
71
  this.numberItem = Math.max(1, Math.floor(width / sixteen));
77
72
  },
78
73
  },
79
- })
74
+ });
80
75
  </script>
81
76
  <style lang="scss">
82
- @import '@scss/_variables.scss';
77
+ @import "@scss/_variables.scss";
83
78
  .swiper {
84
79
  width: 100%;
85
80
  height: 100%;
86
81
  }
87
- .swiper-button-next, .swiper-button-prev{
82
+ .swiper-button-next,
83
+ .swiper-button-prev {
88
84
  color: $octopus-primary-color !important;
89
85
  height: 100%;
90
86
  top: 0;
91
87
  bottom: 0;
92
88
  margin: 0;
93
89
  }
94
- .swiper-button-next{
90
+ .swiper-button-next {
95
91
  right: 0;
96
92
  }
97
- .swiper-button-prev{
93
+ .swiper-button-prev {
98
94
  left: 0;
99
95
  }
100
96
  /* .swiper-slide-active{
@@ -106,7 +102,7 @@ export default defineComponent({
106
102
  .swiper-slide-next{
107
103
  padding-right:27px;
108
104
  } */
109
- .swiper-button-lock{
105
+ .swiper-button-lock {
110
106
  display: flex;
111
107
  }
112
108
  .swiper-slide {
@@ -114,4 +110,4 @@ export default defineComponent({
114
110
  justify-content: center;
115
111
  align-items: center;
116
112
  }
117
- </style>
113
+ </style>
@@ -1,11 +1,9 @@
1
1
  <template>
2
2
  <div class="d-flex flex-column align-items-center text-white">
3
- <h3>{{ $t('This live will start') }}</h3>
4
- <h3
5
- v-if="countdownTimer"
6
- >
3
+ <h3>{{ $t("This live will start") }}</h3>
4
+ <h3 v-if="countdownTimer">
7
5
  {{
8
- $t('In days hours minutes seconds', {
6
+ $t("In days hours minutes seconds", {
9
7
  days: pad(days),
10
8
  hours: pad(hours),
11
9
  minutes: pad(minutes),
@@ -14,21 +12,21 @@
14
12
  }}
15
13
  </h3>
16
14
  <h3 v-else>
17
- {{ $t('In a moment') }}
15
+ {{ $t("In a moment") }}
18
16
  </h3>
19
17
  </div>
20
18
  </template>
21
19
 
22
20
  <script lang="ts">
23
- import { defineComponent } from 'vue'
21
+ import { defineComponent } from "vue";
24
22
  export default defineComponent({
25
23
  props: {
26
- timeRemaining: { default: undefined, type: Number},
24
+ timeRemaining: { default: undefined, type: Number },
27
25
  },
28
26
  data() {
29
27
  return {
30
28
  seconds: 0 as number,
31
- countdownTimer: undefined as ReturnType<typeof setTimeout>|undefined,
29
+ countdownTimer: undefined as ReturnType<typeof setTimeout> | undefined,
32
30
  days: 0 as number,
33
31
  hours: 0 as number,
34
32
  minutes: 0 as number,
@@ -44,7 +42,7 @@ export default defineComponent({
44
42
  }, 1000);
45
43
  },
46
44
  unmounted() {
47
- clearInterval((this.countdownTimer as unknown as number));
45
+ clearInterval(this.countdownTimer as unknown as number);
48
46
  },
49
47
 
50
48
  methods: {
@@ -56,15 +54,15 @@ export default defineComponent({
56
54
  this.minutes = Math.floor(minutesLeft / 60);
57
55
  this.remainingSeconds = this.seconds % 60;
58
56
  if (0 === this.seconds) {
59
- clearInterval((this.countdownTimer as unknown as number));
57
+ clearInterval(this.countdownTimer as unknown as number);
60
58
  this.countdownTimer = undefined;
61
59
  } else {
62
60
  this.seconds--;
63
61
  }
64
62
  },
65
63
  pad(n: number): string {
66
- return n < 10 ? '0' + n : n.toString();
64
+ return n < 10 ? "0" + n : n.toString();
67
65
  },
68
66
  },
69
- })
70
- </script>
67
+ });
68
+ </script>
@@ -1,10 +1,7 @@
1
1
  <template>
2
- <div
3
- v-if="notEmpty"
4
- class="py-3"
5
- >
2
+ <div v-if="notEmpty" class="py-3">
6
3
  <h2 class="mb-0 mt-3">
7
- {{ $t('All live emission button') }}
4
+ {{ $t("All live emission button") }}
8
5
  </h2>
9
6
  <ListPaginate
10
7
  id="liveListPaginate"
@@ -15,17 +12,9 @@
15
12
  :loading="false"
16
13
  >
17
14
  <template #list>
18
- <div
19
- class="podcast-list"
20
- >
21
- <template
22
- v-for="p in displayArray"
23
- :key="p.podcastId"
24
- >
25
- <PodcastItem
26
- v-if="0!==p.podcastId"
27
- :podcast="p"
28
- />
15
+ <div class="podcast-list">
16
+ <template v-for="p in displayArray" :key="p.podcastId">
17
+ <PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
29
18
  </template>
30
19
  </div>
31
20
  </template>
@@ -34,23 +23,23 @@
34
23
  </template>
35
24
 
36
25
  <script lang="ts">
37
- import ListPaginate from '../list/ListPaginate.vue';
38
- import octopusApi from '@saooti/octopus-api';
39
- import PodcastItem from '../podcasts/PodcastItem.vue';
40
- import { Podcast, emptyPodcastData } from '@/stores/class/general/podcast';
41
- import { defineComponent } from 'vue'
26
+ import ListPaginate from "../list/ListPaginate.vue";
27
+ import octopusApi from "@saooti/octopus-api";
28
+ import PodcastItem from "../podcasts/PodcastItem.vue";
29
+ import { Podcast, emptyPodcastData } from "@/stores/class/general/podcast";
30
+ import { defineComponent } from "vue";
42
31
  export default defineComponent({
43
- name: 'LiveHorizontalList',
32
+ name: "LiveHorizontalList",
44
33
 
45
34
  components: {
46
35
  PodcastItem,
47
- ListPaginate
36
+ ListPaginate,
48
37
  },
49
38
 
50
39
  props: {
51
40
  first: { default: 0, type: Number },
52
41
  size: { default: 30, type: Number },
53
- emissionId: { default: undefined, type: Number},
42
+ emissionId: { default: undefined, type: Number },
54
43
  },
55
44
 
56
45
  data() {
@@ -65,31 +54,33 @@ export default defineComponent({
65
54
  };
66
55
  },
67
56
 
68
-
69
57
  computed: {
70
- displayArray(): Array<Podcast>{
71
- if(this.isMobile){
58
+ displayArray(): Array<Podcast> {
59
+ if (this.isMobile) {
72
60
  return this.lives;
73
61
  }
74
- return this.lives.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
75
- },
62
+ return this.lives.slice(
63
+ this.dfirst,
64
+ Math.min(this.dfirst + this.dsize, this.totalCount),
65
+ );
66
+ },
76
67
  },
77
68
  watch: {
78
- dsize():void{
69
+ dsize(): void {
79
70
  this.reloadList();
80
- },
81
- dfirst(): void{
82
- if(!this.lives[this.dfirst] || 0===this.lives[this.dfirst].podcastId){
83
- this.fetchContent(false);
84
- }
85
- },
71
+ },
72
+ dfirst(): void {
73
+ if (!this.lives[this.dfirst] || 0 === this.lives[this.dfirst].podcastId) {
74
+ this.fetchContent(false);
75
+ }
76
+ },
86
77
  },
87
78
 
88
79
  created() {
89
80
  this.fetchContent(true);
90
81
  },
91
82
  methods: {
92
- reloadList(){
83
+ reloadList() {
93
84
  this.dfirst = 0;
94
85
  this.fetchContent(true);
95
86
  },
@@ -98,28 +89,47 @@ export default defineComponent({
98
89
  if (reset) {
99
90
  this.notEmpty = false;
100
91
  }
101
- const data = await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',{
102
- first: this.dfirst,
103
- size: this.dsize,
104
- emissionId: this.emissionId,
105
- sort: 'DATE',
106
- includeStatus:'READY_TO_RECORD'
107
- }, true);
92
+ const data = await octopusApi.fetchDataWithParams<{
93
+ count: number;
94
+ result: Array<Podcast>;
95
+ sort: string;
96
+ }>(
97
+ 0,
98
+ "podcast/search",
99
+ {
100
+ first: this.dfirst,
101
+ size: this.dsize,
102
+ emissionId: this.emissionId,
103
+ sort: "DATE",
104
+ includeStatus: "READY_TO_RECORD",
105
+ },
106
+ true,
107
+ );
108
108
  this.afterFetching(reset, data);
109
109
  },
110
- afterFetching(reset: boolean, data: {count: number, result: Array<Podcast>, sort: string}): void {
110
+ afterFetching(
111
+ reset: boolean,
112
+ data: { count: number; result: Array<Podcast>; sort: string },
113
+ ): void {
111
114
  if (reset) {
112
115
  this.lives.length = 0;
113
116
  }
114
- if(this.dfirst > this.lives.length){
115
- for (let i = this.lives.length-1, len = this.dfirst + this.dsize; i < len; i++) {
117
+ if (this.dfirst > this.lives.length) {
118
+ for (
119
+ let i = this.lives.length - 1, len = this.dfirst + this.dsize;
120
+ i < len;
121
+ i++
122
+ ) {
116
123
  this.lives.push(emptyPodcastData());
117
124
  }
118
125
  }
119
126
  const responseLives = data.result.filter((l: Podcast | null) => {
120
127
  return null !== l;
121
128
  });
122
- this.lives = this.lives.slice(0, this.dfirst).concat(responseLives).concat(this.lives.slice(this.dfirst+this.dsize, this.lives.length));
129
+ this.lives = this.lives
130
+ .slice(0, this.dfirst)
131
+ .concat(responseLives)
132
+ .concat(this.lives.slice(this.dfirst + this.dsize, this.lives.length));
123
133
  this.totalCount = data.count;
124
134
  if (0 !== this.lives.length) {
125
135
  this.notEmpty = true;
@@ -127,5 +137,5 @@ export default defineComponent({
127
137
  this.inFetching = false;
128
138
  },
129
139
  },
130
- })
131
- </script>
140
+ });
141
+ </script>