@arcgis/core 4.28.7 → 4.28.8

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/kernel.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.28";let t,i=r;i="4.28.7";function n(o){t=o}function m(s){const e=t?.findCredential(s);return e?.token?o(s,"token",e.token):s}has("host-webworker");export{m as addTokenParameter,s as buildDate,i as fullVersion,t as id,e as revision,n as setId,r as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.28";let t,i=r;i="4.28.8";function n(o){t=o}function m(s){const e=t?.findCredential(s);return e?.token?o(s,"token",e.token):s}has("host-webworker");export{m as addTokenParameter,s as buildDate,i as fullVersion,t as id,e as revision,n as setId,r as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.28.7",
3
+ "version": "4.28.8",
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": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- const b="20231103",c="20d65e53b5fc8739cf2fd1a2abb2fa9c964db5d3";export{b as buildDate,c as commitHash};
5
+ const e="20231107",b="2701956fe778d3eb0b5dc84951136bfe12a19332";export{e as buildDate,b as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{bidiText as t}from"../../../../../core/BidiText.js";import"../../../../../core/Error.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{throwIfAborted as r,isAbortError as i}from"../../../../../core/promiseUtils.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{diff as o,hasDiff as n}from"../../../../../core/accessorSupport/diffUtils.js";import l from"../../../../../geometry/SpatialReference.js";import{isAggregateId as c}from"../../../engine/webgl/DisplayId.js";import{WGLSymbologyType as d}from"../../../engine/webgl/enums.js";import{MeshData as h}from"../../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as f}from"../../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as u}from"../../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as m}from"../../../engine/webgl/util/Matcher.js";import{codepoints as g}from"../textUtils.js";import p from"./BaseProcessor.js";import y from"../support/ResourceManagerProxy.js";function _(e,t){const s=t-t/2,r=t+t/4;return(!e.minScale||e.minScale>=s)&&(!e.maxScale||e.maxScale<=r)}function b(e){const t=e.message,s={message:{data:{},tileKey:t.tileKey,tileKeyOrigin:t.tileKeyOrigin,version:t.version},transferList:new Array};for(const r in t.data){const e=r,i=t.data[e];if(s.message.data[e]=null,null!=i){const t=i.stride,r=i.indices.slice(0),a=i.vertices.slice(0),o=i.records.slice(0),n=i.metrics?.slice(0),l={stride:t,indices:r,vertices:a,records:o,metrics:n};s.transferList.push(r,a,o),s.message.data[e]=l}}return s}let S=class extends p{constructor(){super(...arguments),this.type="symbol",this._matchers={feature:null,aggregate:null},this._bufferData=new Map,this._bufferIds=new Map}initialize(){this.addHandles([this.tileStore.on("update",this.onTileUpdate.bind(this))]),this._resourceManagerProxy=new y(this.remoteClient)}destroy(){this._resourceManagerProxy.destroy()}get supportsTileUpdates(){return!0}forEachBufferId(e){this._bufferIds.forEach((t=>{t.forEach(e)}))}async update(e,t){const s=t.schema.processors[0];if("symbol"!==s.type)return;const r=o(this._schema,s);(n(r,"mesh")||n(r,"target"))&&(e.mesh=!0,e.why?.mesh.push("Symbology changed"),this._schema=s,this._factory=this._createFactory(s),this._factory.update(s,this.tileStore.tileScheme.tileInfo))}onTileMessage(e,t,s,i){return r(i),this._onTileData(e,t,s,i)}onTileClear(e,t){const s={clear:!0,end:t};return this._bufferData.delete(e.key.id),this._bufferIds.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:s})}onTileError(e,t,s){const r=s.signal,i={tileKey:e.id,error:t};return this.remoteClient.invoke("tileRenderer.onTileError",i,{signal:r})}onTileUpdate(e){for(const t of e.removed)this._bufferData.has(t.key.id)&&this._bufferData.delete(t.key.id),this._bufferIds.has(t.key.id)&&this._bufferIds.delete(t.key.id);for(const t of e.added)this._bufferData.forEach((e=>{for(const s of e)s.message.tileKey===t.id&&this._updateTileMesh("append",t,b(s),[],!1,!1,null)}))}_addBufferData(e,t){this._bufferData.has(e)||this._bufferData.set(e,[]),this._bufferData.get(e)?.push(b(t))}_createFactory(e){const{geometryType:t,objectIdField:s,fields:r}=this.service,i=(e,t)=>this.remoteClient.invoke("tileRenderer.getMaterialItems",e,t),a={geometryType:t,fields:r,spatialReference:l.fromJSON(this.spatialReference)},o=new u(i,this.tileStore.tileScheme.tileInfo),{matcher:n,aggregateMatcher:c}=e.mesh;return this._store=o,this._matchers.feature=m(n,o,a,this._resourceManagerProxy),this._matchers.aggregate=c?m(c,o,a,this._resourceManagerProxy):null,new f(t,s,o)}async _onTileData(e,t,s,i){r(i);const{type:a,addOrUpdate:o,remove:n,clear:l,end:c}=t,d=!!this._schema.mesh.sortKey;if(!o){const t={type:a,addOrUpdate:null,remove:n,clear:l,end:c,sort:d};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t},i)}const h=this._processFeatures(e,o,s,i,t.status?.version);try{const s=await h;if(null==s){const t={type:a,addOrUpdate:null,remove:n,clear:l,end:c,sort:d};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t},i)}const r=[];for(const t of s){let s=!1;const i=t.message.bufferIds,a=e.key.id,o=t.message.tileKey;if(a!==o&&null!=i){if(!this.tileStore.get(o)){this._addBufferData(a,t),r.push(t);continue}let e=this._bufferIds.get(o);e||(e=new Set,this._bufferIds.set(o,e));const n=Array.from(i);for(const t of n){if(e.has(t)){s=!0;break}e.add(t)}}s||(this._addBufferData(a,t),r.push(t))}await Promise.all(r.map((s=>{const r=e.key.id===s.message.tileKey,o=r?t.remove:[],n=r&&t.end;return this._updateTileMesh(a,e,s,o,n,!!t.clear,i.signal)})))}catch(f){this._handleError(e,f,i)}}async _updateTileMesh(e,t,s,i,a,o,n){const l=e,c=s.message.tileKey,d=!!this._schema.mesh.sortKey;c!==t.key.id&&(a=!1);const h=s?.message,f={type:l,addOrUpdate:h,remove:i,clear:o,end:a,sort:d},u={transferList:s?.transferList??[],signal:n};return r(u),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:c,data:f},u)}async _processFeatures(e,t,s,i,a){if(null==t||!t.hasFeatures)return null;const o={transform:e.transform,hasZ:!1,hasM:!1},n=this._factory,l={viewingMode:"",scale:e.scale},c=await this._matchers.feature,d=await this._matchers.aggregate;r(i);const h=this._getLabelInfos(e,t);return await n.analyze(t.getCursor(),this._resourceManagerProxy,c,d,o,l),r(i),this._writeFeatureSet(e,t,o,h,n,s,a)}_writeFeatureSet(e,t,s,r,i,a,o){const n=t.getSize(),l=this._schema.mesh.matcher.symbologyType,c=new h(e.key.id,{features:n,records:n,metrics:0},l,a,l!==d.HEATMAP,o),f={viewingMode:"",scale:e.scale},u=t.getCursor();for(;u.next();)try{const t=u.getDisplayId(),a=null!=r?r.get(t):null;i.writeCursor(c,u,s,f,e.level,a,this._resourceManagerProxy)}catch(g){}const m=e.tileInfoView.tileInfo.isWrappable;return c.serialize(m)}_handleError(e,t,s){if(!i(t)){const r={tileKey:e.id,error:t.message};return this.remoteClient.invoke("tileRenderer.onTileError",r,{signal:s.signal})}return Promise.resolve()}_getLabelingSchemaForScale(e){const t=this._schema.mesh.labels;if(null==t)return null;if("subtype"===t.type){const s={type:"subtype",classes:{}};let r=!1;for(const i in t.classes){const a=t.classes[i].filter((t=>_(t,e.scale)));r=r||!!a.length,s.classes[i]=a}return r?s:null}const s=t.classes.filter((t=>_(t,e.scale)));return s.length?{type:"simple",classes:s}:null}_getLabels(e,t){if("subtype"===t.type){const r=this.service.subtypeField;s(r,"Expected to find subtype Field");const i=e.readAttribute(r);return null==i?[]:t.classes[i]??[]}return t.classes}_getLabelInfos(e,s){const r=this._getLabelingSchemaForScale(e);if(null==r)return null;const i=new Map,a=s.getCursor();for(;a.next();){const e=a.getDisplayId(),s=[],o=c(e),n=o&&1!==a.readAttribute("cluster_count")?"aggregate":"feature",l=this._getLabels(a,r);for(const r of l){if(r.target!==n)continue;const i=a.getStorage(),l=o&&"feature"===n?i.getComputedStringAtIndex(a.readAttribute("referenceId"),r.fieldIndex):i.getComputedStringAtIndex(e,r.fieldIndex);if(!l)continue;const c=t(l.toString()),d=c[0],h=c[1];this._store.getMosaicItem(r.symbol,g(d)).then((e=>{s[r.index]={glyphs:e.glyphMosaicItems??[],rtl:h,index:r.index}}))}i.set(e,s)}return i}};S=e([a("esri.views.2d.layers.features.processors.SymbolProcessor")],S);const w=S;export{w as default};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{bidiText as t}from"../../../../../core/BidiText.js";import"../../../../../core/Error.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{throwIfAborted as r,isAbortError as i}from"../../../../../core/promiseUtils.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{diff as o,hasDiff as n}from"../../../../../core/accessorSupport/diffUtils.js";import l from"../../../../../geometry/SpatialReference.js";import{isAggregateId as c}from"../../../engine/webgl/DisplayId.js";import{WGLSymbologyType as d}from"../../../engine/webgl/enums.js";import{MeshData as h}from"../../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as f}from"../../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as u}from"../../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as m}from"../../../engine/webgl/util/Matcher.js";import{codepoints as g}from"../textUtils.js";import p from"./BaseProcessor.js";import y from"../support/ResourceManagerProxy.js";function _(e,t){const s=t-t/4,r=t+t/2;return(!e.minScale||e.minScale>=s)&&(!e.maxScale||e.maxScale<=r)}function b(e){const t=e.message,s={message:{data:{},tileKey:t.tileKey,tileKeyOrigin:t.tileKeyOrigin,version:t.version},transferList:new Array};for(const r in t.data){const e=r,i=t.data[e];if(s.message.data[e]=null,null!=i){const t=i.stride,r=i.indices.slice(0),a=i.vertices.slice(0),o=i.records.slice(0),n=i.metrics?.slice(0),l={stride:t,indices:r,vertices:a,records:o,metrics:n};s.transferList.push(r,a,o),s.message.data[e]=l}}return s}let S=class extends p{constructor(){super(...arguments),this.type="symbol",this._matchers={feature:null,aggregate:null},this._bufferData=new Map,this._bufferIds=new Map}initialize(){this.addHandles([this.tileStore.on("update",this.onTileUpdate.bind(this))]),this._resourceManagerProxy=new y(this.remoteClient)}destroy(){this._resourceManagerProxy.destroy()}get supportsTileUpdates(){return!0}forEachBufferId(e){this._bufferIds.forEach((t=>{t.forEach(e)}))}async update(e,t){const s=t.schema.processors[0];if("symbol"!==s.type)return;const r=o(this._schema,s);(n(r,"mesh")||n(r,"target"))&&(e.mesh=!0,e.why?.mesh.push("Symbology changed"),this._schema=s,this._factory=this._createFactory(s),this._factory.update(s,this.tileStore.tileScheme.tileInfo))}onTileMessage(e,t,s,i){return r(i),this._onTileData(e,t,s,i)}onTileClear(e,t){const s={clear:!0,end:t};return this._bufferData.delete(e.key.id),this._bufferIds.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:s})}onTileError(e,t,s){const r=s.signal,i={tileKey:e.id,error:t};return this.remoteClient.invoke("tileRenderer.onTileError",i,{signal:r})}onTileUpdate(e){for(const t of e.removed)this._bufferData.has(t.key.id)&&this._bufferData.delete(t.key.id),this._bufferIds.has(t.key.id)&&this._bufferIds.delete(t.key.id);for(const t of e.added)this._bufferData.forEach((e=>{for(const s of e)s.message.tileKey===t.id&&this._updateTileMesh("append",t,b(s),[],!1,!1,null)}))}_addBufferData(e,t){this._bufferData.has(e)||this._bufferData.set(e,[]),this._bufferData.get(e)?.push(b(t))}_createFactory(e){const{geometryType:t,objectIdField:s,fields:r}=this.service,i=(e,t)=>this.remoteClient.invoke("tileRenderer.getMaterialItems",e,t),a={geometryType:t,fields:r,spatialReference:l.fromJSON(this.spatialReference)},o=new u(i,this.tileStore.tileScheme.tileInfo),{matcher:n,aggregateMatcher:c}=e.mesh;return this._store=o,this._matchers.feature=m(n,o,a,this._resourceManagerProxy),this._matchers.aggregate=c?m(c,o,a,this._resourceManagerProxy):null,new f(t,s,o)}async _onTileData(e,t,s,i){r(i);const{type:a,addOrUpdate:o,remove:n,clear:l,end:c}=t,d=!!this._schema.mesh.sortKey;if(!o){const t={type:a,addOrUpdate:null,remove:n,clear:l,end:c,sort:d};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t},i)}const h=this._processFeatures(e,o,s,i,t.status?.version);try{const s=await h;if(null==s){const t={type:a,addOrUpdate:null,remove:n,clear:l,end:c,sort:d};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t},i)}const r=[];for(const t of s){let s=!1;const i=t.message.bufferIds,a=e.key.id,o=t.message.tileKey;if(a!==o&&null!=i){if(!this.tileStore.get(o)){this._addBufferData(a,t),r.push(t);continue}let e=this._bufferIds.get(o);e||(e=new Set,this._bufferIds.set(o,e));const n=Array.from(i);for(const t of n){if(e.has(t)){s=!0;break}e.add(t)}}s||(this._addBufferData(a,t),r.push(t))}await Promise.all(r.map((s=>{const r=e.key.id===s.message.tileKey,o=r?t.remove:[],n=r&&t.end;return this._updateTileMesh(a,e,s,o,n,!!t.clear,i.signal)})))}catch(f){this._handleError(e,f,i)}}async _updateTileMesh(e,t,s,i,a,o,n){const l=e,c=s.message.tileKey,d=!!this._schema.mesh.sortKey;c!==t.key.id&&(a=!1);const h=s?.message,f={type:l,addOrUpdate:h,remove:i,clear:o,end:a,sort:d},u={transferList:s?.transferList??[],signal:n};return r(u),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:c,data:f},u)}async _processFeatures(e,t,s,i,a){if(null==t||!t.hasFeatures)return null;const o={transform:e.transform,hasZ:!1,hasM:!1},n=this._factory,l={viewingMode:"",scale:e.scale},c=await this._matchers.feature,d=await this._matchers.aggregate;r(i);const h=this._getLabelInfos(e,t);return await n.analyze(t.getCursor(),this._resourceManagerProxy,c,d,o,l),r(i),this._writeFeatureSet(e,t,o,h,n,s,a)}_writeFeatureSet(e,t,s,r,i,a,o){const n=t.getSize(),l=this._schema.mesh.matcher.symbologyType,c=new h(e.key.id,{features:n,records:n,metrics:0},l,a,l!==d.HEATMAP,o),f={viewingMode:"",scale:e.scale},u=t.getCursor();for(;u.next();)try{const t=u.getDisplayId(),a=null!=r?r.get(t):null;i.writeCursor(c,u,s,f,e.level,a,this._resourceManagerProxy)}catch(g){}const m=e.tileInfoView.tileInfo.isWrappable;return c.serialize(m)}_handleError(e,t,s){if(!i(t)){const r={tileKey:e.id,error:t.message};return this.remoteClient.invoke("tileRenderer.onTileError",r,{signal:s.signal})}return Promise.resolve()}_getLabelingSchemaForScale(e){const t=this._schema.mesh.labels;if(null==t)return null;if("subtype"===t.type){const s={type:"subtype",classes:{}};let r=!1;for(const i in t.classes){const a=t.classes[i].filter((t=>_(t,e.scale)));r=r||!!a.length,s.classes[i]=a}return r?s:null}const s=t.classes.filter((t=>_(t,e.scale)));return s.length?{type:"simple",classes:s}:null}_getLabels(e,t){if("subtype"===t.type){const r=this.service.subtypeField;s(r,"Expected to find subtype Field");const i=e.readAttribute(r);return null==i?[]:t.classes[i]??[]}return t.classes}_getLabelInfos(e,s){const r=this._getLabelingSchemaForScale(e);if(null==r)return null;const i=new Map,a=s.getCursor();for(;a.next();){const e=a.getDisplayId(),s=[],o=c(e),n=o&&1!==a.readAttribute("cluster_count")?"aggregate":"feature",l=this._getLabels(a,r);for(const r of l){if(r.target!==n)continue;const i=a.getStorage(),l=o&&"feature"===n?i.getComputedStringAtIndex(a.readAttribute("referenceId"),r.fieldIndex):i.getComputedStringAtIndex(e,r.fieldIndex);if(!l)continue;const c=t(l.toString()),d=c[0],h=c[1];this._store.getMosaicItem(r.symbol,g(d)).then((e=>{s[r.index]={glyphs:e.glyphMosaicItems??[],rtl:h,index:r.index}}))}i.set(e,s)}return i}};S=e([a("esri.views.2d.layers.features.processors.SymbolProcessor")],S);const w=S;export{w as default};