@arcgis/core 5.1.0-next.70 → 5.1.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PopupTemplate.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/icon/addToLivestreamVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer32.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer32.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture16.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture24.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture32.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12316.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12324.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12332.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/busTravelMode16.json +1 -0
- package/assets/components/assets/icon/busTravelMode16F.json +1 -0
- package/assets/components/assets/icon/busTravelMode24.json +1 -0
- package/assets/components/assets/icon/busTravelMode24F.json +1 -0
- package/assets/components/assets/icon/busTravelMode32.json +1 -0
- package/assets/components/assets/icon/busTravelMode32F.json +1 -0
- package/assets/components/assets/icon/carTravelMode16.json +1 -0
- package/assets/components/assets/icon/carTravelMode16F.json +1 -0
- package/assets/components/assets/icon/carTravelMode24.json +1 -0
- package/assets/components/assets/icon/carTravelMode24F.json +1 -0
- package/assets/components/assets/icon/carTravelMode32.json +1 -0
- package/assets/components/assets/icon/carTravelMode32F.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown16.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown24.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown32.json +1 -0
- package/assets/components/assets/icon/emergency16.json +1 -0
- package/assets/components/assets/icon/emergency16F.json +1 -0
- package/assets/components/assets/icon/emergency24.json +1 -0
- package/assets/components/assets/icon/emergency24F.json +1 -0
- package/assets/components/assets/icon/emergency32.json +1 -0
- package/assets/components/assets/icon/emergency32F.json +1 -0
- package/assets/components/assets/icon/eyedropper16.json +1 -1
- package/assets/components/assets/icon/eyedropper24.json +1 -1
- package/assets/components/assets/icon/eyedropper32.json +1 -1
- package/assets/components/assets/icon/featureDetailsSet16.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet24.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet32.json +1 -0
- package/assets/components/assets/icon/fileBim16.json +1 -0
- package/assets/components/assets/icon/fileBim24.json +1 -0
- package/assets/components/assets/icon/fileBim32.json +1 -0
- package/assets/components/assets/icon/fileDwg16.json +1 -0
- package/assets/components/assets/icon/fileDwg24.json +1 -0
- package/assets/components/assets/icon/fileDwg32.json +1 -0
- package/assets/components/assets/icon/fileRvt16.json +1 -0
- package/assets/components/assets/icon/fileRvt24.json +1 -0
- package/assets/components/assets/icon/fileRvt32.json +1 -0
- package/assets/components/assets/icon/gradient16.json +1 -0
- package/assets/components/assets/icon/gradient24.json +1 -0
- package/assets/components/assets/icon/gradient32.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting16.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting24.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/publish16.json +1 -0
- package/assets/components/assets/icon/publish24.json +1 -0
- package/assets/components/assets/icon/publish32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32F.json +1 -0
- package/assets/components/assets/icon/velocityServer16.json +1 -0
- package/assets/components/assets/icon/velocityServer24.json +1 -0
- package/assets/components/assets/icon/velocityServer32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32F.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003fd7745966fe03510c.js +1 -0
- package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +1 -0
- package/assets/esri/core/workers/chunks/026d3fa331caec1ea3d2.js +1 -0
- package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +1 -0
- package/assets/esri/core/workers/chunks/{81b2985b83be8f8f1090.js → 02876e434dc91c42b2f4.js} +1 -1
- package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +1 -0
- package/assets/esri/core/workers/chunks/0783890816bac45277b9.js +1 -0
- package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
- package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
- package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +2 -0
- package/assets/esri/core/workers/chunks/{d82b543c96f09ded3bf9.js.LICENSE.txt → 0b1454a77a6a682541dc.js.LICENSE.txt} +6 -1
- package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
- package/assets/esri/core/workers/chunks/{478879ba965798f61bf3.js → 0d96e39380fd84cea9ba.js} +1 -1
- package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
- package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
- package/assets/esri/core/workers/chunks/{03e20ac54d6f141b5001.js → 11241781baaed346af52.js} +1 -1
- package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
- package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
- package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
- package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
- package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
- package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
- package/assets/esri/core/workers/chunks/1c7183551f5269bdcf13.js +30 -0
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +1 -0
- package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
- package/assets/esri/core/workers/chunks/{b364ec104dd59faa41b6.js → 1f82a0f134ea912fc686.js} +1 -1
- package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
- package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +1 -0
- package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
- package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
- package/assets/esri/core/workers/chunks/266ba61b72a278d93a26.js +1 -0
- package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
- package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
- package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
- package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
- package/assets/esri/core/workers/chunks/30e710ec4d22c43d4e7e.js +1 -0
- package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
- package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +1 -0
- package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +1 -0
- package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
- package/assets/esri/core/workers/chunks/3cd9bd20e75ba4d5b294.js +1 -0
- package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
- package/assets/esri/core/workers/chunks/3ea5a18b264628dc37f0.js +1 -0
- package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
- package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
- package/assets/esri/core/workers/chunks/427dec43ef2d67467699.js +1 -0
- package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
- package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
- package/assets/esri/core/workers/chunks/{746b3e98bad32c366a27.js → 444f0f51b3ee0b9845a5.js} +1 -1
- package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
- package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
- package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
- package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
- package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
- package/assets/esri/core/workers/chunks/{f209a7076d67cbf4d205.js → 4e676e888a935c507d90.js} +1 -1
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
- package/assets/esri/core/workers/chunks/50d5d6654ada9f28345d.js +1 -0
- package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +1 -0
- package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +1 -0
- package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
- package/assets/esri/core/workers/chunks/55369c5bd65bcaf78da1.js +1 -0
- package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
- package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +1 -0
- package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
- package/assets/esri/core/workers/chunks/5a4d7ba6dc1d4b41d80d.js +1 -0
- package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
- package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
- package/assets/esri/core/workers/chunks/5ef37f37e405b3bb5450.js +1 -0
- package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
- package/assets/esri/core/workers/chunks/61ef14e42bc09b787d89.js +1 -0
- package/assets/esri/core/workers/chunks/628f56c09838eb9c573b.js +1 -0
- package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
- package/assets/esri/core/workers/chunks/68b47a5a50e0b5fffca2.js +1 -0
- package/assets/esri/core/workers/chunks/6a0352d20596ca3f4b64.js +1 -0
- package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +1 -0
- package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +1 -0
- package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
- package/assets/esri/core/workers/chunks/6f67c9f68101a084b683.js +30 -0
- package/assets/esri/core/workers/chunks/6f9ea461c268c421f9c9.js +1 -0
- package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
- package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
- package/assets/esri/core/workers/chunks/74be994d789c57031631.js +1 -0
- package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
- package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
- package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
- package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +2 -0
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +1 -0
- package/assets/esri/core/workers/chunks/7e6ccf9f3e756186e93e.js +1 -0
- package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
- package/assets/esri/core/workers/chunks/824051af00e7a1f05ed0.js +1 -0
- package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
- package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +2 -0
- package/assets/esri/core/workers/chunks/{2d2c10c31cc1460dd96a.js → 88827e23f8938342781c.js} +1 -1
- package/assets/esri/core/workers/chunks/88b480a1d1fb01778798.js +267 -0
- package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
- package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
- package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
- package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +1 -0
- package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
- package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
- package/assets/esri/core/workers/chunks/8acee3fba488f202f82f.js +1 -0
- package/assets/esri/core/workers/chunks/8b73f4d2f99c0b54cced.js +1 -0
- package/assets/esri/core/workers/chunks/91a0227a64a944af3286.js +596 -0
- package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +1 -0
- package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
- package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
- package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
- package/assets/esri/core/workers/chunks/{e0a63b5861e8c975097e.js → 9aaf78b831f8739bc127.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d378d4e021a33b0047e.js → 9be4438ce2c7180adadf.js} +1 -1
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
- package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
- package/assets/esri/core/workers/chunks/a169d9fe66b5865911d9.js +1 -0
- package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
- package/assets/esri/core/workers/chunks/a37fc886227365f7ecd5.js +1 -0
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +1 -0
- package/assets/esri/core/workers/chunks/a65d576e90179a2b5400.js +1 -0
- package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
- package/assets/esri/core/workers/chunks/{678c9f15712cf3d3bb9e.js → aa1a3a849aba84cf585b.js} +1 -1
- package/assets/esri/core/workers/chunks/abc06d10c7ac8ba5b0e4.js +1 -0
- package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
- package/assets/esri/core/workers/chunks/ae0a572cbbdd9815ee2e.js +1 -0
- package/assets/esri/core/workers/chunks/af5db0372d526e592fcc.js +1 -0
- package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +1 -0
- package/assets/esri/core/workers/chunks/b2983f521d8c96becd8a.js +1 -0
- package/assets/esri/core/workers/chunks/{915a5e8aecf25f3bc72b.js → b475f5492c6e3fd4cca8.js} +1 -1
- package/assets/esri/core/workers/chunks/b495f14d90abe8d1a558.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ea0d3de93ec0392af.js → b54b7cc6b23a70fed700.js} +1 -1
- package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
- package/assets/esri/core/workers/chunks/b79058f5bda6fcac22f8.js +1 -0
- package/assets/esri/core/workers/chunks/b801631b58e6fc6cec8a.js +1 -0
- package/assets/esri/core/workers/chunks/b92794def31592a6a25f.js +1 -0
- package/assets/esri/core/workers/chunks/bc53ce9a643f82d516c2.js +1 -0
- package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
- package/assets/esri/core/workers/chunks/bea70be8e38b8c83ccd2.js +1 -0
- package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
- package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
- package/assets/esri/core/workers/chunks/c1838822b096d5f36a8b.js +1 -0
- package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +1 -0
- package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +1 -0
- package/assets/esri/core/workers/chunks/c9065cee85eb8dde6a42.js +1 -0
- package/assets/esri/core/workers/chunks/c961aff385e38b081204.js +1 -0
- package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
- package/assets/esri/core/workers/chunks/cca095f0c623e037002d.js +1 -0
- package/assets/esri/core/workers/chunks/ce2aa75e084ee56f5e29.js +1 -0
- package/assets/esri/core/workers/chunks/cf826787ab8d4b27ad80.js +1 -0
- package/assets/esri/core/workers/chunks/d05a7ce6c1d4b883ed4c.js +30 -0
- package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
- package/assets/esri/core/workers/chunks/d2aa75816e84b1e7fd25.js +1 -0
- package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +2 -0
- package/assets/esri/core/workers/chunks/{8ccf2f65d8ed3c48ffff.js → d950d5c2844206502ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
- package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
- package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +1 -0
- package/assets/esri/core/workers/chunks/dcc719e15b2e0cce1f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
- package/assets/esri/core/workers/chunks/de583214195eff13cb00.js +1140 -0
- package/assets/esri/core/workers/chunks/dec6d41d614105e6fd93.js +1 -0
- package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +1 -0
- package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
- package/assets/esri/core/workers/chunks/e0b47b08ae2c36c76fa2.js +1 -0
- package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
- package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
- package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
- package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
- package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +1 -0
- package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +2 -0
- package/assets/esri/core/workers/chunks/f1673e723b336204ad77.js +1 -0
- package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
- package/assets/esri/core/workers/chunks/f52443cd203e687551da.js +1 -0
- package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +1 -0
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
- package/assets/esri/core/workers/chunks/ffcd4fca7f67e1f943f1.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/CheckerBoard.glsl.js +3 -5
- package/chunks/ColorMaterial.glsl.js +4 -6
- package/chunks/ComponentShader.glsl.js +42 -44
- package/chunks/DefaultMaterial.glsl.js +21 -23
- package/chunks/EdgeShader.glsl.js +9 -11
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/ImageMaterial.glsl.js +5 -7
- package/chunks/LineCallout.glsl.js +9 -12
- package/chunks/LineMarker.glsl.js +24 -26
- package/chunks/OITDim.glsl.js +3 -4
- package/chunks/Path.glsl.js +15 -17
- package/chunks/Pattern.glsl.js +25 -27
- package/chunks/RealisticTree.glsl.js +11 -13
- package/chunks/RibbonLine.glsl.js +42 -45
- package/chunks/ShadedColorMaterial.glsl.js +8 -9
- package/chunks/Water.glsl.js +18 -20
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/triangulationUtilsDeprecated.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/FlatFeature.js +1 -1
- package/layers/graphics/FlatFeatureSet.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +3 -3
- package/popup/Feature.d.ts +2 -0
- package/popup/Feature.js +1 -1
- package/popup/actions.js +1 -1
- package/popupTemplateUtils.js +2 -0
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/support/OutDistance.js +2 -0
- package/rest/support/Query.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SamplerRepository.js +2 -0
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/ViewAnimation.d.ts +2 -21
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/rasterHitTestUtils.js +2 -0
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/Sampler.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
- package/widgets/FeatureTable/VisibleElements.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +15 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +0 -1
- package/assets/esri/core/workers/chunks/0dd12d6af0cf7707109c.js +0 -2
- package/assets/esri/core/workers/chunks/0e2e4cb34ac6aac88ebf.js +0 -1
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +0 -1
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +0 -1
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +0 -1
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +0 -1
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +0 -1
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +0 -1
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +0 -1
- package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +0 -1
- package/assets/esri/core/workers/chunks/1c742bfe3b0aa51823d1.js +0 -1
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +0 -1
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +0 -1
- package/assets/esri/core/workers/chunks/205e957ffd7e95f530f7.js +0 -1
- package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
- package/assets/esri/core/workers/chunks/210629f3c28d4339c655.js +0 -1
- package/assets/esri/core/workers/chunks/21a8e2a11ffacc226e2b.js +0 -1
- package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +0 -1
- package/assets/esri/core/workers/chunks/29b1a4ce7646b403008e.js +0 -1
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +0 -1
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +0 -1
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
- package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
- package/assets/esri/core/workers/chunks/35217befc8f9882d139e.js +0 -1
- package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +0 -1
- package/assets/esri/core/workers/chunks/3a2ecb883fdb5c598544.js +0 -30
- package/assets/esri/core/workers/chunks/3eef3c2e94aa2a00d76a.js +0 -1
- package/assets/esri/core/workers/chunks/40d6ad030614099155cd.js +0 -1414
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +0 -1
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +0 -1
- package/assets/esri/core/workers/chunks/453280ea87a696a4df81.js +0 -1
- package/assets/esri/core/workers/chunks/499b899bf88aaf29230d.js +0 -1
- package/assets/esri/core/workers/chunks/4b0d6309abf273f1f79f.js +0 -1
- package/assets/esri/core/workers/chunks/4e07827ab870c65377d3.js +0 -1
- package/assets/esri/core/workers/chunks/51852ef71ac04954fdae.js +0 -1
- package/assets/esri/core/workers/chunks/53b797e384be9628fc94.js +0 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +0 -1
- package/assets/esri/core/workers/chunks/54c0306082d30d59cba2.js +0 -1
- package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +0 -1
- package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +0 -1
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +0 -1
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +0 -1
- package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
- package/assets/esri/core/workers/chunks/60d0f8a949b130baff81.js +0 -1
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +0 -1
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +0 -1
- package/assets/esri/core/workers/chunks/621ea864e2774f160d1c.js +0 -1
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +0 -1
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +0 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +0 -1
- package/assets/esri/core/workers/chunks/6a567755b67c06d16f21.js +0 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +0 -1
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +0 -1
- package/assets/esri/core/workers/chunks/71326d16b5cc35c3ff7f.js +0 -1
- package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
- package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +0 -1
- package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
- package/assets/esri/core/workers/chunks/78fbfc03d9b827c3f767.js +0 -1
- package/assets/esri/core/workers/chunks/7d0350f459844162d3a7.js +0 -1
- package/assets/esri/core/workers/chunks/7e39e9d4d68843b60e4c.js +0 -1
- package/assets/esri/core/workers/chunks/823127b23bec07e1f9d0.js +0 -2
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +0 -1
- package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
- package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
- package/assets/esri/core/workers/chunks/888f6387e795d45a7ad3.js +0 -2
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +0 -1
- package/assets/esri/core/workers/chunks/8969788c57bcc11bf77b.js +0 -1
- package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +0 -1
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +0 -1
- package/assets/esri/core/workers/chunks/8fb336c2066113300d0d.js +0 -1
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +0 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +0 -1
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +0 -1
- package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +0 -1
- package/assets/esri/core/workers/chunks/9d7ffd83f69d6e639f09.js +0 -1
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +0 -1
- package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +0 -1
- package/assets/esri/core/workers/chunks/a061a17b62686f945e81.js +0 -1
- package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +0 -1
- package/assets/esri/core/workers/chunks/a43decc8ede8b4910553.js +0 -1
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +0 -1
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +0 -1
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +0 -1
- package/assets/esri/core/workers/chunks/a73e8b80760dc88f926f.js +0 -1
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
- package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
- package/assets/esri/core/workers/chunks/b014f0b2385dc82dc683.js +0 -2
- package/assets/esri/core/workers/chunks/b2120c4c56656be941ae.js +0 -1
- package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
- package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
- package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +0 -1
- package/assets/esri/core/workers/chunks/b85c9ceeece1bae67a16.js +0 -1
- package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +0 -1
- package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
- package/assets/esri/core/workers/chunks/bbdf27bc34fadbe8e6fe.js +0 -1
- package/assets/esri/core/workers/chunks/bc2c7cb99e227ddbd3a6.js +0 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +0 -1
- package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
- package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +0 -1
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +0 -1
- package/assets/esri/core/workers/chunks/be61ea8e1883b915bbb1.js +0 -1
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +0 -1
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +0 -1
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +0 -1
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +0 -1
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +0 -1
- package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
- package/assets/esri/core/workers/chunks/c7ca47f5d4b2f3885239.js +0 -1
- package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
- package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
- package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +0 -1
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +0 -1
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
- package/assets/esri/core/workers/chunks/d4e55eb75fa4d3ac1e84.js +0 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +0 -1
- package/assets/esri/core/workers/chunks/d635f97b7b82a37482d6.js +0 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +0 -1
- package/assets/esri/core/workers/chunks/d816d1a4220d827faf63.js +0 -1
- package/assets/esri/core/workers/chunks/d82b543c96f09ded3bf9.js +0 -2
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +0 -1
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +0 -1
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +0 -1
- package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +0 -1
- package/assets/esri/core/workers/chunks/e5801b0f3893d4d4f5b0.js +0 -1
- package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +0 -1
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +0 -1
- package/assets/esri/core/workers/chunks/e62d08f5488a74cbda82.js +0 -1
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +0 -1
- package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +0 -1
- package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
- package/assets/esri/core/workers/chunks/edc2e87968c958bc852b.js +0 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +0 -1
- package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +0 -1
- package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
- package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +0 -1
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +0 -1
- package/assets/esri/core/workers/chunks/f9cde38cb56c547e87e5.js +0 -1
- package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
- package/assets/esri/core/workers/chunks/fc64ae69581e4c38fa8a.js +0 -1
- package/assets/esri/core/workers/chunks/fd6bbe47773bbd9f7dd9.js +0 -1
- package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +0 -1
- package/chunks/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
- package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
- /package/assets/esri/core/workers/chunks/{0dd12d6af0cf7707109c.js.LICENSE.txt → 7bacdd65a6cc4d284e0a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{823127b23bec07e1f9d0.js.LICENSE.txt → 85edbb072a2ce6c1bb30.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{888f6387e795d45a7ad3.js.LICENSE.txt → d4a9eb4470cc6a1f67fc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b014f0b2385dc82dc683.js.LICENSE.txt → f09a41ad239d467d9438.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as n}from"../../core/arrayUtils.js";import l from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import o from"../../core/Error.js";import a from"../../core/Logger.js";import{abortMaybe as d}from"../../core/maybe.js";import{debounce as h,ignoreAbortErrors as m,after as c,throwIfAborted as p}from"../../core/promiseUtils.js";import{watch as u,initial as g,on as b,syncAndInitial as f}from"../../core/reactiveUtils.js";import{throttle as y}from"../../core/throttle.js";import{property as T,subclass as w}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as C}from"../../editing/fieldUtils.js";import{geometryTypes as I}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as v}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as _,isSubtypeGroupLayer as E}from"../../layers/support/layerUtils.js";import{createFieldInfos as S}from"../../support/popupUtils.js";import A from"../../tables/AttributeTableTemplate.js";import F from"../../tables/support/FieldOrder.js";import j from"../../time/TimeExtent.js";import x from"../../views/SelectionManager.js";import{temporaryHighlightName as R}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as O}from"../../views/support/layerViewUtils.js";import{isSelectableLayerWithObjectIds as U,isSelectableLayer as P}from"../../views/support/selectionUtils.js";import V from"./ActionColumn.js";import z from"./AttachmentsColumn.js";import W from"./FieldColumn.js";import H from"./RelationshipColumn.js";import B from"./Grid/Column.js";import M from"./Grid/Grid.js";import L from"./Grid/GridViewModel.js";import G from"./Grid/GroupColumn.js";import k from"./support/AttachmentsColumnTemplate.js";import N from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as D,isFieldColumn as $,isRelationshipColumn as Z}from"./support/columnUtils.js";import{downloadAttachmentInfo as q,exportToCSV as Q}from"./support/exportUtils.js";import K from"./support/FeatureStore.js";import J from"./support/FieldColumnTemplate.js";import X from"./support/RelationshipColumnTemplate.js";import Y from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as ee,isIFeatureTableSupportedLayerWithRelationships as te,findRelatedLayerInSources as ie,findRelationship as se,uniqueColumnNames as ne,hasColumnForField as le,findField as re,isIFeatureTableSupportedLayerWithAttachments as oe,getRelationshipIdsToShow as ae}from"./support/tableUtils.js";import{createAttributeTableElements as de}from"./support/templateUtils.js";import{goTo as he}from"../support/goToUtils.js";import{messageBundle as me}from"../support/widget.js";const ce="80px";let pe=class extends L{constructor(e){super(e),this._currentTemporaryHighlight=null,this._refreshDebounced=h(()=>this._refresh()),this._syncTemplateThrottled=y(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new N,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new l,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:n}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===n.length&&-1===n.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const l=this.paginationEnabled?this.pageIndex:e.page,r=await s.fetchItems({...e,page:l});t&&t(r)},this.defaultSelectionManager=new x,this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new l,this.relationshipColumnConfigs=null,this.selectionManager=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.syncViewSelection=!1,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new K),this._set("grid",new M({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),u(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},g),u(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),u(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),this.syncViewSelection&&this._syncSelection(),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),u(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),u(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),u(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),u(()=>this.editingEnabled,()=>this.refreshCellContent()),u(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),u(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),u(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),b(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),b(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:n})=>{const l=t?.feature,r=l?.getObjectId(),o="cell-keydown"===n&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(n,{feature:l,index:e,native:i,type:n,fieldName:s??void 0,objectId:r}),(o||"cell-click"===n)&&this._onCellInteraction(r)}),u(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),u(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),b(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),u(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),u(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),u(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),u(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),u(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),b(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:n}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:n}}),b(()=>this.tableParent,"cell-click",async e=>{const{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),u(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),u(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),b(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this.defaultSelectionManager.clear()}),u(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,m(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),u(()=>this.effectiveSelectionManager,()=>this._syncSelection(),f),b(()=>this.effectiveSelectionManager,"selection-change",()=>this._syncSelection(),f),u(()=>[this.layer,this.view],()=>this.syncSelectionSources(),f),u(()=>this.highlightEnabled,e=>this.defaultSelectionManager.highlightEnabled=e,g)])}destroy(){this._drainColumns(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=d(this._temporaryHighlightAbortController),this.defaultSelectionManager.destroy(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return v(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return O(e)?e:null}get _subtypes(){return _(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,n=new l;return e&&n.push({type:"geometry",geometry:e}),i?n.push({type:"selection",objectIds:s.toArray()}):t.length&&n.push({type:"objectId",objectIds:t.toArray()}),n}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>D(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&U(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this.defaultSelectionManager}get effectiveMultipleSelectionEnabled(){return super.effectiveMultipleSelectionEnabled}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>$(e))}get filterByViewExtent(){return this.store.filterByViewExtent}set filterByViewExtent(e){this.store.filterByViewExtent=e}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.relatedTableHasContingentValues||this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.relatedTableHasInvalidPendingEdits||this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.relatedTableHasPendingEdits||this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new l}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),l))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return ee(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get pendingEditsCount(){return this.store.pendingEditsCount}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relatedTableHasContingentValues(){return!!this.relatedTable?.hasContingentValues}get relatedTableHasInvalidPendingEdits(){return!!this.relatedTable?.hasInvalidPendingEdits}get relatedTableHasPendingEdits(){return!!this.relatedTable?.hasPendingEdits}get relationship(){return this.store.relationship}get relationshipColumns(){return this.allColumns.filter(e=>Z(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,n=this.store.relationshipInfos;if(n.length||!te(e)||!i?.length)return n;const l=[],r=s?.layers||t||[];return i.forEach(t=>{const i=ie(e,r,t);i&&(i.load(),l.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),l}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get selectionSource(){return"table"}set selectionSource(e){this.syncViewSelection="view"===e,this._overrideIfSome("selectionSource",e)}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.addAttachment(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:n}=t,{objectIdField:r}=i,o=se(i,n),a=i.displayField||o?.keyField||r;e.set({highlightIds:new l([s]),multipleSelectionEnabledOverride:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,n)});const d=e.hiddenFields;d.includes(ne.action)||d.add(ne.action),d.includes(ne.attachments)||d.add(ne.attachments),e.scrollLeft()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([ne.action,ne.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await Q({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.getFeatureStoreItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabledOverride:null,tableTemplateOverride:null}),this.hiddenFields.remove(ne.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),m(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){!this.relatedTableHasPendingEdits||this.relatedTableHasInvalidPendingEdits?this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh()):await(this.relatedTable?.savePendingEdits())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const n=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),o=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new l([e]),multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)}),i.includes(ne.action)||i.add(ne.action),null!=o&&this.scrollToIndex(o)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}syncSelectionSources(){const{defaultSelectionManager:e,layer:t,view:i}=this;e.view=i,e.sources.removeAll(),t&&P(t)&&(e.sources.items=[t])}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:n}=this,l=s.objectId===e;await n.updateAttachment(e,t,i).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),l&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await n.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const n=await e.queryFeatures(s);try{await he(t,n.features)}catch(l){"AbortError"!==l.name&&console.error(l)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:n}=this;if(!i||!t||!n&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:l,allColumns:r,columns:o}=this,a=[],d=de(o.toArray());l.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new F({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new F({field:e,order:t}))}),t.elements=d,t.orderByFields=a}async _refresh(){await this.store.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&E(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,n=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=n),this.grid?.set("pageSize",n),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:i}=this,s=e?.columnTemplates;if(!i)return;const n=this._generateColumnsFromColumnTemplates(i,s)??this._generateColumnsFromAttributeTableTemplate(i,t)??this._generateDefaultFieldColumns(i);n.length&&(this.attachmentsEnabled&&!n.some(e=>D(e))&&n.push(this._generateDefaultAttachmentsColumn(i)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!n.some(e=>Z(e))&&n.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&n.push(this._generateActionColumn()),n.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(n))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;const{elements:i,orderByFields:s}=t,l=S(e),r=[];r.push(...this._generateColumnsFromAttributeTableElements(e,i,s));const o=l.map(t=>{if(!t.fieldName||le(t.fieldName,r))return null;const{fieldName:i}=t,n=re(e,i);return n?this._generateDefaultFieldColumn(e,n,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(n);return r.push(...o),this.attachmentsEnabled&&oe(e)&&!r.some(e=>D(e))&&r.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&te(e)&&e.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>Z(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t,i){return t?.map((t,s)=>{switch(t.type){case"field":return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:i});case"group":return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:i});case"attachment":return this._createAttachmentColumnFromElement({layer:e,element:t,index:s});case"relationship":return this._createRelationshipColumnFromElement({element:t,index:s})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{fieldName:n}=i;if(null==n)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const l=re(t,n);if(!l)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:o}=i,a=s?.findIndex(({field:e})=>e&&e===n)??-1,d=a>-1?s?.at(a)?.order:void 0,h=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new W({description:r,direction:d,field:l,fieldName:n,grid:m,initialSortPriority:h,label:o,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{description:n,label:l}=i;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!i.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new G({columns:this._generateColumnsFromAttributeTableElements(t,i.elements,s),description:n,grid:r,label:l,messages:o,messagesCommon:a,messagesURIUtils:d,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{layer:t,element:i,index:s}=e,{description:n,label:l}=i,{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new z({description:n,fieldName:`${ne.attachments}-${s}`,grid:r,label:l,layer:t,messages:o,messagesCommon:a,messagesURIUtils:d,store:h,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:n,relationshipId:l}=t,r=this.relationshipInfos.find(e=>e.relationshipId===l);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:o,messages:a,messagesCommon:d,messagesURIUtils:h,store:m}=this;return new H({description:s,fieldName:`${ne.relationship}-${l}-${i}`,grid:o,label:n,messages:a,messagesCommon:d,messagesURIUtils:h,relationshipId:l,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,view:o}=this;if(!t?.length)return null;const a=[];return t.forEach((t,d)=>{const{autoWidth:h,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,menuConfig:_,resizable:E,sortable:S,textAlign:A,textWrap:F,timeZone:j,type:x,width:R}=t;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const O=!1===t.visible;if("group"===x){if(!t.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!t.label)return void this._logTemplateWarning("Group columns require a label.");const r=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),o=O||this._isFieldHidden(t.label);a.push(new G({autoWidth:h,columns:r,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:i,hidden:o,icon:y,iconText:T,invalid:C,label:I,labelTooltipText:v,menuConfig:_,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,textAlign:A,textWrap:F,timeZone:j,width:R}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,t,d))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:e}=t;if(null==e)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(t=>t.relationshipId===e);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,t,d))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const U=O||this._isFieldHidden(u);if("column"===x)a.push(new B({autoWidth:h,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:U,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,menuConfig:_,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,sortable:S,store:r,textAlign:A,textWrap:F,timeZone:j,width:R}));else if("field"===x){const d=re(e,t.fieldName);if(!d)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:x}=t;a.push(new W({autoWidth:h,description:m,direction:c,editable:u,field:d,fieldName:d.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:U,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,menuConfig:_,required:x,resizable:E,sortable:S,store:r,template:t,textAlign:A,textWrap:F,timeZone:j,width:R,view:o,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(n)??[]}_generateDefaultFieldColumn(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a}=this;if(!t.visible||"geometry"===t.type)return null;const d=i?.orderByFields,h=t.name,m=d?.findIndex(({field:e})=>e&&e===h)??-1,c=m>-1?d?.at(m)?.order:void 0,p=m>-1?m:void 0;return new W({direction:c,field:t,fieldName:h,grid:s,hidden:i?.hidden||this._isFieldHidden(h),initialSortPriority:p,layer:e,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{attachmentsViewEnabled:a,autoWidth:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,resizable:I,textAlign:v,textWrap:_,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x}=t;return new z({attachmentsViewEnabled:a,autoWidth:d,description:h,fieldName:`${ne.attachments}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:e,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,resizable:I,store:o,textAlign:v,textWrap:_,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r}=this,o=ne.attachments;return new z({fieldName:o,grid:i,hidden:t?.hidden||this._isFieldHidden(o),layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{autoWidth:a,collapsed:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,relationshipId:I,resizable:v,textAlign:_,textWrap:E,timeZone:S,width:A}=t;return new H({autoWidth:a,collapsed:d,description:h,fieldName:`${ne.relationship}-${I}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,relationshipId:I,resizable:v,store:o,textAlign:_,textWrap:E,timeZone:S,width:A,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:n}=t,l=e.find(e=>e.relationshipId===n);l&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:l}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:n}=e,{grid:l,messages:r,messagesCommon:o,messagesURIUtils:a,store:d}=this,{relationshipId:h}=n;return new H({...t,fieldName:`${ne.relationship}-${h}-${s}`,grid:l,hidden:i,messages:r,messagesCommon:o,messagesURIUtils:a,layer:n.relatedLayer,relatedLayer:n.layer,relationshipId:h,store:d,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new V({hidden:this._isFieldHidden(ne.action),store:this.store,...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await c(25),p(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:n,highlightEnabled:l}=this;e&&s&&n&&l&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:R})})}_syncSelection(){const{layer:e}=this;U(e)?this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[]:this.highlightIds.removeAll()}_addToSelection(e){const t=this.layer;U(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){const t=this.layer;U(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._removeFromSelection(i),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){const{tableParent:t}=this;t&&null!=e&&t.highlightIds.add(e)}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(ne.action)||s.add(ne.action),s.includes(ne.attachments)||s.add(ne.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:ae(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([ne.action,ne.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new Y({columnTemplates:[new J({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,n])=>({selected:s===t,label:n||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new X({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ce})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new J({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new k({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ce})),new Y({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:n}=e,{_subtypes:l,layer:r}=this;if(!r||!l.length)return void t.cancel();const o=l.find(e=>e.code===n);if(!o)return void t.cancel();const a=Promise.withResolvers(),d=this._createSubtypeEditPrompt(s,o,a),h=!!r.parent&&this.autoSaveEnabled;try{this.showPrompt(d);const e=await a.promise,s=[{fieldName:t.fieldName,value:n}];switch(e){case"update-fields":for(const[e,t]of Object.entries(o.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:n,messages:l,messagesCommon:r}=this,o=n.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const d=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:i(l.subtypes.changeWarning,{originalType:o,newType:t.name}),radios:d,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new Y({columnTemplates:[new J({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new k({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ce})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&C(s,i)]}):i?.fields.map(e=>[e.name,C(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?a.getLogger(this).warnOnce(e):a.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([T()],pe.prototype,"_defaultHiddenFields",null),e([T()],pe.prototype,"_effectiveTableTemplate",null),e([T()],pe.prototype,"_effectiveAttributeTableTemplate",null),e([T()],pe.prototype,"_highlightableLayerView",null),e([T()],pe.prototype,"_subtypes",null),e([T()],pe.prototype,"activeFilters",null),e([T({readOnly:!0})],pe.prototype,"activeSortOrders",null),e([T()],pe.prototype,"allRelatedTablesVisible",null),e([T()],pe.prototype,"attachmentsColumns",null),e([T()],pe.prototype,"attachmentsEnabled",null),e([T()],pe.prototype,"attachmentsViewOptions",void 0),e([T({type:A})],pe.prototype,"attributeTableTemplate",void 0),e([T()],pe.prototype,"autoRefreshEnabled",void 0),e([T()],pe.prototype,"autoSaveEnabled",null),e([T()],pe.prototype,"canAddRelatedFeature",null),e([T()],pe.prototype,"clearPrompt",null),e([T({readOnly:!0})],pe.prototype,"columns",void 0),e([T()],pe.prototype,"dataProvider",void 0),e([T()],pe.prototype,"defaultSelectionManager",void 0),e([T()],pe.prototype,"definitionExpression",null),e([T()],pe.prototype,"effectiveSelectionManager",null),e([T()],pe.prototype,"fieldColumns",null),e([T()],pe.prototype,"filterByViewExtent",null),e([T({types:I})],pe.prototype,"filterGeometry",null),e([T()],pe.prototype,"filterBySelectionEnabled",null),e([T({readOnly:!0})],pe.prototype,"grid",void 0),e([T()],pe.prototype,"hasContingentValues",null),e([T()],pe.prototype,"hasInvalidPendingEdits",null),e([T()],pe.prototype,"hasPendingEdits",null),e([T()],pe.prototype,"hiddenFields",null),e([T()],pe.prototype,"highlightEnabled",void 0),e([T()],pe.prototype,"initialSize",null),e([T()],pe.prototype,"isQueryingOrSyncing",null),e([T()],pe.prototype,"isSyncingAttachments",null),e([T()],pe.prototype,"layer",null),e([T()],pe.prototype,"layers",void 0),e([T()],pe.prototype,"layerFieldConfigurations",null),e([T()],pe.prototype,"layerView",null),e([T()],pe.prototype,"menuConfig",void 0),e([T()],pe.prototype,"messages",void 0),e([T(),me("esri/t9n/common")],pe.prototype,"messagesCommon",void 0),e([T(),me("esri/core/t9n/Units")],pe.prototype,"messagesUnits",void 0),e([T(),me("esri/widgets/support/t9n/uriUtils")],pe.prototype,"messagesURIUtils",void 0),e([T()],pe.prototype,"outFields",null),e([T()],pe.prototype,"pendingEditsCount",null),e([T()],pe.prototype,"prompt",void 0),e([T()],pe.prototype,"relatedRecordsEnabled",null),e([T()],pe.prototype,"relatedTable",null),e([T()],pe.prototype,"relatedTableHasContingentValues",null),e([T()],pe.prototype,"relatedTables",void 0),e([T()],pe.prototype,"relationship",null),e([T()],pe.prototype,"relationshipColumnConfigs",void 0),e([T()],pe.prototype,"relationshipColumns",null),e([T()],pe.prototype,"relationshipConfig",null),e([T()],pe.prototype,"relationshipInfos",null),e([T()],pe.prototype,"relationships",null),e([T()],pe.prototype,"returnGeometryEnabled",null),e([T()],pe.prototype,"returnMEnabled",null),e([T()],pe.prototype,"returnZEnabled",null),e([T()],pe.prototype,"selectionManager",void 0),e([T()],pe.prototype,"selectionSource",null),e([T()],pe.prototype,"showAllRelatedTables",null),e([T()],pe.prototype,"showPrompt",null),e([T()],pe.prototype,"showRelatedTableCallback",void 0),e([T({readOnly:!0,type:K})],pe.prototype,"store",void 0),e([T()],pe.prototype,"supportsAttachments",null),e([T()],pe.prototype,"supportsAddAttachments",null),e([T()],pe.prototype,"supportsDeleteAttachments",null),e([T()],pe.prototype,"supportsResizeAttachments",null),e([T()],pe.prototype,"supportsUpdateAttachments",null),e([T()],pe.prototype,"syncTemplateOnChangesEnabled",void 0),e([T()],pe.prototype,"syncViewSelection",void 0),e([T()],pe.prototype,"tableController",void 0),e([T()],pe.prototype,"tableParent",void 0),e([T({type:Y})],pe.prototype,"tableTemplate",void 0),e([T()],pe.prototype,"tableTemplateOverride",void 0),e([T({type:j})],pe.prototype,"timeExtent",null),e([T()],pe.prototype,"timeZone",null),e([T()],pe.prototype,"view",null),pe=e([w("esri.widgets.FeatureTable.FeatureTableViewModel")],pe);const ue=pe;export{ue as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as n}from"../../core/arrayUtils.js";import l from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import o from"../../core/Error.js";import a from"../../core/Logger.js";import{abortMaybe as d}from"../../core/maybe.js";import{debounce as h,ignoreAbortErrors as m,after as c,throwIfAborted as p}from"../../core/promiseUtils.js";import{watch as u,initial as g,on as b,syncAndInitial as f}from"../../core/reactiveUtils.js";import{throttle as y}from"../../core/throttle.js";import{property as T,subclass as w}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as C}from"../../editing/fieldUtils.js";import{geometryTypes as I}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as v}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as _,isSubtypeGroupLayer as E}from"../../layers/support/layerUtils.js";import{createFieldInfos as S}from"../../support/popupUtils.js";import A from"../../tables/AttributeTableTemplate.js";import F from"../../tables/support/FieldOrder.js";import j from"../../time/TimeExtent.js";import x from"../../views/SelectionManager.js";import{temporaryHighlightName as R}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as O}from"../../views/support/layerViewUtils.js";import{isSelectableLayerWithObjectIds as U,isSelectableLayer as P}from"../../views/support/selectionUtils.js";import V from"./ActionColumn.js";import z from"./AttachmentsColumn.js";import W from"./FieldColumn.js";import H from"./RelationshipColumn.js";import B from"./Grid/Column.js";import M from"./Grid/Grid.js";import L from"./Grid/GridViewModel.js";import G from"./Grid/GroupColumn.js";import k from"./support/AttachmentsColumnTemplate.js";import N from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as D,isFieldColumn as $,isRelationshipColumn as Z}from"./support/columnUtils.js";import{downloadAttachmentInfo as q,exportToCSV as Q}from"./support/exportUtils.js";import K from"./support/FeatureStore.js";import J from"./support/FieldColumnTemplate.js";import X from"./support/RelationshipColumnTemplate.js";import Y from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as ee,isIFeatureTableSupportedLayerWithRelationships as te,findRelatedLayerInSources as ie,findRelationship as se,uniqueColumnNames as ne,hasColumnForField as le,findField as re,isIFeatureTableSupportedLayerWithAttachments as oe,getRelationshipIdsToShow as ae}from"./support/tableUtils.js";import{createAttributeTableElements as de}from"./support/templateUtils.js";import{goTo as he}from"../support/goToUtils.js";import{messageBundle as me}from"../support/widget.js";const ce="80px";let pe=class extends L{constructor(e){super(e),this._currentTemporaryHighlight=null,this._refreshDebounced=h(()=>this._refresh()),this._syncTemplateThrottled=y(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new N,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new l,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:n}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===n.length&&-1===n.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const l=this.paginationEnabled?this.pageIndex:e.page,r=await s.fetchItems({...e,page:l});t&&t(r)},this.defaultSelectionManager=new x,this.grid=null,this.highlightEnabled=!0,this.layers=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new l,this.relationshipColumnConfigs=null,this.selectionManager=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.syncViewSelection=!1,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new K),this._set("grid",new M({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),u(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},g),u(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),u(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),this.syncViewSelection&&this._syncSelection(),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),u(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),u(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),u(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),u(()=>this.editingEnabled,()=>this.refreshCellContent()),u(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),u(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),u(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),b(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),b(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:n})=>{const l=t?.feature,r=l?.getObjectId(),o="cell-keydown"===n&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(n,{feature:l,index:e,native:i,type:n,fieldName:s??void 0,objectId:r}),(o||"cell-click"===n)&&this._onCellInteraction(r)}),u(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),u(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),b(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),u(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),u(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),u(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),u(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),u(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),b(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:n}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:n}}),b(()=>this.tableParent,"cell-click",async e=>{const{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),u(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),u(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),b(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this.defaultSelectionManager.clear()}),u(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,m(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),u(()=>this.effectiveSelectionManager,()=>this._syncSelection(),f),b(()=>this.effectiveSelectionManager,"selection-change",()=>this._syncSelection(),f),u(()=>[this.layer,this.view],()=>this.syncSelectionSources(),f),u(()=>this.highlightEnabled,e=>this.defaultSelectionManager.highlightEnabled=e,g)])}destroy(){this._drainColumns(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=d(this._temporaryHighlightAbortController),this.defaultSelectionManager.destroy(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return v(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return O(e)?e:null}get _subtypes(){return _(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,n=new l;return e&&n.push({type:"geometry",geometry:e}),i?n.push({type:"selection",objectIds:s.toArray()}):t.length&&n.push({type:"objectId",objectIds:t.toArray()}),n}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>D(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&U(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this.defaultSelectionManager}get effectiveMultipleSelectionEnabled(){return super.effectiveMultipleSelectionEnabled}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>$(e))}get filterByViewExtent(){return this.store.filterByViewExtent}set filterByViewExtent(e){this.store.filterByViewExtent=e}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.relatedTableHasContingentValues||this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.relatedTableHasInvalidPendingEdits||this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.relatedTableHasPendingEdits||this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new l}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),l))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return ee(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get maxSize(){return super.maxSize}set maxSize(e){super.maxSize=e}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get paginationEnabled(){return super.paginationEnabled}set paginationEnabled(e){super.paginationEnabled=e}get pendingEditsCount(){return this.store.pendingEditsCount}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relatedTableHasContingentValues(){return!!this.relatedTable?.hasContingentValues}get relatedTableHasInvalidPendingEdits(){return!!this.relatedTable?.hasInvalidPendingEdits}get relatedTableHasPendingEdits(){return!!this.relatedTable?.hasPendingEdits}get relationship(){return this.store.relationship}get relationshipColumns(){return this.allColumns.filter(e=>Z(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,n=this.store.relationshipInfos;if(n.length||!te(e)||!i?.length)return n;const l=[],r=s?.layers||t||[];return i.forEach(t=>{const i=ie(e,r,t);i&&(i.load(),l.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),l}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get selectionSource(){return"table"}set selectionSource(e){this.syncViewSelection="view"===e,this._overrideIfSome("selectionSource",e)}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.addAttachment(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:n}=t,{objectIdField:r}=i,o=se(i,n),a=i.displayField||o?.keyField||r;e.set({highlightIds:new l([s]),multipleSelectionEnabledOverride:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,n)});const d=e.hiddenFields;d.includes(ne.action)||d.add(ne.action),d.includes(ne.attachments)||d.add(ne.attachments),e.scrollLeft()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([ne.action,ne.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await Q({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.getFeatureStoreItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabledOverride:null,tableTemplateOverride:null}),this.hiddenFields.remove(ne.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),m(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){!this.relatedTableHasPendingEdits||this.relatedTableHasInvalidPendingEdits?this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh()):await(this.relatedTable?.savePendingEdits())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const n=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),o=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new l([e]),multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)}),i.includes(ne.action)||i.add(ne.action),null!=o&&this.scrollToIndex(o)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}syncSelectionSources(){const{defaultSelectionManager:e,layer:t,view:i}=this;e.view=i,e.sources.removeAll(),t&&P(t)&&(e.sources.items=[t])}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:n}=this,l=s.objectId===e;await n.updateAttachment(e,t,i).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),l&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await n.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const n=await e.queryFeatures(s);try{await he(t,n.features)}catch(l){"AbortError"!==l.name&&console.error(l)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:n}=this;if(!i||!t||!n&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:l,allColumns:r,columns:o}=this,a=[],d=de(o.toArray());l.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new F({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new F({field:e,order:t}))}),t.elements=d,t.orderByFields=a}async _refresh(){await super.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&E(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,n=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=n),this.grid?.set("pageSize",n),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:i}=this,s=e?.columnTemplates;if(!i)return;const n=this._generateColumnsFromColumnTemplates(i,s)??this._generateColumnsFromAttributeTableTemplate(i,t)??this._generateDefaultFieldColumns(i);n.length&&(this.attachmentsEnabled&&!n.some(e=>D(e))&&n.push(this._generateDefaultAttachmentsColumn(i)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!n.some(e=>Z(e))&&n.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&n.push(this._generateActionColumn()),n.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(n))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;const{elements:i,orderByFields:s}=t,l=S(e),r=[];r.push(...this._generateColumnsFromAttributeTableElements(e,i,s));const o=l.map(t=>{if(!t.fieldName||le(t.fieldName,r))return null;const{fieldName:i}=t,n=re(e,i);return n?this._generateDefaultFieldColumn(e,n,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(n);return r.push(...o),this.attachmentsEnabled&&oe(e)&&!r.some(e=>D(e))&&r.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&te(e)&&e.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>Z(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t,i){return t?.map((t,s)=>{switch(t.type){case"field":return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:i});case"group":return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:i});case"attachment":return this._createAttachmentColumnFromElement({layer:e,element:t,index:s});case"relationship":return this._createRelationshipColumnFromElement({element:t,index:s})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{fieldName:n}=i;if(null==n)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const l=re(t,n);if(!l)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:o}=i,a=s?.findIndex(({field:e})=>e&&e===n)??-1,d=a>-1?s?.at(a)?.order:void 0,h=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new W({description:r,direction:d,field:l,fieldName:n,grid:m,initialSortPriority:h,label:o,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{description:n,label:l}=i;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!i.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new G({columns:this._generateColumnsFromAttributeTableElements(t,i.elements,s),description:n,grid:r,label:l,messages:o,messagesCommon:a,messagesURIUtils:d,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{layer:t,element:i,index:s}=e,{description:n,label:l}=i,{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new z({description:n,fieldName:`${ne.attachments}-${s}`,grid:r,label:l,layer:t,messages:o,messagesCommon:a,messagesURIUtils:d,store:h,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:n,relationshipId:l}=t,r=this.relationshipInfos.find(e=>e.relationshipId===l);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:o,messages:a,messagesCommon:d,messagesURIUtils:h,store:m}=this;return new H({description:s,fieldName:`${ne.relationship}-${l}-${i}`,grid:o,label:n,messages:a,messagesCommon:d,messagesURIUtils:h,relationshipId:l,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,view:o}=this;if(!t?.length)return null;const a=[];return t.forEach((t,d)=>{const{autoWidth:h,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,menuConfig:_,resizable:E,sortable:S,textAlign:A,textWrap:F,timeZone:j,type:x,width:R}=t;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const O=!1===t.visible;if("group"===x){if(!t.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!t.label)return void this._logTemplateWarning("Group columns require a label.");const r=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),o=O||this._isFieldHidden(t.label);a.push(new G({autoWidth:h,columns:r,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:i,hidden:o,icon:y,iconText:T,invalid:C,label:I,labelTooltipText:v,menuConfig:_,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,textAlign:A,textWrap:F,timeZone:j,width:R}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,t,d))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:e}=t;if(null==e)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(t=>t.relationshipId===e);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,t,d))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const U=O||this._isFieldHidden(u);if("column"===x)a.push(new B({autoWidth:h,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:U,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,menuConfig:_,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,sortable:S,store:r,textAlign:A,textWrap:F,timeZone:j,width:R}));else if("field"===x){const d=re(e,t.fieldName);if(!d)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:x}=t;a.push(new W({autoWidth:h,description:m,direction:c,editable:u,field:d,fieldName:d.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:U,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,menuConfig:_,required:x,resizable:E,sortable:S,store:r,template:t,textAlign:A,textWrap:F,timeZone:j,width:R,view:o,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(n)??[]}_generateDefaultFieldColumn(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a}=this;if(!t.visible||"geometry"===t.type)return null;const d=i?.orderByFields,h=t.name,m=d?.findIndex(({field:e})=>e&&e===h)??-1,c=m>-1?d?.at(m)?.order:void 0,p=m>-1?m:void 0;return new W({direction:c,field:t,fieldName:h,grid:s,hidden:i?.hidden||this._isFieldHidden(h),initialSortPriority:p,layer:e,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{attachmentsViewEnabled:a,autoWidth:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,resizable:I,textAlign:v,textWrap:_,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x}=t;return new z({attachmentsViewEnabled:a,autoWidth:d,description:h,fieldName:`${ne.attachments}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:e,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,resizable:I,store:o,textAlign:v,textWrap:_,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r}=this,o=ne.attachments;return new z({fieldName:o,grid:i,hidden:t?.hidden||this._isFieldHidden(o),layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{autoWidth:a,collapsed:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,relationshipId:I,resizable:v,textAlign:_,textWrap:E,timeZone:S,width:A}=t;return new H({autoWidth:a,collapsed:d,description:h,fieldName:`${ne.relationship}-${I}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,relationshipId:I,resizable:v,store:o,textAlign:_,textWrap:E,timeZone:S,width:A,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:n}=t,l=e.find(e=>e.relationshipId===n);l&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:l}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:n}=e,{grid:l,messages:r,messagesCommon:o,messagesURIUtils:a,store:d}=this,{relationshipId:h}=n;return new H({...t,fieldName:`${ne.relationship}-${h}-${s}`,grid:l,hidden:i,messages:r,messagesCommon:o,messagesURIUtils:a,layer:n.relatedLayer,relatedLayer:n.layer,relationshipId:h,store:d,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new V({hidden:this._isFieldHidden(ne.action),store:this.store,...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await c(25),p(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:n,highlightEnabled:l}=this;e&&s&&n&&l&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:R})})}_syncSelection(){const{layer:e}=this;U(e)?this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[]:this.highlightIds.removeAll()}_addToSelection(e){const t=this.layer;U(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){const t=this.layer;U(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._removeFromSelection(i),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){const{tableParent:t}=this;t&&null!=e&&t.highlightIds.add(e)}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(ne.action)||s.add(ne.action),s.includes(ne.attachments)||s.add(ne.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:ae(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([ne.action,ne.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new Y({columnTemplates:[new J({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,n])=>({selected:s===t,label:n||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new X({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ce})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new J({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new k({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ce})),new Y({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:n}=e,{_subtypes:l,layer:r}=this;if(!r||!l.length)return void t.cancel();const o=l.find(e=>e.code===n);if(!o)return void t.cancel();const a=Promise.withResolvers(),d=this._createSubtypeEditPrompt(s,o,a),h=!!r.parent&&this.autoSaveEnabled;try{this.showPrompt(d);const e=await a.promise,s=[{fieldName:t.fieldName,value:n}];switch(e){case"update-fields":for(const[e,t]of Object.entries(o.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:n,messages:l,messagesCommon:r}=this,o=n.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const d=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:i(l.subtypes.changeWarning,{originalType:o,newType:t.name}),radios:d,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new Y({columnTemplates:[new J({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new k({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ce})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&C(s,i)]}):i?.fields.map(e=>[e.name,C(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?a.getLogger(this).warnOnce(e):a.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([T()],pe.prototype,"_defaultHiddenFields",null),e([T()],pe.prototype,"_effectiveTableTemplate",null),e([T()],pe.prototype,"_effectiveAttributeTableTemplate",null),e([T()],pe.prototype,"_highlightableLayerView",null),e([T()],pe.prototype,"_subtypes",null),e([T()],pe.prototype,"activeFilters",null),e([T({readOnly:!0})],pe.prototype,"activeSortOrders",null),e([T()],pe.prototype,"allRelatedTablesVisible",null),e([T()],pe.prototype,"attachmentsColumns",null),e([T()],pe.prototype,"attachmentsEnabled",null),e([T()],pe.prototype,"attachmentsViewOptions",void 0),e([T({type:A})],pe.prototype,"attributeTableTemplate",void 0),e([T()],pe.prototype,"autoRefreshEnabled",void 0),e([T()],pe.prototype,"autoSaveEnabled",null),e([T()],pe.prototype,"canAddRelatedFeature",null),e([T()],pe.prototype,"clearPrompt",null),e([T({readOnly:!0})],pe.prototype,"columns",void 0),e([T()],pe.prototype,"dataProvider",void 0),e([T()],pe.prototype,"defaultSelectionManager",void 0),e([T()],pe.prototype,"definitionExpression",null),e([T()],pe.prototype,"effectiveSelectionManager",null),e([T()],pe.prototype,"fieldColumns",null),e([T()],pe.prototype,"filterByViewExtent",null),e([T({types:I})],pe.prototype,"filterGeometry",null),e([T()],pe.prototype,"filterBySelectionEnabled",null),e([T({readOnly:!0})],pe.prototype,"grid",void 0),e([T()],pe.prototype,"hasContingentValues",null),e([T()],pe.prototype,"hasInvalidPendingEdits",null),e([T()],pe.prototype,"hasPendingEdits",null),e([T()],pe.prototype,"hiddenFields",null),e([T()],pe.prototype,"highlightEnabled",void 0),e([T()],pe.prototype,"initialSize",null),e([T()],pe.prototype,"isQueryingOrSyncing",null),e([T()],pe.prototype,"isSyncingAttachments",null),e([T()],pe.prototype,"layer",null),e([T()],pe.prototype,"layers",void 0),e([T()],pe.prototype,"layerFieldConfigurations",null),e([T()],pe.prototype,"layerView",null),e([T()],pe.prototype,"menuConfig",void 0),e([T()],pe.prototype,"messages",void 0),e([T(),me("esri/t9n/common")],pe.prototype,"messagesCommon",void 0),e([T(),me("esri/core/t9n/Units")],pe.prototype,"messagesUnits",void 0),e([T(),me("esri/widgets/support/t9n/uriUtils")],pe.prototype,"messagesURIUtils",void 0),e([T()],pe.prototype,"outFields",null),e([T()],pe.prototype,"pendingEditsCount",null),e([T()],pe.prototype,"prompt",void 0),e([T()],pe.prototype,"relatedRecordsEnabled",null),e([T()],pe.prototype,"relatedTable",null),e([T()],pe.prototype,"relatedTableHasContingentValues",null),e([T()],pe.prototype,"relatedTables",void 0),e([T()],pe.prototype,"relationship",null),e([T()],pe.prototype,"relationshipColumnConfigs",void 0),e([T()],pe.prototype,"relationshipColumns",null),e([T()],pe.prototype,"relationshipConfig",null),e([T()],pe.prototype,"relationshipInfos",null),e([T()],pe.prototype,"relationships",null),e([T()],pe.prototype,"returnGeometryEnabled",null),e([T()],pe.prototype,"returnMEnabled",null),e([T()],pe.prototype,"returnZEnabled",null),e([T()],pe.prototype,"selectionManager",void 0),e([T()],pe.prototype,"selectionSource",null),e([T()],pe.prototype,"showAllRelatedTables",null),e([T()],pe.prototype,"showPrompt",null),e([T()],pe.prototype,"showRelatedTableCallback",void 0),e([T({readOnly:!0,type:K})],pe.prototype,"store",void 0),e([T()],pe.prototype,"supportsAttachments",null),e([T()],pe.prototype,"supportsAddAttachments",null),e([T()],pe.prototype,"supportsDeleteAttachments",null),e([T()],pe.prototype,"supportsResizeAttachments",null),e([T()],pe.prototype,"supportsUpdateAttachments",null),e([T()],pe.prototype,"syncTemplateOnChangesEnabled",void 0),e([T()],pe.prototype,"syncViewSelection",void 0),e([T()],pe.prototype,"tableController",void 0),e([T()],pe.prototype,"tableParent",void 0),e([T({type:Y})],pe.prototype,"tableTemplate",void 0),e([T()],pe.prototype,"tableTemplateOverride",void 0),e([T({type:j})],pe.prototype,"timeExtent",null),e([T()],pe.prototype,"timeZone",null),e([T()],pe.prototype,"view",null),pe=e([w("esri.widgets.FeatureTable.FeatureTableViewModel")],pe);const ue=pe;export{ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import{EventedAccessor as n}from"../../../core/Evented.js";import{property as l,subclass as o}from"../../../core/accessorSupport/decorators.js";import{isGroupColumn as s}from"../support/columnUtils.js";import{uniqueColumnNames as r
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import{EventedAccessor as n}from"../../../core/Evented.js";import{property as l,subclass as o}from"../../../core/accessorSupport/decorators.js";import{isGroupColumn as s}from"../support/columnUtils.js";import{uniqueColumnNames as r}from"../support/tableUtils.js";let d=class extends n{constructor(e){super(e),this.actionColumnConfig=null,this.cellPartNameGenerator=(e,t)=>{const i=t.item.objectId;let n="";t?.item&&this.rowHighlightIds.includes(i)&&(n+=" highlight");const l=this.findColumn(e?.path);if(!l)return n;if(l.invalid&&(n+=" invalid"),l.textWrap&&(n+=" text-wrap"),"editInfo"in l&&l.editInfo&&l.editInfo.rowData?.index===t.index&&(n+=" editing"),l.tableHasPendingEdits&&(l.itemHasPendingEdits(i,l.fieldName)&&(n+=" pending-edit"),l.tableHasInvalidPendingEdits)){const e=l.itemHasInvalidPendingEdits(i);l.itemHasInvalidPendingEdits(i,l.fieldName)?n+=" pending-edit-invalid":e||(n+=" pending-edit-other")}return n},this.columnPerformanceModeEnabled=!0,this.columnReorderingEnabled=!0,this.columns=new t,this.dataProvider=async(e,t)=>{const{store:i}=this;if(!t)return;t(await i.fetchItems(e))},this.multipleSelectionEnabled=!0,this.multipleSelectionEnabledOverride=null,this.multiSortEnabled=!1,this.multipleSortPriority="prepend",this.noDataMessage=null,this.rowDetailsRenderer=null,this.store=null}get actionColumn(){return this.allColumns.find(e=>e.fieldName===r.action)}get allColumns(){return this.columns.toArray().flatMap(e=>[e,...s(e)&&e.columns?.length?e.columns:[]])}get allColumnsVisible(){return this.allColumns.length===this.allVisibleColumns.length}get allVisibleColumns(){return this.allColumns.filter(e=>!e.hidden)}get columnMenuIsOpen(){return this.allColumns.some(e=>e.menuIsOpen)}get editingEnabled(){return this.store.editingEnabled}set editingEnabled(e){this.store.editingEnabled=e}get editableColumns(){return this.allColumns.filter(e=>"editable"in e)}get effectiveSize(){const{filterBySelectionEnabled:e,highlightIds:t,objectIds:i,pageSize:n,size:l}=this;if(0===l)return 0;if(this.paginationEnabled){const o=this.pageCount===this.pageIndex+1&&l%n||n;return e?Math.min(t.length,o):i.length?Math.min(i.length,o):o}return e?t.length:i.length?i.length:l}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){this._set("filterBySelectionEnabled",e)}get groupColumns(){return this.columns.toArray().filter(e=>s(e))}get hasInvalidColumnConfiguration(){return this.visibleColumns.every(e=>e.frozen||e.frozenToEnd)}get highlightIds(){return this._get("highlightIds")||new t}set highlightIds(e){let n=Array.isArray(e)?new t(e):e;this.effectiveMultipleSelectionEnabled||(n=n.slice(0,1)),this._set("highlightIds",i(n,this._get("highlightIds"),t))}get isEditing(){return this.editableColumns.some(e=>e.editInfo)}get isQuerying(){return this.store.isQuerying}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing}get isSyncing(){return this.store.isSyncing}get maxSize(){return this.store.maxSize}set maxSize(e){this.store.maxSize=e}get effectiveMultipleSelectionEnabled(){return!1!==this.multipleSelectionEnabledOverride&&this.multipleSelectionEnabled}get objectIds(){return this._get("objectIds")??new t}set objectIds(e){this._set("objectIds",i(e,this._get("objectIds"),t))}get pageCount(){return this.store.pageCount}get pageIndex(){return this.store.pageIndex}set pageIndex(e){this.store.pageIndex=e}get pageSize(){return this.store.pageSize}set pageSize(e){this.store.pageSize=e}get paginationEnabled(){return this.store.paginationEnabled}set paginationEnabled(e){this.store.paginationEnabled=e}get rowHighlightIds(){return this._get("rowHighlightIds")||new t}set rowHighlightIds(e){this._set("rowHighlightIds",i(e,this._get("rowHighlightIds"),t))}get size(){return this.store.effectiveSize}get state(){return this.store.state}get visibleColumns(){return this.columns.toArray().filter(e=>!e.hidden)}closeColumnMenus(){this.allColumns.forEach(e=>e.closeMenu())}findColumn(e){return this.allColumns.find(t=>t.fieldName===e)}hideAllColumns(){this.allColumns.forEach(e=>e.hidden||=!0)}hideColumn(e){const t=this.findColumn(e);!1===t?.hidden&&(t.hidden=!0)}async refresh(){await this.store.refresh(),await this.store.load()}showAllColumns(){this.allColumns.forEach(e=>{e.hidden&&(e.hidden=!1)})}showColumn(e){const t=this.findColumn(e);t?.hidden&&(t.hidden=!1)}sortColumn(e,t){if(!e)return;const i=this.findColumn(e);i&&(i.direction=t)}toggleColumnVisibility(e){const t=this.findColumn(e);t&&(t.hidden=!t.hidden)}};e([l()],d.prototype,"actionColumn",null),e([l()],d.prototype,"actionColumnConfig",void 0),e([l()],d.prototype,"allColumns",null),e([l()],d.prototype,"allColumnsVisible",null),e([l()],d.prototype,"allVisibleColumns",null),e([l()],d.prototype,"cellPartNameGenerator",void 0),e([l()],d.prototype,"columnMenuIsOpen",null),e([l()],d.prototype,"columnPerformanceModeEnabled",void 0),e([l()],d.prototype,"columnReorderingEnabled",void 0),e([l()],d.prototype,"columns",void 0),e([l()],d.prototype,"dataProvider",void 0),e([l()],d.prototype,"editingEnabled",null),e([l()],d.prototype,"editableColumns",null),e([l()],d.prototype,"effectiveSize",null),e([l()],d.prototype,"filterBySelectionEnabled",null),e([l()],d.prototype,"groupColumns",null),e([l()],d.prototype,"hasInvalidColumnConfiguration",null),e([l()],d.prototype,"highlightIds",null),e([l()],d.prototype,"isEditing",null),e([l()],d.prototype,"isQuerying",null),e([l()],d.prototype,"isQueryingOrSyncing",null),e([l()],d.prototype,"isSyncing",null),e([l()],d.prototype,"maxSize",null),e([l()],d.prototype,"multipleSelectionEnabled",void 0),e([l()],d.prototype,"multipleSelectionEnabledOverride",void 0),e([l()],d.prototype,"effectiveMultipleSelectionEnabled",null),e([l()],d.prototype,"multiSortEnabled",void 0),e([l()],d.prototype,"multipleSortPriority",void 0),e([l()],d.prototype,"noDataMessage",void 0),e([l()],d.prototype,"objectIds",null),e([l()],d.prototype,"pageCount",null),e([l()],d.prototype,"pageIndex",null),e([l()],d.prototype,"pageSize",null),e([l()],d.prototype,"paginationEnabled",null),e([l()],d.prototype,"rowHighlightIds",null),e([l()],d.prototype,"rowDetailsRenderer",void 0),e([l()],d.prototype,"size",null),e([l()],d.prototype,"store",void 0),e([l({readOnly:!0})],d.prototype,"state",null),e([l()],d.prototype,"visibleColumns",null),d=e([o("esri.widgets.FeatureTable.Grid.GridViewModel")],d);const a=d;export{a as default};
|
|
@@ -7,7 +7,7 @@ import type { ColumnVisibilityMenuVisibleElementsProperties } from "./ColumnVisi
|
|
|
7
7
|
import type { TableMenuVisibleElementsProperties } from "./TableMenuVisibleElements.js";
|
|
8
8
|
|
|
9
9
|
/** @since 5.0 */
|
|
10
|
-
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "columnDescriptions" | "columnMenus" | "columnVisibilityMenu" | "header" | "layerDropdown" | "layerDropdownIcons" | "menu" | "pendingEditsFooter" | "progress" | "selectionColumn" | "tooltips">> {
|
|
10
|
+
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "close" | "collapse" | "columnDescriptions" | "columnMenus" | "columnVisibilityMenu" | "header" | "layerDropdown" | "layerDropdownIcons" | "menu" | "pendingEditsFooter" | "progress" | "selectionColumn" | "tooltips">> {
|
|
11
11
|
/** The menu items within the column menu. */
|
|
12
12
|
columnMenuItems?: ColumnMenuVisibleElementsProperties;
|
|
13
13
|
/**
|
|
@@ -34,6 +34,20 @@ export interface VisibleElementsProperties extends Partial<Pick<VisibleElements,
|
|
|
34
34
|
*/
|
|
35
35
|
export default class VisibleElements extends Accessor {
|
|
36
36
|
constructor(properties?: VisibleElementsProperties);
|
|
37
|
+
/**
|
|
38
|
+
* Indicates whether to display a close button in the table panel header.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
* @since 5.1
|
|
42
|
+
*/
|
|
43
|
+
accessor close: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Indicates whether to display a collapse button in the table panel header.
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
48
|
+
* @since 5.1
|
|
49
|
+
*/
|
|
50
|
+
accessor collapse: boolean;
|
|
37
51
|
/**
|
|
38
52
|
* Indicates whether to display descriptions in the header cells of individual columns. Default value is `true`.
|
|
39
53
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import e from"../../core/Accessor.js";import{property as t,subclass as l}from"../../core/accessorSupport/decorators.js";import n from"./ColumnMenuVisibleElements.js";import i from"./ColumnVisibilityMenuVisibleElements.js";import s from"./TableMenuVisibleElements.js";let p=class extends e{constructor(o){super(o),this.columnDescriptions=!0,this.columnMenus=!0,this.columnMenuItems=new n,this.close=!1,this.columnVisibilityMenu=!0,this.columnVisibilityMenuItems=new i,this.header=!0,this.layerDropdown=!1,this.layerDropdownIcons=!0,this.menu=!0,this.menuItems=new s,this.pendingEditsFooter=!0,this.progress=!0,this.selectionColumn=!0,this.tooltips=!0}};o([t({type:Boolean,nonNullable:!0})],p.prototype,"columnDescriptions",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"columnMenus",void 0),o([t({type:n,nonNullable:!0})],p.prototype,"columnMenuItems",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"close",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"columnVisibilityMenu",void 0),o([t({type:i,nonNullable:!0})],p.prototype,"columnVisibilityMenuItems",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"header",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"layerDropdown",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"layerDropdownIcons",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"menu",void 0),o([t({type:s,nonNullable:!0})],p.prototype,"menuItems",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"pendingEditsFooter",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"progress",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"selectionColumn",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"tooltips",void 0),p=o([l("esri.widgets.FeatureTable.VisibleElements")],p);const r=p;export{r as default};
|
|
2
|
+
import{__decorate as o}from"tslib";import e from"../../core/Accessor.js";import{property as t,subclass as l}from"../../core/accessorSupport/decorators.js";import n from"./ColumnMenuVisibleElements.js";import i from"./ColumnVisibilityMenuVisibleElements.js";import s from"./TableMenuVisibleElements.js";let p=class extends e{constructor(o){super(o),this.collapse=!1,this.columnDescriptions=!0,this.columnMenus=!0,this.columnMenuItems=new n,this.close=!1,this.columnVisibilityMenu=!0,this.columnVisibilityMenuItems=new i,this.header=!0,this.layerDropdown=!1,this.layerDropdownIcons=!0,this.menu=!0,this.menuItems=new s,this.pendingEditsFooter=!0,this.progress=!0,this.selectionColumn=!0,this.tooltips=!0}};o([t({type:Boolean,nonNullable:!0})],p.prototype,"collapse",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"columnDescriptions",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"columnMenus",void 0),o([t({type:n,nonNullable:!0})],p.prototype,"columnMenuItems",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"close",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"columnVisibilityMenu",void 0),o([t({type:i,nonNullable:!0})],p.prototype,"columnVisibilityMenuItems",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"header",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"layerDropdown",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"layerDropdownIcons",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"menu",void 0),o([t({type:s,nonNullable:!0})],p.prototype,"menuItems",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"pendingEditsFooter",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"progress",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"selectionColumn",void 0),o([t({type:Boolean,nonNullable:!0})],p.prototype,"tooltips",void 0),p=o([l("esri.widgets.FeatureTable.VisibleElements")],p);const r=p;export{r as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{equals as i,isSome as s}from"../../../core/arrayUtils.js";import n from"../../../core/Collection.js";import a from"../../../core/Error.js";import{clone as o}from"../../../core/lang.js";import u from"../../../core/Logger.js";import{getOrCreateMapValue as l}from"../../../core/MapUtils.js";import d from"../../../core/ReactiveMap.js";import{watch as h,when as p,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as y,subclass as g}from"../../../core/accessorSupport/decorators.js";import{geometryTypes as _}from"../../../geometry/support/typeUtils.js";import{isFeatureLayer as f,isSubtypeGroupLayer as m,isSubtypeSublayer as b}from"../../../layers/support/layerUtils.js";import E from"../../../rest/support/AttachmentQuery.js";import v from"../../../rest/support/RelationshipQuery.js";import C from"../../../time/TimeExtent.js";import{isIFeatureTableSupportedLayerWithAttachments as I,isIFeatureTableSupportedLayerWithAttachmentsEditing as O,isIFeatureTableSupportedLayerWithEditing as F,isIFeatureTableSupportedLayerWithRelationships as w,findRelatedLayer as A}from"./tableUtils.js";import j from"../../support/ContingentValuesManager.js";let q=class extends r{constructor(e){super(e),this._attachmentsOperationQueue=new n,this._contingentValuesManager=new j,this._defaultOutFields=["*"],this._editOperationQueue=new n,this.featureTitleMap=new d,this._loaded=!1,this._loadError=!1,this._loading=!1,this._objectIdCache=new n,this._pendingEditsCache=new d,this._queryOperationQueue=new n,this.attachmentsEnabled=!1,this.autoSaveEnabled=!0,this.count=0,this.editingEnabled=!1,this.failures=new n,this.filterByViewExtent=!1,this.filterGeometry=null,this.initialSize=null,this.layer=null,this.objectIds=null,this.outFields=null,this.pageCache=new d,this.pageSize=50,this.relationshipConfig=null,this.relatedRecordsEnabled=!1,this.returnGeometry=!1,this.returnZ=!1,this.returnM=!1,this.sortOrders=[],this.timeExtent=null,this.timeZone=null,this.view=null,this.where=null}initialize(){this.addHandles([h(()=>[this.filterGeometry,this.layer,this.objectIds,this.outFields,this.pageSize,this.relationshipConfig,this.returnGeometry,this.returnM,this.returnZ,this.timeExtent,this.where],()=>this._reset()),h(()=>this.orderByFields,()=>this._clearCaches(),{equals:i}),p(()=>this.attachmentsEnabled,()=>this._reset()),p(()=>this.relatedRecordsEnabled,()=>this._reset()),h(()=>this._layerWithContingentValues,e=>{const t=this._contingentValuesManager;e&&!t.layers.includes(e)&&t.layers.add(e)}),h(()=>[this.view?.extent,this.view?.stationary,this.filterByViewExtent],([e,t,r])=>{r&&(e?t&&(this.filterGeometry=e):this.filterGeometry=null)},c)])}destroy(){this.layer=null,this.itemCache?.destroy(),this.failures?.destroy()}get _capabilities(){const{layer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _canSavePendingEdits(){return this.supportsEditing&&this.hasPendingEdits&&!this.hasInvalidPendingEdits}get _effectiveReturnZ(){return this.returnZ&&this.supportsZ}get _effectiveReturnM(){return this.returnM&&this.supportsM}get _layerWithAttachments(){const{layer:e}=this;return e&&this._capabilities&&this.attachmentsEnabled&&this.supportsAttachments&&I(e)?e:null}get _layerWithAttachmentsEditing(){const{_layerWithAttachments:e}=this;return e&&O(e)&&this.supportsEditing?e:null}get _layerWithContingentValues(){const{layer:e}=this;return f(e)||m(e)?e:null}get _layerWithEditing(){const e=this.layer;return F(e)&&this.supportsEditing?e:null}get _layerWithRelationships(){const e=this.layer;return w(e)&&this.supportsQueryRelated?e:null}get _pendingEditsAreInvalid(){const e=this._pendingEditsCache,t=this._layerWithContingentValues;if(!t)return!1;for(const r of e.keys()){const i=e.get(r),s=this._getFeatureWithPendingEdits(r,i);for(const e of i.changes.keys()){if(this._contingentValuesManager.getViolationForField(t,s,e))return!0}}return!1}get _relatedLayer(){return this.relationshipConfig?.relatedLayer}get _relatedLayerCapabilities(){const{_relatedLayer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _relatedLayerSupportsCacheHint(){return!!this._relatedLayerCapabilities?.queryRelated?.supportsCacheHint}get _relatedLayerSupportsQuery(){return!!this._relatedLayerCapabilities?.operations.supportsQuery}get _relatedLayerSupportsQueryRelated(){const{_relatedLayerCapabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get _sortedFieldNames(){return this.sortOrders.map(({fieldName:e})=>e)}get _subtypeCode(){return this.layer?.subtypeCode??null}get _subtypeField(){const{layer:e}=this;return m(e?.parent)?e.subtypeField:null}get _canUseRelatedLayer(){return!(!this._relatedLayerSupportsQuery||!this._relatedLayerSupportsQueryRelated)}get canAddRelatedFeature(){const{state:e,relationship:t,supportsAdd:r,supportsEditing:i}=this;if("loaded"!==e||!t||!r||!i)return!1;const{count:s}=this,{cardinality:n,role:a}=t,o=s>0;return("one-to-one"!==n||!o)&&("one-to-many"!==n||"origin"!==a||!o)}get effectiveOutFields(){const{layer:e,outFields:t}=this;if(!e||!t?.length)return this._defaultOutFields;const r=[];t.forEach(t=>{const i=e.fieldsIndex.normalizeFieldName(t);i&&r.push(i)});const{objectIdField:i}=e,s=e.fieldsIndex.normalizeFieldName(i)??i;return s&&!r.includes(s)&&r.unshift(s),r}get effectiveTimeExtent(){const{layer:e,timeExtent:t}=this;return t||e&&"timeExtent"in e&&e.timeExtent||null}get effectiveWhere(){const{layer:e,where:t}=this;return null!=t&&""!==t?t:b(e)&&e.parent?.definitionExpression?e.parent.definitionExpression:e?.definitionExpression||"1=1"}get fieldsWithContingentValues(){const e=this._layerWithContingentValues;return e?this._contingentValuesManager.fieldsWithContingentValues.get(e):void 0}get hasContingentValues(){const e=this.fieldsWithContingentValues;return!!(e&&e.size>0)}get hasInvalidPendingEdits(){return this.hasPendingEdits&&this._pendingEditsAreInvalid}get hasPendingEdits(){return this.pendingEditsCount>0}get isQuerying(){return this._queryOperationQueue.length>0}get isSyncing(){return this.isSyncingFeatureEdits||this.isSyncingAttachmentEdits}get isSyncingAttachmentEdits(){return this._attachmentsOperationQueue.length>0}get isSyncingFeatureEdits(){return this._editOperationQueue.length>0}get itemCache(){return new n({items:[...this.pageCache.values()].flat()})}get layerView(){const{layer:e,view:t}=this;if(!e||!t)return null;const r="sublayer"===e.type||b(e)?e.parent:e;return t.allLayerViews.find(e=>e.layer===r)}get orderByFields(){const{_sortedFieldNames:e,layer:t,sortOrders:r}=this,i=r.filter(({fieldName:t,direction:r},i)=>e.indexOf(t)===i&&null!=r).map(({fieldName:e,direction:t})=>`${e} ${t?.toUpperCase()}`);if(t&&!i.length&&!t.objectIdField&&t.fields?.length){const e=t.fields.find(e=>e.name);if(e){const r=t.fieldsIndex.normalizeFieldName(e.name);r&&i.push(`${r} ASC`)}}return i}get pendingEditsCount(){let e=0;return this._pendingEditsCache.forEach(t=>e+=t.changes.size),e}get relationship(){const{relationshipConfig:e}=this;return null==e?.relationshipId?null:this.relationships?.find(t=>t.id===e.relationshipId)}get relationshipIds(){return this.relationships?.map(e=>e.id)??[]}get relationshipInfos(){const{_layerWithRelationships:e,relatedRecordsEnabled:t,relationships:r,view:i}=this,s=[];return t&&e?.loaded&&i?.map&&r?.length?(r.forEach(t=>{const r=A(e,i,t);r&&(r.load(),s.push({layer:e,relatedLayer:r,relationshipId:t.id}))}),s):s}get relationships(){return this._layerWithRelationships?.relationships}get state(){const{layer:e,_loaded:t,_loadError:r,_loading:i}=this;return!e||e.destroyed?"disabled":r||e.loadError?"error":"loaded"===e.loadStatus&&t?"loaded":i?"loading":"ready"}get supportsAdd(){return!!this._capabilities?.operations.supportsAdd}get supportsAddAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsAttachments(){const{_capabilities:e}=this;return!(!e?.data?.supportsAttachment||!e?.operations.supportsQueryAttachments)}get supportsCacheHint(){return!!this._capabilities?.query?.supportsCacheHint}get supportsCacheHintQueryRelated(){return!!this._capabilities?.queryRelated?.supportsCacheHint}get supportsDelete(){return!!this._capabilities?.operations.supportsDelete}get supportsEditing(){return!!this._capabilities?.operations.supportsEditing}get supportsM(){return!!this.layer?.hasM&&!!this._capabilities?.data?.supportsM}get supportsOrderBy(){return!!this._capabilities?.query?.supportsOrderBy}get supportsPagination(){return!!this._capabilities?.query?.supportsPagination}get supportsQuery(){return!!this._capabilities?.operations.supportsQuery}get supportsQueryRelated(){const{_capabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get supportsResizeAttachments(){const{_capabilities:e}=this;return!(!this.supportsAttachments||!e?.attachment?.supportsResize)}get supportsUpdate(){return!!this._capabilities?.operations.supportsUpdate}get supportsUpdateAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsZ(){return!!this.layer?.hasZ&&!!this._capabilities?.data?.supportsZ}async addAttachment(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsAddAttachments)return{};const i=await this._queueAttachmentsOperation(e,()=>r.addAttachment(this._createBaseGraphic(r,e),t));return this._ensureArrayContent(i)}addPendingEdits(e){const t=this._ensureLayerAndUpdateSupport();this.editingEnabled?(this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),this._stashPendingEdits(t,e)):this._logWarning("store:editing-disabled","Editing is disabled.")}async deleteAttachments(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsUpdateAttachments||!t.length)return[];const i=await this._queueAttachmentsOperation(e,()=>r.deleteAttachments(this._createBaseGraphic(r,e),t));return this._ensureArray(i)}async deleteRowsByObjectId(e){const{_layerWithEditing:t}=this;if(!this.supportsDelete||!t)throw new a("store:delete-error","Delete is not supported.");const r=e.map(e=>this.getItemByObjectId(e)?.feature).filter(s),i=this._queueEditOperation(()=>t.applyEdits({deleteFeatures:r}));return e.forEach(e=>this.featureTitleMap.delete(e)),i}discardPendingEdits(e){if(e?.length)e.forEach(e=>this._discardPendingEdit(e));else{for(const[e,t]of this._pendingEditsCache){const r=this.getItemByObjectId(e);r&&(r.feature=t.originalFeature)}this._pendingEditsCache.clear(),this._clearOptionsAndViolations()}}itemHasInvalidPendingEdits(e,t){if(!this.hasInvalidPendingEdits)return!1;const r=this._layerWithContingentValues,i=this._pendingEditsCache.get(e);if(!r||!i)return!1;const s=this._getFeatureWithPendingEdits(e,i),n=this._contingentValuesManager;return t?!!n.getViolationForField(r,s,t):!!n.getAllViolations(r,s)}itemHasPendingEdits(e,t){const r=this._pendingEditsCache.get(e);return!!r&&(!t||r.changes.has(t))}async fetchItems(e){const{page:t}=e,{pageSize:r}=this,i=t*r,s=i+r,{layer:n,state:a}=this;return n&&"loaded"===a?this._query({layer:n,start:i,num:s,page:t,pageSize:r}):[]}async getAttachmentsByObjectId(e,t){const r=this.getItemByObjectId(e)?.attachments??[];if(!r.length&&t){return(await this._queryAttachments([e]))[e]??[]}return r}getFieldValueOptions(e){return this._contingentValuesManager.getFieldValueOptions(e)}async getFeatureTitle(e,r=!1){const{layer:i}=this,s=this.featureTitleMap.get(e),n=`${e}`;if(!i)return s||n;if(s&&!r)return s;if(!("getFeatureTitle"in i)||!i.getFeatureTitle)return n;const a=this.getItemByObjectId(e);let o=a?.feature;o||(o=new t({attributes:{[i.objectIdField]:e},origin:i.graphicOrigin}));const u=await i.getFeatureTitle(o,{fetchMissingFields:!0,removeHTML:!0});return u?(this.featureTitleMap.set(e,u),u):n}getItemByObjectId(e){for(const t of this.pageCache.values())for(const r of t)if(r.objectId===e)return r}getItemIndexByObjectId(e){const{pageCache:t,pageSize:r}=this,i=t.entries();let s=-1;for(const[n,a]of i)if(a.some((t,i)=>{const a=t.objectId===e;return a&&(s=n*r+i),a}),s>-1)break;return s}async load(){const{layer:e}=this;if(!this._loading&&!this._loaded&&e){this._reset(),this._loading=!0;try{await e.load(),e.parent&&m(e.parent)&&await e.parent.loadAll(),await e.when();const t=this.initialSize;this.initialSize=null,await this.refresh(t),this._loaded=!0,this._loading=!1}catch(t){throw this._reset(),this._loadError=!0,this._logError("store:load-error","An error occurred."),t}}}async query(e){const{state:t}=this;return this.supportsQuery&&"loaded"===t?this._query(e):[]}async refresh(e){this._clearCaches(),await this._syncCount(e),await this._syncObjectIdCache(),this._syncPendingEdits()}reset(){this._reset()}async savePendingEdits(){if(!this.hasPendingEdits)return;if(!this._canSavePendingEdits)return void this._logError("store:update-error","An error occurred. Unable to save pending edits.");const e=[];for(const[t]of this._pendingEditsCache){const r=this.getItemByObjectId(t);r?.feature&&e.push(r.feature)}await this._savePendingEdits(e),this._clearOptionsAndViolations()}async updateAttachment(e,t,r){const{_layerWithAttachmentsEditing:i}=this;if(!i||!this.supportsUpdateAttachments)return{};const s=await this._queueAttachmentsOperation(e,()=>i.updateAttachment(this._createBaseGraphic(i,e),t,r));return this._ensureArrayContent(s)}async updateItem(e){const t=this._ensureLayerAndUpdateSupport();if(!this.editingEnabled)return void this._logWarning("store:editing-disabled","Editing is disabled.");if(this.hasContingentValues){const t=e.updates.some(e=>this.fieldsWithContingentValues?.has(e.fieldName)),r=this.itemHasPendingEdits(e.objectId);if(r||t){const t=this._layerWithContingentValues,i=this.getItemByObjectId(e.objectId)?.feature?.clone();if(i){const s=this._contingentValuesManager.getAllViolations(t,i);e.updates.forEach(({fieldName:e,value:r})=>{const s=t.getField(e);s&&(i.attributes[s.name]=r)});if(this._contingentValuesManager.validateContingencyConstraints(t,i).length||s.length||r)return this._stashPendingEdits(t,[e]),void this._contingentValuesManager.resetOptionsForLayer(t)}}}if(!this.autoSaveEnabled)return void this._stashPendingEdits(t,[e]);const{_sortedFieldNames:r}=this,i=e.updates.map(({fieldName:e})=>e);!(await this._update(t,e)).updateFeatureResults.find(e=>e.error)&&i.some(e=>r.includes(e))&&this._clearCaches()}async verifyFeaturesByObjectId(e){const{layer:t,state:r}=this;if(!t||"loaded"!==r)return[];const{objectIdField:i}=t,s=await this._queryFeaturesByObjectId(e);return e.map(e=>s.some(t=>{const r=t.getObjectId()??t.attributes[i];return e===r}))}_clearCaches(){this.pageCache.clear(),this._objectIdCache.removeAll()}_createBaseGraphic(e,r){const i=new t({attributes:{[e.objectIdField]:r}});return this._subtypeField&&null!=this._subtypeCode&&(i.attributes[this._subtypeField]=this._subtypeCode),i}_ensureArray(e){return Array.isArray(e)?e:[e]}_ensureArrayContent(e){return Array.isArray(e)?e[0]:e}_getObjectIdsForPage(e,t){const r=this._objectIdCache.toArray();return r.length>=e+t?r.slice(e,e+t):r.slice(e)}_logError(e,t){u.getLogger(this).error(e,t)}_logWarning(e,t,r=!1){r?u.getLogger(this).warnOnce(e,t):u.getLogger(this).warn(e,t)}_reset(){this._clearCaches(),this._pendingEditsCache.clear(),this.failures.removeAll(),this._attachmentsOperationQueue.removeAll(),this._editOperationQueue.removeAll(),this._queryOperationQueue.removeAll(),this.featureTitleMap.clear(),this._loading=!1,this._loaded=!1,this._loadError=!1,this._set("count",0)}async _syncCount(e){null==e?await this._queryCount().then(e=>this._set("count",e)):this._set("count",e)}async _syncObjectIdCache(){if(this.supportsPagination)return;const e=await this._queryObjectIds();this._objectIdCache.removeAll(),this._objectIdCache.addMany(e)}async _queryFeaturesByObjectId(e){const{layer:t}=this;if(!t||!this.supportsQuery)throw new a("store:query-error","Layer does not support query operation.");const{effectiveTimeExtent:r,effectiveWhere:i,orderByFields:s,supportsCacheHint:n,supportsOrderBy:o}=this,u=t.createQuery();u.where=i,u.timeExtent=r,u.returnGeometry=!1,u.objectIds=e.length?e:void 0,u.outFields=[t.objectIdField],o&&(u.orderByFields=s),n&&(u.cacheHint=!0);return(await t.queryFeatures(u)).features}_ensureLayerAndUpdateSupport(){const e=this._layerWithEditing;if(!this.supportsUpdate||!e)throw new a("store:update-error","Update is not supported.");return e}_stashPendingEdits(e,t){t.forEach(({objectId:t,updates:r})=>{const i=this.getItemByObjectId(t)?.feature;if(!i)throw new a("store:update-error","Feature with provided 'objectId' not found.");const s=i.clone(),n=l(this._pendingEditsCache,t,()=>({originalFeature:s,changes:new d}));r.forEach(({fieldName:t,value:r})=>{const s=e.getField(t);s?(n.changes.set(s.name,r),i.attributes[s.name]=r):this._logWarning("store:pending-edit-unknown-field","The provided field does not belong to this layer.")}),n.changes.size>0&&this._pendingEditsCache.set(t,n)})}_syncPendingEdits(){for(const[e,t]of this._pendingEditsCache){const r=this.getItemByObjectId(e)?.feature;if(r){const e=r.clone();for(const[i,s]of t.changes)r.attributes[i]=s;t.originalFeature=e}}}_getFeatureWithPendingEdits(e,t){let r=this.getItemByObjectId(e)?.feature;if(!r){r=t.originalFeature.clone();for(const[e,i]of t.changes)r.attributes[e]=i}return r}_discardPendingEdit({objectId:e,fieldName:t}){const r=this._pendingEditsCache.get(e);if(!r)return void this._logWarning("store:pending-edit-not-found","Could not find a pending edit with the given information");const i=this.getItemByObjectId(e);t?(i&&(i.feature.attributes[t]=r.originalFeature.attributes[t]),r.changes.delete(t),0===r.changes.size&&this._pendingEditsCache.delete(e)):(i&&(i.feature=r.originalFeature),this._pendingEditsCache.delete(e))}_clearOptionsAndViolations(){const{_layerWithContingentValues:e,_contingentValuesManager:t}=this;e&&(t.resetOptionsForLayer(e),t.resetViolationsForLayer(e))}async _update(e,r){const{objectId:i,updates:s}=r,n=this.getItemByObjectId(i)?.feature;if(!n)throw new a("store:update-error","Feature with provided 'objectId' not found.");const u=o(n.attributes);s.forEach(({fieldName:e,value:t})=>u[e]=t);const l=new t({attributes:u,sourceLayer:n.sourceLayer}),d=e.applyEdits({updateFeatures:[l]}).then(e=>{const{updateFeatureResults:t}=e,r=t.find(e=>!!e.error);if(r)throw r.error;return t.length&&(n.attributes=u,this.featureTitleMap.has(i)&&this.getFeatureTitle(i,!0)),e});return this._queueEditOperation(()=>d)}async _savePendingEdits(e){const{_layerWithEditing:t}=this;if(!this.supportsUpdate||!t)throw new a("store:update-error","Update is not supported.");const r=t.applyEdits({updateFeatures:e}).then(e=>{const{updateFeatureResults:t}=e,r=t.filter(e=>!!e.error);if(r.length)throw this.discardPendingEdits(),r[0].error;return e});return this._queueEditOperation(()=>r,!0)}_createFeatureStoreItems(e){const{attachments:t,features:r,layer:i,relatedRecords:s}=e,n=i.objectIdField;return r.map(e=>{const r=e.getObjectId()??e.attributes[n],a=[];e.layer||e.sourceLayer||(e.layer=i,e.sourceLayer=i);const o=this._pendingEditsCache.get(r);if(o){const t=e.clone(),r=o.changes;for(const[i,s]of r)e.attributes[i]=s;o.originalFeature=t}return s.forEach((e,t)=>{a.push({relationshipId:t,count:e[r]??0})}),{objectId:r,feature:e,attachments:t[r]??null,relatedRecords:a}})}async _query(e){const{page:t,refresh:r}=e;!0===r&&await this.refresh();const i=this.pageCache.get(t);if(i)return i;const s=await this._queryPage(e);return this.pageCache.set(t,s),s}_queryAttachments(e){const{_layerWithAttachments:t,effectiveWhere:r}=this;return t?e.some(e=>"number"!=typeof e)?Promise.reject(new a("invalid-object-id","Only numeric object ids are valid to query attachments")):t.queryAttachments(new E({objectIds:e,where:r,returnMetadata:!0})):Promise.resolve({})}async _queryCount(){const{_relatedLayerSupportsCacheHint:e,layer:t,relationshipConfig:r,supportsCacheHint:i}=this;if(!t)return 0;if(r&&this._canUseRelatedLayer){const{objectId:t,relatedLayer:i,relationshipId:s}=r;return(await i.queryRelatedFeaturesCount(new v({cacheHint:e,relationshipId:s,objectIds:[t]})))[t]??0}const{effectiveTimeExtent:s,effectiveWhere:n,filterGeometry:a,objectIds:o}=this,u=t.createQuery();return u.geometry=a,u.returnGeometry=!1,u.where=n,u.timeExtent=s,u.objectIds=o?.length?o:void 0,i&&(u.cacheHint=!0),t.queryFeatureCount(u)}async _queryFeatures(e){const{relationshipConfig:t}=this;if(t&&this._canUseRelatedLayer)return this._queryRelatedFeatures(e,t);const{_effectiveReturnM:r,_effectiveReturnZ:i,effectiveOutFields:s,effectiveTimeExtent:n,effectiveWhere:a,filterGeometry:o,objectIds:u,orderByFields:l,pageSize:d,returnGeometry:h,supportsCacheHint:p,supportsOrderBy:c,supportsPagination:y}=this,{layer:g,start:_}=e,f=u?.length,m=g.createQuery();m.returnGeometry=h,m.outFields=s,m.returnM=r,m.returnZ=i,y?(m.start=_,m.num=d,m.where=a,m.timeExtent=n,m.objectIds=f?u:void 0):m.objectIds=f?u:this._getObjectIdsForPage(_,d??0),c&&(m.orderByFields=l),o&&(m.geometry=o),p&&(m.cacheHint=!0);return(await g.queryFeatures(m)).features}_queryObjectIds(){const{effectiveTimeExtent:e,effectiveWhere:t,filterGeometry:r,layer:i,objectIds:s,orderByFields:n,supportsCacheHint:a,supportsOrderBy:o}=this;if(!i)return Promise.resolve([]);const u=i.createQuery();return u.geometry=r,u.outFields=[i.objectIdField],u.returnGeometry=!1,u.where=t,u.timeExtent=e,u.objectIds=s?.length?s:void 0,o&&(u.orderByFields=n),a&&(u.cacheHint=!0),i.queryObjectIds(u)}async _queryPage(e){const{layer:t}=e;return this._queueQueryOperation(async()=>{const r=await this._queryFeatures(e),i=r.map(e=>e.getObjectId()??e.attributes[t.objectIdField]),s=await this._queryAttachments(i),n=await this._queryRelatedCounts(i);return this._createFeatureStoreItems({layer:t,features:r,attachments:s,relatedRecords:n})||[]})}async _queryRelatedCounts(e){const{_layerWithRelationships:t,relationshipIds:r,supportsCacheHintQueryRelated:i}=this,s=new Map;return t&&e?.length&&r.length?(await Promise.allSettled(r.map(async r=>{const n=await t.queryRelatedFeaturesCount(new v({cacheHint:i,relationshipId:r,objectIds:e}));s.set(r,n)})),s):s}async _queryRelatedFeatures(e,t){const{_defaultOutFields:r,_effectiveReturnM:i,_effectiveReturnZ:s,orderByFields:n,pageSize:a,returnGeometry:o,supportsCacheHint:u}=this,{layer:l,start:d}=e,{objectId:h,relatedLayer:p,relationshipId:c}=t,y=l.createQuery(),g=new v({cacheHint:u,num:a,objectIds:[h],orderByFields:n,outFields:r,relationshipId:c,returnGeometry:o,returnM:i,returnZ:s,start:d,where:y.where??void 0}),_=await p.queryRelatedFeatures(g);return _[h]?.features||[]}_queueAttachmentsOperation(e,t){return this._attachmentsOperationQueue.push(t),t().then(async r=>{this._attachmentsOperationQueue.remove(t);const i=this._ensureArray(r),s=i.some(e=>e.error),n=this.getItemByObjectId(e);if(n&&(!s||i.length>1)){const t=await this._queryAttachments([e]);n.attachments=t[e]}return r}).catch(async r=>{this._logError("store:attachment-error","An error occurred.");const i={error:r,retry:()=>{this.failures.remove(i),this._queueAttachmentsOperation(e,t)},cancel:()=>this.failures.remove(i)};throw this.failures.add(i),this._attachmentsOperationQueue.remove(t),r})}_queueEditOperation(e,t=!1){return this._editOperationQueue.push(e),e().then(r=>(this._editOperationQueue.remove(e),t&&this._pendingEditsCache.clear(),r)).catch(t=>{this._logError("store:edit-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueEditOperation(e)},cancel:()=>this.failures.remove(r)};throw this.failures.add(r),this._editOperationQueue.remove(e),t})}_queueQueryOperation(e){return this._queryOperationQueue.push(e),e().then(t=>this._queryOperationQueue.includes(e)?t:[]).catch(t=>{this._logError("store:query-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueQueryOperation(e)},cancel:()=>this.failures.remove(r)};return this.failures.add(r),[]}).then(t=>(this._queryOperationQueue.remove(e),t))}};e([y()],q.prototype,"_attachmentsOperationQueue",void 0),e([y({readOnly:!0})],q.prototype,"_capabilities",null),e([y()],q.prototype,"_canSavePendingEdits",null),e([y()],q.prototype,"_contingentValuesManager",void 0),e([y()],q.prototype,"_defaultOutFields",void 0),e([y()],q.prototype,"_editOperationQueue",void 0),e([y()],q.prototype,"_effectiveReturnZ",null),e([y()],q.prototype,"_effectiveReturnM",null),e([y()],q.prototype,"featureTitleMap",void 0),e([y({readOnly:!0})],q.prototype,"_layerWithAttachments",null),e([y({readOnly:!0})],q.prototype,"_layerWithAttachmentsEditing",null),e([y()],q.prototype,"_layerWithContingentValues",null),e([y({readOnly:!0})],q.prototype,"_layerWithEditing",null),e([y({readOnly:!0})],q.prototype,"_layerWithRelationships",null),e([y()],q.prototype,"_loaded",void 0),e([y()],q.prototype,"_loadError",void 0),e([y()],q.prototype,"_loading",void 0),e([y()],q.prototype,"_objectIdCache",void 0),e([y()],q.prototype,"_pendingEditsCache",void 0),e([y()],q.prototype,"_pendingEditsAreInvalid",null),e([y()],q.prototype,"_queryOperationQueue",void 0),e([y({readOnly:!0})],q.prototype,"_relatedLayer",null),e([y({readOnly:!0})],q.prototype,"_relatedLayerCapabilities",null),e([y({readOnly:!0})],q.prototype,"_relatedLayerSupportsCacheHint",null),e([y()],q.prototype,"_relatedLayerSupportsQuery",null),e([y()],q.prototype,"_relatedLayerSupportsQueryRelated",null),e([y()],q.prototype,"_sortedFieldNames",null),e([y()],q.prototype,"_subtypeCode",null),e([y()],q.prototype,"_subtypeField",null),e([y()],q.prototype,"_canUseRelatedLayer",null),e([y()],q.prototype,"attachmentsEnabled",void 0),e([y()],q.prototype,"autoSaveEnabled",void 0),e([y()],q.prototype,"canAddRelatedFeature",null),e([y({readOnly:!0})],q.prototype,"count",void 0),e([y()],q.prototype,"editingEnabled",void 0),e([y()],q.prototype,"effectiveOutFields",null),e([y()],q.prototype,"effectiveTimeExtent",null),e([y()],q.prototype,"effectiveWhere",null),e([y({readOnly:!0})],q.prototype,"failures",void 0),e([y()],q.prototype,"fieldsWithContingentValues",null),e([y()],q.prototype,"filterByViewExtent",void 0),e([y({types:_})],q.prototype,"filterGeometry",void 0),e([y()],q.prototype,"hasContingentValues",null),e([y()],q.prototype,"hasInvalidPendingEdits",null),e([y()],q.prototype,"hasPendingEdits",null),e([y()],q.prototype,"initialSize",void 0),e([y({readOnly:!0})],q.prototype,"isQuerying",null),e([y({readOnly:!0})],q.prototype,"isSyncing",null),e([y({readOnly:!0})],q.prototype,"isSyncingAttachmentEdits",null),e([y({readOnly:!0})],q.prototype,"isSyncingFeatureEdits",null),e([y({readOnly:!0})],q.prototype,"itemCache",null),e([y()],q.prototype,"layer",void 0),e([y()],q.prototype,"layerView",null),e([y()],q.prototype,"objectIds",void 0),e([y()],q.prototype,"orderByFields",null),e([y()],q.prototype,"outFields",void 0),e([y({readOnly:!0})],q.prototype,"pageCache",void 0),e([y()],q.prototype,"pageSize",void 0),e([y()],q.prototype,"pendingEditsCount",null),e([y()],q.prototype,"relationship",null),e([y()],q.prototype,"relationshipConfig",void 0),e([y()],q.prototype,"relationshipIds",null),e([y()],q.prototype,"relationshipInfos",null),e([y()],q.prototype,"relationships",null),e([y()],q.prototype,"relatedRecordsEnabled",void 0),e([y()],q.prototype,"returnGeometry",void 0),e([y()],q.prototype,"returnZ",void 0),e([y()],q.prototype,"returnM",void 0),e([y()],q.prototype,"sortOrders",void 0),e([y({readOnly:!0})],q.prototype,"state",null),e([y()],q.prototype,"supportsAdd",null),e([y()],q.prototype,"supportsAddAttachments",null),e([y()],q.prototype,"supportsAttachments",null),e([y()],q.prototype,"supportsCacheHint",null),e([y()],q.prototype,"supportsCacheHintQueryRelated",null),e([y()],q.prototype,"supportsDelete",null),e([y()],q.prototype,"supportsEditing",null),e([y()],q.prototype,"supportsM",null),e([y()],q.prototype,"supportsOrderBy",null),e([y()],q.prototype,"supportsPagination",null),e([y()],q.prototype,"supportsQuery",null),e([y()],q.prototype,"supportsQueryRelated",null),e([y()],q.prototype,"supportsResizeAttachments",null),e([y()],q.prototype,"supportsUpdate",null),e([y()],q.prototype,"supportsUpdateAttachments",null),e([y()],q.prototype,"supportsZ",null),e([y({type:C})],q.prototype,"timeExtent",void 0),e([y()],q.prototype,"timeZone",void 0),e([y()],q.prototype,"view",void 0),e([y()],q.prototype,"where",void 0),q=e([g("esri.widgets.FeatureTable.support.FeatureStore")],q);const R=q;export{R as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{equals as i,isSome as s}from"../../../core/arrayUtils.js";import n from"../../../core/Collection.js";import a from"../../../core/Error.js";import{clone as o}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{getOrCreateMapValue as u}from"../../../core/MapUtils.js";import d from"../../../core/ReactiveMap.js";import{watch as p,when as h,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as y,subclass as g}from"../../../core/accessorSupport/decorators.js";import{geometryTypes as _}from"../../../geometry/support/typeUtils.js";import{isFeatureLayer as f,isSubtypeGroupLayer as m,isSubtypeSublayer as b}from"../../../layers/support/layerUtils.js";import E from"../../../rest/support/AttachmentQuery.js";import v from"../../../rest/support/RelationshipQuery.js";import I from"../../../time/TimeExtent.js";import{isIFeatureTableSupportedLayerWithAttachments as C,isIFeatureTableSupportedLayerWithAttachmentsEditing as O,isIFeatureTableSupportedLayerWithEditing as F,isIFeatureTableSupportedLayerWithRelationships as w,isPageIndexValid as A,findRelatedLayer as j}from"./tableUtils.js";import q from"../../support/ContingentValuesManager.js";let S=class extends r{constructor(e){super(e),this._attachmentsOperationQueue=new n,this._contingentValuesManager=new q,this._defaultOutFields=["*"],this._editOperationQueue=new n,this.featureTitleMap=new d,this._loaded=!1,this._loadError=!1,this._loading=!1,this._objectIdCache=new n,this._pendingEditsCache=new d,this._queryOperationQueue=new n,this._size=0,this.attachmentsEnabled=!1,this.autoSaveEnabled=!0,this.editingEnabled=!1,this.failures=new n,this.filterByViewExtent=!1,this.filterGeometry=null,this.initialSize=null,this.layer=null,this.maxSize=null,this.objectIds=null,this.outFields=null,this.pageCache=new d,this.pageSize=50,this.paginationEnabled=!1,this.relationshipConfig=null,this.relatedRecordsEnabled=!1,this.returnGeometry=!1,this.returnZ=!1,this.returnM=!1,this.sortOrders=[],this.timeExtent=null,this.timeZone=null,this.view=null,this.where=null}initialize(){this.addHandles([p(()=>[this.filterGeometry,this.layer,this.objectIds,this.outFields,this.pageSize,this.relationshipConfig,this.returnGeometry,this.returnM,this.returnZ,this.timeExtent,this.where],()=>this._reset()),p(()=>this.orderByFields,()=>this._clearCaches(),{equals:i}),h(()=>this.attachmentsEnabled,()=>this._reset()),h(()=>this.relatedRecordsEnabled,()=>this._reset()),p(()=>this._layerWithContingentValues,e=>{const t=this._contingentValuesManager;e&&!t.layers.includes(e)&&t.layers.add(e)}),p(()=>[this.view?.extent,this.view?.stationary,this.filterByViewExtent],([e,t,r])=>{r&&(e?t&&(this.filterGeometry=e):this.filterGeometry=null)},c),p(()=>this.maxSize,(e,t)=>{0===t&&this._reset()})])}destroy(){this.layer=null,this.itemCache?.destroy(),this.failures?.destroy()}get _capabilities(){const{layer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _canSavePendingEdits(){return this.supportsEditing&&this.hasPendingEdits&&!this.hasInvalidPendingEdits}get _effectiveReturnZ(){return this.returnZ&&this.supportsZ}get _effectiveReturnM(){return this.returnM&&this.supportsM}get _layerWithAttachments(){const{layer:e}=this;return e&&this._capabilities&&this.attachmentsEnabled&&this.supportsAttachments&&C(e)?e:null}get _layerWithAttachmentsEditing(){const{_layerWithAttachments:e}=this;return e&&O(e)&&this.supportsEditing?e:null}get _layerWithContingentValues(){const{layer:e}=this;return f(e)||m(e)?e:null}get _layerWithEditing(){const e=this.layer;return F(e)&&this.supportsEditing?e:null}get _layerWithRelationships(){const e=this.layer;return w(e)&&this.supportsQueryRelated?e:null}get _pendingEditsAreInvalid(){const e=this._pendingEditsCache,t=this._layerWithContingentValues;if(!t)return!1;for(const r of e.keys()){const i=e.get(r),s=this._getFeatureWithPendingEdits(r,i);for(const e of i.changes.keys()){if(this._contingentValuesManager.getViolationForField(t,s,e))return!0}}return!1}get _relatedLayer(){return this.relationshipConfig?.relatedLayer}get _relatedLayerCapabilities(){const{_relatedLayer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _relatedLayerSupportsCacheHint(){return!!this._relatedLayerCapabilities?.queryRelated?.supportsCacheHint}get _relatedLayerSupportsQuery(){return!!this._relatedLayerCapabilities?.operations.supportsQuery}get _relatedLayerSupportsQueryRelated(){const{_relatedLayerCapabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get _sortedFieldNames(){return this.sortOrders.map(({fieldName:e})=>e)}get _subtypeCode(){return this.layer?.subtypeCode??null}get _subtypeField(){const{layer:e}=this;return m(e?.parent)?e.subtypeField:null}get _canUseRelatedLayer(){return!(!this._relatedLayerSupportsQuery||!this._relatedLayerSupportsQueryRelated)}get canAddRelatedFeature(){const{state:e,relationship:t,supportsAdd:r,supportsEditing:i}=this;if("loaded"!==e||!t||!r||!i)return!1;const{cardinality:s,role:n}=t,a=this.size>0;return("one-to-one"!==s||!a)&&("one-to-many"!==s||"origin"!==n||!a)}get effectiveOutFields(){const{layer:e,outFields:t}=this;if(!e||!t?.length)return this._defaultOutFields;const r=[];t.forEach(t=>{const i=e.fieldsIndex.normalizeFieldName(t);i&&r.push(i)});const{objectIdField:i}=e,s=e.fieldsIndex.normalizeFieldName(i)??i;return s&&!r.includes(s)&&r.unshift(s),r}get effectiveSize(){const{_size:e,maxSize:t}=this;return null!=t?Math.min(t,e):e}get effectiveTimeExtent(){const{layer:e,timeExtent:t}=this;return t||e&&"timeExtent"in e&&e.timeExtent||null}get effectiveWhere(){const{layer:e,where:t}=this;return null!=t&&""!==t?t:b(e)&&e.parent?.definitionExpression?e.parent.definitionExpression:e?.definitionExpression||"1=1"}get fieldsWithContingentValues(){const e=this._layerWithContingentValues;return e?this._contingentValuesManager.fieldsWithContingentValues.get(e):void 0}get hasContingentValues(){const e=this.fieldsWithContingentValues;return!!(e&&e.size>0)}get hasInvalidPendingEdits(){return this.hasPendingEdits&&this._pendingEditsAreInvalid}get hasPendingEdits(){return this.pendingEditsCount>0}get isQuerying(){return this._queryOperationQueue.length>0}get isSyncing(){return this.isSyncingFeatureEdits||this.isSyncingAttachmentEdits}get isSyncingAttachmentEdits(){return this._attachmentsOperationQueue.length>0}get isSyncingFeatureEdits(){return this._editOperationQueue.length>0}get itemCache(){return new n({items:[...this.pageCache.values()].flat()})}get layerView(){const{layer:e,view:t}=this;if(!e||!t)return null;const r="sublayer"===e.type||b(e)?e.parent:e;return t.allLayerViews.find(e=>e.layer===r)}get orderByFields(){const{_sortedFieldNames:e,layer:t,sortOrders:r}=this,i=r.filter(({fieldName:t,direction:r},i)=>e.indexOf(t)===i&&null!=r).map(({fieldName:e,direction:t})=>`${e} ${t?.toUpperCase()}`);if(t&&!i.length&&!t.objectIdField&&t.fields?.length){const e=t.fields.find(e=>e.name);if(e){const r=t.fieldsIndex.normalizeFieldName(e.name);r&&i.push(`${r} ASC`)}}return i}get pageCount(){const{effectiveSize:e,pageSize:t}=this;return 0===e||0===t?1:Math.ceil(e/t)}get pageIndex(){return this._get("pageIndex")||0}set pageIndex(e){const{pageCount:t}=this;A(e,t)&&this._set("pageIndex",e)}get pendingEditsCount(){let e=0;return this._pendingEditsCache.forEach(t=>e+=t.changes.size),e}get relationship(){const{relationshipConfig:e}=this;return null==e?.relationshipId?null:this.relationships?.find(t=>t.id===e.relationshipId)}get relationshipIds(){return this.relationships?.map(e=>e.id)??[]}get relationshipInfos(){const{_layerWithRelationships:e,relatedRecordsEnabled:t,relationships:r,view:i}=this,s=[];return t&&e?.loaded&&i?.map&&r?.length?(r.forEach(t=>{const r=j(e,i,t);r&&(r.load(),s.push({layer:e,relatedLayer:r,relationshipId:t.id}))}),s):s}get relationships(){return this._layerWithRelationships?.relationships}get size(){return this._size}get state(){const{layer:e,_loaded:t,_loadError:r,_loading:i}=this;return!e||e.destroyed?"disabled":r||e.loadError?"error":"loaded"===e.loadStatus&&t?"loaded":i?"loading":"ready"}get supportsAdd(){return!!this._capabilities?.operations.supportsAdd}get supportsAddAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsAttachments(){const{_capabilities:e}=this;return!(!e?.data?.supportsAttachment||!e?.operations.supportsQueryAttachments)}get supportsCacheHint(){return!!this._capabilities?.query?.supportsCacheHint}get supportsCacheHintQueryRelated(){return!!this._capabilities?.queryRelated?.supportsCacheHint}get supportsDelete(){return!!this._capabilities?.operations.supportsDelete}get supportsEditing(){return!!this._capabilities?.operations.supportsEditing}get supportsM(){return!!this.layer?.hasM&&!!this._capabilities?.data?.supportsM}get supportsOrderBy(){return!!this._capabilities?.query?.supportsOrderBy}get supportsPagination(){return!!this._capabilities?.query?.supportsPagination}get supportsQuery(){return!!this._capabilities?.operations.supportsQuery}get supportsQueryRelated(){const{_capabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get supportsResizeAttachments(){const{_capabilities:e}=this;return!(!this.supportsAttachments||!e?.attachment?.supportsResize)}get supportsUpdate(){return!!this._capabilities?.operations.supportsUpdate}get supportsUpdateAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsZ(){return!!this.layer?.hasZ&&!!this._capabilities?.data?.supportsZ}async addAttachment(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsAddAttachments)return{};const i=await this._queueAttachmentsOperation(e,()=>r.addAttachment(this._createBaseGraphic(r,e),t));return this._ensureArrayContent(i)}addPendingEdits(e){const t=this._ensureLayerAndUpdateSupport();this.editingEnabled?(this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),this._stashPendingEdits(t,e)):this._logWarning("store:editing-disabled","Editing is disabled.")}async deleteAttachments(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsUpdateAttachments||!t.length)return[];const i=await this._queueAttachmentsOperation(e,()=>r.deleteAttachments(this._createBaseGraphic(r,e),t));return this._ensureArray(i)}async deleteRowsByObjectId(e){const{_layerWithEditing:t}=this;if(!this.supportsDelete||!t)throw new a("store:delete-error","Delete is not supported.");const r=e.map(e=>this.getItemByObjectId(e)?.feature).filter(s),i=this._queueEditOperation(()=>t.applyEdits({deleteFeatures:r}));return e.forEach(e=>this.featureTitleMap.delete(e)),i}discardPendingEdits(e){if(e?.length)e.forEach(e=>this._discardPendingEdit(e));else{for(const[e,t]of this._pendingEditsCache){const r=this.getItemByObjectId(e);r&&(r.feature=t.originalFeature)}this._pendingEditsCache.clear(),this._clearOptionsAndViolations()}}itemHasInvalidPendingEdits(e,t){if(!this.hasInvalidPendingEdits)return!1;const r=this._layerWithContingentValues,i=this._pendingEditsCache.get(e);if(!r||!i)return!1;const s=this._getFeatureWithPendingEdits(e,i),n=this._contingentValuesManager;return t?!!n.getViolationForField(r,s,t):!!n.getAllViolations(r,s)}itemHasPendingEdits(e,t){const r=this._pendingEditsCache.get(e);return!!r&&(!t||r.changes.has(t))}async fetchItems(e){const{page:t}=e,{pageSize:r}=this,i=t*r,s=i+r,{layer:n,state:a}=this;return n&&"loaded"===a&&0!==this.maxSize?this._query({layer:n,start:i,num:s,page:t,pageSize:r}):[]}async getAttachmentsByObjectId(e,t){const r=this.getItemByObjectId(e)?.attachments??[];if(!r.length&&t){return(await this._queryAttachments([e]))[e]??[]}return r}getFieldValueOptions(e){return this._contingentValuesManager.getFieldValueOptions(e)}async getFeatureTitle(e,r=!1){const{layer:i}=this,s=this.featureTitleMap.get(e),n=`${e}`;if(!i)return s||n;if(s&&!r)return s;if(!("getFeatureTitle"in i)||!i.getFeatureTitle)return n;const a=this.getItemByObjectId(e);let o=a?.feature;o||(o=new t({attributes:{[i.objectIdField]:e},origin:i.graphicOrigin}));const l=await i.getFeatureTitle(o,{fetchMissingFields:!0,removeHTML:!0});return l?(this.featureTitleMap.set(e,l),l):n}getItemByObjectId(e){for(const t of this.pageCache.values())for(const r of t)if(r.objectId===e)return r}getItemIndexByObjectId(e){const{pageCache:t,pageSize:r}=this,i=t.entries();let s=-1;for(const[n,a]of i)if(a.some((t,i)=>{const a=t.objectId===e;return a&&(s=n*r+i),a}),s>-1)break;return s}async load(){const{layer:e}=this;if(!this._loading&&!this._loaded&&e){this._reset(),this._loading=!0;try{await e.load(),e.parent&&m(e.parent)&&await e.parent.loadAll(),await e.when();const t=this.initialSize;this.initialSize=null,await this.refresh(t),this._loaded=!0,this._loading=!1}catch(t){throw this._reset(),this._loadError=!0,this._logError("store:load-error","An error occurred."),t}}}async query(e){const{state:t}=this;return this.supportsQuery&&"loaded"===t?this._query(e):[]}async refresh(e){this._clearCaches(),await this._syncSize(e),await this._syncObjectIdCache(),this._syncPendingEdits()}reset(){this._reset()}async savePendingEdits(){if(!this.hasPendingEdits)return;if(!this._canSavePendingEdits)return void this._logError("store:update-error","An error occurred. Unable to save pending edits.");const e=[];for(const[t]of this._pendingEditsCache){const r=this.getItemByObjectId(t);r?.feature&&e.push(r.feature)}await this._savePendingEdits(e),this._clearOptionsAndViolations()}async updateAttachment(e,t,r){const{_layerWithAttachmentsEditing:i}=this;if(!i||!this.supportsUpdateAttachments)return{};const s=await this._queueAttachmentsOperation(e,()=>i.updateAttachment(this._createBaseGraphic(i,e),t,r));return this._ensureArrayContent(s)}async updateItem(e){const t=this._ensureLayerAndUpdateSupport();if(!this.editingEnabled)return void this._logWarning("store:editing-disabled","Editing is disabled.");if(this.hasContingentValues){const t=e.updates.some(e=>this.fieldsWithContingentValues?.has(e.fieldName)),r=this.itemHasPendingEdits(e.objectId);if(r||t){const t=this._layerWithContingentValues,i=this.getItemByObjectId(e.objectId)?.feature?.clone();if(i){const s=this._contingentValuesManager.getAllViolations(t,i);e.updates.forEach(({fieldName:e,value:r})=>{const s=t.getField(e);s&&(i.attributes[s.name]=r)});if(this._contingentValuesManager.validateContingencyConstraints(t,i).length||s.length||r)return this._stashPendingEdits(t,[e]),void this._contingentValuesManager.resetOptionsForLayer(t)}}}if(!this.autoSaveEnabled)return void this._stashPendingEdits(t,[e]);const{_sortedFieldNames:r}=this,i=e.updates.map(({fieldName:e})=>e);!(await this._update(t,e)).updateFeatureResults.find(e=>e.error)&&i.some(e=>r.includes(e))&&this._clearCaches()}async verifyFeaturesByObjectId(e){const{layer:t,state:r}=this;if(!t||"loaded"!==r)return[];const{objectIdField:i}=t,s=await this._queryFeaturesByObjectId(e);return e.map(e=>s.some(t=>{const r=t.getObjectId()??t.attributes[i];return e===r}))}_clearCaches(){this.pageCache.clear(),this._objectIdCache.removeAll()}_createBaseGraphic(e,r){const i=new t({attributes:{[e.objectIdField]:r}});return this._subtypeField&&null!=this._subtypeCode&&(i.attributes[this._subtypeField]=this._subtypeCode),i}_ensureArray(e){return Array.isArray(e)?e:[e]}_ensureArrayContent(e){return Array.isArray(e)?e[0]:e}_getObjectIdsForPage(e,t){const r=this._objectIdCache.toArray();return r.length>=e+t?r.slice(e,e+t):r.slice(e)}_logError(e,t){l.getLogger(this).error(e,t)}_logWarning(e,t,r=!1){r?l.getLogger(this).warnOnce(e,t):l.getLogger(this).warn(e,t)}_reset(){this._clearCaches(),this._pendingEditsCache.clear(),this.failures.removeAll(),this._attachmentsOperationQueue.removeAll(),this._editOperationQueue.removeAll(),this._queryOperationQueue.removeAll(),this.featureTitleMap.clear(),this._loading=!1,this._loaded=!1,this._loadError=!1,this._size=0}async _syncSize(e){0!==this.maxSize?this._size=e??await this._queryCount():this._size=0}async _syncObjectIdCache(){if(this.supportsPagination)return;const e=await this._queryObjectIds();this._objectIdCache.removeAll(),this._objectIdCache.addMany(e)}async _queryFeaturesByObjectId(e){const{layer:t}=this;if(!t||!this.supportsQuery)throw new a("store:query-error","Layer does not support query operation.");const{effectiveTimeExtent:r,effectiveWhere:i,orderByFields:s,supportsCacheHint:n,supportsOrderBy:o}=this,l=t.createQuery();l.where=i,l.timeExtent=r,l.returnGeometry=!1,l.objectIds=e.length?e:void 0,l.outFields=[t.objectIdField],o&&(l.orderByFields=s),n&&(l.cacheHint=!0);return(await t.queryFeatures(l)).features}_ensureLayerAndUpdateSupport(){const e=this._layerWithEditing;if(!this.supportsUpdate||!e)throw new a("store:update-error","Update is not supported.");return e}_stashPendingEdits(e,t){t.forEach(({objectId:t,updates:r})=>{const i=this.getItemByObjectId(t)?.feature;if(!i)throw new a("store:update-error","Feature with provided 'objectId' not found.");const s=i.clone(),n=u(this._pendingEditsCache,t,()=>({originalFeature:s,changes:new d}));r.forEach(({fieldName:t,value:r})=>{const s=e.getField(t);s?(n.changes.set(s.name,r),i.attributes[s.name]=r):this._logWarning("store:pending-edit-unknown-field","The provided field does not belong to this layer.")}),n.changes.size>0&&this._pendingEditsCache.set(t,n)})}_syncPendingEdits(){for(const[e,t]of this._pendingEditsCache){const r=this.getItemByObjectId(e)?.feature;if(r){const e=r.clone();for(const[i,s]of t.changes)r.attributes[i]=s;t.originalFeature=e}}}_getFeatureWithPendingEdits(e,t){let r=this.getItemByObjectId(e)?.feature;if(!r){r=t.originalFeature.clone();for(const[e,i]of t.changes)r.attributes[e]=i}return r}_discardPendingEdit({objectId:e,fieldName:t}){const r=this._pendingEditsCache.get(e);if(!r)return void this._logWarning("store:pending-edit-not-found","Could not find a pending edit with the given information");const i=this.getItemByObjectId(e);t?(i&&(i.feature.attributes[t]=r.originalFeature.attributes[t]),r.changes.delete(t),0===r.changes.size&&this._pendingEditsCache.delete(e)):(i&&(i.feature=r.originalFeature),this._pendingEditsCache.delete(e))}_clearOptionsAndViolations(){const{_layerWithContingentValues:e,_contingentValuesManager:t}=this;e&&(t.resetOptionsForLayer(e),t.resetViolationsForLayer(e))}async _update(e,r){const{objectId:i,updates:s}=r,n=this.getItemByObjectId(i)?.feature;if(!n)throw new a("store:update-error","Feature with provided 'objectId' not found.");const l=o(n.attributes);s.forEach(({fieldName:e,value:t})=>l[e]=t);const u=new t({attributes:l,sourceLayer:n.sourceLayer}),d=e.applyEdits({updateFeatures:[u]}).then(e=>{const{updateFeatureResults:t}=e,r=t.find(e=>!!e.error);if(r)throw r.error;return t.length&&(n.attributes=l,this.featureTitleMap.has(i)&&this.getFeatureTitle(i,!0)),e});return this._queueEditOperation(()=>d)}async _savePendingEdits(e){const{_layerWithEditing:t}=this;if(!this.supportsUpdate||!t)throw new a("store:update-error","Update is not supported.");const r=t.applyEdits({updateFeatures:e}).then(e=>{const{updateFeatureResults:t}=e,r=t.filter(e=>!!e.error);if(r.length)throw this.discardPendingEdits(),r[0].error;return e});return this._queueEditOperation(()=>r,!0)}_createFeatureStoreItems(e){const{attachments:t,features:r,layer:i,relatedRecords:s}=e,n=i.objectIdField;return r.map(e=>{const r=e.getObjectId()??e.attributes[n],a=[];e.layer||e.sourceLayer||(e.layer=i,e.sourceLayer=i);const o=this._pendingEditsCache.get(r);if(o){const t=e.clone(),r=o.changes;for(const[i,s]of r)e.attributes[i]=s;o.originalFeature=t}return s.forEach((e,t)=>{a.push({relationshipId:t,count:e[r]??0})}),{objectId:r,feature:e,attachments:t[r]??null,relatedRecords:a}})}async _query(e){const{page:t,refresh:r}=e;!0===r&&await this.refresh();const i=this.pageCache.get(t);if(i)return i;const s=await this._queryPage(e);return this.pageCache.set(t,s),s}_queryAttachments(e){const{_layerWithAttachments:t,effectiveWhere:r}=this;return t?e.some(e=>"number"!=typeof e)?Promise.reject(new a("invalid-object-id","Only numeric object ids are valid to query attachments")):t.queryAttachments(new E({objectIds:e,where:r,returnMetadata:!0})):Promise.resolve({})}async _queryCount(){const{_relatedLayerSupportsCacheHint:e,layer:t,relationshipConfig:r,supportsCacheHint:i}=this;if(!t)return 0;if(r&&this._canUseRelatedLayer){const{objectId:t,relatedLayer:i,relationshipId:s}=r;return(await i.queryRelatedFeaturesCount(new v({cacheHint:e,relationshipId:s,objectIds:[t]})))[t]??0}const{effectiveTimeExtent:s,effectiveWhere:n,filterGeometry:a,objectIds:o}=this,l=t.createQuery();return l.geometry=a,l.returnGeometry=!1,l.where=n,l.timeExtent=s,l.objectIds=o?.length?o:void 0,i&&(l.cacheHint=!0),t.queryFeatureCount(l)}async _queryFeatures(e){const{relationshipConfig:t}=this;if(t&&this._canUseRelatedLayer)return this._queryRelatedFeatures(e,t);const{_effectiveReturnM:r,_effectiveReturnZ:i,effectiveOutFields:s,effectiveTimeExtent:n,effectiveWhere:a,filterGeometry:o,objectIds:l,orderByFields:u,pageSize:d,returnGeometry:p,supportsCacheHint:h,supportsOrderBy:c,supportsPagination:y}=this,{layer:g,start:_}=e,f=l?.length,m=g.createQuery();m.returnGeometry=p,m.outFields=s,m.returnM=r,m.returnZ=i,y?(m.start=_,m.num=d,m.where=a,m.timeExtent=n,m.objectIds=f?l:void 0):m.objectIds=f?l:this._getObjectIdsForPage(_,d??0),c&&(m.orderByFields=u),o&&(m.geometry=o),h&&(m.cacheHint=!0);return(await g.queryFeatures(m)).features}_queryObjectIds(){const{effectiveTimeExtent:e,effectiveWhere:t,filterGeometry:r,layer:i,objectIds:s,orderByFields:n,supportsCacheHint:a,supportsOrderBy:o}=this;if(!i)return Promise.resolve([]);const l=i.createQuery();return l.geometry=r,l.outFields=[i.objectIdField],l.returnGeometry=!1,l.where=t,l.timeExtent=e,l.objectIds=s?.length?s:void 0,o&&(l.orderByFields=n),a&&(l.cacheHint=!0),i.queryObjectIds(l)}async _queryPage(e){const{layer:t}=e;return this._queueQueryOperation(async()=>{const r=await this._queryFeatures(e),i=r.map(e=>e.getObjectId()??e.attributes[t.objectIdField]),s=await this._queryAttachments(i),n=await this._queryRelatedCounts(i);return this._createFeatureStoreItems({layer:t,features:r,attachments:s,relatedRecords:n})||[]})}async _queryRelatedCounts(e){const{_layerWithRelationships:t,relationshipIds:r,supportsCacheHintQueryRelated:i}=this,s=new Map;return t&&e?.length&&r.length?(await Promise.allSettled(r.map(async r=>{const n=await t.queryRelatedFeaturesCount(new v({cacheHint:i,relationshipId:r,objectIds:e}));s.set(r,n)})),s):s}async _queryRelatedFeatures(e,t){const{_defaultOutFields:r,_effectiveReturnM:i,_effectiveReturnZ:s,orderByFields:n,pageSize:a,returnGeometry:o,supportsCacheHint:l}=this,{layer:u,start:d}=e,{objectId:p,relatedLayer:h,relationshipId:c}=t,y=u.createQuery(),g=new v({cacheHint:l,num:a,objectIds:[p],orderByFields:n,outFields:r,relationshipId:c,returnGeometry:o,returnM:i,returnZ:s,start:d,where:y.where??void 0}),_=await h.queryRelatedFeatures(g);return _[p]?.features||[]}_queueAttachmentsOperation(e,t){return this._attachmentsOperationQueue.push(t),t().then(async r=>{this._attachmentsOperationQueue.remove(t);const i=this._ensureArray(r),s=i.some(e=>e.error),n=this.getItemByObjectId(e);if(n&&(!s||i.length>1)){const t=await this._queryAttachments([e]);n.attachments=t[e]}return r}).catch(async r=>{this._logError("store:attachment-error","An error occurred.");const i={error:r,retry:()=>{this.failures.remove(i),this._queueAttachmentsOperation(e,t)},cancel:()=>this.failures.remove(i)};throw this.failures.add(i),this._attachmentsOperationQueue.remove(t),r})}_queueEditOperation(e,t=!1){return this._editOperationQueue.push(e),e().then(r=>(this._editOperationQueue.remove(e),t&&this._pendingEditsCache.clear(),r)).catch(t=>{this._logError("store:edit-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueEditOperation(e)},cancel:()=>this.failures.remove(r)};throw this.failures.add(r),this._editOperationQueue.remove(e),t})}_queueQueryOperation(e){return this._queryOperationQueue.push(e),e().then(t=>this._queryOperationQueue.includes(e)?t:[]).catch(t=>{this._logError("store:query-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueQueryOperation(e)},cancel:()=>this.failures.remove(r)};return this.failures.add(r),[]}).then(t=>(this._queryOperationQueue.remove(e),t))}};e([y()],S.prototype,"_attachmentsOperationQueue",void 0),e([y({readOnly:!0})],S.prototype,"_capabilities",null),e([y()],S.prototype,"_canSavePendingEdits",null),e([y()],S.prototype,"_contingentValuesManager",void 0),e([y()],S.prototype,"_defaultOutFields",void 0),e([y()],S.prototype,"_editOperationQueue",void 0),e([y()],S.prototype,"_effectiveReturnZ",null),e([y()],S.prototype,"_effectiveReturnM",null),e([y()],S.prototype,"featureTitleMap",void 0),e([y({readOnly:!0})],S.prototype,"_layerWithAttachments",null),e([y({readOnly:!0})],S.prototype,"_layerWithAttachmentsEditing",null),e([y()],S.prototype,"_layerWithContingentValues",null),e([y({readOnly:!0})],S.prototype,"_layerWithEditing",null),e([y({readOnly:!0})],S.prototype,"_layerWithRelationships",null),e([y()],S.prototype,"_loaded",void 0),e([y()],S.prototype,"_loadError",void 0),e([y()],S.prototype,"_loading",void 0),e([y()],S.prototype,"_objectIdCache",void 0),e([y()],S.prototype,"_pendingEditsCache",void 0),e([y()],S.prototype,"_pendingEditsAreInvalid",null),e([y()],S.prototype,"_queryOperationQueue",void 0),e([y({readOnly:!0})],S.prototype,"_relatedLayer",null),e([y({readOnly:!0})],S.prototype,"_relatedLayerCapabilities",null),e([y({readOnly:!0})],S.prototype,"_relatedLayerSupportsCacheHint",null),e([y()],S.prototype,"_relatedLayerSupportsQuery",null),e([y()],S.prototype,"_relatedLayerSupportsQueryRelated",null),e([y()],S.prototype,"_size",void 0),e([y()],S.prototype,"_sortedFieldNames",null),e([y()],S.prototype,"_subtypeCode",null),e([y()],S.prototype,"_subtypeField",null),e([y()],S.prototype,"_canUseRelatedLayer",null),e([y()],S.prototype,"attachmentsEnabled",void 0),e([y()],S.prototype,"autoSaveEnabled",void 0),e([y()],S.prototype,"canAddRelatedFeature",null),e([y()],S.prototype,"editingEnabled",void 0),e([y()],S.prototype,"effectiveOutFields",null),e([y()],S.prototype,"effectiveSize",null),e([y()],S.prototype,"effectiveTimeExtent",null),e([y()],S.prototype,"effectiveWhere",null),e([y({readOnly:!0})],S.prototype,"failures",void 0),e([y()],S.prototype,"fieldsWithContingentValues",null),e([y()],S.prototype,"filterByViewExtent",void 0),e([y({types:_})],S.prototype,"filterGeometry",void 0),e([y()],S.prototype,"hasContingentValues",null),e([y()],S.prototype,"hasInvalidPendingEdits",null),e([y()],S.prototype,"hasPendingEdits",null),e([y()],S.prototype,"initialSize",void 0),e([y({readOnly:!0})],S.prototype,"isQuerying",null),e([y({readOnly:!0})],S.prototype,"isSyncing",null),e([y({readOnly:!0})],S.prototype,"isSyncingAttachmentEdits",null),e([y({readOnly:!0})],S.prototype,"isSyncingFeatureEdits",null),e([y({readOnly:!0})],S.prototype,"itemCache",null),e([y()],S.prototype,"layer",void 0),e([y()],S.prototype,"layerView",null),e([y()],S.prototype,"maxSize",void 0),e([y()],S.prototype,"objectIds",void 0),e([y()],S.prototype,"orderByFields",null),e([y()],S.prototype,"outFields",void 0),e([y({readOnly:!0})],S.prototype,"pageCache",void 0),e([y()],S.prototype,"pageCount",null),e([y()],S.prototype,"pageIndex",null),e([y()],S.prototype,"pageSize",void 0),e([y()],S.prototype,"paginationEnabled",void 0),e([y()],S.prototype,"pendingEditsCount",null),e([y()],S.prototype,"relationship",null),e([y()],S.prototype,"relationshipConfig",void 0),e([y()],S.prototype,"relationshipIds",null),e([y()],S.prototype,"relationshipInfos",null),e([y()],S.prototype,"relationships",null),e([y()],S.prototype,"relatedRecordsEnabled",void 0),e([y()],S.prototype,"returnGeometry",void 0),e([y()],S.prototype,"returnZ",void 0),e([y()],S.prototype,"returnM",void 0),e([y({readOnly:!0})],S.prototype,"size",null),e([y()],S.prototype,"sortOrders",void 0),e([y({readOnly:!0})],S.prototype,"state",null),e([y()],S.prototype,"supportsAdd",null),e([y()],S.prototype,"supportsAddAttachments",null),e([y()],S.prototype,"supportsAttachments",null),e([y()],S.prototype,"supportsCacheHint",null),e([y()],S.prototype,"supportsCacheHintQueryRelated",null),e([y()],S.prototype,"supportsDelete",null),e([y()],S.prototype,"supportsEditing",null),e([y()],S.prototype,"supportsM",null),e([y()],S.prototype,"supportsOrderBy",null),e([y()],S.prototype,"supportsPagination",null),e([y()],S.prototype,"supportsQuery",null),e([y()],S.prototype,"supportsQueryRelated",null),e([y()],S.prototype,"supportsResizeAttachments",null),e([y()],S.prototype,"supportsUpdate",null),e([y()],S.prototype,"supportsUpdateAttachments",null),e([y()],S.prototype,"supportsZ",null),e([y({type:I})],S.prototype,"timeExtent",void 0),e([y()],S.prototype,"timeZone",void 0),e([y()],S.prototype,"view",void 0),e([y()],S.prototype,"where",void 0),S=e([g("esri.widgets.FeatureTable.support.FeatureStore")],S);const R=S;export{R as default};
|
|
@@ -36,7 +36,7 @@ import type { TableTemplateProperties } from "./FeatureTable/support/TableTempla
|
|
|
36
36
|
import type { TimeExtentProperties } from "../time/TimeExtent.js";
|
|
37
37
|
import type { VisibleElementsProperties } from "./FeatureTable/VisibleElements.js";
|
|
38
38
|
|
|
39
|
-
export interface FeatureTableProperties extends WidgetProperties, Partial<Pick<FeatureTable, "actionColumnConfig" | "attachmentsEnabled" | "attachmentsViewOptions" | "autoRefreshEnabled" | "autoSaveEnabled" | "columnPerformanceModeEnabled" | "columnReorderingEnabled" | "definitionExpression" | "description" | "disabled" | "editingEnabled" | "filterBySelectionEnabled" | "filterByViewExtent" | "highlightEnabled" | "initialSize" | "layer" | "layers" | "maxSize" | "menuConfig" | "multipleSelectionEnabled" | "multipleSortPriority" | "multiSortEnabled" | "navigationScale" | "noDataMessage" | "outFields" | "pageSize" | "paginationEnabled" | "relatedRecordsEnabled" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "selectionManager" | "syncTemplateOnChangesEnabled" | "syncViewSelection" | "syncWithViewSelectionManager" | "timeZone" | "title" | "view">> {
|
|
39
|
+
export interface FeatureTableProperties extends WidgetProperties, Partial<Pick<FeatureTable, "actionColumnConfig" | "attachmentsEnabled" | "attachmentsViewOptions" | "autoRefreshEnabled" | "autoSaveEnabled" | "closed" | "collapsed" | "columnPerformanceModeEnabled" | "columnReorderingEnabled" | "definitionExpression" | "description" | "disabled" | "editingEnabled" | "filterBySelectionEnabled" | "filterByViewExtent" | "highlightEnabled" | "initialSize" | "layer" | "layers" | "maxSize" | "menuConfig" | "multipleSelectionEnabled" | "multipleSortPriority" | "multiSortEnabled" | "navigationScale" | "noDataMessage" | "outFields" | "pageSize" | "paginationEnabled" | "relatedRecordsEnabled" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "selectionManager" | "syncTemplateOnChangesEnabled" | "syncViewSelection" | "syncWithViewSelectionManager" | "timeZone" | "title" | "view">> {
|
|
40
40
|
/**
|
|
41
41
|
* Use this property to configure how columns display within the table in regard to visibility, column order, and sorting.
|
|
42
42
|
*
|
|
@@ -814,6 +814,20 @@ export default class FeatureTable extends Widget<FeatureTableProperties> {
|
|
|
814
814
|
* @since 5.0
|
|
815
815
|
*/
|
|
816
816
|
get canAddRelatedFeature(): boolean;
|
|
817
|
+
/**
|
|
818
|
+
* Indicates whether the primary panel is closed.
|
|
819
|
+
*
|
|
820
|
+
* @default false
|
|
821
|
+
* @since 5.1
|
|
822
|
+
*/
|
|
823
|
+
accessor closed: boolean;
|
|
824
|
+
/**
|
|
825
|
+
* Indicates whether the primary panel is collapsed.
|
|
826
|
+
*
|
|
827
|
+
* @default false
|
|
828
|
+
* @since 5.1
|
|
829
|
+
*/
|
|
830
|
+
accessor collapsed: boolean;
|
|
817
831
|
/**
|
|
818
832
|
* Indicates whether to enable the table's column performance mode. This mode is designed to improve the performance of the table when working with a large number of columns.
|
|
819
833
|
*
|