@saooti/octopus-sdk 34.0.16 → 35.0.1
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 +15 -15
- package/src/components/display/comments/CommentBasicView.vue +2 -2
- package/src/components/display/comments/CommentList.vue +2 -2
- package/src/components/display/emission/EmissionInlineList.vue +1 -1
- package/src/components/display/filter/DateFilter.vue +11 -11
- package/src/components/display/live/LiveItem.vue +3 -6
- package/src/components/display/live/LiveList.vue +3 -3
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +1 -1
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +1 -1
- package/src/components/display/podcasts/PodcastItem.vue +2 -2
- package/src/components/display/podcasts/PodcastItemInfo.vue +2 -2
- package/src/components/display/podcasts/PodcastModuleBox.vue +3 -3
- package/src/components/form/ClassicDatePicker.vue +2 -2
- package/src/components/misc/modal/NewsletterModal.vue +3 -3
- package/src/components/pages/Podcast.vue +2 -2
- package/src/i18n.ts +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"@vue/cli": "^5.0.8",
|
|
21
21
|
"@vue/compat": "^3.2.45",
|
|
22
22
|
"autoprefixer": "^10.4.13",
|
|
23
|
-
"axios": "^1.
|
|
23
|
+
"axios": "^1.3.0",
|
|
24
|
+
"dayjs": "^1.11.7",
|
|
24
25
|
"express": "^4.18.2",
|
|
25
|
-
"hls.js": "^1.2
|
|
26
|
+
"hls.js": "^1.3.2",
|
|
26
27
|
"humanize-duration": "^3.27.2",
|
|
27
|
-
"jest": "^29.
|
|
28
|
+
"jest": "^29.4.1",
|
|
28
29
|
"jquery": "^3.6.3",
|
|
29
|
-
"moment": "^2.29.4",
|
|
30
30
|
"qrcode.vue": "^3.3.3",
|
|
31
|
-
"sass": "^1.
|
|
32
|
-
"sonarqube-scanner": "^
|
|
33
|
-
"swiper": "^8.4.
|
|
31
|
+
"sass": "^1.58.0",
|
|
32
|
+
"sonarqube-scanner": "^3.0.0",
|
|
33
|
+
"swiper": "^8.4.7",
|
|
34
34
|
"v-calendar": "^3.0.0-alpha.8",
|
|
35
|
-
"vite": "^
|
|
35
|
+
"vite": "^4.0.4",
|
|
36
36
|
"vue": "^3.2.45",
|
|
37
37
|
"vue-i18n": "^9.2.2",
|
|
38
38
|
"vue-multiselect": "^3.0.0-alpha.2",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/jquery": "^3.5.16",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
48
|
-
"@typescript-eslint/parser": "^5.
|
|
49
|
-
"@vitejs/plugin-vue": "^
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
|
48
|
+
"@typescript-eslint/parser": "^5.50.0",
|
|
49
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
50
50
|
"@vue/compiler-sfc": "^3.2.45",
|
|
51
51
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
52
|
-
"eslint": "^8.
|
|
53
|
-
"eslint-plugin-vue": "^
|
|
54
|
-
"typescript": "^4.9.
|
|
52
|
+
"eslint": "^8.33.0",
|
|
53
|
+
"eslint-plugin-vue": "^9.9.0",
|
|
54
|
+
"typescript": "^4.9.5"
|
|
55
55
|
},
|
|
56
56
|
"eslintConfig": {
|
|
57
57
|
"root": true,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
import selenium from '../../mixins/selenium';
|
|
51
51
|
import displayMethods from '../../mixins/displayMethods';
|
|
52
52
|
import { CommentPodcast } from '@/store/class/general/comment';
|
|
53
|
-
import
|
|
53
|
+
import dayjs from 'dayjs';
|
|
54
54
|
import Popover from '../../misc/Popover.vue';
|
|
55
55
|
import { defineComponent } from 'vue';
|
|
56
56
|
export default defineComponent({
|
|
@@ -78,7 +78,7 @@ export default defineComponent({
|
|
|
78
78
|
return 'Valid'=== this.comment.status;
|
|
79
79
|
},
|
|
80
80
|
date(): string {
|
|
81
|
-
return this.comment.date ?
|
|
81
|
+
return this.comment.date ? dayjs(this.comment.date).format('D MMMM YYYY HH[h]mm') : '';
|
|
82
82
|
},
|
|
83
83
|
readMore(): string {
|
|
84
84
|
return this.summary ? this.$t('Read more') : this.$t('Read less');
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
38
38
|
import { state } from '../../../store/paramStore';
|
|
39
39
|
import octopusApi from '@saooti/octopus-api';
|
|
40
|
-
import
|
|
40
|
+
import dayjs from 'dayjs';
|
|
41
41
|
import { Podcast } from '@/store/class/general/podcast';
|
|
42
42
|
import { Conference } from '@/store/class/conference/conference';
|
|
43
43
|
import { CommentPodcast } from '@/store/class/general/comment';
|
|
@@ -184,7 +184,7 @@ export default defineComponent({
|
|
|
184
184
|
let indexNewComment = 0;
|
|
185
185
|
for (let i = 0, len = this.comments.length; i < len; i++) {
|
|
186
186
|
if (
|
|
187
|
-
|
|
187
|
+
dayjs(this.comments[i].date).isBefore(dayjs(comment.date))
|
|
188
188
|
) {
|
|
189
189
|
indexNewComment = i;
|
|
190
190
|
break;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script lang="ts">
|
|
41
|
-
import
|
|
41
|
+
import dayjs from 'dayjs';
|
|
42
42
|
import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
|
|
43
43
|
import ClassicDatePicker from '../../form/ClassicDatePicker.vue';
|
|
44
44
|
import { defineComponent } from 'vue';
|
|
@@ -59,17 +59,17 @@ export default defineComponent({
|
|
|
59
59
|
return {
|
|
60
60
|
isFrom: false as boolean,
|
|
61
61
|
isTo: false as boolean,
|
|
62
|
-
fromDate:
|
|
63
|
-
toDate:
|
|
62
|
+
fromDate: dayjs().subtract(10, 'days').toDate(),
|
|
63
|
+
toDate: dayjs().toDate(),
|
|
64
64
|
};
|
|
65
65
|
},
|
|
66
66
|
|
|
67
67
|
watch: {
|
|
68
68
|
isFrom(): void {
|
|
69
|
-
this.$emit('updateFromDate', this.isFrom ?
|
|
69
|
+
this.$emit('updateFromDate', this.isFrom ? dayjs(this.fromDate).toISOString() : undefined);
|
|
70
70
|
},
|
|
71
71
|
isTo(): void {
|
|
72
|
-
this.$emit('updateToDate', this.isTo ?
|
|
72
|
+
this.$emit('updateToDate', this.isTo ? dayjs(this.toDate).toISOString() : undefined);
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
75
|
|
|
@@ -86,33 +86,33 @@ export default defineComponent({
|
|
|
86
86
|
methods: {
|
|
87
87
|
updateFromDate(): void {
|
|
88
88
|
if (
|
|
89
|
-
|
|
89
|
+
dayjs(this.fromDate)
|
|
90
90
|
.startOf('minute')
|
|
91
91
|
.toISOString() ===
|
|
92
|
-
|
|
92
|
+
dayjs()
|
|
93
93
|
.subtract(10, 'days')
|
|
94
94
|
.startOf('minute')
|
|
95
95
|
.toISOString()
|
|
96
96
|
)
|
|
97
97
|
return;
|
|
98
98
|
if (this.isFrom) {
|
|
99
|
-
this.$emit('updateFromDate',
|
|
99
|
+
this.$emit('updateFromDate', dayjs(this.fromDate).toISOString());
|
|
100
100
|
} else {
|
|
101
101
|
this.isFrom = true;
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
updateToDate(): void {
|
|
105
105
|
if (
|
|
106
|
-
|
|
106
|
+
dayjs(this.toDate)
|
|
107
107
|
.startOf('minute')
|
|
108
108
|
.toISOString() ===
|
|
109
|
-
|
|
109
|
+
dayjs()
|
|
110
110
|
.startOf('minute')
|
|
111
111
|
.toISOString()
|
|
112
112
|
)
|
|
113
113
|
return;
|
|
114
114
|
if (this.isTo) {
|
|
115
|
-
this.$emit('updateToDate',
|
|
115
|
+
this.$emit('updateToDate', dayjs(this.toDate).toISOString());
|
|
116
116
|
} else {
|
|
117
117
|
this.isTo = true;
|
|
118
118
|
}
|
|
@@ -127,7 +127,7 @@ import { state } from '../../../store/paramStore';
|
|
|
127
127
|
import octopusApi from '@saooti/octopus-api';
|
|
128
128
|
import PodcastImage from '../podcasts/PodcastImage.vue';
|
|
129
129
|
import crudApi from '@/api/classicCrud';
|
|
130
|
-
import
|
|
130
|
+
import dayjs from 'dayjs';
|
|
131
131
|
// @ts-ignore
|
|
132
132
|
import humanizeDuration from 'humanize-duration';
|
|
133
133
|
import displayMethods from '../../mixins/displayMethods';
|
|
@@ -164,13 +164,10 @@ export default defineComponent({
|
|
|
164
164
|
return (state.generalParameters.podcastmaker as boolean);
|
|
165
165
|
},
|
|
166
166
|
hours(): string {
|
|
167
|
-
return !this.live?'':
|
|
167
|
+
return !this.live?'': dayjs(this.live.pubDate).format('HH[H]mm');
|
|
168
168
|
},
|
|
169
169
|
date(): string {
|
|
170
|
-
return !this.live? '':
|
|
171
|
-
},
|
|
172
|
-
displayDate(): string {
|
|
173
|
-
return !this.live? '':moment(this.live.pubDate).format('X');
|
|
170
|
+
return !this.live? '': dayjs(this.live.pubDate).format('D/MM/YYYY');
|
|
174
171
|
},
|
|
175
172
|
description(): string {
|
|
176
173
|
return this.live?.description??'';
|
|
@@ -39,7 +39,7 @@ import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
|
39
39
|
import LiveItem from './LiveItem.vue';
|
|
40
40
|
import { handle403 } from '../../mixins/handle403';
|
|
41
41
|
import octopusApi from '@saooti/octopus-api';
|
|
42
|
-
import
|
|
42
|
+
import dayjs from 'dayjs';
|
|
43
43
|
import { state } from '../../../store/paramStore';
|
|
44
44
|
import { Conference } from '@/store/class/conference/conference';
|
|
45
45
|
import { defineComponent } from 'vue'
|
|
@@ -91,7 +91,7 @@ export default defineComponent({
|
|
|
91
91
|
if (this.livesArray[1].lives.length > 0)
|
|
92
92
|
return this.$t('A live can start any moment');
|
|
93
93
|
if (this.livesArray[2].lives.length > 0)
|
|
94
|
-
return this.$t('Next live date', {date:
|
|
94
|
+
return this.$t('Next live date', {date: dayjs(this.livesArray[2].lives[0].date).format('LLLL'),});
|
|
95
95
|
return '';
|
|
96
96
|
},
|
|
97
97
|
myOrganisationId(): string|undefined {
|
|
@@ -157,7 +157,7 @@ export default defineComponent({
|
|
|
157
157
|
}else if("PENDING"===this.livesArray[i].status){
|
|
158
158
|
this.dataLivesToBe = dataLives;
|
|
159
159
|
for (let index = 0, len = dataLives.length; index < len; index++) {
|
|
160
|
-
if (
|
|
160
|
+
if (dayjs(dataLives[index].date).isBefore(dayjs())) {
|
|
161
161
|
this.livesArray[i].lives.push(dataLives[index]);
|
|
162
162
|
indexPast = index + 1;
|
|
163
163
|
} else {break;}
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
import PodcastItemInfo from './PodcastItemInfo.vue';
|
|
54
54
|
import PodcastImage from './PodcastImage.vue';
|
|
55
55
|
import { state } from '../../../store/paramStore';
|
|
56
|
-
import
|
|
56
|
+
import dayjs from 'dayjs';
|
|
57
57
|
import { Podcast } from '@/store/class/general/podcast';
|
|
58
58
|
import { defineComponent } from 'vue'
|
|
59
59
|
export default defineComponent({
|
|
@@ -88,7 +88,7 @@ export default defineComponent({
|
|
|
88
88
|
return (state.podcastPage.podcastItemDescription as boolean);
|
|
89
89
|
},
|
|
90
90
|
displayDate(): string {
|
|
91
|
-
return
|
|
91
|
+
return dayjs(this.podcast.pubDate).format();
|
|
92
92
|
},
|
|
93
93
|
description(): string {
|
|
94
94
|
return this.podcast.description ?? '';
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
import AnimatorsItem from './AnimatorsItem.vue';
|
|
53
53
|
import { state } from '../../../store/paramStore';
|
|
54
54
|
import { orgaComputed } from '../../mixins/orgaComputed';
|
|
55
|
-
import
|
|
55
|
+
import dayjs from 'dayjs';
|
|
56
56
|
// @ts-ignore
|
|
57
57
|
import humanizeDuration from 'humanize-duration';
|
|
58
58
|
import PodcastPlayBar from './PodcastPlayBar.vue';
|
|
@@ -83,7 +83,7 @@ export default defineComponent({
|
|
|
83
83
|
return (state.generalParameters.podcastmaker as boolean);
|
|
84
84
|
},
|
|
85
85
|
date(): string {
|
|
86
|
-
return
|
|
86
|
+
return dayjs(this.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
87
87
|
},
|
|
88
88
|
editRight(): boolean {
|
|
89
89
|
return (true===this.authenticated && this.myOrganisationId === this.podcastOrganisationId) ||
|
|
@@ -135,7 +135,7 @@ import PodcastImage from './PodcastImage.vue';
|
|
|
135
135
|
import ParticipantDescription from './ParticipantDescription.vue';
|
|
136
136
|
import TagList from './TagList.vue';
|
|
137
137
|
import { state } from '../../../store/paramStore';
|
|
138
|
-
import
|
|
138
|
+
import dayjs from 'dayjs';
|
|
139
139
|
// @ts-ignore
|
|
140
140
|
import humanizeDuration from 'humanize-duration';
|
|
141
141
|
import displayMethods from '../../mixins/displayMethods';
|
|
@@ -179,8 +179,8 @@ export default defineComponent({
|
|
|
179
179
|
return (state.generalParameters.podcastmaker as boolean);
|
|
180
180
|
},
|
|
181
181
|
date(): string {
|
|
182
|
-
if (this.podcast && 1970 !==
|
|
183
|
-
return
|
|
182
|
+
if (this.podcast && 1970 !== dayjs(this.podcast.pubDate).year()){
|
|
183
|
+
return dayjs(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
184
184
|
}
|
|
185
185
|
return '';
|
|
186
186
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script lang="ts">
|
|
31
|
-
import
|
|
31
|
+
import dayjs from 'dayjs';
|
|
32
32
|
import { DatePicker } from 'v-calendar';
|
|
33
33
|
import { defineComponent } from 'vue';
|
|
34
34
|
export default defineComponent({
|
|
@@ -57,7 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
},
|
|
58
58
|
computed: {
|
|
59
59
|
now(): Date {
|
|
60
|
-
return
|
|
60
|
+
return dayjs().toDate();
|
|
61
61
|
},
|
|
62
62
|
}
|
|
63
63
|
})
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
import ClassicModal from '../modal/ClassicModal.vue';
|
|
92
92
|
import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
|
|
93
93
|
import Snackbar from '../../misc/Snackbar.vue';
|
|
94
|
-
import
|
|
94
|
+
import dayjs from 'dayjs';
|
|
95
95
|
// @ts-ignore
|
|
96
96
|
import VSwatches from 'vue3-swatches';
|
|
97
97
|
// @ts-ignore
|
|
@@ -136,8 +136,8 @@ export default defineComponent({
|
|
|
136
136
|
|
|
137
137
|
computed: {
|
|
138
138
|
date(): string {
|
|
139
|
-
if(!this.podcast || 1970 ===
|
|
140
|
-
return
|
|
139
|
+
if(!this.podcast || 1970 === dayjs(this.podcast.pubDate).year()){return '';}
|
|
140
|
+
return dayjs(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
141
141
|
},
|
|
142
142
|
duration(): string {
|
|
143
143
|
if (!this.podcast || this.podcast.duration <= 1) return '';
|
|
@@ -99,7 +99,7 @@ import ClassicLoading from '../form/ClassicLoading.vue';
|
|
|
99
99
|
import octopusApi from '@saooti/octopus-api';
|
|
100
100
|
import crudApi from '@/api/classicCrud';
|
|
101
101
|
import { state } from '../../store/paramStore';
|
|
102
|
-
import
|
|
102
|
+
import dayjs from 'dayjs';
|
|
103
103
|
import { Podcast } from '@/store/class/general/podcast';
|
|
104
104
|
import { Conference } from '@/store/class/conference/conference';
|
|
105
105
|
import { handle403 } from '../mixins/handle403';
|
|
@@ -227,7 +227,7 @@ export default defineComponent({
|
|
|
227
227
|
return this.isLiveReadyToRecord ?this.$t('Live episode'): this.$t('Episode');
|
|
228
228
|
},
|
|
229
229
|
timeRemaining(): string {
|
|
230
|
-
return !this.podcast ? "":
|
|
230
|
+
return !this.podcast ? "":dayjs(this.podcast.pubDate).diff(dayjs(), 'seconds').toString();
|
|
231
231
|
},
|
|
232
232
|
},
|
|
233
233
|
watch: {
|
package/src/i18n.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { nextTick } from 'vue'
|
|
3
3
|
import { createI18n } from 'vue-i18n';
|
|
4
|
-
import
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
import 'dayjs/locale/de';
|
|
6
|
+
import 'dayjs/locale/es';
|
|
7
|
+
import 'dayjs/locale/fr';
|
|
8
|
+
import 'dayjs/locale/it';
|
|
9
|
+
import 'dayjs/locale/sl';
|
|
10
10
|
|
|
11
11
|
export function setupI18n(options: { locale: string }, isEducation: boolean) {
|
|
12
12
|
const i18n = createI18n(options)
|
|
@@ -16,7 +16,7 @@ export function setupI18n(options: { locale: string }, isEducation: boolean) {
|
|
|
16
16
|
|
|
17
17
|
export function setI18nLanguage(i18n: any, locale: string) {
|
|
18
18
|
i18n.locale = locale;
|
|
19
|
-
|
|
19
|
+
dayjs.locale(locale);
|
|
20
20
|
const html= document.querySelector('html');
|
|
21
21
|
if(html){
|
|
22
22
|
html.setAttribute('lang', locale);
|