@arcgis/core 5.0.0-next.10 → 5.0.0-next.12
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/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
- package/applications/KnowledgeStudio/resourceSerializationUtils.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/092d72caf3269e696d1c.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/8cd03b54b2859b52fb81.js +1 -0
- 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/9978ec6c67e87dc08a1d.js +1 -0
- 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/b193de09e005b0976a6a.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/{4fb5f1c671892001a4fd.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/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +35 -2
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +2 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/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/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.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 +114 -11
- package/kernel.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.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/fieldFormatUtils.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/FeatureUpdateStrategy.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/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.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/flow/geometryUtils.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/CutFillDepth.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/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/fields/TooltipField.js +1 -1
- package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
- package/views/magnifier/resources.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.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/TimeSlider.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/066a0ea67688361e85a5.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/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/57e04e2d8721bbdc029a.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/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/8ce608013b353155ee5a.js +0 -1
- package/assets/esri/core/workers/chunks/8d9d3797c6d62fdfff9d.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/9f21436016ff7a899e79.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/a5a67216e0d0cee95a55.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/d48af7bc06b4bb176534.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/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{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{q as n}from"../../../../../chunks/vec32.js";import{
|
|
5
|
+
import{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{q as n}from"../../../../../chunks/vec32.js";import{ZEROS as l,clone as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{imageToArrayBuffer as d,imageToDataURI as g}from"./imageutils.js";import{isEncodedMeshTexture as x}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as T}from"../../../../../views/webgl/enums.js";const b=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class _{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=2===t.output.buffer||2===t.output.image;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene(e=>{this._addScene(e)}),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode(e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))}),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,l)||(t.translation=c(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=c(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode(e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))}),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=2===t.output.buffer;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),M(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,d=r.addBufferView(T.FLOAT,"VEC3",34962);let g,x,b,_;l&&(g=r.addBufferView(T.FLOAT,"VEC3",34962)),u&&(x=r.addBufferView(T.FLOAT,"VEC2",34962)),c&&(b=r.addBufferView(T.FLOAT,"VEC4",34962)),h&&(_=r.addBufferView(T.FLOAT,"VEC4",34962)),d.startAccessor("POSITION"),g&&g.startAccessor("NORMAL"),x&&x.startAccessor("TEXCOORD_0"),b&&b.startAccessor("TANGENT"),_&&_.startAccessor("COLOR_0");const A=a.position.length/3;for(let f=0;f<A;++f)d.push(n[3*f]),d.push(n[3*f+1]),d.push(n[3*f+2]),g&&null!=l&&(g.push(l[3*f]),g.push(l[3*f+1]),g.push(l[3*f+2])),x&&null!=u&&(x.push(u[2*f]),x.push(u[2*f+1])),b&&null!=c&&(b.push(c[4*f]),b.push(c[4*f+1]),b.push(c[4*f+2]),b.push(c[4*f+3])),_&&null!=h&&(_.push(w(h[4*f]/255)),_.push(w(h[4*f+1]/255)),_.push(w(h[4*f+2]/255)),_.push(h[4*f+3]/255));const O=d.endAccessor(),v=this._addAccessor(d.index,O);let R,N,C,S,I;if(g){const e=g.endAccessor();R=this._addAccessor(g.index,e)}if(x){const e=x.endAccessor();N=this._addAccessor(x.index,e)}if(b){const e=b.endAccessor();C=this._addAccessor(b.index,e)}if(_){const e=_.endAccessor();S=this._addAccessor(_.index,e)}const y=[];return e.components&&e.components.length>0&&e.components[0].faces?(I=r.addBufferView(T.UNSIGNED_INT,"SCALAR",34963),this._addMeshVertexIndexed(I,e.components,y,v,R,N,C,S)):this._addMeshVertexNonIndexed(e.components,y,v,R,N,C,S),d.finalize(),g?.finalize(),x?.finalize(),b?.finalize(),I?.finalize(),_?.finalize(),s||r.finalize(),y}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode="MASK";break;case"auto":case"blend":s.alphaMode="BLEND"}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=w(t[0]/255),t[1]=w(t[1]/255),t[2]=w(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,b().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r})}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case 2:{const e=r.binChunkBuffer.addBufferView(T.UNSIGNED_BYTE,"SCALAR");if(x(t))null!=t.data&&e.writeOutToBuffer(t.data.buffer,0);else{const i=d(t,this.options.signal).then(({data:e,type:t})=>(s.mimeType=t,e));r.promises.push(e.writeAsync(i).then(()=>e.finalize()))}s.bufferView=e.index;break}case 1:if(x(t)){b().warnOnce("Image export for basis compressed textures not available.");break}s.uri=g(t);break;default:if(x(t)){b().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(d(t,this.options.signal).then(({data:e,type:t})=>{s.uri=e,s.mimeType=t}))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=10497,s=10497;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=33071,s=33071;break;case"mirror":t=33648,s=33648}else{switch(e.wrap.vertical){case"clamp":s=33071;break;case"mirror":s=33648}switch(e.wrap.horizontal){case"clamp":t=33071;break;case"mirror":t=33648}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function M({position:e,normal:t,tangent:s}){A(e,3),A(t,3),A(s,4)}function A(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function w(t){return t**e}export{_ as GLTF};
|
|
@@ -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"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScale as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as p,r as g,o as u,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as F,create as S}from"../axisAngleDegrees.js";import T from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as U}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as q}from"./geographicUtils.js";import{logProjectionError as C,
|
|
5
|
+
import t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScale as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as p,r as g,o as u,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as F,create as S}from"../axisAngleDegrees.js";import T from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as U}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as q}from"./geographicUtils.js";import{logProjectionError as C,loadProjectErrorMessage as k,projectToPCPF as z,projectNormalToPCPF as L,projectTangentToPCPF as M,projectFromPCPF as P,projectNormalFromPCPF as V,projectTangentFromPCPF as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=q(O,i,o,s);U(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new T;const{vertexSpace:l,transform:c,spatialReference:f}=t,[u,x,h]=l.origin,R=new A({x:u,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,k);m(Z,w(e),y(e));const S=o(N,Z,v,b,d),{localMatrix:U}=c,q=i(N,S,U);c.scale=n(j(),q),s(q,q,g(K,c.scale));const z=c.rotationAxis;c.rotation=F(q),0===c.rotationAngle&&(c.rotationAxis=z),c.translation=a(j(),q)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const g=Q;u(w(Q),w(r),X),g[3]=r[3],z(a,i,m,n)&&(null==l||null==f||L(l,a,i,m,n,f))&&(null==c||null==p||M(c,a,i,m,n,p))?(J(m,g,3,s),P(m,n,a,i)&&(null==l||null==f||(J(f,g,3),V(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,g,4),D(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,k)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=S(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
|
|
@@ -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/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScale as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as l,r as c,h as f}from"../../../chunks/vec32.js";import{
|
|
5
|
+
import e from"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScale as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{j as l,r as c,h as f}from"../../../chunks/vec32.js";import{create as m,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,loadProjectErrorMessage as R,projectToPCPF as d,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as F,projectNormalFromPCPF as S,projectTangentFromPCPF as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,d,y]=u.origin,w=new g({x:A,y:d,z:y,spatialReference:h}),F=T;if(w.equals(f))l(F,0,0,0);else if(!C(F,f,e))return void b(k(),f.spatialReference,h,R);const S=l(V,s,s,s),U=t(D,a,p,S,F),{localMatrix:q}=x,z=r(D,U,q);x.scale=o(m(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(m(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;d(s,o,c,i)&&(null==a||null==f||y(a,s,o,c,i,f))&&(null==l||null==m||w(l,s,o,c,i,m))?(P(c,t,n),F(c,i,s,o)&&(null==a||null==f||S(f,s,o,c,i,a))&&(null==l||null==m||U(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,R)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=p){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=m(),V=m(),D=s(),E=m();export{q as scale};
|
|
@@ -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"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{u as p,e as g,t as x}from"../../../chunks/vec32.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{
|
|
5
|
+
import t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{u as p,e as g,t as x}from"../../../chunks/vec32.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReference as v,getSphericalPCPF as j}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as A}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as w}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as y,vertexSpaceEquals as F}from"../meshVertexSpaceUtils.js";import{isEarth as b}from"../spatialReferenceUtils.js";import{a as R,t as d,b as S}from"../../../chunks/vec3.js";import{logProjectionError as U,projectToPCPF as M,projectNormalToPCPF as T,projectTangentToPCPF as k,transformNormal as B,transformTangent as E,projectFromPCPF as L,projectNormalFromPCPF as V,projectTangentFromPCPF as C}from"./projection.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function P(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!w(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=j(e),i=t;if(!w(n,i,o))return!1;const{origin:l}=r,a=lt;if(!A(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(x(t,i,c),!0)}function q(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=y(e)?o:null,s=Y(t.spatialReference,r,3);if(F(e,n)&&(!a||l(a.localMatrix,m))&&Z(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?J(t,t.vertexSpace,n.origin,r):G(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):z(t,t.vertexSpace,n.origin,r)}}function z({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=Y(r,i,3),a=e||!Z(l)?c(rt,n?.localMatrix??m):null;a&&X(a,r,i,3);const{position:s,normal:u,tangent:f}=a?K(t,a):t,g=i?.allowBufferReuse,x=g?s:new Float64Array(s.length);let h=s;if(e&&(h=R(x,h,e)),o){const t=p(it,o);h=R(x,h,t)}return{position:h!==t.position||g?h:h.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function D(t,n){return n?.useEllipsoid&&b(t)?v:j(t)}function G({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=D(t,i);if(!A(t,e,rt,l))return U(O(),t,l),null;r&&u(rt,rt,r.localMatrix),X(rt,t,i,1);const a=new Float64Array(n.position.length),s=N(n.position,rt,t,a,l);if(!s)return null;const c=Q(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=W(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);R(s,s,t)}return{position:s,normal:c,tangent:f}}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=D(n,l);if(!A(n,i,rt,c))return U(O(),n,c),null;const u=1/Y(n,l,2);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=I(t,e,r),x=new Float64Array(m.length),h=$(m,n,f,x,c);if(!h)return null;const v=o(ot,f),j=_(p,m,n,x,c,v,p!==t.normal?p:void 0);if(!j&&p)return null;const w=tt(g,m,n,x,c,v,g!==t.tangent?g:void 0);return!w&&g?null:{position:h,normal:j,tangent:w}}function I(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:R(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=K(t,r.localMatrix);return R(e.position,e.position,n),e}function J({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=D(n,i);if(!A(n,e,rt,l))return U(O(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!A(n,o,et,l))return U(O(),l,n),null;s(et,et);const a=u(rt,et,rt);return X(a,n,i,3),K(t,a)}function K(t,n){const r=new Float64Array(t.position.length);d(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&B(t.normal,e,n),o&&t.tangent&&E(t.tangent,o,n),{position:r,normal:e,tangent:o}}function N(t,n,r,e,o){d(e,t,n);const i=new Float64Array(t.length);return L(e,o,i,r)?i:(U(O(),o,r),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return B(o,l,i),V(l,t,n,r,e,l)?l:(U(O(),e,n),null)}function W(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return E(o,l,i),C(l,t,n,r,e,l)?l:(U(O(),e,n),null)}function X(t,n,r,e){const o=Y(n,r,e);Z(o)||a(t,t,[o,o,o])}function Y(t,n,r){const e=!!(1&r),o=!!(2&r),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Z(a)||(O().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Z(s)||(O().warn("target unit conversion not supported"),s=1),a*s}function Z(t){return n(t,1)}function $(t,n,r,e,o){const i=M(t,n,e,o);if(!i)return U(O(),n,o),null;const l=new Float64Array(i.length);return d(l,i,r),l}function _(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return T(t,n,r,e,o,a)?(S(a,a,i),a):(U(O(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return k(t,n,r,e,o,a)?(S(a,a,i,4),a):(U(O(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=h(),lt=f();export{q as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,P as projectPointToVertexSpace};
|
|
@@ -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{clamp as t}from"../../core/mathUtils.js";import{f as n,g as r,h as o,
|
|
5
|
+
import{clamp as t}from"../../core/mathUtils.js";import{f as n,g as r,h as o,i as e,e as c,q as u,n as i,j as s,d as f}from"../../chunks/vec32.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as m,e as g}from"../../chunks/vec42.js";import{projectPointSignedLength as h}from"./vector.js";import{sv4d as l,sv3d as p}from"./vectorStacks.js";import{tangentFrame as M}from"../../views/3d/support/mathUtils.js";function j(t=$){return[t[0],t[1],t[2],t[3]]}const v=m,b=g;function d(t=$[0],n=$[1],r=$[2],o=$[3]){return q(t,n,r,o,l.get())}function y(t,n){return q(n[0],n[1],n[2],n[3],t)}function k(t){return t}function q(t,n,r,o,e=j()){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function x(t,n,r){return f(r,t),r[3]=n,r}function U(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],e=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*e,r[1]=n[1]*e,r[2]=n[2]*e,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function w(t,n,r,o=j()){const e=r[0]-n[0],c=r[1]-n[1],u=r[2]-n[2],i=t[0]-n[0],s=t[1]-n[1],f=t[2]-n[2],a=c*f-u*s,m=u*i-e*f,g=e*s-c*i,h=a*a+m*m+g*g,l=Math.abs(h-1)>1e-5&&h>1e-12?1/Math.sqrt(h):1;return o[0]=a*l,o[1]=m*l,o[2]=g*l,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function S(t,r,o,e=0,s=Math.floor(o*(1/3)),f=Math.floor(o*(2/3))){if(o<3)return!1;r(B,e);let a=s,m=!1;for(;a<o-1&&!m;)r(C,a),a++,m=!u(B,C);if(!m)return!1;for(a=Math.max(a,f),m=!1;a<o&&!m;)r(D,a),a++,c(E,B,C),i(E,E),c(F,C,D),i(F,F),m=!u(B,D)&&!u(C,D)&&Math.abs(n(E,F))<A;return m?(w(B,C,D,t),!0):(0!==e||1!==s||2!==f)&&S(t,r,o,0,1,2)}function z(t,n,r=!0){const o=n.length/3;return S(t,(t,r)=>s(t,n[3*r+0],n[3*r+1],n[3*r+2]),r?o-1:o)}const A=.99619469809,B=a(),C=a(),D=a(),E=a(),F=a();function G(t,r,o){return r!==t&&y(t,r),t[3]=-n(k(t),o),t}function H(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function I(t,n,r,o){return e(D,n,t),U(r,D,o)}function J(t,n,r,o){return Y(Z(t,n,c(p.get(),r,n),_,o))}function K(t,n,r){return null!=n&&Y(Z(t,n.origin,n.direction,tt,r))}function L(t,n,r){return Y(Z(t,n.origin,n.vector,0,r))}function N(t,n,r){return Y(Z(t,n.origin,n.vector,1,r))}function O(t,n){return X(t,n)>=0}function P(t,r){const o=n(k(t),r.ray.direction),e=-X(t,r.ray.origin);if(e<0&&o>=0)return!1;if(o>-1e-6&&o<1e-6)return e>0;if((e<0||o<0)&&!(e<0&&o<0))return!0;const c=e/o;return o>0?c<r.c1&&(r.c1=c):c>r.c0&&(r.c0=c),r.c0<=r.c1}function Q(t,r){const o=n(k(t),r.ray.direction),e=-X(t,r.ray.origin);if(o>-1e-6&&o<1e-6)return e>0;const c=e/o;return o>0?c<r.c1&&(r.c1=c):c>r.c0&&(r.c0=c),r.c0<=r.c1}function R(t,n,e){const u=o(p.get(),k(t),-t[3]),i=V(t,c(p.get(),n,u),p.get());return r(e,i,u),e}function T(t,n,r,o){const e=k(t),u=p.get(),i=p.get();M(e,u,i);const f=c(p.get(),r,n),a=h(u,f),m=h(i,f),g=h(e,f);return s(o,a,m,g)}function V(t,r,e){const u=o(p.get(),k(t),n(k(t),r));return c(e,r,u),e}function W(t,n){return Math.abs(X(t,n))}function X(t,r){return n(k(t),r)+t[3]}function Y(t){return 0===t||1===t}function Z(e,c,u,i,s){const f=n(k(e),u),a=X(e,c);if(0===f)return a>=0?2:3;let m=-a/f;return 1&i&&(m=t(m,0,1)),!(4&i)&&m<0||!(8&i)&&m>1?a>=0?2:3:(r(s,c,o(s,u,m)),a>=0?0:1)}const $=[0,0,1,0],_=12,tt=8;export{P as clip,Q as clipInfinite,y as copy,j as create,W as distance,b as equals,v as exactEquals,z as fromArray,S as fromManyPoints,x as fromNormalAndOffset,w as fromPoints,U as fromPositionAndNormal,q as fromValues,I as fromVectorsAndPoint,k as getNormal,J as intersectLine,Z as intersectLineOrRay,L as intersectLineSegment,N as intersectLineSegmentClamp,K as intersectRay,O as isPointInside,H as negate,R as projectPoint,T as projectPointLocal,V as projectVector,G as setOffsetFromPoint,X as signedDistance,$ as up,d as wrap};
|
|
@@ -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{deg2rad as t}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as r,getMetersPerVerticalUnitForSR as o}from"../../core/unitUtils.js";import{j as s}from"../../chunks/vec32.js";import{getNormal as a,
|
|
5
|
+
import{deg2rad as t}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as r,getMetersPerVerticalUnitForSR as o}from"../../core/unitUtils.js";import{j as s}from"../../chunks/vec32.js";import{getNormal as a,create as n,fromManyPoints as c}from"./plane.js";function i(r,o,s){const n=m(e,r,o,s)?a(e):[0,0,1];return Math.abs(n[2])>Math.cos(t(80))?2:Math.abs(n[1])>Math.abs(n[0])?1:0}function m(t,a,n,i){const m=(t=>!Array.isArray(t[0]))(a)?(t,r)=>a[3*t+r]:(t,r)=>a[t][r],e=i?r(i)/o(i):1;return c(t,(t,r)=>s(t,m(r,0)*e,m(r,1)*e,m(r,2)),n)}const e=n();export{m as fitPlane,i as leastSignificantAxis};
|
package/interfaces.d.ts
CHANGED
|
@@ -25179,6 +25179,13 @@ declare namespace __esri {
|
|
|
25179
25179
|
*/
|
|
25180
25180
|
get fields(): Field[];
|
|
25181
25181
|
set fields(value: FieldProperties[]);
|
|
25182
|
+
/**
|
|
25183
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html template} used in an associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html FeatureForm}.
|
|
25184
|
+
*
|
|
25185
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html#formTemplate Read more...}
|
|
25186
|
+
*/
|
|
25187
|
+
get formTemplate(): FormTemplate | nullish;
|
|
25188
|
+
set formTemplate(value: FormTemplateProperties | nullish);
|
|
25182
25189
|
/**
|
|
25183
25190
|
* The label definition for this sublayer, specified as an array of
|
|
25184
25191
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html label classes}.
|
|
@@ -25217,6 +25224,13 @@ declare namespace __esri {
|
|
|
25217
25224
|
| (DictionaryRendererProperties & { type: "dictionary" })
|
|
25218
25225
|
| (PieChartRendererProperties & { type: "pie-chart" })
|
|
25219
25226
|
| nullish);
|
|
25227
|
+
/**
|
|
25228
|
+
* An array of feature templates defined in the knowledge graph sublayer.
|
|
25229
|
+
*
|
|
25230
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html#templates Read more...}
|
|
25231
|
+
*/
|
|
25232
|
+
get templates(): FeatureTemplate[] | nullish;
|
|
25233
|
+
set templates(value: FeatureTemplateProperties[] | nullish);
|
|
25220
25234
|
/**
|
|
25221
25235
|
* The layer's time extent.
|
|
25222
25236
|
*
|
|
@@ -25381,6 +25395,12 @@ declare namespace __esri {
|
|
|
25381
25395
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html#fields Read more...}
|
|
25382
25396
|
*/
|
|
25383
25397
|
fields?: FieldProperties[];
|
|
25398
|
+
/**
|
|
25399
|
+
* The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html template} used in an associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html FeatureForm}.
|
|
25400
|
+
*
|
|
25401
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html#formTemplate Read more...}
|
|
25402
|
+
*/
|
|
25403
|
+
formTemplate?: FormTemplateProperties | nullish;
|
|
25384
25404
|
/**
|
|
25385
25405
|
* The name of the geometry field for the sublayer.
|
|
25386
25406
|
*
|
|
@@ -25493,6 +25513,12 @@ declare namespace __esri {
|
|
|
25493
25513
|
| (DictionaryRendererProperties & { type: "dictionary" })
|
|
25494
25514
|
| (PieChartRendererProperties & { type: "pie-chart" })
|
|
25495
25515
|
| nullish;
|
|
25516
|
+
/**
|
|
25517
|
+
* An array of feature templates defined in the knowledge graph sublayer.
|
|
25518
|
+
*
|
|
25519
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html#templates Read more...}
|
|
25520
|
+
*/
|
|
25521
|
+
templates?: FeatureTemplateProperties[] | nullish;
|
|
25496
25522
|
/**
|
|
25497
25523
|
* The layer's time extent.
|
|
25498
25524
|
*
|
|
@@ -52445,7 +52471,7 @@ declare namespace __esri {
|
|
|
52445
52471
|
statusCallback?: any;
|
|
52446
52472
|
}
|
|
52447
52473
|
|
|
52448
|
-
export class UNTraceConfiguration {
|
|
52474
|
+
export class UNTraceConfiguration extends Clonable {
|
|
52449
52475
|
/**
|
|
52450
52476
|
* Specifies whether to allow IndeterminateFlow.
|
|
52451
52477
|
*
|
|
@@ -52600,6 +52626,12 @@ declare namespace __esri {
|
|
|
52600
52626
|
*/
|
|
52601
52627
|
validateLocatability: boolean | nullish;
|
|
52602
52628
|
constructor(properties?: any);
|
|
52629
|
+
/**
|
|
52630
|
+
* Creates a deep clone of this object.
|
|
52631
|
+
*
|
|
52632
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-support-UNTraceConfiguration.html#clone Read more...}
|
|
52633
|
+
*/
|
|
52634
|
+
clone(): this;
|
|
52603
52635
|
}
|
|
52604
52636
|
|
|
52605
52637
|
export interface UnitIdentifierManager extends Accessor, JSONSupport {
|
|
@@ -52901,12 +52933,12 @@ declare namespace __esri {
|
|
|
52901
52933
|
/**
|
|
52902
52934
|
* Returns all associations filtered by the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-networks-support-QueryAssociationsParameters.html QueryAssociationsParameters} in a utility network.
|
|
52903
52935
|
*
|
|
52904
|
-
* @param props
|
|
52936
|
+
* @param props Props consists of returnDeletes, elements, and types.
|
|
52905
52937
|
* @param options An object with the following properties.
|
|
52906
52938
|
*
|
|
52907
52939
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#queryAssociations Read more...}
|
|
52908
52940
|
*/
|
|
52909
|
-
queryAssociations(props:
|
|
52941
|
+
queryAssociations(props: UtilityNetworkQueryAssociationsProps, options?: UtilityNetworkQueryAssociationsOptions): Promise<Association[]>;
|
|
52910
52942
|
/**
|
|
52911
52943
|
* Whenever the network is edited or modified, the network and its features become out of date in the [network topology]( https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/about-network-topology.htm).
|
|
52912
52944
|
*
|
|
@@ -52927,11 +52959,11 @@ declare namespace __esri {
|
|
|
52927
52959
|
/**
|
|
52928
52960
|
* Given an extent, returns all associations within this extent and their synthesized geometries.
|
|
52929
52961
|
*
|
|
52930
|
-
* @param
|
|
52962
|
+
* @param props Props consists of extent, returnAttachmentAssociations, returnConnectivityAssociations, returnContainmentAssociations, maxGeometryCount, and outSpatialReference.
|
|
52931
52963
|
*
|
|
52932
52964
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#synthesizeAssociationGeometries Read more...}
|
|
52933
52965
|
*/
|
|
52934
|
-
synthesizeAssociationGeometries(
|
|
52966
|
+
synthesizeAssociationGeometries(props: UtilityNetworkSynthesizeAssociationGeometriesProps): Promise<AssociationGeometriesResult>;
|
|
52935
52967
|
/**
|
|
52936
52968
|
* The trace method takes a set of parameters, executes the trace on the backend, and returns trace results.
|
|
52937
52969
|
*
|
|
@@ -52986,6 +53018,12 @@ declare namespace __esri {
|
|
|
52986
53018
|
signal?: AbortSignal | nullish;
|
|
52987
53019
|
}
|
|
52988
53020
|
|
|
53021
|
+
export interface UtilityNetworkQueryAssociationsProps {
|
|
53022
|
+
returnDeletes?: boolean;
|
|
53023
|
+
elements?: NetworkElement[];
|
|
53024
|
+
types?: string[];
|
|
53025
|
+
}
|
|
53026
|
+
|
|
52989
53027
|
export interface UtilityNetworkSubmitTraceJobProps {
|
|
52990
53028
|
namedTraceConfigurationGlobalId?: string;
|
|
52991
53029
|
traceLocations?: TraceLocation[];
|
|
@@ -53005,6 +53043,14 @@ declare namespace __esri {
|
|
|
53005
53043
|
| nullish;
|
|
53006
53044
|
}
|
|
53007
53045
|
|
|
53046
|
+
export interface UtilityNetworkSynthesizeAssociationGeometriesProps {
|
|
53047
|
+
extent: Extent;
|
|
53048
|
+
returnAttachmentAssociations?: boolean;
|
|
53049
|
+
returnConnectivityAssociations?: boolean;
|
|
53050
|
+
returnContainmentAssociations?: boolean;
|
|
53051
|
+
maxGeometryCount?: number;
|
|
53052
|
+
}
|
|
53053
|
+
|
|
53008
53054
|
export interface UtilityNetworkTraceProps {
|
|
53009
53055
|
namedTraceConfigurationGlobalId?: string;
|
|
53010
53056
|
traceLocations?: TraceLocation[];
|
|
@@ -67675,6 +67721,15 @@ declare namespace __esri {
|
|
|
67675
67721
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeUpdateSearchIndex Read more...}
|
|
67676
67722
|
*/
|
|
67677
67723
|
executeUpdateSearchIndex(graph: KnowledgeGraph, namedType: string, searchProperties: knowledgeGraphServiceExecuteUpdateSearchIndexSearchProperties, options?: RequestOptions): Promise<GraphUpdateSearchIndexResult>;
|
|
67724
|
+
/**
|
|
67725
|
+
* Returns all client data keys existing on the knowledge graph service associated with the given knowledge graph.
|
|
67726
|
+
*
|
|
67727
|
+
* @param graph The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-KnowledgeGraph.html knowledge graph} associated with the service. See also [ArcGIS REST APIs - Hosted Knowledge Graph Service](https://developers.arcgis.com/rest/services-reference/enterprise/kgs-hosted-server.htm).
|
|
67728
|
+
* @param requestOptions Additional options to be used for the data request.
|
|
67729
|
+
*
|
|
67730
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#fetchAllClientDataKeys Read more...}
|
|
67731
|
+
*/
|
|
67732
|
+
fetchAllClientDataKeys(graph: KnowledgeGraph, requestOptions?: RequestOptions): Promise<string[]>;
|
|
67678
67733
|
/**
|
|
67679
67734
|
* Retrieves the filtered find path results from a job started by {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeFindPathsAsynchronous executeFindPathsAsynchronous}.
|
|
67680
67735
|
*
|
|
@@ -98680,7 +98735,7 @@ declare namespace __esri {
|
|
|
98680
98735
|
*
|
|
98681
98736
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileError.html#ElevationProfileErrorName Read more...}
|
|
98682
98737
|
*/
|
|
98683
|
-
export type ElevationProfileErrorName = "too-complex" | "
|
|
98738
|
+
export type ElevationProfileErrorName = "too-complex" | "elevation-query-error" | "unknown";
|
|
98684
98739
|
|
|
98685
98740
|
export interface ElevationProfileResult extends Accessor, Clonable {
|
|
98686
98741
|
}
|
|
@@ -117145,6 +117200,16 @@ declare namespace __esri {
|
|
|
117145
117200
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateFeaturesWorkflowAtFeatureTypeSelection Read more...}
|
|
117146
117201
|
*/
|
|
117147
117202
|
startCreateFeaturesWorkflowAtFeatureTypeSelection(): Promise<void>;
|
|
117203
|
+
/**
|
|
117204
|
+
* Starts a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html MergeFeaturesWorkflow} for the
|
|
117205
|
+
* specified features.
|
|
117206
|
+
*
|
|
117207
|
+
* @param features The features to be merged. These can be supplied either as an array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphic} instances or as a single {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#FeatureInfo FeatureInfo} object specifying a layer and the object IDs of the features.
|
|
117208
|
+
* @param options Options for the merge features workflow.
|
|
117209
|
+
*
|
|
117210
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startMergeFeaturesWorkflow Read more...}
|
|
117211
|
+
*/
|
|
117212
|
+
startMergeFeaturesWorkflow(features: Graphic[] | FeatureInfo, options: any): void;
|
|
117148
117213
|
/**
|
|
117149
117214
|
* Starts a split feature workflow for the given feature.
|
|
117150
117215
|
*
|
|
@@ -117158,11 +117223,11 @@ declare namespace __esri {
|
|
|
117158
117223
|
* Starts an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateFeaturesWorkflow.html UpdateFeaturesWorkflow} using
|
|
117159
117224
|
* the provided features.
|
|
117160
117225
|
*
|
|
117161
|
-
* @param features The features to
|
|
117226
|
+
* @param features The features to be updated. These can be supplied either as an array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphic} instances or as a single {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#FeatureInfo FeatureInfo} object specifying a layer and the object IDs of the features.
|
|
117162
117227
|
*
|
|
117163
117228
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateFeaturesWorkflow Read more...}
|
|
117164
117229
|
*/
|
|
117165
|
-
startUpdateFeaturesWorkflow(features: Graphic[]): Promise<void>;
|
|
117230
|
+
startUpdateFeaturesWorkflow(features: Graphic[] | FeatureInfo): Promise<void>;
|
|
117166
117231
|
/**
|
|
117167
117232
|
* Starts the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html UpdateWorkflow} at the attribute editing panel.
|
|
117168
117233
|
*
|
|
@@ -117571,6 +117636,16 @@ declare namespace __esri {
|
|
|
117571
117636
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateFeaturesWorkflowAtFeatureTypeSelection Read more...}
|
|
117572
117637
|
*/
|
|
117573
117638
|
startCreateFeaturesWorkflowAtFeatureTypeSelection(): Promise<void>;
|
|
117639
|
+
/**
|
|
117640
|
+
* Starts a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html MergeFeaturesWorkflow} for the
|
|
117641
|
+
* specified features.
|
|
117642
|
+
*
|
|
117643
|
+
* @param features The features to be merged. These can be supplied either as an array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphic} instances or as a single {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#FeatureInfo FeatureInfo} object specifying a layer and the object IDs of the features.
|
|
117644
|
+
* @param options Options for the merge features workflow.
|
|
117645
|
+
*
|
|
117646
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startMergeFeaturesWorkflow Read more...}
|
|
117647
|
+
*/
|
|
117648
|
+
startMergeFeaturesWorkflow(features: Graphic[] | FeatureInfo, options: EditorViewModelStartMergeFeaturesWorkflowOptions): void;
|
|
117574
117649
|
/**
|
|
117575
117650
|
* Starts a split feature workflow for the given feature.
|
|
117576
117651
|
*
|
|
@@ -117584,11 +117659,11 @@ declare namespace __esri {
|
|
|
117584
117659
|
* Starts an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateFeaturesWorkflow.html UpdateFeaturesWorkflow} using
|
|
117585
117660
|
* the provided features.
|
|
117586
117661
|
*
|
|
117587
|
-
* @param
|
|
117662
|
+
* @param features The features to be updated. These can be supplied either as an array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphic} instances or as a single {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#FeatureInfo FeatureInfo} object specifying a layer and the object IDs of the features.
|
|
117588
117663
|
*
|
|
117589
117664
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateFeaturesWorkflow Read more...}
|
|
117590
117665
|
*/
|
|
117591
|
-
startUpdateFeaturesWorkflow(
|
|
117666
|
+
startUpdateFeaturesWorkflow(features: Graphic[] | FeatureInfo): Promise<void>;
|
|
117592
117667
|
/**
|
|
117593
117668
|
* Starts the update workflow at the feature geometry and attribute editing panel.
|
|
117594
117669
|
*
|
|
@@ -117682,6 +117757,10 @@ declare namespace __esri {
|
|
|
117682
117757
|
initialFeature: Graphic;
|
|
117683
117758
|
}
|
|
117684
117759
|
|
|
117760
|
+
export interface EditorViewModelStartMergeFeaturesWorkflowOptions {
|
|
117761
|
+
keyFeature?: Graphic;
|
|
117762
|
+
}
|
|
117763
|
+
|
|
117685
117764
|
export interface EditorViewModelStartSplitFeatureWorkflowOptions {
|
|
117686
117765
|
defaultSplitterGeometryType?: "point" | "polyline" | "polygon";
|
|
117687
117766
|
splitterGeometry?: Point | Polyline | Polygon;
|
|
@@ -118082,6 +118161,12 @@ declare namespace __esri {
|
|
|
118082
118161
|
}
|
|
118083
118162
|
|
|
118084
118163
|
export class UpdateFeaturesWorkflow extends Workflow {
|
|
118164
|
+
/**
|
|
118165
|
+
* The `UpdateFeaturesWorkflow` class contains the logic used when updating and/or deleting features using
|
|
118166
|
+
* the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html Editor} widget.
|
|
118167
|
+
*
|
|
118168
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateFeaturesWorkflow.html Read more...}
|
|
118169
|
+
*/
|
|
118085
118170
|
constructor(properties?: UpdateFeaturesWorkflowProperties);
|
|
118086
118171
|
}
|
|
118087
118172
|
|
|
@@ -123349,6 +123434,12 @@ declare namespace __esri {
|
|
|
123349
123434
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#layerView Read more...}
|
|
123350
123435
|
*/
|
|
123351
123436
|
readonly layerView: LayerView | nullish;
|
|
123437
|
+
/**
|
|
123438
|
+
* This property is applicable when working with layers that contain a large number of features, as it provides the ability to limit the displayed total feature count.
|
|
123439
|
+
*
|
|
123440
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#maxSize Read more...}
|
|
123441
|
+
*/
|
|
123442
|
+
maxSize: number | nullish;
|
|
123352
123443
|
/**
|
|
123353
123444
|
* Set this object to customize the feature table's menu content.
|
|
123354
123445
|
*
|
|
@@ -123889,6 +123980,12 @@ declare namespace __esri {
|
|
|
123889
123980
|
| OrientedImageryLayer
|
|
123890
123981
|
| Sublayer
|
|
123891
123982
|
| nullish;
|
|
123983
|
+
/**
|
|
123984
|
+
* This property is applicable when working with layers that contain a large number of features, as it provides the ability to limit the displayed total feature count.
|
|
123985
|
+
*
|
|
123986
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#maxSize Read more...}
|
|
123987
|
+
*/
|
|
123988
|
+
maxSize?: number | nullish;
|
|
123892
123989
|
/**
|
|
123893
123990
|
* Set this object to customize the feature table's menu content.
|
|
123894
123991
|
*
|
|
@@ -125423,7 +125520,7 @@ declare namespace __esri {
|
|
|
125423
125520
|
interface RelationshipColumnTemplateProperties extends ColumnTemplateBaseProperties {
|
|
125424
125521
|
}
|
|
125425
125522
|
|
|
125426
|
-
export interface TableTemplate extends Accessor, JSONSupport {
|
|
125523
|
+
export interface TableTemplate extends Accessor, JSONSupport, Clonable {
|
|
125427
125524
|
}
|
|
125428
125525
|
|
|
125429
125526
|
export class TableTemplate {
|
|
@@ -125452,6 +125549,12 @@ declare namespace __esri {
|
|
|
125452
125549
|
| (AttachmentsColumnTemplateProperties & { type: "attachment" })
|
|
125453
125550
|
| (RelationshipColumnTemplateProperties & { type: "relationship" })
|
|
125454
125551
|
)[]);
|
|
125552
|
+
/**
|
|
125553
|
+
* Creates a deep clone of this object.
|
|
125554
|
+
*
|
|
125555
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html#clone Read more...}
|
|
125556
|
+
*/
|
|
125557
|
+
clone(): this;
|
|
125455
125558
|
/**
|
|
125456
125559
|
* Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
|
|
125457
125560
|
*
|
package/kernel.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 has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.12",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
|
@@ -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{fetchAndConvertSerializedKnowledgeIdMap as i,serializeInclusionDefinitionToIdCollectionsMapPbf as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import a from"../core/Collection.js";import s from"../core/Error.js";import o from"../core/Logger.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{watch as p,sync as d}from"../core/reactiveUtils.js";import{isAbsolute as h,join as y}from"../core/urlUtils.js";import{generateUUID as c}from"../core/uuid.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import{writer as g}from"../core/accessorSupport/decorators/writer.js";import{idToName as w,nameToId as b}from"../core/accessorSupport/PropertyOrigin.js";import M from"./Layer.js";import{KnowledgeGraphLayerDataManager as T}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import D from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{initializeLayersFromClientData as _,createCapabilitiesFromKnowledgeGraph as S}from"./knowledgeGraph/layerUtils.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as v}from"./mixins/BlendLayer.js";import{CustomParametersMixin as k}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as C}from"./mixins/PortalLayer.js";import{RefreshableLayer as G}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{url as A}from"./support/commonProperties.js";import{fetchKnowledgeGraph as I}from"../rest/knowledgeGraphService.js";import{f as x,t as E}from"../chunks/persistableUrlUtils.js";let R=class extends(v(N(G(L(j(C(n(k(M))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(a.ofType(D)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(a.ofType(D)),this.type="knowledge-graph",this.url=null,this.addHandles(p(()=>this.layers.concat(this.tables),(e,i)=>this._handleSublayersChange(e,i),d))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(i){l(i)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await _(this)}async _fetchMetadata(){if(!this.url)throw new s("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await I(this.url);this.knowledgeGraph=e,this._forEachGraphType(e=>{e.name&&this._graphTypeLookup.set(e.name,e)})}async _initializeLayerProperties(){7===this.originIdOf("inclusionModeDefinition")?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new T({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await i(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach(i=>{const t=this._graphTypeLookup.get(i.graphTypeName);t&&!e.namedTypeDefinitions.has(t.name)&&e.namedTypeDefinitions.set(t.name,{useAllData:!0})}),this.setAtOrigin("inclusionModeDefinition",e,w(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:i}=e;if(i?.size>0)i.forEach((e,t)=>{const a=this._graphTypeLookup.get(t);if(!a)return o.getLogger(this).warn(`A named type, ${t}, was in the inclusion list that wasn't in the data model and will be removed`),void i.delete(t);"relationship"!==a.type&&"entity"!==a.type&&(o.getLogger(this).warn(`A named type, ${t}, was in the inclusion list that wasn't properly modeled and will be removed`),i.delete(t))});else if(!e.generateAllSublayers)throw new s("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],i=[];const{inclusionModeDefinition:t}=this,a=t?.namedTypeDefinitions;!t||t.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],i=this.knowledgeGraph.dataModel?.relationshipTypes??[]):a&&a.size>0&&a.forEach((t,a)=>{const s=this._graphTypeLookup.get(a);switch(s?.type){case"relationship":i.push(s);break;case"entity":e.push(s)}}),this.memberEntityTypes=e,this.memberRelationshipTypes=i}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach(i=>{e(i)})}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const i=new Set,t=[];for(const a of e){if(!this._graphTypeLookup.has(a.typeName))continue;!1===this.layers.concat(this.tables).some(e=>e.objectType.name===a.typeName)&&(this.dataManager.sublayerCaches.set(a.typeName,new Map),i.add(a.typeName));r(this.sublayerIdsCache,a.typeName,()=>new Set).add(a.id),t.push(a)}this.dataManager.addToLayer(t);for(const a of i){const e=this._graphTypeLookup.get(a);e&&(this._addSublayer(e),"entity"===e.type?this.dataManager.entityTypeNames.add(a):this.dataManager.relationshipTypeNames.add(a))}await _(this,Array.from(i)),this._refreshNamedTypes()}_createSublayers(e,i,t){e.forEach(e=>{const a=this._createSublayer(e);t(a)&&i.push(a),this._updateSublayerCaches(e)})}_addSublayer(e){const i=this._createSublayer(e);return i.geometryType?this.layers.push(i):this.tables.push(i),i}_createSublayer(e){return new D({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,i){i.forEach(i=>{i.parentCompositeLayer=this;const t=e.find(e=>e.type===i.graphType&&e.name===i.graphTypeName);t&&(i.objectType=t,this._updateSublayerCaches(t))})}_updateSublayerCaches({name:e}){if(!e)return;const i=this.dataManager.sublayerCaches;i.has(e)||i.set(e,new Map)}_saveUrlAsNewResource(e,i,t,a){e[i]="<pending>",t.pendingOperations.push(K(this.inclusionModeDefinition).then(s=>{const o=U(a);e[i]=o.itemRelativeUrl,t.toAdd.push({resource:o,content:{type:"blob",blob:s},compress:!1,finish:e=>{this.definitionSetMap=e.url}})}))}_displaysAllRecords(e){for(const[,{useAllData:i}]of e.namedTypeDefinitions)if(!i)return!1;return!0}_handleSublayersChange(e,i){i&&(i.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}readDefinitionSetMap(e,i,t){return x(e,t)}writeDefinitionSetMap(e,i,t,a){const s=a?.portalItem,o=a?.resources,r=b(a?.origin);if(!s||!o||null==r)return void(e&&(i[t]=E(e,a)));const{inclusionModeDefinition:n}=this;if(!n||this._displaysAllRecords(n))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(7===l||this._namedTypesModified||r<l)this._saveUrlAsNewResource(i,t,o,s);else if(r===l&&e){const r=E(e,a);h(r)?this._saveUrlAsNewResource(i,t,o,s):i[t]=r}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}get sublayerCapabilities(){return S(this.knowledgeGraph)}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new a,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new a,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,i)=>{const t=r(this.sublayerIdsCache,i,()=>new Set);e.members?.forEach(e=>{t.add(e.id)})})}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async createSublayerForNamedType(e){await this.load();const i=this._graphTypeLookup.get(e);if(!i)throw new s("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(this.dataManager.sublayerCaches.has(e))throw new s("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),r(this.sublayerIdsCache,e,()=>new Set);const t=this._addSublayer(i);return"entity"===i.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),await _(this,[e]),this._refreshNamedTypes(),t}convertSublayerToDynamicData(e){if(!this.dataManager.inclusionModeDefinition)throw new s("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new s("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(!this.dataManager.sublayerCaches.has(e))throw new s("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");const i=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);i?.useAllData?o.getLogger(this).warn("This Knowledge Graph Layer already uses dynamic membership for the sublayer - no conversion was made"):(this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),this.sublayerIdsCache.delete(e),this._refreshNamedTypes())}convertSublayerToExplicitMembership(e){if(!this.dataManager.inclusionModeDefinition)throw new s("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new s("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");const i=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);if(!i||i.useAllData){if(!this.dataManager.sublayerCaches.has(e))throw new s("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");this.sublayerIdsCache.set(e,new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),this._refreshNamedTypes()}else o.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership for the sublayer - no conversion was made")}convertToFullyDynamicData(){this.dataManager.inclusionModeDefinition||o.getLogger(this).warn("This Knowledge Graph Layer already uses fully dynamic membership - no conversion was made"),this.sublayerIdsCache.clear(),this.dataManager.inclusionModeDefinition=null,this._refreshNamedTypes()}convertToExplicitMembership(){this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.size>0&&o.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership - no conversion was made"),this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map};for(const e of this.dataManager.sublayerCaches.keys())r(this.sublayerIdsCache,e,()=>new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map});this._refreshNamedTypes()}async removeRecords(e){await this.load();const i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);this.dataManager.removeFromLayer(i);for(const t of i)this.sublayerIdsCache.get(t.typeName)?.delete(t.id);return this._refreshNamedTypes(),i}};e([m()],R.prototype,"dataManager",void 0),e([m({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],R.prototype,"definitionSetMap",void 0),e([u("definitionSetMap")],R.prototype,"readDefinitionSetMap",null),e([g("definitionSetMap")],R.prototype,"writeDefinitionSetMap",null),e([m()],R.prototype,"inclusionModeDefinition",null),e([m()],R.prototype,"knowledgeGraph",void 0),e([m({type:a.ofType(D),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),e([m()],R.prototype,"memberEntityTypes",void 0),e([m()],R.prototype,"memberRelationshipTypes",void 0),e([m({type:["KnowledgeGraphLayer"]})],R.prototype,"operationalLayerType",void 0),e([m()],R.prototype,"sublayerCapabilities",null),e([m()],R.prototype,"sublayerIdsCache",void 0),e([m({type:a.ofType(D),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),e([m({json:{read:!1}})],R.prototype,"type",void 0),e([m(A)],R.prototype,"url",void 0),R=e([f("esri.layers.KnowledgeGraphLayer")],R);const O=R;async function K(e){const i=await t(e);return new Blob([i],{type:"application/x-protobuf"})}function U(e){const i=`definitionSetMap-${c()}.dat`,t=y("knowledgeGraphLayer",i);return e.resourceFromPath(t)}export{O as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{fetchAndConvertSerializedKnowledgeIdMap as i,serializeInclusionDefinitionToIdCollectionsMapPbf as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import a from"../core/Collection.js";import s from"../core/Error.js";import o from"../core/Logger.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{watch as p,sync as d}from"../core/reactiveUtils.js";import{isAbsolute as h,join as y}from"../core/urlUtils.js";import{generateUUID as c}from"../core/uuid.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import{writer as g}from"../core/accessorSupport/decorators/writer.js";import{idToName as w,nameToId as b}from"../core/accessorSupport/PropertyOrigin.js";import M from"./Layer.js";import{KnowledgeGraphLayerDataManager as T}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import D from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{initializeLayersFromClientData as _,createCapabilitiesFromKnowledgeGraph as S}from"./knowledgeGraph/layerUtils.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as v}from"./mixins/BlendLayer.js";import{CustomParametersMixin as k}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as C}from"./mixins/PortalLayer.js";import{RefreshableLayer as G}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{url as A}from"./support/commonProperties.js";import{fetchKnowledgeGraph as I}from"../rest/knowledgeGraphService.js";import{f as x,t as E}from"../chunks/persistableUrlUtils.js";let R=class extends(v(N(G(L(j(C(n(k(M))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(a.ofType(D)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(a.ofType(D)),this.type="knowledge-graph",this.url=null,this.addHandles(p(()=>this.layers.concat(this.tables),(e,i)=>this._handleSublayersChange(e,i),d))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(i){l(i)}await this._fetchMetadata(),await this._initializeLayerProperties(e),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await _(this)}async _fetchMetadata(){if(!this.url)throw new s("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await I(this.url);this.knowledgeGraph=e,this._forEachGraphType(e=>{e.name&&this._graphTypeLookup.set(e.name,e)})}async _initializeLayerProperties(e){7===this.originIdOf("inclusionModeDefinition")?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(e),this._setMemberTypes(),this.dataManager=new T({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(e){const t=this.definitionSetMap?await i(this.definitionSetMap,!0,e?.signal?{signal:e.signal}:void 0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach(e=>{const i=this._graphTypeLookup.get(e.graphTypeName);i&&!t.namedTypeDefinitions.has(i.name)&&t.namedTypeDefinitions.set(i.name,{useAllData:!0})}),this.setAtOrigin("inclusionModeDefinition",t,w(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:i}=e;if(i?.size>0)i.forEach((e,t)=>{const a=this._graphTypeLookup.get(t);if(!a)return o.getLogger(this).warn(`A named type, ${t}, was in the inclusion list that wasn't in the data model and will be removed`),void i.delete(t);"relationship"!==a.type&&"entity"!==a.type&&(o.getLogger(this).warn(`A named type, ${t}, was in the inclusion list that wasn't properly modeled and will be removed`),i.delete(t))});else if(!e.generateAllSublayers)throw new s("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],i=[];const{inclusionModeDefinition:t}=this,a=t?.namedTypeDefinitions;!t||t.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],i=this.knowledgeGraph.dataModel?.relationshipTypes??[]):a&&a.size>0&&a.forEach((t,a)=>{const s=this._graphTypeLookup.get(a);switch(s?.type){case"relationship":i.push(s);break;case"entity":e.push(s)}}),this.memberEntityTypes=e,this.memberRelationshipTypes=i}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach(i=>{e(i)})}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const i=new Set,t=[];for(const a of e){if(!this._graphTypeLookup.has(a.typeName))continue;!1===this.layers.concat(this.tables).some(e=>e.objectType.name===a.typeName)&&(this.dataManager.sublayerCaches.set(a.typeName,new Map),i.add(a.typeName));r(this.sublayerIdsCache,a.typeName,()=>new Set).add(a.id),t.push(a)}this.dataManager.addToLayer(t);for(const a of i){const e=this._graphTypeLookup.get(a);e&&(this._addSublayer(e),"entity"===e.type?this.dataManager.entityTypeNames.add(a):this.dataManager.relationshipTypeNames.add(a))}await _(this,Array.from(i)),this._refreshNamedTypes()}_createSublayers(e,i,t){e.forEach(e=>{const a=this._createSublayer(e);t(a)&&i.push(a),this._updateSublayerCaches(e)})}_addSublayer(e){const i=this._createSublayer(e);return i.geometryType?this.layers.push(i):this.tables.push(i),i}_createSublayer(e){return new D({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,i){i.forEach(i=>{i.parentCompositeLayer=this;const t=e.find(e=>e.type===i.graphType&&e.name===i.graphTypeName);t&&(i.objectType=t,this._updateSublayerCaches(t))})}_updateSublayerCaches({name:e}){if(!e)return;const i=this.dataManager.sublayerCaches;i.has(e)||i.set(e,new Map)}_saveUrlAsNewResource(e,i,t,a){e[i]="<pending>",t.pendingOperations.push(K(this.inclusionModeDefinition).then(s=>{const o=U(a);e[i]=o.itemRelativeUrl,t.toAdd.push({resource:o,content:{type:"blob",blob:s},compress:!1,finish:e=>{this.definitionSetMap=e.url}})}))}_displaysAllRecords(e){for(const[,{useAllData:i}]of e.namedTypeDefinitions)if(!i)return!1;return!0}_handleSublayersChange(e,i){i&&(i.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}readDefinitionSetMap(e,i,t){return x(e,t)}writeDefinitionSetMap(e,i,t,a){const s=a?.portalItem,o=a?.resources,r=b(a?.origin);if(!s||!o||null==r)return void(e&&(i[t]=E(e,a)));const{inclusionModeDefinition:n}=this;if(!n||this._displaysAllRecords(n))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(7===l||this._namedTypesModified||r<l)this._saveUrlAsNewResource(i,t,o,s);else if(r===l&&e){const r=E(e,a);h(r)?this._saveUrlAsNewResource(i,t,o,s):i[t]=r}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}get sublayerCapabilities(){return S(this.knowledgeGraph)}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new a,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new a,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,i)=>{const t=r(this.sublayerIdsCache,i,()=>new Set);e.members?.forEach(e=>{t.add(e.id)})})}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async createSublayerForNamedType(e){await this.load();const i=this._graphTypeLookup.get(e);if(!i)throw new s("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(this.dataManager.sublayerCaches.has(e))throw new s("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),r(this.sublayerIdsCache,e,()=>new Set);const t=this._addSublayer(i);return"entity"===i.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),await _(this,[e]),this._refreshNamedTypes(),t}convertSublayerToDynamicData(e){if(!this.dataManager.inclusionModeDefinition)throw new s("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new s("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(!this.dataManager.sublayerCaches.has(e))throw new s("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");const i=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);i?.useAllData?o.getLogger(this).warn("This Knowledge Graph Layer already uses dynamic membership for the sublayer - no conversion was made"):(this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),this.sublayerIdsCache.delete(e),this._refreshNamedTypes())}convertSublayerToExplicitMembership(e){if(!this.dataManager.inclusionModeDefinition)throw new s("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new s("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");const i=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);if(!i||i.useAllData){if(!this.dataManager.sublayerCaches.has(e))throw new s("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");this.sublayerIdsCache.set(e,new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),this._refreshNamedTypes()}else o.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership for the sublayer - no conversion was made")}convertToFullyDynamicData(){this.dataManager.inclusionModeDefinition||o.getLogger(this).warn("This Knowledge Graph Layer already uses fully dynamic membership - no conversion was made"),this.sublayerIdsCache.clear(),this.dataManager.inclusionModeDefinition=null,this._refreshNamedTypes()}convertToExplicitMembership(){this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.size>0&&o.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership - no conversion was made"),this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map};for(const e of this.dataManager.sublayerCaches.keys())r(this.sublayerIdsCache,e,()=>new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map});this._refreshNamedTypes()}async removeRecords(e){await this.load();const i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);this.dataManager.removeFromLayer(i);for(const t of i)this.sublayerIdsCache.get(t.typeName)?.delete(t.id);return this._refreshNamedTypes(),i}};e([m()],R.prototype,"dataManager",void 0),e([m({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],R.prototype,"definitionSetMap",void 0),e([u("definitionSetMap")],R.prototype,"readDefinitionSetMap",null),e([g("definitionSetMap")],R.prototype,"writeDefinitionSetMap",null),e([m()],R.prototype,"inclusionModeDefinition",null),e([m()],R.prototype,"knowledgeGraph",void 0),e([m({type:a.ofType(D),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),e([m()],R.prototype,"memberEntityTypes",void 0),e([m()],R.prototype,"memberRelationshipTypes",void 0),e([m({type:["KnowledgeGraphLayer"]})],R.prototype,"operationalLayerType",void 0),e([m()],R.prototype,"sublayerCapabilities",null),e([m()],R.prototype,"sublayerIdsCache",void 0),e([m({type:a.ofType(D),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),e([m({json:{read:!1}})],R.prototype,"type",void 0),e([m(A)],R.prototype,"url",void 0),R=e([f("esri.layers.KnowledgeGraphLayer")],R);const O=R;async function K(e){const i=await t(e);return new Blob([i],{type:"application/x-protobuf"})}function U(e){const i=`definitionSetMap-${c()}.dat`,t=y("knowledgeGraphLayer",i);return e.resourceFromPath(t)}export{O as default};
|
package/layers/Layer.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 e from"../request.js";import r from"../core/Error.js";import{EventedMixin as o}from"../core/Evented.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{Loadable as a}from"../core/Loadable.js";import s from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import{fromPortalItem as m}from"./support/fromPortalItem.js";import c from"../time/TimeExtent.js";let h=0,b=class extends(o(i(a))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d(-180,-90,180,90,u.WGS84),this.id=Date.now().toString(16)+"-layer-"+h++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=u.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await import("./support/arcgisLayers.js")).fromUrl(e)}static fromPortalItem(t){return m(t)}initialize(){this.when().catch(t=>{l(t)||s.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const{parent:t}=this;t&&(this.parent=null,t.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:t}=this;t&&(t.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return n(this.url)}createLayerView(t,e){return Promise.reject(new r("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t){return(await e(t,{query:{f:"json"},responseType:"json"})).data}throw new r("layer:no-attribution-data","Layer does not have attribution data")}};t([p({type:String})],b.prototype,"attributionDataUrl",void 0),t([p({readOnly:!0})],b.prototype,"effectiveVisible",null),t([p({type:d})],b.prototype,"fullExtent",void 0),t([p({readOnly:!0})],b.prototype,"hasAttributionData",null),t([p({type:String,clonable:!1})],b.prototype,"id",void 0),t([p({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),t([p({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),t([p({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),t([p({clonable:!1})],b.prototype,"parent",void 0),t([p({readOnly:!0})],b.prototype,"parsedUrl",null),t([p({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),t([p({type:Boolean})],b.prototype,"popupEnabled",void 0),t([p({type:Boolean})],b.prototype,"attributionVisible",void 0),t([p({type:u})],b.prototype,"spatialReference",void 0),t([p({type:String})],b.prototype,"title",void 0),t([p({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),t([p()],b.prototype,"url",void 0),t([p({type:c})],b.prototype,"visibilityTimeExtent",void 0),t([p({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=t([y("esri.layers.Layer")],b);
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../request.js";import r from"../core/Error.js";import{EventedMixin as o}from"../core/Evented.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{Loadable as a}from"../core/Loadable.js";import s from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import{fromPortalItem as m}from"./support/fromPortalItem.js";import c from"../time/TimeExtent.js";let h=0,b=class extends(o(i(a))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d(-180,-90,180,90,u.WGS84),this.id=Date.now().toString(16)+"-layer-"+h++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=u.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await import("./support/arcgisLayers.js")).fromUrl(e)}static fromPortalItem(t){return m(t)}initialize(){this.when().catch(t=>{l(t)||s.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const{parent:t}=this;t&&(this.parent=null,t.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:t}=this;t&&(t.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return n(this.url)}createLayerView(t,e){return Promise.reject(new r("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t){return(await e(t,{query:{f:"json"},responseType:"json"})).data}throw new r("layer:no-attribution-data","Layer does not have attribution data")}};t([p({type:String})],b.prototype,"attributionDataUrl",void 0),t([p({readOnly:!0})],b.prototype,"effectiveVisible",null),t([p({type:d})],b.prototype,"fullExtent",void 0),t([p({readOnly:!0})],b.prototype,"hasAttributionData",null),t([p({type:String,clonable:!1})],b.prototype,"id",void 0),t([p({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),t([p({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),t([p({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),t([p({clonable:!1})],b.prototype,"parent",void 0),t([p({readOnly:!0})],b.prototype,"parsedUrl",null),t([p({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),t([p({type:Boolean})],b.prototype,"popupEnabled",void 0),t([p({type:Boolean})],b.prototype,"attributionVisible",void 0),t([p({type:u})],b.prototype,"spatialReference",void 0),t([p({type:String})],b.prototype,"title",void 0),t([p({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),t([p()],b.prototype,"url",void 0),t([p({type:c})],b.prototype,"visibilityTimeExtent",void 0),t([p({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=t([y("esri.layers.Layer")],b);export{b as default};
|