@arcgis/core 5.2.0-next.21 → 5.2.0-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Graphic.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js → 1040bce57ea63a6dbca4.js} +2 -2
- package/assets/esri/core/workers/chunks/1a7c0a1dc6ecc93ea03a.js +1 -0
- package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +1 -0
- package/assets/esri/core/workers/chunks/2d6d01913096f7cb5ff8.js +1 -0
- package/assets/esri/core/workers/chunks/30298f84bd414f9dea64.js +1 -0
- package/assets/esri/core/workers/chunks/353c67da4b25c29360db.js +2 -0
- package/assets/esri/core/workers/chunks/3b4fc67f6cb7393fbd97.js +1 -0
- package/assets/esri/core/workers/chunks/47948c72bc01bd173c20.js +2 -0
- package/assets/esri/core/workers/chunks/{f0519b06987471456b69.js → 502464c4eab7667f6566.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7acbc2ddff4cee8a465.js → 5ee887fc6e1e0e70e02f.js} +1 -1
- package/assets/esri/core/workers/chunks/6c0c77de1934f35dc45f.js +1 -0
- package/assets/esri/core/workers/chunks/{f7f820483e45c05ab9e4.js → 75df436e6e9773bdcfc2.js} +1 -1
- package/assets/esri/core/workers/chunks/780519b60aa674a61a74.js +1 -0
- package/assets/esri/core/workers/chunks/7dbaa089c7472825b80c.js +1 -0
- package/assets/esri/core/workers/chunks/7dec8c453fdee1968d12.js +1 -0
- package/assets/esri/core/workers/chunks/{a2247f4c3116efb16c4f.js → 7e23de8d9b2d938808f6.js} +1 -1
- package/assets/esri/core/workers/chunks/7e4093f42795ba2f8cfd.js +1 -0
- package/assets/esri/core/workers/chunks/{6649acaceab00ad30e7f.js → 8ba3e0462a9bdaae5f40.js} +1 -1
- package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +1 -0
- package/assets/esri/core/workers/chunks/9434c76ad39c936dba90.js +1 -0
- package/assets/esri/core/workers/chunks/{909e67dee8c30e391d69.js → a8310f55de4749f973d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac16016964be3b684e98.js → aded4e704e09a28edc8f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7175f0c6a6e56b685d20.js → b419fd36337e76e2d4a3.js} +6 -6
- package/assets/esri/core/workers/chunks/{05d597dd117766beadd8.js → b91a15522692781560b4.js} +1 -1
- package/assets/esri/core/workers/chunks/c86d388d216adbb15a05.js +1 -0
- package/assets/esri/core/workers/chunks/{f1ff33584680d8718400.js → c9ce408675dae6a0edd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b522e05668bef729b1b.js → ceb5bd9f2afaa2ea0808.js} +1 -1
- package/assets/esri/core/workers/chunks/d07068c44d560e4ce02e.js +1 -0
- package/assets/esri/core/workers/chunks/{da47fdffb5969694a2ae.js → d41eed41916ed0422059.js} +1 -1
- package/assets/esri/core/workers/chunks/{19493c9c7e1d2ac0f80f.js → d4e0346209fabc58f929.js} +1 -1
- package/assets/esri/core/workers/chunks/{b375abfb2a2d9c63e20a.js → db90fb8ac96579259566.js} +1 -1
- package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js → dd0acd0f8b96839b4f24.js} +2 -2
- package/assets/esri/core/workers/chunks/{5809e70a8e57e9b05959.js → dd795c95cdc3812b5b49.js} +1 -1
- package/assets/esri/core/workers/chunks/f7344d855f1092383abe.js +1 -0
- package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js → f859c53432f258af77e3.js} +2 -2
- package/assets/esri/core/workers/chunks/{ecbf84a1f42e6188faab.js → fd629872b5c07853f695.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
- 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/GaussianSplat.glsl.js +4 -4
- package/chunks/GaussianSplatShadow.glsl.js +1 -1
- package/config.d.ts +9 -2
- package/config.js +1 -1
- package/core/date.js +1 -1
- package/form/FormTemplate.d.ts +15 -20
- package/form/elements/AttachmentElement.d.ts +38 -11
- package/form/elements/Element.d.ts +9 -6
- package/form/elements/FieldElement.d.ts +0 -1
- package/form/elements/GroupElement.d.ts +4 -6
- package/form/elements/RelationshipElement.d.ts +8 -8
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +34 -18
- package/form/elements/inputs/attachments/AudioInput.d.ts +4 -3
- package/form/elements/inputs/attachments/DocumentInput.d.ts +2 -6
- package/form/elements/inputs/attachments/ImageInput.d.ts +4 -3
- package/form/elements/inputs/attachments/Input.d.ts +6 -3
- package/form/elements/inputs/attachments/SignatureInput.d.ts +3 -3
- package/form/elements/inputs/attachments/VideoInput.d.ts +4 -3
- package/form/elements.d.ts +6 -12
- package/form/types.d.ts +0 -4
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -1
- package/layers/DimensionFeatureLayer.d.ts +2 -1
- package/layers/OrientedImageryLayer.d.ts +20 -2
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/fileProviderChangedError.js +2 -0
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/types.d.ts +4 -1
- package/layers/support/RasterBandInfo.js +1 -1
- package/layers/types.d.ts +1 -0
- package/package.json +3 -3
- package/rest/support/AttachmentQuery.d.ts +13 -1
- package/rest/support/AttachmentQuery.js +1 -1
- package/rest/support/OutDistance.d.ts +5 -1
- package/rest/support/PrintParameters.d.ts +2 -1
- package/rest/support/Query.d.ts +2 -0
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/SimpleMarkerSymbol.d.ts +2 -2
- package/views/2d/engine/AFeatureContainer.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatHeaderTexture.js +2 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +13 -12
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/PopupView.d.ts +3 -0
- package/views/View2D.d.ts +2 -2
- package/views/layers/AnnotationFeatureLayerView.d.ts +9 -1
- package/views/layers/DimensionFeatureLayerView.d.ts +9 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +0 -7
- package/widgets/BatchAttributeForm.d.ts +7 -9
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +12 -2
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/compatibilityAdapters.js +2 -0
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/legacy/AddAssociationWorkflow.js +2 -0
- package/widgets/Editor/legacy/AddAssociationWorkflowData.js +2 -0
- package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +2 -0
- package/widgets/Editor/legacy/CreateFeaturesWorkflowData.js +2 -0
- package/widgets/Editor/legacy/MergeFeaturesWorkflow.js +2 -0
- package/widgets/Editor/legacy/MergeFeaturesWorkflowData.js +2 -0
- package/widgets/Editor/legacy/SplitFeatureWorkflow.js +2 -0
- package/widgets/Editor/legacy/SplitFeatureWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateFeatureWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateFeaturesWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateFeaturesWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateRecordWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateRecordWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateWorkflowData.js +2 -0
- package/widgets/Editor/legacy/Workflow.js +2 -0
- package/widgets/Editor/legacy/workflowUtils.js +2 -0
- package/widgets/Editor/types.d.ts +12 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +16 -12
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.d.ts +14 -16
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +2 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.d.ts +3 -0
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/types.d.ts +20 -0
- package/widgets/FeatureTable.d.ts +14 -2
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/057d288d795b853295f1.js +0 -2
- package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +0 -1
- package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +0 -1
- package/assets/esri/core/workers/chunks/33866e6e6de1bab64599.js +0 -1
- package/assets/esri/core/workers/chunks/360fd810d70d21c092d9.js +0 -1
- package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +0 -1
- package/assets/esri/core/workers/chunks/5aa375b0c6a205134703.js +0 -1
- package/assets/esri/core/workers/chunks/5f0bc019add4aff3130c.js +0 -1
- package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +0 -1
- package/assets/esri/core/workers/chunks/754f7ed62afc4e0a1972.js +0 -2
- package/assets/esri/core/workers/chunks/7ee76504e7fea389a1c9.js +0 -1
- package/assets/esri/core/workers/chunks/8331e04ebe0a54b04ab6.js +0 -1
- package/assets/esri/core/workers/chunks/8c64c6b8d7376a9d1c91.js +0 -1
- package/assets/esri/core/workers/chunks/c30ca771dd3f7198142b.js +0 -1
- package/assets/esri/core/workers/chunks/e5fcd8e7a4a660ef6ad6.js +0 -1
- package/assets/esri/core/workers/chunks/f47319d36f1527277923.js +0 -1
- package/assets/esri/core/workers/chunks/ff00ac01f0baaecaa890.js +0 -1
- /package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js.LICENSE.txt → 1040bce57ea63a6dbca4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{057d288d795b853295f1.js.LICENSE.txt → 353c67da4b25c29360db.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js.LICENSE.txt → 47948c72bc01bd173c20.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{754f7ed62afc4e0a1972.js.LICENSE.txt → dd0acd0f8b96839b4f24.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js.LICENSE.txt → f859c53432f258af77e3.js.LICENSE.txt} +0 -0
|
@@ -23,27 +23,43 @@ export interface AttachmentInputProperties extends Partial<Pick<AttachmentInput,
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* The `AttachmentInput` class defines a
|
|
26
|
+
* The `AttachmentInput` class defines a user interface for an attachment input. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set on the [Editor's `layerInfo.formTemplate`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/) or a [feature layer's `formTemplate`](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) and displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/). The `AttachmentInput` offers the most flexibility, and allows a number of different attachment types to be included in a single attachment element.
|
|
27
27
|
*
|
|
28
28
|
* > [!CAUTION]
|
|
29
|
-
* >
|
|
30
|
-
* >
|
|
29
|
+
* > * Input methods that are configured as only allowing `capture` are not supported on desktop devices for inputs such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/).
|
|
30
|
+
* > * For inputs such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), minimum requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
|
|
31
31
|
*
|
|
32
32
|
* @since 5.1
|
|
33
33
|
* @see [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/)
|
|
34
|
+
* @see [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/)
|
|
35
|
+
* @see [DocumentInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/DocumentInput/)
|
|
36
|
+
* @see [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/)
|
|
37
|
+
* @see [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/)
|
|
34
38
|
* @example
|
|
35
|
-
* //
|
|
39
|
+
* // Create the new input types for the general attachment input
|
|
40
|
+
* const audioInput = new AudioInput({
|
|
41
|
+
* inputMethod: "any",
|
|
42
|
+
* maxDuration: 30,
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* const imageInput = new ImageInput({
|
|
46
|
+
* inputMethod: "upload",
|
|
47
|
+
* maxImageSize: 800,
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* const documentInput = new DocumentInput({
|
|
51
|
+
* maxFileSize: 500,
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* const videoInput = new VideoInput({
|
|
55
|
+
* inputMethod: "any",
|
|
56
|
+
* maxDuration: 90,
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // Create the general attachment input that allows for multiple types of attachments
|
|
36
60
|
* const attachmentInput = new AttachmentInput({
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* type: "image",
|
|
40
|
-
* maxImageSize: 800,
|
|
41
|
-
* },
|
|
42
|
-
* { // autocastable to VideoInput
|
|
43
|
-
* type: "video",
|
|
44
|
-
* inputMethod: "capture",
|
|
45
|
-
* },
|
|
46
|
-
* ]
|
|
61
|
+
* attachmentAssociationType: "any", // Associates all existing attachments to this element.
|
|
62
|
+
* inputTypes: [documentInput, audioInput, imageInput, videoInput]
|
|
47
63
|
* });
|
|
48
64
|
*/
|
|
49
65
|
export default class AttachmentInput extends Input {
|
|
@@ -56,9 +72,9 @@ export default class AttachmentInput extends Input {
|
|
|
56
72
|
*
|
|
57
73
|
* value | description |
|
|
58
74
|
* --------------|---------------------------
|
|
59
|
-
* `any` |
|
|
60
|
-
* `exact` |
|
|
61
|
-
* `exactOrNone` | Associates
|
|
75
|
+
* `any` | Include all existing attachments associated with this feature regardless of their keyword value. This option is only available if there are no existing [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) in the form. If an attachment element has this set, additional attachment elements cannot be added to the form.
|
|
76
|
+
* `exact` | Only attachments whose keyword matches the form element's [keyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword) will be shown.
|
|
77
|
+
* `exactOrNone` | Associates attachments whose keyword matches the [attachmentKeyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword) and those that do not have a keyword. Only one attachment element with `exactOrNone` can be used within a form and it cannot be used in conjunction with any other attachment element that has an `attachmentAssociationType` value of `exact` or `any`.
|
|
62
78
|
*
|
|
63
79
|
* @default "exact"
|
|
64
80
|
* @since 5.1
|
|
@@ -78,7 +94,7 @@ export default class AttachmentInput extends Input {
|
|
|
78
94
|
get inputTypes(): NestableAttachmentInputUnion[] | null;
|
|
79
95
|
set inputTypes(value: ((AudioInputProperties & { type: "audio"; }) | (DocumentInputProperties & { type: "document"; }) | (ImageInputProperties & { type: "image"; }) | (SignatureInputProperties & { type: "signature"; }) | (VideoInputProperties & { type: "video"; }))[] | null | undefined);
|
|
80
96
|
/**
|
|
81
|
-
* The input type identifier.
|
|
97
|
+
* The input type identifier.
|
|
82
98
|
*
|
|
83
99
|
* @since 5.1
|
|
84
100
|
*/
|
|
@@ -5,11 +5,12 @@ import type { InputMethod } from "../../../../portal/jsonTypes.js";
|
|
|
5
5
|
export interface AudioInputProperties extends Partial<Pick<AudioInput, "inputMethod" | "maxDuration">> {}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* The `AudioInput` class defines a user interface for an input to which audio files can be attached.
|
|
8
|
+
* The `AudioInput` class defines a user interface for an input to which audio files can be attached.
|
|
9
9
|
*
|
|
10
10
|
* > [!CAUTION]
|
|
11
11
|
* >
|
|
12
|
-
* >
|
|
12
|
+
* > * Input methods that are configured as only allowing `capture` are not supported.
|
|
13
|
+
* > * Minimum input requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
|
|
13
14
|
*
|
|
14
15
|
* @since 5.1
|
|
15
16
|
* @see [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/)
|
|
@@ -37,7 +38,7 @@ export default class AudioInput extends Input {
|
|
|
37
38
|
*/
|
|
38
39
|
accessor maxDuration: number | null | undefined;
|
|
39
40
|
/**
|
|
40
|
-
* The input type identifier.
|
|
41
|
+
* The input type identifier.
|
|
41
42
|
*
|
|
42
43
|
* @since 5.1
|
|
43
44
|
*/
|
|
@@ -4,11 +4,7 @@ import type Input from "./Input.js";
|
|
|
4
4
|
export interface DocumentInputProperties extends Partial<Pick<DocumentInput, "maxFileSize">> {}
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The `DocumentInput` class defines a user interface for an input to which document files can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set
|
|
8
|
-
*
|
|
9
|
-
* > [!CAUTION]
|
|
10
|
-
* >
|
|
11
|
-
* > This class is not yet fully supported within the SDK and is not intended for use in development. Support will be added in an upcoming release.
|
|
7
|
+
* The `DocumentInput` class defines a user interface for an input to which document files can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set on the [Editor's `layerInfo.formTemplate`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/) or a [feature layer's `formTemplate`](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) and displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/).
|
|
12
8
|
*
|
|
13
9
|
* @since 5.1
|
|
14
10
|
* @see [DocumentInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/DocumentInput/)
|
|
@@ -28,7 +24,7 @@ export default class DocumentInput extends Input {
|
|
|
28
24
|
*/
|
|
29
25
|
accessor maxFileSize: number | null | undefined;
|
|
30
26
|
/**
|
|
31
|
-
* The input type identifier.
|
|
27
|
+
* The input type identifier.
|
|
32
28
|
*
|
|
33
29
|
* @since 5.1
|
|
34
30
|
*/
|
|
@@ -5,11 +5,12 @@ import type { InputMethod } from "../../../../portal/jsonTypes.js";
|
|
|
5
5
|
export interface ImageInputProperties extends Partial<Pick<ImageInput, "inputMethod" | "maxImageSize">> {}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* The `ImageInput` class defines a user interface for an input to which image files can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate
|
|
8
|
+
* The `ImageInput` class defines a user interface for an input to which image files can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate` and is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/).
|
|
9
9
|
*
|
|
10
10
|
* > [!CAUTION]
|
|
11
11
|
* >
|
|
12
|
-
* >
|
|
12
|
+
* > * Input methods that are configured as only allowing `capture` are not supported.
|
|
13
|
+
* > * Minimum input requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
|
|
13
14
|
*
|
|
14
15
|
* @since 5.1
|
|
15
16
|
* @see [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/)
|
|
@@ -37,7 +38,7 @@ export default class ImageInput extends Input {
|
|
|
37
38
|
*/
|
|
38
39
|
accessor maxImageSize: number | null | undefined;
|
|
39
40
|
/**
|
|
40
|
-
* The input type identifier.
|
|
41
|
+
* The input type identifier.
|
|
41
42
|
*
|
|
42
43
|
* @since 5.1
|
|
43
44
|
*/
|
|
@@ -5,15 +5,18 @@ import type { AttachmentInputType } from "./types.js";
|
|
|
5
5
|
/** @since 5.1 */
|
|
6
6
|
export default abstract class Input extends InputSuperclass {
|
|
7
7
|
/**
|
|
8
|
-
* The type of [input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/).
|
|
8
|
+
* The type of [input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/). This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set on the [Editor's `layerInfo.formTemplate`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/) or a [feature layer's `formTemplate`](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) and displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/).
|
|
9
|
+
*
|
|
10
|
+
* > [!CAUTION]
|
|
11
|
+
* > * Input methods that are configured as only allowing `capture` are not supported on desktop devices for inputs such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/).
|
|
12
|
+
* > * For inputs such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), minimum requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
|
|
9
13
|
*
|
|
10
14
|
* Possible Value | Description
|
|
11
15
|
* ---------------|-------------
|
|
12
|
-
* attachment | The user interface for
|
|
16
|
+
* attachment | The user interface for a general [attachment input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/) to attach multiple different types of files.
|
|
13
17
|
* audio | The user interface for an [audio](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/) input.
|
|
14
18
|
* document | The user interface for a [document](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/DocumentInput/) input.
|
|
15
19
|
* image | The user interface for an [image](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/) input.
|
|
16
|
-
* signature | The user interface for a [signature](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/SignatureInput/) input.
|
|
17
20
|
* video | The user interface for a [video](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/) input.
|
|
18
21
|
*
|
|
19
22
|
* @since 5.1
|
|
@@ -5,11 +5,11 @@ import type { InputMethod } from "../../../../portal/jsonTypes.js";
|
|
|
5
5
|
export interface SignatureInputProperties extends Partial<Pick<SignatureInput, "inputMethod">> {}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* The `SignatureInput` class defines a user interface for an input to which a signature can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate
|
|
8
|
+
* The `SignatureInput` class defines a user interface for an input to which a signature can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate` and is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/).
|
|
9
9
|
*
|
|
10
10
|
* > [!CAUTION]
|
|
11
11
|
* >
|
|
12
|
-
* > This class is not
|
|
12
|
+
* > This class is not fully supported within the SDK and is not intended for use in development.
|
|
13
13
|
*
|
|
14
14
|
* @since 5.1
|
|
15
15
|
* @see [SignatureInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/SignatureInput/)
|
|
@@ -30,7 +30,7 @@ export default class SignatureInput extends Input {
|
|
|
30
30
|
*/
|
|
31
31
|
accessor inputMethod: InputMethod;
|
|
32
32
|
/**
|
|
33
|
-
* The input type identifier.
|
|
33
|
+
* The input type identifier.
|
|
34
34
|
*
|
|
35
35
|
* @since 5.1
|
|
36
36
|
*/
|
|
@@ -5,11 +5,12 @@ import type { InputMethod } from "../../../../portal/jsonTypes.js";
|
|
|
5
5
|
export interface VideoInputProperties extends Partial<Pick<VideoInput, "inputMethod" | "maxDuration">> {}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* The `VideoInput` class defines a user interface for an input to which a video file can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate
|
|
8
|
+
* The `VideoInput` class defines a user interface for an input to which a video file can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate` and is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/).
|
|
9
9
|
*
|
|
10
10
|
* > [!CAUTION]
|
|
11
11
|
* >
|
|
12
|
-
* >
|
|
12
|
+
* > * Input methods that are configured as only allowing `capture` are not supported.
|
|
13
|
+
* > * Minimum input requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
|
|
13
14
|
*
|
|
14
15
|
* @since 5.1
|
|
15
16
|
* @see [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/)
|
|
@@ -37,7 +38,7 @@ export default class VideoInput extends Input {
|
|
|
37
38
|
*/
|
|
38
39
|
accessor maxDuration: number | null | undefined;
|
|
39
40
|
/**
|
|
40
|
-
* The input type identifier.
|
|
41
|
+
* The input type identifier.
|
|
41
42
|
*
|
|
42
43
|
* @since 5.1
|
|
43
44
|
*/
|
package/form/elements.d.ts
CHANGED
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
* import GroupElement from "@arcgis/core/form/elements/GroupElement.js";
|
|
9
9
|
* import RelationshipElement from "@arcgis/core/form/elements/RelationshipElement.js";
|
|
10
10
|
* import TextElement from "@arcgis/core/form/elements/TextElement.js";
|
|
11
|
+
* import AttachmentElement from "@arcgis/core/form/elements/AttachmentElement.js";
|
|
11
12
|
* ```
|
|
12
13
|
*
|
|
13
14
|
* You can use this module to import them on a single line:
|
|
14
15
|
*
|
|
15
16
|
* ```js
|
|
16
|
-
* import { FieldElement, GroupElement, RelationshipElement, TextElement } from "@arcgis/core/form/elements.js";
|
|
17
|
+
* import { FieldElement, GroupElement, RelationshipElement, TextElement, AttachmentElement } from "@arcgis/core/form/elements.js";
|
|
17
18
|
* ```
|
|
18
19
|
*
|
|
19
20
|
* This module also allows you to implement [type guards](https://basarat.gitbook.io/typescript/type-system/typeguard)
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
* console.log("Form element type is field");
|
|
28
29
|
* }
|
|
29
30
|
* else {
|
|
30
|
-
* // The compiler knows the content element must be `field | group | relationship`
|
|
31
|
+
* // The compiler knows the content element must be `field | group | relationship | attachment | text | utilityNetworkAssociations`
|
|
31
32
|
* console.log("The value is not a valid form element.")
|
|
32
33
|
* }
|
|
33
34
|
* }
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
*
|
|
36
37
|
* @since 4.16
|
|
37
38
|
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
|
|
39
|
+
* @see [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/)
|
|
38
40
|
* @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
|
|
39
41
|
* @see [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/)
|
|
40
42
|
* @see [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/)
|
|
@@ -81,22 +83,14 @@ export type TextElement = TextElementClass;
|
|
|
81
83
|
/**
|
|
82
84
|
* `AttachmentElement` defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.
|
|
83
85
|
*
|
|
84
|
-
*
|
|
85
|
-
* >
|
|
86
|
-
* > The `attachment` element is not yet fully supported within the SDK and is not intended for use in development. Support will be added in an upcoming release.
|
|
87
|
-
*
|
|
88
|
-
* @internal
|
|
86
|
+
* @since 5.1
|
|
89
87
|
*/
|
|
90
88
|
export const AttachmentElement: typeof AttachmentElementClass;
|
|
91
89
|
|
|
92
90
|
/**
|
|
93
91
|
* `AttachmentElement` defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.
|
|
94
92
|
*
|
|
95
|
-
*
|
|
96
|
-
* >
|
|
97
|
-
* > The `attachment` element is not yet fully supported within the SDK and is not intended for use in development. Support will be added in an upcoming release.
|
|
98
|
-
*
|
|
99
|
-
* @internal
|
|
93
|
+
* @since 5.1
|
|
100
94
|
*/
|
|
101
95
|
export type AttachmentElement = AttachmentElementClass;
|
|
102
96
|
|
package/form/types.d.ts
CHANGED
|
@@ -8,10 +8,6 @@ import type UtilityNetworkAssociationsElement from "./elements/UtilityNetworkAss
|
|
|
8
8
|
/**
|
|
9
9
|
* Form element types.
|
|
10
10
|
*
|
|
11
|
-
* > [!CAUTION]
|
|
12
|
-
* >
|
|
13
|
-
* > * The `AttachmentElement` is not yet fully supported by the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) widget.
|
|
14
|
-
*
|
|
15
11
|
* @since 5.0
|
|
16
12
|
* @see [Web Map Specification - formInfo](https://developers.arcgis.com/web-map-specification/objects/formInfo/)
|
|
17
13
|
*/
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
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.2";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.2.0-next.
|
|
2
|
+
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.2";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.2.0-next.23",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};
|
|
@@ -107,7 +107,8 @@ export interface AnnotationFeatureLayerEvents extends EditBusLayerEvents, Refres
|
|
|
107
107
|
* > **Known Limitations**
|
|
108
108
|
* > The following features are not currently supported at this release. Future releases will see increased functionality and support for additional features.
|
|
109
109
|
* > * Editing
|
|
110
|
-
* > *
|
|
110
|
+
* > * [AnnotationFeatureLayerView.featureEffect](https://developers.arcgis.com/javascript/latest/references/core/views/layers/AnnotationFeatureLayerView/#featureEffect)
|
|
111
|
+
* > * [AnnotationFeatureLayerView.filter](https://developers.arcgis.com/javascript/latest/references/core/views/layers/AnnotationFeatureLayerView/#filter)
|
|
111
112
|
*
|
|
112
113
|
* @beta
|
|
113
114
|
* @since 5.1
|
|
@@ -76,7 +76,8 @@ export interface DimensionFeatureLayerEvents extends EditBusLayerEvents, Refresh
|
|
|
76
76
|
* > **Known Limitations**
|
|
77
77
|
* > The following features are not currently supported at this release. Future releases will see increased functionality and support for additional features.
|
|
78
78
|
* > * Editing
|
|
79
|
-
* > *
|
|
79
|
+
* > * [DimensionFeatureLayerView.featureEffect](https://developers.arcgis.com/javascript/latest/references/core/views/layers/DimensionFeatureLayerView/#featureEffect)
|
|
80
|
+
* > * [DimensionFeatureLayerView.filter](https://developers.arcgis.com/javascript/latest/references/core/views/layers/DimensionFeatureLayerView/#filter)
|
|
80
81
|
*
|
|
81
82
|
* @beta
|
|
82
83
|
* @since 5.1
|
|
@@ -6,7 +6,7 @@ import type FieldConfiguration from "./support/FieldConfiguration.js";
|
|
|
6
6
|
import type PortalItem from "../portal/PortalItem.js";
|
|
7
7
|
import type FeatureSet from "../rest/support/FeatureSet.js";
|
|
8
8
|
import type { LayerSaveAsOptions, LayerSaveOptions } from "./types.js";
|
|
9
|
-
import type { ConstantElevation as IConstantElevation, ElevationSource as IElevationSource, Accuracy, OrientedImageryType, TimeIntervalUnit } from "./orientedImagery/types.js";
|
|
9
|
+
import type { ConstantElevation as IConstantElevation, ElevationSource as IElevationSource, Accuracy, OrientedImageryType, TimeIntervalUnit, SequenceOrderFieldInfoJSON } from "./orientedImagery/types.js";
|
|
10
10
|
import type { PortalItemProperties } from "../portal/PortalItem.js";
|
|
11
11
|
import type { RequestOptions } from "../request/types.js";
|
|
12
12
|
import type { QueryProperties } from "../rest/support/Query.js";
|
|
@@ -15,7 +15,7 @@ import type { FieldProperties } from "./support/Field.js";
|
|
|
15
15
|
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
|
|
16
16
|
import type { FeatureLayerProperties } from "./FeatureLayer.js";
|
|
17
17
|
|
|
18
|
-
export interface OrientedImageryLayerProperties extends FeatureLayerProperties, Partial<Pick<OrientedImageryLayer, "cameraHeading" | "cameraHeight" | "cameraPitch" | "cameraRoll" | "coveragePercent" | "demPathPrefix" | "demPathSuffix" | "depthImagePathPrefix" | "depthImagePathSuffix" | "elevationSource" | "farDistance" | "horizontalFieldOfView" | "horizontalMeasurementUnit" | "imagePathPrefix" | "imagePathSuffix" | "imageRotation" | "maximumDistance" | "nearDistance" | "orientationAccuracy" | "orientedImageryType" | "timeIntervalUnit" | "verticalFieldOfView" | "verticalMeasurementUnit" | "videoPathPrefix" | "videoPathSuffix">> {
|
|
18
|
+
export interface OrientedImageryLayerProperties extends FeatureLayerProperties, Partial<Pick<OrientedImageryLayer, "cameraHeading" | "cameraHeight" | "cameraPitch" | "cameraRoll" | "coveragePercent" | "demPathPrefix" | "demPathSuffix" | "depthImagePathPrefix" | "depthImagePathSuffix" | "elevationSource" | "farDistance" | "horizontalFieldOfView" | "horizontalMeasurementUnit" | "imagePathPrefix" | "imagePathSuffix" | "imageRotation" | "maximumDistance" | "nearDistance" | "orientationAccuracy" | "orientedImageryType" | "sequenceOrderFields" | "timeIntervalUnit" | "verticalFieldOfView" | "verticalMeasurementUnit" | "videoPathPrefix" | "videoPathSuffix">> {
|
|
19
19
|
/**
|
|
20
20
|
* Copyright information for the layer.
|
|
21
21
|
*
|
|
@@ -954,6 +954,24 @@ export default class OrientedImageryLayer extends __FeatureLayerSansType {
|
|
|
954
954
|
*/
|
|
955
955
|
get portalItem(): PortalItem | null | undefined;
|
|
956
956
|
set portalItem(value: PortalItemProperties | null | undefined);
|
|
957
|
+
/**
|
|
958
|
+
* Determines the order in which images/records in the layer will be available for sequential navigation in the viewer. You can sort features by one or multiple fields in ascending (asc) or descending (desc) order. The sequential navigation tool is enabled only when this property has a valid value. If the property is null (default), the tool remains disabled and is not available for use.
|
|
959
|
+
*
|
|
960
|
+
* @since 5.1
|
|
961
|
+
* @example
|
|
962
|
+
* // features ordered using two fields - AssetGroup and SequenceOrder
|
|
963
|
+
* layer.sequenceOrderFields = [
|
|
964
|
+
* {
|
|
965
|
+
* field: "AssetGroup",
|
|
966
|
+
* order: "asc",
|
|
967
|
+
* },
|
|
968
|
+
* {
|
|
969
|
+
* field: "SequenceOrder",
|
|
970
|
+
* order: "desc",
|
|
971
|
+
* },
|
|
972
|
+
* ];
|
|
973
|
+
*/
|
|
974
|
+
accessor sequenceOrderFields: SequenceOrderFieldInfoJSON[];
|
|
957
975
|
/**
|
|
958
976
|
* The spatial reference of the layer. The default value is WGS84.
|
|
959
977
|
* This property can be set explicitly to project the longitude and latitude
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{clone as i}from"../core/lang.js";import{setDeepValue as r}from"../core/object.js";import{property as o,subclass as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{clone as i}from"../core/lang.js";import{setDeepValue as r}from"../core/object.js";import{property as o,subclass as n}from"../core/accessorSupport/decorators.js";import a from"../geometry/SpatialReference.js";import s from"../graphic/OrientedImageryGraphicOrigin.js";import p from"./FeatureLayer.js";import{useViewTimeProperty as l}from"./mixins/TemporalLayer.js";import{getEffectiveElevationSource as d,parseSequenceOrderFields as m,orientedImageryTypeMap as y,timeIntervalUnitTypeMap as u,verticalMeasurementTypeMap as c,isOrientationAccuracy as h,padAccuracyArray as f}from"./orientedImagery/core/utils.js";import g from"./support/Field.js";import v from"../tables/AttributeTableTemplate.js";import j from"../time/TimeExtent.js";const S=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","sequenceOrderFields","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),P=new Set(["elevationSource"]),I=(e,t)=>!S.has(t)&&e,O=(e,t,i)=>{const r=`orientedImageryProperties.${e}`,o={allowNull:P.has(e),ignoreOrigin:!0};return{name:r,write:t?{...o,target:r,writer:t}:o,read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function b(e){return e.json?(e.json.origins=e.json.origins??{},e.json.origins["web-scene"]={write:!1,read:!1},e):e}function x(e,t,i,r){const{name:o,write:n,read:a}=O(e,t,i),s={name:o,write:n,read:a,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:I(n,e),read:I(a,e)},"web-map":{name:o,write:n,read:a}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}function w(e,t,i){e?.length&&r(i,e,t)}let F=class extends p{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new s(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.sequenceOrderFields=[],this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return d(e,t,i)}get effectiveSequenceOrderField(){const{sequenceOrderField:e,fields:t,sequenceOrderFields:i}=this;return m(e,t,i)}get fieldConfigurations(){return super.fieldConfigurations}set fieldConfigurations(e){super.fieldConfigurations=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:v,json:{write:!1,read:!1}})],F.prototype,"attributeTableTemplate",void 0),e([o({type:Number,json:x("cameraHeading")})],F.prototype,"cameraHeading",void 0),e([o({type:Number,json:x("cameraHeight")})],F.prototype,"cameraHeight",void 0),e([o({type:Number,json:x("cameraPitch")})],F.prototype,"cameraPitch",void 0),e([o({type:Number,json:x("cameraRoll")})],F.prototype,"cameraRoll",void 0),e([o({type:Number,json:x("coveragePercent")})],F.prototype,"coveragePercent",void 0),e([o({type:String,json:x("demPathPrefix")})],F.prototype,"demPathPrefix",void 0),e([o({type:String,json:x("demPathSuffix")})],F.prototype,"demPathSuffix",void 0),e([o({type:String,json:x("depthImagePathPrefix")})],F.prototype,"depthImagePathPrefix",void 0),e([o({type:String,json:x("depthImagePathSuffix")})],F.prototype,"depthImagePathSuffix",void 0),e([o({type:Object,json:x("elevationSource")})],F.prototype,"elevationSource",void 0),e([o({readOnly:!0})],F.prototype,"effectiveElevationSource",null),e([o({readOnly:!0})],F.prototype,"effectiveSequenceOrderField",null),e([o({type:Number,json:x("farDistance")})],F.prototype,"farDistance",void 0),e([o({type:[g]})],F.prototype,"fields",void 0),e([o()],F.prototype,"geometryType",void 0),e([o({readOnly:!0,clonable:!1})],F.prototype,"graphicOrigin",void 0),e([o({type:Number,json:x("horizontalFieldOfView")})],F.prototype,"horizontalFieldOfView",void 0),e([o({type:String,json:x("horizontalMeasurementUnit")})],F.prototype,"horizontalMeasurementUnit",void 0),e([o({type:String,json:{...x("imageGeometryField"),default:"ImageGeometry"}})],F.prototype,"imageGeometryField",void 0),e([o({type:String,json:x("imagePathPrefix")})],F.prototype,"imagePathPrefix",void 0),e([o({type:String,json:x("imagePathSuffix")})],F.prototype,"imagePathSuffix",void 0),e([o({type:String,json:{...x("imageReferenceField"),default:"OIObjectID"}})],F.prototype,"imageReferenceField",void 0),e([o({type:Number,json:x("imageRotation")})],F.prototype,"imageRotation",void 0),e([o({type:Number,json:x("maximumDistance")})],F.prototype,"maximumDistance",void 0),e([o({type:Number,json:x("nearDistance")})],F.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],F.prototype,"operationalLayerType",void 0),e([o({json:{...x("orientationAccuracy",(e,t,i)=>{r(i,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return h(t)?f(t):[0,0,0,0,0,0,0,0]},String)}})],F.prototype,"orientationAccuracy",void 0),e([o({json:{...x("orientedImageryType",y.write,y.read,y.jsonValues.slice(1))}})],F.prototype,"orientedImageryType",void 0),e([o({type:String,json:{...x("referenceIDField"),default:"OBJECTID"}})],F.prototype,"referenceIDField",void 0),e([o({type:String,json:{...x("sequenceOrderField"),default:"SequenceOrder"}})],F.prototype,"sequenceOrderField",void 0),e([o({json:{...x("sequenceOrderFields",w),default:[]}})],F.prototype,"sequenceOrderFields",void 0),e([o({type:a})],F.prototype,"spatialReference",void 0),e([o({readOnly:!0})],F.prototype,"subtypeField",void 0),e([o({readOnly:!0})],F.prototype,"subtypes",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],F.prototype,"type",void 0),e([o({type:u.apiValues,json:{...x("timeIntervalUnit",u.write,u.read,u.jsonValues)}})],F.prototype,"timeIntervalUnit",void 0),e([o(b(i(l)))],F.prototype,"useViewTime",void 0),e([o({type:Number,json:x("verticalFieldOfView")})],F.prototype,"verticalFieldOfView",void 0),e([o({type:c.apiValues,json:{...x("verticalMeasurementUnit",c.write,c.read,c.jsonValues)}})],F.prototype,"verticalMeasurementUnit",void 0),e([o({type:Number,json:x("verticalSearchRange")})],F.prototype,"verticalSearchRange",void 0),e([o({type:String,json:x("videoPathPrefix")})],F.prototype,"videoPathPrefix",void 0),e([o({type:String,json:x("videoPathSuffix")})],F.prototype,"videoPathSuffix",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],F.prototype,"virtualCacheDirectory",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],F.prototype,"dataStoreID",void 0),e([o({type:j,json:{origins:{"web-scene":{write:!1,read:!1}}}})],F.prototype,"visibilityTimeExtent",void 0),F=e([n("esri.layers.OrientedImageryLayer")],F);const T=F;export{T as default};
|
package/layers/ParquetLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import i from"../core/Collection.js";import{deprecatedProperty as o}from"../core/deprecate.js";import s from"../core/Error.js";import has from"../core/has.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import i from"../core/Collection.js";import{deprecatedProperty as o}from"../core/deprecate.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../core/accessorSupport/decorators/writer.js";import y from"../geometry/Extent.js";import c from"../geometry/SpatialReference.js";import f from"../graphic/ParquetGraphicOrigin.js";import h from"./Layer.js";import{ParquetSource as g}from"./graphics/sources/ParquetSource.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as b}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as v}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as O}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{ScaleRangeLayer as q}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as E,legendEnabled as I,popupEnabled as P}from"./support/commonProperties.js";import F from"./support/FeatureTemplate.js";import T from"./support/Field.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import{fixRendererFields as S}from"./support/fieldUtils.js";import _ from"./support/GeometryEncodingLocation.js";import R from"./support/GeometryEncodingWkb.js";import D from"./support/LabelClass.js";import{reader as z}from"./support/labelingInfo.js";import U from"./support/ParquetFilesData.js";import C from"./support/ParquetPortalItemData.js";import{parquetGeometryTypeKebabDict as Q}from"./support/parquetUtils.js";import{rendererTypes as k}from"../renderers/support/typeUtils.js";import G from"../rest/support/Query.js";import{createPopupTemplate as J}from"../support/popupUtils.js";const M=L(),N="__OBJECTID",V={types:{key:"type",base:null,typeMap:{wkb:R,location:_}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let A=class extends(v(b(j(x(q(O(p(w(t(h)))))))))){constructor(e){super(e),this._emptyUrls=new i,this.copyright=null,this.definitionExpression=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new f(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=N,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!has("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.title="Parquet",this.type="parquet",this.data=null}initialize(){this.addHandles(l(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,t,i){const o=e.filter(e=>!(e.name===N&&"oid"===e.type)).map(e=>e.toJSON(i));n(t,o,r)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){S(e,this.fieldsIndex),this._set("renderer",e)}writeData(e,r,t,i){if(!e)return;const o=e.write({},i);"portal-item"!==o.type?o.urls.length&&(r.source=o):i.messages?.push(new s("parquet-layer:unsupported-data","Portal-item-backed Parquet data is not yet supported in web maps",{layer:this}))}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){o(a.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new U({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return J(this,e)}createQuery(){const e=new G;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const r=new g({layer:this});return await r.load(e),r}getFieldDomain(e,r){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,r){await this.load();const t=await this.source.queryFeatures(this._normalizeQuery(e),r),i=this.graphicOrigin;if(t?.features)for(const o of t.features)o.layer=o.sourceLayer=this,o.origin=i;return t}async queryObjectIds(e,r){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),r)}async queryFeatureCount(e,r){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),r)}async queryExtent(e,r){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),r)}_normalizeQuery(e){return G.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new i(e):e??new i}async _load(e){"portal-item"===this.data?.type&&await this.data.portalItem.load();const r=await this.createSource(e);this._set("source",r),this.read(r.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),S(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=c.WGS84)}};e([u({readOnly:!0,json:{read:!1,write:!1}})],A.prototype,"capabilities",null),e([u({type:String})],A.prototype,"copyright",void 0),e([u({readOnly:!0})],A.prototype,"defaultPopupTemplate",null),e([u({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],A.prototype,"definitionExpression",void 0),e([u()],A.prototype,"displayOptimization",void 0),e([u({type:[T],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],A.prototype,"fields",void 0),e([m("fields")],A.prototype,"writeFields",null),e([u(M.fieldsIndex)],A.prototype,"fieldsIndex",void 0),e([u(V)],A.prototype,"geometryEncoding",void 0),e([u({type:y,json:{name:"extent"}})],A.prototype,"fullExtent",void 0),e([u({type:Q.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:Q.read},write:{writer:Q.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:Q.read}}}}})],A.prototype,"geometryType",void 0),e([u({readOnly:!0,clonable:!1})],A.prototype,"graphicOrigin",void 0),e([u(E)],A.prototype,"labelsVisible",void 0),e([u({type:[D],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:z},write:!0}})],A.prototype,"labelingInfo",void 0),e([u(I)],A.prototype,"legendEnabled",void 0),e([u()],A.prototype,"file",void 0),e([u({type:String,readOnly:!0})],A.prototype,"objectIdField",void 0),e([u({type:["ParquetLayer"]})],A.prototype,"operationalLayerType",void 0),e([u(M.outFields)],A.prototype,"outFields",void 0),e([u(P)],A.prototype,"popupEnabled",void 0),e([u({type:r,json:{name:"popupInfo",write:!0}})],A.prototype,"popupTemplate",void 0),e([u({types:k,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],A.prototype,"renderer",null),e([u({type:g,readOnly:!0,cast:null,json:{read:!1}})],A.prototype,"source",void 0),e([u({type:c,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],A.prototype,"spatialReference",void 0),e([u({type:[F]})],A.prototype,"templates",void 0),e([u()],A.prototype,"title",void 0),e([u({json:{read:!1},readOnly:!0})],A.prototype,"type",void 0),e([u({types:{key:"type",base:null,typeMap:{files:U,"portal-item":C}},json:{name:"source",origins:{"web-map":{write:{target:"source",ignoreOrigin:!0}}}}})],A.prototype,"data",void 0),e([m("web-map","data")],A.prototype,"writeData",null),e([u({type:i.ofType(String),json:{read:!1,write:!1}})],A.prototype,"urls",null),A=e([d("esri.layers.ParquetLayer")],A);export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{EventedMixin as r}from"../../../core/Evented.js";import{Loadable as s}from"../../../core/Loadable.js";import o from"../../../core/Logger.js";import{throwIfAborted as a}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{open as n}from"../../../core/workers.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import y from"../../../geometry/Extent.js";import{createFileProviderSchema as l,toParquetJSONGeometryType as p}from"../../support/parquetUtils.js";import m from"../../../rest/support/FeatureSet.js";let d=class extends(r(s)){constructor(t){super(t),this.type="parquet"}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._initialize(e)),this.addHandles([i(()=>this.layer.data,async t=>{t&&await this._proxy.updateFileProvider(await l(t))}),i(()=>this.layer.customParameters,t=>this._setCustomParameters(t))]),Promise.resolve(this)}async reload(t){const e=await this._createLoadParameters(t);return this._proxy.reload(e)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeaturesJSON(t,e={}){return await this.load(e),this._proxy.queryFeatures(t.toJSON(),{signal:e?.signal})}async queryFeatures(t,e={}){const r=await this.queryFeaturesJSON(t,{signal:e?.signal});return m.fromJSON(r)}async queryObjectIds(t,e){return await this._proxy.queryObjectIds(t.toJSON(),{signal:e?.signal})}async queryFeatureCount(t,e){return this._proxy.queryFeatureCount(t.toJSON(),{signal:e?.signal})}async queryExtent(t,e){if(null==this.layer.geometryEncoding)return o.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(t.toJSON(),{signal:e?.signal});return{count:r.count,extent:y.fromJSON(r.extent)}}async _initialize(t){const e={onSourceChange:()=>this.emit("source-changed")};this._connection=await n("ParquetSourceWorker",{strategy:"dedicated",signal:t,registryTarget:this,client:e}),a(t),this._proxy=this._connection.createInvokeProxy();const r=await this._createLoadParameters(t),{layerDefinition:s,capabilities:o}=await this._proxy.load(r);a(t),this.sourceJSON=s,this.capabilities=o}async _createLoadParameters(t){if(!this.layer.data)throw new e("parquet:missing-data","A data source must be specified",this.layer);const r=await l(this.layer.data,{signal:t});return a(t),{provider:r,fields:this.layer.fields?.map(t=>t.toJSON()),geometryType:this.layer.geometryType?p(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters}}_setCustomParameters(t){this._proxy.setCustomParameters(t).catch(()=>{o.getLogger(this).warn("Failed to update customParameters")})}_queryStream(t,e){return this._proxy.queryStream(t,e)}_getStreamNextFeatures(t,e){return this._proxy.getStreamNextFeatures(t,e)}};t([c()],d.prototype,"type",void 0),t([c({constructOnly:!0})],d.prototype,"layer",void 0),t([c()],d.prototype,"sourceJSON",void 0),t([c()],d.prototype,"capabilities",void 0),d=t([u("esri.layers.graphics.sources.ParquetSource")],d);export{d as ParquetSource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../request.js";import{createTask as t}from"../../../../core/asyncUtils.js";import s from"../../../../core/Error.js";import i from"../../../../core/Logger.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{getJsonType as n}from"../../../../geometry/support/jsonTypeUtils.js";import{wgs84 as a,equals as o}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as u,convertToGeometry as l,convertFromFeatures as d,convertToFeature as p,convertFromFeature as c}from"../../featureConversionUtils.js";import y from"../../data/FeatureStore.js";import{checkProjectionSupport as f,project as m}from"../../data/projectionSupport.js";import{QueryEngine as h}from"../../data/QueryEngine.js";import{inferLayerProperties as g,createOptimizedFeatures as _,validateGeoJSON as I}from"./geojson.js";import{createDefaultTemplate as E,createDefaultAttributesFunction as F,createDrawingInfo as j}from"../support/clientSideDefaults.js";import{queryBinsCapabilities as T,loadGeometryEngineForSimplify as b,mixAttributes as w,createFeatureEditSuccessResult as q,createFeatureEditErrorResult as x,simplify as S}from"../support/sourceUtils.js";import R from"../../../support/FieldsIndex.js";import{kebabDict as C}from"../../../support/fieldType.js";import{getFieldDefaultValue as A,getFieldDefaultLength as O}from"../../../support/fieldUtils.js";import{utc as Q}from"../../../../time/constants.js";const k={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentsCountOnly:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsOutDistance:!1,supportsQueryWithResultType:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0},queryBinsCapabilities:T};class D{constructor(){this._featureIdInfo=null,this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const i=[],[r]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=g(r,{geometryType:e.geometryType}),o=e.fields||n.fields||[],u=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let d=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const p=e.spatialReference||a;let c=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const f=new R(o);let m=f.get(d);m?("esriFieldTypeString"!==m.type&&(m.type="esriFieldTypeOID"),m.editable=!1,m.nullable=!1,d=m.name):(m={alias:d,name:d,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(m));const _={};for(const a of o){if(null==a.name&&(a.name=a.alias),null==a.alias&&(a.alias=a.name),!a.name)throw new s("geojson-layer:invalid-field-name","field name is missing",{field:a});if(!C.jsonValues.includes(a.type))throw new s("geojson-layer:invalid-field-type",`invalid type for field "${a.name}"`,{field:a});if(a.name!==m.name){const e=A(a);void 0!==e&&(_[a.name]=e)}null==a.length&&(a.length=O(a))}if(c){if(c.startTimeField){const e=f.get(c.startTimeField);e?(c.startTimeField=e.name,e.type="esriFieldTypeDate"):c.startTimeField=null}if(c.endTimeField){const e=f.get(c.endTimeField);e?(c.endTimeField=e.name,e.type="esriFieldTypeDate"):c.endTimeField=null}if(c.trackIdField){const e=f.get(c.trackIdField);e?c.trackIdField=e.name:(c.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:c}}))}c.startTimeField||c.endTimeField||(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:c}}),c=null)}const I=l?j(l):void 0,T=f.dateFields.length?{timeZoneIANA:Q}:null,b={warnings:i,featureErrors:[],layerDefinition:{...k,drawingInfo:I??void 0,templates:E(_),extent:void 0,geometryType:l,objectIdField:d,fields:o,hasZ:!!u,timeInfo:c,dateFieldsTimeReference:T}};this._featureIdInfo={type:"object-id",fieldName:d},this._queryEngine=new h({fieldsIndex:R.fromLayerJSON({fields:o,timeInfo:c,dateFieldsTimeReference:T}),geometryType:l,hasM:!1,hasZ:u,featureIdInfo:this._featureIdInfo,spatialReference:p,timeInfo:c,featureStore:new y({geometryType:l,hasM:!1,hasZ:u})});const w=this._queryEngine.fieldsIndex.requiredFields.indexOf(m);w>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(w,1),this._createDefaultAttributes=F(_,d);const q=this._createFeatures(r);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,q);const x=this._normalizeFeatures(q,b.featureErrors);this._queryEngine.featureStore.addMany(x);const{fullExtent:S,timeExtent:D}=await this._queryEngine.fetchRecomputedExtents();if(b.layerDefinition.extent=S,D){const{start:e,end:t}=D;b.layerDefinition.timeInfo.timeExtent=[e,t]}return b}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([b(t,s),f(e.adds,t),f(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=t(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)},e=>{this._queryEngine.featureStore.clear(),r(e)||i.getLogger("esri.layers.GeoJSONLayer").error(new s("geojson-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a}}_createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s}=this._queryEngine,i=this._featureIdInfo.fieldName,r=_(e,{geometryType:t,hasZ:s,objectIdField:i});if(!o(this._queryEngine.spatialReference,a))for(const n of r)null!=n.geometry&&(n.geometry=u(m(l(n.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),a,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:s,customParameters:i}=this._loadOptions,r=(await e(s??"",{responseType:"json",query:{...i},signal:t})).data;return I(r),r}_normalizeFeatures(e,t){const{fieldsIndex:s}=this._queryEngine,i=[],r=this._featureIdInfo.fieldName;for(const n of e){const e=this._createDefaultAttributes(),a=w(s,e,n.attributes,!0);a?t?.push(a):(this._assignObjectId(e,n.attributes,!0),n.attributes=e,n.objectId=e[r],i.push(n))}return i}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),i?.length){for(const e of i)r.deleteResults.push(q(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,spatialReference:o,featureStore:u,fieldsIndex:l}=this._queryEngine,p=this._featureIdInfo.fieldName,c=[];for(const d of t){if(d.geometry&&i!==n(d.geometry)){s.push(x("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=w(l,t,d.attributes);if(r)s.push(r);else{if(this._assignObjectId(t,d.attributes),d.attributes=t,null!=d.uid){const t=d.attributes[p];e.uidToObjectId[d.uid]=t}if(null!=d.geometry){const e=d.geometry.spatialReference??o;d.geometry=m(S(d.geometry,e),e,o)}c.push(d),s.push(q(d.attributes[p]))}}u.addMany(d([],c,i,a,r,this._featureIdInfo))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,spatialReference:a,featureStore:o,fieldsIndex:u}=this._queryEngine,l=this._featureIdInfo.fieldName;for(const d of t){const{attributes:t,geometry:y}=d,f=t?.[l];if(null==f){e.push(x(`Identifier field ${l} missing`));continue}if(!o.has(f)){e.push(x(`Feature with object id ${f} missing`));continue}const h=p(o.getFeature(f),s,r,i);if(null!=y){if(s!==n(y)){e.push(x("Incorrect geometry type."));continue}const t=y.spatialReference??a;h.geometry=m(S(y,t),t,a)}if(t){const s=w(u,h.attributes,t);if(s){e.push(s);continue}}o.add(c(h,s,r,i,this._featureIdInfo)),e.push(q(f))}}_createObjectIdGenerator(e,t){const s=this._featureIdInfo.fieldName,i=e.fieldsIndex.get(s);if("esriFieldTypeString"===i.type)return()=>i.name+"-"+Date.now().toString(16);let r=Number.NEGATIVE_INFINITY;for(const n of t)n.objectId&&(r=Math.max(r,n.objectId));return r=Math.max(0,r)+1,()=>r++}_assignObjectId(e,t,s=!1){const i=this._featureIdInfo.fieldName;e[i]=s&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await f(a,e)}catch{throw new s("geojson-layer","Projection not supported")}}}export{D as default};
|
|
2
|
+
import e from"../../../../request.js";import{createTask as t}from"../../../../core/asyncUtils.js";import s from"../../../../core/Error.js";import i from"../../../../core/Logger.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{getJsonType as n}from"../../../../geometry/support/jsonTypeUtils.js";import{wgs84 as a,equals as o}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as u,convertToGeometry as l,convertFromFeatures as d,convertToFeature as p,convertFromFeature as c}from"../../featureConversionUtils.js";import y from"../../data/FeatureStore.js";import{checkProjectionSupport as f,project as m}from"../../data/projectionSupport.js";import{QueryEngine as h}from"../../data/QueryEngine.js";import{inferLayerProperties as g,createOptimizedFeatures as _,validateGeoJSON as I}from"./geojson.js";import{createDefaultTemplate as E,createDefaultAttributesFunction as F,createDrawingInfo as j}from"../support/clientSideDefaults.js";import{queryBinsCapabilities as T,loadGeometryEngineForSimplify as b,mixAttributes as w,createFeatureEditSuccessResult as q,createFeatureEditErrorResult as x,simplify as S}from"../support/sourceUtils.js";import R from"../../../support/FieldsIndex.js";import{kebabDict as C}from"../../../support/fieldType.js";import{getFieldDefaultValue as A,getFieldDefaultLength as O}from"../../../support/fieldUtils.js";import{utc as Q}from"../../../../time/constants.js";const k={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentsCountOnly:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsOutDistance:!1,supportsQueryWithResultType:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0},queryBinsCapabilities:T};class D{constructor(){this._featureIdInfo=null,this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const i=[],[r]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=g(r,{geometryType:e.geometryType}),o=e.fields||n.fields||[],u=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let d=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const p=e.spatialReference||a;let c=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const f=new R(o);let m=f.dateFields.length>0,_=f.get(d);_?("esriFieldTypeString"!==_.type&&(_.type="esriFieldTypeOID"),_.editable=!1,_.nullable=!1,d=_.name):(_={alias:d,name:d,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(_));const I={};for(const a of o){if(null==a.name&&(a.name=a.alias),null==a.alias&&(a.alias=a.name),!a.name)throw new s("geojson-layer:invalid-field-name","field name is missing",{field:a});if(!C.jsonValues.includes(a.type))throw new s("geojson-layer:invalid-field-type",`invalid type for field "${a.name}"`,{field:a});if(a.name!==_.name){const e=A(a);void 0!==e&&(I[a.name]=e)}null==a.length&&(a.length=O(a))}if(c){if(c.startTimeField){const e=f.get(c.startTimeField);e?(c.startTimeField=e.name,e.type="esriFieldTypeDate",m=!0):c.startTimeField=null}if(c.endTimeField){const e=f.get(c.endTimeField);e?(c.endTimeField=e.name,e.type="esriFieldTypeDate",m=!0):c.endTimeField=null}if(c.trackIdField){const e=f.get(c.trackIdField);e?c.trackIdField=e.name:(c.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:c}}))}c.startTimeField||c.endTimeField||(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:c}}),c=null)}const T=l?j(l):void 0,b=m?{timeZoneIANA:Q}:null,w={warnings:i,featureErrors:[],layerDefinition:{...k,drawingInfo:T??void 0,templates:E(I),extent:void 0,geometryType:l,objectIdField:d,fields:o,hasZ:!!u,timeInfo:c,dateFieldsTimeReference:b}};this._featureIdInfo={type:"object-id",fieldName:d},this._queryEngine=new h({fieldsIndex:R.fromLayerJSON({fields:o,timeInfo:c,dateFieldsTimeReference:b}),geometryType:l,hasM:!1,hasZ:u,featureIdInfo:this._featureIdInfo,spatialReference:p,timeInfo:c,featureStore:new y({geometryType:l,hasM:!1,hasZ:u})});const q=this._queryEngine.fieldsIndex.requiredFields.indexOf(_);q>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(q,1),this._createDefaultAttributes=F(I,d);const x=this._createFeatures(r);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,x);const S=this._normalizeFeatures(x,w.featureErrors);this._queryEngine.featureStore.addMany(S);const{fullExtent:D,timeExtent:v}=await this._queryEngine.fetchRecomputedExtents();if(w.layerDefinition.extent=D,v){const{start:e,end:t}=v;w.layerDefinition.timeInfo.timeExtent=[e,t]}return w}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([b(t,s),f(e.adds,t),f(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=t(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)},e=>{this._queryEngine.featureStore.clear(),r(e)||i.getLogger("esri.layers.GeoJSONLayer").error(new s("geojson-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a}}_createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s}=this._queryEngine,i=this._featureIdInfo.fieldName,r=_(e,{geometryType:t,hasZ:s,objectIdField:i});if(!o(this._queryEngine.spatialReference,a))for(const n of r)null!=n.geometry&&(n.geometry=u(m(l(n.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),a,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:s,customParameters:i}=this._loadOptions,r=(await e(s??"",{responseType:"json",query:{...i},signal:t})).data;return I(r),r}_normalizeFeatures(e,t){const{fieldsIndex:s}=this._queryEngine,i=[],r=this._featureIdInfo.fieldName;for(const n of e){const e=this._createDefaultAttributes(),a=w(s,e,n.attributes,!0);a?t?.push(a):(this._assignObjectId(e,n.attributes,!0),n.attributes=e,n.objectId=e[r],i.push(n))}return i}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),i?.length){for(const e of i)r.deleteResults.push(q(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,spatialReference:o,featureStore:u,fieldsIndex:l}=this._queryEngine,p=this._featureIdInfo.fieldName,c=[];for(const d of t){if(d.geometry&&i!==n(d.geometry)){s.push(x("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=w(l,t,d.attributes);if(r)s.push(r);else{if(this._assignObjectId(t,d.attributes),d.attributes=t,null!=d.uid){const t=d.attributes[p];e.uidToObjectId[d.uid]=t}if(null!=d.geometry){const e=d.geometry.spatialReference??o;d.geometry=m(S(d.geometry,e),e,o)}c.push(d),s.push(q(d.attributes[p]))}}u.addMany(d([],c,i,a,r,this._featureIdInfo))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,spatialReference:a,featureStore:o,fieldsIndex:u}=this._queryEngine,l=this._featureIdInfo.fieldName;for(const d of t){const{attributes:t,geometry:y}=d,f=t?.[l];if(null==f){e.push(x(`Identifier field ${l} missing`));continue}if(!o.has(f)){e.push(x(`Feature with object id ${f} missing`));continue}const h=p(o.getFeature(f),s,r,i);if(null!=y){if(s!==n(y)){e.push(x("Incorrect geometry type."));continue}const t=y.spatialReference??a;h.geometry=m(S(y,t),t,a)}if(t){const s=w(u,h.attributes,t);if(s){e.push(s);continue}}o.add(c(h,s,r,i,this._featureIdInfo)),e.push(q(f))}}_createObjectIdGenerator(e,t){const s=this._featureIdInfo.fieldName,i=e.fieldsIndex.get(s);if("esriFieldTypeString"===i.type)return()=>i.name+"-"+Date.now().toString(16);let r=Number.NEGATIVE_INFINITY;for(const n of t)n.objectId&&(r=Math.max(r,n.objectId));return r=Math.max(0,r)+1,()=>r++}_assignObjectId(e,t,s=!1){const i=this._featureIdInfo.fieldName;e[i]=s&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await f(a,e)}catch{throw new s("geojson-layer","Projection not supported")}}}export{D as default};
|