@vertigis/arcgis-extensions 53.8.0 → 53.10.0
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/convert.d.ts +22 -0
- package/data/convert.js +1 -1
- package/data/support/fgdbConverter.d.ts +61 -0
- package/data/support/fgdbConverter.js +1 -0
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/data_RelationshipBase.RelationshipBase.html +1 -1
- package/docs/html/classes/tasks_query_ArcGISRelationship.ArcGISRelationship.html +51 -50
- package/docs/html/classes/tasks_query_QueryBasedRelationship.QueryBasedRelationship.html +1 -1
- package/docs/html/functions/data_convert.fgdbToLayerExtensions.html +5 -0
- package/docs/html/functions/data_support_fgdbConverter.createFgdbLayer.html +9 -0
- package/docs/html/functions/data_support_fgdbConverter.extractLayerTitle.html +4 -0
- package/docs/html/functions/data_support_fgdbConverter.getGeometryDrawPriority.html +6 -0
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/interfaces/data__Relationship.RelationshipProperties.html +1 -1
- package/docs/html/interfaces/data_convert.FgdbToLayerExtensionsOptions.html +6 -0
- package/docs/html/interfaces/data_support_fgdbConverter.DynamicLayerMetadataResponse.html +4 -0
- package/docs/html/interfaces/data_support_fgdbConverter.GeoProcessedFgdbData.html +10 -0
- package/docs/html/interfaces/tasks_query_ArcGISRelationship.ArcGISRelationshipProperties.html +24 -23
- package/docs/html/interfaces/tasks_query_QueryBasedRelationship.QueryBasedRelationshipProperties.html +1 -1
- package/docs/html/modules/data_convert.html +2 -0
- package/docs/html/modules/data_support_fgdbConverter.html +6 -0
- package/docs/html/modules.html +1 -0
- package/docs/html/variables/version.version.html +1 -1
- package/package.json +1 -1
- package/support/_ArcGISRelationshipCollection.js +1 -1
- package/tasks/query/ArcGISRelationship.d.ts +75 -12
- package/tasks/query/ArcGISRelationship.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,33 +1,90 @@
|
|
|
1
1
|
import type { Feature, FetchRelatedFeaturesOptions } from "../../data/Feature.js";
|
|
2
2
|
import type { FeatureSet } from "../../data/FeatureSet.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { FeatureSource } from "../../data/FeatureSource.js";
|
|
4
|
+
import { RelationshipBase } from "../../data/RelationshipBase.js";
|
|
5
|
+
import type { Cardinality, RelationshipProperties, RelationshipType } from "../../data/_Relationship.js";
|
|
4
6
|
import type { PropertyDefs } from "../../support/Serializable.js";
|
|
5
|
-
import
|
|
6
|
-
import { QueryBasedRelationship } from "./QueryBasedRelationship.js";
|
|
7
|
+
import { QueryService } from "./QueryService.js";
|
|
7
8
|
/**
|
|
8
9
|
* Properties that can be passed into the constructor for
|
|
9
|
-
* {@link ArcGISRelationship}.
|
|
10
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship}.
|
|
10
11
|
*/
|
|
11
|
-
export interface ArcGISRelationshipProperties extends
|
|
12
|
+
export interface ArcGISRelationshipProperties extends RelationshipProperties {
|
|
12
13
|
/**
|
|
13
|
-
* See {@link ArcGISRelationship.
|
|
14
|
+
* See {@link tasks/query/ArcGISRelationship!ArcGISRelationship.keyField}.
|
|
15
|
+
*/
|
|
16
|
+
keyField: string;
|
|
17
|
+
/**
|
|
18
|
+
* See
|
|
19
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship.relatedSource}.
|
|
20
|
+
*/
|
|
21
|
+
relatedSource: FeatureSource;
|
|
22
|
+
/**
|
|
23
|
+
* See
|
|
24
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship.relatedKeyField}.
|
|
25
|
+
*/
|
|
26
|
+
relatedKeyField?: string;
|
|
27
|
+
/**
|
|
28
|
+
* See {@link tasks/query/ArcGISRelationship!ArcGISRelationship.cardinality}.
|
|
29
|
+
*/
|
|
30
|
+
cardinality?: Cardinality;
|
|
31
|
+
/**
|
|
32
|
+
* See
|
|
33
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship.queryService}.
|
|
34
|
+
*/
|
|
35
|
+
queryService?: QueryService;
|
|
36
|
+
/**
|
|
37
|
+
* See
|
|
38
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship.relationshipTableId}.
|
|
14
39
|
*/
|
|
15
40
|
relationshipTableId?: number;
|
|
16
41
|
/**
|
|
17
|
-
* See
|
|
42
|
+
* See
|
|
43
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship.originForeignKey}.
|
|
18
44
|
*/
|
|
19
45
|
originForeignKey?: string;
|
|
20
46
|
/**
|
|
21
|
-
* See
|
|
47
|
+
* See
|
|
48
|
+
* {@link tasks/query/ArcGISRelationship!ArcGISRelationship.destinationForeignKey}.
|
|
22
49
|
*/
|
|
23
50
|
destinationForeignKey?: string;
|
|
51
|
+
/**
|
|
52
|
+
* See {@link data/_Relationship!RelationshipProperties.$relationshipType}.
|
|
53
|
+
*/
|
|
54
|
+
$relationshipType?: RelationshipType;
|
|
24
55
|
}
|
|
25
56
|
/**
|
|
26
57
|
* A {@link data/_Relationship!Relationship} that works by querying the
|
|
27
58
|
* queryRelatedRecords endpoint of a FeatureLayer, Table, or ArcGIS Sublayer.
|
|
28
59
|
*/
|
|
29
|
-
export declare class ArcGISRelationship extends
|
|
60
|
+
export declare class ArcGISRelationship<TProperties extends ArcGISRelationshipProperties = ArcGISRelationshipProperties> extends RelationshipBase<TProperties> {
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
readonly relatedSource: FeatureSource;
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
readonly cardinality: Cardinality;
|
|
69
|
+
/**
|
|
70
|
+
* The key field in the source.
|
|
71
|
+
*/
|
|
72
|
+
readonly keyField: string;
|
|
73
|
+
/**
|
|
74
|
+
* @inheritDoc
|
|
75
|
+
*/
|
|
30
76
|
readonly relationshipType: RelationshipType;
|
|
77
|
+
/**
|
|
78
|
+
* The {@link tasks/query/QueryService!QueryService} to use for fetching
|
|
79
|
+
* related features. The service must be configured with a provider that can
|
|
80
|
+
* handle the related source.
|
|
81
|
+
*/
|
|
82
|
+
queryService: QueryService;
|
|
83
|
+
/**
|
|
84
|
+
* The key field in the related source. Needed for two-sided relationships
|
|
85
|
+
* but isn't needed for one-sided ones.
|
|
86
|
+
*/
|
|
87
|
+
readonly relatedKeyField: string | undefined;
|
|
31
88
|
/**
|
|
32
89
|
* The ID of the intermediate table in the feature service for attributed
|
|
33
90
|
* relationships. This property will only be exposed if the relationship is
|
|
@@ -48,12 +105,18 @@ export declare class ArcGISRelationship extends QueryBasedRelationship<ArcGISRel
|
|
|
48
105
|
* attributed.
|
|
49
106
|
*/
|
|
50
107
|
readonly destinationForeignKey: string | undefined;
|
|
51
|
-
constructor(properties:
|
|
108
|
+
constructor(properties: TProperties);
|
|
52
109
|
/**
|
|
53
110
|
* Whether the relationship is attributed.
|
|
54
111
|
*/
|
|
55
112
|
get isAttributed(): boolean;
|
|
56
|
-
protected _getSerializableProperties(): PropertyDefs<
|
|
113
|
+
protected _getSerializableProperties(): PropertyDefs<TProperties>;
|
|
114
|
+
/**
|
|
115
|
+
* @inheritDoc
|
|
116
|
+
*/
|
|
57
117
|
protected _getRelatedFeatures(feature: Feature, options?: FetchRelatedFeaturesOptions): Promise<FeatureSet>;
|
|
58
|
-
|
|
118
|
+
/**
|
|
119
|
+
* @inheritDoc
|
|
120
|
+
*/
|
|
121
|
+
protected _getAllRelatedFeatures(features: Feature[]): Promise<Map<Feature, FeatureSet>>;
|
|
59
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import
|
|
1
|
+
import{__decorate as e}from"tslib";import i from"@arcgis/core/rest/support/RelationshipQuery";import{isSublayerExtension as t}from"../../ItemType.js";import{RelationshipBase as r}from"../../data/RelationshipBase.js";import{cancelifyWithAbortSignal as a}from"../../support/Cancellable.js";import{serializable as s}from"../../support/Serializable.js";import{isFeatureLayer as o,isMapImageSublayer as l,isSubtypeGroupLayer as n}from"../../utilities/_layers.js";import{checkArg as u}from"../../utilities/checkArg.js";import{isArcGISServiceTableExtension as p,isFeatureLayerExtension as y,isSubtypeGroupLayerExtension as d,isSubtypeSublayerExtension as c}from"../../utilities/extensions.js";import{QueryService as m}from"./QueryService.js";const h=new WeakMap;let g=class extends r{relatedSource;cardinality;keyField;relationshipType="ArcGISRelationship";queryService;relatedKeyField;relationshipTableId;originForeignKey;destinationForeignKey;constructor(e){super(e),u("properties",e).isNotMissing(),u("properties.relatedSource",e.relatedSource).isNotMissing(),u("properties.keyField",e.keyField).isNotMissing().isNotEmpty(),this.relatedSource=e.relatedSource,this.keyField=e.keyField,this.relatedKeyField=e.relatedKeyField,this.cardinality=e.cardinality||"many-to-many",this.relationshipTableId=e.relationshipTableId,this.queryService=e.queryService||new m,this.originForeignKey=e.originForeignKey,this.destinationForeignKey=e.destinationForeignKey}get isAttributed(){return"number"==typeof this.relationshipTableId}_getSerializableProperties(){return{...super._getSerializableProperties(),keyField:"initial",relatedKeyField:"initial",$relationshipType:{serializeModes:["initial"],serialize:()=>"ArcGISRelationship"},cardinality:"initial",relatedSource:"initial",queryService:{serialize:!1},destinationForeignKey:"initial",originForeignKey:"initial",relationshipTableId:"initial"}}async _getRelatedFeatures(e,i){return a((async i=>(await S([e],F(this.source),this.relatedSource,{relationshipId:+this.id,signal:i})).get(e)),i?.cancelToken)}async _getAllRelatedFeatures(e){return S(e,F(this.source),this.relatedSource,{relationshipId:+this.id})}};g=e([s],g);export{g as ArcGISRelationship};function F(e){let i;if(p(e))i=e.table;else if(y(e))i=e.layer;else if(t(e)&&l(e.sublayer))i=e.sublayer;else if(c(e)&&e.sublayer?.layer)i=e.sublayer.layer;else{if(!d(e))throw new Error(`Cannot query for related records. Unsupported FeatureSource: ${e.title} (${e.itemType}/${e.id})`);i=e.layer}return i}const f={returnGeometry:!0};async function S(e,t,r,a){const s=e.map((e=>+e?.primaryKey)),{signal:l,...u}=a,p=new i({...f,objectIds:s.filter((e=>!isNaN(e)&&"number"==typeof e)),outFields:r?.featureSettings.outFields??["*"],...u});let y;if(o(t)||n(t))y=t;else{const e=t;h.has(e)||h.set(e,await e.createFeatureLayer()),y=h.get(e)}const d=await y.queryRelatedFeatures(p,{signal:l}),c=new Map,[m,g]=await Promise.all([(await import("../../data/FeatureSet.js")).FeatureSet,(await import("../../data/Feature.js")).toFeature]);return s.forEach(((i,t)=>{c.set(e[t],new m({source:r,features:d[i]?.features.map((e=>g(e,{source:r})))??[]}))})),c}
|
package/version.d.ts
CHANGED
package/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version="53.
|
|
1
|
+
export const version="53.10.0";
|