@vertigis/arcgis-extensions 51.5.2 → 51.6.1

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.
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import e from"@arcgis/core/PopupTemplate";import{Hyperlink as n}from"../Hyperlink.js";import{isPopupContentExtension as i}from"../ItemType.js";import{ArrayWrappedCollection as o}from"../mapping/support/ArrayWrappedCollection.js";import{FormatSettings as s}from"../support/FormatSettings.js";import{InitializableCollectionProxy as r}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as p,isDefault as a,serializable as u,shouldExcludeDefaults as h}from"../support/Serializable.js";import{Settings as l}from"../support/Settings.js";import{createIHandle as f,notifyChange as d,onWatch as m,watch as c}from"../support/observableUtils.js";import _ from"../utilities/_ReferenceCountedHandle.js";import{compare as g}from"../utilities/array.js";import{checkArg as C}from"../utilities/checkArg.js";import{getAllFieldInfos as S,getAllReferencedFieldNames as y,isPopupTemplate as v}from"../utilities/esri.js";import{isArcadeExpressionField as T,isRelationshipField as x}from"../utilities/field.js";import{objectKeys as A}from"../utilities/object.js";import{isQueryBasedRelationship as P}from"../utilities/relationships.js";import{caseInsensitiveEquals as z}from"../utilities/string.js";import{PopupContentExtension as E,_popupContentExtensionMap as w}from"./PopupContentExtension.js";let b=class extends l{popupContentExtensions;_isDefaultPopupTemplate=!1;_popupContentCollection;get _popupContent(){return null==this._popupContentCollection&&(this._popupContentCollection=this._createPopupContentCollection()),this._popupContentCollection}get hyperlinkTemplates(){return this._getCollectionSetting("hyperlinkTemplates")}get popupTemplate(){return this._getSetting("popupTemplate")}set popupTemplate(t){let n;n=t instanceof Object&&!v(t)?e.fromJSON(t):t;const i=this?._feature?.schema?.createPopupTemplate()??this?._featureSource?.schema?.createPopupTemplate();n&&i&&(n.content=n.content??i.content,n.fieldInfos=n.fieldInfos??i.fieldInfos),this._setSetting("popupTemplate",n),this._isDefaultPopupTemplate=!1,this.featureSource?.schema?.fieldExtensions.toArray().forEach((t=>{t._clearFieldInfoCache()}))}get showRelatedRecordsWhenUnconfigured(){return this._getSetting("showRelatedRecordsWhenUnconfigured",!0)}set showRelatedRecordsWhenUnconfigured(t){this._setSetting("showRelatedRecordsWhenUnconfigured",t)}get formatSettings(){return this._getNestedSettings("formatSettings",(()=>new s))}get returnGeometry(){return this._getSetting("returnGeometry",!0)}set returnGeometry(t){this._setSetting("returnGeometry",t)}get outFields(){return this._getSetting("outFields",this._defaultOutFields)}set outFields(t){this._setSetting("outFields",t)}get outSpatialReference(){return this._getSetting("outSpatialReference")}set outSpatialReference(t){this._setSetting("outSpatialReference",t)}get maxAllowableOffset(){return this._getSetting("maxAllowableOffset")}set maxAllowableOffset(t){this._setSetting("maxAllowableOffset",t)}get zoomScale(){return this._getSetting("zoomScale")}set zoomScale(t){this._setSetting("zoomScale",t)}get zoomFactor(){const t=this._feature?this._feature.schema:this._featureSource?.schema,e=t&&"point"===t.geometryType?void 0:1.5;return this._getSetting("zoomFactor",e)}set zoomFactor(t){this._setSetting("zoomFactor",t)}get featureSource(){return this._featureSource}get feature(){return this._feature}_featureSource;_feature;constructor(t){super(t),this.popupContentExtensions=new F(this)}get _defaultOutFields(){if(null==this.popupTemplate)return["*"];const t=S(this.popupTemplate),e=this.featureSource?.schema?.primaryKeyField;if(t&&e){const n=new Set;n.add(e);const i=this.featureSource.schema.fields.toArray().map((t=>t.name)),o=new Set([...y(this.popupTemplate),...this.hyperlinkTemplates.toArray().flatMap((t=>t.getReferencedFields()))]),s=t.filter((t=>t.visible||t.isEditable&&this.featureSource.capabilities.supportsEditing)).map((t=>t.fieldName)).concat(...o).filter((t=>i.some((e=>z(e,t)))));this._featureSource.relationships.forEach((t=>{P(t)&&s.push(t.keyField)}));const r=this.featureSource?.schema?.typeIdField;return r&&!s.some((t=>z(t,r)))&&s.push(r),s.filter((t=>!(T(t)||x(t)))).forEach((t=>n.add(t))),Array.from(n.values())}return["*"]}_setFeatureSource(t){this._featureSource=t,d(this,"featureSource")}_setFeature(t){this._feature=t,d(this,"feature")}toJSON(t="all"){const e=p(this._getSerializableProperties(),this,t)||{},n=e.popupContentExtensions?.filter((t=>{const e=this.parent;return!e?.popupContentExtensions?.some((e=>e.id===t.id))}));if(e)for(const t of A(e))this.isModified(t)||delete e[t];if(n?.length&&(e.popupContentExtensions=n),!h(t)||!a(e))return e}_createPopupContentCollection(){return new o({parent:this,targetProperty:"popupTemplate",arrayProperty:"content"})}_getSerializableProperties(){return{hyperlinkTemplates:{serializeModes:["initial"],deserialize:t=>{t.forEach((t=>{this.hyperlinkTemplates.find((e=>this._hyperlinksAreEquivalent(e,t)))||this.hyperlinkTemplates.add(t instanceof n?t:new n(t))})),this.hyperlinkTemplates.toArray().forEach((e=>{const n=this.hyperlinkTemplates.indexOf(e),i=t.findIndex((t=>this._hyperlinksAreEquivalent(t,e)));i<0?this.hyperlinkTemplates.removeAt(n):i!==n&&this.hyperlinkTemplates.reorder(e,i)}))}},popupTemplate:{serializeModes:["project"],isDefault:()=>!this._isDefaultPopupTemplate},showRelatedRecordsWhenUnconfigured:{serializeModes:["initial"],default:!0},formatSettings:"initial",outFields:{serializeModes:["initial"],serialize:()=>this.isModified("outFields")?this.outFields:void 0},returnGeometry:{serializeModes:["initial"],default:!0},outSpatialReference:"initial",maxAllowableOffset:"initial",zoomScale:"initial",zoomFactor:{serializeModes:["initial"],isDefault:t=>{const e=this._feature?this._feature.schema:this._featureSource?.schema;return t===(e&&"point"===e.geometryType?void 0:1.5)}},popupContentExtensions:{serializeModes:["initial"],serialize:t=>this.popupContentExtensions.map((e=>e.toJSON(t))).filter((t=>!(t&&2===Object.keys(t).length&&t.id&&t.content))).toArray(),deserialize:t=>{t&&g(this.popupContentExtensions,t,{onNew:(t,e)=>{this.popupContentExtensions.add(i(t)?t:new E(t),e)},onMatch:(t,e,n,o)=>{i(e)||t.assignProperties(e),n!==o&&this.popupContentExtensions.reorder(t,o)},onMissing:t=>{this.popupContentExtensions.remove(t)},equals:(t,e)=>{if(!e)return!1;if(i(e))return e===t||e.id===t.id;const n=this.popupContentExtensions.indexOf(t);if(e.content&&n>-1){const t=this.popupContentExtensions.toArray();return E.matchesRef(t,n,e.content)}return t.id===e.id}})}}}}_hyperlinksAreEquivalent(t,e){if(t===e)return!0;const n=t=>t||"";return n(t.text)===n(e.text)&&n(t.url)===n(e.url)&&n(t.iconUrl)===n(e.iconUrl)&&n(t.target)===n(e.target)&&n(t.tooltip)===n(e.tooltip)}};b=t([u],b);export{b as FeatureSettings};class F extends r{get _collection(){return this._featureSettings._popupContent.map((t=>this._forContent(t))).concat(Array.from(this._uninitializedPopupContentExtensions))}get _popupTemplateIsInherited(){return this._featureSettings.parent&&this._featureSettings.popupTemplate===this._featureSettings.parent.popupTemplate}_featureSettings;_uninitializedPopupContentExtensions=new Set;_onChangePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("change",(t=>{const e={added:(t.added||[]).map((t=>this._forContent(t))),moved:(t.moved||[]).map((t=>this._forContent(t))),removed:(t.removed||[]).map((t=>this._forContent(t))),target:this};this.emit("change",e)}))));_onBeforeAddPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-add",(t=>{this.emit("before-add",{...t,item:this._forContent(t.item),target:this})}))));_onBeforeRemovePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-remove",(t=>{this.emit("before-remove",{...t,item:this._forContent(t.item),target:this})}))));_onBeforeChangesPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-changes",(t=>{this.emit("before-changes",{...t,target:this})}))));_onAfterAddPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-add",(t=>{this.emit("after-add",{...t,item:this._forContent(t.item),target:this})}))));_onAfterRemovePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-remove",(t=>{this.emit("after-remove",{...t,item:this._forContent(t.item),target:this})}))));_onAfterChangesPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-changes",(t=>{this.emit("after-changes",{...t,target:this})}))));constructor(t){super(),this._featureSettings=t,m(this,"length",(()=>c(this._featureSettings,"_popupContent.length",(()=>d(this,"length")),{sync:!0})))}forContent(t){if(C("content",t).isNotMissing(),this._featureSettings._popupContent.includes(t))return this._forContent(t)}add(t,n){if(C("contentX",t).isNotMissing(),this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),t.featureSettings&&t.featureSettings.popupContentExtensions.remove(t),t._setFeatureSettings(this._featureSettings),t.content){const e=w.get(t.content);if(w.set(t.content,t),e&&e!==t&&this._onRemoved(e),this._featureSettings._popupContent.includes(t.content))if(void 0===n){const n={added:[t],moved:[],removed:e?[e]:[],target:this};this.emit("change",n),this.emit("after-add",{item:t,target:this}),this.emit("after-changes",{target:this}),d(this,"length")}else this._featureSettings._popupContent.reorder(t.content,n);else this._featureSettings._popupContent.add(t.content,n)}else{this._uninitializedPopupContentExtensions.add(t);const e={added:[t],moved:[],removed:[],target:this};this.emit("change",e),this.emit("after-add",{item:t,target:this}),this.emit("after-changes",{target:this}),d(this,"length")}return this._onAdded(t),this}removeAt(t){const n=this.getItemAt(t);if(void 0!==n){if(this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._uninitializedPopupContentExtensions.has(n)){this._uninitializedPopupContentExtensions.delete(n);const t={added:[],moved:[],removed:[n],target:this};this.emit("change",t),this.emit("after-remove",{item:n,target:this}),this.emit("after-changes",{target:this}),d(this,"length")}else this._featureSettings._popupContent.remove(n.content);return this._onRemoved(n),n}}reorder(t,n){if(t&&this._featureSettings._popupContent.includes(t.content))return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.reorder(t.content,n),t}sort(t){return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.sort(((e,n)=>t(this._forContent(e),this._forContent(n)))),this}on(t,e){const n=[];return"change"===t?n.push(this._onChangePopupContentHandle.add()):"before-add"===t?n.push(this._onBeforeAddPopupContentHandle.add()):"before-remove"===t?n.push(this._onBeforeRemovePopupContentHandle.add()):"before-changes"===t?n.push(this._onBeforeChangesPopupContentHandle.add()):"after-add"===t?n.push(this._onAfterAddPopupContentHandle.add()):"after-remove"===t?n.push(this._onAfterRemovePopupContentHandle.add()):"after-changes"===t&&n.push(this._onAfterChangesPopupContentHandle.add()),n.push(super.on(t,e)),f(n)}_itemIsInitialized(t){return super._itemIsInitialized(t)&&!!t.content}_onAdded(t){}_onRemoved(t){t.featureSettings===this._featureSettings&&t._setFeatureSettings(void 0)}_forContent(t){if(this._uninitializedPopupContentExtensions.size)for(const t of this._uninitializedPopupContentExtensions)t._resolveContent(),t.content&&(w.set(t.content,t),this._uninitializedPopupContentExtensions.delete(t));if(!w.has(t)){const e=new E({content:t});w.set(t,e),e._setFeatureSettings(this._featureSettings),this._onAdded(e)}return w.get(t)}}
1
+ import{__decorate as t}from"tslib";import e from"@arcgis/core/PopupTemplate";import{Hyperlink as n}from"../Hyperlink.js";import{isPopupContentExtension as i}from"../ItemType.js";import{ArrayWrappedCollection as o}from"../mapping/support/ArrayWrappedCollection.js";import{FormatSettings as s}from"../support/FormatSettings.js";import{InitializableCollectionProxy as r}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as p,isDefault as a,serializable as u,shouldExcludeDefaults as h}from"../support/Serializable.js";import{Settings as l}from"../support/Settings.js";import{createIHandle as f,notifyChange as d,onWatch as m,watch as c}from"../support/observableUtils.js";import _ from"../utilities/_ReferenceCountedHandle.js";import{compare as g}from"../utilities/array.js";import{checkArg as C}from"../utilities/checkArg.js";import{getAllFieldInfos as S,getAllReferencedFieldNames as y,isPopupTemplate as v}from"../utilities/esri.js";import{isArcadeExpressionField as T,isRelationshipField as x}from"../utilities/field.js";import{objectKeys as A}from"../utilities/object.js";import{isQueryBasedRelationship as P}from"../utilities/relationships.js";import{PopupContentExtension as z,_popupContentExtensionMap as w}from"./PopupContentExtension.js";let E=class extends l{popupContentExtensions;_isDefaultPopupTemplate=!1;_popupContentCollection;get _popupContent(){return null==this._popupContentCollection&&(this._popupContentCollection=this._createPopupContentCollection()),this._popupContentCollection}get hyperlinkTemplates(){return this._getCollectionSetting("hyperlinkTemplates")}get popupTemplate(){return this._getSetting("popupTemplate")}set popupTemplate(t){let n;n=t instanceof Object&&!v(t)?e.fromJSON(t):t;const i=this?._feature?.schema?.createPopupTemplate()??this?._featureSource?.schema?.createPopupTemplate();n&&i&&(n.content=n.content??i.content,n.fieldInfos=n.fieldInfos??i.fieldInfos),this._setSetting("popupTemplate",n),this._isDefaultPopupTemplate=!1,this.featureSource?.schema?.fieldExtensions.toArray().forEach((t=>{t._clearFieldInfoCache()}))}get showRelatedRecordsWhenUnconfigured(){return this._getSetting("showRelatedRecordsWhenUnconfigured",!0)}set showRelatedRecordsWhenUnconfigured(t){this._setSetting("showRelatedRecordsWhenUnconfigured",t)}get formatSettings(){return this._getNestedSettings("formatSettings",(()=>new s))}get returnGeometry(){return this._getSetting("returnGeometry",!0)}set returnGeometry(t){this._setSetting("returnGeometry",t)}get outFields(){return this._getSetting("outFields",this._defaultOutFields)}set outFields(t){this._setSetting("outFields",t)}get outSpatialReference(){return this._getSetting("outSpatialReference")}set outSpatialReference(t){this._setSetting("outSpatialReference",t)}get maxAllowableOffset(){return this._getSetting("maxAllowableOffset")}set maxAllowableOffset(t){this._setSetting("maxAllowableOffset",t)}get zoomScale(){return this._getSetting("zoomScale")}set zoomScale(t){this._setSetting("zoomScale",t)}get zoomFactor(){const t=this._feature?this._feature.schema:this._featureSource?.schema,e=t&&"point"===t.geometryType?void 0:1.5;return this._getSetting("zoomFactor",e)}set zoomFactor(t){this._setSetting("zoomFactor",t)}get featureSource(){return this._featureSource}get feature(){return this._feature}_featureSource;_feature;constructor(t){super(t),this.popupContentExtensions=new b(this)}get _defaultOutFields(){if(null==this.popupTemplate)return["*"];const t=S(this.popupTemplate),e=this.featureSource?.schema?.primaryKeyField;if(!t||!e)return["*"];const n=new Set([e]),i=new Map;this.featureSource.schema.fields.forEach((t=>{i.set(t.name.toLowerCase(),t.name)}));const o=new Set([...y(this.popupTemplate),...this.hyperlinkTemplates.toArray().flatMap((t=>t.getReferencedFields()))]);this._featureSource.relationships.forEach((t=>{P(t)&&o.add(t.keyField)}));const s=this.featureSource?.schema?.typeIdField;s&&o.add(s);const r=t.reduce(((t,e)=>((e.visible||e.isEditable&&this.featureSource.capabilities.supportsEditing)&&t.push(e.fieldName),t)),[]),p=new Set([...r,...o]);for(const t of p){if(T(t)||x(t))continue;const e=i.get(t.toLowerCase());e&&n.add(e)}return Array.from(n)}_setFeatureSource(t){this._featureSource=t,d(this,"featureSource")}_setFeature(t){this._feature=t,d(this,"feature")}toJSON(t="all"){const e=p(this._getSerializableProperties(),this,t)||{},n=e.popupContentExtensions?.filter((t=>{const e=this.parent;return!e?.popupContentExtensions?.some((e=>e.id===t.id))}));if(e)for(const t of A(e))this.isModified(t)||delete e[t];if(n?.length&&(e.popupContentExtensions=n),!h(t)||!a(e))return e}_createPopupContentCollection(){return new o({parent:this,targetProperty:"popupTemplate",arrayProperty:"content"})}_getSerializableProperties(){return{hyperlinkTemplates:{serializeModes:["initial"],deserialize:t=>{t.forEach((t=>{this.hyperlinkTemplates.find((e=>this._hyperlinksAreEquivalent(e,t)))||this.hyperlinkTemplates.add(t instanceof n?t:new n(t))})),this.hyperlinkTemplates.toArray().forEach((e=>{const n=this.hyperlinkTemplates.indexOf(e),i=t.findIndex((t=>this._hyperlinksAreEquivalent(t,e)));i<0?this.hyperlinkTemplates.removeAt(n):i!==n&&this.hyperlinkTemplates.reorder(e,i)}))}},popupTemplate:{serializeModes:["project"],isDefault:()=>!this._isDefaultPopupTemplate},showRelatedRecordsWhenUnconfigured:{serializeModes:["initial"],default:!0},formatSettings:"initial",outFields:{serializeModes:["initial"],serialize:()=>this.isModified("outFields")?this.outFields:void 0},returnGeometry:{serializeModes:["initial"],default:!0},outSpatialReference:"initial",maxAllowableOffset:"initial",zoomScale:"initial",zoomFactor:{serializeModes:["initial"],isDefault:t=>{const e=this._feature?this._feature.schema:this._featureSource?.schema;return t===(e&&"point"===e.geometryType?void 0:1.5)}},popupContentExtensions:{serializeModes:["initial"],serialize:t=>this.popupContentExtensions.map((e=>e.toJSON(t))).filter((t=>!(t&&2===Object.keys(t).length&&t.id&&t.content))).toArray(),deserialize:t=>{t&&g(this.popupContentExtensions,t,{onNew:(t,e)=>{this.popupContentExtensions.add(i(t)?t:new z(t),e)},onMatch:(t,e,n,o)=>{i(e)||t.assignProperties(e),n!==o&&this.popupContentExtensions.reorder(t,o)},onMissing:t=>{this.popupContentExtensions.remove(t)},equals:(t,e)=>{if(!e)return!1;if(i(e))return e===t||e.id===t.id;const n=this.popupContentExtensions.indexOf(t);if(e.content&&n>-1){const t=this.popupContentExtensions.toArray();return z.matchesRef(t,n,e.content)}return t.id===e.id}})}}}}_hyperlinksAreEquivalent(t,e){if(t===e)return!0;const n=t=>t||"";return n(t.text)===n(e.text)&&n(t.url)===n(e.url)&&n(t.iconUrl)===n(e.iconUrl)&&n(t.target)===n(e.target)&&n(t.tooltip)===n(e.tooltip)}};E=t([u],E);export{E as FeatureSettings};class b extends r{get _collection(){return this._featureSettings._popupContent.map((t=>this._forContent(t))).concat(Array.from(this._uninitializedPopupContentExtensions))}get _popupTemplateIsInherited(){return this._featureSettings.parent&&this._featureSettings.popupTemplate===this._featureSettings.parent.popupTemplate}_featureSettings;_uninitializedPopupContentExtensions=new Set;_onChangePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("change",(t=>{const e={added:(t.added||[]).map((t=>this._forContent(t))),moved:(t.moved||[]).map((t=>this._forContent(t))),removed:(t.removed||[]).map((t=>this._forContent(t))),target:this};this.emit("change",e)}))));_onBeforeAddPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-add",(t=>{this.emit("before-add",{...t,item:this._forContent(t.item),target:this})}))));_onBeforeRemovePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-remove",(t=>{this.emit("before-remove",{...t,item:this._forContent(t.item),target:this})}))));_onBeforeChangesPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-changes",(t=>{this.emit("before-changes",{...t,target:this})}))));_onAfterAddPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-add",(t=>{this.emit("after-add",{...t,item:this._forContent(t.item),target:this})}))));_onAfterRemovePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-remove",(t=>{this.emit("after-remove",{...t,item:this._forContent(t.item),target:this})}))));_onAfterChangesPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-changes",(t=>{this.emit("after-changes",{...t,target:this})}))));constructor(t){super(),this._featureSettings=t,m(this,"length",(()=>c(this._featureSettings,"_popupContent.length",(()=>d(this,"length")),{sync:!0})))}forContent(t){if(C("content",t).isNotMissing(),this._featureSettings._popupContent.includes(t))return this._forContent(t)}add(t,n){if(C("contentX",t).isNotMissing(),this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),t.featureSettings&&t.featureSettings.popupContentExtensions.remove(t),t._setFeatureSettings(this._featureSettings),t.content){const e=w.get(t.content);if(w.set(t.content,t),e&&e!==t&&this._onRemoved(e),this._featureSettings._popupContent.includes(t.content))if(void 0===n){const n={added:[t],moved:[],removed:e?[e]:[],target:this};this.emit("change",n),this.emit("after-add",{item:t,target:this}),this.emit("after-changes",{target:this}),d(this,"length")}else this._featureSettings._popupContent.reorder(t.content,n);else this._featureSettings._popupContent.add(t.content,n)}else{this._uninitializedPopupContentExtensions.add(t);const e={added:[t],moved:[],removed:[],target:this};this.emit("change",e),this.emit("after-add",{item:t,target:this}),this.emit("after-changes",{target:this}),d(this,"length")}return this._onAdded(t),this}removeAt(t){const n=this.getItemAt(t);if(void 0!==n){if(this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._uninitializedPopupContentExtensions.has(n)){this._uninitializedPopupContentExtensions.delete(n);const t={added:[],moved:[],removed:[n],target:this};this.emit("change",t),this.emit("after-remove",{item:n,target:this}),this.emit("after-changes",{target:this}),d(this,"length")}else this._featureSettings._popupContent.remove(n.content);return this._onRemoved(n),n}}reorder(t,n){if(t&&this._featureSettings._popupContent.includes(t.content))return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.reorder(t.content,n),t}sort(t){return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.sort(((e,n)=>t(this._forContent(e),this._forContent(n)))),this}on(t,e){const n=[];return"change"===t?n.push(this._onChangePopupContentHandle.add()):"before-add"===t?n.push(this._onBeforeAddPopupContentHandle.add()):"before-remove"===t?n.push(this._onBeforeRemovePopupContentHandle.add()):"before-changes"===t?n.push(this._onBeforeChangesPopupContentHandle.add()):"after-add"===t?n.push(this._onAfterAddPopupContentHandle.add()):"after-remove"===t?n.push(this._onAfterRemovePopupContentHandle.add()):"after-changes"===t&&n.push(this._onAfterChangesPopupContentHandle.add()),n.push(super.on(t,e)),f(n)}_itemIsInitialized(t){return super._itemIsInitialized(t)&&!!t.content}_onAdded(t){}_onRemoved(t){t.featureSettings===this._featureSettings&&t._setFeatureSettings(void 0)}_forContent(t){if(this._uninitializedPopupContentExtensions.size)for(const t of this._uninitializedPopupContentExtensions)t._resolveContent(),t.content&&(w.set(t.content,t),this._uninitializedPopupContentExtensions.delete(t));if(!w.has(t)){const e=new z({content:t});w.set(t,e),e._setFeatureSettings(this._featureSettings),this._onAdded(e)}return w.get(t)}}
@@ -1,2 +1,2 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>version | @vertigis/arcgis-extensions</title><meta name="description" content="Documentation for @vertigis/arcgis-extensions"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vertigis/arcgis-extensions</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@vertigis/arcgis-extensions</a></li><li><a href="../modules/version.html">version</a></li><li><a href="version.version.html">version</a></li></ul><h1>Variable version<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">version</span><span class="tsd-signature-symbol"> = &quot;51.5.2&quot;</span></div><div class="tsd-comment tsd-typography"><p>The current version of the Geocortex ArcGIS Extensions API.</p>
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>version | @vertigis/arcgis-extensions</title><meta name="description" content="Documentation for @vertigis/arcgis-extensions"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vertigis/arcgis-extensions</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@vertigis/arcgis-extensions</a></li><li><a href="../modules/version.html">version</a></li><li><a href="version.version.html">version</a></li></ul><h1>Variable version<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">version</span><span class="tsd-signature-symbol"> = &quot;51.6.1&quot;</span></div><div class="tsd-comment tsd-typography"><p>The current version of the Geocortex ArcGIS Extensions API.</p>
2
2
  </div><div class="tsd-comment tsd-typography"></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@vertigis/arcgis-extensions</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
@@ -1 +1 @@
1
- import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection";import{InvalidOperationError as i}from"../InvalidOperationError.js";import{isSublayerExtension as s,ItemType as r}from"../ItemType.js";import{FeatureSourceBase as a}from"../data/FeatureSourceBase.js";import{Schema as n}from"../data/Schema.js";import{serializable as l}from"../support/Serializable.js";import{notifyChange as o,onWatch as u,watch as y,watchEach as h}from"../support/observableUtils.js";import{isBuildingComponentSublayer as b,isBuildingGroupSublayer as f,isKMLSublayer as p,isMapImageSublayer as c,isMapNotesSublayer as S,isSubtypeSublayer as d,isTileLayer as _,isWMSSublayer as g,isWMTSSublayer as x}from"../utilities/_layers.js";import{checkArg as E}from"../utilities/checkArg.js";import{compare as v}from"../utilities/collection.js";import{load as m}from"../utilities/esri.js";import{parse as w}from"../utilities/format/number.js";import{getLogger as M}from"../utilities/log.js";import{deepClone as P,objectKeys as C}from"../utilities/object.js";import{onCollectionPropertyChange as V}from"../utilities/watch.js";import{fromLayerListMode as z,LayerListSettings as $}from"./support/LayerListSettings.js";import{SublayerExtensionCollectionBase as A}from"./support/_SublayerExtensionCollection.js";const F=M("SublayerExtension"),R="Invalid type of sublayer for this type of sublayer extension.",j="This type of layer does not have features.",T="This type of sublayer extension cannot have child sublayer extensions.",I=Object.freeze({supportsAdd:!1,supportsUpdate:!1,supportsDelete:!1,supportsEditing:!1,supportsQuery:!1,supportsAttachmentEditing:!1,supportsStandardizedQueries:!1});export function getSublayerType(e){if(c(e))return _(e?.layer)?"ArcGISTiledSublayer":"ArcGISMapServiceSublayer";if(p(e))return"KMLSublayer";if(x(e))return"WMTSSublayer";if(g(e))return"WMSSublayer";if(b(e))return"BuildingComponentSublayer";if(f(e))return"BuildingGroupSublayer";if(d(e))return"SubtypeSublayer";if(S(e))return"MapNotesSublayer";throw new Error(`Unknown sublayer type for sublayer: "${e?.title}"`)}export class SublayerExtension extends a{static factory;get sublayer(){return this._sublayer}get layerExtension(){return this._layerExtension}get parentSublayerExtension(){return this._parentSublayerExtension}get hasFeatures(){return!1}get sublayerExtensions(){return this._sublayerExtensions}get renderer(){}layerListSettings;get visibilityMode(){return this.canToggleVisibility?this._visibilityMode:"inherited"}set visibilityMode(e){E("visibilityMode",e).satisfies((e=>this.canToggleVisibility||"inherited"===e),'Sublayers of this type only support a visibility mode of "inherited".'),this._visibilityMode=e,"exclusive"===e&&this._ensureAtMostOneChildSublayerVisible()}get capabilities(){return this._capabilities()}get effectiveMinScale(){const e=this.sublayer?this.sublayer.minScale:0;if(this.parentSublayerExtension){const t=this.parentSublayerExtension.effectiveMinScale||1/0;if(t<(e||1/0))return t}if(this.layerExtension){const t=this.layerExtension.effectiveMinScale||1/0;if(t<(e||1/0))return t}return e}get effectiveMaxScale(){const e=this.sublayer?this.sublayer.maxScale:0;return this.parentSublayerExtension&&this.parentSublayerExtension.effectiveMaxScale>e?this.parentSublayerExtension.effectiveMaxScale:this.layerExtension&&this.layerExtension.effectiveMaxScale>e?this.layerExtension.effectiveMaxScale:e}get isEffectivelyVisible(){const e=!!this.sublayer&&this.sublayer.visible;return this.parentSublayerExtension?this.parentSublayerExtension.isEffectivelyVisible&&e:this.layerExtension?this.layerExtension.isEffectivelyVisible&&e:e}get title(){return this.sublayer?.title??("string"==typeof this._deferredSublayerProperties?.$ref||"number"==typeof this._deferredSublayerProperties?.$ref?this._deferredSublayerProperties?.$ref.toString():this._deferredSublayerProperties?.$ref?.title??this._deferredSublayerProperties?.$ref?.id.toString())??"Sublayer"}get supportsSublayers(){return!1}get canToggleVisibility(){return!0}get canChangeOpacity(){return!0}get canChangeScale(){return!0}get canChangeRenderer(){return!1}get canChangeLabels(){return!1}get canChangeDefinitionExpression(){return!1}get _layerSupportsHideChildren(){return!1}get _sublayerId(){return this.sublayer?.id??("number"==typeof this._deferredSublayerProperties?.$ref?this._deferredSublayerProperties?.$ref:this._deferredSublayerProperties?.$ref?.id)}get _sublayers(){if(this.supportsSublayers)return this.sublayer?.sublayers}get effectiveFullExtent(){return this._effectiveFullExtent?this._effectiveFullExtent:this.parentSublayerExtension?this.parentSublayerExtension.effectiveFullExtent:this.layerExtension?this.layerExtension.effectiveFullExtent:void 0}get initialDefinitionExpression(){return this._initialDefinitionExpression}get initialRenderer(){return this._initialRenderer}get initialVisibility(){return this._initialVisibility??this.sublayer?.visible??!1}_effectiveFullExtent;_itemType=r.SUBLAYER_EXTENSION;_watchHandles=[];_sublayerExtensions;_layerExtension;_parentSublayerExtension;_initialDefinitionExpression;_initialRenderer;_initialVisibility;_sublayer;_visibilityMode;_deferredSublayerProperties;_originalRef;constructor(e){super(e);const t=e||{};this._visibilityMode=this.canToggleVisibility?"independent":"inherited",this._sublayerExtensions=this._createSublayerExtensionCollection();const i=t.sublayer;let s;i?.hasOwnProperty("listMode")&&(s=z(i.listMode)),this.layerListSettings=this._createLayerListSettings({...s,...t.layerListSettings}),L(i)?(E("properties.sublayer",i).satisfies((e=>this._isSupportedSublayer(e)),R),this._setSublayer(i)):i&&(this._deferredSublayerProperties=i),u(this,"isEffectivelyVisible",(()=>y(this,"parentSublayerExtension.isEffectivelyVisible",(()=>o(this,"isEffectivelyVisible")),{sync:!0})))}static create(e){if(!SublayerExtension.factory)throw new i("Cannot create sublayer extension: no sublayer extension factory has been registered.");return SublayerExtension.factory.create(e)}static _matchesRef(e,t,i){if(!e||!t?.$ref)return!1;let s=t.$ref;if("string"==typeof s){const e=w(s);s={id:isNaN(e)?s:e,title:s}}else"number"==typeof s&&(s={id:s});const r=d(e)?e.subtypeCode:e.id;return"both"===i?r===s.id&&e.title===s.title:"by-id"===i?r===s.id:"by-title"===i&&e.title===s.title}getFeatures(e,t){if(!this.hasFeatures)throw new i(j);return super.getFeatures(e,t)}getFullExtent(){return this.effectiveFullExtent}async addFeatures(e,t){if(E("features",e).isNotMissing(),!this.hasFeatures)throw new i(j);await super.addFeatures(e,t)}async updateFeatures(e,t){if(E("features",e).isNotMissing(),!this.hasFeatures)throw new i(j);await super.updateFeatures(e,t)}async deleteFeatures(e,t){if(E("features",e).isNotMissing(),!this.hasFeatures)throw new i(j);await super.deleteFeatures(e,t)}_resolveSublayer(){if(this._sublayer||!this._deferredSublayerProperties||!this.layerExtension?.layer||!this.layerExtension.layer.sublayers)return;const e=e=>t=>SublayerExtension._matchesRef(t,this._deferredSublayerProperties,e),t=this.layerExtension.layer.sublayers.flatten((e=>e.sublayers));let i=t.find(e("both"));if(i||(i=t.find(e("by-title"))),i||(i=t.find(e("by-id"))),i&&this._isSupportedSublayer(i)){this._setSublayer(i);const e={sublayer:{title:this.title,...this._deferredSublayerProperties}};this.assignProperties(e),this._originalRef=this._deferredSublayerProperties.$ref,this._deferredSublayerProperties=void 0}}_setLayerExtension(e){const t=this.layerExtension;this._layerExtension=e,this.layerExtension&&(u(this,"effectiveMinScale",(()=>y(this.layerExtension,"effectiveMinScale",(()=>o(this,"effectiveMinScale")),{sync:!0}))),u(this,"effectiveMaxScale",(()=>y(this.layerExtension,"effectiveMaxScale",(()=>o(this,"effectiveMaxScale")),{sync:!0}))),u(this,"isEffectivelyVisible",(()=>y(this.layerExtension,"isEffectivelyVisible",(()=>o(this,"isEffectivelyVisible")),{sync:!0})))),this._parentSublayerExtension||(t&&(this.featureSettings.formatSettings.parent===t.featureSettings.formatSettings&&(this.featureSettings.formatSettings.parent=void 0),this.taskSettings.parent===t.taskSettings&&(this.taskSettings.parent=void 0)),e&&(this.featureSettings.formatSettings.parent||(this.featureSettings.formatSettings.parent=e.featureSettings.formatSettings),this.taskSettings.parent||(this.taskSettings.parent=e.taskSettings))),this._resolveSublayer(),o(this,"layerExtension"),this.supportsSublayers&&this._sublayerExtensions.onLayerExtensionChanged()}_setParentSublayerExtension(e){if(this._parentSublayerExtension===e)return;const t=this._parentSublayerExtension;this._parentSublayerExtension=e,this.parentSublayerExtension&&(u(this,"effectiveMinScale",(()=>y(this.parentSublayerExtension,"effectiveMinScale",(()=>o(this,"effectiveMinScale")),{sync:!0}))),u(this,"effectiveMaxScale",(()=>y(this.parentSublayerExtension,"effectiveMaxScale",(()=>o(this,"effectiveMaxScale")),{sync:!0})))),t&&(this.featureSettings.formatSettings.parent===t.featureSettings.formatSettings&&(this.featureSettings.formatSettings.parent=this.layerExtension?this.layerExtension.featureSettings.formatSettings:void 0),this.taskSettings.parent===t.taskSettings&&(this.taskSettings.parent=this.layerExtension?this.layerExtension.taskSettings:void 0)),e&&((!this.featureSettings.formatSettings.parent||this.layerExtension&&this.featureSettings.formatSettings.parent===this.layerExtension.featureSettings.formatSettings)&&(this.featureSettings.formatSettings.parent=e.featureSettings.formatSettings),(!this.taskSettings.parent||this.layerExtension&&this.taskSettings.parent===this.layerExtension.taskSettings)&&(this.taskSettings.parent=e.taskSettings)),this._resolveSublayer(),o(this,"parentSublayerExtension")}async _switchSublayer(e){if(e===this.sublayer)return;E("newSublayer",e).isNotMissing().satisfies((e=>e.id===this.sublayer.id),"Sublayer ID must match existing sublayer.").satisfies((e=>this._isSupportedSublayer(e)),R),this.isInitialized&&await m(e);const t=new Map;if(this.sublayer?.sublayers)for(const e of this.sublayer.sublayers.toArray())t.set(e.id,this.sublayerExtensions.forSublayer(e));this.canToggleVisibility&&(e.visible=this.sublayer.visible),this.canChangeOpacity&&(e.opacity=this.sublayer.opacity),this._setSublayer(e);const i=[];if(this.supportsSublayers&&this.sublayer.sublayers){const e=this.sublayer.sublayers.filter((e=>t.has(e.id))).toArray();i.push(...e.map((async e=>{const i=t.get(e.id);await i._switchSublayer(e),this._sublayerExtensions._register(i)})))}this.isInitialized&&i.push(this._initializeChildren()),await Promise.all(i)}async _postInitialize(){await super._postInitialize(),this.supportsSublayers&&this._watchHandles.push(V(this,"sublayer.sublayers",(async e=>{const t=(e.added??[]).map((e=>this.sublayerExtensions.forSublayer(e)));await Promise.all(t.map(this._onSublayerAddedPostInitialize))})))}_onSublayerAddedPostInitialize=async e=>{try{await e.initialize()}catch(t){F.error({message:`Error occurred while initializing sublayer extension for sublayer '${e.title??e.sublayer.id??e.id}'.`,error:t})}};async _onDestroy(){this._watchHandles.forEach((e=>e?.remove())),await Promise.all(this.sublayerExtensions.toArray().map((e=>e.destroy()))),await super._onDestroy()}_getSerializableProperties(){return{...super._getSerializableProperties(),visibilityMode:{serializeModes:["initial"],default:this.canToggleVisibility?"independent":"inherited"},layerListSettings:"initial",sublayerExtensions:{serializeModes:["initial","project"],serialize:()=>this.sublayerExtensions.map((e=>e.toItemUri())).toArray(),deserialize:e=>{_assignSublayerExtensions(this.sublayerExtensions,e,(e=>this._createSublayerExtension(e)))}},sublayer:{serializeModes:["initial","project"],serialize:()=>{if(this.sublayer){if(!this._layerExtension)return this._serializeSublayer(this._sublayer);{const e=getSublayerType(this._sublayer);if(this._originalRef)return{$ref:this._originalRef,$sublayerType:e};if(this._sublayer.title||this._sublayer.id)return{...this._createSublayerRef(),$sublayerType:e}}}else if(this._deferredSublayerProperties)return P(this._deferredSublayerProperties)},deserialize:e=>{if(L(e)){if(e!==this.sublayer)throw new Error("Property 'sublayer' is read-only.")}else{if(this._sublayer)return this._applySublayerProperties(e,this._sublayer);this._deferredSublayerProperties&&(this._deferredSublayerProperties={...this._deferredSublayerProperties,...e})}}},requestHelper:{serialize:!1}}}_createSublayerExtension(e){throw new i(T)}_createSchema(){return new k(this)}_createLayerListSettings(e){return new $(e)}_capabilities(){return I}async _onInitialize(){if(await super._onInitialize(),this._sublayer||this._deferredSublayerProperties?.$ref||(this._setSublayer(await this._createSublayer(this._deferredSublayerProperties)),this._deferredSublayerProperties=void 0),this._resolveSublayer(),!this._sublayer){const e=this._deferredSublayerProperties?.$ref;if(!this._layerExtension)throw new i("Cannot resolve sublayer reference: missing parent layer extension.");throw new i(`No sublayer found matching reference "${"string"==typeof e?e:JSON.stringify(e)}".`)}this._initialDefinitionExpression="definitionExpression"in this.sublayer?this.sublayer.definitionExpression:void 0,this._initialRenderer=this.renderer?.clone(),this._initialVisibility=this.sublayer.visible,this.supportsSublayers&&this._sublayerExtensions.onParentInitialized()}*_initializableChildCollections(){yield*super._initializableChildCollections(),yield this.sublayerExtensions}_createSublayerRef(){return{$ref:{id:d(this._sublayer)?this._sublayer.subtypeCode:this._sublayer.id,title:this._sublayer.title}}}_createSublayerExtensionCollection(){return new SubSublayerExtensionCollection(this)}_watchSublayerProperties(){this._watchHandles.push(u(this,"effectiveMinScale",(()=>y(this.sublayer,"minScale",(()=>o(this,"effectiveMinScale")),{sync:!0}))),u(this,"effectiveMaxScale",(()=>y(this.sublayer,"maxScale",(()=>o(this,"effectiveMaxScale")),{sync:!0}))))}_setSublayer(e){this._sublayer=e,this._watchHandles.push(y(e,"visible",((e,t,i)=>{this._onSetSublayerVisible(e),this.layerExtension?.mapExtension?.emit("layer-visibility-change",i)}),{sync:!0})),"definitionExpression"in e&&this._watchHandles.push(y(e,"definitionExpression",((e,t,i)=>{this.layerExtension?.mapExtension?.emit("layer-definition-expression-change",i)}))),this.supportsSublayers&&this._watchHandles.push(V(e,"sublayers",this._onSublayersChange,!0),h(e,"sublayers.[].visible",this._onSetSublayersSublayerVisible,{sync:!0})),this._onSetSublayerVisible(this.sublayer.visible),"exclusive"===this.visibilityMode&&this._ensureAtMostOneChildSublayerVisible(),this._watchSublayerProperties(),o(this,"sublayer"),o(this,"title"),o(this,"effectiveMinScale"),o(this,"effectiveMaxScale"),o(this,"isEffectivelyVisible")}_onSetSublayerVisible=e=>{if("inherited"===this.visibilityMode&&this.supportsSublayers&&this.sublayerExtensions)for(const t of this.sublayerExtensions.toArray())t.sublayer&&t.canToggleVisibility&&(t.sublayer.visible=e);o(this,"isEffectivelyVisible")};_onSetSublayersSublayerVisible=(e,t,i)=>{e&&"exclusive"===this.visibilityMode&&this._ensureAChildSublayerVisible(i)};_onSublayersChange=e=>{e.added?.length&&"exclusive"===this.visibilityMode&&this._ensureAChildSublayerVisible(e.added[e.added.length-1])};_ensureAChildSublayerVisible(e){for(const t of this._sublayers.toArray())t!==e&&(t.visible=!1)}_ensureAtMostOneChildSublayerVisible(){this.sublayer&&this._sublayers&&this._ensureAChildSublayerVisible(this._sublayers.find((e=>e.visible)))}}let k=class extends n{_sublayerExtension;_sublayerBindings=new Map;constructor(e){super(),this._sublayerExtension=e,this._bindSettingsToSublayerProperties()}get spatialReference(){if(this._sublayerExtension.layerExtension)return this._sublayerExtension.layerExtension.schema.spatialReference}set spatialReference(e){throw new i("Cannot set sublayer schema spatial reference.")}_getPropertyBindings(){return{}}_bindSettingsToSublayerProperties(){const e=this._getPropertyBindings();for(const t of C(e)){let i=e[t];"string"==typeof i&&(i={property:i}),this._sublayerBindings.set(t,i),i.hasOwnProperty("value")||u(this,t,(()=>y(this._sublayerExtension,`sublayer.${String(i.property)}`,(()=>o(this,t)),{sync:!i.hasOwnProperty("sync")||i.sync})))}}};k=e([l],k);export{k as SublayerSchema};export class SubSublayerExtensionCollection extends A{get _layerExtension(){return this._parent.layerExtension}constructor(e,t){super(e,t??"sublayer.sublayers")}add(e,s){if(E("sublayerX",e).isNotMissing(),!this._parent.supportsSublayers)throw new i(T);return e.sublayer&&this._parent.sublayer&&!this._parent.sublayer.sublayers&&(this._parent.sublayer.sublayers=new t),e.parentSublayerExtension&&e.parentSublayerExtension.sublayerExtensions.remove(e),super.add(e,s)}_onAdded(e){super._onAdded(e),e._setParentSublayerExtension(this._parent)}_onRemoved(e){super._onRemoved(e),e._setParentSublayerExtension(void 0)}}export function _assignSublayerExtensions(e,t,i){v(e,t,{onNew:(t,r)=>{try{e.add(s(t)?t:i(t),N(t)?void 0:r)}catch(e){F.warn({message:`Error occurred while adding sublayer extension for sublayer '${t.title??t.sublayer?.id??t.id}'.`,error:e})}},onMatch:(t,i,r,a)=>{try{s(i)||t.assignProperties(i),r===a||N(i)||e.reorder(t,a)}catch(e){F.warn({message:`Error occurred while assigning sublayer extension properties for sublayer '${t.title??t.sublayer?.id??t.id}'.`,error:e})}},equals:(e,t)=>{if(s(t)){if(e===t)return!0;const i=d(t.sublayer)?t.sublayer.subtypeCode:t.sublayer?.id;return SublayerExtension._matchesRef(e.sublayer,{$ref:{id:i,title:t.sublayer?.title}},"both")}return SublayerExtension._matchesRef(e.sublayer,t.sublayer,"both")||e.id===t.id}})}function L(e){return e&&"function"==typeof e.set}function N(e){return s(e)?!!e._deferredSublayerProperties?.$ref:!L(e.sublayer)&&!!e.sublayer?.$ref}
1
+ import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection";import{InvalidOperationError as i}from"../InvalidOperationError.js";import{isSublayerExtension as s,ItemType as r}from"../ItemType.js";import{FeatureSourceBase as a}from"../data/FeatureSourceBase.js";import{Schema as n}from"../data/Schema.js";import{serializable as l}from"../support/Serializable.js";import{notifyChange as o,onWatch as u,watch as y,watchEach as h}from"../support/observableUtils.js";import{isBuildingComponentSublayer as b,isBuildingGroupSublayer as f,isKMLSublayer as p,isMapImageSublayer as c,isMapNotesSublayer as S,isSubtypeSublayer as d,isTileLayer as _,isWMSSublayer as g,isWMTSSublayer as x}from"../utilities/_layers.js";import{checkArg as E}from"../utilities/checkArg.js";import{compare as v}from"../utilities/collection.js";import{load as m}from"../utilities/esri.js";import{parse as w}from"../utilities/format/number.js";import{getLogger as M}from"../utilities/log.js";import{deepClone as P,objectKeys as C}from"../utilities/object.js";import{onCollectionPropertyChange as V}from"../utilities/watch.js";import{fromLayerListMode as z,LayerListSettings as $}from"./support/LayerListSettings.js";import{SublayerExtensionCollectionBase as A}from"./support/_SublayerExtensionCollection.js";const F=M("SublayerExtension"),R="Invalid type of sublayer for this type of sublayer extension.",j="This type of layer does not have features.",T="This type of sublayer extension cannot have child sublayer extensions.",I=Object.freeze({supportsAdd:!1,supportsUpdate:!1,supportsDelete:!1,supportsEditing:!1,supportsQuery:!1,supportsAttachmentEditing:!1,supportsStandardizedQueries:!1});export function getSublayerType(e){if(c(e))return _(e?.layer)?"ArcGISTiledSublayer":"ArcGISMapServiceSublayer";if(p(e))return"KMLSublayer";if(x(e))return"WMTSSublayer";if(g(e))return"WMSSublayer";if(b(e))return"BuildingComponentSublayer";if(f(e))return"BuildingGroupSublayer";if(d(e))return"SubtypeSublayer";if(S(e))return"MapNotesSublayer";throw new Error(`Unknown sublayer type for sublayer: "${e?.title}"`)}export class SublayerExtension extends a{static factory;get sublayer(){return this._sublayer}get layerExtension(){return this._layerExtension}get parentSublayerExtension(){return this._parentSublayerExtension}get hasFeatures(){return!1}get sublayerExtensions(){return this._sublayerExtensions}get renderer(){}layerListSettings;get visibilityMode(){return this.canToggleVisibility?this._visibilityMode:"inherited"}set visibilityMode(e){E("visibilityMode",e).satisfies((e=>this.canToggleVisibility||"inherited"===e),'Sublayers of this type only support a visibility mode of "inherited".'),this._visibilityMode=e,"exclusive"===e&&this._ensureAtMostOneChildSublayerVisible()}get capabilities(){return this._capabilities()}get effectiveMinScale(){const e=this.sublayer?this.sublayer.minScale:0;if(this.parentSublayerExtension){const t=this.parentSublayerExtension.effectiveMinScale||1/0;if(t<(e||1/0))return t}if(this.layerExtension){const t=this.layerExtension.effectiveMinScale||1/0;if(t<(e||1/0))return t}return e}get effectiveMaxScale(){const e=this.sublayer?this.sublayer.maxScale:0;return this.parentSublayerExtension&&this.parentSublayerExtension.effectiveMaxScale>e?this.parentSublayerExtension.effectiveMaxScale:this.layerExtension&&this.layerExtension.effectiveMaxScale>e?this.layerExtension.effectiveMaxScale:e}get isEffectivelyVisible(){const e=!!this.sublayer&&this.sublayer.visible;return this.parentSublayerExtension?this.parentSublayerExtension.isEffectivelyVisible&&e:this.layerExtension?this.layerExtension.isEffectivelyVisible&&e:e}get title(){return this.sublayer?.title??("string"==typeof this._deferredSublayerProperties?.$ref||"number"==typeof this._deferredSublayerProperties?.$ref?this._deferredSublayerProperties?.$ref.toString():this._deferredSublayerProperties?.$ref?.title??this._deferredSublayerProperties?.$ref?.id.toString())??"Sublayer"}get supportsSublayers(){return!1}get canToggleVisibility(){return!0}get canChangeOpacity(){return!0}get canChangeScale(){return!0}get canChangeRenderer(){return!1}get canChangeLabels(){return!1}get canChangeDefinitionExpression(){return!1}get _layerSupportsHideChildren(){return!1}get _sublayerId(){return this.sublayer?.id??("number"==typeof this._deferredSublayerProperties?.$ref?this._deferredSublayerProperties?.$ref:this._deferredSublayerProperties?.$ref?.id)}get _sublayers(){if(this.supportsSublayers)return this.sublayer?.sublayers}get effectiveFullExtent(){return this._effectiveFullExtent?this._effectiveFullExtent:this.parentSublayerExtension?this.parentSublayerExtension.effectiveFullExtent:this.layerExtension?this.layerExtension.effectiveFullExtent:void 0}get initialDefinitionExpression(){return this._initialDefinitionExpression}get initialRenderer(){return this._initialRenderer}get initialVisibility(){return this._initialVisibility??this.sublayer?.visible??!1}_effectiveFullExtent;_itemType=r.SUBLAYER_EXTENSION;_watchHandles=[];_sublayerExtensions;_layerExtension;_parentSublayerExtension;_initialDefinitionExpression;_initialRenderer;_initialVisibility;_sublayer;_visibilityMode;_deferredSublayerProperties;_originalRef;constructor(e){super(e);const t=e||{};this._visibilityMode=this.canToggleVisibility?"independent":"inherited",this._sublayerExtensions=this._createSublayerExtensionCollection();const i=t.sublayer;let s;i?.hasOwnProperty("listMode")&&(s=z(i.listMode)),this.layerListSettings=this._createLayerListSettings({...s,...t.layerListSettings}),L(i)?(E("properties.sublayer",i).satisfies((e=>this._isSupportedSublayer(e)),R),this._setSublayer(i)):i&&(this._deferredSublayerProperties=i),u(this,"isEffectivelyVisible",(()=>y(this,"parentSublayerExtension.isEffectivelyVisible",(()=>o(this,"isEffectivelyVisible")),{sync:!0})))}static create(e){if(!SublayerExtension.factory)throw new i("Cannot create sublayer extension: no sublayer extension factory has been registered.");return SublayerExtension.factory.create(e)}static _matchesRef(e,t,i){if(!e||!t?.$ref)return!1;let s=t.$ref;if("string"==typeof s){const e=w(s);s={id:isNaN(e)?s:e,title:s}}else"number"==typeof s&&(s={id:s});const r=d(e)?e.subtypeCode:e.id;return"both"===i?r===s.id&&e.title===s.title:"by-id"===i?r===s.id:"by-title"===i&&e.title===s.title}getFeatures(e,t){if(!this.hasFeatures)throw new i(j);return super.getFeatures(e,t)}getFullExtent(){return this.effectiveFullExtent}async addFeatures(e,t){if(E("features",e).isNotMissing(),!this.hasFeatures)throw new i(j);await super.addFeatures(e,t)}async updateFeatures(e,t){if(E("features",e).isNotMissing(),!this.hasFeatures)throw new i(j);await super.updateFeatures(e,t)}async deleteFeatures(e,t){if(E("features",e).isNotMissing(),!this.hasFeatures)throw new i(j);await super.deleteFeatures(e,t)}_resolveSublayer(){if(this._sublayer||!this._deferredSublayerProperties||!this.layerExtension?.layer||!this.layerExtension.layer.sublayers)return;const e=e=>t=>SublayerExtension._matchesRef(t,this._deferredSublayerProperties,e),t=this.layerExtension.layer.sublayers.flatten((e=>e.sublayers));let i=t.find(e("both"));if(i||(i=t.find(e("by-title"))),i||(i=t.find(e("by-id"))),i&&this._isSupportedSublayer(i)){this._setSublayer(i);const e={sublayer:{title:this.title,...this._deferredSublayerProperties}};this.assignProperties(e),this._originalRef=this._deferredSublayerProperties.$ref,this._deferredSublayerProperties=void 0}}_setLayerExtension(e){const t=this.layerExtension;this._layerExtension=e,this.layerExtension&&(u(this,"effectiveMinScale",(()=>y(this.layerExtension,"effectiveMinScale",(()=>o(this,"effectiveMinScale")),{sync:!0}))),u(this,"effectiveMaxScale",(()=>y(this.layerExtension,"effectiveMaxScale",(()=>o(this,"effectiveMaxScale")),{sync:!0}))),u(this,"isEffectivelyVisible",(()=>y(this.layerExtension,"isEffectivelyVisible",(()=>o(this,"isEffectivelyVisible")),{sync:!0})))),this._parentSublayerExtension||(t&&(this.featureSettings.formatSettings.parent===t.featureSettings.formatSettings&&(this.featureSettings.formatSettings.parent=void 0),this.taskSettings.parent===t.taskSettings&&(this.taskSettings.parent=void 0)),e&&(this.featureSettings.formatSettings.parent||(this.featureSettings.formatSettings.parent=e.featureSettings.formatSettings),this.taskSettings.parent||(this.taskSettings.parent=e.taskSettings))),this._resolveSublayer(),o(this,"layerExtension"),this.supportsSublayers&&this._sublayerExtensions.onLayerExtensionChanged()}_setParentSublayerExtension(e){if(this._parentSublayerExtension===e)return;const t=this._parentSublayerExtension;this._parentSublayerExtension=e,this.parentSublayerExtension&&(u(this,"effectiveMinScale",(()=>y(this.parentSublayerExtension,"effectiveMinScale",(()=>o(this,"effectiveMinScale")),{sync:!0}))),u(this,"effectiveMaxScale",(()=>y(this.parentSublayerExtension,"effectiveMaxScale",(()=>o(this,"effectiveMaxScale")),{sync:!0})))),t&&(this.featureSettings.formatSettings.parent===t.featureSettings.formatSettings&&(this.featureSettings.formatSettings.parent=this.layerExtension?this.layerExtension.featureSettings.formatSettings:void 0),this.taskSettings.parent===t.taskSettings&&(this.taskSettings.parent=this.layerExtension?this.layerExtension.taskSettings:void 0)),e&&((!this.featureSettings.formatSettings.parent||this.layerExtension&&this.featureSettings.formatSettings.parent===this.layerExtension.featureSettings.formatSettings)&&(this.featureSettings.formatSettings.parent=e.featureSettings.formatSettings),(!this.taskSettings.parent||this.layerExtension&&this.taskSettings.parent===this.layerExtension.taskSettings)&&(this.taskSettings.parent=e.taskSettings)),this._resolveSublayer(),o(this,"parentSublayerExtension")}async _switchSublayer(e){if(e===this.sublayer)return;E("newSublayer",e).isNotMissing().satisfies((e=>e.id===this.sublayer.id),"Sublayer ID must match existing sublayer.").satisfies((e=>this._isSupportedSublayer(e)),R),this.isInitialized&&await m(e);const t=new Map;if(this.sublayer?.sublayers)for(const e of this.sublayer.sublayers.toArray())t.set(e.id,this.sublayerExtensions.forSublayer(e));this.canToggleVisibility&&(e.visible=this.sublayer.visible),this.canChangeOpacity&&(e.opacity=this.sublayer.opacity),this._setSublayer(e);const i=[];if(this.supportsSublayers&&this.sublayer.sublayers){const e=this.sublayer.sublayers.filter((e=>t.has(e.id))).toArray();i.push(...e.map((async e=>{const i=t.get(e.id);await i._switchSublayer(e),this._sublayerExtensions._register(i)})))}this.isInitialized&&i.push(this._initializeChildren()),await Promise.all(i)}async _postInitialize(){await super._postInitialize(),this.supportsSublayers&&this._watchHandles.push(V(this,"sublayer.sublayers",(async e=>{const t=(e.added??[]).map((e=>this.sublayerExtensions.forSublayer(e)));await Promise.all(t.map(this._onSublayerAddedPostInitialize))})))}_onSublayerAddedPostInitialize=async e=>{try{await e.initialize()}catch(t){F.error({message:`Error occurred while initializing sublayer extension for sublayer '${e.title??e.sublayer.id??e.id}'.`,error:t})}};async _onDestroy(){this._watchHandles.forEach((e=>e?.remove())),await Promise.all(this.sublayerExtensions.toArray().map((e=>e.destroy()))),await super._onDestroy()}_getSerializableProperties(){return{...super._getSerializableProperties(),visibilityMode:{serializeModes:["initial"],default:this.canToggleVisibility?"independent":"inherited"},layerListSettings:"initial",sublayerExtensions:{serializeModes:["initial","project"],serialize:()=>this.sublayerExtensions.map((e=>e.toItemUri())).toArray(),deserialize:e=>{_assignSublayerExtensions(this.sublayerExtensions,e,(e=>this._createSublayerExtension(e)))}},sublayer:{serializeModes:["initial","project"],serialize:()=>{if(this.sublayer){if(!this._layerExtension)return this._serializeSublayer(this._sublayer);{const e=getSublayerType(this._sublayer);if(this._originalRef)return{$ref:this._originalRef,$sublayerType:e};if(this._sublayer.title||this._sublayer.id)return{...this._createSublayerRef(),$sublayerType:e}}}else if(this._deferredSublayerProperties)return P(this._deferredSublayerProperties)},deserialize:e=>{if(L(e)){if(e!==this.sublayer)throw new Error("Property 'sublayer' is read-only.")}else{if(this._sublayer)return this._applySublayerProperties(e,this._sublayer);this._deferredSublayerProperties&&(this._deferredSublayerProperties={...this._deferredSublayerProperties,...e})}}},requestHelper:{serialize:!1}}}_createSublayerExtension(e){throw new i(T)}_createSchema(){return new k(this)}_createLayerListSettings(e){return new $(e)}_capabilities(){return I}async _onInitialize(){if(await super._onInitialize(),this._sublayer||this._deferredSublayerProperties?.$ref||(this._setSublayer(await this._createSublayer(this._deferredSublayerProperties)),this._deferredSublayerProperties=void 0),this._resolveSublayer(),!this._sublayer){const e=this._deferredSublayerProperties?.$ref;if(!this._layerExtension)throw new i("Cannot resolve sublayer reference: missing parent layer extension.");throw new i(`No sublayer found matching reference "${"string"==typeof e?e:JSON.stringify(e)}".`)}this._initialDefinitionExpression="definitionExpression"in this.sublayer?this.sublayer.definitionExpression:void 0,this._initialRenderer=this.renderer?.clone(),this._initialVisibility=this.sublayer.visible,this.supportsSublayers&&this._sublayerExtensions.onParentInitialized()}*_initializableChildCollections(){yield*super._initializableChildCollections(),yield this.sublayerExtensions}_createSublayerRef(){return{$ref:{id:d(this._sublayer)?this._sublayer.subtypeCode:this._sublayer.id,title:this._sublayer.title}}}_createSublayerExtensionCollection(){return new SubSublayerExtensionCollection(this)}_watchSublayerProperties(){this._watchHandles.push(u(this,"effectiveMinScale",(()=>y(this.sublayer,"minScale",(()=>o(this,"effectiveMinScale")),{sync:!0}))),u(this,"effectiveMaxScale",(()=>y(this.sublayer,"maxScale",(()=>o(this,"effectiveMaxScale")),{sync:!0}))),u(this,"title",(()=>y(this.sublayer,"title",(()=>o(this,"title")),{sync:!0}))))}_setSublayer(e){this._sublayer=e,this._watchHandles.push(y(e,"visible",((e,t,i)=>{this._onSetSublayerVisible(e),this.layerExtension?.mapExtension?.emit("layer-visibility-change",i)}),{sync:!0})),"definitionExpression"in e&&this._watchHandles.push(y(e,"definitionExpression",((e,t,i)=>{this.layerExtension?.mapExtension?.emit("layer-definition-expression-change",i)}))),this.supportsSublayers&&this._watchHandles.push(V(e,"sublayers",this._onSublayersChange,!0),h(e,"sublayers.[].visible",this._onSetSublayersSublayerVisible,{sync:!0})),this._onSetSublayerVisible(this.sublayer.visible),"exclusive"===this.visibilityMode&&this._ensureAtMostOneChildSublayerVisible(),this._watchSublayerProperties(),o(this,"sublayer"),o(this,"title"),o(this,"effectiveMinScale"),o(this,"effectiveMaxScale"),o(this,"isEffectivelyVisible")}_onSetSublayerVisible=e=>{if("inherited"===this.visibilityMode&&this.supportsSublayers&&this.sublayerExtensions)for(const t of this.sublayerExtensions.toArray())t.sublayer&&t.canToggleVisibility&&(t.sublayer.visible=e);o(this,"isEffectivelyVisible")};_onSetSublayersSublayerVisible=(e,t,i)=>{e&&"exclusive"===this.visibilityMode&&this._ensureAChildSublayerVisible(i)};_onSublayersChange=e=>{e.added?.length&&"exclusive"===this.visibilityMode&&this._ensureAChildSublayerVisible(e.added[e.added.length-1])};_ensureAChildSublayerVisible(e){for(const t of this._sublayers.toArray())t!==e&&(t.visible=!1)}_ensureAtMostOneChildSublayerVisible(){this.sublayer&&this._sublayers&&this._ensureAChildSublayerVisible(this._sublayers.find((e=>e.visible)))}}let k=class extends n{_sublayerExtension;_sublayerBindings=new Map;constructor(e){super(),this._sublayerExtension=e,this._bindSettingsToSublayerProperties()}get spatialReference(){if(this._sublayerExtension.layerExtension)return this._sublayerExtension.layerExtension.schema.spatialReference}set spatialReference(e){throw new i("Cannot set sublayer schema spatial reference.")}_getPropertyBindings(){return{}}_bindSettingsToSublayerProperties(){const e=this._getPropertyBindings();for(const t of C(e)){let i=e[t];"string"==typeof i&&(i={property:i}),this._sublayerBindings.set(t,i),i.hasOwnProperty("value")||u(this,t,(()=>y(this._sublayerExtension,`sublayer.${String(i.property)}`,(()=>o(this,t)),{sync:!i.hasOwnProperty("sync")||i.sync})))}}};k=e([l],k);export{k as SublayerSchema};export class SubSublayerExtensionCollection extends A{get _layerExtension(){return this._parent.layerExtension}constructor(e,t){super(e,t??"sublayer.sublayers")}add(e,s){if(E("sublayerX",e).isNotMissing(),!this._parent.supportsSublayers)throw new i(T);return e.sublayer&&this._parent.sublayer&&!this._parent.sublayer.sublayers&&(this._parent.sublayer.sublayers=new t),e.parentSublayerExtension&&e.parentSublayerExtension.sublayerExtensions.remove(e),super.add(e,s)}_onAdded(e){super._onAdded(e),e._setParentSublayerExtension(this._parent)}_onRemoved(e){super._onRemoved(e),e._setParentSublayerExtension(void 0)}}export function _assignSublayerExtensions(e,t,i){v(e,t,{onNew:(t,r)=>{try{e.add(s(t)?t:i(t),N(t)?void 0:r)}catch(e){F.warn({message:`Error occurred while adding sublayer extension for sublayer '${t.title??t.sublayer?.id??t.id}'.`,error:e})}},onMatch:(t,i,r,a)=>{try{s(i)||t.assignProperties(i),r===a||N(i)||e.reorder(t,a)}catch(e){F.warn({message:`Error occurred while assigning sublayer extension properties for sublayer '${t.title??t.sublayer?.id??t.id}'.`,error:e})}},equals:(e,t)=>{if(s(t)){if(e===t)return!0;const i=d(t.sublayer)?t.sublayer.subtypeCode:t.sublayer?.id;return SublayerExtension._matchesRef(e.sublayer,{$ref:{id:i,title:t.sublayer?.title}},"both")}return SublayerExtension._matchesRef(e.sublayer,t.sublayer,"both")||e.id===t.id}})}function L(e){return e&&"function"==typeof e.set}function N(e){return s(e)?!!e._deferredSublayerProperties?.$ref:!L(e.sublayer)&&!!e.sublayer?.$ref}
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": "51.5.2",
4
+ "version": "51.6.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://dev.azure.com/vertigis/Studio/_git/arcgis-extensions-ts"
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 = "51.5.2";
4
+ export declare const version = "51.6.1";
package/version.js CHANGED
@@ -1 +1 @@
1
- export const version="51.5.2";
1
+ export const version="51.6.1";