UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 3.79 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./users.store-legacy-OKuN0qAC.js","./_baseOrderBy-legacy-PsQY_Pvh.js"],(function(e,t){var n,s,a,i,d,l,c,r,o,u,f,v;return{setters:[function(e){n=e.Ft},function(e){s=e.Bc,a=e.Hc,i=e.Lc,d=e.Rc,l=e.Vc,c=e.zc},function(e){r=e.j,o=e.r}],execute:function(){try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(h=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[h]="ea9997c7-d0f2-4e0d-bacb-5baa031c9cc8",t._sentryDebugIdIdentifier="sentry-dbid-ea9997c7-d0f2-4e0d-bacb-5baa031c9cc8")}catch(t){}var t,h;u=e=>{const t=e.match(/^[\w\s]+\.[\w\s]+/);if(t&&t?.length>0)return t[0]},f=(e,t="")=>((e=e.replace(t+".","")).length>0&&(e=(e=e[0].toUpperCase()+e.substring(1)).replaceAll("."," ")),e),v=(e,t=new Set)=>{const n=[],s=Array.from(e.values()),a=new Set;a.add("n8n.workflow"),a.add("n8n.node");for(const i of s){const e=i.match(/^[\w\s]+\.[\w\s]+/);e&&e?.length>0&&a.add(e[0])}for(const i of a){const e={children:[],label:i,name:i,selected:t.has(i),indeterminate:!1},a=s.filter((e=>e.startsWith(i)));for(const n of a){!e.selected&&t.has(n)&&(e.indeterminate=!0);const s={label:f(n,i),name:n,selected:t.has(n),indeterminate:!1};e.children.push(s)}n.push(e)}return n},e("t",r("logStreaming",(()=>{const e=n({}),t=n(new Set),r=o(),f=n=>{if(n.id){if(e.value[n.id]||(e.value[n.id]={destination:n,selectedEvents:new Set,eventGroups:[],isNew:!1}),e.value[n.id]?.selectedEvents?.clear(),n.subscribedEvents)for(const t of n.subscribedEvents)e.value[n.id]?.selectedEvents?.add(t);e.value[n.id].eventGroups=v(t.value,e.value[n.id]?.selectedEvents)}},h=(t,n,s)=>{if(!e.value[t])return;const a=u(n),i=e.value[t].eventGroups.find((e=>e.name===a));if(!i)return;const d=i.children;if(a===n)return i.selected=s,i.indeterminate=!1,void d.forEach((e=>e.selected=!1));const l=d.find((e=>e.name===n));if(!l)return;l.selected=s,!s&&i.selected&&(i.selected=!1,i.children.filter((e=>e!==l)).forEach((e=>e.selected=!0)));const c=d.filter((e=>e.selected));s&&c.length===d.length&&(i.selected=!0,i.children.forEach((e=>e.selected=!1))),i.indeterminate=c.length>0&&c.length<d.length},g=t=>{t.id&&e.value[t.id]&&(e.value[t.id].destination=t)},m=t=>{t&&delete e.value[t]},b=t=>{const n=[];if(e.value[t])for(const s of e.value[t].eventGroups){s.selected&&n.push(s.name);for(const e of s.children)e.selected&&n.push(e.name)}return n};return{addDestination:t=>{t.id&&e.value[t.id]?e.value[t.id].destination=t:f(t)},setSelectionAndBuildItems:f,getDestination:t=>e.value[t]?e.value[t].destination:void 0,getAllDestinations:()=>Object.values(e.value).map((e=>e.destination)),clearDestinations:()=>{e.value={}},addEventName:e=>{t.value.add(e)},removeEventName:e=>{t.value.delete(e)},clearEventNames:()=>{t.value.clear()},addSelectedEvent:(t,n)=>{e.value[t]?.selectedEvents?.add(n),h(t,n,!0)},removeSelectedEvent:(t,n)=>{e.value[t]?.selectedEvents?.delete(n),h(t,n,!1)},setSelectedInGroup:h,removeDestinationItemTree:t=>{delete e.value[t]},updateDestination:g,removeDestination:m,getSelectedEvents:b,saveDestination:async e=>{if(!s(e))return!1;const t=b(e.id);try{return await l(r.restApiContext,e,t),g(e),!0}catch{return!1}},sendTestMessage:async e=>!!s(e)&&await a(r.restApiContext,e),fetchEventNames:async()=>await c(r.restApiContext),fetchDestinations:async()=>await d(r.restApiContext),deleteDestination:async e=>{await i(r.restApiContext,e),m(e)},items:e}})))}}})); //# sourceMappingURL=logStreaming.store-legacy-DJRtENS7.js.map