@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.
Files changed (409) hide show
  1. package/dist/cdn/2574FNAZ.js +2 -0
  2. package/dist/cdn/3DOZPC3W.js +2 -0
  3. package/dist/cdn/3HZI6MKD.js +2 -0
  4. package/dist/cdn/3KGSWW6B.js +2 -0
  5. package/dist/cdn/3OL7A2UC.js +2 -0
  6. package/dist/cdn/3Q7UJKKN.js +2 -0
  7. package/dist/cdn/43A74S72.js +2 -0
  8. package/dist/cdn/46HNNQAD.js +2 -0
  9. package/dist/cdn/46MYBPSS.js +2 -0
  10. package/dist/cdn/{2TDHJSMP.js → 47DKAGRV.js} +1 -1
  11. package/dist/cdn/4CBRO7JP.js +2 -0
  12. package/dist/cdn/4QYVBXZT.js +2 -0
  13. package/dist/cdn/{K75JTQPW.js → 4VLEUN7I.js} +1 -1
  14. package/dist/cdn/5M25PCH2.js +2 -0
  15. package/dist/cdn/5MLBK66O.js +2 -0
  16. package/dist/cdn/5RBH3LGK.js +2 -0
  17. package/dist/cdn/5ZHNRQOW.js +2 -0
  18. package/dist/cdn/62TL6V4N.js +2 -0
  19. package/dist/cdn/66VV7NHO.js +2 -0
  20. package/dist/cdn/6AHPTR2E.js +2 -0
  21. package/dist/cdn/6APPSZ7E.js +2 -0
  22. package/dist/cdn/{BKD7JSV2.js → 6CUXEL27.js} +1 -1
  23. package/dist/cdn/6QI7DAS2.js +2 -0
  24. package/dist/cdn/6ZJNZZPC.js +2 -0
  25. package/dist/cdn/75CT6IMW.js +2 -0
  26. package/dist/cdn/7J22VLBO.js +2 -0
  27. package/dist/cdn/7VPB6Q55.js +63 -0
  28. package/dist/cdn/7ZU43BL6.js +2 -0
  29. package/dist/cdn/A5QLPZ57.js +2 -0
  30. package/dist/cdn/AZTAWZI5.js +2 -0
  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/C7SNE6YG.js +2 -0
  38. package/dist/cdn/DENQY4OE.js +2 -0
  39. package/dist/cdn/DT4HGMLS.js +2 -0
  40. package/dist/cdn/{2YZWRFCI.js → DTGPLVZF.js} +1 -1
  41. package/dist/cdn/DU2R3VC4.js +2 -0
  42. package/dist/cdn/E5HCHRAI.js +2 -0
  43. package/dist/cdn/EBL7YSRM.js +2 -0
  44. package/dist/cdn/EDGE3T36.js +2 -0
  45. package/dist/cdn/{YZTBAUIO.js → EFMYI4L2.js} +1 -1
  46. package/dist/cdn/FFL2L4X5.js +2 -0
  47. package/dist/cdn/{ZKZDKJ6D.js → FIAEPK5L.js} +1 -1
  48. package/dist/cdn/FN2QMDEW.js +2 -0
  49. package/dist/cdn/FTKSVLDI.js +2 -0
  50. package/dist/cdn/G272JPUS.js +2 -0
  51. package/dist/cdn/GFUKRB6D.js +2 -0
  52. package/dist/cdn/{SGDDFWCJ.js → GG6U75ZA.js} +1 -1
  53. package/dist/cdn/{FRE56NBG.js → GZ4ONSFV.js} +1 -1
  54. package/dist/cdn/HOIZXTOD.js +2 -0
  55. package/dist/cdn/{VDXESPJK.js → I4TKQB4A.js} +1 -1
  56. package/dist/cdn/{TWCJJCPC.js → IAMPUXPT.js} +1 -1
  57. package/dist/cdn/IAWL475A.js +2 -0
  58. package/dist/cdn/IGLODZPX.js +2 -0
  59. package/dist/cdn/IOF72CDU.js +2 -0
  60. package/dist/cdn/ITRJGXFV.js +93 -0
  61. package/dist/cdn/ITWLFQI4.js +2 -0
  62. package/dist/cdn/{7ZWYUHGK.js → IYICIRGI.js} +1 -1
  63. package/dist/cdn/JFGXTJY4.js +2 -0
  64. package/dist/cdn/JIU6MBGB.js +2 -0
  65. package/dist/cdn/JLT5GCLY.js +2 -0
  66. package/dist/cdn/JTA223NH.js +2 -0
  67. package/dist/cdn/KA2MXQTR.js +2 -0
  68. package/dist/cdn/KAK6CNI7.js +2 -0
  69. package/dist/cdn/KPZGBBDG.js +2 -0
  70. package/dist/cdn/{CFRJU6VA.js → KRO5XRZ7.js} +1 -1
  71. package/dist/cdn/KRORL7QC.js +2 -0
  72. package/dist/cdn/KWL2D56D.js +3 -0
  73. package/dist/cdn/{QTAYXO5T.js → KXVXQYIB.js} +1 -1
  74. package/dist/cdn/L3YOPSRB.js +135 -0
  75. package/dist/cdn/LEESUFWE.js +2 -0
  76. package/dist/cdn/{IN4JPZTY.js → LGKI24ZT.js} +1 -1
  77. package/dist/cdn/LTD5KLLE.js +2 -0
  78. package/dist/cdn/{GAF4YT5N.js → LUJGCYQY.js} +1 -1
  79. package/dist/cdn/{Z6R3C4AK.js → MB32XRI5.js} +1 -1
  80. package/dist/cdn/MSL36HAR.js +2 -0
  81. package/dist/cdn/MSSJRDR7.js +2 -0
  82. package/dist/cdn/N3WRMPM6.js +2 -0
  83. package/dist/cdn/N47MW5HI.js +9 -0
  84. package/dist/cdn/N7XYFVOI.js +2 -0
  85. package/dist/cdn/NHVPNSNH.js +2 -0
  86. package/dist/cdn/{5HZNBMW6.js → NU4K2AV3.js} +1 -1
  87. package/dist/cdn/O2GPTWGF.js +3 -0
  88. package/dist/cdn/{TRMFL7PT.js → ONRTCGLU.js} +1 -1
  89. package/dist/cdn/OPI4P6VO.js +2 -0
  90. package/dist/cdn/{RHCRPJWS.js → OPMM7QH5.js} +1 -1
  91. package/dist/cdn/OQ2JULON.js +2 -0
  92. package/dist/cdn/OXF2WDSW.js +2 -0
  93. package/dist/cdn/P3FFM322.js +2 -0
  94. package/dist/cdn/QAXFE5DD.js +2 -0
  95. package/dist/cdn/{JPUUMGX5.js → QKRLO5CJ.js} +1 -1
  96. package/dist/cdn/R26RBXQW.js +2 -0
  97. package/dist/cdn/R6KJVAX3.js +99 -0
  98. package/dist/cdn/RA2NMLMP.js +2 -0
  99. package/dist/cdn/RJXIU4GH.js +2 -0
  100. package/dist/cdn/RKHNP3KL.js +2 -0
  101. package/dist/cdn/RR56BOTV.js +2 -0
  102. package/dist/cdn/RT26JZP5.js +2 -0
  103. package/dist/cdn/RTZ2TKM5.js +2 -0
  104. package/dist/cdn/RX64JXHI.js +170 -0
  105. package/dist/cdn/RXMM6CFK.js +2 -0
  106. package/dist/cdn/S4N5QMSN.js +2 -0
  107. package/dist/cdn/SCLYGIHM.js +2 -0
  108. package/dist/cdn/{JIJO4CAS.js → SLK7PV62.js} +1 -1
  109. package/dist/cdn/SRWFOV5W.js +2 -0
  110. package/dist/cdn/SUN4MBT3.js +2 -0
  111. package/dist/cdn/SYXCSFIA.js +2 -0
  112. package/dist/cdn/{3NSHGKZA.js → TBSNDRRE.js} +1 -1
  113. package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
  114. package/dist/cdn/TP7V25GT.js +2 -0
  115. package/dist/cdn/{TXC7YBGL.js → UBMZBXT7.js} +1 -1
  116. package/dist/cdn/UIK6LPA7.js +2 -0
  117. package/dist/cdn/ULGME5RT.js +2 -0
  118. package/dist/cdn/{URQML7KV.js → VQRMXBPQ.js} +1 -1
  119. package/dist/cdn/VWOBCSD6.js +4 -0
  120. package/dist/cdn/{JE2376SE.js → W3JJBZYX.js} +1 -1
  121. package/dist/cdn/W6WVMRGQ.js +2 -0
  122. package/dist/cdn/{MKSFNVXL.js → WNXDXB3M.js} +1 -1
  123. package/dist/cdn/{JN23JH3T.js → WOSWA2VI.js} +1 -1
  124. package/dist/cdn/WTKLB3R6.js +2 -0
  125. package/dist/cdn/X7W4VJO7.js +2 -0
  126. package/dist/cdn/XCOP6QHA.js +2 -0
  127. package/dist/cdn/XE3DCC5D.js +2 -0
  128. package/dist/cdn/XVV75AX3.js +2 -0
  129. package/dist/cdn/XYHIVGUK.js +2 -0
  130. package/dist/cdn/{M5PPX4ZX.js → Y4JOEFBJ.js} +1 -1
  131. package/dist/cdn/Y7ZCEONL.js +73 -0
  132. package/dist/cdn/YELHAJB3.js +2 -0
  133. package/dist/cdn/YH2OFXPU.js +2 -0
  134. package/dist/cdn/YYVLFAFT.js +2 -0
  135. package/dist/cdn/{74T6IXSN.js → ZDH4KVAV.js} +1 -1
  136. package/dist/cdn/{I6IRHXWR.js → ZECUXVTO.js} +1 -1
  137. package/dist/cdn/ZG7OW456.js +2 -0
  138. package/dist/cdn/{NWVLGU2C.js → ZLNBCJE4.js} +1 -1
  139. package/dist/cdn/{K2XSYDAP.js → ZNNEU5QW.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-sublayer-select/t9n/messages.en.json +1 -0
  143. package/dist/cdn/assets/portal-item-preview/t9n/messages.en.json +1 -0
  144. package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
  145. package/dist/cdn/assets/portal-item-status-card/t9n/messages.en.json +1 -0
  146. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  147. package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
  148. package/dist/cdn/assets/portal-review-layer-sharing/t9n/messages.en.json +1 -0
  149. package/dist/cdn/index.js +1 -1
  150. package/dist/cdn/main.css +1 -1
  151. package/dist/chunks/FieldIcons.js +24 -0
  152. package/dist/chunks/constants.js +7 -0
  153. package/dist/chunks/contextUsage.js +208 -0
  154. package/dist/chunks/createPortalTool.js +18 -0
  155. package/dist/chunks/fieldAddDelete.js +6 -6
  156. package/dist/chunks/functionalities.js +14 -9
  157. package/dist/chunks/groups.js +8 -61
  158. package/dist/chunks/groups2.js +23 -8
  159. package/dist/chunks/help.js +22 -0
  160. package/dist/chunks/info.js +2 -2
  161. package/dist/chunks/item.js +135 -33
  162. package/dist/chunks/item2.js +96 -122
  163. package/dist/chunks/itemThumbnail.js +21 -21
  164. package/dist/chunks/items.js +11 -11
  165. package/dist/chunks/layers.js +196 -0
  166. package/dist/chunks/loadClassificationData.js +26 -27
  167. package/dist/chunks/portal-browser.js +49 -46
  168. package/dist/chunks/portal-delete-items-review.js +1 -1
  169. package/dist/chunks/portal-item-badge.js +1 -1
  170. package/dist/chunks/portal-item-preview-sublayer.js +214 -0
  171. package/dist/chunks/portal-item-status-card.js +81 -0
  172. package/dist/chunks/portal-related-items-list-item.js +1 -1
  173. package/dist/chunks/portal.js +5 -5
  174. package/dist/chunks/portal2.js +22 -22
  175. package/dist/chunks/portalEntitySelection.js +61 -0
  176. package/dist/chunks/previewSessionController.js +33 -0
  177. package/dist/chunks/query.js +13 -13
  178. package/dist/chunks/request.js +49 -41
  179. package/dist/chunks/requests.js +7 -7
  180. package/dist/chunks/selectedMentions.js +25 -0
  181. package/dist/chunks/services.js +5 -5
  182. package/dist/chunks/string.js +19 -11
  183. package/dist/chunks/ui.js +1 -0
  184. package/dist/chunks/url.js +2 -2
  185. package/dist/chunks/user.js +67 -53
  186. package/dist/chunks/user2.js +10 -10
  187. package/dist/chunks/utils.js +35 -22
  188. package/dist/chunks/utils3.js +88 -657
  189. package/dist/chunks/utils4.js +663 -0
  190. package/dist/components/arcgis-portal-account-switcher/customElement.js +57 -54
  191. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +27 -0
  192. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +185 -137
  193. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +38 -15
  194. package/dist/components/arcgis-portal-ai-assistant/customElement.js +816 -2642
  195. package/dist/components/arcgis-portal-ai-assistant/index.js +5 -0
  196. package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
  197. package/dist/components/arcgis-portal-ai-assistant/tools/groups.d.ts +28 -0
  198. package/dist/components/arcgis-portal-ai-assistant/tools/users.d.ts +28 -0
  199. package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +41 -3
  200. package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +19 -0
  201. package/dist/components/arcgis-portal-ai-assistant-diagnostics/contextUsage.d.ts +46 -0
  202. package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.d.ts +26 -0
  203. package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.js +46 -0
  204. package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.d.ts +1 -0
  205. package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.js +10 -0
  206. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +42 -1
  207. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +49 -37
  208. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -4
  209. package/dist/components/arcgis-portal-browser/customElement.d.ts +3 -0
  210. package/dist/components/arcgis-portal-browser/customElement.js +3 -2
  211. package/dist/components/arcgis-portal-browser/index.js +1 -0
  212. package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
  213. package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
  214. package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
  215. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  216. package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
  217. package/dist/components/arcgis-portal-delete-items/customElement.js +437 -333
  218. package/dist/components/arcgis-portal-delete-items/index.js +1 -2
  219. package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
  220. package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +51 -5
  221. package/dist/components/arcgis-portal-entity-picker/customElement.js +204 -119
  222. package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
  223. package/dist/components/arcgis-portal-field-delete/customElement.js +87 -101
  224. package/dist/components/arcgis-portal-field-delete/index.js +1 -1
  225. package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
  226. package/dist/components/arcgis-portal-group-browser/customElement.js +68 -100
  227. package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
  228. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +49 -40
  229. package/dist/components/arcgis-portal-group-browser-preview/index.js +1 -0
  230. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -4
  231. package/dist/components/arcgis-portal-group-card/customElement.js +16 -16
  232. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
  233. package/dist/components/arcgis-portal-item-badges/customElement.js +4 -4
  234. package/dist/components/arcgis-portal-item-card/customElement.d.ts +26 -10
  235. package/dist/components/arcgis-portal-item-card/customElement.js +90 -80
  236. package/dist/components/arcgis-portal-item-card/index.js +2 -1
  237. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
  238. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +181 -0
  239. package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
  240. package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
  241. package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
  242. package/dist/components/arcgis-portal-item-favorite/customElement.js +42 -29
  243. package/dist/components/arcgis-portal-item-preview/customElement.d.ts +263 -0
  244. package/dist/components/arcgis-portal-item-preview/customElement.js +137 -0
  245. package/dist/components/arcgis-portal-item-preview/index.d.ts +1 -0
  246. package/dist/components/arcgis-portal-item-preview/index.js +20 -0
  247. package/dist/components/arcgis-portal-item-preview/types.d.ts +14 -0
  248. package/dist/components/arcgis-portal-item-preview-copy/customElement.d.ts +215 -0
  249. package/dist/components/arcgis-portal-item-preview-copy/customElement.js +46 -0
  250. package/dist/components/arcgis-portal-item-preview-copy/index.d.ts +1 -0
  251. package/dist/components/arcgis-portal-item-preview-copy/index.js +5 -0
  252. package/dist/components/arcgis-portal-item-preview-field/customElement.d.ts +216 -0
  253. package/dist/components/arcgis-portal-item-preview-field/customElement.js +34 -0
  254. package/dist/components/arcgis-portal-item-preview-field/index.d.ts +1 -0
  255. package/dist/components/arcgis-portal-item-preview-field/index.js +6 -0
  256. package/dist/components/arcgis-portal-item-preview-sublayer/customElement.d.ts +216 -0
  257. package/dist/components/arcgis-portal-item-preview-sublayer/customElement.js +15 -0
  258. package/dist/components/arcgis-portal-item-preview-sublayer/index.d.ts +1 -0
  259. package/dist/components/arcgis-portal-item-preview-sublayer/index.js +11 -0
  260. package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
  261. package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
  262. package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
  263. package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
  264. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
  265. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
  266. package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
  267. package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
  268. package/dist/components/arcgis-portal-item-status-card/customElement.d.ts +82 -0
  269. package/dist/components/arcgis-portal-item-status-card/customElement.js +12 -0
  270. package/dist/components/arcgis-portal-item-status-card/index.d.ts +1 -0
  271. package/dist/components/arcgis-portal-item-status-card/index.js +4 -0
  272. package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
  273. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
  274. package/dist/components/arcgis-portal-item-type/customElement.d.ts +16 -14
  275. package/dist/components/arcgis-portal-item-type/customElement.js +25 -28
  276. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
  277. package/dist/components/arcgis-portal-navigation/customElement.d.ts +6 -4
  278. package/dist/components/arcgis-portal-navigation/customElement.js +371 -374
  279. package/dist/components/arcgis-portal-navigation/index.js +1 -2
  280. package/dist/components/arcgis-portal-preview-panel/customElement.d.ts +40 -0
  281. package/dist/components/arcgis-portal-preview-panel/customElement.js +40 -0
  282. package/dist/components/arcgis-portal-preview-panel/index.d.ts +1 -0
  283. package/dist/components/arcgis-portal-preview-panel/index.js +1 -0
  284. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
  285. package/dist/components/arcgis-portal-review-layer-sharing/customElement.d.ts +139 -0
  286. package/dist/components/arcgis-portal-review-layer-sharing/customElement.js +593 -0
  287. package/dist/components/arcgis-portal-review-layer-sharing/index.d.ts +1 -0
  288. package/dist/components/arcgis-portal-review-layer-sharing/index.js +10 -0
  289. package/dist/components/arcgis-portal-review-layer-sharing/types.d.ts +27 -0
  290. package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
  291. package/dist/components/arcgis-portal-review-related-items/customElement.js +46 -18
  292. package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
  293. package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
  294. package/dist/components/arcgis-portal-user-avatar/customElement.d.ts +2 -3
  295. package/dist/components/arcgis-portal-user-avatar/customElement.js +15 -16
  296. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +4 -7
  297. package/dist/components/arcgis-portal-user-popup/customElement.js +128 -111
  298. package/dist/components/portal-group-browser-filters/customElement.js +15 -15
  299. package/dist/components/portal-related-items-list-item/customElement.js +16 -14
  300. package/dist/components/portal-related-items-list-item/index.js +1 -1
  301. package/dist/docs/api.json +1 -1
  302. package/dist/docs/docs.json +1 -1
  303. package/dist/docs/vscode.css-custom-data.json +1 -1
  304. package/dist/docs/vscode.html-custom-data.json +1 -1
  305. package/dist/docs/web-types.json +1 -1
  306. package/dist/index.d.ts +87 -0
  307. package/dist/index.js +305 -6
  308. package/dist/loader.js +22 -11
  309. package/dist/services/group.d.ts +17 -0
  310. package/dist/services/groups.d.ts +9 -0
  311. package/dist/services/item.d.ts +9 -0
  312. package/dist/types/item.d.ts +19 -11
  313. package/dist/types/layer.d.ts +27 -0
  314. package/dist/types/lumina.d.ts +82 -12
  315. package/dist/types/portalAssistantCurrentContext.d.ts +9 -0
  316. package/dist/types/portalEntityPicker.d.ts +3 -0
  317. package/dist/types/preact.d.ts +93 -12
  318. package/dist/types/react.d.ts +104 -12
  319. package/dist/types/services.d.ts +28 -1
  320. package/dist/types/stencil.d.ts +82 -12
  321. package/dist/types/user.d.ts +14 -10
  322. package/dist/utils/generateEmbeddings.d.ts +7 -0
  323. package/dist/utils/semanticSearch.d.ts +60 -0
  324. package/dist/utils/types.d.ts +10 -0
  325. package/package.json +14 -13
  326. package/dist/cdn/23NXHNPU.js +0 -2
  327. package/dist/cdn/24QSQLRY.js +0 -2
  328. package/dist/cdn/2CN754CY.js +0 -2
  329. package/dist/cdn/2FQKDFEE.js +0 -2
  330. package/dist/cdn/2MPQ5IWJ.js +0 -2
  331. package/dist/cdn/3CQKCUM5.js +0 -2
  332. package/dist/cdn/3EYB5GQX.js +0 -2
  333. package/dist/cdn/3FSPL34I.js +0 -170
  334. package/dist/cdn/3LEQ37YT.js +0 -68
  335. package/dist/cdn/4KTRAA2J.js +0 -2
  336. package/dist/cdn/4MUB6TL6.js +0 -2
  337. package/dist/cdn/4PRXQFCV.js +0 -2
  338. package/dist/cdn/4QFTKB6T.js +0 -2
  339. package/dist/cdn/4TSXFX3M.js +0 -2
  340. package/dist/cdn/5C5GHX4D.js +0 -2
  341. package/dist/cdn/7LMZHJZG.js +0 -2
  342. package/dist/cdn/A2SQ4EMZ.js +0 -2
  343. package/dist/cdn/AICPYLWE.js +0 -4
  344. package/dist/cdn/AXOBMX3S.js +0 -2
  345. package/dist/cdn/AZOJHVAO.js +0 -2
  346. package/dist/cdn/BYHX3UWV.js +0 -2
  347. package/dist/cdn/CD5UWSCP.js +0 -2
  348. package/dist/cdn/D2YQWKME.js +0 -135
  349. package/dist/cdn/DDBXEXOV.js +0 -2
  350. package/dist/cdn/DHMNNIXZ.js +0 -2
  351. package/dist/cdn/DLI4XKJ3.js +0 -2
  352. package/dist/cdn/DYO5P3F2.js +0 -2
  353. package/dist/cdn/E66BDC6N.js +0 -2
  354. package/dist/cdn/EEAVX4PP.js +0 -2
  355. package/dist/cdn/EMJQI4MA.js +0 -2
  356. package/dist/cdn/EY5S6ICQ.js +0 -2
  357. package/dist/cdn/FIBQAMJ3.js +0 -2
  358. package/dist/cdn/FIQZPIIK.js +0 -2
  359. package/dist/cdn/FNLBJ4ZQ.js +0 -2
  360. package/dist/cdn/GGDOGNH4.js +0 -150
  361. package/dist/cdn/GSOBDGLK.js +0 -2
  362. package/dist/cdn/GXM3XY3J.js +0 -2
  363. package/dist/cdn/HCNTXLUT.js +0 -2
  364. package/dist/cdn/I273CANO.js +0 -2
  365. package/dist/cdn/I6NVKNZJ.js +0 -2
  366. package/dist/cdn/J5FKIZAM.js +0 -2
  367. package/dist/cdn/J5NPDIZM.js +0 -2
  368. package/dist/cdn/JOUR2FB2.js +0 -3
  369. package/dist/cdn/JWBUJT43.js +0 -2
  370. package/dist/cdn/LISDTBEX.js +0 -2
  371. package/dist/cdn/LYLQCBVX.js +0 -2
  372. package/dist/cdn/MQK63FV7.js +0 -2
  373. package/dist/cdn/N4VOTJ25.js +0 -2
  374. package/dist/cdn/N5QLV56W.js +0 -2
  375. package/dist/cdn/OD5WXP7J.js +0 -2
  376. package/dist/cdn/OXPXXIWL.js +0 -2
  377. package/dist/cdn/PKA745KL.js +0 -2
  378. package/dist/cdn/PMRFXB4F.js +0 -2
  379. package/dist/cdn/PNIFJ5DQ.js +0 -2
  380. package/dist/cdn/PZDI5ZDC.js +0 -2
  381. package/dist/cdn/QROXYP6V.js +0 -2
  382. package/dist/cdn/QUOLQGKP.js +0 -2
  383. package/dist/cdn/QWHGLE3O.js +0 -2
  384. package/dist/cdn/R3PK7XOP.js +0 -2
  385. package/dist/cdn/REM3KCX6.js +0 -2
  386. package/dist/cdn/RNWICLRH.js +0 -2
  387. package/dist/cdn/RQYNPDN3.js +0 -2
  388. package/dist/cdn/S6F7U36E.js +0 -400
  389. package/dist/cdn/SMX2LEJB.js +0 -2
  390. package/dist/cdn/SVROAT3Z.js +0 -2
  391. package/dist/cdn/TBZXKKGP.js +0 -2
  392. package/dist/cdn/TNUCSWBN.js +0 -2
  393. package/dist/cdn/TOICLGFK.js +0 -2
  394. package/dist/cdn/TOTWYGB3.js +0 -2
  395. package/dist/cdn/TUUUK3VX.js +0 -2
  396. package/dist/cdn/U3KMGSVH.js +0 -2
  397. package/dist/cdn/UEP2NYJK.js +0 -2
  398. package/dist/cdn/UZP4YMTE.js +0 -2
  399. package/dist/cdn/VNU4QX7M.js +0 -41
  400. package/dist/cdn/XYMBRPC7.js +0 -2
  401. package/dist/cdn/YB3DR4VO.js +0 -2
  402. package/dist/cdn/YYTEJVBL.js +0 -2
  403. package/dist/cdn/Z3HGPBOR.js +0 -2
  404. package/dist/cdn/ZDDN7UKS.js +0 -2
  405. package/dist/cdn/ZXNF77OB.js +0 -2
  406. package/dist/chunks/functional.js +0 -9
  407. package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
  408. /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
  409. /package/dist/cdn/{DAAON2UO.js → UOXUUCE7.js} +0 -0
@@ -5,13 +5,12 @@ import "@esri/calcite-components/components/calcite-list-item";
5
5
  import "../arcgis-portal-item-type/index.js";
6
6
  import "@esri/calcite-components/components/calcite-block";
7
7
  import "@esri/calcite-components/components/calcite-icon";
8
- import "@esri/calcite-components/components/calcite-chip";
9
8
  import "@esri/calcite-components/components/calcite-notice";
10
9
  import "../arcgis-portal-review-related-items/index.js";
11
10
  import "@esri/calcite-components/components/calcite-button";
12
11
  import "@esri/calcite-components/components/calcite-scrim";
13
12
  import "@esri/calcite-components/components/calcite-panel";
14
- import "@esri/calcite-components/components/calcite-checkbox";
15
13
  import "../arcgis-portal-delete-items-review/index.js";
14
+ import "@esri/calcite-components/components/calcite-checkbox";
16
15
  import "@esri/calcite-components/components/calcite-dialog";
17
16
  export * from "./customElement.js";
@@ -8,6 +8,7 @@ export interface RecycleStatus extends DeleteCheckResult {
8
8
  export interface DeleteCheckResult {
9
9
  item: PortalItem;
10
10
  usedByItems: PortalItem[];
11
+ usedByItemsCount: number;
11
12
  sourceData: PortalItem | null;
12
13
  replacementItemFor: PortalItem[] | null;
13
14
  resultData: PortalItem[] | null;
@@ -1,36 +1,51 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type Portal from "@arcgis/core/portal/Portal.js";
3
3
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
4
- import type { PortalEntityPickerEntityType, PortalEntityPickerMode, PortalEntityPickerSelection } from "../../types/portalEntityPicker.js";
4
+ import type { PortalEntityPickerEntityType, PortalEntityPickerMode, PortalEntityPickerScope, PortalEntityPickerSelection } from "../../types/portalEntityPicker.js";
5
5
  import type { ArcgisPortalItemCard } from "../arcgis-portal-item-card/customElement.js";
6
6
  import type { T9nMeta } from "@arcgis/lumina/controllers";
7
7
  import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
8
8
 
9
9
  /**
10
10
  * Search for and select an item, group, or organization member from a portal.
11
+ * Item and group searches default to all accessible content; user searches are organization-only.
12
+ * Query and scope constraints narrow candidates but do not verify operation-specific eligibility.
13
+ * Changes to the signed-in account on an existing portal instance are not observed.
11
14
  *
12
15
  * @slot [list-start] - Content displayed before the search results.
13
16
  */
14
17
  export abstract class ArcgisPortalEntityPicker extends LitElement {
15
18
  /** @internal */
16
19
  protected _messages: {
20
+ allContent: string;
21
+ allGroups: string;
17
22
  clearSelection: string;
23
+ myContent: string;
24
+ myGroups: string;
25
+ myOrganization: string;
18
26
  noGroupsFound: string;
19
27
  noItemsFound: string;
20
28
  noUsersFound: string;
21
29
  searchFailed: string;
22
30
  searchGroups: string;
23
31
  searchItems: string;
32
+ searchIn: string;
24
33
  searchUsers: string;
25
34
  searching: string;
26
35
  } & T9nMeta<{
36
+ allContent: string;
37
+ allGroups: string;
27
38
  clearSelection: string;
39
+ myContent: string;
40
+ myGroups: string;
41
+ myOrganization: string;
28
42
  noGroupsFound: string;
29
43
  noItemsFound: string;
30
44
  noUsersFound: string;
31
45
  searchFailed: string;
32
46
  searchGroups: string;
33
47
  searchItems: string;
48
+ searchIn: string;
34
49
  searchUsers: string;
35
50
  searching: string;
36
51
  }>;
@@ -42,15 +57,34 @@ export abstract class ArcgisPortalEntityPicker extends LitElement {
42
57
  accessor entityType: PortalEntityPickerEntityType;
43
58
  /** The icon displayed in the search input. */
44
59
  accessor icon: Icon["icon"] | undefined;
60
+ /**
61
+ * Initial search bucket, restored when the portal, entity type, or bucket settings change.
62
+ * Unavailable scopes show an error. User searches support only `all` (organization members).
63
+ *
64
+ * @default "all"
65
+ */
66
+ accessor initialScope: PortalEntityPickerScope;
67
+ /**
68
+ * Initial search text. Changing this value resets the search text and results.
69
+ *
70
+ * @default ""
71
+ */
72
+ accessor initialSearchTerm: string;
45
73
  /** Overrides for search text and other translated messages. */
46
74
  accessor messageOverrides: {
75
+ allContent?: string | undefined;
76
+ allGroups?: string | undefined;
47
77
  clearSelection?: string | undefined;
78
+ myContent?: string | undefined;
79
+ myGroups?: string | undefined;
80
+ myOrganization?: string | undefined;
48
81
  noGroupsFound?: string | undefined;
49
82
  noItemsFound?: string | undefined;
50
83
  noUsersFound?: string | undefined;
51
84
  searchFailed?: string | undefined;
52
85
  searchGroups?: string | undefined;
53
86
  searchItems?: string | undefined;
87
+ searchIn?: string | undefined;
54
88
  searchUsers?: string | undefined;
55
89
  searching?: string | undefined;
56
90
  };
@@ -61,23 +95,35 @@ export abstract class ArcgisPortalEntityPicker extends LitElement {
61
95
  */
62
96
  accessor mode: PortalEntityPickerMode;
63
97
  /**
64
- * The maximum number of results returned by a search.
98
+ * Maximum results per search. Only the first page is displayed; additional pages are not loaded.
65
99
  *
66
100
  * @default 10
67
101
  */
68
102
  accessor num: number;
69
103
  /** The portal whose entities are searched. */
70
104
  accessor portal: Portal;
71
- /** An additional Portal query clause applied to searches. */
105
+ /**
106
+ * Base Portal query combined with user-entered search text and scope using AND.
107
+ * A nonempty query shows matching candidates even when the search input is empty.
108
+ */
72
109
  accessor query: string | undefined;
73
- /** The currently selected entity. The component does not mutate this property. */
110
+ /**
111
+ * Locks the item or group search bucket to `initialScope`.
112
+ *
113
+ * @default false
114
+ */
115
+ accessor scopeSelectionDisabled: boolean;
116
+ /**
117
+ * Controlled selection. Portal, entity type, or search-constraint changes emit
118
+ * `arcgisSelectionChange` with `null` to request clearing it without mutating this property.
119
+ */
74
120
  accessor selected: PortalEntityPickerSelection | null;
75
121
  /**
76
122
  * Controls selection indicators for inline results. `none` keeps click and keyboard selection without controls.
77
123
  *
78
124
  * @default "single"
79
125
  */
80
- accessor selectionMode: Exclude<ArcgisPortalItemCard["selection"], "multiple">;
126
+ accessor selectionMode: Extract<ArcgisPortalItemCard["selection"], "none" | "single">;
81
127
  /** Sets focus on the search input. */
82
128
  setFocus(): Promise<void>;
83
129
  /**
@@ -1,87 +1,196 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as m } from "../../chunks/runtime.js";
3
- import { css as y, html as n } from "lit";
4
- import { keyed as h } from "lit/directives/keyed.js";
5
- import { LitElement as f, createEvent as v, safeStyleMap as g } from "@arcgis/lumina";
6
- import { createRef as u, ref as d } from "lit/directives/ref.js";
7
- import { u as $ } from "../../chunks/useT9n.js";
8
- import { c as T } from "../../chunks/string.js";
9
- import { s as b } from "../../chunks/dom.js";
10
- import { a as S } from "../../chunks/portal.js";
11
- import { r as w } from "../../chunks/request.js";
2
+ import { c as P } from "../../chunks/runtime.js";
3
+ import { css as O, html as p } from "lit";
4
+ import { keyed as v } from "lit/directives/keyed.js";
5
+ import { LitElement as D, createEvent as F, safeStyleMap as L } from "@arcgis/lumina";
6
+ import { createRef as k, ref as R } from "lit/directives/ref.js";
7
+ import { u as q } from "../../chunks/useT9n.js";
8
+ import { isAbortError as A } from "@arcgis/core/core/promiseUtils.js";
9
+ import C from "@arcgis/core/portal/PortalQueryResult.js";
10
+ import { c as x, q as T, a as I } from "../../chunks/string.js";
11
+ import { s as E } from "../../chunks/groups2.js";
12
+ import { s as G } from "../../chunks/dom.js";
13
+ import { a as M } from "../../chunks/portal.js";
14
+ import { r as z } from "../../chunks/request.js";
12
15
  import "../arcgis-portal-group-card/customElement.js";
13
16
  import "../arcgis-portal-item-card/customElement.js";
14
- import { S as R } from "../../chunks/utils.js";
17
+ import { makeGenericController as U } from "@arcgis/lumina/controllers";
18
+ import { S as N } from "../../chunks/utils.js";
15
19
  import "../arcgis-portal-user-avatar/customElement.js";
16
- const k = [
20
+ const W = [
17
21
  "esri_livingatlas",
18
22
  "esri_boundaries",
19
23
  "esri_demographics",
20
24
  "esri_nav",
21
25
  "esri_webstyles"
22
26
  ];
23
- function I(o) {
24
- return b(o.trim()).replace(/[!*+\-&|()[\]{}^~?:"\\]/gu, "\\$&");
27
+ function B(n) {
28
+ return G(n.trim()).replace(/[!*+\-&|()[\]{}^~?:"\\]/gu, "\\$&");
25
29
  }
26
- async function _({
27
- portal: o,
30
+ async function Q({
31
+ portal: n,
28
32
  searchTerm: e,
29
33
  num: t = 100,
30
- query: s
34
+ query: r,
35
+ signal: o
31
36
  }) {
32
- const i = I(e), l = `${S(o)}portals/self/users/search`, r = [i ? `(${i})` : void 0, s?.trim() ? `(${s.trim()})` : void 0];
33
- o.isPortal && r.push(...k.map((p) => `-username:${p}`));
34
- const a = l.includes("www.arcgis.com") && o.isPortal ? { disableIdentityLookup: !0, addTokenManually: !1 } : {};
35
- return await w({
36
- url: l,
37
- portal: o,
37
+ const a = B(e), i = `${M(n)}portals/self/users/search`, c = [a ? `(${a})` : void 0, r?.trim() ? `(${r.trim()})` : void 0];
38
+ n.isPortal && c.push(...W.map((m) => `-username:${m}`));
39
+ const u = i.includes("www.arcgis.com") && n.isPortal ? { disableIdentityLookup: !0, addTokenManually: !1 } : {};
40
+ return await z({
41
+ url: i,
42
+ portal: n,
38
43
  params: {
39
44
  num: Math.min(Math.max(t, 1), 100),
40
- q: r.filter(Boolean).join(" AND "),
45
+ q: c.filter(Boolean).join(" AND "),
41
46
  sortField: "relevance"
42
47
  },
43
- options: a
48
+ options: { ...u, ...o ? { signal: o } : {} }
44
49
  });
45
50
  }
46
- function P(...o) {
47
- return o.map((e) => e?.trim()).filter((e) => !!e).map((e) => `(${e})`).join(" AND ");
51
+ function b(n, e) {
52
+ const t = ["all"];
53
+ return e === "user" || !n.user?.username || (e === "item" && t.push("myContent"), t.push("myGroups"), n.user.orgId && t.push("myOrganization")), t;
48
54
  }
49
- async function A(o, e, t, s = {}) {
50
- const i = Math.min(Math.max(s.num ?? 10, 1), 100);
51
- if (e === "user")
52
- try {
55
+ async function j(n) {
56
+ const { portal: e, entityType: t, searchTerm: r, signal: o } = n, a = Math.min(Math.max(n.num ?? 10, 1), 100), i = n.scope ?? "all";
57
+ try {
58
+ if (o?.throwIfAborted(), !b(e, t).includes(i))
59
+ throw new Error(`Search scope "${i}" is unavailable for ${t} searches.`);
60
+ if (!r.trim() && !n.query?.trim())
61
+ return {};
62
+ if (t === "user")
53
63
  return {
54
64
  result: {
55
- entityType: e,
56
- result: await _({ portal: o, searchTerm: t, num: i, query: s.query })
65
+ entityType: t,
66
+ result: await Q({
67
+ portal: e,
68
+ searchTerm: r,
69
+ num: a,
70
+ query: n.query,
71
+ ...o ? { signal: o } : {}
72
+ })
57
73
  }
58
74
  };
59
- } catch (c) {
60
- return console.error(c), { error: { code: "unhandledError" } };
75
+ const c = x(r);
76
+ if (!c && !n.query?.trim())
77
+ return {};
78
+ let l;
79
+ const u = e.user;
80
+ if (i === "myContent" && u)
81
+ l = `owner:${T(u.username)}`;
82
+ else if (i === "myOrganization" && u?.orgId)
83
+ l = `orgid:${T(u.orgId)}`;
84
+ else if (i === "myGroups" && u) {
85
+ if (t === "group") {
86
+ const s = await E(
87
+ e,
88
+ {
89
+ num: a,
90
+ q: I(c, n.query),
91
+ searchUserAccess: "groupMember",
92
+ searchUserName: u.username
93
+ },
94
+ { signal: o }
95
+ );
96
+ return {
97
+ result: {
98
+ entityType: t,
99
+ result: new C({ results: s.results, total: s.total })
100
+ }
101
+ };
102
+ }
103
+ const y = await u.fetchGroups();
104
+ if (o?.throwIfAborted(), !y.length)
105
+ return {
106
+ result: { entityType: t, result: new C({ results: [], total: 0 }) }
107
+ };
108
+ l = y.map(({ id: s }) => {
109
+ if (!s)
110
+ throw new Error("A membership group is missing its ID.");
111
+ return `group:${T(s)}`;
112
+ }).join(" OR ");
61
113
  }
62
- const l = T(t);
63
- if (!l)
64
- return {};
65
- const r = {
66
- num: i,
67
- query: P(l, s.query)
68
- };
69
- try {
70
- return e === "group" ? { result: { entityType: e, result: await o.queryGroups(r) } } : { result: { entityType: e, result: await o.queryItems(r) } };
114
+ const m = {
115
+ num: a,
116
+ query: I(c, n.query, l)
117
+ };
118
+ return t === "group" ? { result: { entityType: t, result: await e.queryGroups(m, { signal: o }) } } : { result: { entityType: t, result: await e.queryItems(m, { signal: o }) } };
71
119
  } catch (c) {
120
+ if (o?.aborted || A(c))
121
+ throw c;
72
122
  return console.error(c), { error: { code: "unhandledError" } };
73
123
  }
74
124
  }
75
- const C = y`:host{display:block;inline-size:100%}.entity-picker{display:flex;flex-direction:column;gap:.5rem;min-inline-size:16rem}.entity-picker__results{max-block-size:var(--arcgis-portal-entity-picker-results-max-block-size, 22rem);overflow-y:auto}.entity-picker__cards{display:flex;flex-direction:column;gap:.5rem}.entity-picker__status{color:var(--calcite-color-text-3);font-size:.875rem;margin:0;padding:.75rem}.entity-picker__selection{align-items:center;display:var(--arcgis-portal-entity-picker-selection-display, flex);gap:.5rem}.entity-picker__selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entity-picker__input{inline-size:100%}`;
76
- class O extends f {
125
+ const H = (n) => U((e, t) => {
126
+ let r = {
127
+ searchTerm: "",
128
+ scope: "all",
129
+ searchActive: !1,
130
+ isSearching: !1,
131
+ searchFailed: !1
132
+ }, o, a;
133
+ const i = (s) => {
134
+ r = { ...r, ...s }, t.exports = { ...r, setSearchTerm: m, setScope: y };
135
+ }, c = () => {
136
+ o !== void 0 && (clearTimeout(o), o = void 0), a?.abort(), a = void 0;
137
+ }, l = async (s, h) => {
138
+ const { entityType: d, num: f, portal: g, query: S } = e, { scope: w } = r;
139
+ try {
140
+ const { error: $, result: _ } = await j({
141
+ portal: g,
142
+ entityType: d,
143
+ searchTerm: s,
144
+ num: f,
145
+ query: S,
146
+ signal: h,
147
+ ...w === "all" ? {} : { scope: w }
148
+ });
149
+ h.aborted || i({ searchFailed: !!$, searchResult: _, isSearching: !1 });
150
+ } catch ($) {
151
+ !h.aborted && !A($) && (console.error($), i({ searchFailed: !0, searchResult: void 0, isSearching: !1 }));
152
+ }
153
+ }, u = (s) => {
154
+ const h = s.searchTerm.trim(), d = b(e.portal, e.entityType).includes(s.scope), f = !!(h || e.query?.trim()), g = !d || f;
155
+ if (c(), i({
156
+ ...s,
157
+ searchActive: g,
158
+ searchFailed: !d,
159
+ searchResult: void 0,
160
+ isSearching: d && f
161
+ }), n(g), d && f) {
162
+ a = new AbortController();
163
+ const { signal: S } = a;
164
+ o = setTimeout(() => {
165
+ o = void 0, l(h, S);
166
+ }, N);
167
+ }
168
+ }, m = (s) => {
169
+ u({ searchTerm: s, scope: r.scope });
170
+ }, y = (s) => {
171
+ !e.scopeSelectionDisabled && s !== r.scope && u({ searchTerm: r.searchTerm, scope: s });
172
+ };
173
+ return t.onUpdate((s) => {
174
+ const h = s.has("portal") || s.has("entityType") || s.has("query") || s.has("num") || s.has("initialSearchTerm"), d = s.has("portal") || s.has("entityType") || s.has("initialScope") || s.has("scopeSelectionDisabled");
175
+ (h || d) && u({
176
+ searchTerm: h ? e.initialSearchTerm : r.searchTerm,
177
+ scope: d ? e.initialScope : r.scope
178
+ });
179
+ }), t.onConnected(() => {
180
+ r.isSearching && u({ searchTerm: r.searchTerm, scope: r.scope });
181
+ }), t.onDisconnected(c), { ...r, setSearchTerm: m, setScope: y };
182
+ }), K = O`:host{display:block;inline-size:100%}.entity-picker{display:flex;flex-direction:column;gap:.5rem;min-inline-size:16rem}.entity-picker__results{max-block-size:var(--arcgis-portal-entity-picker-results-max-block-size, 22rem);overflow-y:auto}.entity-picker__cards{display:flex;flex-direction:column;gap:.5rem}.entity-picker__status{color:var(--calcite-color-text-3);font-size:.875rem;margin:0;padding:.75rem}.entity-picker__selection{align-items:center;display:var(--arcgis-portal-entity-picker-selection-display, flex);gap:.5rem}.entity-picker__selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entity-picker__input{inline-size:100%}`;
183
+ class V extends D {
77
184
  constructor() {
78
- super(...arguments), this._messages = $({ blocking: !0, name: "portal-entity-picker" }), this.inputRef = u(), this.inputContainerRef = u(), this.resizeObserver = null, this.searchId = 0, this.searchTerm = "", this.isSearching = !1, this.searchFailed = !1, this.popoverOpen = !1, this.popoverWidth = 0, this.entityType = "group", this.mode = "inline", this.selectionMode = "single", this.selected = null, this.num = 10, this.arcgisSelectionChange = v();
185
+ super(...arguments), this._messages = q({ blocking: !0, name: "portal-entity-picker" }), this.inputRef = k(), this.inputContainerRef = k(), this.resizeObserver = null, this.searchController = H((e) => {
186
+ (!e || this.mode === "popover") && (this.popoverOpen = e);
187
+ })(this), this.popoverOpen = !1, this.popoverWidth = 0, this.entityType = "group", this.mode = "inline", this.selectionMode = "single", this.selected = null, this.initialScope = "all", this.scopeSelectionDisabled = !1, this.initialSearchTerm = "", this.num = 10, this.arcgisSelectionChange = F();
79
188
  }
80
189
  static {
81
- this.properties = { searchTerm: 16, isSearching: 16, searchFailed: 16, searchResult: 16, popoverOpen: 16, popoverWidth: 16, portal: 0, entityType: 1, mode: 1, selectionMode: 1, selected: 0, query: 1, num: 9, icon: 1, messageOverrides: 0 };
190
+ this.properties = { popoverOpen: 16, popoverWidth: 16, portal: 0, entityType: 1, mode: 1, selectionMode: 1, selected: 0, query: 1, initialScope: 1, scopeSelectionDisabled: 5, initialSearchTerm: 1, num: 9, icon: 1, messageOverrides: 0 };
82
191
  }
83
192
  static {
84
- this.styles = C;
193
+ this.styles = K;
85
194
  }
86
195
  get searchLabel() {
87
196
  const { entityType: e, _messages: t } = this;
@@ -102,52 +211,21 @@ class O extends f {
102
211
  this.updatePopoverWidth(), !(typeof ResizeObserver > "u" || !this.inputContainerRef.value) && (this.resizeObserver = new ResizeObserver(() => this.updatePopoverWidth()), this.resizeObserver.observe(this.inputContainerRef.value));
103
212
  }
104
213
  willUpdate(e) {
105
- (e.has("portal") || e.has("entityType") || e.has("query") || e.has("num")) && this.resetSearch(), e.has("mode") && this.mode === "inline" && (this.popoverOpen = !1);
214
+ this.hasUpdated && this.selected && ["portal", "entityType", "query", "initialScope", "scopeSelectionDisabled"].some((t) => e.has(t)) && this.arcgisSelectionChange.emit(null), e.has("mode") && this.mode === "inline" && (this.popoverOpen = !1);
106
215
  }
107
216
  disconnectedCallback() {
108
- this.cancelPendingSearch(), this.resizeObserver?.disconnect(), this.resizeObserver = null, super.disconnectedCallback();
217
+ this.resizeObserver?.disconnect(), this.resizeObserver = null, super.disconnectedCallback();
109
218
  }
110
219
  updatePopoverWidth() {
111
220
  requestAnimationFrame(() => {
112
221
  this.popoverWidth = this.inputContainerRef.value?.offsetWidth ?? 0;
113
222
  });
114
223
  }
115
- cancelPendingSearch() {
116
- return this.debounceId !== void 0 && (window.clearTimeout(this.debounceId), this.debounceId = void 0), this.searchId += 1, this.searchId;
117
- }
118
- resetSearch() {
119
- this.cancelPendingSearch(), this.searchTerm = "", this.isSearching = !1, this.searchFailed = !1, this.searchResult = void 0, this.popoverOpen = !1;
120
- }
121
- scheduleSearch(e) {
122
- const t = e.trim(), s = this.cancelPendingSearch();
123
- if (this.searchFailed = !1, this.searchResult = void 0, !t) {
124
- this.isSearching = !1, this.popoverOpen = !1;
125
- return;
126
- }
127
- this.isSearching = !0, this.mode === "popover" && (this.popoverOpen = !0), this.debounceId = window.setTimeout(() => {
128
- this.debounceId = void 0, this.search(t, s);
129
- }, R);
130
- }
131
- async search(e, t) {
132
- const { entityType: s, num: i, portal: l, query: r } = this;
133
- try {
134
- const { error: c, result: a } = await A(l, s, e, { num: i, query: r });
135
- if (t !== this.searchId)
136
- return;
137
- this.searchFailed = !!c, this.searchResult = a;
138
- } catch {
139
- if (t !== this.searchId)
140
- return;
141
- this.searchFailed = !0, this.searchResult = void 0;
142
- } finally {
143
- t === this.searchId && (this.isSearching = !1);
144
- }
145
- }
146
224
  emitSelection(e) {
147
225
  this.arcgisSelectionChange.emit(e), this.mode === "popover" && this.togglePicker(!1);
148
226
  }
149
227
  getFocusableResults() {
150
- const e = Array.from(this.renderRoot.querySelector('slot[name="list-start"]')?.assignedElements({ flatten: !0 }) ?? []).filter((s) => s instanceof HTMLElement && (s.tagName === "CALCITE-LIST-ITEM" || s.tabIndex >= 0)), t = Array.from(this.renderRoot.querySelectorAll("calcite-list-item, arcgis-portal-group-card, arcgis-portal-item-card"));
228
+ const e = Array.from(this.renderRoot.querySelector('slot[name="list-start"]')?.assignedElements({ flatten: !0 }) ?? []).filter((r) => r instanceof HTMLElement && (r.tagName === "CALCITE-LIST-ITEM" || r.tabIndex >= 0)), t = Array.from(this.renderRoot.querySelectorAll("calcite-list-item, arcgis-portal-group-card, arcgis-portal-item-card"));
151
229
  return [...e, ...t];
152
230
  }
153
231
  async focusResult(e) {
@@ -169,85 +247,92 @@ class O extends f {
169
247
  const t = this.getFocusableResults();
170
248
  if (!t.length)
171
249
  return;
172
- const s = (e + t.length) % t.length;
173
- await this.focusResult(t[s]);
250
+ const r = (e + t.length) % t.length;
251
+ await this.focusResult(t[r]);
174
252
  }
175
253
  handleResultsKeyDown(e) {
176
254
  if (e.defaultPrevented)
177
255
  return;
178
- const t = this.getFocusableResults(), s = e.composedPath(), i = t.findIndex((r) => s.includes(r));
179
- if (i === -1)
256
+ const t = this.getFocusableResults(), r = e.composedPath(), o = t.findIndex((i) => r.includes(i));
257
+ if (o === -1)
180
258
  return;
181
259
  if (this.mode === "inline" && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
182
- e.preventDefault(), this.focusResultAt(i + (e.key === "ArrowDown" ? 1 : -1));
260
+ e.preventDefault(), this.focusResultAt(o + (e.key === "ArrowDown" ? 1 : -1));
183
261
  return;
184
262
  }
185
- const l = t[i];
186
- if (l.tagName === "ARCGIS-PORTAL-GROUP-CARD" && (e.key === "Enter" || e.key === " ")) {
263
+ const a = t[o];
264
+ if (a.tagName === "ARCGIS-PORTAL-GROUP-CARD" && (e.key === "Enter" || e.key === " ")) {
187
265
  e.preventDefault();
188
- const { group: r } = l;
189
- this.emitSelection({ entityType: "group", entity: r });
266
+ const { group: i } = a;
267
+ this.emitSelection({ entityType: "group", entity: i });
190
268
  return;
191
269
  }
192
- if (l.tagName === "ARCGIS-PORTAL-ITEM-CARD" && (e.key === "Enter" || e.key === " ")) {
270
+ if (a.tagName === "ARCGIS-PORTAL-ITEM-CARD" && (e.key === "Enter" || e.key === " ")) {
193
271
  e.preventDefault();
194
- const { item: r } = l;
195
- this.emitSelection({ entityType: "item", entity: r });
272
+ const { item: i } = a;
273
+ this.emitSelection({ entityType: "item", entity: i });
196
274
  }
197
275
  }
276
+ renderScopeSelector() {
277
+ const { entityType: e, portal: t, _messages: r } = this, { scope: o } = this.searchController, a = b(t, e);
278
+ return a.length <= 1 ? null : p`<calcite-select .disabled=${this.scopeSelectionDisabled} .label=${r.searchIn} scale=m @calciteSelectChange=${(i) => {
279
+ const c = a.find((l) => l === i.target.value);
280
+ c && this.searchController.setScope(c);
281
+ }}>${a.map((i) => p`<calcite-option .selected=${i === o} .value=${i}>${i === "all" ? e === "item" ? r.allContent : r.allGroups : r[i]}</calcite-option>`)}</calcite-select>`;
282
+ }
198
283
  renderGroup(e) {
199
- return h(e.id, n`<calcite-list-item .label=${e.title || e.id || ""} .description=${[e.owner, e.access].filter(Boolean).join(" · ")} .selected=${this.selected?.entityType === "group" && this.selected.entity.id === e.id} @calciteListItemSelect=${() => this.emitSelection({ entityType: "group", entity: e })}><calcite-avatar slot=content-start .fullName=${e.title ?? void 0} .thumbnail=${e.thumbnailUrl ?? void 0} scale=m></calcite-avatar></calcite-list-item>`);
284
+ return v(e.id, p`<calcite-list-item .label=${e.title || e.id || ""} .description=${[e.owner, e.access].filter(Boolean).join(" · ")} .selected=${this.selected?.entityType === "group" && this.selected.entity.id === e.id} @calciteListItemSelect=${() => this.emitSelection({ entityType: "group", entity: e })}><calcite-avatar slot=content-start .fullName=${e.title ?? void 0} .thumbnail=${e.thumbnailUrl ?? void 0} scale=m></calcite-avatar></calcite-list-item>`);
200
285
  }
201
286
  renderInlineGroup(e) {
202
- return h(e.id, n`<arcgis-portal-group-card .group=${e} .portal=${this.portal} .preview=${this.selectionMode === "none" ? "top" : void 0} .selected=${this.selected?.entityType === "group" && this.selected.entity.id === e.id} .selection=${this.selectionMode} @arcgisGroupBrowserCardPreview=${() => this.emitSelection({ entityType: "group", entity: e })} @arcgisGroupCardSelect=${({ detail: t }) => {
287
+ return v(e.id, p`<arcgis-portal-group-card .group=${e} .portal=${this.portal} .preview=${this.selectionMode === "none" ? "top" : void 0} .selected=${this.selected?.entityType === "group" && this.selected.entity.id === e.id} .selection=${this.selectionMode} @arcgisGroupBrowserCardPreview=${() => this.emitSelection({ entityType: "group", entity: e })} @arcgisGroupCardSelect=${({ detail: t }) => {
203
288
  t.selected && this.emitSelection({ entityType: "group", entity: t.group });
204
289
  }} .user=${this.portal.user ?? void 0} view=compact></arcgis-portal-group-card>`);
205
290
  }
206
291
  renderItem(e) {
207
- return h(e.id, n`<calcite-list-item .label=${e.title || e.id || ""} .description=${[e.type, e.owner].filter(Boolean).join(" · ")} .selected=${this.selected?.entityType === "item" && this.selected.entity.id === e.id} @calciteListItemSelect=${() => this.emitSelection({ entityType: "item", entity: e })}><calcite-avatar slot=content-start .fullName=${e.title ?? void 0} .thumbnail=${e.thumbnailUrl ?? void 0} scale=m></calcite-avatar></calcite-list-item>`);
292
+ return v(e.id, p`<calcite-list-item .label=${e.title || e.id || ""} .description=${[e.type, e.owner].filter(Boolean).join(" · ")} .selected=${this.selected?.entityType === "item" && this.selected.entity.id === e.id} @calciteListItemSelect=${() => this.emitSelection({ entityType: "item", entity: e })}><calcite-avatar slot=content-start .fullName=${e.title ?? void 0} .thumbnail=${e.thumbnailUrl ?? void 0} scale=m></calcite-avatar></calcite-list-item>`);
208
293
  }
209
294
  renderInlineItem(e) {
210
- return h(e.id, n`<arcgis-portal-item-card .item=${e} .portal=${this.portal} .preview=${this.selectionMode === "none" ? "top" : void 0} .selected=${this.selected?.entityType === "item" && this.selected.entity.id === e.id} .selection=${this.selectionMode} @arcgisItemBrowserCardPreview=${() => this.emitSelection({ entityType: "item", entity: e })} @arcgisItemCardSelect=${({ detail: t }) => {
295
+ return v(e.id, p`<arcgis-portal-item-card .item=${e} .portal=${this.portal} .preview=${this.selectionMode === "none" ? "top" : void 0} .selected=${this.selected?.entityType === "item" && this.selected.entity.id === e.id} .selection=${this.selectionMode} @arcgisItemBrowserCardPreview=${() => this.emitSelection({ entityType: "item", entity: e })} @arcgisItemCardSelect=${({ detail: t }) => {
211
296
  t.selected && this.emitSelection({ entityType: "item", entity: t.item });
212
297
  }} .user=${this.portal.user ?? void 0} view=list></arcgis-portal-item-card>`);
213
298
  }
214
299
  renderUser(e) {
215
- return h(e.username, n`<calcite-list-item .label=${e.fullName || e.username} .description=${e.username} .selected=${this.selected?.entityType === "user" && this.selected.entity.username === e.username} @calciteListItemSelect=${() => this.emitSelection({ entityType: "user", entity: e })}><arcgis-portal-user-avatar slot=content-start .portal=${this.portal} .user=${e} scale=m></arcgis-portal-user-avatar></calcite-list-item>`);
300
+ return v(e.username, p`<calcite-list-item .label=${e.fullName || e.username} .description=${e.username} .selected=${this.selected?.entityType === "user" && this.selected.entity.username === e.username} @calciteListItemSelect=${() => this.emitSelection({ entityType: "user", entity: e })}><arcgis-portal-user-avatar slot=content-start .portal=${this.portal} .user=${e} scale=m></arcgis-portal-user-avatar></calcite-list-item>`);
216
301
  }
217
302
  renderSearchResults() {
218
- const { entityType: e, isSearching: t, searchFailed: s, searchResult: i, searchTerm: l, _messages: r } = this;
219
- if (!l.trim())
303
+ const { entityType: e, _messages: t } = this, { isSearching: r, searchActive: o, searchFailed: a, searchResult: i } = this.searchController;
304
+ if (!o)
220
305
  return null;
221
- if (t)
222
- return n`<div role=status><calcite-loader .label=${r.searching} scale=s></calcite-loader></div>`;
223
- if (s)
224
- return n`<p class="entity-picker__status" role=alert>${r.searchFailed}</p>`;
306
+ if (r)
307
+ return p`<div role=status><calcite-loader .label=${t.searching} scale=s></calcite-loader></div>`;
308
+ if (a)
309
+ return p`<p class="entity-picker__status" role=alert>${t.searchFailed}</p>`;
225
310
  if (!(i?.result.results ?? []).length) {
226
- const a = e === "group" ? r.noGroupsFound : e === "item" ? r.noItemsFound : r.noUsersFound;
227
- return n`<p class="entity-picker__status" role=status>${a}</p>`;
311
+ const l = e === "group" ? t.noGroupsFound : e === "item" ? t.noItemsFound : t.noUsersFound;
312
+ return p`<p class="entity-picker__status" role=status>${l}</p>`;
228
313
  }
229
- return this.mode === "inline" && i?.entityType === "group" ? n`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map((a) => this.renderInlineGroup(a))}</div>` : this.mode === "inline" && i?.entityType === "item" ? n`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map((a) => this.renderInlineItem(a))}</div>` : n`<calcite-list interaction-mode=interactive .label=${this.searchLabel} .selectionMode=${this.mode === "inline" && this.selectionMode === "single" ? "single-persist" : "none"}><slot name=list-start></slot>${i?.entityType === "group" ? i.result.results.map((a) => this.renderGroup(a)) : i?.entityType === "item" ? i.result.results.map((a) => this.renderItem(a)) : i?.result.results.map((a) => this.renderUser(a))}</calcite-list>`;
314
+ return this.mode === "inline" && i?.entityType === "group" ? p`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map((l) => this.renderInlineGroup(l))}</div>` : this.mode === "inline" && i?.entityType === "item" ? p`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map((l) => this.renderInlineItem(l))}</div>` : p`<calcite-list interaction-mode=interactive .label=${this.searchLabel} .selectionMode=${this.mode === "inline" && this.selectionMode === "single" ? "single-persist" : "none"}><slot name=list-start></slot>${i?.entityType === "group" ? i.result.results.map((l) => this.renderGroup(l)) : i?.entityType === "item" ? i.result.results.map((l) => this.renderItem(l)) : i?.result.results.map((l) => this.renderUser(l))}</calcite-list>`;
230
315
  }
231
316
  renderPicker(e = !0) {
232
- return n`<div class="entity-picker">${this.selectedLabel && n`<div class="entity-picker__selection"><span class="entity-picker__selection-label">${this.selectedLabel}</span><calcite-button appearance=transparent icon-start=x kind=neutral .label=${this._messages.clearSelection} @click=${() => this.arcgisSelectionChange.emit(null)} scale=s></calcite-button></div>` || ""}<div class="entity-picker__input" ${d(this.inputContainerRef)}><calcite-input .icon=${this.icon} .clearable=${this.mode === "inline"} .label=${this.searchLabel} .placeholder=${this.searchLabel} .value=${this.searchTerm} @click=${() => {
233
- this.mode === "popover" && this.searchTerm.trim() && (this.popoverOpen = !0);
317
+ return p`<div class="entity-picker">${this.selectedLabel && p`<div class="entity-picker__selection"><span class="entity-picker__selection-label">${this.selectedLabel}</span><calcite-button appearance=transparent icon-start=x kind=neutral .label=${this._messages.clearSelection} @click=${() => this.arcgisSelectionChange.emit(null)} scale=s></calcite-button></div>` || ""}${this.renderScopeSelector()}<div class="entity-picker__input" ${R(this.inputContainerRef)}><calcite-input .icon=${this.icon} .clearable=${this.mode === "inline"} .label=${this.searchLabel} .placeholder=${this.searchLabel} .value=${this.searchController.searchTerm} @click=${() => {
318
+ this.mode === "popover" && this.searchController.searchActive && (this.popoverOpen = !0);
234
319
  }} @keydown=${(t) => {
235
- (t.key === "ArrowDown" || t.key === "ArrowUp") && this.searchResult?.result.results.length && (t.preventDefault(), this.focusResultAt(t.key === "ArrowDown" ? 0 : -1));
320
+ (t.key === "ArrowDown" || t.key === "ArrowUp") && this.searchController.searchResult?.result.results.length && (t.preventDefault(), this.focusResultAt(t.key === "ArrowDown" ? 0 : -1));
236
321
  }} @focus=${() => {
237
- this.mode === "popover" && this.searchTerm.trim() && (this.popoverOpen = !0);
322
+ this.mode === "popover" && this.searchController.searchActive && (this.popoverOpen = !0);
238
323
  }} @calciteInputInput=${(t) => {
239
- this.searchTerm = t.target.value, this.scheduleSearch(this.searchTerm);
240
- }} ${d(this.inputRef)}></calcite-input></div>${e && n`<div class="entity-picker__results" @keydown=${this.handleResultsKeyDown}>${this.renderSearchResults()}</div>` || ""}</div>`;
324
+ this.searchController.setSearchTerm(t.target.value);
325
+ }} ${R(this.inputRef)}></calcite-input></div>${e && p`<div class="entity-picker__results" @keydown=${this.handleResultsKeyDown}>${this.renderSearchResults()}</div>` || ""}</div>`;
241
326
  }
242
327
  render() {
243
- return this.mode === "inline" ? this.renderPicker() : n`${this.renderPicker(!1)}<calcite-popover .label=${this.searchLabel} .open=${this.popoverOpen} placement=bottom-start .referenceElement=${this.inputContainerRef.value} trigger-disabled @calcitePopoverClose=${(e) => {
328
+ return this.mode === "inline" ? this.renderPicker() : p`${this.renderPicker(!1)}<calcite-popover .label=${this.searchLabel} .open=${this.popoverOpen} placement=bottom-start .referenceElement=${this.inputContainerRef.value} trigger-disabled @calcitePopoverClose=${(e) => {
244
329
  !e.target.open && this.popoverOpen && (this.popoverOpen = !1, requestAnimationFrame(() => {
245
330
  this.setFocus();
246
331
  }));
247
- }}><div class="entity-picker__results" style=${g({ inlineSize: this.popoverWidth ? `${this.popoverWidth}px` : void 0 })}>${this.renderSearchResults()}</div></calcite-popover>`;
332
+ }}><div class="entity-picker__results" style=${L({ inlineSize: this.popoverWidth ? `${this.popoverWidth}px` : void 0 })}>${this.renderSearchResults()}</div></calcite-popover>`;
248
333
  }
249
334
  }
250
- m("arcgis-portal-entity-picker", O);
335
+ P("arcgis-portal-entity-picker", V);
251
336
  export {
252
- O as ArcgisPortalEntityPicker
337
+ V as ArcgisPortalEntityPicker
253
338
  };
@@ -1,3 +1,5 @@
1
+ import "@esri/calcite-components/components/calcite-select";
2
+ import "@esri/calcite-components/components/calcite-option";
1
3
  import "@esri/calcite-components/components/calcite-list-item";
2
4
  import "@esri/calcite-components/components/calcite-avatar";
3
5
  import "../arcgis-portal-group-card/index.js";