@arcgis/core 5.1.0-next.59 → 5.1.0-next.60
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/arcadeFeatureUtils.js +1 -1
- package/applications/Components/featureUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9321f5ec514805307219.js → 05c8d2c0362af4511d86.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad1946c084219bb678a0.js → 06868e4f52de9d918255.js} +1 -1
- package/assets/esri/core/workers/chunks/{8df0c154bb0d79a905c0.js → 06c0b93e276cfc1fb7ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{05d25a98c54679233902.js → 0888baa99c9007ad63bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{1613123918e9b0f7cfdb.js → 0f597c690e5c60fe944b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e2e3c39876bbe019c57a.js → 0f8736242544f9e9a57a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9c5e6996f36ec4b1558.js → 11a8541f3909f9ffb000.js} +1 -1
- package/assets/esri/core/workers/chunks/{3de17e89973160b42923.js → 16806f5044a9da553b66.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e0752a81a7247c567ab.js → 185f59f90070d5d6ac94.js} +1 -1
- package/assets/esri/core/workers/chunks/1984c0f037065acd21d3.js +1 -0
- package/assets/esri/core/workers/chunks/1af247c86d1c4ae8fef3.js +1 -0
- package/assets/esri/core/workers/chunks/{1f91280032aa42b1585b.js → 2a7e7a497823e9f05aa3.js} +1 -1
- package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +1 -0
- package/assets/esri/core/workers/chunks/{9d580b5bcd59857a5702.js → 2f74147597805828cb38.js} +23 -7
- package/assets/esri/core/workers/chunks/{d9444dd0d40aa8332b28.js → 31e0bfc2cab055aebf9a.js} +1 -1
- package/assets/esri/core/workers/chunks/{93d1118f7a909d123b40.js → 32360a55d1836b2a737e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a9eb90b901e64e67b7a3.js → 368b4c0a5eecbb06feac.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b6e3cc086d13da770fa.js → 37729578a7c4cf15eded.js} +1 -1
- package/assets/esri/core/workers/chunks/{4b3622fc355fd2fd8678.js → 3af1e2f0b3d30c58d0c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{83113a9e284701d053b5.js → 3c155efd5768003a91eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ed2aa1092c0a2c839c0.js → 3f0d9fdd8c37605dd85d.js} +1 -1
- package/assets/esri/core/workers/chunks/{86a6dd19903fa5023cc7.js → 58614f12796dbba013f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{26cafd20c8d03c274389.js → 5c1abb46b9937a050c32.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f8e22df08c2f5fbb8c8.js → 6172715b2b2853819d8a.js} +1 -1
- package/assets/esri/core/workers/chunks/{87077f4cbca13e030411.js → 62c2757f5dc4aaca2df8.js} +1 -1
- package/assets/esri/core/workers/chunks/{23f6d24bf850bc3280ec.js → 6355de3ee89916b74dae.js} +1 -1
- package/assets/esri/core/workers/chunks/64ad6130de549083caba.js +1 -0
- package/assets/esri/core/workers/chunks/{9b53aa2429573f1b977f.js → 68475eba323b4aa892a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7a553e245ba011d259f.js → 78c7eace6ec3fa5c7413.js} +1 -1
- package/assets/esri/core/workers/chunks/7cee28575fd57430cf02.js +1 -0
- package/assets/esri/core/workers/chunks/{b20f4c82d0b44fdb4670.js → 7e1ef2a55f8d123f31e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a9f5a49dc68b42762bb.js → 8083dface1ca2dbd12b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{85c72d9fa533552a6e8a.js → 82e0691995d821137d5f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec1b2eb05410848081c9.js → 8432ffc33843e898bab7.js} +1 -1
- package/assets/esri/core/workers/chunks/{bacc343a79828e456de7.js → 8435b6bf356959009b76.js} +1 -1
- package/assets/esri/core/workers/chunks/{56bce3a6701f8549606b.js → 8878ab87ef7961fafae8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ef740d25dc17bef11b2.js → 8a893f23827769d42092.js} +1 -1
- package/assets/esri/core/workers/chunks/{e8a23ae30d586e3a973c.js → 8e68b4628e9616356c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7e565e7c0ce1464c6b0.js → 8ea67b502f9355dab7e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{66fc3c4d6c54eee231b9.js → 8edae79554843dd77ada.js} +1 -1
- package/assets/esri/core/workers/chunks/{0e88e61d89f89994c4bf.js → 909ef35fa33be2b6da41.js} +1 -1
- package/assets/esri/core/workers/chunks/{c91d39e8e14be3d8bdf5.js → 90b7acc70adba193b215.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1a0a7cdaf50f98adb3e.js → 97f10efb0fe05bedcebd.js} +1 -1
- package/assets/esri/core/workers/chunks/98f5bf1b91f3696b2fce.js +1 -0
- package/assets/esri/core/workers/chunks/{4fb718174c6e07d752e0.js → 9c52d4b54dfdb69dee29.js} +1 -1
- package/assets/esri/core/workers/chunks/{5143f74f1fe7533a6069.js → 9c72127de7afcbaafbaf.js} +1 -1
- package/assets/esri/core/workers/chunks/{155c741a9839d24f04a2.js → 9def5d17b94e5db71883.js} +1 -1
- package/assets/esri/core/workers/chunks/{a41fabf8b2cf15b7d0c9.js → a10be7eb05a007fff1ed.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab3183f2327ff26e2b45.js → a226ba96d9a3ecc14e3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bc6edeb3156d241677b.js → a32c87b89567a9fd1efc.js} +1 -1
- package/assets/esri/core/workers/chunks/{e26894655823849947f4.js → a446dff865332268625a.js} +1 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +1 -0
- package/assets/esri/core/workers/chunks/{bb047157f09471ecea53.js → a6d166058e3025bb280e.js} +1 -1
- package/assets/esri/core/workers/chunks/{691d0a60354b6458b9de.js → a80eb704e75d13732878.js} +1 -1
- package/assets/esri/core/workers/chunks/{75e28458e08b0738b35a.js → ab223c508f3dd562e7d3.js} +2 -2
- package/assets/esri/core/workers/chunks/{3cb0f020f9bfc6653c5d.js → b42487c6a989e11a2559.js} +1 -1
- package/assets/esri/core/workers/chunks/b6d94cbd1c5adad2f247.js +1 -0
- package/assets/esri/core/workers/chunks/{cd391415b8b8320e12e4.js → b75165880704efccc47c.js} +1 -1
- package/assets/esri/core/workers/chunks/{45eddf3918973fa8d751.js → ba72989749543122a6fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b4a2361b9f9a6c0b8a7.js → ba9e107edc2027238be3.js} +1 -1
- package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
- package/assets/esri/core/workers/chunks/{e9dd60d0220036545ebb.js → bf4bad2c9a541cd425f5.js} +1 -1
- package/assets/esri/core/workers/chunks/{78cb6b9ab32abdd1d530.js → c08e9914deb1dc62bc0f.js} +1 -1
- package/assets/esri/core/workers/chunks/{52dbfd7519555028a8af.js → c0bb53d8d58ad18334d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6149e0ac1c103e03baf.js → c0d453f93af2d4a6ce64.js} +1 -1
- package/assets/esri/core/workers/chunks/c72e90a952543d06d84b.js +1 -0
- package/assets/esri/core/workers/chunks/{005fe95c3329cfe74219.js → cf7acf5acb6d322fd996.js} +1 -1
- package/assets/esri/core/workers/chunks/{457bbf27e9bc18132464.js → d23dd7da45a7aa341540.js} +1 -1
- package/assets/esri/core/workers/chunks/{929b26999321519824b9.js → d2801df3fa44dee15ec8.js} +1 -1
- package/assets/esri/core/workers/chunks/{932a0b39d85a76377d52.js → d626e08d23330d84413b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d11e7972bc298cb94ce.js → db6e03fe8dd316f5005f.js} +1 -1
- package/assets/esri/core/workers/chunks/{a37697ef360e2425768a.js → dca595fdd5e1a571e441.js} +1 -1
- package/assets/esri/core/workers/chunks/{da2a10e72a315c3c1f82.js → e2779965db231fb666a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7af90c5f9d371eb7009.js → e4144ccc85ad4c76a9b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{9066f095f16448c0a04e.js → e4e2f059c52674dcae5b.js} +1 -1
- package/assets/esri/core/workers/chunks/edc2e87968c958bc852b.js +1 -0
- package/assets/esri/core/workers/chunks/{a256edc8337e462f80f0.js → efdd75896ca53eb6242f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c250799c131aa4ed2c35.js → f1c348cf2a1e35da9b20.js} +1 -1
- package/assets/esri/core/workers/chunks/{861a7d0e665add901e11.js → f4d577ff61da7964e08a.js} +1 -1
- package/assets/esri/core/workers/chunks/{5aff2d6ae0d2a2d92ecc.js → f7da652f8dab57677cc3.js} +1 -1
- package/chunks/GlobalIllumination.glsl.js +24 -8
- package/chunks/OITBlend.glsl.js +4 -3
- package/config.js +1 -1
- package/interfaces.d.ts +7 -0
- package/kernel.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/raster/functions/vectorFieldUtils.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/networks/support/NamedTraceConfiguration.d.ts +2 -1
- package/networks/support/NamedTraceConfiguration.js +1 -1
- package/networks/support/TraceConfiguration.d.ts +4 -2
- package/networks/support/TraceConfiguration.js +1 -1
- package/package.json +2 -2
- package/popup/Feature.d.ts +250 -0
- package/popup/Feature.js +2 -0
- package/popup/support/arcadeFeatureUtils.js +2 -0
- package/popup/support/featureUtils.js +2 -0
- package/popup/support/relatedFeatureUtils.js +2 -0
- package/popup/types.d.ts +17 -3
- package/support/revision.js +1 -1
- package/tables/AttributeTableTemplate.d.ts +2 -2
- package/tables/elements/AttributeTableGroupElement.d.ts +3 -16
- package/tables/support/tablesUtils.d.ts +6 -5
- package/tables/types.d.ts +18 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/imagery/ImageryVFStrategy.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/EditorEditingCapabilities.js +1 -1
- package/widgets/Feature/FeatureContent/FeatureContentViewModel.js +1 -1
- package/widgets/Feature/FeatureContent.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0f2ab57e4eb722b3b0c0.js +0 -1
- package/assets/esri/core/workers/chunks/522bc1d79dbe957301e4.js +0 -1
- package/assets/esri/core/workers/chunks/60ad54e5707d4414d8b9.js +0 -1
- package/assets/esri/core/workers/chunks/76064c2c801da55cd844.js +0 -1
- package/assets/esri/core/workers/chunks/ad4f0a4e2dde44cd43d4.js +0 -1
- package/assets/esri/core/workers/chunks/b3e5dcb530cef678c8f8.js +0 -1
- package/assets/esri/core/workers/chunks/d01a98c13501c89205b6.js +0 -1
- package/assets/esri/core/workers/chunks/d3b3e8c6d7096bc59489.js +0 -1
- package/assets/esri/core/workers/chunks/d53c6fc10425adc2c0cf.js +0 -1
- package/assets/esri/core/workers/chunks/e543bb228f3f9d937d43.js +0 -1
- package/assets/esri/core/workers/chunks/f8ee1a99580a7da42cde.js +0 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +0 -2
- package/widgets/Feature/support/featureUtils.js +0 -2
- package/widgets/Feature/support/relatedFeatureUtils.js +0 -2
- /package/assets/esri/core/workers/chunks/{75e28458e08b0738b35a.js.LICENSE.txt → ab223c508f3dd562e7d3.js.LICENSE.txt} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type Accessor from "../../core/Accessor.js";
|
|
2
2
|
import type TraceConfiguration from "./TraceConfiguration.js";
|
|
3
|
+
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
3
4
|
import type { MultiOriginJSONSupportMixin } from "../../core/MultiOriginJSONSupport.js";
|
|
4
5
|
import type { ResultType } from "./jsonTypes.js";
|
|
5
6
|
import type { TraceType } from "./typeUtils.js";
|
|
@@ -69,4 +70,4 @@ export default class NamedTraceConfiguration extends NamedTraceConfigurationSupe
|
|
|
69
70
|
*/
|
|
70
71
|
accessor traceType: TraceType | null | undefined;
|
|
71
72
|
}
|
|
72
|
-
declare const NamedTraceConfigurationSuperclass: typeof Accessor & typeof MultiOriginJSONSupportMixin
|
|
73
|
+
declare const NamedTraceConfigurationSuperclass: typeof Accessor & typeof MultiOriginJSONSupportMixin & typeof ClonableMixin
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as r}from"tslib";import e from"../../core/Accessor.js";import{
|
|
2
|
+
import{__decorate as r}from"tslib";import e from"../../core/Accessor.js";import{ClonableMixin as t}from"../../core/Clonable.js";import{MultiOriginJSONSupportMixin as i}from"../../core/MultiOriginJSONSupport.js";import{property as o,subclass as s}from"../../core/accessorSupport/decorators.js";import a from"./TraceConfiguration.js";import{traceTypeKebabDict as n}from"./typeUtils.js";import p from"./UNTraceConfiguration.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";let c=class extends(t(i(e))){constructor(r){super(r),this.globalId=null,this.title=null,this.traceConfiguration=null,this.creationDate=null,this.creator=null,this.description=null,this.minStartingPoints=null,this.resultTypes=[],this.tags=[],this.traceType=null}readTraceConfiguration(r,e){return void 0!==r.tierName?p.fromJSON(r):a.fromJSON(r)}};r([o({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"id"},write:{target:"id",isRequired:!0}},service:{read:{source:"globalId"},write:{target:"globalId",isRequired:!0}}},read:!1}})],c.prototype,"globalId",void 0),r([o({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"title"},write:{target:"title",isRequired:!0}},service:{read:{source:"name"},write:{target:"name",isRequired:!0}}},read:!1}})],c.prototype,"title",void 0),r([o({type:a,json:{origins:{service:{read:!0,write:!0}},read:!1}})],c.prototype,"traceConfiguration",void 0),r([d("service","traceConfiguration")],c.prototype,"readTraceConfiguration",null),r([o({type:Date,json:{origins:{service:{read:!0,write:!0}},read:!1}})],c.prototype,"creationDate",void 0),r([o({type:String,json:{origins:{service:{read:!0,write:!0}},read:!1}})],c.prototype,"creator",void 0),r([o({type:String,json:{origins:{service:{read:!0,write:!0}},read:!1}})],c.prototype,"description",void 0),r([o({type:["none","one","many"],json:{origins:{service:{read:{source:"minNumStartingPoints"},write:{target:"minNumStartingPoints"}}},read:!1}})],c.prototype,"minStartingPoints",void 0),r([o({json:{origins:{service:{read:!0,write:!0}},read:!1}})],c.prototype,"resultTypes",void 0),r([o({type:[String],json:{origins:{service:{read:!0,write:!0}},read:!1}})],c.prototype,"tags",void 0),r([o({type:n.apiValues,json:{type:n.jsonValues,origins:{service:{read:n.read,write:n.write}},read:!1}})],c.prototype,"traceType",void 0),c=r([s("esri.networks.support.NamedTraceConfiguration")],c);const l=c;export{l as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
1
2
|
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
2
3
|
import type { BarrierJSON, FunctionBarrierJSON, FunctionJSON, OutputConditionJSON } from "./jsonTypes.js";
|
|
3
4
|
|
|
@@ -18,7 +19,7 @@ export interface TraceConfigurationProperties extends Partial<Pick<TraceConfigur
|
|
|
18
19
|
* @see [Configure a trace](https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/configure-a-trace.htm)
|
|
19
20
|
* @see [Add Trace Configuration (Utility Network)](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm)
|
|
20
21
|
*/
|
|
21
|
-
export default class TraceConfiguration extends
|
|
22
|
+
export default class TraceConfiguration extends TraceConfigurationSuperclass {
|
|
22
23
|
constructor(properties?: TraceConfigurationProperties);
|
|
23
24
|
/** An array of objects representing network attribute or category conditions that serve as barriers. */
|
|
24
25
|
accessor conditionBarriers: BarrierJSON[];
|
|
@@ -61,4 +62,5 @@ export default class TraceConfiguration extends JSONSupport {
|
|
|
61
62
|
* trace results might not be consistent.
|
|
62
63
|
*/
|
|
63
64
|
accessor validateConsistency: boolean | null | undefined;
|
|
64
|
-
}
|
|
65
|
+
}
|
|
66
|
+
declare const TraceConfigurationSuperclass: typeof JSONSupport & typeof ClonableMixin
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as e,subclass as i}from"../../core/accessorSupport/decorators.js";let s=class extends(o(r)){constructor(t){super(t),this.conditionBarriers=[],this.outputConditions=[],this.functions=[],this.functionBarriers=[],this.traversabilityScope=null,this.shortestPathNetworkAttributeName=null,this.includeBarriers=null,this.validateConsistency=null,this.ignoreBarriersAtStartingPoints=null}};t([e({type:[Object],json:{write:!0}})],s.prototype,"conditionBarriers",void 0),t([e({type:[Object],json:{write:!0}})],s.prototype,"outputConditions",void 0),t([e({type:[Object],json:{write:!0}})],s.prototype,"functions",void 0),t([e({type:[Object],json:{write:!0}})],s.prototype,"functionBarriers",void 0),t([e({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],s.prototype,"traversabilityScope",void 0),t([e({type:String,json:{write:!0}})],s.prototype,"shortestPathNetworkAttributeName",void 0),t([e({type:Boolean,json:{write:!0}})],s.prototype,"includeBarriers",void 0),t([e({type:Boolean,json:{write:!0}})],s.prototype,"validateConsistency",void 0),t([e({type:Boolean,json:{write:!0}})],s.prototype,"ignoreBarriersAtStartingPoints",void 0),s=t([i("esri.networks.support.TraceConfiguration")],s);const n=s;export{n as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.60",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@amcharts/amcharts5": "~5.16.2",
|
|
22
|
-
"@arcgis/toolkit": "^5.1.0-next.
|
|
22
|
+
"@arcgis/toolkit": "^5.1.0-next.61",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
24
|
"@esri/calcite-components": "^5.0.2",
|
|
25
25
|
"@vaadin/grid": "~25.1.0",
|
|
@@ -0,0 +1,250 @@
|
|
|
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 { IdentifiableMixin, IdentifiableMixinProperties } from "../core/Identifiable.js";
|
|
7
|
+
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
|
|
8
|
+
import type { Abilities, FeatureFormattedAttributes, LastEditInfo, PopupTemplateContentResolved, RelatedInfo, State } from "./types.js";
|
|
9
|
+
import type { TimeZone } from "../time/types.js";
|
|
10
|
+
import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
|
|
11
|
+
import type { GraphicProperties } from "../Graphic.js";
|
|
12
|
+
import type { PointProperties } from "../geometry/Point.js";
|
|
13
|
+
|
|
14
|
+
export interface FeatureProperties extends IdentifiableMixinProperties, Partial<Pick<Feature, "abilities" | "defaultPopupTemplateEnabled" | "map" | "view">> {
|
|
15
|
+
/**
|
|
16
|
+
* The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
|
|
17
|
+
*
|
|
18
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
19
|
+
* @example
|
|
20
|
+
* let graphic = new Graphic({
|
|
21
|
+
* geometry: view.center,
|
|
22
|
+
* attributes: {
|
|
23
|
+
* "name": "Spruce",
|
|
24
|
+
* "family": "Pinaceae",
|
|
25
|
+
* "count": 126
|
|
26
|
+
* },
|
|
27
|
+
* symbol: new SimpleMarkerSymbol({
|
|
28
|
+
* style: "square",
|
|
29
|
+
* color: "blue",
|
|
30
|
+
* size: "8px"
|
|
31
|
+
* }),
|
|
32
|
+
* popupTemplate: {
|
|
33
|
+
* content: [
|
|
34
|
+
* {
|
|
35
|
+
* // Set popup template content
|
|
36
|
+
* }
|
|
37
|
+
* ]
|
|
38
|
+
* }
|
|
39
|
+
* });
|
|
40
|
+
*/
|
|
41
|
+
graphic?: GraphicProperties | null;
|
|
42
|
+
/**
|
|
43
|
+
* The [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) representing the location of the
|
|
44
|
+
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) interaction used to trigger the opening of the widget.
|
|
45
|
+
*
|
|
46
|
+
* This value should be set when executing Arcade expressions in the Feature widget that
|
|
47
|
+
* expect the `$userInput` profile variable to have a value.
|
|
48
|
+
*
|
|
49
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
50
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
51
|
+
* @example
|
|
52
|
+
* view.on("click", (event) => {
|
|
53
|
+
* const { mapPoint } = event;
|
|
54
|
+
* feature.viewModel.location = mapPoint;
|
|
55
|
+
* });
|
|
56
|
+
*/
|
|
57
|
+
location?: PointProperties | null;
|
|
58
|
+
/**
|
|
59
|
+
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
|
|
60
|
+
* This property should be set if executing Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
|
|
61
|
+
*
|
|
62
|
+
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
63
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
64
|
+
*/
|
|
65
|
+
spatialReference?: SpatialReferenceProperties | null;
|
|
66
|
+
/**
|
|
67
|
+
* Dates and times displayed in the widget will be displayed in this time zone. By default this time zone is
|
|
68
|
+
* inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with the widget
|
|
69
|
+
* then the property will fallback to the `system` time zone.
|
|
70
|
+
*
|
|
71
|
+
* **Possible Values**
|
|
72
|
+
*
|
|
73
|
+
* Value | Description |
|
|
74
|
+
* ----- | ----------- |
|
|
75
|
+
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
76
|
+
* unknown | Dates and time are not adjusted for any timezone.
|
|
77
|
+
* 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).
|
|
78
|
+
*/
|
|
79
|
+
timeZone?: TimeZone | null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type PopupViewModelContent = PopupTemplateContentResolved;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @see [Feature component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/)
|
|
86
|
+
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
87
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
88
|
+
* @see [Arcade - expression language](https://developers.arcgis.com/javascript/latest/arcade/)
|
|
89
|
+
*/
|
|
90
|
+
export default class Feature extends FeatureSuperclass {
|
|
91
|
+
constructor(properties?: FeatureProperties);
|
|
92
|
+
/** Defines the specific [Abilities](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/types/#Abilities) that the [Feature](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/) and [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) widgets should use when querying and displaying its content. */
|
|
93
|
+
accessor abilities: Abilities;
|
|
94
|
+
/** The [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) of the feature. */
|
|
95
|
+
get content(): PopupViewModelContent | null | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Enables automatic creation of a popup template for layers that have popups enabled but no
|
|
98
|
+
* popupTemplate defined. Automatic popup templates are supported for layers that
|
|
99
|
+
* support the `createPopupTemplate` method. (Supported for
|
|
100
|
+
* [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
|
|
101
|
+
* [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
|
|
102
|
+
* [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/),
|
|
103
|
+
* [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
|
|
104
|
+
* [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
105
|
+
* [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/),
|
|
106
|
+
* [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), and
|
|
107
|
+
* [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)).
|
|
108
|
+
*
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
accessor defaultPopupTemplateEnabled: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
114
|
+
* content. They are obtained from the feature's [FeatureViewModel.graphic](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#graphic) attribute values
|
|
115
|
+
* and can be read:
|
|
116
|
+
* * globally using the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property
|
|
117
|
+
* directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), or
|
|
118
|
+
* * per an individual content element. This element is defined with a [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/)
|
|
119
|
+
* popup element set on the PopupTemplate [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) property.
|
|
120
|
+
*/
|
|
121
|
+
get formattedAttributes(): FeatureFormattedAttributes | null | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
|
|
124
|
+
*
|
|
125
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
126
|
+
* @example
|
|
127
|
+
* let graphic = new Graphic({
|
|
128
|
+
* geometry: view.center,
|
|
129
|
+
* attributes: {
|
|
130
|
+
* "name": "Spruce",
|
|
131
|
+
* "family": "Pinaceae",
|
|
132
|
+
* "count": 126
|
|
133
|
+
* },
|
|
134
|
+
* symbol: new SimpleMarkerSymbol({
|
|
135
|
+
* style: "square",
|
|
136
|
+
* color: "blue",
|
|
137
|
+
* size: "8px"
|
|
138
|
+
* }),
|
|
139
|
+
* popupTemplate: {
|
|
140
|
+
* content: [
|
|
141
|
+
* {
|
|
142
|
+
* // Set popup template content
|
|
143
|
+
* }
|
|
144
|
+
* ]
|
|
145
|
+
* }
|
|
146
|
+
* });
|
|
147
|
+
*/
|
|
148
|
+
get graphic(): Graphic | null | undefined;
|
|
149
|
+
set graphic(value: GraphicProperties | null | undefined);
|
|
150
|
+
/** Indicates whether the current FeatureViewModel's [FeatureViewModel.graphic](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#graphic) resides in a non-spatial table. */
|
|
151
|
+
get isFeatureFromTable(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* A read-only property containing metadata regarding the last edit performed on a feature.
|
|
154
|
+
* This object has the following properties:
|
|
155
|
+
*/
|
|
156
|
+
get lastEditInfo(): LastEditInfo | null | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* The [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) representing the location of the
|
|
159
|
+
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) interaction used to trigger the opening of the widget.
|
|
160
|
+
*
|
|
161
|
+
* This value should be set when executing Arcade expressions in the Feature widget that
|
|
162
|
+
* expect the `$userInput` profile variable to have a value.
|
|
163
|
+
*
|
|
164
|
+
* @see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content)
|
|
165
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
166
|
+
* @example
|
|
167
|
+
* view.on("click", (event) => {
|
|
168
|
+
* const { mapPoint } = event;
|
|
169
|
+
* feature.viewModel.location = mapPoint;
|
|
170
|
+
* });
|
|
171
|
+
*/
|
|
172
|
+
get location(): Point | null | undefined;
|
|
173
|
+
set location(value: PointProperties | null | undefined);
|
|
174
|
+
/**
|
|
175
|
+
* A map is required when the input [FeatureViewModel.graphic](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#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.
|
|
176
|
+
*
|
|
177
|
+
* Alternatively, the [FeatureViewModel.view](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#view) property can be used to provide the map instance for this property.
|
|
178
|
+
*
|
|
179
|
+
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
180
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
181
|
+
* @example
|
|
182
|
+
* // The building footprints represent the buildings that intersect a clicked parcel
|
|
183
|
+
* let buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints"));
|
|
184
|
+
*/
|
|
185
|
+
accessor map: EsriMap | null | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* A read-only map containing information about related features for the current feature.
|
|
188
|
+
* The keys are related layer IDs as strings, and the values are [RelatedInfo](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/types/#RelatedInfo) objects.
|
|
189
|
+
* This property is populated when the feature has related fields and is used to manage and display related feature information in the widget.
|
|
190
|
+
*/
|
|
191
|
+
get relatedInfos(): Map<string, RelatedInfo>;
|
|
192
|
+
/**
|
|
193
|
+
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
|
|
194
|
+
* This property should be set if executing Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
|
|
195
|
+
*
|
|
196
|
+
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
|
|
197
|
+
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
|
|
198
|
+
*/
|
|
199
|
+
get spatialReference(): SpatialReference | null | undefined;
|
|
200
|
+
set spatialReference(value: SpatialReferenceProperties | null | undefined);
|
|
201
|
+
/**
|
|
202
|
+
* The view model's state.
|
|
203
|
+
*
|
|
204
|
+
* @default "disabled"
|
|
205
|
+
*/
|
|
206
|
+
get state(): State;
|
|
207
|
+
/**
|
|
208
|
+
* Dates and times displayed in the widget will be displayed in this time zone. By default this time zone is
|
|
209
|
+
* inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with the widget
|
|
210
|
+
* then the property will fallback to the `system` time zone.
|
|
211
|
+
*
|
|
212
|
+
* **Possible Values**
|
|
213
|
+
*
|
|
214
|
+
* Value | Description |
|
|
215
|
+
* ----- | ----------- |
|
|
216
|
+
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
217
|
+
* unknown | Dates and time are not adjusted for any timezone.
|
|
218
|
+
* 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).
|
|
219
|
+
*/
|
|
220
|
+
get timeZone(): TimeZone;
|
|
221
|
+
set timeZone(value: TimeZone | null | undefined);
|
|
222
|
+
/**
|
|
223
|
+
* The title for the feature.
|
|
224
|
+
*
|
|
225
|
+
* @default ""
|
|
226
|
+
*/
|
|
227
|
+
get title(): string;
|
|
228
|
+
/**
|
|
229
|
+
* 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/). Set this to link the widget to a specific view.
|
|
230
|
+
*
|
|
231
|
+
* > [!WARNING]
|
|
232
|
+
* >
|
|
233
|
+
* > The FeatureViewModel requires a view if the user expects it to display content in any of the following situations:
|
|
234
|
+
* > - The [FeatureViewModel.graphic](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#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).
|
|
235
|
+
* > - 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/)).
|
|
236
|
+
* > - 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).
|
|
237
|
+
*/
|
|
238
|
+
accessor view: MapViewOrSceneView | null | undefined;
|
|
239
|
+
/** Indicates whether the feature is currently waiting for all of its content to finish loading. */
|
|
240
|
+
get waitingForContent(): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Fetches the geometry of the [FeatureViewModel.graphic](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#graphic) if the geometry does not exist.
|
|
243
|
+
* This method can be called to ensure the [graphic's](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#graphic) geometry is available when the geometry is necessary
|
|
244
|
+
* to take action such as calling [View2D.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#goTo) with the graphic as the `target`.
|
|
245
|
+
*
|
|
246
|
+
* @returns A promise that resolves when the geometry has been updated.
|
|
247
|
+
*/
|
|
248
|
+
updateGeometry(): Promise<void>;
|
|
249
|
+
}
|
|
250
|
+
declare const FeatureSuperclass: typeof Accessor & typeof IdentifiableMixin
|
package/popup/Feature.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/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,cast as y,subclass as _}from"../core/accessorSupport/decorators.js";import v from"../geometry/Point.js";import b from"../geometry/SpatialReference.js";import{getGraphicLayer as T}from"../graphic/graphicOriginUtils.js";import I from"./content/TextContent.js";import{compileExpressionInfos as A,formatArcadeValue as x}from"./support/arcadeFeatureUtils.js";import{preLayerQueryCallback as C,preRequestCallback as E,createFieldInfoMap as w,getAllFieldInfos as k,querySourceLayer as F,queryUpdatedFeature as j,isRelatableFeatureSupportedLayer as P,isAssociatedFeatureSupportedLayer as R,formatEditInfo as O,substituteFieldsInLinksAndAttributes as M,graphicCallback as Z,formatAttributes as U,isRelatedField as L}from"./support/featureUtils.js";import{queryLayerInfos as N,queryRelatedFeatures as S,setRelatedFeatures as G,getRelatedFieldInfo as q,createRelatedInfo as H,updateRelatedInfo as z}from"./support/relatedFeatureUtils.js";import{system as B}from"../time/constants.js";var Q;const D=1,J={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0,relationshipContent:!0,utilityNetworkAssociationsContent:!0};let K=class extends(a(r)){static{Q=this}constructor(t){super(t),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._expressionAttributes=null,this._graphicExpressionAttributes=null,this.abilities={...J},this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.title="",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.graphic,this._effectivePopupTemplate,this.abilities,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(C,E)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return w(k(this._effectivePopupTemplate),this._layer)}get _layer(){const{graphic:t}=this;return t?T(t):void 0}castAbilities(t){return{...J,...t}}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||!i)return;const s=t?.attributes?.[r];if(null==s)return;const o=[s];if(!t.geometry){const r=await F({layer:i,graphic:t,outFields:[],objectIds:o,returnGeometry:!0,spatialReference:e}),s=r?.geometry;s&&(t.geometry=s)}}_clear(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",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}),A(r?.expressionInfos,e)]);return{expressionInfos:n,content:o,title: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 I({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}_compileTitle(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({title: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?x(t):t]).catch(()=>[e,void 0])):t.push(Promise.resolve([e,void 0]));n=Object.fromEntries(await Promise.all(t)),c(r)}this._expressionAttributes=n,this._graphicExpressionAttributes={...s.attributes,...n},this._set("formattedAttributes",this._createFormattedAttributes(e)),this._set("title",this._compileTitle(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,k(i),t)}async _queryRelatedInfos(t,e,i){const{relatedInfos:r,_layer:s}=this;r.clear();const o=null!=s?.associatedLayer?await(s?.associatedLayer.load(i)):s;if(!o||!t)return;const a=e.filter(t=>!!t.fieldName&&L(t.fieldName));if(!a?.length)return;e.forEach(t=>this._configureRelatedInfo(t,o));const n=await N({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 S({graphic:t,relatedInfos:r,layer:o},i);Object.keys(l).forEach(t=>{G(l[t]?.value,r.get(t.toString()))})}_configureRelatedInfo(t,e){const{relatedInfos:i}=this,r=q(t.fieldName||"");if(!r)return;const{layerId:s,fieldName:o}=r;if(!s)return;const a=i.get(s.toString())||H(s,e);a&&(z({relatedInfo:a,fieldName:o,fieldInfo:t}),this.relatedInfos.set(s,a))}};t([g()],K.prototype,"_error",void 0),t([g()],K.prototype,"_graphicChangedTask",void 0),t([g()],K.prototype,"_evaluateExpressionAttributesTask",void 0),t([g({readOnly:!0})],K.prototype,"_effectivePopupTemplate",null),t([g({readOnly:!0})],K.prototype,"_fieldInfoMap",null),t([g({readOnly:!0})],K.prototype,"_layer",null),t([g()],K.prototype,"abilities",void 0),t([y("abilities")],K.prototype,"castAbilities",null),t([g({readOnly:!0})],K.prototype,"content",void 0),t([g()],K.prototype,"description",void 0),t([g({type:Boolean})],K.prototype,"defaultPopupTemplateEnabled",void 0),t([g({readOnly:!0})],K.prototype,"isFeatureFromTable",null),t([g({readOnly:!0})],K.prototype,"state",null),t([g({readOnly:!0})],K.prototype,"formattedAttributes",void 0),t([g({type:e})],K.prototype,"graphic",void 0),t([g({readOnly:!0})],K.prototype,"lastEditInfo",void 0),t([g({type:v})],K.prototype,"location",void 0),t([g({readOnly:!0})],K.prototype,"relatedInfos",void 0),t([g({type:b})],K.prototype,"spatialReference",null),t([g()],K.prototype,"timeZone",null),t([g({readOnly:!0})],K.prototype,"title",void 0),t([g()],K.prototype,"map",null),t([g({readOnly:!0})],K.prototype,"waitingForContent",null),t([g()],K.prototype,"view",void 0),K=Q=t([_("esri.popup.Feature")],K);const V=K;export{V as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as r}from"tslib";import{isSupportedLayer as t}from"../../arcade/featureset/support/shared.js";import a from"../../core/Logger.js";import{sqlAnd as i}from"../../core/sql.js";import{getGraphicLayer as n}from"../../graphic/graphicOriginUtils.js";import{isImageryGraphicOrigin as o}from"../../graphic/isImageryGraphicOrigin.js";import{isImageryTileGraphicOrigin as s}from"../../graphic/isImageryTileGraphicOrigin.js";import c from"../../layers/FeatureLayer.js";import{internalTimeReceivedField as l}from"../../layers/support/streamLayerUtils.js";import{applyTextFormattingHTML as u,htmlEntities as p}from"./featureUtils.js";import{isDate as d}from"../../support/guards.js";const f="esri.popup.support.arcadeFeatureUtils",m=()=>a.getLogger(f);function y(e){return u(p(e))}function g(e){return"createQuery"in e&&"queryFeatures"in e}async function w({graphic:e,view:r,options:t}){const{isAggregate:a}=e,i=n(e);if(!a||!i||"2d"!==r?.type)return[];const o=await r.whenLayerView(i);if(!g(o))return[];const s=o.createQuery(),c=e.getObjectId();s.aggregateIds=null!=c?[c]:[];const{features:l}=await o.queryFeatures(s,t);return l}function h({layer:e,aggregatedFeatures:r,interceptor:t}){const{fields:a,objectIdField:i,geometryType:n,spatialReference:o}=e,s="displayField"in e?e.displayField:void 0;return new c({fields:a,objectIdField:i,geometryType:n,spatialReference:o,displayField:s,interceptor:t,..."feature"===e.type?{templates:e.templates,typeIdField:e.typeIdField,types:e.types}:null,source:r})}function v(e){return e.isAggregate?"popup-feature-reduction":"esri.views.3d.layers.VoxelGraphic"===e.declaredClass?"popup-voxel":o(e.origin)||s(e.origin)?"popup-imagery":"popup"}function x(e){return{scale:e?.scale,timeProperties:{currentStart:e?.timeExtent?.start,currentEnd:e?.timeExtent?.end,startIncluded:!0,endIncluded:!0}}}function b(e){return{$voxel:e}}function F(e,r,t){let a=null;if(null!=e){const r=e.origin.layer;if("imagery"===r.type&&"mosaic-dataset"===r.sourceType){a=e.cloneShallow();const r=e.origin.layer.fieldsIndex;a.attributes=Object.fromEntries(Object.entries(a.attributes??{}).filter(([e])=>r.has(e)))}}return{$pixel:e,$imageCollectionItem:a,$userInput:r,$view:x(t)}}async function I(e,r,t,a,i,o,s){let c=null;if(o.has("$aggregatedfeatures")){const e=await w({graphic:r,view:t,options:a}),o=n(r);c=h({layer:o,aggregatedFeatures:e,interceptor:i})}return{vars:{$feature:r,$aggregatedFeatures:c,$view:x(t)},track:s?await j(e,r,t):null,[Symbol.dispose]:()=>c?.[Symbol.dispose]()}}function $(e){if(d(e))return e.getTime();if("number"==typeof e)return e;if("string"==typeof e)return new Date(e).getTime();throw new Error(`Unexpected time value: ${e}`)}async function j(e,r,t){const a=n(r);if(null==a)return null;const o=a.timeInfo?.trackIdField;if(null==o)return null;const s=r.getAttribute(o);if(null==s)return null;let c;if("string"==typeof s)c=`"${o.replaceAll('"','""')}" = '${s.replaceAll("'","''")}'`;else{if("number"!=typeof s)return m().warn("Expected track id to be a string or number"),null;c=`"${o.replaceAll('"','""')}" = ${s}`}let u=[];if("stream"===a.type&&null!=t){const e=await t.whenLayerView(a),r=e.createQuery();r.returnGeometry=!0,r.where=i(r.where,c),u=(await e.queryFeatures(r)).features}else{const e=a.createQuery();e.returnGeometry=!0,e.where=i(e.where,c),u=(await a.queryFeatures(e)).features}const p=a.fieldsIndex.normalizeFieldName(a.timeInfo.startField)??l,d=a.timeInfo.endField?a.fieldsIndex.normalizeFieldName(a.timeInfo.endField):null,f=u.map(r=>{const a=r.getObjectId();if(null==a)throw new Error("Cannot identify observation");const i=e.ArcadeFeature.createFromGraphic(r,t?.timeZone),n=$(r.getAttribute(p));return{id:a,feature:i,startTime:n,endTime:null!=d?$(r.getAttribute(d)):n,stats:{totalDistance:void 0,distance:void 0,speed:void 0,acceleration:void 0}}}).sort((e,r)=>e.startTime-r.startTime),y="esri.TrackGraphic"===r.declaredClass?f.length-1:f.findIndex(e=>r.getObjectId()===e.id);if(y<0)throw new Error("Couldn't locate feature in observations");return{observations:f,currentObservationIndex:y}}async function T(e,r,a,i,o,s){const c=n(r);return{vars:{$feature:r,$layer:null!=c&&t(c)?c:"scene"===c?.type&&null!=c.associatedLayer&&t(c.associatedLayer)?c.associatedLayer:void 0,$map:a,$datastore:null!=c&&"string"==typeof c.url?c.url:void 0,$userInput:i,$graph:"knowledge-graph-sublayer"===c?.type?c.parentCompositeLayer?.knowledgeGraph:void 0,$view:x(o)},track:s?await j(e,r,o):null}}async function k(e,{arcade:r,graphic:t,map:a,location:i,view:n,options:o,interceptor:s,arcadeExecutor:c,usesTrack:l}){switch(e){case"popup":return{...await T(r,t,a,i,n,l),[Symbol.dispose](){}};case"popup-feature-reduction":{const e=new Set(c.variablesUsed);return await I(r,t,n,o,s,e,l)}case"popup-voxel":return{vars:b(t),track:null,[Symbol.dispose](){}};case"popup-imagery":return{vars:F(t,i,n),track:null,[Symbol.dispose](){}};default:throw new Error(`Unexpected profile name ${e}`)}}async function E(){const[e,r,{Feature:t}]=await Promise.all([import("../../arcade.js"),import("../../arcade/arcade.js"),import("../../arcade/Feature.js")]);return{executor:e,syntaxUtils:r,ArcadeFeature:t}}async function A(t,a,i){const{executor:{createArcadeProfile:n,createArcadeExecutor:o},syntaxUtils:s}=i,c=v(a),l=n(c);let u;try{u=await o(t,l)}catch(f){return m().error("arcade-executor-error",{error:f,expression:t}),null}const p=new Set;u.variablesUsed.includes("$view")&&(s.scriptUsesViewProperties(u.syntaxTree,["scale"])&&p.add("view-scale"),s.scriptUsesViewProperties(u.syntaxTree,["timeProperties"])&&p.add("view-time-extent"));const d=s.scriptUsesTrack(u.syntaxTree);return{dependencies:p,async evaluate({graphic:a,interceptor:n,location:o,map:s,options:l,spatialReference:p,view:y}){const g={stack:[],error:void 0,hasError:!1};try{const r=e(g,await k(c,{arcade:i,graphic:a,map:s,location:o,view:y,options:l,interceptor:n,arcadeExecutor:u,usesTrack:d}),!1),w={abortSignal:l?.signal??void 0,interceptor:n??void 0,rawOutput:!0,spatialReference:p??void 0,timeZone:y?.timeZone,track:r.track,console(...e){m().info(...e)}};try{return await u.executeAsync(r.vars,w)}catch(f){if(l?.signal?.aborted)return;return void m().error("arcade-execution-error",{error:f,graphic:a,expression:t})}}catch(w){g.error=w,g.hasError=!0}finally{r(g)}}}}async function U({expression:e,graphic:r}){return e?A(e,r,await E()):null}async function S(e,r){if(!e?.length)return{dependencies:new Set,expressions:new Map};const t=await E(),a=new Set,i=new Map;for(const n of e){const e=await A(n.expression,r,t);i.set(`expression/${n.name}`,e),e?.dependencies.forEach(e=>a.add(e))}return{dependencies:a,expressions:i}}export{U as compileExpression,S as compileExpressionInfos,y as formatArcadeValue,F as prepareImageryPopupArgs};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import e from"../../core/Logger.js";import{replace as t}from"../../core/string.js";import{getGraphicLayer as n}from"../../graphic/graphicOriginUtils.js";import{formatDate as r,convertDateFormatToIntlOptions as i}from"../../intl/date.js";import{convertNumberFieldFormatToIntlOptions as o,convertNumberFormatToIntlOptions as a,formatNumber as l}from"../../intl/number.js";import{fieldFormatFromFieldInfo as u}from"../../layers/support/fieldFormatUtils.js";import{isRasterPixelValueField as s,featureHasFields as f,isTimeOnlyField as d}from"../../layers/support/fieldUtils.js";import{getFieldConfigurationsContainer as c,getEffectiveLayerCapabilities as p}from"../../layers/support/layerUtils.js";import{formatAnyDate as y,isAnyDateField as m}from"../../smartMapping/support/utils.js";import{loadArcade as g}from"../../support/loadArcade.js";import{getTimeZoneFormattingOptions as I}from"../../time/timeZoneUtils.js";const b="esri.popup.support.featureUtils",h=()=>e.getLogger(b),F=/href=(""|'')/gi,T=/(\{([^{\r\n]+)\})/g,w=/'/g,N=/^\s*expression\//i,C=/(\n)/gi,j=/[\u00A0-\u9999<>&]/gim,Z=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,v=/^(?:mailto:|tel:)/,L="relationships/",U=i("short-date-short-time");function q(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function x({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void h().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function A(e=""){if(e)return!v.test(e.trim().toLowerCase())}function E(e){return!!e&&N.test(e)}function M(e,t){if(!t||!E(t)||!e)return;const n=t.replace(N,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function k(e){const{fieldInfo:t,graphic:n,layer:r}=e;return R({fieldInfo:t,graphic:n})?c(r,{graphic:n}):null}function R({fieldInfo:e,graphic:t}){return!(!e?.fieldName||E(e.fieldName)||Te(e.fieldName)||t?.popupTemplate)}function $({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;const o=M(e,t.fieldName);if(o)return o.title||null;const a=k({fieldInfo:t,graphic:n,layer:i});if(a){const e=a.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function D(e){const{configurableFieldsContainer:t,fieldInfo:n,isContentFieldInfos:r}=e;if(!n?.fieldName)return null;const i=t.popupTemplate||t.fieldConfigurations?t.getFieldConfiguration(n.fieldName)?.fieldFormat:u(n,t.getField(n.fieldName));return r&&n.fieldFormat||i}function z(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}function O(e){return e.replaceAll(F,"")}function S(e,t){const n=Q(t,e);return n?n.name:e}function G(e,t){return e&&e.map(e=>S(e,t))}function Q(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function P(e){return`${e}`.trim()}function _({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:o}){return r?H({formattedAttributes:t,template:V(r,{...t,...i,...e},n),fieldInfoMap:o}):""}function H({formattedAttributes:e,template:n,fieldInfoMap:r}){return P(O(t(t(n,e=>z(e,r)),e)))}function W(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",o=(n?encodeURIComponent(r):r).replaceAll(w,i);t[e]=o}}function B(e,t=!1){const n={...e};return Object.keys(n).forEach(e=>W(e,n,t)),n}function J(e,n,r){const i=(n=P(n))&&!n.startsWith("{");return t(e,B(r,i||!1))}function K(e,t){return e.replaceAll(T,(e,n,r)=>{const i=Q(t,r);return i?`{${i.name}}`:n})}function V(e,t,n){const r=K(e,n);return r?r.replaceAll(Z,(e,n,r)=>J(e,n||r,t)):r}function X(e,t){const n="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&n){const t=Number(e);if(!isNaN(t))return t}return e}function Y(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function ee(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function te(e){return Y(e)&&ee(e)}function ne(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function re(e){if(!e||"object"!=typeof e)return!1;return te(n(e))}function ie(e,t){const{fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:u,layer:f,preventPlacesFormatting:d,timeZone:c}=t,p=le(n,r),m=k({fieldInfo:p,graphic:i,layer:f}),g=Q(m||f,r),I=m?null:p?.format,b=m?D({configurableFieldsContainer:m,fieldInfo:p,isContentFieldInfos:u}):null,h="number"===b?.type;if(p&&!s(r)){const t=g?.type,n="date-time"===b?.type,r=I?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n||r)return y(e,{format:n?void 0:r,fieldFormat:n?b:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:f&&"preferredTimeZone"in f?f.preferredTimeZone:null,viewTimeZone:c,datesInUnknownTimezone:!(!f||!("datesInUnknownTimezone"in f))&&!!f.datesInUnknownTimezone}})}if("string"==typeof e&&s(r)&&I)return oe(e,I);if("string"==typeof(e=X(e,{format:h?void 0:I,fieldFormat:h?b:void 0}))||null==e||null==I&&null==b)return ye(e);const F=h?o(b):I?a(I):void 0;return l(e,d?{...F,minimumFractionDigits:0,maximumFractionDigits:20}:F)}function oe(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?ae(e,",",", ",t):e.includes(";")?ae(e,";","; ",t):e.includes(" ")?ae(e," "," ",t):l(Number(e),a(t))}function ae(e,t,n,r){return e.trim().split(t).map(e=>l(Number(e),a(r))).join(n)}function le(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function ue({fieldName:e,graphic:t,layer:n}){if(Te(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}function se({fieldName:e,value:t,graphic:n,layer:r}){if(Te(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n});return i&&"coded-value"===i.type?i.getName(t):null}function fe(e,t,n,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=I(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,n,U,"date"),f={...U,...s},d=t[u];if("number"==typeof d){const e=t[l];return{type:"edit",date:r(d,f),user:e}}const c=t[a];if("number"==typeof c){const e=t[o];return{type:"create",date:r(c,f),user:e}}return null}function de(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=S(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function ce(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach(e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}}),t):t}function pe(e){return e.replaceAll(j,e=>`&#${e.charCodeAt(0)};`)}function ye(e){return"string"==typeof e?e.replaceAll(C,'<br class="esri-text-new-line" />'):e}function me(e){const{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l,value:u}=e;if(null==u)return"";const s=se({fieldName:r,value:u,graphic:i,layer:a});if(s)return s;const f=ue({fieldName:r,graphic:i,layer:a});if(f)return f;if(t.get(r.toLowerCase()))return ie(u,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l});const c=a?.fieldsIndex?.get(r);return c&&(m(c)||d(c))?y(u,{fieldType:c.type,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a))&&!!a.datesInUnknownTimezone}}):ye(u)}function ge({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:o,relatedInfos:a,timeZone:l}){const u={};return a?.forEach(e=>Ce({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:o,timeZone:l})),e&&Object.keys(e).forEach(a=>{const s=e[a];u[a]=me({fieldInfoMap:t,fieldInfos:n,fieldName:a,graphic:r,isContentFieldInfos:i,layer:o,timeZone:l,value:s})}),u}async function Ie(e,t){const{layer:n,graphic:r,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return h().warn(e,t),null}if(!p(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:a};return h().warn(e,t),null}const s=n.createQuery();s.objectIds=o,s.outFields=i?.length?i:[n.objectIdField],s.returnGeometry=!!a,s.returnZ=!!a,s.returnM=!!a,s.outSpatialReference=l;return(await n.queryFeatures(s,t)).features[0]}async function be(e){if(!e.expressionInfos?.length)return!1;const t=await g(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}async function he(e){if(!e.expressionInfos?.length)return!1;const t=await g(),{arcadeUtils:{requiresTrack:n}}=t;return n(e)}async function Fe({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const o=n.objectIdField,a=e.attributes[o];if(null==a)return;const l=[a],u=new Set(await t.getRequiredFields(n.fieldsIndex));null==n.timeInfo?.trackIdField||u.has(n.timeInfo.trackIdField)||await he(t)&&u.add(n.timeInfo.trackIdField);const s=f(e,u),d=s?[]:u.has(o)?[...u]:[...u,o],c=t.returnGeometry||await be(t);if(s&&!c)return;const p=await Ie({layer:n,graphic:e,outFields:d,objectIds:l,returnGeometry:c,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function Te(e=""){return!!e&&e.includes(L)}function we(e){return e?`${L}${e.layerId}/${e.fieldName}`:""}function Ne({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&n&&Object.keys(t.attributes).forEach(l=>{const u=we({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=me({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})})}function Ce({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach(a=>Ne({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})),t.relatedStatsFeatures?.forEach(a=>Ne({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})))}const je=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},Ze=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,o=null!=n.geometry?n.geometry:null;je(r)||je(i)||"extent"===o?.type||"tile"===n.resultType||(n.cacheHint=!0)},ve=({query:e,layer:t,method:n})=>{Ze({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Le=({queryPayload:e,layer:t,method:n})=>{Ze({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function Ue(e,t,n){return e&&t&&n?"sublayer"===t.type?Ae({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||Ae({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):Ae({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||Ae({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function qe(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function xe(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function Ae({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const n=Ae({layers:o.sublayers,map:e,relatedLayer:r,relationship:t})||Ae({layers:o.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!te(o))continue;if("sublayer"===r.type){if(o!==r&&o.id===n)return o.isTable?xe(e,o):o;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==o.type){if(o!==r&&o.url===i&&o.layerId===n)return o}else if(o!==r&&o.layer?.url===i&&o.id===n)return o.isTable?xe(e,o):o}return null}export{ye as applyTextFormattingHTML,de as createFieldInfoMap,Ue as findRelatedLayer,qe as findUtilityNetwork,K as fixTokens,ge as formatAttributes,fe as formatEditInfo,ie as formatValueToFieldInfo,ce as getAllFieldInfos,k as getConfigurableFieldsContainer,D as getFieldFormat,le as getFieldInfo,$ as getFieldInfoLabel,S as getFixedFieldName,G as getFixedFieldNames,q as getSourceLayer,x as graphicCallback,pe as htmlEntities,ne as isAssociatedFeatureSupportedLayer,E as isExpressionField,Y as isFeatureSupportedLayer,re as isGraphicForRelatableFeatureSupportedLayer,te as isRelatableFeatureSupportedLayer,ee as isRelatableLayer,Te as isRelatedField,ve as preLayerQueryCallback,Le as preRequestCallback,Ie as querySourceLayer,Fe as queryUpdatedFeature,A as shouldOpenInNewTab,H as substituteAttributes,_ as substituteFieldsInLinksAndAttributes};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import e from"../../request.js";import{unique as t}from"../../core/arrayUtils.js";import r from"../../core/Error.js";import i from"../../core/Logger.js";import{whenOrAbort as o,eachAlways as s}from"../../core/promiseUtils.js";import{isNumericField as n}from"../../layers/support/fieldUtils.js";import{isRelatedField as l}from"./featureUtils.js";import{executeQueryJSON as a}from"../../rest/query/executeQueryJSON.js";import u from"../../rest/support/Query.js";import c from"../../rest/support/RelationshipQuery.js";import f from"../../rest/support/StatisticDefinition.js";const d="esri.popup.support.relatedFeatureUtils",p=()=>i.getLogger(d),m=new Map;function h(e){if(!l(e))return null;const[t,r]=e.split("/").slice(1);return{layerId:t,fieldName:r}}function y(e,t){if(!t.relationships)return null;let r=null;const{relationships:i}=t;return i.some(t=>t.id===parseInt(e,10)&&(r=t,!0)),r}function I({originRelationship:e,relationships:t,layerId:r}){return t.find(({relatedTableId:t,id:i})=>`${t}`===r&&i===e?.id)??null}function F(e,t){const r=t.toLowerCase();for(const i in e)if(i.toLowerCase()===r)return e[i];return null}function b(e,t){const r=y(e,t);if(!r)return;return{url:`${t.url}/${r.relatedTableId}`,sourceSpatialReference:t.spatialReference,relation:r,relatedFields:[],outStatistics:[]}}function S(e,t){if(!t)return;if(!e)return;const{features:r,statsFeatures:i}=e,o=r?.value;t.relatedFeatures=o?o.features:[];const s=i?.value;t.relatedStatsFeatures=s?s.features:[]}function g(e,t,r,i){const o=new c;return o.outFields=["*"],o.relationshipId="number"==typeof t.id?t.id:parseInt(t.id,10),o.objectIds=[e.attributes[r.objectIdField]],o.gdbVersion=r.gdbVersion??null,o.historicMoment=r.historicMoment??null,r.queryRelatedFeatures?.(o,i)??Promise.resolve({})}function j(e,t,r){let i=0;const o=[];for(;i<t.length;)o.push(`${e} IN (${t.slice(i,r+i)})`),i+=r;return o.join(" OR ")}function w(e){return e?t(e):void 0}function R(e){return e?t(e,(e,t)=>JSON.stringify(e.toJSON())===JSON.stringify(t.toJSON())):void 0}async function $(e,t,r,i){const o=r.layerId.toString(),{layerInfo:l,relation:c,relatedFields:f,outStatistics:d,url:p,sourceSpatialReference:m}=t,h=w(f),y=R(d);if(!l||!c)return null;const b=I({originRelationship:c,relationships:l.relationships,layerId:o});if(b?.relationshipTableId&&b.keyFieldInRelationshipTable){const t=(await g(e,b,r,i))[e.attributes[r.objectIdField]];if(!t)return null;const o=t.features.map(e=>e.attributes[l.objectIdField]);if(y?.length&&l.supportsStatistics){const e=new u;e.where=j(l.objectIdField,o,1e3),e.outFields=h,e.outStatistics=y,e.sourceSpatialReference=m;const r={features:Promise.resolve(t),statsFeatures:a(p,e)};return s(r)}}const S=b?.keyField;if(S){const t=n(L(l.fields,S)),o=F(e.attributes,c.keyField),f=t?`${S}=${o}`:`${S}='${o}'`,d=r.historicMoment,I=r.gdbVersion,b=a(p,new u({where:f,outFields:h,sourceSpatialReference:m,historicMoment:d,gdbVersion:I}),i),g=!!y?.length&&l.supportsStatistics?a(p,new u({where:f,outFields:h,outStatistics:y,sourceSpatialReference:m}),i):null,j={features:b};return g&&(j.statsFeatures=g),s(j)}return null}function N(t,r){return e(t,{query:{f:"json"},signal:r?.signal})}function v({relatedInfos:e,layer:t},i){const n={};return e.forEach((e,i)=>{const{relation:o}=e;if(!o){const e=new r("editor:relation-required","A relation is required on a layer to retrieve related records.");throw p().error(e),e}const{relatedTableId:s}=o;if("number"!=typeof s){const e=new r("editor:related-table","A related table ID is required on a layer to retrieve related records.");throw p().error(e),e}const l=`${t.url}/${s}`,a=m.get(l),u=a??N(l);a||m.set(l,u),n[i]=u}),o(s(n),i)}function T({graphic:e,relatedInfos:t,layer:r},i){const o={};return t.forEach((t,s)=>{t.layerInfo&&(o[s]=$(e,t,r,i))}),s(o)}function q({relatedInfo:e,fieldName:t,fieldInfo:r}){if(e.relatedFields?.push(t),r.statisticType){const i=new f({statisticType:r.statisticType,onStatisticField:t,outStatisticFieldName:t});e.outStatistics?.push(i)}}function L(e,t){if(null!=e){t=t.toLowerCase();for(const r of e)if(r&&r.name.toLowerCase()===t)return r}return null}export{b as createRelatedInfo,I as getDestinationRelation,h as getRelatedFieldInfo,w as getUniqueOutFields,R as getUniqueOutStatistics,v as queryLayerInfos,T as queryRelatedFeatures,S as setRelatedFeatures,q as updateRelatedInfo};
|
package/popup/types.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type Graphic from "../Graphic.js";
|
|
|
2
2
|
import type Content from "./content/Content.js";
|
|
3
3
|
import type MapView from "../views/MapView.js";
|
|
4
4
|
import type SceneView from "../views/SceneView.js";
|
|
5
|
-
import type Widget from "../widgets/Widget.js";
|
|
6
5
|
import type { ScreenPoint } from "../core/types.js";
|
|
7
6
|
import type { ClickEvent } from "../views/input/types.js";
|
|
8
7
|
|
|
@@ -100,7 +99,7 @@ export type PopupTemplateContent = PopupTemplateContentResolved | PopupTemplateC
|
|
|
100
99
|
*
|
|
101
100
|
* @since 5.0
|
|
102
101
|
*/
|
|
103
|
-
export type PopupTemplateContentCreated = string | HTMLElement |
|
|
102
|
+
export type PopupTemplateContentCreated = string | HTMLElement | null | undefined;
|
|
104
103
|
|
|
105
104
|
/** @since 5.0 */
|
|
106
105
|
export type PopupTemplateContentCreator = PopupTemplateContentCreatorFunction | PopupTemplateContentCreatorPromise | PopupTemplateContentCreated;
|
|
@@ -164,4 +163,19 @@ export type PopupTemplateTitleFunction = (event: PopupTemplateCreatorEvent) => P
|
|
|
164
163
|
export type PopupTemplateTitlePromise = Promise<PopupTemplateTitleResolved>;
|
|
165
164
|
|
|
166
165
|
/** @since 5.0 */
|
|
167
|
-
export type PopupTemplateTitleResolved = string;
|
|
166
|
+
export type PopupTemplateTitleResolved = string;
|
|
167
|
+
|
|
168
|
+
/** @since 5.0 */
|
|
169
|
+
export type State = "disabled" | "ready" | "error" | "loading";
|
|
170
|
+
|
|
171
|
+
/** @since 5.0 */
|
|
172
|
+
export interface FeatureFormattedAttributes {}
|
|
173
|
+
|
|
174
|
+
/** @since 5.0 */
|
|
175
|
+
export interface LastEditInfo {}
|
|
176
|
+
|
|
177
|
+
/** @since 5.0 */
|
|
178
|
+
export interface RelatedInfo {}
|
|
179
|
+
|
|
180
|
+
/** @since 5.0 */
|
|
181
|
+
export interface Abilities {}
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const d="20260402",e="4dbcfd2cdba5e60069da28860df2e5eb82e58cdf";export{d as buildDate,e as commitHash};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type AttributeTableFieldOrder from "./support/FieldOrder.js";
|
|
2
2
|
import type { JSONSupport } from "../core/JSONSupport.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { AttributeTableElementUnion } from "./types.js";
|
|
4
4
|
import type { AttributeTableRelationshipElementProperties } from "./elements/AttributeTableRelationshipElement.js";
|
|
5
5
|
import type { AttributeTableGroupElementProperties } from "./elements/AttributeTableGroupElement.js";
|
|
6
6
|
import type { AttributeTableFieldElementProperties } from "./elements/AttributeTableFieldElement.js";
|
|
@@ -84,7 +84,7 @@ export default class AttributeTableTemplate extends JSONSupport {
|
|
|
84
84
|
* @see [AttributeTableFieldElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/)
|
|
85
85
|
* @see [AttributeTableGroupElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableGroupElement/)
|
|
86
86
|
*/
|
|
87
|
-
get elements():
|
|
87
|
+
get elements(): AttributeTableElementUnion[] | null | undefined;
|
|
88
88
|
set elements(value: ((AttributeTableAttachmentElementProperties & { type: "attachment" }) | (AttributeTableFieldElementProperties & { type: "field" }) | (AttributeTableGroupElementProperties & { type: "group" }) | (AttributeTableRelationshipElementProperties & { type: "relationship" }))[] | null | undefined);
|
|
89
89
|
/** An Array of [AttributeTableFieldOrder](https://developers.arcgis.com/javascript/latest/references/core/tables/support/FieldOrder/) objects indicating the records' sort order. */
|
|
90
90
|
get orderByFields(): AttributeTableFieldOrder[] | null | undefined;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type AttributeTableElement from "./AttributeTableElement.js";
|
|
2
2
|
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
3
|
+
import type { NestedAttributeTableElementUnion } from "../types.js";
|
|
3
4
|
import type { AttributeTableElementProperties } from "./AttributeTableElement.js";
|
|
4
|
-
import type { NestedAttributeTableElement } from "../support/tablesUtils.js";
|
|
5
|
-
import type { AttributeTableRelationshipElementProperties } from "./AttributeTableRelationshipElement.js";
|
|
6
|
-
import type { AttributeTableFieldElementProperties } from "./AttributeTableFieldElement.js";
|
|
7
|
-
import type { AttributeTableAttachmentElementProperties } from "./AttributeTableAttachmentElement.js";
|
|
8
5
|
|
|
9
|
-
export interface AttributeTableGroupElementProperties extends AttributeTableElementProperties {
|
|
10
|
-
/**
|
|
11
|
-
* An array of [field](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableRelationshipElement/), and [attachment](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/) elements to display as grouped.
|
|
12
|
-
*
|
|
13
|
-
* > [!WARNING]
|
|
14
|
-
* >
|
|
15
|
-
* > Nested group table elements are not supported.
|
|
16
|
-
*/
|
|
17
|
-
elements?: ((AttributeTableAttachmentElementProperties & { type: "attachment" }) | (AttributeTableFieldElementProperties & { type: "field" }) | (AttributeTableRelationshipElementProperties & { type: "relationship" }))[];
|
|
18
|
-
}
|
|
6
|
+
export interface AttributeTableGroupElementProperties extends AttributeTableElementProperties, Partial<Pick<AttributeTableGroupElement, "elements">> {}
|
|
19
7
|
|
|
20
8
|
/**
|
|
21
9
|
* An `AttributeTableGroupElement` table element defines a container that holds a set of
|
|
@@ -39,8 +27,7 @@ export default class AttributeTableGroupElement extends AttributeTableGroupEleme
|
|
|
39
27
|
* >
|
|
40
28
|
* > Nested group table elements are not supported.
|
|
41
29
|
*/
|
|
42
|
-
|
|
43
|
-
set elements(value: ((AttributeTableAttachmentElementProperties & { type: "attachment" }) | (AttributeTableFieldElementProperties & { type: "field" }) | (AttributeTableRelationshipElementProperties & { type: "relationship" }))[]);
|
|
30
|
+
accessor elements: NestedAttributeTableElementUnion[];
|
|
44
31
|
/** The type of the attribute table [element](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableElement/). */
|
|
45
32
|
get type(): "group";
|
|
46
33
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type AttributeTableFieldElement from "../elements/AttributeTableFieldElement.js";
|
|
3
|
-
import type AttributeTableRelationshipElement from "../elements/AttributeTableRelationshipElement.js";
|
|
1
|
+
import type { NestedAttributeTableElementUnion } from "../types.js";
|
|
4
2
|
|
|
5
|
-
/**
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated since version 5.1. Use [NestedAttributeTableElementUnion](https://developers.arcgis.com/javascript/latest/references/core/tables/types/#NestedAttributeTableElementUnion) instead.
|
|
5
|
+
* @since 5.0
|
|
6
|
+
*/
|
|
7
|
+
export type NestedAttributeTableElement = NestedAttributeTableElementUnion;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type AttributeTableAttachmentElement from "./elements/AttributeTableAttachmentElement.js";
|
|
2
|
+
import type AttributeTableFieldElement from "./elements/AttributeTableFieldElement.js";
|
|
3
|
+
import type AttributeTableGroupElement from "./elements/AttributeTableGroupElement.js";
|
|
4
|
+
import type AttributeTableRelationshipElement from "./elements/AttributeTableRelationshipElement.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Union of all attribute table elements.
|
|
8
|
+
*
|
|
9
|
+
* @since 5.1
|
|
10
|
+
*/
|
|
11
|
+
export type AttributeTableElementUnion = AttributeTableAttachmentElement | AttributeTableFieldElement | AttributeTableGroupElement | AttributeTableRelationshipElement;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Union of all attribute table elements that are nestable in a group element.
|
|
15
|
+
*
|
|
16
|
+
* @since 5.1
|
|
17
|
+
*/
|
|
18
|
+
export type NestedAttributeTableElementUnion = Exclude<AttributeTableElementUnion, AttributeTableGroupElement>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{loadLibtessF32 as e}from"../../../../../../../geometry/libtess.js";import{clipMarshall as t,triangulateSyncUnsafe as s}from"../../../mesh/templates/templateUtils.js";import{MeshWriter as r}from"../mesh/MeshWriter.js";class i extends r{async loadDependencies(){await Promise.all([super.loadDependencies(),e()])}_write(e,t,s){const r=s?.asOptimized()??t.readGeometryForDisplay(),i=this._clip(r);i&&(e.recordStart(this.instanceId,this.attributeLayout),this._writeGeometry(e,t,i
|
|
2
|
+
import{loadLibtessF32 as e}from"../../../../../../../geometry/libtess.js";import{clipMarshall as t,triangulateSyncUnsafe as s}from"../../../mesh/templates/templateUtils.js";import{MeshWriter as r}from"../mesh/MeshWriter.js";class i extends r{async loadDependencies(){await Promise.all([super.loadDependencies(),e()])}_write(e,t,s){const r=s?.asOptimized()??t.readGeometryForDisplay(),i=this._clip(r);i&&(e.recordStart(this.instanceId,this.attributeLayout),this._writeGeometry(e,t,i),e.recordEnd())}_clip(e){if(!e)return null;const s=this.hasEffects;return t(e,s?256:8)}_writeGeometry(e,t,r){r=r.justXY();const i=s(r);if(!i||!i.vertices.length)return;const o=this.createTesselationParams(t);this._writeVertices(e,t,i,o)}_writeVertices(e,t,s,r){const i=t.getDisplayId(),o=e.vertexCount(),n=this.hasEffects,{vertices:c,indices:a}=s;let l=0;if(a)for(const d of a){const t=c[2*d],s=c[2*d+1];n&&e.recordBounds(t,s,0,0),this._writeVertex(e,i,t,s,r),l++}else for(let d=0;d<c.length;d+=2){const t=Math.round(c[d]),s=Math.round(c[d+1]);n&&e.recordBounds(t,s,0,0),this._writeVertex(e,i,t,s,r),l++}e.indexEnsureSize(l);for(let d=0;d<l;d++)e.indexWrite(d+o)}}export{i as AFillMeshWriter};
|