@vertigis/arcgis-extensions 53.15.0 → 53.16.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.
- package/data/support/_dxfConverters.d.ts +8 -8
- package/data/support/_dxfConverters.js +1 -1
- package/data/support/_dxfInterfaces.d.ts +6 -2
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/{data_support__dxfConverters.DxfToGeoJsonPolygonMapper.html → data_support__dxfConverters.DxfToFeatureLayerPolygonMapper.html} +12 -12
- package/docs/html/classes/mapping_FeatureLayerExtension.FeatureLayerExtension.html +4 -4
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBase.html +4 -4
- package/docs/html/interfaces/data_support__dxfInterfaces.IDxfJsonComponentContext.html +6 -4
- package/docs/html/modules/data_support__dxfConverters.html +1 -1
- package/docs/html/variables/version.version.html +1 -1
- package/mapping/FeatureLayerExtension.d.ts +0 -1
- package/mapping/FeatureLayerExtension.js +1 -1
- package/mapping/FeatureLayerExtensionBase.d.ts +1 -0
- package/mapping/FeatureLayerExtensionBase.js +1 -1
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -66,7 +66,6 @@ export declare class FeatureLayerExtension<TProperties extends FeatureLayerExten
|
|
|
66
66
|
get enableClientSideData(): boolean;
|
|
67
67
|
set enableClientSideData(isEnabled: boolean);
|
|
68
68
|
get renderer(): RendererUnion;
|
|
69
|
-
get canChangeLabels(): boolean;
|
|
70
69
|
private _enableClientSideData;
|
|
71
70
|
protected _addAttachment(feature: Feature, attachment: Attachment | AttachmentProperties | File): Promise<Attachment>;
|
|
72
71
|
protected _deleteAttachments(feature: Feature, attachments: (Attachment | string)[]): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection";import r from"@arcgis/core/layers/support/FeatureType.js";import
|
|
1
|
+
import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection";import r from"@arcgis/core/layers/support/FeatureType.js";import i from"@arcgis/core/rest/support/AttachmentQuery.js";import{InvalidOperationError as s}from"../InvalidOperationError.js";import{toAttachment as a}from"../data/Attachment.js";import{addAttachment as l,deleteAttachments as o}from"../data/support/attachments.js";import{_isFeatureCollection as n}from"../json/FeatureLayerJson.js";import{applyJsonToLayer as u}from"../json/LayerJson.js";import{DefaultArcGISRequestHelper as p}from"../support/ArcGISRequestHelper.js";import{serializable as y}from"../support/Serializable.js";import{ArcGISRelationshipCollection as d}from"../support/_ArcGISRelationshipCollection.js";import{applyEdits as h}from"../support/_featureEdit.js";import{notifyChange as c,watch as m}from"../support/observableUtils.js";import{getGdbVersion as _}from"../utilities/_version.js";import{isFeatureLayerExtension as f,isSubtypeGroupLayerExtension as b}from"../utilities/extensions.js";import{isFeatureLayer as S}from"../utilities/layers.js";import{isNumeric as j}from"../utilities/number.js";import{isEmpty as w}from"../utilities/object.js";import{FeatureLayerExtensionBase as I,FeatureLayerReadOnlySchema as C}from"./FeatureLayerExtensionBase.js";import{addOutFields as F}from"./support/layers.js";const g="Cannot use feature layer that has a source collection and no url.";let D=class extends I{attachmentTypes;get enableClientSideData(){return void 0===this._enableClientSideData?"cluster"===this.layer?.featureReduction?.type:this._enableClientSideData}set enableClientSideData(e){this._enableClientSideData=e,this._updateClientSideFields()}get renderer(){return this.layer?.renderer}_enableClientSideData;async _addAttachment(e,t){return l(e,this.layer,t,{attachmentTypes:this.attachmentTypes})}async _deleteAttachments(e,t){return o(e,this.layer,t)}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,attachmentTypes:["initial"],requestHelper:{...this._toPropertyDef(e.requestHelper),default:new p({batchLayerRequests:!1})},enableClientSideData:{serializeModes:["initial"],isDefault:e=>e===!("cluster"!==this.layer?.featureReduction?.type)}}}_isSupportedLayer(e){return super._isSupportedLayer(e)&&!t.isCollection(e.source)}async _getAttachments(e){if(!this.layer?.capabilities?.data?.supportsAttachment)return[];const t=+e.primaryKey,r=this.layer?.gdbVersion??_(this.layer?.customParameters),s=new i({objectIds:[t]}),l=await this.layer.queryAttachments(s);return l?.[t]?.length?l[t].map((e=>a(e,{gdbVersion:r}))):[]}async _addFeatures(e,t){await h({adds:e},this.layer,t)}async _updateFeatures(e,t){await h({updates:e},this.layer,t)}async _deleteFeatures(e,t){await h({deletes:e},this.layer,t)}_createRelationships(){return new L(this)}_createSchema(){return new C(this)}async _onInitialize(){if(this.layer&&!this._isSupportedLayer(this.layer))throw new s(g);await super._onInitialize(),await this.relationships.initialize(),this._updateClientSideFields(),this._handles.add(m(this,"layer",(()=>{this._updateClientSideFields()}),{sync:!0})),this._addSubtypeDomains(),c(this,"capabilities")}_applyLayerProperties(e,t){if(n(e))throw new s(g);return super._applyLayerProperties(e,t)}async _applyPortalItemProperties(e){if("Feature Service"!==e.type)throw new Error(`Cannot create Feature Layer from Portal item that has type: ${e.type}`);let{url:t}=e;t.match(".*MapServer/\\d{1,}/?$")||t.match(".*FeatureServer/\\d{1,}/?$")||(t=`${t}/0`),this.layer.url=t||this.layer.url;const r=await e.fetchData();if(r?.layers){const e=r.layers.find((e=>e.id===this.layer.layerId));if(e){const{id:t,...r}=e;await u(r,this.layer)}}}_addSubtypeDomains(){if(!this.layer?.subtypes)return;this.layer.typeIdField=this.layer.typeIdField||this.layer.subtypeField,this.layer.types=this.layer.types??[];const e=!this.layer.types.length;this.layer.subtypes.forEach((t=>{const i=this.layer.types.find((e=>e.id===t.code));i&&w(i.domains)?i.domains=t.domains:!i&&e&&this.layer.types.push(new r({id:t.code,domains:t.domains,name:t.name}))}))}_updateClientSideFields(){this.layer&&this._enableClientSideData&&F(this.layer,this.featureSettings.outFields)}};D=e([y],D);export{D as FeatureLayerExtension};class L extends d{get _sourceUrl(){if(this._source.layer?.url)return j(this._source.layer.layerId)?`${this._source.layer.url}/${this._source.layer.layerId}`:this._source.layer.url}get _sourceLayerId(){return this._source.layer?this._source.layer.layerId:void 0}_findRelatedSource(e){if(!this._source.mapExtension||!this._source.layer?.url)return;const t=this._source.mapExtension.allLayerExtensions.initializedItems.find((t=>(f(t)||b(t))&&t.layer.url===this._source.layer.url&&t.layer.layerId===e));return t||this._source.mapExtension.tableExtensions.initializedItems.find((t=>S(t.table)&&t.table.url===this._source.layer.url&&t.table.layerId===e))}}
|
|
@@ -39,6 +39,7 @@ export declare abstract class FeatureLayerExtensionBase<TProperties extends Feat
|
|
|
39
39
|
get renderer(): RendererUnion | undefined;
|
|
40
40
|
get canChangeDefinitionExpression(): boolean;
|
|
41
41
|
get canChangeRenderer(): boolean;
|
|
42
|
+
get canChangeLabels(): boolean;
|
|
42
43
|
protected _getFeatures(ids: string[], options?: FeatureReadOptions): AsyncIterable<Feature>;
|
|
43
44
|
protected _applyLayerProperties(properties: FeatureLayerBaseProperties, layer: FeatureLayer): Promise<void>;
|
|
44
45
|
protected _getSerializableProperties(): PropertyDefs<TProperties>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{InvalidOperationError as t}from"../InvalidOperationError.js";import{TaskSettings as r}from"../data/TaskSettings.js";import{supportsAttachmentEditing as i}from"../data/support/attachments.js";import{_isGraphicsLayerJson as s}from"../json/FeatureLayerJson.js";import{layerToJson as o}from"../json/LayerJson.js";import{serializable as a}from"../support/Serializable.js";import{notifyChange as n}from"../support/observableUtils.js";import{ReadOnlyCollection as l}from"../utilities/ReadOnlyCollection.js";import{isCSVLayer as p,isFeatureLayer as y,isGraphicsLayer as c,isStreamLayer as d}from"../utilities/_layers.js";import{checkArg as u}from"../utilities/checkArg.js";import{parse as m}from"../utilities/format/number.js";import{LayerExtension as g,LayerExtensionSchema as h,ERR_SCHEMA_READ_ONLY as _}from"./_LayerExtension.js";import{ArrayWrappedCollection as f}from"./support/ArrayWrappedCollection.js";import{PopupTemplateFeatureSettings as S}from"./support/PopupTemplateFeatureSettings.js";export class FeatureLayerExtensionBase extends g{get hasFeatures(){return!0}get layer(){return super.layer}get renderer(){return this.layer?.renderer}get canChangeDefinitionExpression(){return!0}get canChangeRenderer(){return!0}get _layerView(){return this.layer&&this.mapExtension?._allLayerViews.find((e=>e.layer===this.layer))}_getProjectWebmapJSON(){const e=super._getProjectWebmapJSON();if(!e||this.dynamicallyAddedLayer)return e;const{layerDefinition:t,showLabels:r}=o(this.layer),{definitionExpression:i,drawingInfo:s}=t??{};return i&&(e.layerDefinition={...e.layerDefinition,definitionExpression:i}),s&&(e.layerDefinition={...e.layerDefinition,drawingInfo:s}),void 0!==r&&(e.showLabels=r),e}async*_getFeatures(e,t){const r=this.layer.createQuery();r.objectIds=e.map((e=>m(e))),r.where=void 0,r.outFields=t.outFields,r.returnGeometry=t.returnGeometry,yield*(await import("../support/_query.js")).executeQuery(r,this,this.layer,t.cancelToken)}_applyLayerProperties(e,t){return u("properties",e).isNotMissing(),u("properties.layerType",e.layerType).satisfies((e=>!e||"ArcGISFeatureLayer"===e||"ArcGISStreamLayer"===e||"CSV"===e)),u("layer",t).isNotMissing().satisfies((e=>y(e)||d(e)||p(e)||c(e))),u("properties",e).satisfies((e=>!s(e))),super._applyLayerProperties(e,t)}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,layer:{...this._toPropertyDef(e.layer),default:{layerType:"ArcGISFeatureLayer"}}}}_createSchema(){return new
|
|
1
|
+
import{__decorate as e}from"tslib";import{InvalidOperationError as t}from"../InvalidOperationError.js";import{TaskSettings as r}from"../data/TaskSettings.js";import{supportsAttachmentEditing as i}from"../data/support/attachments.js";import{_isGraphicsLayerJson as s}from"../json/FeatureLayerJson.js";import{layerToJson as o}from"../json/LayerJson.js";import{serializable as a}from"../support/Serializable.js";import{notifyChange as n}from"../support/observableUtils.js";import{ReadOnlyCollection as l}from"../utilities/ReadOnlyCollection.js";import{isCSVLayer as p,isFeatureLayer as y,isGraphicsLayer as c,isStreamLayer as d}from"../utilities/_layers.js";import{checkArg as u}from"../utilities/checkArg.js";import{parse as m}from"../utilities/format/number.js";import{LayerExtension as g,LayerExtensionSchema as h,ERR_SCHEMA_READ_ONLY as _}from"./_LayerExtension.js";import{ArrayWrappedCollection as f}from"./support/ArrayWrappedCollection.js";import{PopupTemplateFeatureSettings as S}from"./support/PopupTemplateFeatureSettings.js";export class FeatureLayerExtensionBase extends g{get hasFeatures(){return!0}get layer(){return super.layer}get renderer(){return this.layer?.renderer}get canChangeDefinitionExpression(){return!0}get canChangeRenderer(){return!0}get canChangeLabels(){return!0}get _layerView(){return this.layer&&this.mapExtension?._allLayerViews.find((e=>e.layer===this.layer))}_getProjectWebmapJSON(){const e=super._getProjectWebmapJSON();if(!e||this.dynamicallyAddedLayer)return e;const{layerDefinition:t,showLabels:r}=o(this.layer),{definitionExpression:i,drawingInfo:s}=t??{};return i&&(e.layerDefinition={...e.layerDefinition,definitionExpression:i}),s&&(e.layerDefinition={...e.layerDefinition,drawingInfo:s}),void 0!==r&&(e.showLabels=r),e}async*_getFeatures(e,t){const r=this.layer.createQuery();r.objectIds=e.map((e=>m(e))),r.where=void 0,r.outFields=t.outFields,r.returnGeometry=t.returnGeometry,yield*(await import("../support/_query.js")).executeQuery(r,this,this.layer,t.cancelToken)}_applyLayerProperties(e,t){return u("properties",e).isNotMissing(),u("properties.layerType",e.layerType).satisfies((e=>!e||"ArcGISFeatureLayer"===e||"ArcGISStreamLayer"===e||"CSV"===e)),u("layer",t).isNotMissing().satisfies((e=>y(e)||d(e)||p(e)||c(e))),u("properties",e).satisfies((e=>!s(e))),super._applyLayerProperties(e,t)}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,layer:{...this._toPropertyDef(e.layer),default:{layerType:"ArcGISFeatureLayer"}}}}_createSchema(){return new C(this)}_isSupportedLayer(e){return y(e)}_createFeatureSettings(){return new b(this)}_createTaskSettings(){return new E(this)}_capabilities(){const e=i(this.layer);return this.layer?.capabilities?.operations?{...this.layer.capabilities.operations,supportsAttachmentEditing:e,supportsStandardizedQueries:this.layer.capabilities?.query?.supportsStandardizedQueriesOnly}:{...super._capabilities(),supportsAttachmentEditing:e}}}let b=class extends S{get zoomScale(){const e="point"===this._layerExtension.schema.geometryType?this._layerExtension.layer.maxScale:void 0;return this._getSetting("zoomScale",e)}set zoomScale(e){this._setSetting("zoomScale",e)}};b=e([a],b);let C=class extends h{_fieldCollection;_typesCollection;constructor(e){super(e),this._fieldCollection=this._createFieldCollection(),this._typesCollection=this._createTypeCollection(),n(this,"_fields")}get types(){return this._typesCollection}get _fields(){return this._fieldCollection}destroy(){this._fieldCollection.destroy(),this._typesCollection.destroy(),super.destroy()}_createFieldCollection(){return new f({parent:this._layerExtension,targetProperty:"layer",arrayProperty:"fields"})}_createTypeCollection(){return new f({parent:this._layerExtension,targetProperty:"layer",arrayProperty:"types"})}_getPropertyBindings(){return{primaryKeyField:"objectIdField",geometryType:"geometryType",spatialReference:"spatialReference",displayField:"displayField",typeIdField:"typeIdField"}}};C=e([a],C);export{C as FeatureLayerSchema};let x=class extends C{_setSetting(e,r){if(this._layerBindings.has(e))throw new t(_);super._setSetting(e,r)}_createFieldCollection(){return new l(super._createFieldCollection(),{destroyBackingCollection:!0})}_createTypeCollection(){return new l(super._createTypeCollection(),{destroyBackingCollection:!0})}};x=e([a],x);export{x as FeatureLayerReadOnlySchema};let E=class extends r{_layerExtension;constructor(e,t){super(t),this._layerExtension=e}get enableEditing(){return this._getSetting("enableEditing",this._layerExtension.layer?.editingEnabled??!0)}set enableEditing(e){this._setSetting("enableEditing",e)}};E=e([a],E);
|
package/package.json
CHANGED
package/version.d.ts
CHANGED
package/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version="53.
|
|
1
|
+
export const version="53.16.1";
|