@next-bricks/visual-builder 0.8.7 → 0.8.9
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.
- package/dist/bricks.json +1 -1
- package/dist/chunks/2108.b4c72f77.js +2 -0
- package/dist/chunks/2108.b4c72f77.js.map +1 -0
- package/dist/chunks/{6519.8ea733cf.js → 6519.68f6eb5c.js} +3 -3
- package/dist/chunks/{6519.8ea733cf.js.map → 6519.68f6eb5c.js.map} +1 -1
- package/dist/chunks/{main.6e15b2e5.js → main.fa8a4339.js} +2 -2
- package/dist/chunks/{main.6e15b2e5.js.map → main.fa8a4339.js.map} +1 -1
- package/dist/chunks/{workbench-history-action.0afa7b1f.js → workbench-history-action.e8f0b996.js} +3 -3
- package/dist/chunks/{workbench-history-action.0afa7b1f.js.map → workbench-history-action.e8f0b996.js.map} +1 -1
- package/dist/chunks/{workbench-tree.61a15232.js → workbench-tree.79f9e7ec.js} +2 -2
- package/dist/chunks/{workbench-tree.61a15232.js.map → workbench-tree.79f9e7ec.js.map} +1 -1
- package/dist/{index.4a19a829.js → index.e66a7db0.js} +2 -2
- package/dist/{index.4a19a829.js.map → index.e66a7db0.js.map} +1 -1
- package/package.json +2 -2
- package/dist/chunks/2108.1a7751c8.js +0 -2
- package/dist/chunks/2108.1a7751c8.js.map +0 -1
- /package/dist/chunks/{6519.8ea733cf.js.LICENSE.txt → 6519.68f6eb5c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-history-action.0afa7b1f.js.LICENSE.txt → workbench-history-action.e8f0b996.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 6519.
|
|
2
|
-
"use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[6519],{6519:(e,t,a)=>{a.r(t);var i,n,o,r,c,s,l,h,d,p,u,E,v,b,m,g,f,w,N,Z=a(3395),k=a(1815),I=a(381),O=a(687),y=a(2604),R=a(8657),L=a.n(R),T=a(5366),x=a(4511),M=a(8249),A=a(8453),_=a(2779),D=a.n(_),P=(0,x.wrapBrick)("icons.general-icon"),{defineElement:U,property:W,event:C}=(0,T.createDecorators)();n=U("visual-builder.workbench-pane",{styleTexts:[M.Z,A.Z]}),o=W(),c=W({type:Boolean}),l=W({type:Number}),d=C({type:"active.change"}),v=C({type:"active.firstActivated"});var F=new WeakMap,S=new WeakMap,B=new WeakMap,j=new WeakMap,K=new WeakMap,z=new WeakMap,G=new WeakMap,H=new WeakMap,V=new WeakMap;class Y extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,H,{get:X,set:q}),(0,Z.Z)(this,K,{get:$,set:J}),(0,Z.Z)(this,F,{writable:!0,value:(f(this),r(this))}),(0,Z.Z)(this,S,{writable:!0,value:s(this)}),(0,Z.Z)(this,B,{writable:!0,value:h(this)}),(0,Z.Z)(this,j,{writable:!0,value:p(this)}),(0,Z.Z)(this,z,{writable:!0,value:e=>{e!==this.active&&(this.active=e,(0,O.Z)(this,K).emit(e))}}),(0,Z.Z)(this,G,{writable:!0,value:b(this)}),(0,Z.Z)(this,V,{writable:!0,value:()=>{(0,O.Z)(this,H).emit()}})}get titleLabel(){return(0,O.Z)(this,F)}set titleLabel(e){(0,I.Z)(this,F,e)}get active(){return(0,O.Z)(this,S)}set active(e){(0,I.Z)(this,S,e)}get badge(){return(0,O.Z)(this,B)}set badge(e){(0,I.Z)(this,B,e)}render(){return L().createElement(Q,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,O.Z)(this,z),onFirstActivated:(0,O.Z)(this,V)})}}function J(e){E(this,e)}function $(){return u(this)}function q(e){g(this,e)}function X(){return m(this)}function Q(e){var{titleLabel:t,active:a,badge:i,onActiveChange:n,onFirstActivated:o}=e,[r,c]=(0,R.useState)(a),[s,l]=(0,R.useState)(!1);(0,R.useEffect)((()=>{c(a)}),[a]),(0,R.useEffect)((()=>{null==n||n(r)}),[r,n]);var h=(0,R.useCallback)((()=>{c((e=>!e)),s||r||(l(!0),null==o||o())}),[s,r,o]),d=(0,R.useRef)(),[p,u]=(0,R.useState)(!1),E=(0,R.useMemo)((()=>{return e=()=>{u(d.current.scrollTop>0)},i=function(){for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];t&&a(),t=requestAnimationFrame((()=>{e(...n)}))},i.cancel=a=()=>cancelAnimationFrame(t),i;var e,t,a,i}),[]);return L().createElement("div",{className:D()("pane",{scrolled:p})},L().createElement("div",{className:"pane-header",tabIndex:0,onClick:h},L().createElement("div",{className:"pane-title"},L().createElement("span",{className:"title-icon"},r?L().createElement(P,{lib:"antd",theme:"outlined",icon:"down"}):L().createElement(P,{lib:"antd",theme:"outlined",icon:"right"})),L().createElement("div",{className:"title-label"},t),L().createElement("slot",{name:"title"})),L().createElement("slot",{name:"actions"}),i&&L().createElement("div",{className:"badge"},i),L().createElement("div",{className:"pane-scroll-shadow"})),L().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:E,ref:d},L().createElement("slot",null,L().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}w=Y,({e:[r,s,h,p,u,E,b,m,g,f],c:[N,i]}=(0,y.Z)(w,[[o,1,"titleLabel"],[c,1,"active"],[l,1,"badge"],[d,1,"activeChangeEvent",e=>(0,O.Z)(e,j),(e,t)=>(0,I.Z)(e,j,t)],[v,1,"activeFirstActivatedEvent",e=>(0,O.Z)(e,G),(e,t)=>(0,I.Z)(e,G,t)]],[n],0,(e=>V.has((0,k.Z)(e))),x.ReactNextElement)),i();var ee,te,ae,ie,ne,oe,re,ce=a(6666),se=a(3571),{defineElement:le,property:he}=(0,T.createDecorators)();te=le("visual-builder.workbench-sidebar",{styleTexts:[se.Z]}),ae=he();var de=new WeakMap,pe=new WeakMap,ue=new WeakMap,Ee=new WeakMap;class ve extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,de,{writable:!0,value:(ne(this),ie(this))}),(0,Z.Z)(this,pe,{writable:!0,value:()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")}}),(0,Z.Z)(this,ue,{writable:!0,value:()=>{var e=(0,O.Z)(this,pe).call(this).assignedNodes();for(var t of e){var a;t.active?t.style.flex=String(null!==(a=t.activeFlex)&&void 0!==a?a:"1"):t.style.flex="initial"}}}),(0,Z.Z)(this,Ee,{writable:!0,value:e=>{var t=e.target.assignedNodes();for(var a of t)a.addEventListener("active.change",(0,O.Z)(this,ue))}}),(0,ce.Z)(this,"refCallback",(()=>{(0,O.Z)(this,ue).call(this);var e=(0,O.Z)(this,pe).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,O.Z)(this,Ee).call(this,e)}))}))}get titleLabel(){return(0,O.Z)(this,de)}set titleLabel(e){(0,I.Z)(this,de,e)}render(){return L().createElement(be,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function be(e){var{titleLabel:t,refCallback:a}=e;return L().createElement("div",{className:"sidebar",ref:a},L().createElement("div",{className:"title-container"},L().createElement("div",{className:"title-label"},t),L().createElement("slot",{name:"titleToolbar"})),L().createElement("div",{className:"pane-container"},L().createElement("slot",null)))}oe=ve,({e:[ie,ne],c:[re,ee]}=(0,y.Z)(oe,[[ae,1,"titleLabel"]],[te],0,void 0,x.ReactNextElement)),ee();var me,ge,fe,we,Ne,Ze,ke,Ie,Oe,ye,Re,Le,Te,xe,Me,Ae=a(7310),{defineElement:_e,property:De}=(0,T.createDecorators)(),Pe=(0,x.wrapBrick)("basic.general-link"),Ue=(0,x.wrapBrick)("icons.general-icon");ge=_e("visual-builder.workbench-action",{styleTexts:[Ae.Z]}),fe=De({attribute:!1}),Ne=De(),ke=De({type:Boolean}),Oe=De(),Re=De();var We=new WeakMap,Ce=new WeakMap,Fe=new WeakMap,Se=new WeakMap,Be=new WeakMap;class je extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,We,{writable:!0,value:(Te(this),we(this))}),(0,Z.Z)(this,Ce,{writable:!0,value:Ze(this)}),(0,Z.Z)(this,Fe,{writable:!0,value:Ie(this)}),(0,Z.Z)(this,Se,{writable:!0,value:ye(this)}),(0,Z.Z)(this,Be,{writable:!0,value:Le(this)})}get icon(){return(0,O.Z)(this,We)}set icon(e){(0,I.Z)(this,We,e)}get to(){return(0,O.Z)(this,Ce)}set to(e){(0,I.Z)(this,Ce,e)}get active(){return(0,O.Z)(this,Fe)}set active(e){(0,I.Z)(this,Fe,e)}get href(){return(0,O.Z)(this,Se)}set href(e){(0,I.Z)(this,Se,e)}get target(){return(0,O.Z)(this,Be)}set target(e){(0,I.Z)(this,Be,e)}render(){return L().createElement(Ke,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function Ke(e){var{icon:t,to:a,active:i,href:n,target:o}=e;return L().createElement(Pe,{className:D()("action",{active:i}),url:a,href:n,target:o},L().createElement(Ue,t))}xe=je,({e:[we,Ze,Ie,ye,Le,Te],c:[Me,me]}=(0,y.Z)(xe,[[fe,1,"icon"],[Ne,1,"to"],[ke,1,"active"],[Oe,1,"href"],[Re,1,"target"]],[ge],0,void 0,x.ReactNextElement)),me();var ze=a(8591),Ge=a(8353);function He(e,t,a,i){var n=[],o=[],r=0;return e.forEach((e=>{if(e.key=""===i?"".concat(r):"".concat(i,".").concat(r),function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){var c=He(e.items,t,a,e.key);n.push(...c.selectedKeys),(c.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...c.openedKeys)}else(function(e,t,a){if(!e.to)return!1;var i="object"==typeof e.to?e.to:(0,Ge.parsePath)(e.to),n=i.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,ze.matchPath)(t,{path:n,exact:e.exact});if(!o&&Array.isArray(e.activeIncludes))for(var r of e.activeIncludes){var c,s=void 0,l=r.includes("?");if(l&&(s=(0,Ge.parsePath)(r)),(o=!!(0,ze.matchPath)(t,{path:l?s.pathname:r,exact:!0}))&&null!==(c=s)&&void 0!==c&&c.search&&(o=Ve(a,s.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var h of e.activeExcludes)if(!(o=!(0,ze.matchPath)(t,{path:h,exact:!0})))break;return o&&e.activeMatchSearch&&(o=Ve(a,i.search)),o})(e,t,a)&&n.push(String(e.key));r+=1})),n.length&&""!==i&&o.push(i),{selectedKeys:n,openedKeys:o}}function Ve(e,t){var a=new URLSearchParams(e),i=new URLSearchParams(t);for(var[n,o]of i.entries())if(a.get(n)!==o)return!1;return!0}var Ye,Je,$e,qe,Xe,Qe,et,tt,at,it=a(8799),nt=(0,x.wrapBrick)("visual-builder.workbench-action"),{defineElement:ot,property:rt}=(0,T.createDecorators)();Je=ot("visual-builder.workbench-action-list",{styleTexts:[it.Z]}),$e=rt(),Xe=rt({attribute:!1});var ct,st=new WeakMap,lt=new WeakMap;class ht extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,st,{writable:!0,value:(et(this),qe(this))}),(0,Z.Z)(this,lt,{writable:!0,value:Qe(this)})}get appId(){return(0,O.Z)(this,st)}set appId(e){(0,I.Z)(this,st,e)}get menu(){return(0,O.Z)(this,lt)}set menu(e){(0,I.Z)(this,lt,e)}render(){return L().createElement(pt,{appId:this.appId,menu:this.menu})}}tt=ht,({e:[qe,Qe,et],c:[at,Ye]}=(0,y.Z)(tt,[[$e,1,"appId"],[Xe,1,"menu"]],[Je],0,void 0,x.ReactNextElement)),Ye();var dt=new Map;function pt(e){var t,{appId:a,menu:i}=e,n=(0,ze.getHistory)(),[o,r]=(0,R.useState)(),[c,s]=(0,R.useState)(n.location);return(0,R.useEffect)((()=>{var e=n.listen((e=>{s(e)}));return e}),[n]),(0,R.useEffect)((()=>{ct||(ct=a),ct!==a&&(dt.clear(),ct=a)}),[a]),(0,R.useEffect)((()=>{var e,{pathname:t,search:a}=c,{selectedKeys:n}=He(null!==(e=null==i?void 0:i.menuItems)&&void 0!==e?e:[],t,a,"");r(Number(n[0]))}),[i,c]),L().createElement("div",{className:"workBenchActionList"},null==i||null===(t=i.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){var a=e.to;return o!==t&&dt.has(t)&&(a=dt.get(t)),L().createElement(nt,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||dt.set(o,"".concat(c.pathname).concat(c.search))})(e)})}})).filter(Boolean))}var ut,Et,vt,bt,mt,gt,ft,wt,Nt,Zt,kt,It,Ot,yt,Rt,Lt,Tt,xt,Mt,At,_t,Dt,Pt,Ut,Wt,Ct,Ft,St,Bt,jt,Kt,zt,Gt,Ht,Vt,Yt,Jt,$t,qt,Xt,Qt,ea,ta,aa,ia,na,oa,ra,ca,sa,la,ha,da,pa,ua,Ea,va,ba,ma,ga,fa=a(5178),wa=a(8902),Na=a(9114),Za=a(4203),ka=a(9156),Ia=a(89),Oa=a(1674);function ya(e){return e.key}a(2372);var Ra,{defineElement:La,property:Ta,event:xa}=(0,T.createDecorators)();Et=La("visual-builder.workbench-tree",{styleTexts:[Ia.Z,Oa.Z]}),vt=Ta({attribute:!1}),mt=Ta({attribute:!1}),ft=Ta({type:Boolean}),Nt=Ta(),kt=Ta({type:Boolean}),Ot=Ta(),Rt=Ta({type:Boolean}),Tt=Ta({attribute:!1}),Mt=Ta({type:Boolean}),_t=Ta({attribute:!1}),Pt=Ta({attribute:!1}),Wt=Ta({type:Boolean}),Ft=Ta({attribute:!1}),Bt=Ta({type:Boolean}),Kt=Ta({type:Boolean}),Gt=Ta({type:Boolean}),Vt=Ta({type:String}),Jt=Ta({type:Boolean}),qt=xa({type:"action.click"}),ta=xa({type:"node.click"}),oa=xa({type:"node.drop"}),la=xa({type:"context.menu"}),ua=xa({type:"node.toggle"});var Ma=new WeakMap,Aa=new WeakMap,_a=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ca=new WeakMap,Fa=new WeakMap,Sa=new WeakMap,Ba=new WeakMap,ja=new WeakMap,Ka=new WeakMap,za=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ya=new WeakMap,Ja=new WeakMap,$a=new WeakMap,qa=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,ei=new WeakMap,ti=new WeakMap,ai=new WeakMap,ii=new WeakMap,ni=new WeakMap,oi=new WeakMap,ri=new WeakMap,ci=new WeakMap,si=new WeakMap,li=new WeakMap;class hi extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,si,{get:wi,set:fi}),(0,Z.Z)(this,oi,{get:gi,set:mi}),(0,Z.Z)(this,ai,{get:bi,set:vi}),(0,Z.Z)(this,Qa,{get:Ei,set:ui}),(0,Z.Z)(this,$a,{get:pi,set:di}),(0,Z.Z)(this,Ma,{writable:!0,value:(ma(this),bt(this))}),(0,Z.Z)(this,Aa,{writable:!0,value:gt(this)}),(0,Z.Z)(this,_a,{writable:!0,value:wt(this)}),(0,Z.Z)(this,Da,{writable:!0,value:Zt(this)}),(0,Z.Z)(this,Pa,{writable:!0,value:It(this)}),(0,Z.Z)(this,Ua,{writable:!0,value:yt(this)}),(0,Z.Z)(this,Wa,{writable:!0,value:Lt(this)}),(0,Z.Z)(this,Ca,{writable:!0,value:xt(this)}),(0,Z.Z)(this,Fa,{writable:!0,value:At(this)}),(0,Z.Z)(this,Sa,{writable:!0,value:Dt(this)}),(0,Z.Z)(this,Ba,{writable:!0,value:Ut(this)}),(0,Z.Z)(this,ja,{writable:!0,value:Ct(this)}),(0,Z.Z)(this,Ka,{writable:!0,value:St(this)}),(0,Z.Z)(this,za,{writable:!0,value:jt(this)}),(0,Z.Z)(this,Ga,{writable:!0,value:zt(this)}),(0,Z.Z)(this,Ha,{writable:!0,value:Ht(this)}),(0,Z.Z)(this,Va,{writable:!0,value:Yt(this)}),(0,Z.Z)(this,Ya,{writable:!0,value:$t(this)}),(0,Z.Z)(this,Ja,{writable:!0,value:Xt(this)}),(0,Z.Z)(this,qa,{writable:!0,value:e=>{(0,O.Z)(this,$a).emit(e)}}),(0,Z.Z)(this,Xa,{writable:!0,value:aa(this)}),(0,Z.Z)(this,ei,{writable:!0,value:e=>()=>{(0,O.Z)(this,Qa).emit(e.data)}}),(0,Z.Z)(this,ti,{writable:!0,value:ra(this)}),(0,Z.Z)(this,ii,{writable:!0,value:e=>{(0,O.Z)(this,ai).emit(e)}}),(0,Z.Z)(this,ni,{writable:!0,value:ha(this)}),(0,Z.Z)(this,ri,{writable:!0,value:e=>t=>{t.preventDefault(),(0,O.Z)(this,oi).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})}}),(0,Z.Z)(this,ci,{writable:!0,value:Ea(this)}),(0,Z.Z)(this,li,{writable:!0,value:(e,t)=>{(0,O.Z)(this,si).emit({nodeId:e,collapsed:t})}})}get nodes(){return(0,O.Z)(this,Ma)}set nodes(e){(0,I.Z)(this,Ma,e)}get actions(){return(0,O.Z)(this,Aa)}set actions(e){(0,I.Z)(this,Aa,e)}get actionsHidden(){return(0,O.Z)(this,_a)}set actionsHidden(e){(0,I.Z)(this,_a,e)}get placeholder(){return(0,O.Z)(this,Da)}set placeholder(e){(0,I.Z)(this,Da,e)}get isTransformName(){return(0,O.Z)(this,Pa)}set isTransformName(e){(0,I.Z)(this,Pa,e)}get searchPlaceholder(){return(0,O.Z)(this,Ua)}set searchPlaceholder(e){(0,I.Z)(this,Ua,e)}get noSearch(){return(0,O.Z)(this,Wa)}set noSearch(e){(0,I.Z)(this,Wa,e)}get activeKey(){return(0,O.Z)(this,Ca)}set activeKey(e){(0,I.Z)(this,Ca,e)}get showMatchedNodeOnly(){return(0,O.Z)(this,Fa)}set showMatchedNodeOnly(e){(0,I.Z)(this,Fa,e)}get matchNodeDataFields(){return(0,O.Z)(this,Sa)}set matchNodeDataFields(e){(0,I.Z)(this,Sa,e)}get fixedActionsFor(){return(0,O.Z)(this,Ba)}set fixedActionsFor(e){(0,I.Z)(this,Ba,e)}get collapsible(){return(0,O.Z)(this,ja)}set collapsible(e){(0,I.Z)(this,ja,e)}get collapsedNodes(){return(0,O.Z)(this,Ka)}set collapsedNodes(e){(0,I.Z)(this,Ka,e)}get allowDrag(){return(0,O.Z)(this,za)}set allowDrag(e){(0,I.Z)(this,za,e)}get allowDragToRoot(){return(0,O.Z)(this,Ga)}set allowDragToRoot(e){(0,I.Z)(this,Ga,e)}get allowDragToInside(){return(0,O.Z)(this,Ha)}set allowDragToInside(e){(0,I.Z)(this,Ha,e)}get nodeKey(){return(0,O.Z)(this,Va)}set nodeKey(e){(0,I.Z)(this,Va,e)}get skipNotify(){return(0,O.Z)(this,Ya)}set skipNotify(e){(0,I.Z)(this,Ya,e)}render(){return L().createElement(wa.L.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,O.Z)(this,qa)}},L().createElement(Za.f.Provider,{value:{activeKey:this.activeKey,basePaddingLeft:5,showMatchedNodeOnly:this.showMatchedNodeOnly,isTransformName:this.isTransformName,fixedActionsFor:this.fixedActionsFor,nodeKey:this.nodeKey,collapsible:this.collapsible,collapsedNodes:this.collapsedNodes,getCollapsedId:ya,onNodeToggle:(0,O.Z)(this,li),skipNotify:this.skipNotify,clickFactory:(0,O.Z)(this,ei),contextMenuFactory:(0,O.Z)(this,ri),matchNode:(e,t)=>{var a;return(0,ka.$)(e.name,t)||!(null===(a=this.matchNodeDataFields)||void 0===a||!a.length)&&(0,ka.$)("*"===this.matchNodeDataFields?e.data:(0,fa.pick)(e.data,this.matchNodeDataFields),t)}}},L().createElement(Na.ME,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,O.Z)(this,ii),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}function di(e){ea(this,e)}function pi(){return Qt(this)}function ui(e){na(this,e)}function Ei(){return ia(this)}function vi(e){sa(this,e)}function bi(){return ca(this)}function mi(e){pa(this,e)}function gi(){return da(this)}function fi(e){ba(this,e)}function wi(){return va(this)}ga=hi,({e:[bt,gt,wt,Zt,It,yt,Lt,xt,At,Dt,Ut,Ct,St,jt,zt,Ht,Yt,$t,Xt,Qt,ea,aa,ia,na,ra,ca,sa,ha,da,pa,Ea,va,ba,ma],c:[Ra,ut]}=(0,y.Z)(ga,[[vt,1,"nodes"],[mt,1,"actions"],[ft,1,"actionsHidden"],[Nt,1,"placeholder"],[kt,1,"isTransformName"],[Ot,1,"searchPlaceholder"],[Rt,1,"noSearch"],[Tt,1,"activeKey"],[Mt,1,"showMatchedNodeOnly"],[_t,1,"matchNodeDataFields"],[Pt,1,"fixedActionsFor"],[Wt,1,"collapsible"],[Ft,1,"collapsedNodes"],[Bt,1,"allowDrag"],[Kt,1,"allowDragToRoot"],[Gt,1,"allowDragToInside"],[Vt,1,"nodeKey"],[Jt,1,"skipNotify"],[qt,1,"actionClickEvent",e=>(0,O.Z)(e,Ja),(e,t)=>(0,I.Z)(e,Ja,t)],[ta,1,"nodeClickEvent",e=>(0,O.Z)(e,Xa),(e,t)=>(0,I.Z)(e,Xa,t)],[oa,1,"nodeDropEvent",e=>(0,O.Z)(e,ti),(e,t)=>(0,I.Z)(e,ti,t)],[la,1,"nodeContextMenuEvent",e=>(0,O.Z)(e,ni),(e,t)=>(0,I.Z)(e,ni,t)],[ua,1,"nodeToggleEvent",e=>(0,O.Z)(e,ci),(e,t)=>(0,I.Z)(e,ci,t)]],[Et],0,(e=>li.has((0,k.Z)(e))),x.ReactNextElement)),ut();var Ni=a(6107),Zi=a(9194);a(7426),customElements.define("visual-builder.inject-preview-agent",(0,Ni.createProviderClass)((function(e,t){return(0,Zi.Z)(e,t)})));var ki,Ii,Oi,yi,Ri,Li,Ti,xi,Mi,Ai,_i,Di,Pi,Ui,Wi,Ci,Fi=a(3028),Si=a(8874),Bi=a.n(Si),ji=a(6094),Ki=a(7088),zi=function(e){return e.LOAD_MORE="LOAD_MORE",e.LOADING="LOADING",e.NO_DATA="NO_DATA",e.NODE="NODE",e.ADD="ADD",e.EDIT="EDIT",e.DELETE="DELETE",e.IMPORT="IMPORT",e.APPEND_RELATION="APPEND_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REMOVE_RELATION="REMOVE_RELATION",e.ADD_FULL="ADD_FULL",e.EDIT_FULL="EDIT_FULL",e.DELETE_FULL="DELETE_FULL",e.IMPORT_FULL="IMPORT_FULL",e.APPEND_RELATION_FULL="APPEND_RELATION_FULL",e.UPDATE_RELATION_FULL="UPDATE_RELATION_FULL",e.REMOVE_RELATION_FULL="REMOVE_RELATION_FULL",e.PROJECT="PROJECT",e.USER="USER",e.PERMISSION="PERMISSION",e.BRICK="BRICK",e.ROUTE="ROUTE",e.TEMPLATE="TEMPLATE",e.SNIPPET="SNIPPET",e.I18N="I18N",e.IMAGE="IMAGE",e.FUNCTION="FUNCTION",e.MENU="MENU",e.MENU_ITEM="MENU_ITEM",e.WORKFLOW="WORKFLOW",e}({}),Gi="bricks/visual-builder/workbench-history-action",Hi=a(4795),Vi=a(5121),Yi=function(){var e=(0,Hi.Z)((function*(e,t,a){return(yield Vi.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,Fi.Z)((0,Fi.Z)({},a),{},{params:t}))).data}));return function(t,a,i){return e.apply(this,arguments)}}(),Ji=a(860),$i={add:"".concat(Gi,":").concat(zi.ADD),edit:"".concat(Gi,":").concat(zi.EDIT),delete:"".concat(Gi,":").concat(zi.DELETE),import:"".concat(Gi,":").concat(zi.IMPORT),append_relation:"".concat(Gi,":").concat(zi.APPEND_RELATION),update_relation:"".concat(Gi,":").concat(zi.UPDATE_RELATION),remove_relation:"".concat(Gi,":").concat(zi.REMOVE_RELATION)},qi={add:"".concat(Gi,":").concat(zi.ADD_FULL),edit:"".concat(Gi,":").concat(zi.EDIT_FULL),delete:"".concat(Gi,":").concat(zi.DELETE_FULL),import:"".concat(Gi,":").concat(zi.IMPORT_FULL),append_relation:"".concat(Gi,":").concat(zi.APPEND_RELATION_FULL),update_relation:"".concat(Gi,":").concat(zi.UPDATE_RELATION_FULL),remove_relation:"".concat(Gi,":").concat(zi.REMOVE_RELATION_FULL)},Xi={project:"".concat(Gi,":").concat(zi.PROJECT),userGroup:"".concat(Gi,":").concat(zi.USER),permission:"".concat(Gi,":").concat(zi.PERMISSION),brick:"".concat(Gi,":").concat(zi.BRICK),route:"".concat(Gi,":").concat(zi.ROUTE),template:"".concat(Gi,":").concat(zi.TEMPLATE),snippet:"".concat(Gi,":").concat(zi.SNIPPET),i18n:"".concat(Gi,":").concat(zi.I18N),image:"".concat(Gi,":").concat(zi.IMAGE),function:"".concat(Gi,":").concat(zi.FUNCTION),menu:"".concat(Gi,":").concat(zi.MENU),menuItem:"".concat(Gi,":").concat(zi.MENU_ITEM),workflow:"".concat(Gi,":").concat(zi.WORKFLOW)},Qi={PROJECT_MICRO_APP:"".concat(Gi,":").concat(zi.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(Gi,":").concat(zi.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(Gi,":").concat(zi.PERMISSION),STORYBOARD_BRICK:"".concat(Gi,":").concat(zi.BRICK),STORYBOARD_ROUTE:"".concat(Gi,":").concat(zi.ROUTE),STORYBOARD_TEMPLATE:"".concat(Gi,":").concat(zi.TEMPLATE),STORYBOARD_SNIPPET:"".concat(Gi,":").concat(zi.SNIPPET),STORYBOARD_I18N:"".concat(Gi,":").concat(zi.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(Gi,":").concat(zi.IMAGE),STORYBOARD_FUNCTION:"".concat(Gi,":").concat(zi.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(Gi,":").concat(zi.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(Gi,":").concat(zi.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(Gi,":").concat(zi.WORKFLOW)};function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return Ji.i18n.t("".concat(Gi,":").concat(zi.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,Ki.initializeReactI18n)(Gi,{en:{LOAD_MORE:"Load more",LOADING:"Loading",NO_DATA:"No data",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }} etc., a total of {{ count }} items",ADD:"Add node",EDIT:"Edit node",DELETE:"Delete node",IMPORT:"Batch import node",APPEND_RELATION:"Append Relation",UPDATE_RELATION:"Update Relation",REMOVE_RELATION:"Remove Relation",ADD_FULL:"Add {{ category }} ({{ nodes }})",EDIT_FULL:"Edit {{ nodeChanges }} of {{ category }} ({{ nodes }})",DELETE_FULL:"Delete {{ category }} ({{ nodes }})",IMPORT_FULL:"Batch Import {{ category }} ({{ nodes }})",APPEND_RELATION_FULL:"Append the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",UPDATE_RELATION_FULL:"Update the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",REMOVE_RELATION_FULL:"Remove the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",PROJECT:"Project",USER:"User Group",PERMISSION:"Permission",BRICK:"Brick",ROUTE:"Route",TEMPLATE:"Template",SNIPPET:"Snippet",I18N:"I18N",IMAGE:"Image",FUNCTION:"Function",MENU:"Menu",MENU_ITEM:"Menu item",WORKFLOW:"Workflow"},zh:{LOAD_MORE:"加载更多",LOADING:"加载中",NO_DATA:"没有数据",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }}等共{{ count }}项",ADD:"新增节点",EDIT:"编辑节点",DELETE:"删除节点",IMPORT:"批量导入节点",APPEND_RELATION:"添加关系",UPDATE_RELATION:"更新关系",REMOVE_RELATION:"移除关系",ADD_FULL:"新增{{ category }}({{ nodes }})",EDIT_FULL:"编辑{{ category }}({{ nodes }})的 {{ nodeChanges }}",DELETE_FULL:"删除{{ category }}({{ nodes }})",IMPORT_FULL:"批量导入{{ category }}({{ nodes }})",APPEND_RELATION_FULL:"添加{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",UPDATE_RELATION_FULL:"更新{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",REMOVE_RELATION_FULL:"移除{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",PROJECT:"项目",USER:"用户组",PERMISSION:"权限点",BRICK:"构件",ROUTE:"路由",TEMPLATE:"模版",SNIPPET:"片段",I18N:"国际化",IMAGE:"图片",FUNCTION:"函数",MENU:"菜单",MENU_ITEM:"菜单项",WORKFLOW:"工作流"}});var tn,{defineElement:an,property:nn,event:on}=(0,T.createDecorators)(),rn=(0,x.wrapBrick)("eo-button"),cn=(0,x.wrapBrick)("eo-link"),sn=(0,x.wrapBrick)("eo-icon"),ln=(0,x.wrapBrick)("eo-easyops-avatar"),hn=(0,x.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});Ii=an("visual-builder.workbench-history-action",{styleTexts:[ji.Z]}),Oi=nn(),Ri=nn(),Ti=on({type:"history.item.click"}),_i=on({type:"rollback"});var dn=new WeakMap,pn=new WeakMap,un=new WeakMap,En=new WeakMap,vn=new WeakMap,bn=new WeakMap,mn=new WeakMap,gn=new WeakMap;class fn extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,mn,{get:kn,set:Zn}),(0,Z.Z)(this,En,{get:Nn,set:wn}),(0,Z.Z)(this,dn,{writable:!0,value:(Wi(this),yi(this))}),(0,Z.Z)(this,pn,{writable:!0,value:Li(this)}),(0,Z.Z)(this,un,{writable:!0,value:xi(this)}),(0,Z.Z)(this,vn,{writable:!0,value:e=>{(0,O.Z)(this,En).emit(e)}}),(0,Z.Z)(this,bn,{writable:!0,value:Di(this)}),(0,Z.Z)(this,gn,{writable:!0,value:e=>{(0,O.Z)(this,mn).emit(e)}})}get appId(){return(0,O.Z)(this,dn)}set appId(e){(0,I.Z)(this,dn,e)}get projectId(){return(0,O.Z)(this,pn)}set projectId(e){(0,I.Z)(this,pn,e)}render(){return L().createElement(In,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,O.Z)(this,vn),onRollback:(0,O.Z)(this,gn)})}}function wn(e){Ai(this,e)}function Nn(){return Mi(this)}function Zn(e){Ui(this,e)}function kn(){return Pi(this)}function In(e){var{appId:t,projectId:a,onHistoryItemClick:i,onRollback:n}=e,{t:o}=(0,Ki.useTranslation)(Gi),[r,c]=(0,R.useState)(!1),[s,l]=(0,R.useState)(!0),[h,d]=(0,R.useState)([]),p=(0,R.useRef)(),u=e=>{c(!0),Yi(t,{ts:p.current,limit:20}).then((t=>{d((a=>{var i=t.list.filter((e=>e.abstract)).map((e=>{return(0,Fi.Z)((0,Fi.Z)({},e),{},{translation:(t=e,l=Ji.i18n.t(null!==(a=Xi[t.category])&&void 0!==a?a:t.category),h=Ji.i18n.t(null!==(i=$i[t.action])&&void 0!==i?i:t.action),d=Ji.i18n.t(null!==(n=Qi[t.abstract.leftObjectId])&&void 0!==n?n:t.abstract.leftObjectId),p=Ji.i18n.t(null!==(o=Qi[t.abstract.rightObjectId])&&void 0!==o?o:t.abstract.rightObjectId),u=en(t.abstract.nodes,t.abstract.nodesCount),E=en(t.abstract.leftNodes,t.abstract.leftNodesCount),v=en(t.abstract.rightNodes,t.abstract.rightNodesCount),{category:l,action:h,leftObjectId:d,rightObjectId:p,nodes:u,leftNodes:E,rightNodes:v,abstract:Ji.i18n.t(null!==(r=qi[t.action])&&void 0!==r?r:t.action,{category:l,nodes:u,leftNodes:E,rightNodes:v,nodeChanges:null===(c=t.abstract.nodeChanges)||void 0===c?void 0:c.join(", "),relationChanges:null===(s=t.abstract.relationChanges)||void 0===s?void 0:s.join(", "),leftObjectId:d,rightObjectId:p})})});var t,a,i,n,o,r,c,s,l,h,d,p,u,E,v}));return e?i:a.concat(i)})),p.current=t.ts,l(t.list.length<20)})).catch((e=>{(0,ze.handleHttpError)(e)})).finally((()=>{c(!1)}))};return L().createElement(hn,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(l(!0),d([]),p.current=0,u(!0))}},L().createElement(rn,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),L().createElement("div",null,L().createElement("div",{className:"history-title"},"History"),L().createElement("div",{className:"history-list"},h.length?h.map(((e,t)=>L().createElement(On,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t,current:0===t,onHistoryItemClick:i,onRollback:n}))):L().createElement("div",{className:"empty"},o(r?zi.LOADING:zi.NO_DATA)),!s&&L().createElement("span",{className:"load-more-container"},L().createElement(cn,{className:"load-more",disabled:r,onClick:e=>u()},o(zi.LOAD_MORE)))),L().createElement("slot",null)))}function On(e){var{data:t,enableRollback:a,current:i,onHistoryItemClick:n,onRollback:o}=e,r=Bi()(t.ts/1e6),c=Bi().duration(r.diff(Bi()())),s=c.days()<=-1?r.format("YYYY-MM-DD HH:mm:ss"):c.humanize(!0,{ss:0,s:60,m:60,h:24});return L().createElement("div",{className:"item-container"},L().createElement("div",{className:"item-title"},L().createElement("div",{className:"title-left",onClick:e=>n(t)},L().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),i&&L().createElement("div",{className:"branch"},"(current)")),L().createElement("div",{className:"title-right"},a&&L().createElement(sn,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:e=>o(t)}))),L().createElement("div",{className:"item-info"},L().createElement(ln,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),L().createElement("div",{className:"time"},s),L().createElement("div",{className:"operator"},t.user)))}Ci=fn,({e:[yi,Li,xi,Mi,Ai,Di,Pi,Ui,Wi],c:[tn,ki]}=(0,y.Z)(Ci,[[Oi,1,"appId"],[Ri,1,"projectId"],[Ti,1,"historyItemClickEvent",e=>(0,O.Z)(e,un),(e,t)=>(0,I.Z)(e,un,t)],[_i,1,"rollbackEvent",e=>(0,O.Z)(e,bn),(e,t)=>(0,I.Z)(e,bn,t)]],[Ii],0,(e=>gn.has((0,k.Z)(e))),x.ReactNextElement)),ki()},8453:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,".custom-scrollbar-container{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.03)}.custom-scrollbar-container::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;position:absolute}.custom-scrollbar-container::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0);border-radius:4px}.custom-scrollbar-container:hover::-webkit-scrollbar-track{background-color:rgba(255,255,255,0.03)}.custom-scrollbar-container:hover::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.15)}",""]);const c=r.toString()},8799:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,'.workBenchActionList{display:flex;flex-direction:column;width:-webkit-min-content;width:-moz-min-content;width:min-content;height:100%;background-color:#4297ff}:host-context(html[data-theme="dark-v2"]) .workBenchActionList,\n:host-context([data-override-theme="dark-v2"]) .workBenchActionList{background-color:#323237}',""]);const c=r.toString()},7310:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:rgba(255,255,255,0.4);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:white}.action.active::part(link),\n.action::part(link):hover{color:white}',""]);const c=r.toString()},6094:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}eo-popover::part(popup){width:400px;padding:10px;background:var(--color-fill-bg-container-4);border-radius:var(--medius-border-radius);box-shadow:var(--feedback-container-shadow);z-index:1000}.history-title{font-size:var(--title-font-size);font-weight:var(--font-weight-500);color:var(--color-strong-text);margin-bottom:5px}.history-list{max-height:500px;overflow-y:auto}.item-container{padding:10px 0;display:flex;flex-direction:column;gap:5px}.empty{padding:5px 0 10px 0;font-size:14px;color:var(--text-color-secondary);text-align:center}.item-container:not(:last-of-type){border-bottom:1px solid var(--color-border-divider-line)}.item-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.title-left,\n.title-right{display:flex;align-items:center}.title-left{cursor:pointer;overflow:hidden;gap:5px}.topic{font-size:14px;color:var(--text-color-title);font-weight:var(--font-weight-500);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.branch{font-size:14px;color:var(--text-color-secondary)}.rollback{margin-right:5px;font-size:14px;color:var(--text-color-secondary);cursor:pointer}.rollback:hover{color:var(--color-brand)}.item-info{display:flex;align-items:center;gap:5px}.time,\n.operator{font-size:14px;color:var(--text-color-secondary)}.load-more-container{display:block;text-align:center}",""]);const c=r.toString()},8249:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,':host{display:block;--pane-color:#595959}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--pane-color:#ccc}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.pane{display:flex;flex-direction:column;color:var(--pane-color);height:100%}.pane-header{display:flex;align-items:center;cursor:pointer;border-top:1px solid transparent;position:relative}.pane-header:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#007fd4}:host(:not(:first-child)) .pane-header{border-top-color:rgba(204,204,204,0.2)}.pane-scroll-shadow{display:none;position:absolute;bottom:-3px;left:0;right:0;height:3px;box-shadow:#000000 0 6px 6px -6px inset;z-index:1}.scrolled .pane-scroll-shadow{display:block}.pane-title{display:flex;align-items:center;font-size:13px;line-height:24px;height:25px;min-width:0;flex:1}.title-icon{display:flex;justify-content:center;align-items:center;width:24px;padding-right:2px;line-height:1;flex-shrink:0}.title-label{text-transform:uppercase;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-body{flex-grow:1;min-height:0;display:none;overflow:hidden;overflow-y:auto;overflow-y:overlay}:host([active]) .pane-body{display:initial}:host(:not(:hover)) ::slotted([slot="actions"]){display:none}.badge{background-color:rgb(77,77,77);color:rgb(255,255,255);border-radius:11px;height:18px;padding:3px 6px;line-height:13px;margin:0 3px;font-size:12px}',""]);const c=r.toString()},3571:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,':host{--sidebar-background:#fff;--title-container-background:#fff;--title-container-color:#595959;display:block;outline-color:rgba(83,89,93,0.5);background-color:var(--sidebar-background);height:100%}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--sidebar-background:#181818;--title-container-background:#181818;--title-container-color:rgb(187,187,187);background-color:var(--sidebar-background)}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.sidebar{display:flex;flex-direction:column;height:100%}.title-container{display:flex;padding:0 8px 8px 8px;color:var(--title-container-color);background:var(--title-container-background)}.title-label{font-weight:300;line-height:44px;padding-left:12px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-container{flex-grow:1;min-height:0;display:flex;flex-direction:column}::slotted([slot="panes"]){transition:flex 0.2s;min-height:25px}',""]);const c=r.toString()}}]);
|
|
3
|
-
//# sourceMappingURL=6519.
|
|
1
|
+
/*! For license information please see 6519.68f6eb5c.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[6519],{6519:(e,t,a)=>{a.r(t);var i,n,o,r,c,s,l,h,d,p,u,E,v,b,m,g,f,w,N,Z=a(3395),k=a(1815),I=a(381),O=a(687),y=a(2604),R=a(8657),L=a.n(R),T=a(5366),x=a(4511),M=a(8249),A=a(8453),_=a(2779),D=a.n(_),P=(0,x.wrapBrick)("icons.general-icon"),{defineElement:U,property:W,event:C}=(0,T.createDecorators)();n=U("visual-builder.workbench-pane",{styleTexts:[M.Z,A.Z]}),o=W(),c=W({type:Boolean}),l=W({type:Number}),d=C({type:"active.change"}),v=C({type:"active.firstActivated"});var F=new WeakMap,S=new WeakMap,B=new WeakMap,j=new WeakMap,K=new WeakMap,z=new WeakMap,G=new WeakMap,H=new WeakMap,V=new WeakMap;class Y extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,H,{get:X,set:q}),(0,Z.Z)(this,K,{get:$,set:J}),(0,Z.Z)(this,F,{writable:!0,value:(f(this),r(this))}),(0,Z.Z)(this,S,{writable:!0,value:s(this)}),(0,Z.Z)(this,B,{writable:!0,value:h(this)}),(0,Z.Z)(this,j,{writable:!0,value:p(this)}),(0,Z.Z)(this,z,{writable:!0,value:e=>{e!==this.active&&(this.active=e,(0,O.Z)(this,K).emit(e))}}),(0,Z.Z)(this,G,{writable:!0,value:b(this)}),(0,Z.Z)(this,V,{writable:!0,value:()=>{(0,O.Z)(this,H).emit()}})}get titleLabel(){return(0,O.Z)(this,F)}set titleLabel(e){(0,I.Z)(this,F,e)}get active(){return(0,O.Z)(this,S)}set active(e){(0,I.Z)(this,S,e)}get badge(){return(0,O.Z)(this,B)}set badge(e){(0,I.Z)(this,B,e)}render(){return L().createElement(Q,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,O.Z)(this,z),onFirstActivated:(0,O.Z)(this,V)})}}function J(e){E(this,e)}function $(){return u(this)}function q(e){g(this,e)}function X(){return m(this)}function Q(e){var{titleLabel:t,active:a,badge:i,onActiveChange:n,onFirstActivated:o}=e,[r,c]=(0,R.useState)(a),[s,l]=(0,R.useState)(!1);(0,R.useEffect)((()=>{c(a)}),[a]),(0,R.useEffect)((()=>{null==n||n(r)}),[r,n]);var h=(0,R.useCallback)((()=>{c((e=>!e)),s||r||(l(!0),null==o||o())}),[s,r,o]),d=(0,R.useRef)(),[p,u]=(0,R.useState)(!1),E=(0,R.useMemo)((()=>{return e=()=>{u(d.current.scrollTop>0)},i=function(){for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];t&&a(),t=requestAnimationFrame((()=>{e(...n)}))},i.cancel=a=()=>cancelAnimationFrame(t),i;var e,t,a,i}),[]);return L().createElement("div",{className:D()("pane",{scrolled:p})},L().createElement("div",{className:"pane-header",tabIndex:0,onClick:h},L().createElement("div",{className:"pane-title"},L().createElement("span",{className:"title-icon"},r?L().createElement(P,{lib:"antd",theme:"outlined",icon:"down"}):L().createElement(P,{lib:"antd",theme:"outlined",icon:"right"})),L().createElement("div",{className:"title-label"},t),L().createElement("slot",{name:"title"})),L().createElement("slot",{name:"actions"}),i&&L().createElement("div",{className:"badge"},i),L().createElement("div",{className:"pane-scroll-shadow"})),L().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:E,ref:d},L().createElement("slot",null,L().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}w=Y,({e:[r,s,h,p,u,E,b,m,g,f],c:[N,i]}=(0,y.Z)(w,[[o,1,"titleLabel"],[c,1,"active"],[l,1,"badge"],[d,1,"activeChangeEvent",e=>(0,O.Z)(e,j),(e,t)=>(0,I.Z)(e,j,t)],[v,1,"activeFirstActivatedEvent",e=>(0,O.Z)(e,G),(e,t)=>(0,I.Z)(e,G,t)]],[n],0,(e=>V.has((0,k.Z)(e))),x.ReactNextElement)),i();var ee,te,ae,ie,ne,oe,re,ce=a(6666),se=a(3571),{defineElement:le,property:he}=(0,T.createDecorators)();te=le("visual-builder.workbench-sidebar",{styleTexts:[se.Z]}),ae=he();var de=new WeakMap,pe=new WeakMap,ue=new WeakMap,Ee=new WeakMap;class ve extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,de,{writable:!0,value:(ne(this),ie(this))}),(0,Z.Z)(this,pe,{writable:!0,value:()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")}}),(0,Z.Z)(this,ue,{writable:!0,value:()=>{var e=(0,O.Z)(this,pe).call(this).assignedNodes();for(var t of e){var a;t.active?t.style.flex=String(null!==(a=t.activeFlex)&&void 0!==a?a:"1"):t.style.flex="initial"}}}),(0,Z.Z)(this,Ee,{writable:!0,value:e=>{var t=e.target.assignedNodes();for(var a of t)a.addEventListener("active.change",(0,O.Z)(this,ue))}}),(0,ce.Z)(this,"refCallback",(()=>{(0,O.Z)(this,ue).call(this);var e=(0,O.Z)(this,pe).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,O.Z)(this,Ee).call(this,e)}))}))}get titleLabel(){return(0,O.Z)(this,de)}set titleLabel(e){(0,I.Z)(this,de,e)}render(){return L().createElement(be,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function be(e){var{titleLabel:t,refCallback:a}=e;return L().createElement("div",{className:"sidebar",ref:a},L().createElement("div",{className:"title-container"},L().createElement("div",{className:"title-label"},t),L().createElement("slot",{name:"titleToolbar"})),L().createElement("div",{className:"pane-container"},L().createElement("slot",null)))}oe=ve,({e:[ie,ne],c:[re,ee]}=(0,y.Z)(oe,[[ae,1,"titleLabel"]],[te],0,void 0,x.ReactNextElement)),ee();var me,ge,fe,we,Ne,Ze,ke,Ie,Oe,ye,Re,Le,Te,xe,Me,Ae=a(7310),{defineElement:_e,property:De}=(0,T.createDecorators)(),Pe=(0,x.wrapBrick)("basic.general-link"),Ue=(0,x.wrapBrick)("icons.general-icon");ge=_e("visual-builder.workbench-action",{styleTexts:[Ae.Z]}),fe=De({attribute:!1}),Ne=De(),ke=De({type:Boolean}),Oe=De(),Re=De();var We=new WeakMap,Ce=new WeakMap,Fe=new WeakMap,Se=new WeakMap,Be=new WeakMap;class je extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,We,{writable:!0,value:(Te(this),we(this))}),(0,Z.Z)(this,Ce,{writable:!0,value:Ze(this)}),(0,Z.Z)(this,Fe,{writable:!0,value:Ie(this)}),(0,Z.Z)(this,Se,{writable:!0,value:ye(this)}),(0,Z.Z)(this,Be,{writable:!0,value:Le(this)})}get icon(){return(0,O.Z)(this,We)}set icon(e){(0,I.Z)(this,We,e)}get to(){return(0,O.Z)(this,Ce)}set to(e){(0,I.Z)(this,Ce,e)}get active(){return(0,O.Z)(this,Fe)}set active(e){(0,I.Z)(this,Fe,e)}get href(){return(0,O.Z)(this,Se)}set href(e){(0,I.Z)(this,Se,e)}get target(){return(0,O.Z)(this,Be)}set target(e){(0,I.Z)(this,Be,e)}render(){return L().createElement(Ke,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function Ke(e){var{icon:t,to:a,active:i,href:n,target:o}=e;return L().createElement(Pe,{className:D()("action",{active:i}),url:a,href:n,target:o},L().createElement(Ue,t))}xe=je,({e:[we,Ze,Ie,ye,Le,Te],c:[Me,me]}=(0,y.Z)(xe,[[fe,1,"icon"],[Ne,1,"to"],[ke,1,"active"],[Oe,1,"href"],[Re,1,"target"]],[ge],0,void 0,x.ReactNextElement)),me();var ze=a(8591),Ge=a(8353);function He(e,t,a,i){var n=[],o=[],r=0;return e.forEach((e=>{if(e.key=""===i?"".concat(r):"".concat(i,".").concat(r),function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){var c=He(e.items,t,a,e.key);n.push(...c.selectedKeys),(c.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...c.openedKeys)}else(function(e,t,a){if(!e.to)return!1;var i="object"==typeof e.to?e.to:(0,Ge.parsePath)(e.to),n=i.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,ze.matchPath)(t,{path:n,exact:e.exact});if(!o&&Array.isArray(e.activeIncludes))for(var r of e.activeIncludes){var c,s=void 0,l=r.includes("?");if(l&&(s=(0,Ge.parsePath)(r)),(o=!!(0,ze.matchPath)(t,{path:l?s.pathname:r,exact:!0}))&&null!==(c=s)&&void 0!==c&&c.search&&(o=Ve(a,s.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var h of e.activeExcludes)if(!(o=!(0,ze.matchPath)(t,{path:h,exact:!0})))break;return o&&e.activeMatchSearch&&(o=Ve(a,i.search)),o})(e,t,a)&&n.push(String(e.key));r+=1})),n.length&&""!==i&&o.push(i),{selectedKeys:n,openedKeys:o}}function Ve(e,t){var a=new URLSearchParams(e),i=new URLSearchParams(t);for(var[n,o]of i.entries())if(a.get(n)!==o)return!1;return!0}var Ye,Je,$e,qe,Xe,Qe,et,tt,at,it=a(8799),nt=(0,x.wrapBrick)("visual-builder.workbench-action"),{defineElement:ot,property:rt}=(0,T.createDecorators)();Je=ot("visual-builder.workbench-action-list",{styleTexts:[it.Z]}),$e=rt(),Xe=rt({attribute:!1});var ct,st=new WeakMap,lt=new WeakMap;class ht extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,st,{writable:!0,value:(et(this),qe(this))}),(0,Z.Z)(this,lt,{writable:!0,value:Qe(this)})}get appId(){return(0,O.Z)(this,st)}set appId(e){(0,I.Z)(this,st,e)}get menu(){return(0,O.Z)(this,lt)}set menu(e){(0,I.Z)(this,lt,e)}render(){return L().createElement(pt,{appId:this.appId,menu:this.menu})}}tt=ht,({e:[qe,Qe,et],c:[at,Ye]}=(0,y.Z)(tt,[[$e,1,"appId"],[Xe,1,"menu"]],[Je],0,void 0,x.ReactNextElement)),Ye();var dt=new Map;function pt(e){var t,{appId:a,menu:i}=e,n=(0,ze.getHistory)(),[o,r]=(0,R.useState)(),[c,s]=(0,R.useState)(n.location);return(0,R.useEffect)((()=>{var e=n.listen((e=>{s(e)}));return e}),[n]),(0,R.useEffect)((()=>{ct||(ct=a),ct!==a&&(dt.clear(),ct=a)}),[a]),(0,R.useEffect)((()=>{var e,{pathname:t,search:a}=c,{selectedKeys:n}=He(null!==(e=null==i?void 0:i.menuItems)&&void 0!==e?e:[],t,a,"");r(Number(n[0]))}),[i,c]),L().createElement("div",{className:"workBenchActionList"},null==i||null===(t=i.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){var a=e.to;return o!==t&&dt.has(t)&&(a=dt.get(t)),L().createElement(nt,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||dt.set(o,"".concat(c.pathname).concat(c.search))})(e)})}})).filter(Boolean))}var ut,Et,vt,bt,mt,gt,ft,wt,Nt,Zt,kt,It,Ot,yt,Rt,Lt,Tt,xt,Mt,At,_t,Dt,Pt,Ut,Wt,Ct,Ft,St,Bt,jt,Kt,zt,Gt,Ht,Vt,Yt,Jt,$t,qt,Xt,Qt,ea,ta,aa,ia,na,oa,ra,ca,sa,la,ha,da,pa,ua,Ea,va,ba,ma,ga,fa=a(5178),wa=a(8902),Na=a(9114),Za=a(4203),ka=a(9156),Ia=a(89),Oa=a(1674);function ya(e){return e.key}a(3666);var Ra,{defineElement:La,property:Ta,event:xa}=(0,T.createDecorators)();Et=La("visual-builder.workbench-tree",{styleTexts:[Ia.Z,Oa.Z]}),vt=Ta({attribute:!1}),mt=Ta({attribute:!1}),ft=Ta({type:Boolean}),Nt=Ta(),kt=Ta({type:Boolean}),Ot=Ta(),Rt=Ta({type:Boolean}),Tt=Ta({attribute:!1}),Mt=Ta({type:Boolean}),_t=Ta({attribute:!1}),Pt=Ta({attribute:!1}),Wt=Ta({type:Boolean}),Ft=Ta({attribute:!1}),Bt=Ta({type:Boolean}),Kt=Ta({type:Boolean}),Gt=Ta({type:Boolean}),Vt=Ta({type:String}),Jt=Ta({type:Boolean}),qt=xa({type:"action.click"}),ta=xa({type:"node.click"}),oa=xa({type:"node.drop"}),la=xa({type:"context.menu"}),ua=xa({type:"node.toggle"});var Ma=new WeakMap,Aa=new WeakMap,_a=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ca=new WeakMap,Fa=new WeakMap,Sa=new WeakMap,Ba=new WeakMap,ja=new WeakMap,Ka=new WeakMap,za=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ya=new WeakMap,Ja=new WeakMap,$a=new WeakMap,qa=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,ei=new WeakMap,ti=new WeakMap,ai=new WeakMap,ii=new WeakMap,ni=new WeakMap,oi=new WeakMap,ri=new WeakMap,ci=new WeakMap,si=new WeakMap,li=new WeakMap;class hi extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,si,{get:wi,set:fi}),(0,Z.Z)(this,oi,{get:gi,set:mi}),(0,Z.Z)(this,ai,{get:bi,set:vi}),(0,Z.Z)(this,Qa,{get:Ei,set:ui}),(0,Z.Z)(this,$a,{get:pi,set:di}),(0,Z.Z)(this,Ma,{writable:!0,value:(ma(this),bt(this))}),(0,Z.Z)(this,Aa,{writable:!0,value:gt(this)}),(0,Z.Z)(this,_a,{writable:!0,value:wt(this)}),(0,Z.Z)(this,Da,{writable:!0,value:Zt(this)}),(0,Z.Z)(this,Pa,{writable:!0,value:It(this)}),(0,Z.Z)(this,Ua,{writable:!0,value:yt(this)}),(0,Z.Z)(this,Wa,{writable:!0,value:Lt(this)}),(0,Z.Z)(this,Ca,{writable:!0,value:xt(this)}),(0,Z.Z)(this,Fa,{writable:!0,value:At(this)}),(0,Z.Z)(this,Sa,{writable:!0,value:Dt(this)}),(0,Z.Z)(this,Ba,{writable:!0,value:Ut(this)}),(0,Z.Z)(this,ja,{writable:!0,value:Ct(this)}),(0,Z.Z)(this,Ka,{writable:!0,value:St(this)}),(0,Z.Z)(this,za,{writable:!0,value:jt(this)}),(0,Z.Z)(this,Ga,{writable:!0,value:zt(this)}),(0,Z.Z)(this,Ha,{writable:!0,value:Ht(this)}),(0,Z.Z)(this,Va,{writable:!0,value:Yt(this)}),(0,Z.Z)(this,Ya,{writable:!0,value:$t(this)}),(0,Z.Z)(this,Ja,{writable:!0,value:Xt(this)}),(0,Z.Z)(this,qa,{writable:!0,value:e=>{(0,O.Z)(this,$a).emit(e)}}),(0,Z.Z)(this,Xa,{writable:!0,value:aa(this)}),(0,Z.Z)(this,ei,{writable:!0,value:e=>()=>{(0,O.Z)(this,Qa).emit(e.data)}}),(0,Z.Z)(this,ti,{writable:!0,value:ra(this)}),(0,Z.Z)(this,ii,{writable:!0,value:e=>{(0,O.Z)(this,ai).emit(e)}}),(0,Z.Z)(this,ni,{writable:!0,value:ha(this)}),(0,Z.Z)(this,ri,{writable:!0,value:e=>t=>{t.preventDefault(),(0,O.Z)(this,oi).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})}}),(0,Z.Z)(this,ci,{writable:!0,value:Ea(this)}),(0,Z.Z)(this,li,{writable:!0,value:(e,t)=>{(0,O.Z)(this,si).emit({nodeId:e,collapsed:t})}})}get nodes(){return(0,O.Z)(this,Ma)}set nodes(e){(0,I.Z)(this,Ma,e)}get actions(){return(0,O.Z)(this,Aa)}set actions(e){(0,I.Z)(this,Aa,e)}get actionsHidden(){return(0,O.Z)(this,_a)}set actionsHidden(e){(0,I.Z)(this,_a,e)}get placeholder(){return(0,O.Z)(this,Da)}set placeholder(e){(0,I.Z)(this,Da,e)}get isTransformName(){return(0,O.Z)(this,Pa)}set isTransformName(e){(0,I.Z)(this,Pa,e)}get searchPlaceholder(){return(0,O.Z)(this,Ua)}set searchPlaceholder(e){(0,I.Z)(this,Ua,e)}get noSearch(){return(0,O.Z)(this,Wa)}set noSearch(e){(0,I.Z)(this,Wa,e)}get activeKey(){return(0,O.Z)(this,Ca)}set activeKey(e){(0,I.Z)(this,Ca,e)}get showMatchedNodeOnly(){return(0,O.Z)(this,Fa)}set showMatchedNodeOnly(e){(0,I.Z)(this,Fa,e)}get matchNodeDataFields(){return(0,O.Z)(this,Sa)}set matchNodeDataFields(e){(0,I.Z)(this,Sa,e)}get fixedActionsFor(){return(0,O.Z)(this,Ba)}set fixedActionsFor(e){(0,I.Z)(this,Ba,e)}get collapsible(){return(0,O.Z)(this,ja)}set collapsible(e){(0,I.Z)(this,ja,e)}get collapsedNodes(){return(0,O.Z)(this,Ka)}set collapsedNodes(e){(0,I.Z)(this,Ka,e)}get allowDrag(){return(0,O.Z)(this,za)}set allowDrag(e){(0,I.Z)(this,za,e)}get allowDragToRoot(){return(0,O.Z)(this,Ga)}set allowDragToRoot(e){(0,I.Z)(this,Ga,e)}get allowDragToInside(){return(0,O.Z)(this,Ha)}set allowDragToInside(e){(0,I.Z)(this,Ha,e)}get nodeKey(){return(0,O.Z)(this,Va)}set nodeKey(e){(0,I.Z)(this,Va,e)}get skipNotify(){return(0,O.Z)(this,Ya)}set skipNotify(e){(0,I.Z)(this,Ya,e)}render(){return L().createElement(wa.L.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,O.Z)(this,qa)}},L().createElement(Za.f.Provider,{value:{activeKey:this.activeKey,basePaddingLeft:5,showMatchedNodeOnly:this.showMatchedNodeOnly,isTransformName:this.isTransformName,fixedActionsFor:this.fixedActionsFor,nodeKey:this.nodeKey,collapsible:this.collapsible,collapsedNodes:this.collapsedNodes,getCollapsedId:ya,onNodeToggle:(0,O.Z)(this,li),skipNotify:this.skipNotify,clickFactory:(0,O.Z)(this,ei),contextMenuFactory:(0,O.Z)(this,ri),matchNode:(e,t)=>{var a;return(0,ka.$)(e.name,t)||!(null===(a=this.matchNodeDataFields)||void 0===a||!a.length)&&(0,ka.$)("*"===this.matchNodeDataFields?e.data:(0,fa.pick)(e.data,this.matchNodeDataFields),t)}}},L().createElement(Na.ME,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,O.Z)(this,ii),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}function di(e){ea(this,e)}function pi(){return Qt(this)}function ui(e){na(this,e)}function Ei(){return ia(this)}function vi(e){sa(this,e)}function bi(){return ca(this)}function mi(e){pa(this,e)}function gi(){return da(this)}function fi(e){ba(this,e)}function wi(){return va(this)}ga=hi,({e:[bt,gt,wt,Zt,It,yt,Lt,xt,At,Dt,Ut,Ct,St,jt,zt,Ht,Yt,$t,Xt,Qt,ea,aa,ia,na,ra,ca,sa,ha,da,pa,Ea,va,ba,ma],c:[Ra,ut]}=(0,y.Z)(ga,[[vt,1,"nodes"],[mt,1,"actions"],[ft,1,"actionsHidden"],[Nt,1,"placeholder"],[kt,1,"isTransformName"],[Ot,1,"searchPlaceholder"],[Rt,1,"noSearch"],[Tt,1,"activeKey"],[Mt,1,"showMatchedNodeOnly"],[_t,1,"matchNodeDataFields"],[Pt,1,"fixedActionsFor"],[Wt,1,"collapsible"],[Ft,1,"collapsedNodes"],[Bt,1,"allowDrag"],[Kt,1,"allowDragToRoot"],[Gt,1,"allowDragToInside"],[Vt,1,"nodeKey"],[Jt,1,"skipNotify"],[qt,1,"actionClickEvent",e=>(0,O.Z)(e,Ja),(e,t)=>(0,I.Z)(e,Ja,t)],[ta,1,"nodeClickEvent",e=>(0,O.Z)(e,Xa),(e,t)=>(0,I.Z)(e,Xa,t)],[oa,1,"nodeDropEvent",e=>(0,O.Z)(e,ti),(e,t)=>(0,I.Z)(e,ti,t)],[la,1,"nodeContextMenuEvent",e=>(0,O.Z)(e,ni),(e,t)=>(0,I.Z)(e,ni,t)],[ua,1,"nodeToggleEvent",e=>(0,O.Z)(e,ci),(e,t)=>(0,I.Z)(e,ci,t)]],[Et],0,(e=>li.has((0,k.Z)(e))),x.ReactNextElement)),ut();var Ni=a(6107),Zi=a(9194);a(7426),customElements.define("visual-builder.inject-preview-agent",(0,Ni.createProviderClass)((function(e,t){return(0,Zi.Z)(e,t)})));var ki,Ii,Oi,yi,Ri,Li,Ti,xi,Mi,Ai,_i,Di,Pi,Ui,Wi,Ci,Fi=a(3028),Si=a(8874),Bi=a.n(Si),ji=a(6094),Ki=a(7088),zi=function(e){return e.LOAD_MORE="LOAD_MORE",e.LOADING="LOADING",e.NO_DATA="NO_DATA",e.NODE="NODE",e.ADD="ADD",e.EDIT="EDIT",e.DELETE="DELETE",e.IMPORT="IMPORT",e.APPEND_RELATION="APPEND_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REMOVE_RELATION="REMOVE_RELATION",e.ADD_FULL="ADD_FULL",e.EDIT_FULL="EDIT_FULL",e.DELETE_FULL="DELETE_FULL",e.IMPORT_FULL="IMPORT_FULL",e.APPEND_RELATION_FULL="APPEND_RELATION_FULL",e.UPDATE_RELATION_FULL="UPDATE_RELATION_FULL",e.REMOVE_RELATION_FULL="REMOVE_RELATION_FULL",e.PROJECT="PROJECT",e.USER="USER",e.PERMISSION="PERMISSION",e.BRICK="BRICK",e.ROUTE="ROUTE",e.TEMPLATE="TEMPLATE",e.SNIPPET="SNIPPET",e.I18N="I18N",e.IMAGE="IMAGE",e.FUNCTION="FUNCTION",e.MENU="MENU",e.MENU_ITEM="MENU_ITEM",e.WORKFLOW="WORKFLOW",e}({}),Gi="bricks/visual-builder/workbench-history-action",Hi=a(4795),Vi=a(5121),Yi=function(){var e=(0,Hi.Z)((function*(e,t,a){return(yield Vi.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,Fi.Z)((0,Fi.Z)({},a),{},{params:t}))).data}));return function(t,a,i){return e.apply(this,arguments)}}(),Ji=a(860),$i={add:"".concat(Gi,":").concat(zi.ADD),edit:"".concat(Gi,":").concat(zi.EDIT),delete:"".concat(Gi,":").concat(zi.DELETE),import:"".concat(Gi,":").concat(zi.IMPORT),append_relation:"".concat(Gi,":").concat(zi.APPEND_RELATION),update_relation:"".concat(Gi,":").concat(zi.UPDATE_RELATION),remove_relation:"".concat(Gi,":").concat(zi.REMOVE_RELATION)},qi={add:"".concat(Gi,":").concat(zi.ADD_FULL),edit:"".concat(Gi,":").concat(zi.EDIT_FULL),delete:"".concat(Gi,":").concat(zi.DELETE_FULL),import:"".concat(Gi,":").concat(zi.IMPORT_FULL),append_relation:"".concat(Gi,":").concat(zi.APPEND_RELATION_FULL),update_relation:"".concat(Gi,":").concat(zi.UPDATE_RELATION_FULL),remove_relation:"".concat(Gi,":").concat(zi.REMOVE_RELATION_FULL)},Xi={project:"".concat(Gi,":").concat(zi.PROJECT),userGroup:"".concat(Gi,":").concat(zi.USER),permission:"".concat(Gi,":").concat(zi.PERMISSION),brick:"".concat(Gi,":").concat(zi.BRICK),route:"".concat(Gi,":").concat(zi.ROUTE),template:"".concat(Gi,":").concat(zi.TEMPLATE),snippet:"".concat(Gi,":").concat(zi.SNIPPET),i18n:"".concat(Gi,":").concat(zi.I18N),image:"".concat(Gi,":").concat(zi.IMAGE),function:"".concat(Gi,":").concat(zi.FUNCTION),menu:"".concat(Gi,":").concat(zi.MENU),menuItem:"".concat(Gi,":").concat(zi.MENU_ITEM),workflow:"".concat(Gi,":").concat(zi.WORKFLOW)},Qi={PROJECT_MICRO_APP:"".concat(Gi,":").concat(zi.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(Gi,":").concat(zi.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(Gi,":").concat(zi.PERMISSION),STORYBOARD_BRICK:"".concat(Gi,":").concat(zi.BRICK),STORYBOARD_ROUTE:"".concat(Gi,":").concat(zi.ROUTE),STORYBOARD_TEMPLATE:"".concat(Gi,":").concat(zi.TEMPLATE),STORYBOARD_SNIPPET:"".concat(Gi,":").concat(zi.SNIPPET),STORYBOARD_I18N:"".concat(Gi,":").concat(zi.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(Gi,":").concat(zi.IMAGE),STORYBOARD_FUNCTION:"".concat(Gi,":").concat(zi.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(Gi,":").concat(zi.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(Gi,":").concat(zi.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(Gi,":").concat(zi.WORKFLOW)};function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return Ji.i18n.t("".concat(Gi,":").concat(zi.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,Ki.initializeReactI18n)(Gi,{en:{LOAD_MORE:"Load more",LOADING:"Loading",NO_DATA:"No data",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }} etc., a total of {{ count }} items",ADD:"Add node",EDIT:"Edit node",DELETE:"Delete node",IMPORT:"Batch import node",APPEND_RELATION:"Append Relation",UPDATE_RELATION:"Update Relation",REMOVE_RELATION:"Remove Relation",ADD_FULL:"Add {{ category }} ({{ nodes }})",EDIT_FULL:"Edit {{ nodeChanges }} of {{ category }} ({{ nodes }})",DELETE_FULL:"Delete {{ category }} ({{ nodes }})",IMPORT_FULL:"Batch Import {{ category }} ({{ nodes }})",APPEND_RELATION_FULL:"Append the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",UPDATE_RELATION_FULL:"Update the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",REMOVE_RELATION_FULL:"Remove the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",PROJECT:"Project",USER:"User Group",PERMISSION:"Permission",BRICK:"Brick",ROUTE:"Route",TEMPLATE:"Template",SNIPPET:"Snippet",I18N:"I18N",IMAGE:"Image",FUNCTION:"Function",MENU:"Menu",MENU_ITEM:"Menu item",WORKFLOW:"Workflow"},zh:{LOAD_MORE:"加载更多",LOADING:"加载中",NO_DATA:"没有数据",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }}等共{{ count }}项",ADD:"新增节点",EDIT:"编辑节点",DELETE:"删除节点",IMPORT:"批量导入节点",APPEND_RELATION:"添加关系",UPDATE_RELATION:"更新关系",REMOVE_RELATION:"移除关系",ADD_FULL:"新增{{ category }}({{ nodes }})",EDIT_FULL:"编辑{{ category }}({{ nodes }})的 {{ nodeChanges }}",DELETE_FULL:"删除{{ category }}({{ nodes }})",IMPORT_FULL:"批量导入{{ category }}({{ nodes }})",APPEND_RELATION_FULL:"添加{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",UPDATE_RELATION_FULL:"更新{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",REMOVE_RELATION_FULL:"移除{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",PROJECT:"项目",USER:"用户组",PERMISSION:"权限点",BRICK:"构件",ROUTE:"路由",TEMPLATE:"模版",SNIPPET:"片段",I18N:"国际化",IMAGE:"图片",FUNCTION:"函数",MENU:"菜单",MENU_ITEM:"菜单项",WORKFLOW:"工作流"}});var tn,{defineElement:an,property:nn,event:on}=(0,T.createDecorators)(),rn=(0,x.wrapBrick)("eo-button"),cn=(0,x.wrapBrick)("eo-link"),sn=(0,x.wrapBrick)("eo-icon"),ln=(0,x.wrapBrick)("eo-easyops-avatar"),hn=(0,x.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});Ii=an("visual-builder.workbench-history-action",{styleTexts:[ji.Z]}),Oi=nn(),Ri=nn(),Ti=on({type:"history.item.click"}),_i=on({type:"rollback"});var dn=new WeakMap,pn=new WeakMap,un=new WeakMap,En=new WeakMap,vn=new WeakMap,bn=new WeakMap,mn=new WeakMap,gn=new WeakMap;class fn extends x.ReactNextElement{constructor(){super(...arguments),(0,Z.Z)(this,mn,{get:kn,set:Zn}),(0,Z.Z)(this,En,{get:Nn,set:wn}),(0,Z.Z)(this,dn,{writable:!0,value:(Wi(this),yi(this))}),(0,Z.Z)(this,pn,{writable:!0,value:Li(this)}),(0,Z.Z)(this,un,{writable:!0,value:xi(this)}),(0,Z.Z)(this,vn,{writable:!0,value:e=>{(0,O.Z)(this,En).emit(e)}}),(0,Z.Z)(this,bn,{writable:!0,value:Di(this)}),(0,Z.Z)(this,gn,{writable:!0,value:e=>{(0,O.Z)(this,mn).emit(e)}})}get appId(){return(0,O.Z)(this,dn)}set appId(e){(0,I.Z)(this,dn,e)}get projectId(){return(0,O.Z)(this,pn)}set projectId(e){(0,I.Z)(this,pn,e)}render(){return L().createElement(In,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,O.Z)(this,vn),onRollback:(0,O.Z)(this,gn)})}}function wn(e){Ai(this,e)}function Nn(){return Mi(this)}function Zn(e){Ui(this,e)}function kn(){return Pi(this)}function In(e){var{appId:t,projectId:a,onHistoryItemClick:i,onRollback:n}=e,{t:o}=(0,Ki.useTranslation)(Gi),[r,c]=(0,R.useState)(!1),[s,l]=(0,R.useState)(!0),[h,d]=(0,R.useState)([]),p=(0,R.useRef)(),u=e=>{c(!0),Yi(t,{ts:p.current,limit:20}).then((t=>{d((a=>{var i=t.list.filter((e=>e.abstract)).map((e=>{return(0,Fi.Z)((0,Fi.Z)({},e),{},{translation:(t=e,l=Ji.i18n.t(null!==(a=Xi[t.category])&&void 0!==a?a:t.category),h=Ji.i18n.t(null!==(i=$i[t.action])&&void 0!==i?i:t.action),d=Ji.i18n.t(null!==(n=Qi[t.abstract.leftObjectId])&&void 0!==n?n:t.abstract.leftObjectId),p=Ji.i18n.t(null!==(o=Qi[t.abstract.rightObjectId])&&void 0!==o?o:t.abstract.rightObjectId),u=en(t.abstract.nodes,t.abstract.nodesCount),E=en(t.abstract.leftNodes,t.abstract.leftNodesCount),v=en(t.abstract.rightNodes,t.abstract.rightNodesCount),{category:l,action:h,leftObjectId:d,rightObjectId:p,nodes:u,leftNodes:E,rightNodes:v,abstract:Ji.i18n.t(null!==(r=qi[t.action])&&void 0!==r?r:t.action,{category:l,nodes:u,leftNodes:E,rightNodes:v,nodeChanges:null===(c=t.abstract.nodeChanges)||void 0===c?void 0:c.join(", "),relationChanges:null===(s=t.abstract.relationChanges)||void 0===s?void 0:s.join(", "),leftObjectId:d,rightObjectId:p})})});var t,a,i,n,o,r,c,s,l,h,d,p,u,E,v}));return e?i:a.concat(i)})),p.current=t.ts,l(t.list.length<20)})).catch((e=>{(0,ze.handleHttpError)(e)})).finally((()=>{c(!1)}))};return L().createElement(hn,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(l(!0),d([]),p.current=0,u(!0))}},L().createElement(rn,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),L().createElement("div",null,L().createElement("div",{className:"history-title"},"History"),L().createElement("div",{className:"history-list"},h.length?h.map(((e,t)=>L().createElement(On,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t,current:0===t,onHistoryItemClick:i,onRollback:n}))):L().createElement("div",{className:"empty"},o(r?zi.LOADING:zi.NO_DATA)),!s&&L().createElement("span",{className:"load-more-container"},L().createElement(cn,{className:"load-more",disabled:r,onClick:e=>u()},o(zi.LOAD_MORE)))),L().createElement("slot",null)))}function On(e){var{data:t,enableRollback:a,current:i,onHistoryItemClick:n,onRollback:o}=e,r=Bi()(t.ts/1e6),c=Bi().duration(r.diff(Bi()())),s=c.days()<=-1?r.format("YYYY-MM-DD HH:mm:ss"):c.humanize(!0,{ss:0,s:60,m:60,h:24});return L().createElement("div",{className:"item-container"},L().createElement("div",{className:"item-title"},L().createElement("div",{className:"title-left",onClick:e=>n(t)},L().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),i&&L().createElement("div",{className:"branch"},"(current)")),L().createElement("div",{className:"title-right"},a&&L().createElement(sn,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:e=>o(t)}))),L().createElement("div",{className:"item-info"},L().createElement(ln,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),L().createElement("div",{className:"time"},s),L().createElement("div",{className:"operator"},t.user)))}Ci=fn,({e:[yi,Li,xi,Mi,Ai,Di,Pi,Ui,Wi],c:[tn,ki]}=(0,y.Z)(Ci,[[Oi,1,"appId"],[Ri,1,"projectId"],[Ti,1,"historyItemClickEvent",e=>(0,O.Z)(e,un),(e,t)=>(0,I.Z)(e,un,t)],[_i,1,"rollbackEvent",e=>(0,O.Z)(e,bn),(e,t)=>(0,I.Z)(e,bn,t)]],[Ii],0,(e=>gn.has((0,k.Z)(e))),x.ReactNextElement)),ki()},8453:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,".custom-scrollbar-container{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.03)}.custom-scrollbar-container::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;position:absolute}.custom-scrollbar-container::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0);border-radius:4px}.custom-scrollbar-container:hover::-webkit-scrollbar-track{background-color:rgba(255,255,255,0.03)}.custom-scrollbar-container:hover::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.15)}",""]);const c=r.toString()},8799:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,'.workBenchActionList{display:flex;flex-direction:column;width:-webkit-min-content;width:-moz-min-content;width:min-content;height:100%;background-color:#4297ff}:host-context(html[data-theme="dark-v2"]) .workBenchActionList,\n:host-context([data-override-theme="dark-v2"]) .workBenchActionList{background-color:#323237}',""]);const c=r.toString()},7310:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:rgba(255,255,255,0.4);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:white}.action.active::part(link),\n.action::part(link):hover{color:white}',""]);const c=r.toString()},6094:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}eo-popover::part(popup){width:400px;padding:10px;background:var(--color-fill-bg-container-4);border-radius:var(--medius-border-radius);box-shadow:var(--feedback-container-shadow);z-index:1000}.history-title{font-size:var(--title-font-size);font-weight:var(--font-weight-500);color:var(--color-strong-text);margin-bottom:5px}.history-list{max-height:500px;overflow-y:auto}.item-container{padding:10px 0;display:flex;flex-direction:column;gap:5px}.empty{padding:5px 0 10px 0;font-size:14px;color:var(--text-color-secondary);text-align:center}.item-container:not(:last-of-type){border-bottom:1px solid var(--color-border-divider-line)}.item-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.title-left,\n.title-right{display:flex;align-items:center}.title-left{cursor:pointer;overflow:hidden;gap:5px}.topic{font-size:14px;color:var(--text-color-title);font-weight:var(--font-weight-500);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.branch{font-size:14px;color:var(--text-color-secondary)}.rollback{margin-right:5px;font-size:14px;color:var(--text-color-secondary);cursor:pointer}.rollback:hover{color:var(--color-brand)}.item-info{display:flex;align-items:center;gap:5px}.time,\n.operator{font-size:14px;color:var(--text-color-secondary)}.load-more-container{display:block;text-align:center}",""]);const c=r.toString()},8249:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,':host{display:block;--pane-color:#595959}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--pane-color:#ccc}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.pane{display:flex;flex-direction:column;color:var(--pane-color);height:100%}.pane-header{display:flex;align-items:center;cursor:pointer;border-top:1px solid transparent;position:relative}.pane-header:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#007fd4}:host(:not(:first-child)) .pane-header{border-top-color:rgba(204,204,204,0.2)}.pane-scroll-shadow{display:none;position:absolute;bottom:-3px;left:0;right:0;height:3px;box-shadow:#000000 0 6px 6px -6px inset;z-index:1}.scrolled .pane-scroll-shadow{display:block}.pane-title{display:flex;align-items:center;font-size:13px;line-height:24px;height:25px;min-width:0;flex:1}.title-icon{display:flex;justify-content:center;align-items:center;width:24px;padding-right:2px;line-height:1;flex-shrink:0}.title-label{text-transform:uppercase;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-body{flex-grow:1;min-height:0;display:none;overflow:hidden;overflow-y:auto;overflow-y:overlay}:host([active]) .pane-body{display:initial}:host(:not(:hover)) ::slotted([slot="actions"]){display:none}.badge{background-color:rgb(77,77,77);color:rgb(255,255,255);border-radius:11px;height:18px;padding:3px 6px;line-height:13px;margin:0 3px;font-size:12px}',""]);const c=r.toString()},3571:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(9601),n=a.n(i),o=a(2609),r=a.n(o)()(n());r.push([e.id,':host{--sidebar-background:#fff;--title-container-background:#fff;--title-container-color:#595959;display:block;outline-color:rgba(83,89,93,0.5);background-color:var(--sidebar-background);height:100%}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--sidebar-background:#181818;--title-container-background:#181818;--title-container-color:rgb(187,187,187);background-color:var(--sidebar-background)}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.sidebar{display:flex;flex-direction:column;height:100%}.title-container{display:flex;padding:0 8px 8px 8px;color:var(--title-container-color);background:var(--title-container-background)}.title-label{font-weight:300;line-height:44px;padding-left:12px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-container{flex-grow:1;min-height:0;display:flex;flex-direction:column}::slotted([slot="panes"]){transition:flex 0.2s;min-height:25px}',""]);const c=r.toString()}}]);
|
|
3
|
+
//# sourceMappingURL=6519.68f6eb5c.js.map
|