n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 2.2 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`80d25bb7-ed6c-41df-a6c9-3638a0c5fce6`,e._sentryDebugIdIdentifier=`sentry-dbid-80d25bb7-ed6c-41df-a6c9-3638a0c5fce6`)})()}catch{}import{$ as e,C as t,E as n,Ft as r,N as i,Sn as a,Wt as o,X as s,Z as c,_n as l,w as u}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as d}from"./core-Bz5WjPxS.js";import{t as f}from"./_plugin-vue_export-helper-CIL7EULb.js";import{t as p}from"./useRootStore-XEREVjMN.js";import{t as m}from"./WorkflowDiffView-3sYvCstO.js";var h=f(i({__name:`DemoDiffView`,setup(i){let f=p(),h=d(),g=r(void 0),_=r(void 0),v=r(!1);function y(e){return e==null?!0:typeof e==`object`&&`nodes`in e&&`connections`in e}function b(){window.parent&&window.parent.postMessage(JSON.stringify({command:`n8nReady`,version:f.versionCli}),`*`)}async function x(e){if(!(!e||typeof e.data!=`string`||!e.data?.includes?.(`"command"`)))try{let t=JSON.parse(e.data);if(t&&t.command===`openDiff`){if(!y(t.oldWorkflow)||!y(t.newWorkflow))return;g.value=t.oldWorkflow??void 0,_.value=t.newWorkflow??void 0,v.value=t.tidyUp===!0}}catch{}}return s(()=>{window.addEventListener(`message`,x),b()}),c(()=>{window.removeEventListener(`message`,x)}),(r,i)=>(e(),n(`div`,{class:l(r.$style.demoDiffView)},[g.value||_.value?(e(),u(m,{key:0,"source-workflow":g.value,"target-workflow":_.value,"source-label":o(h).baseText(`workflowDiff.label.before`),"target-label":o(h).baseText(`workflowDiff.label.after`),"tidy-up":v.value},null,8,[`source-workflow`,`target-workflow`,`source-label`,`target-label`,`tidy-up`])):(e(),n(`div`,{key:1,class:l(r.$style.waitingState)},[t(`p`,null,a(o(h).baseText(`workflowDiff.waitingForData`)),1)],2))],2))}}),[[`__cssModules`,{$style:{demoDiffView:`_demoDiffView_t8kr6_125`,waitingState:`_waitingState_t8kr6_132`}}]]);export{h as default};
//# sourceMappingURL=DemoDiffView-DcorW33I.js.map