Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

11 lines
3.9 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("require exports ../../../chunks/tslib.es6 ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../Widget ../css ../../../chunks/componentsUtils ../../support/UnitSelect ../../support/widgetUtils ../../support/jsxFactory".split(" "),function(g,c,d,n,e,w,x,y,q,r,h,t,u,z,f){c.SettingsButton=class extends r{constructor(){super(...arguments);this._popover=
this.messages=null;this._popoverIsOpen=!1;this._onPopoverAfterCreate=a=>{this._popover=a};this._onUniformChartScalingChange=a=>{this.onUniformChartScalingChange(a.target.checked)}}loadDependencies(){return t.loadCalciteComponents({action:()=>new Promise((a,b)=>g(["../../../chunks/calcite-action"],a,b)),checkbox:()=>new Promise((a,b)=>g(["../../../chunks/calcite-checkbox"],a,b)),label:()=>new Promise((a,b)=>g(["../../../chunks/calcite-label"],a,b)),popover:()=>new Promise((a,b)=>g(["../../../chunks/calcite-popover"],
a,b)),tooltip:()=>new Promise((a,b)=>g(["../../../chunks/calcite-tooltip"],a,b))})}initialize(){const a=()=>this._popover;this.addHandles([n.on(a,"calcitePopoverOpen",()=>this._popoverIsOpen=!0),n.on(a,"calcitePopoverClose",()=>this._popoverIsOpen=!1)])}render(){const {id:a,messages:b,visibleElements:k}=this,{unitSelector:l,uniformChartScalingToggle:v}=k;if(!b||!l&&!v)return f.tsx("div",{key:`${a}-empty`});const p=`${a}__action`,m=this._popoverIsOpen?b.hideSettings:b.showSettings;return f.tsx("div",
{class:h.settingsCss.base,key:this},f.tsx("calcite-popover",{afterCreate:this._onPopoverAfterCreate,autoClose:!0,label:m,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:p},this._renderPopoverContent()),f.tsx("calcite-action",{appearance:"transparent","data-testid":"settings-button",icon:"gear",id:p,scale:"s",text:m,title:m}))}_renderPopoverContent(){const {unitSelector:a,uniformChartScalingToggle:b}=this.visibleElements;return f.tsx("div",{class:h.settingsCss.popoverContent},a?
this._renderUnitSelector():null,b?this._renderUniformChartScalingToggle():null)}_renderUnitSelector(){const {messages:a}=this;return f.tsx(u.UnitSelect,{key:"unit-selector-label",options:this.unitOptions,selectLabel:a?.unitSelectLabel??"",value:this.unit,onChange:this.onUnitChange})}_renderUniformChartScalingToggle(){const {messages:a}=this,b=this.uniformChartScaling,k=`${this.id}__uniform-chart-scaling-toggle`,l=a?.[b?"uniformChartScalingDisable":"uniformChartScalingEnable"]??"";return f.tsx("calcite-label",
{class:h.settingsCss.uniformChartScalingLabel,key:"uniform-chart-scaling-label",layout:"inline"},f.tsx("calcite-checkbox",{checked:b,class:h.settingsCss.uniformChartScalingCheckbox,id:k,onCalciteCheckboxChange:this._onUniformChartScalingChange}),f.tsx("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:k},l),a?.uniformChartScalingLabel)}};d.__decorate([e.property()],c.SettingsButton.prototype,"messages",void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"onUniformChartScalingChange",
void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"onUnitChange",void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"uniformChartScaling",void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"unit",void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"unitOptions",void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"visibleElements",void 0);d.__decorate([e.property()],c.SettingsButton.prototype,"_popover",void 0);d.__decorate([e.property()],
c.SettingsButton.prototype,"_popoverIsOpen",void 0);c.SettingsButton=d.__decorate([q.subclass("esri.widgets.ElevationProfile.components.SettingsButton")],c.SettingsButton);Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});