@saooti/octopus-sdk 31.0.35 → 31.0.36

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 (84) hide show
  1. package/README.md +4 -1
  2. package/index.ts +5 -2
  3. package/package.json +1 -1
  4. package/public/img/403.jpeg +0 -0
  5. package/public/img/404.svg +242 -0
  6. package/src/assets/bootstrap-diff.scss +25 -24
  7. package/src/assets/general.scss +57 -2
  8. package/src/assets/modal.scss +5 -4
  9. package/src/assets/share.scss +2 -0
  10. package/src/components/display/categories/CategoryFilter.vue +12 -26
  11. package/src/components/display/categories/CategoryList.vue +14 -20
  12. package/src/components/display/comments/AddCommentModal.vue +19 -36
  13. package/src/components/display/comments/CommentBasicView.vue +2 -5
  14. package/src/components/display/comments/CommentInput.vue +8 -21
  15. package/src/components/display/comments/CommentList.vue +10 -21
  16. package/src/components/display/comments/CommentPlayer.vue +0 -3
  17. package/src/components/display/comments/CommentSection.vue +6 -14
  18. package/src/components/display/emission/EmissionInlineList.vue +5 -10
  19. package/src/components/display/emission/EmissionItem.vue +5 -10
  20. package/src/components/display/emission/EmissionList.vue +66 -68
  21. package/src/components/display/filter/AdvancedSearch.vue +19 -45
  22. package/src/components/display/filter/CategoryFilter.vue +11 -20
  23. package/src/components/display/filter/MonetizableFilter.vue +7 -14
  24. package/src/components/display/filter/ProductorSearch.vue +69 -78
  25. package/src/components/display/filter/RubriqueChoice.vue +1 -4
  26. package/src/components/display/filter/RubriqueFilter.vue +1 -5
  27. package/src/components/display/list/ListPaginate.vue +150 -0
  28. package/src/components/display/list/Paginate.vue +219 -0
  29. package/src/components/display/live/LiveHorizontalList.vue +56 -40
  30. package/src/components/display/organisation/OrganisationChooser.vue +7 -12
  31. package/src/components/display/participant/ParticipantItem.vue +6 -17
  32. package/src/components/display/participant/ParticipantList.vue +53 -46
  33. package/src/components/display/playlist/PlaylistItem.vue +1 -4
  34. package/src/components/display/playlist/PlaylistList.vue +60 -63
  35. package/src/components/display/playlist/PodcastList.vue +74 -101
  36. package/src/components/display/podcasts/AnimatorsItem.vue +17 -28
  37. package/src/components/display/podcasts/ParticipantDescription.vue +3 -11
  38. package/src/components/display/podcasts/PodcastFilterList.vue +8 -16
  39. package/src/components/display/podcasts/PodcastImage.vue +86 -92
  40. package/src/components/display/podcasts/PodcastItem.vue +1 -2
  41. package/src/components/display/podcasts/PodcastItemInfo.vue +10 -10
  42. package/src/components/display/podcasts/PodcastList.vue +61 -81
  43. package/src/components/display/podcasts/PodcastModuleBox.vue +19 -25
  44. package/src/components/display/podcasts/PodcastSwiperList.vue +2 -3
  45. package/src/components/display/podcasts/TagList.vue +0 -2
  46. package/src/components/display/sharing/QrCode.vue +2 -11
  47. package/src/components/display/sharing/ShareButtons.vue +44 -329
  48. package/src/components/display/sharing/ShareButtonsIntern.vue +209 -0
  49. package/src/components/display/sharing/SharePlayer.vue +21 -53
  50. package/src/components/display/sharing/SplitButton.vue +42 -0
  51. package/src/components/display/sharing/SubscribeButtons.vue +46 -39
  52. package/src/components/misc/Footer.vue +1 -4
  53. package/src/components/misc/HomeDropdown.vue +26 -24
  54. package/src/components/misc/LeftMenu.vue +3 -7
  55. package/src/components/misc/TopBar.vue +9 -16
  56. package/src/components/misc/modal/ClipboardModal.vue +1 -1
  57. package/src/components/misc/modal/MessageModal.vue +1 -1
  58. package/src/components/misc/modal/QrCodeModal.vue +1 -1
  59. package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
  60. package/src/components/mixins/organisationFilter.ts +6 -0
  61. package/src/components/mixins/player/playerLive.ts +1 -1
  62. package/src/components/pages/Category.vue +1 -1
  63. package/src/components/pages/Emission.vue +0 -6
  64. package/src/components/pages/Emissions.vue +1 -1
  65. package/src/components/pages/Error403Page.vue +44 -8
  66. package/src/components/pages/PageNotFound.vue +55 -0
  67. package/src/components/pages/Participant.vue +0 -15
  68. package/src/components/pages/Participants.vue +1 -1
  69. package/src/components/pages/Playlist.vue +2 -2
  70. package/src/components/pages/Playlists.vue +1 -1
  71. package/src/components/pages/Podcast.vue +1 -3
  72. package/src/components/pages/Podcasts.vue +11 -8
  73. package/src/components/pages/Rubrique.vue +1 -1
  74. package/src/locale/de.ts +3 -0
  75. package/src/locale/en.ts +9 -0
  76. package/src/locale/es.ts +3 -0
  77. package/src/locale/fr.ts +10 -1
  78. package/src/locale/it.ts +3 -0
  79. package/src/locale/sl.ts +3 -0
  80. package/src/router/router.ts +2 -0
  81. package/src/sass/_variables.scss +0 -1
  82. package/src/store/class/general/playlist.ts +1 -1
  83. package/src/store/paramStore.ts +7 -11
  84. package/src/store/typeAppStore.ts +20 -2
@@ -19,12 +19,11 @@
19
19
  {{ $t('Filter') }}
20
20
  </div>
21
21
  <MonetizableFilter
22
- v-if="isMonetizableFilter && !isEducation"
22
+ v-if="sdkParameters.isMonetizableFilter && !isEducation"
23
23
  :is-emission="isEmission"
24
24
  @updateMonetization="updateMonetization"
25
25
  />
26
26
  <CategoryFilter @updateCategory="updateCategory" />
27
-
28
27
  <RubriqueFilter
29
28
  :reset-rubriquage="resetRubriquage"
30
29
  :organisation-id="organisationId"
@@ -130,6 +129,7 @@
130
129
 
131
130
  <script lang="ts">
132
131
  import { state } from '../../../store/paramStore';
132
+ import { orgaComputed } from '../../mixins/orgaComputed';
133
133
  import moment from 'moment';
134
134
  import CategoryFilter from './CategoryFilter.vue';
135
135
  import RubriqueFilter from './RubriqueFilter.vue';
@@ -148,6 +148,7 @@ export default defineComponent({
148
148
  ClassicCheckbox,
149
149
  ClassicRadio
150
150
  },
151
+ mixins: [orgaComputed],
151
152
  props: {
152
153
  organisationId: { default: undefined, type: String},
153
154
  isEmission: { default: false, type: Boolean},
@@ -180,20 +181,15 @@ export default defineComponent({
180
181
  },
181
182
 
182
183
  computed: {
183
- isMonetizableFilter(): boolean {
184
- return (state.podcastsPage.MonetizableFilter as boolean);
185
- },
186
- myOrganisationId(): string|undefined {
187
- return state.generalParameters.organisationId;
188
- },
189
- authenticated(): boolean {
190
- return (state.generalParameters.authenticated as boolean);
191
- },
192
- isProduction(): boolean {
193
- return (state.generalParameters.isProduction as boolean);
184
+ isPodcastmaker(): boolean {
185
+ return (state.generalParameters.podcastmaker as boolean);
194
186
  },
195
- isContribution(): boolean {
196
- return (state.generalParameters.isContribution as boolean);
187
+ sdkParameters(){
188
+ return {
189
+ isMonetizableFilter : (state.podcastsPage.MonetizableFilter as boolean),
190
+ isProduction : (state.generalParameters.isProduction as boolean),
191
+ isContribution : (state.generalParameters.isContribution as boolean)
192
+ }
197
193
  },
198
194
  organisationRight(): boolean {
199
195
  if (
@@ -203,57 +199,39 @@ export default defineComponent({
203
199
  return true;
204
200
  return false;
205
201
  },
206
- isPodcastmaker(): boolean {
207
- return (state.generalParameters.podcastmaker as boolean);
208
- },
209
- filterOrga(): string {
210
- return this.$store.state.filter.organisationId;
211
- },
212
202
  organisation(): string|undefined {
213
203
  if (this.organisationId) return this.organisationId;
214
204
  if (this.filterOrga) return this.filterOrga;
215
205
  return undefined;
216
206
  },
217
207
  textNotVisible(): string {
218
- if (this.isEmission) return this.$t('Consider podcasts no visible').toString();
219
- return this.$t('See podcasts no visible').toString();
208
+ if (this.isEmission) return this.$t('Consider podcasts no visible');
209
+ return this.$t('See podcasts no visible');
220
210
  },
221
211
  isCheckboxNotValidate(): boolean {
222
212
  return (
223
213
  undefined!==this.organisation &&
224
214
  this.organisationRight &&
225
- this.isContribution &&
215
+ this.sdkParameters.isContribution &&
226
216
  !this.isPodcastmaker &&
227
217
  !this.isEmission &&
228
218
  this.isNotVisible
229
219
  );
230
220
  },
231
221
  textNotValidate(): string {
232
- if (this.isProduction) return this.$t('Display all podcasts to validate').toString();
222
+ if (this.sdkParameters.isProduction) return this.$t('Display all podcasts to validate').toString();
233
223
  return this.$t('Display my podcasts to validate').toString();
234
224
  },
235
225
  },
236
226
  watch: {
237
227
  organisation(): void {
238
- if (this.organisation && this.organisationRight && !this.isEmission) {
239
- this.isNotVisible = true;
240
- } else {
241
- this.isNotVisible = false;
242
- }
228
+ this.isNotVisible = undefined!==this.organisation && this.organisationRight && !this.isEmission;
243
229
  },
244
230
  isFrom(): void {
245
- if (this.isFrom) {
246
- this.$emit('updateFromDate', moment(this.fromDate).toISOString(true));
247
- } else {
248
- this.$emit('updateFromDate', undefined);
249
- }
231
+ this.$emit('updateFromDate', this.isFrom ? moment(this.fromDate).toISOString(true) : undefined);
250
232
  },
251
233
  isTo(): void {
252
- if (this.isTo) {
253
- this.$emit('updateToDate', moment(this.toDate).toISOString(true));
254
- } else {
255
- this.$emit('updateToDate', undefined);
256
- }
234
+ this.$emit('updateToDate', this.isTo ? moment(this.toDate).toISOString(true) : undefined);
257
235
  },
258
236
  sort(): void {
259
237
  this.$emit('updateSortCriteria', this.sort);
@@ -306,11 +284,7 @@ export default defineComponent({
306
284
  this.$emit('updateMonetization', value);
307
285
  },
308
286
  updateCategory(value: number){
309
- if(0!==value){
310
- this.$emit('updateCategory', value);
311
- }else{
312
- this.$emit('updateCategory', undefined);
313
- }
287
+ this.$emit('updateCategory', 0!==value ? value : undefined);
314
288
  },
315
289
  updateRubriquageFilter(value: Array<RubriquageFilter>){
316
290
  this.$emit('updateRubriquageFilter', value);
@@ -44,11 +44,7 @@ export default defineComponent({
44
44
  return;
45
45
  }
46
46
  this.isInternChanged = true;
47
- if (this.isCategory) {
48
- this.$emit('updateCategory', this.iabId);
49
- } else {
50
- this.$emit('updateCategory', 0);
51
- }
47
+ this.$emit('updateCategory', this.isCategory?this.iabId:0);
52
48
  this.resetCategoryFilter();
53
49
  this.$nextTick(() => {
54
50
  this.isInternChanged = false;
@@ -70,21 +66,16 @@ export default defineComponent({
70
66
  categoryFilter:{
71
67
  deep: true,
72
68
  handler(){
73
- if(this.isInternChanged){
74
- return;
75
- }
76
- this.isInternChanged = true;
77
- if(this.categoryFilter){
78
- this.iabId = this.categoryFilter.id;
79
- this.isCategory = true;
80
- }else{
81
- this.iabId = 0;
82
- this.isCategory = false;
83
- }
84
- this.$emit('updateCategory', this.iabId);
85
- this.$nextTick(() => {
86
- this.isInternChanged = false;
87
- });
69
+ if(this.isInternChanged){
70
+ return;
71
+ }
72
+ this.isInternChanged = true;
73
+ this.iabId = this.categoryFilter ? this.categoryFilter.id : 0;
74
+ this.isCategory = this.categoryFilter ? true : false;
75
+ this.$emit('updateCategory', this.iabId);
76
+ this.$nextTick(() => {
77
+ this.isInternChanged = false;
78
+ });
88
79
  }
89
80
  },
90
81
  },
@@ -1,7 +1,5 @@
1
1
  <template>
2
- <div
3
- class="d-flex align-items-center"
4
- >
2
+ <div class="d-flex align-items-center">
5
3
  <div>{{ $t('Advertising') + ' :' }}</div>
6
4
  <label class="position-relative">
7
5
  <select
@@ -10,16 +8,7 @@
10
8
  class="ms-2 mb-0 pe-4 c-hand"
11
9
  @change="onChange"
12
10
  >
13
- <option
14
- v-if="isEmission"
15
- value="UNDEFINED"
16
- >{{
17
- $t('All emissions')
18
- }}</option>
19
- <option
20
- v-else
21
- value="UNDEFINED"
22
- >{{ $t('All podcasts') }}</option>
11
+ <option value="UNDEFINED">{{ allString }}</option>
23
12
  <option value="YES">{{ $t('Authorized advertising') }}</option>
24
13
  <option value="NO">{{ $t('Prohibited advertising') }}</option>
25
14
  </select>
@@ -41,7 +30,11 @@ export default defineComponent({
41
30
  monetization: 'UNDEFINED' as string,
42
31
  };
43
32
  },
44
-
33
+ computed:{
34
+ allString(): string{
35
+ return this.isEmission? this.$t('All emissions') : this.$t('All podcasts');
36
+ }
37
+ },
45
38
  methods: {
46
39
  onChange(): void {
47
40
  this.$emit('updateMonetization', this.monetization);
@@ -66,7 +66,6 @@ export default defineComponent({
66
66
  return {
67
67
  keepOrganisation: false as boolean,
68
68
  showBubble: false as boolean,
69
- imgUrl: '' as string,
70
69
  queryIntern: '' as string,
71
70
  };
72
71
  },
@@ -76,11 +75,10 @@ export default defineComponent({
76
75
  return (state.generalParameters.podcastmaker as boolean);
77
76
  },
78
77
  searchText(): string {
79
- if ('emission' === this.type) return this.$t('Look for emission name').toString();
80
- if ('participant' === this.type)
81
- return this.$t('Look for participant name').toString();
82
- if ('playlist' === this.type) return this.$t('Look for playlist name').toString();
83
- return this.$t('Look for podcast name').toString();
78
+ if ('emission' === this.type) return this.$t('Look for emission name');
79
+ if ('participant' === this.type)return this.$t('Look for participant name');
80
+ if ('playlist' === this.type) return this.$t('Look for playlist name');
81
+ return this.$t('Look for podcast name');
84
82
  },
85
83
  filterOrga(): string {
86
84
  return this.$store.state.filter.organisationId;
@@ -88,15 +86,14 @@ export default defineComponent({
88
86
  },
89
87
  watch: {
90
88
  queryIntern(): void {
91
- if(this.queryIntern !== this.searchPattern)
92
- this.$emit('updateSearchPattern', this.queryIntern);
89
+ if(this.queryIntern !== this.searchPattern){
90
+ this.$emit('updateSearchPattern', this.queryIntern);
91
+ }
93
92
  },
94
- filterOrga(): void {
93
+ filterOrga():void{
94
+ this.keepOrganisation = undefined!==this.filterOrga;
95
95
  if (this.filterOrga) {
96
- this.keepOrganisation = true;
97
96
  this.$emit('updateOrganisationId', this.filterOrga);
98
- } else {
99
- this.keepOrganisation = false;
100
97
  }
101
98
  },
102
99
  },
@@ -114,10 +111,7 @@ export default defineComponent({
114
111
  if (this.$route.query.productor) {
115
112
  this.$router.push({ query: { productor: undefined } });
116
113
  }
117
- this.imgUrl = organisation.imageUrl;
118
- this.$store.commit('filterOrga', {
119
- orgaId: undefined,
120
- });
114
+ this.$store.commit('filterOrga', {orgaId: undefined});
121
115
  this.keepOrganisation = false;
122
116
  if (organisation && organisation.id) {
123
117
  this.$emit('updateOrganisationId', organisation.id);
@@ -141,10 +135,7 @@ export default defineComponent({
141
135
  await this.selectOrganisation(this.organisationId);
142
136
  return;
143
137
  }
144
- if (this.$route.query.productor) {
145
- this.$router.push({ query: { productor: undefined } });
146
- }
147
- this.$store.commit('filterOrga', { orgaId: undefined });
138
+ this.removeSelectedOrga();
148
139
  },
149
140
  },
150
141
  })
@@ -153,69 +144,69 @@ export default defineComponent({
153
144
  <style lang="scss">
154
145
  @import '../../../sass/_variables.scss';
155
146
  .octopus-app{
156
- .filter-speech-bubble {
157
- position: absolute;
158
- background: $octopus-primary-dark;
159
- border-radius: 0.4em;
160
- width: 10rem;
161
- right: 4rem;
162
- padding: 5px;
163
- -webkit-animation: fadein 1s;
164
- -moz-animation: fadein 1s;
165
- animation: fadein 1s;
166
- color: white;
167
- }
168
-
169
- .filter-speech-bubble:after {
170
- content: '';
171
- position: absolute;
172
- right: 0;
173
- top: 50%;
174
- width: 0;
175
- height: 0;
176
- border: 18px solid transparent;
177
- border-left-color: $octopus-primary-dark;
178
- border-right: 0;
179
- border-bottom: 0;
180
- margin-top: -9px;
181
- margin-right: -18px;
182
- -webkit-animation: fadein 1s;
183
- -moz-animation: fadein 1s;
184
- animation: fadein 1s;
185
- }
186
- @keyframes fadein {
187
- from {
188
- opacity: 0;
189
- }
190
- to {
191
- opacity: 1;
147
+ .filter-speech-bubble {
148
+ position: absolute;
149
+ background: $octopus-primary-dark;
150
+ border-radius: 0.4em;
151
+ width: 10rem;
152
+ right: 4rem;
153
+ padding: 5px;
154
+ -webkit-animation: fadein 1s;
155
+ -moz-animation: fadein 1s;
156
+ animation: fadein 1s;
157
+ color: white;
192
158
  }
193
- }
194
- @-moz-keyframes fadein {
195
- from {
196
- opacity: 0;
159
+
160
+ .filter-speech-bubble:after {
161
+ content: '';
162
+ position: absolute;
163
+ right: 0;
164
+ top: 50%;
165
+ width: 0;
166
+ height: 0;
167
+ border: 18px solid transparent;
168
+ border-left-color: $octopus-primary-dark;
169
+ border-right: 0;
170
+ border-bottom: 0;
171
+ margin-top: -9px;
172
+ margin-right: -18px;
173
+ -webkit-animation: fadein 1s;
174
+ -moz-animation: fadein 1s;
175
+ animation: fadein 1s;
197
176
  }
198
- to {
199
- opacity: 1;
177
+ @keyframes fadein {
178
+ from {
179
+ opacity: 0;
180
+ }
181
+ to {
182
+ opacity: 1;
183
+ }
200
184
  }
201
- }
202
- @-webkit-keyframes fadein {
203
- from {
204
- opacity: 0;
185
+ @-moz-keyframes fadein {
186
+ from {
187
+ opacity: 0;
188
+ }
189
+ to {
190
+ opacity: 1;
191
+ }
205
192
  }
206
- to {
207
- opacity: 1;
193
+ @-webkit-keyframes fadein {
194
+ from {
195
+ opacity: 0;
196
+ }
197
+ to {
198
+ opacity: 1;
199
+ }
208
200
  }
209
- }
210
- .filter-organisation-chooser {
211
- display: flex;
212
- align-items: center;
213
- flex-grow: 1;
214
- margin-right: 10%;
215
- position: relative;
216
- @media (max-width: 500px) {
217
- margin-right: 0;
201
+ .filter-organisation-chooser {
202
+ display: flex;
203
+ align-items: center;
204
+ flex-grow: 1;
205
+ margin-right: 10%;
206
+ position: relative;
207
+ @media (max-width: 500px) {
208
+ margin-right: 0;
209
+ }
218
210
  }
219
211
  }
220
- }
221
212
  </style>
@@ -80,10 +80,7 @@ export default defineComponent({
80
80
  const topicIndex = this.rubriquageDisplay.findIndex(
81
81
  ( element: Rubriquage) => element.rubriquageId === rubriquageId
82
82
  );
83
- if(-1 !== topicIndex){
84
- return this.rubriquageDisplay[topicIndex].rubriques;
85
- }
86
- return [];
83
+ return -1 !== topicIndex ? this.rubriquageDisplay[topicIndex].rubriques : [];
87
84
  },
88
85
  onRubriqueSelected(rubrique: Rubrique): void {
89
86
  if (rubrique.rubriqueId === this.rubriqueId) return;
@@ -151,11 +151,7 @@ export default defineComponent({
151
151
  this.arrayFilter = [{rubriquageId: this.rubriquageData[0].rubriquageId, rubriqueId: 0, nameRubriquage:this.rubriquageData[0].title, nameRubrique:""}];
152
152
  this.isRubriquage = false;
153
153
  }
154
- if(this.isRubriquage){
155
- this.$emit('updateRubriquageFilter', this.arrayFilter);
156
- }else{
157
- this.$emit('updateRubriquageFilter', []);
158
- }
154
+ this.$emit('updateRubriquageFilter',this.isRubriquage? this.arrayFilter : []);
159
155
  this.$nextTick(() => {
160
156
  this.isInternChanged = false;
161
157
  });
@@ -0,0 +1,150 @@
1
+ <template>
2
+ <div
3
+ :id="id"
4
+ class="d-flex flex-column align-items-center"
5
+ >
6
+ <ClassicLoading
7
+ :loading-text="loadingText"
8
+ :error-text="errorText"
9
+ />
10
+ <template v-if="!loading">
11
+ <div class="paginate-section page-box">
12
+ <div class="text-secondary">
13
+ <template v-if="textCount && (windowWidth > 1300 || windowWidth<=960)">
14
+ {{ textCount }}
15
+ </template>
16
+ </div>
17
+ <Paginate
18
+ v-if="!isPhone"
19
+ :first="first"
20
+ :rows-per-page="rowsPerPage"
21
+ :total-count="totalCount"
22
+ :range-size="rangeSize"
23
+ @update:first="changeFirst"
24
+ @update:rowsPerPage="changeSize"
25
+ />
26
+ </div>
27
+ </template>
28
+ <slot name="list" />
29
+ <button
30
+ v-show="((first+rowsPerPage) < totalCount) && isPhone"
31
+ :disabled="loading"
32
+ class="btn"
33
+ :class="buttonPlus ? 'btn-primary align-self-center width-fit-content m-4' : 'btn-more'"
34
+ :title="$t('See more')"
35
+ @click="fetchMore"
36
+ >
37
+ <template v-if="buttonPlus">
38
+ {{ $t('See more') }}
39
+ </template>
40
+ <div
41
+ :class="buttonPlus?'ms-1':''"
42
+ class="saooti-more"
43
+ />
44
+ </button>
45
+ </div>
46
+ </template>
47
+
48
+ <script lang="ts">
49
+ import domHelper from '../../../helper/dom';
50
+ import ClassicLoading from '../../form/ClassicLoading.vue';
51
+ import { state } from '../../../store/paramStore';
52
+ import Paginate from './Paginate.vue';
53
+ import { defineComponent } from 'vue'
54
+ export default defineComponent({
55
+ name: 'ListPaginate',
56
+ components: {
57
+ Paginate,
58
+ ClassicLoading
59
+ },
60
+ props: {
61
+ first: { default: 0, type: Number},
62
+ rowsPerPage: { default: 30, type: Number},
63
+ totalCount: { default: 0, type: Number},
64
+ textCount: { default: undefined, type: String},
65
+ id: {default: '', type: String},
66
+ loadingText:{ default: undefined, type: String},
67
+ errorText:{ default: undefined, type: String},
68
+ loading: { default: false, type:Boolean},
69
+ isMobile: { default: false, type: Boolean}
70
+ },
71
+
72
+ emits: ['update:first', 'update:rowsPerPage', 'update:isMobile'],
73
+ data() {
74
+ return {
75
+ windowWidth: window.innerWidth as number,
76
+ };
77
+ },
78
+ computed:{
79
+ buttonPlus(): boolean {
80
+ return (state.generalParameters.buttonPlus as boolean);
81
+ },
82
+ isPhone(){
83
+ return 960 >= this.windowWidth;
84
+ },
85
+ rangeSize(){
86
+ if(this.windowWidth > 1600){
87
+ return 3;
88
+ }else if(this.windowWidth > 1530){
89
+ return 2;
90
+ }
91
+ return 1;
92
+ },
93
+ },
94
+ watch:{
95
+ isPhone:{
96
+ immediate:true,
97
+ handler(){
98
+ this.$emit('update:isMobile', this.isPhone);
99
+ }
100
+ }
101
+ },
102
+ mounted() {
103
+ this.$nextTick(() => {
104
+ window.addEventListener('resize', this.onResize);
105
+ })
106
+ },
107
+ beforeUnmount() {
108
+ window.removeEventListener('resize', this.onResize);
109
+ },
110
+ methods:{
111
+ onResize() {
112
+ this.windowWidth = window.innerWidth;
113
+ },
114
+ fetchMore(){
115
+ this.$emit('update:first', this.first + this.rowsPerPage);
116
+ },
117
+ changeFirst(firstValue: number){
118
+ this.scrollToTop();
119
+ this.$emit('update:first', firstValue);
120
+ },
121
+ changeSize(sizeValue: number){
122
+ this.scrollToTop();
123
+ this.$emit('update:rowsPerPage', sizeValue)
124
+ },
125
+ scrollToTop(){
126
+ const element = document.getElementById(this.id);
127
+ if(!element || element.getBoundingClientRect().top > 0){return;}
128
+ const y = element.getBoundingClientRect().top + window.pageYOffset - domHelper.convertRemToPixels(3.5);
129
+ window.scrollTo({top: y, behavior: 'smooth'});
130
+ }
131
+ }
132
+ })
133
+ </script>
134
+ <style lang="scss">
135
+ .octopus-app .page-box.paginate-section{
136
+ display: flex;
137
+ justify-content: space-between;
138
+ align-items: center;
139
+ width: 99vw;
140
+ position: sticky;
141
+ top: 3.5rem;
142
+ z-index: 9;
143
+ padding-bottom: 1rem;
144
+ padding-top: 1rem;
145
+ @media (max-width: 960px) {
146
+ position: initial;
147
+ justify-content:center;
148
+ }
149
+ }
150
+ </style>