@saooti/octopus-sdk 32.0.11 → 32.0.14
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 +4 -1
- package/{public/index.html → index.html} +3 -2
- package/package.json +11 -16
- package/src/components/display/podcasts/PodcastItemInfo.vue +1 -0
- package/src/components/misc/Footer.vue +0 -1
- package/src/i18n.ts +8 -1
- package/src/main.ts +0 -2
- package/src/router/router.ts +1 -1
- package/vite.config.js +16 -0
- package/babel.config.js +0 -5
- package/vue.config.js +0 -16
package/README.md
CHANGED
|
@@ -641,7 +641,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
|
641
641
|
* 31.0.48 Icones change
|
|
642
642
|
* 31.0.49 Style select
|
|
643
643
|
* 31.0.50 Améliorations responsive
|
|
644
|
-
|
|
644
|
+
* 31.0.51 Newest
|
|
645
645
|
|
|
646
646
|
* 32.0.0 Passage en 32
|
|
647
647
|
* 32.0.1 Navigation clavier
|
|
@@ -655,3 +655,6 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
|
655
655
|
* 32.0.9 Update icones
|
|
656
656
|
* 32.0.10 Ajout alt
|
|
657
657
|
* 32.0.11 Merge 31
|
|
658
|
+
* 32.0.12 Merge 31
|
|
659
|
+
* 32.0.13 Test Vite au lieu de Webpack
|
|
660
|
+
* 32.0.14 Mise en place Vite au lieu de Webpack
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<link rel="icon" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
7
|
+
<link rel="icon" href="/favicon.ico">
|
|
8
|
+
<link rel="stylesheet" href="/css/fonts/style.css">
|
|
9
9
|
<title>octopus-library</title>
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -15,4 +15,5 @@
|
|
|
15
15
|
<div id="app"></div>
|
|
16
16
|
<!-- built files will be auto injected -->
|
|
17
17
|
</body>
|
|
18
|
+
<script type="module" src="./src/main.ts"></script>
|
|
18
19
|
</html>
|
package/package.json
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.0.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"serve": "
|
|
9
|
-
"build": "
|
|
10
|
-
"
|
|
8
|
+
"serve": "vite preview",
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"dev": "vite",
|
|
11
|
+
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
|
|
11
12
|
"build_bundle": "vue-cli-service build --target lib --name octopus ./index.js",
|
|
12
13
|
"prettifile": "prettier --single-quote --trailing-comma es5 --write",
|
|
13
14
|
"prettify": "prettier --single-quote --trailing-comma es5 --write src/**/**/**/*.{js,vue}"
|
|
14
15
|
},
|
|
15
|
-
"main": "./dist/octopus.common.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@saooti/octopus-api": "^0.
|
|
17
|
+
"@saooti/octopus-api": "^0.32.0",
|
|
18
18
|
"@vue/cli": "^5.0.8",
|
|
19
19
|
"@vue/compat": "^3.2.37",
|
|
20
|
+
"autoprefixer": "^10.4.8",
|
|
20
21
|
"axios": "^0.24.0",
|
|
21
22
|
"bootstrap": "5.2.0",
|
|
22
|
-
"core-js": "^3.23.5",
|
|
23
23
|
"hls.js": "^1.1.5",
|
|
24
24
|
"humanize-duration": "^3.27.2",
|
|
25
25
|
"jquery": "^3.5.14",
|
|
26
26
|
"moment": "^2.29.4",
|
|
27
|
-
"moment-locales-webpack-plugin": "^1.2.0",
|
|
28
27
|
"qrcode.vue": "^3.3.3",
|
|
29
28
|
"sass": "^1.53.0",
|
|
30
|
-
"sass-loader": "^12.6.0",
|
|
31
29
|
"swiper": "^8.3.1",
|
|
32
30
|
"v-calendar": "^3.0.0-alpha.8",
|
|
31
|
+
"vite": "^3.0.4",
|
|
33
32
|
"vue": "^3.2.37",
|
|
34
33
|
"vue-i18n": "^9.2.0-beta.40",
|
|
35
34
|
"vue-multiselect": "^3.0.0-alpha.2",
|
|
@@ -37,22 +36,18 @@
|
|
|
37
36
|
"vue-router": "^4.1.2",
|
|
38
37
|
"vue3-lazyload": "^0.2.5-beta",
|
|
39
38
|
"vue3-swatches": "^1.0.10",
|
|
40
|
-
"vuex": "^4.0.2"
|
|
41
|
-
"webpack": "^5.73.0"
|
|
39
|
+
"vuex": "^4.0.2"
|
|
42
40
|
},
|
|
43
41
|
"devDependencies": {
|
|
44
42
|
"@types/bootstrap": "^5.1.13",
|
|
45
43
|
"@types/jquery": "^3.5.14",
|
|
46
44
|
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
47
45
|
"@typescript-eslint/parser": "^5.30.7",
|
|
48
|
-
"@
|
|
49
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
50
|
-
"@vue/cli-plugin-typescript": "^5.0.8",
|
|
51
|
-
"@vue/cli-service": "^5.0.8",
|
|
46
|
+
"@vitejs/plugin-vue": "^3.0.1",
|
|
52
47
|
"@vue/compiler-sfc": "^3.2.31",
|
|
53
48
|
"@vue/eslint-config-typescript": "^8.0.0",
|
|
54
49
|
"eslint": "^8.20.0",
|
|
55
|
-
"eslint-plugin-vue": "^7.
|
|
50
|
+
"eslint-plugin-vue": "^7.17.0",
|
|
56
51
|
"typescript": "^4.7.4"
|
|
57
52
|
},
|
|
58
53
|
"eslintConfig": {
|
|
@@ -168,7 +168,6 @@ export default defineComponent({
|
|
|
168
168
|
changeLanguage(): void{
|
|
169
169
|
this.setCookie('octopus-language', this.language);
|
|
170
170
|
loadLocaleMessages(this.$i18n, this.language, this.$store.state.general.isEducation);
|
|
171
|
-
moment.locale(this.$i18n.locale);
|
|
172
171
|
octopusApi.fetchDataWithParams<Array<Category>>(0, `iab/list${state.octopusApi.organisationId? '/'+state.octopusApi.organisationId : ''}`, { lang: this.$i18n.locale }).then((data: Array<Category>) => {
|
|
173
172
|
this.$store.commit('categoriesSet', data);
|
|
174
173
|
if(this.$store.state.filter.iab){
|
package/src/i18n.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { nextTick } from 'vue'
|
|
3
3
|
import { createI18n } from 'vue-i18n';
|
|
4
|
-
|
|
4
|
+
import moment from 'moment';
|
|
5
|
+
import 'moment/dist/locale/de.js';
|
|
6
|
+
import 'moment/dist/locale/es.js';
|
|
7
|
+
import 'moment/dist/locale/fr.js';
|
|
8
|
+
import 'moment/dist/locale/it.js';
|
|
9
|
+
import 'moment/dist/locale/sl.js';
|
|
5
10
|
|
|
6
11
|
export function setupI18n(options = { locale: 'en' }, isEducation: boolean) {
|
|
7
12
|
const i18n = createI18n(options)
|
|
@@ -11,6 +16,7 @@ export function setupI18n(options = { locale: 'en' }, isEducation: boolean) {
|
|
|
11
16
|
|
|
12
17
|
export function setI18nLanguage(i18n: any, locale: string) {
|
|
13
18
|
i18n.locale = locale;
|
|
19
|
+
moment.locale(locale);
|
|
14
20
|
const html= document.querySelector('html');
|
|
15
21
|
if(html){
|
|
16
22
|
html.setAttribute('lang', locale);
|
|
@@ -19,6 +25,7 @@ export function setI18nLanguage(i18n: any, locale: string) {
|
|
|
19
25
|
|
|
20
26
|
export async function loadLocaleMessages(i18n: any, locale:string, isEducation: boolean) {
|
|
21
27
|
if(!i18n.messages[locale] || 0===Object.keys(i18n.messages[locale]).length){
|
|
28
|
+
|
|
22
29
|
let messages = await import(
|
|
23
30
|
`./locale/${locale}.ts`
|
|
24
31
|
)
|
package/src/main.ts
CHANGED
|
@@ -4,7 +4,6 @@ import VueLazyLoad from 'vue3-lazyload';
|
|
|
4
4
|
import App from './App.vue';
|
|
5
5
|
import {setupI18n} from './i18n';
|
|
6
6
|
import router from '@/router/router';
|
|
7
|
-
import moment from 'moment';
|
|
8
7
|
import store from '@/store/AppStore';
|
|
9
8
|
import paramStore from '@/store/paramStore';
|
|
10
9
|
/* import 'popper.js/dist/popper.min.js'; */
|
|
@@ -43,7 +42,6 @@ if(0===language.length){
|
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
const i18n = setupI18n({locale: language}, store.state.general.education);
|
|
46
|
-
moment.locale(language);
|
|
47
45
|
|
|
48
46
|
paramStore.initialize({
|
|
49
47
|
generalParameters: {},
|
package/src/router/router.ts
CHANGED
|
@@ -196,7 +196,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
196
196
|
|
|
197
197
|
];
|
|
198
198
|
export default createRouter({
|
|
199
|
-
history: createWebHistory(
|
|
199
|
+
history: createWebHistory(),
|
|
200
200
|
routes: routes,
|
|
201
201
|
scrollBehavior(): {left: number; top: number} {
|
|
202
202
|
return { left: 0, top: 0 };
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
import vue from '@vitejs/plugin-vue';
|
|
5
|
+
const path = require('path');
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
resolve: {
|
|
8
|
+
alias: {
|
|
9
|
+
'@': path.resolve(__dirname, './src'),
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
plugins: [
|
|
13
|
+
vue(),
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
/* eslint-enable */
|
package/babel.config.js
DELETED
package/vue.config.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
configureWebpack: {
|
|
6
|
-
output: {
|
|
7
|
-
globalObject: 'this',
|
|
8
|
-
},
|
|
9
|
-
plugins:[
|
|
10
|
-
new MomentLocalesPlugin({
|
|
11
|
-
localesToKeep: ['fr'],
|
|
12
|
-
}),
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
/* eslint-enable */
|