@arcgis/core 5.0.0-next.11 → 5.0.0-next.13
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/PopupTemplate.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/geometry/nearestVertex.js +5 -0
- package/arcade/geometry/operators.js +1 -1
- package/arcade/geometry/operatorsWorker.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{af47272aaaef0ea57e71.js → 00ea3052170e831c6bc8.js} +1 -1
- package/assets/esri/core/workers/chunks/{91dfd29e2dba200eab09.js → 0105d814fb51c366d1da.js} +1 -1
- package/assets/esri/core/workers/chunks/{125e71b0e29d1d132777.js → 02a22dd6d208a925cc5a.js} +1 -1
- package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
- package/assets/esri/core/workers/chunks/{ead8d0cbcebd12dbfad7.js → 04211fba145d9f06b3ec.js} +1 -1
- package/assets/esri/core/workers/chunks/0441ea7c89266a68b6f0.js +1 -0
- package/assets/esri/core/workers/chunks/07f2a75431dd8fc502ef.js +1 -0
- package/assets/esri/core/workers/chunks/{d1e97cce5047f1791e22.js → 0ac13de43438f572f59c.js} +1 -1
- package/assets/esri/core/workers/chunks/{629127877042ad784ad2.js → 0c8aeb6262e9ec7c87d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{d07f911d40bf05fc0306.js → 1008e3d64f5880e3dbf2.js} +1 -1
- package/assets/esri/core/workers/chunks/{c29486c4eeb3e72effff.js → 110429583b28c28c36ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{61d970ed75c2c358b1e9.js → 14d601e0fe7a0538c7c1.js} +1 -1
- package/assets/esri/core/workers/chunks/18474c017ddacd1d3d2c.js +1 -0
- package/assets/esri/core/workers/chunks/{1257c37bf04d39c27b62.js → 1c3bee704bafb64bba70.js} +1 -1
- package/assets/esri/core/workers/chunks/1d07846bcaac47df0644.js +1 -0
- package/assets/esri/core/workers/chunks/{509392131ec473d6b988.js → 1dfca37f95f2b968aa54.js} +1 -1
- package/assets/esri/core/workers/chunks/2132ccc45da90f6208b2.js +1 -0
- package/assets/esri/core/workers/chunks/2166238a7ad63a2d43c7.js +1 -0
- package/assets/esri/core/workers/chunks/2214d3b1f11658a85d0f.js +1 -0
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +1 -0
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +1 -0
- package/assets/esri/core/workers/chunks/{f80f5dbf96c343ac4df6.js → 24d8922ac9cd48621357.js} +1 -1
- package/assets/esri/core/workers/chunks/257f17b3836a623a9dbe.js +1 -0
- package/assets/esri/core/workers/chunks/2b27499fa9de22970b7a.js +1 -0
- package/assets/esri/core/workers/chunks/2e76fbd3c874300fc4a7.js +1 -0
- package/assets/esri/core/workers/chunks/31b5900119dd7cd9e7d3.js +1 -0
- package/assets/esri/core/workers/chunks/34bb4852ebef0f529c96.js +1 -0
- package/assets/esri/core/workers/chunks/{9698f36c143953a975d4.js → 353d447f3745942c88a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{52282f767bd0e99ddca0.js → 3545dce74bb6b0354cb7.js} +1 -1
- package/assets/esri/core/workers/chunks/36b1f47d70b57d79df7b.js +1 -0
- package/assets/esri/core/workers/chunks/38810e3f298e8a0b64a6.js +1 -0
- package/assets/esri/core/workers/chunks/{7290e7a819eb291b1df2.js → 38fa50336983265c73a4.js} +3 -3
- package/assets/esri/core/workers/chunks/{fe49321dca22dc60d105.js → 3b1982bf7b44ff897a35.js} +1 -1
- package/assets/esri/core/workers/chunks/3bacd904cd93c8013f6a.js +1 -0
- package/assets/esri/core/workers/chunks/{588533c3abe876f20f62.js → 3d5b157bd9060b07670b.js} +1 -1
- package/assets/esri/core/workers/chunks/{06e60fc7715d08ede59d.js → 3edffdb0e282ed562ac7.js} +1 -1
- package/assets/esri/core/workers/chunks/3fa15d4ee5fab8fff76e.js +1 -0
- package/assets/esri/core/workers/chunks/487e1c592f1b6fd03a7d.js +1 -0
- package/assets/esri/core/workers/chunks/{ee5aa11750c51b220f1e.js → 4bcb83119481453dbb90.js} +1 -1
- package/assets/esri/core/workers/chunks/4ca5d58117e7a5f73e1e.js +1 -0
- package/assets/esri/core/workers/chunks/{826fa0dfb63df77bfd95.js → 4f0016111fd84c612f41.js} +1 -1
- package/assets/esri/core/workers/chunks/{24cd7b84cd0f3de4bff2.js → 4f14fed0ec885c3c33d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{4baf6f6e7ddedb25f806.js → 5299ec59c86022ca37e2.js} +1 -1
- package/assets/esri/core/workers/chunks/53a9c34cb3f6ac06cd50.js +1 -0
- package/assets/esri/core/workers/chunks/5415fbcc7ed203fc5575.js +1 -0
- package/assets/esri/core/workers/chunks/54c49a768147720c3c56.js +1 -0
- package/assets/esri/core/workers/chunks/558822b700e8bd844052.js +1 -0
- package/assets/esri/core/workers/chunks/{da24ad57747714ac5eda.js → 55adbd7481f8dfb1067e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7803495f8862d9025bcd.js → 56e06c9c1120bea2c641.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc66490520f97eef15bf.js → 57806a01f33074b601e7.js} +24 -24
- package/assets/esri/core/workers/chunks/{67f03d042455cd0f7009.js → 57b410198d83bf0ab708.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a5d74414dd02a2fb8e1.js → 5bc4140333d0db904949.js} +1 -1
- package/assets/esri/core/workers/chunks/5e08b19e6d7202ea38d7.js +1 -0
- package/assets/esri/core/workers/chunks/{0d5212f59e9b62c16164.js → 5f6df4a3376b52ead53f.js} +1 -1
- package/assets/esri/core/workers/chunks/{15c7c10ff9ac63f0e792.js → 5fb2edf942b1cd8d7336.js} +1 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +1 -0
- package/assets/esri/core/workers/chunks/{dc51438b832551924a9e.js → 6238ca7541800eb2566b.js} +1 -1
- package/assets/esri/core/workers/chunks/{731f7b552dde0fb325cd.js → 62c2bd082a0c669bc857.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8a3f1e60e24a13749c1.js → 631fb2e62e48f8be4051.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8e686efe344a33a0258.js → 6490bc392a4b4f9e24f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e767f83f9e2de6650f80.js → 6581b94e796781c0ad4a.js} +1 -1
- package/assets/esri/core/workers/chunks/{53654edd766d9b4ef750.js → 658cd45b5fb304fd840a.js} +1 -1
- package/assets/esri/core/workers/chunks/67f305b0c72e77a6331a.js +1 -0
- package/assets/esri/core/workers/chunks/6922351c001fdb4cb757.js +1 -0
- package/assets/esri/core/workers/chunks/{6e22b02a9715c10578d0.js → 69cca5d3f715876c6b32.js} +1 -1
- package/assets/esri/core/workers/chunks/6c13c01c47abc1939f96.js +1 -0
- package/assets/esri/core/workers/chunks/{c37f7756d48ff9af2656.js → 736035c0069ccb03bee6.js} +1 -1
- package/assets/esri/core/workers/chunks/7c14f99e6cfff2a8ef4a.js +1 -0
- package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
- package/assets/esri/core/workers/chunks/82338cdd56aa1de28db3.js +1 -0
- package/assets/esri/core/workers/chunks/{51ab2acac4ecc1ca9c34.js → 86830fcb5475502dac65.js} +1 -1
- package/assets/esri/core/workers/chunks/{11e96a312f1294d34c50.js → 881df4fd1dc594576457.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1ca7c3a32ce00ed8b81.js → 8be16b03caa947ac7631.js} +1 -1
- package/assets/esri/core/workers/chunks/8d9ccc9a43a315cb6b04.js +1 -0
- package/assets/esri/core/workers/chunks/{042cd64e1f4eb326c30f.js → 8fc82fe1fcbcedf35400.js} +1 -1
- package/assets/esri/core/workers/chunks/91afee11072471e4eefe.js +1 -0
- package/assets/esri/core/workers/chunks/{fbd8d2f61f8a15bcf3db.js → 9595aabbaf411eceea1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{6cf391b5ed7351601a2a.js → 9978ec6c67e87dc08a1d.js} +1 -1
- package/assets/esri/core/workers/chunks/9cdd087c43a601ec331d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{5e2ce34def5e053913b2.js → a10e533f336c035d8d40.js} +1 -1
- package/assets/esri/core/workers/chunks/{311b564e44ae637c960d.js → a3ade7e8b9ddadb5f800.js} +1 -1
- package/assets/esri/core/workers/chunks/{18c5d79d5ee1136e0a57.js → a57751f3d78524c876cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{0030d68d9edf42b4af57.js → a6a87f92f453204e9bdb.js} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/a8ea050090c351e3b6d6.js +1 -0
- package/assets/esri/core/workers/chunks/adf7ccf4ef629211c7ee.js +1 -0
- package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +1 -0
- package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
- package/assets/esri/core/workers/chunks/b328635d191f5424c047.js +1 -0
- package/assets/esri/core/workers/chunks/b59f9c3f7a149214256f.js +1 -0
- package/assets/esri/core/workers/chunks/{664ae441617afe4b17ec.js → b87bc987983b31c13f64.js} +1 -1
- package/assets/esri/core/workers/chunks/bb56717c4e36f28d4c08.js +1 -0
- package/assets/esri/core/workers/chunks/bbdfa8ffcf084cbd9938.js +1 -0
- package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
- package/assets/esri/core/workers/chunks/bc29c29bfa5be3ebafb1.js +1 -0
- package/assets/esri/core/workers/chunks/{ddfd01bb9ba8577c3ffc.js → c3dcfe26c2c3c829762d.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ddcf9148dd2640c402.js +1 -0
- package/assets/esri/core/workers/chunks/{6d9f2b113d6bde936a04.js → c4dfd897bcab20dee43b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f30a9514571c7be9978.js → c5c02ace54fe4ab9214b.js} +1 -1
- package/assets/esri/core/workers/chunks/{87921f3fa9001f5801ed.js → c68935ed44eb0702a6ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6853c6a25eaabc9a7f6.js → c9579d607e59bae214da.js} +1 -1
- package/assets/esri/core/workers/chunks/d39a10155317e6f7a21c.js +1 -0
- package/assets/esri/core/workers/chunks/{773f2c6c9d38db76dfed.js → d42f7e48d694b2427c0d.js} +1 -1
- package/assets/esri/core/workers/chunks/d466f3f0d3824c77da7c.js +1 -0
- package/assets/esri/core/workers/chunks/d4a91f2256e48316a8f0.js +1 -0
- package/assets/esri/core/workers/chunks/d69265ceabfa92b40bb7.js +1 -0
- package/assets/esri/core/workers/chunks/d7755c4c8d1d3059efca.js +1 -0
- package/assets/esri/core/workers/chunks/{eb9c166db0db6fa60e95.js → d7b0fcce847f563ea255.js} +1 -1
- package/assets/esri/core/workers/chunks/d87f0116ee53ec5f98e9.js +1 -0
- package/assets/esri/core/workers/chunks/d888ae5ac1810a486919.js +1 -0
- package/assets/esri/core/workers/chunks/db54552def7bc6cef9bd.js +1 -0
- package/assets/esri/core/workers/chunks/dc4d29cfce12ac599888.js +1 -0
- package/assets/esri/core/workers/chunks/dda6ca9af35518652d0f.js +1 -0
- package/assets/esri/core/workers/chunks/{7005d956c990a04ee8b2.js → dec336700cfb83abbbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/{b3613a38178cad2ebc82.js → dee9867b3379e024ae96.js} +1 -1
- package/assets/esri/core/workers/chunks/df130abb76713a85b4f9.js +1 -0
- package/assets/esri/core/workers/chunks/e0aa036c56ecdfe01503.js +1 -0
- package/assets/esri/core/workers/chunks/e2e4f6b58763fae51ae5.js +1 -0
- package/assets/esri/core/workers/chunks/e8a9c56fd0e7fd2558ef.js +1 -0
- package/assets/esri/core/workers/chunks/{1d06fcae4c2f02fb1c95.js → eb7eb3b3b8800fd73f3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{37c1f155da14de91565a.js → edf58513f789856cd1db.js} +1 -1
- package/assets/esri/core/workers/chunks/{f34e3fa0c5b28531e289.js → ef789e8487deab916fad.js} +1 -1
- package/assets/esri/core/workers/chunks/f28ffda9a95c6568503d.js +1 -0
- package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +1 -0
- package/assets/esri/core/workers/chunks/{292daac70bb828e4923f.js → f9cd068d184cab66dc33.js} +1 -1
- package/assets/esri/core/workers/chunks/{dff2df259f140b7d97a9.js → fd88e07cba5964f80e9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9b16fd41cd59d452522.js → fdbe16e3b23e01655c0c.js} +1 -1
- package/assets/esri/core/workers/chunks/{063905fbf9a0c6586949.js → ffdba51e7256ebf8ebd3.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +35 -2
- 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/Envelope.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/densifyOperator.js +1 -1
- package/chunks/differenceOperator.js +1 -1
- package/chunks/intersectsOperator.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/config.js +1 -1
- package/core/XHRAdapter.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/quantityFormatUtils.js +1 -1
- package/core/unitFormatUtils.js +1 -1
- package/core/unitUtils.js +1 -1
- package/editing/fieldUtils.js +5 -0
- package/geometry/Extent.js +1 -1
- package/geometry/Geometry.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/Point.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/polygonUtils.js +1 -1
- package/interfaces.d.ts +90 -7
- package/kernel.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/save/streamLayerUtils.js +1 -1
- package/layers/support/DateTimeFieldFormat.js +1 -1
- package/layers/support/FieldFormat.js +1 -1
- package/layers/support/LayerLoadContext.js +1 -1
- package/layers/support/NumberFieldFormat.js +1 -1
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/package.json +1 -1
- package/popup/ExpressionInfo.js +1 -1
- package/popup/FieldInfo.js +1 -1
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/BarChartMediaInfo.js +1 -1
- package/popup/content/ColumnChartMediaInfo.js +1 -1
- package/popup/content/Content.js +1 -1
- package/popup/content/CustomContent.js +1 -1
- package/popup/content/ExpressionContent.js +1 -1
- package/popup/content/FieldsContent.js +1 -1
- package/popup/content/ImageMediaInfo.js +1 -1
- package/popup/content/LineChartMediaInfo.js +1 -1
- package/popup/content/MediaContent.js +1 -1
- package/popup/content/PieChartMediaInfo.js +1 -1
- package/popup/content/RelationshipContent.js +1 -1
- package/popup/content/TextContent.js +1 -1
- package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
- package/popup/content/mixins/ChartMediaInfo.js +1 -1
- package/popup/content/mixins/MediaInfo.js +1 -1
- package/popup/content.js +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/request/cors.js +5 -0
- package/request/loadImage.js +5 -0
- package/request/preferredHosts.js +5 -0
- package/request/process.js +5 -0
- package/request/queue.js +5 -0
- package/request/serviceJSON.js +5 -0
- package/request.js +1 -1
- package/rest/geometryService/utils.js +1 -1
- package/rest/knowledgeGraphService.d.ts +1 -0
- package/support/getDefaultUnitForView.js +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/time/TimeExtent.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementAreaVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementLabelVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementManipulatorVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementSketchVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +5 -0
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +5 -0
- package/views/2d/analysis/analysisViewModuleImportUtils.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/ManagedTextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileErrors.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/magnifier/resources.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/MergeFeaturesList.js +5 -0
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/css.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +1 -1
- package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/utils.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/assets/esri/core/workers/chunks/0200637e0503556a3b97.js +0 -1
- package/assets/esri/core/workers/chunks/022c854eff2c2c2aed6b.js +0 -1
- package/assets/esri/core/workers/chunks/06f75c5b6b50934d72a6.js +0 -1
- package/assets/esri/core/workers/chunks/15f969836d63c7fe2d9d.js +0 -1
- package/assets/esri/core/workers/chunks/2857bcb68df874e9aa62.js +0 -1
- package/assets/esri/core/workers/chunks/2a9fc0301268ff909246.js +0 -1
- package/assets/esri/core/workers/chunks/2ddcf3cea0efe4052618.js +0 -1
- package/assets/esri/core/workers/chunks/2e8a4df83c43f86d7361.js +0 -1
- package/assets/esri/core/workers/chunks/2f2e4f81f3daa3fb8527.js +0 -1
- package/assets/esri/core/workers/chunks/3109f0a6914e7be088ed.js +0 -1
- package/assets/esri/core/workers/chunks/31bb1ee9370c2753ce9d.js +0 -1
- package/assets/esri/core/workers/chunks/329fccd7f5cb8401e0c3.js +0 -1
- package/assets/esri/core/workers/chunks/38f6b9288c82dac9a800.js +0 -1
- package/assets/esri/core/workers/chunks/3b1848713ee25f750242.js +0 -1
- package/assets/esri/core/workers/chunks/4291681d067ebdf86e73.js +0 -1
- package/assets/esri/core/workers/chunks/42a1e71d09e8583a7327.js +0 -1
- package/assets/esri/core/workers/chunks/44f27eac92c5ccc57e12.js +0 -1
- package/assets/esri/core/workers/chunks/4941bfd3aae7f6bdac97.js +0 -1
- package/assets/esri/core/workers/chunks/4bd2cc65f7db0d261543.js +0 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +0 -1
- package/assets/esri/core/workers/chunks/4fbe2a8d742065cbaea3.js +0 -1
- package/assets/esri/core/workers/chunks/4fe4feeb251f2916a339.js +0 -1
- package/assets/esri/core/workers/chunks/55eb6a0f1e4569a65f2a.js +0 -1
- package/assets/esri/core/workers/chunks/591e459f9fce34f519ca.js +0 -1
- package/assets/esri/core/workers/chunks/59514624daf188a8030f.js +0 -1
- package/assets/esri/core/workers/chunks/5c09d98b41f71a036e2a.js +0 -1
- package/assets/esri/core/workers/chunks/605b9643b1baeff16149.js +0 -1
- package/assets/esri/core/workers/chunks/6293e33f304c4952f88c.js +0 -1
- package/assets/esri/core/workers/chunks/655beaf83e9845a02334.js +0 -1
- package/assets/esri/core/workers/chunks/6e25ef5ad6d6b3f88343.js +0 -1
- package/assets/esri/core/workers/chunks/759321045c264bc6964e.js +0 -1
- package/assets/esri/core/workers/chunks/7e3f27ebf366d4266350.js +0 -1
- package/assets/esri/core/workers/chunks/826072cfc0ac8e36f03c.js +0 -1
- package/assets/esri/core/workers/chunks/9b0c2f4311fe9bca370a.js +0 -1
- package/assets/esri/core/workers/chunks/9c48d8d17831aa57f8a4.js +0 -1
- package/assets/esri/core/workers/chunks/9f28b2800945903bc165.js +0 -1
- package/assets/esri/core/workers/chunks/a27e74117c37f3efcbca.js +0 -1
- package/assets/esri/core/workers/chunks/a41ba05c09a59d1eb35f.js +0 -1
- package/assets/esri/core/workers/chunks/a93ebd076bc55aa6eab0.js +0 -1
- package/assets/esri/core/workers/chunks/aaed35a6414859233678.js +0 -1
- package/assets/esri/core/workers/chunks/acd0564ad1544f452f3f.js +0 -1
- package/assets/esri/core/workers/chunks/b0f43191a431c9de16e5.js +0 -1
- package/assets/esri/core/workers/chunks/b320bb76c7e9998fe53b.js +0 -1
- package/assets/esri/core/workers/chunks/ba4571d2637a74a59552.js +0 -1
- package/assets/esri/core/workers/chunks/c4090a60d149a5962179.js +0 -1
- package/assets/esri/core/workers/chunks/c61c61dac1e8d6188749.js +0 -1
- package/assets/esri/core/workers/chunks/c84caf81bfaa4a8b5aa1.js +0 -1
- package/assets/esri/core/workers/chunks/c8c8cf43fd640d2f5cb1.js +0 -1
- package/assets/esri/core/workers/chunks/d28670cb11164e318e45.js +0 -1
- package/assets/esri/core/workers/chunks/d56ac52a5288e06365e7.js +0 -1
- package/assets/esri/core/workers/chunks/ddca92e18e96ea1c9d89.js +0 -1
- package/assets/esri/core/workers/chunks/ded9747ae04ab889d52a.js +0 -1
- package/assets/esri/core/workers/chunks/df5afa06c6deb6b40109.js +0 -1
- package/assets/esri/core/workers/chunks/df8279e1baf378faf85f.js +0 -1
- package/assets/esri/core/workers/chunks/e3434f91f47f551d9e02.js +0 -1
- package/assets/esri/core/workers/chunks/eb6c3dd440ede4adf603.js +0 -1
- package/assets/esri/core/workers/chunks/edc671b9b83c8e19cb42.js +0 -1
- package/assets/esri/core/workers/chunks/f141c9f7f0d9b2322bf6.js +0 -1
- package/assets/esri/core/workers/chunks/f57401a759f420596b2c.js +0 -1
- package/assets/esri/core/workers/chunks/f7a1f48c53422c6e2028.js +0 -1
- package/assets/esri/core/workers/chunks/f7f002ea5ff5fe7f6249.js +0 -1
- package/assets/esri/core/workers/chunks/f8e889be4b45f6f0667e.js +0 -1
- package/assets/esri/core/workers/chunks/fbd796c88f07bb6755dc.js +0 -1
- package/assets/esri/core/workers/chunks/fec3897ed7e8691387ed.js +0 -1
- package/processRequest.js +0 -5
- package/requestQueue.js +0 -5
- package/support/requestPresets.js +0 -5
- package/support/requestUtils.js +0 -5
- /package/{rest/support → request}/ImageWithType.js +0 -0
- /package/{requestConfig.js → request/config.js} +0 -0
- /package/{support/requestImageUtils.js → request/image.js} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l}from"./domainUtils.js";import{supportsFieldConfiguration as o}from"./layerUtils.js";import{getFieldNameFromSimpleExpression as s}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as a,isString as u}from"../../support/guards.js";import{loadArcade as f}from"../../support/loadArcade.js";const d=/^([0-9_])/,c=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(c,"_").replace(d,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],y=["field","normalizationField"];function g(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(F(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)F(y,e,n)}function F(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function I(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const b=new Set;function w(e,n){return e&&n?(b.clear(),x(b,e,n),Array.from(b).sort()):[]}function x(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)T(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function T(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map(e=>e.name):n}function v(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=w(e,n);return t.length/e.fields.length>=i?["*"]:t}async function S(e,n,i,t){if(!t)return;const r=s(t);if(r)T(e,n,r);else{const{arcadeUtils:r}=await f(),l=r.extractFieldNames(t,i?.partitions??n?.fields?.map(e=>e.name));for(const t of l)T(e,i?.index??n,t)}}async function A(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});x(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n?.length?_(n,"name-or-title")||_(n,"unique-identifier")||_(n,"type-or-category")||$(n):null)}function $(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function _(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function N(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function M(e,n,i){i.onStatisticExpression?S(e,n,null,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function j(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(O(e,n,r)),i.fields&&t.push(...i.fields.map(async i=>M(e,n.fieldsIndex,i))),await Promise.all(t)}async function D(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(O(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Z(e,i,n));await Promise.all(r)}async function O(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map(i=>S(e,n.fieldsIndex,null,i.expression)));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(S(e,n.fieldsIndex,null,l.expressionInfo.expression));await Promise.all(t)}async function R(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&x(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&x(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await A(e,n.fieldsIndex,i.where))}async function V(e,n,i){n&&i&&await Promise.all(i.map(i=>k(e,n,i)))}async function k(e,n,i){n&&i&&(i.valueExpression?await S(e,n.fieldsIndex,null,i.valueExpression):i.field&&T(e,n.fieldsIndex,i.field))}async function C(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?w(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function U(e){return e?w(e.fieldsIndex,J(e)):[]}function q(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?w(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function X(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map(n=>A(e,t,n.where)))}const z=new Set(["oid","global-id","guid"]),P=new Set(["oid","global-id"]),B=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/objectid/i,/^perimeter_/i,/_perimeter$/i,/_i$/i];function G(e){const n=new Set;W(e).forEach(e=>n.add(e)),q(e).forEach(e=>n.add(e.toLowerCase()));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach(e=>n.add(e.toLowerCase())),Object.values(i.transformFieldRoles).forEach(e=>n.add(e.toLowerCase()))),Array.from(n)}function J(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function W(e){return J(e).map(e=>e.toLowerCase())}function H(e,n){return e.editable&&!z.has(e.type)&&!W(n).includes(e.name?.toLowerCase()??"")}function K(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||G(n).includes(i)||P.has(e.type)||B.some(e=>e.test(i)))}async function Q(e){if(!e)return[];const n=new Set;return await Y(n,e),Array.from(n).sort()}async function Y(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map(n=>Z(e,t,n)))}async function Z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await S(e,n,null,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach(i=>{T(e,n,i.slice(1,-1))})}await A(e,n,r)}function ee(e){const n=e.defaultValue;return void 0!==n&&oe(e,n)?n:e.nullable?null:void 0}function ne(e){const n="string"==typeof e?{type:e}:e;return Fe(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ie(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function te(e){return null===e||ie(e)}function re(e){return null===e||Number.isInteger(e)}function le(){return!0}function oe(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?re:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?te:ie;break;case"string":case"esriFieldTypeString":i=e.nullable?a:u;break;default:i=le}return 1===arguments.length?i:i(n)}const se=["integer","small-integer","big-integer","long"],ae=["single","double"],ue=[...se,...ae],fe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],de=["esriFieldTypeSingle","esriFieldTypeDouble"],ce=new Set([...se,...fe]),pe=new Set([...ae,...de]),me=t(ce,pe);function ye(e){return null!=e&&ce.has(e.type)}function ge(e){return null!=e&&me.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function be(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function we(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function xe(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function Te(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function he(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function ve(e,n){return null===Ae(e,n)}function Se(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Ae(e,n){return null==e||e.nullable&&null===n?null:oe(e,n)?ge(e)&&!Ee(e.type,Number(n))?"numeric-range-validation-error::out-of-range":null:"type-validation-error::invalid-type"}function Ee(e,n){const i="string"==typeof e?_e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function $e(e,n){const i=l(e,n);return i||(ge(e)?_e(e.type):void 0)}function _e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Le;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Me;case"esriFieldTypeBigInteger":case"big-integer":return je;case"esriFieldTypeSingle":case"single":return Oe;case"esriFieldTypeDouble":case"double":return Re}}function Ne(e){if(!ie(e))return null;if(Number.isInteger(e)){if(e>=Le.min&&e<=Le.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=je.min&&e<=je.max)return"esriFieldTypeBigInteger"}return e>=Oe.min&&e<=Oe.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}const Le={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},je={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},De=(2-2**-23)*2**127,Oe={min:-De,max:De,isInteger:!1,rawMin:-De,rawMax:De},Re={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ve(e,n,i){switch(e){case"domain-validation-error::invalid-coded-value":return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"domain-validation-error::value-out-of-range":return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"type-validation-error::invalid-type":return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case"numeric-range-validation-error::out-of-range":{const{min:e,max:t}=_e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function ke(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ue(e,n){const i=new Set;for(const t of n)await S(i,e.fieldsIndex,null,t);return Array.from(i).sort()}function qe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(n=>e.toLowerCase().startsWith(n))}async function Xe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function ze(e){const n=e?.match(/{[^}]+}/g);return n?n.map(e=>e.slice(1,-1).split(":")[0].trim()):[]}function Pe(e,n){return o(n)?n.getFieldAlias(e.name):e.alias}export{je as bigIntegerRange,S as collectArcadeFieldNames,X as collectDisplayFilterFields,L as collectElevationFields,j as collectFeatureReductionFields,T as collectField,x as collectFields,R as collectFilterFields,Y as collectLabelingFields,V as collectOrderByInfos,O as collectPopupTemplateFields,A as collectSQLFieldNames,D as collectTrackInfoFields,Re as doubleRange,ze as extractSubstitutionTemplatesFromString,ke as featureHasFields,w as fixFields,g as fixRendererFields,I as fixTimeInfoFields,de as floatJSONTypes,ae as floatTypes,E as getDisplayFieldName,J as getEditTrackingFields,Pe as getEffectiveFieldAlias,N as getElevationFields,Ue as getExpressionFields,U as getFeatureEditFields,q as getFeatureGeometryFields,ne as getFieldDefaultLength,ee as getFieldDefaultValue,$e as getFieldRange,Q as getLabelingFields,G as getLowerCaseDefaultHiddenFields,W as getLowerCaseEditTrackingFields,Ne as getNumericTypeForValue,Xe as getRendererFields,C as getTimeFields,fe as integerJSONTypes,Me as integerRange,se as integerTypes,Ie as isDateField,be as isDateOnlyField,H as isFieldEditable,K as isFieldVisibleByDefault,he as isGlobalIDField,ye as isIntegerField,Ee as isNumberInRange,ge as isNumericField,Te as isObjectIDField,qe as isRasterPixelValueField,Fe as isStringField,xe as isTimeOnlyField,we as isTimestampOffsetField,ve as isValidFieldValue,oe as isValueMatchingFieldType,p as normalizeFieldName,ue as numericTypes,v as packFields,Ce as populateMissingFields,m as rendererFields,Se as sanitizeNullFieldValue,Oe as singleRange,Le as smallIntegerRange,h as unpackFieldNames,Ae as validateFieldValue,Ve as validationErrorToString,y as visualVariableFields};
|
|
5
|
+
import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as o}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as s,isString as a}from"../../support/guards.js";import{loadArcade as u}from"../../support/loadArcade.js";const f=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(f,"F$1")||null}const p=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(p,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(m,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function b(e,n){return e&&n?(I.clear(),w(I,e,n),Array.from(I).sort()):[]}function w(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map(e=>e.name):n}function h(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=b(e,n);return t.length/e.fields.length>=i?["*"]:t}async function v(e,n,i,t){if(!t)return;const r=o(t);if(r)x(e,n,r);else{const{arcadeUtils:r}=await u(),l=r.extractFieldNames(t,i?.partitions??n?.fields?.map(e=>e.name));for(const t of l)x(e,i?.index??n,t)}}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});w(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n?.length?$(n,"name-or-title")||$(n,"unique-identifier")||$(n,"type-or-category")||A(n):null)}function A(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function $(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function _(e){if(!e)return[];const n=new Set;return await N(n,e),Array.from(n).sort()}async function N(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function L(e,n,i){i.onStatisticExpression?v(e,n,null,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function M(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(D(e,n,r)),i.fields&&t.push(...i.fields.map(async i=>L(e,n.fieldsIndex,i))),await Promise.all(t)}async function j(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(D(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Y(e,i,n));await Promise.all(r)}async function D(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map(i=>v(e,n.fieldsIndex,null,i.expression)));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(v(e,n.fieldsIndex,null,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&w(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&w(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await S(e,n.fieldsIndex,i.where))}async function R(e,n,i){n&&i&&await Promise.all(i.map(i=>V(e,n,i)))}async function V(e,n,i){n&&i&&(i.valueExpression?await v(e,n.fieldsIndex,null,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?b(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?b(e.fieldsIndex,G(e)):[]}function U(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?b(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function q(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map(n=>S(e,t,n.where)))}const X=new Set(["oid","global-id","guid"]),z=new Set(["oid","global-id"]),P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/objectid/i,/^perimeter_/i,/_perimeter$/i,/_i$/i];function B(e){const n=new Set;J(e).forEach(e=>n.add(e)),U(e).forEach(e=>n.add(e.toLowerCase()));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach(e=>n.add(e.toLowerCase())),Object.values(i.transformFieldRoles).forEach(e=>n.add(e.toLowerCase()))),Array.from(n)}function G(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return G(e).map(e=>e.toLowerCase())}function W(e,n){return e.editable&&!X.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||z.has(e.type)||P.some(e=>e.test(i)))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map(n=>Y(e,t,n)))}async function Y(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await v(e,n,null,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach(i=>{x(e,n,i.slice(1,-1))})}await S(e,n,r)}function Z(e){const n=e.defaultValue;return void 0!==n&&le(e,n)?n:e.nullable?null:void 0}function ee(e){const n="string"==typeof e?{type:e}:e;return ge(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ne(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ie(e){return null===e||ne(e)}function te(e){return null===e||Number.isInteger(e)}function re(){return!0}function le(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?te:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?ie:ne;break;case"string":case"esriFieldTypeString":i=e.nullable?s:a;break;default:i=re}return 1===arguments.length?i:i(n)}const oe=["integer","small-integer","big-integer","long"],se=["single","double"],ae=[...oe,...se],ue=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],fe=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...oe,...ue]),ce=new Set([...se,...fe]),pe=t(de,ce);function me(e){return null!=e&&de.has(e.type)}function ye(e){return null!=e&&pe.has(e.type)}function ge(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Fe(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Ie(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function be(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function we(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function Te(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function he(e,n){return null===Se(e,n)}function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:le(e,n)?ye(e)&&!Ee(e.type,Number(n))?"numeric-range-validation-error::out-of-range":null:"type-validation-error::invalid-type"}function Ee(e,n){const i="string"==typeof e?$e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function Ae(e,n){const i=l(e,n);return i||(ye(e)?$e(e.type):void 0)}function $e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Ne;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Le;case"esriFieldTypeBigInteger":case"big-integer":return Me;case"esriFieldTypeSingle":case"single":return De;case"esriFieldTypeDouble":case"double":return Oe}}function _e(e){if(!ne(e))return null;if(Number.isInteger(e)){if(e>=Ne.min&&e<=Ne.max)return"esriFieldTypeSmallInteger";if(e>=Le.min&&e<=Le.max)return"esriFieldTypeInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeBigInteger"}return e>=De.min&&e<=De.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}const Ne={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Le={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Me={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},je=(2-2**-23)*2**127,De={min:-je,max:je,isInteger:!1,rawMin:-je,rawMax:je},Oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Re(e,n,i){switch(e){case"domain-validation-error::invalid-coded-value":return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"domain-validation-error::value-out-of-range":return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"type-validation-error::invalid-type":return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case"numeric-range-validation-error::out-of-range":{const{min:e,max:t}=$e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Ve(e,n){return!ke(e,n,null)}function ke(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ce(e,n){const i=new Set;for(const t of n)await v(i,e.fieldsIndex,null,t);return Array.from(i).sort()}function Ue(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(n=>e.toLowerCase().startsWith(n))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map(e=>e.slice(1,-1).split(":")[0].trim()):[]}export{Me as bigIntegerRange,v as collectArcadeFieldNames,q as collectDisplayFilterFields,N as collectElevationFields,M as collectFeatureReductionFields,x as collectField,w as collectFields,O as collectFilterFields,Q as collectLabelingFields,R as collectOrderByInfos,D as collectPopupTemplateFields,S as collectSQLFieldNames,j as collectTrackInfoFields,Oe as doubleRange,Xe as extractSubstitutionTemplatesFromString,Ve as featureHasFields,b as fixFields,y as fixRendererFields,F as fixTimeInfoFields,fe as floatJSONTypes,se as floatTypes,E as getDisplayFieldName,G as getEditTrackingFields,_ as getElevationFields,Ce as getExpressionFields,C as getFeatureEditFields,U as getFeatureGeometryFields,ee as getFieldDefaultLength,Z as getFieldDefaultValue,Ae as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,_e as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,ue as integerJSONTypes,Le as integerRange,oe as integerTypes,Fe as isDateField,Ie as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,Te as isGlobalIDField,me as isIntegerField,Ee as isNumberInRange,ye as isNumericField,xe as isObjectIDField,Ue as isRasterPixelValueField,ge as isStringField,we as isTimeOnlyField,be as isTimestampOffsetField,he as isValidFieldValue,le as isValueMatchingFieldType,c as normalizeFieldName,ae as numericTypes,h as packFields,ke as populateMissingFields,p as rendererFields,ve as sanitizeNullFieldValue,De as singleRange,Ne as smallIntegerRange,T as unpackFieldNames,Se as validateFieldValue,Re as validationErrorToString,m as visualVariableFields};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../core/has.js";import{isHostedAgolService as t,parse as s}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as e}from"./infoFor3D.js";import{
|
|
5
|
+
import has from"../../core/has.js";import{isHostedAgolService as t,parse as s}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as e}from"./infoFor3D.js";import{readNumber as r,readBoolean as p}from"../../rest/support/jsonUtils.js";const o={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(t){const s=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function n(t,s){const e=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!e?.includes(s.toLowerCase())}function i(t){const s=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!s?.includes("count"),sum:!!s?.includes("sum"),min:!!s?.includes("min"),max:!!s?.includes("max"),avg:!!s?.includes("avg"),var:!!s?.includes("var"),stddev:!!s?.includes("stddev"),percentileContinuous:!!s?.includes("percentile_cont"),percentileDiscrete:!!s?.includes("percentile_disc"),envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function a(t){const s=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!s?.includes("field"),log:!!s?.includes("log"),naturalLog:!!s?.includes("naturallog"),percentOfTotal:!!s?.includes("percentoftotal"),squareRoot:!!s?.includes("squareroot")}}function c(t,s){return{analytics:d(t),attachment:l(t),data:y(t),metadata:m(t),operations:g(t.capabilities,t,s),query:C(t,s),queryAttributeBins:Q(t),queryRelated:v(t),queryTopFeatures:h(t),editing:A(t)}}function d(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryAnalytics")}}function l(t){const s=t.attachmentProperties,e={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:n(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:p(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:p(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:p(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1)};return s&&Array.isArray(s)&&s.forEach(t=>{const s=o[t.name];s&&(e[s]=!!t.isEnabled)}),e}function y(t){return{isVersioned:p(t,"isDataVersioned",!1),isBranchVersioned:p(t,"isDataBranchVersioned",!1),supportsAttachment:p(t,"hasAttachments",!1),supportsM:p(t,"hasM",!1),supportsZ:p(t,"hasZ",!1)}}function m(t){return{supportsAdvancedFieldProperties:p(t,"supportsFieldDescriptionProperty",!1)}}function g(t,e,r){const o=t?.toLowerCase().split(",").map(t=>t.trim())??[],u=r?s(r):null,n=o.includes("MapServer"===u?.serverType?"data":"query"),i=o.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let a=i&&o.includes("create"),c=i&&o.includes("delete"),d=i&&o.includes("update");const l=o.includes("changetracking"),y=e.advancedQueryCapabilities;return i&&!(a||c||d)&&(a=c=d=!0),{supportsCalculate:p(e,"supportsCalculate",!1),supportsTruncate:p(e,"supportsTruncate",!1),supportsValidateSql:p(e,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:c,supportsEditing:i,supportsChangeTracking:l,supportsQuery:n,supportsQueryAnalytics:p(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:p(y,"supportsQueryAttachments",!1),supportsQueryBins:p(y,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:p(y,"supportsQueryPivot",!1),supportsQueryTopFeatures:p(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:p(e,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:p(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:p(e,"supportsAsyncConvert3D",!1)}}function C(s,o){const i=s.advancedQueryCapabilities,a=s.ownershipBasedAccessControlForFeatures,c=s.archivingInfo,d=s.currentVersion,l=o?.includes("MapServer"),y=!l||d>=has("mapserver-pbf-version-support"),m=t(o),g=new Set((s.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim()));return{maxRecordCount:r(s,"maxRecordCount",void 0),maxRecordCountFactor:r(s,"maxRecordCountFactor",void 0),maxUniqueIDCount:r(s,"maxUniqueIDCount",void 0),standardMaxRecordCount:r(s,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:u(i),supportsCacheHint:p(i,"supportsQueryWithCacheHint",!1)||n(i,"query"),supportsCentroid:p(i,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:m||null==o,supportsCompactGeometry:m,supportsCurrentUser:p(i,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:p(i,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:p(i,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:p(i,"supportsDisjointSpatialRel",!1),supportsDistance:p(i,"supportsQueryWithDistance",!1),supportsDistinct:p(i,"supportsDistinct",s.supportsAdvancedQueries),supportsExtent:p(i,"supportsReturningQueryExtent",!1),supportsFormatPBF:y&&g.has("pbf"),supportsFullTextSearch:p(i,"supportsFullTextSearch",!1),supportsGeometryProperties:p(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:p(i,"supportsHavingClause",!1),supportsHistoricMoment:p(c,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:p(i,"supportsMaxRecordCountFactor",!1),supportsOrderBy:p(i,"supportsOrderBy",s.supportsAdvancedQueries),supportsPagination:p(i,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:p(i,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:p(i,"supportsPercentileStatistics",!1),supportsQuantization:p(s,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:p(s,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:p(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:p(a,"allowOthersToQuery",!0),supportsQueryGeometry:p(s,"supportsReturningQueryGeometry",!1),supportsResultType:p(i,"supportsQueryWithResultType",!1),supportsReturnMesh:!!e(s.infoFor3D),supportsSpatialAggregationStatistics:p(i,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:p(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:p(s,"useStandardizedQueries",!1),supportsStatistics:p(i,"supportsStatistics",s.supportsStatistics),supportsTopFeaturesQuery:p(i,"supportsTopFeaturesQuery",!1),supportsTrueCurve:p(i,"supportsTrueCurve",!1),tileMaxRecordCount:r(s,"tileMaxRecordCount",void 0)}}function v(t){const s=t.advancedQueryCapabilities,e=p(s,"supportsAdvancedQueryRelated",!1);return{supportsPagination:p(s,"supportsQueryRelatedPagination",!1),supportsCount:e,supportsOrderBy:e,supportsCacheHint:n(s,"queryRelated")}}function h(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryTopFilter")}}function Q(t){const s=t?t.queryBinsCapabilities:void 0;return{supportsDate:p(s,"supportsDateBin",!1),supportsFixedInterval:p(s,"supportsFixedIntervalBin",!1),supportsAutoInterval:p(s,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:p(s,"supportsFixedBoundariesBin",!1),supportsStackBy:p(s,"supportsStackBy",!1),supportsSplitBy:p(s,"supportsSplitBy",!1),supportsSnapToData:p(s,"supportsSnapToData",!1),supportsReturnFullIntervalBin:p(s,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:p(s,"supportsFirstDayOfWeek",!1),supportsNormalization:p(s,"supportsNormalization",!1),supportedStatistics:i(s),supportedNormalizationTypes:a(s)}}function A(t){const s=t.ownershipBasedAccessControlForFeatures,e=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:p(t,"allowGeometryUpdates",!0),supportsGlobalId:p(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:p(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:p(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:p(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:p(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:p(s,"allowAnonymousToDelete",!0),supportsDeleteByOthers:p(s,"allowOthersToDelete",!0),supportsUpdateByAnonymous:p(s,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:p(s,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:p(e,"supportsAsyncApplyEdits",!1),zDefault:r(t,"zDefault",void 0)}}function S(t){return{operations:{supportsAppend:p(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:p(t,"supportsExportClip",!1),supportsExportFrameset:p(t,"supportsExportFrameset",!1),supportsMensuration:p(t,"supportsMensuration",!1),supportsPreviews:p(t,"supportsPreviews",!1),supportsUpdate:p(t,"supportsUpdate",!1)}}}export{c as getFeatureLayerCapabilities,S as getVideoLayerCapabilities};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{fromValues as i,create as a}from"../../core/libs/gl-matrix-2/factories/mat3f64.js";import{
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{fromValues as i,create as a}from"../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromValues as r,create as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{multiply as n,transpose as h}from"../../core/libs/gl-matrix-2/math/mat3.js";import{f as m,c as g,e as u,o as c}from"../../chunks/vec32.js";import p from"../../geometry/Point.js";import d from"../../geometry/SpatialReference.js";import{WGS84ECEFSpatialReference as f}from"../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBuffer as v}from"../../geometry/projection/projectBuffer.js";import{earth as _}from"../../geometry/support/Ellipsoid.js";import{videoMetadataEntryId as A}from"./videoUtils.js";const M=Math.PI/180;let V=class extends e{constructor(t){super(),this.averageElevation=0,this.imageHeight=0,this.imageWidth=0,this.metadataSupportsTransforms=!1,this.platformHeadingAngle=0,this.platformPitchAngle=0,this.platformRollAngle=0,this.sensorHeadingAngle=0,this.sensorAltitude=0,this.sensorHorizontalFieldOfView=0,this.sensorLatitude=0,this.sensorLongitude=0,this.sensorPitchAngle=0,this.sensorRollAngle=0,this.sensorVerticalFieldOfView=0,this.vttMetadata=new Map,this._createMat3FromValues=t=>{const e=t[0],o=t[1],s=t[2];return i(e[0],o[0],s[0],e[1],o[1],s[1],e[2],o[2],s[2])},this._multiplyMat3=(t,e)=>{const o=a();return n(o,t,e),o},this._transposeMat3=t=>{const e=a();return h(e,t),e},this._calculateCameraFovForward=()=>this._createMat3FromValues([[0,0,1],[Math.tan(.5*this.sensorHorizontalFieldOfView*M),0,0],[0,Math.tan(.5*this.sensorVerticalFieldOfView*M),0]]),this._calculateCameraFovReverse=()=>this._createMat3FromValues([[0,1/Math.tan(.5*this.sensorHorizontalFieldOfView*M),0],[0,0,1/Math.tan(.5*this.sensorVerticalFieldOfView*M)],[1,0,0]]),this._calculateCameraLook=()=>this._getRotationMatrixZYX(this.sensorHeadingAngle*M,this.sensorPitchAngle*M,this.sensorRollAngle*M),this._calculateImageDimensionsForward=()=>this._createMat3FromValues([[2/this.imageWidth,0,-1],[0,-2/this.imageHeight,-1],[0,0,1]]),this._calculateImageDimensionsReverse=()=>this._createMat3FromValues([[this.imageWidth/2,0,this.imageWidth/2],[0,-this.imageHeight/2,-this.imageHeight/2],[0,0,1]]),this._calculatePlatformPositionMatrix=()=>{const t=Math.sin(this.sensorLatitude*M),e=Math.cos(this.sensorLatitude*M),o=Math.sin(this.sensorLongitude*M),s=Math.cos(this.sensorLongitude*M);return this._createMat3FromValues([[-t*s,-o,-e*s],[-t*o,s,-e*o],[e,0,-t]])},this._calculatePlatformOrientation=()=>this._getRotationMatrixZYX(this.platformHeadingAngle*M,this.platformPitchAngle*M,this.platformRollAngle*M),this._extractValues=t=>{this.imageWidth=t.get(A.EsriVideoWidth)?.value,this.imageHeight=t.get(A.EsriVideoHeight)?.value;const e=t.get(A.SensorEllipsoidHeight)?.value;this.sensorAltitude=e??t.get(A.SensorTrueAltitude)?.value,this.sensorLatitude=t.get(A.SensorLatitude)?.value,this.sensorLongitude=t.get(A.SensorLongitude)?.value,this.sensorHeadingAngle=t.get(A.SensorAzimuthAngle)?.value,this.sensorPitchAngle=t.get(A.SensorElevationAngle)?.value,this.sensorRollAngle=t.get(A.SensorRollAngle)?.value,this.sensorHorizontalFieldOfView=t.get(A.SensorHorizontalFOV)?.value,this.sensorVerticalFieldOfView=t.get(A.SensorVerticalFOV)?.value,this.platformHeadingAngle=t.get(A.PlatformHeadingAngle)?.value,this.platformPitchAngle=t.get(A.PlatformPitchAngle)?.value,this.platformRollAngle=t.get(A.PlatformRollAngle)?.value,this.averageElevation=t.get(A.FrameCenterElevation)?.value||0},this._getRotationMatrixZYX=(t,e,o)=>{const s=Math.cos(t),i=Math.sin(t),a=Math.cos(e),r=Math.sin(e),l=Math.cos(o),n=Math.sin(o);return this._createMat3FromValues([[s*a,s*r*n-l*i,i*n+s*l*r],[a*i,s*l+i*r*n,l*i*r-s*n],[-r,a*n,a*l]])},this._initCameraSensor=()=>{const t=this._calculateCameraFovForward(),e=this._calculateCameraFovReverse(),o=this._calculateCameraLook(),s=this._calculateImageDimensionsForward(),i=this._calculateImageDimensionsReverse(),a=this._calculatePlatformPositionMatrix(),r=this._calculatePlatformOrientation(),l=this._multiplyMat3(this._multiplyMat3(a,r),o);this._imageToEarthTransform=this._multiplyMat3(this._multiplyMat3(l,t),s);const n=this._multiplyMat3(i,e);this._earthToImageTransform=this._multiplyMat3(n,this._transposeMat3(l)),this._platformPositionEcef=this._projectPointToECEF(this.sensorLongitude,this.sensorLatitude,this.sensorAltitude||this.averageElevation)},this._metadataSupportsTransforms=t=>{if(!t?.size)return!1;const e=t.get(A.EsriVideoWidth)?.value??0,o=t.get(A.EsriVideoHeight)?.value??0;if(e<=0||o<=0)return!1;const s=t.get(A.SensorEllipsoidHeight)?.value,i=t.get(A.SensorTrueAltitude)?.value,a=t.get(A.SensorLatitude)?.value,r=t.get(A.SensorLongitude)?.value;if(null==s&&null==i||null==a||null==r)return!1;const l=t.get(A.PlatformHeadingAngle)?.value,n=t.get(A.PlatformPitchAngle)?.value,h=t.get(A.PlatformRollAngle)?.value;if(null==l||null==n||null==h)return!1;const m=t.get(A.SensorHorizontalFOV)?.value,g=t.get(A.SensorVerticalFOV)?.value;if(null==m||null==g)return!1;const u=t.get(A.SensorAzimuthAngle)?.value,c=t.get(A.SensorElevationAngle)?.value,p=t.get(A.SensorRollAngle)?.value;return null!=u&&null!=c&&null!=p},this._projectPointToECEF=(t,e,o)=>{const s=[];return v([t,e,o],d.WGS84,0,s,f,0),new p({x:s[0],y:s[1],z:s[2],spatialReference:f})},this._projectImageVectorToEllipsoid=(t,e)=>{const o=_.semiMajorAxis+e,s=_.semiMinorAxis+e,i=s/o,a=o/s,{x:n,y:h,z:u}=this._platformPositionEcef,c=u??this.averageElevation,p=r(n,h,a*c),d=m(t,t),f=m(t,p),v=m(p,p)-o*o,A=(-f-Math.sqrt(f*f-d*v))/d;if(A<0)return[NaN,NaN,NaN];const M=l();return g(M,p,t,A),M[2]=M[2]*i,M};const e=t?.videoMetadata;this.updateSensorModel(e)}updateSensorModel(t){t?.size&&(this._set("metadataSupportsTransforms",this._metadataSupportsTransforms(t)),this.metadataSupportsTransforms&&(this._extractValues(t),this._initCameraSensor()))}transformGeoToImage(t,e,o){const s=this._platformPositionEcef;if(!s)return[0,0];const{x:i,y:a,z:n}=s,h=r(i,a,n),m=this._projectPointToECEF(t,e,o||this.averageElevation),g=l(),p=r(m.x,m.y,m.z);u(g,p,h),c(g,g,this._earthToImageTransform);const d=g[0],f=g[1],v=g[2];let _=r(NaN,NaN,NaN);return isNaN(v)||(_=r(d/v,f/v,v/v)),[_[0],_[1]]}transformImageToGeo(t,e){const o=r(t,e,1),s=l();c(s,o,this._imageToEarthTransform);const i=this._projectImageVectorToEllipsoid(s,this.averageElevation);let a;if(!isNaN(i[0])){const t=[];v([i[0],i[1],i[2]],f,0,t,d.WGS84,0),a=new p({x:t[0],y:t[1],z:t[2],spatialReference:d.WGS84})}return a}};t([o()],V.prototype,"averageElevation",void 0),t([o()],V.prototype,"imageHeight",void 0),t([o()],V.prototype,"imageWidth",void 0),t([o({readOnly:!0})],V.prototype,"metadataSupportsTransforms",void 0),t([o()],V.prototype,"platformHeadingAngle",void 0),t([o()],V.prototype,"platformPitchAngle",void 0),t([o()],V.prototype,"platformRollAngle",void 0),t([o()],V.prototype,"sensorHeadingAngle",void 0),t([o()],V.prototype,"sensorAltitude",void 0),t([o()],V.prototype,"sensorHorizontalFieldOfView",void 0),t([o()],V.prototype,"sensorLatitude",void 0),t([o()],V.prototype,"sensorLongitude",void 0),t([o()],V.prototype,"sensorPitchAngle",void 0),t([o()],V.prototype,"sensorRollAngle",void 0),t([o()],V.prototype,"sensorVerticalFieldOfView",void 0),t([o()],V.prototype,"vttMetadata",void 0),V=t([s("esri.layers.video.VideoCameraSensorModel")],V);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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{
|
|
5
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import i from"./TraceConfiguration.js";let n=class extends(e(i)){constructor(t){super(t),this.filterBarriers=[],this.arcadeExpressionBarrier=null,this.circuitName=null,this.domainNetworkName=null,this.filterBitsetNetworkAttributeName=null,this.filterFunctionBarriers=[],this.filterScope=null,this.includeContainers=null,this.includeContent=null,this.includeIsolated=null,this.includeStructures=null,this.allowIndeterminateFlow=null,this.includeUpToFirstSpatialContainer=null,this.inferConnectivity=null,this.maxHops=null,this.nearestNeighbor=null,this.numPaths=null,this.outputFilterCategories=[],this.outputFilters=[],this.propagators=[],this.subnetworkName=null,this.targetTierName=null,this.diagramTemplateName=null,this.tierName=null,this.validateLocatability=null}};t([o({type:[Object],json:{write:!0}})],n.prototype,"filterBarriers",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"arcadeExpressionBarrier",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"circuitName",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"domainNetworkName",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"filterBitsetNetworkAttributeName",void 0),t([o({type:[Object],json:{write:!0}})],n.prototype,"filterFunctionBarriers",void 0),t([o({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],n.prototype,"filterScope",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"includeContainers",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"includeContent",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"includeIsolated",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"includeStructures",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"allowIndeterminateFlow",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"includeUpToFirstSpatialContainer",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"inferConnectivity",void 0),t([o({type:Number,json:{write:!0}})],n.prototype,"maxHops",void 0),t([o({type:Object,json:{write:!0}})],n.prototype,"nearestNeighbor",void 0),t([o({type:Number,json:{write:!0}})],n.prototype,"numPaths",void 0),t([o({type:[Object],json:{write:!0}})],n.prototype,"outputFilterCategories",void 0),t([o({type:[Object],json:{write:!0}})],n.prototype,"outputFilters",void 0),t([o({type:[Object],json:{write:!0}})],n.prototype,"propagators",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"subnetworkName",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"targetTierName",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"diagramTemplateName",void 0),t([o({type:String,json:{write:!0}})],n.prototype,"tierName",void 0),t([o({type:Boolean,json:{write:!0}})],n.prototype,"validateLocatability",void 0),n=t([r("esri.networks.support.UNTraceConfiguration")],n);const s=n;export{s as default};
|
package/package.json
CHANGED
package/popup/ExpressionInfo.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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{JSONSupport as t}from"../core/JSONSupport.js";import{property as e}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";var s;let p=s=class extends t{constructor(r){super(r),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new s({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};r([e({type:String,json:{write:!0}})],p.prototype,"name",void 0),r([e({type:String,json:{write:!0}})],p.prototype,"title",void 0),r([e({type:String,json:{write:!0}})],p.prototype,"expression",void 0),r([e({type:["string","number"],json:{write:!0}})],p.prototype,"returnType",void 0),p=s=r([o("esri.popup.ExpressionInfo")],p);export{
|
|
5
|
+
import{__decorate as r}from"tslib";import{JSONSupport as t}from"../core/JSONSupport.js";import{property as e}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";var s;let p=s=class extends t{constructor(r){super(r),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new s({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};r([e({type:String,json:{write:!0}})],p.prototype,"name",void 0),r([e({type:String,json:{write:!0}})],p.prototype,"title",void 0),r([e({type:String,json:{write:!0}})],p.prototype,"expression",void 0),r([e({type:["string","number"],json:{write:!0}})],p.prototype,"returnType",void 0),p=s=r([o("esri.popup.ExpressionInfo")],p);const i=p;export{i as default};
|
package/popup/FieldInfo.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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../core/Clonable.js";import{JSONMap as e}from"../core/jsonMap.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{enumeration as i}from"../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{fieldInfoFormatFromFieldFormat as a,fieldFormatFromFieldInfoFormat as n,formatTypes as m}from"../layers/support/fieldFormatUtils.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../core/Clonable.js";import{JSONMap as e}from"../core/jsonMap.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{enumeration as i}from"../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{fieldInfoFormatFromFieldFormat as a,fieldFormatFromFieldInfoFormat as n,formatTypes as m}from"../layers/support/fieldFormatUtils.js";import c from"./support/FieldInfoFormat.js";let d=class extends(o(r)){constructor(t){super(t),this.fieldName=null,this.isEditable=!0,this.label=null,this.statisticType=null,this.stringFieldOption="text-box",this.tooltip=null,this.visible=!0}set fieldFormat(t){this._set("fieldFormat",t),this._set("format",t?a(t):null)}set format(t){this._set("format",t),this._set("fieldFormat",t?n(t):null)}readFormat(t,o){if(!o.fieldFormat)return t?c.fromJSON(t):null}clone(){const t=super.clone();return t._set("format",this.format?.clone()),t._set("fieldFormat",this.fieldFormat?.clone()),t}};t([s({value:null,clonable:!1,types:m,json:{write:{overridePolicy(t,o,e){const{fieldName:r}=this;return{enabled:!!r&&!r.startsWith("expression/")&&!r.startsWith("relationships/")&&!!e?.writeFieldFormat}}}}})],d.prototype,"fieldFormat",null),t([s({type:String,json:{write:!0}})],d.prototype,"fieldName",void 0),t([s({value:null,clonable:!1,type:c,json:{write:!0}})],d.prototype,"format",null),t([l("format")],d.prototype,"readFormat",null),t([s({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],d.prototype,"isEditable",void 0),t([s({type:String,json:{write:!0}})],d.prototype,"label",void 0),t([s({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],d.prototype,"statisticType",void 0),t([i(new e({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],d.prototype,"stringFieldOption",void 0),t([s({type:String,json:{write:!0}})],d.prototype,"tooltip",void 0),t([s({type:Boolean,json:{write:!0}})],d.prototype,"visible",void 0),d=t([p("esri.popup.FieldInfo")],d);const f=d;export{f 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"./Content.js";import p from"../support/AttachmentsOrderByInfo.js";let i=class extends(o(s)){constructor(t){super(t),this.attachmentKeywords=null,this.attachmentTypes=null,this.description=null,this.displayType="auto",this.orderByFields=null,this.title=null,this.type="attachments"}};t([e({type:[String],json:{write:!0}})],i.prototype,"attachmentKeywords",void 0),t([e({type:[["application","audio","image","model","text","video"]],json:{write:!0}})],i.prototype,"attachmentTypes",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"description",void 0),t([e({type:["auto","preview","list"],json:{write:!0}})],i.prototype,"displayType",void 0),t([e({type:[p],json:{write:!0}})],i.prototype,"orderByFields",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"title",void 0),t([e({type:["attachments"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],i.prototype,"type",void 0),i=t([r("esri.popup.content.AttachmentsContent")],i);export{
|
|
5
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"./Content.js";import p from"../support/AttachmentsOrderByInfo.js";let i=class extends(o(s)){constructor(t){super(t),this.attachmentKeywords=null,this.attachmentTypes=null,this.description=null,this.displayType="auto",this.orderByFields=null,this.title=null,this.type="attachments"}};t([e({type:[String],json:{write:!0}})],i.prototype,"attachmentKeywords",void 0),t([e({type:[["application","audio","image","model","text","video"]],json:{write:!0}})],i.prototype,"attachmentTypes",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"description",void 0),t([e({type:["auto","preview","list"],json:{write:!0}})],i.prototype,"displayType",void 0),t([e({type:[p],json:{write:!0}})],i.prototype,"orderByFields",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"title",void 0),t([e({type:["attachments"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],i.prototype,"type",void 0),i=t([r("esri.popup.content.AttachmentsContent")],i);const n=i;export{n 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import e from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as s}from"./support/chartMediaInfoUtils.js";var a;let i=a=class extends e{constructor(r){super(r),this.type="bar-chart"}clone(){return new a({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};r([t({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:{writer:s.write,isRequired:!0}}})],i.prototype,"type",void 0),i=a=r([o("esri.popup.content.BarChartMediaInfo")],i);export{
|
|
5
|
+
import{__decorate as r}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import e from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as s}from"./support/chartMediaInfoUtils.js";var a;let i=a=class extends e{constructor(r){super(r),this.type="bar-chart"}clone(){return new a({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};r([t({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:{writer:s.write,isRequired:!0}}})],i.prototype,"type",void 0),i=a=r([o("esri.popup.content.BarChartMediaInfo")],i);const p=i;export{p 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import e from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as s}from"./support/chartMediaInfoUtils.js";var i;let p=i=class extends e{constructor(t){super(t),this.type="column-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};t([r({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:{writer:s.write,isRequired:!0}}})],p.prototype,"type",void 0),p=i=t([o("esri.popup.content.ColumnChartMediaInfo")],p);export{
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import e from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as s}from"./support/chartMediaInfoUtils.js";var i;let p=i=class extends e{constructor(t){super(t),this.type="column-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};t([r({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:{writer:s.write,isRequired:!0}}})],p.prototype,"type",void 0),p=i=t([o("esri.popup.content.ColumnChartMediaInfo")],p);const a=p;export{a as default};
|
package/popup/content/Content.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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(o){super(o),this.type=null}};o([r({type:["attachments","custom","fields","media","text","expression","relationship","utility-network-associations"],readOnly:!0,json:{read:!1,write:!0}})],s.prototype,"type",void 0),s=o([e("esri.popup.content.Content")],s);export{
|
|
5
|
+
import{__decorate as o}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(o){super(o),this.type=null}};o([r({type:["attachments","custom","fields","media","text","expression","relationship","utility-network-associations"],readOnly:!0,json:{read:!1,write:!0}})],s.prototype,"type",void 0),s=o([e("esri.popup.content.Content")],s);const p=s;export{p 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{clone as
|
|
5
|
+
import{__decorate as o}from"tslib";import{clone as t}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import s from"./Content.js";var p;let i=p=class extends s{constructor(o){super(o),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new p({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?t(this.outFields):null})}};o([r()],i.prototype,"creator",void 0),o([r()],i.prototype,"destroyer",void 0),o([r()],i.prototype,"outFields",void 0),o([r({type:["custom"],readOnly:!0})],i.prototype,"type",void 0),i=p=o([e("esri.popup.content.CustomContent")],i);const c=i;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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"../ElementExpressionInfo.js";import t from"./Content.js";var p;let n=p=class extends t{constructor(o){super(o),this.expressionInfo=null,this.type="expression"}clone(){return new p({expressionInfo:this.expressionInfo?.clone()})}};o([e({type:s,json:{write:!0}})],n.prototype,"expressionInfo",void 0),o([e({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],n.prototype,"type",void 0),n=p=o([r("esri.popup.content.ExpressionContent")],n);export{
|
|
5
|
+
import{__decorate as o}from"tslib";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"../ElementExpressionInfo.js";import t from"./Content.js";var p;let n=p=class extends t{constructor(o){super(o),this.expressionInfo=null,this.type="expression"}clone(){return new p({expressionInfo:this.expressionInfo?.clone()})}};o([e({type:s,json:{write:!0}})],n.prototype,"expressionInfo",void 0),o([e({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],n.prototype,"type",void 0),n=p=o([r("esri.popup.content.ExpressionContent")],n);const i=n;export{i 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{clone as
|
|
5
|
+
import{__decorate as t}from"tslib";import{clone as o}from"../../core/lang.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import i from"../FieldInfo.js";import s from"./Content.js";var p;let n=p=class extends s{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}clone(){return new p(o({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};t([e({type:Object,json:{write:!0}})],n.prototype,"attributes",void 0),t([e({type:String,json:{write:!0}})],n.prototype,"description",void 0),t([e({type:[i],json:{write:!0}})],n.prototype,"fieldInfos",void 0),t([e({type:String,json:{write:!0}})],n.prototype,"title",void 0),t([e({type:["fields"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],n.prototype,"type",void 0),n=p=t([r("esri.popup.content.FieldsContent")],n);const l=n;export{l 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import o from"./mixins/MediaInfo.js";import s from"./support/ImageMediaInfoValue.js";var i;let p=i=class extends o{constructor(e){super(e),this.refreshInterval=0,this.type="image",this.value=void 0}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?.clone()})}};e([r({type:Number,json:{write:!0}})],p.prototype,"refreshInterval",void 0),e([r({type:["image"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),e([r({type:s,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),p=i=e([t("esri.popup.content.ImageMediaInfo")],p);export{
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import o from"./mixins/MediaInfo.js";import s from"./support/ImageMediaInfoValue.js";var i;let p=i=class extends o{constructor(e){super(e),this.refreshInterval=0,this.type="image",this.value=void 0}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?.clone()})}};e([r({type:Number,json:{write:!0}})],p.prototype,"refreshInterval",void 0),e([r({type:["image"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),e([r({type:s,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),p=i=e([t("esri.popup.content.ImageMediaInfo")],p);const a=p;export{a 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import o from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import o from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as s}from"./support/chartMediaInfoUtils.js";var i;let p=i=class extends o{constructor(t){super(t),this.type="line-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};t([r({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:{writer:s.write,isRequired:!0}}})],p.prototype,"type",void 0),p=i=t([e("esri.popup.content.LineChartMediaInfo")],p);const a=p;export{a 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{clone as o}from"../../core/lang.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{reader as r}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import p from"./BarChartMediaInfo.js";import a from"./ColumnChartMediaInfo.js";import n from"./Content.js";import d from"./ImageMediaInfo.js";import m from"./LineChartMediaInfo.js";import f from"./PieChartMediaInfo.js";import{types as c}from"./support/mediaInfoTypes.js";var l;let u=l=class extends n{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map(t=>"image"===t.type?d.fromJSON(t):"barchart"===t.type?p.fromJSON(t):"columnchart"===t.type?a.fromJSON(t):"linechart"===t.type?m.fromJSON(t):"piechart"===t.type?f.fromJSON(t):void 0).filter(Boolean)}writeMediaInfos(t,o){o.mediaInfos=t&&t.map(t=>t.toJSON())}clone(){return new l(o({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};t([e()],u.prototype,"activeMediaInfoIndex",void 0),t([e({type:Object,json:{write:!0}})],u.prototype,"attributes",void 0),t([e({type:String,json:{write:!0}})],u.prototype,"description",void 0),t([e({types:[c]})],u.prototype,"mediaInfos",void 0),t([r("mediaInfos")],u.prototype,"readMediaInfos",null),t([s("mediaInfos")],u.prototype,"writeMediaInfos",null),t([e({type:String,json:{write:!0}})],u.prototype,"title",void 0),t([e({type:["media"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],u.prototype,"type",void 0),u=l=t([i("esri.popup.content.MediaContent")],u);export{
|
|
5
|
+
import{__decorate as t}from"tslib";import{clone as o}from"../../core/lang.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{reader as r}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import p from"./BarChartMediaInfo.js";import a from"./ColumnChartMediaInfo.js";import n from"./Content.js";import d from"./ImageMediaInfo.js";import m from"./LineChartMediaInfo.js";import f from"./PieChartMediaInfo.js";import{types as c}from"./support/mediaInfoTypes.js";var l;let u=l=class extends n{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map(t=>"image"===t.type?d.fromJSON(t):"barchart"===t.type?p.fromJSON(t):"columnchart"===t.type?a.fromJSON(t):"linechart"===t.type?m.fromJSON(t):"piechart"===t.type?f.fromJSON(t):void 0).filter(Boolean)}writeMediaInfos(t,o){o.mediaInfos=t&&t.map(t=>t.toJSON())}clone(){return new l(o({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};t([e()],u.prototype,"activeMediaInfoIndex",void 0),t([e({type:Object,json:{write:!0}})],u.prototype,"attributes",void 0),t([e({type:String,json:{write:!0}})],u.prototype,"description",void 0),t([e({types:[c]})],u.prototype,"mediaInfos",void 0),t([r("mediaInfos")],u.prototype,"readMediaInfos",null),t([s("mediaInfos")],u.prototype,"writeMediaInfos",null),t([e({type:String,json:{write:!0}})],u.prototype,"title",void 0),t([e({type:["media"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],u.prototype,"type",void 0),u=l=t([i("esri.popup.content.MediaContent")],u);const I=u;export{I 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import o from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import o from"./mixins/ChartMediaInfo.js";import{chartTypeKebabDict as s}from"./support/chartMediaInfoUtils.js";var i;let p=i=class extends o{constructor(t){super(t),this.type="pie-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};t([r({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:{writer:s.write,isRequired:!0}}})],p.prototype,"type",void 0),p=i=t([e("esri.popup.content.PieChartMediaInfo")],p);const a=p;export{a 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{Integer as r}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{Integer as r}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import s from"./Content.js";import p from"../support/RelatedRecordsInfoFieldOrder.js";let n=class extends(o(s)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};t([e({type:String,json:{write:!0}})],n.prototype,"description",void 0),t([e({type:Number,json:{type:r,write:!0}})],n.prototype,"displayCount",void 0),t([e({type:["list"],json:{write:{isRequired:!0}}})],n.prototype,"displayType",void 0),t([e({type:[p],json:{write:!0}})],n.prototype,"orderByFields",void 0),t([e({type:Number,json:{type:r,write:{isRequired:!0}}})],n.prototype,"relationshipId",void 0),t([e({type:String,json:{write:!0}})],n.prototype,"title",void 0),t([e({type:["relationship"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],n.prototype,"type",void 0),n=t([i("esri.popup.content.RelationshipContent")],n);const l=n;export{l 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{property as
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import r from"./Content.js";var s;let p=s=class extends r{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new s({text:this.text})}};t([o({type:String,json:{write:!0}})],p.prototype,"text",void 0),t([o({type:["text"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),p=s=t([e("esri.popup.content.TextContent")],p);const i=p;export{i 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{Integer as s}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import p from"./Content.js";import n from"../support/UtilityNetworkAssociationType.js";let c=class extends(t(p)){constructor(o){super(o),this.description=null,this.displayCount=null,this.title=null,this.associationTypes=[],this.type="utility-network-associations"}};o([r({type:String,json:{write:!0}})],c.prototype,"description",void 0),o([r({type:Number,json:{type:s,write:!0}})],c.prototype,"displayCount",void 0),o([r({type:String,json:{write:!0}})],c.prototype,"title",void 0),o([r({type:[n],json:{write:!0}})],c.prototype,"associationTypes",void 0),o([i({utilityNetworkAssociations:"utility-network-associations"})],c.prototype,"type",void 0),c=o([e("esri.popup.content.UtilityNetworkAssociationsContent")],c);export{
|
|
5
|
+
import{__decorate as o}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{Integer as s}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import p from"./Content.js";import n from"../support/UtilityNetworkAssociationType.js";let c=class extends(t(p)){constructor(o){super(o),this.description=null,this.displayCount=null,this.title=null,this.associationTypes=[],this.type="utility-network-associations"}};o([r({type:String,json:{write:!0}})],c.prototype,"description",void 0),o([r({type:Number,json:{type:s,write:!0}})],c.prototype,"displayCount",void 0),o([r({type:String,json:{write:!0}})],c.prototype,"title",void 0),o([r({type:[n],json:{write:!0}})],c.prototype,"associationTypes",void 0),o([i({utilityNetworkAssociations:"utility-network-associations"})],c.prototype,"type",void 0),c=o([e("esri.popup.content.UtilityNetworkAssociationsContent")],c);const a=c;export{a 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as
|
|
5
|
+
import{__decorate as o}from"tslib";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import e from"./MediaInfo.js";import s from"../support/ChartMediaInfoValue.js";let p=class extends e{constructor(o){super(o),this.type=null,this.value=void 0}};o([r({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],p.prototype,"type",void 0),o([r({type:s,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),p=o([t("esri.popup.content.mixins.ChartMediaInfo")],p);const i=p;export{i 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";let p=class extends o{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};t([r({type:String,json:{write:!0}})],p.prototype,"altText",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"caption",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"title",void 0),t([r({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],p.prototype,"type",void 0),p=t([e("esri.popup.content.mixins.MediaInfo")],p);export{
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";let p=class extends o{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};t([r({type:String,json:{write:!0}})],p.prototype,"altText",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"caption",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"title",void 0),t([r({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],p.prototype,"type",void 0),p=t([e("esri.popup.content.mixins.MediaInfo")],p);const i=p;export{i as default};
|
package/popup/content.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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"./content/AttachmentsContent.js";import n from"./content/Content.js";export{default as CustomContent}from"./content/CustomContent.js";import
|
|
5
|
+
import t from"./content/AttachmentsContent.js";import n from"./content/Content.js";export{default as CustomContent}from"./content/CustomContent.js";import o from"./content/ExpressionContent.js";import e from"./content/FieldsContent.js";import i from"./content/MediaContent.js";import s from"./content/RelationshipContent.js";import r from"./content/TextContent.js";import m from"./content/UtilityNetworkAssociationsContent.js";function p(t){return t instanceof n}const a={base:null,key:"type",typeMap:{attachment:t,media:i,text:r,expression:o,field:e,relationship:s,utilityNetworkAssociations:m}},c={base:null,key:"type",typeMap:{attachment:t,media:i,text:r,expression:o,field:e,relationship:s}};export{t as AttachmentsContent,n as BaseContent,o as ExpressionContent,e as FieldsContent,i as MediaContent,s as RelationshipContent,r as TextContent,m as UtilityNetworkAssociationsContent,p as isContent,a as persistableTypes,c as persistableWebSceneTypes};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{Integer as p}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{dateFormatJSONMap as i}from"../../intl/date.js";let c=class extends(r(t)){constructor(o){super(o),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};o([s(i)],c.prototype,"dateFormat",void 0),o([e({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),o([e({type:p,json:{write:!0}})],c.prototype,"places",void 0),c=o([a("esri.popup.support.FieldInfoFormat")],c);export{
|
|
5
|
+
import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{Integer as p}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{dateFormatJSONMap as i}from"../../intl/date.js";let c=class extends(r(t)){constructor(o){super(o),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};o([s(i)],c.prototype,"dateFormat",void 0),o([e({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),o([e({type:p,json:{write:!0}})],c.prototype,"places",void 0),c=o([a("esri.popup.support.FieldInfoFormat")],c);const m=c;export{m 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{parse as t}from"../../layers/support/arcgisLayerUrl.js";import{fetchFeatureService as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as a}from"../../layers/support/LayerLoadContext.js";import{applyPreferredHostToPortalItem as o,getPreferredHost as n,isPreferredUrlApplicable as s}from"../../layers/support/layerUtils.js";import l from"../Portal.js";import{createForItemRead as i}from"./jsonContext.js";import{instanceTypeToLayerTypes as p,getSublayersByLayerType as u,getFirstLayerOrTable as c,preprocessFSItemData as y,populateSceneServiceItemData as d,getNumLayersAndTables as f,layerTypeToLayerModuleType as m,createSublayerData as w}from"./loadUtils.js";import{hasTypeKeyword as h}from"./portalItemUtils.js";import{loadStyleRenderer as g}from"../../renderers/support/styleUtils.js";import{
|
|
5
|
+
import e from"../../core/Error.js";import{parse as t}from"../../layers/support/arcgisLayerUrl.js";import{fetchFeatureService as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as a}from"../../layers/support/LayerLoadContext.js";import{applyPreferredHostToPortalItem as o,getPreferredHost as n,isPreferredUrlApplicable as s}from"../../layers/support/layerUtils.js";import l from"../Portal.js";import{createForItemRead as i}from"./jsonContext.js";import{instanceTypeToLayerTypes as p,getSublayersByLayerType as u,getFirstLayerOrTable as c,preprocessFSItemData as y,populateSceneServiceItemData as d,getNumLayersAndTables as f,layerTypeToLayerModuleType as m,createSublayerData as w}from"./loadUtils.js";import{hasTypeKeyword as h}from"./portalItemUtils.js";import{loadStyleRenderer as g}from"../../renderers/support/styleUtils.js";import{requestServiceJSON as I}from"../../request/serviceJSON.js";async function b(e,t){const r=e.instance.portalItem;if(r?.id)return await r.load(t),v(e),e.validateItem&&e.validateItem(r),L(e,t)}function v(t){const r=t.instance.portalItem;if(!r?.type||!t.supportedTypes.includes(r.type))throw new e("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r?.type,expectedType:t.supportedTypes.join(", ")})}async function L(e,t){const r=e.instance,o=r.portalItem;if(!o)return;let{url:n}=o;const{title:s}=o,l=i(o,"portal-item");if("group"===r.type)return S(r,l,e);n&&"media"!==r.type&&r.read({url:n},l);const p=new a,{data:u,preferredHost:c}=await x(e,p,t);return n=o.url,"isUrlHostModified"in r&&(c?r.applyPreferredHost({preferredHost:c}):r.applyHostFromPortalItem()),u&&r.read(u,l),r.resourceReferences={portalItem:o,paths:l.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:s},l),g(r,l)}async function S(t,r,a){const o=t.portalItem;if(!t.sourceIsPortalItem)return;const{title:n,type:s}=o;if("Group Layer"===s){if(!h(o,"Map"))throw new e("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return T(t,a)}return t.read({title:n},r),j(t,a)}async function T(t,r){const a=t.portalItem,o=await a.fetchData("json");if(!o)return;if(!r.populateGroupLayer)throw new e("portal:missing-populate-group-layer","Missing populate group layer");const n=i(a,"web-map");t.read(o,n),await r.populateGroupLayer(t,o,{context:n}),t.resourceReferences={portalItem:a,paths:n.readResourcePaths??[]}}async function j(t,r){let n;const{portalItem:s}=t;if(!s)return;const l=s.type,i=r.layerModuleTypeMap;if(!i)throw new e("portal:missing-layer-module-type-map","Layer module type map is required to construct sub layers");switch(l){case"Feature Service":case"Feature Collection":n=i.FeatureLayer;break;case"Stream Service":n=i.StreamLayer;break;case"Scene Service":n=i.SceneLayer;break;case"Video Service":n=i.VideoLayer;break;default:throw new e("portal:unsupported-item-type-as-group",`The item type '${l}' is not supported as a 'GroupLayer'`)}const p="Video Service"===l,u=new a;let[m,{data:w}]=await Promise.all([n(),p?{data:null}:x(r,u)]),h=()=>m;if(p)return H(t,h,i);if("Feature Service"===l){const e=c(w)?.customParameters;w=s.url?(await y(w,s.url,u)).data:{},h=await E(w,i)||h;const{provider:r,preferredHost:a}=await U(s.url,{customParameters:e,loadContext:u});return o(s,a),await M(t,h,h,w,i,r)}return"Scene Service"===l&&s.url&&(w=await d(s,w,u)),f(w)>0?await M(t,h,null,w,i):await F(t,h,i)}async function F(e,t,r){const{portalItem:a}=e;if(!a?.url)return;const o=await I(a.url);o&&M(e,t,null,{layers:o.layers?.map(w),tables:o.tables?.map(w)},r)}async function H(e,t,r){const{portalItem:a}=e;if(!a?.url)return;const o=await I(a.url);o&&M(e,t,null,{layers:o.layers?.map(({id:e,name:t})=>({id:e,name:t}))},r)}async function M(e,t,r,a,o,n){let s=a.layers||[];const l=a.tables||[];if("Feature Collection"===e.portalItem?.type?(s.forEach((e,t)=>{e.id=t,"Table"===e?.layerDefinition?.type&&l.push(e)}),s=s.filter(e=>"Table"!==e?.layerDefinition?.type)):(s.reverse(),l.reverse()),s.forEach(r=>{const o=n?.(r);if(o||!n){const n=P(e,t(r),a,r,o);e.add(n)}}),l.length){const t=r?null:await o.FeatureLayer();l.forEach(o=>{const s=n?.(o);if(s||!n){const n=P(e,r?r(o):t,a,o,s);e.tables.add(n)}})}}function P(e,t,r,a,o){const n=e.portalItem,s={portalItem:n.clone(),layerId:a.id};null!=a.url&&(s.url=a.url);const i=new t(s);if("sourceJSON"in i&&(i.sourceJSON=o),"subtype-group"!==i.type&&"catalog"!==i.type&&(i.sublayerTitleMode="service-name"),"Feature Collection"===n.type){const e={origin:"portal-item",portal:n.portal||l.getDefault()};i.read(a,e);const t=r.showLegend;null!=t&&i.read({showLegend:t},e)}return i}async function x(e,t,r){if(!1===e.supportsData)return{data:void 0};const a=e.instance,n=a.portalItem;if(!n)return{data:void 0};let s=null;try{s=await n.fetchData("json",r)}catch(l){}if(C(a)){let e=null;const{count:r,preferredHost:l}=await G(n,s,t);if(o(n,l),(s?.layers||s?.tables)&&r>0){if(null==a.layerId){const e=p(a.type),t=e?.length?u(s,e)[0]:c(s);t&&(a.layerId=t.id)}e=k(s,a),"OrientedImageryLayer"===e?.layerType&&"oriented-imagery"===a.type&&a.supportedSourceTypes.add("Feature Layer"),e&&null!=s.showLegend&&(e.showLegend=s.showLegend)}return r>1&&"sublayerTitleMode"in a&&"service-name"!==a.sublayerTitleMode&&(a.sublayerTitleMode="item-title-and-service-name"),{data:e,preferredHost:l}}return{data:s}}async function G(e,r,a){if(r?.layers&&r?.tables)return{count:f(r)};const o=t(e.url);if(!o)return{count:1};const l=o.url.path,i=await a.fetchServiceMetadata(l,{customParameters:c(r)?.customParameters}).catch(()=>null);return{count:(r?.layers?.length??i?.layers?.length??0)+(r?.tables?.length??i?.tables?.length??0),preferredHost:s(e)?n():null}}function k(e,t){const{layerId:r}=t,a=e.layers?.find(e=>e.id===r)||e.tables?.find(e=>e.id===r);return a&&D(a,t)?a:null}function C(e){return"stream"!==e.type&&"layerId"in e}function D(e,t){const r="layerType"in e&&e.layerType,{type:a}=t;return!("feature"===a&&r&&"ArcGISFeatureLayer"!==e.layerType||"catalog"===a&&!r||"oriented-imagery"===a&&!r||"subtype-group"===a&&!r)}async function U(e,t){const{layersJSON:a,preferredHost:o}=await r(e,t);if(!a)return{provider:null,preferredHost:o};const n=[...a.layers,...a.tables];return{provider:e=>n.find(t=>t.id===e.id),preferredHost:o}}async function E(e,t){const{layers:r,tables:a}=e,o=[...r??[],...a??[]];if(!o.length)return;const n=new Set,s=[];for(const{layerType:p}of o){const e=p??"ArcGISFeatureLayer";if(n.has(e))continue;n.add(e);const r=t[m(e)];s.push(r())}const l=await Promise.all(s),i=new Map;return Array.from(n).forEach((e,t)=>{i.set(e,l[t])}),({layerType:e})=>{const t=e??"ArcGISFeatureLayer";return i.get(t)}}export{b as load};
|
package/request/cors.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import o from"../config.js";import{getOrigin as s,hasSameOrigin as r,getAppUrl as t,urlToObject as e}from"../core/urlUtils.js";function n(r){o.request.crossOriginNoCorsDomains||(o.request.crossOriginNoCorsDomains={});const t=o.request.crossOriginNoCorsDomains;for(let o of r)o=o.toLowerCase(),/^https?:\/\//.test(o)?t[s(o)??""]=0:(t[s("http://"+o)??""]=0,t[s("https://"+o)??""]=0)}function i(e){const n=o.request.crossOriginNoCorsDomains;if(n){let o=s(e);if(o)return o=o.toLowerCase(),!r(o,t())&&n[o]<Date.now()-36e5}return!1}async function c(r){const t=e(r);r=t.path,"json"===t.query?.f&&(r+="?f=json");try{await fetch(r,{mode:"no-cors",credentials:"include"})}catch{}const n=o.request.crossOriginNoCorsDomains,i=s(r);n&&i&&(n[i.toLowerCase()]=Date.now())}export{i as isNoCorsRequestRequired,n as registerNoCorsDomains,c as sendNoCorsRequest};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{isAborted as e,createAbortError as r}from"../core/promiseUtils.js";function t(t,n,o=!1,i){return new Promise((s,l)=>{if(e(i))return void l(r());let a=()=>{v(),l(new Error(`Unable to load ${n}`))},d=async()=>{const e=t;try{await e.decode()}catch{}v(),s(e)},c=()=>{if(!t)return;const e=t;v(),e.src="",l(r())};const v=()=>{t&&(t.removeEventListener("error",a),t.removeEventListener("load",d),a=null,d=null,t=null,i?.removeEventListener("abort",c),c=null,o&&URL.revokeObjectURL(n))};i?.addEventListener("abort",c),t.addEventListener("error",a),t.addEventListener("load",d)})}export{t as loadImage};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{hasSameOrigin as r,changeHost as t}from"../core/urlUtils.js";import{parse as e}from"../layers/support/arcgisLayerUrl.js";import{isSecureProxyService as o}from"../portal/support/urlUtils.js";const s=new Map;function n(t,n){const p=n?.preferredHost;if(!p||r(t,`https://${p}`,!0))return;const u=e(t);if(!u||"FeatureServer"!==u.serverType||o(t))return;const a=u.url.path.toLowerCase();s.has(a)||s.set(a,p)}function p(r){const o=e(r)?.url.path.toLowerCase();if(!o)return r;const n=s.get(o);return n?t(r,n):r}const u={clear(){s.clear()},get size(){return s.size}};export{u as PreferredHostsTest,p as getPreferredUrl,n as setPreferredHost};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{createAbortError as o,isAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as f,addQueryParameters as h,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{getImageType as O,ImageWithType as C}from"./ImageWithType.js";import{loadImage as x}from"./loadImage.js";import{setPreferredHost as j,getPreferredUrl as v}from"./preferredHosts.js";import{getApiKey as L}from"../support/apiKeyUtils.js";const E="FormData"in globalThis,U=new Set([499,498,403,401]),A=new Set(["COM_0056","COM_0057","SB_0008"]),P=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function H(r){let s,o;await I(r);try{do{[s,o]=await D(r)}while(!await _(r,s,o))}catch(u){const e=z("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&j(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):J,getHeader:s?e=>s.headers.get(e):J,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function I(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(E&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheBust?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const e=L(s);e&&(o.query??={},o.query.token=e,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!B(s)&&!n(a)){let e;"immediate"===o.authMode?(await N(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await N(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function D(r){let s=r.parameters.url,a=v(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},x=u(s)||c(s),j=n.responseType??"json",L="image"===j&&n.imageWithType,U=x?0:null!=n.timeout?n.timeout:e.request.timeout;let A=!1;if(!x){r.useSSL&&(s=d(s));let o={...n.query};r.credentialToken&&(o.token=r.credentialToken);let l=m(o);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=a.length+1+l.length;let c;A="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=f(s);c=t.path,!A&&c.length+1+u>e.request.maxUrlLength&&(A=!0),t.query&&(o={...t.query,...o})}if("HEAD"===k.method&&(A||g)){if(A){if(u>e.request.maxUrlLength)throw z("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw z("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw z("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(A?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=h(s,o):(k.body=m(o),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=h(s,o),g&&(r.useProxy=!0,s=`${c}?${s}`),o.token&&E&&k.body instanceof FormData&&!b(s)&&k.body.set("token",o.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(A?h(s,o):s)),a=v(s)}let P,H,I=0,N=!1;U>0&&(I=setTimeout(()=>{N=!0,r.controller.abort()},U));try{if("native-request-init"===n.responseType)H=k,H.url=a,n.signal?H.signal=n.signal:delete H.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||A||$(n.headers)||!x&&!r.useProxy&&e.request.proxyUrl&&!R(s)){if(await(T.beforeFetch?.(s,k)),P=await T.fetch(a,k),await(T.afterFetch?.(P)),r.useProxy||F(s),"native"===n.responseType)H=P;else if("HEAD"!==k.method)if(P.ok){switch(j){case"array-buffer":H=await P.arrayBuffer();break;case"blob":H=await P.blob();break;case"image":H=await(L?P.arrayBuffer():P.blob());break;default:H=await P.text()}if(I&&(clearTimeout(I),I=0),"json"===j||"xml"===j||"document"===j)if(H)switch(j){case"json":H=JSON.parse(H);break;case"xml":H=W(H,"application/xml");break;case"document":H=W(H,"text/html")}else H=null;if(H){if("array-buffer"===j||"blob"===j){const e=P.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&H["blob"===j?"size":"byteLength"]<=750)try{const e=await new Response(H).json();e.error&&(H=e)}catch{}}if(L&&H instanceof ArrayBuffer){const e=O(H);if("unknown"===e)return n.responseType="image",await D(r);H=await P.blob(),H=await M(URL.createObjectURL(H),r,!0),H=new C(H,e)}"image"===j&&H instanceof Blob&&(H=await M(URL.createObjectURL(H),r,!0))}}else{H=await P.text();try{H=JSON.parse(H)}catch{}}}else H=await M(a,r)}catch(B){if("AbortError"===B.name){if(N)throw X();throw o("Request canceled")}if(!(!P&&B instanceof TypeError&&e.request.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||r.useProxy||R(s))throw B;r.redoRequest=!0,g({proxyUrl:e.request.proxyUrl,urlPrefix:l(s)??""})}finally{I&&clearTimeout(I)}return[P,H]}function M(t,r,s=!1){const o=r.controller.signal,a=new Image;return r.withCredentials?a.crossOrigin="use-credentials":a.crossOrigin="anonymous",a.alt="",a.fetchPriority=e.request.priority,a.src=t,x(a,t,s,o)}function F(e){const t=l(e);t&&!T.corsServers.includes(t)&&T.corsServers.push(t)}function R(e){const t=l(e);return!t||t.endsWith(".arcgis.com")||T.corsServers.includes(t)||i(t)}async function N(){t||await import("../identity/IdentityManager.js")}function B(e){return P.some(t=>t.test(e))}function $(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function W(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function _(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.parameters.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error&&"object"==typeof s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[G]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[G]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&U.has(n)&&!B(e.parameters.url)&&(403!==n||(!i||!A.has(i))&&(null==l||2===l&&e.credentialToken))){await N();try{const r=await t.getCredential(e.parameters.url,{error:z("request:server",a,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function z(e,t,n,i){let l;const u={url:n.url,requestOptions:n.requestOptions,getAllHeaders:J,getHeader:J,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=u,t;if(t){const e=i&&(()=>Array.from(i.headers)),r=i&&(e=>i.headers.get(e)),s=i?.status,o=t.message;o&&(l=o),e&&r&&(u.getAllHeaders=e,u.getHeader=r),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?(u.messages=[t.details],l??=t.details):(u.messages=t.details,l??=u.messages?.[0]),u.raw=G in t?t[G]:t}return l??="Error",a(t)?o():new r(e,l,u)}const G=Symbol(),J=()=>null,K="Timeout exceeded";function X(){return new Error(K)}function Q(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===K}export{z as createRequestError,Q as isTimeoutError,H as processRequest};
|
package/request/queue.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import has from"../core/has.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{isAborted as e,createAbortError as o}from"../core/promiseUtils.js";import{getOrigin as t}from"../core/urlUtils.js";import{isHostedAgolService as s}from"../layers/support/arcgisLayerUrl.js";import{createRequestError as n,processRequest as u}from"./process.js";const c={useQueue:!0,priority:"high"},i={useQueue:!0,priority:"auto"};function p(r){const e=f(r);if(!e)return!1;const o=l.get(e.origin);return o?.full??!1}async function a(t){const s=f(t.parameters.url);if(!s)return null;const{QueueProcessor:c,SharedConcurrency:i}=await import("../core/QueueProcessor.js");return r(l,s.origin,()=>{const r=(s.isHosted?has("request-queue-concurrency-hosted"):has("request-queue-concurrency-non-hosted"))??4;return m??=new i(has("request-queue-concurrency-global")??50),new c({concurrency:r,sharedConcurrency:m,process:r=>{if(e(r.parameters.requestOptions))throw n("",o("Request canceled"),r.parameters);return u(r)}})})}const l=new Map;let m;function f(r){let e,o=!1;return"string"==typeof r?(e=t(r,!0),o=s(r)):(e=r.origin,o=s(r.toString())),null==e?null:new y(e,o)}class y{constructor(r,e){this.origin=r,this.isHosted=e}}export{a as ensureRequestQueue,f as getOriginInfo,p as isRequestQueueFull,i as queueAutoPriority,c as queueHighPriority};
|