{"version":3,"file":"editor_controller-Dlp1HaId.js","sources":["../../../app/javascript/controllers/journeys/editor_controller.js"],"sourcesContent":["import LineController from \"./line_controller\"\nimport { StraightConnector, BlankEndpoint } from \"@jsplumb/browser-ui\"\n\nexport default class extends LineController {\n static values = {\n showPane: { type: Boolean, default: true },\n changed: { type: Boolean, default: false },\n name: String,\n triggerId: String,\n }\n\n static targets = [\n \"draggable\",\n \"trigger\",\n \"dropzone\",\n \"triggerInput\",\n \"triggerKindInput\",\n \"openModalButton\",\n \"anyChannelCheckbox\",\n \"channelsConflictIcon\",\n \"saveChangesButton\",\n \"submitButton\",\n 'canvas',\n \"pane\",\n \"disabledConditionWithTooltip\",\n \"conditionDraggable\",\n \"step\",\n \"disabledJumpWithTooltip\",\n \"jumpDraggable\",\n ]\n\n initialize() {\n this.changedNameValue = this.nameValue\n\n this.isPanning = false\n this.startX = 0\n this.startY = 0\n this.translateX = 0\n this.translateY = 0\n\n this.velocityX = 0\n this.velocityY = 0\n this.momentumInterval = null\n\n this.intersectionObserverCallback = this.intersectionObserverCallback.bind(this)\n this.paneObserver = new IntersectionObserver(this.intersectionObserverCallback, {\n root: null,\n threshold: 0.1,\n })\n\n this.onMouseWheel = this.onMouseWheel.bind(this)\n this.onMouseUp = this.onMouseUp.bind(this)\n this.onMouseLeave = this.onMouseLeave.bind(this)\n this.onMouseDown = this.onMouseDown.bind(this)\n this.onMouseMove = this.onMouseMove.bind(this)\n\n this.preventClickAfterDrag = this.preventClickAfterDrag.bind(this)\n this.clickableElementClicked = false;\n this.expanded = false\n\n super.initialize()\n }\n\n connect() {\n this.element.addEventListener('wheel', this.onMouseWheel)\n this.element.addEventListener('mouseup', this.onMouseUp)\n\n this.element.addEventListener('mouseleave', this.onMouseLeave)\n this.element.addEventListener('mousedown', this.onMouseDown)\n\n this.element.addEventListener('mousemove', this.onMouseMove)\n\n this.initialLine = this.draw(document.getElementById(\"start_label\"), document.getElementById(\"end_label\"), this.defaultDrawOptions)\n\n if (this.showPaneValue) {\n setTimeout(() => {\n window.dispatchEvent(\n new CustomEvent(\"step:toggle\", {\n bubbles: true,\n cancelable: true,\n detail: \"journeys--editor_pane\",\n })\n )\n this.triggerTarget.classList.add(\"halo--active\")\n }, 1)\n }\n\n window.triggerId = this.triggerIdValue\n\n if (!this.showPaneValue) {\n // when the journey is being edited\n // steps are added and connected to each other via JS. Which sets this.changedValue to true\n // although the journey hasn't changed.\n // Wait until all steps are connected to each other and set this.changedValue back to false\n setTimeout(() => {\n this.changedValue = false\n }, 1)\n }\n\n super.connect()\n }\n\n disconnect() {\n this.element.removeEventListener('wheel', this.onMouseWheel)\n this.element.removeEventListener('mouseup', this.onMouseUp)\n\n this.element.removeEventListener('mouseleave', this.onMouseLeave)\n this.element.removeEventListener('mousedown', this.onMouseDown)\n\n this.element.removeEventListener('mousemove', this.onMouseMove)\n\n this.instance.deleteConnection(this.initialLine)\n }\n\n onMouseWheel(e) {\n if (this.disabledPanning) return\n\n e.preventDefault()\n\n this.translateX -= e.deltaX\n this.translateY -= e.deltaY\n\n this.canvasTarget.style.transform = `translate3D(${this.translateX}px, ${this.translateY}px, 0)`\n }\n\n onMouseUp() {\n if (this.disabledPanning) return\n\n this.isPanning = false\n\n // If we were on a clickable element when mousedown happened, and we're still panning/dragging\n if (this.clickableElementClicked) {\n // Keep the click prevention listener active for a short time after mouseup\n this.nextTick(() => {\n document.removeEventListener('click', this.preventClickAfterDrag, true)\n this.clickableElementClicked = false\n }, 100) // 100ms is usually enough to catch the click event\n }\n\n this.element.classList.remove('cursor-grabbing')\n this.element.classList.add('cursor-grab')\n\n const applyMomentum = () => {\n this.translateX += this.velocityX\n this.translateY += this.velocityY\n\n this.canvasTarget.style.transform = `translate3D(${this.translateX}px, ${this.translateY}px, 0)`\n\n this.velocityX *= 0.9\n this.velocityY *= 0.9\n\n if (Math.abs(this.velocityX) >= 0.1 || Math.abs(this.velocityY) >= 0.1) {\n requestAnimationFrame(applyMomentum)\n }\n }\n\n requestAnimationFrame(applyMomentum)\n }\n\n onMouseLeave() {\n if(this.disabledPanning) return\n\n this.isPanning = false\n\n this.element.classList.remove('cursor-grabbing')\n this.element.classList.add('cursor-grab')\n }\n\n onMouseDown(event) {\n if(this.disabledPanning) return\n\n const { clientX, clientY, srcElement } = event\n\n // Prepare for disabling click that opens the step pane when drag starts inside a step button.\n // We don't prevent default here because we want to allow the drag to start\n if(srcElement.closest('[data-step]') || srcElement.closest('[data-kind]') || srcElement.closest('#start')) {\n this.clickableElementClicked = true\n }\n\n this.isPanning = true\n this.startX = clientX - this.translateX\n this.startY = clientY - this.translateY\n\n this.element.classList.remove('cursor-grab')\n this.element.classList.add('cursor-grabbing')\n }\n onMouseMove(event) {\n if (!this.isPanning || this.disabledPanning) return\n\n // If there's any significant movement, we're dragging, not clicking\n\n const hasMovedSignificantly = Math.abs(event.clientX - this.startX - this.translateX) > 5\n || Math.abs(event.clientY - this.startY - this.translateY) > 5\n\n if (this.clickableElementClicked && hasMovedSignificantly) {\n document.addEventListener('click', this.preventClickAfterDrag, true)\n }\n\n const { movementX, movementY } = event\n\n const deltaX = movementX\n const deltaY = movementY\n\n this.velocityX = deltaX\n this.velocityY = deltaY\n\n this.translateX += deltaX\n this.translateY += deltaY\n\n this.canvasTarget.style.transform = `translate3D(${this.translateX}px, ${this.translateY}px, 0)`\n }\n\n preventClickAfterDrag(event) {\n event.stopPropagation()\n event.preventDefault()\n\n document.removeEventListener('click', this.preventClickAfterDrag, true)\n this.clickableElementClicked = false\n }\n\n\n intersectionObserverCallback(entries) {\n const anyIntersecting = entries.some(entry => entry.isIntersecting)\n\n if (anyIntersecting) {\n this.disablePanning()\n window.dispatchEvent(new CustomEvent(\"step:disable-dragging\"))\n } else {\n this.enablePanning()\n window.dispatchEvent(new CustomEvent(\"step:enable-dragging\"))\n }\n }\n\n disablePanning() {\n this.disabledPanning = true\n this.element.classList.remove('cursor-grab')\n }\n\n enablePanning() {\n this.disabledPanning = false\n this.element.classList.add('cursor-grab')\n }\n\n onWindowSizeChange() {\n this.instance.repaintEverything()\n }\n\n redrawLine({ detail }) {\n this.changedValue = true\n\n this.submitButtonTarget.disabled = document.querySelectorAll(\"[data-kind]\").length === 0 && this.allStepsAreValid\n\n if (detail.target !== this.element.id) return\n this.instance.deleteConnection(this.initialLine)\n\n this.initialLine = this.draw(\n document.getElementById(\"start_label\"),\n document.getElementById(detail.replaceWith),\n this.defaultDrawOptions\n )\n\n this.dropzoneTarget.setAttribute(\"data-child\", detail.replaceWith)\n }\n\n repositionLines() {\n this.instance.repaintEverything()\n }\n\n reactivateSubmitButtons() {\n if (this.allStepsAreValid && window.triggerId) {\n document\n .querySelectorAll(\"input[type='submit']\")\n .forEach((submitInput) => {\n submitInput.disabled = false\n })\n }\n this.submitButtonTarget.disabled =\n document.querySelectorAll(\"[data-step]\").length === 0 &&\n this.allStepsAreValid\n this.changedValue = false\n }\n\n removeActiveClass() {\n setTimeout(() => {\n this.triggerTarget.classList.remove(\"halo--active\")\n }, 0)\n }\n\n showDropzone({ detail }) {\n this.changedValue = true\n\n if (detail.target === this.element.id || detail.parent === this.element.id) {\n this.instance.deleteConnection(this.initialLine)\n this.initialLine = this.draw(\n document.getElementById(\"start_label\"),\n document.getElementById(detail.child || \"end_label\"),\n this.defaultDrawOptions\n )\n\n this.instance.repaintEverything()\n this.dropzoneTarget.setAttribute(\"data-child\", detail.child)\n setTimeout(() => this.instance.repaintEverything(), 0)\n }\n this.submitButtonTarget.disabled =\n document.querySelectorAll(\"[data-step]\").length === 0 &&\n this.allStepsAreValid\n }\n\n alertUserAboutUnsavedChanges(e) {\n if(window.paneId) {\n window.dispatchEvent(\n new CustomEvent(\"pane:alert\", { detail: this.element.id })\n )\n\n return\n }\n\n\n if (this.changedValue || this.changedNameValue !== this.nameValue) {\n this.openModalButtonTarget.click()\n e.preventDefault()\n }\n }\n\n setUnsavedChangesToFalse() {\n this.changedValue = false\n }\n\n showConflictIcon() {\n this.channelsConflictIconTarget.classList.remove(\"hidden\")\n }\n\n hideConflictIcon() {\n if (document.querySelectorAll(\"[data-conflict]\").length === 0) {\n this.channelsConflictIconTarget.classList.add(\"hidden\")\n }\n }\n\n setTrigger({ dataset }) {\n this.dispatch(\"trigger:changed\", {\n detail: dataset.trigger,\n target: document.documentElement,\n })\n\n if (dataset.anyChannel === \"true\") {\n window.triggerIsChannel = true\n this.anyChannelCheckboxTarget.checked = true\n } else {\n window.triggerIsChannel = false\n this.anyChannelCheckboxTarget.checked = false\n }\n\n if (dataset.journeyChannels === \"true\") {\n window.triggerIsChannel = true\n this.triggerKindInputTarget.checked = true\n this.anyChannelCheckboxTarget.checked = false\n } else {\n this.triggerKindInputTarget.checked = false\n }\n\n this.triggerIdValue = window.triggerId = dataset.trigger\n\n if (window.triggerId) {\n this.saveChangesButtonTarget.disabled = false\n\n if (\n document.querySelectorAll(\"[data-step]\").length > 1 &&\n this.allStepsAreValid\n ) {\n this.submitButtonTarget.disabled = false\n }\n }\n\n setTimeout(() => {\n if (this.invalidStepPresent) {\n document\n .querySelectorAll(\"input[type='submit']\")\n .forEach((submitInput) => {\n submitInput.disabled = true\n })\n }\n }, 500) // sync event bus for event management\n this.changedValue = true\n }\n\n // happens when journey name is changed without errors\n setNameValue(e) {\n this.changedNameValue = e.dataset.name\n }\n\n resetNameToDefaultValue() {\n this.changedNameValue = this.nameValue\n }\n\n paneTargetConnected(item) {\n this.paneObserver.observe(item)\n }\n\n paneTargetDisconnected(item) {\n this.paneObserver.unobserve(item)\n\n this.enablePanning()\n window.dispatchEvent(new CustomEvent(\"step:enable-dragging\"))\n }\n\n expand() {\n this.expanded = true\n\n if(this.stepTargets.length > 0) {\n this.show(this.jumpDraggableTarget)\n this.hide(this.disabledJumpWithTooltipTarget)\n }\n }\n\n // private\n\n stepTargetConnected() {\n if(this.expanded) {\n this.show(this.jumpDraggableTarget)\n this.hide(this.disabledJumpWithTooltipTarget)\n }\n }\n\n triggerIdValueChanged() {\n if(this.triggerIdValue) {\n this.hide(this.disabledConditionWithTooltipTarget)\n this.show(this.conditionDraggableTarget)\n }\n }\n\n get defaultDrawOptions() {\n return {\n fromOptions: this.blankEndpoint(\"Bottom\"),\n toOptions: this.blankEndpoint(\"Top\"),\n lineOptions: StraightConnector.type,\n }\n }\n\n get invalidStepPresent() {\n return document.querySelectorAll(\"[data-invalid]\").length > 0\n }\n\n get allStepsAreValid() {\n return !this.invalidStepPresent\n }\n}\n"],"names":["editor_controller","LineController","applyMomentum","event","clientX","clientY","srcElement","hasMovedSignificantly","movementX","movementY","deltaX","deltaY","entries","entry","detail","submitInput","dataset","item","StraightConnector","__publicField"],"mappings":"6NAGe,MAAKA,UAASC,CAAe,CA4B1C,YAAa,CACX,KAAK,iBAAmB,KAAK,UAE7B,KAAK,UAAY,GACjB,KAAK,OAAS,EACd,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,WAAa,EAElB,KAAK,UAAY,EACjB,KAAK,UAAY,EACjB,KAAK,iBAAmB,KAExB,KAAK,6BAA+B,KAAK,6BAA6B,KAAK,IAAI,EAC/E,KAAK,aAAe,IAAI,qBAAqB,KAAK,6BAA8B,CAC9E,KAAM,KACN,UAAW,EACZ,CAAA,EAED,KAAK,aAAe,KAAK,aAAa,KAAK,IAAI,EAC/C,KAAK,UAAY,KAAK,UAAU,KAAK,IAAI,EACzC,KAAK,aAAe,KAAK,aAAa,KAAK,IAAI,EAC/C,KAAK,YAAc,KAAK,YAAY,KAAK,IAAI,EAC7C,KAAK,YAAc,KAAK,YAAY,KAAK,IAAI,EAE7C,KAAK,sBAAwB,KAAK,sBAAsB,KAAK,IAAI,EACjE,KAAK,wBAA0B,GAC/B,KAAK,SAAW,GAEhB,MAAM,WAAU,CACpB,CAEE,SAAU,CACR,KAAK,QAAQ,iBAAiB,QAAS,KAAK,YAAY,EACxD,KAAK,QAAQ,iBAAiB,UAAW,KAAK,SAAS,EAEvD,KAAK,QAAQ,iBAAiB,aAAc,KAAK,YAAY,EAC7D,KAAK,QAAQ,iBAAiB,YAAa,KAAK,WAAW,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