@arcgis/core 5.2.0-next.137 → 5.2.0-next.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/LineOfSightAnalysisObserver.d.ts +12 -0
- package/analysis/LineOfSightAnalysisObserver.js +1 -1
- package/analysis/LineOfSightAnalysisTarget.d.ts +12 -0
- package/analysis/LineOfSightAnalysisTarget.js +1 -1
- package/arcade/featureset/sources/FeatureLayerParquet.js +1 -1
- package/arcgisGlobal.d.ts +4 -0
- package/assets/components/assets/icon/blockHeightMedium16.json +1 -0
- package/assets/components/assets/icon/blockHeightMedium24.json +1 -0
- package/assets/components/assets/icon/blockHeightMedium32.json +1 -0
- package/assets/components/assets/icon/blockHeightShort16.json +1 -0
- package/assets/components/assets/icon/blockHeightShort24.json +1 -0
- package/assets/components/assets/icon/blockHeightShort32.json +1 -0
- package/assets/components/assets/icon/blockHeightTall16.json +1 -0
- package/assets/components/assets/icon/blockHeightTall24.json +1 -0
- package/assets/components/assets/icon/blockHeightTall32.json +1 -0
- package/assets/components/assets/icon/cursorCircle16.json +1 -0
- package/assets/components/assets/icon/cursorCircle24.json +1 -0
- package/assets/components/assets/icon/cursorCircle32.json +1 -0
- package/assets/components/assets/icon/dictionary16.json +1 -0
- package/assets/components/assets/icon/dictionary24.json +1 -0
- package/assets/components/assets/icon/dictionary32.json +1 -0
- package/assets/components/assets/icon/jobDependency16.json +1 -0
- package/assets/components/assets/icon/jobDependency24.json +1 -0
- package/assets/components/assets/icon/jobDependency32.json +1 -0
- package/assets/components/assets/icon/referenceChip16.json +1 -0
- package/assets/components/assets/icon/referenceChip24.json +1 -0
- package/assets/components/assets/icon/referenceChip32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4e6f95d8c624d513849a.js → 05963f57cbe5a5249496.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b8681ca4a83e97f1f71.js → 067de1910190da228291.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c0fd1c6cda44e9f40ab.js → 070684943698fa43c2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc1cb4b9a02e6c78deb7.js → 076e8d2e08ff2a013736.js} +1 -1
- package/assets/esri/core/workers/chunks/{c10e040368065411506a.js → 10445313d0d57b34511b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d537c59b46cdaaf66034.js → 1188d0a136fffc009643.js} +1 -1
- package/assets/esri/core/workers/chunks/{20af3f085f60c32c6c53.js → 178083d8ed7707b45ca2.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5efe3e800c6e23efcf3.js → 1819c45655c836b9a8d7.js} +1 -1
- package/assets/esri/core/workers/chunks/1b946714ca4a1a7359d4.js +2 -0
- package/assets/esri/core/workers/chunks/{d8d8b38ac8a91d9e45fc.js → 1cc744ab5eee5ee3bed8.js} +1 -1
- package/assets/esri/core/workers/chunks/{05e39b4de7f62c5b22cc.js → 20f75cc777af13fa249b.js} +1 -1
- package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +2 -0
- package/assets/esri/core/workers/chunks/34570e6bbf559f18c1a5.js +1 -0
- package/assets/esri/core/workers/chunks/{60f6d5da9480dd36e877.js → 3dddae78286d05eb10fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{9efd30bbd02ec0d1031b.js → 3ec3589f6e74d7cb87cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bec054fca104f3bf141.js → 3f776d9fd2ab68b21fca.js} +1 -1
- package/assets/esri/core/workers/chunks/402a82c77420254831bc.js +1 -0
- package/assets/esri/core/workers/chunks/{e2ebf0ea3af2e6907987.js → 406f24ec13eb30d43405.js} +1 -1
- package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +1 -0
- package/assets/esri/core/workers/chunks/{ddedc414bb478b376221.js → 46b2d4addfc73f9183a4.js} +1 -1
- package/assets/esri/core/workers/chunks/498d6dfd3bb0d3490548.js +1 -0
- package/assets/esri/core/workers/chunks/{36ef86701883a20dd6f6.js → 4a640548032355e57acd.js} +1 -1
- package/assets/esri/core/workers/chunks/5566f14afb63065e438f.js +1 -0
- package/assets/esri/core/workers/chunks/{c3b96d1d43afccd23e45.js → 590e6c70206122e4cc3c.js} +2 -2
- package/assets/esri/core/workers/chunks/{54860dd53a46cf4c47f3.js → 59295b99bdff4045a0e7.js} +1 -1
- package/assets/esri/core/workers/chunks/5aeb5e18514644fe2cf9.js +1 -0
- package/assets/esri/core/workers/chunks/{5da86409d70098fc6a10.js → 5b3cfe95314a75a735c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a54678bfa0f1807b61cd.js → 5c855af73ee3c3e764fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8b7e6198c2d0c37c9a0.js → 5e90c1b49f2b7e21d05a.js} +4 -4
- package/assets/esri/core/workers/chunks/{30f808cac8a34f95ea6e.js → 6079d27f4ab319fb8f0c.js} +1 -1
- package/assets/esri/core/workers/chunks/66c2a28a851130b87c04.js +1 -0
- package/assets/esri/core/workers/chunks/{dac90b3631f7f7158f68.js → 67f15538c51838201fc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{cfaba0470619786e1ef8.js → 68d8ae42ab71d01a70a5.js} +2 -2
- package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +1 -0
- package/assets/esri/core/workers/chunks/{864e7030c4ddbfcf0114.js → 6ccf9535013fe672c93b.js} +1 -1
- package/assets/esri/core/workers/chunks/{ba7f0cf7e495d3ec2d55.js → 6e62581d933e7298d1f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{83b5dd4029e00abd80bf.js → 700b1d5bc67b7e1b3ff3.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9fea72cc222a30ef2f9.js → 72399062767abdfb0bee.js} +1 -1
- package/assets/esri/core/workers/chunks/{2a7fbfd77002a24bf737.js → 747461bb6a1bc2f0a64d.js} +1 -1
- package/assets/esri/core/workers/chunks/{c333f6ed42985bb2b11f.js → 7851aef196eea5d6c94e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0b6bd6fab5320c3082f.js → 7a05b18f655c1167ce0a.js} +1 -1
- package/assets/esri/core/workers/chunks/{04296b75d0f81fbd1bb5.js → 864194927d05ebc4cc31.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c4a13a9f0b305394a26.js → 876f7633c15f1e31078d.js} +1 -1
- package/assets/esri/core/workers/chunks/{62298dba3f6cbdc3f4ae.js → 879b2f0ff1977bca9376.js} +1 -1
- package/assets/esri/core/workers/chunks/{b547b3bce729c9dac90d.js → 898359be6996fd9763b8.js} +1 -1
- package/assets/esri/core/workers/chunks/8cb716f110d164030309.js +1 -0
- package/assets/esri/core/workers/chunks/8dc1c3042267618fd710.js +2 -0
- package/assets/esri/core/workers/chunks/{625f02db93d7fbf175ca.js → 9001e9a1e81bce175ddd.js} +1 -1
- package/assets/esri/core/workers/chunks/{9ffa6c8d93d3443834c6.js → 912080c90b5cc2e817cf.js} +1 -1
- package/assets/esri/core/workers/chunks/96c50a0dda0f1503ef92.js +2 -0
- package/assets/esri/core/workers/chunks/{13e4379441499599c3b5.js → 9cbde13e536676767900.js} +1 -1
- package/assets/esri/core/workers/chunks/{408db4f32850b77264ae.js → 9cd3fcb5fca6f9dbbcd8.js} +1 -1
- package/assets/esri/core/workers/chunks/a054da6cbd8ee4774a57.js +1 -0
- package/assets/esri/core/workers/chunks/{468fa166608ffc9108d9.js → a05790444115e4cf1bcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1f2685782b423ef87a6.js → a556dd4e9e6d35e33a2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{00d576d355599c88931e.js → bc38def1983089514e4b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0725e515f3004bdd5c56.js → ca2adcbcf44454484fd5.js} +1 -1
- package/assets/esri/core/workers/chunks/{f3507b9e831ffd7a6bf8.js → cca8bd07bcd1d267a2e8.js} +1 -1
- package/assets/esri/core/workers/chunks/cfae60b9d2f2939e9c16.js +1 -0
- package/assets/esri/core/workers/chunks/{1d6b2a64f4e40e5cc13d.js → d201fbf3ceff946d2bd6.js} +1 -1
- package/assets/esri/core/workers/chunks/{4439078780d9ba49fd26.js → d51bb11baadc741c46bc.js} +1 -1
- package/assets/esri/core/workers/chunks/db1ab9b9c8bf5c7635d3.js +1 -0
- package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +1 -0
- package/assets/esri/core/workers/chunks/e630f3c56c077cb2bd8e.js +1 -0
- package/assets/esri/core/workers/chunks/e81173724e8de8c1e65b.js +1 -0
- package/assets/esri/core/workers/chunks/{2025288bed125594ceda.js → f6e62d2d279a328cbed7.js} +1 -1
- package/assets/esri/core/workers/chunks/{47c19778fcee7154ca38.js → f8bc474434fd365ab174.js} +1 -1
- package/assets/esri/core/workers/chunks/{9a20dc26cb9c7b2087cf.js → f95a1f878c9c1146180e.js} +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-TW.json +1 -1
- package/chunks/Bufferer-CclWhXVb.js +1 -1
- package/chunks/Component.glsl.js +3 -3
- package/chunks/DefaultMaterial.glsl.js +2 -2
- package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/FocusArea.glsl.js +8 -10
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/GeometryCleaner-CIE8Wfmb.js +1 -1
- package/chunks/LineMarker.glsl.js +35 -42
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorAffineTransform.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorDistance.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorGraphicBuffer.js +1 -1
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/Path.glsl.js +2 -2
- package/chunks/Point2D.js +1 -1
- package/chunks/RealisticTree.glsl.js +2 -2
- package/chunks/RibbonLine.glsl.js +50 -56
- package/chunks/SideCalculator2D-DX0718xq.js +1 -1
- package/chunks/Terrain.glsl.js +2 -2
- package/chunks/Transformation2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/editing/fieldUtils.d.ts +12 -0
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/interfaces.d.ts +15 -18
- package/kernel.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/list/LayerItemCollection.d.ts +1 -0
- package/layers/list/types.d.ts +5 -1
- package/layers/support/TimeSeriesCalculation.d.ts +1 -1
- package/layers/support/TimeSeriesCalculation.js +1 -1
- package/layers/support/dataSeriesUtils.d.ts +10 -0
- package/layers/support/timeSeriesUtils.js +17 -6
- package/libs/lyr3d/Lyr3DModule.js +1 -1
- package/networks/UtilityNetwork.d.ts +15 -0
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +4 -4
- package/popup/FeatureContent.d.ts +14 -1
- package/popup/FeatureContent.js +1 -1
- package/popup/FeatureContentCollection.d.ts +4 -10
- package/popup/FeatureContentCollection.js +1 -1
- package/popup/actions.js +1 -1
- package/popup/support/featureUtils.js +1 -1
- package/renderers/support/RenderingInfo.js +1 -1
- package/renderers/support/renderingInfoUtils.js +1 -1
- package/renderers/visualVariables/SizeVariable.d.ts +16 -20
- package/renderers/visualVariables/support/SizeStop.d.ts +6 -2
- package/rest/networks/support/TraceLocation.js +1 -1
- package/rest/networks/support/TraceResult.d.ts +7 -0
- package/rest/networks/support/TraceResult.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/opacity.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
- package/smartMapping/statistics/histogramForTimeSeries.d.ts +11 -0
- package/smartMapping/statistics/histogramForTimeSeries.js +2 -0
- package/smartMapping/statistics/summaryStatisticsForTimeSeries.d.ts +11 -0
- package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +2 -0
- package/smartMapping/statistics/support/timeSeriesUtils.js +24 -0
- package/smartMapping/statistics/types.d.ts +50 -0
- package/symbols/cim/CIMPlacements.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextParams.js +1 -1
- package/views/2d/layers/SketchLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.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/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/ExceedsLimitCache.js +1 -1
- package/views/2d/layers/features/schema/TimeSchema.js +2 -0
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/2d/types.d.ts +2 -1
- package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +24 -0
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
- package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +12 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/focusArea/FocusArea.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/SelectionManager.d.ts +3 -3
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/options/bindViewToolOptions.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +3 -0
- package/views/interactive/sketch/SketchLabelOptions.js +1 -1
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +3 -0
- package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
- package/views/interactive/sketch/SketchValueOptions.d.ts +3 -0
- package/views/interactive/sketch/SketchValueOptions.js +1 -1
- package/views/interactive/snapping/SnappingOptions.d.ts +3 -0
- package/views/interactive/snapping/SnappingOptions.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
- package/views/layers/SketchLayerView.d.ts +34 -0
- package/views/layers/SketchLayerView.js +2 -0
- package/views/layers/types.d.ts +3 -2
- package/views/selection/types.d.ts +15 -4
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.d.ts +4 -0
- package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +5 -1
- package/widgets/Bookmarks/types.d.ts +2 -0
- package/widgets/Editor/EditorViewModel.d.ts +31 -30
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Editor/types.d.ts +44 -0
- package/widgets/Editor.d.ts +30 -27
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.d.ts +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +6 -0
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Histogram/types.d.ts +10 -2
- package/widgets/HistogramRangeSlider/types.d.ts +4 -1
- package/widgets/LayerList/LayerListViewModel.d.ts +2 -1
- package/widgets/Legend/LegendViewModel.d.ts +2 -0
- package/widgets/Legend/styles/card/CardView.d.ts +2 -0
- package/widgets/Legend/styles/classic/ClassicView.d.ts +4 -1
- package/widgets/Legend.d.ts +3 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +7 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/types.d.ts +9 -0
- package/widgets/OrientedImageryViewer.d.ts +7 -0
- package/widgets/OrientedImageryViewer.js +2 -2
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/ScaleRangeSlider/types.d.ts +9 -2
- package/widgets/Sketch/SketchViewModel.d.ts +32 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.d.ts +27 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slider/types.d.ts +58 -13
- package/widgets/Slider.d.ts +6 -0
- package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.d.ts +3 -0
- package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +2 -0
- package/widgets/smartMapping/types.d.ts +30 -7
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +21 -11
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
- package/widgets/support/FilterBuilder/types.d.ts +28 -0
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +24 -0
- package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
- package/widgets/support/FilterCondition/types.d.ts +16 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/SnappingControls/snappingLayerListUtils.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0606ab6fdfc1dfea3856.js +0 -1
- package/assets/esri/core/workers/chunks/1289204f8ca96032c17a.js +0 -1
- package/assets/esri/core/workers/chunks/12b5a645c0987a0efe54.js +0 -2
- package/assets/esri/core/workers/chunks/17b938ba49fb1e7ab8c4.js +0 -1
- package/assets/esri/core/workers/chunks/1dbb3e25e005a8220779.js +0 -2
- package/assets/esri/core/workers/chunks/3d6fef25af7e1a51e1bd.js +0 -1
- package/assets/esri/core/workers/chunks/55ae00f33f5240a73a50.js +0 -1
- package/assets/esri/core/workers/chunks/74211d096cc3296e0968.js +0 -1
- package/assets/esri/core/workers/chunks/7926faab76a721a2e1c4.js +0 -1
- package/assets/esri/core/workers/chunks/96c3900685cfb2a8ca12.js +0 -1
- package/assets/esri/core/workers/chunks/ad28486bc6afaa346de5.js +0 -1
- package/assets/esri/core/workers/chunks/ad29c729e90b5866713c.js +0 -1
- package/assets/esri/core/workers/chunks/b72a2514aa4cc4ae7d1b.js +0 -1
- package/assets/esri/core/workers/chunks/be761749f8d77fbd9df5.js +0 -1
- package/assets/esri/core/workers/chunks/d4f55e2b1ace7867a3b8.js +0 -1
- package/assets/esri/core/workers/chunks/dbfd25aa0d19aed5890c.js +0 -1
- package/assets/esri/core/workers/chunks/de28a86775235bd5d3c4.js +0 -2
- package/assets/esri/core/workers/chunks/f6cfc901267a229de7a1.js +0 -2
- package/assets/esri/core/workers/chunks/fb147097149a89e671ff.js +0 -1
- package/support/revision.js +0 -2
- /package/assets/esri/core/workers/chunks/{1dbb3e25e005a8220779.js.LICENSE.txt → 1b946714ca4a1a7359d4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f6cfc901267a229de7a1.js.LICENSE.txt → 2a1ec30f9ad305763f81.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c3b96d1d43afccd23e45.js.LICENSE.txt → 590e6c70206122e4cc3c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{cfaba0470619786e1ef8.js.LICENSE.txt → 68d8ae42ab71d01a70a5.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{de28a86775235bd5d3c4.js.LICENSE.txt → 8dc1c3042267618fd710.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{12b5a645c0987a0efe54.js.LICENSE.txt → 96c50a0dda0f1503ef92.js.LICENSE.txt} +0 -0
package/widgets/Editor.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { Icon } from "@esri/calcite-components/components/calcite-icon";
|
|
|
13
13
|
import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
|
|
14
14
|
import type { WidgetProperties } from "./Widget.js";
|
|
15
15
|
import type { EditorViewModelEvents, EditorViewModelProperties } from "./Editor/EditorViewModel.js";
|
|
16
|
-
import type { CancelWorkflowOptions, CreationInfo,
|
|
16
|
+
import type { CancelWorkflowOptions, CreationInfo, EditorStartCreateFeaturesWorkflowAtFeatureEditParameters, EditorStartCreateFeaturesWorkflowAtFeatureTypeSelectionParameters, EditorStartMergeFeaturesWorkflowOptions, EditorStartSplitFeatureWorkflowOptions, FeatureInfo, LayerInfo, SupportingWidgetDefaults } from "./Editor/types.js";
|
|
17
17
|
import type { HeadingLevel } from "./support/types.js";
|
|
18
18
|
import type { SketchLabelOptionsProperties } from "../views/interactive/sketch/SketchLabelOptions.js";
|
|
19
19
|
import type { SnappingOptionsProperties } from "../views/interactive/snapping/SnappingOptions.js";
|
|
@@ -21,7 +21,7 @@ import type { SketchTooltipOptionsProperties } from "../views/interactive/sketch
|
|
|
21
21
|
import type { SketchValueOptionsProperties } from "../views/interactive/sketch/SketchValueOptions.js";
|
|
22
22
|
import type { VisibleElementsProperties } from "./Editor/VisibleElements.js";
|
|
23
23
|
|
|
24
|
-
export interface EditorProperties extends WidgetProperties, Partial<Pick<Editor, "formSystem" | "headingLevel" | "layerInfos" | "selectionManager" | "supportingWidgetDefaults" | "syncViewSelection" | "syncWithViewSelectionManager" | "useLegacyCreateTools" | "view">> {
|
|
24
|
+
export interface EditorProperties extends WidgetProperties, Partial<Pick<Editor, "formSystem" | "headingLevel" | "layerInfos" | "selectionManager" | "supportingWidgetDefaults" | "syncViewSelection" | "syncWithViewSelectionManager" | "useLegacyCreateTools" | "useViewOptions" | "view">> {
|
|
25
25
|
/**
|
|
26
26
|
* Icon which represents the widget. It is typically used when the widget is controlled by another
|
|
27
27
|
* one (e.g. in the Expand widget).
|
|
@@ -570,6 +570,32 @@ export default class Editor extends Widget {
|
|
|
570
570
|
* @since 5.0
|
|
571
571
|
*/
|
|
572
572
|
accessor useLegacyCreateTools: boolean;
|
|
573
|
+
/**
|
|
574
|
+
* Indicates whether to use the snapping, tooltip, display-unit, and input-unit options configured through
|
|
575
|
+
* [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
|
|
576
|
+
*
|
|
577
|
+
* When `true`, snapping and tooltip options are inherited from the view. Options specified through
|
|
578
|
+
* [snappingOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#snappingOptions) and [tooltipOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#tooltipOptions) are preserved but ignored.
|
|
579
|
+
* When `false`, those options are used instead.
|
|
580
|
+
*
|
|
581
|
+
* While this property is `true`, snapping controls and the tooltip toggle are hidden from the settings menu
|
|
582
|
+
* because these options are inherited from the view.
|
|
583
|
+
*
|
|
584
|
+
* Explicit units specified through [valueOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#valueOptions) override the units inherited from the
|
|
585
|
+
* view for the corresponding measurement type, such as length or area, without changing the units configured
|
|
586
|
+
* in the view. Setting an explicit unit to `null` or `undefined` restores inheritance for that measurement type.
|
|
587
|
+
*
|
|
588
|
+
* Label [options](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#labelOptions) and
|
|
589
|
+
* [direction mode](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ValueOptions/#directionMode) are not inherited from the view.
|
|
590
|
+
*
|
|
591
|
+
* Changes to this property apply when the next create or update operation starts, not to an operation already
|
|
592
|
+
* in progress.
|
|
593
|
+
*
|
|
594
|
+
* @default false
|
|
595
|
+
* @beta
|
|
596
|
+
* @since 5.2
|
|
597
|
+
*/
|
|
598
|
+
accessor useViewOptions: boolean;
|
|
573
599
|
/**
|
|
574
600
|
* Options to configure how values are displayed and input when creating or updating graphics.
|
|
575
601
|
*
|
|
@@ -672,12 +698,12 @@ export default class Editor extends Widget {
|
|
|
672
698
|
/**
|
|
673
699
|
* Initiates the [CreateFeaturesWorkflow](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/CreateFeaturesWorkflow/) by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTemplates/) panel.
|
|
674
700
|
*
|
|
675
|
-
* @param
|
|
701
|
+
* @param params - An optional object containing additional configuration information for the create features workflow.
|
|
676
702
|
* @returns Resolves when the [CreateFeaturesWorkflow](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/CreateFeaturesWorkflow/) is initiated
|
|
677
703
|
* and displays the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTemplates/) panel.
|
|
678
704
|
* @since 4.23
|
|
679
705
|
*/
|
|
680
|
-
startCreateFeaturesWorkflowAtFeatureTypeSelection(
|
|
706
|
+
startCreateFeaturesWorkflowAtFeatureTypeSelection(params?: EditorStartCreateFeaturesWorkflowAtFeatureTypeSelectionParameters): Promise<void>;
|
|
681
707
|
/**
|
|
682
708
|
* Starts a [MergeFeaturesWorkflow](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/MergeFeaturesWorkflow/) for the
|
|
683
709
|
* specified features. All features must belong to the same layer.
|
|
@@ -744,29 +770,6 @@ export default class Editor extends Widget {
|
|
|
744
770
|
startUpdateWorkflowAtMultipleFeatureSelection(candidates: Graphic[]): Promise<void>;
|
|
745
771
|
}
|
|
746
772
|
|
|
747
|
-
export interface EditorStartCreateFeaturesWorkflowAtFeatureEditParameters {
|
|
748
|
-
/** The initial feature used when you begin creating features. */
|
|
749
|
-
initialFeature: Graphic;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
export interface EditorStartMergeFeaturesWorkflowOptions {
|
|
753
|
-
/**
|
|
754
|
-
* The feature that the other
|
|
755
|
-
* features will be merged into. This feature will have its geometry updated
|
|
756
|
-
* with the merged geometry. The other features will be deleted.
|
|
757
|
-
*/
|
|
758
|
-
keyFeature?: Graphic;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
export interface EditorStartSplitFeatureWorkflowOptions {
|
|
762
|
-
/** The step to start the workflow at. */
|
|
763
|
-
startAt?: SplitFeatureWorkflowStep;
|
|
764
|
-
/** The preferred Sketch tool to use for drawing the splitter geometry. */
|
|
765
|
-
defaultSplitterGeometryType?: SplitterGeometryType;
|
|
766
|
-
/** The geometry with which to split the input geometry. This is required in order to start the workflow at the "reviewing-features" step. Otherwise, it is ignored. */
|
|
767
|
-
splitterGeometry?: SplitterGeometry;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
773
|
/** This object provides required properties needed when creating a new feature. */
|
|
771
774
|
export type CreateFeaturesCreationInfo = Required<Pick<CreationInfo, "layer" | "template">>
|
|
772
775
|
& Partial<Pick<CreationInfo, "maxFeatures">>;
|
package/widgets/Editor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as n,deprecatedFunction as r}from"../core/deprecate.js";import i from"../core/Logger.js";import{destroyMaybe as a,abortMaybe as o,mappedFind as s}from"../core/maybe.js";import{watch as c,initial as l,on as u,when as d,syncAndInitial as ee}from"../core/reactiveUtils.js";import{property as f,subclass as te}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as ne}from"../core/support/UpdatingHandles.js";import p from"../views/interactive/sketch/SketchLabelOptions.js";import m from"../views/interactive/sketch/SketchTooltipOptions.js";import h from"../views/interactive/sketch/SketchValueOptions.js";import g from"../views/interactive/snapping/SnappingOptions.js";import _ from"./Attachments.js";import v from"./BatchAttributeForm.js";import y from"./FeatureForm.js";import re from"./FeatureTemplates.js";import ie from"./Spinner.js";import ae from"./Widget.js";import oe from"./BatchAttributeForm/VisibleElements.js";import{isNextOrLegacyUpdateWorkflow as b,isNextOrLegacyUpdateFeaturesWorkflow as se,isNextOrLegacyUpdateFeatureWorkflow as ce}from"./Editor/compatibilityAdapters.js";import{css as x}from"./Editor/css.js";import S from"./Editor/EditorViewModel.js";import{isModelUpload as C}from"./Editor/modelUploadUtils.js";import w from"./Editor/VisibleElements.js";import{findEditorItemForLayer as T,isBatchAttributeFormViewModel as E}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as D,CreateFeaturesPanelContent as O}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as k,FeatureList as A}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as j,FooterActions as M}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as N,Notice as P}from"./Editor/components/Notices.js";import{loadPanelContentComponents as F,PanelContent as I,PanelContentSection as L,PanelContentMessage as R}from"./Editor/components/PanelContent.js";import{PanelToolbar as z,loadPanelToolbarComponents as B}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as V,Prompt as H}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as le,UpdateFeaturePanelContent as U}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as W,UploadDetails as ue}from"./Editor/components/UploadDetails.js";import de from"./Sketch/CreateToolVisibilityMap.js";import fe from"./Sketch/SelectionToolVisibilityMap.js";import pe from"./Sketch/VisibleElements.js";import{loadCalciteComponents as me}from"./support/componentsUtils.js";import{globalCss as G}from"./support/globalCss.js";import{incrementHeadingLevel as K,Heading as q}from"./support/Heading.js";import{renderItem as he}from"./support/ItemList.js";import{connectDelayedLoading as J}from"./support/loaderUtils.js";import ge from"./support/SelectionList.js";import _e from"./support/SelectionToolbar.js";import{messageBundle as Y,vmEvent as ve,tsx as X}from"./support/widget.js";import{isLayerItem as Z}from"./support/SelectionList/selectionListUtils.js";import ye from"./support/SelectionList/VisibleElements.js";import be from"./support/SelectionToolbar/VisibleElements.js";const Q=Symbol(`sketch-setup-handles`);let $=class extends ae{constructor(e,r){super(e,r),this._batchAttributeForm=new v({suppressDeprecationWarning:!0,visibleElements:new oe({loadingIndicator:!1})}),this._featureForm=new y({suppressDeprecationWarning:!0}),this._sketchToolbar=null,this._attachments=new _({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1},suppressDeprecationWarning:!0}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new re({suppressDeprecationWarning:!0,enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?X(`calcite-icon`,{class:x.templateItemContentEnd,icon:`upload-to`,key:`upload-icon`}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText=``,this._prompt=null,this._spinner=new ie,this._loading=!1,this._disallowSave=!1,this._selectionList=new ge({displayMode:`layer`,itemActionConfigs:this._selectionListItemActionConfigs,itemUnavailableFunction:({item:e})=>!T(this.editorItems,e.layer)?.editable,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new ye({header:!1})}),this._selectionToolbar=new _e({visibleElements:new be({chip:!1})}),this._updatingHandles=new ne,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=null,this.visibleElements=new w,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?X(`div`,{class:x.sketchContainer,key:`editor-sketch-container`},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>X(`calcite-icon`,{icon:`cursor`,slot:`content-start`}),this.EditorPanel=({heading:e,key:t,selected:n},...r)=>{let{visibleElements:i}=this;return X(`calcite-flow-item`,{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:n,onCalciteFlowItemBack:this._onBack},i.settingsMenu?X(z,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:i}):null,...r)},this._showConfirmationPrompt=e=>this._showPromptAndWait(this.messages[e]),this._showDiscardEditsPrompt=()=>{let{messages:e,activeWorkflow:t}=this,n={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return t?.type===`create-features`&&C(t.data.creationInfo)?this._showPromptAndWait(t.data.upload?.state===`success`?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):t?.type===`update`&&t.formViewModel?.activeAssociationsInput?this._showPromptAndWait({...n,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(n)},this._showGenericCancelPrompt=()=>{let{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onMerge=()=>{let{activeWorkflow:e}=this.viewModel;if(b(e)){let t=e.activeWorkflow;se(t)&&e.startMergingFeatures(t.viewGraphics,{initialFeatures:t.data.initialFeatures})}},this._onSplit=()=>{let{activeWorkflow:e}=this.viewModel;if(b(e)){let t=e.activeWorkflow;if(ce(t)){let n=t.viewGraphic;n&&e.startSplittingFeature(n,{initialFeature:t.data.edits.initialFeature??n})}}},this._onDelete=()=>{let e=this.viewModel.activeFeatureCount,n=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:n.deleteWarningTitle,message:n.deleteWarningMessage,context:`danger`,actions:{primary:{label:t(n.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:n.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{let{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:`danger`,actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{let{activeWorkflow:e}=this.viewModel;e&&(e.type===`create-features`||e.type===`update`&&e.activeWorkflow?.type===`create-features`?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then(()=>e.back()))},this._onAttachmentUpdate=()=>{let{activeWorkflow:e}=this.viewModel;e&&(e.type===`create-features`?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then(()=>e.back()))},this._onAttachmentDelete=()=>{let{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:`danger`,actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{let e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&(t.type===`create-features`?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:`warning`,actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})},this.viewModel=e?.viewModel||new S({useLegacyCreateTools:e?.useLegacyCreateTools??e?.view?.type===`3d`,formSystem:e?.formSystem??`legacy`}),this.announceDeprecation=()=>{n(i.getLogger(this),`Editor`,`arcgis-editor`,{version:`5.0`})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this._batchAttributeForm.showPrompt=this._showPrompt,this._batchAttributeForm.clearPrompt=this._clearPrompt,this.addHandles([c(()=>K(this.headingLevel),e=>{this._batchAttributeForm.headingLevel=e,this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e},l),u(()=>this.viewModel.activeWorkflow,`cancel-request`,({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then(t=>t?e.allow():e.deny())}),d(()=>this.viewModel.formViewModel,e=>{E(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e},ee),d(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel,e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.consumePromise(this._initializeAssociationItemList(e))},l),d(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association,()=>{this._setUpAssociationSettings()}),c(()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel],([e,t,n,r,i,a])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=n,this._spinner.viewModel=r,this._selectionList.viewModel=i,this._selectionToolbar.viewModel=a,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt,e.showConfirmationPrompt=this._showConfirmationPrompt},l),c(()=>this.view,(e,t)=>{let n=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,n),e?.ui.add(this._spinner,{key:n,position:`manual`}),this._associationItemList&&(this._associationItemList.view=e)},l),c(()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel],([e])=>{e&&(e.attachments&&this._attachments.set(e.attachments),e.batchAttributeForm&&this._batchAttributeForm.set(e.batchAttributeForm),e.featureForm&&this._featureForm.set(e.featureForm),e.featureTemplates&&this._featureTemplates.set(e.featureTemplates),e.selectionToolbar&&this._selectionToolbar.set(e.selectionToolbar),e.sketch&&this.viewModel.sketchViewModel?.set(e.sketch))},l),d(()=>this._attachments?.error,e=>this._onAttachmentsError(e)),d(()=>this._selectionListItemActionConfigs,()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs}),d(()=>this.viewModel?.failures,e=>{let{messages:n}=this,[{error:r,retry:i,cancel:a}]=e;this._showPrompt({title:n.errorWarningTitle,message:t(n.errorWarningMessageTemplate,{errorMessage:r.message}),context:`warning`,actions:{primary:{label:n.retry,action:()=>{i(),this._clearPrompt()}},secondary:{label:n.ignore,action:()=>{a(),this._clearPrompt()}}}})}),c(()=>this.viewModel?.state,e=>{switch(e){case`awaiting-feature-to-update`:case`ready`:case`disabled`:this._filterText=``,this._featureTemplates.filterText=``}}),c(()=>this.viewModel.formDisabled,e=>{this._batchAttributeForm.readOnly=e,this._featureForm.disabled=e}),c(()=>this.visibleElements.sketch,()=>this._setupSketch(),l),c(()=>this.visibleElements.zoomToButton,e=>this._selectionList.visibleElements.zoomToButton=e,l),J({getLoading:()=>{let{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}}),J({getLoading:()=>!this.viewModel.activeLeafWorkflow?.allowSave,setEffectiveLoading:e=>{this._disallowSave=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=a(this._sketchToolbar),this._sketchImportAbortController=o(this._sketchImportAbortController)}loadDependencies(){return Promise.all([me({flow:()=>import(`@esri/calcite-components/dist/components/calcite-flow`),"flow-item":()=>import(`@esri/calcite-components/dist/components/calcite-flow-item`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`)}),D(),k(),j(),N(),F(),B(),V(),le(),W()])}get _hasInvalidBatchSelection(){return this._hasSelectionWithUneditableFeatures||this._hasSelectionFromMultipleLayers||this._selectionCountExceedsMaximum||this._selectionList.visibleFeatureCount===0}get _hasSelectionFromMultipleLayers(){return this._selectionList.visibleLayerCount>1}get _hasSelectionWithUneditableFeatures(){let e=this.editorItems;return this._selectionList.visibleFeatureItems.some(t=>!T(e,t.layer))}get _deleteButtonCommonInfo(){return{appearance:`outline`,kind:`danger`}}get _selectionCountExceedsMaximum(){let e=this._batchAttributeForm.maximumFeatureCount,{activeLayerItem:t,effectiveCount:n,filterText:r,visibleFeatureCount:i}=this._selectionList;return r!=null&&r!==``?i>e:t?t.total>e:n>e}get _selectionListItemActionConfigs(){let{messages:e,visibleElements:t}=this,n=t?.mergeButton??!0;return[{label:e?.batchEditing?.editThisFeature,icon:`edit-attributes`,type:`feature`,hidden:({item:e})=>!T(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,`update`)},{label:e?.batchEditing.editTheseFeatures,icon:`edit-attributes`,type:`layer`,hidden:({item:e})=>!T(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,`update`)},{label:e?.batchEditing.mergeTheseFeatures,icon:`merge`,type:`layer`,hidden:n?({item:e})=>{if(!Z(e))return!0;let t=T(this.editorItems,e.layer);return!t||!t.editable||!t.supportsMergeFeaturesWorkflow||e.visibleTotal<2}:!0,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,`merge`)}]}get _visibleSelectionCount(){let{activeLayerItem:e,effectiveCount:t,filterText:n,visibleFeatureCount:r}=this._selectionList;return n!=null&&n!==``?r:e?e.total:t}get activeWorkflow(){return this.viewModel.activeWorkflow}get editorItems(){return this.viewModel.editorItems}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return`pencil`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get useLegacyCreateTools(){return this.viewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.viewModel.useLegacyCreateTools=e}get formSystem(){return this.viewModel.formSystem}set formSystem(e){this.viewModel.formSystem=e}get isUsingLegacyCreateTools(){return this.viewModel.isUsingLegacyCreateTools}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}activateSelectionTool(e){return this.viewModel.activateSelectionTool(e)}cancelSelectionTool(){this.viewModel.cancelSelectionTool()}startCreateFeaturesWorkflowAtFeatureTypeSelection(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection(e)}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startMergeFeaturesWorkflow(e,t={}){return this.viewModel.startMergeFeaturesWorkflow(e,t)}startSplitFeatureWorkflow(e,t={}){return this.viewModel.startSplitFeatureWorkflow(e,t)}async startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return r(i.getLogger(this),`Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.`,{version:`4.33`,replacement:`Editor.deleteFeatures`,warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){let{visibleElements:e,viewModel:t}=this,n=this.classes(x.base,G.widget,G.panel);if(!t)return X(`div`,{class:n,key:`empty`});let{pageStack:r}=t,i=r.length-1,a=r.map((e,t)=>this._renderPage(e,t===i));return X(`div`,{class:n,key:`base`,ondragover:this._handleDragAndDrop,ondrop:this._handleDragAndDrop},e.flow?X(`calcite-flow`,{inert:!!this._prompt,key:`flow`},a):a,this._prompt?X(H,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){let n={selected:t};switch(e){case`disabled`:break;case`ready`:return this._renderReady(n);case`viewing-selection-list`:return this._renderSelectionListPage(n);case`awaiting-feature-creation-info`:return this._renderAwaitingFeatureCreationInfo(n);case`creating-features-upload-details`:return this._renderUploadDetails(n);case`creating-features`:return this._renderCreatingFeatures(n);case`editing-existing-feature`:case`editing-features`:case`editing-attributes`:case`choosing-key-feature`:return this._renderUpdateFeature(n);case`awaiting-update-feature-candidate`:return this._renderFeatureList(n);case`adding-attachment`:return this._renderAttachmentAdding(n);case`editing-attachment`:return this._renderAttachmentEditing(n);case`viewing-associated-layers`:case`viewing-associated-features`:return this._renderViewAssociatedLayers(n);case`add-association-select-layer`:case`add-association-select-feature`:return this._renderSelectFeature(n);case`add-association-create-association`:return this._renderAddAssociation(n);case`drawing-splitter-geometry`:return this._renderDrawingSplitGeometry(n);case`reviewing-features`:return this._renderReviewingSplitFeatures(n)}return X(`div`,{key:`empty-page`})}_renderAwaitingFeatureCreationInfo(e){let{EditorPanel:t,messages:n}=this;return X(t,{heading:n.selectTemplate,key:`templates-panel`,...e},X(I,{key:`feature-templates`},X(L,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){let{EditorPanel:t,activeWorkflow:n,messages:r}=this;if(n?.type!==`create-features`)return null;let i=n.data.upload;return i?X(t,{heading:r.createFeatures,key:`upload-details-panel`,...e},X(ue,{helpMessage:this._helpMessage,messages:r,upload:i})):null}_renderCreatingFeatures(e){let{EditorPanel:t,activeWorkflow:n,messages:r,messagesCommon:i,headingLevel:a,viewModel:o}=this;if(!n)return null;let s=n.type===`create-features`&&n.numPendingFeatures>0||n.type===`update`&&n?.activeWorkflow?.type===`create-features`&&n.activeWorkflow?.numPendingFeatures>0;return X(t,{heading:r.createFeatures,key:`create-features-panel`,...e},s?X(U,{disallowSave:this._disallowSave,editorViewModel:o,formWidget:this._batchAttributeForm,headingLevel:a,messages:r,messagesCommon:i,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):X(O,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){let{EditorPanel:t,messages:n,messagesCommon:r,headingLevel:i,viewModel:a}=this,o=a.activeFeatureCount>1?n.multiFeature.editPanelTitle:n.singleFeature.editPanelTitle;return X(t,{heading:o,key:`update-feature-panel`,...e},X(U,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:i,messages:n,messagesCommon:r,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onMerge:this._onMerge,onSave:this._onSave,onSplit:this._onSplit}))}_renderDrawingSplitGeometry(e){let{EditorPanel:t}=this;return X(t,{heading:this.messages.splitFeature,key:`draw-split-geometry-panel`,...e},X(O,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderReviewingSplitFeatures(e){let{EditorPanel:t,messages:n,messagesCommon:r,headingLevel:i,viewModel:a}=this;return X(t,{heading:n.splitFeature,key:`review-split-features-panel`,...e},X(U,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:i,messages:n,messagesCommon:r,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onSave:this._onSave}))}_getAssociationTypeTitle(e){let{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;let{messagesFeature:n}=this;switch(e.type){case`attachment`:return n.associationsAttachments;case`connectivity`:return n.associationsConnectivity;case`structure`:return n.associationsStructure;case`content`:return n.associationsContents;case`container`:return n.associationsContainer}}_getAddAssociationTypeTitle(e){let{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;let n=t.associations;switch(e.type){case`attachment`:return n.addAttachment;case`connectivity`:return n.addConnectivity;case`structure`:return n.addStructure;case`content`:return n.addContent;case`container`:return n.addContainer}}async _initializeAssociationItemList(e){let t=(await import(`./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js`)).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){let e=(await import(`./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js`)).default,t=new e;return this._associationSettings=t,t}_renderViewAssociatedLayers(e){let{EditorPanel:t,messages:n,messagesCommon:r,headingLevel:i,viewModel:a}=this,o=a.formViewModel?.activeAssociationType,s=this._getAssociationTypeTitle(o);return X(t,{heading:s,key:`viewing-associated-layers-panel`,...e},X(U,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:i,messages:n,messagesCommon:r,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){let{_associationItemList:t,EditorPanel:n,viewModel:r,messagesCommon:i}=this,a=r.utilityNetworkAssociationAddAssociationViewModel,o=this._getAddAssociationTypeTitle(a?.associationType),s=a?.state!==`ready`||this.viewModel.formDisabled;return t?X(n,{heading:o,key:`add-association-select-feature`,...e},X(I,{key:`select-feature`},X(L,null,t.render())),X(M,{buttons:[t.filterOptionsVisible?{appearance:`solid`,label:i.apply,disabled:s,onClick:()=>t.applyFilterOptions(),type:`button`}:void 0,{appearance:`outline`,label:i.cancel,disabled:s,onClick:()=>{r.activeWorkflow?.type===`update`&&(a?.reset(),r.activeWorkflow.cancelActiveWorkflow())},type:`button`}]})):X(n,{heading:o,key:`add-association-select-feature`,...e})}async _setUpAssociationSettings(){let{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),n=e.utilityNetworkAssociationAddAssociationViewModel,r=e.activeWorkflow?.type===`update`?e.activeWorkflow:null,i=r?r.activeWorkflow:null,a=i?.type===`add-association`?i.sourceFeatureItem:null,o=n?.selectedFeature,s=n?.association,c=n?.utilityNetwork;a&&o&&s&&c&&(t.sourceFeature=a,t.targetFeature=o,t.association=s,t.utilityNetwork=c)}_renderAddAssociation(e){let{_associationSettings:t,EditorPanel:n,viewModel:r,messagesCommon:i}=this;if(!t)return null;let a=r.utilityNetworkAssociationAddAssociationViewModel,o=this._getAddAssociationTypeTitle(a?.associationType),s=a?.state!==`ready`;return X(n,{heading:o,key:`add-association`,...e},X(I,{key:`add-association-content`},X(L,null,t.render())),X(M,{buttons:[{label:i.add,disabled:s||!a.canAddAssociation,onClick:()=>this._onSave(),type:`button`},{appearance:`outline`,label:i.cancel,disabled:s,onClick:()=>{r.activeWorkflow?.type===`update`&&r.activeWorkflow.cancelActiveWorkflow()},type:`button`}]}))}_renderCustomTemplateGroupContent(e){let{messages:t,viewModel:n}=this,r=s(e.group.items,e=>n.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0);return r?X(P,{kind:`warning`,message:r}):null}_renderAttachmentAdding(e){let{EditorPanel:t,_attachments:n,messages:r,messagesCommon:i}=this;return X(t,{heading:r.addAttachment,key:`attachment-adding-panel`,...e},X(I,{key:`attachments`},this._renderAttachments()),X(M,{buttons:[{label:n.submitting?i.cancel:i.add,disabled:n.submitting||!n.selectedFile,onClick:this._onAttachmentAdd,type:`button`}]}))}_renderSelectionListPage(e){let{_hasSelectionFromMultipleLayers:n,_hasInvalidBatchSelection:r,_selectionCountExceedsMaximum:i,_selectionList:a,_visibleSelectionCount:o,messages:s,EditorPanel:c}=this,{batchUpdateActions:l}=this.visibleElements,{maxVisibleFeatureCountPerLayer:u}=a;return X(c,{heading:s.widgetLabel,key:`selection-list-panel`,...e},this.visibleElements.selectionToolbar?X(`div`,{class:x.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,X(I,{key:`selection-list`},X(L,null,this._renderSelectionList())),X(M,{buttons:[l?{label:t(s.batchEditing.editCount,{count:o}),disabled:r,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:`button`}:void 0],notice:l&&n?{text:s.batchEditing.selectOneLayer,icon:`information`}:l&&i?{text:t(this.messages.multiFeature.formFailedToLoadTooManyFeatures,{num:u}),icon:`information`}:void 0}))}_renderAttachmentEditing(e){let{EditorPanel:t,_attachments:n,activeWorkflow:r,messages:i,messagesCommon:a}=this;return r?X(t,{heading:i.editAttachment,key:`attachment-editing-panel`,...e},X(I,{key:`attachments`},this._renderAttachments()),r.shouldAllowAttachmentEditing?X(M,{buttons:[{label:a.update,disabled:n.submitting||!n.selectedFile,onClick:this._onAttachmentUpdate,type:`button`},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:n.submitting,label:a.delete,type:`button`}]}):void 0):null}_renderReady(e){let{EditorPanel:t,messages:n,visibleElements:r}=this,i=this._helpMessage;return X(t,{heading:n.widgetLabel,key:`landing-panel`,...e},X(I,{key:`landing-content`},this.editorItems.length?[r.editFeaturesSection?X(L,{key:`edit-actions`},this._renderUpdateActions()):null,r.createFeaturesSection&&this.viewModel.canCreateVisible?X(L,{key:`create-actions`},this._renderCreateActions()):null]:X(R,{key:`no-content`},n.noEditableLayers)),i?X(`div`,{class:x.helpMessage,key:`footer-actions`,slot:`footer`},i):void 0)}_handleDragAndDrop(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`)}get _helpMessage(){return this.getHelpMessageString(this.activeWorkflow?.helpMessage)}get _noticeMessage(){return this.getHelpMessageString(this.activeWorkflow?.noticeMessage)}_renderUpdateActions(){let{messages:e,messagesCommon:t,viewModel:n}=this,r={id:`select`,label:t.select};return X(`div`,{class:x.updateActions,key:`update-actions`},X(q,{level:K(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar?X(`div`,{class:x.selectionToolbarContainer},this._renderSelectionToolbar()):X(`calcite-list`,{class:x.updateActionsList,label:e.editFeaturesList,selectionAppearance:`border`,selectionMode:`single`},he({disabled:!n.canUpdateVisible,grouped:!1,item:r,selectedItem:n.activeWorkflow?.stepId===`awaiting-feature-to-update`?r:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return X(`div`,{key:`create-actions`},X(q,{level:K(this.headingLevel)},this.messages.createFeatures),X(`div`,{class:x.featureTemplatesContainer,key:`templates`},this._renderFeatureTemplates()))}_renderFeatureList(e){let{EditorPanel:n,viewModel:r}=this,{activeWorkflow:i}=r;if(i?.type!==`update`)return null;let a=i.data.candidates,o=t(this.messages.multipleFeaturesTemplate,{total:a.length});return X(n,{heading:o,key:`feature-list`,...e},X(A,{editorItems:this.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:i,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>r.selectFeature(e,t),onZoomTo:e=>r.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:n,noLabel:r}){let i=Promise.withResolvers(),{view:a}=this,o=a?.focused;return this._showPrompt({title:e,message:t,context:`danger`,actions:{primary:{label:n,action:()=>i.resolve(!0)},secondary:{label:r,action:()=>i.resolve(!1)}}}),i.promise.finally(()=>{this._clearPrompt(),o&&a?.focus()})}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e,t){await this.viewModel.onSelectionListMenuItemSelect(e,t)}async _setupSketch(){if(!this.visibleElements.sketch){this._sketchImportAbortController=o(this._sketchImportAbortController),this._sketchToolbar=a(this._sketchToolbar),this.removeHandles(Q);return}if(this._sketchImportAbortController)return;let e=new AbortController;this._sketchImportAbortController=e;let t=await import(`./Sketch.js`);if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:`docked`,contextualToolLocation:`inline-end`,scale:`s`,suppressDeprecationWarning:!0,visibleElements:new pe({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,singlePluginBackButton:!1,createTools:new de({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new fe({"lasso-selection":!1,"rectangle-selection":!1}),geometrySimplificationActivityIndicator:!1})}),this.addHandles([c(()=>{let e=this.viewModel.activeLeafWorkflow;return e&&`availableCreateTools`in e?e.availableCreateTools:null},e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)},l),c(()=>this.visibleElements.undoRedoButtons,e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)},l),d(()=>this.viewModel?.sketchViewModel,e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)},l),d(()=>this.viewModel.sketchViewModel?.pluginManager,e=>{e.sketch=this._sketchToolbar},l)],Q)}finally{this._sketchImportAbortController=null}}getHelpMessageString(e){let{messages:t,view:n}=this;return e?t[n?.type===`3d`?`helpMessages3d`:`helpMessages2d`]?.[e]:void 0}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([f()],$.prototype,`_batchAttributeForm`,void 0),e([f()],$.prototype,`_featureForm`,void 0),e([f()],$.prototype,`_sketchToolbar`,void 0),e([f()],$.prototype,`_attachments`,void 0),e([f()],$.prototype,`_associationItemList`,void 0),e([f()],$.prototype,`_associationSettings`,void 0),e([f()],$.prototype,`_featureTemplates`,void 0),e([f()],$.prototype,`_filterText`,void 0),e([f()],$.prototype,`_hasInvalidBatchSelection`,null),e([f()],$.prototype,`_hasSelectionFromMultipleLayers`,null),e([f()],$.prototype,`_hasSelectionWithUneditableFeatures`,null),e([f()],$.prototype,`_prompt`,void 0),e([f()],$.prototype,`_spinner`,void 0),e([f()],$.prototype,`_deleteButtonCommonInfo`,null),e([f()],$.prototype,`_loading`,void 0),e([f()],$.prototype,`_disallowSave`,void 0),e([f()],$.prototype,`_selectionCountExceedsMaximum`,null),e([f()],$.prototype,`_selectionList`,void 0),e([f()],$.prototype,`_selectionListItemActionConfigs`,null),e([f()],$.prototype,`_selectionToolbar`,void 0),e([f()],$.prototype,`_visibleSelectionCount`,null),e([f({readOnly:!0})],$.prototype,`activeWorkflow`,null),e([f()],$.prototype,`editorItems`,null),e([f()],$.prototype,`effectiveSelectionManager`,null),e([f()],$.prototype,`headingLevel`,void 0),e([f()],$.prototype,`hideTemplatesForInactiveLayers`,null),e([f()],$.prototype,`icon`,null),e([f()],$.prototype,`label`,null),e([f({type:p})],$.prototype,`labelOptions`,null),e([f()],$.prototype,`layerInfos`,null),e([f(),Y(`esri/widgets/Editor/t9n/Editor`)],$.prototype,`messages`,void 0),e([f(),Y(`esri/t9n/common`)],$.prototype,`messagesCommon`,void 0),e([f(),Y(`esri/widgets/FeatureTemplates/t9n/FeatureTemplates`)],$.prototype,`messagesTemplates`,void 0),e([f(),Y(`esri/widgets/Feature/t9n/Feature`)],$.prototype,`messagesFeature`,void 0),e([f()],$.prototype,`selectionManager`,null),e([f({type:g})],$.prototype,`snappingOptions`,null),e([f()],$.prototype,`syncWithViewSelectionManager`,null),e([f()],$.prototype,`syncViewSelection`,null),e([f({type:m})],$.prototype,`tooltipOptions`,null),e([f()],$.prototype,`supportingWidgetDefaults`,void 0),e([f({type:h,nonNullable:!0})],$.prototype,`valueOptions`,null),e([f({value:!1})],$.prototype,`useLegacyCreateTools`,null),e([f()],$.prototype,`formSystem`,null),e([f()],$.prototype,`isUsingLegacyCreateTools`,null),e([f()],$.prototype,`view`,null),e([f({type:S}),ve([`sketch-create`,`sketch-delete`,`sketch-update`,`workflow-cancel`,`workflow-commit`])],$.prototype,`viewModel`,void 0),e([f({type:w,nonNullable:!0})],$.prototype,`visibleElements`,void 0),e([f()],$.prototype,`_helpMessage`,null),e([f()],$.prototype,`_noticeMessage`,null),$=e([te(`esri.widgets.Editor`)],$);const xe=$;export{xe as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as n,deprecatedFunction as r}from"../core/deprecate.js";import i from"../core/Logger.js";import{destroyMaybe as a,abortMaybe as o,mappedFind as s}from"../core/maybe.js";import{watch as c,initial as l,on as u,when as d,syncAndInitial as ee}from"../core/reactiveUtils.js";import{property as f,subclass as te}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as ne}from"../core/support/UpdatingHandles.js";import p from"../views/interactive/sketch/SketchLabelOptions.js";import m from"../views/interactive/sketch/SketchTooltipOptions.js";import h from"../views/interactive/sketch/SketchValueOptions.js";import g from"../views/interactive/snapping/SnappingOptions.js";import _ from"./Attachments.js";import v from"./BatchAttributeForm.js";import y from"./FeatureForm.js";import re from"./FeatureTemplates.js";import ie from"./Spinner.js";import ae from"./Widget.js";import oe from"./BatchAttributeForm/VisibleElements.js";import{isNextOrLegacyUpdateWorkflow as b,isNextOrLegacyUpdateFeaturesWorkflow as se,isNextOrLegacyUpdateFeatureWorkflow as ce}from"./Editor/compatibilityAdapters.js";import{css as x}from"./Editor/css.js";import S from"./Editor/EditorViewModel.js";import{isModelUpload as C}from"./Editor/modelUploadUtils.js";import w from"./Editor/VisibleElements.js";import{findEditorItemForLayer as T,isBatchAttributeFormViewModel as E}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as D,CreateFeaturesPanelContent as O}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as k,FeatureList as A}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as j,FooterActions as M}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as N,Notice as P}from"./Editor/components/Notices.js";import{loadPanelContentComponents as F,PanelContent as I,PanelContentSection as L,PanelContentMessage as R}from"./Editor/components/PanelContent.js";import{PanelToolbar as z,loadPanelToolbarComponents as B}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as V,Prompt as H}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as le,UpdateFeaturePanelContent as U}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as W,UploadDetails as ue}from"./Editor/components/UploadDetails.js";import de from"./Sketch/CreateToolVisibilityMap.js";import fe from"./Sketch/SelectionToolVisibilityMap.js";import pe from"./Sketch/VisibleElements.js";import{loadCalciteComponents as me}from"./support/componentsUtils.js";import{globalCss as G}from"./support/globalCss.js";import{incrementHeadingLevel as K,Heading as q}from"./support/Heading.js";import{renderItem as he}from"./support/ItemList.js";import{connectDelayedLoading as J}from"./support/loaderUtils.js";import ge from"./support/SelectionList.js";import _e from"./support/SelectionToolbar.js";import{messageBundle as Y,vmEvent as ve,tsx as X}from"./support/widget.js";import{isLayerItem as Z}from"./support/SelectionList/selectionListUtils.js";import ye from"./support/SelectionList/VisibleElements.js";import be from"./support/SelectionToolbar/VisibleElements.js";const Q=Symbol(`sketch-setup-handles`);let $=class extends ae{constructor(e,r){super(e,r),this._batchAttributeForm=new v({suppressDeprecationWarning:!0,visibleElements:new oe({loadingIndicator:!1})}),this._featureForm=new y({suppressDeprecationWarning:!0}),this._sketchToolbar=null,this._attachments=new _({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1},suppressDeprecationWarning:!0}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new re({suppressDeprecationWarning:!0,enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?X(`calcite-icon`,{class:x.templateItemContentEnd,icon:`upload-to`,key:`upload-icon`}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText=``,this._prompt=null,this._spinner=new ie,this._loading=!1,this._disallowSave=!1,this._selectionList=new ge({displayMode:`layer`,itemActionConfigs:this._selectionListItemActionConfigs,itemUnavailableFunction:({item:e})=>!T(this.editorItems,e.layer)?.editable,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new ye({header:!1})}),this._selectionToolbar=new _e({visibleElements:new be({chip:!1})}),this._updatingHandles=new ne,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=null,this.visibleElements=new w,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?X(`div`,{class:x.sketchContainer,key:`editor-sketch-container`},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>X(`calcite-icon`,{icon:`cursor`,slot:`content-start`}),this.EditorPanel=({heading:e,key:t,selected:n},...r)=>{let{visibleElements:i}=this;return X(`calcite-flow-item`,{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:n,onCalciteFlowItemBack:this._onBack},i.settingsMenu?X(z,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:i}):null,...r)},this._showConfirmationPrompt=e=>this._showPromptAndWait(this.messages[e]),this._showDiscardEditsPrompt=()=>{let{messages:e,activeWorkflow:t}=this,n={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return t?.type===`create-features`&&C(t.data.creationInfo)?this._showPromptAndWait(t.data.upload?.state===`success`?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):t?.type===`update`&&t.formViewModel?.activeAssociationsInput?this._showPromptAndWait({...n,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(n)},this._showGenericCancelPrompt=()=>{let{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onMerge=()=>{let{activeWorkflow:e}=this.viewModel;if(b(e)){let t=e.activeWorkflow;se(t)&&e.startMergingFeatures(t.viewGraphics,{initialFeatures:t.data.initialFeatures})}},this._onSplit=()=>{let{activeWorkflow:e}=this.viewModel;if(b(e)){let t=e.activeWorkflow;if(ce(t)){let n=t.viewGraphic;n&&e.startSplittingFeature(n,{initialFeature:t.data.edits.initialFeature??n})}}},this._onDelete=()=>{let e=this.viewModel.activeFeatureCount,n=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:n.deleteWarningTitle,message:n.deleteWarningMessage,context:`danger`,actions:{primary:{label:t(n.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:n.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{let{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:`danger`,actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{let{activeWorkflow:e}=this.viewModel;e&&(e.type===`create-features`||e.type===`update`&&e.activeWorkflow?.type===`create-features`?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then(()=>e.back()))},this._onAttachmentUpdate=()=>{let{activeWorkflow:e}=this.viewModel;e&&(e.type===`create-features`?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then(()=>e.back()))},this._onAttachmentDelete=()=>{let{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:`danger`,actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{let e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&(t.type===`create-features`?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:`warning`,actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})},this.viewModel=e?.viewModel||new S({useLegacyCreateTools:e?.useLegacyCreateTools??e?.view?.type===`3d`,formSystem:e?.formSystem??`legacy`}),this.announceDeprecation=()=>{n(i.getLogger(this),`Editor`,`arcgis-editor`,{version:`5.0`})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this._batchAttributeForm.showPrompt=this._showPrompt,this._batchAttributeForm.clearPrompt=this._clearPrompt,this.addHandles([c(()=>K(this.headingLevel),e=>{this._batchAttributeForm.headingLevel=e,this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e},l),u(()=>this.viewModel.activeWorkflow,`cancel-request`,({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then(t=>t?e.allow():e.deny())}),d(()=>this.viewModel.formViewModel,e=>{E(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e},ee),d(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel,e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.consumePromise(this._initializeAssociationItemList(e))},l),d(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association,()=>{this._setUpAssociationSettings()}),c(()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel],([e,t,n,r,i,a])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=n,this._spinner.viewModel=r,this._selectionList.viewModel=i,this._selectionToolbar.viewModel=a,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt,e.showConfirmationPrompt=this._showConfirmationPrompt},l),c(()=>this.view,(e,t)=>{let n=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,n),e?.ui.add(this._spinner,{key:n,position:`manual`}),this._associationItemList&&(this._associationItemList.view=e)},l),c(()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel],([e])=>{e&&(e.attachments&&this._attachments.set(e.attachments),e.batchAttributeForm&&this._batchAttributeForm.set(e.batchAttributeForm),e.featureForm&&this._featureForm.set(e.featureForm),e.featureTemplates&&this._featureTemplates.set(e.featureTemplates),e.selectionToolbar&&this._selectionToolbar.set(e.selectionToolbar),e.sketch&&this.viewModel.sketchViewModel?.set(e.sketch))},l),d(()=>this._attachments?.error,e=>this._onAttachmentsError(e)),d(()=>this._selectionListItemActionConfigs,()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs}),d(()=>this.viewModel?.failures,e=>{let{messages:n}=this,[{error:r,retry:i,cancel:a}]=e;this._showPrompt({title:n.errorWarningTitle,message:t(n.errorWarningMessageTemplate,{errorMessage:r.message}),context:`warning`,actions:{primary:{label:n.retry,action:()=>{i(),this._clearPrompt()}},secondary:{label:n.ignore,action:()=>{a(),this._clearPrompt()}}}})}),c(()=>this.viewModel?.state,e=>{switch(e){case`awaiting-feature-to-update`:case`ready`:case`disabled`:this._filterText=``,this._featureTemplates.filterText=``}}),c(()=>this.viewModel.formDisabled,e=>{this._batchAttributeForm.readOnly=e,this._featureForm.disabled=e}),c(()=>this.visibleElements.sketch,()=>this._setupSketch(),l),c(()=>this.visibleElements.zoomToButton,e=>this._selectionList.visibleElements.zoomToButton=e,l),J({getLoading:()=>{let{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}}),J({getLoading:()=>!this.viewModel.activeLeafWorkflow?.allowSave,setEffectiveLoading:e=>{this._disallowSave=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=a(this._sketchToolbar),this._sketchImportAbortController=o(this._sketchImportAbortController)}loadDependencies(){return Promise.all([me({flow:()=>import(`@esri/calcite-components/dist/components/calcite-flow`),"flow-item":()=>import(`@esri/calcite-components/dist/components/calcite-flow-item`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`)}),D(),k(),j(),N(),F(),B(),V(),le(),W()])}get _hasInvalidBatchSelection(){return this._hasSelectionWithUneditableFeatures||this._hasSelectionFromMultipleLayers||this._selectionCountExceedsMaximum||this._selectionList.visibleFeatureCount===0}get _hasSelectionFromMultipleLayers(){return this._selectionList.visibleLayerCount>1}get _hasSelectionWithUneditableFeatures(){let e=this.editorItems;return this._selectionList.visibleFeatureItems.some(t=>!T(e,t.layer))}get _deleteButtonCommonInfo(){return{appearance:`outline`,kind:`danger`}}get _selectionCountExceedsMaximum(){let e=this._batchAttributeForm.maximumFeatureCount,{activeLayerItem:t,effectiveCount:n,filterText:r,visibleFeatureCount:i}=this._selectionList;return r!=null&&r!==``?i>e:t?t.total>e:n>e}get _selectionListItemActionConfigs(){let{messages:e,visibleElements:t}=this,n=t?.mergeButton??!0;return[{label:e?.batchEditing?.editThisFeature,icon:`edit-attributes`,type:`feature`,hidden:({item:e})=>!T(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,`update`)},{label:e?.batchEditing.editTheseFeatures,icon:`edit-attributes`,type:`layer`,hidden:({item:e})=>!T(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,`update`)},{label:e?.batchEditing.mergeTheseFeatures,icon:`merge`,type:`layer`,hidden:n?({item:e})=>{if(!Z(e))return!0;let t=T(this.editorItems,e.layer);return!t||!t.editable||!t.supportsMergeFeaturesWorkflow||e.visibleTotal<2}:!0,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,`merge`)}]}get _visibleSelectionCount(){let{activeLayerItem:e,effectiveCount:t,filterText:n,visibleFeatureCount:r}=this._selectionList;return n!=null&&n!==``?r:e?e.total:t}get activeWorkflow(){return this.viewModel.activeWorkflow}get editorItems(){return this.viewModel.editorItems}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return`pencil`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get useViewOptions(){return this.viewModel.useViewOptions}set useViewOptions(e){this.viewModel.useViewOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get useLegacyCreateTools(){return this.viewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.viewModel.useLegacyCreateTools=e}get formSystem(){return this.viewModel.formSystem}set formSystem(e){this.viewModel.formSystem=e}get isUsingLegacyCreateTools(){return this.viewModel.isUsingLegacyCreateTools}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}activateSelectionTool(e){return this.viewModel.activateSelectionTool(e)}cancelSelectionTool(){this.viewModel.cancelSelectionTool()}startCreateFeaturesWorkflowAtFeatureTypeSelection(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection(e)}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startMergeFeaturesWorkflow(e,t={}){return this.viewModel.startMergeFeaturesWorkflow(e,t)}startSplitFeatureWorkflow(e,t={}){return this.viewModel.startSplitFeatureWorkflow(e,t)}async startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return r(i.getLogger(this),`Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.`,{version:`4.33`,replacement:`Editor.deleteFeatures`,warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){let{visibleElements:e,viewModel:t}=this,n=this.classes(x.base,G.widget,G.panel);if(!t)return X(`div`,{class:n,key:`empty`});let{pageStack:r}=t,i=r.length-1,a=r.map((e,t)=>this._renderPage(e,t===i));return X(`div`,{class:n,key:`base`,ondragover:this._handleDragAndDrop,ondrop:this._handleDragAndDrop},e.flow?X(`calcite-flow`,{inert:!!this._prompt,key:`flow`},a):a,this._prompt?X(H,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){let n={selected:t};switch(e){case`disabled`:break;case`ready`:return this._renderReady(n);case`viewing-selection-list`:return this._renderSelectionListPage(n);case`awaiting-feature-creation-info`:return this._renderAwaitingFeatureCreationInfo(n);case`creating-features-upload-details`:return this._renderUploadDetails(n);case`creating-features`:return this._renderCreatingFeatures(n);case`editing-existing-feature`:case`editing-features`:case`editing-attributes`:case`choosing-key-feature`:return this._renderUpdateFeature(n);case`awaiting-update-feature-candidate`:return this._renderFeatureList(n);case`adding-attachment`:return this._renderAttachmentAdding(n);case`editing-attachment`:return this._renderAttachmentEditing(n);case`viewing-associated-layers`:case`viewing-associated-features`:return this._renderViewAssociatedLayers(n);case`add-association-select-layer`:case`add-association-select-feature`:return this._renderSelectFeature(n);case`add-association-create-association`:return this._renderAddAssociation(n);case`drawing-splitter-geometry`:return this._renderDrawingSplitGeometry(n);case`reviewing-features`:return this._renderReviewingSplitFeatures(n)}return X(`div`,{key:`empty-page`})}_renderAwaitingFeatureCreationInfo(e){let{EditorPanel:t,messages:n}=this;return X(t,{heading:n.selectTemplate,key:`templates-panel`,...e},X(I,{key:`feature-templates`},X(L,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){let{EditorPanel:t,activeWorkflow:n,messages:r}=this;if(n?.type!==`create-features`)return null;let i=n.data.upload;return i?X(t,{heading:r.createFeatures,key:`upload-details-panel`,...e},X(ue,{helpMessage:this._helpMessage,messages:r,upload:i})):null}_renderCreatingFeatures(e){let{EditorPanel:t,activeWorkflow:n,messages:r,messagesCommon:i,headingLevel:a,viewModel:o}=this;if(!n)return null;let s=n.type===`create-features`&&n.numPendingFeatures>0||n.type===`update`&&n?.activeWorkflow?.type===`create-features`&&n.activeWorkflow?.numPendingFeatures>0;return X(t,{heading:r.createFeatures,key:`create-features-panel`,...e},s?X(U,{disallowSave:this._disallowSave,editorViewModel:o,formWidget:this._batchAttributeForm,headingLevel:a,messages:r,messagesCommon:i,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):X(O,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){let{EditorPanel:t,messages:n,messagesCommon:r,headingLevel:i,viewModel:a}=this,o=a.activeFeatureCount>1?n.multiFeature.editPanelTitle:n.singleFeature.editPanelTitle;return X(t,{heading:o,key:`update-feature-panel`,...e},X(U,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:i,messages:n,messagesCommon:r,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onMerge:this._onMerge,onSave:this._onSave,onSplit:this._onSplit}))}_renderDrawingSplitGeometry(e){let{EditorPanel:t}=this;return X(t,{heading:this.messages.splitFeature,key:`draw-split-geometry-panel`,...e},X(O,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderReviewingSplitFeatures(e){let{EditorPanel:t,messages:n,messagesCommon:r,headingLevel:i,viewModel:a}=this;return X(t,{heading:n.splitFeature,key:`review-split-features-panel`,...e},X(U,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:i,messages:n,messagesCommon:r,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onSave:this._onSave}))}_getAssociationTypeTitle(e){let{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;let{messagesFeature:n}=this;switch(e.type){case`attachment`:return n.associationsAttachments;case`connectivity`:return n.associationsConnectivity;case`structure`:return n.associationsStructure;case`content`:return n.associationsContents;case`container`:return n.associationsContainer}}_getAddAssociationTypeTitle(e){let{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;let n=t.associations;switch(e.type){case`attachment`:return n.addAttachment;case`connectivity`:return n.addConnectivity;case`structure`:return n.addStructure;case`content`:return n.addContent;case`container`:return n.addContainer}}async _initializeAssociationItemList(e){let t=(await import(`./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js`)).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){let e=(await import(`./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js`)).default,t=new e;return this._associationSettings=t,t}_renderViewAssociatedLayers(e){let{EditorPanel:t,messages:n,messagesCommon:r,headingLevel:i,viewModel:a}=this,o=a.formViewModel?.activeAssociationType,s=this._getAssociationTypeTitle(o);return X(t,{heading:s,key:`viewing-associated-layers-panel`,...e},X(U,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:i,messages:n,messagesCommon:r,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){let{_associationItemList:t,EditorPanel:n,viewModel:r,messagesCommon:i}=this,a=r.utilityNetworkAssociationAddAssociationViewModel,o=this._getAddAssociationTypeTitle(a?.associationType),s=a?.state!==`ready`||this.viewModel.formDisabled;return t?X(n,{heading:o,key:`add-association-select-feature`,...e},X(I,{key:`select-feature`},X(L,null,t.render())),X(M,{buttons:[t.filterOptionsVisible?{appearance:`solid`,label:i.apply,disabled:s,onClick:()=>t.applyFilterOptions(),type:`button`}:void 0,{appearance:`outline`,label:i.cancel,disabled:s,onClick:()=>{r.activeWorkflow?.type===`update`&&(a?.reset(),r.activeWorkflow.cancelActiveWorkflow())},type:`button`}]})):X(n,{heading:o,key:`add-association-select-feature`,...e})}async _setUpAssociationSettings(){let{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),n=e.utilityNetworkAssociationAddAssociationViewModel,r=e.activeWorkflow?.type===`update`?e.activeWorkflow:null,i=r?r.activeWorkflow:null,a=i?.type===`add-association`?i.sourceFeatureItem:null,o=n?.selectedFeature,s=n?.association,c=n?.utilityNetwork;a&&o&&s&&c&&(t.sourceFeature=a,t.targetFeature=o,t.association=s,t.utilityNetwork=c)}_renderAddAssociation(e){let{_associationSettings:t,EditorPanel:n,viewModel:r,messagesCommon:i}=this;if(!t)return null;let a=r.utilityNetworkAssociationAddAssociationViewModel,o=this._getAddAssociationTypeTitle(a?.associationType),s=a?.state!==`ready`;return X(n,{heading:o,key:`add-association`,...e},X(I,{key:`add-association-content`},X(L,null,t.render())),X(M,{buttons:[{label:i.add,disabled:s||!a.canAddAssociation,onClick:()=>this._onSave(),type:`button`},{appearance:`outline`,label:i.cancel,disabled:s,onClick:()=>{r.activeWorkflow?.type===`update`&&r.activeWorkflow.cancelActiveWorkflow()},type:`button`}]}))}_renderCustomTemplateGroupContent(e){let{messages:t,viewModel:n}=this,r=s(e.group.items,e=>n.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0);return r?X(P,{kind:`warning`,message:r}):null}_renderAttachmentAdding(e){let{EditorPanel:t,_attachments:n,messages:r,messagesCommon:i}=this;return X(t,{heading:r.addAttachment,key:`attachment-adding-panel`,...e},X(I,{key:`attachments`},this._renderAttachments()),X(M,{buttons:[{label:n.submitting?i.cancel:i.add,disabled:n.submitting||!n.selectedFile,onClick:this._onAttachmentAdd,type:`button`}]}))}_renderSelectionListPage(e){let{_hasSelectionFromMultipleLayers:n,_hasInvalidBatchSelection:r,_selectionCountExceedsMaximum:i,_selectionList:a,_visibleSelectionCount:o,messages:s,EditorPanel:c}=this,{batchUpdateActions:l}=this.visibleElements,{maxVisibleFeatureCountPerLayer:u}=a;return X(c,{heading:s.widgetLabel,key:`selection-list-panel`,...e},this.visibleElements.selectionToolbar?X(`div`,{class:x.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,X(I,{key:`selection-list`},X(L,null,this._renderSelectionList())),X(M,{buttons:[l?{label:t(s.batchEditing.editCount,{count:o}),disabled:r,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:`button`}:void 0],notice:l&&n?{text:s.batchEditing.selectOneLayer,icon:`information`}:l&&i?{text:t(this.messages.multiFeature.formFailedToLoadTooManyFeatures,{num:u}),icon:`information`}:void 0}))}_renderAttachmentEditing(e){let{EditorPanel:t,_attachments:n,activeWorkflow:r,messages:i,messagesCommon:a}=this;return r?X(t,{heading:i.editAttachment,key:`attachment-editing-panel`,...e},X(I,{key:`attachments`},this._renderAttachments()),r.shouldAllowAttachmentEditing?X(M,{buttons:[{label:a.update,disabled:n.submitting||!n.selectedFile,onClick:this._onAttachmentUpdate,type:`button`},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:n.submitting,label:a.delete,type:`button`}]}):void 0):null}_renderReady(e){let{EditorPanel:t,messages:n,visibleElements:r}=this,i=this._helpMessage;return X(t,{heading:n.widgetLabel,key:`landing-panel`,...e},X(I,{key:`landing-content`},this.editorItems.length?[r.editFeaturesSection?X(L,{key:`edit-actions`},this._renderUpdateActions()):null,r.createFeaturesSection&&this.viewModel.canCreateVisible?X(L,{key:`create-actions`},this._renderCreateActions()):null]:X(R,{key:`no-content`},n.noEditableLayers)),i?X(`div`,{class:x.helpMessage,key:`footer-actions`,slot:`footer`},i):void 0)}_handleDragAndDrop(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`)}get _helpMessage(){return this.getHelpMessageString(this.activeWorkflow?.helpMessage)}get _noticeMessage(){return this.getHelpMessageString(this.activeWorkflow?.noticeMessage)}_renderUpdateActions(){let{messages:e,messagesCommon:t,viewModel:n}=this,r={id:`select`,label:t.select};return X(`div`,{class:x.updateActions,key:`update-actions`},X(q,{level:K(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar?X(`div`,{class:x.selectionToolbarContainer},this._renderSelectionToolbar()):X(`calcite-list`,{class:x.updateActionsList,label:e.editFeaturesList,selectionAppearance:`border`,selectionMode:`single`},he({disabled:!n.canUpdateVisible,grouped:!1,item:r,selectedItem:n.activeWorkflow?.stepId===`awaiting-feature-to-update`?r:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return X(`div`,{key:`create-actions`},X(q,{level:K(this.headingLevel)},this.messages.createFeatures),X(`div`,{class:x.featureTemplatesContainer,key:`templates`},this._renderFeatureTemplates()))}_renderFeatureList(e){let{EditorPanel:n,viewModel:r}=this,{activeWorkflow:i}=r;if(i?.type!==`update`)return null;let a=i.data.candidates,o=t(this.messages.multipleFeaturesTemplate,{total:a.length});return X(n,{heading:o,key:`feature-list`,...e},X(A,{editorItems:this.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:i,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>r.selectFeature(e,t),onZoomTo:e=>r.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:n,noLabel:r}){let i=Promise.withResolvers(),{view:a}=this,o=a?.focused;return this._showPrompt({title:e,message:t,context:`danger`,actions:{primary:{label:n,action:()=>i.resolve(!0)},secondary:{label:r,action:()=>i.resolve(!1)}}}),i.promise.finally(()=>{this._clearPrompt(),o&&a?.focus()})}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e,t){await this.viewModel.onSelectionListMenuItemSelect(e,t)}async _setupSketch(){if(!this.visibleElements.sketch){this._sketchImportAbortController=o(this._sketchImportAbortController),this._sketchToolbar=a(this._sketchToolbar),this.removeHandles(Q);return}if(this._sketchImportAbortController)return;let e=new AbortController;this._sketchImportAbortController=e;let t=await import(`./Sketch.js`);if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:`docked`,contextualToolLocation:`inline-end`,scale:`s`,suppressDeprecationWarning:!0,visibleElements:new pe({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,singlePluginBackButton:!1,createTools:new de({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new fe({"lasso-selection":!1,"rectangle-selection":!1}),geometrySimplificationActivityIndicator:!1})}),this.addHandles([c(()=>{let e=this.viewModel.activeLeafWorkflow;return e&&`availableCreateTools`in e?e.availableCreateTools:null},e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)},l),c(()=>this.visibleElements.undoRedoButtons,e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)},l),d(()=>this.viewModel?.sketchViewModel,e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)},l),d(()=>this.viewModel.sketchViewModel?.pluginManager,e=>{e.sketch=this._sketchToolbar},l)],Q)}finally{this._sketchImportAbortController=null}}getHelpMessageString(e){let{messages:t,view:n}=this;return e?t[n?.type===`3d`?`helpMessages3d`:`helpMessages2d`]?.[e]:void 0}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([f()],$.prototype,`_batchAttributeForm`,void 0),e([f()],$.prototype,`_featureForm`,void 0),e([f()],$.prototype,`_sketchToolbar`,void 0),e([f()],$.prototype,`_attachments`,void 0),e([f()],$.prototype,`_associationItemList`,void 0),e([f()],$.prototype,`_associationSettings`,void 0),e([f()],$.prototype,`_featureTemplates`,void 0),e([f()],$.prototype,`_filterText`,void 0),e([f()],$.prototype,`_hasInvalidBatchSelection`,null),e([f()],$.prototype,`_hasSelectionFromMultipleLayers`,null),e([f()],$.prototype,`_hasSelectionWithUneditableFeatures`,null),e([f()],$.prototype,`_prompt`,void 0),e([f()],$.prototype,`_spinner`,void 0),e([f()],$.prototype,`_deleteButtonCommonInfo`,null),e([f()],$.prototype,`_loading`,void 0),e([f()],$.prototype,`_disallowSave`,void 0),e([f()],$.prototype,`_selectionCountExceedsMaximum`,null),e([f()],$.prototype,`_selectionList`,void 0),e([f()],$.prototype,`_selectionListItemActionConfigs`,null),e([f()],$.prototype,`_selectionToolbar`,void 0),e([f()],$.prototype,`_visibleSelectionCount`,null),e([f({readOnly:!0})],$.prototype,`activeWorkflow`,null),e([f()],$.prototype,`editorItems`,null),e([f()],$.prototype,`effectiveSelectionManager`,null),e([f()],$.prototype,`headingLevel`,void 0),e([f()],$.prototype,`hideTemplatesForInactiveLayers`,null),e([f()],$.prototype,`icon`,null),e([f()],$.prototype,`label`,null),e([f({type:p})],$.prototype,`labelOptions`,null),e([f()],$.prototype,`layerInfos`,null),e([f(),Y(`esri/widgets/Editor/t9n/Editor`)],$.prototype,`messages`,void 0),e([f(),Y(`esri/t9n/common`)],$.prototype,`messagesCommon`,void 0),e([f(),Y(`esri/widgets/FeatureTemplates/t9n/FeatureTemplates`)],$.prototype,`messagesTemplates`,void 0),e([f(),Y(`esri/widgets/Feature/t9n/Feature`)],$.prototype,`messagesFeature`,void 0),e([f()],$.prototype,`selectionManager`,null),e([f({type:g})],$.prototype,`snappingOptions`,null),e([f()],$.prototype,`syncWithViewSelectionManager`,null),e([f()],$.prototype,`syncViewSelection`,null),e([f({type:m})],$.prototype,`tooltipOptions`,null),e([f()],$.prototype,`useViewOptions`,null),e([f()],$.prototype,`supportingWidgetDefaults`,void 0),e([f({type:h,nonNullable:!0})],$.prototype,`valueOptions`,null),e([f({value:!1})],$.prototype,`useLegacyCreateTools`,null),e([f()],$.prototype,`formSystem`,null),e([f()],$.prototype,`isUsingLegacyCreateTools`,null),e([f()],$.prototype,`view`,null),e([f({type:S}),ve([`sketch-create`,`sketch-delete`,`sketch-update`,`workflow-cancel`,`workflow-commit`])],$.prototype,`viewModel`,void 0),e([f({type:w,nonNullable:!0})],$.prototype,`visibleElements`,void 0),e([f()],$.prototype,`_helpMessage`,null),e([f()],$.prototype,`_noticeMessage`,null),$=e([te(`esri.widgets.Editor`)],$);const xe=$;export{xe as default};
|
|
@@ -500,7 +500,7 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
500
500
|
*
|
|
501
501
|
* @internal
|
|
502
502
|
*/
|
|
503
|
-
get effectiveTimeExtent(): TimeExtent |
|
|
503
|
+
get effectiveTimeExtent(): TimeExtent | undefined;
|
|
504
504
|
/**
|
|
505
505
|
* The 'effective' where clause used by data queries.
|
|
506
506
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as n,fetchMessageBundle as r}from"../../intl.js";import{isSome as i}from"../../core/arrayUtils.js";import a from"../../core/Collection.js";import{referenceSetter as o}from"../../core/collectionUtils.js";import s from"../../core/Error.js";import c from"../../core/Logger.js";import{debounce as l,ignoreAbortErrors as u}from"../../core/promiseUtils.js";import{watch as d,initial as f,on as p,syncAndInitial as m}from"../../core/reactiveUtils.js";import{throttle as h}from"../../core/throttle.js";import{property as g,subclass as _}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as v}from"../../editing/fieldUtils.js";import{geometryTypes as y}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as b}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as x,isSubtypeGroupLayer as S}from"../../layers/support/layerUtils.js";import{createFieldInfos as C}from"../../support/popupUtils.js";import w from"../../tables/AttributeTableTemplate.js";import{syncAttributeTableTemplateWithColumns as T}from"../../tables/support/templateUtils.js";import E from"../../time/TimeExtent.js";import{isSelectableLayerWithObjectIds as D}from"../../views/support/selectionUtils.js";import O from"./ActionColumn.js";import k from"./AttachmentsColumn.js";import A from"./FieldColumn.js";import j from"./RelationshipColumn.js";import M from"./Grid/Column.js";import N from"./Grid/Grid.js";import P from"./Grid/GridViewModel.js";import F from"./Grid/GroupColumn.js";import I from"./support/AttachmentsColumnTemplate.js";import L from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as R,isFieldColumn as z,isRelationshipColumn as B}from"./support/columnUtils.js";import{downloadAttachmentInfo as V,exportToCSV as H}from"./support/exportUtils.js";import U from"./support/FeatureStore.js";import W from"./support/FieldColumnTemplate.js";import G from"./support/RelationshipColumnTemplate.js";import K from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as q,isIFeatureTableSupportedLayerWithRelationships as J,findRelatedLayerInSources as ee,findRelationship as te,uniqueColumnNames as Y,hasColumnForField as ne,findField as X,isIFeatureTableSupportedLayerWithAttachments as re,getRelationshipIdsToShow as ie}from"./support/tableUtils.js";import{goTo as ae}from"../support/goToUtils.js";import{messageBundle as Z}from"../support/widget.js";const Q=`80px`;let $=class extends P{constructor(e){super(e),this._refreshDebounced=l(()=>this._refresh()),this._syncTemplateThrottled=h(()=>this._syncAttributeTableTemplate()),this.attachmentsViewOptions=new L,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new a,this.dataProvider=async(e,t)=>{let{layer:n,store:r}=this;if(!t)return;if(!n||!r){t&&t([]);return}try{await n.load()}catch{return}let{objectIds:i}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||i.length===1&&i.items[0]===-1){t([]);return}if(r.state!==`loaded`&&r.state!==`loading`)try{await r.load()}catch{return}let a=this.paginationEnabled?this.pageIndex:e.page;try{let n=await r.queryPage({...e,pageIndex:a});t?.(n)}catch{return}},this.grid=null,this.layers=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new a,this.relationshipColumnConfigs=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,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 U),this._set(`grid`,new N({viewModel:this}))}initialize(){let e=async()=>{this.messages=await r(`esri/widgets/FeatureTable/t9n/FeatureTable`),this.messagesCommon=await r(`esri/t9n/common`),this.messagesUnits=await r(`esri/core/t9n/Units`),this.messagesURIUtils=await r(`esri/widgets/support/t9n/uriUtils`)};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),d(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{let 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()},f),d(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),d(()=>this.layer,async(e,t)=>{let n=this.grid;n&&(n.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad().catch(()=>{}):e.load().catch(()=>{})),this.syncViewSelection&&this._syncSelection(),t&&this.attachmentsViewOptions.objectId!=null&&(this.attachmentsViewOptions.objectId=null)}),d(()=>this.layer?.loaded,e=>{e&&this._onLayerLoad().catch(()=>{})}),d(()=>this.store.state,e=>{e===`loaded`&&(this.scrollToTop(),this.refreshCellContent())}),d(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),d(()=>this.editingEnabled,()=>this.refreshCellContent()),d(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),d(()=>[this.effectiveTimeExtent,this.effectiveWhere],()=>{this.store.state===`loaded`&&this.reset().catch(()=>{})}),p(()=>this.layer,`refresh`,e=>this._onLayerRefresh(e)),p(()=>this.grid,[`cell-click`,`cell-dblclick`,`cell-pointerover`,`cell-pointerout`,`cell-keydown`,`column-reorder`],({index:e,item:t,native:n,path:r,type:i})=>{let a=t?.feature,o=a?.getObjectId(),s=i===`cell-keydown`&&n&&n instanceof KeyboardEvent&&n.key===`Enter`;this.emit(i,{feature:a,index:e,native:n,type:i,fieldName:r??void 0,objectId:o}),(s||i===`cell-click`)&&this._onCellInteraction(o)}),d(()=>this.actionColumnConfig,e=>{let{actionColumn:t,columns:n}=this;t?e?t.set(e):n.remove(t):e&&n.length&&n.add(this._generateActionColumn(),e.frozenToEnd===!1?this._getIndexOfFirstFrozenToEndColumn():void 0)}),d(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),p(()=>this.objectIds,`change`,()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),d(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),d(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),d(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),d(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),d(()=>this.state,e=>{e===`disabled`&&this.relatedTables.length&&this.drainRelatedTables()}),p(()=>this.tableParent?.highlightIds,`change`,({added:e})=>{let{relationshipConfig:t}=this,n=e[0];if(n==null||!t)return;let{relatedLayer:r,relationshipId:i}=t;this.relationshipConfig={objectId:n,relatedLayer:r,relationshipId:i}}),p(()=>this.tableParent,`cell-click`,async e=>{let{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),d(()=>this.attachmentsViewOptions.objectId,(e,t)=>{if(e==null){this.hideAttachmentsView();return}t??this.showAttachmentsView({objectId:e})}),d(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),p(()=>this.highlightIds,`change`,e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this.defaultSelectionManager.clear()}),d(()=>this.effectiveSelectionManager,()=>this._syncSelection(),m),p(()=>this.effectiveSelectionManager,`selection-change`,()=>this._syncSelection(),m)])}destroy(){this._drainColumns(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return b(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _subtypes(){return x(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){let{filterGeometry:e,objectIds:t,filterBySelectionEnabled:n,highlightIds:r}=this,i=new a;return e&&i.push({type:`geometry`,geometry:e}),n?i.push({type:`selection`,objectIds:r.toArray()}):t.length&&i.push({type:`objectId`,objectIds:t.toArray()}),i}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=>R(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 cachedPageCount(){return this.store.cachedPageCount}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome(`clearPrompt`,e)}get defaultSelectionManager(){return this.store.defaultSelectionManager}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(){return this.store.effectiveSelectionManager}get effectiveMultipleSelectionEnabled(){return super.effectiveMultipleSelectionEnabled}get effectiveSize(){return super.effectiveSize}get effectiveTimeExtent(){return this.store.effectiveTimeExtent}get effectiveWhere(){return this.store.effectiveWhere}get fieldColumns(){return this.allColumns.filter(e=>z(e))}get filterByViewExtent(){return this.store.filterByViewExtent}set filterByViewExtent(e){this.store.filterByViewExtent=e}get filterByLayerScaleRange(){return this.store.filterByLayerScaleRange}set filterByLayerScaleRange(e){this.store.filterByLayerScaleRange=e}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get(`filterBySelectionEnabled`)}set filterBySelectionEnabled(e){let{objectIds:t}=this,n=t.length;e?(n&&(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())):n||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 a}set hiddenFields(e){this._set(`hiddenFields`,o(e,this._get(`hiddenFields`),a))}get highlightEnabled(){return this.store.highlightEnabled}set highlightEnabled(e){this.store.highlightEnabled=e}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(){let e=this.layer;return q(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=>B(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(){let{layer:e,layers:t,relationships:n,tableController:r}=this,i=this.store.relationshipInfos;if(i.length||!J(e)||!n?.length)return i;let a=[],o=r?.layers||t||[];return n.forEach(t=>{let n=ee(e,o,t);n&&(n.load().catch(()=>{}),a.push({layer:e,relatedLayer:n,relationshipId:t.id}))}),a}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 selectionManager(){return this.store.selectionManager}set selectionManager(e){this.store.selectionManager=e}get selectionSource(){return`table`}set selectionSource(e){this.syncViewSelection=e===`view`,this._overrideIfSome(`selectionSource`,e)}get showAllRelatedTables(){return this._get(`showAllRelatedTables`)}set showAllRelatedTables(e){let{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(){let{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){let{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get syncViewSelection(){return this.store.syncViewSelection}set syncViewSelection(e){this.store.syncViewSelection=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 viewTimeEnabled(){return this.store.viewTimeEnabled}set viewTimeEnabled(e){this.store.viewTimeEnabled=e}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){let{attachmentsViewOptions:n,store:r}=this,i=n.objectId===e;await r.addAttachment(e,t).catch(e=>{i&&e&&typeof e==`object`&&`error`in e&&e.error instanceof s&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),n.error=e.error)}),i&&!n.error&&(n.onEditComplete(),n.attachmentInfos=await r.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){let{relatedLayer:n,objectId:r,relationshipId:i}=t,{objectIdField:o}=n,s=te(n,i),c=n.displayField||s?.keyField||o;e.set({highlightIds:new a([r]),multipleSelectionEnabledOverride:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,c,i)});let l=e.hiddenFields;l.includes(Y.action)||l.add(Y.action),l.includes(Y.attachments)||l.add(Y.attachments),e.scrollLeft()}async deleteAttachments(e,t){let{attachmentsViewOptions:n,store:r}=this,i=n.objectId===e;await r.deleteAttachments(e,t).catch(e=>{i&&e&&typeof e==`object`&&`error`in e&&e.error instanceof s&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),n.error=e.error)}),i&&!n.error&&(n.onEditComplete(),n.attachmentInfos=await r.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){let e=this.highlightIds.toArray();if(!e?.length)return;let{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),n=t.filter(e=>!e.error).map(e=>e.objectId);n.length&&(this.highlightIds.removeMany(n),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){let n=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await V(n)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([Y.action,Y.attachments])}drainRelatedTablesAboveIndex(e){let{relatedTables:t}=this,n=t.slice(e+1);t.removeMany(n).forEach(e=>e.destroy());let r=t.at(-1);r&&(r.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(r):this._hideAllRelatedTables(r))}async exportSelectionToCSV(e){let{highlightIds:t,layer:n,outFields:r}=this;if(!n||!t.length){this._logWarning(`Export failed.`);return}await H({layer:n,objectIds:t.toArray(),outFields:r,includeGeometry:e})}getCachedFeaturesByPageIndex(e){return this.store.getCachedFeaturesByPageIndex(e)}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){let t=this.layer;if(!t)return`${e}`;let n=`${t.objectIdField}: ${e}`;return e==null?n:this.store.featureTitleMap.get(e)??n}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){return this.getFeatureStoreItemByObjectId(e)?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(e==null||!Number.isInteger(e)){this._logWarning(`Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.`);return}let{pageCount:t}=this;(e>=t||e===-1)&&(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(Y.action)}nextPage(){let e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){let e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),u(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await this.grid?.reset()}async savePendingEdits(){if(this.relatedTableHasPendingEdits&&!this.relatedTableHasInvalidPendingEdits){await this.relatedTable?.savePendingEdits();return}this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){let 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(){let{attachmentId:e,form:t,objectId:n}=this.attachmentsViewOptions;n!=null&&t&&(e==null?await this.addAttachment(n,t):await this.updateAttachment(n,e,t))}async showAttachmentsView({objectId:e}){let{attachmentsViewOptions:t,hiddenFields:n,layer:r}=this;if(!this.attachmentsEnabled||!r){this._logWarning(`The 'attachmentsEnabled' property is currently false.`);return}await r.load();let i=this._getDefaultLayerDisplayField(r),o=await this.store.getAttachmentsByObjectId(e,!0),s=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:o,mode:o.length?`list`:`file`,objectId:e}),this.set({highlightIds:new a([e]),multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)}),n.includes(Y.action)||n.add(Y.action),s!=null&&this.scrollToIndex(s)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}syncSelectionSources(){this.store.syncSelectionSources()}async updateAttachment(e,t,n){let{attachmentsViewOptions:r,store:i}=this,a=r.objectId===e;await i.updateAttachment(e,t,n).catch(e=>{a&&e&&typeof e==`object`&&`error`in e&&e.error instanceof s&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),r.error=e.error)}),a&&!r.error&&(r.onEditComplete(),r.attachmentInfos=await i.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){let{layer:e,view:t}=this,n=this.highlightIds.toArray();if(!e||!t||!n.length)return;let r=e.createQuery();r.objectIds=n,r.returnGeometry=!0;let i=await e.queryFeatures(r);try{await ae(t,i.features)}catch(e){e.name!==`AbortError`&&console.error(e)}}_syncAttributeTableTemplate(e=!1){let{_effectiveAttributeTableTemplate:t,layer:n,tableTemplateOverride:r,syncTemplateOnChangesEnabled:i}=this;if(!n||!t||!i&&!e||r||this.tableParent||this.relatedTable||this.attachmentsViewOptions.objectId!==null)return;let a=JSON.stringify(t.toJSON());T(t,this.columns.toArray(),this.activeSortOrders),t===n.attributeTableTemplate&&JSON.stringify(t.toJSON())!==a&&(n.attributeTableTemplate=t.clone())}async _refresh(){await super.refresh();let e=this.highlightIds.toArray();e.length&&(await this.store.verifyFeaturesByObjectId(e)).forEach((t,n)=>{t||this.highlightIds.remove(e[n])}),this.refreshPageCache();let t=this.attachmentsViewOptions;t?.objectId!=null&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){let{layer:e,pageSize:t}=this;if(!e)return;e.parent&&S(e.parent)&&await e.parent.loadAll();let n=e.capabilities.query?.maxRecordCount,r=n&&n<t,i=r?n:t;r&&(this._logWarning(`The value for 'pageSize' has been adjusted due to the provided layer's max record count.`),this.pageSize=i),this.grid?.set(`pageSize`,i),this.store.load().catch(()=>{}),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();let{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:n}=this,r=e?.columnTemplates;if(!n)return;let i=this._generateColumnsFromColumnTemplates(n,r)??this._generateColumnsFromAttributeTableTemplate(n,t)??this._generateDefaultFieldColumns(n);i.length&&(this.attachmentsEnabled&&!i.some(e=>R(e))&&i.push(this._generateDefaultAttachmentsColumn(n)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!i.some(e=>B(e))&&i.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&i.push(this._generateActionColumn()),i.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(i))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;let{elements:n,orderByFields:r}=t,a=C(e),o=[];o.push(...this._generateColumnsFromAttributeTableElements(e,n,r));let s=a.map(t=>{if(!t.fieldName||ne(t.fieldName,o))return null;let{fieldName:n}=t,i=X(e,n);return i?this._generateDefaultFieldColumn(e,i,{hidden:!0,orderByFields:r}):(this._logTemplateWarning(`A valid 'field' could not be found for the provided template.`),null)}).filter(i);return o.push(...s),this.attachmentsEnabled&&re(e)&&!o.some(e=>R(e))&&o.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&J(e)&&e.relationships?.forEach(({id:e},t)=>{let n=this.relationshipInfos.find(t=>t.relationshipId===e);n&&!o.some(t=>B(t)&&t.relationshipId===e)&&o.push(this._generateDefaultRelationshipColumn({hidden:!0,info:n,index:t}))}),o.length?o:null}_generateColumnsFromAttributeTableElements(e,t,n){return t?.map((t,r)=>{switch(t.type){case`field`:return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:n});case`group`:return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:n});case`attachment`:return this._createAttachmentColumnFromElement({layer:e,element:t,index:r});case`relationship`:return this._createRelationshipColumnFromElement({element:t,index:r})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){let{layer:t,element:n,orderByFields:r}=e,{fieldName:i}=n;if(i==null)return this._logTemplateWarning(`A valid 'fieldName' must be provided.`),null;let a=X(t,i);if(!a)return this._logTemplateWarning(`A valid 'field' could not be found for the provided template.`),null;let{description:o,label:s}=n,c=r?.findIndex(({field:e})=>e&&e===i)??-1,l=c>-1?r?.at(c)?.order:void 0,u=c>-1?c:void 0,{grid:d,messages:f,messagesCommon:p,messagesURIUtils:m,store:h,view:g}=this;return new A({description:o,direction:l,field:a,fieldName:i,grid:d,initialSortPriority:u,label:s,layer:t,messages:f,messagesCommon:p,messagesURIUtils:m,store:h,view:g,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){let{layer:t,element:n,orderByFields:r}=e,{description:i,label:a}=n;if(!a)return this._logTemplateWarning(`Group columns require a label.`),null;if(!n.elements.length)return this._logTemplateWarning(`Group columns require child columns.`),null;let{grid:o,messages:s,messagesCommon:c,messagesURIUtils:l,store:u}=this;return new F({columns:this._generateColumnsFromAttributeTableElements(t,n.elements,r),description:i,grid:o,label:a,messages:s,messagesCommon:c,messagesURIUtils:l,store:u})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled){this._logTemplateWarning(`The 'attachmentsEnabled' property is currently false.`);return}let{layer:t,element:n,index:r}=e,{description:i,label:a}=n,{grid:o,messages:s,messagesCommon:c,messagesURIUtils:l,store:u}=this;return new k({description:i,fieldName:`${Y.attachments}-${r}`,grid:o,label:a,layer:t,messages:s,messagesCommon:c,messagesURIUtils:l,store:u,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled){this._logTemplateWarning(`Relationship columns require related records to be enabled on the table.`);return}let{element:t,index:n}=e,{description:r,label:i,relationshipId:a}=t,o=this.relationshipInfos.find(e=>e.relationshipId===a);if(!o)return this._logTemplateWarning(`Unable to find valid related layer target based on the provided relationship id.`),null;let{grid:s,messages:c,messagesCommon:l,messagesURIUtils:u,store:d}=this;return new j({description:r,fieldName:`${Y.relationship}-${a}-${n}`,grid:s,label:i,messages:c,messagesCommon:l,messagesURIUtils:u,relationshipId:a,store:d,layer:o.relatedLayer,relatedLayer:o.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){let{grid:n,messages:r,messagesCommon:i,messagesURIUtils:a,store:o,view:s}=this;if(!t?.length)return null;let c=[];return t.forEach((t,l)=>{let{autoWidth:u,description:d,direction:f,flexGrow:p,fieldName:m,formatFunction:h,frozen:g,frozenToEnd:_,icon:v,iconText:y,initialSortPriority:b,invalid:x,label:S,labelTooltipText:C,menuConfig:w,resizable:T,sortable:E,textAlign:D,textWrap:O,timeZone:k,type:j,width:N}=t;if(!j){this._logTemplateWarning(`Property 'type' is missing from the provided template.`);return}if(g&&_){this._logTemplateWarning(`Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.`);return}let P=t.visible===!1;if(j===`group`){if(!t.columnTemplates?.length){this._logTemplateWarning(`Group columns must contain column templates.`);return}if(!t.label){this._logTemplateWarning(`Group columns require a label.`);return}let o=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),s=P||this._isFieldHidden(t.label);c.push(new F({autoWidth:u,columns:o,description:d,flexGrow:p,frozen:g,frozenToEnd:_,grid:n,hidden:s,icon:v,iconText:y,invalid:x,label:S,labelTooltipText:C,menuConfig:w,messages:r,messagesCommon:i,messagesURIUtils:a,resizable:T,textAlign:D,textWrap:O,timeZone:k,width:N}))}else if(j===`attachment`){if(!this.attachmentsEnabled){this._logTemplateWarning(`Attachment columns require attachments to be enabled on the table.`);return}c.push(this._generateAttachmentsColumnFromTemplate(e,t,l))}else if(j===`relationship`){if(!this.relatedRecordsEnabled){this._logTemplateWarning(`Relationship columns require related records to be enabled on the table.`);return}let{relationshipId:e}=t;if(e==null){this._logTemplateWarning(`Property 'relationshipId' is missing from the provided template.`);return}let n=this.relationshipInfos.find(t=>t.relationshipId===e);if(!n){this._logTemplateWarning(`Unable to find valid related layer target based on the provided relationship id.`);return}c.push(this._generateRelationshipColumnFromTemplate(n,t,l))}else if(!m){this._logTemplateWarning(`Value for 'fieldName' property was missing from the provided template.`);return}let I=P||this._isFieldHidden(m);if(j===`column`)c.push(new M({autoWidth:u,description:d,direction:f,fieldName:m,flexGrow:p,formatFunction:h,frozen:g,frozenToEnd:_,grid:n,hidden:I,icon:v,iconText:y,initialSortPriority:b,invalid:x,label:S,labelTooltipText:C,menuConfig:w,messages:r,messagesCommon:i,messagesURIUtils:a,resizable:T,sortable:E,store:o,textAlign:D,textWrap:O,timeZone:k,width:N}));else if(j===`field`){let l=X(e,t.fieldName);if(!l){this._logTemplateWarning(`A valid 'field' could not be found for the provided template.`);return}let{editable:m,required:j}=t;c.push(new A({autoWidth:u,description:d,direction:f,editable:m,field:l,fieldName:l.name,flexGrow:p,formatFunction:h,frozen:g,frozenToEnd:_,grid:n,hidden:I,icon:v,iconText:y,initialSortPriority:b,invalid:x,label:S,labelTooltipText:C,layer:e,messages:r,messagesCommon:i,messagesURIUtils:a,menuConfig:w,required:j,resizable:T,sortable:E,store:o,template:t,textAlign:D,textWrap:O,timeZone:k,width:N,view:s,onShowPromptCallback:this._onShowPromptCallback}))}}),c.length?c:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(i)??[]}_generateDefaultFieldColumn(e,t,n){let{grid:r,messages:i,messagesCommon:a,messagesURIUtils:o,store:s,view:c}=this;if(!t.visible||t.type===`geometry`)return null;let l=n?.orderByFields,u=t.name,d=l?.findIndex(({field:e})=>e&&e===u)??-1,f=d>-1?l?.at(d)?.order:void 0,p=d>-1?d:void 0;return new A({direction:f,field:t,fieldName:u,grid:r,hidden:n?.hidden||this._isFieldHidden(u),initialSortPriority:p,layer:e,messages:i,messagesCommon:a,messagesURIUtils:o,store:s,view:c,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,n){let{grid:r,messages:i,messagesCommon:a,messagesURIUtils:o,store:s}=this,{attachmentsViewEnabled:c,autoWidth:l,description:u,flexGrow:d,fieldName:f,formatFunction:p,frozen:m,frozenToEnd:h,icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,menuConfig:x,resizable:S,textAlign:C,textWrap:w,thumbnailAppearance:T,thumbnailCount:E,thumbnailIconScale:D,thumbnailsEnabled:O,timeZone:A,width:j}=t;return new k({attachmentsViewEnabled:c,autoWidth:l,description:u,fieldName:`${Y.attachments}-${n}`,flexGrow:d,formatFunction:p,frozen:m,frozenToEnd:h,grid:r,hidden:t.visible===!1||this._isFieldHidden(y)||this._isFieldHidden(f),icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,layer:e,menuConfig:x,messages:i,messagesCommon:a,messagesURIUtils:o,resizable:S,store:s,textAlign:C,textWrap:w,thumbnailAppearance:T,thumbnailCount:E,thumbnailIconScale:D,thumbnailsEnabled:O,timeZone:A,width:j,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){let{grid:n,messages:r,messagesCommon:i,messagesURIUtils:a,store:o}=this,s=Y.attachments;return new k({fieldName:s,grid:n,hidden:t?.hidden||this._isFieldHidden(s),layer:e,messages:r,messagesCommon:i,messagesURIUtils:a,store:o,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,n){let{grid:r,messages:i,messagesCommon:a,messagesURIUtils:o,store:s}=this,{autoWidth:c,collapsed:l,description:u,flexGrow:d,fieldName:f,formatFunction:p,frozen:m,frozenToEnd:h,icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,menuConfig:x,relationshipId:S,resizable:C,textAlign:w,textWrap:T,timeZone:E,width:D}=t;return new j({autoWidth:c,collapsed:l,description:u,fieldName:`${Y.relationship}-${S}-${n}`,flexGrow:d,formatFunction:p,frozen:m,frozenToEnd:h,grid:r,hidden:t.visible===!1||this._isFieldHidden(y)||this._isFieldHidden(f),icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,menuConfig:x,messages:i,messagesCommon:a,messagesURIUtils:o,relationshipId:S,resizable:C,store:s,textAlign:w,textWrap:T,timeZone:E,width:D,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){let{relationshipInfos:e,relationshipColumnConfigs:t}=this,n=[];return e?.length&&(t?t.forEach((t,r)=>{let{relationshipId:i}=t,a=e.find(e=>e.relationshipId===i);a&&n.push(this._generateDefaultRelationshipColumn({config:t,index:r,info:a}))}):e.forEach((e,t)=>n.push(this._generateDefaultRelationshipColumn({index:t,info:e})))),n}_generateDefaultRelationshipColumn(e){let{config:t,hidden:n,index:r,info:i}=e,{grid:a,messages:o,messagesCommon:s,messagesURIUtils:c,store:l}=this,{relationshipId:u}=i;return new j({...t,fieldName:`${Y.relationship}-${u}-${r}`,grid:a,hidden:!!n,messages:o,messagesCommon:s,messagesURIUtils:c,layer:i.relatedLayer,relatedLayer:i.layer,relationshipId:u,store:l,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){let e=this.actionColumnConfig,t=e?.frozen===!0?!1:e?.frozenToEnd??!0;return new O({hidden:this._isFieldHidden(Y.action),store:this.store,...e,frozenToEnd:t})}_isFieldHidden(e){let t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}_syncSelection(){let{layer:e}=this;D(e)?this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[]:this.highlightIds.removeAll()}_addToSelection(e){let t=this.layer;D(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){let t=this.layer;D(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){let{added:t,removed:n}=e,{attachmentsViewOptions:r}=this;if(this._removeFromSelection(n),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),r.objectId!=null){let e=this.highlightIds.at(0);if(e!=null){let t=await this.store.getAttachmentsByObjectId(e,!0);r.set({attachmentInfos:t,objectId:e,mode:t.length?`list`:`file`}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){let{tableParent:t}=this;t&&e!=null&&t.highlightIds.add(e)}_onShowRelatedTable(e){let{highlightIds:t}=this,{objectId:n}=e;if(t.removeAll(),t.add(n),this.showRelatedTableCallback){this.showRelatedTableCallback(e);return}this.emit(`show-related-table`,e)}_onObjectIdsChange(){let 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){let t=e.layer;if(!t)return;let n=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,n)});let r=e.hiddenFields;r.includes(Y.action)||r.add(Y.action),r.includes(Y.attachments)||r.add(Y.attachments)}_hideAllRelatedTables(e){let{layer:t,relationship:n}=e;if(t&&n?.id!=null){if(e.attachmentsViewOptions.objectId!=null){let n=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)})}else e.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:ie(t,n.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([Y.action,Y.attachments])}}_getTableTemplateForRelatedTableView(e,t,n){return new K({columnTemplates:[new W({fieldName:t,editable:!1,menuConfig:{selectionMode:`single`,icon:`chevron-down`,items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([r,i])=>({selected:r===t,label:i||r,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,r,n)}}))},resizable:!1}),new G({autoWidth:!1,collapsed:!0,flexGrow:0,label:``,resizable:!1,relationshipId:n,width:Q})]})}_getTableTemplateForShowAllTablesView(e,t){let n=[new W({fieldName:t,editable:!1,menuConfig:{selectionMode:`single`,icon:`chevron-down`,items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([n,r])=>({selected:n===t,label:r||n,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,n)}}))},resizable:!1})];return e.attachmentsViewOptions.objectId!=null&&n.push(new I({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:``,resizable:!1,thumbnailsEnabled:!1,width:Q})),new K({columnTemplates:n})}async _onShowPromptCallback(e){let{column:t,objectId:n,oldValue:r,value:i}=e,{_subtypes:a,layer:o}=this;if(!o||!a.length){t.cancel();return}let s=a.find(e=>e.code===i);if(!s){t.cancel();return}let c=Promise.withResolvers(),l=this._createSubtypeEditPrompt(r,s,c),u=!!o.parent&&this.autoSaveEnabled;try{this.showPrompt(l);let e=await c.promise,r=[{fieldName:t.fieldName,value:i}];switch(e){case`update-fields`:for(let[e,t]of Object.entries(s.defaultValues))t!=null&&r.push({fieldName:e,value:t});await t.updateItems({objectId:n,updates:r}),u&&this.refresh();break;case`keep-existing`:await t.updateItems({objectId:n,updates:r}),u&&this.refresh();break;case`undo`:t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,r){let{_subtypes:i,messages:a,messagesCommon:o}=this,s=i.find(t=>t.code===e)?.name??`${e}`,c=`update-fields`,l=[{label:a.subtypes.useDefaultValuesOption,value:`update-fields`},{label:a.subtypes.keepCurrentValuesOption,value:`keep-existing`}];return{context:`info`,title:a.subtypes.changeWarningTitle,message:n(a.subtypes.changeWarning,{originalType:s,newType:t.name}),radios:l,defaultRadioSelection:`update-fields`,onRadioSelection:e=>{c=e},actions:{primary:{label:o.apply,action:()=>r.resolve(c),type:`positive`},secondary:{label:o.cancel,type:`neutral`,action:()=>r.resolve(`undo`)}},cancel:()=>r.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new K({columnTemplates:[new W({fieldName:e,editable:!1,menuConfig:{selectionMode:`single`,icon:`chevron-down`,items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,n])=>({selected:t===e,label:n||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new I({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:``,resizable:!1,thumbnailsEnabled:!1,width:Q})]})}_extractFieldColumnInfosFromTableTemplate(e){let{layer:t,tableTemplate:n}=e??this;return n?n.columnTemplates.filter(({type:e})=>e===`field`||e===`column`).map(({fieldName:e,label:n})=>{if(n!=null&&n!==``)return[e,n];let r=t?.fieldsIndex.get(e);return[e,r&&v(r,t)]}):t?.fields.map(e=>[e.name,v(e,t)])??[]}_getDefaultLayerDisplayField(e){let{displayField:t,objectIdField:n}=e;return t&&t.trim()!==``?t:n||(e.fields.length?e.fields[0].name:``)}_getIndexOfFirstFrozenToEndColumn(){let e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?c.getLogger(this).warnOnce(e):c.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){e!=null&&this.attachmentsViewOptions.objectId!=null&&this.highlightIds.add(e)}};e([g()],$.prototype,`_defaultHiddenFields`,null),e([g()],$.prototype,`_effectiveTableTemplate`,null),e([g()],$.prototype,`_effectiveAttributeTableTemplate`,null),e([g()],$.prototype,`_subtypes`,null),e([g()],$.prototype,`activeFilters`,null),e([g({readOnly:!0})],$.prototype,`activeSortOrders`,null),e([g()],$.prototype,`allRelatedTablesVisible`,null),e([g()],$.prototype,`attachmentsColumns`,null),e([g()],$.prototype,`attachmentsEnabled`,null),e([g()],$.prototype,`attachmentsViewOptions`,void 0),e([g({type:w})],$.prototype,`attributeTableTemplate`,void 0),e([g()],$.prototype,`autoRefreshEnabled`,void 0),e([g()],$.prototype,`autoSaveEnabled`,null),e([g()],$.prototype,`cachedPageCount`,null),e([g()],$.prototype,`canAddRelatedFeature`,null),e([g()],$.prototype,`clearPrompt`,null),e([g({readOnly:!0})],$.prototype,`columns`,void 0),e([g()],$.prototype,`dataProvider`,void 0),e([g()],$.prototype,`defaultSelectionManager`,null),e([g()],$.prototype,`definitionExpression`,null),e([g()],$.prototype,`effectiveSelectionManager`,null),e([g()],$.prototype,`effectiveTimeExtent`,null),e([g()],$.prototype,`effectiveWhere`,null),e([g()],$.prototype,`fieldColumns`,null),e([g()],$.prototype,`filterByViewExtent`,null),e([g()],$.prototype,`filterByLayerScaleRange`,null),e([g({types:y})],$.prototype,`filterGeometry`,null),e([g()],$.prototype,`filterBySelectionEnabled`,null),e([g({readOnly:!0})],$.prototype,`grid`,void 0),e([g()],$.prototype,`hasContingentValues`,null),e([g()],$.prototype,`hasInvalidPendingEdits`,null),e([g()],$.prototype,`hasPendingEdits`,null),e([g()],$.prototype,`hiddenFields`,null),e([g()],$.prototype,`highlightEnabled`,null),e([g()],$.prototype,`initialSize`,null),e([g()],$.prototype,`isQueryingOrSyncing`,null),e([g()],$.prototype,`isSyncingAttachments`,null),e([g()],$.prototype,`layer`,null),e([g()],$.prototype,`layers`,void 0),e([g()],$.prototype,`layerFieldConfigurations`,null),e([g()],$.prototype,`layerView`,null),e([g()],$.prototype,`menuConfig`,void 0),e([g()],$.prototype,`messages`,void 0),e([g(),Z(`esri/t9n/common`)],$.prototype,`messagesCommon`,void 0),e([g(),Z(`esri/core/t9n/Units`)],$.prototype,`messagesUnits`,void 0),e([g(),Z(`esri/widgets/support/t9n/uriUtils`)],$.prototype,`messagesURIUtils`,void 0),e([g()],$.prototype,`outFields`,null),e([g()],$.prototype,`pendingEditsCount`,null),e([g()],$.prototype,`prompt`,void 0),e([g()],$.prototype,`relatedRecordsEnabled`,null),e([g()],$.prototype,`relatedTable`,null),e([g()],$.prototype,`relatedTableHasContingentValues`,null),e([g()],$.prototype,`relatedTables`,void 0),e([g()],$.prototype,`relationship`,null),e([g()],$.prototype,`relationshipColumnConfigs`,void 0),e([g()],$.prototype,`relationshipColumns`,null),e([g()],$.prototype,`relationshipConfig`,null),e([g()],$.prototype,`relationshipInfos`,null),e([g()],$.prototype,`relationships`,null),e([g()],$.prototype,`returnGeometryEnabled`,null),e([g()],$.prototype,`returnMEnabled`,null),e([g()],$.prototype,`returnZEnabled`,null),e([g()],$.prototype,`selectionManager`,null),e([g()],$.prototype,`selectionSource`,null),e([g()],$.prototype,`showAllRelatedTables`,null),e([g()],$.prototype,`showPrompt`,null),e([g()],$.prototype,`showRelatedTableCallback`,void 0),e([g({readOnly:!0,type:U})],$.prototype,`store`,void 0),e([g()],$.prototype,`supportsAttachments`,null),e([g()],$.prototype,`supportsAddAttachments`,null),e([g()],$.prototype,`supportsDeleteAttachments`,null),e([g()],$.prototype,`supportsResizeAttachments`,null),e([g()],$.prototype,`supportsUpdateAttachments`,null),e([g()],$.prototype,`syncTemplateOnChangesEnabled`,void 0),e([g()],$.prototype,`syncViewSelection`,null),e([g()],$.prototype,`tableController`,void 0),e([g()],$.prototype,`tableParent`,void 0),e([g({type:K})],$.prototype,`tableTemplate`,void 0),e([g()],$.prototype,`tableTemplateOverride`,void 0),e([g({type:E})],$.prototype,`timeExtent`,null),e([g()],$.prototype,`timeZone`,null),e([g()],$.prototype,`view`,null),e([g()],$.prototype,`viewTimeEnabled`,null),$=e([_(`esri.widgets.FeatureTable.FeatureTableViewModel`)],$);const oe=$;export{oe as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as n,fetchMessageBundle as r}from"../../intl.js";import{isSome as i}from"../../core/arrayUtils.js";import a from"../../core/Collection.js";import{referenceSetter as o}from"../../core/collectionUtils.js";import s from"../../core/Error.js";import c from"../../core/Logger.js";import{debounce as l,ignoreAbortErrors as u}from"../../core/promiseUtils.js";import{watch as d,initial as f,on as p,syncAndInitial as m}from"../../core/reactiveUtils.js";import{throttle as h}from"../../core/throttle.js";import{property as g,subclass as _}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as v}from"../../editing/fieldUtils.js";import{geometryTypes as y}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as b}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as x,isSubtypeGroupLayer as S}from"../../layers/support/layerUtils.js";import{createFieldInfos as C}from"../../support/popupUtils.js";import w from"../../tables/AttributeTableTemplate.js";import{syncAttributeTableTemplateWithColumns as T}from"../../tables/support/templateUtils.js";import E from"../../time/TimeExtent.js";import{isSelectableLayerWithObjectIds as D}from"../../views/support/selectionUtils.js";import O from"./ActionColumn.js";import k from"./AttachmentsColumn.js";import A from"./FieldColumn.js";import j from"./RelationshipColumn.js";import M from"./Grid/Column.js";import N from"./Grid/Grid.js";import P from"./Grid/GridViewModel.js";import F from"./Grid/GroupColumn.js";import I from"./support/AttachmentsColumnTemplate.js";import L from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as R,isFieldColumn as z,isRelationshipColumn as B}from"./support/columnUtils.js";import{downloadAttachmentInfo as V,exportToCSV as H}from"./support/exportUtils.js";import U from"./support/FeatureStore.js";import W from"./support/FieldColumnTemplate.js";import G from"./support/RelationshipColumnTemplate.js";import K from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as q,isIFeatureTableSupportedLayerWithRelationships as J,findRelatedLayerInSources as ee,findRelationship as te,uniqueColumnNames as Y,hasColumnForField as ne,findField as X,isIFeatureTableSupportedLayerWithAttachments as re,getRelationshipIdsToShow as ie}from"./support/tableUtils.js";import{goTo as ae}from"../support/goToUtils.js";import{messageBundle as Z}from"../support/widget.js";const Q=`80px`;let $=class extends P{constructor(e){super(e),this._refreshDebounced=l(()=>this._refresh()),this._syncTemplateThrottled=h(()=>this._syncAttributeTableTemplate()),this.attachmentsViewOptions=new L,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new a,this.dataProvider=async(e,t)=>{let{layer:n,store:r}=this;if(!t)return;if(!n||!r){t&&t([]);return}try{await n.load()}catch{return}let{objectIds:i}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||i.length===1&&i.items[0]===-1){t([]);return}if(r.state!==`loaded`&&r.state!==`loading`)try{await r.load()}catch{return}let a=this.paginationEnabled?this.pageIndex:e.page;try{let n=await r.queryPage({...e,pageIndex:a});t?.(n)}catch{return}},this.grid=null,this.layers=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new a,this.relationshipColumnConfigs=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,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 U),this._set(`grid`,new N({viewModel:this}))}initialize(){let e=async()=>{this.messages=await r(`esri/widgets/FeatureTable/t9n/FeatureTable`),this.messagesCommon=await r(`esri/t9n/common`),this.messagesUnits=await r(`esri/core/t9n/Units`),this.messagesURIUtils=await r(`esri/widgets/support/t9n/uriUtils`)};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),d(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{let 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()},f),d(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),d(()=>this.layer,async(e,t)=>{let n=this.grid;n&&(n.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad().catch(()=>{}):e.load().catch(()=>{})),this.syncViewSelection&&this._syncSelection(),t&&this.attachmentsViewOptions.objectId!=null&&(this.attachmentsViewOptions.objectId=null)}),d(()=>this.layer?.loaded,e=>{e&&this._onLayerLoad().catch(()=>{})}),d(()=>this.store.state,e=>{e===`loaded`&&(this.scrollToTop(),this.refreshCellContent())}),d(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),d(()=>this.editingEnabled,()=>this.refreshCellContent()),d(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),d(()=>this.effectiveWhere,()=>{this.store.state===`loaded`&&this.reset().catch(()=>{})}),d(()=>this.effectiveTimeExtent,()=>void this.refresh()),p(()=>this.layer,`refresh`,e=>this._onLayerRefresh(e)),p(()=>this.grid,[`cell-click`,`cell-dblclick`,`cell-pointerover`,`cell-pointerout`,`cell-keydown`,`column-reorder`],({index:e,item:t,native:n,path:r,type:i})=>{let a=t?.feature,o=a?.getObjectId(),s=i===`cell-keydown`&&n&&n instanceof KeyboardEvent&&n.key===`Enter`;this.emit(i,{feature:a,index:e,native:n,type:i,fieldName:r??void 0,objectId:o}),(s||i===`cell-click`)&&this._onCellInteraction(o)}),d(()=>this.actionColumnConfig,e=>{let{actionColumn:t,columns:n}=this;t?e?t.set(e):n.remove(t):e&&n.length&&n.add(this._generateActionColumn(),e.frozenToEnd===!1?this._getIndexOfFirstFrozenToEndColumn():void 0)}),d(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),p(()=>this.objectIds,`change`,()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),d(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),d(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),d(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),d(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),d(()=>this.state,e=>{e===`disabled`&&this.relatedTables.length&&this.drainRelatedTables()}),p(()=>this.tableParent?.highlightIds,`change`,({added:e})=>{let{relationshipConfig:t}=this,n=e[0];if(n==null||!t)return;let{relatedLayer:r,relationshipId:i}=t;this.relationshipConfig={objectId:n,relatedLayer:r,relationshipId:i}}),p(()=>this.tableParent,`cell-click`,async e=>{let{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),d(()=>this.attachmentsViewOptions.objectId,(e,t)=>{if(e==null){this.hideAttachmentsView();return}t??this.showAttachmentsView({objectId:e})}),d(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),p(()=>this.highlightIds,`change`,e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this.defaultSelectionManager.clear()}),d(()=>this.effectiveSelectionManager,()=>this._syncSelection(),m),p(()=>this.effectiveSelectionManager,`selection-change`,()=>this._syncSelection(),m)])}destroy(){this._drainColumns(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return b(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _subtypes(){return x(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){let{filterGeometry:e,objectIds:t,filterBySelectionEnabled:n,highlightIds:r}=this,i=new a;return e&&i.push({type:`geometry`,geometry:e}),n?i.push({type:`selection`,objectIds:r.toArray()}):t.length&&i.push({type:`objectId`,objectIds:t.toArray()}),i}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=>R(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 cachedPageCount(){return this.store.cachedPageCount}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome(`clearPrompt`,e)}get defaultSelectionManager(){return this.store.defaultSelectionManager}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(){return this.store.effectiveSelectionManager}get effectiveMultipleSelectionEnabled(){return super.effectiveMultipleSelectionEnabled}get effectiveSize(){return super.effectiveSize}get effectiveTimeExtent(){return this.store.effectiveTimeExtent}get effectiveWhere(){return this.store.effectiveWhere}get fieldColumns(){return this.allColumns.filter(e=>z(e))}get filterByViewExtent(){return this.store.filterByViewExtent}set filterByViewExtent(e){this.store.filterByViewExtent=e}get filterByLayerScaleRange(){return this.store.filterByLayerScaleRange}set filterByLayerScaleRange(e){this.store.filterByLayerScaleRange=e}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get(`filterBySelectionEnabled`)}set filterBySelectionEnabled(e){let{objectIds:t}=this,n=t.length;e?(n&&(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())):n||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 a}set hiddenFields(e){this._set(`hiddenFields`,o(e,this._get(`hiddenFields`),a))}get highlightEnabled(){return this.store.highlightEnabled}set highlightEnabled(e){this.store.highlightEnabled=e}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(){let e=this.layer;return q(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=>B(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(){let{layer:e,layers:t,relationships:n,tableController:r}=this,i=this.store.relationshipInfos;if(i.length||!J(e)||!n?.length)return i;let a=[],o=r?.layers||t||[];return n.forEach(t=>{let n=ee(e,o,t);n&&(n.load().catch(()=>{}),a.push({layer:e,relatedLayer:n,relationshipId:t.id}))}),a}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 selectionManager(){return this.store.selectionManager}set selectionManager(e){this.store.selectionManager=e}get selectionSource(){return`table`}set selectionSource(e){this.syncViewSelection=e===`view`,this._overrideIfSome(`selectionSource`,e)}get showAllRelatedTables(){return this._get(`showAllRelatedTables`)}set showAllRelatedTables(e){let{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(){let{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){let{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get syncViewSelection(){return this.store.syncViewSelection}set syncViewSelection(e){this.store.syncViewSelection=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 viewTimeEnabled(){return this.store.viewTimeEnabled}set viewTimeEnabled(e){this.store.viewTimeEnabled=e}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){let{attachmentsViewOptions:n,store:r}=this,i=n.objectId===e;await r.addAttachment(e,t).catch(e=>{i&&e&&typeof e==`object`&&`error`in e&&e.error instanceof s&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),n.error=e.error)}),i&&!n.error&&(n.onEditComplete(),n.attachmentInfos=await r.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){let{relatedLayer:n,objectId:r,relationshipId:i}=t,{objectIdField:o}=n,s=te(n,i),c=n.displayField||s?.keyField||o;e.set({highlightIds:new a([r]),multipleSelectionEnabledOverride:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,c,i)});let l=e.hiddenFields;l.includes(Y.action)||l.add(Y.action),l.includes(Y.attachments)||l.add(Y.attachments),e.scrollLeft()}async deleteAttachments(e,t){let{attachmentsViewOptions:n,store:r}=this,i=n.objectId===e;await r.deleteAttachments(e,t).catch(e=>{i&&e&&typeof e==`object`&&`error`in e&&e.error instanceof s&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),n.error=e.error)}),i&&!n.error&&(n.onEditComplete(),n.attachmentInfos=await r.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){let e=this.highlightIds.toArray();if(!e?.length)return;let{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),n=t.filter(e=>!e.error).map(e=>e.objectId);n.length&&(this.highlightIds.removeMany(n),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){let n=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await V(n)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([Y.action,Y.attachments])}drainRelatedTablesAboveIndex(e){let{relatedTables:t}=this,n=t.slice(e+1);t.removeMany(n).forEach(e=>e.destroy());let r=t.at(-1);r&&(r.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(r):this._hideAllRelatedTables(r))}async exportSelectionToCSV(e){let{highlightIds:t,layer:n,outFields:r}=this;if(!n||!t.length){this._logWarning(`Export failed.`);return}await H({layer:n,objectIds:t.toArray(),outFields:r,includeGeometry:e})}getCachedFeaturesByPageIndex(e){return this.store.getCachedFeaturesByPageIndex(e)}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){let t=this.layer;if(!t)return`${e}`;let n=`${t.objectIdField}: ${e}`;return e==null?n:this.store.featureTitleMap.get(e)??n}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){return this.getFeatureStoreItemByObjectId(e)?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(e==null||!Number.isInteger(e)){this._logWarning(`Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.`);return}let{pageCount:t}=this;(e>=t||e===-1)&&(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(Y.action)}nextPage(){let e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){let e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),u(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await this.grid?.reset()}async savePendingEdits(){if(this.relatedTableHasPendingEdits&&!this.relatedTableHasInvalidPendingEdits){await this.relatedTable?.savePendingEdits();return}this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){let 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(){let{attachmentId:e,form:t,objectId:n}=this.attachmentsViewOptions;n!=null&&t&&(e==null?await this.addAttachment(n,t):await this.updateAttachment(n,e,t))}async showAttachmentsView({objectId:e}){let{attachmentsViewOptions:t,hiddenFields:n,layer:r}=this;if(!this.attachmentsEnabled||!r){this._logWarning(`The 'attachmentsEnabled' property is currently false.`);return}await r.load();let i=this._getDefaultLayerDisplayField(r),o=await this.store.getAttachmentsByObjectId(e,!0),s=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:o,mode:o.length?`list`:`file`,objectId:e}),this.set({highlightIds:new a([e]),multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)}),n.includes(Y.action)||n.add(Y.action),s!=null&&this.scrollToIndex(s)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}syncSelectionSources(){this.store.syncSelectionSources()}async updateAttachment(e,t,n){let{attachmentsViewOptions:r,store:i}=this,a=r.objectId===e;await i.updateAttachment(e,t,n).catch(e=>{a&&e&&typeof e==`object`&&`error`in e&&e.error instanceof s&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),r.error=e.error)}),a&&!r.error&&(r.onEditComplete(),r.attachmentInfos=await i.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){let{layer:e,view:t}=this,n=this.highlightIds.toArray();if(!e||!t||!n.length)return;let r=e.createQuery();r.objectIds=n,r.returnGeometry=!0;let i=await e.queryFeatures(r);try{await ae(t,i.features)}catch(e){e.name!==`AbortError`&&console.error(e)}}_syncAttributeTableTemplate(e=!1){let{_effectiveAttributeTableTemplate:t,layer:n,tableTemplateOverride:r,syncTemplateOnChangesEnabled:i}=this;if(!n||!t||!i&&!e||r||this.tableParent||this.relatedTable||this.attachmentsViewOptions.objectId!==null)return;let a=JSON.stringify(t.toJSON());T(t,this.columns.toArray(),this.activeSortOrders),t===n.attributeTableTemplate&&JSON.stringify(t.toJSON())!==a&&(n.attributeTableTemplate=t.clone())}async _refresh(){await super.refresh();let e=this.highlightIds.toArray();e.length&&(await this.store.verifyFeaturesByObjectId(e)).forEach((t,n)=>{t||this.highlightIds.remove(e[n])}),this.refreshPageCache();let t=this.attachmentsViewOptions;t?.objectId!=null&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){let{layer:e,pageSize:t}=this;if(!e)return;e.parent&&S(e.parent)&&await e.parent.loadAll();let n=e.capabilities.query?.maxRecordCount,r=n&&n<t,i=r?n:t;r&&(this._logWarning(`The value for 'pageSize' has been adjusted due to the provided layer's max record count.`),this.pageSize=i),this.grid?.set(`pageSize`,i),this.store.load().catch(()=>{}),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();let{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:n}=this,r=e?.columnTemplates;if(!n)return;let i=this._generateColumnsFromColumnTemplates(n,r)??this._generateColumnsFromAttributeTableTemplate(n,t)??this._generateDefaultFieldColumns(n);i.length&&(this.attachmentsEnabled&&!i.some(e=>R(e))&&i.push(this._generateDefaultAttachmentsColumn(n)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!i.some(e=>B(e))&&i.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&i.push(this._generateActionColumn()),i.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(i))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;let{elements:n,orderByFields:r}=t,a=C(e),o=[];o.push(...this._generateColumnsFromAttributeTableElements(e,n,r));let s=a.map(t=>{if(!t.fieldName||ne(t.fieldName,o))return null;let{fieldName:n}=t,i=X(e,n);return i?this._generateDefaultFieldColumn(e,i,{hidden:!0,orderByFields:r}):(this._logTemplateWarning(`A valid 'field' could not be found for the provided template.`),null)}).filter(i);return o.push(...s),this.attachmentsEnabled&&re(e)&&!o.some(e=>R(e))&&o.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&J(e)&&e.relationships?.forEach(({id:e},t)=>{let n=this.relationshipInfos.find(t=>t.relationshipId===e);n&&!o.some(t=>B(t)&&t.relationshipId===e)&&o.push(this._generateDefaultRelationshipColumn({hidden:!0,info:n,index:t}))}),o.length?o:null}_generateColumnsFromAttributeTableElements(e,t,n){return t?.map((t,r)=>{switch(t.type){case`field`:return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:n});case`group`:return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:n});case`attachment`:return this._createAttachmentColumnFromElement({layer:e,element:t,index:r});case`relationship`:return this._createRelationshipColumnFromElement({element:t,index:r})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){let{layer:t,element:n,orderByFields:r}=e,{fieldName:i}=n;if(i==null)return this._logTemplateWarning(`A valid 'fieldName' must be provided.`),null;let a=X(t,i);if(!a)return this._logTemplateWarning(`A valid 'field' could not be found for the provided template.`),null;let{description:o,label:s}=n,c=r?.findIndex(({field:e})=>e&&e===i)??-1,l=c>-1?r?.at(c)?.order:void 0,u=c>-1?c:void 0,{grid:d,messages:f,messagesCommon:p,messagesURIUtils:m,store:h,view:g}=this;return new A({description:o,direction:l,field:a,fieldName:i,grid:d,initialSortPriority:u,label:s,layer:t,messages:f,messagesCommon:p,messagesURIUtils:m,store:h,view:g,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){let{layer:t,element:n,orderByFields:r}=e,{description:i,label:a}=n;if(!a)return this._logTemplateWarning(`Group columns require a label.`),null;if(!n.elements.length)return this._logTemplateWarning(`Group columns require child columns.`),null;let{grid:o,messages:s,messagesCommon:c,messagesURIUtils:l,store:u}=this;return new F({columns:this._generateColumnsFromAttributeTableElements(t,n.elements,r),description:i,grid:o,label:a,messages:s,messagesCommon:c,messagesURIUtils:l,store:u})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled){this._logTemplateWarning(`The 'attachmentsEnabled' property is currently false.`);return}let{layer:t,element:n,index:r}=e,{description:i,label:a}=n,{grid:o,messages:s,messagesCommon:c,messagesURIUtils:l,store:u}=this;return new k({description:i,fieldName:`${Y.attachments}-${r}`,grid:o,label:a,layer:t,messages:s,messagesCommon:c,messagesURIUtils:l,store:u,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled){this._logTemplateWarning(`Relationship columns require related records to be enabled on the table.`);return}let{element:t,index:n}=e,{description:r,label:i,relationshipId:a}=t,o=this.relationshipInfos.find(e=>e.relationshipId===a);if(!o)return this._logTemplateWarning(`Unable to find valid related layer target based on the provided relationship id.`),null;let{grid:s,messages:c,messagesCommon:l,messagesURIUtils:u,store:d}=this;return new j({description:r,fieldName:`${Y.relationship}-${a}-${n}`,grid:s,label:i,messages:c,messagesCommon:l,messagesURIUtils:u,relationshipId:a,store:d,layer:o.relatedLayer,relatedLayer:o.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){let{grid:n,messages:r,messagesCommon:i,messagesURIUtils:a,store:o,view:s}=this;if(!t?.length)return null;let c=[];return t.forEach((t,l)=>{let{autoWidth:u,description:d,direction:f,flexGrow:p,fieldName:m,formatFunction:h,frozen:g,frozenToEnd:_,icon:v,iconText:y,initialSortPriority:b,invalid:x,label:S,labelTooltipText:C,menuConfig:w,resizable:T,sortable:E,textAlign:D,textWrap:O,timeZone:k,type:j,width:N}=t;if(!j){this._logTemplateWarning(`Property 'type' is missing from the provided template.`);return}if(g&&_){this._logTemplateWarning(`Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.`);return}let P=t.visible===!1;if(j===`group`){if(!t.columnTemplates?.length){this._logTemplateWarning(`Group columns must contain column templates.`);return}if(!t.label){this._logTemplateWarning(`Group columns require a label.`);return}let o=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),s=P||this._isFieldHidden(t.label);c.push(new F({autoWidth:u,columns:o,description:d,flexGrow:p,frozen:g,frozenToEnd:_,grid:n,hidden:s,icon:v,iconText:y,invalid:x,label:S,labelTooltipText:C,menuConfig:w,messages:r,messagesCommon:i,messagesURIUtils:a,resizable:T,textAlign:D,textWrap:O,timeZone:k,width:N}))}else if(j===`attachment`){if(!this.attachmentsEnabled){this._logTemplateWarning(`Attachment columns require attachments to be enabled on the table.`);return}c.push(this._generateAttachmentsColumnFromTemplate(e,t,l))}else if(j===`relationship`){if(!this.relatedRecordsEnabled){this._logTemplateWarning(`Relationship columns require related records to be enabled on the table.`);return}let{relationshipId:e}=t;if(e==null){this._logTemplateWarning(`Property 'relationshipId' is missing from the provided template.`);return}let n=this.relationshipInfos.find(t=>t.relationshipId===e);if(!n){this._logTemplateWarning(`Unable to find valid related layer target based on the provided relationship id.`);return}c.push(this._generateRelationshipColumnFromTemplate(n,t,l))}else if(!m){this._logTemplateWarning(`Value for 'fieldName' property was missing from the provided template.`);return}let I=P||this._isFieldHidden(m);if(j===`column`)c.push(new M({autoWidth:u,description:d,direction:f,fieldName:m,flexGrow:p,formatFunction:h,frozen:g,frozenToEnd:_,grid:n,hidden:I,icon:v,iconText:y,initialSortPriority:b,invalid:x,label:S,labelTooltipText:C,menuConfig:w,messages:r,messagesCommon:i,messagesURIUtils:a,resizable:T,sortable:E,store:o,textAlign:D,textWrap:O,timeZone:k,width:N}));else if(j===`field`){let l=X(e,t.fieldName);if(!l){this._logTemplateWarning(`A valid 'field' could not be found for the provided template.`);return}let{editable:m,required:j}=t;c.push(new A({autoWidth:u,description:d,direction:f,editable:m,field:l,fieldName:l.name,flexGrow:p,formatFunction:h,frozen:g,frozenToEnd:_,grid:n,hidden:I,icon:v,iconText:y,initialSortPriority:b,invalid:x,label:S,labelTooltipText:C,layer:e,messages:r,messagesCommon:i,messagesURIUtils:a,menuConfig:w,required:j,resizable:T,sortable:E,store:o,template:t,textAlign:D,textWrap:O,timeZone:k,width:N,view:s,onShowPromptCallback:this._onShowPromptCallback}))}}),c.length?c:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(i)??[]}_generateDefaultFieldColumn(e,t,n){let{grid:r,messages:i,messagesCommon:a,messagesURIUtils:o,store:s,view:c}=this;if(!t.visible||t.type===`geometry`)return null;let l=n?.orderByFields,u=t.name,d=l?.findIndex(({field:e})=>e&&e===u)??-1,f=d>-1?l?.at(d)?.order:void 0,p=d>-1?d:void 0;return new A({direction:f,field:t,fieldName:u,grid:r,hidden:n?.hidden||this._isFieldHidden(u),initialSortPriority:p,layer:e,messages:i,messagesCommon:a,messagesURIUtils:o,store:s,view:c,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,n){let{grid:r,messages:i,messagesCommon:a,messagesURIUtils:o,store:s}=this,{attachmentsViewEnabled:c,autoWidth:l,description:u,flexGrow:d,fieldName:f,formatFunction:p,frozen:m,frozenToEnd:h,icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,menuConfig:x,resizable:S,textAlign:C,textWrap:w,thumbnailAppearance:T,thumbnailCount:E,thumbnailIconScale:D,thumbnailsEnabled:O,timeZone:A,width:j}=t;return new k({attachmentsViewEnabled:c,autoWidth:l,description:u,fieldName:`${Y.attachments}-${n}`,flexGrow:d,formatFunction:p,frozen:m,frozenToEnd:h,grid:r,hidden:t.visible===!1||this._isFieldHidden(y)||this._isFieldHidden(f),icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,layer:e,menuConfig:x,messages:i,messagesCommon:a,messagesURIUtils:o,resizable:S,store:s,textAlign:C,textWrap:w,thumbnailAppearance:T,thumbnailCount:E,thumbnailIconScale:D,thumbnailsEnabled:O,timeZone:A,width:j,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){let{grid:n,messages:r,messagesCommon:i,messagesURIUtils:a,store:o}=this,s=Y.attachments;return new k({fieldName:s,grid:n,hidden:t?.hidden||this._isFieldHidden(s),layer:e,messages:r,messagesCommon:i,messagesURIUtils:a,store:o,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,n){let{grid:r,messages:i,messagesCommon:a,messagesURIUtils:o,store:s}=this,{autoWidth:c,collapsed:l,description:u,flexGrow:d,fieldName:f,formatFunction:p,frozen:m,frozenToEnd:h,icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,menuConfig:x,relationshipId:S,resizable:C,textAlign:w,textWrap:T,timeZone:E,width:D}=t;return new j({autoWidth:c,collapsed:l,description:u,fieldName:`${Y.relationship}-${S}-${n}`,flexGrow:d,formatFunction:p,frozen:m,frozenToEnd:h,grid:r,hidden:t.visible===!1||this._isFieldHidden(y)||this._isFieldHidden(f),icon:g,iconText:_,invalid:v,label:y,labelTooltipText:b,menuConfig:x,messages:i,messagesCommon:a,messagesURIUtils:o,relationshipId:S,resizable:C,store:s,textAlign:w,textWrap:T,timeZone:E,width:D,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){let{relationshipInfos:e,relationshipColumnConfigs:t}=this,n=[];return e?.length&&(t?t.forEach((t,r)=>{let{relationshipId:i}=t,a=e.find(e=>e.relationshipId===i);a&&n.push(this._generateDefaultRelationshipColumn({config:t,index:r,info:a}))}):e.forEach((e,t)=>n.push(this._generateDefaultRelationshipColumn({index:t,info:e})))),n}_generateDefaultRelationshipColumn(e){let{config:t,hidden:n,index:r,info:i}=e,{grid:a,messages:o,messagesCommon:s,messagesURIUtils:c,store:l}=this,{relationshipId:u}=i;return new j({...t,fieldName:`${Y.relationship}-${u}-${r}`,grid:a,hidden:!!n,messages:o,messagesCommon:s,messagesURIUtils:c,layer:i.relatedLayer,relatedLayer:i.layer,relationshipId:u,store:l,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){let e=this.actionColumnConfig,t=e?.frozen===!0?!1:e?.frozenToEnd??!0;return new O({hidden:this._isFieldHidden(Y.action),store:this.store,...e,frozenToEnd:t})}_isFieldHidden(e){let t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}_syncSelection(){let{layer:e}=this;D(e)?this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[]:this.highlightIds.removeAll()}_addToSelection(e){let t=this.layer;D(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){let t=this.layer;D(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){let{added:t,removed:n}=e,{attachmentsViewOptions:r}=this;if(this._removeFromSelection(n),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),r.objectId!=null){let e=this.highlightIds.at(0);if(e!=null){let t=await this.store.getAttachmentsByObjectId(e,!0);r.set({attachmentInfos:t,objectId:e,mode:t.length?`list`:`file`}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){let{tableParent:t}=this;t&&e!=null&&t.highlightIds.add(e)}_onShowRelatedTable(e){let{highlightIds:t}=this,{objectId:n}=e;if(t.removeAll(),t.add(n),this.showRelatedTableCallback){this.showRelatedTableCallback(e);return}this.emit(`show-related-table`,e)}_onObjectIdsChange(){let 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){let t=e.layer;if(!t)return;let n=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,n)});let r=e.hiddenFields;r.includes(Y.action)||r.add(Y.action),r.includes(Y.attachments)||r.add(Y.attachments)}_hideAllRelatedTables(e){let{layer:t,relationship:n}=e;if(t&&n?.id!=null){if(e.attachmentsViewOptions.objectId!=null){let n=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)})}else e.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:ie(t,n.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([Y.action,Y.attachments])}}_getTableTemplateForRelatedTableView(e,t,n){return new K({columnTemplates:[new W({fieldName:t,editable:!1,menuConfig:{selectionMode:`single`,icon:`chevron-down`,items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([r,i])=>({selected:r===t,label:i||r,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,r,n)}}))},resizable:!1}),new G({autoWidth:!1,collapsed:!0,flexGrow:0,label:``,resizable:!1,relationshipId:n,width:Q})]})}_getTableTemplateForShowAllTablesView(e,t){let n=[new W({fieldName:t,editable:!1,menuConfig:{selectionMode:`single`,icon:`chevron-down`,items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([n,r])=>({selected:n===t,label:r||n,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,n)}}))},resizable:!1})];return e.attachmentsViewOptions.objectId!=null&&n.push(new I({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:``,resizable:!1,thumbnailsEnabled:!1,width:Q})),new K({columnTemplates:n})}async _onShowPromptCallback(e){let{column:t,objectId:n,oldValue:r,value:i}=e,{_subtypes:a,layer:o}=this;if(!o||!a.length){t.cancel();return}let s=a.find(e=>e.code===i);if(!s){t.cancel();return}let c=Promise.withResolvers(),l=this._createSubtypeEditPrompt(r,s,c),u=!!o.parent&&this.autoSaveEnabled;try{this.showPrompt(l);let e=await c.promise,r=[{fieldName:t.fieldName,value:i}];switch(e){case`update-fields`:for(let[e,t]of Object.entries(s.defaultValues))t!=null&&r.push({fieldName:e,value:t});await t.updateItems({objectId:n,updates:r}),u&&this.refresh();break;case`keep-existing`:await t.updateItems({objectId:n,updates:r}),u&&this.refresh();break;case`undo`:t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,r){let{_subtypes:i,messages:a,messagesCommon:o}=this,s=i.find(t=>t.code===e)?.name??`${e}`,c=`update-fields`,l=[{label:a.subtypes.useDefaultValuesOption,value:`update-fields`},{label:a.subtypes.keepCurrentValuesOption,value:`keep-existing`}];return{context:`info`,title:a.subtypes.changeWarningTitle,message:n(a.subtypes.changeWarning,{originalType:s,newType:t.name}),radios:l,defaultRadioSelection:`update-fields`,onRadioSelection:e=>{c=e},actions:{primary:{label:o.apply,action:()=>r.resolve(c),type:`positive`},secondary:{label:o.cancel,type:`neutral`,action:()=>r.resolve(`undo`)}},cancel:()=>r.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new K({columnTemplates:[new W({fieldName:e,editable:!1,menuConfig:{selectionMode:`single`,icon:`chevron-down`,items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,n])=>({selected:t===e,label:n||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new I({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:``,resizable:!1,thumbnailsEnabled:!1,width:Q})]})}_extractFieldColumnInfosFromTableTemplate(e){let{layer:t,tableTemplate:n}=e??this;return n?n.columnTemplates.filter(({type:e})=>e===`field`||e===`column`).map(({fieldName:e,label:n})=>{if(n!=null&&n!==``)return[e,n];let r=t?.fieldsIndex.get(e);return[e,r&&v(r,t)]}):t?.fields.map(e=>[e.name,v(e,t)])??[]}_getDefaultLayerDisplayField(e){let{displayField:t,objectIdField:n}=e;return t&&t.trim()!==``?t:n||(e.fields.length?e.fields[0].name:``)}_getIndexOfFirstFrozenToEndColumn(){let e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?c.getLogger(this).warnOnce(e):c.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){e!=null&&this.attachmentsViewOptions.objectId!=null&&this.highlightIds.add(e)}};e([g()],$.prototype,`_defaultHiddenFields`,null),e([g()],$.prototype,`_effectiveTableTemplate`,null),e([g()],$.prototype,`_effectiveAttributeTableTemplate`,null),e([g()],$.prototype,`_subtypes`,null),e([g()],$.prototype,`activeFilters`,null),e([g({readOnly:!0})],$.prototype,`activeSortOrders`,null),e([g()],$.prototype,`allRelatedTablesVisible`,null),e([g()],$.prototype,`attachmentsColumns`,null),e([g()],$.prototype,`attachmentsEnabled`,null),e([g()],$.prototype,`attachmentsViewOptions`,void 0),e([g({type:w})],$.prototype,`attributeTableTemplate`,void 0),e([g()],$.prototype,`autoRefreshEnabled`,void 0),e([g()],$.prototype,`autoSaveEnabled`,null),e([g()],$.prototype,`cachedPageCount`,null),e([g()],$.prototype,`canAddRelatedFeature`,null),e([g()],$.prototype,`clearPrompt`,null),e([g({readOnly:!0})],$.prototype,`columns`,void 0),e([g()],$.prototype,`dataProvider`,void 0),e([g()],$.prototype,`defaultSelectionManager`,null),e([g()],$.prototype,`definitionExpression`,null),e([g()],$.prototype,`effectiveSelectionManager`,null),e([g()],$.prototype,`effectiveTimeExtent`,null),e([g()],$.prototype,`effectiveWhere`,null),e([g()],$.prototype,`fieldColumns`,null),e([g()],$.prototype,`filterByViewExtent`,null),e([g()],$.prototype,`filterByLayerScaleRange`,null),e([g({types:y})],$.prototype,`filterGeometry`,null),e([g()],$.prototype,`filterBySelectionEnabled`,null),e([g({readOnly:!0})],$.prototype,`grid`,void 0),e([g()],$.prototype,`hasContingentValues`,null),e([g()],$.prototype,`hasInvalidPendingEdits`,null),e([g()],$.prototype,`hasPendingEdits`,null),e([g()],$.prototype,`hiddenFields`,null),e([g()],$.prototype,`highlightEnabled`,null),e([g()],$.prototype,`initialSize`,null),e([g()],$.prototype,`isQueryingOrSyncing`,null),e([g()],$.prototype,`isSyncingAttachments`,null),e([g()],$.prototype,`layer`,null),e([g()],$.prototype,`layers`,void 0),e([g()],$.prototype,`layerFieldConfigurations`,null),e([g()],$.prototype,`layerView`,null),e([g()],$.prototype,`menuConfig`,void 0),e([g()],$.prototype,`messages`,void 0),e([g(),Z(`esri/t9n/common`)],$.prototype,`messagesCommon`,void 0),e([g(),Z(`esri/core/t9n/Units`)],$.prototype,`messagesUnits`,void 0),e([g(),Z(`esri/widgets/support/t9n/uriUtils`)],$.prototype,`messagesURIUtils`,void 0),e([g()],$.prototype,`outFields`,null),e([g()],$.prototype,`pendingEditsCount`,null),e([g()],$.prototype,`prompt`,void 0),e([g()],$.prototype,`relatedRecordsEnabled`,null),e([g()],$.prototype,`relatedTable`,null),e([g()],$.prototype,`relatedTableHasContingentValues`,null),e([g()],$.prototype,`relatedTables`,void 0),e([g()],$.prototype,`relationship`,null),e([g()],$.prototype,`relationshipColumnConfigs`,void 0),e([g()],$.prototype,`relationshipColumns`,null),e([g()],$.prototype,`relationshipConfig`,null),e([g()],$.prototype,`relationshipInfos`,null),e([g()],$.prototype,`relationships`,null),e([g()],$.prototype,`returnGeometryEnabled`,null),e([g()],$.prototype,`returnMEnabled`,null),e([g()],$.prototype,`returnZEnabled`,null),e([g()],$.prototype,`selectionManager`,null),e([g()],$.prototype,`selectionSource`,null),e([g()],$.prototype,`showAllRelatedTables`,null),e([g()],$.prototype,`showPrompt`,null),e([g()],$.prototype,`showRelatedTableCallback`,void 0),e([g({readOnly:!0,type:U})],$.prototype,`store`,void 0),e([g()],$.prototype,`supportsAttachments`,null),e([g()],$.prototype,`supportsAddAttachments`,null),e([g()],$.prototype,`supportsDeleteAttachments`,null),e([g()],$.prototype,`supportsResizeAttachments`,null),e([g()],$.prototype,`supportsUpdateAttachments`,null),e([g()],$.prototype,`syncTemplateOnChangesEnabled`,void 0),e([g()],$.prototype,`syncViewSelection`,null),e([g()],$.prototype,`tableController`,void 0),e([g()],$.prototype,`tableParent`,void 0),e([g({type:K})],$.prototype,`tableTemplate`,void 0),e([g()],$.prototype,`tableTemplateOverride`,void 0),e([g({type:E})],$.prototype,`timeExtent`,null),e([g()],$.prototype,`timeZone`,null),e([g()],$.prototype,`view`,null),e([g()],$.prototype,`viewTimeEnabled`,null),$=e([_(`esri.widgets.FeatureTable.FeatureTableViewModel`)],$);const oe=$;export{oe as default};
|
|
@@ -110,7 +110,7 @@ export default class FeatureStore extends Accessor {
|
|
|
110
110
|
*
|
|
111
111
|
* @internal
|
|
112
112
|
*/
|
|
113
|
-
get effectiveTimeExtent(): TimeExtent |
|
|
113
|
+
get effectiveTimeExtent(): TimeExtent | undefined;
|
|
114
114
|
/**
|
|
115
115
|
* The 'effective' where clause used by data queries.
|
|
116
116
|
*
|