@saooti/octopus-sdk 1.0.0 → 1.1.1
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/README.md +261 -0
- package/index.d.ts +4 -0
- package/index.ts +55 -3
- package/package.json +53 -45
- package/public/config.ts +4 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +129 -0
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/style.css +186 -1224
- package/public/img/403.jpeg +0 -0
- package/public/img/404.svg +242 -0
- package/public/img/ACPM.png +0 -0
- package/public/img/ouest_france_logo.svg +12 -0
- package/src/App.vue +102 -31
- package/src/api/classicCrud.ts +34 -0
- package/src/api/initialize.ts +5 -2
- package/src/assets/bootstrap-diff.scss +197 -0
- package/src/assets/form.scss +77 -77
- package/src/assets/general.scss +284 -272
- package/src/assets/live.scss +39 -0
- package/src/assets/modal.scss +43 -50
- package/src/assets/multiselect.scss +522 -573
- package/src/assets/octopus-library.scss +18 -4
- package/src/assets/share.scss +243 -0
- package/src/assets/transition.scss +98 -2
- package/src/components/display/aggregator/RssSection.vue +3 -5
- package/src/components/display/categories/CategoryChooser.vue +151 -114
- package/src/components/display/categories/CategoryFilter.vue +162 -0
- package/src/components/display/categories/CategoryList.vue +149 -117
- package/src/components/display/comments/AddCommentModal.vue +103 -108
- package/src/components/display/comments/CommentBasicView.vue +95 -0
- package/src/components/display/comments/CommentInput.vue +195 -183
- package/src/components/display/comments/CommentItem.vue +170 -208
- package/src/components/display/comments/CommentList.vue +134 -228
- package/src/components/display/comments/CommentParentInfo.vue +28 -62
- package/src/components/display/comments/CommentPlayer.vue +53 -56
- package/src/components/display/comments/CommentSection.vue +52 -83
- package/src/components/display/edit/EditBox.vue +10 -4
- package/src/components/display/edit/EditCommentBox.vue +124 -38
- package/src/components/display/emission/EmissionChooser.vue +88 -108
- package/src/components/display/emission/EmissionInlineList.vue +156 -157
- package/src/components/display/emission/EmissionItem.vue +72 -226
- package/src/components/display/emission/EmissionList.vue +159 -201
- package/src/components/display/emission/EmissionPlayerItem.vue +203 -174
- package/src/components/display/filter/AdvancedSearch.vue +224 -432
- package/src/components/display/filter/CategoryFilter.vue +105 -0
- package/src/components/display/filter/MonetizableFilter.vue +18 -15
- package/src/components/display/filter/ProductorSearch.vue +153 -176
- package/src/components/display/filter/RubriqueChoice.vue +97 -0
- package/src/components/display/filter/RubriqueFilter.vue +232 -0
- package/src/components/display/list/ListPaginate.vue +145 -0
- package/src/components/display/list/Paginate.vue +218 -0
- package/src/components/display/live/CountDown.vue +31 -30
- package/src/components/display/live/LiveHorizontalList.vue +84 -62
- package/src/components/display/live/LiveItem.vue +161 -186
- package/src/components/display/live/LiveList.vue +184 -295
- package/src/components/display/organisation/OrganisationChooser.vue +124 -162
- package/src/components/display/organisation/OrganisationChooserLight.vue +53 -56
- package/src/components/display/participant/ParticipantItem.vue +91 -128
- package/src/components/display/participant/ParticipantList.vue +134 -121
- package/src/components/display/playlist/PlaylistItem.vue +60 -97
- package/src/components/display/playlist/PlaylistList.vue +99 -92
- package/src/components/display/playlist/PodcastList.vue +117 -132
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +191 -0
- package/src/components/display/podcasts/AnimatorsItem.vue +29 -37
- package/src/components/display/podcasts/ParticipantDescription.vue +82 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +49 -102
- package/src/components/display/podcasts/PodcastImage.vue +208 -225
- package/src/components/display/podcasts/PodcastInlineList.vue +62 -355
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +240 -0
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +167 -0
- package/src/components/display/podcasts/PodcastItem.vue +94 -218
- package/src/components/display/podcasts/PodcastItemInfo.vue +166 -0
- package/src/components/display/podcasts/PodcastList.vue +127 -178
- package/src/components/display/podcasts/PodcastModuleBox.vue +234 -0
- package/src/components/display/podcasts/PodcastPlayBar.vue +101 -0
- package/src/components/display/podcasts/PodcastSwiperList.vue +204 -0
- package/src/components/display/podcasts/TagList.vue +60 -38
- package/src/components/display/rubriques/RubriqueChooser.vue +144 -131
- package/src/components/display/rubriques/RubriqueList.vue +216 -0
- package/src/components/display/sharing/PlayerParameters.vue +111 -153
- package/src/components/display/sharing/QrCode.vue +96 -0
- package/src/components/display/sharing/ShareButtons.vue +63 -233
- package/src/components/display/sharing/ShareButtonsIntern.vue +225 -0
- package/src/components/display/sharing/ShareDistribution.vue +102 -166
- package/src/components/display/sharing/SharePlayer.vue +189 -353
- package/src/components/display/sharing/SharePlayerColors.vue +78 -0
- package/src/components/display/sharing/SharePlayerTypes.vue +112 -0
- package/src/components/display/sharing/SplitButton.vue +42 -0
- package/src/components/display/sharing/SubscribeButtons.vue +65 -118
- package/src/components/display/studio/RecordingItemButton.vue +3 -5
- package/src/components/form/ClassicCheckbox.vue +66 -0
- package/src/components/form/ClassicLoading.vue +28 -0
- package/src/components/form/ClassicRadio.vue +66 -0
- package/src/components/form/ClassicSearch.vue +86 -0
- package/src/components/form/ClassicSelect.vue +65 -0
- package/src/components/misc/ErrorMessage.vue +27 -18
- package/src/components/misc/Footer.vue +151 -108
- package/src/components/misc/HomeDropdown.vue +95 -154
- package/src/components/misc/LeftMenu.vue +137 -206
- package/src/components/misc/Popover.vue +118 -0
- package/src/components/misc/Snackbar.vue +73 -37
- package/src/components/misc/TopBar.vue +211 -314
- package/src/components/misc/modal/ClipboardModal.vue +34 -47
- package/src/components/misc/modal/MessageModal.vue +74 -53
- package/src/components/misc/modal/NewsletterModal.vue +272 -224
- package/src/components/misc/modal/QrCodeModal.vue +58 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +140 -74
- package/src/components/misc/player/Player.vue +146 -0
- package/src/components/misc/player/PlayerCompact.vue +154 -0
- package/src/components/misc/player/PlayerLarge.vue +166 -0
- package/src/components/misc/player/PlayerProgressBar.vue +112 -0
- package/src/components/misc/player/PlayerTimeline.vue +61 -0
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/handle403.ts +17 -0
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/orgaComputed.ts +15 -0
- package/src/components/mixins/organisationFilter.ts +41 -0
- package/src/components/mixins/player/playerComment.ts +98 -0
- package/src/components/mixins/player/playerDisplay.ts +113 -0
- package/src/components/mixins/player/playerLive.ts +111 -0
- package/src/components/mixins/player/playerLogic.ts +225 -0
- package/src/components/mixins/tagOfMixins.ts +19 -0
- package/src/components/pages/Category.vue +24 -28
- package/src/components/pages/Emission.vue +144 -177
- package/src/components/pages/Emissions.vue +94 -110
- package/src/components/pages/Error403Page.vue +60 -0
- package/src/components/pages/Home.vue +74 -21
- package/src/components/pages/Lives.vue +53 -58
- package/src/components/pages/PageNotFound.vue +55 -0
- package/src/components/pages/Participant.vue +113 -129
- package/src/components/pages/Participants.vue +25 -41
- package/src/components/pages/Playlist.vue +86 -86
- package/src/components/pages/Playlists.vue +33 -52
- package/src/components/pages/Podcast.vue +206 -478
- package/src/components/pages/Podcasts.vue +112 -156
- package/src/components/pages/Rubrique.vue +21 -27
- package/src/components/pages/Search.vue +37 -94
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/helper/useEventListener.ts +18 -0
- package/src/i18n.ts +36 -0
- package/src/locale/de.ts +309 -0
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +316 -1
- package/src/locale/es.ts +309 -0
- package/src/locale/fr.ts +47 -15
- package/src/locale/it.ts +307 -0
- package/src/locale/messages.ts +11 -2
- package/src/locale/sl.ts +309 -0
- package/src/main.ts +64 -55
- package/src/router/router.ts +192 -159
- package/src/sass/_variables.scss +10 -8
- package/src/shims-tsx.d.ts +15 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +41 -173
- package/src/store/class/adserver/adserverConfig.ts +9 -0
- package/src/store/class/adserver/adserverOtherEmission.ts +13 -0
- package/src/store/class/adserver/adserverTiming.ts +10 -0
- package/src/store/class/cartouchier/cartouche.ts +15 -0
- package/src/store/class/cartouchier/cartouchier.ts +9 -0
- package/src/store/class/conference/conference.ts +35 -0
- package/src/store/class/conference/conferenceMessage.ts +10 -0
- package/src/store/class/conference/conferenceParticipant.ts +18 -0
- package/src/store/class/conference/pad.ts +15 -0
- package/src/store/class/conference/studioCall.ts +7 -0
- package/src/store/class/contract/contract.ts +7 -0
- package/src/store/class/contract/contractOrganisation.ts +7 -0
- package/src/store/class/ftp/ftpEmission.ts +41 -0
- package/src/store/class/ftp/ftpParam.ts +12 -0
- package/src/store/class/ftp/testFtpEmission.ts +5 -0
- package/src/store/class/general/audioView.ts +21 -0
- package/src/store/class/general/category.ts +10 -0
- package/src/store/class/general/comment.ts +16 -0
- package/src/store/class/general/customPlayer.ts +9 -0
- package/src/store/class/general/emission.ts +23 -0
- package/src/store/class/general/fetchParam.ts +3 -0
- package/src/store/class/general/initState.ts +25 -0
- package/src/store/class/general/interfacePageable.ts +16 -0
- package/src/store/class/general/ituneCategory.ts +5 -0
- package/src/store/class/general/media.ts +14 -0
- package/src/store/class/general/organisation.ts +20 -0
- package/src/store/class/general/pageable.ts +13 -0
- package/src/store/class/general/participant.ts +12 -0
- package/src/store/class/general/player.ts +14 -0
- package/src/store/class/general/playlist.ts +13 -0
- package/src/store/class/general/podcast.ts +43 -0
- package/src/store/class/general/sortPageable.ts +5 -0
- package/src/store/class/general/soundcastCategory.ts +8 -0
- package/src/store/class/ouestFrance/ofTag.ts +36 -0
- package/src/store/class/ouestFrance/ofTagInfo.ts +9 -0
- package/src/store/class/ouestFrance/ofTagPage.ts +7 -0
- package/src/store/class/ouestFrance/ofTagSeo.ts +7 -0
- package/src/store/class/ouestFrance/ofTagVente.ts +6 -0
- package/src/store/class/ouestFrance/ofTagWithParents.ts +26 -0
- package/src/store/class/rss/aggregator.ts +28 -0
- package/src/store/class/rss/rssEmission.ts +14 -0
- package/src/store/class/rss/rssInfo.ts +8 -0
- package/src/store/class/rubrique/rubriquage.ts +10 -0
- package/src/store/class/rubrique/rubriquageFilter.ts +6 -0
- package/src/store/class/rubrique/rubrique.ts +9 -0
- package/src/store/class/stat/statArrayIncome.ts +6 -0
- package/src/store/class/stat/statArrayObject.ts +34 -0
- package/src/store/class/stat/statGraph.ts +7 -0
- package/src/store/class/user/person.ts +15 -0
- package/src/store/class/user/profile.ts +12 -0
- package/src/store/class/user/userKeycloak.ts +24 -0
- package/src/store/paramStore.ts +222 -217
- package/src/store/typeAppStore.ts +186 -235
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +16 -0
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +0 -829
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/stitcher-logo.svg +0 -83
- package/public/img/ACPM.PNG +0 -0
- package/src/api/comments.ts +0 -7
- package/src/api/emissions.ts +0 -7
- package/src/api/podcasts.ts +0 -7
- package/src/api/profile.ts +0 -8
- package/src/api/studio.ts +0 -1
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -291
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/components/misc/Player.vue +0 -792
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -1,66 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column mt-2 mb-1 item-comment">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</template>
|
|
29
|
-
<template v-else>
|
|
30
|
-
<input
|
|
31
|
-
class="form-input mr-2 mb-2 width-auto"
|
|
32
|
-
type="text"
|
|
33
|
-
v-model="temporaryName"
|
|
34
|
-
v-bind:class="{ 'border border-danger': temporaryName.length < 2 }"
|
|
35
|
-
/>
|
|
36
|
-
</template>
|
|
37
|
-
<img
|
|
38
|
-
class="icon-certified"
|
|
39
|
-
src="/img/certified.png"
|
|
40
|
-
v-if="comment.certified"
|
|
41
|
-
:title="$t('Certified account')"
|
|
3
|
+
<CommentBasicView
|
|
4
|
+
v-if="!isEditing"
|
|
5
|
+
:comment="comment"
|
|
6
|
+
:edit-right="editRight"
|
|
7
|
+
:recording-in-live="recordingInLive"
|
|
8
|
+
/>
|
|
9
|
+
<template v-else>
|
|
10
|
+
<input
|
|
11
|
+
ref="focusElement"
|
|
12
|
+
v-model="temporaryName"
|
|
13
|
+
class="form-input"
|
|
14
|
+
type="text"
|
|
15
|
+
:class="{ 'border border-danger': 0 === countName || !validName }"
|
|
16
|
+
>
|
|
17
|
+
<p
|
|
18
|
+
class="d-flex justify-content-end small-text"
|
|
19
|
+
:class="{ 'text-danger': !validName }"
|
|
20
|
+
>
|
|
21
|
+
{{ countName + ' / ' + maxName }}
|
|
22
|
+
</p>
|
|
23
|
+
<textarea
|
|
24
|
+
v-model="temporaryContent"
|
|
25
|
+
:class="{ 'border border-danger': 0 === countComment || !validComment }"
|
|
26
|
+
class="form-input"
|
|
27
|
+
type="text"
|
|
42
28
|
/>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<template v-if="!isEditing">
|
|
47
|
-
<div v-html="urlify(contentDisplay)"></div>
|
|
48
|
-
<a
|
|
49
|
-
class="c-hand font-italic"
|
|
50
|
-
v-if="comment.content.length > 300"
|
|
51
|
-
@click="summary = !summary"
|
|
52
|
-
>{{ readMore }}</a
|
|
29
|
+
<p
|
|
30
|
+
class="d-flex justify-content-end small-text"
|
|
31
|
+
:class="{ 'text-danger': !validComment }"
|
|
53
32
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<textarea class="form-input" type="text" v-model="temporaryContent" />
|
|
33
|
+
{{ countComment + ' / ' + maxComment }}
|
|
34
|
+
</p>
|
|
57
35
|
<div class="d-flex justify-content-end">
|
|
58
|
-
<button
|
|
36
|
+
<button
|
|
37
|
+
class="btn m-1"
|
|
38
|
+
@click="isEditing = false"
|
|
39
|
+
>
|
|
59
40
|
{{ $t('Cancel') }}
|
|
60
41
|
</button>
|
|
61
42
|
<button
|
|
62
43
|
class="btn btn-primary m-1"
|
|
63
|
-
:disabled="0 ===
|
|
44
|
+
:disabled="0 === countComment || !validComment || 0 === countName || !validName"
|
|
64
45
|
@click="validEdit"
|
|
65
46
|
>
|
|
66
47
|
{{ $t('Validate') }}
|
|
@@ -69,43 +50,45 @@
|
|
|
69
50
|
</template>
|
|
70
51
|
<div class="d-flex align-items-center mt-1">
|
|
71
52
|
<button
|
|
53
|
+
v-if="null === comment.commentIdReferer && 'Valid'=== comment.status"
|
|
54
|
+
class="btn d-flex align-items-center py-1 px-3 me-2"
|
|
55
|
+
:data-selenium="'answer-button-comment-' + seleniumFormat(comment.name)"
|
|
72
56
|
@click="answerComment"
|
|
73
|
-
class="btn btn-answer primary-color mr-2"
|
|
74
|
-
v-if="null === comment.commentIdReferer && 'Valid' === comment.status"
|
|
75
57
|
>
|
|
76
58
|
{{ $t('To answer') }}
|
|
77
59
|
</button>
|
|
78
|
-
<
|
|
79
|
-
v-b-toggle="'answers-comment-' + comment.comId"
|
|
80
|
-
class="primary-color c-hand d-flex align-items-center small-Text input-no-outline"
|
|
60
|
+
<button
|
|
81
61
|
v-if="
|
|
82
62
|
(!isFlat && comment.relatedComments) ||
|
|
83
63
|
(isFlat && comment.commentIdReferer)
|
|
84
64
|
"
|
|
65
|
+
class="btn py-1 d-flex align-items-center px-3 me-2"
|
|
66
|
+
@click="collapseVisible=!collapseVisible"
|
|
85
67
|
>
|
|
86
|
-
<
|
|
87
|
-
<
|
|
68
|
+
<span v-if="comment.relatedComments">
|
|
69
|
+
<template v-if="!collapseVisible">
|
|
88
70
|
{{ $t('Display answers', { nb: comment.relatedComments }) }}
|
|
89
71
|
<i v-if="editRight">{{
|
|
90
72
|
$t('(nb valid comment answers)', {
|
|
91
73
|
nb: comment.relatedValidComments,
|
|
92
74
|
})
|
|
93
75
|
}}</i>
|
|
94
|
-
</
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
76
|
+
</template>
|
|
77
|
+
<template v-else>
|
|
78
|
+
{{ $t('Hide answers') }}
|
|
79
|
+
</template>
|
|
80
|
+
</span>
|
|
81
|
+
<span v-else>
|
|
82
|
+
{{ $t('In response to') }}
|
|
83
|
+
</span>
|
|
84
|
+
<span
|
|
85
|
+
:class="collapseVisible? 'arrow-transform': ''"
|
|
86
|
+
class="ms-1 saooti-down"
|
|
87
|
+
/>
|
|
88
|
+
</button>
|
|
106
89
|
<EditCommentBox
|
|
107
|
-
ref="editBox"
|
|
108
90
|
v-if="editRight"
|
|
91
|
+
ref="editBox"
|
|
109
92
|
:comment="comment"
|
|
110
93
|
:organisation="organisation"
|
|
111
94
|
@deleteComment="deleteComment"
|
|
@@ -113,192 +96,167 @@
|
|
|
113
96
|
@editComment="editComment"
|
|
114
97
|
/>
|
|
115
98
|
</div>
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
class="
|
|
119
|
-
v-model="collapseVisible"
|
|
99
|
+
<div
|
|
100
|
+
v-if="collapseVisible"
|
|
101
|
+
class="ms-4"
|
|
120
102
|
>
|
|
121
103
|
<CommentInput
|
|
122
104
|
v-if="!isFlat || (isFlat && !comment.commentIdReferer)"
|
|
105
|
+
v-model:knownIdentity="knownIdentity"
|
|
123
106
|
:focus="focus"
|
|
124
107
|
:podcast="podcast"
|
|
125
|
-
|
|
126
|
-
:
|
|
127
|
-
:fetchConference="fetchConference"
|
|
108
|
+
:comment="comment"
|
|
109
|
+
:fetch-conference="fetchConference"
|
|
128
110
|
@cancelAction="collapseVisible = false"
|
|
129
111
|
@newComment="newComment"
|
|
130
112
|
/>
|
|
131
113
|
<CommentParentInfo
|
|
132
|
-
v-if="isFlat && comment.commentIdReferer
|
|
133
|
-
:
|
|
114
|
+
v-if="isFlat && comment.commentIdReferer"
|
|
115
|
+
:com-id="comment.commentIdReferer"
|
|
116
|
+
:edit-right="editRight"
|
|
134
117
|
/>
|
|
135
118
|
<CommentList
|
|
136
|
-
v-if="comment.relatedComments
|
|
137
|
-
|
|
119
|
+
v-if="!isFlat && comment.relatedComments"
|
|
120
|
+
ref="commentList"
|
|
138
121
|
:podcast="podcast"
|
|
139
|
-
:
|
|
122
|
+
:fetch-conference="fetchConference"
|
|
140
123
|
:organisation="organisation"
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
:com-id="comment.comId"
|
|
125
|
+
@updateStatus="updateStatus"
|
|
143
126
|
/>
|
|
144
|
-
</
|
|
127
|
+
</div>
|
|
145
128
|
</div>
|
|
146
129
|
</template>
|
|
147
130
|
|
|
148
|
-
<style lang="scss">
|
|
149
|
-
.comment-item-container {
|
|
150
|
-
.icon-certified {
|
|
151
|
-
height: 15px;
|
|
152
|
-
margin-right: 0.5rem;
|
|
153
|
-
}
|
|
154
|
-
.btn-answer {
|
|
155
|
-
padding: 0.1rem 0.75rem;
|
|
156
|
-
}
|
|
157
|
-
.collapsed > .when-opened,
|
|
158
|
-
:not(.collapsed) > .when-closed {
|
|
159
|
-
display: none !important;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
</style>
|
|
163
|
-
|
|
164
131
|
<script lang="ts">
|
|
165
|
-
import CommentInput from './CommentInput.vue';
|
|
166
|
-
import CommentList from './CommentList.vue';
|
|
167
|
-
import CommentParentInfo from './CommentParentInfo.vue';
|
|
168
|
-
import EditCommentBox from '@/components/display/edit/EditCommentBox.vue';
|
|
169
132
|
import { state } from '../../../store/paramStore';
|
|
170
|
-
import { displayMethods } from '../../mixins/functions';
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
import {
|
|
133
|
+
import { displayMethods, selenium } from '../../mixins/functions';
|
|
134
|
+
import { CommentPodcast } from '@/store/class/general/comment';
|
|
135
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
136
|
+
import { Conference } from '@/store/class/conference/conference';
|
|
137
|
+
import CommentBasicView from './CommentBasicView.vue';
|
|
138
|
+
import Constants from '../../../../public/config';
|
|
139
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
140
|
+
const CommentInput = defineAsyncComponent(() => import('./CommentInput.vue'));
|
|
141
|
+
const CommentParentInfo = defineAsyncComponent(() => import('./CommentParentInfo.vue'));
|
|
142
|
+
const EditCommentBox = defineAsyncComponent(() => import('@/components/display/edit/EditCommentBox.vue'));
|
|
143
|
+
const CommentList = defineAsyncComponent(() => import('./CommentList.vue'));
|
|
174
144
|
export default defineComponent({
|
|
175
145
|
name: 'CommentItem',
|
|
176
146
|
|
|
177
|
-
props: ['comment', 'podcast', 'fetchConference', 'organisation', 'isFlat'],
|
|
178
|
-
emits: ['deleteComment', 'updateComment', 'update:comment'],
|
|
179
|
-
|
|
180
|
-
mixins: [displayMethods],
|
|
181
|
-
|
|
182
147
|
components: {
|
|
183
|
-
CommentList,
|
|
184
|
-
EditCommentBox,
|
|
185
148
|
CommentInput,
|
|
186
149
|
CommentParentInfo,
|
|
150
|
+
EditCommentBox,
|
|
151
|
+
CommentList,
|
|
152
|
+
CommentBasicView
|
|
187
153
|
},
|
|
188
154
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
};
|
|
155
|
+
mixins:[displayMethods, selenium],
|
|
156
|
+
|
|
157
|
+
props: {
|
|
158
|
+
comment: { default: ()=>({}), type: Object as ()=>CommentPodcast },
|
|
159
|
+
podcast: { default: undefined, type: Object as ()=>Podcast },
|
|
160
|
+
fetchConference: { default: undefined, type: Object as ()=>Conference },
|
|
161
|
+
organisation: { default: undefined, type: String},
|
|
162
|
+
isFlat: { default: false, type: Boolean },
|
|
198
163
|
},
|
|
199
164
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
165
|
+
emits: ['deleteComment', 'updateComment', 'update:comment'],
|
|
166
|
+
|
|
167
|
+
data() {
|
|
203
168
|
return {
|
|
204
|
-
|
|
169
|
+
collapseVisible: false as boolean,
|
|
170
|
+
focus: false as boolean,
|
|
171
|
+
isEditing: false as boolean,
|
|
172
|
+
temporaryContent: '' as string,
|
|
173
|
+
temporaryName: '' as string,
|
|
174
|
+
maxComment : Constants.MAX_COMMENT as number,
|
|
175
|
+
maxName : Constants.MAX_COMMENT_NAME as number
|
|
205
176
|
};
|
|
206
177
|
},
|
|
207
|
-
|
|
208
178
|
computed: {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return moment(this.comment.date).format('D MMMM YYYY HH[h]mm');
|
|
212
|
-
return '';
|
|
179
|
+
validName(): boolean{
|
|
180
|
+
return this.countName <= this.maxName;
|
|
213
181
|
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
if (this.comment.content.length <= 300) return this.comment.content;
|
|
217
|
-
return this.comment.content.substring(0, 300) + '...';
|
|
182
|
+
countName(): number{
|
|
183
|
+
return this.temporaryName.length;
|
|
218
184
|
},
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return this.$t('Read less');
|
|
185
|
+
validComment(): boolean{
|
|
186
|
+
return this.countComment <= this.maxComment;
|
|
222
187
|
},
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return this.comment.content;
|
|
188
|
+
countComment(): number{
|
|
189
|
+
return this.temporaryContent.length;
|
|
226
190
|
},
|
|
227
|
-
|
|
191
|
+
myOrganisationId(): string|undefined {
|
|
228
192
|
return state.generalParameters.organisationId;
|
|
229
193
|
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
this.organisationId === this.podcast.organisation.id) ||
|
|
236
|
-
this.organisationId === this.organisation)) ||
|
|
237
|
-
state.generalParameters.isAdmin
|
|
238
|
-
)
|
|
239
|
-
return true;
|
|
240
|
-
return false;
|
|
194
|
+
editRight(): boolean {
|
|
195
|
+
return (true === state.generalParameters.isCommments &&
|
|
196
|
+
((this.myOrganisationId === this.podcast?.organisation.id) ||
|
|
197
|
+
this.myOrganisationId === this.organisation)) ||
|
|
198
|
+
true === state.generalParameters.isAdmin;
|
|
241
199
|
},
|
|
242
200
|
knownIdentity: {
|
|
243
|
-
get():
|
|
201
|
+
get(): string|null {
|
|
244
202
|
return this.$store.state.comments.knownIdentity;
|
|
245
203
|
},
|
|
246
|
-
set(value:
|
|
204
|
+
set(value: string|null) {
|
|
247
205
|
this.$store.commit('setCommentIdentity', value);
|
|
248
206
|
},
|
|
249
207
|
},
|
|
250
|
-
recordingInLive():boolean {
|
|
208
|
+
recordingInLive(): boolean {
|
|
251
209
|
return (
|
|
252
|
-
this.podcast &&
|
|
253
|
-
this.podcast.conferenceId &&
|
|
210
|
+
undefined!==this.podcast?.conferenceId &&
|
|
254
211
|
0 !== this.podcast.conferenceId &&
|
|
255
212
|
'READY' === this.podcast.processingStatus
|
|
256
213
|
);
|
|
257
214
|
},
|
|
258
215
|
},
|
|
259
|
-
|
|
260
216
|
methods: {
|
|
261
|
-
answerComment() {
|
|
217
|
+
answerComment(): void {
|
|
262
218
|
this.collapseVisible = true;
|
|
263
219
|
this.focus = !this.focus;
|
|
264
220
|
},
|
|
265
|
-
deleteComment() {
|
|
221
|
+
deleteComment(): void {
|
|
266
222
|
this.$emit('deleteComment');
|
|
267
223
|
},
|
|
268
|
-
updateComment(data:
|
|
224
|
+
updateComment(data: {type: string; comment: CommentPodcast; status?: string }): void {
|
|
269
225
|
this.isEditing = false;
|
|
270
226
|
this.$emit('updateComment', data);
|
|
271
227
|
},
|
|
272
|
-
newComment(comment:
|
|
228
|
+
newComment(comment: CommentPodcast, fromEvent = false): void {
|
|
273
229
|
if (undefined === this.fetchConference || fromEvent) {
|
|
274
|
-
|
|
275
|
-
updatedComment.relatedComments
|
|
276
|
-
|
|
230
|
+
const updatedComment = this.comment;
|
|
231
|
+
if(undefined !== updatedComment.relatedComments){
|
|
232
|
+
updatedComment.relatedComments += 1;
|
|
233
|
+
}
|
|
234
|
+
if (undefined !== updatedComment.relatedValidComments && 'Valid' === comment.status) {
|
|
277
235
|
updatedComment.relatedValidComments += 1;
|
|
278
236
|
}
|
|
279
237
|
this.$emit('update:comment', updatedComment);
|
|
280
238
|
}
|
|
281
|
-
if (this.commentList) {
|
|
282
|
-
this.commentList.addNewComment(comment, true);
|
|
239
|
+
if (this.$refs.commentList) {
|
|
240
|
+
(this.$refs.commentList as InstanceType<typeof CommentList>).addNewComment(comment, true);
|
|
283
241
|
}
|
|
284
242
|
},
|
|
285
|
-
editComment() {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
if (this.comment.content && null !== this.comment.content) {
|
|
290
|
-
this.temporaryContent = this.comment.content;
|
|
291
|
-
}
|
|
243
|
+
editComment(): void {
|
|
244
|
+
this.temporaryName = this.comment.name && null !== this.comment.name ? this.comment.name : '';
|
|
245
|
+
this.temporaryContent = this.comment.content && null !== this.comment.content ? this.comment.content : '';
|
|
292
246
|
this.isEditing = true;
|
|
247
|
+
this.$nextTick(() => {
|
|
248
|
+
(this.$refs.focusElement as HTMLElement)?.focus();
|
|
249
|
+
});
|
|
293
250
|
},
|
|
294
|
-
validEdit() {
|
|
295
|
-
|
|
251
|
+
validEdit(): void {
|
|
252
|
+
const comment = this.comment;
|
|
296
253
|
comment.content = this.temporaryContent;
|
|
297
254
|
comment.name = this.temporaryName;
|
|
298
|
-
this.editBox.updateComment(comment);
|
|
255
|
+
(this.$refs.editBox as InstanceType<typeof EditCommentBox>).updateComment(comment);
|
|
299
256
|
},
|
|
300
|
-
updateStatus(data: string) {
|
|
301
|
-
|
|
257
|
+
updateStatus(data: string): void {
|
|
258
|
+
const updatedComment = this.comment;
|
|
259
|
+
if(undefined === updatedComment.relatedValidComments){return;}
|
|
302
260
|
if ('Valid' === data) {
|
|
303
261
|
updatedComment.relatedValidComments += 1;
|
|
304
262
|
} else {
|
|
@@ -306,34 +264,40 @@ export default defineComponent({
|
|
|
306
264
|
}
|
|
307
265
|
this.$emit('update:comment', updatedComment);
|
|
308
266
|
},
|
|
309
|
-
receiveCommentEvent(event: {
|
|
267
|
+
receiveCommentEvent(event: {type: string; comment: CommentPodcast; oldStatus?:string }): void {
|
|
310
268
|
switch (event.type) {
|
|
311
|
-
case 'Create':
|
|
312
|
-
this.newComment(event.comment, true);
|
|
313
|
-
break;
|
|
269
|
+
case 'Create':this.newComment(event.comment, true);break;
|
|
314
270
|
case 'Update':
|
|
315
|
-
if (this.commentList) {
|
|
316
|
-
this.commentList.updateComment(
|
|
271
|
+
if (this.$refs.commentList) {
|
|
272
|
+
(this.$refs.commentList as InstanceType<typeof CommentList>).updateComment(event);
|
|
317
273
|
} else {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
274
|
+
const updatedComment = this.comment;
|
|
275
|
+
let updatedStatus = "";
|
|
276
|
+
if (event.comment.status && event.comment.status !== event.oldStatus) {
|
|
277
|
+
updatedStatus = event.comment.status;
|
|
278
|
+
}
|
|
279
|
+
if(undefined !== updatedComment.relatedValidComments){
|
|
280
|
+
if ('Invalid' ===updatedStatus) {
|
|
281
|
+
updatedComment.relatedValidComments -= 1;
|
|
282
|
+
} else if ('Valid' === updatedStatus) {
|
|
283
|
+
updatedComment.relatedValidComments += 1;
|
|
284
|
+
}
|
|
323
285
|
}
|
|
324
286
|
this.$emit('update:comment', updatedComment);
|
|
325
287
|
}
|
|
326
288
|
break;
|
|
327
289
|
case 'Delete':
|
|
328
|
-
if (this.commentList) {
|
|
329
|
-
this.commentList.deleteComment(event.comment);
|
|
290
|
+
if (this.$refs.commentList) {
|
|
291
|
+
(this.$refs.commentList as InstanceType<typeof CommentList>).deleteComment(event.comment);
|
|
330
292
|
} else {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
updatedComment.relatedValidComments -= 1;
|
|
293
|
+
const deletedComment = this.comment;
|
|
294
|
+
if(undefined !== deletedComment.relatedComments){
|
|
295
|
+
deletedComment.relatedComments -= 1;
|
|
335
296
|
}
|
|
336
|
-
|
|
297
|
+
if (undefined !== deletedComment.relatedValidComments && 'Valid' === event.comment.status) {
|
|
298
|
+
deletedComment.relatedValidComments -= 1;
|
|
299
|
+
}
|
|
300
|
+
this.$emit('update:comment', deletedComment);
|
|
337
301
|
}
|
|
338
302
|
break;
|
|
339
303
|
default:
|
|
@@ -341,7 +305,5 @@ export default defineComponent({
|
|
|
341
305
|
}
|
|
342
306
|
},
|
|
343
307
|
},
|
|
344
|
-
|
|
345
|
-
watch: {},
|
|
346
|
-
});
|
|
308
|
+
})
|
|
347
309
|
</script>
|