@next-bricks/visual-builder 1.39.11 → 1.39.13

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.
Files changed (86) hide show
  1. package/dist/bricks.json +5 -5
  2. package/dist/chunks/2475.5b883974.js +3 -0
  3. package/dist/chunks/2475.5b883974.js.map +1 -0
  4. package/dist/chunks/{5552.08fd5ac1.js → 3171.875199eb.js} +2 -2
  5. package/dist/chunks/{3171.1e6913a1.js.map → 3171.875199eb.js.map} +1 -1
  6. package/dist/chunks/{4765.a42492b9.js → 4765.b8c1db9e.js} +2 -2
  7. package/dist/chunks/{4765.a42492b9.js.map → 4765.b8c1db9e.js.map} +1 -1
  8. package/dist/chunks/{4837.69df2655.js → 4837.97a0dcd6.js} +2 -2
  9. package/dist/chunks/{7218.a19700c5.js.map → 4837.97a0dcd6.js.map} +1 -1
  10. package/dist/chunks/{5522.4d152e93.js → 5522.16e54d5e.js} +3 -3
  11. package/dist/chunks/{5522.4d152e93.js.map → 5522.16e54d5e.js.map} +1 -1
  12. package/dist/chunks/{3171.1e6913a1.js → 5552.aca70f55.js} +2 -2
  13. package/dist/chunks/{5552.08fd5ac1.js.map → 5552.aca70f55.js.map} +1 -1
  14. package/dist/chunks/{7146.078b8ac4.js → 7146.cc71b664.js} +2 -2
  15. package/dist/chunks/{7146.078b8ac4.js.map → 7146.cc71b664.js.map} +1 -1
  16. package/dist/chunks/{7218.a19700c5.js → 7218.c816a650.js} +2 -2
  17. package/dist/chunks/{4837.69df2655.js.map → 7218.c816a650.js.map} +1 -1
  18. package/dist/chunks/{8734.21313ad6.js → 8734.cdd8c904.js} +2 -2
  19. package/dist/chunks/{8734.21313ad6.js.map → 8734.cdd8c904.js.map} +1 -1
  20. package/dist/chunks/{9653.4649f558.js → 9653.b9c29b0d.js} +2 -2
  21. package/dist/chunks/9653.b9c29b0d.js.map +1 -0
  22. package/dist/chunks/{batch-update-raw-data-generated-view.5bf6f18e.js → batch-update-raw-data-generated-view.16272062.js} +3 -3
  23. package/dist/chunks/{batch-update-raw-data-generated-view.5bf6f18e.js.map → batch-update-raw-data-generated-view.16272062.js.map} +1 -1
  24. package/dist/chunks/chat-conversation.c9d27c2f.js.map +1 -1
  25. package/dist/chunks/{chat-preview.abac0331.js → chat-preview.fd35dba0.js} +3 -3
  26. package/dist/chunks/{chat-preview.abac0331.js.map → chat-preview.fd35dba0.js.map} +1 -1
  27. package/dist/chunks/{check-editor-by-name.6b7206de.js → check-editor-by-name.545857a0.js} +2 -2
  28. package/dist/chunks/{check-editor-by-name.6b7206de.js.map → check-editor-by-name.545857a0.js.map} +1 -1
  29. package/dist/chunks/{contract-select.838a3175.js → contract-select.dad05385.js} +3 -3
  30. package/dist/chunks/{contract-select.838a3175.js.map → contract-select.dad05385.js.map} +1 -1
  31. package/dist/chunks/{generate-snippets-context-menu.1cae90d2.js → generate-snippets-context-menu.c82ed4db.js} +2 -2
  32. package/dist/chunks/{generate-snippets-context-menu.1cae90d2.js.map → generate-snippets-context-menu.c82ed4db.js.map} +1 -1
  33. package/dist/chunks/{get-config-by-data-for-ai.276b2176.js → get-config-by-data-for-ai.b5269977.js} +3 -3
  34. package/dist/chunks/{get-config-by-data-for-ai.276b2176.js.map → get-config-by-data-for-ai.b5269977.js.map} +1 -1
  35. package/dist/chunks/{get-data-deps.b5325f79.js → get-data-deps.487a2b6c.js} +2 -2
  36. package/dist/chunks/{get-data-deps.b5325f79.js.map → get-data-deps.487a2b6c.js.map} +1 -1
  37. package/dist/chunks/{get-dependency-tree.d1fa5313.js → get-dependency-tree.596d699c.js} +2 -2
  38. package/dist/chunks/{get-dependency-tree.d1fa5313.js.map → get-dependency-tree.596d699c.js.map} +1 -1
  39. package/dist/chunks/{get-raw-data-system-prompts.478855b9.js → get-raw-data-system-prompts.d1206300.js} +2 -2
  40. package/dist/chunks/{get-raw-data-system-prompts.478855b9.js.map → get-raw-data-system-prompts.d1206300.js.map} +1 -1
  41. package/dist/chunks/{get-usage-member-statistics.41a79a4a.js → get-usage-member-statistics.d964ca53.js} +2 -2
  42. package/dist/chunks/{get-usage-member-statistics.41a79a4a.js.map → get-usage-member-statistics.d964ca53.js.map} +1 -1
  43. package/dist/chunks/{inject-chat-preview-agent.e458ca21.js → inject-chat-preview-agent.c94459a5.js} +2 -2
  44. package/dist/chunks/{inject-chat-preview-agent.e458ca21.js.map → inject-chat-preview-agent.c94459a5.js.map} +1 -1
  45. package/dist/chunks/main.abdebced.js +2 -0
  46. package/dist/chunks/{main.a7e8b5d9.js.map → main.abdebced.js.map} +1 -1
  47. package/dist/chunks/{parse-path.a91243e3.js → parse-path.fba42203.js} +2 -2
  48. package/dist/chunks/{parse-path.a91243e3.js.map → parse-path.fba42203.js.map} +1 -1
  49. package/dist/chunks/{pre-generated-config-preview.4a615c87.js → pre-generated-config-preview.0b6e46f0.js} +2 -2
  50. package/dist/chunks/{pre-generated-config-preview.4a615c87.js.map → pre-generated-config-preview.0b6e46f0.js.map} +1 -1
  51. package/dist/chunks/{pre-generated-config.0b56cc00.js → pre-generated-config.e3a01708.js} +2 -2
  52. package/dist/chunks/{pre-generated-config.0b56cc00.js.map → pre-generated-config.e3a01708.js.map} +1 -1
  53. package/dist/chunks/{pre-generated-container.a1823efe.js → pre-generated-container.6eb4ab6b.js} +2 -2
  54. package/dist/chunks/{pre-generated-container.a1823efe.js.map → pre-generated-container.6eb4ab6b.js.map} +1 -1
  55. package/dist/chunks/{pre-generated-preview.e9ee3513.js → pre-generated-preview.98b88329.js} +3 -3
  56. package/dist/chunks/{pre-generated-preview.e9ee3513.js.map → pre-generated-preview.98b88329.js.map} +1 -1
  57. package/dist/chunks/{property-editor.c6f914ae.js → property-editor.866bca42.js} +2 -2
  58. package/dist/chunks/{property-editor.c6f914ae.js.map → property-editor.866bca42.js.map} +1 -1
  59. package/dist/chunks/{raw-data-preview.28b47947.js → raw-data-preview.9be74f23.js} +3 -3
  60. package/dist/chunks/{raw-data-preview.28b47947.js.map → raw-data-preview.9be74f23.js.map} +1 -1
  61. package/dist/chunks/{raw-metric-preview.a1d28670.js → raw-metric-preview.db39bab8.js} +3 -3
  62. package/dist/chunks/{raw-metric-preview.a1d28670.js.map → raw-metric-preview.db39bab8.js.map} +1 -1
  63. package/dist/chunks/{workbench-action-list.3405f55e.js → workbench-action-list.cd3e2ff1.js} +2 -2
  64. package/dist/chunks/{workbench-action-list.3405f55e.js.map → workbench-action-list.cd3e2ff1.js.map} +1 -1
  65. package/dist/chunks/{workbench-history-action.dead9994.js → workbench-history-action.2b34f98b.js} +3 -3
  66. package/dist/chunks/{workbench-history-action.dead9994.js.map → workbench-history-action.2b34f98b.js.map} +1 -1
  67. package/dist/index.82f56a3d.js +2 -0
  68. package/dist/{index.34986c58.js.map → index.82f56a3d.js.map} +1 -1
  69. package/dist/manifest.json +100 -100
  70. package/dist/types.json +688 -688
  71. package/package.json +2 -2
  72. package/dist/chunks/2475.34e54f88.js +0 -3
  73. package/dist/chunks/2475.34e54f88.js.map +0 -1
  74. package/dist/chunks/9653.4649f558.js.map +0 -1
  75. package/dist/chunks/main.a7e8b5d9.js +0 -2
  76. package/dist/index.34986c58.js +0 -2
  77. /package/dist/chunks/{2475.34e54f88.js.LICENSE.txt → 2475.5b883974.js.LICENSE.txt} +0 -0
  78. /package/dist/chunks/{5522.4d152e93.js.LICENSE.txt → 5522.16e54d5e.js.LICENSE.txt} +0 -0
  79. /package/dist/chunks/{batch-update-raw-data-generated-view.5bf6f18e.js.LICENSE.txt → batch-update-raw-data-generated-view.16272062.js.LICENSE.txt} +0 -0
  80. /package/dist/chunks/{chat-preview.abac0331.js.LICENSE.txt → chat-preview.fd35dba0.js.LICENSE.txt} +0 -0
  81. /package/dist/chunks/{contract-select.838a3175.js.LICENSE.txt → contract-select.dad05385.js.LICENSE.txt} +0 -0
  82. /package/dist/chunks/{get-config-by-data-for-ai.276b2176.js.LICENSE.txt → get-config-by-data-for-ai.b5269977.js.LICENSE.txt} +0 -0
  83. /package/dist/chunks/{pre-generated-preview.e9ee3513.js.LICENSE.txt → pre-generated-preview.98b88329.js.LICENSE.txt} +0 -0
  84. /package/dist/chunks/{raw-data-preview.28b47947.js.LICENSE.txt → raw-data-preview.9be74f23.js.LICENSE.txt} +0 -0
  85. /package/dist/chunks/{raw-metric-preview.a1d28670.js.LICENSE.txt → raw-metric-preview.db39bab8.js.LICENSE.txt} +0 -0
  86. /package/dist/chunks/{workbench-history-action.dead9994.js.LICENSE.txt → workbench-history-action.2b34f98b.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[154],{11369:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(17545);function i(t){var e=function(t){if("object"!=(0,r.A)(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,r.A)(e)?e:e+""}},12559:(t,e,n)=>{function r(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}n.d(e,{A:()=>r})},17545:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:()=>r})},18488:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(36758),i=n.n(r),o=n(40935),a=n.n(o)()(i());a.push([t.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const c=a.toString()},26902:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(17545);function i(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?(0,r.A)(t):"null"));return t}},36758:t=>{t.exports=function(t){return t[1]}},40935:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(a[s]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);r&&a[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},55723:(t,e,n)=>{n.r(e),n.d(e,{PreGeneratedConfigPreview:()=>L,PreGeneratedConfigPreviewComponent:()=>W});var r,i=n(70918),o=n(86121),a=n(70829),c=n(62740),s=n(18769),u=n.n(s),l=n(90870),d=n(30981),f=n(51921),p=n(55310),v=(n(34419),n(18488)),h=n(92120),m=n(19057);let b,g,y,w,A,k,E,S,_;const{defineElement:x,property:j}=(0,l.createDecorators)();let L;var T=new WeakMap,P=new WeakMap,z=new WeakMap,C=new WeakMap;class O extends d.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,T,g(this)),(0,i.A)(this,P,(y(this),w(this))),(0,i.A)(this,z,(A(this),k(this))),(0,i.A)(this,C,(E(this),S(this))),_(this)}get previewUrl(){return(0,a.A)(T,this)}set previewUrl(t){(0,o.A)(T,this,t)}get container(){return(0,a.A)(P,this)}set container(t){(0,o.A)(P,this,t)}get attrList(){return(0,a.A)(z,this)}set attrList(t){(0,o.A)(z,this,t)}get mockList(){return(0,a.A)(C,this)}set mockList(t){(0,o.A)(C,this,t)}render(){return u().createElement(W,{root:this,previewUrl:this.previewUrl,container:this.container,attrList:this.attrList,mockList:this.mockList})}}function W(t){let{root:e,previewUrl:n,container:r,attrList:i,mockList:o}=t;const a=(0,s.useRef)(),[c,l]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>{const t=()=>{var e;const n=null===(e=a.current)||void 0===e?void 0:e.contentWindow;null!=n&&n._preview_only_render?l(!0):setTimeout(t,100)};t()}),[]);return(0,s.useEffect)((()=>{var t;const n=null===(t=a.current)||void 0===t?void 0:t.contentWindow;if(!c||!n)return;const r=new ResizeObserver((()=>{e.style.height=`${n.document.body.scrollHeight}px`}));return r.observe(n.document.body),()=>r.disconnect()}),[c,e]),(0,s.useEffect)((()=>{var t,e;const n=null===(t=a.current)||void 0===t||null===(t=t.contentWindow)||void 0===t?void 0:t._preview_only_render;if(!c||!n||!i)return;let s;s="descriptions"===r?{brick:"eo-descriptions",errorBoundary:!0,properties:{column:2,list:i.map((t=>{const e={label:t.name};return t.config&&(e.useBrick=(0,m.w)(t.config,t.id)),e})),dataSource:null==o?void 0:o[0]}}:{brick:"eo-next-table",errorBoundary:!0,properties:{rowKey:null===(e=i[0])||void 0===e?void 0:e.id,columns:i.map((t=>{const e={title:t.name,dataIndex:t.id,key:t.id};return t.config&&(e.useBrick=(0,m.m)(t.config,".cellData")),e})),dataSource:{list:o,page:1,pageSize:20}}},n("yaml",{yaml:(0,p.safeDump)([s],{skipInvalid:!0})},{theme:"light",uiVersion:"8.2",styleText:h.A})}),[c,i,o,r]),u().createElement("div",{className:"container"},u().createElement("iframe",{ref:a,src:null!=n?n:`${(0,f.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:d}))}r=O,({e:[g,y,w,A,k,E,S,_],c:[L,b]}=(0,c.A)(r,[x("visual-builder.pre-generated-config-preview",{styleTexts:[v.A]})],[[j(),1,"previewUrl"],[j(),1,"container"],[j({attribute:!1}),1,"attrList"],[j({attribute:!1}),1,"mockList"]],0,void 0,d.ReactNextElement)),b()},62740:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(17545),i=n(26902);function o(t,e,n){"symbol"==(0,r.A)(e)&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}var a=n(11369);function c(t,e,n,c,s,u){var l,d,f,p,v,h,m,b=Symbol.metadata||Symbol.for("Symbol.metadata"),g=Object.defineProperty,y=Object.create,w=[y(null),y(null)],A=e.length;function k(e,n,r){return function(i,o){n&&(o=i,i=t);for(var a=0;a<e.length;a++)o=e[a].apply(i,r?[o]:[]);return r?o:i}}function E(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw new TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function S(t,e,n,i,a,c,s,u,f,p,v){function h(t){if(!v(t))throw new TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),b=e[3],y=!s,A=1===a,S=3===a,_=4===a,x=2===a;function j(e,n,r){return function(i,o){return n&&(o=i,i=t),r&&r(i),L[e].call(i,o)}}if(!y){var L={},T=[],P=S?"get":_||A?"set":"value";if(f?(p||A?L={get:o((function(){return b(this)}),i,"get"),set:function(t){e[4](this,t)}}:L[P]=b,p||o(L[P],i,x?"":P)):p||(L=Object.getOwnPropertyDescriptor(t,i)),!p&&!f){if((d=w[+u][i])&&7!=(d^a))throw Error("Decorating two elements with the same name ("+L[P].name+") is not supported yet");w[+u][i]=a<3?1:a}}for(var z=t,C=m.length-1;C>=0;C-=n?2:1){var O=E(m[C],"A decorator","be",!0),W=n?m[C-1]:void 0,U={},B={kind:["field","accessor","method","getter","setter","class"][a],name:i,metadata:l,addInitializer:function(t,e){if(t.v)throw Error("attempted to call addInitializer after decoration was finished");E(e,"An initializer","be",!0),c.push(e)}.bind(null,U)};if(y)d=O.call(W,z,B),U.v=1,E(d,"class decorators","return")&&(z=d);else if(B.static=u,B.private=f,d=B.access={has:f?v.bind():function(t){return i in t}},_||(d.get=f?x?function(t){return h(t),L.value}:j("get",0,h):function(t){return t[i]}),x||S||(d.set=f?j("set",0,h):function(t,e){t[i]=e}),z=O.call(W,A?{get:L.get,set:L.set}:L[P],B),U.v=1,A){if("object"==(0,r.A)(z)&&z)(d=E(z.get,"accessor.get"))&&(L.get=d),(d=E(z.set,"accessor.set"))&&(L.set=d),(d=E(z.init,"accessor.init"))&&T.unshift(d);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else E(z,(p?"field":"method")+" decorators","return")&&(p?T.unshift(z):L[P]=z)}return a<2&&s.push(k(T,u,1),k(c,u,0)),p||y||(f?A?s.splice(-1,0,j("get",u),j("set",u)):s.push(x?L[P]:E.call.bind(L[P])):g(t,i,L)),z}function _(t){return g(t,b,{configurable:!0,enumerable:!0,value:l})}return void 0!==u&&(l=u[b]),l=y(null==l?null:l),v=[],h=function(t){t&&v.push(k(t))},m=function(e,r){for(var o=0;o<n.length;o++){var c=n[o],u=c[1],l=7&u;if((8&u)==e&&!l==r){var d=c[2],h=!!c[3],m=16&u;S(e?t:t.prototype,c,m,h?"#"+d:(0,a.A)(d),l,l<2?[]:e?p=p||[]:f=f||[],v,!!e,h,r,e&&h?function(e){return(0,i.A)(e)===t}:s)}}},m(8,0),m(0,0),m(8,1),m(0,1),h(f),h(p),d=v,A||_(t),{e:d,get c(){var n=[];return A&&[_(t=S(t,[e],c,t.name,5,n)),k(n,1)]}}}},70829:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(12559);function i(t,e){return t.get((0,r.A)(t,e))}},70918:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(72016);function i(t,e,n){(0,r.A)(t,e),e.set(t,n)}},72016:(t,e,n)=>{function r(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(e,{A:()=>r})},86121:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(12559);function i(t,e,n){return t.set((0,r.A)(t,e),n),n}},92120:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(36758),i=n.n(r),o=n(40935),a=n.n(o)()(i());a.push([t.id,"#preview-root{padding:0}",""]);const c=a.toString()}}]);
2
- //# sourceMappingURL=pre-generated-config-preview.4a615c87.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[154],{11369:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(17545);function i(t){var e=function(t){if("object"!=(0,r.A)(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,r.A)(e)?e:e+""}},12559:(t,e,n)=>{function r(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}n.d(e,{A:()=>r})},17545:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:()=>r})},18488:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(36758),i=n.n(r),o=n(40935),a=n.n(o)()(i());a.push([t.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const c=a.toString()},26902:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(17545);function i(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?(0,r.A)(t):"null"));return t}},36758:t=>{t.exports=function(t){return t[1]}},40935:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(a[s]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);r&&a[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},55723:(t,e,n)=>{n.r(e),n.d(e,{PreGeneratedConfigPreview:()=>L,PreGeneratedConfigPreviewComponent:()=>W});var r,i=n(70918),o=n(86121),a=n(70829),c=n(62740),s=n(18769),u=n.n(s),l=n(90870),d=n(30981),f=n(30348),p=n(55310),v=(n(34419),n(18488)),h=n(92120),m=n(19057);let b,g,y,w,A,k,E,S,_;const{defineElement:x,property:j}=(0,l.createDecorators)();let L;var T=new WeakMap,P=new WeakMap,z=new WeakMap,C=new WeakMap;class O extends d.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,T,g(this)),(0,i.A)(this,P,(y(this),w(this))),(0,i.A)(this,z,(A(this),k(this))),(0,i.A)(this,C,(E(this),S(this))),_(this)}get previewUrl(){return(0,a.A)(T,this)}set previewUrl(t){(0,o.A)(T,this,t)}get container(){return(0,a.A)(P,this)}set container(t){(0,o.A)(P,this,t)}get attrList(){return(0,a.A)(z,this)}set attrList(t){(0,o.A)(z,this,t)}get mockList(){return(0,a.A)(C,this)}set mockList(t){(0,o.A)(C,this,t)}render(){return u().createElement(W,{root:this,previewUrl:this.previewUrl,container:this.container,attrList:this.attrList,mockList:this.mockList})}}function W(t){let{root:e,previewUrl:n,container:r,attrList:i,mockList:o}=t;const a=(0,s.useRef)(),[c,l]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>{const t=()=>{var e;const n=null===(e=a.current)||void 0===e?void 0:e.contentWindow;null!=n&&n._preview_only_render?l(!0):setTimeout(t,100)};t()}),[]);return(0,s.useEffect)((()=>{var t;const n=null===(t=a.current)||void 0===t?void 0:t.contentWindow;if(!c||!n)return;const r=new ResizeObserver((()=>{e.style.height=`${n.document.body.scrollHeight}px`}));return r.observe(n.document.body),()=>r.disconnect()}),[c,e]),(0,s.useEffect)((()=>{var t,e;const n=null===(t=a.current)||void 0===t||null===(t=t.contentWindow)||void 0===t?void 0:t._preview_only_render;if(!c||!n||!i)return;let s;s="descriptions"===r?{brick:"eo-descriptions",errorBoundary:!0,properties:{column:2,list:i.map((t=>{const e={label:t.name};return t.config&&(e.useBrick=(0,m.w)(t.config,t.id)),e})),dataSource:null==o?void 0:o[0]}}:{brick:"eo-next-table",errorBoundary:!0,properties:{rowKey:null===(e=i[0])||void 0===e?void 0:e.id,columns:i.map((t=>{const e={title:t.name,dataIndex:t.id,key:t.id};return t.config&&(e.useBrick=(0,m.m)(t.config,".cellData")),e})),dataSource:{list:o,page:1,pageSize:20}}},n("yaml",{yaml:(0,p.safeDump)([s],{skipInvalid:!0})},{theme:"light",uiVersion:"8.2",styleText:h.A})}),[c,i,o,r]),u().createElement("div",{className:"container"},u().createElement("iframe",{ref:a,src:null!=n?n:`${(0,f.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:d}))}r=O,({e:[g,y,w,A,k,E,S,_],c:[L,b]}=(0,c.A)(r,[x("visual-builder.pre-generated-config-preview",{styleTexts:[v.A]})],[[j(),1,"previewUrl"],[j(),1,"container"],[j({attribute:!1}),1,"attrList"],[j({attribute:!1}),1,"mockList"]],0,void 0,d.ReactNextElement)),b()},62740:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(17545),i=n(26902);function o(t,e,n){"symbol"==(0,r.A)(e)&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}var a=n(11369);function c(t,e,n,c,s,u){var l,d,f,p,v,h,m,b=Symbol.metadata||Symbol.for("Symbol.metadata"),g=Object.defineProperty,y=Object.create,w=[y(null),y(null)],A=e.length;function k(e,n,r){return function(i,o){n&&(o=i,i=t);for(var a=0;a<e.length;a++)o=e[a].apply(i,r?[o]:[]);return r?o:i}}function E(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw new TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function S(t,e,n,i,a,c,s,u,f,p,v){function h(t){if(!v(t))throw new TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),b=e[3],y=!s,A=1===a,S=3===a,_=4===a,x=2===a;function j(e,n,r){return function(i,o){return n&&(o=i,i=t),r&&r(i),L[e].call(i,o)}}if(!y){var L={},T=[],P=S?"get":_||A?"set":"value";if(f?(p||A?L={get:o((function(){return b(this)}),i,"get"),set:function(t){e[4](this,t)}}:L[P]=b,p||o(L[P],i,x?"":P)):p||(L=Object.getOwnPropertyDescriptor(t,i)),!p&&!f){if((d=w[+u][i])&&7!=(d^a))throw Error("Decorating two elements with the same name ("+L[P].name+") is not supported yet");w[+u][i]=a<3?1:a}}for(var z=t,C=m.length-1;C>=0;C-=n?2:1){var O=E(m[C],"A decorator","be",!0),W=n?m[C-1]:void 0,U={},B={kind:["field","accessor","method","getter","setter","class"][a],name:i,metadata:l,addInitializer:function(t,e){if(t.v)throw Error("attempted to call addInitializer after decoration was finished");E(e,"An initializer","be",!0),c.push(e)}.bind(null,U)};if(y)d=O.call(W,z,B),U.v=1,E(d,"class decorators","return")&&(z=d);else if(B.static=u,B.private=f,d=B.access={has:f?v.bind():function(t){return i in t}},_||(d.get=f?x?function(t){return h(t),L.value}:j("get",0,h):function(t){return t[i]}),x||S||(d.set=f?j("set",0,h):function(t,e){t[i]=e}),z=O.call(W,A?{get:L.get,set:L.set}:L[P],B),U.v=1,A){if("object"==(0,r.A)(z)&&z)(d=E(z.get,"accessor.get"))&&(L.get=d),(d=E(z.set,"accessor.set"))&&(L.set=d),(d=E(z.init,"accessor.init"))&&T.unshift(d);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else E(z,(p?"field":"method")+" decorators","return")&&(p?T.unshift(z):L[P]=z)}return a<2&&s.push(k(T,u,1),k(c,u,0)),p||y||(f?A?s.splice(-1,0,j("get",u),j("set",u)):s.push(x?L[P]:E.call.bind(L[P])):g(t,i,L)),z}function _(t){return g(t,b,{configurable:!0,enumerable:!0,value:l})}return void 0!==u&&(l=u[b]),l=y(null==l?null:l),v=[],h=function(t){t&&v.push(k(t))},m=function(e,r){for(var o=0;o<n.length;o++){var c=n[o],u=c[1],l=7&u;if((8&u)==e&&!l==r){var d=c[2],h=!!c[3],m=16&u;S(e?t:t.prototype,c,m,h?"#"+d:(0,a.A)(d),l,l<2?[]:e?p=p||[]:f=f||[],v,!!e,h,r,e&&h?function(e){return(0,i.A)(e)===t}:s)}}},m(8,0),m(0,0),m(8,1),m(0,1),h(f),h(p),d=v,A||_(t),{e:d,get c(){var n=[];return A&&[_(t=S(t,[e],c,t.name,5,n)),k(n,1)]}}}},70829:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(12559);function i(t,e){return t.get((0,r.A)(t,e))}},70918:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(72016);function i(t,e,n){(0,r.A)(t,e),e.set(t,n)}},72016:(t,e,n)=>{function r(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(e,{A:()=>r})},86121:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(12559);function i(t,e,n){return t.set((0,r.A)(t,e),n),n}},92120:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(36758),i=n.n(r),o=n(40935),a=n.n(o)()(i());a.push([t.id,"#preview-root{padding:0}",""]);const c=a.toString()}}]);
2
+ //# sourceMappingURL=pre-generated-config-preview.0b6e46f0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/pre-generated-config-preview.4a615c87.js","mappings":"sLAEe,SAASA,EAAcC,GACpC,IAAIC,ECFS,SAAqBD,GAClC,GAAI,WAAY,OAAQA,KAAOA,EAAG,OAAOA,EACzC,IAAIE,EAAIF,EAAEG,OAAOC,aACjB,QAAI,IAAWF,EAAG,CAChB,IAAID,EAAIC,EAAEG,KAAKL,EAAGM,UAClB,GAAI,WAAY,OAAQL,GAAI,OAAOA,EACnC,MAAM,IAAIM,UAAU,+CACtB,CACA,OAAyBC,OAAiBR,EAC5C,CDPUI,CAAYJ,GACpB,MAAO,WAAY,OAAQC,GAAKA,EAAIA,EAAI,EAC1C,C,kBELe,SAASQ,EAAkBP,EAAGF,EAAGU,GAC9C,GAAI,mBAAqBR,EAAIA,IAAMF,EAAIE,EAAES,IAAIX,GAAI,OAAOY,UAAUC,OAAS,EAAIb,EAAIU,EACnF,MAAM,IAAIH,UAAU,gDACtB,C,kCCHe,SAASO,EAAQC,GAG9B,OAAOD,EAAU,mBAAqBX,QAAU,iBAAmBA,OAAOa,SAAW,SAAUD,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAK,mBAAqBZ,QAAUY,EAAEE,cAAgBd,QAAUY,IAAMZ,OAAOe,UAAY,gBAAkBH,CACpH,EAAGD,EAAQC,EACb,C,sFCLII,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,yQAC0I,KAEnL,QAAeH,EAAwBI,U,kDCPxB,SAASC,EAAYtB,GAClC,GAAIuB,OAAOvB,KAAOA,EAAG,MAAMK,UAAU,qDAAuD,OAASL,GAAI,OAAQA,GAAK,SACtH,OAAOA,CACT,C,YCFAmB,EAAOK,QAAU,SAAUzB,GACzB,OAAOA,EAAE,EACX,C,Y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CACnEA,EAAGyI,EACH,KAAIA,GACF,IAAIjI,EAAI,GACR,OAAOyD,GAAK,CAACmG,EAAEpK,EAAImK,EAASnK,EAAG,CAACF,GAAIM,EAAGJ,EAAE6G,KAAM,EAAGrG,IAAKwJ,EAAExJ,EAAG,GAC9D,EAEJ,C,kDCzHe,SAASuL,EAAuBzC,EAAGF,GAChD,OAAOE,EAAEsB,KAAI,OAAiBtB,EAAGF,GACnC,C,kDCFe,SAAS9F,EAA2B0I,EAAKC,EAAY/C,IAClE,OAA0B8C,EAAKC,GAC/BA,EAAWpB,IAAImB,EAAK9C,EACtB,C,kBCJe,SAASgD,EAA2BF,EAAKG,GACtD,GAAIA,EAAkB1L,IAAIuL,GACxB,MAAM,IAAI3L,UAAU,iEAExB,C,kECHe,SAAS+L,EAAuB9C,EAAGF,EAAGhJ,GACnD,OAAOkJ,EAAEuB,KAAI,OAAiBvB,EAAGF,GAAIhJ,GAAIA,CAC3C,C,sECAIa,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,2BAA4B,KAErE,QAAeH,EAAwBI,U","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./src/pre-generated-config/styles.shadow.css","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkInRHS.js","webpack:///../../node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack:///../../node_modules/css-loader/dist/runtime/api.js","webpack:///./src/pre-generated-config-preview/index.tsx","webpack:///../../node_modules/@babel/runtime/helpers/esm/setFunctionName.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/applyDecs2311.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///./src/pre-generated-config/preview.shadow.css"],"sourcesContent":["import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import _typeof from \"./typeof.js\";\nexport default function _checkInRHS(e) {\n if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? _typeof(e) : \"null\"));\n return e;\n}","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport { getBasePath } from \"@next-core/runtime\";\nimport type { PreviewWindow } from \"@next-core/preview/types\";\nimport type { BrickConf } from \"@next-core/types\";\nimport { safeDump } from \"js-yaml\";\nimport \"@next-core/theme\";\nimport type { VisualConfig } from \"../raw-data-preview/raw-data-interfaces\";\nimport styleText from \"../pre-generated-config/styles.shadow.css\";\nimport previewStyleText from \"../pre-generated-config/preview.shadow.css\";\nimport {\n convertToStoryboard,\n lowLevelConvertToStoryboard,\n} from \"../raw-data-preview/convert\";\n\nconst { defineElement, property } = createDecorators();\n\nexport interface ObjectAttr {\n id: string;\n name: string;\n enum?: unknown[];\n config?: VisualConfig;\n}\n\nexport interface PreGeneratedConfigPreviewProps {\n previewUrl?: string;\n container?: ContainerType;\n attrList?: ObjectAttr[];\n mockList?: Record<string, unknown>[];\n}\n\nexport type ContainerType = \"table\" | \"descriptions\";\n\n/**\n * 构件 `visual-builder.pre-generated-config-preview`\n */\nexport\n@defineElement(\"visual-builder.pre-generated-config-preview\", {\n styleTexts: [styleText],\n})\nclass PreGeneratedConfigPreview\n extends ReactNextElement\n implements PreGeneratedConfigPreviewProps\n{\n @property()\n accessor previewUrl: string | undefined;\n\n @property()\n accessor container: ContainerType | undefined;\n\n @property({ attribute: false })\n accessor attrList: ObjectAttr[] | undefined;\n\n @property({ attribute: false })\n accessor mockList: Record<string, unknown>[] | undefined;\n\n render() {\n return (\n <PreGeneratedConfigPreviewComponent\n root={this}\n previewUrl={this.previewUrl}\n container={this.container}\n attrList={this.attrList}\n mockList={this.mockList}\n />\n );\n }\n}\n\nexport interface PreGeneratedConfigPreviewComponentProps\n extends PreGeneratedConfigPreviewProps {\n root: HTMLElement;\n}\n\nexport function PreGeneratedConfigPreviewComponent({\n root,\n previewUrl,\n container,\n attrList,\n mockList,\n}: PreGeneratedConfigPreviewComponentProps) {\n const iframeRef = useRef<HTMLIFrameElement>();\n const [ready, setReady] = useState(false);\n\n const handleIframeLoad = useCallback(() => {\n const check = () => {\n const iframeWin = iframeRef.current?.contentWindow as PreviewWindow;\n if (iframeWin?._preview_only_render) {\n setReady(true);\n } else {\n setTimeout(check, 100);\n }\n };\n check();\n }, []);\n\n useEffect(() => {\n const iframeWin = iframeRef.current?.contentWindow;\n if (!ready || !iframeWin) {\n return;\n }\n const observer = new ResizeObserver(() => {\n root.style.height = `${iframeWin.document.body.scrollHeight}px`;\n });\n observer.observe(iframeWin.document.body);\n return () => observer.disconnect();\n }, [ready, root]);\n\n useEffect(() => {\n const render = (iframeRef.current?.contentWindow as PreviewWindow)\n ?._preview_only_render;\n if (!ready || !render || !attrList) {\n return;\n }\n\n let brickConf: BrickConf;\n\n switch (container) {\n case \"descriptions\":\n brickConf = {\n brick: \"eo-descriptions\",\n errorBoundary: true,\n properties: {\n column: 2,\n list: attrList.map((attr) => {\n const item: Record<string, unknown> = {\n label: attr.name,\n };\n if (attr.config) {\n item.useBrick = convertToStoryboard(attr.config, attr.id);\n }\n return item;\n }),\n dataSource: mockList?.[0],\n },\n };\n break;\n default:\n brickConf = {\n brick: \"eo-next-table\",\n errorBoundary: true,\n properties: {\n rowKey: attrList[0]?.id,\n columns: attrList.map((attr) => {\n const col: Record<string, unknown> = {\n title: attr.name,\n dataIndex: attr.id,\n key: attr.id,\n };\n if (attr.config) {\n col.useBrick = lowLevelConvertToStoryboard(\n attr.config,\n \".cellData\"\n );\n }\n return col;\n }),\n dataSource: {\n list: mockList,\n page: 1,\n pageSize: 20,\n },\n },\n };\n }\n\n render(\n \"yaml\",\n {\n yaml: safeDump([brickConf], {\n skipInvalid: true,\n }),\n },\n {\n theme: \"light\",\n uiVersion: \"8.2\",\n styleText: previewStyleText,\n }\n );\n }, [ready, attrList, mockList, container]);\n\n return (\n <div className=\"container\">\n <iframe\n ref={iframeRef}\n src={previewUrl ?? `${getBasePath()}_brick-preview-v3_/preview/`}\n loading=\"lazy\"\n onLoad={handleIframeLoad}\n />\n </div>\n );\n}\n","import _typeof from \"./typeof.js\";\nexport default function setFunctionName(e, t, n) {\n \"symbol\" == _typeof(t) && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\");\n try {\n Object.defineProperty(e, \"name\", {\n configurable: !0,\n value: n ? n + \" \" + t : t\n });\n } catch (e) {}\n return e;\n}","import _typeof from \"./typeof.js\";\nimport checkInRHS from \"./checkInRHS.js\";\nimport setFunctionName from \"./setFunctionName.js\";\nimport toPropertyKey from \"./toPropertyKey.js\";\nexport default function applyDecs2311(e, t, n, r, o, i) {\n var a,\n c,\n u,\n s,\n f,\n l,\n p,\n d = Symbol.metadata || Symbol[\"for\"](\"Symbol.metadata\"),\n m = Object.defineProperty,\n h = Object.create,\n y = [h(null), h(null)],\n v = t.length;\n function g(t, n, r) {\n return function (o, i) {\n n && (i = o, o = e);\n for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []);\n return r ? i : o;\n };\n }\n function b(e, t, n, r) {\n if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\"));\n return e;\n }\n function applyDec(e, t, n, r, o, i, u, s, f, l, p) {\n function d(e) {\n if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\");\n }\n var h = [].concat(t[0]),\n v = t[3],\n w = !u,\n D = 1 === o,\n S = 3 === o,\n j = 4 === o,\n E = 2 === o;\n function I(t, n, r) {\n return function (o, i) {\n return n && (i = o, o = e), r && r(o), P[t].call(o, i);\n };\n }\n if (!w) {\n var P = {},\n k = [],\n F = S ? \"get\" : j || D ? \"set\" : \"value\";\n if (f ? (l || D ? P = {\n get: setFunctionName(function () {\n return v(this);\n }, r, \"get\"),\n set: function set(e) {\n t[4](this, e);\n }\n } : P[F] = v, l || setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) {\n if ((c = y[+s][r]) && 7 != (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\");\n y[+s][r] = o < 3 ? 1 : o;\n }\n }\n for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) {\n var z = b(h[O], \"A decorator\", \"be\", !0),\n A = n ? h[O - 1] : void 0,\n H = {},\n K = {\n kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o],\n name: r,\n metadata: a,\n addInitializer: function (e, t) {\n if (e.v) throw Error(\"attempted to call addInitializer after decoration was finished\");\n b(t, \"An initializer\", \"be\", !0), i.push(t);\n }.bind(null, H)\n };\n if (w) c = z.call(A, N, K), H.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (K[\"static\"] = s, K[\"private\"] = f, c = K.access = {\n has: f ? p.bind() : function (e) {\n return r in e;\n }\n }, j || (c.get = f ? E ? function (e) {\n return d(e), P.value;\n } : I(\"get\", 0, d) : function (e) {\n return e[r];\n }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) {\n e[r] = t;\n }), N = z.call(A, D ? {\n get: P.get,\n set: P.set\n } : P[F], K), H.v = 1, D) {\n if (\"object\" == _typeof(N) && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\");\n } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N);\n }\n return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N;\n }\n function w(e) {\n return m(e, d, {\n configurable: !0,\n enumerable: !0,\n value: a\n });\n }\n return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) {\n e && f.push(g(e));\n }, p = function p(t, r) {\n for (var i = 0; i < n.length; i++) {\n var a = n[i],\n c = a[1],\n l = 7 & c;\n if ((8 & c) == t && !l == r) {\n var p = a[2],\n d = !!a[3],\n m = 16 & c;\n applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) {\n return checkInRHS(t) === e;\n } : o);\n }\n }\n }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), {\n e: c,\n get c() {\n var n = [];\n return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)];\n }\n };\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#preview-root{padding:0}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["toPropertyKey","t","i","e","Symbol","toPrimitive","call","r","TypeError","String","_assertClassBrand","n","has","arguments","length","_typeof","o","iterator","constructor","prototype","___CSS_LOADER_EXPORT___","push","module","id","toString","_checkInRHS","Object","exports","cssWithMappingToString","list","this","map","item","content","needLayer","concat","join","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","defineElement","property","createDecorators","_PreGeneratedConfigPr","_A","WeakMap","_B","_C","_D","PreGeneratedConfigPreview","ReactNextElement","_classPrivateFieldInitSpec","_init_previewUrl","_init_extra_previewUrl","_init_container","_init_extra_container","_init_attrList","_init_extra_attrList","_init_mockList","_init_extra_mockList","previewUrl","_classPrivateFieldGet","v","_classPrivateFieldSet","container","attrList","mockList","render","React","PreGeneratedConfigPreviewComponent","root","_ref","iframeRef","useRef","ready","setReady","useState","handleIframeLoad","useCallback","check","_iframeRef$current","iframeWin","current","contentWindow","_preview_only_render","setTimeout","useEffect","_iframeRef$current2","observer","ResizeObserver","style","height","document","body","scrollHeight","observe","disconnect","_iframeRef$current3","_attrList$","brickConf","brick","errorBoundary","properties","column","attr","label","name","config","useBrick","convertToStoryboard","dataSource","rowKey","columns","col","title","dataIndex","key","lowLevelConvertToStoryboard","page","pageSize","yaml","safeDump","skipInvalid","theme","uiVersion","styleText","previewStyleText","className","ref","src","getBasePath","loading","onLoad","_PreGeneratedConfigPreview","c","_initClass","_applyDecs","styleTexts","attribute","setFunctionName","description","defineProperty","configurable","value","applyDecs2311","a","u","s","f","l","p","d","metadata","m","h","create","y","g","apply","b","applyDec","w","D","S","j","E","I","P","F","get","set","getOwnPropertyDescriptor","Error","N","O","z","A","H","K","kind","addInitializer","bind","access","init","unshift","splice","enumerable","checkInRHS","_classPrivateFieldGet2","obj","privateMap","_checkPrivateRedeclaration","privateCollection","_classPrivateFieldSet2"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/pre-generated-config-preview.0b6e46f0.js","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AG,GAC9D,EAEJ,C,kDCzHe,SAASuL,EAAuBzC,EAAGF,GAChD,OAAOE,EAAEsB,KAAI,OAAiBtB,EAAGF,GACnC,C,kDCFe,SAAS9F,EAA2B0I,EAAKC,EAAY/C,IAClE,OAA0B8C,EAAKC,GAC/BA,EAAWpB,IAAImB,EAAK9C,EACtB,C,kBCJe,SAASgD,EAA2BF,EAAKG,GACtD,GAAIA,EAAkB1L,IAAIuL,GACxB,MAAM,IAAI3L,UAAU,iEAExB,C,kECHe,SAAS+L,EAAuB9C,EAAGF,EAAGhJ,GACnD,OAAOkJ,EAAEuB,KAAI,OAAiBvB,EAAGF,GAAIhJ,GAAIA,CAC3C,C,sECAIa,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,2BAA4B,KAErE,QAAeH,EAAwBI,U","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./src/pre-generated-config/styles.shadow.css","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkInRHS.js","webpack:///../../node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack:///../../node_modules/css-loader/dist/runtime/api.js","webpack:///./src/pre-generated-config-preview/index.tsx","webpack:///../../node_modules/@babel/runtime/helpers/esm/setFunctionName.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/applyDecs2311.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///./src/pre-generated-config/preview.shadow.css"],"sourcesContent":["import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import _typeof from \"./typeof.js\";\nexport default function _checkInRHS(e) {\n if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? _typeof(e) : \"null\"));\n return e;\n}","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport { getBasePath } from \"@next-core/runtime\";\nimport type { PreviewWindow } from \"@next-core/preview/types\";\nimport type { BrickConf } from \"@next-core/types\";\nimport { safeDump } from \"js-yaml\";\nimport \"@next-core/theme\";\nimport type { VisualConfig } from \"../raw-data-preview/raw-data-interfaces\";\nimport styleText from \"../pre-generated-config/styles.shadow.css\";\nimport previewStyleText from \"../pre-generated-config/preview.shadow.css\";\nimport {\n convertToStoryboard,\n lowLevelConvertToStoryboard,\n} from \"../raw-data-preview/convert\";\n\nconst { defineElement, property } = createDecorators();\n\nexport interface ObjectAttr {\n id: string;\n name: string;\n enum?: unknown[];\n config?: VisualConfig;\n}\n\nexport interface PreGeneratedConfigPreviewProps {\n previewUrl?: string;\n container?: ContainerType;\n attrList?: ObjectAttr[];\n mockList?: Record<string, unknown>[];\n}\n\nexport type ContainerType = \"table\" | \"descriptions\";\n\n/**\n * 构件 `visual-builder.pre-generated-config-preview`\n */\nexport\n@defineElement(\"visual-builder.pre-generated-config-preview\", {\n styleTexts: [styleText],\n})\nclass PreGeneratedConfigPreview\n extends ReactNextElement\n implements PreGeneratedConfigPreviewProps\n{\n @property()\n accessor previewUrl: string | undefined;\n\n @property()\n accessor container: ContainerType | undefined;\n\n @property({ attribute: false })\n accessor attrList: ObjectAttr[] | undefined;\n\n @property({ attribute: false })\n accessor mockList: Record<string, unknown>[] | undefined;\n\n render() {\n return (\n <PreGeneratedConfigPreviewComponent\n root={this}\n previewUrl={this.previewUrl}\n container={this.container}\n attrList={this.attrList}\n mockList={this.mockList}\n />\n );\n }\n}\n\nexport interface PreGeneratedConfigPreviewComponentProps\n extends PreGeneratedConfigPreviewProps {\n root: HTMLElement;\n}\n\nexport function PreGeneratedConfigPreviewComponent({\n root,\n previewUrl,\n container,\n attrList,\n mockList,\n}: PreGeneratedConfigPreviewComponentProps) {\n const iframeRef = useRef<HTMLIFrameElement>();\n const [ready, setReady] = useState(false);\n\n const handleIframeLoad = useCallback(() => {\n const check = () => {\n const iframeWin = iframeRef.current?.contentWindow as PreviewWindow;\n if (iframeWin?._preview_only_render) {\n setReady(true);\n } else {\n setTimeout(check, 100);\n }\n };\n check();\n }, []);\n\n useEffect(() => {\n const iframeWin = iframeRef.current?.contentWindow;\n if (!ready || !iframeWin) {\n return;\n }\n const observer = new ResizeObserver(() => {\n root.style.height = `${iframeWin.document.body.scrollHeight}px`;\n });\n observer.observe(iframeWin.document.body);\n return () => observer.disconnect();\n }, [ready, root]);\n\n useEffect(() => {\n const render = (iframeRef.current?.contentWindow as PreviewWindow)\n ?._preview_only_render;\n if (!ready || !render || !attrList) {\n return;\n }\n\n let brickConf: BrickConf;\n\n switch (container) {\n case \"descriptions\":\n brickConf = {\n brick: \"eo-descriptions\",\n errorBoundary: true,\n properties: {\n column: 2,\n list: attrList.map((attr) => {\n const item: Record<string, unknown> = {\n label: attr.name,\n };\n if (attr.config) {\n item.useBrick = convertToStoryboard(attr.config, attr.id);\n }\n return item;\n }),\n dataSource: mockList?.[0],\n },\n };\n break;\n default:\n brickConf = {\n brick: \"eo-next-table\",\n errorBoundary: true,\n properties: {\n rowKey: attrList[0]?.id,\n columns: attrList.map((attr) => {\n const col: Record<string, unknown> = {\n title: attr.name,\n dataIndex: attr.id,\n key: attr.id,\n };\n if (attr.config) {\n col.useBrick = lowLevelConvertToStoryboard(\n attr.config,\n \".cellData\"\n );\n }\n return col;\n }),\n dataSource: {\n list: mockList,\n page: 1,\n pageSize: 20,\n },\n },\n };\n }\n\n render(\n \"yaml\",\n {\n yaml: safeDump([brickConf], {\n skipInvalid: true,\n }),\n },\n {\n theme: \"light\",\n uiVersion: \"8.2\",\n styleText: previewStyleText,\n }\n );\n }, [ready, attrList, mockList, container]);\n\n return (\n <div className=\"container\">\n <iframe\n ref={iframeRef}\n src={previewUrl ?? `${getBasePath()}_brick-preview-v3_/preview/`}\n loading=\"lazy\"\n onLoad={handleIframeLoad}\n />\n </div>\n );\n}\n","import _typeof from \"./typeof.js\";\nexport default function setFunctionName(e, t, n) {\n \"symbol\" == _typeof(t) && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\");\n try {\n Object.defineProperty(e, \"name\", {\n configurable: !0,\n value: n ? n + \" \" + t : t\n });\n } catch (e) {}\n return e;\n}","import _typeof from \"./typeof.js\";\nimport checkInRHS from \"./checkInRHS.js\";\nimport setFunctionName from \"./setFunctionName.js\";\nimport toPropertyKey from \"./toPropertyKey.js\";\nexport default function applyDecs2311(e, t, n, r, o, i) {\n var a,\n c,\n u,\n s,\n f,\n l,\n p,\n d = Symbol.metadata || Symbol[\"for\"](\"Symbol.metadata\"),\n m = Object.defineProperty,\n h = Object.create,\n y = [h(null), h(null)],\n v = t.length;\n function g(t, n, r) {\n return function (o, i) {\n n && (i = o, o = e);\n for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []);\n return r ? i : o;\n };\n }\n function b(e, t, n, r) {\n if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\"));\n return e;\n }\n function applyDec(e, t, n, r, o, i, u, s, f, l, p) {\n function d(e) {\n if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\");\n }\n var h = [].concat(t[0]),\n v = t[3],\n w = !u,\n D = 1 === o,\n S = 3 === o,\n j = 4 === o,\n E = 2 === o;\n function I(t, n, r) {\n return function (o, i) {\n return n && (i = o, o = e), r && r(o), P[t].call(o, i);\n };\n }\n if (!w) {\n var P = {},\n k = [],\n F = S ? \"get\" : j || D ? \"set\" : \"value\";\n if (f ? (l || D ? P = {\n get: setFunctionName(function () {\n return v(this);\n }, r, \"get\"),\n set: function set(e) {\n t[4](this, e);\n }\n } : P[F] = v, l || setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) {\n if ((c = y[+s][r]) && 7 != (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\");\n y[+s][r] = o < 3 ? 1 : o;\n }\n }\n for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) {\n var z = b(h[O], \"A decorator\", \"be\", !0),\n A = n ? h[O - 1] : void 0,\n H = {},\n K = {\n kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o],\n name: r,\n metadata: a,\n addInitializer: function (e, t) {\n if (e.v) throw Error(\"attempted to call addInitializer after decoration was finished\");\n b(t, \"An initializer\", \"be\", !0), i.push(t);\n }.bind(null, H)\n };\n if (w) c = z.call(A, N, K), H.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (K[\"static\"] = s, K[\"private\"] = f, c = K.access = {\n has: f ? p.bind() : function (e) {\n return r in e;\n }\n }, j || (c.get = f ? E ? function (e) {\n return d(e), P.value;\n } : I(\"get\", 0, d) : function (e) {\n return e[r];\n }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) {\n e[r] = t;\n }), N = z.call(A, D ? {\n get: P.get,\n set: P.set\n } : P[F], K), H.v = 1, D) {\n if (\"object\" == _typeof(N) && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\");\n } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N);\n }\n return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N;\n }\n function w(e) {\n return m(e, d, {\n configurable: !0,\n enumerable: !0,\n value: a\n });\n }\n return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) {\n e && f.push(g(e));\n }, p = function p(t, r) {\n for (var i = 0; i < n.length; i++) {\n var a = n[i],\n c = a[1],\n l = 7 & c;\n if ((8 & c) == t && !l == r) {\n var p = a[2],\n d = !!a[3],\n m = 16 & c;\n applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) {\n return checkInRHS(t) === e;\n } : o);\n }\n }\n }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), {\n e: c,\n get c() {\n var n = [];\n return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)];\n }\n };\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#preview-root{padding:0}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["toPropertyKey","t","i","e","Symbol","toPrimitive","call","r","TypeError","String","_assertClassBrand","n","has","arguments","length","_typeof","o","iterator","constructor","prototype","___CSS_LOADER_EXPORT___","push","module","id","toString","_checkInRHS","Object","exports","cssWithMappingToString","list","this","map","item","content","needLayer","concat","join","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","defineElement","property","createDecorators","_PreGeneratedConfigPr","_A","WeakMap","_B","_C","_D","PreGeneratedConfigPreview","ReactNextElement","_classPrivateFieldInitSpec","_init_previewUrl","_init_extra_previewUrl","_init_container","_init_extra_container","_init_attrList","_init_extra_attrList","_init_mockList","_init_extra_mockList","previewUrl","_classPrivateFieldGet","v","_classPrivateFieldSet","container","attrList","mockList","render","React","PreGeneratedConfigPreviewComponent","root","_ref","iframeRef","useRef","ready","setReady","useState","handleIframeLoad","useCallback","check","_iframeRef$current","iframeWin","current","contentWindow","_preview_only_render","setTimeout","useEffect","_iframeRef$current2","observer","ResizeObserver","style","height","document","body","scrollHeight","observe","disconnect","_iframeRef$current3","_attrList$","brickConf","brick","errorBoundary","properties","column","attr","label","name","config","useBrick","convertToStoryboard","dataSource","rowKey","columns","col","title","dataIndex","key","lowLevelConvertToStoryboard","page","pageSize","yaml","safeDump","skipInvalid","theme","uiVersion","styleText","previewStyleText","className","ref","src","getBasePath","loading","onLoad","_PreGeneratedConfigPreview","c","_initClass","_applyDecs","styleTexts","attribute","setFunctionName","description","defineProperty","configurable","value","applyDecs2311","a","u","s","f","l","p","d","metadata","m","h","create","y","g","apply","b","applyDec","w","D","S","j","E","I","P","F","get","set","getOwnPropertyDescriptor","Error","N","O","z","A","H","K","kind","addInitializer","bind","access","init","unshift","splice","enumerable","checkInRHS","_classPrivateFieldGet2","obj","privateMap","_checkPrivateRedeclaration","privateCollection","_classPrivateFieldSet2"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[2369],{5536:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(12559);function r(e,t,i){return i((0,n.A)(e,t))}},7405:(e,t,i)=>{function n(e,t,i,n,r,a){let o=null;const s="bibytes"===n.unit?"bytes":n.unit;if("small"===e.size)switch(e.chartType){case"line":o={brick:"eo-mini-line-chart",properties:{data:t,xField:"time",yField:i,width:"auto",showArea:!0}};break;case"gauge":{var l;const r="percent(1)"===n.unit,a="percent(100)"===n.unit||"%"===n.unit;o={brick:"chart-v2.gauge-chart",properties:{data:t,xField:"time",yField:i,height:100,axis:{yAxis:{unit:s,precision:e.precision,min:e.min,max:null!==(l=e.max)&&void 0!==l?l:r?1:a?100:void 0}},thresholdColors:r||a?[{value:20,color:"cyan"},{value:90,color:"yellow"},{value:100,color:"red"}].map((e=>{let{value:t,color:i}=e;return{value:a?t:t/100,color:`<% THEME.getCssPropertyValue(${JSON.stringify(`--palette-${i}-5`)}) %>`}})):void 0}};break}}else switch(e.chartType){case"line":case"area":o={brick:"chart-v2.time-series-chart",properties:{data:t,xField:"time",yFields:null!=r?r:[i],height:"large"===e.size?230:200,timeFormat:"HH:mm",areaOpacity:"line"===e.chartType?0:void 0,axis:{yAxis:{unit:s,precision:e.precision,min:e.min,max:e.max,shape:"smooth"}},...a?{forceAbsoluteNumbers:!0,series:{[a]:{isNegative:!0}}}:null,areaShape:"smooth",legends:"large"===e.size}}}return o}i.d(t,{r:()=>n})},11369:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(17545);function r(e){var t=function(e){if("object"!=(0,n.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=(0,n.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,n.A)(t)?t:t+""}},12559:(e,t,i)=>{function n(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}i.d(t,{A:()=>n})},17545:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}i.d(t,{A:()=>n})},18488:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),r=i.n(n),a=i(40935),o=i.n(a)()(r());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=o.toString()},26902:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(17545);function r(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?(0,n.A)(e):"null"));return e}},36758:e=>{e.exports=function(e){return e[1]}},40935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&o[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},62740:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(17545),r=i(26902);function a(e,t,i){"symbol"==(0,n.A)(t)&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:i?i+" "+t:t})}catch(e){}return e}var o=i(11369);function s(e,t,i,s,l,c){var d,u,p,g,h,v,m,f=Symbol.metadata||Symbol.for("Symbol.metadata"),y=Object.defineProperty,w=Object.create,b=[w(null),w(null)],k=t.length;function A(t,i,n){return function(r,a){i&&(a=r,r=e);for(var o=0;o<t.length;o++)a=t[o].apply(r,n?[a]:[]);return n?a:r}}function M(e,t,i,n){if("function"!=typeof e&&(n||void 0!==e))throw new TypeError(t+" must "+(i||"be")+" a function"+(n?"":" or undefined"));return e}function T(e,t,i,r,o,s,l,c,p,g,h){function v(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var m=[].concat(t[0]),f=t[3],w=!l,k=1===o,T=3===o,x=4===o,C=2===o;function E(t,i,n){return function(r,a){return i&&(a=r,r=e),n&&n(r),S[t].call(r,a)}}if(!w){var S={},I=[],W=T?"get":x||k?"set":"value";if(p?(g||k?S={get:a((function(){return f(this)}),r,"get"),set:function(e){t[4](this,e)}}:S[W]=f,g||a(S[W],r,C?"":W)):g||(S=Object.getOwnPropertyDescriptor(e,r)),!g&&!p){if((u=b[+c][r])&&7!=(u^o))throw Error("Decorating two elements with the same name ("+S[W].name+") is not supported yet");b[+c][r]=o<3?1:o}}for(var $=e,D=m.length-1;D>=0;D-=i?2:1){var _=M(m[D],"A decorator","be",!0),N=i?m[D-1]:void 0,O={},X={kind:["field","accessor","method","getter","setter","class"][o],name:r,metadata:d,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");M(t,"An initializer","be",!0),s.push(t)}.bind(null,O)};if(w)u=_.call(N,$,X),O.v=1,M(u,"class decorators","return")&&($=u);else if(X.static=c,X.private=p,u=X.access={has:p?h.bind():function(e){return r in e}},x||(u.get=p?C?function(e){return v(e),S.value}:E("get",0,v):function(e){return e[r]}),C||T||(u.set=p?E("set",0,v):function(e,t){e[r]=t}),$=_.call(N,k?{get:S.get,set:S.set}:S[W],X),O.v=1,k){if("object"==(0,n.A)($)&&$)(u=M($.get,"accessor.get"))&&(S.get=u),(u=M($.set,"accessor.set"))&&(S.set=u),(u=M($.init,"accessor.init"))&&I.unshift(u);else if(void 0!==$)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else M($,(g?"field":"method")+" decorators","return")&&(g?I.unshift($):S[W]=$)}return o<2&&l.push(A(I,c,1),A(s,c,0)),g||w||(p?k?l.splice(-1,0,E("get",c),E("set",c)):l.push(C?S[W]:M.call.bind(S[W])):y(e,r,S)),$}function x(e){return y(e,f,{configurable:!0,enumerable:!0,value:d})}return void 0!==c&&(d=c[f]),d=w(null==d?null:d),h=[],v=function(e){e&&h.push(A(e))},m=function(t,n){for(var a=0;a<i.length;a++){var s=i[a],c=s[1],d=7&c;if((8&c)==t&&!d==n){var u=s[2],v=!!s[3],m=16&c;T(t?e:e.prototype,s,m,v?"#"+u:(0,o.A)(u),d,d<2?[]:t?g=g||[]:p=p||[],h,!!t,v,n,t&&v?function(t){return(0,r.A)(t)===e}:l)}}},m(8,0),m(0,0),m(8,1),m(0,1),v(p),v(g),u=h,k||x(e),{e:u,get c(){var i=[];return k&&[x(e=T(e,[t],s,e.name,5,i)),A(i,1)]}}}},67576:(e,t,i)=>{i.r(t),i.d(t,{PreGeneratedConfig:()=>R,PreGeneratedConfigComponent:()=>ee});var n,r=i(74635),a=i(70918),o=i(26902),s=i(5536),l=i(86121),c=i(70829),d=i(62740),u=i(18769),p=i.n(u),g=i(90870),h=i(30981),v=i(51921),m=i(55310),f=i(41030),y=(i(34419),i(99733)),w=i(85882),b=i(19057),k=i(7405),A=i(78059),M=i(90934),T=i(18488),x=i(92120);let C,E,S,I,W,$,D,_,N,O,X,L,P,z,B;(0,y.initializeI18n)(w.NS,w.I);const{defineElement:K,property:j,event:F}=(0,g.createDecorators)();let R;var U=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakMap,H=new WeakMap,q=new WeakMap,Q=new WeakSet,Y=new WeakMap;class Z extends h.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Q),(0,a.A)(this,U,E(this)),(0,a.A)(this,G,(S(this),I(this))),(0,a.A)(this,J,(W(this),$(this))),(0,a.A)(this,V,(D(this),_(this))),(0,a.A)(this,H,(N(this),O(this))),(0,a.A)(this,q,(X(this),L(this))),(0,a.A)(this,Y,(B(this),e=>{(0,s.A)(Q,this,P).emit(e)}))}get previewUrl(){return(0,c.A)(U,this)}set previewUrl(e){(0,l.A)(U,this,e)}get attrList(){return(0,c.A)(G,this)}set attrList(e){(0,l.A)(G,this,e)}get mockList(){return(0,c.A)(J,this)}set mockList(e){(0,l.A)(J,this,e)}get metricGroups(){return(0,c.A)(V,this)}set metricGroups(e){(0,l.A)(V,this,e)}get containerConfig(){return(0,c.A)(H,this)}set containerConfig(e){(0,l.A)(H,this,e)}render(){return p().createElement(ee,{previewUrl:this.previewUrl,attrList:this.attrList,mockList:this.mockList,metricGroups:this.metricGroups,containerConfig:this.containerConfig,onBrickChange:(0,c.A)(Y,this),root:this})}}function ee(e){let{previewUrl:t,attrList:i,mockList:n,metricGroups:r,containerConfig:a,root:o,onBrickChange:s}=e;const l=(0,u.useRef)(),[c,d]=(0,u.useState)(!1),[g,h]=(0,u.useState)(!1),[y,w]=(0,u.useState)(null),[T,C]=(0,u.useState)(null),E=(0,u.useRef)(null),S=(0,u.useRef)(null),I=(0,u.useMemo)((()=>(0,f.uniqueId)("event-agent-")),[]),W="chart"===(null==a?void 0:a.type)?"chart":"grouped-chart"===(null==a?void 0:a.type)?"grouped-chart":"default",$=(0,u.useMemo)((()=>"default"===W?i:null==i?void 0:i.filter((e=>e.metricKey))),[i,W]),D=(0,u.useMemo)((()=>"grouped-chart"===W?function(e,t){var i,n;const r=new Map(e.map((e=>[e.id,e]))),a=[];t.forEach(((e,t)=>{const i=[];for(const t of e.metrics){const e=r.get(t);e&&(r.delete(t),i.push(e))}i.length&&a.push({id:t,group:e.group,metrics:i,counter:e.counter})}));const o=(null!==(i=null===(n=a[a.length-1])||void 0===n?void 0:n.id)&&void 0!==i?i:-1)+1;return a.push(...[...r.values()].map(((e,t)=>({id:o+t,group:"",metrics:[e]})))),a}($,r):$),[r,$,W]);(0,u.useEffect)((()=>{C(null),E.current=null,S.current=null}),[D]),(0,u.useEffect)((()=>{if(y){const e=y.selectedIds.sort(((e,t)=>y.orderedIds.indexOf(e)-y.orderedIds.indexOf(t))).map((e=>D.find((t=>t.id===e)))).filter(Boolean),t=new Map(y.weightMapLiteral),i=new Map(y.groupMapLiteral),n=e.map((e=>{var n;const a=te(W,$,r,e,i),o="grouped-chart"===a.viewType?null===(n=a.metric.candidates)||void 0===n?void 0:n.filter((e=>"small"!==e.size)):e.candidates;return{candidate:null==o?void 0:o.find((i=>i.visualWeight===t.get(e.id))),meta:a}})),o=(0,A.M)(n,a);s(o)}}),[y,a,D,r,s,$,W]);const _=(0,u.useCallback)((()=>{const e=()=>{var t;const i=null===(t=l.current)||void 0===t?void 0:t.contentWindow;null!=i&&i._preview_only_render?d(!0):setTimeout(e,100)};e()}),[]);return(0,u.useEffect)((()=>{var e;const t=null===(e=l.current)||void 0===e?void 0:e.contentWindow;if(!c||!t)return;const i=new ResizeObserver((()=>{o.style.height=`${t.document.body.scrollHeight}px`}));return i.observe(t.document.body),()=>i.disconnect()}),[c,o]),(0,u.useEffect)((()=>{var e;if(!c)return;const t=null===(e=l.current)||void 0===e?void 0:e.contentWindow,i=e=>{let{data:t}=e;if("pre-generated-config"===(null==t?void 0:t.channel))switch(t.type){case"config-change":w(t.payload);break;case"group-change":C((e=>new Map([...null!=e?e:[],[t.payload.id,t.payload.metrics]])));break;case"order-change":S.current=t.payload.orderedIds;break;case"selection-change":E.current=t.payload.selectedIds}};return t.addEventListener("message",i),()=>{t.removeEventListener("message",i)}}),[c]),(0,u.useEffect)((()=>{var e;if(!c)return;const i=v.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!i)throw new Error("Cannot find preview agent package: bricks/visual-builder");const n=l.current.contentWindow._preview_only_inject,r={...i,filePath:t?new URL(i.filePath,new URL(t,location.origin)).toString():`${location.origin}${(0,v.getBasePath)()}${null!==(e=window.PUBLIC_ROOT)&&void 0!==e?e:""}${i.filePath}`};Promise.allSettled([n("visual-builder.pre-generated-container",r,void 0,!0)]).then((()=>{h(!0)}))}),[t,c]),(0,u.useEffect)((()=>{var e,t,i,a,o;if(!g)return;const s=null===(e=l.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const c=S.current,d=E.current,u=c?c.map((e=>D.find((t=>t.id===e)))).filter(Boolean):D,p=d?u.filter((e=>d.includes(e.id))):null!==(t=null==u?void 0:u.slice(0,5))&&void 0!==t?t:[],h=null!=d?d:p.map((e=>e.id));s("yaml",{yaml:(0,m.safeDump)([{brick:"eo-next-table",errorBoundary:!0,properties:{injectChartV2Styles:!0,pagination:!1,rowSelection:!0,rowKey:"id",rowDraggable:!0,bordered:!0,dataSource:{list:u},selectedRowKeys:h,columns:[..."chart"===W?[{title:"指标名",dataIndex:"id",key:"id",width:"20%"},{title:"指标别名",dataIndex:"name",key:"name",width:"20%"}]:"grouped-chart"===W?[{title:"指标组",dataIndex:"id",key:"id",width:"40%",useBrick:{brick:"eo-select",properties:{options:"<% CTX.metricOptions %>",mode:"multiple",value:"<% CTX.groupMap.get(DATA.cellData) ?? DATA.rowData.metrics.map((metric) => metric.id) %>",dropdownHoist:!0},events:{change:{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"group-change",payload:"<% { id: DATA.cellData, metrics: EVENT.detail.value } %>"}]}}}}]:[{title:"ID",dataIndex:"id",key:"id",width:"20%"},{title:"名称",dataIndex:"name",key:"name",width:"20%"}],{title:"预览",dataIndex:"preview",key:"preview",useBrick:{brick:"div",children:null==D?void 0:D.flatMap((e=>{var t,i,a;const o=te(W,$,r,e,T);let s,l;var c,d;"grouped-chart"===o.viewType?(l=null==n?void 0:n.map((e=>(0,f.pick)(e,["time",...o.groupedMetricKeys]))),s=null===(c=o.metric.candidates)||void 0===c?void 0:c.filter((e=>"small"!==e.size))):(s=e.candidates,l="chart"===o.viewType?null==n?void 0:n.map((e=>(0,f.pick)(e,["time",o.metric.metricKey]))):null!==(d=null==n?void 0:n[0])&&void 0!==d?d:{});const u=null===(t=s)||void 0===t?void 0:t.map((t=>{const i=`<%=\n DATA.rowData.id === ${JSON.stringify(e.id)} &&\n ${JSON.stringify(t.visualWeight)} === CTX.weightMap.get(${JSON.stringify(e.id)})\n %>`,n="default"===o.viewType?(0,b.w)(t,e.id):(0,k.r)({...t,min:o.counterMetricKey?void 0:t.min},"<% DATA %>",o.metric.metricKey,{unit:o.metric.unit},o.groupedMetricKeys,o.counterMetricKey);if(n)return{if:i,brick:"visual-builder.pre-generated-container",properties:{useBrick:n,dataSource:l}}})).filter(Boolean);return null!=u&&u.length?u:{if:`<% DATA.rowData.id === ${JSON.stringify(e.id)} %>`,brick:"span",properties:{textContent:null!==(i=null==n||null===(a=n[0])||void 0===a?void 0:a[e.id])&&void 0!==i?i:""}}}))}},{dataIndex:"operations",key:"operations",width:81,headerBrick:{useBrick:{brick:"eo-mini-actions",properties:{actions:'<%=\n [\n {\n icon: {\n lib: "antd",\n icon: "minus",\n },\n event: "minus",\n disabled: [...CTX.weightMap].every(([id, v]) => v <= CTX.availableWeights.get(id)[0]),\n },\n {\n icon: {\n lib: "antd",\n icon: "plus",\n },\n event: "plus",\n disabled: [...CTX.weightMap].every(([id, v]) => v >= CTX.availableWeights.get(id).slice(-1)[0]),\n },\n ]\n %>'},events:{minus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, null, -1) %>"]},plus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, null, 1) %>"]}}}},useBrick:{if:"<% CTX.availableWeights.get(DATA.rowData.id)?.length %>",brick:"eo-mini-actions",properties:{actions:'<%=\n [\n {\n icon: {\n lib: "antd",\n icon: "minus",\n },\n event: "minus",\n disabled: CTX.weightMap.get(DATA.rowData.id) <= CTX.availableWeights.get(DATA.rowData.id)[0],\n },\n {\n icon: {\n lib: "antd",\n icon: "plus",\n },\n event: "plus",\n disabled: CTX.weightMap.get(DATA.rowData.id) >= CTX.availableWeights.get(DATA.rowData.id).slice(-1)[0],\n },\n ]\n %>'},events:{minus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, DATA.rowData.id, -1) %>"]},plus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, DATA.rowData.id, 1) %>"]}}}}]},events:{"row.select":{action:"context.replace",args:["selectedItems","<%= EVENT.detail.rows %>"]},"row.drag":{action:"context.replace",args:["orderedIds","<%= EVENT.detail.list.map((attr) => attr.id) %>"]}}},{brick:"eo-event-agent",properties:{id:I},events:{trigger:{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"config-change",payload:"<% FN.getPreConfig(CTX.selectedItems, CTX.orderedIds, CTX.weightMap, CTX.groupMap) %>"}]}},lifeCycle:{onPageLoad:{target:`#${I}`,method:"trigger"}},portal:!0,errorBoundary:!0}],{skipInvalid:!0})},{theme:"light",uiVersion:"8.2",styleText:x.A,context:[{name:"orderedIds",value:null!==(i=null==$?void 0:$.map((e=>e.id)))&&void 0!==i?i:[],onChange:[{target:`#${I}`,method:"trigger"},..."grouped-chart"===W?[{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"order-change",payload:{orderedIds:"<% EVENT.detail %>"}}]}]:[]]},{name:"selectedItems",value:p,onChange:[{target:`#${I}`,method:"trigger"},..."grouped-chart"===W?[{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"selection-change",payload:{selectedIds:"<% EVENT.detail.map((item) => item.id) %>"}}]}]:[]]},{name:"availableWeights",value:`<% new Map(${JSON.stringify(null!==(a=null==D?void 0:D.map((e=>{var t,i;return[e.id,null!==(t=null===(i=("grouped-chart"===W?e.metrics[0]:e).candidates)||void 0===i?void 0:i.filter((e=>"grouped-chart"!==W||"small"!==e.size)).map((e=>e.visualWeight)).sort(((e,t)=>e-t)))&&void 0!==t?t:[]]})))&&void 0!==a?a:[])}) %>`},{name:"weightMap",value:`<% new Map(${JSON.stringify(null!==(o=null==D?void 0:D.map((e=>{var t,i,n,r;return[e.id,null===(n=null===(i=("grouped-chart"===W?e.metrics[0]:e).candidates)||void 0===i?void 0:i.filter((e=>"grouped-chart"!==W||"small"!==e.size)),r="grouped-chart"===W?2:0,t=null==n?void 0:n.reduce(((e,t)=>!e||Math.abs(t.visualWeight-r)<Math.abs(e.visualWeight-r)?t:e)))||void 0===t?void 0:t.visualWeight]})))&&void 0!==o?o:[])}) %>`,onChange:{target:`#${I}`,method:"trigger"}},{name:"groupMap",value:`<% new Map(${JSON.stringify([...null!=T?T:[]])}) %>`},..."grouped-chart"===W?[{name:"metricOptions",value:null==$?void 0:$.map((e=>({label:e.metricKey,value:e.id})))}]:[]],functions:[{name:"updateWeightMap",source:M},{name:"getPreConfig",source:"\n function getPreConfig(selectedItems, orderedIds, weightMap, groupMap) {\n return {\n selectedIds: selectedItems.map((item) => item.id),\n orderedIds,\n weightMapLiteral: [...weightMap],\n groupMapLiteral: [...groupMap],\n };\n }\n "}]})}),[i,a,g,r,n,I,D,W,$,T]),p().createElement("div",{className:"container"},p().createElement("iframe",{ref:l,src:null!=t?t:`${(0,v.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:_}))}function te(e,t,i,n,r){if("grouped-chart"===e){var a;const o=n,s=null==r?void 0:r.get(o.id);let l;l=s?t.filter((e=>s.includes(e.id))):o.metrics;const c=l[0],d=l.map((e=>e.metricKey));let u;if(o.counter&&2===l.length)for(const e of i)if(2===e.metrics.length&&e.counter===o.counter&&l.every((t=>e.metrics.includes(t.id)))){u=l.find((e=>e.id===o.counter));break}return{viewType:e,metric:c,groupedMetricKeys:d,counterMetricKey:null===(a=u)||void 0===a?void 0:a.metricKey}}return"chart"===e?{viewType:e,metric:n}:{viewType:e,attr:n}}n=Z,({e:[E,S,I,W,$,D,_,N,O,X,L,P,z,B],c:[R,C]}=(0,d.A)(n,[K("visual-builder.pre-generated-config",{styleTexts:[T.A]})],[[j(),1,"previewUrl"],[j({attribute:!1}),1,"attrList"],[j({attribute:!1}),1,"mockList"],[j({attribute:!1}),1,"metricGroups"],[j({attribute:!1}),1,"containerConfig"],[F({type:"brick.change"}),1,"brickChangeEvent",e=>(0,c.A)(q,e),(e,t)=>(0,l.A)(q,e,t)]],0,(e=>Y.has((0,o.A)(e))),h.ReactNextElement)),C()},70829:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(12559);function r(e,t){return e.get((0,n.A)(e,t))}},70918:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(72016);function r(e,t,i){(0,n.A)(e,t),t.set(e,i)}},72016:(e,t,i)=>{function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i.d(t,{A:()=>n})},74635:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(72016);function r(e,t){(0,n.A)(e,t),t.add(e)}},78059:(e,t,i)=>{i.d(t,{M:()=>l});var n=i(49936),r=i(8514),a=i(19057),o=i(41030),s=i(7405);function l(e,t){var i;let{type:n,dataName:l,dataType:d,settings:u}=t;if(!n||!l||0===e.length)return null;const p=`${"state"===d?"STATE":"CTX"}${(0,r._)(l)}`;if("chart"===n||"grouped-chart"===n){const t=e,i=`<%= ${p}${null!=u&&u.pagination||null!=u&&u.wrapper?".list":""} %>`,n=t.map((e=>{let{candidate:t,meta:n}=e;return(0,s.r)({...t,min:n.counterMetricKey?void 0:t.min},i,n.metric.metricKey,{unit:n.metric.unit},n.groupedMetricKeys,n.counterMetricKey)}));return 1===n.length?n[0]:{brick:"eo-grid-layout",properties:{templateColumns:"repeat(auto-fill, minmax(500px, 1fr))",gap:"var(--card-content-gap)"},slots:{"":{type:"bricks",bricks:n}}}}const g=e;if("cards"===n)return{brick:"eo-grid-layout",properties:{templateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:"var(--card-content-gap)"},slots:{"":{type:"bricks",bricks:[{brick:":forEach",dataSource:`<%= ${p}${null!=u&&u.pagination||null!=u&&u.wrapper?".list":""} %>`,slots:{"":{type:"bricks",bricks:[{brick:"eo-card-item",properties:{cardTitle:(0,o.has)(null==u?void 0:u.fields,"title")&&"string"==typeof u.fields.title?`<% ITEM${(0,r._)(u.fields.title)} %>`:void 0,description:(0,o.has)(null==u?void 0:u.fields,"description")&&"string"==typeof u.fields.description?`<% ITEM${(0,r._)(u.fields.description)} %>`:void 0}}]}}}]}}};const h=`<%= ${null!=u&&u.pagination?null!=u&&null!==(i=u.fields)&&void 0!==i&&i.pageSize?`{...${p},pageSize: ${p}${(0,r._)(u.fields.pageSize)}}`:p:null!=u&&u.wrapper?p:`{ list: ${p} }`} %>`,v=new Map;for(const e of g)if(e.candidate){const t="table"===n?(0,a.m)(e.candidate,".cellData"):(0,a.w)(e.candidate,e.meta.attr.id);t&&v.set(e.meta.attr.id,c(t))}const m=Object.fromEntries(g.map((e=>{const t=v.get(e.meta.attr.id);return t?[`[${e.meta.attr.id}]`,{type:"bricks",bricks:[t]}]:null})).filter(Boolean));switch(n){case"table":return{brick:"eo-next-table",properties:{rowKey:"instanceId",columns:g.map((e=>{let{meta:{attr:t}}=e;const i={title:t.name,dataIndex:t.id,key:t.id};return v.has(t.id)&&(i.useChildren=`[${t.id}]`),i})),dataSource:h,...null!=u&&u.pagination?null:{pagination:!1}},slots:m};case"descriptions":return{brick:"eo-descriptions",properties:{column:2,list:g.map((e=>{let{candidate:t,meta:{attr:i}}=e;const n={label:i.name};return t&&(n.useChildren=`[${i.id}]`),n})),dataSource:h},slots:m}}return null}function c(e){const{children:t,slots:i,...n}=e;return{...n,slots:d(t,i)}}function d(e,t){let i=t;if(Array.isArray(e)&&!i){i={};for(const{slot:t,...r}of e){const e=null!=t?t:"";(0,n.hasOwnProperty)(i,e)||(i[e]={type:"bricks",bricks:[]}),i[e].bricks.push(c(r))}}return i}},85882:(e,t,i)=>{i.d(t,{I:()=>a,NS:()=>r});var n=i(99733);const r="bricks/visual-builder/pre-generated-config",a={en:{},zh:{}};n.i18n.getFixedT(null,r)},86121:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(12559);function r(e,t,i){return e.set((0,n.A)(e,t),i),i}},90934:e=>{e.exports="/**\n * @param {Map<string, number>} weightMap\n * @param {Map<string, number[]>} availableWeights\n * @param {string | null} key\n * @param {1 | -1} direction\n * @returns {Map<string, number>}\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction updateWeightMap(weightMap, availableWeights, key, direction) {\n return new Map([...weightMap].map(_ref => {\n let [k, v] = _ref;\n if (key === null || k === key) {\n const weights = availableWeights.get(k);\n const index = weights.indexOf(v);\n const nextIndex = Math.max(0, Math.min(index + direction, weights.length - 1));\n return [k, weights[nextIndex]];\n }\n return [k, v];\n }));\n}"},92120:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),r=i.n(n),a=i(40935),o=i.n(a)()(r());o.push([e.id,"#preview-root{padding:0}",""]);const s=o.toString()}}]);
2
- //# sourceMappingURL=pre-generated-config.0b56cc00.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[2369],{5536:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(12559);function r(e,t,i){return i((0,n.A)(e,t))}},7405:(e,t,i)=>{function n(e,t,i,n,r,a){let o=null;const s="bibytes"===n.unit?"bytes":n.unit;if("small"===e.size)switch(e.chartType){case"line":o={brick:"eo-mini-line-chart",properties:{data:t,xField:"time",yField:i,width:"auto",showArea:!0}};break;case"gauge":{var l;const r="percent(1)"===n.unit,a="percent(100)"===n.unit||"%"===n.unit;o={brick:"chart-v2.gauge-chart",properties:{data:t,xField:"time",yField:i,height:100,axis:{yAxis:{unit:s,precision:e.precision,min:e.min,max:null!==(l=e.max)&&void 0!==l?l:r?1:a?100:void 0}},thresholdColors:r||a?[{value:20,color:"cyan"},{value:90,color:"yellow"},{value:100,color:"red"}].map((e=>{let{value:t,color:i}=e;return{value:a?t:t/100,color:`<% THEME.getCssPropertyValue(${JSON.stringify(`--palette-${i}-5`)}) %>`}})):void 0}};break}}else switch(e.chartType){case"line":case"area":o={brick:"chart-v2.time-series-chart",properties:{data:t,xField:"time",yFields:null!=r?r:[i],height:"large"===e.size?230:200,timeFormat:"HH:mm",areaOpacity:"line"===e.chartType?0:void 0,axis:{yAxis:{unit:s,precision:e.precision,min:e.min,max:e.max,shape:"smooth"}},...a?{forceAbsoluteNumbers:!0,series:{[a]:{isNegative:!0}}}:null,areaShape:"smooth",legends:"large"===e.size}}}return o}i.d(t,{r:()=>n})},11369:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(17545);function r(e){var t=function(e){if("object"!=(0,n.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=(0,n.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,n.A)(t)?t:t+""}},12559:(e,t,i)=>{function n(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}i.d(t,{A:()=>n})},17545:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}i.d(t,{A:()=>n})},18488:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),r=i.n(n),a=i(40935),o=i.n(a)()(r());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=o.toString()},26902:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(17545);function r(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?(0,n.A)(e):"null"));return e}},36758:e=>{e.exports=function(e){return e[1]}},40935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&o[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},62740:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(17545),r=i(26902);function a(e,t,i){"symbol"==(0,n.A)(t)&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:i?i+" "+t:t})}catch(e){}return e}var o=i(11369);function s(e,t,i,s,l,c){var d,u,p,g,h,v,m,f=Symbol.metadata||Symbol.for("Symbol.metadata"),y=Object.defineProperty,w=Object.create,b=[w(null),w(null)],k=t.length;function A(t,i,n){return function(r,a){i&&(a=r,r=e);for(var o=0;o<t.length;o++)a=t[o].apply(r,n?[a]:[]);return n?a:r}}function M(e,t,i,n){if("function"!=typeof e&&(n||void 0!==e))throw new TypeError(t+" must "+(i||"be")+" a function"+(n?"":" or undefined"));return e}function T(e,t,i,r,o,s,l,c,p,g,h){function v(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var m=[].concat(t[0]),f=t[3],w=!l,k=1===o,T=3===o,x=4===o,C=2===o;function E(t,i,n){return function(r,a){return i&&(a=r,r=e),n&&n(r),S[t].call(r,a)}}if(!w){var S={},I=[],W=T?"get":x||k?"set":"value";if(p?(g||k?S={get:a((function(){return f(this)}),r,"get"),set:function(e){t[4](this,e)}}:S[W]=f,g||a(S[W],r,C?"":W)):g||(S=Object.getOwnPropertyDescriptor(e,r)),!g&&!p){if((u=b[+c][r])&&7!=(u^o))throw Error("Decorating two elements with the same name ("+S[W].name+") is not supported yet");b[+c][r]=o<3?1:o}}for(var $=e,D=m.length-1;D>=0;D-=i?2:1){var _=M(m[D],"A decorator","be",!0),N=i?m[D-1]:void 0,O={},X={kind:["field","accessor","method","getter","setter","class"][o],name:r,metadata:d,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");M(t,"An initializer","be",!0),s.push(t)}.bind(null,O)};if(w)u=_.call(N,$,X),O.v=1,M(u,"class decorators","return")&&($=u);else if(X.static=c,X.private=p,u=X.access={has:p?h.bind():function(e){return r in e}},x||(u.get=p?C?function(e){return v(e),S.value}:E("get",0,v):function(e){return e[r]}),C||T||(u.set=p?E("set",0,v):function(e,t){e[r]=t}),$=_.call(N,k?{get:S.get,set:S.set}:S[W],X),O.v=1,k){if("object"==(0,n.A)($)&&$)(u=M($.get,"accessor.get"))&&(S.get=u),(u=M($.set,"accessor.set"))&&(S.set=u),(u=M($.init,"accessor.init"))&&I.unshift(u);else if(void 0!==$)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else M($,(g?"field":"method")+" decorators","return")&&(g?I.unshift($):S[W]=$)}return o<2&&l.push(A(I,c,1),A(s,c,0)),g||w||(p?k?l.splice(-1,0,E("get",c),E("set",c)):l.push(C?S[W]:M.call.bind(S[W])):y(e,r,S)),$}function x(e){return y(e,f,{configurable:!0,enumerable:!0,value:d})}return void 0!==c&&(d=c[f]),d=w(null==d?null:d),h=[],v=function(e){e&&h.push(A(e))},m=function(t,n){for(var a=0;a<i.length;a++){var s=i[a],c=s[1],d=7&c;if((8&c)==t&&!d==n){var u=s[2],v=!!s[3],m=16&c;T(t?e:e.prototype,s,m,v?"#"+u:(0,o.A)(u),d,d<2?[]:t?g=g||[]:p=p||[],h,!!t,v,n,t&&v?function(t){return(0,r.A)(t)===e}:l)}}},m(8,0),m(0,0),m(8,1),m(0,1),v(p),v(g),u=h,k||x(e),{e:u,get c(){var i=[];return k&&[x(e=T(e,[t],s,e.name,5,i)),A(i,1)]}}}},67576:(e,t,i)=>{i.r(t),i.d(t,{PreGeneratedConfig:()=>R,PreGeneratedConfigComponent:()=>ee});var n,r=i(74635),a=i(70918),o=i(26902),s=i(5536),l=i(86121),c=i(70829),d=i(62740),u=i(18769),p=i.n(u),g=i(90870),h=i(30981),v=i(30348),m=i(55310),f=i(41030),y=(i(34419),i(99733)),w=i(85882),b=i(19057),k=i(7405),A=i(78059),M=i(90934),T=i(18488),x=i(92120);let C,E,S,I,W,$,D,_,N,O,X,L,P,z,B;(0,y.initializeI18n)(w.NS,w.I);const{defineElement:K,property:j,event:F}=(0,g.createDecorators)();let R;var U=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakMap,H=new WeakMap,q=new WeakMap,Q=new WeakSet,Y=new WeakMap;class Z extends h.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Q),(0,a.A)(this,U,E(this)),(0,a.A)(this,G,(S(this),I(this))),(0,a.A)(this,J,(W(this),$(this))),(0,a.A)(this,V,(D(this),_(this))),(0,a.A)(this,H,(N(this),O(this))),(0,a.A)(this,q,(X(this),L(this))),(0,a.A)(this,Y,(B(this),e=>{(0,s.A)(Q,this,P).emit(e)}))}get previewUrl(){return(0,c.A)(U,this)}set previewUrl(e){(0,l.A)(U,this,e)}get attrList(){return(0,c.A)(G,this)}set attrList(e){(0,l.A)(G,this,e)}get mockList(){return(0,c.A)(J,this)}set mockList(e){(0,l.A)(J,this,e)}get metricGroups(){return(0,c.A)(V,this)}set metricGroups(e){(0,l.A)(V,this,e)}get containerConfig(){return(0,c.A)(H,this)}set containerConfig(e){(0,l.A)(H,this,e)}render(){return p().createElement(ee,{previewUrl:this.previewUrl,attrList:this.attrList,mockList:this.mockList,metricGroups:this.metricGroups,containerConfig:this.containerConfig,onBrickChange:(0,c.A)(Y,this),root:this})}}function ee(e){let{previewUrl:t,attrList:i,mockList:n,metricGroups:r,containerConfig:a,root:o,onBrickChange:s}=e;const l=(0,u.useRef)(),[c,d]=(0,u.useState)(!1),[g,h]=(0,u.useState)(!1),[y,w]=(0,u.useState)(null),[T,C]=(0,u.useState)(null),E=(0,u.useRef)(null),S=(0,u.useRef)(null),I=(0,u.useMemo)((()=>(0,f.uniqueId)("event-agent-")),[]),W="chart"===(null==a?void 0:a.type)?"chart":"grouped-chart"===(null==a?void 0:a.type)?"grouped-chart":"default",$=(0,u.useMemo)((()=>"default"===W?i:null==i?void 0:i.filter((e=>e.metricKey))),[i,W]),D=(0,u.useMemo)((()=>"grouped-chart"===W?function(e,t){var i,n;const r=new Map(e.map((e=>[e.id,e]))),a=[];t.forEach(((e,t)=>{const i=[];for(const t of e.metrics){const e=r.get(t);e&&(r.delete(t),i.push(e))}i.length&&a.push({id:t,group:e.group,metrics:i,counter:e.counter})}));const o=(null!==(i=null===(n=a[a.length-1])||void 0===n?void 0:n.id)&&void 0!==i?i:-1)+1;return a.push(...[...r.values()].map(((e,t)=>({id:o+t,group:"",metrics:[e]})))),a}($,r):$),[r,$,W]);(0,u.useEffect)((()=>{C(null),E.current=null,S.current=null}),[D]),(0,u.useEffect)((()=>{if(y){const e=y.selectedIds.sort(((e,t)=>y.orderedIds.indexOf(e)-y.orderedIds.indexOf(t))).map((e=>D.find((t=>t.id===e)))).filter(Boolean),t=new Map(y.weightMapLiteral),i=new Map(y.groupMapLiteral),n=e.map((e=>{var n;const a=te(W,$,r,e,i),o="grouped-chart"===a.viewType?null===(n=a.metric.candidates)||void 0===n?void 0:n.filter((e=>"small"!==e.size)):e.candidates;return{candidate:null==o?void 0:o.find((i=>i.visualWeight===t.get(e.id))),meta:a}})),o=(0,A.M)(n,a);s(o)}}),[y,a,D,r,s,$,W]);const _=(0,u.useCallback)((()=>{const e=()=>{var t;const i=null===(t=l.current)||void 0===t?void 0:t.contentWindow;null!=i&&i._preview_only_render?d(!0):setTimeout(e,100)};e()}),[]);return(0,u.useEffect)((()=>{var e;const t=null===(e=l.current)||void 0===e?void 0:e.contentWindow;if(!c||!t)return;const i=new ResizeObserver((()=>{o.style.height=`${t.document.body.scrollHeight}px`}));return i.observe(t.document.body),()=>i.disconnect()}),[c,o]),(0,u.useEffect)((()=>{var e;if(!c)return;const t=null===(e=l.current)||void 0===e?void 0:e.contentWindow,i=e=>{let{data:t}=e;if("pre-generated-config"===(null==t?void 0:t.channel))switch(t.type){case"config-change":w(t.payload);break;case"group-change":C((e=>new Map([...null!=e?e:[],[t.payload.id,t.payload.metrics]])));break;case"order-change":S.current=t.payload.orderedIds;break;case"selection-change":E.current=t.payload.selectedIds}};return t.addEventListener("message",i),()=>{t.removeEventListener("message",i)}}),[c]),(0,u.useEffect)((()=>{var e;if(!c)return;const i=v.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!i)throw new Error("Cannot find preview agent package: bricks/visual-builder");const n=l.current.contentWindow._preview_only_inject,r={...i,filePath:t?new URL(i.filePath,new URL(t,location.origin)).toString():`${location.origin}${(0,v.getBasePath)()}${null!==(e=window.PUBLIC_ROOT)&&void 0!==e?e:""}${i.filePath}`};Promise.allSettled([n("visual-builder.pre-generated-container",r,void 0,!0)]).then((()=>{h(!0)}))}),[t,c]),(0,u.useEffect)((()=>{var e,t,i,a,o;if(!g)return;const s=null===(e=l.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const c=S.current,d=E.current,u=c?c.map((e=>D.find((t=>t.id===e)))).filter(Boolean):D,p=d?u.filter((e=>d.includes(e.id))):null!==(t=null==u?void 0:u.slice(0,5))&&void 0!==t?t:[],h=null!=d?d:p.map((e=>e.id));s("yaml",{yaml:(0,m.safeDump)([{brick:"eo-next-table",errorBoundary:!0,properties:{injectChartV2Styles:!0,pagination:!1,rowSelection:!0,rowKey:"id",rowDraggable:!0,bordered:!0,dataSource:{list:u},selectedRowKeys:h,columns:[..."chart"===W?[{title:"指标名",dataIndex:"id",key:"id",width:"20%"},{title:"指标别名",dataIndex:"name",key:"name",width:"20%"}]:"grouped-chart"===W?[{title:"指标组",dataIndex:"id",key:"id",width:"40%",useBrick:{brick:"eo-select",properties:{options:"<% CTX.metricOptions %>",mode:"multiple",value:"<% CTX.groupMap.get(DATA.cellData) ?? DATA.rowData.metrics.map((metric) => metric.id) %>",dropdownHoist:!0},events:{change:{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"group-change",payload:"<% { id: DATA.cellData, metrics: EVENT.detail.value } %>"}]}}}}]:[{title:"ID",dataIndex:"id",key:"id",width:"20%"},{title:"名称",dataIndex:"name",key:"name",width:"20%"}],{title:"预览",dataIndex:"preview",key:"preview",useBrick:{brick:"div",children:null==D?void 0:D.flatMap((e=>{var t,i,a;const o=te(W,$,r,e,T);let s,l;var c,d;"grouped-chart"===o.viewType?(l=null==n?void 0:n.map((e=>(0,f.pick)(e,["time",...o.groupedMetricKeys]))),s=null===(c=o.metric.candidates)||void 0===c?void 0:c.filter((e=>"small"!==e.size))):(s=e.candidates,l="chart"===o.viewType?null==n?void 0:n.map((e=>(0,f.pick)(e,["time",o.metric.metricKey]))):null!==(d=null==n?void 0:n[0])&&void 0!==d?d:{});const u=null===(t=s)||void 0===t?void 0:t.map((t=>{const i=`<%=\n DATA.rowData.id === ${JSON.stringify(e.id)} &&\n ${JSON.stringify(t.visualWeight)} === CTX.weightMap.get(${JSON.stringify(e.id)})\n %>`,n="default"===o.viewType?(0,b.w)(t,e.id):(0,k.r)({...t,min:o.counterMetricKey?void 0:t.min},"<% DATA %>",o.metric.metricKey,{unit:o.metric.unit},o.groupedMetricKeys,o.counterMetricKey);if(n)return{if:i,brick:"visual-builder.pre-generated-container",properties:{useBrick:n,dataSource:l}}})).filter(Boolean);return null!=u&&u.length?u:{if:`<% DATA.rowData.id === ${JSON.stringify(e.id)} %>`,brick:"span",properties:{textContent:null!==(i=null==n||null===(a=n[0])||void 0===a?void 0:a[e.id])&&void 0!==i?i:""}}}))}},{dataIndex:"operations",key:"operations",width:81,headerBrick:{useBrick:{brick:"eo-mini-actions",properties:{actions:'<%=\n [\n {\n icon: {\n lib: "antd",\n icon: "minus",\n },\n event: "minus",\n disabled: [...CTX.weightMap].every(([id, v]) => v <= CTX.availableWeights.get(id)[0]),\n },\n {\n icon: {\n lib: "antd",\n icon: "plus",\n },\n event: "plus",\n disabled: [...CTX.weightMap].every(([id, v]) => v >= CTX.availableWeights.get(id).slice(-1)[0]),\n },\n ]\n %>'},events:{minus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, null, -1) %>"]},plus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, null, 1) %>"]}}}},useBrick:{if:"<% CTX.availableWeights.get(DATA.rowData.id)?.length %>",brick:"eo-mini-actions",properties:{actions:'<%=\n [\n {\n icon: {\n lib: "antd",\n icon: "minus",\n },\n event: "minus",\n disabled: CTX.weightMap.get(DATA.rowData.id) <= CTX.availableWeights.get(DATA.rowData.id)[0],\n },\n {\n icon: {\n lib: "antd",\n icon: "plus",\n },\n event: "plus",\n disabled: CTX.weightMap.get(DATA.rowData.id) >= CTX.availableWeights.get(DATA.rowData.id).slice(-1)[0],\n },\n ]\n %>'},events:{minus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, DATA.rowData.id, -1) %>"]},plus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, DATA.rowData.id, 1) %>"]}}}}]},events:{"row.select":{action:"context.replace",args:["selectedItems","<%= EVENT.detail.rows %>"]},"row.drag":{action:"context.replace",args:["orderedIds","<%= EVENT.detail.list.map((attr) => attr.id) %>"]}}},{brick:"eo-event-agent",properties:{id:I},events:{trigger:{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"config-change",payload:"<% FN.getPreConfig(CTX.selectedItems, CTX.orderedIds, CTX.weightMap, CTX.groupMap) %>"}]}},lifeCycle:{onPageLoad:{target:`#${I}`,method:"trigger"}},portal:!0,errorBoundary:!0}],{skipInvalid:!0})},{theme:"light",uiVersion:"8.2",styleText:x.A,context:[{name:"orderedIds",value:null!==(i=null==$?void 0:$.map((e=>e.id)))&&void 0!==i?i:[],onChange:[{target:`#${I}`,method:"trigger"},..."grouped-chart"===W?[{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"order-change",payload:{orderedIds:"<% EVENT.detail %>"}}]}]:[]]},{name:"selectedItems",value:p,onChange:[{target:`#${I}`,method:"trigger"},..."grouped-chart"===W?[{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"selection-change",payload:{selectedIds:"<% EVENT.detail.map((item) => item.id) %>"}}]}]:[]]},{name:"availableWeights",value:`<% new Map(${JSON.stringify(null!==(a=null==D?void 0:D.map((e=>{var t,i;return[e.id,null!==(t=null===(i=("grouped-chart"===W?e.metrics[0]:e).candidates)||void 0===i?void 0:i.filter((e=>"grouped-chart"!==W||"small"!==e.size)).map((e=>e.visualWeight)).sort(((e,t)=>e-t)))&&void 0!==t?t:[]]})))&&void 0!==a?a:[])}) %>`},{name:"weightMap",value:`<% new Map(${JSON.stringify(null!==(o=null==D?void 0:D.map((e=>{var t,i,n,r;return[e.id,null===(n=null===(i=("grouped-chart"===W?e.metrics[0]:e).candidates)||void 0===i?void 0:i.filter((e=>"grouped-chart"!==W||"small"!==e.size)),r="grouped-chart"===W?2:0,t=null==n?void 0:n.reduce(((e,t)=>!e||Math.abs(t.visualWeight-r)<Math.abs(e.visualWeight-r)?t:e)))||void 0===t?void 0:t.visualWeight]})))&&void 0!==o?o:[])}) %>`,onChange:{target:`#${I}`,method:"trigger"}},{name:"groupMap",value:`<% new Map(${JSON.stringify([...null!=T?T:[]])}) %>`},..."grouped-chart"===W?[{name:"metricOptions",value:null==$?void 0:$.map((e=>({label:e.metricKey,value:e.id})))}]:[]],functions:[{name:"updateWeightMap",source:M},{name:"getPreConfig",source:"\n function getPreConfig(selectedItems, orderedIds, weightMap, groupMap) {\n return {\n selectedIds: selectedItems.map((item) => item.id),\n orderedIds,\n weightMapLiteral: [...weightMap],\n groupMapLiteral: [...groupMap],\n };\n }\n "}]})}),[i,a,g,r,n,I,D,W,$,T]),p().createElement("div",{className:"container"},p().createElement("iframe",{ref:l,src:null!=t?t:`${(0,v.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:_}))}function te(e,t,i,n,r){if("grouped-chart"===e){var a;const o=n,s=null==r?void 0:r.get(o.id);let l;l=s?t.filter((e=>s.includes(e.id))):o.metrics;const c=l[0],d=l.map((e=>e.metricKey));let u;if(o.counter&&2===l.length)for(const e of i)if(2===e.metrics.length&&e.counter===o.counter&&l.every((t=>e.metrics.includes(t.id)))){u=l.find((e=>e.id===o.counter));break}return{viewType:e,metric:c,groupedMetricKeys:d,counterMetricKey:null===(a=u)||void 0===a?void 0:a.metricKey}}return"chart"===e?{viewType:e,metric:n}:{viewType:e,attr:n}}n=Z,({e:[E,S,I,W,$,D,_,N,O,X,L,P,z,B],c:[R,C]}=(0,d.A)(n,[K("visual-builder.pre-generated-config",{styleTexts:[T.A]})],[[j(),1,"previewUrl"],[j({attribute:!1}),1,"attrList"],[j({attribute:!1}),1,"mockList"],[j({attribute:!1}),1,"metricGroups"],[j({attribute:!1}),1,"containerConfig"],[F({type:"brick.change"}),1,"brickChangeEvent",e=>(0,c.A)(q,e),(e,t)=>(0,l.A)(q,e,t)]],0,(e=>Y.has((0,o.A)(e))),h.ReactNextElement)),C()},70829:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(12559);function r(e,t){return e.get((0,n.A)(e,t))}},70918:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(72016);function r(e,t,i){(0,n.A)(e,t),t.set(e,i)}},72016:(e,t,i)=>{function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i.d(t,{A:()=>n})},74635:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(72016);function r(e,t){(0,n.A)(e,t),t.add(e)}},78059:(e,t,i)=>{i.d(t,{M:()=>l});var n=i(77019),r=i(8514),a=i(19057),o=i(41030),s=i(7405);function l(e,t){var i;let{type:n,dataName:l,dataType:d,settings:u}=t;if(!n||!l||0===e.length)return null;const p=`${"state"===d?"STATE":"CTX"}${(0,r._)(l)}`;if("chart"===n||"grouped-chart"===n){const t=e,i=`<%= ${p}${null!=u&&u.pagination||null!=u&&u.wrapper?".list":""} %>`,n=t.map((e=>{let{candidate:t,meta:n}=e;return(0,s.r)({...t,min:n.counterMetricKey?void 0:t.min},i,n.metric.metricKey,{unit:n.metric.unit},n.groupedMetricKeys,n.counterMetricKey)}));return 1===n.length?n[0]:{brick:"eo-grid-layout",properties:{templateColumns:"repeat(auto-fill, minmax(500px, 1fr))",gap:"var(--card-content-gap)"},slots:{"":{type:"bricks",bricks:n}}}}const g=e;if("cards"===n)return{brick:"eo-grid-layout",properties:{templateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:"var(--card-content-gap)"},slots:{"":{type:"bricks",bricks:[{brick:":forEach",dataSource:`<%= ${p}${null!=u&&u.pagination||null!=u&&u.wrapper?".list":""} %>`,slots:{"":{type:"bricks",bricks:[{brick:"eo-card-item",properties:{cardTitle:(0,o.has)(null==u?void 0:u.fields,"title")&&"string"==typeof u.fields.title?`<% ITEM${(0,r._)(u.fields.title)} %>`:void 0,description:(0,o.has)(null==u?void 0:u.fields,"description")&&"string"==typeof u.fields.description?`<% ITEM${(0,r._)(u.fields.description)} %>`:void 0}}]}}}]}}};const h=`<%= ${null!=u&&u.pagination?null!=u&&null!==(i=u.fields)&&void 0!==i&&i.pageSize?`{...${p},pageSize: ${p}${(0,r._)(u.fields.pageSize)}}`:p:null!=u&&u.wrapper?p:`{ list: ${p} }`} %>`,v=new Map;for(const e of g)if(e.candidate){const t="table"===n?(0,a.m)(e.candidate,".cellData"):(0,a.w)(e.candidate,e.meta.attr.id);t&&v.set(e.meta.attr.id,c(t))}const m=Object.fromEntries(g.map((e=>{const t=v.get(e.meta.attr.id);return t?[`[${e.meta.attr.id}]`,{type:"bricks",bricks:[t]}]:null})).filter(Boolean));switch(n){case"table":return{brick:"eo-next-table",properties:{rowKey:"instanceId",columns:g.map((e=>{let{meta:{attr:t}}=e;const i={title:t.name,dataIndex:t.id,key:t.id};return v.has(t.id)&&(i.useChildren=`[${t.id}]`),i})),dataSource:h,...null!=u&&u.pagination?null:{pagination:!1}},slots:m};case"descriptions":return{brick:"eo-descriptions",properties:{column:2,list:g.map((e=>{let{candidate:t,meta:{attr:i}}=e;const n={label:i.name};return t&&(n.useChildren=`[${i.id}]`),n})),dataSource:h},slots:m}}return null}function c(e){const{children:t,slots:i,...n}=e;return{...n,slots:d(t,i)}}function d(e,t){let i=t;if(Array.isArray(e)&&!i){i={};for(const{slot:t,...r}of e){const e=null!=t?t:"";(0,n.hasOwnProperty)(i,e)||(i[e]={type:"bricks",bricks:[]}),i[e].bricks.push(c(r))}}return i}},85882:(e,t,i)=>{i.d(t,{I:()=>a,NS:()=>r});var n=i(99733);const r="bricks/visual-builder/pre-generated-config",a={en:{},zh:{}};n.i18n.getFixedT(null,r)},86121:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(12559);function r(e,t,i){return e.set((0,n.A)(e,t),i),i}},90934:e=>{e.exports="/**\n * @param {Map<string, number>} weightMap\n * @param {Map<string, number[]>} availableWeights\n * @param {string | null} key\n * @param {1 | -1} direction\n * @returns {Map<string, number>}\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction updateWeightMap(weightMap, availableWeights, key, direction) {\n return new Map([...weightMap].map(_ref => {\n let [k, v] = _ref;\n if (key === null || k === key) {\n const weights = availableWeights.get(k);\n const index = weights.indexOf(v);\n const nextIndex = Math.max(0, Math.min(index + direction, weights.length - 1));\n return [k, weights[nextIndex]];\n }\n return [k, v];\n }));\n}"},92120:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(36758),r=i.n(n),a=i(40935),o=i.n(a)()(r());o.push([e.id,"#preview-root{padding:0}",""]);const s=o.toString()}}]);
2
+ //# sourceMappingURL=pre-generated-config.e3a01708.js.map