@saooti/octopus-sdk 1.0.0 → 29.0.2

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 (230) hide show
  1. package/README.md +73 -0
  2. package/index.d.ts +4 -0
  3. package/index.ts +12 -0
  4. package/package.json +61 -39
  5. package/public/css/fonts/saooti-ui.eot +0 -0
  6. package/public/css/fonts/saooti-ui.svg +30 -19
  7. package/public/css/fonts/saooti-ui.ttf +0 -0
  8. package/public/css/fonts/saooti-ui.woff +0 -0
  9. package/public/css/fonts/style.css +48 -5
  10. package/public/img/ACPM.png +0 -0
  11. package/public/img/article.png +0 -0
  12. package/src/App.vue +97 -31
  13. package/src/api/comments.ts +3 -1
  14. package/src/api/emissions.ts +5 -2
  15. package/src/api/initialize.ts +3 -2
  16. package/src/api/podcasts.ts +5 -2
  17. package/src/api/profile.ts +4 -2
  18. package/src/api/studio.ts +12 -1
  19. package/src/assets/bootstrap-diff.scss +265 -0
  20. package/src/assets/form.scss +23 -0
  21. package/src/assets/general.scss +47 -20
  22. package/src/assets/modal.scss +9 -10
  23. package/src/assets/multiselect.scss +19 -2
  24. package/src/assets/octopus-library.scss +16 -4
  25. package/src/assets/share.scss +343 -0
  26. package/src/components/display/aggregator/RssSection.vue +4 -4
  27. package/src/components/display/categories/CategoryChooser.vue +152 -105
  28. package/src/components/display/categories/CategoryFilter.vue +108 -0
  29. package/src/components/display/categories/CategoryList.vue +138 -109
  30. package/src/components/display/comments/AddCommentModal.vue +104 -87
  31. package/src/components/display/comments/CommentInput.vue +137 -118
  32. package/src/components/display/comments/CommentItem.vue +155 -137
  33. package/src/components/display/comments/CommentList.vue +142 -120
  34. package/src/components/display/comments/CommentParentInfo.vue +39 -35
  35. package/src/components/display/comments/CommentPlayer.vue +54 -48
  36. package/src/components/display/comments/CommentSection.vue +57 -58
  37. package/src/components/display/edit/EditBox.vue +4 -4
  38. package/src/components/display/edit/EditCommentBox.vue +25 -31
  39. package/src/components/display/emission/EmissionChooser.vue +82 -80
  40. package/src/components/display/emission/EmissionInlineList.vue +118 -105
  41. package/src/components/display/emission/EmissionItem.vue +66 -167
  42. package/src/components/display/emission/EmissionList.vue +96 -122
  43. package/src/components/display/emission/EmissionPlayerItem.vue +131 -126
  44. package/src/components/display/filter/AdvancedSearch.vue +306 -372
  45. package/src/components/display/filter/CategoryFilter.vue +117 -0
  46. package/src/components/display/filter/MonetizableFilter.vue +24 -10
  47. package/src/components/display/filter/ProductorSearch.vue +131 -135
  48. package/src/components/display/filter/RubriqueChoice.vue +104 -0
  49. package/src/components/display/filter/RubriqueFilter.vue +235 -0
  50. package/src/components/display/live/CountDown.vue +30 -29
  51. package/src/components/display/live/LiveHorizontalList.vue +40 -34
  52. package/src/components/display/live/LiveItem.vue +146 -158
  53. package/src/components/display/live/LiveList.vue +167 -154
  54. package/src/components/display/organisation/OrganisationChooser.vue +125 -124
  55. package/src/components/display/organisation/OrganisationChooserLight.vue +40 -47
  56. package/src/components/display/participant/ParticipantItem.vue +92 -108
  57. package/src/components/display/participant/ParticipantList.vue +76 -69
  58. package/src/components/display/playlist/PlaylistItem.vue +45 -56
  59. package/src/components/display/playlist/PlaylistList.vue +57 -48
  60. package/src/components/display/playlist/PodcastList.vue +94 -70
  61. package/src/components/display/podcasts/AnimatorsItem.vue +26 -23
  62. package/src/components/display/podcasts/ParticipantDescription.vue +115 -0
  63. package/src/components/display/podcasts/PodcastFilterList.vue +84 -85
  64. package/src/components/display/podcasts/PodcastImage.vue +244 -208
  65. package/src/components/display/podcasts/PodcastInlineList.vue +145 -207
  66. package/src/components/display/podcasts/PodcastItem.vue +150 -132
  67. package/src/components/display/podcasts/PodcastList.vue +89 -110
  68. package/src/components/display/podcasts/TagList.vue +23 -16
  69. package/src/components/display/rubriques/RubriqueChooser.vue +137 -123
  70. package/src/components/display/rubriques/RubriqueList.vue +227 -0
  71. package/src/components/display/sharing/PlayerParameters.vue +154 -106
  72. package/src/components/display/sharing/QrCode.vue +58 -0
  73. package/src/components/display/sharing/ShareButtons.vue +214 -92
  74. package/src/components/display/sharing/ShareDistribution.vue +110 -121
  75. package/src/components/display/sharing/SharePlayer.vue +245 -190
  76. package/src/components/display/sharing/SubscribeButtons.vue +130 -66
  77. package/src/components/display/studio/RecordingItemButton.vue +4 -4
  78. package/src/components/misc/ErrorMessage.vue +21 -16
  79. package/src/components/misc/Footer.vue +131 -66
  80. package/src/components/misc/HomeDropdown.vue +166 -123
  81. package/src/components/misc/LeftMenu.vue +151 -134
  82. package/src/components/misc/Player.vue +332 -328
  83. package/src/components/misc/Snackbar.vue +27 -29
  84. package/src/components/misc/TopBar.vue +204 -174
  85. package/src/components/misc/modal/ClipboardModal.vue +46 -26
  86. package/src/components/misc/modal/MessageModal.vue +67 -51
  87. package/src/components/misc/modal/NewsletterModal.vue +179 -136
  88. package/src/components/misc/modal/QrCodeModal.vue +83 -0
  89. package/src/components/misc/modal/ShareModalPlayer.vue +133 -74
  90. package/src/components/mixins/functions.ts +21 -18
  91. package/src/components/mixins/init.ts +24 -0
  92. package/src/components/mixins/organisationFilter.ts +24 -0
  93. package/src/components/pages/Category.vue +26 -26
  94. package/src/components/pages/Emission.vue +120 -92
  95. package/src/components/pages/Emissions.vue +109 -86
  96. package/src/components/pages/Home.vue +70 -16
  97. package/src/components/pages/Lives.vue +57 -47
  98. package/src/components/pages/Participant.vue +93 -77
  99. package/src/components/pages/Participants.vue +44 -31
  100. package/src/components/pages/Playlist.vue +63 -52
  101. package/src/components/pages/Playlists.vue +41 -39
  102. package/src/components/pages/Podcast.vue +265 -251
  103. package/src/components/pages/Podcasts.vue +135 -104
  104. package/src/components/pages/Rubrique.vue +25 -19
  105. package/src/components/pages/Search.vue +71 -67
  106. package/src/helper/dom.ts +2 -2
  107. package/src/helper/duration.ts +18 -8
  108. package/src/locale/educationen.ts +14 -0
  109. package/src/locale/en.ts +299 -1
  110. package/src/locale/fr.ts +25 -10
  111. package/src/locale/messages.ts +3 -2
  112. package/src/main.ts +54 -32
  113. package/src/router/router.ts +184 -159
  114. package/src/shims-tsx.d.ts +13 -0
  115. package/src/shims-vue-recaptcha-v3.d.ts +9 -0
  116. package/src/shims-vue.d.ts +5 -6
  117. package/src/store/AppStore.ts +36 -171
  118. package/src/store/class/category.ts +8 -0
  119. package/src/store/class/comment.ts +17 -0
  120. package/src/store/class/conference.ts +27 -0
  121. package/src/store/class/customPlayer.ts +8 -0
  122. package/src/store/class/emission.ts +20 -0
  123. package/src/store/class/fetchParam.ts +16 -0
  124. package/src/store/class/media.ts +13 -0
  125. package/src/store/class/organisation.ts +19 -0
  126. package/src/store/class/participant.ts +12 -0
  127. package/src/store/class/person.ts +13 -0
  128. package/src/store/class/player.ts +12 -0
  129. package/src/store/class/playlist.ts +15 -0
  130. package/src/store/class/podcast.ts +37 -0
  131. package/src/store/class/rubriquage.ts +9 -0
  132. package/src/store/class/rubriquageFilter.ts +5 -0
  133. package/src/store/class/rubrique.ts +8 -0
  134. package/src/store/paramStore.ts +70 -29
  135. package/src/store/typeAppStore.ts +171 -237
  136. package/src/vuex-shim.d.ts +8 -0
  137. package/tsconfig.json +4 -0
  138. package/vue.config.js +14 -0
  139. package/public/img/ACPM.PNG +0 -0
  140. package/src/assets/bootstrap_scss/_alert.scss +0 -51
  141. package/src/assets/bootstrap_scss/_badge.scss +0 -54
  142. package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
  143. package/src/assets/bootstrap_scss/_button-group.scss +0 -164
  144. package/src/assets/bootstrap_scss/_buttons.scss +0 -291
  145. package/src/assets/bootstrap_scss/_card.scss +0 -278
  146. package/src/assets/bootstrap_scss/_carousel.scss +0 -197
  147. package/src/assets/bootstrap_scss/_close.scss +0 -41
  148. package/src/assets/bootstrap_scss/_code.scss +0 -48
  149. package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
  150. package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
  151. package/src/assets/bootstrap_scss/_forms.scss +0 -352
  152. package/src/assets/bootstrap_scss/_functions.scss +0 -134
  153. package/src/assets/bootstrap_scss/_grid.scss +0 -69
  154. package/src/assets/bootstrap_scss/_images.scss +0 -42
  155. package/src/assets/bootstrap_scss/_input-group.scss +0 -191
  156. package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
  157. package/src/assets/bootstrap_scss/_list-group.scss +0 -158
  158. package/src/assets/bootstrap_scss/_media.scss +0 -8
  159. package/src/assets/bootstrap_scss/_mixins.scss +0 -47
  160. package/src/assets/bootstrap_scss/_modal.scss +0 -243
  161. package/src/assets/bootstrap_scss/_nav.scss +0 -120
  162. package/src/assets/bootstrap_scss/_navbar.scss +0 -324
  163. package/src/assets/bootstrap_scss/_pagination.scss +0 -74
  164. package/src/assets/bootstrap_scss/_popover.scss +0 -170
  165. package/src/assets/bootstrap_scss/_print.scss +0 -141
  166. package/src/assets/bootstrap_scss/_progress.scss +0 -46
  167. package/src/assets/bootstrap_scss/_reboot.scss +0 -482
  168. package/src/assets/bootstrap_scss/_root.scss +0 -20
  169. package/src/assets/bootstrap_scss/_spinners.scss +0 -55
  170. package/src/assets/bootstrap_scss/_tables.scss +0 -185
  171. package/src/assets/bootstrap_scss/_toasts.scss +0 -44
  172. package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
  173. package/src/assets/bootstrap_scss/_transitions.scss +0 -20
  174. package/src/assets/bootstrap_scss/_type.scss +0 -125
  175. package/src/assets/bootstrap_scss/_utilities.scss +0 -17
  176. package/src/assets/bootstrap_scss/_variables.scss +0 -1145
  177. package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
  178. package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
  179. package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
  180. package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
  181. package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
  182. package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
  183. package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
  184. package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
  185. package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
  186. package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
  187. package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
  188. package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
  189. package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
  190. package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
  191. package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
  192. package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
  193. package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
  194. package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
  195. package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
  196. package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
  197. package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
  198. package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
  199. package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
  200. package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
  201. package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
  202. package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
  203. package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
  204. package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
  205. package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
  206. package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
  207. package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
  208. package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
  209. package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
  210. package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
  211. package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
  212. package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
  213. package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
  214. package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
  215. package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
  216. package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
  217. package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
  218. package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
  219. package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
  220. package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
  221. package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
  222. package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
  223. package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
  224. package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
  225. package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
  226. package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
  227. package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
  228. package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
  229. package/src/shims-vuex.d.ts +0 -7
  230. package/src/views/Home.vue +0 -18
@@ -1,102 +1,126 @@
1
1
  <template>
2
2
  <div>
3
- <div class="page-box" v-if="loaded && !error">
4
- <h1 v-if="!isOuestFrance">{{ $t('Emission') }}</h1>
3
+ <div
4
+ v-if="loaded && !error"
5
+ class="page-box"
6
+ >
7
+ <h1 v-if="!isOuestFrance">
8
+ {{ $t('Emission') }}
9
+ </h1>
5
10
  <div class="d-flex">
6
11
  <div class="d-flex flex-column flex-grow">
7
12
  <EditBox
8
- :emission="emission"
9
- :rssEmission="rssEmission"
10
- :isReady="isReady"
11
13
  v-if="editRight && isEditBox"
12
- ></EditBox>
14
+ :emission="emission"
15
+ :rss-emission="rssEmission"
16
+ :ftp-emission="ftpEmission"
17
+ :is-ready="isReady"
18
+ />
13
19
  <div class="module-box">
14
- <h2 v-if="!isOuestFrance">{{ name }}</h2>
15
- <h1 v-else>{{ name }}</h1>
20
+ <h2 v-if="!isOuestFrance">
21
+ {{ name }}
22
+ </h2>
23
+ <h1 v-else>
24
+ {{ name }}
25
+ </h1>
16
26
  <div class="mb-5 mt-3 descriptionText">
17
27
  <img
28
+ v-if="!isOuestFrance"
18
29
  :src="imageUrl"
19
30
  :alt="$t('Emission name image', { name: name })"
20
- class="img-box shadow-element float-left mr-3 mb-3"
21
- v-if="!isOuestFrance"
31
+ class="img-box shadow-element float-start me-3 mb-3"
32
+ >
33
+ <p
34
+ class="html-wysiwyg-content"
35
+ v-html="urlify(description)"
22
36
  />
23
- <p class="html-wysiwyg-content" v-html="urlify(description)"></p>
24
37
  </div>
25
38
  <ShareButtons
26
- :emission="emission"
27
- :bigRound="true"
28
39
  v-if="isRssButton"
29
- ></ShareButtons>
40
+ :emission="emission"
41
+ :big-round="true"
42
+ />
30
43
  </div>
31
44
  <SubscribeButtons
32
- :emission="emission"
33
45
  v-if="isShareButtons && countLink >= 1"
34
- ></SubscribeButtons>
46
+ :emission="emission"
47
+ />
35
48
  </div>
36
49
  <div class="d-flex flex-column share-container">
37
50
  <SharePlayer
51
+ v-if="isSharePlayer && (authenticated || notExclusive)"
38
52
  :emission="emission"
39
53
  :exclusive="exclusive"
40
- :notExclusive="notExclusive"
41
- :organisationId="organisationId"
42
- :isEducation="isEducation"
43
- v-if="isSharePlayer && (authenticated || notExclusive)"
44
- ></SharePlayer>
54
+ :not-exclusive="notExclusive"
55
+ :organisation-id="organisationId"
56
+ :is-education="isEducation"
57
+ />
45
58
  <ShareButtons
46
- :emission="emission"
47
- :notExclusive="notExclusive"
48
59
  v-if="isShareButtons"
49
- ></ShareButtons>
60
+ :emission="emission"
61
+ :not-exclusive="notExclusive"
62
+ />
50
63
  </div>
51
64
  </div>
52
65
  <div v-if="editRight">
53
66
  <ShareDistribution
54
- :emissionId="emissionId"
55
67
  v-if="isShareDistribution"
56
- ></ShareDistribution>
68
+ :emission-id="emissionId"
69
+ />
57
70
  </div>
58
- <LiveHorizontalList :emissionId="emissionId" v-if="!isPodcastmaker" />
71
+ <LiveHorizontalList
72
+ v-if="!isPodcastmaker"
73
+ :emission-id="emissionId"
74
+ />
59
75
  <PodcastFilterList
60
- :emissionId="emissionId"
61
- :categoryFilter="false"
62
- :editRight="editRight"
63
- :productorId="emission.orga.id"
64
76
  v-if="!isOuestFrance"
77
+ :emission-id="emissionId"
78
+ :category-filter="false"
79
+ :edit-right="editRight"
80
+ :productor-id="emission.orga.id"
65
81
  @fetch="fetch"
66
82
  />
67
83
  <PodcastList
84
+ v-else
68
85
  :first="0"
69
86
  :size="15"
70
- :emissionId="emissionId"
87
+ :emission-id="emissionId"
71
88
  @fetch="fetch"
72
- v-else
73
89
  />
74
90
  </div>
75
- <div class="d-flex justify-content-center" v-if="!loaded">
76
- <div class="spinner-border mr-3"></div>
77
- <h3 class="mt-2">{{ $t('Loading content ...') }}</h3>
91
+ <div
92
+ v-if="!loaded"
93
+ class="d-flex justify-content-center"
94
+ >
95
+ <div class="spinner-border me-3" />
96
+ <h3 class="mt-2">
97
+ {{ $t('Loading content ...') }}
98
+ </h3>
78
99
  </div>
79
- <div class="text-center" v-if="error">
100
+ <div
101
+ v-if="error"
102
+ class="text-center"
103
+ >
80
104
  <h3>{{ $t("Emission doesn't exist") }}</h3>
81
105
  </div>
82
106
  </div>
83
107
  </template>
84
- <style lang="scss"></style>
108
+
85
109
  <script lang="ts">
86
- // @ is an alias to /src
87
- import EditBox from '@/components/display/edit/EditBox.vue';
88
- import SharePlayer from '../display/sharing/SharePlayer.vue';
89
- import ShareButtons from '../display/sharing/ShareButtons.vue';
90
- import SubscribeButtons from '../display/sharing/SubscribeButtons.vue';
91
- import ShareDistribution from '../display/sharing/ShareDistribution.vue';
92
- import PodcastFilterList from '../display/podcasts/PodcastFilterList.vue';
93
- import PodcastList from '../display/podcasts/PodcastList.vue';
94
- import LiveHorizontalList from '../display/live/LiveHorizontalList.vue';
95
110
  const octopusApi = require('@saooti/octopus-api');
96
111
  import { state } from '../../store/paramStore';
97
112
  import { displayMethods } from '../mixins/functions';
113
+ import { Emission } from '@/store/class/emission';
98
114
 
99
- import { defineComponent } from 'vue'
115
+ import { defineComponent, defineAsyncComponent } from 'vue';
116
+ const PodcastFilterList = defineAsyncComponent(() => import('../display/podcasts/PodcastFilterList.vue'));
117
+ const SharePlayer = defineAsyncComponent(() => import('../display/sharing/SharePlayer.vue'));
118
+ const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
119
+ const ShareDistribution = defineAsyncComponent(() => import('../display/sharing/ShareDistribution.vue'));
120
+ const EditBox = defineAsyncComponent(() => import('@/components/display/edit/EditBox.vue'));
121
+ const PodcastList = defineAsyncComponent(() => import('../display/podcasts/PodcastList.vue'));
122
+ const SubscribeButtons = defineAsyncComponent(() => import('../display/sharing/SubscribeButtons.vue'));
123
+ const LiveHorizontalList = defineAsyncComponent(() => import('../display/live/LiveHorizontalList.vue'));
100
124
  export default defineComponent({
101
125
  components: {
102
126
  PodcastFilterList,
@@ -108,111 +132,110 @@ export default defineComponent({
108
132
  SubscribeButtons,
109
133
  LiveHorizontalList,
110
134
  },
111
-
112
135
  mixins: [displayMethods],
113
-
114
- mounted() {
115
- this.getEmissionDetails(this.emissionId);
136
+ props: {
137
+ emissionId: { default: undefined, type: Number},
138
+ isEducation: { default: false, type: Boolean},
116
139
  },
117
-
118
- props: ['emissionId', 'isEducation'],
119
140
  emits: ['emissionTitle'],
120
141
 
121
142
  data() {
122
143
  return {
123
- loaded: false,
124
- title: '',
125
- emission: undefined as any,
126
- error: false,
127
- rssEmission: false,
128
- exclusive: false,
129
- notExclusive: false,
130
- isReady: true,
131
- dummyParam: new Date().getTime().toString(),
132
- fetchLive: true,
144
+ loaded: false as boolean,
145
+ title: '' as string,
146
+ emission: undefined as Emission | undefined,
147
+ error: false as boolean,
148
+ rssEmission: false as boolean,
149
+ ftpEmission: false as boolean,
150
+ exclusive: false as boolean,
151
+ notExclusive: false as boolean,
152
+ isReady: true as boolean,
153
+ dummyParam: new Date().getTime().toString() as string,
154
+ fetchLive: true as boolean,
133
155
  };
134
156
  },
135
-
157
+
136
158
  computed: {
137
- organisationId() {
159
+ organisationId(): string {
138
160
  return state.generalParameters.organisationId;
139
161
  },
140
- authenticated():boolean {
162
+ authenticated(): boolean {
141
163
  return state.generalParameters.authenticated;
142
164
  },
143
-
144
- isEditBox() {
165
+ isEditBox(): boolean {
145
166
  return state.podcastPage.EditBox;
146
167
  },
147
- isShareButtons() {
168
+ isShareButtons(): boolean {
148
169
  return state.podcastPage.ShareButtons;
149
170
  },
150
- isSharePlayer() {
171
+ isSharePlayer(): boolean {
151
172
  return state.podcastPage.SharePlayer;
152
173
  },
153
- isShareDistribution() {
174
+ isShareDistribution(): boolean {
154
175
  return state.podcastPage.ShareDistribution;
155
176
  },
156
- isOuestFrance() {
177
+ isOuestFrance(): boolean {
157
178
  return state.emissionPage.ouestFranceStyle;
158
179
  },
159
- isRssButton() {
180
+ isRssButton(): boolean {
160
181
  return state.emissionPage.rssButton;
161
182
  },
162
- isPodcastmaker() {
183
+ isPodcastmaker(): boolean {
163
184
  return state.generalParameters.podcastmaker;
164
185
  },
165
- rssUrl():string {
186
+ rssUrl(): string {
166
187
  return state.generalParameters.ApiUri + 'rss/emission/' + this.emissionId;
167
188
  },
168
- name():string {
189
+ name(): string {
169
190
  return this.emission ? this.emission.name : '';
170
191
  },
171
-
172
- imageUrl():string {
192
+ imageUrl(): string {
173
193
  return this.emission
174
194
  ? this.emission.imageUrl + '?dummy=' + this.dummyParam
175
195
  : '';
176
196
  },
177
-
178
- description():string {
197
+ description(): string {
179
198
  return this.emission ? this.emission.description : '';
180
199
  },
181
-
182
- editRight() {
200
+ editRight(): boolean {
183
201
  if (
184
- (this.authenticated && this.organisationId === this.emission.orga.id) ||
202
+ (this.authenticated && this.emission && this.organisationId === this.emission.orga.id) ||
185
203
  state.generalParameters.isAdmin
186
204
  )
187
205
  return true;
188
206
  return false;
189
207
  },
190
- countLink() {
208
+ countLink(): number {
191
209
  let count = 0;
192
210
  if (this.emission && this.emission.annotations) {
211
+ if (undefined !== this.emission.annotations.amazon) count++;
193
212
  if (undefined !== this.emission.annotations.applePodcast) count++;
194
213
  if (undefined !== this.emission.annotations.deezer) count++;
195
214
  if (undefined !== this.emission.annotations.spotify) count++;
196
215
  if (undefined !== this.emission.annotations.tunein) count++;
197
- if (undefined !== this.emission.annotations.tootak) count++;
198
216
  if (undefined !== this.emission.annotations.radioline) count++;
217
+ if (undefined !== this.emission.annotations.podcastAddict) count++;
218
+ if (undefined !== this.emission.annotations.playerFm) count++;
219
+ if (undefined !== this.emission.annotations.stitcher) count++;
199
220
  }
200
221
  return count;
201
222
  },
202
223
  },
203
-
204
224
  watch: {
205
- emissionId(val) {
225
+ emissionId(): void {
206
226
  this.loaded = false;
207
227
  this.error = false;
208
- this.getEmissionDetails(val);
228
+ this.getEmissionDetails();
209
229
  },
210
230
  },
211
231
 
232
+ mounted() {
233
+ this.getEmissionDetails();
234
+ },
212
235
  methods: {
213
- async getEmissionDetails(emissionId:number) {
236
+ async getEmissionDetails(): Promise<void> {
214
237
  try {
215
- const data = await octopusApi.fetchEmission(emissionId);
238
+ const data: Emission = await octopusApi.fetchEmission(this.emissionId);
216
239
  this.emission = data;
217
240
  this.$emit('emissionTitle', this.name);
218
241
  this.loaded = true;
@@ -220,6 +243,9 @@ export default defineComponent({
220
243
  if (this.emission.annotations.RSS) {
221
244
  this.rssEmission = true;
222
245
  }
246
+ if (this.emission.annotations.FTP) {
247
+ this.ftpEmission = true;
248
+ }
223
249
  if (this.emission.annotations.exclusive) {
224
250
  this.exclusive =
225
251
  'true' === this.emission.annotations.exclusive ? true : false;
@@ -243,5 +269,7 @@ export default defineComponent({
243
269
  } */
244
270
  },
245
271
  },
246
- });
272
+ })
247
273
  </script>
274
+
275
+ <style lang="scss"></style>
@@ -1,154 +1,175 @@
1
1
  <template>
2
2
  <div class="page-box">
3
- <h1 v-if="undefined === titlePage">{{ $t('All emissions') }}</h1>
4
- <h1 v-else>{{ titlePage }}</h1>
3
+ <h1 v-if="undefined === titlePage">
4
+ {{ $t('All emissions') }}
5
+ </h1>
6
+ <h1 v-else>
7
+ {{ titlePage }}
8
+ </h1>
5
9
  <ProductorSearch
10
+ v-if="isProductorSearch"
6
11
  v-model:organisationId="organisationId"
7
- :searchPattern="searchPattern"
12
+ :search-pattern="searchPattern"
8
13
  type="emission"
9
14
  @updateOrganisationId="updateOrganisationId"
10
15
  @updateSearchPattern="updateSearchPattern"
11
- v-if="isProductorSearch"
12
16
  />
13
17
  <AdvancedSearch
14
- :isEducation="isEducation"
15
- :resetRubriquage="resetRubriquage"
16
- :isEmission="true"
17
- :isSearchBar="isProductorSearch"
18
- :sortCriteria="sortEmission"
19
- @updateRubriquage="updateRubriquage"
20
- @updateRubrique="updateRubrique"
18
+ :is-education="isEducation"
19
+ :reset-rubriquage="resetRubriquage"
20
+ :is-emission="true"
21
+ :is-search-bar="isProductorSearch"
22
+ :sort-criteria="sortEmission"
23
+ :organisation-id="organisationId"
24
+ @updateCategory="updateCategory"
25
+ @updateRubriquageFilter="updateRubriquageFilter"
21
26
  @updateMonetization="updateMonetization"
22
27
  @updateFromDate="updateFromDate"
23
28
  @updateToDate="updateToDate"
24
29
  @updateSortCriteria="updateSortEmission"
25
30
  @includeHidden="updateHidden"
26
- :organisationId="organisationId"
27
31
  />
28
32
  <EmissionList
29
- :showCount="true"
33
+ :show-count="true"
30
34
  :first="first"
31
35
  :size="size"
32
36
  :query="searchPattern"
33
- :organisationId="organisationId"
37
+ :organisation-id="organisationId"
34
38
  :monetization="monetization"
35
- :rubriqueId="rubriqueId"
36
- :rubriquageId="rubriquageId"
37
39
  :before="toDate"
38
40
  :after="fromDate"
39
41
  :sort="sortEmission"
40
- :noRubrique="noRubrique"
41
- :includeHidden="includeHidden"
42
+ :include-hidden="includeHidden"
43
+ :iab-id="iabId"
44
+
45
+ :rubrique-id="rubriqueId"
46
+ :rubriquage-id="rubriquageId"
47
+ :no-rubriquage-id="noRubriquageId"
42
48
  />
43
49
  </div>
44
50
  </template>
45
- <style lang="scss"></style>
51
+
46
52
  <script lang="ts">
47
- // @ is an alias to /src
48
53
  import EmissionList from '../display/emission/EmissionList.vue';
49
- import ProductorSearch from '../display/filter/ProductorSearch.vue';
50
54
  import AdvancedSearch from '../display/filter/AdvancedSearch.vue';
51
55
  import { state } from '../../store/paramStore';
52
56
 
53
- import { defineComponent } from 'vue'
57
+ import { Category } from '@/store/class/category';
58
+ import { RubriquageFilter } from '@/store/class/rubriquageFilter';
59
+ import { defineComponent, defineAsyncComponent } from 'vue';
60
+ const ProductorSearch = defineAsyncComponent(() => import('../display/filter/ProductorSearch.vue'));
54
61
  export default defineComponent({
55
62
  components: {
56
63
  ProductorSearch,
57
64
  EmissionList,
58
65
  AdvancedSearch,
59
66
  },
60
-
61
- props: ['isEducation'],
62
-
63
- created() {
64
- if (this.$route.query.first) {
65
- this.first = this.$route.query.first;
66
- } else {
67
- this.first = 0;
68
- }
69
- if (this.$route.query.size) {
70
- this.size = this.$route.query.size;
71
- } else {
72
- this.size = 12;
73
- }
74
- if (this.$route.query.productor) {
75
- this.organisationId = this.$route.query.productor;
76
- }
67
+ props: {
68
+ firstRoute: { default: 0, type: Number},
69
+ sizeRoute: { default: 12, type: Number},
70
+ productor: { default: undefined, type: String},
71
+ isEducation: { default: false, type: Boolean},
77
72
  },
78
73
 
79
74
  data() {
80
75
  return {
81
- first: undefined as any,
82
- size: undefined as any,
83
- searchPattern: '',
84
- organisationId: undefined as any,
85
- monetization: undefined as any,
86
- rubriquageId: undefined as any,
87
- rubriqueId: undefined as any,
88
- emissionId: undefined as any,
89
- fromDate: undefined as any,
90
- toDate: undefined as any,
91
- resetRubriquage: false,
92
- includeHidden: false,
93
- sortEmission: 'LAST_PODCAST_DESC',
94
- noRubrique: undefined as any,
76
+ first: 0 as number,
77
+ size: 12 as number,
78
+ searchPattern: '' as string,
79
+ organisationId: undefined as string | undefined,
80
+ monetization: 'UNDEFINED' as string, // UNDEFINED, YES, NO
81
+ emissionId: undefined as number | undefined,
82
+ iabId: undefined as number | undefined,
83
+ fromDate: undefined as string | undefined,
84
+ toDate: undefined as string | undefined,
85
+ resetRubriquage: false as boolean,
86
+ includeHidden: false as boolean,
87
+ sortEmission: 'LAST_PODCAST_DESC' as string, // SCORE, DATE, POPULARITY, NAME, LAST_PODCAST_DESC
88
+ noRubriquageId: [] as Array<number>,
89
+ rubriquageId: [] as Array<number>,
90
+ rubriqueId: [] as Array<number>,
95
91
  };
96
92
  },
97
-
93
+
98
94
  computed: {
99
- isProductorSearch() {
95
+ rubriqueFilter(): Array<RubriquageFilter>{
96
+ return this.$store.state.filter.rubriqueFilter;
97
+ },
98
+ categoryFilter(): Category|undefined{
99
+ return this.$store.state.filter.iab;
100
+ },
101
+ isProductorSearch(): boolean {
100
102
  return state.podcastsPage.ProductorSearch;
101
103
  },
102
- isMonetizableFilter() {
104
+ isMonetizableFilter(): boolean {
103
105
  return state.podcastsPage.MonetizableFilter;
104
106
  },
105
- titlePage() {
107
+ titlePage(): string|undefined {
106
108
  return state.emissionsPage.titlePage;
107
109
  },
108
110
  },
109
111
 
112
+ created() {
113
+ if (this.firstRoute) {
114
+ this.first = this.firstRoute;
115
+ }
116
+ if (this.sizeRoute) {
117
+ this.size = this.sizeRoute;
118
+ }
119
+ if(this.categoryFilter){
120
+ this.iabId = this.categoryFilter.id;
121
+ }
122
+ if (this.productor) {
123
+ this.organisationId = this.productor;
124
+ } else if (this.$store.state.filter.organisationId) {
125
+ this.organisationId = this.$store.state.filter.organisationId;
126
+ }
127
+ if(this.rubriqueFilter.length){
128
+ this.updateRubriquageFilter(this.rubriqueFilter);
129
+ }
130
+ },
110
131
  methods: {
111
- updateHidden(value: boolean) {
132
+ updateHidden(value: boolean): void {
112
133
  this.includeHidden = value;
113
134
  },
114
- updateSortEmission(value: string) {
135
+ updateSortEmission(value: string): void {
115
136
  this.sortEmission = value;
116
137
  },
117
- updateToDate(value: any) {
138
+ updateToDate(value: string): void {
118
139
  this.toDate = value;
119
140
  },
120
- updateFromDate(value: any) {
141
+ updateFromDate(value: string): void {
121
142
  this.fromDate = value;
122
143
  },
123
- updateRubriquage(value: number) {
124
- if (-1 !== value) {
125
- this.rubriquageId = value;
126
- } else {
127
- this.rubriquageId = undefined;
128
- }
129
- this.noRubrique = undefined;
130
- this.rubriqueId = undefined;
144
+ updateCategory(value: number|undefined){
145
+ this.iabId = value;
131
146
  },
132
- updateRubrique(value: number) {
133
- if (-1 === value) {
134
- this.noRubrique = true;
135
- this.rubriqueId = undefined;
136
- } else if (0 === value) {
137
- this.rubriqueId = undefined;
138
- this.noRubrique = undefined;
139
- } else {
140
- this.rubriqueId = value;
141
- this.noRubrique = undefined;
147
+ updateRubriquageFilter(value: Array<RubriquageFilter>){
148
+ const length = value.length;
149
+ const allRubriquageId: Array<number>= [];
150
+ const noRubriquageId: Array<number>= [];
151
+ const rubriqueId: Array<number>= [];
152
+ for (let index = 0; index < length; index++) {
153
+ if(-1===value[index].rubriqueId){
154
+ noRubriquageId.push(value[index].rubriquageId);
155
+ } else if(0===value[index].rubriqueId){
156
+ allRubriquageId.push(value[index].rubriquageId);
157
+ }else{
158
+ rubriqueId.push(value[index].rubriqueId);
159
+ }
142
160
  }
161
+ this.rubriquageId = allRubriquageId;
162
+ this.rubriqueId = rubriqueId;
163
+ this.noRubriquageId = noRubriquageId;
143
164
  },
144
- updateOrganisationId(value: any) {
165
+ updateOrganisationId(value: string | undefined): void {
145
166
  this.resetRubriquage = !this.resetRubriquage;
146
- this.rubriquageId = undefined;
147
- this.rubriqueId = undefined;
148
- this.noRubrique = undefined;
167
+ this.rubriquageId = [];
168
+ this.rubriqueId = [];
169
+ this.noRubriquageId = [];
149
170
  this.organisationId = value;
150
171
  },
151
- updateSearchPattern(value: string) {
172
+ updateSearchPattern(value: string): void {
152
173
  if ('' !== value) {
153
174
  this.sortEmission = 'SCORE';
154
175
  } else {
@@ -156,9 +177,11 @@ export default defineComponent({
156
177
  }
157
178
  this.searchPattern = value;
158
179
  },
159
- updateMonetization(value: any) {
180
+ updateMonetization(value: string): void {
160
181
  this.monetization = value;
161
182
  },
162
183
  },
163
- });
184
+ })
164
185
  </script>
186
+
187
+ <style lang="scss"></style>