@arcgis/core 5.2.0-next.60 → 5.2.0-next.62
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/applications/Components/imageryUtils.d.ts +10 -0
- package/applications/Components/imageryUtils.js +1 -1
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{3abc12d2407e4214963d.js → 13033178de9f637a2356.js} +1 -1
- package/assets/esri/core/workers/chunks/{d205edd949f3e6e24eb9.js → 147a89553188cc6aabf4.js} +1 -1
- package/assets/esri/core/workers/chunks/{3157f85bb319294878ca.js → 1b68b1b724ad30396723.js} +2 -2
- package/assets/esri/core/workers/chunks/{127b111ee53e4b9184f8.js → 4dcd4a052b40047a9230.js} +1 -1
- package/assets/esri/core/workers/chunks/{aaa66a04b882b0ba2961.js → 5600fc334d20c4f0c83d.js} +1 -1
- package/assets/esri/core/workers/chunks/{14c066c31fe37b7f6e63.js → 638ed1297efdb24f4711.js} +1 -1
- package/assets/esri/core/workers/chunks/{42692a4ce3fb364e321e.js → 763cbb6716e398436a6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6aad815fc0ee8e24bb5.js → 7ce52b850dd785bfa33f.js} +1 -1
- package/assets/esri/core/workers/chunks/{81659d121ed732bda907.js → a12803108c3b12808698.js} +2 -2
- package/assets/esri/core/workers/chunks/{5527b2da4abe0faa98bb.js → a494abeb026d536d9fae.js} +1 -1
- package/assets/esri/core/workers/chunks/{498d29e8c8be4a12ba12.js → b958f87f23f984131d09.js} +1 -1
- package/assets/esri/core/workers/chunks/{4e2f3dd158a5228c87ba.js → c85ba0700eafdc8d6f9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{edf87407dd20685c82ab.js → e287113777a94ded8de6.js} +1 -1
- package/assets/esri/core/workers/chunks/{a615a644086e98a90579.js → f4891345507df63cff3c.js} +2 -2
- package/assets/esri/core/workers/chunks/{4fb549f11e176fc2f24a.js → f7fa932ade85cb2847b6.js} +1 -1
- package/config.js +1 -1
- package/core/screenUtils.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/interfaces.d.ts +14 -0
- package/kernel.js +1 -1
- package/package.json +3 -3
- package/popup/FeatureContent.d.ts +311 -0
- package/popup/FeatureContent.js +2 -0
- package/popup/FeatureContentCollection.d.ts +569 -0
- package/popup/FeatureContentCollection.js +2 -0
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +2 -2
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +11 -11
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/View2D.d.ts +2 -2
- package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/widgets/Legend/support/heatmapRampUtils.js +1 -1
- /package/assets/esri/core/workers/chunks/{81659d121ed732bda907.js.LICENSE.txt → a12803108c3b12808698.js.LICENSE.txt} +0 -0
package/interfaces.d.ts
CHANGED
|
@@ -6390,6 +6390,20 @@ declare namespace __esri {
|
|
|
6390
6390
|
export type PopupFeature = import("./popup/Feature.js").default;
|
|
6391
6391
|
export const PopupFeature: typeof import("./popup/Feature.js").default;
|
|
6392
6392
|
|
|
6393
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
6394
|
+
export type PopupFeatureContentProperties = import("./popup/FeatureContent.js").FeatureContentProperties;
|
|
6395
|
+
|
|
6396
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
6397
|
+
export type PopupFeatureContent = import("./popup/FeatureContent.js").default;
|
|
6398
|
+
export const PopupFeatureContent: typeof import("./popup/FeatureContent.js").default;
|
|
6399
|
+
|
|
6400
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
6401
|
+
export type PopupFeatureContentCollectionProperties = import("./popup/FeatureContentCollection.js").FeatureContentCollectionProperties;
|
|
6402
|
+
|
|
6403
|
+
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
6404
|
+
export type PopupFeatureContentCollection = import("./popup/FeatureContentCollection.js").default;
|
|
6405
|
+
export const PopupFeatureContentCollection: typeof import("./popup/FeatureContentCollection.js").default;
|
|
6406
|
+
|
|
6393
6407
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
6394
6408
|
export type PopupFeaturesProperties = import("./popup/Features.js").FeaturesProperties;
|
|
6395
6409
|
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.62",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.62",
|
|
4
4
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@amcharts/amcharts5": "~5.20.0",
|
|
23
|
-
"@arcgis/toolkit": "^5.2.0-next.
|
|
23
|
+
"@arcgis/toolkit": "^5.2.0-next.58",
|
|
24
24
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
25
25
|
"@esri/calcite-components": "^5.1.1",
|
|
26
|
-
"@vaadin/grid": "~25.2.
|
|
26
|
+
"@vaadin/grid": "~25.2.6",
|
|
27
27
|
"@zip.js/zip.js": "~2.8.34",
|
|
28
28
|
"luxon": "~3.7.2",
|
|
29
29
|
"marked": "~18.0.7",
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import type Graphic from "../Graphic.js";
|
|
2
|
+
import type EsriMap from "../Map.js";
|
|
3
|
+
import type Accessor from "../core/Accessor.js";
|
|
4
|
+
import type Point from "../geometry/Point.js";
|
|
5
|
+
import type SpatialReference from "../geometry/SpatialReference.js";
|
|
6
|
+
import type FeatureAbilities from "./support/FeatureAbilities.js";
|
|
7
|
+
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../core/Identifiable.js";
|
|
8
|
+
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
|
|
9
|
+
import type { FeatureFormattedAttributes, LastEditInfo, PopupTemplateContentResolved, RelatedInfo, State } from "./types.js";
|
|
10
|
+
import type { TimeZone } from "../time/types.js";
|
|
11
|
+
import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
|
|
12
|
+
import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js";
|
|
13
|
+
import type { GraphicProperties } from "../Graphic.js";
|
|
14
|
+
import type { PointProperties } from "../geometry/Point.js";
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export interface FeatureContentProperties extends IdentifiableMixinProperties, Partial<Pick<FeatureContent, "defaultPopupTemplateEnabled" | "map" | "view">> {
|
|
18
|
+
/**
|
|
19
|
+
* Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
abilities?: FeatureAbilitiesProperties;
|
|
24
|
+
/**
|
|
25
|
+
* The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
29
|
+
* @example
|
|
30
|
+
* let graphic = new Graphic({
|
|
31
|
+
* geometry: view.center,
|
|
32
|
+
* attributes: {
|
|
33
|
+
* "name": "Spruce",
|
|
34
|
+
* "family": "Pinaceae",
|
|
35
|
+
* "count": 126
|
|
36
|
+
* },
|
|
37
|
+
* symbol: new SimpleMarkerSymbol({
|
|
38
|
+
* style: "square",
|
|
39
|
+
* color: "blue",
|
|
40
|
+
* size: "8px"
|
|
41
|
+
* }),
|
|
42
|
+
* popupTemplate: {
|
|
43
|
+
* content: [
|
|
44
|
+
* {
|
|
45
|
+
* // Set popup template content
|
|
46
|
+
* }
|
|
47
|
+
* ]
|
|
48
|
+
* }
|
|
49
|
+
* });
|
|
50
|
+
*/
|
|
51
|
+
graphic?: GraphicProperties | null;
|
|
52
|
+
/**
|
|
53
|
+
* The [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) representing the location of the
|
|
54
|
+
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) interaction used to trigger the opening of the component.
|
|
55
|
+
*
|
|
56
|
+
* This value should be set when executing Arcade expressions in the Feature component that
|
|
57
|
+
* expect the `$userInput` profile variable to have a value.
|
|
58
|
+
*
|
|
59
|
+
* @internal
|
|
60
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
61
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
62
|
+
*/
|
|
63
|
+
location?: PointProperties | null;
|
|
64
|
+
/**
|
|
65
|
+
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
|
|
66
|
+
* This property should be set if executing Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
|
|
67
|
+
*
|
|
68
|
+
* @internal
|
|
69
|
+
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
70
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
71
|
+
*/
|
|
72
|
+
spatialReference?: SpatialReferenceProperties | null;
|
|
73
|
+
/**
|
|
74
|
+
* Dates and times will be displayed in this time zone. By default this time zone is
|
|
75
|
+
* inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with this property then the property will fallback to the `system` time zone.
|
|
76
|
+
*
|
|
77
|
+
* **Possible Values**
|
|
78
|
+
*
|
|
79
|
+
* Value | Description |
|
|
80
|
+
* ----- | ----------- |
|
|
81
|
+
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
82
|
+
* unknown | Dates and time are not adjusted for any timezone.
|
|
83
|
+
* Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
timeZone?: TimeZone | null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type PopupContent = PopupTemplateContentResolved;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Provides reactive state and logic for populating the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component.
|
|
95
|
+
*
|
|
96
|
+
* The class resolves popup template content for the current [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/), including evaluating Arcade expressions, formatting attribute values, and fetching related feature information.
|
|
97
|
+
*
|
|
98
|
+
* @internal
|
|
99
|
+
* @see [Feature component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/)
|
|
100
|
+
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
101
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
102
|
+
* @see [Arcade - expression language](https://developers.arcgis.com/javascript/latest/arcade/)
|
|
103
|
+
* @since 5.1
|
|
104
|
+
*/
|
|
105
|
+
export default class FeatureContent extends FeatureContentSuperclass {
|
|
106
|
+
/** @internal */
|
|
107
|
+
constructor(properties?: FeatureContentProperties);
|
|
108
|
+
/**
|
|
109
|
+
* Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
get abilities(): FeatureAbilities;
|
|
114
|
+
set abilities(value: FeatureAbilitiesProperties);
|
|
115
|
+
/**
|
|
116
|
+
* The [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) of the feature.
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
get content(): PopupContent | null | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Enables automatic creation of a popup template for layers that have popups enabled but no
|
|
123
|
+
* popupTemplate defined. Automatic popup templates are supported for layers that
|
|
124
|
+
* support the `createPopupTemplate` method. (Supported for
|
|
125
|
+
* [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/),
|
|
126
|
+
* [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/),
|
|
127
|
+
* [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
128
|
+
* [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
|
|
129
|
+
* [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
|
|
130
|
+
* [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)),
|
|
131
|
+
* [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/),
|
|
132
|
+
* [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/),
|
|
133
|
+
* [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/),
|
|
134
|
+
* [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/),
|
|
135
|
+
* [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/),
|
|
136
|
+
* [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
|
|
137
|
+
* [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/),
|
|
138
|
+
* [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/),
|
|
139
|
+
* [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/),
|
|
140
|
+
* [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/),
|
|
141
|
+
* [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and
|
|
142
|
+
* [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/)).
|
|
143
|
+
*
|
|
144
|
+
* @default false
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
accessor defaultPopupTemplateEnabled: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* A read-only map of Arcade expression names to their evaluated values for the current feature.
|
|
150
|
+
*
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
get expressionAttributes(): Record<string, any> | null | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
156
|
+
* content. They are obtained from the feature's [graphic](#graphic) attribute values
|
|
157
|
+
* and can be read:
|
|
158
|
+
* * globally using the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property
|
|
159
|
+
* directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), or
|
|
160
|
+
* * per an individual content element. This element is defined with a [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/)
|
|
161
|
+
* popup element set on the PopupTemplate [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) property.
|
|
162
|
+
*
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
get formattedAttributes(): FeatureFormattedAttributes | null | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
|
|
168
|
+
*
|
|
169
|
+
* @internal
|
|
170
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
171
|
+
* @example
|
|
172
|
+
* let graphic = new Graphic({
|
|
173
|
+
* geometry: view.center,
|
|
174
|
+
* attributes: {
|
|
175
|
+
* "name": "Spruce",
|
|
176
|
+
* "family": "Pinaceae",
|
|
177
|
+
* "count": 126
|
|
178
|
+
* },
|
|
179
|
+
* symbol: new SimpleMarkerSymbol({
|
|
180
|
+
* style: "square",
|
|
181
|
+
* color: "blue",
|
|
182
|
+
* size: "8px"
|
|
183
|
+
* }),
|
|
184
|
+
* popupTemplate: {
|
|
185
|
+
* content: [
|
|
186
|
+
* {
|
|
187
|
+
* // Set popup template content
|
|
188
|
+
* }
|
|
189
|
+
* ]
|
|
190
|
+
* }
|
|
191
|
+
* });
|
|
192
|
+
*/
|
|
193
|
+
get graphic(): Graphic | null | undefined;
|
|
194
|
+
set graphic(value: GraphicProperties | null | undefined);
|
|
195
|
+
/**
|
|
196
|
+
* The heading for the feature.
|
|
197
|
+
*
|
|
198
|
+
* @default ""
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
get heading(): string;
|
|
202
|
+
/**
|
|
203
|
+
* Indicates whether the current [graphic](#graphic) resides in a non-spatial table.
|
|
204
|
+
*
|
|
205
|
+
* @internal
|
|
206
|
+
*/
|
|
207
|
+
get isFeatureFromTable(): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* A read-only property containing metadata regarding the last edit performed on a feature.
|
|
210
|
+
* This object has the following properties:
|
|
211
|
+
*
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
|
+
get lastEditInfo(): LastEditInfo | null | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* The [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) representing the location of the
|
|
217
|
+
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) interaction used to trigger the opening of the component.
|
|
218
|
+
*
|
|
219
|
+
* This value should be set when executing Arcade expressions in the Feature component that
|
|
220
|
+
* expect the `$userInput` profile variable to have a value.
|
|
221
|
+
*
|
|
222
|
+
* @internal
|
|
223
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
224
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
225
|
+
*/
|
|
226
|
+
get location(): Point | null | undefined;
|
|
227
|
+
set location(value: PointProperties | null | undefined);
|
|
228
|
+
/**
|
|
229
|
+
* A map is required when the input [graphic](#graphic) has a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use the `$map` profile variable to access data from layers within a map. Without a map, expressions that use `$map` will throw an error.
|
|
230
|
+
*
|
|
231
|
+
* Alternatively, the [view](#view) property can be used to provide the map instance for this property.
|
|
232
|
+
*
|
|
233
|
+
* @internal
|
|
234
|
+
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
235
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
236
|
+
* @example
|
|
237
|
+
* // The building footprints represent the buildings that intersect a clicked parcel
|
|
238
|
+
* let buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints"));
|
|
239
|
+
*/
|
|
240
|
+
accessor map: EsriMap | null | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* A read-only map containing information about related features for the current feature.
|
|
243
|
+
* The keys are related layer IDs as strings, and the values are [RelatedInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#RelatedInfo) objects.
|
|
244
|
+
* This property is populated when the feature has related fields and is used to manage and display related feature information.
|
|
245
|
+
*
|
|
246
|
+
* @internal
|
|
247
|
+
*/
|
|
248
|
+
get relatedInfos(): Map<string, RelatedInfo>;
|
|
249
|
+
/**
|
|
250
|
+
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
|
|
251
|
+
* This property should be set if executing Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
|
|
252
|
+
*
|
|
253
|
+
* @internal
|
|
254
|
+
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
255
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
256
|
+
*/
|
|
257
|
+
get spatialReference(): SpatialReference | null | undefined;
|
|
258
|
+
set spatialReference(value: SpatialReferenceProperties | null | undefined);
|
|
259
|
+
/**
|
|
260
|
+
* The current state of the Feature component.
|
|
261
|
+
*
|
|
262
|
+
* @default "disabled"
|
|
263
|
+
* @internal
|
|
264
|
+
*/
|
|
265
|
+
get state(): State;
|
|
266
|
+
/**
|
|
267
|
+
* Dates and times will be displayed in this time zone. By default this time zone is
|
|
268
|
+
* inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with this property then the property will fallback to the `system` time zone.
|
|
269
|
+
*
|
|
270
|
+
* **Possible Values**
|
|
271
|
+
*
|
|
272
|
+
* Value | Description |
|
|
273
|
+
* ----- | ----------- |
|
|
274
|
+
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
275
|
+
* unknown | Dates and time are not adjusted for any timezone.
|
|
276
|
+
* Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
277
|
+
*
|
|
278
|
+
* @internal
|
|
279
|
+
*/
|
|
280
|
+
get timeZone(): TimeZone;
|
|
281
|
+
set timeZone(value: TimeZone | null | undefined);
|
|
282
|
+
/**
|
|
283
|
+
* A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
284
|
+
*
|
|
285
|
+
* > [!WARNING]
|
|
286
|
+
* >
|
|
287
|
+
* > A view is required if the user expects to display content in any of the following situations:
|
|
288
|
+
* > - The [graphic](#graphic) has a popupTemplate containing Arcade expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/) or reference the `$map` profile variable (i.e. access data from layers within a map).
|
|
289
|
+
* > - Content is displayed from the popup template of an [aggregate feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) (i.e. a [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) or [bin](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/)).
|
|
290
|
+
* > - Values from `date` and `timestamp-offset` [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) should respect the view's [time zone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone).
|
|
291
|
+
*
|
|
292
|
+
* @internal
|
|
293
|
+
*/
|
|
294
|
+
accessor view: MapViewOrSceneView | null | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* Indicates whether the feature is currently waiting for all of its content to finish loading.
|
|
297
|
+
*
|
|
298
|
+
* @internal
|
|
299
|
+
*/
|
|
300
|
+
get waitingForContent(): boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Fetches and updates the geometry of the [graphic](#graphic).
|
|
303
|
+
* This method can be called to refresh the [graphic](#graphic)'s geometry before taking actions such as calling
|
|
304
|
+
* [View2D.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#goTo) with the graphic as the `target`.
|
|
305
|
+
*
|
|
306
|
+
* @returns A promise that resolves when the geometry update attempt has completed.
|
|
307
|
+
* @internal
|
|
308
|
+
*/
|
|
309
|
+
updateGeometry(): Promise<void>;
|
|
310
|
+
}
|
|
311
|
+
declare const FeatureContentSuperclass: typeof Accessor & typeof IdentifiableMixin
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../Graphic.js";import{FeatureSetQueryInterceptor as i}from"../arcade/featureset/support/FeatureSetQueryInterceptor.js";import r from"../core/Accessor.js";import{isSome as s}from"../core/arrayUtils.js";import{createTask as o}from"../core/asyncUtils.js";import{IdentifiableMixin as a}from"../core/Identifiable.js";import n from"../core/Logger.js";import{abortMaybe as l}from"../core/maybe.js";import{eachAlways as p,isAbortError as h,throwIfAborted as c}from"../core/promiseUtils.js";import{watch as u,initial as d,when as f}from"../core/reactiveUtils.js";import{throttle as m}from"../core/throttle.js";import{property as g,subclass as y}from"../core/accessorSupport/decorators.js";import _ from"../geometry/Point.js";import b from"../geometry/SpatialReference.js";import v from"./content/TextContent.js";import{compileExpressionInfos as T,formatArcadeValue as I}from"./support/arcadeFeatureUtils.js";import A from"./support/FeatureAbilities.js";import{preLayerQueryCallback as x,preRequestCallback as C,createFieldInfoMap as E,getAllFieldInfos as w,getSourceLayer as F,querySourceLayer as k,queryUpdatedFeature as j,isRelatableFeatureSupportedLayer as P,isAssociatedFeatureSupportedLayer as R,formatEditInfo as O,substituteFieldsInLinksAndAttributes as M,graphicCallback as Z,formatAttributes as U,isRelatedField as N}from"./support/featureUtils.js";import{queryLayerInfos as S,queryRelatedFeatures as L,setRelatedFeatures as H,getRelatedFieldInfo as G,createRelatedInfo as q,updateRelatedInfo as z}from"./support/relatedFeatureUtils.js";import{system as B}from"../time/constants.js";var Q;const D=1;let J=class extends(a(r)){static{Q=this}constructor(t){super(t),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._graphicExpressionAttributes=null,this.abilities=new A,this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.expressionAttributes=null,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.heading="",this.view=null,this._graphicChangedThrottled=m(this._graphicChanged,()=>this.notifyChange("waitingForContent"),D,this),this._isAllowedContentType=t=>{const{abilities:e}=this;return"attachments"===t.type&&!!e.attachmentsContent||"custom"===t.type&&!!e.customContent||"fields"===t.type&&!!e.fieldsContent||"media"===t.type&&!!e.mediaContent||"text"===t.type&&!!e.textContent||"expression"===t.type&&!!e.expressionContent||"relationship"===t.type&&!!e.relationshipContent||"utility-network-associations"===t.type&&!!e.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=m(this._evaluateExpressionAttributes,()=>this.notifyChange("waitingForContent"),D,this),this.addHandles([u(()=>[this._effectivePopupTemplate,this.abilities.attachmentsContent,this.abilities.chartAnimation,this.abilities.customContent,this.abilities.expressionContent,this.abilities.fieldsContent,this.abilities.mediaContent,this.abilities.relationshipContent,this.abilities.textContent,this.abilities.utilityNetworkAssociationsContent,this.graphic,this.timeZone],()=>this._graphicChangedThrottled(),d),f(()=>{if(!this._graphicChangedTask?.finished||null==this._graphicChangedTask.value)return null;const t=this._graphicChangedTask.value,e=t?.expressionInfos?.dependencies;return[t,e?.has("view-scale")?this.view?.scale:null,e?.has("view-time-extent")?this.view?.timeExtent?.start:null,e?.has("view-time-extent")?this.view?.timeExtent?.end:null]},([t])=>this._evaluateExpressionAttributesThrottled(t))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=l(this._graphicChangedTask),this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this.relatedInfos.clear()}static{this.interceptor=new i(x,C)}get _effectivePopupTemplate(){return this.graphic?.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled)??null}get _fieldInfoMap(){return E(w(this._effectivePopupTemplate),this._layer)}get _layer(){return F(this.graphic)}get isFeatureFromTable(){return this._layer?.isTable??!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(t){this._override("spatialReference",t)}get timeZone(){return this.view?.timeZone??B}set timeZone(t){this._overrideIfSome("timeZone",t)}get map(){return this.view?.map||null}set map(t){this._override("map",t)}get waitingForContent(){const{_graphicChangedThrottled:t,_evaluateExpressionAttributesThrottled:e,_graphicChangedTask:i,_evaluateExpressionAttributesTask:r}=this;return t.hasPendingUpdates()||e.hasPendingUpdates()||null!=i&&!i.finished||null!=r&&!r.finished}async updateGeometry(){const{graphic:t,spatialReference:e,_layer:i}=this;await(i?.load());const r=i?.objectIdField;if(!r||!t)return;const s=t.attributes?.[r];if(null==s)return;const o=[s],a=await k({layer:i,graphic:t,outFields:[],objectIds:o,returnGeometry:!0,spatialReference:e}),n=a?.geometry;n&&(t.geometry=n)}_clear(){this._set("heading",""),this._set("content",null),this._set("formattedAttributes",null),this._set("expressionAttributes",null)}_graphicChanged(){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._graphicChangedTask=l(this._graphicChangedTask),this._graphicChangedTask=o(async t=>{this._error=null,this._clear();const{graphic:e}=this;try{if(!e)return null;const{_layer:i,_effectivePopupTemplate:r}=this,s=this.spatialReference;await j({graphic:e,popupTemplate:r,layer:i,spatialReference:s},{signal:t});const[{value:o},{value:a}]=await p([this._getContent(),this._getTitle()]),[,{value:n}]=await p([this._checkForRelatedFeatures({signal:t}),T(r?.expressionInfos,e)]);return{expressionInfos:n,content:o,heading:a}}catch(i){throw h(i)||(this._error=i,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:i,graphic:e,popupTemplate:this._effectivePopupTemplate})),i}})}_compileContentElement(t){return"relationship"===t.type?P(this._layer)?t:void 0:"utility-network-associations"===t.type?R(this._layer)?t:void 0:t}_compileContent(t){if(this.graphic)return Array.isArray(t)?t.filter(this._isAllowedContentType).map(t=>this._compileContentElement(t)).filter(s):"string"==typeof t?new v({text:t}).text:t}_compileLastEditInfo(){const{_effectivePopupTemplate:t,_layer:e,graphic:i,timeZone:r}=this;if(!t)return;const{lastEditInfoEnabled:s}=t,o=e?.editFieldsInfo;return s&&o?O(o,i?.attributes,r,e):void 0}_compileHeading(t){const{_fieldInfoMap:e,_layer:i,graphic:r,expressionAttributes:s}=this,o=r?.attributes??{},a=this.formattedAttributes?.global??{};return M({attributes:o,fieldInfoMap:e,globalAttributes:a,expressionAttributes:s,layer:i,text:t})}async _getTitle(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"title",value:t?.title,event:{graphic:e}}):null}async _getContent(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"content",value:t?.content,event:{graphic:e}}):null}_evaluateExpressionAttributes({heading:t,content:e,expressionInfos:i}){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=o(async r=>{const{graphic:s,map:o,view:a,spatialReference:l,location:p}=this;try{if(!s)return;let n;if(null!=i){const t=[];for(const[e,n]of i.expressions.entries())null!=n?t.push(n.evaluate({graphic:s,interceptor:Q.interceptor,location:p,map:o,options:{signal:r},spatialReference:l,view:a}).then(t=>[e,"string"==typeof t?I(t):t]).catch(()=>[e,void 0])):t.push(Promise.resolve([e,void 0]));n=Object.fromEntries(await Promise.all(t)),c(r)}this._set("expressionAttributes",n??null),this._graphicExpressionAttributes={...s.attributes,...n},this._set("formattedAttributes",this._createFormattedAttributes(e)),this._set("heading",this._compileHeading(t)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(e)||null)}catch(u){h(u)||(this._error=u,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:u,graphic:s,popupTemplate:this._effectivePopupTemplate}))}})}_createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){const{_effectivePopupTemplate:r,graphic:s,relatedInfos:o,_layer:a,_fieldInfoMap:n,_graphicExpressionAttributes:l,timeZone:p}=this;i.content[e]=U({attributes:{...l,...t.attributes},fieldInfoMap:n,fieldInfos:r?.fieldInfos,graphic:s,layer:a,relatedInfos:o,timeZone:p})}_createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){if(t.fieldInfos){const{graphic:r,relatedInfos:s,_layer:o,_fieldInfoMap:a,_graphicExpressionAttributes:n,timeZone:l}=this;i.content[e]=U({attributes:{...n,...t.attributes},fieldInfoMap:a,fieldInfos:t.fieldInfos,graphic:r,isContentFieldInfos:!0,layer:o,relatedInfos:s,timeZone:l})}}_createFormattedAttributes(t){const{_effectivePopupTemplate:e,graphic:i,relatedInfos:r,_layer:s,_fieldInfoMap:o,_graphicExpressionAttributes:a,timeZone:n}=this,l=e?.fieldInfos,p={global:U({attributes:a,fieldInfoMap:o,fieldInfos:l,graphic:i,layer:s,relatedInfos:r,timeZone:n}),content:[]};return Array.isArray(t)&&t.forEach((t,e)=>{"fields"===t.type&&this._createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p}),"media"===t.type&&this._createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p})}),p}_checkForRelatedFeatures(t){const{graphic:e,_effectivePopupTemplate:i}=this;return this._queryRelatedInfos(e,w(i),t)}async _queryRelatedInfos(t,e,i){const{relatedInfos:r,_layer:s}=this;r.clear();const o=await(s?.associatedLayer?.load(i))??s;if(!o||!t)return;const a=e.filter(t=>!!t.fieldName&&N(t.fieldName));if(!a?.length)return;e.forEach(t=>this._configureRelatedInfo(t,o));const n=await S({relatedInfos:r,layer:o},i);Object.keys(n).forEach(t=>{const e=r.get(t.toString()),i=n[t]?.value;e&&i&&(e.layerInfo=i.data)});const l=await L({graphic:t,relatedInfos:r,layer:o},i);Object.keys(l).forEach(t=>{H(l[t]?.value,r.get(t.toString()))})}_configureRelatedInfo(t,e){const{relatedInfos:i}=this,r=G(t.fieldName||"");if(!r)return;const{layerId:s,fieldName:o}=r;if(!s)return;const a=i.get(s.toString())||q(s,e);a&&(z({relatedInfo:a,fieldName:o,fieldInfo:t}),this.relatedInfos.set(s,a))}};t([g()],J.prototype,"_error",void 0),t([g()],J.prototype,"_graphicChangedTask",void 0),t([g()],J.prototype,"_evaluateExpressionAttributesTask",void 0),t([g({readOnly:!0})],J.prototype,"_effectivePopupTemplate",null),t([g({readOnly:!0})],J.prototype,"_fieldInfoMap",null),t([g({readOnly:!0})],J.prototype,"_layer",null),t([g({type:A})],J.prototype,"abilities",void 0),t([g({readOnly:!0})],J.prototype,"content",void 0),t([g()],J.prototype,"description",void 0),t([g({type:Boolean})],J.prototype,"defaultPopupTemplateEnabled",void 0),t([g({readOnly:!0})],J.prototype,"expressionAttributes",void 0),t([g({readOnly:!0})],J.prototype,"isFeatureFromTable",null),t([g({readOnly:!0})],J.prototype,"state",null),t([g({readOnly:!0})],J.prototype,"formattedAttributes",void 0),t([g({type:e})],J.prototype,"graphic",void 0),t([g({readOnly:!0})],J.prototype,"lastEditInfo",void 0),t([g({type:_})],J.prototype,"location",void 0),t([g({readOnly:!0})],J.prototype,"relatedInfos",void 0),t([g({type:b})],J.prototype,"spatialReference",null),t([g()],J.prototype,"timeZone",null),t([g({readOnly:!0})],J.prototype,"heading",void 0),t([g()],J.prototype,"map",null),t([g({readOnly:!0})],J.prototype,"waitingForContent",null),t([g()],J.prototype,"view",void 0),J=Q=t([y("esri.popup.FeatureContent")],J);const K=J;export{K as default};
|