@next-bricks/data-view 1.3.16 → 1.4.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 +11 -7
- package/dist/chunks/2836.358bb597.js +2 -0
- package/dist/chunks/2836.358bb597.js.map +1 -0
- package/dist/chunks/8847.9be1eec6.js +2 -0
- package/dist/chunks/8847.9be1eec6.js.map +1 -0
- package/dist/chunks/cabinet-container.95ec63e8.js +3 -0
- package/dist/chunks/cabinet-container.95ec63e8.js.map +1 -0
- package/dist/chunks/cabinet-thumbnail.dc01323b.js +3 -0
- package/dist/chunks/cabinet-thumbnail.dc01323b.js.map +1 -0
- package/dist/chunks/crystal-ball-indicator.269b1f6d.js +2 -0
- package/dist/chunks/crystal-ball-indicator.269b1f6d.js.map +1 -0
- package/dist/chunks/loading-panel.b7f40435.js +2 -0
- package/dist/chunks/loading-panel.b7f40435.js.map +1 -0
- package/dist/chunks/main.dacb91a2.js +2 -0
- package/dist/chunks/{main.ea6494ac.js.map → main.dacb91a2.js.map} +1 -1
- package/dist/chunks/modern-style-treemap.0b40defb.js +3 -0
- package/dist/chunks/modern-style-treemap.0b40defb.js.map +1 -0
- package/dist/chunks/progress-bar-list.b788a7ce.js +2 -0
- package/dist/chunks/progress-bar-list.b788a7ce.js.map +1 -0
- package/dist/examples.json +18 -15
- package/dist/images/9111af40.png +0 -0
- package/dist/images/9514fc4d.png +0 -0
- package/dist/images/c5f34792.png +0 -0
- package/dist/images/e4eec39c.png +0 -0
- package/dist/index.fefb1c64.js +2 -0
- package/dist/index.fefb1c64.js.map +1 -0
- package/dist/manifest.json +136 -102
- package/dist/media/78c4b1bd.ttf +0 -0
- package/dist/media/792b07b2.ttf +0 -0
- package/dist/media/b43f5418.mp4 +0 -0
- package/dist/types.json +242 -124
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/crystal-ball-indicator/index.d.ts +42 -0
- package/dist-types/crystal-ball-indicator/index.spec.d.ts +1 -0
- package/docs/crystal-ball-indicator.md +37 -0
- package/package.json +2 -2
- package/dist/chunks/4263.abcf0070.js +0 -2
- package/dist/chunks/4263.abcf0070.js.map +0 -1
- package/dist/chunks/859.3b3455b0.js +0 -2
- package/dist/chunks/859.3b3455b0.js.map +0 -1
- package/dist/chunks/cabinet-container.bc8cb288.js +0 -3
- package/dist/chunks/cabinet-container.bc8cb288.js.map +0 -1
- package/dist/chunks/cabinet-thumbnail.d6c2b232.js +0 -3
- package/dist/chunks/cabinet-thumbnail.d6c2b232.js.map +0 -1
- package/dist/chunks/loading-panel.4b9cfaa7.js +0 -2
- package/dist/chunks/loading-panel.4b9cfaa7.js.map +0 -1
- package/dist/chunks/main.ea6494ac.js +0 -2
- package/dist/chunks/modern-style-treemap.1dcda45a.js +0 -3
- package/dist/chunks/modern-style-treemap.1dcda45a.js.map +0 -1
- package/dist/chunks/progress-bar-list.3b337de3.js +0 -2
- package/dist/chunks/progress-bar-list.3b337de3.js.map +0 -1
- package/dist/index.e3b2ea1a.js +0 -2
- package/dist/index.e3b2ea1a.js.map +0 -1
- /package/dist/chunks/{cabinet-container.bc8cb288.js.LICENSE.txt → cabinet-container.95ec63e8.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-thumbnail.d6c2b232.js.LICENSE.txt → cabinet-thumbnail.dc01323b.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{modern-style-treemap.1dcda45a.js.LICENSE.txt → modern-style-treemap.0b40defb.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([[8847],{20062:e=>{e.exports=function(e,n){return n||(n={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),n.hash&&(e+=n.hash),/["'() \t\n]|(%20)/.test(e)||n.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},72591:e=>{var n=[];function t(e){for(var t=-1,r=0;r<n.length;r++)if(n[r].identifier===e){t=r;break}return t}function r(e,r){for(var i={},a=[],u=0;u<e.length;u++){var c=e[u],f=r.base?c[0]+r.base:c[0],s=i[f]||0,l="".concat(f," ").concat(s);i[f]=s+1;var h=t(l),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)n[h].references++,n[h].updater(d);else{var p=o(d,r);r.byIndex=u,n.splice(u,0,{identifier:l,updater:p,references:1})}a.push(l)}return a}function o(e,n){var t=n.domAPI(n);return t.update(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap&&n.supports===e.supports&&n.layer===e.layer)return;t.update(e=n)}else t.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var u=t(i[a]);n[u].references--}for(var c=r(e,o),f=0;f<i.length;f++){var s=t(i[f]);0===n[s].references&&(n[s].updater(),n.splice(s,1))}i=c}}},88128:e=>{var n={};e.exports=function(e,t){var r=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}},93051:e=>{e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},30855:(e,n,t)=>{e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},1740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var r="";t.supports&&(r+="@supports (".concat(t.supports,") {")),t.media&&(r+="@media ".concat(t.media," {"));var o=void 0!==t.layer;o&&(r+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),r+=t.css,o&&(r+="}"),t.media&&(r+="}"),t.supports&&(r+="}");var i=t.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),n.styleTagTransform(r,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},73656:e=>{e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},37604:(e,n,t)=>{function r(e){var n=0,t=e.children,r=t&&t.length;if(r)for(;--r>=0;)n+=t[r].value;else n=1;e.value=n}function o(e,n){e instanceof Map?(e=[void 0,e],void 0===n&&(n=a)):void 0===n&&(n=i);for(var t,r,o,u,s,l=new f(e),h=[l];t=h.pop();)if((o=n(t.data))&&(s=(o=Array.from(o)).length))for(t.children=o,u=s-1;u>=0;--u)h.push(r=o[u]=new f(o[u])),r.parent=t,r.depth=t.depth+1;return l.eachBefore(c)}function i(e){return e.children}function a(e){return Array.isArray(e)?e[1]:null}function u(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function c(e){var n=0;do{e.height=n}while((e=e.parent)&&e.height<++n)}function f(e){this.data=e,this.depth=this.height=0,this.parent=null}t.d(n,{Ay:()=>o}),f.prototype=o.prototype={constructor:f,count:function(){return this.eachAfter(r)},each:function(e,n){let t=-1;for(const r of this)e.call(n,r,++t,this);return this},eachAfter:function(e,n){for(var t,r,o,i=this,a=[i],u=[],c=-1;i=a.pop();)if(u.push(i),t=i.children)for(r=0,o=t.length;r<o;++r)a.push(t[r]);for(;i=u.pop();)e.call(n,i,++c,this);return this},eachBefore:function(e,n){for(var t,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(n,o,++a,this),t=o.children)for(r=t.length-1;r>=0;--r)i.push(t[r]);return this},find:function(e,n){let t=-1;for(const r of this)if(e.call(n,r,++t,this))return r},sum:function(e){return this.eachAfter((function(n){for(var t=+e(n.data)||0,r=n.children,o=r&&r.length;--o>=0;)t+=r[o].value;n.value=t}))},sort:function(e){return this.eachBefore((function(n){n.children&&n.children.sort(e)}))},path:function(e){for(var n=this,t=function(e,n){if(e===n)return e;var t=e.ancestors(),r=n.ancestors(),o=null;for(e=t.pop(),n=r.pop();e===n;)o=e,e=t.pop(),n=r.pop();return o}(n,e),r=[n];n!==t;)n=n.parent,r.push(n);for(var o=r.length;e!==t;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,n=[e];e=e.parent;)n.push(e);return n},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(n){n.children||e.push(n)})),e},links:function(){var e=this,n=[];return e.each((function(t){t!==e&&n.push({source:t.parent,target:t})})),n},copy:function(){return o(this).eachBefore(u)},[Symbol.iterator]:function*(){var e,n,t,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,n=o.children)for(t=0,r=n.length;t<r;++t)i.push(n[t])}while(i.length)}}},16399:(e,n,t)=>{function r(e,n,t,r,o){var i,a,u=e.children,c=u.length,f=new Array(c+1);for(f[0]=a=i=0;i<c;++i)f[i+1]=a+=u[i].value;!function e(n,t,r,o,i,a,c){if(n>=t-1){var s=u[n];return s.x0=o,s.y0=i,s.x1=a,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=t-1;d<p;){var v=d+p>>>1;f[v]<h?d=v+1:p=v}h-f[d-1]<f[d]-h&&n+1<d&&--d;var g=f[d]-l,y=r-g;if(a-o>c-i){var m=r?(o*y+a*g)/r:a;e(n,d,g,o,i,m,c),e(d,t,y,m,i,a,c)}else{var x=r?(i*y+c*g)/r:c;e(n,d,g,o,i,a,x),e(d,t,y,o,x,a,c)}}(0,c,e.value,n,t,r,o)}t.d(n,{A:()=>r})},61997:(e,n,t)=>{function r(e,n,t,r,o){for(var i,a=e.children,u=-1,c=a.length,f=e.value&&(r-n)/e.value;++u<c;)(i=a[u]).y0=t,i.y1=o,i.x0=n,i.x1=n+=i.value*f}t.d(n,{A:()=>r})},1696:(e,n,t)=>{function r(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}t.d(n,{A:()=>u});var o=t(54960);function i(){return 0}function a(e){return function(){return e}}function u(){var e=o.Ay,n=!1,t=1,u=1,c=[0],f=i,s=i,l=i,h=i,d=i;function p(e){return e.x0=e.y0=0,e.x1=t,e.y1=u,e.eachBefore(v),c=[0],n&&e.eachBefore(r),e}function v(n){var t=c[n.depth],r=n.x0+t,o=n.y0+t,i=n.x1-t,a=n.y1-t;i<r&&(r=i=(r+i)/2),a<o&&(o=a=(o+a)/2),n.x0=r,n.y0=o,n.x1=i,n.y1=a,n.children&&(t=c[n.depth+1]=f(n)/2,r+=d(n)-t,o+=s(n)-t,(i-=l(n)-t)<r&&(r=i=(r+i)/2),(a-=h(n)-t)<o&&(o=a=(o+a)/2),e(n,r,o,i,a))}return p.round=function(e){return arguments.length?(n=!!e,p):n},p.size=function(e){return arguments.length?(t=+e[0],u=+e[1],p):[t,u]},p.tile=function(n){return arguments.length?(e=function(e){if("function"!=typeof e)throw new Error;return e}(n),p):e},p.padding=function(e){return arguments.length?p.paddingInner(e).paddingOuter(e):p.paddingInner()},p.paddingInner=function(e){return arguments.length?(f="function"==typeof e?e:a(+e),p):f},p.paddingOuter=function(e){return arguments.length?p.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):p.paddingTop()},p.paddingTop=function(e){return arguments.length?(s="function"==typeof e?e:a(+e),p):s},p.paddingRight=function(e){return arguments.length?(l="function"==typeof e?e:a(+e),p):l},p.paddingBottom=function(e){return arguments.length?(h="function"==typeof e?e:a(+e),p):h},p.paddingLeft=function(e){return arguments.length?(d="function"==typeof e?e:a(+e),p):d},p}},46793:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(61997),o=t(67766),i=t(54960);const a=function e(n){function t(e,t,a,u,c){if((f=e._squarify)&&f.ratio===n)for(var f,s,l,h,d,p=-1,v=f.length,g=e.value;++p<v;){for(l=(s=f[p]).children,h=s.value=0,d=l.length;h<d;++h)s.value+=l[h].value;s.dice?(0,r.A)(s,t,a,u,g?a+=(c-a)*s.value/g:c):(0,o.A)(s,t,a,g?t+=(u-t)*s.value/g:u,c),g-=s.value}else e._squarify=f=(0,i.AI)(n,e,t,a,u,c),f.ratio=n}return t.ratio=function(n){return e((n=+n)>1?n:1)},t}(i.U1)},67766:(e,n,t)=>{function r(e,n,t,r,o){for(var i,a=e.children,u=-1,c=a.length,f=e.value&&(o-t)/e.value;++u<c;)(i=a[u]).x0=n,i.x1=r,i.y0=t,i.y1=t+=i.value*f}t.d(n,{A:()=>r})},6849:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(61997),o=t(67766);function i(e,n,t,i,a){(1&e.depth?o.A:r.A)(e,n,t,i,a)}},54960:(e,n,t)=>{t.d(n,{AI:()=>a,Ay:()=>u,U1:()=>i});var r=t(61997),o=t(67766),i=(1+Math.sqrt(5))/2;function a(e,n,t,i,a,u){for(var c,f,s,l,h,d,p,v,g,y,m,x=[],A=n.children,b=0,w=0,M=A.length,T=n.value;b<M;){s=a-t,l=u-i;do{h=A[w++].value}while(!h&&w<M);for(d=p=h,m=h*h*(y=Math.max(l/s,s/l)/(T*e)),g=Math.max(p/m,m/d);w<M;++w){if(h+=f=A[w].value,f<d&&(d=f),f>p&&(p=f),m=h*h*y,(v=Math.max(p/m,m/d))>g){h-=f;break}g=v}x.push(c={value:h,dice:s<l,children:A.slice(b,w)}),c.dice?(0,r.A)(c,t,i,a,T?i+=l*h/T:u):(0,o.A)(c,t,i,T?t+=s*h/T:a,u),T-=h,b=w}return x}const u=function e(n){function t(e,t,r,o,i){a(n,e,t,r,o,i)}return t.ratio=function(n){return e((n=+n)>1?n:1)},t}(i)}}]);
|
|
2
|
+
//# sourceMappingURL=8847.9be1eec6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/8847.9be1eec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,EAAU,CAAEJ,GAAYD,EAAW,KAAO,CACzDK,EAAWD,CACb,CAGAZ,EAAKxJ,KAAK0J,EAAM,CAACrG,MAAO4G,EAAUL,KAAMzB,EAAKC,EAAIhF,SAAUa,EAAMhG,MAAMuM,EAAIC,KACvEf,EAAIE,MAAM,OAAYF,EAAK5C,EAAIC,EAAIC,EAAI3D,EAAQ0D,GAAMqB,EAAK6B,EAAW5G,EAAQ4D,IAC5E,OAAayC,EAAK5C,EAAIC,EAAI1D,EAAQyD,GAAMqB,EAAK8B,EAAW5G,EAAQ2D,EAAIC,GACzE5D,GAAS4G,EAAUO,EAAKC,CAC1B,CAEA,OAAOjB,CACT,CAEA,QAAe,SAAUH,EAAOC,GAE9B,SAASpB,EAAS7D,EAAQyC,EAAIC,EAAIC,EAAIC,GACpC8C,EAAcT,EAAOjF,EAAQyC,EAAIC,EAAIC,EAAIC,EAC3C,CAMA,OAJAiB,EAASoB,MAAQ,SAAStB,GACxB,OAAOqB,GAAQrB,GAAKA,GAAK,EAAIA,EAAI,EACnC,EAEOE,CACR,CAXD,CAWG2B,E","sources":["webpack:///../../node_modules/css-loader/dist/runtime/getUrl.js","webpack:///../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack:///../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack:///../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack:///../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack:///../../node_modules/style-loader/dist/runtime/styleTagTransform.js","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":["\"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};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","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":["module","exports","url","options","String","__esModule","default","test","slice","hash","needQuotes","concat","replace","stylesInDOM","getIndexByIdentifier","identifier","result","i","length","modulesToDom","list","idCountMap","identifiers","item","id","base","count","indexByIdentifier","obj","css","media","sourceMap","supports","layer","references","updater","addElementStyle","byIndex","splice","push","api","domAPI","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","insert","style","target","styleTarget","document","querySelector","window","HTMLIFrameElement","contentDocument","head","e","getTarget","Error","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","needLayer","btoa","unescape","encodeURIComponent","JSON","stringify","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","node","sum","children","value","hierarchy","data","Map","undefined","mapChildren","objectChildren","child","childs","n","root","Node","nodes","pop","Array","from","parent","depth","eachBefore","computeHeight","d","isArray","copyData","height","this","prototype","constructor","eachAfter","each","callback","that","call","next","find","sort","compare","path","end","start","ancestor","a","b","aNodes","ancestors","bNodes","c","leastCommonAncestor","k","descendants","leaves","links","source","copy","Symbol","iterator","current","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","arguments","size","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"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see cabinet-container.95ec63e8.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:()=>V,CabinetContainerComponent:()=>Q});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),d=r.n(b),g=r(24295),u=r(10300),f=r(79935),v=r(21053),w=r(53373),x=r.n(w),m=r(71037);let k,y,C,A,W,z,M,E,T,N,S,R,D,_,H,O,j;const{defineElement:P,property:B,event:Z}=(0,u.createDecorators)(),L=(0,g.wrapBrick)("data-view.cabinet-node");let V;var $=new WeakMap,X=new WeakMap,q=new WeakMap,F=new WeakMap,G=new WeakMap,I=new WeakSet,J=new WeakMap;class K extends g.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,I),(0,o.A)(this,$,y(this,"host")),(0,o.A)(this,X,(C(this),A(this,[]))),(0,o.A)(this,q,(W(this),z(this))),(0,o.A)(this,F,(M(this),E(this))),(0,o.A)(this,G,(T(this),N(this))),(0,o.A)(this,J,(D(this),_(this))),(0,i.A)(this,"handleClick",(j(this),e=>{(0,s.A)(I,this,S).emit(e)})),(0,i.A)(this,"handleDbClick",(e=>{(0,s.A)(I,this,H).emit(e)}))}get type(){return(0,p.A)($,this)}set type(e){(0,c.A)($,this,e)}get data(){return(0,p.A)(X,this)}set data(e){(0,c.A)(X,this,e)}get status(){return(0,p.A)(q,this)}set status(e){(0,c.A)(q,this,e)}get customTitle(){return(0,p.A)(F,this)}set customTitle(e){(0,c.A)(F,this,e)}render(){return d().createElement(Q,{type:this.type,data:this.data,status:this.status,customTitle:this.customTitle,handleClick:this.handleClick,handleDbClick:this.handleDbClick})}}function Q(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)(),g=(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?g(c,s,h,o):h<p?g(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}=g(a,n,i,o);return{width:Math.floor(e/t),itemWidth:Math.max(e/t-10,56)}}}),[r.length,p,h,g]),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 d().createElement("div",{className:x()("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")},d().createElement("div",{className:x()("container",{hostContainer:"host"===t||"k8s-blue"===t,k8sContainer:"k8s"===t},a&&`container-${a}`)},d().createElement("div",{className:"content"},d().createElement("div",{className:"contentLayout"},r.map(((e,t)=>d().createElement("div",{key:t,className:"itemContent",style:{width:null==u?void 0:u.width}},d().createElement("div",{className:"item",style:{width:null==u?void 0:u.itemWidth},onClick:t=>f(t,e,"node"),onDoubleClick:t=>v(t,e,"node")},d().createElement(L,{type:e.type,nodeTitle:e.nodeTitle,status:e.status,isAlert:e.isAlert}))))))),i&&d().createElement("div",{className:"footer"},d().createElement("div",{className:"footerTitle"},i))))}a=K,({e:[y,C,A,W,z,M,E,T,N,S,R,D,_,H,O,j],c:[V,k]}=(0,h.A)(a,[P("data-view.cabinet-container",{styleTexts:[f.A,v.A]})],[[B({attribute:!1}),1,"type"],[B({attribute:!1}),1,"data"],[B(),1,"status"],[B(),1,"customTitle"],[Z({type:"container.click"}),1,"onHandleClick",e=>(0,p.A)(G,e),(e,t)=>(0,c.A)(G,e,t)],[Z({type:"container.dbclick"}),1,"onHandleDbClick",e=>(0,p.A)(J,e),(e,t)=>(0,c.A)(J,e,t)]],0,(e=>I.has((0,l.A)(e))),g.ReactNextElement)),k()},71037:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i.Z,w:()=>a.w});var a=r(83411),i=r(45080)},45080:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var a=r(18769);function i(e){const t=(0,a.useRef)();return(0,a.useEffect)((()=>{t.current=e})),t.current}},83411:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});var a=r(18769),i=r(18049);function n(e){const{targetRef:t,onResize:r}=e||{},n=(0,a.useRef)(),o=null!=t?t:n,[l,s]=(0,a.useState)({clientWidth:0,clientHeight:0}),c=(0,a.useCallback)((e=>{const{target:t}=e,{clientWidth:a=0,clientHeight:i=0}=t;s((t=>t.clientWidth===a&&t.clientHeight===i?t:(null==r||r(e),{clientWidth:a,clientHeight:i})))}),[r]);return(0,a.useEffect)((()=>{if("object"!=typeof o||null===o||!(o.current instanceof Element))throw new Error("ResizeObserver must observe an Element");const e=o.current;return(0,i.lB)(e,c),()=>{(0,i.OV)(e,c)}}),[c,o]),[o,{...l}]}},18049:(e,t,r)=>{"use strict";r.d(t,{OV:()=>l,lB:()=>o});var a=r(99126);const i=new Map,n=new a.A((e=>{e.forEach((e=>{var t;const{target:r}=e;null===(t=i.get(r))||void 0===t||t.forEach((t=>t(e)))}))})),o=(e,t)=>{i.has(e)||(i.set(e,new Set),n.observe(e)),i.get(e).add(t)},l=(e,t)=>{i.has(e)&&(i.get(e).delete(t),0===i.get(e).size&&(n.unobserve(e),i.delete(e)))}},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.95ec63e8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/cabinet-container.95ec63e8.js","mappings":";qbASA,MAAM,cAAEA,EAAa,SAAEC,EAAQ,MAAEC,IAAUC,EAAAA,EAAAA,oBAErCC,GAAcC,EAAAA,EAAAA,WAClB,0BACA,IAAAC,EAAA,IAAAC,EAAA,IAAAC,QAAAC,E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D,KAAOyD,EACXJ,EAAOa,KAAKT,EAAKzD,IAAQyD,EAAIzD,KAChCuD,EAAUG,EAAYH,EAASvD,IAIjC,OAAOuD,CACR,CAEA,SAASG,EAAaS,EAAOC,GAC5B,OAAKA,EAIDD,EACIA,EAAQ,IAAMC,EAGfD,EAAQC,EAPPD,CAQT,CAEqCjB,EAAOmB,SAC3CjF,EAAWkF,QAAUlF,EACrB8D,EAAOmB,QAAUjF,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CArEA,gECNe,SAAShE,EAAoBmJ,EAAGC,EAAGC,GAChD,OAAOA,GAAE,OAAiBF,EAAGC,GAC/B,gECFe,SAASpK,EAA4BsK,EAAKC,IACvD,OAA0BD,EAAKC,GAC/BA,EAAW7B,IAAI4B,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/usePrevious/index.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.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 {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","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 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","// 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","usePrevious","useEffect","targetRef","onResize","localRef","size","setSize","useState","handleResize","entry","target","prev","Element","Error","element","observe","unobserve","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","_elementListeners$get","get","callback","set","Set","add","delete","___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.dc01323b.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3158],{88393:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CabinetThumbnail:()=>T,CabinetThumbnailComponent:()=>L});var a,l=r(70918),n=r(86121),i=r(70829),o=r(62740),s=r(18769),c=r.n(s),p=r(24295),b=r(10300),g=r(53373),u=r.n(g),h=r(79935),d=r(45097),f=r(71037);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:r,appName:a}=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&&r>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,r]),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:a}),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(${r},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)))))))))}a=R,({e:[v,m,w,y,k,z],c:[T,x]}=(0,o.A)(a,[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()},71037:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l.Z,w:()=>a.w});var a=r(83411),l=r(45080)},45080:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var a=r(18769);function l(e){const t=(0,a.useRef)();return(0,a.useEffect)((()=>{t.current=e})),t.current}},83411:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});var a=r(18769),l=r(18049);function n(e){const{targetRef:t,onResize:r}=e||{},n=(0,a.useRef)(),i=null!=t?t:n,[o,s]=(0,a.useState)({clientWidth:0,clientHeight:0}),c=(0,a.useCallback)((e=>{const{target:t}=e,{clientWidth:a=0,clientHeight:l=0}=t;s((t=>t.clientWidth===a&&t.clientHeight===l?t:(null==r||r(e),{clientWidth:a,clientHeight:l})))}),[r]);return(0,a.useEffect)((()=>{if("object"!=typeof i||null===i||!(i.current instanceof Element))throw new Error("ResizeObserver must observe an Element");const e=i.current;return(0,l.lB)(e,c),()=>{(0,l.OV)(e,c)}}),[c,i]),[i,{...o}]}},18049:(e,t,r)=>{"use strict";r.d(t,{OV:()=>o,lB:()=>i});var a=r(99126);const l=new Map,n=new a.A((e=>{e.forEach((e=>{var t;const{target:r}=e;null===(t=l.get(r))||void 0===t||t.forEach((t=>t(e)))}))})),i=(e,t)=>{l.has(e)||(l.set(e,new Set),n.observe(e)),l.get(e).add(t)},o=(e,t)=>{l.has(e)&&(l.get(e).delete(t),0===l.get(e).size&&(n.unobserve(e),l.delete(e)))}},45097:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(36758),l=r.n(a),n=r(40935),i=r.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,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(36758),l=r.n(a),n=r(40935),i=r.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 r;!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(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 l.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=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(r=function(){return l}.apply(t,[]))||(e.exports=r)}()}}]);
|
|
3
|
+
//# sourceMappingURL=cabinet-thumbnail.dc01323b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/cabinet-thumbnail.dc01323b.js","mappings":";uXAaA,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,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GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,sgIAAugI,KAEhjI,QAAeH,EAAwBI,0BCPvC,OAOC,WACA,aAEA,IAAIC,EAAS,CAAC,EAAEC,eAEhB,SAASxD,IAGR,IAFA,IAAIyD,EAAU,GAELC,EAAI,EAAGA,EAAIxG,UAAU4B,OAAQ4E,IAAK,CAC1C,IAAIC,EAAMzG,UAAUwG,GAChBC,IACHF,EAAUG,EAAYH,EAASI,EAAWF,IAE5C,CAEA,OAAOF,CACR,CAEA,SAASI,EAAYF,GACpB,GAAmB,iBAARA,GAAmC,iBAARA,EACrC,OAAOA,EAGR,GAAmB,iBAARA,EACV,MAAO,GAGR,GAAIG,MAAMC,QAAQJ,GACjB,OAAO3D,EAAWgE,MAAM,KAAML,GAG/B,GAAIA,EAAIL,WAAaW,OAAOC,UAAUZ,WAAaK,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/usePrevious/index.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.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 {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","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 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","// 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","useEffect","useResizeObserver","targetRef","onResize","localRef","size","setSize","handleResize","useCallback","entry","target","prev","Element","Error","element","observe","unobserve","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","_elementListeners$get","get","callback","has","set","Set","add","delete","___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([[1335],{9557:(e,t,n)=>{n.r(t),n.d(t,{CrystalBallIndicator:()=>C,CrystalBallIndicatorComponent:()=>_});var r,a=n(70918),i=n(86121),o=n(70829),s=n(62740),c=n(18769),l=n.n(c),u=n(10300),p=n(24295),d=(n(44291),n(99126)),m=n(93652),h=(n(95178),n(29837),n(7178));let f,g,v,b,x,y,w,S,A;const E=572,k=16,M=new Intl.NumberFormat("zh-CN",{useGrouping:!0}),N=(0,p.wrapBrick)("eo-tag"),{defineElement:T,property:D}=(0,u.createDecorators)();let C;var I=new WeakMap,z=new WeakMap,L=new WeakMap,P=new WeakMap;class R extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,I,g(this)),(0,a.A)(this,z,(v(this),b(this))),(0,a.A)(this,L,(x(this),y(this))),(0,a.A)(this,P,(w(this),S(this))),A(this)}get dataSource(){return(0,o.A)(I,this)}set dataSource(e){(0,i.A)(I,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)(L,this)}set cornerDataSource(e){(0,i.A)(L,this,e)}get maxScale(){return(0,o.A)(P,this)}set maxScale(e){(0,i.A)(P,this,e)}render(){return l().createElement(_,{root:this,dataSource:this.dataSource,centerDataSource:this.centerDataSource,cornerDataSource:this.cornerDataSource,maxScale:this.maxScale})}}function _(e){let{root:t,dataSource:n,centerDataSource:r,cornerDataSource:a,maxScale:i}=e;const[o,s]=(0,c.useState)(null);(0,c.useEffect)((()=>{const e=new d.A((e=>{for(const n of e)if(n.target===t){const{width:e,height:t}=n.contentRect;s(Math.min(null!=i?i:1,e/810,t/604))}}));return e.observe(t),()=>e.disconnect()}),[i,t]);const u=(0,c.useMemo)((()=>{var e;const t=null!==(e=null==n?void 0:n.slice(0,20))&&void 0!==e?e:[];if(0===t.length)return[];const r=Math.ceil(t.length/2),a=t.length%2==0,i=Math.PI/(r+1),o=E/2,s=o+k;let c,l,u,p=0;const d=[];for(;p<t.length;){const e=t[p];if(p%2==0)u=i*(p/2+1)-Math.PI/2,c=s+o*Math.cos(u),l=s+o*Math.sin(u),d.push({...e,x:c,y:l});else if(a)d.push({...e,x:2*s-c,y:l});else{const t=Math.PI-(u+i/2);d.push({...e,x:s+o*Math.cos(t),y:s+o*Math.sin(t)})}p++}return d}),[n]);return l().createElement(l().Fragment,null,l().createElement("div",{className:"circle-container",style:{visibility:null===o?"hidden":"visible","--scale":o}},l().createElement("div",{className:"ring-container"},l().createElement("div",{className:"ring"}),l().createElement("div",{className:"video-container"},l().createElement("video",{width:352,height:352,autoPlay:!0,muted:!0,loop:!0,playsInline:!0},l().createElement("source",{src:m,type:"video/mp4"})))),u.map(((e,t)=>l().createElement("div",{key:t,className:"ring-labels "+(t%2==0?"even":"odd"),style:{left:e.x,top:e.y}},l().createElement("div",{className:"ring-icon"}),l().createElement("div",{className:"ring-label"},e.label),l().createElement("div",{className:"ring-value"},B(e.value))))),l().createElement("div",{className:"center"},l().createElement("div",{className:"center-label"},null==r?void 0:r.label),l().createElement("div",{className:"center-value"},B(null==r?void 0:r.value)))),l().createElement("div",{className:"corner"},null==a?void 0:a.map(((e,t)=>l().createElement("div",{key:t,className:"corner-item"},l().createElement("div",{className:"corner-label"},e.label),l().createElement(N,{className:"corner-value",outline:!0,color:e.color,tagStyle:{fontSize:18,padding:"2px 16px"}},B(e.value)))))))}function B(e){return"number"==typeof e?M.format(e):e}r=R,({e:[g,v,b,x,y,w,S,A],c:[C,f]}=(0,s.A)(r,[T("data-view.crystal-ball-indicator",{styleTexts:[h.A]})],[[D({attribute:!1}),1,"dataSource"],[D({attribute:!1}),1,"centerDataSource"],[D({attribute:!1}),1,"cornerDataSource"],[D({type:Number}),1,"maxScale"]],0,void 0,p.ReactNextElement)),f()},97136:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(36758),a=n.n(r),i=n(40935),o=n.n(i),s=n(20062),c=n.n(s),l=new URL(n(17577),n.b),u=o()(a()),p=c()(l);u.push([e.id,`@font-face{font-family:ALiBaBaPuHuiTi;src:url(${p})}`,""]);const d=u},59291:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(36758),a=n.n(r),i=n(40935),o=n.n(i),s=n(20062),c=n.n(s),l=new URL(n(59552),n.b),u=o()(a()),p=c()(l);u.push([e.id,`@font-face{font-family:PangMenZhengDaoBiaoTiTi;src:url(${p})}`,""]);const d=u},7178:(e,t,n)=>{n.d(t,{A:()=>b});var r=n(36758),a=n.n(r),i=n(40935),o=n.n(i),s=n(20062),c=n.n(s),l=new URL(n(48362),n.b),u=new URL(n(5578),n.b),p=new URL(n(93893),n.b),d=new URL(n(21949),n.b),m=o()(a()),h=c()(l),f=c()(u),g=c()(p),v=c()(d);m.push([e.id,`:host,\n.circle-container,\n.ring-container,\n.video-container,\n.center{display:flex;align-items:center;justify-content:center}:host{position:relative;color:#fff;height:100%}:host([hidden]){display:none}*{box-sizing:border-box}.circle-container{width:604px;height:604px;padding:16px;position:relative;background:url(${h}) no-repeat;background-position:center;background-size:572px;transform-origin:center;transform:scale(var(--scale));--scale:1}.ring-labels{position:absolute;padding:0 35px;margin-top:-14px;width:max-content}.ring-icon{position:absolute;width:36px;height:36px;background-repeat:no-repeat;background-size:100%;background-position:0 0;top:-4px}.odd{transform:translate(-100%,0);text-align:right}.odd .ring-icon{background-image:url(${f});right:-18px}.even .ring-icon{background-image:url(${g});left:-18px}.ring-label{color:#c8e2ff;font-size:18px}.ring-value{font-family:ALiBaBaPuHuiTi;font-size:28px;text-shadow:0px 4px 7px #514af7}.center{position:absolute;width:100%;height:100%;flex-direction:column;text-shadow:0px 2px 4px rgba(0,0,0,0.5)}.center-label:empty,\n.center-value:empty{display:none}.center-label{font-size:24px;font-weight:600}.center-value{font-family:PangMenZhengDaoBiaoTiTi;font-size:64px}.ring-container{position:relative;width:408px;height:408px}.video-container{border-radius:9999px;width:292px;height:292px;overflow:hidden}.ring{position:absolute;width:100%;height:100%;top:0;left:0;background:url(${v}) no-repeat;background-size:100% 100%;background-position:0 0;animation:ring-rotate 5s linear infinite}.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 ring-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,""]);const b=m.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,n)=>{var r=n(72591),a=n.n(r),i=n(1740),o=n.n(i),s=n(88128),c=n.n(s),l=n(30855),u=n.n(l),p=n(93051),d=n.n(p),m=n(73656),h=n.n(m),f=n(97136),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=o(),g.insertStyleElement=d(),a()(f.A,g),f.A&&f.A.locals&&f.A.locals},29837:(e,t,n)=>{var r=n(72591),a=n.n(r),i=n(1740),o=n.n(i),s=n(88128),c=n.n(s),l=n(30855),u=n.n(l),p=n(93051),d=n.n(p),m=n(73656),h=n.n(m),f=n(59291),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=o(),g.insertStyleElement=d(),a()(f.A,g),f.A&&f.A.locals&&f.A.locals},72591:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},o=[],s=0;s<e.length;s++){var c=e[s],l=r.base?c[0]+r.base:c[0],u=i[l]||0,p="".concat(l," ").concat(u);i[l]=u+1;var d=n(p),m={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(m);else{var h=a(m,r);r.byIndex=s,t.splice(s,0,{identifier:p,updater:h,references:1})}o.push(p)}return o}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var i=r(e=e||[],a=a||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var s=n(i[o]);t[s].references--}for(var c=r(e,a),l=0;l<i.length;l++){var u=n(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=c}}},88128:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},93051:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},30855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},1740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},73656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5578:(e,t,n)=>{e.exports=n.p+"images/9514fc4d.png"},48362:(e,t,n)=>{e.exports=n.p+"images/c5f34792.png"},93652:(e,t,n)=>{e.exports=n.p+"media/b43f5418.mp4"},93893:(e,t,n)=>{e.exports=n.p+"images/9111af40.png"},21949:(e,t,n)=>{e.exports=n.p+"images/e4eec39c.png"},17577:(e,t,n)=>{e.exports=n.p+"media/792b07b2.ttf"},59552:(e,t,n)=>{e.exports=n.p+"media/78c4b1bd.ttf"}}]);
|
|
2
|
+
//# sourceMappingURL=crystal-ball-indicator.269b1f6d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/crystal-ball-indicator.269b1f6d.js","mappings":"4YAWA,MAAMA,EAAY,IACZC,EAAc,GAEdC,EAAkB,IAAIC,KAAKC,aAAa,QAAS,CACrDC,aAAa,IAGTC,GAAaC,EAAAA,EAAAA,WAAyB,WAEtC,cAAEC,EAAa,SAAEC,IAAaC,EAAAA,EAAAA,oBAAmB,IAAAC,EAAA,IAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QA2BvD,MAAAI,UAIUC,EAAAA,iBAEVC,WAAAA,GAAA,SAAAC,YACEC,EAAAA,EAAAA,GAAA,KAAAT,EAAAU,EAAA,QAIAD,EAAAA,EAAAA,GAAA,KAAAP,GAAAS,EAAA,MAAAC,EAAA,SAIAH,EAAAA,EAAAA,GAAA,KAAAN,GAAAU,EAAA,MAAAC,EAAA,SAMAL,EAAAA,EAAAA,GAAA,KAAAL,GAAAW,EAAA,MAAAC,EAAA,QAAAC,EAAA,oBAZSC,GAAU,OAAAC,EAAAA,EAAAA,GAAAnB,EAAA,oBAAVkB,CAAUE,IAAAC,EAAAA,EAAAA,GAAArB,EAAA,KAAAoB,EAAA,qBAIVE,GAAgB,OAAAH,EAAAA,EAAAA,GAAAjB,EAAA,0BAAhBoB,CAAgBF,IAAAC,EAAAA,E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,EAAaW,YAAYX,EAAae,YAExCf,EAAaJ,YAAYR,SAAS4B,eAAejD,GACnD,CACF,C","sources":["webpack:///./src/crystal-ball-indicator/index.tsx","webpack:///./src/fonts/ALiBaBaPuHuiTi.css","webpack:///./src/fonts/PangMenZhengDaoBiaoTiTi.css","webpack:///./src/crystal-ball-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","webpack:///../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack:///../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack:///../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack:///../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack:///../../node_modules/style-loader/dist/runtime/styleTagTransform.js"],"sourcesContent":["import React, { useEffect, useMemo, useState } from \"react\";\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 crystalBallVideo from \"./assets/crystal-ball.mp4\";\nimport \"../fonts/ALiBaBaPuHuiTi.css\";\nimport \"../fonts/PangMenZhengDaoBiaoTiTi.css\";\nimport styleText from \"./styles.shadow.css\";\n\nconst RING_SIZE = 572;\nconst RING_OFFSET = 16;\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 CrystalBallIndicatorProps {\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}\n\n/**\n * 有水晶球动画的数据展示构件。\n */\nexport\n@defineElement(\"data-view.crystal-ball-indicator\", {\n styleTexts: [styleText],\n})\nclass CrystalBallIndicator\n extends ReactNextElement\n implements CrystalBallIndicatorProps\n{\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 <CrystalBallIndicatorComponent\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 CrystalBallIndicatorComponentProps\n extends CrystalBallIndicatorProps {\n root: CrystalBallIndicator;\n}\n\nexport function CrystalBallIndicatorComponent({\n root,\n dataSource,\n centerDataSource,\n cornerDataSource,\n maxScale,\n}: CrystalBallIndicatorComponentProps) {\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(Math.min(maxScale ?? 1, width / 810, height / 604));\n }\n }\n });\n observer.observe(root);\n return () => observer.disconnect();\n }, [maxScale, root]);\n\n // 计算环上标签的位置\n // 1. 将数据分为两组,分别在环的两侧\n // 2. 索引(从 0 开始)为偶数的数据在右侧,索引为奇数的数据在左侧\n // 3. 总数为偶数时,两侧数据对称,每组数据按照角度均匀分布\n // 4. 总数为奇数时,右侧数据比左侧数据多一个,右侧数据按照角度均匀分布,\n // 左侧第 N 个数据的角度为右侧第 N 个和第 N + 1 个数据的角度的中分角\n const labels = useMemo(() => {\n const clampedData = dataSource?.slice(0, 20) ?? [];\n if (clampedData.length === 0) {\n return [];\n }\n\n const half = Math.ceil(clampedData.length / 2);\n const even = clampedData.length % 2 === 0;\n const arc = Math.PI / (half + 1);\n const radius = RING_SIZE / 2;\n const center = radius + RING_OFFSET;\n\n let index = 0;\n let x: number;\n let y: number;\n let angle: number;\n const result: DataItemWithPosition[] = [];\n while (index < clampedData.length) {\n const item = clampedData[index];\n if (index % 2 === 0) {\n angle = arc * (index / 2 + 1) - Math.PI / 2;\n x = center + radius * Math.cos(angle);\n y = center + radius * Math.sin(angle);\n result.push({ ...item, x, y });\n } else if (even) {\n result.push({ ...item, x: center * 2 - x, y });\n } else {\n const oddAngle = Math.PI - (angle + arc / 2);\n result.push({\n ...item,\n x: center + radius * Math.cos(oddAngle),\n y: center + radius * Math.sin(oddAngle),\n });\n }\n index++;\n }\n return result;\n }, [dataSource]);\n\n return (\n <>\n <div\n className=\"circle-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=\"ring-container\">\n <div className=\"ring\"></div>\n <div className=\"video-container\">\n <video width={352} height={352} autoPlay muted loop playsInline>\n <source src={crystalBallVideo} type=\"video/mp4\" />\n </video>\n </div>\n </div>\n {labels.map((item, index) => (\n <div\n key={index}\n className={`ring-labels ${index % 2 === 0 ? \"even\" : \"odd\"}`}\n style={{\n left: item.x,\n top: item.y,\n }}\n >\n <div className=\"ring-icon\"></div>\n <div className=\"ring-label\">{item.label}</div>\n <div className=\"ring-value\">{formatValue(item.value)}</div>\n </div>\n ))}\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>\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","// 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/circle-bg.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"./assets/blue-dot.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"./assets/green-dot.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_3___ = new URL(\"./assets/ring-arc.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___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host,\n.circle-container,\n.ring-container,\n.video-container,\n.center{display:flex;align-items:center;justify-content:center}:host{position:relative;color:#fff;height:100%}:host([hidden]){display:none}*{box-sizing:border-box}.circle-container{width:604px;height:604px;padding:16px;position:relative;background:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) no-repeat;background-position:center;background-size:572px;transform-origin:center;transform:scale(var(--scale));--scale:1}.ring-labels{position:absolute;padding:0 35px;margin-top:-14px;width:max-content}.ring-icon{position:absolute;width:36px;height:36px;background-repeat:no-repeat;background-size:100%;background-position:0 0;top:-4px}.odd{transform:translate(-100%,0);text-align:right}.odd .ring-icon{background-image:url(${___CSS_LOADER_URL_REPLACEMENT_1___});right:-18px}.even .ring-icon{background-image:url(${___CSS_LOADER_URL_REPLACEMENT_2___});left:-18px}.ring-label{color:#c8e2ff;font-size:18px}.ring-value{font-family:ALiBaBaPuHuiTi;font-size:28px;text-shadow:0px 4px 7px #514af7}.center{position:absolute;width:100%;height:100%;flex-direction:column;text-shadow:0px 2px 4px rgba(0,0,0,0.5)}.center-label:empty,\n.center-value:empty{display:none}.center-label{font-size:24px;font-weight:600}.center-value{font-family:PangMenZhengDaoBiaoTiTi;font-size:64px}.ring-container{position:relative;width:408px;height:408px}.video-container{border-radius:9999px;width:292px;height:292px;overflow:hidden}.ring{position:absolute;width:100%;height:100%;top:0;left:0;background:url(${___CSS_LOADER_URL_REPLACEMENT_3___}) no-repeat;background-size:100% 100%;background-position:0 0;animation:ring-rotate 5s linear infinite}.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 ring-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`, \"\"]);\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","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;"],"names":["RING_SIZE","RING_OFFSET","numberFormatter","Intl","NumberFormat","useGrouping","WrappedTag","wrapBrick","defineElement","property","createDecorators","_CrystalBallIndicator","_A","WeakMap","_B","_C","_D","CrystalBallIndicator","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","CrystalBallIndicatorComponent","root","this","_ref","scale","setScale","useState","useEffect","observer","ResizeObserver","entries","entry","target","width","height","contentRect","Math","min","observe","disconnect","labels","useMemo","_dataSource$slice","clampedData","slice","length","half","ceil","even","arc","PI","radius","center","x","y","angle","index","result","item","cos","sin","push","oddAngle","className","style","visibility","autoPlay","muted","loop","playsInline","src","crystalBallVideo","type","map","key","left","top","label","formatValue","value","outline","color","tagStyle","fontSize","padding","format","_CrystalBallIndicator2","e","c","_initClass","_applyDecs","styleTexts","styleText","attribute","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_REPLACEMENT_1___","___CSS_LOADER_URL_REPLACEMENT_2___","___CSS_LOADER_URL_REPLACEMENT_3___","toString","exports","url","options","String","__esModule","default","test","hash","needQuotes","concat","replace","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","i","modulesToDom","list","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","media","sourceMap","supports","layer","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_i","_index","memo","styleTarget","document","querySelector","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","element","createElement","attributes","styleElement","nonce","setAttribute","needLayer","btoa","unescape","encodeURIComponent","JSON","stringify","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[5332],{71037:(e,t,a)=>{a.d(t,{Z:()=>l.Z,w:()=>r.w});var r=a(83411),l=a(45080)},45080:(e,t,a)=>{a.d(t,{Z:()=>l});var r=a(18769);function l(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e})),t.current}},83411:(e,t,a)=>{a.d(t,{w:()=>n});var r=a(18769),l=a(18049);function n(e){const{targetRef:t,onResize:a}=e||{},n=(0,r.useRef)(),i=null!=t?t:n,[o,s]=(0,r.useState)({clientWidth:0,clientHeight:0}),g=(0,r.useCallback)((e=>{const{target:t}=e,{clientWidth:r=0,clientHeight:l=0}=t;s((t=>t.clientWidth===r&&t.clientHeight===l?t:(null==a||a(e),{clientWidth:r,clientHeight:l})))}),[a]);return(0,r.useEffect)((()=>{if("object"!=typeof i||null===i||!(i.current instanceof Element))throw new Error("ResizeObserver must observe an Element");const e=i.current;return(0,l.lB)(e,g),()=>{(0,l.OV)(e,g)}}),[g,i]),[i,{...o}]}},18049:(e,t,a)=>{a.d(t,{OV:()=>o,lB:()=>i});var r=a(99126);const l=new Map,n=new r.A((e=>{e.forEach((e=>{var t;const{target:a}=e;null===(t=l.get(a))||void 0===t||t.forEach((t=>t(e)))}))})),i=(e,t)=>{l.has(e)||(l.set(e,new Set),n.observe(e)),l.get(e).add(t)},o=(e,t)=>{l.has(e)&&(l.get(e).delete(t),0===l.get(e).size&&(n.unobserve(e),l.delete(e)))}},43374:(e,t,a)=>{a.r(t),a.d(t,{LoadingPanel:()=>O,LoadingPanelComponent:()=>q});var r,l=a(24586),n=a(74635),i=a(70918),o=a(26902),s=a(5536),g=a(86121),c=a(70829),p=a(62740),b=a(18769),h=a.n(b),d=a(10300),u=a(24295),v=a(79935),f=a(39146),x=a(71037);let w,m,y,A,z,E,T,k,R,W,N,P,M,_,S;const{defineElement:B,property:C,event:H}=(0,d.createDecorators)();let O;var V=new WeakMap,Z=new WeakMap,j=new WeakMap,I=new WeakMap,L=new WeakMap,F=new WeakMap,D=new WeakSet;class $ extends u.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,D),(0,i.A)(this,V,m(this)),(0,i.A)(this,Z,(y(this),A(this))),(0,i.A)(this,j,(z(this),E(this,!1))),(0,i.A)(this,I,(T(this),k(this))),(0,i.A)(this,L,(R(this),W(this))),(0,i.A)(this,F,(N(this),P(this))),(0,l.A)(this,"onEnd",(S(this),()=>{(0,s.A)(D,this,M).emit()}))}get customTitle(){return(0,c.A)(V,this)}set customTitle(e){(0,g.A)(V,this,e)}get loading(){return(0,c.A)(Z,this)}set loading(e){(0,g.A)(Z,this,e)}get useRealTimeProgress(){return(0,c.A)(j,this)}set useRealTimeProgress(e){(0,g.A)(j,this,e)}get progress(){return(0,c.A)(I,this)}set progress(e){(0,g.A)(I,this,e)}get intervalTime(){return(0,c.A)(L,this)}set intervalTime(e){(0,g.A)(L,this,e)}render(){return h().createElement(q,{loading:this.loading,customTitle:this.customTitle,progress:this.progress,useRealTimeProgress:this.useRealTimeProgress,intervalTime:this.intervalTime,onEnd:this.onEnd})}}function q(e){const{customTitle:t,loading:a,progress:r,useRealTimeProgress:l,intervalTime:n=100,onEnd:i}=e,[o,s]=(0,b.useState)(0),g=(0,b.useRef)(null),c=(0,x.Z)(r),p=(e,t,a)=>e>=t?1:Math.ceil((a-e)/10);return(0,b.useEffect)((()=>{let e=1;return l||a||(e=p(o,80,100)),l&&(e=p(o,c,r)),(e=>{const{curVal:t,step:n,time:i}=e;let o,c=t;o=l?r:a?80:100,g.current=window.setInterval((()=>{c>=o&&(window.clearInterval(g.current),c=o),s(c),c+=n}),i)})({step:e,curVal:null!=o?o:0,time:n}),()=>{window.clearInterval(g.current)}}),[a,r,l,n]),(0,b.useEffect)((()=>{100===o&&(null==i||i())}),[o]),h().createElement("div",{className:"wrapper"},h().createElement("div",{className:"titleWrapper"},h().createElement("div",{className:"title"},null!=t?t:"Tarsier"),h().createElement("div",{className:"description"},"Loading...")),h().createElement("div",{className:"progress"},`${o}%`))}r=$,({e:[m,y,A,z,E,T,k,R,W,N,P,M,_,S],c:[O,w]}=(0,p.A)(r,[B("data-view.loading-panel",{styleTexts:[v.A,f.A]})],[[C(),1,"customTitle"],[C({type:Boolean}),1,"loading"],[C({type:Boolean}),1,"useRealTimeProgress"],[C({type:Number}),1,"progress"],[C({type:Number}),1,"intervalTime"],[H({type:"end"}),1,"onEndEvent",e=>(0,c.A)(F,e),(e,t)=>(0,g.A)(F,e,t)]],0,(e=>D.has((0,o.A)(e))),u.ReactNextElement)),w()},79935:(e,t,a)=>{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()},39146:(e,t,a)=>{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,'.wrapper{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1001;background:var(--color-fill-global-bg);display:flex;justify-content:center;align-items:center}.wrapper:before{content:"";position:absolute;width:100%;height:100%;display:block;opacity:0.35;background:radial-gradient(#3366FF 0%,rgba(51,102,255,0) 100%)}.titleWrapper{transform:translate(-50px,0)}.title{color:var(--color-normal-text);font-size:46px}.description{color:var(--color-secondary-text);font-size:16px;letter-spacing:3px}.progress{font-size:100px;color:rgba(51,102,255,0.5);position:absolute;z-index:-1;left:calc(50% - 80px)}',""]);const o=i.toString()},5536:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(12559);function l(e,t,a){return a((0,r.A)(e,t))}},74635:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(72016);function l(e,t){(0,r.A)(e,t),t.add(e)}},24586:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(11369);function l(e,t,a){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}}}]);
|
|
2
|
+
//# sourceMappingURL=loading-panel.b7f40435.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/loading-panel.b7f40435.js","mappings":"qPACQ,SAASA,EAAeC,GAC5B,MAAMC,GAAMC,EAAAA,EAAAA,UAIZ,OAHAC,EAAAA,EAAAA,YAAU,KACNF,EAAIG,QAAUJ,CAAI,IAEfC,EAAIG,OACf,C,6DCYO,SAASC,EACdC,GAEA,MAAM,UACJC,EAAS,SACTC,GACEF,GAAS,CAAC,EAERG,GAAWP,EAAAA,EAAAA,UACXD,EAAMM,QAAAA,EAAaE,GAClBC,EAAMC,IAAWC,EAAAA,EAAAA,UAAsB,CAAEC,YAAa,EAAGC,aAAc,IAExEC,GAAeC,EAAAA,EAAAA,cAClBC,IACC,MAAM,OAAEC,GAAWD,GACb,YAAEJ,EAAc,EAAC,aAAEC,EAAe,GAAMI,EAE9CP,GAASQ,GAEHA,EAAKN,cAAgBA,GAAeM,EAAKL,eAAiBA,EACrDK,GAGTX,SAAAA,EAAWS,GAEJ,CAAEJ,cAAaC,kBACtB,GAEJ,CAACN,IAoBH,OAjBAL,EAAAA,EAAAA,YAAU,KACR,GACiB,iBAARF,GACC,OAARA,KACEA,EAAIG,mBAAmBgB,SAEzB,MAAM,IAAIC,MAAM,0CAGlB,MAAM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AAC,EAAAA,EAAAA,GAAAL,EAAA,CAvEApE,EAAc,0BAA2B,CACxC0E,WAAY,CAACC,EAAAA,EAAoBC,EAAAA,MACjC,EAQC3E,IAAU,kBASVA,EAAS,CAAE4E,KAAMC,UAAU,cAS3B7E,EAAS,CAAE4E,KAAMC,UAAU,0BAQ3B7E,EAAS,CAAE4E,KAAME,SAAS,eAS1B9E,EAAS,CAAE4E,KAAME,SAAS,mBAO1B7E,EAAM,CAAE2E,KAAM,QAAQ,eAAAG,IAAA1C,EAAAA,EAAAA,GAAA3B,EAAAqE,GAAA,CAAAA,EAAAzC,KAAAC,EAAAA,EAAAA,GAAA7B,EAAAqE,EAAAzC,KAAA,GAAA0C,GAAArE,EAAAjB,KAAAuF,EAAAA,EAAAA,GAAAD,KAjDElE,EAAAA,mBAAgByD,G,sECrBvCW,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,sgIAAugI,KAEhjI,QAAeH,EAAwBI,U,sECJnCJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,mmBAAomB,KAE7oB,QAAeH,EAAwBI,U,iDCNxB,SAAStD,EAAoBuD,EAAGC,EAAGC,GAChD,OAAOA,GAAE,OAAiBF,EAAGC,GAC/B,C,kDCFe,SAASvE,EAA4ByE,EAAKC,IACvD,OAA0BD,EAAKC,GAC/BA,EAAW9F,IAAI6F,EACjB,C,kDCHe,SAAS5D,EAAgB4D,EAAKE,EAAKC,GAYhD,OAXAD,GAAM,OAAcA,MACTF,EACTI,OAAOC,eAAeL,EAAKE,EAAK,CAC9BC,MAAOA,EACPG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZR,EAAIE,GAAOC,EAENH,CACT,C","sources":["webpack:///./src/hooks/usePrevious/index.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.ts","webpack:///./src/loading-panel/index.tsx","webpack:///./src/data-view-variables.shadow.css","webpack:///./src/loading-panel/loading-panel.shadow.css","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 {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","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 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 React, { useEffect, useRef, useState } from \"react\";\nimport { createDecorators, EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport variablesStyleText from \"../data-view-variables.shadow.css\";\nimport styleText from \"./loading-panel.shadow.css\";\nconst { defineElement, property, event } = createDecorators();\nimport { usePrevious } from \"../hooks/index.js\";\ninterface LoadingPanelProps {\n loading?: boolean;\n customTitle?: string;\n progress?: number;\n useRealTimeProgress?: boolean;\n intervalTime?: number;\n onEnd?: () => void;\n}\n\n/**\n * 大屏加载模块展示\n * @author astrid\n * @category big-screen-content\n */\n@defineElement(\"data-view.loading-panel\", {\n styleTexts: [variablesStyleText, styleText],\n})\nclass LoadingPanel extends ReactNextElement implements LoadingPanelProps {\n /**\n * @kind string\n * @default -\n * @required false\n * @description 标题\n */\n @property()\n accessor customTitle: string;\n\n /**\n * @kind boolean\n * @default true\n * @required false\n * @description 是否加载中, 虚拟数据模拟加载过程\n */\n @property({ type: Boolean })\n accessor loading: boolean;\n\n /**\n * @kind boolean\n * @default false\n * @required false\n * @description 加载过程是否使用真实数据\n */\n @property({ type: Boolean })\n accessor useRealTimeProgress: boolean = false;\n /**\n * @kind number\n * @default -\n * @required false\n * @description 加载进度,区间[0-100]; 真实数据\n */\n @property({ type: Number })\n accessor progress: number;\n\n /**\n * @kind number\n * @default -\n * @required 100\n * @description 每次加载变化的时间间隔,单位ms\n */\n @property({ type: Number })\n accessor intervalTime: number;\n\n /**\n * @detail\n * @description loading结束事件\n */\n @event({ type: \"end\" })\n accessor #onEndEvent!: EventEmitter<void>;\n\n onEnd = () => {\n this.#onEndEvent.emit();\n };\n\n render(): React.ReactNode {\n return (\n <LoadingPanelComponent\n loading={this.loading}\n customTitle={this.customTitle}\n progress={this.progress}\n useRealTimeProgress={this.useRealTimeProgress}\n intervalTime={this.intervalTime}\n onEnd={this.onEnd}\n />\n );\n }\n}\nexport function LoadingPanelComponent(\n props: LoadingPanelProps\n): React.ReactElement {\n const {\n customTitle,\n loading,\n progress,\n useRealTimeProgress,\n intervalTime = 100,\n onEnd,\n } = props;\n const [progressValue, setProgressValue] = useState<number>(0);\n const timerRef = useRef<number>(null);\n const intervalTimer = (params: {\n curVal: number;\n step: number;\n time?: number;\n }) => {\n const { curVal, step, time } = params;\n let init = curVal,\n end: number;\n if (useRealTimeProgress) {\n end = progress;\n } else {\n end = loading ? 80 : 100;\n }\n timerRef.current = window.setInterval(() => {\n if (init >= end) {\n window.clearInterval(timerRef.current);\n init = end;\n }\n setProgressValue(init);\n // 由于step未知,所以会出现 init + step > end; 这时候,我们就要取 end\n init = init + step;\n }, time);\n };\n const prevProgress = usePrevious(progress);\n const getStep = (curVal: number, start: number, end: number): number => {\n return curVal >= start ? 1 : Math.ceil((end - curVal) / 10);\n };\n useEffect(() => {\n let step = 1;\n if (!useRealTimeProgress && !loading) {\n // 假数据的时候,如果 loading结束,但是 progressValue 已经到了80,那么step为1,如果小于80,可以分段考虑,保证后面的记载次数为10次完成;\n step = getStep(progressValue, 80, 100);\n }\n if (useRealTimeProgress) {\n step = getStep(progressValue, prevProgress, progress);\n }\n intervalTimer({\n step: step,\n curVal: progressValue ?? 0,\n time: intervalTime,\n });\n return () => {\n window.clearInterval(timerRef.current);\n };\n }, [loading, progress, useRealTimeProgress, intervalTime]);\n useEffect(() => {\n if (progressValue === 100) {\n onEnd?.();\n }\n }, [progressValue]);\n\n return (\n <div className=\"wrapper\">\n <div className=\"titleWrapper\">\n <div className=\"title\">{customTitle ?? \"Tarsier\"}</div>\n <div className=\"description\">Loading...</div>\n </div>\n <div className=\"progress\">{`${progressValue}%`}</div>\n </div>\n );\n}\n\nexport { LoadingPanel };\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","// 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, `.wrapper{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1001;background:var(--color-fill-global-bg);display:flex;justify-content:center;align-items:center}.wrapper:before{content:\"\";position:absolute;width:100%;height:100%;display:block;opacity:0.35;background:radial-gradient(#3366FF 0%,rgba(51,102,255,0) 100%)}.titleWrapper{transform:translate(-50px,0)}.title{color:var(--color-normal-text);font-size:46px}.description{color:var(--color-secondary-text);font-size:16px;letter-spacing:3px}.progress{font-size:100px;color:rgba(51,102,255,0.5);position:absolute;z-index:-1;left:calc(50% - 80px)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\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":["usePrevious","data","ref","useRef","useEffect","current","useResizeObserver","props","targetRef","onResize","localRef","size","setSize","useState","clientWidth","clientHeight","handleResize","useCallback","entry","target","prev","Element","Error","element","observe","unobserve","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","_elementListeners$get","get","callback","has","set","Set","add","delete","defineElement","property","event","createDecorators","_LoadingPanel","_A","WeakMap","_B","_C","_D","_E","_F","_LoadingPanel_brand","WeakSet","LoadingPanel","ReactNextElement","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_init_customTitle","_init_extra_customTitle","_init_loading","_init_extra_loading","_init_useRealTimeProgress","_init_extra_useRealTimeProgress","_init_progress","_init_extra_progress","_init_intervalTime","_init_extra_intervalTime","_init_onEndEvent","_defineProperty","_init_extra_onEndEvent","_classPrivateGetter","this","_get_onEndEvent","emit","customTitle","_classPrivateFieldGet","v","_classPrivateFieldSet","loading","useRealTimeProgress","progress","intervalTime","render","React","LoadingPanelComponent","onEnd","progressValue","setProgressValue","timerRef","prevProgress","getStep","curVal","start","end","Math","ceil","step","params","time","init","window","setInterval","clearInterval","intervalTimer","className","_LoadingPanel2","e","_set_onEndEvent","c","_initClass","_applyDecs","styleTexts","variablesStyleText","styleText","type","Boolean","Number","o","_","_checkInRHS","___CSS_LOADER_EXPORT___","push","module","id","toString","s","r","a","obj","privateSet","key","value","Object","defineProperty","enumerable","configurable","writable"],"sourceRoot":""}
|