@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230922
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/Graphic.js +1 -1
- package/arcade/ArcadeDate.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/featureset/support/StatsField.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{2cb36f9686693234991a.js → 07a2dab2f645dcd7d8d6.js} +1 -1
- package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
- package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
- package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
- package/assets/esri/core/workers/chunks/{072b4e041b8630c513a0.js → 243b1f9b2fba02946481.js} +1 -1
- package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
- package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
- package/assets/esri/core/workers/chunks/28a5ef2e2daa4207dd8b.js +1 -0
- package/assets/esri/core/workers/chunks/2b017e1aa1be71974c2e.js +1 -0
- package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
- package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 4bcca5fffb1fcc2d4353.js} +1 -1
- package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
- package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
- package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
- package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
- package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
- package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
- package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
- package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
- package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
- package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
- package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
- package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
- package/assets/esri/core/workers/chunks/78e7af899d9d50aa7e74.js +1 -0
- package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
- package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
- package/assets/esri/core/workers/chunks/83a15aa4b1c5252c651b.js +1 -0
- package/assets/esri/core/workers/chunks/85e436decdd693f240ee.js +1 -0
- package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
- package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
- package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
- package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
- package/assets/esri/core/workers/chunks/{21a9c8aa2a9e9990df41.js → b499b4fa771e8c422b43.js} +1 -1
- package/assets/esri/core/workers/chunks/bffad8aec92f982cc75a.js +1 -0
- package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
- package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → e14da83329f7771135bc.js} +2 -2
- package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
- package/assets/esri/core/workers/chunks/fb87fd64411b78afea23.js +1 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
- 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/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/has.js +1 -1
- package/core/sql/DateOnly.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql.js +1 -1
- package/identity/IdentityForm.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +28 -199
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +5 -0
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
- package/layers/orientedImagery/core/utils.js +5 -0
- package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
- package/layers/support/fieldProperties.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/support/EditMomentStack.js +5 -0
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/ManagedCanvas.js +5 -0
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/webgl/GroupContainer.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/featureEditing.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
- package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
- package/views/View.js +1 -1
- package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
- package/views/interactive/tooltip/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/constraintUtils.js +1 -1
- package/views/interactive/tooltip/content/Fields.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/contextUtils.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/AreaMeasurement3D.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/BuildingExplorer.js +1 -1
- package/widgets/Compass.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions/components/SaveLayer.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/PanelToolbar.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/components/UploadDetails.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile/components/Statistics.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureContent.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/Feature/support/FeatureContentMixin.js +1 -1
- package/widgets/Feature/support/FeatureElementInfo.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Features/FeaturesRelatedRecords.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Histogram.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/Classic.js +1 -1
- package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
- package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
- package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
- package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/LabeledSlider.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Zoom/IconButton.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ClassedColorSlider.js +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSlider.js +1 -1
- package/widgets/smartMapping/HeatmapSlider.js +1 -1
- package/widgets/smartMapping/OpacitySlider.js +1 -1
- package/widgets/smartMapping/SizeSlider.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/DatePicker.js +1 -1
- package/widgets/support/Heading.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/MeasurementWidgetContent.js +1 -1
- package/widgets/support/Popover.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/TimePicker.js +1 -1
- package/widgets/support/TimezonePicker.js +1 -1
- package/widgets/support/UnitSelect.js +1 -1
- package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
- package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
- package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
- package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
- package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
- package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
- package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
- package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
- package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
- package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
- package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
- package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
- package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
- package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
- package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
- package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
- package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
- package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
- package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
- package/core/watchUtils.d.ts +0 -4
- package/core/watchUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{tooltipKeys as n}from"../keybindings.js";import{base as o}from"./css.js";import s from"../../../widgets/Widget.js";import{loadCalciteComponents as l}from"../../../widgets/support/componentsUtils.js";import"../../../widgets/support/widgetUtils.js";import{tsx as u}from"../../../widgets/support/jsxFactory.js";const r=`${o}-editable-field`,a={base:r,inputMode:`${r}--input`,locked:`${r}--locked`,title:`${r}__title`,titleContent:`${r}__title__content`,value:`${r}__value`,valueContent:`${r}__value__content`,input:`${r}__input`,inputDisabled:`${r}__input--disabled`,inputReadOnly:`${r}__input--read-only`,inputSuffix:`${r}__input-suffix`,button:`${r}__button`};let c=class extends s{constructor(){super(...arguments),this._input=null,this._afterInputCreate=t=>{this._input=t},this._selectText=()=>{requestAnimationFrame((()=>{this._input?.select()}))},this._onKeyDown=t=>{t.key===n.discard&&this._discard()},this._onInputKeyDown=t=>{switch(t.key){case n.commit:return this._commit({type:"commit-and-exit",allowLockingCurrentValue:!0});case n.next:return t.stopPropagation(),this._commit({type:t.shiftKey?"commit-and-previous":"commit-and-next",allowLockingCurrentValue:!1})}},this._onInput=t=>{this.field.inputValue=t.target.value},this._onLockClick=()=>{const{field:t}=this;t.locked?t.unlock():this._lock()}}loadDependencies(){return l({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js")})}render(){const{mode:t,field:e}=this,i="input"===t,{locked:n}=e;return u("div",{class:this.classes({[a.base]:!0,[a.inputMode]:"input"===t,[a.locked]:n})},u("div",{key:"title"
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{tooltipKeys as n}from"../keybindings.js";import{base as o}from"./css.js";import s from"../../../widgets/Widget.js";import{loadCalciteComponents as l}from"../../../widgets/support/componentsUtils.js";import"../../../widgets/support/widgetUtils.js";import{tsx as u}from"../../../widgets/support/jsxFactory.js";const r=`${o}-editable-field`,a={base:r,inputMode:`${r}--input`,locked:`${r}--locked`,title:`${r}__title`,titleContent:`${r}__title__content`,value:`${r}__value`,valueContent:`${r}__value__content`,input:`${r}__input`,inputDisabled:`${r}__input--disabled`,inputReadOnly:`${r}__input--read-only`,inputSuffix:`${r}__input-suffix`,button:`${r}__button`};let c=class extends s{constructor(){super(...arguments),this._input=null,this._afterInputCreate=t=>{this._input=t},this._selectText=()=>{requestAnimationFrame((()=>{this._input?.select()}))},this._onKeyDown=t=>{t.key===n.discard&&this._discard()},this._onInputKeyDown=t=>{switch(t.key){case n.commit:return this._commit({type:"commit-and-exit",allowLockingCurrentValue:!0});case n.next:return t.stopPropagation(),this._commit({type:t.shiftKey?"commit-and-previous":"commit-and-next",allowLockingCurrentValue:!1})}},this._onInput=t=>{this.field.inputValue=t.target.value},this._onLockClick=()=>{const{field:t}=this;t.locked?t.unlock():this._lock()}}loadDependencies(){return l({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js")})}render(){const{mode:t,field:e}=this,i="input"===t,{locked:n}=e;return u("div",{class:this.classes({[a.base]:!0,[a.inputMode]:"input"===t,[a.locked]:n})},u("div",{class:a.title,key:"title"},u("div",{class:a.titleContent,key:"title-content"},this._title,n&&!i?u("calcite-icon",{icon:"lock",key:"icon",scale:"s"}):null)),u("div",{class:a.value,key:"value"},i?this._renderInput():u("span",{key:"formatted-value"},this._feedbackValue)))}get _initialValue(){const{field:t}=this;return null!=t.actual?t.toInputUnits(t.actual,this.context).value:null}get _feedbackValue(){const{context:t,field:e}=this,{actual:i,committed:n,format:o}=e;return null!=n?o(n,t):null!=i?o(i,t):""}get _displayValue(){const{field:t}=this,{inputValue:e,committed:i}=t;return null!=e?e:null!=i?this._toString(t.toInputUnits(i,this.context).value):this._toString(this._initialValue)}get _suffix(){const{suffix:t}=this.field;return"string"==typeof t?t:t(this.context)}get _title(){const{title:t}=this.field;return"string"==typeof t?t:t(this.context)}_renderInput(){const{disabled:t,locked:e,readOnly:i}=this.field;return u("div",{class:a.valueContent,key:"input-container",onkeydown:this._onKeyDown},u("input",{afterCreate:this._afterInputCreate,class:this.classes({[a.input]:!0,[a.inputDisabled]:t,[a.inputReadOnly]:i}),disabled:t||i,onfocus:this._selectText,oninput:this._onInput,onkeydown:this._onInputKeyDown,readOnly:i,type:"text",value:this._displayValue}),u("div",{class:a.inputSuffix,key:"suffix"},this._suffix),i?void 0:u("calcite-button",{appearance:"transparent",class:a.button,disabled:t,iconStart:e?"lock":"unlock",kind:"neutral",onclick:this._onLockClick,scale:"s",tabIndex:-1}))}_commit({type:t,allowLockingCurrentValue:e}){const{_input:i,field:n}=this;i&&(n.locked&&""===n.inputValue?n.unlock():(e||null!=n.inputValue)&&this._lock(),this.context.onCommit(i,t))}_discard(){this._input&&(this.field.inputValue=null,this.context.onDiscard(this._input))}_lock(){const{field:t}=this,e=this._parseNumber(t.inputValue),i=null!=e?t.createQuantity(e,this.context):null;t.lock(i)}_parseNumber(t){if(null==t)return null;const e=parseFloat(t);return isNaN(e)||!isFinite(e)?null:e}_toString(t){return null!=t?t.toFixed(3):"0"}};t([e()],c.prototype,"field",void 0),t([e()],c.prototype,"context",void 0),t([e()],c.prototype,"mode",void 0),t([e()],c.prototype,"_initialValue",null),t([e()],c.prototype,"_feedbackValue",null),t([e()],c.prototype,"_input",void 0),t([e()],c.prototype,"_displayValue",null),t([e()],c.prototype,"_suffix",null),t([e()],c.prototype,"_title",null),c=t([i("esri.views.interactive.tooltip.TooltipEditableField")],c);export{c as TooltipEditableField};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{valueInUnit as t}from"../../../core/quantityUtils.js";import{lengthUnitFromSpatialReference as r,verticalLengthUnitFromSpatialReference as o}from"../../../core/unitUtils.js";import{q as e,o as n}from"../../../chunks/vec3.js";import{c as s}from"../../../chunks/vec3f64.js";import{projectVectorToVector as i}from"../../../geometry/projection/projectVectorToVector.js";import{Axis as c}from"../../../geometry/support/Axis.js";import{createGlobal as m,axisAt as
|
|
5
|
+
import{valueInUnit as t}from"../../../core/quantityUtils.js";import{lengthUnitFromSpatialReference as r,verticalLengthUnitFromSpatialReference as o}from"../../../core/unitUtils.js";import{q as e,o as n}from"../../../chunks/vec3.js";import{c as s}from"../../../chunks/vec3f64.js";import{projectVectorToVector as i}from"../../../geometry/projection/projectVectorToVector.js";import{Axis as c}from"../../../geometry/support/Axis.js";import{createGlobal as m,axisAt as f}from"../../../geometry/support/coordinateSystem.js";import{SphereConstraint as u,VerticalHalfPlaneConstraint as p,HorizontalPlaneConstraint as a}from"../sketch/constraints.js";import{fromPoint as j}from"../sketch/normalizedPoint.js";import{pointFromDistanceAlongAzimuth as l}from"../../support/angularMeasurementUtils.js";import{computeEuclideanMeasurementSR as y}from"../../support/measurementUtils.js";function d(o,s,p,a){if(!s)return;const{spatialReference:l}=o;if(!r(l))return;const d=y(l),g=r(d);if(!g)return;const h=j(o,p,a),k=v;if(!i(h,l,k,d))return;const U=t(s,g);if("3d"===p?.type&&"local"===p.viewingMode)k[0]+=U;else{const t=m(d),r=f(t,k,c.X,w);e(k,k,r,U)}if(!i(k,d,k,l))return;const q=n(h,k);return new u(h,q)}function g(t,r,o,e){if(!r)return;const n=j(t,o,e),s=l(t,1,r);if(!s)return;const i=j(s,o,e);return new p(n,i)}function h(r,e,n,s){if(null==r)return;const i=y(e),c=o(i);return c?new a(t(r,c)):void 0}function k(t){let r;for(const o of t)o&&(r=r?.intersect(o)??o);return r}const v=s(),w=s();export{d as getDistanceConstraint,h as getElevationConstraint,g as getOrientationConstraint,k as intersectAll};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{TooltipEditableField as
|
|
5
|
+
import{TooltipEditableField as t}from"../TooltipEditableField.js";import{tsx as e,tsxFragment as o}from"../../../../widgets/support/jsxFactory.js";function l(l){const i=l.fields.filter((t=>null!=t&&!t.hidden));return 0===i.length?null:e(o,null,i.map((o=>e(t,{context:l.context,field:o,key:o.id,mode:l.mode}))))}export{l as Fields};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as r}from"../TooltipContentWithHelpMessage.js";import{TooltipField as o}from"../TooltipField.js";import{ValueByValue as i}from"../ValueByValue.js";import{TooltipContent as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as r}from"../TooltipContentWithHelpMessage.js";import{TooltipField as o}from"../TooltipField.js";import{ValueByValue as i}from"../ValueByValue.js";import{TooltipContent as l}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as a}from"../../../../widgets/support/jsxFactory.js";const p={base:`${s} ${`${s}--draw-rectangle`}`};let m=class extends l{render(){const{area:t,radius:e,xSize:s,ySize:l,tooltipOptions:m}=this.info,{visibleElements:n}=m,c=this._messagesTooltip.sketch;return a(r,{className:p.base,helpMessage:this._getHelpMessage()},n.radius&&null!=e?a(o,{title:c.radius,value:this._formatLength(e)}):null,n.size&&null!=s&&null!=l?a(o,{title:c.size,value:a(i,{left:this._formatLength(s),right:this._formatLength(l)})}):null,n.area?a(o,{title:c.area,value:this._formatArea(t)}):null)}};m=t([e("esri.views.interactive.tooltip.content.TooltipContentDrawCircle")],m);export{m as TooltipContentDrawCircle};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${e}--draw-mesh`};let l=class extends i{render(){const{elevation:t,tooltipOptions:s}=this.info,{visibleElements:e}=s,i=this._messagesTooltip.sketch;return p(o,{className:a.base,helpMessage:this._getHelpMessage()},e.elevation
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${e}--draw-mesh`};let l=class extends i{render(){const{elevation:t,tooltipOptions:s}=this.info,{visibleElements:e}=s,i=this._messagesTooltip.sketch;return p(o,{className:a.base,helpMessage:this._getHelpMessage()},e.elevation?p(r,{title:i.elevation,value:this._formatVerticalLength(t.actual)}):null)}};l=t([s("esri.views.interactive.tooltip.content.TooltipContentDrawMesh")],l);export{l as TooltipContentDrawMesh};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as t}from"../css.js";import{TooltipContentWithHelpMessage as e}from"../TooltipContentWithHelpMessage.js";import{Fields as r}from"./Fields.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const n={base:`${t}--draw-point`};let a=class extends i{render(){const{fieldContext:o,info:s}=this,{mode:t,elevation:i,tooltipOptions:a}=s,{visibleElements:m}=a;return p(e,{className:n.base,helpMessage:this._getHelpMessage(),mode:t,
|
|
5
|
+
import{_ as o}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as t}from"../css.js";import{TooltipContentWithHelpMessage as e}from"../TooltipContentWithHelpMessage.js";import{Fields as r}from"./Fields.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const n={base:`${t}--draw-point`};let a=class extends i{render(){const{fieldContext:o,info:s}=this,{mode:t,elevation:i,tooltipOptions:a}=s,{visibleElements:m}=a;return p(e,{className:n.base,helpMessage:this._getHelpMessage(),mode:t,onkeydown:this._handleTab,onDiscard:this._onDiscard},p(r,{context:o,fields:[m.elevation?i:void 0],mode:t}))}};a=o([s("esri.views.interactive.tooltip.content.TooltipContentDrawPoint")],a);export{a as TooltipContentDrawPoint};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as t}from"../css.js";import{TooltipContentWithHelpMessage as s}from"../TooltipContentWithHelpMessage.js";import{Fields as r}from"./Fields.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as n}from"../../../../widgets/support/jsxFactory.js";const a={base:`${t} ${`${t}--draw-polygon`}`};let p=class extends i{render(){const{fieldContext:o,info:e}=this,{area:t,distance:i,elevation:p,mode:c,orientation:l,tooltipOptions:d,viewType:m}=e,{inputEnabled:j,visibleElements:g}=d;return n(s,{className:a.base,helpMessage:this._getHelpMessage(),mode:c,
|
|
5
|
+
import{_ as o}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as t}from"../css.js";import{TooltipContentWithHelpMessage as s}from"../TooltipContentWithHelpMessage.js";import{Fields as r}from"./Fields.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as n}from"../../../../widgets/support/jsxFactory.js";const a={base:`${t} ${`${t}--draw-polygon`}`};let p=class extends i{render(){const{fieldContext:o,info:e}=this,{area:t,distance:i,elevation:p,mode:c,orientation:l,tooltipOptions:d,viewType:m}=e,{inputEnabled:j,visibleElements:g}=d;return n(s,{className:a.base,helpMessage:this._getHelpMessage(),mode:c,onkeydown:this._handleTab,onDiscard:this._onDiscard},n(r,{context:o,fields:[j&&g.orientation?l:void 0,j&&g.distance?i:void 0,g.elevation&&"2d"!==m?p:void 0,g.area?t:void 0],mode:c}))}};p=o([e("esri.views.interactive.tooltip.content.TooltipContentDrawPolygon")],p);export{p as TooltipContentDrawPolygon};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as s}from"../TooltipContentWithHelpMessage.js";import{Fields as i}from"./Fields.js";import{TooltipContent as r}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as n}from"../../../../widgets/support/jsxFactory.js";const p={base:`${e} ${`${e}--draw-polyline`}`};let a=class extends r{render(){const{fieldContext:o,info:t}=this,{distance:e,elevation:r,mode:a,orientation:l,tooltipOptions:c,totalLength:d,viewType:m}=t,{inputEnabled:j,visibleElements:g}=c;return n(s,{className:p.base,helpMessage:this._getHelpMessage(),mode:a,
|
|
5
|
+
import{_ as o}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as s}from"../TooltipContentWithHelpMessage.js";import{Fields as i}from"./Fields.js";import{TooltipContent as r}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as n}from"../../../../widgets/support/jsxFactory.js";const p={base:`${e} ${`${e}--draw-polyline`}`};let a=class extends r{render(){const{fieldContext:o,info:t}=this,{distance:e,elevation:r,mode:a,orientation:l,tooltipOptions:c,totalLength:d,viewType:m}=t,{inputEnabled:j,visibleElements:g}=c;return n(s,{className:p.base,helpMessage:this._getHelpMessage(),mode:a,onkeydown:this._handleTab,onDiscard:this._onDiscard},n(i,{context:o,fields:[j&&g.orientation?l:void 0,j&&g.distance?e:void 0,g.elevation&&"2d"!==m?r:void 0,g.totalLength?d:void 0],mode:a}))}};a=o([t("esri.views.interactive.tooltip.content.TooltipContentDrawPolyline")],a);export{a as TooltipContentDrawPolyline};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{ValueByValue as i}from"../ValueByValue.js";import{TooltipContent as a}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{ValueByValue as i}from"../ValueByValue.js";import{TooltipContent as a}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as l}from"../../../../widgets/support/jsxFactory.js";const p={base:`${s} ${`${s}--draw-rectangle`}`};let m=class extends a{render(){const{area:t,xSize:e,ySize:s,tooltipOptions:a}=this.info,{visibleElements:m}=a,n=this._messagesTooltip.sketch;return l(o,{className:p.base,helpMessage:this._getHelpMessage()},m.size&&null!=e&&null!=s?l(r,{title:n.size,value:l(i,{left:this._formatLength(e),right:this._formatLength(s)})}):null,m.area?l(r,{title:n.area,value:this._formatArea(t)}):null)}};m=t([e("esri.views.interactive.tooltip.content.TooltipContentDrawRectangle")],m);export{m as TooltipContentDrawRectangle};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as e}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${s} ${`${s}--extent-rotate`}`};let n=class extends i{render(){const{angle:t,tooltipOptions:o}=this.info,{visibleElements:s}=o,i=this._messagesTooltip.sketch;return p(e,{className:a.base,helpMessage:this._getHelpMessage()},s.rotation
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as e}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${s} ${`${s}--extent-rotate`}`};let n=class extends i{render(){const{angle:t,tooltipOptions:o}=this.info,{visibleElements:s}=o,i=this._messagesTooltip.sketch;return p(e,{className:a.base,helpMessage:this._getHelpMessage()},s.rotation?p(r,{title:i.rotation,value:this._formatRelativeOrientation(t)}):null)}};n=t([o("esri.views.interactive.tooltip.content.TooltipContentExtentRotate")],n);export{n as TooltipContentExtentRotate};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{ValueByValue as i}from"../ValueByValue.js";import{TooltipContent as l}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as a}from"../../../../widgets/support/jsxFactory.js";const p={base:`${s} ${`${s}--extent-scale`}`};let c=class extends l{render(){const t=this.info,{visibleElements:e}=t.tooltipOptions,s=this._messagesTooltip.sketch;return a(o,{className:p.base,helpMessage:this._getHelpMessage()},e.size
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{ValueByValue as i}from"../ValueByValue.js";import{TooltipContent as l}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as a}from"../../../../widgets/support/jsxFactory.js";const p={base:`${s} ${`${s}--extent-scale`}`};let c=class extends l{render(){const t=this.info,{visibleElements:e}=t.tooltipOptions,s=this._messagesTooltip.sketch;return a(o,{className:p.base,helpMessage:this._getHelpMessage()},e.size?a(r,{title:s.size,value:a(i,{left:this._formatLength(t.xSize),right:this._formatLength(t.ySize)})}):null,e.scale?a(r,{title:s.scale,value:a(i,{left:this._formatScale(t.xScale),right:this._formatScale(t.yScale)})}):null)}};c=t([e("esri.views.interactive.tooltip.content.TooltipContentExtentScale")],c);export{c as TooltipContentExtentScale};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as a}from"../../../../widgets/support/jsxFactory.js";const
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as a}from"../../../../widgets/support/jsxFactory.js";const l={base:`${s} ${`${s}--reshape-edge-offset`}`};let p=class extends i{render(){const{area:t,distance:e,totalLength:s,tooltipOptions:i}=this.info,{visibleElements:p}=i,n=this._messagesTooltip.sketch;return a(o,{className:l.base,helpMessage:this._getHelpMessage()},p.distance?a(r,{title:n.distance,value:this._formatRelativeLength(e)}):null,p.area&&null!=t?a(r,{title:n.area,value:this._formatArea(t)}):null,p.totalLength&&null!=s?a(r,{title:n.totalLength,value:this._formatLength(s)}):null)}};p=t([e("esri.views.interactive.tooltip.content.TooltipContentReshapeEdgeOffset")],p);export{p as TooltipContentReshapeEdgeOffset};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import{formatAngle as o}from"../../../../core/quantityFormatUtils.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as i}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as n}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{formatAngle as o}from"../../../../core/quantityFormatUtils.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as i}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as n}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const l={base:`${e} ${`${e}--transform-absolute`}`};let a=class extends n{render(){const{info:t}=this,{visibleElements:s}=t.tooltipOptions,e=this._messagesTooltip.sketch;return p(i,{className:l.base,helpMessage:this._getHelpMessage()},s.orientation&&null!=t.orientation?p(r,{key:"orientation",title:e.orientation,value:o(t.orientation,t.rotationType,t.orientationPrecision)}):null,s.size&&null!=t.size?p(r,{key:"size",title:e.size,value:this._formatLength(t.size,t.sizeUnit,t.sizePrecision)}):null)}};a=t([s("esri.views.interactive.tooltip.content.TooltipContentTransformAbsolute")],a);export{a as TooltipContentTransformAbsolute};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import{formatAngle as o,formatRelativeAngle as r}from"../../../../core/quantityFormatUtils.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as i}from"../TooltipContentWithHelpMessage.js";import{TooltipField as n}from"../TooltipField.js";import{TooltipContent as a}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const l={base:`${s} ${`${s}--transform-rotate`}`};let m=class extends a{render(){const{info:t}=this,{visibleElements:e}=t.tooltipOptions,s=this._messagesTooltip.sketch;return p(i,{className:l.base,helpMessage:this._getHelpMessage()},e.rotation&&null!=t.rotation
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{formatAngle as o,formatRelativeAngle as r}from"../../../../core/quantityFormatUtils.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as i}from"../TooltipContentWithHelpMessage.js";import{TooltipField as n}from"../TooltipField.js";import{TooltipContent as a}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const l={base:`${s} ${`${s}--transform-rotate`}`};let m=class extends a{render(){const{info:t}=this,{visibleElements:e}=t.tooltipOptions,s=this._messagesTooltip.sketch;return p(i,{className:l.base,helpMessage:this._getHelpMessage()},e.rotation&&null!=t.rotation?p(n,{key:"rotation",title:s.rotation,value:r(t.rotation,t.rotationType,t.rotationPrecision)}):null,e.orientation&&null!=t.orientation?p(n,{key:"orientation",title:s.orientation,value:o(t.orientation,t.rotationType,t.orientationPrecision)}):null)}};m=t([e("esri.views.interactive.tooltip.content.TooltipContentTransformRotate")],m);export{m as TooltipContentTransformRotate};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as s}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as t}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as l}from"../../../../widgets/support/jsxFactory.js";const p={base:`${t} ${`${t}--transform-scale`}`};let a=class extends i{render(){const{info:s}=this,{visibleElements:e}=s.tooltipOptions,t=this._messagesTooltip.sketch;return l(o,{className:p.base,helpMessage:this._getHelpMessage()},e.scale&&null!=s.scale
|
|
5
|
+
import{_ as s}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as t}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as l}from"../../../../widgets/support/jsxFactory.js";const p={base:`${t} ${`${t}--transform-scale`}`};let a=class extends i{render(){const{info:s}=this,{visibleElements:e}=s.tooltipOptions,t=this._messagesTooltip.sketch;return l(o,{className:p.base,helpMessage:this._getHelpMessage()},e.scale&&null!=s.scale?l(r,{key:"scale",title:t.scale,value:this._formatPercentage(s.scale)}):null,e.size&&null!=s.size?l(r,{key:"size",title:t.size,value:this._formatLength(s.size,s.sizeUnit,s.sizePrecision)}):null)}};a=s([e("esri.views.interactive.tooltip.content.TooltipContentTransformScale")],a);export{a as TooltipContentTransformScale};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as s}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as o}from"../css.js";import{TooltipContentWithHelpMessage as e}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${o} ${`${o}--translate-graphic`}`};let c=class extends i{render(){const{info:s}=this,{visibleElements:t}=s.tooltipOptions,o=this._messagesTooltip.sketch;return p(e,{className:a.base,helpMessage:this._getHelpMessage()},t.distance
|
|
5
|
+
import{_ as s}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as o}from"../css.js";import{TooltipContentWithHelpMessage as e}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${o} ${`${o}--translate-graphic`}`};let c=class extends i{render(){const{info:s}=this,{visibleElements:t}=s.tooltipOptions,o=this._messagesTooltip.sketch;return p(e,{className:a.base,helpMessage:this._getHelpMessage()},t.distance?p(r,{title:o.distance,value:this._formatLength(s.distance)}):null)}};c=s([t("esri.views.interactive.tooltip.content.TooltipContentTranslateGraphic")],c);export{c as TooltipContentTranslateGraphic};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${e} ${`${e}--translate-graphic-xy`}`};let c=class extends i{render(){const{info:t}=this,{visibleElements:s}=t.tooltipOptions,e=this._messagesTooltip.sketch;return p(o,{className:a.base,helpMessage:this._getHelpMessage()},s.distance
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${e} ${`${e}--translate-graphic-xy`}`};let c=class extends i{render(){const{info:t}=this,{visibleElements:s}=t.tooltipOptions,e=this._messagesTooltip.sketch;return p(o,{className:a.base,helpMessage:this._getHelpMessage()},s.distance?p(r,{title:e.distance,value:this._formatRelativeLength(t.distance)}):null)}};c=t([s("esri.views.interactive.tooltip.content.TooltipContentTranslateGraphicXY")],c);export{c as TooltipContentTranslateGraphicXY};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${e} ${`${e}--translate-graphic-z`}`};let c=class extends i{render(){const{info:t}=this,{visibleElements:s}=t.tooltipOptions,e=this._messagesTooltip.sketch;return p(o,{className:a.base,helpMessage:this._getHelpMessage()},s.distance
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as e}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as p}from"../../../../widgets/support/jsxFactory.js";const a={base:`${e} ${`${e}--translate-graphic-z`}`};let c=class extends i{render(){const{info:t}=this,{visibleElements:s}=t.tooltipOptions,e=this._messagesTooltip.sketch;return p(o,{className:a.base,helpMessage:this._getHelpMessage()},s.distance?p(r,{title:e.distance,value:this._formatRelativeVerticalLength(t.distance)}):null)}};c=t([s("esri.views.interactive.tooltip.content.TooltipContentTranslateGraphicZ")],c);export{c as TooltipContentTranslateGraphicZ};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as l}from"../../../../widgets/support/jsxFactory.js";const a={base:`${s} ${`${s}--translate-vertex`}`};let n=class extends i{render(){const{distance:t,elevation:e,area:s,totalLength:i,tooltipOptions:n}=this.info,{visibleElements:p}=n,c=this._messagesTooltip.sketch;return l(o,{className:a.base,helpMessage:this._getHelpMessage()},p.distance?l(r,{title:c.distance,value:this._formatLength(t)}):null,p.elevation&&null!=e?l(r,{title:c.elevation,value:this._formatVerticalLength(e.actual)}):null,p.area&&null!=s?l(r,{title:c.area,value:this._formatArea(s)}):null,p.totalLength&&null!=i?l(r,{title:c.totalLength,value:this._formatLength(i)}):null)}};n=t([e("esri.views.interactive.tooltip.content.TooltipContentTranslateVertex")],n);export{n as TooltipContentTranslateVertex};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as l}from"../../../../widgets/support/jsxFactory.js";const a={base:`${s} ${`${s}--translate-vertex`}`};let n=class extends i{render(){const{area:t,distance:e,elevation:s,totalLength:i,tooltipOptions:n}=this.info,{visibleElements:p}=n,c=this._messagesTooltip.sketch;return l(o,{className:a.base,helpMessage:this._getHelpMessage()},p.distance?l(r,{title:c.distance,value:this._formatRelativeLength(e)}):null,p.elevation&&null!=s?l(r,{title:c.elevation,value:this._formatVerticalLength(s.actual)}):null,p.area&&null!=t?l(r,{title:c.area,value:this._formatArea(t)}):null,p.totalLength&&null!=i?l(r,{title:c.totalLength,value:this._formatLength(i)}):null)}};n=t([e("esri.views.interactive.tooltip.content.TooltipContentTranslateVertexXY")],n);export{n as TooltipContentTranslateVertexXY};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{content as s}from"../css.js";import{TooltipContentWithHelpMessage as o}from"../TooltipContentWithHelpMessage.js";import{TooltipField as r}from"../TooltipField.js";import{TooltipContent as i}from"./TooltipContent.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as l}from"../../../../widgets/support/jsxFactory.js";const a={base:`${s} ${`${s}--translate-vertex`}`};let p=class extends i{render(){const{distance:t,elevation:e,tooltipOptions:s}=this.info,{visibleElements:i}=s,p=this._messagesTooltip.sketch;return l(o,{className:a.base,helpMessage:this._getHelpMessage()},i.distance?l(r,{title:p.distance,value:this._formatRelativeVerticalLength(t)}):null,i.elevation&&null!=e?l(r,{title:p.elevation,value:this._formatVerticalLength(e.actual)}):null)}};p=t([e("esri.views.interactive.tooltip.content.TooltipContentTranslateVertexZ")],p);export{p as TooltipContentTranslateVertexZ};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createAngle as e,convertRotationType as r}from"../../core/quantityUtils.js";import{convertUnit as o}from"../../core/unitUtils.js";import{x as t}from"../../chunks/vec2.js";import{e as s}from"../../chunks/vec2f64.js";import{s as i,h as
|
|
5
|
+
import{createAngle as e,convertRotationType as r}from"../../core/quantityUtils.js";import{convertUnit as o}from"../../core/unitUtils.js";import{x as t}from"../../chunks/vec2.js";import{e as s}from"../../chunks/vec2f64.js";import{s as i,h as n,f as c,n as a}from"../../chunks/vec3.js";import{c as m}from"../../chunks/vec3f64.js";import p from"../../geometry/Point.js";import f from"../../geometry/SpatialReference.js";import{projectVectorToPoint as u}from"../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as g}from"../../geometry/projection/projectVectorToVector.js";import{projectVectorToWGS84ComparableLonLat as j}from"../../geometry/projection/projectVectorToWGS84ComparableLonLat.js";import{inverseGeodeticSolver as l,directGeodeticSolver as h,InverseGeodeticSolverResult as y}from"../../geometry/support/geodesicUtils.js";const d=(()=>{const r=m(),o=m(),p=m();return(m,f)=>{if(i(o,m.x,m.y,m.z??0),i(p,f.x,f.y,f.z??0),n(o,p))return null;if(!j(o,m.spatialReference,o)||!j(p,f.spatialReference,p)){c(r,p,o),r[2]=0,a(r,r);let i=t(s,r);return r[0]<0&&(i=2*Math.PI-i),e(i,"radians","geographic")}const{azimuth:u}=l(x,o,p);return null!=u?e(u,"degrees","geographic"):void 0}})(),v=(()=>{const e=m(),t=m();return({x:s,y:n,z:c,spatialReference:a},m,j)=>{const l=c??0;i(e,s,n,l);const y=r(o(j.value,j.unit,"degrees"),j.rotationType,"geographic");if(!g(e,a,e,f.WGS84)){const e=r(y,"geographic","arithmetic"),t=o(e,"degrees","radians");return new p({x:s+m*Math.cos(t),y:n+m*Math.sin(t),z:l,spatialReference:a})}return h(t,e,y,m),t[2]=l,u(t,f.WGS84,a)}})(),x=new y;export{d as orientationBetweenPoints,v as pointFromDistanceAlongAzimuth};
|
package/views/webgl/Texture.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.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../core/Error.js";import"../../core/has.js";import{isPowerOfTwo as e}from"../../core/mathUtils.js";import{checkWebGLError as i}from"./checkWebGLError.js";import{ContextType as r}from"./contextUtils.js";import{ResourceType as s,TextureType as o,TextureSamplingMode as a,PixelFormat as n,PixelType as h,SizedPixelFormat as p,TextureWrapMode as l,CompressedTextureFormat as d}from"./enums.js";import{GLObjectType as c}from"./GLObjectType.js";import{estimateMemory as _}from"./TextureDescriptor.js";import{ValidatedTextureDescriptor as m}from"./ValidatedTextureDescriptor.js";const u=4;let T=class{constructor(e,i=null,a=null){if(this.type=c.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,a=i;else{const r=m.validate(e,i);if(!r)throw new t("Texture descriptor invalid");this._descriptor=r}if(this._descriptor.context.instanceCounter.increment(s.Texture,this),this._descriptor.context.type!==r.WEBGL2&&(this._descriptor.isImmutable&&(this._descriptor.isImmutable=!1),R(this._descriptor.target)))throw new t("3D and array textures are not supported in WebGL1");this._descriptor.target===o.TEXTURE_CUBE_MAP?this._setDataCubeMap(a):this.setData(a)}get glName(){return this._glName}get descriptor(){return this._descriptor}get gpuMemoryUsage(){return P.delete(this),_(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._descriptor.context.instanceCounter.decrement(s.Texture,this),this._glName=null)}release(){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===o.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(t=null){for(let e=o.TEXTURE_CUBE_MAP_POSITIVE_X;e<=o.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}setData(t){this._setData(t)}_setData(e,r){if(!this._descriptor.context||!this._descriptor.context.gl)return;const s=this._descriptor.context.gl;i(s),this._glName||(this._glName=s.createTexture()),void 0===e&&(e=null);const o=this._descriptor,a=r??o.target,n=R(a);null===e&&(o.width=o.width||u,o.height=o.height||u,n&&(o.depth=o.depth??1));const h=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),g(this._descriptor.context,o),this._configurePixelStorage(),i(s);const p=this._deriveInternalFormat();if(D(e)){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;const h=1;e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),o.width&&o.height,n&&o.depth,o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(a,p,o.hasMipmap,t,r,h),this._texImage(a,0,p,t,r,h,e),i(s),o.hasMipmap&&this.generateMipmap(),o.width||(o.width=t),o.height||(o.height=r),n&&!o.depth&&(o.depth=h)}else{const{width:r,height:h,depth:l}=o;if(null==r||null==h)throw new t("Width and height must be specified!");if(n&&null==l)throw new t("Depth must be specified!");if(o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(a,p,o.hasMipmap,r,h,l),A(e)){const i=e.levels,n=b(a,r,h,l),d=Math.min(n-1,i.length-1);null!=this._descriptor.context.gl2?s.texParameteri(o.target,this._descriptor.context.gl2.TEXTURE_MAX_LEVEL,d):o.hasMipmap=o.hasMipmap&&n===i.length;const c=p;if(!w(c))throw new t("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((t,e,r,s)=>{const o=i[Math.min(t,i.length-1)];this._compressedTexImage(a,t,c,e,r,s,o)}),d)}else this._texImage(a,0,p,r,h,l,e),i(s),o.hasMipmap&&this.generateMipmap()}x(s,this._descriptor),E(s,this._descriptor),f(this._descriptor.context,this._descriptor),i(s),this._descriptor.context.bindTexture(h,T.TEXTURE_UNIT_FOR_UPDATES)}updateData(e,i,r,s,o,a,n=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const h=this._descriptor.context.gl,p=this._descriptor.context.gl2,l=this._descriptor,d=this._deriveInternalFormat(),{pixelFormat:c,dataType:_,target:m,isImmutable:u}=l;if(u&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");const g=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES,!0);if((i<0||r<0||s>l.width||o>l.height||i+s>l.width||r+o>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage(),n){if(!p)return void console.error("Webgl2 must be enabled to use dataRowOffset!");h.pixelStorei(p.UNPACK_SKIP_ROWS,n)}if(D(a)?p?p.texSubImage2D(m,e,i,r,s,o,c,_,a):h.texSubImage2D(m,e,i,r,c,_,a):A(a)?h.compressedTexSubImage2D(m,e,i,r,s,o,d,a.levels[e]):h.texSubImage2D(m,e,i,r,s,o,c,_,a),n){if(!p)return void console.error("Webgl2 must be enabled to use dataRowOffset!");h.pixelStorei(p.UNPACK_SKIP_ROWS,0)}this._descriptor.context.bindTexture(g,T.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,i,r,s,o,a,n,h){h||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const p=this._descriptor.context.gl2;if(null==p)throw new t("3D textures are not supported in WebGL1");const l=this._descriptor,d=this._deriveInternalFormat(),{pixelFormat:c,dataType:_,isImmutable:m,target:u}=l;if(m&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");R(u)||console.warn("Attempting to set 3D texture data on a non-3D texture");const g=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);if(this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),(i<0||r<0||s<0||o>l.width||a>l.height||n>l.depth||i+o>l.width||r+a>l.height||s+n>l.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage(),A(h))h=h.levels[e],p.compressedTexSubImage3D(u,e,i,r,s,o,a,n,d,h);else{const t=h;p.texSubImage3D(u,e,i,r,s,o,a,n,c,_,t)}this._descriptor.context.bindTexture(g,T.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,g(this._descriptor.context,e)}e.samplingMode===a.LINEAR?(this._samplingModeDirty=!0,e.samplingMode=a.LINEAR_MIPMAP_NEAREST):e.samplingMode===a.NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=a.NEAREST_MIPMAP_NEAREST);const i=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(i,T.TEXTURE_UNIT_FOR_UPDATES)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,g(this._descriptor.context,this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const t=this._descriptor.context.gl,e=this._descriptor;this._samplingModeDirty&&(x(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(E(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(this._descriptor.context.type===r.WEBGL1)return this._descriptor.internalFormat=this._descriptor.pixelFormat;if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case h.FLOAT:switch(this._descriptor.pixelFormat){case n.RGBA:return this._descriptor.internalFormat=p.RGBA32F;case n.RGB:return this._descriptor.internalFormat=p.RGB32F;default:throw new t("Unable to derive format")}case h.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.RGBA:return this._descriptor.internalFormat=p.RGBA8;case n.RGB:return this._descriptor.internalFormat=p.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.DEPTH_STENCIL?n.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_texStorage(e,i,r,s,o,a){const n=this._descriptor.context.gl2;if(null==n)throw new t("Immutable textures are not supported in WebGL1");if(!M(i))throw new t("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const h=r?b(e,s,o,a):1;if(R(e)){if(null==a)throw new t("Missing depth dimension for 3D texture upload");n.texStorage3D(e,h,i,s,o,a)}else n.texStorage2D(e,h,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,s,o,a,n,h){const p=this._descriptor.context.gl,l=R(e),{isImmutable:d,pixelFormat:c,dataType:_}=this._descriptor,m=this._descriptor.context.type===r.WEBGL2,u=m?p:null;if(m||!D(h))if(d){if(null!=h){const r=h;if(l){if(null==n)throw new t("Missing depth dimension for 3D texture upload");u.texSubImage3D(e,i,0,0,0,o,a,n,c,_,r)}else p.texSubImage2D(e,i,0,0,o,a,c,_,r)}}else{const r=h;if(l){if(null==n)throw new t("Missing depth dimension for 3D texture upload");u.texImage3D(e,i,s,o,a,n,0,c,_,r)}else p.texImage2D(e,i,s,o,a,0,c,_,r)}else p.texImage2D(e,0,s,c,_,h)}_compressedTexImage(e,i,s,o,a,n,h){const p=this._descriptor.context.gl;let l=null;const d=R(e),c=this._descriptor.isImmutable;if(d){if(this._descriptor.context.type!==r.WEBGL2)throw new t("3D textures are not supported in WebGL1");l=p}if(c){if(null!=h)if(d){if(null==n)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,i,0,0,0,o,a,n,s,h)}else p.compressedTexSubImage2D(e,i,0,0,o,a,s,h)}else if(d){if(null==n)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,i,s,o,a,n,0,h)}else p.compressedTexImage2D(e,i,s,o,a,0,h)}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:a,hasMipmap:n,target:h}=this._descriptor;const p=h===o.TEXTURE_3D;if(null==r||null==s||p&&null==a)throw new t("Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,a),n&&(1!==r||1!==s||p&&1!==a)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),p&&(a=Math.max(1,a>>1))}};function g(t,i){(null!=i.width&&i.width<0||null!=i.height&&i.height<0||null!=i.depth&&i.depth<0)&&console.error("Negative dimension parameters are not allowed!");const s=t.type===r.WEBGL2;if(s||!i.isImmutable&&!R(i.target)||console.error("Immutable and 3D-like textures are not supported in WebGL1!"),s)return;null!=i.width&&e(i.width)&&null!=i.height&&e(i.height)||("number"==typeof i.wrapMode?i.wrapMode!==l.CLAMP_TO_EDGE&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"):i.wrapMode.s===l.CLAMP_TO_EDGE&&i.wrapMode.t===l.CLAMP_TO_EDGE||console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),i.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))}function x(t,e){let i=e.samplingMode,r=e.samplingMode;i===a.LINEAR_MIPMAP_NEAREST||i===a.LINEAR_MIPMAP_LINEAR?(i=a.LINEAR,e.hasMipmap||(r=a.LINEAR)):i!==a.NEAREST_MIPMAP_NEAREST&&i!==a.NEAREST_MIPMAP_LINEAR||(i=a.NEAREST,e.hasMipmap||(r=a.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,i),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,r)}function E(t,e){"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}function f(t,e){const i=t.capabilities.textureFilterAnisotropic;if(!i)return;t.gl.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}function M(t){return t in p}function w(t){return t in d}function A(t){return null!=t&&"type"in t&&"compressed"===t.type}function I(t){return null!=t&&"byteLength"in t}function D(t){return null!=t&&!A(t)&&!I(t)}function R(t){return t===o.TEXTURE_3D||t===o.TEXTURE_2D_ARRAY}function b(t,e,i,r=1){let s=Math.max(e,i);return t===o.TEXTURE_3D&&(s=Math.max(s,r)),Math.round(Math.log(s)/Math.LN2)+1}function U(){if(0===P.size)return;const t=new Array;return P.forEach(((e,i)=>t.push([i.gpuMemoryUsage,e]))),P.clear(),t.sort(((t,e)=>e[0]-t[0])),t.reduce(((t,e)=>`${t}\n\n${Math.round(e[0]/1024)}KB: ${e[1]}`),`Total unestimated texture memory: ${Math.round(t.reduce(((t,e)=>t+e[0]),0)/1024)}KB`)}T.TEXTURE_UNIT_FOR_UPDATES=0;const P=new Map;export{T as Texture,U as clearUnestimatedTextures};
|
|
5
|
+
import t from"../../core/Error.js";import"../../core/has.js";import{isPowerOfTwo as e}from"../../core/mathUtils.js";import{checkWebGLError as i}from"./checkWebGLError.js";import{ContextType as r}from"./contextUtils.js";import{TextureType as s,ResourceType as o,TextureSamplingMode as a,PixelFormat as n,PixelType as h,SizedPixelFormat as p,TextureWrapMode as l,CompressedTextureFormat as d}from"./enums.js";import{GLObjectType as c}from"./GLObjectType.js";import{estimateMemory as _}from"./TextureDescriptor.js";import{ValidatedTextureDescriptor as m}from"./ValidatedTextureDescriptor.js";const u=4;let T=class{constructor(e,i=null,o=null){if(this.type=c.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,o=i;else{const r=m.validate(e,i);if(!r)throw new t("Texture descriptor invalid");this._descriptor=r}if(this._descriptor.context.type!==r.WEBGL2&&(this._descriptor.isImmutable&&(this._descriptor.isImmutable=!1),R(this._descriptor.target)))throw new t("3D and array textures are not supported in WebGL1");this._descriptor.target===s.TEXTURE_CUBE_MAP?this._setDataCubeMap(o):this.setData(o)}get glName(){return this._glName}get descriptor(){return this._descriptor}get gpuMemoryUsage(){return P.delete(this),_(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(o.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===s.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(t=null){for(let e=s.TEXTURE_CUBE_MAP_POSITIVE_X;e<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}setData(t){this._setData(t)}_setData(e,r){if(!this._descriptor.context||!this._descriptor.context.gl)return;const s=this._descriptor.context.gl;i(s),this._glName||(this._glName=s.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(o.Texture,this)),void 0===e&&(e=null);const a=this._descriptor,n=r??a.target,h=R(n);null===e&&(a.width=a.width||u,a.height=a.height||u,h&&(a.depth=a.depth??1));const p=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),g(this._descriptor.context,a),this._configurePixelStorage(),i(s);const l=this._deriveInternalFormat();if(D(e)){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;const o=1;e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),a.width&&a.height,h&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(n,l,a.hasMipmap,t,r,o),this._texImage(n,0,l,t,r,o,e),i(s),a.hasMipmap&&this.generateMipmap(),a.width||(a.width=t),a.height||(a.height=r),h&&!a.depth&&(a.depth=o)}else{const{width:r,height:o,depth:p}=a;if(null==r||null==o)throw new t("Width and height must be specified!");if(h&&null==p)throw new t("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(n,l,a.hasMipmap,r,o,p),A(e)){const i=e.levels,h=b(n,r,o,p),d=Math.min(h-1,i.length-1);null!=this._descriptor.context.gl2?s.texParameteri(a.target,this._descriptor.context.gl2.TEXTURE_MAX_LEVEL,d):a.hasMipmap=a.hasMipmap&&h===i.length;const c=l;if(!w(c))throw new t("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((t,e,r,s)=>{const o=i[Math.min(t,i.length-1)];this._compressedTexImage(n,t,c,e,r,s,o)}),d)}else this._texImage(n,0,l,r,o,p,e),i(s),a.hasMipmap&&this.generateMipmap()}x(s,this._descriptor),E(s,this._descriptor),f(this._descriptor.context,this._descriptor),i(s),this._descriptor.context.bindTexture(p,T.TEXTURE_UNIT_FOR_UPDATES)}updateData(e,i,r,s,o,a,n=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const h=this._descriptor.context.gl,p=this._descriptor.context.gl2,l=this._descriptor,d=this._deriveInternalFormat(),{pixelFormat:c,dataType:_,target:m,isImmutable:u}=l;if(u&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");const g=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES,!0);if((i<0||r<0||s>l.width||o>l.height||i+s>l.width||r+o>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage(),n){if(!p)return void console.error("Webgl2 must be enabled to use dataRowOffset!");h.pixelStorei(p.UNPACK_SKIP_ROWS,n)}if(D(a)?p?p.texSubImage2D(m,e,i,r,s,o,c,_,a):h.texSubImage2D(m,e,i,r,c,_,a):A(a)?h.compressedTexSubImage2D(m,e,i,r,s,o,d,a.levels[e]):h.texSubImage2D(m,e,i,r,s,o,c,_,a),n){if(!p)return void console.error("Webgl2 must be enabled to use dataRowOffset!");h.pixelStorei(p.UNPACK_SKIP_ROWS,0)}this._descriptor.context.bindTexture(g,T.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,i,r,s,o,a,n,h){h||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const p=this._descriptor.context.gl2;if(null==p)throw new t("3D textures are not supported in WebGL1");const l=this._descriptor,d=this._deriveInternalFormat(),{pixelFormat:c,dataType:_,isImmutable:m,target:u}=l;if(m&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");R(u)||console.warn("Attempting to set 3D texture data on a non-3D texture");const g=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);if(this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),(i<0||r<0||s<0||o>l.width||a>l.height||n>l.depth||i+o>l.width||r+a>l.height||s+n>l.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage(),A(h))h=h.levels[e],p.compressedTexSubImage3D(u,e,i,r,s,o,a,n,d,h);else{const t=h;p.texSubImage3D(u,e,i,r,s,o,a,n,c,_,t)}this._descriptor.context.bindTexture(g,T.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,g(this._descriptor.context,e)}e.samplingMode===a.LINEAR?(this._samplingModeDirty=!0,e.samplingMode=a.LINEAR_MIPMAP_NEAREST):e.samplingMode===a.NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=a.NEAREST_MIPMAP_NEAREST);const i=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(i,T.TEXTURE_UNIT_FOR_UPDATES)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,g(this._descriptor.context,this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const t=this._descriptor.context.gl,e=this._descriptor;this._samplingModeDirty&&(x(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(E(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(this._descriptor.context.type===r.WEBGL1)return this._descriptor.internalFormat=this._descriptor.pixelFormat;if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case h.FLOAT:switch(this._descriptor.pixelFormat){case n.RGBA:return this._descriptor.internalFormat=p.RGBA32F;case n.RGB:return this._descriptor.internalFormat=p.RGB32F;default:throw new t("Unable to derive format")}case h.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.RGBA:return this._descriptor.internalFormat=p.RGBA8;case n.RGB:return this._descriptor.internalFormat=p.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.DEPTH_STENCIL?n.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_texStorage(e,i,r,s,o,a){const n=this._descriptor.context.gl2;if(null==n)throw new t("Immutable textures are not supported in WebGL1");if(!M(i))throw new t("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const h=r?b(e,s,o,a):1;if(R(e)){if(null==a)throw new t("Missing depth dimension for 3D texture upload");n.texStorage3D(e,h,i,s,o,a)}else n.texStorage2D(e,h,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,s,o,a,n,h){const p=this._descriptor.context.gl,l=R(e),{isImmutable:d,pixelFormat:c,dataType:_}=this._descriptor,m=this._descriptor.context.type===r.WEBGL2,u=m?p:null;if(m||!D(h))if(d){if(null!=h){const r=h;if(l){if(null==n)throw new t("Missing depth dimension for 3D texture upload");u.texSubImage3D(e,i,0,0,0,o,a,n,c,_,r)}else p.texSubImage2D(e,i,0,0,o,a,c,_,r)}}else{const r=h;if(l){if(null==n)throw new t("Missing depth dimension for 3D texture upload");u.texImage3D(e,i,s,o,a,n,0,c,_,r)}else p.texImage2D(e,i,s,o,a,0,c,_,r)}else p.texImage2D(e,0,s,c,_,h)}_compressedTexImage(e,i,s,o,a,n,h){const p=this._descriptor.context.gl;let l=null;const d=R(e),c=this._descriptor.isImmutable;if(d){if(this._descriptor.context.type!==r.WEBGL2)throw new t("3D textures are not supported in WebGL1");l=p}if(c){if(null!=h)if(d){if(null==n)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,i,0,0,0,o,a,n,s,h)}else p.compressedTexSubImage2D(e,i,0,0,o,a,s,h)}else if(d){if(null==n)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,i,s,o,a,n,0,h)}else p.compressedTexImage2D(e,i,s,o,a,0,h)}_forEachMipmapLevel(e,i=1/0){let{width:r,height:o,depth:a,hasMipmap:n,target:h}=this._descriptor;const p=h===s.TEXTURE_3D;if(null==r||null==o||p&&null==a)throw new t("Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,o,a),n&&(1!==r||1!==o||p&&1!==a)&&!(t>=i);++t)r=Math.max(1,r>>1),o=Math.max(1,o>>1),p&&(a=Math.max(1,a>>1))}};function g(t,i){(null!=i.width&&i.width<0||null!=i.height&&i.height<0||null!=i.depth&&i.depth<0)&&console.error("Negative dimension parameters are not allowed!");const s=t.type===r.WEBGL2;if(s||!i.isImmutable&&!R(i.target)||console.error("Immutable and 3D-like textures are not supported in WebGL1!"),s)return;null!=i.width&&e(i.width)&&null!=i.height&&e(i.height)||("number"==typeof i.wrapMode?i.wrapMode!==l.CLAMP_TO_EDGE&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"):i.wrapMode.s===l.CLAMP_TO_EDGE&&i.wrapMode.t===l.CLAMP_TO_EDGE||console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),i.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))}function x(t,e){let i=e.samplingMode,r=e.samplingMode;i===a.LINEAR_MIPMAP_NEAREST||i===a.LINEAR_MIPMAP_LINEAR?(i=a.LINEAR,e.hasMipmap||(r=a.LINEAR)):i!==a.NEAREST_MIPMAP_NEAREST&&i!==a.NEAREST_MIPMAP_LINEAR||(i=a.NEAREST,e.hasMipmap||(r=a.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,i),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,r)}function E(t,e){"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}function f(t,e){const i=t.capabilities.textureFilterAnisotropic;if(!i)return;t.gl.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}function M(t){return t in p}function w(t){return t in d}function A(t){return null!=t&&"type"in t&&"compressed"===t.type}function I(t){return null!=t&&"byteLength"in t}function D(t){return null!=t&&!A(t)&&!I(t)}function R(t){return t===s.TEXTURE_3D||t===s.TEXTURE_2D_ARRAY}function b(t,e,i,r=1){let o=Math.max(e,i);return t===s.TEXTURE_3D&&(o=Math.max(o,r)),Math.round(Math.log(o)/Math.LN2)+1}function U(){if(0===P.size)return;const t=new Array;return P.forEach(((e,i)=>t.push([i.gpuMemoryUsage,e]))),P.clear(),t.sort(((t,e)=>e[0]-t[0])),t.reduce(((t,e)=>`${t}\n\n${Math.round(e[0]/1024)}KB: ${e[1]}`),`Total unestimated texture memory: ${Math.round(t.reduce(((t,e)=>t+e[0]),0)/1024)}KB`)}T.TEXTURE_UNIT_FOR_UPDATES=0;const P=new Map;export{T as Texture,U as clearUnestimatedTextures};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../core/has.js";var n;function
|
|
5
|
+
import has from"../../core/has.js";var n;function r(r,t,o={}){const e=t===n.WEBGL1?"webgl":"webgl2",c=r.getContext(e,o);return c||null}function t(n,t,e={}){const c=o(n);for(const o of c){const n=r(t,o,e);if(n)return n}return null}function o(r){if("3d"===r)return[n.WEBGL2];const t=has("esri-force-webgl");return t===n.WEBGL1||t===n.WEBGL2?[t]:has("mac")&&has("chrome")?[n.WEBGL1,n.WEBGL2]:[n.WEBGL2,n.WEBGL1]}!function(n){n[n.WEBGL1=1]="WEBGL1",n[n.WEBGL2=2]="WEBGL2"}(n||(n={}));export{n as ContextType,r as createContext,t as createContextForView,o as getContextTypes};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{ignoreAbortErrors as t}from"../core/promiseUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import r from"./AreaMeasurement2D/AreaMeasurement2DViewModel.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as a}from"./support/legacyIcon.js";import{MeasurementWidgetContent as p}from"./support/MeasurementWidgetContent.js";import"./support/widgetUtils.js";import{messageBundle as l}from"./support/decorators/messageBundle.js";import{tsx as u}from"./support/jsxFactory.js";const m="esri-area-measurement-2d",c={base:m,newMeasurementButton:`${m}__clear-button`,widgetIcon:a.measureArea};let d=class extends i{constructor(e,t){super(e,t),this.iconClass=c.widgetIcon,this.icon=null,this.messages=null,this.messagesUnits=null,this.messagesCommon=null,this.viewModel=new r}get active(){return this.viewModel.active}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get unit(){return this.viewModel.unit}set unit(e){this.viewModel.unit=e}get unitOptions(){return this.viewModel.unitOptions}set unitOptions(e){this.viewModel.unitOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}render(){const{messages:e,messagesCommon:s,messagesUnits:o,unit:i,unitOptions:r,viewModel:a,visible:l}=this,{active:m,measurementLabel:d,state:v,supported:g}=a;return u("div",{"aria-label":e.widgetLabel,
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{ignoreAbortErrors as t}from"../core/promiseUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import r from"./AreaMeasurement2D/AreaMeasurement2DViewModel.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as a}from"./support/legacyIcon.js";import{MeasurementWidgetContent as p}from"./support/MeasurementWidgetContent.js";import"./support/widgetUtils.js";import{messageBundle as l}from"./support/decorators/messageBundle.js";import{tsx as u}from"./support/jsxFactory.js";const m="esri-area-measurement-2d",c={base:m,newMeasurementButton:`${m}__clear-button`,widgetIcon:a.measureArea};let d=class extends i{constructor(e,t){super(e,t),this.iconClass=c.widgetIcon,this.icon=null,this.messages=null,this.messagesUnits=null,this.messagesCommon=null,this.viewModel=new r}get active(){return this.viewModel.active}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get unit(){return this.viewModel.unit}set unit(e){this.viewModel.unit=e}get unitOptions(){return this.viewModel.unitOptions}set unitOptions(e){this.viewModel.unitOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}render(){const{messages:e,messagesCommon:s,messagesUnits:o,unit:i,unitOptions:r,viewModel:a,visible:l}=this,{active:m,measurementLabel:d,state:v,supported:g}=a;return u("div",{"aria-label":e.widgetLabel,class:this.classes(c.base,n.widget,n.panel),key:this,role:"presentation"},l?u(p,{active:m,measurementItems:[{key:"area",title:o?.measures.area,value:d?.area},{key:"perimeter",title:e.perimeter,value:d?.perimeter}],messages:{...e,notApplicable:s.notApplicable},newMeasurementButtonClass:c.newMeasurementButton,state:v,supported:g,unit:i,unitOptions:r,onNewMeasurementClick:()=>{t(a.start())},onUnitChange:e=>{this.unit=e}}):null)}};e([s({readOnly:!0})],d.prototype,"active",null),e([s()],d.prototype,"iconClass",void 0),e([s()],d.prototype,"icon",void 0),e([s()],d.prototype,"label",null),e([s(),l("esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D")],d.prototype,"messages",void 0),e([s(),l("esri/core/t9n/Units")],d.prototype,"messagesUnits",void 0),e([s(),l("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([s()],d.prototype,"uiStrings",void 0),e([s()],d.prototype,"unit",null),e([s()],d.prototype,"unitOptions",null),e([s()],d.prototype,"view",null),e([s({type:r})],d.prototype,"viewModel",void 0),e([s({type:Boolean})],d.prototype,"visible",null),d=e([o("esri.widgets.AreaMeasurement2D")],d);const v=d;export{v as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{ignoreAbortErrors as t}from"../core/promiseUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import r from"./AreaMeasurement3D/AreaMeasurement3DViewModel.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as a}from"./support/legacyIcon.js";import{MeasurementWidgetContent as l}from"./support/MeasurementWidgetContent.js";import"./support/widgetUtils.js";import{messageBundle as p}from"./support/decorators/messageBundle.js";import{tsx as u}from"./support/jsxFactory.js";const m="esri-area-measurement-3d",c={base:m,newMeasurementButton:`${m}__clear-button`,widgetIcon:a.measureArea};let d=class extends o{constructor(e,t){super(e,t),this.iconClass=c.widgetIcon,this.icon=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new r}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}get active(){return this.viewModel.active}get analysis(){return this.viewModel.analysis}set analysis(e){this.viewModel.analysis=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get unitOptions(){return this.viewModel.unitOptions}set unitOptions(e){this.viewModel.unitOptions=e}get unit(){return this.viewModel.unit}set unit(e){this.viewModel.unit=e}render(){const{messages:e,messagesCommon:s,messagesUnits:i,unit:o,unitOptions:r,viewModel:a}=this,{active:p,measurement:m,state:d,supported:g}=a;return u("div",{"aria-label":this.messages.widgetLabel,
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{ignoreAbortErrors as t}from"../core/promiseUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import r from"./AreaMeasurement3D/AreaMeasurement3DViewModel.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as a}from"./support/legacyIcon.js";import{MeasurementWidgetContent as l}from"./support/MeasurementWidgetContent.js";import"./support/widgetUtils.js";import{messageBundle as p}from"./support/decorators/messageBundle.js";import{tsx as u}from"./support/jsxFactory.js";const m="esri-area-measurement-3d",c={base:m,newMeasurementButton:`${m}__clear-button`,widgetIcon:a.measureArea};let d=class extends o{constructor(e,t){super(e,t),this.iconClass=c.widgetIcon,this.icon=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new r}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}get active(){return this.viewModel.active}get analysis(){return this.viewModel.analysis}set analysis(e){this.viewModel.analysis=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get unitOptions(){return this.viewModel.unitOptions}set unitOptions(e){this.viewModel.unitOptions=e}get unit(){return this.viewModel.unit}set unit(e){this.viewModel.unit=e}render(){const{messages:e,messagesCommon:s,messagesUnits:i,unit:o,unitOptions:r,viewModel:a}=this,{active:p,measurement:m,state:d,supported:g}=a;return u("div",{"aria-label":this.messages.widgetLabel,class:this.classes(c.base,n.widget,n.panel),key:this,role:"presentation"},this.visible?u(l,{active:p,measurementItems:[{key:"direct",title:i.measures.area,value:v(m?.area)},{key:"perimeter",title:e.perimeterLength,value:v(m?.perimeterLength)}],messages:{...e,notApplicable:s.notApplicable},newMeasurementButtonClass:c.newMeasurementButton,state:d,supported:g,unit:o,unitOptions:r,onNewMeasurementClick:()=>{t(this.viewModel.start())},onUnitChange:e=>{this.unit=e}}):null)}};function v(e){return"available"===e?.state?e.text:null}e([s()],d.prototype,"view",null),e([s()],d.prototype,"visible",null),e([s()],d.prototype,"active",null),e([s({constructOnly:!0,nonNullable:!0})],d.prototype,"analysis",null),e([s()],d.prototype,"iconClass",void 0),e([s()],d.prototype,"icon",void 0),e([s()],d.prototype,"label",null),e([s(),p("esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D")],d.prototype,"messages",void 0),e([s(),p("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([s(),p("esri/core/t9n/Units")],d.prototype,"messagesUnits",void 0),e([s()],d.prototype,"uiStrings",void 0),e([s({type:r})],d.prototype,"viewModel",void 0),e([s()],d.prototype,"unitOptions",null),e([s()],d.prototype,"unit",null),d=e([i("esri.widgets.AreaMeasurement3D")],d);const g=d;export{g as default};
|
package/widgets/Attachments.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.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{on as s,watch as i,initial as a}from"../core/reactiveUtils.js";import{formatFileSize as n}from"../core/unitFormatUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{cast as r}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import d from"./Widget.js";import m from"./Attachments/AttachmentsViewModel.js";import{getIconPath as c,isSupportedImage as h}from"./Attachments/support/attachmentUtils.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{legacyIcon as b}from"./support/legacyIcon.js";import{storeNode as _,discardNode as g,isRTL as f}from"./support/widgetUtils.js";import{messageBundle as v}from"./support/decorators/messageBundle.js";import{tsx as y}from"./support/jsxFactory.js";const A={addButton:!0,addSubmitButton:!0,cancelAddButton:!0,cancelUpdateButton:!0,deleteButton:!0,errorMessage:!0,progressBar:!0,updateButton:!0},w="esri-attachments",F={base:w,loaderContainer:`${w}__loader-container`,loader:`${w}__loader`,fadeIn:`${w}--fade-in`,container:`${w}__container`,containerList:`${w}__container--list`,containerPreview:`${w}__container--preview`,actions:`${w}__actions`,deleteButton:`${w}__delete-button`,addAttachmentButton:`${w}__add-attachment-button`,errorMessage:`${w}__error-message`,items:`${w}__items`,item:`${w}__item`,itemButton:`${w}__item-button`,itemMask:`${w}__item-mask`,itemMaskIcon:`${w}__item-mask--icon`,itemImage:`${w}__image`,itemImageResizable:`${w}__image--resizable`,itemLabel:`${w}__label`,itemFilename:`${w}__filename`,itemChevronIcon:`${w}__item-chevron-icon`,itemLink:`${w}__item-link`,itemLinkOverlay:`${w}__item-link-overlay`,itemLinkOverlayIcon:`${w}__item-link-overlay-icon`,itemEditIcon:`${w}__item-edit-icon`,itemAddIcon:`${w}__item-add-icon`,itemAddButton:`${w}__item-add-button`,formNode:`${w}__form-node`,fileFieldset:`${w}__file-fieldset`,fileLabel:`${w}__file-label`,fileName:`${w}__file-name`,fileInput:`${w}__file-input`,metadata:`${w}__metadata`,metadataFieldset:`${w}__metadata-fieldset`,progressBar:`${w}__progress-bar`},k=window.CSS;let M=class extends d{constructor(e,t){super(e,t),this.displayType="auto",this.messages=null,this.messagesUnits=null,this.selectedFile=null,this.submitting=!1,this.viewModel=null,this.visibleElements={...A},this._supportsImageOrientation=k&&k.supports&&k.supports("image-orientation","from-image"),this._addAttachmentForm=null,this._updateAttachmentForm=null}normalizeCtorArgs(e){return e?.viewModel||(e={viewModel:new m,...e}),e}initialize(){this.addHandles([s((()=>this.viewModel?.attachmentInfos),"change",(()=>this.scheduleRender())),s((()=>this.viewModel?.fileInfos),"change",(()=>this.scheduleRender())),i((()=>this.viewModel?.mode),(()=>this._modeChanged()),a)])}loadDependencies(){return u({icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js")})}get capabilities(){return this.viewModel.capabilities}set capabilities(e){this.viewModel.capabilities=e}get effectiveDisplayType(){const{displayType:e}=this;return e&&"auto"!==e?e:this.viewModel.supportsResizeAttachments?"preview":"list"}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}castVisibleElements(e){return{...A,...e}}addAttachment(){const{_addAttachmentForm:e,viewModel:s}=this;return this._set("submitting",!0),this._set("error",null),s.addAttachment(e).then((e=>(this._set("submitting",!1),this._set("error",null),s.mode="view",e))).catch((e=>{throw this._set("submitting",!1),this._set("error",new t("attachments:add-attachment",this.messages.addErrorMessage,e)),e}))}deleteAttachment(e){const{viewModel:s}=this;return this._set("submitting",!0),this._set("error",null),s.deleteAttachment(e).then((e=>(this._set("submitting",!1),this._set("error",null),s.mode="view",e))).catch((e=>{throw this._set("submitting",!1),this._set("error",new t("attachments:delete-attachment",this.messages.deleteErrorMessage,e)),e}))}updateAttachment(){const{viewModel:e}=this,{_updateAttachmentForm:s}=this;return this._set("submitting",!0),this._set("error",null),e.updateAttachment(s).then((t=>(this._set("submitting",!1),this._set("error",null),e.mode="view",t))).catch((e=>{throw this._set("submitting",!1),this._set("error",new t("attachments:update-attachment",this.messages.updateErrorMessage,e)),e}))}addFile(){const e=this.viewModel.addFile(this.selectedFile,this._addAttachmentForm);return this.viewModel.mode="view",e}updateFile(){const{viewModel:e}=this,t=e.updateFile(this.selectedFile,this._updateAttachmentForm,e.activeFileInfo);return e.mode="view",t}deleteFile(e){const t=this.viewModel.deleteFile(e||this.viewModel.activeFileInfo?.file);return this.viewModel.mode="view",t}render(){const{submitting:e,viewModel:t}=this,{state:s}=t;return y("div",{class:this.classes(F.base,p.widget)},e?this._renderProgressBar():null,"loading"===s?this._renderLoading():this._renderAttachments(),this._renderErrorMessage())}_renderErrorMessage(){const{error:e,visibleElements:t}=this;return e&&t.errorMessage?y("div",{key:"error-message",class:F.errorMessage},e.message):null}_renderAttachments(){const{activeFileInfo:e,mode:t,activeAttachmentInfo:s}=this.viewModel;return"add"===t?this._renderAddForm():"edit"===t?this._renderDetailsForm(s||e):this._renderAttachmentContainer()}_renderLoading(){return y("div",{class:F.loaderContainer,key:"loader"},y("div",{class:F.loader}))}_renderProgressBar(){return this.visibleElements.progressBar?y("div",{class:F.progressBar,key:"progress-bar"}):null}_renderAddForm(){const{submitting:e,selectedFile:t}=this,s=e||!t,i=this.visibleElements.cancelAddButton?y("button",{type:"button",bind:this,disabled:e,onclick:this._cancelForm,class:this.classes(p.button,p.buttonTertiary,p.buttonSmall,p.buttonHalf,e&&p.buttonDisabled)},this.messages.cancel):null,a=this.visibleElements.addSubmitButton?y("button",{type:"submit",disabled:s,class:this.classes(p.button,p.buttonSecondary,p.buttonSmall,p.buttonHalf,{[p.buttonDisabled]:s})},this.messages.add):null,n=t?y("span",{key:"file-name",class:F.fileName},t.name):null,l=y("form",{bind:this,afterCreate:_,afterRemoved:g,"data-node-ref":"_addAttachmentForm",onsubmit:this._submitAddAttachment},y("fieldset",{class:F.fileFieldset},n,y("label",{class:this.classes(F.fileLabel,p.button,p.buttonSecondary)},t?this.messages.changeFile:this.messages.selectFile,y("input",{class:F.fileInput,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))),a,i);return y("div",{key:"add-form-container",class:F.formNode},l)}_renderDetailsForm(e){const{visibleElements:t,viewModel:s,selectedFile:i,submitting:a}=this,{capabilities:l}=s,r=a||!i;let o,d,m,c;i?(o=i.type,d=i.name,m=i.size):e&&"file"in e?(o=e.file.type,d=e.file.name,m=e.file.size):e&&"contentType"in e&&(o=e.contentType,d=e.name,m=e.size,c=e.url);const h=l.editing&&l.operations?.delete&&t.deleteButton?y("button",{key:"delete-button",type:"button",disabled:a,bind:this,onclick:t=>this._submitDeleteAttachment(t,e),class:this.classes(p.button,p.buttonSmall,p.buttonTertiary,F.deleteButton,{[p.buttonDisabled]:a})},this.messages.delete):void 0,u=l.editing&&l.operations?.update&&t.updateButton?y("button",{disabled:r,key:"update-button",type:"submit",class:this.classes(p.button,p.buttonSmall,p.buttonThird,{[p.buttonDisabled]:r})},this.messages.update):void 0,b=this.visibleElements.cancelUpdateButton?y("button",{disabled:a,key:"cancel-button",type:"button",bind:this,onclick:this._cancelForm,class:this.classes(p.button,p.buttonSmall,p.buttonTertiary,p.buttonThird,{[p.buttonDisabled]:a})},this.messages.cancel):void 0,f=l.editing&&l.operations?.update?y("fieldset",{key:"file",class:F.fileFieldset},y("span",{key:"file-name",class:F.fileName},d),y("label",{class:this.classes(F.fileLabel,p.button,p.buttonSecondary)},this.messages.changeFile,y("input",{class:F.fileInput,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))):void 0,v=y("fieldset",{key:"size",class:F.metadataFieldset},y("label",null,n(this.messagesUnits,m??0))),A=y("fieldset",{key:"content-type",class:F.metadataFieldset},y("label",null,o)),w=null!=c?y("a",{class:F.itemLink,href:c,rel:"noreferrer",target:"_blank"},this._renderImageMask(e,400),y("div",{class:F.itemLinkOverlay},y("span",{class:F.itemLinkOverlayIcon},y("calcite-icon",{icon:"launch"})))):this._renderImageMask(e,400),k=y("form",{bind:this,afterCreate:_,afterRemoved:g,"data-node-ref":"_updateAttachmentForm",onsubmit:t=>this._submitUpdateAttachment(t,e)},y("div",{class:F.metadata},v,A),f,y("div",{class:F.actions},h,b,u));return y("div",{key:"edit-form-container",class:F.formNode},w,k)}_renderImageMask(e,t){return e?"file"in e?this._renderGenericImageMask(e.file.name,e.file.type):this._renderImageMaskForAttachment(e,t):null}_renderGenericImageMask(e,t){const{supportsResizeAttachments:s}=this.viewModel,i=c(t),a={[F.itemImageResizable]:s};return y("div",{key:i,class:this.classes(F.itemMaskIcon,F.itemMask)},y("img",{title:e,alt:e,src:i,class:this.classes(a,F.itemImage)}))}_renderImageMaskForAttachment(e,t){const{supportsResizeAttachments:s}=this.viewModel;if(!e)return null;const{contentType:i,name:a,url:n}=e;if(!s||!h(i))return this._renderGenericImageMask(a,i);const l=this._getCSSTransform(e),r=l?{transform:l,"image-orientation":"none"}:{},o=`${n}${n?.includes("?")?"&":"?"}w=${t}`,d={[F.itemImageResizable]:s};return y("div",{key:o,class:this.classes(F.itemMask)},y("img",{styles:r,alt:a,title:a,src:o,class:this.classes(d,F.itemImage)}))}_renderFile(e){const{file:t}=e;return y("li",{class:F.item,key:t},y("button",{key:"details-button",bind:this,class:F.itemButton,title:this.messages.attachmentDetails,"aria-label":this.messages.attachmentDetails,onclick:()=>this._startEditFile(e),type:"button"},this._renderImageMask(e),y("label",{class:F.itemLabel},y("span",{class:F.itemFilename},t.name||this.messages.noTitle),y("span",{"aria-hidden":"true",class:this.classes(F.itemChevronIcon,f(this.container)?b.left:b.right)}))))}_renderAttachmentInfo({attachmentInfo:e,displayType:t}){const{viewModel:s,effectiveDisplayType:i}=this,{capabilities:a,supportsResizeAttachments:n}=s,{contentType:l,name:r,url:o}=e,d=this._renderImageMask(e,"list"===t?48:400),m=a.editing?y("span",{"aria-hidden":"true",class:this.classes(F.itemChevronIcon,f(this.container)?b.left:b.right)}):null,c=[d,"preview"===i&&n&&h(l)?null:y("label",{class:F.itemLabel},y("span",{class:F.itemFilename},r||this.messages.noTitle),m)],u=a.editing?y("button",{key:"details-button",bind:this,class:F.itemButton,title:this.messages.attachmentDetails,"aria-label":this.messages.attachmentDetails,"data-attachment-info-id":e.id,onclick:()=>this._startEditAttachment(e),type:"button"},c):y("a",{key:"details-link",class:F.itemButton,href:o??void 0,target:"_blank"},c);return y("li",{class:F.item,key:e},u)}_renderAttachmentContainer(){const{effectiveDisplayType:e,viewModel:t,visibleElements:s}=this,{attachmentInfos:i,capabilities:a,fileInfos:n}=t,l=!!i?.length,r=!!n?.length,o={[F.containerList]:"preview"!==e,[F.containerPreview]:"preview"===e},d=a.editing&&a.operations?.add&&s.addButton?y("button",{bind:this,onclick:()=>this._startAddAttachment(),class:this.classes(p.button,p.buttonTertiary,F.addAttachmentButton),type:"button"},y("span",{"aria-hidden":"true",class:this.classes(F.itemAddIcon,b.plus)}),this.messages.add):void 0,m=l?y("ul",{key:"attachments-list",class:F.items},i.toArray().map((t=>this._renderAttachmentInfo({attachmentInfo:t,displayType:e})))):void 0,c=r?y("ul",{key:"file-list",class:F.items},n.toArray().map((e=>this._renderFile(e)))):void 0,h=r||l?void 0:y("div",{class:p.empty},this.messages.noAttachments);return y("div",{key:"attachments-container",class:this.classes(F.container,o)},m,c,h,d)}_modeChanged(){this._set("error",null),this._set("selectedFile",null)}_handleFileInputChange(e){const t=e.target,s=t&&t.files&&t.files.item(0);this._set("selectedFile",s)}_submitDeleteAttachment(e,t){e.preventDefault(),t&&("file"in t?this.deleteFile(t.file):t&&this.deleteAttachment(t))}_submitAddAttachment(e){e.preventDefault(),this.viewModel.filesEnabled?this.addFile():this.addAttachment()}_submitUpdateAttachment(e,t){e.preventDefault(),t&&"file"in t?this.updateFile():this.updateAttachment()}_startEditAttachment(e){const{viewModel:t}=this;t.activeFileInfo=null,t.activeAttachmentInfo=e,t.mode="edit"}_startEditFile(e){const{viewModel:t}=this;t.activeAttachmentInfo=null,t.activeFileInfo=e,t.mode="edit"}_startAddAttachment(){this.viewModel.mode="add"}_cancelForm(e){e.preventDefault(),this.viewModel.mode="view"}_getCSSTransform(e){const{orientationInfo:t}=e;return!this._supportsImageOrientation&&t?[t.rotation?`rotate(${t.rotation}deg)`:"",t.mirrored?"scaleX(-1)":""].join(" "):""}};e([l()],M.prototype,"capabilities",null),e([l()],M.prototype,"displayType",void 0),e([l({readOnly:!0})],M.prototype,"effectiveDisplayType",null),e([l()],M.prototype,"graphic",null),e([l()],M.prototype,"label",null),e([l(),v("esri/widgets/Attachments/t9n/Attachments")],M.prototype,"messages",void 0),e([l(),v("esri/core/t9n/Units")],M.prototype,"messagesUnits",void 0),e([l({readOnly:!0})],M.prototype,"selectedFile",void 0),e([l({readOnly:!0})],M.prototype,"submitting",void 0),e([l({readOnly:!0})],M.prototype,"error",void 0),e([l({type:m})],M.prototype,"viewModel",void 0),e([l()],M.prototype,"visibleElements",void 0),e([r("visibleElements")],M.prototype,"castVisibleElements",null),M=e([o("esri.widgets.Attachments")],M);const I=M;export{I as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{on as s,watch as i,initial as a}from"../core/reactiveUtils.js";import{formatFileSize as n}from"../core/unitFormatUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{cast as r}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import d from"./Widget.js";import m from"./Attachments/AttachmentsViewModel.js";import{getIconPath as c,isSupportedImage as h}from"./Attachments/support/attachmentUtils.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{legacyIcon as b}from"./support/legacyIcon.js";import{storeNode as _,discardNode as g,isRTL as f}from"./support/widgetUtils.js";import{messageBundle as v}from"./support/decorators/messageBundle.js";import{tsx as y}from"./support/jsxFactory.js";const A={addButton:!0,addSubmitButton:!0,cancelAddButton:!0,cancelUpdateButton:!0,deleteButton:!0,errorMessage:!0,progressBar:!0,updateButton:!0},w="esri-attachments",F={base:w,loaderContainer:`${w}__loader-container`,loader:`${w}__loader`,fadeIn:`${w}--fade-in`,container:`${w}__container`,containerList:`${w}__container--list`,containerPreview:`${w}__container--preview`,actions:`${w}__actions`,deleteButton:`${w}__delete-button`,addAttachmentButton:`${w}__add-attachment-button`,errorMessage:`${w}__error-message`,items:`${w}__items`,item:`${w}__item`,itemButton:`${w}__item-button`,itemMask:`${w}__item-mask`,itemMaskIcon:`${w}__item-mask--icon`,itemImage:`${w}__image`,itemImageResizable:`${w}__image--resizable`,itemLabel:`${w}__label`,itemFilename:`${w}__filename`,itemChevronIcon:`${w}__item-chevron-icon`,itemLink:`${w}__item-link`,itemLinkOverlay:`${w}__item-link-overlay`,itemLinkOverlayIcon:`${w}__item-link-overlay-icon`,itemEditIcon:`${w}__item-edit-icon`,itemAddIcon:`${w}__item-add-icon`,itemAddButton:`${w}__item-add-button`,formNode:`${w}__form-node`,fileFieldset:`${w}__file-fieldset`,fileLabel:`${w}__file-label`,fileName:`${w}__file-name`,fileInput:`${w}__file-input`,metadata:`${w}__metadata`,metadataFieldset:`${w}__metadata-fieldset`,progressBar:`${w}__progress-bar`},k=window.CSS;let M=class extends d{constructor(e,t){super(e,t),this.displayType="auto",this.messages=null,this.messagesUnits=null,this.selectedFile=null,this.submitting=!1,this.viewModel=null,this.visibleElements={...A},this._supportsImageOrientation=k&&k.supports&&k.supports("image-orientation","from-image"),this._addAttachmentForm=null,this._updateAttachmentForm=null}normalizeCtorArgs(e){return e?.viewModel||(e={viewModel:new m,...e}),e}initialize(){this.addHandles([s((()=>this.viewModel?.attachmentInfos),"change",(()=>this.scheduleRender())),s((()=>this.viewModel?.fileInfos),"change",(()=>this.scheduleRender())),i((()=>this.viewModel?.mode),(()=>this._modeChanged()),a)])}loadDependencies(){return u({icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js")})}get capabilities(){return this.viewModel.capabilities}set capabilities(e){this.viewModel.capabilities=e}get effectiveDisplayType(){const{displayType:e}=this;return e&&"auto"!==e?e:this.viewModel.supportsResizeAttachments?"preview":"list"}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}castVisibleElements(e){return{...A,...e}}addAttachment(){const{_addAttachmentForm:e,viewModel:s}=this;return this._set("submitting",!0),this._set("error",null),s.addAttachment(e).then((e=>(this._set("submitting",!1),this._set("error",null),s.mode="view",e))).catch((e=>{throw this._set("submitting",!1),this._set("error",new t("attachments:add-attachment",this.messages.addErrorMessage,e)),e}))}deleteAttachment(e){const{viewModel:s}=this;return this._set("submitting",!0),this._set("error",null),s.deleteAttachment(e).then((e=>(this._set("submitting",!1),this._set("error",null),s.mode="view",e))).catch((e=>{throw this._set("submitting",!1),this._set("error",new t("attachments:delete-attachment",this.messages.deleteErrorMessage,e)),e}))}updateAttachment(){const{viewModel:e}=this,{_updateAttachmentForm:s}=this;return this._set("submitting",!0),this._set("error",null),e.updateAttachment(s).then((t=>(this._set("submitting",!1),this._set("error",null),e.mode="view",t))).catch((e=>{throw this._set("submitting",!1),this._set("error",new t("attachments:update-attachment",this.messages.updateErrorMessage,e)),e}))}addFile(){const e=this.viewModel.addFile(this.selectedFile,this._addAttachmentForm);return this.viewModel.mode="view",e}updateFile(){const{viewModel:e}=this,t=e.updateFile(this.selectedFile,this._updateAttachmentForm,e.activeFileInfo);return e.mode="view",t}deleteFile(e){const t=this.viewModel.deleteFile(e||this.viewModel.activeFileInfo?.file);return this.viewModel.mode="view",t}render(){const{submitting:e,viewModel:t}=this,{state:s}=t;return y("div",{class:this.classes(F.base,p.widget)},e?this._renderProgressBar():null,"loading"===s?this._renderLoading():this._renderAttachments(),this._renderErrorMessage())}_renderErrorMessage(){const{error:e,visibleElements:t}=this;return e&&t.errorMessage?y("div",{class:F.errorMessage,key:"error-message"},e.message):null}_renderAttachments(){const{activeFileInfo:e,mode:t,activeAttachmentInfo:s}=this.viewModel;return"add"===t?this._renderAddForm():"edit"===t?this._renderDetailsForm(s||e):this._renderAttachmentContainer()}_renderLoading(){return y("div",{class:F.loaderContainer,key:"loader"},y("div",{class:F.loader}))}_renderProgressBar(){return this.visibleElements.progressBar?y("div",{class:F.progressBar,key:"progress-bar"}):null}_renderAddForm(){const{submitting:e,selectedFile:t}=this,s=e||!t,i=this.visibleElements.cancelAddButton?y("button",{bind:this,class:this.classes(p.button,p.buttonTertiary,p.buttonSmall,p.buttonHalf,e&&p.buttonDisabled),disabled:e,onclick:this._cancelForm,type:"button"},this.messages.cancel):null,a=this.visibleElements.addSubmitButton?y("button",{class:this.classes(p.button,p.buttonSecondary,p.buttonSmall,p.buttonHalf,{[p.buttonDisabled]:s}),disabled:s,type:"submit"},this.messages.add):null,n=t?y("span",{class:F.fileName,key:"file-name"},t.name):null,l=y("form",{afterCreate:_,afterRemoved:g,bind:this,"data-node-ref":"_addAttachmentForm",onsubmit:this._submitAddAttachment},y("fieldset",{class:F.fileFieldset},n,y("label",{class:this.classes(F.fileLabel,p.button,p.buttonSecondary)},t?this.messages.changeFile:this.messages.selectFile,y("input",{bind:this,class:F.fileInput,name:"attachment",onchange:this._handleFileInputChange,type:"file"}))),a,i);return y("div",{class:F.formNode,key:"add-form-container"},l)}_renderDetailsForm(e){const{visibleElements:t,viewModel:s,selectedFile:i,submitting:a}=this,{capabilities:l}=s,r=a||!i;let o,d,m,c;i?(o=i.type,d=i.name,m=i.size):e&&"file"in e?(o=e.file.type,d=e.file.name,m=e.file.size):e&&"contentType"in e&&(o=e.contentType,d=e.name,m=e.size,c=e.url);const h=l.editing&&l.operations?.delete&&t.deleteButton?y("button",{bind:this,class:this.classes(p.button,p.buttonSmall,p.buttonTertiary,F.deleteButton,{[p.buttonDisabled]:a}),disabled:a,key:"delete-button",onclick:t=>this._submitDeleteAttachment(t,e),type:"button"},this.messages.delete):void 0,u=l.editing&&l.operations?.update&&t.updateButton?y("button",{class:this.classes(p.button,p.buttonSmall,p.buttonThird,{[p.buttonDisabled]:r}),disabled:r,key:"update-button",type:"submit"},this.messages.update):void 0,b=this.visibleElements.cancelUpdateButton?y("button",{bind:this,class:this.classes(p.button,p.buttonSmall,p.buttonTertiary,p.buttonThird,{[p.buttonDisabled]:a}),disabled:a,key:"cancel-button",onclick:this._cancelForm,type:"button"},this.messages.cancel):void 0,f=l.editing&&l.operations?.update?y("fieldset",{class:F.fileFieldset,key:"file"},y("span",{class:F.fileName,key:"file-name"},d),y("label",{class:this.classes(F.fileLabel,p.button,p.buttonSecondary)},this.messages.changeFile,y("input",{bind:this,class:F.fileInput,name:"attachment",onchange:this._handleFileInputChange,type:"file"}))):void 0,v=y("fieldset",{class:F.metadataFieldset,key:"size"},y("label",null,n(this.messagesUnits,m??0))),A=y("fieldset",{class:F.metadataFieldset,key:"content-type"},y("label",null,o)),w=null!=c?y("a",{class:F.itemLink,href:c,rel:"noreferrer",target:"_blank"},this._renderImageMask(e,400),y("div",{class:F.itemLinkOverlay},y("span",{class:F.itemLinkOverlayIcon},y("calcite-icon",{icon:"launch"})))):this._renderImageMask(e,400),k=y("form",{afterCreate:_,afterRemoved:g,bind:this,"data-node-ref":"_updateAttachmentForm",onsubmit:t=>this._submitUpdateAttachment(t,e)},y("div",{class:F.metadata},v,A),f,y("div",{class:F.actions},h,b,u));return y("div",{class:F.formNode,key:"edit-form-container"},w,k)}_renderImageMask(e,t){return e?"file"in e?this._renderGenericImageMask(e.file.name,e.file.type):this._renderImageMaskForAttachment(e,t):null}_renderGenericImageMask(e,t){const{supportsResizeAttachments:s}=this.viewModel,i=c(t),a={[F.itemImageResizable]:s};return y("div",{class:this.classes(F.itemMaskIcon,F.itemMask),key:i},y("img",{alt:e,class:this.classes(a,F.itemImage),src:i,title:e}))}_renderImageMaskForAttachment(e,t){const{supportsResizeAttachments:s}=this.viewModel;if(!e)return null;const{contentType:i,name:a,url:n}=e;if(!s||!h(i))return this._renderGenericImageMask(a,i);const l=this._getCSSTransform(e),r=l?{transform:l,"image-orientation":"none"}:{},o=`${n}${n?.includes("?")?"&":"?"}w=${t}`,d={[F.itemImageResizable]:s};return y("div",{class:this.classes(F.itemMask),key:o},y("img",{alt:a,class:this.classes(d,F.itemImage),src:o,styles:r,title:a}))}_renderFile(e){const{file:t}=e;return y("li",{class:F.item,key:t},y("button",{"aria-label":this.messages.attachmentDetails,bind:this,class:F.itemButton,key:"details-button",onclick:()=>this._startEditFile(e),title:this.messages.attachmentDetails,type:"button"},this._renderImageMask(e),y("label",{class:F.itemLabel},y("span",{class:F.itemFilename},t.name||this.messages.noTitle),y("span",{"aria-hidden":"true",class:this.classes(F.itemChevronIcon,f(this.container)?b.left:b.right)}))))}_renderAttachmentInfo({attachmentInfo:e,displayType:t}){const{viewModel:s,effectiveDisplayType:i}=this,{capabilities:a,supportsResizeAttachments:n}=s,{contentType:l,name:r,url:o}=e,d=this._renderImageMask(e,"list"===t?48:400),m=a.editing?y("span",{"aria-hidden":"true",class:this.classes(F.itemChevronIcon,f(this.container)?b.left:b.right)}):null,c=[d,"preview"===i&&n&&h(l)?null:y("label",{class:F.itemLabel},y("span",{class:F.itemFilename},r||this.messages.noTitle),m)],u=a.editing?y("button",{"aria-label":this.messages.attachmentDetails,bind:this,class:F.itemButton,"data-attachment-info-id":e.id,key:"details-button",onclick:()=>this._startEditAttachment(e),title:this.messages.attachmentDetails,type:"button"},c):y("a",{class:F.itemButton,href:o??void 0,key:"details-link",target:"_blank"},c);return y("li",{class:F.item,key:e},u)}_renderAttachmentContainer(){const{effectiveDisplayType:e,viewModel:t,visibleElements:s}=this,{attachmentInfos:i,capabilities:a,fileInfos:n}=t,l=!!i?.length,r=!!n?.length,o={[F.containerList]:"preview"!==e,[F.containerPreview]:"preview"===e},d=a.editing&&a.operations?.add&&s.addButton?y("button",{bind:this,class:this.classes(p.button,p.buttonTertiary,F.addAttachmentButton),onclick:()=>this._startAddAttachment(),type:"button"},y("span",{"aria-hidden":"true",class:this.classes(F.itemAddIcon,b.plus)}),this.messages.add):void 0,m=l?y("ul",{class:F.items,key:"attachments-list"},i.toArray().map((t=>this._renderAttachmentInfo({attachmentInfo:t,displayType:e})))):void 0,c=r?y("ul",{class:F.items,key:"file-list"},n.toArray().map((e=>this._renderFile(e)))):void 0,h=r||l?void 0:y("div",{class:p.empty},this.messages.noAttachments);return y("div",{class:this.classes(F.container,o),key:"attachments-container"},m,c,h,d)}_modeChanged(){this._set("error",null),this._set("selectedFile",null)}_handleFileInputChange(e){const t=e.target,s=t&&t.files&&t.files.item(0);this._set("selectedFile",s)}_submitDeleteAttachment(e,t){e.preventDefault(),t&&("file"in t?this.deleteFile(t.file):t&&this.deleteAttachment(t))}_submitAddAttachment(e){e.preventDefault(),this.viewModel.filesEnabled?this.addFile():this.addAttachment()}_submitUpdateAttachment(e,t){e.preventDefault(),t&&"file"in t?this.updateFile():this.updateAttachment()}_startEditAttachment(e){const{viewModel:t}=this;t.activeFileInfo=null,t.activeAttachmentInfo=e,t.mode="edit"}_startEditFile(e){const{viewModel:t}=this;t.activeAttachmentInfo=null,t.activeFileInfo=e,t.mode="edit"}_startAddAttachment(){this.viewModel.mode="add"}_cancelForm(e){e.preventDefault(),this.viewModel.mode="view"}_getCSSTransform(e){const{orientationInfo:t}=e;return!this._supportsImageOrientation&&t?[t.rotation?`rotate(${t.rotation}deg)`:"",t.mirrored?"scaleX(-1)":""].join(" "):""}};e([l()],M.prototype,"capabilities",null),e([l()],M.prototype,"displayType",void 0),e([l({readOnly:!0})],M.prototype,"effectiveDisplayType",null),e([l()],M.prototype,"graphic",null),e([l()],M.prototype,"label",null),e([l(),v("esri/widgets/Attachments/t9n/Attachments")],M.prototype,"messages",void 0),e([l(),v("esri/core/t9n/Units")],M.prototype,"messagesUnits",void 0),e([l({readOnly:!0})],M.prototype,"selectedFile",void 0),e([l({readOnly:!0})],M.prototype,"submitting",void 0),e([l({readOnly:!0})],M.prototype,"error",void 0),e([l({type:m})],M.prototype,"viewModel",void 0),e([l()],M.prototype,"visibleElements",void 0),e([r("visibleElements")],M.prototype,"castVisibleElements",null),M=e([o("esri.widgets.Attachments")],M);const I=M;export{I as default};
|
package/widgets/Attribution.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.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{on as t}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import s from"./Widget.js";import o from"./Attribution/AttributionViewModel.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as p}from"./support/legacyIcon.js";import{accessibleHandler as l}from"./support/decorators/accessibleHandler.js";import{messageBundle as c}from"./support/decorators/messageBundle.js";import{tsx as d}from"./support/jsxFactory.js";import"./support/widgetUtils.js";const a="esri-attribution",h={base:a,poweredBy:`${a}__powered-by`,sources:`${a}__sources`,open:`${a}--open`,sourcesOpen:`${a}__sources--open`,link:`${a}__link`,widgetIcon:p.description};let u=class extends s{constructor(e,t){super(e,t),this._isOpen=!1,this._attributionTextOverflowed=!1,this._prevSourceNodeHeight=0,this._resizeObserver=new ResizeObserver((e=>e.forEach((({target:e})=>this._checkSourceTextOverflow(e))))),this.iconClass=h.widgetIcon,this.icon=null,this.itemDelimiter=" | ",this.messages=null,this.viewModel=new o}initialize(){this.addHandles(t((()=>this.viewModel?.items),"change",(()=>this.scheduleRender())))}destroy(){this._resizeObserver?.disconnect()}get _isInteractive(){return this._isOpen||this._attributionTextOverflowed}get attributionText(){return this.viewModel.items.reduce(((e,t)=>(e.includes(t.text)||e.push(t.text),e)),[]).join(this.itemDelimiter)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const e={[h.open]:this._isOpen};return d("div",{bind:this,class:this.classes(h.base,n.widget,e),dir:"ltr",onclick:this._toggleState,onkeydown:this._toggleState},this._renderSourcesNode(),this._renderPoweredBy())}_renderPoweredBy(){return d("div",{class:h.poweredBy},"Powered by"," ",d("a",{class:h.link,href:"http://www.esri.com/",
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{on as t}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import s from"./Widget.js";import o from"./Attribution/AttributionViewModel.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as p}from"./support/legacyIcon.js";import{accessibleHandler as l}from"./support/decorators/accessibleHandler.js";import{messageBundle as c}from"./support/decorators/messageBundle.js";import{tsx as d}from"./support/jsxFactory.js";import"./support/widgetUtils.js";const a="esri-attribution",h={base:a,poweredBy:`${a}__powered-by`,sources:`${a}__sources`,open:`${a}--open`,sourcesOpen:`${a}__sources--open`,link:`${a}__link`,widgetIcon:p.description};let u=class extends s{constructor(e,t){super(e,t),this._isOpen=!1,this._attributionTextOverflowed=!1,this._prevSourceNodeHeight=0,this._resizeObserver=new ResizeObserver((e=>e.forEach((({target:e})=>this._checkSourceTextOverflow(e))))),this.iconClass=h.widgetIcon,this.icon=null,this.itemDelimiter=" | ",this.messages=null,this.viewModel=new o}initialize(){this.addHandles(t((()=>this.viewModel?.items),"change",(()=>this.scheduleRender())))}destroy(){this._resizeObserver?.disconnect()}get _isInteractive(){return this._isOpen||this._attributionTextOverflowed}get attributionText(){return this.viewModel.items.reduce(((e,t)=>(e.includes(t.text)||e.push(t.text),e)),[]).join(this.itemDelimiter)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const e={[h.open]:this._isOpen};return d("div",{bind:this,class:this.classes(h.base,n.widget,e),dir:"ltr",onclick:this._toggleState,onkeydown:this._toggleState},this._renderSourcesNode(),this._renderPoweredBy())}_renderPoweredBy(){return d("div",{class:h.poweredBy},"Powered by"," ",d("a",{class:h.link,href:"http://www.esri.com/",rel:"noreferrer",target:"_blank"},"Esri"))}_renderSourcesNode(){const e=this._isOpen,t=this._isInteractive,i=t?0:void 0,{attributionText:r}=this,s={[h.sourcesOpen]:e,[n.interactive]:t};return d("div",{afterCreate:this._afterSourcesNodeCreate,bind:this,class:this.classes(h.sources,s),innerHTML:r,tabIndex:i})}_afterSourcesNodeCreate(e){this._prevSourceNodeHeight=e.clientWidth,this._resizeObserver.observe(e)}_checkSourceTextOverflow(e){let t=!1;const{clientHeight:i,clientWidth:r,scrollWidth:s}=e,o=s>r,n=this._attributionTextOverflowed!==o;if(this._attributionTextOverflowed=o,n&&(t=!0),this._isOpen){const e=i<this._prevSourceNodeHeight;this._prevSourceNodeHeight=i,e&&(this._isOpen=!1,t=!0)}t&&this.scheduleRender()}_toggleState(){this._isInteractive&&(this._isOpen=!this._isOpen)}};e([i()],u.prototype,"_isOpen",void 0),e([i()],u.prototype,"_isInteractive",null),e([i()],u.prototype,"_attributionTextOverflowed",void 0),e([i()],u.prototype,"_prevSourceNodeHeight",void 0),e([i({readOnly:!0,dependsOn:["viewModel.items.length","itemDelimiter"]})],u.prototype,"attributionText",null),e([i()],u.prototype,"iconClass",void 0),e([i()],u.prototype,"icon",void 0),e([i()],u.prototype,"itemDelimiter",void 0),e([i()],u.prototype,"label",null),e([i(),c("esri/widgets/Attribution/t9n/Attribution")],u.prototype,"messages",void 0),e([i()],u.prototype,"view",null),e([i({type:o})],u.prototype,"viewModel",void 0),e([l()],u.prototype,"_toggleState",null),u=e([r("esri.widgets.Attribution")],u);const _=u;export{_ as default};
|