@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923
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/PopupTemplate.js +1 -1
- package/TimeExtent.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/convertdirection.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/treeAnalysis.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
- 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/1186ba1947bd0c32f148.js +1 -0
- package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
- package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
- package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
- package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
- package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
- package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
- package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
- package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
- package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
- 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/4fe5bac782a742d5b1c0.js +1 -0
- 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/59a807220d6f0dd18776.js +1 -0
- package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
- package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
- package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
- package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
- 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/72c5bd6f7b8541b8d69e.js +1 -0
- package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
- package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
- package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.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/8458ed96f3e72814cef2.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/91c9f0d59eaed7a735ce.js +1 -0
- package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
- package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
- package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
- package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
- package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
- package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
- package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
- package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
- package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
- package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
- package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
- package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
- package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.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/d9fb500cbd0f04d219a3.js +1 -0
- package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
- package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
- package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
- 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/fad6a7bb82a0a2df726f.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
- 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/chunks/arcade.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/number.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/core/sql/DateOnly.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql.js +1 -1
- package/core/timeUtils.js +1 -1
- package/identity/IdentityForm.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +48 -203
- package/layers/LinkChartLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.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/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISImageService.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/layers/support/fieldUtils.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/request.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/support/DirectionsFeatureSet.js +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/ageUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/apiKeyUtils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/time/TimeReference.js +1 -1
- package/time/timeReferenceUtils.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/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.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/imagery/VectorFieldView2D.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.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/state/ViewStateManager.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/blit/Blit.js +5 -0
- 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/RenderSlot.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/ui/UI.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/contextUtils.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/AreaMeasurement3D.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.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/FeatureViewModel.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/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/GroupInput.js +1 -1
- package/widgets/FeatureForm/css.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/FloorFilterViewModel.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/LegendViewModel.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/scalePreviewUtils.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/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
- package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
- package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
- package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
- package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
- package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
- package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
- package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
- package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
- package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
- package/assets/esri/core/workers/chunks/2cb36f9686693234991a.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/3619e04cbb6691549014.js +0 -1
- package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
- package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.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/5a5720caa64a46daadf9.js +0 -1
- package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
- package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.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/846b7a81b870c8b238a1.js +0 -1
- package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
- package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
- package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.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/c6ea5aac232d1eca04dd.js +0 -1
- package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.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/d824f4b405a72cd2fa74.js +0 -1
- package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.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/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
- package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
- package/core/watchUtils.d.ts +0 -4
- package/core/watchUtils.js +0 -5
package/chunks/arcade.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{compileScript as e,extend as t,enableAsyncSupport as r}from"../arcade/arcadeCompiler.js";import{ArcadeModuleResolver as n}from"../arcade/ArcadeModuleResolver.js";import{executeScript as s,extend as u}from"../arcade/arcadeRuntime.js";import{ArcadeExecutionError as a,ExecutionErrorCodes as o}from"../arcade/executionError.js";import{parseScript as c}from"../arcade/parser.js";import{referencesMember as i,referencesFunction as l,findFieldLiterals as f,findExpectedFieldLiterals as p,findScriptDependencies as d,findModuleImports as m,findFunctionCalls as y}from"../arcade/treeAnalysis.js";import{setGeometryEngine as S}from"../arcade/functions/geomsync.js";import has from"../core/has.js";import{assertIsSome as b}from"../core/maybe.js";const
|
|
5
|
+
import{compileScript as e,extend as t,enableAsyncSupport as r}from"../arcade/arcadeCompiler.js";import{ArcadeModuleResolver as n}from"../arcade/ArcadeModuleResolver.js";import{executeScript as s,extend as u}from"../arcade/arcadeRuntime.js";import{ArcadeExecutionError as a,ExecutionErrorCodes as o}from"../arcade/executionError.js";import{parseScript as c}from"../arcade/parser.js";import{referencesMember as i,referencesFunction as l,findFieldLiterals as f,findExpectedFieldLiterals as p,findScriptDependencies as d,findModuleImports as m,findFunctionCalls as y}from"../arcade/treeAnalysis.js";import{setGeometryEngine as S}from"../arcade/functions/geomsync.js";import has from"../core/has.js";import{assertIsSome as b}from"../core/maybe.js";const w=new Set(["feature","angle","bearing","centroid","envelopeintersects","extent","geometry","isselfintersecting","ringisclockwise"]);let A=!1,g=!1,h=null,j=[];function x(t,r){if(!0===r.useAsync||!0===t.isAsync)return M(t,r);if(has("esri-csp-restrictions")){return function(e){return s(t,e)}}try{return e(t,r)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return s(t,e)};throw n}}function M(t,r){if(null===h)throw new a(null,o.AsyncNotEnabled,null);if(has("esri-csp-restrictions")){return function(e){return h.executeScript(t,e)}}try{return e(t,r,!0)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return h.executeScript(t,e)};throw n}}function F(e){u(e),t(e,"sync"),null===h?j.push(e):(t(e,"async"),h.extend(e))}function E(e,t=[]){return c(e,t)}function v(e,t,r=[]){return G(c(e,r),t)}function G(e,t){if(!0===t.useAsync||!0===e.isAsync){if(null===h)throw new a(null,o.AsyncNotEnabled,null);return h.executeScript(e,t)}return s(e,t)}function U(e,t){return i(e,t)}function _(e,t){return l(e,t)}function I(e,t=!1){return void 0===t&&(t=!1),f(e)}function R(e){return p(e)}function C(e,t=[]){return void 0===e.usesGeometry&&d(e,t),!0===e.usesGeometry}let D=null;function k(){return D||(D=z(),D)}async function z(){const e=await import("../geometry/geometryEngine.js");return g=!0,S(e),!0}let P=null;function L(){return null!==P||(P=N()),P}async function N(){await r(),h=await import("../arcade/arcadeAsyncRuntime.js");for(const e of j)h.extend(e),t(e,"async");return j=null,!0}function O(){return A}function T(){return!!h}function q(){return g}let B=null;function H(){return B||(B=J(),B)}async function J(){await L();const[e,r,n,s,u]=await Promise.all([import("../arcade/featureSetUtils.js"),import("../arcade/functions/featuresetbase.js"),import("../arcade/functions/featuresetgeom.js"),import("../arcade/functions/featuresetstats.js"),import("../arcade/functions/featuresetstring.js")]);return ee=e,h.extend([r,n,s,u]),t([r,n,s,u],"async"),A=!0,!0}function K(e,t=[]){return void 0===e.usesFeatureSet&&d(e,t),!0===e.usesFeatureSet}function Q(e,t=[]){return void 0===e.isAsync&&d(e,t),!0===e.isAsync}function V(e,t){if(t){for(const r of t)if(U(e,r))return!0;return!1}return!1}async function W(e,t,r=[],n=!1,s=null){return X(new Set,e,t,r,n,s)}async function X(e,t,r,n=[],s=!1,u=null){const a="string"==typeof t?E(t):t,o=[];return a&&(!1===q()&&(C(a)||s)&&o.push(k()),!1===T()&&(!0===a.isAsync||r)&&o.push(L()),!1===O()&&(K(a)||V(a,n))&&o.push(H())),o.length&&await Promise.all(o),await Z(e,a,u,r,s),!0}function Y(e,t=[]){return void 0===e.usesModules&&d(e,t),!0===e.usesModules}async function Z(e,t,r=null,s=!1,u=!1){const c=m(t);null===r&&c.length>0&&(r=n.getDefault()),t.loadedModules={};for(const n of c){b(r);const c=r.normalizeModuleUri(n.source);if(e.has(c.uri))throw new a(null,o.CircularModules,null);e.add(c.uri);const i=await r.fetchModule(c);await X(e,i,s,[],u,r),e.delete(c.uri),i.isAsync&&(t.isAsync=!0),i.usesFeatureSet&&(t.usesFeatureSet=!0),i.usesGeometry&&(t.usesGeometry=!0),t.loadedModules[n.libname]={uri:c.uri,script:i}}}function $(e){if(C(e))return!0;const t=y(e);let r=!1;for(let n=0;n<t.length;n++)if(w.has(t[n])){r=!0;break}return r}let ee=null;function te(){return ee}const re=Object.freeze(Object.defineProperty({__proto__:null,_loadScriptDependenciesImpl:X,compileScript:x,enableAsyncSupport:L,enableAsyncSupportImpl:N,enableFeatureSetSupport:H,enableFeatureSetSupportImpl:J,enableGeometrySupport:k,enableGeometrySupportImpl:z,executeScript:G,extend:F,extractExpectedFieldLiterals:R,extractFieldLiterals:I,featureSetUtils:te,isAsyncEnabled:T,isFeatureSetSupportEnabled:O,isGeometryEnabled:q,loadDependentModules:Z,loadScriptDependencies:W,parseAndExecuteScript:v,parseScript:E,referencesFunction:_,referencesMember:U,scriptIsAsync:Q,scriptTouchesGeometry:$,scriptUsesFeatureSet:K,scriptUsesGeometryEngine:C,scriptUsesModules:Y},Symbol.toStringTag,{value:"Module"}));export{Z as A,X as _,R as a,k as b,x as c,H as d,G as e,te as f,C as g,re as h,F as i,v as j,_ as k,W as l,I as m,z as n,L as o,E as p,N as q,U as r,$ as s,O as t,T as u,q as v,J as w,K as x,Q as y,Y as z};
|
package/config.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"./core/has.js";import{deepMerge as e}from"./core/object.js";import{buildDate as s}from"./support/revision.js";const r={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";import{buildDate as s}from"./support/revision.js";const r={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(r,globalThis.esriConfig,!0),delete r.has),!r.assetsPath){{const e="4.28.0";r.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s}/assets`}r.defaultAssetsPath=r.assetsPath}export{r as default};
|
package/core/Accessor.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{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as i}from"./accessorSupport/get.js";import{getPropertiesMetadata as c}from"./accessorSupport/metadata.js";import n from"./accessorSupport/Properties.js";import{set as a}from"./accessorSupport/set.js";import{getAccessorInterceptor as
|
|
5
|
+
import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as i}from"./accessorSupport/get.js";import{getPropertiesMetadata as c}from"./accessorSupport/metadata.js";import n from"./accessorSupport/Properties.js";import{set as a}from"./accessorSupport/set.js";import{getAccessorInterceptor as l}from"./accessorSupport/testSupport.js";import{removeTarget as _,watch as h}from"./accessorSupport/watch.js";import{property as p}from"./accessorSupport/decorators/property.js";import{subclass as u}from"./accessorSupport/decorators/subclass.js";var d,y;function f(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const m=Symbol("Accessor-Handles"),g=Symbol("Accessor-Initialized");class v{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class i extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}c(i.prototype);for(const c in e){const t=e[c];i.prototype[c]="function"==typeof t?function(...e){const r=this.inherited;let s;this.inherited=function(...e){if(o.prototype[c])return o.prototype[c].apply(this,e)};try{s=t.apply(this,e)}catch(i){throw this.inherited=r,i}return this.inherited=r,s}:e[c]}for(const c in t){const e=f(t[c]);p(e)(i.prototype,c)}return u(r)(i)}constructor(...e){if(this[d]=null,this[y]=!1,this.constructor===v)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new n(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&this.normalizeCtorArgs&&(t.ctorArgs=this.normalizeCtorArgs.apply(this,e)),l()?.onInstanceConstruct(this),S.register(this,new WeakRef(t.propertiesByName),this)}postscript(e){const t=this.__accessor__,r=t.ctorArgs||e;t.initialize(),r&&(this.set(r),t.ctorArgs=null),t.constructed(),this.initialize(),this[g]=!0}initialize(){}[o](){this[m]=s(this[m])}destroy(){this.destroyed||(S.unregister(this),_(this),this.__accessor__.destroy(),l()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[g]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(e){i(this,e)}get(t){return e(r.getLogger(this),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),i(this,t)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return a(this,e,t),this}watch(e,t,r){return h(this,e,t,r)}addHandles(e,r){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}let s=this[m];null==s&&(s=this[m]=new t),s.add(e,r)}removeHandles(e){const t=this[m];null!=t&&t.remove(e)}removeAllHandles(){const e=this[m];null!=e&&e.removeAll()}hasHandles(e){const t=this[m];return null!=t&&t.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}d=m,y=g;const S=new FinalizationRegistry((e=>{const t=e.deref();if(t)for(const r of t.values())r.destroy()}));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 e from"../Accessor.js";import t from"../Collection.js";import{getProperties as n}from"./utils.js";const o=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function r(t){return t instanceof e}function f(e){return e instanceof t?Object.keys(e.items):r(e)?n(e).keys():e?Object.keys(e):[]}function l(e,n){return e instanceof t?e.items[n]:e[n]}function i(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}function u(e){return e?e.declaredClass:null}function c(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const s=f(e),p=f(t);if(0===s.length&&0===p.length)return;if(!s.length||!p.length||i(e,t))return{type:"complete",oldValue:e,newValue:t};const a=p.filter((e=>!s.includes(e))),y=s.filter((e=>!p.includes(e))),
|
|
5
|
+
import e from"../Accessor.js";import t from"../Collection.js";import{getProperties as n}from"./utils.js";const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function r(t){return t instanceof e}function f(e){return e instanceof t?Object.keys(e.items):r(e)?n(e).keys():e?Object.keys(e):[]}function l(e,n){return e instanceof t?e.items[n]:e[n]}function i(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}function u(e){return e?e.declaredClass:null}function c(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const s=f(e),p=f(t);if(0===s.length&&0===p.length)return;if(!s.length||!p.length||i(e,t))return{type:"complete",oldValue:e,newValue:t};const a=p.filter((e=>!s.includes(e))),y=s.filter((e=>!p.includes(e))),m=s.filter((n=>p.includes(n)&&l(e,n)!==l(t,n))).concat(a,y).sort(),d=u(e);if(d&&o.has(d)&&m.length)return{type:"complete",oldValue:e,newValue:t};let h;const b=r(e)&&r(t);for(const o of m){const r=l(e,o),f=l(t,o);let i;if((b||"function"!=typeof r&&"function"!=typeof f)&&(r!==f&&(null!=r||null!=f))){if(n&&n[o]&&"function"==typeof n[o])i=n[o]?.(r,f);else if(r instanceof Date&&f instanceof Date){if(r.getTime()===f.getTime())continue;i={type:"complete",oldValue:r,newValue:f}}else i="object"==typeof r&&"object"==typeof f&&u(r)===u(f)?c(r,f):{type:"complete",oldValue:r,newValue:f};null!=i&&(null!=h?h.diff[o]=i:h={type:"partial",diff:{[o]:i}})}}return h}function s(e,t){if(null==e)return!1;const n=t.split(".");let o=e;for(const r of n){if("complete"===o.type)return!0;if("partial"!==o.type)return!1;{const e=o.diff[r];if(!e)return!1;o=e}}return!0}function p(e,t){for(const n of t)if(s(e,n))return!0;return!1}function a(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}function y(e){if(null==e)return!0;switch(e.type){case"complete":return!1;case"collection":{const t=e;for(const e of t.added)if(!y(e))return!1;for(const e of t.removed)if(!y(e))return!1;for(const e of t.changed)if(!y(e))return!1;return!0}case"partial":for(const t in e.diff){if(!y(e.diff[t]))return!1}return!0}}export{a as diff,s as hasDiff,p as hasDiffAny,y as isEmpty};
|
package/core/has.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
|
-
let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,o,
|
|
5
|
+
let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,o,r)=>((r||void 0===e[a])&&(e[a]=d),o&&has(a)),has.cache=e,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),(()=>{has.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",e),has.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),has.add("dom",e),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,o=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?o:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",o=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,o),has.add("ios",o)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",o),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in globalThis),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,a=!1===globalThis.crossOriginIsolated;return e&&!a})),has.add("wasm-simd",(()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))})),has.add("esri-atomics","Atomics"in globalThis),has.add("esri-workers","Worker"in globalThis),has.add("web-feat:cache","caches"in globalThis),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-point-coverage",.1),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("mapview-transitions-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("heatmap-allow-raster-fallback",!1),has.add("heatmap-force-raster",!1),has("host-webworker")||has("host-browser")&&(has.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),has.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{has.add("esri-image-decode",!0,!0,!0)})).catch((()=>{has.add("esri-image-decode",!1,!0,!0)}))}return!1})),has.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})();export{has as default};
|
package/core/number.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{escapeRegExpString as e}from"./string.js";import{getLocale as t}from"../intl/locale.js";const n={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function r(e=t()){let r=(e=e.toLowerCase())in n;if(!r){const t=e.split("-");t.length>1&&t[0]in n&&(e=t[0],r=!0),r||(e="en")}const[s,l,o="#,##0.###"]=n[e];return{decimal:s,group:l,pattern:o}}function s(e,t){const n=r((t={...t}).locale);t.customs=n;const s=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:o(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function o(e,t,n){const r=(n=n||{}).customs.group,s=n.customs.decimal,o=t.split(";"),c=o[0];if((t=o[e<0?1:0]||"-"+c).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,p=c.match(a);if(!p)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(a,i(e,p[0],{decimal:s,group:r,places:n.places,round:n.round}))}function i(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const r=t.split("."),s="string"==typeof n.places&&n.places.indexOf(",");let l=n.places;s?l=n.places.substring(s+1):+l>=0||(l=(r[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(l))));const o=String(Math.abs(e)).split("."),i=o[1]||"";if(r[1]||n.places){s&&(n.places=n.places.substring(0,s));const e=void 0!==n.places?n.places:r[1]&&r[1].lastIndexOf("0")+1;+e>i.length&&(o[1]=i.padEnd(Number(e),"0")),+l<i.length&&(o[1]=i.substr(0,Number(l)))}else o[1]&&o.pop();const c=r[0].replace(",","");let a=c.indexOf("0");-1!==a&&(a=c.length-a,a>o[0].length&&(o[0]=o[0].padStart(a,"0")),c.includes("#")||(o[0]=o[0].substr(o[0].length-a)));let p,u,d=r[0].lastIndexOf(",");if(-1!==d){p=r[0].length-d-1;const e=r[0].substr(0,d);d=e.lastIndexOf(","),-1!==d&&(u=e.length-d-1)}const g=[];for(let f=o[0];f;){const e=f.length-p;g.push(e>0?f.substr(e):f),f=e>0?f.slice(0,e):"",u&&(p=u,u=void 0)}return o[0]=g.reverse().join(n.group||","),o.join(n.decimal||".")}function c(e){return a(e).regexp}function a(t){const n=r((t=t||{}).locale),s=t.pattern||n.pattern,o=n.group,i=n.decimal;let c=1;if(s.includes("%"))c/=100;else if(s.includes("‰"))c/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const a=s.split(";");1===a.length&&a.push("-"+a[0]);const p=g(a,(n=>(n="(?:"+e(n,".")+")").replace(l,(e=>{const n={signed:!1,separator:t.strict?o:[o,""],fractional:t.fractional,decimal:i,exponent:!1},r=e.split(".");let s=t.places;1===r.length&&1!==c&&(r[1]="###"),1===r.length||0===s?n.fractional=!1:(void 0===s&&(s=t.pattern?r[1].lastIndexOf("0")+1:1/0),s&&null==t.fractional&&(n.fractional=!0),!t.places&&+s<r[1].length&&(s+=","+r[1].length),n.places=s);const l=r[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+u(n)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:o,decimal:i,factor:c}}function p(e,t){const n=a(t),r=new RegExp("^"+n.regexp+"$").exec(e);if(!r)return NaN;let s=r[1];if(!r[1]){if(!r[2])return NaN;s=r[2],n.factor*=-1}return s=s.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(s)*n.factor}function u(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e
|
|
5
|
+
import{escapeRegExpString as e}from"./string.js";import{getLocale as t}from"../intl/locale.js";const n={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function r(e=t()){let r=(e=e.toLowerCase())in n;if(!r){const t=e.split("-");t.length>1&&t[0]in n&&(e=t[0],r=!0),r||(e="en")}const[s,l,o="#,##0.###"]=n[e];return{decimal:s,group:l,pattern:o}}function s(e,t){const n=r((t={...t}).locale);t.customs=n;const s=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:o(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function o(e,t,n){const r=(n=n||{}).customs.group,s=n.customs.decimal,o=t.split(";"),c=o[0];if((t=o[e<0?1:0]||"-"+c).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,p=c.match(a);if(!p)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(a,i(e,p[0],{decimal:s,group:r,places:n.places,round:n.round}))}function i(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const r=t.split("."),s="string"==typeof n.places&&n.places.indexOf(",");let l=n.places;s?l=n.places.substring(s+1):+l>=0||(l=(r[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(l))));const o=String(Math.abs(e)).split("."),i=o[1]||"";if(r[1]||n.places){s&&(n.places=n.places.substring(0,s));const e=void 0!==n.places?n.places:r[1]&&r[1].lastIndexOf("0")+1;+e>i.length&&(o[1]=i.padEnd(Number(e),"0")),+l<i.length&&(o[1]=i.substr(0,Number(l)))}else o[1]&&o.pop();const c=r[0].replace(",","");let a=c.indexOf("0");-1!==a&&(a=c.length-a,a>o[0].length&&(o[0]=o[0].padStart(a,"0")),c.includes("#")||(o[0]=o[0].substr(o[0].length-a)));let p,u,d=r[0].lastIndexOf(",");if(-1!==d){p=r[0].length-d-1;const e=r[0].substr(0,d);d=e.lastIndexOf(","),-1!==d&&(u=e.length-d-1)}const g=[];for(let f=o[0];f;){const e=f.length-p;g.push(e>0?f.substr(e):f),f=e>0?f.slice(0,e):"",u&&(p=u,u=void 0)}return o[0]=g.reverse().join(n.group||","),o.join(n.decimal||".")}function c(e){return a(e).regexp}function a(t){const n=r((t=t||{}).locale),s=t.pattern||n.pattern,o=n.group,i=n.decimal;let c=1;if(s.includes("%"))c/=100;else if(s.includes("‰"))c/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const a=s.split(";");1===a.length&&a.push("-"+a[0]);const p=g(a,(n=>(n="(?:"+e(n,".")+")").replace(l,(e=>{const n={signed:!1,separator:t.strict?o:[o,""],fractional:t.fractional,decimal:i,exponent:!1},r=e.split(".");let s=t.places;1===r.length&&1!==c&&(r[1]="###"),1===r.length||0===s?n.fractional=!1:(void 0===s&&(s=t.pattern?r[1].lastIndexOf("0")+1:1/0),s&&null==t.fractional&&(n.fractional=!0),!t.places&&+s<r[1].length&&(s+=","+r[1].length),n.places=s);const l=r[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+u(n)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:o,decimal:i,factor:c}}function p(e,t){const n=a(t),r=new RegExp("^"+n.regexp+"$").exec(e);if(!r)return NaN;let s=r[1];if(!r[1]){if(!r[2])return NaN;s=r[2],n.factor*=-1}return s=s.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(s)*n.factor}function u(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=d(e),n=g(e.fractional,(t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n}),!0);let r=t+n;return n&&(r="(?:(?:"+r+")|(?:"+n+"))"),r+g(e.exponent,(t=>t?"([eE]"+d({signed:e.eSigned})+")":""))}function d(t){"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="";return g(t.signed,(e=>e?"[-+]":""),!0)+g(t.separator,(n=>{if(!n)return"(?:\\d+)";" "===(n=e(n))?n="\\s":" "===n&&(n="\\s\\xa0");const r=t.groupSize,s=t.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+n+"]\\d{"+s+"})*["+n+"]\\d{"+r+"})";return r-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(r-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+n+"]\\d{"+r+"})*)"}),!0)}const g=(e,t,n)=>{if(!(e instanceof Array))return t(e);const r=[];for(let s=0;s<e.length;s++)r.push(t(e[s]));return f(r.join("|"),Boolean(n))},f=(e,t)=>"("+(t?"?:":"")+e+")";export{a as _parseInfo,s as format,r as getCustoms,p as parse,c as regexp};
|
package/core/reactiveUtils.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{createTask as n}from"./asyncUtils.js";import e from"./Collection.js";import{isEventTarget as t,on as o}from"./events.js";import{handlesGroup as r,destroyHandle as s,makeHandle as i}from"./handleUtils.js";import{removeMaybe as c}from"./maybe.js";import{isAborted as u,createAbortError as l,onAbort as a,ignoreAbortErrors as f}from"./promiseUtils.js";import{watchTracked as m}from"./accessorSupport/watch.js";export{autorun}from"./accessorSupport/trackingUtils.js";function d(n,e,t={}){return y(n,e,t,L)}function p(n,e,t={}){return y(n,e,t,M)}function y(n,e,t={},o){let r=null;const s=t.once?(n,t)=>{o(n)&&(c(r),e(n,t))}:(n,t)=>{o(n)&&e(n,t)};if(r=m(n,s,t.sync,t.equals),t.initial){const e=n();s(e,e)}return r}function v(n,e,r,s={}){let u=null,l=null,a=null;function f(){u&&l&&(l.remove(),s.onListenerRemove?.(u),u=null,l=null)}function m(n){s.once&&s.once&&c(a),r(n)}const p=d(n,((n,r)=>{f(),t(n)&&(u=n,l=o(n,e,m),s.onListenerAdd?.(n))}),{sync:s.sync,initial:!0});return a=i((()=>{p.remove(),f()})),a}function j(n,e){return h(n,null,e)}function w(n,e){return h(n,M,e)}function h(n,e,t){if(u(t))return Promise.reject(l());const o=n();if(e?.(o))return Promise.resolve(o);let s=null;function i(){s=c(s)}return new Promise(((o,c)=>{s=r([a(t,(()=>{i(),c(l())})),y(n,(n=>{i(),o(n)}),{sync:!1,once:!0},e??L)])}))}function L(n){return!0}function M(n){return!!n}function U(n,e,t={}){let o=!1;const r=d(n,((n,t)=>{o||e(n,t)}),t);return{remove(){r.remove()},pause(){o=!0},resume(){o=!1}}}function g(n,t){const o=new e,r=v(n,"after-splice",(({added:n,start:e,deleteCount:r})=>{const s=o.splice(e,r);for(const t of s)t.remove();if(n?.length){const r=n.map(t);o.addMany(r,e)}}),{sync:!0,onListenerRemove:()=>o.drain((n=>n.remove())),onListenerAdd:n=>o.addMany(n.items.map(t))});return o.addHandles(r),o}function x(t,o){const r=new e,i=g(t,(e=>n((async n=>{const t=await o(e,n);if(u(n))throw t.remove(),l();return t})))),c=()=>null,a=async n=>{const e=await n.promise,t=i.
|
|
5
|
+
import{createTask as n}from"./asyncUtils.js";import e from"./Collection.js";import{isEventTarget as t,on as o}from"./events.js";import{handlesGroup as r,destroyHandle as s,makeHandle as i}from"./handleUtils.js";import{removeMaybe as c}from"./maybe.js";import{isAborted as u,createAbortError as l,onAbort as a,ignoreAbortErrors as f}from"./promiseUtils.js";import{watchTracked as m}from"./accessorSupport/watch.js";export{autorun}from"./accessorSupport/trackingUtils.js";function d(n,e,t={}){return y(n,e,t,L)}function p(n,e,t={}){return y(n,e,t,M)}function y(n,e,t={},o){let r=null;const s=t.once?(n,t)=>{o(n)&&(c(r),e(n,t))}:(n,t)=>{o(n)&&e(n,t)};if(r=m(n,s,t.sync,t.equals),t.initial){const e=n();s(e,e)}return r}function v(n,e,r,s={}){let u=null,l=null,a=null;function f(){u&&l&&(l.remove(),s.onListenerRemove?.(u),u=null,l=null)}function m(n){s.once&&s.once&&c(a),r(n)}const p=d(n,((n,r)=>{f(),t(n)&&(u=n,l=o(n,e,m),s.onListenerAdd?.(n))}),{sync:s.sync,initial:!0});return a=i((()=>{p.remove(),f()})),a}function j(n,e){return h(n,null,e)}function w(n,e){return h(n,M,e)}function h(n,e,t){if(u(t))return Promise.reject(l());const o=n();if(e?.(o))return Promise.resolve(o);let s=null;function i(){s=c(s)}return new Promise(((o,c)=>{s=r([a(t,(()=>{i(),c(l())})),y(n,(n=>{i(),o(n)}),{sync:!1,once:!0},e??L)])}))}function L(n){return!0}function M(n){return!!n}function U(n,e,t={}){let o=!1;const r=d(n,((n,t)=>{o||e(n,t)}),t);return{remove(){r.remove()},pause(){o=!0},resume(){o=!1}}}function g(n,t){const o=new e,r=v(n,"after-splice",(({added:n,start:e,deleteCount:r})=>{const s=o.splice(e,r);for(const t of s)t.remove();if(n?.length){const r=n.map(t);o.addMany(r,e)}}),{sync:!0,onListenerRemove:()=>o.drain((n=>n.remove())),onListenerAdd:n=>o.addMany(n.items.map(t))});return o.addHandles(r),o}function x(t,o){const r=new e,i=g(t,(e=>n((async n=>{const t=await o(e,n);if(u(n))throw t.remove(),l();return t})))),c=()=>null,a=async n=>{const e=await n.promise,t=i.indexOf(n);t<0||r.splice(t,1,e)};r.addMany(i.items.map(c));for(const n of i)f(a(n));const m=i.on("after-splice",(({added:n,start:e,deleteCount:t})=>{const o=r.splice(e,t);for(const r of o)r?.remove();if(n?.length){r.addMany(n.map(c),e);for(const e of n)f(a(e))}}));return r.addHandles([s(i),m]),r}const C={sync:!0},P={initial:!0},A={sync:!0,initial:!0};export{P as initial,g as mapCollection,x as mapCollectionAsync,v as on,j as once,U as pausable,C as sync,A as syncAndInitial,d as watch,p as when,w as whenOnce};
|
package/core/sql/DateOnly.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{createDateTimeZone as t,ArcadeDate as e}from"../../arcade/ArcadeDate.js";import{getLocale as a}from"../../intl/locale.js";import{DateTime as r,FixedOffsetZone as s}from"luxon";function o(t){t=t.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let e="";const a=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const r of t.match(a)||[])switch(r){case"D":e+="d";break;case"DD":e+="dd";break;case"DDD":e+="o";break;case"d":e+="c";break;case"ddd":e+="ccc";break;case"dddd":e+="cccc";break;case"M":e+="L";break;case"MM":e+="LL";break;case"MMM":e+="LLL";break;case"MMMM":e+="LLLL";break;case"YY":e+="yy";break;case"Y":case"YYYY":e+="yyyy";break;case"Q":e+="q";break;case"X":case"x":e+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?e+=`'${r.slice(1,-1)}'`:e+=`'${r}'`}return e}class n{constructor(t,e,a){this._year=t,this._month=e,this._day=a,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(t){return t instanceof n&&t.day===this.day&&t.month===this.month&&t.year===this.year}clone(){return new n(this._year,this._month,this._day)}toDateTime(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toDateTimeLuxon(
|
|
5
|
+
import{createDateTimeZone as t,ArcadeDate as e}from"../../arcade/ArcadeDate.js";import{getLocale as a}from"../../intl/locale.js";import{DateTime as r,FixedOffsetZone as s}from"luxon";function o(t){t=t.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let e="";const a=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const r of t.match(a)||[])switch(r){case"D":e+="d";break;case"DD":e+="dd";break;case"DDD":e+="o";break;case"d":e+="c";break;case"ddd":e+="ccc";break;case"dddd":e+="cccc";break;case"M":e+="L";break;case"MM":e+="LL";break;case"MMM":e+="LLL";break;case"MMMM":e+="LLLL";break;case"YY":e+="yy";break;case"Y":case"YYYY":e+="yyyy";break;case"Q":e+="q";break;case"X":case"x":e+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?e+=`'${r.slice(1,-1)}'`:e+=`'${r}'`}return e}class n{constructor(t,e,a){this._year=t,this._month=e,this._day=a,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(t){return t instanceof n&&t.day===this.day&&t.month===this.month&&t.year===this.year}clone(){return new n(this._year,this._month,this._day)}toDateTime(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toDateTimeLuxon(e){return r.fromObject({day:this.day,month:this.month,year:this.year},{zone:t(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(t=null){if(null===t||""===t)return this.toString();if(!(t=o(t)))return"";const r=this.toDateTime("unknown");return e.dateTimeToArcadeDate(r).toFormat(t,{locale:a(),numberingSystem:"latn"})}toArcadeDate(){const t=this.toDateTime("unknown");return e.dateTimeToArcadeDate(t)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd")}toSQLValue(){return this.toFormat("yyyy-LL-dd")}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd")+"'"}plus(t,e){return n.fromDateTime(this.toUTCDateTime().plus({[t]:e}))}toUTCDateTime(){return r.utc(this.year,this.month,this.day,0,0,0,0)}difference(t,e){switch(e.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(t.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===e?this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(t.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(t.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(t.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(t.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(t.toUTCDateTime(),"years").years}}static fromMilliseconds(t){const e=r.fromMillis(t,{zone:s.utcInstance});return e.isValid?n.fromParts(e.year,e.month,e.day):null}static fromSeconds(t){const e=r.fromSeconds(t,{zone:s.utcInstance});return e.isValid?n.fromParts(e.year,e.month,e.day):null}static fromReader(t){if(!t)return null;const e=t.split("-");return 3!==e.length?null:new n(parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10))}static fromParts(t,e,a){const r=new n(t,e,a);return!1===r.isValid?null:r}static fromDateJS(t){return n.fromParts(t.getFullYear(),t.getMonth()+1,t.getDay())}static fromDateTime(t){return n.fromParts(t.year,t.month,t.day)}static fromSqlTimeStampOffset(t){return this.fromDateTime(t.toDateTime())}static fromString(t,e=null){if(""===t)return null;if(null===t)return null;const a=[];if(e)(e=o(e))&&a.push(e);else if(null===e||""===e){const e=r.fromISO(t,{setZone:!0});return e.isValid?n.fromParts(e.year,e.month,e.day):null}for(const s of a){const a=r.fromFormat(t,e??s);if(a.isValid)return new n(a.year,a.month,a.day)}return null}static fromNow(e="system"){const a=r.fromJSDate(new Date).setZone(t(e));return new n(a.year,a.month,a.day)}}export{n as DateOnly,o as standardiseDateOnlyFormat};
|
package/core/sql/WhereClause.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{ArcadeDate as e}from"../../arcade/ArcadeDate.js";import{SqlError as t,SqlErrorCodes as a}from"../../arcade/featureset/support/errorsupport.js";import has from"../has.js";import{isAggregate as r,aggregateFunction as s}from"./AggregateFunctions.js";import{DateOnly as i}from"./DateOnly.js";import{sqlCalculateFunction as n}from"./sqlArithmeticUtils.js";import{sqlCompare as l}from"./sqlCompareUtils.js";import{isDate as o,isDateTime as u,isTimestampOffset as c,isTimeOnly as p,isDateOnly as h,convertToExecutingTimeZone as m,parseTime as f,parseTimestamp as d,parseDate as v}from"./sqlDateParsingUtils.js";import{SqlInterval as N}from"./SqlInterval.js";import{SqlTimeStampOffset as g}from"./SqlTimestampOffset.js";import{isStandardized as y,evaluateFunction as T}from"./StandardizedFunctions.js";import{TimeOnly as S}from"./TimeOnly.js";import{WhereGrammar as _}from"./WhereGrammar.js";import{DateTime as J}from"luxon";const w=new Set(["current_timestamp","current_date","current_time"]);var O;!function(e){e[e.Date=1]="Date",e[e.DateOnly=2]="DateOnly",e[e.TimeOnly=3]="TimeOnly",e[e.TimeStampOffset=4]="TimeStampOffset"}(O||(O={}));class A{static makeBool(e){return R(e)}static featureValue(e,t,a,r,s){return L(e,t,a,r,s)}static equalsNull(e){return null===e}static applyLike(e,t,a){return j(e,t,a)}static ensureArray(e){return D(e)}static applyIn(e,t){return I(e,t)}static currentDate(e){return i.fromNow(e)}static makeSqlInterval(e,t,a){return N.createFromValueAndQualifer(e,t,a)}static convertInterval(e){return e instanceof N?e.valueInMilliseconds():e}static currentTimestamp(e){return m(new Date,e)}static compare(e,t,a,r){return l(t,a,e)}static calculate(e,t,a,r){return n(e,t,a,r)}static evaluateTime(e){return f(e)}static evaluateTimestamp(e,t,a){return d(e,t,a)}static evaluateDate(e,t){return v(e,t)}static evaluateFunction(e,t,a){return T(e,t,a)}static lookup(e,t){const a=t[e];return void 0===a?null:a}static between(e,t,a){return null==e||null==t[0]||null==t[1]?null:l(e,t[0],">=")&&l(e,t[1],"<=")}static notbetween(e,t,a){return null==e||null==t[0]||null==t[1]?null:l(e,t[0],"<")||l(e,t[1],">")}static ternaryNot(e){return Z(e)}static ternaryAnd(e,t){return F(e,t)}static ternaryOr(e,t){return b(e,t)}}class x{constructor(e,t,a={timeZone:"UTC"}){this.fieldsIndex=t,this._complextypefields={},this.parameters={},this.timeReferenceZone="UTC",this._hasDateFunctions=void 0,this.configureExpressionTimeZone(a),this.parseTree=_.parse(e);const{isStandardized:r,isAggregate:s,referencedFieldNames:i}=this._extractExpressionInfo(t);this._referencedFieldNames=i,this.isStandardized=r,this.isAggregate=s}configureExpressionTimeZone(e){this.timeReferenceZone=e.timeZone}static convertValueToStorageFormat(e,t=null){if(null===t)return o(e)?e.getTime():u(e)?e.toMillis():c(e)?e.toStorageFormat():p(e)?e.toStorageString():h(e)?e.toStorageFormat():e;switch(t){case"date":return o(e)?e.getTime():u(e)?e.toMillis():c(e)?e.toMilliseconds():h(e)?e.toNumber():e;case"date-only":return o(e)?i.fromDateJS(e).toString():c(e)?i.fromSqlTimeStampOffset(e).toString():u(e)?i.fromDateTime(e).toString():e;case"time-only":return o(e)?S.fromDateJS(e).toStorageString():u(e)?S.fromDateTime(e).toStorageString():c(e)?S.fromSqlTimeStampOffset(e).toStorageString():p(e)?e.toStorageString():e;case"timestamp-offset":if(o(e))return g.fromJSDate(e).toStorageFormat();if(u(e))return g.fromDateTime(e).toStorageFormat();if(c(e))return e.toStorageFormat()}return e}static create(e,t,a={timeZone:"UTC"}){return new x(e,t,a)}get fieldNames(){return this._referencedFieldNames}testSet(e,t=C){return!!this._evaluateNode(this.parseTree,null,t,e)}calculateValue(e,t=C){const a=this._evaluateNode(this.parseTree,e,t,null);return a instanceof N?a.valueInMilliseconds()/864e5:a}calculateValueCompiled(e,t=C){return null!=this.parseTree._compiledVersion?this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeReferenceZone):has("esri-csp-restrictions")?this.calculateValue(e,t):(this._compileMe(),this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeReferenceZone))}testFeature(e,t=C){return!!this._evaluateNode(this.parseTree,e,t,null)}testFeatureCompiled(e,t=C){return null!=this.parseTree._compiledVersion?!!this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeReferenceZone):has("esri-csp-restrictions")?this.testFeature(e,t):(this._compileMe(),!!this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeReferenceZone))}get hasDateFunctions(){return null!=this._hasDateFunctions||(this._hasDateFunctions=!1,this._visitAll(this.parseTree,(e=>{"current-time"===e.type?this._hasDateFunctions=!0:"function"===e.type&&(this._hasDateFunctions=this._hasDateFunctions||w.has(e.name.toLowerCase()))}))),this._hasDateFunctions}getFunctions(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"function"===t.type&&e.add(t.name.toLowerCase())})),Array.from(e)}getExpressions(){const e=new Map;return this._visitAll(this.parseTree,(t=>{if("function"===t.type){const a=t.name.toLowerCase(),r=t.args.value[0];if("column-reference"===r.type){const t=r.column,s=`${a}-${t}`;e.has(s)||e.set(s,{aggregateType:a,field:t})}}})),[...e.values()]}getVariables(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"parameter"===t.type&&e.add(t.value.toLowerCase())})),Array.from(e)}_compileMe(){const e="return this.convertInterval("+this.evaluateNodeToJavaScript(this.parseTree)+")";this.parseTree._compiledVersion=new Function("feature","lookups","attributeAdapter","complextypefields","timeReferenceZone",e).bind(A)}_extractExpressionInfo(e){const t=[],a=new Set;let s=!0,i=!1;return this._visitAll(this.parseTree,(n=>{switch(n.type){case"column-reference":{const r=e?.get(n.column);let s,i;r?s=i=r.name??"":(i=n.column,s=i.toLowerCase()),r&&r.name&&("date"===r.type||"esriFieldTypeDate"===r.type)&&(this._complextypefields[r.name]=O.Date),!r?.name||"date-only"!==r.type&&"esriFieldTypeDateOnly"!==r.type||(this._complextypefields[r.name]=O.DateOnly),r&&r.name&&("time-only"===r.type||"esriFieldTypeTimeOnly"===r.type)&&(this._complextypefields[r.name]=O.TimeOnly),r&&r.name&&("timestamp-offset"===r.type||"esriFieldTypeTimestampOffset"===r.type)&&(this._complextypefields[r.name]=O.TimeStampOffset),a.has(s)||(a.add(s),t.push(i)),n.column=i;break}case"function":{const{name:e,args:t}=n,a=t.value.length;s&&(s=y(e,a)),!1===i&&(i=r(e,a));break}}})),{referencedFieldNames:Array.from(t),isStandardized:s,isAggregate:i}}_visitAll(e,t){if(null!=e)switch(t(e),e.type){case"when-clause":this._visitAll(e.operand,t),this._visitAll(e.value,t);break;case"case-expression":for(const a of e.clauses)this._visitAll(a,t);"simple"===e.format&&this._visitAll(e.operand,t),null!==e.else&&this._visitAll(e.else,t);break;case"expression-list":for(const a of e.value)this._visitAll(a,t);break;case"unary-expression":this._visitAll(e.expr,t);break;case"binary-expression":this._visitAll(e.left,t),this._visitAll(e.right,t);break;case"function":this._visitAll(e.args,t)}}evaluateNodeToJavaScript(e){switch(e.type){case"interval":return"this.makeSqlInterval("+this.evaluateNodeToJavaScript(e.value)+", "+JSON.stringify(e.qualifier)+","+JSON.stringify(e.op)+")";case"case-expression":{let t="";if("simple"===e.format){const a=this.evaluateNodeToJavaScript(e.operand);t="( ";for(let r=0;r<e.clauses.length;r++)t+=" (this.compare('=',"+a+","+this.evaluateNodeToJavaScript(e.clauses[r].operand)+") ? ("+this.evaluateNodeToJavaScript(e.clauses[r].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}else{t="( ";for(let a=0;a<e.clauses.length;a++)t+=" this.makeBool("+this.evaluateNodeToJavaScript(e.clauses[a].operand)+")===true ? ("+this.evaluateNodeToJavaScript(e.clauses[a].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}return t}case"parameter":return"this.lookup("+JSON.stringify(e.value.toLowerCase())+",lookups)";case"expression-list":{let t="[";for(const a of e.value)"["!==t&&(t+=","),t+=this.evaluateNodeToJavaScript(a);return t+="]",t}case"unary-expression":return"this.ternaryNot("+this.evaluateNodeToJavaScript(e.expr)+")";case"binary-expression":switch(e.operator){case"AND":return"this.ternaryAnd("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"OR":return"this.ternaryOr("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"IS":if("null"!==e.right.type)throw new t(a.UnsupportedIsRhs);return"this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")";case"ISNOT":if("null"!==e.right.type)throw new t(a.UnsupportedIsRhs);return"(!(this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")))";case"IN":return"this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+"))";case"NOT IN":return"this.ternaryNot(this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+")))";case"BETWEEN":return"this.between("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)";case"NOTBETWEEN":return"this.notbetween("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)";case"LIKE":return"this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+")";case"NOT LIKE":return"this.ternaryNot(this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+"))";case"<>":case"<":case">":case">=":case"<=":case"=":return"this.compare("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)";case"*":case"-":case"+":case"/":case"||":return"this.calculate("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)"}throw new t(a.UnsupportedOperator,{operator:e.operator});case"null":case"boolean":case"string":case"number":return JSON.stringify(e.value);case"time":return"this.evaluateTime(JSON.stringify(node.value))";case"date":return"this.evaluateDate(JSON.stringify(node.value), timeReferenceZone)";case"timestamp":return"this.evaluateTimestamp(JSON.stringify(node.value), timeReferenceZone)";case"current-time":return"date"===e.mode?"this.currentDate(timeReferenceZone)":"this.currentTimestamp(timeReferenceZone)";case"column-reference":return"this.featureValue(feature,"+JSON.stringify(e.column)+",complextypefields,attributeAdapter, timeReferenceZone)";case"function":return"this.evaluateFunction("+JSON.stringify(e.name)+","+this.evaluateNodeToJavaScript(e.args)+", timeReferenceZone)"}throw new t(a.UnsupportedSyntax,{node:e.type})}_evaluateNode(u,c,p,h){let g;switch(u.type){case"interval":{const e=this._evaluateNode(u.value,c,p,h);return N.createFromValueAndQualifer(e,u.qualifier,u.op)}case"case-expression":if("simple"===u.format){const e=this._evaluateNode(u.operand,c,p,h);for(let t=0;t<u.clauses.length;t++)if(l(e,this._evaluateNode(u.clauses[t].operand,c,p,h),"=",this.timeReferenceZone))return this._evaluateNode(u.clauses[t].value,c,p,h);if(null!==u.else)return this._evaluateNode(u.else,c,p,h)}else{for(let e=0;e<u.clauses.length;e++)if(R(this._evaluateNode(u.clauses[e].operand,c,p,h)))return this._evaluateNode(u.clauses[e].value,c,p,h);if(null!==u.else)return this._evaluateNode(u.else,c,p,h)}return null;case"parameter":return g=this.parameters[u.value.toLowerCase()],o(g)?J.fromJSDate(g):g instanceof e?g.toDateTime():g;case"expression-list":{const e=[];for(const t of u.value)e.push(this._evaluateNode(t,c,p,h));return e}case"unary-expression":return Z(this._evaluateNode(u.expr,c,p,h));case"binary-expression":switch(u.operator){case"AND":return F(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h));case"OR":return b(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h));case"IS":if("null"!==u.right.type)throw new t(a.UnsupportedIsRhs);return null===this._evaluateNode(u.left,c,p,h);case"ISNOT":if("null"!==u.right.type)throw new t(a.UnsupportedIsRhs);return null!==this._evaluateNode(u.left,c,p,h);case"IN":{const e=D(this._evaluateNode(u.right,c,p,h));return I(this._evaluateNode(u.left,c,p,h),e)}case"NOT IN":{const e=D(this._evaluateNode(u.right,c,p,h));return Z(I(this._evaluateNode(u.left,c,p,h),e))}case"BETWEEN":{const e=this._evaluateNode(u.left,c,p,h),t=this._evaluateNode(u.right,c,p,h);return null==e||null==t[0]||null==t[1]?null:l(e,t[0],">=",this.timeReferenceZone)&&l(e,t[1],"<=",this.timeReferenceZone)}case"NOTBETWEEN":{const e=this._evaluateNode(u.left,c,p,h),t=this._evaluateNode(u.right,c,p,h);return null==e||null==t[0]||null==t[1]?null:l(e,t[0],"<",this.timeReferenceZone)||l(e,t[1],">",this.timeReferenceZone)}case"LIKE":return j(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),u.escape);case"NOT LIKE":return Z(j(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),u.escape));case"<>":case"<":case">":case">=":case"<=":case"=":return l(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),u.operator,this.timeReferenceZone);case"-":case"+":case"*":case"/":case"||":return n(u.operator,this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),this.timeReferenceZone)}case"null":case"boolean":case"string":case"number":return u.value;case"date":return v(u.value,this.timeReferenceZone);case"timestamp":return d(u.value,this.timeReferenceZone);case"time":return f(u.value);case"current-time":return"date"===u.mode?i.fromNow(this.timeReferenceZone):m(new Date,this.timeReferenceZone);case"column-reference":return L(c,u.column,this._complextypefields,p,this.timeReferenceZone);case"data-type":return u.value;case"function":{if(this.isAggregate&&r(u.name,u.args.value.length)){const e=[];for(const t of u.args?.value||[]){const a=[];for(const e of h||[])a.push(this._evaluateNode(t,e,p,null));e.push(a)}return s(u.name,e)}const e=this._evaluateNode(u.args,c,p,h);return T(u.name,e,this.timeReferenceZone)}}throw new t(a.UnsupportedSyntax,{node:u.type})}}function R(e){return!0===e}function D(e){return Array.isArray(e)?e:[e]}function Z(e){return null!==e?!0!==e:null}function F(e,t){return null!=e&&null!=t?!0===e&&!0===t:!1!==e&&!1!==t&&null}function b(e,t){return null!=e&&null!=t?!0===e||!0===t:!0===e||!0===t||null}function I(e,t){if(null==e)return null;let a=!1;for(const r of t)if(null==r)a=null;else if(e===r){a=!0;break}return a}const E="-[]/{}()*+?.\\^$|";var k;function V(e,t){const a=t;let r="",s=k.Normal;for(let i=0;i<e.length;i++){const t=e.charAt(i);switch(s){case k.Normal:t===a?s=k.Escaped:E.includes(t)?r+="\\"+t:r+="%"===t?".*":"_"===t?".":t;break;case k.Escaped:E.includes(t)?r+="\\"+t:r+=t,s=k.Normal}}return new RegExp("^"+r+"$","m")}function j(e,t,a){if(null==e)return null;return V(t,a).test(e)}function q(e){return e&&"object"==typeof e.attributes}function L(e,t,a,r,s){const n=r.getAttribute(e,t);return null!=n&&a[t]===O.Date?m(new Date(n),s):null!=n&&a[t]===O.DateOnly?i.fromReader(n):null!=n&&a[t]===O.TimeOnly?S.fromReader(n):null!=n&&a[t]===O.TimeStampOffset?new g(n):n}!function(e){e[e.Normal=0]="Normal",e[e.Escaped=1]="Escaped"}(k||(k={}));const C={getAttribute:(e,t)=>(q(e)?e.attributes:e)[t]};export{x as WhereClause,C as defaultAttributeAdapter};
|
|
5
|
+
import{ArcadeDate as e}from"../../arcade/ArcadeDate.js";import{SqlError as t,SqlErrorCodes as a}from"../../arcade/featureset/support/errorsupport.js";import has from"../has.js";import{isAggregate as r,aggregateFunction as s}from"./AggregateFunctions.js";import{DateOnly as i}from"./DateOnly.js";import{sqlCalculateFunction as n}from"./sqlArithmeticUtils.js";import{sqlCompare as l}from"./sqlCompareUtils.js";import{isDate as o,isDateTime as u,isTimestampOffset as c,isTimeOnly as p,isDateOnly as h,convertToExecutingTimeZone as m,parseTime as f,parseTimestamp as d,parseDate as v}from"./sqlDateParsingUtils.js";import{SqlInterval as N}from"./SqlInterval.js";import{SqlTimeStampOffset as g}from"./SqlTimestampOffset.js";import{isStandardized as y,evaluateFunction as T}from"./StandardizedFunctions.js";import{TimeOnly as S}from"./TimeOnly.js";import{WhereGrammar as _}from"./WhereGrammar.js";import{DateTime as J}from"luxon";const w=new Set(["current_timestamp","current_date","current_time"]);var O;!function(e){e[e.Date=1]="Date",e[e.DateOnly=2]="DateOnly",e[e.TimeOnly=3]="TimeOnly",e[e.TimeStampOffset=4]="TimeStampOffset"}(O||(O={}));class A{static makeBool(e){return D(e)}static featureValue(e,t,a,r,s){return L(e,t,a,r,s)}static equalsNull(e){return null===e}static applyLike(e,t,a){return j(e,t,a)}static ensureArray(e){return F(e)}static applyIn(e,t){return E(e,t)}static currentDate(e){return i.fromNow(e)}static makeSqlInterval(e,t,a){return N.createFromValueAndQualifer(e,t,a)}static convertInterval(e){return e instanceof N?e.valueInMilliseconds():e}static currentTimestamp(e){return m(new Date,e)}static compare(e,t,a,r){return l(t,a,e)}static calculate(e,t,a,r){return n(e,t,a,r)}static evaluateTime(e){return f(e)}static evaluateTimestamp(e,t,a){return d(e,t,a)}static evaluateDate(e,t){return v(e,t)}static evaluateFunction(e,t,a){return T(e,t,a)}static lookup(e,t){const a=t[e];return void 0===a?null:a}static between(e,t,a){return null==e||null==t[0]||null==t[1]?null:l(e,t[0],">=")&&l(e,t[1],"<=")}static notbetween(e,t,a){return null==e||null==t[0]||null==t[1]?null:l(e,t[0],"<")||l(e,t[1],">")}static ternaryNot(e){return Z(e)}static ternaryAnd(e,t){return b(e,t)}static ternaryOr(e,t){return I(e,t)}}class x{constructor(e,t,a="UTC"){this.fieldsIndex=t,this._complextypefields={},this.parameters={},this.timeZone="UTC",this._hasDateFunctions=void 0,this.configureExpressionTimeZone(a),this.parseTree=_.parse(e);const{isStandardized:r,isAggregate:s,referencedFieldNames:i}=this._extractExpressionInfo(t);this._referencedFieldNames=i,this.isStandardized=r,this.isAggregate=s}configureExpressionTimeZone(e){this.timeZone=e}static convertValueToStorageFormat(e,t=null){if(null===t)return o(e)?e.getTime():u(e)?e.toMillis():c(e)?e.toStorageFormat():p(e)?e.toStorageString():h(e)?e.toStorageFormat():e;switch(t){case"date":return o(e)?e.getTime():u(e)?e.toMillis():c(e)?e.toMilliseconds():h(e)?e.toNumber():e;case"date-only":return o(e)?i.fromDateJS(e).toString():c(e)?i.fromSqlTimeStampOffset(e).toString():u(e)?i.fromDateTime(e).toString():e;case"time-only":return o(e)?S.fromDateJS(e).toStorageString():u(e)?S.fromDateTime(e).toStorageString():c(e)?S.fromSqlTimeStampOffset(e).toStorageString():p(e)?e.toStorageString():e;case"timestamp-offset":if(o(e))return g.fromJSDate(e).toStorageFormat();if(u(e))return g.fromDateTime(e).toStorageFormat();if(c(e))return e.toStorageFormat()}return e}static create(e,t,a="UTC"){return new x(e,t,a)}get fieldNames(){return this._referencedFieldNames}testSet(e,t=C){return!!this._evaluateNode(this.parseTree,null,t,e)}calculateValue(e,t=C){const a=this._evaluateNode(this.parseTree,e,t,null);return a instanceof N?a.valueInMilliseconds()/864e5:a}calculateValueCompiled(e,t=C){return null!=this.parseTree._compiledVersion?this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeZone):has("esri-csp-restrictions")?this.calculateValue(e,t):(this._compileMe(),this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeZone))}testFeature(e,t=C){return!!this._evaluateNode(this.parseTree,e,t,null)}testFeatureCompiled(e,t=C){return null!=this.parseTree._compiledVersion?!!this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeZone):has("esri-csp-restrictions")?this.testFeature(e,t):(this._compileMe(),!!this.parseTree._compiledVersion(e,this.parameters,t,this._complextypefields,this.timeZone))}get hasDateFunctions(){return null!=this._hasDateFunctions||(this._hasDateFunctions=!1,this._visitAll(this.parseTree,(e=>{"current-time"===e.type?this._hasDateFunctions=!0:"function"===e.type&&(this._hasDateFunctions=this._hasDateFunctions||w.has(e.name.toLowerCase()))}))),this._hasDateFunctions}getFunctions(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"function"===t.type&&e.add(t.name.toLowerCase())})),Array.from(e)}getExpressions(){const e=new Map;return this._visitAll(this.parseTree,(t=>{if("function"===t.type){const a=t.name.toLowerCase(),r=t.args.value[0];if("column-reference"===r.type){const t=r.column,s=`${a}-${t}`;e.has(s)||e.set(s,{aggregateType:a,field:t})}}})),[...e.values()]}getVariables(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"parameter"===t.type&&e.add(t.value.toLowerCase())})),Array.from(e)}_compileMe(){const e="return this.convertInterval("+this.evaluateNodeToJavaScript(this.parseTree)+")";this.parseTree._compiledVersion=new Function("feature","lookups","attributeAdapter","complextypefields","timeReferenceZone",e).bind(A)}_extractExpressionInfo(e){const t=[],a=new Set;let s=!0,i=!1;return this._visitAll(this.parseTree,(n=>{switch(n.type){case"column-reference":{const r=e?.get(n.column);let s,i;r?s=i=r.name??"":(i=n.column,s=i.toLowerCase()),r&&r.name&&("date"===r.type||"esriFieldTypeDate"===r.type)&&(this._complextypefields[r.name]=O.Date),!r?.name||"date-only"!==r.type&&"esriFieldTypeDateOnly"!==r.type||(this._complextypefields[r.name]=O.DateOnly),r&&r.name&&("time-only"===r.type||"esriFieldTypeTimeOnly"===r.type)&&(this._complextypefields[r.name]=O.TimeOnly),r&&r.name&&("timestamp-offset"===r.type||"esriFieldTypeTimestampOffset"===r.type)&&(this._complextypefields[r.name]=O.TimeStampOffset),a.has(s)||(a.add(s),t.push(i)),n.column=i;break}case"function":{const{name:e,args:t}=n,a=t.value.length;s&&(s=y(e,a)),!1===i&&(i=r(e,a));break}}})),{referencedFieldNames:Array.from(t),isStandardized:s,isAggregate:i}}_visitAll(e,t){if(null!=e)switch(t(e),e.type){case"when-clause":this._visitAll(e.operand,t),this._visitAll(e.value,t);break;case"case-expression":for(const a of e.clauses)this._visitAll(a,t);"simple"===e.format&&this._visitAll(e.operand,t),null!==e.else&&this._visitAll(e.else,t);break;case"expression-list":for(const a of e.value)this._visitAll(a,t);break;case"unary-expression":this._visitAll(e.expr,t);break;case"binary-expression":this._visitAll(e.left,t),this._visitAll(e.right,t);break;case"function":this._visitAll(e.args,t)}}evaluateNodeToJavaScript(e){switch(e.type){case"interval":return"this.makeSqlInterval("+this.evaluateNodeToJavaScript(e.value)+", "+JSON.stringify(e.qualifier)+","+JSON.stringify(e.op)+")";case"case-expression":{let t="";if("simple"===e.format){const a=this.evaluateNodeToJavaScript(e.operand);t="( ";for(let r=0;r<e.clauses.length;r++)t+=" (this.compare('=',"+a+","+this.evaluateNodeToJavaScript(e.clauses[r].operand)+") ? ("+this.evaluateNodeToJavaScript(e.clauses[r].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}else{t="( ";for(let a=0;a<e.clauses.length;a++)t+=" this.makeBool("+this.evaluateNodeToJavaScript(e.clauses[a].operand)+")===true ? ("+this.evaluateNodeToJavaScript(e.clauses[a].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}return t}case"parameter":return"this.lookup("+JSON.stringify(e.value.toLowerCase())+",lookups)";case"expression-list":{let t="[";for(const a of e.value)"["!==t&&(t+=","),t+=this.evaluateNodeToJavaScript(a);return t+="]",t}case"unary-expression":return"this.ternaryNot("+this.evaluateNodeToJavaScript(e.expr)+")";case"binary-expression":switch(e.operator){case"AND":return"this.ternaryAnd("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"OR":return"this.ternaryOr("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"IS":if("null"!==e.right.type)throw new t(a.UnsupportedIsRhs);return"this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")";case"ISNOT":if("null"!==e.right.type)throw new t(a.UnsupportedIsRhs);return"(!(this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")))";case"IN":return"this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+"))";case"NOT IN":return"this.ternaryNot(this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+")))";case"BETWEEN":return"this.between("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)";case"NOTBETWEEN":return"this.notbetween("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)";case"LIKE":return"this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+")";case"NOT LIKE":return"this.ternaryNot(this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+"))";case"<>":case"<":case">":case">=":case"<=":case"=":return"this.compare("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)";case"*":case"-":case"+":case"/":case"||":return"this.calculate("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeReferenceZone)"}throw new t(a.UnsupportedOperator,{operator:e.operator});case"null":case"boolean":case"string":case"number":return JSON.stringify(e.value);case"time":return"this.evaluateTime(JSON.stringify(node.value))";case"date":return"this.evaluateDate(JSON.stringify(node.value), timeReferenceZone)";case"timestamp":return"this.evaluateTimestamp(JSON.stringify(node.value), timeReferenceZone)";case"current-time":return"date"===e.mode?"this.currentDate(timeReferenceZone)":"this.currentTimestamp(timeReferenceZone)";case"column-reference":return"this.featureValue(feature,"+JSON.stringify(e.column)+",complextypefields,attributeAdapter, timeReferenceZone)";case"function":return"this.evaluateFunction("+JSON.stringify(e.name)+","+this.evaluateNodeToJavaScript(e.args)+", timeReferenceZone)"}throw new t(a.UnsupportedSyntax,{node:e.type})}_evaluateNode(u,c,p,h){let g;switch(u.type){case"interval":{const e=this._evaluateNode(u.value,c,p,h);return N.createFromValueAndQualifer(e,u.qualifier,u.op)}case"case-expression":if("simple"===u.format){const e=this._evaluateNode(u.operand,c,p,h);for(let t=0;t<u.clauses.length;t++)if(l(e,this._evaluateNode(u.clauses[t].operand,c,p,h),"=",this.timeZone))return this._evaluateNode(u.clauses[t].value,c,p,h);if(null!==u.else)return this._evaluateNode(u.else,c,p,h)}else{for(let e=0;e<u.clauses.length;e++)if(D(this._evaluateNode(u.clauses[e].operand,c,p,h)))return this._evaluateNode(u.clauses[e].value,c,p,h);if(null!==u.else)return this._evaluateNode(u.else,c,p,h)}return null;case"parameter":return g=this.parameters[u.value.toLowerCase()],o(g)?J.fromJSDate(g):g instanceof e?g.toDateTime():g;case"expression-list":{const e=[];for(const t of u.value)e.push(this._evaluateNode(t,c,p,h));return e}case"unary-expression":return Z(this._evaluateNode(u.expr,c,p,h));case"binary-expression":switch(u.operator){case"AND":return b(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h));case"OR":return I(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h));case"IS":if("null"!==u.right.type)throw new t(a.UnsupportedIsRhs);return null===this._evaluateNode(u.left,c,p,h);case"ISNOT":if("null"!==u.right.type)throw new t(a.UnsupportedIsRhs);return null!==this._evaluateNode(u.left,c,p,h);case"IN":{const e=F(this._evaluateNode(u.right,c,p,h));return E(this._evaluateNode(u.left,c,p,h),e)}case"NOT IN":{const e=F(this._evaluateNode(u.right,c,p,h));return Z(E(this._evaluateNode(u.left,c,p,h),e))}case"BETWEEN":{const e=this._evaluateNode(u.left,c,p,h),t=this._evaluateNode(u.right,c,p,h);return null==e||null==t[0]||null==t[1]?null:l(e,t[0],">=",this.timeZone)&&l(e,t[1],"<=",this.timeZone)}case"NOTBETWEEN":{const e=this._evaluateNode(u.left,c,p,h),t=this._evaluateNode(u.right,c,p,h);return null==e||null==t[0]||null==t[1]?null:l(e,t[0],"<",this.timeZone)||l(e,t[1],">",this.timeZone)}case"LIKE":return j(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),u.escape);case"NOT LIKE":return Z(j(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),u.escape));case"<>":case"<":case">":case">=":case"<=":case"=":return l(this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),u.operator,this.timeZone);case"-":case"+":case"*":case"/":case"||":return n(u.operator,this._evaluateNode(u.left,c,p,h),this._evaluateNode(u.right,c,p,h),this.timeZone)}case"null":case"boolean":case"string":case"number":return u.value;case"date":return v(u.value,this.timeZone);case"timestamp":return d(u.value,this.timeZone);case"time":return f(u.value);case"current-time":return"date"===u.mode?i.fromNow(this.timeZone):m(new Date,this.timeZone);case"column-reference":return L(c,u.column,this._complextypefields,p,this.timeZone);case"data-type":return u.value;case"function":{if(this.isAggregate&&r(u.name,u.args.value.length)){const e=[];for(const t of u.args?.value||[]){const a=[];for(const e of h||[])a.push(this._evaluateNode(t,e,p,null));e.push(a)}return s(u.name,e)}const e=this._evaluateNode(u.args,c,p,h);return T(u.name,e,this.timeZone)}}throw new t(a.UnsupportedSyntax,{node:u.type})}}function D(e){return!0===e}function F(e){return Array.isArray(e)?e:[e]}function Z(e){return null!==e?!0!==e:null}function b(e,t){return null!=e&&null!=t?!0===e&&!0===t:!1!==e&&!1!==t&&null}function I(e,t){return null!=e&&null!=t?!0===e||!0===t:!0===e||!0===t||null}function E(e,t){if(null==e)return null;let a=!1;for(const r of t)if(null==r)a=null;else if(e===r){a=!0;break}return a}const k="-[]/{}()*+?.\\^$|";var R;function V(e,t){const a=t;let r="",s=R.Normal;for(let i=0;i<e.length;i++){const t=e.charAt(i);switch(s){case R.Normal:t===a?s=R.Escaped:k.includes(t)?r+="\\"+t:r+="%"===t?".*":"_"===t?".":t;break;case R.Escaped:k.includes(t)?r+="\\"+t:r+=t,s=R.Normal}}return new RegExp("^"+r+"$","m")}function j(e,t,a){if(null==e)return null;return V(t,a).test(e)}function q(e){return e&&"object"==typeof e.attributes}function L(e,t,a,r,s){const n=r.getAttribute(e,t);return null!=n&&a[t]===O.Date?m(new Date(n),s):null!=n&&a[t]===O.DateOnly?i.fromReader(n):null!=n&&a[t]===O.TimeOnly?S.fromReader(n):null!=n&&a[t]===O.TimeStampOffset?new g(n):n}!function(e){e[e.Normal=0]="Normal",e[e.Escaped=1]="Escaped"}(R||(R={}));const C={getAttribute:(e,t)=>(q(e)?e.attributes:e)[t]};export{x as WhereClause,C as defaultAttributeAdapter};
|
package/core/sql.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
|
-
async function
|
|
5
|
+
import{utc as e}from"../time/timeZoneUtils.js";async function t(t,n,r=e){const{WhereClause:i}=await import("./sql/WhereClause.js");return i.create(t,n,r)}function n(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}export{t as parseWhereClause,n as sqlAnd};
|
package/core/timeUtils.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{resolveTimeZone as e}from"../intl/date.js";import{IANAZone as
|
|
5
|
+
import{resolveTimeZone as e}from"../intl/date.js";import{system as t}from"../time/timeZoneUtils.js";import{IANAZone as n,DateTime as s}from"luxon";const r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(r,o,i,c=t){const u=new n(e(c)),a=s.fromJSDate(r,{zone:u}),l="decades"===i||"centuries"===i?"year":T(i);return"decades"===i&&(o*=10),"centuries"===i&&(o*=100),a.plus({[l]:o}).toJSDate()}function i(e,t,n="milliseconds"){const s=e.getTime(),r=m(t,n,"milliseconds");return new Date(s+r)}function c(r,o,i=t){const c=new n(e(i)),u=s.fromJSDate(r,{zone:c});if("decades"===o||"centuries"===o){const e=u.startOf("year"),{year:t}=e,n=t-t%("decades"===o?10:100);return e.set({year:n}).toJSDate()}const a=T(o);return u.startOf(a).toJSDate()}function u(e,t,n="milliseconds"){const s=new Date(m(t,n,"milliseconds"));return s.setUTCFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),s}function a(e,t="milliseconds"){const n=m(e.getUTCHours(),"hours","milliseconds"),s=m(e.getUTCMinutes(),"minutes","milliseconds"),r=m(e.getUTCSeconds(),"seconds","milliseconds");return m(n+s+r+e.getUTCMilliseconds(),"milliseconds",t)}function l(e,t){const n=new Date(e.getTime());return n.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n}function d(e){const t=new Date(0);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t}function m(e,t,n){if(0===e)return 0;return e*r[t]/r[n]}function f(e){return e instanceof Date&&!isNaN(e.getTime())}function g(e,t){return e&&t?e.intersection(t):e||t}function T(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}export{m as convertTime,f as isValidDate,u as makeUTCTime,g as mergeTimeExtents,o as offsetDate,i as offsetDateUTC,l as resetUTCDate,a as timeSinceUTCMidnight,c as truncateDate,d as truncateLocalTime};
|
package/identity/IdentityForm.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 s}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 t}from"../core/accessorSupport/decorators/subclass.js";import{substitute as r}from"../intl/substitute.js";import o from"../widgets/Widget.js";import{storeNode as i}from"../widgets/support/widgetUtils.js";import{messageBundle as n}from"../widgets/support/decorators/messageBundle.js";import{tsx as u}from"../widgets/support/jsxFactory.js";const a="esri-identity-form",p={base:a,group:`${a}__group`,label:`${a}__label`,footer:`${a}__footer`,esriInput:"esri-input",esriButton:"esri-button",esriButtonSecondary:"esri-button--secondary"},l="ArcGIS Online";let d=class extends o{constructor(s,e){super(s,e),this._usernameInputNode=null,this._passwordInputNode=null,this.signingIn=!1,this.server=null,this.resource=null,this.error=null,this.oAuthPrompt=!1}render(){const{error:s,server:e,resource:t,signingIn:o,oAuthPrompt:n,messages:a}=this,d=u("div",{class:p.group},r(n?a.oAuthInfo:a.info,{server:e&&/\.arcgis\.com/i.test(e)?l:e,resource:`(${t||a.lblItem})`})),c=n?null:u("div",{class:p.group,key:"username"},u("label",{class:p.label},a.lblUser,u("input",{
|
|
5
|
+
import{_ as s}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 t}from"../core/accessorSupport/decorators/subclass.js";import{substitute as r}from"../intl/substitute.js";import o from"../widgets/Widget.js";import{storeNode as i}from"../widgets/support/widgetUtils.js";import{messageBundle as n}from"../widgets/support/decorators/messageBundle.js";import{tsx as u}from"../widgets/support/jsxFactory.js";const a="esri-identity-form",p={base:a,group:`${a}__group`,label:`${a}__label`,footer:`${a}__footer`,esriInput:"esri-input",esriButton:"esri-button",esriButtonSecondary:"esri-button--secondary"},l="ArcGIS Online";let d=class extends o{constructor(s,e){super(s,e),this._usernameInputNode=null,this._passwordInputNode=null,this.signingIn=!1,this.server=null,this.resource=null,this.error=null,this.oAuthPrompt=!1}render(){const{error:s,server:e,resource:t,signingIn:o,oAuthPrompt:n,messages:a}=this,d=u("div",{class:p.group},r(n?a.oAuthInfo:a.info,{server:e&&/\.arcgis\.com/i.test(e)?l:e,resource:`(${t||a.lblItem})`})),c=n?null:u("div",{class:p.group,key:"username"},u("label",{class:p.label},a.lblUser,u("input",{afterCreate:i,autocomplete:"off",bind:this,class:p.esriInput,"data-node-ref":"_usernameInputNode",required:!0,spellcheck:!1,type:"text",value:""}))),m=n?null:u("div",{class:p.group,key:"password"},u("label",{class:p.label},a.lblPwd,u("input",{afterCreate:i,bind:this,class:p.esriInput,"data-node-ref":"_passwordInputNode",required:!0,type:"password",value:""}))),h=u("div",{class:this.classes(p.group,p.footer)},u("input",{class:p.esriButton,disabled:!!o,type:"submit",value:o?a.lblSigning:a.lblOk}),u("input",{bind:this,class:this.classes(p.esriButton,p.esriButtonSecondary),onclick:this._cancel,type:"button",value:a.lblCancel})),b=s?u("div",null,s.details&&s.details.httpStatus?a.invalidUser:a.noAuthService):null;return u("form",{bind:this,class:p.base,onsubmit:this._submit},d,b,c,m,h)}_cancel(){this._set("signingIn",!1),this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(s){s.preventDefault(),this._set("signingIn",!0);const e=this.oAuthPrompt?{}:{username:this._usernameInputNode&&this._usernameInputNode.value,password:this._passwordInputNode&&this._passwordInputNode.value};this.emit("submit",e)}};s([e(),n("esri/identity/t9n/identity")],d.prototype,"messages",void 0),s([e()],d.prototype,"signingIn",void 0),s([e()],d.prototype,"server",void 0),s([e()],d.prototype,"resource",void 0),s([e()],d.prototype,"error",void 0),s([e()],d.prototype,"oAuthPrompt",void 0),d=s([t("esri.identity.IdentityForm")],d);const c=d;export{c 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 t}from"../chunks/tslib.es6.js";import{makeHandle as e}from"../core/handleUtils.js";import{watch as o}from"../core/reactiveUtils.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 r from"../widgets/Widget.js";import{isWidget as n}from"../widgets/support/widget.js";import{createFocusTrap as a}from"focus-trap";import{tsx as c}from"../widgets/support/jsxFactory.js";import{messageBundle as l}from"../widgets/support/decorators/messageBundle.js";const d="esri-identity-modal",p={base:d,open:`${d}--open`,closed:`${d}--closed`,title:`${d}__title`,dialog:`${d}__dialog`,content:`${d}__content`,closeButton:`${d}__close-button`,iconClose:"esri-icon-close"};let u=class extends r{constructor(t,e){super(t,e),this.container=document.createElement("div"),this.content=null,this.open=!1,this._focusTrap=null,this._close=()=>{this.open=!1},document.body.appendChild(this.container),this.addHandles(o((()=>this.open),(()=>this._toggleFocusTrap())))}destroy(){this._destroyFocusTrap()}get title(){return this.messages?.auth.signIn}render(){const t=this.id,{open:e,content:o,title:s,messages:i}=this,r=e&&!!o,n={[p.open]:r,[p.closed]:!r},a=c("button",{
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import{makeHandle as e}from"../core/handleUtils.js";import{watch as o}from"../core/reactiveUtils.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 r from"../widgets/Widget.js";import{isWidget as n}from"../widgets/support/widget.js";import{createFocusTrap as a}from"focus-trap";import{tsx as c}from"../widgets/support/jsxFactory.js";import{messageBundle as l}from"../widgets/support/decorators/messageBundle.js";const d="esri-identity-modal",p={base:d,open:`${d}--open`,closed:`${d}--closed`,title:`${d}__title`,dialog:`${d}__dialog`,content:`${d}__content`,closeButton:`${d}__close-button`,iconClose:"esri-icon-close"};let u=class extends r{constructor(t,e){super(t,e),this.container=document.createElement("div"),this.content=null,this.open=!1,this._focusTrap=null,this._close=()=>{this.open=!1},document.body.appendChild(this.container),this.addHandles(o((()=>this.open),(()=>this._toggleFocusTrap())))}destroy(){this._destroyFocusTrap()}get title(){return this.messages?.auth.signIn}render(){const t=this.id,{open:e,content:o,title:s,messages:i}=this,r=e&&!!o,n={[p.open]:r,[p.closed]:!r},a=c("button",{"aria-label":i.close,bind:this,class:p.closeButton,onclick:this._close,title:i.close,type:"button"},c("span",{"aria-hidden":"true",class:p.iconClose})),l=`${t}_title`,d=`${t}_content`,u=s?c("h1",{class:p.title,id:l},s):null,h=r?c("div",{afterCreate:this._createFocusTrap,"aria-describedby":d,"aria-labelledby":l,bind:this,class:p.dialog,role:"dialog"},a,u,this._renderContent(d)):null;return c("div",{class:this.classes(p.base,n),tabIndex:-1},h)}_destroyFocusTrap(){this._focusTrap?.deactivate({onDeactivate:()=>{}}),this._focusTrap=null}_toggleFocusTrap(){const{_focusTrap:t,open:e}=this;t&&(e?t.activate():t.deactivate())}_createFocusTrap(t){this._destroyFocusTrap();const o=requestAnimationFrame((()=>{this._focusTrap=a(t,{initialFocus:"input",onDeactivate:this._close}),this._toggleFocusTrap()}));this.addHandles(e((()=>cancelAnimationFrame(o))))}_renderContent(t){const e=this.content;return"string"==typeof e?c("div",{class:p.content,id:t,innerHTML:e}):n(e)?c("div",{class:p.content,id:t},e.render()):e instanceof HTMLElement?c("div",{afterCreate:this._attachToNode,bind:e,class:p.content,id:t}):null}_attachToNode(t){const e=this;t.appendChild(e)}};t([s({readOnly:!0})],u.prototype,"container",void 0),t([s()],u.prototype,"content",void 0),t([s()],u.prototype,"open",void 0),t([s(),l("esri/t9n/common")],u.prototype,"messages",void 0),t([s()],u.prototype,"title",null),u=t([i("esri.identity.IdentityModal")],u);const h=u;export{h as default};
|