@saooti/octopus-sdk 29.0.7 → 29.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -472,6 +472,10 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
472
472
  * 29.0.5 vue3
473
473
  * 29.0.6 vue3
474
474
  * 29.0.7 Nouvelle version api
475
+ * 29.0.8 Nouvelle version api
476
+ * 29.0.9 vue3
477
+ * 29.0.10 vue3
478
+ * 29.0.11 Popover (encore il est dur ce popover)
475
479
 
476
480
 
477
481
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "29.0.7",
3
+ "version": "29.0.11",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -1,16 +1,16 @@
1
- .octopus-app{
2
- html{
3
- font-size: 20px;
4
- }
5
-
6
- body{
7
- color: #353535;
8
- font-family: Montserrat,sans-serif,Helvetica Neue;
9
- font-size: 0.8rem;
10
- overflow-x: hidden;
11
- background: #fff;
12
- }
13
1
 
2
+ html{
3
+ font-size: 20px;
4
+ }
5
+
6
+ body{
7
+ color: #353535;
8
+ font-family: Montserrat,sans-serif,Helvetica Neue;
9
+ font-size: 0.8rem;
10
+ overflow-x: hidden;
11
+ background: #fff;
12
+ }
13
+ .octopus-app{
14
14
  h1{
15
15
  font-size: 1.8rem;
16
16
  text-align: center;
@@ -31,7 +31,9 @@
31
31
  <template v-else>
32
32
  {{ filter.nameRubriquage }}
33
33
  </template>
34
- <div class="mx-1">:</div>
34
+ <div class="mx-1">
35
+ :
36
+ </div>
35
37
  <RubriqueChooser
36
38
  v-if="getRubriques(filter.rubriquageId).length"
37
39
  class="ms-2 multiselect-transparent"
@@ -39,7 +41,7 @@
39
41
  :rubriquage-id="filter.rubriquageId"
40
42
  :rubrique-selected="filter.rubriqueId"
41
43
  :all-rubriques="getRubriques(filter.rubriquageId)"
42
- :cannotBeUndefined="true"
44
+ :cannot-be-undefined="true"
43
45
  width="auto"
44
46
  @selected="onRubriqueSelected(index,$event)"
45
47
  />
@@ -370,6 +370,7 @@ export default defineComponent({
370
370
 
371
371
  > span {
372
372
  width: 0.1rem;
373
+ margin: 0.05rem;
373
374
  background: #fff;
374
375
  }
375
376
 
@@ -0,0 +1,306 @@
1
+ <template>
2
+ <div class="module-box">
3
+ <h2
4
+ v-if="!isOuestFrance"
5
+ class="text-uppercase fw-bold title-page-podcast"
6
+ >
7
+ {{ podcast.title }}
8
+ </h2>
9
+ <router-link
10
+ v-else
11
+ :to="{
12
+ name: 'emission',
13
+ params: { emissionId: podcast.emission.emissionId },
14
+ query: { productor: $store.state.filter.organisationId },
15
+ }"
16
+ >
17
+ <h1>{{ podcast.emission.name }}</h1>
18
+ </router-link>
19
+ <div class="mb-5 mt-3 d-flex">
20
+ <div class="w-100">
21
+ <PodcastImage
22
+ :class="[
23
+ !isOuestFrance && !isLiveReadyToRecord
24
+ ? 'shadow-element'
25
+ : '',
26
+ isLiveReadyToRecord &&
27
+ fetchConference &&
28
+ 'null' !== fetchConference &&
29
+ fetchConference.status
30
+ ? fetchConference.status.toLowerCase() + '-shadow'
31
+ : '',
32
+ ]"
33
+ class="me-3"
34
+ :podcast="podcast"
35
+ :hide-play="!isLiveReadyToRecord"
36
+ :playing-podcast="playingPodcast"
37
+ :fetch-conference="fetchConference"
38
+ :is-animator-live="isOctopusAndAnimator"
39
+ @playPodcast="playPodcast"
40
+ />
41
+ <h3 v-if="isOuestFrance">
42
+ {{ podcast.title }}
43
+ </h3>
44
+ <div
45
+ class="date-text-zone"
46
+ :class="isLiveReady ? 'justify-content-between' : ''"
47
+ >
48
+ <div
49
+ v-if="!isOuestFrance && 0 !== date.length"
50
+ :class="!isLiveReady ? 'me-5' : ''"
51
+ >
52
+ {{ date }}
53
+ </div>
54
+ <div class="ms-2 me-2 duration">
55
+ <span
56
+ v-if="isOuestFrance"
57
+ class="saooti-clock3"
58
+ />{{ $t('Duration', { duration: duration }) }}
59
+ </div>
60
+ <div
61
+ v-if="isLiveReady"
62
+ class="text-danger"
63
+ >
64
+ {{ $t('Episode record in live') }}
65
+ </div>
66
+ </div>
67
+ <div
68
+ class="descriptionText html-wysiwyg-content"
69
+ v-html="urlify(podcast.description)"
70
+ />
71
+ <div class="mt-3 mb-3">
72
+ <ParticipantDescription :participants="podcast.animators" />
73
+ <div v-if="!isOuestFrance">
74
+ {{ $t('Emission') + ' : ' }}
75
+ <router-link
76
+ class="link-info"
77
+ :to="{
78
+ name: 'emission',
79
+ params: { emissionId: podcast.emission.emissionId },
80
+ query: {
81
+ productor: $store.state.filter.organisationId,
82
+ },
83
+ }"
84
+ >
85
+ {{ podcast.emission.name }}
86
+ </router-link>
87
+ </div>
88
+ <div v-if="!isPodcastmaker">
89
+ {{ $t('Producted by : ') }}
90
+ <router-link
91
+ class="link-info"
92
+ :to="{
93
+ name: 'productor',
94
+ params: { productorId: podcast.organisation.id },
95
+ query: {
96
+ productor: $store.state.filter.organisationId,
97
+ },
98
+ }"
99
+ >
100
+ {{ podcast.organisation.name }}
101
+ </router-link>
102
+ </div>
103
+ <a
104
+ v-if="podcast.article"
105
+ class="btn d-flex align-items-center my-2 width-fit-content"
106
+ :href="podcast.article"
107
+ rel="noopener"
108
+ target="_blank"
109
+ >
110
+ <span class="saooti-newspaper me-1" />
111
+ <div>{{ $t('See associated article') }}</div>
112
+ </a>
113
+ <ParticipantDescription
114
+ :participants="podcast.guests"
115
+ :is-guest="true"
116
+ />
117
+ <div v-if="editRight && !isPodcastmaker">
118
+ <div
119
+ v-if="podcast.annotations && podcast.annotations.RSS"
120
+ class="me-5"
121
+ >
122
+ {{ $t('From RSS') }}
123
+ </div>
124
+ <ErrorMessage
125
+ v-if="!podcast.availability.visibility"
126
+ :message="$t('Podcast is not visible for listeners')"
127
+ />
128
+ <ErrorMessage
129
+ v-if="'ERROR' === podcast.processingStatus"
130
+ :message="$t('Podcast in ERROR, please contact Saooti')"
131
+ />
132
+ <ErrorMessage
133
+ v-if="podcastNotValid"
134
+ :message="$t('Podcast not validated')"
135
+ />
136
+ </div>
137
+ <ShareButtons
138
+ v-if="isDownloadButton"
139
+ :podcast="podcast"
140
+ :big-round="true"
141
+ :audio-url="podcast.audioUrl"
142
+ />
143
+ </div>
144
+ </div>
145
+ </div>
146
+ <TagList
147
+ v-if="isTagList"
148
+ :tag-list="podcast.tags"
149
+ />
150
+ </div>
151
+ </template>
152
+
153
+ <script lang="ts">
154
+ import PodcastImage from './PodcastImage.vue';
155
+ import ParticipantDescription from './ParticipantDescription.vue';
156
+ import { state } from '../../../store/paramStore';
157
+ const moment = require('moment');
158
+ const humanizeDuration = require('humanize-duration');
159
+ import { displayMethods } from '../../mixins/functions';
160
+ import { Podcast } from '@/store/class/podcast';
161
+ import { Conference } from '@/store/class/conference';
162
+
163
+ import { defineComponent, defineAsyncComponent } from 'vue';
164
+ const ShareButtons = defineAsyncComponent(() => import('../sharing/ShareButtons.vue'));
165
+ const TagList = defineAsyncComponent(() => import('./TagList.vue'));
166
+ const ErrorMessage = defineAsyncComponent(() => import('../../misc/ErrorMessage.vue'));
167
+ export default defineComponent({
168
+ name: "PodcastModuleBox",
169
+ components: {
170
+ PodcastImage,
171
+ ParticipantDescription,
172
+ ShareButtons,
173
+ TagList,
174
+ ErrorMessage,
175
+ },
176
+
177
+ mixins:[displayMethods],
178
+
179
+ props: {
180
+ playingPodcast: { default: undefined, type: Object as ()=> Podcast},
181
+ podcast: { default: undefined, type: Object as ()=> Podcast},
182
+ fetchConference: { default: undefined, type: Object as ()=> Conference},
183
+ },
184
+
185
+ emits: ['playPodcast'],
186
+
187
+ data() {
188
+ return {
189
+ };
190
+ },
191
+
192
+ computed: {
193
+ isPodcastmaker(): boolean {
194
+ return state.generalParameters.podcastmaker;
195
+ },
196
+ organisationId(): string {
197
+ return state.generalParameters.organisationId;
198
+ },
199
+ authenticated(): boolean {
200
+ return state.generalParameters.authenticated;
201
+ },
202
+ isOuestFrance(): boolean {
203
+ return state.podcastPage.ouestFranceStyle;
204
+ },
205
+ isTagList(): boolean {
206
+ return state.podcastPage.tagList;
207
+ },
208
+ isDownloadButton(): boolean {
209
+ return state.podcastPage.downloadButton;
210
+ },
211
+ date(): string {
212
+ if (this.podcast && 1970 !== moment(this.podcast.pubDate).year()){
213
+ if('fr' === this.$i18n.locale){
214
+ return moment(this.podcast.pubDate).format('D MMMM YYYY [à] HH[h]mm');
215
+ }
216
+ return moment(this.podcast.pubDate).format('D MMMM YYYY [at] HH[h]mm');
217
+ }
218
+ return '';
219
+ },
220
+ duration(): string {
221
+ if (!this.podcast || this.podcast.duration <= 1) return '';
222
+ if (this.podcast.duration > 600000) {
223
+ return humanizeDuration(this.podcast.duration, {
224
+ language: this.$i18n.locale,
225
+ largest: 1,
226
+ round: true,
227
+ });
228
+ }
229
+ return humanizeDuration(this.podcast.duration, {
230
+ language: this.$i18n.locale,
231
+ largest: 2,
232
+ round: true,
233
+ });
234
+ },
235
+ editRight(): boolean {
236
+ if ( this.podcast &&
237
+ (this.authenticated &&
238
+ this.organisationId === this.podcast.organisation.id) ||
239
+ state.generalParameters.isAdmin
240
+ )
241
+ return true;
242
+ return false;
243
+ },
244
+ isLiveReadyToRecord(): boolean {
245
+ return (undefined!==this.podcast && undefined!==this.podcast.conferenceId && 0 !== this.podcast.conferenceId && 'READY_TO_RECORD' === this.podcast.processingStatus);
246
+ },
247
+ isLiveReady(): boolean {
248
+ return (
249
+ undefined!==this.podcast &&
250
+ undefined!==this.podcast.conferenceId &&
251
+ 0 !== this.podcast.conferenceId &&
252
+ 'READY' === this.podcast.processingStatus
253
+ );
254
+ },
255
+ isNotRecorded(): boolean {
256
+ return (
257
+ this.isLiveReadyToRecord &&
258
+ undefined!==this.fetchConference &&
259
+ 'DEBRIEFING' === this.fetchConference.status
260
+ );
261
+ },
262
+ isOctopusAndAnimator(): boolean {
263
+ return (
264
+ !this.isPodcastmaker &&
265
+ this.editRight &&
266
+ state.generalParameters.isRoleLive
267
+ );
268
+ },
269
+ podcastNotValid(): boolean {
270
+ if (
271
+ this.podcast &&
272
+ this.podcast.availability &&
273
+ false === this.podcast.valid
274
+ )
275
+ return true;
276
+ return false;
277
+ },
278
+ },
279
+ methods: {
280
+ playPodcast(podcast: Podcast): void {
281
+ this.$emit('playPodcast', podcast);
282
+ },
283
+ },
284
+ })
285
+ </script>
286
+
287
+ <style lang="scss">
288
+ .title-page-podcast {
289
+ font-size: 0.9rem;
290
+ }
291
+ .width-fit-content{
292
+ width: fit-content;
293
+ }
294
+
295
+ .date-text-zone {
296
+ display: flex;
297
+ flex-wrap: wrap;
298
+ margin-bottom: 1rem;
299
+ @media (max-width: 600px) {
300
+ display: initial;
301
+ .duration {
302
+ margin-left: 0 !important;
303
+ }
304
+ }
305
+ }
306
+ </style>
@@ -45,7 +45,7 @@
45
45
  #option="{ option }"
46
46
  >
47
47
  <div
48
- v-if="undefined!==option"
48
+ v-if="undefined!==option"
49
49
  class="multiselect-octopus-proposition"
50
50
  :class="option.rubriqueId <= 0 ? 'primary-dark' : ''"
51
51
  :data-selenium="'rubric-chooser-' + seleniumFormat(option.name)"
@@ -54,8 +54,8 @@ export default defineComponent({
54
54
  const link = document.createElement('a');
55
55
  link.download = 'qrcode.png';
56
56
  const canvas = document.getElementsByClassName('myQrCode');
57
- if(canvas && canvas.length > 0 && canvas[0] && canvas[0].firstChild){
58
- link.href = (canvas[0].firstChild as any).toDataURL();
57
+ if(canvas && canvas.length > 0 && canvas[0]){
58
+ link.href = (canvas[0] as any).toDataURL();
59
59
  link.click();
60
60
  (this.$refs.snackbar as any).open(this.$t('Download started'));
61
61
  }
@@ -21,7 +21,6 @@
21
21
  target="popover-share-help"
22
22
  triggers="hover"
23
23
  placement="right"
24
- custom-class="wizard-help"
25
24
  >
26
25
  {{ $t('Share this page without edit and share blocks') }}
27
26
  </Popover>
@@ -288,7 +287,7 @@ export default defineComponent({
288
287
  dataRSSSave: false as boolean,
289
288
  newsletter: false as boolean,
290
289
  isMobile: false as boolean,
291
- qrCode: false as boolean
290
+ qrCode: false as boolean,
292
291
  };
293
292
  },
294
293
 
@@ -27,110 +27,21 @@
27
27
  >
28
28
  {{ $t('Share the player') }}
29
29
  </button>
30
- <template v-if="!isLiveReadyToRecord">
31
- <label
32
- for="iframe-select"
33
- class="d-inline"
34
- aria-label="select miniplayer"
35
- />
36
- <select
37
- id="iframe-select"
38
- v-model="iFrameModel"
39
- class="frame-select input-no-outline"
40
- >
41
- <option value="default">
42
- {{ $t('Default version') }}
43
- </option>
44
- <option value="large">
45
- {{ $t('Large version') }}
46
- </option>
47
- <template v-if="isBeta">
48
- <option
49
- v-for="player in customPlayersDisplay"
50
- :key="player.customId"
51
- :value="player.customId"
52
- >
53
- {{ $t('Custom version') + " «" +player.name+"»" }}
54
- </option>
55
- </template>
56
- <option
57
- v-if="podcast && podcast.podcastId"
58
- value="emission"
59
- >
60
- {{
61
- $t('Emission version')
62
- }}
63
- </option>
64
- <option
65
- v-if="podcast && podcast.podcastId"
66
- value="largeEmission"
67
- >
68
- {{ $t('Large emission version') }}
69
- </option>
70
- <option
71
- v-if="podcast && podcast.podcastId"
72
- value="largeSuggestion"
73
- >
74
- {{ $t('Large suggestion version') }}
75
- </option>
76
- </select>
77
- </template>
78
- </div>
79
- <div class="d-flex justify-content-around mt-3 flex-grow w-100">
80
- <div class="d-flex flex-column align-items-center flex-shrink me-3">
81
- <div class="fw-600">
82
- {{ $t('Choose color') }}
83
- </div>
84
- <VSwatches
85
- v-model="color"
86
- class="c-hand input-no-outline"
87
- show-fallback
88
- colors="text-advanced"
89
- popover-to="right"
90
- :data-color="color"
91
- />
92
- </div>
93
- <div class="d-flex flex-column align-items-center">
94
- <div class="fw-600">
95
- {{ $t('Choose theme') }}
96
- </div>
97
- <div
98
- v-if="!isBeta"
99
- class="d-flex"
100
- >
101
- <VSwatches
102
- v-for="myColor in colors"
103
- :key="myColor"
104
- v-model="theme"
105
- :data-theme="theme"
106
- class="c-hand input-no-outline me-1"
107
- :swatch-style="{
108
- padding: '0px 0px',
109
- marginRight: '0px',
110
- marginBottom: '0px',
111
- border: '1px gray solid',
112
- }"
113
- :wrapper-style="{
114
- paddingTop: '0px',
115
- paddingLeft: '0px',
116
- paddingRight: '0px',
117
- paddingBottom: '0px',
118
- }"
119
- :swatches="[myColor]"
120
- inline
121
- />
122
- </div>
123
- <VSwatches
124
- v-else
125
- v-model="theme"
126
- class="c-hand input-no-outline"
127
- show-fallback
128
- colors="text-advanced"
129
- popover-to="right"
130
- :data-color="theme"
131
- />
132
- </div>
30
+ <SharePlayerTypes
31
+ v-if="!isLiveReadyToRecord"
32
+ v-model:iFrameModel="iFrameModel"
33
+ :podcast="podcast"
34
+ :emission="emission"
35
+ :playlist="playlist"
36
+ :custom-players="customPlayers"
37
+ :is-beta="isBeta"
38
+ />
133
39
  </div>
40
+ <SharePlayerColors
41
+ v-model:color="color"
42
+ v-model:theme="theme"
43
+ :is-beta="isBeta"
44
+ />
134
45
  <div v-if="displayBetaChoice">
135
46
  <input
136
47
  id="isBetaCheckbox"
@@ -194,7 +105,6 @@
194
105
 
195
106
  <script lang="ts">
196
107
  import { state } from '../../../store/paramStore';
197
- import VSwatches from 'vue3-swatches';
198
108
  import profileApi from '@/api/profile';
199
109
  const octopusApi = require('@saooti/octopus-api');
200
110
  import { Podcast } from '@/store/class/podcast';
@@ -204,11 +114,14 @@ import { CustomPlayer } from '@/store/class/customPlayer';
204
114
  import { defineComponent, defineAsyncComponent } from 'vue';
205
115
  const ShareModalPlayer = defineAsyncComponent(() => import('../../misc/modal/ShareModalPlayer.vue'));
206
116
  const PlayerParameters = defineAsyncComponent(() => import('./PlayerParameters.vue'));
117
+ const SharePlayerTypes = defineAsyncComponent(() => import('./SharePlayerTypes.vue'));
118
+ const SharePlayerColors = defineAsyncComponent(() => import('./SharePlayerColors.vue'));
207
119
  export default defineComponent({
208
120
  components: {
209
121
  ShareModalPlayer,
210
- VSwatches,
122
+ SharePlayerColors,
211
123
  PlayerParameters,
124
+ SharePlayerTypes
212
125
  },
213
126
 
214
127
  props: {
@@ -241,12 +154,6 @@ export default defineComponent({
241
154
  },
242
155
 
243
156
  computed: {
244
- customPlayersDisplay(): Array<CustomPlayer>{
245
- return this.customPlayers.filter((player: CustomPlayer)=>{
246
- return (('EPISODE' === player.typePlayer ||'SUGGESTION' === player.typePlayer) && this.podcast && this.podcast.podcastId) ||
247
- ('EMISSION' === player.typePlayer && this.emission && !this.podcast)|| ('PLAYLIST' === player.typePlayer && this.playlist );
248
- });
249
- },
250
157
  miniplayerBaseUrl(): string{
251
158
  if(this.isBeta){
252
159
  return state.podcastPage.MiniplayerBetaUri;
@@ -457,7 +364,7 @@ export default defineComponent({
457
364
  if (Object.prototype.hasOwnProperty.call(data,'THEME')) {
458
365
  this.theme = data.THEME;
459
366
  } else {
460
- this.theme = '#ffffff';
367
+ this.theme = '#000000';
461
368
  }
462
369
  if (Object.prototype.hasOwnProperty.call(data,'playerBeta')) {
463
370
  this.displayBetaChoice = data.playerBeta;