@arcgis/core 5.2.0-next.6 → 5.2.0-next.8
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/WebLinkChart.d.ts +1 -1
- package/WebMap.d.ts +2 -2
- package/WebScene.d.ts +3 -3
- package/arcade.d.ts +9 -9
- package/arcgisGlobal.d.ts +8 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +1 -0
- package/assets/esri/core/workers/chunks/09d0e430c66788a2626f.js +640 -0
- package/assets/esri/core/workers/chunks/{829a0583b8a228c65379.js → 0b169bb1969f86232a1a.js} +1 -1
- package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +1 -0
- package/assets/esri/core/workers/chunks/{20e2d11f6de438ee883e.js → 0ded58ccb83f624f1460.js} +1 -1
- package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +1 -0
- package/assets/esri/core/workers/chunks/{d1ac98f48bb6d43d97c8.js → 0f3654c8157ec8f22869.js} +3 -3
- package/assets/esri/core/workers/chunks/0f75c19d8e296a32e329.js +1 -0
- package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +1 -0
- package/assets/esri/core/workers/chunks/18f980465db5a86153d1.js +1 -0
- package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +1 -0
- package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +1 -0
- package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +1 -0
- package/assets/esri/core/workers/chunks/1dd06335bb2d35c66339.js +1 -0
- package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +1 -0
- package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +1 -0
- package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 2413b383b7f2bdcd4ced.js} +1 -1
- package/assets/esri/core/workers/chunks/{da29cf0e64065631a470.js → 24810c36ae09bb4e83dc.js} +1 -1
- package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +1 -0
- package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +1 -0
- package/assets/esri/core/workers/chunks/277718031c903da2b3b9.js +1 -0
- package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +1 -0
- package/assets/esri/core/workers/chunks/{7ed5b669010db58845f8.js → 294f2803aac000c99693.js} +1 -1
- package/assets/esri/core/workers/chunks/{093f27e4e4781870b431.js → 297ae764445e6f73a5ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{be0eab592db0e651b023.js → 2b814bb51704a5b4fdc2.js} +6 -6
- package/assets/esri/core/workers/chunks/2c9ba638d1f31c82f9f5.js +1 -0
- package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +1 -0
- package/assets/esri/core/workers/chunks/2dbc2fd0f2dde505c465.js +1 -0
- package/assets/esri/core/workers/chunks/2dbcdfdf000226bfe746.js +1 -0
- package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +1 -0
- package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +1 -0
- package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +1 -0
- package/assets/esri/core/workers/chunks/31918a0d9886dedf385f.js +1 -0
- package/assets/esri/core/workers/chunks/{1c029b03ed836f393a50.js → 3248001d9dfb9153699e.js} +1 -1
- package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +1 -0
- package/assets/esri/core/workers/chunks/{716a4d7e8b908b81870b.js → 32f26757e36704923286.js} +1 -1
- package/assets/esri/core/workers/chunks/3529afab0c2444275d91.js +1 -0
- package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +1 -0
- package/assets/esri/core/workers/chunks/{a2159df718a7f2f59271.js → 38a2f34661563c7c29c1.js} +1 -1
- package/assets/esri/core/workers/chunks/390fda094fa8695d98cf.js +1 -0
- package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +30 -0
- package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +1 -0
- package/assets/esri/core/workers/chunks/{6af77529c977d034d287.js → 3b15933f65f59625a650.js} +1 -1
- package/assets/esri/core/workers/chunks/3b3f91a61e3f29af1fb2.js +1 -0
- package/assets/esri/core/workers/chunks/{f815106d439ff1f76e51.js → 3b837b512999e6ab24bc.js} +1 -1
- package/assets/esri/core/workers/chunks/3d20c86f1fe877bf884b.js +1 -0
- package/assets/esri/core/workers/chunks/{a96c7432ca97cbeef4b8.js → 3db898a38a7c5f0efb48.js} +1 -1
- package/assets/esri/core/workers/chunks/3dc5fbecc427df1fd827.js +1 -0
- package/assets/esri/core/workers/chunks/3e65b4b18760bde8ceee.js +1 -0
- package/assets/esri/core/workers/chunks/3ff7aa216cd794d951e8.js +1 -0
- package/assets/esri/core/workers/chunks/{8e1865392681d390ab2e.js → 401ee7fa500adad77db1.js} +1 -1
- package/assets/esri/core/workers/chunks/{60915a3708a34da1977e.js → 426156137f279d979ddd.js} +1 -1
- package/assets/esri/core/workers/chunks/4517630bf869205bab87.js +1 -0
- package/assets/esri/core/workers/chunks/{b002304a45856b024b46.js → 4714241189c13d0db897.js} +1 -1
- package/assets/esri/core/workers/chunks/48f1c3a7c9f16d6896f6.js +1 -0
- package/assets/esri/core/workers/chunks/49308bdc36373555f1af.js +1 -0
- package/assets/esri/core/workers/chunks/5075e85e1eafd431a8c0.js +1 -0
- package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +1 -0
- package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +1 -0
- package/assets/esri/core/workers/chunks/{0e774f14ba274832f390.js → 520e0e5307eef27becc6.js} +1 -1
- package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +1 -0
- package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +1 -0
- package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +1 -0
- package/assets/esri/core/workers/chunks/53d165b4f30fd64e5d8a.js +1 -0
- package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +1 -0
- package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +1 -0
- package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +1 -0
- package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +1 -0
- package/assets/esri/core/workers/chunks/5bfae465872760e7af6d.js +1 -0
- package/assets/esri/core/workers/chunks/{cda99b543a0e1979346c.js → 5cb1b950249d651f3837.js} +1 -1
- package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +1 -0
- package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +1 -0
- package/assets/esri/core/workers/chunks/{c83fea0d0ebd0d8e43fd.js → 5d62d1920e3e35fc0192.js} +1 -1
- package/assets/esri/core/workers/chunks/5dd441db1e74dc9b56e9.js +1 -0
- package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js → 62e77e3c5ca9b4887923.js} +2 -2
- package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +1 -0
- package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +1 -0
- package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +1 -0
- package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
- package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +1 -0
- package/assets/esri/core/workers/chunks/68f9b2da1fd08785320f.js +2 -0
- package/assets/esri/core/workers/chunks/69e98de578f467a35054.js +1 -0
- package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +1 -0
- package/assets/esri/core/workers/chunks/6aabde21b0b376d95888.js +1 -0
- package/assets/esri/core/workers/chunks/6c6396bfcdab12e68deb.js +1 -0
- package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +1 -0
- package/assets/esri/core/workers/chunks/{bcb021a167580bb1619f.js → 6ef3b8d67b498d655a99.js} +1 -1
- package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +1 -0
- package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +1 -0
- package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +1 -0
- package/assets/esri/core/workers/chunks/{fce7995c26953bfd8d3d.js → 70229007d594536ba6a3.js} +1 -1
- package/assets/esri/core/workers/chunks/71e55381fdff3fc2542e.js +1 -0
- package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 72cfb186e50537bcdd19.js} +1 -1
- package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +1 -0
- package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +1 -0
- package/assets/esri/core/workers/chunks/77a4f6f224d7ca4b69f4.js +1 -0
- package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +1 -0
- package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +1 -0
- package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +1 -0
- package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +1 -0
- package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +1 -0
- package/assets/esri/core/workers/chunks/{8477b5fdd99c6ac5c27b.js → 851705cf276eae8d4d37.js} +1 -1
- package/assets/esri/core/workers/chunks/{c319c3b85cdec73a9f45.js → 877c848beaf9a939862c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ae74f722fb385e45fcf1.js → 893c0d28a5bf3f9f29f1.js} +1 -1
- package/assets/esri/core/workers/chunks/89e09276086745aa21fa.js +1 -0
- package/assets/esri/core/workers/chunks/{16b90d8f628a412ba4ba.js → 8a8c5e5ce457ca004687.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f55d60d3adc31283296.js → 8b0a01ebc86ab226f01f.js} +1 -1
- package/assets/esri/core/workers/chunks/{452c01cecbbd1e370098.js → 8f93e6fc11a158d4f1ee.js} +1 -1
- package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +1 -0
- package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → 93ceb74ac88ef460fe5f.js} +1 -1
- package/assets/esri/core/workers/chunks/{4e676e888a935c507d90.js → 93d4bda22bde33fafa57.js} +1 -1
- package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +1 -0
- package/assets/esri/core/workers/chunks/{50dc9893e13396f5e35d.js → 9629601de5e44ffe90ea.js} +2 -2
- package/assets/esri/core/workers/chunks/976ab2be6c244768c08a.js +1 -0
- package/assets/esri/core/workers/chunks/{e785f76c1a75cb1d1e1f.js → 99101789035f1787c630.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbb23db01f3cf629d32e.js → 992a90ecbab931198fd0.js} +1 -1
- package/assets/esri/core/workers/chunks/99e5296192ab98fd0d99.js +1 -0
- package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +1 -0
- package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +1 -0
- package/assets/esri/core/workers/chunks/a2247f4c3116efb16c4f.js +1 -0
- package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +1 -0
- package/assets/esri/core/workers/chunks/a442534ac0956a68b769.js +1 -0
- package/assets/esri/core/workers/chunks/a4d3cbc02dc1186a9a6d.js +1 -0
- package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +1 -0
- package/assets/esri/core/workers/chunks/{8bdca6f06c8b5fedd917.js → a5abba59e738c3240c22.js} +1 -1
- package/assets/esri/core/workers/chunks/a8ec5b85c2fa6fb4f391.js +1 -0
- package/assets/esri/core/workers/chunks/{f5a2c28dc26c065ea355.js → a9a1293b1d5302fb3b54.js} +28 -30
- package/assets/esri/core/workers/chunks/a9fc53ae040320e49834.js +1 -0
- package/assets/esri/core/workers/chunks/aa118c1bcd922b8ac328.js +1 -0
- package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +1 -0
- package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +1 -0
- package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +1 -0
- package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +1 -0
- package/assets/esri/core/workers/chunks/b22a1c98271c2e4d8808.js +1 -0
- package/assets/esri/core/workers/chunks/{9f4681713f03365a2a53.js → b666027b9022fa346a79.js} +1 -1
- package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +1 -0
- package/assets/esri/core/workers/chunks/b9bdb1f05e904c3655e4.js +1 -0
- package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +1 -0
- package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +1 -0
- package/assets/esri/core/workers/chunks/c357c0a08b99c1e7f290.js +1 -0
- package/assets/esri/core/workers/chunks/{4a23b27bfbcfa08fd9a7.js → c3cf9e6e91f71c9cc5f3.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +1 -0
- package/assets/esri/core/workers/chunks/{3e3134e4bc34d4e07179.js → c424a66f1546275e2bcb.js} +1 -1
- package/assets/esri/core/workers/chunks/c4fc85281ca83af7abaf.js +1 -0
- package/assets/esri/core/workers/chunks/c60b4f2dd5fccdf362a7.js +1 -0
- package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +1 -0
- package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +1 -0
- package/assets/esri/core/workers/chunks/c983e5ce0ff952b65d7f.js +1 -0
- package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +1 -0
- package/assets/esri/core/workers/chunks/ccffaba50674adba7a0f.js +1 -0
- package/assets/esri/core/workers/chunks/{24646a1176ce34039155.js → cdf6ad970dc1893dac58.js} +1 -1
- package/assets/esri/core/workers/chunks/d13e003c9293cb7e2852.js +1 -0
- package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +1 -0
- package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +1 -0
- package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +1 -0
- package/assets/esri/core/workers/chunks/{ace1899a8e5162b4018d.js → d6bb8db22ba85ad05fd7.js} +1 -1
- package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → d78b7cac322755e87eb8.js} +1 -1
- package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +1 -0
- package/assets/esri/core/workers/chunks/d9695794cfaa014a55b1.js +1 -0
- package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js → d9d4754062758789f186.js} +2 -2
- package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +1 -0
- package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +1 -0
- package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +1 -0
- package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +1 -0
- package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +1 -0
- package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +1 -0
- package/assets/esri/core/workers/chunks/{e178cd0e9178d6716410.js → e5837e5ac6ef761f26a2.js} +1 -1
- package/assets/esri/core/workers/chunks/e6a7272b59a4c2e34dca.js +1 -0
- package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +1 -0
- package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +1 -0
- package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +1 -0
- package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +1 -0
- package/assets/esri/core/workers/chunks/ee07f54bc77fe9f8575a.js +1 -0
- package/assets/esri/core/workers/chunks/{d35c475f004367e333eb.js → eeea5710275c967e8d51.js} +1 -1
- package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +1 -0
- package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +1 -0
- package/assets/esri/core/workers/chunks/f2a268c69f2a5566381b.js +1 -0
- package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js → f5731ad4cfbbf1cc569a.js} +2 -2
- package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +1 -0
- package/assets/esri/core/workers/chunks/f69df22a5c64389ebe28.js +1 -0
- package/assets/esri/core/workers/chunks/{f60292d97bcdbf19165b.js → f6d047358d14328f3622.js} +1 -1
- package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +1 -0
- package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +1 -0
- package/assets/esri/core/workers/chunks/f8f3579d0c1b65762902.js +1 -0
- package/assets/esri/core/workers/chunks/f98118127469449ca145.js +1 -0
- package/assets/esri/core/workers/chunks/f9ed05d4ad1f44d033bb.js +1 -0
- package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +1 -0
- package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +1 -0
- package/assets/esri/core/workers/chunks/fc4d9be62cf5e9758842.js +1 -0
- package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +38 -8
- package/assets/esri/themes/base/widgets/_DatePicker.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GlowComposition.glsl.js +2 -2
- package/chunks/RealisticTree.glsl.js +17 -15
- package/chunks/bundle2.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/config.d.ts +2 -2
- package/config.js +1 -1
- package/core/Collection.d.ts +25 -25
- package/core/Error.d.ts +1 -1
- package/core/JSONSupport.d.ts +1 -1
- package/core/promiseUtils.d.ts +3 -3
- package/core/reactiveUtils.d.ts +4 -4
- package/core/screenUtils.js +1 -1
- package/core/sql/WhereClause.d.ts +1 -1
- package/core/sql.d.ts +1 -1
- package/core/timeUtils.d.ts +1 -1
- package/core/workers/Connection.d.ts +9 -9
- package/core/workers.d.ts +1 -1
- package/editing/types.d.ts +3 -3
- package/geometry/Extent.d.ts +0 -13
- package/geometry/Geometry.d.ts +10 -8
- package/geometry/Mesh.d.ts +9 -2
- package/geometry/Mesh.js +1 -1
- package/geometry/Multipoint.d.ts +9 -0
- package/geometry/Multipoint.js +1 -1
- package/geometry/Point.d.ts +15 -71
- package/geometry/Polygon.js +1 -1
- package/geometry/support/MeshMaterial.d.ts +5 -5
- package/geometry/support/MeshTexture.d.ts +19 -19
- package/geometry/support/geometryUtils.js +1 -1
- package/geometry/support/jsonUtils.d.ts +1 -1
- package/geometry/support/meshUtils.d.ts +130 -2
- package/geometry/support/meshUtils.js +1 -1
- package/graphic/AnnotationGraphicOrigin.d.ts +34 -0
- package/graphic/AnnotationGraphicOrigin.js +2 -0
- package/graphic/DimensionFeatureGraphicOrigin.d.ts +34 -0
- package/graphic/DimensionFeatureGraphicOrigin.js +2 -0
- package/identity/Credential.d.ts +1 -1
- package/identity/IdentityManager.d.ts +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/identity/OAuthInfo.d.ts +1 -1
- package/identity/ServerInfo.d.ts +2 -2
- package/interfaces.d.ts +23 -0
- package/intl/number.d.ts +3 -3
- package/intl/substitute.d.ts +2 -2
- package/intl.d.ts +28 -28
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.d.ts +263 -32
- package/layers/AnnotationLayer.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +5 -5
- package/layers/BaseTileLayer.d.ts +4 -4
- package/layers/BuildingSceneLayer.d.ts +1 -1
- package/layers/CSVLayer.d.ts +7 -1
- package/layers/CatalogLayer.d.ts +6 -0
- package/layers/DimensionFeatureLayer.d.ts +263 -32
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +45 -8
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +14 -8
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.d.ts +5 -5
- package/layers/MediaLayer.d.ts +2 -2
- package/layers/OrientedImageryLayer.d.ts +29 -2
- package/layers/ParquetLayer.d.ts +7 -1
- package/layers/SceneLayer.d.ts +5 -3
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.d.ts +1 -1
- package/layers/SubtypeGroupLayer.d.ts +7 -1
- package/layers/TileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +8 -2
- package/layers/VideoLayer.js +1 -1
- package/layers/VoxelLayer.d.ts +4 -4
- package/layers/WCSLayer.d.ts +2 -2
- package/layers/WFSLayer.d.ts +6 -0
- package/layers/WebTileLayer.d.ts +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +60 -11
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/parquet/ParquetFileInfo.js +2 -0
- package/layers/graphics/sources/parquet/ParquetFileStatistics.js +2 -0
- package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/UrlsFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/createFileProvider.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +6 -0
- package/layers/mixins/ArcGISImageService.d.ts +7 -1
- package/layers/mixins/BlendLayer.d.ts +1 -1
- package/layers/mixins/DataSeriesLayer.d.ts +161 -0
- package/layers/mixins/DataSeriesLayer.js +2 -0
- package/layers/mixins/FeatureLayerBase.d.ts +43 -19
- package/layers/mixins/TemporalLayer.d.ts +4 -2
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/support/AnnotationSublayer.d.ts +44 -0
- package/layers/support/AnnotationSublayer.js +2 -0
- package/layers/support/DateTimeFieldFormat.d.ts +10 -10
- package/layers/support/FeatureEffect.d.ts +22 -22
- package/layers/support/FeatureReductionBinning.d.ts +12 -0
- package/layers/support/FeatureReductionCluster.d.ts +12 -0
- package/layers/support/Field.d.ts +2 -2
- package/layers/support/ImageElement.d.ts +1 -1
- package/layers/support/MosaicRule.d.ts +0 -2
- package/layers/support/NumberFieldFormat.d.ts +5 -5
- package/layers/support/StreamConnection.d.ts +1 -1
- package/layers/support/Sublayer.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +14 -1
- package/layers/support/TimeSeriesFieldTimeMapping.d.ts +30 -0
- package/layers/support/TimeSeriesFieldTimeMapping.js +2 -0
- package/layers/support/TimeSeriesInfo.d.ts +149 -0
- package/layers/support/TimeSeriesInfo.js +2 -0
- package/layers/support/VideoElement.d.ts +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/dataSeriesUtils.d.ts +18 -0
- package/layers/support/dataSeriesUtils.js +2 -0
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/timeSeriesUtils.d.ts +27 -0
- package/layers/support/timeSeriesUtils.js +2 -0
- package/layers/types.d.ts +1 -1
- package/layers/video/types.d.ts +61 -1
- package/libs/parquet/parquet.js +1 -1
- package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
- package/networks/CircuitManager.d.ts +1 -1
- package/networks/Network.d.ts +1 -1
- package/networks/UnitIdentifierManager.d.ts +1 -1
- package/networks/support/NamedTraceConfiguration.d.ts +1 -1
- package/networks/support/TraceConfiguration.d.ts +2 -2
- package/networks/support/UNTraceConfiguration.d.ts +3 -3
- package/networks/support/jsonTypes.d.ts +7 -1
- package/networks/support/utils.js +1 -1
- package/package.json +3 -3
- package/popup/content/CustomContent.d.ts +1 -1
- package/portal/Portal.d.ts +2 -2
- package/portal/jsonTypes.d.ts +2 -2
- package/renderers/support/AuthoringInfo.d.ts +14 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.d.ts +14 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/renderers/support/jsonUtils.d.ts +1 -1
- package/renderers/support/utils.d.ts +1 -1
- package/renderers/visualVariables/RotationVariable.d.ts +16 -1
- package/renderers/visualVariables/RotationVariable.js +1 -1
- package/request/types.d.ts +41 -43
- package/rest/geometryService.d.ts +1 -1
- package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +1 -1
- package/rest/knowledgeGraph/GraphApplyEdits.d.ts +1 -1
- package/rest/knowledgeGraph/GraphProperty.d.ts +5 -1
- package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +2 -2
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
- package/rest/knowledgeGraphService.d.ts +13 -13
- package/rest/layerSources/DynamicDataLayer.d.ts +1 -1
- package/rest/print.d.ts +1 -1
- package/rest/support/AttributeBinsQuery.d.ts +16 -2
- package/rest/support/ClosestFacilityParameters.d.ts +6 -6
- package/rest/support/LastMileDeliveryParameters.d.ts +4 -4
- package/rest/support/LocationToAddressParameters.d.ts +1 -1
- package/rest/support/PrintTemplate.d.ts +5 -5
- package/rest/support/Query.d.ts +18 -4
- package/rest/support/RouteParameters.d.ts +5 -5
- package/rest/support/ServiceAreaParameters.d.ts +6 -6
- package/rest/support/TopFeaturesQuery.d.ts +16 -2
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/renderers/color.d.ts +40 -0
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/opacity.d.ts +8 -0
- package/smartMapping/renderers/opacity.js +1 -1
- package/smartMapping/renderers/size.d.ts +38 -0
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/smartMapping/renderers/support/timeSeriesUtils.js +2 -0
- package/smartMapping/renderers/type.d.ts +20 -1
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +19 -0
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/setupServiceMocksMesh.js +1 -1
- package/support/timeUtils.d.ts +3 -3
- package/symbols/Font.d.ts +7 -7
- package/symbols/WebStyleSymbol.d.ts +11 -11
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/support/Symbol3DEmissive.d.ts +8 -2
- package/symbols/support/jsonUtils.d.ts +1 -1
- package/time/TimeExtent.d.ts +2 -2
- package/versionManagement/VersionManagementService.d.ts +8 -8
- package/versionManagement/VersionManager.d.ts +13 -3
- package/versionManagement/VersioningState.d.ts +4 -4
- package/views/2d/MapViewConstraints.d.ts +29 -25
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +4 -20
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +6 -22
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
- package/views/3d/glTF/internal/resourceUtils.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/visualElementUtils.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/webgl/RenderNode.d.ts +32 -11
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +6 -10
- package/views/BreakpointsOwner.d.ts +1 -1
- package/views/DOMContainer.d.ts +6 -6
- package/views/Magnifier.d.ts +1 -1
- package/views/MapView.d.ts +1 -1
- package/views/SceneView.d.ts +2 -2
- package/views/View2D.d.ts +62 -54
- package/views/Viewport2DMixin.d.ts +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +1 -1
- package/views/draw/plugins/PolygonPlugin.js +1 -1
- package/views/input/gamepad/GamepadInputDevice.d.ts +1 -1
- package/views/input/types.d.ts +15 -15
- package/views/interactive/interactiveToolUtils.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +32 -5
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/GraphicsLayerView.d.ts +6 -3
- package/views/layers/ImageryLayerView.d.ts +4 -0
- package/views/navigation/Navigation.d.ts +1 -1
- package/views/support/WebAssemblyRequirements.js +1 -1
- package/views/types.d.ts +5 -5
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/webscene/Glow.d.ts +0 -4
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -2
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.d.ts +14 -0
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +8 -6
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +5 -0
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.d.ts +10 -2
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks.d.ts +1 -1
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -2
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.d.ts +2 -2
- package/widgets/Daylight.d.ts +1 -1
- package/widgets/Directions.d.ts +1 -1
- package/widgets/Editor.d.ts +1 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.d.ts +1 -14
- package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.d.ts +1 -1
- package/widgets/FloorFilter.d.ts +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.d.ts +3 -3
- package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
- package/widgets/Fullscreen.d.ts +3 -3
- package/widgets/LayerList/ListItemPanel.d.ts +5 -5
- package/widgets/Legend.d.ts +1 -1
- package/widgets/Locate/LocateViewModel.d.ts +2 -2
- package/widgets/Locate.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Popup.d.ts +1 -1
- package/widgets/Print/PrintViewModel.d.ts +2 -2
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print/TemplateOptions.d.ts +4 -4
- package/widgets/Print.d.ts +6 -6
- package/widgets/Search/SearchViewModel.d.ts +5 -5
- package/widgets/Search.d.ts +4 -4
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +1 -1
- package/widgets/Slice.d.ts +1 -1
- package/widgets/TableList/ListItemPanel.d.ts +5 -5
- package/widgets/Track/TrackViewModel.d.ts +3 -3
- package/widgets/Track.d.ts +3 -3
- package/widgets/UtilityNetworkTrace.d.ts +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.d.ts +2 -2
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +7 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/Weather.d.ts +1 -1
- package/widgets/Widget.d.ts +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/forms/formUtils.js +1 -1
- package/widgets/support/types.d.ts +1 -1
- package/widgets/support/widget.d.ts +6 -6
- package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
- package/assets/esri/core/workers/chunks/07a242ea908aa8e2ba28.js +0 -1
- package/assets/esri/core/workers/chunks/0a780a883abfcdf0b900.js +0 -1
- package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +0 -1
- package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +0 -1
- package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +0 -1
- package/assets/esri/core/workers/chunks/145364aa20b4435294c2.js +0 -1
- package/assets/esri/core/workers/chunks/14c6419568d8a7a15cd6.js +0 -1
- package/assets/esri/core/workers/chunks/153dc2a0b08a0e44a881.js +0 -1
- package/assets/esri/core/workers/chunks/1595dc499a06b23b6a96.js +0 -1
- package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +0 -1
- package/assets/esri/core/workers/chunks/1765042635084f75d2b3.js +0 -1
- package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +0 -1
- package/assets/esri/core/workers/chunks/1c1515e020e32e177b54.js +0 -1
- package/assets/esri/core/workers/chunks/1c64e10f966e26af6fed.js +0 -1
- package/assets/esri/core/workers/chunks/1ddbf5f507ac153234be.js +0 -1
- package/assets/esri/core/workers/chunks/201007cf1a91e2b126fc.js +0 -1
- package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +0 -1
- package/assets/esri/core/workers/chunks/227eff8aa4a6f5f03bc2.js +0 -1
- package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +0 -1
- package/assets/esri/core/workers/chunks/24647e7424798dccdaf5.js +0 -1
- package/assets/esri/core/workers/chunks/249616ea2d90d40a8299.js +0 -1
- package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +0 -1
- package/assets/esri/core/workers/chunks/24eaf1349ffe10e616e6.js +0 -1
- package/assets/esri/core/workers/chunks/29615df388a0df022d8c.js +0 -1
- package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +0 -1
- package/assets/esri/core/workers/chunks/2bd334f9ab89334df713.js +0 -1
- package/assets/esri/core/workers/chunks/2c8584ec1c3c9fd5aba2.js +0 -1
- package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +0 -1
- package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +0 -1
- package/assets/esri/core/workers/chunks/2fa080539d039c92ce08.js +0 -1
- package/assets/esri/core/workers/chunks/3109b05fe4fc40d4f25b.js +0 -1
- package/assets/esri/core/workers/chunks/31442f25d550ead58fc4.js +0 -1
- package/assets/esri/core/workers/chunks/319ff04282dc8ae38b56.js +0 -2
- package/assets/esri/core/workers/chunks/32323b0e0fcecd8f640e.js +0 -1
- package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
- package/assets/esri/core/workers/chunks/3402fb9c596b582311c7.js +0 -1
- package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +0 -1
- package/assets/esri/core/workers/chunks/3a6678ee9990d7e83e15.js +0 -1
- package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +0 -1
- package/assets/esri/core/workers/chunks/3b3986276e70297d573b.js +0 -1
- package/assets/esri/core/workers/chunks/3b765a8cac9e92f644f2.js +0 -1
- package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +0 -1
- package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +0 -1
- package/assets/esri/core/workers/chunks/40910c69307e2d2d3f28.js +0 -1
- package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +0 -1
- package/assets/esri/core/workers/chunks/428561df7ba6f02e2d80.js +0 -1
- package/assets/esri/core/workers/chunks/45323491f9005629c602.js +0 -1
- package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +0 -1
- package/assets/esri/core/workers/chunks/46fbd519cc1a37923bfc.js +0 -1
- package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +0 -1
- package/assets/esri/core/workers/chunks/4845df00f6ebcce6ea3e.js +0 -1
- package/assets/esri/core/workers/chunks/48fcc10768d93e95a04e.js +0 -1
- package/assets/esri/core/workers/chunks/49f6c9e9980b8c624fd7.js +0 -1
- package/assets/esri/core/workers/chunks/4a9dd9f8aa98882218f3.js +0 -1
- package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +0 -1
- package/assets/esri/core/workers/chunks/4ef53455c8bc6efee80e.js +0 -1
- package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +0 -1
- package/assets/esri/core/workers/chunks/51ee6102f5f4840a5b47.js +0 -1
- package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +0 -1
- package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +0 -1
- package/assets/esri/core/workers/chunks/58155f24f8ed6aca7a21.js +0 -1
- package/assets/esri/core/workers/chunks/5838f46d341d2fde42ee.js +0 -1
- package/assets/esri/core/workers/chunks/58994b6bfcda5f2ada80.js +0 -1
- package/assets/esri/core/workers/chunks/592a599f514de373dead.js +0 -1
- package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
- package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +0 -1
- package/assets/esri/core/workers/chunks/62206d5d497b95fc4caf.js +0 -1
- package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +0 -1
- package/assets/esri/core/workers/chunks/64daa2a714e59d22bbd4.js +0 -1
- package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +0 -1
- package/assets/esri/core/workers/chunks/6637f19b82555738a1d5.js +0 -1
- package/assets/esri/core/workers/chunks/6c9933f948efd7923aa1.js +0 -1
- package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
- package/assets/esri/core/workers/chunks/6db274f6767102a39021.js +0 -1
- package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +0 -1
- package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +0 -1
- package/assets/esri/core/workers/chunks/767ea5b455b3823afd09.js +0 -1
- package/assets/esri/core/workers/chunks/77769663cd712822d33e.js +0 -1
- package/assets/esri/core/workers/chunks/77859a61d059738d057f.js +0 -1
- package/assets/esri/core/workers/chunks/7b564226def99fcf79d8.js +0 -1
- package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +0 -1
- package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +0 -1
- package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +0 -1
- package/assets/esri/core/workers/chunks/84b0b6e099d949e0fea5.js +0 -1
- package/assets/esri/core/workers/chunks/8c5a41ae68775bac3446.js +0 -1
- package/assets/esri/core/workers/chunks/8f94c90fdb0333da2d0f.js +0 -1
- package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +0 -1
- package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +0 -1
- package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
- package/assets/esri/core/workers/chunks/9dcfaca1f4fa8c8026ac.js +0 -1
- package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +0 -30
- package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +0 -1
- package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +0 -1
- package/assets/esri/core/workers/chunks/a806ac351ef5da04c250.js +0 -1
- package/assets/esri/core/workers/chunks/ab94c9f62462d7a98f6a.js +0 -1
- package/assets/esri/core/workers/chunks/abdb05754c50776c3edd.js +0 -1
- package/assets/esri/core/workers/chunks/ad488985824fbb830ed6.js +0 -1
- package/assets/esri/core/workers/chunks/b08a1255dacf6cfcf139.js +0 -640
- package/assets/esri/core/workers/chunks/b098469e0010a6b44df9.js +0 -1
- package/assets/esri/core/workers/chunks/b0ac4b0b7aec70cfe6eb.js +0 -1
- package/assets/esri/core/workers/chunks/b1f1271434af302938e8.js +0 -1
- package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +0 -1
- package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +0 -1
- package/assets/esri/core/workers/chunks/c27cb2a83a1d2e004501.js +0 -1
- package/assets/esri/core/workers/chunks/c44be4aaba829e6d149d.js +0 -1
- package/assets/esri/core/workers/chunks/ca1b0cb14ea9ae1bf2a3.js +0 -1
- package/assets/esri/core/workers/chunks/ca4245414d8ecd217f9d.js +0 -1
- package/assets/esri/core/workers/chunks/cc479daacd2cf715baa8.js +0 -1
- package/assets/esri/core/workers/chunks/ce0e627a5e1cb78adce8.js +0 -1
- package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
- package/assets/esri/core/workers/chunks/d3af51a6d9014ff46170.js +0 -1
- package/assets/esri/core/workers/chunks/d561dc933d8fe1672d85.js +0 -1
- package/assets/esri/core/workers/chunks/d81291dac1932350eccd.js +0 -1
- package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +0 -1
- package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +0 -1
- package/assets/esri/core/workers/chunks/dd58286dde3b20356f84.js +0 -1
- package/assets/esri/core/workers/chunks/dfeddb7b17fa9eaae64c.js +0 -1
- package/assets/esri/core/workers/chunks/e38836bfcc7a15a2fd1f.js +0 -1
- package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +0 -1
- package/assets/esri/core/workers/chunks/e638391801ad83fe4a68.js +0 -1
- package/assets/esri/core/workers/chunks/e645f992ec6f935ee3a5.js +0 -1
- package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +0 -1
- package/assets/esri/core/workers/chunks/e7712467db46e1385cf4.js +0 -1
- package/assets/esri/core/workers/chunks/e9dcc3e9dbafe9bbed84.js +0 -1
- package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +0 -1
- package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +0 -1
- package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +0 -1
- package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +0 -1
- package/assets/esri/core/workers/chunks/eedee0af459e6b8a6116.js +0 -1
- package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +0 -1
- package/assets/esri/core/workers/chunks/f1fb2f12371f4c562079.js +0 -1
- package/assets/esri/core/workers/chunks/f3dfe1bd1146a6927407.js +0 -1
- package/assets/esri/core/workers/chunks/f79bd469b25099a31274.js +0 -1
- package/assets/esri/core/workers/chunks/ff48334528d2554db4fe.js +0 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +0 -2
- /package/assets/esri/core/workers/chunks/{50dc9893e13396f5e35d.js.LICENSE.txt → 62e77e3c5ca9b4887923.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{319ff04282dc8ae38b56.js.LICENSE.txt → 68f9b2da1fd08785320f.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js.LICENSE.txt → 9629601de5e44ffe90ea.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js.LICENSE.txt → d9d4754062758789f186.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js.LICENSE.txt → f5731ad4cfbbf1cc569a.js.LICENSE.txt} +0 -0
|
@@ -24,6 +24,7 @@ export interface ImageryLayerViewProperties extends LayerViewProperties {
|
|
|
24
24
|
* @see [highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight)
|
|
25
25
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
26
26
|
* @example
|
|
27
|
+
* ```js
|
|
27
28
|
* // Features in the layerview will be highlighted with bright
|
|
28
29
|
* // yellow colors in the map.
|
|
29
30
|
* const layerView = await view.whenLayerView(layer);
|
|
@@ -32,6 +33,7 @@ export interface ImageryLayerViewProperties extends LayerViewProperties {
|
|
|
32
33
|
* haloOpacity: 0.9,
|
|
33
34
|
* fillOpacity: 0.2
|
|
34
35
|
* };
|
|
36
|
+
* ```
|
|
35
37
|
*/
|
|
36
38
|
highlightOptions?: HighlightOptionsProperties | null;
|
|
37
39
|
}
|
|
@@ -66,6 +68,7 @@ export default abstract class ImageryLayerView extends LayerView {
|
|
|
66
68
|
* @see [highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight)
|
|
67
69
|
* @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
|
|
68
70
|
* @example
|
|
71
|
+
* ```js
|
|
69
72
|
* // Features in the layerview will be highlighted with bright
|
|
70
73
|
* // yellow colors in the map.
|
|
71
74
|
* const layerView = await view.whenLayerView(layer);
|
|
@@ -74,6 +77,7 @@ export default abstract class ImageryLayerView extends LayerView {
|
|
|
74
77
|
* haloOpacity: 0.9,
|
|
75
78
|
* fillOpacity: 0.2
|
|
76
79
|
* };
|
|
80
|
+
* ```
|
|
77
81
|
*/
|
|
78
82
|
get highlightOptions(): HighlightOptions | null | undefined;
|
|
79
83
|
set highlightOptions(value: HighlightOptionsProperties | null | undefined);
|
|
@@ -99,7 +99,7 @@ export default class Navigation extends Accessor {
|
|
|
99
99
|
* > [!CAUTION]
|
|
100
100
|
* >
|
|
101
101
|
* > With respect to [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/), this property will be ignored if [Config](https://developers.arcgis.com/javascript/latest/references/core/config/#Config-respectPrefersReducedMotion)
|
|
102
|
-
* > is `true` and the user has requested reduced motion. See [prefers-reduced-motion](https://developer.mozilla.org/docs/Web/CSS/@media/prefers-reduced-motion) for more information.
|
|
102
|
+
* > is `true` and the user has requested reduced motion. See [prefers-reduced-motion](https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion) for more information.
|
|
103
103
|
*
|
|
104
104
|
* @default true
|
|
105
105
|
* @since 4.14
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";async function t(){try{return await WebAssembly.instantiate(new Uint8Array([0,97,115,109,1,0,0,0])),null}catch(t){return new e("webassembly:required","WebAssembly is not supported. Check the application's Content Security Policy: https://developer.mozilla.org/
|
|
2
|
+
import e from"../../core/Error.js";async function t(){try{return await WebAssembly.instantiate(new Uint8Array([0,97,115,109,1,0,0,0])),null}catch(t){return new e("webassembly:required","WebAssembly is not supported. Check the application's Content Security Policy: https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/script-src#unsafe_webassembly_execution")}}export{t as checkWebAssemblyRequirements};
|
package/views/types.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import type BuildingSublayer from "../layers/buildingSublayers/BuildingSublayer.
|
|
|
23
23
|
import type SubtypeSublayer from "../layers/support/SubtypeSublayer.js";
|
|
24
24
|
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
|
|
25
25
|
import type { AbortOptions } from "../core/promiseUtils.js";
|
|
26
|
-
import type { ScreenPoint
|
|
26
|
+
import type { ScreenPoint } from "../core/types.js";
|
|
27
27
|
import type { GeometryUnion } from "../geometry/types.js";
|
|
28
28
|
import type { MediaElement } from "../layers/media/types.js";
|
|
29
29
|
import type { NetworkFeature } from "../rest/support/types.js";
|
|
@@ -238,7 +238,7 @@ export interface GoToOptionsBase extends AbortOptions {
|
|
|
238
238
|
* `ease-in`, `ease-out`, `ease-in-out`, as well as
|
|
239
239
|
* `in-cubic`, `out-cubic`, `in-out-cubic`,
|
|
240
240
|
* `in-expo`, `out-expo`, `in-out-expo`, and `in-out-coast-quad`.
|
|
241
|
-
* See [easing functions](https://easings.net/) and [CSS easing functions](https://developer.mozilla.org/
|
|
241
|
+
* See [easing functions](https://easings.net/) and [CSS easing functions](https://developer.mozilla.org/docs/Web/CSS/easing-function#ease) for graphical representations of these functions.
|
|
242
242
|
*
|
|
243
243
|
* By default, animations that are less than 1000 ms use the `expo-out` easing function; longer animations use the `quad-in-out-coast` easing function.
|
|
244
244
|
*
|
|
@@ -436,7 +436,7 @@ export interface RouteHit {
|
|
|
436
436
|
*
|
|
437
437
|
* @since 5.0
|
|
438
438
|
*/
|
|
439
|
-
mapPoint
|
|
439
|
+
mapPoint?: Point | null;
|
|
440
440
|
/**
|
|
441
441
|
* The route hit test will contain all intersecting network elements which, includes one of the following: DirectionLine, DirectionPoint, PointBarrier, PolylineBarrier, PolygonBarrier, Stop, or RouteInfo.
|
|
442
442
|
*
|
|
@@ -486,7 +486,7 @@ export interface RasterHit {
|
|
|
486
486
|
*
|
|
487
487
|
* @since 5.1
|
|
488
488
|
*/
|
|
489
|
-
mapPoint
|
|
489
|
+
mapPoint: Point;
|
|
490
490
|
/**
|
|
491
491
|
* The pixel values at the hit location.
|
|
492
492
|
*
|
|
@@ -518,7 +518,7 @@ export interface ViewHitTestResult {
|
|
|
518
518
|
*
|
|
519
519
|
* @since 5.0
|
|
520
520
|
*/
|
|
521
|
-
screenPoint
|
|
521
|
+
screenPoint?: ScreenPoint | null;
|
|
522
522
|
/**
|
|
523
523
|
* An array of result objects returned from the [MapView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest).
|
|
524
524
|
* Results are returned when the location of the input screen coordinates intersects a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import{MultiOriginJSONSupport as t}from"../../core/MultiOriginJSONSupport.js";import{whenOnce as o}from"../../core/reactiveUtils.js";import{hasSameCanonicalPortal as r,urlToObject as a}from"../../core/urlUtils.js";import{updateOrigins as i}from"../../core/accessorSupport/originUtils.js";import n from"../../geometry/SpatialReference.js";import{webMercatorToGeographic as s}from"../../geometry/support/webMercatorUtils.js";import{isServerOrServicesAGOLUrl as l}from"../../layers/support/arcgisLayerUrl.js";import{isLayerWithFeatureLayerSource as p,isFeatureCollectionLayer as c}from"../../layers/support/layerUtils.js";import u from"../../portal/Portal.js";import m from"../../portal/PortalItem.js";import{createForItemWrite as
|
|
2
|
+
import e from"../../core/Error.js";import{MultiOriginJSONSupport as t}from"../../core/MultiOriginJSONSupport.js";import{whenOnce as o}from"../../core/reactiveUtils.js";import{hasSameCanonicalPortal as r,urlToObject as a}from"../../core/urlUtils.js";import{updateOrigins as i}from"../../core/accessorSupport/originUtils.js";import n from"../../geometry/SpatialReference.js";import{webMercatorToGeographic as s}from"../../geometry/support/webMercatorUtils.js";import{isServerOrServicesAGOLUrl as l}from"../../layers/support/arcgisLayerUrl.js";import{isLayerWithFeatureLayerSource as p,isFeatureCollectionLayer as c}from"../../layers/support/layerUtils.js";import u from"../../portal/Portal.js";import m from"../../portal/PortalItem.js";import{createForItemWrite as d}from"../../portal/support/jsonContext.js";import{removeTypeKeyword as f,addTypeKeyword as y,typeKeyword as w,hasTypeKeyword as g,toggleTypeKeyword as h}from"../../portal/support/portalItemUtils.js";import{project as _}from"../../rest/geometryService/project.js";import j from"../../rest/support/ProjectParameters.js";import{hasDeveloperBasemapLayer as b,isDeveloperBasemapLayer as v}from"../../support/basemapUtils.js";import{saveResources as R}from"./resourceUtils.js";import{beforeSave as S,evaluateWriteErrors as W,hasCharts as I}from"./saveUtils.js";const A=["NatGeo_World_Map","Ocean_Basemap","USA_Topo_Maps","World_Imagery","World_Street_Map","World_Terrain_Base","World_Topo_Map","World_Hillshade","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Reference/World_Boundaries_and_Places","Reference/World_Reference_Overlay","Reference/World_Transportation"].map(e=>e.toLowerCase());async function P(e,t,r){r??={},U(e,t),await o(()=>!t.updatingFromView),await t.load(),await D(t),await S(t),await M(e,t);const a=t.portalItem,{json:i,jsonContext:n}=await O(t,a,e.origin);return W(n,{errorName:`${e.name}:save`},r),await k(t,a),await ge(e,t,a,i,n),await Promise.all([t.updateItemThumbnail(),R(t.resourceReferences,n)]),a}async function O(e,t,o){const r=d(t,o,!0),a=e.write({},r);return await Promise.all(r.resources.pendingOperations),{json:a,jsonContext:r}}async function T(e,t,r,a){a??={};const i=E(e,r);await o(()=>!t.updatingFromView),await t.load(),await D(t),await S(t),await M(e,t);const{json:n,jsonContext:s}=await O(t,i,e.origin);W(s,{errorName:`${e.name}:save`},a),await X(t,i);const l=t.getThumbnailState();return await he(e,t,i,n,s,a)&&(t.resourceReferences.portalItem=i),t.restoreThumbnailFromState(l),await Promise.all([t.updateItemThumbnail(),R(t.resourceReferences,s)]),i}function U(t,o){if(!o.portalItem)throw new e(`${t.name}:portal-item-not-set`,"Portal item to save to has not been set on the WebMap");C(t,o.portalItem)}function C(t,o){if(o.type!==t.itemType)throw new e(`${t.name}:portal-item-wrong-type`,`Portal item needs to have type "${t.itemType}"`)}async function M(t,o){if("linkchart"!==t.name&&!o.basemap?.baseLayers.length)throw new e(`${t.name}:save`,"Map does not have a valid basemap with a base layer.")}function E(e,t){let o=m.from(t);return o.id&&(o=o.clone(),o.id=null),o.type||(o.type=e.itemType),o.portal||(o.portal=u.getDefault()),C(e,o),o}function D(e){const t=[];return e.basemap&&t.push(e.basemap.load()),e.ground&&t.push(e.ground.load()),Promise.allSettled(t).then(()=>{})}async function k(e,t){t.extent=await ce(e.portalItem,e.initialViewProperties.viewpoint.targetGeometry),await Y(e,t)}const x=w.JSAPI,G="CollectorDisabled",L="Collector",N="Data Editing",V="OfflineDisabled",B="Offline",$="Workforce Project",F="Workforce Worker",H="Workforce Dispatcher",K="Offline Map Areas",J="FieldMapsDisabled",q=w.DEVELOPER_BASEMAP,z="UtilityNetwork",Q="IPS";async function X(e,t){f(t,G),f(t,J),f(t,w.METADATA),f(t,V),f(t,K),f(t,H),f(t,$),f(t,F),await k(e,t)}async function Y(e,t){y(t,x),await Z(e),re(e,t),ae(e,t),ie(e,t),ne(e,t),se(e,t),le(e,t),pe(e,t),t.typeKeywords&&(t.typeKeywords=t.typeKeywords.filter((e,t,o)=>o.indexOf(e)===t))}function Z(e){const t=ee(e).map(e=>e.load()).toArray();return Promise.allSettled(t).then(()=>{})}function ee(e){return e.allLayers.concat(e.allTables)}function te(e){return ee(e).some(e=>e.loaded&&p(e)&&e.capabilities.operations.supportsEditing&&"editingEnabled"in e&&e.editingEnabled&&("subtype-group"!==e.type||e.sublayers.some(e=>e.editingEnabled)))}function oe(e){return ee(e).filter(e=>"group"!==e.type).every(t=>t.loaded&&de(e,t))}function re(e,t){g(t,G)||g(t,$)||g(t,F)||g(t,H)||!te(e)?f(t,L):y(t,L)}function ae(e,t){te(e)?y(t,N):f(t,N)}function ie(e,t){!g(t,V)&&oe(e)?y(t,B):f(t,B)}function ne(e,t){b(e.basemap)?y(t,q):f(t,q)}function se(e,t){e.utilityNetworks?.length?y(t,z):f(t,z)}function le(e,t){e.ipsInfo?y(t,Q):f(t,Q)}function pe(e,t){h(t,w.CHARTS,I(e))}async function ce(e,t){const o=t.clone().normalize();let r;if(o.length>1)for(const a of o)r?a.width>r.width&&(r=a):r=a;else r=o[0];return ue(e,r)}async function ue(e,t){const o=t.spatialReference;if(o.isWGS84)return t.clone();if(o.isWebMercator)return s(t);const{getGeometryServiceURL:r}=await import("../../portal/support/geometryServiceUtils.js"),a=await r(e),i=new j({geometries:[t],outSpatialReference:n.WGS84});return(await _(a,i))[0]}function me(e){return c(e)||"map-notes"===e.type||"route"===e.type}function de(e,t){return p(t)&&t.capabilities.operations.supportsSync||me(t)&&!t.portalItem||fe(t)&&!ye(t)&&t.spatialReference.equals(e.initialViewProperties.spatialReference)}function fe(e){return"imagery-tile"===e.type?e.supportsExportMapTiles():("tile"===e.type||"vector-tile"===e.type)&&(e.capabilities.operations.supportsExportTiles||we(e)||v(e))}function ye(e){return"vector-tile"===e.type&&Object.keys(e.sourceNameToSource).length>1}function we(e){return"tile"===e.type&&(l(e.url)&&A.some(t=>e.url?.toLowerCase().includes("/"+t+"/")))}async function ge(e,t,o,r,a){await o.update({data:r}),be(e,t,o,r,a)}async function he(t,o,r,a,i,n){const s=o.portalItem,l={item:s,authenticated:!(!s?.id||!s.portal.user)},p=r.portal;await p.signIn();const{copyAllowed:c,itemReloaded:u}=await _e(l,p);if(l.authenticated||=u,!c)throw new e(`${t.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const m=await je(r,l,a,n);return o.portalItem=r,be(t,o,r,a,i),m}async function _e(e,t){const{item:o,authenticated:r}=e;return o?.id&&o.typeKeywords?.includes("useOnly")?o.portal.portalHostname!==t.portalHostname?{copyAllowed:!1,itemReloaded:!1}:(r||await o.reload(),{copyAllowed:"admin"===o.itemControl||"update"===o.itemControl,itemReloaded:!0}):{copyAllowed:!0,itemReloaded:!1}}async function je(e,t,o,a){const i=e.portal,{item:n}=t,{folder:s,copyAllResources:l}=a;let p=!1;if(l&&n?.id&&r(n.portal.url,i.url)&&parseInt(n.portal.currentVersion,10)>=2023){const{total:e}=await n.fetchResources();p=!!e}if(p){const t=await n.copy({copyResources:"all",folder:s});e.id=t.id,e.portal=t.portal;const r=e.toJSON();await e.load(),e.read(r),await e.update({data:o})}else await i.user.addItem({item:e,folder:s,data:o});return p}function be(e,o,r,n,s){t.prototype.read.call(o,{version:n.version,authoringApp:n.authoringApp,authoringAppVersion:n.authoringAppVersion},{origin:e.origin,ignoreDefaults:!0,url:r.itemUrl?a(r.itemUrl):void 0}),i(s),o.resourceInfo=n}export{O as createJSON,je as initializeNewItem,_e as isCopyAllowed,P as save,T as saveAs};
|
package/webscene/Glow.d.ts
CHANGED
|
@@ -21,10 +21,6 @@ export interface GlowProperties extends Partial<Pick<Glow, "intensity">> {}
|
|
|
21
21
|
* | `glow: null`|`glow: { intensity: 0 }`|`glow: { intensity: 1 }`|
|
|
22
22
|
* | Without glow, emissive elements display with a bright, natural appearance. | Glow enables a more stylized look of emissive elements across the scene. `intensity:0` adds a subtle glow only. | `intensity:1` adds an exaggerated glow, helpful for strong emphasis of emissive elements.
|
|
23
23
|
*
|
|
24
|
-
* > [!WARNING]
|
|
25
|
-
* >
|
|
26
|
-
* > **Known Limitations**
|
|
27
|
-
* > [Symbol3DEmissive](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/) and [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) require support for the WebGL2 extension `EXT_float_blend`.
|
|
28
24
|
*
|
|
29
25
|
* Example:
|
|
30
26
|
* ```js
|
|
@@ -128,7 +128,7 @@ export default class BasemapGallery extends Widget {
|
|
|
128
128
|
*
|
|
129
129
|
* @default 2
|
|
130
130
|
* @since 4.20
|
|
131
|
-
* @see [Heading Elements](https://developer.mozilla.org/
|
|
131
|
+
* @see [Heading Elements](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements)
|
|
132
132
|
* @example
|
|
133
133
|
* // "No basemaps available" will render as an <h3>
|
|
134
134
|
* basemapGallery.headingLevel = 3;
|
|
@@ -275,7 +275,7 @@ export default class BasemapLayerList extends BasemapLayerListSuperclass {
|
|
|
275
275
|
*
|
|
276
276
|
* @default 2
|
|
277
277
|
* @since 4.20
|
|
278
|
-
* @see [Heading Elements](https://developer.mozilla.org/
|
|
278
|
+
* @see [Heading Elements](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements)
|
|
279
279
|
* @example
|
|
280
280
|
* // the widget title will render as an <h3>
|
|
281
281
|
* basemapLayerList.headingLevel = 3;
|
|
@@ -14,7 +14,7 @@ import type { AssociationsLayerUnion, AttachmentsChangeEvent, AttributeFormSuppo
|
|
|
14
14
|
import type { FormInput } from "./inputs/types.js";
|
|
15
15
|
import type { EditType } from "../support/forms/types.js";
|
|
16
16
|
|
|
17
|
-
export interface BatchAttributeFormViewModelProperties extends Partial<Pick<BatchAttributeFormViewModel, "activeFeatureIndex" | "disabled" | "editType" | "features" | "layerInfos" | "map" | "readOnly" | "selectedAttachment" | "selectedAttachmentAddElementId" | "selectedAttachmentListElementId" | "showingSelectedAttachmentReplacePage" | "submitHasBeenAttempted" | "timeZone" | "userHasChangedValues">> {}
|
|
17
|
+
export interface BatchAttributeFormViewModelProperties extends Partial<Pick<BatchAttributeFormViewModel, "activeFeatureIndex" | "attachmentsEnabled" | "disabled" | "editType" | "features" | "layerInfos" | "map" | "readOnly" | "selectedAttachment" | "selectedAttachmentAddElementId" | "selectedAttachmentListElementId" | "showingSelectedAttachmentReplacePage" | "submitHasBeenAttempted" | "timeZone" | "userHasChangedValues">> {}
|
|
18
18
|
|
|
19
19
|
export interface BatchAttributeFormViewModelEvents {
|
|
20
20
|
/**
|
|
@@ -95,6 +95,14 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
|
|
|
95
95
|
* To change which form is active, see [activeFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#activeFeatureIndex).
|
|
96
96
|
*/
|
|
97
97
|
get activeForm(): BatchFormInputs;
|
|
98
|
+
/**
|
|
99
|
+
* Indicates whether attachment elements should be rendered in the form. Changing this value will cause the form to regenerate
|
|
100
|
+
* and discard any pending edits.
|
|
101
|
+
*
|
|
102
|
+
* @default false
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
accessor attachmentsEnabled: boolean;
|
|
98
106
|
/**
|
|
99
107
|
* Indicates whether the form is currently evaluating [Arcade expressions](https://developers.arcgis.com/javascript/latest/arcade/). It returns `true` when the form is evaluating expressions or when it is waiting for a response from the server.
|
|
100
108
|
*
|
|
@@ -413,7 +421,7 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
|
|
|
413
421
|
* @param file - File contents for the replacement attachment.
|
|
414
422
|
* @internal
|
|
415
423
|
*/
|
|
416
|
-
stageReplaceAttachment(elementId: string, attachmentGlobalId: string, file: Blob | File): Promise<
|
|
424
|
+
stageReplaceAttachment(elementId: string, attachmentGlobalId: string, file: Blob | File): Promise<boolean>;
|
|
417
425
|
/**
|
|
418
426
|
* This method triggers the `"submit"` event, and causes [submitHasBeenAttempted](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#submitHasBeenAttempted) to become `true`. It does _not_ do anything to persist the updated values. It is up to the client to verify if these values are appropriate. For example, calling [FeatureLayer.applyEdits()](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#applyEdits) method to update the features' attributes.
|
|
419
427
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{pushIfSome as t}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{destroyMaybe as l,abortMaybe as h}from"../../core/maybe.js";import{throwIfAborted as c,isAbortError as u}from"../../core/promiseUtils.js";import p from"../../core/ReactiveMap.js";import{on as m,sync as d,watch as g,syncAndInitial as f,initial as v,whenOnce as A}from"../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as F}from"../../core/support/UpdatingHandles.js";import I from"../../geometry/SpatialReference.js";import{getGraphicLayer as w}from"../../graphic/graphicOriginUtils.js";import{system as x}from"../../time/constants.js";import{getAttachmentKey as E}from"./attachmentUtils.js";import{createReactiveGraphic as C,isAttributeFormSupportedLayerWithAttachments as M,layerSupportsQueryAttachments as V,queryAttachmentsForElements as b}from"./batchAttributeFormUtils.js";import{ReactiveContingentValuesManager as k}from"./ReactiveContingentValuesManager.js";import{ArcadeExecutorProvider as R}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as L}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as S}from"./expressions/ExpressionsModel.js";import T from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as H}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as P,isFieldInput as j,applyFieldValueChanges as N}from"./inputs/support/inputUtils.js";import G from"./templates/BatchFormTemplate.js";import{createBatchFormTemplate as B}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as O,isGroupElementTemplate as U}from"./templates/support/templateUtils.js";import{ContingentValuesManager as D}from"../support/ContingentValuesManager.js";import{isEmptyValue as W}from"../support/forms/formUtils.js";function Z(e,t){return e?.find(e=>e.layer===t)}let $=class extends n{constructor(e){super(e),this._attachmentCache=new p,this.activeFeatureIndex=-1,this.callbacks=null,this.disabled=!1,this.editType="NA",this.features=new a,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new R,this._activeAssociationsInput=null,this._activeRelationshipInput=null,this._ownContingentValuesManager=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new T({inputs:[]}),this._emptyFormTemplate=new G({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new p,this._updatingHandles=new F,this._submitTask=null,this._layerTemplateMap=new p,this._workingFeatures=new a,this._expressionsManager=new L({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:x}}),this._getFieldValueOptionsForFeature=e=>this._reactiveContingentValuesManager.getAndWatchFieldValueOptions(e),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.contingentValuesManager||(this.contingentValuesManager=this._ownContingentValuesManager=new D),this.addHandles([m(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),g(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),g(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),g(()=>this.activeFeature,()=>{this.goHome()},d),g(()=>this.page,e=>{const t=[...this.pageStack];if(t.includes(e))for(;t.length&&t.at(-1)!==e;)t.pop();else t.push(e);this.pageStack=t},f),g(()=>this.contingentValuesManager,e=>{l(this._reactiveContingentValuesManager),this._reactiveContingentValuesManager=new k({manager:e})},v)]),this._prepare()}destroy(){this._prepareTask=h(this._prepareTask),this._workingFeatures.destroyAll(),l(this._expressionsManager),l(this._reactiveContingentValuesManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new p,this._emptyForm.destroy(),this._emptyFormTemplate.destroy(),this._ownContingentValuesManager=l(this._ownContingentValuesManager)}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return w(e)??null}get activeAssociationsInput(){return this._activeAssociationsInput}get activeRelationshipInput(){return this._activeRelationshipInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){const e=this.contingentValuesManager;for(const t of this.layers)if(e.getFieldsWithContingentValues(t).size>0)return!0;return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){if(this.showingSelectedAttachmentReplacePage&&this.selectedAttachmentDetails)return"replacing-attachment";if(this.selectedAttachmentDetails)return"viewing-attachment-details";if(this.selectedAttachmentAddInput)return"adding-attachments";if(this.selectedAttachmentListInput)return"viewing-attachments";if(this.activeAssociationsInput?.associatedLayer)return"viewing-associated-features";if(this.activeAssociationsInput)return"viewing-associated-layers";if(this.activeRelationshipInput){const e=this.activeRelationshipInput;return e.allCategories?.length&&!e.activeCategory?"viewing-related-categories":"viewing-related-records"}return"default"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating||this._hasPendingAttachmentHydration}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(e=>e.valid)}get layers(){const e=new Set;return this.features.forEach(t=>{const s=w(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){if(this.submitHasBeenAttempted=!0,!this._hasPendingAttachmentHydration)return this._emitSubmit(),Promise.resolve();if(this._submitTask)return this._submitTask.promise;const e=s(async()=>{await Promise.all(this._allAttachmentInputs.map(e=>e.waitForPendingAttachmentUpdateData())),this._emitSubmit()});return this._submitTask=e,e.promise.finally(()=>{this._submitTask===e&&(this._submitTask=null)}),e.promise}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachment",e),null!=e&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachmentAddElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentListElementId=null)}get selectedAttachmentListElementId(){return this._get("selectedAttachmentListElementId")??null}set selectedAttachmentListElementId(e){this._set("selectedAttachmentListElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentAddElementId=null)}get selectedAttachmentListInput(){const e=this.selectedAttachmentListElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get showingSelectedAttachmentReplacePage(){return this._get("showingSelectedAttachmentReplacePage")??!1}set showingSelectedAttachmentReplacePage(e){this._set("showingSelectedAttachmentReplacePage",e&&null!=this.selectedAttachmentDetails)}get selectedAttachmentAddInput(){const e=this.selectedAttachmentAddElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get selectedAttachmentDetails(){const e=this.selectedAttachment,t=this.activeForm;if(!e||!t)return null;const s=t.allAttachmentElementInputs.find(t=>t.template.elementId===e.elementId);if(!s)return null;const a=s.attachments.findIndex(t=>E(t)===e.attachmentKey);if(-1===a)return null;return{attachment:s.attachments[a],input:s}}get _allAttachmentInputs(){const e=[...this.sharedForm.allAttachmentElementInputs];for(const t of this._featureFormMap.values())e.push(...t.allAttachmentElementInputs);return e}get _hasPendingAttachmentHydration(){return this._allAttachmentInputs.some(e=>e.hasPendingAttachmentUpdateData)}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(P(e)){const t=e.inputs.find(e=>j(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(j(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new i("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}async goBack(){switch(this.page){case"replacing-attachment":return void this.setShowingSelectedAttachmentReplacePage(!1);case"viewing-attachment-details":return void this.setSelectedAttachment(null);case"adding-attachments":return void this.setSelectedAttachmentAddElementId(null);case"viewing-attachments":return void this.setSelectedAttachmentListElementId(null);case"viewing-associated-features":return void this.setActiveAssociationsLayer(null);case"viewing-associated-layers":return void this.setActiveAssociationsInput(null);case"viewing-related-records":return void this.clearActiveRelationshipCategoryOrInput();case"viewing-related-categories":return void this.setActiveRelationshipInput(null);default:return}}async goHome(){this.setShowingSelectedAttachmentReplacePage(!1),this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null),this.setSelectedAttachmentListElementId(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.setActiveRelationshipInput(null)}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){await this._setFieldValueFromContext(e.features,t,{fieldName:e.fieldName,expressionsManager:e.expressionsManager,fieldInput:e})}async setFieldInputValuePerFeature(e,t){await this._setFieldValuePerFeatureFromContext(t,{fieldName:e.fieldName,expressionsManager:e.expressionsManager,fieldInput:e})}async setValueForFieldName(e,t,s,a){const i=null==a?this._workingFeatures:this._getReactiveGraphics(a);await this._setFieldValueFromContext(i,t,{fieldName:e,expressionsManager:this._expressionsManager,fieldInput:this.findFieldInput(s)??void 0})}async setValuePerFeatureForFieldName(e,t,s){await this._setFieldValuePerFeatureFromContext(this._getReactiveGraphicValueMap(t),{fieldName:e,expressionsManager:this._expressionsManager,fieldInput:this.findFieldInput(s)??void 0})}_getReactiveGraphics(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&t.push(e)}return t}_getReactiveGraphicValueMap(e){const t=new Map;for(const[s,a]of e){const e=this._reactiveGraphicLookup.get(s);e&&t.set(e,a)}return t}async _setFieldValueFromContext(e,t,s){const a=await this._mutateFieldValues(s,e,()=>t);this._emitLegacyValueChangeEvent(e,s.fieldName,t),this._emitValuesChangeEvent(s.fieldName,Q(a,s.fieldName,t))}async _setFieldValuePerFeatureFromContext(e,t){const s=await this._mutateFieldValues(t,e.keys(),t=>e.get(t));if(this._emitValuesChangeEvent(t.fieldName,X(s,t.fieldName,e)),1===e.size){const{value:s}=e.values().next();this._emitLegacyValueChangeEvent(e.keys(),t.fieldName,s)}}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new i("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}async stageAddAttachments(e,t){if(0===t.length)return[];const s=this._findAttachmentInput(e);if(!s)return[];const a=await s.stageAddAttachments(t,this._expressionsManager.arcadeContext);return 0===a.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),a}stageDeleteAttachment(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.stageDeleteAttachment(a),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}async stageRenameAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const i=this._findAttachment(a,t);i&&0!==s.trim().length&&(a.stageRenameAttachment(i,s.trim()),this.userHasChangedValues=!0,await a.ensureStagedUpdateData(i),this._emitAttachmentsChange(a))}async stageReplaceAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const i=this._findAttachment(a,t);if(!i)return;await a.stageReplaceAttachment(i,s,this._expressionsManager.arcadeContext)&&(this.userHasChangedValues=!0,this._emitAttachmentsChange(a))}clearAttachmentChanges(e){const t=this._findAttachmentInput(e);t&&(t.clearAttachmentChanges(),this._emitAttachmentsChange(t))}setActiveAssociationsInput(e){this._activeAssociationsInput=e}setActiveAssociationsLayer(e){this._activeAssociationsInput?.setAssociatedLayer(e)}setActiveRelationshipInput(e){e?(this._activeRelationshipInput=e,this._activeRelationshipInput?.setShowAllEnabled(!0)):(this._activeRelationshipInput?.setShowAllEnabled(!1),this._activeRelationshipInput?.setActiveCategory(null),this._activeRelationshipInput=null)}setActiveRelationshipCategory(e,t){t.setActiveCategory(e),this.setActiveRelationshipInput(t)}clearActiveRelationshipCategoryOrInput(){const e=this.activeRelationshipInput;e&&(e.allCategories?.length?e.setActiveCategory(null):this.setActiveRelationshipInput(null))}setActiveAssociationType(e){this._activeAssociationsInput?.setActiveAssociationType(e)}resetAttachmentChanges(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.discardStagedEdits(a),this._emitAttachmentsChange(s))}setSelectedAttachment(e){this.selectedAttachment=e??null}setShowingSelectedAttachmentReplacePage(e){this.showingSelectedAttachmentReplacePage=e}setSelectedAttachmentAddElementId(e){this.selectedAttachmentAddElementId=e??null}setSelectedAttachmentListElementId(e){this.selectedAttachmentListElementId=e??null}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?H(t,{allFeatures:new a([e]),expressionsManager:this._expressionsManager,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[s,a]of this._reactiveGraphicLookup){const i=[],n=[],r=this._featureFormMap.get(a)?.allAttachmentElementInputs??[];for(const e of r)t(i,e.toSubmitEdits()),e.valid||n.push(e.template.elementId);e.set(s,{feature:s,values:{...a.attributes},invalidFields:[],attachmentEdits:i,invalidAttachmentElementIds:n})}for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_emitSubmit(){this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}_findAttachmentInput(e){const t=this.activeForm.allAttachmentElementInputs.find(t=>t.template.elementId===e);return t||r.getLogger(this).error(`Attachment input not found for elementId '${e}'`),t}_findAttachment(e,t){const s=e.findAttachment(t);return s||r.getLogger(this).error(`Attachment '${t}' not found for attachment element '${e.template.elementId}'`),s}_makeAttachmentEdits(e){const s=[];for(const a of e.allAttachmentElementInputs)t(s,a.toSubmitEdits());return s}_emitAttachmentsChange(e){const t=e.single.feature;if(!t)return;const s=this._featureFormMap.get(t);this.emit("attachments-change",{name:"attachments-change",feature:t.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}_emitLegacyValueChangeEvent(e,t,s){this.emit("value-change",{name:"value-change",features:Array.from(e,e=>e.source),fieldName:t,value:s})}_emitValuesChangeEvent(e,t){this.emit("values-change",{name:"values-change",fieldName:e,data:t})}async _trackValidityChange(e,t){await A(()=>!1===this.calculating);const s=new Map(t.map(e=>[e.source,e]));for(const a of this.invalidFeatures)if(!e.has(a)){const e=s.get(a);e&&(e.userChangesHaveMadeInvalid=!0)}}async _mutateFieldValues(e,t,s){const a=new Set(this.invalidFeatures),{expressionsManager:i,fieldInput:n,fieldName:r}=e;n&&(n.userHasChangedValue=!0);const o=await N(r,i,t,s);return o.length>0&&(this.userHasChangedValues=!0),await this._trackValidityChange(a,o),o}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=h(this._prepareTask),this._updateWorkingFeatures(),l(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new L({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??I.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{layers:e}=this;if(0===e.length)return;const t=s(async t=>{try{c(t),this.contingentValuesManager.layers.addMany(e);const s=new Map;await Promise.all(e.map(e=>e.load()));for(const i of e){const e=Z(this.layerInfos,i),a=await B(i,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone},e?.formTemplate);c(t),this._layerTemplateMap.set(i,a);const n=a.getExpressionExecutorsForLayer(i);if(this._expressionsManager.layerExpressionsModelMap.set(i,new S({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:n})),!this._hasAsyncArcadeExpressions)for(const t of n.keys()){const e=n.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of a.elements){if(O(t))continue;const e=t.clone();U(e)&&(e.elements=e.elements.filter(e=>!O(e)));const{elementId:a}=e;s.has(a)?s.get(a).foldIn(e):s.set(a,e)}}if(this.hasTooManyComplexFeatures)throw new i("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new i("too-many-features","There are too many features to load into the form.");const a=new G({elements:Array.from(s.values())});this.sharedFormTemplate=a,this.sharedForm=H(a,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray()),await A(()=>!this.contingentValuesManager.updating)}catch(s){throw u(s)||r.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(t.promise),this._prepareTask=t}_updateWorkingFeatures(){this._workingFeatures.destroyAll();for(const t of this._featureFormMap.values())t.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:e}=this;if(this._reactiveGraphicLookup=new p,0!==e.length){this._workingFeatures.addMany(e.map(C));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&M(t)&&V(t)))return;const a=e.getObjectId();if(null==a)return;const i=this._attachmentCache.get(t),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(i){const e=i.get(a);e&&(r=e)}if(!r){r=await b(t,a,n);o(this._attachmentCache,t,()=>new p).set(a,r)}for(const o of n)o.applyFetchedAttachments(J(o,r))}};e([y()],$.prototype,"_attachmentCache",void 0),e([y({readOnly:!0})],$.prototype,"activeFeature",null),e([y()],$.prototype,"activeFeatureIndex",void 0),e([y({readOnly:!0})],$.prototype,"activeForm",null),e([y({readOnly:!0})],$.prototype,"activeLayer",null),e([y()],$.prototype,"activeAssociationsInput",null),e([y()],$.prototype,"activeRelationshipInput",null),e([y()],$.prototype,"callbacks",void 0),e([y()],$.prototype,"disabled",void 0),e([y()],$.prototype,"calculating",null),e([y()],$.prototype,"contingentValuesManager",void 0),e([y()],$.prototype,"editType",void 0),e([y()],$.prototype,"features",void 0),e([y()],$.prototype,"expressionEvaluationFailed",null),e([y()],$.prototype,"hasNonActiveInvalidFeatures",null),e([y()],$.prototype,"hasAsyncArcadeExpressions",null),e([y()],$.prototype,"_hasAsyncArcadeExpressions",void 0),e([y()],$.prototype,"invalidFeatures",null),e([y()],$.prototype,"hasVisibleInputs",null),e([y()],$.prototype,"hasLayersWithContingentValues",null),e([y()],$.prototype,"maximumFeatureCount",void 0),e([y()],$.prototype,"maximumFeatureCountWithComplexForms",void 0),e([y()],$.prototype,"visibleInputs",null),e([y()],$.prototype,"map",void 0),e([y()],$.prototype,"noVisibleElementsReason",null),e([y()],$.prototype,"page",null),e([y()],$.prototype,"pageStack",void 0),e([y()],$.prototype,"readOnly",void 0),e([y()],$.prototype,"spatialReference",void 0),e([y()],$.prototype,"submitHasBeenAttempted",void 0),e([y()],$.prototype,"timeZone",void 0),e([y()],$.prototype,"updating",null),e([y()],$.prototype,"valid",null),e([y()],$.prototype,"layers",null),e([y()],$.prototype,"mode",null),e([y()],$.prototype,"sharedForm",void 0),e([y()],$.prototype,"sharedFormTemplate",void 0),e([y()],$.prototype,"selectedAttachment",null),e([y()],$.prototype,"selectedAttachmentAddElementId",null),e([y()],$.prototype,"selectedAttachmentListElementId",null),e([y()],$.prototype,"selectedAttachmentListInput",null),e([y()],$.prototype,"showingSelectedAttachmentReplacePage",null),e([y()],$.prototype,"selectedAttachmentAddInput",null),e([y()],$.prototype,"selectedAttachmentDetails",null),e([y()],$.prototype,"userHasChangedValues",void 0),e([y()],$.prototype,"layerInfos",void 0),e([y()],$.prototype,"_arcadeExecutorProvider",void 0),e([y()],$.prototype,"_activeAssociationsInput",void 0),e([y()],$.prototype,"_activeRelationshipInput",void 0),e([y()],$.prototype,"_prepareTask",void 0),e([y()],$.prototype,"_reactiveGraphicLookup",void 0),e([y()],$.prototype,"_allAttachmentInputs",null),e([y()],$.prototype,"_hasPendingAttachmentHydration",null),e([y()],$.prototype,"_layerTemplateMap",void 0),e([y()],$.prototype,"_workingFeatures",void 0),e([y()],$.prototype,"_expressionsManager",void 0),$=e([_("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],$);const z=$;function K(e){return null!=e&&e.trim().length>0}function q(e,t){const s=e.keywords;return K(s)&&s.toLowerCase()===t}function J(e,t){const s="attachment"===e.input?.type?e.input.attachmentAssociationType:"exact",a=e.attachmentKeyword;if("any"===s)return t;if("exactOrNone"===s){if(W(a))return t.filter(e=>!K(e.keywords));const e=a.toLowerCase();return t.filter(t=>!K(t.keywords)||q(t,e))}if(W(a))return t;const i=a.toLowerCase();return t.filter(e=>q(e,i))}function Q(e,t,s){return e.map(e=>({feature:e.source,changes:[{fieldName:t,value:s}]}))}function X(e,t,s){return e.map(e=>({feature:e.source,changes:[{fieldName:t,value:s.get(e)}]}))}export{z as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{pushIfSome as t}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{destroyMaybe as l,abortMaybe as h}from"../../core/maybe.js";import{throwIfAborted as c,isAbortError as u}from"../../core/promiseUtils.js";import p from"../../core/ReactiveMap.js";import{on as m,sync as d,watch as g,syncAndInitial as f,initial as v,whenOnce as A}from"../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as F}from"../../core/support/UpdatingHandles.js";import I from"../../geometry/SpatialReference.js";import{getGraphicLayer as w}from"../../graphic/graphicOriginUtils.js";import{system as E}from"../../time/constants.js";import{getAttachmentKey as x}from"./attachmentUtils.js";import{createReactiveGraphic as C,isAttributeFormSupportedLayerWithAttachments as M,layerSupportsQueryAttachments as V,queryAttachmentsForElements as b}from"./batchAttributeFormUtils.js";import{ReactiveContingentValuesManager as k}from"./ReactiveContingentValuesManager.js";import{ArcadeExecutorProvider as R}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as S}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as L}from"./expressions/ExpressionsModel.js";import T from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as H}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as P,isFieldInput as j,applyFieldValueChanges as N}from"./inputs/support/inputUtils.js";import B from"./templates/BatchFormTemplate.js";import{createBatchFormTemplate as G}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as O,isGroupElementTemplate as U}from"./templates/support/templateUtils.js";import{ContingentValuesManager as D}from"../support/ContingentValuesManager.js";import{isEmptyValue as W}from"../support/forms/formUtils.js";function Z(e,t){return e?.find(e=>e.layer===t)}let $=class extends n{constructor(e){super(e),this._attachmentCache=new p,this.activeFeatureIndex=-1,this.attachmentsEnabled=!1,this.callbacks=null,this.disabled=!1,this.editType="NA",this.features=new a,this._hasAsyncArcadeExpressions=!1,this.highlightHelper=null,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new R,this._activeAssociationsInput=null,this._activeRelationshipInput=null,this._ownContingentValuesManager=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new T({inputs:[]}),this._emptyFormTemplate=new B({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new p,this._updatingHandles=new F,this._submitTask=null,this._layerTemplateMap=new p,this._workingFeatures=new a,this._expressionsManager=new S({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:E}}),this._getExternalErrorForFeature=(e,t)=>this._reactiveContingentValuesManager.getViolationTypeForField(e,t),this._getFieldValueOptionsForFeature=e=>this._reactiveContingentValuesManager.getAndWatchFieldValueOptions(e),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.contingentValuesManager||(this.contingentValuesManager=this._ownContingentValuesManager=new D),this.addHandles([m(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),g(()=>[this.attachmentsEnabled,this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),g(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),g(()=>this.activeFeature,()=>{this.goHome()},d),g(()=>this.page,e=>{const t=[...this.pageStack];if(t.includes(e))for(;t.length&&t.at(-1)!==e;)t.pop();else t.push(e);this.pageStack=t},f),g(()=>this.contingentValuesManager,e=>{l(this._reactiveContingentValuesManager),this._reactiveContingentValuesManager=new k({manager:e})},v)]),this._prepare()}destroy(){this._prepareTask=h(this._prepareTask),this._workingFeatures.destroyAll(),l(this._expressionsManager),l(this._reactiveContingentValuesManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new p,this._emptyForm.destroy(),this._emptyFormTemplate.destroy(),this._ownContingentValuesManager=l(this._ownContingentValuesManager),this.highlightHelper?.removeAll()}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return w(e)??null}get activeAssociationsInput(){return this._activeAssociationsInput}get activeRelationshipInput(){return this._activeRelationshipInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){const e=this.contingentValuesManager;for(const t of this.layers)if(e.getFieldsWithContingentValues(t).size>0)return!0;return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.showingSelectedAttachmentReplacePage&&this.selectedAttachmentDetails?"replacing-attachment":this.selectedAttachmentDetails?"viewing-attachment-details":this.selectedAttachmentAddInput?"adding-attachments":this.selectedAttachmentListInput?"viewing-attachments":this.activeAssociationsInput?.associatedLayer?"viewing-associated-features":this.activeAssociationsInput?"viewing-associated-layers":this.activeRelationshipInput?.showAllRelatedRecords?"viewing-related-records":this.activeRelationshipInput?.showAllCategories?"viewing-related-categories":"default"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating||this._hasPendingAttachmentHydration}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(e=>e.valid)}get layers(){const e=new Set;return this.features.forEach(t=>{const s=w(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){if(this.submitHasBeenAttempted=!0,this._validateContingentValues(this._workingFeatures),!this._hasPendingAttachmentHydration)return this._emitSubmit(),Promise.resolve();if(this._submitTask)return this._submitTask.promise;const e=s(async()=>{await Promise.all(this._allAttachmentInputs.map(e=>e.waitForPendingAttachmentUpdateData())),this._emitSubmit()});return this._submitTask=e,e.promise.finally(()=>{this._submitTask===e&&(this._submitTask=null)}),e.promise}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachment",e),null!=e&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachmentAddElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentListElementId=null)}get selectedAttachmentListElementId(){return this._get("selectedAttachmentListElementId")??null}set selectedAttachmentListElementId(e){this._set("selectedAttachmentListElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentAddElementId=null)}get selectedAttachmentListInput(){const e=this.selectedAttachmentListElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get showingSelectedAttachmentReplacePage(){return this._get("showingSelectedAttachmentReplacePage")??!1}set showingSelectedAttachmentReplacePage(e){this._set("showingSelectedAttachmentReplacePage",e&&null!=this.selectedAttachmentDetails)}get selectedAttachmentAddInput(){const e=this.selectedAttachmentAddElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get selectedAttachmentDetails(){const e=this.selectedAttachment,t=this.activeForm;if(!e||!t)return null;const s=t.allAttachmentElementInputs.find(t=>t.template.elementId===e.elementId);if(!s)return null;const a=s.attachments.findIndex(t=>x(t)===e.attachmentKey);if(-1===a)return null;return{attachment:s.attachments[a],input:s}}get _allAttachmentInputs(){const e=[...this.sharedForm.allAttachmentElementInputs];for(const t of this._featureFormMap.values())e.push(...t.allAttachmentElementInputs);return e}get _hasPendingAttachmentHydration(){return this._allAttachmentInputs.some(e=>e.hasPendingAttachmentUpdateData)}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(P(e)){const t=e.inputs.find(e=>j(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(j(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new i("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}async goBack(){switch(this.page){case"replacing-attachment":return void this.setShowingSelectedAttachmentReplacePage(!1);case"viewing-attachment-details":return void this.setSelectedAttachment(null);case"adding-attachments":return void this.setSelectedAttachmentAddElementId(null);case"viewing-attachments":return void this.setSelectedAttachmentListElementId(null);case"viewing-associated-features":return void this.setActiveAssociationsLayer(null);case"viewing-associated-layers":return void this.setActiveAssociationsInput(null);case"viewing-related-categories":case"viewing-related-records":return void this.clearActiveRelationshipCategoryOrInput();default:return}}async goHome(){this.setShowingSelectedAttachmentReplacePage(!1),this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null),this.setSelectedAttachmentListElementId(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.clearAllRelationshipSettings()}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){await this._setFieldValueFromContext(e.features,t,{fieldName:e.fieldName,expressionsManager:e.expressionsManager,fieldInput:e})}async setFieldInputValuePerFeature(e,t){await this._setFieldValuePerFeatureFromContext(t,{fieldName:e.fieldName,expressionsManager:e.expressionsManager,fieldInput:e})}async setValueForFieldName(e,t,s,a){const i=null==a?this._workingFeatures:this._getReactiveGraphics(a);await this._setFieldValueFromContext(i,t,{fieldName:e,expressionsManager:this._expressionsManager,fieldInput:this.findFieldInput(s)??void 0})}async setValuePerFeatureForFieldName(e,t,s){await this._setFieldValuePerFeatureFromContext(this._getReactiveGraphicValueMap(t),{fieldName:e,expressionsManager:this._expressionsManager,fieldInput:this.findFieldInput(s)??void 0})}_getReactiveGraphics(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&t.push(e)}return t}_getReactiveGraphicValueMap(e){const t=new Map;for(const[s,a]of e){const e=this._reactiveGraphicLookup.get(s);e&&t.set(e,a)}return t}async _setFieldValueFromContext(e,t,s){const a=await this._mutateFieldValues(s,e,()=>t);this._emitLegacyValueChangeEvent(e,s.fieldName,t),this._emitValuesChangeEvent(s.fieldName,Q(a,s.fieldName,t))}async _setFieldValuePerFeatureFromContext(e,t){const s=await this._mutateFieldValues(t,e.keys(),t=>e.get(t));if(this._emitValuesChangeEvent(t.fieldName,X(s,t.fieldName,e)),1===e.size){const{value:s}=e.values().next();this._emitLegacyValueChangeEvent(e.keys(),t.fieldName,s)}}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new i("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}async stageAddAttachments(e,t){if(0===t.length)return[];const s=this._findAttachmentInput(e);if(!s)return[];const a=await s.stageAddAttachments(t,this._expressionsManager.arcadeContext);return 0===a.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),a}stageDeleteAttachment(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.stageDeleteAttachment(a),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}async stageRenameAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const i=this._findAttachment(a,t);i&&0!==s.trim().length&&(a.stageRenameAttachment(i,s.trim()),this.userHasChangedValues=!0,await a.ensureStagedUpdateData(i),this._emitAttachmentsChange(a))}async stageReplaceAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return!1;const i=this._findAttachment(a,t);if(!i)return!1;return!!await a.stageReplaceAttachment(i,s,this._expressionsManager.arcadeContext)&&(this.userHasChangedValues=!0,this._emitAttachmentsChange(a),!0)}clearAttachmentChanges(e){const t=this._findAttachmentInput(e);t&&(t.clearAttachmentChanges(),this._emitAttachmentsChange(t))}setActiveAssociationsInput(e){this._activeAssociationsInput=e}setActiveAssociationsLayer(e){this._activeAssociationsInput?.setAssociatedLayer(e)}setActiveAssociationType(e){this._activeAssociationsInput?.setActiveAssociationType(e)}setActiveRelationshipInput(e){e||this._activeRelationshipInput?.setActiveCategory(null),this._activeRelationshipInput=e}setActiveRelationshipCategory(e,t){t.setActiveCategory(e),this.setActiveRelationshipInput(t)}clearAllRelationshipSettings(){const e=this.activeRelationshipInput;e&&(e.setActiveCategory(null),e.setShowAllCategories(!1),e.setShowAllRelatedRecords(!1),this._activeRelationshipInput=null)}clearActiveRelationshipCategoryOrInput(){const e=this.activeRelationshipInput;e&&(e.showAllRelatedRecords?e.showAllCategories?e.setActiveCategory(null):this.setActiveRelationshipInput(null):e.showAllCategories&&(e.setShowAllCategories(!1),this.setActiveRelationshipInput(null)))}resetAttachmentChanges(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.discardStagedEdits(a),this._emitAttachmentsChange(s))}setSelectedAttachment(e){this.selectedAttachment=e??null}setShowingSelectedAttachmentReplacePage(e){this.showingSelectedAttachmentReplacePage=e}setSelectedAttachmentAddElementId(e){this.selectedAttachmentAddElementId=e??null}setSelectedAttachmentListElementId(e){this.selectedAttachmentListElementId=e??null}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?H(t,{allFeatures:new a([e]),expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[s,a]of this._reactiveGraphicLookup){const i=[],n=[],r=this._featureFormMap.get(a)?.allAttachmentElementInputs??[];for(const e of r)t(i,e.toSubmitEdits()),e.valid||n.push(e.template.elementId);e.set(s,{feature:s,values:{...a.attributes},invalidFields:[],attachmentEdits:i,invalidAttachmentElementIds:n})}for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_emitSubmit(){this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}_findAttachmentInput(e){const t=this.activeForm.allAttachmentElementInputs.find(t=>t.template.elementId===e);return t||r.getLogger(this).error(`Attachment input not found for elementId '${e}'`),t}_findAttachment(e,t){const s=e.findAttachment(t);return s||r.getLogger(this).error(`Attachment '${t}' not found for attachment element '${e.template.elementId}'`),s}_makeAttachmentEdits(e){const s=[];for(const a of e.allAttachmentElementInputs)t(s,a.toSubmitEdits());return s}_emitAttachmentsChange(e){const t=e.single.feature;if(!t)return;const s=this._featureFormMap.get(t);this.emit("attachments-change",{name:"attachments-change",feature:t.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}_emitLegacyValueChangeEvent(e,t,s){this.emit("value-change",{name:"value-change",features:Array.from(e,e=>e.source),fieldName:t,value:s})}_emitValuesChangeEvent(e,t){this.emit("values-change",{name:"values-change",fieldName:e,data:t})}_validateContingentValues(e,t=!1){if(t&&!this.submitHasBeenAttempted)for(const s of e)this._reactiveContingentValuesManager.validateContingenciesForNonNullFields(s);else for(const s of e)this._reactiveContingentValuesManager.validateContingencyConstraints(s,{includeIncompleteViolations:!0})}async _trackValidityChange(e,t){await A(()=>!1===this.calculating);const s=new Map(t.map(e=>[e.source,e]));for(const a of this.invalidFeatures)if(!e.has(a)){const e=s.get(a);e&&(e.userChangesHaveMadeInvalid=!0)}}async _mutateFieldValues(e,t,s){const a=new Set(this.invalidFeatures),{expressionsManager:i,fieldInput:n,fieldName:r}=e;n&&(n.userHasChangedValue=!0);const o=await N(r,i,t,s);return o.length>0&&(this.userHasChangedValues=!0),"single"!==this.mode&&1!==this.features.length||this._validateContingentValues([o[0]],!0),await this._trackValidityChange(a,o),o}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=h(this._prepareTask),this._updateWorkingFeatures(),l(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new S({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??I.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{attachmentsEnabled:e,layers:t}=this;if(0===t.length)return;const a=s(async s=>{try{c(s),this.contingentValuesManager.layers.addMany(t);const a=new Map;await Promise.all(t.map(e=>e.load()));for(const i of t){const t=Z(this.layerInfos,i),n=await G(i,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone,attachmentsEnabled:e},t?.formTemplate);c(s),this._layerTemplateMap.set(i,n);const r=n.getExpressionExecutorsForLayer(i);if(this._expressionsManager.layerExpressionsModelMap.set(i,new L({preserveFieldValuesWhenHidden:n.preserveFieldValuesWhenHidden,executorMap:r})),!this._hasAsyncArcadeExpressions)for(const e of r.keys()){const t=r.get(e);if(this._hasAsyncArcadeExpressions=!0===(t.editableExpression?.isAsync||t.requiredExpression?.isAsync||t.valueExpression?.isAsync||t.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const e of n.elements){if(O(e))continue;const t=e.clone();U(t)&&(t.elements=t.elements.filter(e=>!O(e)));const{elementId:s}=t;a.has(s)?a.get(s).foldIn(t):a.set(s,t)}}if(this.hasTooManyComplexFeatures)throw new i("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new i("too-many-features","There are too many features to load into the form.");const n=new B({elements:Array.from(a.values())});this.sharedFormTemplate=n,this.sharedForm=H(n,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray()),await A(()=>!this.contingentValuesManager.updating)}catch(a){throw u(a)||r.getLogger(this).error("Failed preparing form",a),a}});this._updatingHandles.consumePromise(a.promise),this._prepareTask=a}_updateWorkingFeatures(){this._workingFeatures.destroyAll(),this._reactiveContingentValuesManager.reset();for(const t of this._featureFormMap.values())t.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:e}=this;if(this._reactiveGraphicLookup=new p,0!==e.length){this._workingFeatures.addMany(e.map(C));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&M(t)&&V(t)))return;const a=e.getObjectId();if(null==a)return;const i=this._attachmentCache.get(t),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(i){const e=i.get(a);e&&(r=e)}if(!r){r=await b(t,a,n);o(this._attachmentCache,t,()=>new p).set(a,r)}for(const o of n)o.applyFetchedAttachments(J(o,r))}};e([y()],$.prototype,"_attachmentCache",void 0),e([y({readOnly:!0})],$.prototype,"activeFeature",null),e([y()],$.prototype,"activeFeatureIndex",void 0),e([y({readOnly:!0})],$.prototype,"activeForm",null),e([y({readOnly:!0})],$.prototype,"activeLayer",null),e([y()],$.prototype,"activeAssociationsInput",null),e([y()],$.prototype,"activeRelationshipInput",null),e([y()],$.prototype,"attachmentsEnabled",void 0),e([y()],$.prototype,"callbacks",void 0),e([y()],$.prototype,"disabled",void 0),e([y()],$.prototype,"calculating",null),e([y()],$.prototype,"contingentValuesManager",void 0),e([y()],$.prototype,"editType",void 0),e([y()],$.prototype,"features",void 0),e([y()],$.prototype,"expressionEvaluationFailed",null),e([y()],$.prototype,"hasNonActiveInvalidFeatures",null),e([y()],$.prototype,"hasAsyncArcadeExpressions",null),e([y()],$.prototype,"_hasAsyncArcadeExpressions",void 0),e([y()],$.prototype,"invalidFeatures",null),e([y()],$.prototype,"hasVisibleInputs",null),e([y()],$.prototype,"hasLayersWithContingentValues",null),e([y()],$.prototype,"highlightHelper",void 0),e([y()],$.prototype,"maximumFeatureCount",void 0),e([y()],$.prototype,"maximumFeatureCountWithComplexForms",void 0),e([y()],$.prototype,"visibleInputs",null),e([y()],$.prototype,"map",void 0),e([y()],$.prototype,"noVisibleElementsReason",null),e([y()],$.prototype,"page",null),e([y()],$.prototype,"pageStack",void 0),e([y()],$.prototype,"readOnly",void 0),e([y()],$.prototype,"spatialReference",void 0),e([y()],$.prototype,"submitHasBeenAttempted",void 0),e([y()],$.prototype,"timeZone",void 0),e([y()],$.prototype,"updating",null),e([y()],$.prototype,"valid",null),e([y()],$.prototype,"layers",null),e([y()],$.prototype,"mode",null),e([y()],$.prototype,"sharedForm",void 0),e([y()],$.prototype,"sharedFormTemplate",void 0),e([y()],$.prototype,"selectedAttachment",null),e([y()],$.prototype,"selectedAttachmentAddElementId",null),e([y()],$.prototype,"selectedAttachmentListElementId",null),e([y()],$.prototype,"selectedAttachmentListInput",null),e([y()],$.prototype,"showingSelectedAttachmentReplacePage",null),e([y()],$.prototype,"selectedAttachmentAddInput",null),e([y()],$.prototype,"selectedAttachmentDetails",null),e([y()],$.prototype,"userHasChangedValues",void 0),e([y()],$.prototype,"layerInfos",void 0),e([y()],$.prototype,"_arcadeExecutorProvider",void 0),e([y()],$.prototype,"_activeAssociationsInput",void 0),e([y()],$.prototype,"_activeRelationshipInput",void 0),e([y()],$.prototype,"_prepareTask",void 0),e([y()],$.prototype,"_reactiveGraphicLookup",void 0),e([y()],$.prototype,"_allAttachmentInputs",null),e([y()],$.prototype,"_hasPendingAttachmentHydration",null),e([y()],$.prototype,"_layerTemplateMap",void 0),e([y()],$.prototype,"_workingFeatures",void 0),e([y()],$.prototype,"_expressionsManager",void 0),$=e([_("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],$);const z=$;function K(e){return null!=e&&e.trim().length>0}function q(e,t){const s=e.keywords;return K(s)&&s.toLowerCase()===t}function J(e,t){const s="attachment"===e.input?.type?e.input.attachmentAssociationType:"exact",a=e.attachmentKeyword;if("any"===s)return t;if("exactOrNone"===s){if(W(a))return t.filter(e=>!K(e.keywords));const e=a.toLowerCase();return t.filter(t=>!K(t.keywords)||q(t,e))}if(W(a))return t;const i=a.toLowerCase();return t.filter(e=>q(e,i))}function Q(e,t,s){return e.map(e=>({feature:e.source,changes:[{fieldName:t,value:s}]}))}function X(e,t,s){return e.map(e=>({feature:e.source,changes:[{fieldName:t,value:s.get(e)}]}))}export{z 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 t from"../../core/Accessor.js";import{watch as r,sync as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{watch as r,sync as n}from"../../core/reactiveUtils.js";import{generateUID as i}from"../../core/uid.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{isLayerWithContingentValues as s}from"../support/ContingentValuesManager.js";let l=class extends t{constructor(e){super(e),this._uid=`${i()}`}getAndWatchFieldValueOptions(e){const{feature:t,...i}=e,a=this.manager.getFieldValueOptions({...i,feature:t.plainGraphic}),{layer:o,fieldName:l}=e,u=this._makeHandleId(l);if(t.hasHandles(u)||!s(o))return a;const d=this.manager.getRelatedFields(o,l);if(0===d.size)return a;const p=r(()=>c(t,d),()=>this.manager.resetOptionsForField(o,t.plainGraphic,l),n);return this.addHandles(p),t.addHandles(p,u),a}getViolationTypeForField(e,t){const r=e.layer;if(!s(r))return null;const n=this.manager.getViolationForField(r,e.plainGraphic,t);if(!n)return null;switch(n.type){case"warning":return"contingent-values-validation-error::contingency-violation-warning";case"error":return"contingent-values-validation-error::contingency-violation-error";default:return null}}reset(){this.manager.resetOptions(),this.manager.resetViolations()}validateContingencyConstraints(e,t){const{layer:r}=e;return s(r)?this.manager.validateContingencyConstraints(r,e.plainGraphic,t):[]}validateContingenciesForNonNullFields(e){const{layer:t}=e;s(t)&&this.manager.validateContingenciesForNonNullFields(t,e.plainGraphic)}_makeHandleId(e){return`${this._uid}-${e}`}};function c(e,t){const r=[];for(const n of t)r.push(e.getAttribute(n));return r}e([a()],l.prototype,"manager",void 0),l=e([o("esri.widgets.BatchAttributeForm.ReactiveContingentValuesManager")],l);export{l as ReactiveContingentValuesManager};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NestableAttachmentInputUnion } from "../../form/elements/inputs/attachments/types.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param file - The Blob or File whose duration should be read.
|
|
5
|
+
* @param mediaType - The media element type to create.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export function getMediaDurationInSeconds(file: Blob | File, mediaType: "audio" | "video"): Promise<number | null>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param inputType - The attachment input type to categorize.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export function getAttachmentCategoryForInputType(inputType: NestableAttachmentInputUnion["type"]): "audio" | "document" | "image" | "video";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isBlobProtocol as t}from"../../core/urlUtils.js";import{isString as
|
|
2
|
+
import{isBlobProtocol as t}from"../../core/urlUtils.js";import{isString as e}from"../../support/guards.js";import{isSupportedImage as n}from"../Attachments/support/attachmentUtils.js";function r(t){return String(t.globalId||t.id||t.name)}function o(n,r,o){const{size:u,url:a}=n;if(!e(a)||!a.length)return null;if(t(a))return a;const i=[];return r&&null!=o&&i.push(`w=${o}`),null==u||Number.isNaN(u)||i.push(`s=${u}`),i.length?`${a}${a.includes("?")?"&":"?"}${i.join("&")}`:a}function u(t){return n(t.contentType)}function a(t,e){const{capture:n,recordAudio:r,takePhoto:o,takeVideo:u}=t;return"image"===e?o||n:"video"===e?u||n:"audio"===e&&r||n}async function i(t,e){const n=document.createElement(e),r=URL.createObjectURL(t);return await new Promise(t=>{const e=()=>{n.onloadedmetadata=null,n.onerror=null,n.removeAttribute("src"),n.load(),URL.revokeObjectURL(r)};n.preload="metadata",n.onloadedmetadata=()=>{const r=Number.isFinite(n.duration)?n.duration:null;e(),t(r)},n.onerror=()=>{e(),t(null)},n.src=r})}function c(t){switch(t){case"audio":return"audio";case"document":default:return"document";case"image":case"signature":return"image";case"video":return"video"}}const s={getAttachmentCategoryForInputType:c,getMediaDurationInSeconds:i};export{s as attachmentValidationUtils,c as getAttachmentCategoryForInputType,r as getAttachmentKey,o as getAttachmentUrl,a as getCaptureButtonLabel,i as getMediaDurationInSeconds,u as isImageAttachment};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{isMultipleChoiceFieldInput as n}from"./inputs/support/inputUtils.js";import{getIntlOptionsForField as
|
|
2
|
+
import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{isMultipleChoiceFieldInput as n}from"./inputs/support/inputUtils.js";import{getIntlOptionsForField as o}from"../support/dateUtils.js";import{isEmptyValue as r,getRangeErrorMessage as a,shouldUseScientificNotation as s,scientificNumberFormatOptions as l,numberFormatOptions as c}from"../support/forms/formUtils.js";const u=(e,t)=>null!=e&&e.input?.type===t;function d(e){return new i({source:e})}function p(t,i,r,u){const{dataType:d,minLength:p}=t,f=r?.validationErrors;if(!f||!i)return null;if("batch-attribute-form-validation::features-have-different-errors"===i)return f.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===i)return f.cannotBeNull;if("domain-validation-error::value-out-of-range"===i||"numeric-range-validation-error::out-of-range"===i){const{field:i,range:n}=t,r={type:"date",intlOptions:{timeZone:"date"===i.type&&u?u:void 0,...o(i)}},p=a(n,f);return e(p,n,{format:{max:"date"===d?r:null!=n.max&&s(n.max)?l:c,min:"date"===d?r:null!=n.min&&s(n.min)?l:c}})}return"domain-validation-error::invalid-coded-value"===i?f.invalidCodedValue:"type-validation-error::invalid-type"===i?f.invalidType:"length-validation-error::too-short"===i?e(f.tooShort,{min:p}):"multiple-choice-validation-error::too-few-selected-choices"===i&&n(t)?e(f.tooFewSelectedChoices,{min:t.input.minimumChoices}):"multiple-choice-validation-error::too-many-selected-choices"===i&&n(t)?e(f.tooManySelectedChoices,{max:t.input.maximumChoices}):"length-validation-error::too-long"===i?null:"contingent-values-validation-error::contingency-violation-warning"===i||"contingent-values-validation-error::contingency-violation-error"===i?f.valuesIncompatible:null}function f(e,t,i){const n=i?.validationErrors;if(!n)return null;let o=null;for(const r of e.invalidHiddenInputs)switch(r.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?n.nonVisibleError_changeValues:n.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":o=n.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:r.effectiveVisibilityCode}return o}function m(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function y(e){return!!m(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function h(e){return y(e)&&"queryAttachments"in e}function v(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"subtype-sublayer"===e.type)}function b(e){if(!h(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function g(e,i,n){const o=new Set;let a=!1;for(const t of n){if("attachment"===t.input?.type&&("any"===t.input.attachmentAssociationType||"exactOrNone"===t.input.attachmentAssociationType)){a=!0;break}if(r(t.attachmentKeyword)){a=!0;break}o.add(t.attachmentKeyword)}const s=o.size&&!a?Array.from(o):void 0,l=new t({objectIds:[i],where:"1=1",returnMetadata:!0,keywords:s});e.capabilities?.query?.supportsCacheHint&&(l.cacheHint=!0);return(await e.queryAttachments(l))[i]??[]}function w(e,t,i,n){const o=e.get(t)?.get(i)??[];if(!n?.length)return o;const r=new Set(n.map(e=>e.toLowerCase()));return o.filter(e=>r.has(e.keywords.toLowerCase()))}export{d as createReactiveGraphic,w as getAttachmentsForKeywords,f as getHiddenFieldsValidationErrorMessage,p as getVisibleFieldInputValidationErrorMessage,v as isAssociationsLayerUnion,y as isAttributeFormSupportedLayer,m as isAttributeFormSupportedLayerUnion,h as isAttributeFormSupportedLayerWithAttachments,u as isElementTemplateWithInputType,b as layerSupportsQueryAttachments,g as queryAttachmentsForElements};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,n=`${t}__attachment-element`,i=`${t}__relationship-element-input`,l=`${t}__multiple-choice-input`,m={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${n}-input`,attachmentElementLabel:`${n}-label`,attachmentElementList:`${n}-list`,attachmentElementListItem:`${n}-list-item`,attachmentElementListItemStart:`${n}-list-item-start`,attachmentElementListItemStagedIndicator:`${n}-list-item-staged-indicator`,attachmentElementListItemThumb:`${n}-list-item-thumb`,attachmentElementListItemIcon:`${n}-list-item-icon`,attachmentElementEmptyState:`${n}-empty-state`,attachmentElementAddActions:`${n}-add-actions`,attachmentElementEmptyAction:`${n}-empty-action`,attachmentElementAllPanel:`${n}-all-panel`,attachmentElementAddPanel:`${n}-add-panel`,attachmentElementFileInput:`${n}-file-input`,attachmentElementAddDropzone:`${n}-add-dropzone`,attachmentElementAddDropzoneIcon:`${n}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${n}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${n}-add-dropzone-detail`,attachmentElementCaptureNotice:`${n}-capture-notice`,attachmentElementDetail:`${n}-detail`,attachmentElementDetailPreview:`${n}-detail-preview`,attachmentElementDetailPreviewImage:`${n}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${n}-detail-preview-icon`,attachmentElementDetailActions:`${n}-detail-actions`,attachmentElementDetailMetadata:`${n}-detail-metadata`,attachmentElementDetailMetadataGroup:`${n}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${n}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${n}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${n}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${n}-detail-metadata-value`,relationshipElementInput:`${i}`,relationshipElementInputShowingAll:`${i}_showing-all`,relatedRecordsHeader:`${i}_header`,relatedRecordsDescription:`${i}_description`,relatedRecordsList:`${i}_list`,relatedRecordsListObserver:`${i}_list-observer`,relatedRecordsAddButton:`${i}_add-button`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,block:`${t}__block`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${l}`,multipleChoiceSelectAll:`${l}__select-all`,multipleChoiceOtherChoice:`${l}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${l}__other-choice--with-select-all`};export{m as css};
|
|
2
|
+
const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,n=`${t}__attachment-element`,i=`${t}__relationship-element-input`,l=`${t}__multiple-choice-input`,m={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${n}-input`,attachmentElementLabel:`${n}-label`,attachmentElementList:`${n}-list`,attachmentElementListItem:`${n}-list-item`,attachmentElementListItemStart:`${n}-list-item-start`,attachmentElementListItemStagedIndicator:`${n}-list-item-staged-indicator`,attachmentElementListItemThumb:`${n}-list-item-thumb`,attachmentElementListItemIcon:`${n}-list-item-icon`,attachmentElementEmptyState:`${n}-empty-state`,attachmentElementAddActions:`${n}-add-actions`,attachmentElementEmptyAction:`${n}-empty-action`,attachmentElementEmptyActionHint:`${n}-empty-action-hint`,attachmentElementEmptyActionHintValue:`${n}-empty-action-hint-value`,attachmentElementAllPanel:`${n}-all-panel`,attachmentElementAddPanel:`${n}-add-panel`,attachmentElementFileInput:`${n}-file-input`,attachmentElementAddDropzone:`${n}-add-dropzone`,attachmentElementAddDropzoneIcon:`${n}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${n}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${n}-add-dropzone-detail`,attachmentElementCaptureNotice:`${n}-capture-notice`,attachmentElementValidationCriteria:`${n}-validation-criteria`,attachmentElementDetail:`${n}-detail`,attachmentElementDetailPreview:`${n}-detail-preview`,attachmentElementDetailPreviewImage:`${n}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${n}-detail-preview-icon`,attachmentElementDetailActions:`${n}-detail-actions`,attachmentElementDetailMetadata:`${n}-detail-metadata`,attachmentElementDetailMetadataGroup:`${n}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${n}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${n}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${n}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${n}-detail-metadata-value`,relationshipElementInput:`${i}`,relationshipElementInputShowingAll:`${i}_showing-all`,relatedRecordsHeader:`${i}_header`,relatedRecordsDescription:`${i}_description`,relatedRecordsList:`${i}_list`,relatedRecordsListObserver:`${i}_list-observer`,relatedRecordsAddButton:`${i}_add-button`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,block:`${t}__block`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${l}`,multipleChoiceSelectAll:`${l}__select-all`,multipleChoiceOtherChoice:`${l}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${l}__other-choice--with-select-all`};export{m as css};
|
|
@@ -6,6 +6,8 @@ import type { AttachmentInputUnion } from "../../../form/elements/inputs/attachm
|
|
|
6
6
|
import type { AttributeFormSupportedLayerUnion, PendingAttachmentEdits } from "../types.js";
|
|
7
7
|
import type { ArcadeBatchFormCalculationContextInfo } from "../expressions/types.js";
|
|
8
8
|
import type { EditableInputProperties } from "./EditableInput.js";
|
|
9
|
+
import type { AttachmentEditState } from "./types.js";
|
|
10
|
+
import type { AttachmentValidationCriterionKey, AttachmentValidationCriterionState } from "./support/attachmentValidationCriteriaState.js";
|
|
9
11
|
|
|
10
12
|
/** @since 5.1 */
|
|
11
13
|
export interface AttachmentElementInputProperties extends EditableInputProperties, Partial<Pick<AttachmentElementInput, "attachments" | "displayCount">> {}
|
|
@@ -109,18 +111,18 @@ export default class AttachmentElementInput extends EditableInput<any> {
|
|
|
109
111
|
* @returns The current staged edit state for the provided attachment.
|
|
110
112
|
* @internal
|
|
111
113
|
*/
|
|
112
|
-
getAttachmentEditState(attachment: AttachmentInfo):
|
|
113
|
-
initialName: string | null;
|
|
114
|
-
isDeleted: boolean;
|
|
115
|
-
isRenamed: boolean;
|
|
116
|
-
isReplaced: boolean;
|
|
117
|
-
};
|
|
114
|
+
getAttachmentEditState(attachment: AttachmentInfo): AttachmentEditState;
|
|
118
115
|
/**
|
|
119
116
|
* @param attachment - Attachment whose preview URL should be resolved.
|
|
120
117
|
* @param thumbnailSize - Optional thumbnail width to request for committed service-backed attachments.
|
|
121
118
|
* @internal
|
|
122
119
|
*/
|
|
123
120
|
getAttachmentPreviewUrl(attachment: AttachmentInfo, thumbnailSize?: number): string | null;
|
|
121
|
+
/**
|
|
122
|
+
* @param key - The validation criterion key to read.
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
getValidationCriterionState(key: AttachmentValidationCriterionKey): AttachmentValidationCriterionState | null;
|
|
124
126
|
/**
|
|
125
127
|
* @param file - File to validate against the configured attachment input types.
|
|
126
128
|
* @internal
|
|
@@ -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"../../../request.js";import a from"../../../core/Collection.js";import n from"../../../core/Logger.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import r from"../../../core/ReactiveSet.js";import{generateBracedUUID as o}from"../../../core/uuid.js";import{property as d,subclass as l}from"../../../core/accessorSupport/decorators.js";import{getEffectiveLayerCapabilities as p}from"../../../layers/support/layerUtils.js";import h from"../../../rest/query/support/AttachmentInfo.js";import{getAttachmentTypeCategory as c}from"../../Attachments/support/attachmentUtils.js";import{getAttachmentUrl as m}from"../attachmentUtils.js";import{isAttributeFormSupportedLayer as u}from"../batchAttributeFormUtils.js";import g from"./EditableInput.js";import y from"./SingleFeatureInputAdapter.js";let f=-1,_=class extends g{constructor(t){super(t),this.attachments=[],this.displayCount=3,this.group=null,this.single=new y({input:this}),this.type="attachment",this._initialAttachments=[],this._stagedAdds=new a,this._stagedDeletes=new r,this._stagedUpdates=new i,this._failedStagedUpdateHydrations=new r,this._pendingStagedUpdateHydrations=new i,this._temporaryAttachmentUrls=new i}get allowUserRename(){return this.template.allowUserRename}get addDisabled(){const t=this.maxAttachmentCount;return null!=t&&this.attachments.length>=t}get accept(){const{categories:t}=this;if(!t.size)return;const e=[];return t.has("image")&&e.push("image/*"),t.has("audio")&&e.push("audio/*"),t.has("video")&&e.push("video/*"),t.has("document")&&e.push("text/*","application/*","model/*"),e.length>0?e.join(","):void 0}get categories(){const{input:t}=this,e=new Set;if(!t)return e;if("attachment"===t.type){const{inputTypes:a}=t;if(!a||0===a.length)return e;for(const t of a)U(e,t.type);return e}return U(e,t.type),e}get captureDisabled(){const{input:t}=this;if(!t)return!1;if("attachment"===t.type){const{inputTypes:e}=t;return!!e?.length&&e.every(v)}return v(t)}get captureMediaType(){const{input:t}=this;if(!t)return null;const e=new Set,a=b(t);if(!a?.length)return null;for(const n of a)if(S(n))switch(n.type){case"audio":e.add("audio");break;case"video":e.add("video");break;case"image":case"signature":e.add("image")}return 1===e.size?Array.from(e)[0]:null}get canUploadFiles(){const{input:t}=this;if(!t)return!0;if("attachment"===t.type){const{inputTypes:e}=t;return!e?.length||e.some(I)}return I(t)}get hasCaptureInputs(){const{input:t}=this;return!!t&&("attachment"===t.type?!!t.inputTypes?.some(S):S(t))}get attachmentKeyword(){return this.template.attachmentKeyword?.trim()}get displayFilename(){return this.template.displayFilename}get allAttachmentsVisibleOnDefaultPage(){return this.defaultPageAttachments.length===this.attachments.length}get defaultPageAttachments(){return this.attachments.slice(0,this.displayCount)}get feature(){return this.single.feature}get hasAttachmentChanges(){return this._stagedAdds.length>0||this._stagedUpdates.size>0||this._stagedDeletes.size>0}get hasPendingAttachmentUpdateData(){return this._pendingStagedUpdateHydrations.size>0}get input(){return this.template.input}get layer(){return this.single.layer}get maxAttachmentCount(){return this.template.maxAttachmentCount}get minAttachmentCount(){return this.template.minAttachmentCount}get supportsResize(){const{layer:t}=this;if(!t)return!1;const e=p(t);return!!e&&("attachment"in e&&!!e.attachment?.supportsResize)}get useOriginalFilename(){return this.template.useOriginalFilename}get valid(){const t=this.attachments.length,e=this.minAttachmentCount??-1/0,a=this.maxAttachmentCount??1/0,n=this.hasAttachmentChanges;return!(this._failedStagedUpdateHydrations.size>0)&&(!(t<e||t>a)||!n)}get _expressionLayer(){const t=this.layer;if(t)return"scene"===t.type&&"associatedLayer"in t&&null!=t.associatedLayer?t.associatedLayer:"feature"===t.type?t:void 0}destroy(){this._clearTemporaryAttachmentUrls()}applyFetchedAttachments(t){for(const e of t)this._normalizeAttachmentName(e);this._initialAttachments=t,this._failedStagedUpdateHydrations.clear(),this._recomputeAttachments()}clearAttachmentChanges(){this._clearTemporaryAttachmentUrls(),this._stagedAdds.removeAll(),this._stagedUpdates.clear(),this._stagedDeletes.clear(),this._failedStagedUpdateHydrations.clear(),this._pendingStagedUpdateHydrations.clear(),this._recomputeAttachments()}stageAddAttachment(t){const{contentType:e,data:a,name:n}=t,s=t.globalId??o(),i=a instanceof Blob?a.size:void 0,r=n.trim(),d=new h({contentType:e??void 0,globalId:s,id:f--,keywords:this.attachmentKeyword??void 0,name:r,size:i});return this._setTemporaryAttachmentUrl(s,a),this._stagedAdds.add({globalId:s,info:d,data:a}),this._recomputeAttachments(),d}async stageAddAttachments(t,e){const a=t.filter(t=>this.isFileAllowed(t));if(0===a.length)return[];const n=[],s=new Map,i=Date.now();for(let r=0;r<a.length;r++){const t=a[r],o=t instanceof File?t.name:`attachment-${i}_${r+1}`,d=await this._computeAttachmentFilename(o,e),l=this._makeUniqueFilenameForOperation(s,d);n.push(this.stageAddAttachment({contentType:t.type,data:t,name:l}))}return n}findAttachment(t){if(t)return this.attachments.find(e=>e.globalId===t)}getAttachmentEditState(t){const e=t.globalId,a=e?this._getInitialAttachment(e):void 0,n=a?.name??null,s=e?this._stagedUpdates.get(e):void 0,i=s?.name??t.name??null;return{initialName:n,isDeleted:!!e&&this._stagedDeletes.has(e),isRenamed:null!=i&&null!=n&&i!==n,isReplaced:!!s?.data}}getAttachmentPreviewUrl(t,e){return(t.globalId?this._temporaryAttachmentUrls.get(t.globalId):void 0)??m(t,this.supportsResize,e)}async ensureStagedUpdateData(t){const e=t.globalId;if(!e)return!1;const a=this._stagedUpdates.get(e);if(!a||a.data||this._stagedDeletes.has(e))return this._failedStagedUpdateHydrations.delete(e),!1;const n=this._pendingStagedUpdateHydrations.get(e);if(n)return await n;const s=this._hydrateStagedUpdateData(t);this._pendingStagedUpdateHydrations.set(e,s);try{return await s}finally{this._pendingStagedUpdateHydrations.get(e)===s&&this._pendingStagedUpdateHydrations.delete(e)}}async waitForPendingAttachmentUpdateData(){await Promise.allSettled(Array.from(this._pendingStagedUpdateHydrations.values()))}discardStagedEdits(t){const e=t.globalId;if(!e)return;const a=this._stagedAdds.findIndex(t=>t.globalId===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedDeletes.delete(e),this._stagedUpdates.delete(e),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),this._recomputeAttachments()}isFileAllowed(t){if(!t.type)return!0;const{categories:e}=this;return!e.size||e.has(c(t.type))}isStagedAttachmentAddition(t){return"number"==typeof t.id&&t.id<0}stageDeleteAttachment(t){const e=t.globalId;if(!e)return;const a=this._stagedAdds.findIndex(t=>t.globalId===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedUpdates.delete(e),this._stagedDeletes.add(e),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),this._recomputeAttachments()}stageRenameAttachment(t,e){const a=t.globalId;if(!a)return;const n=this._stagedAdds.find(t=>t.globalId===a);if(n)return n.info.name=e,void this._recomputeAttachments();const s=this._stagedUpdates.get(a),i=this._getInitialAttachment(a)?.name??null,r=null!=i&&e===i;if(r&&null==s?.data&&null==s?.contentType&&null==s?.size)return this._stagedUpdates.delete(a),this._failedStagedUpdateHydrations.delete(a),this._pendingStagedUpdateHydrations.delete(a),void this._recomputeAttachments();const o={...s,info:t};r?delete o.name:o.name=e,this._stagedUpdates.set(a,o),this._recomputeAttachments(),this.ensureStagedUpdateData(t)}async stageReplaceAttachment(t,e,a){if(!this.isFileAllowed(e))return!1;const n=e instanceof File?e.name:t.name,s=await this._computeAttachmentFilename(n,a);return this._stageReplaceAttachment(t,e,s),!0}toSubmitEdits(){const t=[],e=[],a=Array.from(this._stagedDeletes);if(0===this._stagedAdds.length&&0===this._stagedUpdates.size&&0===a.length)return null;const s=this._featureIdentifier;if(!s)return n.getLogger(this).error("Unable to build attachment edits without a valid feature and layer."),null;for(const n of this._stagedAdds)t.push({feature:s,attachment:{globalId:n.globalId,contentType:n.info.contentType,data:n.data,name:n.info.name}});for(const[n,i]of this._stagedUpdates)this._canSubmitStagedUpdate(i)&&e.push({feature:s,attachment:{globalId:n,contentType:i.contentType,data:i.data,name:i.name}});return 0===t.length&&0===e.length&&0===a.length?null:{label:this.template.label,attachmentKeyword:this.attachmentKeyword,add:t,delete:a,update:e}}_recomputeAttachments(){const t=this._stagedDeletes,e=[];for(const a of this._stagedAdds)e.push(a.info);for(const a of this._initialAttachments){const n=a.globalId;if(!n||!t.has(n)){if(n&&this._stagedUpdates.has(n)){const t=this._stagedUpdates.get(n),s=a.clone();null!=t.name&&(s.name=t.name),null!=t.contentType&&(s.contentType=t.contentType),null!=t.size&&(s.size=t.size),e.push(s);continue}e.push(a)}}this.attachments=e}get _featureIdentifier(){const t=this.single.feature,e=this.layer;if(!t||!u(e))return null;const a=e.objectIdField,n="globalIdField"in e?e.globalIdField:null,s=t.getGlobalId()??(n?t.getAttribute(n):void 0);if(s)return{globalId:s};const i=t.getObjectId()??t.getAttribute(a),r=Number(i);return null==i||isNaN(r)?null:{objectId:r}}async _computeAttachmentFilename(t,e){const a=this.template.filenameExpressionExecutor;if(!a)return t;const i=this.single.feature,r=i?.plainGraphic,o=this._expressionLayer,d={$originalfeature:i?.original,$editcontext:{editType:e.editType},$layer:o,$featureset:o,$datastore:o?.url,$feature:r,$map:e.map},l={rawOutput:!0,spatialReference:e.spatialReference,timeZone:e.timeZone};try{const t=a.isAsync?await a.executeAsync(d,l):a.execute(d,l);if("string"==typeof t&&t.trim().length>0)return t.trim()}catch(p){s(p)||n.getLogger(this).error("Failed evaluating attachment filename expression",p)}return t}_makeUniqueFilenameForOperation(t,e){const a=e.toLowerCase(),n=t.get(a)??0;if(t.set(a,n+1),0===n)return e;const s=e.lastIndexOf(".");return`${s>0?e.slice(0,s):e}_${n}${s>0?e.slice(s):""}`}_stageReplaceAttachment(t,e,a){const n=t.globalId;if(!n)return;const s=this._stagedAdds.find(t=>t.globalId===n);if(s)return s.data=e,s.info.name=a,s.info.contentType=e.type,s.info.size=e.size,this._setTemporaryAttachmentUrl(n,e),void this._recomputeAttachments();const i=this._stagedUpdates.get(n);this._setTemporaryAttachmentUrl(n,e),this._failedStagedUpdateHydrations.delete(n),this._pendingStagedUpdateHydrations.delete(n),this._stagedUpdates.set(n,{...i,info:t,contentType:e.type||i?.contentType||t.contentType,data:e,name:a,size:e.size}),this._recomputeAttachments()}_getInitialAttachment(t){return this._initialAttachments.find(e=>e.globalId===t)}_canSubmitStagedUpdate(t){return null!=t.data}_normalizeAttachmentName(t){const{name:e}=t;"string"==typeof e&&(t.name=e.trim())}async _hydrateStagedUpdateData(t){const a=t.globalId,i=t.url;if(!a||!i)return!1;try{const{data:n}=await e(i,{responseType:"blob"});this._failedStagedUpdateHydrations.delete(a);const s=this._stagedUpdates.get(a);return!(!s||s.data||this._stagedDeletes.has(a))&&(this._stagedUpdates.set(a,{...s,info:t,contentType:s.contentType??t.contentType??n.type,data:n}),!0)}catch(r){const t=this._stagedUpdates.get(a);return!t||t.data||this._stagedDeletes.has(a)||this._failedStagedUpdateHydrations.add(a),s(r)||n.getLogger(this).error("Failed to fetch attachment data for staged update",r),!1}}_setTemporaryAttachmentUrl(t,e){if(this._clearTemporaryAttachmentUrl(t),!(e instanceof Blob))return;const a=URL.createObjectURL(e);return this._temporaryAttachmentUrls.set(t,a),a}_clearTemporaryAttachmentUrl(t){const e=this._temporaryAttachmentUrls.get(t);e&&(URL.revokeObjectURL(e),this._temporaryAttachmentUrls.delete(t))}_clearTemporaryAttachmentUrls(){for(const t of this._temporaryAttachmentUrls.values())URL.revokeObjectURL(t);this._temporaryAttachmentUrls.clear()}};t([d()],_.prototype,"allowUserRename",null),t([d()],_.prototype,"addDisabled",null),t([d()],_.prototype,"accept",null),t([d()],_.prototype,"categories",null),t([d()],_.prototype,"captureDisabled",null),t([d()],_.prototype,"captureMediaType",null),t([d()],_.prototype,"canUploadFiles",null),t([d()],_.prototype,"hasCaptureInputs",null),t([d()],_.prototype,"attachmentKeyword",null),t([d()],_.prototype,"attachments",void 0),t([d()],_.prototype,"displayFilename",null),t([d({readOnly:!0})],_.prototype,"allAttachmentsVisibleOnDefaultPage",null),t([d({readOnly:!0})],_.prototype,"defaultPageAttachments",null),t([d()],_.prototype,"displayCount",void 0),t([d()],_.prototype,"feature",null),t([d()],_.prototype,"group",void 0),t([d({readOnly:!0})],_.prototype,"hasAttachmentChanges",null),t([d({readOnly:!0})],_.prototype,"hasPendingAttachmentUpdateData",null),t([d()],_.prototype,"input",null),t([d()],_.prototype,"layer",null),t([d()],_.prototype,"maxAttachmentCount",null),t([d()],_.prototype,"minAttachmentCount",null),t([d({readOnly:!0})],_.prototype,"single",void 0),t([d({readOnly:!0})],_.prototype,"type",void 0),t([d({readOnly:!0})],_.prototype,"supportsResize",null),t([d()],_.prototype,"useOriginalFilename",null),t([d({readOnly:!0})],_.prototype,"valid",null),t([d()],_.prototype,"_initialAttachments",void 0),t([d()],_.prototype,"_expressionLayer",null),t([d()],_.prototype,"_stagedAdds",void 0),t([d()],_.prototype,"_stagedDeletes",void 0),t([d()],_.prototype,"_stagedUpdates",void 0),t([d()],_.prototype,"_failedStagedUpdateHydrations",void 0),t([d()],_.prototype,"_pendingStagedUpdateHydrations",void 0),t([d()],_.prototype,"_temporaryAttachmentUrls",void 0),t([d()],_.prototype,"_featureIdentifier",null),_=t([l("esri.widgets.BatchAttributeForm.inputs.AttachmentElementInput")],_);const A=_;function U(t,e){switch(e){case"audio":t.add("audio");break;case"document":t.add("document");break;case"image":case"signature":t.add("image");break;case"video":t.add("video")}}function b(t){return"attachment"===t.type?t.inputTypes:[t]}function v(t){return"document"!==t.type&&"capture"===t.inputMethod}function S(t){return v(t)}function I(t){return"document"===t.type||"capture"!==t.inputMethod}export{A as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../request.js";import a from"../../../core/Collection.js";import n from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import s from"../../../core/ReactiveMap.js";import r from"../../../core/ReactiveSet.js";import{generateBracedUUID as o}from"../../../core/uuid.js";import{property as d,subclass as l}from"../../../core/accessorSupport/decorators.js";import{getEffectiveLayerCapabilities as h}from"../../../layers/support/layerUtils.js";import c from"../../../rest/query/support/AttachmentInfo.js";import{getAttachmentTypeCategory as p}from"../../Attachments/support/attachmentUtils.js";import{getAttachmentUrl as m,attachmentValidationUtils as u}from"../attachmentUtils.js";import{isAttributeFormSupportedLayer as g}from"../batchAttributeFormUtils.js";import y from"./EditableInput.js";import f from"./SingleFeatureInputAdapter.js";let _=-1;const A=["maximum-audio-length","maximum-file-size","minimum-number-of-files","maximum-number-of-files","maximum-video-length"];let U=class extends y{constructor(t){super(t),this.attachments=[],this.displayCount=3,this.group=null,this.single=new f({input:this}),this.type="attachment",this._initialAttachments=[],this._stagedAdds=new a,this._stagedDeletes=new r,this._stagedUpdates=new s,this._failedStagedUpdateHydrations=new r,this._pendingStagedUpdateHydrations=new s,this._temporaryAttachmentUrls=new s,this._validationCriterionStates=new s,this._hasUnsupportedFileTypeValidationError=!1}get allowUserRename(){return this.template.allowUserRename}get addDisabled(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e>=t}get effectiveAttachmentCount(){return this._initialAttachments.length-this._stagedDeletes.size+this._stagedAdds.length}get accept(){const{categories:t}=this;if(!t.size)return;const e=[];return t.has("image")&&e.push("image/*"),t.has("audio")&&e.push("audio/*"),t.has("video")&&e.push("video/*"),t.has("document")&&e.push("text/*","application/*","model/*"),e.length>0?e.join(","):void 0}get categories(){const t=new Set;for(const e of this._nestableInputs)v(t,e.type);return t}get _nestableInputs(){const{input:t}=this;return null==t?[]:"attachment"===t.type?t.inputTypes??[]:[t]}get attachmentKeyword(){return this.template.attachmentKeyword?.trim()}get displayFilename(){return this.template.displayFilename}get allAttachmentsVisibleOnDefaultPage(){return this.defaultPageAttachments.length===this.attachments.length}get canUploadFiles(){const t=this._nestableInputs;return!t.length||t.some(I)}get hasCaptureInputs(){return this._nestableInputs.some(C)}get captureMediaType(){const t=new Set;for(const e of this._nestableInputs)if(C(e))switch(e.type){case"audio":t.add("audio");break;case"video":t.add("video");break;case"image":case"signature":t.add("image")}return 1===t.size?Array.from(t)[0]:null}get isCaptureOnly(){const t=this._nestableInputs;return!!t.length&&t.every(S)}get defaultPageAttachments(){return this.attachments.slice(0,this.displayCount)}get feature(){return this.single.feature}get hasAttachmentChanges(){return this._stagedAdds.length>0||this._stagedUpdates.size>0||this._stagedDeletes.size>0}get attachmentCount(){return this.attachments.length}get hasMinimumAttachmentCountNotMet(){const t=this.minAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e<t}get hasReachedAttachmentLimit(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e===t}get hasExceededAttachmentLimit(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e>t}get hasPendingAttachmentUpdateData(){return this._pendingStagedUpdateHydrations.size>0}get input(){return this.template.input}get layer(){return this.single.layer}get maxAttachmentCount(){return this.template.maxAttachmentCount}get minAttachmentCount(){return this.template.minAttachmentCount}get supportsResize(){const{layer:t}=this;if(!t)return!1;const e=h(t);return!!e&&("attachment"in e&&!!e.attachment?.supportsResize)}get useOriginalFilename(){return this.template.useOriginalFilename}get valid(){const t=this.effectiveAttachmentCount,e=this.minAttachmentCount??-1/0,a=this.maxAttachmentCount??1/0,n=this.hasAttachmentChanges;return!(this._failedStagedUpdateHydrations.size>0)&&(!(t<e||t>a)||!n)}get _expressionLayer(){const t=this.layer;if(t)return"scene"===t.type&&"associatedLayer"in t&&null!=t.associatedLayer?t.associatedLayer:"feature"===t.type?t:void 0}destroy(){this._clearTemporaryAttachmentUrls()}applyFetchedAttachments(t){for(const e of t)this._normalizeAttachmentName(e);this._initialAttachments=t,this._failedStagedUpdateHydrations.clear(),this._recomputeAttachments()}clearAttachmentChanges(){this.clearValidationCriteriaState(),this._clearTemporaryAttachmentUrls(),this._stagedAdds.removeAll(),this._stagedUpdates.clear(),this._stagedDeletes.clear(),this._failedStagedUpdateHydrations.clear(),this._pendingStagedUpdateHydrations.clear(),this._recomputeAttachments()}clearValidationCriteriaState(){this._validationCriterionStates.clear(),this._hasUnsupportedFileTypeValidationError=!1}get hasInvalidValidationCriteria(){for(const t of this._validationCriterionStates.values())if("danger"===t)return!0;return!1}hasUnsupportedFileTypeValidationError(){return this._hasUnsupportedFileTypeValidationError}getValidationCriterionState(t){return this._validationCriterionStates.get(t)??null}stageAddAttachment(t){const{contentType:e,data:a,name:n}=t,i=t.globalId??o(),s=a instanceof Blob?a.size:void 0,r=n.trim(),d=new c({contentType:e??void 0,globalId:i,id:_--,keywords:this.attachmentKeyword??void 0,name:r,size:s});return this._setTemporaryAttachmentUrl(i,a),this._stagedAdds.add({globalId:i,info:d,data:a}),this._recomputeAttachments(),d}async stageAddAttachments(t,e){this.clearValidationCriteriaState();const a=t.filter(t=>this.isFileAllowed(t));if(this._hasUnsupportedFileTypeValidationError=a.length!==t.length,0===a.length)return[];const n=[],i=new Map,s=Date.now(),r={},o=this.attachmentCount,d=o+a.length;null!=this.minAttachmentCount&&this.minAttachmentCount>0&&this._setValidationCriterionState(r,"minimum-number-of-files",d>=this.minAttachmentCount?"success":"danger");for(let l=0;l<a.length;l++){const t=a[l];if(!await this._validateAttachmentFile(t,o+n.length+1,r))continue;const d=t instanceof File?t.name:`attachment-${s}_${l+1}`,h=await this._computeAttachmentFilename(d,e),c=this._makeUniqueFilenameForOperation(i,h);n.push(this.stageAddAttachment({contentType:t.type,data:t,name:c}))}return this._setValidationCriteriaState(r),n}findAttachment(t){if(t)return this.attachments.find(e=>e.globalId===t)}getAttachmentEditState(t){const e=t.globalId,a=e?this._getInitialAttachment(e):void 0,n=a?.name??null,i=e?this._stagedUpdates.get(e):void 0,s=i?.name??t.name??null;return{initialName:n,isDeleted:!!e&&this._stagedDeletes.has(e),isRenamed:null!=s&&null!=n&&s!==n,isReplaced:!!i?.data}}getAttachmentPreviewUrl(t,e){return(t.globalId?this._temporaryAttachmentUrls.get(t.globalId):void 0)??m(t,this.supportsResize,e)}async ensureStagedUpdateData(t){const e=t.globalId;if(!e)return!1;const a=this._stagedUpdates.get(e);if(!a||a.data||this._stagedDeletes.has(e))return this._failedStagedUpdateHydrations.delete(e),!1;const n=this._pendingStagedUpdateHydrations.get(e);if(n)return await n;const i=this._hydrateStagedUpdateData(t);this._pendingStagedUpdateHydrations.set(e,i);try{return await i}finally{this._pendingStagedUpdateHydrations.get(e)===i&&this._pendingStagedUpdateHydrations.delete(e)}}async waitForPendingAttachmentUpdateData(){await Promise.allSettled(Array.from(this._pendingStagedUpdateHydrations.values()))}discardStagedEdits(t){const e=t.globalId;if(!e)return;const a=this._stagedAdds.findIndex(t=>t.globalId===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedDeletes.delete(e),this._stagedUpdates.delete(e),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),this._recomputeAttachments()}isFileAllowed(t){if(!t.type)return!0;const{categories:e}=this;return!e.size||e.has(p(t.type))}isStagedAttachmentAddition(t){return"number"==typeof t.id&&t.id<0}stageDeleteAttachment(t){const e=t.globalId;if(!e)return;const a=this._stagedAdds.findIndex(t=>t.globalId===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedUpdates.delete(e),this._stagedDeletes.add(e),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),this._recomputeAttachments()}stageRenameAttachment(t,e){const a=t.globalId;if(!a)return;const n=this._stagedAdds.find(t=>t.globalId===a);if(n)return n.info.name=e,void this._recomputeAttachments();const i=this._stagedUpdates.get(a),s=this._getInitialAttachment(a)?.name??null,r=null!=s&&e===s;if(r&&null==i?.data&&null==i?.contentType&&null==i?.size)return this._stagedUpdates.delete(a),this._failedStagedUpdateHydrations.delete(a),this._pendingStagedUpdateHydrations.delete(a),void this._recomputeAttachments();const o={...i,info:t};r?delete o.name:o.name=e,this._stagedUpdates.set(a,o),this._recomputeAttachments(),this.ensureStagedUpdateData(t)}async stageReplaceAttachment(t,e,a){if(this.clearValidationCriteriaState(),!this.isFileAllowed(e))return this._hasUnsupportedFileTypeValidationError=!0,!1;const n={},i=await this._validateAttachmentFile(e,void 0,n);if(this._setValidationCriteriaState(n),!i)return!1;const s=e instanceof File?e.name:t.name,r=await this._computeAttachmentFilename(s,a);return this._stageReplaceAttachment(t,e,r),!0}toSubmitEdits(){const t=[],e=[],a=Array.from(this._stagedDeletes);if(0===this._stagedAdds.length&&0===this._stagedUpdates.size&&0===a.length)return null;const i=this._featureIdentifier;if(!i)return n.getLogger(this).error("Unable to build attachment edits without a valid feature and layer."),null;for(const n of this._stagedAdds)t.push({feature:i,attachment:{globalId:n.globalId,contentType:n.info.contentType,data:n.data,name:n.info.name}});for(const[n,s]of this._stagedUpdates)this._canSubmitStagedUpdate(s)&&e.push({feature:i,attachment:{globalId:n,contentType:s.contentType,data:s.data,name:s.name}});return 0===t.length&&0===e.length&&0===a.length?null:{label:this.template.label,attachmentKeyword:this.attachmentKeyword,add:t,delete:a,update:e}}_recomputeAttachments(){const t=[];for(const e of this._stagedAdds)t.push(e.info);for(const e of this._initialAttachments){const a=e.globalId;if(a&&this._stagedUpdates.has(a)){const n=this._stagedUpdates.get(a),i=e.clone();null!=n.name&&(i.name=n.name),null!=n.contentType&&(i.contentType=n.contentType),null!=n.size&&(i.size=n.size),t.push(i);continue}t.push(e)}this.attachments=t}get _featureIdentifier(){const t=this.single.feature,e=this.layer;if(!t||!g(e))return null;const a=e.objectIdField,n="globalIdField"in e?e.globalIdField:null,i=t.getGlobalId()??(n?t.getAttribute(n):void 0);if(i)return{globalId:i};const s=t.getObjectId()??t.getAttribute(a),r=Number(s);return null==s||isNaN(r)?null:{objectId:r}}async _computeAttachmentFilename(t,e){const a=this.template.filenameExpressionExecutor;if(!a)return t;const s=this.single.feature,r=s?.plainGraphic,o=this._expressionLayer,d={$originalfeature:s?.original,$editcontext:{editType:e.editType},$layer:o,$featureset:o,$datastore:o?.url,$feature:r,$map:e.map},l={rawOutput:!0,spatialReference:e.spatialReference,timeZone:e.timeZone};try{const t=a.isAsync?await a.executeAsync(d,l):a.execute(d,l);if("string"==typeof t&&t.trim().length>0)return t.trim()}catch(h){i(h)||n.getLogger(this).error("Failed evaluating attachment filename expression",h)}return t}_setValidationCriteriaState(t){this._validationCriterionStates.clear();for(const e of A){const a=t[e];a&&this._validationCriterionStates.set(e,a)}}_setValidationCriterionState(t,e,a){"danger"!==t[e]&&(t[e]=a)}async _validateAttachmentFile(t,e,a){let n=!0;const i=t.type?p(t.type):null;for(const s of this._nestableInputs){const e=u.getAttachmentCategoryForInputType(s.type);if(null==i||e===i){if("document"===s.type&&null!=s.maxFileSize){const e=t.size<=1048576*s.maxFileSize;this._setValidationCriterionState(a,"maximum-file-size",e?"success":"danger"),n=n&&e}if(("audio"===s.type||"video"===s.type)&&null!=s.maxDuration){const e=await u.getMediaDurationInSeconds(t,s.type);if(null!=e){const t=e<=s.maxDuration;this._setValidationCriterionState(a,"audio"===s.type?"maximum-audio-length":"maximum-video-length",t?"success":"danger"),n=n&&t}}}}if(null!=e&&null!=this.maxAttachmentCount){const t=e<=this.maxAttachmentCount;this._setValidationCriterionState(a,"maximum-number-of-files",t?"success":"danger"),n=n&&t}return n}_makeUniqueFilenameForOperation(t,e){const a=e.toLowerCase(),n=t.get(a)??0;if(t.set(a,n+1),0===n)return e;const i=e.lastIndexOf(".");return`${i>0?e.slice(0,i):e}_${n}${i>0?e.slice(i):""}`}_stageReplaceAttachment(t,e,a){const n=t.globalId;if(!n)return;const i=this._stagedAdds.find(t=>t.globalId===n);if(i)return i.data=e,i.info.name=a,i.info.contentType=e.type,i.info.size=e.size,this._setTemporaryAttachmentUrl(n,e),void this._recomputeAttachments();const s=this._stagedUpdates.get(n);this._setTemporaryAttachmentUrl(n,e),this._failedStagedUpdateHydrations.delete(n),this._pendingStagedUpdateHydrations.delete(n),this._stagedUpdates.set(n,{...s,info:t,contentType:e.type||s?.contentType||t.contentType,data:e,name:a,size:e.size}),this._recomputeAttachments()}_getInitialAttachment(t){return this._initialAttachments.find(e=>e.globalId===t)}_canSubmitStagedUpdate(t){return null!=t.data}_normalizeAttachmentName(t){const{name:e}=t;"string"==typeof e&&(t.name=e.trim())}async _hydrateStagedUpdateData(t){const a=t.globalId,s=t.url;if(!a||!s)return!1;try{const{data:n}=await e(s,{responseType:"blob"});this._failedStagedUpdateHydrations.delete(a);const i=this._stagedUpdates.get(a);return!(!i||i.data||this._stagedDeletes.has(a))&&(this._stagedUpdates.set(a,{...i,info:t,contentType:i.contentType??t.contentType??n.type,data:n}),!0)}catch(r){const t=this._stagedUpdates.get(a);return!t||t.data||this._stagedDeletes.has(a)||this._failedStagedUpdateHydrations.add(a),i(r)||n.getLogger(this).error("Failed to fetch attachment data for staged update",r),!1}}_setTemporaryAttachmentUrl(t,e){if(this._clearTemporaryAttachmentUrl(t),!(e instanceof Blob))return;const a=URL.createObjectURL(e);return this._temporaryAttachmentUrls.set(t,a),a}_clearTemporaryAttachmentUrl(t){const e=this._temporaryAttachmentUrls.get(t);e&&(URL.revokeObjectURL(e),this._temporaryAttachmentUrls.delete(t))}_clearTemporaryAttachmentUrls(){for(const t of this._temporaryAttachmentUrls.values())URL.revokeObjectURL(t);this._temporaryAttachmentUrls.clear()}};t([d()],U.prototype,"allowUserRename",null),t([d()],U.prototype,"addDisabled",null),t([d()],U.prototype,"effectiveAttachmentCount",null),t([d()],U.prototype,"accept",null),t([d()],U.prototype,"categories",null),t([d()],U.prototype,"attachmentKeyword",null),t([d()],U.prototype,"attachments",void 0),t([d()],U.prototype,"displayFilename",null),t([d({readOnly:!0})],U.prototype,"allAttachmentsVisibleOnDefaultPage",null),t([d()],U.prototype,"canUploadFiles",null),t([d()],U.prototype,"hasCaptureInputs",null),t([d()],U.prototype,"captureMediaType",null),t([d()],U.prototype,"isCaptureOnly",null),t([d({readOnly:!0})],U.prototype,"defaultPageAttachments",null),t([d()],U.prototype,"displayCount",void 0),t([d()],U.prototype,"feature",null),t([d()],U.prototype,"group",void 0),t([d({readOnly:!0})],U.prototype,"hasAttachmentChanges",null),t([d()],U.prototype,"attachmentCount",null),t([d()],U.prototype,"hasMinimumAttachmentCountNotMet",null),t([d()],U.prototype,"hasReachedAttachmentLimit",null),t([d()],U.prototype,"hasExceededAttachmentLimit",null),t([d({readOnly:!0})],U.prototype,"hasPendingAttachmentUpdateData",null),t([d()],U.prototype,"input",null),t([d()],U.prototype,"layer",null),t([d()],U.prototype,"maxAttachmentCount",null),t([d()],U.prototype,"minAttachmentCount",null),t([d({readOnly:!0})],U.prototype,"single",void 0),t([d({readOnly:!0})],U.prototype,"type",void 0),t([d({readOnly:!0})],U.prototype,"supportsResize",null),t([d()],U.prototype,"useOriginalFilename",null),t([d({readOnly:!0})],U.prototype,"valid",null),t([d()],U.prototype,"_initialAttachments",void 0),t([d()],U.prototype,"_expressionLayer",null),t([d()],U.prototype,"_stagedAdds",void 0),t([d()],U.prototype,"_stagedDeletes",void 0),t([d()],U.prototype,"_stagedUpdates",void 0),t([d()],U.prototype,"_failedStagedUpdateHydrations",void 0),t([d()],U.prototype,"_pendingStagedUpdateHydrations",void 0),t([d()],U.prototype,"_temporaryAttachmentUrls",void 0),t([d()],U.prototype,"hasInvalidValidationCriteria",null),t([d()],U.prototype,"_featureIdentifier",null),U=t([l("esri.widgets.BatchAttributeForm.inputs.AttachmentElementInput")],U);const b=U;function v(t,e){switch(e){case"audio":t.add("audio");break;case"document":t.add("document");break;case"image":case"signature":t.add("image");break;case"video":t.add("video")}}function S(t){return"document"!==t.type&&"capture"===t.inputMethod}function C(t){return S(t)}function I(t){return"document"===t.type||"capture"!==t.inputMethod}export{b as default};
|