{"version":3,"file":"component_controller-wcNDYWtW.js","sources":["../../../app/frontend/javascript/controllers/main/lazy-partial_controller.js","../../../app/components/comments/comment/component_controller.js","../../../app/components/comments/comment_form_inputs/discussion_relation/component_controller.js","../../../app/components/comments/comment_form_inputs/trix_editor/component_controller.js","../../../app/components/comments/comment_thread/component_controller.js","../../../app/components/comments/endorse_cta/component_controller.js","../../../app/components/comments/index/component_controller.js","../../../app/components/comments/new_comment_thread/component_controller.js"],"sourcesContent":["import { Controller } from '@hotwired/stimulus';\nimport CurrentUser from '@frontend/app/features/CurrentUser';\nimport { get } from '@rails/request.js';\nimport { runWhenDomLoaded } from '@frontend/utils/dom';\n\n/*\n * Useful to asynchronously load dynamic content.\n * Use cases:\n * - loading dynamic parts on a cached page, e.g. the article page\n * - load paginated content, e.g. article teasers.\n *\n * Build to be attached to placeholder tags (e.g. a `<div>`) or `<a>`-tags.\n *\n * == Examples\n *\n * <div data-controller=\"lazy-partial\"></div> // The div will be replaced with the dynamically loaded content\n * <a href=\"/articles?page=2\" data-controller=\"lazy-partial\">Load more</a>\n *\n * */\nexport default class extends Controller {\n static values = {\n path: String,\n skipLoading: Boolean,\n requiredRoles: Array,\n };\n static targets = ['container'];\n\n connect() {\n this.element.addEventListener(\n 'lazy-partial:reload',\n this.reload.bind(this)\n );\n const userRoles = CurrentUser.roles();\n const requiresRole = this.requiredRolesValue.length > 0;\n const userHasRequiredRole =\n this.requiredRolesValue.filter((role) => userRoles.includes(role))\n .length > 0;\n const skipLoading =\n this.skipLoadingValue || (requiresRole && !userHasRequiredRole);\n\n if (false === skipLoading) {\n runWhenDomLoaded(this.load.bind(this, true));\n }\n\n if (this.requiredRolesValue.length > 0 && false === userHasRequiredRole) {\n this.element.remove();\n }\n }\n\n reload(event) {\n event.preventDefault();\n\n // debugger;\n let path = undefined;\n if (event.params) {\n path = event.params.path;\n }\n const { lazyPartialPath } = event.currentTarget.dataset;\n if (lazyPartialPath || path) {\n this.pathValue = lazyPartialPath || path;\n }\n\n this.load(false);\n }\n\n scrollToAnchor(parentElement) {\n const targetElementID = window.location.hash;\n const targetElement =\n targetElementID.length > 0\n ? parentElement.querySelector(targetElementID)\n : false;\n\n if (targetElement) {\n targetElement.scrollIntoView();\n }\n }\n\n async load(scrollToAnchor = false) {\n const response = await get(this.pathValue);\n if (response.ok) {\n const html = await response.text;\n const parentElement = this.hasContainerTarget\n ? this.containerTarget\n : this.element;\n\n if (this.hasContainerTarget) {\n this.containerTarget.innerHTML = html;\n } else {\n this.element.outerHTML = html;\n }\n\n // If the current url references a valid anchor, we attemp to scroll to it. Useful to deep-link to parts\n // of dynamically loaded content, e.g. a comment in the comment system.\n if (scrollToAnchor) {\n this.scrollToAnchor(parentElement);\n }\n }\n }\n}\n\nexport function reload(targetEl) {\n targetEl.dispatchEvent(\n new CustomEvent('lazy-partial:reload', { bubbles: true })\n );\n}\n","import { Controller } from '@hotwired/stimulus';\nimport CurrentUser from '@frontend/app/features/CurrentUser';\nimport { runWhenDomLoaded } from '@frontend/utils/dom';\n\nexport default class extends Controller {\n static targets = [\n 'submitButton',\n 'deleteButton',\n 'editButton',\n 'flagButton',\n 'bodyContainer',\n 'expandBodyButton',\n ];\n\n static values = { authorId: Number };\n\n connect() {\n if (\n CurrentUser.id() == this.authorIdValue ||\n CurrentUser.isAuthor() ||\n CurrentUser.isAdmin()\n ) {\n if (this.hasDeleteButtonTarget) this.deleteButtonTarget.hidden = false;\n }\n\n if (CurrentUser.id() == this.authorIdValue) {\n if (this.hasEditButtonTarget) this.editButtonTarget.hidden = false;\n }\n\n if (CurrentUser.isAuthor() || CurrentUser.isAdmin()) {\n if (this.hasFlagButtonTarget) this.flagButtonTarget.hidden = false;\n }\n\n if (this.hasBodyContainerTarget) {\n // NB: If the element is not fully rendered initally (because it is collapsed in a thread) we need to recalculate\n // the required height vs.the visible content (limited by line-clamp)\n this.element.addEventListener(\n 'comments--comment--component:update-read-more-button-visibility',\n this.handleUpdateReadMoreVisibilityEvent.bind(this)\n );\n\n // NB: We have to wait for the CSS being parsed and applied before the body clamping effect can be calculuated\n runWhenDomLoaded(this.updateReadMoreButtonVisibility.bind(this));\n\n this.updateReadMoreButtonVisibility();\n }\n }\n\n handleUpdateReadMoreVisibilityEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n\n this.updateReadMoreButtonVisibility();\n }\n\n updateReadMoreButtonVisibility() {\n const bodyIsClamped =\n this.bodyContainerTarget.scrollHeight >\n this.bodyContainerTarget.clientHeight;\n this.expandBodyButtonTarget.hidden = !bodyIsClamped;\n }\n\n disableSubmit() {\n this.submitButtonTarget.disabled = true;\n }\n\n enableSubmit() {\n this.submitButtonTarget.disabled = false;\n }\n\n expandBody() {\n this.expandBodyButtonTarget.hidden = true;\n this.bodyContainerTarget.classList.add('is-expanded');\n }\n}\n\nexport function updateReadMoreButtonVisibility(commentElement) {\n commentElement.dispatchEvent(\n new CustomEvent(\n 'comments--comment--component:update-read-more-button-visibility'\n )\n );\n}\n","import { Controller } from '@hotwired/stimulus';\nimport CurrentPage from '@frontend/app/features/CurrentPage';\nimport CurrentUser from '@frontend/app/features/CurrentUser';\n\nexport default class extends Controller {\n static targets = ['input'];\n\n connect() {\n const userId = CurrentUser.id();\n if (userId === CurrentPage.getArticleAuthorId()) {\n this.inputTarget.value = 'Autor:in';\n } else if (userId === CurrentPage.getArticleConversationHostId()) {\n this.inputTarget.value = 'Diskussionsleiter:in';\n }\n }\n}\n","import { Controller } from '@hotwired/stimulus';\n\nimport Trix from 'trix';\n\nTrix.config.lang.bold = 'Fett';\nTrix.config.lang.italic = 'Kursiv';\nTrix.config.lang.strike = 'Durchgestrichen';\nTrix.config.lang.urlPlaceholder = 'Link einfügen…';\n\nexport default class extends Controller {\n static targets = ['input', 'trixEditor', 'toolbar'];\n static values = {\n enabled: { type: Boolean, default: false },\n };\n\n connect() {\n this.form = this.inputTarget.form;\n this.form.addEventListener('ajax:beforeSend', this.disable.bind(this));\n this.form.addEventListener('ajax:error', this.enable.bind(this));\n this.form.addEventListener('ajax:success', this.reset.bind(this));\n\n this.trixEditorTarget.addEventListener(\n 'trix-selection-change',\n this.showToolbar.bind(this)\n );\n\n if (this.enabledValue) {\n this.enable();\n }\n }\n\n showToolbar() {\n const [start, end] = this.editor.getSelectedRange();\n if (start === end) {\n this.toolbarTarget.hidden = true;\n return;\n }\n\n let { left, top } = this.editor.getClientRectAtPosition(start);\n top = window.pageYOffset + top - this.toolbarTarget.clientHeight;\n this.toolbarTarget.style.left = `${left}px`;\n this.toolbarTarget.style.top = `${top}px`;\n this.toolbarTarget.hidden = false;\n }\n\n hideToolbar() {\n this.toolbarTarget.hidden = true;\n }\n\n disable() {\n this.trixEditorTarget.contentEditable = false;\n this.isDisabled = true;\n }\n\n enable() {\n this.trixEditorTarget.contentEditable = true;\n this.isDisabled = false;\n }\n\n reset() {\n this.editor.loadHTML('');\n this.enable();\n }\n\n submitForm(event) {\n if (this.isDisabled) {\n event.preventDefault();\n }\n }\n\n get editor() {\n return this.trixEditorTarget.editor;\n }\n}\n","import Trix from 'trix';\nimport { Controller } from '@hotwired/stimulus';\nimport { show } from '@frontend/utils/dom';\nimport { updateReadMoreButtonVisibility } from '@components/comments/comment/component_controller';\n\nexport default class extends Controller {\n static targets = ['expandButton', 'comment', 'replyToContainer'];\n\n connect() {\n this.trixEditor = this.element.querySelector('trix-editor');\n\n if (this.hasExpandButtonTarget) {\n if (this.commentTargets.length > 1) {\n show(this.expandButtonTarget);\n show(this.commentTargets[this.commentTargets.length - 1]);\n } else {\n this.expand();\n }\n }\n\n this.element.addEventListener(\n 'comments--comment-thread--component:show-all-replies',\n this.handleExpandCommentsInThread.bind(this)\n );\n }\n\n // NB: For a CSS selector to work, we are removing and not just hiding the button.\n expand() {\n if (this.hasExpandButtonTarget) {\n this.expandButtonTarget.remove();\n }\n this.showAllReplies();\n }\n\n handleExpandCommentsInThread(event) {\n event.preventDefault();\n event.stopPropagation();\n\n this.expand();\n }\n\n showAllReplies() {\n this.commentTargets.forEach((element) => {\n show(element);\n const commentComponent = element.children[0];\n updateReadMoreButtonVisibility(commentComponent);\n });\n }\n\n replyTo() {\n this.replyToContainerTarget.hidden = false;\n this.trixEditor.scrollIntoView({ behavior: 'smooth', block: 'start' });\n this.editor.setSelectedRange(0);\n this.editor.loadHTML('');\n\n const { userId, userFullName } = event.params;\n const content = `<a class=\"user-mention\" data-controller=\"user-mention\" data-user-mention-user-id-value=\"${userId}\">@${userFullName}</a>`;\n const attachment = new Trix.Attachment({\n content: content,\n contentType: 'inline-element',\n });\n this.editor.insertAttachment(attachment);\n this.editor.insertString(' ');\n }\n\n resetReplyToForm() {\n this.editor.loadHTML('');\n this.replyToContainerTarget.hidden = true;\n this.element.querySelector('[name=\"comment[discussion_relation]\"]').value =\n '';\n this.element.querySelector('[name=\"comment[intent]\"]').value = '';\n }\n\n get editor() {\n return this.trixEditor.editor;\n }\n}\n\nexport function expandCommentsInThread(element) {\n element.dispatchEvent(\n new CustomEvent('comments--comment-thread--component:show-all-replies', {\n bubbles: true,\n })\n );\n}\n","import { Controller } from '@hotwired/stimulus';\nimport CurrentUser from '@frontend/app/features/CurrentUser';\n\nexport default class extends Controller {\n static values = { commentId: Number };\n static targets = ['counter'];\n\n connect() {\n this.element.addEventListener('ajax:success', this.update.bind(this));\n this.updateBulbVisibility();\n }\n\n update(event) {\n const [data] = event.detail;\n\n if (data.endorsed_by_user_ids.includes(CurrentUser.id())) {\n CurrentUser.addEndorsedComment(this.commentIdValue);\n } else {\n CurrentUser.removeEndorsedComment(this.commentIdValue);\n }\n this.counterTarget.innerText = data.endorsed_by_user_ids.length;\n this.updateBulbVisibility();\n }\n\n updateBulbVisibility() {\n this.element.classList.toggle(\n 'is-active',\n CurrentUser.endorsedComments().includes(this.commentIdValue)\n );\n }\n}\n","import { Controller } from '@hotwired/stimulus';\nimport { expandCommentsInThread } from '@components/comments/comment_thread/component_controller';\nimport { updateReadMoreButtonVisibility } from '@components/comments/comment/component_controller';\nimport { reload as reloadLazyPartial } from '@controllers/main/lazy-partial_controller';\nimport { displayReset, hide, runWhenDomLoaded } from '@frontend/utils/dom';\n\nexport default class extends Controller {\n static targets = [\n 'commentThreadsContainer',\n 'showAllCommentThreadsButton',\n 'comment',\n 'lazyPartial',\n ];\n\n connect() {\n runWhenDomLoaded(this.handleDocumentLoaded.bind(this));\n }\n\n reload(_event) {\n if (this.hasShowAllCommentThreadsButtonTarget) {\n this.showAllCommentThreads();\n }\n\n reloadLazyPartial(this.lazyPartialTarget);\n }\n\n handleDocumentLoaded() {\n const commentIdHashRegexp = /#comment-(\\d+)/;\n const result = window.location.hash.match(commentIdHashRegexp);\n if (result) {\n const commentId = parseInt(result[1]);\n this.scrollToCommentById(commentId);\n }\n }\n\n showAllCommentThreads() {\n hide(this.showAllCommentThreadsButtonTarget);\n displayReset(this.commentThreadsContainerTarget);\n this.commentTargets.forEach((target) =>\n updateReadMoreButtonVisibility(target)\n );\n }\n\n scrollToComment(event) {\n this.scrollToCommentById(event.params.id);\n }\n\n scrollToCommentById(id) {\n if (this.hasShowAllCommentThreadsButtonTarget) {\n this.showAllCommentThreads();\n }\n\n const commentId = `#comment-${id}`;\n const commentElement = this.element.querySelector(commentId);\n expandCommentsInThread(commentElement);\n\n // NB: The scroll event is called more often than every 100ms, so whenever\n // scrolling ended, the event handler will be cleared.\n let scrollTimeout;\n window.addEventListener('scroll', function callback() {\n clearTimeout(scrollTimeout);\n scrollTimeout = setTimeout(() => {\n window.location.hash = commentId;\n window.removeEventListener('scroll', callback);\n }, 100);\n });\n\n commentElement.scrollIntoView({ behavior: 'instant', block: 'start' });\n }\n}\n","import { Controller } from '@hotwired/stimulus';\nimport { show, hide } from '@frontend/utils/dom';\n\nexport default class extends Controller {\n static targets = [\n 'trixEditor',\n 'intentAndDiscussionRelation',\n 'characterCounter',\n 'submitButton',\n ];\n\n connect() {\n this.element.addEventListener('trix-focus', this.expandForm.bind(this));\n this.reset();\n }\n\n collapseForm() {\n this.isCollapsed = true;\n hide(this.intentAndDiscussionRelationTarget);\n hide(this.characterCounterTarget);\n hide(this.submitButtonTarget);\n }\n\n expandForm() {\n if (this.isCollapsed) {\n this.isCollapsed = false;\n this.element.classList.remove('is-collapsed');\n show(this.intentAndDiscussionRelationTarget);\n show(this.characterCounterTarget);\n show(this.submitButtonTarget);\n }\n }\n\n reset() {\n this.isCollapsed = true;\n this.element.classList.add('is-collapsed');\n this.enableSubmit();\n this.collapseForm();\n }\n\n disableSubmit() {\n this.submitButtonTarget.disabled = true;\n }\n\n enableSubmit() {\n this.submitButtonTarget.disabled = false;\n }\n}\n"],"names":["lazyPartial_controller","Controller","userRoles","CurrentUser","requiresRole","userHasRequiredRole","role","runWhenDomLoaded","event","path","lazyPartialPath","parentElement","targetElementID","targetElement","scrollToAnchor","response","get","html","__publicField","reload","targetEl","CommentsCommentController","bodyIsClamped","updateReadMoreButtonVisibility","commentElement","CommentsCommentFormInputsDiscussionRelationController","userId","CurrentPage","Trix","CommentsCommentFormInputsTrixEditorController","start","end","left","top","CommentsCommentThreadController","show","element","commentComponent","userFullName","content","attachment","expandCommentsInThread","CommentsEndorseCtaController","data","CommentsIndexController","_event","reloadLazyPartial","commentIdHashRegexp","result","commentId","hide","displayReset","target","id","scrollTimeout","callback","CommentsNewCommentThreadController"],"mappings":"wbAmBe,MAAKA,UAASC,CAAW,CAQtC,SAAU,CACR,KAAK,QAAQ,iBACX,sBACA,KAAK,OAAO,KAAK,IAAI,CACtB,EACD,MAAMC,EAAYC,EAAY,MAAO,EAC/BC,EAAe,KAAK,mBAAmB,OAAS,EAChDC,EACJ,KAAK,mBAAmB,OAAQC,GAASJ,EAAU,SAASI,CAAI,CAAC,EAC9D,OAAS,GAEZ,KAAK,kBAAqBF,GAAgB,CAACC,KAEzC,IACFE,EAAiB,KAAK,KAAK,KAAK,KAAM,EAAI,CAAC,EAGzC,KAAK,mBAAmB,OAAS,GAAeF,IAAV,IACxC,KAAK,QAAQ,OAAQ,CAE3B,CAEE,OAAOG,EAAO,CACZA,EAAM,eAAgB,EAGtB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