@next-bricks/data-view 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +22 -9
- package/dist/chunks/1143.2494e37f.js +2 -0
- package/dist/chunks/1143.2494e37f.js.map +1 -0
- package/dist/chunks/2938.1d24bf3a.js +2 -0
- package/dist/chunks/2938.1d24bf3a.js.map +1 -0
- package/dist/chunks/3910.cd76fadc.js +2 -0
- package/dist/chunks/3910.cd76fadc.js.map +1 -0
- package/dist/chunks/{5155.52b564af.js → 5902.15d216ce.js} +3 -3
- package/dist/chunks/5902.15d216ce.js.map +1 -0
- package/dist/chunks/859.472360b6.js +2 -0
- package/dist/chunks/859.472360b6.js.map +1 -0
- package/dist/chunks/bubbles-indicator.34eea7ea.js +2 -0
- package/dist/chunks/bubbles-indicator.34eea7ea.js.map +1 -0
- package/dist/chunks/cabinet-container.bc8cb288.js +3 -0
- package/dist/chunks/cabinet-container.bc8cb288.js.map +1 -0
- package/dist/chunks/cabinet-thumbnail.d6c2b232.js +3 -0
- package/dist/chunks/cabinet-thumbnail.d6c2b232.js.map +1 -0
- package/dist/chunks/china-map-chart.eb43bf10.js +2 -0
- package/dist/chunks/china-map-chart.eb43bf10.js.map +1 -0
- package/dist/chunks/crystal-ball-indicator.d8cd86a8.js +2 -0
- package/dist/chunks/crystal-ball-indicator.d8cd86a8.js.map +1 -0
- package/dist/chunks/gear-background.7707f3b1.js.map +1 -1
- package/dist/chunks/globe-with-gear-indicator.25c9901b.js +2 -0
- package/dist/chunks/globe-with-gear-indicator.25c9901b.js.map +1 -0
- package/dist/chunks/globe-with-halo-indicator.23e27349.js +2 -0
- package/dist/chunks/globe-with-halo-indicator.23e27349.js.map +1 -0
- package/dist/chunks/loading-panel.4b9cfaa7.js +2 -0
- package/dist/chunks/loading-panel.4b9cfaa7.js.map +1 -0
- package/dist/chunks/main.1bce9b12.js +2 -0
- package/dist/chunks/main.1bce9b12.js.map +1 -0
- package/dist/chunks/modern-style-treemap.d59d18bc.js +3 -0
- package/dist/chunks/modern-style-treemap.d59d18bc.js.map +1 -0
- package/dist/chunks/progress-bar-list.3b337de3.js +2 -0
- package/dist/chunks/progress-bar-list.3b337de3.js.map +1 -0
- package/dist/examples.json +31 -22
- package/dist/images/0fec7781.png +0 -0
- package/dist/images/1056eac3.png +0 -0
- package/dist/images/12997c2b.png +0 -0
- package/dist/images/2235938c.png +0 -0
- package/dist/images/45a4740b.png +0 -0
- package/dist/images/4f7762f3.svg +21 -0
- package/dist/images/698229b4.png +0 -0
- package/dist/images/73baf989.png +0 -0
- package/dist/images/81f40f95.png +0 -0
- package/dist/images/86a2105c.png +0 -0
- package/dist/images/a457f803.png +0 -0
- package/dist/images/b2fdf90d.svg +74 -0
- package/dist/images/b91eed9d.png +0 -0
- package/dist/images/d20b2c27.svg +46 -0
- package/dist/images/f1a78578.png +0 -0
- package/dist/index.b0b43bc4.js +2 -0
- package/dist/index.b0b43bc4.js.map +1 -0
- package/dist/manifest.json +310 -208
- package/dist/media/0c649f21.webm +0 -0
- package/dist/media/2978c0ae.ttf +0 -0
- package/dist/media/cc0a5a55.ttf +0 -0
- package/dist/types.json +1057 -702
- package/dist-types/bootstrap.d.ts +3 -0
- package/dist-types/bubbles-indicator/index.d.ts +45 -0
- package/dist-types/bubbles-indicator/index.spec.d.ts +1 -0
- package/dist-types/china-map-chart/index.d.ts +2 -1
- package/dist-types/crystal-ball-indicator/index.d.ts +7 -4
- package/dist-types/gear-background/index.d.ts +1 -1
- package/dist-types/globe-with-gear-indicator/index.d.ts +45 -0
- package/dist-types/globe-with-gear-indicator/index.spec.d.ts +1 -0
- package/dist-types/globe-with-halo-indicator/RotatingArc.d.ts +2 -0
- package/dist-types/globe-with-halo-indicator/RotatingArc.spec.d.ts +1 -0
- package/dist-types/globe-with-halo-indicator/SatelliteRing.d.ts +2 -0
- package/dist-types/globe-with-halo-indicator/index.d.ts +45 -0
- package/dist-types/globe-with-halo-indicator/index.spec.d.ts +1 -0
- package/docs/bubbles-indicator.md +42 -0
- package/docs/china-map-chart.md +55 -27
- package/docs/crystal-ball-indicator.md +34 -29
- package/docs/globe-with-gear-indicator.md +42 -0
- package/docs/globe-with-halo-indicator.md +42 -0
- package/package.json +2 -2
- package/dist/chunks/2836.358bb597.js +0 -2
- package/dist/chunks/2836.358bb597.js.map +0 -1
- package/dist/chunks/5155.52b564af.js.map +0 -1
- package/dist/chunks/5371.15b68669.js +0 -2
- package/dist/chunks/5371.15b68669.js.map +0 -1
- package/dist/chunks/8847.9be1eec6.js +0 -2
- package/dist/chunks/8847.9be1eec6.js.map +0 -1
- package/dist/chunks/cabinet-container.95ec63e8.js +0 -3
- package/dist/chunks/cabinet-container.95ec63e8.js.map +0 -1
- package/dist/chunks/cabinet-thumbnail.dc01323b.js +0 -3
- package/dist/chunks/cabinet-thumbnail.dc01323b.js.map +0 -1
- package/dist/chunks/china-map-chart.375f876a.js +0 -2
- package/dist/chunks/china-map-chart.375f876a.js.map +0 -1
- package/dist/chunks/crystal-ball-indicator.269b1f6d.js +0 -2
- package/dist/chunks/crystal-ball-indicator.269b1f6d.js.map +0 -1
- package/dist/chunks/loading-panel.b7f40435.js +0 -2
- package/dist/chunks/loading-panel.b7f40435.js.map +0 -1
- package/dist/chunks/main.dacb91a2.js +0 -2
- package/dist/chunks/main.dacb91a2.js.map +0 -1
- package/dist/chunks/modern-style-treemap.0b40defb.js +0 -3
- package/dist/chunks/modern-style-treemap.0b40defb.js.map +0 -1
- package/dist/chunks/progress-bar-list.b788a7ce.js +0 -2
- package/dist/chunks/progress-bar-list.b788a7ce.js.map +0 -1
- package/dist/images/66ee9c70.png +0 -0
- package/dist/images/cc662090.png +0 -0
- package/dist/index.fefb1c64.js +0 -2
- package/dist/index.fefb1c64.js.map +0 -1
- package/dist-types/china-map-chart/map.d.ts +0 -144
- /package/dist/chunks/{5155.52b564af.js.LICENSE.txt → 5902.15d216ce.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-container.95ec63e8.js.LICENSE.txt → cabinet-container.bc8cb288.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-thumbnail.dc01323b.js.LICENSE.txt → cabinet-thumbnail.d6c2b232.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{modern-style-treemap.0b40defb.js.LICENSE.txt → modern-style-treemap.d59d18bc.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[859],{6837:(t,e,n)=>{n.d(e,{Z:()=>u,w:()=>l});var r=n(18769),o=n(99126);const i=new Map,a=new o.A((t=>{t.forEach((t=>{var e;const{target:n}=t;null===(e=i.get(n))||void 0===e||e.forEach((e=>e(t)))}))})),p=(t,e)=>{i.has(t)||(i.set(t,new Set),a.observe(t)),i.get(t).add(e)},c=(t,e)=>{i.has(t)&&(i.get(t).delete(e),0===i.get(t).size&&(a.unobserve(t),i.delete(t)))};function l(t){const{targetRef:e,onResize:n}=t||{},o=(0,r.useRef)(),i=null!=e?e:o,[a,l]=(0,r.useState)({clientWidth:0,clientHeight:0}),u=(0,r.useCallback)((t=>{const{target:e}=t,{clientWidth:r=0,clientHeight:o=0}=e;l((e=>e.clientWidth===r&&e.clientHeight===o?e:(null==n||n(t),{clientWidth:r,clientHeight:o})))}),[n]);return(0,r.useEffect)((()=>{if("object"!=typeof i||null===i||!(i.current instanceof Element))throw new Error("ResizeObserver must observe an Element");const t=i.current;return p(t,u),()=>{c(t,u)}}),[u,i]),[i,{...a}]}function u(t){const e=(0,r.useRef)();return(0,r.useEffect)((()=>{e.current=t})),e.current}},73240:(t,e,n)=>{n.d(e,{A:()=>f});var r=n(36758),o=n.n(r),i=n(40935),a=n.n(i),p=n(20062),c=n.n(p),l=new URL(n(54664),n.b),u=a()(o()),h=c()(l);u.push([t.id,`:host{display:block;width:100%;height:100%}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.wrapper{position:relative;width:100%;height:100%}.treemap{position:relative;overflow:hidden;width:100%;height:100%;cursor:url(${h}) 10 10,pointer}.treemap-leaf{position:absolute;overflow:hidden;border-radius:var(--no-border-radius);background:var(--color-fill-bg-container-2) radial-gradient(farthest-corner,#0f1014ff 0%,#0f101400 100%);box-shadow:inset 5px 5px 8px 1px rgba(51,102,255,0.24)}.tooltip{display:inline-block;visibility:hidden;position:absolute;top:0;left:0;padding:8px 8px 8px 15px;font-size:var(--chart-tooltips-font-size-2);line-height:20px;font-weight:var(--font-weight-500);color:var(--color-normal-text);--treemap-tooltip-background:rgba(103,149,219,0.12) radial-gradient(100% 100% ellipse at 12px 4px,rgba(var(--palette-tech-blue-6-channel),0.3),rgba(var(--palette-tech-blue-6-channel),0));--treemap-backdrop-filter:blur(5px);z-index:0}.bottom.tooltip,\n.bottomRight.tooltip,\n.bottomLeft.tooltip{padding:8px 8px 15px 8px}.right.tooltip{padding:8px 15px 8px 8px}.top.tooltip,\n.topLeft.tooltip,\n.topRight.tooltip{padding:15px 8px 8px 8px}.tooltip::before,\n.tooltip::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;z-index:-1;background:var(--treemap-tooltip-background);-webkit-backdrop-filter:var(--treemap-backdrop-filter);backdrop-filter:var(--treemap-backdrop-filter)}.tooltip::before{-webkit-clip-path:inset(0 0 0 7px round var(--medius-border-radius));clip-path:inset(0 0 0 7px round var(--medius-border-radius))}.top.tooltip::before,\n.topLeft.tooltip::before,\n.topRight.tooltip::before{-webkit-clip-path:inset(7px 0 0 0 round var(--medius-border-radius));clip-path:inset(7px 0 0 0 round var(--medius-border-radius))}.bottom.tooltip::before,\n.bottomRight.tooltip::before,\n.bottomLeft.tooltip::before{-webkit-clip-path:inset(0 0 7px 0 round var(--medius-border-radius));clip-path:inset(0 0 7px 0 round var(--medius-border-radius))}.right.tooltip::before{-webkit-clip-path:inset(0 7px 0 0 round var(--medius-border-radius));clip-path:inset(0 7px 0 0 round var(--medius-border-radius))}.tooltip::after{-webkit-clip-path:polygon(0 50%,7px calc(50% - 7px),7px calc(50% + 7px));clip-path:polygon(0 50%,7px calc(50% - 7px),7px calc(50% + 7px))}.bottom.tooltip::after{-webkit-clip-path:polygon(calc(50% - 7px) calc(100% - 7px),50% 100%,calc(50% + 7px) calc(100% - 7px));clip-path:polygon(calc(50% - 7px) calc(100% - 7px),50% 100%,calc(50% + 7px) calc(100% - 7px))}.bottomLeft.tooltip::after{-webkit-clip-path:polygon(7px calc(100% - 7px),14px 100%,21px calc(100% - 7px));clip-path:polygon(7px calc(100% - 7px),14px 100%,21px calc(100% - 7px))}.bottomRight.tooltip::after{-webkit-clip-path:polygon(calc(100% - 7px) calc(100% - 7px),calc(100% - 14px) 100%,calc(100% - 21px) calc(100% - 7px));clip-path:polygon(calc(100% - 7px) calc(100% - 7px),calc(100% - 14px) 100%,calc(100% - 21px) calc(100% - 7px))}.top.tooltip::after{-webkit-clip-path:polygon(calc(50% - 7px) 7px,50% 0,calc(50% + 7px) 7px);clip-path:polygon(calc(50% - 7px) 7px,50% 0,calc(50% + 7px) 7px)}.topLeft.tooltip::after{-webkit-clip-path:polygon(7px 7px,14px 0,21px 7px);clip-path:polygon(7px 7px,14px 0,21px 7px)}.topRight.tooltip::after{-webkit-clip-path:polygon(calc(100% - 7px) 7px,calc(100% - 14px) 0,calc(100% - 21px) 7px);clip-path:polygon(calc(100% - 7px) 7px,calc(100% - 14px) 0,calc(100% - 21px) 7px)}.right.tooltip::after{-webkit-clip-path:polygon(calc(100% - 7px) calc(50% - 7px),100% 50%,calc(100% - 7px) calc(50% + 7px));clip-path:polygon(calc(100% - 7px) calc(50% - 7px),100% 50%,calc(100% - 7px) calc(50% + 7px))}`,""]);const f=u.toString()},54664:(t,e,n)=>{t.exports=n.p+"images/f3856ac6.svg"},17290:(t,e,n)=>{function r(t){let e;const n=()=>cancelAnimationFrame(e),r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];e&&n(),e=requestAnimationFrame((()=>{t(...o)}))};return r.cancel=n,r}n.d(e,{G:()=>r})},37604:(t,e,n)=>{function r(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function o(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=a)):void 0===e&&(e=i);for(var n,r,o,p,u,h=new l(t),f=[h];n=f.pop();)if((o=e(n.data))&&(u=(o=Array.from(o)).length))for(n.children=o,p=u-1;p>=0;--p)f.push(r=o[p]=new l(o[p])),r.parent=n,r.depth=n.depth+1;return h.eachBefore(c)}function i(t){return t.children}function a(t){return Array.isArray(t)?t[1]:null}function p(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function c(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function l(t){this.data=t,this.depth=this.height=0,this.parent=null}n.d(e,{Ay:()=>o}),l.prototype=o.prototype={constructor:l,count:function(){return this.eachAfter(r)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,o,i=this,a=[i],p=[],c=-1;i=a.pop();)if(p.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=p.pop();)t.call(e,i,++c,this);return this},eachBefore:function(t,e){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(t.call(e,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;for(t=n.pop(),e=r.pop();t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return o(this).eachBefore(p)},[Symbol.iterator]:function*(){var t,e,n,r,o=this,i=[o];do{for(t=i.reverse(),i=[];o=t.pop();)if(yield o,e=o.children)for(n=0,r=e.length;n<r;++n)i.push(e[n])}while(i.length)}}},16399:(t,e,n)=>{function r(t,e,n,r,o){var i,a,p=t.children,c=p.length,l=new Array(c+1);for(l[0]=a=i=0;i<c;++i)l[i+1]=a+=p[i].value;!function t(e,n,r,o,i,a,c){if(e>=n-1){var u=p[e];return u.x0=o,u.y0=i,u.x1=a,void(u.y1=c)}for(var h=l[e],f=r/2+h,d=e+1,s=n-1;d<s;){var x=d+s>>>1;l[x]<f?d=x+1:s=x}f-l[d-1]<l[d]-f&&e+1<d&&--d;var g=l[d]-h,v=r-g;if(a-o>c-i){var b=r?(o*v+a*g)/r:a;t(e,d,g,o,i,b,c),t(d,n,v,b,i,a,c)}else{var y=r?(i*v+c*g)/r:c;t(e,d,g,o,i,a,y),t(d,n,v,o,y,a,c)}}(0,c,t.value,e,n,r,o)}n.d(e,{A:()=>r})},61997:(t,e,n)=>{function r(t,e,n,r,o){for(var i,a=t.children,p=-1,c=a.length,l=t.value&&(r-e)/t.value;++p<c;)(i=a[p]).y0=n,i.y1=o,i.x0=e,i.x1=e+=i.value*l}n.d(e,{A:()=>r})},1696:(t,e,n)=>{function r(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}n.d(e,{A:()=>p});var o=n(54960);function i(){return 0}function a(t){return function(){return t}}function p(){var t=o.Ay,e=!1,n=1,p=1,c=[0],l=i,u=i,h=i,f=i,d=i;function s(t){return t.x0=t.y0=0,t.x1=n,t.y1=p,t.eachBefore(x),c=[0],e&&t.eachBefore(r),t}function x(e){var n=c[e.depth],r=e.x0+n,o=e.y0+n,i=e.x1-n,a=e.y1-n;i<r&&(r=i=(r+i)/2),a<o&&(o=a=(o+a)/2),e.x0=r,e.y0=o,e.x1=i,e.y1=a,e.children&&(n=c[e.depth+1]=l(e)/2,r+=d(e)-n,o+=u(e)-n,(i-=h(e)-n)<r&&(r=i=(r+i)/2),(a-=f(e)-n)<o&&(o=a=(o+a)/2),t(e,r,o,i,a))}return s.round=function(t){return arguments.length?(e=!!t,s):e},s.size=function(t){return arguments.length?(n=+t[0],p=+t[1],s):[n,p]},s.tile=function(e){return arguments.length?(t=function(t){if("function"!=typeof t)throw new Error;return t}(e),s):t},s.padding=function(t){return arguments.length?s.paddingInner(t).paddingOuter(t):s.paddingInner()},s.paddingInner=function(t){return arguments.length?(l="function"==typeof t?t:a(+t),s):l},s.paddingOuter=function(t){return arguments.length?s.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):s.paddingTop()},s.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:a(+t),s):u},s.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:a(+t),s):h},s.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:a(+t),s):f},s.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:a(+t),s):d},s}},46793:(t,e,n)=>{n.d(e,{A:()=>a});var r=n(61997),o=n(67766),i=n(54960);const a=function t(e){function n(t,n,a,p,c){if((l=t._squarify)&&l.ratio===e)for(var l,u,h,f,d,s=-1,x=l.length,g=t.value;++s<x;){for(h=(u=l[s]).children,f=u.value=0,d=h.length;f<d;++f)u.value+=h[f].value;u.dice?(0,r.A)(u,n,a,p,g?a+=(c-a)*u.value/g:c):(0,o.A)(u,n,a,g?n+=(p-n)*u.value/g:p,c),g-=u.value}else t._squarify=l=(0,i.AI)(e,t,n,a,p,c),l.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(i.U1)},67766:(t,e,n)=>{function r(t,e,n,r,o){for(var i,a=t.children,p=-1,c=a.length,l=t.value&&(o-n)/t.value;++p<c;)(i=a[p]).x0=e,i.x1=r,i.y0=n,i.y1=n+=i.value*l}n.d(e,{A:()=>r})},6849:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(61997),o=n(67766);function i(t,e,n,i,a){(1&t.depth?o.A:r.A)(t,e,n,i,a)}},54960:(t,e,n)=>{n.d(e,{AI:()=>a,Ay:()=>p,U1:()=>i});var r=n(61997),o=n(67766),i=(1+Math.sqrt(5))/2;function a(t,e,n,i,a,p){for(var c,l,u,h,f,d,s,x,g,v,b,y=[],m=e.children,w=0,k=0,A=m.length,R=e.value;w<A;){u=a-n,h=p-i;do{f=m[k++].value}while(!f&&k<A);for(d=s=f,b=f*f*(v=Math.max(h/u,u/h)/(R*t)),g=Math.max(s/b,b/d);k<A;++k){if(f+=l=m[k].value,l<d&&(d=l),l>s&&(s=l),b=f*f*v,(x=Math.max(s/b,b/d))>g){f-=l;break}g=x}y.push(c={value:f,dice:u<h,children:m.slice(w,k)}),c.dice?(0,r.A)(c,n,i,a,R?i+=h*f/R:p):(0,o.A)(c,n,i,R?n+=u*f/R:a,p),R-=f,w=k}return y}const p=function t(e){function n(t,n,r,o,i){a(e,t,n,r,o,i)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(i)}}]);
|
|
2
|
+
//# sourceMappingURL=859.472360b6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/859.472360b6.js","mappings":"8LAIA,MAAMA,EAAmB,IAAIC,IAcvBC,EAAiC,IAAKC,EAAAA,GAPZC,IAC9BA,EAAQC,SAASC,IAAU,IAAAC,EACzB,MAAM,OAAEC,GAAWF,EACS,QAA5BC,EAAAP,EAAiBS,IAAID,UAAO,IAAAD,GAA5BA,EAA8BF,SAASK,GAAaA,EAASJ,IAAO,GACpE,IAKSK,EAAUA,CAACC,EAAkB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AAU,CAAEJ,GAAYD,EAAW,KAAO,CACzDK,EAAWD,CACb,CAGAZ,EAAKpH,KAAKsH,EAAM,CAAChG,MAAOuG,EAAUL,KAAMvB,EAAKC,EAAI9E,SAAUY,EAAMuG,MAAMH,EAAIC,KACvEf,EAAIE,MAAM,OAAYF,EAAK1C,EAAIC,EAAIC,EAAIxD,EAAQuD,GAAMqB,EAAK2B,EAAWvG,EAAQyD,IAC5E,OAAauC,EAAK1C,EAAIC,EAAIvD,EAAQsD,GAAMqB,EAAK4B,EAAWvG,EAAQwD,EAAIC,GACzEzD,GAASuG,EAAUO,EAAKC,CAC1B,CAEA,OAAOjB,CACT,CAEA,QAAe,SAAUH,EAAOC,GAE9B,SAASlB,EAAS7D,EAAQyC,EAAIC,EAAIC,EAAIC,GACpC4C,EAAcT,EAAO/E,EAAQyC,EAAIC,EAAIC,EAAIC,EAC3C,CAMA,OAJAiB,EAASkB,MAAQ,SAASpB,GACxB,OAAOmB,GAAQnB,GAAKA,GAAK,EAAIA,EAAI,EACnC,EAEOE,CACR,CAXD,CAWGyB,E","sources":["webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/usePrevious/index.ts","webpack:///./src/modern-style-treemap/modern-style-treemap.shadow.css","webpack:///../../src/debounceByAnimationFrame.ts","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/count.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/index.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/each.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/find.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/sum.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/sort.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/path.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/descendants.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/leaves.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/links.js","webpack:///../../node_modules/d3-hierarchy/src/hierarchy/iterator.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/binary.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/dice.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/round.js","webpack:///../../node_modules/d3-hierarchy/src/constant.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/index.js","webpack:///../../node_modules/d3-hierarchy/src/accessors.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/resquarify.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/slice.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/sliceDice.js","webpack:///../../node_modules/d3-hierarchy/src/treemap/squarify.js"],"sourcesContent":["import ResizeObserver from \"resize-observer-polyfill\";\n\nexport type ResizeCallback = (entry: ResizeObserverEntry) => void;\n\nconst elementListeners = new Map<Element, Set<ResizeCallback>>();\n\nexport const elementListeners_only_for_test =\n process.env.NODE_ENV === \"test\"\n ? elementListeners\n : /* istanbul ignore next */ null;\n\nconst resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n const { target } = entry;\n elementListeners.get(target)?.forEach((callback) => callback(entry));\n });\n};\n\nconst resizeObserver: ResizeObserver = new (ResizeObserver as any)(resizeObserverCallback);\n\nexport const observe = (element: Element, callback: ResizeCallback): void => {\n if (!elementListeners.has(element)) {\n elementListeners.set(element, new Set());\n resizeObserver.observe(element);\n }\n\n elementListeners.get(element).add(callback);\n};\n\nexport const unobserve = (element: Element, callback: ResizeCallback): void => {\n if (elementListeners.has(element)) {\n elementListeners.get(element).delete(callback);\n\n if (elementListeners.get(element).size === 0) {\n resizeObserver.unobserve(element);\n elementListeners.delete(element);\n }\n }\n};\n","import {\n useState,\n useCallback,\n useRef,\n type RefObject,\n useEffect,\n} from \"react\";\nimport { observe, unobserve } from \"./resizeObserverUtil.js\";\n\ninterface ElementSize {\n clientWidth: number;\n clientHeight: number;\n}\n\nexport interface ResizeObserveProps<T extends Element = Element> {\n targetRef?: RefObject<T>;\n onResize?: (size: ResizeObserverEntry) => void;\n}\n\nexport function useResizeObserver<T extends Element = Element>(\n props?: ResizeObserveProps<T>\n): [RefObject<T>, ElementSize] {\n const {\n targetRef,\n onResize,\n } = props || {};\n\n const localRef = useRef<T>();\n const ref = targetRef ?? localRef;\n const [size, setSize] = useState<ElementSize>({ clientWidth: 0, clientHeight: 0 });\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const { target } = entry;\n const { clientWidth = 0, clientHeight = 0 } = target;\n\n setSize((prev) => {\n // skip if same size\n if (prev.clientWidth === clientWidth && prev.clientHeight === clientHeight) {\n return prev;\n }\n\n onResize?.(entry);\n\n return { clientWidth, clientHeight };\n });\n },\n [onResize]\n );\n\n useEffect(() => {\n if (\n typeof ref !== \"object\" ||\n ref === null ||\n !(ref.current instanceof Element)\n ) {\n throw new Error(\"ResizeObserver must observe an Element\");\n }\n\n const element = ref.current;\n observe(element, handleResize);\n\n return () => {\n unobserve(element, handleResize);\n };\n }, [handleResize, ref]);\n\n return [ref, { ...size }];\n}\n","import {useRef, useEffect} from 'react';\nexport function usePrevious<T>(data?: T):T|undefined{\n const ref = useRef<T>();\n useEffect(()=>{\n ref.current = data\n })\n return ref.current;\n}\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\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./dot.svg\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block;width:100%;height:100%}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.wrapper{position:relative;width:100%;height:100%}.treemap{position:relative;overflow:hidden;width:100%;height:100%;cursor:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) 10 10,pointer}.treemap-leaf{position:absolute;overflow:hidden;border-radius:var(--no-border-radius);background:var(--color-fill-bg-container-2) radial-gradient(farthest-corner,#0f1014ff 0%,#0f101400 100%);box-shadow:inset 5px 5px 8px 1px rgba(51,102,255,0.24)}.tooltip{display:inline-block;visibility:hidden;position:absolute;top:0;left:0;padding:8px 8px 8px 15px;font-size:var(--chart-tooltips-font-size-2);line-height:20px;font-weight:var(--font-weight-500);color:var(--color-normal-text);--treemap-tooltip-background:rgba(103,149,219,0.12) radial-gradient(100% 100% ellipse at 12px 4px,rgba(var(--palette-tech-blue-6-channel),0.3),rgba(var(--palette-tech-blue-6-channel),0));--treemap-backdrop-filter:blur(5px);z-index:0}.bottom.tooltip,\n.bottomRight.tooltip,\n.bottomLeft.tooltip{padding:8px 8px 15px 8px}.right.tooltip{padding:8px 15px 8px 8px}.top.tooltip,\n.topLeft.tooltip,\n.topRight.tooltip{padding:15px 8px 8px 8px}.tooltip::before,\n.tooltip::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;z-index:-1;background:var(--treemap-tooltip-background);-webkit-backdrop-filter:var(--treemap-backdrop-filter);backdrop-filter:var(--treemap-backdrop-filter)}.tooltip::before{-webkit-clip-path:inset(0 0 0 7px round var(--medius-border-radius));clip-path:inset(0 0 0 7px round var(--medius-border-radius))}.top.tooltip::before,\n.topLeft.tooltip::before,\n.topRight.tooltip::before{-webkit-clip-path:inset(7px 0 0 0 round var(--medius-border-radius));clip-path:inset(7px 0 0 0 round var(--medius-border-radius))}.bottom.tooltip::before,\n.bottomRight.tooltip::before,\n.bottomLeft.tooltip::before{-webkit-clip-path:inset(0 0 7px 0 round var(--medius-border-radius));clip-path:inset(0 0 7px 0 round var(--medius-border-radius))}.right.tooltip::before{-webkit-clip-path:inset(0 7px 0 0 round var(--medius-border-radius));clip-path:inset(0 7px 0 0 round var(--medius-border-radius))}.tooltip::after{-webkit-clip-path:polygon(0 50%,7px calc(50% - 7px),7px calc(50% + 7px));clip-path:polygon(0 50%,7px calc(50% - 7px),7px calc(50% + 7px))}.bottom.tooltip::after{-webkit-clip-path:polygon(calc(50% - 7px) calc(100% - 7px),50% 100%,calc(50% + 7px) calc(100% - 7px));clip-path:polygon(calc(50% - 7px) calc(100% - 7px),50% 100%,calc(50% + 7px) calc(100% - 7px))}.bottomLeft.tooltip::after{-webkit-clip-path:polygon(7px calc(100% - 7px),14px 100%,21px calc(100% - 7px));clip-path:polygon(7px calc(100% - 7px),14px 100%,21px calc(100% - 7px))}.bottomRight.tooltip::after{-webkit-clip-path:polygon(calc(100% - 7px) calc(100% - 7px),calc(100% - 14px) 100%,calc(100% - 21px) calc(100% - 7px));clip-path:polygon(calc(100% - 7px) calc(100% - 7px),calc(100% - 14px) 100%,calc(100% - 21px) calc(100% - 7px))}.top.tooltip::after{-webkit-clip-path:polygon(calc(50% - 7px) 7px,50% 0,calc(50% + 7px) 7px);clip-path:polygon(calc(50% - 7px) 7px,50% 0,calc(50% + 7px) 7px)}.topLeft.tooltip::after{-webkit-clip-path:polygon(7px 7px,14px 0,21px 7px);clip-path:polygon(7px 7px,14px 0,21px 7px)}.topRight.tooltip::after{-webkit-clip-path:polygon(calc(100% - 7px) 7px,calc(100% - 14px) 0,calc(100% - 21px) 7px);clip-path:polygon(calc(100% - 7px) 7px,calc(100% - 14px) 0,calc(100% - 21px) 7px)}.right.tooltip::after{-webkit-clip-path:polygon(calc(100% - 7px) calc(50% - 7px),100% 50%,calc(100% - 7px) calc(50% + 7px));clip-path:polygon(calc(100% - 7px) calc(50% - 7px),100% 50%,calc(100% - 7px) calc(50% + 7px))}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","export type SimpleFunction<P extends unknown[] = unknown[], R = unknown> = (\n ...args: P\n) => R;\n\n// The debounce function receives our function as a parameter\nexport function debounceByAnimationFrame<P extends unknown[]>(\n fn: SimpleFunction<P, void>\n): SimpleFunction<P, void> & { cancel: () => void } {\n // This holds the requestAnimationFrame reference, so we can cancel it if we wish\n let frame: number;\n\n const cancel = () => cancelAnimationFrame(frame);\n\n // The debounce function returns a new function that can receive a variable number of arguments\n const func = (...params: P) => {\n // If the frame variable has been defined, clear it now, and queue for next frame\n if (frame) {\n cancel();\n }\n\n // Queue our function call for the next frame\n frame = requestAnimationFrame(() => {\n // Call our function and pass any params we received\n fn(...params);\n });\n };\n\n func.cancel = cancel;\n\n return func;\n}\n","function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i, n = nodes.length,\n sum, sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = (value / 2) + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;\n else hi = mid;\n }\n\n if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if ((x1 - x0) > (y1 - y0)) {\n var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport {phi, squarifyRatio} from \"./squarify.js\";\n\nexport default (function custom(ratio) {\n\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\n\nexport default function(parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n"],"names":["elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","entry","_elementListeners$get","target","get","callback","observe","element","has","set","Set","add","unobserve","delete","size","useResizeObserver","props","targetRef","onResize","localRef","useRef","ref","setSize","useState","clientWidth","clientHeight","handleResize","useCallback","prev","useEffect","current","Element","Error","usePrevious","data","___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","push","module","id","toString","debounceByAnimationFrame","fn","frame","cancel","cancelAnimationFrame","func","_len","arguments","length","params","Array","_key","requestAnimationFrame","count","node","sum","children","i","value","hierarchy","undefined","mapChildren","objectChildren","child","childs","n","root","Node","nodes","pop","from","parent","depth","eachBefore","computeHeight","d","isArray","copyData","height","this","prototype","constructor","eachAfter","each","that","index","call","next","find","sort","compare","path","end","start","ancestor","a","b","aNodes","ancestors","bNodes","c","leastCommonAncestor","k","splice","descendants","leaves","links","source","copy","Symbol","iterator","reverse","x0","y0","x1","y1","sums","partition","j","valueOffset","valueTarget","hi","mid","valueLeft","valueRight","xk","yk","Math","round","constantZero","x","tile","squarify","dx","dy","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","treemap","positionNode","p","f","required","padding","paddingOuter","constant","custom","ratio","resquarify","rows","_squarify","row","m","dice","phi","sqrt","squarifyRatio","nodeValue","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","i0","i1","max","slice"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[1104],{98594:(e,t,a)=>{a.r(t),a.d(t,{BubblesIndicator:()=>V,BubblesIndicatorComponent:()=>Q});var n,r=a(70918),i=a(86121),o=a(70829),l=a(62740),s=a(18769),c=a.n(s),u=a(67391),p=a(11945),b=a(99418),m=a(85292),g=a(57931),h=a(43854),d=a(10300),x=a(24295),f=(a(44291),a(99126)),v=(a(95178),a(29837),a(35331));let A,y,w,k,S,E,N,M,D;const R=800,T=590,z=196,$=81,L=40,_=12,B=10,U=22,I=18,P=new Intl.NumberFormat("zh-CN",{useGrouping:!0}),C=(0,x.wrapBrick)("eo-tag"),{defineElement:F,property:W}=(0,d.createDecorators)();let V;var H=new WeakMap,Z=new WeakMap,j=new WeakMap,q=new WeakMap;class G extends x.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,H,y(this)),(0,r.A)(this,Z,(w(this),k(this))),(0,r.A)(this,j,(S(this),E(this))),(0,r.A)(this,q,(N(this),M(this))),D(this)}get dataSource(){return(0,o.A)(H,this)}set dataSource(e){(0,i.A)(H,this,e)}get centerDataSource(){return(0,o.A)(Z,this)}set centerDataSource(e){(0,i.A)(Z,this,e)}get cornerDataSource(){return(0,o.A)(j,this)}set cornerDataSource(e){(0,i.A)(j,this,e)}get maxScale(){return(0,o.A)(q,this)}set maxScale(e){(0,i.A)(q,this,e)}render(){return c().createElement(Q,{root:this,dataSource:this.dataSource,centerDataSource:this.centerDataSource,cornerDataSource:this.cornerDataSource,maxScale:this.maxScale})}}function Q(e){let{root:t,dataSource:a,centerDataSource:n,cornerDataSource:r,maxScale:i}=e;const[o,l]=(0,s.useState)(null);(0,s.useEffect)((()=>{const e=new f.A((e=>{for(const a of e)if(a.target===t){const{width:e,height:t}=a.contentRect;l(Math.min(null!=i?i:1,e/R,t/T))}}));return e.observe(t),()=>e.disconnect()}),[i,t]);const d=(0,s.useMemo)((()=>{var e;const t=null!==(e=null==a?void 0:a.map((e=>({...e,positiveNumberValue:Math.abs("number"==typeof e.value?e.value:parseFloat(e.value))}))))&&void 0!==e?e:[],r=t.map((e=>e.positiveNumberValue)),i=Math.max(...r),o=[n,...t].map(((e,t)=>0===t?{r:z,fx:0,fy:0}:{r:Math.max(L,Math.min($,Math.sqrt(e.positiveNumberValue/i)*$))})),l=Array.from({length:I-o.length},(e=>({isRandom:!0,r:Math.random()*(U-B)+B})));o.push(...l);const s=(0,u.A)(o).alphaTarget(.3).velocityDecay(.1).force("x",(0,p.A)().strength(.01)).force("y",(0,b.A)().strength(.0125)).force("center",(0,m.A)(0,0).strength(.5)).force("collide",(0,g.A)().radius((e=>e.r+_)).iterations(3)).force("charge",(0,h.A)().strength(-84));return s.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(s),o.slice(1).map(((e,t)=>({...e.isRandom?{isRandom:!0,label:"",value:""}:a[t],x:e.x,y:e.y,r:e.r})))}),[n,a]);return c().createElement(c().Fragment,null,c().createElement("div",{className:"bubbles-container",style:{visibility:null===o?"hidden":"visible","--scale":o}},c().createElement("div",{className:"bg"}),c().createElement("div",{className:"outer-ring"}),c().createElement("div",{className:"inner-ring"}),c().createElement("div",{className:"center"},c().createElement("div",{className:"center-label"},null==n?void 0:n.label),c().createElement("div",{className:"center-value"},J(null==n?void 0:n.value))),c().createElement("div",{className:"light"}),c().createElement("div",{className:"bubbles"},null==d?void 0:d.map(((e,t)=>c().createElement("div",{key:t,className:"bubble",style:{transform:`translate(${e.x}px, ${e.y}px)`,width:2*e.r,height:2*e.r,zIndex:e.isRandom?-1:0}},!e.isRandom&&c().createElement(c().Fragment,null,c().createElement("div",{className:"bubble-label"},e.label),c().createElement("div",{className:"bubble-value"},J(e.value)))))))),c().createElement("div",{className:"corner"},null==r?void 0:r.map(((e,t)=>c().createElement("div",{key:t,className:"corner-item"},c().createElement("div",{className:"corner-label"},e.label),c().createElement(C,{className:"corner-value",outline:!0,color:e.color,tagStyle:{fontSize:18,padding:"2px 16px"}},J(e.value)))))))}function J(e){return"number"==typeof e?P.format(e):e}n=G,({e:[y,w,k,S,E,N,M,D],c:[V,A]}=(0,l.A)(n,[F("data-view.bubbles-indicator",{styleTexts:[v.A]})],[[W({attribute:!1}),1,"dataSource"],[W({attribute:!1}),1,"centerDataSource"],[W({attribute:!1}),1,"cornerDataSource"],[W({type:Number}),1,"maxScale"]],0,void 0,x.ReactNextElement)),A()},97136:(e,t,a)=>{a.d(t,{A:()=>b});var n=a(36758),r=a.n(n),i=a(40935),o=a.n(i),l=a(20062),s=a.n(l),c=new URL(a(17577),a.b),u=o()(r()),p=s()(c);u.push([e.id,`@font-face{font-family:ALiBaBaPuHuiTi;src:url(${p})}`,""]);const b=u},59291:(e,t,a)=>{a.d(t,{A:()=>b});var n=a(36758),r=a.n(n),i=a(40935),o=a.n(i),l=a(20062),s=a.n(l),c=new URL(a(59552),a.b),u=o()(r()),p=s()(c);u.push([e.id,`@font-face{font-family:PangMenZhengDaoBiaoTiTi;src:url(${p})}`,""]);const b=u},35331:(e,t,a)=>{a.d(t,{A:()=>w});var n=a(36758),r=a.n(n),i=a(40935),o=a.n(i),l=a(20062),s=a.n(l),c=new URL(a(12356),a.b),u=new URL(a(22921),a.b),p=new URL(a(71570),a.b),b=new URL(a(64827),a.b),m=new URL(a(20681),a.b),g=new URL(a(84796),a.b),h=o()(r()),d=s()(c),x=s()(u),f=s()(p),v=s()(b),A=s()(m),y=s()(g);h.push([e.id,`:host,\n.center,\n.bubble{display:flex;align-items:center;justify-content:center}:host{position:relative;color:#fff;height:100%}:host([hidden]){display:none}*{box-sizing:border-box}.bubbles-container{width:800px;height:590px;position:relative;transform:scale(var(--scale));--scale:1}.bg,\n.outer-ring,\n.inner-ring,\n.center,\n.light,\n.bubbles,\n.bubble{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.bg,\n.outer-ring,\n.inner-ring,\n.center{background-repeat:no-repeat;background-position:center;background-size:100%}.bg{width:572px;height:572px;background-image:url(${d})}.outer-ring{width:529px;height:529px;background-image:url(${x});animation:rotating-outer-ring 2s ease-in infinite}.inner-ring{width:487px;height:487px;background-image:url(${f});animation:rotating-inner-ring 2s ease-in infinite}.center{flex-direction:column;width:292px;height:292px;background-image:url(${v});text-shadow:0px 2px 4px rgba(0,0,0,0.5)}.light{width:292px;height:292px;border-radius:292px;background:url(${A}) no-repeat;background-size:338px 478px;animation:moving-light 3s linear infinite}.bubbles{width:0;height:0}.bubble{flex-direction:column;border-radius:9999px;background-image:url(${y});background-size:100%}.bubble-label{font-size:16px;font-weight:500;line-height:22px;color:#c8e2ff}.bubble-value{font-family:ALiBaBaPuHuiTi;font-size:24px;line-height:33px;text-shadow:0px 4px 7px #514af7}.center-label{font-size:24px;line-height:33px;font-weight:600;margin-top:13px;text-shadow:0px 2px 4px rgba(0,0,0,0.5)}.center-value{font-family:PangMenZhengDaoBiaoTiTi;font-size:64px;line-height:73px}.corner{position:absolute;top:13px;left:31px;font-size:18px}.corner-item{display:flex;margin-bottom:15px}.corner-label{font-weight:500;line-height:25px}.corner-value{display:block;margin-left:19px}@keyframes rotating-outer-ring{0%{transform:translate(-50%,-50%) rotate(0deg)}100%{transform:translate(-50%,-50%) rotate(360deg)}}@keyframes rotating-inner-ring{0%{transform:translate(-50%,-50%) rotate(360deg)}100%{transform:translate(-50%,-50%) rotate(0deg)}}@keyframes moving-light{0%,\n 73.3333%{background-position:-122px -332px}100%{background-position:100px 100px}}`,""]);const w=h.toString()},20062:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},95178:(e,t,a)=>{var n=a(72591),r=a.n(n),i=a(1740),o=a.n(i),l=a(88128),s=a.n(l),c=a(30855),u=a.n(c),p=a(93051),b=a.n(p),m=a(73656),g=a.n(m),h=a(97136),d={};d.styleTagTransform=g(),d.setAttributes=u(),d.insert=s().bind(null,"head"),d.domAPI=o(),d.insertStyleElement=b(),r()(h.A,d),h.A&&h.A.locals&&h.A.locals},29837:(e,t,a)=>{var n=a(72591),r=a.n(n),i=a(1740),o=a.n(i),l=a(88128),s=a.n(l),c=a(30855),u=a.n(c),p=a(93051),b=a.n(p),m=a(73656),g=a.n(m),h=a(59291),d={};d.styleTagTransform=g(),d.setAttributes=u(),d.insert=s().bind(null,"head"),d.domAPI=o(),d.insertStyleElement=b(),r()(h.A,d),h.A&&h.A.locals&&h.A.locals},12356:(e,t,a)=>{e.exports=a.p+"images/b91eed9d.png"},64827:(e,t,a)=>{e.exports=a.p+"images/45a4740b.png"},71570:(e,t,a)=>{e.exports=a.p+"images/86a2105c.png"},20681:(e,t,a)=>{e.exports=a.p+"images/81f40f95.png"},84796:(e,t,a)=>{e.exports=a.p+"images/0fec7781.png"},22921:(e,t,a)=>{e.exports=a.p+"images/a457f803.png"},17577:(e,t,a)=>{e.exports=a.p+"media/792b07b2.ttf"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KAAKL,IAAQC,EAAQM,WACpC,IAAKC,OAAOR,EAAIS,QAAQ,KAAM,OAAOA,QAAQ,MAAO,OAAQ,KAE9DT,GAjBEA,CAkBX,C,wJCdIC,EAAU,CAAC,EAEfA,EAAQS,kBAAoB,IAC5BT,EAAQU,cAAgB,IACxBV,EAAQW,OAAS,SAAc,KAAM,QACrCX,EAAQY,OAAS,IACjBZ,EAAQa,mBAAqB,IAEhB,IAAI,IAASb,GAKJ,KAAW,IAAQc,QAAS,IAAQA,M,wJCbtDd,EAAU,CAAC,EAEfA,EAAQS,kBAAoB,IAC5BT,EAAQU,cAAgB,IACxBV,EAAQW,OAAS,SAAc,KAAM,QACrCX,EAAQY,OAAS,IACjBZ,EAAQa,mBAAqB,IAEhB,IAAI,IAASb,GAKJ,KAAW,IAAQc,QAAS,IAAQA,M","sources":["webpack:///./src/bubbles-indicator/index.tsx","webpack:///./src/fonts/ALiBaBaPuHuiTi.css","webpack:///./src/fonts/PangMenZhengDaoBiaoTiTi.css","webpack:///./src/bubbles-indicator/styles.shadow.css","webpack:///../../node_modules/css-loader/dist/runtime/getUrl.js","webpack:///./src/fonts/ALiBaBaPuHuiTi.css?7885","webpack:///./src/fonts/PangMenZhengDaoBiaoTiTi.css?e8bb"],"sourcesContent":["import React, { useEffect, useMemo, useState } from \"react\";\nimport {\n forceSimulation,\n forceCollide,\n forceManyBody,\n forceX,\n forceY,\n forceCenter,\n type Simulation,\n type SimulationNodeDatum,\n type SimulationLinkDatum,\n} from \"d3-force\";\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement, wrapBrick } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport ResizeObserver from \"resize-observer-polyfill\";\nimport type { Tag, TagProps } from \"@next-bricks/basic/tag\";\nimport \"../fonts/ALiBaBaPuHuiTi.css\";\nimport \"../fonts/PangMenZhengDaoBiaoTiTi.css\";\nimport styleText from \"./styles.shadow.css\";\n\nconst BASE_WIDTH = 800;\nconst BASE_HEIGHT = 590;\nconst CENTER_BUBBLE_RADIUS = 196;\nconst OTHER_BUBBLE_MAX_RADIUS = 81;\nconst OTHER_BUBBLE_MIN_RADIUS = 40;\nconst BUBBLE_PADDING = 12;\nconst RANDOM_BUBBLE_MIN_RADIUS = 10;\nconst RANDOM_BUBBLE_MAX_RADIUS = 22;\nconst TOTAL_BUBBLE_COUNT = 18;\n\nconst numberFormatter = new Intl.NumberFormat(\"zh-CN\", {\n useGrouping: true,\n});\n\nconst WrappedTag = wrapBrick<Tag, TagProps>(\"eo-tag\");\n\nconst { defineElement, property } = createDecorators();\n\nexport interface BubblesIndicatorProps {\n dataSource?: DataItem[];\n centerDataSource?: DataItem;\n cornerDataSource?: CornerDataItem[];\n maxScale?: number;\n}\n\nexport interface DataItem {\n label: string;\n value: string | number;\n}\n\nexport interface CornerDataItem extends DataItem {\n color?: string;\n}\n\ninterface DataItemWithPosition extends DataItem {\n x: number;\n y: number;\n r: number;\n isRandom?: boolean;\n}\n\ninterface ForceNode extends SimulationNodeDatum {\n r: number;\n isRandom?: boolean;\n}\n\ninterface NumberedDataItem extends DataItem {\n positiveNumberValue: number;\n}\n\n/**\n * 气泡样式的数据展示构件。\n */\nexport\n@defineElement(\"data-view.bubbles-indicator\", {\n styleTexts: [styleText],\n})\nclass BubblesIndicator\n extends ReactNextElement\n implements BubblesIndicatorProps\n{\n /** 指标数据列表(显示在环上)\n *\n * 注意:最多显示12项数据\n */\n @property({ attribute: false })\n accessor dataSource: DataItem[] | undefined;\n\n /** 中心数据(显示在中心水晶球内) */\n @property({ attribute: false })\n accessor centerDataSource: DataItem | undefined;\n\n /**\n * 左上角指标数据列表\n */\n @property({ attribute: false })\n accessor cornerDataSource: CornerDataItem[] | undefined;\n\n /**\n * 最大缩放比例\n *\n * @default 1\n */\n @property({ type: Number })\n accessor maxScale: number | undefined;\n\n render() {\n return (\n <BubblesIndicatorComponent\n root={this}\n dataSource={this.dataSource}\n centerDataSource={this.centerDataSource}\n cornerDataSource={this.cornerDataSource}\n maxScale={this.maxScale}\n />\n );\n }\n}\n\nexport interface BubblesIndicatorComponentProps extends BubblesIndicatorProps {\n root: BubblesIndicator;\n}\n\nexport function BubblesIndicatorComponent({\n root,\n dataSource,\n centerDataSource,\n cornerDataSource,\n maxScale,\n}: BubblesIndicatorComponentProps) {\n const [scale, setScale] = useState<number | null>(null);\n\n useEffect(() => {\n // 当容器宽高低于预设值时,图形会自动缩小\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.target === root) {\n const { width, height } = entry.contentRect;\n // 宽度大于高度,因为有水平方向排列的标签文字\n setScale(\n Math.min(maxScale ?? 1, width / BASE_WIDTH, height / BASE_HEIGHT)\n );\n }\n }\n });\n observer.observe(root);\n return () => observer.disconnect();\n }, [maxScale, root]);\n\n // 使用 d3 力学布局计算气泡位置,将普通数据排列在中心数据周围,并填充一些小的气泡\n const labels = useMemo(() => {\n const numberedDataSource: NumberedDataItem[] =\n dataSource?.map((item) => ({\n ...item,\n positiveNumberValue: Math.abs(\n typeof item.value === \"number\" ? item.value : parseFloat(item.value)\n ),\n })) ?? [];\n const positiveNumberValues = numberedDataSource.map(\n (item) => item.positiveNumberValue\n );\n const maxPositiveNumberValue = Math.max(...positiveNumberValues);\n\n const nodes = [centerDataSource, ...numberedDataSource].map<ForceNode>(\n (item, index) =>\n index === 0\n ? {\n r: CENTER_BUBBLE_RADIUS,\n fx: 0,\n fy: 0,\n }\n : {\n r: Math.max(\n OTHER_BUBBLE_MIN_RADIUS,\n Math.min(\n OTHER_BUBBLE_MAX_RADIUS,\n Math.sqrt(\n (item as NumberedDataItem).positiveNumberValue /\n maxPositiveNumberValue\n ) * OTHER_BUBBLE_MAX_RADIUS\n )\n ),\n }\n );\n\n const randomNodes = Array.from<unknown, ForceNode>(\n { length: TOTAL_BUBBLE_COUNT - nodes.length },\n (_v) => ({\n isRandom: true,\n r:\n Math.random() *\n (RANDOM_BUBBLE_MAX_RADIUS - RANDOM_BUBBLE_MIN_RADIUS) +\n RANDOM_BUBBLE_MIN_RADIUS,\n })\n );\n\n nodes.push(...randomNodes);\n\n const simulation = forceSimulation(nodes)\n .alphaTarget(0.3) // stay hot\n .velocityDecay(0.1) // low friction\n .force(\"x\", forceX().strength(0.01))\n .force(\"y\", forceY().strength(0.0125))\n .force(\"center\", forceCenter(0, 0).strength(0.5))\n .force(\n \"collide\",\n forceCollide<ForceNode>()\n .radius((d) => d.r + BUBBLE_PADDING)\n .iterations(3)\n )\n .force(\n \"charge\",\n forceManyBody()\n //.strength((_d, i) => (/* i ? 0 : */ (-BASE_WIDTH * 1) / 3))\n .strength(-84)\n );\n\n simulation.stop();\n manuallyTickToTheEnd(simulation);\n\n return nodes.slice(1).map<DataItemWithPosition>((node, index) => ({\n ...(node.isRandom\n ? { isRandom: true, label: \"\", value: \"\" }\n : dataSource[index]),\n x: node.x!,\n y: node.y!,\n r: node.r,\n }));\n }, [centerDataSource, dataSource]);\n\n return (\n <>\n <div\n className=\"bubbles-container\"\n style={\n {\n visibility: scale === null ? \"hidden\" : \"visible\",\n \"--scale\": scale,\n } as React.CSSProperties & {\n \"--scale\": number;\n }\n }\n >\n <div className=\"bg\"></div>\n <div className=\"outer-ring\"></div>\n <div className=\"inner-ring\"></div>\n <div className=\"center\">\n <div className=\"center-label\">{centerDataSource?.label}</div>\n <div className=\"center-value\">\n {formatValue(centerDataSource?.value)}\n </div>\n </div>\n <div className=\"light\"></div>\n <div className=\"bubbles\">\n {labels?.map((item, index) => (\n <div\n key={index}\n className=\"bubble\"\n style={{\n transform: `translate(${item.x}px, ${item.y}px)`,\n width: item.r * 2,\n height: item.r * 2,\n // Put extra random bubbles to the back layer.\n zIndex: item.isRandom ? -1 : 0,\n }}\n >\n {!item.isRandom && (\n <>\n <div className=\"bubble-label\">{item.label}</div>\n <div className=\"bubble-value\">{formatValue(item.value)}</div>\n </>\n )}\n </div>\n ))}\n </div>\n </div>\n <div className=\"corner\">\n {cornerDataSource?.map((item, index) => (\n <div key={index} className=\"corner-item\">\n <div className=\"corner-label\">{item.label}</div>\n <WrappedTag\n className=\"corner-value\"\n outline\n color={item.color}\n tagStyle={{\n fontSize: 18,\n padding: \"2px 16px\",\n }}\n >\n {formatValue(item.value)}\n </WrappedTag>\n </div>\n ))}\n </div>\n </>\n );\n}\n\nfunction formatValue(value: string | number): string {\n return typeof value === \"number\" ? numberFormatter.format(value) : value;\n}\n\nfunction manuallyTickToTheEnd(\n simulation: Simulation<ForceNode, SimulationLinkDatum<ForceNode>>\n): void {\n // Manually tick to the end.\n simulation.tick(\n Math.ceil(\n Math.log(simulation.alphaMin()) / Math.log(1 - simulation.alphaDecay())\n )\n );\n}\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\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./ALiBaBaPuHuiTi.ttf\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@font-face{font-family:ALiBaBaPuHuiTi;src:url(${___CSS_LOADER_URL_REPLACEMENT_0___})}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./PangMenZhengDaoBiaoTiTi-3.0.ttf\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@font-face{font-family:PangMenZhengDaoBiaoTiTi;src:url(${___CSS_LOADER_URL_REPLACEMENT_0___})}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./assets/bg.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"./assets/outer-ring.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"./assets/inner-ring.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_3___ = new URL(\"./assets/center-bubble.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_4___ = new URL(\"./assets/light.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_5___ = new URL(\"./assets/other-bubble.png\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\nvar ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);\nvar ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___);\nvar ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host,\n.center,\n.bubble{display:flex;align-items:center;justify-content:center}:host{position:relative;color:#fff;height:100%}:host([hidden]){display:none}*{box-sizing:border-box}.bubbles-container{width:800px;height:590px;position:relative;transform:scale(var(--scale));--scale:1}.bg,\n.outer-ring,\n.inner-ring,\n.center,\n.light,\n.bubbles,\n.bubble{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.bg,\n.outer-ring,\n.inner-ring,\n.center{background-repeat:no-repeat;background-position:center;background-size:100%}.bg{width:572px;height:572px;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_0___})}.outer-ring{width:529px;height:529px;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_1___});animation:rotating-outer-ring 2s ease-in infinite}.inner-ring{width:487px;height:487px;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_2___});animation:rotating-inner-ring 2s ease-in infinite}.center{flex-direction:column;width:292px;height:292px;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_3___});text-shadow:0px 2px 4px rgba(0,0,0,0.5)}.light{width:292px;height:292px;border-radius:292px;background:url(${___CSS_LOADER_URL_REPLACEMENT_4___}) no-repeat;background-size:338px 478px;animation:moving-light 3s linear infinite}.bubbles{width:0;height:0}.bubble{flex-direction:column;border-radius:9999px;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_5___});background-size:100%}.bubble-label{font-size:16px;font-weight:500;line-height:22px;color:#c8e2ff}.bubble-value{font-family:ALiBaBaPuHuiTi;font-size:24px;line-height:33px;text-shadow:0px 4px 7px #514af7}.center-label{font-size:24px;line-height:33px;font-weight:600;margin-top:13px;text-shadow:0px 2px 4px rgba(0,0,0,0.5)}.center-value{font-family:PangMenZhengDaoBiaoTiTi;font-size:64px;line-height:73px}.corner{position:absolute;top:13px;left:31px;font-size:18px}.corner-item{display:flex;margin-bottom:15px}.corner-label{font-weight:500;line-height:25px}.corner-value{display:block;margin-left:19px}@keyframes rotating-outer-ring{0%{transform:translate(-50%,-50%) rotate(0deg)}100%{transform:translate(-50%,-50%) rotate(360deg)}}@keyframes rotating-inner-ring{0%{transform:translate(-50%,-50%) rotate(360deg)}100%{transform:translate(-50%,-50%) rotate(0deg)}}@keyframes moving-light{0%,\n 73.3333%{background-position:-122px -332px}100%{background-position:100px 100px}}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","\"use strict\";\n\nmodule.exports = function (url, options) {\n if (!options) {\n options = {};\n }\n if (!url) {\n return url;\n }\n url = String(url.__esModule ? url.default : url);\n\n // If url is already wrapped in quotes, remove them\n if (/^['\"].*['\"]$/.test(url)) {\n url = url.slice(1, -1);\n }\n if (options.hash) {\n url += options.hash;\n }\n\n // Should url be wrapped?\n // See https://drafts.csswg.org/css-values-3/#urls\n if (/[\"'() \\t\\n]|(%20)/.test(url) || options.needQuotes) {\n return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, \"\\\\n\"), \"\\\"\");\n }\n return url;\n};","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./ALiBaBaPuHuiTi.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./ALiBaBaPuHuiTi.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./PangMenZhengDaoBiaoTiTi.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./PangMenZhengDaoBiaoTiTi.css\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":["BASE_WIDTH","BASE_HEIGHT","CENTER_BUBBLE_RADIUS","OTHER_BUBBLE_MAX_RADIUS","OTHER_BUBBLE_MIN_RADIUS","BUBBLE_PADDING","RANDOM_BUBBLE_MIN_RADIUS","RANDOM_BUBBLE_MAX_RADIUS","TOTAL_BUBBLE_COUNT","numberFormatter","Intl","NumberFormat","useGrouping","WrappedTag","wrapBrick","defineElement","property","createDecorators","_BubblesIndicator","_A","WeakMap","_B","_C","_D","BubblesIndicator","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","_init_dataSource","_init_extra_dataSource","_init_centerDataSource","_init_extra_centerDataSource","_init_cornerDataSource","_init_extra_cornerDataSource","_init_maxScale","_init_extra_maxScale","dataSource","_classPrivateFieldGet","v","_classPrivateFieldSet","centerDataSource","cornerDataSource","maxScale","render","React","BubblesIndicatorComponent","root","this","_ref","scale","setScale","useState","useEffect","observer","ResizeObserver","entries","entry","target","width","height","contentRect","Math","min","observe","disconnect","labels","useMemo","_dataSource$map","numberedDataSource","map","item","positiveNumberValue","abs","value","parseFloat","positiveNumberValues","maxPositiveNumberValue","max","nodes","index","r","fx","fy","sqrt","randomNodes","Array","from","length","_v","isRandom","random","push","simulation","forceSimulation","alphaTarget","velocityDecay","force","forceX","strength","forceY","forceCenter","forceCollide","radius","d","iterations","forceManyBody","stop","tick","ceil","log","alphaMin","alphaDecay","manuallyTickToTheEnd","slice","node","label","x","y","className","style","visibility","formatValue","key","transform","zIndex","outline","color","tagStyle","fontSize","padding","format","_BubblesIndicator2","e","c","_initClass","_applyDecs","styleTexts","styleText","attribute","type","Number","___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","module","id","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_URL_IMPORT_2___","___CSS_LOADER_URL_IMPORT_3___","___CSS_LOADER_URL_IMPORT_4___","___CSS_LOADER_URL_IMPORT_5___","___CSS_LOADER_URL_REPLACEMENT_1___","___CSS_LOADER_URL_REPLACEMENT_2___","___CSS_LOADER_URL_REPLACEMENT_3___","___CSS_LOADER_URL_REPLACEMENT_4___","___CSS_LOADER_URL_REPLACEMENT_5___","toString","exports","url","options","String","__esModule","default","test","hash","needQuotes","concat","replace","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see cabinet-container.bc8cb288.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[4219],{8540:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CabinetContainer:()=>X,CabinetContainerComponent:()=>U});var a,i=r(24586),n=r(74635),o=r(70918),l=r(26902),s=r(5536),c=r(86121),p=r(70829),h=r(62740),b=r(18769),g=r.n(b),d=r(24295),u=r(10300),f=r(79935),v=r(21053),x=r(53373),w=r.n(x),m=r(6837);let k,y,C,A,W,z,M,E,T,N,S,R,D,_,H,j,O;const{defineElement:P,property:L,event:$}=(0,u.createDecorators)(),B=(0,d.wrapBrick)("data-view.cabinet-node");let X;var Z=new WeakMap,q=new WeakMap,F=new WeakMap,G=new WeakMap,I=new WeakMap,J=new WeakSet,K=new WeakMap;class Q extends d.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,J),(0,o.A)(this,Z,y(this,"host")),(0,o.A)(this,q,(C(this),A(this,[]))),(0,o.A)(this,F,(W(this),z(this))),(0,o.A)(this,G,(M(this),E(this))),(0,o.A)(this,I,(T(this),N(this))),(0,o.A)(this,K,(D(this),_(this))),(0,i.A)(this,"handleClick",(O(this),e=>{(0,s.A)(J,this,S).emit(e)})),(0,i.A)(this,"handleDbClick",(e=>{(0,s.A)(J,this,H).emit(e)}))}get type(){return(0,p.A)(Z,this)}set type(e){(0,c.A)(Z,this,e)}get data(){return(0,p.A)(q,this)}set data(e){(0,c.A)(q,this,e)}get status(){return(0,p.A)(F,this)}set status(e){(0,c.A)(F,this,e)}get customTitle(){return(0,p.A)(G,this)}set customTitle(e){(0,c.A)(G,this,e)}render(){return g().createElement(U,{type:this.type,data:this.data,status:this.status,customTitle:this.customTitle,handleClick:this.handleClick,handleDbClick:this.handleDbClick})}}function U(e){const{type:t,data:r,status:a,customTitle:i,handleClick:n,handleDbClick:o}=e,l=(0,b.useRef)(!1),s=(0,b.useRef)(),[c,{clientWidth:p,clientHeight:h}]=(0,m.w)(),d=(0,b.useCallback)(((e,t,a,i)=>{const n=Math.max(i,a),o=Math.min(i,a),l=Math.min(t,e),s=Math.max(t,e),c=Math.ceil((e+t)/2),p=Math.ceil((a+i)/2),h=Math.ceil(r.length/c);return c<=1?{col:1,row:r.length}:h===p||l===s||l===c||s===c?{col:c,row:h}:h>p?d(c,s,h,o):h<p?d(l,c,n,h):void 0}),[r.length]),u=(0,b.useMemo)((()=>{if(!r.length)return;const e=p-27,t=h-84;if(e<=0||t<=0)return;const a=Math.floor(e/118),i=Math.floor(t/105),n=Math.floor(e/56),o=Math.floor(t/63),l=a*i,s=n*o,c=r.length;if(c<=l)return{width:Math.floor(e/a),itemWidth:118};if(c>=s)return{width:Math.floor(e/n),itemWidth:56};{const{col:t}=d(a,n,i,o);return{width:Math.floor(e/t),itemWidth:Math.max(e/t-10,56)}}}),[r.length,p,h,d]),f=(e,t,r)=>{e.stopPropagation(),window.clearTimeout(s.current),l.current=!1,s.current=window.setTimeout((function(){l.current||null==n||n({data:t,type:r})}),200)},v=(e,t,r)=>{window.clearTimeout(s.current),l.current=!0,e.stopPropagation(),null==o||o({data:t,type:r})};return g().createElement("div",{className:w()("wrapper",{hostWrapper:"host"===t||"k8s-blue"===t,k8sWrapper:"k8s"===t},a&&`wrapper-${a}`),ref:c,onClick:e=>f(e,void 0,"container"),onDoubleClick:e=>v(e,void 0,"container")},g().createElement("div",{className:w()("container",{hostContainer:"host"===t||"k8s-blue"===t,k8sContainer:"k8s"===t},a&&`container-${a}`)},g().createElement("div",{className:"content"},g().createElement("div",{className:"contentLayout"},r.map(((e,t)=>g().createElement("div",{key:t,className:"itemContent",style:{width:null==u?void 0:u.width}},g().createElement("div",{className:"item",style:{width:null==u?void 0:u.itemWidth},onClick:t=>f(t,e,"node"),onDoubleClick:t=>v(t,e,"node")},g().createElement(B,{type:e.type,nodeTitle:e.nodeTitle,status:e.status,isAlert:e.isAlert}))))))),i&&g().createElement("div",{className:"footer"},g().createElement("div",{className:"footerTitle"},i))))}a=Q,({e:[y,C,A,W,z,M,E,T,N,S,R,D,_,H,j,O],c:[X,k]}=(0,h.A)(a,[P("data-view.cabinet-container",{styleTexts:[f.A,v.A]})],[[L({attribute:!1}),1,"type"],[L({attribute:!1}),1,"data"],[L(),1,"status"],[L(),1,"customTitle"],[$({type:"container.click"}),1,"onHandleClick",e=>(0,p.A)(I,e),(e,t)=>(0,c.A)(I,e,t)],[$({type:"container.dbclick"}),1,"onHandleDbClick",e=>(0,p.A)(K,e),(e,t)=>(0,c.A)(K,e,t)]],0,(e=>J.has((0,l.A)(e))),d.ReactNextElement)),k()},6837:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p,w:()=>c});var a=r(18769),i=r(99126);const n=new Map,o=new i.A((e=>{e.forEach((e=>{var t;const{target:r}=e;null===(t=n.get(r))||void 0===t||t.forEach((t=>t(e)))}))})),l=(e,t)=>{n.has(e)||(n.set(e,new Set),o.observe(e)),n.get(e).add(t)},s=(e,t)=>{n.has(e)&&(n.get(e).delete(t),0===n.get(e).size&&(o.unobserve(e),n.delete(e)))};function c(e){const{targetRef:t,onResize:r}=e||{},i=(0,a.useRef)(),n=null!=t?t:i,[o,c]=(0,a.useState)({clientWidth:0,clientHeight:0}),p=(0,a.useCallback)((e=>{const{target:t}=e,{clientWidth:a=0,clientHeight:i=0}=t;c((t=>t.clientWidth===a&&t.clientHeight===i?t:(null==r||r(e),{clientWidth:a,clientHeight:i})))}),[r]);return(0,a.useEffect)((()=>{if("object"!=typeof n||null===n||!(n.current instanceof Element))throw new Error("ResizeObserver must observe an Element");const e=n.current;return l(e,p),()=>{s(e,p)}}),[p,n]),[n,{...o}]}function p(e){const t=(0,a.useRef)();return(0,a.useEffect)((()=>{t.current=e})),t.current}},21053:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(36758),i=r.n(a),n=r(40935),o=r.n(n)()(i());o.push([e.id,'*,\n*:after,\n*:before{box-sizing:border-box}.wrapper{width:100%;height:100%;position:relative}.container{width:100%;height:100%;border:3px solid;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;flex-direction:column;cursor:pointer;overflow:hidden}.wrapper:after,\n.wrapper:before{content:"";position:absolute;left:50%;border:3px solid;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);transform:translateX(-50%)}.wrapper:before{width:calc(100% - 10px);height:100%;bottom:-14px;z-index:-1;opacity:0.6}.wrapper:after{width:calc(100% - 30px);height:100%;bottom:-24px;z-index:-10;opacity:0.4}.hostWrapper:before,\n.hostWrapper:after{border-image:radial-gradient(circle,rgba(55,229,252,1),#007aca) 3 3}.hostWrapper:not(:has(.item:hover)):hover:before,\n.hostWrapper.wrapper-active:before{border-image:radial-gradient(circle,rgba(55,229,252,1),#45e4ff) 3 3}.k8sWrapper:after,\n.k8sWrapper:before{border-image:radial-gradient(circle,rgba(255,102,51,1),#ff663380) 3 3}.hostContainer{background:rgba(7,4,21,0.85);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);border-image:radial-gradient(circle,rgba(55,229,252,1),#007aca) 3 3}.hostContainer:not(:has(.item:hover)):hover,\n.hostContainer.container-active{border-image:radial-gradient(circle,rgba(55,229,252,1),#45e4ff) 3 3;box-shadow:inset 0 0 30px 0 #45e4ff,inset 0 0 20px 0 #45e4ff}.hostWrapper.wrapper-faded:after,\n.hostWrapper.wrapper-faded:before,\n.k8sWrapper.wrapper-faded:after,\n.k8sWrapper.wrapper-faded:before{opacity:0.1}.k8sContainer{background:rgba(7,4,21,0.8);border-image:radial-gradient(circle,rgba(255,102,51,1),#ff663399) 3 3}.k8sContainer:not(:has(.item:hover)):hover,\n.k8sContainer.container-active{box-shadow:inset 0 0 30px 0 #ff6633,inset 0 0 20px 0 #ff6633}.hostContainer.container-faded,\n.k8sContainer.container-faded{opacity:0.4}.content{flex:1;padding:20px 10px;width:100%;box-sizing:border-box;overflow:hidden;display:flex}.contentLayout{overflow:auto;height:100%}.itemContent{display:inline-block;vertical-align:middle}.item{min-width:56px;min-height:63px;max-width:118px;margin:auto}.footer{width:100%;height:57px;text-align:center;line-height:57px;font-size:var(--auxiliary-font-size);font-weight:var(--font-weight-400);color:var(--color-normal-text);position:relative;display:flex}.footerTitle{flex:1;width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.footer:after{content:"";width:100%;height:100%;position:absolute;left:0;top:0;z-index:-1}.hostContainer > .footer:after{background:linear-gradient(180deg,rgba(26,103,157,0.2) 0%,#1b69a0 100%)}.k8sContainer > .footer:after{background:linear-gradient(180deg,rgba(255,102,51,0.1) 0%,rgba(255,102,51,0.55) 100%)}.hostContainer:not(:has(.item:hover)):hover > .footer:after,\n.hostContainer.container-active > .footer:after,\n.k8sContainer:not(:has(.item:hover)):hover > .footer:after,\n.k8sContainer.container-active > .footer:after{opacity:0.65}',""]);const l=o.toString()},79935:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(36758),i=r.n(a),n=r(40935),o=r.n(n)()(i());o.push([e.id,":host{--palette-rgba-white-1:rgba(255,255,255,10%);--palette-rgba-white-2:rgba(255,255,255,20%);--palette-rgba-white-3:rgba(255,255,255,30%);--palette-rgba-white-4:rgba(255,255,255,40%);--palette-rgba-white-5:rgba(255,255,255,50%);--palette-rgba-white-6:rgba(255,255,255,60%);--palette-rgba-white-7:rgba(255,255,255,70%);--palette-rgba-white-8:rgba(255,255,255,80%);--palette-rgba-white-9:rgba(255,255,255,90%);--palette-rgba-white-10:rgba(255,255,255,100%);--palette-rgba-gray-1:rgba(0,0,0,10%);--palette-rgba-gray-2:rgba(0,0,0,20%);--palette-rgba-gray-3:rgba(0,0,0,30%);--palette-rgba-gray-4:rgba(0,0,0,40%);--palette-rgba-gray-5:rgba(0,0,0,50%);--palette-rgba-gray-6:rgba(0,0,0,60%);--palette-rgba-gray-7:rgba(0,0,0,70%);--palette-rgba-gray-8:rgba(0,0,0,80%);--palette-rgba-gray-9:rgba(0,0,0,90%);--palette-rgba-gray-10:rgba(0,0,0,100%);--palette-rgba-blue-gray-2:rgba(101,106,134,20%);--palette-rgba-blue-gray-3:rgba(101,106,134,30%);--palette-rgba-blue-gray-8:rgba(101,106,134,80%);--palette-tech-blue-4-channel:67,127,255;--palette-tech-blue-4:rgb(var(--palette-tech-blue-4-channel));--palette-tech-blue-6-channel:51,102,255;--palette-tech-blue-6:rgb(var(--palette-tech-blue-6-channel));--palette-tech-blue-8-channel:40,69,159;--palette-tech-blue-8:rgb(var(--palette-tech-blue-8-channel));--palette-sea-green-4-channel:131,245,225;--palette-sea-green-4:rgb(var(--palette-sea-green-4-channel));--palette-green-6-channel:81,235,73;--palette-green-6:rgb(var(--palette-green-6-channel));--palette-green-2:rgba(var(--palette-green-6-channel),20%);--palette-lotus-pink-7-channel:204,0,102;--palette-lotus-pink-7:rgb(var(--palette-lotus-pink-7-channel));--palette-red-6-channel:242,39,39;--palette-red-6:rgb(var(--palette-red-6-channel));--palette-red-2:rgba(var(--palette-red-6-channel),20%);--color-fill-global-bg:#0f1014;--color-fill-bg-container-1:var(--palette-rgba-white-1);--color-fill-bg-container-2:var(--palette-rgba-blue-gray-2);--color-fill-bg-container-3:var(--palette-rgba-blue-gray-8);--color-fill-bg-base-1:var(--palette-rgba-blue-gray-2);--color-fill-bg-base-2:rgba(15,16,20,0%);--color-fill-bg-base-3:rgba(0,0,0,20%);--color-fill-bg-base-4:rgba(40,46,58,100%);--color-fill-bg-base-5:rgba(19,25,47,80%);--color-fill-bg-base-6:var(--palette-rgba-blue-gray-3);--color-brand:var(--palette-tech-blue-6);--color-brand-hover:var(--palette-tech-blue-4);--color-brand-active:var(--palette-tech-blue-8);--color-contrast-1:var(--palette-sea-green-4);--color-error:var(--palette-red-6);--color-error-bg:var(--palette-red-2);--color-success:var(--palette-green-6);--color-success-bg:var(--palette-green-2);--color-header-text-big:var(--palette-rgba-white-10);--color-header-text:var(--palette-rgba-white-10);--color-normal-text:var(--palette-rgba-white-10);--color-strong-text:var(--palette-rgba-white-9);--color-auxiliary-text:var(--palette-rgba-white-8);--color-secondary-text:var(--palette-rgba-white-6);--color-disabled-text:var(--palette-rgba-white-4);--color-border-divider-line:var(--palette-rgba-white-1);--color-text-divider-line-1:var(--palette-rgba-white-2);--color-text-divider-line-2:var(--palette-rgba-white-2);--small-border-radius:2px;--medius-border-radius:5px;--larger-border-radius:12px;--container-border-radius:9999px;--no-border-radius:0px;--mask-bg:var(--palette-rgba-gray-7);--title-font-size-larger:30px;--title-font-size-strong:22px;--title-font-size:18px;--normal-font-size:14px;--auxiliary-font-size:16px;--auxiliary-font-size-small:12px;--overview-data-font-size:34px;--statistics-data-font-size:28px;--normal-data-font-size-larger:20px;--normal-data-font-size:16px;--chart-legend-font-size:12px;--chart-tooltips-font-size-1:12px;--chart-tooltips-font-size-2:12px;--chart-axis-x-font-size:12px;--chart-axis-x-font-size-larger:14px;--chart-axis-y-font-size:12px;--chart-axis-y-font-size-larger:14px;--font-weight-600:600;--font-weight-500:500;--font-weight-400:400;--text-shadow:0px 1px 4px #2863ee;--border-width-base:1px;--border-width-double-base:2px;--border-width-tribble-base:3px;--punctate-width-base:1px;--paragraph-width-base:1px;--button-text-color:#40d0db}",""]);const l=o.toString()},53373:(e,t)=>{var r;!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=o(e,n(r)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)a.call(e,r)&&e[r]&&(t=o(t,r));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},5536:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(12559);function i(e,t,r){return r((0,a.A)(e,t))}},74635:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(72016);function i(e,t){(0,a.A)(e,t),t.add(e)}},24586:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(11369);function i(e,t,r){return(t=(0,a.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}}]);
|
|
3
|
+
//# sourceMappingURL=cabinet-container.bc8cb288.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/cabinet-container.bc8cb288.js","mappings":";obASA,MAAM,cAAEA,EAAa,SAAEC,EAAQ,MAAEC,IAAUC,EAAAA,EAAAA,oBAErCC,GAAcC,EAAAA,EAAAA,WAClB,0BACA,IAAAC,EAAA,IAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAC,QAAAC,EAAA,IAAAP,QAmBF,MAAAQ,UAIUC,EAAAA,iBAEVC,WAAAA,GAAA,SAAAC,YAAAC,EAAAA,EAAAA,GAAA,KAAAP,IACEQ,EAAAA,EAAAA,GAAA,KAAAd,EAAAe,EAAA,KAO+B,UAE/BD,EAAAA,EAAAA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B,OAEpB,YAIH,CArEA,gECNe,SAAShE,EAAoBmJ,EAAGC,EAAGC,GAChD,OAAOA,GAAE,OAAiBF,EAAGC,GAC/B,gECFe,SAASpK,EAA4BsK,EAAKC,IACvD,OAA0BD,EAAKC,GAC/BA,EAAW1C,IAAIyC,EACjB,gECHe,SAASzJ,EAAgByJ,EAAK1E,EAAKmE,GAYhD,OAXAnE,GAAM,OAAcA,MACT0E,EACTX,OAAOa,eAAeF,EAAK1E,EAAK,CAC9BmE,MAAOA,EACPU,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZL,EAAI1E,GAAOmE,EAENO,CACT","sources":["webpack:///./src/cabinet/cabinet-container/index.tsx","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/usePrevious/index.ts","webpack:///./src/cabinet/cabinet-container/cabinet-container.shadow.css","webpack:///./src/data-view-variables.shadow.css","webpack:///../../node_modules/classnames/index.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"],"sourcesContent":["import React, { useCallback, useMemo, useRef } from \"react\";\nimport { ReactNextElement, wrapBrick } from \"@next-core/react-element\";\nimport { createDecorators, EventEmitter } from \"@next-core/element\";\nimport variablesText from \"../../data-view-variables.shadow.css\";\nimport styleText from \"./cabinet-container.shadow.css\";\nimport classNames from \"classnames\";\nimport { CabinetNodeProps, CabinetNode } from \"../cabinet-node/index.js\";\nimport { useResizeObserver } from \"../../hooks/index.js\";\n\nconst { defineElement, property, event } = createDecorators();\nexport type ContainerType = \"host\" | \"k8s\" | \"k8s-blue\";\nconst WrappedNode = wrapBrick<CabinetNode, CabinetNodeProps>(\n \"data-view.cabinet-node\"\n);\nexport interface ClickEventDataType {\n type: \"node\" | \"container\";\n data: CabinetNodeProps | undefined;\n}\n\nexport interface CabinetContainerProps {\n data: CabinetNodeProps[];\n type?: ContainerType;\n customTitle?: string | undefined;\n status?: \"active\" | \"faded\";\n handleClick?: (params: ClickEventDataType) => void;\n handleDbClick?: (params: ClickEventDataType) => void;\n}\n\n/**\n * 大屏集群容器构件\n * @author astrid\n */\n@defineElement(\"data-view.cabinet-container\", {\n styleTexts: [variablesText, styleText],\n})\nclass CabinetContainer\n extends ReactNextElement\n implements CabinetContainerProps\n{\n /**\n * @kind ContainerType\n * @required true\n * @default host\n * @description 容器类型,host、k8s(主题橙色)、k8s-blue(蓝色主题)\n */\n @property({ attribute: false })\n accessor type: ContainerType = \"host\";\n\n /**\n * @kind CabinetNodeProps[]\n * @required true\n * @default -\n * @description 数据\n */\n @property({ attribute: false })\n accessor data: CabinetNodeProps[] = [];\n\n /**\n * @kind \"active\" | \"faded\"\n * @required false\n * @default\n * @description 当前状态,是否高亮或者淡化\n */\n @property()\n accessor status: \"active\" | \"faded\";\n\n /**\n * @kind string|undefined\n * @required false\n * @default -\n * @description 容器标题\n */\n @property()\n accessor customTitle: string | undefined;\n\n /**\n * @detail\n * @description 节点或者container 点击事件\n */\n @event({ type: \"container.click\" })\n accessor #onHandleClick!: EventEmitter<ClickEventDataType>;\n\n /**\n * @detail\n * @description 节点或者container 双击击事件\n */\n @event({ type: \"container.dbclick\" })\n accessor #onHandleDbClick!: EventEmitter<ClickEventDataType>;\n\n handleClick = (params: ClickEventDataType) => {\n this.#onHandleClick.emit(params);\n };\n handleDbClick = (params: ClickEventDataType) => {\n this.#onHandleDbClick.emit(params);\n };\n\n render(): React.ReactNode {\n return (\n <CabinetContainerComponent\n type={this.type}\n data={this.data}\n status={this.status}\n customTitle={this.customTitle}\n handleClick={this.handleClick}\n handleDbClick={this.handleDbClick}\n />\n );\n }\n}\n\nexport function CabinetContainerComponent(\n props: CabinetContainerProps\n): React.ReactElement {\n const { type, data, status, customTitle, handleClick, handleDbClick } = props;\n const isDbClick = useRef<boolean>(false);\n const timerRef = useRef<number>();\n\n const [containerRef, { clientWidth, clientHeight }] =\n useResizeObserver<HTMLDivElement>();\n const binarySearch = useCallback(\n (\n maxSizeCol: number,\n minSizeCol: number,\n maxSizeRow: number,\n minSizeRow: number\n ): { col: number; row: number } => {\n // 利用二分法,去找到一个合适大小;\n const maxRow = Math.max(minSizeRow, maxSizeRow), // 2\n minRow = Math.min(minSizeRow, maxSizeRow), // 1\n minCol = Math.min(minSizeCol, maxSizeCol),\n maxCol = Math.max(minSizeCol, maxSizeCol);\n const centerCol = Math.ceil((maxSizeCol + minSizeCol) / 2); // 希望col多一些\n const centerRow = Math.ceil((maxSizeRow + minSizeRow) / 2);\n const needRow = Math.ceil(data.length / centerCol);\n if (centerCol <= 1) {\n return {\n col: 1,\n row: data.length,\n };\n }\n if (\n needRow === centerRow ||\n minCol === maxCol ||\n minCol === centerCol ||\n maxCol === centerCol\n ) {\n return {\n col: centerCol,\n row: needRow,\n };\n }\n if (needRow > centerRow) {\n // 那么col要放大,row减少\n return binarySearch(centerCol, maxCol, needRow, minRow);\n }\n if (needRow < centerRow) {\n // 那么col要缩小,row增加\n return binarySearch(minCol, centerCol, maxRow, needRow);\n }\n },\n [data.length]\n );\n const layoutWidth = useMemo(() => {\n if (!data.length) {\n return;\n }\n\n //数据总量: A, 整个屏幕最大尺寸可以放 B, 整个屏幕最小尺寸可以放C,\n // B>=A,用 最大尺寸\n // C>=A: 用最小尺寸\n // B< A <C: 反推尺寸,\n const maxWidth = 118,\n minWidth = 56,\n maxHeight = 105,\n minHeight = 63;\n const realWidth = clientWidth - 27;\n const realHeight = clientHeight - 84;\n if (realWidth <= 0 || realHeight <= 0) {\n return;\n }\n const maxSizeCol = Math.floor(realWidth / maxWidth),\n maxSizeRow = Math.floor(realHeight / maxHeight),\n minSizeCol = Math.floor(realWidth / minWidth),\n minSizeRow = Math.floor(realHeight / minHeight);\n const maxSizeNum = maxSizeCol * maxSizeRow,\n minSizeNum = minSizeCol * minSizeRow;\n const allNum = data.length;\n if (allNum <= maxSizeNum) {\n return {\n width: Math.floor(realWidth / maxSizeCol),\n itemWidth: maxWidth,\n };\n } else if (allNum >= minSizeNum) {\n return {\n width: Math.floor(realWidth / minSizeCol),\n itemWidth: minWidth,\n };\n } else {\n // 在区间内, 希望撑满整个屏幕, 尺寸肯定在最大和最小之间\n const { col } = binarySearch(\n maxSizeCol,\n minSizeCol,\n maxSizeRow,\n minSizeRow\n );\n return {\n width: Math.floor(realWidth / col),\n itemWidth: Math.max(realWidth / col - 10, minWidth),\n };\n }\n }, [data.length, clientWidth, clientHeight, binarySearch]);\n\n const handleOnClick = (\n e: React.MouseEvent<HTMLDivElement>,\n data: CabinetNodeProps | undefined,\n type: \"node\" | \"container\"\n ) => {\n e.stopPropagation();\n window.clearTimeout(timerRef.current);\n isDbClick.current = false;\n timerRef.current = window.setTimeout(function () {\n if (!isDbClick.current) {\n handleClick?.({\n data,\n type,\n });\n }\n }, 200);\n };\n const handleOnDBClick = (\n e: React.MouseEvent<HTMLDivElement>,\n data: CabinetNodeProps | undefined,\n type: \"node\" | \"container\"\n ) => {\n window.clearTimeout(timerRef.current);\n isDbClick.current = true;\n e.stopPropagation();\n handleDbClick?.({\n data,\n type,\n });\n };\n\n return (\n <div\n className={classNames(\n \"wrapper\",\n {\n hostWrapper: type === \"host\" || type === \"k8s-blue\",\n k8sWrapper: type === \"k8s\",\n },\n status && `wrapper-${status}`\n )}\n ref={containerRef}\n onClick={(e) => handleOnClick(e, undefined, \"container\")}\n onDoubleClick={(e) => handleOnDBClick(e, undefined, \"container\")}\n >\n <div\n className={classNames(\n \"container\",\n {\n hostContainer: type === \"host\" || type === \"k8s-blue\",\n k8sContainer: type === \"k8s\",\n },\n status && `container-${status}`\n )}\n >\n <div className=\"content\">\n <div className=\"contentLayout\">\n {data.map((item, index) => (\n <div\n key={index}\n className=\"itemContent\"\n style={{ width: layoutWidth?.width }}\n >\n <div\n className=\"item\"\n style={{ width: layoutWidth?.itemWidth }}\n onClick={(e) => handleOnClick(e, item, \"node\")}\n onDoubleClick={(e) => handleOnDBClick(e, item, \"node\")}\n >\n <WrappedNode\n type={item.type}\n nodeTitle={item.nodeTitle}\n status={item.status}\n isAlert={item.isAlert}\n />\n </div>\n </div>\n ))}\n </div>\n </div>\n {customTitle && (\n <div className=\"footer\">\n <div className=\"footerTitle\">{customTitle}</div>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport { CabinetContainer };\n","import ResizeObserver from \"resize-observer-polyfill\";\n\nexport type ResizeCallback = (entry: ResizeObserverEntry) => void;\n\nconst elementListeners = new Map<Element, Set<ResizeCallback>>();\n\nexport const elementListeners_only_for_test =\n process.env.NODE_ENV === \"test\"\n ? elementListeners\n : /* istanbul ignore next */ null;\n\nconst resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n const { target } = entry;\n elementListeners.get(target)?.forEach((callback) => callback(entry));\n });\n};\n\nconst resizeObserver: ResizeObserver = new (ResizeObserver as any)(resizeObserverCallback);\n\nexport const observe = (element: Element, callback: ResizeCallback): void => {\n if (!elementListeners.has(element)) {\n elementListeners.set(element, new Set());\n resizeObserver.observe(element);\n }\n\n elementListeners.get(element).add(callback);\n};\n\nexport const unobserve = (element: Element, callback: ResizeCallback): void => {\n if (elementListeners.has(element)) {\n elementListeners.get(element).delete(callback);\n\n if (elementListeners.get(element).size === 0) {\n resizeObserver.unobserve(element);\n elementListeners.delete(element);\n }\n }\n};\n","import {\n useState,\n useCallback,\n useRef,\n type RefObject,\n useEffect,\n} from \"react\";\nimport { observe, unobserve } from \"./resizeObserverUtil.js\";\n\ninterface ElementSize {\n clientWidth: number;\n clientHeight: number;\n}\n\nexport interface ResizeObserveProps<T extends Element = Element> {\n targetRef?: RefObject<T>;\n onResize?: (size: ResizeObserverEntry) => void;\n}\n\nexport function useResizeObserver<T extends Element = Element>(\n props?: ResizeObserveProps<T>\n): [RefObject<T>, ElementSize] {\n const {\n targetRef,\n onResize,\n } = props || {};\n\n const localRef = useRef<T>();\n const ref = targetRef ?? localRef;\n const [size, setSize] = useState<ElementSize>({ clientWidth: 0, clientHeight: 0 });\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const { target } = entry;\n const { clientWidth = 0, clientHeight = 0 } = target;\n\n setSize((prev) => {\n // skip if same size\n if (prev.clientWidth === clientWidth && prev.clientHeight === clientHeight) {\n return prev;\n }\n\n onResize?.(entry);\n\n return { clientWidth, clientHeight };\n });\n },\n [onResize]\n );\n\n useEffect(() => {\n if (\n typeof ref !== \"object\" ||\n ref === null ||\n !(ref.current instanceof Element)\n ) {\n throw new Error(\"ResizeObserver must observe an Element\");\n }\n\n const element = ref.current;\n observe(element, handleResize);\n\n return () => {\n unobserve(element, handleResize);\n };\n }, [handleResize, ref]);\n\n return [ref, { ...size }];\n}\n","import {useRef, useEffect} from 'react';\nexport function usePrevious<T>(data?: T):T|undefined{\n const ref = useRef<T>();\n useEffect(()=>{\n ref.current = data\n })\n return ref.current;\n}\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, `*,\n*:after,\n*:before{box-sizing:border-box}.wrapper{width:100%;height:100%;position:relative}.container{width:100%;height:100%;border:3px solid;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;flex-direction:column;cursor:pointer;overflow:hidden}.wrapper:after,\n.wrapper:before{content:\"\";position:absolute;left:50%;border:3px solid;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);transform:translateX(-50%)}.wrapper:before{width:calc(100% - 10px);height:100%;bottom:-14px;z-index:-1;opacity:0.6}.wrapper:after{width:calc(100% - 30px);height:100%;bottom:-24px;z-index:-10;opacity:0.4}.hostWrapper:before,\n.hostWrapper:after{border-image:radial-gradient(circle,rgba(55,229,252,1),#007aca) 3 3}.hostWrapper:not(:has(.item:hover)):hover:before,\n.hostWrapper.wrapper-active:before{border-image:radial-gradient(circle,rgba(55,229,252,1),#45e4ff) 3 3}.k8sWrapper:after,\n.k8sWrapper:before{border-image:radial-gradient(circle,rgba(255,102,51,1),#ff663380) 3 3}.hostContainer{background:rgba(7,4,21,0.85);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);border-image:radial-gradient(circle,rgba(55,229,252,1),#007aca) 3 3}.hostContainer:not(:has(.item:hover)):hover,\n.hostContainer.container-active{border-image:radial-gradient(circle,rgba(55,229,252,1),#45e4ff) 3 3;box-shadow:inset 0 0 30px 0 #45e4ff,inset 0 0 20px 0 #45e4ff}.hostWrapper.wrapper-faded:after,\n.hostWrapper.wrapper-faded:before,\n.k8sWrapper.wrapper-faded:after,\n.k8sWrapper.wrapper-faded:before{opacity:0.1}.k8sContainer{background:rgba(7,4,21,0.8);border-image:radial-gradient(circle,rgba(255,102,51,1),#ff663399) 3 3}.k8sContainer:not(:has(.item:hover)):hover,\n.k8sContainer.container-active{box-shadow:inset 0 0 30px 0 #ff6633,inset 0 0 20px 0 #ff6633}.hostContainer.container-faded,\n.k8sContainer.container-faded{opacity:0.4}.content{flex:1;padding:20px 10px;width:100%;box-sizing:border-box;overflow:hidden;display:flex}.contentLayout{overflow:auto;height:100%}.itemContent{display:inline-block;vertical-align:middle}.item{min-width:56px;min-height:63px;max-width:118px;margin:auto}.footer{width:100%;height:57px;text-align:center;line-height:57px;font-size:var(--auxiliary-font-size);font-weight:var(--font-weight-400);color:var(--color-normal-text);position:relative;display:flex}.footerTitle{flex:1;width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.footer:after{content:\"\";width:100%;height:100%;position:absolute;left:0;top:0;z-index:-1}.hostContainer > .footer:after{background:linear-gradient(180deg,rgba(26,103,157,0.2) 0%,#1b69a0 100%)}.k8sContainer > .footer:after{background:linear-gradient(180deg,rgba(255,102,51,0.1) 0%,rgba(255,102,51,0.55) 100%)}.hostContainer:not(:has(.item:hover)):hover > .footer:after,\n.hostContainer.container-active > .footer:after,\n.k8sContainer:not(:has(.item:hover)):hover > .footer:after,\n.k8sContainer.container-active > .footer:after{opacity:0.65}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\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{--palette-rgba-white-1:rgba(255,255,255,10%);--palette-rgba-white-2:rgba(255,255,255,20%);--palette-rgba-white-3:rgba(255,255,255,30%);--palette-rgba-white-4:rgba(255,255,255,40%);--palette-rgba-white-5:rgba(255,255,255,50%);--palette-rgba-white-6:rgba(255,255,255,60%);--palette-rgba-white-7:rgba(255,255,255,70%);--palette-rgba-white-8:rgba(255,255,255,80%);--palette-rgba-white-9:rgba(255,255,255,90%);--palette-rgba-white-10:rgba(255,255,255,100%);--palette-rgba-gray-1:rgba(0,0,0,10%);--palette-rgba-gray-2:rgba(0,0,0,20%);--palette-rgba-gray-3:rgba(0,0,0,30%);--palette-rgba-gray-4:rgba(0,0,0,40%);--palette-rgba-gray-5:rgba(0,0,0,50%);--palette-rgba-gray-6:rgba(0,0,0,60%);--palette-rgba-gray-7:rgba(0,0,0,70%);--palette-rgba-gray-8:rgba(0,0,0,80%);--palette-rgba-gray-9:rgba(0,0,0,90%);--palette-rgba-gray-10:rgba(0,0,0,100%);--palette-rgba-blue-gray-2:rgba(101,106,134,20%);--palette-rgba-blue-gray-3:rgba(101,106,134,30%);--palette-rgba-blue-gray-8:rgba(101,106,134,80%);--palette-tech-blue-4-channel:67,127,255;--palette-tech-blue-4:rgb(var(--palette-tech-blue-4-channel));--palette-tech-blue-6-channel:51,102,255;--palette-tech-blue-6:rgb(var(--palette-tech-blue-6-channel));--palette-tech-blue-8-channel:40,69,159;--palette-tech-blue-8:rgb(var(--palette-tech-blue-8-channel));--palette-sea-green-4-channel:131,245,225;--palette-sea-green-4:rgb(var(--palette-sea-green-4-channel));--palette-green-6-channel:81,235,73;--palette-green-6:rgb(var(--palette-green-6-channel));--palette-green-2:rgba(var(--palette-green-6-channel),20%);--palette-lotus-pink-7-channel:204,0,102;--palette-lotus-pink-7:rgb(var(--palette-lotus-pink-7-channel));--palette-red-6-channel:242,39,39;--palette-red-6:rgb(var(--palette-red-6-channel));--palette-red-2:rgba(var(--palette-red-6-channel),20%);--color-fill-global-bg:#0f1014;--color-fill-bg-container-1:var(--palette-rgba-white-1);--color-fill-bg-container-2:var(--palette-rgba-blue-gray-2);--color-fill-bg-container-3:var(--palette-rgba-blue-gray-8);--color-fill-bg-base-1:var(--palette-rgba-blue-gray-2);--color-fill-bg-base-2:rgba(15,16,20,0%);--color-fill-bg-base-3:rgba(0,0,0,20%);--color-fill-bg-base-4:rgba(40,46,58,100%);--color-fill-bg-base-5:rgba(19,25,47,80%);--color-fill-bg-base-6:var(--palette-rgba-blue-gray-3);--color-brand:var(--palette-tech-blue-6);--color-brand-hover:var(--palette-tech-blue-4);--color-brand-active:var(--palette-tech-blue-8);--color-contrast-1:var(--palette-sea-green-4);--color-error:var(--palette-red-6);--color-error-bg:var(--palette-red-2);--color-success:var(--palette-green-6);--color-success-bg:var(--palette-green-2);--color-header-text-big:var(--palette-rgba-white-10);--color-header-text:var(--palette-rgba-white-10);--color-normal-text:var(--palette-rgba-white-10);--color-strong-text:var(--palette-rgba-white-9);--color-auxiliary-text:var(--palette-rgba-white-8);--color-secondary-text:var(--palette-rgba-white-6);--color-disabled-text:var(--palette-rgba-white-4);--color-border-divider-line:var(--palette-rgba-white-1);--color-text-divider-line-1:var(--palette-rgba-white-2);--color-text-divider-line-2:var(--palette-rgba-white-2);--small-border-radius:2px;--medius-border-radius:5px;--larger-border-radius:12px;--container-border-radius:9999px;--no-border-radius:0px;--mask-bg:var(--palette-rgba-gray-7);--title-font-size-larger:30px;--title-font-size-strong:22px;--title-font-size:18px;--normal-font-size:14px;--auxiliary-font-size:16px;--auxiliary-font-size-small:12px;--overview-data-font-size:34px;--statistics-data-font-size:28px;--normal-data-font-size-larger:20px;--normal-data-font-size:16px;--chart-legend-font-size:12px;--chart-tooltips-font-size-1:12px;--chart-tooltips-font-size-2:12px;--chart-axis-x-font-size:12px;--chart-axis-x-font-size-larger:14px;--chart-axis-y-font-size:12px;--chart-axis-y-font-size-larger:14px;--font-weight-600:600;--font-weight-500:500;--font-weight-400:400;--text-shadow:0px 1px 4px #2863ee;--border-width-base:1px;--border-width-double-base:2px;--border-width-tribble-base:3px;--punctate-width-base:1px;--paragraph-width-base:1px;--button-text-color:#40d0db}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateGetter(s, r, a) {\n return a(assertClassBrand(s, r));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}"],"names":["defineElement","property","event","createDecorators","WrappedNode","wrapBrick","_CabinetContainer","_A","WeakMap","_B","_C","_D","_E","_CabinetContainer_brand","WeakSet","_F","CabinetContainer","ReactNextElement","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_init_type","_init_extra_type","_init_data","_init_extra_data","_init_status","_init_extra_status","_init_customTitle","_init_extra_customTitle","_init_onHandleClick","_init_extra_onHandleClick","_init_onHandleDbClick","_defineProperty","_init_extra_onHandleDbClick","params","_classPrivateGetter","this","_get_onHandleClick","emit","_get_onHandleDbClick","type","_classPrivateFieldGet","v","_classPrivateFieldSet","data","status","customTitle","render","React","CabinetContainerComponent","handleClick","handleDbClick","props","isDbClick","useRef","timerRef","containerRef","clientWidth","clientHeight","useResizeObserver","binarySearch","useCallback","maxSizeCol","minSizeCol","maxSizeRow","minSizeRow","maxRow","Math","max","minRow","min","minCol","maxCol","centerCol","ceil","centerRow","needRow","length","col","row","layoutWidth","useMemo","realWidth","realHeight","floor","maxSizeNum","minSizeNum","allNum","width","itemWidth","handleOnClick","e","stopPropagation","window","clearTimeout","current","setTimeout","handleOnDBClick","className","classNames","hostWrapper","k8sWrapper","ref","onClick","undefined","onDoubleClick","hostContainer","k8sContainer","map","item","index","key","style","nodeTitle","isAlert","_CabinetContainer2","_set_onHandleClick","_set_onHandleDbClick","c","_initClass","_applyDecs","styleTexts","variablesText","styleText","attribute","o","_","has","_checkInRHS","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","entry","_elementListeners$get","target","get","callback","observe","element","set","Set","add","unobserve","delete","size","targetRef","onResize","localRef","setSize","useState","handleResize","prev","useEffect","Element","Error","usePrevious","___CSS_LOADER_EXPORT___","push","module","id","toString","hasOwn","hasOwnProperty","classes","i","arg","appendClass","parseValue","Array","isArray","apply","Object","prototype","includes","call","value","newClass","exports","default","s","r","a","obj","privateSet","defineProperty","enumerable","configurable","writable"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see cabinet-thumbnail.d6c2b232.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3158],{88393:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CabinetThumbnail:()=>T,CabinetThumbnailComponent:()=>L});var r,l=a(70918),n=a(86121),i=a(70829),o=a(62740),s=a(18769),c=a.n(s),p=a(24295),b=a(10300),g=a(53373),u=a.n(g),h=a(79935),d=a(45097),f=a(6837);let x,v,m,w,y,k,z;const E=(0,p.wrapBrick)("data-view.cabinet-app-layer"),{defineElement:C,property:N}=(0,b.createDecorators)(),A=(0,p.wrapBrick)("data-view.cabinet-node");let T;var W=new WeakMap,S=new WeakMap,H=new WeakMap;class R extends p.ReactNextElement{constructor(){super(...arguments),(0,l.A)(this,W,v(this,[])),(0,l.A)(this,S,(m(this),w(this,4))),(0,l.A)(this,H,(y(this),k(this))),z(this)}get clusters(){return(0,i.A)(W,this)}set clusters(e){(0,n.A)(W,this,e)}get columns(){return(0,i.A)(S,this)}set columns(e){(0,n.A)(S,this,e)}get appName(){return(0,i.A)(H,this)}set appName(e){(0,n.A)(H,this,e)}render(){return c().createElement(L,{clusters:this.clusters,columns:this.columns,appName:this.appName})}}function L(e){const{clusters:t,columns:a,appName:r}=e,l=(0,s.useRef)(),n=(0,s.useRef)(),[i,o]=(0,s.useState)(),p=(0,f.Z)(i);return(0,s.useLayoutEffect)((()=>{if(t.length&&a>0){const e=l.current.clientWidth/(n.current.clientWidth/(null!=p?p:1)),t=l.current.clientHeight/(n.current.clientHeight*(null!=p?p:1));o(Math.min(Math.floor(100*Math.min(e,t))/100,1))}}),[t,p,a]),c().createElement("div",{ref:l,className:"wrapper"},c().createElement("div",{className:"thumbnailLayout",ref:n,style:{...i?{transform:`scale(${i})`}:{}}},c().createElement(E,{className:"appLayer",appTitle:r}),c().createElement("div",{className:"layout"},t.map(((e,t)=>c().createElement("div",{className:"clusterWrapper",key:t},c().createElement("div",{className:u()("clusterContainer",{clusterHostContainer:"host"===e.type||"k8s-blue"===e.type,clusterK8sContainer:"k8s"===e.type})},c().createElement("div",{className:"clusterContent"},c().createElement("div",{className:"clusterContentLayout",style:{gridTemplateColumns:`repeat(${a},1fr)`}},e.data.map(((e,t)=>c().createElement("div",{key:t,className:"itemContent"},c().createElement(A,{type:e.type,nodeTitle:e.nodeTitle})))))),c().createElement("div",{className:"clusterTitle"},c().createElement("div",{className:"title"},e.title)))))))))}r=R,({e:[v,m,w,y,k,z],c:[T,x]}=(0,o.A)(r,[C("data-view.cabinet-thumbnail",{styleTexts:[h.A,d.A]})],[[N({attribute:!1}),1,"clusters"],[N({type:Number}),1,"columns"],[N(),1,"appName"]],0,void 0,p.ReactNextElement)),x()},6837:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p,w:()=>c});var r=a(18769),l=a(99126);const n=new Map,i=new l.A((e=>{e.forEach((e=>{var t;const{target:a}=e;null===(t=n.get(a))||void 0===t||t.forEach((t=>t(e)))}))})),o=(e,t)=>{n.has(e)||(n.set(e,new Set),i.observe(e)),n.get(e).add(t)},s=(e,t)=>{n.has(e)&&(n.get(e).delete(t),0===n.get(e).size&&(i.unobserve(e),n.delete(e)))};function c(e){const{targetRef:t,onResize:a}=e||{},l=(0,r.useRef)(),n=null!=t?t:l,[i,c]=(0,r.useState)({clientWidth:0,clientHeight:0}),p=(0,r.useCallback)((e=>{const{target:t}=e,{clientWidth:r=0,clientHeight:l=0}=t;c((t=>t.clientWidth===r&&t.clientHeight===l?t:(null==a||a(e),{clientWidth:r,clientHeight:l})))}),[a]);return(0,r.useEffect)((()=>{if("object"!=typeof n||null===n||!(n.current instanceof Element))throw new Error("ResizeObserver must observe an Element");const e=n.current;return o(e,p),()=>{s(e,p)}}),[p,n]),[n,{...i}]}function p(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e})),t.current}},45097:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var r=a(36758),l=a.n(r),n=a(40935),i=a.n(n)()(l());i.push([e.id,'*,\n*:after,\n*:before{box-sizing:border-box}.wrapper{width:100%;height:100%}.wrapper,\n.thumbnailLayout{display:flex;justify-content:center;align-items:center}.appLayer{width:90%;margin-bottom:16px;align-self:center;pointer-events:none}.thumbnailLayout{flex-direction:column}.layout{display:flex;gap:17px;margin-top:27px;align-items:stretch}.clusterWrapper{width:100%;height:auto}.clusterContainer{width:100%;height:100%;border:3px solid;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;flex-direction:column}.clusterHostContainer{background:rgba(7,4,21,0.85);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);border-image:radial-gradient(circle,rgba(55,229,252,1),#007aca) 3 3}.clusterK8sContainer{background:rgba(7,4,21,0.8);border-image:radial-gradient(circle,rgba(255,102,51,1),#ff663399) 3 3}.clusterContent{flex:1;padding:20px 10px;width:100%}.clusterContentLayout{display:grid;width:100%}.itemContent{width:118px;pointer-events:none;height:105px}.clusterTitle{width:100%;text-align:center;line-height:57px;font-size:var(--auxiliary-font-size);font-weight:var(--font-weight-400);color:var(--color-normal-text);position:relative;display:flex}.title{flex:1;width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.clusterTitle:after{content:"";width:100%;height:100%;position:absolute;left:0;top:0;z-index:-1}.clusterHostContainer > .clusterTitle:after{background:linear-gradient(180deg,rgba(26,103,157,0.2) 0%,#1b69a0 100%)}.clusterK8sContainer > .clusterTitle:after{background:linear-gradient(180deg,rgba(255,102,51,0.1) 0%,rgba(255,102,51,0.55) 100%)}',""]);const o=i.toString()},79935:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var r=a(36758),l=a.n(r),n=a(40935),i=a.n(n)()(l());i.push([e.id,":host{--palette-rgba-white-1:rgba(255,255,255,10%);--palette-rgba-white-2:rgba(255,255,255,20%);--palette-rgba-white-3:rgba(255,255,255,30%);--palette-rgba-white-4:rgba(255,255,255,40%);--palette-rgba-white-5:rgba(255,255,255,50%);--palette-rgba-white-6:rgba(255,255,255,60%);--palette-rgba-white-7:rgba(255,255,255,70%);--palette-rgba-white-8:rgba(255,255,255,80%);--palette-rgba-white-9:rgba(255,255,255,90%);--palette-rgba-white-10:rgba(255,255,255,100%);--palette-rgba-gray-1:rgba(0,0,0,10%);--palette-rgba-gray-2:rgba(0,0,0,20%);--palette-rgba-gray-3:rgba(0,0,0,30%);--palette-rgba-gray-4:rgba(0,0,0,40%);--palette-rgba-gray-5:rgba(0,0,0,50%);--palette-rgba-gray-6:rgba(0,0,0,60%);--palette-rgba-gray-7:rgba(0,0,0,70%);--palette-rgba-gray-8:rgba(0,0,0,80%);--palette-rgba-gray-9:rgba(0,0,0,90%);--palette-rgba-gray-10:rgba(0,0,0,100%);--palette-rgba-blue-gray-2:rgba(101,106,134,20%);--palette-rgba-blue-gray-3:rgba(101,106,134,30%);--palette-rgba-blue-gray-8:rgba(101,106,134,80%);--palette-tech-blue-4-channel:67,127,255;--palette-tech-blue-4:rgb(var(--palette-tech-blue-4-channel));--palette-tech-blue-6-channel:51,102,255;--palette-tech-blue-6:rgb(var(--palette-tech-blue-6-channel));--palette-tech-blue-8-channel:40,69,159;--palette-tech-blue-8:rgb(var(--palette-tech-blue-8-channel));--palette-sea-green-4-channel:131,245,225;--palette-sea-green-4:rgb(var(--palette-sea-green-4-channel));--palette-green-6-channel:81,235,73;--palette-green-6:rgb(var(--palette-green-6-channel));--palette-green-2:rgba(var(--palette-green-6-channel),20%);--palette-lotus-pink-7-channel:204,0,102;--palette-lotus-pink-7:rgb(var(--palette-lotus-pink-7-channel));--palette-red-6-channel:242,39,39;--palette-red-6:rgb(var(--palette-red-6-channel));--palette-red-2:rgba(var(--palette-red-6-channel),20%);--color-fill-global-bg:#0f1014;--color-fill-bg-container-1:var(--palette-rgba-white-1);--color-fill-bg-container-2:var(--palette-rgba-blue-gray-2);--color-fill-bg-container-3:var(--palette-rgba-blue-gray-8);--color-fill-bg-base-1:var(--palette-rgba-blue-gray-2);--color-fill-bg-base-2:rgba(15,16,20,0%);--color-fill-bg-base-3:rgba(0,0,0,20%);--color-fill-bg-base-4:rgba(40,46,58,100%);--color-fill-bg-base-5:rgba(19,25,47,80%);--color-fill-bg-base-6:var(--palette-rgba-blue-gray-3);--color-brand:var(--palette-tech-blue-6);--color-brand-hover:var(--palette-tech-blue-4);--color-brand-active:var(--palette-tech-blue-8);--color-contrast-1:var(--palette-sea-green-4);--color-error:var(--palette-red-6);--color-error-bg:var(--palette-red-2);--color-success:var(--palette-green-6);--color-success-bg:var(--palette-green-2);--color-header-text-big:var(--palette-rgba-white-10);--color-header-text:var(--palette-rgba-white-10);--color-normal-text:var(--palette-rgba-white-10);--color-strong-text:var(--palette-rgba-white-9);--color-auxiliary-text:var(--palette-rgba-white-8);--color-secondary-text:var(--palette-rgba-white-6);--color-disabled-text:var(--palette-rgba-white-4);--color-border-divider-line:var(--palette-rgba-white-1);--color-text-divider-line-1:var(--palette-rgba-white-2);--color-text-divider-line-2:var(--palette-rgba-white-2);--small-border-radius:2px;--medius-border-radius:5px;--larger-border-radius:12px;--container-border-radius:9999px;--no-border-radius:0px;--mask-bg:var(--palette-rgba-gray-7);--title-font-size-larger:30px;--title-font-size-strong:22px;--title-font-size:18px;--normal-font-size:14px;--auxiliary-font-size:16px;--auxiliary-font-size-small:12px;--overview-data-font-size:34px;--statistics-data-font-size:28px;--normal-data-font-size-larger:20px;--normal-data-font-size:16px;--chart-legend-font-size:12px;--chart-tooltips-font-size-1:12px;--chart-tooltips-font-size-2:12px;--chart-axis-x-font-size:12px;--chart-axis-x-font-size-larger:14px;--chart-axis-y-font-size:12px;--chart-axis-y-font-size-larger:14px;--font-weight-600:600;--font-weight-500:500;--font-weight-400:400;--text-shadow:0px 1px 4px #2863ee;--border-width-base:1px;--border-width-double-base:2px;--border-width-tribble-base:3px;--punctate-width-base:1px;--paragraph-width-base:1px;--button-text-color:#40d0db}",""]);const o=i.toString()},53373:(e,t)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=i(e,n(a)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)r.call(e,a)&&e[a]&&(t=i(t,a));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(a=function(){return l}.apply(t,[]))||(e.exports=a)}()}}]);
|
|
3
|
+
//# sourceMappingURL=cabinet-thumbnail.d6c2b232.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/cabinet-thumbnail.d6c2b232.js","mappings":";sXAaA,MAAMA,GAAyBC,EAAAA,EAAAA,WAC7B,gCAEI,cAAEC,EAAa,SAAEC,IAAaC,EAAAA,EAAAA,oBAE9BC,GAAcJ,EAAAA,EAAAA,WAClB,0BACA,IAAAK,EAAA,IAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAiBF,MAAAG,UAIUC,EAAAA,iBAEVC,WAAAA,GAAA,SAAAC,YACEC,EAAAA,EAAAA,GAAA,KAAAR,EAAAS,EAAA,KAOgC,MAEhCD,EAAAA,EAAAA,GAAA,KAAAN,GAAAQ,EAAA,MAAAC,EAAA,KAO2B,MAE3BH,EAAAA,EAAAA,GAAA,KAAAL,GAAAS,EAAA,MAAAC,EAAA,QAAAC,EAAA,kBAXSC,GAAQ,OAAAC,EAAAA,EAAAA,GAAAhB,EAAA,kBAARe,CAAQE,IAAAC,EAAAA,EAAAA,GAAAlB,EAAA,KAAAiB,EAAA,YASRE,GAAO,OAAAH,EAAAA,EAAAA,GAAAd,EAAA,iBAAPiB,CAAOF,IAAAC,EAAAA,EAAAA,GAAAhB,EAAA,KAAAe,EAAA,YASPG,GAAO,OAAAJ,EAAAA,EAAAA,GAAAb,EAAA,iBAAPiB,CAAOH,IAAAC,EAAAA,EAAAA,GAAAf,EAAA,KAAAc,EAAA,CAEhBI,MAAAA,GACE,OACEC,IAAAA,cAACC,EAAyB,CACxBR,SAAUS,KAAKT,SACfI,QAASK,KAAKL,QACdC,QAASI,KAAKJ,SAGpB,EAGK,SAASG,EACdE,GAEA,MAAM,SAAEV,EAAQ,QAAEI,EAAO,QAAEC,GAAYK,EACjCC,GAAeC,EAAAA,EAAAA,UACfC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K,EAAIL,SAASA,WAAWa,SAAS,iBACnF,OAAOR,EAAIL,WAGZ,IAAIG,EAAU,GAEd,IAAK,IAAI1D,KAAO4D,EACXJ,EAAOa,KAAKT,EAAK5D,IAAQ4D,EAAI5D,KAChC0D,EAAUG,EAAYH,EAAS1D,IAIjC,OAAO0D,CACR,CAEA,SAASG,EAAaS,EAAOC,GAC5B,OAAKA,EAIDD,EACIA,EAAQ,IAAMC,EAGfD,EAAQC,EAPPD,CAQT,CAEqCjB,EAAOmB,SAC3CvE,EAAWwE,QAAUxE,EACrBoD,EAAOmB,QAAUvE,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CArEA","sources":["webpack:///./src/cabinet/cabinet-thumbnail/index.tsx","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/usePrevious/index.ts","webpack:///./src/cabinet/cabinet-thumbnail/cabinet-thumbnail.shadow.css","webpack:///./src/data-view-variables.shadow.css","webpack:///../../node_modules/classnames/index.js"],"sourcesContent":["import React, { useLayoutEffect, useRef, useState } from \"react\";\nimport { ReactNextElement, wrapBrick } from \"@next-core/react-element\";\nimport { createDecorators } from \"@next-core/element\";\nimport classNames from \"classnames\";\nimport { CabinetNode, CabinetNodeProps } from \"../cabinet-node/index.js\";\nimport { ContainerType } from \"../cabinet-container/index.js\";\nimport variablesText from \"../../data-view-variables.shadow.css\";\nimport styleText from \"./cabinet-thumbnail.shadow.css\";\nimport { usePrevious } from \"../../hooks/index.js\";\nimport {\n CabinetAppLayer,\n CabinetAppLayerProps,\n} from \"../cabinet-app-layer/index.js\";\nconst WrappedCabinetAppLayer = wrapBrick<CabinetAppLayer, CabinetAppLayerProps>(\n \"data-view.cabinet-app-layer\"\n);\nconst { defineElement, property } = createDecorators();\n\nconst WrappedNode = wrapBrick<CabinetNode, CabinetNodeProps>(\n \"data-view.cabinet-node\"\n);\nexport interface Clusters {\n data: CabinetNodeProps[];\n type?: ContainerType;\n title?: string | undefined;\n}\n\nexport interface CabinetThumbnailProps {\n clusters: Clusters[];\n appName: string;\n columns?: number;\n}\n\n/**\n * 应用墙缩略图\n * @author astrid\n */\n@defineElement(\"data-view.cabinet-thumbnail\", {\n styleTexts: [variablesText, styleText],\n})\nclass CabinetThumbnail\n extends ReactNextElement\n implements CabinetThumbnailProps\n{\n /**\n * @kind CabinetContainerProps[]\n * @required true\n * @default\n * @description 集群数据\n */\n @property({ attribute: false })\n accessor clusters: Clusters[] = [];\n\n /**\n * @kind number\n * @required\n * @default 4\n * @description 单个容器列数\n */\n @property({ type: Number })\n accessor columns: number = 4;\n\n /**\n * @kind string\n * @required true\n * @default\n * @description 应用名称\n */\n @property()\n accessor appName: string;\n\n render(): React.ReactNode {\n return (\n <CabinetThumbnailComponent\n clusters={this.clusters}\n columns={this.columns}\n appName={this.appName}\n />\n );\n }\n}\n\nexport function CabinetThumbnailComponent(\n props: CabinetThumbnailProps\n): React.ReactElement {\n const { clusters, columns, appName } = props;\n const containerRef = useRef<HTMLDivElement>();\n const layoutRef = useRef<HTMLDivElement>();\n const [scale, setScale] = useState<number>();\n const preScale = usePrevious(scale);\n\n useLayoutEffect(() => {\n if (!!clusters.length && columns > 0) {\n // 计算缩放比例\n const wScale =\n containerRef.current.clientWidth /\n (layoutRef.current.clientWidth / (preScale ?? 1));\n const hScale =\n containerRef.current.clientHeight /\n (layoutRef.current.clientHeight * (preScale ?? 1));\n setScale(Math.min(Math.floor(Math.min(wScale, hScale) * 100) / 100, 1));\n }\n }, [clusters, preScale, columns]);\n\n return (\n <div ref={containerRef} className=\"wrapper\">\n <div\n className=\"thumbnailLayout\"\n ref={layoutRef}\n style={{\n ...(scale ? { transform: `scale(${scale})` } : {}),\n }}\n >\n <WrappedCabinetAppLayer className=\"appLayer\" appTitle={appName} />\n <div className=\"layout\">\n {clusters.map((item, index) => (\n <div className=\"clusterWrapper\" key={index}>\n <div\n className={classNames(\"clusterContainer\", {\n clusterHostContainer:\n item.type === \"host\" || item.type === \"k8s-blue\",\n clusterK8sContainer: item.type === \"k8s\",\n })}\n >\n <div className=\"clusterContent\">\n <div\n className=\"clusterContentLayout\"\n style={{ gridTemplateColumns: `repeat(${columns},1fr)` }}\n >\n {item.data.map((node, index) => (\n <div key={index} className=\"itemContent\">\n <WrappedNode\n type={node.type}\n nodeTitle={node.nodeTitle}\n />\n </div>\n ))}\n </div>\n </div>\n <div className=\"clusterTitle\">\n <div className=\"title\">{item.title}</div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n}\nexport { CabinetThumbnail };\n","import ResizeObserver from \"resize-observer-polyfill\";\n\nexport type ResizeCallback = (entry: ResizeObserverEntry) => void;\n\nconst elementListeners = new Map<Element, Set<ResizeCallback>>();\n\nexport const elementListeners_only_for_test =\n process.env.NODE_ENV === \"test\"\n ? elementListeners\n : /* istanbul ignore next */ null;\n\nconst resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n const { target } = entry;\n elementListeners.get(target)?.forEach((callback) => callback(entry));\n });\n};\n\nconst resizeObserver: ResizeObserver = new (ResizeObserver as any)(resizeObserverCallback);\n\nexport const observe = (element: Element, callback: ResizeCallback): void => {\n if (!elementListeners.has(element)) {\n elementListeners.set(element, new Set());\n resizeObserver.observe(element);\n }\n\n elementListeners.get(element).add(callback);\n};\n\nexport const unobserve = (element: Element, callback: ResizeCallback): void => {\n if (elementListeners.has(element)) {\n elementListeners.get(element).delete(callback);\n\n if (elementListeners.get(element).size === 0) {\n resizeObserver.unobserve(element);\n elementListeners.delete(element);\n }\n }\n};\n","import {\n useState,\n useCallback,\n useRef,\n type RefObject,\n useEffect,\n} from \"react\";\nimport { observe, unobserve } from \"./resizeObserverUtil.js\";\n\ninterface ElementSize {\n clientWidth: number;\n clientHeight: number;\n}\n\nexport interface ResizeObserveProps<T extends Element = Element> {\n targetRef?: RefObject<T>;\n onResize?: (size: ResizeObserverEntry) => void;\n}\n\nexport function useResizeObserver<T extends Element = Element>(\n props?: ResizeObserveProps<T>\n): [RefObject<T>, ElementSize] {\n const {\n targetRef,\n onResize,\n } = props || {};\n\n const localRef = useRef<T>();\n const ref = targetRef ?? localRef;\n const [size, setSize] = useState<ElementSize>({ clientWidth: 0, clientHeight: 0 });\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const { target } = entry;\n const { clientWidth = 0, clientHeight = 0 } = target;\n\n setSize((prev) => {\n // skip if same size\n if (prev.clientWidth === clientWidth && prev.clientHeight === clientHeight) {\n return prev;\n }\n\n onResize?.(entry);\n\n return { clientWidth, clientHeight };\n });\n },\n [onResize]\n );\n\n useEffect(() => {\n if (\n typeof ref !== \"object\" ||\n ref === null ||\n !(ref.current instanceof Element)\n ) {\n throw new Error(\"ResizeObserver must observe an Element\");\n }\n\n const element = ref.current;\n observe(element, handleResize);\n\n return () => {\n unobserve(element, handleResize);\n };\n }, [handleResize, ref]);\n\n return [ref, { ...size }];\n}\n","import {useRef, useEffect} from 'react';\nexport function usePrevious<T>(data?: T):T|undefined{\n const ref = useRef<T>();\n useEffect(()=>{\n ref.current = data\n })\n return ref.current;\n}\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, `*,\n*:after,\n*:before{box-sizing:border-box}.wrapper{width:100%;height:100%}.wrapper,\n.thumbnailLayout{display:flex;justify-content:center;align-items:center}.appLayer{width:90%;margin-bottom:16px;align-self:center;pointer-events:none}.thumbnailLayout{flex-direction:column}.layout{display:flex;gap:17px;margin-top:27px;align-items:stretch}.clusterWrapper{width:100%;height:auto}.clusterContainer{width:100%;height:100%;border:3px solid;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;flex-direction:column}.clusterHostContainer{background:rgba(7,4,21,0.85);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);border-image:radial-gradient(circle,rgba(55,229,252,1),#007aca) 3 3}.clusterK8sContainer{background:rgba(7,4,21,0.8);border-image:radial-gradient(circle,rgba(255,102,51,1),#ff663399) 3 3}.clusterContent{flex:1;padding:20px 10px;width:100%}.clusterContentLayout{display:grid;width:100%}.itemContent{width:118px;pointer-events:none;height:105px}.clusterTitle{width:100%;text-align:center;line-height:57px;font-size:var(--auxiliary-font-size);font-weight:var(--font-weight-400);color:var(--color-normal-text);position:relative;display:flex}.title{flex:1;width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.clusterTitle:after{content:\"\";width:100%;height:100%;position:absolute;left:0;top:0;z-index:-1}.clusterHostContainer > .clusterTitle:after{background:linear-gradient(180deg,rgba(26,103,157,0.2) 0%,#1b69a0 100%)}.clusterK8sContainer > .clusterTitle:after{background:linear-gradient(180deg,rgba(255,102,51,0.1) 0%,rgba(255,102,51,0.55) 100%)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\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{--palette-rgba-white-1:rgba(255,255,255,10%);--palette-rgba-white-2:rgba(255,255,255,20%);--palette-rgba-white-3:rgba(255,255,255,30%);--palette-rgba-white-4:rgba(255,255,255,40%);--palette-rgba-white-5:rgba(255,255,255,50%);--palette-rgba-white-6:rgba(255,255,255,60%);--palette-rgba-white-7:rgba(255,255,255,70%);--palette-rgba-white-8:rgba(255,255,255,80%);--palette-rgba-white-9:rgba(255,255,255,90%);--palette-rgba-white-10:rgba(255,255,255,100%);--palette-rgba-gray-1:rgba(0,0,0,10%);--palette-rgba-gray-2:rgba(0,0,0,20%);--palette-rgba-gray-3:rgba(0,0,0,30%);--palette-rgba-gray-4:rgba(0,0,0,40%);--palette-rgba-gray-5:rgba(0,0,0,50%);--palette-rgba-gray-6:rgba(0,0,0,60%);--palette-rgba-gray-7:rgba(0,0,0,70%);--palette-rgba-gray-8:rgba(0,0,0,80%);--palette-rgba-gray-9:rgba(0,0,0,90%);--palette-rgba-gray-10:rgba(0,0,0,100%);--palette-rgba-blue-gray-2:rgba(101,106,134,20%);--palette-rgba-blue-gray-3:rgba(101,106,134,30%);--palette-rgba-blue-gray-8:rgba(101,106,134,80%);--palette-tech-blue-4-channel:67,127,255;--palette-tech-blue-4:rgb(var(--palette-tech-blue-4-channel));--palette-tech-blue-6-channel:51,102,255;--palette-tech-blue-6:rgb(var(--palette-tech-blue-6-channel));--palette-tech-blue-8-channel:40,69,159;--palette-tech-blue-8:rgb(var(--palette-tech-blue-8-channel));--palette-sea-green-4-channel:131,245,225;--palette-sea-green-4:rgb(var(--palette-sea-green-4-channel));--palette-green-6-channel:81,235,73;--palette-green-6:rgb(var(--palette-green-6-channel));--palette-green-2:rgba(var(--palette-green-6-channel),20%);--palette-lotus-pink-7-channel:204,0,102;--palette-lotus-pink-7:rgb(var(--palette-lotus-pink-7-channel));--palette-red-6-channel:242,39,39;--palette-red-6:rgb(var(--palette-red-6-channel));--palette-red-2:rgba(var(--palette-red-6-channel),20%);--color-fill-global-bg:#0f1014;--color-fill-bg-container-1:var(--palette-rgba-white-1);--color-fill-bg-container-2:var(--palette-rgba-blue-gray-2);--color-fill-bg-container-3:var(--palette-rgba-blue-gray-8);--color-fill-bg-base-1:var(--palette-rgba-blue-gray-2);--color-fill-bg-base-2:rgba(15,16,20,0%);--color-fill-bg-base-3:rgba(0,0,0,20%);--color-fill-bg-base-4:rgba(40,46,58,100%);--color-fill-bg-base-5:rgba(19,25,47,80%);--color-fill-bg-base-6:var(--palette-rgba-blue-gray-3);--color-brand:var(--palette-tech-blue-6);--color-brand-hover:var(--palette-tech-blue-4);--color-brand-active:var(--palette-tech-blue-8);--color-contrast-1:var(--palette-sea-green-4);--color-error:var(--palette-red-6);--color-error-bg:var(--palette-red-2);--color-success:var(--palette-green-6);--color-success-bg:var(--palette-green-2);--color-header-text-big:var(--palette-rgba-white-10);--color-header-text:var(--palette-rgba-white-10);--color-normal-text:var(--palette-rgba-white-10);--color-strong-text:var(--palette-rgba-white-9);--color-auxiliary-text:var(--palette-rgba-white-8);--color-secondary-text:var(--palette-rgba-white-6);--color-disabled-text:var(--palette-rgba-white-4);--color-border-divider-line:var(--palette-rgba-white-1);--color-text-divider-line-1:var(--palette-rgba-white-2);--color-text-divider-line-2:var(--palette-rgba-white-2);--small-border-radius:2px;--medius-border-radius:5px;--larger-border-radius:12px;--container-border-radius:9999px;--no-border-radius:0px;--mask-bg:var(--palette-rgba-gray-7);--title-font-size-larger:30px;--title-font-size-strong:22px;--title-font-size:18px;--normal-font-size:14px;--auxiliary-font-size:16px;--auxiliary-font-size-small:12px;--overview-data-font-size:34px;--statistics-data-font-size:28px;--normal-data-font-size-larger:20px;--normal-data-font-size:16px;--chart-legend-font-size:12px;--chart-tooltips-font-size-1:12px;--chart-tooltips-font-size-2:12px;--chart-axis-x-font-size:12px;--chart-axis-x-font-size-larger:14px;--chart-axis-y-font-size:12px;--chart-axis-y-font-size-larger:14px;--font-weight-600:600;--font-weight-500:500;--font-weight-400:400;--text-shadow:0px 1px 4px #2863ee;--border-width-base:1px;--border-width-double-base:2px;--border-width-tribble-base:3px;--punctate-width-base:1px;--paragraph-width-base:1px;--button-text-color:#40d0db}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["WrappedCabinetAppLayer","wrapBrick","defineElement","property","createDecorators","WrappedNode","_CabinetThumbnail","_A","WeakMap","_B","_C","CabinetThumbnail","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","_init_clusters","_init_extra_clusters","_init_columns","_init_extra_columns","_init_appName","_init_extra_appName","clusters","_classPrivateFieldGet","v","_classPrivateFieldSet","columns","appName","render","React","CabinetThumbnailComponent","this","props","containerRef","useRef","layoutRef","scale","setScale","useState","preScale","usePrevious","useLayoutEffect","length","wScale","current","clientWidth","hScale","clientHeight","Math","min","floor","ref","className","style","transform","appTitle","map","item","index","key","classNames","clusterHostContainer","type","clusterK8sContainer","gridTemplateColumns","data","node","nodeTitle","title","_CabinetThumbnail2","e","c","_initClass","_applyDecs","styleTexts","variablesText","styleText","attribute","Number","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","entry","_elementListeners$get","target","get","callback","observe","element","has","set","Set","add","unobserve","delete","size","useResizeObserver","targetRef","onResize","localRef","setSize","handleResize","useCallback","prev","useEffect","Element","Error","___CSS_LOADER_EXPORT___","push","module","id","toString","hasOwn","hasOwnProperty","classes","i","arg","appendClass","parseValue","Array","isArray","apply","Object","prototype","includes","call","value","newClass","exports","default"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[8038,2052],{60680:(e,t,n)=>{n.r(t),n.d(t,{ChinaMapChart:()=>I,ChinaMapChartComponent:()=>$});var r,a=n(74635),i=n(70918),o=n(26902),s=n(5536),c=n(86121),l=n(70829),u=n(62740),d=n(18769),p=n.n(d),f=n(10300),h=n(24295),g=(n(44291),n(48458)),y=n(25337),m=n(72445),v=n(10177),b=n(68429),w=n(98418),A=n(39123),x=n(3861);let S,E,L,k,C,H,z,T,j;const{defineElement:O,property:q,event:F}=(0,f.createDecorators)();let I;var D=new WeakMap,P=new WeakMap,M=new WeakMap,N=new WeakSet,_=new WeakMap;class R extends h.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,N),(0,i.A)(this,D,E(this)),(0,i.A)(this,P,(L(this),k(this))),(0,i.A)(this,M,(C(this),H(this))),(0,i.A)(this,_,(j(this),(e,t)=>{(0,s.A)(N,this,z).emit({open:e,data:t})}))}get dataSource(){return(0,l.A)(D,this)}set dataSource(e){(0,c.A)(D,this,e)}get detailContentStyle(){return(0,l.A)(P,this)}set detailContentStyle(e){(0,c.A)(P,this,e)}render(){return p().createElement($,{dataSource:this.dataSource,onDetailOpenChange:(0,l.A)(_,this),detailContentStyle:this.detailContentStyle})}}function $(e){const{onDetailOpenChange:t,dataSource:n=[],detailContentStyle:r={}}=e,a=(0,d.useRef)(),i=(0,d.useRef)(),[o,s]=(0,d.useState)(),c=(0,d.useRef)(),[l,u]=(0,d.useState)();return(0,d.useEffect)((()=>{const e=new g.Z5({id:a.current,logoVisible:!1,map:new y.A({center:[90.268,40.3628],pitch:35,zoom:1})});e.setMapStatus({doubleClickZoom:!1,zoomEnable:!1});const t=new Image;t.src=v;const r=new Image;return r.src=b,e.addImage("default",t),e.addImage("selected",r),e.addImage("chinaBg",w),e.on("loaded",(()=>{const t={...A,features:A.features.slice(0,A.features.length-2)},r={...A,features:A.features.slice(A.features.length-2,A.features.length)},a=new g.qH({autoFit:!1}).source(t);a.shape("extrude").color("rgba(84, 239, 241, 0.20)").style({heightfixed:!0,pickLight:!0,opacity:1,raisingHeight:-13e5});const i=new g.qH({autoFit:!1}).source(t);i.shape("extrude").color("rgba(14, 11, 75, 0.58)").style({heightfixed:!0,pickLight:!0,opacity:1,raisingHeight:-11e5});const o=new g.qH({autoFit:!1}).source(t);o.shape("extrude").color("rgba(190, 225, 226, 1)").style({heightfixed:!0,pickLight:!0,opacity:1,raisingHeight:-9e5});const l=new g.qH({autoFit:!1}).source(t);l.shape("extrude").color("rgba(18, 26, 45, 1)").style({heightfixed:!0,pickLight:!0,opacity:1,raisingHeight:-7e5});const d=new g.qH({autoFit:!1}).source(t);d.shape("extrude").color("#111D3C").style({heightfixed:!0,pickLight:!0,opacity:1,raisingHeight:-5e5});const p=new g.qH({autoFit:!1}).source(t);p.shape("extrude").color("#121A2D").style({heightfixed:!0,pickLight:!0,opacity:1,raisingHeight:-3e5});const f=new g.qH({autoFit:!0}).source(t);f.shape("fill").color("rgba(8, 77, 255, 0.60)");const h=new g.PQ({autoFit:!1,zIndex:1}).source(w,{parser:{type:"image",extent:[73.33,17.9,134.85,53.73]}});h.shape("img").style({opacity:1});const y=(new g.S6).source(t).shape("line").color("rgba(43, 100, 255, 1)").size(1).style({raisingHeight:-16e5}),b=(new g.S6).source(t).shape("line").color("rgba(84, 239, 241, 1)").size(1).style({raisingHeight:-12e5}),x=(new g.S6).source(t).shape("line").color("rgba(43, 100, 255, 1)").size(1).style({raisingHeight:-6e5}),S=new g.S6({zIndex:2}).source(t).shape("line").color("#3DC6FF").size(1).style({raisingHeight:0}).scale("density",{type:"quantile"});e.addLayer(a),e.addLayer(i),e.addLayer(o),e.addLayer(l),e.addLayer(d),e.addLayer(p),e.addLayer(h),e.addLayer(f),e.addLayer(y),e.addLayer(b),e.addLayer(x),e.addLayer(S);const E=new g.qH({autoFit:!1}).source(r);E.shape("fill").color("black");const L=new g.S6({zIndex:2}).source(r).shape("line").color("rgba(30, 144, 255, 1)").size(.5).style({raisingHeight:0}).scale("density",{type:"quantile"});e.addLayer(E),e.addLayer(L),n.map((n=>{const r=document.createElement("div");let a="text";r.textContent=n.text;const i=t.features.find((e=>e.properties.name.includes(n.city)));["410000","820000","140000","110000","420000","430000","450000","500000","520000","530000","510000","610000","640000","150000","630000","540000","340000"].includes(i.id)&&(a=`${a} leftText`,n.isLeftOffset=!0),["620000","640000","450000","440000","120000","340000","510000","150000","320000"].includes(i.id)&&(a=`${a} topText`,n.isTopOffset=!0),r.className=a,r.onclick=e=>{n.width=r.getBoundingClientRect().width,((e,t)=>{e.stopPropagation(),(0,m.isEqual)(t,c.current)?s(null):(s(t),u({left:`${(0,m.toNumber)(e.target.style.left.replace("px",""))+24}px`,top:`${(0,m.toNumber)(e.target.style.top.replace("px",""))+28}px`}))})(e,n)};const o=document.createElement("img");o.src=v,o.className="iconImg";const l=i.properties.center;let d=l[1];["530000","520000","430000","360000","330000","610000","370000","130000"].includes(i.id)&&(d-=1);const p=new g.pH({element:r}).setLnglat({lng:l[0],lat:d}),f=new g.pH({element:o}).setLnglat({lng:l[0],lat:d});e.addMarker(p),e.addMarker(f)}))})),()=>{e.destroy()}}),[]),(0,d.useEffect)((()=>{var e;const t=e=>{i.current&&e.composedPath().includes(i.current)||s(null)};return null===(e=document)||void 0===e||e.addEventListener("click",t),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("click",t)}}),[]),(0,d.useEffect)((()=>{c.current=(0,m.cloneDeep)(o),t(!(0,m.isEmpty)(o),o)}),[o]),p().createElement("div",null,p().createElement("div",{id:"map",ref:a,className:"map"}),o&&p().createElement("div",{className:"detailContent",onClick:e=>{e.stopPropagation()},style:{..."textBottom"===o.detailDisplayLocation?{left:l.left,top:l.top,transform:`translate(${o.isLeftOffset?-o.width:0}px, ${o.isTopOffset?-50:-40}px)`}:{transform:"translate(-50%, 0%)",top:"50%",left:"50%"},...r}},p().createElement("slot",{name:"detail",ref:i})))}r=R,({e:[E,L,k,C,H,z,T,j],c:[I,S]}=(0,u.A)(r,[O("data-view.china-map-chart",{styleTexts:[x.A]})],[[q({attribute:!1}),1,"dataSource"],[q({attribute:!1}),1,"detailContentStyle"],[F({type:"detail.open.change"}),1,"openChangeEvent",e=>(0,l.A)(M,e),(e,t)=>(0,c.A)(M,e,t)]],0,(e=>_.has((0,o.A)(e))),h.ReactNextElement)),S()},40935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,a,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(o[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),a&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=a):u[4]="".concat(a)),t.push(u))}},t}},36758:e=>{e.exports=function(e){return e[1]}},62740:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(17545),a=n(26902);function i(e,t,n){"symbol"==(0,r.A)(t)&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch(e){}return e}var o=n(11369);function s(e,t,n,s,c,l){var u,d,p,f,h,g,y,m=Symbol.metadata||Symbol.for("Symbol.metadata"),v=Object.defineProperty,b=Object.create,w=[b(null),b(null)],A=t.length;function x(t,n,r){return function(a,i){n&&(i=a,a=e);for(var o=0;o<t.length;o++)i=t[o].apply(a,r?[i]:[]);return r?i:a}}function S(e,t,n,r){if("function"!=typeof e&&(r||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return e}function E(e,t,n,a,o,s,c,l,p,f,h){function g(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var y=[].concat(t[0]),m=t[3],b=!c,A=1===o,E=3===o,L=4===o,k=2===o;function C(t,n,r){return function(a,i){return n&&(i=a,a=e),r&&r(a),H[t].call(a,i)}}if(!b){var H={},z=[],T=E?"get":L||A?"set":"value";if(p?(f||A?H={get:i((function(){return m(this)}),a,"get"),set:function(e){t[4](this,e)}}:H[T]=m,f||i(H[T],a,k?"":T)):f||(H=Object.getOwnPropertyDescriptor(e,a)),!f&&!p){if((d=w[+l][a])&&7!=(d^o))throw Error("Decorating two elements with the same name ("+H[T].name+") is not supported yet");w[+l][a]=o<3?1:o}}for(var j=e,O=y.length-1;O>=0;O-=n?2:1){var q=S(y[O],"A decorator","be",!0),F=n?y[O-1]:void 0,I={},D={kind:["field","accessor","method","getter","setter","class"][o],name:a,metadata:u,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");S(t,"An initializer","be",!0),s.push(t)}.bind(null,I)};if(b)d=q.call(F,j,D),I.v=1,S(d,"class decorators","return")&&(j=d);else if(D.static=l,D.private=p,d=D.access={has:p?h.bind():function(e){return a in e}},L||(d.get=p?k?function(e){return g(e),H.value}:C("get",0,g):function(e){return e[a]}),k||E||(d.set=p?C("set",0,g):function(e,t){e[a]=t}),j=q.call(F,A?{get:H.get,set:H.set}:H[T],D),I.v=1,A){if("object"==(0,r.A)(j)&&j)(d=S(j.get,"accessor.get"))&&(H.get=d),(d=S(j.set,"accessor.set"))&&(H.set=d),(d=S(j.init,"accessor.init"))&&z.unshift(d);else if(void 0!==j)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else S(j,(f?"field":"method")+" decorators","return")&&(f?z.unshift(j):H[T]=j)}return o<2&&c.push(x(z,l,1),x(s,l,0)),f||b||(p?A?c.splice(-1,0,C("get",l),C("set",l)):c.push(k?H[T]:S.call.bind(H[T])):v(e,a,H)),j}function L(e){return v(e,m,{configurable:!0,enumerable:!0,value:u})}return void 0!==l&&(u=l[m]),u=b(null==u?null:u),h=[],g=function(e){e&&h.push(x(e))},y=function(t,r){for(var i=0;i<n.length;i++){var s=n[i],l=s[1],u=7&l;if((8&l)==t&&!u==r){var d=s[2],g=!!s[3],y=16&l;E(t?e:e.prototype,s,y,g?"#"+d:(0,o.A)(d),u,u<2?[]:t?f=f||[]:p=p||[],h,!!t,g,r,t&&g?function(t){return(0,a.A)(t)===e}:c)}}},y(8,0),y(0,0),y(8,1),y(0,1),g(p),g(f),d=h,A||L(e),{e:d,get c(){var n=[];return A&&[L(e=E(e,[t],s,e.name,5,n)),x(n,1)]}}}},12559:(e,t,n)=>{function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},26902:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(17545);function a(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?(0,r.A)(e):"null"));return e}},72016:(e,t,n)=>{function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},70829:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(12559);function a(e,t){return e.get((0,r.A)(e,t))}},70918:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(72016);function a(e,t,n){(0,r.A)(e,t),t.set(e,n)}},86121:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(12559);function a(e,t,n){return e.set((0,r.A)(e,t),n),n}},11369:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(17545);function a(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=(0,r.A)(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},17545:(e,t,n)=>{function r(e){return r="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},r(e)}n.d(t,{A:()=>r})}}]);
|
|
2
|
+
//# sourceMappingURL=china-map-chart.eb43bf10.js.map
|