@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 2.78 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.19/LICENSE.txt */
import{__decorate as e}from"tslib";import{Clonable as o}from"../../core/Clonable.js";import{JSONSupportMixin as r}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{toPt as t}from"../../core/screenUtils.js";import{property as s,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureNumber as p}from"../../core/accessorSupport/ensureType.js";import{createDefaultRenderer as a}from"./featureLayerUtils.js";import{labelingInfoProperty as d,labelsVisibleProperty as l,layerProperty as u,maxScaleProperty as f,popupEnabledProperty as c,popupTemplateProperty as m,fieldConfigurationsProperty as g,fieldsProperty as y,fieldsIndexProperty as h,rendererProperty as v}from"./featureReductionProperties.js";import{read as b}from"../../renderers/support/jsonUtils.js";import{enumeration as j}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as C}from"../../core/accessorSupport/decorators/reader.js";let x=class extends(r(o)){constructor(e){super(e),this.type="binning",this.binType="geohash",this.fixedBinLevel=null,this.labelingInfo=null,this.labelsVisible=!0,this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.size=t("12px"),this.fields=[],this.renderer=null}readRenderer(e,o,r){const i=o.drawingInfo?.renderer;return i?b(i,o,r)??void 0:a(o,r)}clone(){const e=super.clone();return this._isOverridden("fieldConfigurations")&&(e.fieldConfigurations=i(this.fieldConfigurations)),e}getField(e){return this.fieldsIndex.get(e)}getFieldAlias(e){const o=this.getField(e);if(o)return this.getFieldConfiguration(o.name)?.alias||o.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(o=>o.name.toLowerCase()===e)}};e([s({type:["binning"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],x.prototype,"type",void 0),e([j({geohash:"geohash",square:"square"}),s({type:["geohash","square"],json:{write:{ignoreOrigin:!0}}})],x.prototype,"binType",void 0),e([s({type:Number,json:{write:{ignoreOrigin:!0}}})],x.prototype,"fixedBinLevel",void 0),e([s(d())],x.prototype,"labelingInfo",void 0),e([s(l())],x.prototype,"labelsVisible",void 0),e([s(u())],x.prototype,"layer",void 0),e([s(f())],x.prototype,"maxScale",void 0),e([s(c())],x.prototype,"popupEnabled",void 0),e([s(m())],x.prototype,"popupTemplate",void 0),e([s({cast:e=>"auto"===e?e:p(t(e))})],x.prototype,"size",void 0),e([s(g())],x.prototype,"fieldConfigurations",void 0),e([s(y())],x.prototype,"fields",void 0),e([s(h())],x.prototype,"fieldsIndex",void 0),e([s(v())],x.prototype,"renderer",void 0),e([C("renderer",["drawingInfo.renderer"])],x.prototype,"readRenderer",null),x=e([n("esri.layers.support.FeatureReductionBinning")],x);export{x as default};