@saooti/octopus-sdk 33.2.6 → 33.2.8

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/index.ts CHANGED
@@ -61,6 +61,7 @@ export const getClassicCheckbox = () => import("./src/components/form/ClassicChe
61
61
  export const getClassicRadio = () => import("./src/components/form/ClassicRadio.vue");
62
62
  export const getClassicLoading = () => import("./src/components/form/ClassicLoading.vue");
63
63
  export const getClassicSelect = () => import("./src/components/form/ClassicSelect.vue");
64
+ export const getClassicDatePicker = () => import("./src/components/form/ClassicDatePicker.vue");
64
65
  export const getPaginate = () => import("./src/components/display/list/Paginate.vue");
65
66
  export const getListPaginate = () => import("./src/components/display/list/ListPaginate.vue");
66
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "33.2.6",
3
+ "version": "33.2.8",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/src/App.vue CHANGED
@@ -1,9 +1,8 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="isInit"
4
- id="app"
5
4
  :key="reload"
6
- class="octopus-app"
5
+ class="d-flex flex-column h-100 octopus-app"
7
6
  >
8
7
  <TopBar
9
8
  v-model:displayMenu="displayMenu"
@@ -17,12 +16,14 @@
17
16
  <CategoryFilter />
18
17
  <router-view />
19
18
  <Footer />
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
25
  import Footer from '@/components/misc/Footer.vue';
26
+ import Player from '@/components/misc/player/Player.vue';
26
27
  import CategoryFilter from '@/components/display/categories/CategoryFilter.vue';
27
28
  import { state } from './store/paramStore';
28
29
  import { Rubriquage } from './store/class/rubrique/rubriquage';
@@ -40,6 +41,7 @@ export default defineComponent({
40
41
  LeftMenu,
41
42
  CategoryFilter,
42
43
  Footer,
44
+ Player
43
45
  },
44
46
 
45
47
  mixins: [initSDK],
@@ -27,18 +27,4 @@
27
27
  position: relative;
28
28
  width: 100%;
29
29
  }
30
- .vc-select select{
31
- padding: 0 !important;
32
- }
33
- .vc-date{
34
- .vc-month,.vc-day,.vc-year{
35
- color: $octopus-primary-color !important;
36
- }
37
- }
38
- .vc-highlight{
39
- background-color: $octopus-primary-color !important;
40
- }
41
- .vc-select select:focus{
42
- border-color: $octopus-primary-color !important;
43
- }
44
30
  }
@@ -12,8 +12,16 @@ body{
12
12
  background: #ebebeb;
13
13
  min-height: 100%;
14
14
  overscroll-behavior-y: contain;
15
+ display: flex;
16
+ flex-direction: column;
17
+ }
18
+ #app{
19
+ display: flex;
20
+ flex-direction: column;
21
+ flex-grow: 1;
15
22
  }
16
23
  .octopus-app{
24
+ flex-grow: 1;
17
25
  *:focus-visible{
18
26
  outline: none;
19
27
  box-shadow: 0 0 10px 1px $octopus-primary-color !important;
@@ -66,6 +74,7 @@ body{
66
74
  .page-box{
67
75
  background-color: $octopus-background;
68
76
  padding: 2rem 5rem 5rem 5rem;
77
+ flex-grow: 1;
69
78
  @media (max-width: 1400px) {
70
79
  padding: 2rem;
71
80
  }
@@ -17,5 +17,4 @@ $breadcrumb-border-radius: 2rem !default;
17
17
  @import './form.scss';
18
18
  @import './multiselect.scss';
19
19
  @import './transition.scss';
20
- @import './share.scss';
21
- @import 'v-calendar/dist/style.css';
20
+ @import './share.scss';
@@ -13,22 +13,12 @@
13
13
  id-checkbox="search-from-checkbox"
14
14
  :label="$t('From the :')"
15
15
  />
16
- <DatePicker
17
- v-model="fromDate"
16
+ <ClassicDatePicker
18
17
  class="ps-3 pe-3"
19
- mode="dateTime"
20
- color="green"
21
- is24hr
22
- @update:modelValue="updateFromDate()"
23
- >
24
- <template #default="{ inputValue, inputEvents }">
25
- <input
26
- class="px-2 py-1 border rounded focus:border-blue-300"
27
- :value="inputValue"
28
- v-on="inputEvents"
29
- >
30
- </template>
31
- </DatePicker>
18
+ :date="fromDate"
19
+ templateClass="px-2 py-1 border rounded focus:border-blue-300"
20
+ @updateDate="fromDate=$event;updateFromDate"
21
+ />
32
22
  </div>
33
23
  <div class="d-flex align-items-center">
34
24
  <ClassicCheckbox
@@ -37,22 +27,12 @@
37
27
  id-checkbox="search-to-checkbox"
38
28
  :label="$t('To the :')"
39
29
  />
40
- <DatePicker
41
- v-model="toDate"
30
+ <ClassicDatePicker
42
31
  class="ps-3"
43
- mode="dateTime"
44
- color="green"
45
- is24hr
46
- @update:modelValue="updateToDate()"
47
- >
48
- <template #default="{ inputValue, inputEvents }">
49
- <input
50
- class="px-2 py-1 border rounded focus:border-blue-300"
51
- :value="inputValue"
52
- v-on="inputEvents"
53
- >
54
- </template>
55
- </DatePicker>
32
+ :date="toDate"
33
+ templateClass="px-2 py-1 border rounded focus:border-blue-300"
34
+ @updateDate="toDate=$event;updateToDate"
35
+ />
56
36
  </div>
57
37
  </div>
58
38
  </template>
@@ -60,17 +40,17 @@
60
40
  <script lang="ts">
61
41
  import moment from 'moment';
62
42
  import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
63
- import { DatePicker } from 'v-calendar';
43
+ import ClassicDatePicker from '../../form/ClassicDatePicker.vue';
64
44
  import { defineComponent } from 'vue';
65
45
  export default defineComponent({
66
46
  components: {
67
- DatePicker,
47
+ ClassicDatePicker,
68
48
  ClassicCheckbox,
69
49
  },
70
50
  props: {
71
51
  isEmission: { default: false, type: Boolean},
72
- initToDate: { default: undefined, type: String},
73
- initFromDate: { default: undefined, type: String},
52
+ initToDate: { default: undefined, type: Date},
53
+ initFromDate: { default: undefined, type: Date},
74
54
  },
75
55
 
76
56
  emits: ['updateToDate', 'updateFromDate'],
@@ -79,8 +59,8 @@ export default defineComponent({
79
59
  return {
80
60
  isFrom: false as boolean,
81
61
  isTo: false as boolean,
82
- fromDate: moment().subtract(10, 'days').toISOString(),
83
- toDate: moment().toISOString(),
62
+ fromDate: moment().subtract(10, 'days').toDate(),
63
+ toDate: moment().toDate(),
84
64
  };
85
65
  },
86
66
 
@@ -139,4 +119,4 @@ export default defineComponent({
139
119
  },
140
120
  },
141
121
  })
142
- </script>
122
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="d-flex octopus-form-item">
2
+ <div class="d-flex align-items-center octopus-form-item">
3
3
  <div
4
4
  :class="isSwitch?'octopus-form-switch me-2':''"
5
5
  >
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <DatePicker
3
+ ref="datePicker"
4
+ :modelValue="undefined!==range ? range : date"
5
+ :mode="mode"
6
+ color="green"
7
+ is24hr
8
+ :is-range="undefined!==range"
9
+ :max-date="isMaxDate ? now : undefined"
10
+ :min-date="isMinDate ? now : undefined"
11
+ :columns="columnNumber"
12
+ :is-inline="columnNumber>1"
13
+ :update-on-input="conditionEdit"
14
+ :masks="isMask ? masks : undefined"
15
+ @update:modelValue="$emit('updateDate', $event)"
16
+ >
17
+ <template v-if="templateClass" #default="{ inputValue, inputEvents }">
18
+ <input
19
+ :class="templateClass"
20
+ :value="inputValue"
21
+ v-on="inputEvents"
22
+ >
23
+ </template>
24
+ </DatePicker>
25
+ </template>
26
+
27
+ <script lang="ts">
28
+ import moment from 'moment';
29
+ import { DatePicker } from 'v-calendar';
30
+ import { defineComponent } from 'vue';
31
+ export default defineComponent({
32
+ components: {
33
+ DatePicker,
34
+ },
35
+ props: {
36
+ date: { default: undefined, type: Date},
37
+ range: {default: undefined, type: Object as ()=>{ start: Date; end: Date }},
38
+ isMaxDate:{ default: false, type: Boolean},
39
+ isMinDate:{ default: false, type: Boolean},
40
+ columnNumber:{default:1, type: Number},
41
+ templateClass:{default: undefined, type: String},
42
+ mode:{default:"dateTime", type: String},
43
+ isMask:{default: false, type: Boolean},
44
+ conditionEdit:{default: true, type: Boolean},
45
+ },
46
+
47
+ emits: ['updateDate', 'update:date'],
48
+ data() {
49
+ return {
50
+ masks: {
51
+ input: 'YYYY-MM-DD',
52
+ },
53
+ };
54
+ },
55
+ computed: {
56
+ now(): Date {
57
+ return moment().add(1, 'days').toDate();
58
+ },
59
+ }
60
+ })
61
+ </script>
62
+ <style lang="scss">
63
+ @import '@scss/_variables.scss';
64
+ @import 'v-calendar/dist/style.css';
65
+ .octopus-app{
66
+ .vc-select select{
67
+ padding: 0 !important;
68
+ }
69
+ .vc-date{
70
+ .vc-month,.vc-day,.vc-year{
71
+ color: $octopus-primary-color !important;
72
+ }
73
+ }
74
+ .vc-highlight{
75
+ background-color: $octopus-primary-color !important;
76
+ }
77
+ .vc-select select:focus{
78
+ border-color: $octopus-primary-color !important;
79
+ }
80
+ }
81
+ </style>
@@ -10,6 +10,7 @@
10
10
  v-model="textValue"
11
11
  :disabled="isDisabled"
12
12
  class="c-hand w-100"
13
+ :class="transparent?'transparent':''"
13
14
  :style="getFontFamily"
14
15
  >
15
16
  <option
@@ -31,6 +32,7 @@ export default defineComponent({
31
32
  idSelect: { default: '', type: String },
32
33
  label: { default: '', type: String },
33
34
  displayLabel:{default: true, type: Boolean},
35
+ transparent:{ default: false, type: Boolean },
34
36
  isDisabled: { default: false, type: Boolean },
35
37
  options: { default: ()=>[], type: Array as () => Array<{title: string, value: string|undefined, fontFamily?: string}> },
36
38
  textInit: { default: undefined, type: String },
@@ -68,4 +70,15 @@ export default defineComponent({
68
70
  },
69
71
  },
70
72
  });
71
- </script>
73
+ </script>
74
+ <style lang="scss">
75
+ .octopus-app{
76
+ select.transparent {
77
+ background: transparent !important;
78
+ outline-color: transparent !important;
79
+ padding:0;
80
+ border: 0;
81
+ height: unset;
82
+ }
83
+ }
84
+ </style>
@@ -1,98 +1,62 @@
1
1
  <template>
2
2
  <div
3
- v-if="displayFooter"
4
3
  id="footer"
5
4
  ref="footer"
6
- class="d-flex-column p-3 secondary-bg border-top"
5
+ class="d-flex align-items-center justify-content-between border-top mt-auto"
7
6
  >
8
- <div class="d-flex flex-column flex-grow-1 align-items-end">
9
- <div class="d-flex flex-column">
10
- <template
11
- v-for="link in routerLinkArray"
12
- :key="link.routeName"
13
- >
14
- <router-link
15
- v-if="link.condition"
16
- class="link-hover"
17
- :to="{
18
- name: link.routeName,
19
- query: getQueriesRouter(link.routeName),
20
- }"
21
- >
22
- {{ link.title }}
23
- </router-link>
24
- </template>
7
+ <div class="d-flex align-items-center px-1" v-if="!isPodcastmaker">
8
+ <div class="text-dark me-2">
9
+ &copy; Saooti 2019
25
10
  </div>
26
- </div>
27
- <hr class="show-phone">
28
- <div
29
- v-if="!isPodcastmaker"
30
- class="d-flex flex-grow-1 align-items-center flex-column"
31
- >
32
- <div class="d-flex flex-column">
33
- <div class="text-dark">
34
- &copy; Saooti 2019
35
- </div>
36
- <router-link
37
- v-for="link in routerLinkSecondArray"
38
- :key="link.routeName"
39
- class="link-hover"
40
- :to="link.routeName"
41
- >
42
- {{ link.title }}
43
- </router-link>
44
- <ClassicSelect
45
- v-model:textInit="language"
46
- :display-label="false"
47
- id-select="language-chooser-select"
48
- :label="$t('Change locale')"
49
- :options="[{title:'Deutsch', value:'de'},
50
- {title:'English', value:'en'},
51
- {title:'Español', value:'es'},
52
- {title:'Français', value:'fr'},
53
- {title:'Italiano', value:'it'},
54
- {title:'Slovenščina', value:'sl'}]"
55
- />
56
- </div>
57
- </div>
58
- <hr class="show-phone">
59
- <div class="flex-grow-1">
60
- <a
61
- href="https://www.acpm.fr/L-ACPM/Certifications-et-Labels/Les-Podcasts"
62
- rel="noopener"
63
- target="_blank"
64
- :title="$t('Octopus is ACPM Podcast accredited')"
11
+ <router-link
12
+ v-for="link in routerLinkSecondArray"
13
+ :key="link.routeName"
14
+ class="link-hover me-2"
15
+ :to="link.routeName"
65
16
  >
66
- <img
67
- class="acpm_image"
68
- src="/img/ACPM.webp"
69
- :title="$t('Octopus is ACPM Podcast accredited')"
70
- :alt="$t('Octopus is ACPM Podcast accredited')"
71
- >
72
- </a>
17
+ {{ link.title }}
18
+ </router-link>
19
+ <ClassicSelect
20
+ v-model:textInit="language"
21
+ :display-label="false"
22
+ id-select="language-chooser-select"
23
+ :label="$t('Change locale')"
24
+ :transparent="true"
25
+ :options="[{title:'Deutsch', value:'de'},
26
+ {title:'English', value:'en'},
27
+ {title:'Español', value:'es'},
28
+ {title:'Français', value:'fr'},
29
+ {title:'Italiano', value:'it'},
30
+ {title:'Slovenščina', value:'sl'}]"
31
+ />
73
32
  </div>
74
- <div
33
+ <a
75
34
  v-if="isPodcastmaker && isContactLink"
76
- class="d-flex flex-column flex-grow-1 align-items-center"
35
+ id="footer-contact"
36
+ class="link-hover"
37
+ :href="isContactLink"
38
+ rel="noopener"
39
+ target="_blank"
40
+ >{{ $t('Contact') }}</a>
41
+ <a
42
+ href="https://www.acpm.fr/L-ACPM/Certifications-et-Labels/Les-Podcasts"
43
+ rel="noopener"
44
+ target="_blank"
45
+ :title="$t('Octopus is ACPM Podcast accredited')"
77
46
  >
78
- <div class="d-flex flex-column">
79
- <a
80
- id="footer-contact"
81
- class="link-hover"
82
- :href="isContactLink"
83
- rel="noopener"
84
- target="_blank"
85
- >{{ $t('Contact') }}</a>
86
- </div>
87
- </div>
47
+ <img
48
+ class="acpm_image"
49
+ src="/img/ACPM.webp"
50
+ :title="$t('Octopus is ACPM Podcast accredited')"
51
+ :alt="$t('Octopus is ACPM Podcast accredited')"
52
+ >
53
+ </a>
88
54
  </div>
89
- <Player @hide="showBlackBorder" />
90
55
  </template>
91
56
 
92
57
  <script lang="ts">
93
58
  import cookies from '../mixins/cookies';
94
59
  import ClassicSelect from '../form/ClassicSelect.vue';
95
- import Player from './player/Player.vue';
96
60
  import { state } from '../../store/paramStore';
97
61
  import {loadLocaleMessages} from '@/i18n';
98
62
  import octopusApi from '@saooti/octopus-api';
@@ -102,29 +66,16 @@ import { defineComponent } from 'vue'
102
66
  export default defineComponent({
103
67
  name: 'Footer',
104
68
  components: {
105
- Player,
106
69
  ClassicSelect
107
70
  },
108
71
 
109
72
  mixins:[cookies],
110
- props: {
111
- displayFooter: { default: true, type: Boolean},
112
- },
113
73
  data() {
114
74
  return {
115
75
  language: this.$i18n.locale,
116
76
  };
117
77
  },
118
78
  computed: {
119
- routerLinkArray(){
120
- return [
121
- {title : this.$t('Home'), routeName: 'home', condition : true},
122
- {title : this.$t('Podcasts'), routeName: 'podcasts', condition : true},
123
- {title : this.$t('Emissions'), routeName: 'emissions', condition : true},
124
- {title : this.$t('Productors'), routeName: 'productors', condition : !this.isPodcastmaker && !this.$store.state.filter.organisationId},
125
- {title : this.$t('Playlists'), routeName: 'playlists', condition : true},
126
- {title : this.$t('Speakers'), routeName: 'participants', condition : true},]
127
- },
128
79
  routerLinkSecondArray(){
129
80
  return [
130
81
  {title : this.$t('Contact'), routeName: '/main/pub/contact'},
@@ -158,15 +109,6 @@ export default defineComponent({
158
109
  iabId: this.$store.state.filter.iab?.id,
159
110
  rubriquesId: this.rubriqueQueryParam}
160
111
  },
161
- showBlackBorder(hide: boolean): void {
162
- const footerElement = (this.$refs.footer as HTMLElement);
163
- if(!footerElement){return;}
164
- if (hide) {
165
- footerElement.classList.remove('border-round');
166
- } else {
167
- footerElement.className += ' border-round';
168
- }
169
- },
170
112
  changeLanguage(): void{
171
113
  this.setCookie('octopus-language', this.language);
172
114
  loadLocaleMessages(this.$i18n, this.language, this.$store.state.general.isEducation);
@@ -190,23 +132,17 @@ export default defineComponent({
190
132
  .octopus-app{
191
133
  #footer{
192
134
  font-size: 0.7rem;
135
+ position: sticky;
136
+ bottom: 0;
137
+ z-index: 10;
138
+ background: white;
193
139
  .acpm_image {
194
- width: 70px;
195
- height: 70px;
140
+ width: 44px;
141
+ height: 44px;
196
142
  }
197
143
  a{
198
144
  color: #666;
199
145
  }
200
- .border-round {
201
- border-radius: 0 0 2rem 2rem;
202
- }
203
- /** PHONES*/
204
- @media (max-width: 960px) {
205
- .align-items-center,
206
- .align-items-end {
207
- align-items: flex-start !important;
208
- }
209
- }
210
146
  }
211
147
  }
212
148
  </style>
@@ -18,13 +18,14 @@
18
18
  :class="{
19
19
  'saooti-play': isPaused,
20
20
  'saooti-pause': isPlaying,
21
- '':!isPaused&&!isPlaying
21
+ 'p-0':!isPaused&&!isPlaying
22
22
  }"
23
23
  class="btn play-button-box text-light bg-primary"
24
24
  @click="switchPausePlay"
25
25
  >
26
26
  <Spinner
27
27
  v-if="!isPaused&&!isPlaying"
28
+ :small="true"
28
29
  />
29
30
  </button>
30
31
  <div class="text-light player-grow-content">