@icvdeveloper/common-module 0.0.104 → 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/agenda/components/Calendar.vue +34 -50
- 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
|
|
|
@@ -5,21 +5,15 @@ import { get } from "lodash-es";
|
|
|
5
5
|
import { DateTime } from "luxon";
|
|
6
6
|
import { useTemplateConfigsStore } from "../../../store";
|
|
7
7
|
import "add-to-calendar-button";
|
|
8
|
-
import { Conference
|
|
9
|
-
|
|
8
|
+
import { Conference } from "../../../models/conference";
|
|
9
|
+
import { Presentation } from "../../../models/conference";
|
|
10
10
|
type Props = {
|
|
11
11
|
conference: Conference;
|
|
12
|
-
presentation
|
|
12
|
+
presentation: Presentation;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
-
presentation: null,
|
|
17
|
-
});
|
|
18
|
-
|
|
14
|
+
const props = defineProps<Props>();
|
|
19
15
|
const { conference, presentation } = toRefs(props);
|
|
20
|
-
|
|
21
16
|
const { pagesConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
22
|
-
|
|
23
17
|
// Computed
|
|
24
18
|
const showAddToGoogleCalendar = computed((): boolean => {
|
|
25
19
|
return pagesConfigValue.value("agenda.add_to_google_calendar", false);
|
|
@@ -28,43 +22,35 @@ const showAddToGoogleCalendar = computed((): boolean => {
|
|
|
28
22
|
const showAddToMicrosoftCalendar = computed((): boolean => {
|
|
29
23
|
return pagesConfigValue.value("agenda.add_to_microsoft_calendar", false);
|
|
30
24
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{ zone: conference.value.timezone }
|
|
36
|
-
).toFormat("yyyy-MM-dd");
|
|
25
|
+
const presStartDate = computed((): string => {
|
|
26
|
+
return DateTime.fromSQL(presentation.value.date, {
|
|
27
|
+
zone: conference.timezone,
|
|
28
|
+
}).toFormat("yyyy-MM-dd");
|
|
37
29
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{ zone: conference.value.timezone }
|
|
43
|
-
).toFormat("HH:mm");
|
|
30
|
+
const presStartTime = computed((): string => {
|
|
31
|
+
return DateTime.fromSQL(presentation.value.date, {
|
|
32
|
+
zone: conference.timezone,
|
|
33
|
+
}).toFormat("HH:mm");
|
|
44
34
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{ zone: conference.value.timezone }
|
|
51
|
-
)
|
|
35
|
+
const presEndTime = computed((): string => {
|
|
36
|
+
let duration: number = get(presentation.value, "duration", 3600); // default to 60 min
|
|
37
|
+
return DateTime.fromSQL(presentation.value.date, {
|
|
38
|
+
zone: conference.timezone,
|
|
39
|
+
})
|
|
52
40
|
.plus(duration * 1000)
|
|
53
41
|
.toFormat("HH:mm");
|
|
54
42
|
});
|
|
55
|
-
|
|
56
43
|
const calendarOptions = computed((): string => {
|
|
57
|
-
|
|
58
|
-
if (showAddToGoogleCalendar
|
|
44
|
+
let opts = [];
|
|
45
|
+
if (showAddToGoogleCalendar) {
|
|
59
46
|
opts.push("Google");
|
|
60
47
|
}
|
|
61
|
-
if (showAddToMicrosoftCalendar
|
|
48
|
+
if (showAddToMicrosoftCalendar) {
|
|
62
49
|
opts.push("iCal");
|
|
63
50
|
}
|
|
64
|
-
|
|
51
|
+
let optsQuoted = opts.map((opt) => `'${opt}'`);
|
|
65
52
|
return optsQuoted.join(",");
|
|
66
53
|
});
|
|
67
|
-
|
|
68
54
|
const cssPath = computed((): string => {
|
|
69
55
|
// atcb.css required in template/playground public folder
|
|
70
56
|
return window.location.origin + "/atcb.css";
|
|
@@ -74,23 +60,21 @@ const cssPath = computed((): string => {
|
|
|
74
60
|
<template>
|
|
75
61
|
<div>
|
|
76
62
|
<add-to-calendar-button
|
|
77
|
-
:name="presentation
|
|
78
|
-
:description="
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
:
|
|
82
|
-
:
|
|
83
|
-
:end-time="eventEndTime"
|
|
84
|
-
:time-zone="conference.timezone"
|
|
63
|
+
:name="presentation.name"
|
|
64
|
+
:description="presentation.description"
|
|
65
|
+
:startDate="presStartDate"
|
|
66
|
+
:startTime="presStartTime"
|
|
67
|
+
:endTime="presEndTime"
|
|
68
|
+
:timeZone="conference.timezone"
|
|
85
69
|
:location="conference.location"
|
|
86
|
-
|
|
70
|
+
listStyle="dropdown"
|
|
87
71
|
trigger="click"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
72
|
+
lightMode="bodyScheme"
|
|
73
|
+
buttonStyle="custom"
|
|
74
|
+
:customCss="cssPath"
|
|
75
|
+
hideIconButton
|
|
76
|
+
hideBackground
|
|
77
|
+
hideCheckmark
|
|
94
78
|
:options="calendarOptions"
|
|
95
79
|
></add-to-calendar-button>
|
|
96
80
|
</div>
|
|
@@ -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 = {
|