@arcgis/core 5.0.0-next.129 → 5.0.0-next.130
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/assets/components/assets/carousel/t9n/messages.ar.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.bg.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.bs.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ca.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.cs.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.da.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.de.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.el.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.es.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.et.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.fi.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.fr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.he.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.hr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.hu.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.id.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.it.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ja.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ko.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.lt.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.lv.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.nl.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.no.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.pl.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ro.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ru.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sk.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sl.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sv.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.th.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.tr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.uk.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.vi.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/13246d76b7b4a88190b7.js +1 -0
- package/assets/esri/core/workers/chunks/{bc2dcbdc414d157ab727.js → 1c653937ae592a3c4d1a.js} +1 -1
- package/assets/esri/core/workers/chunks/298d7ab4ef027aa80322.js +2 -0
- package/assets/esri/core/workers/chunks/{e97b29b026a734bbcff8.js → 37e816869816683dce81.js} +1 -1
- package/assets/esri/core/workers/chunks/{bcfa9f2e54f6777d0855.js → 3a65ef151a594bef66eb.js} +16 -16
- package/assets/esri/core/workers/chunks/{8cade3af17a8bb6d4e37.js → 428d28373d154fbf2567.js} +1 -1
- package/assets/esri/core/workers/chunks/{415957a42e45eb21aa84.js → 43afb1ea1da338807d09.js} +1 -1
- package/assets/esri/core/workers/chunks/{6f337c3ccd84d90a35e5.js → 4631b24b37dbdc0c2c05.js} +1 -1
- package/assets/esri/core/workers/chunks/510b75afe19324d26665.js +2 -0
- package/assets/esri/core/workers/chunks/{e2e03622936d2b35afc0.js → 5419eb0efaade6b27c0a.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec63c0fa21cd3c872633.js → 54794b18edc584fd7515.js} +1 -1
- package/assets/esri/core/workers/chunks/5746140c33cb206ad4b8.js +1 -0
- package/assets/esri/core/workers/chunks/{6c85396c90941a042c33.js → 5b3a67cce57e49c68e60.js} +1 -1
- package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +1 -0
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +1 -0
- package/assets/esri/core/workers/chunks/8fb2981151d20c4de88d.js +1 -0
- package/assets/esri/core/workers/chunks/90401fa13412e93bae38.js +2 -0
- package/assets/esri/core/workers/chunks/{cb5f4820277f3fc7ff2f.js → 995b215b164650e54788.js} +1 -1
- package/assets/esri/core/workers/chunks/{e52793690dff1a199647.js → a4c190dd57458860ee12.js} +1 -1
- package/assets/esri/core/workers/chunks/b916f7acf129d9546a99.js +1 -0
- package/assets/esri/core/workers/chunks/c80a2a95bb6fe10b5efd.js +1 -0
- package/assets/esri/core/workers/chunks/{77fc225259f1c5800095.js → e2661d39c48376163adf.js} +1 -1
- package/assets/esri/core/workers/chunks/e7bee85f28d7ec03825a.js +1 -0
- package/assets/esri/core/workers/chunks/e8f3594b90cef4b598bc.js +2 -0
- package/assets/esri/core/workers/chunks/ec3c3fbcd3a00f24bee7.js +2 -0
- package/config.d.ts +94 -34
- package/config.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/identity/IdentityManager.d.ts +11 -7
- package/identity/IdentityManagerBase.d.ts +13 -9
- package/kernel.js +1 -1
- package/layers/support/EditingCapabilities.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/package.json +4 -4
- package/renderers/support/DictionaryControlString.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
- package/smartMapping/raster/renderers/flow.d.ts +2 -1
- package/smartMapping/renderers/color.d.ts +19 -3
- package/smartMapping/renderers/dotDensity.d.ts +6 -1
- package/smartMapping/renderers/heatmap.d.ts +4 -1
- package/smartMapping/renderers/location.d.ts +2 -2
- package/smartMapping/renderers/opacity.d.ts +2 -2
- package/smartMapping/renderers/pieChart.d.ts +2 -2
- package/smartMapping/renderers/predominance.d.ts +2 -2
- package/smartMapping/renderers/relationship.d.ts +2 -2
- package/smartMapping/renderers/size.d.ts +7 -6
- package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
- package/smartMapping/renderers/type.d.ts +4 -3
- package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
- package/smartMapping/statistics/support/ageUtils.d.ts +3 -2
- package/smartMapping/statistics/types.d.ts +8 -7
- package/smartMapping/support/adapters/types.d.ts +6 -0
- package/smartMapping/symbology/color.d.ts +1 -1
- package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
- package/smartMapping/symbology/support/colorRamps.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/types.d.ts +220 -117
- package/symbols/support/OccludedVisibility.d.ts +1 -1
- package/symbols/support/OccludedVisibility.js +1 -1
- package/symbols/support/Symbol3DEmissive.d.ts +33 -17
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/SnappingVisualizer2D.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicStateTracking.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/View.d.ts +8 -0
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/PolygonPlugin.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/types.d.ts +8 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingVisualizer.js +1 -1
- package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
- package/views/interactive/snapping/hints/CurveSnappingHint.js +2 -0
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/webscene/Glow.d.ts +19 -14
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +15 -4
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflowData.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +17 -5
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +17 -5
- package/widgets/FeatureTable.d.ts +16 -4
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +9 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.d.ts +9 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/assets/esri/core/workers/chunks/112227b862b935123ddf.js +0 -2
- package/assets/esri/core/workers/chunks/1cfa8d404d42b9eccf78.js +0 -1
- package/assets/esri/core/workers/chunks/2e50b7651f8c037bb3b0.js +0 -1
- package/assets/esri/core/workers/chunks/3d3b1ce112be6ea31d93.js +0 -1
- package/assets/esri/core/workers/chunks/53e348f5585fa8c53fe8.js +0 -2
- package/assets/esri/core/workers/chunks/72c31f3313dfe87dd1aa.js +0 -1
- package/assets/esri/core/workers/chunks/79c69ae86a1f4a56f7c7.js +0 -1
- package/assets/esri/core/workers/chunks/8eb535b43e1220cf0d75.js +0 -1
- package/assets/esri/core/workers/chunks/b397a9f87082705301a4.js +0 -2
- package/assets/esri/core/workers/chunks/baad696d84ab78b3d00e.js +0 -2
- package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +0 -1
- package/assets/esri/core/workers/chunks/d39f5d57f7e35c00ca16.js +0 -1
- package/assets/esri/core/workers/chunks/edaae0fc63d16b0f675d.js +0 -2
- /package/assets/esri/core/workers/chunks/{53e348f5585fa8c53fe8.js.LICENSE.txt → 298d7ab4ef027aa80322.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{edaae0fc63d16b0f675d.js.LICENSE.txt → 510b75afe19324d26665.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b397a9f87082705301a4.js.LICENSE.txt → 90401fa13412e93bae38.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{112227b862b935123ddf.js.LICENSE.txt → e8f3594b90cef4b598bc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{baad696d84ab78b3d00e.js.LICENSE.txt → ec3c3fbcd3a00f24bee7.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import{ClonableMixin as r}from"../../core/Clonable.js";import i from"../../core/Error.js";import{IdentifiableMixin as n}from"../../core/Identifiable.js";import{clone as o}from"../../core/lang.js";import{Loadable as l}from"../../core/Loadable.js";import s from"../../core/Logger.js";import{destroyMaybe as a}from"../../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../../core/MultiOriginJSONSupport.js";import{setDeepValue as d}from"../../core/object.js";import{sqlAnd as u}from"../../core/sql.js";import{property as y,subclass as c}from"../../core/accessorSupport/decorators.js";import{excludeTables as m}from"../../core/accessorSupport/layerContainerType.js";import f from"../../form/FormTemplate.js";import h from"../../geometry/SpatialReference.js";import b from"../../graphic/SubtypeGroupGraphicOrigin.js";import{labelsVisible as g,legendEnabled as j,minScale as v,maxScale as w,popupEnabled as F}from"./commonProperties.js";import{createQuery as T,computeDomainFromSubtypes as I}from"./featureLayerUtils.js";import O from"./FeatureTemplate.js";import{defineFieldProperties as S}from"./fieldProperties.js";import{fixRendererFields as C}from"./fieldUtils.js";import E from"./LabelClass.js";import{reader as q}from"./labelingInfo.js";import{rendererReader as A,supportedRendererTypes as x}from"./subtypeGroupLayerUtils.js";import R from"./TitleCreator.js";import P from"../../renderers/SimpleRenderer.js";import L from"../../rest/support/AttachmentQuery.js";import G from"../../rest/support/Query.js";import{createPopupTemplate as _}from"../../support/popupUtils.js";import{defaultPolygonSymbol2D as D,defaultPolylineSymbol2D as N,defaultPointSymbol2D as $}from"../../symbols/support/defaults.js";import U from"../../tables/AttributeTableTemplate.js";import{writer as V}from"../../core/accessorSupport/decorators/writer.js";import{reader as M}from"../../core/accessorSupport/decorators/reader.js";const Q=S();let k=0;function B(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=m),e}function H(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=m),e?.target&&(t.write.target=e.target)),t}function J(e){return new P({symbol:W(e)})}function W(e){switch(e){case"point":case"multipoint":return $.clone();case"polyline":return N.clone();case"polygon":case"multipatch":return D.clone();default:return null}}function z(e,t){return!!t&&("unique-value"===e?.type&&null!=e.field&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression)}function K(e,t){return null==e?null:t.subtypes?.find(t=>t.code===e)}function X(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},n=K(e,t);if(null!=n){const{defaultValues:e}=n;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new O({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}let Y=class extends(p(r(n(l)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.graphicOrigin=new b(this),this.id=`${Date.now().toString(16)}-subtype-sublayer-${k++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return C(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return a(e),new R({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}writeFieldOverrides(e,t,r){const{fields:i,parent:n}=this;let l;if(i){l=[];let e=0;i.forEach(({name:t,alias:r,editable:i,visible:o})=>{if(!o)return;const s=n?.fields?.find(e=>e.name===t);if(!s)return;const a={name:t};let p=!1;r!==s.alias&&(a.alias=r,p=!0),i!==s.editable&&(a.editable=i,p=!0),l.push(a),p&&e++}),0===e&&l.length===i.length&&(l=null)}else l=o(e);l?.length&&d(r,l,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:n,subtypeField:o}=e,l=n?.find(e=>e.code===r),s=l?.defaultValues,a=l?.domains,p=[];for(const d of i){const e=d.clone(),{name:i}=e,n=t?.find(e=>e.name===i);if(e.visible=!t?.length||!!n,n){const{alias:t,editable:r}=n;t&&(e.alias=t),!1===r&&(e.editable=!1)}const l=s?.[i]??null;e.defaultValue=i===o?r:l;const u=a?.[i]??null;e.domain=i===o?null:u?"inherited"===u.type?e.domain:u.clone():null,p.push(e)}return p}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(s.getLogger(this).error(te("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||s.getLogger(this).error(te("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){C(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?J(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,n=A(i,t,r);let o;const{subtypeCode:l}=this;if(null!=l&&z(n,t.subtypeField)){const e=n.uniqueValueInfos?.find(({value:e})=>(e="number"==typeof e?String(e):e)===String(l));e&&(o=new P({symbol:e.symbol}))}else"simple"!==n?.type||n.visualVariables?.length||(o=n);return o}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(i)return A(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??h.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[X(this.subtypeCode,t)]}readTitleFromService(e,t){const r=K(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw te("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new i("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw te("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new i("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw te("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new i("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw te("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:n}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:l}=r;t={displayField:e,editFieldsInfo:o,fields:i,objectIdField:l,title:n}}return _(t,e)}createQuery(){if(!this.parent)throw te("createQuery");const e=T(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=u(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=I(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw te("queryAttachments");const i=e instanceof L?e.clone():new L(e);return i.where=ee(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(i,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw te("queryFeatureCount");return r.parent.queryFeatureCount(Z(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw te("queryFeatures");return r.parent.queryFeatures(Z(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw te("queryObjectIds");return r.parent.queryObjectIds(Z(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw te("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw te("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};e([y({clonable:!1,readOnly:!0})],Y.prototype,"_titleCreator",null),e([y({type:U,json:H({name:"attributeTableInfo"})})],Y.prototype,"attributeTableTemplate",void 0),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"capabilities",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"effectiveCapabilities",null),e([y({json:H()})],Y.prototype,"charts",void 0),e([y({type:Boolean,nonNullable:!0,json:H({name:"enableEditing"})})],Y.prototype,"editingEnabled",void 0),e([y({type:Boolean,readOnly:!0})],Y.prototype,"effectiveEditingEnabled",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"elevationInfo",null),e([y({clonable:!1,readOnly:!0})],Y.prototype,"featureTitleFields",null),e([y({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],Y.prototype,"fieldOverrides",void 0),e([V("fieldOverrides")],Y.prototype,"writeFieldOverrides",null),e([y({...Q.fields,readOnly:!0,json:{read:!1}})],Y.prototype,"fields",null),e([y(Q.fieldsIndex)],Y.prototype,"fieldsIndex",void 0),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"floorInfo",null),e([y({type:f,json:H({name:"formInfo"})})],Y.prototype,"formTemplate",void 0),e([y({readOnly:!0,clonable:!1})],Y.prototype,"graphicOrigin",void 0),e([y({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Y.prototype,"id",void 0),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"isTable",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"geometryType",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"globalIdField",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"type",void 0),e([y(B(o(g)))],Y.prototype,"labelsVisible",void 0),e([y({type:[E],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:q},write:{ignoreOrigin:!0,layerContainerTypes:m}}})],Y.prototype,"labelingInfo",void 0),e([y({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:m}}})],Y.prototype,"layerType",void 0),e([y(B(o(j)))],Y.prototype,"legendEnabled",void 0),e([y({type:["show","hide"]})],Y.prototype,"listMode",void 0),e([y((()=>{const e=o(v);return e.json.origins.service.read=!1,B(e,{spatialOnly:!0})})())],Y.prototype,"minScale",void 0),e([y((()=>{const e=o(w);return e.json.origins.service.read=!1,B(e,{spatialOnly:!0})})())],Y.prototype,"maxScale",void 0),e([y({readOnly:!0})],Y.prototype,"effectiveScaleRange",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"objectIdField",null),e([y({type:Number,range:{min:0,max:1},nonNullable:!0,json:H({spatialOnly:!0})})],Y.prototype,"opacity",void 0),e([y({clonable:!1})],Y.prototype,"parent",void 0),e([y(B(o(F)))],Y.prototype,"popupEnabled",void 0),e([y({type:t,json:H({name:"popupInfo"})})],Y.prototype,"popupTemplate",void 0),e([y({readOnly:!0})],Y.prototype,"defaultPopupTemplate",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"relationships",null),e([y({types:x,json:H({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],Y.prototype,"renderer",null),e([M("service","renderer",["drawingInfo.renderer","subtypeField","type"])],Y.prototype,"readRendererFromService",null),e([M("renderer",["layerDefinition.drawingInfo.renderer"])],Y.prototype,"readRenderer",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"spatialReference",null),e([y({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],Y.prototype,"subtypeCode",void 0),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"subtypeField",null),e([y({type:[O],json:H({name:"layerDefinition.templates"})})],Y.prototype,"templates",void 0),e([M("service","templates",["geometryType","subtypeField","subtypes","type"])],Y.prototype,"readTemplatesFromService",null),e([y({type:String,json:H()})],Y.prototype,"title",void 0),e([M("service","title",["subtypes"])],Y.prototype,"readTitleFromService",null),e([y({readOnly:!0,json:{read:!1}})],Y.prototype,"url",null),e([y({readOnly:!0})],Y.prototype,"userHasUpdateItemPrivileges",null),e([y({type:Boolean,nonNullable:!0,json:H({name:"visibility",spatialOnly:!0})})],Y.prototype,"visible",void 0),Y=e([c("esri.layers.support.SubtypeSublayer")],Y);const Z=(e,t,r)=>{if(!r)return t.createQuery();const i=G.from(r);return i.where=ee(i.where,e.subtypeField,t.subtypeCode),i},ee=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),n=`${t}=${r}`,o=e??"";return i.test(o)?o.replace(i,n):u(n,o)},te=e=>new i("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);export{Y as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import{ClonableMixin as r}from"../../core/Clonable.js";import i from"../../core/Error.js";import{IdentifiableMixin as n}from"../../core/Identifiable.js";import{clone as o}from"../../core/lang.js";import{Loadable as s}from"../../core/Loadable.js";import l from"../../core/Logger.js";import{destroyMaybe as a}from"../../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../../core/MultiOriginJSONSupport.js";import{setDeepValue as d}from"../../core/object.js";import{sqlAnd as u}from"../../core/sql.js";import{property as y,subclass as c}from"../../core/accessorSupport/decorators.js";import{excludeTables as m}from"../../core/accessorSupport/layerContainerType.js";import f from"../../form/FormTemplate.js";import h from"../../geometry/SpatialReference.js";import b from"../../graphic/SubtypeGroupGraphicOrigin.js";import{labelsVisible as g,legendEnabled as v,minScale as j,maxScale as w,popupEnabled as F}from"./commonProperties.js";import{createQuery as T,computeDomainFromSubtypes as O}from"./featureLayerUtils.js";import I from"./FeatureTemplate.js";import{defineFieldProperties as S}from"./fieldProperties.js";import{fixRendererFields as C}from"./fieldUtils.js";import A from"./LabelClass.js";import{reader as E}from"./labelingInfo.js";import{rendererReader as q,supportedRendererTypes as x}from"./subtypeGroupLayerUtils.js";import R from"./TitleCreator.js";import _ from"../../renderers/SimpleRenderer.js";import P from"../../rest/support/AttachmentQuery.js";import L from"../../rest/support/Query.js";import{createPopupTemplate as G}from"../../support/popupUtils.js";import{defaultPolygonSymbol2D as D,defaultPolylineSymbol2D as N,defaultPointSymbol2D as $}from"../../symbols/support/defaults.js";import U from"../../tables/AttributeTableTemplate.js";import{writer as V}from"../../core/accessorSupport/decorators/writer.js";import{reader as M}from"../../core/accessorSupport/decorators/reader.js";const Q=S();let k=0;function B(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=m),e}function H(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=m),e?.target&&(t.write.target=e.target)),t}function J(e){return new _({symbol:W(e)})}function W(e){switch(e){case"point":case"multipoint":return $.clone();case"polyline":return N.clone();case"polygon":case"multipatch":return D.clone();default:return null}}function z(e,t){return!!t&&("unique-value"===e?.type&&null!=e.field&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression)}function K(e){return Y(e,"user")===e}function X(e){return Y(e,"service")}function Y(e,t){const r=e.parent?.getAtOrigin("sublayers",t);return r?.find(({subtypeCode:t})=>t===e.subtypeCode)}function Z(e,t){return null==e?null:t.subtypes?.find(t=>t.code===e)}function ee(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},n=Z(e,t);if(null!=n){const{defaultValues:e}=n;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new I({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}let te=class extends(p(r(n(s)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.graphicOrigin=new b(this),this.id=`${Date.now().toString(16)}-subtype-sublayer-${k++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.visible=!0}load(e){return C(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return a(e),new R({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}writeFieldOverrides(e,t,r){const{fields:i,parent:n}=this;let s;if(i){s=[];let e=0;i.forEach(({name:t,alias:r,editable:i,visible:o})=>{if(!o)return;const l=n?.fields?.find(e=>e.name===t);if(!l)return;const a={name:t};let p=!1;r!==l.alias&&(a.alias=r,p=!0),i!==l.editable&&(a.editable=i,p=!0),s.push(a),p&&e++}),0===e&&s.length===i.length&&(s=null)}else s=o(e);s?.length&&d(r,s,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:n,subtypeField:o}=e,s=n?.find(e=>e.code===r),l=s?.defaultValues,a=s?.domains,p=[];for(const d of i){const e=d.clone(),{name:i}=e,n=t?.find(e=>e.name===i);if(e.visible=!t?.length||!!n,n){const{alias:t,editable:r}=n;t&&(e.alias=t),!1===r&&(e.editable=!1)}const s=l?.[i]??null;e.defaultValue=i===o?r:s;const u=a?.[i]??null;e.domain=i===o?null:u?"inherited"===u.type?e.domain:u.clone():null,p.push(e)}return p}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(l.getLogger(this).error(ne("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||l.getLogger(this).error(ne("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){C(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?(K(this)?o(X(this)?.renderer):null)??J(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,n=q(i,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&z(n,t.subtypeField)){const e=n.uniqueValueInfos?.find(({value:e})=>(e="number"==typeof e?String(e):e)===String(s));e&&(o=new _({symbol:e.symbol}))}else"simple"!==n?.type||n.visualVariables?.length||(o=n);return o}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(i)return q(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??h.WGS84}get subtypeField(){return this.parent?.subtypeField}get templates(){if(this._isOverridden("templates"))return this._get("templates");const e=K(this)?X(this):null;return o(e?.templates)}set templates(e){this._override("templates",e)}readTemplatesFromService(e,t){return[ee(this.subtypeCode,t)]}get title(){if(this._isOverridden("title"))return this._get("title");const e=K(this)?X(this):null;return e?.title}set title(e){this._override("title",e)}readTitleFromService(e,t){const r=Z(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw ne("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new i("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw ne("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new i("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw ne("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new i("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw ne("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:n}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:i,objectIdField:s,title:n}}return G(t,e)}createQuery(){if(!this.parent)throw ne("createQuery");const e=T(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=u(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=O(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw ne("queryAttachments");const i=e instanceof P?e.clone():new P(e);return i.where=ie(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(i,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw ne("queryFeatureCount");return r.parent.queryFeatureCount(re(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw ne("queryFeatures");return r.parent.queryFeatures(re(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw ne("queryObjectIds");return r.parent.queryObjectIds(re(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw ne("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw ne("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};e([y({clonable:!1,readOnly:!0})],te.prototype,"_titleCreator",null),e([y({type:U,json:H({name:"attributeTableInfo"})})],te.prototype,"attributeTableTemplate",void 0),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"capabilities",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"effectiveCapabilities",null),e([y({json:H()})],te.prototype,"charts",void 0),e([y({type:Boolean,nonNullable:!0,json:H({name:"enableEditing"})})],te.prototype,"editingEnabled",void 0),e([y({type:Boolean,readOnly:!0})],te.prototype,"effectiveEditingEnabled",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"elevationInfo",null),e([y({clonable:!1,readOnly:!0})],te.prototype,"featureTitleFields",null),e([y({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],te.prototype,"fieldOverrides",void 0),e([V("fieldOverrides")],te.prototype,"writeFieldOverrides",null),e([y({...Q.fields,readOnly:!0,json:{read:!1}})],te.prototype,"fields",null),e([y(Q.fieldsIndex)],te.prototype,"fieldsIndex",void 0),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"floorInfo",null),e([y({type:f,json:H({name:"formInfo"})})],te.prototype,"formTemplate",void 0),e([y({readOnly:!0,clonable:!1})],te.prototype,"graphicOrigin",void 0),e([y({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],te.prototype,"id",void 0),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"isTable",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"geometryType",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"globalIdField",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"type",void 0),e([y(B(o(g)))],te.prototype,"labelsVisible",void 0),e([y({type:[A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:E},write:{ignoreOrigin:!0,layerContainerTypes:m}}})],te.prototype,"labelingInfo",void 0),e([y({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:m}}})],te.prototype,"layerType",void 0),e([y(B(o(v)))],te.prototype,"legendEnabled",void 0),e([y({type:["show","hide"]})],te.prototype,"listMode",void 0),e([y((()=>{const e=o(j);return e.json.origins.service.read=!1,B(e,{spatialOnly:!0})})())],te.prototype,"minScale",void 0),e([y((()=>{const e=o(w);return e.json.origins.service.read=!1,B(e,{spatialOnly:!0})})())],te.prototype,"maxScale",void 0),e([y({readOnly:!0})],te.prototype,"effectiveScaleRange",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"objectIdField",null),e([y({type:Number,range:{min:0,max:1},nonNullable:!0,json:H({spatialOnly:!0})})],te.prototype,"opacity",void 0),e([y({clonable:!1})],te.prototype,"parent",void 0),e([y(B(o(F)))],te.prototype,"popupEnabled",void 0),e([y({type:t,json:H({name:"popupInfo"})})],te.prototype,"popupTemplate",void 0),e([y({readOnly:!0})],te.prototype,"defaultPopupTemplate",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"relationships",null),e([y({types:x,json:H({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],te.prototype,"renderer",null),e([M("service","renderer",["drawingInfo.renderer","subtypeField","type"])],te.prototype,"readRendererFromService",null),e([M("renderer",["layerDefinition.drawingInfo.renderer"])],te.prototype,"readRenderer",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"spatialReference",null),e([y({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],te.prototype,"subtypeCode",void 0),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"subtypeField",null),e([y({type:[I],json:H({name:"layerDefinition.templates"})})],te.prototype,"templates",null),e([M("service","templates",["geometryType","subtypeField","subtypes","type"])],te.prototype,"readTemplatesFromService",null),e([y({type:String,json:H()})],te.prototype,"title",null),e([M("service","title",["subtypes"])],te.prototype,"readTitleFromService",null),e([y({readOnly:!0,json:{read:!1}})],te.prototype,"url",null),e([y({readOnly:!0})],te.prototype,"userHasUpdateItemPrivileges",null),e([y({type:Boolean,nonNullable:!0,json:H({name:"visibility",spatialOnly:!0})})],te.prototype,"visible",void 0),te=e([c("esri.layers.support.SubtypeSublayer")],te);const re=(e,t,r)=>{if(!r)return t.createQuery();const i=L.from(r);return i.where=ie(i.where,e.subtypeField,t.subtypeCode),i},ie=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),n=`${t}=${r}`,o=e??"";return i.test(o)?o.replace(i,n):u(n,o)},ne=e=>new i("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);export{te as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.130",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@amcharts/amcharts5": "~5.15.5",
|
|
22
|
-
"@arcgis/toolkit": "^5.0.0-next.
|
|
22
|
+
"@arcgis/toolkit": "^5.0.0-next.170",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
|
-
"@esri/calcite-components": "^5.0.
|
|
24
|
+
"@esri/calcite-components": "^5.0.2",
|
|
25
25
|
"@vaadin/grid": "~25.0.3",
|
|
26
26
|
"@zip.js/zip.js": "~2.8.16",
|
|
27
27
|
"luxon": "~3.7.2",
|
|
28
|
-
"marked": "~17.0.
|
|
28
|
+
"marked": "~17.0.3",
|
|
29
29
|
"tslib": "^2.8.1"
|
|
30
30
|
},
|
|
31
31
|
"type": "module"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import e from"../../Color.js";class t{static parse(e,r,
|
|
2
|
+
import e from"../../Color.js";class t{static parse(e,r,n){const o=[],l=[],u=e.split(";");for(let t=0;t<u.length;t++){const e=u[t];if(e){if(e.includes("po:")){const t=e.slice(3).split("|");if(3===t.length){const[e,r,s]=t,n=i(e,r,s);n&&l.push(n)}continue}if(e.includes("|")){for(const t of e.split("|"))if(r.has(t)){o.push(t);break}}else if(r.has(e))o.push(e);else if(0===t){o.length=0,o.push(s(n));break}}}return new t(o,l)}constructor(e,t){this.partNames=e,this.overrides=t}}function r(t,r){if("DashTemplate"===t)return r.split(" ").map(e=>Number(e));if("Color"===t){const t=new e(r).toRgba();return[t[0],t[1],t[2],255*t[3]]}return Number(r)}function i(e,t,i){return{type:"CIMPrimitiveOverride",primitiveName:e,propertyName:t,value:r(t,i),defaultValue:null}}function s(e){switch(e){case"esriGeometryPolyline":return"Invalid_L";case"esriGeometryPolygon":return"Invalid_A";default:return"Invalid_P"}}export{t as DictionaryControlString};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import t from"../../request.js";import{clone as e}from"../../core/lang.js";import{LRUCache as r}from"../../core/LRUCache.js";import{getJsonType as o}from"../../geometry/support/jsonTypeUtils.js";import{DictionaryControlString as s}from"./DictionaryControlString.js";import{DictionaryScriptEvaluator as i}from"./DictionaryScriptEvaluator.js";import{deriveFields as a}from"../../support/ArcadeExpression.js";import l from"../../symbols/CIMSymbol.js";import{getTextCasing as n}from"../../symbols/cim/utils.js";const m={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class c{constructor(t,e,o,s){this.url=t,this.fieldMap=o,this.dictionaryInfo=s,this._symbolPartCache=new r(100);const a=async()=>i.from(await s,e,o);this._evaluator=a()}async getSymbolAsync(t,e,r=!0){const i=await this._evaluator,l=e?.fields??a(t.attributes),n=i.createDictionaryFieldsIndex(l),m=i.evaluate(t,e?.scale??0,n,e?.spatialReference);if(null==m)return null;const c=o(t.geometry),y=s.parse(m,i.itemNames,c),f="esriGeometryPoint"===c&&!t.geometry?.hasZ;return await this._cimPartsToCIMSymbol(t,y.partNames,y.overrides,f,e,r,n)}async getSymbolForControlString(t,e,r){const o=await this._evaluator,i=s.parse(t,o.itemNames,e),a="esriGeometryPoint"===e&&!r,n=y(await Promise.all(i.partNames.map(t=>this._getSymbolPart(t))),i.overrides,a);return new l({data:n})}async _cimPartsToCIMSymbol(t,r,o,s,i,a,m){const c=r.map(t=>this._getSymbolPart(t,i));let f=await Promise.all(c);if(a&&this.fieldMap&&f.length>0){const{OverrideHelper:r}=await import("../../symbols/cim/OverrideHelper.js");f=e(f);for(const e of f)r.applyDictionaryTextOverrides(e,t,this.fieldMap,m,n(e))}const p=y(f,o,s);return new l({data:p})}async _fetchSymbolPart(e,r){const o=await this.dictionaryInfo,s=(this.url+"/"+o.cimRefTemplateUrl).replaceAll(/\{itemName\}/gi,e),{data:i}=await t(s,{responseType:"json",query:{f:"json"},...r});return i}async _getSymbolPart(t,e){let r=this._symbolPartCache.get(t);return r||(r=this._fetchSymbolPart(t,e),this._symbolPartCache.put(t,r)),r}}function y(t,e,r){if(!t||0===t.length)return null;const o={...t[0]};if(t.length>1){o.effects=null,o.symbolLayers=[];for(const e of t){const t=e;if(null!=t.effects)for(const e of t.symbolLayers)null==e.effects?e.effects=t.effects:e.effects.unshift(...t.effects);o.symbolLayers.unshift(...t.symbolLayers)}}return r&&(o.callout=m),{type:"CIMSymbolReference",symbol:o,primitiveOverrides:e}}export{c as DictionaryLoader};
|
|
2
|
+
import t from"../../request.js";import{clone as e}from"../../core/lang.js";import{LRUCache as r}from"../../core/LRUCache.js";import{getJsonType as o}from"../../geometry/support/jsonTypeUtils.js";import{DictionaryControlString as s}from"./DictionaryControlString.js";import{DictionaryScriptEvaluator as i}from"./DictionaryScriptEvaluator.js";import{deriveFields as a}from"../../support/ArcadeExpression.js";import l from"../../symbols/CIMSymbol.js";import{getTextCasing as n}from"../../symbols/cim/utils.js";const m={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,width:.5,color:[0,0,0,255]}]}};class c{constructor(t,e,o,s){this.url=t,this.fieldMap=o,this.dictionaryInfo=s,this._symbolPartCache=new r(100);const a=async()=>i.from(await s,e,o);this._evaluator=a()}async getSymbolAsync(t,e,r=!0){const i=await this._evaluator,l=e?.fields??a(t.attributes),n=i.createDictionaryFieldsIndex(l),m=i.evaluate(t,e?.scale??0,n,e?.spatialReference);if(null==m)return null;const c=o(t.geometry),y=s.parse(m,i.itemNames,c),f="esriGeometryPoint"===c&&!t.geometry?.hasZ;return await this._cimPartsToCIMSymbol(t,y.partNames,y.overrides,f,e,r,n)}async getSymbolForControlString(t,e,r){const o=await this._evaluator,i=s.parse(t,o.itemNames,e),a="esriGeometryPoint"===e&&!r,n=y(await Promise.all(i.partNames.map(t=>this._getSymbolPart(t))),i.overrides,a);return new l({data:n})}async _cimPartsToCIMSymbol(t,r,o,s,i,a,m){const c=r.map(t=>this._getSymbolPart(t,i));let f=await Promise.all(c);if(a&&this.fieldMap&&f.length>0){const{OverrideHelper:r}=await import("../../symbols/cim/OverrideHelper.js");f=e(f);for(const e of f)r.applyDictionaryTextOverrides(e,t,this.fieldMap,m,n(e))}const p=y(f,o,s);return new l({data:p})}async _fetchSymbolPart(e,r){const o=await this.dictionaryInfo,s=(this.url+"/"+o.cimRefTemplateUrl).replaceAll(/\{itemName\}/gi,e),{data:i}=await t(s,{responseType:"json",query:{f:"json"},...r});return i}async _getSymbolPart(t,e){let r=this._symbolPartCache.get(t);return r||(r=this._fetchSymbolPart(t,e),this._symbolPartCache.put(t,r)),r}}function y(t,e,r){if(!t||0===t.length)return null;const o={...t[0]};if(t.length>1){o.effects=null,o.symbolLayers=[];for(const e of t){const t=e;if(null!=t.effects)for(const e of t.symbolLayers)null==e.effects?e.effects=t.effects:e.effects.unshift(...t.effects);o.symbolLayers.unshift(...t.symbolLayers)}}return r&&(o.callout=m),{type:"CIMSymbolReference",symbol:o,primitiveOverrides:e}}export{c as DictionaryLoader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{allocateFlatGeometry as t,writeBezierCurveSegment as e,writeCircularArcSegment as s,writeEllipticArc7Segment as r}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as i}from"../../../geometry/support/typeUtils.js";import{zScale as h}from"../../../geometry/support/zscale.js";import{FlatFeature as o}from"../../../layers/graphics/FlatFeature.js";import{FlatFeatureSet as a}from"../../../layers/graphics/FlatFeatureSet.js";import _ from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as n}from"../../../layers/graphics/data/createFeatureId.js";import{makeAttributesClass as f,makeVertexTransformer as m}from"./pbfFeatureSetUtils.js";class u{constructor(t){this._options=t,this.featureSet=new a,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=u._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t?this._idInfo??={type:"object-id",fieldName:t}:this._idInfo={type:"unique-id-simple",fieldName:t.name}}finish(){if(this._idInfo)for(const s of this.featureSet.features)s.objectId=n(s,this._idInfo);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t);this.featureSet.transform=null}feature(){this._attributesClass??=f(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push(new o(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(t){const{hasZ:e,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new _([],t,e,s)}geometry(e,s,r){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:h,hasM:o}=this.featureSet;h??=!1,o??=!1,this._vertex=[0,0],h&&this._vertex.push(0),o&&this._vertex.push(0);const a=i.fromJSON(s);this._isPolygon="polygon"===a;const _=Number(this._isPolygon),n="point"===a?1:r.reduce((t,e)=>t+e-_,0),f=r.length;if(this._geometry=t(a,n,f,h,o,!1),this._push=h?o?u._pushXYZM:u._pushXYZ:o?u._pushXYM:u._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let t=0;t<f;++t)this._geometry.partOffsets[t+1]=this._geometry.partOffsets[t]+r[t]-_}this._ringEndsAt=_?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=s):this.featureSet.features.at(-1).geometry=this._geometry}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0
|
|
2
|
+
import{allocateFlatGeometry as t,writeBezierCurveSegment as e,writeCircularArcSegment as s,writeEllipticArc7Segment as r}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as i}from"../../../geometry/support/typeUtils.js";import{zScale as h}from"../../../geometry/support/zscale.js";import{FlatFeature as o}from"../../../layers/graphics/FlatFeature.js";import{FlatFeatureSet as a}from"../../../layers/graphics/FlatFeatureSet.js";import _ from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as n}from"../../../layers/graphics/data/createFeatureId.js";import{makeAttributesClass as f,makeVertexTransformer as m}from"./pbfFeatureSetUtils.js";class u{constructor(t){this._options=t,this.featureSet=new a,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=u._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t?this._idInfo??={type:"object-id",fieldName:t}:this._idInfo={type:"unique-id-simple",fieldName:t.name}}finish(){if(this._idInfo)for(const s of this.featureSet.features)s.objectId=n(s,this._idInfo);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t);this.featureSet.transform=null}feature(){this._attributesClass??=f(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push(new o(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(t){const{hasZ:e,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new _([],t,e,s)}geometry(e,s,r){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:h,hasM:o}=this.featureSet;h??=!1,o??=!1,this._vertex=[0,0],h&&this._vertex.push(0),o&&this._vertex.push(0);const a=i.fromJSON(s);this._isPolygon="polygon"===a;const _=Number(this._isPolygon),n="point"===a?1:r.reduce((t,e)=>t+e-_,0),f=r.length;if(this._geometry=t(a,n,f,h,o,!1),this._push=h?o?u._pushXYZM:u._pushXYZ:o?u._pushXYM:u._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let t=0;t<f;++t)this._geometry.partOffsets[t+1]=this._geometry.partOffsets[t]+r[t]-_}this._ringEndsAt=_?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=s):this.featureSet.features.at(-1).geometry=this._geometry}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(e),this._push(this)))}curvedGeometry(e,s,r,h){let{hasZ:o,hasM:a}=this.featureSet;o??=!1,a??=!1,this._i=this._iVertex=this._iPart=0;const _=i.fromJSON(e);this._isPolygon="polygon"===_;const n=Number(!this._isPolygon),f=s.length;let m=0,u=0,l=n*f;for(let t=0;t<r.length;++t)switch(l+=h[t],r[t]){case 1:case 3:m+=h[t];continue;case 2:u+=h[t]}this._geometry=t(_,l,f,o,a,!0,m,u);const{partOffsets:p}=this._geometry;p[0]=0;for(let t=0,i=0;t<f;++t){p[t+1]=p[t]+n;for(let e=0;e<s[t];++e)p[t+1]+=h[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(t){}finishCurvedPart(t){this._isPolygon||(this._transform(t,this._vertex),this._push(this)),++this._iPart}lineSegment(t,e){this._transform(t,this._vertex),this._push(this)}bezierSegment(t,s,r,i){this._transform(t,this._vertex),this._push(this),this._transformXY(s,y.b[0]),this._transformXY(r,y.b[1]),this._transformXY(i,y.b[2]),this._i=e(this._vertex,y,this._geometry,this._iVertex-1,this._i)}circularArcSegment(t,e,r){this._transform(t,this._vertex),this._push(this),this._transformXY(e,l.c[0]),this._transformXY(r,l.c[1]),this._i=s(this._vertex,l,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(t,e,s,i,h,o,a,_){this._transform(t,this._vertex),this._push(this),this._transformXY(e,p.a[0]),this._transformXY(s,p.a[1]),p.a[2]=i,p.a[3]=h,p.a[4]=o,p.a[5]=a,p.a[6]=_,this._i=r(this._vertex,p,this._geometry,this._iVertex-1,this._i)}static _pushXY(t){const e=t._iVertex++,{vertexXY:s}=t._geometry;[s[2*e],s[2*e+1]]=t._vertex}static _pushXYZ(t){const e=t._iVertex++,{vertexXY:s,vertexZ:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYZM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r,vertexZ:i}=t._geometry;[s[2*e],s[2*e+1],i[e],r[e]]=t._vertex}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,i=s?h(t,e):1;this._transformInPlace??=m(this.featureSet,i),this._transformInPlaceXY??=m({transform:r})}_transform(t,e){for(let s=0;s<t.length;++s)e[s]=t[s];this._transformInPlace?.(e)}_transformXY(t,e){e[0]=t[0],e[1]=t[1],this._transformInPlaceXY?.(e)}}const l={c:[[0,0],[0,0]]},p={a:[[0,0],[0,0],0,0,0,0,0]},y={b:[[0,0],[0,0],[0,0]]};export{u as FlatFeatureSetParserContext};
|
|
@@ -47,7 +47,7 @@ export interface RasterClassBreaksRendererParameters extends RasterRendererParam
|
|
|
47
47
|
* @default natural-breaks
|
|
48
48
|
* @since 5.0
|
|
49
49
|
*/
|
|
50
|
-
classificationMethod?: ClassificationMethod
|
|
50
|
+
classificationMethod?: Exclude<ClassificationMethod, "manual">;
|
|
51
51
|
/**
|
|
52
52
|
* Only applicable when `classificationMethod` is `defined-interval`. Specifies the interval of each break.
|
|
53
53
|
* Note this may cause the last break to extend beyond the actual data max.
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* @since 4.23
|
|
19
19
|
*/
|
|
20
20
|
import type FlowRenderer from "../../../renderers/FlowRenderer.js";
|
|
21
|
+
import type RotationVariable from "../../../renderers/visualVariables/RotationVariable.js";
|
|
21
22
|
import type { VisualVariable } from "../../../renderers/types.js";
|
|
22
23
|
import type { RendererLegendOptionsProperties } from "../../../renderers/support/RendererLegendOptions.js";
|
|
23
24
|
import type { RasterRendererParameters } from "./types.js";
|
|
@@ -137,7 +138,7 @@ export interface FlowRendererResult {
|
|
|
137
138
|
* Visual variables
|
|
138
139
|
* included in the output renderer.
|
|
139
140
|
*/
|
|
140
|
-
visualVariables: VisualVariable[];
|
|
141
|
+
visualVariables: Exclude<VisualVariable, RotationVariable>[];
|
|
141
142
|
/**
|
|
142
143
|
* A suggested layer effect to apply to the input layer. When the
|
|
143
144
|
* `basemapTheme` is dark, a bloom is suggested to add to the layer.
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
|
|
17
17
|
*/
|
|
18
18
|
import type Basemap from "../../Basemap.js";
|
|
19
|
+
import type PointCloudLayer from "../../layers/PointCloudLayer.js";
|
|
19
20
|
import type FeatureFilter from "../../layers/support/FeatureFilter.js";
|
|
20
21
|
import type ClassBreaksRenderer from "../../renderers/ClassBreaksRenderer.js";
|
|
21
22
|
import type PointCloudRGBRenderer from "../../renderers/PointCloudRGBRenderer.js";
|
|
@@ -29,6 +30,7 @@ import type { ClassificationMethod, NormalizationType, VisualVariableLegendOptio
|
|
|
29
30
|
import type { StandardDeviationInterval, RendererLegendTitleOption } from "../../renderers/support/types.js";
|
|
30
31
|
import type { SupportedLayer, SmartMappingTimeUnit } from "../types.js";
|
|
31
32
|
import type { ClassBreaksResult, SummaryStatisticsResult } from "../statistics/types.js";
|
|
33
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
32
34
|
import type { BasemapTheme, ColorScheme } from "../symbology/types.js";
|
|
33
35
|
|
|
34
36
|
/**
|
|
@@ -504,6 +506,13 @@ export interface VisualVariableResultBase {
|
|
|
504
506
|
}
|
|
505
507
|
|
|
506
508
|
export interface VisualVariableParameters extends VisualVariableParametersBase {
|
|
509
|
+
/**
|
|
510
|
+
* The layer for which the visualization
|
|
511
|
+
* is generated. When a client-side layer type is provided, attribute and spatial statistics are calculated
|
|
512
|
+
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
513
|
+
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
514
|
+
*/
|
|
515
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
507
516
|
/**
|
|
508
517
|
* Indicates if the size units of the symbols will be in meters. This should be `true`
|
|
509
518
|
* when generating visualizations with 3D volumetric symbology, except for layers
|
|
@@ -526,6 +535,13 @@ export type SymbolType = "2d" | "3d-flat" | "3d-volumetric" | "3d-volumetric-uni
|
|
|
526
535
|
export type ColorMixModeType = "tint" | "replace" | "multiply";
|
|
527
536
|
|
|
528
537
|
export interface ContinuousRendererParameters extends VisualVariableParametersBase {
|
|
538
|
+
/**
|
|
539
|
+
* The layer for which the visualization
|
|
540
|
+
* is generated. When a client-side layer type is provided, attribute and spatial statistics are calculated
|
|
541
|
+
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
542
|
+
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
543
|
+
*/
|
|
544
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
529
545
|
/**
|
|
530
546
|
* The type of symbol to generate. This depends on the view
|
|
531
547
|
* in which you are working and the desired visualization. This parameter does not need to be specified for layers
|
|
@@ -603,7 +619,7 @@ export interface ClassBreaksRendererParameters extends AbortOptions {
|
|
|
603
619
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
604
620
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
605
621
|
*/
|
|
606
|
-
layer:
|
|
622
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
607
623
|
/**
|
|
608
624
|
* The name of the field whose data will be queried for statistics and classified.
|
|
609
625
|
* This property is ignored if a `valueExpression` is used.
|
|
@@ -812,7 +828,7 @@ export interface PCRendererParameters extends AbortOptions {
|
|
|
812
828
|
* The layer for which the visualization
|
|
813
829
|
* is generated.
|
|
814
830
|
*/
|
|
815
|
-
layer?:
|
|
831
|
+
layer?: PointCloudLayer | null;
|
|
816
832
|
/**
|
|
817
833
|
* The size of each point expressed as a percentage. This value will determine point sizes
|
|
818
834
|
* scaled based on the given `density` of points. When the value is `100%`, the size
|
|
@@ -914,7 +930,7 @@ export interface AgeRendererParameters extends AbortOptions {
|
|
|
914
930
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
915
931
|
* are calculated from the entire layer.
|
|
916
932
|
*/
|
|
917
|
-
layer:
|
|
933
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
918
934
|
/**
|
|
919
935
|
* The name of the field, or a date value representing the start time in the
|
|
920
936
|
* age calculation. If a date value is specified, then the `endTime` parameter must reference a Date field in the layer.
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
* @see [ArcGIS Blog: Map Multiple Attributes at Once using Predominance](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/map-multiple-attributes-at-once-using-predominance/)
|
|
20
20
|
* @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
|
|
21
21
|
*/
|
|
22
|
+
import type ImageryLayer from "../../layers/ImageryLayer.js";
|
|
23
|
+
import type PointCloudLayer from "../../layers/PointCloudLayer.js";
|
|
24
|
+
import type SceneLayer from "../../layers/SceneLayer.js";
|
|
25
|
+
import type StreamLayer from "../../layers/StreamLayer.js";
|
|
26
|
+
import type KnowledgeGraphSublayer from "../../layers/knowledgeGraph/KnowledgeGraphSublayer.js";
|
|
22
27
|
import type FeatureFilter from "../../layers/support/FeatureFilter.js";
|
|
23
28
|
import type DotDensityRenderer from "../../renderers/DotDensityRenderer.js";
|
|
24
29
|
import type MapView from "../../views/MapView.js";
|
|
@@ -99,7 +104,7 @@ export interface RendererParameters extends AbortOptions {
|
|
|
99
104
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
100
105
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
101
106
|
*/
|
|
102
|
-
layer?: SupportedLayer | null;
|
|
107
|
+
layer?: Exclude<SupportedLayer, ImageryLayer | KnowledgeGraphSublayer | PointCloudLayer | SceneLayer | StreamLayer> | null;
|
|
103
108
|
/**
|
|
104
109
|
* A set of complementary numeric fields/expressions used as the basis of the dot density visualization. For example,
|
|
105
110
|
* if creating an election map, you would indicate the names of each field representing the candidate or political party where
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
* @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
|
|
16
16
|
* @see [Sample - Explore point data with a heatmap](https://developers.arcgis.com/javascript/latest/sample-code/visualization-heatmap/)
|
|
17
17
|
*/
|
|
18
|
+
import type ImageryLayer from "../../layers/ImageryLayer.js";
|
|
19
|
+
import type PointCloudLayer from "../../layers/PointCloudLayer.js";
|
|
20
|
+
import type KnowledgeGraphSublayer from "../../layers/knowledgeGraph/KnowledgeGraphSublayer.js";
|
|
18
21
|
import type FeatureFilter from "../../layers/support/FeatureFilter.js";
|
|
19
22
|
import type HeatmapRenderer from "../../renderers/HeatmapRenderer.js";
|
|
20
23
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
@@ -87,7 +90,7 @@ export interface HeatmapRendererParameters extends AbortOptions {
|
|
|
87
90
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
88
91
|
* are calculated from the entire layer.
|
|
89
92
|
*/
|
|
90
|
-
layer?: SupportedLayer | null;
|
|
93
|
+
layer?: Exclude<SupportedLayer, ImageryLayer | KnowledgeGraphSublayer | PointCloudLayer> | null;
|
|
91
94
|
/**
|
|
92
95
|
* The name of the field whose data will be queried for statistics and used for
|
|
93
96
|
* the basis of the data-driven visualization. The value of the `field` is used as a multiplier in the heatmap, making
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type FeatureFilter from "../../layers/support/FeatureFilter.js";
|
|
12
12
|
import type SimpleRenderer from "../../renderers/SimpleRenderer.js";
|
|
13
13
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
14
|
-
import type {
|
|
14
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
15
15
|
import type { LocationScheme, BasemapTheme } from "../symbology/types.js";
|
|
16
16
|
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
|
|
17
17
|
|
|
@@ -55,7 +55,7 @@ export interface RendererParameters extends AbortOptions {
|
|
|
55
55
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
56
56
|
* are calculated from the entire layer.
|
|
57
57
|
*/
|
|
58
|
-
layer?:
|
|
58
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
59
59
|
/**
|
|
60
60
|
* In authoring apps,
|
|
61
61
|
* the user may select a pre-defined location scheme. Pass the scheme object to this property to avoid getting one
|
|
@@ -23,8 +23,8 @@ import type OpacityVariable from "../../renderers/visualVariables/OpacityVariabl
|
|
|
23
23
|
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
|
|
24
24
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
25
25
|
import type { VisualVariableLegendOptions as IVisualVariableLegendOptions } from "../../renderers/types.js";
|
|
26
|
-
import type { SupportedLayer } from "../types.js";
|
|
27
26
|
import type { SummaryStatisticsResult } from "../statistics/types.js";
|
|
27
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* This method generates an opacity visual variable
|
|
@@ -94,7 +94,7 @@ export interface VisualVariableParameters extends AbortOptions {
|
|
|
94
94
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
95
95
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
96
96
|
*/
|
|
97
|
-
layer?:
|
|
97
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
98
98
|
/**
|
|
99
99
|
* The name of the field whose data will be queried for statistics and used for
|
|
100
100
|
* the basis of the data-driven visualization.
|
|
@@ -35,8 +35,8 @@ import type * as sizeCreator from "./size.js";
|
|
|
35
35
|
import type MapView from "../../views/MapView.js";
|
|
36
36
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
37
37
|
import type { RendererLegendTitleOption } from "../../renderers/support/types.js";
|
|
38
|
-
import type { SupportedLayer } from "../types.js";
|
|
39
38
|
import type { Attribute, UniqueValuesResult } from "../statistics/types.js";
|
|
39
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
40
40
|
import type { PieChartScheme, BasemapTheme } from "../symbology/types.js";
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -114,7 +114,7 @@ export interface RendererParameters extends AbortOptions {
|
|
|
114
114
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
115
115
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
116
116
|
*/
|
|
117
|
-
layer?:
|
|
117
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
118
118
|
/**
|
|
119
119
|
* A set of complementary numeric fields/expressions used to create the charts.
|
|
120
120
|
* For example, if creating an election map, you would indicate the name of each field representing
|
|
@@ -33,8 +33,8 @@ import type * as typeCreator from "./type.js";
|
|
|
33
33
|
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
|
|
34
34
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
35
35
|
import type { RendererLegendTitleOption } from "../../renderers/support/types.js";
|
|
36
|
-
import type { SupportedLayer } from "../types.js";
|
|
37
36
|
import type { UniqueValueInfo } from "./type.js";
|
|
37
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
38
38
|
import type { PredominanceScheme, BasemapTheme } from "../symbology/types.js";
|
|
39
39
|
|
|
40
40
|
/**
|
|
@@ -129,7 +129,7 @@ export interface RendererParameters extends AbortOptions {
|
|
|
129
129
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
130
130
|
* are calculated from the entire layer.
|
|
131
131
|
*/
|
|
132
|
-
layer?:
|
|
132
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
133
133
|
/**
|
|
134
134
|
* A set of competing numeric fields used as the basis of the predominance visualization. For example,
|
|
135
135
|
* if creating an election map, you would indicate the names of each field representing the candidate or political party where
|
|
@@ -53,9 +53,9 @@ import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
|
|
|
53
53
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
54
54
|
import type { RelationshipNumClasses } from "../../renderers/types.js";
|
|
55
55
|
import type { RendererLegendOptionsProperties } from "../../renderers/support/RendererLegendOptions.js";
|
|
56
|
-
import type { SupportedLayer } from "../types.js";
|
|
57
56
|
import type { UniqueValueInfo } from "./type.js";
|
|
58
57
|
import type { ClassBreak, ClassBreaksResult } from "../statistics/types.js";
|
|
58
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
59
59
|
import type { RelationshipScheme, BasemapTheme } from "../symbology/types.js";
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -146,7 +146,7 @@ export interface RendererParameters extends AbortOptions {
|
|
|
146
146
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
147
147
|
* are calculated from the entire layer.
|
|
148
148
|
*/
|
|
149
|
-
layer?:
|
|
149
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
150
150
|
/**
|
|
151
151
|
* A numeric field that will be used to explore its relationship with `field2`. In the default visualization,
|
|
152
152
|
* the values of this field are rendered along the vertical axis of the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-legend/).
|
|
@@ -27,9 +27,10 @@ import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
|
27
27
|
import type { DateProperties } from "../../intl/date.js";
|
|
28
28
|
import type { ClassificationMethod, NormalizationType, VisualVariableLegendOptions } from "../../renderers/types.js";
|
|
29
29
|
import type { StandardDeviationInterval, RendererLegendTitleOption } from "../../renderers/support/types.js";
|
|
30
|
-
import type {
|
|
30
|
+
import type { SmartMappingTimeUnit } from "../types.js";
|
|
31
31
|
import type { SpikeSymbolStyle } from "./support/spikeUtils.js";
|
|
32
32
|
import type { ClassBreaksResult, SummaryStatisticsResult } from "../statistics/types.js";
|
|
33
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
33
34
|
import type { BasemapTheme, SizeScheme, TypeScheme } from "../symbology/types.js";
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -307,7 +308,7 @@ export interface VisualVariableParamsBase extends AbortOptions {
|
|
|
307
308
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
308
309
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
309
310
|
*/
|
|
310
|
-
layer:
|
|
311
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
311
312
|
/**
|
|
312
313
|
* The name of the field whose data will be queried for statistics and used for
|
|
313
314
|
* the basis of the data-driven visualization.
|
|
@@ -590,7 +591,7 @@ export interface UpdateRendererWithReferenceSizeParameters {
|
|
|
590
591
|
* The layer for which the renderer
|
|
591
592
|
* is updated.
|
|
592
593
|
*/
|
|
593
|
-
layer:
|
|
594
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
594
595
|
/** The renderer instance to update if not already set on the `layer`. */
|
|
595
596
|
renderer?: ClassBreaksRenderer | UniqueValueRenderer;
|
|
596
597
|
/** The name of a numeric field used to dynamically change the inner dot size. */
|
|
@@ -641,7 +642,7 @@ export interface UpdateRendererWithSpikeParameters {
|
|
|
641
642
|
* The layer for which the renderer
|
|
642
643
|
* is updated.
|
|
643
644
|
*/
|
|
644
|
-
layer:
|
|
645
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
645
646
|
/** The renderer instance to update if not already set on the `layer`. */
|
|
646
647
|
renderer?: ClassBreaksRenderer | UniqueValueRenderer;
|
|
647
648
|
/** The name of a numeric field used to dynamically change the spike height. */
|
|
@@ -682,7 +683,7 @@ export interface ClassBreaksRendererParameters extends AbortOptions {
|
|
|
682
683
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
683
684
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
684
685
|
*/
|
|
685
|
-
layer:
|
|
686
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
686
687
|
/**
|
|
687
688
|
* The name of the field whose data will be queried for statistics and classified.
|
|
688
689
|
* This property is ignored if a `valueExpression` is used.
|
|
@@ -887,7 +888,7 @@ export interface AgeRendererParameters extends AbortOptions {
|
|
|
887
888
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
888
889
|
* are calculated from the entire layer.
|
|
889
890
|
*/
|
|
890
|
-
layer:
|
|
891
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
891
892
|
/**
|
|
892
893
|
* The name of the field, or a date value representing the start time in the
|
|
893
894
|
* age calculation. If a date value is specified, then the `endTime` parameter must reference a Date field in the layer.
|
|
@@ -10,7 +10,7 @@ import type FeatureFilter from "../../../layers/support/FeatureFilter.js";
|
|
|
10
10
|
import type { MapViewOrSceneView } from "../../../views/MapViewOrSceneView.js";
|
|
11
11
|
import type { AbortOptions } from "../../../core/promiseUtils.js";
|
|
12
12
|
import type { RendererUnion } from "../../../renderers/types.js";
|
|
13
|
-
import type {
|
|
13
|
+
import type { FeatureLikeLayerOrAdapter } from "../../support/adapters/types.js";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Regenerates the renderer for a layer based on the current state of the layer and view.
|
|
@@ -22,7 +22,7 @@ export function regenerateRenderer(params: RegenerateRendererParameters): Promis
|
|
|
22
22
|
|
|
23
23
|
export interface RegenerateRendererParameters extends AbortOptions {
|
|
24
24
|
/** The layer for which to regenerate the renderer. */
|
|
25
|
-
layer:
|
|
25
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
26
26
|
/** The view in which the layer is rendered. */
|
|
27
27
|
view: MapViewOrSceneView;
|
|
28
28
|
/**
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
* @since 4.4
|
|
17
17
|
* @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
|
|
18
18
|
*/
|
|
19
|
+
import type PointCloudLayer from "../../layers/PointCloudLayer.js";
|
|
19
20
|
import type FeatureFilter from "../../layers/support/FeatureFilter.js";
|
|
20
21
|
import type PointCloudUniqueValueRenderer from "../../renderers/PointCloudUniqueValueRenderer.js";
|
|
21
22
|
import type UniqueValueRenderer from "../../renderers/UniqueValueRenderer.js";
|
|
22
23
|
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
|
|
23
24
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
24
25
|
import type { RendererLegendOptionsProperties } from "../../renderers/support/RendererLegendOptions.js";
|
|
25
|
-
import type { SupportedLayer } from "../types.js";
|
|
26
26
|
import type { UniqueValuesResult } from "../statistics/types.js";
|
|
27
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
27
28
|
import type { BasemapTheme, TypeScheme } from "../symbology/types.js";
|
|
28
29
|
import type { SymbolUnion } from "../../symbols/types.js";
|
|
29
30
|
|
|
@@ -125,7 +126,7 @@ export interface RendererParameters extends AbortOptions {
|
|
|
125
126
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
126
127
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
127
128
|
*/
|
|
128
|
-
layer?:
|
|
129
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
129
130
|
/**
|
|
130
131
|
* The name of the field from which to extract unique values that will be used for
|
|
131
132
|
* the basis of the data-driven visualization.
|
|
@@ -346,7 +347,7 @@ export interface PCClassRendererParameters extends AbortOptions {
|
|
|
346
347
|
* The layer for which the visualization
|
|
347
348
|
* is generated.
|
|
348
349
|
*/
|
|
349
|
-
layer?:
|
|
350
|
+
layer?: PointCloudLayer | null;
|
|
350
351
|
/**
|
|
351
352
|
* The name of the field containing classification data for the given layer.
|
|
352
353
|
* A common field name used for this renderer type is `CLASS_CODE`, though other fields can be used.
|
|
@@ -36,8 +36,8 @@ import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
|
|
|
36
36
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
37
37
|
import type { VisualVariableLegendOptions } from "../../renderers/types.js";
|
|
38
38
|
import type { UnivariateSymbolStyle, UnivariateTheme } from "../../renderers/support/types.js";
|
|
39
|
-
import type { SupportedLayer } from "../types.js";
|
|
40
39
|
import type { SummaryStatisticsResult } from "../statistics/types.js";
|
|
40
|
+
import type { FeatureLikeLayerOrAdapter } from "../support/adapters/types.js";
|
|
41
41
|
import type { BasemapTheme, ColorScheme, SizeScheme } from "../symbology/types.js";
|
|
42
42
|
import type { SymbolUnion } from "../../symbols/types.js";
|
|
43
43
|
|
|
@@ -180,7 +180,7 @@ export interface VisualVariablesParamsBase extends AbortOptions {
|
|
|
180
180
|
* only from features in the view's extent. When a server-side layer type is provided, the statistics
|
|
181
181
|
* are calculated from the entire layer, unless a `valueExpression` is provided.
|
|
182
182
|
*/
|
|
183
|
-
layer?:
|
|
183
|
+
layer?: FeatureLikeLayerOrAdapter | null;
|
|
184
184
|
/**
|
|
185
185
|
* The name of the field whose data will be queried for statistics and used for
|
|
186
186
|
* the basis of the data-driven visualization.
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* @see [sizeRendererCreator.createAgeRenderer](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/renderers/size/#createAgeRenderer)
|
|
8
8
|
*/
|
|
9
9
|
import type { DateProperties } from "../../../intl/date.js";
|
|
10
|
-
import type { SmartMappingTimeUnit
|
|
10
|
+
import type { SmartMappingTimeUnit } from "../../types.js";
|
|
11
|
+
import type { FeatureLikeLayerOrAdapter } from "../../support/adapters/types.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Returns an [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression for visualizing the age of a feature based
|
|
@@ -29,7 +30,7 @@ export function getAgeExpressions(params: AgeExpressionsParameters): AgeExpressi
|
|
|
29
30
|
|
|
30
31
|
export interface AgeExpressionsParameters {
|
|
31
32
|
/** The layer from which to generate age statistics for the given `startTime` and `endTime`. */
|
|
32
|
-
layer:
|
|
33
|
+
layer: FeatureLikeLayerOrAdapter;
|
|
33
34
|
/**
|
|
34
35
|
* The start time for the age calculation. This can be a field name or a date
|
|
35
36
|
* value, such as `Date.now()`. If a `Date` is provided, then the `endTime` parameter must be a field name.
|