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.
 
 

8 lines
2.5 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 ../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../chunks/componentsUtils ../support/widgetUtils ../support/jsxFactory ./ValuePickerBaseComponent".split(" "),function(l,f,h,e,r,t,m,n,u,k,p){e=class extends p{constructor(a,c){super(a,c);this.placeholder=this.items=null;this.type="combobox"}loadDependencies(){return n.loadCalciteComponents({combobox:()=>new Promise((a,
c)=>l(["../../chunks/calcite-combobox"],a,c)),"combobox-item":()=>new Promise((a,c)=>l(["../../chunks/calcite-combobox-item"],a,c))})}get canNext(){return this.items&&this.viewModel?this.items.findIndex(({value:a})=>a===this.viewModel.values?.[0])!==this.items.length-1:!1}get canPlay(){return null!=this.viewModel&&!!this.items?.length}get canPrevious(){const {items:a,viewModel:c}=this;return a&&c?0!==a.findIndex(({value:b})=>b===c.values?.[0]):!1}render(){const {viewModel:a}=this;if(null==a)return k.tsx("div",
null);const c=a.values?.[0];return k.tsx("div",{class:"esri-value-picker__combobox"},k.tsx("calcite-combobox",{disabled:a.disabled,label:this.label,maxItems:10,overlayPositioning:"fixed",placeholder:this.placeholder??void 0,selectionMode:"single",onCalciteComboboxChange:b=>{Array.isArray(b.target.value)||(null==a.values?a.values=[b.target.value]:a.values[0]!==b.target.value&&(a.values=[b.target.value]))}},this.items?.map(({value:b,label:d},g)=>k.tsx("calcite-combobox-item",{key:g,selected:b===c,textLabel:d,
value:b}))))}animate(a){this._step(1,a)}next(){this._step(1)}previous(){this._step(-1)}_step(a,c=!1){const {viewModel:b,items:d}=this;if(d?.length&&b)if(b.values){var g=d.findIndex(({value:q})=>q===b.values[0]);-1===g?b.values=[d[0].value]:(g+=a,0>g||g>=d.length?b.loop||c?b.values=[d[1===a?0:d.length-1].value]:"playing"===b.state&&b.pause():b.values=[d[g].value])}else b.values=[d[0].value]}};f.__decorate([h.property()],e.prototype,"canNext",null);f.__decorate([h.property()],e.prototype,"canPlay",
null);f.__decorate([h.property()],e.prototype,"canPrevious",null);f.__decorate([h.property()],e.prototype,"items",void 0);f.__decorate([h.property()],e.prototype,"placeholder",void 0);f.__decorate([h.property()],e.prototype,"type",void 0);return e=f.__decorate([m.subclass("esri.widgets.ValuePicker.ValuePickerCombobox")],e)});