@saooti/octopus-sdk 32.0.24 → 32.0.26

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
@@ -668,4 +668,6 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
668
668
  * 32.0.21 Amélioration List Paginate
669
669
  * 32.0.22 Popover
670
670
  * 32.0.23 Popover encore
671
- * 32.0.24 CDI podcastmaker
671
+ * 32.0.24 CDI podcastmaker
672
+ * 32.0.25 #11391
673
+ * 32.0.26 Image Proxy
package/index.ts CHANGED
@@ -59,6 +59,7 @@ import ListPaginate from "./src/components/display/list/ListPaginate.vue";
59
59
  import {selenium} from "./src/components/mixins/functions";
60
60
  import {cookies} from "./src/components/mixins/functions";
61
61
  import {displayMethods} from "./src/components/mixins/functions";
62
+ import {imageProxy} from "./src/components/mixins/functions";
62
63
  import {orgaFilter} from "./src/components/mixins/organisationFilter";
63
64
  import {initSDK} from "./src/components/mixins/init";
64
65
  import {tagOfMixins} from "./src/components/mixins/tagOfMixins";
@@ -101,6 +102,7 @@ const components = {
101
102
  HomeDropdown,
102
103
  ErrorMessage,
103
104
  displayMethods,
105
+ imageProxy,
104
106
  Rubrique,
105
107
  CategoryFilter,
106
108
  orgaFilter,
@@ -161,6 +163,7 @@ export {
161
163
  HomeDropdown,
162
164
  ErrorMessage,
163
165
  displayMethods,
166
+ imageProxy,
164
167
  Rubrique,
165
168
  CategoryFilter,
166
169
  orgaFilter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "32.0.24",
3
+ "version": "32.0.26",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -14,7 +14,7 @@
14
14
  "prettify": "prettier --single-quote --trailing-comma es5 --write src/**/**/**/*.{js,vue}"
15
15
  },
16
16
  "dependencies": {
17
- "@saooti/octopus-api": "^0.32.0",
17
+ "@saooti/octopus-api": "^0.32.2",
18
18
  "@vue/cli": "^5.0.8",
19
19
  "@vue/compat": "^3.2.37",
20
20
  "autoprefixer": "^10.4.8",
@@ -11,6 +11,8 @@ enum ModuleApi {
11
11
  RSS=7,
12
12
  STORAGE = 8,
13
13
  STUDIO = 9,
14
+ PROCESSOR= 10,
15
+ IMAGE=11
14
16
  }
15
17
  /* eslint-disable */
16
18
  export default {
@@ -13,6 +13,7 @@
13
13
  .multiselect__tags-wrap{
14
14
  display: flex;
15
15
  align-items: center;
16
+ flex-wrap: wrap;
16
17
  }
17
18
  .multiselect__tags{
18
19
  border: 0;
@@ -22,7 +23,7 @@
22
23
  align-items: center;
23
24
  }
24
25
  .multiselect__tag{
25
- margin-bottom: 0;
26
+ margin-top: 5px;
26
27
  border: 1px gray solid;
27
28
  }
28
29
  }
@@ -12,7 +12,7 @@
12
12
  class="d-flex flex-grow-1 text-dark"
13
13
  >
14
14
  <img
15
- v-lazy="emission.imageUrl"
15
+ v-lazy="proxyImageUrl(emission.imageUrl, '260')"
16
16
  class="img-box"
17
17
  :title="$t('Emission name image', {name:emission.name})"
18
18
  :alt="$t('Emission name image', {name:emission.name})"
@@ -63,13 +63,13 @@ import { orgaComputed } from '../../mixins/orgaComputed';
63
63
  import { Emission } from '@/store/class/general/emission';
64
64
  import { state } from '../../../store/paramStore';
65
65
  import octopusApi from '@saooti/octopus-api';
66
- import { displayMethods } from '../../mixins/functions';
66
+ import { displayMethods, imageProxy } from '../../mixins/functions';
67
67
  import { defineComponent } from 'vue'
68
68
  import { Podcast } from '@/store/class/general/podcast';
69
69
  export default defineComponent({
70
70
  name: 'EmissionItem',
71
71
 
72
- mixins: [displayMethods, orgaComputed],
72
+ mixins: [displayMethods, orgaComputed, imageProxy],
73
73
 
74
74
  props: {
75
75
  emission: { default: ()=>({}), type: Object as ()=> Emission},
@@ -40,7 +40,6 @@
40
40
  class="m-3 flex-shrink-0"
41
41
  :class="mainRubriquage(e)"
42
42
  :rubrique-name="rubriquesId(e)"
43
- @emissionNotVisible="displayCount--"
44
43
  />
45
44
  </template>
46
45
  </div>
@@ -20,7 +20,7 @@
20
20
  class="img-box rounded-0"
21
21
  >
22
22
  <img
23
- v-lazy="emission.imageUrl"
23
+ v-lazy="proxyImageUrl(emission.imageUrl, '260')"
24
24
  :title="$t('Emission name image', {name:emission.name})"
25
25
  :alt="$t('Emission name image', {name:emission.name})"
26
26
  class="img-box rounded-0"
@@ -143,7 +143,7 @@ import { Emission } from '@/store/class/general/emission';
143
143
  import { Podcast } from '@/store/class/general/podcast';
144
144
  import { state } from '../../../store/paramStore';
145
145
  import PodcastPlayBar from '../podcasts/PodcastPlayBar.vue';
146
- import { displayMethods } from '../../mixins/functions';
146
+ import { displayMethods, imageProxy } from '../../mixins/functions';
147
147
  import { defineComponent } from 'vue'
148
148
  export default defineComponent({
149
149
  name: 'EmissionPlayerItem',
@@ -151,7 +151,7 @@ export default defineComponent({
151
151
  components:{
152
152
  PodcastPlayBar
153
153
  },
154
- mixins: [displayMethods],
154
+ mixins: [displayMethods, imageProxy],
155
155
  props: {
156
156
  emission: { default: ()=>({}), type: Object as ()=>Emission },
157
157
  nbPodcasts: { default: undefined, type: Number },
@@ -45,7 +45,7 @@
45
45
  <div class="multiselect-octopus-proposition">
46
46
  <img
47
47
  v-if="!light"
48
- v-lazy="option.imageUrl"
48
+ v-lazy="proxyImageUrl(option.imageUrl, '32')"
49
49
  class="option__image"
50
50
  :alt="option.name"
51
51
  >
@@ -65,7 +65,7 @@
65
65
  >
66
66
  <img
67
67
  v-if="!light"
68
- v-lazy="option.imageUrl"
68
+ v-lazy="proxyImageUrl(option.imageUrl, '32')"
69
69
  class="option__image"
70
70
  :alt="option.name"
71
71
  >
@@ -109,7 +109,7 @@
109
109
  </template>
110
110
 
111
111
  <script lang="ts">
112
- import { selenium } from '../../mixins/functions';
112
+ import { selenium, imageProxy } from '../../mixins/functions';
113
113
  import { orgaComputed } from '../../mixins/orgaComputed';
114
114
  //@ts-ignore
115
115
  import VueMultiselect from 'vue-multiselect';
@@ -137,7 +137,7 @@ export default defineComponent({
137
137
  components: {
138
138
  VueMultiselect,
139
139
  },
140
- mixins:[selenium, orgaComputed],
140
+ mixins:[selenium, orgaComputed, imageProxy],
141
141
  props: {
142
142
  width: { default: '100%', type: String },
143
143
  defaultanswer: { default: '', type: String},
@@ -13,7 +13,7 @@
13
13
  :title="$t('Participant')"
14
14
  >
15
15
  <img
16
- v-lazy="participant.imageUrl"
16
+ v-lazy="proxyImageUrl(participant.imageUrl, '200')"
17
17
  :title="$t('Animator image')"
18
18
  :alt="$t('Animator image')"
19
19
  class="img-box-circle"
@@ -57,13 +57,13 @@
57
57
  import octopusApi from '@saooti/octopus-api';
58
58
  import { Participant } from '@/store/class/general/participant';
59
59
  import { state } from '../../../store/paramStore';
60
- import { displayMethods } from '../../mixins/functions';
60
+ import { displayMethods, imageProxy } from '../../mixins/functions';
61
61
  import { orgaComputed } from '../../mixins/orgaComputed';
62
62
  import { defineComponent } from 'vue'
63
63
  import { Podcast } from '@/store/class/general/podcast';
64
64
  export default defineComponent({
65
65
  name: 'ParticpantItem',
66
- mixins: [displayMethods, orgaComputed],
66
+ mixins: [displayMethods, orgaComputed, imageProxy],
67
67
  props: {
68
68
  participant: { default: ()=>({}), type: Object as ()=> Participant},
69
69
  },
@@ -13,7 +13,7 @@
13
13
  class="d-flex flex-grow-1 text-dark"
14
14
  >
15
15
  <img
16
- v-lazy="playlist.imageUrl"
16
+ v-lazy="proxyImageUrl(playlist.imageUrl, '260')"
17
17
  :title="$t('Playlist name image', {name:name})"
18
18
  :alt="$t('Playlist name image', {name:name})"
19
19
  class="img-box"
@@ -61,12 +61,12 @@
61
61
  <script lang="ts">
62
62
  import { Playlist } from '@/store/class/general/playlist';
63
63
  import { state } from '../../../store/paramStore';
64
- import { displayMethods } from '../../mixins/functions';
64
+ import { displayMethods, imageProxy } from '../../mixins/functions';
65
65
  import { defineComponent } from 'vue'
66
66
  export default defineComponent({
67
67
  name: 'PlaylistItem',
68
68
 
69
- mixins: [displayMethods],
69
+ mixins: [displayMethods, imageProxy],
70
70
 
71
71
  props: {
72
72
  playlist: { default: ()=>({}), type: Object as ()=>Playlist},
@@ -4,7 +4,7 @@
4
4
  class="img-box d-flex flex-column justify-content-start align-items-start position-relative justify rounded-lg flex-shrink-0 float-start"
5
5
  >
6
6
  <img
7
- v-lazy="podcast.imageUrl"
7
+ v-lazy="proxyImageUrl(podcast.imageUrl,'260')"
8
8
  class="img-box"
9
9
  :alt="$t('Episode name image', {name:podcast.title})"
10
10
  >
@@ -91,9 +91,11 @@ import { state } from '../../../store/paramStore';
91
91
  import {StoreState} from '@/store/typeAppStore';
92
92
  import { Podcast } from '@/store/class/general/podcast';
93
93
  import { Conference } from '@/store/class/conference/conference';
94
+ import { imageProxy } from '../../mixins/functions';
94
95
  import { defineComponent } from 'vue'
95
96
  export default defineComponent({
96
97
  name: 'PodcastImage',
98
+ mixins:[imageProxy],
97
99
  props: {
98
100
  podcast: { default: ()=>({}), type: Object as ()=>Podcast},
99
101
  hidePlay: { default: false, type: Boolean},
@@ -14,7 +14,7 @@
14
14
  @click="onDisplayMenu(true)"
15
15
  >
16
16
  <img
17
- :src="!filterOrga || '' === imgUrl ? logoUrl : imgUrl"
17
+ :src="!filterOrga || '' === imgUrl ? logoUrl : proxyImageUrl(imgUrl, '160')"
18
18
  :alt="!filterOrga || '' === imgUrl ? $t('Logo of main page') : $t('Visual', {name: $store.state.filter?.name})"
19
19
  :class="isEducation ? 'educationLogo' : ''"
20
20
  >
@@ -75,6 +75,7 @@ import { state } from '../../store/paramStore';
75
75
  import HomeDropdown from './HomeDropdown.vue';
76
76
  import { Organisation } from '@/store/class/general/organisation';
77
77
  import { orgaFilter } from '../mixins/organisationFilter';
78
+ import { imageProxy } from '../mixins/functions';
78
79
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
79
80
  import { defineComponent,defineAsyncComponent } from 'vue';
80
81
  const OrganisationChooserLight = defineAsyncComponent(() => import('../display/organisation/OrganisationChooserLight.vue'));
@@ -84,7 +85,7 @@ export default defineComponent({
84
85
  OrganisationChooserLight,
85
86
  HomeDropdown,
86
87
  },
87
- mixins:[orgaFilter],
88
+ mixins:[orgaFilter, imageProxy],
88
89
  props: {
89
90
  displayMenu: { default: false, type: Boolean},
90
91
  isEducation: { default: false, type: Boolean},
@@ -7,7 +7,7 @@
7
7
  :to="podcastShareUrl"
8
8
  >
9
9
  <img
10
- v-lazy="podcastImage"
10
+ v-lazy="proxyImageUrl(podcastImage,'48')"
11
11
  :alt="$t('Podcast image')"
12
12
  class="player-image"
13
13
  >
@@ -77,6 +77,7 @@
77
77
  <script lang="ts">
78
78
  import { CommentPodcast } from '@/store/class/general/comment';
79
79
  import { playerDisplay } from '../../mixins/player/playerDisplay';
80
+ import { imageProxy } from '../../mixins/functions';
80
81
  import PlayerProgressBar from './PlayerProgressBar.vue';
81
82
  import PlayerTimeline from './PlayerTimeline.vue';
82
83
  import { defineComponent } from 'vue';
@@ -87,7 +88,7 @@ export default defineComponent({
87
88
  PlayerProgressBar,
88
89
  PlayerTimeline
89
90
  },
90
- mixins:[playerDisplay],
91
+ mixins:[playerDisplay, imageProxy],
91
92
 
92
93
  props: {
93
94
  playerError: { default: false, type: Boolean},
@@ -12,7 +12,7 @@
12
12
  :to="podcastShareUrl"
13
13
  >
14
14
  <img
15
- v-lazy="podcastImage"
15
+ v-lazy="proxyImageUrl(podcastImage,'260')"
16
16
  :alt="$t('Podcast image')"
17
17
  class="img-box"
18
18
  >
@@ -80,6 +80,7 @@
80
80
  </template>
81
81
  <script lang="ts">
82
82
  import { playerDisplay } from '../../mixins/player/playerDisplay';
83
+ import { imageProxy } from '../../mixins/functions';
83
84
  import PlayerProgressBar from './PlayerProgressBar.vue';
84
85
  import PlayerTimeline from './PlayerTimeline.vue';
85
86
  import { defineComponent } from 'vue';
@@ -91,7 +92,7 @@ export default defineComponent({
91
92
  PlayerProgressBar,
92
93
  PlayerTimeline
93
94
  },
94
- mixins:[playerDisplay],
95
+ mixins:[playerDisplay, imageProxy],
95
96
 
96
97
  props: {
97
98
  playerError: { default: false, type: Boolean},
@@ -1,3 +1,4 @@
1
+ import { state } from '../../store/paramStore';
1
2
 
2
3
  export const selenium ={
3
4
  methods: {
@@ -6,6 +7,19 @@ export const selenium ={
6
7
  },
7
8
  },
8
9
  };
10
+ export const imageProxy ={
11
+ methods: {
12
+ proxyImageUrl(url:string, width:string): string{
13
+ if(!url){
14
+ return "";
15
+ }
16
+ if(state.octopusApi.imageUrl){
17
+ return state.octopusApi.imageUrl+"image/"+btoa(url)+"?width="+width;
18
+ }
19
+ return url;
20
+ },
21
+ },
22
+ };
9
23
  export const cookies =
10
24
  {
11
25
  methods: {
@@ -19,7 +19,7 @@
19
19
  </h2>
20
20
  <div class="mb-5 mt-3 descriptionText">
21
21
  <img
22
- v-lazy="imageUrl"
22
+ v-lazy="proxyImageUrl(imageUrl, '260')"
23
23
  :alt="$t('Emission name image', { name: name })"
24
24
  class="img-box shadow-element float-start me-3 mb-3"
25
25
  >
@@ -81,7 +81,7 @@
81
81
  <script lang="ts">
82
82
  import octopusApi from '@saooti/octopus-api';
83
83
  import { state } from '../../store/paramStore';
84
- import { displayMethods } from '../mixins/functions';
84
+ import { displayMethods, imageProxy } from '../mixins/functions';
85
85
  import { orgaComputed } from '../mixins/orgaComputed';
86
86
  import { handle403 } from '../mixins/handle403';
87
87
  import { Emission } from '@/store/class/general/emission';
@@ -106,7 +106,7 @@ export default defineComponent({
106
106
  LiveHorizontalList,
107
107
  ClassicLoading
108
108
  },
109
- mixins: [displayMethods, handle403, orgaComputed],
109
+ mixins: [displayMethods, handle403, orgaComputed, imageProxy],
110
110
  props: {
111
111
  emissionId: { default: undefined, type: Number},
112
112
  isEducation: { default: false, type: Boolean},
@@ -10,7 +10,7 @@
10
10
  class="d-flex flex-column align-items-center mb-3"
11
11
  >
12
12
  <img
13
- v-lazy="participant.imageUrl"
13
+ v-lazy="proxyImageUrl(participant.imageUrl, '200')"
14
14
  :title="$t('Animator image')"
15
15
  :alt="$t('Animator image')"
16
16
  class="img-box-circle mb-3"
@@ -63,7 +63,7 @@
63
63
  <script lang="ts">
64
64
  import octopusApi from '@saooti/octopus-api';
65
65
  import { state } from '../../store/paramStore';
66
- import { displayMethods } from '../mixins/functions';
66
+ import { displayMethods, imageProxy } from '../mixins/functions';
67
67
  import { orgaComputed } from '../mixins/orgaComputed';
68
68
  import { handle403 } from '../mixins/handle403';
69
69
  import { Participant } from '@/store/class/general/participant';
@@ -82,7 +82,7 @@ export default defineComponent({
82
82
  PodcastList,
83
83
  ClassicLoading
84
84
  },
85
- mixins: [displayMethods, handle403, orgaComputed],
85
+ mixins: [displayMethods, handle403, orgaComputed, imageProxy],
86
86
  props: {
87
87
  participantId: { default: undefined, type: Number},
88
88
  },
@@ -14,7 +14,7 @@
14
14
  <h2>{{ name }}</h2>
15
15
  <div class="mb-5 mt-3 descriptionText">
16
16
  <img
17
- v-lazy="imageUrl"
17
+ v-lazy="proxyImageUrl(imageUrl, '260')"
18
18
  :alt="$t('Playlist name image', { name: name })"
19
19
  class="img-box shadow-element float-start me-3 mb-3"
20
20
  >
@@ -55,7 +55,7 @@ import ClassicLoading from '../form/ClassicLoading.vue';
55
55
  import PodcastList from '../display/playlist/PodcastList.vue';
56
56
  import octopusApi from '@saooti/octopus-api';
57
57
  import { state } from '../../store/paramStore';
58
- import { displayMethods } from '../mixins/functions';
58
+ import { displayMethods, imageProxy } from '../mixins/functions';
59
59
  import { handle403 } from '../mixins/handle403';
60
60
  import { Playlist } from '@/store/class/general/playlist';
61
61
  import { defineComponent, defineAsyncComponent } from 'vue';
@@ -71,7 +71,7 @@ export default defineComponent({
71
71
  SharePlayer,
72
72
  ClassicLoading
73
73
  },
74
- mixins:[displayMethods, handle403, orgaComputed],
74
+ mixins:[displayMethods, handle403, orgaComputed, imageProxy],
75
75
 
76
76
  props: {
77
77
  playlistId: { default: undefined, type: Number},
@@ -85,6 +85,7 @@ const state:paramStore = {
85
85
  octopusApi: {
86
86
  url: 'http://api.dev2.saooti.org/',
87
87
  commentsUrl: 'http://comments.dev2.saooti.org/',
88
+ imageUrl:'http://imageproxy.dev2.saooti.org/',
88
89
  studioUrl: 'http://studio.dev2.saooti.org/',
89
90
  playerUrl: 'https://playerbeta.dev2.saooti.org/',
90
91
  organisationId: undefined,
@@ -175,6 +176,7 @@ export interface Organisation{
175
176
  export interface OctopusApi{
176
177
  url?: string,
177
178
  commentsUrl?: string,
179
+ imageUrl?: string,
178
180
  studioUrl?: string,
179
181
  playerUrl?: string,
180
182
  organisationId?: string | undefined,
@@ -132,6 +132,9 @@ export function emptyPodcastData(): Podcast{
132
132
  CommentApi: {
133
133
  uri: string | undefined;
134
134
  };
135
+ imageApi: {
136
+ uri: string | undefined;
137
+ };
135
138
  studioApi: {
136
139
  uri: string | undefined;
137
140
  };
@@ -236,6 +239,9 @@ export function emptyPodcastData(): Podcast{
236
239
  CommentApi: {
237
240
  uri: undefined ,
238
241
  },
242
+ imageApi: {
243
+ uri:undefined,
244
+ },
239
245
  studioApi: {
240
246
  uri: undefined ,
241
247
  },