@next-bricks/data-view 0.4.1 → 0.5.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 +4 -2
- package/dist/chunks/{1646.f9e1c73d.js → 1646.82681381.js} +2 -2
- package/dist/chunks/{1646.f9e1c73d.js.map → 1646.82681381.js.map} +1 -1
- package/dist/chunks/{3914.0bfee7ff.js → 3914.738b0862.js} +2 -2
- package/dist/chunks/{3914.0bfee7ff.js.map → 3914.738b0862.js.map} +1 -1
- package/dist/chunks/{4717.9fe94e34.js → 4717.ace78c3e.js} +2 -2
- package/dist/chunks/{4717.9fe94e34.js.map → 4717.ace78c3e.js.map} +1 -1
- package/dist/chunks/{4791.887754ed.js → 4791.3791c567.js} +2 -2
- package/dist/chunks/{4791.887754ed.js.map → 4791.3791c567.js.map} +1 -1
- package/dist/chunks/{5151.0c83c1fc.js → 5151.f76b1f6a.js} +2 -2
- package/dist/chunks/{5151.0c83c1fc.js.map → 5151.f76b1f6a.js.map} +1 -1
- package/dist/chunks/{5202.301749b0.js → 5202.3225e09f.js} +2 -2
- package/dist/chunks/{5202.301749b0.js.map → 5202.3225e09f.js.map} +1 -1
- package/dist/chunks/6252.fe26c2b2.js +2 -0
- package/dist/chunks/6252.fe26c2b2.js.map +1 -0
- package/dist/chunks/{7746.a3f7665e.js → 7746.33ddabb6.js} +2 -2
- package/dist/chunks/{7746.a3f7665e.js.map → 7746.33ddabb6.js.map} +1 -1
- package/dist/chunks/9526.4ed72968.js +2 -0
- package/dist/chunks/9526.4ed72968.js.map +1 -0
- package/dist/chunks/{9549.6ffa306f.js → 9549.78bc7312.js} +2 -2
- package/dist/chunks/{9549.6ffa306f.js.map → 9549.78bc7312.js.map} +1 -1
- package/dist/chunks/9566.4cbec02b.js +2 -0
- package/dist/chunks/9566.4cbec02b.js.map +1 -0
- package/dist/chunks/{9598.5b4f402d.js → 9598.7f1ab6cd.js} +3 -3
- package/dist/chunks/{9598.5b4f402d.js.map → 9598.7f1ab6cd.js.map} +1 -1
- package/dist/chunks/{battery-chart.93cca2b2.js → battery-chart.658a3780.js} +2 -2
- package/dist/chunks/{battery-chart.93cca2b2.js.map → battery-chart.658a3780.js.map} +1 -1
- package/dist/chunks/cabinet-container.5d3ff228.js +3 -0
- package/dist/chunks/cabinet-container.5d3ff228.js.map +1 -0
- package/dist/chunks/cabinet-thumbnail.ae126f7b.js +3 -0
- package/dist/chunks/cabinet-thumbnail.ae126f7b.js.map +1 -0
- package/dist/chunks/complex-search.83f3379d.js +2 -0
- package/dist/chunks/complex-search.83f3379d.js.map +1 -0
- package/dist/chunks/gear-background.7cbb0818.js +2 -0
- package/dist/chunks/gear-background.7cbb0818.js.map +1 -0
- package/dist/chunks/{grid-background.0acb596c.js → grid-background.81ac8172.js} +2 -2
- package/dist/chunks/{grid-background.0acb596c.js.map → grid-background.81ac8172.js.map} +1 -1
- package/dist/chunks/loading-panel.c495be3f.js +2 -0
- package/dist/chunks/loading-panel.c495be3f.js.map +1 -0
- package/dist/chunks/main.ec1850c6.js +2 -0
- package/dist/chunks/main.ec1850c6.js.map +1 -0
- package/dist/chunks/modern-style-treemap.a642bd3c.js +3 -0
- package/dist/chunks/modern-style-treemap.a642bd3c.js.LICENSE.txt +5 -0
- package/dist/chunks/modern-style-treemap.a642bd3c.js.map +1 -0
- package/dist/chunks/radar-chart.e9b3b370.js +2 -0
- package/dist/chunks/radar-chart.e9b3b370.js.map +1 -0
- package/dist/index.ba8a9563.js +2 -0
- package/dist/index.ba8a9563.js.map +1 -0
- package/dist-types/bootstrap.d.ts +2 -0
- package/dist-types/complex-search/index.d.ts +1 -1
- package/dist-types/gear-background/index.d.ts +25 -0
- package/dist-types/gear-background/index.spec.d.ts +1 -0
- package/dist-types/radar-chart/index.d.ts +69 -0
- package/dist-types/radar-chart/index.spec.d.ts +7 -0
- package/dist-types/radar-chart/interface.d.ts +89 -0
- package/dist-types/radar-chart/radar.d.ts +3 -0
- package/dist-types/radar-chart/utils.d.ts +107 -0
- package/dist-types/radar-chart/utils.spec.d.ts +1 -0
- package/package.json +2 -2
- package/dist/chunks/1065.a58e6fc5.js +0 -2
- package/dist/chunks/1065.a58e6fc5.js.map +0 -1
- package/dist/chunks/cabinet-container.52680afc.js +0 -3
- package/dist/chunks/cabinet-container.52680afc.js.map +0 -1
- package/dist/chunks/cabinet-thumbnail.00d41559.js +0 -3
- package/dist/chunks/cabinet-thumbnail.00d41559.js.map +0 -1
- package/dist/chunks/complex-search.838a9599.js +0 -2
- package/dist/chunks/complex-search.838a9599.js.map +0 -1
- package/dist/chunks/loading-panel.757cf1ae.js +0 -2
- package/dist/chunks/loading-panel.757cf1ae.js.map +0 -1
- package/dist/chunks/main.4c8eaf8e.js +0 -2
- package/dist/chunks/main.4c8eaf8e.js.map +0 -1
- package/dist/chunks/modern-style-treemap.69ec70c8.js +0 -2
- package/dist/chunks/modern-style-treemap.69ec70c8.js.map +0 -1
- package/dist/index.eff429f8.js +0 -2
- package/dist/index.eff429f8.js.map +0 -1
- /package/dist/chunks/{9598.5b4f402d.js.LICENSE.txt → 9598.7f1ab6cd.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-container.52680afc.js.LICENSE.txt → cabinet-container.5d3ff228.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-thumbnail.00d41559.js.LICENSE.txt → cabinet-thumbnail.ae126f7b.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[8314],{8143:(e,t,r)=>{r.r(t),r.d(t,{BatteryChart:()=>f,BatteryChartComponent:()=>_});var a,o,l,n,i,s,c,h,u,p,g,b,d,f,v=r(3395),y=r(381),w=r(687),x=r(5303),m=r(8657),Z=r.n(m),k=r(1785),E=r(4949),z=r(1043),C=r(5498),{defineElement:V,property:F}=(0,k.createDecorators)();o=V("data-view.battery-chart",{styleTexts:[z.Z,C.Z]}),l=F({type:Number}),i=F({type:Number}),c=F({type:Number}),u=F({attribute:!1}),g=F({type:Number});var W=new WeakMap,N=new WeakMap,M=new WeakMap,S=new WeakMap,H=new WeakMap;class T extends E.ReactNextElement{constructor(){super(...arguments),(0,v.Z)(this,W,{writable:!0,value:(d(this),n(this))}),(0,v.Z)(this,N,{writable:!0,value:s(this)}),(0,v.Z)(this,M,{writable:!0,value:h(this)}),(0,v.Z)(this,S,{writable:!0,value:p(this)}),(0,v.Z)(this,H,{writable:!0,value:b(this)})}get value(){return(0,w.Z)(this,W)}set value(e){(0,y.Z)(this,W,e)}get batteryWidth(){return(0,w.Z)(this,N)}set batteryWidth(e){(0,y.Z)(this,N,e)}get batteryHeight(){return(0,w.Z)(this,M)}set batteryHeight(e){(0,y.Z)(this,M,e)}get thresholdColors(){return(0,w.Z)(this,S)}set thresholdColors(e){(0,y.Z)(this,S,e)}get thresholdValue(){return(0,w.Z)(this,H)}set thresholdValue(e){(0,y.Z)(this,H,e)}render(){return Z().createElement(_,{value:this.value,thresholdValue:this.thresholdValue,thresholdColors:this.thresholdColors,batteryHeight:this.batteryHeight,batteryWidth:this.batteryWidth})}}function _(e){var t=[{color:"linear-gradient(180deg, #246EFF 0%, #26CE90 100%)",startValue:0,endValue:50,headerColor:"#246EFF"},{color:"linear-gradient(180deg, #FF772A 0%, #FFC22A 100%)",startValue:50,endValue:100,headerColor:"#FF772A"}],{value:r,batteryHeight:a=58,batteryWidth:o=38,thresholdValue:l=50,thresholdColors:n=t}=e,i=(0,m.useMemo)((()=>{var e,t=n[n.length-1],o=a/(t.endValue-n[0].startValue),i=n.find((e=>e.startValue<=r&&e.endValue>=r));return{height:o*r,color:null==i?void 0:i.color,headerColor:null!==(e=null==i?void 0:i.headerColor)&&void 0!==e?e:null==i?void 0:i.color,thresholdValueLineHeight:o*l,isFullMarks:r===t.endValue-n[0].startValue}}),[r,a,n,l]);return Z().createElement("div",{className:"container"},Z().createElement("div",{className:"header",style:{width:Math.round(o/3),background:i.headerColor,boxShadow:"0 1px 2px 0 ".concat(i.headerColor)}}),Z().createElement("div",{className:"content",style:{width:o,height:a}},Z().createElement("div",{className:"threshold",style:{bottom:i.thresholdValueLineHeight-1}}),Z().createElement("div",{className:"valueWrapper",style:{height:i.height}},Z().createElement("div",{className:"value",style:{background:i.color,boxShadow:"0 8px 10px 0 ".concat(i.color),borderRadius:i.isFullMarks?"4px":"0 0 4px 4px"}})),Z().createElement("div",{className:"word",style:{top:a-i.thresholdValueLineHeight-12}},Z().createElement("slot",{name:"left"}))),Z().createElement("slot",null))}({e:[n,s,h,p,b,d],c:[f,a]}=(0,x.Z)(T,[[l,1,"value"],[i,1,"batteryWidth"],[c,1,"batteryHeight"],[u,1,"thresholdColors"],[g,1,"thresholdValue"]],[o])),a()},5498:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(9601),o=r.n(a),l=r(2609),n=r.n(l)()(o());n.push([e.id,'.container{position:relative;margin:auto;text-align:center;border-radius:var(--medius-border-radius)}.header{display:inline-block;width:12px;height:2px;background:#296DFF;box-shadow:0 1px 2px 0 rgba(41,109,255,0.6);border-radius:4px}.content{position:relative;background:var(--color-fill-bg-base-4);border-radius:var(--medius-border-radius);margin:auto}.word{position:absolute;left:calc(110% + 10px);top:calc(50% - 12px);width:auto;white-space:nowrap}.threshold{position:absolute;bottom:50%;left:-10%;width:120%;border-top:2px dotted rgba(255,255,255,0.4);z-index:2}.valueWrapper{position:absolute;width:100%;bottom:0;left:0;border-radius:0 0 4px 4px;z-index:1}.value{content:"";position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,#246EFF 0%,#26CE90 100%);border-radius:0 0 4px 4px;animation:run 1s linear forwards}@keyframes run{0%{height:0;border-radius:0 0 5px 5px}100%{height:100%}}',""]);const i=n.toString()},1043:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(9601),o=r.n(a),l=r(2609),n=r.n(l)()(o());n.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}",""]);const i=n.toString()},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",a=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),a&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),a&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,a,o,l){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(a)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(n[s]=!0)}for(var c=0;c<e.length;c++){var h=[].concat(e[c]);a&&n[h[0]]||(void 0!==l&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=l),r&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=r):h[2]=r),o&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=o):h[4]="".concat(o)),t.push(h))}},t}},9601:e=>{e.exports=function(e){return e[1]}},5303:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(6522);function o(e,t,r){return(o=function(){function e(e,t){return function(a){!function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished")}(t),r(a,"An initializer"),e.push(a)}}function t(t,r,a,o,l,n,i,s){var c;switch(l){case 1:c="accessor";break;case 2:c="method";break;case 3:c="getter";break;case 4:c="setter";break;default:c="field"}var h,u,p={kind:c,name:i?"#"+r:r,static:n,private:i},g={v:!1};0!==l&&(p.addInitializer=e(o,g)),0===l?i?(h=a.get,u=a.set):(h=function(){return this[r]},u=function(e){this[r]=e}):2===l?h=function(){return a.value}:(1!==l&&3!==l||(h=function(){return a.get.call(this)}),1!==l&&4!==l||(u=function(e){a.set.call(this,e)})),p.access=h&&u?{get:h,set:u}:h?{get:h}:{set:u};try{return t(s,p)}finally{g.v=!0}}function r(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function o(e,t){var o=(0,a.Z)(t);if(1===e){if("object"!==o||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&r(t.get,"accessor.get"),void 0!==t.set&&r(t.set,"accessor.set"),void 0!==t.init&&r(t.init,"accessor.init")}else if("function"!==o)throw new TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function l(e,r,a,l,n,i,s,c){var h,u,p,g,b,d,f=a[0];if(s?h=0===n||1===n?{get:a[3],set:a[4]}:3===n?{get:a[3]}:4===n?{set:a[3]}:{value:a[3]}:0!==n&&(h=Object.getOwnPropertyDescriptor(r,l)),1===n?p={get:h.get,set:h.set}:2===n?p=h.value:3===n?p=h.get:4===n&&(p=h.set),"function"==typeof f)void 0!==(g=t(f,l,h,c,n,i,s,p))&&(o(n,g),0===n?u=g:1===n?(u=g.init,b=g.get||p.get,d=g.set||p.set,p={get:b,set:d}):p=g);else for(var v=f.length-1;v>=0;v--){var y;void 0!==(g=t(f[v],l,h,c,n,i,s,p))&&(o(n,g),0===n?y=g:1===n?(y=g.init,b=g.get||p.get,d=g.set||p.set,p={get:b,set:d}):p=g,void 0!==y&&(void 0===u?u=y:"function"==typeof u?u=[u,y]:u.push(y)))}if(0===n||1===n){if(void 0===u)u=function(e,t){return t};else if("function"!=typeof u){var w=u;u=function(e,t){for(var r=t,a=0;a<w.length;a++)r=w[a].call(e,r);return r}}else{var x=u;u=function(e,t){return x.call(e,t)}}e.push(u)}0!==n&&(1===n?(h.get=p.get,h.set=p.set):2===n?h.value=p:3===n?h.get=p:4===n&&(h.set=p),s?1===n?(e.push((function(e,t){return p.get.call(e,t)})),e.push((function(e,t){return p.set.call(e,t)}))):2===n?e.push(p):e.push((function(e,t){return p.call(e,t)})):Object.defineProperty(r,l,h))}function n(e,t){for(var r,a,o=[],n=new Map,s=new Map,c=0;c<t.length;c++){var h=t[c];if(Array.isArray(h)){var u,p,g=h[1],b=h[2],d=h.length>3,f=g>=5;if(f?(u=e,0!=(g-=5)&&(p=a=a||[])):(u=e.prototype,0!==g&&(p=r=r||[])),0!==g&&!d){var v=f?s:n,y=v.get(b)||0;if(!0===y||3===y&&4!==g||4===y&&3!==g)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+b);!y&&g>2?v.set(b,g):v.set(b,!0)}l(o,u,h,b,g,f,d,p)}}return i(o,r),i(o,a),o}function i(e,t){t&&e.push((function(e){for(var r=0;r<t.length;r++)t[r].call(e);return e}))}return function(t,r,a){return{e:n(t,r),get c(){return function(t,r){if(r.length>0){for(var a=[],l=t,n=t.name,i=r.length-1;i>=0;i--){var s={v:!1};try{var c=r[i](l,{kind:"class",name:n,addInitializer:e(a,s)})}finally{s.v=!0}void 0!==c&&(o(10,c),l=c)}return[l,function(){for(var e=0;e<a.length;e++)a[e].call(l)}]}}(t,a)}}}}())(e,t,r)}},5863:(e,t,r)=>{function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>a})},175:(e,t,r)=>{function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>a})},687:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(175);function o(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,a.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(5863);function o(e,t,r){(0,a.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(175);function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,a.Z)(e,t,"set"),r),r}},6522:(e,t,r)=>{function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}r.d(t,{Z:()=>a})}}]);
|
|
2
|
-
//# sourceMappingURL=battery-chart.
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[8314],{7586:(e,t,r)=>{r.r(t),r.d(t,{BatteryChart:()=>f,BatteryChartComponent:()=>_});var a,o,l,n,i,s,c,h,u,p,g,b,d,f,v=r(3395),y=r(381),w=r(687),x=r(5303),m=r(8657),Z=r.n(m),k=r(1785),E=r(4949),z=r(1043),C=r(5498),{defineElement:V,property:F}=(0,k.createDecorators)();o=V("data-view.battery-chart",{styleTexts:[z.Z,C.Z]}),l=F({type:Number}),i=F({type:Number}),c=F({type:Number}),u=F({attribute:!1}),g=F({type:Number});var W=new WeakMap,N=new WeakMap,M=new WeakMap,S=new WeakMap,H=new WeakMap;class T extends E.ReactNextElement{constructor(){super(...arguments),(0,v.Z)(this,W,{writable:!0,value:(d(this),n(this))}),(0,v.Z)(this,N,{writable:!0,value:s(this)}),(0,v.Z)(this,M,{writable:!0,value:h(this)}),(0,v.Z)(this,S,{writable:!0,value:p(this)}),(0,v.Z)(this,H,{writable:!0,value:b(this)})}get value(){return(0,w.Z)(this,W)}set value(e){(0,y.Z)(this,W,e)}get batteryWidth(){return(0,w.Z)(this,N)}set batteryWidth(e){(0,y.Z)(this,N,e)}get batteryHeight(){return(0,w.Z)(this,M)}set batteryHeight(e){(0,y.Z)(this,M,e)}get thresholdColors(){return(0,w.Z)(this,S)}set thresholdColors(e){(0,y.Z)(this,S,e)}get thresholdValue(){return(0,w.Z)(this,H)}set thresholdValue(e){(0,y.Z)(this,H,e)}render(){return Z().createElement(_,{value:this.value,thresholdValue:this.thresholdValue,thresholdColors:this.thresholdColors,batteryHeight:this.batteryHeight,batteryWidth:this.batteryWidth})}}function _(e){var t=[{color:"linear-gradient(180deg, #246EFF 0%, #26CE90 100%)",startValue:0,endValue:50,headerColor:"#246EFF"},{color:"linear-gradient(180deg, #FF772A 0%, #FFC22A 100%)",startValue:50,endValue:100,headerColor:"#FF772A"}],{value:r,batteryHeight:a=58,batteryWidth:o=38,thresholdValue:l=50,thresholdColors:n=t}=e,i=(0,m.useMemo)((()=>{var e,t=n[n.length-1],o=a/(t.endValue-n[0].startValue),i=n.find((e=>e.startValue<=r&&e.endValue>=r));return{height:o*r,color:null==i?void 0:i.color,headerColor:null!==(e=null==i?void 0:i.headerColor)&&void 0!==e?e:null==i?void 0:i.color,thresholdValueLineHeight:o*l,isFullMarks:r===t.endValue-n[0].startValue}}),[r,a,n,l]);return Z().createElement("div",{className:"container"},Z().createElement("div",{className:"header",style:{width:Math.round(o/3),background:i.headerColor,boxShadow:"0 1px 2px 0 ".concat(i.headerColor)}}),Z().createElement("div",{className:"content",style:{width:o,height:a}},Z().createElement("div",{className:"threshold",style:{bottom:i.thresholdValueLineHeight-1}}),Z().createElement("div",{className:"valueWrapper",style:{height:i.height}},Z().createElement("div",{className:"value",style:{background:i.color,boxShadow:"0 8px 10px 0 ".concat(i.color),borderRadius:i.isFullMarks?"4px":"0 0 4px 4px"}})),Z().createElement("div",{className:"word",style:{top:a-i.thresholdValueLineHeight-12}},Z().createElement("slot",{name:"left"}))),Z().createElement("slot",null))}({e:[n,s,h,p,b,d],c:[f,a]}=(0,x.Z)(T,[[l,1,"value"],[i,1,"batteryWidth"],[c,1,"batteryHeight"],[u,1,"thresholdColors"],[g,1,"thresholdValue"]],[o])),a()},5498:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(9601),o=r.n(a),l=r(2609),n=r.n(l)()(o());n.push([e.id,'.container{position:relative;margin:auto;text-align:center;border-radius:var(--medius-border-radius)}.header{display:inline-block;width:12px;height:2px;background:#296DFF;box-shadow:0 1px 2px 0 rgba(41,109,255,0.6);border-radius:4px}.content{position:relative;background:var(--color-fill-bg-base-4);border-radius:var(--medius-border-radius);margin:auto}.word{position:absolute;left:calc(110% + 10px);top:calc(50% - 12px);width:auto;white-space:nowrap}.threshold{position:absolute;bottom:50%;left:-10%;width:120%;border-top:2px dotted rgba(255,255,255,0.4);z-index:2}.valueWrapper{position:absolute;width:100%;bottom:0;left:0;border-radius:0 0 4px 4px;z-index:1}.value{content:"";position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,#246EFF 0%,#26CE90 100%);border-radius:0 0 4px 4px;animation:run 1s linear forwards}@keyframes run{0%{height:0;border-radius:0 0 5px 5px}100%{height:100%}}',""]);const i=n.toString()},1043:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(9601),o=r.n(a),l=r(2609),n=r.n(l)()(o());n.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}",""]);const i=n.toString()},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",a=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),a&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),a&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,a,o,l){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(a)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(n[s]=!0)}for(var c=0;c<e.length;c++){var h=[].concat(e[c]);a&&n[h[0]]||(void 0!==l&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=l),r&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=r):h[2]=r),o&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=o):h[4]="".concat(o)),t.push(h))}},t}},9601:e=>{e.exports=function(e){return e[1]}},5303:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(6522);function o(e,t,r){return(o=function(){function e(e,t){return function(a){!function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished")}(t),r(a,"An initializer"),e.push(a)}}function t(t,r,a,o,l,n,i,s){var c;switch(l){case 1:c="accessor";break;case 2:c="method";break;case 3:c="getter";break;case 4:c="setter";break;default:c="field"}var h,u,p={kind:c,name:i?"#"+r:r,static:n,private:i},g={v:!1};0!==l&&(p.addInitializer=e(o,g)),0===l?i?(h=a.get,u=a.set):(h=function(){return this[r]},u=function(e){this[r]=e}):2===l?h=function(){return a.value}:(1!==l&&3!==l||(h=function(){return a.get.call(this)}),1!==l&&4!==l||(u=function(e){a.set.call(this,e)})),p.access=h&&u?{get:h,set:u}:h?{get:h}:{set:u};try{return t(s,p)}finally{g.v=!0}}function r(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function o(e,t){var o=(0,a.Z)(t);if(1===e){if("object"!==o||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&r(t.get,"accessor.get"),void 0!==t.set&&r(t.set,"accessor.set"),void 0!==t.init&&r(t.init,"accessor.init")}else if("function"!==o)throw new TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function l(e,r,a,l,n,i,s,c){var h,u,p,g,b,d,f=a[0];if(s?h=0===n||1===n?{get:a[3],set:a[4]}:3===n?{get:a[3]}:4===n?{set:a[3]}:{value:a[3]}:0!==n&&(h=Object.getOwnPropertyDescriptor(r,l)),1===n?p={get:h.get,set:h.set}:2===n?p=h.value:3===n?p=h.get:4===n&&(p=h.set),"function"==typeof f)void 0!==(g=t(f,l,h,c,n,i,s,p))&&(o(n,g),0===n?u=g:1===n?(u=g.init,b=g.get||p.get,d=g.set||p.set,p={get:b,set:d}):p=g);else for(var v=f.length-1;v>=0;v--){var y;void 0!==(g=t(f[v],l,h,c,n,i,s,p))&&(o(n,g),0===n?y=g:1===n?(y=g.init,b=g.get||p.get,d=g.set||p.set,p={get:b,set:d}):p=g,void 0!==y&&(void 0===u?u=y:"function"==typeof u?u=[u,y]:u.push(y)))}if(0===n||1===n){if(void 0===u)u=function(e,t){return t};else if("function"!=typeof u){var w=u;u=function(e,t){for(var r=t,a=0;a<w.length;a++)r=w[a].call(e,r);return r}}else{var x=u;u=function(e,t){return x.call(e,t)}}e.push(u)}0!==n&&(1===n?(h.get=p.get,h.set=p.set):2===n?h.value=p:3===n?h.get=p:4===n&&(h.set=p),s?1===n?(e.push((function(e,t){return p.get.call(e,t)})),e.push((function(e,t){return p.set.call(e,t)}))):2===n?e.push(p):e.push((function(e,t){return p.call(e,t)})):Object.defineProperty(r,l,h))}function n(e,t){for(var r,a,o=[],n=new Map,s=new Map,c=0;c<t.length;c++){var h=t[c];if(Array.isArray(h)){var u,p,g=h[1],b=h[2],d=h.length>3,f=g>=5;if(f?(u=e,0!=(g-=5)&&(p=a=a||[])):(u=e.prototype,0!==g&&(p=r=r||[])),0!==g&&!d){var v=f?s:n,y=v.get(b)||0;if(!0===y||3===y&&4!==g||4===y&&3!==g)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+b);!y&&g>2?v.set(b,g):v.set(b,!0)}l(o,u,h,b,g,f,d,p)}}return i(o,r),i(o,a),o}function i(e,t){t&&e.push((function(e){for(var r=0;r<t.length;r++)t[r].call(e);return e}))}return function(t,r,a){return{e:n(t,r),get c(){return function(t,r){if(r.length>0){for(var a=[],l=t,n=t.name,i=r.length-1;i>=0;i--){var s={v:!1};try{var c=r[i](l,{kind:"class",name:n,addInitializer:e(a,s)})}finally{s.v=!0}void 0!==c&&(o(10,c),l=c)}return[l,function(){for(var e=0;e<a.length;e++)a[e].call(l)}]}}(t,a)}}}}())(e,t,r)}},5863:(e,t,r)=>{function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>a})},175:(e,t,r)=>{function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>a})},687:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(175);function o(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,a.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(5863);function o(e,t,r){(0,a.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(175);function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,a.Z)(e,t,"set"),r),r}},6522:(e,t,r)=>{function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}r.d(t,{Z:()=>a})}}]);
|
|
2
|
+
//# sourceMappingURL=battery-chart.658a3780.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/battery-chart.93cca2b2.js","mappings":"6NAKuDA,E,kGAAjD,cAAEC,EAAa,SAAEC,IAAaC,EAAAA,EAAAA,oBAAmBC,EAuBtDH,EAAc,0BAA0B,CACrCI,WAAY,CAACC,EAAAA,EAAmBC,EAAAA,KAClCC,EASGN,EAAS,CAAEO,KAAMC,SAASC,EAU1BT,EAAS,CAACO,KAAMC,SAAQE,EASxBV,EAAS,CAACO,KAAMC,SAAQG,EASxBX,EAAS,CAACY,WAAW,IAAOC,EAS5Bb,EAAS,CAACO,KAAMC,SAAQ,IAAAM,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAhD7B,MAAAK,UAG2BC,EAAAA,iBAAmDC,cAAA,SAAAC,YAE1EC,EAAAA,EAAAA,GAAA,KAAAV,EAAA,CAAAW,UAAA,EAAAC,OAAAC,EAAA,MAAAC,EAAA,UAUAJ,EAAAA,EAAAA,GAAA,KAAAR,EAAA,CAAAS,UAAA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AC/BA,EAAWlD,IAAI6C,EAAK3I,EACtB,C,8CCFe,SAASS,EAAsBsI,EAAUC,EAAYhJ,GAGlE,OCLa,SAAkC+I,EAAUG,EAAYlJ,GACrE,GAAIkJ,EAAWpD,IACboD,EAAWpD,IAAIG,KAAK8C,EAAU/I,OACzB,CACL,IAAKkJ,EAAWnJ,SACd,MAAM,IAAIsG,UAAU,4CAEtB6C,EAAWlJ,MAAQA,CACrB,CACF,CDLE,CAAwB+I,GADP,EAAAI,EAAA,GAA4BJ,EAAUC,EAAY,OACrBhJ,GACvCA,CACT,C,iBENe,SAASoJ,EAAQT,GAG9B,OAAOS,EAAU,mBAAqBC,QAAU,iBAAmBA,OAAOC,SAAW,SAAUX,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAO,mBAAqBU,QAAUV,EAAI/I,cAAgByJ,QAAUV,IAAQU,OAAOlB,UAAY,gBAAkBQ,CAC1H,EAAGS,EAAQT,EACb,C","sources":["webpack:///./src/battery-chart/index.tsx","webpack:///./src/battery-chart/battery-chart.shadow.css","webpack:///./src/data-view-variables.shadow.css","webpack:///../../node_modules/css-loader/dist/runtime/api.js","webpack:///../../node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js"],"sourcesContent":["import React, { useMemo} from 'react';\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport variablesStyleText from \"../data-view-variables.shadow.css\";\nimport styleText from \"./battery-chart.shadow.css\";\nconst { defineElement, property } = createDecorators();\ninterface ThresholdColor {\n color: React.CSSProperties[\"color\"];\n startValue: number;\n endValue: number;\n /** 电池头的颜色,默认取 color,color为渐变色,需要单独配置头部颜色,请使用该属性 */\n headerColor?: React.CSSProperties[\"color\"];\n}\ninterface BatteryChartChartProps {\n value: number;\n thresholdColors?: ThresholdColor[];\n thresholdValue?: number;\n batteryWidth?: number;\n batteryHeight?: number;\n}\n/**\n * @id data-view.battery-chart\n * @name data-view.battery-chart\n * @docKind brick\n * @description 大屏电池\n * @author astrid\n * @noInheritDoc\n */\n@defineElement(\"data-view.battery-chart\",{\n styleTexts: [variablesStyleText,styleText]\n})\nclass BatteryChart extends ReactNextElement implements BatteryChartChartProps {\n\n /**\n * @kind number\n * @default -\n * @required false\n * @description 值, 默认范围在[0-100], 但是范围还可通过 thresholdColors 来改变,将取第一个和最后一个值作为范围\n */\n @property({ type: Number })\n accessor value: number;\n\n\n /**\n * @kind number\n * @default 38\n * @required false\n * @description 电池的宽度\n */\n @property({type: Number})\n accessor batteryWidth: number;\n\n /**\n * @kind number\n * @default 58\n * @required false\n * @description 电池的高度\n */\n @property({type: Number})\n accessor batteryHeight: number;\n\n /**\n * @kind ThresholdColor[]\n * @default -\n * @required false\n * @description 阈值范围以及颜色的配置;\n */\n @property({attribute: false})\n accessor thresholdColors: ThresholdColor[];\n\n /**\n * @kind number\n * @default 50\n * @required false\n * @description 阈值刻度线\n */\n @property({type: Number})\n accessor thresholdValue: number;\n\n render(): React.ReactNode {\n return <BatteryChartComponent\n value={this.value}\n thresholdValue={this.thresholdValue}\n thresholdColors={this.thresholdColors}\n batteryHeight={this.batteryHeight}\n batteryWidth={this.batteryWidth}\n />;\n }\n\n}\n\nexport function BatteryChartComponent(props: BatteryChartChartProps) {\n const defaultThresholdColors = [{\n color: \"linear-gradient(180deg, #246EFF 0%, #26CE90 100%)\",\n startValue: 0,\n endValue: 50,\n headerColor: \"#246EFF\"\n }, {\n color: \"linear-gradient(180deg, #FF772A 0%, #FFC22A 100%)\",\n startValue: 50,\n endValue: 100,\n headerColor: \"#FF772A\"\n }\n ]\n const {value,\n batteryHeight=58,\n batteryWidth=38,\n thresholdValue=50,\n thresholdColors=defaultThresholdColors\n } = props;\n const calculationRatio = useMemo(()=>{\n const lastThreshold = thresholdColors[thresholdColors.length-1];\n const proportion = batteryHeight/(lastThreshold.endValue-thresholdColors[0].startValue); // 比例, lastThreshold.endValue-thresholdColors[0].startValue 值的区间\n const currentThreshold = thresholdColors.find(threshold => threshold.startValue<= value && threshold.endValue>=value);\n return {\n height: proportion * value, // 值的高度\n color: currentThreshold?.color, // 值的颜色\n headerColor: currentThreshold?.headerColor ?? currentThreshold?.color, //头部颜色\n thresholdValueLineHeight: proportion * thresholdValue ,// 阈值线的高度\n isFullMarks: value === (lastThreshold.endValue-thresholdColors[0].startValue)\n }\n\n },[value, batteryHeight,thresholdColors, thresholdValue]);\n return (\n <div className=\"container\">\n <div className=\"header\" style={{\n width: Math.round(batteryWidth/3),\n background: calculationRatio.headerColor,\n boxShadow: `0 1px 2px 0 ${calculationRatio.headerColor}`\n }} />\n <div className=\"content\" style={{\n width: batteryWidth,\n height: batteryHeight\n }}>\n <div className=\"threshold\" style={{\n bottom: calculationRatio.thresholdValueLineHeight - 1\n }} />\n <div className=\"valueWrapper\" style={{height: calculationRatio.height}}>\n <div className=\"value\" style={{\n background: calculationRatio.color,\n boxShadow: `0 8px 10px 0 ${calculationRatio.color}`,\n borderRadius: calculationRatio.isFullMarks ? \"4px\": \"0 0 4px 4px\"\n }} />\n </div>\n <div className=\"word\" style={{\n top: batteryHeight - calculationRatio.thresholdValueLineHeight - 12\n }}>\n <slot name=\"left\"/>\n </div>\n </div>\n <slot />\n </div>\n );\n}\n\nexport {BatteryChart}\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, \".container{position:relative;margin:auto;text-align:center;border-radius:var(--medius-border-radius)}.header{display:inline-block;width:12px;height:2px;background:#296DFF;box-shadow:0 1px 2px 0 rgba(41,109,255,0.6);border-radius:4px}.content{position:relative;background:var(--color-fill-bg-base-4);border-radius:var(--medius-border-radius);margin:auto}.word{position:absolute;left:calc(110% + 10px);top:calc(50% - 12px);width:auto;white-space:nowrap}.threshold{position:absolute;bottom:50%;left:-10%;width:120%;border-top:2px dotted rgba(255,255,255,0.4);z-index:2}.valueWrapper{position:absolute;width:100%;bottom:0;left:0;border-radius:0 0 4px 4px;z-index:1}.value{content:\\\"\\\";position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,#246EFF 0%,#26CE90 100%);border-radius:0 0 4px 4px;animation:run 1s linear forwards}@keyframes run{0%{height:0;border-radius:0 0 5px 5px}100%{height: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}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","import _typeof from \"./typeof.js\";\nfunction applyDecs2203RFactory() {\n function createAddInitializerMethod(initializers, decoratorFinishedRef) {\n return function (initializer) {\n !function (decoratorFinishedRef, fnName) {\n if (decoratorFinishedRef.v) throw new Error(\"attempted to call \" + fnName + \" after decoration was finished\");\n }(decoratorFinishedRef, \"addInitializer\"), assertCallable(initializer, \"An initializer\"), initializers.push(initializer);\n };\n }\n function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {\n var kindStr;\n switch (kind) {\n case 1:\n kindStr = \"accessor\";\n break;\n case 2:\n kindStr = \"method\";\n break;\n case 3:\n kindStr = \"getter\";\n break;\n case 4:\n kindStr = \"setter\";\n break;\n default:\n kindStr = \"field\";\n }\n var get,\n set,\n ctx = {\n kind: kindStr,\n name: isPrivate ? \"#\" + name : name,\n \"static\": isStatic,\n \"private\": isPrivate\n },\n decoratorFinishedRef = {\n v: !1\n };\n 0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {\n return this[name];\n }, set = function set(v) {\n this[name] = v;\n }) : 2 === kind ? get = function get() {\n return desc.value;\n } : (1 !== kind && 3 !== kind || (get = function get() {\n return desc.get.call(this);\n }), 1 !== kind && 4 !== kind || (set = function set(v) {\n desc.set.call(this, v);\n })), ctx.access = get && set ? {\n get: get,\n set: set\n } : get ? {\n get: get\n } : {\n set: set\n };\n try {\n return dec(value, ctx);\n } finally {\n decoratorFinishedRef.v = !0;\n }\n }\n function assertCallable(fn, hint) {\n if (\"function\" != typeof fn) throw new TypeError(hint + \" must be a function\");\n }\n function assertValidReturnValue(kind, value) {\n var type = _typeof(value);\n if (1 === kind) {\n if (\"object\" !== type || null === value) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or void 0\");\n void 0 !== value.get && assertCallable(value.get, \"accessor.get\"), void 0 !== value.set && assertCallable(value.set, \"accessor.set\"), void 0 !== value.init && assertCallable(value.init, \"accessor.init\");\n } else if (\"function\" !== type) {\n var hint;\n throw hint = 0 === kind ? \"field\" : 10 === kind ? \"class\" : \"method\", new TypeError(hint + \" decorators must return a function or void 0\");\n }\n }\n function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {\n var desc,\n init,\n value,\n newValue,\n get,\n set,\n decs = decInfo[0];\n if (isPrivate ? desc = 0 === kind || 1 === kind ? {\n get: decInfo[3],\n set: decInfo[4]\n } : 3 === kind ? {\n get: decInfo[3]\n } : 4 === kind ? {\n set: decInfo[3]\n } : {\n value: decInfo[3]\n } : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {\n get: desc.get,\n set: desc.set\n } : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), \"function\" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {\n get: get,\n set: set\n }) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {\n var newInit;\n if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {\n get: get,\n set: set\n }) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : \"function\" == typeof init ? init = [init, newInit] : init.push(newInit));\n }\n if (0 === kind || 1 === kind) {\n if (void 0 === init) init = function init(instance, _init) {\n return _init;\n };else if (\"function\" != typeof init) {\n var ownInitializers = init;\n init = function init(instance, _init2) {\n for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);\n return value;\n };\n } else {\n var originalInitializer = init;\n init = function init(instance, _init3) {\n return originalInitializer.call(instance, _init3);\n };\n }\n ret.push(init);\n }\n 0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {\n return value.get.call(instance, args);\n }), ret.push(function (instance, args) {\n return value.set.call(instance, args);\n })) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {\n return value.call(instance, args);\n }) : Object.defineProperty(base, name, desc));\n }\n function applyMemberDecs(Class, decInfos) {\n for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {\n var decInfo = decInfos[i];\n if (Array.isArray(decInfo)) {\n var base,\n initializers,\n kind = decInfo[1],\n name = decInfo[2],\n isPrivate = decInfo.length > 3,\n isStatic = kind >= 5;\n if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {\n var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,\n existingKind = existingNonFields.get(name) || 0;\n if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error(\"Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: \" + name);\n !existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);\n }\n applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);\n }\n }\n return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;\n }\n function pushInitializers(ret, initializers) {\n initializers && ret.push(function (instance) {\n for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);\n return instance;\n });\n }\n return function (targetClass, memberDecs, classDecs) {\n return {\n e: applyMemberDecs(targetClass, memberDecs),\n get c() {\n return function (targetClass, classDecs) {\n if (classDecs.length > 0) {\n for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {\n var decoratorFinishedRef = {\n v: !1\n };\n try {\n var nextNewClass = classDecs[i](newClass, {\n kind: \"class\",\n name: name,\n addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)\n });\n } finally {\n decoratorFinishedRef.v = !0;\n }\n void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);\n }\n return [newClass, function () {\n for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);\n }];\n }\n }(targetClass, classDecs);\n }\n };\n };\n}\nexport default function applyDecs2203R(targetClass, memberDecs, classDecs) {\n return (applyDecs2203R = applyDecs2203RFactory())(targetClass, memberDecs, classDecs);\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}","export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}","export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}"],"names":["_BatteryChart","defineElement","property","createDecorators","_dec","styleTexts","variablesStyleText","styleText","_dec2","type","Number","_dec3","_dec4","_dec5","attribute","_dec6","_A","WeakMap","_B","_C","_D","_E","BatteryChart","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","writable","value","_initProto","_init_value","_init_batteryWidth","_init_batteryHeight","_init_thresholdColors","_init_thresholdValue","_classPrivateFieldGet","v","_classPrivateFieldSet","batteryWidth","batteryHeight","thresholdColors","thresholdValue","render","React","BatteryChartComponent","this","props","defaultThresholdColors","color","startValue","endValue","headerColor","calculationRatio","useMemo","_currentThreshold$hea","lastThreshold","length","proportion","currentThreshold","find","threshold","height","thresholdValueLineHeight","isFullMarks","className","style","width","Math","round","background","boxShadow","concat","bottom","borderRadius","top","name","e","c","_initClass","_applyDecs2203R","___CSS_LOADER_EXPORT___","push","module","id","toString","exports","cssWithMappingToString","list","map","item","content","needLayer","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","applyDecs2203R","targetClass","memberDecs","classDecs","createAddInitializerMethod","initializers","decoratorFinishedRef","initializer","fnName","Error","assertCallable","memberDec","dec","desc","kind","isStatic","isPrivate","kindStr","get","set","ctx","addInitializer","call","access","fn","hint","TypeError","assertValidReturnValue","init","applyMemberDec","ret","base","decInfo","newValue","decs","Object","getOwnPropertyDescriptor","newInit","instance","_init","ownInitializers","_init2","originalInitializer","_init3","args","defineProperty","applyMemberDecs","Class","decInfos","protoInitializers","staticInitializers","existingProtoNonFields","Map","existingStaticNonFields","Array","isArray","prototype","existingNonFields","existingKind","pushInitializers","newClass","nextNewClass","applyDecs2203RFactory","_checkPrivateRedeclaration","obj","privateCollection","has","_classExtractFieldDescriptor","receiver","privateMap","action","descriptor","classExtractFieldDescriptor","_typeof","Symbol","iterator"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/battery-chart.658a3780.js","mappings":"6NAKuDA,E,kGAAjD,cAAEC,EAAa,SAAEC,IAAaC,EAAAA,EAAAA,oBAAmBC,EAuBtDH,EAAc,0BAA0B,CACrCI,WAAY,CAACC,EAAAA,EAAmBC,EAAAA,KAClCC,EASGN,EAAS,CAAEO,KAAMC,SAASC,EAU1BT,EAAS,CAACO,KAAMC,SAAQE,EASxBV,EAAS,CAACO,KAAMC,SAAQG,EASxBX,EAAS,CAACY,WAAW,IAAOC,EAS5Bb,EAAS,CAACO,KAAMC,SAAQ,IAAAM,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAhD7B,MAAAK,UAG2BC,EAAAA,iBAAmDC,cAAA,SAAAC,YAE1EC,EAAAA,EAAAA,GAAA,KAAAV,EAAA,CAAAW,UAAA,EAAAC,OAAAC,EAAA,MAAAC,EAAA,UAUAJ,EAAAA,EAAAA,GAAA,KAAAR,EAAA,CAAAS,UAAA,EAAAC,MAAAG,EAAA,SASAL,EAAAA,EAAAA,GAAA,KAAAP,EAAA,CAAAQ,UAAA,EAAAC,MAAAI,EAAA,SASAN,EAAAA,EAAAA,GAAA,KAAAN,EAAA,CAAAO,UAAA,EAAAC,MAAAK,EAAA,SASAP,EAAAA,EAAAA,GAAA,KAAAL,EAAA,CAAAM,UAAA,EAAAC,MAAAM,EAAA,QA9BSN,YAAK,OAAAO,EAAAA,EAAAA,GAAA,KAAAnB,EAAA,CAALY,UAAKQ,IAA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,EAAUC,EAAY,OACrBhJ,GACvCA,CACT,C,iBENe,SAASoJ,EAAQT,GAG9B,OAAOS,EAAU,mBAAqBC,QAAU,iBAAmBA,OAAOC,SAAW,SAAUX,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAO,mBAAqBU,QAAUV,EAAI/I,cAAgByJ,QAAUV,IAAQU,OAAOlB,UAAY,gBAAkBQ,CAC1H,EAAGS,EAAQT,EACb,C","sources":["webpack:///./src/battery-chart/index.tsx","webpack:///./src/battery-chart/battery-chart.shadow.css","webpack:///./src/data-view-variables.shadow.css","webpack:///../../node_modules/css-loader/dist/runtime/api.js","webpack:///../../node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js"],"sourcesContent":["import React, { useMemo} from 'react';\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport variablesStyleText from \"../data-view-variables.shadow.css\";\nimport styleText from \"./battery-chart.shadow.css\";\nconst { defineElement, property } = createDecorators();\ninterface ThresholdColor {\n color: React.CSSProperties[\"color\"];\n startValue: number;\n endValue: number;\n /** 电池头的颜色,默认取 color,color为渐变色,需要单独配置头部颜色,请使用该属性 */\n headerColor?: React.CSSProperties[\"color\"];\n}\ninterface BatteryChartChartProps {\n value: number;\n thresholdColors?: ThresholdColor[];\n thresholdValue?: number;\n batteryWidth?: number;\n batteryHeight?: number;\n}\n/**\n * @id data-view.battery-chart\n * @name data-view.battery-chart\n * @docKind brick\n * @description 大屏电池\n * @author astrid\n * @noInheritDoc\n */\n@defineElement(\"data-view.battery-chart\",{\n styleTexts: [variablesStyleText,styleText]\n})\nclass BatteryChart extends ReactNextElement implements BatteryChartChartProps {\n\n /**\n * @kind number\n * @default -\n * @required false\n * @description 值, 默认范围在[0-100], 但是范围还可通过 thresholdColors 来改变,将取第一个和最后一个值作为范围\n */\n @property({ type: Number })\n accessor value: number;\n\n\n /**\n * @kind number\n * @default 38\n * @required false\n * @description 电池的宽度\n */\n @property({type: Number})\n accessor batteryWidth: number;\n\n /**\n * @kind number\n * @default 58\n * @required false\n * @description 电池的高度\n */\n @property({type: Number})\n accessor batteryHeight: number;\n\n /**\n * @kind ThresholdColor[]\n * @default -\n * @required false\n * @description 阈值范围以及颜色的配置;\n */\n @property({attribute: false})\n accessor thresholdColors: ThresholdColor[];\n\n /**\n * @kind number\n * @default 50\n * @required false\n * @description 阈值刻度线\n */\n @property({type: Number})\n accessor thresholdValue: number;\n\n render(): React.ReactNode {\n return <BatteryChartComponent\n value={this.value}\n thresholdValue={this.thresholdValue}\n thresholdColors={this.thresholdColors}\n batteryHeight={this.batteryHeight}\n batteryWidth={this.batteryWidth}\n />;\n }\n\n}\n\nexport function BatteryChartComponent(props: BatteryChartChartProps) {\n const defaultThresholdColors = [{\n color: \"linear-gradient(180deg, #246EFF 0%, #26CE90 100%)\",\n startValue: 0,\n endValue: 50,\n headerColor: \"#246EFF\"\n }, {\n color: \"linear-gradient(180deg, #FF772A 0%, #FFC22A 100%)\",\n startValue: 50,\n endValue: 100,\n headerColor: \"#FF772A\"\n }\n ]\n const {value,\n batteryHeight=58,\n batteryWidth=38,\n thresholdValue=50,\n thresholdColors=defaultThresholdColors\n } = props;\n const calculationRatio = useMemo(()=>{\n const lastThreshold = thresholdColors[thresholdColors.length-1];\n const proportion = batteryHeight/(lastThreshold.endValue-thresholdColors[0].startValue); // 比例, lastThreshold.endValue-thresholdColors[0].startValue 值的区间\n const currentThreshold = thresholdColors.find(threshold => threshold.startValue<= value && threshold.endValue>=value);\n return {\n height: proportion * value, // 值的高度\n color: currentThreshold?.color, // 值的颜色\n headerColor: currentThreshold?.headerColor ?? currentThreshold?.color, //头部颜色\n thresholdValueLineHeight: proportion * thresholdValue ,// 阈值线的高度\n isFullMarks: value === (lastThreshold.endValue-thresholdColors[0].startValue)\n }\n\n },[value, batteryHeight,thresholdColors, thresholdValue]);\n return (\n <div className=\"container\">\n <div className=\"header\" style={{\n width: Math.round(batteryWidth/3),\n background: calculationRatio.headerColor,\n boxShadow: `0 1px 2px 0 ${calculationRatio.headerColor}`\n }} />\n <div className=\"content\" style={{\n width: batteryWidth,\n height: batteryHeight\n }}>\n <div className=\"threshold\" style={{\n bottom: calculationRatio.thresholdValueLineHeight - 1\n }} />\n <div className=\"valueWrapper\" style={{height: calculationRatio.height}}>\n <div className=\"value\" style={{\n background: calculationRatio.color,\n boxShadow: `0 8px 10px 0 ${calculationRatio.color}`,\n borderRadius: calculationRatio.isFullMarks ? \"4px\": \"0 0 4px 4px\"\n }} />\n </div>\n <div className=\"word\" style={{\n top: batteryHeight - calculationRatio.thresholdValueLineHeight - 12\n }}>\n <slot name=\"left\"/>\n </div>\n </div>\n <slot />\n </div>\n );\n}\n\nexport {BatteryChart}\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, \".container{position:relative;margin:auto;text-align:center;border-radius:var(--medius-border-radius)}.header{display:inline-block;width:12px;height:2px;background:#296DFF;box-shadow:0 1px 2px 0 rgba(41,109,255,0.6);border-radius:4px}.content{position:relative;background:var(--color-fill-bg-base-4);border-radius:var(--medius-border-radius);margin:auto}.word{position:absolute;left:calc(110% + 10px);top:calc(50% - 12px);width:auto;white-space:nowrap}.threshold{position:absolute;bottom:50%;left:-10%;width:120%;border-top:2px dotted rgba(255,255,255,0.4);z-index:2}.valueWrapper{position:absolute;width:100%;bottom:0;left:0;border-radius:0 0 4px 4px;z-index:1}.value{content:\\\"\\\";position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,#246EFF 0%,#26CE90 100%);border-radius:0 0 4px 4px;animation:run 1s linear forwards}@keyframes run{0%{height:0;border-radius:0 0 5px 5px}100%{height: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}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","import _typeof from \"./typeof.js\";\nfunction applyDecs2203RFactory() {\n function createAddInitializerMethod(initializers, decoratorFinishedRef) {\n return function (initializer) {\n !function (decoratorFinishedRef, fnName) {\n if (decoratorFinishedRef.v) throw new Error(\"attempted to call \" + fnName + \" after decoration was finished\");\n }(decoratorFinishedRef, \"addInitializer\"), assertCallable(initializer, \"An initializer\"), initializers.push(initializer);\n };\n }\n function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {\n var kindStr;\n switch (kind) {\n case 1:\n kindStr = \"accessor\";\n break;\n case 2:\n kindStr = \"method\";\n break;\n case 3:\n kindStr = \"getter\";\n break;\n case 4:\n kindStr = \"setter\";\n break;\n default:\n kindStr = \"field\";\n }\n var get,\n set,\n ctx = {\n kind: kindStr,\n name: isPrivate ? \"#\" + name : name,\n \"static\": isStatic,\n \"private\": isPrivate\n },\n decoratorFinishedRef = {\n v: !1\n };\n 0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {\n return this[name];\n }, set = function set(v) {\n this[name] = v;\n }) : 2 === kind ? get = function get() {\n return desc.value;\n } : (1 !== kind && 3 !== kind || (get = function get() {\n return desc.get.call(this);\n }), 1 !== kind && 4 !== kind || (set = function set(v) {\n desc.set.call(this, v);\n })), ctx.access = get && set ? {\n get: get,\n set: set\n } : get ? {\n get: get\n } : {\n set: set\n };\n try {\n return dec(value, ctx);\n } finally {\n decoratorFinishedRef.v = !0;\n }\n }\n function assertCallable(fn, hint) {\n if (\"function\" != typeof fn) throw new TypeError(hint + \" must be a function\");\n }\n function assertValidReturnValue(kind, value) {\n var type = _typeof(value);\n if (1 === kind) {\n if (\"object\" !== type || null === value) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or void 0\");\n void 0 !== value.get && assertCallable(value.get, \"accessor.get\"), void 0 !== value.set && assertCallable(value.set, \"accessor.set\"), void 0 !== value.init && assertCallable(value.init, \"accessor.init\");\n } else if (\"function\" !== type) {\n var hint;\n throw hint = 0 === kind ? \"field\" : 10 === kind ? \"class\" : \"method\", new TypeError(hint + \" decorators must return a function or void 0\");\n }\n }\n function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {\n var desc,\n init,\n value,\n newValue,\n get,\n set,\n decs = decInfo[0];\n if (isPrivate ? desc = 0 === kind || 1 === kind ? {\n get: decInfo[3],\n set: decInfo[4]\n } : 3 === kind ? {\n get: decInfo[3]\n } : 4 === kind ? {\n set: decInfo[3]\n } : {\n value: decInfo[3]\n } : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {\n get: desc.get,\n set: desc.set\n } : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), \"function\" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {\n get: get,\n set: set\n }) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {\n var newInit;\n if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {\n get: get,\n set: set\n }) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : \"function\" == typeof init ? init = [init, newInit] : init.push(newInit));\n }\n if (0 === kind || 1 === kind) {\n if (void 0 === init) init = function init(instance, _init) {\n return _init;\n };else if (\"function\" != typeof init) {\n var ownInitializers = init;\n init = function init(instance, _init2) {\n for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);\n return value;\n };\n } else {\n var originalInitializer = init;\n init = function init(instance, _init3) {\n return originalInitializer.call(instance, _init3);\n };\n }\n ret.push(init);\n }\n 0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {\n return value.get.call(instance, args);\n }), ret.push(function (instance, args) {\n return value.set.call(instance, args);\n })) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {\n return value.call(instance, args);\n }) : Object.defineProperty(base, name, desc));\n }\n function applyMemberDecs(Class, decInfos) {\n for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {\n var decInfo = decInfos[i];\n if (Array.isArray(decInfo)) {\n var base,\n initializers,\n kind = decInfo[1],\n name = decInfo[2],\n isPrivate = decInfo.length > 3,\n isStatic = kind >= 5;\n if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {\n var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,\n existingKind = existingNonFields.get(name) || 0;\n if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error(\"Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: \" + name);\n !existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);\n }\n applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);\n }\n }\n return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;\n }\n function pushInitializers(ret, initializers) {\n initializers && ret.push(function (instance) {\n for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);\n return instance;\n });\n }\n return function (targetClass, memberDecs, classDecs) {\n return {\n e: applyMemberDecs(targetClass, memberDecs),\n get c() {\n return function (targetClass, classDecs) {\n if (classDecs.length > 0) {\n for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {\n var decoratorFinishedRef = {\n v: !1\n };\n try {\n var nextNewClass = classDecs[i](newClass, {\n kind: \"class\",\n name: name,\n addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)\n });\n } finally {\n decoratorFinishedRef.v = !0;\n }\n void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);\n }\n return [newClass, function () {\n for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);\n }];\n }\n }(targetClass, classDecs);\n }\n };\n };\n}\nexport default function applyDecs2203R(targetClass, memberDecs, classDecs) {\n return (applyDecs2203R = applyDecs2203RFactory())(targetClass, memberDecs, classDecs);\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}","export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}","export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}"],"names":["_BatteryChart","defineElement","property","createDecorators","_dec","styleTexts","variablesStyleText","styleText","_dec2","type","Number","_dec3","_dec4","_dec5","attribute","_dec6","_A","WeakMap","_B","_C","_D","_E","BatteryChart","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","writable","value","_initProto","_init_value","_init_batteryWidth","_init_batteryHeight","_init_thresholdColors","_init_thresholdValue","_classPrivateFieldGet","v","_classPrivateFieldSet","batteryWidth","batteryHeight","thresholdColors","thresholdValue","render","React","BatteryChartComponent","this","props","defaultThresholdColors","color","startValue","endValue","headerColor","calculationRatio","useMemo","_currentThreshold$hea","lastThreshold","length","proportion","currentThreshold","find","threshold","height","thresholdValueLineHeight","isFullMarks","className","style","width","Math","round","background","boxShadow","concat","bottom","borderRadius","top","name","e","c","_initClass","_applyDecs2203R","___CSS_LOADER_EXPORT___","push","module","id","toString","exports","cssWithMappingToString","list","map","item","content","needLayer","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","applyDecs2203R","targetClass","memberDecs","classDecs","createAddInitializerMethod","initializers","decoratorFinishedRef","initializer","fnName","Error","assertCallable","memberDec","dec","desc","kind","isStatic","isPrivate","kindStr","get","set","ctx","addInitializer","call","access","fn","hint","TypeError","assertValidReturnValue","init","applyMemberDec","ret","base","decInfo","newValue","decs","Object","getOwnPropertyDescriptor","newInit","instance","_init","ownInitializers","_init2","originalInitializer","_init3","args","defineProperty","applyMemberDecs","Class","decInfos","protoInitializers","staticInitializers","existingProtoNonFields","Map","existingStaticNonFields","Array","isArray","prototype","existingNonFields","existingKind","pushInitializers","newClass","nextNewClass","applyDecs2203RFactory","_checkPrivateRedeclaration","obj","privateCollection","has","_classExtractFieldDescriptor","receiver","privateMap","action","descriptor","classExtractFieldDescriptor","_typeof","Symbol","iterator"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see cabinet-container.5d3ff228.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[8409],{1322:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CabinetContainer:()=>x,CabinetContainerComponent:()=>I});var r,i,o,n,l,s,p,c,h,b,g,d,f,u,v,x,w=a(6666),m=a(3395),y=a(381),k=a(687),C=a(5303),z=a(8657),W=a.n(z),Z=a(4949),M=a(1785),E=a(1043),T=a(6573),N=a(2779),S=a.n(N),_=a(8143),{defineElement:H,property:R,event:j}=(0,M.createDecorators)(),O=(0,Z.wrapBrick)("data-view.cabinet-node");i=H("data-view.cabinet-container",{styleTexts:[E.Z,T.Z]}),o=R({attribute:!1}),l=R({attribute:!1}),p=R(),h=R(),g=j({type:"container.click"});var P=new WeakMap,A=new WeakMap,D=new WeakMap,B=new WeakMap,L=new WeakMap,X=new WeakMap;class q extends Z.ReactNextElement{constructor(){super(...arguments),(0,m.Z)(this,X,{get:G,set:F}),(0,m.Z)(this,P,{writable:!0,value:(v(this),n(this,"host"))}),(0,m.Z)(this,A,{writable:!0,value:s(this,[])}),(0,m.Z)(this,D,{writable:!0,value:c(this)}),(0,m.Z)(this,B,{writable:!0,value:b(this)}),(0,m.Z)(this,L,{writable:!0,value:d(this)}),(0,w.Z)(this,"handleClick",(e=>{(0,k.Z)(this,X).emit(e)}))}get type(){return(0,k.Z)(this,P)}set type(e){(0,y.Z)(this,P,e)}get data(){return(0,k.Z)(this,A)}set data(e){(0,y.Z)(this,A,e)}get status(){return(0,k.Z)(this,D)}set status(e){(0,y.Z)(this,D,e)}get customTitle(){return(0,k.Z)(this,B)}set customTitle(e){(0,y.Z)(this,B,e)}render(){return W().createElement(I,{type:this.type,data:this.data,status:this.status,customTitle:this.customTitle,handleClick:this.handleClick})}}function F(e){u(this,e)}function G(){return f(this)}function I(e){var{type:t,data:a,status:r,customTitle:i,handleClick:o}=e,[n,{clientWidth:l,clientHeight:s}]=(0,_.y)(),p=(e,t,r,i)=>{var o=Math.max(i,r),n=Math.min(i,i),l=Math.min(t,e),s=Math.max(t,e),c=Math.floor((e+t)/2),h=Math.ceil((r+i)/2),b=Math.ceil(a.length/c);return c<=1?{col:1,row:a.length}:b===h?{col:c,row:b}:b>h?p(c,s,b,n):b<h?p(l,c,o,b):void 0},c=(0,z.useMemo)((()=>{if(a.length){var e=l-27,t=s-84;if(!(e<=0||t<=0)){var r=Math.floor(e/118),i=Math.floor(t/105),o=Math.floor(e/56),n=Math.floor(t/63),c=r*i,h=o*n,b=a.length;if(b<=c)return{width:Math.floor(e/r),itemWidth:118};if(b>=h)return{width:Math.floor(e/o),itemWidth:56};var{col:g}=p(r,o,i,n);return{width:Math.floor(e/g),itemWidth:Math.max(e/g-10,56)}}}}),[a.length,s,l]);return W().createElement("div",{className:S()("wrapper",{hostWrapper:"host"===t,k8sWrapper:"k8s"===t},r&&"wrapper-".concat(r)),ref:n,onClick:e=>{e.stopPropagation(),null==o||o({type:"container",data:void 0})}},W().createElement("div",{className:S()("container",{hostContainer:"host"===t,k8sContainer:"k8s"===t},r&&"container-".concat(r))},W().createElement("div",{className:"content"},W().createElement("div",{className:"contentLayout"},a.map(((e,t)=>W().createElement("div",{key:t,className:"itemContent",style:{width:null==c?void 0:c.width}},W().createElement("div",{className:"item",style:{width:null==c?void 0:c.itemWidth},onClick:t=>((e,t)=>{e.stopPropagation(),null==o||o({type:"node",data:t})})(t,e)},W().createElement(O,{type:e.type,nodeTitle:e.nodeTitle,status:e.status}))))))),i&&W().createElement("div",{className:"footer"},W().createElement("div",{className:"footerTitle"},i))))}({e:[n,s,c,b,d,f,u,v],c:[x,r]}=(0,C.Z)(q,[[o,1,"type"],[l,1,"data"],[p,1,"status"],[h,1,"customTitle"],[g,1,"onHandleClick",function(){return(0,k.Z)(this,L)},function(e){(0,y.Z)(this,L,e)}]],[i])),r()},8143:(e,t,a)=>{"use strict";a.d(t,{D:()=>h,y:()=>c});var r=a(3028),i=a(8657),o=a(7209),n=new Map,l=new o.Z((e=>{e.forEach((e=>{var t,{target:a}=e;null===(t=n.get(a))||void 0===t||t.forEach((t=>t(e)))}))})),s=(e,t)=>{n.has(e)||(n.set(e,new Set),l.observe(e)),n.get(e).add(t)},p=(e,t)=>{n.has(e)&&(n.get(e).delete(t),0===n.get(e).size&&(l.unobserve(e),n.delete(e)))};function c(e){var{targetRef:t,onResize:a}=e||{},o=(0,i.useRef)(),n=null!=t?t:o,[l,c]=(0,i.useState)({clientWidth:0,clientHeight:0}),h=(0,i.useCallback)((e=>{var{target:t}=e,{clientWidth:r=0,clientHeight:i=0}=t;c((t=>t.clientWidth===r&&t.clientHeight===i?t:(null==a||a(e),{clientWidth:r,clientHeight:i})))}),[a]);return(0,i.useEffect)((()=>{if("object"!=typeof n||null===n||!(n.current instanceof Element))throw new Error("ResizeObserver must observe an Element");var e=n.current;return s(e,h),()=>{p(e,h)}}),[h,n]),[n,(0,r.Z)({},l)]}function h(e){var t=(0,i.useRef)();return(0,i.useEffect)((()=>{t.current=e})),t.current}},2779:(e,t)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var n=i.apply(null,a);n&&e.push(n)}}else if("object"===o){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var l in a)r.call(a,l)&&a[l]&&e.push(l)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(a=function(){return i}.apply(t,[]))||(e.exports=a)}()},6573:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var r=a(9601),i=a.n(r),o=a(2609),n=a.n(o)()(i());n.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}.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.3}.content{flex:1;padding:20px 10px;width:100%;box-sizing:border-box;overflow-y:auto;display:flex}.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=n.toString()},1043:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var r=a(9601),i=a.n(r),o=a(2609),n=a.n(o)()(i());n.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}",""]);const l=n.toString()}}]);
|
|
3
|
+
//# sourceMappingURL=cabinet-container.5d3ff228.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/cabinet-container.5d3ff228.js","mappings":";yOAaEA,2IAJI,cAAEC,EAAa,SAAEC,EAAQ,MAAEC,IAAUC,EAAAA,EAAAA,oBAErCC,GAAcC,EAAAA,EAAAA,WAClB,0BACAC,EAsBDN,EAAc,8BAA+B,CAC5CO,WAAY,CAACC,EAAAA,EAAeC,EAAAA,KAC5BC,EAWCT,EAAS,CAAEU,WAAW,IAAQC,EAS9BX,EAAS,CAAEU,WAAW,IAAQE,EAS9BZ,IAAUa,EASVb,IAAUc,EAOVb,EAAM,CAAEc,KAAM,oBAAoB,IAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QA/CrC,MAAAM,UAIUC,EAAAA,iBAEVC,cAAA,SAAAC,YAAAC,EAAAA,EAAAA,GAAA,KAAA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ACrB,CAEqCC,EAAOC,SAC3CxE,EAAWyE,QAAUzE,EACrBuE,EAAOC,QAAUxE,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CApDA,kFCJI0E,QAA0B,GAA4B,KAE1DA,EAAwBd,KAAK,CAACW,EAAOI,GAAI,g0FAAq0F,KAE92F,QAAeD,EAAwBT,0FCJnCS,QAA0B,GAA4B,KAE1DA,EAAwBd,KAAK,CAACW,EAAOI,GAAI,0+HAA2+H,KAEphI,QAAeD,EAAwBT","sources":["webpack:///./src/cabinet/cabinet-container/index.tsx","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/usePrevious/index.ts","webpack:///../../node_modules/classnames/index.js","webpack:///./src/cabinet/cabinet-container/cabinet-container.shadow.css","webpack:///./src/data-view-variables.shadow.css"],"sourcesContent":["import React, { useMemo } 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\";\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}\n\n/**\n * @id data-view.cabinet-container\n * @name data-view.cabinet-container\n * @docKind brick\n * @description 大屏集群容器构件\n * @author astrid\n * @noInheritDoc\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 容器类型,有主机集群类型、k8s集群类型\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 handleClick = (params: ClickEventDataType) => {\n this.#onHandleClick.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 />\n );\n }\n}\n\nexport function CabinetContainerComponent(\n props: CabinetContainerProps\n): React.ReactElement {\n const { type, data, status, customTitle, handleClick } = props;\n const [containerRef, { clientWidth, clientHeight }] =\n useResizeObserver<HTMLDivElement>();\n const binarySearch = (\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),\n minRow = Math.min(minSizeRow, minSizeRow),\n minCol = Math.min(minSizeCol, maxSizeCol),\n maxCol = Math.max(minSizeCol, maxSizeCol);\n const centerCol = Math.floor((maxSizeCol + minSizeCol) / 2);\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 (needRow === centerRow) {\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 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, clientHeight, clientWidth]);\n const handleNodeClick = (\n e: React.MouseEvent<HTMLDivElement>,\n item: CabinetNodeProps\n ) => {\n e.stopPropagation();\n handleClick?.({\n type: \"node\",\n data: item,\n });\n };\n const handleContainerClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n handleClick?.({\n type: \"container\",\n data: undefined,\n });\n };\n\n return (\n <div\n className={classNames(\n \"wrapper\",\n {\n hostWrapper: type === \"host\",\n k8sWrapper: type === \"k8s\",\n },\n status && `wrapper-${status}`\n )}\n ref={containerRef}\n onClick={handleContainerClick}\n >\n <div\n className={classNames(\n \"container\",\n {\n hostContainer: type === \"host\",\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) => handleNodeClick(e, item)}\n >\n <WrappedNode\n type={item.type}\n nodeTitle={item.nodeTitle}\n status={item.status}\n />\n </div>\n </div>\n ))}\n </div>\n </div>\n {customTitle && (\n <div className=\"footer\">\n <div className=\"footerTitle\">{customTitle}</div>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport { CabinetContainer };\n","import ResizeObserver from \"resize-observer-polyfill\";\n\nexport type ResizeCallback = (entry: ResizeObserverEntry) => void;\n\nconst elementListeners = new Map<Element, Set<ResizeCallback>>();\n\nexport const elementListeners_only_for_test =\n process.env.NODE_ENV === \"test\"\n ? elementListeners\n : /* istanbul ignore next */ null;\n\nconst resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n const { target } = entry;\n elementListeners.get(target)?.forEach((callback) => callback(entry));\n });\n};\n\nconst resizeObserver: ResizeObserver = new (ResizeObserver as any)(resizeObserverCallback);\n\nexport const observe = (element: Element, callback: ResizeCallback): void => {\n if (!elementListeners.has(element)) {\n elementListeners.set(element, new Set());\n resizeObserver.observe(element);\n }\n\n elementListeners.get(element).add(callback);\n};\n\nexport const unobserve = (element: Element, callback: ResizeCallback): void => {\n if (elementListeners.has(element)) {\n elementListeners.get(element).delete(callback);\n\n if (elementListeners.get(element).size === 0) {\n resizeObserver.unobserve(element);\n elementListeners.delete(element);\n }\n }\n};\n","import {\n useState,\n useCallback,\n useRef,\n type RefObject,\n useEffect,\n} from \"react\";\nimport { observe, unobserve } from \"./resizeObserverUtil.js\";\n\ninterface ElementSize {\n clientWidth: number;\n clientHeight: number;\n}\n\nexport interface ResizeObserveProps<T extends Element = Element> {\n targetRef?: RefObject<T>;\n onResize?: (size: ResizeObserverEntry) => void;\n}\n\nexport function useResizeObserver<T extends Element = Element>(\n props?: ResizeObserveProps<T>\n): [RefObject<T>, ElementSize] {\n const {\n targetRef,\n onResize,\n } = props || {};\n\n const localRef = useRef<T>();\n const ref = targetRef ?? localRef;\n const [size, setSize] = useState<ElementSize>({ clientWidth: 0, clientHeight: 0 });\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const { target } = entry;\n const { clientWidth = 0, clientHeight = 0 } = target;\n\n setSize((prev) => {\n // skip if same size\n if (prev.clientWidth === clientWidth && prev.clientHeight === clientHeight) {\n return prev;\n }\n\n onResize?.(entry);\n\n return { clientWidth, clientHeight };\n });\n },\n [onResize]\n );\n\n useEffect(() => {\n if (\n typeof ref !== \"object\" ||\n ref === null ||\n !(ref.current instanceof Element)\n ) {\n throw new Error(\"ResizeObserver must observe an Element\");\n }\n\n const element = ref.current;\n observe(element, handleResize);\n\n return () => {\n unobserve(element, handleResize);\n };\n }, [handleResize, ref]);\n\n return [ref, { ...size }];\n}\n","import {useRef, useEffect} from 'react';\nexport function usePrevious<T>(data?: T):T|undefined{\n const ref = useRef<T>();\n useEffect(()=>{\n ref.current = data\n })\n return ref.current;\n}\n","/*!\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\tvar nativeCodeString = '[native code]';\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) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\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","// 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}.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.3}.content{flex:1;padding:20px 10px;width:100%;box-sizing:border-box;overflow-y:auto;display:flex}.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}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["_CabinetContainer","defineElement","property","event","createDecorators","WrappedNode","wrapBrick","_dec","styleTexts","variablesText","styleText","_dec2","attribute","_dec3","_dec4","_dec5","_dec6","type","_A","WeakMap","_B","_C","_D","_E","_onHandleClick","CabinetContainer","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","get","_get_onHandleClick2","set","_set_onHandleClick2","writable","value","_initProto","_init_type","_init_data","_init_status","_init_customTitle","_init_onHandleClick","_defineProperty","params","_classPrivateFieldGet","this","emit","v","_classPrivateFieldSet","data","status","customTitle","render","React","CabinetContainerComponent","handleClick","_set_onHandleClick","_get_onHandleClick","props","containerRef","clientWidth","clientHeight","useResizeObserver","binarySearch","maxSizeCol","minSizeCol","maxSizeRow","minSizeRow","maxRow","Math","max","minRow","min","minCol","maxCol","centerCol","floor","centerRow","ceil","needRow","length","col","row","layoutWidth","useMemo","realWidth","realHeight","maxSizeNum","minSizeNum","allNum","width","itemWidth","className","classNames","hostWrapper","k8sWrapper","concat","ref","onClick","e","stopPropagation","undefined","hostContainer","k8sContainer","map","item","index","key","style","handleNodeClick","nodeTitle","c","_initClass","_applyDecs2203R","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","entry","_elementListeners$get","target","callback","observe","element","has","Set","add","unobserve","delete","size","targetRef","onResize","localRef","useRef","setSize","useState","handleResize","useCallback","prev","useEffect","current","Element","Error","_objectSpread","usePrevious","hasOwn","hasOwnProperty","classes","i","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","includes","call","join","module","exports","default","___CSS_LOADER_EXPORT___","id"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see cabinet-thumbnail.ae126f7b.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[9410],{7790:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CabinetThumbnail:()=>b,CabinetThumbnailComponent:()=>M});var r,l,i,n,o,s,c,p,g,b,u=a(3028),h=a(3395),d=a(381),f=a(687),v=a(5303),x=a(8657),m=a.n(x),w=a(4949),y=a(1785),k=a(2779),z=a.n(k),C=a(1043),E=a(6708),N=a(8143),Z=(0,w.wrapBrick)("data-view.cabinet-app-layer"),{defineElement:T,property:R}=(0,y.createDecorators)(),S=(0,w.wrapBrick)("data-view.cabinet-node");l=T("data-view.cabinet-thumbnail",{styleTexts:[C.Z,E.Z]}),i=R({attribute:!1}),o=R({type:Number}),c=R();var W=new WeakMap,L=new WeakMap,_=new WeakMap;class H extends w.ReactNextElement{constructor(){super(...arguments),(0,h.Z)(this,W,{writable:!0,value:(g(this),n(this,[]))}),(0,h.Z)(this,L,{writable:!0,value:s(this,4)}),(0,h.Z)(this,_,{writable:!0,value:p(this)})}get clusters(){return(0,f.Z)(this,W)}set clusters(e){(0,d.Z)(this,W,e)}get columns(){return(0,f.Z)(this,L)}set columns(e){(0,d.Z)(this,L,e)}get appName(){return(0,f.Z)(this,_)}set appName(e){(0,d.Z)(this,_,e)}render(){return m().createElement(M,{clusters:this.clusters,columns:this.columns,appName:this.appName})}}function M(e){var{clusters:t,columns:a,appName:r}=e,l=(0,x.useRef)(),i=(0,x.useRef)(),[n,o]=(0,x.useState)(),s=(0,N.D)(n);return(0,x.useLayoutEffect)((()=>{var{width:e,height:r}=l.current.getBoundingClientRect();if(t.length&&a>0){var{width:n,height:c}=i.current.getBoundingClientRect(),p=e/(n/(null!=s?s:1)),g=r/(c*(null!=s?s:1));o(Math.min(Math.floor(100*Math.min(p,g))/100,1))}}),[t,s,a]),m().createElement("div",{ref:l,className:"wrapper"},m().createElement("div",{className:"thumbnailLayout",ref:i,style:(0,u.Z)({},n?{transform:"scale(".concat(n,")")}:{})},m().createElement(Z,{className:"appLayer",appTitle:r}),m().createElement("div",{className:"layout"},t.map(((e,t)=>m().createElement("div",{className:"clusterWrapper",key:t},m().createElement("div",{className:z()("clusterContainer",{clusterHostContainer:"host"===e.type,clusterK8sContainer:"k8s"===e.type})},m().createElement("div",{className:"clusterContent"},m().createElement("div",{className:"clusterContentLayout",style:{gridTemplateColumns:"repeat(".concat(a,",1fr)")}},e.data.map(((e,t)=>m().createElement("div",{key:t,className:"itemContent"},m().createElement(S,{type:e.type,nodeTitle:e.nodeTitle})))))),m().createElement("div",{className:"clusterTitle"},m().createElement("div",{className:"title"},e.title)))))))))}({e:[n,s,p,g],c:[b,r]}=(0,v.Z)(H,[[i,1,"clusters"],[o,1,"columns"],[c,1,"appName"]],[l])),r()},8143:(e,t,a)=>{"use strict";a.d(t,{D:()=>g,y:()=>p});var r=a(3028),l=a(8657),i=a(7209),n=new Map,o=new i.Z((e=>{e.forEach((e=>{var t,{target:a}=e;null===(t=n.get(a))||void 0===t||t.forEach((t=>t(e)))}))})),s=(e,t)=>{n.has(e)||(n.set(e,new Set),o.observe(e)),n.get(e).add(t)},c=(e,t)=>{n.has(e)&&(n.get(e).delete(t),0===n.get(e).size&&(o.unobserve(e),n.delete(e)))};function p(e){var{targetRef:t,onResize:a}=e||{},i=(0,l.useRef)(),n=null!=t?t:i,[o,p]=(0,l.useState)({clientWidth:0,clientHeight:0}),g=(0,l.useCallback)((e=>{var{target:t}=e,{clientWidth:r=0,clientHeight:l=0}=t;p((t=>t.clientWidth===r&&t.clientHeight===l?t:(null==a||a(e),{clientWidth:r,clientHeight:l})))}),[a]);return(0,l.useEffect)((()=>{if("object"!=typeof n||null===n||!(n.current instanceof Element))throw new Error("ResizeObserver must observe an Element");var e=n.current;return s(e,g),()=>{c(e,g)}}),[g,n]),[n,(0,r.Z)({},o)]}function g(e){var t=(0,l.useRef)();return(0,l.useEffect)((()=>{t.current=e})),t.current}},2779:(e,t)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var i=typeof a;if("string"===i||"number"===i)e.push(a);else if(Array.isArray(a)){if(a.length){var n=l.apply(null,a);n&&e.push(n)}}else if("object"===i){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var o in a)r.call(a,o)&&a[o]&&e.push(o)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(a=function(){return l}.apply(t,[]))||(e.exports=a)}()},6708:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var r=a(9601),l=a.n(r),i=a(2609),n=a.n(i)()(l());n.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=n.toString()},1043:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var r=a(9601),l=a.n(r),i=a(2609),n=a.n(i)()(l());n.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}",""]);const o=n.toString()}}]);
|
|
3
|
+
//# sourceMappingURL=cabinet-thumbnail.ae126f7b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/cabinet-thumbnail.ae126f7b.js","mappings":";6NAiBEA,0IAPIC,GAAyBC,EAAAA,EAAAA,WAC3B,gCAEE,cAACC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/D,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CApDA,kFCJIiE,QAA0B,GAA4B,KAE1DA,EAAwBd,KAAK,CAACW,EAAOI,GAAI,skDAAykD,KAElnD,QAAeD,EAAwBT,0FCJnCS,QAA0B,GAA4B,KAE1DA,EAAwBd,KAAK,CAACW,EAAOI,GAAI,0+HAA2+H,KAEphI,QAAeD,EAAwBT","sources":["webpack:///./src/cabinet/cabinet-thumbnail/index.tsx","webpack:///./src/hooks/useResizeObserver/resizeObserverUtil.ts","webpack:///./src/hooks/useResizeObserver/index.ts","webpack:///./src/hooks/usePrevious/index.ts","webpack:///../../node_modules/classnames/index.js","webpack:///./src/cabinet/cabinet-thumbnail/cabinet-thumbnail.shadow.css","webpack:///./src/data-view-variables.shadow.css"],"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 {CabinetAppLayer, CabinetAppLayerProps} 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 * @id data-view.cabinet-thumbnail\n * @name data-view.cabinet-thumbnail\n * @docKind brick\n * @description 应用墙缩略图\n * @author astrid\n * @noInheritDoc\n */\n@defineElement(\"data-view.cabinet-thumbnail\", {\n styleTexts: [variablesText,styleText],\n})\nclass CabinetThumbnail extends ReactNextElement implements CabinetThumbnailProps {\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 <CabinetThumbnailComponent\n clusters={this.clusters}\n columns={this.columns}\n appName={this.appName}\n />;\n }\n}\n\nexport function CabinetThumbnailComponent(props:CabinetThumbnailProps): 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 const {width ,height} = containerRef.current.getBoundingClientRect();\n if(!!clusters.length && columns>0) {\n const {width:realWidth,height: realHeight} = layoutRef.current.getBoundingClientRect();\n // 计算缩放比例\n const wScale = width/(realWidth / (preScale??1));\n const hScale = height/(realHeight * (preScale??1));\n setScale(Math.min(Math.floor(Math.min(wScale,hScale) *100) / 100, 1));\n }\n },[clusters,preScale,columns])\n\n return <div ref={containerRef} className=\"wrapper\">\n <div className=\"thumbnailLayout\"\n ref={layoutRef}\n style={{\n ...(scale?{transform: `scale(${scale})`}: {})\n }}>\n <WrappedCabinetAppLayer className=\"appLayer\" appTitle={appName} />\n <div className=\"layout\">\n {\n clusters.map((item,index) => (\n <div className=\"clusterWrapper\" key={index}>\n <div className={classNames(\"clusterContainer\", {\n clusterHostContainer: item.type === \"host\",\n clusterK8sContainer: item.type === \"k8s\",\n })}\n >\n <div className=\"clusterContent\">\n <div className=\"clusterContentLayout\" style={{gridTemplateColumns: `repeat(${columns},1fr)`}}>\n {\n item.data.map((node, index) => (\n <div key={index} className=\"itemContent\" >\n <WrappedNode type={node.type} nodeTitle={node.nodeTitle} />\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\n </div>\n\n}\nexport {CabinetThumbnail}\n","import ResizeObserver from \"resize-observer-polyfill\";\n\nexport type ResizeCallback = (entry: ResizeObserverEntry) => void;\n\nconst elementListeners = new Map<Element, Set<ResizeCallback>>();\n\nexport const elementListeners_only_for_test =\n process.env.NODE_ENV === \"test\"\n ? elementListeners\n : /* istanbul ignore next */ null;\n\nconst resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n const { target } = entry;\n elementListeners.get(target)?.forEach((callback) => callback(entry));\n });\n};\n\nconst resizeObserver: ResizeObserver = new (ResizeObserver as any)(resizeObserverCallback);\n\nexport const observe = (element: Element, callback: ResizeCallback): void => {\n if (!elementListeners.has(element)) {\n elementListeners.set(element, new Set());\n resizeObserver.observe(element);\n }\n\n elementListeners.get(element).add(callback);\n};\n\nexport const unobserve = (element: Element, callback: ResizeCallback): void => {\n if (elementListeners.has(element)) {\n elementListeners.get(element).delete(callback);\n\n if (elementListeners.get(element).size === 0) {\n resizeObserver.unobserve(element);\n elementListeners.delete(element);\n }\n }\n};\n","import {\n useState,\n useCallback,\n useRef,\n type RefObject,\n useEffect,\n} from \"react\";\nimport { observe, unobserve } from \"./resizeObserverUtil.js\";\n\ninterface ElementSize {\n clientWidth: number;\n clientHeight: number;\n}\n\nexport interface ResizeObserveProps<T extends Element = Element> {\n targetRef?: RefObject<T>;\n onResize?: (size: ResizeObserverEntry) => void;\n}\n\nexport function useResizeObserver<T extends Element = Element>(\n props?: ResizeObserveProps<T>\n): [RefObject<T>, ElementSize] {\n const {\n targetRef,\n onResize,\n } = props || {};\n\n const localRef = useRef<T>();\n const ref = targetRef ?? localRef;\n const [size, setSize] = useState<ElementSize>({ clientWidth: 0, clientHeight: 0 });\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const { target } = entry;\n const { clientWidth = 0, clientHeight = 0 } = target;\n\n setSize((prev) => {\n // skip if same size\n if (prev.clientWidth === clientWidth && prev.clientHeight === clientHeight) {\n return prev;\n }\n\n onResize?.(entry);\n\n return { clientWidth, clientHeight };\n });\n },\n [onResize]\n );\n\n useEffect(() => {\n if (\n typeof ref !== \"object\" ||\n ref === null ||\n !(ref.current instanceof Element)\n ) {\n throw new Error(\"ResizeObserver must observe an Element\");\n }\n\n const element = ref.current;\n observe(element, handleResize);\n\n return () => {\n unobserve(element, handleResize);\n };\n }, [handleResize, ref]);\n\n return [ref, { ...size }];\n}\n","import {useRef, useEffect} from 'react';\nexport function usePrevious<T>(data?: T):T|undefined{\n const ref = useRef<T>();\n useEffect(()=>{\n ref.current = data\n })\n return ref.current;\n}\n","/*!\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\tvar nativeCodeString = '[native code]';\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) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\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","// 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}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["_CabinetThumbnail","WrappedCabinetAppLayer","wrapBrick","defineElement","property","createDecorators","WrappedNode","_dec","styleTexts","variablesText","styleText","_dec2","attribute","_dec3","type","Number","_dec4","_A","WeakMap","_B","_C","CabinetThumbnail","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","writable","value","_initProto","_init_clusters","_init_columns","_init_appName","clusters","_classPrivateFieldGet","v","_classPrivateFieldSet","columns","appName","render","React","CabinetThumbnailComponent","this","props","containerRef","useRef","layoutRef","scale","setScale","useState","preScale","usePrevious","useLayoutEffect","width","height","current","getBoundingClientRect","length","realWidth","realHeight","wScale","hScale","Math","min","floor","ref","className","style","_objectSpread","transform","concat","appTitle","map","item","index","key","classNames","clusterHostContainer","clusterK8sContainer","gridTemplateColumns","data","node","nodeTitle","title","e","c","_initClass","_applyDecs2203R","elementListeners","Map","resizeObserver","ResizeObserver","entries","forEach","entry","_elementListeners$get","target","get","callback","observe","element","has","set","Set","add","unobserve","delete","size","useResizeObserver","targetRef","onResize","localRef","setSize","clientWidth","clientHeight","handleResize","useCallback","prev","useEffect","Element","Error","hasOwn","hasOwnProperty","classes","i","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","includes","call","join","module","exports","default","___CSS_LOADER_EXPORT___","id"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[794],{1594:(e,t,r)=>{r.d(t,{K:()=>a,NS:()=>n,k:()=>i});var a=function(e){return e.EMPTY_DATA="EMPTY_DATA",e}({}),n="bricks/data-view/complex-search",i={en:{EMPTY_DATA:"Empty data"},zh:{EMPTY_DATA:"空数据"}}},3593:(e,t,r)=>{r.r(t),r.d(t,{ComplexSearch:()=>$,ComplexSearchComponent:()=>Me});var a,n,i,o,l,s,c,p,u,h,g,d,b,f,v,m,w,x,y,Z,k,E,z,M,S,T,B,I,W,A,C,N=r(7896),P=r(6666),_=r(3395),j=r(381),D=r(687),O=r(5303),U=r(8657),F=r.n(U),R=r(1785),Y=r(4949),K=r(1043),L=r(1365),q=r(1150),G=r(1318),H=r(1594),J=r(8214),{defineElement:Q,property:V,event:X}=(0,R.createDecorators)();(0,G.initializeReactI18n)(H.NS,H.k);var $,ee=(0,Y.wrapBrick)("icons.general-icon");n=Q("data-view.complex-search",{styleTexts:[K.Z,L.Z]}),i=V(),l=V(),c=V({attribute:!1}),u=V({attribute:!1}),g=X({type:"change"}),v=X({type:"search"}),y=X({type:"select"}),z=X({type:"focus"}),B=X({type:"blur"});var te=new WeakMap,re=new WeakMap,ae=new WeakMap,ne=new WeakMap,ie=new WeakMap,oe=new WeakMap,le=new WeakMap,se=new WeakMap,ce=new WeakMap,pe=new WeakMap,ue=new WeakMap,he=new WeakMap,ge=new WeakMap,de=new WeakMap;class be extends Y.ReactNextElement{constructor(){super(...arguments),(0,_.Z)(this,de,{get:ze,set:Ee}),(0,_.Z)(this,he,{get:ke,set:Ze}),(0,_.Z)(this,pe,{get:ye,set:xe}),(0,_.Z)(this,se,{get:we,set:me}),(0,_.Z)(this,oe,{get:ve,set:fe}),(0,_.Z)(this,te,{writable:!0,value:(C(this),o(this))}),(0,_.Z)(this,re,{writable:!0,value:s(this)}),(0,_.Z)(this,ae,{writable:!0,value:p(this)}),(0,_.Z)(this,ne,{writable:!0,value:h(this)}),(0,_.Z)(this,ie,{writable:!0,value:d(this)}),(0,_.Z)(this,le,{writable:!0,value:m(this)}),(0,_.Z)(this,ce,{writable:!0,value:Z(this)}),(0,_.Z)(this,ue,{writable:!0,value:M(this)}),(0,_.Z)(this,ge,{writable:!0,value:I(this)}),(0,P.Z)(this,"handleInputChange",(e=>{this.value=e,(0,D.Z)(this,oe).emit(e)})),(0,P.Z)(this,"handleSearch",(e=>{(0,D.Z)(this,se).emit(e)})),(0,P.Z)(this,"handleFocus",(()=>{(0,D.Z)(this,he).emit()})),(0,P.Z)(this,"handleBlur",(()=>{(0,D.Z)(this,de).emit()})),(0,P.Z)(this,"handleSelect",(e=>{this.value=e.name,(0,D.Z)(this,pe).emit(e)}))}get value(){return(0,D.Z)(this,te)}set value(e){(0,j.Z)(this,te,e)}get placeholder(){return(0,D.Z)(this,re)}set placeholder(e){(0,j.Z)(this,re,e)}get options(){return(0,D.Z)(this,ae)}set options(e){(0,j.Z)(this,ae,e)}get tooltipUseBrick(){return(0,D.Z)(this,ne)}set tooltipUseBrick(e){(0,j.Z)(this,ne,e)}render(){return F().createElement(Me,{value:this.value,onInputChange:this.handleInputChange,onSearch:this.handleSearch,onBlur:this.handleBlur,onFocus:this.handleFocus,tooltipUseBrick:this.tooltipUseBrick,placeholder:this.placeholder,onSelect:this.handleSelect,options:this.options})}}function fe(e){f(this,e)}function ve(){return b(this)}function me(e){x(this,e)}function we(){return w(this)}function xe(e){E(this,e)}function ye(){return k(this)}function Ze(e){T(this,e)}function ke(){return S(this)}function Ee(e){A(this,e)}function ze(){return W(this)}function Me(e){var{value:t,onInputChange:r,onSearch:a,onBlur:n,onFocus:i,tooltipUseBrick:o,placeholder:l,onSelect:s,options:c=[]}=e,{t:p}=(0,G.useTranslation)(H.NS),[u,h]=(0,U.useState)(!1),g=(0,U.useRef)(null),[d,b]=(0,U.useState)(!1),[f,v]=(0,U.useState)(),[m,w]=(0,U.useState)(0),[x,y]=(0,U.useState)(!1);(0,U.useEffect)((()=>{h(!!t)}),[t]);var Z=e=>{e.composedPath().some((e=>e===g.current))||b(!1)},k=(0,U.useMemo)((()=>null!=o&&o.useBrick?F().createElement("div",{className:"dropdownMenuItemTooltip",style:{top:m,visibility:x?"visible":"hidden",opacity:x?1:0},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)},F().createElement("div",{className:"useBrickWrapper"},F().createElement(q.ReactUseMultipleBricks,{useBrick:o.useBrick,data:f||{}}))):void 0),[f,o,m,x]);return(0,U.useEffect)((()=>(document.addEventListener("click",Z),()=>document.removeEventListener("click",Z))),[]),F().createElement("div",{className:"wrapper",ref:g},F().createElement("div",{className:"inputWrapper"},F().createElement("input",{placeholder:l,value:null!=t?t:"",onChange:e=>(e=>{r(e),b(!0)})(e.target.value),onFocus:()=>{b(!0),i()},onBlur:n,onKeyDown:e=>{"Enter"===e.key&&(b(!1),a(e.target.value))}}),F().createElement(ee,{className:"searchIcon icon",lib:"antd",icon:"search",theme:"outlined"}),u&&F().createElement(ee,{className:"clearIcon icon",onClick:()=>{r(""),b(!1)},lib:"antd",icon:"close-circle",theme:"filled"})),F().createElement("div",{className:"dropdownWrapper",style:{visibility:d?"visible":"hidden"}},c.length?F().createElement("div",{className:"dropdownMenu"},c.map(((e,t)=>F().createElement("div",{className:"dropdownMenuItem",key:t,onMouseEnter:t=>((e,t)=>{v(t),y(!0);var r=e.target.getBoundingClientRect().top-g.current.getBoundingClientRect().top;w(r)})(t,e),onMouseLeave:()=>y(!1),onClick:()=>(s(e),void b(!1))},F().createElement(ee,(0,N.Z)({},e.icon,{className:"menuIcon"})),F().createElement("span",{className:"menuTitle"},e.name))))):F().createElement("div",{className:"emptyData"},F().createElement("img",{src:J,alt:p(H.K.EMPTY_DATA)}),F().createElement("span",null,p(H.K.EMPTY_DATA)))),k)}({e:[o,s,p,h,d,b,f,m,w,x,Z,k,E,M,S,T,I,W,A,C],c:[$,a]}=(0,O.Z)(be,[[i,1,"value"],[l,1,"placeholder"],[c,1,"options"],[u,1,"tooltipUseBrick"],[g,1,"inputChangeEvent",function(){return(0,D.Z)(this,ie)},function(e){(0,j.Z)(this,ie,e)}],[v,1,"onSearchEvent",function(){return(0,D.Z)(this,le)},function(e){(0,j.Z)(this,le,e)}],[y,1,"onSelectEvent",function(){return(0,D.Z)(this,ce)},function(e){(0,j.Z)(this,ce,e)}],[z,1,"onFocusEvent",function(){return(0,D.Z)(this,ue)},function(e){(0,j.Z)(this,ue,e)}],[B,1,"onBlurEvent",function(){return(0,D.Z)(this,ge)},function(e){(0,j.Z)(this,ge,e)}]],[n])),a()},1365:(e,t,r)=>{r.d(t,{Z:()=>l});var a=r(9601),n=r.n(a),i=r(2609),o=r.n(i)()(n());o.push([e.id,'.wrapper{width:100%;position:relative}.inputWrapper{width:100%;height:32px;position:relative}input{height:100%;line-height:32px;border:none;width:100%;box-sizing:border-box;padding:0 32px;background:var(--color-fill-bg-base-1);border-radius:var(--medius-border-radius);font-size:var(--auxiliary-font-size-small);font-weight:var(--font-weight-400);color:var(--color-normal-text)}input::placeholder{color:var(--color-disabled-text);font-size:var(--auxiliary-font-size-small);font-weight:var(--font-weight-400)}input:not(:disabled):focus{border:none;outline:0}.icon{position:absolute;color:var(--color-normal-text);opacity:0.6}.searchIcon{left:10px;top:6px;font-size:16px}.clearIcon{right:10px;top:7px;font-size:14px}.dropdownWrapper{width:100%;height:336px;margin:5px 0;padding:8px 0;box-sizing:border-box;position:absolute;z-index:900;overflow:auto;background:var(--color-fill-bg-base-1);border-radius:var(--medius-border-radius);-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.emptyData{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;color:var(--color-disabled-text);gap:20px}.emptyData img{width:62px}.dropdownMenu{overflow-y:auto}.dropdownMenuItem{padding:6px 18px;color:var(--color-normal-text);font-size:var(--auxiliary-font-size-small);font-weight:var(--font-weight-400);display:flex;align-items:center;gap:6px;height:32px;line-height:20px;box-sizing:border-box;cursor:pointer}.menuTitle{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.menuIcon{font-size:20px}.dropdownMenuItem:hover{border-radius:var(--no-border-radius);background:var(--color-fill-bg-container-1)}.dropdownMenuItemTooltip{position:absolute;width:324px;left:-325px;top:0;background:var(--color-fill-bg-base-4);border-radius:var(--medius-border-radius)}.dropdownMenuItemTooltip:before{content:"";position:absolute;top:0;width:100%;height:100%;left:0;background:#282e3a linear-gradient(186deg,rgba(51,102,255,0.3) 0%,rgba(51,102,255,0) 100%);border-radius:4px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.useBrickWrapper{position:relative;min-height:100px;max-height:465px;overflow:auto}',""]);const l=o.toString()},1043:(e,t,r)=>{r.d(t,{Z:()=>l});var a=r(9601),n=r.n(a),i=r(2609),o=r.n(i)()(n());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}",""]);const l=o.toString()},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",a=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),a&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),a&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,a,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(a)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(o[s]=!0)}for(var c=0;c<e.length;c++){var p=[].concat(e[c]);a&&o[p[0]]||(void 0!==i&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=i),r&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=r):p[2]=r),n&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=n):p[4]="".concat(n)),t.push(p))}},t}},9601:e=>{e.exports=function(e){return e[1]}},8214:(e,t,r)=>{e.exports=r.p+"images/6d954a25.png"},5303:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(6522);function n(e,t,r){return(n=function(){function e(e,t){return function(a){!function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished")}(t),r(a,"An initializer"),e.push(a)}}function t(t,r,a,n,i,o,l,s){var c;switch(i){case 1:c="accessor";break;case 2:c="method";break;case 3:c="getter";break;case 4:c="setter";break;default:c="field"}var p,u,h={kind:c,name:l?"#"+r:r,static:o,private:l},g={v:!1};0!==i&&(h.addInitializer=e(n,g)),0===i?l?(p=a.get,u=a.set):(p=function(){return this[r]},u=function(e){this[r]=e}):2===i?p=function(){return a.value}:(1!==i&&3!==i||(p=function(){return a.get.call(this)}),1!==i&&4!==i||(u=function(e){a.set.call(this,e)})),h.access=p&&u?{get:p,set:u}:p?{get:p}:{set:u};try{return t(s,h)}finally{g.v=!0}}function r(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function n(e,t){var n=(0,a.Z)(t);if(1===e){if("object"!==n||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&r(t.get,"accessor.get"),void 0!==t.set&&r(t.set,"accessor.set"),void 0!==t.init&&r(t.init,"accessor.init")}else if("function"!==n)throw new TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function i(e,r,a,i,o,l,s,c){var p,u,h,g,d,b,f=a[0];if(s?p=0===o||1===o?{get:a[3],set:a[4]}:3===o?{get:a[3]}:4===o?{set:a[3]}:{value:a[3]}:0!==o&&(p=Object.getOwnPropertyDescriptor(r,i)),1===o?h={get:p.get,set:p.set}:2===o?h=p.value:3===o?h=p.get:4===o&&(h=p.set),"function"==typeof f)void 0!==(g=t(f,i,p,c,o,l,s,h))&&(n(o,g),0===o?u=g:1===o?(u=g.init,d=g.get||h.get,b=g.set||h.set,h={get:d,set:b}):h=g);else for(var v=f.length-1;v>=0;v--){var m;void 0!==(g=t(f[v],i,p,c,o,l,s,h))&&(n(o,g),0===o?m=g:1===o?(m=g.init,d=g.get||h.get,b=g.set||h.set,h={get:d,set:b}):h=g,void 0!==m&&(void 0===u?u=m:"function"==typeof u?u=[u,m]:u.push(m)))}if(0===o||1===o){if(void 0===u)u=function(e,t){return t};else if("function"!=typeof u){var w=u;u=function(e,t){for(var r=t,a=0;a<w.length;a++)r=w[a].call(e,r);return r}}else{var x=u;u=function(e,t){return x.call(e,t)}}e.push(u)}0!==o&&(1===o?(p.get=h.get,p.set=h.set):2===o?p.value=h:3===o?p.get=h:4===o&&(p.set=h),s?1===o?(e.push((function(e,t){return h.get.call(e,t)})),e.push((function(e,t){return h.set.call(e,t)}))):2===o?e.push(h):e.push((function(e,t){return h.call(e,t)})):Object.defineProperty(r,i,p))}function o(e,t){for(var r,a,n=[],o=new Map,s=new Map,c=0;c<t.length;c++){var p=t[c];if(Array.isArray(p)){var u,h,g=p[1],d=p[2],b=p.length>3,f=g>=5;if(f?(u=e,0!=(g-=5)&&(h=a=a||[])):(u=e.prototype,0!==g&&(h=r=r||[])),0!==g&&!b){var v=f?s:o,m=v.get(d)||0;if(!0===m||3===m&&4!==g||4===m&&3!==g)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+d);!m&&g>2?v.set(d,g):v.set(d,!0)}i(n,u,p,d,g,f,b,h)}}return l(n,r),l(n,a),n}function l(e,t){t&&e.push((function(e){for(var r=0;r<t.length;r++)t[r].call(e);return e}))}return function(t,r,a){return{e:o(t,r),get c(){return function(t,r){if(r.length>0){for(var a=[],i=t,o=t.name,l=r.length-1;l>=0;l--){var s={v:!1};try{var c=r[l](i,{kind:"class",name:o,addInitializer:e(a,s)})}finally{s.v=!0}void 0!==c&&(n(10,c),i=c)}return[i,function(){for(var e=0;e<a.length;e++)a[e].call(i)}]}}(t,a)}}}}())(e,t,r)}},5863:(e,t,r)=>{function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>a})},175:(e,t,r)=>{function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>a})},687:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(175);function n(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,a.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(5863);function n(e,t,r){(0,a.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(175);function n(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,a.Z)(e,t,"set"),r),r}},6666:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(5850);function n(e,t,r){return(t=(0,a.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},7896:(e,t,r)=>{function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},a.apply(this,arguments)}r.d(t,{Z:()=>a})},5850:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(6522);function n(e){var t=function(e,t){if("object"!==(0,a.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==(0,a.Z)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,a.Z)(t)?t:String(t)}},6522:(e,t,r)=>{function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}r.d(t,{Z:()=>a})}}]);
|
|
2
|
+
//# sourceMappingURL=complex-search.83f3379d.js.map
|