@saooti/octopus-sdk 34.0.11 → 34.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "34.0.11",
3
+ "version": "34.0.13",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -8,7 +8,7 @@
8
8
  "serve": "vite preview",
9
9
  "build": "vite build",
10
10
  "dev": "vite",
11
- "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
11
+ "lint": "eslint --ext .js,.vue --fix src",
12
12
  "build_bundle": "vue-cli-service build --target lib --name octopus ./index.js",
13
13
  "prettifile": "prettier --single-quote --trailing-comma es5 --write",
14
14
  "prettify": "prettier --single-quote --trailing-comma es5 --write src/**/**/**/*.{js,vue}",
@@ -20,15 +20,15 @@
20
20
  "@vue/cli": "^5.0.8",
21
21
  "@vue/compat": "^3.2.45",
22
22
  "autoprefixer": "^10.4.13",
23
- "axios": "^1.2.1",
23
+ "axios": "^1.2.2",
24
24
  "express": "^4.18.2",
25
25
  "hls.js": "^1.2.9",
26
26
  "humanize-duration": "^3.27.2",
27
27
  "jest": "^29.3.1",
28
- "jquery": "^3.6.2",
28
+ "jquery": "^3.6.3",
29
29
  "moment": "^2.29.4",
30
30
  "qrcode.vue": "^3.3.3",
31
- "sass": "^1.56.2",
31
+ "sass": "^1.57.1",
32
32
  "sonarqube-scanner": "^2.9.1",
33
33
  "swiper": "^8.4.5",
34
34
  "v-calendar": "^3.0.0-alpha.8",
@@ -43,18 +43,17 @@
43
43
  "vuex": "^4.1.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/jquery": "^3.5.14",
47
- "@typescript-eslint/eslint-plugin": "^5.46.1",
48
- "@typescript-eslint/parser": "^5.46.1",
46
+ "@types/jquery": "^3.5.16",
47
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
48
+ "@typescript-eslint/parser": "^5.48.0",
49
49
  "@vitejs/plugin-vue": "^3.2.0",
50
50
  "@vue/compiler-sfc": "^3.2.45",
51
51
  "@vue/eslint-config-typescript": "^11.0.2",
52
- "eslint": "^8.29.0",
53
- "eslint-plugin-vue": "^9.8.0",
52
+ "eslint": "^8.31.0",
53
+ "eslint-plugin-vue": "^7.17.0",
54
54
  "typescript": "^4.9.4"
55
55
  },
56
56
  "eslintConfig": {
57
- "parser": "vue-eslint-parser",
58
57
  "root": true,
59
58
  "env": {
60
59
  "node": true
package/src/App.vue CHANGED
@@ -15,14 +15,14 @@
15
15
  />
16
16
  <CategoryFilter />
17
17
  <router-view />
18
- <Footer />
18
+ <FooterOctopus />
19
19
  <Player />
20
20
  </div>
21
21
  </template>
22
22
 
23
23
  <script lang="ts">
24
24
  import TopBar from '@/components/misc/TopBar.vue';
25
- import Footer from '@/components/misc/Footer.vue';
25
+ import FooterOctopus from '@/components/misc/Footer.vue';
26
26
  import Player from '@/components/misc/player/Player.vue';
27
27
  import CategoryFilter from '@/components/display/categories/CategoryFilter.vue';
28
28
  import { state } from './store/paramStore';
@@ -40,7 +40,7 @@ export default defineComponent({
40
40
  TopBar,
41
41
  LeftMenu,
42
42
  CategoryFilter,
43
- Footer,
43
+ FooterOctopus,
44
44
  Player
45
45
  },
46
46
 
@@ -121,8 +121,7 @@
121
121
  .img-box {
122
122
  border-radius: 2rem !important;
123
123
  @media (max-width: 680px) {
124
- margin-top: 1rem !important;
125
- margin: auto;
124
+ margin: 1rem auto auto !important;
126
125
  }
127
126
  }
128
127
  @media (max-width: 680px) {
@@ -135,6 +135,7 @@ export default defineComponent({
135
135
  const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
136
136
  this.$router.replace({ query: { ...this.$route.query, ...{ rubriquesId:"" !== queryString? queryString : undefined}} });
137
137
  }
138
+
138
139
  this.$store.commit('filterRubrique', newFilter);
139
140
  }
140
141
  if(event){
@@ -33,7 +33,7 @@
33
33
  :text-init="searchPattern"
34
34
  class="d-flex align-items-center flex-grow-1"
35
35
  :autofocus="true"
36
- id-checkbox="productor-search-input"
36
+ idSearch="productor-search-input"
37
37
  :label="searchText"
38
38
  @update:textInit="$emit('update:searchPattern', $event)"
39
39
  />
@@ -7,7 +7,7 @@
7
7
  v-if="!loading && notEmptyPlaylist"
8
8
  v-model:textInit="searchPattern"
9
9
  class="width-600 align-self-baseline mb-2"
10
- id-checkbox="podcast-list-search"
10
+ idSearch="podcast-list-search"
11
11
  :label="$t('Search')"
12
12
  />
13
13
  <ListPaginate
@@ -13,7 +13,7 @@
13
13
  <ClassicSearch
14
14
  v-model:textInit="searchPattern"
15
15
  class="flex-small-grow"
16
- id-checkbox="podcast-filter-search"
16
+ idSearch="podcast-filter-search"
17
17
  :label="$t('Search')"
18
18
  />
19
19
  </div>
@@ -27,8 +27,8 @@
27
27
  :organisation-id="productorId"
28
28
  :reload="reloadList"
29
29
  :include-hidden="editRight"
30
- :showCount="showCount"
31
- :displaySortText="false"
30
+ :show-count="showCount"
31
+ :display-sort-text="false"
32
32
  @fetch="fetch"
33
33
  />
34
34
  </div>
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <div
3
- id="podcast-item-container"
4
3
  class="podcast-item-container"
5
4
  :class="[
6
5
  podcastShadow ? 'shadow-element' : '',
@@ -28,7 +28,7 @@
28
28
  >
29
29
  <slot
30
30
  :name="'tab'+(index-1)"
31
- :isActive="activeTab === (index-1)"
31
+ :is-active="activeTab === (index-1)"
32
32
  />
33
33
  </div>
34
34
  </div>
@@ -81,69 +81,71 @@ export default defineComponent({
81
81
  }
82
82
  },
83
83
  setPopoverData (e: MouseEvent|PointerEvent) {
84
- if(this.disable){
84
+ if(this.disable || !e || !e.target){
85
85
  return;
86
86
  }
87
- if(e && e.target){
88
- if("click"===e.type){
89
- if(this.show && this.isClick){
90
- this.isClick = false;
91
- this.clearData();
92
- return;
93
- }
94
- this.isClick = true;
87
+ if("click"===e.type){
88
+ if(this.show && this.isClick){
89
+ this.isClick = false;
90
+ this.clearData();
91
+ return;
95
92
  }
96
- this.show = true;
97
-
98
- let parentLeft = 0;
99
- let parentRight = 0;
100
- let parentTop = 0;
101
- let parentScrollTop = 0;
102
- if(this.relativeClass){
103
- const modalBody = document.getElementsByClassName(this.relativeClass)[0];
104
- if(undefined===modalBody){
105
- (this.$refs.popover as HTMLElement).style.display = 'block';
106
- this.posX = 0;
107
- this.posY = 0;
108
- return;
109
- }
110
- const modalBodyRect = modalBody.getBoundingClientRect();
111
- parentLeft = modalBodyRect.left;
112
- parentRight = modalBodyRect.right;
113
- parentTop = modalBodyRect.top;
114
- parentScrollTop=modalBody.scrollTop;
93
+ this.isClick = true;
94
+ }
95
+ this.show = true;
96
+ let parentLeft = 0;
97
+ let parentRight = 0;
98
+ let parentTop = 0;
99
+ let parentScrollTop = 0;
100
+ if(this.relativeClass){
101
+ const modalBody = document.getElementsByClassName(this.relativeClass)[0];
102
+ if(undefined===modalBody){
103
+ (this.$refs.popover as HTMLElement).style.display = 'block';
104
+ this.posX = 0;
105
+ this.posY = 0;
106
+ return;
115
107
  }
116
- const rectElement = (e.target as HTMLElement).getBoundingClientRect();
117
- (this.$refs.popover as HTMLElement).style.display = 'block';
118
- this.posX = this.leftPos? (rectElement.right -parentRight ) - (this.$refs.popover as HTMLElement).clientWidth : (rectElement.left -parentLeft );
119
- this.posY = ((rectElement.bottom+ parentScrollTop ) - parentTop ) + (this.isFixed ? 0 : window.scrollY)+ 5;
108
+ const modalBodyRect = modalBody.getBoundingClientRect();
109
+ parentLeft = modalBodyRect.left;
110
+ parentRight = modalBodyRect.right;
111
+ parentTop = modalBodyRect.top;
112
+ parentScrollTop=modalBody.scrollTop;
120
113
  }
114
+ const rectElement = (e.target as HTMLElement).getBoundingClientRect();
115
+ (this.$refs.popover as HTMLElement).style.display = 'block';
116
+ this.posX = this.leftPos? (rectElement.right -parentRight ) - (this.$refs.popover as HTMLElement).clientWidth : (rectElement.left -parentLeft );
117
+ this.posY = ((rectElement.bottom+ parentScrollTop ) - parentTop ) + (this.isFixed ? 0 : window.scrollY)+ 5;
121
118
  },
122
119
  async clearDataBlur (e: FocusEvent) {
123
- if(e.relatedTarget){
124
- const myElement = e.relatedTarget as HTMLElement;
125
- if(this.popoverId===myElement.id){return;}
126
- const parent = this.$refs.popover as HTMLElement;
127
- if (null!==parent && parent.contains(myElement)) {
128
- if(null!==myElement.classList && myElement.classList.contains('octopus-dropdown-item')){
129
- if((myElement as HTMLAnchorElement).href ?? false){
130
- if("true"===myElement.getAttribute('reallink')){
131
- await myElement.click();
132
- }else{
133
- await this.$router.push((myElement as HTMLAnchorElement).pathname);
134
- }
135
- }
136
- this.$nextTick(() => {
137
- this.isClick = false;
138
- this.clearData();
139
- });
140
- }
141
- return;
142
- }
120
+ if(!e.relatedTarget){
121
+ return this.clearClick();
122
+ }
123
+ const myElement = e.relatedTarget as HTMLElement;
124
+ if(this.popoverId===myElement.id){return;}
125
+ const parent = this.$refs.popover as HTMLElement;
126
+ if (null===parent || !parent.contains(myElement)) {
127
+ return this.clearClick();
143
128
  }
129
+ if(null===myElement.classList || !myElement.classList.contains('octopus-dropdown-item')){
130
+ return;
131
+ }
132
+ if(!(myElement as HTMLAnchorElement).href){
133
+ return this.clearClick();
134
+ }
135
+ if("true"===myElement.getAttribute('reallink')){
136
+ myElement.click();
137
+ }else{
138
+ await this.$router.push((myElement as HTMLAnchorElement).pathname);
139
+ }
140
+ this.$nextTick(() => {
141
+ this.isClick = false;
142
+ this.clearData();
143
+ });
144
+ },
145
+ clearClick(){
144
146
  this.isClick = false;
145
147
  this.clearData();
146
- },
148
+ },
147
149
  clearData () {
148
150
  if(this.isClick){
149
151
  return;
@@ -3,7 +3,7 @@ import DurationHelper from '../../../helper/duration';
3
3
  import { state } from '../../../store/paramStore';
4
4
  import { defineComponent } from 'vue';
5
5
  import { RouteLocationRaw } from 'vue-router';
6
- import { MediaRadio, MetadataRadio, Radio } from '@/store/class/general/player';
6
+ import { MetadataRadio, Radio } from '@/store/class/general/player';
7
7
  import octopusApi from '@saooti/octopus-api';
8
8
  export const playerDisplay = defineComponent({
9
9
  props: {
@@ -50,7 +50,7 @@
50
50
  <ShareButtons
51
51
  v-if="pageParameters.isShareButtons"
52
52
  :emission="emission"
53
- :isVertical="!authenticated && !notExclusive"
53
+ :is-vertical="!authenticated && !notExclusive"
54
54
  />
55
55
  </div>
56
56
  </div>
@@ -66,7 +66,7 @@
66
66
  :emission-id="emissionId"
67
67
  />
68
68
  <PodcastFilterList
69
- :showCount="true"
69
+ :show-count="true"
70
70
  :emission-id="emissionId"
71
71
  :category-filter="false"
72
72
  :edit-right="editRight"
@@ -71,14 +71,13 @@ export default defineComponent({
71
71
  deep: true,
72
72
  immediate: true,
73
73
  handler(){
74
- if(this.rubriqueFilter.length){
75
- this.updateRubriquageFilter();
76
- }
74
+ this.updateRubriquageFilter();
77
75
  }
78
76
  }
79
77
  },
80
78
  methods:{
81
79
  updateRubriquageFilter(){
80
+ debugger;
82
81
  const length = this.rubriqueFilter.length;
83
82
  const rubriqueId: Array<number>= [];
84
83
  for (let index = 0; index < length; index++) {
@@ -37,7 +37,7 @@
37
37
  v-if="pageParameters.isShareButtons"
38
38
  :participant-id="participantId"
39
39
  :organisation-id="participant.orga.id"
40
- :isVertical="false"
40
+ :is-vertical="false"
41
41
  />
42
42
  </div>
43
43
  </div>
@@ -47,7 +47,7 @@
47
47
  :name="name"
48
48
  :category-filter="true"
49
49
  :reload="reload"
50
- :showCount="true"
50
+ :show-count="true"
51
51
  />
52
52
  <PodcastList
53
53
  v-else
@@ -39,7 +39,7 @@
39
39
  <ShareButtons
40
40
  v-if="pageParameters.isShareButtons"
41
41
  :playlist="playlist"
42
- :isVertical="true"
42
+ :is-vertical="true"
43
43
  />
44
44
  </div>
45
45
  </div>
@@ -54,7 +54,7 @@
54
54
  <ShareButtons
55
55
  v-if="pageParameters.isShareButtons"
56
56
  :podcast="podcast"
57
- :isVertical="!authenticated && !notExclusive"
57
+ :is-vertical="!authenticated && !notExclusive"
58
58
  />
59
59
  </div>
60
60
  </div>
@@ -5,7 +5,7 @@
5
5
  v-if="!hideBar"
6
6
  v-model:textInit="rawQuery"
7
7
  :autofocus="true"
8
- id-checkbox="search-page-input"
8
+ idSearch="search-page-input"
9
9
  :label="$t('Please type at least three characters')"
10
10
  />
11
11
  <PodcastList