@arcgis/portal-components 6.0.0-next.4 → 6.0.0-next.41

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.
Files changed (412) hide show
  1. package/dist/cdn/{SGDDFWCJ.js → 2GIECQ25.js} +1 -1
  2. package/dist/cdn/2N6K2UUQ.js +2 -0
  3. package/dist/cdn/36DGXQLJ.js +2 -0
  4. package/dist/cdn/{2TDHJSMP.js → 3HXQ5Z4C.js} +1 -1
  5. package/dist/cdn/3HZI6MKD.js +2 -0
  6. package/dist/cdn/3OL7A2UC.js +2 -0
  7. package/dist/cdn/3Q7UJKKN.js +2 -0
  8. package/dist/cdn/3SG67WP5.js +2 -0
  9. package/dist/cdn/3ZVDEJPF.js +2 -0
  10. package/dist/cdn/42AN66SK.js +2 -0
  11. package/dist/cdn/46HNNQAD.js +2 -0
  12. package/dist/cdn/4CBRO7JP.js +2 -0
  13. package/dist/cdn/4E354KKM.js +2 -0
  14. package/dist/cdn/4QYVBXZT.js +2 -0
  15. package/dist/cdn/5MLBK66O.js +2 -0
  16. package/dist/cdn/5ZHNRQOW.js +2 -0
  17. package/dist/cdn/62TL6V4N.js +2 -0
  18. package/dist/cdn/67FEZD25.js +2 -0
  19. package/dist/cdn/{BKD7JSV2.js → 6CUXEL27.js} +1 -1
  20. package/dist/cdn/6GPAZV4Z.js +2 -0
  21. package/dist/cdn/6QI7DAS2.js +2 -0
  22. package/dist/cdn/6XDKSVRF.js +2 -0
  23. package/dist/cdn/6ZJNZZPC.js +2 -0
  24. package/dist/cdn/6ZYYG64M.js +2 -0
  25. package/dist/cdn/7AG3E7K6.js +2 -0
  26. package/dist/cdn/7JDXAVUG.js +2 -0
  27. package/dist/cdn/7JKFWVCY.js +2 -0
  28. package/dist/cdn/7VPB6Q55.js +63 -0
  29. package/dist/cdn/AJEQETRW.js +2 -0
  30. package/dist/cdn/{JE2376SE.js → AP7UWD4P.js} +1 -1
  31. package/dist/cdn/{OR6T5SB3.js → BNWJUQDF.js} +1 -1
  32. package/dist/cdn/BUYOYUA2.js +2 -0
  33. package/dist/cdn/BX7Q3V2Y.js +43 -0
  34. package/dist/cdn/BXPNB7VJ.js +2 -0
  35. package/dist/cdn/BZEKNJUA.js +2 -0
  36. package/dist/cdn/C6RUWLEJ.js +2 -0
  37. package/dist/cdn/CERDMRFQ.js +2 -0
  38. package/dist/cdn/DFECUYNW.js +2 -0
  39. package/dist/cdn/DGWOMELT.js +2 -0
  40. package/dist/cdn/DIWTHL4N.js +2 -0
  41. package/dist/cdn/DKUOQCHO.js +2 -0
  42. package/dist/cdn/{ZKZDKJ6D.js → DQL2JT6K.js} +1 -1
  43. package/dist/cdn/{2YZWRFCI.js → DTGPLVZF.js} +1 -1
  44. package/dist/cdn/DU2R3VC4.js +2 -0
  45. package/dist/cdn/E5HCHRAI.js +2 -0
  46. package/dist/cdn/EBL7YSRM.js +2 -0
  47. package/dist/cdn/EDGE3T36.js +2 -0
  48. package/dist/cdn/EETYTFHH.js +2 -0
  49. package/dist/cdn/{YZTBAUIO.js → EFMYI4L2.js} +1 -1
  50. package/dist/cdn/FINVGL3V.js +2 -0
  51. package/dist/cdn/FN2QMDEW.js +2 -0
  52. package/dist/cdn/FXXFSYNB.js +2 -0
  53. package/dist/cdn/GA4OWLSO.js +2 -0
  54. package/dist/cdn/GFUKRB6D.js +2 -0
  55. package/dist/cdn/GHDMQJG4.js +2 -0
  56. package/dist/cdn/{FRE56NBG.js → GY4SY4XC.js} +1 -1
  57. package/dist/cdn/H4TPPTVB.js +2 -0
  58. package/dist/cdn/HOIZXTOD.js +2 -0
  59. package/dist/cdn/{VDXESPJK.js → I4TKQB4A.js} +1 -1
  60. package/dist/cdn/{TWCJJCPC.js → IAMPUXPT.js} +1 -1
  61. package/dist/cdn/IQPJOVDL.js +2 -0
  62. package/dist/cdn/ITRJGXFV.js +93 -0
  63. package/dist/cdn/ITWLFQI4.js +2 -0
  64. package/dist/cdn/IWPJEUHY.js +2 -0
  65. package/dist/cdn/{7ZWYUHGK.js → IYICIRGI.js} +1 -1
  66. package/dist/cdn/JDW7ECBF.js +2 -0
  67. package/dist/cdn/JFGXTJY4.js +2 -0
  68. package/dist/cdn/JGTBDGJ7.js +2 -0
  69. package/dist/cdn/JLT5GCLY.js +2 -0
  70. package/dist/cdn/JTA223NH.js +2 -0
  71. package/dist/cdn/KA2MXQTR.js +2 -0
  72. package/dist/cdn/KAK6CNI7.js +2 -0
  73. package/dist/cdn/{CFRJU6VA.js → KRO5XRZ7.js} +1 -1
  74. package/dist/cdn/KRORL7QC.js +2 -0
  75. package/dist/cdn/KWL2D56D.js +3 -0
  76. package/dist/cdn/{QTAYXO5T.js → KXVXQYIB.js} +1 -1
  77. package/dist/cdn/L3YOPSRB.js +135 -0
  78. package/dist/cdn/{IN4JPZTY.js → LGKI24ZT.js} +1 -1
  79. package/dist/cdn/{JIJO4CAS.js → LVWAYUYZ.js} +1 -1
  80. package/dist/cdn/{Z6R3C4AK.js → MB32XRI5.js} +1 -1
  81. package/dist/cdn/ME6XACY6.js +2 -0
  82. package/dist/cdn/MSL36HAR.js +2 -0
  83. package/dist/cdn/MSSJRDR7.js +2 -0
  84. package/dist/cdn/N47MW5HI.js +9 -0
  85. package/dist/cdn/N5AG34NK.js +2 -0
  86. package/dist/cdn/N7XYFVOI.js +2 -0
  87. package/dist/cdn/NHVPNSNH.js +2 -0
  88. package/dist/cdn/{5HZNBMW6.js → NU4K2AV3.js} +1 -1
  89. package/dist/cdn/O2GPTWGF.js +3 -0
  90. package/dist/cdn/ODYYTLLQ.js +2 -0
  91. package/dist/cdn/{TRMFL7PT.js → ONRTCGLU.js} +1 -1
  92. package/dist/cdn/{RHCRPJWS.js → OPMM7QH5.js} +1 -1
  93. package/dist/cdn/OQBLBDR5.js +2 -0
  94. package/dist/cdn/OWODUQF2.js +2 -0
  95. package/dist/cdn/OXF2WDSW.js +2 -0
  96. package/dist/cdn/PM33STYQ.js +2 -0
  97. package/dist/cdn/PUHZVFK7.js +2 -0
  98. package/dist/cdn/QAXFE5DD.js +2 -0
  99. package/dist/cdn/{JPUUMGX5.js → QKRLO5CJ.js} +1 -1
  100. package/dist/cdn/QXPDVHB5.js +2 -0
  101. package/dist/cdn/R26RBXQW.js +2 -0
  102. package/dist/cdn/{NWVLGU2C.js → R45EMSQJ.js} +1 -1
  103. package/dist/cdn/R6KJVAX3.js +99 -0
  104. package/dist/cdn/RA2NMLMP.js +2 -0
  105. package/dist/cdn/RDRSZQAR.js +2 -0
  106. package/dist/cdn/RR56BOTV.js +2 -0
  107. package/dist/cdn/RT26JZP5.js +2 -0
  108. package/dist/cdn/RX64JXHI.js +170 -0
  109. package/dist/cdn/S4N5QMSN.js +2 -0
  110. package/dist/cdn/SCLYGIHM.js +2 -0
  111. package/dist/cdn/SGV47YVU.js +2 -0
  112. package/dist/cdn/SRWFOV5W.js +2 -0
  113. package/dist/cdn/{3NSHGKZA.js → TBSNDRRE.js} +1 -1
  114. package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
  115. package/dist/cdn/TQX5BOZG.js +2 -0
  116. package/dist/cdn/U2J4ST45.js +2 -0
  117. package/dist/cdn/U3V7PPC2.js +2 -0
  118. package/dist/cdn/{TXC7YBGL.js → UBMZBXT7.js} +1 -1
  119. package/dist/cdn/UCHX4CBR.js +2 -0
  120. package/dist/cdn/UCTXRTQZ.js +2 -0
  121. package/dist/cdn/ULGME5RT.js +2 -0
  122. package/dist/cdn/UWB23CG4.js +2 -0
  123. package/dist/cdn/VABNHOVG.js +2 -0
  124. package/dist/cdn/{URQML7KV.js → VQRMXBPQ.js} +1 -1
  125. package/dist/cdn/VWOBCSD6.js +4 -0
  126. package/dist/cdn/W6U2HMEK.js +2 -0
  127. package/dist/cdn/{MKSFNVXL.js → WNXDXB3M.js} +1 -1
  128. package/dist/cdn/{JN23JH3T.js → WOSWA2VI.js} +1 -1
  129. package/dist/cdn/WTKLB3R6.js +2 -0
  130. package/dist/cdn/{GAF4YT5N.js → XSEFGIVV.js} +1 -1
  131. package/dist/cdn/XYHIVGUK.js +2 -0
  132. package/dist/cdn/{M5PPX4ZX.js → Y4JOEFBJ.js} +1 -1
  133. package/dist/cdn/Y7ZCEONL.js +73 -0
  134. package/dist/cdn/YCMZ3RVZ.js +2 -0
  135. package/dist/cdn/YELHAJB3.js +2 -0
  136. package/dist/cdn/YH2OFXPU.js +2 -0
  137. package/dist/cdn/{I6IRHXWR.js → ZECUXVTO.js} +1 -1
  138. package/dist/cdn/{K2XSYDAP.js → ZNNEU5QW.js} +1 -1
  139. package/dist/cdn/{74T6IXSN.js → ZOOEWYFB.js} +1 -1
  140. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
  141. package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -1
  142. package/dist/cdn/assets/portal-item-card/t9n/messages.en.json +1 -1
  143. package/dist/cdn/assets/portal-item-card-sublayer-select/t9n/messages.en.json +1 -0
  144. package/dist/cdn/assets/portal-item-preview/t9n/messages.en.json +1 -0
  145. package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
  146. package/dist/cdn/assets/portal-item-status-card/t9n/messages.en.json +1 -0
  147. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  148. package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
  149. package/dist/cdn/assets/portal-review-layer-sharing/t9n/messages.en.json +1 -0
  150. package/dist/cdn/index.js +1 -1
  151. package/dist/cdn/main.css +1 -1
  152. package/dist/chunks/FieldIcons.js +24 -0
  153. package/dist/chunks/constants.js +7 -0
  154. package/dist/chunks/contextUsage.js +208 -0
  155. package/dist/chunks/createPortalTool.js +18 -0
  156. package/dist/chunks/fieldAddDelete.js +6 -6
  157. package/dist/chunks/functionalities.js +14 -9
  158. package/dist/chunks/groups.js +8 -61
  159. package/dist/chunks/groups2.js +23 -8
  160. package/dist/chunks/help.js +22 -0
  161. package/dist/chunks/info.js +2 -2
  162. package/dist/chunks/item.js +135 -33
  163. package/dist/chunks/item2.js +96 -122
  164. package/dist/chunks/itemThumbnail.js +21 -21
  165. package/dist/chunks/items.js +11 -11
  166. package/dist/chunks/layers.js +196 -0
  167. package/dist/chunks/loadClassificationData.js +26 -27
  168. package/dist/chunks/portal-browser.js +49 -46
  169. package/dist/chunks/portal-delete-items-review.js +1 -1
  170. package/dist/chunks/portal-item-badge.js +1 -1
  171. package/dist/chunks/portal-item-preview-sublayer.js +214 -0
  172. package/dist/chunks/portal-item-status-card.js +81 -0
  173. package/dist/chunks/portal-related-items-list-item.js +1 -1
  174. package/dist/chunks/portal.js +14 -10
  175. package/dist/chunks/portal2.js +22 -22
  176. package/dist/chunks/portalEntitySelection.js +61 -0
  177. package/dist/chunks/previewSessionController.js +33 -0
  178. package/dist/chunks/query.js +14 -14
  179. package/dist/chunks/request.js +49 -41
  180. package/dist/chunks/requests.js +7 -7
  181. package/dist/chunks/selectedMentions.js +25 -0
  182. package/dist/chunks/services.js +5 -5
  183. package/dist/chunks/string.js +19 -11
  184. package/dist/chunks/ui.js +1 -0
  185. package/dist/chunks/url.js +2 -2
  186. package/dist/chunks/user.js +67 -53
  187. package/dist/chunks/user2.js +10 -10
  188. package/dist/chunks/utils.js +35 -22
  189. package/dist/chunks/utils3.js +88 -657
  190. package/dist/chunks/utils4.js +663 -0
  191. package/dist/components/arcgis-portal-account-switcher/customElement.js +57 -54
  192. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +27 -0
  193. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +185 -137
  194. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +38 -15
  195. package/dist/components/arcgis-portal-ai-assistant/customElement.js +816 -2642
  196. package/dist/components/arcgis-portal-ai-assistant/index.js +5 -0
  197. package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
  198. package/dist/components/arcgis-portal-ai-assistant/tools/groups.d.ts +28 -0
  199. package/dist/components/arcgis-portal-ai-assistant/tools/users.d.ts +28 -0
  200. package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +41 -3
  201. package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +19 -0
  202. package/dist/components/arcgis-portal-ai-assistant-diagnostics/contextUsage.d.ts +46 -0
  203. package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.d.ts +26 -0
  204. package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.js +46 -0
  205. package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.d.ts +1 -0
  206. package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.js +10 -0
  207. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +42 -1
  208. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +49 -37
  209. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -4
  210. package/dist/components/arcgis-portal-browser/customElement.d.ts +3 -0
  211. package/dist/components/arcgis-portal-browser/customElement.js +3 -2
  212. package/dist/components/arcgis-portal-browser/index.js +1 -0
  213. package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
  214. package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
  215. package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
  216. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  217. package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
  218. package/dist/components/arcgis-portal-delete-items/customElement.js +437 -333
  219. package/dist/components/arcgis-portal-delete-items/index.js +1 -2
  220. package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
  221. package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +51 -5
  222. package/dist/components/arcgis-portal-entity-picker/customElement.js +204 -119
  223. package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
  224. package/dist/components/arcgis-portal-field-delete/customElement.js +87 -101
  225. package/dist/components/arcgis-portal-field-delete/index.js +1 -1
  226. package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
  227. package/dist/components/arcgis-portal-group-browser/customElement.js +68 -100
  228. package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
  229. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +49 -40
  230. package/dist/components/arcgis-portal-group-browser-preview/index.js +1 -0
  231. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -4
  232. package/dist/components/arcgis-portal-group-card/customElement.js +16 -16
  233. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
  234. package/dist/components/arcgis-portal-item-badges/customElement.js +4 -4
  235. package/dist/components/arcgis-portal-item-card/customElement.d.ts +37 -10
  236. package/dist/components/arcgis-portal-item-card/customElement.js +125 -86
  237. package/dist/components/arcgis-portal-item-card/index.js +4 -1
  238. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
  239. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +181 -0
  240. package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
  241. package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
  242. package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
  243. package/dist/components/arcgis-portal-item-favorite/customElement.js +42 -29
  244. package/dist/components/arcgis-portal-item-preview/customElement.d.ts +263 -0
  245. package/dist/components/arcgis-portal-item-preview/customElement.js +137 -0
  246. package/dist/components/arcgis-portal-item-preview/index.d.ts +1 -0
  247. package/dist/components/arcgis-portal-item-preview/index.js +20 -0
  248. package/dist/components/arcgis-portal-item-preview/types.d.ts +14 -0
  249. package/dist/components/arcgis-portal-item-preview-copy/customElement.d.ts +215 -0
  250. package/dist/components/arcgis-portal-item-preview-copy/customElement.js +46 -0
  251. package/dist/components/arcgis-portal-item-preview-copy/index.d.ts +1 -0
  252. package/dist/components/arcgis-portal-item-preview-copy/index.js +5 -0
  253. package/dist/components/arcgis-portal-item-preview-field/customElement.d.ts +216 -0
  254. package/dist/components/arcgis-portal-item-preview-field/customElement.js +34 -0
  255. package/dist/components/arcgis-portal-item-preview-field/index.d.ts +1 -0
  256. package/dist/components/arcgis-portal-item-preview-field/index.js +6 -0
  257. package/dist/components/arcgis-portal-item-preview-sublayer/customElement.d.ts +216 -0
  258. package/dist/components/arcgis-portal-item-preview-sublayer/customElement.js +15 -0
  259. package/dist/components/arcgis-portal-item-preview-sublayer/index.d.ts +1 -0
  260. package/dist/components/arcgis-portal-item-preview-sublayer/index.js +11 -0
  261. package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
  262. package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
  263. package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
  264. package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
  265. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
  266. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
  267. package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
  268. package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
  269. package/dist/components/arcgis-portal-item-status-card/customElement.d.ts +82 -0
  270. package/dist/components/arcgis-portal-item-status-card/customElement.js +12 -0
  271. package/dist/components/arcgis-portal-item-status-card/index.d.ts +1 -0
  272. package/dist/components/arcgis-portal-item-status-card/index.js +4 -0
  273. package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
  274. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
  275. package/dist/components/arcgis-portal-item-type/customElement.d.ts +16 -14
  276. package/dist/components/arcgis-portal-item-type/customElement.js +25 -28
  277. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
  278. package/dist/components/arcgis-portal-navigation/customElement.d.ts +10 -4
  279. package/dist/components/arcgis-portal-navigation/customElement.js +349 -351
  280. package/dist/components/arcgis-portal-navigation/index.js +4 -5
  281. package/dist/components/arcgis-portal-navigation/types.d.ts +3 -0
  282. package/dist/components/arcgis-portal-preview-panel/customElement.d.ts +40 -0
  283. package/dist/components/arcgis-portal-preview-panel/customElement.js +40 -0
  284. package/dist/components/arcgis-portal-preview-panel/index.d.ts +1 -0
  285. package/dist/components/arcgis-portal-preview-panel/index.js +1 -0
  286. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
  287. package/dist/components/arcgis-portal-review-layer-sharing/customElement.d.ts +139 -0
  288. package/dist/components/arcgis-portal-review-layer-sharing/customElement.js +593 -0
  289. package/dist/components/arcgis-portal-review-layer-sharing/index.d.ts +1 -0
  290. package/dist/components/arcgis-portal-review-layer-sharing/index.js +10 -0
  291. package/dist/components/arcgis-portal-review-layer-sharing/types.d.ts +27 -0
  292. package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
  293. package/dist/components/arcgis-portal-review-related-items/customElement.js +46 -18
  294. package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
  295. package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
  296. package/dist/components/arcgis-portal-user-avatar/customElement.d.ts +2 -3
  297. package/dist/components/arcgis-portal-user-avatar/customElement.js +15 -16
  298. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +4 -7
  299. package/dist/components/arcgis-portal-user-popup/customElement.js +128 -111
  300. package/dist/components/portal-group-browser-filters/customElement.js +15 -15
  301. package/dist/components/portal-related-items-list-item/customElement.js +16 -14
  302. package/dist/components/portal-related-items-list-item/index.js +1 -1
  303. package/dist/docs/api.json +1 -1
  304. package/dist/docs/docs.json +1 -1
  305. package/dist/docs/vscode.css-custom-data.json +1 -1
  306. package/dist/docs/vscode.html-custom-data.json +1 -1
  307. package/dist/docs/web-types.json +1 -1
  308. package/dist/index.d.ts +87 -0
  309. package/dist/index.js +305 -6
  310. package/dist/loader.js +22 -11
  311. package/dist/services/group.d.ts +17 -0
  312. package/dist/services/groups.d.ts +9 -0
  313. package/dist/services/item.d.ts +9 -0
  314. package/dist/types/item.d.ts +23 -11
  315. package/dist/types/layer.d.ts +27 -0
  316. package/dist/types/lumina.d.ts +82 -12
  317. package/dist/types/portalAssistantCurrentContext.d.ts +9 -0
  318. package/dist/types/portalEntityPicker.d.ts +3 -0
  319. package/dist/types/preact.d.ts +93 -12
  320. package/dist/types/react.d.ts +104 -12
  321. package/dist/types/services.d.ts +28 -1
  322. package/dist/types/stencil.d.ts +82 -12
  323. package/dist/types/user.d.ts +14 -10
  324. package/dist/utils/generateEmbeddings.d.ts +7 -0
  325. package/dist/utils/semanticSearch.d.ts +60 -0
  326. package/dist/utils/types.d.ts +10 -0
  327. package/package.json +14 -13
  328. package/dist/cdn/23NXHNPU.js +0 -2
  329. package/dist/cdn/24QSQLRY.js +0 -2
  330. package/dist/cdn/2CN754CY.js +0 -2
  331. package/dist/cdn/2FQKDFEE.js +0 -2
  332. package/dist/cdn/2MPQ5IWJ.js +0 -2
  333. package/dist/cdn/3CQKCUM5.js +0 -2
  334. package/dist/cdn/3EYB5GQX.js +0 -2
  335. package/dist/cdn/3FSPL34I.js +0 -170
  336. package/dist/cdn/3LEQ37YT.js +0 -68
  337. package/dist/cdn/4KTRAA2J.js +0 -2
  338. package/dist/cdn/4MUB6TL6.js +0 -2
  339. package/dist/cdn/4PRXQFCV.js +0 -2
  340. package/dist/cdn/4QFTKB6T.js +0 -2
  341. package/dist/cdn/4TSXFX3M.js +0 -2
  342. package/dist/cdn/5C5GHX4D.js +0 -2
  343. package/dist/cdn/7LMZHJZG.js +0 -2
  344. package/dist/cdn/A2SQ4EMZ.js +0 -2
  345. package/dist/cdn/AICPYLWE.js +0 -4
  346. package/dist/cdn/AXOBMX3S.js +0 -2
  347. package/dist/cdn/AZOJHVAO.js +0 -2
  348. package/dist/cdn/BYHX3UWV.js +0 -2
  349. package/dist/cdn/CD5UWSCP.js +0 -2
  350. package/dist/cdn/D2YQWKME.js +0 -135
  351. package/dist/cdn/DDBXEXOV.js +0 -2
  352. package/dist/cdn/DHMNNIXZ.js +0 -2
  353. package/dist/cdn/DLI4XKJ3.js +0 -2
  354. package/dist/cdn/DYO5P3F2.js +0 -2
  355. package/dist/cdn/E66BDC6N.js +0 -2
  356. package/dist/cdn/EEAVX4PP.js +0 -2
  357. package/dist/cdn/EMJQI4MA.js +0 -2
  358. package/dist/cdn/EY5S6ICQ.js +0 -2
  359. package/dist/cdn/FIBQAMJ3.js +0 -2
  360. package/dist/cdn/FIQZPIIK.js +0 -2
  361. package/dist/cdn/FNLBJ4ZQ.js +0 -2
  362. package/dist/cdn/GGDOGNH4.js +0 -150
  363. package/dist/cdn/GSOBDGLK.js +0 -2
  364. package/dist/cdn/GXM3XY3J.js +0 -2
  365. package/dist/cdn/HCNTXLUT.js +0 -2
  366. package/dist/cdn/I273CANO.js +0 -2
  367. package/dist/cdn/I6NVKNZJ.js +0 -2
  368. package/dist/cdn/J5FKIZAM.js +0 -2
  369. package/dist/cdn/J5NPDIZM.js +0 -2
  370. package/dist/cdn/JOUR2FB2.js +0 -3
  371. package/dist/cdn/JWBUJT43.js +0 -2
  372. package/dist/cdn/K75JTQPW.js +0 -2
  373. package/dist/cdn/LISDTBEX.js +0 -2
  374. package/dist/cdn/LYLQCBVX.js +0 -2
  375. package/dist/cdn/MQK63FV7.js +0 -2
  376. package/dist/cdn/N4VOTJ25.js +0 -2
  377. package/dist/cdn/N5QLV56W.js +0 -2
  378. package/dist/cdn/OD5WXP7J.js +0 -2
  379. package/dist/cdn/OXPXXIWL.js +0 -2
  380. package/dist/cdn/PKA745KL.js +0 -2
  381. package/dist/cdn/PMRFXB4F.js +0 -2
  382. package/dist/cdn/PNIFJ5DQ.js +0 -2
  383. package/dist/cdn/PZDI5ZDC.js +0 -2
  384. package/dist/cdn/QROXYP6V.js +0 -2
  385. package/dist/cdn/QUOLQGKP.js +0 -2
  386. package/dist/cdn/QWHGLE3O.js +0 -2
  387. package/dist/cdn/R3PK7XOP.js +0 -2
  388. package/dist/cdn/REM3KCX6.js +0 -2
  389. package/dist/cdn/RNWICLRH.js +0 -2
  390. package/dist/cdn/RQYNPDN3.js +0 -2
  391. package/dist/cdn/S6F7U36E.js +0 -400
  392. package/dist/cdn/SMX2LEJB.js +0 -2
  393. package/dist/cdn/SVROAT3Z.js +0 -2
  394. package/dist/cdn/TBZXKKGP.js +0 -2
  395. package/dist/cdn/TNUCSWBN.js +0 -2
  396. package/dist/cdn/TOICLGFK.js +0 -2
  397. package/dist/cdn/TOTWYGB3.js +0 -2
  398. package/dist/cdn/TUUUK3VX.js +0 -2
  399. package/dist/cdn/U3KMGSVH.js +0 -2
  400. package/dist/cdn/UEP2NYJK.js +0 -2
  401. package/dist/cdn/UZP4YMTE.js +0 -2
  402. package/dist/cdn/VNU4QX7M.js +0 -41
  403. package/dist/cdn/XYMBRPC7.js +0 -2
  404. package/dist/cdn/YB3DR4VO.js +0 -2
  405. package/dist/cdn/YYTEJVBL.js +0 -2
  406. package/dist/cdn/Z3HGPBOR.js +0 -2
  407. package/dist/cdn/ZDDN7UKS.js +0 -2
  408. package/dist/cdn/ZXNF77OB.js +0 -2
  409. package/dist/chunks/functional.js +0 -9
  410. package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
  411. /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
  412. /package/dist/cdn/{DAAON2UO.js → UOXUUCE7.js} +0 -0
@@ -0,0 +1,593 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import { c as A } from "../../chunks/runtime.js";
3
+ import { repeat as F } from "lit/directives/repeat.js";
4
+ import O from "@arcgis/core/portal/PortalItem.js";
5
+ import { LitElement as _, createEvent as E, safeClassMap as N } from "@arcgis/lumina";
6
+ import { css as W, html as g } from "lit";
7
+ import { createRef as H, ref as j } from "lit/directives/ref.js";
8
+ import { Task as J } from "@lit/task";
9
+ import { log as $ } from "@arcgis/toolkit/log";
10
+ import { u as k } from "../../chunks/useT9n.js";
11
+ import { i as V, a as z, b as w } from "../../chunks/item2.js";
12
+ import { g as Q } from "../../chunks/help.js";
13
+ import { d as X, a as Y, g as Z } from "../../chunks/portal.js";
14
+ import { g as L } from "../../chunks/portal-item-status-card.js";
15
+ import "../arcgis-portal-item-preview/customElement.js";
16
+ import "../arcgis-portal-preview-panel/customElement.js";
17
+ import { c as ee } from "../../chunks/previewSessionController.js";
18
+ import { r as y, f as te, c as re } from "../../chunks/request.js";
19
+ import { s as se } from "../../chunks/item.js";
20
+ import { i as b } from "../../chunks/functionalities.js";
21
+ import { d as ie } from "../../chunks/groups.js";
22
+ import { substitute as P } from "@arcgis/core/intl.js";
23
+ const ae = W`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-content-top-space: 0;--calcite-dialog-content-bottom-space: 0;--calcite-dialog-size-x: 1080px;--calcite-dialog-size-y: min(922px, 75vh)}.header{font:var(--calcite-font-weight-medium) var(--calcite-font-size-0) / 1.25rem var(--calcite-sans-family);color:var(--calcite-color-text-1);margin-block-end:.5rem}.status{font:var(--calcite-font-weight-normal) var(--calcite-font-size--1) / 1.125rem var(--calcite-sans-family);color:var(--calcite-color-text-2)}.status--error{color:var(--calcite-color-status-danger)}.content{display:grid;gap:.75rem;flex:1;min-block-size:0;position:relative}.scrim--overlay{z-index:1}.content>.status{padding:.75rem}.top-bar{color:var(--calcite-color-text-2);font:var(--calcite-font-weight-normal) var(--calcite-font-size--1) / 1.25rem var(--calcite-sans-family);margin-block-end:.25rem;padding-block-end:.75rem;border-block-end:1px solid var(--calcite-color-border-3)}.result-list,.result-sections{display:grid;gap:1rem}.results{display:grid;grid-template-columns:minmax(0,1fr);min-inline-size:0;min-block-size:0}.content--preview .results{grid-template-columns:300px minmax(0,1fr)}.review-content{box-sizing:border-box;min-inline-size:0;min-block-size:0;padding:.75rem}.content--preview .review-content{overflow:auto}.preview{min-inline-size:0;min-block-size:0}.preview arcgis-portal-preview-panel{--arcgis-portal-preview-panel-width: 100%;position:relative;display:block;block-size:100%}.preview arcgis-portal-item-preview{--calcite-panel-header-content-space: initial}@media(max-width:51rem){.content--preview .results{grid-template-columns:minmax(0,1fr);gap:.75rem;block-size:auto}.preview{inline-size:100%;block-size:min(34rem,50vh)}}.result-section{display:grid;gap:1rem;padding-block-start:.75rem}.result-section__title{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}`;
24
+ async function ne({
25
+ itemId: r,
26
+ portal: e,
27
+ relationship: t,
28
+ includeRecycleBin: s,
29
+ num: a,
30
+ nextkey: i
31
+ }) {
32
+ const { relationshipRules: l, direction: o } = t, d = `${e.restUrl}/content/items/${r}/relatedItems`, u = {
33
+ f: "json",
34
+ includeRecycleBin: s,
35
+ includeSystemManaged: "true",
36
+ excludedFlags: "legacy,exclude",
37
+ num: a,
38
+ direction: o,
39
+ ...l?.length ? { relationshipRules: l.join(",") } : {},
40
+ ...i != null ? { nextkey: i } : {}
41
+ };
42
+ try {
43
+ return {
44
+ result: await y({
45
+ url: d,
46
+ portal: e,
47
+ params: u
48
+ })
49
+ };
50
+ } catch (n) {
51
+ return console.error(n), { error: { code: "unhandledError" } };
52
+ }
53
+ }
54
+ async function oe(r) {
55
+ const e = [];
56
+ let t = 0, s;
57
+ do {
58
+ const a = await r(s);
59
+ if (a.error || !a.result)
60
+ return { error: { code: "unhandledError" } };
61
+ e.push(...a.result.relatedItems), t = a.result.aggregations?.total?.count ?? t, s = a.result.nextKey;
62
+ } while (s != null);
63
+ return {
64
+ result: {
65
+ relatedItems: e,
66
+ countOfAccessibleItem: e.length,
67
+ totalCountOfRelatedItems: t
68
+ }
69
+ };
70
+ }
71
+ async function le({
72
+ itemId: r,
73
+ portal: e,
74
+ relationship: t,
75
+ includeRecycleBin: s,
76
+ num: a
77
+ }) {
78
+ return await oe(
79
+ async (i) => await ne({
80
+ itemId: r,
81
+ portal: e,
82
+ relationship: t,
83
+ includeRecycleBin: s,
84
+ num: a,
85
+ ...i != null ? { nextkey: i } : {}
86
+ })
87
+ );
88
+ }
89
+ const T = {
90
+ needsGroupUpdate: !1,
91
+ needsShareLevelUpdate: !1,
92
+ canEditShareLevel: !0,
93
+ premium: !1
94
+ }, U = {
95
+ private: 0,
96
+ shared: 1,
97
+ org: 2,
98
+ public: 3
99
+ }, ce = [
100
+ "Location Tracking Service",
101
+ "Location Tracking View",
102
+ "IoTFeed",
103
+ "IoTFeatureLayer",
104
+ "IoTMapImageLayer",
105
+ "IoTStreamLayer",
106
+ "Administrative Report",
107
+ "EditExtensionIndoorsSpaces",
108
+ "ArcgisWorkflowJobLocation",
109
+ "Integration Info",
110
+ "Analysis Model Web Tool"
111
+ ], de = ["Data Store", "Knowledge Graph", "Pro Project", "Workflow"], ue = [
112
+ "Vector Tile Service",
113
+ "Map Service",
114
+ "Scene Service",
115
+ "Feature Service"
116
+ ];
117
+ function pe(r, e) {
118
+ const t = ce.some((o) => r.typeKeywords?.includes(o)), s = r.type === "Image Service" && r.url?.includes("://iservices") && r.url.includes("arcgis.com"), a = r.type === "Geoprocessing Service" && r.typeKeywords?.includes("Notebook Web Tool"), i = b(de, r.type), l = r.type === "Parquet Feature Layer" && e.isPortal;
119
+ return t || s || a || i || l;
120
+ }
121
+ function he(r) {
122
+ return r.typeKeywords?.includes("Hosted Service") && b(ue, r.type);
123
+ }
124
+ const me = ["Trial Developer", "Developer", "Developer Subscription"], ge = [
125
+ "needEditableLayers",
126
+ "needsShareLevelUpdateLayers"
127
+ ], fe = [
128
+ "needPubliclyEditableLayers",
129
+ "needDataCollectionLayers",
130
+ "premiumLayers",
131
+ "notEditableLayers",
132
+ "needAuthentication"
133
+ ];
134
+ async function ve({
135
+ sharingDetailResult: r,
136
+ mainAccess: e,
137
+ developerPortal: t,
138
+ portal: s
139
+ }) {
140
+ const { sourceItem: a, detail: i } = r, { canEditShareLevel: l, needsGroupUpdate: o, needsShareLevelUpdate: d, premium: u } = i;
141
+ return !o && !d && !u ? null : !l && !u ? "notEditableLayers" : e === "public" ? u ? "premiumLayers" : a.access !== "public" && t && he(a) ? "notEditableLayers" : a.access !== "public" && await V(a, s) ? a.typeKeywords.includes("Public Data Collection") ? "needEditableLayers" : "needDataCollectionLayers" : "needsShareLevelUpdateLayers" : u ? null : "needsShareLevelUpdateLayers";
142
+ }
143
+ function ye(r) {
144
+ return !!(r && b(me, r));
145
+ }
146
+ function R(r, e) {
147
+ if (!r)
148
+ return [];
149
+ const t = e === "updatable" ? ge : fe, s = /* @__PURE__ */ new Map();
150
+ return t.forEach((a) => {
151
+ r[a].forEach((i) => {
152
+ s.has(i.sourceItem.id) || s.set(i.sourceItem.id, {
153
+ itemResult: i,
154
+ state: a
155
+ });
156
+ });
157
+ }), Array.from(s.values());
158
+ }
159
+ function we({
160
+ mainAccess: r,
161
+ sourceItem: e,
162
+ sourceGroups: t,
163
+ mainGroupIds: s,
164
+ isMainItemSharedWithCollabGroups: a,
165
+ sourceHasSameOwningSystem: i,
166
+ portalIsPortal: l
167
+ }) {
168
+ const o = { ...T }, d = new Set((t ?? []).map((c) => c.id)), u = r === "public";
169
+ if (u && pe(e, { isPortal: l }))
170
+ return { ...o, needsShareLevelUpdate: !0, canEditShareLevel: !1 };
171
+ const n = e.access;
172
+ return n !== "public" ? (o.canEditShareLevel = be(e.itemControl), o.needsShareLevelUpdate = Se(r, n), o.needsGroupUpdate = (!u || a) && x(s, d), o) : (o.premium = Ee(e), o.needsGroupUpdate = Ie({
173
+ sourceItem: e,
174
+ isMainItemSharedToPublic: u,
175
+ isMainItemSharedWithCollabGroups: a,
176
+ mainGroupIds: s,
177
+ sourceGroupIds: d,
178
+ sourceHasSameOwningSystem: i
179
+ }), o);
180
+ }
181
+ function be(r) {
182
+ return r === "admin" || r === "update";
183
+ }
184
+ function Se(r, e) {
185
+ return !(e === "private" && r === "shared") && U[r] > U[e];
186
+ }
187
+ function Ie({
188
+ sourceItem: r,
189
+ isMainItemSharedToPublic: e,
190
+ isMainItemSharedWithCollabGroups: t,
191
+ mainGroupIds: s,
192
+ sourceGroupIds: a,
193
+ sourceHasSameOwningSystem: i
194
+ }) {
195
+ return !e || !t || r.owner === "esri_apps" || !i ? !1 : x(s, a);
196
+ }
197
+ function x(r, e) {
198
+ for (const t of r)
199
+ if (!e.has(t))
200
+ return !0;
201
+ return !1;
202
+ }
203
+ function Ee(r) {
204
+ const e = r.owner?.toLowerCase() ?? "", t = r.typeKeywords ?? [];
205
+ return e.includes("esri") && (t.includes("Requires Credits") || t.includes("Requires Subscription"));
206
+ }
207
+ async function $e(r) {
208
+ const e = await B(r);
209
+ return e.error || !e.result ? { error: e.error ?? { code: "unhandledError" } } : { result: e.result.buckets };
210
+ }
211
+ async function B({
212
+ portal: r,
213
+ mainItems: e
214
+ }) {
215
+ try {
216
+ const t = await ke(r, e);
217
+ if (t.error || !t.result)
218
+ return { error: t.error ?? { code: "unhandledError" } };
219
+ const s = await Le({ portal: r, mainItems: t.result });
220
+ return s.error || !s.result ? { error: s.error ?? { code: "unhandledError" } } : { result: { mainItems: t.result, buckets: s.result } };
221
+ } catch (t) {
222
+ return console.error(t), { error: { code: "unhandledError" } };
223
+ }
224
+ }
225
+ async function ke(r, e) {
226
+ const t = [];
227
+ for (const { id: i } of e) {
228
+ if (!i)
229
+ return console.error("Main items must have an ID to refresh sharing metadata."), { error: { code: "unhandledError" } };
230
+ t.push(i);
231
+ }
232
+ const s = await Promise.all(t.map(async (i) => await z(r, i))), a = [];
233
+ for (const i of s) {
234
+ if (i.error || !i.result)
235
+ return console.error("Unable to load current main item sharing metadata.", i.error), { error: i.error ?? { code: "unhandledError" } };
236
+ a.push(i.result);
237
+ }
238
+ return { result: a };
239
+ }
240
+ async function Le({
241
+ portal: r,
242
+ mainItems: e
243
+ }) {
244
+ if (!e.length)
245
+ return { error: { code: "unhandledError", message: "At least one main item is required." } };
246
+ const t = e.filter((n) => n.access !== "private");
247
+ if (!t.length)
248
+ return { result: C() };
249
+ const s = C(), a = X(r), i = ye(a.subscriptionInfo?.type);
250
+ for (const n of t) {
251
+ if (!se(n))
252
+ continue;
253
+ const c = {
254
+ mainItemId: n.id,
255
+ sourceItem: n,
256
+ detail: { ...T }
257
+ };
258
+ s.needAuthentication.push(c), s.allRelatedItems.push(c);
259
+ }
260
+ const l = /* @__PURE__ */ new Map();
261
+ for (const n of t) {
262
+ const { result: c, error: p } = await Pe(r, n.id);
263
+ if (p || !c)
264
+ return { error: p ?? { code: "unhandledError" } };
265
+ l.set(n.id, c);
266
+ }
267
+ const o = /* @__PURE__ */ new Map();
268
+ for (const n of t)
269
+ l.get(n.id)?.length && o.set(n.id, await w(r, n.id));
270
+ const u = t.some(
271
+ (n) => n.access === "public" && o.get(n.id)?.some((c) => c.capabilities?.includes("distributed")) && l.get(n.id)?.some((c) => c.access === "public" && c.owner !== "esri_apps" && c.url)
272
+ ) ? await D(r, r.restUrl) : void 0;
273
+ for (const n of t) {
274
+ const c = l.get(n.id) ?? [];
275
+ if (!c.length)
276
+ continue;
277
+ const p = o.get(n.id) ?? [], h = new Set(p.map((m) => m.id)), S = p.some(
278
+ (m) => m.capabilities?.includes("distributed")
279
+ ), q = await Promise.all(
280
+ c.map(async (m) => {
281
+ const f = await w(r, m.id);
282
+ let I = !1;
283
+ if (n.access === "public" && m.access === "public" && S && m.owner !== "esri_apps" && m.url && [...h].some((v) => !f.some((K) => K.id === v))) {
284
+ const v = await D(r, m.url);
285
+ I = !!(v && u && v === u);
286
+ }
287
+ const G = we({
288
+ mainAccess: n.access,
289
+ sourceItem: m,
290
+ sourceGroups: f,
291
+ mainGroupIds: h,
292
+ isMainItemSharedWithCollabGroups: S,
293
+ sourceHasSameOwningSystem: I,
294
+ portalIsPortal: r.isPortal
295
+ });
296
+ return { mainItemId: n.id, sourceItem: m, detail: G };
297
+ })
298
+ );
299
+ (await Promise.all(
300
+ q.map(async (m) => ({
301
+ itemResult: m,
302
+ bucket: await ve({
303
+ sharingDetailResult: m,
304
+ mainAccess: n.access,
305
+ developerPortal: i,
306
+ portal: r
307
+ })
308
+ }))
309
+ )).forEach(({ itemResult: m, bucket: f }) => {
310
+ s.allRelatedItems.push(m), f && s[f].push(m);
311
+ });
312
+ }
313
+ return { result: s };
314
+ }
315
+ async function D(r, e) {
316
+ const t = new URL(e), s = t.pathname.match(/^.*?\/rest(?:\/|$)/iu)?.[0];
317
+ t.pathname = `${(s ?? t.pathname).replace(/\/$/u, "")}/info`, t.search = "", t.hash = "";
318
+ const a = t.href;
319
+ try {
320
+ return (await te({
321
+ key: "portalInfo",
322
+ id: a,
323
+ requester: async () => await y({
324
+ url: a,
325
+ portal: r,
326
+ options: { addTokenManually: !1, disableIdentityLookup: !0 }
327
+ })
328
+ })).owningSystemUrl;
329
+ } catch (i) {
330
+ throw re("portalInfo", a), i;
331
+ }
332
+ }
333
+ async function Pe(r, e) {
334
+ const t = /* @__PURE__ */ new Map(), { error: s, result: a } = await le({
335
+ itemId: e,
336
+ portal: r,
337
+ relationship: { direction: "reverse" }
338
+ });
339
+ if (s || !a)
340
+ return { error: s ?? { code: "unhandledError" } };
341
+ for (const i of a.relatedItems)
342
+ i.id !== e && t.set(i.id, i);
343
+ return { result: Array.from(t.values()) };
344
+ }
345
+ const C = () => ({
346
+ allRelatedItems: [],
347
+ needEditableLayers: [],
348
+ needPubliclyEditableLayers: [],
349
+ needDataCollectionLayers: [],
350
+ needsShareLevelUpdateLayers: [],
351
+ premiumLayers: [],
352
+ notEditableLayers: [],
353
+ needAuthentication: []
354
+ });
355
+ async function Ue({
356
+ portal: r,
357
+ mainItems: e,
358
+ sourceItems: t,
359
+ shareLevel: s,
360
+ updateGroups: a
361
+ }) {
362
+ if (!t.length)
363
+ return { result: [] };
364
+ try {
365
+ const i = a ? await Re(
366
+ r,
367
+ e,
368
+ s === "public" || e.every(({ access: p }) => p === "public")
369
+ ) : [], l = {
370
+ confirmItemControl: !0,
371
+ ...i.length ? { groups: i.join(",") } : {},
372
+ ...s ? De(s) : {}
373
+ }, o = Y(r), d = r.user;
374
+ if (d && t.every(({ owner: p }) => p === d.username)) {
375
+ const { results: p } = await y({
376
+ url: `${o}content/users/${d.username}/shareItems`,
377
+ portal: r,
378
+ params: { ...l, items: t.map(({ id: h }) => h).join(",") },
379
+ method: "post"
380
+ });
381
+ return M(p, t);
382
+ }
383
+ const u = await Promise.allSettled(
384
+ t.map(async ({ id: p }) => {
385
+ const h = await y({
386
+ url: `${o}content/items/${p}/share`,
387
+ portal: r,
388
+ params: l,
389
+ method: "post"
390
+ });
391
+ return { ...h, success: !h.error && !h.notSharedWith?.length };
392
+ })
393
+ ), n = [];
394
+ let c = !1;
395
+ return u.forEach((p) => {
396
+ p.status === "fulfilled" ? n.push(p.value) : (c = !0, console.error("Unable to update related item sharing", p.reason));
397
+ }), c ? { result: n, error: { code: "unhandledError" } } : M(n, t);
398
+ } catch (i) {
399
+ return console.error("Unable to update related item sharing", i), { error: { code: "unhandledError" } };
400
+ }
401
+ }
402
+ async function Re(r, e, t) {
403
+ if (!e.length)
404
+ throw new Error("Main items are required to update group sharing.");
405
+ const s = await Promise.all(e.map(async ({ id: l }) => await w(r, l))), a = s.slice(1).map((l) => new Set(l.map(({ id: o }) => o))), i = /* @__PURE__ */ new Set();
406
+ return s[0].filter((l) => {
407
+ const { id: o } = l;
408
+ return i.has(o) || !a.every((d) => d.has(o)) || t && !ie(l) ? !1 : (i.add(o), !0);
409
+ }).map(({ id: l }) => l);
410
+ }
411
+ function De(r) {
412
+ return {
413
+ org: r === "org",
414
+ everyone: r === "public"
415
+ };
416
+ }
417
+ function M(r, e) {
418
+ const t = r.filter(
419
+ ({ success: a, error: i, notSharedWith: l }) => !a || i || l?.length
420
+ ), s = new Set(r.map(({ itemId: a }) => a));
421
+ return r.length !== e.length || s.size !== e.length || e.some(({ id: a }) => !s.has(a)) || t.length ? (console.error("Some related items were not successfully shared.", r), { result: r, error: { code: "unhandledError" } }) : { result: r };
422
+ }
423
+ class Ce extends _ {
424
+ constructor() {
425
+ super(...arguments), this.messages = k({ blocking: !0 }), this.analysisRequestId = 0, this.statusMessages = k({ name: "portal-item-status-card", blocking: !0 }), this.previewElement = H(), this.displayItemsById = /* @__PURE__ */ new Map(), this.previewSession = ee({
426
+ onOpen: ({ preview: e }) => {
427
+ const { updatable: t, nonUpdatable: s } = this.displayItems;
428
+ this.previewItem = [...t, ...s].find(({ itemResult: a }) => a.sourceItem.id === e.id);
429
+ },
430
+ onClose: () => {
431
+ this.previewItem = void 0;
432
+ }
433
+ }), this.previewTask = new J(this, {
434
+ args: () => [this.previewItem, this.portal],
435
+ task: async ([e, t]) => {
436
+ if (!e)
437
+ return;
438
+ const s = await z(t, e.itemResult.sourceItem.id);
439
+ if (s.error || !s.result)
440
+ return $("error", this, "Unable to load review item preview.", { detail: { error: s.error } }), { error: !0 };
441
+ const a = L(e.state), i = a?.i18nKey === "pdc" ? "120004130" : a?.i18nKey === "premium" ? "120001307" : void 0, l = i ? await Q(t, this.messages._lang) : void 0, o = i ? l?.[i] : void 0, d = this.createDisplayItem(s.result, t);
442
+ return await d.load(), {
443
+ item: d,
444
+ helpUrl: o ? `${Z(t)}${o}` : void 0
445
+ };
446
+ },
447
+ onComplete: () => {
448
+ this.focusPreview();
449
+ },
450
+ onError: (e) => {
451
+ $("error", this, "Unable to load review item preview.", { detail: { error: e } });
452
+ }
453
+ }), this.loading = !1, this.updatingSharing = !1, this.open = !1, this.arcgisClose = E(), this.arcgisComplete = E();
454
+ }
455
+ static {
456
+ this.properties = { loading: 16, buckets: 16, errorMessage: 16, updatingSharing: 16, updateError: 16, previewItem: 16, portal: 0, items: 0, open: 5 };
457
+ }
458
+ static {
459
+ this.styles = ae;
460
+ }
461
+ willUpdate(e) {
462
+ if (e.has("open") || e.has("items") || e.has("portal")) {
463
+ this.updateError = void 0, this.previewItem = void 0, this.displayItemsById.clear();
464
+ const t = ++this.analysisRequestId;
465
+ this.open && this.analyzeLayerSharing(t);
466
+ }
467
+ }
468
+ async analyzeLayerSharing(e) {
469
+ this.loading = !0, this.buckets = void 0, this.errorMessage = void 0;
470
+ const t = await $e({
471
+ portal: this.portal,
472
+ mainItems: this.items
473
+ });
474
+ if (!(e !== this.analysisRequestId || !this.open)) {
475
+ if (this.loading = !1, t.error || !t.result) {
476
+ this.errorMessage = this.messages.analysisError;
477
+ return;
478
+ }
479
+ this.buckets = t.result;
480
+ }
481
+ }
482
+ closeDialog() {
483
+ !this.open || this.updatingSharing || (this.open = !1, this.arcgisClose.emit());
484
+ }
485
+ get displayItems() {
486
+ return {
487
+ nonUpdatable: R(this.buckets, "nonUpdatable"),
488
+ updatable: R(this.buckets, "updatable")
489
+ };
490
+ }
491
+ getDisplayItem(e) {
492
+ let t = this.displayItemsById.get(e.id);
493
+ return t || (t = this.createDisplayItem(e), this.displayItemsById.set(e.id, t)), t;
494
+ }
495
+ createDisplayItem(e, t = this.portal) {
496
+ return new O({
497
+ id: e.id,
498
+ title: e.title,
499
+ owner: e.owner,
500
+ access: e.access,
501
+ type: e.type,
502
+ typeKeywords: e.typeKeywords,
503
+ snippet: e.snippet,
504
+ url: e.url,
505
+ modified: new Date(e.modified),
506
+ sourceJSON: e,
507
+ portal: t
508
+ });
509
+ }
510
+ async updateSharing() {
511
+ if (this.updatingSharing || !this.buckets || !this.displayItems.updatable.length)
512
+ return;
513
+ const e = this.buckets, t = this.analysisRequestId, s = this.portal;
514
+ this.updatingSharing = !0, this.updateError = void 0;
515
+ const a = await B({ portal: s, mainItems: this.items });
516
+ if (t !== this.analysisRequestId || !this.open) {
517
+ this.updatingSharing = !1;
518
+ return;
519
+ }
520
+ if (a.error || !a.result) {
521
+ this.updatingSharing = !1, this.updateError = this.messages.updateError;
522
+ return;
523
+ }
524
+ const { mainItems: i, buckets: l } = a.result;
525
+ this.buckets = l, this.previewItem = void 0, this.displayItemsById.clear();
526
+ const o = [...l.needEditableLayers, ...l.needsShareLevelUpdateLayers];
527
+ if (!o.length) {
528
+ this.updatingSharing = !1;
529
+ return;
530
+ }
531
+ const d = Array.from(new Map(o.map(({ sourceItem: h }) => [h.id, h])).values()), u = o.some(({ detail: h }) => h.needsShareLevelUpdate), n = o.some(({ detail: h }) => h.needsGroupUpdate), c = i[0]?.access;
532
+ if (u && (!c || i.some((h) => h.access !== c))) {
533
+ this.updatingSharing = !1, this.updateError = this.messages.updateError;
534
+ return;
535
+ }
536
+ const p = await Ue({
537
+ portal: s,
538
+ mainItems: i,
539
+ sourceItems: d,
540
+ shareLevel: u ? c : void 0,
541
+ updateGroups: n
542
+ });
543
+ if (this.updatingSharing = !1, !(t !== this.analysisRequestId || !this.open)) {
544
+ if (p.error) {
545
+ this.updateError = this.messages.updateError;
546
+ const h = ++this.analysisRequestId;
547
+ this.analyzeLayerSharing(h);
548
+ return;
549
+ }
550
+ this.open = !1, this.arcgisComplete.emit({ updatedSourceItems: d, oldSharingDetail: e });
551
+ }
552
+ }
553
+ async focusPreview() {
554
+ await this.updateComplete, await this.previewElement.value?.setFocus();
555
+ }
556
+ async closePreview() {
557
+ this.previewItem = void 0, await this.updateComplete, await this.previewSession.closePreview({ restoreFocus: !0 });
558
+ }
559
+ renderResultSection(e, t) {
560
+ return t.length ? g`<section class="result-section"><div class="result-section__title">${e}</div><div class="result-list">${F(t, ({ itemResult: s, state: a }) => `${a}-${s.mainItemId}-${s.sourceItem.id}`, ({ itemResult: s, state: a }) => g`<arcgis-portal-item-status-card .item=${this.getDisplayItem(s.sourceItem)} .portal=${this.portal} .previewed=${this.previewItem?.itemResult.sourceItem.id === s.sourceItem.id} @arcgisItemBrowserCardPreview=${(i) => {
561
+ i.stopPropagation(), !i.detail || this.previewItem?.itemResult.sourceItem.id === i.detail.id ? this.closePreview() : this.previewSession.handlePreview(i.detail, i.composedPath()[0]);
562
+ }} .state=${a}></arcgis-portal-item-status-card>`)}</div></section>` : null;
563
+ }
564
+ renderPreview() {
565
+ if (!this.previewItem)
566
+ return null;
567
+ const e = L(this.previewItem.state);
568
+ return g`<aside class="preview"><arcgis-portal-preview-panel open @arcgisOpen=${() => {
569
+ this.focusPreview();
570
+ }} @arcgisClose=${(t) => {
571
+ t.stopPropagation(), this.closePreview();
572
+ }}>${this.previewTask.render({
573
+ error: () => this.renderPreviewError(),
574
+ complete: (t) => t && "item" in t ? g`<arcgis-portal-item-preview .item=${t.item} .portal=${this.portal} @arcgisClose=${(s) => {
575
+ s.stopPropagation(), this.closePreview();
576
+ }} ${j(this.previewElement)}>${e && g`<calcite-notice slot=summary-top open .kind=${e.kind}><div slot=message>${this.statusMessages.status[e.i18nKey].panel}</div>${t.helpUrl && (e.i18nKey === "pdc" || e.i18nKey === "premium") && g`<calcite-link slot=link .href=${t.helpUrl} target=_blank rel=noopener icon-end=launch>${this.statusMessages.status[e.i18nKey].learnMore}</calcite-link>` || ""}</calcite-notice>` || ""}</arcgis-portal-item-preview>` : this.renderPreviewError()
577
+ })}</arcgis-portal-preview-panel></aside>`;
578
+ }
579
+ renderPreviewError() {
580
+ return g`<div class="status status--error" role=alert>${this.messages.previewError}</div>`;
581
+ }
582
+ render() {
583
+ const { messages: e, displayItems: t, errorMessage: s, buckets: a, loading: i, open: l, portal: o, updatingSharing: d, updateError: u } = this;
584
+ if (!e._lang)
585
+ return;
586
+ const { nonUpdatable: n, updatable: c } = t, p = c.length > 0 || n.length > 0;
587
+ return g`<calcite-dialog .heading=${e.heading} modal .open=${l} outside-close-disabled escape-disabled overlay-positioning=fixed placement=center scale=l @calciteDialogClose=${this.closeDialog}><div class=${N({ content: !0, "content--preview": !!this.previewItem })}>${d && g`<calcite-scrim class="scrim--overlay" role=status><calcite-loader .label=${e.updatingSharing}></calcite-loader></calcite-scrim>` || ""}${i && g`<div class="status">${e.loadingSourceItems}</div>` || ""}${s && g`<div class="status status--error">${s}</div>` || ""}${u && g`<div class="status status--error" role=alert>${u}</div>` || ""}${!i && !s && a ? g`<div class="results">${this.renderPreview()}<div class="review-content"><div class="top-bar" .innerHTML=${e[o.isPortal ? "noticeEnterprise" : "notice"] ?? ""}></div>${p ? g`<div class="result-sections">${this.renderResultSection(P(e.updatableSectionTitle, { count: c.length }), c)}${this.renderResultSection(P(e.nonUpdatableSectionTitle, { count: n.length }), n)}</div>` : g`<div class="status">${e.noIssues}</div>`}</div></div>` : null}</div><calcite-button slot=footer-end appearance=outline .disabled=${d} @click=${this.closeDialog}>${e.close}</calcite-button>${c.length > 0 && g`<calcite-button slot=footer-end .disabled=${d} @click=${this.updateSharing}>${e.updateSharing}</calcite-button>` || ""}</calcite-dialog>`;
588
+ }
589
+ }
590
+ A("arcgis-portal-review-layer-sharing", Ce);
591
+ export {
592
+ Ce as ArcgisPortalReviewLayerSharing
593
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,10 @@
1
+ import "../arcgis-portal-item-status-card/index.js";
2
+ import "../arcgis-portal-preview-panel/index.js";
3
+ import "../arcgis-portal-item-preview/index.js";
4
+ import "@esri/calcite-components/components/calcite-notice";
5
+ import "@esri/calcite-components/components/calcite-link";
6
+ import "@esri/calcite-components/components/calcite-dialog";
7
+ import "@esri/calcite-components/components/calcite-scrim";
8
+ import "@esri/calcite-components/components/calcite-loader";
9
+ import "@esri/calcite-components/components/calcite-button";
10
+ export * from "./customElement.js";
@@ -0,0 +1,27 @@
1
+ import type { ItemSourceJSON } from "../../types/item.js";
2
+
3
+ export type ReviewLayerSharingBuckets = {
4
+ allRelatedItems: ReviewLayerSharingItemResult[];
5
+ needEditableLayers: ReviewLayerSharingItemResult[];
6
+ needPubliclyEditableLayers: ReviewLayerSharingItemResult[];
7
+ needDataCollectionLayers: ReviewLayerSharingItemResult[];
8
+ needsShareLevelUpdateLayers: ReviewLayerSharingItemResult[];
9
+ premiumLayers: ReviewLayerSharingItemResult[];
10
+ notEditableLayers: ReviewLayerSharingItemResult[];
11
+ needAuthentication: ReviewLayerSharingItemResult[];
12
+ };
13
+
14
+ export type ReviewLayerSharingIssueState = Exclude<keyof ReviewLayerSharingBuckets, "allRelatedItems">;
15
+
16
+ export type ReviewLayerSharingItemResult = {
17
+ mainItemId: string;
18
+ sourceItem: ItemSourceJSON;
19
+ detail: ReviewLayerSharingDetail;
20
+ };
21
+
22
+ export interface ReviewLayerSharingDetail {
23
+ needsGroupUpdate: boolean;
24
+ needsShareLevelUpdate: boolean;
25
+ canEditShareLevel: boolean;
26
+ premium: boolean;
27
+ }