@saooti/octopus-sdk 42.1.0 → 42.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.
Files changed (72) hide show
  1. package/dist/{CategoryPage-CsabctRT.mjs → CategoryPage-B_IUEC85.mjs} +2 -2
  2. package/dist/{CheckIdentityModal-fNecycn-.mjs → CheckIdentityModal-Du2Jqur2.mjs} +2 -2
  3. package/dist/CheckIdentityModal-Du2Jqur2.mjs.map +1 -0
  4. package/dist/{ClassicAlert-dYigdfoZ.mjs → ClassicAlert-DUQplMvs.mjs} +3 -3
  5. package/dist/{ClassicInputText-B7EAwP2N.mjs → ClassicInputText-D2wR2cwa.mjs} +2 -2
  6. package/dist/ClassicInputText-D2wR2cwa.mjs.map +1 -0
  7. package/dist/{ClassicWysiwyg-BKq8ExjM.mjs → ClassicWysiwyg-Bew6KMXn.mjs} +2 -2
  8. package/dist/ClassicWysiwyg-Bew6KMXn.mjs.map +1 -0
  9. package/dist/{CommentBasicView-bNaLVdjT.mjs → CommentBasicView-BIiF59xV.mjs} +3 -3
  10. package/dist/{CommentInput-B7qnp3is.mjs → CommentInput-DRmRcSy-.mjs} +3 -3
  11. package/dist/CommentInput-DRmRcSy-.mjs.map +1 -0
  12. package/dist/{CommentItem-DDCavfx_.mjs → CommentItem-Vvd1NE_W.mjs} +7 -7
  13. package/dist/CommentItem-Vvd1NE_W.mjs.map +1 -0
  14. package/dist/CommentItem-vMMaiTCB.mjs.map +1 -0
  15. package/dist/CommentList-BcFHoPtE.mjs.map +1 -0
  16. package/dist/{CommentList-BbEaau4S.mjs → CommentList-Cn5TPBet.mjs} +2 -2
  17. package/dist/CommentList-Cn5TPBet.mjs.map +1 -0
  18. package/dist/{CommentMoreActions-CB8419fO.mjs → CommentMoreActions-BR4CRRey.mjs} +3 -3
  19. package/dist/CommentMoreActions-BR4CRRey.mjs.map +1 -0
  20. package/dist/{CommentName-DFzxl7mU.mjs → CommentName-D6y51EaZ.mjs} +2 -2
  21. package/dist/CommentName-D6y51EaZ.mjs.map +1 -0
  22. package/dist/{CommentParentInfo-BDSceNbu.mjs → CommentParentInfo-0WKRt9an.mjs} +2 -2
  23. package/dist/{CommentSection-CfhzLqZE.mjs → CommentSection-CRfcutkV.mjs} +3 -3
  24. package/dist/CommentSection-CRfcutkV.mjs.map +1 -0
  25. package/dist/CommentSection-CsyPvXiH.mjs.map +1 -0
  26. package/dist/{EditCommentModal-7vDcLEPD.mjs → EditCommentModal-Bs7nuqdq.mjs} +2 -2
  27. package/dist/EditCommentModal-Bs7nuqdq.mjs.map +1 -0
  28. package/dist/{EmissionItem-9HFaHgWp.mjs → EmissionItem-CwxO_AWw.mjs} +4 -4
  29. package/dist/{EmissionList-Clu9bigG.mjs → EmissionList-DxnXwOri.mjs} +2 -2
  30. package/dist/{EmissionPage-DX_2HI0y.mjs → EmissionPage-DrTFNH8I.mjs} +6 -6
  31. package/dist/{EmissionsPage-CxLXKG5S.mjs → EmissionsPage-y9p63k_v.mjs} +2 -2
  32. package/dist/{ErrorMessage-DhSwu9H_.mjs → ErrorMessage-D2XAzxpC.mjs} +3 -3
  33. package/dist/{FooterSection-r3Ehg0kp.mjs → FooterSection-XGEgsnuF.mjs} +15 -11
  34. package/dist/FooterSection-XGEgsnuF.mjs.map +1 -0
  35. package/dist/{HomePage-C3t8bQ4X.mjs → HomePage-Dk595L99.mjs} +2 -2
  36. package/dist/{LikeSection-KEHYZ6eH.mjs → LikeSection-CComV07M.mjs} +2 -2
  37. package/dist/LikeSection-CComV07M.mjs.map +1 -0
  38. package/dist/{LiveHorizontalList-CiyK7eIx.mjs → LiveHorizontalList-ZPpLxrPr.mjs} +2 -2
  39. package/dist/{LiveList-DnEolyFx.mjs → LiveList-B0CuTJqy.mjs} +2 -2
  40. package/dist/{LivesPage-BjOGZLj4.mjs → LivesPage-3nPItQ68.mjs} +2 -2
  41. package/dist/{ParticipantInlineList-D13FKP63.mjs → ParticipantInlineList-CXt6fXdk.mjs} +2 -2
  42. package/dist/{ParticipantItem-NaOJtacr.mjs → ParticipantItem-DuNtN4xy.mjs} +3 -3
  43. package/dist/{ParticipantPage-CVDQ4I-p.mjs → ParticipantPage-CNxK2NDT.mjs} +2 -2
  44. package/dist/{ParticipantsPage-CxDl6EWr.mjs → ParticipantsPage-BRmwzzh-.mjs} +2 -2
  45. package/dist/{PlaylistPage-BrZuaX3e.mjs → PlaylistPage-DCMCB2S0.mjs} +2 -2
  46. package/dist/{PodcastFilterList-YdyFX695.mjs → PodcastFilterList-DC_MbmDG.mjs} +2 -2
  47. package/dist/{PodcastImage-CF7D3Alx.mjs → PodcastImage-Dk-1L3AQ.mjs} +2 -2
  48. package/dist/{PodcastInlineList-C_dvAa4O.mjs → PodcastInlineList-CIrrTrdd.mjs} +2 -2
  49. package/dist/{PodcastItem-C5U2vYiX.mjs → PodcastItem-BrCf4kZs.mjs} +3 -3
  50. package/dist/{PodcastList-Dkh7Kahu.mjs → PodcastList-0qKdtTwt.mjs} +2 -2
  51. package/dist/{PodcastList-BHOJTVqP.mjs → PodcastList-CmxUF9_N.mjs} +2 -2
  52. package/dist/{PodcastPage-CTwEe_n7.mjs → PodcastPage-BvRTyXh8.mjs} +7 -7
  53. package/dist/PodcastPage-BvRTyXh8.mjs.map +1 -0
  54. package/dist/PodcastPage-DlZWXScN.mjs.map +1 -0
  55. package/dist/{PodcastPlayButton--X67hSEO.mjs → PodcastPlayButton-D7YuFUWp.mjs} +3 -3
  56. package/dist/{PodcastPlaylistInlineList-Csf1PwTQ.mjs → PodcastPlaylistInlineList-Dx1iJbdA.mjs} +2 -2
  57. package/dist/{PodcastPresentationList-DSQebLtP.mjs → PodcastPresentationList-CaTtzsoH.mjs} +2 -2
  58. package/dist/{PodcastSwiperList-B6Rb4sb3.mjs → PodcastSwiperList-ByXlm62M.mjs} +2 -2
  59. package/dist/{PodcastsPage-BA8vFVBZ.mjs → PodcastsPage-C_-VnfGg.mjs} +2 -2
  60. package/dist/{ReportAbuseModal-Cn4dKNYU.mjs → ReportAbuseModal-Dhr0wNeN.mjs} +2 -2
  61. package/dist/ReportAbuseModal-Dhr0wNeN.mjs.map +1 -0
  62. package/dist/{RightsIndicator-DMZt2V0j.mjs → RightsIndicator-mnSeA5VR.mjs} +2 -2
  63. package/dist/{RubriquePage-Dh4NUQ2M.mjs → RubriquePage-D-4GhME5.mjs} +2 -2
  64. package/dist/{SearchPage-nupT1-eH.mjs → SearchPage-C3hFn5z8.mjs} +2 -2
  65. package/dist/{TagPage-DX0T8dNu.mjs → TagPage-DJ05ef4Y.mjs} +2 -2
  66. package/dist/{VideoPage-B1udtWP7.mjs → VideoPage-Dr-rwYv9.mjs} +2 -2
  67. package/dist/VideoPage-Dr-rwYv9.mjs.map +1 -0
  68. package/dist/VideoPage-Gr_u3MAh.mjs.map +1 -0
  69. package/dist/index.mjs +47 -47
  70. package/package.json +1 -1
  71. package/src/components/form/ClassicWysiwyg.vue +2 -4
  72. package/src/components/misc/FooterSection.vue +3 -1
@@ -1,7 +1,7 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
2
2
  import { r as useFilterStore } from "./classicApi-DpwVUC0E.mjs";
3
3
  import { t as useGeneralStore } from "./GeneralStore-CUlq_NjO.mjs";
4
- import { t as PodcastList_default } from "./PodcastList-Dkh7Kahu.mjs";
4
+ import { t as PodcastList_default } from "./PodcastList-0qKdtTwt.mjs";
5
5
  import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, watch } from "vue";
6
6
  //#region src/components/pages/CategoryPage.vue?vue&type=script&setup=true&lang.ts
7
7
  var CategoryPage_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
@@ -54,4 +54,4 @@ var CategoryPage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Categ
54
54
  //#endregion
55
55
  export { CategoryPage_default as default };
56
56
 
57
- //# sourceMappingURL=CategoryPage-CsabctRT.mjs.map
57
+ //# sourceMappingURL=CategoryPage-B_IUEC85.mjs.map
@@ -1,7 +1,7 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
2
2
  import { t as useCommentStore } from "./CommentStore-DAa7RQ_3.mjs";
3
3
  import { t as config_default } from "./config-C73GMJpz.mjs";
4
- import { t as ClassicInputText_default } from "./ClassicInputText-B7EAwP2N.mjs";
4
+ import { t as ClassicInputText_default } from "./ClassicInputText-D2wR2cwa.mjs";
5
5
  import { t as RecaptchaModal_default } from "./RecaptchaModal-CxDPhjIv.mjs";
6
6
  import { computed, createBlock, createVNode, defineComponent, openBlock, ref, withCtx } from "vue";
7
7
  import { useI18n } from "vue-i18n";
@@ -83,4 +83,4 @@ var CheckIdentityModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default
83
83
  //#endregion
84
84
  export { CheckIdentityModal_default as default };
85
85
 
86
- //# sourceMappingURL=CheckIdentityModal-fNecycn-.mjs.map
86
+ //# sourceMappingURL=CheckIdentityModal-Du2Jqur2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckIdentityModal-Du2Jqur2.mjs","names":[],"sources":["../src/components/display/comments/modal/CheckIdentityModal.vue","../src/components/display/comments/modal/CheckIdentityModal.vue"],"sourcesContent":["<template>\n <RecaptchaModal\n id-modal=\"check-identity-modal\"\n :title-modal=\"titleModal\"\n :disable-validate=\"errorName\"\n @close=\"emit('close')\"\n @validate=\"updateName\"\n >\n <template #form>\n <ClassicInputText\n v-model:text-init=\"name\"\n v-model:error-variable=\"errorName\"\n input-id=\"adserver-tag\"\n focus\n :label=\"t('Let\\'s get acquainted :')\"\n :max-length=\"Constants.MAX_COMMENT_NAME\"\n :placeholder=\"t('Your name')\"\n autocomplete-type=\"name\"\n />\n </template>\n </RecaptchaModal>\n</template>\n\n<script setup lang=\"ts\">\nimport Constants from \"../../../../../public/config\";\nimport ClassicInputText from \"../../../form/ClassicInputText.vue\";\nimport RecaptchaModal from \"./RecaptchaModal.vue\";\nimport { computed, Ref, ref } from \"vue\";\nimport { useCommentStore } from \"../../../../stores/CommentStore\";\nimport { useI18n } from \"vue-i18n\";\n\n\n//Props \nconst props = defineProps({\n title: { default: undefined, type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"close\", \"validate\"]);\n\n//Data \nconst errorName = ref(true);\nconst name: Ref<string | undefined> = ref(undefined);\n\n//Composables\nconst { t } = useI18n();\nconst commentStore = useCommentStore();\n\n\n//Computed\nconst titleModal = computed(() => props.title ?? t(\"Welcome, thanks for your comment\"));\n\n//Methods\nfunction updateName(): void {\n commentStore.setCommentUser(name.value ?? \"\");\n emit(\"validate\");\n}\n</script>\n","<template>\n <RecaptchaModal\n id-modal=\"check-identity-modal\"\n :title-modal=\"titleModal\"\n :disable-validate=\"errorName\"\n @close=\"emit('close')\"\n @validate=\"updateName\"\n >\n <template #form>\n <ClassicInputText\n v-model:text-init=\"name\"\n v-model:error-variable=\"errorName\"\n input-id=\"adserver-tag\"\n focus\n :label=\"t('Let\\'s get acquainted :')\"\n :max-length=\"Constants.MAX_COMMENT_NAME\"\n :placeholder=\"t('Your name')\"\n autocomplete-type=\"name\"\n />\n </template>\n </RecaptchaModal>\n</template>\n\n<script setup lang=\"ts\">\nimport Constants from \"../../../../../public/config\";\nimport ClassicInputText from \"../../../form/ClassicInputText.vue\";\nimport RecaptchaModal from \"./RecaptchaModal.vue\";\nimport { computed, Ref, ref } from \"vue\";\nimport { useCommentStore } from \"../../../../stores/CommentStore\";\nimport { useI18n } from \"vue-i18n\";\n\n\n//Props \nconst props = defineProps({\n title: { default: undefined, type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"close\", \"validate\"]);\n\n//Data \nconst errorName = ref(true);\nconst name: Ref<string | undefined> = ref(undefined);\n\n//Composables\nconst { t } = useI18n();\nconst commentStore = useCommentStore();\n\n\n//Computed\nconst titleModal = computed(() => props.title ?? t(\"Welcome, thanks for your comment\"));\n\n//Methods\nfunction updateName(): void {\n commentStore.setCommentUser(name.value ?? \"\");\n emit(\"validate\");\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAiCA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAGb,MAAM,YAAY,IAAI,IAAI;EAC1B,MAAM,OAAgC,IAAI,KAAA,CAAS;EAGnD,MAAM,EAAE,MAAM,QAAQ;EACtB,MAAM,eAAe,gBAAgB;EAIrC,MAAM,aAAa,eAAe,MAAM,SAAS,EAAE,kCAAkC,CAAC;EAGtF,SAAS,aAAmB;GAC1B,aAAa,eAAe,KAAK,SAAS,EAAE;GAC5C,KAAK,UAAU;EACjB;;;;;;;;;;;;;;;;;;;;;;;;;;qBCvDE,YAmBiB,OAAA,mBAAA;EAlBf,YAAS;EACR,eAAa,OAAA;EACb,oBAAkB,OAAA;EAClB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,KAAI,OAAA;EACX,YAAU,OAAA;;EAEA,MAAI,cAUX,CATF,YASE,OAAA,qBAAA;GARQ,aAAW,OAAA;8DAAA,OAAA,OAAI;GACf,kBAAgB,OAAA;mEAAA,OAAA,YAAS;GACjC,YAAS;GACT,OAAA;GACC,OAAO,OAAA,EAAC,wBAAA;GACR,cAAY,OAAA,UAAU;GACtB,aAAa,OAAA,EAAC,WAAA;GACf,qBAAkB"}
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
3
3
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString } from "vue";
4
- import Alert from "vue-material-design-icons/Alert.vue";
4
+ import AlertIcon from "vue-material-design-icons/Alert.vue";
5
5
  import CheckCircle from "vue-material-design-icons/CheckCircle.vue";
6
6
  import CloseCircle from "vue-material-design-icons/CloseCircle.vue";
7
7
  import Information from "vue-material-design-icons/Information.vue";
@@ -39,7 +39,7 @@ var ClassicAlert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
39
39
  iconComponent: computed(() => {
40
40
  if (__props.type === "info") return Information;
41
41
  else if (__props.type === "success") return CheckCircle;
42
- else if (__props.type === "warning") return Alert;
42
+ else if (__props.type === "warning") return AlertIcon;
43
43
  else if (__props.type === "error") return CloseCircle;
44
44
  else return null;
45
45
  })
@@ -82,4 +82,4 @@ var ClassicAlert_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Class
82
82
  //#endregion
83
83
  export { ClassicAlert_exports as n, ClassicAlert_default as t };
84
84
 
85
- //# sourceMappingURL=ClassicAlert-dYigdfoZ.mjs.map
85
+ //# sourceMappingURL=ClassicAlert-DUQplMvs.mjs.map
@@ -145,7 +145,7 @@ var ClassicInputText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
145
145
  setup(__props, { expose: __expose, emit: __emit }) {
146
146
  __expose();
147
147
  const ClassicPopover = defineAsyncComponent(() => import("./ClassicPopover-BIyLKorz.mjs").then((n) => n.n));
148
- const ClassicWysiwyg = defineAsyncComponent(() => import("./ClassicWysiwyg-BKq8ExjM.mjs"));
148
+ const ClassicWysiwyg = defineAsyncComponent(() => import("./ClassicWysiwyg-Bew6KMXn.mjs"));
149
149
  const ClassicEmojiPicker = defineAsyncComponent(() => import("./ClassicEmojiPicker-EQy5H_zL.mjs"));
150
150
  const props = __props;
151
151
  const emit = __emit;
@@ -368,4 +368,4 @@ var ClassicInputText_default = /*#__PURE__*/ _plugin_vue_export_helper_default(C
368
368
  //#endregion
369
369
  export { ClassicInputText_exports as n, ClassicInputText_default as t };
370
370
 
371
- //# sourceMappingURL=ClassicInputText-B7EAwP2N.mjs.map
371
+ //# sourceMappingURL=ClassicInputText-D2wR2cwa.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassicInputText-D2wR2cwa.mjs","names":[],"sources":["../src/components/form/ClassicInputText.vue","../src/components/form/ClassicInputText.vue"],"sourcesContent":["<template>\n <div\n class=\"d-flex flex-column classic-input-text\"\n :class=\"{ 'form-margin': displayLabel }\"\n >\n <div class=\"d-flex align-items-center\">\n <slot name=\"complementLabel\" />\n <component\n :is=\"isWysiwyg? 'div': 'label'\"\n :class=\"[classLabel, displayLabel ? '' : 'd-none']\"\n :for=\"isWysiwyg ? '': computedInputId\"\n >\n {{ label }}\n <AsteriskIcon\n v-if=\"displayRequired\"\n :size=\"10\"\n class=\"ms-1 mb-2\"\n :title=\"t('Mandatory input')\"\n />\n </component>\n <slot name=\"afterTitle\" />\n <template v-if=\"popover\">\n <button\n :id=\"'popover' + computedInputId\"\n :title=\"t('Help')\"\n class=\"btn-transparent\"\n >\n <HelpCircleIcon :size=\"30\" />\n </button>\n\n <ClassicPopover\n :target=\"'popover' + computedInputId\"\n popover-class=\"popover-z-index\"\n :relative-class=\"popoverRelativeClass\"\n >\n <!-- eslint-disable vue/no-v-html -->\n <div v-html=\"popover\" />\n <!-- eslint-enable -->\n </ClassicPopover>\n </template>\n <slot name=\"afterHelp\" />\n </div>\n <slot name=\"betweenTitleInput\" />\n <input\n v-if=\"!isWysiwyg && !isTextarea\"\n v-show=\"showField\"\n :id=\"computedInputId\"\n ref=\"focusElement\"\n v-model=\"textValue\"\n :type=\"typeInput\"\n class=\"form-input\"\n :placeholder=\"placeholder\"\n :data-selenium=\"dataSelenium\"\n :data-value=\"textValue\"\n :maxlength=\"inputMaxLengthField\"\n :readonly=\"readonly ? 'readonly' : undefined\"\n :class=\"{\n 'border border-danger':\n forceError || (isError && (undefined !== textValue || canBeNull)),\n }\"\n :disabled=\"isDisable || disabled\"\n :required=\"!canBeNull\"\n :aria-required=\"!canBeNull\"\n :autocomplete=\"autocompleteType\"\n @blur=\"emit('blur')\"\n >\n <textarea\n v-else-if=\"isTextarea\"\n v-show=\"showField\"\n :id=\"computedInputId\"\n ref=\"focusElement\"\n v-model=\"textValue\"\n :data-selenium=\"dataSelenium\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly ? 'readonly' : undefined\"\n class=\"form-input\"\n :class=\"{\n 'border border-danger':\n forceError || (isError && (undefined !== textValue || canBeNull)),\n }\"\n :disabled=\"isDisable || disabled\"\n :required=\"!canBeNull\"\n />\n <ClassicWysiwyg\n v-else\n v-show=\"showField\"\n v-model:content=\"textValue\"\n :error-description=\"\n forceError || (isError && (undefined !== textValue || canBeNull))\n \"\n :is-disabled=\"isDisable || disabled\"\n />\n <div class=\"d-flex\">\n <ClassicEmojiPicker\n v-if=\"isEmojiPicker\"\n :popover-relative-class=\"popoverRelativeClass\"\n :is-top-position=\"true\"\n @emoji-selected=\"addEmojiSelected\"\n />\n <div\n v-if=\"isWysiwyg\"\n class=\"h6\"\n >\n {{ t(\"Characters number calculated over HTML code\") }}\n </div>\n <div\n v-else-if=\"'' !== indicText\"\n class=\"text-indic\"\n >\n {{ indicText }}\n </div>\n <div\n v-else-if=\"\n forceError || (isError && (undefined !== textValue || canBeNull))\n \"\n class=\"text-danger\"\n >\n {{ errorText }}\n </div>\n <p\n v-if=\"0 !== maxLength && showField\"\n class=\"counter-align-right\"\n :class=\"{ 'text-danger': !valueLengthValid }\"\n >\n {{ countValue + \" / \" + maxLength }}\n </p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport AsteriskIcon from \"vue-material-design-icons/Asterisk.vue\";\nimport HelpCircleIcon from \"vue-material-design-icons/HelpCircle.vue\";\nimport { computed, defineAsyncComponent, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch, getCurrentInstance } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nconst ClassicPopover = defineAsyncComponent(\n () => import(\"../misc/ClassicPopover.vue\"),\n);\nconst ClassicWysiwyg = defineAsyncComponent(\n () => import(\"./ClassicWysiwyg.vue\"),\n);\nconst ClassicEmojiPicker = defineAsyncComponent(\n () => import(\"./ClassicEmojiPicker.vue\"),\n);\n\n//Props \nconst props = defineProps({\n inputId: { default: \"\", type: String },\n label: { default: \"\", type: String },\n /** The input's value */\n textInit: { default: undefined, type: String },\n maxLength: { default: 0, type: Number },\n errorText: { default: \"\", type: String },\n isTextarea: { default: false, type: Boolean },\n isWysiwyg: { default: false, type: Boolean },\n /** A regex checked against the input, if the input doesn't match mark it with error */\n regex: { default: undefined, type: RegExp },\n canBeNull: { default: false, type: Boolean },\n inputMaxLengthField: { default: undefined, type: Number },\n errorVariable: { default: true, type: Boolean },\n /**\n * Disable the text input\n * @deprecated Use `disabled` instead\n */\n isDisable: { default: false, type: Boolean },\n /**\n * Disable the text input\n */\n disabled: { default: false, type: Boolean },\n indicText: { default: \"\", type: String },\n dataSelenium: { default: \"\", type: String },\n placeholder: { default: \"\", type: String },\n popover: { default: undefined, type: String },\n /**\n * Display content but do not allow changes\n */\n readonly: { default: false, type: Boolean },\n forceError: { default: false, type: Boolean },\n displayLabel: { default: true, type: Boolean },\n focus: { default: false, type: Boolean },\n isEmojiPicker: { default: false, type: Boolean },\n popoverRelativeClass: { default: undefined, type: String },\n forceReload: { default: false, type: Boolean },\n typeInput: { default: \"text\", type: String },\n displayRequired: { default: false, type: Boolean },\n classLabel: { default: \"form-label\", type: String },\n showField: { default: true, type: Boolean },\n autocompleteType: { default: \"off\", type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"update:textInit\", \"update:errorVariable\", \"blur\"]);\n\n//Data \nconst textValue : Ref<string | undefined>= ref(undefined);\nconst focusElementRef = useTemplateRef('focusElement');\n\n//Composables \nconst { t } = useI18n();\n\n//Computed\nconst computedInputId = computed(() => props.inputId || 'input-' + getCurrentInstance()?.uid);\nconst isError = computed(() => !valueTrimValid.value || !valueLengthValid.value || !valueRegexValid.value);\nconst countValue = computed(() => {\n if (textValue.value) {\n return textValue.value.length;\n }\n return 0;\n});\nconst valueTrimValid = computed(() => {\n if (!props.canBeNull) {\n if (!textValue.value) {\n return false;\n }\n return 0 !== textValue.value.trim().length;\n }\n return true;\n});\nconst valueLengthValid = computed(() => {\n if (0 === props.maxLength) {\n return true;\n }\n return props.maxLength >= countValue.value;\n});\nconst valueRegexValid = computed(() => {\n if (props.regex === undefined) {\n return true;\n }\n if (!textValue.value || \"\" === textValue.value) {\n return props.canBeNull;\n }\n return textValue.value.match(props.regex) !== null;\n});\n \n//Watch\nwatch(()=>props.forceReload, () => {\n if (props.textInit !== textValue.value) {\n textValue.value = props.textInit;\n }\n});\nwatch(isError, () => {\n emit(\"update:errorVariable\", isError.value);\n});\nwatch(textValue, () => {\n if (props.textInit !== textValue.value) {\n emit(\"update:textInit\", textValue.value);\n }\n});\nwatch(()=>props.textInit, () => {\n if (props.textInit !== textValue.value) {\n textValue.value = props.textInit;\n }\n});\n\n\nonMounted(()=>{\n if (props.focus) {\n (focusElementRef?.value as HTMLElement)?.focus();\n }\n textValue.value = props.textInit;\n if (props.errorVariable !== isError.value) {\n emit(\"update:errorVariable\", isError.value);\n }\n\n if (props.isTextarea) {\n // Delay a scroll back to the top of the text area\n scrollTimer = setTimeout(() => {\n const textArea = document.getElementById(computedInputId.value);\n if (textArea) {\n textArea.scrollTop = 0;\n }\n }, 100);\n }\n});\n\nlet scrollTimer: ReturnType<typeof setTimeout> | undefined;\nonUnmounted(() => {\n clearTimeout(scrollTimer);\n});\n \n//Methods\nfunction addEmojiSelected(emoji: string) {\n textValue.value = (textValue.value ?? \"\") + emoji;\n}\n</script>\n\n<style lang=\"scss\">\n.octopus-app .classic-input-text {\n .text-indic {\n font-style: italic;\n font-size: 0.7rem;\n color: var(--octopus-gray-text);\n }\n\n textarea {\n height: auto;\n min-height: 120px;\n }\n}\n</style>\n","<template>\n <div\n class=\"d-flex flex-column classic-input-text\"\n :class=\"{ 'form-margin': displayLabel }\"\n >\n <div class=\"d-flex align-items-center\">\n <slot name=\"complementLabel\" />\n <component\n :is=\"isWysiwyg? 'div': 'label'\"\n :class=\"[classLabel, displayLabel ? '' : 'd-none']\"\n :for=\"isWysiwyg ? '': computedInputId\"\n >\n {{ label }}\n <AsteriskIcon\n v-if=\"displayRequired\"\n :size=\"10\"\n class=\"ms-1 mb-2\"\n :title=\"t('Mandatory input')\"\n />\n </component>\n <slot name=\"afterTitle\" />\n <template v-if=\"popover\">\n <button\n :id=\"'popover' + computedInputId\"\n :title=\"t('Help')\"\n class=\"btn-transparent\"\n >\n <HelpCircleIcon :size=\"30\" />\n </button>\n\n <ClassicPopover\n :target=\"'popover' + computedInputId\"\n popover-class=\"popover-z-index\"\n :relative-class=\"popoverRelativeClass\"\n >\n <!-- eslint-disable vue/no-v-html -->\n <div v-html=\"popover\" />\n <!-- eslint-enable -->\n </ClassicPopover>\n </template>\n <slot name=\"afterHelp\" />\n </div>\n <slot name=\"betweenTitleInput\" />\n <input\n v-if=\"!isWysiwyg && !isTextarea\"\n v-show=\"showField\"\n :id=\"computedInputId\"\n ref=\"focusElement\"\n v-model=\"textValue\"\n :type=\"typeInput\"\n class=\"form-input\"\n :placeholder=\"placeholder\"\n :data-selenium=\"dataSelenium\"\n :data-value=\"textValue\"\n :maxlength=\"inputMaxLengthField\"\n :readonly=\"readonly ? 'readonly' : undefined\"\n :class=\"{\n 'border border-danger':\n forceError || (isError && (undefined !== textValue || canBeNull)),\n }\"\n :disabled=\"isDisable || disabled\"\n :required=\"!canBeNull\"\n :aria-required=\"!canBeNull\"\n :autocomplete=\"autocompleteType\"\n @blur=\"emit('blur')\"\n >\n <textarea\n v-else-if=\"isTextarea\"\n v-show=\"showField\"\n :id=\"computedInputId\"\n ref=\"focusElement\"\n v-model=\"textValue\"\n :data-selenium=\"dataSelenium\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly ? 'readonly' : undefined\"\n class=\"form-input\"\n :class=\"{\n 'border border-danger':\n forceError || (isError && (undefined !== textValue || canBeNull)),\n }\"\n :disabled=\"isDisable || disabled\"\n :required=\"!canBeNull\"\n />\n <ClassicWysiwyg\n v-else\n v-show=\"showField\"\n v-model:content=\"textValue\"\n :error-description=\"\n forceError || (isError && (undefined !== textValue || canBeNull))\n \"\n :is-disabled=\"isDisable || disabled\"\n />\n <div class=\"d-flex\">\n <ClassicEmojiPicker\n v-if=\"isEmojiPicker\"\n :popover-relative-class=\"popoverRelativeClass\"\n :is-top-position=\"true\"\n @emoji-selected=\"addEmojiSelected\"\n />\n <div\n v-if=\"isWysiwyg\"\n class=\"h6\"\n >\n {{ t(\"Characters number calculated over HTML code\") }}\n </div>\n <div\n v-else-if=\"'' !== indicText\"\n class=\"text-indic\"\n >\n {{ indicText }}\n </div>\n <div\n v-else-if=\"\n forceError || (isError && (undefined !== textValue || canBeNull))\n \"\n class=\"text-danger\"\n >\n {{ errorText }}\n </div>\n <p\n v-if=\"0 !== maxLength && showField\"\n class=\"counter-align-right\"\n :class=\"{ 'text-danger': !valueLengthValid }\"\n >\n {{ countValue + \" / \" + maxLength }}\n </p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport AsteriskIcon from \"vue-material-design-icons/Asterisk.vue\";\nimport HelpCircleIcon from \"vue-material-design-icons/HelpCircle.vue\";\nimport { computed, defineAsyncComponent, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch, getCurrentInstance } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nconst ClassicPopover = defineAsyncComponent(\n () => import(\"../misc/ClassicPopover.vue\"),\n);\nconst ClassicWysiwyg = defineAsyncComponent(\n () => import(\"./ClassicWysiwyg.vue\"),\n);\nconst ClassicEmojiPicker = defineAsyncComponent(\n () => import(\"./ClassicEmojiPicker.vue\"),\n);\n\n//Props \nconst props = defineProps({\n inputId: { default: \"\", type: String },\n label: { default: \"\", type: String },\n /** The input's value */\n textInit: { default: undefined, type: String },\n maxLength: { default: 0, type: Number },\n errorText: { default: \"\", type: String },\n isTextarea: { default: false, type: Boolean },\n isWysiwyg: { default: false, type: Boolean },\n /** A regex checked against the input, if the input doesn't match mark it with error */\n regex: { default: undefined, type: RegExp },\n canBeNull: { default: false, type: Boolean },\n inputMaxLengthField: { default: undefined, type: Number },\n errorVariable: { default: true, type: Boolean },\n /**\n * Disable the text input\n * @deprecated Use `disabled` instead\n */\n isDisable: { default: false, type: Boolean },\n /**\n * Disable the text input\n */\n disabled: { default: false, type: Boolean },\n indicText: { default: \"\", type: String },\n dataSelenium: { default: \"\", type: String },\n placeholder: { default: \"\", type: String },\n popover: { default: undefined, type: String },\n /**\n * Display content but do not allow changes\n */\n readonly: { default: false, type: Boolean },\n forceError: { default: false, type: Boolean },\n displayLabel: { default: true, type: Boolean },\n focus: { default: false, type: Boolean },\n isEmojiPicker: { default: false, type: Boolean },\n popoverRelativeClass: { default: undefined, type: String },\n forceReload: { default: false, type: Boolean },\n typeInput: { default: \"text\", type: String },\n displayRequired: { default: false, type: Boolean },\n classLabel: { default: \"form-label\", type: String },\n showField: { default: true, type: Boolean },\n autocompleteType: { default: \"off\", type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"update:textInit\", \"update:errorVariable\", \"blur\"]);\n\n//Data \nconst textValue : Ref<string | undefined>= ref(undefined);\nconst focusElementRef = useTemplateRef('focusElement');\n\n//Composables \nconst { t } = useI18n();\n\n//Computed\nconst computedInputId = computed(() => props.inputId || 'input-' + getCurrentInstance()?.uid);\nconst isError = computed(() => !valueTrimValid.value || !valueLengthValid.value || !valueRegexValid.value);\nconst countValue = computed(() => {\n if (textValue.value) {\n return textValue.value.length;\n }\n return 0;\n});\nconst valueTrimValid = computed(() => {\n if (!props.canBeNull) {\n if (!textValue.value) {\n return false;\n }\n return 0 !== textValue.value.trim().length;\n }\n return true;\n});\nconst valueLengthValid = computed(() => {\n if (0 === props.maxLength) {\n return true;\n }\n return props.maxLength >= countValue.value;\n});\nconst valueRegexValid = computed(() => {\n if (props.regex === undefined) {\n return true;\n }\n if (!textValue.value || \"\" === textValue.value) {\n return props.canBeNull;\n }\n return textValue.value.match(props.regex) !== null;\n});\n \n//Watch\nwatch(()=>props.forceReload, () => {\n if (props.textInit !== textValue.value) {\n textValue.value = props.textInit;\n }\n});\nwatch(isError, () => {\n emit(\"update:errorVariable\", isError.value);\n});\nwatch(textValue, () => {\n if (props.textInit !== textValue.value) {\n emit(\"update:textInit\", textValue.value);\n }\n});\nwatch(()=>props.textInit, () => {\n if (props.textInit !== textValue.value) {\n textValue.value = props.textInit;\n }\n});\n\n\nonMounted(()=>{\n if (props.focus) {\n (focusElementRef?.value as HTMLElement)?.focus();\n }\n textValue.value = props.textInit;\n if (props.errorVariable !== isError.value) {\n emit(\"update:errorVariable\", isError.value);\n }\n\n if (props.isTextarea) {\n // Delay a scroll back to the top of the text area\n scrollTimer = setTimeout(() => {\n const textArea = document.getElementById(computedInputId.value);\n if (textArea) {\n textArea.scrollTop = 0;\n }\n }, 100);\n }\n});\n\nlet scrollTimer: ReturnType<typeof setTimeout> | undefined;\nonUnmounted(() => {\n clearTimeout(scrollTimer);\n});\n \n//Methods\nfunction addEmojiSelected(emoji: string) {\n textValue.value = (textValue.value ?? \"\") + emoji;\n}\n</script>\n\n<style lang=\"scss\">\n.octopus-app .classic-input-text {\n .text-indic {\n font-style: italic;\n font-size: 0.7rem;\n color: var(--octopus-gray-text);\n }\n\n textarea {\n height: auto;\n min-height: 120px;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIA,MAAM,iBAAiB,2BACf,OAAO,iCAAA,MAAA,MAAA,EAAA,CAAA,CACf;EACA,MAAM,iBAAiB,2BACf,OAAO,gCACf;EACA,MAAM,qBAAqB,2BACnB,OAAO,oCACf;EAGA,MAAM,QAAQ;EA6Cd,MAAM,OAAO;EAGb,MAAM,YAAqC,IAAI,KAAA,CAAS;EACxD,MAAM,kBAAkB,eAAe,cAAc;EAGrD,MAAM,EAAE,MAAM,QAAQ;EAGtB,MAAM,kBAAkB,eAAe,MAAM,WAAW,WAAW,mBAAmB,GAAG,GAAG;EAC5F,MAAM,UAAU,eAAe,CAAC,eAAe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GlF,eAAa,OAAA,aAAa,OAAA;;;;;gBALnB,OAAA,SAAS,CAAA,CAAA;EAOnB,mBAkCM,OAlCN,YAkCM;GAhCI,OAAA,iBAAA,UAAA,GADR,YAKE,OAAA,uBAAA;;IAHC,0BAAwB,OAAA;IACxB,mBAAiB;IACjB,iBAAgB,OAAA;;GAGX,OAAA,aAAA,UAAA,GADR,mBAKM,OALN,YAKM,gBADD,OAAA,EAAC,6CAAA,CAAA,GAAA,CAAA,KAAA,OAGc,OAAA,aAAA,UAAA,GADpB,mBAKM,OALN,YAKM,gBADD,OAAA,SAAS,GAAA,CAAA,KAGU,OAAA,cAAe,OAAA,YAAY,KAAA,MAAc,OAAA,aAAa,OAAA,cAAA,UAAA,GAD9E,mBAOM,OAPN,YAOM,gBADD,OAAA,SAAS,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA;SAGA,OAAA,aAAa,OAAA,aAAA,UAAA,GAD3B,mBAMI,KAAA;;IAJF,OAAK,eAAA,CAAC,uBAAqB,EAAA,eAAA,CACD,OAAA,iBAAgB,CAAA,CAAA;sBAEvC,OAAA,aAAU,QAAW,OAAA,SAAS,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA"}
@@ -12,7 +12,7 @@ import FormatListNumberedIcon from "vue-material-design-icons/FormatListNumbered
12
12
  import { Editor, EditorContent } from "@tiptap/vue-3";
13
13
  import StarterKit from "@tiptap/starter-kit";
14
14
  import Underline from "@tiptap/extension-underline";
15
- import TextStyle from "@tiptap/extension-text-style";
15
+ import { TextStyle } from "@tiptap/extension-text-style";
16
16
  import Link from "@tiptap/extension-link";
17
17
  import HardBreak from "@tiptap/extension-hard-break";
18
18
  //#region src/components/form/ClassicWysiwyg.vue?vue&type=script&setup=true&lang.ts
@@ -227,4 +227,4 @@ var ClassicWysiwyg_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Cla
227
227
  //#endregion
228
228
  export { ClassicWysiwyg_default as default };
229
229
 
230
- //# sourceMappingURL=ClassicWysiwyg-BKq8ExjM.mjs.map
230
+ //# sourceMappingURL=ClassicWysiwyg-Bew6KMXn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassicWysiwyg-Bew6KMXn.mjs","names":[],"sources":["../src/components/form/ClassicWysiwyg.vue","../src/components/form/ClassicWysiwyg.vue"],"sourcesContent":["<template>\n <div class=\"wysiwyg-editor\">\n <div v-if=\"editor\" class=\"editor-menubar\">\n <button\n :title=\"t('Bold')\"\n data-selenium=\"Bold\"\n :class=\"{ 'is-active': editor.isActive('bold') }\"\n @click=\"editor.chain().focus().toggleBold().run()\"\n >\n <FormatBoldIcon />\n </button>\n <button\n :title=\"t('Italic')\"\n data-selenium=\"Italic\"\n :class=\"{ 'is-active': editor.isActive('italic') }\"\n @click=\"editor.chain().focus().toggleItalic().run()\"\n >\n <FormatItalicIcon />\n </button>\n <button\n :title=\"t('Underline')\"\n data-selenium=\"Underline\"\n :class=\"{ 'is-active': editor.isActive('underline') }\"\n @click=\"editor.chain().focus().toggleUnderline().run()\"\n >\n <FormatUnderlineIcon />\n </button>\n <button\n :title=\"t('Link')\"\n data-selenium=\"link\"\n :class=\"{ 'is-active': editor.isActive('link') }\"\n @click=\"setLink\"\n >\n <LinkVariantIcon />\n </button>\n <button\n :title=\"t('Delete link')\"\n data-selenium=\"unlink\"\n :disabled=\"!editor.isActive('link')\"\n @click=\"editor.chain().focus().unsetLink().run()\"\n >\n <LinkVariantOffIcon />\n </button>\n <button\n :title=\"t('Heading3')\"\n data-selenium=\"Heading3\"\n :class=\"{ 'is-active': editor.isActive('heading', { level: 3 }) }\"\n @click=\"editor.chain().focus().toggleHeading({ level: 3 }).run()\"\n >\n H3\n </button>\n <button\n :title=\"t('Heading4')\"\n data-selenium=\"Heading4\"\n :class=\"{ 'is-active': editor.isActive('heading', { level: 4 }) }\"\n @click=\"editor.chain().focus().toggleHeading({ level: 4 }).run()\"\n >\n H4\n </button>\n <button\n :title=\"t('Line break')\"\n data-selenium=\"lineBreak\"\n @click=\"editor.chain().focus().setHardBreak().run()\"\n >\n <KeyboardReturnIcon />\n </button>\n\n <button\n :title=\"t('UnorderedList')\"\n data-selenium=\"UnorderedList\"\n :class=\"{ 'is-active': editor.isActive('bulletList') }\"\n @click=\"editor.chain().focus().toggleBulletList().run()\"\n >\n <FormatListBulletedIcon />\n </button>\n <button\n :title=\"t('List')\"\n data-selenium=\"List\"\n :class=\"{ 'is-active': editor.isActive('orderedList') }\"\n @click=\"editor.chain().focus().toggleOrderedList().run()\"\n >\n <FormatListNumberedIcon />\n </button>\n <button\n :title=\"t('Display HTML')\"\n data-selenium=\"Display-HTML\"\n class=\"html-button\"\n :class=\"{ 'is-active': isHtmlDisplay }\"\n @click=\"isHtmlDisplay = !isHtmlDisplay\"\n >\n HTML\n </button>\n </div>\n <editor-content\n v-if=\"!isHtmlDisplay\"\n class=\"form-input html-wysiwyg-content\"\n :class=\"{\n 'border border-danger': errorDescription,\n disabled: isDisabled,\n }\"\n :editor=\"editor\"\n />\n <pre\n v-else\n class=\"form-input\"\n :class=\"{\n 'border border-danger': errorDescription,\n disabled: isDisabled,\n }\"\n ><code>{{ html }}</code></pre>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport FormatBoldIcon from \"vue-material-design-icons/FormatBold.vue\";\nimport FormatItalicIcon from \"vue-material-design-icons/FormatItalic.vue\";\nimport FormatUnderlineIcon from \"vue-material-design-icons/FormatUnderline.vue\";\nimport LinkVariantIcon from \"vue-material-design-icons/LinkVariant.vue\";\nimport LinkVariantOffIcon from \"vue-material-design-icons/LinkVariantOff.vue\";\nimport KeyboardReturnIcon from \"vue-material-design-icons/KeyboardReturn.vue\";\nimport FormatListBulletedIcon from \"vue-material-design-icons/FormatListBulleted.vue\";\nimport FormatListNumberedIcon from \"vue-material-design-icons/FormatListNumbered.vue\";\nimport { EditorContent, Editor } from \"@tiptap/vue-3\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport Underline from \"@tiptap/extension-underline\";\nimport { TextStyle } from \"@tiptap/extension-text-style\";\nimport Link from \"@tiptap/extension-link\";\nimport HardBreak from \"@tiptap/extension-hard-break\";\nimport { onMounted, onUnmounted, Ref, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\n\n//Props \nconst props = defineProps({\n content: { default: undefined, type: String },\n errorDescription: { default: false, type: Boolean },\n isDisabled: { default: false, type: Boolean },\n})\n\n//Emits\nconst emit = defineEmits([\"update:content\"]);\n\n//Data \nconst isHtmlDisplay = ref(false);\nconst html = ref(props.content);\nconst editor: Ref<Editor | null> = ref(null);\n\n//Composables\nconst { t } = useI18n();\n\n\n//Watch\nwatch(()=>props.content,() => {\n if (props.content === html.value) {\n return;\n }\n initContent();\n});\nwatch(()=>props.isDisabled,() => {\n if (editor.value) {\n editor.value.setOptions({\n editable: true !== props.isDisabled,\n });\n }\n});\n\nonMounted(()=>{\n editor.value = new Editor({\n extensions: [\n StarterKit,\n Underline,\n TextStyle,\n Link.configure({\n openOnClick: false,\n }),\n HardBreak,\n ],\n content: \"\",\n editable: true !== props.isDisabled,\n onUpdate: updateHtml,\n });\n initContent();\n})\n\nonUnmounted(()=>{\n if (editor.value) {\n editor.value.destroy();\n }\n})\n\n//Methods\nfunction initContent(): void {\n if (undefined !== props.content && editor.value && !editor.value.isFocused) {\n editor.value.commands.setContent(props.content);\n html.value = editor.value.getHTML();\n }\n}\nfunction updateHtml(): void {\n if (!editor.value) {return}\n const plainText= editor.value.getText();\n const regexHtml = /<(a|b|h3|h4|em|i|li|ol|p|strong|ul|u|br|span).*?/i\n if(regexHtml.test(plainText)){\n editor.value.commands.setContent(plainText);\n }\n html.value = editor.value.getHTML().trim();\n const htmlHeart = html.value.substring(3, html.value.length - 4);\n if (\n html.value.startsWith(\"<p>\") &&\n html.value.endsWith(\"</p>\") &&\n !regexHtml.test(htmlHeart)\n ) {\n html.value = htmlHeart;\n }\n html.value = html.value.replaceAll(\"&nbsp;\", \" \");\n emit(\"update:content\", html.value);\n}\nfunction setLink() {\n if (!editor.value) {\n return;\n }\n const previousUrl = editor.value.getAttributes(\"link\").href;\n const url = window.prompt(\"URL\", previousUrl);\n if (!url) {\n return;\n }\n if (\"\" === url) {\n editor.value.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n return;\n }\n editor.value\n .chain()\n .focus()\n .extendMarkRange(\"link\")\n .setLink({ href: url })\n .run();\n}\n</script>\n\n<style lang=\"scss\">\n.octopus-app {\n .wysiwyg-editor {\n .form-input {\n height: 200px;\n display: flex;\n }\n\n pre {\n background: var(--octopus-secondary);\n margin: 0;\n }\n\n code {\n display: block;\n white-space: pre-wrap;\n width: 0;\n flex-grow: 1;\n overflow: auto;\n }\n\n .editor-menubar {\n display: flex;\n padding: 0.2rem;\n flex-wrap: wrap;\n\n button {\n width: 40px;\n height: 40px;\n background: var(--octopus-secondary);\n border-width: 0;\n border-radius: var(--octopus-border-radius);\n margin: 0.2rem;\n padding: 0;\n font-size: 1.1rem;\n font-weight: 600;\n\n &:hover,\n &.is-active {\n background: var(--octopus-primary-transparent);\n }\n }\n\n .html-button {\n font-size: 12px;\n }\n\n svg {\n width: 40px;\n height: 40px;\n }\n }\n /* stylelint-disable-next-line */\n .ProseMirror {\n width: 0;\n flex-grow: 1;\n overflow: auto;\n }\n }\n}\n</style>\n","<template>\n <div class=\"wysiwyg-editor\">\n <div v-if=\"editor\" class=\"editor-menubar\">\n <button\n :title=\"t('Bold')\"\n data-selenium=\"Bold\"\n :class=\"{ 'is-active': editor.isActive('bold') }\"\n @click=\"editor.chain().focus().toggleBold().run()\"\n >\n <FormatBoldIcon />\n </button>\n <button\n :title=\"t('Italic')\"\n data-selenium=\"Italic\"\n :class=\"{ 'is-active': editor.isActive('italic') }\"\n @click=\"editor.chain().focus().toggleItalic().run()\"\n >\n <FormatItalicIcon />\n </button>\n <button\n :title=\"t('Underline')\"\n data-selenium=\"Underline\"\n :class=\"{ 'is-active': editor.isActive('underline') }\"\n @click=\"editor.chain().focus().toggleUnderline().run()\"\n >\n <FormatUnderlineIcon />\n </button>\n <button\n :title=\"t('Link')\"\n data-selenium=\"link\"\n :class=\"{ 'is-active': editor.isActive('link') }\"\n @click=\"setLink\"\n >\n <LinkVariantIcon />\n </button>\n <button\n :title=\"t('Delete link')\"\n data-selenium=\"unlink\"\n :disabled=\"!editor.isActive('link')\"\n @click=\"editor.chain().focus().unsetLink().run()\"\n >\n <LinkVariantOffIcon />\n </button>\n <button\n :title=\"t('Heading3')\"\n data-selenium=\"Heading3\"\n :class=\"{ 'is-active': editor.isActive('heading', { level: 3 }) }\"\n @click=\"editor.chain().focus().toggleHeading({ level: 3 }).run()\"\n >\n H3\n </button>\n <button\n :title=\"t('Heading4')\"\n data-selenium=\"Heading4\"\n :class=\"{ 'is-active': editor.isActive('heading', { level: 4 }) }\"\n @click=\"editor.chain().focus().toggleHeading({ level: 4 }).run()\"\n >\n H4\n </button>\n <button\n :title=\"t('Line break')\"\n data-selenium=\"lineBreak\"\n @click=\"editor.chain().focus().setHardBreak().run()\"\n >\n <KeyboardReturnIcon />\n </button>\n\n <button\n :title=\"t('UnorderedList')\"\n data-selenium=\"UnorderedList\"\n :class=\"{ 'is-active': editor.isActive('bulletList') }\"\n @click=\"editor.chain().focus().toggleBulletList().run()\"\n >\n <FormatListBulletedIcon />\n </button>\n <button\n :title=\"t('List')\"\n data-selenium=\"List\"\n :class=\"{ 'is-active': editor.isActive('orderedList') }\"\n @click=\"editor.chain().focus().toggleOrderedList().run()\"\n >\n <FormatListNumberedIcon />\n </button>\n <button\n :title=\"t('Display HTML')\"\n data-selenium=\"Display-HTML\"\n class=\"html-button\"\n :class=\"{ 'is-active': isHtmlDisplay }\"\n @click=\"isHtmlDisplay = !isHtmlDisplay\"\n >\n HTML\n </button>\n </div>\n <editor-content\n v-if=\"!isHtmlDisplay\"\n class=\"form-input html-wysiwyg-content\"\n :class=\"{\n 'border border-danger': errorDescription,\n disabled: isDisabled,\n }\"\n :editor=\"editor\"\n />\n <pre\n v-else\n class=\"form-input\"\n :class=\"{\n 'border border-danger': errorDescription,\n disabled: isDisabled,\n }\"\n ><code>{{ html }}</code></pre>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport FormatBoldIcon from \"vue-material-design-icons/FormatBold.vue\";\nimport FormatItalicIcon from \"vue-material-design-icons/FormatItalic.vue\";\nimport FormatUnderlineIcon from \"vue-material-design-icons/FormatUnderline.vue\";\nimport LinkVariantIcon from \"vue-material-design-icons/LinkVariant.vue\";\nimport LinkVariantOffIcon from \"vue-material-design-icons/LinkVariantOff.vue\";\nimport KeyboardReturnIcon from \"vue-material-design-icons/KeyboardReturn.vue\";\nimport FormatListBulletedIcon from \"vue-material-design-icons/FormatListBulleted.vue\";\nimport FormatListNumberedIcon from \"vue-material-design-icons/FormatListNumbered.vue\";\nimport { EditorContent, Editor } from \"@tiptap/vue-3\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport Underline from \"@tiptap/extension-underline\";\nimport { TextStyle } from \"@tiptap/extension-text-style\";\nimport Link from \"@tiptap/extension-link\";\nimport HardBreak from \"@tiptap/extension-hard-break\";\nimport { onMounted, onUnmounted, Ref, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\n\n//Props \nconst props = defineProps({\n content: { default: undefined, type: String },\n errorDescription: { default: false, type: Boolean },\n isDisabled: { default: false, type: Boolean },\n})\n\n//Emits\nconst emit = defineEmits([\"update:content\"]);\n\n//Data \nconst isHtmlDisplay = ref(false);\nconst html = ref(props.content);\nconst editor: Ref<Editor | null> = ref(null);\n\n//Composables\nconst { t } = useI18n();\n\n\n//Watch\nwatch(()=>props.content,() => {\n if (props.content === html.value) {\n return;\n }\n initContent();\n});\nwatch(()=>props.isDisabled,() => {\n if (editor.value) {\n editor.value.setOptions({\n editable: true !== props.isDisabled,\n });\n }\n});\n\nonMounted(()=>{\n editor.value = new Editor({\n extensions: [\n StarterKit,\n Underline,\n TextStyle,\n Link.configure({\n openOnClick: false,\n }),\n HardBreak,\n ],\n content: \"\",\n editable: true !== props.isDisabled,\n onUpdate: updateHtml,\n });\n initContent();\n})\n\nonUnmounted(()=>{\n if (editor.value) {\n editor.value.destroy();\n }\n})\n\n//Methods\nfunction initContent(): void {\n if (undefined !== props.content && editor.value && !editor.value.isFocused) {\n editor.value.commands.setContent(props.content);\n html.value = editor.value.getHTML();\n }\n}\nfunction updateHtml(): void {\n if (!editor.value) {return}\n const plainText= editor.value.getText();\n const regexHtml = /<(a|b|h3|h4|em|i|li|ol|p|strong|ul|u|br|span).*?/i\n if(regexHtml.test(plainText)){\n editor.value.commands.setContent(plainText);\n }\n html.value = editor.value.getHTML().trim();\n const htmlHeart = html.value.substring(3, html.value.length - 4);\n if (\n html.value.startsWith(\"<p>\") &&\n html.value.endsWith(\"</p>\") &&\n !regexHtml.test(htmlHeart)\n ) {\n html.value = htmlHeart;\n }\n html.value = html.value.replaceAll(\"&nbsp;\", \" \");\n emit(\"update:content\", html.value);\n}\nfunction setLink() {\n if (!editor.value) {\n return;\n }\n const previousUrl = editor.value.getAttributes(\"link\").href;\n const url = window.prompt(\"URL\", previousUrl);\n if (!url) {\n return;\n }\n if (\"\" === url) {\n editor.value.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n return;\n }\n editor.value\n .chain()\n .focus()\n .extendMarkRange(\"link\")\n .setLink({ href: url })\n .run();\n}\n</script>\n\n<style lang=\"scss\">\n.octopus-app {\n .wysiwyg-editor {\n .form-input {\n height: 200px;\n display: flex;\n }\n\n pre {\n background: var(--octopus-secondary);\n margin: 0;\n }\n\n code {\n display: block;\n white-space: pre-wrap;\n width: 0;\n flex-grow: 1;\n overflow: auto;\n }\n\n .editor-menubar {\n display: flex;\n padding: 0.2rem;\n flex-wrap: wrap;\n\n button {\n width: 40px;\n height: 40px;\n background: var(--octopus-secondary);\n border-width: 0;\n border-radius: var(--octopus-border-radius);\n margin: 0.2rem;\n padding: 0;\n font-size: 1.1rem;\n font-weight: 600;\n\n &:hover,\n &.is-active {\n background: var(--octopus-primary-transparent);\n }\n }\n\n .html-button {\n font-size: 12px;\n }\n\n svg {\n width: 40px;\n height: 40px;\n }\n }\n /* stylelint-disable-next-line */\n .ProseMirror {\n width: 0;\n flex-grow: 1;\n overflow: auto;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoIA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAGb,MAAM,gBAAgB,IAAI,KAAK;EAC/B,MAAM,OAAO,IAAI,MAAM,OAAO;EAC9B,MAAM,SAA6B,IAAI,IAAI;EAG3C,MAAM,EAAE,MAAM,QAAQ;EAItB,YAAU,MAAM,eAAc;GAC5B,IAAI,MAAM,YAAY,KAAK,OACzB;GAEF,YAAY;EACd,CAAC;EACD,YAAU,MAAM,kBAAiB;GAC/B,IAAI,OAAO,OACT,OAAO,MAAM,WAAW,EACtB,UAAU,SAAS,MAAM,WAC3B,CAAC;EAEL,CAAC;EAED,gBAAc;GACZ,OAAO,QAAQ,IAAI,OAAO;IACxB,YAAY;KACV;KACA;KACA;KACA,KAAK,UAAU,EACb,aAAa,MACf,CAAC;KACD;IACF;IACA,SAAS;IACT,UAAU,SAAS,MAAM;IACzB,UAAU;GACZ,CAAC;GACD,YAAY;EACd,CAAC;EAED,kBAAgB;GACd,IAAI,OAAO,OACT,OAAO,MAAM,QAAQ;EAEzB,CAAC;EAGD,SAAS,cAAoB;GAC3B,IAAI,KAAA,MAAc,MAAM,WAAW,OAAO,SAAS,CAAC,OAAO,MAAM,WAAW;IAC1E,OAAO,MAAM,SAAS,WAAW,MAAM,OAAO;IAC9C,KAAK,QAAQ,OAAO,MAAM,QAAQ;GACpC;EACF;EACA,SAAS,aAAmB;GAC1B,IAAI,CAAC,OAAO,OAAQ;GACpB,MAAM,YAAW,OAAO,MAAM,QAAQ;GACtC,MAAM,YAAY;GAClB,IAAG,UAAU,KAAK,SAAS,GACzB,OAAO,MAAM,SAAS,WAAW,SAAS;GAE5C,KAAK,QAAQ,OAAO,MAAM,QAAQ,EAAE,KAAK;GACzC,MAA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A,GADT,YAQE,OAAA,kBAAA;;EANA,OAAK,eAAA,CAAC,mCAAiC;2BACG,OAAA;aAAoC,OAAA;;EAI7E,QAAQ,OAAA;mDAEX,mBAO8B,OAAA;;EAL5B,OAAK,eAAA,CAAC,cAAY;2BACwB,OAAA;aAAoC,OAAA;;KAI/E,mBAAuB,QAAA,MAAA,gBAAd,OAAA,IAAI,GAAA,CAAA,CAAA,GAAA,CAAA,EAAA,CAAA"}
@@ -5,7 +5,7 @@ import { computed, createCommentVNode, createElementBlock, createElementVNode, c
5
5
  import { useI18n } from "vue-i18n";
6
6
  import dayjs from "dayjs";
7
7
  import relativeTime from "dayjs/plugin/relativeTime";
8
- import Alert from "vue-material-design-icons/Alert.vue";
8
+ import AlertIcon from "vue-material-design-icons/Alert.vue";
9
9
  //#region src/components/display/comments/item/CommentBasicView.vue?vue&type=script&setup=true&lang.ts
10
10
  var CommentBasicView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
11
11
  __name: "CommentBasicView",
@@ -62,7 +62,7 @@ var CommentBasicView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
62
62
  contentDisplay,
63
63
  urlify,
64
64
  defineDateFromNow,
65
- AlertIcon: Alert,
65
+ AlertIcon,
66
66
  ClassicPopover: ClassicPopover_default
67
67
  };
68
68
  Object.defineProperty(__returned__, "__isScriptSetup", {
@@ -126,4 +126,4 @@ var CommentBasicView_default = /*#__PURE__*/ _plugin_vue_export_helper_default(C
126
126
  //#endregion
127
127
  export { CommentBasicView_default as t };
128
128
 
129
- //# sourceMappingURL=CommentBasicView-bNaLVdjT.mjs.map
129
+ //# sourceMappingURL=CommentBasicView-BIiF59xV.mjs.map
@@ -25,8 +25,8 @@ var CommentInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
25
25
  emits: ["cancelAction", "newComment"],
26
26
  setup(__props, { expose: __expose, emit: __emit }) {
27
27
  __expose();
28
- const CheckIdentityModal = defineAsyncComponent(() => import("./CheckIdentityModal-fNecycn-.mjs"));
29
- const CommentName = defineAsyncComponent(() => import("./CommentName-DFzxl7mU.mjs"));
28
+ const CheckIdentityModal = defineAsyncComponent(() => import("./CheckIdentityModal-Du2Jqur2.mjs"));
29
+ const CommentName = defineAsyncComponent(() => import("./CommentName-D6y51EaZ.mjs"));
30
30
  const MessageModal = defineAsyncComponent(() => import("./MessageModal-B35dCbWB.mjs").then((n) => n.n));
31
31
  const ClassicEmojiPicker = defineAsyncComponent(() => import("./ClassicEmojiPicker-EQy5H_zL.mjs"));
32
32
  const ClassicContentEditable = defineAsyncComponent(() => import("./ClassicContentEditable-BSsnA6oo.mjs"));
@@ -183,4 +183,4 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Comme
183
183
  //#endregion
184
184
  export { CommentInput_default as default };
185
185
 
186
- //# sourceMappingURL=CommentInput-B7qnp3is.mjs.map
186
+ //# sourceMappingURL=CommentInput-DRmRcSy-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentInput-DRmRcSy-.mjs","names":[],"sources":["../src/components/display/comments/CommentInput.vue","../src/components/display/comments/CommentInput.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column comment-input-container mt-3\">\n <CommentName v-if=\"commentStore.commentUser?.name\" />\n <ClassicContentEditable\n ref=\"textarea\"\n v-model=\"newComment\"\n class=\"comment-input\"\n :placeholder=\"placeholder\"\n @focus=\"isTextareaActive = true\"\n />\n <div v-if=\"isTextareaActive\" class=\"d-flex justify-content-between mt-1\">\n <ClassicEmojiPicker\n :id=\"uniqueId\"\n popover-relative-class=\"page-element\"\n @emoji-selected=\"addEmojiSelected\"\n />\n <div class=\"d-flex ms-auto\">\n <p\n class=\"d-flex justify-content-end h6 me-3\"\n :class=\"{ 'text-danger': !commentTooLong }\"\n >\n {{ countComment + \" / \" + maxComment }}\n </p>\n <button class=\"btn me-2\" @mousedown=\"cancelAction\">\n {{ t(\"Cancel\") }}\n </button>\n <button\n class=\"btn btn-primary\"\n :disabled=\"0 === countComment || !commentTooLong\"\n @mousedown=\"requestToSend\"\n >\n {{ placeholder }}\n </button>\n </div>\n </div>\n <CheckIdentityModal\n v-if=\"isCheckIdentity\"\n @validate=\"postComment\"\n @close=\"isCheckIdentity = false\"\n />\n <MessageModal\n v-if=\"postError\"\n :validatetext=\"t('Close')\"\n :title=\"t('Error')\"\n :message=\"t('Error occurs while post your comment...')\"\n @close=\"postError = false\"\n @validate=\"postError = false\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport classicApi from \"../../../api/classicApi\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport Constants from \"../../../../public/config\";\nimport { defineAsyncComponent, ref, computed, watch, useTemplateRef } from \"vue\";\nimport { useCommentStore } from \"../../../stores/CommentStore\";\nimport { usePlayerStore } from \"../../../stores/PlayerStore\";\nimport { useAuthStore } from \"../../../stores/AuthStore\";\nimport { useI18n } from \"vue-i18n\";\nconst CheckIdentityModal = defineAsyncComponent(\n () => import(\"./modal/CheckIdentityModal.vue\"),\n);\nconst CommentName = defineAsyncComponent(() => import(\"./CommentName.vue\"));\nconst MessageModal = defineAsyncComponent(\n () => import(\"../../misc/modal/MessageModal.vue\"),\n);\nconst ClassicEmojiPicker = defineAsyncComponent(\n () => import(\"../../form/ClassicEmojiPicker.vue\"),\n);\nconst ClassicContentEditable = defineAsyncComponent(\n () => import(\"../../form/ClassicContentEditable.vue\"),\n);\n\n//Props \nconst props = defineProps({\n podcast: { default: undefined, type: Object as () => Podcast },\n focus: { default: false, type: Boolean },\n inAnswerComment: {\n default: undefined,\n type: Object as () => CommentPodcast,\n },\n})\n\n//Emits\nconst emit = defineEmits([\"cancelAction\", \"newComment\"]);\n\n//Data \nconst maxComment = Constants.MAX_COMMENT;\nconst newComment = ref(\"\");\nconst isTextareaActive = ref(false);\nconst isCheckIdentity = ref(false);\nconst postError = ref(false);\nconst textareaRef = useTemplateRef('textarea');\n\n//Composables\nconst { t } = useI18n();\nconst playerStore = usePlayerStore();\nconst commentStore = useCommentStore();\nconst authStore = useAuthStore();\n\n//Computed\nconst commentTooLong = computed(() => countComment.value <= maxComment);\nconst countComment = computed(() => newComment.value.length);\nconst placeholder = computed(() => props.inAnswerComment?.commentId? t(\"Answer a comment\"): t(\"Write a comment\"));\nconst uniqueId = computed(() => \"-comment\"+(props.inAnswerComment?.commentId??\"-parent\"));\n\n\n//Watch\nwatch(()=>props.focus, () => textareaRef?.value?.focus());\n\n\n//Methods\nfunction addEmojiSelected(emoji: string) {\n newComment.value += emoji;\n}\nfunction requestToSend(): void {\n if (commentStore.commentUser?.name) {\n postComment();\n } else {\n isCheckIdentity.value = true;\n }\n}\nfunction cancelAction(): void {\n newComment.value = \"\";\n isTextareaActive.value = false;\n emit(\"cancelAction\");\n}\nasync function postComment(): Promise<void> {\n try {\n const commentReceived = await classicApi.postData<CommentPodcast>({\n api: 2,\n path: \"comment/\",\n dataToSend: {\n answerTo: props.inAnswerComment?.commentId,\n content: newComment.value.trim(),\n name: commentStore.commentUser?.name ?? \"\",\n podcastId:\n props.podcast?.podcastId ?? props.inAnswerComment?.podcastId ?? 0,\n uuid: commentStore.commentUser?.uuid ?? \"\",\n timeline: defineTimelineValue(),\n },\n isNotAuth: undefined === authStore.authOrgaId,\n });\n emit(\"newComment\", commentReceived);\n newComment.value = \"\";\n isTextareaActive.value = false;\n } catch {\n postError.value = true;\n }\n isCheckIdentity.value = false;\n}\nfunction defineTimelineValue(): number {\n let timeline = 0;\n if (\n undefined !== props.podcast &&\n (playerStore.playerPodcast?.podcastId === props.podcast.podcastId ||\n playerStore.playerLive?.podcastId === props.podcast.podcastId)\n ) {\n timeline = Math.round(playerStore.playerElapsed * playerStore.playerTotal);\n if (props.podcast.duration && playerStore.playerPodcast) {\n timeline = Math.round(\n timeline - (playerStore.playerTotal - props.podcast.duration / 1000),\n );\n }\n }\n return timeline < 0 ? 0 : timeline;\n}\n</script>\n\n<style lang=\"scss\">\n.octopus-app .comment-input-container {\n .comment-input {\n border-bottom: 0.1rem solid var(--octopus-border-default);\n overflow: hidden;\n min-height: 36px;\n resize: none;\n }\n}\n</style>\n","<template>\n <div class=\"d-flex flex-column comment-input-container mt-3\">\n <CommentName v-if=\"commentStore.commentUser?.name\" />\n <ClassicContentEditable\n ref=\"textarea\"\n v-model=\"newComment\"\n class=\"comment-input\"\n :placeholder=\"placeholder\"\n @focus=\"isTextareaActive = true\"\n />\n <div v-if=\"isTextareaActive\" class=\"d-flex justify-content-between mt-1\">\n <ClassicEmojiPicker\n :id=\"uniqueId\"\n popover-relative-class=\"page-element\"\n @emoji-selected=\"addEmojiSelected\"\n />\n <div class=\"d-flex ms-auto\">\n <p\n class=\"d-flex justify-content-end h6 me-3\"\n :class=\"{ 'text-danger': !commentTooLong }\"\n >\n {{ countComment + \" / \" + maxComment }}\n </p>\n <button class=\"btn me-2\" @mousedown=\"cancelAction\">\n {{ t(\"Cancel\") }}\n </button>\n <button\n class=\"btn btn-primary\"\n :disabled=\"0 === countComment || !commentTooLong\"\n @mousedown=\"requestToSend\"\n >\n {{ placeholder }}\n </button>\n </div>\n </div>\n <CheckIdentityModal\n v-if=\"isCheckIdentity\"\n @validate=\"postComment\"\n @close=\"isCheckIdentity = false\"\n />\n <MessageModal\n v-if=\"postError\"\n :validatetext=\"t('Close')\"\n :title=\"t('Error')\"\n :message=\"t('Error occurs while post your comment...')\"\n @close=\"postError = false\"\n @validate=\"postError = false\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport classicApi from \"../../../api/classicApi\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport Constants from \"../../../../public/config\";\nimport { defineAsyncComponent, ref, computed, watch, useTemplateRef } from \"vue\";\nimport { useCommentStore } from \"../../../stores/CommentStore\";\nimport { usePlayerStore } from \"../../../stores/PlayerStore\";\nimport { useAuthStore } from \"../../../stores/AuthStore\";\nimport { useI18n } from \"vue-i18n\";\nconst CheckIdentityModal = defineAsyncComponent(\n () => import(\"./modal/CheckIdentityModal.vue\"),\n);\nconst CommentName = defineAsyncComponent(() => import(\"./CommentName.vue\"));\nconst MessageModal = defineAsyncComponent(\n () => import(\"../../misc/modal/MessageModal.vue\"),\n);\nconst ClassicEmojiPicker = defineAsyncComponent(\n () => import(\"../../form/ClassicEmojiPicker.vue\"),\n);\nconst ClassicContentEditable = defineAsyncComponent(\n () => import(\"../../form/ClassicContentEditable.vue\"),\n);\n\n//Props \nconst props = defineProps({\n podcast: { default: undefined, type: Object as () => Podcast },\n focus: { default: false, type: Boolean },\n inAnswerComment: {\n default: undefined,\n type: Object as () => CommentPodcast,\n },\n})\n\n//Emits\nconst emit = defineEmits([\"cancelAction\", \"newComment\"]);\n\n//Data \nconst maxComment = Constants.MAX_COMMENT;\nconst newComment = ref(\"\");\nconst isTextareaActive = ref(false);\nconst isCheckIdentity = ref(false);\nconst postError = ref(false);\nconst textareaRef = useTemplateRef('textarea');\n\n//Composables\nconst { t } = useI18n();\nconst playerStore = usePlayerStore();\nconst commentStore = useCommentStore();\nconst authStore = useAuthStore();\n\n//Computed\nconst commentTooLong = computed(() => countComment.value <= maxComment);\nconst countComment = computed(() => newComment.value.length);\nconst placeholder = computed(() => props.inAnswerComment?.commentId? t(\"Answer a comment\"): t(\"Write a comment\"));\nconst uniqueId = computed(() => \"-comment\"+(props.inAnswerComment?.commentId??\"-parent\"));\n\n\n//Watch\nwatch(()=>props.focus, () => textareaRef?.value?.focus());\n\n\n//Methods\nfunction addEmojiSelected(emoji: string) {\n newComment.value += emoji;\n}\nfunction requestToSend(): void {\n if (commentStore.commentUser?.name) {\n postComment();\n } else {\n isCheckIdentity.value = true;\n }\n}\nfunction cancelAction(): void {\n newComment.value = \"\";\n isTextareaActive.value = false;\n emit(\"cancelAction\");\n}\nasync function postComment(): Promise<void> {\n try {\n const commentReceived = await classicApi.postData<CommentPodcast>({\n api: 2,\n path: \"comment/\",\n dataToSend: {\n answerTo: props.inAnswerComment?.commentId,\n content: newComment.value.trim(),\n name: commentStore.commentUser?.name ?? \"\",\n podcastId:\n props.podcast?.podcastId ?? props.inAnswerComment?.podcastId ?? 0,\n uuid: commentStore.commentUser?.uuid ?? \"\",\n timeline: defineTimelineValue(),\n },\n isNotAuth: undefined === authStore.authOrgaId,\n });\n emit(\"newComment\", commentReceived);\n newComment.value = \"\";\n isTextareaActive.value = false;\n } catch {\n postError.value = true;\n }\n isCheckIdentity.value = false;\n}\nfunction defineTimelineValue(): number {\n let timeline = 0;\n if (\n undefined !== props.podcast &&\n (playerStore.playerPodcast?.podcastId === props.podcast.podcastId ||\n playerStore.playerLive?.podcastId === props.podcast.podcastId)\n ) {\n timeline = Math.round(playerStore.playerElapsed * playerStore.playerTotal);\n if (props.podcast.duration && playerStore.playerPodcast) {\n timeline = Math.round(\n timeline - (playerStore.playerTotal - props.podcast.duration / 1000),\n );\n }\n }\n return timeline < 0 ? 0 : timeline;\n}\n</script>\n\n<style lang=\"scss\">\n.octopus-app .comment-input-container {\n .comment-input {\n border-bottom: 0.1rem solid var(--octopus-border-default);\n overflow: hidden;\n min-height: 36px;\n resize: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DA,MAAM,qBAAqB,2BACnB,OAAO,oCACf;EACA,MAAM,cAAc,2BAA2B,OAAO,6BAAoB;EAC1E,MAAM,eAAe,2BACb,OAAO,+BAAA,MAAA,MAAA,EAAA,CAAA,CACf;EACA,MAAM,qBAAqB,2BACnB,OAAO,oCACf;EACA,MAAM,yBAAyB,2BACvB,OAAO,wCACf;EAGA,MAAM,QAAQ;EAUd,MAAM,OAAO;EAGb,MAAM,aAAa,eAAU;EAC7B,MAAM,aAAa,IAAI,EAAE;EACzB,MAAM,mBAAmB,IAAI,KAAK;EAClC,MAAM,kBAAkB,IAAI,KAAK;EACjC,MAAM,YAAY,IAAI,KAAK;EAC3B,MAAM,cAAc,eAAe,UAAU;EAG7C,MAAM,EA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;;EAGjB,OAAA,aAAA,UAAA,GADR,YAOE,OAAA,iBAAA;;GALC,cAAc,OAAA,EAAC,OAAA;GACf,OAAO,OAAA,EAAC,OAAA;GACR,SAAS,OAAA,EAAC,yCAAA;GACV,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,YAAS;GAChB,YAAQ,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,YAAS"}
@@ -1,7 +1,7 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
2
2
  import { i as useAuthStore } from "./classicApi-DpwVUC0E.mjs";
3
3
  import { t as useCommentStore } from "./CommentStore-DAa7RQ_3.mjs";
4
- import { t as CommentBasicView_default } from "./CommentBasicView-bNaLVdjT.mjs";
4
+ import { t as CommentBasicView_default } from "./CommentBasicView-BIiF59xV.mjs";
5
5
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, normalizeClass, openBlock, ref, toDisplayString } from "vue";
6
6
  import { useI18n } from "vue-i18n";
7
7
  import ChevronDownIcon from "vue-material-design-icons/ChevronDown.vue";
@@ -32,11 +32,11 @@ var CommentItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
32
32
  },
33
33
  emits: ["deleteComment", "update:comment"],
34
34
  setup(__props, { expose: __expose, emit: __emit }) {
35
- const CommentInput = defineAsyncComponent(() => import("./CommentInput-B7qnp3is.mjs"));
36
- const CommentParentInfo = defineAsyncComponent(() => import("./CommentParentInfo-BDSceNbu.mjs"));
37
- const LikeSection = defineAsyncComponent(() => import("./LikeSection-KEHYZ6eH.mjs"));
38
- const CommentMoreActions = defineAsyncComponent(() => import("./CommentMoreActions-CB8419fO.mjs"));
39
- const CommentList = defineAsyncComponent(() => import("./CommentList-BbEaau4S.mjs"));
35
+ const CommentInput = defineAsyncComponent(() => import("./CommentInput-DRmRcSy-.mjs"));
36
+ const CommentParentInfo = defineAsyncComponent(() => import("./CommentParentInfo-0WKRt9an.mjs"));
37
+ const LikeSection = defineAsyncComponent(() => import("./LikeSection-CComV07M.mjs"));
38
+ const CommentMoreActions = defineAsyncComponent(() => import("./CommentMoreActions-BR4CRRey.mjs"));
39
+ const CommentList = defineAsyncComponent(() => import("./CommentList-Cn5TPBet.mjs"));
40
40
  const props = __props;
41
41
  const emit = __emit;
42
42
  const isAnsweringComment = ref(false);
@@ -229,4 +229,4 @@ var CommentItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Commen
229
229
  //#endregion
230
230
  export { CommentItem_default as default };
231
231
 
232
- //# sourceMappingURL=CommentItem-DDCavfx_.mjs.map
232
+ //# sourceMappingURL=CommentItem-Vvd1NE_W.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentItem-Vvd1NE_W.mjs","names":[],"sources":["../src/components/display/comments/item/CommentItem.vue","../src/components/display/comments/item/CommentItem.vue"],"sourcesContent":["<template>\n <div\n class=\"d-flex flex-column flex-grow-1 w-100 really-light-secondary-bg\"\n :class=\"isAnAnswer && !isFlatList ? 'my-1 p-0' : 'my-3 p-2'\"\n >\n <div class=\"d-flex flex-nowrap justify-content-between align-items-center\">\n <CommentBasicView :comment=\"comment\" :edit-right=\"editRight\" />\n <CommentMoreActions\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n :config=\"config\"\n @delete-comment=\"emitDeleteComment\"\n />\n </div>\n <template v-if=\"isValidComment\">\n <div class=\"d-flex align-items-center mt-1\">\n <LikeSection\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n />\n <button\n v-if=\"!comment.answerTo && canPostComment\"\n class=\"btn btn-transparent\"\n @click=\"answerComment\"\n >\n {{ t(\"To answer\") }}\n </button>\n <button\n v-if=\"isFlatList && comment.answerTo\"\n class=\"btn btn-transparent d-flex align-items-center\"\n @click=\"showParentComment = !showParentComment\"\n >\n {{ t(\"In response to\") }}\n <ChevronDownIcon :class=\"{ 'arrow-transform': showParentComment }\" />\n </button>\n </div>\n <CommentInput\n v-if=\"isAnsweringComment && canPostComment\"\n class=\"ms-4\"\n :focus=\"focus\"\n :podcast=\"podcast\"\n :in-answer-comment=\"comment\"\n @cancel-action=\"isAnsweringComment = false\"\n @new-comment=\"newComment\"\n />\n <div\n v-if=\"comment.responses?.length && !isFlatList\"\n class=\"ms-4 mt-2 answers-section\"\n >\n <button\n class=\"d-flex align-items-center btn-transparent text-primary\"\n @click=\"showAnswers = !showAnswers\"\n >\n <ChevronDownIcon :class=\"{ 'arrow-transform': showAnswers }\" />\n {{ t(\"nb answers\", { nb: comment.responses.length }) }}\n </button>\n <CommentList\n v-if=\"showAnswers\"\n ref=\"commentList\"\n :podcast=\"podcast\"\n :size=\"5\"\n :answer-to-comment=\"comment.commentId\"\n :config=\"config\"\n :event-to-handle=\"eventToHandle\"\n @comment-deleted=\"updateForAnswerDeleted\"\n />\n </div>\n </template>\n <CommentParentInfo\n v-if=\"showParentComment\"\n class=\"ms-4\"\n :comment-id=\"comment.answerTo\"\n :edit-right=\"editRight\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport ChevronDownIcon from \"vue-material-design-icons/ChevronDown.vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"../../../../stores/class/general/podcast\";\nimport CommentBasicView from \"./CommentBasicView.vue\";\nimport { useCommentStore } from \"../../../../stores/CommentStore\";\nimport { useAuthStore } from \"../../../../stores/AuthStore\";\nimport { defineAsyncComponent, ref, Ref, computed } from \"vue\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"../../../../stores/class/config/commentsConfig\";\nimport { useI18n } from \"vue-i18n\";\nconst CommentInput = defineAsyncComponent(() => import(\"../CommentInput.vue\"));\nconst CommentParentInfo = defineAsyncComponent(\n () => import(\"../CommentParentInfo.vue\"),\n);\nconst LikeSection = defineAsyncComponent(\n () => import(\"../like/LikeSection.vue\"),\n);\nconst CommentMoreActions = defineAsyncComponent(\n () => import(\"./CommentMoreActions.vue\"),\n);\nconst CommentList = defineAsyncComponent(() => import(\"../CommentList.vue\"));\n\n\n//Props \nconst props = defineProps({\n comment: { default: () => ({}), type: Object as () => CommentPodcast },\n podcast: { default: undefined, type: Object as () => Podcast },\n isFlatList: { default: false, type: Boolean },\n config: { default: undefined, type: Object as () => CommentsConfig },\n organisationId: { default: undefined, type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"deleteComment\", \"update:comment\"]);\n\n//Data \nconst isAnsweringComment = ref(false);\nconst showAnswers = ref(false);\nconst focus = ref(false);\nconst showParentComment = ref(false);\nconst eventToHandle : Ref<CommentMessage | undefined>= ref(undefined);\n\n//Composables\nconst { t } = useI18n();\nconst authStore = useAuthStore();\nconst commentStore = useCommentStore();\n\n\n//Computed\nconst commentForVmodel = computed({\n get(): CommentPodcast {\n return props.comment;\n },\n set(value: CommentPodcast) {\n if (!eventActive.value) {\n emit(\"update:comment\", value);\n }\n },\n});\nconst isAnAnswer = computed(() => undefined !== props.comment.answerTo);\nconst editRight = computed(() => {\n return (\n (true === authStore.isRoleComments &&\n (authStore.authOrgaId === props.podcast?.organisation.id ||\n authStore.authOrgaId === props.organisationId)) ||\n true === authStore.isRoleAdmin\n );\n});\nconst isValidComment = computed(() => \"VALIDATED\" === props.comment.state);\nconst canPostComment = computed(() => {\n return commentStore.getCanPostComment(\n props.config,\n props.podcast,\n undefined !== authStore.authOrgaId,\n );\n});\nconst eventActive = computed(() => undefined !== props.podcast?.conferenceId);\n\n \n//Methods\nfunction answerComment(): void {\n isAnsweringComment.value = true;\n focus.value = !focus.value;\n}\nfunction newComment(comment: CommentPodcast): void {\n modifyAnswerNumber(comment.commentId);\n if (!eventActive.value) {\n eventToHandle.value = { type: \"CREATE\", comment: comment };\n }\n isAnsweringComment.value = false;\n}\nfunction modifyAnswerNumber(commentId: number, isAdd = true) {\n const commentToEdit = props.comment;\n if (commentToEdit.responses) {\n if (isAdd) {\n commentToEdit.responses.push(commentId);\n } else {\n const index = commentToEdit.responses.indexOf(commentId);\n if (index !== -1) {\n commentToEdit.responses.splice(index, 1);\n }\n }\n } else if (isAdd) {\n commentToEdit.responses = [commentId];\n }\n emit(\"update:comment\", commentToEdit);\n}\nfunction emitDeleteComment() {\n if (!eventActive.value) {\n emit(\"deleteComment\");\n }\n}\nfunction receiveEvent(event: CommentMessage) {\n if (\"CREATE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId);\n } else if (\"DELETE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId, false);\n }\n eventToHandle.value = event;\n}\nfunction updateForAnswerDeleted(commentId: number) {\n modifyAnswerNumber(commentId, false);\n}\n//Expose\ndefineExpose({\n receiveEvent\n});\n</script>\n","<template>\n <div\n class=\"d-flex flex-column flex-grow-1 w-100 really-light-secondary-bg\"\n :class=\"isAnAnswer && !isFlatList ? 'my-1 p-0' : 'my-3 p-2'\"\n >\n <div class=\"d-flex flex-nowrap justify-content-between align-items-center\">\n <CommentBasicView :comment=\"comment\" :edit-right=\"editRight\" />\n <CommentMoreActions\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n :config=\"config\"\n @delete-comment=\"emitDeleteComment\"\n />\n </div>\n <template v-if=\"isValidComment\">\n <div class=\"d-flex align-items-center mt-1\">\n <LikeSection\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n />\n <button\n v-if=\"!comment.answerTo && canPostComment\"\n class=\"btn btn-transparent\"\n @click=\"answerComment\"\n >\n {{ t(\"To answer\") }}\n </button>\n <button\n v-if=\"isFlatList && comment.answerTo\"\n class=\"btn btn-transparent d-flex align-items-center\"\n @click=\"showParentComment = !showParentComment\"\n >\n {{ t(\"In response to\") }}\n <ChevronDownIcon :class=\"{ 'arrow-transform': showParentComment }\" />\n </button>\n </div>\n <CommentInput\n v-if=\"isAnsweringComment && canPostComment\"\n class=\"ms-4\"\n :focus=\"focus\"\n :podcast=\"podcast\"\n :in-answer-comment=\"comment\"\n @cancel-action=\"isAnsweringComment = false\"\n @new-comment=\"newComment\"\n />\n <div\n v-if=\"comment.responses?.length && !isFlatList\"\n class=\"ms-4 mt-2 answers-section\"\n >\n <button\n class=\"d-flex align-items-center btn-transparent text-primary\"\n @click=\"showAnswers = !showAnswers\"\n >\n <ChevronDownIcon :class=\"{ 'arrow-transform': showAnswers }\" />\n {{ t(\"nb answers\", { nb: comment.responses.length }) }}\n </button>\n <CommentList\n v-if=\"showAnswers\"\n ref=\"commentList\"\n :podcast=\"podcast\"\n :size=\"5\"\n :answer-to-comment=\"comment.commentId\"\n :config=\"config\"\n :event-to-handle=\"eventToHandle\"\n @comment-deleted=\"updateForAnswerDeleted\"\n />\n </div>\n </template>\n <CommentParentInfo\n v-if=\"showParentComment\"\n class=\"ms-4\"\n :comment-id=\"comment.answerTo\"\n :edit-right=\"editRight\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport ChevronDownIcon from \"vue-material-design-icons/ChevronDown.vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"../../../../stores/class/general/podcast\";\nimport CommentBasicView from \"./CommentBasicView.vue\";\nimport { useCommentStore } from \"../../../../stores/CommentStore\";\nimport { useAuthStore } from \"../../../../stores/AuthStore\";\nimport { defineAsyncComponent, ref, Ref, computed } from \"vue\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"../../../../stores/class/config/commentsConfig\";\nimport { useI18n } from \"vue-i18n\";\nconst CommentInput = defineAsyncComponent(() => import(\"../CommentInput.vue\"));\nconst CommentParentInfo = defineAsyncComponent(\n () => import(\"../CommentParentInfo.vue\"),\n);\nconst LikeSection = defineAsyncComponent(\n () => import(\"../like/LikeSection.vue\"),\n);\nconst CommentMoreActions = defineAsyncComponent(\n () => import(\"./CommentMoreActions.vue\"),\n);\nconst CommentList = defineAsyncComponent(() => import(\"../CommentList.vue\"));\n\n\n//Props \nconst props = defineProps({\n comment: { default: () => ({}), type: Object as () => CommentPodcast },\n podcast: { default: undefined, type: Object as () => Podcast },\n isFlatList: { default: false, type: Boolean },\n config: { default: undefined, type: Object as () => CommentsConfig },\n organisationId: { default: undefined, type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"deleteComment\", \"update:comment\"]);\n\n//Data \nconst isAnsweringComment = ref(false);\nconst showAnswers = ref(false);\nconst focus = ref(false);\nconst showParentComment = ref(false);\nconst eventToHandle : Ref<CommentMessage | undefined>= ref(undefined);\n\n//Composables\nconst { t } = useI18n();\nconst authStore = useAuthStore();\nconst commentStore = useCommentStore();\n\n\n//Computed\nconst commentForVmodel = computed({\n get(): CommentPodcast {\n return props.comment;\n },\n set(value: CommentPodcast) {\n if (!eventActive.value) {\n emit(\"update:comment\", value);\n }\n },\n});\nconst isAnAnswer = computed(() => undefined !== props.comment.answerTo);\nconst editRight = computed(() => {\n return (\n (true === authStore.isRoleComments &&\n (authStore.authOrgaId === props.podcast?.organisation.id ||\n authStore.authOrgaId === props.organisationId)) ||\n true === authStore.isRoleAdmin\n );\n});\nconst isValidComment = computed(() => \"VALIDATED\" === props.comment.state);\nconst canPostComment = computed(() => {\n return commentStore.getCanPostComment(\n props.config,\n props.podcast,\n undefined !== authStore.authOrgaId,\n );\n});\nconst eventActive = computed(() => undefined !== props.podcast?.conferenceId);\n\n \n//Methods\nfunction answerComment(): void {\n isAnsweringComment.value = true;\n focus.value = !focus.value;\n}\nfunction newComment(comment: CommentPodcast): void {\n modifyAnswerNumber(comment.commentId);\n if (!eventActive.value) {\n eventToHandle.value = { type: \"CREATE\", comment: comment };\n }\n isAnsweringComment.value = false;\n}\nfunction modifyAnswerNumber(commentId: number, isAdd = true) {\n const commentToEdit = props.comment;\n if (commentToEdit.responses) {\n if (isAdd) {\n commentToEdit.responses.push(commentId);\n } else {\n const index = commentToEdit.responses.indexOf(commentId);\n if (index !== -1) {\n commentToEdit.responses.splice(index, 1);\n }\n }\n } else if (isAdd) {\n commentToEdit.responses = [commentId];\n }\n emit(\"update:comment\", commentToEdit);\n}\nfunction emitDeleteComment() {\n if (!eventActive.value) {\n emit(\"deleteComment\");\n }\n}\nfunction receiveEvent(event: CommentMessage) {\n if (\"CREATE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId);\n } else if (\"DELETE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId, false);\n }\n eventToHandle.value = event;\n}\nfunction updateForAnswerDeleted(commentId: number) {\n modifyAnswerNumber(commentId, false);\n}\n//Expose\ndefineExpose({\n receiveEvent\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FA,MAAM,eAAe,2BAA2B,OAAO,8BAAsB;EAC7E,MAAM,oBAAoB,2BAClB,OAAO,mCACf;EACA,MAAM,cAAc,2BACZ,OAAO,6BACf;EACA,MAAM,qBAAqB,2BACnB,OAAO,oCACf;EACA,MAAM,cAAc,2BAA2B,OAAO,6BAAqB;EAI3E,MAAM,QAAQ;EASd,MAAM,OAAO;EAGb,MAAM,qBAAqB,IAAI,KAAK;EACpC,MAAM,cAAc,IAAI,KAAK;EAC7B,MAAM,QAAQ,IAAI,KAAK;EACvB,MAAM,oBAAoB,IAAI,KAAK;EACnC,MAAM,gBAAiD,IAAI,KAAA,CAAS;EAGpE,MAAM,EAAE,MAAM,QAAQ;EACtB,MAAM,YAAY,aAAa;EAC/B,MAAM,eAAe,gBAAgB;EAIrC,MAAM,mBAAmB,SAAS;GAChC,MAAsB;IACpB,OAAO,MAAM;GACf;GACA,IAAI,OAAuB;IACzB,IAAI,CAAC,YAAY,OACf,KAAK,kBAAkB,KAAK;GAEhC;EACF,CAAC;EACD,MAAM,aAAa,eAAe,KAAA,MAAc,MAAM,QAAQ,QAAQ;EACtE,MAAM,YAAY,eAAe;GAC/B,OACG,SAAS,UAAU,mBACjB,UAAU,eAAe,MAAM,SAAS,aAAa,MACtD,UAAU,eAAe,MAAM,mBACjC,SAAS,UAAU;EAEvB,CAAC;EACD,MAAM,iBAAiB,eAA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A;;;;;;GAGR,OAAA,QAAQ,WAAW,UAAM,CAAK,OAAA,cAAA,UAAA,GADtC,mBAqBM,OArBN,YAqBM,CAjBJ,mBAMS,UAAA;IALP,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,cAAW,CAAI,OAAA;OAEvB,YAA+D,OAAA,oBAAA,EAA7C,OAAK,eAAA,EAAA,mBAAuB,OAAA,YAAW,CAAA,EAAA,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA,GAAA,gBAAM,MAC/D,gBAAG,OAAA,EAAC,cAAA,EAAA,IAAqB,OAAA,QAAQ,UAAU,OAAM,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAG3C,OAAA,eAAA,UAAA,GADR,YASE,OAAA,gBAAA;;IAPA,KAAI;IACH,SAAS,OAAA;IACT,MAAM;IACN,qBAAmB,OAAA,QAAQ;IAC3B,QAAQ,OAAA;IACR,mBAAiB,OAAA;IACjB,kBAAiB,OAAA;;;;;;;;EAKhB,OAAA,qBAAA,UAAA,GADR,YAKE,OAAA,sBAAA;;GAHA,OAAM;GACL,cAAY,OAAA,QAAQ;GACpB,cAAY,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentItem-vMMaiTCB.mjs","names":[],"sources":["../src/components/display/comments/item/CommentItem.vue","../src/components/display/comments/item/CommentItem.vue"],"sourcesContent":["<template>\n <div\n class=\"d-flex flex-column flex-grow-1 w-100 really-light-secondary-bg\"\n :class=\"isAnAnswer && !isFlatList ? 'my-1 p-0' : 'my-3 p-2'\"\n >\n <div class=\"d-flex flex-nowrap justify-content-between align-items-center\">\n <CommentBasicView :comment=\"comment\" :edit-right=\"editRight\" />\n <CommentMoreActions\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n :config=\"config\"\n @delete-comment=\"emitDeleteComment\"\n />\n </div>\n <template v-if=\"isValidComment\">\n <div class=\"d-flex align-items-center mt-1\">\n <LikeSection\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n />\n <button\n v-if=\"!comment.answerTo && canPostComment\"\n class=\"btn btn-transparent\"\n @click=\"answerComment\"\n >\n {{ t(\"To answer\") }}\n </button>\n <button\n v-if=\"isFlatList && comment.answerTo\"\n class=\"btn btn-transparent d-flex align-items-center\"\n @click=\"showParentComment = !showParentComment\"\n >\n {{ t(\"In response to\") }}\n <ChevronDownIcon :class=\"{ 'arrow-transform': showParentComment }\" />\n </button>\n </div>\n <CommentInput\n v-if=\"isAnsweringComment && canPostComment\"\n class=\"ms-4\"\n :focus=\"focus\"\n :podcast=\"podcast\"\n :in-answer-comment=\"comment\"\n @cancel-action=\"isAnsweringComment = false\"\n @new-comment=\"newComment\"\n />\n <div\n v-if=\"comment.responses?.length && !isFlatList\"\n class=\"ms-4 mt-2 answers-section\"\n >\n <button\n class=\"d-flex align-items-center btn-transparent text-primary\"\n @click=\"showAnswers = !showAnswers\"\n >\n <ChevronDownIcon :class=\"{ 'arrow-transform': showAnswers }\" />\n {{ t(\"nb answers\", { nb: comment.responses.length }) }}\n </button>\n <CommentList\n v-if=\"showAnswers\"\n ref=\"commentList\"\n :podcast=\"podcast\"\n :size=\"5\"\n :answer-to-comment=\"comment.commentId\"\n :config=\"config\"\n :event-to-handle=\"eventToHandle\"\n @comment-deleted=\"updateForAnswerDeleted\"\n />\n </div>\n </template>\n <CommentParentInfo\n v-if=\"showParentComment\"\n class=\"ms-4\"\n :comment-id=\"comment.answerTo\"\n :edit-right=\"editRight\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport ChevronDownIcon from \"vue-material-design-icons/ChevronDown.vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"../../../../stores/class/general/podcast\";\nimport CommentBasicView from \"./CommentBasicView.vue\";\nimport { useCommentStore } from \"../../../../stores/CommentStore\";\nimport { useAuthStore } from \"../../../../stores/AuthStore\";\nimport { defineAsyncComponent, ref, Ref, computed } from \"vue\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"../../../../stores/class/config/commentsConfig\";\nimport { useI18n } from \"vue-i18n\";\nconst CommentInput = defineAsyncComponent(() => import(\"../CommentInput.vue\"));\nconst CommentParentInfo = defineAsyncComponent(\n () => import(\"../CommentParentInfo.vue\"),\n);\nconst LikeSection = defineAsyncComponent(\n () => import(\"../like/LikeSection.vue\"),\n);\nconst CommentMoreActions = defineAsyncComponent(\n () => import(\"./CommentMoreActions.vue\"),\n);\nconst CommentList = defineAsyncComponent(() => import(\"../CommentList.vue\"));\n\n\n//Props \nconst props = defineProps({\n comment: { default: () => ({}), type: Object as () => CommentPodcast },\n podcast: { default: undefined, type: Object as () => Podcast },\n isFlatList: { default: false, type: Boolean },\n config: { default: undefined, type: Object as () => CommentsConfig },\n organisationId: { default: undefined, type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"deleteComment\", \"update:comment\"]);\n\n//Data \nconst isAnsweringComment = ref(false);\nconst showAnswers = ref(false);\nconst focus = ref(false);\nconst showParentComment = ref(false);\nconst eventToHandle : Ref<CommentMessage | undefined>= ref(undefined);\n\n//Composables\nconst { t } = useI18n();\nconst authStore = useAuthStore();\nconst commentStore = useCommentStore();\n\n\n//Computed\nconst commentForVmodel = computed({\n get(): CommentPodcast {\n return props.comment;\n },\n set(value: CommentPodcast) {\n if (!eventActive.value) {\n emit(\"update:comment\", value);\n }\n },\n});\nconst isAnAnswer = computed(() => undefined !== props.comment.answerTo);\nconst editRight = computed(() => {\n return (\n (true === authStore.isRoleComments &&\n (authStore.authOrgaId === props.podcast?.organisation.id ||\n authStore.authOrgaId === props.organisationId)) ||\n true === authStore.isRoleAdmin\n );\n});\nconst isValidComment = computed(() => \"VALIDATED\" === props.comment.state);\nconst canPostComment = computed(() => {\n return commentStore.getCanPostComment(\n props.config,\n props.podcast,\n undefined !== authStore.authOrgaId,\n );\n});\nconst eventActive = computed(() => undefined !== props.podcast?.conferenceId);\n\n \n//Methods\nfunction answerComment(): void {\n isAnsweringComment.value = true;\n focus.value = !focus.value;\n}\nfunction newComment(comment: CommentPodcast): void {\n modifyAnswerNumber(comment.commentId);\n if (!eventActive.value) {\n eventToHandle.value = { type: \"CREATE\", comment: comment };\n }\n isAnsweringComment.value = false;\n}\nfunction modifyAnswerNumber(commentId: number, isAdd = true) {\n const commentToEdit = props.comment;\n if (commentToEdit.responses) {\n if (isAdd) {\n commentToEdit.responses.push(commentId);\n } else {\n const index = commentToEdit.responses.indexOf(commentId);\n if (index !== -1) {\n commentToEdit.responses.splice(index, 1);\n }\n }\n } else if (isAdd) {\n commentToEdit.responses = [commentId];\n }\n emit(\"update:comment\", commentToEdit);\n}\nfunction emitDeleteComment() {\n if (!eventActive.value) {\n emit(\"deleteComment\");\n }\n}\nfunction receiveEvent(event: CommentMessage) {\n if (\"CREATE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId);\n } else if (\"DELETE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId, false);\n }\n eventToHandle.value = event;\n}\nfunction updateForAnswerDeleted(commentId: number) {\n modifyAnswerNumber(commentId, false);\n}\n//Expose\ndefineExpose({\n receiveEvent\n});\n</script>\n","<template>\n <div\n class=\"d-flex flex-column flex-grow-1 w-100 really-light-secondary-bg\"\n :class=\"isAnAnswer && !isFlatList ? 'my-1 p-0' : 'my-3 p-2'\"\n >\n <div class=\"d-flex flex-nowrap justify-content-between align-items-center\">\n <CommentBasicView :comment=\"comment\" :edit-right=\"editRight\" />\n <CommentMoreActions\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n :config=\"config\"\n @delete-comment=\"emitDeleteComment\"\n />\n </div>\n <template v-if=\"isValidComment\">\n <div class=\"d-flex align-items-center mt-1\">\n <LikeSection\n v-model:comment=\"commentForVmodel\"\n :edit-right=\"editRight\"\n :podcast=\"podcast\"\n />\n <button\n v-if=\"!comment.answerTo && canPostComment\"\n class=\"btn btn-transparent\"\n @click=\"answerComment\"\n >\n {{ t(\"To answer\") }}\n </button>\n <button\n v-if=\"isFlatList && comment.answerTo\"\n class=\"btn btn-transparent d-flex align-items-center\"\n @click=\"showParentComment = !showParentComment\"\n >\n {{ t(\"In response to\") }}\n <ChevronDownIcon :class=\"{ 'arrow-transform': showParentComment }\" />\n </button>\n </div>\n <CommentInput\n v-if=\"isAnsweringComment && canPostComment\"\n class=\"ms-4\"\n :focus=\"focus\"\n :podcast=\"podcast\"\n :in-answer-comment=\"comment\"\n @cancel-action=\"isAnsweringComment = false\"\n @new-comment=\"newComment\"\n />\n <div\n v-if=\"comment.responses?.length && !isFlatList\"\n class=\"ms-4 mt-2 answers-section\"\n >\n <button\n class=\"d-flex align-items-center btn-transparent text-primary\"\n @click=\"showAnswers = !showAnswers\"\n >\n <ChevronDownIcon :class=\"{ 'arrow-transform': showAnswers }\" />\n {{ t(\"nb answers\", { nb: comment.responses.length }) }}\n </button>\n <CommentList\n v-if=\"showAnswers\"\n ref=\"commentList\"\n :podcast=\"podcast\"\n :size=\"5\"\n :answer-to-comment=\"comment.commentId\"\n :config=\"config\"\n :event-to-handle=\"eventToHandle\"\n @comment-deleted=\"updateForAnswerDeleted\"\n />\n </div>\n </template>\n <CommentParentInfo\n v-if=\"showParentComment\"\n class=\"ms-4\"\n :comment-id=\"comment.answerTo\"\n :edit-right=\"editRight\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport ChevronDownIcon from \"vue-material-design-icons/ChevronDown.vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"../../../../stores/class/general/podcast\";\nimport CommentBasicView from \"./CommentBasicView.vue\";\nimport { useCommentStore } from \"../../../../stores/CommentStore\";\nimport { useAuthStore } from \"../../../../stores/AuthStore\";\nimport { defineAsyncComponent, ref, Ref, computed } from \"vue\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"../../../../stores/class/config/commentsConfig\";\nimport { useI18n } from \"vue-i18n\";\nconst CommentInput = defineAsyncComponent(() => import(\"../CommentInput.vue\"));\nconst CommentParentInfo = defineAsyncComponent(\n () => import(\"../CommentParentInfo.vue\"),\n);\nconst LikeSection = defineAsyncComponent(\n () => import(\"../like/LikeSection.vue\"),\n);\nconst CommentMoreActions = defineAsyncComponent(\n () => import(\"./CommentMoreActions.vue\"),\n);\nconst CommentList = defineAsyncComponent(() => import(\"../CommentList.vue\"));\n\n\n//Props \nconst props = defineProps({\n comment: { default: () => ({}), type: Object as () => CommentPodcast },\n podcast: { default: undefined, type: Object as () => Podcast },\n isFlatList: { default: false, type: Boolean },\n config: { default: undefined, type: Object as () => CommentsConfig },\n organisationId: { default: undefined, type: String },\n})\n\n//Emits\nconst emit = defineEmits([\"deleteComment\", \"update:comment\"]);\n\n//Data \nconst isAnsweringComment = ref(false);\nconst showAnswers = ref(false);\nconst focus = ref(false);\nconst showParentComment = ref(false);\nconst eventToHandle : Ref<CommentMessage | undefined>= ref(undefined);\n\n//Composables\nconst { t } = useI18n();\nconst authStore = useAuthStore();\nconst commentStore = useCommentStore();\n\n\n//Computed\nconst commentForVmodel = computed({\n get(): CommentPodcast {\n return props.comment;\n },\n set(value: CommentPodcast) {\n if (!eventActive.value) {\n emit(\"update:comment\", value);\n }\n },\n});\nconst isAnAnswer = computed(() => undefined !== props.comment.answerTo);\nconst editRight = computed(() => {\n return (\n (true === authStore.isRoleComments &&\n (authStore.authOrgaId === props.podcast?.organisation.id ||\n authStore.authOrgaId === props.organisationId)) ||\n true === authStore.isRoleAdmin\n );\n});\nconst isValidComment = computed(() => \"VALIDATED\" === props.comment.state);\nconst canPostComment = computed(() => {\n return commentStore.getCanPostComment(\n props.config,\n props.podcast,\n undefined !== authStore.authOrgaId,\n );\n});\nconst eventActive = computed(() => undefined !== props.podcast?.conferenceId);\n\n \n//Methods\nfunction answerComment(): void {\n isAnsweringComment.value = true;\n focus.value = !focus.value;\n}\nfunction newComment(comment: CommentPodcast): void {\n modifyAnswerNumber(comment.commentId);\n if (!eventActive.value) {\n eventToHandle.value = { type: \"CREATE\", comment: comment };\n }\n isAnsweringComment.value = false;\n}\nfunction modifyAnswerNumber(commentId: number, isAdd = true) {\n const commentToEdit = props.comment;\n if (commentToEdit.responses) {\n if (isAdd) {\n commentToEdit.responses.push(commentId);\n } else {\n const index = commentToEdit.responses.indexOf(commentId);\n if (index !== -1) {\n commentToEdit.responses.splice(index, 1);\n }\n }\n } else if (isAdd) {\n commentToEdit.responses = [commentId];\n }\n emit(\"update:comment\", commentToEdit);\n}\nfunction emitDeleteComment() {\n if (!eventActive.value) {\n emit(\"deleteComment\");\n }\n}\nfunction receiveEvent(event: CommentMessage) {\n if (\"CREATE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId);\n } else if (\"DELETE\" === event.type) {\n modifyAnswerNumber(event.comment.commentId, false);\n }\n eventToHandle.value = event;\n}\nfunction updateForAnswerDeleted(commentId: number) {\n modifyAnswerNumber(commentId, false);\n}\n//Expose\ndefineExpose({\n receiveEvent\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FA,MAAM,eAAe,2BAA2B,OAAO,8BAAsB;EAC7E,MAAM,oBAAoB,2BAClB,OAAO,mCACf;EACA,MAAM,cAAc,2BACZ,OAAO,6BACf;EACA,MAAM,qBAAqB,2BACnB,OAAO,oCACf;EACA,MAAM,cAAc,2BAA2B,OAAO,6BAAqB;EAI3E,MAAM,QAAQ;EASd,MAAM,OAAO;EAGb,MAAM,qBAAqB,IAAI,KAAK;EACpC,MAAM,cAAc,IAAI,KAAK;EAC7B,MAAM,QAAQ,IAAI,KAAK;EACvB,MAAM,oBAAoB,IAAI,KAAK;EACnC,MAAM,gBAAiD,IAAI,KAAA,CAAS;EAGpE,MAAM,EAAE,MAAM,QAAQ;EACtB,MAAM,YAAY,aAAa;EAC/B,MAAM,eAAe,gBAAgB;EAIrC,MAAM,mBAAmB,SAAS;GAChC,MAAsB;IACpB,OAAO,MAAM;GACf;GACA,IAAI,OAAuB;IACzB,IAAI,CAAC,Y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GAAA,CAAA,OAAA,CAAA,CAAA,CAAA,KAAA,mBAAA,QAAA,IAAA;;GAI3D,OAAA,sBAAsB,OAAA,kBAAA,UAAA,GAD9B,YAQE,OAAA,iBAAA;;IANA,OAAM;IACL,OAAO,OAAA;IACP,SAAS,OAAA;IACT,qBAAmB,OAAA;IACnB,gBAAa,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,qBAAkB;IACjC,cAAa,OAAA;;;;;;GAGR,OAAA,QAAQ,WAAW,UAAM,CAAK,OAAA,cAAA,UAAA,GADtC,mBAqBM,OArBN,YAqBM,CAjBJ,mBAMS,UAAA;IALP,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,cAAW,CAAI,OAAA;OAEvB,YAA+D,OAAA,oBAAA,EAA7C,OAAK,eAAA,EAAA,mBAAuB,OAAA,YAAW,CAAA,EAAA,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA,GAAA,gBAAM,MAC/D,gBAAG,OAAA,EAAC,cAAA,EAAA,IAAqB,OAAA,QAAQ,UAAU,OAAM,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAG3C,OAAA,eAAA,UAAA,GADR,YASE,OAAA,gBAAA;;IAPA,KAAI;IACH,SAAS,OAAA;IACT,MAAM;IACN,qBAAmB,OAAA,QAAQ;IAC3B,QAAQ,OAAA;IACR,mBAAiB,OAAA;IACjB,kBAAiB,OAAA;;;;;;;;EAKhB,OAAA,qBAAA,UAAA,GADR,YAKE,OAAA,sBAAA;;GAHA,OAAM;GACL,cAAY,OAAA,QAAQ;GACpB,cAAY,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentList-BcFHoPtE.mjs","names":[],"sources":["../src/components/display/comments/CommentList.vue","../src/components/display/comments/CommentList.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column\">\n <div\n v-if=\"isNotAnAnswerList && 0 !== totalCount\"\n class=\"d-flex align-items-center mb-2\"\n >\n <div class=\"text-secondary me-3\">\n {{ t(\"Number comments\", { nb: totalCount }) }}\n </div>\n <button\n id=\"sort-by-comments\"\n class=\"btn btn-transparent d-flex align-items-center\"\n >\n <SortVariantIcon :size=\"30\" />\n <p class=\"ms-1\">{{ t(\"Sort by\") }}</p>\n </button>\n <ClassicPopover target=\"sort-by-comments\" :only-click=\"true\">\n <button\n v-for=\"sortOption in sortChoice\"\n :key=\"sortOption.value\"\n class=\"me-3 octopus-dropdown-item\"\n :disabled=\"sortOption.value === sortType\"\n @mousedown=\"changeSort(sortOption.value)\"\n @keydown.enter=\"changeSort(sortOption.value)\"\n >\n {{ sortOption.title }}\n </button>\n </ClassicPopover>\n </div>\n <div v-if=\"!loading && !error && 0 === totalCount\" class=\"text-center\">\n {{ t(\"No comments\") }}\n </div>\n <div\n ref=\"scrollComponent\"\n :class=\"isNotAnAnswerList ? 'scrolling-comments' : ''\"\n >\n <CommentItem\n v-for=\"(c, indexCom) in comments\"\n :id=\"'comItem' + c.commentId\"\n :key=\"c.commentId\"\n v-model:comment=\"comments[indexCom]\"\n :podcast=\"podcast\"\n :is-flat-list=\"isFlatList\"\n :config=\"config\"\n :organisation-id=\"organisationId\"\n @delete-comment=\"deleteComment(c.commentId)\"\n />\n <ClassicLoading\n :loading-text=\"loading && !error ? t('Loading content ...') : undefined\"\n :error-text=\"error ? t(`Comments loading error`) : undefined\"\n />\n <button\n v-if=\"!isNotAnAnswerList && dfirst + dsize < totalCount\"\n class=\"btn share-btn mx-2\"\n :title=\"t('See more')\"\n >\n <PlusIcon />\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport SortVariantIcon from \"vue-material-design-icons/SortVariant.vue\";\nimport PlusIcon from \"vue-material-design-icons/Plus.vue\";\nimport ClassicLoading from \"../../form/ClassicLoading.vue\";\nimport classicApi from \"../../../api/classicApi\";\nimport { computed, defineAsyncComponent, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch } from \"vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"@/stores/class/config/commentsConfig\";\nimport { ListClassicReturn } from \"@/stores/class/general/listReturn\";\nimport { useI18n } from \"vue-i18n\";\n/* eslint-disable */\nconst CommentItem: any = defineAsyncComponent(() => import('./item/CommentItem.vue'));\n/* eslint-enable */\nconst ClassicPopover = defineAsyncComponent(\n () => import(\"../../misc/ClassicPopover.vue\"),\n);\n\n//Props \nconst props = defineProps({\n size: { default: 10, type: Number },\n podcast: { default: undefined, type: Object as () => Podcast },\n reload: { default: false, type: Boolean },\n answerToComment: { default: undefined, type: Number },\n isFlatList: { default: false, type: Boolean },\n stateFilter: { default: \"\", type: String },\n organisationId: { default: undefined, type: String },\n nbComments: { default: 0, type: Number },\n config: { default: undefined, type: Object as () => CommentsConfig },\n eventToHandle: { default: undefined, type: Object as () => CommentMessage },\n})\n\n//Emits\nconst emit = defineEmits([\"update:nbComments\", \"commentDeleted\"]);\n\n//Data \nconst loading = ref(false);\nconst error = ref(false);\nconst dfirst = ref(0);\nconst dsize = ref(props.size);\nconst totalCount = ref(0);\nconst sortType = ref(\"DATE_DESC\");\nconst comments: Ref<Array<CommentPodcast>> = ref([]);\nconst scrollableSection: Ref<HTMLElement | undefined> = ref(undefined);\nconst scrollComponentRef = useTemplateRef('scrollComponent');\n\n//Composables\nconst { t } = useI18n();\n\n//Computed\nconst isNotAnAnswerList = computed(() => undefined === props.answerToComment);\nconst changed = computed(() => `${props.size}|${props.reload}|${dsize.value}|${props.stateFilter}|${props.podcast?.podcastId}|${props.organisationId}`);\nconst sortChoice = computed(() =>{\n return [\n { title: t(\"The most recent\"), value: \"DATE_DESC\" },\n { title: t(\"Top comments\"), value: \"LIKE_DESC\" },\n ];\n});\n\n//Watch\nwatch(totalCount, () => {emit(\"update:nbComments\", totalCount.value)});\nwatch(changed, () => {fetchContent(true);});\nwatch(()=>props.eventToHandle, async () => {\n if (!props.eventToHandle) {\n return;\n }\n if (props.answerToComment === props.eventToHandle.comment.answerTo) {\n switch (props.eventToHandle.type) {\n case \"CREATE\":\n createComment(props.eventToHandle.comment);\n break;\n case \"UPDATE\":\n updateComment(props.eventToHandle.comment);\n break;\n case \"DELETE\":\n deleteComment(props.eventToHandle.comment.commentId);\n break;\n default:\n break;\n }\n return;\n }\n if (undefined !== props.eventToHandle.comment.answerTo) {\n const comItem = scrollComponentRef?.value?.querySelector('#comItem' + props.eventToHandle.comment.answerTo) as InstanceType<typeof CommentItem>;\n comItem?.receiveEvent(props.eventToHandle);\n }\n}, {deep: true});\n\n\nonMounted(()=>{\n fetchContent(true);\n if (isNotAnAnswerList.value) {\n scrollableSection.value = scrollComponentRef?.value as HTMLElement;\n scrollableSection.value.addEventListener(\"scroll\", handleScroll);\n }\n})\n\nonUnmounted(()=>{\n if (isNotAnAnswerList.value) {\n scrollableSection.value?.removeEventListener(\"scroll\", handleScroll);\n }\n})\n\n\n//Methods\nfunction changeSort(sortTypeUpdate: string) {\n sortType.value = sortTypeUpdate;\n fetchContent(true);\n}\nfunction handleScroll() {\n if (\n scrollableSection.value &&\n totalCount.value > comments.value.length &&\n scrollableSection.value.scrollTop +\n scrollableSection.value.clientHeight >=\n scrollableSection.value.scrollHeight\n ) {\n fetchContent(false);\n }\n}\nfunction findCommentInCommentsLoaded(commentId: number) {\n return comments.value.findIndex(\n (element: CommentPodcast) => element.commentId === commentId,\n );\n}\nfunction createComment(comment: CommentPodcast) {\n comments.value.unshift(comment);\n totalCount.value += 1;\n}\nfunction updateComment(comment: CommentPodcast) {\n const commentIndex = findCommentInCommentsLoaded(comment.commentId);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1, comment);\n }\n}\nfunction deleteComment(commentIdToDelete: number) {\n const commentIndex = findCommentInCommentsLoaded(commentIdToDelete);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1);\n totalCount.value -= 1;\n emit(\"commentDeleted\", commentIdToDelete);\n }\n}\nasync function fetchContent(reset: boolean): Promise<void> {\n if (loading.value) {\n return;\n }\n loading.value = true;\n if (reset) {\n dfirst.value = 0;\n comments.value.length = 0;\n }\n const param = {\n first: dfirst.value,\n size: dsize.value,\n podcastId: props.podcast?.podcastId,\n sort: sortType.value,\n answerTo: props.answerToComment,\n hideAnswers: !props.isFlatList,\n state: props.stateFilter.length ? props.stateFilter : undefined,\n organisationId: props.organisationId,\n };\n try {\n const data = await classicApi.fetchData<\n ListClassicReturn<CommentPodcast>\n >({\n api: 2,\n path: \"comment/list\",\n parameters: param,\n });\n if (reset) {\n comments.value.length = 0;\n }\n comments.value.push(...data.result);\n totalCount.value = data.count;\n dfirst.value += dsize.value;\n loading.value = false;\n } catch (errorWs) {\n // Errors sometimes occur, and shouldn't trigger anything too drastic,\n // so we only log it, instead of using handle403\n console.error(errorWs);\n error.value = true;\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n.octopus-app {\n .scrolling-comments {\n max-height: 715px;\n overflow-y: auto;\n }\n}\n</style>\n","<template>\n <div class=\"d-flex flex-column\">\n <div\n v-if=\"isNotAnAnswerList && 0 !== totalCount\"\n class=\"d-flex align-items-center mb-2\"\n >\n <div class=\"text-secondary me-3\">\n {{ t(\"Number comments\", { nb: totalCount }) }}\n </div>\n <button\n id=\"sort-by-comments\"\n class=\"btn btn-transparent d-flex align-items-center\"\n >\n <SortVariantIcon :size=\"30\" />\n <p class=\"ms-1\">{{ t(\"Sort by\") }}</p>\n </button>\n <ClassicPopover target=\"sort-by-comments\" :only-click=\"true\">\n <button\n v-for=\"sortOption in sortChoice\"\n :key=\"sortOption.value\"\n class=\"me-3 octopus-dropdown-item\"\n :disabled=\"sortOption.value === sortType\"\n @mousedown=\"changeSort(sortOption.value)\"\n @keydown.enter=\"changeSort(sortOption.value)\"\n >\n {{ sortOption.title }}\n </button>\n </ClassicPopover>\n </div>\n <div v-if=\"!loading && !error && 0 === totalCount\" class=\"text-center\">\n {{ t(\"No comments\") }}\n </div>\n <div\n ref=\"scrollComponent\"\n :class=\"isNotAnAnswerList ? 'scrolling-comments' : ''\"\n >\n <CommentItem\n v-for=\"(c, indexCom) in comments\"\n :id=\"'comItem' + c.commentId\"\n :key=\"c.commentId\"\n v-model:comment=\"comments[indexCom]\"\n :podcast=\"podcast\"\n :is-flat-list=\"isFlatList\"\n :config=\"config\"\n :organisation-id=\"organisationId\"\n @delete-comment=\"deleteComment(c.commentId)\"\n />\n <ClassicLoading\n :loading-text=\"loading && !error ? t('Loading content ...') : undefined\"\n :error-text=\"error ? t(`Comments loading error`) : undefined\"\n />\n <button\n v-if=\"!isNotAnAnswerList && dfirst + dsize < totalCount\"\n class=\"btn share-btn mx-2\"\n :title=\"t('See more')\"\n >\n <PlusIcon />\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport SortVariantIcon from \"vue-material-design-icons/SortVariant.vue\";\nimport PlusIcon from \"vue-material-design-icons/Plus.vue\";\nimport ClassicLoading from \"../../form/ClassicLoading.vue\";\nimport classicApi from \"../../../api/classicApi\";\nimport { computed, defineAsyncComponent, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch } from \"vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"@/stores/class/config/commentsConfig\";\nimport { ListClassicReturn } from \"@/stores/class/general/listReturn\";\nimport { useI18n } from \"vue-i18n\";\n/* eslint-disable */\nconst CommentItem: any = defineAsyncComponent(() => import('./item/CommentItem.vue'));\n/* eslint-enable */\nconst ClassicPopover = defineAsyncComponent(\n () => import(\"../../misc/ClassicPopover.vue\"),\n);\n\n//Props \nconst props = defineProps({\n size: { default: 10, type: Number },\n podcast: { default: undefined, type: Object as () => Podcast },\n reload: { default: false, type: Boolean },\n answerToComment: { default: undefined, type: Number },\n isFlatList: { default: false, type: Boolean },\n stateFilter: { default: \"\", type: String },\n organisationId: { default: undefined, type: String },\n nbComments: { default: 0, type: Number },\n config: { default: undefined, type: Object as () => CommentsConfig },\n eventToHandle: { default: undefined, type: Object as () => CommentMessage },\n})\n\n//Emits\nconst emit = defineEmits([\"update:nbComments\", \"commentDeleted\"]);\n\n//Data \nconst loading = ref(false);\nconst error = ref(false);\nconst dfirst = ref(0);\nconst dsize = ref(props.size);\nconst totalCount = ref(0);\nconst sortType = ref(\"DATE_DESC\");\nconst comments: Ref<Array<CommentPodcast>> = ref([]);\nconst scrollableSection: Ref<HTMLElement | undefined> = ref(undefined);\nconst scrollComponentRef = useTemplateRef('scrollComponent');\n\n//Composables\nconst { t } = useI18n();\n\n//Computed\nconst isNotAnAnswerList = computed(() => undefined === props.answerToComment);\nconst changed = computed(() => `${props.size}|${props.reload}|${dsize.value}|${props.stateFilter}|${props.podcast?.podcastId}|${props.organisationId}`);\nconst sortChoice = computed(() =>{\n return [\n { title: t(\"The most recent\"), value: \"DATE_DESC\" },\n { title: t(\"Top comments\"), value: \"LIKE_DESC\" },\n ];\n});\n\n//Watch\nwatch(totalCount, () => {emit(\"update:nbComments\", totalCount.value)});\nwatch(changed, () => {fetchContent(true);});\nwatch(()=>props.eventToHandle, async () => {\n if (!props.eventToHandle) {\n return;\n }\n if (props.answerToComment === props.eventToHandle.comment.answerTo) {\n switch (props.eventToHandle.type) {\n case \"CREATE\":\n createComment(props.eventToHandle.comment);\n break;\n case \"UPDATE\":\n updateComment(props.eventToHandle.comment);\n break;\n case \"DELETE\":\n deleteComment(props.eventToHandle.comment.commentId);\n break;\n default:\n break;\n }\n return;\n }\n if (undefined !== props.eventToHandle.comment.answerTo) {\n const comItem = scrollComponentRef?.value?.querySelector('#comItem' + props.eventToHandle.comment.answerTo) as InstanceType<typeof CommentItem>;\n comItem?.receiveEvent(props.eventToHandle);\n }\n}, {deep: true});\n\n\nonMounted(()=>{\n fetchContent(true);\n if (isNotAnAnswerList.value) {\n scrollableSection.value = scrollComponentRef?.value as HTMLElement;\n scrollableSection.value.addEventListener(\"scroll\", handleScroll);\n }\n})\n\nonUnmounted(()=>{\n if (isNotAnAnswerList.value) {\n scrollableSection.value?.removeEventListener(\"scroll\", handleScroll);\n }\n})\n\n\n//Methods\nfunction changeSort(sortTypeUpdate: string) {\n sortType.value = sortTypeUpdate;\n fetchContent(true);\n}\nfunction handleScroll() {\n if (\n scrollableSection.value &&\n totalCount.value > comments.value.length &&\n scrollableSection.value.scrollTop +\n scrollableSection.value.clientHeight >=\n scrollableSection.value.scrollHeight\n ) {\n fetchContent(false);\n }\n}\nfunction findCommentInCommentsLoaded(commentId: number) {\n return comments.value.findIndex(\n (element: CommentPodcast) => element.commentId === commentId,\n );\n}\nfunction createComment(comment: CommentPodcast) {\n comments.value.unshift(comment);\n totalCount.value += 1;\n}\nfunction updateComment(comment: CommentPodcast) {\n const commentIndex = findCommentInCommentsLoaded(comment.commentId);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1, comment);\n }\n}\nfunction deleteComment(commentIdToDelete: number) {\n const commentIndex = findCommentInCommentsLoaded(commentIdToDelete);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1);\n totalCount.value -= 1;\n emit(\"commentDeleted\", commentIdToDelete);\n }\n}\nasync function fetchContent(reset: boolean): Promise<void> {\n if (loading.value) {\n return;\n }\n loading.value = true;\n if (reset) {\n dfirst.value = 0;\n comments.value.length = 0;\n }\n const param = {\n first: dfirst.value,\n size: dsize.value,\n podcastId: props.podcast?.podcastId,\n sort: sortType.value,\n answerTo: props.answerToComment,\n hideAnswers: !props.isFlatList,\n state: props.stateFilter.length ? props.stateFilter : undefined,\n organisationId: props.organisationId,\n };\n try {\n const data = await classicApi.fetchData<\n ListClassicReturn<CommentPodcast>\n >({\n api: 2,\n path: \"comment/list\",\n parameters: param,\n });\n if (reset) {\n comments.value.length = 0;\n }\n comments.value.push(...data.result);\n totalCount.value = data.count;\n dfirst.value += dsize.value;\n loading.value = false;\n } catch (errorWs) {\n // Errors sometimes occur, and shouldn't trigger anything too drastic,\n // so we only log it, instead of using handle403\n console.error(errorWs);\n error.value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AAO,OAAA,EAAC,UAAA;OAET,YAAY,OAAA,WAAA,CAAA,GAAA,GAAA,UAAA,KAAA,mBAAA,QAAA,IAAA"}
@@ -53,7 +53,7 @@ var CommentList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
53
53
  emits: ["update:nbComments", "commentDeleted"],
54
54
  setup(__props, { expose: __expose, emit: __emit }) {
55
55
  __expose();
56
- const CommentItem = defineAsyncComponent(() => import("./CommentItem-DDCavfx_.mjs"));
56
+ const CommentItem = defineAsyncComponent(() => import("./CommentItem-Vvd1NE_W.mjs"));
57
57
  const ClassicPopover = defineAsyncComponent(() => import("./ClassicPopover-BIyLKorz.mjs").then((n) => n.n));
58
58
  const props = __props;
59
59
  const emit = __emit;
@@ -299,4 +299,4 @@ var CommentList_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Commen
299
299
  //#endregion
300
300
  export { CommentList_default as default };
301
301
 
302
- //# sourceMappingURL=CommentList-BbEaau4S.mjs.map
302
+ //# sourceMappingURL=CommentList-Cn5TPBet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentList-Cn5TPBet.mjs","names":[],"sources":["../src/components/display/comments/CommentList.vue","../src/components/display/comments/CommentList.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column\">\n <div\n v-if=\"isNotAnAnswerList && 0 !== totalCount\"\n class=\"d-flex align-items-center mb-2\"\n >\n <div class=\"text-secondary me-3\">\n {{ t(\"Number comments\", { nb: totalCount }) }}\n </div>\n <button\n id=\"sort-by-comments\"\n class=\"btn btn-transparent d-flex align-items-center\"\n >\n <SortVariantIcon :size=\"30\" />\n <p class=\"ms-1\">{{ t(\"Sort by\") }}</p>\n </button>\n <ClassicPopover target=\"sort-by-comments\" :only-click=\"true\">\n <button\n v-for=\"sortOption in sortChoice\"\n :key=\"sortOption.value\"\n class=\"me-3 octopus-dropdown-item\"\n :disabled=\"sortOption.value === sortType\"\n @mousedown=\"changeSort(sortOption.value)\"\n @keydown.enter=\"changeSort(sortOption.value)\"\n >\n {{ sortOption.title }}\n </button>\n </ClassicPopover>\n </div>\n <div v-if=\"!loading && !error && 0 === totalCount\" class=\"text-center\">\n {{ t(\"No comments\") }}\n </div>\n <div\n ref=\"scrollComponent\"\n :class=\"isNotAnAnswerList ? 'scrolling-comments' : ''\"\n >\n <CommentItem\n v-for=\"(c, indexCom) in comments\"\n :id=\"'comItem' + c.commentId\"\n :key=\"c.commentId\"\n v-model:comment=\"comments[indexCom]\"\n :podcast=\"podcast\"\n :is-flat-list=\"isFlatList\"\n :config=\"config\"\n :organisation-id=\"organisationId\"\n @delete-comment=\"deleteComment(c.commentId)\"\n />\n <ClassicLoading\n :loading-text=\"loading && !error ? t('Loading content ...') : undefined\"\n :error-text=\"error ? t(`Comments loading error`) : undefined\"\n />\n <button\n v-if=\"!isNotAnAnswerList && dfirst + dsize < totalCount\"\n class=\"btn share-btn mx-2\"\n :title=\"t('See more')\"\n >\n <PlusIcon />\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport SortVariantIcon from \"vue-material-design-icons/SortVariant.vue\";\nimport PlusIcon from \"vue-material-design-icons/Plus.vue\";\nimport ClassicLoading from \"../../form/ClassicLoading.vue\";\nimport classicApi from \"../../../api/classicApi\";\nimport { computed, defineAsyncComponent, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch } from \"vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"@/stores/class/config/commentsConfig\";\nimport { ListClassicReturn } from \"@/stores/class/general/listReturn\";\nimport { useI18n } from \"vue-i18n\";\n/* eslint-disable */\nconst CommentItem: any = defineAsyncComponent(() => import('./item/CommentItem.vue'));\n/* eslint-enable */\nconst ClassicPopover = defineAsyncComponent(\n () => import(\"../../misc/ClassicPopover.vue\"),\n);\n\n//Props \nconst props = defineProps({\n size: { default: 10, type: Number },\n podcast: { default: undefined, type: Object as () => Podcast },\n reload: { default: false, type: Boolean },\n answerToComment: { default: undefined, type: Number },\n isFlatList: { default: false, type: Boolean },\n stateFilter: { default: \"\", type: String },\n organisationId: { default: undefined, type: String },\n nbComments: { default: 0, type: Number },\n config: { default: undefined, type: Object as () => CommentsConfig },\n eventToHandle: { default: undefined, type: Object as () => CommentMessage },\n})\n\n//Emits\nconst emit = defineEmits([\"update:nbComments\", \"commentDeleted\"]);\n\n//Data \nconst loading = ref(false);\nconst error = ref(false);\nconst dfirst = ref(0);\nconst dsize = ref(props.size);\nconst totalCount = ref(0);\nconst sortType = ref(\"DATE_DESC\");\nconst comments: Ref<Array<CommentPodcast>> = ref([]);\nconst scrollableSection: Ref<HTMLElement | undefined> = ref(undefined);\nconst scrollComponentRef = useTemplateRef('scrollComponent');\n\n//Composables\nconst { t } = useI18n();\n\n//Computed\nconst isNotAnAnswerList = computed(() => undefined === props.answerToComment);\nconst changed = computed(() => `${props.size}|${props.reload}|${dsize.value}|${props.stateFilter}|${props.podcast?.podcastId}|${props.organisationId}`);\nconst sortChoice = computed(() =>{\n return [\n { title: t(\"The most recent\"), value: \"DATE_DESC\" },\n { title: t(\"Top comments\"), value: \"LIKE_DESC\" },\n ];\n});\n\n//Watch\nwatch(totalCount, () => {emit(\"update:nbComments\", totalCount.value)});\nwatch(changed, () => {fetchContent(true);});\nwatch(()=>props.eventToHandle, async () => {\n if (!props.eventToHandle) {\n return;\n }\n if (props.answerToComment === props.eventToHandle.comment.answerTo) {\n switch (props.eventToHandle.type) {\n case \"CREATE\":\n createComment(props.eventToHandle.comment);\n break;\n case \"UPDATE\":\n updateComment(props.eventToHandle.comment);\n break;\n case \"DELETE\":\n deleteComment(props.eventToHandle.comment.commentId);\n break;\n default:\n break;\n }\n return;\n }\n if (undefined !== props.eventToHandle.comment.answerTo) {\n const comItem = scrollComponentRef?.value?.querySelector('#comItem' + props.eventToHandle.comment.answerTo) as InstanceType<typeof CommentItem>;\n comItem?.receiveEvent(props.eventToHandle);\n }\n}, {deep: true});\n\n\nonMounted(()=>{\n fetchContent(true);\n if (isNotAnAnswerList.value) {\n scrollableSection.value = scrollComponentRef?.value as HTMLElement;\n scrollableSection.value.addEventListener(\"scroll\", handleScroll);\n }\n})\n\nonUnmounted(()=>{\n if (isNotAnAnswerList.value) {\n scrollableSection.value?.removeEventListener(\"scroll\", handleScroll);\n }\n})\n\n\n//Methods\nfunction changeSort(sortTypeUpdate: string) {\n sortType.value = sortTypeUpdate;\n fetchContent(true);\n}\nfunction handleScroll() {\n if (\n scrollableSection.value &&\n totalCount.value > comments.value.length &&\n scrollableSection.value.scrollTop +\n scrollableSection.value.clientHeight >=\n scrollableSection.value.scrollHeight\n ) {\n fetchContent(false);\n }\n}\nfunction findCommentInCommentsLoaded(commentId: number) {\n return comments.value.findIndex(\n (element: CommentPodcast) => element.commentId === commentId,\n );\n}\nfunction createComment(comment: CommentPodcast) {\n comments.value.unshift(comment);\n totalCount.value += 1;\n}\nfunction updateComment(comment: CommentPodcast) {\n const commentIndex = findCommentInCommentsLoaded(comment.commentId);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1, comment);\n }\n}\nfunction deleteComment(commentIdToDelete: number) {\n const commentIndex = findCommentInCommentsLoaded(commentIdToDelete);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1);\n totalCount.value -= 1;\n emit(\"commentDeleted\", commentIdToDelete);\n }\n}\nasync function fetchContent(reset: boolean): Promise<void> {\n if (loading.value) {\n return;\n }\n loading.value = true;\n if (reset) {\n dfirst.value = 0;\n comments.value.length = 0;\n }\n const param = {\n first: dfirst.value,\n size: dsize.value,\n podcastId: props.podcast?.podcastId,\n sort: sortType.value,\n answerTo: props.answerToComment,\n hideAnswers: !props.isFlatList,\n state: props.stateFilter.length ? props.stateFilter : undefined,\n organisationId: props.organisationId,\n };\n try {\n const data = await classicApi.fetchData<\n ListClassicReturn<CommentPodcast>\n >({\n api: 2,\n path: \"comment/list\",\n parameters: param,\n });\n if (reset) {\n comments.value.length = 0;\n }\n comments.value.push(...data.result);\n totalCount.value = data.count;\n dfirst.value += dsize.value;\n loading.value = false;\n } catch (errorWs) {\n // Errors sometimes occur, and shouldn't trigger anything too drastic,\n // so we only log it, instead of using handle403\n console.error(errorWs);\n error.value = true;\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n.octopus-app {\n .scrolling-comments {\n max-height: 715px;\n overflow-y: auto;\n }\n}\n</style>\n","<template>\n <div class=\"d-flex flex-column\">\n <div\n v-if=\"isNotAnAnswerList && 0 !== totalCount\"\n class=\"d-flex align-items-center mb-2\"\n >\n <div class=\"text-secondary me-3\">\n {{ t(\"Number comments\", { nb: totalCount }) }}\n </div>\n <button\n id=\"sort-by-comments\"\n class=\"btn btn-transparent d-flex align-items-center\"\n >\n <SortVariantIcon :size=\"30\" />\n <p class=\"ms-1\">{{ t(\"Sort by\") }}</p>\n </button>\n <ClassicPopover target=\"sort-by-comments\" :only-click=\"true\">\n <button\n v-for=\"sortOption in sortChoice\"\n :key=\"sortOption.value\"\n class=\"me-3 octopus-dropdown-item\"\n :disabled=\"sortOption.value === sortType\"\n @mousedown=\"changeSort(sortOption.value)\"\n @keydown.enter=\"changeSort(sortOption.value)\"\n >\n {{ sortOption.title }}\n </button>\n </ClassicPopover>\n </div>\n <div v-if=\"!loading && !error && 0 === totalCount\" class=\"text-center\">\n {{ t(\"No comments\") }}\n </div>\n <div\n ref=\"scrollComponent\"\n :class=\"isNotAnAnswerList ? 'scrolling-comments' : ''\"\n >\n <CommentItem\n v-for=\"(c, indexCom) in comments\"\n :id=\"'comItem' + c.commentId\"\n :key=\"c.commentId\"\n v-model:comment=\"comments[indexCom]\"\n :podcast=\"podcast\"\n :is-flat-list=\"isFlatList\"\n :config=\"config\"\n :organisation-id=\"organisationId\"\n @delete-comment=\"deleteComment(c.commentId)\"\n />\n <ClassicLoading\n :loading-text=\"loading && !error ? t('Loading content ...') : undefined\"\n :error-text=\"error ? t(`Comments loading error`) : undefined\"\n />\n <button\n v-if=\"!isNotAnAnswerList && dfirst + dsize < totalCount\"\n class=\"btn share-btn mx-2\"\n :title=\"t('See more')\"\n >\n <PlusIcon />\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport SortVariantIcon from \"vue-material-design-icons/SortVariant.vue\";\nimport PlusIcon from \"vue-material-design-icons/Plus.vue\";\nimport ClassicLoading from \"../../form/ClassicLoading.vue\";\nimport classicApi from \"../../../api/classicApi\";\nimport { computed, defineAsyncComponent, onMounted, onUnmounted, Ref, ref, useTemplateRef, watch } from \"vue\";\nimport { CommentPodcast } from \"@/stores/class/general/comment\";\nimport { Podcast } from \"@/stores/class/general/podcast\";\nimport {\n CommentMessage,\n CommentsConfig,\n} from \"@/stores/class/config/commentsConfig\";\nimport { ListClassicReturn } from \"@/stores/class/general/listReturn\";\nimport { useI18n } from \"vue-i18n\";\n/* eslint-disable */\nconst CommentItem: any = defineAsyncComponent(() => import('./item/CommentItem.vue'));\n/* eslint-enable */\nconst ClassicPopover = defineAsyncComponent(\n () => import(\"../../misc/ClassicPopover.vue\"),\n);\n\n//Props \nconst props = defineProps({\n size: { default: 10, type: Number },\n podcast: { default: undefined, type: Object as () => Podcast },\n reload: { default: false, type: Boolean },\n answerToComment: { default: undefined, type: Number },\n isFlatList: { default: false, type: Boolean },\n stateFilter: { default: \"\", type: String },\n organisationId: { default: undefined, type: String },\n nbComments: { default: 0, type: Number },\n config: { default: undefined, type: Object as () => CommentsConfig },\n eventToHandle: { default: undefined, type: Object as () => CommentMessage },\n})\n\n//Emits\nconst emit = defineEmits([\"update:nbComments\", \"commentDeleted\"]);\n\n//Data \nconst loading = ref(false);\nconst error = ref(false);\nconst dfirst = ref(0);\nconst dsize = ref(props.size);\nconst totalCount = ref(0);\nconst sortType = ref(\"DATE_DESC\");\nconst comments: Ref<Array<CommentPodcast>> = ref([]);\nconst scrollableSection: Ref<HTMLElement | undefined> = ref(undefined);\nconst scrollComponentRef = useTemplateRef('scrollComponent');\n\n//Composables\nconst { t } = useI18n();\n\n//Computed\nconst isNotAnAnswerList = computed(() => undefined === props.answerToComment);\nconst changed = computed(() => `${props.size}|${props.reload}|${dsize.value}|${props.stateFilter}|${props.podcast?.podcastId}|${props.organisationId}`);\nconst sortChoice = computed(() =>{\n return [\n { title: t(\"The most recent\"), value: \"DATE_DESC\" },\n { title: t(\"Top comments\"), value: \"LIKE_DESC\" },\n ];\n});\n\n//Watch\nwatch(totalCount, () => {emit(\"update:nbComments\", totalCount.value)});\nwatch(changed, () => {fetchContent(true);});\nwatch(()=>props.eventToHandle, async () => {\n if (!props.eventToHandle) {\n return;\n }\n if (props.answerToComment === props.eventToHandle.comment.answerTo) {\n switch (props.eventToHandle.type) {\n case \"CREATE\":\n createComment(props.eventToHandle.comment);\n break;\n case \"UPDATE\":\n updateComment(props.eventToHandle.comment);\n break;\n case \"DELETE\":\n deleteComment(props.eventToHandle.comment.commentId);\n break;\n default:\n break;\n }\n return;\n }\n if (undefined !== props.eventToHandle.comment.answerTo) {\n const comItem = scrollComponentRef?.value?.querySelector('#comItem' + props.eventToHandle.comment.answerTo) as InstanceType<typeof CommentItem>;\n comItem?.receiveEvent(props.eventToHandle);\n }\n}, {deep: true});\n\n\nonMounted(()=>{\n fetchContent(true);\n if (isNotAnAnswerList.value) {\n scrollableSection.value = scrollComponentRef?.value as HTMLElement;\n scrollableSection.value.addEventListener(\"scroll\", handleScroll);\n }\n})\n\nonUnmounted(()=>{\n if (isNotAnAnswerList.value) {\n scrollableSection.value?.removeEventListener(\"scroll\", handleScroll);\n }\n})\n\n\n//Methods\nfunction changeSort(sortTypeUpdate: string) {\n sortType.value = sortTypeUpdate;\n fetchContent(true);\n}\nfunction handleScroll() {\n if (\n scrollableSection.value &&\n totalCount.value > comments.value.length &&\n scrollableSection.value.scrollTop +\n scrollableSection.value.clientHeight >=\n scrollableSection.value.scrollHeight\n ) {\n fetchContent(false);\n }\n}\nfunction findCommentInCommentsLoaded(commentId: number) {\n return comments.value.findIndex(\n (element: CommentPodcast) => element.commentId === commentId,\n );\n}\nfunction createComment(comment: CommentPodcast) {\n comments.value.unshift(comment);\n totalCount.value += 1;\n}\nfunction updateComment(comment: CommentPodcast) {\n const commentIndex = findCommentInCommentsLoaded(comment.commentId);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1, comment);\n }\n}\nfunction deleteComment(commentIdToDelete: number) {\n const commentIndex = findCommentInCommentsLoaded(commentIdToDelete);\n if (-1 !== commentIndex) {\n comments.value.splice(commentIndex, 1);\n totalCount.value -= 1;\n emit(\"commentDeleted\", commentIdToDelete);\n }\n}\nasync function fetchContent(reset: boolean): Promise<void> {\n if (loading.value) {\n return;\n }\n loading.value = true;\n if (reset) {\n dfirst.value = 0;\n comments.value.length = 0;\n }\n const param = {\n first: dfirst.value,\n size: dsize.value,\n podcastId: props.podcast?.podcastId,\n sort: sortType.value,\n answerTo: props.answerToComment,\n hideAnswers: !props.isFlatList,\n state: props.stateFilter.length ? props.stateFilter : undefined,\n organisationId: props.organisationId,\n };\n try {\n const data = await classicApi.fetchData<\n ListClassicReturn<CommentPodcast>\n >({\n api: 2,\n path: \"comment/list\",\n parameters: param,\n });\n if (reset) {\n comments.value.length = 0;\n }\n comments.value.push(...data.result);\n totalCount.value = data.count;\n dfirst.value += dsize.value;\n loading.value = false;\n } catch (errorWs) {\n // Errors sometimes occur, and shouldn't trigger anything too drastic,\n // so we only log it, instead of using handle403\n console.error(errorWs);\n error.value = true;\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n.octopus-app {\n .scrolling-comments {\n max-height: 715px;\n overflow-y: auto;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6EA,MAAM,cAAmB,2BAA2B,OAAO,6BAAyB;EAEpF,MAAM,iBAAiB,2BACf,OAAO,iCAAA,MAAA,MAAA,EAAA,CAAA,CACf;EAGA,MAAM,QAAQ;EAcd,MAAM,OAAO;EAGb,MAAM,UAAU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AAW,KAAK,GAAA,CAAA,OAAA,CAAA;wBAExC,WAAW,KAAK,GAAA,IAAA,UAAA;;;;;GAIb,OAAA,WAAO,CAAK,OAAA,SAAK,MAAU,OAAA,cAAA,UAAA,GAAvC,mBAEM,OAFN,YAEM,gBADD,OAAA,EAAC,aAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA;EAEN,mBA0BM,OAAA;GAzBJ,KAAI;GACH,OAAK,eAAE,OAAA,oBAAiB,uBAAA,EAAA;;qBAEzB,mBAUE,UAAA,MAAA,WATwB,OAAA,WAAhB,GAAG,aAAQ;wBADrB,YAUE,OAAA,gBAAA;KARC,IAAE,YAAc,EAAE;KAClB,KAAK,EAAE;KACA,SAAS,OAAA,SAAS;qCAAT,OAAA,SAAS,YAAQ;KACjC,SAAS,OAAA;KACT,gBAAc,OAAA;KACd,QAAQ,OAAA;KACR,mBAAiB,OAAA;KACjB,kBAAc,WAAE,OAAA,cAAc,EAAE,SAAS;;;;;;;;;;;;GAE5C,YAGE,OAAA,mBAAA;IAFC,gBAAc,OAAA,WAAO,CAAK,OAAA,QAAQ,OAAA,EAAC,qBAAA,IAA0B,KAAA;IAC7D,cAAY,OAAA,QAAQ,OAAA,EAAC,wBAAA,IAA6B,KAAA;;IAG5C,OAAA,qBAAqB,OAAA,SAAS,OAAA,QAAQ,OAAA,cAAA,UAAA,GAD/C,mBAMS,UAAA;;IAJP,OAAM;IACL,OAAO,OAAA,EAAC,UAAA;OAET,YAAY,OAAA,WAAA,CAAA,GAAA,GAAA,UAAA,KAAA,mBAAA,QAAA,IAAA"}
@@ -30,8 +30,8 @@ var CommentMoreActions_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
30
30
  setup(__props, { expose: __expose, emit: __emit }) {
31
31
  __expose();
32
32
  const ClassicPopover = defineAsyncComponent(() => import("./ClassicPopover-BIyLKorz.mjs").then((n) => n.n));
33
- const ReportAbuseModal = defineAsyncComponent(() => import("./ReportAbuseModal-Cn4dKNYU.mjs"));
34
- const EditCommentModal = defineAsyncComponent(() => import("./EditCommentModal-7vDcLEPD.mjs"));
33
+ const ReportAbuseModal = defineAsyncComponent(() => import("./ReportAbuseModal-Dhr0wNeN.mjs"));
34
+ const EditCommentModal = defineAsyncComponent(() => import("./EditCommentModal-Bs7nuqdq.mjs"));
35
35
  const MessageModal = defineAsyncComponent(() => import("./MessageModal-B35dCbWB.mjs").then((n) => n.n));
36
36
  const props = __props;
37
37
  const emit = __emit;
@@ -283,4 +283,4 @@ var CommentMoreActions_default = /*#__PURE__*/ _plugin_vue_export_helper_default
283
283
  //#endregion
284
284
  export { CommentMoreActions_default as default };
285
285
 
286
- //# sourceMappingURL=CommentMoreActions-CB8419fO.mjs.map
286
+ //# sourceMappingURL=CommentMoreActions-BR4CRRey.mjs.map