@saooti/octopus-sdk 36.0.49 → 36.0.51
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
|
@@ -35,6 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
date: { default: undefined, type: Date },
|
|
36
36
|
range: {default: undefined,type: Array as () => Array<Date>},
|
|
37
37
|
isMaxDate: { default: false, type: Boolean },
|
|
38
|
+
dateLimit: { default: undefined, type: Date },
|
|
38
39
|
isMinDate: { default: false, type: Boolean },
|
|
39
40
|
columnNumber: { default: 1, type: Number },
|
|
40
41
|
displaySeconds: { default: false, type: Boolean },
|
|
@@ -75,6 +76,9 @@ export default defineComponent({
|
|
|
75
76
|
return this.range ? dayString+' - '+dayString : dayString;
|
|
76
77
|
},
|
|
77
78
|
now(): Date {
|
|
79
|
+
if(this.dateLimit){
|
|
80
|
+
return this.dateLimit;
|
|
81
|
+
}
|
|
78
82
|
return dayjs().toDate();
|
|
79
83
|
},
|
|
80
84
|
},
|
|
@@ -1,65 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@click="isOpen=!isOpen"
|
|
10
|
-
>
|
|
11
|
-
<span
|
|
12
|
-
v-if="icon"
|
|
13
|
-
class="img-accordion text-primary"
|
|
14
|
-
:class="icon"
|
|
15
|
-
/>
|
|
16
|
-
<img
|
|
17
|
-
v-if="imageUrl"
|
|
18
|
-
width="30"
|
|
19
|
-
height="30"
|
|
20
|
-
class="img-accordion"
|
|
21
|
-
:src="imageUrl"
|
|
22
|
-
:alt="title"
|
|
2
|
+
<div class="my-2" :class="displayAccordion ? 'octopus-accordion' : ''">
|
|
3
|
+
<template v-if="displayAccordion">
|
|
4
|
+
<button
|
|
5
|
+
:id="'accordion-' + idComposer"
|
|
6
|
+
class="btn-transparent bg-white w-100 p-2 text-start d-flex align-items-center"
|
|
7
|
+
:class="isOpen ? 'really-light-primary-bg' : ''"
|
|
8
|
+
@click="isOpen = !isOpen"
|
|
23
9
|
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
<span v-if="icon" class="img-accordion text-primary" :class="icon" />
|
|
11
|
+
<img
|
|
12
|
+
v-if="imageUrl"
|
|
13
|
+
width="30"
|
|
14
|
+
height="30"
|
|
15
|
+
class="img-accordion"
|
|
16
|
+
:src="imageUrl"
|
|
17
|
+
:alt="title"
|
|
18
|
+
/>
|
|
19
|
+
<span class="flex-grow-1">{{ title }}</span>
|
|
20
|
+
<span :class="isOpen ? 'saooti-up' : 'saooti-down'" />
|
|
21
|
+
</button>
|
|
22
|
+
<div v-show="isOpen" class="body p-2">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<slot v-else />
|
|
33
27
|
</div>
|
|
34
28
|
</template>
|
|
35
29
|
|
|
36
30
|
<script lang="ts">
|
|
37
|
-
import { defineComponent } from
|
|
31
|
+
import { defineComponent } from "vue";
|
|
38
32
|
export default defineComponent({
|
|
39
|
-
name: "
|
|
40
|
-
|
|
41
|
-
title: { default:
|
|
42
|
-
idComposer: { default:
|
|
43
|
-
icon:{default: undefined, type: String },
|
|
44
|
-
imageUrl:{default: undefined, type: String },
|
|
33
|
+
name: "ClassicAccordion",
|
|
34
|
+
props: {
|
|
35
|
+
title: { default: "", type: String },
|
|
36
|
+
idComposer: { default: "", type: String },
|
|
37
|
+
icon: { default: undefined, type: String },
|
|
38
|
+
imageUrl: { default: undefined, type: String },
|
|
39
|
+
displayAccordion: { default: true, type: Boolean },
|
|
45
40
|
},
|
|
46
|
-
|
|
47
|
-
data
|
|
41
|
+
emits: ["open"],
|
|
42
|
+
data() {
|
|
48
43
|
return {
|
|
49
|
-
|
|
50
|
-
}
|
|
44
|
+
isOpen: false as boolean,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
watch: {
|
|
48
|
+
isOpen() {
|
|
49
|
+
this.$emit("open");
|
|
50
|
+
},
|
|
51
51
|
},
|
|
52
|
-
watch:{
|
|
53
|
-
isOpen(){
|
|
54
|
-
this.$emit('open');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
52
|
});
|
|
58
53
|
</script>
|
|
59
54
|
<style lang="scss">
|
|
60
|
-
.octopus-accordion{
|
|
61
|
-
|
|
62
|
-
>button{
|
|
55
|
+
.octopus-accordion {
|
|
56
|
+
border: 1px solid #ccc;
|
|
57
|
+
> button {
|
|
63
58
|
height: 50px;
|
|
64
59
|
}
|
|
65
60
|
.img-accordion {
|
|
@@ -71,8 +66,8 @@ export default defineComponent({
|
|
|
71
66
|
justify-content: center;
|
|
72
67
|
align-items: center;
|
|
73
68
|
}
|
|
74
|
-
.body{
|
|
69
|
+
.body {
|
|
75
70
|
border-top: 1px solid #ccc;
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
|
-
</style>
|
|
73
|
+
</style>
|