@arcgis/core 4.32.0-next.20241220 → 4.32.0-next.20241221
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/WebLinkChart.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/127c82cdb229434883b6.js +1 -0
- package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +1 -0
- package/assets/esri/core/workers/chunks/{5119811063bfc97fb725.js → 1a713cc601c6fcd97d2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{48f6eb3b63fec1d3312d.js → 2d908c115ea18e813b95.js} +1 -1
- package/assets/esri/core/workers/chunks/{11052103efe3d53a784e.js → 31d9f0a37a5d0a1c450b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7c3199813070ff30a3d.js → 3bb94da29dac3367ecc6.js} +1 -1
- package/assets/esri/core/workers/chunks/3ed7c8138231de3a3b96.js +1 -0
- package/assets/esri/core/workers/chunks/{9cc9bac6e02ab241e852.js → 4746b7afa90ea3641e60.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce33d2b5f22a5c566661.js → 4b5dbdcad438cb2dd4bf.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee1ddf56549bb169509c.js → 6332da54159d72a6ce66.js} +1 -1
- package/assets/esri/core/workers/chunks/648d7d8fa19a2e772c89.js +1 -0
- package/assets/esri/core/workers/chunks/66b411119b8ffb99b9dc.js +1 -0
- package/assets/esri/core/workers/chunks/88c68881cbdf4e911832.js +1 -0
- package/assets/esri/core/workers/chunks/8e60de347b209a753c73.js +1 -0
- package/assets/esri/core/workers/chunks/{770d233254419b741616.js → 9ad7d095e614e7e8d7f5.js} +1 -1
- package/assets/esri/core/workers/chunks/9dd167db3f2e68b71cea.js +1 -0
- package/assets/esri/core/workers/chunks/{b15894bff153e0793ef4.js → 9f495ad57cdbfa90c5b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7b76bc7bff34abc2253.js → a0b3d70a1b0360084593.js} +1 -1
- package/assets/esri/core/workers/chunks/{95af4dee29eb196b8ada.js → a90611cdc86190799560.js} +1 -1
- package/assets/esri/core/workers/chunks/{e213f4a1c95a33f80cdc.js → aedff36d3fec86abb9fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{194013d377e7dd00845f.js → b611f46835edcd6eefcc.js} +1 -1
- package/assets/esri/core/workers/chunks/c1c216b0aebe86311fae.js +1 -0
- package/assets/esri/core/workers/chunks/{f2b195d04414417682d4.js → cbf57abb537e86c1dd7f.js} +1 -1
- package/assets/esri/core/workers/chunks/f9af0473878d960a02f2.js +1 -0
- package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +1 -0
- package/assets/esri/core/workers/chunks/{0f1a7aeec18db5323365.js → fdd8a5eb07466541f1f9.js} +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/form/elements/UtilityNetworkAssociationsElement.d.ts +4 -0
- package/form/elements/{UtilityNetworkAssociationElement.js → UtilityNetworkAssociationsElement.js} +1 -1
- package/form/elements.js +1 -1
- package/form/support/formUtils.js +1 -1
- package/interfaces.d.ts +178 -67
- package/layers/LinkChartLayer.js +1 -1
- package/layers/knowledgeGraph/supportUtils.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/linkChart/OrganicLayoutSettings.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/support/fileFormat.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/terrain/TileTexture.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/SlideLegend.d.ts +4 -0
- package/webscene/SlideLegend.js +5 -0
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print/TemplateOptions.js +1 -1
- package/widgets/Print.js +1 -1
- package/assets/esri/core/workers/chunks/0e9bd990a8d0691fb9c8.js +0 -1
- package/assets/esri/core/workers/chunks/27933d6ffeebb5c13ab7.js +0 -1
- package/assets/esri/core/workers/chunks/2c084c0c324e3af56424.js +0 -1
- package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +0 -1
- package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +0 -1
- package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +0 -1
- package/assets/esri/core/workers/chunks/a68068b3151a14c4a0ad.js +0 -1
- package/assets/esri/core/workers/chunks/ad99308fb9678cdce917.js +0 -1
- package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +0 -1
- package/assets/esri/core/workers/chunks/dd4bd96dfb7f9921b774.js +0 -1
- package/assets/esri/core/workers/chunks/e1a03231e24293e66418.js +0 -1
package/form/elements/{UtilityNetworkAssociationElement.js → UtilityNetworkAssociationsElement.js}
RENAMED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../chunks/tslib.es6.js";import t from"../../core/Clonable.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import r from"./Element.js";import i from"../../popup/support/UtilityNetworkAssociationType.js";let p=class extends(t.ClonableMixin(r)){constructor(o){super(o),this.associationTypes=null,this.displayCount=3,this.editableExpression=null,this.type="utilityNetworkAssociations"}};o([s({type:[i],json:{write:{isRequired:!0}}})],p.prototype,"associationTypes",void 0),o([s({type:Number,json:{write:!0}})],p.prototype,"displayCount",void 0),o([s({type:String,json:{write:!0}})],p.prototype,"editableExpression",void 0),o([s({type:["utilityNetworkAssociations"],json:{read:!1,write:!0}})],p.prototype,"type",void 0),p=o([e("esri.form.elements.
|
|
5
|
+
import{_ as o}from"../../chunks/tslib.es6.js";import t from"../../core/Clonable.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import r from"./Element.js";import i from"../../popup/support/UtilityNetworkAssociationType.js";let p=class extends(t.ClonableMixin(r)){constructor(o){super(o),this.associationTypes=null,this.displayCount=3,this.editableExpression=null,this.type="utilityNetworkAssociations"}};o([s({type:[i],json:{write:{isRequired:!0}}})],p.prototype,"associationTypes",void 0),o([s({type:Number,json:{write:!0}})],p.prototype,"displayCount",void 0),o([s({type:String,json:{write:!0}})],p.prototype,"editableExpression",void 0),o([s({type:["utilityNetworkAssociations"],json:{read:!1,write:!0}})],p.prototype,"type",void 0),p=o([e("esri.form.elements.UtilityNetworkAssociationsElement")],p);const n=p;export{n as default};
|
package/form/elements.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
export{default as AttachmentElement}from"./elements/AttachmentElement.js";export{default as FieldElement}from"./elements/FieldElement.js";export{default as GroupElement}from"./elements/GroupElement.js";export{default as RelationshipElement}from"./elements/RelationshipElement.js";export{default as TextElement}from"./elements/TextElement.js";
|
|
5
|
+
export{default as AttachmentElement}from"./elements/AttachmentElement.js";export{default as FieldElement}from"./elements/FieldElement.js";export{default as GroupElement}from"./elements/GroupElement.js";export{default as RelationshipElement}from"./elements/RelationshipElement.js";export{default as TextElement}from"./elements/TextElement.js";export{default as UtilityNetworkAssociationsElement}from"./elements/UtilityNetworkAssociationsElement.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ensureOneOfType as t}from"../../core/accessorSupport/ensureType.js";import e from"../elements/AttachmentElement.js";import
|
|
5
|
+
import{ensureOneOfType as t}from"../../core/accessorSupport/ensureType.js";import e from"../elements/AttachmentElement.js";import o from"../elements/Element.js";import p from"../elements/FieldElement.js";import r from"../elements/RelationshipElement.js";import i from"../elements/TextElement.js";import n from"../elements/UtilityNetworkAssociationsElement.js";const s=t=>"field"===t.type,u=t=>"group"===t.type,m=t=>"text"===t.type,y=t=>"relationship"===t.type,l=t=>"utilityNetworkAssociations"===t.type;function a(t){return f(t)||c(t)}function f(t){return"text-area"===t.type}function c(t){return"text-box"===t.type}function h(t){return{typesWithGroup:{base:o,key:"type",typeMap:{attachment:e,field:p,group:t,relationship:r,text:i,utilityNetworkAssociations:n}},typesWithoutGroup:{base:o,key:"type",typeMap:{attachment:e,field:p,relationship:r,text:i,utilityNetworkAssociations:n}}}}function x(t,e,o=!0){if(!t)return null;const p=o?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter((t=>p[t.type])).map((t=>p[t.type].fromJSON(t)))}function G(t,e,o=!0){if(!t)return null;const p=o?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter((t=>p[t.type])).map((t=>t.toJSON()))}function W(e,o,p=!0){return e?e.map((e=>t(p?o.typesWithGroup:o.typesWithoutGroup,e))):null}export{h as buildTypeMaps,W as ensureType,x as fromJSON,s as isFieldElement,u as isGroupElement,y as isRelationshipElement,f as isTextAreaInput,c as isTextBoxInput,m as isTextElement,a as isTextInput,l as isUtilityNetworkAssociationsElement,G as toJSON};
|
package/interfaces.d.ts
CHANGED
|
@@ -4134,7 +4134,8 @@ declare namespace __esri {
|
|
|
4134
4134
|
| __esri.GroupElement
|
|
4135
4135
|
| __esri.RelationshipElement
|
|
4136
4136
|
| __esri.TextElement
|
|
4137
|
-
| __esri.AttachmentElement
|
|
4137
|
+
| __esri.AttachmentElement
|
|
4138
|
+
| __esri.UtilityNetworkAssociationsElement;
|
|
4138
4139
|
/**
|
|
4139
4140
|
* `FieldElement` defines how a feature layer's field participates in the form.
|
|
4140
4141
|
*
|
|
@@ -4171,6 +4172,13 @@ declare namespace __esri {
|
|
|
4171
4172
|
*/
|
|
4172
4173
|
export type AttachmentElement = __esri.AttachmentElement;
|
|
4173
4174
|
export const AttachmentElement: typeof __esri.AttachmentElement;
|
|
4175
|
+
/**
|
|
4176
|
+
* `UtilityNetworkAssociationsElement` defines how utility network associations can participate in the form.
|
|
4177
|
+
*
|
|
4178
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements.html#UtilityNetworkAssociationsElement Read more...}
|
|
4179
|
+
*/
|
|
4180
|
+
export type UtilityNetworkAssociationsElement = __esri.UtilityNetworkAssociationsElement;
|
|
4181
|
+
export const UtilityNetworkAssociationsElement: typeof __esri.UtilityNetworkAssociationsElement;
|
|
4174
4182
|
}
|
|
4175
4183
|
|
|
4176
4184
|
export class AttachmentElement extends Element {
|
|
@@ -4350,7 +4358,7 @@ declare namespace __esri {
|
|
|
4350
4358
|
*
|
|
4351
4359
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-Element.html#type Read more...}
|
|
4352
4360
|
*/
|
|
4353
|
-
readonly type: "attachment" | "field" | "group" | "relationship" | "text" | "
|
|
4361
|
+
readonly type: "attachment" | "field" | "group" | "relationship" | "text" | "utilityNetworkAssociations";
|
|
4354
4362
|
/**
|
|
4355
4363
|
* A reference to the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-ExpressionInfo.html#name name} of an
|
|
4356
4364
|
* {@link https://developers.arcgis.com/javascript/latest/arcade/ Arcade} expression defined in the
|
|
@@ -6049,6 +6057,67 @@ declare namespace __esri {
|
|
|
6049
6057
|
textFormat?: "plain-text" | "markdown";
|
|
6050
6058
|
}
|
|
6051
6059
|
|
|
6060
|
+
export class UtilityNetworkAssociationsElement extends Element {
|
|
6061
|
+
/**
|
|
6062
|
+
* The association types.
|
|
6063
|
+
*
|
|
6064
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#associationTypes Read more...}
|
|
6065
|
+
*/
|
|
6066
|
+
associationTypes: UtilityNetworkAssociationType[];
|
|
6067
|
+
/**
|
|
6068
|
+
* A numeric value indicating the maximum number of associated features to display in the list of per layer.
|
|
6069
|
+
*
|
|
6070
|
+
* @default 3
|
|
6071
|
+
*
|
|
6072
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#displayCount Read more...}
|
|
6073
|
+
*/
|
|
6074
|
+
displayCount: number;
|
|
6075
|
+
/**
|
|
6076
|
+
* A reference to the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-ExpressionInfo.html#name name} of an
|
|
6077
|
+
* {@link https://developers.arcgis.com/javascript/latest/arcade/ Arcade} expression defined in the
|
|
6078
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html#expressionInfos expressionInfos} of the FormTemplate.
|
|
6079
|
+
*
|
|
6080
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#editableExpression Read more...}
|
|
6081
|
+
*/
|
|
6082
|
+
editableExpression: string;
|
|
6083
|
+
/**
|
|
6084
|
+
* Indicates the type of form {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-Element.html element}.
|
|
6085
|
+
*
|
|
6086
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#type Read more...}
|
|
6087
|
+
*/
|
|
6088
|
+
readonly type: "utilityNetworkAssociations";
|
|
6089
|
+
/**
|
|
6090
|
+
* The `UtilityNetworkAssociationsElement` defines how utility network associations can participate in the form.
|
|
6091
|
+
*
|
|
6092
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html Read more...}
|
|
6093
|
+
*/
|
|
6094
|
+
constructor(properties?: UtilityNetworkAssociationsElementProperties);
|
|
6095
|
+
static fromJSON(json: any): UtilityNetworkAssociationsElement;
|
|
6096
|
+
}
|
|
6097
|
+
|
|
6098
|
+
interface UtilityNetworkAssociationsElementProperties extends ElementProperties {
|
|
6099
|
+
/**
|
|
6100
|
+
* The association types.
|
|
6101
|
+
*
|
|
6102
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#associationTypes Read more...}
|
|
6103
|
+
*/
|
|
6104
|
+
associationTypes?: UtilityNetworkAssociationType[];
|
|
6105
|
+
/**
|
|
6106
|
+
* A numeric value indicating the maximum number of associated features to display in the list of per layer.
|
|
6107
|
+
*
|
|
6108
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#displayCount Read more...}
|
|
6109
|
+
*/
|
|
6110
|
+
displayCount?: number;
|
|
6111
|
+
/**
|
|
6112
|
+
* A reference to the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-ExpressionInfo.html#name name} of an
|
|
6113
|
+
* {@link https://developers.arcgis.com/javascript/latest/arcade/ Arcade} expression defined in the
|
|
6114
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html#expressionInfos expressionInfos} of the FormTemplate.
|
|
6115
|
+
*
|
|
6116
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-UtilityNetworkAssociationsElement.html#editableExpression Read more...}
|
|
6117
|
+
*/
|
|
6118
|
+
editableExpression?: string;
|
|
6119
|
+
}
|
|
6120
|
+
|
|
6052
6121
|
/**
|
|
6053
6122
|
* `AttachmentElement` defines how one or more attachments can participate in the form.
|
|
6054
6123
|
*
|
|
@@ -6060,7 +6129,12 @@ declare namespace __esri {
|
|
|
6060
6129
|
*
|
|
6061
6130
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements.html#Element Read more...}
|
|
6062
6131
|
*/
|
|
6063
|
-
export type elementsElement =
|
|
6132
|
+
export type elementsElement = | FieldElement
|
|
6133
|
+
| GroupElement
|
|
6134
|
+
| RelationshipElement
|
|
6135
|
+
| TextElement
|
|
6136
|
+
| AttachmentElement
|
|
6137
|
+
| UtilityNetworkAssociationsElement;
|
|
6064
6138
|
/**
|
|
6065
6139
|
* `FieldElement` defines how a feature layer's field participates in the form.
|
|
6066
6140
|
*
|
|
@@ -6086,6 +6160,12 @@ declare namespace __esri {
|
|
|
6086
6160
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements.html#TextElement Read more...}
|
|
6087
6161
|
*/
|
|
6088
6162
|
export type elementsTextElement = TextElement;
|
|
6163
|
+
/**
|
|
6164
|
+
* `UtilityNetworkAssociationsElement` defines how utility network associations can participate in the form.
|
|
6165
|
+
*
|
|
6166
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements.html#UtilityNetworkAssociationsElement Read more...}
|
|
6167
|
+
*/
|
|
6168
|
+
export type elementsUtilityNetworkAssociationsElement = UtilityNetworkAssociationsElement;
|
|
6089
6169
|
|
|
6090
6170
|
export interface ExpressionInfo extends Accessor, JSONSupport {
|
|
6091
6171
|
}
|
|
@@ -6190,7 +6270,14 @@ declare namespace __esri {
|
|
|
6190
6270
|
*
|
|
6191
6271
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html#elements Read more...}
|
|
6192
6272
|
*/
|
|
6193
|
-
elements: (
|
|
6273
|
+
elements: (
|
|
6274
|
+
| AttachmentElement
|
|
6275
|
+
| FieldElement
|
|
6276
|
+
| GroupElement
|
|
6277
|
+
| RelationshipElement
|
|
6278
|
+
| TextElement
|
|
6279
|
+
| UtilityNetworkAssociationsElement
|
|
6280
|
+
)[];
|
|
6194
6281
|
/**
|
|
6195
6282
|
* An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-ExpressionInfo.html ExpressionInfo} objects
|
|
6196
6283
|
* that reference {@link https://developers.arcgis.com/javascript/latest/arcade/ Arcade} expressions following the specification
|
|
@@ -6264,6 +6351,7 @@ declare namespace __esri {
|
|
|
6264
6351
|
| (GroupElementProperties & { type: "group" })
|
|
6265
6352
|
| (RelationshipElementProperties & { type: "relationship" })
|
|
6266
6353
|
| (TextElementProperties & { type: "text" })
|
|
6354
|
+
| (UtilityNetworkAssociationsElementProperties & { type: "utilityNetworkAssociations" })
|
|
6267
6355
|
)[];
|
|
6268
6356
|
/**
|
|
6269
6357
|
* An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-ExpressionInfo.html ExpressionInfo} objects
|
|
@@ -23200,40 +23288,6 @@ declare namespace __esri {
|
|
|
23200
23288
|
url?: string;
|
|
23201
23289
|
}
|
|
23202
23290
|
|
|
23203
|
-
export interface LinkChartLayerChronologicalLayoutSettings {
|
|
23204
|
-
timeDirection?: "right" | "left" | "top" | "bottom";
|
|
23205
|
-
timeBannerUTCOffsetInMinutes?: number;
|
|
23206
|
-
eventsTicksVisualization?: "none" | "start-only" | "start-and-end";
|
|
23207
|
-
showDurationLineForNonZeroDurationEntityEvents?: boolean;
|
|
23208
|
-
durationLineWidth?: number;
|
|
23209
|
-
entityPositionAtDurationRatio?: number;
|
|
23210
|
-
showNonZeroDurationIntervalBounds?: boolean;
|
|
23211
|
-
separateTimeOverlaps?: boolean;
|
|
23212
|
-
separateTimelineOverlaps?: boolean;
|
|
23213
|
-
moveFirstBends?: boolean;
|
|
23214
|
-
secondBendRatio?: number;
|
|
23215
|
-
lineSeparationMultiplier?: number;
|
|
23216
|
-
spaceSeparatedLinesEvenly?: boolean;
|
|
23217
|
-
separatedLineShapeRatio?: number;
|
|
23218
|
-
}
|
|
23219
|
-
|
|
23220
|
-
export interface layersLinkChartLayerChronologicalLayoutSettings {
|
|
23221
|
-
timeDirection?: "right" | "left" | "top" | "bottom";
|
|
23222
|
-
timeBannerUTCOffsetInMinutes?: number;
|
|
23223
|
-
eventsTicksVisualization?: "none" | "start-only" | "start-and-end";
|
|
23224
|
-
showDurationLineForNonZeroDurationEntityEvents?: boolean;
|
|
23225
|
-
durationLineWidth?: number;
|
|
23226
|
-
entityPositionAtDurationRatio?: number;
|
|
23227
|
-
showNonZeroDurationIntervalBounds?: boolean;
|
|
23228
|
-
separateTimeOverlaps?: boolean;
|
|
23229
|
-
separateTimelineOverlaps?: boolean;
|
|
23230
|
-
moveFirstBends?: boolean;
|
|
23231
|
-
secondBendRatio?: number;
|
|
23232
|
-
lineSeparationMultiplier?: number;
|
|
23233
|
-
spaceSeparatedLinesEvenly?: boolean;
|
|
23234
|
-
separatedLineShapeRatio?: number;
|
|
23235
|
-
}
|
|
23236
|
-
|
|
23237
23291
|
export interface DefaultLinkChartConfig {
|
|
23238
23292
|
layoutMode?: | "radial-root-centric"
|
|
23239
23293
|
| "geographic-organic-standard"
|
|
@@ -23245,24 +23299,7 @@ declare namespace __esri {
|
|
|
23245
23299
|
| "chronological-mono-timeline"
|
|
23246
23300
|
| "chronological-multi-timeline";
|
|
23247
23301
|
doNotRecalculateLayout?: boolean;
|
|
23248
|
-
|
|
23249
|
-
}
|
|
23250
|
-
|
|
23251
|
-
/**
|
|
23252
|
-
* Defines additional settings for layout calculations.
|
|
23253
|
-
*
|
|
23254
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-LinkChartLayer.html#LayoutModeSettings Read more...}
|
|
23255
|
-
*/
|
|
23256
|
-
export interface LayoutModeSettings {
|
|
23257
|
-
organicLayoutSettings?: LinkChartLayerOrganicLayoutSettings;
|
|
23258
|
-
chronologicalLayoutSettings?: layersLinkChartLayerChronologicalLayoutSettings;
|
|
23259
|
-
}
|
|
23260
|
-
|
|
23261
|
-
export interface LinkChartLayerOrganicLayoutSettings {
|
|
23262
|
-
computationBudgetTime?: number;
|
|
23263
|
-
idealEdgeLength?: number;
|
|
23264
|
-
repulsionRadiusMultiplier?: number;
|
|
23265
|
-
idealEdgeLengthType?: "multiplier" | "absolute-value";
|
|
23302
|
+
layoutSettings?: LayoutSettings;
|
|
23266
23303
|
}
|
|
23267
23304
|
|
|
23268
23305
|
export interface MapImageLayer extends Layer, SublayersOwner, ArcGISMapService, ScaleRangeLayer, RefreshableLayer, TemporalLayer, BlendLayer, CustomParametersMixin, OperationalLayer {
|
|
@@ -25933,9 +25970,27 @@ declare namespace __esri {
|
|
|
25933
25970
|
*
|
|
25934
25971
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-orientedImagery-transformations-imageToWorld.html#UpdateElevationProps Read more...}
|
|
25935
25972
|
*/
|
|
25936
|
-
export
|
|
25937
|
-
|
|
25938
|
-
|
|
25973
|
+
export type UpdateElevationProps = UpdateElevationPropsWithSampler | UpdateElevationPropsWithConstant;
|
|
25974
|
+
|
|
25975
|
+
/**
|
|
25976
|
+
* Represents the properties required for updating the elevation of the output point with a constant value.
|
|
25977
|
+
*
|
|
25978
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-orientedImagery-transformations-imageToWorld.html#UpdateElevationPropsWithConstant Read more...}
|
|
25979
|
+
*/
|
|
25980
|
+
export interface UpdateElevationPropsWithConstant {
|
|
25981
|
+
elevationSource: UpdateElevationPropsWithConstantElevationSource;
|
|
25982
|
+
}
|
|
25983
|
+
|
|
25984
|
+
/**
|
|
25985
|
+
* Represents the properties required for updating the elevation of the output point with an elevation sampler.
|
|
25986
|
+
*
|
|
25987
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-orientedImagery-transformations-imageToWorld.html#UpdateElevationPropsWithSampler Read more...}
|
|
25988
|
+
*/
|
|
25989
|
+
export interface UpdateElevationPropsWithSampler {
|
|
25990
|
+
elevationSample: ElevationSampler;
|
|
25991
|
+
}
|
|
25992
|
+
|
|
25993
|
+
export interface UpdateElevationPropsWithConstantElevationSource {
|
|
25939
25994
|
constantElevation: number;
|
|
25940
25995
|
}
|
|
25941
25996
|
|
|
@@ -35806,7 +35861,7 @@ declare namespace __esri {
|
|
|
35806
35861
|
}
|
|
35807
35862
|
|
|
35808
35863
|
export interface rasterFunctionUtilsCompositeBandsParameters {
|
|
35809
|
-
rasters
|
|
35864
|
+
rasters: RasterArgument[];
|
|
35810
35865
|
outputPixelType?: OutputPixelType;
|
|
35811
35866
|
}
|
|
35812
35867
|
|
|
@@ -45061,6 +45116,14 @@ declare namespace __esri {
|
|
|
45061
45116
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-linkChart-OrganicLayoutSettings.html#autoRepulsionRadius Read more...}
|
|
45062
45117
|
*/
|
|
45063
45118
|
autoRepulsionRadius: boolean;
|
|
45119
|
+
/**
|
|
45120
|
+
* The maximum amount of time in seconds to spend on the layout calculation.
|
|
45121
|
+
*
|
|
45122
|
+
* @default 1
|
|
45123
|
+
*
|
|
45124
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-linkChart-OrganicLayoutSettings.html#computationBudgetTime Read more...}
|
|
45125
|
+
*/
|
|
45126
|
+
computationBudgetTime: number;
|
|
45064
45127
|
/**
|
|
45065
45128
|
* Determines which property to use to compute the ideal edge length.
|
|
45066
45129
|
*
|
|
@@ -45122,6 +45185,12 @@ declare namespace __esri {
|
|
|
45122
45185
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-linkChart-OrganicLayoutSettings.html#autoRepulsionRadius Read more...}
|
|
45123
45186
|
*/
|
|
45124
45187
|
autoRepulsionRadius?: boolean;
|
|
45188
|
+
/**
|
|
45189
|
+
* The maximum amount of time in seconds to spend on the layout calculation.
|
|
45190
|
+
*
|
|
45191
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-linkChart-OrganicLayoutSettings.html#computationBudgetTime Read more...}
|
|
45192
|
+
*/
|
|
45193
|
+
computationBudgetTime?: number;
|
|
45125
45194
|
/**
|
|
45126
45195
|
* Determines which property to use to compute the ideal edge length.
|
|
45127
45196
|
*
|
|
@@ -74686,7 +74755,7 @@ declare namespace __esri {
|
|
|
74686
74755
|
|
|
74687
74756
|
export interface clustersGetTemplatesParams {
|
|
74688
74757
|
layer: FeatureLayer | CSVLayer | GeoJSONLayer | WFSLayer | OGCFeatureLayer | StreamLayer | OrientedImageryLayer;
|
|
74689
|
-
renderer
|
|
74758
|
+
renderer: | SimpleRenderer
|
|
74690
74759
|
| ClassBreaksRenderer
|
|
74691
74760
|
| UniqueValueRenderer
|
|
74692
74761
|
| PieChartRenderer
|
|
@@ -78800,7 +78869,6 @@ declare namespace __esri {
|
|
|
78800
78869
|
* @param params.includedTags When provided, only schemes containing all the matching tags will be returned. **Known Tags:** light | dark | reds | yellows | oranges | greens | blues | purples | pinks | browns | grays | bright | subdued | deuteranopia | protanopia | tritanopia | grayscale | types | dot-density
|
|
78801
78870
|
* @param params.excludedTags When provided, only schemes missing all the provided tags will be returned. **Known Tags:** light | dark | reds | yellows | oranges | greens | blues | purples | pinks | browns | grays | bright | subdued | deuteranopia | protanopia | tritanopia | grayscale | types | dot-density
|
|
78802
78871
|
* @param params.basemap The basemap to pair with the visualization. This value indicates the best symbol colors for visualizing features against the given basemap.
|
|
78803
|
-
* @param params.basemapTheme If you have a non-Esri basemap (e.g. a VectorTileLayer basemap with a custom style) or no basemap at all, use this parameter to indicate whether the background of the visualization is `light` or `dark`.
|
|
78804
78872
|
*
|
|
78805
78873
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-symbology-heatmap.html#getSchemesByTag Read more...}
|
|
78806
78874
|
*/
|
|
@@ -78826,8 +78894,7 @@ declare namespace __esri {
|
|
|
78826
78894
|
export interface heatmapGetSchemesByTagParams {
|
|
78827
78895
|
includedTags?: string[];
|
|
78828
78896
|
excludedTags?: string[];
|
|
78829
|
-
basemap
|
|
78830
|
-
basemapTheme?: "light" | "dark";
|
|
78897
|
+
basemap: string | Basemap;
|
|
78831
78898
|
}
|
|
78832
78899
|
|
|
78833
78900
|
export interface heatmapGetSchemesParams {
|
|
@@ -96332,7 +96399,7 @@ declare namespace __esri {
|
|
|
96332
96399
|
expand(nodeIds: string[], options?: ExpandOptions): IdTypePair[];
|
|
96333
96400
|
getMemberIdsByType(typeName: string): string[];
|
|
96334
96401
|
refreshLinkChartData(ids?: string[]): Promise<void>;
|
|
96335
|
-
removeRecords(records: IdTypePair[]): Promise<
|
|
96402
|
+
removeRecords(records: IdTypePair[]): Promise<IdTypePair[]>;
|
|
96336
96403
|
}
|
|
96337
96404
|
|
|
96338
96405
|
interface WebLinkChartProperties extends WebDocument2DProperties {
|
|
@@ -96360,8 +96427,7 @@ declare namespace __esri {
|
|
|
96360
96427
|
|
|
96361
96428
|
export interface ApplyNewLayoutOptions {
|
|
96362
96429
|
lockedNodeLocations?: globalThis.Map<string, Point>;
|
|
96363
|
-
|
|
96364
|
-
chronologicalLayoutSettings?: layersLinkChartLayerChronologicalLayoutSettings;
|
|
96430
|
+
layoutSettings?: LayoutSettings;
|
|
96365
96431
|
}
|
|
96366
96432
|
|
|
96367
96433
|
export interface ExpandOptions {
|
|
@@ -97431,6 +97497,12 @@ declare namespace __esri {
|
|
|
97431
97497
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#layout Read more...}
|
|
97432
97498
|
*/
|
|
97433
97499
|
layout: "caption" | "cover" | "none";
|
|
97500
|
+
/**
|
|
97501
|
+
* The component properties for the legend component defined for the slide.
|
|
97502
|
+
*
|
|
97503
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#legend Read more...}
|
|
97504
|
+
*/
|
|
97505
|
+
legend: SlideLegend;
|
|
97434
97506
|
/**
|
|
97435
97507
|
* A data URI encoded thumbnail.
|
|
97436
97508
|
*
|
|
@@ -97553,6 +97625,12 @@ declare namespace __esri {
|
|
|
97553
97625
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#layout Read more...}
|
|
97554
97626
|
*/
|
|
97555
97627
|
layout?: "caption" | "cover" | "none";
|
|
97628
|
+
/**
|
|
97629
|
+
* The component properties for the legend component defined for the slide.
|
|
97630
|
+
*
|
|
97631
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#legend Read more...}
|
|
97632
|
+
*/
|
|
97633
|
+
legend?: SlideLegendProperties;
|
|
97556
97634
|
/**
|
|
97557
97635
|
* A data URI encoded thumbnail.
|
|
97558
97636
|
*
|
|
@@ -97658,6 +97736,39 @@ declare namespace __esri {
|
|
|
97658
97736
|
sublayerIds: number[];
|
|
97659
97737
|
}
|
|
97660
97738
|
|
|
97739
|
+
export class SlideLegend extends Accessor {
|
|
97740
|
+
/**
|
|
97741
|
+
* Legend component visibility in slide.
|
|
97742
|
+
*
|
|
97743
|
+
* @default false
|
|
97744
|
+
*
|
|
97745
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-SlideLegend.html#visible Read more...}
|
|
97746
|
+
*/
|
|
97747
|
+
visible: boolean;
|
|
97748
|
+
/**
|
|
97749
|
+
* The slide legend object is part of the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html webscene/Slide} and contains information relating to
|
|
97750
|
+
* how the legend component is shown in the slide.
|
|
97751
|
+
*
|
|
97752
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-SlideLegend.html Read more...}
|
|
97753
|
+
*/
|
|
97754
|
+
constructor(properties?: SlideLegendProperties);
|
|
97755
|
+
/**
|
|
97756
|
+
* Creates a deep clone of this object.
|
|
97757
|
+
*
|
|
97758
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-SlideLegend.html#clone Read more...}
|
|
97759
|
+
*/
|
|
97760
|
+
clone(): SlideLegend;
|
|
97761
|
+
}
|
|
97762
|
+
|
|
97763
|
+
interface SlideLegendProperties {
|
|
97764
|
+
/**
|
|
97765
|
+
* Legend component visibility in slide.
|
|
97766
|
+
*
|
|
97767
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-SlideLegend.html#visible Read more...}
|
|
97768
|
+
*/
|
|
97769
|
+
visible?: boolean;
|
|
97770
|
+
}
|
|
97771
|
+
|
|
97661
97772
|
export class websceneSunLighting extends Accessor {
|
|
97662
97773
|
/**
|
|
97663
97774
|
* The current date and time of the simulated sun.
|
package/layers/LinkChartLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import{serializationUtilsModuleWrapper as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import a from"../core/Collection.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{getOrCreateMapValue as n}from"../core/MapUtils.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as s,isAbortError as l,createAbortError as h}from"../core/promiseUtils.js";import{watch as d,sync as c}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as y}from"../core/accessorSupport/PropertyOrigin.js";import g from"./Layer.js";import{convertFromGeometry as m}from"./graphics/featureConversionUtils.js";import{IdealEdgeLengthTypeOptions as f}from"./knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{KnowledgeGraphLayerDataManager as L}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import b from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{systemOidFieldName as w,systemOriginIdFieldName as M,systemDestinationIdFieldName as k,systemLayoutGeometryFieldName as C,systemAggregationCountFieldName as T,initializeLayersFromClientData as N}from"./knowledgeGraph/layerUtils.js";import D from"./knowledgeGraph/SessionMemoryStorage.js";import{convertLayoutSettingsInMemoryFormatToAPIFormat as v,convertLayoutTypeToWebSupportedFormat as x,getRelationshipEndNodeIds as S}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as E}from"./mixins/BlendLayer.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{LCChronologicalLayout as A,LCSimpleLayout as j,LCSmartTreeLayout as R,LCRadialTreeLayout as G,LCHierarchicalLayout as P,LCCommunityLayout as F,LCForceDirectedLayout as O,NodeFlag as U,load as B,CallStatus as z,LinkType as W}from"../libs/linkchartlayout/LinkChartLayout.js";import{fetchKnowledgeGraph as Q}from"../rest/knowledgeGraphService.js";import $ from"../geometry/Extent.js";import H from"../geometry/Point.js";import K from"../geometry/Polyline.js";let q=class extends(I(E(_(r(g))))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"radial-root-centric"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(a.ofType(b)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new $({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(a.ofType(b)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.inclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.inclusionModeDefinition)throw new i("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles(d((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),c))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:o}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:o}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new i("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,r)=>{const s=this._graphTypeLookup.get(r);if(!s)return o.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);"relationship"===s.type?t.has(r)||(t.add(r),n.push(s)):"entity"===s.type?t.has(r)||(t.add(r),a.push(s)):(o.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(r))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const r=new L({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=n,this.dataManager=r}load(e){const a=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),await N(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((i=>{Q(this.url).then((async o=>{o.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),o.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const r=this.parent?.linkChartProperties;if(r?.originIdOf("entitiesUrl")===y.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await t.fetchAndConvertSerializedLinkChart({entitiesUrl:this.parent.linkChartProperties.entitiesUrl,relationshipsUrl:this.parent.linkChartProperties.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(o.dataModel),this.defaultLinkChartConfig={layoutOptions:r?.layoutSettings?v(r.layoutSettings,void 0):void 0,layoutMode:x(r.layoutType)}),this._initializeLayerProperties({knowledgeGraph:o,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=D.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);if(a){n(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}}await a()}else{const t="geographic-organic-standard"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{s(e),await a()})))}i(null)}))}))),Promise.resolve(this)}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await S(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let o=[];for(const r of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.members?.has(r.id))&&o.push(r);if(t){const e=new Set,t=[];for(const a of o)if(this.dataManager.nodeConnectionsLookup.has(a.id))for(const t of this.dataManager.nodeConnectionsLookup.get(a.id))e.add(t);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});o=o.concat(t)}this.dataManager.removeFromLayer(o);for(const r of o)this.sublayerIdsCache.get(r.typeName)?.delete(r.id),this.dataManager.relationshipTypeNames.has(r.typeName)?this.relationshipLinkChartDiagramLookup.delete(r.id):this.entityLinkChartDiagramLookup.delete(r.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,this._currentLinkChartConfig.layoutOptions),o.length>0&&(this.membershipModified=!0);const n=[];return this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes(),o}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),s(t?.signal)}catch(i){throw l(i)&&a.length>0&&this.removeRecords(a,{overrideMembershipCheck:!0}),i}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===y.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===y.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=n(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:m(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="radial-root-centric",t){const a=[],r=[],l=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{r.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const d=new Map,c=new Map,p=new Map,u=new Map,y=new Uint8Array(a.length),g=new Float64Array(a.length),f=new Float64Array(a.length),L=new Float64Array(a.length),b=new Float64Array(a.length),N=new Uint32Array(r.length),D=new Uint32Array(r.length),v=new Float64Array(r.length),x=new Float64Array(r.length),S=[],E="organic-standard",I=new $({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let _,Q="organic-standard",q=0,J=0;const V=A.apply;switch(Q="geographic-organic-standard"===e?E:e,Q){case"organic-standard":_=O.apply;break;case"organic-community":_=F.apply;break;case"hierarchical-bottom-to-top":_=P.apply;break;case"radial-root-centric":_=G.apply;break;case"tree-left-to-right":_=R.apply;break;default:_=j.apply}let X=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[w])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?y[q]=U.IsGeographic:y[q]=U.None;const o=t.lockedNodeLocations.get(i.attributes[w]);g[q]=o.x,f[q]=o.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){y[q]=U.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],o=this.dataManager.geographicLookup.get(a)?.geometryType;switch(o){case"esriGeometryPoint":g[q]=t?.x,f[q]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(g[q]=e.x,f[q]=e.y):y[q]=U.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(g[q]=e.x,f[q]=e.y):y[q]=U.IsMovable;break;default:y[q]=U.IsMovable}(null==g[q]||null==f[q]||Number.isNaN(g[q])||Number.isNaN(f[q]))&&(y[q]=U.IsMovable,g[q]=0,f[q]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!X&&t?.lockedNodeLocations?.has(i.attributes[w])&&(X=!0);const e=t?.timeInfoByTypeName?.get(a),o=e?.startField,n=o&&e?.startField?i.attributes[o]:null;L[q]=n?new Date(n).getTime():NaN;const r=e?.endField,s=r&&e?.endField?i.attributes[r]:null;b[q]=s?new Date(s).getTime():NaN,g[q]=0,f[q]=0,y[q]=U.IsMovable}else y[q]=U.IsMovable,g[q]=0,f[q]=0;u.set(i.attributes[w],q),S[q]={feature:i,typeName:a},q++})),X&&o.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let Y=!1;const Z=new Map;r.forEach((a=>{const i=a.feature.attributes[M],o=a.feature.attributes[k],n=u.get(i),r=u.get(o),s=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?s?.startField:null,d=h?a.feature.attributes[h]:null,c=s?.endField,p=c?a.feature.attributes[c]:null;if(void 0!==n&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const s=Z.get(t),h=s?.has(a.typeName);h||(N[J]=n,D[J]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(v[J]=d?new Date(d).getTime():NaN,x[J]=p?new Date(p).getTime():NaN),void 0===s?Z.set(t,new Map([[a.typeName,J]])):s.set(a.typeName,J),J++),l.push(a)}else Y=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),Y&&o.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const ee=this._validateLayoutSettings(e,t),te=this._convertLayoutSettingsToCalculationSettings(ee);await B();let ae=z.Error,ie=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:ae,links:ie,graphics:a}=V((()=>t?.signal?.aborted??!1),y,g,f,L,b,N.subarray(0,J),D.subarray(0,J),v.subarray(0,J),x.subarray(0,J),"chronological-multi-timeline"===e,t?.chronologicalLayoutSettings??{})),ae===z.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:ae,links:ie}=_((()=>t?.signal?.aborted??!1),y,g,f,N.subarray(0,J),D.subarray(0,J),te.computationBudgetTime,te.idealEdgeLengthMultiplier,te.repulsionRadiusMultiplier));if(s(t?.signal),ae===z.Error)throw new i("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(ae===z.Canceled)throw h();for(let i=0;i<S.length;i++){if(f[i]>84.9999?f[i]=84.9999:f[i]<-84.9999&&(f[i]=-84.9999),g[i]>179.9999?g[i]=179.9999:g[i]<-179.9999&&(g[i]=-179.9999),S[i].feature.attributes[C]=new H(g[i],f[i]),d.has(S[i].typeName)){const e=d.get(S[i].typeName);e?.set(S[i].feature.attributes[w],S[i].feature)}else{const e=new Map;e.set(S[i].feature.attributes[w],S[i].feature),d.set(S[i].typeName,e)}p.set(S[i].feature.attributes[w],S[i].feature);const e=m(S[i].feature.attributes[C]);this.entityLinkChartDiagramLookup.set(S[i].feature.attributes[w],S[i].feature.attributes[C]?e:null);const t=n(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,S[i].typeName,(()=>({useAllData:!1,members:new Map})));n(t.members,S[i].feature.attributes[w],(()=>({id:S[i].feature.attributes[w],linkChartLocation:void 0}))).linkChartLocation=S[i].feature.attributes[C],S[i].feature.attributes[C].x<I.xmin&&(I.xmin=S[i].feature.attributes[C].x),S[i].feature.attributes[C].x>I.xmax&&(I.xmax=S[i].feature.attributes[C].x),S[i].feature.attributes[C].y<I.ymin&&(I.ymin=S[i].feature.attributes[C].y),S[i].feature.attributes[C].y>I.ymax&&(I.ymax=S[i].feature.attributes[C].y)}if(this.linkChartExtent.xmin=I.xmin,this.linkChartExtent.xmax=I.xmax,this.linkChartExtent.ymin=I.ymin,this.linkChartExtent.ymax=I.ymax,!ie)throw new i("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const oe=new Map,ne=new Map,re=new Map,se=new Set;for(let i=0;i<l.length;i++){const a=[],r=l[i],s=r.feature.attributes[M],h=r.feature.attributes[k];let d=s+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(r.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?r.feature.attributes[a]:null,o=e?.endField;d+="-"+i+"-"+(o?r.feature.attributes[o]:null)}const y=Z.get(d).get(r.typeName),g=0===y?0:ie?.vertexEndIndex[y-1];if(!se.has(y)){if(se.add(y),ie.types[y]===W.Recursive){const e=[ie.vertices[2*g],ie.vertices[2*g+1]],t=[ie.vertices[2*(g+1)],ie.vertices[2*(g+1)+1]],i=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],o=[i[0]-e[0],i[1]-e[1]],n=[i[0]+o[1],i[1]-o[0]],r=[i[0]-o[1],i[1]+o[0]];a.push(e),a.push(n),a.push(t),a.push(r),a.push(e)}else{if(ie.types[y]!==W.Regular){o.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<ie.vertexEndIndex[y];e++)a.push([ie.vertices[2*e],ie.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=S[u.get(s)]?.feature.attributes[C],t=S[u.get(h)]?.feature.attributes[C];a[0][0]===e.x&&a[0][1]===e.y||(a[0]=[e.x,e.y]),a[a.length-1][0]===t.x&&a[a.length-1][1]===t.y||(a[a.length-1]=[t.x,t.y])}for(let e=1;e<a.length-1;e++)a[e][1]>85.5?a[e][1]=85.5:a[e][1]<-85.5&&(a[e][1]=-85.5),a[e][0]>179.9999?a[e][0]=179.9999:a[e][0]<-179.9999&&(a[e][0]=-179.9999);oe.has(d)?oe.get(d).push(a):oe.set(d,[a])}const f=oe.get(d);ne.has(d)||(ne.set(d,new Map),re.set(d,new Map));const L=ne.get(d),b=re.get(d);L.has(r.typeName)||(L.set(r.typeName,f.shift()),b.set(r.typeName,0));const T=L.get(r.typeName);b.set(r.typeName,b.get(r.typeName)+1);const N=new K({paths:[T]});if(r.feature.attributes[C]=N,c.has(r.typeName)){const e=c.get(r.typeName);e?.set(r.feature.attributes[w],r.feature)}else{const e=new Map;e.set(r.feature.attributes[w],r.feature),c.set(r.typeName,e)}p.set(r.feature.attributes[w],r.feature);const D=m(r.feature.attributes[C]);this.relationshipLinkChartDiagramLookup.set(r.feature.attributes[w],r.feature.attributes[C]?D:null);const v=n(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,r.typeName,(()=>({useAllData:!1,members:new Map})));n(v.members,r.feature.attributes[w],(()=>({id:r.feature.attributes[w],linkChartLocation:void 0}))).linkChartLocation=r.feature.attributes[C]}for(const i of l)i.feature.attributes[T]=re.get(i.feature.attributes[M]+"-"+i.feature.attributes[k])?.get(i.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutOptions:ee},{nodes:d,links:c,idMap:p}}async applyNewLinkChartLayout(e="radial-root-centric",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const o=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(o,new H({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let o=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(o=o.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,o,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="radial-root-centric",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t})}async _handleNewRecords(e,t){const a=[];this.dataManager.addToLayer(e);for(const o of e)this.sublayerIdsCache.has(o.typeName)||(this.sublayerIdsCache.set(o.typeName,new Set),a.push(o.typeName)),this.sublayerIdsCache.get(o.typeName).add(o.id);for(const o of a){const e=this._graphTypeLookup.get(o);if(e){const t=this._createSublayer(e);"entity"===e.type?this.dataManager.entityTypeNames.add(o):this.dataManager.relationshipTypeNames.add(o),t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.set(o,new Map)}}await N(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const i=Object.assign({},this._currentLinkChartConfig.layoutOptions);i.lockedNodeLocations=new Map;for(const[o,n]of this.entityLinkChartDiagramLookup.entries())n&&i.lockedNodeLocations.set(o,new H(n.coords[0],n.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,i)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const o=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const n=m(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(o,n):this.entityLinkChartDiagramLookup.set(o,n),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[M]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[k]);if(t&&a){const i=m(new K({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[w],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[w],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig.layoutOptions||{}}):await this._calculateLayoutWithSublayerTimeInfo("radial-root-centric",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i=e=>a(e)&&e>=1,n=e=>a(e)&&e>=1,r=e=>Object.values(f).includes(e),s=e=>a(e)&&e>=0,l={organicLayoutSettings:{},chronologicalLayoutSettings:{}};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return l;t.organicLayoutSettings??={};const{computationBudgetTime:h,repulsionRadiusMultiplier:d,idealEdgeLength:c,idealEdgeLengthType:p}=t.organicLayoutSettings;n(h)?l.organicLayoutSettings.computationBudgetTime=h:void 0!==h&&o.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),i(d)?l.organicLayoutSettings.repulsionRadiusMultiplier=d:void 0!==d&&o.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting");if("geographic-organic-standard"===e&&(void 0!==c||void 0!==p)&&(r(p)?l.organicLayoutSettings.idealEdgeLengthType=p:void 0!==p&&o.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),s(c)?l.organicLayoutSettings.idealEdgeLength=c:void 0!==c&&o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),("chronological-multi-timeline"===e||"chronological-mono-timeline"===e)&&t.chronologicalLayoutSettings){const e=t.chronologicalLayoutSettings;e.durationLineWidth&&e.durationLineWidth<0&&o.getLogger(this).warn("Invalid layout durationLineWidth setting, will revert to default setting")}return l}_convertLayoutSettingsToCalculationSettings(e){e.organicLayoutSettings??={};let t=e.organicLayoutSettings.idealEdgeLength;return e.organicLayoutSettings.idealEdgeLengthType===f.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.organicLayoutSettings.computationBudgetTime,repulsionRadiusMultiplier:e.organicLayoutSettings.repulsionRadiusMultiplier,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new b({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),i=new Set((e.entityTypes??[]).map((e=>e.name))),n=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=i.has(e.graphTypeName)?"entity":"relationship");this.layers=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?i.has(e.graphTypeName):n.has(e.graphTypeName))))}else this.layers=new a;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const o of a)e.has(o)||this._originalInclusionList.namedTypeDefinitions.set(o,{useAllData:!1,members:new Map});const i=[];for(const n of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(n)||(o.getLogger(this).warn(`A named type, ${n}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(n));for(const o of i)this._originalInclusionList.namedTypeDefinitions.delete(o)}}};e([p()],q.prototype,"dataPreloadedInLocalCache",void 0),e([p()],q.prototype,"defaultLinkChartConfig",void 0),e([p()],q.prototype,"membershipModified",void 0),e([p()],q.prototype,"dataManager",void 0),e([p()],q.prototype,"inclusionModeDefinition",null),e([p()],q.prototype,"knowledgeGraph",void 0),e([p({type:a.ofType(b),json:{write:{ignoreOrigin:!0}}})],q.prototype,"layers",void 0),e([p()],q.prototype,"entityLinkChartDiagramLookup",void 0),e([p()],q.prototype,"relationshipLinkChartDiagramLookup",void 0),e([p()],q.prototype,"linkChartExtent",void 0),e([p()],q.prototype,"memberEntityTypes",void 0),e([p()],q.prototype,"memberRelationshipTypes",void 0),e([p({type:["LinkChartLayer"]})],q.prototype,"operationalLayerType",void 0),e([p()],q.prototype,"sublayerIdsCache",void 0),e([p({type:a.ofType(b),json:{write:{ignoreOrigin:!0}}})],q.prototype,"tables",void 0),e([p({json:{read:!1}})],q.prototype,"type",void 0),e([p({json:{read:!1}})],q.prototype,"chronologicalAuxiliaryGraphics",void 0),q=e([u("esri.layers.LinkChartLayer")],q);const J=q;export{J as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import{serializationUtilsModuleWrapper as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import a from"../core/Collection.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{getOrCreateMapValue as n}from"../core/MapUtils.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as s,isAbortError as l,createAbortError as h}from"../core/promiseUtils.js";import{watch as d,sync as c}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import y from"./Layer.js";import{convertFromGeometry as m}from"./graphics/featureConversionUtils.js";import{IdealEdgeLengthTypeOptions as f}from"./knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{KnowledgeGraphLayerDataManager as L}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import b from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{systemOidFieldName as w,systemOriginIdFieldName as M,systemDestinationIdFieldName as k,systemLayoutGeometryFieldName as C,systemAggregationCountFieldName as T,initializeLayersFromClientData as N}from"./knowledgeGraph/layerUtils.js";import v from"./knowledgeGraph/SessionMemoryStorage.js";import{convertLayoutTypeToWebSupportedFormat as D,getRelationshipEndNodeIds as x}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{OperationalLayer as E}from"./mixins/OperationalLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{LCChronologicalLayout as _,LCSimpleLayout as A,LCSmartTreeLayout as j,LCRadialTreeLayout as R,LCHierarchicalLayout as G,LCCommunityLayout as P,LCForceDirectedLayout as F,NodeFlag as U,load as B,CallStatus as O,LinkType as z}from"../libs/linkchartlayout/LinkChartLayout.js";import{fetchKnowledgeGraph as W}from"../rest/knowledgeGraphService.js";import Q from"../geometry/Extent.js";import $ from"../geometry/Point.js";import H from"../geometry/Polyline.js";let K=class extends(E(S(I(r(y))))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"radial-root-centric"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(a.ofType(b)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new Q({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(a.ofType(b)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.inclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.inclusionModeDefinition)throw new i("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles(d((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),c))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:o}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:o}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new i("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,r)=>{const s=this._graphTypeLookup.get(r);if(!s)return o.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);"relationship"===s.type?t.has(r)||(t.add(r),n.push(s)):"entity"===s.type?t.has(r)||(t.add(r),a.push(s)):(o.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(r))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const r=new L({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=n,this.dataManager=r}load(e){const a=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),await N(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((i=>{W(this.url).then((async o=>{o.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),o.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const r=this.parent?.linkChartProperties;if(r?.originIdOf("entitiesUrl")===g.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await t.fetchAndConvertSerializedLinkChart({entitiesUrl:this.parent.linkChartProperties.entitiesUrl,relationshipsUrl:this.parent.linkChartProperties.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(o.dataModel),this.defaultLinkChartConfig={layoutSettings:r?.layoutSettings??void 0,layoutMode:D(r.layoutType)}),this._initializeLayerProperties({knowledgeGraph:o,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=v.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);if(a){n(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}}await a()}else{const t="geographic-organic-standard"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{s(e),await a()})))}i(null)}))}))),Promise.resolve(this)}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await x(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let o=[];for(const r of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.members?.has(r.id))&&o.push(r);if(t){const e=new Set,t=[];for(const a of o)if(this.dataManager.nodeConnectionsLookup.has(a.id))for(const t of this.dataManager.nodeConnectionsLookup.get(a.id))e.add(t);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});o=o.concat(t)}this.dataManager.removeFromLayer(o);for(const r of o)this.sublayerIdsCache.get(r.typeName)?.delete(r.id),this.dataManager.relationshipTypeNames.has(r.typeName)?this.relationshipLinkChartDiagramLookup.delete(r.id):this.entityLinkChartDiagramLookup.delete(r.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings}),o.length>0&&(this.membershipModified=!0);const n=[];return this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes(),o}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),s(t?.signal)}catch(i){throw l(i)&&a.length>0&&this.removeRecords(a,{overrideMembershipCheck:!0}),i}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===g.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===g.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=n(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:m(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="radial-root-centric",t){const a=[],r=[],l=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{r.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const d=new Map,c=new Map,p=new Map,u=new Map,g=new Uint8Array(a.length),y=new Float64Array(a.length),f=new Float64Array(a.length),L=new Float64Array(a.length),b=new Float64Array(a.length),N=new Uint32Array(r.length),v=new Uint32Array(r.length),D=new Float64Array(r.length),x=new Float64Array(r.length),S=[],E="organic-standard",I=new Q({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let W,K="organic-standard",q=0,J=0;const V=_.apply;switch(K="geographic-organic-standard"===e?E:e,K){case"organic-standard":W=F.apply;break;case"organic-community":W=P.apply;break;case"hierarchical-bottom-to-top":W=G.apply;break;case"radial-root-centric":W=R.apply;break;case"tree-left-to-right":W=j.apply;break;default:W=A.apply}let X=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[w])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?g[q]=U.IsGeographic:g[q]=U.None;const o=t.lockedNodeLocations.get(i.attributes[w]);y[q]=o.x,f[q]=o.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){g[q]=U.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],o=this.dataManager.geographicLookup.get(a)?.geometryType;switch(o){case"esriGeometryPoint":y[q]=t?.x,f[q]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[q]=e.x,f[q]=e.y):g[q]=U.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[q]=e.x,f[q]=e.y):g[q]=U.IsMovable;break;default:g[q]=U.IsMovable}(null==y[q]||null==f[q]||Number.isNaN(y[q])||Number.isNaN(f[q]))&&(g[q]=U.IsMovable,y[q]=0,f[q]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!X&&t?.lockedNodeLocations?.has(i.attributes[w])&&(X=!0);const e=t?.timeInfoByTypeName?.get(a),o=e?.startField,n=o&&e?.startField?i.attributes[o]:null;L[q]=n?new Date(n).getTime():NaN;const r=e?.endField,s=r&&e?.endField?i.attributes[r]:null;b[q]=s?new Date(s).getTime():NaN,y[q]=0,f[q]=0,g[q]=U.IsMovable}else g[q]=U.IsMovable,y[q]=0,f[q]=0;u.set(i.attributes[w],q),S[q]={feature:i,typeName:a},q++})),X&&o.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let Y=!1;const Z=new Map;r.forEach((a=>{const i=a.feature.attributes[M],o=a.feature.attributes[k],n=u.get(i),r=u.get(o),s=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?s?.startField:null,d=h?a.feature.attributes[h]:null,c=s?.endField,p=c?a.feature.attributes[c]:null;if(void 0!==n&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const s=Z.get(t),h=s?.has(a.typeName);h||(N[J]=n,v[J]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(D[J]=d?new Date(d).getTime():NaN,x[J]=p?new Date(p).getTime():NaN),void 0===s?Z.set(t,new Map([[a.typeName,J]])):s.set(a.typeName,J),J++),l.push(a)}else Y=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),Y&&o.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const ee=this._validateLayoutSettings(e,t?.layoutSettings),te=this._convertLayoutSettingsToCalculationSettings(ee);await B();let ae=O.Error,ie=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:ae,links:ie,graphics:a}=V((()=>t?.signal?.aborted??!1),g,y,f,L,b,N.subarray(0,J),v.subarray(0,J),D.subarray(0,J),x.subarray(0,J),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings??{})),ae===O.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:ae,links:ie}=W((()=>t?.signal?.aborted??!1),g,y,f,N.subarray(0,J),v.subarray(0,J),te.computationBudgetTime,te.idealEdgeLengthMultiplier,te.repulsionRadiusMultiplier));if(s(t?.signal),ae===O.Error)throw new i("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(ae===O.Canceled)throw h();for(let i=0;i<S.length;i++){if(f[i]>84.9999?f[i]=84.9999:f[i]<-84.9999&&(f[i]=-84.9999),y[i]>179.9999?y[i]=179.9999:y[i]<-179.9999&&(y[i]=-179.9999),S[i].feature.attributes[C]=new $(y[i],f[i]),d.has(S[i].typeName)){const e=d.get(S[i].typeName);e?.set(S[i].feature.attributes[w],S[i].feature)}else{const e=new Map;e.set(S[i].feature.attributes[w],S[i].feature),d.set(S[i].typeName,e)}p.set(S[i].feature.attributes[w],S[i].feature);const e=m(S[i].feature.attributes[C]);this.entityLinkChartDiagramLookup.set(S[i].feature.attributes[w],S[i].feature.attributes[C]?e:null);const t=n(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,S[i].typeName,(()=>({useAllData:!1,members:new Map})));n(t.members,S[i].feature.attributes[w],(()=>({id:S[i].feature.attributes[w],linkChartLocation:void 0}))).linkChartLocation=S[i].feature.attributes[C],S[i].feature.attributes[C].x<I.xmin&&(I.xmin=S[i].feature.attributes[C].x),S[i].feature.attributes[C].x>I.xmax&&(I.xmax=S[i].feature.attributes[C].x),S[i].feature.attributes[C].y<I.ymin&&(I.ymin=S[i].feature.attributes[C].y),S[i].feature.attributes[C].y>I.ymax&&(I.ymax=S[i].feature.attributes[C].y)}if(this.linkChartExtent.xmin=I.xmin,this.linkChartExtent.xmax=I.xmax,this.linkChartExtent.ymin=I.ymin,this.linkChartExtent.ymax=I.ymax,!ie)throw new i("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const oe=new Map,ne=new Map,re=new Map,se=new Set;for(let i=0;i<l.length;i++){const a=[],r=l[i],s=r.feature.attributes[M],h=r.feature.attributes[k];let d=s+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(r.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?r.feature.attributes[a]:null,o=e?.endField;d+="-"+i+"-"+(o?r.feature.attributes[o]:null)}const g=Z.get(d).get(r.typeName),y=0===g?0:ie?.vertexEndIndex[g-1];if(!se.has(g)){if(se.add(g),ie.types[g]===z.Recursive){const e=[ie.vertices[2*y],ie.vertices[2*y+1]],t=[ie.vertices[2*(y+1)],ie.vertices[2*(y+1)+1]],i=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],o=[i[0]-e[0],i[1]-e[1]],n=[i[0]+o[1],i[1]-o[0]],r=[i[0]-o[1],i[1]+o[0]];a.push(e),a.push(n),a.push(t),a.push(r),a.push(e)}else{if(ie.types[g]!==z.Regular){o.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=y;e<ie.vertexEndIndex[g];e++)a.push([ie.vertices[2*e],ie.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=S[u.get(s)]?.feature.attributes[C],t=S[u.get(h)]?.feature.attributes[C];a[0][0]===e.x&&a[0][1]===e.y||(a[0]=[e.x,e.y]),a[a.length-1][0]===t.x&&a[a.length-1][1]===t.y||(a[a.length-1]=[t.x,t.y])}for(let e=1;e<a.length-1;e++)a[e][1]>85.5?a[e][1]=85.5:a[e][1]<-85.5&&(a[e][1]=-85.5),a[e][0]>179.9999?a[e][0]=179.9999:a[e][0]<-179.9999&&(a[e][0]=-179.9999);oe.has(d)?oe.get(d).push(a):oe.set(d,[a])}const f=oe.get(d);ne.has(d)||(ne.set(d,new Map),re.set(d,new Map));const L=ne.get(d),b=re.get(d);L.has(r.typeName)||(L.set(r.typeName,f.shift()),b.set(r.typeName,0));const T=L.get(r.typeName);b.set(r.typeName,b.get(r.typeName)+1);const N=new H({paths:[T]});if(r.feature.attributes[C]=N,c.has(r.typeName)){const e=c.get(r.typeName);e?.set(r.feature.attributes[w],r.feature)}else{const e=new Map;e.set(r.feature.attributes[w],r.feature),c.set(r.typeName,e)}p.set(r.feature.attributes[w],r.feature);const v=m(r.feature.attributes[C]);this.relationshipLinkChartDiagramLookup.set(r.feature.attributes[w],r.feature.attributes[C]?v:null);const D=n(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,r.typeName,(()=>({useAllData:!1,members:new Map})));n(D.members,r.feature.attributes[w],(()=>({id:r.feature.attributes[w],linkChartLocation:void 0}))).linkChartLocation=r.feature.attributes[C]}for(const i of l)i.feature.attributes[T]=re.get(i.feature.attributes[M]+"-"+i.feature.attributes[k])?.get(i.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:ee},{nodes:d,links:c,idMap:p}}async applyNewLinkChartLayout(e="radial-root-centric",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const o=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(o,new $({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let o=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(o=o.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,o,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="radial-root-centric",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t})}async _handleNewRecords(e,t){const a=[];this.dataManager.addToLayer(e);for(const o of e)this.sublayerIdsCache.has(o.typeName)||(this.sublayerIdsCache.set(o.typeName,new Set),a.push(o.typeName)),this.sublayerIdsCache.get(o.typeName).add(o.id);for(const o of a){const e=this._graphTypeLookup.get(o);if(e){const t=this._createSublayer(e);"entity"===e.type?this.dataManager.entityTypeNames.add(o):this.dataManager.relationshipTypeNames.add(o),t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.set(o,new Map)}}await N(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const i=Object.assign({},this._currentLinkChartConfig.layoutSettings);i.lockedNodeLocations=new Map;for(const[o,n]of this.entityLinkChartDiagramLookup.entries())n&&i.lockedNodeLocations.set(o,new $(n.coords[0],n.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{layoutSettings:i})}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const o=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const n=m(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(o,n):this.entityLinkChartDiagramLookup.set(o,n),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[M]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[k]);if(t&&a){const i=m(new H({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[w],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[w],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("radial-root-centric",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i=e=>a(e)&&e>=1,n=e=>a(e)&&e>=1,r=e=>Object.values(f).includes(e),s=e=>a(e)&&e>=0,l={organicLayoutSettings:{},chronologicalLayoutSettings:{}};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return l;t.organicLayoutSettings??={};const{computationBudgetTime:h,repulsionRadiusMultiplier:d,absoluteIdealEdgeLength:c,multiplicativeIdealEdgeLength:p,idealEdgeLengthType:u}=t.organicLayoutSettings;n(h)?l.organicLayoutSettings.computationBudgetTime=h:void 0!==h&&o.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),i(d)?l.organicLayoutSettings.repulsionRadiusMultiplier=d:void 0!==d&&o.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting");if("geographic-organic-standard"===e&&(void 0!==c||void 0!==p||void 0!==u)&&(r(u)?l.organicLayoutSettings.idealEdgeLengthType=u:void 0!==u&&o.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===u&&s(c)?l.organicLayoutSettings.absoluteIdealEdgeLength=c:"absolute-value"===u&&void 0!==c?o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===u&&s(p)?l.organicLayoutSettings.multiplicativeIdealEdgeLength=p:"multiplier"===u&&void 0!==p&&o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),("chronological-multi-timeline"===e||"chronological-mono-timeline"===e)&&t.chronologicalLayoutSettings){const e=t.chronologicalLayoutSettings;e.durationLineWidth&&e.durationLineWidth<0&&o.getLogger(this).warn("Invalid layout durationLineWidth setting, will revert to default setting")}return l}_convertLayoutSettingsToCalculationSettings(e){e.organicLayoutSettings??={};let t=e.organicLayoutSettings.idealEdgeLengthType===f.ABSOLUTE?e.organicLayoutSettings.absoluteIdealEdgeLength:e.organicLayoutSettings.multiplicativeIdealEdgeLength;return e.organicLayoutSettings.idealEdgeLengthType===f.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.organicLayoutSettings.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.organicLayoutSettings.repulsionRadiusMultiplier??void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new b({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),i=new Set((e.entityTypes??[]).map((e=>e.name))),n=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=i.has(e.graphTypeName)?"entity":"relationship");this.layers=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?i.has(e.graphTypeName):n.has(e.graphTypeName))))}else this.layers=new a;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const o of a)e.has(o)||this._originalInclusionList.namedTypeDefinitions.set(o,{useAllData:!1,members:new Map});const i=[];for(const n of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(n)||(o.getLogger(this).warn(`A named type, ${n}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(n));for(const o of i)this._originalInclusionList.namedTypeDefinitions.delete(o)}}};e([p()],K.prototype,"dataPreloadedInLocalCache",void 0),e([p()],K.prototype,"defaultLinkChartConfig",void 0),e([p()],K.prototype,"membershipModified",void 0),e([p()],K.prototype,"dataManager",void 0),e([p()],K.prototype,"inclusionModeDefinition",null),e([p()],K.prototype,"knowledgeGraph",void 0),e([p({type:a.ofType(b),json:{write:{ignoreOrigin:!0}}})],K.prototype,"layers",void 0),e([p()],K.prototype,"entityLinkChartDiagramLookup",void 0),e([p()],K.prototype,"relationshipLinkChartDiagramLookup",void 0),e([p()],K.prototype,"linkChartExtent",void 0),e([p()],K.prototype,"memberEntityTypes",void 0),e([p()],K.prototype,"memberRelationshipTypes",void 0),e([p({type:["LinkChartLayer"]})],K.prototype,"operationalLayerType",void 0),e([p()],K.prototype,"sublayerIdsCache",void 0),e([p({type:a.ofType(b),json:{write:{ignoreOrigin:!0}}})],K.prototype,"tables",void 0),e([p({json:{read:!1}})],K.prototype,"type",void 0),e([p({json:{read:!1}})],K.prototype,"chronologicalAuxiliaryGraphics",void 0),K=e([u("esri.layers.LinkChartLayer")],K);const q=K;export{q as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../geometry.js";import
|
|
5
|
+
import"../../geometry.js";import o from"../../Graphic.js";import"../../symbols.js";import e from"../../core/Error.js";import r from"../GraphicsLayer.js";import{systemOidFieldName as t}from"./layerUtils.js";import n from"./SessionMemoryStorage.js";import{Direction2D as i}from"../../libs/linkchartlayout/LinkChartLayout.js";import{layoutMap as s}from"../../linkChart/enums.js";import{executeQueryStreaming as a}from"../../rest/knowledgeGraphService.js";import l from"../../rest/knowledgeGraph/GraphQueryStreaming.js";import m from"../../symbols/CIMSymbol.js";import c from"../../geometry/Polyline.js";import y from"../../symbols/SimpleFillSymbol.js";import p from"../../geometry/Polygon.js";import f from"../../symbols/TextSymbol.js";import h from"../../geometry/Point.js";function d(o,e){const r=new Map;if(e.dataModel?.relationshipTypes)for(const t of e.dataModel.relationshipTypes)t.name&&r.set(t.name,[]);for(const t of o)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);return r}async function g(o,e,r){const t=[],n=d(o,e),i={},s=[];for(const[a,l]of n){if(l.length<1)continue;const o=`${a}_ids`;i[o]=l,s.push(`MATCH (n)-[r:${a}]->(m) WHERE id(r) in $${o} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===s.length)return[];const m=s.join(" UNION "),c=new l({openCypherQuery:m,bindParameters:i}),y=(await a(e,c,r?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:o,value:e}=await y.read();if(o)break;for(const r of e)t.push({id:r[0],typeName:r[1]}),t.push({id:r[2],typeName:r[3]})}return t}async function u(o,e,r){const t=new Map,n=d(o,e),i={},s=[];for(const[a,l]of n){if(l.length<1)continue;const o=`${a}_ids`;i[o]=l,s.push(`MATCH (n)-[r:${a}]->(m) WHERE id(r) in $${o} RETURN id(r), id(n), id(m)`)}if(0===s.length)return t;const m=s.join(" UNION "),c=new l({openCypherQuery:m,bindParameters:i}),y=(await a(e,c,r?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:o,value:e}=await y.read();if(o)break;for(const r of e)t.set(r[0],[r[1],r[2]])}return t}const b="ESRI__ChronologicalLayoutOverlay",w=()=>b,x=e=>{const t=[],n={type:"CIMGeometricEffectCut",beginCut:3,endCut:3};for(const r of e.chronologicalAuxiliaryGraphics?.lines??[]){const e={type:"CIMSolidStroke",enable:!0,width:r.width,color:[r.color.r,r.color.g,r.color.b,Math.round(r.color.a/100*255)],effects:r.dashPattern.length>0?[{type:"CIMGeometricEffectDashes",dashTemplate:r.dashPattern,lineDashEnding:"NoConstraint"},n]:[n]},i={type:"CIMVectorMarker",enable:!0,size:10,frame:{xmin:-5,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[-2.06,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[r.color.r,r.color.g,r.color.b,Math.round(r.color.a/100*255)]}]}}],markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineEnd",offsetAlongLine:0}},s=new m({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:r.arrowheadSizeAtEnd?[e,i]:[e]}}});for(const n of r.elements){const e=new c({paths:[[[n.origin.x,n.origin.y],[n.destination.x,n.destination.y]]]});t.push(new o({geometry:e,symbol:s}))}}for(const r of e.chronologicalAuxiliaryGraphics?.polygons??[]){const e=new y({color:[r.color.r,r.color.g,r.color.b,r.color.a/100],style:"solid",outline:null});for(const n of r.elements){const r=new p({rings:[n.points.map((o=>[o.x,o.y]))]});t.push(new o({geometry:r,symbol:e}))}}for(const r of e.chronologicalAuxiliaryGraphics?.texts??[]){let e="middle",n="center";switch(r.direction?.value){case i.left:n="right";break;case i.right:n="left";break;case i.bottom:e="bottom"}for(const i of r.elements){const s=new f({color:[r.color.r,r.color.g,r.color.b,r.color.a/100],text:i.str,font:{size:r.height,weight:"bold"},verticalAlignment:e,horizontalAlignment:n}),a=new h({x:i.anchor.x,y:i.anchor.y});t.push(new o({geometry:a,symbol:s}))}}return new r({graphics:t,listMode:"hide",title:b,id:b})},M=(o,e)=>{const r=new Map;for(const t of[...e.entityTypes??[],...e.relationshipTypes??[]])for(const o of t.properties??[])o.geometryType&&"esriGeometryNull"!==o.geometryType&&r.set(t.name,o.name??"");const i=n.getInstance();for(const n of o)i.writeToStore([n],t,r.get(n.typeName??"")??"")},C=o=>s.get(o)??"radial-root-centric";function S(o){if(!o.spatialReference.isWGS84)throw new e("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return o.clone().normalize().map((o=>[[o.xmin,o.ymin],[o.xmin,o.ymax],[o.xmax,o.ymax],[o.xmax,o.ymin],[o.xmin,o.ymin]]))}export{C as convertLayoutTypeToWebSupportedFormat,x as getChronologicalOverlay,w as getDefaultChronologicalOverlayLayerId,g as getRelationshipEndNodeIds,u as getRelationshipEndNodeMap,M as loadRecordsIntoLocalCache,S as utilsExtentToInBoundsRings};
|