@icvdeveloper/common-module 0.1.2 → 1.0.0
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/CHANGELOG.md +4 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/agenda/AgendaList.vue +13 -6
- package/dist/runtime/components/agenda/AgendaTabbed.vue +4 -3
- package/dist/runtime/components/core/CountdownTimer.vue +13 -3
- package/dist/runtime/composables/usePresenter.d.ts +1 -0
- package/dist/runtime/composables/usePresenter.mjs +2 -0
- package/dist/runtime/composables/usePresenters.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { ref, toRefs } from "vue";
|
|
3
|
+
import { get } from "lodash-es";
|
|
3
4
|
import type { Conference } from "../../models/conference";
|
|
4
5
|
import { useAgenda } from "../../composables/useAgenda";
|
|
5
6
|
import { usePresentation } from "../../composables/usePresentation";
|
|
7
|
+
import { usePresenters } from "../../composables/usePresenters";
|
|
6
8
|
import { usePresenter } from "../../composables/usePresenter";
|
|
7
9
|
import { useClassBinding } from "../../composables/useClassBinding";
|
|
8
10
|
import { Presenter } from "../../models/conference";
|
|
@@ -53,6 +55,8 @@ const {
|
|
|
53
55
|
getPresentationStartTime,
|
|
54
56
|
getPresentationEndTime
|
|
55
57
|
} = usePresentation(conference);
|
|
58
|
+
const { getPresentersLabel, getSortedPresenters } = usePresenters(conference);
|
|
59
|
+
|
|
56
60
|
const { classBinding } = useClassBinding();
|
|
57
61
|
|
|
58
62
|
// data
|
|
@@ -62,7 +66,7 @@ const expandedPres = ref<number>(0);
|
|
|
62
66
|
const presentersToComposables = (presenters: Presenter[]) => {
|
|
63
67
|
const data = [];
|
|
64
68
|
|
|
65
|
-
presenters.forEach((presenter) => {
|
|
69
|
+
getSortedPresenters(presenters).forEach((presenter) => {
|
|
66
70
|
data.push({
|
|
67
71
|
presenter,
|
|
68
72
|
...usePresenter(presenter),
|
|
@@ -76,10 +80,6 @@ const setPres = (_expanded: number) => {
|
|
|
76
80
|
expandedPres.value = _expanded;
|
|
77
81
|
};
|
|
78
82
|
|
|
79
|
-
const logPres = (_presId: number, _expanded: number) => {
|
|
80
|
-
console.log(_presId, typeof _presId);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
83
|
const isPres = (_presId: number): boolean => {
|
|
84
84
|
return expandedPres.value === _presId;
|
|
85
85
|
};
|
|
@@ -195,6 +195,7 @@ const isPres = (_presId: number): boolean => {
|
|
|
195
195
|
:conference="conference"
|
|
196
196
|
/>
|
|
197
197
|
<h3
|
|
198
|
+
v-if="get(presentation, 'presenters.length') > 0"
|
|
198
199
|
:class="
|
|
199
200
|
classBinding(
|
|
200
201
|
classObject,
|
|
@@ -203,7 +204,7 @@ const isPres = (_presId: number): boolean => {
|
|
|
203
204
|
)
|
|
204
205
|
"
|
|
205
206
|
>
|
|
206
|
-
|
|
207
|
+
{{ getPresentersLabel(presentation.presenters.length) }}
|
|
207
208
|
</h3>
|
|
208
209
|
<div
|
|
209
210
|
:class="
|
|
@@ -231,6 +232,12 @@ const isPres = (_presId: number): boolean => {
|
|
|
231
232
|
"
|
|
232
233
|
>
|
|
233
234
|
{{ presenter.fullName.value }}
|
|
235
|
+
<span
|
|
236
|
+
v-if="presenter.role == 'moderator'"
|
|
237
|
+
class="text-xs font-bold text-neutral-400"
|
|
238
|
+
>
|
|
239
|
+
- MODERATOR
|
|
240
|
+
</span>
|
|
234
241
|
</p>
|
|
235
242
|
<p
|
|
236
243
|
v-if="presenter.titleCompany.value"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { toRefs, computed } from "vue";
|
|
3
3
|
import { storeToRefs } from "pinia";
|
|
4
|
+
import { get } from "lodash-es";
|
|
4
5
|
import { DateTime } from "luxon";
|
|
5
6
|
import { useAgenda } from "../../composables/useAgenda";
|
|
6
7
|
import { Conference, Sponsor as SponsorType } from "../../models/conference";
|
|
@@ -204,10 +205,10 @@ const presentersContainer = computed(() => {
|
|
|
204
205
|
<div
|
|
205
206
|
class="flex-1"
|
|
206
207
|
:class="{
|
|
207
|
-
'pb-2': presentation
|
|
208
|
+
'pb-2': get(presentation, 'sponsors.length') > 0,
|
|
208
209
|
'lg:pb-0 lg:w-3/4':
|
|
209
210
|
!isSmallGroupedTrack(group_or_track) &&
|
|
210
|
-
presentation
|
|
211
|
+
get(presentation, 'sponsors.length') > 0,
|
|
211
212
|
}"
|
|
212
213
|
>
|
|
213
214
|
<!-- TIME -->
|
|
@@ -254,7 +255,7 @@ const presentersContainer = computed(() => {
|
|
|
254
255
|
<!-- PRESENTERS LIST (ACCORDION OR STANDARD/DIV) -->
|
|
255
256
|
<component
|
|
256
257
|
:is="presentersContainer"
|
|
257
|
-
v-if="presentation
|
|
258
|
+
v-if="get(presentation, 'presenters.length') > 0"
|
|
258
259
|
:title="
|
|
259
260
|
getPresentersLabel(presentation.presenters.length)
|
|
260
261
|
"
|
|
@@ -8,6 +8,7 @@ import { useClassBinding } from "../../composables/useClassBinding";
|
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
date: string;
|
|
11
|
+
timezone: string;
|
|
11
12
|
isCompact?: boolean;
|
|
12
13
|
showDays?: boolean;
|
|
13
14
|
showHours?: boolean;
|
|
@@ -49,6 +50,10 @@ const {
|
|
|
49
50
|
|
|
50
51
|
const { classBinding } = useClassBinding();
|
|
51
52
|
|
|
53
|
+
const eventDate: DateTime = DateTime.fromSQL(props.date, {
|
|
54
|
+
zone: props.timezone,
|
|
55
|
+
});
|
|
56
|
+
|
|
52
57
|
// reactive data
|
|
53
58
|
const isCounting = ref<boolean>(true);
|
|
54
59
|
const days = ref<number>(0);
|
|
@@ -82,14 +87,19 @@ const fontClass = computed(() => {
|
|
|
82
87
|
|
|
83
88
|
// methods
|
|
84
89
|
const updateCountdown = () => {
|
|
85
|
-
if (
|
|
90
|
+
if (
|
|
91
|
+
DateTime.fromSQL(props.date, { zone: props.timezone }).toLocal().diffNow()
|
|
92
|
+
.milliseconds < 0
|
|
93
|
+
) {
|
|
86
94
|
isCounting.value = false;
|
|
87
95
|
emit("complete");
|
|
88
96
|
clearInterval(loopTimer.value);
|
|
89
97
|
return;
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
const diffObj = DateTime.fromSQL(props.date, { zone: props.timezone })
|
|
101
|
+
.toLocal()
|
|
102
|
+
.diffNow(["days", "hours", "minutes", "seconds", "milliseconds"]);
|
|
93
103
|
|
|
94
104
|
days.value = diffObj.days;
|
|
95
105
|
hours.value = diffObj.hours;
|
|
@@ -139,7 +149,7 @@ onUnmounted(() => {
|
|
|
139
149
|
)
|
|
140
150
|
"
|
|
141
151
|
>
|
|
142
|
-
{{
|
|
152
|
+
{{ isCounting ? "event begins" : eventHasBegunText }}
|
|
143
153
|
</h1>
|
|
144
154
|
</div>
|
|
145
155
|
|
|
@@ -2,6 +2,7 @@ import { ComputedRef, Ref } from "nuxt/dist/app/compat/capi";
|
|
|
2
2
|
import { Presenter } from "../models/conference";
|
|
3
3
|
export type UsePresenterMethods = {
|
|
4
4
|
fullName: ComputedRef<string>;
|
|
5
|
+
role: string;
|
|
5
6
|
titleCompany: ComputedRef<string>;
|
|
6
7
|
imageHeight: ComputedRef<string>;
|
|
7
8
|
presenterImageStyle: ComputedRef<{
|
|
@@ -5,6 +5,7 @@ export const usePresenter = (presenter) => {
|
|
|
5
5
|
if (!isRef(presenter)) {
|
|
6
6
|
presenter = ref(presenter);
|
|
7
7
|
}
|
|
8
|
+
const role = presenter.value.role;
|
|
8
9
|
const imageStyle = ref(
|
|
9
10
|
pagesConfigValue("main.presenter_all_image_style", "default")
|
|
10
11
|
);
|
|
@@ -63,6 +64,7 @@ export const usePresenter = (presenter) => {
|
|
|
63
64
|
});
|
|
64
65
|
return {
|
|
65
66
|
fullName,
|
|
67
|
+
role,
|
|
66
68
|
titleCompany,
|
|
67
69
|
imageHeight,
|
|
68
70
|
presenterImageStyle,
|
|
@@ -13,7 +13,7 @@ export const usePresenters = (conference) => {
|
|
|
13
13
|
return displayName;
|
|
14
14
|
};
|
|
15
15
|
const getSortedPresenters = (presenters) => {
|
|
16
|
-
return sortBy(presenters, ["role", "last_name"]);
|
|
16
|
+
return sortBy(presenters, ["role", "order", "last_name", "first_name"]);
|
|
17
17
|
};
|
|
18
18
|
return {
|
|
19
19
|
getPresentersLabel,
|