@arcgis/core 4.32.0-next.20250211 → 4.32.0-next.20250212
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9a237b396518b1c67f19.js → 00780271be2fd6e298c1.js} +1 -1
- package/assets/esri/core/workers/chunks/0b8bf1966653c326e95a.js +1 -0
- package/assets/esri/core/workers/chunks/{a4a9b4f792d47566fbf4.js → 17213c3fc63f580e5b73.js} +1 -1
- package/assets/esri/core/workers/chunks/272662e4e28341419b4f.js +1 -0
- package/assets/esri/core/workers/chunks/{74844334b3a2100220fc.js → 37cfd102b6ab5b959f9d.js} +1 -1
- package/assets/esri/core/workers/chunks/3835c2884c55e73dc202.js +1 -0
- package/assets/esri/core/workers/chunks/{8ddd4e2e50b8206564a7.js → 3ebdd0701e77bb28c75d.js} +1 -1
- package/assets/esri/core/workers/chunks/4848a3e31632d15dc4ce.js +1 -0
- package/assets/esri/core/workers/chunks/{76794184ba8c2e66745e.js → 629f4621ba6ffdcaa2f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{c26ffbff1115e76bcb0f.js → 6c30a25adf22d73d4977.js} +1 -1
- package/assets/esri/core/workers/chunks/{50ae86c23efe709f41cc.js → 6fa1f1e431aae1794ce3.js} +1 -1
- package/assets/esri/core/workers/chunks/82facb23dfaba2819bc7.js +1 -0
- package/assets/esri/core/workers/chunks/8722d05ae9b0aa5162a4.js +1 -0
- package/assets/esri/core/workers/chunks/8de4280080296adb1757.js +1 -0
- package/assets/esri/core/workers/chunks/{1f443b99653708470f31.js → 96d7f47ea8fbf345101c.js} +1 -1
- package/assets/esri/core/workers/chunks/{df3d1a8d3f11d52eb30d.js → afdbdc1569b56489c14d.js} +1 -1
- package/assets/esri/core/workers/chunks/{89e3f7880abd014a62c0.js → b42d26123784997c66e8.js} +1 -1
- package/assets/esri/core/workers/chunks/de638753a30c9aa41bad.js +1 -0
- package/assets/esri/core/workers/chunks/{1cbeac3301b6943bb28a.js → fc07d47d44c04f123650.js} +1 -1
- package/assets/esri/themes/base/_core.scss +4 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +0 -5
- package/assets/esri/themes/base/widgets/_Editor.scss +1 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +80 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +14 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +41 -0
- package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -6
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Bufferer-B-V7yYm-.js +5 -0
- package/chunks/Distance2DCalculator-Coa0qAFt.js +5 -0
- package/chunks/Envelope.js +1 -1
- package/chunks/{GeodeticDistanceCalculator-BsWHOuqE.js → GeodeticDistanceCalculator-D4iQ-_NX.js} +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +2 -4
- package/chunks/distanceOperator.js +1 -1
- package/editing/templateUtils.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/interfaces.d.ts +91 -67
- package/layers/support/SubtypeSublayer.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/RulesTable.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/SceneView.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
- package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +5 -0
- package/widgets/Editor/AddAssociationWorkflowData.js +5 -0
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +5 -0
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +5 -0
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +5 -0
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +2 -2
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +5 -0
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0ac1399d252f2df670b6.js +0 -1
- package/assets/esri/core/workers/chunks/3d5442055e01493efcb2.js +0 -1
- package/assets/esri/core/workers/chunks/74f42e46bf551aab14dc.js +0 -1
- package/assets/esri/core/workers/chunks/9fb45c006d790273e8c1.js +0 -1
- package/assets/esri/core/workers/chunks/a6be1105a5e1f9597c5e.js +0 -1
- package/assets/esri/core/workers/chunks/d0e9874eb304010305c6.js +0 -1
- package/assets/esri/core/workers/chunks/d27a199fd8e2ade69254.js +0 -1
- package/assets/esri/core/workers/chunks/f9070edd8e0b2a57af79.js +0 -1
- package/chunks/Bufferer-DjC-SKTJ.js +0 -5
- package/chunks/Distance2DCalculator-8-JrFGHH.js +0 -5
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationSettings.js +0 -5
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +0 -4
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +0 -5
package/interfaces.d.ts
CHANGED
|
@@ -39956,6 +39956,13 @@ declare namespace __esri {
|
|
|
39956
39956
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#geometryType Read more...}
|
|
39957
39957
|
*/
|
|
39958
39958
|
readonly geometryType: "point" | "multipoint" | "polyline" | "polygon" | "multipatch" | "mesh" | nullish;
|
|
39959
|
+
/**
|
|
39960
|
+
* The name of an `guid` {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#fields field} containing
|
|
39961
|
+
* a unique value or identifier for each feature in the layer.
|
|
39962
|
+
*
|
|
39963
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#globalIdField Read more...}
|
|
39964
|
+
*/
|
|
39965
|
+
readonly globalIdField: string | nullish;
|
|
39959
39966
|
/**
|
|
39960
39967
|
* The unique ID assigned to the layer.
|
|
39961
39968
|
*
|
|
@@ -102917,6 +102924,13 @@ declare namespace __esri {
|
|
|
102917
102924
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html Read more...}
|
|
102918
102925
|
*/
|
|
102919
102926
|
constructor(properties?: AreaMeasurement2DProperties);
|
|
102927
|
+
/**
|
|
102928
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
102929
|
+
*
|
|
102930
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#snappingOptions Read more...}
|
|
102931
|
+
*/
|
|
102932
|
+
get snappingOptions(): SnappingOptions;
|
|
102933
|
+
set snappingOptions(value: SnappingOptionsProperties);
|
|
102920
102934
|
}
|
|
102921
102935
|
|
|
102922
102936
|
interface AreaMeasurement2DProperties extends WidgetProperties {
|
|
@@ -102932,6 +102946,12 @@ declare namespace __esri {
|
|
|
102932
102946
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#label Read more...}
|
|
102933
102947
|
*/
|
|
102934
102948
|
label?: string;
|
|
102949
|
+
/**
|
|
102950
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
102951
|
+
*
|
|
102952
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#snappingOptions Read more...}
|
|
102953
|
+
*/
|
|
102954
|
+
snappingOptions?: SnappingOptionsProperties;
|
|
102935
102955
|
/**
|
|
102936
102956
|
* Unit system (imperial, metric) or specific unit used for displaying the area values.
|
|
102937
102957
|
*
|
|
@@ -102998,6 +103018,13 @@ declare namespace __esri {
|
|
|
102998
103018
|
*/
|
|
102999
103019
|
view: MapView | nullish;
|
|
103000
103020
|
constructor(properties?: any);
|
|
103021
|
+
/**
|
|
103022
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
103023
|
+
*
|
|
103024
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D-AreaMeasurement2DViewModel.html#snappingOptions Read more...}
|
|
103025
|
+
*/
|
|
103026
|
+
get snappingOptions(): SnappingOptions;
|
|
103027
|
+
set snappingOptions(value: SnappingOptionsProperties);
|
|
103001
103028
|
/**
|
|
103002
103029
|
* Clears the current measurement.
|
|
103003
103030
|
*
|
|
@@ -103731,13 +103758,13 @@ declare namespace __esri {
|
|
|
103731
103758
|
*/
|
|
103732
103759
|
readonly state: "ready" | "disabled" | "loading" | "unsupported";
|
|
103733
103760
|
/**
|
|
103734
|
-
* The view from which the
|
|
103761
|
+
* The view from which the Basemap Gallery will operate.
|
|
103735
103762
|
*
|
|
103736
103763
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#view Read more...}
|
|
103737
103764
|
*/
|
|
103738
103765
|
view: MapView | SceneView | nullish;
|
|
103739
103766
|
/**
|
|
103740
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html BasemapGallery}
|
|
103767
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html BasemapGallery widget} and [component](/references/map-components/arcgis-basemap-gallery/).
|
|
103741
103768
|
*
|
|
103742
103769
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html Read more...}
|
|
103743
103770
|
*/
|
|
@@ -103750,7 +103777,7 @@ declare namespace __esri {
|
|
|
103750
103777
|
get activeBasemap(): Basemap | nullish;
|
|
103751
103778
|
set activeBasemap(value: BasemapProperties | nullish | string);
|
|
103752
103779
|
/**
|
|
103753
|
-
* The source for basemaps that the
|
|
103780
|
+
* The source for basemaps that the Basemap Gallery will display.
|
|
103754
103781
|
*
|
|
103755
103782
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#source Read more...}
|
|
103756
103783
|
*/
|
|
@@ -103775,13 +103802,13 @@ declare namespace __esri {
|
|
|
103775
103802
|
*/
|
|
103776
103803
|
activeBasemap?: BasemapProperties | nullish | string;
|
|
103777
103804
|
/**
|
|
103778
|
-
* The source for basemaps that the
|
|
103805
|
+
* The source for basemaps that the Basemap Gallery will display.
|
|
103779
103806
|
*
|
|
103780
103807
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#source Read more...}
|
|
103781
103808
|
*/
|
|
103782
103809
|
source?: LocalBasemapsSourceProperties | PortalBasemapsSourceProperties | Collection<Basemap> | Basemap[] | Portal;
|
|
103783
103810
|
/**
|
|
103784
|
-
* The view from which the
|
|
103811
|
+
* The view from which the Basemap Gallery will operate.
|
|
103785
103812
|
*
|
|
103786
103813
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#view Read more...}
|
|
103787
103814
|
*/
|
|
@@ -104621,13 +104648,13 @@ declare namespace __esri {
|
|
|
104621
104648
|
*/
|
|
104622
104649
|
readonly state: "ready" | "incompatible-next-basemap" | "loading" | "disabled";
|
|
104623
104650
|
/**
|
|
104624
|
-
* The view from which the widget will operate.
|
|
104651
|
+
* The view from which the component or widget will operate.
|
|
104625
104652
|
*
|
|
104626
104653
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle-BasemapToggleViewModel.html#view Read more...}
|
|
104627
104654
|
*/
|
|
104628
104655
|
view: MapView | SceneView | nullish;
|
|
104629
104656
|
/**
|
|
104630
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html BasemapToggle} widget.
|
|
104657
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-basemap-toggle/ Basemap Toggle} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html BasemapToggle} widget.
|
|
104631
104658
|
*
|
|
104632
104659
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle-BasemapToggleViewModel.html Read more...}
|
|
104633
104660
|
*/
|
|
@@ -104663,7 +104690,7 @@ declare namespace __esri {
|
|
|
104663
104690
|
*/
|
|
104664
104691
|
nextBasemap?: BasemapProperties | nullish | string;
|
|
104665
104692
|
/**
|
|
104666
|
-
* The view from which the widget will operate.
|
|
104693
|
+
* The view from which the component or widget will operate.
|
|
104667
104694
|
*
|
|
104668
104695
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle-BasemapToggleViewModel.html#view Read more...}
|
|
104669
104696
|
*/
|
|
@@ -108195,6 +108222,13 @@ declare namespace __esri {
|
|
|
108195
108222
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html Read more...}
|
|
108196
108223
|
*/
|
|
108197
108224
|
constructor(properties?: DistanceMeasurement2DProperties);
|
|
108225
|
+
/**
|
|
108226
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
108227
|
+
*
|
|
108228
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#snappingOptions Read more...}
|
|
108229
|
+
*/
|
|
108230
|
+
get snappingOptions(): SnappingOptions;
|
|
108231
|
+
set snappingOptions(value: SnappingOptionsProperties);
|
|
108198
108232
|
/**
|
|
108199
108233
|
* The view model for this widget.
|
|
108200
108234
|
*
|
|
@@ -108217,6 +108251,12 @@ declare namespace __esri {
|
|
|
108217
108251
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#label Read more...}
|
|
108218
108252
|
*/
|
|
108219
108253
|
label?: string;
|
|
108254
|
+
/**
|
|
108255
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
108256
|
+
*
|
|
108257
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#snappingOptions Read more...}
|
|
108258
|
+
*/
|
|
108259
|
+
snappingOptions?: SnappingOptionsProperties;
|
|
108220
108260
|
/**
|
|
108221
108261
|
* Unit system (imperial, metric) or specific unit used for displaying the distance values.
|
|
108222
108262
|
*
|
|
@@ -108288,6 +108328,13 @@ declare namespace __esri {
|
|
|
108288
108328
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D-DistanceMeasurement2DViewModel.html Read more...}
|
|
108289
108329
|
*/
|
|
108290
108330
|
constructor(properties?: DistanceMeasurement2DViewModelProperties);
|
|
108331
|
+
/**
|
|
108332
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
108333
|
+
*
|
|
108334
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D-DistanceMeasurement2DViewModel.html#snappingOptions Read more...}
|
|
108335
|
+
*/
|
|
108336
|
+
get snappingOptions(): SnappingOptions;
|
|
108337
|
+
set snappingOptions(value: SnappingOptionsProperties);
|
|
108291
108338
|
/**
|
|
108292
108339
|
* Clears the current measurement.
|
|
108293
108340
|
*
|
|
@@ -108303,6 +108350,12 @@ declare namespace __esri {
|
|
|
108303
108350
|
}
|
|
108304
108351
|
|
|
108305
108352
|
interface DistanceMeasurement2DViewModelProperties {
|
|
108353
|
+
/**
|
|
108354
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html SnappingOptions} for sketching.
|
|
108355
|
+
*
|
|
108356
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D-DistanceMeasurement2DViewModel.html#snappingOptions Read more...}
|
|
108357
|
+
*/
|
|
108358
|
+
snappingOptions?: SnappingOptionsProperties;
|
|
108306
108359
|
/**
|
|
108307
108360
|
* Unit system (imperial, metric) or specific unit used for displaying the distance values.
|
|
108308
108361
|
*
|
|
@@ -108725,7 +108778,10 @@ declare namespace __esri {
|
|
|
108725
108778
|
*
|
|
108726
108779
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#state Read more...}
|
|
108727
108780
|
*/
|
|
108728
|
-
readonly state: | "
|
|
108781
|
+
readonly state: | "add-association-create-association"
|
|
108782
|
+
| "add-association-select-feature"
|
|
108783
|
+
| "add-association-select-layer"
|
|
108784
|
+
| "adding-attachment"
|
|
108729
108785
|
| "awaiting-feature-creation-info"
|
|
108730
108786
|
| "awaiting-feature-to-create"
|
|
108731
108787
|
| "awaiting-feature-to-update"
|
|
@@ -109288,7 +109344,7 @@ declare namespace __esri {
|
|
|
109288
109344
|
*
|
|
109289
109345
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#type Read more...}
|
|
109290
109346
|
*/
|
|
109291
|
-
readonly type: "create-features" | "update" | "update-feature" | "update-table-record";
|
|
109347
|
+
readonly type: "add-association" | "create-features" | "update" | "update-feature" | "update-table-record";
|
|
109292
109348
|
/**
|
|
109293
109349
|
* The read-only `Workflow` class helps manage different stages of an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html editing} workflow.
|
|
109294
109350
|
*
|
|
@@ -110022,7 +110078,7 @@ declare namespace __esri {
|
|
|
110022
110078
|
*/
|
|
110023
110079
|
view: SceneView | MapView | nullish;
|
|
110024
110080
|
/**
|
|
110025
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ElevationProfile.html ElevationProfile} widget.
|
|
110081
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-elevation-profile/ Elevation Profile} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ElevationProfile.html ElevationProfile} widget.
|
|
110026
110082
|
*
|
|
110027
110083
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ElevationProfile-ElevationProfileViewModel.html Read more...}
|
|
110028
110084
|
*/
|
|
@@ -111821,7 +111877,7 @@ declare namespace __esri {
|
|
|
111821
111877
|
readonly updating: boolean;
|
|
111822
111878
|
constructor(properties?: UtilityNetworkAssociationInputProperties);
|
|
111823
111879
|
/**
|
|
111824
|
-
* Refreshes the
|
|
111880
|
+
* Refreshes the associations view model for this Input.
|
|
111825
111881
|
*
|
|
111826
111882
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-UtilityNetworkAssociationInput.html#refresh Read more...}
|
|
111827
111883
|
*/
|
|
@@ -117059,7 +117115,7 @@ declare namespace __esri {
|
|
|
117059
117115
|
*/
|
|
117060
117116
|
view: MapView | SceneView | nullish;
|
|
117061
117117
|
/**
|
|
117062
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Fullscreen.html Fullscreen} widget.
|
|
117118
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-fullscreen/ Fullscreen} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Fullscreen.html Fullscreen} widget.
|
|
117063
117119
|
*
|
|
117064
117120
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Fullscreen-FullscreenViewModel.html Read more...}
|
|
117065
117121
|
*/
|
|
@@ -117964,7 +118020,7 @@ declare namespace __esri {
|
|
|
117964
118020
|
*/
|
|
117965
118021
|
view: MapView | SceneView | nullish;
|
|
117966
118022
|
/**
|
|
117967
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html Home} widget that
|
|
118023
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-home/ Home} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html Home} widget that
|
|
117968
118024
|
* animates the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html View} to its
|
|
117969
118025
|
* initial {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html Viewpoint} or a previously defined {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home-HomeViewModel.html#viewpoint viewpoint}.
|
|
117970
118026
|
*
|
|
@@ -120299,7 +120355,7 @@ declare namespace __esri {
|
|
|
120299
120355
|
*/
|
|
120300
120356
|
declare view: GeolocationPositioning["view"];
|
|
120301
120357
|
/**
|
|
120302
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html Locate} widget, which
|
|
120358
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-locate/ Locate} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html Locate} widget, which
|
|
120303
120359
|
* animates the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html View}
|
|
120304
120360
|
* to the user's current location.
|
|
120305
120361
|
*
|
|
@@ -122578,7 +122634,7 @@ declare namespace __esri {
|
|
|
122578
122634
|
*/
|
|
122579
122635
|
view: MapView | nullish;
|
|
122580
122636
|
/**
|
|
122581
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleBar.html ScaleBar} widget.
|
|
122637
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scale-bar/ Scale Bar} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleBar.html ScaleBar} widget.
|
|
122582
122638
|
*
|
|
122583
122639
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleBar-ScaleBarViewModel.html Read more...}
|
|
122584
122640
|
*/
|
|
@@ -129682,38 +129738,6 @@ declare namespace __esri {
|
|
|
129682
129738
|
selfEnabledToggle: boolean;
|
|
129683
129739
|
}
|
|
129684
129740
|
|
|
129685
|
-
/**
|
|
129686
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html Feature} widget.
|
|
129687
|
-
*
|
|
129688
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-UtilityNetworkAssociations-UtilityNetworkAssociationsViewModel.html Read more...}
|
|
129689
|
-
*/
|
|
129690
|
-
interface UtilityNetworkAssociationsViewModel {
|
|
129691
|
-
activeAssociationType: UtilityNetworkAssociationType | nullish;
|
|
129692
|
-
associationTypes: UtilityNetworkAssociationType[];
|
|
129693
|
-
description: string | nullish;
|
|
129694
|
-
displayCount: number;
|
|
129695
|
-
featureCount: number;
|
|
129696
|
-
readonly globalId: string | nullish;
|
|
129697
|
-
readonly globalIdField: string | nullish;
|
|
129698
|
-
graphic: GraphicProperties | nullish;
|
|
129699
|
-
layer: FeatureLayer | SceneLayer | SubtypeSublayer | Sublayer | nullish;
|
|
129700
|
-
map: Map | nullish;
|
|
129701
|
-
readonly objectId: number | nullish;
|
|
129702
|
-
readonly objectIdField: string | nullish;
|
|
129703
|
-
showAllEnabled: boolean;
|
|
129704
|
-
state: any;
|
|
129705
|
-
title: string | nullish;
|
|
129706
|
-
readonly utilityNetwork: UtilityNetwork | nullish;
|
|
129707
|
-
/**
|
|
129708
|
-
* Refreshes the view model's data.
|
|
129709
|
-
*
|
|
129710
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-UtilityNetworkAssociations-UtilityNetworkAssociationsViewModel.html#refresh Read more...}
|
|
129711
|
-
*/
|
|
129712
|
-
refresh(): Promise<void>;
|
|
129713
|
-
}
|
|
129714
|
-
|
|
129715
|
-
export const UtilityNetworkAssociationsViewModel: UtilityNetworkAssociationsViewModel;
|
|
129716
|
-
|
|
129717
129741
|
namespace widget {
|
|
129718
129742
|
/**
|
|
129719
129743
|
* This convenience decorator is used to help simplify accessibility within the widget keyboard events.
|
|
@@ -129954,7 +129978,7 @@ declare namespace __esri {
|
|
|
129954
129978
|
|
|
129955
129979
|
export class SwipeViewModel extends Accessor {
|
|
129956
129980
|
/**
|
|
129957
|
-
* The direction the Swipe
|
|
129981
|
+
* The direction the Swipe moves across the view.
|
|
129958
129982
|
*
|
|
129959
129983
|
* @default "horizontal"
|
|
129960
129984
|
*
|
|
@@ -129978,7 +130002,7 @@ declare namespace __esri {
|
|
|
129978
130002
|
*/
|
|
129979
130003
|
readonly min: number;
|
|
129980
130004
|
/**
|
|
129981
|
-
* The position of the Swipe
|
|
130005
|
+
* The position of the Swipe.
|
|
129982
130006
|
*
|
|
129983
130007
|
* @default 25
|
|
129984
130008
|
*
|
|
@@ -129986,7 +130010,7 @@ declare namespace __esri {
|
|
|
129986
130010
|
*/
|
|
129987
130011
|
position: number;
|
|
129988
130012
|
/**
|
|
129989
|
-
* The current state of the
|
|
130013
|
+
* The current state of the Swipe.
|
|
129990
130014
|
*
|
|
129991
130015
|
* @default "disabled"
|
|
129992
130016
|
*
|
|
@@ -130016,20 +130040,20 @@ declare namespace __esri {
|
|
|
130016
130040
|
*/
|
|
130017
130041
|
view: MapView | nullish;
|
|
130018
130042
|
/**
|
|
130019
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html Swipe}
|
|
130043
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html Swipe widget} and [component](/references/map-components/arcgis-swipe/).
|
|
130020
130044
|
*
|
|
130021
130045
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html Read more...}
|
|
130022
130046
|
*/
|
|
130023
130047
|
constructor(properties?: SwipeViewModelProperties);
|
|
130024
130048
|
/**
|
|
130025
|
-
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the left or top side of Swipe
|
|
130049
|
+
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the left or top side of the Swipe.
|
|
130026
130050
|
*
|
|
130027
130051
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#leadingLayers Read more...}
|
|
130028
130052
|
*/
|
|
130029
130053
|
get leadingLayers(): Collection<Layer>;
|
|
130030
130054
|
set leadingLayers(value: CollectionProperties<Layer>);
|
|
130031
130055
|
/**
|
|
130032
|
-
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the right or bottom side of Swipe
|
|
130056
|
+
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the right or bottom side of the Swipe.
|
|
130033
130057
|
*
|
|
130034
130058
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#trailingLayers Read more...}
|
|
130035
130059
|
*/
|
|
@@ -130039,19 +130063,19 @@ declare namespace __esri {
|
|
|
130039
130063
|
|
|
130040
130064
|
interface SwipeViewModelProperties {
|
|
130041
130065
|
/**
|
|
130042
|
-
* The direction the Swipe
|
|
130066
|
+
* The direction the Swipe moves across the view.
|
|
130043
130067
|
*
|
|
130044
130068
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#direction Read more...}
|
|
130045
130069
|
*/
|
|
130046
130070
|
direction?: "horizontal" | "vertical";
|
|
130047
130071
|
/**
|
|
130048
|
-
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the left or top side of Swipe
|
|
130072
|
+
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the left or top side of the Swipe.
|
|
130049
130073
|
*
|
|
130050
130074
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#leadingLayers Read more...}
|
|
130051
130075
|
*/
|
|
130052
130076
|
leadingLayers?: CollectionProperties<Layer>;
|
|
130053
130077
|
/**
|
|
130054
|
-
* The position of the Swipe
|
|
130078
|
+
* The position of the Swipe.
|
|
130055
130079
|
*
|
|
130056
130080
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#position Read more...}
|
|
130057
130081
|
*/
|
|
@@ -130069,7 +130093,7 @@ declare namespace __esri {
|
|
|
130069
130093
|
*/
|
|
130070
130094
|
stepMultiplier?: number;
|
|
130071
130095
|
/**
|
|
130072
|
-
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the right or bottom side of Swipe
|
|
130096
|
+
* A collection of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html Layer}s that will show on the right or bottom side of the Swipe.
|
|
130073
130097
|
*
|
|
130074
130098
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe-SwipeViewModel.html#trailingLayers Read more...}
|
|
130075
130099
|
*/
|
|
@@ -131571,7 +131595,7 @@ declare namespace __esri {
|
|
|
131571
131595
|
*/
|
|
131572
131596
|
declare view: GeolocationPositioning["view"];
|
|
131573
131597
|
/**
|
|
131574
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html Track} widget, which
|
|
131598
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-track/ Track} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html Track} widget, which
|
|
131575
131599
|
* animates the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html View}
|
|
131576
131600
|
* to the user's location when clicked and tracks it as the location is updated.
|
|
131577
131601
|
*
|
|
@@ -131821,8 +131845,8 @@ declare namespace __esri {
|
|
|
131821
131845
|
*
|
|
131822
131846
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UtilityNetworkAssociations.html#viewModel Read more...}
|
|
131823
131847
|
*/
|
|
131824
|
-
get viewModel():
|
|
131825
|
-
set viewModel(value:
|
|
131848
|
+
get viewModel(): UtilityNetworkAssociationsViewModel;
|
|
131849
|
+
set viewModel(value: UtilityNetworkAssociationsViewModelProperties);
|
|
131826
131850
|
/**
|
|
131827
131851
|
* The visible elements that are displayed within the widget.
|
|
131828
131852
|
*
|
|
@@ -131937,7 +131961,7 @@ declare namespace __esri {
|
|
|
131937
131961
|
*
|
|
131938
131962
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UtilityNetworkAssociations.html#viewModel Read more...}
|
|
131939
131963
|
*/
|
|
131940
|
-
viewModel?:
|
|
131964
|
+
viewModel?: UtilityNetworkAssociationsViewModelProperties;
|
|
131941
131965
|
/**
|
|
131942
131966
|
* The visible elements that are displayed within the widget.
|
|
131943
131967
|
*
|
|
@@ -131946,7 +131970,7 @@ declare namespace __esri {
|
|
|
131946
131970
|
visibleElements?: UtilityNetworkAssociationsVisibleElementsProperties;
|
|
131947
131971
|
}
|
|
131948
131972
|
|
|
131949
|
-
export class
|
|
131973
|
+
export class UtilityNetworkAssociationsViewModel extends Accessor {
|
|
131950
131974
|
/**
|
|
131951
131975
|
* Indicates whether to query and display connectivity associations.
|
|
131952
131976
|
*
|
|
@@ -132012,7 +132036,7 @@ declare namespace __esri {
|
|
|
132012
132036
|
*
|
|
132013
132037
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UtilityNetworkAssociations-UtilityNetworkAssociationsViewModel.html Read more...}
|
|
132014
132038
|
*/
|
|
132015
|
-
constructor(properties?:
|
|
132039
|
+
constructor(properties?: UtilityNetworkAssociationsViewModelProperties);
|
|
132016
132040
|
/**
|
|
132017
132041
|
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html SimpleLineSymbol} used for representing the polyline geometry that is being drawn for connectivity associations.
|
|
132018
132042
|
*
|
|
@@ -132041,7 +132065,7 @@ declare namespace __esri {
|
|
|
132041
132065
|
showAssociations(): Promise<void>;
|
|
132042
132066
|
}
|
|
132043
132067
|
|
|
132044
|
-
interface
|
|
132068
|
+
interface UtilityNetworkAssociationsViewModelProperties {
|
|
132045
132069
|
/**
|
|
132046
132070
|
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html SimpleLineSymbol} used for representing the polyline geometry that is being drawn for connectivity associations.
|
|
132047
132071
|
*
|
|
@@ -132890,7 +132914,7 @@ declare namespace __esri {
|
|
|
132890
132914
|
export interface AssetTypeJSON {
|
|
132891
132915
|
assetTypeCode: number;
|
|
132892
132916
|
assetTypeName?: string;
|
|
132893
|
-
terminalConfigurationId
|
|
132917
|
+
terminalConfigurationId?: number;
|
|
132894
132918
|
}
|
|
132895
132919
|
|
|
132896
132920
|
/**
|
|
@@ -134668,7 +134692,7 @@ declare namespace __esri {
|
|
|
134668
134692
|
*/
|
|
134669
134693
|
view: MapView | SceneView | nullish;
|
|
134670
134694
|
/**
|
|
134671
|
-
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html Zoom} widget.
|
|
134695
|
+
* Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-zoom/ Zoom} component and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html Zoom} widget.
|
|
134672
134696
|
*
|
|
134673
134697
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom-ZoomViewModel.html Read more...}
|
|
134674
134698
|
*/
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import r from"../../core/Clonable.js";import"../../core/has.js";import n from"../../core/Error.js";import i from"../../core/Identifiable.js";import{clone as o}from"../../core/lang.js";import s from"../../core/Loadable.js";import a from"../../core/Logger.js";import{MultiOriginJSONMixin as l}from"../../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../../core/object.js";import{sqlAnd as d}from"../../core/sql.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as f}from"../../core/accessorSupport/layerContainerType.js";import h from"../../form/FormTemplate.js";import b from"../../geometry/SpatialReference.js";import{labelsVisible as g,legendEnabled as v,minScale as j,maxScale as w,popupEnabled as F}from"./commonProperties.js";import{createQuery as I,computeDomainFromSubtypes as T}from"./featureLayerUtils.js";import O from"./FeatureTemplate.js";import{defineFieldProperties as S}from"./fieldProperties.js";import{fixRendererFields as C}from"./fieldUtils.js";import E from"./LabelClass.js";import{reader as q}from"./labelingInfo.js";import{rendererReader as A,supportedRendererTypes as x}from"./subtypeGroupLayerUtils.js";import R from"../../renderers/SimpleRenderer.js";import P from"../../rest/support/Query.js";import{createPopupTemplate as L}from"../../support/popupUtils.js";import{defaultPolygonSymbol2D as D,defaultPolylineSymbol2D as G,defaultPointSymbol2D as N}from"../../symbols/support/defaults.js";import V from"../../tables/AttributeTableTemplate.js";const $=S();let M=0;function U(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=f),e}function _(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=f),e?.target&&(t.write.target=e.target)),t}function k(e){return new R({symbol:Q(e)})}function Q(e){switch(e){case"point":case"multipoint":return N.clone();case"polyline":return G.clone();case"polygon":case"multipatch":return D.clone();default:return null}}function B(e,t){return!!t&&("unique-value"===e?.type&&null!=e.field&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression)}function H(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function J(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},i=H(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new O({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let W=class extends(l(r.ClonableMixin(i.IdentifiableMixin(s)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${M++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return C(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:n,parent:i}=this;let s;if(n){s=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:o})=>{if(!o)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let p=!1;r!==a.alias&&(l.alias=r,p=!0),n!==a.editable&&(l.editable=n,p=!0),s.push(l),p&&e++})),0===e&&s.length===n.length&&(s=null)}else s=o(e);s?.length&&p(r,s,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,p=[];for(const d of n){const e=d.clone(),{name:n}=e,i=t?.find((e=>e.name===n));if(e.visible=!t||!!i,i){const{alias:t,editable:r}=i;t&&(e.alias=t),!1===r&&(e.editable=!1)}const s=a?.[n]??null;e.defaultValue=n===o?r:s;const u=l?.[n]??null;e.domain=n===o?null:u?"inherited"===u.type?e.domain:u.clone():null,p.push(e)}return p}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||a.getLogger(this).error(X("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){C(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?k(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=A(n,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&B(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(o=new R({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const i=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:A(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??b.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[J(this.subtypeCode,t)]}readTitleFromService(e,t){const r=H(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw X("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw X("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new n("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw X("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw X("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:n,objectIdField:s,title:i}}return L(t,e)}createQuery(){if(!this.parent)throw X("createQuery");const e=I(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=d(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=T(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw X("queryAttachments");const n=e.clone();return n.where=K(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw X("queryFeatureCount");return r.parent.queryFeatureCount(z(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw X("queryFeatures");return r.parent.queryFeatures(z(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw X("queryObjectIds");return r.parent.queryObjectIds(z(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw X("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw X("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};e([u({type:V,json:_({name:"attributeTableInfo"})})],W.prototype,"attributeTableTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"capabilities",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"effectiveCapabilities",null),e([u({json:_()})],W.prototype,"charts",void 0),e([u({type:Boolean,nonNullable:!0,json:_({name:"enableEditing"})})],W.prototype,"editingEnabled",void 0),e([u({type:Boolean,readOnly:!0})],W.prototype,"effectiveEditingEnabled",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"elevationInfo",null),e([u({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],W.prototype,"fieldOverrides",void 0),e([m("fieldOverrides")],W.prototype,"writeFieldOverrides",null),e([u({...$.fields,readOnly:!0,json:{read:!1}})],W.prototype,"fields",null),e([u($.fieldsIndex)],W.prototype,"fieldsIndex",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"floorInfo",null),e([u({type:h,json:_({name:"formInfo"})})],W.prototype,"formTemplate",void 0),e([u({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],W.prototype,"id",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"isTable",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"geometryType",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),e([u(U(o(g)))],W.prototype,"labelsVisible",void 0),e([u({type:[E],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:q},write:{ignoreOrigin:!0,layerContainerTypes:f}}})],W.prototype,"labelingInfo",void 0),e([u({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:f}}})],W.prototype,"layerType",void 0),e([u(U(o(v)))],W.prototype,"legendEnabled",void 0),e([u({type:["show","hide"]})],W.prototype,"listMode",void 0),e([u((()=>{const e=o(j);return e.json.origins.service.read=!1,U(e,{spatialOnly:!0})})())],W.prototype,"minScale",void 0),e([u((()=>{const e=o(w);return e.json.origins.service.read=!1,U(e,{spatialOnly:!0})})())],W.prototype,"maxScale",void 0),e([u({readOnly:!0})],W.prototype,"effectiveScaleRange",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"objectIdField",null),e([u({type:Number,range:{min:0,max:1},nonNullable:!0,json:_({spatialOnly:!0})})],W.prototype,"opacity",void 0),e([u({clonable:!1})],W.prototype,"parent",void 0),e([u(U(o(F)))],W.prototype,"popupEnabled",void 0),e([u({type:t,json:_({name:"popupInfo"})})],W.prototype,"popupTemplate",void 0),e([u({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"relationships",null),e([u({types:x,json:_({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],W.prototype,"renderer",null),e([y("service","renderer",["drawingInfo.renderer","subtypeField","type"])],W.prototype,"readRendererFromService",null),e([y("renderer",["layerDefinition.drawingInfo.renderer"])],W.prototype,"readRenderer",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"spatialReference",null),e([u({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],W.prototype,"subtypeCode",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"subtypeField",null),e([u({type:[O],json:_({name:"layerDefinition.templates"})})],W.prototype,"templates",void 0),e([y("service","templates",["geometryType","subtypeField","subtypes","type"])],W.prototype,"readTemplatesFromService",null),e([u({type:String,json:_()})],W.prototype,"title",void 0),e([y("service","title",["subtypes"])],W.prototype,"readTitleFromService",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"url",null),e([u({readOnly:!0})],W.prototype,"userHasUpdateItemPrivileges",null),e([u({type:Boolean,nonNullable:!0,json:_({name:"visibility",spatialOnly:!0})})],W.prototype,"visible",void 0),W=e([c("esri.layers.support.SubtypeSublayer")],W);const z=(e,t,r)=>{if(!r)return t.createQuery();const n=P.from(r);return n.where=K(n.where,e.subtypeField,t.subtypeCode),n},K=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return n.test(o)?o.replace(n,i):d(i,o)},X=e=>new n(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),Y=W;export{Y as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import r from"../../core/Clonable.js";import"../../core/has.js";import n from"../../core/Error.js";import o from"../../core/Identifiable.js";import{clone as i}from"../../core/lang.js";import s from"../../core/Loadable.js";import a from"../../core/Logger.js";import{MultiOriginJSONMixin as l}from"../../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../../core/object.js";import{sqlAnd as d}from"../../core/sql.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as f}from"../../core/accessorSupport/layerContainerType.js";import h from"../../form/FormTemplate.js";import b from"../../geometry/SpatialReference.js";import{labelsVisible as g,legendEnabled as v,minScale as j,maxScale as w,popupEnabled as F}from"./commonProperties.js";import{createQuery as I,computeDomainFromSubtypes as O}from"./featureLayerUtils.js";import T from"./FeatureTemplate.js";import{defineFieldProperties as S}from"./fieldProperties.js";import{fixRendererFields as C}from"./fieldUtils.js";import E from"./LabelClass.js";import{reader as q}from"./labelingInfo.js";import{rendererReader as A,supportedRendererTypes as x}from"./subtypeGroupLayerUtils.js";import R from"../../renderers/SimpleRenderer.js";import P from"../../rest/support/Query.js";import{createPopupTemplate as L}from"../../support/popupUtils.js";import{defaultPolygonSymbol2D as D,defaultPolylineSymbol2D as G,defaultPointSymbol2D as N}from"../../symbols/support/defaults.js";import V from"../../tables/AttributeTableTemplate.js";const $=S();let M=0;function U(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=f),e}function _(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=f),e?.target&&(t.write.target=e.target)),t}function k(e){return new R({symbol:Q(e)})}function Q(e){switch(e){case"point":case"multipoint":return N.clone();case"polyline":return G.clone();case"polygon":case"multipatch":return D.clone();default:return null}}function B(e,t){return!!t&&("unique-value"===e?.type&&null!=e.field&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression)}function H(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function J(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},o=H(e,t);if(null!=o){const{defaultValues:e}=o;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new T({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let W=class extends(l(r.ClonableMixin(o.IdentifiableMixin(s)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${M++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return C(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:n,parent:o}=this;let s;if(n){s=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:i})=>{if(!i)return;const a=o?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let p=!1;r!==a.alias&&(l.alias=r,p=!0),n!==a.editable&&(l.editable=n,p=!0),s.push(l),p&&e++})),0===e&&s.length===n.length&&(s=null)}else s=i(e);s?.length&&p(r,s,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:o,subtypeField:i}=e,s=o?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,p=[];for(const d of n){const e=d.clone(),{name:n}=e,o=t?.find((e=>e.name===n));if(e.visible=!t||!!o,o){const{alias:t,editable:r}=o;t&&(e.alias=t),!1===r&&(e.editable=!1)}const s=a?.[n]??null;e.defaultValue=n===i?r:s;const u=l?.[n]??null;e.domain=n===i?null:u?"inherited"===u.type?e.domain:u.clone():null,p.push(e)}return p}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(a.getLogger(this).error(X("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||a.getLogger(this).error(X("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){C(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?k(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,o=A(n,t,r);let i;const{subtypeCode:s}=this;if(null!=s&&B(o,t.subtypeField)){const e=o.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(i=new R({symbol:e.symbol}))}else"simple"!==o?.type||o.visualVariables?.length||(i=o);return i}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const o=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return o?void 0:A(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??b.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[J(this.subtypeCode,t)]}readTitleFromService(e,t){const r=H(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw X("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:o}=this;if(!o)throw X("updateAttachment");if(e.getAttribute(o.subtypeField)!==this.subtypeCode)throw new n("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return o.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw X("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw X("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:o}=this;if(r){const{displayField:e,editFieldsInfo:i,objectIdField:s}=r;t={displayField:e,editFieldsInfo:i,fields:n,objectIdField:s,title:o}}return L(t,e)}createQuery(){if(!this.parent)throw X("createQuery");const e=I(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=d(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=O(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw X("queryAttachments");const n=e.clone();return n.where=K(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw X("queryFeatureCount");return r.parent.queryFeatureCount(z(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw X("queryFeatures");return r.parent.queryFeatures(z(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw X("queryObjectIds");return r.parent.queryObjectIds(z(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw X("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw X("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};e([u({type:V,json:_({name:"attributeTableInfo"})})],W.prototype,"attributeTableTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"capabilities",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"effectiveCapabilities",null),e([u({json:_()})],W.prototype,"charts",void 0),e([u({type:Boolean,nonNullable:!0,json:_({name:"enableEditing"})})],W.prototype,"editingEnabled",void 0),e([u({type:Boolean,readOnly:!0})],W.prototype,"effectiveEditingEnabled",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"elevationInfo",null),e([u({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],W.prototype,"fieldOverrides",void 0),e([m("fieldOverrides")],W.prototype,"writeFieldOverrides",null),e([u({...$.fields,readOnly:!0,json:{read:!1}})],W.prototype,"fields",null),e([u($.fieldsIndex)],W.prototype,"fieldsIndex",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"floorInfo",null),e([u({type:h,json:_({name:"formInfo"})})],W.prototype,"formTemplate",void 0),e([u({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],W.prototype,"id",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"isTable",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"geometryType",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"globalIdField",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),e([u(U(i(g)))],W.prototype,"labelsVisible",void 0),e([u({type:[E],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:q},write:{ignoreOrigin:!0,layerContainerTypes:f}}})],W.prototype,"labelingInfo",void 0),e([u({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:f}}})],W.prototype,"layerType",void 0),e([u(U(i(v)))],W.prototype,"legendEnabled",void 0),e([u({type:["show","hide"]})],W.prototype,"listMode",void 0),e([u((()=>{const e=i(j);return e.json.origins.service.read=!1,U(e,{spatialOnly:!0})})())],W.prototype,"minScale",void 0),e([u((()=>{const e=i(w);return e.json.origins.service.read=!1,U(e,{spatialOnly:!0})})())],W.prototype,"maxScale",void 0),e([u({readOnly:!0})],W.prototype,"effectiveScaleRange",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"objectIdField",null),e([u({type:Number,range:{min:0,max:1},nonNullable:!0,json:_({spatialOnly:!0})})],W.prototype,"opacity",void 0),e([u({clonable:!1})],W.prototype,"parent",void 0),e([u(U(i(F)))],W.prototype,"popupEnabled",void 0),e([u({type:t,json:_({name:"popupInfo"})})],W.prototype,"popupTemplate",void 0),e([u({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"relationships",null),e([u({types:x,json:_({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],W.prototype,"renderer",null),e([y("service","renderer",["drawingInfo.renderer","subtypeField","type"])],W.prototype,"readRendererFromService",null),e([y("renderer",["layerDefinition.drawingInfo.renderer"])],W.prototype,"readRenderer",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"spatialReference",null),e([u({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],W.prototype,"subtypeCode",void 0),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"subtypeField",null),e([u({type:[T],json:_({name:"layerDefinition.templates"})})],W.prototype,"templates",void 0),e([y("service","templates",["geometryType","subtypeField","subtypes","type"])],W.prototype,"readTemplatesFromService",null),e([u({type:String,json:_()})],W.prototype,"title",void 0),e([y("service","title",["subtypes"])],W.prototype,"readTitleFromService",null),e([u({readOnly:!0,json:{read:!1}})],W.prototype,"url",null),e([u({readOnly:!0})],W.prototype,"userHasUpdateItemPrivileges",null),e([u({type:Boolean,nonNullable:!0,json:_({name:"visibility",spatialOnly:!0})})],W.prototype,"visible",void 0),W=e([c("esri.layers.support.SubtypeSublayer")],W);const z=(e,t,r)=>{if(!r)return t.createQuery();const n=P.from(r);return n.where=K(n.where,e.subtypeField,t.subtypeCode),n},K=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),o=`${t}=${r}`,i=e??"";return n.test(i)?i.replace(n,o):d(o,i)},X=e=>new n(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),Y=W;export{Y as default};
|
package/networks/Network.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../request.js";import o from"../core/Error.js";import s from"../core/Loadable.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{isAbortError as n}from"../core/promiseUtils.js";import{urlToObject as l}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../request.js";import o from"../core/Error.js";import s from"../core/Loadable.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{isAbortError as n}from"../core/promiseUtils.js";import{urlToObject as l}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import c from"../geometry/Extent.js";import p from"../geometry/SpatialReference.js";import{fromJSON as m}from"../geometry/support/jsonUtils.js";import{versionMatches as y,onApplyEditsEvent as h,onUpdateMomentEvent as f,emitApplyEditsEvent as g}from"../layers/mixins/EditBusLayer.js";import{parse as v}from"../layers/support/arcgisLayerUrl.js";import w from"./support/TopologyValidationJobInfo.js";import{networkFromPortalItem as S}from"./support/utils.js";import{isVersionInEditSession as j,currentSessionId as I,isSafeToEditVersion as b}from"../versionManagement/support/versionManagementUtils.js";let U=class extends(a(s)){static fromPortalItem(e){return S(e)}constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null,this.gdbVersion=null,this.historicMoment=null,this._sourceIdByLayerId=new Map,this._layerIdBySourceId=new Map,this._applyEditsHandler=e=>{const{serviceUrl:t,gdbVersion:r,result:o}=e,s=t===this.featureServiceUrl,i=y(t,r,this.gdbVersion);s&&i&&o.then((e=>{j(t,r)&&(this.historicMoment=e.historicMoment)}))},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:o}=e,s=t===this.featureServiceUrl,i=y(t,r,this.gdbVersion);s&&i&&(this.historicMoment=o)},this.when().then((()=>{this.addHandles([h(this._applyEditsHandler),f(this._updateMomentHandler)])}),(()=>{}))}initialize(){this.when().catch((e=>{n(e)||i.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){return l(this.layerUrl)}get featureServiceUrl(){return v(this.parsedUrl.path).url.path}get networkServiceUrl(){return this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer")}get layerId(){return v(this.parsedUrl.path).sublayer}get networkSystemLayers(){return null}async load(e){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),e)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,e)),this}getLayerIdBySourceId(e){if(!this.dataElement)return null;const t=this._layerIdBySourceId.get(e);if(null!=t)return t;const r=this.dataElement.domainNetworks,o=this._traverseNetworkSources(r,this._layerIdBySourceId,"sourceId","layerId",e);return o>=0?o:null}getSourceIdByLayerId(e){if(!this.dataElement)return null;const t=this._sourceIdByLayerId.get(e);if(null!=t)return t;const r=this.dataElement.domainNetworks,o=this._traverseNetworkSources(r,this._sourceIdByLayerId,"layerId","sourceId",e);return o>=0?o:null}getObjectIdsFromElements(e){const t=[],r=new Map;for(const s of e){const e=this.getLayerIdBySourceId(s.networkSourceId);if(null==e)continue;let t=r.get(e);void 0===t&&(t=[]),t.push(s.objectId),r.set(e,t)}const o=this.featureServiceUrl;return r.forEach(((e,r)=>t.push({layerUrl:`${o}/${r}`,objectIds:e}))),t}async queryNamedTraceConfigurations(e,t){const[{queryNamedTraceConfigurations:r},{default:o}]=await Promise.all([import("../rest/networks/queryNamedTraceConfigurations.js"),import("../rest/networks/support/QueryNamedTraceConfigurationsParameters.js")]),s=this.networkServiceUrl,i=o.from(e);return(await r(s,i,{...t}))?.namedTraceConfigurations}async validateTopology(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");const[{validateNetworkTopology:r},{default:s}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),i=s.from(e);j(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionID=I,await b(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionID=null,i.gdbVersion=this.gdbVersion;const a=this.networkServiceUrl,n=this.featureServiceUrl,l=g(n,null,this.gdbVersion,!0),d=await r(a,i,{...t});if(d?.serviceEdits){const e=[];for(const t of d.serviceEdits){const{editedFeatures:r}=t,o=r?.spatialReference?new p(r.spatialReference):null;e.push({layerId:t.layerId,editedFeatures:{adds:r?.adds?.map((e=>k(e,o)))||[],updates:r?.updates?.map((e=>({original:k(e[0],o),current:k(e[1],o)})))||[],deletes:r?.deletes?.map((e=>k(e,o)))||[],spatialReference:o}})}l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],editedFeatures:e,exceededTransferLimit:!1,historicMoment:d.moment})}return d}async submitTopologyValidationJob(e,t){let s=null;if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");if(!this.gdbVersion){const e=this.layerUrl.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");s=(await r(e,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}const[{submitValidateNetworkTopologyJob:i},{default:a}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),n=a.from(e);j(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionID=I,await b(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionID=null,n.gdbVersion=this.gdbVersion||s;const l=this.networkServiceUrl,d=this.featureServiceUrl?g(this.featureServiceUrl,null,this.gdbVersion,!0):void 0,u=await i(l,n,{...t});return new w({statusUrl:u,editsResolver:d})}getSourceTypeById(e){if(!this.dataElement)return null;for(const t of this.dataElement.domainNetworks)for(const r of[t.edgeSources??[],t.junctionSources??[]])for(const o of r)if(o.sourceId===e)return r===t.edgeSources?"edge":"junction";return null}_traverseNetworkSources(e,t,r,o,s){for(const i of e)for(const e of[i.edgeSources??[],i.junctionSources??[]])for(const i of e)if(i[r]===s)return t.set(s,i[o]),i[o];return-1}async _fetchLayerMetaData(e,t){const o=await r(e,{responseType:"json",query:{f:"json"},...t});this.sourceJSON=o.data,this.read(o.data,{origin:"service"})}async _fetchDataElement(e,t,o){if(this.dataElement)return;const s=await r(`${e}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([t]),f:"json"},...o}).then((e=>e.data.layerDataElements?.[0]));s&&this.read(s,{origin:"service"})}};function k(e,r){return new t({attributes:e.attributes,geometry:m({...e.geometry,spatialReference:r})})}e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:!0}},read:!1}})],U.prototype,"id",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:{source:"name"}}},read:!1}})],U.prototype,"title",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],U.prototype,"layerUrl",void 0),e([d({type:Object,json:{origins:{service:{read:!0}},read:!1}})],U.prototype,"dataElement",void 0),e([d({type:c,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],U.prototype,"fullExtent",void 0),e([d({type:p,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],U.prototype,"spatialReference",void 0),e([d({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],U.prototype,"type",void 0),e([d({readOnly:!0})],U.prototype,"datasetName",null),e([d({readOnly:!0})],U.prototype,"owner",null),e([d({readOnly:!0})],U.prototype,"schemaGeneration",null),e([d({readOnly:!0})],U.prototype,"parsedUrl",null),e([d({readOnly:!0})],U.prototype,"featureServiceUrl",null),e([d({readOnly:!0})],U.prototype,"networkServiceUrl",null),e([d({readOnly:!0})],U.prototype,"layerId",null),e([d()],U.prototype,"sourceJSON",void 0),e([d({readOnly:!0})],U.prototype,"networkSystemLayers",null),e([d()],U.prototype,"gdbVersion",void 0),e([d({type:Date})],U.prototype,"historicMoment",void 0),U=e([u("esri.networks.Network")],U);const N=U;export{N as default};
|
package/networks/RulesTable.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import o from"../core/JSONSupport.js";import t from"../core/Loadable.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{isFeatureLayer as a,isSubtypeSublayer as n}from"../layers/support/layerUtils.js";import{RuleType as i}from"./support/typeUtils.js";import c from"../rest/support/Query.js";let d=class extends(o.JSONSupportMixin(t)){constructor(e){super(e),this.rulesCategorized={attachment:[],containment:[],connectivity:[]},this.request=r}initialize(){}async load(e){const r=this.rulesLayer.load(e).then((()=>this._initializeRulesTable()));return this.addResolvingPromise(r),this}getFeaturesCanAssociateWithQuery(e,r,o,t){const s=this._getWhereClauseForCompatibleFeatures(r,o,t);return new c({...e,where:e.where?.trim()?`${e.where} AND (${s})`:s})}getFeaturesCanAssociateWith(e,r,o){return e.sourceLayer&&"layerId"in e.sourceLayer?r.filter((r=>this.canAssociateFeatures(e,r,o))):[]}canAssociateFeatures(e,r,o){const[t,s]=this._getFeatureAssetCodes(e),u=this._getFeatureSourceLayerId(e),[a,n]=this._getFeatureAssetCodes(r),i=this._getFeatureSourceLayerId(r);return null!=u&&null!=i&&o.some((e=>{const{type:r,direction:o}=e;return this._getRulesForAssociationType(r).some((e=>{const c=this._getRuleFieldValuesForAssociation(e,r,o);return c?.some((e=>u===e?.ruleLayerIdForSource&&t===e?.ruleAssetGroupCodeForSource&&s===e?.ruleAssetTypeCodeForSource&&a===e?.ruleAssetGroupCodeForTarget&&n===e?.ruleAssetTypeCodeForTarget&&i===e?.ruleLayerIdForTarget))}))}))}getLayersCanAssociateWith(e,r,o){return e.sourceLayer&&"layerId"in e.sourceLayer?r.filter((r=>this.canAssociateFeatureToLayer(e,r,o))):[]}canAssociateFeatureToLayer(e,r,o){if(!("layerId"in r))return!1;const[t,s]=this._getFeatureAssetCodes(e),u=this._getFeatureSourceLayerId(e);return null!=u&&o.some((e=>{const{type:o,direction:a}=e;return this._getRulesForAssociationType(o).some((e=>{const n=this._getRuleFieldValuesForAssociation(e,o,a);return n?.some((e=>{const o=u===e?.ruleLayerIdForSource,a=t===e?.ruleAssetGroupCodeForSource,n=s===e?.ruleAssetTypeCodeForSource,i=r.layerId===e?.ruleLayerIdForTarget;return o&&a&&n&&i}))}))}))}getFeatureSQL(e,r){const o=e.layerId.toString(),t=e.fieldsIndex?.normalizeFieldName("assetGroup"),s=e.fieldsIndex?.normalizeFieldName("assetType"),u=t?r.attributes[t]:null,a=s?r.attributes[s]:null,n=this.rulesHash[o];if(n){const e=n.assetGroupHash[u];if(e){return e.assetTypeHash[a]||null}}return null}async _initializeRulesTable(){const e={};let r;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(r||(r={}));const o=[{networkSourceId:"fromNetworkSource",assetGroupId:"fromAssetGroup",assetTypeId:"fromAssetType"},{networkSourceId:"toNetworkSource",assetGroupId:"toAssetGroup",assetTypeId:"toAssetType"},{networkSourceId:"viaNetworkSource",assetGroupId:"viaAssetGroup",assetTypeId:"viaAssetType"}];this.rulesCategorized={attachment:[],containment:[],connectivity:[]};for(const t of this.rules){if(t.ruleType===i.RTAttachment){this.rulesCategorized.attachment.push(t);continue}if(t.ruleType===i.RTContainment){this.rulesCategorized.containment.push(t);continue}if(t.ruleType===i.RTJunctionJunctionConnectivity){this.rulesCategorized.connectivity.push(t);continue}this.rulesCategorized.connectivity.push(t);let s=[[r.from,r.to],[r.to,r.from]];t.ruleType===i.RTEdgeJunctionEdgeConnectivity&&(s=[[r.from,r.via],[r.via,r.from],[r.to,r.via],[r.via,r.to]]);for(const u of s){const s=u.shift(),a=u.shift();let n=!1;switch(t.ruleType){case i.RTEdgeJunctionEdgeConnectivity:n=s===r.from||s===r.to;break;case i.RTJunctionEdgeConnectivity:n=s===r.to}const c=o[s],d=t[c.networkSourceId]?.layerId.toString()??"",l=t[c.assetGroupId]?.assetGroupCode?.toString(),p=t[c.assetTypeId],y=p?.assetTypeCode?.toString(),T=o[a],A=t[T.networkSourceId]?.layerId.toString()??"",C=t[T.assetGroupId]?.assetGroupCode?.toString(),F=t[T.assetTypeId],g=F?.assetTypeCode?.toString(),m=e[d]??{assetGroupHash:{}};if(!(l&&y&&C&&g))continue;const S=m.assetGroupHash[l]??{assetTypeHash:{}},I=S.assetTypeHash[y]??{};if(I[A]=I[A]??{},n){I[d]=I[d]??{};const e=`(assetgroup = ${l} AND assettype = ${y})`;"esriNECPEndVertex"===F?.connectivityPolicy?I[d].endVertex=I[d]?.endVertex?`${I[d].endVertex}`:`${e}`:I[d].anyVertex=I[d].anyVertex?`${I[d].anyVertex}`:`${e}`}const f=`(assetgroup = ${C} AND assettype = ${g})`;"esriNECPEndVertex"===F?.connectivityPolicy?I[A].endVertex=I[A]?.endVertex?`${I[A].endVertex} OR ${f}`:`${f}`:I[A].anyVertex=I[A]?.anyVertex?`${I[A].anyVertex} OR ${f}`:`${f}`,S.assetTypeHash[y]=I,m.assetGroupHash[l]=S,e[d]=m}}this._set("rulesHash",e)}_getRuleFieldValuesForAssociation(e,r,o="from"){switch(r){case"attachment":case"containment":return"from"===o?[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode}]:[{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode}];case"connectivity":case"junction-junction-connectivity":return[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode},{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode}];case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":return e.ruleType===i.RTEdgeJunctionEdgeConnectivity?[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.viaAssetType?.assetTypeCode},{ruleLayerIdForSource:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.viaAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode},{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.viaAssetType?.assetTypeCode},{ruleLayerIdForSource:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.viaAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode}]:[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode},{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode}];default:return[]}}_getWhereClauseForCompatibleFeatures(e,r,o){const t=new Set,s=new Set,[u,a]=this._getAssetFieldNames(e.sourceLayer),[n,i]=this._getFeatureAssetCodes(e),c=this._getFeatureSourceLayerId(e);o.forEach((e=>{const{type:o,direction:u}=e;this._getRulesForAssociationType(o).forEach((e=>{this._getRuleFieldValuesForAssociation(e,o,u).forEach((e=>{const o=c===e?.ruleLayerIdForSource,u=n===e?.ruleAssetGroupCodeForSource,a=i===e?.ruleAssetTypeCodeForSource,d="layerId"in r&&r.layerId===e?.ruleLayerIdForTarget;o&&u&&a&&d&&(t.add(e.ruleAssetGroupCodeForTarget),s.add(e.ruleAssetTypeCodeForTarget))}))}))}));return[`${u} IN (${Array.from(t).filter(Boolean).join(", ")})`,`${a} IN (${Array.from(s).filter(Boolean).join(", ")})`].join(" AND ")}_getRulesForAssociationType(e){const{rulesCategorized:r}=this;switch(e){case"attachment":return r.attachment;case"containment":return r.containment;case"connectivity":case"junction-junction-connectivity":return r.connectivity.filter((e=>e.ruleType===i.RTJunctionJunctionConnectivity));case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":return r.connectivity.filter((e=>e.ruleType===i.RTJunctionEdgeConnectivity||e.ruleType===i.RTEdgeJunctionEdgeConnectivity));default:return[]}}_getFeatureSourceLayerId(e){const{sourceLayer:r}=e;let o;return a(r)?o=r.layerId:n(r)&&(o=r.parent?.layerId),o??null}_getAssetFieldNames(e){if(!e||!("fieldsIndex"in e))return[null,null];return[e.fieldsIndex.normalizeFieldName("assetGroup")??null,e.fieldsIndex.normalizeFieldName("assetType")??null]}_getFeatureAssetCodes(e){const[r,o]=this._getAssetFieldNames(e.sourceLayer);return[r?e.attributes[r]:null,o?e.attributes[o]:null]}};e([s({constructOnly:!0})],d.prototype,"rulesLayer",void 0),e([s({constructOnly:!0})],d.prototype,"rules",void 0),e([s({readOnly:!0})],d.prototype,"rulesHash",void 0),e([s()],d.prototype,"rulesCategorized",void 0),e([s({constructOnly:!0})],d.prototype,"request",void 0),d=e([u("esri.networks.RulesTable")],d);const l=d;export{l as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/JSONSupport.js";import o from"../core/Loadable.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{isSubtypeSublayer as a,isFeatureLayer as n}from"../layers/support/layerUtils.js";import{RuleType as i}from"./support/typeUtils.js";let c=class extends(t.JSONSupportMixin(o)){constructor(e){super(e),this.rulesCategorized={attachment:[],containment:[],connectivity:[]},this.request=r}initialize(){}async load(e){const r=this.rulesLayer.load(e).then((()=>this._initializeRulesTable()));return this.addResolvingPromise(r),this}getFeaturesCanAssociateWithClause(e,r,t){return this._getWhereClauseForCompatibleFeatures(e,r,t)}getFeaturesCanAssociateWith(e,r,t){return null==this._getFeatureSourceLayerId(e)?[]:r.filter((r=>this.canAssociateFeatures(e,r,t)))}canAssociateFeatures(e,r,t){const[o,s]=this._getFeatureAssetCodes(e),u=this._getFeatureSourceLayerId(e),[a,n]=this._getFeatureAssetCodes(r),i=this._getFeatureSourceLayerId(r);return null!=u&&null!=i&&t.some((e=>{const{type:r,direction:t}=e;return this._getRulesForAssociationType(r).some((e=>{const c=this._getRuleFieldValuesForAssociation(e,r,t);return c?.some((e=>u===e?.ruleLayerIdForSource&&o===e?.ruleAssetGroupCodeForSource&&s===e?.ruleAssetTypeCodeForSource&&i===e?.ruleLayerIdForTarget&&a===e?.ruleAssetGroupCodeForTarget&&n===e?.ruleAssetTypeCodeForTarget))}))}))}getLayersCanAssociateWith(e,r,t){return null==this._getFeatureSourceLayerId(e)?[]:r.filter((r=>this.canAssociateFeatureToLayer(e,r,t)))}canAssociateFeatureToLayer(e,r,t){const o=a(r)?r.parent:r;if(!o)return!1;const s=o.layerId,u=a(r)?r.subtypeCode:null,[n,i]=this._getFeatureAssetCodes(e),c=this._getFeatureSourceLayerId(e);return null!=c&&t.some((e=>{const{type:r,direction:t}=e;return this._getRulesForAssociationType(r).some((e=>{const o=this._getRuleFieldValuesForAssociation(e,r,t);return o?.some((e=>c===e?.ruleLayerIdForSource&&n===e?.ruleAssetGroupCodeForSource&&i===e?.ruleAssetTypeCodeForSource&&s===e?.ruleLayerIdForTarget&&(null==u||u===e?.ruleAssetGroupCodeForTarget)))}))}))}getFeatureSQL(e,r){const t=e.layerId.toString(),o=e.fieldsIndex?.normalizeFieldName("assetGroup"),s=e.fieldsIndex?.normalizeFieldName("assetType"),u=o?r.attributes[o]:null,a=s?r.attributes[s]:null,n=this.rulesHash[t];if(n){const e=n.assetGroupHash[u];if(e){return e.assetTypeHash[a]||null}}return null}async _initializeRulesTable(){const e={};let r;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(r||(r={}));const t=[{networkSourceId:"fromNetworkSource",assetGroupId:"fromAssetGroup",assetTypeId:"fromAssetType"},{networkSourceId:"toNetworkSource",assetGroupId:"toAssetGroup",assetTypeId:"toAssetType"},{networkSourceId:"viaNetworkSource",assetGroupId:"viaAssetGroup",assetTypeId:"viaAssetType"}];this.rulesCategorized={attachment:[],containment:[],connectivity:[]};for(const o of this.rules){if(o.ruleType===i.RTAttachment){this.rulesCategorized.attachment.push(o);continue}if(o.ruleType===i.RTContainment){this.rulesCategorized.containment.push(o);continue}if(o.ruleType===i.RTJunctionJunctionConnectivity){this.rulesCategorized.connectivity.push(o);continue}this.rulesCategorized.connectivity.push(o);let s=[[r.from,r.to],[r.to,r.from]];o.ruleType===i.RTEdgeJunctionEdgeConnectivity&&(s=[[r.from,r.via],[r.via,r.from],[r.to,r.via],[r.via,r.to]]);for(const u of s){const s=u.shift(),a=u.shift();let n=!1;switch(o.ruleType){case i.RTEdgeJunctionEdgeConnectivity:n=s===r.from||s===r.to;break;case i.RTJunctionEdgeConnectivity:n=s===r.to}const c=t[s],d=o[c.networkSourceId]?.layerId.toString()??"",l=o[c.assetGroupId]?.assetGroupCode?.toString(),p=o[c.assetTypeId],y=p?.assetTypeCode?.toString(),T=t[a],C=o[T.networkSourceId]?.layerId.toString()??"",A=o[T.assetGroupId]?.assetGroupCode?.toString(),F=o[T.assetTypeId],g=F?.assetTypeCode?.toString(),m=e[d]??{assetGroupHash:{}};if(!(l&&y&&A&&g))continue;const S=m.assetGroupHash[l]??{assetTypeHash:{}},f=S.assetTypeHash[y]??{};if(f[C]=f[C]??{},n){f[d]=f[d]??{};const e=`(assetgroup = ${l} AND assettype = ${y})`;"esriNECPEndVertex"===F?.connectivityPolicy?f[d].endVertex=f[d]?.endVertex?`${f[d].endVertex}`:`${e}`:f[d].anyVertex=f[d].anyVertex?`${f[d].anyVertex}`:`${e}`}const G=`(assetgroup = ${A} AND assettype = ${g})`;"esriNECPEndVertex"===F?.connectivityPolicy?f[C].endVertex=f[C]?.endVertex?`${f[C].endVertex} OR ${G}`:`${G}`:f[C].anyVertex=f[C]?.anyVertex?`${f[C].anyVertex} OR ${G}`:`${G}`,S.assetTypeHash[y]=f,m.assetGroupHash[l]=S,e[d]=m}}this._set("rulesHash",e)}_getRuleFieldValuesForAssociation(e,r,t="from"){switch(r){case"attachment":case"containment":return"from"===t?[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode}]:[{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode}];case"connectivity":case"junction-junction-connectivity":return[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode},{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode}];case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":return e.ruleType===i.RTEdgeJunctionEdgeConnectivity?[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.viaAssetType?.assetTypeCode},{ruleLayerIdForSource:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.viaAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode},{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.viaAssetType?.assetTypeCode},{ruleLayerIdForSource:e.viaNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.viaAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.viaAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode}]:[{ruleLayerIdForSource:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.fromAssetType?.assetTypeCode,ruleLayerIdForTarget:e.toNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.toAssetType?.assetTypeCode},{ruleLayerIdForSource:e.toNetworkSource?.layerId,ruleAssetGroupCodeForSource:e.toAssetGroup?.assetGroupCode,ruleAssetTypeCodeForSource:e.toAssetType?.assetTypeCode,ruleLayerIdForTarget:e.fromNetworkSource?.layerId,ruleAssetGroupCodeForTarget:e.fromAssetGroup?.assetGroupCode,ruleAssetTypeCodeForTarget:e.fromAssetType?.assetTypeCode}];default:return[]}}_getWhereClauseForCompatibleFeatures(e,r,t){const o=new Map,[s,u]=this._getAssetFieldNames(e.sourceLayer),[n,i]=this._getFeatureAssetCodes(e),c=this._getFeatureSourceLayerId(e),d=a(r)?r.parent:r;t.forEach((e=>{const{type:r,direction:t}=e;this._getRulesForAssociationType(r).forEach((e=>{this._getRuleFieldValuesForAssociation(e,r,t).forEach((e=>{if(null!=e.ruleAssetGroupCodeForTarget&&null!=e.ruleAssetTypeCodeForTarget&&c===e?.ruleLayerIdForSource&&n===e?.ruleAssetGroupCodeForSource&&i===e?.ruleAssetTypeCodeForSource&&d.layerId===e?.ruleLayerIdForTarget){const r=o.get(e.ruleAssetGroupCodeForTarget)??new Set;r.add(e.ruleAssetTypeCodeForTarget),o.set(e.ruleAssetGroupCodeForTarget,r)}}))}))}));let l=[];return this._mergeAssetCodes(o).forEach(((e,r)=>l.push(`${s} IN (${r}) AND ${u} IN (${Array.from(e).sort().join(", ")})`))),l.length>1&&(l=l.map((e=>`(${e})`))),l.join(" OR ")}_getRulesForAssociationType(e){const{rulesCategorized:r}=this;switch(e){case"attachment":return r.attachment;case"containment":return r.containment;case"connectivity":case"junction-junction-connectivity":return r.connectivity.filter((e=>e.ruleType===i.RTJunctionJunctionConnectivity));case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":return r.connectivity.filter((e=>e.ruleType===i.RTJunctionEdgeConnectivity||e.ruleType===i.RTEdgeJunctionEdgeConnectivity));default:return[]}}_getFeatureSourceLayerId(e){const{sourceLayer:r}=e;let t;return n(r)?t=r.layerId:a(r)&&(t=r.parent?.layerId),t??null}_getAssetFieldNames(e){if(!e||!("fieldsIndex"in e))return[null,null];return[e.fieldsIndex.normalizeFieldName("assetGroup")??null,e.fieldsIndex.normalizeFieldName("assetType")??null]}_getFeatureAssetCodes(e){const[r,t]=this._getAssetFieldNames(e.sourceLayer);return[r?e.attributes[r]:null,t?e.attributes[t]:null]}_areSetsEqual(e,r){if(e.size!==r.size)return!1;for(const t of e)if(!r.has(t))return!1;return!0}_mergeAssetCodes(e){const r=new Map,t=new Set;for(const[o,s]of e){const u=new Set([o]);for(const[r,n]of e)o!==r&&!t.has(r)&&this._areSetsEqual(s,n)&&(u.add(r),t.add(r));const a=Array.from(u).sort().join(", ");r.set(a,s)}return r}};e([s({constructOnly:!0})],c.prototype,"rulesLayer",void 0),e([s({constructOnly:!0})],c.prototype,"rules",void 0),e([s({readOnly:!0})],c.prototype,"rulesHash",void 0),e([s()],c.prototype,"rulesCategorized",void 0),e([s({constructOnly:!0})],c.prototype,"request",void 0),c=e([u("esri.networks.RulesTable")],c);const d=c;export{d as default};
|