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.2 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("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./BuildingNumericFilterViewModel ./support/buildingLayerUtils ./support/filterUtils ./support/validation".split(" "),function(f,g,d,p,q,k,l,h,m,n){d=class extends l{constructor(){super(...arguments);this._demolishedPhaseFieldName=this._createdPhaseFieldName=null;this._parseValueFromFilter=a=>{var b=this._createdPhaseFieldName;
b=new RegExp(`${b}\\s*<=\\s*(\\d+)\\s*OR\\s*${b}\\s*IS\\s*NULL`,"gi");var c=this._demolishedPhaseFieldName;c=new RegExp(`${c}\\s*>\\s*(\\d+)\\s*OR\\s*${c}\\s*IS\\s*NULL`,"gi");for(const {filterExpression:e}of a.filterBlocks?.items??[])if(a=e?b.exec(e)??c.exec(e):null)return parseInt(a[1],10);return null}}get filterExpressions(){if(!this.enabled)return{solid:null,xRay:null};var a=[],b=this._createdPhaseFieldName;b&&a.push(`(${b} <= ${this.value} OR ${b} IS NULL)`);(b=this._demolishedPhaseFieldName)&&
a.push(`(${b} > ${this.value} OR ${b} IS NULL)`);a=a.join(" AND ");return{solid:a,xRay:a}}get _lastValue(){const a=this.allowedValues;return 0<a.length?a[a.length-1]:0}_setup(){const a=[];this.layers.forEach(c=>{const e=h.findFieldInfoByModelName(c,"createdphase");null!=e&&(this._createdPhaseFieldName=e.fieldName,a.push(e));c=h.findFieldInfoByModelName(c,"demolishedphase");null!=c&&(this._demolishedPhaseFieldName=c.fieldName,a.push(c))});this._domainInfo=n.getDomainInfo(a);var b=this._valueBeforeReady;
this._set("state","ready");this._valueBeforeReady=null;0<this.allowedValues.length?(b=b??m.getValueFromFilters(this.layers,this._parseValueFromFilter),this.select(b??this._lastValue)):this.clear()}};f.__decorate([g.property({readOnly:!0})],d.prototype,"filterExpressions",null);f.__decorate([g.property()],d.prototype,"_createdPhaseFieldName",void 0);f.__decorate([g.property()],d.prototype,"_demolishedPhaseFieldName",void 0);f.__decorate([g.property({readOnly:!0})],d.prototype,"_lastValue",null);return d=
f.__decorate([k.subclass("esri.widgets.BuildingExplorer.BuildingPhase")],d)});