@saooti/octopus-sdk 1.0.0 → 1.1.1

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 (317) hide show
  1. package/README.md +261 -0
  2. package/index.d.ts +4 -0
  3. package/index.ts +55 -3
  4. package/package.json +53 -45
  5. package/public/config.ts +4 -0
  6. package/public/css/fonts/icomoon.eot +0 -0
  7. package/public/css/fonts/icomoon.svg +129 -0
  8. package/public/css/fonts/icomoon.ttf +0 -0
  9. package/public/css/fonts/icomoon.woff +0 -0
  10. package/public/css/fonts/style.css +186 -1224
  11. package/public/img/403.jpeg +0 -0
  12. package/public/img/404.svg +242 -0
  13. package/public/img/ACPM.png +0 -0
  14. package/public/img/ouest_france_logo.svg +12 -0
  15. package/src/App.vue +102 -31
  16. package/src/api/classicCrud.ts +34 -0
  17. package/src/api/initialize.ts +5 -2
  18. package/src/assets/bootstrap-diff.scss +197 -0
  19. package/src/assets/form.scss +77 -77
  20. package/src/assets/general.scss +284 -272
  21. package/src/assets/live.scss +39 -0
  22. package/src/assets/modal.scss +43 -50
  23. package/src/assets/multiselect.scss +522 -573
  24. package/src/assets/octopus-library.scss +18 -4
  25. package/src/assets/share.scss +243 -0
  26. package/src/assets/transition.scss +98 -2
  27. package/src/components/display/aggregator/RssSection.vue +3 -5
  28. package/src/components/display/categories/CategoryChooser.vue +151 -114
  29. package/src/components/display/categories/CategoryFilter.vue +162 -0
  30. package/src/components/display/categories/CategoryList.vue +149 -117
  31. package/src/components/display/comments/AddCommentModal.vue +103 -108
  32. package/src/components/display/comments/CommentBasicView.vue +95 -0
  33. package/src/components/display/comments/CommentInput.vue +195 -183
  34. package/src/components/display/comments/CommentItem.vue +170 -208
  35. package/src/components/display/comments/CommentList.vue +134 -228
  36. package/src/components/display/comments/CommentParentInfo.vue +28 -62
  37. package/src/components/display/comments/CommentPlayer.vue +53 -56
  38. package/src/components/display/comments/CommentSection.vue +52 -83
  39. package/src/components/display/edit/EditBox.vue +10 -4
  40. package/src/components/display/edit/EditCommentBox.vue +124 -38
  41. package/src/components/display/emission/EmissionChooser.vue +88 -108
  42. package/src/components/display/emission/EmissionInlineList.vue +156 -157
  43. package/src/components/display/emission/EmissionItem.vue +72 -226
  44. package/src/components/display/emission/EmissionList.vue +159 -201
  45. package/src/components/display/emission/EmissionPlayerItem.vue +203 -174
  46. package/src/components/display/filter/AdvancedSearch.vue +224 -432
  47. package/src/components/display/filter/CategoryFilter.vue +105 -0
  48. package/src/components/display/filter/MonetizableFilter.vue +18 -15
  49. package/src/components/display/filter/ProductorSearch.vue +153 -176
  50. package/src/components/display/filter/RubriqueChoice.vue +97 -0
  51. package/src/components/display/filter/RubriqueFilter.vue +232 -0
  52. package/src/components/display/list/ListPaginate.vue +145 -0
  53. package/src/components/display/list/Paginate.vue +218 -0
  54. package/src/components/display/live/CountDown.vue +31 -30
  55. package/src/components/display/live/LiveHorizontalList.vue +84 -62
  56. package/src/components/display/live/LiveItem.vue +161 -186
  57. package/src/components/display/live/LiveList.vue +184 -295
  58. package/src/components/display/organisation/OrganisationChooser.vue +124 -162
  59. package/src/components/display/organisation/OrganisationChooserLight.vue +53 -56
  60. package/src/components/display/participant/ParticipantItem.vue +91 -128
  61. package/src/components/display/participant/ParticipantList.vue +134 -121
  62. package/src/components/display/playlist/PlaylistItem.vue +60 -97
  63. package/src/components/display/playlist/PlaylistList.vue +99 -92
  64. package/src/components/display/playlist/PodcastList.vue +117 -132
  65. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +191 -0
  66. package/src/components/display/podcasts/AnimatorsItem.vue +29 -37
  67. package/src/components/display/podcasts/ParticipantDescription.vue +82 -0
  68. package/src/components/display/podcasts/PodcastFilterList.vue +49 -102
  69. package/src/components/display/podcasts/PodcastImage.vue +208 -225
  70. package/src/components/display/podcasts/PodcastInlineList.vue +62 -355
  71. package/src/components/display/podcasts/PodcastInlineListClassic.vue +240 -0
  72. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +167 -0
  73. package/src/components/display/podcasts/PodcastItem.vue +94 -218
  74. package/src/components/display/podcasts/PodcastItemInfo.vue +166 -0
  75. package/src/components/display/podcasts/PodcastList.vue +127 -178
  76. package/src/components/display/podcasts/PodcastModuleBox.vue +234 -0
  77. package/src/components/display/podcasts/PodcastPlayBar.vue +101 -0
  78. package/src/components/display/podcasts/PodcastSwiperList.vue +204 -0
  79. package/src/components/display/podcasts/TagList.vue +60 -38
  80. package/src/components/display/rubriques/RubriqueChooser.vue +144 -131
  81. package/src/components/display/rubriques/RubriqueList.vue +216 -0
  82. package/src/components/display/sharing/PlayerParameters.vue +111 -153
  83. package/src/components/display/sharing/QrCode.vue +96 -0
  84. package/src/components/display/sharing/ShareButtons.vue +63 -233
  85. package/src/components/display/sharing/ShareButtonsIntern.vue +225 -0
  86. package/src/components/display/sharing/ShareDistribution.vue +102 -166
  87. package/src/components/display/sharing/SharePlayer.vue +189 -353
  88. package/src/components/display/sharing/SharePlayerColors.vue +78 -0
  89. package/src/components/display/sharing/SharePlayerTypes.vue +112 -0
  90. package/src/components/display/sharing/SplitButton.vue +42 -0
  91. package/src/components/display/sharing/SubscribeButtons.vue +65 -118
  92. package/src/components/display/studio/RecordingItemButton.vue +3 -5
  93. package/src/components/form/ClassicCheckbox.vue +66 -0
  94. package/src/components/form/ClassicLoading.vue +28 -0
  95. package/src/components/form/ClassicRadio.vue +66 -0
  96. package/src/components/form/ClassicSearch.vue +86 -0
  97. package/src/components/form/ClassicSelect.vue +65 -0
  98. package/src/components/misc/ErrorMessage.vue +27 -18
  99. package/src/components/misc/Footer.vue +151 -108
  100. package/src/components/misc/HomeDropdown.vue +95 -154
  101. package/src/components/misc/LeftMenu.vue +137 -206
  102. package/src/components/misc/Popover.vue +118 -0
  103. package/src/components/misc/Snackbar.vue +73 -37
  104. package/src/components/misc/TopBar.vue +211 -314
  105. package/src/components/misc/modal/ClipboardModal.vue +34 -47
  106. package/src/components/misc/modal/MessageModal.vue +74 -53
  107. package/src/components/misc/modal/NewsletterModal.vue +272 -224
  108. package/src/components/misc/modal/QrCodeModal.vue +58 -0
  109. package/src/components/misc/modal/ShareModalPlayer.vue +140 -74
  110. package/src/components/misc/player/Player.vue +146 -0
  111. package/src/components/misc/player/PlayerCompact.vue +154 -0
  112. package/src/components/misc/player/PlayerLarge.vue +166 -0
  113. package/src/components/misc/player/PlayerProgressBar.vue +112 -0
  114. package/src/components/misc/player/PlayerTimeline.vue +61 -0
  115. package/src/components/mixins/functions.ts +21 -18
  116. package/src/components/mixins/handle403.ts +17 -0
  117. package/src/components/mixins/init.ts +24 -0
  118. package/src/components/mixins/orgaComputed.ts +15 -0
  119. package/src/components/mixins/organisationFilter.ts +41 -0
  120. package/src/components/mixins/player/playerComment.ts +98 -0
  121. package/src/components/mixins/player/playerDisplay.ts +113 -0
  122. package/src/components/mixins/player/playerLive.ts +111 -0
  123. package/src/components/mixins/player/playerLogic.ts +225 -0
  124. package/src/components/mixins/tagOfMixins.ts +19 -0
  125. package/src/components/pages/Category.vue +24 -28
  126. package/src/components/pages/Emission.vue +144 -177
  127. package/src/components/pages/Emissions.vue +94 -110
  128. package/src/components/pages/Error403Page.vue +60 -0
  129. package/src/components/pages/Home.vue +74 -21
  130. package/src/components/pages/Lives.vue +53 -58
  131. package/src/components/pages/PageNotFound.vue +55 -0
  132. package/src/components/pages/Participant.vue +113 -129
  133. package/src/components/pages/Participants.vue +25 -41
  134. package/src/components/pages/Playlist.vue +86 -86
  135. package/src/components/pages/Playlists.vue +33 -52
  136. package/src/components/pages/Podcast.vue +206 -478
  137. package/src/components/pages/Podcasts.vue +112 -156
  138. package/src/components/pages/Rubrique.vue +21 -27
  139. package/src/components/pages/Search.vue +37 -94
  140. package/src/helper/dom.ts +2 -2
  141. package/src/helper/duration.ts +18 -8
  142. package/src/helper/useEventListener.ts +18 -0
  143. package/src/i18n.ts +36 -0
  144. package/src/locale/de.ts +309 -0
  145. package/src/locale/educationen.ts +14 -0
  146. package/src/locale/en.ts +316 -1
  147. package/src/locale/es.ts +309 -0
  148. package/src/locale/fr.ts +47 -15
  149. package/src/locale/it.ts +307 -0
  150. package/src/locale/messages.ts +11 -2
  151. package/src/locale/sl.ts +309 -0
  152. package/src/main.ts +64 -55
  153. package/src/router/router.ts +192 -159
  154. package/src/sass/_variables.scss +10 -8
  155. package/src/shims-tsx.d.ts +15 -0
  156. package/src/shims-vue-recaptcha-v3.d.ts +9 -0
  157. package/src/shims-vue.d.ts +5 -6
  158. package/src/store/AppStore.ts +41 -173
  159. package/src/store/class/adserver/adserverConfig.ts +9 -0
  160. package/src/store/class/adserver/adserverOtherEmission.ts +13 -0
  161. package/src/store/class/adserver/adserverTiming.ts +10 -0
  162. package/src/store/class/cartouchier/cartouche.ts +15 -0
  163. package/src/store/class/cartouchier/cartouchier.ts +9 -0
  164. package/src/store/class/conference/conference.ts +35 -0
  165. package/src/store/class/conference/conferenceMessage.ts +10 -0
  166. package/src/store/class/conference/conferenceParticipant.ts +18 -0
  167. package/src/store/class/conference/pad.ts +15 -0
  168. package/src/store/class/conference/studioCall.ts +7 -0
  169. package/src/store/class/contract/contract.ts +7 -0
  170. package/src/store/class/contract/contractOrganisation.ts +7 -0
  171. package/src/store/class/ftp/ftpEmission.ts +41 -0
  172. package/src/store/class/ftp/ftpParam.ts +12 -0
  173. package/src/store/class/ftp/testFtpEmission.ts +5 -0
  174. package/src/store/class/general/audioView.ts +21 -0
  175. package/src/store/class/general/category.ts +10 -0
  176. package/src/store/class/general/comment.ts +16 -0
  177. package/src/store/class/general/customPlayer.ts +9 -0
  178. package/src/store/class/general/emission.ts +23 -0
  179. package/src/store/class/general/fetchParam.ts +3 -0
  180. package/src/store/class/general/initState.ts +25 -0
  181. package/src/store/class/general/interfacePageable.ts +16 -0
  182. package/src/store/class/general/ituneCategory.ts +5 -0
  183. package/src/store/class/general/media.ts +14 -0
  184. package/src/store/class/general/organisation.ts +20 -0
  185. package/src/store/class/general/pageable.ts +13 -0
  186. package/src/store/class/general/participant.ts +12 -0
  187. package/src/store/class/general/player.ts +14 -0
  188. package/src/store/class/general/playlist.ts +13 -0
  189. package/src/store/class/general/podcast.ts +43 -0
  190. package/src/store/class/general/sortPageable.ts +5 -0
  191. package/src/store/class/general/soundcastCategory.ts +8 -0
  192. package/src/store/class/ouestFrance/ofTag.ts +36 -0
  193. package/src/store/class/ouestFrance/ofTagInfo.ts +9 -0
  194. package/src/store/class/ouestFrance/ofTagPage.ts +7 -0
  195. package/src/store/class/ouestFrance/ofTagSeo.ts +7 -0
  196. package/src/store/class/ouestFrance/ofTagVente.ts +6 -0
  197. package/src/store/class/ouestFrance/ofTagWithParents.ts +26 -0
  198. package/src/store/class/rss/aggregator.ts +28 -0
  199. package/src/store/class/rss/rssEmission.ts +14 -0
  200. package/src/store/class/rss/rssInfo.ts +8 -0
  201. package/src/store/class/rubrique/rubriquage.ts +10 -0
  202. package/src/store/class/rubrique/rubriquageFilter.ts +6 -0
  203. package/src/store/class/rubrique/rubrique.ts +9 -0
  204. package/src/store/class/stat/statArrayIncome.ts +6 -0
  205. package/src/store/class/stat/statArrayObject.ts +34 -0
  206. package/src/store/class/stat/statGraph.ts +7 -0
  207. package/src/store/class/user/person.ts +15 -0
  208. package/src/store/class/user/profile.ts +12 -0
  209. package/src/store/class/user/userKeycloak.ts +24 -0
  210. package/src/store/paramStore.ts +222 -217
  211. package/src/store/typeAppStore.ts +186 -235
  212. package/src/vuex-shim.d.ts +8 -0
  213. package/tsconfig.json +4 -0
  214. package/vue.config.js +16 -0
  215. package/public/css/fonts/saooti-ui.eot +0 -0
  216. package/public/css/fonts/saooti-ui.svg +0 -829
  217. package/public/css/fonts/saooti-ui.ttf +0 -0
  218. package/public/css/fonts/saooti-ui.woff +0 -0
  219. package/public/css/fonts/stitcher-logo.svg +0 -83
  220. package/public/img/ACPM.PNG +0 -0
  221. package/src/api/comments.ts +0 -7
  222. package/src/api/emissions.ts +0 -7
  223. package/src/api/podcasts.ts +0 -7
  224. package/src/api/profile.ts +0 -8
  225. package/src/api/studio.ts +0 -1
  226. package/src/assets/bootstrap_scss/_alert.scss +0 -51
  227. package/src/assets/bootstrap_scss/_badge.scss +0 -54
  228. package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
  229. package/src/assets/bootstrap_scss/_button-group.scss +0 -164
  230. package/src/assets/bootstrap_scss/_buttons.scss +0 -291
  231. package/src/assets/bootstrap_scss/_card.scss +0 -278
  232. package/src/assets/bootstrap_scss/_carousel.scss +0 -197
  233. package/src/assets/bootstrap_scss/_close.scss +0 -41
  234. package/src/assets/bootstrap_scss/_code.scss +0 -48
  235. package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
  236. package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
  237. package/src/assets/bootstrap_scss/_forms.scss +0 -352
  238. package/src/assets/bootstrap_scss/_functions.scss +0 -134
  239. package/src/assets/bootstrap_scss/_grid.scss +0 -69
  240. package/src/assets/bootstrap_scss/_images.scss +0 -42
  241. package/src/assets/bootstrap_scss/_input-group.scss +0 -191
  242. package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
  243. package/src/assets/bootstrap_scss/_list-group.scss +0 -158
  244. package/src/assets/bootstrap_scss/_media.scss +0 -8
  245. package/src/assets/bootstrap_scss/_mixins.scss +0 -47
  246. package/src/assets/bootstrap_scss/_modal.scss +0 -243
  247. package/src/assets/bootstrap_scss/_nav.scss +0 -120
  248. package/src/assets/bootstrap_scss/_navbar.scss +0 -324
  249. package/src/assets/bootstrap_scss/_pagination.scss +0 -74
  250. package/src/assets/bootstrap_scss/_popover.scss +0 -170
  251. package/src/assets/bootstrap_scss/_print.scss +0 -141
  252. package/src/assets/bootstrap_scss/_progress.scss +0 -46
  253. package/src/assets/bootstrap_scss/_reboot.scss +0 -482
  254. package/src/assets/bootstrap_scss/_root.scss +0 -20
  255. package/src/assets/bootstrap_scss/_spinners.scss +0 -55
  256. package/src/assets/bootstrap_scss/_tables.scss +0 -185
  257. package/src/assets/bootstrap_scss/_toasts.scss +0 -44
  258. package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
  259. package/src/assets/bootstrap_scss/_transitions.scss +0 -20
  260. package/src/assets/bootstrap_scss/_type.scss +0 -125
  261. package/src/assets/bootstrap_scss/_utilities.scss +0 -17
  262. package/src/assets/bootstrap_scss/_variables.scss +0 -1145
  263. package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
  264. package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
  265. package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
  266. package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
  267. package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
  268. package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
  269. package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
  270. package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
  271. package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
  272. package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
  273. package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
  274. package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
  275. package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
  276. package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
  277. package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
  278. package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
  279. package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
  280. package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
  281. package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
  282. package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
  283. package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
  284. package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
  285. package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
  286. package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
  287. package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
  288. package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
  289. package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
  290. package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
  291. package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
  292. package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
  293. package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
  294. package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
  295. package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
  296. package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
  297. package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
  298. package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
  299. package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
  300. package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
  301. package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
  302. package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
  303. package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
  304. package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
  305. package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
  306. package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
  307. package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
  308. package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
  309. package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
  310. package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
  311. package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
  312. package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
  313. package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
  314. package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
  315. package/src/components/misc/Player.vue +0 -792
  316. package/src/shims-vuex.d.ts +0 -7
  317. package/src/views/Home.vue +0 -18
@@ -1,293 +1,341 @@
1
1
  <template>
2
2
  <div>
3
- <b-modal
3
+ <div
4
4
  id="newsletter-modal"
5
- @close="closePopup"
6
- @hide="closePopup"
7
- @cancel="closePopup"
8
- :title="$t('Share newsletter')"
5
+ class="modal"
9
6
  >
10
- <template v-slot:default>
11
- <div class="d-flex justify-content-between">
12
- <div v-html="newsletterHtml"></div>
13
- <div class="d-flex flex-column flex-grow ml-4">
14
- <h4 class="mb-3">{{ $t('Configuration') }}</h4>
15
- <div class="checkbox-saooti">
16
- <input
17
- type="checkbox"
18
- class="custom-control-input"
19
- id="display-emission-name"
20
- v-model="displayEmissionName"
21
- />
22
- <label class="custom-control-label" for="display-emission-name">{{
23
- $t('Display emission name')
24
- }}</label>
25
- </div>
26
- <div class="checkbox-saooti">
27
- <input
28
- type="checkbox"
29
- class="custom-control-input"
30
- id="display-participants-names"
31
- v-model="displayParticipantsNames"
32
- />
33
- <label
34
- class="custom-control-label"
35
- for="display-participants-names"
36
- >{{ $t('Display participants list') }}</label
37
- >
38
- </div>
39
- <div class="d-flex align-items-center mt-2">
40
- <swatches
41
- v-model="color"
42
- class="c-hand input-no-outline mr-2 mt-2"
43
- show-fallback
44
- colors="text-advanced"
45
- popover-to="right"
46
- :data-color="color"
47
- ></swatches>
48
- <div>{{ $t('Choose main color') }}</div>
7
+ <div class="modal-backdrop" />
8
+ <div class="modal-dialog">
9
+ <div class="modal-content">
10
+ <div class="modal-header">
11
+ <h5 class="modal-title">
12
+ {{ $t('Share newsletter') }}
13
+ </h5>
14
+ </div>
15
+ <div class="modal-body">
16
+ <div class="d-flex justify-content-between">
17
+ <!-- eslint-disable vue/no-v-html -->
18
+ <div v-html="newsletterHtml" />
19
+ <!-- eslint-enable -->
20
+ <div class="d-flex flex-column flex-grow-1 ms-4">
21
+ <h4 class="mb-3">
22
+ {{ $t('Configuration') }}
23
+ </h4>
24
+ <label for="share-url-newsletter">{{ $t('Share') }}</label>
25
+ <input
26
+ id="share-url-newsletter"
27
+ v-model="shareUrl"
28
+ class="form-input mb-2"
29
+ type="text"
30
+ :class="{ 'border border-danger': 0 === shareUrl }"
31
+ >
32
+ <template v-if="podcast">
33
+ <ClassicCheckbox
34
+ v-model:textInit="displayEmissionName"
35
+ id-checkbox="display-emission-name"
36
+ :label="$t('Display emission name')"
37
+ />
38
+ <ClassicCheckbox
39
+ v-model:textInit="displayParticipantsNames"
40
+ id-checkbox="display-participants-names"
41
+ :label="$t('Display participants list')"
42
+ />
43
+ </template>
44
+ <div class="d-flex align-items-center mt-2">
45
+ <VSwatches
46
+ v-model="color"
47
+ class="c-hand me-2 mt-2"
48
+ show-fallback
49
+ colors="text-advanced"
50
+ popover-to="right"
51
+ :data-color="color"
52
+ />
53
+ <div>{{ $t('Choose main color') }}</div>
54
+ </div>
55
+ <div
56
+ class=" d-flex justify-content-between align-items-center mt-3 mb-2"
57
+ >
58
+ <h4 class="mb-0">
59
+ {{ $t('HTML Code') }}
60
+ </h4>
61
+ <input
62
+ type="button"
63
+ :value="$t('Copy')"
64
+ class="btn btn-primary"
65
+ :title="$t('Copy')"
66
+ @click="onCopyCode(newsletterHtml, afterCopy)"
67
+ >
68
+ </div>
69
+ <textarea
70
+ id="newsletter_code_textarea"
71
+ v-model="newsletterHtml"
72
+ readonly
73
+ @click="selectAll"
74
+ />
75
+ <label
76
+ for="newsletter_code_textarea"
77
+ :title="$t('HTML Code')"
78
+ />
79
+ </div>
49
80
  </div>
50
- <div
51
- class=" d-flex justify-content-between align-items-center mt-3 mb-2"
81
+ </div>
82
+ <div class="modal-footer">
83
+ <button
84
+ class="btn btn-primary m-1"
85
+ @click="closePopup"
52
86
  >
53
- <h4 class="mb-0">{{ $t('HTML Code') }}</h4>
54
- <input
55
- type="button"
56
- :value="$t('Copy')"
57
- class="btn btn-primary"
58
- @click="onCopyCode(newsletterHtml, afterCopy)"
59
- :aria-label="$t('Copy')"
60
- />
61
- </div>
62
- <textarea
63
- id="newsletter_code_textarea"
64
- v-model="newsletterHtml"
65
- @click="selectAll"
66
- readonly
67
- ></textarea>
68
- <label
69
- for="newsletter_code_textarea"
70
- :aria-label="$t('HTML Code')"
71
- ></label>
87
+ {{ $t('Close') }}
88
+ </button>
72
89
  </div>
73
90
  </div>
74
- </template>
75
- <template v-slot:modal-footer>
76
- <button class="btn btn-primary m-1" @click="closePopup">
77
- {{ $t('Close') }}
78
- </button>
79
- </template>
80
- </b-modal>
81
- <Snackbar ref="snackbar" position="bottom-left"></Snackbar>
91
+ </div>
92
+ </div>
93
+ <Snackbar
94
+ ref="snackbar"
95
+ position="bottom-left"
96
+ />
82
97
  </div>
83
98
  </template>
84
99
 
85
- <style lang="scss">
86
- #newsletter-modal {
87
- textarea {
88
- border: 2px solid #eee;
89
- height: 200px;
90
- padding: 1em;
91
- border-radius: 1em;
92
- &:focus {
93
- outline-width: 0;
94
- }
95
- }
96
-
97
- .modal-dialog {
98
- max-width: 60%;
99
- }
100
- }
101
- </style>
102
100
  <script lang="ts">
101
+ import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
103
102
  import Snackbar from '../../misc/Snackbar.vue';
104
- const moment = require('moment');
105
- //@ts-ignore
106
- import Swatches from 'vue-swatches';
107
- const humanizeDuration = require('humanize-duration');
103
+ import moment from 'moment';
104
+ // @ts-ignore
105
+ import VSwatches from 'vue3-swatches';
106
+ // @ts-ignore
107
+ import humanizeDuration from 'humanize-duration';
108
108
  import { displayMethods } from '../../mixins/functions';
109
+ import { Participant } from '@/store/class/general/participant';
110
+ import { Podcast } from '@/store/class/general/podcast';
111
+ import { state } from '../../../store/paramStore';
109
112
  import { defineComponent } from 'vue'
113
+ import SnackbarVue from '../../misc/Snackbar.vue';
114
+ import octopusApi from '@saooti/octopus-api';
115
+ import { Emission } from '@/store/class/general/emission';
116
+ import { Playlist } from '@/store/class/general/playlist';
110
117
  export default defineComponent({
111
118
  name: 'NewsletterModal',
112
119
 
113
- props: ['podcast'],
114
- emits: ['close'],
115
- mixins: [displayMethods],
116
-
117
120
  components: {
118
121
  Snackbar,
119
- Swatches,
122
+ VSwatches,
123
+ ClassicCheckbox
120
124
  },
121
125
 
122
- mounted() {
123
- /* this.$bvModal.show('newsletter-modal'); */
126
+ mixins: [displayMethods],
127
+
128
+ props: {
129
+ podcast: { default: undefined, type: Object as ()=> Podcast},
130
+ emission: { default: undefined, type: Object as ()=> Emission},
131
+ playlist: { default: undefined, type: Object as ()=>Playlist},
124
132
  },
125
133
 
134
+ emits: ['close'],
135
+
126
136
  data() {
127
137
  return {
128
- displayParticipantsNames: true,
129
- displayEmissionName: true,
130
- color: '#40a372',
131
- dummyParam: new Date().getTime().toString(),
138
+ displayParticipantsNames: true as boolean,
139
+ displayEmissionName: true as boolean,
140
+ color: '#40a372' as string,
141
+ shareUrl: window.location.href as string,
142
+
132
143
  };
133
144
  },
134
145
 
135
146
  computed: {
136
- snackbarRef():any {
137
- return this.$refs.snackbar;
147
+ date(): string {
148
+ if(!this.podcast || 1970 === moment(this.podcast.pubDate).year()){return '';}
149
+ return moment(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
138
150
  },
139
- emissionName():string {
140
- if (this.displayEmissionName)
141
- return (
142
- `<tr><td colspan="2" style="font-size: 16px;line-height:24px;font-weight: bold;">` +
143
- this.podcast.emission.name +
144
- `</td></tr>`
145
- );
146
- return '';
151
+ duration(): string {
152
+ if (!this.podcast || this.podcast.duration <= 1) return '';
153
+ if (this.podcast.duration > 600000) {
154
+ return humanizeDuration(this.podcast.duration, {
155
+ language: this.$i18n.locale,
156
+ largest: 1,
157
+ round: true,
158
+ });
159
+ }
160
+ return humanizeDuration(this.podcast.duration, {
161
+ language: this.$i18n.locale,
162
+ largest: 2,
163
+ round: true,
164
+ });
165
+ },
166
+ emissionName(): string {
167
+ if (!this.displayEmissionName || !this.podcast){return ''}
168
+ return (
169
+ `<tr><td colspan="2" style="font-size: 16px;line-height:24px;font-weight: bold;">${this.podcast.emission.name}</td></tr>`
170
+ );
147
171
  },
148
- participantsName() {
149
- if (!this.displayParticipantsNames || !this.podcast.animators) return '';
150
- let text = [''];
151
- this.podcast.animators.forEach((element:any) => {
172
+ articleHtml(): string{
173
+ if (!this.podcast?.article ||0 === this.podcast.article?.length){return ''}
174
+ return (`<a href="${this.podcast.article}" title="${this.$t('See associated article')}">
175
+ <img width="44" height="44" style="display: inline-block;vertical-align: middle; margin-right:3px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA6UlEQVRIie3WPUpEMRTF8R9+4QpEBGttrcdeV+E2pp3KdYi7GBRttNVCZgOCjSuQ+UCLJzLIe7l3HpFpPJAuOf+T5F4SYh3jFZ/JMVlevJUwv8c+HvEQzD/FIBEaHOFtKdkosWb0PfdHGwXzOxxk03SpDVDNvA1Q1bwNcFMwn/cB/K6iQ+3VMsVVDQDcylVMSl1VBOea5FFjTXHWZVJqtCdcYjcI+YHnPoB3FY6qdERVVNrBHi6wGXgscK3Z8UqAE80dbAeAGV4wXhUwxk5gHurP72CtgP9Gw5oabYBhT7/wwZ/If09S35Yv52lVAXwyqt0AAAAASUVORK5CYII=">
176
+ </a>
177
+ <a style="color: #000;text-decoration: none;" href="${this.podcast.article}">${this.$t('See associated article')}</a>`);
178
+ },
179
+ participantsName(): string {
180
+ if (!this.displayParticipantsNames || !this.podcast || !this.podcast.animators) return '';
181
+ const text = [''];
182
+ this.podcast.animators.forEach((element: Participant) => {
152
183
  text.push(
153
184
  `<table width='100%' style="width:100%;background: #f3f3f3;font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;border-bottom-left-radius: 1.5em;border-bottom-right-radius: 1.5em;">
154
185
  <tr>
155
186
  <td width="90" rowspan="2" style="text-align:left; vertical-align: top; width: 90px;padding:0 15px 15px 10px">
156
- <img width="72" style="width: 62px;height: 62px;border-radius: 50%;background-color: #fff;" src="` +
157
- element.imageUrl +
158
- `" alt="` +
159
- this.$t('Animator image') +
160
- `">
187
+ <img width="72" style="width: 62px;height: 62px;border-radius: 50%;background-color: #fff;" src="${element.imageUrl}" alt="${this.$t('Animator image')}">
161
188
  </td>
162
- <td height="1" style="height: 1px;text-align:left; font-size: 14px;line-height:20px;vertical-align: top;font-weight: bold;padding-top: 23px;">` +
163
- this.getName(element) +
164
- `</td>
189
+ <td height="1" style="height: 1px;text-align:left; font-size: 14px;line-height:20px;vertical-align: top;font-weight: bold;padding-top: 23px;">${this.getName(element)}</td>
165
190
  </tr>`
166
191
  );
167
192
  if (element.description) {
168
193
  text.push(
169
- `<tr>
170
- <td style="height: 100%;text-align:justify;padding-bottom: 15px;padding-right: 15px; font-size: 12px;line-height:16px;vertical-align: top">
171
- ` +
172
- element.description +
173
- `
174
- </td>
175
- </tr>`
194
+ `<tr><td style="height: 100%;text-align:justify;padding-bottom: 15px;padding-right: 15px; font-size: 12px;line-height:16px;vertical-align: top">
195
+ ${element.description}</td></tr>`
176
196
  );
177
197
  }
178
198
  text.push(`</table>`);
179
199
  });
180
200
  return text.join('');
181
201
  },
182
- newsletterHtml():string {
183
- let html = [
202
+ imageUrl():string{
203
+ if(this.podcast){
204
+ return `${this.podcast.imageUrl}" alt="${this.$t('Podcast image')}`;
205
+ }
206
+ if(this.emission){
207
+ return `${this.emission.imageUrl}" alt="${this.$t('Emission image')}`;
208
+ }
209
+ if(this.playlist){
210
+ return `${this.playlist.imageUrl}" alt="${this.$t('Playlist image')}`;
211
+ }
212
+ return '';
213
+ },
214
+ title():string{
215
+ if(this.podcast){
216
+ return this.podcast.title;
217
+ }
218
+ if(this.emission){
219
+ return this.emission.name;
220
+ }
221
+ if(this.playlist){
222
+ return this.playlist.title;
223
+ }
224
+ return '';
225
+ },
226
+ description():string{
227
+ if (this.podcast && this.podcast.description) {
228
+ return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.podcast.description}</td></tr>`;
229
+ }
230
+ if(this.emission && this.emission.description){
231
+ return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.emission.description}</td></tr>`;
232
+ }
233
+ if(this.playlist && this.playlist.description){
234
+ return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.playlist.description}</td></tr>`;
235
+ }
236
+ return '';
237
+ },
238
+ shareText():string{
239
+ if (this.podcast) {
240
+ return this.$t('Listen this episode');
241
+ }
242
+ if (this.emission) {
243
+ return this.$t('All podcast emission button');
244
+ }
245
+ return this.$t('Podcasts in the playlist');
246
+ },
247
+ durationPodcast():string{
248
+ if(!this.podcast){return ''}
249
+ return `<td colspan="2" style="height: 1px;color: #666;font-size: 12px;line-height: 16px;padding-top:15px;">
250
+ <span>${this.date}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
251
+ <span style="padding: 0 10px">${this.$t('Duration', { duration: this.duration })}</span>
252
+ </td>`;
253
+ },
254
+ newsletterHtml(): string {
255
+ const html = [
184
256
  `<table width='100%' style="width:100%;background:#f3f3f3;font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;border-top-left-radius: 1.5em;border-top-right-radius: 1.5em;">
185
- <tr>
257
+ <tr>
186
258
  <td valign="top" rowspan="4" style="vertical-align: top; padding: 10px;">
187
- <img width="140" height="140" src="` +
188
- this.podcast.imageUrl +
189
- `" alt="` +
190
- this.$t('Podcast image') +
191
- `" style="width: 140px;border-radius: 16px; box-shadow: 0px 12px 48px 6px rgba(64, 163, 114, 0.2);">
192
- </td>
193
- <td colspan="2" style="height: 1px;color: #666;font-size: 12px;line-height: 16px;padding-top:15px;">
194
- <span>` +
195
- this.date +
196
- `</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="padding: 0 10px">` +
197
- this.$t('Duration', { duration: this.duration }) +
198
- `</span>
259
+ <img width="140" height="140" src="${this.imageUrl}" style="width: 140px;border-radius: 16px; box-shadow: 0px 12px 48px 6px rgba(64, 163, 114, 0.2);">
199
260
  </td>
261
+ ${this.durationPodcast}
200
262
  </tr>
201
263
  <tr>
202
- <td colspan="2" valign="top" style="line-height:24px;color: ` +
203
- this.color +
204
- `;font-size: 17px;text-transform: uppercase;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width: 400px;padding-top: 0.5em;">
205
- ` +
206
- this.podcast.title +
207
- `
264
+ <td colspan="2" valign="top" style="line-height:24px;color: ${this.color};font-size: 17px;text-transform: uppercase;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width: 400px;padding-top: 0.5em;">
265
+ ${this.title}
208
266
  </td>
209
267
  </tr>
210
- ` +
211
- this.emissionName,
268
+ ${this.emissionName},${this.description}`
212
269
  ];
213
- if (this.podcast.description) {
214
- html.push(
215
- `<tr>
216
- <td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">
217
- ` +
218
- this.podcast.description +
219
- `
220
- </td>
221
- </tr>`
222
- );
223
- }
224
270
  html.push(
225
- `
226
- <tr>
227
- <td colspan="2" style="vertical-align: middle;padding: 15px 10px;display: flex; align-items:center;">
228
- <a href="` +
229
- window.location.href +
230
- `" aria-label="` +
231
- this.$t('Listen this episode') +
232
- `">
233
- <img width="44" height="44" style="display: inline-block;vertical-align: middle" src="` +
234
- window.location.origin +
235
- `/img/play-podcast.png">
271
+ `</table>
272
+ <div style="font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;background: #f3f3f3;vertical-align: middle;padding: 15px 10px;display: flex; align-items:center; flex-wrap:wrap">
273
+ <a href="${this.shareUrl}">
274
+ <img width="44" height="44" style="display: inline-block;vertical-align: middle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAAxElEQVRIie3WMWpCURBG4Q8FSRrtbC2SPhvICmzchVuwtXQLbsE2pVUIkjqQHVgqNmIj6EvxGHhFQAIvcxt/OPVhhrlzh3sKZ4MvTLLFVYNPvJYQB294LiGucMYSw2xxcMQcj9niYIsputni4BvjEuJgjZcS4goXrDDKFgcnLDDIFgd7zNDLFgfvTUHnL23ISJuV7iS3Ooarn1VxkeeUvkDSV2b6J3FQT+pDW8Jb4vRD4Kqe1Kf/Ev4mTj32PhQ6b+9pPT+XHgysHrPM6QAAAABJRU5ErkJggg=="/>
236
275
  </a>
237
- <a style="color: #000;text-decoration: none;" href="` +
238
- window.location.href +
239
- `">` +
240
- this.$t('Listen this episode') +
241
- `</a>
242
- </td>
243
- </tr>
244
- </table>
245
- ` +
246
- this.participantsName
276
+ <a style="color: #000;text-decoration: none; margin-right:8px" href="${this.shareUrl}">${this.shareText}</a>
277
+ ${this.articleHtml}
278
+ </div>${this.participantsName}`
247
279
  );
248
280
  return html.join('');
249
281
  },
250
- date():string {
251
- if (1970 !== moment(this.podcast.pubDate).year())
252
- return moment(this.podcast.pubDate).format('D MMMM YYYY [à] HH[h]mm');
253
- return '';
254
- },
255
- duration():string {
256
- if (this.podcast.duration <= 1) return '';
257
- if (this.podcast.duration > 600000) {
258
- return humanizeDuration(this.podcast.duration, {
259
- language: 'fr',
260
- largest: 1,
261
- round: true,
262
- });
263
- }
264
- return humanizeDuration(this.podcast.duration, {
265
- language: 'fr',
266
- largest: 2,
267
- round: true,
268
- });
269
- },
270
282
  },
271
-
283
+ created(){
284
+ this.initData();
285
+ },
272
286
  methods: {
273
- closePopup(event: { preventDefault: () => void; }) {
287
+ closePopup(event: { preventDefault: () => void }): void {
274
288
  event.preventDefault();
275
289
  this.$emit('close');
276
290
  },
277
-
278
- getName(person:any) {
279
- const first = person.firstName || '';
280
- const last = person.lastName || '';
281
- return (first + ' ' + last).trim();
291
+ getName(person: Participant): string {
292
+ return (`${person.firstName??''} ${person.lastName??''}`).trim();
282
293
  },
283
-
284
- selectAll(element: any) {
285
- element.target.focus();
286
- element.target.select();
294
+ selectAll(element: Event): void {
295
+ const target = element.target;
296
+ if(null!==target){
297
+ (target as HTMLInputElement).focus();
298
+ (target as HTMLInputElement).select();
299
+ }
300
+ },
301
+ afterCopy(): void{
302
+ (this.$refs.snackbar as InstanceType<typeof SnackbarVue>).open(this.$t('Data in clipboard'));
303
+ },
304
+ async initData(): Promise<void> {
305
+ let attributes;
306
+ if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
307
+ attributes = this.$store.state.organisation.attributes;
308
+ }else{
309
+ attributes = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
310
+ }
311
+ if (Object.prototype.hasOwnProperty.call(attributes,'podcastmakerUrl')) {
312
+ this.shareUrl = attributes.podcastmakerUrl + window.location.pathname+window.location.search;
313
+ }
314
+ if(state.generalParameters.podcastmaker && state.generalParameters.podcastmakerColor){
315
+ this.color = state.generalParameters.podcastmakerColor;
316
+ return;
317
+ }
318
+ if (Object.prototype.hasOwnProperty.call(attributes,'COLOR')) {
319
+ this.color = attributes.COLOR;
320
+ }
287
321
  },
288
- afterCopy(){
289
- this.snackbarRef.open(this.$t('Data in clipboard'));
290
- }
291
322
  },
292
- });
323
+ })
293
324
  </script>
325
+
326
+ <style lang="scss">
327
+ .octopus-app{
328
+ #newsletter-modal {
329
+ textarea {
330
+ border: 2px solid #eee;
331
+ height: 200px;
332
+ padding: 1em;
333
+ border-radius: 1em;
334
+ }
335
+
336
+ .modal-dialog {
337
+ max-width: 60%;
338
+ }
339
+ }
340
+ }
341
+ </style>
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <div
3
+ id="qrcode-modal"
4
+ class="modal"
5
+ >
6
+ <div class="modal-backdrop" />
7
+ <div class="modal-dialog">
8
+ <div class="modal-content">
9
+ <div class="modal-header">
10
+ <h5 class="modal-title">
11
+ {{ $t('Share QR Code') }}
12
+ </h5>
13
+ <button
14
+ ref="focusElement"
15
+ type="button"
16
+ class="btn-close btn-close-white"
17
+ title="Close"
18
+ @click="closePopup"
19
+ />
20
+ </div>
21
+ <div class="modal-body">
22
+ <QrCode :url="urlPage" />
23
+ </div>
24
+ <div class="modal-footer">
25
+ <button
26
+ class="btn btn-primary m-1"
27
+ @click="closePopup"
28
+ >
29
+ {{ $t('Close') }}
30
+ </button>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <script lang="ts">
38
+ import QrCode from '../../display/sharing/QrCode.vue';
39
+ import { defineComponent } from 'vue'
40
+ export default defineComponent({
41
+ name: 'QrCodeModal',
42
+ components: {
43
+ QrCode
44
+ },
45
+ props: {
46
+ urlPage: { default: undefined, type: String},
47
+ },
48
+ emits: ['close'],
49
+ mounted(){
50
+ (this.$refs.focusElement as HTMLElement)?.focus();
51
+ },
52
+ methods:{
53
+ closePopup(): void {
54
+ this.$emit('close');
55
+ },
56
+ }
57
+ })
58
+ </script>