@saooti/octopus-sdk 36.0.43 → 36.0.45
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": "36.0.
|
|
3
|
+
"version": "36.0.45",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@tiptap/vue-3": "^2.0.3",
|
|
26
26
|
"@vue/cli": "^5.0.8",
|
|
27
27
|
"@vue/compat": "^3.3.4",
|
|
28
|
+
"@vuepic/vue-datepicker": "^5.4.0",
|
|
28
29
|
"autoprefixer": "^10.4.14",
|
|
29
30
|
"axios": "^1.4.0",
|
|
30
31
|
"dayjs": "^1.11.8",
|
|
@@ -36,9 +37,8 @@
|
|
|
36
37
|
"qrcode.vue": "^3.4.0",
|
|
37
38
|
"sass": "^1.63.4",
|
|
38
39
|
"sonarqube-scanner": "^3.0.0",
|
|
39
|
-
"swiper": "^
|
|
40
|
-
"
|
|
41
|
-
"vite": "^4.3.9",
|
|
40
|
+
"swiper": "^10.0.4",
|
|
41
|
+
"vite": "^4.4.4",
|
|
42
42
|
"vue": "^3.3.4",
|
|
43
43
|
"vue-i18n": "^9.2.2",
|
|
44
44
|
"vue-recaptcha": "^2.0.3",
|
|
@@ -15,8 +15,11 @@
|
|
|
15
15
|
/>
|
|
16
16
|
<ClassicDatePicker
|
|
17
17
|
:date="fromDate"
|
|
18
|
-
|
|
19
|
-
@
|
|
18
|
+
class="mx-2"
|
|
19
|
+
@update-date="
|
|
20
|
+
fromDate = $event;
|
|
21
|
+
updateFromDate();
|
|
22
|
+
"
|
|
20
23
|
/>
|
|
21
24
|
</div>
|
|
22
25
|
<div class="d-flex align-items-center">
|
|
@@ -28,8 +31,11 @@
|
|
|
28
31
|
/>
|
|
29
32
|
<ClassicDatePicker
|
|
30
33
|
:date="toDate"
|
|
31
|
-
|
|
32
|
-
@
|
|
34
|
+
class="mx-2"
|
|
35
|
+
@update-date="
|
|
36
|
+
toDate = $event;
|
|
37
|
+
updateToDate();
|
|
38
|
+
"
|
|
33
39
|
/>
|
|
34
40
|
</div>
|
|
35
41
|
</div>
|
|
@@ -2,63 +2,62 @@
|
|
|
2
2
|
<swiper
|
|
3
3
|
:slides-per-view="numberItem"
|
|
4
4
|
:space-between="0"
|
|
5
|
-
:loop="listObject.length>=numberItem"
|
|
5
|
+
:loop="listObject.length >= numberItem"
|
|
6
6
|
:navigation="true"
|
|
7
7
|
:modules="modules"
|
|
8
8
|
>
|
|
9
|
-
<swiper-slide
|
|
10
|
-
|
|
11
|
-
:key="obj"
|
|
12
|
-
>
|
|
13
|
-
<slot
|
|
14
|
-
name="octopusSlide"
|
|
15
|
-
:option="obj"
|
|
16
|
-
:index="index"
|
|
17
|
-
/>
|
|
9
|
+
<swiper-slide v-for="(obj, index) in listObject" :key="obj">
|
|
10
|
+
<slot name="octopusSlide" :option="obj" :index="index" />
|
|
18
11
|
</swiper-slide>
|
|
19
12
|
</swiper>
|
|
20
13
|
</template>
|
|
21
14
|
|
|
22
15
|
<script lang="ts">
|
|
23
|
-
import domHelper from
|
|
24
|
-
import { state } from
|
|
16
|
+
import domHelper from "../../../helper/dom";
|
|
17
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
25
18
|
import { Swiper, SwiperSlide } from "swiper/vue";
|
|
26
|
-
import { Navigation } from "swiper";
|
|
19
|
+
import { Navigation } from "swiper/modules";
|
|
27
20
|
import "swiper/css";
|
|
28
21
|
import "swiper/css/navigation";
|
|
29
|
-
import { defineComponent } from
|
|
22
|
+
import { defineComponent } from "vue";
|
|
30
23
|
export default defineComponent({
|
|
31
|
-
name:
|
|
32
|
-
|
|
24
|
+
name: "SwiperList",
|
|
25
|
+
|
|
33
26
|
components: {
|
|
34
27
|
Swiper,
|
|
35
28
|
SwiperSlide,
|
|
36
29
|
},
|
|
37
30
|
|
|
38
31
|
props: {
|
|
39
|
-
listObject: { default: ()=>[], type: Array as ()=> Array<unknown>},
|
|
32
|
+
listObject: { default: () => [], type: Array as () => Array<unknown> },
|
|
33
|
+
sizeItemOverload: { default: undefined, type: Number },
|
|
40
34
|
},
|
|
41
35
|
|
|
42
36
|
data() {
|
|
43
37
|
return {
|
|
44
38
|
modules: [Navigation],
|
|
45
|
-
numberItem: 5 as number
|
|
39
|
+
numberItem: 5 as number,
|
|
46
40
|
};
|
|
47
41
|
},
|
|
48
42
|
computed: {
|
|
49
43
|
sizeItem(): number {
|
|
44
|
+
if (this.sizeItemOverload) {
|
|
45
|
+
return this.sizeItemOverload;
|
|
46
|
+
}
|
|
50
47
|
if (window.innerWidth <= 450) {
|
|
51
48
|
return 12.5;
|
|
52
49
|
}
|
|
53
|
-
return state.generalParameters.podcastItem
|
|
50
|
+
return state.generalParameters.podcastItem
|
|
51
|
+
? state.generalParameters.podcastItem
|
|
52
|
+
: 13.5;
|
|
54
53
|
},
|
|
55
54
|
},
|
|
56
|
-
|
|
55
|
+
|
|
57
56
|
created() {
|
|
58
|
-
window.addEventListener(
|
|
57
|
+
window.addEventListener("resize", this.handleResize);
|
|
59
58
|
},
|
|
60
59
|
unmounted() {
|
|
61
|
-
window.removeEventListener(
|
|
60
|
+
window.removeEventListener("resize", this.handleResize);
|
|
62
61
|
},
|
|
63
62
|
|
|
64
63
|
mounted() {
|
|
@@ -68,29 +67,30 @@ export default defineComponent({
|
|
|
68
67
|
handleResize(): void {
|
|
69
68
|
if (!this.$el) return;
|
|
70
69
|
const width = (this.$el as HTMLElement).offsetWidth - 95;
|
|
71
|
-
const sixteen = domHelper.convertRemToPixels(this.sizeItem+ 0.5);
|
|
70
|
+
const sixteen = domHelper.convertRemToPixels(this.sizeItem + 0.5);
|
|
72
71
|
this.numberItem = Math.max(1, Math.floor(width / sixteen));
|
|
73
72
|
},
|
|
74
73
|
},
|
|
75
|
-
})
|
|
74
|
+
});
|
|
76
75
|
</script>
|
|
77
76
|
<style lang="scss">
|
|
78
|
-
@import
|
|
77
|
+
@import "@scss/_variables.scss";
|
|
79
78
|
.swiper {
|
|
80
79
|
width: 100%;
|
|
81
80
|
height: 100%;
|
|
82
81
|
}
|
|
83
|
-
.swiper-button-next,
|
|
82
|
+
.swiper-button-next,
|
|
83
|
+
.swiper-button-prev {
|
|
84
84
|
color: $octopus-primary-color !important;
|
|
85
85
|
height: 100%;
|
|
86
86
|
top: 0;
|
|
87
87
|
bottom: 0;
|
|
88
88
|
margin: 0;
|
|
89
89
|
}
|
|
90
|
-
.swiper-button-next{
|
|
90
|
+
.swiper-button-next {
|
|
91
91
|
right: 0;
|
|
92
92
|
}
|
|
93
|
-
.swiper-button-prev{
|
|
93
|
+
.swiper-button-prev {
|
|
94
94
|
left: 0;
|
|
95
95
|
}
|
|
96
96
|
/* .swiper-slide-active{
|
|
@@ -102,7 +102,7 @@ export default defineComponent({
|
|
|
102
102
|
.swiper-slide-next{
|
|
103
103
|
padding-right:27px;
|
|
104
104
|
} */
|
|
105
|
-
.swiper-button-lock{
|
|
105
|
+
.swiper-button-lock {
|
|
106
106
|
display: flex;
|
|
107
107
|
}
|
|
108
108
|
.swiper-slide {
|
|
@@ -110,4 +110,4 @@ export default defineComponent({
|
|
|
110
110
|
justify-content: center;
|
|
111
111
|
align-items: center;
|
|
112
112
|
}
|
|
113
|
-
</style>
|
|
113
|
+
</style>
|
|
@@ -1,61 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
:class="templateClass"
|
|
23
|
-
:value="inputValue"
|
|
24
|
-
v-on="inputEvents"
|
|
25
|
-
>
|
|
26
|
-
</template>
|
|
27
|
-
</DatePicker>
|
|
2
|
+
<VueDatePicker
|
|
3
|
+
:model-value="modelVal"
|
|
4
|
+
:time-picker="isTimePicker"
|
|
5
|
+
:input-class-name="templateClass"
|
|
6
|
+
:clearable="false"
|
|
7
|
+
:readonly="readonly"
|
|
8
|
+
:teleport="useTeleport"
|
|
9
|
+
:locale="formatLocale"
|
|
10
|
+
:format="format"
|
|
11
|
+
:auto-apply="true"
|
|
12
|
+
:enable-seconds="displaySeconds"
|
|
13
|
+
:max-date="isMaxDate && !isTimePicker ? now : undefined"
|
|
14
|
+
:min-date="isMinDate && !isTimePicker ? now : undefined"
|
|
15
|
+
:range="undefined !== range"
|
|
16
|
+
:multi-calendars="columnNumber>1 ? columnNumber : false"
|
|
17
|
+
:inline="columnNumber > 1"
|
|
18
|
+
:enable-time-picker="!isTimePicker ?displayTimePicker : undefined"
|
|
19
|
+
:time-picker-inline="!isTimePicker ? true : undefined"
|
|
20
|
+
@update:model-value="$emit('updateDate', $event)"
|
|
21
|
+
/>
|
|
28
22
|
</template>
|
|
29
23
|
|
|
30
24
|
<script lang="ts">
|
|
31
|
-
import dayjs from
|
|
32
|
-
import
|
|
33
|
-
import { defineComponent } from
|
|
25
|
+
import dayjs from "dayjs";
|
|
26
|
+
import VueDatePicker from '@vuepic/vue-datepicker';
|
|
27
|
+
import { defineComponent } from "vue";
|
|
34
28
|
export default defineComponent({
|
|
35
29
|
components: {
|
|
36
|
-
|
|
30
|
+
VueDatePicker,
|
|
37
31
|
},
|
|
38
32
|
props: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
time: { default:undefined, type: Object as () => {hours:number, minutes:number, seconds:number} },
|
|
34
|
+
date: { default: undefined, type: Date },
|
|
35
|
+
range: {default: undefined,type: Array as () => Array<Date>},
|
|
36
|
+
isMaxDate: { default: false, type: Boolean },
|
|
37
|
+
isMinDate: { default: false, type: Boolean },
|
|
38
|
+
columnNumber: { default: 1, type: Number },
|
|
39
|
+
displaySeconds: { default: false, type: Boolean },
|
|
40
|
+
displayTimePicker:{ default: true, type: Boolean },
|
|
41
|
+
isTimePicker:{ default: false, type: Boolean },
|
|
42
|
+
useTeleport:{ default: false, type: Boolean },
|
|
43
|
+
templateClass: { default: undefined, type: String },
|
|
44
|
+
readonly: { default: false, type: Boolean },
|
|
48
45
|
},
|
|
49
46
|
|
|
50
47
|
emits: ['updateDate', 'update:date'],
|
|
51
48
|
data() {
|
|
52
49
|
return {
|
|
53
|
-
masks: {
|
|
54
|
-
input: 'YYYY-MM-DD',
|
|
55
|
-
},
|
|
56
50
|
};
|
|
57
51
|
},
|
|
58
52
|
computed: {
|
|
53
|
+
modelVal(){
|
|
54
|
+
return this.time ?? this.range ?? this.date;
|
|
55
|
+
},
|
|
56
|
+
formatLocale(){
|
|
57
|
+
return this.$i18n.locale;
|
|
58
|
+
},
|
|
59
|
+
format(){
|
|
60
|
+
let timeString = '';
|
|
61
|
+
if(this.displayTimePicker || this.isTimePicker){
|
|
62
|
+
timeString ='HH:mm';
|
|
63
|
+
if(this.displaySeconds){
|
|
64
|
+
timeString ='HH:mm:ss';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const dayString = this.isTimePicker ? timeString : 'dd/MM/yyyy '+timeString;
|
|
68
|
+
return this.range ? dayString+' - '+dayString : dayString;
|
|
69
|
+
},
|
|
59
70
|
now(): Date {
|
|
60
71
|
return dayjs().toDate();
|
|
61
72
|
},
|
|
@@ -63,22 +74,9 @@ export default defineComponent({
|
|
|
63
74
|
})
|
|
64
75
|
</script>
|
|
65
76
|
<style lang="scss">
|
|
66
|
-
@import '@
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
padding: 0 !important;
|
|
71
|
-
}
|
|
72
|
-
.vc-date{
|
|
73
|
-
.vc-month,.vc-day,.vc-year{
|
|
74
|
-
color: $octopus-primary-color !important;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
.vc-highlight{
|
|
78
|
-
background-color: $octopus-primary-color !important;
|
|
79
|
-
}
|
|
80
|
-
.vc-select select:focus{
|
|
81
|
-
border-color: $octopus-primary-color !important;
|
|
82
|
-
}
|
|
77
|
+
@import '@vuepic/vue-datepicker/dist/main.css';
|
|
78
|
+
.dp__theme_light {
|
|
79
|
+
--dp-primary-color: #1a8658;
|
|
80
|
+
--dp-time-font-size: 1rem;
|
|
83
81
|
}
|
|
84
82
|
</style>
|