@arcgis/core 4.27.0-next.20230516 → 4.27.0-next.20230517
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/06d5f5e37fd44dc7de06.js +1 -0
- package/assets/esri/core/workers/chunks/12714d64a0154688072e.js +1 -0
- package/assets/esri/core/workers/chunks/{a507135977d83aea4421.js → 1827a3da6b5b9272ffe1.js} +1 -1
- package/assets/esri/core/workers/chunks/{395ef46b635f9e9a5643.js → 20e8e18e4bd2fd5da47c.js} +1 -1
- package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +1 -0
- package/assets/esri/core/workers/chunks/{15dda462b979e90b58fe.js → 3cebdd77a8401495097f.js} +1 -1
- package/assets/esri/core/workers/chunks/48cb634255e39711a720.js +1 -0
- package/assets/esri/core/workers/chunks/4d5f71d84c85f45c97ea.js +1 -0
- package/assets/esri/core/workers/chunks/6312783626bacf52df7a.js +1 -0
- package/assets/esri/core/workers/chunks/6d80f81bf6ad97a7e69e.js +1 -0
- package/assets/esri/core/workers/chunks/{a3822a97701890c12d63.js → 7903beee895860c7e3af.js} +1 -1
- package/assets/esri/core/workers/chunks/887a630c5c980c5028e1.js +1 -0
- package/assets/esri/core/workers/chunks/{522660da4589739a70c3.js → c7fb48ea5d907883bcce.js} +1 -1
- package/assets/esri/core/workers/chunks/d0ff968e42116f592065.js +1 -0
- package/assets/esri/core/workers/chunks/{fdf64f23529a22c79fbd.js → d52c920acf08c95277c3.js} +19 -19
- package/assets/esri/core/workers/chunks/d64c271c173797d98286.js +1 -0
- package/assets/esri/core/workers/chunks/e1b2076d0040fcb7d864.js +1 -0
- package/assets/esri/core/workers/chunks/{b3013a5a39d038b2d748.js → e4f84c79fe3e7b54b76c.js} +1 -1
- package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +1 -0
- package/assets/esri/core/workers/chunks/f3f6035a17f7dcd19675.js +1 -0
- package/assets/esri/core/workers/chunks/{bff317b08e91414f6edc.js → f720967ba8c5486a26a2.js} +1 -1
- package/assets/esri/themes/base/widgets/_ValuePicker.scss +27 -10
- 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/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
- package/chunks/DefaultMaterial.glsl.js +4 -4
- package/chunks/HUDMaterial.glsl.js +22 -22
- package/chunks/HeatmapDensity.glsl.js +5 -5
- package/chunks/LineMarker.glsl.js +35 -35
- package/chunks/RibbonLine.glsl.js +47 -47
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/core/Queue.js +1 -1
- package/interfaces.d.ts +290 -6
- package/intl/date.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/package.json +1 -1
- package/popup/FieldInfo.js +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/cimSymbolUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +13 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +18 -18
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/webgl/ValidatedTextureDescriptor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
- package/widgets/ValuePicker/ValuePickerCollection.js +1 -1
- package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
- package/widgets/ValuePicker/ValuePickerLabel.js +1 -1
- package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
- package/widgets/ValuePicker/ValuePickerViewModel.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/assets/esri/core/workers/chunks/009026614cae60e9505c.js +0 -1
- package/assets/esri/core/workers/chunks/415c326d268b1a8fd03f.js +0 -1
- package/assets/esri/core/workers/chunks/504e929b686570ee858d.js +0 -1
- package/assets/esri/core/workers/chunks/5c811527898eb1c04e67.js +0 -1
- package/assets/esri/core/workers/chunks/6164a9c654c38f9cb64e.js +0 -1
- package/assets/esri/core/workers/chunks/6dd99db0adce09ac9794.js +0 -1
- package/assets/esri/core/workers/chunks/7cec069db0598431829e.js +0 -1
- package/assets/esri/core/workers/chunks/8bb3b10a777ae19f57f9.js +0 -1
- package/assets/esri/core/workers/chunks/91971a76a4ae0474a878.js +0 -1
- package/assets/esri/core/workers/chunks/9ed9e2ad50816a4f937a.js +0 -1
- package/assets/esri/core/workers/chunks/b81bb096ccfcea182cc1.js +0 -1
- package/assets/esri/core/workers/chunks/d05d9ddf244bb3dcbcaa.js +0 -1
- package/assets/esri/core/workers/chunks/d3a6504fbaf555707c58.js +0 -1
package/interfaces.d.ts
CHANGED
|
@@ -5611,7 +5611,10 @@ declare namespace __esri {
|
|
|
5611
5611
|
vertCRS?: string;
|
|
5612
5612
|
}
|
|
5613
5613
|
|
|
5614
|
-
export
|
|
5614
|
+
export interface Mesh extends Geometry, Loadable {
|
|
5615
|
+
}
|
|
5616
|
+
|
|
5617
|
+
export class Mesh {
|
|
5615
5618
|
/**
|
|
5616
5619
|
* An array of mesh components that can be used to apply materials to different regions of the same mesh.
|
|
5617
5620
|
*
|
|
@@ -5732,7 +5735,7 @@ declare namespace __esri {
|
|
|
5732
5735
|
/** @deprecated Import the Mesh class instead. */
|
|
5733
5736
|
export type MeshConstructor = typeof Mesh;
|
|
5734
5737
|
|
|
5735
|
-
interface MeshProperties extends GeometryProperties {
|
|
5738
|
+
interface MeshProperties extends GeometryProperties, LoadableProperties {
|
|
5736
5739
|
/**
|
|
5737
5740
|
* An array of mesh components that can be used to apply materials to different regions of the same mesh.
|
|
5738
5741
|
*
|
|
@@ -26906,6 +26909,12 @@ declare namespace __esri {
|
|
|
26906
26909
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#formTemplate)
|
|
26907
26910
|
*/
|
|
26908
26911
|
formTemplate: FormTemplate;
|
|
26912
|
+
/**
|
|
26913
|
+
* The unique ID assigned to the layer.
|
|
26914
|
+
*
|
|
26915
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#id)
|
|
26916
|
+
*/
|
|
26917
|
+
id: string;
|
|
26909
26918
|
/**
|
|
26910
26919
|
* The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html).
|
|
26911
26920
|
*
|
|
@@ -34489,7 +34498,7 @@ declare namespace __esri {
|
|
|
34489
34498
|
/**
|
|
34490
34499
|
* A Boolean determining whether users can edit this field.
|
|
34491
34500
|
*
|
|
34492
|
-
* @default
|
|
34501
|
+
* @default true
|
|
34493
34502
|
*
|
|
34494
34503
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#isEditable)
|
|
34495
34504
|
*/
|
|
@@ -34562,7 +34571,7 @@ declare namespace __esri {
|
|
|
34562
34571
|
/**
|
|
34563
34572
|
* A Boolean determining whether users can edit this field.
|
|
34564
34573
|
*
|
|
34565
|
-
* @default
|
|
34574
|
+
* @default true
|
|
34566
34575
|
*
|
|
34567
34576
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html#isEditable)
|
|
34568
34577
|
*/
|
|
@@ -78386,7 +78395,7 @@ declare namespace __esri {
|
|
|
78386
78395
|
*
|
|
78387
78396
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-PopupView.html#popup)
|
|
78388
78397
|
*/
|
|
78389
|
-
popup: Popup;
|
|
78398
|
+
popup: PopupOptions | Popup;
|
|
78390
78399
|
/**
|
|
78391
78400
|
* Controls whether the popup opens when users click on the view.
|
|
78392
78401
|
*
|
|
@@ -78415,7 +78424,7 @@ declare namespace __esri {
|
|
|
78415
78424
|
*
|
|
78416
78425
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-PopupView.html#popup)
|
|
78417
78426
|
*/
|
|
78418
|
-
popup?: PopupProperties;
|
|
78427
|
+
popup?: PopupOptions | PopupProperties;
|
|
78419
78428
|
/**
|
|
78420
78429
|
* Controls whether the popup opens when users click on the view.
|
|
78421
78430
|
*
|
|
@@ -80322,6 +80331,164 @@ declare namespace __esri {
|
|
|
80322
80331
|
y: number;
|
|
80323
80332
|
}
|
|
80324
80333
|
|
|
80334
|
+
/**
|
|
80335
|
+
* Options for configuring the [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) on the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#popup) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup).
|
|
80336
|
+
*
|
|
80337
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80338
|
+
*/
|
|
80339
|
+
export interface PopupOptions {
|
|
80340
|
+
/**
|
|
80341
|
+
* Defines a collection of actions that may be executed by clicking the icon or image symbolizing them in the popup.
|
|
80342
|
+
*
|
|
80343
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80344
|
+
*/
|
|
80345
|
+
actions?: Collection<ActionButton | ActionToggle>;
|
|
80346
|
+
/**
|
|
80347
|
+
* Position of the popup in relation to the selected feature.
|
|
80348
|
+
*
|
|
80349
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80350
|
+
*/
|
|
80351
|
+
alignment?: "auto" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | Function;
|
|
80352
|
+
/**
|
|
80353
|
+
* When `true`, the popup is automatically closed when the [camera](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#camera) or [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) changes.
|
|
80354
|
+
*
|
|
80355
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80356
|
+
*/
|
|
80357
|
+
autoCloseEnabled?: boolean;
|
|
80358
|
+
/**
|
|
80359
|
+
* Indicates whether to enable collapse functionality for the popup.
|
|
80360
|
+
*
|
|
80361
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80362
|
+
*/
|
|
80363
|
+
collapsedEnabled?: boolean;
|
|
80364
|
+
/**
|
|
80365
|
+
* The ID or node representing the DOM element containing the widget.
|
|
80366
|
+
*
|
|
80367
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80368
|
+
*/
|
|
80369
|
+
container?: string | HTMLElement;
|
|
80370
|
+
/**
|
|
80371
|
+
* The content of the popup.
|
|
80372
|
+
*
|
|
80373
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80374
|
+
*/
|
|
80375
|
+
content?: string | HTMLElement | Widget;
|
|
80376
|
+
/**
|
|
80377
|
+
* Enables automatic creation of a popup template for layers that have popups enabled but no [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) defined.
|
|
80378
|
+
*
|
|
80379
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80380
|
+
*/
|
|
80381
|
+
defaultPopupTemplateEnabled?: boolean;
|
|
80382
|
+
/**
|
|
80383
|
+
* Indicates whether the placement of the popup is docked to the side of the view.
|
|
80384
|
+
*
|
|
80385
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80386
|
+
*/
|
|
80387
|
+
dockEnabled?: boolean;
|
|
80388
|
+
/**
|
|
80389
|
+
* Set various options for docking the popup in the View.
|
|
80390
|
+
*
|
|
80391
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80392
|
+
*/
|
|
80393
|
+
dockOptions?: PopupOptionsDockOptions;
|
|
80394
|
+
/**
|
|
80395
|
+
* An array of features associated with the popup.
|
|
80396
|
+
*
|
|
80397
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80398
|
+
*/
|
|
80399
|
+
features?: Graphic[];
|
|
80400
|
+
/**
|
|
80401
|
+
* This function provides the ability to override either the [MapView.goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) or [SceneView.goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#goTo) methods.
|
|
80402
|
+
*
|
|
80403
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80404
|
+
*/
|
|
80405
|
+
goToOverride?: GoToOverride;
|
|
80406
|
+
/**
|
|
80407
|
+
* Indicates the heading level to use for the title of the popup.
|
|
80408
|
+
*
|
|
80409
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80410
|
+
*/
|
|
80411
|
+
headingLevel?: number;
|
|
80412
|
+
/**
|
|
80413
|
+
* Highlight the selected popup feature using the [highlightOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#highlightOptions) set on the MapView or the [highlightOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlightOptions) set on the SceneView.
|
|
80414
|
+
*
|
|
80415
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80416
|
+
*/
|
|
80417
|
+
highlightEnabled?: boolean;
|
|
80418
|
+
/**
|
|
80419
|
+
* Icon which represents the widget.
|
|
80420
|
+
*
|
|
80421
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80422
|
+
*/
|
|
80423
|
+
icon?: string;
|
|
80424
|
+
/**
|
|
80425
|
+
* The unique ID assigned to the widget when the widget is created.
|
|
80426
|
+
*
|
|
80427
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80428
|
+
*/
|
|
80429
|
+
id?: string;
|
|
80430
|
+
/**
|
|
80431
|
+
* The widget's default label.
|
|
80432
|
+
*
|
|
80433
|
+
* [Read more...](global.html)
|
|
80434
|
+
*/
|
|
80435
|
+
label?: string;
|
|
80436
|
+
/**
|
|
80437
|
+
* Point used to position the popup.
|
|
80438
|
+
*
|
|
80439
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80440
|
+
*/
|
|
80441
|
+
location?: Point;
|
|
80442
|
+
/**
|
|
80443
|
+
* Defines the maximum [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) displayed at one time in the action area.
|
|
80444
|
+
*
|
|
80445
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80446
|
+
*/
|
|
80447
|
+
maxInlineActions?: number | null;
|
|
80448
|
+
/**
|
|
80449
|
+
* An array of pending Promises that have not yet been fulfilled.
|
|
80450
|
+
*
|
|
80451
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80452
|
+
*/
|
|
80453
|
+
promises?: Promise<any>[];
|
|
80454
|
+
/**
|
|
80455
|
+
* Index of the feature that is [selected](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature).
|
|
80456
|
+
*
|
|
80457
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80458
|
+
*/
|
|
80459
|
+
selectedFeatureIndex?: number;
|
|
80460
|
+
/**
|
|
80461
|
+
* Indicates whether to display a spinner at the popup location prior to its display when it has pending promises.
|
|
80462
|
+
*
|
|
80463
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80464
|
+
*/
|
|
80465
|
+
spinnerEnabled?: boolean;
|
|
80466
|
+
/**
|
|
80467
|
+
* The title of the popup.
|
|
80468
|
+
*
|
|
80469
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80470
|
+
*/
|
|
80471
|
+
title?: string;
|
|
80472
|
+
/**
|
|
80473
|
+
* This is a class that contains all the logic (properties and methods) that controls this widget's behavior.
|
|
80474
|
+
*
|
|
80475
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80476
|
+
*/
|
|
80477
|
+
viewModel?: PopupViewModel;
|
|
80478
|
+
/**
|
|
80479
|
+
* Indicates whether the popup is visible.
|
|
80480
|
+
*
|
|
80481
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80482
|
+
*/
|
|
80483
|
+
visible?: boolean;
|
|
80484
|
+
/**
|
|
80485
|
+
* The visible elements that are displayed within the widget.
|
|
80486
|
+
*
|
|
80487
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80488
|
+
*/
|
|
80489
|
+
visibleElements?: PopupVisibleElements;
|
|
80490
|
+
}
|
|
80491
|
+
|
|
80325
80492
|
export interface ViewResizeEvent {
|
|
80326
80493
|
height: number;
|
|
80327
80494
|
oldHeight: number;
|
|
@@ -80411,6 +80578,57 @@ declare namespace __esri {
|
|
|
80411
80578
|
y: number;
|
|
80412
80579
|
}
|
|
80413
80580
|
|
|
80581
|
+
export interface PopupOptionsDockOptions {
|
|
80582
|
+
/**
|
|
80583
|
+
* Defines the dimensions of the View at which to dock the popup.
|
|
80584
|
+
*
|
|
80585
|
+
* @default true
|
|
80586
|
+
*
|
|
80587
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80588
|
+
*/
|
|
80589
|
+
breakpoint?: boolean | PopupOptionsDockOptionsBreakpoint;
|
|
80590
|
+
/**
|
|
80591
|
+
* If `true`, displays the dock button.
|
|
80592
|
+
*
|
|
80593
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80594
|
+
*/
|
|
80595
|
+
buttonEnabled?: boolean;
|
|
80596
|
+
/**
|
|
80597
|
+
* The position in the view at which to dock the popup.
|
|
80598
|
+
*
|
|
80599
|
+
* @default "auto"
|
|
80600
|
+
*
|
|
80601
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80602
|
+
*/
|
|
80603
|
+
position?: | "auto"
|
|
80604
|
+
| "top-left"
|
|
80605
|
+
| "top-center"
|
|
80606
|
+
| "top-right"
|
|
80607
|
+
| "bottom-left"
|
|
80608
|
+
| "bottom-center"
|
|
80609
|
+
| "bottom-right"
|
|
80610
|
+
| Function;
|
|
80611
|
+
}
|
|
80612
|
+
|
|
80613
|
+
export interface PopupOptionsDockOptionsBreakpoint {
|
|
80614
|
+
/**
|
|
80615
|
+
* The maximum width of the View at which the popup will be docked automatically.
|
|
80616
|
+
*
|
|
80617
|
+
* @default 544
|
|
80618
|
+
*
|
|
80619
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80620
|
+
*/
|
|
80621
|
+
width?: number;
|
|
80622
|
+
/**
|
|
80623
|
+
* The maximum height of the View at which the popup will be docked automatically.
|
|
80624
|
+
*
|
|
80625
|
+
* @default 544
|
|
80626
|
+
*
|
|
80627
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#PopupOptions)
|
|
80628
|
+
*/
|
|
80629
|
+
height?: number;
|
|
80630
|
+
}
|
|
80631
|
+
|
|
80414
80632
|
export class Search extends Accessor {
|
|
80415
80633
|
/**
|
|
80416
80634
|
* Indicates whether the place finder is enabled in the web scene or the web map.
|
|
@@ -91556,6 +91774,14 @@ declare namespace __esri {
|
|
|
91556
91774
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#pageSize)
|
|
91557
91775
|
*/
|
|
91558
91776
|
pageSize: number;
|
|
91777
|
+
/**
|
|
91778
|
+
* Indicates whether to fetch geometries for features displayed in the table.
|
|
91779
|
+
*
|
|
91780
|
+
* @default false
|
|
91781
|
+
*
|
|
91782
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnGeometryEnabled)
|
|
91783
|
+
*/
|
|
91784
|
+
returnGeometryEnabled: boolean;
|
|
91559
91785
|
/**
|
|
91560
91786
|
* The state of the widget.
|
|
91561
91787
|
*
|
|
@@ -91810,6 +92036,14 @@ declare namespace __esri {
|
|
|
91810
92036
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#pageSize)
|
|
91811
92037
|
*/
|
|
91812
92038
|
pageSize?: number;
|
|
92039
|
+
/**
|
|
92040
|
+
* Indicates whether to fetch geometries for features displayed in the table.
|
|
92041
|
+
*
|
|
92042
|
+
* @default false
|
|
92043
|
+
*
|
|
92044
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnGeometryEnabled)
|
|
92045
|
+
*/
|
|
92046
|
+
returnGeometryEnabled?: boolean;
|
|
91813
92047
|
/**
|
|
91814
92048
|
* The associated [template](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) used for the feature table.
|
|
91815
92049
|
*
|
|
@@ -91941,6 +92175,14 @@ declare namespace __esri {
|
|
|
91941
92175
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#multiSortEnabled)
|
|
91942
92176
|
*/
|
|
91943
92177
|
multiSortEnabled: boolean;
|
|
92178
|
+
/**
|
|
92179
|
+
* Indicates whether to fetch geometries for features displayed in the table.
|
|
92180
|
+
*
|
|
92181
|
+
* @default false
|
|
92182
|
+
*
|
|
92183
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnGeometryEnabled)
|
|
92184
|
+
*/
|
|
92185
|
+
returnGeometryEnabled: boolean;
|
|
91944
92186
|
/**
|
|
91945
92187
|
* The view model's state.
|
|
91946
92188
|
*
|
|
@@ -92146,6 +92388,14 @@ declare namespace __esri {
|
|
|
92146
92388
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#multiSortEnabled)
|
|
92147
92389
|
*/
|
|
92148
92390
|
multiSortEnabled?: boolean;
|
|
92391
|
+
/**
|
|
92392
|
+
* Indicates whether to fetch geometries for features displayed in the table.
|
|
92393
|
+
*
|
|
92394
|
+
* @default false
|
|
92395
|
+
*
|
|
92396
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnGeometryEnabled)
|
|
92397
|
+
*/
|
|
92398
|
+
returnGeometryEnabled?: boolean;
|
|
92149
92399
|
/**
|
|
92150
92400
|
* The associated [template](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) used for the feature table.
|
|
92151
92401
|
*
|
|
@@ -102732,6 +102982,23 @@ declare namespace __esri {
|
|
|
102732
102982
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions)
|
|
102733
102983
|
*/
|
|
102734
102984
|
reshapeOptions?: SketchViewModelDefaultUpdateOptionsReshapeOptions;
|
|
102985
|
+
/**
|
|
102986
|
+
* Options that control when to display or hide highlights for update operations.
|
|
102987
|
+
*
|
|
102988
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions)
|
|
102989
|
+
*/
|
|
102990
|
+
highlightOptions?: SketchViewModelDefaultUpdateOptionsHighlightOptions;
|
|
102991
|
+
}
|
|
102992
|
+
|
|
102993
|
+
export interface SketchViewModelDefaultUpdateOptionsHighlightOptions {
|
|
102994
|
+
/**
|
|
102995
|
+
* Indicates if highlighting is enabled for update operations.
|
|
102996
|
+
*
|
|
102997
|
+
* @default true
|
|
102998
|
+
*
|
|
102999
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions)
|
|
103000
|
+
*/
|
|
103001
|
+
enabled?: boolean;
|
|
102735
103002
|
}
|
|
102736
103003
|
|
|
102737
103004
|
export interface SketchViewModelDefaultUpdateOptionsReshapeOptions {
|
|
@@ -103106,6 +103373,23 @@ declare namespace __esri {
|
|
|
103106
103373
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions)
|
|
103107
103374
|
*/
|
|
103108
103375
|
reshapeOptions?: SketchDefaultUpdateOptionsReshapeOptions;
|
|
103376
|
+
/**
|
|
103377
|
+
* Options that control when to display or hide highlights for update operations.
|
|
103378
|
+
*
|
|
103379
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions)
|
|
103380
|
+
*/
|
|
103381
|
+
highlightOptions?: SketchDefaultUpdateOptionsHighlightOptions;
|
|
103382
|
+
}
|
|
103383
|
+
|
|
103384
|
+
export interface SketchDefaultUpdateOptionsHighlightOptions {
|
|
103385
|
+
/**
|
|
103386
|
+
* Indicates if highlighting is enabled for update operations.
|
|
103387
|
+
*
|
|
103388
|
+
* @default true
|
|
103389
|
+
*
|
|
103390
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions)
|
|
103391
|
+
*/
|
|
103392
|
+
enabled?: boolean;
|
|
103109
103393
|
}
|
|
103110
103394
|
|
|
103111
103395
|
export interface SketchDefaultUpdateOptionsReshapeOptions {
|
package/intl/date.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.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{strict as t}from"../core/jsonMap.js";import{beforeLocaleChange as o,getLocale as e}from"./locale.js";import{DateTime as r}from"luxon";const n={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},h={
|
|
5
|
+
import{strict as t}from"../core/jsonMap.js";import{beforeLocaleChange as o,getLocale as e}from"./locale.js";import{DateTime as r}from"luxon";const n={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},h={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},m={timeZone:"Etc/UTC"},i={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},l={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},y={hour:"numeric",minute:"numeric"},g={...y,second:"numeric"},u={"short-date":i,"short-date-short-time":{...i,...y},"short-date-short-time-24":{...i,...y,hour12:!1},"short-date-long-time":{...i,...g},"short-date-long-time-24":{...i,...g,hour12:!1},"short-date-le":i,"short-date-le-short-time":{...i,...y},"short-date-le-short-time-24":{...i,...y,hour12:!1},"short-date-le-long-time":{...i,...g},"short-date-le-long-time-24":{...i,...g,hour12:!1},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...y},"long-month-day-year-short-time-24":{...s,...y,hour12:!1},"long-month-day-year-long-time":{...s,...g},"long-month-day-year-long-time-24":{...s,...g,hour12:!1},"day-short-month-year":l,"day-short-month-year-short-time":{...l,...y},"day-short-month-year-short-time-24":{...l,...y,hour12:!1},"day-short-month-year-long-time":{...l,...g},"day-short-month-year-long-time-24":{...l,...g,hour12:!1},"long-date":d,"long-date-short-time":{...d,...y},"long-date-short-time-24":{...d,...y,hour12:!1},"long-date-long-time":{...d,...g},"long-date-long-time-24":{...d,...g,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":y,"long-time":g},c=t()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),D={ar:"ar-u-nu-latn-ca-gregory"};let T=new WeakMap,S=u["short-date-short-time"];function L(t){const o=t||S;let r=T.get(o);if(!r){const t=e(),n=D[t]||t;r=new Intl.DateTimeFormat(n,o),T.set(o,r)}return r}function M(t){return u[t]}function f(t,o){return L(o).format(t)}function Y(t,o=u["short-date"]){return f(new Date(t),{...o,...m,...a})}function p(t,o=u["short-time"]){return f(new Date(`1970-01-01T${t}Z`),{...o,...m,...n})}function v(t,o=u["short-date-short-time"]){const n=r.fromISO(t,{setZone:!0}),a=e(),h=D[a]??a;return n.toLocaleString(o,{locale:h})}o((()=>{T=new WeakMap,S=u["short-date-short-time"]}));export{M as convertDateFormatToIntlOptions,c as dateFormatJSONMap,f as formatDate,Y as formatDateOnly,p as formatTimeOnly,v as formatTimestamp,L as getDateTimeFormatter,h as systemTimeZone,m as utcTimeZone};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import t from"../core/Error.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{ensureClass as l,Integer as p}from"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{enumeration as m}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import c from"./Layer.js";import{ArcGISService as d}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as f}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RefreshableLayer as j}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as R}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{legendEnabled as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import t from"../core/Error.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{ensureClass as l,Integer as p}from"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{enumeration as m}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import c from"./Layer.js";import{ArcGISService as d}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as f}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RefreshableLayer as j}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as R}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{legendEnabled as w}from"./support/commonProperties.js";import b from"./support/Field.js";import{interpolationKebab as I}from"./support/rasterEnums.js";import P from"./support/RasterFunction.js";import T from"./support/rasterDatasets/FunctionRaster.js";import O from"./support/rasterDatasets/RasterFactory.js";import{create as x,getPrimaryRasterUrls as F}from"./support/rasterFunctions/rasterFunctionHelper.js";import{createPopupTemplate as L}from"../support/popupUtils.js";let N=class extends(h(R(g(v(y(f(S(d(j(i(c))))))))))){constructor(...e){super(...e),this._primaryRasters=null,this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(o).then((()=>this._openRaster(r)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[new b({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"}),new b({name:"Raster.ServicePixelValue.Raw",alias:"Raw Pixel Value",domain:null,editable:!1,length:50,type:"string"})],{rasterInfo:r}=this,t=r?.attributeTable,s=null!=t?t.fields:null,i="Raster.";if(s){const r=s.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const r=e.clone();return r.name=i+e.name,r}));e.push(...r)}const o=r?.dataType,a=r?.multidimensionalInfo;if(("vector-magdir"===o||"vector-uv"===o)&&null!=a){const r=a.variables[0].unit?.trim(),t="Magnitude"+(r?` (${r})`:"");e.push(new b({name:"Raster.Magnitude",alias:t,domain:null,editable:!1,type:"double"})),e.push(new b({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}createPopupTemplate(e){const{rasterFields:r}=this,t=new Set(r.map((({name:e})=>e)).filter((e=>"raster.servicepixelvalue.raw"!==e.toLowerCase())));return L({fields:r,title:this.title},{...e,visibleFieldNames:t})}async generateRasterInfo(e,r){if(!(e=l(P,e)))return this.rasterInfo;try{const t={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>t[e.url]=e));const s=x(e.rasterFunctionDefinition??e.toJSON(),t),i=new T({rasterFunction:s});return await i.open(r),i.rasterInfo}catch(s){if(s instanceof t)throw s;throw new t("imagery-tile-layer","the given raster function is not supported")}}write(e,r){const{raster:s}=this;if(this.loaded?"RasterTileServer"===s.datasetFormat&&("Raster"===s.tileType||"Map"===s.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,r);if(r&&r.messages){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`;r.messages.push(new t("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let r=!1;if(this.raster)this.raster.rasterInfo||await this.raster.open(),"Function"===this.raster.datasetFormat?(r=!0,this._primaryRasters=this.raster.primaryRasters.rasters):this._primaryRasters=[this.raster],this.url=this.raster.url;else{const{rasterFunction:r}=this,i=[this.url];r&&F(r.toJSON(),i);const a=await Promise.all(i.map((r=>O.open({url:r,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e})))),n=a.findIndex((e=>null==e));if(n>-1)throw new t("imagery-tile-layer:open",`cannot open raster: ${i[n]}`);if(this._primaryRasters=a,r){const e={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((r=>e[r.url]=r));const i=x(r.rasterFunctionDefinition??r.toJSON(),e),n=new T({rasterFunction:i});try{await n.open(),this.raster=n}catch(o){const e=s.getLogger(this);o instanceof t&&e.error("imagery-tile-layer:open",o.message),e.warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=a[0]}}else this.raster=a[0]}const i=this.raster.rasterInfo;if(!i)throw new t("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("rasterInfo",r?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.rasterInfo.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(a((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}};e([n()],N.prototype,"_primaryRasters",void 0),e([n({type:[p],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],N.prototype,"bandIds",void 0),e([n({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),m(I)],N.prototype,"interpolation",void 0),e([n(w)],N.prototype,"legendEnabled",void 0),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],N.prototype,"isReference",void 0),e([n({type:["show","hide"]})],N.prototype,"listMode",void 0),e([n({json:{read:!0,write:!0}})],N.prototype,"blendMode",void 0),e([n()],N.prototype,"sourceJSON",void 0),e([n({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],N.prototype,"version",void 0),e([n({readOnly:!0,json:{read:!1}})],N.prototype,"type",void 0),e([n({type:["ArcGISTiledImageServiceLayer"]})],N.prototype,"operationalLayerType",void 0),e([n({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,r,t){r[t]=!e}}}})],N.prototype,"popupEnabled",void 0),e([n({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],N.prototype,"popupTemplate",void 0),e([n({readOnly:!0})],N.prototype,"defaultPopupTemplate",null),e([n({readOnly:!0,type:[b]})],N.prototype,"fields",void 0),e([n({readOnly:!0,type:[b]})],N.prototype,"rasterFields",null),N=e([u("esri.layers.ImageryTileLayer")],N);const _=N;export{_ as default};
|
package/layers/WMSLayer.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.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../config.js";import r from"../Graphic.js";import o from"../PopupTemplate.js";import s from"../request.js";import i from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{JSONMap as n}from"../core/jsonMap.js";import{clone as l}from"../core/lang.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as m}from"../core/promiseUtils.js";import{on as u,watch as c,sync as f}from"../core/reactiveUtils.js";import{addQueryParameters as y,addProxy as d,Url as h}from"../core/urlUtils.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import{Integer as b}from"../core/accessorSupport/ensureType.js";import{reader as v}from"../core/accessorSupport/decorators/reader.js";import{subclass as w}from"../core/accessorSupport/decorators/subclass.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{willPropertyWrite as j}from"../core/accessorSupport/write.js";import I from"../geometry/Extent.js";import S from"../geometry/SpatialReference.js";import{getScale as F}from"../geometry/support/scaleUtils.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import R from"./Layer.js";import{BlendLayer as P}from"./mixins/BlendLayer.js";import{OperationalLayer as O}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{RefreshableLayer as U}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as M}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as T}from"./mixins/TemporalLayer.js";import{isAxesOrderReversedForWkid as _}from"./ogc/crsUtils.js";import{isWmsServer as C}from"./support/arcgisLayerUrl.js";import{legendEnabled as W,url as $}from"./support/commonProperties.js";import{ExportWMSImageParameters as q}from"./support/ExportWMSImageParameters.js";import{createBitmap as N}from"./support/imageBitmapUtils.js";import B from"./support/WMSSublayer.js";import{normalizeWKID as H,toISOString as k,getPopupLayers as G,parseCapabilities as A}from"./support/wmsUtils.js";const D=new n({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function J(e){return"text/html"===e}function V(e){return"text/plain"===e}let Q=class extends(P(T(U(M(O(L(p(R)))))))){constructor(...e){super(...e),this.allSublayers=new a({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.url=null,this.version=null,this.addHandles([u((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),f),u((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),f),c((()=>this.sublayers),((e,t)=>{if(t)for(const r of t)r.layer=r.parent=null;if(e)for(const r of e)r.parent=r.layer=this}),f)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(m).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new I({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(J)??this.featureInfoFormats.find(V)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(J(e)||V(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new S(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return K(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return K(t.layers,r)}writeSublayers(e,t,r,o){t.layers=[];const s=new Map,i=e.flatten((({sublayers:e})=>e??[]));for(const a of i)if("number"==typeof a.parent?.id){const e=s.get(a.parent.id);null!=e?e.push(a.id):s.set(a.parent.id,[a.id])}for(const a of i){const e={sublayer:a,...o},r=a.write({parentLayerId:"number"==typeof a.parent?.id?a.parent.id:-1},e);if(s.has(a.id)&&(r.sublayerIds=s.get(a.id)),!a.sublayers&&a.name){const r=a.write({},e);delete r.id,t.layers.push(r)}}t.visibleLayers=i.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}createExportImageParameters(e,t,r,o){const s=o?.pixelRatio??1,i=F({extent:e,width:t})*s,a=new q({layer:this,scale:i}),{xmin:n,ymin:l,xmax:p,ymax:m,spatialReference:u}=e,c=H(u,this.spatialReferences),f="1.3.0"===this.version&&_(c)?`${l},${n},${m},${p}`:`${n},${l},${p},${m}`,y=a.toJSON();return{bbox:f,["1.3.0"===this.version?"crs":"srs"]:null==c||isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,o){const i=this.mapUrl,a=this.createExportImageParameters(e,t,r,o);if(!a.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const n=o?.timeExtent?.start,l=o?.timeExtent?.end,p=null!=n&&null!=l?n.getTime()===l.getTime()?k(n):`${k(n)}/${k(l)}`:void 0,m={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...a,time:p,...this.refreshParameters}),signal:o?.signal};return s(i??"",m).then((e=>e.data))}async fetchImageBitmap(e,t,r,o){const i=this.mapUrl??"",a=this.createExportImageParameters(e,t,r,o);if(!a.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const n=o?.timeExtent?.start,l=o?.timeExtent?.end,p=null!=n&&null!=l?n.getTime()===l.getTime()?k(n):`${k(n)}/${k(l)}`:void 0,m={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...a,time:p,...this.refreshParameters}),signal:o?.signal},{data:u}=await s(i,m);return N(u,i,o?.signal)}fetchFeatureInfo(e,t,r,o,s){const i=F({extent:e,width:t}),a=new q({layer:this,scale:i}),n=G(a.visibleSublayers);if(null==this.featureInfoUrl||null==n)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:o,J:s}:{x:o,y:s},p={query_layers:n,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},m={...this.createExportImageParameters(e,t,r),...p},u=this._mixCustomParameters(m);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(u):this._defaultFetchFeatureInfoFunction(y(this.featureInfoUrl,u))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return C(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?S.WebMercator:new S({wkid:t});return E(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=d(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const s=new o({title:this.title,content:t}),i=new r({sourceLayer:this,popupTemplate:s});return Promise.resolve([i])}async _fetchService(e){if(!this.resourceInfo){const{path:t,query:r}=this.parsedUrl??{};r?.service&&(r.SERVICE=r.service,delete r.service),r?.request&&(r.REQUEST=r.request,delete r.request);const{data:o}=await s(t??"",{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=A(o)}if(this.parsedUrl){const e=new h(this.parsedUrl.path),{httpsDomains:r}=t.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||r.includes(e.host)||r.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function z(e,t){return e.some((e=>{for(const r in e)if(j(e,r,null,t))return!0;return!1}))}function K(e,t,r){e=e??[];const o=new Map;e.every((e=>null==e.id))&&(e=l(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new B;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),o.set(e.id,e)}const s=[];for(const a of e){const e=null!=a.id?o.get(a.id):null;if(e)if(null!=a.parentLayerId&&a.parentLayerId>=0){const t=o.get(a.parentLayerId);if(!t)continue;t.sublayers||(t.sublayers=new i),t.sublayers.push(e)}else s.push(e)}return s}e([g({readOnly:!0})],Q.prototype,"allSublayers",void 0),e([g({json:{type:Object,write:!0}})],Q.prototype,"customParameters",void 0),e([g({json:{type:Object,write:!0}})],Q.prototype,"customLayerParameters",void 0),e([g({type:String,json:{write:!0}})],Q.prototype,"copyright",void 0),e([g()],Q.prototype,"description",void 0),e([g({readOnly:!0})],Q.prototype,"dimensions",void 0),e([g({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Q.prototype,"fullExtent",void 0),e([v(["web-document","portal-item"],"fullExtent",["extent"])],Q.prototype,"readFullExtentFromItemOrMap",null),e([x(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Q.prototype,"writeFullExtent",null),e([g()],Q.prototype,"fullExtents",void 0),e([g({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"featureInfoFormat",null),e([g({type:[String],readOnly:!0})],Q.prototype,"featureInfoFormats",void 0),e([g({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"featureInfoUrl",void 0),e([g()],Q.prototype,"fetchFeatureInfoFunction",void 0),e([g({type:String,json:{origins:{"web-document":{default:"image/png",type:D.jsonValues,read:{reader:D.read,source:"format"},write:{writer:D.write,target:"format"}}}}})],Q.prototype,"imageFormat",void 0),e([v("imageFormat",["supportedImageFormatTypes"])],Q.prototype,"readImageFormat",null),e([g({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Q.prototype,"imageMaxHeight",void 0),e([g({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Q.prototype,"imageMaxWidth",void 0),e([g()],Q.prototype,"imageTransparency",void 0),e([g(W)],Q.prototype,"legendEnabled",void 0),e([g({type:["show","hide","hide-children"]})],Q.prototype,"listMode",void 0),e([g({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"mapUrl",void 0),e([g({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Q.prototype,"isReference",void 0),e([g({type:["WMS"]})],Q.prototype,"operationalLayerType",void 0),e([g()],Q.prototype,"resourceInfo",void 0),e([g({type:S,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Q.prototype,"spatialReference",void 0),e([v(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Q.prototype,"readSpatialReferenceFromItemOrDocument",null),e([g({type:[b],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Q.prototype,"spatialReferences",void 0),e([x(["web-document","portal-item"],"spatialReferences")],Q.prototype,"writeSpatialReferences",null),e([g({type:i.ofType(B),json:{write:{target:"layers",overridePolicy(e,t,r){if(z(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Q.prototype,"sublayers",void 0),e([v(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Q.prototype,"readSublayersFromItemOrMap",null),e([v("service","sublayers",["layers"])],Q.prototype,"readSublayers",null),e([x("sublayers",{layers:{type:[B]},visibleLayers:{type:[String]}})],Q.prototype,"writeSublayers",null),e([g({json:{read:!1},readOnly:!0,value:"wms"})],Q.prototype,"type",void 0),e([g($)],Q.prototype,"url",void 0),e([g({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"version",void 0),Q=e([w("esri.layers.WMSLayer")],Q);const X=Q;export{X as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../config.js";import r from"../Graphic.js";import o from"../PopupTemplate.js";import s from"../request.js";import i from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{JSONMap as n}from"../core/jsonMap.js";import{clone as l}from"../core/lang.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as m}from"../core/promiseUtils.js";import{on as u,watch as c,sync as f}from"../core/reactiveUtils.js";import{urlToObject as y,addQueryParameters as d,addProxy as h,Url as g}from"../core/urlUtils.js";import{property as b}from"../core/accessorSupport/decorators/property.js";import{Integer as w}from"../core/accessorSupport/ensureType.js";import{reader as v}from"../core/accessorSupport/decorators/reader.js";import{subclass as x}from"../core/accessorSupport/decorators/subclass.js";import{writer as j}from"../core/accessorSupport/decorators/writer.js";import{willPropertyWrite as I}from"../core/accessorSupport/write.js";import S from"../geometry/Extent.js";import F from"../geometry/SpatialReference.js";import{getScale as P}from"../geometry/support/scaleUtils.js";import{equals as R}from"../geometry/support/spatialReferenceUtils.js";import E from"./Layer.js";import{BlendLayer as O}from"./mixins/BlendLayer.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as U}from"./mixins/PortalLayer.js";import{RefreshableLayer as M}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as T}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as _}from"./mixins/TemporalLayer.js";import{isAxesOrderReversedForWkid as $}from"./ogc/crsUtils.js";import{isWmsServer as C}from"./support/arcgisLayerUrl.js";import{legendEnabled as W,url as q}from"./support/commonProperties.js";import{ExportWMSImageParameters as N}from"./support/ExportWMSImageParameters.js";import{createBitmap as B}from"./support/imageBitmapUtils.js";import H from"./support/WMSSublayer.js";import{normalizeWKID as k,toISOString as G,getPopupLayers as A,parseCapabilities as D}from"./support/wmsUtils.js";const J=new n({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function V(e){return"text/html"===e}function z(e){return"text/plain"===e}let Q=class extends(O(_(M(T(L(U(p(E)))))))){constructor(...e){super(...e),this.allSublayers=new a({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([u((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),f),u((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),f),c((()=>this.sublayers),((e,t)=>{if(t)for(const r of t)r.layer=r.parent=null;if(e)for(const r of e)r.parent=r.layer=this}),f)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(m).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new S({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(V)??this.featureInfoFormats.find(z)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(V(e)||z(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new F(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return X(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return X(t.layers,r)}writeSublayers(e,t,r,o){t.layers=[];const s=new Map,i=e.flatten((({sublayers:e})=>e??[]));for(const a of i)if("number"==typeof a.parent?.id){const e=s.get(a.parent.id);null!=e?e.push(a.id):s.set(a.parent.id,[a.id])}for(const a of i){const e={sublayer:a,...o},r=a.write({parentLayerId:"number"==typeof a.parent?.id?a.parent.id:-1},e);if(s.has(a.id)&&(r.sublayerIds=s.get(a.id)),!a.sublayers&&a.name){const r=a.write({},e);delete r.id,t.layers.push(r)}}t.visibleLayers=i.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=y(e);for(const s in r)/^(request|service)$/i.test(s)&&delete r[s];const o=d(t,r??{});this._set("url",o)}createExportImageParameters(e,t,r,o){const s=o?.pixelRatio??1,i=P({extent:e,width:t})*s,a=new N({layer:this,scale:i}),{xmin:n,ymin:l,xmax:p,ymax:m,spatialReference:u}=e,c=k(u,this.spatialReferences),f="1.3.0"===this.version&&$(c)?`${l},${n},${m},${p}`:`${n},${l},${p},${m}`,y=a.toJSON();return{bbox:f,["1.3.0"===this.version?"crs":"srs"]:null==c||isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,o){const i=this.mapUrl,a=this.createExportImageParameters(e,t,r,o);if(!a.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const n=o?.timeExtent?.start,l=o?.timeExtent?.end,p=null!=n&&null!=l?n.getTime()===l.getTime()?G(n):`${G(n)}/${G(l)}`:void 0,m={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...a,time:p,...this.refreshParameters}),signal:o?.signal};return s(i??"",m).then((e=>e.data))}async fetchImageBitmap(e,t,r,o){const i=this.mapUrl??"",a=this.createExportImageParameters(e,t,r,o);if(!a.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const n=o?.timeExtent?.start,l=o?.timeExtent?.end,p=null!=n&&null!=l?n.getTime()===l.getTime()?G(n):`${G(n)}/${G(l)}`:void 0,m={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...a,time:p,...this.refreshParameters}),signal:o?.signal},{data:u}=await s(i,m);return B(u,i,o?.signal)}fetchFeatureInfo(e,t,r,o,s){const i=P({extent:e,width:t}),a=new N({layer:this,scale:i}),n=A(a.visibleSublayers);if(null==this.featureInfoUrl||null==n)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:o,J:s}:{x:o,y:s},p={query_layers:n,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},m={...this.createExportImageParameters(e,t,r),...p},u=this._mixCustomParameters(m);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(u):this._defaultFetchFeatureInfoFunction(d(this.featureInfoUrl,u))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return C(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?F.WebMercator:new F({wkid:t});return R(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=h(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const s=new o({title:this.title,content:t}),i=new r({sourceLayer:this,popupTemplate:s});return Promise.resolve([i])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:o}=await s(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=D(o)}if(this.parsedUrl){const e=new g(this.parsedUrl.path),{httpsDomains:r}=t.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||r.includes(e.host)||r.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function K(e,t){return e.some((e=>{for(const r in e)if(I(e,r,null,t))return!0;return!1}))}function X(e,t,r){e=e??[];const o=new Map;e.every((e=>null==e.id))&&(e=l(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new H;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),o.set(e.id,e)}const s=[];for(const a of e){const e=null!=a.id?o.get(a.id):null;if(e)if(null!=a.parentLayerId&&a.parentLayerId>=0){const t=o.get(a.parentLayerId);if(!t)continue;t.sublayers||(t.sublayers=new i),t.sublayers.push(e)}else s.push(e)}return s}e([b({readOnly:!0})],Q.prototype,"allSublayers",void 0),e([b({json:{type:Object,write:!0}})],Q.prototype,"customParameters",void 0),e([b({json:{type:Object,write:!0}})],Q.prototype,"customLayerParameters",void 0),e([b({type:String,json:{write:!0}})],Q.prototype,"copyright",void 0),e([b()],Q.prototype,"description",void 0),e([b({readOnly:!0})],Q.prototype,"dimensions",void 0),e([b({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Q.prototype,"fullExtent",void 0),e([v(["web-document","portal-item"],"fullExtent",["extent"])],Q.prototype,"readFullExtentFromItemOrMap",null),e([j(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Q.prototype,"writeFullExtent",null),e([b()],Q.prototype,"fullExtents",void 0),e([b({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"featureInfoFormat",null),e([b({type:[String],readOnly:!0})],Q.prototype,"featureInfoFormats",void 0),e([b({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"featureInfoUrl",void 0),e([b()],Q.prototype,"fetchFeatureInfoFunction",void 0),e([b({type:String,json:{origins:{"web-document":{default:"image/png",type:J.jsonValues,read:{reader:J.read,source:"format"},write:{writer:J.write,target:"format"}}}}})],Q.prototype,"imageFormat",void 0),e([v("imageFormat",["supportedImageFormatTypes"])],Q.prototype,"readImageFormat",null),e([b({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Q.prototype,"imageMaxHeight",void 0),e([b({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Q.prototype,"imageMaxWidth",void 0),e([b()],Q.prototype,"imageTransparency",void 0),e([b(W)],Q.prototype,"legendEnabled",void 0),e([b({type:["show","hide","hide-children"]})],Q.prototype,"listMode",void 0),e([b({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"mapUrl",void 0),e([b({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Q.prototype,"isReference",void 0),e([b({type:["WMS"]})],Q.prototype,"operationalLayerType",void 0),e([b()],Q.prototype,"resourceInfo",void 0),e([b({type:F,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Q.prototype,"spatialReference",void 0),e([v(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Q.prototype,"readSpatialReferenceFromItemOrDocument",null),e([b({type:[w],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Q.prototype,"spatialReferences",void 0),e([j(["web-document","portal-item"],"spatialReferences")],Q.prototype,"writeSpatialReferences",null),e([b({type:i.ofType(H),json:{write:{target:"layers",overridePolicy(e,t,r){if(K(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Q.prototype,"sublayers",void 0),e([v(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Q.prototype,"readSublayersFromItemOrMap",null),e([v("service","sublayers",["layers"])],Q.prototype,"readSublayers",null),e([j("sublayers",{layers:{type:[H]},visibleLayers:{type:[String]}})],Q.prototype,"writeSublayers",null),e([b({json:{read:!1},readOnly:!0,value:"wms"})],Q.prototype,"type",void 0),e([b(q)],Q.prototype,"url",null),e([b({type:String,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"version",void 0),Q=e([x("esri.layers.WMSLayer")],Q);const Y=Q;export{Y as default};
|