@arcgis/core 5.2.0-next.125 → 5.2.0-next.127
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/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +3 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
- package/applications/Components/basemapToggleUtils.d.ts +53 -0
- package/applications/Components/basemapToggleUtils.js +2 -0
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe9582bc2244667e40ab.js → 05afa8c2b5929ce0545a.js} +1 -1
- package/assets/esri/core/workers/chunks/0a20f84b5f004a77a9f9.js +1 -0
- package/assets/esri/core/workers/chunks/{cfd56e0a716baf95e17b.js → 0a2b7c691a577cb3d189.js} +1 -1
- package/assets/esri/core/workers/chunks/{6cf34cfdd063a1b6fe3e.js → 0ccd4200c5a2a5de6e16.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{bdf012e591a8476db467.js → 1406a884241809b62bff.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
- package/assets/esri/core/workers/chunks/{378bdb4e5cd1ebada1f4.js → 1c33aa349beea9a3792f.js} +1 -1
- package/assets/esri/core/workers/chunks/1d040aa8951fff3141d9.js +1 -0
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/26995de0c18bef8db590.js +1 -0
- package/assets/esri/core/workers/chunks/2c7fc24649d91552e68a.js +1 -0
- package/assets/esri/core/workers/chunks/{f05becec0952a61bc654.js → 2ebad7e588b26e74cefe.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f52ad525744b8793d49.js → 3b7dff15a0058ea29886.js} +1 -1
- package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
- package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
- package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +1 -0
- package/assets/esri/core/workers/chunks/{5b9b76e180cf206a8a0c.js → 4327d2c39a660bd89da7.js} +1 -1
- package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +1 -0
- package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +1 -0
- package/assets/esri/core/workers/chunks/{26bc509a031788bfa678.js → 4f464047c6f6c9486efd.js} +1 -1
- package/assets/esri/core/workers/chunks/50c29d10ec53f0e48e8a.js +1 -0
- package/assets/esri/core/workers/chunks/{58528ccb7f72ae76d52b.js → 540f60e31b19d85e9371.js} +1 -1
- package/assets/esri/core/workers/chunks/{44857a76be2c0ac65bb9.js → 55a560fd872f7463b33d.js} +1 -1
- package/assets/esri/core/workers/chunks/58fb92775d668cfd295c.js +1 -0
- package/assets/esri/core/workers/chunks/{f0901f9c7135b708434f.js → 5adf2792416b22cd602f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
- package/assets/esri/core/workers/chunks/67678054342178b601cf.js +1 -0
- package/assets/esri/core/workers/chunks/67dcf9b873cb037b2647.js +1 -0
- package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
- package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +1 -0
- package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +1 -0
- package/assets/esri/core/workers/chunks/7dd94567833386dc74de.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/88e11b645a1361f1bdbe.js +1 -0
- package/assets/esri/core/workers/chunks/{f0709c48daca93e759c8.js → 8b0d6205ceeec1ab446f.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f55701d23a5e5a0c70c.js → 8cb216404a6254bc695c.js} +123 -122
- package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +1 -0
- package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +1 -0
- package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +1 -0
- package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
- package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e22a013ec38989caf9de.js → a790fc6b22acf651574b.js} +1 -1
- package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
- package/assets/esri/core/workers/chunks/{813dd84933b407c8fe86.js → b34305474a861aaf6ccb.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbaaebe1774a22dba39b.js → bbfb80a6983574007ce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f082329a544c2c1d62d.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
- package/assets/esri/core/workers/chunks/c35e9dee87937f483a3d.js +1 -0
- package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +1 -0
- package/assets/esri/core/workers/chunks/{4f7e8e4ddf52b5245ea4.js → c77496c350004ee66eb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
- package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +1 -0
- package/assets/esri/core/workers/chunks/d5f0fed415b5b155d57c.js +1 -0
- package/assets/esri/core/workers/chunks/d6e914f6ed45ea59034e.js +1 -0
- package/assets/esri/core/workers/chunks/{0fba5c0e89b057da548d.js → dc92710a8fdfb9135e55.js} +1 -1
- package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +1 -0
- package/assets/esri/core/workers/chunks/{df79c00b5ddbef7148a0.js → eaa7cb3ffa8c11706a09.js} +1 -1
- package/assets/esri/core/workers/chunks/eebbc86a15ae3adb5f38.js +1 -0
- package/assets/esri/core/workers/chunks/f479b4a4cee4bb2e046c.js +1 -0
- package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/libs/pdfjs/pdf.worker.mjs +4 -63051
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts.scss +0 -0
- package/assets/esri/themes/base/icons/style.scss +0 -0
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +37 -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/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-TW.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +10 -9
- package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
- package/chunks/HeatmapDensity.glsl.js +5 -5
- package/chunks/Pattern.glsl.js +30 -30
- package/chunks/RibbonLine.glsl.js +19 -19
- package/config.js +1 -1
- package/core/Accessor.d.ts +1 -1
- package/core/accessorSupport/types.d.ts +5 -1
- package/core/lang.js +1 -1
- package/interfaces.d.ts +3 -0
- package/kernel.js +1 -1
- package/layers/ParquetLayer.d.ts +24 -15
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
- package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +2 -0
- package/layers/geospatialPDF/projectionToWKTUtils.js +2 -0
- package/layers/geospatialPDF/renderExtentUtils.js +1 -1
- package/layers/geospatialPDF/sharedUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
- package/layers/raster/types.d.ts +6 -0
- package/layers/support/TimeSeriesCalculation.d.ts +32 -0
- package/layers/support/TimeSeriesCalculation.js +2 -0
- package/layers/support/TimeSeriesInfo.d.ts +19 -0
- package/layers/support/TimeSeriesInfo.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/timeSeriesUtils.d.ts +25 -1
- package/layers/support/timeSeriesUtils.js +1 -1
- package/layers/types.d.ts +1 -0
- package/package.json +3 -3
- package/popup/FeatureContentCollection.d.ts +19 -26
- package/popup/FeatureContentCollection.js +1 -1
- package/popup/types.d.ts +14 -3
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/renderers/support/AuthoringInfo.d.ts +8 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.d.ts +8 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/rest/imageService/fetchRasterInfo.js +1 -1
- package/rest/knowledgeGraph/DataModel.js +1 -1
- package/smartMapping/renderers/color.d.ts +12 -0
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/opacity.d.ts +6 -0
- package/smartMapping/renderers/opacity.js +1 -1
- package/smartMapping/renderers/size.d.ts +12 -0
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.js +1 -1
- package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
- package/smartMapping/renderers/type.d.ts +6 -0
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +6 -0
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
- package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
- package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
- package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
- package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
- package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +8 -0
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +8 -0
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +3 -2
- package/views/2d/engine/webgl/ClipMesh.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimension/DimensionController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +3 -2
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/input/handlers/DragRotate.js +1 -1
- package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/support/FeatureMemory.js +2 -0
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/planarDistanceToGroundRatio.js +2 -0
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/DOMContainer.d.ts +2 -2
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/LengthDimensionResult.d.ts +4 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/interactive/options/SnappingOptions.d.ts +4 -2
- package/views/interactive/options/SnappingOptions.js +1 -1
- package/views/interactive/options/ViewOptions.d.ts +18 -0
- package/views/interactive/options/bindViewToolOptions.js +2 -0
- package/views/interactive/snapping/SnappingManagerPool.js +1 -1
- package/views/interactive/snapping/allLayerSnapping.js +1 -1
- package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/overlay/FocusRegionOverlayItem.js +1 -1
- package/views/selection/SelectionOperation.d.ts +27 -1
- package/views/selection/types.d.ts +8 -20
- package/views/support/hitTestSelectUtils.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -0
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
- package/widgets/BasemapLayerList.d.ts +1 -0
- package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/expressions/types.d.ts +1 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
- package/widgets/BatchAttributeForm/types.d.ts +5 -1
- package/widgets/BatchAttributeForm.d.ts +1 -0
- package/widgets/Bookmarks/BookmarksViewModel.d.ts +1 -0
- package/widgets/Bookmarks.d.ts +1 -0
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -0
- package/widgets/CatalogLayerList.d.ts +1 -0
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
- package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -0
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +1 -0
- package/widgets/FeatureForm.d.ts +1 -0
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +14 -0
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.d.ts +14 -0
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +1 -0
- package/widgets/FeatureTemplates.d.ts +1 -0
- package/widgets/Features/FeaturesViewModel.d.ts +1 -0
- package/widgets/Features.d.ts +2 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -0
- package/widgets/Home/HomeViewModel.d.ts +1 -0
- package/widgets/Home.d.ts +1 -0
- package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
- package/widgets/LayerList.d.ts +1 -0
- package/widgets/Locate/LocateViewModel.d.ts +1 -0
- package/widgets/Locate.d.ts +1 -0
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
- package/widgets/OrientedImageryViewer/types.d.ts +4 -1
- package/widgets/OrientedImageryViewer.d.ts +4 -1
- package/widgets/Popup/types.d.ts +0 -7
- package/widgets/Popup.d.ts +8 -7
- package/widgets/Print/PrintViewModel.d.ts +1 -0
- package/widgets/Print.d.ts +1 -0
- package/widgets/Search.d.ts +1 -0
- package/widgets/Sketch.d.ts +1 -0
- package/widgets/Slider.d.ts +4 -0
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.d.ts +1 -0
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Track/TrackViewModel.d.ts +1 -0
- package/widgets/Track.d.ts +1 -0
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -0
- package/widgets/UtilityNetworkTrace.d.ts +1 -0
- package/widgets/ValuePicker/types.d.ts +1 -0
- package/widgets/ValuePicker.d.ts +1 -0
- package/widgets/smartMapping/SmartMappingSliderBase.d.ts +1 -0
- package/widgets/support/SelectionList/types.d.ts +2 -0
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +2 -1
- package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +0 -1
- package/assets/esri/core/workers/chunks/0a4a5ed831a4e4d8e0fc.js +0 -1
- package/assets/esri/core/workers/chunks/0acc754907395e83bbc6.js +0 -1
- package/assets/esri/core/workers/chunks/0f8ff964461cf8e0673b.js +0 -1
- package/assets/esri/core/workers/chunks/1e46703cb566c25458ad.js +0 -1
- package/assets/esri/core/workers/chunks/25c90092def215949db9.js +0 -1
- package/assets/esri/core/workers/chunks/2a34760b3f0c134898ec.js +0 -1
- package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +0 -1
- package/assets/esri/core/workers/chunks/3b4ceaf21be540cb3499.js +0 -1
- package/assets/esri/core/workers/chunks/4c4ba466e23159991322.js +0 -1
- package/assets/esri/core/workers/chunks/5afc12671a9a1bb6c56c.js +0 -1
- package/assets/esri/core/workers/chunks/606ac9358f508bda94f2.js +0 -1
- package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
- package/assets/esri/core/workers/chunks/6c4def0faaef861a09c9.js +0 -1
- package/assets/esri/core/workers/chunks/7285a37cd5359aa4bac5.js +0 -1
- package/assets/esri/core/workers/chunks/753d1ff177ecee8e2377.js +0 -1
- package/assets/esri/core/workers/chunks/8a8e94b5d7d153361b0b.js +0 -1
- package/assets/esri/core/workers/chunks/923c45ebcf45d9ce8ae0.js +0 -1
- package/assets/esri/core/workers/chunks/9af36ee6a0df224859bc.js +0 -1
- package/assets/esri/core/workers/chunks/a7ce5b958dfeb240c4a5.js +0 -1
- package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +0 -1
- package/assets/esri/core/workers/chunks/be52c319a0a81ce1ba36.js +0 -1
- package/assets/esri/core/workers/chunks/c0ec87800faf99cbd8bd.js +0 -1
- package/assets/esri/core/workers/chunks/ca5a4f62b09cc8579dc0.js +0 -1
- package/assets/esri/core/workers/chunks/d090baaa974e1e83fa44.js +0 -1
- package/assets/esri/core/workers/chunks/e9f8325a4cf89ae816cc.js +0 -1
- package/assets/esri/core/workers/chunks/ed7d4e8725aaa0ca4589.js +0 -1
- package/assets/esri/core/workers/chunks/f4572ad25712d204f258.js +0 -1
- package/layers/geospatialPDF/GeospatialPDFParserUtils.js +0 -2
- package/layers/geospatialPDF/Projection.js +0 -2
- package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
|
@@ -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"../../../Graphic.js";import i from"../../../core/Accessor.js";import{equals as r,isSome as s}from"../../../core/arrayUtils.js";import{createTask as n}from"../../../core/asyncUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{clone as l}from"../../../core/lang.js";import h from"../../../core/Logger.js";import{getOrCreateMapValue as d}from"../../../core/MapUtils.js";import{removeMaybe as u,abortMaybe as p}from"../../../core/maybe.js";import{debounce as c,ignoreAbortErrors as y,throwIfAborted as g}from"../../../core/promiseUtils.js";import _ from"../../../core/ReactiveMap.js";import{watch as f,when as m,syncAndInitial as b,sync as E}from"../../../core/reactiveUtils.js";import{property as v,subclass as I}from"../../../core/accessorSupport/decorators.js";import{geometryTypes as C}from"../../../geometry/support/typeUtils.js";import{isFeatureLayer as w,isSubtypeGroupLayer as F,isSubtypeSublayer as O}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as A}from"../../../layers/support/timeSupport.js";import j from"../../../rest/support/AttachmentQuery.js";import S from"../../../rest/support/RelationshipQuery.js";import q from"../../../time/TimeExtent.js";import R from"../../../views/SelectionManager.js";import{temporaryHighlightName as M}from"../../../views/support/HighlightDefaults.js";import{highlightsSupported as V}from"../../../views/support/layerViewUtils.js";import{isSelectableLayerWithObjectIds as L,isSelectableLayer as B}from"../../../views/support/selectionUtils.js";import{isIFeatureTableSupportedLayerWithAttachments as W,isIFeatureTableSupportedLayerWithAttachmentsEditing as H,isIFeatureTableSupportedLayerWithEditing as P,isIFeatureTableSupportedLayerWithRelationships as x,isPageIndexValid as z,findRelatedLayer as Q}from"./tableUtils.js";import{ContingentValuesManager as U}from"../../support/ContingentValuesManager.js";let T=class extends i{constructor(e){super(e),this._attachmentsOperationQueue=new a,this._contingentValuesManager=new U,this._defaultOutFields=["*"],this._editOperationQueue=new a,this.featureTitleMap=new _,this._loaded=!1,this._loadController=null,this._loadDebounced=c(()=>this._load()),this._loadError=!1,this._objectIdCache=new a,this._pendingEditsCache=new _,this._queryOperationInfos=new _,this._refreshDebounced=c(()=>this._refresh()),this._size=0,this._temporaryHighlight=null,this._temporaryHighlightAbortController=null,this.attachmentsEnabled=!1,this.autoSaveEnabled=!0,this.defaultSelectionManager=new R,this.editingEnabled=!1,this.failures=new a,this.filterByViewExtent=!1,this.filterByLayerScaleRange=!1,this.filterGeometry=null,this.highlightEnabled=!0,this.initialSize=null,this.layer=null,this.maxSize=null,this.objectIds=null,this.outFields=null,this.pageCache=new _,this.pageSize=50,this.paginationEnabled=!1,this.relationshipConfig=null,this.relatedRecordsEnabled=!1,this.returnGeometry=!1,this.returnZ=!1,this.returnM=!1,this.selectionManager=null,this.sortOrders=[],this.syncViewSelection=!1,this.temporaryHighlightId=void 0,this.timeExtent=null,this.timeZone=null,this.view=null,this.viewTimeEnabled=!1,this.where=null}initialize(){this.addHandles([f(()=>[this._visibleAtCurrentScale,this.effectiveTimeExtent,this.effectiveWhere,this.filterGeometry,this.layer,this.objectIds,this.outFields,this.pageSize,this.relationshipConfig,this.returnGeometry,this.returnM,this.returnZ],()=>this._reset()),f(()=>this.orderByFields,()=>this._clearCaches(),{equals:r}),m(()=>this.attachmentsEnabled,()=>this._reset()),m(()=>this.relatedRecordsEnabled,()=>this._reset()),f(()=>this._layerWithContingentValues,e=>{const t=this._contingentValuesManager;e&&!t.layers.includes(e)&&t.layers.add(e)}),f(()=>[this.view?.extent,this.view?.stationary,this.filterByViewExtent],([e,t,i])=>{i&&(e?t&&(this.filterGeometry=e):this.filterGeometry=null)},b),f(()=>this.maxSize,(e,t)=>{0===t&&this._reset()}),f(()=>[this.layer,this.view],()=>this.syncSelectionSources(),b),f(()=>this.highlightEnabled,e=>this.defaultSelectionManager.highlightEnabled=e,b),f(()=>this.temporaryHighlightId,e=>{this._temporaryHighlight=u(this._temporaryHighlight?.handle),this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController;const t=this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal);y(this.view?.addUpdatingPromise(t)??t)},E)])}destroy(){this.layer=null,this.itemCache.destroy(),this.failures.destroy(),this.defaultSelectionManager.destroy(),this._temporaryHighlight=u(this._temporaryHighlight?.handle),this._temporaryHighlightAbortController=p(this._temporaryHighlightAbortController)}get _capabilities(){const{layer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _canSavePendingEdits(){return this.supportsEditing&&this.hasPendingEdits&&!this.hasInvalidPendingEdits}get _effectiveReturnZ(){return this.returnZ&&this.supportsZ}get _effectiveReturnM(){return this.returnM&&this.supportsM}get _layerWithAttachments(){const{layer:e}=this;return e&&this._capabilities&&this.attachmentsEnabled&&this.supportsAttachments&&W(e)?e:null}get _layerWithAttachmentsEditing(){const{_layerWithAttachments:e}=this;return e&&H(e)&&this.supportsEditing?e:null}get _layerWithContingentValues(){const{layer:e}=this;return w(e)||F(e)?e:null}get _layerWithEditing(){const e=this.layer;return P(e)&&this.supportsEditing?e:null}get _layerWithRelationships(){const e=this.layer;return x(e)&&this.supportsQueryRelated?e:null}get _pendingEditsAreInvalid(){const e=this._pendingEditsCache,t=this._layerWithContingentValues;if(!t)return!1;for(const i of e.keys()){const r=e.get(i),s=this._getFeatureWithPendingEdits(i,r);for(const e of r.changes.keys()){if(this._contingentValuesManager.getViolationForField(t,s,e))return!0}}return!1}get _relatedLayer(){return this.relationshipConfig?.relatedLayer}get _relatedLayerCapabilities(){const{_relatedLayer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _relatedLayerSupportsCacheHint(){return!!this._relatedLayerCapabilities?.queryRelated?.supportsCacheHint}get _relatedLayerSupportsQuery(){return!!this._relatedLayerCapabilities?.operations.supportsQuery}get _relatedLayerSupportsQueryRelated(){const{_relatedLayerCapabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get _sortedFieldNames(){return this.sortOrders.map(({fieldName:e})=>e)}get _subtypeCode(){return this.layer?.subtypeCode??null}get _subtypeField(){const{layer:e}=this;return F(e?.parent)?e.subtypeField:null}get _canUseRelatedLayer(){return!(!this._relatedLayerSupportsQuery||!this._relatedLayerSupportsQueryRelated)}get _shouldFilterByLayerScaleRange(){return!(!this.view||!this.filterByLayerScaleRange)}get _visibleAtCurrentScale(){return!(!this._shouldFilterByLayerScaleRange||!this.layerView?.visibleAtCurrentScale)}get canAddRelatedFeature(){const{state:e,relationship:t,supportsAdd:i,supportsEditing:r}=this;if("loaded"!==e||!t||!i||!r)return!1;const{cardinality:s,role:n}=t,a=this.size>0;return("one-to-one"!==s||!a)&&("one-to-many"!==s||"origin"!==n||!a)}get effectiveOutFields(){const{layer:e,outFields:t}=this;if(!e||!t?.length)return this._defaultOutFields;const i=[];t.forEach(t=>{const r=e.fieldsIndex.normalizeFieldName(t);r&&i.push(r)});const{objectIdField:r}=e,s=e.fieldsIndex.normalizeFieldName(r)??r;return s&&!i.includes(s)&&i.unshift(s),i}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&L(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this.defaultSelectionManager}get effectiveSize(){const{_size:e,maxSize:t}=this;return null!=t?Math.min(t,e):e}get effectiveTimeExtent(){const{layer:e,timeExtent:t,view:i,viewTimeEnabled:r}=this;if(t||!e)return t;if(!i||!r)return e.timeExtent??void 0;return A({datesInUnknownTimezone:e.datesInUnknownTimezone??void 0,timeExtent:e.timeExtent,timeInfo:e.timeInfo,timeOffset:e.timeOffset,useViewTime:e.useViewTime},i.timeExtent,this._get("effectiveTimeExtent"))??void 0}get effectiveWhere(){const{layer:e,where:t}=this;return null!=t&&""!==t?t:O(e)&&e.parent?.definitionExpression?e.parent.definitionExpression:e?.definitionExpression||"1=1"}get fieldsWithContingentValues(){return this._contingentValuesManager.getFieldsWithContingentValues(this.layer)}get hasContingentValues(){return this.fieldsWithContingentValues.size>0}get hasInvalidPendingEdits(){return this.hasPendingEdits&&this._pendingEditsAreInvalid}get hasPendingEdits(){return this.pendingEditsCount>0}get highlightableLayerView(){const e=this.layerView;return V(e)?e:null}get isQuerying(){return this._queryOperationInfos.size>0}get isSyncing(){return this.isSyncingFeatureEdits||this.isSyncingAttachmentEdits}get isSyncingAttachmentEdits(){return this._attachmentsOperationQueue.length>0}get isSyncingFeatureEdits(){return this._editOperationQueue.length>0}get itemCache(){return new a({items:[...this.pageCache.values()].flat()})}get layerView(){const{layer:e,view:t}=this;if(!e||!t)return null;const i="sublayer"===e.type||O(e)?e.parent:e;return t.allLayerViews.find(e=>e.layer===i)}get orderByFields(){const{_sortedFieldNames:e,layer:t,sortOrders:i}=this,r=i.filter(({fieldName:t,direction:i},r)=>e.indexOf(t)===r&&null!=i).map(({fieldName:e,direction:t})=>`${e} ${t?.toUpperCase()}`);if(t&&!r.length&&!t.objectIdField&&t.fields?.length){const e=t.fields.find(e=>e.name);if(e){const i=t.fieldsIndex.normalizeFieldName(e.name);i&&r.push(`${i} ASC`)}}return r}get pageCount(){const{effectiveSize:e,pageSize:t}=this;return 0===e||0===t?1:Math.ceil(e/t)}get pageIndex(){return this._get("pageIndex")||0}set pageIndex(e){const{pageCount:t}=this;z(e,t)&&this._set("pageIndex",e)}get pendingEditsCount(){let e=0;return this._pendingEditsCache.forEach(t=>e+=t.changes.size),e}get relationship(){const{relationshipConfig:e}=this;return null==e?.relationshipId?null:this.relationships?.find(t=>t.id===e.relationshipId)}get relationshipIds(){return this.relationships?.map(e=>e.id)??[]}get relationshipInfos(){const{_layerWithRelationships:e,relatedRecordsEnabled:t,relationships:i,view:r}=this,s=[];return t&&e?.loaded&&r?.map&&i?.length?(i.forEach(t=>{const i=Q(e,r,t);i&&(i.load().catch(()=>{}),s.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),s):s}get relationships(){return this._layerWithRelationships?.relationships}get size(){return this._size}get state(){const{layer:e,_loaded:t,_loadError:i}=this;return!e||e.destroyed?"disabled":i||e.loadError?"error":this._loadController?"loading":"loaded"===e.loadStatus&&t?"loaded":"ready"}get supportsAdd(){return!!this._capabilities?.operations.supportsAdd}get supportsAddAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsAttachments(){const{_capabilities:e}=this;return!(!e?.data?.supportsAttachment||!e?.operations.supportsQueryAttachments)}get supportsCacheHint(){return!!this._capabilities?.query?.supportsCacheHint}get supportsCacheHintQueryRelated(){return!!this._capabilities?.queryRelated?.supportsCacheHint}get supportsDelete(){return!!this._capabilities?.operations.supportsDelete}get supportsEditing(){return!!this._capabilities?.operations.supportsEditing}get supportsM(){return!!this.layer?.hasM&&!!this._capabilities?.data?.supportsM}get supportsOrderBy(){return!!this._capabilities?.query?.supportsOrderBy}get supportsPagination(){return!!this._capabilities?.query?.supportsPagination}get supportsQuery(){return!!this._capabilities?.operations.supportsQuery}get supportsQueryRelated(){const{_capabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get supportsResizeAttachments(){const{_capabilities:e}=this;return!(!this.supportsAttachments||!e?.attachment?.supportsResize)}get supportsUpdate(){return!!this._capabilities?.operations.supportsUpdate}get supportsUpdateAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsZ(){return!!this.layer?.hasZ&&!!this._capabilities?.data?.supportsZ}async addAttachment(e,t){const{_layerWithAttachmentsEditing:i}=this;if(!i||!this.supportsAddAttachments)return{};const r=await this._queueAttachmentsOperation(e,()=>i.addAttachment(this._createBaseGraphic(i,e),t));return this._ensureArrayContent(r)}addPendingEdits(e){const t=this._ensureLayerAndUpdateSupport();this.editingEnabled?(this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),this._stashPendingEdits(t,e)):this._logWarning("store:editing-disabled","Editing is disabled.")}async deleteAttachments(e,t){const{_layerWithAttachmentsEditing:i}=this;if(!i||!this.supportsUpdateAttachments||!t.length)return[];const r=await this._queueAttachmentsOperation(e,()=>i.deleteAttachments(this._createBaseGraphic(i,e),t));return this._ensureArray(r)}async deleteRowsByObjectId(e){const{_layerWithEditing:t}=this;if(!this.supportsDelete||!t)throw new o("store:delete-error","Delete is not supported.");const i=e.map(e=>this.getItemByObjectId(e)?.feature).filter(s),r=this._queueEditOperation(()=>t.applyEdits({deleteFeatures:i}));return e.forEach(e=>{this.featureTitleMap.delete(e),this._discardPendingEdit({objectId:e})}),r}discardPendingEdits(e){if(e?.length)e.forEach(e=>this._discardPendingEdit(e));else{for(const[e,t]of this._pendingEditsCache){const i=this.getItemByObjectId(e);i&&(i.feature=t.originalFeature)}this._pendingEditsCache.clear(),this._clearOptionsAndViolations()}}itemHasInvalidPendingEdits(e,t){if(!this.hasInvalidPendingEdits)return!1;const i=this._layerWithContingentValues,r=this._pendingEditsCache.get(e);if(!i||!r)return!1;const s=this._getFeatureWithPendingEdits(e,r),n=this._contingentValuesManager;return t?!!n.getViolationForField(i,s,t):!!n.getAllViolations(i,s)}itemHasPendingEdits(e,t){const i=this._pendingEditsCache.get(e);return!!i&&(!t||i.changes.has(t))}async getAttachmentsByObjectId(e,t){const i=this.getItemByObjectId(e)?.attachments??[];if(!i.length&&t){return(await this._queryAttachments([e]))[e]??[]}return i}getFieldValueOptions(e){return this._contingentValuesManager.getFieldValueOptions(e)}async getFeatureTitle(e,i=!1){const{layer:r}=this,s=this.featureTitleMap.get(e),n=`${e}`;if(!r)return s||n;if(s&&!i)return s;if(!("getFeatureTitle"in r)||!r.getFeatureTitle)return n;const a=this.getItemByObjectId(e);let o=a?.feature;o||(o=new t({attributes:{[r.objectIdField]:e},origin:r.graphicOrigin}));const l=await r.getFeatureTitle(o,{fetchMissingFields:!0,removeHTML:!0});return l?(this.featureTitleMap.set(e,l),l):n}getItemByObjectId(e){for(const t of this.pageCache.values())for(const i of t)if(i.objectId===e)return i}getItemIndexByObjectId(e){const{pageCache:t,pageSize:i}=this,r=t.entries();let s=-1;for(const[n,a]of r)if(a.some((t,r)=>{const a=t.objectId===e;return a&&(s=n*i+r),a}),s>-1)break;return s}async load(){await y(this._loadDebounced())}async queryPage(e){const{layer:t,state:i}=this;if(!t||"loaded"!==i||!this.supportsQuery||0===this.size||0===this.maxSize)return[];const{pageIndex:r}=e;if(!z(r,this.pageCount))return[];const s=e.pageSize??this.pageSize,n=r*s,a=n+s;return await y(this._query({layer:t,start:n,num:a,pageIndex:r,pageSize:s}))??[]}async refresh(){await y(this._refreshDebounced())}reset(){this._reset()}async savePendingEdits(){const e=this._ensureLayerAndUpdateSupport();if(!this.editingEnabled)return void this._logWarning("store:editing-disabled","Editing is disabled.");if(this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),!this._canSavePendingEdits)return void this._logError("store:update-error","An error occurred. Unable to save pending edits.");const t=[];for(const[i]of this._pendingEditsCache){const e=this.getItemByObjectId(i);e?.feature&&t.push(e.feature)}(await this._update(e,t,!0)).updateFeatureResults.find(e=>e.error)&&this.discardPendingEdits(),this._clearOptionsAndViolations()}syncSelectionSources(){const{defaultSelectionManager:e,layer:t,view:i}=this;e.view=i,e.sources.removeAll(),B(t)&&(e.sources.items=[t])}async updateAttachment(e,t,i){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsUpdateAttachments)return{};const s=await this._queueAttachmentsOperation(e,()=>r.updateAttachment(this._createBaseGraphic(r,e),t,i));return this._ensureArrayContent(s)}async updateItem(e){const t=this._ensureLayerAndUpdateSupport();if(!this.editingEnabled)return void this._logWarning("store:editing-disabled","Editing is disabled.");if(this.hasContingentValues){const t=e.updates.some(e=>this.fieldsWithContingentValues.has(e.fieldName)),i=this.itemHasPendingEdits(e.objectId);if(i||t){const t=this._layerWithContingentValues,r=this.getItemByObjectId(e.objectId)?.feature?.clone();if(r){const s=this._contingentValuesManager.getAllViolations(t,r);e.updates.forEach(({fieldName:e,value:i})=>{const s=t.getField(e);s&&(r.attributes[s.name]=i)});if(this._contingentValuesManager.validateContingencyConstraints(t,r).length||s.length||i)return this._stashPendingEdits(t,[e]),void this._contingentValuesManager.resetOptionsForLayer(t)}}}if(!this.autoSaveEnabled)return void this._stashPendingEdits(t,[e]);const{_sortedFieldNames:i}=this,r=e.updates.map(({fieldName:e})=>e),s=this._prepareEditsForUpdate([e]);!(await this._update(t,s)).updateFeatureResults.find(e=>e.error)&&r.some(e=>i.includes(e))&&this._clearCaches()}async verifyFeaturesByObjectId(e){const{layer:t,state:i}=this;if(!t||"loaded"!==i)return[];const{objectIdField:r}=t,s=await this._queryFeaturesByObjectId(e);return e.map(e=>s.some(t=>{const i=t.getObjectId()??t.attributes[r];return e===i}))}async _load(){const{layer:e}=this;if(this._reset(),!e)return;const t=new AbortController;this._loadController=t;try{if(await e.load(),e.parent&&F(e.parent)&&await e.parent.loadAll(),await e.when(),t.signal.aborted)return;let i=this.initialSize;if(this.initialSize=null,this._shouldFilterByLayerScaleRange&&(this._visibleAtCurrentScale||(i=0)),await y(this._refresh(t,i)),t.signal.aborted)return void(this._loadController=null);this._loaded=!0,this._loadController=null}catch(i){throw this._reset(),this._loadError=!0,this._logError("store:load-error","An error occurred."),i}}async _refresh(e,t){this._clearCaches();const i=e?.signal,r=await this._getSize(i,t),s=await this._queryAllObjectIds(i);i?.aborted||(this._size=r,this._objectIdCache.removeAll(),s?.length&&this._objectIdCache.addMany(s),this._syncPendingEdits())}async _queryAllObjectIds(e){return this.supportsPagination?void 0:await this._queryObjectIds(e)}_clearCaches(){this.pageCache.clear(),this._objectIdCache.removeAll()}_createBaseGraphic(e,i){const r=new t({attributes:{[e.objectIdField]:i}});return this._subtypeField&&null!=this._subtypeCode&&(r.attributes[this._subtypeField]=this._subtypeCode),r}_ensureArray(e){return Array.isArray(e)?e:[e]}_ensureArrayContent(e){return Array.isArray(e)?e[0]:e}_getObjectIdsForFeatures(e,t){return e.map(e=>e.getObjectId()??e.attributes[t.objectIdField])}_getObjectIdsForPage(e,t){const i=this._objectIdCache.toArray();return i.length>=e+t?i.slice(e,e+t):i.slice(e)}_logError(e,t){h.getLogger(this).error(e,t)}_logWarning(e,t,i=!1){i?h.getLogger(this).warnOnce(e,t):h.getLogger(this).warn(e,t)}_reset(){this._clearCaches(),this._pendingEditsCache.clear(),this.failures.removeAll(),this._attachmentsOperationQueue.removeAll(),this._editOperationQueue.removeAll(),this.featureTitleMap.clear(),this._loadController=p(this._loadController),this._queryOperationInfos.forEach(e=>e.controller.abort()),this._queryOperationInfos.clear(),this._temporaryHighlight=u(this._temporaryHighlight?.handle),this._temporaryHighlightAbortController=p(this._temporaryHighlightAbortController),this._loaded=!1,this._loadError=!1,this._size=0}async _getSize(e,t){return 0===this.maxSize?0:null!=t?t:await this._queryCount(e)}async _queryFeaturesByObjectId(e){const{layer:t}=this;if(!t||!this.supportsQuery)throw new o("store:query-error","Layer does not support query operation.");const{effectiveTimeExtent:i,effectiveWhere:r,orderByFields:s,supportsCacheHint:n,supportsOrderBy:a}=this,l=t.createQuery();l.where=r,l.timeExtent=i,l.returnGeometry=!1,l.objectIds=e.length?e:void 0,l.outFields=[t.objectIdField],a&&(l.orderByFields=s),n&&(l.cacheHint=!0);return(await t.queryFeatures(l)).features}async _syncTemporaryHighlight(e,t){const{highlightEnabled:i,highlightableLayerView:r}=this;r&&i&&null!=e&&(g(t),this._temporaryHighlight={id:e,handle:r.highlight(e,{name:M})})}_ensureLayerAndUpdateSupport(){const e=this._layerWithEditing;if(!e||!this.supportsUpdate)throw new o("store:update-error","Update is not supported.");return e}_stashPendingEdits(e,t){t.forEach(({objectId:t,updates:i})=>{const r=this.getItemByObjectId(t)?.feature;if(!r)throw new o("store:update-error","Feature with provided 'objectId' not found.");const s=r.clone(),n=d(this._pendingEditsCache,t,()=>({originalFeature:s,changes:new _}));i.forEach(({fieldName:t,value:i})=>{const s=e.getField(t);s?(n.changes.set(s.name,i),r.attributes[s.name]=i):this._logWarning("store:pending-edit-unknown-field","The provided field does not belong to this layer.")}),n.changes.size>0&&this._pendingEditsCache.set(t,n)})}_syncPendingEdits(){for(const[e,t]of this._pendingEditsCache){const i=this.getItemByObjectId(e)?.feature;if(i){const e=i.clone();for(const[r,s]of t.changes)i.attributes[r]=s;t.originalFeature=e}}}_getFeatureWithPendingEdits(e,t){let i=this.getItemByObjectId(e)?.feature;if(!i){i=t.originalFeature.clone();for(const[e,r]of t.changes)i.attributes[e]=r}return i}_discardPendingEdit({objectId:e,fieldName:t}){const i=this._pendingEditsCache.get(e);if(!i)return void this._logWarning("store:pending-edit-not-found","Could not find a pending edit with the given information");const r=this.getItemByObjectId(e);t?(r&&(r.feature.attributes[t]=i.originalFeature.attributes[t]),i.changes.delete(t),0===i.changes.size&&this._pendingEditsCache.delete(e)):(r&&(r.feature=i.originalFeature),this._pendingEditsCache.delete(e))}_clearOptionsAndViolations(){const{_layerWithContingentValues:e,_contingentValuesManager:t}=this;e&&(t.resetOptionsForLayer(e),t.resetViolationsForLayer(e))}_prepareEditsForUpdate(e){const i=[];return e.forEach(({objectId:e,updates:r})=>{const s=this.getItemByObjectId(e)?.feature;if(!s)return;const n=l(s.attributes);r.forEach(({fieldName:e,value:t})=>n[e]=t),i.push(new t({attributes:n,sourceLayer:s.sourceLayer}))}),i}_update(e,t,i=!1){const r=e.applyEdits({updateFeatures:t}).then(i=>{const{updateFeatureResults:r}=i,s=r.find(e=>!!e.error);if(s)throw s.error;return t.forEach(t=>{const i=t.getObjectId()??t.attributes[e.objectIdField],r=this.getItemByObjectId(i)?.feature;r&&(r.attributes=t.attributes),this.featureTitleMap.has(i)&&this.getFeatureTitle(i,!0)}),i});return this._queueEditOperation(()=>r,i)}_createFeatureStoreItems(e){const{attachments:t,features:i,layer:r,relatedRecords:s}=e,n=r.objectIdField;return i.map(e=>{const i=e.getObjectId()??e.attributes[n],a=[];e.layer||e.sourceLayer||(e.layer=r,e.sourceLayer=r);const o=this._pendingEditsCache.get(i);if(o){const t=e.clone(),i=o.changes;for(const[r,s]of i)e.attributes[r]=s;o.originalFeature=t}return s.forEach((e,t)=>{a.push({relationshipId:t,count:e[i]??0})}),{objectId:i,feature:e,attachments:t[i]??null,relatedRecords:a}})}async _query(e){const{pageIndex:t,refresh:i}=e;!0===i&&await this._refresh();const r=this.pageCache.get(t);if(r)return r;const s=this._queryOperationInfos.get(t);if(s)return s.task.promise;const n=new AbortController,a=await this._queryPage(e,n);return n.signal.aborted||this.pageCache.set(t,a),a}_queryAttachments(e,t){const{_layerWithAttachments:i,effectiveWhere:r}=this;return i?e.some(e=>"number"!=typeof e)?Promise.reject(new o("invalid-object-id","Only numeric object ids are valid to query attachments")):i.queryAttachments(new j({objectIds:e,where:r,returnMetadata:!0}),{signal:t}):Promise.resolve({})}async _queryCount(e){const{_relatedLayerSupportsCacheHint:t,layer:i,relationshipConfig:r,supportsCacheHint:s}=this;if(!i)return 0;if(r&&this._canUseRelatedLayer){const{objectId:i,relatedLayer:s,relationshipId:n}=r;return(await s.queryRelatedFeaturesCount(new S({cacheHint:t,relationshipId:n,objectIds:[i]}),{signal:e}))[i]??0}const{effectiveTimeExtent:n,effectiveWhere:a,filterGeometry:o,objectIds:l}=this,h=i.createQuery();return h.geometry=o,h.returnGeometry=!1,h.where=a,h.timeExtent=n,h.objectIds=l?.length?l:void 0,s&&(h.cacheHint=!0),i.queryFeatureCount(h,{signal:e})}async _queryFeatures(e,t){const{relationshipConfig:i}=this;if(i&&this._canUseRelatedLayer)return this._queryRelatedFeatures(e,i);const{_effectiveReturnM:r,_effectiveReturnZ:s,effectiveOutFields:n,effectiveTimeExtent:a,effectiveWhere:o,filterGeometry:l,objectIds:h,orderByFields:d,pageSize:u,returnGeometry:p,supportsCacheHint:c,supportsOrderBy:y,supportsPagination:g}=this,{layer:_,start:f}=e,m=h?.length,b=_.createQuery();b.returnGeometry=p,b.outFields=n,b.returnM=r,b.returnZ=s,g?(b.start=f,b.num=u,b.where=o,b.timeExtent=a,b.objectIds=m?h:void 0):b.objectIds=m?h:this._getObjectIdsForPage(f,u??0),y&&(b.orderByFields=d),l&&(b.geometry=l),c&&(b.cacheHint=!0);return(await _.queryFeatures(b,{signal:t})).features}_queryObjectIds(e){const{effectiveTimeExtent:t,effectiveWhere:i,filterGeometry:r,layer:s,objectIds:n,orderByFields:a,supportsCacheHint:o,supportsOrderBy:l}=this;if(!s)return Promise.resolve([]);const h=s.createQuery();return h.geometry=r,h.outFields=[s.objectIdField],h.returnGeometry=!1,h.where=i,h.timeExtent=t,h.objectIds=n?.length?n:void 0,l&&(h.orderByFields=a),o&&(h.cacheHint=!0),s.queryObjectIds(h,{signal:e})}async _queryPage(e,t){return this._queueQueryOperation(e.pageIndex,{controller:t,task:n(async()=>this._queryPageData(e,t))})}async _queryPageData(e,t){const{layer:i}=e,{signal:r}=t,s=await this._queryFeatures(e,r);if(r.aborted)return[];const n=this._getObjectIdsForFeatures(s,i),[a,o]=await Promise.all([this._queryAttachments(n,r),this._queryRelatedCounts(n,r)]);return t.signal.aborted?[]:this._createFeatureStoreItems({layer:i,features:s,attachments:a,relatedRecords:o})||[]}async _queryRelatedCounts(e,t){const{_layerWithRelationships:i,relationshipIds:r,supportsCacheHintQueryRelated:s}=this,n=new Map;return i&&e?.length&&r.length?(await Promise.allSettled(r.map(async r=>{const a=await i.queryRelatedFeaturesCount(new S({cacheHint:s,relationshipId:r,objectIds:e}),{signal:t});n.set(r,a)})),n):n}async _queryRelatedFeatures(e,t){const{_defaultOutFields:i,_effectiveReturnM:r,_effectiveReturnZ:s,orderByFields:n,pageSize:a,returnGeometry:o,supportsCacheHint:l}=this,{layer:h,start:d}=e,{objectId:u,relatedLayer:p,relationshipId:c}=t,y=h.createQuery(),g=new S({cacheHint:l,num:a,objectIds:[u],orderByFields:n,outFields:i,relationshipId:c,returnGeometry:o,returnM:r,returnZ:s,start:d,where:y.where??void 0}),_=await p.queryRelatedFeatures(g);return _[u]?.features||[]}_queueAttachmentsOperation(e,t){return this._attachmentsOperationQueue.push(t),t().then(async i=>{this._attachmentsOperationQueue.remove(t);const r=this._ensureArray(i),s=r.some(e=>e.error),n=this.getItemByObjectId(e);if(n&&(!s||r.length>1)){const t=await this._queryAttachments([e]);n.attachments=t[e]}return i}).catch(async i=>{this._logError("store:attachment-error","An error occurred.");const r={error:i,retry:()=>{this.failures.remove(r),this._queueAttachmentsOperation(e,t)},cancel:()=>this.failures.remove(r)};throw this.failures.add(r),this._attachmentsOperationQueue.remove(t),i})}_queueEditOperation(e,t=!1){return this._editOperationQueue.push(e),e().then(i=>(this._editOperationQueue.remove(e),t&&this._pendingEditsCache.clear(),i)).catch(t=>{this._logError("store:edit-error","An error occurred.");const i={error:t,retry:()=>{this.failures.remove(i),this._queueEditOperation(e)},cancel:()=>this.failures.remove(i)};throw this.failures.add(i),this._editOperationQueue.remove(e),t})}async _queueQueryOperation(e,t){this._queryOperationInfos.set(e,t);const i=await t.task.promise;return this._queryOperationInfos.delete(e),i}};e([v()],T.prototype,"_attachmentsOperationQueue",void 0),e([v({readOnly:!0})],T.prototype,"_capabilities",null),e([v()],T.prototype,"_canSavePendingEdits",null),e([v()],T.prototype,"_contingentValuesManager",void 0),e([v()],T.prototype,"_defaultOutFields",void 0),e([v()],T.prototype,"_editOperationQueue",void 0),e([v()],T.prototype,"_effectiveReturnZ",null),e([v()],T.prototype,"_effectiveReturnM",null),e([v()],T.prototype,"featureTitleMap",void 0),e([v({readOnly:!0})],T.prototype,"_layerWithAttachments",null),e([v({readOnly:!0})],T.prototype,"_layerWithAttachmentsEditing",null),e([v()],T.prototype,"_layerWithContingentValues",null),e([v({readOnly:!0})],T.prototype,"_layerWithEditing",null),e([v({readOnly:!0})],T.prototype,"_layerWithRelationships",null),e([v()],T.prototype,"_loaded",void 0),e([v()],T.prototype,"_loadController",void 0),e([v()],T.prototype,"_loadError",void 0),e([v()],T.prototype,"_objectIdCache",void 0),e([v()],T.prototype,"_pendingEditsCache",void 0),e([v()],T.prototype,"_pendingEditsAreInvalid",null),e([v()],T.prototype,"_queryOperationInfos",void 0),e([v({readOnly:!0})],T.prototype,"_relatedLayer",null),e([v({readOnly:!0})],T.prototype,"_relatedLayerCapabilities",null),e([v({readOnly:!0})],T.prototype,"_relatedLayerSupportsCacheHint",null),e([v()],T.prototype,"_relatedLayerSupportsQuery",null),e([v()],T.prototype,"_relatedLayerSupportsQueryRelated",null),e([v()],T.prototype,"_size",void 0),e([v()],T.prototype,"_sortedFieldNames",null),e([v()],T.prototype,"_subtypeCode",null),e([v()],T.prototype,"_subtypeField",null),e([v()],T.prototype,"_canUseRelatedLayer",null),e([v()],T.prototype,"_shouldFilterByLayerScaleRange",null),e([v()],T.prototype,"_visibleAtCurrentScale",null),e([v()],T.prototype,"attachmentsEnabled",void 0),e([v()],T.prototype,"autoSaveEnabled",void 0),e([v()],T.prototype,"canAddRelatedFeature",null),e([v()],T.prototype,"defaultSelectionManager",void 0),e([v()],T.prototype,"editingEnabled",void 0),e([v()],T.prototype,"effectiveOutFields",null),e([v()],T.prototype,"effectiveSelectionManager",null),e([v()],T.prototype,"effectiveSize",null),e([v()],T.prototype,"effectiveTimeExtent",null),e([v()],T.prototype,"effectiveWhere",null),e([v({readOnly:!0})],T.prototype,"failures",void 0),e([v()],T.prototype,"fieldsWithContingentValues",null),e([v()],T.prototype,"filterByViewExtent",void 0),e([v()],T.prototype,"filterByLayerScaleRange",void 0),e([v({types:C})],T.prototype,"filterGeometry",void 0),e([v()],T.prototype,"hasContingentValues",null),e([v()],T.prototype,"hasInvalidPendingEdits",null),e([v()],T.prototype,"hasPendingEdits",null),e([v()],T.prototype,"highlightEnabled",void 0),e([v()],T.prototype,"highlightableLayerView",null),e([v()],T.prototype,"initialSize",void 0),e([v({readOnly:!0})],T.prototype,"isQuerying",null),e([v({readOnly:!0})],T.prototype,"isSyncing",null),e([v({readOnly:!0})],T.prototype,"isSyncingAttachmentEdits",null),e([v({readOnly:!0})],T.prototype,"isSyncingFeatureEdits",null),e([v({readOnly:!0})],T.prototype,"itemCache",null),e([v()],T.prototype,"layer",void 0),e([v()],T.prototype,"layerView",null),e([v()],T.prototype,"maxSize",void 0),e([v()],T.prototype,"objectIds",void 0),e([v()],T.prototype,"orderByFields",null),e([v()],T.prototype,"outFields",void 0),e([v({readOnly:!0})],T.prototype,"pageCache",void 0),e([v()],T.prototype,"pageCount",null),e([v()],T.prototype,"pageIndex",null),e([v()],T.prototype,"pageSize",void 0),e([v()],T.prototype,"paginationEnabled",void 0),e([v()],T.prototype,"pendingEditsCount",null),e([v()],T.prototype,"relationship",null),e([v()],T.prototype,"relationshipConfig",void 0),e([v()],T.prototype,"relationshipIds",null),e([v()],T.prototype,"relationshipInfos",null),e([v()],T.prototype,"relationships",null),e([v()],T.prototype,"relatedRecordsEnabled",void 0),e([v()],T.prototype,"returnGeometry",void 0),e([v()],T.prototype,"returnZ",void 0),e([v()],T.prototype,"returnM",void 0),e([v()],T.prototype,"selectionManager",void 0),e([v({readOnly:!0})],T.prototype,"size",null),e([v()],T.prototype,"sortOrders",void 0),e([v({readOnly:!0})],T.prototype,"state",null),e([v()],T.prototype,"supportsAdd",null),e([v()],T.prototype,"supportsAddAttachments",null),e([v()],T.prototype,"supportsAttachments",null),e([v()],T.prototype,"supportsCacheHint",null),e([v()],T.prototype,"supportsCacheHintQueryRelated",null),e([v()],T.prototype,"supportsDelete",null),e([v()],T.prototype,"supportsEditing",null),e([v()],T.prototype,"supportsM",null),e([v()],T.prototype,"supportsOrderBy",null),e([v()],T.prototype,"supportsPagination",null),e([v()],T.prototype,"supportsQuery",null),e([v()],T.prototype,"supportsQueryRelated",null),e([v()],T.prototype,"supportsResizeAttachments",null),e([v()],T.prototype,"supportsUpdate",null),e([v()],T.prototype,"supportsUpdateAttachments",null),e([v()],T.prototype,"supportsZ",null),e([v()],T.prototype,"syncViewSelection",void 0),e([v()],T.prototype,"temporaryHighlightId",void 0),e([v({type:q})],T.prototype,"timeExtent",void 0),e([v()],T.prototype,"timeZone",void 0),e([v()],T.prototype,"view",void 0),e([v()],T.prototype,"viewTimeEnabled",void 0),e([v()],T.prototype,"where",void 0),T=e([I("esri.widgets.FeatureTable.support.FeatureStore")],T);const G=T;export{G as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{equals as i,isSome as s}from"../../../core/arrayUtils.js";import{createTask as n}from"../../../core/asyncUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{clone as l}from"../../../core/lang.js";import h from"../../../core/Logger.js";import{getOrCreateMapValue as d}from"../../../core/MapUtils.js";import{removeMaybe as u,abortMaybe as p}from"../../../core/maybe.js";import{debounce as c,ignoreAbortErrors as y,throwIfAborted as g}from"../../../core/promiseUtils.js";import _ from"../../../core/ReactiveMap.js";import{watch as f,when as m,syncAndInitial as b,sync as E}from"../../../core/reactiveUtils.js";import{property as v,subclass as C}from"../../../core/accessorSupport/decorators.js";import{geometryTypes as I}from"../../../geometry/support/typeUtils.js";import{isFeatureLayer as w,isSubtypeGroupLayer as F,isSubtypeSublayer as O}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as A}from"../../../layers/support/timeSupport.js";import j from"../../../rest/support/AttachmentQuery.js";import S from"../../../rest/support/RelationshipQuery.js";import q from"../../../time/TimeExtent.js";import R from"../../../views/SelectionManager.js";import{temporaryHighlightName as M}from"../../../views/support/HighlightDefaults.js";import{highlightsSupported as V}from"../../../views/support/layerViewUtils.js";import{isSelectableLayerWithObjectIds as L,isSelectableLayer as P}from"../../../views/support/selectionUtils.js";import{isIFeatureTableSupportedLayerWithAttachments as B,isIFeatureTableSupportedLayerWithAttachmentsEditing as W,isIFeatureTableSupportedLayerWithEditing as x,isIFeatureTableSupportedLayerWithRelationships as z,isPageIndexValid as H,findRelatedLayer as Q}from"./tableUtils.js";import{ContingentValuesManager as U}from"../../support/ContingentValuesManager.js";let T=class extends r{constructor(e){super(e),this._attachmentsOperationQueue=new a,this._contingentValuesManager=new U,this._defaultOutFields=["*"],this._editOperationQueue=new a,this.featureTitleMap=new _,this._loaded=!1,this._loadController=null,this._loadDebounced=c(()=>this._load()),this._loadError=!1,this._objectIdCache=new a,this._pendingEditsCache=new _,this._queryOperationInfos=new _,this._refreshDebounced=c(()=>this._refresh()),this._size=0,this._temporaryHighlight=null,this._temporaryHighlightAbortController=null,this.attachmentsEnabled=!1,this.autoSaveEnabled=!0,this.defaultSelectionManager=new R,this.editingEnabled=!1,this.failures=new a,this.filterByViewExtent=!1,this.filterByLayerScaleRange=!1,this.filterGeometry=null,this.highlightEnabled=!0,this.initialSize=null,this.layer=null,this.maxSize=null,this.objectIds=null,this.outFields=null,this.pageCache=new _,this.pageSize=50,this.paginationEnabled=!1,this.relationshipConfig=null,this.relatedRecordsEnabled=!1,this.returnGeometry=!1,this.returnZ=!1,this.returnM=!1,this.selectionManager=null,this.sortOrders=[],this.syncViewSelection=!1,this.temporaryHighlightId=void 0,this.timeExtent=null,this.timeZone=null,this.view=null,this.viewTimeEnabled=!1,this.where=null}initialize(){this.addHandles([f(()=>[this._visibleAtCurrentScale,this.effectiveTimeExtent,this.effectiveWhere,this.filterGeometry,this.layer,this.objectIds,this.outFields,this.pageSize,this.relationshipConfig,this.returnGeometry,this.returnM,this.returnZ],()=>this._reset()),f(()=>this.orderByFields,()=>this._clearCaches(),{equals:i}),m(()=>this.attachmentsEnabled,()=>this._reset()),m(()=>this.relatedRecordsEnabled,()=>this._reset()),f(()=>this._layerWithContingentValues,e=>{const t=this._contingentValuesManager;e&&!t.layers.includes(e)&&t.layers.add(e)}),f(()=>[this.view?.extent,this.view?.stationary,this.filterByViewExtent],([e,t,r])=>{r&&(e?t&&(this.filterGeometry=e):this.filterGeometry=null)},b),f(()=>this.maxSize,(e,t)=>{0===t&&this._reset()}),f(()=>[this.layer,this.view],()=>this.syncSelectionSources(),b),f(()=>this.highlightEnabled,e=>this.defaultSelectionManager.highlightEnabled=e,b),f(()=>this.temporaryHighlightId,e=>{this._temporaryHighlight=u(this._temporaryHighlight?.handle),this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController;const t=this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal);y(this.view?.addUpdatingPromise(t)??t)},E)])}destroy(){this.layer=null,this.itemCache.destroy(),this.failures.destroy(),this.defaultSelectionManager.destroy(),this._temporaryHighlight=u(this._temporaryHighlight?.handle),this._temporaryHighlightAbortController=p(this._temporaryHighlightAbortController)}get _capabilities(){const{layer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _canSavePendingEdits(){return this.supportsEditing&&this.hasPendingEdits&&!this.hasInvalidPendingEdits}get _effectiveReturnZ(){return this.returnZ&&this.supportsZ}get _effectiveReturnM(){return this.returnM&&this.supportsM}get _layerWithAttachments(){const{layer:e}=this;return e&&this._capabilities&&this.attachmentsEnabled&&this.supportsAttachments&&B(e)?e:null}get _layerWithAttachmentsEditing(){const{_layerWithAttachments:e}=this;return e&&W(e)&&this.supportsEditing?e:null}get _layerWithContingentValues(){const{layer:e}=this;return w(e)||F(e)?e:null}get _layerWithEditing(){const e=this.layer;return x(e)&&this.supportsEditing?e:null}get _layerWithRelationships(){const e=this.layer;return z(e)&&this.supportsQueryRelated?e:null}get _pendingEditsAreInvalid(){const e=this._pendingEditsCache,t=this._layerWithContingentValues;if(!t)return!1;for(const r of e.keys()){const i=e.get(r),s=this._getFeatureWithPendingEdits(r,i);for(const e of i.changes.keys()){if(this._contingentValuesManager.getViolationForField(t,s,e))return!0}}return!1}get _relatedLayer(){return this.relationshipConfig?.relatedLayer}get _relatedLayerCapabilities(){const{_relatedLayer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _relatedLayerSupportsCacheHint(){return!!this._relatedLayerCapabilities?.queryRelated?.supportsCacheHint}get _relatedLayerSupportsQuery(){return!!this._relatedLayerCapabilities?.operations.supportsQuery}get _relatedLayerSupportsQueryRelated(){const{_relatedLayerCapabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get _sortedFieldNames(){return this.sortOrders.map(({fieldName:e})=>e)}get _subtypeCode(){return this.layer?.subtypeCode??null}get _subtypeField(){const{layer:e}=this;return F(e?.parent)?e.subtypeField:null}get _canUseRelatedLayer(){return!(!this._relatedLayerSupportsQuery||!this._relatedLayerSupportsQueryRelated)}get _shouldFilterByLayerScaleRange(){return!(!this.view||!this.filterByLayerScaleRange)}get _visibleAtCurrentScale(){return!(!this._shouldFilterByLayerScaleRange||!this.layerView?.visibleAtCurrentScale)}get cachedPageCount(){return this.pageCache.size}get canAddRelatedFeature(){const{state:e,relationship:t,supportsAdd:r,supportsEditing:i}=this;if("loaded"!==e||!t||!r||!i)return!1;const{cardinality:s,role:n}=t,a=this.size>0;return("one-to-one"!==s||!a)&&("one-to-many"!==s||"origin"!==n||!a)}get effectiveOutFields(){const{layer:e,outFields:t}=this;if(!e||!t?.length)return this._defaultOutFields;const r=[];t.forEach(t=>{const i=e.fieldsIndex.normalizeFieldName(t);i&&r.push(i)});const{objectIdField:i}=e,s=e.fieldsIndex.normalizeFieldName(i)??i;return s&&!r.includes(s)&&r.unshift(s),r}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&L(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this.defaultSelectionManager}get effectiveSize(){const{_size:e,maxSize:t}=this;return null!=t?Math.min(t,e):e}get effectiveTimeExtent(){const{layer:e,timeExtent:t,view:r,viewTimeEnabled:i}=this;if(t||!e)return t;if(!r||!i)return e.timeExtent??void 0;return A({datesInUnknownTimezone:e.datesInUnknownTimezone??void 0,timeExtent:e.timeExtent,timeInfo:e.timeInfo,timeOffset:e.timeOffset,useViewTime:e.useViewTime},r.timeExtent,this._get("effectiveTimeExtent"))??void 0}get effectiveWhere(){const{layer:e,where:t}=this;return null!=t&&""!==t?t:O(e)&&e.parent?.definitionExpression?e.parent.definitionExpression:e?.definitionExpression||"1=1"}get fieldsWithContingentValues(){return this._contingentValuesManager.getFieldsWithContingentValues(this.layer)}get hasContingentValues(){return this.fieldsWithContingentValues.size>0}get hasInvalidPendingEdits(){return this.hasPendingEdits&&this._pendingEditsAreInvalid}get hasPendingEdits(){return this.pendingEditsCount>0}get highlightableLayerView(){const e=this.layerView;return V(e)?e:null}get isQuerying(){return this._queryOperationInfos.size>0}get isSyncing(){return this.isSyncingFeatureEdits||this.isSyncingAttachmentEdits}get isSyncingAttachmentEdits(){return this._attachmentsOperationQueue.length>0}get isSyncingFeatureEdits(){return this._editOperationQueue.length>0}get itemCache(){return new a({items:[...this.pageCache.values()].flat()})}get layerView(){const{layer:e,view:t}=this;if(!e||!t)return null;const r="sublayer"===e.type||O(e)?e.parent:e;return t.allLayerViews.find(e=>e.layer===r)}get orderByFields(){const{_sortedFieldNames:e,layer:t,sortOrders:r}=this,i=r.filter(({fieldName:t,direction:r},i)=>e.indexOf(t)===i&&null!=r).map(({fieldName:e,direction:t})=>`${e} ${t?.toUpperCase()}`);if(t&&!i.length&&!t.objectIdField&&t.fields?.length){const e=t.fields.find(e=>e.name);if(e){const r=t.fieldsIndex.normalizeFieldName(e.name);r&&i.push(`${r} ASC`)}}return i}get pageCount(){const{effectiveSize:e,pageSize:t}=this;return 0===e||0===t?1:Math.ceil(e/t)}get pageIndex(){return this._get("pageIndex")||0}set pageIndex(e){const{pageCount:t}=this;H(e,t)&&this._set("pageIndex",e)}get pendingEditsCount(){let e=0;return this._pendingEditsCache.forEach(t=>e+=t.changes.size),e}get relationship(){const{relationshipConfig:e}=this;return null==e?.relationshipId?null:this.relationships?.find(t=>t.id===e.relationshipId)}get relationshipIds(){return this.relationships?.map(e=>e.id)??[]}get relationshipInfos(){const{_layerWithRelationships:e,relatedRecordsEnabled:t,relationships:r,view:i}=this,s=[];return t&&e?.loaded&&i?.map&&r?.length?(r.forEach(t=>{const r=Q(e,i,t);r&&(r.load().catch(()=>{}),s.push({layer:e,relatedLayer:r,relationshipId:t.id}))}),s):s}get relationships(){return this._layerWithRelationships?.relationships}get size(){return this._size}get state(){const{layer:e,_loaded:t,_loadError:r}=this;return!e||e.destroyed?"disabled":r||e.loadError?"error":this._loadController?"loading":"loaded"===e.loadStatus&&t?"loaded":"ready"}get supportsAdd(){return!!this._capabilities?.operations.supportsAdd}get supportsAddAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsAttachments(){const{_capabilities:e}=this;return!(!e?.data?.supportsAttachment||!e?.operations.supportsQueryAttachments)}get supportsCacheHint(){return!!this._capabilities?.query?.supportsCacheHint}get supportsCacheHintQueryRelated(){return!!this._capabilities?.queryRelated?.supportsCacheHint}get supportsDelete(){return!!this._capabilities?.operations.supportsDelete}get supportsEditing(){return!!this._capabilities?.operations.supportsEditing}get supportsM(){return!!this.layer?.hasM&&!!this._capabilities?.data?.supportsM}get supportsOrderBy(){return!!this._capabilities?.query?.supportsOrderBy}get supportsPagination(){return!!this._capabilities?.query?.supportsPagination}get supportsQuery(){return!!this._capabilities?.operations.supportsQuery}get supportsQueryRelated(){const{_capabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get supportsResizeAttachments(){const{_capabilities:e}=this;return!(!this.supportsAttachments||!e?.attachment?.supportsResize)}get supportsUpdate(){return!!this._capabilities?.operations.supportsUpdate}get supportsUpdateAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsZ(){return!!this.layer?.hasZ&&!!this._capabilities?.data?.supportsZ}async addAttachment(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsAddAttachments)return{};const i=await this._queueAttachmentsOperation(e,()=>r.addAttachment(this._createBaseGraphic(r,e),t));return this._ensureArrayContent(i)}addPendingEdits(e){const t=this._ensureLayerAndUpdateSupport();this.editingEnabled?(this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),this._stashPendingEdits(t,e)):this._logWarning("store:editing-disabled","Editing is disabled.")}async deleteAttachments(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsUpdateAttachments||!t.length)return[];const i=await this._queueAttachmentsOperation(e,()=>r.deleteAttachments(this._createBaseGraphic(r,e),t));return this._ensureArray(i)}async deleteRowsByObjectId(e){const{_layerWithEditing:t}=this;if(!this.supportsDelete||!t)throw new o("store:delete-error","Delete is not supported.");const r=e.map(e=>this.getItemByObjectId(e)?.feature).filter(s),i=this._queueEditOperation(()=>t.applyEdits({deleteFeatures:r}));return e.forEach(e=>{this.featureTitleMap.delete(e),this._discardPendingEdit({objectId:e})}),i}discardPendingEdits(e){if(e?.length)e.forEach(e=>this._discardPendingEdit(e));else{for(const[e,t]of this._pendingEditsCache){const r=this.getItemByObjectId(e);r&&(r.feature=t.originalFeature)}this._pendingEditsCache.clear(),this._clearOptionsAndViolations()}}itemHasInvalidPendingEdits(e,t){if(!this.hasInvalidPendingEdits)return!1;const r=this._layerWithContingentValues,i=this._pendingEditsCache.get(e);if(!r||!i)return!1;const s=this._getFeatureWithPendingEdits(e,i),n=this._contingentValuesManager;return t?!!n.getViolationForField(r,s,t):!!n.getAllViolations(r,s)}itemHasPendingEdits(e,t){const r=this._pendingEditsCache.get(e);return!!r&&(!t||r.changes.has(t))}async getAttachmentsByObjectId(e,t){const r=this.getItemByObjectId(e)?.attachments??[];if(!r.length&&t){return(await this._queryAttachments([e]))[e]??[]}return r}getCachedFeaturesByPageIndex(e){return this.pageCache.get(e)}getFieldValueOptions(e){return this._contingentValuesManager.getFieldValueOptions(e)}async getFeatureTitle(e,r=!1){const{layer:i}=this,s=this.featureTitleMap.get(e),n=`${e}`;if(!i)return s||n;if(s&&!r)return s;if(!("getFeatureTitle"in i)||!i.getFeatureTitle)return n;const a=this.getItemByObjectId(e);let o=a?.feature;o||(o=new t({attributes:{[i.objectIdField]:e},origin:i.graphicOrigin}));const l=await i.getFeatureTitle(o,{fetchMissingFields:!0,removeHTML:!0});return l?(this.featureTitleMap.set(e,l),l):n}getItemByObjectId(e){for(const t of this.pageCache.values())for(const r of t)if(r.objectId===e)return r}getItemIndexByObjectId(e){const{pageCache:t,pageSize:r}=this,i=t.entries();let s=-1;for(const[n,a]of i)if(a.some((t,i)=>{const a=t.objectId===e;return a&&(s=n*r+i),a}),s>-1)break;return s}async load(){await y(this._loadDebounced())}async queryPage(e){const{layer:t,state:r}=this;if(!t||"loaded"!==r||!this.supportsQuery||0===this.size||0===this.maxSize)return[];const{pageIndex:i}=e;if(!H(i,this.pageCount))return[];const s=e.pageSize??this.pageSize,n=i*s,a=n+s;return await y(this._query({layer:t,start:n,num:a,pageIndex:i,pageSize:s}))??[]}async refresh(){await y(this._refreshDebounced())}reset(){this._reset()}async savePendingEdits(){const e=this._ensureLayerAndUpdateSupport();if(!this.editingEnabled)return void this._logWarning("store:editing-disabled","Editing is disabled.");if(this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),!this._canSavePendingEdits)return void this._logError("store:update-error","An error occurred. Unable to save pending edits.");const t=[];for(const[r]of this._pendingEditsCache){const e=this.getItemByObjectId(r);e?.feature&&t.push(e.feature)}(await this._update(e,t,!0)).updateFeatureResults.find(e=>e.error)&&this.discardPendingEdits(),this._clearOptionsAndViolations()}syncSelectionSources(){const{defaultSelectionManager:e,layer:t,view:r}=this;e.view=r,e.sources.removeAll(),P(t)&&(e.sources.items=[t])}async updateAttachment(e,t,r){const{_layerWithAttachmentsEditing:i}=this;if(!i||!this.supportsUpdateAttachments)return{};const s=await this._queueAttachmentsOperation(e,()=>i.updateAttachment(this._createBaseGraphic(i,e),t,r));return this._ensureArrayContent(s)}async updateItem(e){const t=this._ensureLayerAndUpdateSupport();if(!this.editingEnabled)return void this._logWarning("store:editing-disabled","Editing is disabled.");if(this.hasContingentValues){const t=e.updates.some(e=>this.fieldsWithContingentValues.has(e.fieldName)),r=this.itemHasPendingEdits(e.objectId);if(r||t){const t=this._layerWithContingentValues,i=this.getItemByObjectId(e.objectId)?.feature?.clone();if(i){const s=this._contingentValuesManager.getAllViolations(t,i);e.updates.forEach(({fieldName:e,value:r})=>{const s=t.getField(e);s&&(i.attributes[s.name]=r)});if(this._contingentValuesManager.validateContingencyConstraints(t,i).length||s.length||r)return this._stashPendingEdits(t,[e]),void this._contingentValuesManager.resetOptionsForLayer(t)}}}if(!this.autoSaveEnabled)return void this._stashPendingEdits(t,[e]);const{_sortedFieldNames:r}=this,i=e.updates.map(({fieldName:e})=>e),s=this._prepareEditsForUpdate([e]);!(await this._update(t,s)).updateFeatureResults.find(e=>e.error)&&i.some(e=>r.includes(e))&&this._clearCaches()}async verifyFeaturesByObjectId(e){const{layer:t,state:r}=this;if(!t||"loaded"!==r)return[];const{objectIdField:i}=t,s=await this._queryFeaturesByObjectId(e);return e.map(e=>s.some(t=>{const r=t.getObjectId()??t.attributes[i];return e===r}))}async _load(){const{layer:e}=this;if(this._reset(),!e)return;const t=new AbortController;this._loadController=t;try{if(await e.load(),e.parent&&F(e.parent)&&await e.parent.loadAll(),await e.when(),t.signal.aborted)return;let r=this.initialSize;if(this.initialSize=null,this._shouldFilterByLayerScaleRange&&(this._visibleAtCurrentScale||(r=0)),await y(this._refresh(t,r)),t.signal.aborted)return void(this._loadController=null);this._loaded=!0,this._loadController=null}catch(r){throw this._reset(),this._loadError=!0,this._logError("store:load-error","An error occurred."),r}}async _refresh(e,t){this._clearCaches();const r=e?.signal,i=await this._getSize(r,t),s=await this._queryAllObjectIds(r);r?.aborted||(this._size=i,this._objectIdCache.removeAll(),s?.length&&this._objectIdCache.addMany(s),this._syncPendingEdits())}async _queryAllObjectIds(e){return this.supportsPagination?void 0:await this._queryObjectIds(e)}_clearCaches(){this.pageCache.clear(),this._objectIdCache.removeAll()}_createBaseGraphic(e,r){const i=new t({attributes:{[e.objectIdField]:r}});return this._subtypeField&&null!=this._subtypeCode&&(i.attributes[this._subtypeField]=this._subtypeCode),i}_ensureArray(e){return Array.isArray(e)?e:[e]}_ensureArrayContent(e){return Array.isArray(e)?e[0]:e}_getObjectIdsForFeatures(e,t){return e.map(e=>e.getObjectId()??e.attributes[t.objectIdField])}_getObjectIdsForPage(e,t){const r=this._objectIdCache.toArray();return r.length>=e+t?r.slice(e,e+t):r.slice(e)}_logError(e,t){h.getLogger(this).error(e,t)}_logWarning(e,t,r=!1){r?h.getLogger(this).warnOnce(e,t):h.getLogger(this).warn(e,t)}_reset(){this._clearCaches(),this._pendingEditsCache.clear(),this.failures.removeAll(),this._attachmentsOperationQueue.removeAll(),this._editOperationQueue.removeAll(),this.featureTitleMap.clear(),this._loadController=p(this._loadController),this._queryOperationInfos.forEach(e=>e.controller.abort()),this._queryOperationInfos.clear(),this._temporaryHighlight=u(this._temporaryHighlight?.handle),this._temporaryHighlightAbortController=p(this._temporaryHighlightAbortController),this._loaded=!1,this._loadError=!1,this._size=0}async _getSize(e,t){return 0===this.maxSize?0:null!=t?t:await this._queryCount(e)}async _queryFeaturesByObjectId(e){const{layer:t}=this;if(!t||!this.supportsQuery)throw new o("store:query-error","Layer does not support query operation.");const{effectiveTimeExtent:r,effectiveWhere:i,orderByFields:s,supportsCacheHint:n,supportsOrderBy:a}=this,l=t.createQuery();l.where=i,l.timeExtent=r,l.returnGeometry=!1,l.objectIds=e.length?e:void 0,l.outFields=[t.objectIdField],a&&(l.orderByFields=s),n&&(l.cacheHint=!0);return(await t.queryFeatures(l)).features}async _syncTemporaryHighlight(e,t){const{highlightEnabled:r,highlightableLayerView:i}=this;i&&r&&null!=e&&(g(t),this._temporaryHighlight={id:e,handle:i.highlight(e,{name:M})})}_ensureLayerAndUpdateSupport(){const e=this._layerWithEditing;if(!e||!this.supportsUpdate)throw new o("store:update-error","Update is not supported.");return e}_stashPendingEdits(e,t){t.forEach(({objectId:t,updates:r})=>{const i=this.getItemByObjectId(t)?.feature;if(!i)throw new o("store:update-error","Feature with provided 'objectId' not found.");const s=i.clone(),n=d(this._pendingEditsCache,t,()=>({originalFeature:s,changes:new _}));r.forEach(({fieldName:t,value:r})=>{const s=e.getField(t);s?(n.changes.set(s.name,r),i.attributes[s.name]=r):this._logWarning("store:pending-edit-unknown-field","The provided field does not belong to this layer.")}),n.changes.size>0&&this._pendingEditsCache.set(t,n)})}_syncPendingEdits(){for(const[e,t]of this._pendingEditsCache){const r=this.getItemByObjectId(e)?.feature;if(r){const e=r.clone();for(const[i,s]of t.changes)r.attributes[i]=s;t.originalFeature=e}}}_getFeatureWithPendingEdits(e,t){let r=this.getItemByObjectId(e)?.feature;if(!r){r=t.originalFeature.clone();for(const[e,i]of t.changes)r.attributes[e]=i}return r}_discardPendingEdit({objectId:e,fieldName:t}){const r=this._pendingEditsCache.get(e);if(!r)return void this._logWarning("store:pending-edit-not-found","Could not find a pending edit with the given information");const i=this.getItemByObjectId(e);t?(i&&(i.feature.attributes[t]=r.originalFeature.attributes[t]),r.changes.delete(t),0===r.changes.size&&this._pendingEditsCache.delete(e)):(i&&(i.feature=r.originalFeature),this._pendingEditsCache.delete(e))}_clearOptionsAndViolations(){const{_layerWithContingentValues:e,_contingentValuesManager:t}=this;e&&(t.resetOptionsForLayer(e),t.resetViolationsForLayer(e))}_prepareEditsForUpdate(e){const r=[];return e.forEach(({objectId:e,updates:i})=>{const s=this.getItemByObjectId(e)?.feature;if(!s)return;const n=l(s.attributes);i.forEach(({fieldName:e,value:t})=>n[e]=t),r.push(new t({attributes:n,sourceLayer:s.sourceLayer}))}),r}_update(e,t,r=!1){const i=e.applyEdits({updateFeatures:t}).then(r=>{const{updateFeatureResults:i}=r,s=i.find(e=>!!e.error);if(s)throw s.error;return t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],i=this.getItemByObjectId(r)?.feature;i&&(i.attributes=t.attributes),this.featureTitleMap.has(r)&&this.getFeatureTitle(r,!0)}),r});return this._queueEditOperation(()=>i,r)}_createFeatureStoreItems(e){const{attachments:t,features:r,layer:i,relatedRecords:s}=e,n=i.objectIdField;return r.map(e=>{const r=e.getObjectId()??e.attributes[n],a=[];e.layer||e.sourceLayer||(e.layer=i,e.sourceLayer=i);const o=this._pendingEditsCache.get(r);if(o){const t=e.clone(),r=o.changes;for(const[i,s]of r)e.attributes[i]=s;o.originalFeature=t}return s.forEach((e,t)=>{a.push({relationshipId:t,count:e[r]??0})}),{objectId:r,feature:e,attachments:t[r]??null,relatedRecords:a}})}async _query(e){const{pageIndex:t,refresh:r}=e;!0===r&&await this._refresh();const i=this.pageCache.get(t);if(i)return i;const s=this._queryOperationInfos.get(t);if(s)return s.task.promise;const n=new AbortController,a=await this._queryPage(e,n);return n.signal.aborted||this.pageCache.set(t,a),a}_queryAttachments(e,t){const{_layerWithAttachments:r,effectiveWhere:i}=this;return r?e.some(e=>"number"!=typeof e)?Promise.reject(new o("invalid-object-id","Only numeric object ids are valid to query attachments")):r.queryAttachments(new j({objectIds:e,where:i,returnMetadata:!0}),{signal:t}):Promise.resolve({})}async _queryCount(e){const{_relatedLayerSupportsCacheHint:t,layer:r,relationshipConfig:i,supportsCacheHint:s}=this;if(!r)return 0;if(i&&this._canUseRelatedLayer){const{objectId:r,relatedLayer:s,relationshipId:n}=i;return(await s.queryRelatedFeaturesCount(new S({cacheHint:t,relationshipId:n,objectIds:[r]}),{signal:e}))[r]??0}const{effectiveTimeExtent:n,effectiveWhere:a,filterGeometry:o,objectIds:l}=this,h=r.createQuery();return h.geometry=o,h.returnGeometry=!1,h.where=a,h.timeExtent=n,h.objectIds=l?.length?l:void 0,s&&(h.cacheHint=!0),r.queryFeatureCount(h,{signal:e})}async _queryFeatures(e,t){const{relationshipConfig:r}=this;if(r&&this._canUseRelatedLayer)return this._queryRelatedFeatures(e,r);const{_effectiveReturnM:i,_effectiveReturnZ:s,effectiveOutFields:n,effectiveTimeExtent:a,effectiveWhere:o,filterGeometry:l,objectIds:h,orderByFields:d,pageSize:u,returnGeometry:p,supportsCacheHint:c,supportsOrderBy:y,supportsPagination:g}=this,{layer:_,start:f}=e,m=h?.length,b=_.createQuery();b.returnGeometry=p,b.outFields=n,b.returnM=i,b.returnZ=s,g?(b.start=f,b.num=u,b.where=o,b.timeExtent=a,b.objectIds=m?h:void 0):b.objectIds=m?h:this._getObjectIdsForPage(f,u??0),y&&(b.orderByFields=d),l&&(b.geometry=l),c&&(b.cacheHint=!0);return(await _.queryFeatures(b,{signal:t})).features}_queryObjectIds(e){const{effectiveTimeExtent:t,effectiveWhere:r,filterGeometry:i,layer:s,objectIds:n,orderByFields:a,supportsCacheHint:o,supportsOrderBy:l}=this;if(!s)return Promise.resolve([]);const h=s.createQuery();return h.geometry=i,h.outFields=[s.objectIdField],h.returnGeometry=!1,h.where=r,h.timeExtent=t,h.objectIds=n?.length?n:void 0,l&&(h.orderByFields=a),o&&(h.cacheHint=!0),s.queryObjectIds(h,{signal:e})}async _queryPage(e,t){return this._queueQueryOperation(e.pageIndex,{controller:t,task:n(async()=>this._queryPageData(e,t))})}async _queryPageData(e,t){const{layer:r}=e,{signal:i}=t,s=await this._queryFeatures(e,i);if(i.aborted)return[];const n=this._getObjectIdsForFeatures(s,r),[a,o]=await Promise.all([this._queryAttachments(n,i),this._queryRelatedCounts(n,i)]);return t.signal.aborted?[]:this._createFeatureStoreItems({layer:r,features:s,attachments:a,relatedRecords:o})||[]}async _queryRelatedCounts(e,t){const{_layerWithRelationships:r,relationshipIds:i,supportsCacheHintQueryRelated:s}=this,n=new Map;return r&&e?.length&&i.length?(await Promise.allSettled(i.map(async i=>{const a=await r.queryRelatedFeaturesCount(new S({cacheHint:s,relationshipId:i,objectIds:e}),{signal:t});n.set(i,a)})),n):n}async _queryRelatedFeatures(e,t){const{_defaultOutFields:r,_effectiveReturnM:i,_effectiveReturnZ:s,orderByFields:n,pageSize:a,returnGeometry:o,supportsCacheHint:l}=this,{layer:h,start:d}=e,{objectId:u,relatedLayer:p,relationshipId:c}=t,y=h.createQuery(),g=new S({cacheHint:l,num:a,objectIds:[u],orderByFields:n,outFields:r,relationshipId:c,returnGeometry:o,returnM:i,returnZ:s,start:d,where:y.where??void 0}),_=await p.queryRelatedFeatures(g);return _[u]?.features||[]}_queueAttachmentsOperation(e,t){return this._attachmentsOperationQueue.push(t),t().then(async r=>{this._attachmentsOperationQueue.remove(t);const i=this._ensureArray(r),s=i.some(e=>e.error),n=this.getItemByObjectId(e);if(n&&(!s||i.length>1)){const t=await this._queryAttachments([e]);n.attachments=t[e]}return r}).catch(async r=>{this._logError("store:attachment-error","An error occurred.");const i={error:r,retry:()=>{this.failures.remove(i),this._queueAttachmentsOperation(e,t)},cancel:()=>this.failures.remove(i)};throw this.failures.add(i),this._attachmentsOperationQueue.remove(t),r})}_queueEditOperation(e,t=!1){return this._editOperationQueue.push(e),e().then(r=>(this._editOperationQueue.remove(e),t&&this._pendingEditsCache.clear(),r)).catch(t=>{this._logError("store:edit-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueEditOperation(e)},cancel:()=>this.failures.remove(r)};throw this.failures.add(r),this._editOperationQueue.remove(e),t})}async _queueQueryOperation(e,t){this._queryOperationInfos.set(e,t);const r=await t.task.promise;return this._queryOperationInfos.delete(e),r}};e([v()],T.prototype,"_attachmentsOperationQueue",void 0),e([v({readOnly:!0})],T.prototype,"_capabilities",null),e([v()],T.prototype,"_canSavePendingEdits",null),e([v()],T.prototype,"_contingentValuesManager",void 0),e([v()],T.prototype,"_defaultOutFields",void 0),e([v()],T.prototype,"_editOperationQueue",void 0),e([v()],T.prototype,"_effectiveReturnZ",null),e([v()],T.prototype,"_effectiveReturnM",null),e([v()],T.prototype,"featureTitleMap",void 0),e([v({readOnly:!0})],T.prototype,"_layerWithAttachments",null),e([v({readOnly:!0})],T.prototype,"_layerWithAttachmentsEditing",null),e([v()],T.prototype,"_layerWithContingentValues",null),e([v({readOnly:!0})],T.prototype,"_layerWithEditing",null),e([v({readOnly:!0})],T.prototype,"_layerWithRelationships",null),e([v()],T.prototype,"_loaded",void 0),e([v()],T.prototype,"_loadController",void 0),e([v()],T.prototype,"_loadError",void 0),e([v()],T.prototype,"_objectIdCache",void 0),e([v()],T.prototype,"_pendingEditsCache",void 0),e([v()],T.prototype,"_pendingEditsAreInvalid",null),e([v()],T.prototype,"_queryOperationInfos",void 0),e([v({readOnly:!0})],T.prototype,"_relatedLayer",null),e([v({readOnly:!0})],T.prototype,"_relatedLayerCapabilities",null),e([v({readOnly:!0})],T.prototype,"_relatedLayerSupportsCacheHint",null),e([v()],T.prototype,"_relatedLayerSupportsQuery",null),e([v()],T.prototype,"_relatedLayerSupportsQueryRelated",null),e([v()],T.prototype,"_size",void 0),e([v()],T.prototype,"_sortedFieldNames",null),e([v()],T.prototype,"_subtypeCode",null),e([v()],T.prototype,"_subtypeField",null),e([v()],T.prototype,"_canUseRelatedLayer",null),e([v()],T.prototype,"_shouldFilterByLayerScaleRange",null),e([v()],T.prototype,"_visibleAtCurrentScale",null),e([v()],T.prototype,"attachmentsEnabled",void 0),e([v()],T.prototype,"autoSaveEnabled",void 0),e([v()],T.prototype,"cachedPageCount",null),e([v()],T.prototype,"canAddRelatedFeature",null),e([v()],T.prototype,"defaultSelectionManager",void 0),e([v()],T.prototype,"editingEnabled",void 0),e([v()],T.prototype,"effectiveOutFields",null),e([v()],T.prototype,"effectiveSelectionManager",null),e([v()],T.prototype,"effectiveSize",null),e([v()],T.prototype,"effectiveTimeExtent",null),e([v()],T.prototype,"effectiveWhere",null),e([v({readOnly:!0})],T.prototype,"failures",void 0),e([v()],T.prototype,"fieldsWithContingentValues",null),e([v()],T.prototype,"filterByViewExtent",void 0),e([v()],T.prototype,"filterByLayerScaleRange",void 0),e([v({types:I})],T.prototype,"filterGeometry",void 0),e([v()],T.prototype,"hasContingentValues",null),e([v()],T.prototype,"hasInvalidPendingEdits",null),e([v()],T.prototype,"hasPendingEdits",null),e([v()],T.prototype,"highlightEnabled",void 0),e([v()],T.prototype,"highlightableLayerView",null),e([v()],T.prototype,"initialSize",void 0),e([v({readOnly:!0})],T.prototype,"isQuerying",null),e([v({readOnly:!0})],T.prototype,"isSyncing",null),e([v({readOnly:!0})],T.prototype,"isSyncingAttachmentEdits",null),e([v({readOnly:!0})],T.prototype,"isSyncingFeatureEdits",null),e([v({readOnly:!0})],T.prototype,"itemCache",null),e([v()],T.prototype,"layer",void 0),e([v()],T.prototype,"layerView",null),e([v()],T.prototype,"maxSize",void 0),e([v()],T.prototype,"objectIds",void 0),e([v()],T.prototype,"orderByFields",null),e([v()],T.prototype,"outFields",void 0),e([v({readOnly:!0})],T.prototype,"pageCache",void 0),e([v()],T.prototype,"pageCount",null),e([v()],T.prototype,"pageIndex",null),e([v()],T.prototype,"pageSize",void 0),e([v()],T.prototype,"paginationEnabled",void 0),e([v()],T.prototype,"pendingEditsCount",null),e([v()],T.prototype,"relationship",null),e([v()],T.prototype,"relationshipConfig",void 0),e([v()],T.prototype,"relationshipIds",null),e([v()],T.prototype,"relationshipInfos",null),e([v()],T.prototype,"relationships",null),e([v()],T.prototype,"relatedRecordsEnabled",void 0),e([v()],T.prototype,"returnGeometry",void 0),e([v()],T.prototype,"returnZ",void 0),e([v()],T.prototype,"returnM",void 0),e([v()],T.prototype,"selectionManager",void 0),e([v({readOnly:!0})],T.prototype,"size",null),e([v()],T.prototype,"sortOrders",void 0),e([v({readOnly:!0})],T.prototype,"state",null),e([v()],T.prototype,"supportsAdd",null),e([v()],T.prototype,"supportsAddAttachments",null),e([v()],T.prototype,"supportsAttachments",null),e([v()],T.prototype,"supportsCacheHint",null),e([v()],T.prototype,"supportsCacheHintQueryRelated",null),e([v()],T.prototype,"supportsDelete",null),e([v()],T.prototype,"supportsEditing",null),e([v()],T.prototype,"supportsM",null),e([v()],T.prototype,"supportsOrderBy",null),e([v()],T.prototype,"supportsPagination",null),e([v()],T.prototype,"supportsQuery",null),e([v()],T.prototype,"supportsQueryRelated",null),e([v()],T.prototype,"supportsResizeAttachments",null),e([v()],T.prototype,"supportsUpdate",null),e([v()],T.prototype,"supportsUpdateAttachments",null),e([v()],T.prototype,"supportsZ",null),e([v()],T.prototype,"syncViewSelection",void 0),e([v()],T.prototype,"temporaryHighlightId",void 0),e([v({type:q})],T.prototype,"timeExtent",void 0),e([v()],T.prototype,"timeZone",void 0),e([v()],T.prototype,"view",void 0),e([v()],T.prototype,"viewTimeEnabled",void 0),e([v()],T.prototype,"where",void 0),T=e([C("esri.widgets.FeatureTable.support.FeatureStore")],T);const G=T;export{G as default};
|
|
@@ -346,6 +346,7 @@ export type FeatureTableTitleFunction = () => string;
|
|
|
346
346
|
/** A custom function used to replace the description for the FeatureTable. This is useful in situations where it may be necessary to dynamically update descriptions based on the current state of the table. */
|
|
347
347
|
export type FeatureTableDescriptionFunction = () => string;
|
|
348
348
|
|
|
349
|
+
/** @deprecated since version 5.0. Use the [Feature Table](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-table/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
349
350
|
export interface FeatureTableEvents extends FeatureTableViewModelEvents {}
|
|
350
351
|
|
|
351
352
|
/**
|
|
@@ -47,6 +47,7 @@ export interface FeatureTemplatesProperties extends WidgetProperties, Partial<Pi
|
|
|
47
47
|
visibleElements?: VisibleElementsProperties;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
/** @deprecated since version 5.0. Use the [Feature Templates (Legacy)](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-templates-legacy/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
50
51
|
export interface FeatureTemplatesEvents extends FeatureTemplatesViewModelEvents {}
|
|
51
52
|
|
|
52
53
|
/**
|
|
@@ -102,6 +102,7 @@ export interface FeaturesViewModelProperties extends GoToProperties, Partial<Pic
|
|
|
102
102
|
timeZone?: TimeZone | null;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/** @deprecated since 5.2. Use the [Features (Next) component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) or the [FeatureContentCollection](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/) class instead. */
|
|
105
106
|
export interface FeaturesViewModelEvents {
|
|
106
107
|
/**
|
|
107
108
|
* Fires after the user clicks on an [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) in the action bar. This
|
package/widgets/Features.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface FeaturesProperties extends WidgetProperties, Partial<Pick<Featu
|
|
|
68
68
|
|
|
69
69
|
export type FeaturesOpenOptions = Partial<Pick<PopupOpenOptions, "actions" | "collapsed" | "content" | "featureStream" | "features" | "fetchFeatures" | "featureMenuOpen" | "featureMenuTitle" | "location" | "promises" | "title" | "updateLocationEnabled">>;
|
|
70
70
|
|
|
71
|
+
/** @deprecated since version 4.34. Use the [Features (Next) component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
71
72
|
export interface FeaturesEvents extends FeaturesViewModelEvents {}
|
|
72
73
|
|
|
73
74
|
/**
|
|
@@ -97,7 +98,7 @@ export interface FeaturesEvents extends FeaturesViewModelEvents {}
|
|
|
97
98
|
* The Features widget should be used if needing to use the Popup functionality outside of the View. If wanting to show a single feature's content without
|
|
98
99
|
* actions, related records, clustering configuration, etc., then use the [Feature](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/) widget.
|
|
99
100
|
*
|
|
100
|
-
* @deprecated since version 4.34. Use the [Features component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
101
|
+
* @deprecated since version 4.34. Use the [Features (Next) component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
101
102
|
* @since 4.27
|
|
102
103
|
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
103
104
|
* @see [Deprecated since 5.1 - Guide - Esri Icon Font](https://developers.arcgis.com/javascript/latest/esri-icon-font/)
|
|
@@ -66,6 +66,7 @@ export interface HistogramRangeSliderProperties extends WidgetProperties, Partia
|
|
|
66
66
|
viewModel?: HistogramRangeSliderViewModelProperties;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/** @deprecated since version 5.0. Use the [Histogram](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/) and [Slider](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/) components instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
69
70
|
export interface HistogramRangeSliderEvents extends CommonSliderEvents {}
|
|
70
71
|
|
|
71
72
|
/**
|
|
@@ -28,6 +28,7 @@ export interface HomeViewModelProperties extends GoToProperties, Partial<Pick<Ho
|
|
|
28
28
|
|
|
29
29
|
export type HomeViewModelState = "disabled" | "going-home" | "ready";
|
|
30
30
|
|
|
31
|
+
/** @deprecated since 5.0. Use the [Home component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-home/) directly instead. */
|
|
31
32
|
export interface HomeViewModelEvents {
|
|
32
33
|
/**
|
|
33
34
|
* Fires when the [Home.go()](https://developers.arcgis.com/javascript/latest/references/core/widgets/Home/#go) method is called.
|
package/widgets/Home.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export interface HomeProperties extends WidgetProperties, Partial<Pick<Home, "go
|
|
|
52
52
|
viewpoint?: ViewpointProperties | null;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/** @deprecated since version 4.32. Use the [Home component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-home/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
55
56
|
export interface HomeEvents extends HomeViewModelEvents {}
|
|
56
57
|
|
|
57
58
|
/**
|
|
@@ -7,6 +7,7 @@ import type { Action, ListItemModifier, State } from "./types.js";
|
|
|
7
7
|
/** @deprecated since 5.2. Use [LayerItemCollectionProperties](https://developers.arcgis.com/javascript/latest/references/core/layers/list/types/#LayerItemCollectionProperties) instead. */
|
|
8
8
|
export interface LayerListViewModelProperties extends Partial<Pick<LayerListViewModel, "checkPublishStatusEnabled" | "listItemCreatedFunction" | "listModeDisabled" | "view">> {}
|
|
9
9
|
|
|
10
|
+
/** @deprecated since 5.2. Use [LayerItemCollection](https://developers.arcgis.com/javascript/latest/references/core/layers/list/LayerItemCollection/) instead. */
|
|
10
11
|
export interface LayerListViewModelEvents {
|
|
11
12
|
/**
|
|
12
13
|
* Emitted when the user clicks an [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or
|
package/widgets/LayerList.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ export type SubtablesLayer = KnowledgeGraphLayer | MapImageLayer | TileLayer;
|
|
|
79
79
|
*/
|
|
80
80
|
export type FlowLayer = SubtablesLayer | CatalogLayer;
|
|
81
81
|
|
|
82
|
+
/** @deprecated since version 5.0. Use the [Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-layer-list/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
82
83
|
export interface LayerListEvents extends LayerListViewModelEvents {}
|
|
83
84
|
|
|
84
85
|
/**
|
|
@@ -5,6 +5,7 @@ export interface LocateViewModelProperties extends GeolocationPositioningPropert
|
|
|
5
5
|
|
|
6
6
|
export type LocateViewModelState = "disabled" | "ready" | "locating" | "feature-unsupported" | "error";
|
|
7
7
|
|
|
8
|
+
/** @deprecated since version 4.34. Use the [Locate component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-locate/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
8
9
|
export interface LocateViewModelEvents {
|
|
9
10
|
/**
|
|
10
11
|
* Fires after the `locate()` method is called and succeeds.
|
package/widgets/Locate.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export interface LocateProperties extends WidgetProperties, Partial<Pick<Locate,
|
|
|
48
48
|
viewModel?: LocateViewModelProperties;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/** @deprecated since version 4.32. Use the [Locate component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-locate/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
51
52
|
export interface LocateEvents extends LocateViewModelEvents {}
|
|
52
53
|
|
|
53
54
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../Graphic.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{clamp as i}from"../../../../core/mathUtils.js";import{throwIfAborted as a,waitTick as o}from"../../../../core/promiseUtils.js";import r from"../../../../geometry/Mesh.js";import n from"../../../../geometry/Point.js";import{projectAsync as s}from"../../../../geometry/projectionUtils.js";import l from"../../../../geometry/support/MeshVertexAttributes.js";import{projectVertices as c,updateFrustum as p,createCoveragePolygon as m}from"../../../../layers/orientedImagery/core/coverageUtils.js";import{getMetersPerUnitOfSR as u}from"../../../../layers/orientedImagery/core/utils.js";import{fixedImageSize as d,invalidCameraHeading as h}from"../../constants.js";import{activeFrustumSymbol as f,additionalFrustumSymbol as v}from"../../symbols.js";import{getDefaultSuperimposeFov as w,panoramicSuperimposeMaxFov as g,panoramicSuperimposeMinFov as y,panoramicSuperimposeZoomOutFactor as S,panoramicSuperimposeZoomInFactor as b,getViewCameraFieldOfView as _,panoramicSuperimposeMaxTilt as R,panoramicSuperimposeMinTilt as F,panoramicSuperimposeKeyboardAngleStep as M}from"../../support/superimposeUtils.js";class P{constructor(n){this.viewModel=n,this._defaultSuperimposeSecondaryDragAction=null,this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null,this._panoramicSuperimposeNavigationHandles=[],this._updateBestFeatureFootprintElevation=!1,this._updatedElevationSampler=null,this.createFootprints=async i=>{const{coverageFrustums:o,currentBestFeature:n,isAdditionalCoverageVisible:p,view:m}=this.viewModel,u=o.filter(t);for(const t of u){let o=t.clone();if(!m.spatialReference.equals(o.spatialReference)){const{components:e,spatialReference:t,origin:n,vertexAttributes:p,vertexSpace:u}=o;if("local"===u.type){const e=await s(n,m.spatialReference,i);a(i),o.centerAt(e)}else{const n=p.position,s=Float64Array.from(await c([...n],t.clone(),m.spatialReference.clone(),i));a(i),o=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:m.spatialReference.clone()})}}t.imageID===n.attributes.objectId?(this._updateBestFeatureFootprintElevation=!0,this.viewModel.bestFeatureFootprint=new e({attributes:{imageID:t.imageID},geometry:o,symbol:f.clone(),visible:!1})):this.viewModel.additionalFootprints.push(new e({attributes:{imageID:t.imageID},geometry:o,symbol:v.clone(),visible:p}))}},this.updateFootprint=async(i,o,r)=>{const{bestFeatureFootprint:n,currentBestFeature:l,activeViewer:c,footprintExtent:m,view:u,mode:h}=this.viewModel,v="video"===h?d:c?.imageSize,w=o??l;if(!(l&&n?.geometry&&v&&m&&w&&u?.spatialReference))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:g,location:y,cameraPitch:S,horizontalFieldOfView:b,verticalFieldOfView:_,cameraRoll:R},elevationSample:F}=w;let M=null;if(o&&(this._updatedElevationSampler=l.elevationSample,M=await x(o,u.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=o.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=o.geometry.x,e.y=o.geometry.y;const t=await this.viewModel.processFeatureElevation([o],e);t&&(this._updatedElevationSampler=t)}const[i]=E([M],this._updatedElevationSampler,o);i&&(M=i)}F&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([n]),this._updateBestFeatureFootprintElevation=!1);const P=y.toArray(),D=o&&M?M:n,{vertexAttributes:{position:V},spatialReference:C}=D.geometry,k=await A(V,C,y.spatialReference),j=await this.viewModel.getMapPoint(i);a(r);let z=j.filter(t);if(!z.length)return;z[0].spatialReference.equals(y.spatialReference)||(z=await Promise.all(z.map(async e=>{const t=await s(e,y.spatialReference,r);return a(r),t})));const I=await p(i.map(({x:e,y:t})=>[e,t]),z.map(e=>e.toArray()),{cameraHeight:g,cameraLocation:P,cameraPitch:S,frustumVertices:k,horizontalFieldOfView:b,imageHeight:v[1],imageWidth:v[0],inSRS:{wkid:y.spatialReference.wkid},outSRS:{wkid:u.spatialReference.wkid},verticalFieldOfView:_,cameraRoll:R??0,options:r});this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:w.attributes.objectId},geometry:I,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateVideoFootprint=async i=>{const{points:o,feature:r,scale:n,options:l}=i,{bestFeatureFootprint:c,currentBestFeature:m,activeViewer:u,footprintExtent:h,view:v,mode:w}=this.viewModel,g="video"===w?d:u?.imageSize,y=r??m;if(!(m&&c?.geometry&&g&&h&&y&&v?.spatialReference&&"none"!==w))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:S,location:b,cameraPitch:_,horizontalFieldOfView:R,verticalFieldOfView:F,cameraRoll:M},elevationSample:P}=y;let V=null;if(r&&(this._updatedElevationSampler=m.elevationSample,V=await x(r,v.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=r.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=r.geometry.x,e.y=r.geometry.y;const t=await this.viewModel.processFeatureElevation([r],e);t&&(this._updatedElevationSampler=t)}const[i]=E([V],this._updatedElevationSampler,r);i&&(V=i)}P&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([c]),this._updateBestFeatureFootprintElevation=!1);const C=b.toArray(),k=r&&V?V:c,{vertexAttributes:{position:j},spatialReference:z}=k.geometry,I=await A(j,z,b.spatialReference),O={feature:y,mode:w,imageSize:g,footprintExtent:h},B=await this.viewModel.getMapPointForFeature(o,O,l);a(l);let H=B.filter(t);if(!H.length)return;H[0].spatialReference.equals(b.spatialReference)||(H=await Promise.all(H.map(async e=>{const t=await s(e,b.spatialReference,l);return a(l),t})));const L=await p(o.map(({x:e,y:t})=>[e,t]),H.map(e=>e.toArray()),{cameraHeight:S,cameraLocation:C,cameraPitch:_,frustumVertices:I,horizontalFieldOfView:R,imageHeight:g[1],imageWidth:g[0],inSRS:{wkid:b.spatialReference.wkid},outSRS:{wkid:v.spatialReference.wkid},verticalFieldOfView:F,cameraRoll:M??0,options:l});if(n&&L){const e=D(L);L.scale(n,{origin:e})}this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:y.attributes.objectId},geometry:L,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateFootprintPanorama=async(t,i)=>{await o(i);const{horizontalFieldOfView:a,pitch:r,verticalFieldOfView:n,yaw:l,feature:c}=t,p=c?.clone()??this.viewModel.currentBestFeature?.clone();if(!p)return;const{attributes:u}=p;u.orientedImageryType=null,u.cameraHeading=l,u.cameraPitch=r,u.horizontalFieldOfView=a,u.verticalFieldOfView=n,u.cameraRoll=0;const{frustum:d}=m(u);if(!d)return void this.viewModel.updateCurrentCoveragePolygon(null);const h=this.viewModel.view?.spatialReference.equals(d.spatialReference)?d.clone():await s(d.clone(),this.viewModel.view?.spatialReference,i);this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:u.objectId},geometry:h,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updatePanoramicSuperimposeCamera=async(e,t)=>{const{camera:i,currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const n=o.attributes.location.clone(),l=n.spatialReference.equals(r.spatialReference)?n:await s(n,r.spatialReference,t);if(a(t),!l)return;const c=i.clone();c.position=l.clone(),r.camera=c,this._enablePanoramicSuperimposeNavigation(l)},this.updateDefaultSuperimposeCamera=async(e,t)=>{const{currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const{cameraHeading:n,cameraPitch:l,cameraRoll:c,horizontalFieldOfView:p,location:m,verticalFieldOfView:u}=o.attributes,d=m.spatialReference.equals(r.spatialReference)?m.clone():await s(m,r.spatialReference,t);if(a(t),!d)return;const f=w(r,p,u,c??0),v=r.camera.clone();v.position=d,v.fov=i(v.fov,y,g),null!=n&&n!==h&&(v.heading=n),null!=l&&(v.tilt=l),null!=f&&(v.fov=f),r.camera=v},this.enableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel;if("3d"!==e?.type)return;const t=e.navigation.actionMap;null==this._defaultSuperimposeSecondaryDragAction&&(this._defaultSuperimposeSecondaryDragAction=t.dragSecondary),"none"!==t.dragSecondary&&(t.dragSecondary="none")},this.disableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel,t=this._defaultSuperimposeSecondaryDragAction;"3d"===e?.type&&null!=t?(e.navigation.actionMap.dragSecondary=t,this._defaultSuperimposeSecondaryDragAction=null):this._defaultSuperimposeSecondaryDragAction=null},this.disablePanoramicSuperimposeNavigation=()=>{this._panoramicSuperimposeNavigationHandles.forEach(e=>e.remove()),this._panoramicSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null},this._handlePanoramicSuperimposeDoubleClick=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone(),o=e.native.ctrlKey?S:b;a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*o,y,g),t.camera=a},this._handlePanoramicSuperimposeDrag=e=>{const{view:t}=this.viewModel;if(t&&"3d"===t.type&&this._panoramicSuperimposeAnchor)switch(e.stopPropagation(),e.action){case"start":return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});case"update":{const a=this._panoramicSuperimposeLastScreenPoint;if(!a)return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});const o=a.x-e.x,r=e.y-a.y;this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};const n=t.camera.clone(),{horizontal:s,vertical:l}=_(t);return n.position=this._panoramicSuperimposeAnchor.clone(),n.heading+=s*o/Math.max(t.width,1),n.tilt=i(n.tilt+l*r/Math.max(t.height,1),F,R),void(t.camera=n)}case"end":return void(this._panoramicSuperimposeLastScreenPoint=null)}},this._handlePanoramicSuperimposeKeyDown=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;const a=t.camera.clone();let o=!0;switch(a.position=this._panoramicSuperimposeAnchor.clone(),e.key){case"ArrowLeft":a.heading-=M;break;case"ArrowRight":a.heading+=M;break;case"ArrowUp":a.tilt=i(a.tilt-M,F,R);break;case"ArrowDown":a.tilt=i(a.tilt+M,F,R);break;default:o=!1}o&&(e.stopPropagation(),t.camera=a)},this._handlePanoramicSuperimposeWheel=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone();a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*(e.deltaY>0?S:b),y,g),t.camera=a}}updateGroundElevation(e){const{geometry:t,attributes:{elevation:i}}=this.viewModel.currentBestFeature,a=(i??0)*u(t.spatialReference);e.forEach(e=>{const{geometry:t}=e;switch(t?.type){case"mesh":{const{vertexAttributes:{position:e}}=t,i=Math.floor(e.length/3);for(let o=0;o<i;o+=1)e[3*o+2]+=a/u(t.spatialReference);break}case"point":t.z=(t.z??0)+a/u(t.spatialReference)}})}_enablePanoramicSuperimposeNavigation(e){const{view:t}=this.viewModel;t&&"3d"===t.type&&(this.disablePanoramicSuperimposeNavigation(),this._panoramicSuperimposeAnchor=e.clone(),this._panoramicSuperimposeNavigationHandles=[t.on("drag",this._handlePanoramicSuperimposeDrag),t.on("mouse-wheel",this._handlePanoramicSuperimposeWheel),t.on("double-click",this._handlePanoramicSuperimposeDoubleClick),t.on("key-down",this._handlePanoramicSuperimposeKeyDown)])}}async function A(e,t,i,a){return Float64Array.from((await Promise.all(e.reduce((e,t,i)=>{const a=Math.floor(i/3);return e[a]=e[a]??[],e[a].push(t),e},new Array).map(async e=>(await s(new n(e,t),i,a)).toArray()))).flat())}const x=async(t,i,o)=>{const{frustum:n}=m(t.attributes);let p=n.clone();if(!i.equals(p.spatialReference)){const{components:e,spatialReference:t,origin:i,vertexAttributes:n,vertexSpace:m}=p;if("local"===m.type){const e=await s(i,t,o);a(o),p.centerAt(e)}else{const i=n.position,s=Float64Array.from(await c([...i],t.clone(),t.clone(),o));a(o),p=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:t.clone()})}}return new e({attributes:{imageID:n.imageID},geometry:p,symbol:f.clone(),visible:!1})},E=(e,t,i)=>{const{geometry:a}=i,o=t.queryElevation(a);for(const r of e){const{geometry:e}=r;switch(e?.type){case"mesh":{const{vertexAttributes:{position:t}}=e,i=Math.floor(t.length/3);for(let e=0;e<i;e++)t[3*e+2]+=o?.z??0;break}case"point":e.z=(e.z??0)+(o?.z??0)}}return e},D=e=>{const t=e.vertexAttributes.position;let i=0,a=0,o=0;const r=t.length/3;for(let n=0;n<t.length;n+=3)i+=t[n],a+=t[n+1],o+=t[n+2];return new n({x:i/r,y:a/r,z:o/r,spatialReference:e.spatialReference})};export{P as default};
|
|
2
|
+
import e from"../../../../Graphic.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{clamp as i}from"../../../../core/mathUtils.js";import{throwIfAborted as a,waitTick as o}from"../../../../core/promiseUtils.js";import r from"../../../../geometry/Mesh.js";import n from"../../../../geometry/Point.js";import{projectAsync as s}from"../../../../geometry/projectionUtils.js";import l from"../../../../geometry/support/MeshVertexAttributes.js";import{projectVertices as c,updateFrustum as p,createCoveragePolygon as u}from"../../../../layers/orientedImagery/core/coverageUtils.js";import{getMetersPerUnitOfSR as m}from"../../../../layers/orientedImagery/core/utils.js";import{getPointerActions as d,eventMatchesMousePointerActions as h}from"../../../../views/input/handlers/support.js";import{fixedImageSize as f,invalidCameraHeading as v}from"../../constants.js";import{activeFrustumSymbol as g,additionalFrustumSymbol as w}from"../../symbols.js";import{getDefaultSuperimposeFov as y,panoramicSuperimposeMaxFov as S,panoramicSuperimposeMinFov as b,panoramicSuperimposeZoomOutFactor as _,panoramicSuperimposeZoomInFactor as R,getViewCameraFieldOfView as F,panoramicSuperimposeMaxTilt as M,panoramicSuperimposeMinTilt as P,panoramicSuperimposeKeyboardAngleStep as A}from"../../support/superimposeUtils.js";class x{constructor(n){this.viewModel=n,this._defaultSuperimposeSecondaryDragAction=null,this._defaultSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null,this._panoramicSuperimposeNavigationHandles=[],this._updateBestFeatureFootprintElevation=!1,this._updatedElevationSampler=null,this.createFootprints=async i=>{const{coverageFrustums:o,currentBestFeature:n,isAdditionalCoverageVisible:p,view:u}=this.viewModel,m=o.filter(t);for(const t of m){let o=t.clone();if(!u.spatialReference.equals(o.spatialReference)){const{components:e,spatialReference:t,origin:n,vertexAttributes:p,vertexSpace:m}=o;if("local"===m.type){const e=await s(n,u.spatialReference,i);a(i),o.centerAt(e)}else{const n=p.position,s=Float64Array.from(await c([...n],t.clone(),u.spatialReference.clone(),i));a(i),o=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:u.spatialReference.clone()})}}t.imageID===n.attributes.objectId?(this._updateBestFeatureFootprintElevation=!0,this.viewModel.bestFeatureFootprint=new e({attributes:{imageID:t.imageID},geometry:o,symbol:g.clone(),visible:!1})):this.viewModel.additionalFootprints.push(new e({attributes:{imageID:t.imageID},geometry:o,symbol:w.clone(),visible:p}))}},this.updateFootprint=async(i,o,r)=>{const{bestFeatureFootprint:n,currentBestFeature:l,activeViewer:c,footprintExtent:u,view:m,mode:d}=this.viewModel,h="video"===d?f:c?.imageSize,v=o??l;if(!(l&&n?.geometry&&h&&u&&v&&m?.spatialReference))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:w,location:y,cameraPitch:S,horizontalFieldOfView:b,verticalFieldOfView:_,cameraRoll:R},elevationSample:F}=v;let M=null;if(o&&(this._updatedElevationSampler=l.elevationSample,M=await E(o,m.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=o.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=o.geometry.x,e.y=o.geometry.y;const t=await this.viewModel.processFeatureElevation([o],e);t&&(this._updatedElevationSampler=t)}const[i]=V([M],this._updatedElevationSampler,o);i&&(M=i)}F&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([n]),this._updateBestFeatureFootprintElevation=!1);const P=y.toArray(),A=o&&M?M:n,{vertexAttributes:{position:x},spatialReference:C}=A.geometry,j=await D(x,C,y.spatialReference),k=await this.viewModel.getMapPoint(i);a(r);let z=k.filter(t);if(!z.length)return;z[0].spatialReference.equals(y.spatialReference)||(z=await Promise.all(z.map(async e=>{const t=await s(e,y.spatialReference,r);return a(r),t})));const H=await p(i.map(({x:e,y:t})=>[e,t]),z.map(e=>e.toArray()),{cameraHeight:w,cameraLocation:P,cameraPitch:S,frustumVertices:j,horizontalFieldOfView:b,imageHeight:h[1],imageWidth:h[0],inSRS:{wkid:y.spatialReference.wkid},outSRS:{wkid:m.spatialReference.wkid},verticalFieldOfView:_,cameraRoll:R??0,options:r});this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:v.attributes.objectId},geometry:H,symbol:g.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateVideoFootprint=async i=>{const{points:o,feature:r,scale:n,options:l}=i,{bestFeatureFootprint:c,currentBestFeature:u,activeViewer:m,footprintExtent:d,view:h,mode:v}=this.viewModel,w="video"===v?f:m?.imageSize,y=r??u;if(!(u&&c?.geometry&&w&&d&&y&&h?.spatialReference&&"none"!==v))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:S,location:b,cameraPitch:_,horizontalFieldOfView:R,verticalFieldOfView:F,cameraRoll:M},elevationSample:P}=y;let A=null;if(r&&(this._updatedElevationSampler=u.elevationSample,A=await E(r,h.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=r.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=r.geometry.x,e.y=r.geometry.y;const t=await this.viewModel.processFeatureElevation([r],e);t&&(this._updatedElevationSampler=t)}const[i]=V([A],this._updatedElevationSampler,r);i&&(A=i)}P&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([c]),this._updateBestFeatureFootprintElevation=!1);const x=b.toArray(),j=r&&A?A:c,{vertexAttributes:{position:k},spatialReference:z}=j.geometry,H=await D(k,z,b.spatialReference),I={feature:y,mode:v,imageSize:w,footprintExtent:d},N=await this.viewModel.getMapPointForFeature(o,I,l);a(l);let O=N.filter(t);if(!O.length)return;O[0].spatialReference.equals(b.spatialReference)||(O=await Promise.all(O.map(async e=>{const t=await s(e,b.spatialReference,l);return a(l),t})));const B=await p(o.map(({x:e,y:t})=>[e,t]),O.map(e=>e.toArray()),{cameraHeight:S,cameraLocation:x,cameraPitch:_,frustumVertices:H,horizontalFieldOfView:R,imageHeight:w[1],imageWidth:w[0],inSRS:{wkid:b.spatialReference.wkid},outSRS:{wkid:h.spatialReference.wkid},verticalFieldOfView:F,cameraRoll:M??0,options:l});if(n&&B){const e=C(B);B.scale(n,{origin:e})}this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:y.attributes.objectId},geometry:B,symbol:g.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateFootprintPanorama=async(t,i)=>{await o(i);const{horizontalFieldOfView:a,pitch:r,verticalFieldOfView:n,yaw:l,feature:c}=t,p=c?.clone()??this.viewModel.currentBestFeature?.clone();if(!p)return;const{attributes:m}=p;m.orientedImageryType=null,m.cameraHeading=l,m.cameraPitch=r,m.horizontalFieldOfView=a,m.verticalFieldOfView=n,m.cameraRoll=0;const{frustum:d}=u(m);if(!d)return void this.viewModel.updateCurrentCoveragePolygon(null);const h=this.viewModel.view?.spatialReference.equals(d.spatialReference)?d.clone():await s(d.clone(),this.viewModel.view?.spatialReference,i);this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:m.objectId},geometry:h,symbol:g.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updatePanoramicSuperimposeCamera=async(e,t)=>{const{camera:i,currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const n=o.attributes.location.clone(),l=n.spatialReference.equals(r.spatialReference)?n:await s(n,r.spatialReference,t);if(a(t),!l)return;const c=i.clone();c.position=l.clone(),r.camera=c,this._enablePanoramicSuperimposeNavigation(l)},this.updateDefaultSuperimposeCamera=async(e,t)=>{const{currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const{cameraHeading:n,cameraPitch:l,cameraRoll:c,horizontalFieldOfView:p,location:u,verticalFieldOfView:m}=o.attributes,d=u.spatialReference.equals(r.spatialReference)?u.clone():await s(u,r.spatialReference,t);if(a(t),!d)return;const h=y(r,p,m,c??0),f=r.camera.clone();f.position=d,f.fov=i(f.fov,b,S),null!=n&&n!==v&&(f.heading=n),null!=l&&(f.tilt=l),null!=h&&(f.fov=h),r.camera=f},this.enableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel;if("3d"!==e?.type)return;const t=e.navigation.actionMap;null==this._defaultSuperimposeSecondaryDragAction&&(this._defaultSuperimposeSecondaryDragAction=t.dragSecondary),"none"!==t.dragSecondary&&(t.dragSecondary="none"),this._defaultSuperimposeNavigationHandles.length||(this._defaultSuperimposeNavigationHandles=[e.on("drag",this._handleDefaultSuperimposeDrag)])},this.disableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel,t=this._defaultSuperimposeSecondaryDragAction;this._defaultSuperimposeNavigationHandles.forEach(e=>e.remove()),this._defaultSuperimposeNavigationHandles=[],"3d"===e?.type&&null!=t?(e.navigation.actionMap.dragSecondary=t,this._defaultSuperimposeSecondaryDragAction=null):this._defaultSuperimposeSecondaryDragAction=null},this.disablePanoramicSuperimposeNavigation=()=>{this._panoramicSuperimposeNavigationHandles.forEach(e=>e.remove()),this._panoramicSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null},this._handleDefaultSuperimposeDrag=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type)return;const i=d("rotate",t.navigation.actionMap);h(e,i)&&e.stopPropagation()},this._handlePanoramicSuperimposeDoubleClick=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone(),o=e.native.ctrlKey?_:R;a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*o,b,S),t.camera=a},this._handlePanoramicSuperimposeDrag=e=>{const{view:t}=this.viewModel;if(t&&"3d"===t.type&&this._panoramicSuperimposeAnchor)switch(e.stopPropagation(),e.action){case"start":return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});case"update":{const a=this._panoramicSuperimposeLastScreenPoint;if(!a)return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});const o=a.x-e.x,r=e.y-a.y;this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};const n=t.camera.clone(),{horizontal:s,vertical:l}=F(t);return n.position=this._panoramicSuperimposeAnchor.clone(),n.heading+=s*o/Math.max(t.width,1),n.tilt=i(n.tilt+l*r/Math.max(t.height,1),P,M),void(t.camera=n)}case"end":return void(this._panoramicSuperimposeLastScreenPoint=null)}},this._handlePanoramicSuperimposeKeyDown=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;const a=t.camera.clone();let o=!0;switch(a.position=this._panoramicSuperimposeAnchor.clone(),e.key){case"ArrowLeft":a.heading-=A;break;case"ArrowRight":a.heading+=A;break;case"ArrowUp":a.tilt=i(a.tilt-A,P,M);break;case"ArrowDown":a.tilt=i(a.tilt+A,P,M);break;default:o=!1}o&&(e.stopPropagation(),t.camera=a)},this._handlePanoramicSuperimposeWheel=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone();a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*(e.deltaY>0?_:R),b,S),t.camera=a}}updateGroundElevation(e){const{geometry:t,attributes:{elevation:i}}=this.viewModel.currentBestFeature,a=(i??0)*m(t.spatialReference);e.forEach(e=>{const{geometry:t}=e;switch(t?.type){case"mesh":{const{vertexAttributes:{position:e}}=t,i=Math.floor(e.length/3);for(let o=0;o<i;o+=1)e[3*o+2]+=a/m(t.spatialReference);break}case"point":t.z=(t.z??0)+a/m(t.spatialReference)}})}_enablePanoramicSuperimposeNavigation(e){const{view:t}=this.viewModel;t&&"3d"===t.type&&(this.disablePanoramicSuperimposeNavigation(),this._panoramicSuperimposeAnchor=e.clone(),this._panoramicSuperimposeNavigationHandles=[t.on("drag",this._handlePanoramicSuperimposeDrag),t.on("mouse-wheel",this._handlePanoramicSuperimposeWheel),t.on("double-click",this._handlePanoramicSuperimposeDoubleClick),t.on("key-down",this._handlePanoramicSuperimposeKeyDown)])}}async function D(e,t,i,a){return Float64Array.from((await Promise.all(e.reduce((e,t,i)=>{const a=Math.floor(i/3);return e[a]=e[a]??[],e[a].push(t),e},new Array).map(async e=>(await s(new n(e,t),i,a)).toArray()))).flat())}const E=async(t,i,o)=>{const{frustum:n}=u(t.attributes);let p=n.clone();if(!i.equals(p.spatialReference)){const{components:e,spatialReference:t,origin:i,vertexAttributes:n,vertexSpace:u}=p;if("local"===u.type){const e=await s(i,t,o);a(o),p.centerAt(e)}else{const i=n.position,s=Float64Array.from(await c([...i],t.clone(),t.clone(),o));a(o),p=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:t.clone()})}}return new e({attributes:{imageID:n.imageID},geometry:p,symbol:g.clone(),visible:!1})},V=(e,t,i)=>{const{geometry:a}=i,o=t.queryElevation(a);for(const r of e){const{geometry:e}=r;switch(e?.type){case"mesh":{const{vertexAttributes:{position:t}}=e,i=Math.floor(t.length/3);for(let e=0;e<i;e++)t[3*e+2]+=o?.z??0;break}case"point":e.z=(e.z??0)+(o?.z??0)}}return e},C=e=>{const t=e.vertexAttributes.position;let i=0,a=0,o=0;const r=t.length/3;for(let n=0;n<t.length;n+=3)i+=t[n],a+=t[n+1],o+=t[n+2];return new n({x:i/r,y:a/r,z:o/r,spatialReference:e.spatialReference})};export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{subclass as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import t from"./NavigationManager.js";let a=class extends t{async afterNavigate(e,r,t){return await this.viewModel.selectBestFeature(r.id,t),this.viewModel.setCurrentPanoramaView(e.currentHeading,e.currentPitch),r}};a=e([r("esri.widgets.OrientedImageryViewer.navigation.NavigationManagerPanoramic")],a);const i=a;export{i as default};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated since version 5.0. Use the [Oriented Imagery Viewer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-oriented-imagery-viewer/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
3
|
+
* @since 5.1
|
|
4
|
+
*/
|
|
2
5
|
export interface OrientedImageryViewerViewModelEvents {
|
|
3
6
|
/**
|
|
4
7
|
* Fires when the widget fails to load an image to display in the viewer. This can occur when there is no image that depicts the selected location on the map.
|
|
@@ -34,7 +34,10 @@ export interface OrientedImageryViewerProperties extends WidgetProperties, Parti
|
|
|
34
34
|
visibleElements?: OrientedImageryViewerVisibleElementsProperties;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated since version 5.0. Use the [Oriented Imagery Viewer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-oriented-imagery-viewer/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
39
|
+
* @since 5.1
|
|
40
|
+
*/
|
|
38
41
|
export interface OrientedImageryViewerEvents extends OrientedImageryViewerViewModelEvents {}
|
|
39
42
|
|
|
40
43
|
/**
|
package/widgets/Popup/types.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type Point from "../../geometry/Point.js";
|
|
|
4
4
|
import type ActionButton from "../../support/actions/ActionButton.js";
|
|
5
5
|
import type ActionToggle from "../../support/actions/ActionToggle.js";
|
|
6
6
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
7
|
-
import type { FetchPopupFeaturesDiagnostics } from "../../views/PopupView.js";
|
|
8
7
|
import type { ClickEvent } from "../../views/input/types.js";
|
|
9
8
|
|
|
10
9
|
/** @since 5.0 */
|
|
@@ -136,12 +135,6 @@ export interface PopupOpenOptions {
|
|
|
136
135
|
* @since 5.2
|
|
137
136
|
*/
|
|
138
137
|
featureStream?: AsyncGenerator<Graphic>;
|
|
139
|
-
/**
|
|
140
|
-
* Diagnostics collected while fetching features from a view.
|
|
141
|
-
*
|
|
142
|
-
* @since 5.2
|
|
143
|
-
*/
|
|
144
|
-
diagnostics?: FetchPopupFeaturesDiagnostics;
|
|
145
138
|
/**
|
|
146
139
|
* This property enables multiple features in a popup to display in a list rather than displaying the first selected feature. Setting this to `true`
|
|
147
140
|
* allows the user to scroll through the list of features.
|
package/widgets/Popup.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export interface PopupProperties extends WidgetProperties, Partial<Pick<Popup, "
|
|
|
120
120
|
visibleElements?: PopupVisibleElementsProperties;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/** @deprecated since version 5.0. Use the [Popup component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
123
124
|
export interface PopupEvents extends FeaturesViewModelEvents {}
|
|
124
125
|
|
|
125
126
|
/**
|
|
@@ -177,14 +178,14 @@ export interface PopupEvents extends FeaturesViewModelEvents {}
|
|
|
177
178
|
* view.openPopup(...);
|
|
178
179
|
* view.closePopup(...);
|
|
179
180
|
* ```
|
|
180
|
-
* - Use [
|
|
181
|
+
* - Use [watch()](https://developers.arcgis.com/javascript/latest/references/core/core/reactiveUtils/#watch) with optional chaining to watch properties on the popup and its view model, even before the popup is created.
|
|
181
182
|
* ```js
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
183
|
+
* const handle = reactiveUtils.watch(
|
|
184
|
+
* () => view.popup?.selectedFeature,
|
|
185
|
+
* (selectedFeature) => {
|
|
186
|
+
* console.log("Selected feature:", selectedFeature);
|
|
187
|
+
* }
|
|
188
|
+
* );
|
|
188
189
|
* ```
|
|
189
190
|
* - Use the [when()](https://developers.arcgis.com/javascript/latest/references/core/core/reactiveUtils/#when) method to check when the popup instance is created. Once its created, then it's properties or methods can be accessed and called.
|
|
190
191
|
* ```js
|
|
@@ -61,6 +61,7 @@ export interface PrintExport {
|
|
|
61
61
|
promise: Promise<FileLink>;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
/** @deprecated since version 4.33. Use the [Print component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-print/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
64
65
|
export interface PrintViewModelEvents {
|
|
65
66
|
/**
|
|
66
67
|
* Fires when an export request begins, and returns a reference to the exported [link](https://developers.arcgis.com/javascript/latest/references/core/widgets/Print/FileLink/).
|
package/widgets/Print.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ export interface PrintProperties extends WidgetProperties, Partial<Pick<Print, "
|
|
|
108
108
|
viewModel?: PrintViewModelProperties;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
/** @deprecated since version 4.33. Use the [Print component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-print/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
111
112
|
export interface PrintEvents extends PrintViewModelEvents {}
|
|
112
113
|
|
|
113
114
|
/**
|
package/widgets/Search.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ export interface SearchProperties extends WidgetProperties, Partial<Pick<Search,
|
|
|
158
158
|
|
|
159
159
|
export type SearchActiveMenu = "none" | "suggestion" | "source" | "warning";
|
|
160
160
|
|
|
161
|
+
/** @deprecated since version 4.33. Use the [Search component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-search/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
161
162
|
export interface SearchEvents extends SearchViewModelEvents {
|
|
162
163
|
/**
|
|
163
164
|
* Fires when the widget's text input loses focus.
|
package/widgets/Sketch.d.ts
CHANGED
|
@@ -196,6 +196,7 @@ export interface SketchProperties extends WidgetProperties, Partial<Pick<Sketch,
|
|
|
196
196
|
visibleElements?: VisibleElementsProperties;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
/** @deprecated since version 5.0. Use the [Sketch component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
199
200
|
export interface SketchEvents extends SketchViewModelEvents {}
|
|
200
201
|
|
|
201
202
|
/**
|
package/widgets/Slider.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export interface TickElementGroup {
|
|
|
53
53
|
/**
|
|
54
54
|
* The base interface for all slider events. Contains events that are not
|
|
55
55
|
* publicly documented in some slider types.
|
|
56
|
+
*
|
|
57
|
+
* @deprecated since version 5.0. Use the [Slider component](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
56
58
|
*/
|
|
57
59
|
export interface CommonSliderEvents {
|
|
58
60
|
/**
|
|
@@ -142,6 +144,8 @@ export interface CommonSliderEvents {
|
|
|
142
144
|
* While CommonSliderEvents already declares some of these events, they are not
|
|
143
145
|
* public. The SliderEvents re-declares them so that public JSDoc can be
|
|
144
146
|
* attached to them without publishing these events in CommonSliderEvents.
|
|
147
|
+
*
|
|
148
|
+
* @deprecated since version 5.0. Use the [Slider component](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
145
149
|
*/
|
|
146
150
|
export interface SliderEvents extends CommonSliderEvents {
|
|
147
151
|
/**
|
|
@@ -129,6 +129,7 @@ export interface TimeSliderViewModelProperties extends Partial<Pick<TimeSliderVi
|
|
|
129
129
|
timeExtent?: TimeExtentProperties | null;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/** @deprecated since version 5.2. Use the [Time Bar component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) instead. */
|
|
132
133
|
export interface TimeSliderViewModelEvents {
|
|
133
134
|
/**
|
|
134
135
|
* Fires when a user clicks on an action in the actions menu.
|
|
@@ -160,6 +161,7 @@ export interface TimeSliderViewModelTriggerActionEvent {
|
|
|
160
161
|
/**
|
|
161
162
|
* Provides the logic for the [TimeSlider](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/) widget and [component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/).
|
|
162
163
|
*
|
|
164
|
+
* @deprecated since version 5.2. Use the [Time Bar component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) instead.
|
|
163
165
|
* @since 4.12
|
|
164
166
|
* @see [TimeSlider](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/) widget
|
|
165
167
|
* @see [Time Slider component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/)
|
|
@@ -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/Collection.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Collection.js";import{deprecateUnnecessaryViewModel as i}from"../../core/deprecate.js";import{EventedAccessor as n}from"../../core/Evented.js";import s from"../../core/Logger.js";import{after as r,isAbortError as o}from"../../core/promiseUtils.js";import{watch as l,initial as a,syncAndInitial as m,whenOnce as u}from"../../core/reactiveUtils.js";import{offsetDate as p}from"../../core/timeUtils.js";import{property as h,cast as d,subclass as c}from"../../core/accessorSupport/decorators.js";import{ensureType as f}from"../../core/accessorSupport/ensureType.js";import g from"../../time/TimeExtent.js";import w from"../../time/TimeInterval.js";import v from"../../webdoc/Widgets.js";import T from"../../webdoc/widgets/TimeSlider.js";const x=1e4;function E(t){return!!t&&"count"in t}function y(t){return!!t&&"interval"in t}function _(t){return!!t&&"dates"in t}let C=class extends n{constructor(t){super(t),this._animationController=null,this._isViewTimeExtentInitialized=!1,this._timerId=null,this.actions=new e,this.fullTimeExtent=null,this.loop=!1,this.mode="time-window",this.stops={count:10},this.timeExtent=null,this.view=null,t?.suppressDeprecationWarning||i(s.getLogger(this),"Time Bar","arcgis-time-bar",{version:"5.2"})}normalizeCtorArgs(t){const{suppressDeprecationWarning:e,...i}=t??{};return i}initialize(){this.addHandles([l(()=>this.effectiveStops,()=>{this.timeExtent??=this._getDefaultTimeExtent()},a),l(()=>this.view,(t,e)=>{this._unregisterWidget(e),this._registerWidget(t)},m),l(()=>this.timeExtent,t=>{if(!this.view)return;const e=this.view.timeExtent;(t&&!t.isAllTime||e&&!e.isAllTime)&&(t&&e&&t.equals(e)||(this.view.timeExtent=t))},a),l(()=>this.view?.timeExtent,t=>{this._isViewTimeExtentInitialized?(t&&!t.isAllTime||this.timeExtent&&!this.timeExtent.isAllTime)&&(t&&this.timeExtent&&t.equals(this.timeExtent)||(this.timeExtent=t)):this._isViewTimeExtentInitialized=!0})])}destroy(){null!=this._timerId&&(clearInterval(this._timerId),this._timerId=null),this._unregisterWidget(this.view),this.view=null,this._animationController?.abort(),this._animationController=null}get effectiveStops(){const{fullTimeExtent:t,stops:e}=this;if(_(e)){const{dates:i}=e;if(!i?.length)return null;const n=i.sort((t,e)=>t.getTime()-e.getTime());if(!t)return n;const{start:s,end:r}=t;if(!s||!r)return n;return n.filter(t=>!(t.getTime()<s.getTime()||t.getTime()>r.getTime()))}if(E(e)){const i=e.timeExtent??t;return this._divideTimeExtentByCount(i,e.count)}if(y(e)){const i=e.timeExtent??t;return this._divideTimeExtentByInterval(i,e.interval)}return[]}get isPreCommonEra(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0}set playRate(t){t<=0||t>36e5||("playing"===this.state&&this._startAnimation(),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}castStops(t){if(!t)return null;if(y(t)){if("unknown"===t.interval.unit)return s.getLogger(this).warn('A stop interval with an "unknown" time units is not supported. The default stop definition will be used.'),{count:10};t.interval=f(w,t.interval)}return(y(t)||E(t))&&(t.timeExtent=f(g,t.timeExtent)),t}get timeExtentValues(){const{mode:t,timeExtent:e}=this;if(!e||e.isAllTime||e.isEmpty)return null;const{start:i,end:n}=e;switch(t){case"cumulative-from-end":case"instant":return i?[i.getTime()]:null;case"cumulative-from-start":return n?[n.getTime()]:null;case"time-window":return i&&n?[i.getTime(),n.getTime()]:null}}next(){this._step({forward:!0,allowRestart:!1})}play(){this._startAnimation()}previous(){this._step({forward:!1,allowRestart:!1})}stop(){this._stopAnimation()}triggerAction(t){this.emit("trigger-action",{action:t})}updateWebDocument(t){const e=new T({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:E(this.stops)?this.stops.count:null,numThumbs:"time-window"===this.mode?2:1,stopDelay:this.playRate,stopInterval:y(this.stops)?this.stops.interval:null,stops:_(this.stops)?this.stops.dates:null});t.widgets??=new v,t.widgets.timeSlider=e}valuesToTimeExtent(t){if(!t)return null;const e=t.sort((t,e)=>t-e).map(t=>new Date(t)),i=e.length>0?e[0]:null,n=e.length>1?e[1]:null;switch(this.mode){case"time-window":return new g({start:i,end:n});case"instant":return new g({start:i,end:i});case"cumulative-from-start":return new g({start:null,end:i});case"cumulative-from-end":return new g({start:i,end:null});default:return g.allTime}}async _animate(){try{const t=this.view,e=this._animationController?.signal;await Promise.all([r(this.playRate,null,e),t&&u(()=>!t.updating,e)])}catch(t){return o(t)||s.getLogger(this).error(t),void(this._animationController=null)}this._step({forward:!0,allowRestart:!1}),this._animationController&&this._animate()}_divideTimeExtentByCount(t,e=10){if(!t||!e)return[];const{start:i,end:n}=t;if(!i||!n)return[];if(e>x)return this._divideTimeExtentByCount(t);const s=[],r=i.getTime(),o=n.getTime()-r;for(let l=0;l<=e;l++)s.push(new Date(r+l/e*o));return s}_divideTimeExtentByInterval(t,e,i=x){if(!t||!e)return[];const{start:n,end:s}=t;if(!n||!s)return[];const r=s.getTime()-n.getTime(),o=e.toMilliseconds();if(o<=0||r/o>i)return this._divideTimeExtentByCount(t);const l=[],{value:a,unit:m}=e;let u=n;for(;u.getTime()<=s.getTime();)l.push(new Date(u)),u=p(u,a,m);return l}_getDefaultTimeExtent(){const{effectiveStops:t,mode:e}=this;if(!t||!e)return null;switch(e){case"time-window":return t.length>1?new g({start:t[0],end:t[1]}):null;case"cumulative-from-start":return t.length>0?new g({start:null,end:t[0]}):null;case"cumulative-from-end":return t.length>0?new g({start:t[0],end:null}):null;case"instant":return t.length>0?new g({start:t[0],end:t[0]}):null;default:return null}}_registerWidget(t){t?.registerComponent(this)}_startAnimation(){this._stopAnimation(),this._animationController=new AbortController,this._step({forward:!0,allowRestart:!0}),this._animate()}_step(t){const{forward:e,allowRestart:i}=t,{effectiveStops:n}=this;if(!this.timeExtentValues||!n)return;const s=n.map(t=>t.getTime()),r=this.timeExtentValues.map(t=>{const e=s.indexOf(t);if(-1!==e)return e;const i=s.reduce((e,i)=>Math.abs(i-t)<Math.abs(e-t)?i:e);return s.indexOf(i)}),o=r.map(t=>t+(e?1:-1)),l=o.some(t=>t<0||t>s.length-1),{loop:a,state:m}=this;if(l)if(a||i){const t=Math.min(...r),i=Math.max(...r),n=(e?r.map(e=>e-t):r.map(t=>t+(s.length-1-i))).map(t=>s[t]);this.timeExtent=this.valuesToTimeExtent(n)}else"playing"===m&&this.stop();else{const t=o.map(t=>s[t]);this.timeExtent=this.valuesToTimeExtent(t)}}_stopAnimation(){null!=this._animationController&&(this._animationController.abort(),this._animationController=null)}_unregisterWidget(t){t?.unregisterComponent(this)}};t([h()],C.prototype,"_animationController",void 0),t([h({type:e})],C.prototype,"actions",void 0),t([h({readOnly:!0})],C.prototype,"effectiveStops",null),t([h({type:g})],C.prototype,"fullTimeExtent",void 0),t([h()],C.prototype,"isPreCommonEra",null),t([h({nonNullable:!0})],C.prototype,"loop",void 0),t([h({nonNullable:!0})],C.prototype,"mode",void 0),t([h({nonNullable:!0,value:1e3})],C.prototype,"playRate",null),t([h({readOnly:!0})],C.prototype,"state",null),t([h()],C.prototype,"stops",void 0),t([d("stops")],C.prototype,"castStops",null),t([h({type:g})],C.prototype,"timeExtent",void 0),t([h({readOnly:!0})],C.prototype,"timeExtentValues",null),t([h()],C.prototype,"view",void 0),t([h()],C.prototype,"next",null),t([h()],C.prototype,"play",null),t([h()],C.prototype,"previous",null),t([h()],C.prototype,"stop",null),t([h()],C.prototype,"updateWebDocument",null),C=t([c("esri.widgets.TimeSlider.TimeSliderViewModel")],C);const b=C;export{b as default};
|
package/widgets/TimeSlider.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ export type DateLabelFormatter = (value: Date | [
|
|
|
226
226
|
Date
|
|
227
227
|
], type: LabelType, element: HTMLElement, layout: Exclude<TimeSliderLayout, "auto">) => void;
|
|
228
228
|
|
|
229
|
+
/** @deprecated since version 5.0. Use the [Time Bar component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
229
230
|
export interface TimeSliderEvents extends TimeSliderViewModelEvents {}
|
|
230
231
|
|
|
231
232
|
/**
|