@vertigis/arcgis-extensions 38.0.1 → 38.0.2

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.
@@ -16,7 +16,7 @@
16
16
  <li><a href="../modules/version.html">version</a></li>
17
17
  <li><a href="version.version.html">version</a></li></ul>
18
18
  <h1>Variable version<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
19
- <div class="tsd-signature">version<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;38.0.1&quot;</span><span class="tsd-signature-symbol"> = &quot;38.0.1&quot;</span></div>
19
+ <div class="tsd-signature">version<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;38.0.2&quot;</span><span class="tsd-signature-symbol"> = &quot;38.0.2&quot;</span></div>
20
20
  <div class="tsd-comment tsd-typography"><p>The current version of the Geocortex ArcGIS Extensions API.</p>
21
21
  </div></div>
22
22
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vertigis/arcgis-extensions",
3
3
  "license": "SEE LICENSE IN LICENSE",
4
- "version": "38.0.1",
4
+ "version": "38.0.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://geocortex.visualstudio.com/Geocortex/_git/geocortex-api-ts"
@@ -1 +1 @@
1
- import{whenOnce}from"@arcgis/core/core/reactiveUtils.js";import EsriExtent from"@arcgis/core/geometry/Extent";import EsriSpatialReference from"@arcgis/core/geometry/SpatialReference";import{geographicToWebMercator,webMercatorToGeographic}from"@arcgis/core/geometry/support/webMercatorUtils";import Portal from"@arcgis/core/portal/Portal";import PortalItem from"@arcgis/core/portal/PortalItem";import{isWMSLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{parallelEach}from"../utilities/promise.js";import{SpatialReference}from"./SpatialReference.js";import{WMSSublayer}from"./WMSSublayer.js";import{applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var WMSLayer;!function(e){async function r(e,r,a){if(checkArg("layerJson",e).isNotMissing(),checkArg("layer",r).isNotMissing().satisfies(isWMSLayer),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"WMS"===e)),applyLayerBaseToEsriApiLayer(e,r),applyBasemapLayerToEsriApiLayer(e,r),applyOperationalLayerToEsriApiLayer(e,r),e.hasOwnProperty("copyright")&&(r.copyright=e.copyright),e.hasOwnProperty("customLayerParameters")&&(r.customLayerParameters={...e.customLayerParameters}),e.hasOwnProperty("customParameters")&&(r.customParameters={...e.customParameters}),e.hasOwnProperty("featureInfoFormat")&&(r.featureInfoFormat=e.featureInfoFormat),e.hasOwnProperty("featureInfoUrl")&&(r.featureInfoUrl=e.featureInfoUrl),r.imageFormat=e.hasOwnProperty("format")?e.format:"image/png",e.hasOwnProperty("itemId")&&(r.portalItem?r.portalItem.id=e.itemId:r.portalItem=new PortalItem({id:e.itemId,portal:a||Portal.getDefault()})),e.hasOwnProperty("layers")){const a=async()=>{await parallelEach(e.layers,(async e=>{const a=r.sublayers.find((r=>r.name===e.name));a&&await WMSSublayer.applyToEsriApiWMSSublayer(e,a)})),r.sublayers.removeMany(r.sublayers.filter((r=>!e.layers.some((e=>e.name===r.name)))))};r.sublayers?await a():(async()=>{await whenOnce((()=>r.sublayers)),await a()})()}if(e.hasOwnProperty("visibleLayers")){const a=()=>r.sublayers.forEach((r=>{r.visible=e.visibleLayers.includes(r.name)}));r.sublayers?a():(async()=>{await whenOnce((()=>r.sublayers)),a()})()}if(e.hasOwnProperty("mapUrl")&&(r.mapUrl=e.mapUrl),e.hasOwnProperty("maxHeight")&&(r.imageMaxHeight=e.maxHeight),e.hasOwnProperty("maxWidth")&&(r.imageMaxWidth=e.maxWidth),e.hasOwnProperty("spatialReferences")&&e.spatialReferences.length&&(r.spatialReferences=e.spatialReferences.slice(),r.spatialReference||(r.spatialReference=SpatialReference.toEsriApiSpatialReference({wkid:e.spatialReferences[0]}))),e.hasOwnProperty("extent")){const a=new EsriExtent({xmin:e.extent[0][0],ymin:e.extent[0][1],xmax:e.extent[1][0],ymax:e.extent[1][1],spatialReference:EsriSpatialReference.WGS84});(r.spatialReference.isWGS84||r.spatialReference.isWebMercator)&&(r.fullExtent=r.spatialReference.isWGS84?a:geographicToWebMercator(a))}e.hasOwnProperty("url")&&(r.url=e.url),e.hasOwnProperty("version")&&(r.version=e.version)}e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"WMS"===e));const a=new((await import("@arcgis/core/layers/WMSLayer")).default);return await r(e,a),a},e.applyToEsriApiLayer=r,e.fromEsriApiLayer=function(e){checkArg("layer",e).isNotMissing();const r={...fromEsriApiLayerToLayerBase(e),...fromEsriApiLayerToOperationalLayer(e),layerType:"WMS",visibleLayers:[]};if(e.copyright&&(r.copyright=e.copyright),e.customLayerParameters&&(r.customLayerParameters={...e.customLayerParameters}),e.customParameters&&(r.customParameters={...e.customParameters}),e.fullExtent&&(e.spatialReference.isWGS84||e.spatialReference.isWebMercator)){const a=e.spatialReference.isWGS84?e.fullExtent:webMercatorToGeographic(e.fullExtent,!1);r.extent=[[],[]],r.extent[0][0]=a.xmin,r.extent[0][1]=a.ymin,r.extent[1][0]=a.xmax,r.extent[1][1]=a.ymax}return e.featureInfoFormat&&(r.featureInfoFormat=e.featureInfoFormat),e.featureInfoUrl&&(r.featureInfoUrl=e.featureInfoUrl),e.imageFormat&&(r.format=e.imageFormat),e.portalItem&&(r.itemId=e.portalItem.id),e.sublayers&&(r.layers=[],e.sublayers.forEach((e=>{const a=WMSSublayer.fromEsriApiWMSSublayer(e);r.layers.push(a),e.visible&&r.visibleLayers.push(e.name)}))),e.imageMaxHeight&&(r.maxHeight=e.imageMaxHeight),e.imageMaxWidth&&(r.maxWidth=e.imageMaxWidth),e.mapUrl&&(r.mapUrl=e.mapUrl),e.spatialReferences&&(r.spatialReferences=e.spatialReferences.slice()),e.url&&(r.url=e.url),e.version&&(r.version=e.version),r}}(WMSLayer||(WMSLayer={}));
1
+ import{whenOnce}from"@arcgis/core/core/reactiveUtils.js";import EsriExtent from"@arcgis/core/geometry/Extent";import EsriSpatialReference from"@arcgis/core/geometry/SpatialReference";import{geographicToWebMercator,webMercatorToGeographic}from"@arcgis/core/geometry/support/webMercatorUtils";import Portal from"@arcgis/core/portal/Portal";import PortalItem from"@arcgis/core/portal/PortalItem";import{isWMSLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{parallelEach}from"../utilities/promise.js";import{SpatialReference}from"./SpatialReference.js";import{WMSSublayer}from"./WMSSublayer.js";import{applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var WMSLayer;!function(e){async function r(e,r,a){if(checkArg("layerJson",e).isNotMissing(),checkArg("layer",r).isNotMissing().satisfies(isWMSLayer),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"WMS"===e)),applyLayerBaseToEsriApiLayer(e,r),applyBasemapLayerToEsriApiLayer(e,r),applyOperationalLayerToEsriApiLayer(e,r),e.hasOwnProperty("copyright")&&(r.copyright=e.copyright),e.hasOwnProperty("customLayerParameters")&&(r.customLayerParameters={...e.customLayerParameters}),e.hasOwnProperty("customParameters")&&(r.customParameters={...e.customParameters}),e.hasOwnProperty("featureInfoFormat")&&(r.featureInfoFormat=e.featureInfoFormat),e.hasOwnProperty("featureInfoUrl")&&(r.featureInfoUrl=e.featureInfoUrl),r.imageFormat=e.hasOwnProperty("format")?e.format:"image/png",e.hasOwnProperty("itemId")&&(r.portalItem?r.portalItem.id=e.itemId:r.portalItem=new PortalItem({id:e.itemId,portal:a||Portal.getDefault()})),e.hasOwnProperty("layers")){const a=async()=>{await parallelEach(e.layers,(async e=>{const a=r.sublayers.find((r=>r.name===e.name));a&&await WMSSublayer.applyToEsriApiWMSSublayer(e,a)})),r.sublayers.removeMany(r.sublayers.filter((r=>!e.layers.some((e=>e.name===r.name)))))};r.sublayers?await a():(async()=>{await whenOnce((()=>r.sublayers)),await a()})()}if(e.hasOwnProperty("visibleLayers")){const a=()=>r.sublayers.forEach((r=>{r.visible=e.visibleLayers.includes(r.name)}));r.sublayers?a():(async()=>{await whenOnce((()=>r.sublayers)),a()})()}if(e.hasOwnProperty("mapUrl")&&(r.mapUrl=e.mapUrl),e.hasOwnProperty("maxHeight")&&(r.imageMaxHeight=e.maxHeight),e.hasOwnProperty("maxWidth")&&(r.imageMaxWidth=e.maxWidth),e.hasOwnProperty("spatialReferences")&&e.spatialReferences.length&&(r.spatialReferences=e.spatialReferences.slice(),r.spatialReference||(r.spatialReference=SpatialReference.toEsriApiSpatialReference({wkid:e.spatialReferences[0]}))),e.hasOwnProperty("extent")){const a=new EsriExtent({xmin:e.extent[0][0],ymin:e.extent[0][1],xmax:e.extent[1][0],ymax:e.extent[1][1],spatialReference:EsriSpatialReference.WGS84});(r.spatialReference?.isWGS84||r.spatialReference?.isWebMercator)&&(r.fullExtent=r.spatialReference.isWGS84?a:geographicToWebMercator(a))}e.hasOwnProperty("url")&&(r.url=e.url),e.hasOwnProperty("version")&&(r.version=e.version)}e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"WMS"===e));const a=new((await import("@arcgis/core/layers/WMSLayer")).default);return await r(e,a),a},e.applyToEsriApiLayer=r,e.fromEsriApiLayer=function(e){checkArg("layer",e).isNotMissing();const r={...fromEsriApiLayerToLayerBase(e),...fromEsriApiLayerToOperationalLayer(e),layerType:"WMS",visibleLayers:[]};if(e.copyright&&(r.copyright=e.copyright),e.customLayerParameters&&(r.customLayerParameters={...e.customLayerParameters}),e.customParameters&&(r.customParameters={...e.customParameters}),e.fullExtent&&(e.spatialReference.isWGS84||e.spatialReference.isWebMercator)){const a=e.spatialReference.isWGS84?e.fullExtent:webMercatorToGeographic(e.fullExtent,!1);r.extent=[[],[]],r.extent[0][0]=a.xmin,r.extent[0][1]=a.ymin,r.extent[1][0]=a.xmax,r.extent[1][1]=a.ymax}return e.featureInfoFormat&&(r.featureInfoFormat=e.featureInfoFormat),e.featureInfoUrl&&(r.featureInfoUrl=e.featureInfoUrl),e.imageFormat&&(r.format=e.imageFormat),e.portalItem&&(r.itemId=e.portalItem.id),e.sublayers&&(r.layers=[],e.sublayers.forEach((e=>{const a=WMSSublayer.fromEsriApiWMSSublayer(e);r.layers.push(a),e.visible&&r.visibleLayers.push(e.name)}))),e.imageMaxHeight&&(r.maxHeight=e.imageMaxHeight),e.imageMaxWidth&&(r.maxWidth=e.imageMaxWidth),e.mapUrl&&(r.mapUrl=e.mapUrl),e.spatialReferences&&(r.spatialReferences=e.spatialReferences.slice()),e.url&&(r.url=e.url),e.version&&(r.version=e.version),r}}(WMSLayer||(WMSLayer={}));
package/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The current version of the Geocortex ArcGIS Extensions API.
3
3
  */
4
- export declare const version = "38.0.1";
4
+ export declare const version = "38.0.2";
package/version.js CHANGED
@@ -1 +1 @@
1
- export const version="38.0.1";
1
+ export const version="38.0.2";