@icvdeveloper/common-module 0.0.105 → 0.0.106
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/dist/module.json +1 -1
- package/dist/runtime/assets/svg/icon-circle-minus.svg +1 -0
- package/dist/runtime/components/agenda/AgendaList.vue +28 -0
- package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +14 -0
- package/dist/runtime/components/core/SvgIcon.vue +6 -0
- package/dist/runtime/models/icons.d.ts +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. --><path d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"/></svg>
|
|
@@ -53,6 +53,7 @@ const { days, getCombinedTrackList } = useAgenda(conference);
|
|
|
53
53
|
const { formatTimezoneToLocal } = useDateFormat();
|
|
54
54
|
const { classBinding } = useClassBinding();
|
|
55
55
|
|
|
56
|
+
// data
|
|
56
57
|
const presentersToComposables = (presenters: Presenter[]) => {
|
|
57
58
|
const data = [];
|
|
58
59
|
|
|
@@ -65,6 +66,21 @@ const presentersToComposables = (presenters: Presenter[]) => {
|
|
|
65
66
|
|
|
66
67
|
return data;
|
|
67
68
|
};
|
|
69
|
+
|
|
70
|
+
const expandedPres = ref<number>(0);
|
|
71
|
+
|
|
72
|
+
// methods
|
|
73
|
+
const setPres = (_expanded: number) => {
|
|
74
|
+
expandedPres.value = _expanded;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const logPres = (_presId: number, _expanded: number) => {
|
|
78
|
+
console.log(_presId, typeof _presId);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const isPres = (_presId: number): boolean => {
|
|
82
|
+
return expandedPres.value === _presId;
|
|
83
|
+
};
|
|
68
84
|
</script>
|
|
69
85
|
|
|
70
86
|
<template>
|
|
@@ -85,7 +101,9 @@ const presentersToComposables = (presenters: Presenter[]) => {
|
|
|
85
101
|
:class="classBinding(classObject, 'accordionContainer', '')"
|
|
86
102
|
>
|
|
87
103
|
<AgendaAccordion
|
|
104
|
+
:item-id="presentation.id"
|
|
88
105
|
:class-object="classObject.components.agendaListAccordion"
|
|
106
|
+
@expanded="setPres"
|
|
89
107
|
>
|
|
90
108
|
<template #header="isExpanded">
|
|
91
109
|
<div
|
|
@@ -130,6 +148,7 @@ const presentersToComposables = (presenters: Presenter[]) => {
|
|
|
130
148
|
"
|
|
131
149
|
>
|
|
132
150
|
<CommonSvgIcon
|
|
151
|
+
v-if="!isPres(presentation.id)"
|
|
133
152
|
:class-object="{ svgElement: 'fill-neutral-700' }"
|
|
134
153
|
:class="
|
|
135
154
|
classBinding(classObject, 'iconElement', 'mr-1 pt-1')
|
|
@@ -137,6 +156,15 @@ const presentersToComposables = (presenters: Presenter[]) => {
|
|
|
137
156
|
icon="circlePlus"
|
|
138
157
|
:width="classObject.iconWidth"
|
|
139
158
|
/>
|
|
159
|
+
<CommonSvgIcon
|
|
160
|
+
v-else
|
|
161
|
+
:class-object="{ svgElement: 'fill-neutral-700' }"
|
|
162
|
+
:class="
|
|
163
|
+
classBinding(classObject, 'iconElement', 'mr-1 pt-1')
|
|
164
|
+
"
|
|
165
|
+
icon="circleMinus"
|
|
166
|
+
:width="classObject.iconWidth"
|
|
167
|
+
/>
|
|
140
168
|
{{ presentation.name }}
|
|
141
169
|
</span>
|
|
142
170
|
</div>
|
|
@@ -4,10 +4,12 @@ import { useClassBinding } from "../../../composables/useClassBinding";
|
|
|
4
4
|
import { AgendaListAccordionClassObj } from "../../../@types/components";
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
|
+
itemId?: number;
|
|
7
8
|
classObject?: AgendaListAccordionClassObj;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const props = withDefaults(defineProps<Props>(), {
|
|
12
|
+
itemId: 0,
|
|
11
13
|
classObject: () => {
|
|
12
14
|
return {
|
|
13
15
|
container: "",
|
|
@@ -18,13 +20,25 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
18
20
|
},
|
|
19
21
|
});
|
|
20
22
|
|
|
23
|
+
const { itemId } = toRefs(props);
|
|
24
|
+
|
|
21
25
|
const { classBinding } = useClassBinding();
|
|
22
26
|
|
|
23
27
|
const expanded = ref<boolean>(false);
|
|
24
28
|
|
|
29
|
+
// emits
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
(e: "expanded", value: number): void;
|
|
32
|
+
}>();
|
|
33
|
+
|
|
25
34
|
// methods
|
|
26
35
|
const toggle = () => {
|
|
27
36
|
expanded.value = !expanded.value;
|
|
37
|
+
if (expanded.value) {
|
|
38
|
+
emit("expanded", itemId.value);
|
|
39
|
+
} else {
|
|
40
|
+
emit("expanded", 0);
|
|
41
|
+
}
|
|
28
42
|
};
|
|
29
43
|
</script>
|
|
30
44
|
|
|
@@ -93,6 +93,12 @@ const icons: Icons = {
|
|
|
93
93
|
() => import("../../assets/svg/icon-circle-plus.svg")
|
|
94
94
|
),
|
|
95
95
|
},
|
|
96
|
+
circleMinus: {
|
|
97
|
+
color: "",
|
|
98
|
+
component: defineAsyncComponent(
|
|
99
|
+
() => import("../../assets/svg/icon-circle-minus.svg")
|
|
100
|
+
),
|
|
101
|
+
},
|
|
96
102
|
};
|
|
97
103
|
|
|
98
104
|
type Props = {
|