@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.
Files changed (30) hide show
  1. package/data/convert.d.ts +22 -0
  2. package/data/convert.js +1 -1
  3. package/data/support/fgdbConverter.d.ts +61 -0
  4. package/data/support/fgdbConverter.js +1 -0
  5. package/docs/html/assets/navigation.js +1 -1
  6. package/docs/html/assets/search.js +1 -1
  7. package/docs/html/classes/data_RelationshipBase.RelationshipBase.html +1 -1
  8. package/docs/html/classes/tasks_query_ArcGISRelationship.ArcGISRelationship.html +51 -50
  9. package/docs/html/classes/tasks_query_QueryBasedRelationship.QueryBasedRelationship.html +1 -1
  10. package/docs/html/functions/data_convert.fgdbToLayerExtensions.html +5 -0
  11. package/docs/html/functions/data_support_fgdbConverter.createFgdbLayer.html +9 -0
  12. package/docs/html/functions/data_support_fgdbConverter.extractLayerTitle.html +4 -0
  13. package/docs/html/functions/data_support_fgdbConverter.getGeometryDrawPriority.html +6 -0
  14. package/docs/html/hierarchy.html +1 -1
  15. package/docs/html/interfaces/data__Relationship.RelationshipProperties.html +1 -1
  16. package/docs/html/interfaces/data_convert.FgdbToLayerExtensionsOptions.html +6 -0
  17. package/docs/html/interfaces/data_support_fgdbConverter.DynamicLayerMetadataResponse.html +4 -0
  18. package/docs/html/interfaces/data_support_fgdbConverter.GeoProcessedFgdbData.html +10 -0
  19. package/docs/html/interfaces/tasks_query_ArcGISRelationship.ArcGISRelationshipProperties.html +24 -23
  20. package/docs/html/interfaces/tasks_query_QueryBasedRelationship.QueryBasedRelationshipProperties.html +1 -1
  21. package/docs/html/modules/data_convert.html +2 -0
  22. package/docs/html/modules/data_support_fgdbConverter.html +6 -0
  23. package/docs/html/modules.html +1 -0
  24. package/docs/html/variables/version.version.html +1 -1
  25. package/package.json +1 -1
  26. package/support/_ArcGISRelationshipCollection.js +1 -1
  27. package/tasks/query/ArcGISRelationship.d.ts +75 -12
  28. package/tasks/query/ArcGISRelationship.js +1 -1
  29. package/version.d.ts +1 -1
  30. 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 { RelationshipType } from "../../data/_Relationship.js";
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 type { QueryBasedRelationshipProperties } from "./QueryBasedRelationship.js";
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 QueryBasedRelationshipProperties {
12
+ export interface ArcGISRelationshipProperties extends RelationshipProperties {
12
13
  /**
13
- * See {@link ArcGISRelationship.relationshipTableId}.
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 {@link ArcGISRelationship.originForeignKey}.
42
+ * See
43
+ * {@link tasks/query/ArcGISRelationship!ArcGISRelationship.originForeignKey}.
18
44
  */
19
45
  originForeignKey?: string;
20
46
  /**
21
- * See {@link ArcGISRelationship.destinationForeignKey}.
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 QueryBasedRelationship<ArcGISRelationshipProperties> {
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: ArcGISRelationshipProperties);
108
+ constructor(properties: TProperties);
52
109
  /**
53
110
  * Whether the relationship is attributed.
54
111
  */
55
112
  get isAttributed(): boolean;
56
- protected _getSerializableProperties(): PropertyDefs<ArcGISRelationshipProperties>;
113
+ protected _getSerializableProperties(): PropertyDefs<TProperties>;
114
+ /**
115
+ * @inheritDoc
116
+ */
57
117
  protected _getRelatedFeatures(feature: Feature, options?: FetchRelatedFeaturesOptions): Promise<FeatureSet>;
58
- protected _getAllRelatedFeatures(features: Feature[], options?: FetchRelatedFeaturesOptions): Promise<Map<Feature, FeatureSet>>;
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 t from"@arcgis/core/rest/support/RelationshipQuery";import{isSublayerExtension as i}from"../../ItemType.js";import{cancelifyWithAbortSignal as r}from"../../support/Cancellable.js";import{serializable as a}from"../../support/Serializable.js";import{isFeatureLayer as s,isMapImageSublayer as o,isSubtypeGroupLayer as n}from"../../utilities/_layers.js";import{isArcGISServiceTableExtension as l,isFeatureLayerExtension as u,isSubtypeGroupLayerExtension as p,isSubtypeSublayerExtension as y}from"../../utilities/extensions.js";import{QueryBasedRelationship as c}from"./QueryBasedRelationship.js";const d=new WeakMap;let m=class extends c{relationshipType="ArcGISRelationship";relationshipTableId;originForeignKey;destinationForeignKey;constructor(e){super(e),this.relationshipTableId=e.relationshipTableId,this.originForeignKey=e.originForeignKey,this.destinationForeignKey=e.destinationForeignKey}get isAttributed(){return"number"==typeof this.relationshipTableId}_getSerializableProperties(){return{...super._getSerializableProperties(),$relationshipType:{serializeModes:["initial"],serialize:()=>"ArcGISRelationship"},destinationForeignKey:"initial",originForeignKey:"initial",relationshipTableId:"initial"}}async _getRelatedFeatures(e,t){return r((async t=>(await f([e],h(this.source),this.relatedSource,{relationshipId:+this.id,signal:t})).get(e)),t?.cancelToken)}async _getAllRelatedFeatures(e,t){return f(e,h(this.source),this.relatedSource,{relationshipId:+this.id})}};m=e([a],m);export{m as ArcGISRelationship};function h(e){let t;if(l(e))t=e.table;else if(u(e))t=e.layer;else if(i(e)&&o(e.sublayer))t=e.sublayer;else if(y(e)&&e.sublayer?.layer)t=e.sublayer.layer;else{if(!p(e))throw new Error(`Cannot query for related records. Unsupported FeatureSource: ${e.title} (${e.itemType}/${e.id})`);t=e.layer}return t}const g={returnGeometry:!0};async function f(e,i,r,a){const o=e.map((e=>+e?.primaryKey)),{signal:l,...u}=a,p=new t({...g,objectIds:o.filter((e=>!isNaN(e)&&"number"==typeof e)),outFields:r?.featureSettings.outFields??["*"],...u});let y;if(s(i)||n(i))y=i;else{const e=i;d.has(e)||d.set(e,await e.createFeatureLayer()),y=d.get(e)}const c=await y.queryRelatedFeatures(p,{signal:l}),m=new Map,[h,f]=await Promise.all([(await import("../../data/FeatureSet.js")).FeatureSet,(await import("../../data/Feature.js")).toFeature]);return o.forEach(((t,i)=>{m.set(e[i],new h({source:r,features:c[t]?.features.map((e=>f(e,{source:r})))??[]}))})),m}
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
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The current version of the Geocortex ArcGIS Extensions API.
3
3
  */
4
- export declare const version = "53.8.0";
4
+ export declare const version = "53.10.0";
package/version.js CHANGED
@@ -1 +1 @@
1
- export const version="53.8.0";
1
+ export const version="53.10.0";