@icvdeveloper/common-module 1.4.13 → 2.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/module.mjs +10 -0
- package/dist/runtime/@types/components.d.ts +22 -0
- package/dist/runtime/@types/configVariables.d.ts +6 -0
- package/dist/runtime/analytics.d.ts +1 -1
- package/dist/runtime/assets/scss/index.css +0 -705
- package/dist/runtime/assets/svg/icon-minus.svg +6 -0
- package/dist/runtime/assets/svg/icon-video.svg +6 -0
- package/dist/runtime/components/affiliates/AffiliateModal.vue +66 -0
- package/dist/runtime/components/affiliates/AffiliatePage.vue +337 -132
- package/dist/runtime/components/agenda/AgendaTabbed.vue +43 -34
- package/dist/runtime/components/agenda/components/Calendar.vue +8 -3
- package/dist/runtime/components/agenda/components/Favorite.vue +44 -0
- package/dist/runtime/components/agenda/components/PlayIcon.vue +1 -1
- package/dist/runtime/components/agenda/components/PresentationLink.vue +26 -15
- package/dist/runtime/components/chat/ChatConversationList.vue +108 -0
- package/dist/runtime/components/chat/ChatCreateConversation.vue +205 -0
- package/dist/runtime/components/chat/ChatCreateGroupConversation.vue +159 -0
- package/dist/runtime/components/chat/ChatHeader.vue +98 -0
- package/dist/runtime/components/chat/ChatMessage.vue +40 -0
- package/dist/runtime/components/chat/ChatShowConversation.vue +77 -0
- package/dist/runtime/components/chat/ChatWidget.vue +65 -0
- package/dist/runtime/components/chat/ChatWindow.vue +211 -0
- package/dist/runtime/components/chat/ChatWindow.vue.d.ts +6 -0
- package/dist/runtime/components/chat/MessageInput.vue +30 -0
- package/dist/runtime/components/chat/SearchInput.vue +32 -0
- package/dist/runtime/components/core/Accordion.vue +1 -1
- package/dist/runtime/components/core/AttendeeList.vue +25 -16
- package/dist/runtime/components/core/CountdownTimer.vue +1 -1
- package/dist/runtime/components/core/Modal.vue +21 -13
- package/dist/runtime/components/core/ModalButton.vue +43 -0
- package/dist/runtime/components/core/Navbar.vue +3 -3
- package/dist/runtime/components/core/Navigation.vue +293 -0
- package/dist/runtime/components/core/SvgIcon.vue +31 -1
- package/dist/runtime/components/core/VButton.vue +41 -0
- package/dist/runtime/components/core/ZoomModal.vue +1 -1
- package/dist/runtime/components/events/ListEvents.vue +3 -4
- package/dist/runtime/components/forms/CheckboxGroup.vue +46 -0
- package/dist/runtime/components/forms/ErrorField.vue +11 -2
- package/dist/runtime/components/forms/RadioGroup.vue +50 -0
- package/dist/runtime/components/forms/SelectDropDown.vue +47 -0
- package/dist/runtime/components/forms/SupportForm.vue +6 -6
- package/dist/runtime/components/layouts/Accordion.vue +2 -2
- package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +20 -4
- package/dist/runtime/components/media/ArchiveVideoPlayer.vue +14 -6
- package/dist/runtime/components/media/WebcastVideoPlayer.vue +1 -1
- package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +8 -8
- package/dist/runtime/components/media/components/CeCreditNotification.vue +2 -2
- package/dist/runtime/components/media/components/ContentArea.vue +51 -14
- package/dist/runtime/components/media/components/ContentTabs.vue +2 -2
- package/dist/runtime/components/media/components/DocumentsPanel.vue +2 -2
- package/dist/runtime/components/media/components/MediaContainer.vue +3 -7
- package/dist/runtime/components/media/components/PresentersPanel.vue +69 -50
- package/dist/runtime/components/media/components/SessionReporting.vue +5 -4
- package/dist/runtime/components/media/components/SponsorsPanel.vue +3 -3
- package/dist/runtime/components/presenters/PresenterListing.vue +30 -20
- package/dist/runtime/components/presenters/PresenterModal.vue +26 -21
- package/dist/runtime/components/presenters/Presenters.vue +139 -0
- package/dist/runtime/components/profile/Profile.vue +10 -6
- package/dist/runtime/components/profile/components/Sidebar.vue +1 -1
- package/dist/runtime/components/profile/components/SidebarNavItem.vue +1 -1
- package/dist/runtime/components/profile/tabs/Favorites.vue +5 -4
- package/dist/runtime/components/profile/tabs/GeneralInformation.vue +26 -16
- package/dist/runtime/components/registration/AlreadyRegisteredModal.vue +99 -0
- package/dist/runtime/components/registration/PaymentForm.vue +136 -0
- package/dist/runtime/components/registration/RegistrationForm.vue +417 -0
- package/dist/runtime/components/registration/RegistrationGroupSelect.vue +142 -0
- package/dist/runtime/components/registration/StripePaymentForm.vue +141 -0
- package/dist/runtime/composables/useAgenda.d.ts +12 -0
- package/dist/runtime/composables/useAgenda.mjs +101 -10
- package/dist/runtime/composables/useAuth.mjs +1 -1
- package/dist/runtime/composables/useConferenceHelpers.d.ts +5 -1
- package/dist/runtime/composables/useConferenceHelpers.mjs +15 -1
- package/dist/runtime/composables/useEventHooks.d.ts +26 -0
- package/dist/runtime/composables/useEventHooks.mjs +21 -0
- package/dist/runtime/composables/useEvents.d.ts +17 -1
- package/dist/runtime/composables/useEvents.mjs +29 -1
- package/dist/runtime/composables/useLogin.mjs +7 -3
- package/dist/runtime/composables/usePresentation.mjs +1 -1
- package/dist/runtime/composables/usePusher.d.ts +4 -0
- package/dist/runtime/composables/usePusher.mjs +38 -26
- package/dist/runtime/composables/useStream.mjs +7 -1
- package/dist/runtime/enums/general.d.ts +4 -1
- package/dist/runtime/enums/general.mjs +4 -1
- package/dist/runtime/models/authUser.d.ts +1 -0
- package/dist/runtime/models/conference.d.ts +14 -0
- package/dist/runtime/models/conversation.d.ts +2 -4
- package/dist/runtime/models/globalConfig.d.ts +6 -2
- package/dist/runtime/models/group.d.ts +32 -2
- package/dist/runtime/models/icons.d.ts +7 -0
- package/dist/runtime/models/templateConfig.d.ts +6 -0
- package/dist/runtime/models/user.d.ts +1 -0
- package/dist/runtime/models/virtualPagesConfig.d.ts +335 -0
- package/dist/runtime/models/virtualPagesConfig.mjs +0 -0
- package/dist/runtime/plugin.mjs +11 -1
- package/dist/runtime/store/affiliates.d.ts +3 -0
- package/dist/runtime/store/affiliates.mjs +38 -0
- package/dist/runtime/store/auth.mjs +6 -0
- package/dist/runtime/store/conferences.d.ts +3 -1
- package/dist/runtime/store/conferences.mjs +7 -2
- package/dist/runtime/store/conversations.d.ts +4040 -10
- package/dist/runtime/store/conversations.mjs +255 -22
- package/dist/runtime/store/modalPlayerConfig.d.ts +498 -0
- package/dist/runtime/store/modalPlayerConfig.mjs +58 -0
- package/dist/runtime/store/templateConfigs.d.ts +3 -2
- package/dist/runtime/store/templateConfigs.mjs +2 -1
- package/package.json +5 -2
- package/dist/runtime/components/media/components/PresentersPanel.vue.d.ts +0 -32
|
@@ -8,6 +8,7 @@ import { Position } from "../../enums/general";
|
|
|
8
8
|
|
|
9
9
|
type Props = {
|
|
10
10
|
presenter: Presenter;
|
|
11
|
+
showImg?: boolean;
|
|
11
12
|
enableBio?: boolean;
|
|
12
13
|
showBio?: boolean;
|
|
13
14
|
isSmallGroupedTrack?: boolean;
|
|
@@ -20,6 +21,7 @@ type Props = {
|
|
|
20
21
|
|
|
21
22
|
const props = withDefaults(defineProps<Props>(), {
|
|
22
23
|
enableBio: true,
|
|
24
|
+
showImg: true,
|
|
23
25
|
showBio: false,
|
|
24
26
|
isSmallGroupedTrack: false,
|
|
25
27
|
bioLinkOnName: true,
|
|
@@ -45,7 +47,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
45
47
|
|
|
46
48
|
const emit = defineEmits(["clicked"]);
|
|
47
49
|
|
|
48
|
-
const { presenter, enableBio, isSmallGroupedTrack, classObject } =
|
|
50
|
+
const { presenter, showImg, enableBio, isSmallGroupedTrack, classObject } =
|
|
49
51
|
toRefs(props);
|
|
50
52
|
const { fullName, titleCompany } = usePresenter(presenter);
|
|
51
53
|
const { classBinding } = useClassBinding();
|
|
@@ -73,7 +75,7 @@ const handleClick = () => {
|
|
|
73
75
|
]"
|
|
74
76
|
>
|
|
75
77
|
<div
|
|
76
|
-
v-if="presenter.photo && imagePosition !== Position.RIGHT"
|
|
78
|
+
v-if="showImg && presenter.photo && imagePosition !== Position.RIGHT"
|
|
77
79
|
:class="
|
|
78
80
|
classBinding(classObject, 'presenterImageContainer', 'shrink p-2')
|
|
79
81
|
"
|
|
@@ -81,7 +83,7 @@ const handleClick = () => {
|
|
|
81
83
|
<img
|
|
82
84
|
:src="presenter.photo"
|
|
83
85
|
:class="classBinding(classObject, 'presenterImage', '')"
|
|
84
|
-
|
|
86
|
+
>
|
|
85
87
|
</div>
|
|
86
88
|
<div
|
|
87
89
|
:class="
|
|
@@ -98,21 +100,26 @@ const handleClick = () => {
|
|
|
98
100
|
class="cursor-pointer"
|
|
99
101
|
:class="classBinding(classObject, 'presenterNameLink', '')"
|
|
100
102
|
@click="handleClick()"
|
|
101
|
-
><span :class="classBinding(classObject, 'presenterName', '')">
|
|
102
|
-
{{ fullName }}</span
|
|
103
|
-
></a
|
|
104
103
|
>
|
|
105
|
-
|
|
104
|
+
<span :class="classBinding(classObject, 'presenterName', '')">
|
|
105
|
+
{{ fullName }}
|
|
106
|
+
</span>
|
|
107
|
+
</a>
|
|
108
|
+
<span
|
|
109
|
+
v-else
|
|
110
|
+
:class="classBinding(classObject, 'presenterName', '')"
|
|
111
|
+
>
|
|
106
112
|
{{ fullName }}
|
|
107
113
|
</span>
|
|
108
114
|
<span
|
|
109
115
|
v-if="presenter.role == 'moderator'"
|
|
110
116
|
:class="[
|
|
111
117
|
isSmallGroupedTrack ? 'new-line' : 'no-new-line',
|
|
112
|
-
classBinding(classObject, 'presenterRole', 'text-
|
|
118
|
+
classBinding(classObject, 'presenterRole', 'text-gray-600'),
|
|
113
119
|
]"
|
|
114
|
-
>Moderator</span
|
|
115
120
|
>
|
|
121
|
+
Moderator
|
|
122
|
+
</span>
|
|
116
123
|
<span
|
|
117
124
|
v-if="titleCompany"
|
|
118
125
|
:class="[
|
|
@@ -123,8 +130,9 @@ const handleClick = () => {
|
|
|
123
130
|
'font-light paragraph-color-1'
|
|
124
131
|
),
|
|
125
132
|
]"
|
|
126
|
-
>{{ titleCompany }}</span
|
|
127
133
|
>
|
|
134
|
+
{{ titleCompany }}
|
|
135
|
+
</span>
|
|
128
136
|
</p>
|
|
129
137
|
<p
|
|
130
138
|
v-if="showBio && presenter.biography"
|
|
@@ -136,26 +144,28 @@ const handleClick = () => {
|
|
|
136
144
|
)
|
|
137
145
|
"
|
|
138
146
|
v-html="presenter.biography"
|
|
139
|
-
|
|
140
|
-
<div
|
|
147
|
+
/>
|
|
148
|
+
<div
|
|
149
|
+
v-if="enableBio && !bioLinkOnName"
|
|
150
|
+
class="shrink"
|
|
151
|
+
>
|
|
141
152
|
<a
|
|
142
153
|
class="cursor-pointer"
|
|
143
154
|
:class="classBinding(classObject, 'presenterBioLink', '')"
|
|
144
155
|
@click="handleClick()"
|
|
145
|
-
|
|
156
|
+
>
|
|
157
|
+
{{ bioLinkText }}
|
|
146
158
|
</a>
|
|
147
159
|
</div>
|
|
148
160
|
</div>
|
|
149
161
|
<div
|
|
150
|
-
v-if="presenter.photo && imagePosition === Position.RIGHT"
|
|
151
|
-
:class="
|
|
152
|
-
classBinding(classObject, 'presenterImageContainer', 'shrink p-2')
|
|
153
|
-
"
|
|
162
|
+
v-if="showImg && presenter.photo && imagePosition === Position.RIGHT"
|
|
163
|
+
:class="classBinding(classObject, 'presenterImageContainer', 'shrink p-2')"
|
|
154
164
|
>
|
|
155
165
|
<img
|
|
156
166
|
:src="presenter.photo"
|
|
157
167
|
:class="classBinding(classObject, 'presenterImage', '')"
|
|
158
|
-
|
|
168
|
+
>
|
|
159
169
|
</div>
|
|
160
170
|
</div>
|
|
161
171
|
</div>
|
|
@@ -172,13 +182,13 @@ const handleClick = () => {
|
|
|
172
182
|
white-space: normal;
|
|
173
183
|
}
|
|
174
184
|
|
|
175
|
-
@media (max-width:
|
|
185
|
+
@media (max-width: 1023px) {
|
|
176
186
|
.new-line-responsive:before {
|
|
177
187
|
content: "\a";
|
|
178
188
|
white-space: pre;
|
|
179
189
|
}
|
|
180
190
|
}
|
|
181
|
-
@media (min-width:
|
|
191
|
+
@media (min-width: 1024px) {
|
|
182
192
|
.new-line-responsive:before {
|
|
183
193
|
content: " - ";
|
|
184
194
|
white-space: normal;
|
|
@@ -16,6 +16,7 @@ import { Position } from "../../enums/general";
|
|
|
16
16
|
|
|
17
17
|
type Props = {
|
|
18
18
|
presenter: Presenter;
|
|
19
|
+
showImg?: boolean;
|
|
19
20
|
enableBio?: boolean;
|
|
20
21
|
showBio?: boolean;
|
|
21
22
|
isSmallGroupedTrack?: boolean;
|
|
@@ -29,6 +30,7 @@ type Props = {
|
|
|
29
30
|
|
|
30
31
|
const props = withDefaults(defineProps<Props>(), {
|
|
31
32
|
useIcon: true,
|
|
33
|
+
showImg: true,
|
|
32
34
|
enableBio: true,
|
|
33
35
|
showBio: false,
|
|
34
36
|
isSmallGroupedTrack: false,
|
|
@@ -53,6 +55,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
53
55
|
|
|
54
56
|
const {
|
|
55
57
|
presenter,
|
|
58
|
+
showImg,
|
|
56
59
|
useIcon,
|
|
57
60
|
enableBio,
|
|
58
61
|
showBio,
|
|
@@ -86,15 +89,16 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
86
89
|
<CommonSvgIcon
|
|
87
90
|
icon="info"
|
|
88
91
|
:greyscale="isGrayScale"
|
|
89
|
-
:class="classBinding(classObject.components
|
|
90
|
-
:class-object="classObject.components
|
|
92
|
+
:class="classBinding(classObject.components?.svgIcon, 'container', '')"
|
|
93
|
+
:class-object="classObject.components?.svgIcon"
|
|
91
94
|
@click="modalVisible = true"
|
|
92
|
-
|
|
95
|
+
/>
|
|
93
96
|
</div>
|
|
94
97
|
|
|
95
98
|
<CommonPresenterListing
|
|
96
99
|
v-else
|
|
97
100
|
:presenter="presenter"
|
|
101
|
+
:show-img="showImg"
|
|
98
102
|
:enable-bio="enableBio"
|
|
99
103
|
:show-bio="showBio"
|
|
100
104
|
:is-small-grouped-track="isSmallGroupedTrack"
|
|
@@ -105,44 +109,43 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
105
109
|
text-class="font-bold text-base"
|
|
106
110
|
link-class="agenda-presenter-color"
|
|
107
111
|
:class="
|
|
108
|
-
classBinding(classObject.components
|
|
112
|
+
classBinding(classObject.components?.presenterListing, 'container', '')
|
|
109
113
|
"
|
|
110
|
-
:class-object="classObject.components
|
|
114
|
+
:class-object="classObject.components?.presenterListing"
|
|
111
115
|
@clicked="modalVisible = true"
|
|
112
|
-
|
|
113
|
-
</CommonPresenterListing>
|
|
116
|
+
/>
|
|
114
117
|
|
|
115
118
|
<CommonModal
|
|
116
119
|
:visible="modalVisible"
|
|
117
|
-
:class="classBinding(classObject.components
|
|
118
|
-
:class-object="classObject.components
|
|
120
|
+
:class="classBinding(classObject.components?.modal, 'container', '')"
|
|
121
|
+
:class-object="classObject.components?.modal"
|
|
119
122
|
@trigger="modalVisible = false"
|
|
120
123
|
>
|
|
121
124
|
<template #modal-title>
|
|
122
125
|
<div
|
|
123
126
|
:class="
|
|
124
127
|
classBinding(
|
|
125
|
-
classObject.components
|
|
128
|
+
classObject.components?.modalContent,
|
|
126
129
|
'modalTitle',
|
|
127
|
-
'flex flex-col lg:flex-row w-full pb-8 mb-8 border-b border-solid border-
|
|
130
|
+
'flex flex-col lg:flex-row w-full pb-8 mb-8 border-b border-solid border-gray-400'
|
|
128
131
|
)
|
|
129
132
|
"
|
|
130
133
|
>
|
|
131
134
|
<div
|
|
132
135
|
:class="
|
|
133
136
|
classBinding(
|
|
134
|
-
classObject.components
|
|
137
|
+
classObject.components?.modalContent,
|
|
135
138
|
'modalImagePositionContainer',
|
|
136
139
|
'flex-1 mb-6 lg:mb-0 lg:flex-initial flex justify-center'
|
|
137
140
|
)
|
|
138
141
|
"
|
|
139
142
|
>
|
|
140
143
|
<div
|
|
141
|
-
v-if="presenter.photo"
|
|
144
|
+
v-if="showImg && presenter.photo"
|
|
142
145
|
:style="presenterImageStyle"
|
|
143
146
|
:class="
|
|
144
147
|
classBinding(
|
|
145
|
-
classObject.components
|
|
148
|
+
classObject.components?.modalContent,
|
|
146
149
|
'modalImageContainer',
|
|
147
150
|
'border-white border-2 shadow-md bg-white'
|
|
148
151
|
)
|
|
@@ -158,13 +161,13 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
158
161
|
)
|
|
159
162
|
"
|
|
160
163
|
:style="itemWidthStyle"
|
|
161
|
-
|
|
164
|
+
>
|
|
162
165
|
</div>
|
|
163
166
|
</div>
|
|
164
167
|
<div
|
|
165
168
|
:class="
|
|
166
169
|
classBinding(
|
|
167
|
-
classObject.components
|
|
170
|
+
classObject.components?.modalContent,
|
|
168
171
|
'modalTextPositionContainer',
|
|
169
172
|
'flex-1 pl-4 text-center lg:text-left flex'
|
|
170
173
|
)
|
|
@@ -173,7 +176,7 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
173
176
|
<div
|
|
174
177
|
:class="
|
|
175
178
|
classBinding(
|
|
176
|
-
classObject.components
|
|
179
|
+
classObject.components?.modalContent,
|
|
177
180
|
'modalTextContainer',
|
|
178
181
|
'flex-1 self-center'
|
|
179
182
|
)
|
|
@@ -182,7 +185,7 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
182
185
|
<h1
|
|
183
186
|
:class="
|
|
184
187
|
classBinding(
|
|
185
|
-
classObject.components
|
|
188
|
+
classObject.components?.modalContent,
|
|
186
189
|
'modalName',
|
|
187
190
|
'flex-1 font-light mb-0 body-color-4 presenter-name-color'
|
|
188
191
|
)
|
|
@@ -193,13 +196,15 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
193
196
|
<p
|
|
194
197
|
:class="
|
|
195
198
|
classBinding(
|
|
196
|
-
classObject.components
|
|
199
|
+
classObject.components?.modalContent,
|
|
197
200
|
'modalTitleCompany',
|
|
198
201
|
'flex-1 font-normal text-base pt-2 leading-tight mb-0 body-color-5 presenter-title-color'
|
|
199
202
|
)
|
|
200
203
|
"
|
|
201
204
|
>
|
|
202
|
-
{{ presenter.title }}
|
|
205
|
+
{{ presenter.title }}
|
|
206
|
+
<br>
|
|
207
|
+
{{ presenter.company }}
|
|
203
208
|
</p>
|
|
204
209
|
</div>
|
|
205
210
|
</div>
|
|
@@ -209,7 +214,7 @@ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
|
|
|
209
214
|
<p
|
|
210
215
|
:class="
|
|
211
216
|
classBinding(
|
|
212
|
-
classObject
|
|
217
|
+
classObject?.components?.modalContent,
|
|
213
218
|
'modalBio',
|
|
214
219
|
'font-normal text-center lg:text-left'
|
|
215
220
|
)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { toRefs, computed } from "vue";
|
|
3
|
+
import { sortBy, get } from "lodash-es";
|
|
4
|
+
import type { Presenter, PresenterWithPivot } from "../../models/conference";
|
|
5
|
+
import type { PresenterPageConfigs } from "../../models/virtualPagesConfig";
|
|
6
|
+
|
|
7
|
+
// TODO - define presentersByLevel and presenterConfig type
|
|
8
|
+
// TODO - create a helper function that formats Presenter[] to { 'presenters_all': Presenter[] }
|
|
9
|
+
// prior to passing into this component, so that this component can always expect the same type
|
|
10
|
+
type Props = {
|
|
11
|
+
presenters: { [key: string]: Presenter[] };
|
|
12
|
+
presFormat?: string;
|
|
13
|
+
showLevels?: boolean;
|
|
14
|
+
isCompact?: boolean;
|
|
15
|
+
isCentered?: boolean;
|
|
16
|
+
presenterConfig?: PresenterPageConfigs;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
20
|
+
presFormat: "grid",
|
|
21
|
+
showLevels: false,
|
|
22
|
+
isCompact: false,
|
|
23
|
+
isCentered: false,
|
|
24
|
+
presenterConfig: () => {
|
|
25
|
+
return {} as PresenterPageConfigs;
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
presenters,
|
|
31
|
+
presFormat,
|
|
32
|
+
showLevels,
|
|
33
|
+
isCompact,
|
|
34
|
+
isCentered,
|
|
35
|
+
presenterConfig,
|
|
36
|
+
} = toRefs(props);
|
|
37
|
+
|
|
38
|
+
// computed
|
|
39
|
+
const presenterContainerClass = computed((): string => {
|
|
40
|
+
let classString: string = '';
|
|
41
|
+
|
|
42
|
+
switch (presFormat.value) {
|
|
43
|
+
case 'grid':
|
|
44
|
+
classString = 'flex flex-1 container mx-auto flex-wrap justify-center';
|
|
45
|
+
classString += isCompact.value ? ' pt-6' : ' pt-10';
|
|
46
|
+
break;
|
|
47
|
+
case 'vertical':
|
|
48
|
+
classString = 'flex flex-1 container mx-auto flex-col pt-10 px-12';
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
classString = 'flex flex-1 container mx-auto flex-col pt-10 px-12';
|
|
52
|
+
}
|
|
53
|
+
return classString;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// methods
|
|
57
|
+
const getPresenterLevelEnabled = (_level: number): boolean => {
|
|
58
|
+
// for levels 1-11
|
|
59
|
+
const _slug: string = `presenter_${_level}_alias`;
|
|
60
|
+
const configValue: boolean =
|
|
61
|
+
presenterConfig.value?.[_slug as keyof PresenterPageConfigs]?.value?.enabled ?? true;
|
|
62
|
+
return configValue;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const getPresenterLevelTitle = (_level: number): string => {
|
|
66
|
+
// for levels 1-11
|
|
67
|
+
const _slug: string = `presenter_${_level}_alias`;
|
|
68
|
+
const labelValue: string = presenterConfig.value?.[_slug as keyof PresenterPageConfigs]?.value?.label ?? '';
|
|
69
|
+
if (labelValue.length) {
|
|
70
|
+
// toggle-plus-label -> label
|
|
71
|
+
return labelValue;
|
|
72
|
+
} else if (getPresenterLevelEnabled(_level)) {
|
|
73
|
+
// toggle-plus-label -> enabled with no label
|
|
74
|
+
return '';
|
|
75
|
+
} else {
|
|
76
|
+
// legacy text field value
|
|
77
|
+
return presenterConfig.value?.[_slug as keyof PresenterPageConfigs]?.value as string ?? '';
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const getSortedPresenters = (_level: number) => {
|
|
82
|
+
const _slug: string = (_level == 0) ? 'presenters_all' : `presenters_level_${_level}`;
|
|
83
|
+
const sortedPresenters = (presenters.value?.[_slug]) ? presenters.value[_slug] : [];
|
|
84
|
+
sortedPresenters.forEach((pres: PresenterWithPivot) => {
|
|
85
|
+
if (pres?.pivot?.role && get(pres, 'pivot.role') != undefined && !pres?.role) {
|
|
86
|
+
pres.role = pres.pivot.role;
|
|
87
|
+
}
|
|
88
|
+
if (pres?.pivot?.role && get(pres, 'pivot.order') != undefined && !pres?.order) {
|
|
89
|
+
pres.order = pres.pivot.order;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
console.log(sortedPresenters);
|
|
93
|
+
return (!sortedPresenters) ? [] : sortBy(sortedPresenters.slice(), ['role', 'order', 'last_name', 'first_name']);
|
|
94
|
+
};
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<template>
|
|
98
|
+
<div class="my-10">
|
|
99
|
+
<div v-if="showLevels">
|
|
100
|
+
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
|
101
|
+
<template v-for="n in 11">
|
|
102
|
+
<div
|
|
103
|
+
v-if="
|
|
104
|
+
getPresenterLevelEnabled(n) && getSortedPresenters(n).length > 0
|
|
105
|
+
"
|
|
106
|
+
:key="n"
|
|
107
|
+
>
|
|
108
|
+
<h1 class="text-center section-header py-6">
|
|
109
|
+
{{ getPresenterLevelTitle(n) }}
|
|
110
|
+
</h1>
|
|
111
|
+
<div :class="presenterContainerClass">
|
|
112
|
+
<template
|
|
113
|
+
v-for="presenter in getSortedPresenters(n)"
|
|
114
|
+
:key="presenter.id"
|
|
115
|
+
>
|
|
116
|
+
<CommonPresenterListing
|
|
117
|
+
:presenter="presenter"
|
|
118
|
+
/>
|
|
119
|
+
</template>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
123
|
+
</div>
|
|
124
|
+
<div v-else>
|
|
125
|
+
<div :class="presenterContainerClass">
|
|
126
|
+
<template
|
|
127
|
+
v-for="presenter in getSortedPresenters(0)"
|
|
128
|
+
:key="presenter.id"
|
|
129
|
+
>
|
|
130
|
+
<CommonPresenterListing
|
|
131
|
+
:presenter="presenter"
|
|
132
|
+
/>
|
|
133
|
+
</template>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</template>
|
|
138
|
+
|
|
139
|
+
<style></style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { toRefs, reactive, ref, computed } from "vue";
|
|
2
|
+
import { toRefs, reactive, ref, shallowRef, computed } from "vue";
|
|
3
3
|
import { find } from "lodash-es";
|
|
4
4
|
import { storeToRefs } from "pinia";
|
|
5
5
|
import { useAuthStore } from "../../store/auth";
|
|
@@ -65,25 +65,26 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
65
65
|
// data
|
|
66
66
|
const { visible, showFavorites, classObject } = toRefs(props);
|
|
67
67
|
const { user } = storeToRefs(useAuthStore());
|
|
68
|
+
// shallowRef eliminates 'Vue received a Component which was made a reactive object' memory warning
|
|
68
69
|
const tabs = reactive<Tab[]>([
|
|
69
70
|
{
|
|
70
71
|
id: 1,
|
|
71
72
|
name: "General Information",
|
|
72
|
-
component: TabGeneralInformation,
|
|
73
|
+
component: shallowRef(TabGeneralInformation),
|
|
73
74
|
shouldShow: true,
|
|
74
75
|
selected: true,
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
id: 2,
|
|
78
79
|
name: "Profile Image",
|
|
79
|
-
component: TabProfileImage,
|
|
80
|
+
component: shallowRef(TabProfileImage),
|
|
80
81
|
shouldShow: true,
|
|
81
82
|
selected: false,
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
85
|
id: 3,
|
|
85
86
|
name: "Favorites",
|
|
86
|
-
component: TabFavorites,
|
|
87
|
+
component: shallowRef(TabFavorites),
|
|
87
88
|
shouldShow: showFavorites.value,
|
|
88
89
|
selected: false,
|
|
89
90
|
},
|
|
@@ -161,7 +162,10 @@ const tabClassObj = computed<{}>(() => {
|
|
|
161
162
|
:class-object="classObject.components?.modal"
|
|
162
163
|
@trigger="closeModal"
|
|
163
164
|
>
|
|
164
|
-
<template
|
|
165
|
+
<template
|
|
166
|
+
v-if="user != null"
|
|
167
|
+
#modal-body
|
|
168
|
+
>
|
|
165
169
|
<div :class="classBinding(classObject, 'container', 'p-2')">
|
|
166
170
|
<div
|
|
167
171
|
:class="
|
|
@@ -212,7 +216,7 @@ const tabClassObj = computed<{}>(() => {
|
|
|
212
216
|
</h2>
|
|
213
217
|
|
|
214
218
|
<component
|
|
215
|
-
:is="selectedTab.component"
|
|
219
|
+
:is="{...selectedTab.component}"
|
|
216
220
|
v-if="selectedTab.component && selectedTab.shouldShow"
|
|
217
221
|
:class-object="tabClassObj"
|
|
218
222
|
:user="user"
|
|
@@ -40,7 +40,7 @@ const onClick = () => {
|
|
|
40
40
|
classBinding(
|
|
41
41
|
classObject,
|
|
42
42
|
'link',
|
|
43
|
-
'sidebar-nav-item block px-4 py-2 mt-2 mx-1 text-black text-sm
|
|
43
|
+
'sidebar-nav-item block px-4 py-2 mt-2 mx-1 text-black text-sm font-semibold rounded-lg cursor-pointer hover:bg-gray-500 focus:text-white hover:text-white focus:bg-gray-500 focus:outline-none focus:ring'
|
|
44
44
|
),
|
|
45
45
|
]"
|
|
46
46
|
@click="onClick"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import { toRefs } from 'vue';
|
|
3
|
+
import { storeToRefs } from 'pinia';
|
|
4
|
+
import { useAuthStore } from '../../../store/auth';
|
|
5
|
+
import { useClassBinding } from '../../../composables/useClassBinding';
|
|
6
|
+
import type { FavoritesClassObj } from '../../../@types/components';
|
|
6
7
|
|
|
7
8
|
type Props = {
|
|
8
9
|
classObject?: FavoritesClassObj;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { storeToRefs } from "pinia";
|
|
3
|
-
import { ref,
|
|
3
|
+
import { ref, toRefs } from "vue";
|
|
4
4
|
import { useAuthStore } from "../../../store/auth";
|
|
5
5
|
import type {
|
|
6
6
|
GenInfoClassObj,
|
|
@@ -15,6 +15,15 @@ type Props = {
|
|
|
15
15
|
classObject?: GenInfoClassObj;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
type GeneralInformationForm = {
|
|
19
|
+
title: string;
|
|
20
|
+
name: string;
|
|
21
|
+
company: string;
|
|
22
|
+
linkedin_url: string;
|
|
23
|
+
twitter_url: string;
|
|
24
|
+
video_chat: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
const props = withDefaults(defineProps<Props>(), {
|
|
19
28
|
classObject: () => {
|
|
20
29
|
return {
|
|
@@ -38,14 +47,15 @@ const { classBinding } = useClassBinding();
|
|
|
38
47
|
const { classObject } = toRefs(props);
|
|
39
48
|
|
|
40
49
|
const { user } = storeToRefs(useAuthStore());
|
|
41
|
-
const formData =
|
|
42
|
-
title: user.value
|
|
43
|
-
name: user.value
|
|
44
|
-
company: user.value
|
|
45
|
-
linkedin_url: user.value
|
|
46
|
-
twitter_url: user.value
|
|
47
|
-
video_chat: user.value
|
|
50
|
+
const formData = ref<GeneralInformationForm>({
|
|
51
|
+
title: user.value?.title ?? '',
|
|
52
|
+
name: user.value?.name ?? '',
|
|
53
|
+
company: user.value?.company ?? '',
|
|
54
|
+
linkedin_url: user.value?.linkedin_url ?? '',
|
|
55
|
+
twitter_url: user.value?.twitter_url ?? '',
|
|
56
|
+
video_chat: user.value?.video_chat ?? false
|
|
48
57
|
});
|
|
58
|
+
|
|
49
59
|
const errors = ref<[]>([]);
|
|
50
60
|
const wasSaved = ref<boolean>(false);
|
|
51
61
|
|
|
@@ -53,13 +63,13 @@ const wasSaved = ref<boolean>(false);
|
|
|
53
63
|
const { update } = useAuthStore();
|
|
54
64
|
|
|
55
65
|
const toggleChat = (value: boolean) => {
|
|
56
|
-
formData.video_chat = value;
|
|
66
|
+
formData.value.video_chat = value;
|
|
57
67
|
};
|
|
58
68
|
|
|
59
69
|
const handleForm = () => {
|
|
60
70
|
errors.value = [];
|
|
61
71
|
|
|
62
|
-
update(formData)
|
|
72
|
+
update(formData.value)
|
|
63
73
|
.then(() => {
|
|
64
74
|
wasSaved.value = true;
|
|
65
75
|
})
|
|
@@ -105,7 +115,7 @@ const handleForm = () => {
|
|
|
105
115
|
classBinding(
|
|
106
116
|
classObject.components?.textInput,
|
|
107
117
|
'container',
|
|
108
|
-
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:
|
|
118
|
+
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:ring'
|
|
109
119
|
)
|
|
110
120
|
"
|
|
111
121
|
type="text"
|
|
@@ -130,7 +140,7 @@ const handleForm = () => {
|
|
|
130
140
|
classBinding(
|
|
131
141
|
classObject.components?.textInput,
|
|
132
142
|
'container',
|
|
133
|
-
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:
|
|
143
|
+
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:ring'
|
|
134
144
|
)
|
|
135
145
|
"
|
|
136
146
|
type="text"
|
|
@@ -155,7 +165,7 @@ const handleForm = () => {
|
|
|
155
165
|
classBinding(
|
|
156
166
|
classObject.components?.textInput,
|
|
157
167
|
'container',
|
|
158
|
-
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:
|
|
168
|
+
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:ring'
|
|
159
169
|
)
|
|
160
170
|
"
|
|
161
171
|
type="text"
|
|
@@ -180,7 +190,7 @@ const handleForm = () => {
|
|
|
180
190
|
classBinding(
|
|
181
191
|
classObject.components?.textInput,
|
|
182
192
|
'container',
|
|
183
|
-
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:
|
|
193
|
+
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:ring'
|
|
184
194
|
)
|
|
185
195
|
"
|
|
186
196
|
type="text"
|
|
@@ -205,7 +215,7 @@ const handleForm = () => {
|
|
|
205
215
|
classBinding(
|
|
206
216
|
classObject.components?.textInput,
|
|
207
217
|
'container',
|
|
208
|
-
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:
|
|
218
|
+
'shadow appearance-none border rounded w-full py-2 px-3 text-grey-700 leading-tight focus:outline-none focus:ring'
|
|
209
219
|
)
|
|
210
220
|
"
|
|
211
221
|
type="text"
|
|
@@ -235,7 +245,7 @@ const handleForm = () => {
|
|
|
235
245
|
classBinding(
|
|
236
246
|
classObject,
|
|
237
247
|
'submitButton',
|
|
238
|
-
'bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:
|
|
248
|
+
'bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:ring'
|
|
239
249
|
)
|
|
240
250
|
"
|
|
241
251
|
type="button"
|