@hpcc-js/layout 3.5.14 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2499 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +7 -2
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/types/Legend.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,2500 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=(e,i)=>t(e,"name",{value:i,configurable:!0});import{HTMLWidget as i,FAChar as s,select as o,selectAll as l,Utility as n,d3Event as r,Platform as h,drag as a,scaleLinear as d,dispatch as p,formatPrefix as c,format as u,formatLocale as g,formatSpecifier as f,sum as _,SVGWidget as y,Database as b,Palette as w,scaleOrdinal as m,ProgressBar as v,ToggleButton as x,Text as S,Button as C,Spacer as P,TitleBar as T,IconBar as z}from"@hpcc-js/common";import{Table as W}from"@hpcc-js/dgrid2";import{instanceOfIHighlight as B}from"@hpcc-js/api";function I(t,i){for(var s=0;s<i.length;s++){const o=i[s];if("string"!=typeof o&&!Array.isArray(o))for(const i in o)if("default"!==i&&!(i in t)){const s=Object.getOwnPropertyDescriptor(o,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:/* @__PURE__ */e(()=>o[i],"get")})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}e(I,"_mergeNamespaces");const A="@hpcc-js/layout",H="3.5.14",M="3.24.0",k=class _AbsoluteSurface extends i{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);let i=0,s=0,o=this.clientWidth(),l=this.clientHeight();switch(this.units()){case"pixels":i=this.widgetX(),s=this.widgetY(),o=""===this.widgetWidth()?o-i:Number(this.widgetWidth()),l=""===this.widgetHeight()?l-s:Number(this.widgetHeight());break;case"percent":i=this.widgetX()*o/100,s=this.widgetY()*l/100,o=""===this.widgetWidth()?o-i:Number(this.widgetWidth())*o/100,l=""===this.widgetHeight()?l-s:Number(this.widgetHeight())*l/100}e.style("opacity",this.opacity());const n=e.selectAll("#"+this._id+" > .placeholder").data(this.widget()?[this.widget()]:[],function(t){return t._id});n.enter().append("div").attr("class","placeholder").each(function(t){t.target(this)}).merge(n).style("left",i+"px").style("top",s+"px").style("width",o+"px").style("bottom",l+"px").each(function(t){t.resize({width:o,height:l})}),n.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}};e(k,"AbsoluteSurface");let F=k;F.prototype._class+=" layout_AbsoluteSurface",F.prototype.publish("units","percent","set","Units",["pixels","percent"]),F.prototype.publish("widgetX",0,"number","Widget XPos"),F.prototype.publish("widgetY",0,"number","Widget YPos"),F.prototype.publish("widgetWidth","100","string","Widget Width, omit for full"),F.prototype.publish("widgetHeight","100","string","Widget Height, omit for full"),F.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]}),F.prototype.publish("opacity",1,"number","Opacity");const O=class _Accordion extends i{_isClosed;titleSpan;iconDiv;ul;icon;constructor(){super(),this._tag="div",this._isClosed=!1}pushListItem(t,e=!1,i=!1){const s=this.content();return t._protected=i,e?s.unshift(t):s.push(t),this.content(s),this}clearListItems(){const t=[];for(const e in this.content())this.content()[e]._protected&&t.push(this.content()[e]);return this.content(t),this}collapseClick(t){t.classed("closed")?(this._isClosed=!1,t.classed("open",!0),t.classed("closed",!1)):(this._isClosed=!0,t.classed("open",!1),t.classed("closed",!0))}enter(t,e){super.enter(t,e);const i=this;this._isClosed=this.defaultCollapsed(),e.classed(this._isClosed?"closed":"open",!0),this.titleSpan=e.append("span").classed("collapsible-title",!0),this.iconDiv=e.append("div").classed("collapsible-icon",!0),this.ul=e.append("ul"),this.icon=(new s).size({height:24,width:24}).target(this.iconDiv.node()),this.iconDiv.on("click",function(){i.collapseClick(e),i.render()}),this.titleSpan.on("click",function(){i.collapseClick(e),i.render()})}update(t,e){super.update(t,e);const i=this;this.titleSpan.text(i.title().length>0?i.title()+"":"Accordion ["+i._id+"]");const s=this.ul.selectAll("#"+i._id+" > ul > li").data(this.content(),function(t){return t._id});s.enter().append(function(t){const e=document.createElement("li");if(null!==t._target)return t._target;{const s=t.size();if(0===s.width||0===s.height){const e=i.size();t.size({width:e.width,height:e.width})}t.target(e)}return e}),s.exit().remove(),this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed?this.closedIcon():this.openIcon()).render()}exit(t,e){super.exit(t,e)}};e(O,"Accordion");let L=O;L.prototype._class+=" layout_Accordion",L.prototype.publish("content",[],"widgetArray","Array of widgets",null,{tags:["Basic"]}),L.prototype.publish("title","","string","Title of collapsible section",null,{tags:["Private"]}),L.prototype.publish("openIcon","","string","Icon to display when list is open",null,{tags:["Private"]}),L.prototype.publish("closedIcon","","string","Icon to display when list is closed",null,{tags:["Private"]}),L.prototype.publish("titleFontColor","#FFFFFF","html-color","Title font color",null,{tags:["Private"]}),L.prototype.publish("titleBackgroundColor","#333333","html-color","Title background color",null,{tags:["Private"]}),L.prototype.publish("defaultCollapsed",!1,"boolean","Collapsed by default if true",null,{tags:["Private"]});const D=class _Surface extends i{_surfaceButtons;constructor(){super(),this._tag="div",this._surfaceButtons=[]}widgetSize(t,e){let i=this.clientWidth(),s=this.clientHeight();return this.title()&&(s-=this.calcHeight(t)),s-=this.calcFrameHeight(e),i-=this.calcFrameWidth(e),{width:i,height:s}}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);const i=this;e.classed("shadow2",this.surfaceShadow()).style("border-width",this.surfaceBorderWidth_exists()?this.surfaceBorderWidth()+"px":null).style("border-color",this.surfaceBorderColor()).style("border-radius",this.surfaceBorderRadius_exists()?this.surfaceBorderRadius()+"px":null).style("background-color",this.surfaceBackgroundColor());const s=e.selectAll(".surfaceTitle").data(this.title()?[this.title()]:[]);s.enter().insert("h3","div").attr("class","surfaceTitle").merge(s).text(function(t){return t}).style("text-align",this.surfaceTitleAlignment()).style("color",this.surfaceTitleFontColor()).style("font-size",this.surfaceTitleFontSize_exists()?this.surfaceTitleFontSize()+"px":null).style("font-family",this.surfaceTitleFontFamily()).style("font-weight",this.surfaceTitleFontBold()?"bold":"normal").style("background-color",this.surfaceTitleBackgroundColor()).style("padding",this.surfaceTitlePadding_exists()?this.surfaceTitlePadding()+"px":null).style("title",this.altText_exists()?this.altText():null),s.exit().remove();const l=e.select(".surfaceTitle").append("div").attr("class","html-button-container").selectAll(".surface-button").data(this.buttonAnnotations());l.enter().append("button").classed("surface-button",!0).each(function(t,e){const s=i._surfaceButtons[e]=o(this).attr("class","surface-button"+(t.class?" "+t.class:"")).attr("id",t.id).style("padding",t.padding).style("width",t.width).style("height",t.height).style("cursor","pointer");"FontAwesome"===t.font?s.style("background","transparent").style("border","none").on("click",function(t){i.click(t)}).append("i").attr("class","fa").text(function(){return t.label}):s.text(function(){return t.label}).on("click",function(t){i.click(t)})}),l.exit().each(function(t,e){const s=o(this);delete i._surfaceButtons[e],s.remove()});const n=e.selectAll("#"+this._id+" > .surfaceWidget").data(this.widget()?[this.widget()]:[],function(t){return t._id});n.enter().append("div").attr("class","surfaceWidget").each(function(t){o(i.element().node().parentElement).classed("content-icon content-icon-"+t.classID().split("_")[1],!0),t.target(this)}).merge(n).style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null).each(function(t){const s=i.widgetSize(e.select("h3"),o(this));s.width<0&&(s.width=0),s.height<0&&(s.height=0),t.resize({width:s.width,height:s.height})}),n.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}click(t){}};e(D,"Surface");let R=D;R.prototype._class+=" layout_Surface",R.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),R.prototype.publish("altText",null,"string","Alt text",null,{optional:!0}),R.prototype.publish("surfaceTitlePadding",null,"number","Title Padding (px)",null,{tags:["Advanced"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceTitleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceTitleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceTitleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceTitleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceTitleBackgroundColor",null,"html-color","Title Background Color",null,{tags:["Advanced"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceTitleAlignment","center","set","Title Alignment",["left","right","center"],{tags:["Basic"],disable:/* @__PURE__ */e(t=>!t.title(),"disable")}),R.prototype.publish("surfaceShadow",!1,"boolean","3D Shadow"),R.prototype.publish("surfacePadding",null,"string","Surface Padding (px)",null,{tags:["Intermediate"]}),R.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),R.prototype.publish("surfaceBorderWidth",null,"number","Surface Border Width (px)",null,{tags:["Advanced"]}),R.prototype.publish("surfaceBorderColor",null,"html-color","Surface Border Color",null,{tags:["Advanced"]}),R.prototype.publish("surfaceBorderRadius",null,"number","Surface Border Radius (px)",null,{tags:["Advanced"]}),R.prototype.publish("buttonAnnotations",[],"array","Button Array",null,{tags:["Private"]}),R.prototype.publish("widget",null,"widget","Widget",null,{tags:["Basic"]});const G=class _Cell extends R{_indicateTheseIds;constructor(){super(),this._indicateTheseIds=[]}indicateTheseIds(t){return arguments.length?(this._indicateTheseIds=t,this):this._indicateTheseIds}enter(t,e){super.enter(t,e);const i=this;e.classed("layout_Surface",!0).on("mouseenter",function(){i.onMouseEnter()}).on("mouseleave",function(){i.onMouseLeave()})}update(t,e){super.update(t,e)}onMouseEnter(){const t=this.indicateTheseIds(),e=this.indicatorOpacity(),i=this.indicatorBorderColor(),s=this.indicatorGlowColor();for(let l=0;l<t.length;l++){const n=o("#"+t[l]),r=n.datum();n&&r&&n.append("div").attr("class","update-indicator").style("width",r.width()+"px").style("height",r.height()+"px").style("opacity",e).style("border-color",i).style("-webkit-box-shadow","inset 0px 0px 30px 0px "+s).style("-moz-box-shadow","inset 0px 0px 30px 0px "+s).style("box-shadow","inset 0px 0px 30px 0px "+s)}}onMouseLeave(){const t=this.indicateTheseIds();for(let e=0;e<t.length;e++)l("#"+t[e]+" > div.update-indicator").remove()}};e(G,"Cell");let E=G;E.prototype._class+=" layout_Cell",E.prototype.publish("gridRow",0,"number","Grid Row Position",null,{tags:["Private"]}),E.prototype.publish("gridCol",0,"number","Grid Column Position",null,{tags:["Private"]}),E.prototype.publish("gridRowSpan",1,"number","Grid Row Span",null,{tags:["Private"]}),E.prototype.publish("gridColSpan",1,"number","Grid Column Span",null,{tags:["Private"]}),E.prototype.publish("indicatorGlowColor","#EEEE11","html-color","Glow color of update-indicator",null,{tags:["Basic"]}),E.prototype.publish("indicatorBorderColor","#F48A00","html-color","Border color of update-indicator",null,{tags:["Basic"]}),E.prototype.publish("indicatorOpacity",.8,"number","Opacity of update-indicator",null,{tags:["Basic"]});const X=class _Border extends i{_colCount;_rowCount;_colSize;_rowSize;_shrinkWrapBoxes;_watch;_offsetX;_offsetY;_dragCell;_dragCellSize;_dragCellStartSize;_handleTop;_handleLeft;_dragPrevX;_dragPrevY;_cellSizes;contentDiv;_scrollBarWidth;_borderHandles;_sectionTypeArr;constructor(){super(),this._tag="div",this._colCount=0,this._rowCount=0,this._colSize=0,this._rowSize=0,this._shrinkWrapBoxes={},this.content([]),this.sectionTypes([])}watchWidget(t){if(void 0===this._watch&&(this._watch={}),this._watch[t.id()]&&(this._watch[t.id()].remove(),delete this._watch[t.id()]),t){const e=this;this._watch[t.id()]=t.monitor(function(t,i,s){s!==i&&e.lazyPostUpdate()})}}lazyPostUpdate=n.debounce(function(){this.postUpdate()},100);applyLayoutType(){const t=this.borderLayoutObject();this.content().forEach(function(e,i){e._fixedLeft=t[this.sectionTypes()[i]].left,e._fixedTop=t[this.sectionTypes()[i]].top,e._fixedWidth=t[this.sectionTypes()[i]].width,e._fixedHeight=t[this.sectionTypes()[i]].height,e._dragHandles=this.cellSpecificDragHandles(this.sectionTypes()[i])},this)}cellSpecificDragHandles(t){switch(t){case"top":return["s"];case"right":return["w"];case"bottom":return["n"];case"left":return["e"];case"center":return[]}}borderLayoutObject(t){const e={},i=this;let s,o,l,n,r,h,a,d;const p=this.target().getBoundingClientRect();p.top,p.left,p.bottom,p.right,this.target()instanceof SVGElement?(parseFloat(this.target().getAttribute("width")),parseFloat(this.target().getAttribute("height"))):(p.width,p.height),-1!==this.sectionTypes().indexOf("top")&&(s=this.topSize(),o=this.topPercentage(),void 0!==this._shrinkWrapBoxes.top&&(s=this._shrinkWrapBoxes.top.height+this.gutter(),o=0)),-1!==this.sectionTypes().indexOf("bottom")&&(l=this.bottomSize(),n=this.bottomPercentage(),void 0!==this._shrinkWrapBoxes.bottom&&(l=this._shrinkWrapBoxes.bottom.height+this.gutter(),n=0)),-1!==this.sectionTypes().indexOf("left")&&(r=this.leftSize(),h=this.leftPercentage(),void 0!==this._shrinkWrapBoxes.left&&(r=this._shrinkWrapBoxes.left.width+this.gutter(),h=0)),-1!==this.sectionTypes().indexOf("right")&&(a=this.rightSize(),d=this.rightPercentage(),void 0!==this._shrinkWrapBoxes.right&&(a=this._shrinkWrapBoxes.right.width+this.gutter(),d=0));const c=y({width:{px:0,"%":100},height:{px:s,"%":o},top:{px:0,"%":0},left:{px:0,"%":0}}),u=y({width:{px:0,"%":100},height:{px:l,"%":n},top:{px:0,"%":100},left:{px:0,"%":0}});u.top-=u.height;const g=y({width:{px:r,"%":h},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:0,"%":0}}),f=y({width:{px:a,"%":d},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:0,"%":100}});f.left-=f.width;const _=y({width:{px:-f.width-g.width,"%":100},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:g.width,"%":0}});return e.top=c,e.bottom=u,e.right=f,e.left=g,e.center=_,e;function y(t){t.width.px=void 0!==t.width.px?t.width.px:0,t.width["%"]=void 0!==t.width["%"]?t.width["%"]:0,t.height.px=void 0!==t.height.px?t.height.px:0,t.height["%"]=void 0!==t.height["%"]?t.height["%"]:0;return{width:t.width.px+t.width["%"]/100*i.width(),height:t.height.px+t.height["%"]/100*i.height(),top:t.top.px+t.top["%"]/100*i.height()+i.gutter()/2,left:t.left.px+t.left["%"]/100*i.width()+i.gutter()/2}}}clearContent(t){if(t){const e=this.sectionTypes().indexOf(t);e>=0&&(this._watch&&this.content()[e]&&delete this._watch[this.content()[e].id()],this.content()[e].target(null),o("#"+this.id()+" > div.borderHandle_"+t).classed("borderHandleDisabled",!0),this.content().splice(e,1),this.sectionTypes().splice(e,1))}else this.content().forEach(function(t){return t.target(null),!1}),o("#"+this.id()+" > div.borderHandle").classed("borderHandleDisabled",!0),delete this._watch,this.content([]),this.sectionTypes([])}hasContent(t,e,i){return this.sectionTypes().indexOf(t)>=0}setContent(t,e,i){if(this.clearContent(t),i=void 0!==i?i:"",e){const s=(new E).surfaceBorderWidth(0).widget(e).title(i);this.watchWidget(e),this.content().push(s),this.sectionTypes().push(t)}return this}getCell(t){const e=this.sectionTypes().indexOf(t);return e>=0?this.content()[e]:null}getContent(t){const e=this.sectionTypes().indexOf(t);return e>=0?this.content()[e].widget():null}setLayoutOffsets(){this._offsetX=this._element.node().getBoundingClientRect().left+this.gutter()/2,this._offsetY=this._element.node().getBoundingClientRect().top+this.gutter()/2}dragStart(t){const e=r();e.sourceEvent.stopPropagation();const i=this;this._dragCell=t,this._dragCellStartSize=this[t+"Size"](),this[t+"ShrinkWrap"]()&&(this[t+"Percentage"](0),this[t+"ShrinkWrap"](!1));const s=o("#"+i.id()+" > div.borderHandle_"+t);i._handleTop=parseFloat(s.style("top").split("px")[0]),i._handleLeft=parseFloat(s.style("left").split("px")[0]),this._dragPrevX=e.sourceEvent.clientX,this._dragPrevY=e.sourceEvent.clientY}dragTick(t){const i=this,s=r(),n=this._dragPrevX-s.sourceEvent.clientX,h=this._dragPrevY-s.sourceEvent.clientY;switch(t){case"top":case"bottom":a(t,h);break;case"right":case"left":a(t,n)}function a(t,e){if(0===e)return;const s=l("#"+i.id()+" > div.borderHandle"),n=o("#"+i.id()+" > div.borderHandle_"+t);n.classed("borderHandle_top")?(n.style("top",i._handleTop-e+"px"),i._cellSizes.topHeight=i._handleTop-e,i._cellSizes.leftHeight=i._cellSizes.height,i._cellSizes.leftHeight-=i._cellSizes.topHeight,i._cellSizes.leftHeight-=i._cellSizes.bottomHeight,i._cellSizes.rightHeight=i._cellSizes.leftHeight):n.classed("borderHandle_right")?(n.style("left",i._handleLeft-e+"px"),i._cellSizes.rightWidth=i._cellSizes.width-i._handleLeft+e):n.classed("borderHandle_bottom")?(n.style("top",i._handleTop-e+"px"),i._cellSizes.bottomHeight=i._cellSizes.height-i._handleTop+e,i._cellSizes.leftHeight=i._cellSizes.height,i._cellSizes.leftHeight-=i._cellSizes.bottomHeight,i._cellSizes.leftHeight-=i._cellSizes.topHeight,i._cellSizes.rightHeight=i._cellSizes.leftHeight):n.classed("borderHandle_left")&&(n.style("left",i._handleLeft-e+"px"),i._cellSizes.leftWidth=i._handleLeft-e),s.each(function(){const t=o(this);t.classed("borderHandle_top")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.topHeight-3+"px")):t.classed("borderHandle_right")?(t.style("left",i._cellSizes.width-i._cellSizes.rightWidth+"px"),t.style("top",i._cellSizes.topHeight+3+"px"),t.style("height",i._cellSizes.rightHeight+"px")):t.classed("borderHandle_bottom")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.height-i._cellSizes.bottomHeight-3+"px")):t.classed("borderHandle_left")&&(t.style("left",i._cellSizes.leftWidth+"px"),t.style("height",i._cellSizes.leftHeight+"px"),t.style("top",i._cellSizes.topHeight+3+"px"))})}e(a,"_moveHandles")}dragEnd(t){if(t){const e=r(),i=this._dragPrevX-e.sourceEvent.clientX,s=this._dragPrevY-e.sourceEvent.clientY;switch(t){case"top":0!==s&&(this.topPercentage(0),this.topSize(0===this.topSize()?this.getContent("top").getBBox().height-s:this.topSize()-s));break;case"right":0!==i&&(this.rightPercentage(0),this.rightSize(0===this.rightSize()?this.getContent("right").getBBox().width+i:this.rightSize()+i));break;case"bottom":0!==s&&(this.bottomPercentage(0),this.bottomSize(0===this.bottomSize()?this.getContent("bottom").getBBox().height+s:this.bottomSize()+s));break;case"left":0!==i&&(this.leftPercentage(0),this.leftSize(0===this.leftSize()?this.getContent("left").getBBox().width-i:this.leftSize()-i))}this._dragPrevX=e.sourceEvent.clientX,this._dragPrevY=e.sourceEvent.clientY}this.render()}size(t){const e=i.prototype.size.apply(this,arguments);return arguments.length&&this.contentDiv&&this.contentDiv.style("width",this._size.width+"px").style("height",this._size.height+"px"),e}enter(t,e){super.enter(t,e);const i=this;e.style("position","relative"),this.contentDiv=e.append("div").classed("border-content",!0),this._scrollBarWidth=h.getScrollbarWidth(),this._borderHandles=["top","left","right","bottom"];e.selectAll("div.borderHandle").data(this._borderHandles).enter().append("div").classed("borderHandle",!0).each(function(t){o(this).classed("borderHandle_"+t,!0).classed("borderHandleDisabled",null===i.getContent(t))})}update(t,e){super.update(t,e),this._sectionTypeArr=this.sectionTypes();const i=this;e.classed("design-mode",this.designMode()),this.setLayoutOffsets();const s=this.contentDiv.selectAll(".cell_"+this._id).data(this.content(),function(t){return t._id}),l=s.enter().append("div").classed("cell_"+this._id,!0).style("position","absolute").each(function(t,e){o(this).classed("border-cell border-cell-"+i._sectionTypeArr[e],!0),t.target(this),o("#"+i.id()+" > div.borderHandle_"+i._sectionTypeArr[e]).classed("borderHandleDisabled",!1)}).merge(s);l.each(function(t,e){const s=i.sectionTypes()[e];void 0!==i[s+"ShrinkWrap"]&&i[s+"ShrinkWrap"]()?(t.render(),i._shrinkWrapBoxes[s]=t.widget().getBBox(!0)):delete i._shrinkWrapBoxes[s]});const n=a().on("start",function(t,e){i.dragStart.call(i,t,e)}).on("drag",function(t,e){i.dragTick.call(i,t,e)}).on("end",function(t,e){i.dragEnd.call(i,t,e)});this.designMode()?e.selectAll("#"+this.id()+" > div.borderHandle").call(n):e.selectAll("#"+this.id()+" > div.borderHandle").on(".drag",null);const r=this.borderLayoutObject();this.content().forEach(function(t,e){t._fixedLeft=r[this.sectionTypes()[e]].left,t._fixedTop=r[this.sectionTypes()[e]].top,t._fixedWidth=r[this.sectionTypes()[e]].width,t._fixedHeight=r[this.sectionTypes()[e]].height,t._dragHandles=[]},this),l.style("left",function(t){return t._fixedLeft+"px"}).style("top",function(t){return t._fixedTop+"px"}).style("width",function(t){return t._fixedWidth-i.gutter()+"px"}).style("height",function(t){return t._fixedHeight-i.gutter()+"px"}).each(function(t){t._placeholderElement.attr("draggable",i.designMode()).selectAll(".dragHandle").attr("draggable",i.designMode()),t.surfacePadding(i.surfacePadding()).resize()}),s.exit().each(function(t){t.target(null)}).remove(),this.getCellSizes(),e.selectAll("#"+this.id()+" > div.borderHandle").each(function(){const t=o(this);t.classed("borderHandle_top")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.topHeight-3+"px")):t.classed("borderHandle_right")?(t.style("left",i._cellSizes.width-i._cellSizes.rightWidth+"px"),t.style("top",i._cellSizes.topHeight+3+"px"),t.style("height",i._cellSizes.rightHeight+"px")):t.classed("borderHandle_bottom")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.height-i._cellSizes.bottomHeight-3+"px")):t.classed("borderHandle_left")&&(t.style("left",i._cellSizes.leftWidth+"px"),t.style("height",i._cellSizes.leftHeight+"px"),t.style("top",i._cellSizes.topHeight+3+"px"))})}getCellSizes(){const t=this;t._cellSizes={};const e=this.element().node().getBoundingClientRect();t._cellSizes.width=e.width,t._cellSizes.height=e.height,this.element().selectAll("#"+this.id()+" > div > div.border-cell").each(function(){const e=o(this);if("function"==typeof e.node){const i=e.node().getBoundingClientRect();e.classed("border-cell-top")?t._cellSizes.topHeight=i.height:e.classed("border-cell-left")?(t._cellSizes.leftWidth=i.width,t._cellSizes.leftHeight=i.height):e.classed("border-cell-right")?(t._cellSizes.rightWidth=i.width,t._cellSizes.rightHeight=i.height):e.classed("border-cell-bottom")&&(t._cellSizes.bottomHeight=i.height)}});["height","width","topHeight","bottomHeight","leftHeight","rightHeight","leftWidth","rightWidth"].forEach(function(e){t._cellSizes[e]=void 0===t._cellSizes[e]?0:t._cellSizes[e]})}postUpdate(t,e){const i=this;this.content().forEach(function(t){if(null!==t._element.node()&&t.widget()){const e=t.widget().getBBox(!1,!0),s=t.widget().getBBox(!0,!0);e.width===s.width&&e.height===s.height||i.lazyRender()}})}exit(t,e){this.content().forEach(t=>t.target(null)),super.exit(t,e)}};e(X,"Border");let Y=X;Y.prototype._class+=" layout_Border",Y.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),Y.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Intermediate"]}),Y.prototype.publish("gutter",0,"number","Gap Between Widgets",null,{tags:["Basic"]}),Y.prototype.publish("topShrinkWrap",!1,"boolean","'Top' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Y.prototype.publish("leftShrinkWrap",!1,"boolean","'Left' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Y.prototype.publish("rightShrinkWrap",!1,"boolean","'Right' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Y.prototype.publish("bottomShrinkWrap",!1,"boolean","'Bottom' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Y.prototype.publish("topSize",0,"number","Height of the 'Top' Cell (px)",null,{tags:["Private"]}),Y.prototype.publish("leftSize",0,"number","Width of the 'Left' Cell (px)",null,{tags:["Private"]}),Y.prototype.publish("rightSize",0,"number","Width of the 'Right' Cell (px)",null,{tags:["Private"]}),Y.prototype.publish("bottomSize",0,"number","Height of the 'Bottom' Cell (px)",null,{tags:["Private"]}),Y.prototype.publish("topPercentage",20,"number","Percentage (of parent) Height of the 'Top' Cell",null,{tags:["Private"]}),Y.prototype.publish("leftPercentage",20,"number","Percentage (of parent) Width of the 'Left' Cell",null,{tags:["Private"]}),Y.prototype.publish("rightPercentage",20,"number","Percentage (of parent) Width of the 'Right' Cell",null,{tags:["Private"]}),Y.prototype.publish("bottomPercentage",20,"number","Percentage (of parent) Height of the 'Bottom' Cell",null,{tags:["Private"]}),Y.prototype.publish("surfacePadding",0,"number","Cell Padding (px)",null,{tags:["Intermediate"]}),Y.prototype.publish("sectionTypes",[],"array","Section Types sharing an index with 'content' - Used to determine position/size.",null,{tags:["Private"]});const V=class _WidgetDiv{_div;_overlay=!1;_overflowX="visible";_overflowY="visible";_widget;constructor(t){this._div=t}overlay(t){return arguments.length?(this._overlay=t,this):this._overlay}overflowX(t){return arguments.length?(this._overflowX=t,this._div.style("overflow-x",t),this):this._overflowX}overflowY(t){return arguments.length?(this._overflowY=t,this._div.style("overflow-y",t),this):this._overflowY}element(){return this._div}node(){return this._div.node()}widget(t){return arguments.length?(this._widget!==t&&(this._widget&&this._widget.target(null),this._widget=t,this._widget&&this._widget.target(this._div.node())),this):this._widget}resize(t){return this._widget&&(this._div.style("width",`${t.width}px`).style("height",`${t.height}px`),this._widget.resize(t)),this}async render(t,e,i){let s=this.overflowX();this.overlay()||"visible"!==s||(s=null);let o=this.overflowY();return this.overlay()||"visible"!==o||(o=null),this._div.style("height",this.overlay()?"0px":null).style("overflow-x",s).style("overflow-y",o),this._widget?this._widget.renderPromise().then(s=>{if(t&&this._widget.visible()){const t=this._widget.getBBox();return t.width+=8,void 0!==e&&t.height>e&&(t.width+=h.getScrollbarWidth()),void 0!==i&&t.width>i&&(t.height+=h.getScrollbarWidth()),this.overlay()?t.height=0:t.height+=4,t}return t?{x:0,y:0,width:0,height:0}:void 0}):Promise.resolve(t?{x:0,y:0,width:0,height:0}:void 0)}};e(V,"WidgetDiv");let N=V;const $=class _Border2 extends i{_bodyElement;_topWA;_leftWA;_centerWA;_rightWA;_bottomWA;_topPrevOverflow;_leftPrevOverflow;_rightPrevOverflow;_bottomPrevOverflow;constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e);const i=e.append("header");this._bodyElement=e.append("div").attr("class","body");const s=this._bodyElement.append("div").attr("class","center"),o=this._bodyElement.append("div").attr("class","lhs"),l=this._bodyElement.append("div").attr("class","rhs"),n=e.append("div").attr("class","footer");this._topWA=new N(i),this._centerWA=new N(s),this._leftWA=new N(o),this._rightWA=new N(l),this._bottomWA=new N(n)}update(t,e){super.update(t,e),this._topWA.element().style("display",this.showTop()?null:"none"),this._rightWA.element().style("display",this.showRight()?null:"none"),this._bottomWA.element().style("display",this.showBottom()?null:"none"),this._leftWA.element().style("display",this.showLeft()?null:"none"),this.topOverflowX()!==this._topWA.overflowX()&&this._topWA.overflowX(this.topOverflowX()),this.rightOverflowX()!==this._rightWA.overflowX()&&this._rightWA.overflowX(this.rightOverflowX()),this.bottomOverflowX()!==this._bottomWA.overflowX()&&this._bottomWA.overflowX(this.bottomOverflowX()),this.leftOverflowX()!==this._leftWA.overflowX()&&this._leftWA.overflowX(this.leftOverflowX()),this.topOverflowY()!==this._topWA.overflowY()&&this._topWA.overflowY(this.topOverflowY()),this.rightOverflowY()!==this._rightWA.overflowY()&&this._rightWA.overflowY(this.rightOverflowY()),this.bottomOverflowY()!==this._bottomWA.overflowY()&&this._bottomWA.overflowY(this.bottomOverflowY()),this.leftOverflowY()!==this._leftWA.overflowY()&&this._leftWA.overflowY(this.leftOverflowY()),this.element().style("width",`${this.width()}px`).style("height",`${this.height()}px`)}targetNull(t){t&&t.target(null)}exit(t,e){this.targetNull(this.center()),this.targetNull(this.bottom()),this.targetNull(this.right()),this.targetNull(this.left()),this.targetNull(this.top()),super.exit(t,e)}swap(t,e){const i=this[t](),s=this[e]();return this.targetNull(i),this.targetNull(s),this[`_${t}WA`].widget(null),this[`_${e}WA`].widget(null),this[t](s),this[e](i),this}render(t){return super.render(e=>{this._topWA?this._topWA.widget(this.top()).overlay(this.topOverlay()).render(!0).then(async e=>{const i=await this._bottomWA.widget(this.bottom()).render(!0,void 0,this.width()),s=this.height()-(e.height+i.height),o=await this._leftWA.widget(this.left()).render(!0,s),l=await this._rightWA.widget(this.right()).render(!0,s);this.bottomHeight_exists()&&(i.height=this.bottomHeight());const n=this.width()-(o.width+l.width),r=this.height()-(e.height+i.height),h=this.centerOverflowX(),a=this.centerOverflowY(),d=-1!==["auto","scroll"].indexOf(h),p=-1!==["auto","scroll"].indexOf(a);(d||p)&&this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:n,height:r}).render(),this._bodyElement.style("height",`${r}px`);const c=[this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({width:this.width(),height:e.height}).render(),this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({width:o.width,height:r}).render(),this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({width:l.width,height:r}).render(),this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:n,height:r}).render(),this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({width:this.width(),height:i.height}).render()];Promise.all(c).then(e=>{t&&t(this)})}):t&&t(this)})}};e($,"Border2");let U=$;U.prototype._class+=" layout_Border2",U.prototype.publish("showTop",!0,"boolean","If true, top widget adapter will display"),U.prototype.publish("showRight",!0,"boolean","If true, right widget adapter will display"),U.prototype.publish("showBottom",!0,"boolean","If true, bottom widget adapter will display"),U.prototype.publish("showLeft",!0,"boolean","If true, left widget adapter will display"),U.prototype.publish("topOverflowX","visible","set","Sets the overflow-x css style for the top widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("rightOverflowX","visible","set","Sets the overflow-x css style for the right widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("bottomOverflowX","visible","set","Sets the overflow-x css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("leftOverflowX","visible","set","Sets the overflow-x css style for the left widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("centerOverflowX","visible","set","Sets the overflow-x css style for the center widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("topOverflowY","visible","set","Sets the overflow-y css style for the top widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("rightOverflowY","visible","set","Sets the overflow-y css style for the right widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("bottomOverflowY","visible","set","Sets the overflow-y css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("leftOverflowY","visible","set","Sets the overflow-y css style for the left widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("centerOverflowY","visible","set","Sets the overflow-y css style for the center widget adapter",["hidden","scroll","visible","auto"]),U.prototype.publish("top",null,"widget","Top Widget",void 0,{render:!1}),U.prototype.publish("topOverlay",!1,"boolean","Overlay Top Widget"),U.prototype.publish("left",null,"widget","Left Widget",void 0,{render:!1}),U.prototype.publish("center",null,"widget","Center Widget",void 0,{render:!1}),U.prototype.publish("right",null,"widget","Right Widget",void 0,{render:!1}),U.prototype.publish("bottom",null,"widget","Bottom Widget",void 0,{render:!1}),U.prototype.publish("bottomHeight",null,"number","Bottom Fixed Height",void 0,{optional:!0});const j=class _Carousel extends i{_prevActive=0;_root;activeWidget(){return this.widgets()[this.active()]}enter(t,e){super.enter(t,e),this._root=e.append("div").attr("id",`${this.id()}_root`)}update(t,e){super.update(t,e);const i=this.active(),s=this.width();this._root.style("width",`${s}px`).style("height",`${this.height()}px`);const l=this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(),t=>t.id()),n=l.enter().append("div").attr("class","carouselItem").each(function(t){t.target(this)}).merge(l).style("left",(t,e)=>(e-this._prevActive)*s+"px").style("width",`${s}px`);this._prevActive!==i&&(n.style("display",(t,e)=>e===this._prevActive||e===i?null:"none").transition().duration(this.transitionDuration()).style("left",(t,e)=>(e-i)*s+"px").on("end",function(t,e){o(this).style("display",()=>e===i?null:"none")}),this._prevActive=i),l.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widgets().forEach(t=>t.target(null)),super.exit(t,e)}render(t){return super.render(e=>{if(!this.visible()||this.isDOMHidden())t&&t(e);else{const i=this.activeWidget();i&&i.resize(this.size()).render(i=>{t&&t(e)})}})}};e(j,"Carousel");let q=j;q.prototype._class+=" layout_Carousel",q.prototype.publish("widgets",[],"widgetArray","Widgets",null,{render:!1}),q.prototype.publish("active",0,"number","Active widget"),q.prototype.publish("transitionDuration",500,"number","Transition duration");var J=Math.PI,Z=2*J,K=1e-6,Q=Z-K;function tt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function et(){return new tt}function it(t){/* @__PURE__ */
|
|
2
|
-
return e(function(){return t},"constant")}e(tt,"Path"),e(et,"path"),tt.prototype=et.prototype={constructor:tt,moveTo:/* @__PURE__ */e(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:/* @__PURE__ */e(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:/* @__PURE__ */e(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:/* @__PURE__ */e(function(t,e,i,s){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+s)},"quadraticCurveTo"),bezierCurveTo:/* @__PURE__ */e(function(t,e,i,s,o,l){this._+="C"+ +t+","+ +e+","+ +i+","+ +s+","+(this._x1=+o)+","+(this._y1=+l)},"bezierCurveTo"),arcTo:/* @__PURE__ */e(function(t,e,i,s,o){t=+t,e=+e,i=+i,s=+s,o=+o;var l=this._x1,n=this._y1,r=i-t,h=s-e,a=l-t,d=n-e,p=a*a+d*d;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(p>K)if(Math.abs(d*r-h*a)>K&&o){var c=i-l,u=s-n,g=r*r+h*h,f=c*c+u*u,_=Math.sqrt(g),y=Math.sqrt(p),b=o*Math.tan((J-Math.acos((g+p-f)/(2*_*y)))/2),w=b/y,m=b/_;Math.abs(w-1)>K&&(this._+="L"+(t+w*a)+","+(e+w*d)),this._+="A"+o+","+o+",0,0,"+ +(d*c>a*u)+","+(this._x1=t+m*r)+","+(this._y1=e+m*h)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},"arcTo"),arc:/* @__PURE__ */e(function(t,e,i,s,o,l){t=+t,e=+e,l=!!l;var n=(i=+i)*Math.cos(s),r=i*Math.sin(s),h=t+n,a=e+r,d=1^l,p=l?s-o:o-s;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+h+","+a:(Math.abs(this._x1-h)>K||Math.abs(this._y1-a)>K)&&(this._+="L"+h+","+a),i&&(p<0&&(p=p%Z+Z),p>Q?this._+="A"+i+","+i+",0,1,"+d+","+(t-n)+","+(e-r)+"A"+i+","+i+",0,1,"+d+","+(this._x1=h)+","+(this._y1=a):p>K&&(this._+="A"+i+","+i+",0,"+ +(p>=J)+","+d+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=e+i*Math.sin(o))))},"arc"),rect:/* @__PURE__ */e(function(t,e,i,s){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +s+"h"+-i+"Z"},"rect"),toString:/* @__PURE__ */e(function(){return this._},"toString")},e(it,"constant");var st=Math.PI,ot=2*st;const lt={draw:/* @__PURE__ */e(function(t,e){var i=Math.sqrt(e/st);t.moveTo(i,0),t.arc(0,0,i,0,ot)},"draw")},nt={draw:/* @__PURE__ */e(function(t,e){var i=Math.sqrt(e/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()},"draw")};var rt=Math.sqrt(1/3),ht=2*rt;const at={draw:/* @__PURE__ */e(function(t,e){var i=Math.sqrt(e/ht),s=i*rt;t.moveTo(0,-i),t.lineTo(s,0),t.lineTo(0,i),t.lineTo(-s,0),t.closePath()},"draw")};var dt=Math.sin(st/10)/Math.sin(7*st/10),pt=Math.sin(ot/10)*dt,ct=-Math.cos(ot/10)*dt;const ut={draw:/* @__PURE__ */e(function(t,e){var i=Math.sqrt(.8908130915292852*e),s=pt*i,o=ct*i;t.moveTo(0,-i),t.lineTo(s,o);for(var l=1;l<5;++l){var n=ot*l/5,r=Math.cos(n),h=Math.sin(n);t.lineTo(h*i,-r*i),t.lineTo(r*s-h*o,h*s+r*o)}t.closePath()},"draw")},gt={draw:/* @__PURE__ */e(function(t,e){var i=Math.sqrt(e),s=-i/2;t.rect(s,s,i,i)},"draw")};var ft=Math.sqrt(3);const _t={draw:/* @__PURE__ */e(function(t,e){var i=-Math.sqrt(e/(3*ft));t.moveTo(0,2*i),t.lineTo(-ft*i,-i),t.lineTo(ft*i,-i),t.closePath()},"draw")};var yt=-.5,bt=Math.sqrt(3)/2,wt=1/Math.sqrt(12),mt=3*(wt/2+1);const vt={draw:/* @__PURE__ */e(function(t,e){var i=Math.sqrt(e/mt),s=i/2,o=i*wt,l=s,n=i*wt+i,r=-l,h=n;t.moveTo(s,o),t.lineTo(l,n),t.lineTo(r,h),t.lineTo(yt*s-bt*o,bt*s+yt*o),t.lineTo(yt*l-bt*n,bt*l+yt*n),t.lineTo(yt*r-bt*h,bt*r+yt*h),t.lineTo(yt*s+bt*o,yt*o-bt*s),t.lineTo(yt*l+bt*n,yt*n-bt*l),t.lineTo(yt*r+bt*h,yt*h-bt*r),t.closePath()},"draw")};function xt(){var t=it(lt),i=it(64),s=null;function o(){var e;if(s||(s=e=et()),t.apply(this,arguments).draw(s,+i.apply(this,arguments)),e)return s=null,e+""||null}return e(o,"symbol"),o.type=function(e){return arguments.length?(t="function"==typeof e?e:it(e),o):t},o.size=function(t){return arguments.length?(i="function"==typeof t?t:it(+t),o):i},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}e(xt,"d3Symbol");var St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct=/* @__PURE__ */e(function(t){return t},"d3_identity"),Pt=/* @__PURE__ */e(function(t){for(var e=[],i=0,s=t.length;i<s;i++)e[i]=t[s-i-1];return e},"d3_reverse"),Tt=/* @__PURE__ */e(function(t,e){t.each(function(){var t,i=o(this),s=i.text().split(/\s+/).reverse(),l=[];i.attr("y");for(var n=parseFloat(i.attr("dy"))||0,r=i.text(null).append("tspan").attr("x",0).attr("dy",n+"em");t=s.pop();)l.push(t),r.text(l.join(" ")),r.node().getComputedTextLength()>e&&l.length>1&&(l.pop(),r.text(l.join(" ")),l=[t],r=i.append("tspan").attr("x",0).attr("dy",1.2+n+"em").text(t))})},"d3_textWrapping"),zt=/* @__PURE__ */e(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],i=arguments[2],s=arguments[3],o=arguments[4];if("object"===(void 0===e?"undefined":St(e))){if(0===e.length)return t;for(var l=e.length;l<t.length;l++)e.push(t[l]);return e}if("function"==typeof e){for(var n=[],r=t.length,h=0;h<r;h++)n.push(e({i:h,genLength:r,generatedLabels:t,domain:i,range:s,labelDelimiter:o}));return n}return t},"d3_mergeLabels"),Wt=/* @__PURE__ */e(function(t,i,s){var o=[];if(i.length>1)o=i;else for(var l=t.domain(),n=(l[l.length-1]-l[0])/(i-1),r=0;r<i;r++)o.push(l[0]+r*n);var h=o.map(s);return{data:o,labels:h,feature:/* @__PURE__ */e(function(e){return t(e)},"feature")}},"d3_linearLegend"),Bt=/* @__PURE__ */e(function(t,e,i){var s=t.range().map(function(s){var o=t.invertExtent(s);return e(o[0])+" "+i+" "+e(o[1])});return{data:t.range(),labels:s,feature:Ct}},"d3_quantLegend"),It=/* @__PURE__ */e(function(t){return{data:t.domain(),labels:t.domain(),feature:/* @__PURE__ */e(function(e){return t(e)},"feature")}},"d3_ordinalLegend"),At=/* @__PURE__ */e(function(t,e,i){t.call("cellover",i,e)},"d3_cellOver"),Ht=/* @__PURE__ */e(function(t,e,i){t.call("cellout",i,e)},"d3_cellOut"),Mt=/* @__PURE__ */e(function(t,e,i){t.call("cellclick",i,e)},"d3_cellClick"),kt={d3_drawShapes:/* @__PURE__ */e(function(t,e,i,s,o,l){"rect"===t?e.attr("height",i).attr("width",s):"circle"===t?e.attr("r",o):"line"===t?e.attr("x1",0).attr("x2",s).attr("y1",0).attr("y2",0):"path"===t&&e.attr("d",l)},"d3_drawShapes"),d3_addText:/* @__PURE__ */e(function(t,e,i,s,o){e.append("text").attr("class",s+"label");var l=t.selectAll("g."+s+"cell text."+s+"label").data(i).text(Ct);return o&&t.selectAll("g."+s+"cell text."+s+"label").call(Tt,o),l},"d3_addText"),d3_calcType:/* @__PURE__ */e(function(t,e,i,s,o,l){var n=t.invertExtent?Bt(t,o,l):t.ticks?Wt(t,i,o):It(t),r=t.range&&t.range()||t.domain();return n.labels=zt(n.labels,s,t.domain(),r,l),e&&(n.labels=Pt(n.labels),n.data=Pt(n.data)),n},"d3_calcType"),d3_filterCells:/* @__PURE__ */e(function(t,e){var i=t.data.map(function(e,i){return{data:e,label:t.labels[i]}}).filter(e),s=i.map(function(t){return t.data}),o=i.map(function(t){return t.label});return t.data=t.data.filter(function(t){return-1!==s.indexOf(t)}),t.labels=t.labels.filter(function(t){return-1!==o.indexOf(t)}),t},"d3_filterCells"),d3_placement:/* @__PURE__ */e(function(t,e,i,s,o,l){e.attr("transform",i),s.attr("transform",o),"horizontal"===t&&s.style("text-anchor",l)},"d3_placement"),d3_addEvents:/* @__PURE__ */e(function(t,e){t.on("mouseover.legend",function(t){At(e,t,this)}).on("mouseout.legend",function(t){Ht(e,t,this)}).on("click.legend",function(t){Mt(e,t,this)})},"d3_addEvents"),d3_title:/* @__PURE__ */e(function(t,e,i,s){if(""!==e){t.selectAll("text."+i+"legendTitle").data([e]).enter().append("text").attr("class",i+"legendTitle"),t.selectAll("text."+i+"legendTitle").text(e),s&&t.selectAll("text."+i+"legendTitle").call(Tt,s);var o=t.select("."+i+"legendCells"),l=t.select("."+i+"legendTitle").nodes().map(function(t){return t.getBBox().height})[0],n=-o.nodes().map(function(t){return t.getBBox().x})[0];o.attr("transform","translate("+n+","+l+")")}},"d3_title"),d3_defaultLocale:{format:u,formatPrefix:c},d3_defaultFormatSpecifier:".01f",d3_defaultDelimiter:"to"};function Ft(){var t=d(),i="rect",s=15,o=15,l=10,n=2,r=[5],h=void 0,a=[],c="",u=!1,y="",b=kt.d3_defaultLocale,w=kt.d3_defaultFormatSpecifier,m=10,v="middle",x=kt.d3_defaultDelimiter,S=void 0,C="vertical",P=!1,T=void 0,z=void 0,W=p("cellover","cellout","cellclick");function B(d){var p=kt.d3_calcType(t,P,r,a,b.format(w),x);d.selectAll("g").data([t]).enter().append("g").attr("class",c+"legendCells"),h&&kt.d3_filterCells(p,h);var g=d.select("."+c+"legendCells").selectAll("."+c+"cell").data(p.data),f=g.enter().append("g").attr("class",c+"cell");f.append(i).attr("class",c+"swatch");var B=d.selectAll("g."+c+"cell "+i+"."+c+"swatch").data(p.data);kt.d3_addEvents(f,W),g.exit().transition().style("opacity",0).remove(),B.exit().transition().style("opacity",0).remove(),B=B.merge(B),kt.d3_drawShapes(i,B,o,s,l,T);var I=kt.d3_addText(d,f,p.labels,c,S);g=f.merge(g);var A=I.nodes().map(function(t){return t.getBBox()}),H=B.nodes().map(function(t){return t.getBBox()});u?B.attr("class",function(t){return c+"swatch "+p.feature(t)}):"line"==i?B.style("stroke",p.feature):B.style("fill",p.feature);var M,k=void 0,F=void 0,O="start"==v?0:"middle"==v?.5:1;"vertical"===C?(M=A.map(function(t,e){return Math.max(t.height,H[e].height)}),k=/* @__PURE__ */e(function(t,e){return"translate(0, "+(_(M.slice(0,e))+e*n)+")"},"cellTrans"),F=/* @__PURE__ */e(function(t,e){return"translate( "+(H[e].width+H[e].x+m)+", "+(H[e].y+H[e].height/2+5)+")"},"textTrans")):"horizontal"===C&&(k=/* @__PURE__ */e(function(t,e){return"translate("+e*(H[e].width+n)+",0)"},"cellTrans"),F=/* @__PURE__ */e(function(t,e){return"translate("+(H[e].width*O+H[e].x)+",\n "+(H[e].height+H[e].y+m+8)+")"},"textTrans")),kt.d3_placement(C,g,k,I,F,v),kt.d3_title(d,y,c,z),g.transition().style("opacity",1)}return e(B,"legend"),B.scale=function(e){return arguments.length?(t=e,B):t},B.cells=function(t){return arguments.length?((t.length>1||t>=2)&&(r=t),B):r},B.cellFilter=function(t){return arguments.length?(h=t,B):h},B.shape=function(t,e){return arguments.length?(("rect"==t||"circle"==t||"line"==t||"path"==t&&"string"==typeof e)&&(i=t,T=e),B):i},B.shapeWidth=function(t){return arguments.length?(s=+t,B):s},B.shapeHeight=function(t){return arguments.length?(o=+t,B):o},B.shapeRadius=function(t){return arguments.length?(l=+t,B):l},B.shapePadding=function(t){return arguments.length?(n=+t,B):n},B.labels=function(t){return arguments.length?(a=t,B):a},B.labelAlign=function(t){return arguments.length?("start"!=t&&"end"!=t&&"middle"!=t||(v=t),B):v},B.locale=function(t){return arguments.length?(b=g(t),B):b},B.labelFormat=function(t){return arguments.length?(w=f(t),B):B.locale().format(w)},B.labelOffset=function(t){return arguments.length?(m=+t,B):m},B.labelDelimiter=function(t){return arguments.length?(x=t,B):x},B.labelWrap=function(t){return arguments.length?(S=t,B):S},B.useClass=function(t){return arguments.length?(!0!==t&&!1!==t||(u=t),B):u},B.orient=function(t){return arguments.length?("horizontal"!=(t=t.toLowerCase())&&"vertical"!=t||(C=t),B):C},B.ascending=function(t){return arguments.length?(P=!!t,B):P},B.classPrefix=function(t){return arguments.length?(c=t,B):c},B.title=function(t){return arguments.length?(y=t,B):y},B.titleWidth=function(t){return arguments.length?(z=t,B):z},B.textWrap=function(t){return arguments.length?(textWrap=t,B):textWrap},B.on=function(){var t=W.on.apply(W,arguments);return t===W?B:t},B}e(Ft,"color");const Ot=class _Legend extends y{_owner;_targetWidget;_targetWidgetMonitor;_legendOrdinal;_disabled=[];_symbolTypeMap={circle:lt,cross:nt,diamond:at,square:gt,star:ut,triangle:_t,wye:vt};constructor(t){super(),this._owner=t,this._drawStartPos="origin";const e=this;this._legendOrdinal=Ft().shape("path",xt().type(lt).size(150)()).shapePadding(10).shapeRadius(10).on("cellclick",function(t){e.onClick(t,this)}).on("cellover",t=>{e.onOver(t,this)}).on("cellout",t=>{e.onOut(t,this)})}isDisabled(t){return void 0!==t&&("string"==typeof t?0===t.indexOf("__")||this._disabled.indexOf(t)>=0:t instanceof b.Field?0===t.id().indexOf("__")||this._disabled.indexOf(t.id())>=0:this._disabled.indexOf(t)>=0)}filteredFields(){switch(this.dataFamily()){case"2D":return this.fields();case"ND":return this.fields().filter(t=>!this.isDisabled(t))}return this.fields()}filteredColumns(){switch(this.dataFamily()){case"2D":return this.columns();case"ND":return this.columns().filter(t=>!this.isDisabled(t))}return this.columns()}filteredData(){switch(this.dataFamily()){case"2D":return this.data().filter(t=>!this.isDisabled(t[0]));case"ND":const t={};let e=!1;return this.columns().forEach((i,s)=>{const o=this.isDisabled(i);t[s]=o,o&&(e=!0)}),e?this.data().map(e=>e.filter((e,i)=>!t[i])):this.data()}return this.data()}isRainbow(){const t=this.getWidget();return t&&t._palette&&"rainbow"===t._palette.type()}targetWidget(t){if(!arguments.length)return this._targetWidget;if(this._targetWidget=t,this._targetWidgetMonitor&&(this._targetWidgetMonitor.remove(),delete this._targetWidgetMonitor),this._targetWidget){const t=this;this._targetWidgetMonitor=this._targetWidget.monitor(function(e,i,s,o){switch(e){case"chart":case"columns":case"data":case"paletteID":t.lazyRender()}})}return this}getWidget(){return this._targetWidget&&"composite_MultiChart"===this._targetWidget.classID()?this._targetWidget.chart():this._targetWidget}getPalette(){const t=this.getWidget();if(t&&t._palette)switch(t._palette.type()){case"ordinal":return w.ordinal(t._palette.id());case"rainbow":return w.rainbow(t._palette.id())}return w.ordinal("default")}getPaletteType(){return this.getPalette().type()}fillColorFunc(){const t=this.getWidget();if(t&&t.fillColor)return t._palette&&t.paletteID&&t._palette.name!==t.paletteID()&&(t._palette=t._palette.switch(t.paletteID())),(e,i,s)=>t.fillColor(e,i,s);const e=w.ordinal(t&&t.paletteID&&t.paletteID()||"default");return(t,i,s)=>e(i)}fillColor(t,e,i){return this.fillColorFunc()(t,e,i)}_g;enter(t,e){super.enter(t,e),this._g=e.append("g").attr("class","legendOrdinal")}calcMetaData(){let t=[],e=0,i=0;const s=this.columns().length;if(this._targetWidget){const o=this.columns();switch(this.getPaletteType()){case"ordinal":const l=this.fillColorFunc();let n=0;switch(this.dataFamily()){case"2D":t=this.data().map(function(t,o){n=this.data()[o].slice(1,s).reduce((t,e)=>t+e,0);const r=this.isDisabled(t[0]);r||(e+=n);const h=t[0]+(!r&&this.showSeriesTotal()?` (${n})`:""),a=this.textSize(h);return i<a.width&&(i=a.width),[l(t,t[0],!1),t[0],h]},this);break;case"ND":t=this.columns().filter(t=>0!==t.indexOf("__")).filter(function(t,e){return e>0}).map(function(t,s){n=this.data().reduce((t,e)=>t+e[s+1],0);const r=this.isDisabled(o[s+1]),h=t+(!r&&this.showSeriesTotal()?` (${n})`:"");r||(e+=n);const a=this.textSize(h);return i<a.width&&(i=a.width),[l(void 0,t,!1),t,h]},this);break;default:t=this.columns().map(function(t){return[l(void 0,t,!1),t]},this)}break;case"rainbow":const r=this.getPalette(),h=u(this.rainbowFormat()),a=this.getWidget(),d=this.rainbowBins(),p=a._dataMinWeight,c=a._dataMaxWeight,g=(c-p)/(d-1);t.push([r(p,p,c),h(p)]);for(let e=1;e<d-1;++e){let i=g*e;Math.floor(i)>parseInt(t[0][1])&&(i=Math.floor(i)),t.push([r(i,p,c),h(i)])}t.push([r(c,p,c),h(c)])}}return{dataArr:t,total:e,maxLabelWidth:i}}update(t,e){super.update(t,e);const{dataArr:i,maxLabelWidth:s,total:o}=this.calcMetaData(),l=this.shapeRadius(),n=this.radiusToSymbolSize(l);let r=this.itemPadding();"horizontal"===this.orientation()&&(r+=s-2*l);const h=m().domain(i.map(t=>t[1])).range(i.map(t=>t[0]));this._legendOrdinal.shape("path",xt().type(this._symbolTypeMap[this.symbolType()]).size(n)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(r).scale(h).labels(t=>i[t.i][2]),this._g.call(this._legendOrdinal),this.updateDisabled(e,i);const a=this._g.select(".legendCells").node().getBBox();let d=Math.abs(a.x),p=Math.abs(a.y)+1;if("horizontal"===this.orientation()){if("start"===this.labelAlign()?d+=1:"end"===this.labelAlign()&&(d-=1),this.width()>a.width){d+=(this.width()-a.width)/2}}else if("vertical"===this.orientation()&&(d+=1,this._containerSize.height>a.height)){p+=(this.height()-a.height)/2}this._g.attr("transform",`translate(${d}, ${p})`),this.pos({x:0,y:0}),this._legendOrdinal.labelOffset(this.itemPadding());const c=this._g.selectAll(".legendTotal").data(i.length&&this.showLegendTotal()?[o]:[]),u=`Total: ${o}`,g=-d,f=a.height+this.itemPadding()+1;this.enableOverflowScroll(!1),this.enableOverflow(!0),c.enter().append("text").classed("legendTotal",!0).merge(c).attr("transform",`translate(${g}, ${f})`).text(u),c.exit().remove()}updateDisabled(t,e){t.style("cursor","pointer").selectAll("path.swatch").filter((t,i)=>i<e.length).style("stroke",(t,i)=>e[i][0]).style("fill",(t,i)=>this._disabled.indexOf(t)<0?e[i][0]:"white")}postUpdate(t,e){let i;this._boundingBox&&(i=this._boundingBox.width,this._boundingBox.width=this._size.width),super.postUpdate(t,e),void 0!==i&&(this._boundingBox.width=i),this._parentRelativeDiv.style("overflow","hidden")}exit(t,e){super.exit(t,e)}radiusToSymbolSize(t){const e=Math.pow(t,2)*Math.PI;switch(this.symbolType()){case"star":return.45*e;case"triangle":return.65*e;case"cross":case"diamond":case"wye":return.75*e;case"circle":return e;case"square":return 1.3*e}}onClick(t,e){if("ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":const e=this._disabled.indexOf(t);e<0?this._disabled.push(t):this._disabled.splice(e,1),this._owner.refreshColumns(),this._owner.refreshData(),this._owner.render()}}onOver(t,e){if(B(this._owner)&&"ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":this._disabled.indexOf(t)<0&&this._owner.highlightColumn(t)}}onOut(t,e){if(B(this._owner)&&"ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":this._owner.highlightColumn()}}onDblClick(t,e){}onMouseOver(t,e){}_containerSize;resize(t){let e;if(this.fitToContent()){this._containerSize=t;const i=this.getBBox();t.width>i.width&&(i.width=t.width),t.height>i.height&&(i.height=t.height),e=super.resize.apply(this,[{...i}])}else e=super.resize.apply(this,arguments);return e}};e(Ot,"Legend");let Lt=Ot;Lt.prototype._class+=" layout_Legend",Lt.prototype.publish("title","","string","Title"),Lt.prototype.publish("symbolType","circle","set","Shape of each legend item",["circle","cross","diamond","square","star","triangle","wye"]),Lt.prototype.publish("labelMaxWidth",null,"number","Max Label Width (pixels)",null,{optional:!0}),Lt.prototype.publish("orientation","vertical","set","Orientation of Legend rows",["vertical","horizontal"],{tags:["Private"]}),Lt.prototype.publish("dataFamily","ND","set","Type of data",["1D","2D","ND","map","graph","any"],{tags:["Private"]}),Lt.prototype.publish("rainbowFormat",",","string","Rainbow number formatting",null,{tags:["Private"],optional:!0,disable:/* @__PURE__ */e(t=>!t.isRainbow(),"disable")}),Lt.prototype.publish("rainbowBins",8,"number","Number of rainbow bins",null,{tags:["Private"],disable:/* @__PURE__ */e(t=>!t.isRainbow(),"disable")}),Lt.prototype.publish("showSeriesTotal",!1,"boolean","Show value next to series"),Lt.prototype.publish("showLegendTotal",!1,"boolean","Show a total of the series values under the legend",null),Lt.prototype.publish("itemPadding",8,"number","Padding between legend items (pixels)"),Lt.prototype.publish("shapeRadius",7,"number","Radius of legend shape (pixels)"),Lt.prototype.publish("fitToContent",!0,"boolean","If true, resize will simply reapply the bounding box dimensions"),Lt.prototype.publish("labelAlign","start","set","Horizontal alignment of legend item label (for horizontal orientation only)",["start","middle","end"],{optional:!0,disable:/* @__PURE__ */e(t=>"vertical"===t.orientation(),"disable")});const Dt=class _Modal extends i{_widget;_relativeTarget;_fade;_modal;_modalHeader;_modalBody;_modalHeaderAnnotations;_modalHeaderCloseButton;_close;constructor(){super(),this._tag="div"}closeModal(){this.visible(!1)}getRelativeTarget(){let t;return this.relativeTargetId()&&(t=document.getElementById(this.relativeTargetId()),t)?t:!t&&(t=this.locateAncestor("layout_Grid"),t&&t.element)?t.element().node():document.body}setModalSize(){null!==this.fixedHeight()&&null!==this.fixedWidth()?this._modal.style("height",this.fixedHeight()).style("width",this.fixedWidth()).style("min-height",null).style("min-width",null).style("max-height",null).style("max-width",null):(this.minHeight()||this.minWidth())&&this._modal.style("min-height",this.minHeight()).style("min-width",this.minWidth()).style("max-height",this.maxHeight()).style("max-width",this.maxWidth());const t=this._modal.node().getBoundingClientRect(),e=this._modalHeader.node().getBoundingClientRect();return this._modalBody.style("height",t.height-e.height+"px").style("width",t.width),t}setFadePosition(t){this._fade.style("top",t.top+"px").style("left",t.left+"px").style("width",t.width+"px").style("height",t.height+"px")}setModalPosition(t){const e=this.setModalSize();if(null!==this.fixedTop()&&null!==this.fixedLeft())this._modal.style("top",`calc(${this.fixedTop()} + ${t.top}px)`).style("left",`calc(${this.fixedLeft()} + ${t.left}px)`);else if(null!==this.fixedHeight()&&null!==this.fixedWidth())this._modal.style("top",t.top+t.height/2-e.height/2+"px").style("left",t.left+t.width/2-e.width/2+"px");else if(this.minHeight()||this.minWidth()){const e=this._modal.node().getBoundingClientRect();this._modal.style("top",t.top+t.height/2-e.height/2+"px").style("left",t.left+t.width/2-e.width/2+"px")}}resize(t){return super.resize(),this._modal&&this.setModalSize(),this}resizeBodySync(t,e){const i=this._modalHeader.node().getBoundingClientRect();return this._modal.style("width",t+"px").style("height",e+i.height+"px").style("min-width",t+"px").style("min-height",e+i.height+"px"),this._modalHeader.style("width",t+"px"),this._modalBody.style("width",t+"px").style("height",e+"px"),this.minWidth(t+"px").minHeight(e+i.height+"px").resize({height:e+i.height,width:t})}enter(t,e){super.enter(t,e),this._fade=e.append("div").classed("layout_Modal-fade",!0).classed("layout_Modal-fadeClickable",this.enableClickFadeToClose()).classed("layout_Modal-fade-hidden",!this.showFade());const i=2*this.titleFontSize();this._modal=e.append("div").classed("layout_Modal-content",!0),this._modalHeader=this._modal.append("div").classed("layout_Modal-header",!0).style("color",this.titleFontColor()).style("font-size",this.titleFontSize()+"px").style("height",i+"px"),this._modalBody=this._modal.append("div").classed("layout_Modal-body",!0).style("height",`calc( 100% - ${i}px )`).style("overflow-x",this.overflowX()).style("overflow-y",this.overflowY()),this._modalHeader.append("div").classed("layout_Modal-title",!0).style("line-height",this.titleFontSize()+"px").style("top",this.titleFontSize()/2+"px").style("left",this.titleFontSize()/2+"px").text(this.formattedTitle()),this._modalHeaderAnnotations=this._modalHeader.append("div").classed("layout_Modal-annotations",!0),this._modalHeaderCloseButton=this._modalHeaderAnnotations.append("div").classed("layout_Modal-closeButton",!0).html('<i class="fa fa-close"></i>'),this._modalHeaderAnnotations.style("line-height",this.titleFontSize()+"px").style("right",this.titleFontSize()/2+"px").style("top",this.titleFontSize()/2+"px"),this._modalHeaderCloseButton.on("click",()=>{this.closeModal()}),this._fade.on("click",t=>{this.enableClickFadeToClose()&&this.closeModal()})}update(t,e){super.update(t,e),e.style("display",this.show()?null:"none"),this._fade.classed("layout_Modal-fade-hidden",!this.showFade()),this._relativeTarget=this.getRelativeTarget(),this.setModalSize();const i=this._relativeTarget.getBoundingClientRect();this.setFadePosition(i),this.setModalPosition(i),this.show()?(this._widget.target()||this._widget.target(this._modalBody.node()),this._widget.resize().render()):this._widget.target(null).render()}exit(t,e){this._widget&&this._widget.target(null),super.exit(t,e)}formattedTitle(){const t=this.title_exists()?this.title().trim():"";return t.length>0&&"("===t.slice(0,1)&&")"===t.slice(-1)?t.slice(1,-1):this.title()}};e(Dt,"Modal");let Rt=Dt;Rt.prototype._class+=" layout_Modal",Rt.prototype.publish("title",null,"string","title"),Rt.prototype.publish("widget",null,"widget","widget"),Rt.prototype.publish("titleFontSize",18,"number","titleFontSize (in pixels)"),Rt.prototype.publish("titleFontColor","#ffffff","html-color","titleFontColor"),Rt.prototype.publish("relativeTargetId",null,"string","relativeTargetId"),Rt.prototype.publish("show",!0,"boolean","show"),Rt.prototype.publish("showFade",!0,"boolean","showFade"),Rt.prototype.publish("enableClickFadeToClose",!0,"boolean","enableClickFadeToClose"),Rt.prototype.publish("minWidth","400px","string","minWidth"),Rt.prototype.publish("minHeight","400px","string","minHeight"),Rt.prototype.publish("maxWidth","800px","string","maxWidth"),Rt.prototype.publish("maxHeight","800px","string","maxHeight"),Rt.prototype.publish("fixedWidth",null,"string","fixedWidth"),Rt.prototype.publish("fixedHeight",null,"string","fixedHeight"),Rt.prototype.publish("fixedTop",null,"string","fixedTop"),Rt.prototype.publish("fixedLeft",null,"string","fixedLeft"),Rt.prototype.publish("overflowX","hidden","string","overflowX"),Rt.prototype.publish("overflowY","scroll","string","overflowY");const Gt=class _ChartPanel extends U{_legend=new Lt(this).enableOverflow(!0);_progressBar=new v;_autoScale=!1;_resolutions={tiny:{width:100,height:100},small:{width:300,height:300}};_modal=new Rt;_highlight;_scale;_orig_size;_toggleInfo=(new x).faChar("fa-info-circle").tooltip(".Description").selected(!1).on("enabled",()=>""!==this.description()).on("click",()=>{if(this._toggleInfo.selected()){this._modal.title(this.title()).widget((new S).text(this.description())).show(!0).render();const t=this._modal._close;this._modal._close=()=>{this._toggleInfo.selected(!1).render(),this._modal._close=t}}}).on("mouseMove",()=>{}).on("mouseOut",()=>{});_toggleData=(new x).faChar("fa-table").tooltip("Data").on("click",()=>{this.dataVisible(this._toggleData.selected()),this.render()});_buttonDownload=(new C).faChar("fa-download").tooltip("Download").on("click",()=>{this.downloadCSV()});_buttonDownloadImage=(new C).faChar("fa-image").tooltip("Download Image").on("click",()=>{this.downloadPNG()});_toggleLegend=(new x).faChar("fa-list-ul").tooltip("Legend").selected(!1).on("click",()=>{const t=this._toggleLegend.selected();"bottom"===this.legendPosition()?this.showBottom(t):"right"===this.legendPosition()&&this.showRight(t),this.legendVisible(t),this.render()});_spacer=new P;_titleBar=(new T).buttons([this._toggleData,this._buttonDownload,this._buttonDownloadImage,this._spacer,this._toggleLegend]);_carousel=new q;_table=new W;_widget;_hideLegendToggleList=["dgrid_Table","dgrid2_Table"];constructor(){super(),this._tag="div"}fields(t){return arguments.length?(super.fields(t),this._legend.fields(t),this.refreshFields(),this):super.fields()}refreshFields(){return this._widget.fields(this._legend.filteredFields()),this._table.fields(this._legend.filteredFields()),this}columns(t,e){return arguments.length?(super.columns(t,e),this._legend.columns(t,e),this.refreshColumns(),this):super.columns()}refreshColumns(){return this._widget.columns(this._legend.filteredColumns()),this._table.columns(this._legend.filteredColumns()),this}data(t){return arguments.length?(super.data(t),this._legend.data(t),this.refreshData(),this):super.data()}refreshData(){return this._widget.data(this._legend.filteredData()),this._table.data(this._legend.filteredData()),this}highlight(t){return arguments.length?(this._highlight=t,this):this._highlight}startProgress(){this._progressBar.start()}finishProgress(){this._progressBar.finish()}buttons(t){return arguments.length?(this._titleBar.buttons(t),this):this._titleBar.buttons()}downloadCSV(){const t=this.downloadTitle()?this.downloadTitle():this.title()?this.title():"data",e=this.downloadTimestampSuffix()?"_"+n.timestamp():"";return n.downloadString("CSV",this._widget.export("CSV"),t+e),this}downloadPNG(){const t=this.widget();return t instanceof y&&(this.legendVisible()?t.downloadPNG(this.title(),void 0,this._legend):t.downloadPNG(this.title())),this}highlightColumn(t){if(t){const e=`series-${this.cssTag(t)}`;this._centerWA.element().selectAll(".series").each(function(){const t=o(this),i=t.classed(e);t.classed("highlight",i).classed("lowlight",!i)})}else this._centerWA.element().selectAll(".series").classed("highlight",!1).classed("lowlight",!1);return this}getResponsiveMode(){return this.enableAutoscaling()?this._autoScale?this.size().width<=this._resolutions.tiny.width||this.size().height<=this._resolutions.tiny.height?"tiny":this.size().width<=this._resolutions.small.width||this.size().height<=this._resolutions.small.height?"small":"regular":"regular":"none"}setOrigSize(){this._orig_size=JSON.parse(JSON.stringify(this.size()))}enter(t,e){super.enter(t,e),this._modal.target(this.target()).relativeTargetId(this.id()),this.top(this._titleBar),this.center(this._carousel),this._legend.targetWidget(this._widget).orientation("vertical").title("").visible(!1),this._progressBar.enter(t,e),this.setOrigSize()}preUpdateTiny(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display","none")}preUpdateSmall(t){const e=this._orig_size.width/this._resolutions.small.width,i=this._orig_size.height/this._resolutions.small.height;this._scale=Math.min(e,i);const s=this._scale===e;this.size({width:s?this._resolutions.small.width:this._orig_size.width*(1/this._scale),height:s?this._orig_size.height*(1/this._scale):this._resolutions.small.height}),t.select("div.title-icon").style("position","static"),t.selectAll("lhs").style("display","none"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden"),t.style("transform",`scale(${this._scale})`)}preUpdateRegular(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden"),t.select("div.title-icon").style("position","static"),t.style("transform","translate(0px,0px) scale(1)")}_prevdataVisible;_prevlegendVisible;_prevLegendPosition;_prevChartDataFamily;_prevChart;_prevButtons;update(t,e){super.update(t,e)}preUpdate(t,e){switch(super.preUpdate(t,e),this._prevLegendPosition!==this.legendPosition()&&(null!==this._legend.target()&&this._legend.target(null),void 0!==this._prevLegendPosition?this.swap(this._prevLegendPosition,this.legendPosition()):this[this.legendPosition()](this._legend),"right"===this.legendPosition()?(this.rightOverflowX("hidden"),this.rightOverflowY("auto"),this.bottomOverflowX("visible"),this.bottomOverflowY("visible")):(this.rightOverflowX("visible"),this.rightOverflowY("visible"),this.bottomOverflowX("auto"),this.bottomOverflowY("hidden")),this._prevLegendPosition=this.legendPosition()),this._prevdataVisible!==this.dataVisible()&&(this._prevdataVisible=this.dataVisible(),this._toggleData.selected(this._prevdataVisible),this._legend.visible(this._prevlegendVisible&&!this._prevdataVisible),this._carousel.active(this._prevdataVisible?1:0)),this._prevlegendVisible!==this.legendVisible()&&(this._prevlegendVisible=this.legendVisible(),this._toggleLegend.selected(this._prevlegendVisible),this._legend.visible(this._prevlegendVisible&&!this._prevdataVisible)),this._legend.orientation("bottom"===this.legendPosition()?"horizontal":"vertical"),this.showLeft(!this.left()),this.getResponsiveMode()){case"tiny":this.preUpdateTiny(e);break;case"small":this.preUpdateSmall(e);break;case"regular":this.preUpdateRegular(e)}const i="composite_MultiChart"===this._widget.classID()?this._widget.chart():this._widget;if(this._legend.dataFamily(i._dataFamily||"any"),this._prevChartDataFamily!==this._legend.dataFamily()&&(this._prevChartDataFamily=this._legend.dataFamily(),"any"===this._prevChartDataFamily))this._toggleLegend.selected(!1),this._legend.visible(!1);if(e.style("box-shadow",this.highlight()?`inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}`:"none"),-1!==this._hideLegendToggleList.indexOf(i.classID())?(this._spacer.visible(!1),this._toggleLegend.visible(!1)):(this._spacer.visible(!0),this._toggleLegend.visible(!0)),this._prevChart!==i){this._prevChart=i;const t=i?i._titleBar||i._iconBar:void 0;if(t&&t instanceof z){this._prevButtons=this._prevButtons||[...this.buttons()];const e=[...t.buttons(),new P,...this._prevButtons];t.buttons([]).render(),this.buttons(e)}else this._prevButtons&&this.buttons(this._prevButtons)}const s=[];this.dataButtonVisible()||s.push(this._toggleData),this.downloadButtonVisible()||s.push(this._buttonDownload),this.downloadImageButtonVisible()||s.push(this._buttonDownloadImage),this.legendButtonVisible()||s.push(this._toggleLegend),this._buttonDownloadImage.enabled(this.widget()instanceof y),this._titleBar.hiddenButtons(s).visible(this.titleVisible()),this.topOverlay(this.titleOverlay()||!this.titleVisible())}postUpdate(t,e){switch(super.postUpdate(t,e),this.getResponsiveMode()){case"tiny":this.postUpdateTiny(e);break;case"small":this.postUpdateSmall(e);break;case"regular":this.postUpdateRegular(e)}}postUpdateTiny(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display","none"),t.selectAll("div.data-count").style("visibility","visible").style("font-size",this.titleIconFontSize()/3+"px").style("line-height",this.titleIconFontSize()/3+"px").style("left",this.titleIconFontSize()+"px").text(this.data().length),t.style("transform","translate(0px,0px) scale(1)");const e=t.selectAll("div.title-icon"),i=e.node(),s=t.node().parentElement.getBoundingClientRect();if(i){const i=e.node().getBoundingClientRect(),o=s.height/2;e.style("position","absolute").style("left",`calc(50% - ${i.width/2}px)`).style("top",o-i.height/2+"px"),t.selectAll("div.data-count").style("position","absolute").style("left",`calc(50% + ${i.width/2}px)`).style("top",o-i.height/2+"px")}}postUpdateSmall(t){t.selectAll("lhs").style("display","none"),t.selectAll("div.title-icon").style("position","static"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden");const e=t.node().getBoundingClientRect(),i=t.node().parentElement.getBoundingClientRect();t.style("transform",`translate(${i.x-e.x}px, ${i.y-e.y}px) scale(${this._scale})`)}postUpdateRegular(t){t.selectAll("div.title-icon").style("position","static"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden")}exit(t,e){this._progressBar.exit(t,e),this.right(null),this._legend.target(null),this.center(null),this._carousel.target(null),this.top(null),this._titleBar.target(null),this._modal.target(null),delete this._prevChart,delete this._prevButtons,delete this._prevChartDataFamily,delete this._prevPos,delete this._prevdataVisible,delete this._prevlegendVisible,super.exit(t,e)}click(t,e,i){}dblclick(t,e,i){}vertex_click(t,e,i,s){s&&s.vertex}vertex_dblclick(t,e,i,s){s&&s.vertex}edge_click(t,e,i,s){s&&s.edge}edge_dblclick(t,e,i,s){s&&s.edge}};e(Gt,"ChartPanel");let Et=Gt;Et.prototype._class+=" layout_ChartPanel",Et.prototype.publishReset(),Et.prototype.publishProxy("title","_titleBar"),Et.prototype.publish("titleVisible",!0,"boolean"),Et.prototype.publish("titleOverlay",!1,"boolean"),Et.prototype.publishProxy("titleIcon","_titleBar"),Et.prototype.publishProxy("titleIconFont","_titleBar"),Et.prototype.publishProxy("titleFont","_titleBar"),Et.prototype.publishProxy("titleIconFontSize","_titleBar"),Et.prototype.publishProxy("titleFontSize","_titleBar"),Et.prototype.publishProxy("description","_titleBar"),Et.prototype.publishProxy("descriptionFont","_titleBar"),Et.prototype.publishProxy("descriptionFontSize","_titleBar"),Et.prototype.publish("dataVisible",!1,"boolean","Show data table"),Et.prototype.publish("dataButtonVisible",!0,"boolean","Show data table button"),Et.prototype.publish("downloadButtonVisible",!0,"boolean","Show data download button"),Et.prototype.publish("downloadImageButtonVisible",!1,"boolean","Show image download button"),Et.prototype.publish("downloadTitle","","string","File name when downloaded"),Et.prototype.publish("downloadTimestampSuffix",!0,"boolean","Use timestamp as file name suffix"),Et.prototype.publish("legendVisible",!1,"boolean","Show legend"),Et.prototype.publish("legendButtonVisible",!0,"boolean","Show legend button"),Et.prototype.publish("legendPosition","right","set","Position of legend",["right","bottom"]),Et.prototype.publishProxy("legend_labelMaxWidth","_legend","labelMaxWidth"),Et.prototype.publishProxy("legend_showSeriesTotal","_legend","showSeriesTotal"),Et.prototype.publishProxy("legend_showLegendTotal","_legend","showLegendTotal"),Et.prototype.publishProxy("legend_itemPadding","_legend","itemPadding"),Et.prototype.publishProxy("legend_shapeRadius","_legend","shapeRadius"),Et.prototype.publishProxy("legend_symbolType","_legend","symbolType"),Et.prototype.publishProxy("legend_labelAlign","_legend","labelAlign"),Et.prototype.publish("widget",null,"widget","Widget",void 0,{render:!1}),Et.prototype.publish("enableAutoscaling",!1,"boolean"),Et.prototype.publish("highlightSize",4,"number"),Et.prototype.publish("highlightColor","#e67e22","html-color"),Et.prototype.publishProxy("progress_halfLife","_progressBar","halfLife"),Et.prototype.publishProxy("progress_decay","_progressBar","decay"),Et.prototype.publishProxy("progress_size","_progressBar","size"),Et.prototype.publishProxy("progress_color","_progressBar","color"),Et.prototype.publishProxy("progress_blurBar","_progressBar","blurBar"),Et.prototype.publishProxy("progress_blurSize","_progressBar","blurSize"),Et.prototype.publishProxy("progress_blurColor","_progressBar","blurColor"),Et.prototype.publishProxy("progress_blurOpacity","_progressBar","blurOpacity"),Et.prototype.widget=function(t){if(!arguments.length)return this._widget;this._carousel.widgets([t,this._table]),this._widget=t,this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());const e=this,i=this._widget;return i.click=function(){e.click.apply(e,arguments)},i.dblclick=function(){e.dblclick.apply(e,arguments)},i.vertex_click=function(){e.vertex_click.apply(e,arguments)},i.vertex_dblclick=function(){e.vertex_dblclick.apply(e,arguments)},i.edge_click=function(){e.edge_click.apply(e,arguments)},i.edge_dblclick=function(){e.edge_dblclick.apply(e,arguments)},this};const Xt=class _FlexGrid extends i{constructor(){super()}enter(t,e){super.enter(t,e),o(t.parentNode).style("height","100%").style("width","100%")}update(t,e){super.update(t,e);const i=this,s=[];this.updateFlexParent(e);const o=e.selectAll(".FlexGrid-list-item").data(this.widgets(),t=>t.id());o.enter().append("div").classed("FlexGrid-list-item",!0).each(function(t){t.target(this)}).merge(o).style("min-height",this.itemMinHeight()+"px").style("min-width",this.itemMinWidth()+"px").style("flex-basis",(t,e)=>{const i=this.widgetsFlexBasis()[e];return void 0!==i?i:this.flexBasis()}).style("flex-grow",(t,e)=>{const i=this.widgetsFlexGrow()[e];return void 0!==i?i:this.flexGrow()}).style("border-width",this.borderWidth()+"px").style("border-color",this.itemBorderColor()).each(function(){this.firstChild.style.display="none"}).each(function(){const t=this.getBoundingClientRect();s.push([t.width,t.height])}).each(function(t,e){this.firstChild.style.display="block",t.resize({width:s[e][0]-2*i.borderWidth(),height:s[e][1]-2*i.borderWidth()})}),o.exit().remove()}exit(t,e){super.exit(t,e)}updateFlexParent(t){t.style("height","100%").style("flex-direction","horizontal"===this.orientation()?"row":"column").style("flex-wrap",this.flexWrap()).style("align-items",this.alignItems()).style("align-content",this.alignContent()).style("overflow-x",()=>this.forceXScroll()||"horizontal"===this.orientation()&&"nowrap"===this.flexWrap()&&!this.disableScroll()?"scroll":"hidden").style("overflow-y",()=>this.forceYScroll()||"vertical"===this.orientation()&&"nowrap"===this.flexWrap()&&!this.disableScroll()?"scroll":"hidden")}};e(Xt,"FlexGrid");let Yt=Xt;function Vt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Yt.prototype._class+=" layout_FlexGrid",Yt.prototype.publish("itemBorderColor","transparent","html-color","Color of list item borders"),Yt.prototype.publish("borderWidth",0,"number","Width of list item borders (pixels)"),Yt.prototype.publish("orientation","horizontal","set","Controls the flex-direction of the list items",["horizontal","vertical"]),Yt.prototype.publish("flexWrap","wrap","set","Controls the line wrap when overflow occurs",["nowrap","wrap","wrap-reverse"]),Yt.prototype.publish("disableScroll",!1,"boolean","If false, scrollbar will show (when flexWrap is set to 'nowrap')",null,{disable:/* @__PURE__ */e(t=>"nowrap"!==t.flexWrap(),"disable")}),Yt.prototype.publish("forceXScroll",!1,"boolean","If true, horzontal scrollbar will show"),Yt.prototype.publish("forceYScroll",!1,"boolean","If true, vertical scrollbar will show"),Yt.prototype.publish("itemMinHeight",64,"number","Minimum height of a list item (pixels)"),Yt.prototype.publish("itemMinWidth",64,"number","Minimum width of a list item (pixels)"),Yt.prototype.publish("alignItems","stretch","set","Controls normal alignment of items",["flex-start","center","flex-end","stretch"]),Yt.prototype.publish("alignContent","stretch","set","Controls normal alignment of item rows",["flex-start","center","flex-end","stretch","space-between","space-around"]),Yt.prototype.publish("flexGrow",1,"number","Default flex-grow style for all list items"),Yt.prototype.publish("flexBasis","10%","string","Default flex-basis style for all list items"),Yt.prototype.publish("widgetsFlexGrow",[],"array","Array of flex-grow values keyed on the widgets array"),Yt.prototype.publish("widgetsFlexBasis",[],"array","Array of flex-basis values keyed on the widgets array"),Yt.prototype.publish("widgets",[],"widgetArray","Array of widgets to be rendered as list items"),e(Vt,"getDefaultExportFromCjs");var Nt,$t={exports:{}};function Ut(){return Nt?$t.exports:(Nt=1,$t.exports=function(){var t=/* @__PURE__ */e(function(t,e){for(var i in this._options=e,this.defaults)this._options.hasOwnProperty(i)||(this._options[i]=this.defaults[i]);this.items=t,this._adjustSizeOfItems(),this.generateGrid()},"GridList");t.cloneItems=function(t,e){var i,s;for(void 0===e&&(e=[]),i=0;i<t.length;i++)for(s in e[i]||(e[i]={}),t[i])e[i][s]=t[i][s];return e},t.prototype={defaults:{lanes:5,direction:"horizontal"},toString:/* @__PURE__ */e(function(){var t,e,i,s=this.grid.length,o="\n #|",l="\n --";for(e=0;e<s;e++)o+=" "+this._padNumber(e," "),l+="---";for(o+=l,e=0;e<this._options.lanes;e++)for(o+="\n"+this._padNumber(e," ")+"|",i=0;i<s;i++)o+=" ",o+=(t=this.grid[i][e])?this._padNumber(this.items.indexOf(t),"0"):"--";return o+="\n"},"toString"),generateGrid:/* @__PURE__ */e(function(){var t;for(this._resetGrid(),t=0;t<this.items.length;t++)this._markItemPositionToGrid(this.items[t])},"generateGrid"),resizeGrid:/* @__PURE__ */e(function(t){var e=0;this._options.lanes=t,this._adjustSizeOfItems(),this._sortItemsByPosition(),this._resetGrid();for(var i=0;i<this.items.length;i++){var s=this.items[i],o=this._getItemPosition(s);this._updateItemPosition(s,this.findPositionForItem(s,{x:e,y:0})),e=Math.max(e,o.x)}this._pullItemsToLeft()},"resizeGrid"),findPositionForItem:/* @__PURE__ */e(function(t,e,i){var s,o,l;for(s=e.x;s<this.grid.length;s++)if(void 0!==i){if(l=[s,i],this._itemFitsAtPosition(t,l))return l}else for(o=e.y;o<this._options.lanes;o++)if(l=[s,o],this._itemFitsAtPosition(t,l))return l;var n=this.grid.length,r=0;return void 0!==i&&this._itemFitsAtPosition(t,[n,i])&&(r=i),[n,r]},"findPositionForItem"),moveItemToPosition:/* @__PURE__ */e(function(t,e){var i=this._getItemPosition({x:e[0],y:e[1],w:t.w,h:t.h});this._updateItemPosition(t,[i.x,i.y]),this._resolveCollisions(t)},"moveItemToPosition"),resizeItem:/* @__PURE__ */e(function(t,e){var i=e.w||t.w,s=e.h||t.h;this._updateItemSize(t,i,s),this._resolveCollisions(t),this._pullItemsToLeft()},"resizeItem"),getChangedItems:/* @__PURE__ */e(function(t,e){for(var i=[],s=0;s<t.length;s++){var o=this._getItemByAttribute(e,t[s][e]);o.x===t[s].x&&o.y===t[s].y&&o.w===t[s].w&&o.h===t[s].h||i.push(o)}return i},"getChangedItems"),_sortItemsByPosition:/* @__PURE__ */e(function(){this.items.sort(function(t,e){var i=this._getItemPosition(t),s=this._getItemPosition(e);return i.x!=s.x?i.x-s.x:i.y!=s.y?i.y-s.y:0}.bind(this))},"_sortItemsByPosition"),_adjustSizeOfItems:/* @__PURE__ */e(function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];void 0===e.autoSize&&(e.autoSize=0===e.w||0===e.h),e.autoSize&&("horizontal"===this._options.direction?e.h=this._options.lanes:e.w=this._options.lanes)}},"_adjustSizeOfItems"),_resetGrid:/* @__PURE__ */e(function(){this.grid=[]},"_resetGrid"),_itemFitsAtPosition:/* @__PURE__ */e(function(t,e){var i,s,o=this._getItemPosition(t);if(e[0]<0||e[1]<0)return!1;if(e[1]+o.h>this._options.lanes)return!1;for(i=e[0];i<e[0]+o.w;i++){var l=this.grid[i];if(l)for(s=e[1];s<e[1]+o.h;s++)if(l[s]&&l[s]!==t)return!1}return!0},"_itemFitsAtPosition"),_updateItemPosition:/* @__PURE__ */e(function(t,e){null!==t.x&&null!==t.y&&this._deleteItemPositionFromGrid(t),this._setItemPosition(t,e),this._markItemPositionToGrid(t)},"_updateItemPosition"),_updateItemSize:/* @__PURE__ */e(function(t,e,i){null!==t.x&&null!==t.y&&this._deleteItemPositionFromGrid(t),t.w=e,t.h=i,this._markItemPositionToGrid(t)},"_updateItemSize"),_markItemPositionToGrid:/* @__PURE__ */e(function(t){var e,i,s=this._getItemPosition(t);for(this._ensureColumns(s.x+s.w),e=s.x;e<s.x+s.w;e++)for(i=s.y;i<s.y+s.h;i++)this.grid[e][i]=t},"_markItemPositionToGrid"),_deleteItemPositionFromGrid:/* @__PURE__ */e(function(t){var e,i,s=this._getItemPosition(t);for(e=s.x;e<s.x+s.w;e++)if(this.grid[e])for(i=s.y;i<s.y+s.h;i++)this.grid[e][i]==t&&(this.grid[e][i]=null)},"_deleteItemPositionFromGrid"),_ensureColumns:/* @__PURE__ */e(function(t){var e;for(e=0;e<t;e++)this.grid[e]||this.grid.push(new i(this._options.lanes))},"_ensureColumns"),_getItemsCollidingWithItem:/* @__PURE__ */e(function(t){for(var e=[],i=0;i<this.items.length;i++)t!=this.items[i]&&this._itemsAreColliding(t,this.items[i])&&e.push(i);return e},"_getItemsCollidingWithItem"),_itemsAreColliding:/* @__PURE__ */e(function(t,e){var i=this._getItemPosition(t),s=this._getItemPosition(e);return!(s.x>=i.x+i.w||s.x+s.w<=i.x||s.y>=i.y+i.h||s.y+s.h<=i.y)},"_itemsAreColliding"),_resolveCollisions:/* @__PURE__ */e(function(t){this._tryToResolveCollisionsLocally(t)||this._pullItemsToLeft(t),this._pullItemsToLeft()},"_resolveCollisions"),_tryToResolveCollisionsLocally:/* @__PURE__ */e(function(e){var i=this._getItemsCollidingWithItem(e);if(!i.length)return!0;var s,o,l,n,r=new t([],this._options);t.cloneItems(this.items,r.items),r.generateGrid();for(var h=0;h<i.length;h++){var a=r.items[i[h]],d=this._getItemPosition(a),p=this._getItemPosition(e);if(s=[p.x-d.w,d.y],o=[p.x+p.w,d.y],l=[d.x,p.y-d.h],n=[d.x,p.y+p.h],r._itemFitsAtPosition(a,s))r._updateItemPosition(a,s);else if(r._itemFitsAtPosition(a,l))r._updateItemPosition(a,l);else if(r._itemFitsAtPosition(a,n))r._updateItemPosition(a,n);else{if(!r._itemFitsAtPosition(a,o))return!1;r._updateItemPosition(a,o)}}return t.cloneItems(r.items,this.items),this.generateGrid(),!0},"_tryToResolveCollisionsLocally"),_pullItemsToLeft:/* @__PURE__ */e(function(t){if(this._sortItemsByPosition(),this._resetGrid(),t){var e=this._getItemPosition(t);this._updateItemPosition(t,[e.x,e.y])}for(var i=0;i<this.items.length;i++){var s=this.items[i],o=this._getItemPosition(s);if(!t||s!=t){var l=this._findLeftMostPositionForItem(s),n=this.findPositionForItem(s,{x:l,y:0},o.y);this._updateItemPosition(s,n)}}},"_pullItemsToLeft"),_findLeftMostPositionForItem:/* @__PURE__ */e(function(t){for(var e=0,i=this._getItemPosition(t),s=0;s<this.grid.length;s++)for(var o=i.y;o<i.y+i.h;o++){var l=this.grid[s][o];if(l){var n=this._getItemPosition(l);this.items.indexOf(l)<this.items.indexOf(t)&&(e=n.x+n.w)}}return e},"_findLeftMostPositionForItem"),_getItemByAttribute:/* @__PURE__ */e(function(t,e){for(var i=0;i<this.items.length;i++)if(this.items[i][t]===e)return this.items[i];return null},"_getItemByAttribute"),_padNumber:/* @__PURE__ */e(function(t,e){return t>=10?t:e+t},"_padNumber"),_getItemPosition:/* @__PURE__ */e(function(t){return"horizontal"===this._options.direction?t:{x:t.y,y:t.x,w:t.h,h:t.w}},"_getItemPosition"),_setItemPosition:/* @__PURE__ */e(function(t,e){"horizontal"===this._options.direction?(t.x=e[0],t.y=e[1]):(t.x=e[1],t.y=e[0])},"_setItemPosition")};var i=/* @__PURE__ */e(function(t){for(var e=0;e<t;e++)this.push(null)},"GridCol");return i.prototype=[],t}())}e(Ut,"requireGridList");var jt=Ut();const qt=/* @__PURE__ */Vt(jt),Jt=/* @__PURE__ */I({__proto__:null,default:qt},[jt]),Zt=Jt&&qt||Jt,Kt=class _Grid extends i{divItems;gridList;items;itemsMap;origItems;cellWidth;cellHeight;dragItem;dragItemPos;_d3Drag;_d3DragResize;_selectionBag;_scrollBarWidth;constructor(){super(),this._tag="div",this._selectionBag=new n.Selection(this),this.content([])}getDimensions(){const t={width:0,height:0};return this.content().forEach(function(e){t.width<e.gridCol()+e.gridColSpan()&&(t.width=e.gridCol()+e.gridColSpan()),t.height<e.gridRow()+e.gridRowSpan()&&(t.height=e.gridRow()+e.gridRowSpan())},this),t}clearContent(t){this.content(this.content().filter(function(e){if(!t)return e.target(null),!1;let i=e;for(;i;){if(t===i)return e.target(null),!1;i=i.widget?i.widget():null}return!0}))}setContent(t,e,i,s,o,l){if(o=o||1,l=l||1,s=s||"",this.content(this.content().filter(function(i){return i.gridRow()!==t||i.gridCol()!==e||(i.target(null),!1)})),i){const n=(new E).gridRow(t).gridCol(e).widget(i).title(s).gridRowSpan(o).gridColSpan(l);this.content().push(n)}return this}sortedContent(){return this.content().sort(function(t,e){return t.gridRow()===e.gridRow()?t.gridCol()-e.gridCol():t.gridRow()-e.gridRow()})}getCell(t,e){let i=null;return this.content().some(function(s){return t>=s.gridRow()&&t<s.gridRow()+s.gridRowSpan()&&e>=s.gridCol()&&e<s.gridCol()+s.gridColSpan()&&(i=s,!0)}),i}getWidgetCell(t){let e=null;return this.content().some(function(i){return i.widget().id()===t&&(e=i,!0)}),e}getContent(t){let e=null;return this.content().some(function(i){return i.widget().id()===t&&(e=i.widget(),!0)}),e}cellToGridItem(t){return{x:t.gridCol(),y:t.gridRow(),w:t.gridColSpan(),h:t.gridRowSpan(),id:t.id(),cell:t}}gridItemToCell(t){t.cell.gridCol(t.x).gridRow(t.y).gridColSpan(t.w).gridRowSpan(t.h)}resetItemsPos(){this.origItems.forEach(function(t){const e=this.itemsMap[t.id];e.x=t.x,e.y=t.y},this)}initGridList(){this.itemsMap={},this.items=this.content().map(function(t){const e=this.cellToGridItem(t);return this.itemsMap[e.id]=e,e},this),this.origItems=this.content().map(this.cellToGridItem),this.gridList=new Zt(this.items,{direction:this.snapping(),lanes:"horizontal"===this.snapping()?this.snappingRows():this.snappingColumns()})}killGridList(){this.gridList=null,delete this.items,delete this.itemsMap}enter(t,e){super.enter(t,e),this._scrollBarWidth=h.getScrollbarWidth();const i=this;this._d3Drag=a().subject(function(t){const e=i.cellToGridItem(t);return{x:e.x*i.cellWidth,y:e.y*i.cellHeight}}).on("start",function(t){if(!i.designMode())return;r().sourceEvent.stopPropagation(),i.initGridList();const s=i.itemsMap[t.id()];i.dragItem=e.append("div").attr("class","dragging").style("transform",function(){return"translate("+s.x*i.cellWidth+"px, "+s.y*i.cellHeight+"px)"}).style("width",function(){return s.w*i.cellWidth-i.gutter()+"px"}).style("height",function(){return s.h*i.cellHeight-i.gutter()+"px"}),i.selectionBagClick(t)}).on("drag",function(t){if(!i.designMode())return;const e=r();e.sourceEvent.stopPropagation();const s=i.itemsMap[t.id()];e.x<0&&(e.x=0),e.x+s.w*i.cellWidth>i.snappingColumns()*i.cellWidth&&(e.x=i.snappingColumns()*i.cellWidth-s.w*i.cellWidth),e.y<0&&(e.y=0),e.y+s.h*i.cellWidth>i.snappingRows()*i.cellWidth&&(e.y=i.snappingRows()*i.cellWidth-s.h*i.cellWidth);const o=[Math.max(0,Math.floor((e.x+i.cellWidth/2)/i.cellWidth)),Math.max(0,Math.floor((e.y+i.cellHeight/2)/i.cellHeight))];s.x===o[0]&&s.y===o[1]||("none"!==i.snapping()?(i.resetItemsPos(),i.gridList.moveItemToPosition(s,o)):(s.x=o[0],s.y=o[1]),t.gridCol()===s.x&&t.gridRow()===s.y||(i.items.forEach(i.gridItemToCell),i.updateGrid(!1,100))),i.dragItem.style("transform",function(){return"translate("+e.x+"px, "+e.y+"px)"}).style("width",function(){return s.w*i.cellWidth+"px"}).style("height",function(){return s.h*i.cellHeight+"px"})}).on("end",function(){i.designMode()&&(r().sourceEvent.stopPropagation(),i.dragItem.remove(),i.dragItem=null,i.killGridList())}),this._d3DragResize=a().subject(function(t){const e=i.cellToGridItem(t);return{x:(e.x+e.w-1)*i.cellWidth,y:(e.y+e.h-1)*i.cellHeight}}).on("start",function(t){if(!i.designMode())return;r().sourceEvent.stopPropagation(),i.initGridList();const s=i.itemsMap[t.id()];i.dragItem=e.append("div").attr("class","resizing").style("transform",function(){return"translate("+s.x*i.cellWidth+"px, "+s.y*i.cellHeight+"px)"}).style("width",function(){return s.w*i.cellWidth-i.gutter()+"px"}).style("height",function(){return s.h*i.cellHeight-i.gutter()+"px"}),i.dragItemPos={x:s.x,y:s.y}}).on("drag",function(t){if(!i.designMode())return;const e=r();e.sourceEvent.stopPropagation();const s=i.itemsMap[t.id()],o=[Math.max(0,Math.round(e.x/i.cellWidth)),Math.max(0,Math.round(e.y/i.cellHeight))],l={w:Math.max(1,o[0]-s.x+1),h:Math.max(1,o[1]-s.y+1)};s.w===l.w&&s.h===l.h||("none"!==i.snapping()?(i.resetItemsPos(),i.gridList.resizeItem(s,l)):(s.w=l.w,s.h=l.h),t.gridColSpan()===s.w&&t.gridRowSpan()===s.h||(i.items.forEach(i.gridItemToCell),i.updateGrid(s.id,100))),i.dragItem.style("width",function(){return(1-s.x)*i.cellWidth+e.x-i.gutter()+"px"}).style("height",function(){return(1-s.y)*i.cellHeight+e.y-i.gutter()+"px"})}).on("end",function(){i.designMode()&&(r().sourceEvent.stopPropagation(),i.dragItem.remove(),i.dragItem=null,i.killGridList())})}updateGrid(t,e=0,i=!1){e=e||0;const s=this;this.divItems.classed("draggable",this.designMode()).transition().duration(e).style("left",function(t){return t.gridCol()*s.cellWidth+s.gutter()/2+"px"}).style("top",function(t){return t.gridRow()*s.cellHeight+s.gutter()/2+"px"}).style("width",function(t){return t.gridColSpan()*s.cellWidth-s.gutter()+"px"}).style("height",function(t){return t.gridRowSpan()*s.cellHeight-s.gutter()+"px"}).on("end",function(e){e.surfaceShadow_default(s.surfaceShadow()).surfacePadding_default(s.surfacePadding()).surfaceBorderWidth_default(s.surfaceBorderWidth()).surfaceBackgroundColor_default(s.surfaceBackgroundColor()),!0!==t&&t!==e.id()||e.resize().lazyRender()})}update(t,e){super.update(t,e),this._placeholderElement.style("overflow-x","width"===this.fitTo()?"hidden":null),this._placeholderElement.style("overflow-y","width"===this.fitTo()?"scroll":null);const i=this.getDimensions(),s=this.width()-("width"===this.fitTo()?this._scrollBarWidth:0);if(this.cellWidth=s/i.width,this.cellHeight="all"===this.fitTo()?this.height()/i.height:this.cellWidth,this.designMode()){const t=Math.min(this.width()/this.snappingColumns(),this.height()/this.snappingRows()),e=Math.floor(t);this.cellWidth=e,this.cellHeight=this.cellWidth}const l=this,n=e.selectAll("#"+this.id()+" > .ddCell").data(this.content(),function(t){return t.id()});this.divItems=n.enter().append("div").attr("class","ddCell").each(function(t){t.target(this),t.__grid_watch=t.monitor(function(e,i,s){!l._renderCount||"snapping"!==e&&0!==e.indexOf("grid")||i===s||l.gridList||(l.initGridList(),"none"!==l.snapping()&&l.gridList.resizeGrid("horizontal"===l.snapping()?l.snappingRows():l.snappingColumns()),l.items.forEach(l.gridItemToCell),l.updateGrid(t.id(),100),l.killGridList())});o(this).append("div").attr("class","resizeHandle").call(l._d3DragResize).append("div").attr("class","resizeHandleDisplay")}).merge(n),this.divItems.each(function(t){const e=o(this);l.designMode()?e.call(l._d3Drag):e.on("mousedown.drag",null).on("touchstart.drag",null)}),this.divItems.select(".resizeHandle").style("display",this.designMode()?null:"none"),this.updateGrid(!0),n.exit().each(function(t){t.target(null),t.__grid_watch&&t.__grid_watch.remove()}).remove();const r=e.selectAll("#"+this.id()+" > .laneBackground").data(this.designMode()?[""]:[]);r.enter().insert("div",":first-child").attr("class","laneBackground").style("left","1px").style("top","1px").on("click",function(){l.selectionBagClear()}).merge(r).style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px"),r.exit().each(function(){l.selectionBagClear()}).remove();const h=e.selectAll("#"+this.id()+" > .lane").data(this.designMode()?[""]:[]);h.enter().append("div").attr("class","lane").style("left","1px").style("top","1px"),h.style("display",this.showLanes()?null:"none").style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px").style("background-image","linear-gradient(to right, grey 1px, transparent 1px), linear-gradient(to bottom, grey 1px, transparent 1px)").style("background-size",this.cellWidth+"px "+this.cellHeight+"px"),h.exit().remove()}exit(t,e){this.content().forEach(t=>t.target(null)),super.exit(t,e)}_createSelectionObject(t){return{_id:t._id,element:/* @__PURE__ */e(()=>t._element,"element"),widget:t}}selection(t){return arguments.length?(this._selectionBag.set(t.map(function(t){return this._createSelectionObject(t)},this)),this):this._selectionBag.get().map(function(t){return t._id})}selectionBagClear(){this._selectionBag.isEmpty()||(this._selectionBag.clear(),this.postSelectionChange())}selectionBagClick(t){if(null!==t){const e=this._createSelectionObject(t);if(r().sourceEvent.ctrlKey)this._selectionBag.isSelected(e)?(this._selectionBag.remove(e),this.postSelectionChange()):(this._selectionBag.append(e),this.postSelectionChange());else{const t=this._selectionBag.get();1===t.length&&t[0]._id===e._id?this.selectionBagClear():this._selectionBag.set([e]),this.postSelectionChange()}}}postSelectionChange(){}applyLayout(t){this.divItems.each((e,i)=>{if(t[i]){const[s,o,l,n]=t[i];e.gridCol(s).gridRow(o).gridColSpan(l).gridRowSpan(n)}}),this.updateGrid(!0)}vizActivation(t){}};e(Kt,"Grid");let Qt=Kt;Qt.prototype._class+=" layout_Grid",Qt.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),Qt.prototype.publish("showLanes",!0,"boolean","Show snapping lanes when in design mode",null,{tags:["Basic"],disable:/* @__PURE__ */e(t=>!t.designMode(),"disable")}),Qt.prototype.publish("fitTo","all","set","Sizing Strategy",["all","width"],{tags:["Basic"]}),Qt.prototype.publish("snapping","vertical","set","Snapping Strategy",["vertical","horizontal","none"]),Qt.prototype.publish("snappingColumns",12,"number","Snapping Columns"),Qt.prototype.publish("snappingRows",16,"number","Snapping Rows"),Qt.prototype.publish("gutter",6,"number","Gap Between Widgets",null,{tags:["Basic"]}),Qt.prototype.publish("surfaceShadow",!0,"boolean","3D Shadow"),Qt.prototype.publish("surfacePadding",null,"string","Cell Padding (px)",null,{tags:["Intermediate"]}),Qt.prototype.publish("surfaceBorderWidth",1,"number","Width (px) of Cell Border",null,{tags:["Intermediate"]}),Qt.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),Qt.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Basic"],render:!1});const te=class _HorizontalList extends Yt{constructor(){super(),this.orientation_default("horizontal"),this.flexWrap_default("nowrap")}};e(te,"HorizontalList");let ee=te;ee.prototype._class+=" layout_HorizontalList";const ie=class _Layered extends i{_contentContainer;_widgetPlacements;_widgetRatios;constructor(){super(),this._tag="div",this._widgetPlacements=[],this._widgetRatios=[]}addLayer(t,e="default",i=1,s=1){const o=this.widgets();return o.push(t||(new S).text("No widget defined for layer.")),this.widgets(o),this._widgetPlacements.push(e),this._widgetRatios.push([i,s]),this}enter(t,e){super.enter(t,e),this._contentContainer=e.append("div").attr("class","container")}update(t,e){super.update(t,e);const i=this;e.style("padding",this.surfacePadding()+"px");const s=this._contentContainer.selectAll(".content.id"+this.id()).data(this.widgets(),function(t){return t.id()});s.enter().append("div").attr("class","content id"+this.id()).each(function(t,e){t.target(this)}).merge(s).each(function(t,e){const s={width:i.clientWidth(),height:i.clientHeight()},o=i.widgetSize(e,s),l=i.widgetPosition(e,s,o);this.style.top=l.y+"px",this.style.left=l.x+"px",t.resize(o).render()}),s.exit().each(function(t,e){t.target(null)}).remove(),s.order()}widgetSize(t,e){return this._widgetPlacements[t],{width:e.width*this._widgetRatios[t][0],height:e.height*this._widgetRatios[t][1]}}widgetPosition(t,e,i){switch(this._widgetPlacements[t]){default:return{x:0,y:0};case"top":return{x:e.width/2-i.width/2,y:0};case"bottom":return{x:e.width/2-i.width/2,y:e.height-i.height};case"left":return{x:0,y:e.height/2-i.height/2};case"right":return{x:e.width-i.width,y:e.height/2-i.height/2};case"center":return{x:e.width/2-i.width/2,y:e.height/2-i.height/2}}}};e(ie,"Layered");let se=ie;se.prototype._class+=" layout_Layered",se.prototype.publish("surfacePadding",0,"number","Padding"),se.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});const oe=class _Popup extends i{_surfaceButtons;_originalPosition;constructor(){super(),this._tag="div",this._surfaceButtons=[]}updateState(t){t=t||!this.popupState(),this.popupState(t).render()}enter(t,e){super.enter(t,e),this.widget().target(t),this._originalPosition=this.position()}update(t,e){super.update(t,e),e.style("visibility",this.popupState()?null:"hidden").style("opacity",this.popupState()?null:0).style("width",this.shrinkWrap()?this.widget().width()+"px":this._size.width+"px").style("height",this.shrinkWrap()?this.widget().height()+"px":this._size.height+"px"),0===this.widget().size().height&&this.widget().resize(this.size())}postUpdate(t,e){let i,s;switch(this.centerPopup()){case"container":this._placeholderElement&&(i=parseInt(this._placeholderElement.style("width"))/2-this.widget().width()/2,s=parseInt(this._placeholderElement.style("height"))/2-this.widget().height()/2),this.position("absolute");break;case"window":i=window.innerWidth/2-this.widget().width()/2,s=window.innerHeight/2-this.widget().height()/2,this.position("fixed");break;default:i=0,s=0,this.position(this._originalPosition)}this.pos({x:i,y:s}),super.postUpdate(t,e),e.style("position",this.position()).style("left",this.left()+"px").style("right",this.right()+"px").style("top",this.top()+"px").style("bottom",this.bottom()+"px")}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}click(t){}};e(oe,"Popup");let le=oe;le.prototype._class+=" layout_Popup",le.prototype.publish("popupState",!1,"boolean","State of the popup, visible (true) or hidden (false)",null,{}),le.prototype.publish("shrinkWrap",!1,"boolean","The popup parent container either shrinks to the size of its contents (true) or expands to fit thge popup's parentDiv (false)",null,{}),le.prototype.publish("centerPopup","none","set","Center the widget in its container element (target) or in the window",["none","container","window"],{}),le.prototype.publish("top",null,"number","Top position property of popup",null,{}),le.prototype.publish("bottom",null,"number","Bottom position property of popup",null,{}),le.prototype.publish("left",null,"number","Left position property of popup",null,{}),le.prototype.publish("right",null,"number","Right position property of popup",null,{}),le.prototype.publish("position","relative","set","Value of the 'position' property",["absolute","relative","fixed","static","initial","inherit"],{tags:["Private"]}),le.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]});const ne=class _Tabbed extends i{_tabContainer;_contentContainer;constructor(){super(),this._tag="div"}clearTabs(){return this.labels([]),this.widgets([]),this}addTab(t,e,i,s){const o=t.size();0===o.width&&0===o.height&&t.size({width:"100%",height:"100%"});const l=this.labels(),n=this.widgets();i&&this.activeTabIdx(this.widgets().length),l.push(e);const r=(new R).widget(t||(new S).text("No widget defined for tab"));return n.push(r),this.labels(l),this.widgets(n),s&&s(r),this}widgetSize(t){const e=this.clientWidth();let i=this.clientHeight();const s=this._tabContainer.node().getBoundingClientRect();return void 0!==s.height&&(i-=s.height),{width:e,height:i}}enter(t,e){super.enter(t,e),this._tabContainer=e.append("div"),this._contentContainer=e.append("div")}update(t,e){super.update(t,e);const i=this;e.style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null);const s=this._tabContainer.selectAll(".tab-button.id"+this.id()).data(this.showTabs()?this.labels():[],function(t){return t});s.enter().append("span").attr("class","tab-button id"+this.id()).style("cursor","pointer").on("click",function(t,e){i.click(i.widgets()[e].widget(),t,e),i.activeTabIdx(e).render()}).merge(s).classed("active",function(t,e){return i.activeTabIdx()===e}).text(function(t){return t}),s.exit().remove();const l=this._contentContainer.selectAll(".tab-content.id"+this.id()).data(this.widgets(),function(t){return t.id()});if(l.enter().append("div").attr("class","tab-content id"+this.id()).each(function(t,e){t.target(this)}).merge(l).classed("active",function(t,e){return i.activeTabIdx()===e}).style("display",function(t,e){return i.activeTabIdx()===e?"block":"none"}).each(function(t,e){if(t.visible(i.activeTabIdx()===e),i.activeTabIdx()===e){const e=i.widgetSize(o(this));t.surfaceBorderWidth(i.showTabs()?null:0).surfacePadding(i.showTabs()?null:0).resize(e)}}),l.exit().each(function(t,e){t.target(null)}).remove(),"bottom"===this.tabLocation())this._tabContainer.attr("class","on_bottom").style("top",this._contentContainer.node().offsetHeight+this.surfacePadding()+"px").style("position","absolute"),this._contentContainer.style("top",this.surfacePadding_exists()?this.surfacePadding()+"px":null).style("position","absolute");else this._tabContainer.attr("class","on_top").style("top",null).style("position","relative"),this._contentContainer.style("top",this._tabContainer.node().offsetHeight+this.surfacePadding()+"px").style("position","absolute")}click(t,e,i){}};e(ne,"Tabbed");let re=ne;re.prototype._class+=" layout_Tabbed",re.prototype.publish("showTabs",!0,"boolean","Show Tabs",null,{}),re.prototype.publish("surfacePadding",4,"number","Padding"),re.prototype.publish("activeTabIdx",0,"number","Index of active tab",null,{}),re.prototype.publish("labels",[],"array","Array of tab labels sharing an index with ",null,{tags:["Private"]}),re.prototype.publish("tabLocation","top","set","Position the tabs at the bottom of the widget",["top","bottom"],{tags:["Private"]}),re.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});const he=class _Toolbar extends i{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);const i=this;e.attr("title",i.title()).style("background-color",this.backgroundColor());const s=e.selectAll("div.toolbar-title").data(this.title()?[this.title()]:[]);s.enter().append("div").classed("toolbar-title",!0).append("span"),s.selectAll("div.toolbar-title > span").style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("color",this.fontColor_exists()?this.fontColor():null).style("font-family",this.fontFamily_exists()?this.fontFamily():null).style("font-weight",this.fontBold_exists()?this.fontBold()?"bold":"normal":null).style("background-color",this.backgroundColor_exists()?this.backgroundColor():null).text(i.title()),s.exit().remove();const l=e.selectAll("div.toolbar-child").data(null!==this.widgets()?this.widgets():[],function(t){return t.id()});l.enter().insert("div","div.toolbar-title").each(function(t,e){const s=i.widgetClasses()[e]?i.widgetClasses()[e]+" toolbar-child":"toolbar-child";o(this).classed(s,!0),t.target(this)}),l.exit().each(function(t){t.target(null)}).remove(),l.order()}render(t){const e=this;return super.render(function(i){const s=e.element().node().getBoundingClientRect();let o=s.left+s.width;e.element().selectAll("div.toolbar-child").each(function(t,e){const i=this.getBoundingClientRect();o>i.left&&(o=i.left)}),e.element().select(".toolbar-title").style("width",o-s.left-4+"px"),t&&t(i)})}exit(t,e){this.widgets().forEach(function(t){t.target(null)}),super.exit(t,e)}};e(he,"Toolbar");let ae=he;ae.prototype._class+=" layout_Toolbar",ae.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),ae.prototype.publish("fontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),ae.prototype.publish("fontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),ae.prototype.publish("fontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),ae.prototype.publish("fontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),ae.prototype.publish("backgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),ae.prototype.publish("responsive",!0,"boolean","Adapts to pixel width",null,{tags:["Basic"]}),ae.prototype.publish("widgets",[],"widgetArray","Child widgets of the toolbar",null,{tags:["Basic"]}),ae.prototype.publish("widgetClasses",[],"array","Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)",null,{tags:["Basic"]});const de=class _VerticalList extends Yt{constructor(){super(),this.orientation_default("vertical"),this.flexWrap_default("nowrap")}};e(de,"VerticalList");let pe=de;pe.prototype._class+=" layout_VerticalList";export{F as AbsoluteSurface,L as Accordion,M as BUILD_VERSION,Y as Border,U as Border2,q as Carousel,E as Cell,Et as ChartPanel,Yt as FlexGrid,Qt as Grid,ee as HorizontalList,se as Layered,Lt as Legend,Rt as Modal,A as PKG_NAME,H as PKG_VERSION,le as Popup,R as Surface,re as Tabbed,ae as Toolbar,pe as VerticalList,N as WidgetDiv};
|
|
1
|
+
import { Button as e, Database as t, FAChar as n, HTMLWidget as r, IconBar as i, Palette as a, Platform as o, ProgressBar as s, SVGWidget as c, Spacer as l, Text as u, TitleBar as d, ToggleButton as f, Utility as p, d3Event as m, dispatch as h, drag as g, format as _, formatLocale as v, formatPrefix as y, formatSpecifier as b, scaleLinear as x, scaleOrdinal as S, select as C, selectAll as w, sum as ee } from "@hpcc-js/common";
|
|
2
|
+
import { Table as T } from "@hpcc-js/dgrid2";
|
|
3
|
+
import { instanceOfIHighlight as E } from "@hpcc-js/api";
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var D = Object.create, O = Object.defineProperty, __name = (e, t) => O(e, "name", {
|
|
6
|
+
value: t,
|
|
7
|
+
configurable: !0
|
|
8
|
+
}), k = Object.getOwnPropertyDescriptor, A = Object.getOwnPropertyNames, j = Object.getPrototypeOf, M = Object.prototype.hasOwnProperty, __commonJSMin = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), __copyProps = (e, t, n, r) => {
|
|
9
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = A(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !M.call(e, s) && s !== n && O(e, s, {
|
|
10
|
+
get: ((e) => t[e]).bind(null, s),
|
|
11
|
+
enumerable: !(r = k(t, s)) || r.enumerable
|
|
12
|
+
});
|
|
13
|
+
return e;
|
|
14
|
+
}, __toESM = (e, t, n) => (n = e == null ? {} : D(j(e)), __copyProps(t || !e || !e.__esModule ? O(n, "default", {
|
|
15
|
+
value: e,
|
|
16
|
+
enumerable: !0
|
|
17
|
+
}) : n, e)), N = "@hpcc-js/layout", te = "3.6.0", ne = "3.26.0", AbsoluteSurface = class extends r {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(), this._tag = "div";
|
|
20
|
+
}
|
|
21
|
+
enter(e, t) {
|
|
22
|
+
super.enter(e, t);
|
|
23
|
+
}
|
|
24
|
+
update(e, t) {
|
|
25
|
+
super.update(e, t);
|
|
26
|
+
let n = 0, r = 0, i = this.clientWidth(), a = this.clientHeight();
|
|
27
|
+
switch (this.units()) {
|
|
28
|
+
case "pixels":
|
|
29
|
+
n = this.widgetX(), r = this.widgetY(), i = this.widgetWidth() === "" ? i - n : Number(this.widgetWidth()), a = this.widgetHeight() === "" ? a - r : Number(this.widgetHeight());
|
|
30
|
+
break;
|
|
31
|
+
case "percent":
|
|
32
|
+
n = this.widgetX() * i / 100, r = this.widgetY() * a / 100, i = this.widgetWidth() === "" ? i - n : Number(this.widgetWidth()) * i / 100, a = this.widgetHeight() === "" ? a - r : Number(this.widgetHeight()) * a / 100;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
t.style("opacity", this.opacity());
|
|
36
|
+
let o = t.selectAll("#" + this._id + " > .placeholder").data(this.widget() ? [this.widget()] : [], function(e) {
|
|
37
|
+
return e._id;
|
|
38
|
+
});
|
|
39
|
+
o.enter().append("div").attr("class", "placeholder").each(function(e) {
|
|
40
|
+
e.target(this);
|
|
41
|
+
}).merge(o).style("left", n + "px").style("top", r + "px").style("width", i + "px").style("bottom", a + "px").each(function(e) {
|
|
42
|
+
e.resize({
|
|
43
|
+
width: i,
|
|
44
|
+
height: a
|
|
45
|
+
});
|
|
46
|
+
}), o.exit().each(function(e) {
|
|
47
|
+
e.target(null);
|
|
48
|
+
}).remove();
|
|
49
|
+
}
|
|
50
|
+
exit(e, t) {
|
|
51
|
+
this.widget() && this.widget().target(null), super.exit(e, t);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
AbsoluteSurface.prototype._class += " layout_AbsoluteSurface", AbsoluteSurface.prototype.publish("units", "percent", "set", "Units", ["pixels", "percent"]), AbsoluteSurface.prototype.publish("widgetX", 0, "number", "Widget XPos"), AbsoluteSurface.prototype.publish("widgetY", 0, "number", "Widget YPos"), AbsoluteSurface.prototype.publish("widgetWidth", "100", "string", "Widget Width, omit for full"), AbsoluteSurface.prototype.publish("widgetHeight", "100", "string", "Widget Height, omit for full"), AbsoluteSurface.prototype.publish("widget", null, "widget", "Widget", null, { tags: ["Private"] }), AbsoluteSurface.prototype.publish("opacity", 1, "number", "Opacity");
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/Accordion.ts
|
|
57
|
+
var Accordion = class extends r {
|
|
58
|
+
_isClosed;
|
|
59
|
+
titleSpan;
|
|
60
|
+
iconDiv;
|
|
61
|
+
ul;
|
|
62
|
+
icon;
|
|
63
|
+
constructor() {
|
|
64
|
+
super(), this._tag = "div", this._isClosed = !1;
|
|
65
|
+
}
|
|
66
|
+
pushListItem(e, t = !1, n = !1) {
|
|
67
|
+
let r = this.content();
|
|
68
|
+
return e._protected = n, t ? r.unshift(e) : r.push(e), this.content(r), this;
|
|
69
|
+
}
|
|
70
|
+
clearListItems() {
|
|
71
|
+
let e = [];
|
|
72
|
+
for (let t in this.content()) this.content()[t]._protected && e.push(this.content()[t]);
|
|
73
|
+
return this.content(e), this;
|
|
74
|
+
}
|
|
75
|
+
collapseClick(e) {
|
|
76
|
+
e.classed("closed") ? (this._isClosed = !1, e.classed("open", !0), e.classed("closed", !1)) : (this._isClosed = !0, e.classed("open", !1), e.classed("closed", !0));
|
|
77
|
+
}
|
|
78
|
+
enter(e, t) {
|
|
79
|
+
super.enter(e, t);
|
|
80
|
+
let r = this;
|
|
81
|
+
this._isClosed = this.defaultCollapsed(), t.classed(this._isClosed ? "closed" : "open", !0), this.titleSpan = t.append("span").classed("collapsible-title", !0), this.iconDiv = t.append("div").classed("collapsible-icon", !0), this.ul = t.append("ul"), this.icon = new n().size({
|
|
82
|
+
height: 24,
|
|
83
|
+
width: 24
|
|
84
|
+
}).target(this.iconDiv.node()), this.iconDiv.on("click", function() {
|
|
85
|
+
r.collapseClick(t), r.render();
|
|
86
|
+
}), this.titleSpan.on("click", function() {
|
|
87
|
+
r.collapseClick(t), r.render();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
update(e, t) {
|
|
91
|
+
super.update(e, t);
|
|
92
|
+
let n = this;
|
|
93
|
+
this.titleSpan.text(n.title().length > 0 ? n.title() + "" : "Accordion [" + n._id + "]");
|
|
94
|
+
let r = this.ul.selectAll("#" + n._id + " > ul > li").data(this.content(), function(e) {
|
|
95
|
+
return e._id;
|
|
96
|
+
});
|
|
97
|
+
r.enter().append(function(e) {
|
|
98
|
+
let t = document.createElement("li");
|
|
99
|
+
if (e._target === null) {
|
|
100
|
+
let r = e.size();
|
|
101
|
+
if (r.width === 0 || r.height === 0) {
|
|
102
|
+
let t = n.size();
|
|
103
|
+
e.size({
|
|
104
|
+
width: t.width,
|
|
105
|
+
height: t.width
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
e.target(t);
|
|
109
|
+
} else return e._target;
|
|
110
|
+
return t;
|
|
111
|
+
}), r.exit().remove(), this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed ? this.closedIcon() : this.openIcon()).render();
|
|
112
|
+
}
|
|
113
|
+
exit(e, t) {
|
|
114
|
+
super.exit(e, t);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
Accordion.prototype._class += " layout_Accordion", Accordion.prototype.publish("content", [], "widgetArray", "Array of widgets", null, { tags: ["Basic"] }), Accordion.prototype.publish("title", "", "string", "Title of collapsible section", null, { tags: ["Private"] }), Accordion.prototype.publish("openIcon", "", "string", "Icon to display when list is open", null, { tags: ["Private"] }), Accordion.prototype.publish("closedIcon", "", "string", "Icon to display when list is closed", null, { tags: ["Private"] }), Accordion.prototype.publish("titleFontColor", "#FFFFFF", "html-color", "Title font color", null, { tags: ["Private"] }), Accordion.prototype.publish("titleBackgroundColor", "#333333", "html-color", "Title background color", null, { tags: ["Private"] }), Accordion.prototype.publish("defaultCollapsed", !1, "boolean", "Collapsed by default if true", null, { tags: ["Private"] });
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/Surface.ts
|
|
120
|
+
var Surface = class extends r {
|
|
121
|
+
_surfaceButtons;
|
|
122
|
+
constructor() {
|
|
123
|
+
super(), this._tag = "div", this._surfaceButtons = [];
|
|
124
|
+
}
|
|
125
|
+
widgetSize(e, t) {
|
|
126
|
+
let n = this.clientWidth(), r = this.clientHeight();
|
|
127
|
+
return this.title() && (r -= this.calcHeight(e)), r -= this.calcFrameHeight(t), n -= this.calcFrameWidth(t), {
|
|
128
|
+
width: n,
|
|
129
|
+
height: r
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
enter(e, t) {
|
|
133
|
+
super.enter(e, t);
|
|
134
|
+
}
|
|
135
|
+
update(e, t) {
|
|
136
|
+
super.update(e, t);
|
|
137
|
+
let n = this;
|
|
138
|
+
t.classed("shadow2", this.surfaceShadow()).style("border-width", this.surfaceBorderWidth_exists() ? this.surfaceBorderWidth() + "px" : null).style("border-color", this.surfaceBorderColor()).style("border-radius", this.surfaceBorderRadius_exists() ? this.surfaceBorderRadius() + "px" : null).style("background-color", this.surfaceBackgroundColor());
|
|
139
|
+
let r = t.selectAll(".surfaceTitle").data(this.title() ? [this.title()] : []);
|
|
140
|
+
r.enter().insert("h3", "div").attr("class", "surfaceTitle").merge(r).text(function(e) {
|
|
141
|
+
return e;
|
|
142
|
+
}).style("text-align", this.surfaceTitleAlignment()).style("color", this.surfaceTitleFontColor()).style("font-size", this.surfaceTitleFontSize_exists() ? this.surfaceTitleFontSize() + "px" : null).style("font-family", this.surfaceTitleFontFamily()).style("font-weight", this.surfaceTitleFontBold() ? "bold" : "normal").style("background-color", this.surfaceTitleBackgroundColor()).style("padding", this.surfaceTitlePadding_exists() ? this.surfaceTitlePadding() + "px" : null).style("title", this.altText_exists() ? this.altText() : null), r.exit().remove();
|
|
143
|
+
let i = t.select(".surfaceTitle").append("div").attr("class", "html-button-container").selectAll(".surface-button").data(this.buttonAnnotations());
|
|
144
|
+
i.enter().append("button").classed("surface-button", !0).each(function(e, t) {
|
|
145
|
+
let r = n._surfaceButtons[t] = C(this).attr("class", "surface-button" + (e.class ? " " + e.class : "")).attr("id", e.id).style("padding", e.padding).style("width", e.width).style("height", e.height).style("cursor", "pointer");
|
|
146
|
+
e.font === "FontAwesome" ? r.style("background", "transparent").style("border", "none").on("click", function(e) {
|
|
147
|
+
n.click(e);
|
|
148
|
+
}).append("i").attr("class", "fa").text(function() {
|
|
149
|
+
return e.label;
|
|
150
|
+
}) : r.text(function() {
|
|
151
|
+
return e.label;
|
|
152
|
+
}).on("click", function(e) {
|
|
153
|
+
n.click(e);
|
|
154
|
+
});
|
|
155
|
+
}), i.exit().each(function(e, t) {
|
|
156
|
+
let r = C(this);
|
|
157
|
+
delete n._surfaceButtons[t], r.remove();
|
|
158
|
+
});
|
|
159
|
+
let a = t.selectAll("#" + this._id + " > .surfaceWidget").data(this.widget() ? [this.widget()] : [], function(e) {
|
|
160
|
+
return e._id;
|
|
161
|
+
});
|
|
162
|
+
a.enter().append("div").attr("class", "surfaceWidget").each(function(e) {
|
|
163
|
+
C(n.element().node().parentElement).classed("content-icon content-icon-" + e.classID().split("_")[1], !0), e.target(this);
|
|
164
|
+
}).merge(a).style("padding", this.surfacePadding_exists() ? this.surfacePadding() + "px" : null).each(function(e) {
|
|
165
|
+
let r = n.widgetSize(t.select("h3"), C(this));
|
|
166
|
+
r.width < 0 && (r.width = 0), r.height < 0 && (r.height = 0), e.resize({
|
|
167
|
+
width: r.width,
|
|
168
|
+
height: r.height
|
|
169
|
+
});
|
|
170
|
+
}), a.exit().each(function(e) {
|
|
171
|
+
e.target(null);
|
|
172
|
+
}).remove();
|
|
173
|
+
}
|
|
174
|
+
exit(e, t) {
|
|
175
|
+
this.widget() && this.widget().target(null), super.exit(e, t);
|
|
176
|
+
}
|
|
177
|
+
click(e) {}
|
|
178
|
+
};
|
|
179
|
+
Surface.prototype._class += " layout_Surface", Surface.prototype.publish("title", "", "string", "Title", null, { tags: ["Intermediate"] }), Surface.prototype.publish("altText", null, "string", "Alt text", null, { optional: !0 }), Surface.prototype.publish("surfaceTitlePadding", null, "number", "Title Padding (px)", null, {
|
|
180
|
+
tags: ["Advanced"],
|
|
181
|
+
disable: (e) => !e.title()
|
|
182
|
+
}), Surface.prototype.publish("surfaceTitleFontSize", null, "number", "Title Font Size (px)", null, {
|
|
183
|
+
tags: ["Advanced"],
|
|
184
|
+
disable: (e) => !e.title()
|
|
185
|
+
}), Surface.prototype.publish("surfaceTitleFontColor", null, "html-color", "Title Font Color", null, {
|
|
186
|
+
tags: ["Advanced"],
|
|
187
|
+
disable: (e) => !e.title()
|
|
188
|
+
}), Surface.prototype.publish("surfaceTitleFontFamily", null, "string", "Title Font Family", null, {
|
|
189
|
+
tags: ["Advanced"],
|
|
190
|
+
disable: (e) => !e.title()
|
|
191
|
+
}), Surface.prototype.publish("surfaceTitleFontBold", !0, "boolean", "Enable Bold Title Font", null, {
|
|
192
|
+
tags: ["Advanced"],
|
|
193
|
+
disable: (e) => !e.title()
|
|
194
|
+
}), Surface.prototype.publish("surfaceTitleBackgroundColor", null, "html-color", "Title Background Color", null, {
|
|
195
|
+
tags: ["Advanced"],
|
|
196
|
+
disable: (e) => !e.title()
|
|
197
|
+
}), Surface.prototype.publish("surfaceTitleAlignment", "center", "set", "Title Alignment", [
|
|
198
|
+
"left",
|
|
199
|
+
"right",
|
|
200
|
+
"center"
|
|
201
|
+
], {
|
|
202
|
+
tags: ["Basic"],
|
|
203
|
+
disable: (e) => !e.title()
|
|
204
|
+
}), Surface.prototype.publish("surfaceShadow", !1, "boolean", "3D Shadow"), Surface.prototype.publish("surfacePadding", null, "string", "Surface Padding (px)", null, { tags: ["Intermediate"] }), Surface.prototype.publish("surfaceBackgroundColor", null, "html-color", "Surface Background Color", null, { tags: ["Advanced"] }), Surface.prototype.publish("surfaceBorderWidth", null, "number", "Surface Border Width (px)", null, { tags: ["Advanced"] }), Surface.prototype.publish("surfaceBorderColor", null, "html-color", "Surface Border Color", null, { tags: ["Advanced"] }), Surface.prototype.publish("surfaceBorderRadius", null, "number", "Surface Border Radius (px)", null, { tags: ["Advanced"] }), Surface.prototype.publish("buttonAnnotations", [], "array", "Button Array", null, { tags: ["Private"] }), Surface.prototype.publish("widget", null, "widget", "Widget", null, { tags: ["Basic"] });
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/Cell.ts
|
|
207
|
+
var Cell = class extends Surface {
|
|
208
|
+
_indicateTheseIds;
|
|
209
|
+
constructor() {
|
|
210
|
+
super(), this._indicateTheseIds = [];
|
|
211
|
+
}
|
|
212
|
+
indicateTheseIds(e) {
|
|
213
|
+
return arguments.length ? (this._indicateTheseIds = e, this) : this._indicateTheseIds;
|
|
214
|
+
}
|
|
215
|
+
enter(e, t) {
|
|
216
|
+
super.enter(e, t);
|
|
217
|
+
let n = this;
|
|
218
|
+
t.classed("layout_Surface", !0).on("mouseenter", function() {
|
|
219
|
+
n.onMouseEnter();
|
|
220
|
+
}).on("mouseleave", function() {
|
|
221
|
+
n.onMouseLeave();
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
update(e, t) {
|
|
225
|
+
super.update(e, t);
|
|
226
|
+
}
|
|
227
|
+
onMouseEnter() {
|
|
228
|
+
let e = this.indicateTheseIds(), t = this.indicatorOpacity(), n = this.indicatorBorderColor(), r = this.indicatorGlowColor();
|
|
229
|
+
for (let i = 0; i < e.length; i++) {
|
|
230
|
+
let a = C("#" + e[i]), o = a.datum();
|
|
231
|
+
a && o && a.append("div").attr("class", "update-indicator").style("width", o.width() + "px").style("height", o.height() + "px").style("opacity", t).style("border-color", n).style("-webkit-box-shadow", "inset 0px 0px 30px 0px " + r).style("-moz-box-shadow", "inset 0px 0px 30px 0px " + r).style("box-shadow", "inset 0px 0px 30px 0px " + r);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
onMouseLeave() {
|
|
235
|
+
let e = this.indicateTheseIds();
|
|
236
|
+
for (let t = 0; t < e.length; t++) w("#" + e[t] + " > div.update-indicator").remove();
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
Cell.prototype._class += " layout_Cell", Cell.prototype.publish("gridRow", 0, "number", "Grid Row Position", null, { tags: ["Private"] }), Cell.prototype.publish("gridCol", 0, "number", "Grid Column Position", null, { tags: ["Private"] }), Cell.prototype.publish("gridRowSpan", 1, "number", "Grid Row Span", null, { tags: ["Private"] }), Cell.prototype.publish("gridColSpan", 1, "number", "Grid Column Span", null, { tags: ["Private"] }), Cell.prototype.publish("indicatorGlowColor", "#EEEE11", "html-color", "Glow color of update-indicator", null, { tags: ["Basic"] }), Cell.prototype.publish("indicatorBorderColor", "#F48A00", "html-color", "Border color of update-indicator", null, { tags: ["Basic"] }), Cell.prototype.publish("indicatorOpacity", .8, "number", "Opacity of update-indicator", null, { tags: ["Basic"] });
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/Border.ts
|
|
242
|
+
var Border = class extends r {
|
|
243
|
+
_colCount;
|
|
244
|
+
_rowCount;
|
|
245
|
+
_colSize;
|
|
246
|
+
_rowSize;
|
|
247
|
+
_shrinkWrapBoxes;
|
|
248
|
+
_watch;
|
|
249
|
+
_offsetX;
|
|
250
|
+
_offsetY;
|
|
251
|
+
_dragCell;
|
|
252
|
+
_dragCellSize;
|
|
253
|
+
_dragCellStartSize;
|
|
254
|
+
_handleTop;
|
|
255
|
+
_handleLeft;
|
|
256
|
+
_dragPrevX;
|
|
257
|
+
_dragPrevY;
|
|
258
|
+
_cellSizes;
|
|
259
|
+
contentDiv;
|
|
260
|
+
_scrollBarWidth;
|
|
261
|
+
_borderHandles;
|
|
262
|
+
_sectionTypeArr;
|
|
263
|
+
constructor() {
|
|
264
|
+
super(), this._tag = "div", this._colCount = 0, this._rowCount = 0, this._colSize = 0, this._rowSize = 0, this._shrinkWrapBoxes = {}, this.content([]), this.sectionTypes([]);
|
|
265
|
+
}
|
|
266
|
+
watchWidget(e) {
|
|
267
|
+
if (this._watch === void 0 && (this._watch = {}), this._watch[e.id()] && (this._watch[e.id()].remove(), delete this._watch[e.id()]), e) {
|
|
268
|
+
let t = this;
|
|
269
|
+
this._watch[e.id()] = e.monitor(function(e, n, r) {
|
|
270
|
+
r !== n && t.lazyPostUpdate();
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
lazyPostUpdate = p.debounce(function() {
|
|
275
|
+
this.postUpdate();
|
|
276
|
+
}, 100);
|
|
277
|
+
applyLayoutType() {
|
|
278
|
+
let e = this.borderLayoutObject();
|
|
279
|
+
this.content().forEach(function(t, n) {
|
|
280
|
+
t._fixedLeft = e[this.sectionTypes()[n]].left, t._fixedTop = e[this.sectionTypes()[n]].top, t._fixedWidth = e[this.sectionTypes()[n]].width, t._fixedHeight = e[this.sectionTypes()[n]].height, t._dragHandles = this.cellSpecificDragHandles(this.sectionTypes()[n]);
|
|
281
|
+
}, this);
|
|
282
|
+
}
|
|
283
|
+
cellSpecificDragHandles(e) {
|
|
284
|
+
switch (e) {
|
|
285
|
+
case "top": return ["s"];
|
|
286
|
+
case "right": return ["w"];
|
|
287
|
+
case "bottom": return ["n"];
|
|
288
|
+
case "left": return ["e"];
|
|
289
|
+
case "center": return [];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
borderLayoutObject(e) {
|
|
293
|
+
let t = {}, n = this, r, i, a, o, s, c, l, u, d = this.target().getBoundingClientRect(), f = {};
|
|
294
|
+
f.top = d.top, f.left = d.left, f.bottom = d.bottom, f.right = d.right, this.target() instanceof SVGElement ? (f.width = parseFloat(this.target().getAttribute("width")), f.height = parseFloat(this.target().getAttribute("height"))) : (f.width = d.width, f.height = d.height), this.sectionTypes().indexOf("top") !== -1 && (r = this.topSize(), i = this.topPercentage(), this._shrinkWrapBoxes.top !== void 0 && (r = this._shrinkWrapBoxes.top.height + this.gutter(), i = 0)), this.sectionTypes().indexOf("bottom") !== -1 && (a = this.bottomSize(), o = this.bottomPercentage(), this._shrinkWrapBoxes.bottom !== void 0 && (a = this._shrinkWrapBoxes.bottom.height + this.gutter(), o = 0)), this.sectionTypes().indexOf("left") !== -1 && (s = this.leftSize(), c = this.leftPercentage(), this._shrinkWrapBoxes.left !== void 0 && (s = this._shrinkWrapBoxes.left.width + this.gutter(), c = 0)), this.sectionTypes().indexOf("right") !== -1 && (l = this.rightSize(), u = this.rightPercentage(), this._shrinkWrapBoxes.right !== void 0 && (l = this._shrinkWrapBoxes.right.width + this.gutter(), u = 0));
|
|
295
|
+
let p = _sectionPlacementObject({
|
|
296
|
+
width: {
|
|
297
|
+
px: 0,
|
|
298
|
+
"%": 100
|
|
299
|
+
},
|
|
300
|
+
height: {
|
|
301
|
+
px: r,
|
|
302
|
+
"%": i
|
|
303
|
+
},
|
|
304
|
+
top: {
|
|
305
|
+
px: 0,
|
|
306
|
+
"%": 0
|
|
307
|
+
},
|
|
308
|
+
left: {
|
|
309
|
+
px: 0,
|
|
310
|
+
"%": 0
|
|
311
|
+
}
|
|
312
|
+
}), m = _sectionPlacementObject({
|
|
313
|
+
width: {
|
|
314
|
+
px: 0,
|
|
315
|
+
"%": 100
|
|
316
|
+
},
|
|
317
|
+
height: {
|
|
318
|
+
px: a,
|
|
319
|
+
"%": o
|
|
320
|
+
},
|
|
321
|
+
top: {
|
|
322
|
+
px: 0,
|
|
323
|
+
"%": 100
|
|
324
|
+
},
|
|
325
|
+
left: {
|
|
326
|
+
px: 0,
|
|
327
|
+
"%": 0
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
m.top -= m.height;
|
|
331
|
+
let h = _sectionPlacementObject({
|
|
332
|
+
width: {
|
|
333
|
+
px: s,
|
|
334
|
+
"%": c
|
|
335
|
+
},
|
|
336
|
+
height: {
|
|
337
|
+
px: -p.height - m.height,
|
|
338
|
+
"%": 100
|
|
339
|
+
},
|
|
340
|
+
top: {
|
|
341
|
+
px: p.height,
|
|
342
|
+
"%": 0
|
|
343
|
+
},
|
|
344
|
+
left: {
|
|
345
|
+
px: 0,
|
|
346
|
+
"%": 0
|
|
347
|
+
}
|
|
348
|
+
}), g = _sectionPlacementObject({
|
|
349
|
+
width: {
|
|
350
|
+
px: l,
|
|
351
|
+
"%": u
|
|
352
|
+
},
|
|
353
|
+
height: {
|
|
354
|
+
px: -p.height - m.height,
|
|
355
|
+
"%": 100
|
|
356
|
+
},
|
|
357
|
+
top: {
|
|
358
|
+
px: p.height,
|
|
359
|
+
"%": 0
|
|
360
|
+
},
|
|
361
|
+
left: {
|
|
362
|
+
px: 0,
|
|
363
|
+
"%": 100
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
g.left -= g.width;
|
|
367
|
+
let _ = _sectionPlacementObject({
|
|
368
|
+
width: {
|
|
369
|
+
px: -g.width - h.width,
|
|
370
|
+
"%": 100
|
|
371
|
+
},
|
|
372
|
+
height: {
|
|
373
|
+
px: -p.height - m.height,
|
|
374
|
+
"%": 100
|
|
375
|
+
},
|
|
376
|
+
top: {
|
|
377
|
+
px: p.height,
|
|
378
|
+
"%": 0
|
|
379
|
+
},
|
|
380
|
+
left: {
|
|
381
|
+
px: h.width,
|
|
382
|
+
"%": 0
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
return t.top = p, t.bottom = m, t.right = g, t.left = h, t.center = _, t;
|
|
386
|
+
function _sectionPlacementObject(e) {
|
|
387
|
+
return e.width.px = e.width.px === void 0 ? 0 : e.width.px, e.width["%"] = e.width["%"] === void 0 ? 0 : e.width["%"], e.height.px = e.height.px === void 0 ? 0 : e.height.px, e.height["%"] = e.height["%"] === void 0 ? 0 : e.height["%"], {
|
|
388
|
+
width: e.width.px + e.width["%"] / 100 * n.width(),
|
|
389
|
+
height: e.height.px + e.height["%"] / 100 * n.height(),
|
|
390
|
+
top: e.top.px + e.top["%"] / 100 * n.height() + n.gutter() / 2,
|
|
391
|
+
left: e.left.px + e.left["%"] / 100 * n.width() + n.gutter() / 2
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
clearContent(e) {
|
|
396
|
+
if (!e) this.content().forEach(function(e) {
|
|
397
|
+
return e.target(null), !1;
|
|
398
|
+
}), C("#" + this.id() + " > div.borderHandle").classed("borderHandleDisabled", !0), delete this._watch, this.content([]), this.sectionTypes([]);
|
|
399
|
+
else {
|
|
400
|
+
let t = this.sectionTypes().indexOf(e);
|
|
401
|
+
t >= 0 && (this._watch && this.content()[t] && delete this._watch[this.content()[t].id()], this.content()[t].target(null), C("#" + this.id() + " > div.borderHandle_" + e).classed("borderHandleDisabled", !0), this.content().splice(t, 1), this.sectionTypes().splice(t, 1));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
hasContent(e, t, n) {
|
|
405
|
+
return this.sectionTypes().indexOf(e) >= 0;
|
|
406
|
+
}
|
|
407
|
+
setContent(e, t, n) {
|
|
408
|
+
if (this.clearContent(e), n = n === void 0 ? "" : n, t) {
|
|
409
|
+
let r = new Cell().surfaceBorderWidth(0).widget(t).title(n);
|
|
410
|
+
this.watchWidget(t), this.content().push(r), this.sectionTypes().push(e);
|
|
411
|
+
}
|
|
412
|
+
return this;
|
|
413
|
+
}
|
|
414
|
+
getCell(e) {
|
|
415
|
+
let t = this.sectionTypes().indexOf(e);
|
|
416
|
+
return t >= 0 ? this.content()[t] : null;
|
|
417
|
+
}
|
|
418
|
+
getContent(e) {
|
|
419
|
+
let t = this.sectionTypes().indexOf(e);
|
|
420
|
+
return t >= 0 ? this.content()[t].widget() : null;
|
|
421
|
+
}
|
|
422
|
+
setLayoutOffsets() {
|
|
423
|
+
this._offsetX = this._element.node().getBoundingClientRect().left + this.gutter() / 2, this._offsetY = this._element.node().getBoundingClientRect().top + this.gutter() / 2;
|
|
424
|
+
}
|
|
425
|
+
dragStart(e) {
|
|
426
|
+
let t = m();
|
|
427
|
+
t.sourceEvent.stopPropagation();
|
|
428
|
+
let n = this;
|
|
429
|
+
this._dragCell = e, this._dragCellStartSize = this[e + "Size"](), this[e + "ShrinkWrap"]() && (this[e + "Percentage"](0), this[e + "ShrinkWrap"](!1));
|
|
430
|
+
let r = C("#" + n.id() + " > div.borderHandle_" + e);
|
|
431
|
+
n._handleTop = parseFloat(r.style("top").split("px")[0]), n._handleLeft = parseFloat(r.style("left").split("px")[0]), this._dragPrevX = t.sourceEvent.clientX, this._dragPrevY = t.sourceEvent.clientY;
|
|
432
|
+
}
|
|
433
|
+
dragTick(e) {
|
|
434
|
+
let t = this, n = m(), r = this._dragPrevX - n.sourceEvent.clientX, i = this._dragPrevY - n.sourceEvent.clientY;
|
|
435
|
+
switch (e) {
|
|
436
|
+
case "top":
|
|
437
|
+
case "bottom":
|
|
438
|
+
_moveHandles(e, i);
|
|
439
|
+
break;
|
|
440
|
+
case "right":
|
|
441
|
+
case "left":
|
|
442
|
+
_moveHandles(e, r);
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
function _moveHandles(e, n) {
|
|
446
|
+
if (n === 0) return;
|
|
447
|
+
let r = w("#" + t.id() + " > div.borderHandle"), i = C("#" + t.id() + " > div.borderHandle_" + e);
|
|
448
|
+
i.classed("borderHandle_top") ? (i.style("top", t._handleTop - n + "px"), t._cellSizes.topHeight = t._handleTop - n, t._cellSizes.leftHeight = t._cellSizes.height, t._cellSizes.leftHeight -= t._cellSizes.topHeight, t._cellSizes.leftHeight -= t._cellSizes.bottomHeight, t._cellSizes.rightHeight = t._cellSizes.leftHeight) : i.classed("borderHandle_right") ? (i.style("left", t._handleLeft - n + "px"), t._cellSizes.rightWidth = t._cellSizes.width - t._handleLeft + n) : i.classed("borderHandle_bottom") ? (i.style("top", t._handleTop - n + "px"), t._cellSizes.bottomHeight = t._cellSizes.height - t._handleTop + n, t._cellSizes.leftHeight = t._cellSizes.height, t._cellSizes.leftHeight -= t._cellSizes.bottomHeight, t._cellSizes.leftHeight -= t._cellSizes.topHeight, t._cellSizes.rightHeight = t._cellSizes.leftHeight) : i.classed("borderHandle_left") && (i.style("left", t._handleLeft - n + "px"), t._cellSizes.leftWidth = t._handleLeft - n), r.each(function() {
|
|
449
|
+
let e = C(this);
|
|
450
|
+
e.classed("borderHandle_top") ? (e.style("width", t._cellSizes.width + "px"), e.style("top", t._cellSizes.topHeight - 3 + "px")) : e.classed("borderHandle_right") ? (e.style("left", t._cellSizes.width - t._cellSizes.rightWidth + "px"), e.style("top", t._cellSizes.topHeight + 3 + "px"), e.style("height", t._cellSizes.rightHeight + "px")) : e.classed("borderHandle_bottom") ? (e.style("width", t._cellSizes.width + "px"), e.style("top", t._cellSizes.height - t._cellSizes.bottomHeight - 3 + "px")) : e.classed("borderHandle_left") && (e.style("left", t._cellSizes.leftWidth + "px"), e.style("height", t._cellSizes.leftHeight + "px"), e.style("top", t._cellSizes.topHeight + 3 + "px"));
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
dragEnd(e) {
|
|
455
|
+
if (e) {
|
|
456
|
+
let t = m(), n = this._dragPrevX - t.sourceEvent.clientX, r = this._dragPrevY - t.sourceEvent.clientY;
|
|
457
|
+
switch (e) {
|
|
458
|
+
case "top":
|
|
459
|
+
r !== 0 && (this.topPercentage(0), this.topSize(this.topSize() === 0 ? this.getContent("top").getBBox().height - r : this.topSize() - r));
|
|
460
|
+
break;
|
|
461
|
+
case "right":
|
|
462
|
+
n !== 0 && (this.rightPercentage(0), this.rightSize(this.rightSize() === 0 ? this.getContent("right").getBBox().width + n : this.rightSize() + n));
|
|
463
|
+
break;
|
|
464
|
+
case "bottom":
|
|
465
|
+
r !== 0 && (this.bottomPercentage(0), this.bottomSize(this.bottomSize() === 0 ? this.getContent("bottom").getBBox().height + r : this.bottomSize() + r));
|
|
466
|
+
break;
|
|
467
|
+
case "left":
|
|
468
|
+
n !== 0 && (this.leftPercentage(0), this.leftSize(this.leftSize() === 0 ? this.getContent("left").getBBox().width - n : this.leftSize() - n));
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
this._dragPrevX = t.sourceEvent.clientX, this._dragPrevY = t.sourceEvent.clientY;
|
|
472
|
+
}
|
|
473
|
+
this.render();
|
|
474
|
+
}
|
|
475
|
+
size(e) {
|
|
476
|
+
let t = r.prototype.size.apply(this, arguments);
|
|
477
|
+
return arguments.length && this.contentDiv && this.contentDiv.style("width", this._size.width + "px").style("height", this._size.height + "px"), t;
|
|
478
|
+
}
|
|
479
|
+
enter(e, t) {
|
|
480
|
+
super.enter(e, t);
|
|
481
|
+
let n = this;
|
|
482
|
+
t.style("position", "relative"), this.contentDiv = t.append("div").classed("border-content", !0), this._scrollBarWidth = o.getScrollbarWidth(), this._borderHandles = [
|
|
483
|
+
"top",
|
|
484
|
+
"left",
|
|
485
|
+
"right",
|
|
486
|
+
"bottom"
|
|
487
|
+
], t.selectAll("div.borderHandle").data(this._borderHandles).enter().append("div").classed("borderHandle", !0).each(function(e) {
|
|
488
|
+
C(this).classed("borderHandle_" + e, !0).classed("borderHandleDisabled", n.getContent(e) === null);
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
update(e, t) {
|
|
492
|
+
super.update(e, t), this._sectionTypeArr = this.sectionTypes();
|
|
493
|
+
let n = this;
|
|
494
|
+
t.classed("design-mode", this.designMode()), this.setLayoutOffsets();
|
|
495
|
+
let r = this.contentDiv.selectAll(".cell_" + this._id).data(this.content(), function(e) {
|
|
496
|
+
return e._id;
|
|
497
|
+
}), i = r.enter().append("div").classed("cell_" + this._id, !0).style("position", "absolute").each(function(e, t) {
|
|
498
|
+
C(this).classed("border-cell border-cell-" + n._sectionTypeArr[t], !0), e.target(this), C("#" + n.id() + " > div.borderHandle_" + n._sectionTypeArr[t]).classed("borderHandleDisabled", !1);
|
|
499
|
+
}).merge(r);
|
|
500
|
+
i.each(function(e, t) {
|
|
501
|
+
let r = n.sectionTypes()[t];
|
|
502
|
+
n[r + "ShrinkWrap"] !== void 0 && n[r + "ShrinkWrap"]() ? (e.render(), n._shrinkWrapBoxes[r] = e.widget().getBBox(!0)) : delete n._shrinkWrapBoxes[r];
|
|
503
|
+
});
|
|
504
|
+
let a = g().on("start", function(e, t) {
|
|
505
|
+
n.dragStart.call(n, e, t);
|
|
506
|
+
}).on("drag", function(e, t) {
|
|
507
|
+
n.dragTick.call(n, e, t);
|
|
508
|
+
}).on("end", function(e, t) {
|
|
509
|
+
n.dragEnd.call(n, e, t);
|
|
510
|
+
});
|
|
511
|
+
this.designMode() ? t.selectAll("#" + this.id() + " > div.borderHandle").call(a) : t.selectAll("#" + this.id() + " > div.borderHandle").on(".drag", null);
|
|
512
|
+
let o = this.borderLayoutObject();
|
|
513
|
+
this.content().forEach(function(e, t) {
|
|
514
|
+
e._fixedLeft = o[this.sectionTypes()[t]].left, e._fixedTop = o[this.sectionTypes()[t]].top, e._fixedWidth = o[this.sectionTypes()[t]].width, e._fixedHeight = o[this.sectionTypes()[t]].height, e._dragHandles = [];
|
|
515
|
+
}, this), i.style("left", function(e) {
|
|
516
|
+
return e._fixedLeft + "px";
|
|
517
|
+
}).style("top", function(e) {
|
|
518
|
+
return e._fixedTop + "px";
|
|
519
|
+
}).style("width", function(e) {
|
|
520
|
+
return e._fixedWidth - n.gutter() + "px";
|
|
521
|
+
}).style("height", function(e) {
|
|
522
|
+
return e._fixedHeight - n.gutter() + "px";
|
|
523
|
+
}).each(function(e) {
|
|
524
|
+
e._placeholderElement.attr("draggable", n.designMode()).selectAll(".dragHandle").attr("draggable", n.designMode()), e.surfacePadding(n.surfacePadding()).resize();
|
|
525
|
+
}), r.exit().each(function(e) {
|
|
526
|
+
e.target(null);
|
|
527
|
+
}).remove(), this.getCellSizes(), t.selectAll("#" + this.id() + " > div.borderHandle").each(function() {
|
|
528
|
+
let e = C(this);
|
|
529
|
+
e.classed("borderHandle_top") ? (e.style("width", n._cellSizes.width + "px"), e.style("top", n._cellSizes.topHeight - 3 + "px")) : e.classed("borderHandle_right") ? (e.style("left", n._cellSizes.width - n._cellSizes.rightWidth + "px"), e.style("top", n._cellSizes.topHeight + 3 + "px"), e.style("height", n._cellSizes.rightHeight + "px")) : e.classed("borderHandle_bottom") ? (e.style("width", n._cellSizes.width + "px"), e.style("top", n._cellSizes.height - n._cellSizes.bottomHeight - 3 + "px")) : e.classed("borderHandle_left") && (e.style("left", n._cellSizes.leftWidth + "px"), e.style("height", n._cellSizes.leftHeight + "px"), e.style("top", n._cellSizes.topHeight + 3 + "px"));
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
getCellSizes() {
|
|
533
|
+
let e = this;
|
|
534
|
+
e._cellSizes = {};
|
|
535
|
+
let t = this.element().node().getBoundingClientRect();
|
|
536
|
+
e._cellSizes.width = t.width, e._cellSizes.height = t.height, this.element().selectAll("#" + this.id() + " > div > div.border-cell").each(function() {
|
|
537
|
+
let t = C(this);
|
|
538
|
+
if (typeof t.node == "function") {
|
|
539
|
+
let n = t.node().getBoundingClientRect();
|
|
540
|
+
t.classed("border-cell-top") ? e._cellSizes.topHeight = n.height : t.classed("border-cell-left") ? (e._cellSizes.leftWidth = n.width, e._cellSizes.leftHeight = n.height) : t.classed("border-cell-right") ? (e._cellSizes.rightWidth = n.width, e._cellSizes.rightHeight = n.height) : t.classed("border-cell-bottom") && (e._cellSizes.bottomHeight = n.height);
|
|
541
|
+
}
|
|
542
|
+
}), [
|
|
543
|
+
"height",
|
|
544
|
+
"width",
|
|
545
|
+
"topHeight",
|
|
546
|
+
"bottomHeight",
|
|
547
|
+
"leftHeight",
|
|
548
|
+
"rightHeight",
|
|
549
|
+
"leftWidth",
|
|
550
|
+
"rightWidth"
|
|
551
|
+
].forEach(function(t) {
|
|
552
|
+
e._cellSizes[t] = e._cellSizes[t] === void 0 ? 0 : e._cellSizes[t];
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
postUpdate(e, t) {
|
|
556
|
+
let n = this;
|
|
557
|
+
this.content().forEach(function(e) {
|
|
558
|
+
if (e._element.node() !== null && e.widget()) {
|
|
559
|
+
let t = e.widget().getBBox(!1, !0), r = e.widget().getBBox(!0, !0);
|
|
560
|
+
(t.width !== r.width || t.height !== r.height) && n.lazyRender();
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
exit(e, t) {
|
|
565
|
+
this.content().forEach((e) => e.target(null)), super.exit(e, t);
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
Border.prototype._class += " layout_Border", Border.prototype.publish("designMode", !1, "boolean", "Design Mode", null, { tags: ["Basic"] }), Border.prototype.publish("content", [], "widgetArray", "widgets", null, { tags: ["Intermediate"] }), Border.prototype.publish("gutter", 0, "number", "Gap Between Widgets", null, { tags: ["Basic"] }), Border.prototype.publish("topShrinkWrap", !1, "boolean", "'Top' Cell shrinks to fit content", null, { tags: ["Intermediate"] }), Border.prototype.publish("leftShrinkWrap", !1, "boolean", "'Left' Cell shrinks to fit content", null, { tags: ["Intermediate"] }), Border.prototype.publish("rightShrinkWrap", !1, "boolean", "'Right' Cell shrinks to fit content", null, { tags: ["Intermediate"] }), Border.prototype.publish("bottomShrinkWrap", !1, "boolean", "'Bottom' Cell shrinks to fit content", null, { tags: ["Intermediate"] }), Border.prototype.publish("topSize", 0, "number", "Height of the 'Top' Cell (px)", null, { tags: ["Private"] }), Border.prototype.publish("leftSize", 0, "number", "Width of the 'Left' Cell (px)", null, { tags: ["Private"] }), Border.prototype.publish("rightSize", 0, "number", "Width of the 'Right' Cell (px)", null, { tags: ["Private"] }), Border.prototype.publish("bottomSize", 0, "number", "Height of the 'Bottom' Cell (px)", null, { tags: ["Private"] }), Border.prototype.publish("topPercentage", 20, "number", "Percentage (of parent) Height of the 'Top' Cell", null, { tags: ["Private"] }), Border.prototype.publish("leftPercentage", 20, "number", "Percentage (of parent) Width of the 'Left' Cell", null, { tags: ["Private"] }), Border.prototype.publish("rightPercentage", 20, "number", "Percentage (of parent) Width of the 'Right' Cell", null, { tags: ["Private"] }), Border.prototype.publish("bottomPercentage", 20, "number", "Percentage (of parent) Height of the 'Bottom' Cell", null, { tags: ["Private"] }), Border.prototype.publish("surfacePadding", 0, "number", "Cell Padding (px)", null, { tags: ["Intermediate"] }), Border.prototype.publish("sectionTypes", [], "array", "Section Types sharing an index with 'content' - Used to determine position/size.", null, { tags: ["Private"] });
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/Border2.ts
|
|
571
|
+
var WidgetDiv = class {
|
|
572
|
+
_div;
|
|
573
|
+
_overlay = !1;
|
|
574
|
+
_overflowX = "visible";
|
|
575
|
+
_overflowY = "visible";
|
|
576
|
+
_widget;
|
|
577
|
+
constructor(e) {
|
|
578
|
+
this._div = e;
|
|
579
|
+
}
|
|
580
|
+
overlay(e) {
|
|
581
|
+
return arguments.length ? (this._overlay = e, this) : this._overlay;
|
|
582
|
+
}
|
|
583
|
+
overflowX(e) {
|
|
584
|
+
return arguments.length ? (this._overflowX = e, this._div.style("overflow-x", e), this) : this._overflowX;
|
|
585
|
+
}
|
|
586
|
+
overflowY(e) {
|
|
587
|
+
return arguments.length ? (this._overflowY = e, this._div.style("overflow-y", e), this) : this._overflowY;
|
|
588
|
+
}
|
|
589
|
+
element() {
|
|
590
|
+
return this._div;
|
|
591
|
+
}
|
|
592
|
+
node() {
|
|
593
|
+
return this._div.node();
|
|
594
|
+
}
|
|
595
|
+
widget(e) {
|
|
596
|
+
return arguments.length ? (this._widget !== e && (this._widget && this._widget.target(null), this._widget = e, this._widget && this._widget.target(this._div.node())), this) : this._widget;
|
|
597
|
+
}
|
|
598
|
+
resize(e) {
|
|
599
|
+
return this._widget && (this._div.style("width", `${e.width}px`).style("height", `${e.height}px`), this._widget.resize(e)), this;
|
|
600
|
+
}
|
|
601
|
+
async render(e, t, n) {
|
|
602
|
+
let r = this.overflowX();
|
|
603
|
+
!this.overlay() && r === "visible" && (r = null);
|
|
604
|
+
let i = this.overflowY();
|
|
605
|
+
return !this.overlay() && i === "visible" && (i = null), this._div.style("height", this.overlay() ? "0px" : null).style("overflow-x", r).style("overflow-y", i), this._widget ? this._widget.renderPromise().then((r) => {
|
|
606
|
+
if (e && this._widget.visible()) {
|
|
607
|
+
let e = this._widget.getBBox();
|
|
608
|
+
return e.width += 8, t !== void 0 && e.height > t && (e.width += o.getScrollbarWidth()), n !== void 0 && e.width > n && (e.height += o.getScrollbarWidth()), this.overlay() ? e.height = 0 : e.height += 4, e;
|
|
609
|
+
}
|
|
610
|
+
return e ? {
|
|
611
|
+
x: 0,
|
|
612
|
+
y: 0,
|
|
613
|
+
width: 0,
|
|
614
|
+
height: 0
|
|
615
|
+
} : void 0;
|
|
616
|
+
}) : Promise.resolve(e ? {
|
|
617
|
+
x: 0,
|
|
618
|
+
y: 0,
|
|
619
|
+
width: 0,
|
|
620
|
+
height: 0
|
|
621
|
+
} : void 0);
|
|
622
|
+
}
|
|
623
|
+
}, Border2 = class extends r {
|
|
624
|
+
_bodyElement;
|
|
625
|
+
_topWA;
|
|
626
|
+
_leftWA;
|
|
627
|
+
_centerWA;
|
|
628
|
+
_rightWA;
|
|
629
|
+
_bottomWA;
|
|
630
|
+
_topPrevOverflow;
|
|
631
|
+
_leftPrevOverflow;
|
|
632
|
+
_rightPrevOverflow;
|
|
633
|
+
_bottomPrevOverflow;
|
|
634
|
+
constructor() {
|
|
635
|
+
super(), this._tag = "div";
|
|
636
|
+
}
|
|
637
|
+
enter(e, t) {
|
|
638
|
+
super.enter(e, t);
|
|
639
|
+
let n = t.append("header");
|
|
640
|
+
this._bodyElement = t.append("div").attr("class", "body");
|
|
641
|
+
let r = this._bodyElement.append("div").attr("class", "center"), i = this._bodyElement.append("div").attr("class", "lhs"), a = this._bodyElement.append("div").attr("class", "rhs"), o = t.append("div").attr("class", "footer");
|
|
642
|
+
this._topWA = new WidgetDiv(n), this._centerWA = new WidgetDiv(r), this._leftWA = new WidgetDiv(i), this._rightWA = new WidgetDiv(a), this._bottomWA = new WidgetDiv(o);
|
|
643
|
+
}
|
|
644
|
+
update(e, t) {
|
|
645
|
+
super.update(e, t), this._topWA.element().style("display", this.showTop() ? null : "none"), this._rightWA.element().style("display", this.showRight() ? null : "none"), this._bottomWA.element().style("display", this.showBottom() ? null : "none"), this._leftWA.element().style("display", this.showLeft() ? null : "none"), this.topOverflowX() !== this._topWA.overflowX() && this._topWA.overflowX(this.topOverflowX()), this.rightOverflowX() !== this._rightWA.overflowX() && this._rightWA.overflowX(this.rightOverflowX()), this.bottomOverflowX() !== this._bottomWA.overflowX() && this._bottomWA.overflowX(this.bottomOverflowX()), this.leftOverflowX() !== this._leftWA.overflowX() && this._leftWA.overflowX(this.leftOverflowX()), this.topOverflowY() !== this._topWA.overflowY() && this._topWA.overflowY(this.topOverflowY()), this.rightOverflowY() !== this._rightWA.overflowY() && this._rightWA.overflowY(this.rightOverflowY()), this.bottomOverflowY() !== this._bottomWA.overflowY() && this._bottomWA.overflowY(this.bottomOverflowY()), this.leftOverflowY() !== this._leftWA.overflowY() && this._leftWA.overflowY(this.leftOverflowY()), this.element().style("width", `${this.width()}px`).style("height", `${this.height()}px`);
|
|
646
|
+
}
|
|
647
|
+
targetNull(e) {
|
|
648
|
+
e && e.target(null);
|
|
649
|
+
}
|
|
650
|
+
exit(e, t) {
|
|
651
|
+
this.targetNull(this.center()), this.targetNull(this.bottom()), this.targetNull(this.right()), this.targetNull(this.left()), this.targetNull(this.top()), super.exit(e, t);
|
|
652
|
+
}
|
|
653
|
+
swap(e, t) {
|
|
654
|
+
let n = this[e](), r = this[t]();
|
|
655
|
+
return this.targetNull(n), this.targetNull(r), this[`_${e}WA`].widget(null), this[`_${t}WA`].widget(null), this[e](r), this[t](n), this;
|
|
656
|
+
}
|
|
657
|
+
render(e) {
|
|
658
|
+
return super.render((t) => {
|
|
659
|
+
this._topWA ? this._topWA.widget(this.top()).overlay(this.topOverlay()).render(!0).then(async (t) => {
|
|
660
|
+
let n = await this._bottomWA.widget(this.bottom()).render(!0, void 0, this.width()), r = this.height() - (t.height + n.height), i = await this._leftWA.widget(this.left()).render(!0, r), a = await this._rightWA.widget(this.right()).render(!0, r);
|
|
661
|
+
this.bottomHeight_exists() && (n.height = this.bottomHeight());
|
|
662
|
+
let o = this.width() - (i.width + a.width), s = this.height() - (t.height + n.height), c = this.centerOverflowX(), l = this.centerOverflowY(), u = ["auto", "scroll"].indexOf(c) !== -1, d = ["auto", "scroll"].indexOf(l) !== -1;
|
|
663
|
+
(u || d) && this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({
|
|
664
|
+
width: o,
|
|
665
|
+
height: s
|
|
666
|
+
}).render(), this._bodyElement.style("height", `${s}px`);
|
|
667
|
+
let f = [
|
|
668
|
+
this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({
|
|
669
|
+
width: this.width(),
|
|
670
|
+
height: t.height
|
|
671
|
+
}).render(),
|
|
672
|
+
this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({
|
|
673
|
+
width: i.width,
|
|
674
|
+
height: s
|
|
675
|
+
}).render(),
|
|
676
|
+
this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({
|
|
677
|
+
width: a.width,
|
|
678
|
+
height: s
|
|
679
|
+
}).render(),
|
|
680
|
+
this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({
|
|
681
|
+
width: o,
|
|
682
|
+
height: s
|
|
683
|
+
}).render(),
|
|
684
|
+
this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({
|
|
685
|
+
width: this.width(),
|
|
686
|
+
height: n.height
|
|
687
|
+
}).render()
|
|
688
|
+
];
|
|
689
|
+
Promise.all(f).then((t) => {
|
|
690
|
+
e && e(this);
|
|
691
|
+
});
|
|
692
|
+
}) : e && e(this);
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
Border2.prototype._class += " layout_Border2", Border2.prototype.publish("showTop", !0, "boolean", "If true, top widget adapter will display"), Border2.prototype.publish("showRight", !0, "boolean", "If true, right widget adapter will display"), Border2.prototype.publish("showBottom", !0, "boolean", "If true, bottom widget adapter will display"), Border2.prototype.publish("showLeft", !0, "boolean", "If true, left widget adapter will display"), Border2.prototype.publish("topOverflowX", "visible", "set", "Sets the overflow-x css style for the top widget adapter", [
|
|
697
|
+
"hidden",
|
|
698
|
+
"scroll",
|
|
699
|
+
"visible",
|
|
700
|
+
"auto"
|
|
701
|
+
]), Border2.prototype.publish("rightOverflowX", "visible", "set", "Sets the overflow-x css style for the right widget adapter", [
|
|
702
|
+
"hidden",
|
|
703
|
+
"scroll",
|
|
704
|
+
"visible",
|
|
705
|
+
"auto"
|
|
706
|
+
]), Border2.prototype.publish("bottomOverflowX", "visible", "set", "Sets the overflow-x css style for the bottom widget adapter", [
|
|
707
|
+
"hidden",
|
|
708
|
+
"scroll",
|
|
709
|
+
"visible",
|
|
710
|
+
"auto"
|
|
711
|
+
]), Border2.prototype.publish("leftOverflowX", "visible", "set", "Sets the overflow-x css style for the left widget adapter", [
|
|
712
|
+
"hidden",
|
|
713
|
+
"scroll",
|
|
714
|
+
"visible",
|
|
715
|
+
"auto"
|
|
716
|
+
]), Border2.prototype.publish("centerOverflowX", "visible", "set", "Sets the overflow-x css style for the center widget adapter", [
|
|
717
|
+
"hidden",
|
|
718
|
+
"scroll",
|
|
719
|
+
"visible",
|
|
720
|
+
"auto"
|
|
721
|
+
]), Border2.prototype.publish("topOverflowY", "visible", "set", "Sets the overflow-y css style for the top widget adapter", [
|
|
722
|
+
"hidden",
|
|
723
|
+
"scroll",
|
|
724
|
+
"visible",
|
|
725
|
+
"auto"
|
|
726
|
+
]), Border2.prototype.publish("rightOverflowY", "visible", "set", "Sets the overflow-y css style for the right widget adapter", [
|
|
727
|
+
"hidden",
|
|
728
|
+
"scroll",
|
|
729
|
+
"visible",
|
|
730
|
+
"auto"
|
|
731
|
+
]), Border2.prototype.publish("bottomOverflowY", "visible", "set", "Sets the overflow-y css style for the bottom widget adapter", [
|
|
732
|
+
"hidden",
|
|
733
|
+
"scroll",
|
|
734
|
+
"visible",
|
|
735
|
+
"auto"
|
|
736
|
+
]), Border2.prototype.publish("leftOverflowY", "visible", "set", "Sets the overflow-y css style for the left widget adapter", [
|
|
737
|
+
"hidden",
|
|
738
|
+
"scroll",
|
|
739
|
+
"visible",
|
|
740
|
+
"auto"
|
|
741
|
+
]), Border2.prototype.publish("centerOverflowY", "visible", "set", "Sets the overflow-y css style for the center widget adapter", [
|
|
742
|
+
"hidden",
|
|
743
|
+
"scroll",
|
|
744
|
+
"visible",
|
|
745
|
+
"auto"
|
|
746
|
+
]), Border2.prototype.publish("top", null, "widget", "Top Widget", void 0, { render: !1 }), Border2.prototype.publish("topOverlay", !1, "boolean", "Overlay Top Widget"), Border2.prototype.publish("left", null, "widget", "Left Widget", void 0, { render: !1 }), Border2.prototype.publish("center", null, "widget", "Center Widget", void 0, { render: !1 }), Border2.prototype.publish("right", null, "widget", "Right Widget", void 0, { render: !1 }), Border2.prototype.publish("bottom", null, "widget", "Bottom Widget", void 0, { render: !1 }), Border2.prototype.publish("bottomHeight", null, "number", "Bottom Fixed Height", void 0, { optional: !0 });
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region src/Carousel.ts
|
|
749
|
+
var Carousel = class extends r {
|
|
750
|
+
_prevActive = 0;
|
|
751
|
+
_root;
|
|
752
|
+
activeWidget() {
|
|
753
|
+
return this.widgets()[this.active()];
|
|
754
|
+
}
|
|
755
|
+
enter(e, t) {
|
|
756
|
+
super.enter(e, t), this._root = t.append("div").attr("id", `${this.id()}_root`);
|
|
757
|
+
}
|
|
758
|
+
update(e, t) {
|
|
759
|
+
super.update(e, t);
|
|
760
|
+
let n = this.active(), r = this.width();
|
|
761
|
+
this._root.style("width", `${r}px`).style("height", `${this.height()}px`);
|
|
762
|
+
let i = this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(), (e) => e.id()), a = i.enter().append("div").attr("class", "carouselItem").each(function(e) {
|
|
763
|
+
e.target(this);
|
|
764
|
+
}).merge(i).style("left", (e, t) => `${(t - this._prevActive) * r}px`).style("width", `${r}px`);
|
|
765
|
+
this._prevActive !== n && (a.style("display", (e, t) => t === this._prevActive || t === n ? null : "none").transition().duration(this.transitionDuration()).style("left", (e, t) => `${(t - n) * r}px`).on("end", function(e, t) {
|
|
766
|
+
C(this).style("display", () => t === n ? null : "none");
|
|
767
|
+
}), this._prevActive = n), i.exit().each(function(e) {
|
|
768
|
+
e.target(null);
|
|
769
|
+
}).remove();
|
|
770
|
+
}
|
|
771
|
+
exit(e, t) {
|
|
772
|
+
this.widgets().forEach((e) => e.target(null)), super.exit(e, t);
|
|
773
|
+
}
|
|
774
|
+
render(e) {
|
|
775
|
+
return super.render((t) => {
|
|
776
|
+
if (!this.visible() || this.isDOMHidden()) e && e(t);
|
|
777
|
+
else {
|
|
778
|
+
let n = this.activeWidget();
|
|
779
|
+
n && n.resize(this.size()).render((n) => {
|
|
780
|
+
e && e(t);
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
Carousel.prototype._class += " layout_Carousel", Carousel.prototype.publish("widgets", [], "widgetArray", "Widgets", null, { render: !1 }), Carousel.prototype.publish("active", 0, "number", "Active widget"), Carousel.prototype.publish("transitionDuration", 500, "number", "Transition duration");
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region ../../node_modules/d3-path/src/path.js
|
|
789
|
+
var P = Math.PI, F = 2 * P, I = 1e-6, re = F - I;
|
|
790
|
+
function Path() {
|
|
791
|
+
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
|
|
792
|
+
}
|
|
793
|
+
function path() {
|
|
794
|
+
return new Path();
|
|
795
|
+
}
|
|
796
|
+
Path.prototype = path.prototype = {
|
|
797
|
+
constructor: Path,
|
|
798
|
+
moveTo: function(e, t) {
|
|
799
|
+
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t);
|
|
800
|
+
},
|
|
801
|
+
closePath: function() {
|
|
802
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
|
|
803
|
+
},
|
|
804
|
+
lineTo: function(e, t) {
|
|
805
|
+
this._ += "L" + (this._x1 = +e) + "," + (this._y1 = +t);
|
|
806
|
+
},
|
|
807
|
+
quadraticCurveTo: function(e, t, n, r) {
|
|
808
|
+
this._ += "Q" + +e + "," + +t + "," + (this._x1 = +n) + "," + (this._y1 = +r);
|
|
809
|
+
},
|
|
810
|
+
bezierCurveTo: function(e, t, n, r, i, a) {
|
|
811
|
+
this._ += "C" + +e + "," + +t + "," + +n + "," + +r + "," + (this._x1 = +i) + "," + (this._y1 = +a);
|
|
812
|
+
},
|
|
813
|
+
arcTo: function(e, t, n, r, i) {
|
|
814
|
+
e = +e, t = +t, n = +n, r = +r, i = +i;
|
|
815
|
+
var a = this._x1, o = this._y1, s = n - e, c = r - t, l = a - e, u = o - t, d = l * l + u * u;
|
|
816
|
+
if (i < 0) throw Error("negative radius: " + i);
|
|
817
|
+
if (this._x1 === null) this._ += "M" + (this._x1 = e) + "," + (this._y1 = t);
|
|
818
|
+
else if (d > I) if (!(Math.abs(u * s - c * l) > I) || !i) this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
|
|
819
|
+
else {
|
|
820
|
+
var f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((P - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
|
|
821
|
+
Math.abs(y - 1) > I && (this._ += "L" + (e + y * l) + "," + (t + y * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = e + b * s) + "," + (this._y1 = t + b * c);
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
arc: function(e, t, n, r, i, a) {
|
|
825
|
+
e = +e, t = +t, n = +n, a = !!a;
|
|
826
|
+
var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
|
|
827
|
+
if (n < 0) throw Error("negative radius: " + n);
|
|
828
|
+
this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > I || Math.abs(this._y1 - l) > I) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % F + F), d > re ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > I && (this._ += "A" + n + "," + n + ",0," + +(d >= P) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
|
|
829
|
+
},
|
|
830
|
+
rect: function(e, t, n, r) {
|
|
831
|
+
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
|
|
832
|
+
},
|
|
833
|
+
toString: function() {
|
|
834
|
+
return this._;
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region ../../node_modules/d3-shape/src/constant.js
|
|
839
|
+
function constant_default(e) {
|
|
840
|
+
return function constant() {
|
|
841
|
+
return e;
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
__name(constant_default, "default");
|
|
845
|
+
//#endregion
|
|
846
|
+
//#region ../../node_modules/d3-shape/src/math.js
|
|
847
|
+
var L = Math.PI;
|
|
848
|
+
L / 2;
|
|
849
|
+
var R = 2 * L, z = { draw: function(e, t) {
|
|
850
|
+
var n = Math.sqrt(t / L);
|
|
851
|
+
e.moveTo(n, 0), e.arc(0, 0, n, 0, R);
|
|
852
|
+
} }, ie = { draw: function(e, t) {
|
|
853
|
+
var n = Math.sqrt(t / 5) / 2;
|
|
854
|
+
e.moveTo(-3 * n, -n), e.lineTo(-n, -n), e.lineTo(-n, -3 * n), e.lineTo(n, -3 * n), e.lineTo(n, -n), e.lineTo(3 * n, -n), e.lineTo(3 * n, n), e.lineTo(n, n), e.lineTo(n, 3 * n), e.lineTo(-n, 3 * n), e.lineTo(-n, n), e.lineTo(-3 * n, n), e.closePath();
|
|
855
|
+
} }, B = Math.sqrt(1 / 3), ae = B * 2, oe = { draw: function(e, t) {
|
|
856
|
+
var n = Math.sqrt(t / ae), r = n * B;
|
|
857
|
+
e.moveTo(0, -n), e.lineTo(r, 0), e.lineTo(0, n), e.lineTo(-r, 0), e.closePath();
|
|
858
|
+
} }, se = .8908130915292852, V = Math.sin(L / 10) / Math.sin(7 * L / 10), ce = Math.sin(R / 10) * V, le = -Math.cos(R / 10) * V, H = { draw: function(e, t) {
|
|
859
|
+
var n = Math.sqrt(t * se), r = ce * n, i = le * n;
|
|
860
|
+
e.moveTo(0, -n), e.lineTo(r, i);
|
|
861
|
+
for (var a = 1; a < 5; ++a) {
|
|
862
|
+
var o = R * a / 5, s = Math.cos(o), c = Math.sin(o);
|
|
863
|
+
e.lineTo(c * n, -s * n), e.lineTo(s * r - c * i, c * r + s * i);
|
|
864
|
+
}
|
|
865
|
+
e.closePath();
|
|
866
|
+
} }, U = { draw: function(e, t) {
|
|
867
|
+
var n = Math.sqrt(t), r = -n / 2;
|
|
868
|
+
e.rect(r, r, n, n);
|
|
869
|
+
} }, W = Math.sqrt(3), ue = { draw: function(e, t) {
|
|
870
|
+
var n = -Math.sqrt(t / (W * 3));
|
|
871
|
+
e.moveTo(0, n * 2), e.lineTo(-W * n, -n), e.lineTo(W * n, -n), e.closePath();
|
|
872
|
+
} }, G = -.5, K = Math.sqrt(3) / 2, q = 1 / Math.sqrt(12), de = (q / 2 + 1) * 3, fe = { draw: function(e, t) {
|
|
873
|
+
var n = Math.sqrt(t / de), r = n / 2, i = n * q, a = r, o = n * q + n, s = -a, c = o;
|
|
874
|
+
e.moveTo(r, i), e.lineTo(a, o), e.lineTo(s, c), e.lineTo(G * r - K * i, K * r + G * i), e.lineTo(G * a - K * o, K * a + G * o), e.lineTo(G * s - K * c, K * s + G * c), e.lineTo(G * r + K * i, G * i - K * r), e.lineTo(G * a + K * o, G * o - K * a), e.lineTo(G * s + K * c, G * c - K * s), e.closePath();
|
|
875
|
+
} };
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region ../../node_modules/d3-shape/src/symbol.js
|
|
878
|
+
function symbol_default() {
|
|
879
|
+
var e = constant_default(z), t = constant_default(64), n = null;
|
|
880
|
+
function symbol() {
|
|
881
|
+
var r;
|
|
882
|
+
if (n ||= r = path(), e.apply(this, arguments).draw(n, +t.apply(this, arguments)), r) return n = null, r + "" || null;
|
|
883
|
+
}
|
|
884
|
+
return symbol.type = function(t) {
|
|
885
|
+
return arguments.length ? (e = typeof t == "function" ? t : constant_default(t), symbol) : e;
|
|
886
|
+
}, symbol.size = function(e) {
|
|
887
|
+
return arguments.length ? (t = typeof e == "function" ? e : constant_default(+e), symbol) : t;
|
|
888
|
+
}, symbol.context = function(e) {
|
|
889
|
+
return arguments.length ? (n = e ?? null, symbol) : n;
|
|
890
|
+
}, symbol;
|
|
891
|
+
}
|
|
892
|
+
__name(symbol_default, "default");
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region ../../node_modules/d3-svg-legend/indexRollupNext.js
|
|
895
|
+
var pe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
896
|
+
return typeof e;
|
|
897
|
+
} : function(e) {
|
|
898
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
899
|
+
}, J = function d3_identity(e) {
|
|
900
|
+
return e;
|
|
901
|
+
}, Y = function d3_reverse(e) {
|
|
902
|
+
for (var t = [], n = 0, r = e.length; n < r; n++) t[n] = e[r - n - 1];
|
|
903
|
+
return t;
|
|
904
|
+
}, X = function d3_textWrapping(e, t) {
|
|
905
|
+
e.each(function() {
|
|
906
|
+
var e = C(this), n = e.text().split(/\s+/).reverse(), r, i = [], a = 1.2;
|
|
907
|
+
e.attr("y");
|
|
908
|
+
for (var o = parseFloat(e.attr("dy")) || 0, s = e.text(null).append("tspan").attr("x", 0).attr("dy", o + "em"); r = n.pop();) i.push(r), s.text(i.join(" ")), s.node().getComputedTextLength() > t && i.length > 1 && (i.pop(), s.text(i.join(" ")), i = [r], s = e.append("tspan").attr("x", 0).attr("dy", a + o + "em").text(r));
|
|
909
|
+
});
|
|
910
|
+
}, me = function d3_mergeLabels() {
|
|
911
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments[1], n = arguments[2], r = arguments[3], i = arguments[4];
|
|
912
|
+
if ((t === void 0 ? "undefined" : pe(t)) === "object") {
|
|
913
|
+
if (t.length === 0) return e;
|
|
914
|
+
for (var a = t.length; a < e.length; a++) t.push(e[a]);
|
|
915
|
+
return t;
|
|
916
|
+
} else if (typeof t == "function") {
|
|
917
|
+
for (var o = [], s = e.length, c = 0; c < s; c++) o.push(t({
|
|
918
|
+
i: c,
|
|
919
|
+
genLength: s,
|
|
920
|
+
generatedLabels: e,
|
|
921
|
+
domain: n,
|
|
922
|
+
range: r,
|
|
923
|
+
labelDelimiter: i
|
|
924
|
+
}));
|
|
925
|
+
return o;
|
|
926
|
+
}
|
|
927
|
+
return e;
|
|
928
|
+
}, he = function d3_linearLegend(e, t, n) {
|
|
929
|
+
var r = [];
|
|
930
|
+
if (t.length > 1) r = t;
|
|
931
|
+
else for (var i = e.domain(), a = (i[i.length - 1] - i[0]) / (t - 1), o = 0; o < t; o++) r.push(i[0] + o * a);
|
|
932
|
+
var s = r.map(n);
|
|
933
|
+
return {
|
|
934
|
+
data: r,
|
|
935
|
+
labels: s,
|
|
936
|
+
feature: function feature(t) {
|
|
937
|
+
return e(t);
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}, ge = function d3_quantLegend(e, t, n) {
|
|
941
|
+
var r = e.range().map(function(r) {
|
|
942
|
+
var i = e.invertExtent(r);
|
|
943
|
+
return t(i[0]) + " " + n + " " + t(i[1]);
|
|
944
|
+
});
|
|
945
|
+
return {
|
|
946
|
+
data: e.range(),
|
|
947
|
+
labels: r,
|
|
948
|
+
feature: J
|
|
949
|
+
};
|
|
950
|
+
}, _e = function d3_ordinalLegend(e) {
|
|
951
|
+
return {
|
|
952
|
+
data: e.domain(),
|
|
953
|
+
labels: e.domain(),
|
|
954
|
+
feature: function feature(t) {
|
|
955
|
+
return e(t);
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
}, ve = function d3_cellOver(e, t, n) {
|
|
959
|
+
e.call("cellover", n, t);
|
|
960
|
+
}, Z = function d3_cellOut(e, t, n) {
|
|
961
|
+
e.call("cellout", n, t);
|
|
962
|
+
}, ye = function d3_cellClick(e, t, n) {
|
|
963
|
+
e.call("cellclick", n, t);
|
|
964
|
+
}, Q = {
|
|
965
|
+
d3_drawShapes: function d3_drawShapes(e, t, n, r, i, a) {
|
|
966
|
+
e === "rect" ? t.attr("height", n).attr("width", r) : e === "circle" ? t.attr("r", i) : e === "line" ? t.attr("x1", 0).attr("x2", r).attr("y1", 0).attr("y2", 0) : e === "path" && t.attr("d", a);
|
|
967
|
+
},
|
|
968
|
+
d3_addText: function d3_addText(e, t, n, r, i) {
|
|
969
|
+
t.append("text").attr("class", r + "label");
|
|
970
|
+
var a = e.selectAll("g." + r + "cell text." + r + "label").data(n).text(J);
|
|
971
|
+
return i && e.selectAll("g." + r + "cell text." + r + "label").call(X, i), a;
|
|
972
|
+
},
|
|
973
|
+
d3_calcType: function d3_calcType(e, t, n, r, i, a) {
|
|
974
|
+
var o = e.invertExtent ? ge(e, i, a) : e.ticks ? he(e, n, i) : _e(e), s = e.range && e.range() || e.domain();
|
|
975
|
+
return o.labels = me(o.labels, r, e.domain(), s, a), t && (o.labels = Y(o.labels), o.data = Y(o.data)), o;
|
|
976
|
+
},
|
|
977
|
+
d3_filterCells: function d3_filterCells(e, t) {
|
|
978
|
+
var n = e.data.map(function(t, n) {
|
|
979
|
+
return {
|
|
980
|
+
data: t,
|
|
981
|
+
label: e.labels[n]
|
|
982
|
+
};
|
|
983
|
+
}).filter(t), r = n.map(function(e) {
|
|
984
|
+
return e.data;
|
|
985
|
+
}), i = n.map(function(e) {
|
|
986
|
+
return e.label;
|
|
987
|
+
});
|
|
988
|
+
return e.data = e.data.filter(function(e) {
|
|
989
|
+
return r.indexOf(e) !== -1;
|
|
990
|
+
}), e.labels = e.labels.filter(function(e) {
|
|
991
|
+
return i.indexOf(e) !== -1;
|
|
992
|
+
}), e;
|
|
993
|
+
},
|
|
994
|
+
d3_placement: function d3_placement(e, t, n, r, i, a) {
|
|
995
|
+
t.attr("transform", n), r.attr("transform", i), e === "horizontal" && r.style("text-anchor", a);
|
|
996
|
+
},
|
|
997
|
+
d3_addEvents: function d3_addEvents(e, t) {
|
|
998
|
+
e.on("mouseover.legend", function(e) {
|
|
999
|
+
ve(t, e, this);
|
|
1000
|
+
}).on("mouseout.legend", function(e) {
|
|
1001
|
+
Z(t, e, this);
|
|
1002
|
+
}).on("click.legend", function(e) {
|
|
1003
|
+
ye(t, e, this);
|
|
1004
|
+
});
|
|
1005
|
+
},
|
|
1006
|
+
d3_title: function d3_title(e, t, n, r) {
|
|
1007
|
+
if (t !== "") {
|
|
1008
|
+
e.selectAll("text." + n + "legendTitle").data([t]).enter().append("text").attr("class", n + "legendTitle"), e.selectAll("text." + n + "legendTitle").text(t), r && e.selectAll("text." + n + "legendTitle").call(X, r);
|
|
1009
|
+
var i = e.select("." + n + "legendCells"), a = e.select("." + n + "legendTitle").nodes().map(function(e) {
|
|
1010
|
+
return e.getBBox().height;
|
|
1011
|
+
})[0], o = -i.nodes().map(function(e) {
|
|
1012
|
+
return e.getBBox().x;
|
|
1013
|
+
})[0];
|
|
1014
|
+
i.attr("transform", "translate(" + o + "," + a + ")");
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
d3_defaultLocale: {
|
|
1018
|
+
format: _,
|
|
1019
|
+
formatPrefix: y
|
|
1020
|
+
},
|
|
1021
|
+
d3_defaultFormatSpecifier: ".01f",
|
|
1022
|
+
d3_defaultDelimiter: "to"
|
|
1023
|
+
};
|
|
1024
|
+
function color() {
|
|
1025
|
+
var e = x(), t = "rect", n = 15, r = 15, i = 10, a = 2, o = [5], s = void 0, c = [], l = "", u = !1, d = "", f = Q.d3_defaultLocale, p = Q.d3_defaultFormatSpecifier, m = 10, g = "middle", _ = Q.d3_defaultDelimiter, y = void 0, S = "vertical", C = !1, w = void 0, T = void 0, E = h("cellover", "cellout", "cellclick");
|
|
1026
|
+
function legend(h) {
|
|
1027
|
+
var v = Q.d3_calcType(e, C, o, c, f.format(p), _);
|
|
1028
|
+
h.selectAll("g").data([e]).enter().append("g").attr("class", l + "legendCells"), s && Q.d3_filterCells(v, s);
|
|
1029
|
+
var b = h.select("." + l + "legendCells").selectAll("." + l + "cell").data(v.data), x = b.enter().append("g").attr("class", l + "cell");
|
|
1030
|
+
x.append(t).attr("class", l + "swatch");
|
|
1031
|
+
var D = h.selectAll("g." + l + "cell " + t + "." + l + "swatch").data(v.data);
|
|
1032
|
+
Q.d3_addEvents(x, E), b.exit().transition().style("opacity", 0).remove(), D.exit().transition().style("opacity", 0).remove(), D = D.merge(D), Q.d3_drawShapes(t, D, r, n, i, w);
|
|
1033
|
+
var O = Q.d3_addText(h, x, v.labels, l, y);
|
|
1034
|
+
b = x.merge(b);
|
|
1035
|
+
var k = O.nodes().map(function(e) {
|
|
1036
|
+
return e.getBBox();
|
|
1037
|
+
}), A = D.nodes().map(function(e) {
|
|
1038
|
+
return e.getBBox();
|
|
1039
|
+
});
|
|
1040
|
+
u ? D.attr("class", function(e) {
|
|
1041
|
+
return l + "swatch " + v.feature(e);
|
|
1042
|
+
}) : t == "line" ? D.style("stroke", v.feature) : D.style("fill", v.feature);
|
|
1043
|
+
var j = void 0, M = void 0, N = g == "start" ? 0 : g == "middle" ? .5 : 1;
|
|
1044
|
+
S === "vertical" ? (function() {
|
|
1045
|
+
var e = k.map(function(e, t) {
|
|
1046
|
+
return Math.max(e.height, A[t].height);
|
|
1047
|
+
});
|
|
1048
|
+
j = function cellTrans(t, n) {
|
|
1049
|
+
return "translate(0, " + (ee(e.slice(0, n)) + n * a) + ")";
|
|
1050
|
+
}, M = function textTrans(e, t) {
|
|
1051
|
+
return "translate( " + (A[t].width + A[t].x + m) + ", " + (A[t].y + A[t].height / 2 + 5) + ")";
|
|
1052
|
+
};
|
|
1053
|
+
})() : S === "horizontal" && (j = function cellTrans(e, t) {
|
|
1054
|
+
return "translate(" + t * (A[t].width + a) + ",0)";
|
|
1055
|
+
}, M = function textTrans(e, t) {
|
|
1056
|
+
return "translate(" + (A[t].width * N + A[t].x) + ",\n " + (A[t].height + A[t].y + m + 8) + ")";
|
|
1057
|
+
}), Q.d3_placement(S, b, j, O, M, g), Q.d3_title(h, d, l, T), b.transition().style("opacity", 1);
|
|
1058
|
+
}
|
|
1059
|
+
return legend.scale = function(t) {
|
|
1060
|
+
return arguments.length ? (e = t, legend) : e;
|
|
1061
|
+
}, legend.cells = function(e) {
|
|
1062
|
+
return arguments.length ? ((e.length > 1 || e >= 2) && (o = e), legend) : o;
|
|
1063
|
+
}, legend.cellFilter = function(e) {
|
|
1064
|
+
return arguments.length ? (s = e, legend) : s;
|
|
1065
|
+
}, legend.shape = function(e, n) {
|
|
1066
|
+
return arguments.length ? ((e == "rect" || e == "circle" || e == "line" || e == "path" && typeof n == "string") && (t = e, w = n), legend) : t;
|
|
1067
|
+
}, legend.shapeWidth = function(e) {
|
|
1068
|
+
return arguments.length ? (n = +e, legend) : n;
|
|
1069
|
+
}, legend.shapeHeight = function(e) {
|
|
1070
|
+
return arguments.length ? (r = +e, legend) : r;
|
|
1071
|
+
}, legend.shapeRadius = function(e) {
|
|
1072
|
+
return arguments.length ? (i = +e, legend) : i;
|
|
1073
|
+
}, legend.shapePadding = function(e) {
|
|
1074
|
+
return arguments.length ? (a = +e, legend) : a;
|
|
1075
|
+
}, legend.labels = function(e) {
|
|
1076
|
+
return arguments.length ? (c = e, legend) : c;
|
|
1077
|
+
}, legend.labelAlign = function(e) {
|
|
1078
|
+
return arguments.length ? ((e == "start" || e == "end" || e == "middle") && (g = e), legend) : g;
|
|
1079
|
+
}, legend.locale = function(e) {
|
|
1080
|
+
return arguments.length ? (f = v(e), legend) : f;
|
|
1081
|
+
}, legend.labelFormat = function(e) {
|
|
1082
|
+
return arguments.length ? (p = b(e), legend) : legend.locale().format(p);
|
|
1083
|
+
}, legend.labelOffset = function(e) {
|
|
1084
|
+
return arguments.length ? (m = +e, legend) : m;
|
|
1085
|
+
}, legend.labelDelimiter = function(e) {
|
|
1086
|
+
return arguments.length ? (_ = e, legend) : _;
|
|
1087
|
+
}, legend.labelWrap = function(e) {
|
|
1088
|
+
return arguments.length ? (y = e, legend) : y;
|
|
1089
|
+
}, legend.useClass = function(e) {
|
|
1090
|
+
return arguments.length ? ((e === !0 || e === !1) && (u = e), legend) : u;
|
|
1091
|
+
}, legend.orient = function(e) {
|
|
1092
|
+
return arguments.length ? (e = e.toLowerCase(), (e == "horizontal" || e == "vertical") && (S = e), legend) : S;
|
|
1093
|
+
}, legend.ascending = function(e) {
|
|
1094
|
+
return arguments.length ? (C = !!e, legend) : C;
|
|
1095
|
+
}, legend.classPrefix = function(e) {
|
|
1096
|
+
return arguments.length ? (l = e, legend) : l;
|
|
1097
|
+
}, legend.title = function(e) {
|
|
1098
|
+
return arguments.length ? (d = e, legend) : d;
|
|
1099
|
+
}, legend.titleWidth = function(e) {
|
|
1100
|
+
return arguments.length ? (T = e, legend) : T;
|
|
1101
|
+
}, legend.textWrap = function(e) {
|
|
1102
|
+
return arguments.length ? (textWrap = e, legend) : textWrap;
|
|
1103
|
+
}, legend.on = function() {
|
|
1104
|
+
var e = E.on.apply(E, arguments);
|
|
1105
|
+
return e === E ? legend : e;
|
|
1106
|
+
}, legend;
|
|
1107
|
+
}
|
|
1108
|
+
//#endregion
|
|
1109
|
+
//#region src/Legend.ts
|
|
1110
|
+
var Legend = class extends c {
|
|
1111
|
+
_owner;
|
|
1112
|
+
_targetWidget;
|
|
1113
|
+
_targetWidgetMonitor;
|
|
1114
|
+
_legendOrdinal;
|
|
1115
|
+
_disabled = [];
|
|
1116
|
+
_symbolTypeMap = {
|
|
1117
|
+
circle: z,
|
|
1118
|
+
cross: ie,
|
|
1119
|
+
diamond: oe,
|
|
1120
|
+
square: U,
|
|
1121
|
+
star: H,
|
|
1122
|
+
triangle: ue,
|
|
1123
|
+
wye: fe
|
|
1124
|
+
};
|
|
1125
|
+
constructor(e) {
|
|
1126
|
+
super(), this._owner = e, this._drawStartPos = "origin";
|
|
1127
|
+
let t = this;
|
|
1128
|
+
this._legendOrdinal = color().shape("path", symbol_default().type(z).size(150)()).shapePadding(10).shapeRadius(10).on("cellclick", function(e) {
|
|
1129
|
+
t.onClick(e, this);
|
|
1130
|
+
}).on("cellover", (e) => {
|
|
1131
|
+
t.onOver(e, this);
|
|
1132
|
+
}).on("cellout", (e) => {
|
|
1133
|
+
t.onOut(e, this);
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
isDisabled(e) {
|
|
1137
|
+
return e === void 0 ? !1 : typeof e == "string" ? e.indexOf("__") === 0 || this._disabled.indexOf(e) >= 0 : e instanceof t.Field ? e.id().indexOf("__") === 0 || this._disabled.indexOf(e.id()) >= 0 : this._disabled.indexOf(e) >= 0;
|
|
1138
|
+
}
|
|
1139
|
+
filteredFields() {
|
|
1140
|
+
switch (this.dataFamily()) {
|
|
1141
|
+
case "2D": return this.fields();
|
|
1142
|
+
case "ND": return this.fields().filter((e) => !this.isDisabled(e));
|
|
1143
|
+
}
|
|
1144
|
+
return this.fields();
|
|
1145
|
+
}
|
|
1146
|
+
filteredColumns() {
|
|
1147
|
+
switch (this.dataFamily()) {
|
|
1148
|
+
case "2D": return this.columns();
|
|
1149
|
+
case "ND": return this.columns().filter((e) => !this.isDisabled(e));
|
|
1150
|
+
}
|
|
1151
|
+
return this.columns();
|
|
1152
|
+
}
|
|
1153
|
+
filteredData() {
|
|
1154
|
+
switch (this.dataFamily()) {
|
|
1155
|
+
case "2D": return this.data().filter((e) => !this.isDisabled(e[0]));
|
|
1156
|
+
case "ND":
|
|
1157
|
+
let e = {}, t = !1;
|
|
1158
|
+
return this.columns().forEach((n, r) => {
|
|
1159
|
+
let i = this.isDisabled(n);
|
|
1160
|
+
e[r] = i, i && (t = !0);
|
|
1161
|
+
}), t ? this.data().map((t) => t.filter((t, n) => !e[n])) : this.data();
|
|
1162
|
+
}
|
|
1163
|
+
return this.data();
|
|
1164
|
+
}
|
|
1165
|
+
isRainbow() {
|
|
1166
|
+
let e = this.getWidget();
|
|
1167
|
+
return e && e._palette && e._palette.type() === "rainbow";
|
|
1168
|
+
}
|
|
1169
|
+
targetWidget(e) {
|
|
1170
|
+
if (!arguments.length) return this._targetWidget;
|
|
1171
|
+
if (this._targetWidget = e, this._targetWidgetMonitor && (this._targetWidgetMonitor.remove(), delete this._targetWidgetMonitor), this._targetWidget) {
|
|
1172
|
+
let e = this;
|
|
1173
|
+
this._targetWidgetMonitor = this._targetWidget.monitor(function(t, n, r, i) {
|
|
1174
|
+
switch (t) {
|
|
1175
|
+
case "chart":
|
|
1176
|
+
case "columns":
|
|
1177
|
+
case "data":
|
|
1178
|
+
case "paletteID":
|
|
1179
|
+
e.lazyRender();
|
|
1180
|
+
break;
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
return this;
|
|
1185
|
+
}
|
|
1186
|
+
getWidget() {
|
|
1187
|
+
if (this._targetWidget) switch (this._targetWidget.classID()) {
|
|
1188
|
+
case "composite_MultiChart": return this._targetWidget.chart();
|
|
1189
|
+
}
|
|
1190
|
+
return this._targetWidget;
|
|
1191
|
+
}
|
|
1192
|
+
getPalette() {
|
|
1193
|
+
let e = this.getWidget();
|
|
1194
|
+
if (e && e._palette) switch (e._palette.type()) {
|
|
1195
|
+
case "ordinal": return a.ordinal(e._palette.id());
|
|
1196
|
+
case "rainbow": return a.rainbow(e._palette.id());
|
|
1197
|
+
}
|
|
1198
|
+
return a.ordinal("default");
|
|
1199
|
+
}
|
|
1200
|
+
getPaletteType() {
|
|
1201
|
+
return this.getPalette().type();
|
|
1202
|
+
}
|
|
1203
|
+
fillColorFunc() {
|
|
1204
|
+
let e = this.getWidget();
|
|
1205
|
+
if (e && e.fillColor) return e._palette && e.paletteID && e._palette.name !== e.paletteID() && (e._palette = e._palette.switch(e.paletteID())), (t, n, r) => e.fillColor(t, n, r);
|
|
1206
|
+
let t = a.ordinal(e && e.paletteID && e.paletteID() || "default");
|
|
1207
|
+
return (e, n, r) => t(n);
|
|
1208
|
+
}
|
|
1209
|
+
fillColor(e, t, n) {
|
|
1210
|
+
return this.fillColorFunc()(e, t, n);
|
|
1211
|
+
}
|
|
1212
|
+
_g;
|
|
1213
|
+
enter(e, t) {
|
|
1214
|
+
super.enter(e, t), this._g = t.append("g").attr("class", "legendOrdinal");
|
|
1215
|
+
}
|
|
1216
|
+
calcMetaData() {
|
|
1217
|
+
let e = [], t = 0, n = 0, r = this.columns().length;
|
|
1218
|
+
if (this._targetWidget) {
|
|
1219
|
+
let i = this.columns();
|
|
1220
|
+
switch (this.getPaletteType()) {
|
|
1221
|
+
case "ordinal":
|
|
1222
|
+
let a = this.fillColorFunc(), o = 0;
|
|
1223
|
+
switch (this.dataFamily()) {
|
|
1224
|
+
case "2D":
|
|
1225
|
+
e = this.data().map(function(e, i) {
|
|
1226
|
+
o = this.data()[i].slice(1, r).reduce((e, t) => e + t, 0);
|
|
1227
|
+
let s = this.isDisabled(e[0]);
|
|
1228
|
+
s || (t += o);
|
|
1229
|
+
let c = e[0] + (!s && this.showSeriesTotal() ? ` (${o})` : ""), l = this.textSize(c);
|
|
1230
|
+
return n < l.width && (n = l.width), [
|
|
1231
|
+
a(e, e[0], !1),
|
|
1232
|
+
e[0],
|
|
1233
|
+
c
|
|
1234
|
+
];
|
|
1235
|
+
}, this);
|
|
1236
|
+
break;
|
|
1237
|
+
case "ND":
|
|
1238
|
+
e = this.columns().filter((e) => e.indexOf("__") !== 0).filter(function(e, t) {
|
|
1239
|
+
return t > 0;
|
|
1240
|
+
}).map(function(e, r) {
|
|
1241
|
+
o = this.data().reduce((e, t) => e + t[r + 1], 0);
|
|
1242
|
+
let s = this.isDisabled(i[r + 1]), c = e + (!s && this.showSeriesTotal() ? ` (${o})` : "");
|
|
1243
|
+
s || (t += o);
|
|
1244
|
+
let l = this.textSize(c);
|
|
1245
|
+
return n < l.width && (n = l.width), [
|
|
1246
|
+
a(void 0, e, !1),
|
|
1247
|
+
e,
|
|
1248
|
+
c
|
|
1249
|
+
];
|
|
1250
|
+
}, this);
|
|
1251
|
+
break;
|
|
1252
|
+
default:
|
|
1253
|
+
e = this.columns().map(function(e) {
|
|
1254
|
+
return [a(void 0, e, !1), e];
|
|
1255
|
+
}, this);
|
|
1256
|
+
break;
|
|
1257
|
+
}
|
|
1258
|
+
break;
|
|
1259
|
+
case "rainbow":
|
|
1260
|
+
let s = this.getPalette(), c = _(this.rainbowFormat()), l = this.getWidget(), u = this.rainbowBins(), d = l._dataMinWeight, f = l._dataMaxWeight, p = (f - d) / (u - 1);
|
|
1261
|
+
e.push([s(d, d, f), c(d)]);
|
|
1262
|
+
for (let t = 1; t < u - 1; ++t) {
|
|
1263
|
+
let n = p * t;
|
|
1264
|
+
Math.floor(n) > parseInt(e[0][1]) && (n = Math.floor(n)), e.push([s(n, d, f), c(n)]);
|
|
1265
|
+
}
|
|
1266
|
+
e.push([s(f, d, f), c(f)]);
|
|
1267
|
+
break;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
return {
|
|
1271
|
+
dataArr: e,
|
|
1272
|
+
total: t,
|
|
1273
|
+
maxLabelWidth: n
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
update(e, t) {
|
|
1277
|
+
super.update(e, t);
|
|
1278
|
+
let { dataArr: n, maxLabelWidth: r, total: i } = this.calcMetaData(), a = this.shapeRadius(), o = this.radiusToSymbolSize(a), s = this.itemPadding();
|
|
1279
|
+
this.orientation() === "horizontal" && (s += r - a * 2);
|
|
1280
|
+
let c = S().domain(n.map((e) => e[1])).range(n.map((e) => e[0]));
|
|
1281
|
+
this._legendOrdinal.shape("path", symbol_default().type(this._symbolTypeMap[this.symbolType()]).size(o)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(s).scale(c).labels((e) => n[e.i][2]), this._g.call(this._legendOrdinal), this.updateDisabled(t, n);
|
|
1282
|
+
let l = this._g.select(".legendCells").node().getBBox(), u = Math.abs(l.x), d = Math.abs(l.y) + 1;
|
|
1283
|
+
if (this.orientation() === "horizontal") {
|
|
1284
|
+
if (this.labelAlign() === "start" ? u += 1 : this.labelAlign() === "end" && --u, this.width() > l.width) {
|
|
1285
|
+
let e = this.width() - l.width;
|
|
1286
|
+
u += e / 2;
|
|
1287
|
+
}
|
|
1288
|
+
} else if (this.orientation() === "vertical" && (u += 1, this._containerSize.height > l.height)) {
|
|
1289
|
+
let e = this.height() - l.height;
|
|
1290
|
+
d += e / 2;
|
|
1291
|
+
}
|
|
1292
|
+
this._g.attr("transform", `translate(${u}, ${d})`), this.pos({
|
|
1293
|
+
x: 0,
|
|
1294
|
+
y: 0
|
|
1295
|
+
}), this._legendOrdinal.labelOffset(this.itemPadding());
|
|
1296
|
+
let f = this._g.selectAll(".legendTotal").data(n.length && this.showLegendTotal() ? [i] : []), p = `Total: ${i}`, m = -u, h = l.height + this.itemPadding() + 1;
|
|
1297
|
+
this.enableOverflowScroll(!1), this.enableOverflow(!0), f.enter().append("text").classed("legendTotal", !0).merge(f).attr("transform", `translate(${m}, ${h})`).text(p), f.exit().remove();
|
|
1298
|
+
}
|
|
1299
|
+
updateDisabled(e, t) {
|
|
1300
|
+
e.style("cursor", "pointer").selectAll("path.swatch").filter((e, n) => n < t.length).style("stroke", (e, n) => t[n][0]).style("fill", (e, n) => this._disabled.indexOf(e) < 0 ? t[n][0] : "white");
|
|
1301
|
+
}
|
|
1302
|
+
postUpdate(e, t) {
|
|
1303
|
+
let n;
|
|
1304
|
+
this._boundingBox && (n = this._boundingBox.width, this._boundingBox.width = this._size.width), super.postUpdate(e, t), n !== void 0 && (this._boundingBox.width = n), this._parentRelativeDiv.style("overflow", "hidden");
|
|
1305
|
+
}
|
|
1306
|
+
exit(e, t) {
|
|
1307
|
+
super.exit(e, t);
|
|
1308
|
+
}
|
|
1309
|
+
radiusToSymbolSize(e) {
|
|
1310
|
+
let t = e ** 2 * Math.PI;
|
|
1311
|
+
switch (this.symbolType()) {
|
|
1312
|
+
case "star": return t * .45;
|
|
1313
|
+
case "triangle": return t * .65;
|
|
1314
|
+
case "cross":
|
|
1315
|
+
case "diamond":
|
|
1316
|
+
case "wye": return t * .75;
|
|
1317
|
+
case "circle": return t;
|
|
1318
|
+
case "square": return t * 1.3;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
onClick(e, t) {
|
|
1322
|
+
switch (this.getPaletteType()) {
|
|
1323
|
+
case "ordinal":
|
|
1324
|
+
switch (this.dataFamily()) {
|
|
1325
|
+
case "2D":
|
|
1326
|
+
case "ND":
|
|
1327
|
+
let t = this._disabled.indexOf(e);
|
|
1328
|
+
t < 0 ? this._disabled.push(e) : this._disabled.splice(t, 1), this._owner.refreshColumns(), this._owner.refreshData(), this._owner.render();
|
|
1329
|
+
break;
|
|
1330
|
+
}
|
|
1331
|
+
break;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
onOver(e, t) {
|
|
1335
|
+
if (E(this._owner)) switch (this.getPaletteType()) {
|
|
1336
|
+
case "ordinal":
|
|
1337
|
+
switch (this.dataFamily()) {
|
|
1338
|
+
case "2D":
|
|
1339
|
+
case "ND":
|
|
1340
|
+
this._disabled.indexOf(e) < 0 && this._owner.highlightColumn(e);
|
|
1341
|
+
break;
|
|
1342
|
+
}
|
|
1343
|
+
break;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
onOut(e, t) {
|
|
1347
|
+
if (E(this._owner)) switch (this.getPaletteType()) {
|
|
1348
|
+
case "ordinal":
|
|
1349
|
+
switch (this.dataFamily()) {
|
|
1350
|
+
case "2D":
|
|
1351
|
+
case "ND":
|
|
1352
|
+
this._owner.highlightColumn();
|
|
1353
|
+
break;
|
|
1354
|
+
}
|
|
1355
|
+
break;
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
onDblClick(e, t) {}
|
|
1359
|
+
onMouseOver(e, t) {}
|
|
1360
|
+
_containerSize;
|
|
1361
|
+
resize(e) {
|
|
1362
|
+
let t;
|
|
1363
|
+
if (this.fitToContent()) {
|
|
1364
|
+
this._containerSize = e;
|
|
1365
|
+
let n = this.getBBox();
|
|
1366
|
+
e.width > n.width && (n.width = e.width), e.height > n.height && (n.height = e.height), t = super.resize.apply(this, [{ ...n }]);
|
|
1367
|
+
} else t = super.resize.apply(this, arguments);
|
|
1368
|
+
return t;
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
Legend.prototype._class += " layout_Legend", Legend.prototype.publish("title", "", "string", "Title"), Legend.prototype.publish("symbolType", "circle", "set", "Shape of each legend item", [
|
|
1372
|
+
"circle",
|
|
1373
|
+
"cross",
|
|
1374
|
+
"diamond",
|
|
1375
|
+
"square",
|
|
1376
|
+
"star",
|
|
1377
|
+
"triangle",
|
|
1378
|
+
"wye"
|
|
1379
|
+
]), Legend.prototype.publish("labelMaxWidth", null, "number", "Max Label Width (pixels)", null, { optional: !0 }), Legend.prototype.publish("orientation", "vertical", "set", "Orientation of Legend rows", ["vertical", "horizontal"], { tags: ["Private"] }), Legend.prototype.publish("dataFamily", "ND", "set", "Type of data", [
|
|
1380
|
+
"1D",
|
|
1381
|
+
"2D",
|
|
1382
|
+
"ND",
|
|
1383
|
+
"map",
|
|
1384
|
+
"graph",
|
|
1385
|
+
"any"
|
|
1386
|
+
], { tags: ["Private"] }), Legend.prototype.publish("rainbowFormat", ",", "string", "Rainbow number formatting", null, {
|
|
1387
|
+
tags: ["Private"],
|
|
1388
|
+
optional: !0,
|
|
1389
|
+
disable: (e) => !e.isRainbow()
|
|
1390
|
+
}), Legend.prototype.publish("rainbowBins", 8, "number", "Number of rainbow bins", null, {
|
|
1391
|
+
tags: ["Private"],
|
|
1392
|
+
disable: (e) => !e.isRainbow()
|
|
1393
|
+
}), Legend.prototype.publish("showSeriesTotal", !1, "boolean", "Show value next to series"), Legend.prototype.publish("showLegendTotal", !1, "boolean", "Show a total of the series values under the legend", null), Legend.prototype.publish("itemPadding", 8, "number", "Padding between legend items (pixels)"), Legend.prototype.publish("shapeRadius", 7, "number", "Radius of legend shape (pixels)"), Legend.prototype.publish("fitToContent", !0, "boolean", "If true, resize will simply reapply the bounding box dimensions"), Legend.prototype.publish("labelAlign", "start", "set", "Horizontal alignment of legend item label (for horizontal orientation only)", [
|
|
1394
|
+
"start",
|
|
1395
|
+
"middle",
|
|
1396
|
+
"end"
|
|
1397
|
+
], {
|
|
1398
|
+
optional: !0,
|
|
1399
|
+
disable: (e) => e.orientation() === "vertical"
|
|
1400
|
+
});
|
|
1401
|
+
//#endregion
|
|
1402
|
+
//#region src/Modal.ts
|
|
1403
|
+
var Modal = class extends r {
|
|
1404
|
+
_widget;
|
|
1405
|
+
_relativeTarget;
|
|
1406
|
+
_fade;
|
|
1407
|
+
_modal;
|
|
1408
|
+
_modalHeader;
|
|
1409
|
+
_modalBody;
|
|
1410
|
+
_modalHeaderAnnotations;
|
|
1411
|
+
_modalHeaderCloseButton;
|
|
1412
|
+
_close;
|
|
1413
|
+
constructor() {
|
|
1414
|
+
super(), this._tag = "div";
|
|
1415
|
+
}
|
|
1416
|
+
closeModal() {
|
|
1417
|
+
this.visible(!1);
|
|
1418
|
+
}
|
|
1419
|
+
getRelativeTarget() {
|
|
1420
|
+
let e;
|
|
1421
|
+
return this.relativeTargetId() && (e = document.getElementById(this.relativeTargetId()), e) ? e : !e && (e = this.locateAncestor("layout_Grid"), e && e.element) ? e.element().node() : document.body;
|
|
1422
|
+
}
|
|
1423
|
+
setModalSize() {
|
|
1424
|
+
this.fixedHeight() !== null && this.fixedWidth() !== null ? this._modal.style("height", this.fixedHeight()).style("width", this.fixedWidth()).style("min-height", null).style("min-width", null).style("max-height", null).style("max-width", null) : (this.minHeight() || this.minWidth()) && this._modal.style("min-height", this.minHeight()).style("min-width", this.minWidth()).style("max-height", this.maxHeight()).style("max-width", this.maxWidth());
|
|
1425
|
+
let e = this._modal.node().getBoundingClientRect(), t = this._modalHeader.node().getBoundingClientRect();
|
|
1426
|
+
return this._modalBody.style("height", e.height - t.height + "px").style("width", e.width), e;
|
|
1427
|
+
}
|
|
1428
|
+
setFadePosition(e) {
|
|
1429
|
+
this._fade.style("top", e.top + "px").style("left", e.left + "px").style("width", e.width + "px").style("height", e.height + "px");
|
|
1430
|
+
}
|
|
1431
|
+
setModalPosition(e) {
|
|
1432
|
+
let t = this.setModalSize();
|
|
1433
|
+
if (this.fixedTop() !== null && this.fixedLeft() !== null) this._modal.style("top", `calc(${this.fixedTop()} + ${e.top}px)`).style("left", `calc(${this.fixedLeft()} + ${e.left}px)`);
|
|
1434
|
+
else if (this.fixedHeight() !== null && this.fixedWidth() !== null) this._modal.style("top", e.top + e.height / 2 - t.height / 2 + "px").style("left", e.left + e.width / 2 - t.width / 2 + "px");
|
|
1435
|
+
else if (this.minHeight() || this.minWidth()) {
|
|
1436
|
+
let t = this._modal.node().getBoundingClientRect();
|
|
1437
|
+
this._modal.style("top", e.top + e.height / 2 - t.height / 2 + "px").style("left", e.left + e.width / 2 - t.width / 2 + "px");
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
resize(e) {
|
|
1441
|
+
return super.resize(), this._modal && this.setModalSize(), this;
|
|
1442
|
+
}
|
|
1443
|
+
resizeBodySync(e, t) {
|
|
1444
|
+
let n = this._modalHeader.node().getBoundingClientRect();
|
|
1445
|
+
return this._modal.style("width", e + "px").style("height", t + n.height + "px").style("min-width", e + "px").style("min-height", t + n.height + "px"), this._modalHeader.style("width", e + "px"), this._modalBody.style("width", e + "px").style("height", t + "px"), this.minWidth(e + "px").minHeight(t + n.height + "px").resize({
|
|
1446
|
+
height: t + n.height,
|
|
1447
|
+
width: e
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
enter(e, t) {
|
|
1451
|
+
super.enter(e, t), this._fade = t.append("div").classed("layout_Modal-fade", !0).classed("layout_Modal-fadeClickable", this.enableClickFadeToClose()).classed("layout_Modal-fade-hidden", !this.showFade());
|
|
1452
|
+
let n = this.titleFontSize() * 2;
|
|
1453
|
+
this._modal = t.append("div").classed("layout_Modal-content", !0), this._modalHeader = this._modal.append("div").classed("layout_Modal-header", !0).style("color", this.titleFontColor()).style("font-size", this.titleFontSize() + "px").style("height", n + "px"), this._modalBody = this._modal.append("div").classed("layout_Modal-body", !0).style("height", `calc( 100% - ${n}px )`).style("overflow-x", this.overflowX()).style("overflow-y", this.overflowY()), this._modalHeader.append("div").classed("layout_Modal-title", !0).style("line-height", this.titleFontSize() + "px").style("top", this.titleFontSize() / 2 + "px").style("left", this.titleFontSize() / 2 + "px").text(this.formattedTitle()), this._modalHeaderAnnotations = this._modalHeader.append("div").classed("layout_Modal-annotations", !0), this._modalHeaderCloseButton = this._modalHeaderAnnotations.append("div").classed("layout_Modal-closeButton", !0).html("<i class=\"fa fa-close\"></i>"), this._modalHeaderAnnotations.style("line-height", this.titleFontSize() + "px").style("right", this.titleFontSize() / 2 + "px").style("top", this.titleFontSize() / 2 + "px"), this._modalHeaderCloseButton.on("click", () => {
|
|
1454
|
+
this.closeModal();
|
|
1455
|
+
}), this._fade.on("click", (e) => {
|
|
1456
|
+
this.enableClickFadeToClose() && this.closeModal();
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
update(e, t) {
|
|
1460
|
+
super.update(e, t), t.style("display", this.show() ? null : "none"), this._fade.classed("layout_Modal-fade-hidden", !this.showFade()), this._relativeTarget = this.getRelativeTarget(), this.setModalSize();
|
|
1461
|
+
let n = this._relativeTarget.getBoundingClientRect();
|
|
1462
|
+
this.setFadePosition(n), this.setModalPosition(n), this.show() ? (this._widget.target() || this._widget.target(this._modalBody.node()), this._widget.resize().render()) : this._widget.target(null).render();
|
|
1463
|
+
}
|
|
1464
|
+
exit(e, t) {
|
|
1465
|
+
this._widget && this._widget.target(null), super.exit(e, t);
|
|
1466
|
+
}
|
|
1467
|
+
formattedTitle() {
|
|
1468
|
+
let e = this.title_exists() ? this.title().trim() : "";
|
|
1469
|
+
return e.length > 0 && e.slice(0, 1) === "(" && e.slice(-1) === ")" ? e.slice(1, -1) : this.title();
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
Modal.prototype._class += " layout_Modal", Modal.prototype.publish("title", null, "string", "title"), Modal.prototype.publish("widget", null, "widget", "widget"), Modal.prototype.publish("titleFontSize", 18, "number", "titleFontSize (in pixels)"), Modal.prototype.publish("titleFontColor", "#ffffff", "html-color", "titleFontColor"), Modal.prototype.publish("relativeTargetId", null, "string", "relativeTargetId"), Modal.prototype.publish("show", !0, "boolean", "show"), Modal.prototype.publish("showFade", !0, "boolean", "showFade"), Modal.prototype.publish("enableClickFadeToClose", !0, "boolean", "enableClickFadeToClose"), Modal.prototype.publish("minWidth", "400px", "string", "minWidth"), Modal.prototype.publish("minHeight", "400px", "string", "minHeight"), Modal.prototype.publish("maxWidth", "800px", "string", "maxWidth"), Modal.prototype.publish("maxHeight", "800px", "string", "maxHeight"), Modal.prototype.publish("fixedWidth", null, "string", "fixedWidth"), Modal.prototype.publish("fixedHeight", null, "string", "fixedHeight"), Modal.prototype.publish("fixedTop", null, "string", "fixedTop"), Modal.prototype.publish("fixedLeft", null, "string", "fixedLeft"), Modal.prototype.publish("overflowX", "hidden", "string", "overflowX"), Modal.prototype.publish("overflowY", "scroll", "string", "overflowY");
|
|
1473
|
+
//#endregion
|
|
1474
|
+
//#region src/ChartPanel.ts
|
|
1475
|
+
var ChartPanel = class extends Border2 {
|
|
1476
|
+
_legend = new Legend(this).enableOverflow(!0);
|
|
1477
|
+
_progressBar = new s();
|
|
1478
|
+
_autoScale = !1;
|
|
1479
|
+
_resolutions = {
|
|
1480
|
+
tiny: {
|
|
1481
|
+
width: 100,
|
|
1482
|
+
height: 100
|
|
1483
|
+
},
|
|
1484
|
+
small: {
|
|
1485
|
+
width: 300,
|
|
1486
|
+
height: 300
|
|
1487
|
+
}
|
|
1488
|
+
};
|
|
1489
|
+
_modal = new Modal();
|
|
1490
|
+
_highlight;
|
|
1491
|
+
_scale;
|
|
1492
|
+
_orig_size;
|
|
1493
|
+
_toggleInfo = new f().faChar("fa-info-circle").tooltip(".Description").selected(!1).on("enabled", () => this.description() !== "").on("click", () => {
|
|
1494
|
+
if (this._toggleInfo.selected()) {
|
|
1495
|
+
this._modal.title(this.title()).widget(new u().text(this.description())).show(!0).render();
|
|
1496
|
+
let e = this._modal._close;
|
|
1497
|
+
this._modal._close = () => {
|
|
1498
|
+
this._toggleInfo.selected(!1).render(), this._modal._close = e;
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
}).on("mouseMove", () => {}).on("mouseOut", () => {});
|
|
1502
|
+
_toggleData = new f().faChar("fa-table").tooltip("Data").on("click", () => {
|
|
1503
|
+
this.dataVisible(this._toggleData.selected()), this.render();
|
|
1504
|
+
});
|
|
1505
|
+
_buttonDownload = new e().faChar("fa-download").tooltip("Download").on("click", () => {
|
|
1506
|
+
this.downloadCSV();
|
|
1507
|
+
});
|
|
1508
|
+
_buttonDownloadImage = new e().faChar("fa-image").tooltip("Download Image").on("click", () => {
|
|
1509
|
+
this.downloadPNG();
|
|
1510
|
+
});
|
|
1511
|
+
_toggleLegend = new f().faChar("fa-list-ul").tooltip("Legend").selected(!1).on("click", () => {
|
|
1512
|
+
let e = this._toggleLegend.selected();
|
|
1513
|
+
this.legendPosition() === "bottom" ? this.showBottom(e) : this.legendPosition() === "right" && this.showRight(e), this.legendVisible(e), this.render();
|
|
1514
|
+
});
|
|
1515
|
+
_spacer = new l();
|
|
1516
|
+
_titleBar = new d().buttons([
|
|
1517
|
+
this._toggleData,
|
|
1518
|
+
this._buttonDownload,
|
|
1519
|
+
this._buttonDownloadImage,
|
|
1520
|
+
this._spacer,
|
|
1521
|
+
this._toggleLegend
|
|
1522
|
+
]);
|
|
1523
|
+
_carousel = new Carousel();
|
|
1524
|
+
_table = new T();
|
|
1525
|
+
_widget;
|
|
1526
|
+
_hideLegendToggleList = ["dgrid_Table", "dgrid2_Table"];
|
|
1527
|
+
constructor() {
|
|
1528
|
+
super(), this._tag = "div";
|
|
1529
|
+
}
|
|
1530
|
+
fields(e) {
|
|
1531
|
+
return arguments.length ? (super.fields(e), this._legend.fields(e), this.refreshFields(), this) : super.fields();
|
|
1532
|
+
}
|
|
1533
|
+
refreshFields() {
|
|
1534
|
+
return this._widget.fields(this._legend.filteredFields()), this._table.fields(this._legend.filteredFields()), this;
|
|
1535
|
+
}
|
|
1536
|
+
columns(e, t) {
|
|
1537
|
+
return arguments.length ? (super.columns(e, t), this._legend.columns(e, t), this.refreshColumns(), this) : super.columns();
|
|
1538
|
+
}
|
|
1539
|
+
refreshColumns() {
|
|
1540
|
+
return this._widget.columns(this._legend.filteredColumns()), this._table.columns(this._legend.filteredColumns()), this;
|
|
1541
|
+
}
|
|
1542
|
+
data(e) {
|
|
1543
|
+
return arguments.length ? (super.data(e), this._legend.data(e), this.refreshData(), this) : super.data();
|
|
1544
|
+
}
|
|
1545
|
+
refreshData() {
|
|
1546
|
+
return this._widget.data(this._legend.filteredData()), this._table.data(this._legend.filteredData()), this;
|
|
1547
|
+
}
|
|
1548
|
+
highlight(e) {
|
|
1549
|
+
return arguments.length ? (this._highlight = e, this) : this._highlight;
|
|
1550
|
+
}
|
|
1551
|
+
startProgress() {
|
|
1552
|
+
this._progressBar.start();
|
|
1553
|
+
}
|
|
1554
|
+
finishProgress() {
|
|
1555
|
+
this._progressBar.finish();
|
|
1556
|
+
}
|
|
1557
|
+
buttons(e) {
|
|
1558
|
+
return arguments.length ? (this._titleBar.buttons(e), this) : this._titleBar.buttons();
|
|
1559
|
+
}
|
|
1560
|
+
downloadCSV() {
|
|
1561
|
+
let e = this.downloadTitle() ? this.downloadTitle() : this.title() ? this.title() : "data", t = this.downloadTimestampSuffix() ? "_" + p.timestamp() : "";
|
|
1562
|
+
return p.downloadString("CSV", this._widget.export("CSV"), e + t), this;
|
|
1563
|
+
}
|
|
1564
|
+
downloadPNG() {
|
|
1565
|
+
let e = this.widget();
|
|
1566
|
+
return e instanceof c && (this.legendVisible() ? e.downloadPNG(this.title(), void 0, this._legend) : e.downloadPNG(this.title())), this;
|
|
1567
|
+
}
|
|
1568
|
+
highlightColumn(e) {
|
|
1569
|
+
if (e) {
|
|
1570
|
+
let t = `series-${this.cssTag(e)}`;
|
|
1571
|
+
this._centerWA.element().selectAll(".series").each(function() {
|
|
1572
|
+
let e = C(this), n = e.classed(t);
|
|
1573
|
+
e.classed("highlight", n).classed("lowlight", !n);
|
|
1574
|
+
});
|
|
1575
|
+
} else this._centerWA.element().selectAll(".series").classed("highlight", !1).classed("lowlight", !1);
|
|
1576
|
+
return this;
|
|
1577
|
+
}
|
|
1578
|
+
getResponsiveMode() {
|
|
1579
|
+
return this.enableAutoscaling() ? this._autoScale ? this.size().width <= this._resolutions.tiny.width || this.size().height <= this._resolutions.tiny.height ? "tiny" : this.size().width <= this._resolutions.small.width || this.size().height <= this._resolutions.small.height ? "small" : "regular" : "regular" : "none";
|
|
1580
|
+
}
|
|
1581
|
+
setOrigSize() {
|
|
1582
|
+
this._orig_size = JSON.parse(JSON.stringify(this.size()));
|
|
1583
|
+
}
|
|
1584
|
+
enter(e, t) {
|
|
1585
|
+
super.enter(e, t), this._modal.target(this.target()).relativeTargetId(this.id()), this.top(this._titleBar), this.center(this._carousel), this._legend.targetWidget(this._widget).orientation("vertical").title("").visible(!1), this._progressBar.enter(e, t), this.setOrigSize();
|
|
1586
|
+
}
|
|
1587
|
+
preUpdateTiny(e) {
|
|
1588
|
+
e.selectAll("div.body,div.title-text,div.icon-bar").style("display", "none");
|
|
1589
|
+
}
|
|
1590
|
+
preUpdateSmall(e) {
|
|
1591
|
+
let t = this._orig_size.width / this._resolutions.small.width, n = this._orig_size.height / this._resolutions.small.height;
|
|
1592
|
+
this._scale = Math.min(t, n);
|
|
1593
|
+
let r = this._scale === t;
|
|
1594
|
+
this.size({
|
|
1595
|
+
width: r ? this._resolutions.small.width : this._orig_size.width * (1 / this._scale),
|
|
1596
|
+
height: r ? this._orig_size.height * (1 / this._scale) : this._resolutions.small.height
|
|
1597
|
+
}), e.select("div.title-icon").style("position", "static"), e.selectAll("lhs").style("display", "none"), e.selectAll("div.body,div.title-text,div.icon-bar").style("display", ""), e.selectAll("div.data-count").style("visibility", "hidden"), e.style("transform", `scale(${this._scale})`);
|
|
1598
|
+
}
|
|
1599
|
+
preUpdateRegular(e) {
|
|
1600
|
+
e.selectAll("div.body,div.title-text,div.icon-bar").style("display", ""), e.selectAll("div.data-count").style("visibility", "hidden"), e.select("div.title-icon").style("position", "static"), e.style("transform", "translate(0px,0px) scale(1)");
|
|
1601
|
+
}
|
|
1602
|
+
_prevdataVisible;
|
|
1603
|
+
_prevlegendVisible;
|
|
1604
|
+
_prevLegendPosition;
|
|
1605
|
+
_prevChartDataFamily;
|
|
1606
|
+
_prevChart;
|
|
1607
|
+
_prevButtons;
|
|
1608
|
+
update(e, t) {
|
|
1609
|
+
super.update(e, t);
|
|
1610
|
+
}
|
|
1611
|
+
preUpdate(e, t) {
|
|
1612
|
+
switch (super.preUpdate(e, t), this._prevLegendPosition !== this.legendPosition() && (this._legend.target() !== null && this._legend.target(null), this._prevLegendPosition === void 0 ? this[this.legendPosition()](this._legend) : this.swap(this._prevLegendPosition, this.legendPosition()), this.legendPosition() === "right" ? (this.rightOverflowX("hidden"), this.rightOverflowY("auto"), this.bottomOverflowX("visible"), this.bottomOverflowY("visible")) : (this.rightOverflowX("visible"), this.rightOverflowY("visible"), this.bottomOverflowX("auto"), this.bottomOverflowY("hidden")), this._prevLegendPosition = this.legendPosition()), this._prevdataVisible !== this.dataVisible() && (this._prevdataVisible = this.dataVisible(), this._toggleData.selected(this._prevdataVisible), this._legend.visible(this._prevlegendVisible && !this._prevdataVisible), this._carousel.active(+!!this._prevdataVisible)), this._prevlegendVisible !== this.legendVisible() && (this._prevlegendVisible = this.legendVisible(), this._toggleLegend.selected(this._prevlegendVisible), this._legend.visible(this._prevlegendVisible && !this._prevdataVisible)), this._legend.orientation(this.legendPosition() === "bottom" ? "horizontal" : "vertical"), this.showLeft(!this.left()), this.getResponsiveMode()) {
|
|
1613
|
+
case "tiny":
|
|
1614
|
+
this.preUpdateTiny(t);
|
|
1615
|
+
break;
|
|
1616
|
+
case "small":
|
|
1617
|
+
this.preUpdateSmall(t);
|
|
1618
|
+
break;
|
|
1619
|
+
case "regular":
|
|
1620
|
+
this.preUpdateRegular(t);
|
|
1621
|
+
break;
|
|
1622
|
+
}
|
|
1623
|
+
let n = this._widget.classID() === "composite_MultiChart" ? this._widget.chart() : this._widget;
|
|
1624
|
+
if (this._legend.dataFamily(n._dataFamily || "any"), this._prevChartDataFamily !== this._legend.dataFamily()) switch (this._prevChartDataFamily = this._legend.dataFamily(), this._prevChartDataFamily) {
|
|
1625
|
+
case "any":
|
|
1626
|
+
this._toggleLegend.selected(!1), this._legend.visible(!1);
|
|
1627
|
+
break;
|
|
1628
|
+
}
|
|
1629
|
+
if (t.style("box-shadow", this.highlight() ? `inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}` : "none"), this._hideLegendToggleList.indexOf(n.classID()) === -1 ? (this._spacer.visible(!0), this._toggleLegend.visible(!0)) : (this._spacer.visible(!1), this._toggleLegend.visible(!1)), this._prevChart !== n) {
|
|
1630
|
+
this._prevChart = n;
|
|
1631
|
+
let e = n ? n._titleBar || n._iconBar : void 0;
|
|
1632
|
+
if (e && e instanceof i) {
|
|
1633
|
+
this._prevButtons = this._prevButtons || [...this.buttons()];
|
|
1634
|
+
let t = [
|
|
1635
|
+
...e.buttons(),
|
|
1636
|
+
new l(),
|
|
1637
|
+
...this._prevButtons
|
|
1638
|
+
];
|
|
1639
|
+
e.buttons([]).render(), this.buttons(t);
|
|
1640
|
+
} else this._prevButtons && this.buttons(this._prevButtons);
|
|
1641
|
+
}
|
|
1642
|
+
let r = [];
|
|
1643
|
+
this.dataButtonVisible() || r.push(this._toggleData), this.downloadButtonVisible() || r.push(this._buttonDownload), this.downloadImageButtonVisible() || r.push(this._buttonDownloadImage), this.legendButtonVisible() || r.push(this._toggleLegend), this._buttonDownloadImage.enabled(this.widget() instanceof c), this._titleBar.hiddenButtons(r).visible(this.titleVisible()), this.topOverlay(this.titleOverlay() || !this.titleVisible());
|
|
1644
|
+
}
|
|
1645
|
+
postUpdate(e, t) {
|
|
1646
|
+
switch (super.postUpdate(e, t), this.getResponsiveMode()) {
|
|
1647
|
+
case "tiny":
|
|
1648
|
+
this.postUpdateTiny(t);
|
|
1649
|
+
break;
|
|
1650
|
+
case "small":
|
|
1651
|
+
this.postUpdateSmall(t);
|
|
1652
|
+
break;
|
|
1653
|
+
case "regular":
|
|
1654
|
+
this.postUpdateRegular(t);
|
|
1655
|
+
break;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
postUpdateTiny(e) {
|
|
1659
|
+
e.selectAll("div.body,div.title-text,div.icon-bar").style("display", "none"), e.selectAll("div.data-count").style("visibility", "visible").style("font-size", this.titleIconFontSize() / 3 + "px").style("line-height", this.titleIconFontSize() / 3 + "px").style("left", this.titleIconFontSize() + "px").text(this.data().length), e.style("transform", "translate(0px,0px) scale(1)");
|
|
1660
|
+
let t = e.selectAll("div.title-icon"), n = t.node(), r = e.node().parentElement.getBoundingClientRect();
|
|
1661
|
+
if (n) {
|
|
1662
|
+
let n = t.node().getBoundingClientRect(), i = r.height / 2;
|
|
1663
|
+
t.style("position", "absolute").style("left", `calc(50% - ${n.width / 2}px)`).style("top", `${i - n.height / 2}px`), e.selectAll("div.data-count").style("position", "absolute").style("left", `calc(50% + ${n.width / 2}px)`).style("top", `${i - n.height / 2}px`);
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
postUpdateSmall(e) {
|
|
1667
|
+
e.selectAll("lhs").style("display", "none"), e.selectAll("div.title-icon").style("position", "static"), e.selectAll("div.body,div.title-text,div.icon-bar").style("display", ""), e.selectAll("div.data-count").style("visibility", "hidden");
|
|
1668
|
+
let t = e.node().getBoundingClientRect(), n = e.node().parentElement.getBoundingClientRect();
|
|
1669
|
+
e.style("transform", `translate(${n.x - t.x}px, ${n.y - t.y}px) scale(${this._scale})`);
|
|
1670
|
+
}
|
|
1671
|
+
postUpdateRegular(e) {
|
|
1672
|
+
e.selectAll("div.title-icon").style("position", "static"), e.selectAll("div.body,div.title-text,div.icon-bar").style("display", ""), e.selectAll("div.data-count").style("visibility", "hidden");
|
|
1673
|
+
}
|
|
1674
|
+
exit(e, t) {
|
|
1675
|
+
this._progressBar.exit(e, t), this.right(null), this._legend.target(null), this.center(null), this._carousel.target(null), this.top(null), this._titleBar.target(null), this._modal.target(null), delete this._prevChart, delete this._prevButtons, delete this._prevChartDataFamily, delete this._prevPos, delete this._prevdataVisible, delete this._prevlegendVisible, super.exit(e, t);
|
|
1676
|
+
}
|
|
1677
|
+
click(e, t, n) {}
|
|
1678
|
+
dblclick(e, t, n) {}
|
|
1679
|
+
vertex_click(e, t, n, r) {
|
|
1680
|
+
r && r.vertex;
|
|
1681
|
+
}
|
|
1682
|
+
vertex_dblclick(e, t, n, r) {
|
|
1683
|
+
r && r.vertex;
|
|
1684
|
+
}
|
|
1685
|
+
edge_click(e, t, n, r) {
|
|
1686
|
+
r && r.edge;
|
|
1687
|
+
}
|
|
1688
|
+
edge_dblclick(e, t, n, r) {
|
|
1689
|
+
r && r.edge;
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
ChartPanel.prototype._class += " layout_ChartPanel", ChartPanel.prototype.publishReset(), ChartPanel.prototype.publishProxy("title", "_titleBar"), ChartPanel.prototype.publish("titleVisible", !0, "boolean"), ChartPanel.prototype.publish("titleOverlay", !1, "boolean"), ChartPanel.prototype.publishProxy("titleIcon", "_titleBar"), ChartPanel.prototype.publishProxy("titleIconFont", "_titleBar"), ChartPanel.prototype.publishProxy("titleFont", "_titleBar"), ChartPanel.prototype.publishProxy("titleIconFontSize", "_titleBar"), ChartPanel.prototype.publishProxy("titleFontSize", "_titleBar"), ChartPanel.prototype.publishProxy("description", "_titleBar"), ChartPanel.prototype.publishProxy("descriptionFont", "_titleBar"), ChartPanel.prototype.publishProxy("descriptionFontSize", "_titleBar"), ChartPanel.prototype.publish("dataVisible", !1, "boolean", "Show data table"), ChartPanel.prototype.publish("dataButtonVisible", !0, "boolean", "Show data table button"), ChartPanel.prototype.publish("downloadButtonVisible", !0, "boolean", "Show data download button"), ChartPanel.prototype.publish("downloadImageButtonVisible", !1, "boolean", "Show image download button"), ChartPanel.prototype.publish("downloadTitle", "", "string", "File name when downloaded"), ChartPanel.prototype.publish("downloadTimestampSuffix", !0, "boolean", "Use timestamp as file name suffix"), ChartPanel.prototype.publish("legendVisible", !1, "boolean", "Show legend"), ChartPanel.prototype.publish("legendButtonVisible", !0, "boolean", "Show legend button"), ChartPanel.prototype.publish("legendPosition", "right", "set", "Position of legend", ["right", "bottom"]), ChartPanel.prototype.publishProxy("legend_labelMaxWidth", "_legend", "labelMaxWidth"), ChartPanel.prototype.publishProxy("legend_showSeriesTotal", "_legend", "showSeriesTotal"), ChartPanel.prototype.publishProxy("legend_showLegendTotal", "_legend", "showLegendTotal"), ChartPanel.prototype.publishProxy("legend_itemPadding", "_legend", "itemPadding"), ChartPanel.prototype.publishProxy("legend_shapeRadius", "_legend", "shapeRadius"), ChartPanel.prototype.publishProxy("legend_symbolType", "_legend", "symbolType"), ChartPanel.prototype.publishProxy("legend_labelAlign", "_legend", "labelAlign"), ChartPanel.prototype.publish("widget", null, "widget", "Widget", void 0, { render: !1 }), ChartPanel.prototype.publish("enableAutoscaling", !1, "boolean"), ChartPanel.prototype.publish("highlightSize", 4, "number"), ChartPanel.prototype.publish("highlightColor", "#e67e22", "html-color"), ChartPanel.prototype.publishProxy("progress_halfLife", "_progressBar", "halfLife"), ChartPanel.prototype.publishProxy("progress_decay", "_progressBar", "decay"), ChartPanel.prototype.publishProxy("progress_size", "_progressBar", "size"), ChartPanel.prototype.publishProxy("progress_color", "_progressBar", "color"), ChartPanel.prototype.publishProxy("progress_blurBar", "_progressBar", "blurBar"), ChartPanel.prototype.publishProxy("progress_blurSize", "_progressBar", "blurSize"), ChartPanel.prototype.publishProxy("progress_blurColor", "_progressBar", "blurColor"), ChartPanel.prototype.publishProxy("progress_blurOpacity", "_progressBar", "blurOpacity"), ChartPanel.prototype.widget = function(e) {
|
|
1693
|
+
if (!arguments.length) return this._widget;
|
|
1694
|
+
this._carousel.widgets([e, this._table]), this._widget = e, this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());
|
|
1695
|
+
let t = this, n = this._widget;
|
|
1696
|
+
return n.click = function() {
|
|
1697
|
+
t.click.apply(t, arguments);
|
|
1698
|
+
}, n.dblclick = function() {
|
|
1699
|
+
t.dblclick.apply(t, arguments);
|
|
1700
|
+
}, n.vertex_click = function() {
|
|
1701
|
+
t.vertex_click.apply(t, arguments);
|
|
1702
|
+
}, n.vertex_dblclick = function() {
|
|
1703
|
+
t.vertex_dblclick.apply(t, arguments);
|
|
1704
|
+
}, n.edge_click = function() {
|
|
1705
|
+
t.edge_click.apply(t, arguments);
|
|
1706
|
+
}, n.edge_dblclick = function() {
|
|
1707
|
+
t.edge_dblclick.apply(t, arguments);
|
|
1708
|
+
}, this;
|
|
1709
|
+
};
|
|
1710
|
+
//#endregion
|
|
1711
|
+
//#region src/FlexGrid.ts
|
|
1712
|
+
var FlexGrid = class extends r {
|
|
1713
|
+
constructor() {
|
|
1714
|
+
super();
|
|
1715
|
+
}
|
|
1716
|
+
enter(e, t) {
|
|
1717
|
+
super.enter(e, t), C(e.parentNode).style("height", "100%").style("width", "100%");
|
|
1718
|
+
}
|
|
1719
|
+
update(e, t) {
|
|
1720
|
+
super.update(e, t);
|
|
1721
|
+
let n = this, r = [];
|
|
1722
|
+
this.updateFlexParent(t);
|
|
1723
|
+
let i = t.selectAll(".FlexGrid-list-item").data(this.widgets(), (e) => e.id());
|
|
1724
|
+
i.enter().append("div").classed("FlexGrid-list-item", !0).each(function(e) {
|
|
1725
|
+
e.target(this);
|
|
1726
|
+
}).merge(i).style("min-height", this.itemMinHeight() + "px").style("min-width", this.itemMinWidth() + "px").style("flex-basis", (e, t) => {
|
|
1727
|
+
let n = this.widgetsFlexBasis()[t];
|
|
1728
|
+
return n === void 0 ? this.flexBasis() : n;
|
|
1729
|
+
}).style("flex-grow", (e, t) => {
|
|
1730
|
+
let n = this.widgetsFlexGrow()[t];
|
|
1731
|
+
return n === void 0 ? this.flexGrow() : n;
|
|
1732
|
+
}).style("border-width", this.borderWidth() + "px").style("border-color", this.itemBorderColor()).each(function() {
|
|
1733
|
+
this.firstChild.style.display = "none";
|
|
1734
|
+
}).each(function() {
|
|
1735
|
+
let e = this.getBoundingClientRect();
|
|
1736
|
+
r.push([e.width, e.height]);
|
|
1737
|
+
}).each(function(e, t) {
|
|
1738
|
+
this.firstChild.style.display = "block", e.resize({
|
|
1739
|
+
width: r[t][0] - 2 * n.borderWidth(),
|
|
1740
|
+
height: r[t][1] - 2 * n.borderWidth()
|
|
1741
|
+
});
|
|
1742
|
+
}), i.exit().remove();
|
|
1743
|
+
}
|
|
1744
|
+
exit(e, t) {
|
|
1745
|
+
super.exit(e, t);
|
|
1746
|
+
}
|
|
1747
|
+
updateFlexParent(e) {
|
|
1748
|
+
e.style("height", "100%").style("flex-direction", this.orientation() === "horizontal" ? "row" : "column").style("flex-wrap", this.flexWrap()).style("align-items", this.alignItems()).style("align-content", this.alignContent()).style("overflow-x", () => this.forceXScroll() || this.orientation() === "horizontal" && this.flexWrap() === "nowrap" && !this.disableScroll() ? "scroll" : "hidden").style("overflow-y", () => this.forceYScroll() || this.orientation() === "vertical" && this.flexWrap() === "nowrap" && !this.disableScroll() ? "scroll" : "hidden");
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
FlexGrid.prototype._class += " layout_FlexGrid", FlexGrid.prototype.publish("itemBorderColor", "transparent", "html-color", "Color of list item borders"), FlexGrid.prototype.publish("borderWidth", 0, "number", "Width of list item borders (pixels)"), FlexGrid.prototype.publish("orientation", "horizontal", "set", "Controls the flex-direction of the list items", ["horizontal", "vertical"]), FlexGrid.prototype.publish("flexWrap", "wrap", "set", "Controls the line wrap when overflow occurs", [
|
|
1752
|
+
"nowrap",
|
|
1753
|
+
"wrap",
|
|
1754
|
+
"wrap-reverse"
|
|
1755
|
+
]), FlexGrid.prototype.publish("disableScroll", !1, "boolean", "If false, scrollbar will show (when flexWrap is set to 'nowrap')", null, { disable: (e) => e.flexWrap() !== "nowrap" }), FlexGrid.prototype.publish("forceXScroll", !1, "boolean", "If true, horzontal scrollbar will show"), FlexGrid.prototype.publish("forceYScroll", !1, "boolean", "If true, vertical scrollbar will show"), FlexGrid.prototype.publish("itemMinHeight", 64, "number", "Minimum height of a list item (pixels)"), FlexGrid.prototype.publish("itemMinWidth", 64, "number", "Minimum width of a list item (pixels)"), FlexGrid.prototype.publish("alignItems", "stretch", "set", "Controls normal alignment of items", [
|
|
1756
|
+
"flex-start",
|
|
1757
|
+
"center",
|
|
1758
|
+
"flex-end",
|
|
1759
|
+
"stretch"
|
|
1760
|
+
]), FlexGrid.prototype.publish("alignContent", "stretch", "set", "Controls normal alignment of item rows", [
|
|
1761
|
+
"flex-start",
|
|
1762
|
+
"center",
|
|
1763
|
+
"flex-end",
|
|
1764
|
+
"stretch",
|
|
1765
|
+
"space-between",
|
|
1766
|
+
"space-around"
|
|
1767
|
+
]), FlexGrid.prototype.publish("flexGrow", 1, "number", "Default flex-grow style for all list items"), FlexGrid.prototype.publish("flexBasis", "10%", "string", "Default flex-basis style for all list items"), FlexGrid.prototype.publish("widgetsFlexGrow", [], "array", "Array of flex-grow values keyed on the widgets array"), FlexGrid.prototype.publish("widgetsFlexBasis", [], "array", "Array of flex-basis values keyed on the widgets array"), FlexGrid.prototype.publish("widgets", [], "widgetArray", "Array of widgets to be rendered as list items");
|
|
1768
|
+
//#endregion
|
|
1769
|
+
//#region src/Grid.css
|
|
1770
|
+
var $ = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
1771
|
+
(function(n, r) {
|
|
1772
|
+
typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? t.exports = r() : n.GridList = r();
|
|
1773
|
+
})(e, function() {
|
|
1774
|
+
var GridList = function(e, t) {
|
|
1775
|
+
for (var n in this._options = t, this.defaults) this._options.hasOwnProperty(n) || (this._options[n] = this.defaults[n]);
|
|
1776
|
+
this.items = e, this._adjustSizeOfItems(), this.generateGrid();
|
|
1777
|
+
};
|
|
1778
|
+
GridList.cloneItems = function(e, t) {
|
|
1779
|
+
var n, r;
|
|
1780
|
+
for (t === void 0 && (t = []), n = 0; n < e.length; n++) for (r in t[n] || (t[n] = {}), e[n]) t[n][r] = e[n][r];
|
|
1781
|
+
return t;
|
|
1782
|
+
}, GridList.prototype = {
|
|
1783
|
+
defaults: {
|
|
1784
|
+
lanes: 5,
|
|
1785
|
+
direction: "horizontal"
|
|
1786
|
+
},
|
|
1787
|
+
toString: function() {
|
|
1788
|
+
var e = this.grid.length, t = "\n #|", n = "\n --", r, i, a;
|
|
1789
|
+
for (i = 0; i < e; i++) t += " " + this._padNumber(i, " "), n += "---";
|
|
1790
|
+
for (t += n, i = 0; i < this._options.lanes; i++) for (t += "\n" + this._padNumber(i, " ") + "|", a = 0; a < e; a++) t += " ", r = this.grid[a][i], t += r ? this._padNumber(this.items.indexOf(r), "0") : "--";
|
|
1791
|
+
return t += "\n", t;
|
|
1792
|
+
},
|
|
1793
|
+
generateGrid: function() {
|
|
1794
|
+
var e;
|
|
1795
|
+
for (this._resetGrid(), e = 0; e < this.items.length; e++) this._markItemPositionToGrid(this.items[e]);
|
|
1796
|
+
},
|
|
1797
|
+
resizeGrid: function(e) {
|
|
1798
|
+
var t = 0;
|
|
1799
|
+
this._options.lanes = e, this._adjustSizeOfItems(), this._sortItemsByPosition(), this._resetGrid();
|
|
1800
|
+
for (var n = 0; n < this.items.length; n++) {
|
|
1801
|
+
var r = this.items[n], i = this._getItemPosition(r);
|
|
1802
|
+
this._updateItemPosition(r, this.findPositionForItem(r, {
|
|
1803
|
+
x: t,
|
|
1804
|
+
y: 0
|
|
1805
|
+
})), t = Math.max(t, i.x);
|
|
1806
|
+
}
|
|
1807
|
+
this._pullItemsToLeft();
|
|
1808
|
+
},
|
|
1809
|
+
findPositionForItem: function(e, t, n) {
|
|
1810
|
+
var r, i, a;
|
|
1811
|
+
for (r = t.x; r < this.grid.length; r++) if (n !== void 0) {
|
|
1812
|
+
if (a = [r, n], this._itemFitsAtPosition(e, a)) return a;
|
|
1813
|
+
} else for (i = t.y; i < this._options.lanes; i++) if (a = [r, i], this._itemFitsAtPosition(e, a)) return a;
|
|
1814
|
+
var o = this.grid.length, s = 0;
|
|
1815
|
+
return n !== void 0 && this._itemFitsAtPosition(e, [o, n]) && (s = n), [o, s];
|
|
1816
|
+
},
|
|
1817
|
+
moveItemToPosition: function(e, t) {
|
|
1818
|
+
var n = this._getItemPosition({
|
|
1819
|
+
x: t[0],
|
|
1820
|
+
y: t[1],
|
|
1821
|
+
w: e.w,
|
|
1822
|
+
h: e.h
|
|
1823
|
+
});
|
|
1824
|
+
this._updateItemPosition(e, [n.x, n.y]), this._resolveCollisions(e);
|
|
1825
|
+
},
|
|
1826
|
+
resizeItem: function(e, t) {
|
|
1827
|
+
var n = t.w || e.w, r = t.h || e.h;
|
|
1828
|
+
this._updateItemSize(e, n, r), this._resolveCollisions(e), this._pullItemsToLeft();
|
|
1829
|
+
},
|
|
1830
|
+
getChangedItems: function(e, t) {
|
|
1831
|
+
for (var n = [], r = 0; r < e.length; r++) {
|
|
1832
|
+
var i = this._getItemByAttribute(t, e[r][t]);
|
|
1833
|
+
(i.x !== e[r].x || i.y !== e[r].y || i.w !== e[r].w || i.h !== e[r].h) && n.push(i);
|
|
1834
|
+
}
|
|
1835
|
+
return n;
|
|
1836
|
+
},
|
|
1837
|
+
_sortItemsByPosition: function() {
|
|
1838
|
+
this.items.sort(function(e, t) {
|
|
1839
|
+
var n = this._getItemPosition(e), r = this._getItemPosition(t);
|
|
1840
|
+
return n.x == r.x ? n.y == r.y ? 0 : n.y - r.y : n.x - r.x;
|
|
1841
|
+
}.bind(this));
|
|
1842
|
+
},
|
|
1843
|
+
_adjustSizeOfItems: function() {
|
|
1844
|
+
for (var e = 0; e < this.items.length; e++) {
|
|
1845
|
+
var t = this.items[e];
|
|
1846
|
+
t.autoSize === void 0 && (t.autoSize = t.w === 0 || t.h === 0), t.autoSize && (this._options.direction === "horizontal" ? t.h = this._options.lanes : t.w = this._options.lanes);
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
_resetGrid: function() {
|
|
1850
|
+
this.grid = [];
|
|
1851
|
+
},
|
|
1852
|
+
_itemFitsAtPosition: function(e, t) {
|
|
1853
|
+
var n = this._getItemPosition(e), r, i;
|
|
1854
|
+
if (t[0] < 0 || t[1] < 0 || t[1] + n.h > this._options.lanes) return !1;
|
|
1855
|
+
for (r = t[0]; r < t[0] + n.w; r++) {
|
|
1856
|
+
var a = this.grid[r];
|
|
1857
|
+
if (a) {
|
|
1858
|
+
for (i = t[1]; i < t[1] + n.h; i++) if (a[i] && a[i] !== e) return !1;
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
return !0;
|
|
1862
|
+
},
|
|
1863
|
+
_updateItemPosition: function(e, t) {
|
|
1864
|
+
e.x !== null && e.y !== null && this._deleteItemPositionFromGrid(e), this._setItemPosition(e, t), this._markItemPositionToGrid(e);
|
|
1865
|
+
},
|
|
1866
|
+
_updateItemSize: function(e, t, n) {
|
|
1867
|
+
e.x !== null && e.y !== null && this._deleteItemPositionFromGrid(e), e.w = t, e.h = n, this._markItemPositionToGrid(e);
|
|
1868
|
+
},
|
|
1869
|
+
_markItemPositionToGrid: function(e) {
|
|
1870
|
+
var t = this._getItemPosition(e), n, r;
|
|
1871
|
+
for (this._ensureColumns(t.x + t.w), n = t.x; n < t.x + t.w; n++) for (r = t.y; r < t.y + t.h; r++) this.grid[n][r] = e;
|
|
1872
|
+
},
|
|
1873
|
+
_deleteItemPositionFromGrid: function(e) {
|
|
1874
|
+
var t = this._getItemPosition(e), n, r;
|
|
1875
|
+
for (n = t.x; n < t.x + t.w; n++) if (this.grid[n]) for (r = t.y; r < t.y + t.h; r++) this.grid[n][r] == e && (this.grid[n][r] = null);
|
|
1876
|
+
},
|
|
1877
|
+
_ensureColumns: function(e) {
|
|
1878
|
+
var t;
|
|
1879
|
+
for (t = 0; t < e; t++) this.grid[t] || this.grid.push(new GridCol(this._options.lanes));
|
|
1880
|
+
},
|
|
1881
|
+
_getItemsCollidingWithItem: function(e) {
|
|
1882
|
+
for (var t = [], n = 0; n < this.items.length; n++) e != this.items[n] && this._itemsAreColliding(e, this.items[n]) && t.push(n);
|
|
1883
|
+
return t;
|
|
1884
|
+
},
|
|
1885
|
+
_itemsAreColliding: function(e, t) {
|
|
1886
|
+
var n = this._getItemPosition(e), r = this._getItemPosition(t);
|
|
1887
|
+
return !(r.x >= n.x + n.w || r.x + r.w <= n.x || r.y >= n.y + n.h || r.y + r.h <= n.y);
|
|
1888
|
+
},
|
|
1889
|
+
_resolveCollisions: function(e) {
|
|
1890
|
+
this._tryToResolveCollisionsLocally(e) || this._pullItemsToLeft(e), this._pullItemsToLeft();
|
|
1891
|
+
},
|
|
1892
|
+
_tryToResolveCollisionsLocally: function(e) {
|
|
1893
|
+
var t = this._getItemsCollidingWithItem(e);
|
|
1894
|
+
if (!t.length) return !0;
|
|
1895
|
+
var n = new GridList([], this._options), r, i, a, o;
|
|
1896
|
+
GridList.cloneItems(this.items, n.items), n.generateGrid();
|
|
1897
|
+
for (var s = 0; s < t.length; s++) {
|
|
1898
|
+
var c = n.items[t[s]], l = this._getItemPosition(c), u = this._getItemPosition(e);
|
|
1899
|
+
if (r = [u.x - l.w, l.y], i = [u.x + u.w, l.y], a = [l.x, u.y - l.h], o = [l.x, u.y + u.h], n._itemFitsAtPosition(c, r)) n._updateItemPosition(c, r);
|
|
1900
|
+
else if (n._itemFitsAtPosition(c, a)) n._updateItemPosition(c, a);
|
|
1901
|
+
else if (n._itemFitsAtPosition(c, o)) n._updateItemPosition(c, o);
|
|
1902
|
+
else if (n._itemFitsAtPosition(c, i)) n._updateItemPosition(c, i);
|
|
1903
|
+
else return !1;
|
|
1904
|
+
}
|
|
1905
|
+
return GridList.cloneItems(n.items, this.items), this.generateGrid(), !0;
|
|
1906
|
+
},
|
|
1907
|
+
_pullItemsToLeft: function(e) {
|
|
1908
|
+
if (this._sortItemsByPosition(), this._resetGrid(), e) {
|
|
1909
|
+
var t = this._getItemPosition(e);
|
|
1910
|
+
this._updateItemPosition(e, [t.x, t.y]);
|
|
1911
|
+
}
|
|
1912
|
+
for (var n = 0; n < this.items.length; n++) {
|
|
1913
|
+
var r = this.items[n], i = this._getItemPosition(r);
|
|
1914
|
+
if (!(e && r == e)) {
|
|
1915
|
+
var a = this._findLeftMostPositionForItem(r), o = this.findPositionForItem(r, {
|
|
1916
|
+
x: a,
|
|
1917
|
+
y: 0
|
|
1918
|
+
}, i.y);
|
|
1919
|
+
this._updateItemPosition(r, o);
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
_findLeftMostPositionForItem: function(e) {
|
|
1924
|
+
for (var t = 0, n = this._getItemPosition(e), r = 0; r < this.grid.length; r++) for (var i = n.y; i < n.y + n.h; i++) {
|
|
1925
|
+
var a = this.grid[r][i];
|
|
1926
|
+
if (a) {
|
|
1927
|
+
var o = this._getItemPosition(a);
|
|
1928
|
+
this.items.indexOf(a) < this.items.indexOf(e) && (t = o.x + o.w);
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
return t;
|
|
1932
|
+
},
|
|
1933
|
+
_getItemByAttribute: function(e, t) {
|
|
1934
|
+
for (var n = 0; n < this.items.length; n++) if (this.items[n][e] === t) return this.items[n];
|
|
1935
|
+
return null;
|
|
1936
|
+
},
|
|
1937
|
+
_padNumber: function(e, t) {
|
|
1938
|
+
return e >= 10 ? e : t + e;
|
|
1939
|
+
},
|
|
1940
|
+
_getItemPosition: function(e) {
|
|
1941
|
+
return this._options.direction === "horizontal" ? e : {
|
|
1942
|
+
x: e.y,
|
|
1943
|
+
y: e.x,
|
|
1944
|
+
w: e.h,
|
|
1945
|
+
h: e.w
|
|
1946
|
+
};
|
|
1947
|
+
},
|
|
1948
|
+
_setItemPosition: function(e, t) {
|
|
1949
|
+
this._options.direction === "horizontal" ? (e.x = t[0], e.y = t[1]) : (e.x = t[1], e.y = t[0]);
|
|
1950
|
+
}
|
|
1951
|
+
};
|
|
1952
|
+
var GridCol = function(e) {
|
|
1953
|
+
for (var t = 0; t < e; t++) this.push(null);
|
|
1954
|
+
};
|
|
1955
|
+
return GridCol.prototype = [], GridList;
|
|
1956
|
+
});
|
|
1957
|
+
})))(), 1), be = $ && $.default || $, Grid = class extends r {
|
|
1958
|
+
divItems;
|
|
1959
|
+
gridList;
|
|
1960
|
+
items;
|
|
1961
|
+
itemsMap;
|
|
1962
|
+
origItems;
|
|
1963
|
+
cellWidth;
|
|
1964
|
+
cellHeight;
|
|
1965
|
+
dragItem;
|
|
1966
|
+
dragItemPos;
|
|
1967
|
+
_d3Drag;
|
|
1968
|
+
_d3DragResize;
|
|
1969
|
+
_selectionBag;
|
|
1970
|
+
_scrollBarWidth;
|
|
1971
|
+
constructor() {
|
|
1972
|
+
super(), this._tag = "div", this._selectionBag = new p.Selection(this), this.content([]);
|
|
1973
|
+
}
|
|
1974
|
+
getDimensions() {
|
|
1975
|
+
let e = {
|
|
1976
|
+
width: 0,
|
|
1977
|
+
height: 0
|
|
1978
|
+
};
|
|
1979
|
+
return this.content().forEach(function(t) {
|
|
1980
|
+
e.width < t.gridCol() + t.gridColSpan() && (e.width = t.gridCol() + t.gridColSpan()), e.height < t.gridRow() + t.gridRowSpan() && (e.height = t.gridRow() + t.gridRowSpan());
|
|
1981
|
+
}, this), e;
|
|
1982
|
+
}
|
|
1983
|
+
clearContent(e) {
|
|
1984
|
+
this.content(this.content().filter(function(t) {
|
|
1985
|
+
if (!e) return t.target(null), !1;
|
|
1986
|
+
let n = t;
|
|
1987
|
+
for (; n;) {
|
|
1988
|
+
if (e === n) return t.target(null), !1;
|
|
1989
|
+
n = n.widget ? n.widget() : null;
|
|
1990
|
+
}
|
|
1991
|
+
return !0;
|
|
1992
|
+
}));
|
|
1993
|
+
}
|
|
1994
|
+
setContent(e, t, n, r, i, a) {
|
|
1995
|
+
if (i ||= 1, a ||= 1, r ||= "", this.content(this.content().filter(function(n) {
|
|
1996
|
+
return n.gridRow() === e && n.gridCol() === t ? (n.target(null), !1) : !0;
|
|
1997
|
+
})), n) {
|
|
1998
|
+
let o = new Cell().gridRow(e).gridCol(t).widget(n).title(r).gridRowSpan(i).gridColSpan(a);
|
|
1999
|
+
this.content().push(o);
|
|
2000
|
+
}
|
|
2001
|
+
return this;
|
|
2002
|
+
}
|
|
2003
|
+
sortedContent() {
|
|
2004
|
+
return this.content().sort(function(e, t) {
|
|
2005
|
+
return e.gridRow() === t.gridRow() ? e.gridCol() - t.gridCol() : e.gridRow() - t.gridRow();
|
|
2006
|
+
});
|
|
2007
|
+
}
|
|
2008
|
+
getCell(e, t) {
|
|
2009
|
+
let n = null;
|
|
2010
|
+
return this.content().some(function(r) {
|
|
2011
|
+
return e >= r.gridRow() && e < r.gridRow() + r.gridRowSpan() && t >= r.gridCol() && t < r.gridCol() + r.gridColSpan() ? (n = r, !0) : !1;
|
|
2012
|
+
}), n;
|
|
2013
|
+
}
|
|
2014
|
+
getWidgetCell(e) {
|
|
2015
|
+
let t = null;
|
|
2016
|
+
return this.content().some(function(n) {
|
|
2017
|
+
return n.widget().id() === e ? (t = n, !0) : !1;
|
|
2018
|
+
}), t;
|
|
2019
|
+
}
|
|
2020
|
+
getContent(e) {
|
|
2021
|
+
let t = null;
|
|
2022
|
+
return this.content().some(function(n) {
|
|
2023
|
+
return n.widget().id() === e ? (t = n.widget(), !0) : !1;
|
|
2024
|
+
}), t;
|
|
2025
|
+
}
|
|
2026
|
+
cellToGridItem(e) {
|
|
2027
|
+
return {
|
|
2028
|
+
x: e.gridCol(),
|
|
2029
|
+
y: e.gridRow(),
|
|
2030
|
+
w: e.gridColSpan(),
|
|
2031
|
+
h: e.gridRowSpan(),
|
|
2032
|
+
id: e.id(),
|
|
2033
|
+
cell: e
|
|
2034
|
+
};
|
|
2035
|
+
}
|
|
2036
|
+
gridItemToCell(e) {
|
|
2037
|
+
e.cell.gridCol(e.x).gridRow(e.y).gridColSpan(e.w).gridRowSpan(e.h);
|
|
2038
|
+
}
|
|
2039
|
+
resetItemsPos() {
|
|
2040
|
+
this.origItems.forEach(function(e) {
|
|
2041
|
+
let t = this.itemsMap[e.id];
|
|
2042
|
+
t.x = e.x, t.y = e.y;
|
|
2043
|
+
}, this);
|
|
2044
|
+
}
|
|
2045
|
+
initGridList() {
|
|
2046
|
+
this.itemsMap = {}, this.items = this.content().map(function(e) {
|
|
2047
|
+
let t = this.cellToGridItem(e);
|
|
2048
|
+
return this.itemsMap[t.id] = t, t;
|
|
2049
|
+
}, this), this.origItems = this.content().map(this.cellToGridItem), this.gridList = new be(this.items, {
|
|
2050
|
+
direction: this.snapping(),
|
|
2051
|
+
lanes: this.snapping() === "horizontal" ? this.snappingRows() : this.snappingColumns()
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
killGridList() {
|
|
2055
|
+
this.gridList = null, delete this.items, delete this.itemsMap;
|
|
2056
|
+
}
|
|
2057
|
+
enter(e, t) {
|
|
2058
|
+
super.enter(e, t), this._scrollBarWidth = o.getScrollbarWidth();
|
|
2059
|
+
let n = this;
|
|
2060
|
+
this._d3Drag = g().subject(function(e) {
|
|
2061
|
+
let t = n.cellToGridItem(e);
|
|
2062
|
+
return {
|
|
2063
|
+
x: t.x * n.cellWidth,
|
|
2064
|
+
y: t.y * n.cellHeight
|
|
2065
|
+
};
|
|
2066
|
+
}).on("start", function(e) {
|
|
2067
|
+
if (!n.designMode()) return;
|
|
2068
|
+
m().sourceEvent.stopPropagation(), n.initGridList();
|
|
2069
|
+
let r = n.itemsMap[e.id()];
|
|
2070
|
+
n.dragItem = t.append("div").attr("class", "dragging").style("transform", function() {
|
|
2071
|
+
return "translate(" + r.x * n.cellWidth + "px, " + r.y * n.cellHeight + "px)";
|
|
2072
|
+
}).style("width", function() {
|
|
2073
|
+
return r.w * n.cellWidth - n.gutter() + "px";
|
|
2074
|
+
}).style("height", function() {
|
|
2075
|
+
return r.h * n.cellHeight - n.gutter() + "px";
|
|
2076
|
+
}), n.selectionBagClick(e);
|
|
2077
|
+
}).on("drag", function(e) {
|
|
2078
|
+
if (!n.designMode()) return;
|
|
2079
|
+
let t = m();
|
|
2080
|
+
t.sourceEvent.stopPropagation();
|
|
2081
|
+
let r = n.itemsMap[e.id()];
|
|
2082
|
+
t.x < 0 && (t.x = 0), t.x + r.w * n.cellWidth > n.snappingColumns() * n.cellWidth && (t.x = n.snappingColumns() * n.cellWidth - r.w * n.cellWidth), t.y < 0 && (t.y = 0), t.y + r.h * n.cellWidth > n.snappingRows() * n.cellWidth && (t.y = n.snappingRows() * n.cellWidth - r.h * n.cellWidth);
|
|
2083
|
+
let i = [Math.max(0, Math.floor((t.x + n.cellWidth / 2) / n.cellWidth)), Math.max(0, Math.floor((t.y + n.cellHeight / 2) / n.cellHeight))];
|
|
2084
|
+
(r.x !== i[0] || r.y !== i[1]) && (n.snapping() === "none" ? (r.x = i[0], r.y = i[1]) : (n.resetItemsPos(), n.gridList.moveItemToPosition(r, i)), (e.gridCol() !== r.x || e.gridRow() !== r.y) && (n.items.forEach(n.gridItemToCell), n.updateGrid(!1, 100))), n.dragItem.style("transform", function() {
|
|
2085
|
+
return "translate(" + t.x + "px, " + t.y + "px)";
|
|
2086
|
+
}).style("width", function() {
|
|
2087
|
+
return r.w * n.cellWidth + "px";
|
|
2088
|
+
}).style("height", function() {
|
|
2089
|
+
return r.h * n.cellHeight + "px";
|
|
2090
|
+
});
|
|
2091
|
+
}).on("end", function() {
|
|
2092
|
+
n.designMode() && (m().sourceEvent.stopPropagation(), n.dragItem.remove(), n.dragItem = null, n.killGridList());
|
|
2093
|
+
}), this._d3DragResize = g().subject(function(e) {
|
|
2094
|
+
let t = n.cellToGridItem(e);
|
|
2095
|
+
return {
|
|
2096
|
+
x: (t.x + t.w - 1) * n.cellWidth,
|
|
2097
|
+
y: (t.y + t.h - 1) * n.cellHeight
|
|
2098
|
+
};
|
|
2099
|
+
}).on("start", function(e) {
|
|
2100
|
+
if (!n.designMode()) return;
|
|
2101
|
+
m().sourceEvent.stopPropagation(), n.initGridList();
|
|
2102
|
+
let r = n.itemsMap[e.id()];
|
|
2103
|
+
n.dragItem = t.append("div").attr("class", "resizing").style("transform", function() {
|
|
2104
|
+
return "translate(" + r.x * n.cellWidth + "px, " + r.y * n.cellHeight + "px)";
|
|
2105
|
+
}).style("width", function() {
|
|
2106
|
+
return r.w * n.cellWidth - n.gutter() + "px";
|
|
2107
|
+
}).style("height", function() {
|
|
2108
|
+
return r.h * n.cellHeight - n.gutter() + "px";
|
|
2109
|
+
}), n.dragItemPos = {
|
|
2110
|
+
x: r.x,
|
|
2111
|
+
y: r.y
|
|
2112
|
+
};
|
|
2113
|
+
}).on("drag", function(e) {
|
|
2114
|
+
if (!n.designMode()) return;
|
|
2115
|
+
let t = m();
|
|
2116
|
+
t.sourceEvent.stopPropagation();
|
|
2117
|
+
let r = n.itemsMap[e.id()], i = [Math.max(0, Math.round(t.x / n.cellWidth)), Math.max(0, Math.round(t.y / n.cellHeight))], a = {
|
|
2118
|
+
w: Math.max(1, i[0] - r.x + 1),
|
|
2119
|
+
h: Math.max(1, i[1] - r.y + 1)
|
|
2120
|
+
};
|
|
2121
|
+
(r.w !== a.w || r.h !== a.h) && (n.snapping() === "none" ? (r.w = a.w, r.h = a.h) : (n.resetItemsPos(), n.gridList.resizeItem(r, a)), (e.gridColSpan() !== r.w || e.gridRowSpan() !== r.h) && (n.items.forEach(n.gridItemToCell), n.updateGrid(r.id, 100))), n.dragItem.style("width", function() {
|
|
2122
|
+
return (-r.x + 1) * n.cellWidth + t.x - n.gutter() + "px";
|
|
2123
|
+
}).style("height", function() {
|
|
2124
|
+
return (-r.y + 1) * n.cellHeight + t.y - n.gutter() + "px";
|
|
2125
|
+
});
|
|
2126
|
+
}).on("end", function() {
|
|
2127
|
+
n.designMode() && (m().sourceEvent.stopPropagation(), n.dragItem.remove(), n.dragItem = null, n.killGridList());
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
updateGrid(e, t = 0, n = !1) {
|
|
2131
|
+
t ||= 0;
|
|
2132
|
+
let r = this;
|
|
2133
|
+
this.divItems.classed("draggable", this.designMode()).transition().duration(t).style("left", function(e) {
|
|
2134
|
+
return e.gridCol() * r.cellWidth + r.gutter() / 2 + "px";
|
|
2135
|
+
}).style("top", function(e) {
|
|
2136
|
+
return e.gridRow() * r.cellHeight + r.gutter() / 2 + "px";
|
|
2137
|
+
}).style("width", function(e) {
|
|
2138
|
+
return e.gridColSpan() * r.cellWidth - r.gutter() + "px";
|
|
2139
|
+
}).style("height", function(e) {
|
|
2140
|
+
return e.gridRowSpan() * r.cellHeight - r.gutter() + "px";
|
|
2141
|
+
}).on("end", function(t) {
|
|
2142
|
+
t.surfaceShadow_default(r.surfaceShadow()).surfacePadding_default(r.surfacePadding()).surfaceBorderWidth_default(r.surfaceBorderWidth()).surfaceBackgroundColor_default(r.surfaceBackgroundColor()), (e === !0 || e === t.id()) && t.resize().lazyRender();
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
update(e, t) {
|
|
2146
|
+
super.update(e, t), this._placeholderElement.style("overflow-x", this.fitTo() === "width" ? "hidden" : null), this._placeholderElement.style("overflow-y", this.fitTo() === "width" ? "scroll" : null);
|
|
2147
|
+
let n = this.getDimensions(), r = this.width() - (this.fitTo() === "width" ? this._scrollBarWidth : 0);
|
|
2148
|
+
if (this.cellWidth = r / n.width, this.cellHeight = this.fitTo() === "all" ? this.height() / n.height : this.cellWidth, this.designMode()) {
|
|
2149
|
+
let e = Math.min(this.width() / this.snappingColumns(), this.height() / this.snappingRows()), t = Math.floor(e);
|
|
2150
|
+
this.cellWidth = t, this.cellHeight = this.cellWidth;
|
|
2151
|
+
}
|
|
2152
|
+
let i = this, a = t.selectAll("#" + this.id() + " > .ddCell").data(this.content(), function(e) {
|
|
2153
|
+
return e.id();
|
|
2154
|
+
});
|
|
2155
|
+
this.divItems = a.enter().append("div").attr("class", "ddCell").each(function(e) {
|
|
2156
|
+
e.target(this), e.__grid_watch = e.monitor(function(t, n, r) {
|
|
2157
|
+
i._renderCount && (t === "snapping" || t.indexOf("grid") === 0) && n !== r && (i.gridList || (i.initGridList(), i.snapping() !== "none" && i.gridList.resizeGrid(i.snapping() === "horizontal" ? i.snappingRows() : i.snappingColumns()), i.items.forEach(i.gridItemToCell), i.updateGrid(e.id(), 100), i.killGridList()));
|
|
2158
|
+
}), C(this).append("div").attr("class", "resizeHandle").call(i._d3DragResize).append("div").attr("class", "resizeHandleDisplay");
|
|
2159
|
+
}).merge(a), this.divItems.each(function(e) {
|
|
2160
|
+
let t = C(this);
|
|
2161
|
+
i.designMode() ? t.call(i._d3Drag) : t.on("mousedown.drag", null).on("touchstart.drag", null);
|
|
2162
|
+
}), this.divItems.select(".resizeHandle").style("display", this.designMode() ? null : "none"), this.updateGrid(!0), a.exit().each(function(e) {
|
|
2163
|
+
e.target(null), e.__grid_watch && e.__grid_watch.remove();
|
|
2164
|
+
}).remove();
|
|
2165
|
+
let o = t.selectAll("#" + this.id() + " > .laneBackground").data(this.designMode() ? [""] : []);
|
|
2166
|
+
o.enter().insert("div", ":first-child").attr("class", "laneBackground").style("left", "1px").style("top", "1px").on("click", function() {
|
|
2167
|
+
i.selectionBagClear();
|
|
2168
|
+
}).merge(o).style("width", this.snappingColumns() * this.cellWidth + "px").style("height", this.snappingRows() * this.cellHeight + "px"), o.exit().each(function() {
|
|
2169
|
+
i.selectionBagClear();
|
|
2170
|
+
}).remove();
|
|
2171
|
+
let s = t.selectAll("#" + this.id() + " > .lane").data(this.designMode() ? [""] : []);
|
|
2172
|
+
s.enter().append("div").attr("class", "lane").style("left", "1px").style("top", "1px"), s.style("display", this.showLanes() ? null : "none").style("width", this.snappingColumns() * this.cellWidth + "px").style("height", this.snappingRows() * this.cellHeight + "px").style("background-image", "linear-gradient(to right, grey 1px, transparent 1px), linear-gradient(to bottom, grey 1px, transparent 1px)").style("background-size", this.cellWidth + "px " + this.cellHeight + "px"), s.exit().remove();
|
|
2173
|
+
}
|
|
2174
|
+
exit(e, t) {
|
|
2175
|
+
this.content().forEach((e) => e.target(null)), super.exit(e, t);
|
|
2176
|
+
}
|
|
2177
|
+
_createSelectionObject(e) {
|
|
2178
|
+
return {
|
|
2179
|
+
_id: e._id,
|
|
2180
|
+
element: () => e._element,
|
|
2181
|
+
widget: e
|
|
2182
|
+
};
|
|
2183
|
+
}
|
|
2184
|
+
selection(e) {
|
|
2185
|
+
return arguments.length ? (this._selectionBag.set(e.map(function(e) {
|
|
2186
|
+
return this._createSelectionObject(e);
|
|
2187
|
+
}, this)), this) : this._selectionBag.get().map(function(e) {
|
|
2188
|
+
return e._id;
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2191
|
+
selectionBagClear() {
|
|
2192
|
+
this._selectionBag.isEmpty() || (this._selectionBag.clear(), this.postSelectionChange());
|
|
2193
|
+
}
|
|
2194
|
+
selectionBagClick(e) {
|
|
2195
|
+
if (e !== null) {
|
|
2196
|
+
let t = this._createSelectionObject(e);
|
|
2197
|
+
if (m().sourceEvent.ctrlKey) this._selectionBag.isSelected(t) ? (this._selectionBag.remove(t), this.postSelectionChange()) : (this._selectionBag.append(t), this.postSelectionChange());
|
|
2198
|
+
else {
|
|
2199
|
+
let e = this._selectionBag.get();
|
|
2200
|
+
e.length === 1 && e[0]._id === t._id ? this.selectionBagClear() : this._selectionBag.set([t]), this.postSelectionChange();
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
postSelectionChange() {}
|
|
2205
|
+
applyLayout(e) {
|
|
2206
|
+
this.divItems.each((t, n) => {
|
|
2207
|
+
if (e[n]) {
|
|
2208
|
+
let [r, i, a, o] = e[n];
|
|
2209
|
+
t.gridCol(r).gridRow(i).gridColSpan(a).gridRowSpan(o);
|
|
2210
|
+
}
|
|
2211
|
+
}), this.updateGrid(!0);
|
|
2212
|
+
}
|
|
2213
|
+
vizActivation(e) {}
|
|
2214
|
+
};
|
|
2215
|
+
Grid.prototype._class += " layout_Grid", Grid.prototype.publish("designMode", !1, "boolean", "Design Mode", null, { tags: ["Basic"] }), Grid.prototype.publish("showLanes", !0, "boolean", "Show snapping lanes when in design mode", null, {
|
|
2216
|
+
tags: ["Basic"],
|
|
2217
|
+
disable: (e) => !e.designMode()
|
|
2218
|
+
}), Grid.prototype.publish("fitTo", "all", "set", "Sizing Strategy", ["all", "width"], { tags: ["Basic"] }), Grid.prototype.publish("snapping", "vertical", "set", "Snapping Strategy", [
|
|
2219
|
+
"vertical",
|
|
2220
|
+
"horizontal",
|
|
2221
|
+
"none"
|
|
2222
|
+
]), Grid.prototype.publish("snappingColumns", 12, "number", "Snapping Columns"), Grid.prototype.publish("snappingRows", 16, "number", "Snapping Rows"), Grid.prototype.publish("gutter", 6, "number", "Gap Between Widgets", null, { tags: ["Basic"] }), Grid.prototype.publish("surfaceShadow", !0, "boolean", "3D Shadow"), Grid.prototype.publish("surfacePadding", null, "string", "Cell Padding (px)", null, { tags: ["Intermediate"] }), Grid.prototype.publish("surfaceBorderWidth", 1, "number", "Width (px) of Cell Border", null, { tags: ["Intermediate"] }), Grid.prototype.publish("surfaceBackgroundColor", null, "html-color", "Surface Background Color", null, { tags: ["Advanced"] }), Grid.prototype.publish("content", [], "widgetArray", "widgets", null, {
|
|
2223
|
+
tags: ["Basic"],
|
|
2224
|
+
render: !1
|
|
2225
|
+
});
|
|
2226
|
+
//#endregion
|
|
2227
|
+
//#region src/HorizontalList.ts
|
|
2228
|
+
var HorizontalList = class extends FlexGrid {
|
|
2229
|
+
constructor() {
|
|
2230
|
+
super(), this.orientation_default("horizontal"), this.flexWrap_default("nowrap");
|
|
2231
|
+
}
|
|
2232
|
+
};
|
|
2233
|
+
HorizontalList.prototype._class += " layout_HorizontalList";
|
|
2234
|
+
//#endregion
|
|
2235
|
+
//#region src/Layered.ts
|
|
2236
|
+
var Layered = class extends r {
|
|
2237
|
+
_contentContainer;
|
|
2238
|
+
_widgetPlacements;
|
|
2239
|
+
_widgetRatios;
|
|
2240
|
+
constructor() {
|
|
2241
|
+
super(), this._tag = "div", this._widgetPlacements = [], this._widgetRatios = [];
|
|
2242
|
+
}
|
|
2243
|
+
addLayer(e, t = "default", n = 1, r = 1) {
|
|
2244
|
+
let i = this.widgets();
|
|
2245
|
+
return i.push(e || new u().text("No widget defined for layer.")), this.widgets(i), this._widgetPlacements.push(t), this._widgetRatios.push([n, r]), this;
|
|
2246
|
+
}
|
|
2247
|
+
enter(e, t) {
|
|
2248
|
+
super.enter(e, t), this._contentContainer = t.append("div").attr("class", "container");
|
|
2249
|
+
}
|
|
2250
|
+
update(e, t) {
|
|
2251
|
+
super.update(e, t);
|
|
2252
|
+
let n = this;
|
|
2253
|
+
t.style("padding", this.surfacePadding() + "px");
|
|
2254
|
+
let r = this._contentContainer.selectAll(".content.id" + this.id()).data(this.widgets(), function(e) {
|
|
2255
|
+
return e.id();
|
|
2256
|
+
});
|
|
2257
|
+
r.enter().append("div").attr("class", "content id" + this.id()).each(function(e, t) {
|
|
2258
|
+
e.target(this);
|
|
2259
|
+
}).merge(r).each(function(e, t) {
|
|
2260
|
+
let r = {
|
|
2261
|
+
width: n.clientWidth(),
|
|
2262
|
+
height: n.clientHeight()
|
|
2263
|
+
}, i = n.widgetSize(t, r), a = n.widgetPosition(t, r, i);
|
|
2264
|
+
this.style.top = a.y + "px", this.style.left = a.x + "px", e.resize(i).render();
|
|
2265
|
+
}), r.exit().each(function(e, t) {
|
|
2266
|
+
e.target(null);
|
|
2267
|
+
}).remove(), r.order();
|
|
2268
|
+
}
|
|
2269
|
+
widgetSize(e, t) {
|
|
2270
|
+
return this._widgetPlacements[e], {
|
|
2271
|
+
width: t.width * this._widgetRatios[e][0],
|
|
2272
|
+
height: t.height * this._widgetRatios[e][1]
|
|
2273
|
+
};
|
|
2274
|
+
}
|
|
2275
|
+
widgetPosition(e, t, n) {
|
|
2276
|
+
switch (this._widgetPlacements[e]) {
|
|
2277
|
+
default: return {
|
|
2278
|
+
x: 0,
|
|
2279
|
+
y: 0
|
|
2280
|
+
};
|
|
2281
|
+
case "top": return {
|
|
2282
|
+
x: t.width / 2 - n.width / 2,
|
|
2283
|
+
y: 0
|
|
2284
|
+
};
|
|
2285
|
+
case "bottom": return {
|
|
2286
|
+
x: t.width / 2 - n.width / 2,
|
|
2287
|
+
y: t.height - n.height
|
|
2288
|
+
};
|
|
2289
|
+
case "left": return {
|
|
2290
|
+
x: 0,
|
|
2291
|
+
y: t.height / 2 - n.height / 2
|
|
2292
|
+
};
|
|
2293
|
+
case "right": return {
|
|
2294
|
+
x: t.width - n.width,
|
|
2295
|
+
y: t.height / 2 - n.height / 2
|
|
2296
|
+
};
|
|
2297
|
+
case "center": return {
|
|
2298
|
+
x: t.width / 2 - n.width / 2,
|
|
2299
|
+
y: t.height / 2 - n.height / 2
|
|
2300
|
+
};
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
};
|
|
2304
|
+
Layered.prototype._class += " layout_Layered", Layered.prototype.publish("surfacePadding", 0, "number", "Padding"), Layered.prototype.publish("widgets", [], "widgetArray", "widgets", null, { tags: ["Private"] });
|
|
2305
|
+
//#endregion
|
|
2306
|
+
//#region src/Popup.ts
|
|
2307
|
+
var Popup = class extends r {
|
|
2308
|
+
_surfaceButtons;
|
|
2309
|
+
_originalPosition;
|
|
2310
|
+
constructor() {
|
|
2311
|
+
super(), this._tag = "div", this._surfaceButtons = [];
|
|
2312
|
+
}
|
|
2313
|
+
updateState(e) {
|
|
2314
|
+
e ||= !this.popupState(), this.popupState(e).render();
|
|
2315
|
+
}
|
|
2316
|
+
enter(e, t) {
|
|
2317
|
+
super.enter(e, t), this.widget().target(e), this._originalPosition = this.position();
|
|
2318
|
+
}
|
|
2319
|
+
update(e, t) {
|
|
2320
|
+
super.update(e, t), t.style("visibility", this.popupState() ? null : "hidden").style("opacity", this.popupState() ? null : 0).style("width", this.shrinkWrap() ? this.widget().width() + "px" : this._size.width + "px").style("height", this.shrinkWrap() ? this.widget().height() + "px" : this._size.height + "px"), this.widget().size().height === 0 && this.widget().resize(this.size());
|
|
2321
|
+
}
|
|
2322
|
+
postUpdate(e, t) {
|
|
2323
|
+
let n, r;
|
|
2324
|
+
switch (this.centerPopup()) {
|
|
2325
|
+
case "container":
|
|
2326
|
+
this._placeholderElement && (n = parseInt(this._placeholderElement.style("width")) / 2 - this.widget().width() / 2, r = parseInt(this._placeholderElement.style("height")) / 2 - this.widget().height() / 2), this.position("absolute");
|
|
2327
|
+
break;
|
|
2328
|
+
case "window":
|
|
2329
|
+
n = window.innerWidth / 2 - this.widget().width() / 2, r = window.innerHeight / 2 - this.widget().height() / 2, this.position("fixed");
|
|
2330
|
+
break;
|
|
2331
|
+
default:
|
|
2332
|
+
n = 0, r = 0, this.position(this._originalPosition);
|
|
2333
|
+
break;
|
|
2334
|
+
}
|
|
2335
|
+
this.pos({
|
|
2336
|
+
x: n,
|
|
2337
|
+
y: r
|
|
2338
|
+
}), super.postUpdate(e, t), t.style("position", this.position()).style("left", this.left() + "px").style("right", this.right() + "px").style("top", this.top() + "px").style("bottom", this.bottom() + "px");
|
|
2339
|
+
}
|
|
2340
|
+
exit(e, t) {
|
|
2341
|
+
this.widget() && this.widget().target(null), super.exit(e, t);
|
|
2342
|
+
}
|
|
2343
|
+
click(e) {}
|
|
2344
|
+
};
|
|
2345
|
+
Popup.prototype._class += " layout_Popup", Popup.prototype.publish("popupState", !1, "boolean", "State of the popup, visible (true) or hidden (false)", null, {}), Popup.prototype.publish("shrinkWrap", !1, "boolean", "The popup parent container either shrinks to the size of its contents (true) or expands to fit thge popup's parentDiv (false)", null, {}), Popup.prototype.publish("centerPopup", "none", "set", "Center the widget in its container element (target) or in the window", [
|
|
2346
|
+
"none",
|
|
2347
|
+
"container",
|
|
2348
|
+
"window"
|
|
2349
|
+
], {}), Popup.prototype.publish("top", null, "number", "Top position property of popup", null, {}), Popup.prototype.publish("bottom", null, "number", "Bottom position property of popup", null, {}), Popup.prototype.publish("left", null, "number", "Left position property of popup", null, {}), Popup.prototype.publish("right", null, "number", "Right position property of popup", null, {}), Popup.prototype.publish("position", "relative", "set", "Value of the 'position' property", [
|
|
2350
|
+
"absolute",
|
|
2351
|
+
"relative",
|
|
2352
|
+
"fixed",
|
|
2353
|
+
"static",
|
|
2354
|
+
"initial",
|
|
2355
|
+
"inherit"
|
|
2356
|
+
], { tags: ["Private"] }), Popup.prototype.publish("widget", null, "widget", "Widget", null, { tags: ["Private"] });
|
|
2357
|
+
//#endregion
|
|
2358
|
+
//#region src/Tabbed.ts
|
|
2359
|
+
var Tabbed = class extends r {
|
|
2360
|
+
_tabContainer;
|
|
2361
|
+
_contentContainer;
|
|
2362
|
+
constructor() {
|
|
2363
|
+
super(), this._tag = "div";
|
|
2364
|
+
}
|
|
2365
|
+
clearTabs() {
|
|
2366
|
+
return this.labels([]), this.widgets([]), this;
|
|
2367
|
+
}
|
|
2368
|
+
addTab(e, t, n, r) {
|
|
2369
|
+
let i = e.size();
|
|
2370
|
+
i.width === 0 && i.height === 0 && e.size({
|
|
2371
|
+
width: "100%",
|
|
2372
|
+
height: "100%"
|
|
2373
|
+
});
|
|
2374
|
+
let a = this.labels(), o = this.widgets();
|
|
2375
|
+
n && this.activeTabIdx(this.widgets().length), a.push(t);
|
|
2376
|
+
let s = new Surface().widget(e || new u().text("No widget defined for tab"));
|
|
2377
|
+
return o.push(s), this.labels(a), this.widgets(o), r && r(s), this;
|
|
2378
|
+
}
|
|
2379
|
+
widgetSize(e) {
|
|
2380
|
+
let t = this.clientWidth(), n = this.clientHeight(), r = this._tabContainer.node().getBoundingClientRect();
|
|
2381
|
+
return r.height !== void 0 && (n -= r.height), {
|
|
2382
|
+
width: t,
|
|
2383
|
+
height: n
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
enter(e, t) {
|
|
2387
|
+
super.enter(e, t), this._tabContainer = t.append("div"), this._contentContainer = t.append("div");
|
|
2388
|
+
}
|
|
2389
|
+
update(e, t) {
|
|
2390
|
+
super.update(e, t);
|
|
2391
|
+
let n = this;
|
|
2392
|
+
t.style("padding", this.surfacePadding_exists() ? this.surfacePadding() + "px" : null);
|
|
2393
|
+
let r = this._tabContainer.selectAll(".tab-button.id" + this.id()).data(this.showTabs() ? this.labels() : [], function(e) {
|
|
2394
|
+
return e;
|
|
2395
|
+
});
|
|
2396
|
+
r.enter().append("span").attr("class", "tab-button id" + this.id()).style("cursor", "pointer").on("click", function(e, t) {
|
|
2397
|
+
n.click(n.widgets()[t].widget(), e, t), n.activeTabIdx(t).render();
|
|
2398
|
+
}).merge(r).classed("active", function(e, t) {
|
|
2399
|
+
return n.activeTabIdx() === t;
|
|
2400
|
+
}).text(function(e) {
|
|
2401
|
+
return e;
|
|
2402
|
+
}), r.exit().remove();
|
|
2403
|
+
let i = this._contentContainer.selectAll(".tab-content.id" + this.id()).data(this.widgets(), function(e) {
|
|
2404
|
+
return e.id();
|
|
2405
|
+
});
|
|
2406
|
+
switch (i.enter().append("div").attr("class", "tab-content id" + this.id()).each(function(e, t) {
|
|
2407
|
+
e.target(this);
|
|
2408
|
+
}).merge(i).classed("active", function(e, t) {
|
|
2409
|
+
return n.activeTabIdx() === t;
|
|
2410
|
+
}).style("display", function(e, t) {
|
|
2411
|
+
return n.activeTabIdx() === t ? "block" : "none";
|
|
2412
|
+
}).each(function(e, t) {
|
|
2413
|
+
if (e.visible(n.activeTabIdx() === t), n.activeTabIdx() === t) {
|
|
2414
|
+
let t = n.widgetSize(C(this));
|
|
2415
|
+
e.surfaceBorderWidth(n.showTabs() ? null : 0).surfacePadding(n.showTabs() ? null : 0).resize(t);
|
|
2416
|
+
}
|
|
2417
|
+
}), i.exit().each(function(e, t) {
|
|
2418
|
+
e.target(null);
|
|
2419
|
+
}).remove(), this.tabLocation()) {
|
|
2420
|
+
case "bottom":
|
|
2421
|
+
this._tabContainer.attr("class", "on_bottom").style("top", this._contentContainer.node().offsetHeight + this.surfacePadding() + "px").style("position", "absolute"), this._contentContainer.style("top", this.surfacePadding_exists() ? this.surfacePadding() + "px" : null).style("position", "absolute");
|
|
2422
|
+
break;
|
|
2423
|
+
default:
|
|
2424
|
+
this._tabContainer.attr("class", "on_top").style("top", null).style("position", "relative"), this._contentContainer.style("top", this._tabContainer.node().offsetHeight + this.surfacePadding() + "px").style("position", "absolute");
|
|
2425
|
+
break;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
click(e, t, n) {}
|
|
2429
|
+
};
|
|
2430
|
+
Tabbed.prototype._class += " layout_Tabbed", Tabbed.prototype.publish("showTabs", !0, "boolean", "Show Tabs", null, {}), Tabbed.prototype.publish("surfacePadding", 4, "number", "Padding"), Tabbed.prototype.publish("activeTabIdx", 0, "number", "Index of active tab", null, {}), Tabbed.prototype.publish("labels", [], "array", "Array of tab labels sharing an index with ", null, { tags: ["Private"] }), Tabbed.prototype.publish("tabLocation", "top", "set", "Position the tabs at the bottom of the widget", ["top", "bottom"], { tags: ["Private"] }), Tabbed.prototype.publish("widgets", [], "widgetArray", "widgets", null, { tags: ["Private"] });
|
|
2431
|
+
//#endregion
|
|
2432
|
+
//#region src/Toolbar.ts
|
|
2433
|
+
var Toolbar = class extends r {
|
|
2434
|
+
constructor() {
|
|
2435
|
+
super(), this._tag = "div";
|
|
2436
|
+
}
|
|
2437
|
+
enter(e, t) {
|
|
2438
|
+
super.enter(e, t);
|
|
2439
|
+
}
|
|
2440
|
+
update(e, t) {
|
|
2441
|
+
super.update(e, t);
|
|
2442
|
+
let n = this;
|
|
2443
|
+
t.attr("title", n.title()).style("background-color", this.backgroundColor());
|
|
2444
|
+
let r = t.selectAll("div.toolbar-title").data(this.title() ? [this.title()] : []);
|
|
2445
|
+
r.enter().append("div").classed("toolbar-title", !0).append("span"), r.selectAll("div.toolbar-title > span").style("font-size", this.fontSize_exists() ? this.fontSize() + "px" : null).style("color", this.fontColor_exists() ? this.fontColor() : null).style("font-family", this.fontFamily_exists() ? this.fontFamily() : null).style("font-weight", this.fontBold_exists() ? this.fontBold() ? "bold" : "normal" : null).style("background-color", this.backgroundColor_exists() ? this.backgroundColor() : null).text(n.title()), r.exit().remove();
|
|
2446
|
+
let i = t.selectAll("div.toolbar-child").data(this.widgets() === null ? [] : this.widgets(), function(e) {
|
|
2447
|
+
return e.id();
|
|
2448
|
+
});
|
|
2449
|
+
i.enter().insert("div", "div.toolbar-title").each(function(e, t) {
|
|
2450
|
+
let r = n.widgetClasses()[t] ? n.widgetClasses()[t] + " toolbar-child" : "toolbar-child";
|
|
2451
|
+
C(this).classed(r, !0), e.target(this);
|
|
2452
|
+
}), i.exit().each(function(e) {
|
|
2453
|
+
e.target(null);
|
|
2454
|
+
}).remove(), i.order();
|
|
2455
|
+
}
|
|
2456
|
+
render(e) {
|
|
2457
|
+
let t = this;
|
|
2458
|
+
return super.render(function(n) {
|
|
2459
|
+
let r = t.element().node().getBoundingClientRect(), i = r.left + r.width;
|
|
2460
|
+
t.element().selectAll("div.toolbar-child").each(function(e, t) {
|
|
2461
|
+
let n = this.getBoundingClientRect();
|
|
2462
|
+
i > n.left && (i = n.left);
|
|
2463
|
+
}), t.element().select(".toolbar-title").style("width", i - r.left - 4 + "px"), e && e(n);
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
exit(e, t) {
|
|
2467
|
+
this.widgets().forEach(function(e) {
|
|
2468
|
+
e.target(null);
|
|
2469
|
+
}), super.exit(e, t);
|
|
2470
|
+
}
|
|
2471
|
+
};
|
|
2472
|
+
Toolbar.prototype._class += " layout_Toolbar", Toolbar.prototype.publish("title", "", "string", "Title", null, { tags: ["Intermediate"] }), Toolbar.prototype.publish("fontSize", null, "number", "Title Font Size (px)", null, {
|
|
2473
|
+
tags: ["Advanced"],
|
|
2474
|
+
optional: !0
|
|
2475
|
+
}), Toolbar.prototype.publish("fontColor", null, "html-color", "Title Font Color", null, {
|
|
2476
|
+
tags: ["Advanced"],
|
|
2477
|
+
optional: !0
|
|
2478
|
+
}), Toolbar.prototype.publish("fontFamily", null, "string", "Title Font Family", null, {
|
|
2479
|
+
tags: ["Advanced"],
|
|
2480
|
+
optional: !0
|
|
2481
|
+
}), Toolbar.prototype.publish("fontBold", !0, "boolean", "Enable Bold Title Font", null, {
|
|
2482
|
+
tags: ["Advanced"],
|
|
2483
|
+
optional: !0
|
|
2484
|
+
}), Toolbar.prototype.publish("backgroundColor", null, "html-color", "Background Color", null, {
|
|
2485
|
+
tags: ["Intermediate"],
|
|
2486
|
+
optional: !0
|
|
2487
|
+
}), Toolbar.prototype.publish("responsive", !0, "boolean", "Adapts to pixel width", null, { tags: ["Basic"] }), Toolbar.prototype.publish("widgets", [], "widgetArray", "Child widgets of the toolbar", null, { tags: ["Basic"] }), Toolbar.prototype.publish("widgetClasses", [], "array", "Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)", null, { tags: ["Basic"] });
|
|
2488
|
+
//#endregion
|
|
2489
|
+
//#region src/VerticalList.ts
|
|
2490
|
+
var VerticalList = class extends FlexGrid {
|
|
2491
|
+
constructor() {
|
|
2492
|
+
super(), this.orientation_default("vertical"), this.flexWrap_default("nowrap");
|
|
2493
|
+
}
|
|
2494
|
+
};
|
|
2495
|
+
VerticalList.prototype._class += " layout_VerticalList";
|
|
2496
|
+
//#endregion
|
|
2497
|
+
export { AbsoluteSurface, Accordion, ne as BUILD_VERSION, Border, Border2, Carousel, Cell, ChartPanel, FlexGrid, Grid, HorizontalList, Layered, Legend, Modal, N as PKG_NAME, te as PKG_VERSION, Popup, Surface, Tabbed, Toolbar, VerticalList, WidgetDiv };
|
|
2498
|
+
|
|
3
2499
|
//# sourceMappingURL=index.js.map
|
|
4
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.layout_AbsoluteSurface{pointer-events:none!important}.layout_AbsoluteSurface>.placeholder{position:relative;overflow:hidden;pointer-events:all}.layout_Accordion>ul{position:relative}.layout_Accordion.open>span{font-style:italic}.layout_Accordion.closed>ul{height:0px;overflow:hidden}.layout_Accordion.open>ul{display:block}.layout_Accordion>.collapsible-icon,.layout_Accordion>.collapsible-title{cursor:pointer;box-sizing:border-box}.layout_Accordion>.collapsible-title{display:block;width:100%}.layout_Accordion>.collapsible-title{font-size:13px;color:#fff;padding:4px 8px;height:26px;-webkit-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);-moz-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);box-shadow:inset 0 -1px 1px #0003}.layout_Accordion li{background-color:#fff}.layout_Accordion>ul,.layout_Accordion>.collapsible-title{background-color:#333}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>.collapsible-title{background-color:#555}.layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#777}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#999}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#bbb}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ccc}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ddd}.layout_Accordion>ul,.layout_Accordion>span{padding-left:0}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>span{padding-left:12px}.layout_Accordion>.collapsible-title:before{padding:4px 8px;position:absolute;left:0;top:0}.layout_Accordion>.collapsible-icon{position:absolute;top:0;right:0;width:24px;height:24px;color:#fff}.layout_Surface{box-sizing:border-box;margin:0;border:1px solid #e5e5e5;overflow:hidden;height:100%;width:100%}.layout_Surface.shadow2{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0003,0 1px 5px #0000001f}.layout_Surface>h3{margin:0;padding:2px;background-color:#e5e5e5}.layout_Surface .html-button-container{position:absolute;right:0;top:3px}.layout_Surface>div{padding:8px}.layout_Surface .html-button-container .surface-button{margin-right:5px}.layout_Surface .html-button-container .surface-button i{opacity:.8}.layout_Surface .html-button-container .surface-button:hover{opacity:1}.layout_Surface .html-button-container .surface-button:active{opacity:.5}div[draggable=true].hideDragCellContent.content-icon:before{content:"";font-family:FontAwesome;position:absolute;top:calc(50% - 74px);left:calc(50% - 56px);font-size:100px}div[draggable=true].hideDragCellContent.content-icon-Line:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Pie:before{top:calc(50% - 72px);left:calc(50% - 45px);content:""}div[draggable=true].hideDragCellContent.content-icon-Area:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Gauge:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Table:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Form:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Grid:before,div[draggable=true].hideDragCellContent.content-icon-Graph:before,div[draggable=true].hideDragCellContent.content-icon-Border:before,div[draggable=true].hideDragCellContent.content-icon-Tabbed:before,div[draggable=true].hideDragCellContent.content-icon-Accordion:before,div[draggable=true].hideDragCellContent.content-icon-MultiChart:before,div[draggable=true].hideDragCellContent.content-icon-MultiChartSurface:before{content:""}div[draggable=true].hideDragCellContent.content-icon-ChoroplethStates:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethStatesHeat:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCounties:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCountries:before,div[draggable=true].hideDragCellContent.content-icon-GMap:before,div[draggable=true].hideDragCellContent.content-icon-GMapHeat:before,div[draggable=true].hideDragCellContent.content-icon-GMapGraph:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Text:before,div[draggable=true].hideDragCellContent.content-icon-TextBox:before,div[draggable=true].hideDragCellContent.content-icon-FAChar:before{content:""}.layout_Cell .update-indicator{box-sizing:border-box;position:absolute;top:0;left:0;padding:0;z-index:1000;border-width:0px;border-style:solid;pointer-events:none}.layout_Border{width:100%;height:100%}.layout_Border>.border-content{width:100%;height:100%;position:relative}.layout_Border>.borderHandle{width:6px;height:6px;background-color:#444;opacity:.3;position:absolute;visibility:hidden}.layout_Border.design-mode>.borderHandle{visibility:visible}.layout_Border>.borderHandle:hover{background-color:#666}.layout_Border>.borderHandle.borderHandleDisabled{display:none}.layout_Border>.borderHandle_top,.layout_Border>.borderHandle_bottom{cursor:ns-resize}.layout_Border>.borderHandle_left,.layout_Border>.borderHandle_right{cursor:ew-resize}.layout_Border .cell{border-radius:5px;border:1px solid #e5e5e5;display:inline-block;overflow:hidden}.layout_Border .cell h2{margin:0;padding-top:4px;-webkit-margin:0px;text-align:center}.layout_Border .layout_BorderCell.over{border:2px dashed #000}.layout_Border .dragItem{z-index:-1;opacity:.33}.layout_Border .notDragItem{z-index:-1;opacity:1}.layout_Border div[draggable=true]{opacity:.75;cursor:default}.layout_Border div[draggable=true] .dragHandle{opacity:1}.layout_Border div[draggable=true] .dragHandle_n,.layout_Border div[draggable=true] .dragHandle_e,.layout_Border div[draggable=true] .dragHandle_s,.layout_Border div[draggable=true] .dragHandle_w{background-color:#aaa}.layout_Border div[draggable=true] .dragHandle_nw,.layout_Border div[draggable=true] .dragHandle_ne,.layout_Border div[draggable=true] .dragHandle_se,.layout_Border div[draggable=true] .dragHandle_sw{background-color:#333}.layout_Border div[draggable=true] .dragHandle_nw{cursor:nw-resize}.layout_Border div[draggable=true] .dragHandle_n{cursor:n-resize}.layout_Border div[draggable=true] .dragHandle_ne{cursor:ne-resize}.layout_Border div[draggable=true] .dragHandle_e{cursor:e-resize}.layout_Border div[draggable=true] .dragHandle_se{cursor:se-resize}.layout_Border div[draggable=true] .dragHandle_s{cursor:s-resize}.layout_Border div[draggable=true] .dragHandle_sw{cursor:sw-resize}.layout_Border div[draggable=true] .dragHandle_w{cursor:w-resize}.layout_Border div[draggable=false]>div>.dragHandle{display:none}.layout_Border .grid-drop-target{position:fixed;box-sizing:border-box;border:2px dashed #7f8c8d;border-radius:0;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Border .grid-drop-target.drop-target-over{border:2px dashed #179BD7;background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px 12px)}.layout_Border2{display:flex;flex-direction:column}.layout_Border2>.body{margin:0;padding:0;display:flex;flex-flow:row}.layout_Border2>.body>.center{flex:1}.layout_Border2>.header{display:block}.layout_Border2>.footer{display:block}.layout_Carousel>div{position:relative;overflow:hidden}.layout_Carousel>div>.carouselItem{position:absolute}.layout_Modal-header{background-color:#3f51b5;overflow:hidden}.layout_Modal-body{background-color:#fff;overflow-y:scroll;overflow-x:hidden}.layout_Modal-title,.layout_Modal-annotations{position:absolute}.layout_Modal-closeButton{cursor:pointer}.layout_Modal-closeButton:hover{opacity:.7}.layout_Modal-closeButton:active{opacity:.5}.layout_Modal-fade{position:fixed;background-color:#000;opacity:.5;z-index:10000}.layout_Modal-content{position:fixed;background-color:#fff;z-index:10100}.layout_Modal-fade-hidden{display:none}.layout_Modal-fadeClickable{cursor:pointer}.layout_ChartPanel .series.highlight{stroke-width:2px;opacity:1}.layout_ChartPanel .series.lowlight{opacity:.3!important}.layout_FlexGrid{display:flex}.FlexGrid-list-item{overflow:hidden;border-style:solid;flex-grow:1}.layout_Grid>.ddCell{position:absolute}.layout_Grid>.laneBackground{position:absolute;border-style:solid;border-width:1px;background:#f5f5f5}.layout_Grid>.lane{position:absolute;border-style:none;opacity:.25;border-radius:0;pointer-events:none}.layout_Grid>.ddCell.draggable{border-style:solid;border-width:1px;background-color:#f8f8ff;border-radius:0;cursor:move}.layout_Grid>.ddCell.draggable>.resizeHandle{bottom:0;right:0;width:8px;height:8px;border-style:none;position:absolute;cursor:nwse-resize}.layout_Grid>.ddCell.draggable .resizeHandleDisplay{bottom:2px;right:2px;width:4px;height:4px;border-style:solid;border-left-width:0px;border-top-width:0px;border-right-width:2px;border-bottom-width:2px;border-color:#a9a9a9;background-color:none;position:absolute}.layout_Grid>.ddCell.draggable .resizeHandleDisplay:hover{border-color:orange}.layout_Grid>.dragging{border-style:solid;border-width:1px;border-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Grid>.resizing{border-style:solid;border-width:1px;border-color:gray;background-color:orange;border-radius:0;position:absolute;opacity:.3;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,orange 4px 8px)}.layout_Grid>.ddCell.draggable .common_Widget.selected{border-style:solid;border-width:1px;border-color:red;background-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6400001a 4px 8px)}.layout_Grid #drag-me:before{content:"#" attr(id);font-weight:700}.layout_Layered{pointer-events:none}.layout_Layered>.container>.content{position:absolute}.layout_Layered>.container>.content>div>.common_Widget,.layout_Layered>.container>.content>div>svg>.common_Widget{pointer-events:all}.layout_Tabbed .tab-button{position:relative;top:1px;display:inline-block;border-left:1px solid #ddd;border-top:1px solid #ddd;border-right:1px solid #ddd;background-color:transparent;margin-right:4px;padding:2px 2px 4px;background-color:#ccc}.layout_Tabbed .tab-button.active{background-color:#fff;z-index:999}.layout_Tabbed .on_bottom .tab-button{border-bottom:1px solid #ddd;border-top:none;top:-1px}.layout_Toolbar{height:100%;background-color:#ddd;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-title{display:inline-block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);margin-left:4px;font-weight:700;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-child{position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);float:right;margin-left:4px;margin-right:4px;line-height:16px}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2500
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.layout_AbsoluteSurface{pointer-events:none!important}.layout_AbsoluteSurface>.placeholder{pointer-events:all;position:relative;overflow:hidden}.layout_Accordion>ul{position:relative}.layout_Accordion.open>span{font-style:italic}.layout_Accordion.closed>ul{height:0;overflow:hidden}.layout_Accordion.open>ul{display:block}.layout_Accordion>.collapsible-icon,.layout_Accordion>.collapsible-title{cursor:pointer;box-sizing:border-box}.layout_Accordion>.collapsible-title{color:#fff;width:100%;height:26px;padding:4px 8px;font-size:13px;display:block;box-shadow:inset 0 -1px 1px #0003}.layout_Accordion li{background-color:#fff}.layout_Accordion>ul,.layout_Accordion>.collapsible-title{background-color:#333}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>.collapsible-title{background-color:#555}.layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#777}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#999}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#bbb}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ccc}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ddd}.layout_Accordion>ul,.layout_Accordion>span{padding-left:0}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>span{padding-left:12px}.layout_Accordion>.collapsible-title:before{padding:4px 8px;position:absolute;top:0;left:0}.layout_Accordion>.collapsible-icon{color:#fff;width:24px;height:24px;position:absolute;top:0;right:0}.layout_Surface{box-sizing:border-box;border:1px solid #e5e5e5;width:100%;height:100%;margin:0;overflow:hidden}.layout_Surface.shadow2{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0003,0 1px 5px #0000001f}.layout_Surface>h3{background-color:#e5e5e5;margin:0;padding:2px}.layout_Surface .html-button-container{position:absolute;top:3px;right:0}.layout_Surface>div{padding:8px}.layout_Surface .html-button-container .surface-button{margin-right:5px}.layout_Surface .html-button-container .surface-button i{opacity:.8}.layout_Surface .html-button-container .surface-button:hover{opacity:1}.layout_Surface .html-button-container .surface-button:active{opacity:.5}div[draggable=true].hideDragCellContent.content-icon:before{content:"";font-family:FontAwesome;font-size:100px;position:absolute;top:calc(50% - 74px);left:calc(50% - 56px)}div[draggable=true].hideDragCellContent.content-icon-Line:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Pie:before{content:"";top:calc(50% - 72px);left:calc(50% - 45px)}div[draggable=true].hideDragCellContent.content-icon-Area:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Gauge:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Table:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Form:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Grid:before,div[draggable=true].hideDragCellContent.content-icon-Graph:before,div[draggable=true].hideDragCellContent.content-icon-Border:before,div[draggable=true].hideDragCellContent.content-icon-Tabbed:before,div[draggable=true].hideDragCellContent.content-icon-Accordion:before,div[draggable=true].hideDragCellContent.content-icon-MultiChart:before,div[draggable=true].hideDragCellContent.content-icon-MultiChartSurface:before{content:""}div[draggable=true].hideDragCellContent.content-icon-ChoroplethStates:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethStatesHeat:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCounties:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCountries:before,div[draggable=true].hideDragCellContent.content-icon-GMap:before,div[draggable=true].hideDragCellContent.content-icon-GMapHeat:before,div[draggable=true].hideDragCellContent.content-icon-GMapGraph:before,div[draggable=true].hideDragCellContent.content-icon-Text:before,div[draggable=true].hideDragCellContent.content-icon-TextBox:before,div[draggable=true].hideDragCellContent.content-icon-FAChar:before{content:""}.layout_Cell .update-indicator{box-sizing:border-box;z-index:1000;pointer-events:none;border-style:solid;border-width:0;padding:0;position:absolute;top:0;left:0}.layout_Border{width:100%;height:100%}.layout_Border>.border-content{width:100%;height:100%;position:relative}.layout_Border>.borderHandle{opacity:.3;visibility:hidden;background-color:#444;width:6px;height:6px;position:absolute}.layout_Border.design-mode>.borderHandle{visibility:visible}.layout_Border>.borderHandle:hover{background-color:#666}.layout_Border>.borderHandle.borderHandleDisabled{display:none}.layout_Border>.borderHandle_top,.layout_Border>.borderHandle_bottom{cursor:ns-resize}.layout_Border>.borderHandle_left,.layout_Border>.borderHandle_right{cursor:ew-resize}.layout_Border .cell{border:1px solid #e5e5e5;border-radius:5px;display:inline-block;overflow:hidden}.layout_Border .cell h2{-webkit-margin:0px;text-align:center;margin:0;padding-top:4px}.layout_Border .layout_BorderCell.over{border:2px dashed #000}.layout_Border .dragItem{z-index:-1;opacity:.33}.layout_Border .notDragItem{z-index:-1;opacity:1}.layout_Border div[draggable=true]{opacity:.75;cursor:default}.layout_Border div[draggable=true] .dragHandle{opacity:1}.layout_Border div[draggable=true] .dragHandle_n,.layout_Border div[draggable=true] .dragHandle_e,.layout_Border div[draggable=true] .dragHandle_s,.layout_Border div[draggable=true] .dragHandle_w{background-color:#aaa}.layout_Border div[draggable=true] .dragHandle_nw,.layout_Border div[draggable=true] .dragHandle_ne,.layout_Border div[draggable=true] .dragHandle_se,.layout_Border div[draggable=true] .dragHandle_sw{background-color:#333}.layout_Border div[draggable=true] .dragHandle_nw{cursor:nw-resize}.layout_Border div[draggable=true] .dragHandle_n{cursor:n-resize}.layout_Border div[draggable=true] .dragHandle_ne{cursor:ne-resize}.layout_Border div[draggable=true] .dragHandle_e{cursor:e-resize}.layout_Border div[draggable=true] .dragHandle_se{cursor:se-resize}.layout_Border div[draggable=true] .dragHandle_s{cursor:s-resize}.layout_Border div[draggable=true] .dragHandle_sw{cursor:sw-resize}.layout_Border div[draggable=true] .dragHandle_w{cursor:w-resize}.layout_Border div[draggable=false]>div>.dragHandle{display:none}.layout_Border .grid-drop-target{box-sizing:border-box;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px);border:2px dashed #7f8c8d;border-radius:0;position:fixed}.layout_Border .grid-drop-target.drop-target-over{background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px 12px);border:2px dashed #179bd7}.layout_Border2{flex-direction:column;display:flex}.layout_Border2>.body{flex-flow:row;margin:0;padding:0;display:flex}.layout_Border2>.body>.center{flex:1}.layout_Border2>.header,.layout_Border2>.footer{display:block}.layout_Carousel>div{position:relative;overflow:hidden}.layout_Carousel>div>.carouselItem{position:absolute}.layout_Modal-header{background-color:#3f51b5;overflow:hidden}.layout_Modal-body{background-color:#fff;overflow:hidden scroll}.layout_Modal-title,.layout_Modal-annotations{position:absolute}.layout_Modal-closeButton{cursor:pointer}.layout_Modal-closeButton:hover{opacity:.7}.layout_Modal-closeButton:active{opacity:.5}.layout_Modal-fade{opacity:.5;z-index:10000;background-color:#000;position:fixed}.layout_Modal-content{z-index:10100;background-color:#fff;position:fixed}.layout_Modal-fade-hidden{display:none}.layout_Modal-fadeClickable{cursor:pointer}.layout_ChartPanel .series.highlight{stroke-width:2px;opacity:1}.layout_ChartPanel .series.lowlight{opacity:.3!important}.layout_FlexGrid{display:flex}.FlexGrid-list-item{border-style:solid;flex-grow:1;overflow:hidden}.layout_Grid>.ddCell{position:absolute}.layout_Grid>.laneBackground{background:#f5f5f5;border-style:solid;border-width:1px;position:absolute}.layout_Grid>.lane{opacity:.25;pointer-events:none;border-style:none;border-radius:0;position:absolute}.layout_Grid>.ddCell.draggable{cursor:move;background-color:#f8f8ff;border-style:solid;border-width:1px;border-radius:0}.layout_Grid>.ddCell.draggable>.resizeHandle{cursor:nwse-resize;border-style:none;width:8px;height:8px;position:absolute;bottom:0;right:0}.layout_Grid>.ddCell.draggable .resizeHandleDisplay{background-color:none;border:2px solid #a9a9a9;border-width:0 2px 2px 0;width:4px;height:4px;position:absolute;bottom:2px;right:2px}.layout_Grid>.ddCell.draggable .resizeHandleDisplay:hover{border-color:orange}.layout_Grid>.dragging{background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px);border:1px solid gray;border-radius:0;position:absolute}.layout_Grid>.resizing{opacity:.3;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,orange 4px 8px);border:1px solid gray;border-radius:0;position:absolute}.layout_Grid>.ddCell.draggable .common_Widget.selected{background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6400001a 4px 8px);border:1px solid red;border-radius:0;position:absolute}.layout_Grid #drag-me:before{content:"#" attr(id);font-weight:700}.layout_Layered{pointer-events:none}.layout_Layered>.container>.content{position:absolute}.layout_Layered>.container>.content>div>.common_Widget,.layout_Layered>.container>.content>div>svg>.common_Widget{pointer-events:all}.layout_Tabbed .tab-button{background-color:#ccc;border-top:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;margin-right:4px;padding:2px 2px 4px;display:inline-block;position:relative;top:1px}.layout_Tabbed .tab-button.active{z-index:999;background-color:#fff}.layout_Tabbed .on_bottom .tab-button{border-top:none;border-bottom:1px solid #ddd;top:-1px}.layout_Toolbar{white-space:nowrap;background-color:#ddd;height:100%;overflow:hidden}.layout_Toolbar .toolbar-title{text-overflow:ellipsis;white-space:nowrap;margin-left:4px;font-weight:700;display:inline-block;position:relative;top:50%;overflow:hidden;transform:translateY(-50%)}.layout_Toolbar .toolbar-child{float:right;margin-left:4px;margin-right:4px;line-height:16px;position:relative;top:50%;transform:translateY(-50%)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|