@arcgis/portal-components 6.0.0-next.4 → 6.0.0-next.40
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/dist/cdn/2574FNAZ.js +2 -0
- package/dist/cdn/3DOZPC3W.js +2 -0
- package/dist/cdn/3HZI6MKD.js +2 -0
- package/dist/cdn/3KGSWW6B.js +2 -0
- package/dist/cdn/3OL7A2UC.js +2 -0
- package/dist/cdn/3Q7UJKKN.js +2 -0
- package/dist/cdn/43A74S72.js +2 -0
- package/dist/cdn/46HNNQAD.js +2 -0
- package/dist/cdn/46MYBPSS.js +2 -0
- package/dist/cdn/{2TDHJSMP.js → 47DKAGRV.js} +1 -1
- package/dist/cdn/4CBRO7JP.js +2 -0
- package/dist/cdn/4QYVBXZT.js +2 -0
- package/dist/cdn/{K75JTQPW.js → 4VLEUN7I.js} +1 -1
- package/dist/cdn/5M25PCH2.js +2 -0
- package/dist/cdn/5MLBK66O.js +2 -0
- package/dist/cdn/5RBH3LGK.js +2 -0
- package/dist/cdn/5ZHNRQOW.js +2 -0
- package/dist/cdn/62TL6V4N.js +2 -0
- package/dist/cdn/66VV7NHO.js +2 -0
- package/dist/cdn/6AHPTR2E.js +2 -0
- package/dist/cdn/6APPSZ7E.js +2 -0
- package/dist/cdn/{BKD7JSV2.js → 6CUXEL27.js} +1 -1
- package/dist/cdn/6QI7DAS2.js +2 -0
- package/dist/cdn/6ZJNZZPC.js +2 -0
- package/dist/cdn/75CT6IMW.js +2 -0
- package/dist/cdn/7J22VLBO.js +2 -0
- package/dist/cdn/7VPB6Q55.js +63 -0
- package/dist/cdn/7ZU43BL6.js +2 -0
- package/dist/cdn/A5QLPZ57.js +2 -0
- package/dist/cdn/AZTAWZI5.js +2 -0
- package/dist/cdn/{OR6T5SB3.js → BNWJUQDF.js} +1 -1
- package/dist/cdn/BUYOYUA2.js +2 -0
- package/dist/cdn/BX7Q3V2Y.js +43 -0
- package/dist/cdn/BXPNB7VJ.js +2 -0
- package/dist/cdn/BZEKNJUA.js +2 -0
- package/dist/cdn/C6RUWLEJ.js +2 -0
- package/dist/cdn/C7SNE6YG.js +2 -0
- package/dist/cdn/DENQY4OE.js +2 -0
- package/dist/cdn/DT4HGMLS.js +2 -0
- package/dist/cdn/{2YZWRFCI.js → DTGPLVZF.js} +1 -1
- package/dist/cdn/DU2R3VC4.js +2 -0
- package/dist/cdn/E5HCHRAI.js +2 -0
- package/dist/cdn/EBL7YSRM.js +2 -0
- package/dist/cdn/EDGE3T36.js +2 -0
- package/dist/cdn/{YZTBAUIO.js → EFMYI4L2.js} +1 -1
- package/dist/cdn/FFL2L4X5.js +2 -0
- package/dist/cdn/{ZKZDKJ6D.js → FIAEPK5L.js} +1 -1
- package/dist/cdn/FN2QMDEW.js +2 -0
- package/dist/cdn/FTKSVLDI.js +2 -0
- package/dist/cdn/G272JPUS.js +2 -0
- package/dist/cdn/GFUKRB6D.js +2 -0
- package/dist/cdn/{SGDDFWCJ.js → GG6U75ZA.js} +1 -1
- package/dist/cdn/{FRE56NBG.js → GZ4ONSFV.js} +1 -1
- package/dist/cdn/HOIZXTOD.js +2 -0
- package/dist/cdn/{VDXESPJK.js → I4TKQB4A.js} +1 -1
- package/dist/cdn/{TWCJJCPC.js → IAMPUXPT.js} +1 -1
- package/dist/cdn/IAWL475A.js +2 -0
- package/dist/cdn/IGLODZPX.js +2 -0
- package/dist/cdn/IOF72CDU.js +2 -0
- package/dist/cdn/ITRJGXFV.js +93 -0
- package/dist/cdn/ITWLFQI4.js +2 -0
- package/dist/cdn/{7ZWYUHGK.js → IYICIRGI.js} +1 -1
- package/dist/cdn/JFGXTJY4.js +2 -0
- package/dist/cdn/JIU6MBGB.js +2 -0
- package/dist/cdn/JLT5GCLY.js +2 -0
- package/dist/cdn/JTA223NH.js +2 -0
- package/dist/cdn/KA2MXQTR.js +2 -0
- package/dist/cdn/KAK6CNI7.js +2 -0
- package/dist/cdn/KPZGBBDG.js +2 -0
- package/dist/cdn/{CFRJU6VA.js → KRO5XRZ7.js} +1 -1
- package/dist/cdn/KRORL7QC.js +2 -0
- package/dist/cdn/KWL2D56D.js +3 -0
- package/dist/cdn/{QTAYXO5T.js → KXVXQYIB.js} +1 -1
- package/dist/cdn/L3YOPSRB.js +135 -0
- package/dist/cdn/LEESUFWE.js +2 -0
- package/dist/cdn/{IN4JPZTY.js → LGKI24ZT.js} +1 -1
- package/dist/cdn/LTD5KLLE.js +2 -0
- package/dist/cdn/{GAF4YT5N.js → LUJGCYQY.js} +1 -1
- package/dist/cdn/{Z6R3C4AK.js → MB32XRI5.js} +1 -1
- package/dist/cdn/MSL36HAR.js +2 -0
- package/dist/cdn/MSSJRDR7.js +2 -0
- package/dist/cdn/N3WRMPM6.js +2 -0
- package/dist/cdn/N47MW5HI.js +9 -0
- package/dist/cdn/N7XYFVOI.js +2 -0
- package/dist/cdn/NHVPNSNH.js +2 -0
- package/dist/cdn/{5HZNBMW6.js → NU4K2AV3.js} +1 -1
- package/dist/cdn/O2GPTWGF.js +3 -0
- package/dist/cdn/{TRMFL7PT.js → ONRTCGLU.js} +1 -1
- package/dist/cdn/OPI4P6VO.js +2 -0
- package/dist/cdn/{RHCRPJWS.js → OPMM7QH5.js} +1 -1
- package/dist/cdn/OQ2JULON.js +2 -0
- package/dist/cdn/OXF2WDSW.js +2 -0
- package/dist/cdn/P3FFM322.js +2 -0
- package/dist/cdn/QAXFE5DD.js +2 -0
- package/dist/cdn/{JPUUMGX5.js → QKRLO5CJ.js} +1 -1
- package/dist/cdn/R26RBXQW.js +2 -0
- package/dist/cdn/R6KJVAX3.js +99 -0
- package/dist/cdn/RA2NMLMP.js +2 -0
- package/dist/cdn/RJXIU4GH.js +2 -0
- package/dist/cdn/RKHNP3KL.js +2 -0
- package/dist/cdn/RR56BOTV.js +2 -0
- package/dist/cdn/RT26JZP5.js +2 -0
- package/dist/cdn/RTZ2TKM5.js +2 -0
- package/dist/cdn/RX64JXHI.js +170 -0
- package/dist/cdn/RXMM6CFK.js +2 -0
- package/dist/cdn/S4N5QMSN.js +2 -0
- package/dist/cdn/SCLYGIHM.js +2 -0
- package/dist/cdn/{JIJO4CAS.js → SLK7PV62.js} +1 -1
- package/dist/cdn/SRWFOV5W.js +2 -0
- package/dist/cdn/SUN4MBT3.js +2 -0
- package/dist/cdn/SYXCSFIA.js +2 -0
- package/dist/cdn/{3NSHGKZA.js → TBSNDRRE.js} +1 -1
- package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
- package/dist/cdn/TP7V25GT.js +2 -0
- package/dist/cdn/{TXC7YBGL.js → UBMZBXT7.js} +1 -1
- package/dist/cdn/UIK6LPA7.js +2 -0
- package/dist/cdn/ULGME5RT.js +2 -0
- package/dist/cdn/{URQML7KV.js → VQRMXBPQ.js} +1 -1
- package/dist/cdn/VWOBCSD6.js +4 -0
- package/dist/cdn/{JE2376SE.js → W3JJBZYX.js} +1 -1
- package/dist/cdn/W6WVMRGQ.js +2 -0
- package/dist/cdn/{MKSFNVXL.js → WNXDXB3M.js} +1 -1
- package/dist/cdn/{JN23JH3T.js → WOSWA2VI.js} +1 -1
- package/dist/cdn/WTKLB3R6.js +2 -0
- package/dist/cdn/X7W4VJO7.js +2 -0
- package/dist/cdn/XCOP6QHA.js +2 -0
- package/dist/cdn/XE3DCC5D.js +2 -0
- package/dist/cdn/XVV75AX3.js +2 -0
- package/dist/cdn/XYHIVGUK.js +2 -0
- package/dist/cdn/{M5PPX4ZX.js → Y4JOEFBJ.js} +1 -1
- package/dist/cdn/Y7ZCEONL.js +73 -0
- package/dist/cdn/YELHAJB3.js +2 -0
- package/dist/cdn/YH2OFXPU.js +2 -0
- package/dist/cdn/YYVLFAFT.js +2 -0
- package/dist/cdn/{74T6IXSN.js → ZDH4KVAV.js} +1 -1
- package/dist/cdn/{I6IRHXWR.js → ZECUXVTO.js} +1 -1
- package/dist/cdn/ZG7OW456.js +2 -0
- package/dist/cdn/{NWVLGU2C.js → ZLNBCJE4.js} +1 -1
- package/dist/cdn/{K2XSYDAP.js → ZNNEU5QW.js} +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-item-card-sublayer-select/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-preview/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-status-card/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-review-layer-sharing/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/FieldIcons.js +24 -0
- package/dist/chunks/constants.js +7 -0
- package/dist/chunks/contextUsage.js +208 -0
- package/dist/chunks/createPortalTool.js +18 -0
- package/dist/chunks/fieldAddDelete.js +6 -6
- package/dist/chunks/functionalities.js +14 -9
- package/dist/chunks/groups.js +8 -61
- package/dist/chunks/groups2.js +23 -8
- package/dist/chunks/help.js +22 -0
- package/dist/chunks/info.js +2 -2
- package/dist/chunks/item.js +135 -33
- package/dist/chunks/item2.js +96 -122
- package/dist/chunks/itemThumbnail.js +21 -21
- package/dist/chunks/items.js +11 -11
- package/dist/chunks/layers.js +196 -0
- package/dist/chunks/loadClassificationData.js +26 -27
- package/dist/chunks/portal-browser.js +49 -46
- package/dist/chunks/portal-delete-items-review.js +1 -1
- package/dist/chunks/portal-item-badge.js +1 -1
- package/dist/chunks/portal-item-preview-sublayer.js +214 -0
- package/dist/chunks/portal-item-status-card.js +81 -0
- package/dist/chunks/portal-related-items-list-item.js +1 -1
- package/dist/chunks/portal.js +5 -5
- package/dist/chunks/portal2.js +22 -22
- package/dist/chunks/portalEntitySelection.js +61 -0
- package/dist/chunks/previewSessionController.js +33 -0
- package/dist/chunks/query.js +13 -13
- package/dist/chunks/request.js +49 -41
- package/dist/chunks/requests.js +7 -7
- package/dist/chunks/selectedMentions.js +25 -0
- package/dist/chunks/services.js +5 -5
- package/dist/chunks/string.js +19 -11
- package/dist/chunks/ui.js +1 -0
- package/dist/chunks/url.js +2 -2
- package/dist/chunks/user.js +67 -53
- package/dist/chunks/user2.js +10 -10
- package/dist/chunks/utils.js +35 -22
- package/dist/chunks/utils3.js +88 -657
- package/dist/chunks/utils4.js +663 -0
- package/dist/components/arcgis-portal-account-switcher/customElement.js +57 -54
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +27 -0
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +185 -137
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +38 -15
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +816 -2642
- package/dist/components/arcgis-portal-ai-assistant/index.js +5 -0
- package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
- package/dist/components/arcgis-portal-ai-assistant/tools/groups.d.ts +28 -0
- package/dist/components/arcgis-portal-ai-assistant/tools/users.d.ts +28 -0
- package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +41 -3
- package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +19 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/contextUsage.d.ts +46 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.d.ts +26 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.js +46 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.d.ts +1 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.js +10 -0
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +42 -1
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +49 -37
- package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -4
- package/dist/components/arcgis-portal-browser/customElement.d.ts +3 -0
- package/dist/components/arcgis-portal-browser/customElement.js +3 -2
- package/dist/components/arcgis-portal-browser/index.js +1 -0
- package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
- package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
- package/dist/components/arcgis-portal-delete-items/customElement.js +437 -333
- package/dist/components/arcgis-portal-delete-items/index.js +1 -2
- package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
- package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +51 -5
- package/dist/components/arcgis-portal-entity-picker/customElement.js +204 -119
- package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
- package/dist/components/arcgis-portal-field-delete/customElement.js +87 -101
- package/dist/components/arcgis-portal-field-delete/index.js +1 -1
- package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
- package/dist/components/arcgis-portal-group-browser/customElement.js +68 -100
- package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
- package/dist/components/arcgis-portal-group-browser-preview/customElement.js +49 -40
- package/dist/components/arcgis-portal-group-browser-preview/index.js +1 -0
- package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -4
- package/dist/components/arcgis-portal-group-card/customElement.js +16 -16
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-badges/customElement.js +4 -4
- package/dist/components/arcgis-portal-item-card/customElement.d.ts +26 -10
- package/dist/components/arcgis-portal-item-card/customElement.js +90 -80
- package/dist/components/arcgis-portal-item-card/index.js +2 -1
- package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +181 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
- package/dist/components/arcgis-portal-item-favorite/customElement.js +42 -29
- package/dist/components/arcgis-portal-item-preview/customElement.d.ts +263 -0
- package/dist/components/arcgis-portal-item-preview/customElement.js +137 -0
- package/dist/components/arcgis-portal-item-preview/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-preview/index.js +20 -0
- package/dist/components/arcgis-portal-item-preview/types.d.ts +14 -0
- package/dist/components/arcgis-portal-item-preview-copy/customElement.d.ts +215 -0
- package/dist/components/arcgis-portal-item-preview-copy/customElement.js +46 -0
- package/dist/components/arcgis-portal-item-preview-copy/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-preview-copy/index.js +5 -0
- package/dist/components/arcgis-portal-item-preview-field/customElement.d.ts +216 -0
- package/dist/components/arcgis-portal-item-preview-field/customElement.js +34 -0
- package/dist/components/arcgis-portal-item-preview-field/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-preview-field/index.js +6 -0
- package/dist/components/arcgis-portal-item-preview-sublayer/customElement.d.ts +216 -0
- package/dist/components/arcgis-portal-item-preview-sublayer/customElement.js +15 -0
- package/dist/components/arcgis-portal-item-preview-sublayer/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-preview-sublayer/index.js +11 -0
- package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
- package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
- package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
- package/dist/components/arcgis-portal-item-status-card/customElement.d.ts +82 -0
- package/dist/components/arcgis-portal-item-status-card/customElement.js +12 -0
- package/dist/components/arcgis-portal-item-status-card/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-status-card/index.js +4 -0
- package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
- package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
- package/dist/components/arcgis-portal-item-type/customElement.d.ts +16 -14
- package/dist/components/arcgis-portal-item-type/customElement.js +25 -28
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
- package/dist/components/arcgis-portal-navigation/customElement.d.ts +6 -4
- package/dist/components/arcgis-portal-navigation/customElement.js +371 -374
- package/dist/components/arcgis-portal-navigation/index.js +1 -2
- package/dist/components/arcgis-portal-preview-panel/customElement.d.ts +40 -0
- package/dist/components/arcgis-portal-preview-panel/customElement.js +40 -0
- package/dist/components/arcgis-portal-preview-panel/index.d.ts +1 -0
- package/dist/components/arcgis-portal-preview-panel/index.js +1 -0
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
- package/dist/components/arcgis-portal-review-layer-sharing/customElement.d.ts +139 -0
- package/dist/components/arcgis-portal-review-layer-sharing/customElement.js +593 -0
- package/dist/components/arcgis-portal-review-layer-sharing/index.d.ts +1 -0
- package/dist/components/arcgis-portal-review-layer-sharing/index.js +10 -0
- package/dist/components/arcgis-portal-review-layer-sharing/types.d.ts +27 -0
- package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
- package/dist/components/arcgis-portal-review-related-items/customElement.js +46 -18
- package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
- package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
- package/dist/components/arcgis-portal-user-avatar/customElement.d.ts +2 -3
- package/dist/components/arcgis-portal-user-avatar/customElement.js +15 -16
- package/dist/components/arcgis-portal-user-popup/customElement.d.ts +4 -7
- package/dist/components/arcgis-portal-user-popup/customElement.js +128 -111
- package/dist/components/portal-group-browser-filters/customElement.js +15 -15
- package/dist/components/portal-related-items-list-item/customElement.js +16 -14
- package/dist/components/portal-related-items-list-item/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +87 -0
- package/dist/index.js +305 -6
- package/dist/loader.js +22 -11
- package/dist/services/group.d.ts +17 -0
- package/dist/services/groups.d.ts +9 -0
- package/dist/services/item.d.ts +9 -0
- package/dist/types/item.d.ts +19 -11
- package/dist/types/layer.d.ts +27 -0
- package/dist/types/lumina.d.ts +82 -12
- package/dist/types/portalAssistantCurrentContext.d.ts +9 -0
- package/dist/types/portalEntityPicker.d.ts +3 -0
- package/dist/types/preact.d.ts +93 -12
- package/dist/types/react.d.ts +104 -12
- package/dist/types/services.d.ts +28 -1
- package/dist/types/stencil.d.ts +82 -12
- package/dist/types/user.d.ts +14 -10
- package/dist/utils/generateEmbeddings.d.ts +7 -0
- package/dist/utils/semanticSearch.d.ts +60 -0
- package/dist/utils/types.d.ts +10 -0
- package/package.json +14 -13
- package/dist/cdn/23NXHNPU.js +0 -2
- package/dist/cdn/24QSQLRY.js +0 -2
- package/dist/cdn/2CN754CY.js +0 -2
- package/dist/cdn/2FQKDFEE.js +0 -2
- package/dist/cdn/2MPQ5IWJ.js +0 -2
- package/dist/cdn/3CQKCUM5.js +0 -2
- package/dist/cdn/3EYB5GQX.js +0 -2
- package/dist/cdn/3FSPL34I.js +0 -170
- package/dist/cdn/3LEQ37YT.js +0 -68
- package/dist/cdn/4KTRAA2J.js +0 -2
- package/dist/cdn/4MUB6TL6.js +0 -2
- package/dist/cdn/4PRXQFCV.js +0 -2
- package/dist/cdn/4QFTKB6T.js +0 -2
- package/dist/cdn/4TSXFX3M.js +0 -2
- package/dist/cdn/5C5GHX4D.js +0 -2
- package/dist/cdn/7LMZHJZG.js +0 -2
- package/dist/cdn/A2SQ4EMZ.js +0 -2
- package/dist/cdn/AICPYLWE.js +0 -4
- package/dist/cdn/AXOBMX3S.js +0 -2
- package/dist/cdn/AZOJHVAO.js +0 -2
- package/dist/cdn/BYHX3UWV.js +0 -2
- package/dist/cdn/CD5UWSCP.js +0 -2
- package/dist/cdn/D2YQWKME.js +0 -135
- package/dist/cdn/DDBXEXOV.js +0 -2
- package/dist/cdn/DHMNNIXZ.js +0 -2
- package/dist/cdn/DLI4XKJ3.js +0 -2
- package/dist/cdn/DYO5P3F2.js +0 -2
- package/dist/cdn/E66BDC6N.js +0 -2
- package/dist/cdn/EEAVX4PP.js +0 -2
- package/dist/cdn/EMJQI4MA.js +0 -2
- package/dist/cdn/EY5S6ICQ.js +0 -2
- package/dist/cdn/FIBQAMJ3.js +0 -2
- package/dist/cdn/FIQZPIIK.js +0 -2
- package/dist/cdn/FNLBJ4ZQ.js +0 -2
- package/dist/cdn/GGDOGNH4.js +0 -150
- package/dist/cdn/GSOBDGLK.js +0 -2
- package/dist/cdn/GXM3XY3J.js +0 -2
- package/dist/cdn/HCNTXLUT.js +0 -2
- package/dist/cdn/I273CANO.js +0 -2
- package/dist/cdn/I6NVKNZJ.js +0 -2
- package/dist/cdn/J5FKIZAM.js +0 -2
- package/dist/cdn/J5NPDIZM.js +0 -2
- package/dist/cdn/JOUR2FB2.js +0 -3
- package/dist/cdn/JWBUJT43.js +0 -2
- package/dist/cdn/LISDTBEX.js +0 -2
- package/dist/cdn/LYLQCBVX.js +0 -2
- package/dist/cdn/MQK63FV7.js +0 -2
- package/dist/cdn/N4VOTJ25.js +0 -2
- package/dist/cdn/N5QLV56W.js +0 -2
- package/dist/cdn/OD5WXP7J.js +0 -2
- package/dist/cdn/OXPXXIWL.js +0 -2
- package/dist/cdn/PKA745KL.js +0 -2
- package/dist/cdn/PMRFXB4F.js +0 -2
- package/dist/cdn/PNIFJ5DQ.js +0 -2
- package/dist/cdn/PZDI5ZDC.js +0 -2
- package/dist/cdn/QROXYP6V.js +0 -2
- package/dist/cdn/QUOLQGKP.js +0 -2
- package/dist/cdn/QWHGLE3O.js +0 -2
- package/dist/cdn/R3PK7XOP.js +0 -2
- package/dist/cdn/REM3KCX6.js +0 -2
- package/dist/cdn/RNWICLRH.js +0 -2
- package/dist/cdn/RQYNPDN3.js +0 -2
- package/dist/cdn/S6F7U36E.js +0 -400
- package/dist/cdn/SMX2LEJB.js +0 -2
- package/dist/cdn/SVROAT3Z.js +0 -2
- package/dist/cdn/TBZXKKGP.js +0 -2
- package/dist/cdn/TNUCSWBN.js +0 -2
- package/dist/cdn/TOICLGFK.js +0 -2
- package/dist/cdn/TOTWYGB3.js +0 -2
- package/dist/cdn/TUUUK3VX.js +0 -2
- package/dist/cdn/U3KMGSVH.js +0 -2
- package/dist/cdn/UEP2NYJK.js +0 -2
- package/dist/cdn/UZP4YMTE.js +0 -2
- package/dist/cdn/VNU4QX7M.js +0 -41
- package/dist/cdn/XYMBRPC7.js +0 -2
- package/dist/cdn/YB3DR4VO.js +0 -2
- package/dist/cdn/YYTEJVBL.js +0 -2
- package/dist/cdn/Z3HGPBOR.js +0 -2
- package/dist/cdn/ZDDN7UKS.js +0 -2
- package/dist/cdn/ZXNF77OB.js +0 -2
- package/dist/chunks/functional.js +0 -9
- package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
- /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
- /package/dist/cdn/{DAAON2UO.js → UOXUUCE7.js} +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
3
|
+
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
5
|
+
import type { SearchResultSublayerGeometry } from "../../types/item.js";
|
|
6
|
+
import type { PortalItemCardSelectedItem, PortalItemCardSelectErrorDetail, PortalItemCardSublayerSelectDetail } from "./types.js";
|
|
7
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
8
|
+
import type { Button as Button } from "@esri/calcite-components/components/calcite-button";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Selects layers, tables, or tasks from a portal item.
|
|
12
|
+
* Selection is controlled by the parent through selectedItems and arcgisItemCardSelect.
|
|
13
|
+
* Parents can coordinate alerts using arcgisItemCardSelectError.
|
|
14
|
+
*/
|
|
15
|
+
export abstract class ArcgisPortalItemCardSublayerSelect extends LitElement {
|
|
16
|
+
/** Allowed geometries. Other geometries are disabled with an explanatory tooltip. An empty array permits all geometries. */
|
|
17
|
+
accessor allowedGeometries: SearchResultSublayerGeometry[];
|
|
18
|
+
/**
|
|
19
|
+
* Appearance of the select layers button (will always be solid if layers are selected)
|
|
20
|
+
*
|
|
21
|
+
* @default "outline"
|
|
22
|
+
*/
|
|
23
|
+
accessor appearance: Button["appearance"];
|
|
24
|
+
/**
|
|
25
|
+
* Disable user selection and service requests.
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
accessor disabled: boolean;
|
|
30
|
+
/** Portal item to select from. Search-index sublayers are read from sourceJSON. */
|
|
31
|
+
accessor item: PortalItem;
|
|
32
|
+
/** Overrides for localized messages. */
|
|
33
|
+
accessor messageOverrides: {
|
|
34
|
+
select?: string | undefined;
|
|
35
|
+
selectLayers?: string | undefined;
|
|
36
|
+
geometryNotAllowed?: string | undefined;
|
|
37
|
+
selectedSingle?: string | undefined;
|
|
38
|
+
selectedLayers?: string | undefined;
|
|
39
|
+
selectedName?: string | undefined;
|
|
40
|
+
selectedTask?: string | undefined;
|
|
41
|
+
errorTitle?: string | undefined;
|
|
42
|
+
errorBody?: string | undefined;
|
|
43
|
+
notebookErrorBody?: string | undefined;
|
|
44
|
+
retry?: string | undefined;
|
|
45
|
+
selectTask?: string | undefined;
|
|
46
|
+
selectTaskFrom?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
protected messages: {
|
|
50
|
+
select: string;
|
|
51
|
+
selectLayers: string;
|
|
52
|
+
geometryNotAllowed: string;
|
|
53
|
+
selectedSingle: string;
|
|
54
|
+
selectedLayers: string;
|
|
55
|
+
selectedName: string;
|
|
56
|
+
selectedTask: string;
|
|
57
|
+
errorTitle: string;
|
|
58
|
+
errorBody: string;
|
|
59
|
+
notebookErrorBody: string;
|
|
60
|
+
retry: string;
|
|
61
|
+
selectTask: string;
|
|
62
|
+
selectTaskFrom: string;
|
|
63
|
+
} & T9nMeta<{
|
|
64
|
+
select: string;
|
|
65
|
+
selectLayers: string;
|
|
66
|
+
geometryNotAllowed: string;
|
|
67
|
+
selectedSingle: string;
|
|
68
|
+
selectedLayers: string;
|
|
69
|
+
selectedName: string;
|
|
70
|
+
selectedTask: string;
|
|
71
|
+
errorTitle: string;
|
|
72
|
+
errorBody: string;
|
|
73
|
+
notebookErrorBody: string;
|
|
74
|
+
retry: string;
|
|
75
|
+
selectTask: string;
|
|
76
|
+
selectTaskFrom: string;
|
|
77
|
+
}>;
|
|
78
|
+
/** Current Portal instance */
|
|
79
|
+
accessor portal: Portal;
|
|
80
|
+
/** Current parent-controlled selection. Replace the array to accept a selection event; ignored events leave the UI unchanged. */
|
|
81
|
+
accessor selectedItems: PortalItemCardSelectedItem[];
|
|
82
|
+
/**
|
|
83
|
+
* Type of selection
|
|
84
|
+
*
|
|
85
|
+
* @default "single"
|
|
86
|
+
*/
|
|
87
|
+
accessor selection: "multiple" | "single";
|
|
88
|
+
/**
|
|
89
|
+
* Width of the selection dropdown trigger
|
|
90
|
+
*
|
|
91
|
+
* @default "auto"
|
|
92
|
+
*/
|
|
93
|
+
accessor width: "auto" | "full";
|
|
94
|
+
/** Requests a selection change; the parent updates selectedItems. */
|
|
95
|
+
readonly arcgisItemCardSelect: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardSublayerSelectDetail>;
|
|
96
|
+
/** Reports service failures. Alert coordination, if desired, belongs to the parent. */
|
|
97
|
+
readonly arcgisItemCardSelectError: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardSelectErrorDetail>;
|
|
98
|
+
readonly "@eventTypes": {
|
|
99
|
+
arcgisItemCardSelect: ArcgisPortalItemCardSublayerSelect["arcgisItemCardSelect"]["detail"];
|
|
100
|
+
arcgisItemCardSelectError: ArcgisPortalItemCardSublayerSelect["arcgisItemCardSelectError"]["detail"];
|
|
101
|
+
};
|
|
102
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import { c as m } from "../../chunks/runtime.js";
|
|
3
|
+
import { formatNumber as f } from "@arcgis/core/intl.js";
|
|
4
|
+
import { LitElement as g, createEvent as h, nothing as w } from "@arcgis/lumina";
|
|
5
|
+
import { css as b, html as l } from "lit";
|
|
6
|
+
import { createRef as v, ref as y } from "lit/directives/ref.js";
|
|
7
|
+
import { u as k } from "../../chunks/useT9n.js";
|
|
8
|
+
import { j as c } from "../../chunks/item.js";
|
|
9
|
+
import { g as S, b as $ } from "../../chunks/items.js";
|
|
10
|
+
import { g as T } from "../../chunks/utils3.js";
|
|
11
|
+
import { i as C, c as I, r as A, f as E } from "../../chunks/request.js";
|
|
12
|
+
import { f as q, g as G } from "../../chunks/layers.js";
|
|
13
|
+
const x = b`:host,.dropdown{display:block}.title{max-inline-size:32rem;overflow-wrap:anywhere}.dropdown-group{max-block-size:10rem;overflow:auto}calcite-alert{--calcite-z-index-toast: 999;z-index:999}`, N = {
|
|
14
|
+
esriGeometryPoint: "point",
|
|
15
|
+
esriGeometryPolyline: "polyline",
|
|
16
|
+
esriGeometryPolygon: "polygon",
|
|
17
|
+
esriGeometryMultipoint: "multipoint"
|
|
18
|
+
};
|
|
19
|
+
function p(s) {
|
|
20
|
+
return {
|
|
21
|
+
id: s.id,
|
|
22
|
+
title: s.title,
|
|
23
|
+
description: s.description ?? "",
|
|
24
|
+
fieldAliases: Array.isArray(s.fieldAliases) ? s.fieldAliases.join(",") : s.fieldAliases ?? "",
|
|
25
|
+
geometryType: !s.geometryType || s.geometryType === "table" ? "nonspatial" : N[s.geometryType] ?? "nonspatial",
|
|
26
|
+
sourceJSON: s.sourceJSON
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function u(s) {
|
|
30
|
+
const { messageCode: t } = G(s);
|
|
31
|
+
return { error: { code: t === "OAUTH_0070" ? "notebookAccessBlocked" : "serviceUnavailable" } };
|
|
32
|
+
}
|
|
33
|
+
function B(s) {
|
|
34
|
+
return c(s) || !s.id ? void 0 : C("serviceInfo", s.id)?.result?.sublayers.map(p);
|
|
35
|
+
}
|
|
36
|
+
function O(s) {
|
|
37
|
+
s.id && I("serviceInfo", s.id);
|
|
38
|
+
}
|
|
39
|
+
async function P({
|
|
40
|
+
item: s,
|
|
41
|
+
portal: t,
|
|
42
|
+
signal: e
|
|
43
|
+
}) {
|
|
44
|
+
try {
|
|
45
|
+
if (e.throwIfAborted(), c(s)) {
|
|
46
|
+
if (!s.url)
|
|
47
|
+
throw new Error("The geoprocessing item has no service URL.");
|
|
48
|
+
const r = await A({
|
|
49
|
+
url: s.url,
|
|
50
|
+
portal: t,
|
|
51
|
+
options: { signal: e, addTokenManually: !1 }
|
|
52
|
+
}), o = r.tasks ?? (r.parameters ? [s.url.split("/GPServer/").pop() ?? ""] : void 0);
|
|
53
|
+
if (!o)
|
|
54
|
+
throw new Error("The geoprocessing service did not return tasks.");
|
|
55
|
+
return { result: { tasks: o } };
|
|
56
|
+
}
|
|
57
|
+
if (!s.id)
|
|
58
|
+
throw new Error("The item has no ID.");
|
|
59
|
+
const i = await E({
|
|
60
|
+
requester: async () => await q({ item: s, portal: t, isSecure: !1, allowLoginWindow: !0 }),
|
|
61
|
+
key: "serviceInfo",
|
|
62
|
+
id: s.id
|
|
63
|
+
});
|
|
64
|
+
return e.throwIfAborted(), i.result ? { result: { sublayers: i.result.sublayers.map(p) } } : u(i.error);
|
|
65
|
+
} catch (i) {
|
|
66
|
+
return u(i);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class U extends g {
|
|
70
|
+
constructor() {
|
|
71
|
+
super(...arguments), this.messages = k({ blocking: !0 }), this.dropdown = v(), this.selectedEntries = [], this.loading = !1, this.fetched = !1, this.selectedItems = [], this.allowedGeometries = [], this.width = "auto", this.appearance = "outline", this.selection = "single", this.disabled = !1, this.arcgisItemCardSelect = h(), this.arcgisItemCardSelectError = h();
|
|
72
|
+
}
|
|
73
|
+
static {
|
|
74
|
+
this.properties = { sublayers: 16, tasks: 16, loading: 16, fetched: 16, error: 16, item: 0, portal: 0, selectedItems: 0, allowedGeometries: 0, width: 1, appearance: 1, selection: 1, disabled: 7, messageOverrides: 0 };
|
|
75
|
+
}
|
|
76
|
+
static {
|
|
77
|
+
this.styles = x;
|
|
78
|
+
}
|
|
79
|
+
get isTask() {
|
|
80
|
+
return c(this.item);
|
|
81
|
+
}
|
|
82
|
+
get sortedSublayers() {
|
|
83
|
+
return [...this.sublayers ?? []].sort((t, e) => Number(this.isAllowed(e)) - Number(this.isAllowed(t)) || e.id - t.id);
|
|
84
|
+
}
|
|
85
|
+
get selectText() {
|
|
86
|
+
const t = this.selectedEntries, { messages: e } = this;
|
|
87
|
+
if (this.isTask) {
|
|
88
|
+
const r = t[0];
|
|
89
|
+
return t.length === 1 && r && "task" in r ? e.selectedTask.replace("${task}", r.task) : e.selectTask;
|
|
90
|
+
}
|
|
91
|
+
if (!t.length && !this.sublayers?.length)
|
|
92
|
+
return this.isSelected() ? e.selectedSingle : e.select;
|
|
93
|
+
if (!t.length)
|
|
94
|
+
return this.selection === "multiple" ? e.selectLayers : e.select;
|
|
95
|
+
if (this.selection === "multiple")
|
|
96
|
+
return e.selectedLayers.replace("${num}", f(t.length));
|
|
97
|
+
const i = t[0];
|
|
98
|
+
return i && "sublayer" in i ? e.selectedName.replace("${name}", i.sublayer.title) : e.select;
|
|
99
|
+
}
|
|
100
|
+
willUpdate(t) {
|
|
101
|
+
if (t.has("disabled") && this.disabled && (this.requestController?.abort(), this.loading = !1, this.dropdown.value && (this.dropdown.value.open = !1)), (t.has("item") || t.has("selectedItems")) && (this.selectedEntries = this.selectedItems.filter((e) => "item" in e && e.item.id === this.item?.id)), (t.has("item") || t.has("portal")) && (this.requestController?.abort(), this.sublayers = this.item ? S(this.item).sublayers : void 0, this.tasks = void 0, this.loading = !1, this.fetched = !1, this.error = void 0, this.item && !this.sublayers)) {
|
|
102
|
+
const e = B(this.item);
|
|
103
|
+
e && (this.sublayers = e, this.fetched = !0);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
disconnectedCallback() {
|
|
107
|
+
super.disconnectedCallback(), this.requestController?.abort(), this.loading = !1;
|
|
108
|
+
}
|
|
109
|
+
isSelected(t, e) {
|
|
110
|
+
return this.selectedItems.some((i) => "item" in i ? i.item.id === this.item.id && (t ? "sublayer" in i && i.sublayer.id === t.id : e !== void 0 && "task" in i && i.task === e) : !t && e === void 0 && i.id === this.item.id);
|
|
111
|
+
}
|
|
112
|
+
isAllowed(t) {
|
|
113
|
+
return !this.allowedGeometries.length || this.allowedGeometries.includes(t.geometryType);
|
|
114
|
+
}
|
|
115
|
+
select(t, e, i = this.selection === "single" || !this.isSelected(t, e)) {
|
|
116
|
+
this.disabled || (this.arcgisItemCardSelect.emit({
|
|
117
|
+
item: this.item,
|
|
118
|
+
...t ? { sublayer: t } : {},
|
|
119
|
+
...e !== void 0 ? { task: e } : {},
|
|
120
|
+
selected: i
|
|
121
|
+
}), this.requestUpdate(), this.reconcileSelection());
|
|
122
|
+
}
|
|
123
|
+
async reconcileSelection() {
|
|
124
|
+
await this.updateComplete;
|
|
125
|
+
const t = this.sortedSublayers;
|
|
126
|
+
this.dropdown.value?.querySelectorAll("calcite-dropdown-item").forEach((e, i) => {
|
|
127
|
+
e.selected = this.isTask ? this.isSelected(void 0, this.tasks?.[i]) : this.isSelected(t[i]);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
async handleTrigger(t = !1) {
|
|
131
|
+
if (this.loading || this.disabled)
|
|
132
|
+
return;
|
|
133
|
+
this.requestController?.abort();
|
|
134
|
+
const e = new AbortController();
|
|
135
|
+
this.requestController = e;
|
|
136
|
+
const { item: i, portal: r } = this, o = () => !e.signal.aborted && this.item === i && this.portal === r && this.el.isConnected, d = t || !this.fetched && (this.isTask || !this.sublayers && this.item.type !== "Image Service" || $(this.item).includes("SubtypeGroupLayer"));
|
|
137
|
+
if (d) {
|
|
138
|
+
t && (O(i), this.fetched = !1), this.loading = !0, this.error = void 0;
|
|
139
|
+
const a = await P({ item: i, portal: r, signal: e.signal });
|
|
140
|
+
if (!o())
|
|
141
|
+
return;
|
|
142
|
+
if (this.loading = !1, a.error || !a.result) {
|
|
143
|
+
this.error = a.error ?? { code: "serviceUnavailable" }, this.arcgisItemCardSelectError.emit({ item: i, error: this.error });
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (this.sublayers = a.result.sublayers, this.tasks = a.result.tasks, this.fetched = !0, await this.updateComplete, !o())
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (d && this.isTask && this.tasks?.length === 1) {
|
|
150
|
+
this.dropdown.value && (this.dropdown.value.open = !1), this.select(void 0, this.tasks[0], !0);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!this.isTask && !this.sublayers?.length) {
|
|
154
|
+
t || this.select(void 0, void 0, !this.isSelected());
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const n = this.dropdown.value;
|
|
158
|
+
n && (await n.componentOnReady(), o() && (n.open = d || !n.open));
|
|
159
|
+
}
|
|
160
|
+
renderButton(t) {
|
|
161
|
+
return l`<calcite-button slot=${(t ? "trigger" : void 0) ?? w} class="dropdown" .loading=${this.loading} .disabled=${this.loading || this.disabled} .appearance=${this.selectedEntries.length || this.isSelected() ? "solid" : this.appearance} kind=neutral .iconEnd=${t ? "chevron-down" : void 0} .width=${this.width} @click=${(e) => {
|
|
162
|
+
e.stopPropagation(), this.handleTrigger();
|
|
163
|
+
}}>${this.selectText}</calcite-button>`;
|
|
164
|
+
}
|
|
165
|
+
render() {
|
|
166
|
+
if (!this.item || !this.portal || !this.messages._lang)
|
|
167
|
+
return null;
|
|
168
|
+
const t = this.sortedSublayers;
|
|
169
|
+
return l`${t.length || this.isTask ? l`<calcite-dropdown class="dropdown" width=l .placement=${this.appearance === "solid" ? "top" : "bottom-end"} .closeOnSelectDisabled=${!this.isTask && this.selection === "multiple"} overlay-positioning=fixed ${y(this.dropdown)}>${this.renderButton(!0)}<calcite-dropdown-group class="dropdown-group" .selectionMode=${this.selection} .groupTitle=${this.isTask && this.tasks?.length ? this.messages.selectTaskFrom.replace("${title}", this.item.title ?? "") : void 0}>${this.isTask ? this.tasks?.map((e) => l`<calcite-dropdown-item .disabled=${this.disabled} .selected=${this.isSelected(void 0, e)} @calciteDropdownItemSelect=${() => this.select(void 0, e)}><span class="title">${e}</span></calcite-dropdown-item>`) : t.map((e) => l`<calcite-dropdown-item .id=${`sublayer-${e.id}`} .iconStart=${T({ geometry: e.geometryType }).icon} .disabled=${this.disabled || !this.isAllowed(e)} .selected=${this.isSelected(e)} @calciteDropdownItemSelect=${() => {
|
|
170
|
+
this.isAllowed(e) && this.select(e);
|
|
171
|
+
}}><span class="title">${e.title}</span></calcite-dropdown-item>${!this.isAllowed(e) && l`<calcite-tooltip .referenceElement=${`sublayer-${e.id}`} overlay-positioning=fixed>${this.messages.geometryNotAllowed}</calcite-tooltip>` || ""}`)}</calcite-dropdown-group></calcite-dropdown>` : this.renderButton(!1)}<calcite-alert .label=${this.messages.errorTitle} icon kind=danger .open=${!!this.error} @calciteAlertClose=${() => {
|
|
172
|
+
this.error = void 0;
|
|
173
|
+
}}><div slot=title>${this.messages.errorTitle}</div><div slot=message>${this.error?.code === "notebookAccessBlocked" ? this.messages.notebookErrorBody : this.messages.errorBody}</div><calcite-link slot=link @click=${(e) => {
|
|
174
|
+
e.stopPropagation(), this.handleTrigger(!0);
|
|
175
|
+
}}>${this.messages.retry}</calcite-link></calcite-alert>`;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
m("arcgis-portal-item-card-sublayer-select", U);
|
|
179
|
+
export {
|
|
180
|
+
U as ArcgisPortalItemCardSublayerSelect
|
|
181
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-dropdown";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-alert";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-link";
|
|
8
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
2
|
+
import type { SearchResultSublayer } from "../../types/item.js";
|
|
3
|
+
|
|
4
|
+
export type PortalItemCardSelectedItem = PortalItem | {
|
|
5
|
+
item: PortalItem;
|
|
6
|
+
sublayer: SearchResultSublayer;
|
|
7
|
+
} | {
|
|
8
|
+
item: PortalItem;
|
|
9
|
+
task: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export interface PortalItemCardSublayerSelectDetail {
|
|
13
|
+
item: PortalItem;
|
|
14
|
+
sublayer?: SearchResultSublayer;
|
|
15
|
+
task?: string;
|
|
16
|
+
selected: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface PortalItemCardSelectErrorDetail {
|
|
20
|
+
item: PortalItem;
|
|
21
|
+
error: unknown;
|
|
22
|
+
}
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { html as
|
|
5
|
-
import { createRef as v, ref as
|
|
2
|
+
import { c } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as d, createEvent as u } from "@arcgis/lumina";
|
|
4
|
+
import { html as h } from "lit";
|
|
5
|
+
import { createRef as v, ref as m } from "lit/directives/ref.js";
|
|
6
6
|
import { u as f } from "../../chunks/useT9n.js";
|
|
7
|
-
import { g as
|
|
8
|
-
class g extends
|
|
7
|
+
import { g as p, t as F, i as b } from "../../chunks/utils2.js";
|
|
8
|
+
class g extends d {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(), this.messages = f({ blocking: !0 }), this.buttonRef = v(), this.favoriteRequestId = 0, this.handleFavoriteUpdate = (t) => {
|
|
11
|
-
const i =
|
|
11
|
+
const i = p(t, this.item?.id ?? void 0);
|
|
12
12
|
i && (this.isFavorite = i.favorite);
|
|
13
13
|
}, this.handleToggleFavorite = async (t) => {
|
|
14
14
|
t.preventDefault(), t.stopPropagation();
|
|
15
|
-
const { item: i, portal:
|
|
16
|
-
if (!i.id || !
|
|
15
|
+
const { item: i, portal: e, user: s } = this;
|
|
16
|
+
if (!i.id || !e || !s)
|
|
17
17
|
return;
|
|
18
|
-
const
|
|
18
|
+
const o = {
|
|
19
19
|
id: i.id,
|
|
20
20
|
access: i.access
|
|
21
|
-
},
|
|
22
|
-
this.
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
}, r = this.isFavorite;
|
|
22
|
+
this.mutation?.abort();
|
|
23
|
+
const n = new AbortController();
|
|
24
|
+
this.mutation = n;
|
|
25
|
+
const a = !r;
|
|
26
|
+
this.isFavorite = a;
|
|
27
|
+
const { updated: l } = await F({
|
|
28
|
+
currentFavorite: r,
|
|
29
|
+
item: o,
|
|
30
|
+
portal: e,
|
|
31
|
+
user: s
|
|
28
32
|
});
|
|
29
|
-
if (!
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
if (!(n.signal.aborted || this.item !== i || this.item.id !== o.id || this.portal !== e || this.user !== s)) {
|
|
34
|
+
if (!l) {
|
|
35
|
+
this.isFavorite = !a;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.arcgisItemFavoriteUpdate.emit({
|
|
39
|
+
id: i.id,
|
|
40
|
+
favorite: a
|
|
41
|
+
});
|
|
32
42
|
}
|
|
33
|
-
|
|
34
|
-
id: i.id,
|
|
35
|
-
favorite: e
|
|
36
|
-
});
|
|
37
|
-
}, this.isFavorite = !1, this.isFavoriteLoaded = !1, this.width = "full", this.iconOnly = !1, this.scale = "m", this.showTooltip = !1, this.arcgisItemFavoriteUpdate = d(), this.listenOn(window, "arcgisItemFavoriteUpdate", this.handleFavoriteUpdate);
|
|
43
|
+
}, this.isFavorite = !1, this.isFavoriteLoaded = !1, this.width = "full", this.iconOnly = !1, this.scale = "m", this.showTooltip = !1, this.arcgisItemFavoriteUpdate = u(), this.listenOn(window, "arcgisItemFavoriteUpdate", this.handleFavoriteUpdate);
|
|
38
44
|
}
|
|
39
45
|
static {
|
|
40
46
|
this.properties = { isFavorite: 16, isFavoriteLoaded: 16, item: 0, portal: 0, user: 0, width: 1, iconOnly: 5, scale: 1, showTooltip: 5 };
|
|
@@ -43,24 +49,31 @@ class g extends c {
|
|
|
43
49
|
await this.buttonRef.value?.setFocus();
|
|
44
50
|
}
|
|
45
51
|
willUpdate(t) {
|
|
46
|
-
(t.has("item") || t.has("portal") || t.has("user")) && (this.isFavoriteLoaded = !1, this.refreshFavorite());
|
|
52
|
+
(t.has("item") || t.has("portal") || t.has("user")) && (this.mutation?.abort(), this.isFavoriteLoaded = !1, this.refreshFavorite());
|
|
53
|
+
}
|
|
54
|
+
disconnectedCallback() {
|
|
55
|
+
super.disconnectedCallback(), this.mutation?.abort(), this.favoriteRequestId++;
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
super.connectedCallback(), this.hasUpdated && this.refreshFavorite();
|
|
47
59
|
}
|
|
48
60
|
async refreshFavorite() {
|
|
61
|
+
const t = ++this.favoriteRequestId;
|
|
49
62
|
if (!this.item.id || !this.portal || !this.user) {
|
|
50
63
|
this.isFavorite = !1;
|
|
51
64
|
return;
|
|
52
65
|
}
|
|
53
|
-
const
|
|
66
|
+
const i = await b(this.item.id, this.portal, this.user);
|
|
54
67
|
t === this.favoriteRequestId && (this.isFavorite = i, this.isFavoriteLoaded = !0);
|
|
55
68
|
}
|
|
56
69
|
render() {
|
|
57
70
|
if (!this.isFavoriteLoaded)
|
|
58
71
|
return null;
|
|
59
72
|
const t = this.isFavorite ? this.messages.remove : this.messages.add;
|
|
60
|
-
return
|
|
73
|
+
return h`<calcite-button .width=${this.iconOnly ? "auto" : this.width} .scale=${this.scale} .appearance=${this.iconOnly ? "transparent" : "outline-fill"} kind=neutral .iconStart=${this.isFavorite ? "star-f" : "star"} .ariaLabel=${this.iconOnly ? t : void 0} @click=${this.handleToggleFavorite} ${m(this.buttonRef)}>${this.iconOnly ? null : t}</calcite-button>${this.showTooltip ? h`<calcite-tooltip .referenceElement=${this.buttonRef.value}>${t}</calcite-tooltip>` : null}`;
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
|
-
|
|
76
|
+
c("arcgis-portal-item-favorite", g);
|
|
64
77
|
export {
|
|
65
78
|
g as ArcgisPortalItemFavorite
|
|
66
79
|
};
|