@arcgis/portal-components 5.1.0-next.99 → 5.1.0

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 (259) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/3AFLX4RZ.js +31 -0
  3. package/dist/cdn/3XDKOO6K.js +2 -0
  4. package/dist/cdn/4ISLOZQ3.js +2 -0
  5. package/dist/cdn/{TTZBF4KI.js → 563BUCQX.js} +1 -1
  6. package/dist/cdn/{JOYFDD4B.js → 5BPXS3WU.js} +1 -1
  7. package/dist/cdn/65JPRIL4.js +98 -0
  8. package/dist/cdn/6K7GPATC.js +2 -0
  9. package/dist/cdn/6RA33SDH.js +34 -0
  10. package/dist/cdn/7IAAHGM2.js +2 -0
  11. package/dist/cdn/{SOPWLUP4.js → ABRHXRFP.js} +1 -1
  12. package/dist/cdn/BCUEYBNI.js +2 -0
  13. package/dist/cdn/CAQR2NSG.js +4 -0
  14. package/dist/cdn/D42PED2R.js +2 -0
  15. package/dist/cdn/DEHBTA5D.js +2 -0
  16. package/dist/cdn/EZ7YC5N5.js +99 -0
  17. package/dist/cdn/{SEZNHA2J.js → FK7QXBE2.js} +1 -1
  18. package/dist/cdn/IBYY5ORN.js +122 -0
  19. package/dist/cdn/ITFWXO7A.js +49 -0
  20. package/dist/cdn/JWUQZ52F.js +134 -0
  21. package/dist/cdn/KBYWRUKO.js +2 -0
  22. package/dist/cdn/KFH2OM2D.js +2 -0
  23. package/dist/cdn/{GPPEHGUO.js → LVUHKMSB.js} +1 -1
  24. package/dist/cdn/NDKFZPYE.js +2 -0
  25. package/dist/cdn/NX4L2LC2.js +2 -0
  26. package/dist/cdn/OYABHYVF.js +2 -0
  27. package/dist/cdn/{V5ZWDMLE.js → PIZFXU2N.js} +1 -1
  28. package/dist/cdn/QOCYNLQ7.js +71 -0
  29. package/dist/cdn/{ERNT74VA.js → QUYBZ3J7.js} +1 -1
  30. package/dist/cdn/R2XPTETT.js +22 -0
  31. package/dist/cdn/R53CO5LK.js +77 -0
  32. package/dist/cdn/{HQAGVE4P.js → RNRPTWHT.js} +17 -1
  33. package/dist/cdn/{32DRTMS4.js → SFKRR7GW.js} +1 -1
  34. package/dist/cdn/SQ54YADV.js +533 -0
  35. package/dist/cdn/SX4KDMYV.js +69 -0
  36. package/dist/cdn/TKQAFRBM.js +36 -0
  37. package/dist/cdn/TNDL67UN.js +2 -0
  38. package/dist/cdn/{LJUIMVQ2.js → W4RAJWHA.js} +1 -1
  39. package/dist/cdn/WHLL7DNC.js +146 -0
  40. package/dist/cdn/X3LZYQ4U.js +66 -0
  41. package/dist/cdn/XR4PMNYP.js +2 -0
  42. package/dist/cdn/YJK6JAPE.js +422 -0
  43. package/dist/cdn/{5WK4GJK2.js → Z5UVAVHJ.js} +1 -1
  44. package/dist/cdn/{3OTUKLZI.js → ZCL2V7W3.js} +1 -1
  45. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ar.json +1 -1
  46. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.bg.json +1 -1
  47. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.bs.json +1 -1
  48. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ca.json +1 -1
  49. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.cs.json +1 -1
  50. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.da.json +1 -1
  51. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.de.json +1 -1
  52. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.el.json +1 -1
  53. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
  54. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.es.json +1 -1
  55. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.et.json +1 -1
  56. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.fi.json +1 -1
  57. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.fr.json +1 -1
  58. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.he.json +1 -1
  59. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.hr.json +1 -1
  60. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.hu.json +1 -1
  61. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.id.json +1 -1
  62. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.it.json +1 -1
  63. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ja.json +1 -1
  64. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ko.json +1 -1
  65. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.lt.json +1 -1
  66. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.lv.json +1 -1
  67. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.nl.json +1 -1
  68. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.no.json +1 -1
  69. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.pl.json +1 -1
  70. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.pt-BR.json +1 -1
  71. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.pt-PT.json +1 -1
  72. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ro.json +1 -1
  73. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ru.json +1 -1
  74. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sk.json +1 -1
  75. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sl.json +1 -1
  76. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sr.json +1 -1
  77. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sv.json +1 -1
  78. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.th.json +1 -1
  79. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.tr.json +1 -1
  80. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.uk.json +1 -1
  81. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.vi.json +1 -1
  82. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.zh-CN.json +1 -1
  83. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.zh-HK.json +1 -1
  84. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.zh-TW.json +1 -1
  85. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ar.json +1 -0
  86. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.bg.json +1 -0
  87. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.bs.json +1 -0
  88. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ca.json +1 -0
  89. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.cs.json +1 -0
  90. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.da.json +1 -0
  91. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.de.json +1 -0
  92. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.el.json +1 -0
  93. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.en.json +1 -0
  94. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.es.json +1 -0
  95. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.et.json +1 -0
  96. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.fi.json +1 -0
  97. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.fr.json +1 -0
  98. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.he.json +1 -0
  99. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.hr.json +1 -0
  100. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.hu.json +1 -0
  101. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.id.json +1 -0
  102. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.it.json +1 -0
  103. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ja.json +1 -0
  104. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ko.json +1 -0
  105. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.lt.json +1 -0
  106. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.lv.json +1 -0
  107. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.nl.json +1 -0
  108. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.no.json +1 -0
  109. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.pl.json +1 -0
  110. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.pt-BR.json +1 -0
  111. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.pt-PT.json +1 -0
  112. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ro.json +1 -0
  113. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ru.json +1 -0
  114. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sk.json +1 -0
  115. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sl.json +1 -0
  116. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sr.json +1 -0
  117. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sv.json +1 -0
  118. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.th.json +1 -0
  119. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.tr.json +1 -0
  120. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.uk.json +1 -0
  121. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.vi.json +1 -0
  122. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.zh-CN.json +1 -0
  123. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.zh-HK.json +1 -0
  124. package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.zh-TW.json +1 -0
  125. package/dist/cdn/assets/portal-item-type/t9n/messages.ar.json +1 -1
  126. package/dist/cdn/assets/portal-item-type/t9n/messages.bg.json +1 -1
  127. package/dist/cdn/assets/portal-item-type/t9n/messages.bs.json +1 -1
  128. package/dist/cdn/assets/portal-item-type/t9n/messages.ca.json +1 -1
  129. package/dist/cdn/assets/portal-item-type/t9n/messages.cs.json +1 -1
  130. package/dist/cdn/assets/portal-item-type/t9n/messages.da.json +1 -1
  131. package/dist/cdn/assets/portal-item-type/t9n/messages.de.json +1 -1
  132. package/dist/cdn/assets/portal-item-type/t9n/messages.el.json +1 -1
  133. package/dist/cdn/assets/portal-item-type/t9n/messages.es.json +1 -1
  134. package/dist/cdn/assets/portal-item-type/t9n/messages.et.json +1 -1
  135. package/dist/cdn/assets/portal-item-type/t9n/messages.fi.json +1 -1
  136. package/dist/cdn/assets/portal-item-type/t9n/messages.fr.json +1 -1
  137. package/dist/cdn/assets/portal-item-type/t9n/messages.he.json +1 -1
  138. package/dist/cdn/assets/portal-item-type/t9n/messages.hr.json +1 -1
  139. package/dist/cdn/assets/portal-item-type/t9n/messages.hu.json +1 -1
  140. package/dist/cdn/assets/portal-item-type/t9n/messages.id.json +1 -1
  141. package/dist/cdn/assets/portal-item-type/t9n/messages.it.json +1 -1
  142. package/dist/cdn/assets/portal-item-type/t9n/messages.ja.json +1 -1
  143. package/dist/cdn/assets/portal-item-type/t9n/messages.ko.json +1 -1
  144. package/dist/cdn/assets/portal-item-type/t9n/messages.lt.json +1 -1
  145. package/dist/cdn/assets/portal-item-type/t9n/messages.lv.json +1 -1
  146. package/dist/cdn/assets/portal-item-type/t9n/messages.nl.json +1 -1
  147. package/dist/cdn/assets/portal-item-type/t9n/messages.no.json +1 -1
  148. package/dist/cdn/assets/portal-item-type/t9n/messages.pl.json +1 -1
  149. package/dist/cdn/assets/portal-item-type/t9n/messages.pt-BR.json +1 -1
  150. package/dist/cdn/assets/portal-item-type/t9n/messages.pt-PT.json +1 -1
  151. package/dist/cdn/assets/portal-item-type/t9n/messages.ro.json +1 -1
  152. package/dist/cdn/assets/portal-item-type/t9n/messages.ru.json +1 -1
  153. package/dist/cdn/assets/portal-item-type/t9n/messages.sk.json +1 -1
  154. package/dist/cdn/assets/portal-item-type/t9n/messages.sl.json +1 -1
  155. package/dist/cdn/assets/portal-item-type/t9n/messages.sr.json +1 -1
  156. package/dist/cdn/assets/portal-item-type/t9n/messages.sv.json +1 -1
  157. package/dist/cdn/assets/portal-item-type/t9n/messages.th.json +1 -1
  158. package/dist/cdn/assets/portal-item-type/t9n/messages.tr.json +1 -1
  159. package/dist/cdn/assets/portal-item-type/t9n/messages.uk.json +1 -1
  160. package/dist/cdn/assets/portal-item-type/t9n/messages.vi.json +1 -1
  161. package/dist/cdn/assets/portal-item-type/t9n/messages.zh-CN.json +1 -1
  162. package/dist/cdn/assets/portal-item-type/t9n/messages.zh-HK.json +1 -1
  163. package/dist/cdn/assets/portal-item-type/t9n/messages.zh-TW.json +1 -1
  164. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ar.json +1 -1
  165. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.bg.json +1 -1
  166. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.bs.json +1 -1
  167. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ca.json +1 -1
  168. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.cs.json +1 -1
  169. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.da.json +1 -1
  170. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.de.json +1 -1
  171. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.el.json +1 -1
  172. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.en.json +1 -1
  173. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.es.json +1 -1
  174. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.et.json +1 -1
  175. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.fi.json +1 -1
  176. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.fr.json +1 -1
  177. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.he.json +1 -1
  178. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.hr.json +1 -1
  179. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.hu.json +1 -1
  180. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.id.json +1 -1
  181. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.it.json +1 -1
  182. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ja.json +1 -1
  183. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ko.json +1 -1
  184. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.lt.json +1 -1
  185. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.lv.json +1 -1
  186. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.nl.json +1 -1
  187. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.no.json +1 -1
  188. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pl.json +1 -1
  189. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pt-BR.json +1 -1
  190. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pt-PT.json +1 -1
  191. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ro.json +1 -1
  192. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ru.json +1 -1
  193. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sk.json +1 -1
  194. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sl.json +1 -1
  195. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sr.json +1 -1
  196. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sv.json +1 -1
  197. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.th.json +1 -1
  198. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.tr.json +1 -1
  199. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.uk.json +1 -1
  200. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.vi.json +1 -1
  201. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-CN.json +1 -1
  202. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-HK.json +1 -1
  203. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-TW.json +1 -1
  204. package/dist/cdn/index.js +1 -1
  205. package/dist/cdn/main.css +1 -1
  206. package/dist/chunks/fieldAddDelete.js +1 -1
  207. package/dist/chunks/functionalities.js +10 -0
  208. package/dist/chunks/groups.js +86 -0
  209. package/dist/chunks/item.js +124 -22
  210. package/dist/chunks/portal.js +48 -8
  211. package/dist/chunks/runtime.js +3 -3
  212. package/dist/chunks/user.js +4 -109
  213. package/dist/chunks/user2.js +113 -0
  214. package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +7 -0
  215. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +20 -6
  216. package/dist/components/arcgis-portal-ai-assistant/customElement.js +738 -124
  217. package/dist/components/arcgis-portal-ai-assistant/index.js +2 -1
  218. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +42 -0
  219. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +51 -0
  220. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.d.ts +1 -0
  221. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +6 -0
  222. package/dist/components/arcgis-portal-classification-config/customElement.js +44 -37
  223. package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
  224. package/dist/components/arcgis-portal-mentionable-text-area/customElement.d.ts +2 -1
  225. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +38 -41
  226. package/dist/components/arcgis-portal-mentionable-text-area/utils.d.ts +7 -0
  227. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.d.ts +3 -3
  228. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +131 -63
  229. package/dist/components/arcgis-portal-user-avatar/customElement.js +24 -27
  230. package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
  231. package/dist/docs/api.json +1 -1
  232. package/dist/docs/docs.json +1 -1
  233. package/dist/docs/vscode.html-custom-data.json +1 -1
  234. package/dist/docs/web-types.json +1 -1
  235. package/dist/index.d.ts +16 -0
  236. package/dist/loader.js +3 -2
  237. package/dist/types/lumina.d.ts +9 -1
  238. package/dist/types/preact.d.ts +10 -1
  239. package/dist/types/react.d.ts +11 -1
  240. package/dist/types/stencil.d.ts +9 -1
  241. package/package.json +12 -10
  242. package/dist/cdn/2UAWM45V.js +0 -2
  243. package/dist/cdn/4XGP5S32.js +0 -2
  244. package/dist/cdn/AMCZ4UZQ.js +0 -2
  245. package/dist/cdn/CVTNZK7F.js +0 -2
  246. package/dist/cdn/DAD7LUKA.js +0 -2
  247. package/dist/cdn/F5QGCGHF.js +0 -2
  248. package/dist/cdn/HGOHRPAD.js +0 -2
  249. package/dist/cdn/IZQBJ5VK.js +0 -2
  250. package/dist/cdn/JFG6QVNF.js +0 -2
  251. package/dist/cdn/LCWXNCUX.js +0 -396
  252. package/dist/cdn/NJMHL2Y7.js +0 -4
  253. package/dist/cdn/OGQ2PD7M.js +0 -2
  254. package/dist/cdn/S2PHM4WZ.js +0 -2
  255. package/dist/cdn/ZAHK6WQT.js +0 -138
  256. package/dist/chunks/item2.js +0 -128
  257. /package/dist/cdn/{3OPKWSWR.js → 34BMNP6G.js} +0 -0
  258. /package/dist/cdn/{JQKWT7SI.js → FPAFR5IL.js} +0 -0
  259. /package/dist/cdn/{N5K4DR3J.js → FPKINYFN.js} +0 -0
@@ -1,7 +1,8 @@
1
+ import "@esri/calcite-components/components/calcite-button";
1
2
  import "@arcgis/ai-components/components/arcgis-assistant";
2
3
  import "@esri/calcite-components/components/calcite-icon";
3
4
  import "../arcgis-portal-mentionable-text-area/index.js";
4
5
  import "../arcgis-portal-voice-input/index.js";
5
- import "@esri/calcite-components/components/calcite-button";
6
6
  import "@arcgis/ai-components/components/arcgis-assistant-agent";
7
+ import "../arcgis-portal-ai-assistant-interrupt/index.js";
7
8
  export * from "./customElement.js";
@@ -0,0 +1,42 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { ArcgisAssistant } from "@arcgis/ai-components/components/arcgis-assistant";
3
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
4
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
5
+
6
+ /** @internal */
7
+ export abstract class ArcgisPortalAiAssistantInterrupt extends LitElement {
8
+ /** @internal */
9
+ protected _messages: {
10
+ titleConfirm: string;
11
+ titleInput: string;
12
+ cancelButton: string;
13
+ confirmButton: string;
14
+ skipButton: string;
15
+ submitButton: string;
16
+ singleSelectLabel: string;
17
+ multiSelectLabel: string;
18
+ textInputLabel: string;
19
+ } & T9nMeta<{
20
+ titleConfirm: string;
21
+ titleInput: string;
22
+ cancelButton: string;
23
+ confirmButton: string;
24
+ skipButton: string;
25
+ submitButton: string;
26
+ singleSelectLabel: string;
27
+ multiSelectLabel: string;
28
+ textInputLabel: string;
29
+ }>;
30
+ accessor message: NonNullable<InterruptType["message"]>;
31
+ accessor options: InterruptType["options"];
32
+ accessor type: InterruptType["type"];
33
+ readonly arcgisCancel: import("@arcgis/lumina").TargetedEvent<this, void>;
34
+ readonly arcgisSubmit: import("@arcgis/lumina").TargetedEvent<this, string[] | boolean | string>;
35
+ readonly "@eventTypes": {
36
+ arcgisCancel: ArcgisPortalAiAssistantInterrupt["arcgisCancel"]["detail"];
37
+ arcgisSubmit: ArcgisPortalAiAssistantInterrupt["arcgisSubmit"]["detail"];
38
+ };
39
+ }
40
+
41
+ /** @internal */
42
+ export type InterruptType = NonNullable<ArcgisAssistant["interrupt"]>;
@@ -0,0 +1,51 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import { c as l } from "../../chunks/runtime.js";
3
+ import { css as o, html as n } from "lit";
4
+ import { LitElement as u, createEvent as a } from "@arcgis/lumina";
5
+ import m from "@esri/arcgis-html-sanitizer";
6
+ import { unsafeHTML as p } from "lit/directives/unsafe-html.js";
7
+ import { marked as r } from "marked";
8
+ import { u as g } from "../../chunks/useT9n.js";
9
+ import { a as d } from "../../chunks/functionalities.js";
10
+ const h = o`.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}// \`:where()\` to reset styles of common elements in the message content without increasing specificity .interrupt-message :where(p){margin:0}// \`:where()\` to reset styles of list elements and add consistent indentation for nested lists without increasing specificity .interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}`;
11
+ r.use({ gfm: !0, breaks: !0, async: !1 });
12
+ const f = new m();
13
+ class b extends u {
14
+ constructor() {
15
+ super(...arguments), this.#t = [], this._messages = g({ blocking: !0 }), this.arcgisCancel = a(), this.arcgisSubmit = a();
16
+ }
17
+ static {
18
+ this.properties = { type: 1, message: 1, options: 0 };
19
+ }
20
+ static {
21
+ this.styles = h;
22
+ }
23
+ #t;
24
+ _renderMessageContent() {
25
+ const t = this.message ?? "", i = r.parse(t, { async: !1 });
26
+ return f.sanitize(i);
27
+ }
28
+ _renderInterruptInput() {
29
+ const { _messages: t, type: i, options: s } = this;
30
+ switch (i) {
31
+ case "single-select":
32
+ return n`<calcite-list class="interrupt-list" .label=${t.singleSelectLabel} selection-mode=single-persist @calciteListChange=${(e) => this.#t = e.target.selectedItems[0]?.value}>${s?.map((e) => n`<calcite-list-item .label=${e} .value=${e}></calcite-list-item>`)}</calcite-list>`;
33
+ case "multi-select":
34
+ return n`<calcite-list class="interrupt-list" .label=${t.multiSelectLabel} selection-mode=multiple @calciteListChange=${(e) => this.#t = e.target.selectedItems.map((c) => c.value)}>${s?.map((e) => n`<calcite-list-item .label=${e} .value=${e}></calcite-list-item>`)}</calcite-list>`;
35
+ case "text-input":
36
+ return n`<calcite-input class="interrupt-input" .label=${t.textInputLabel} @calciteInputInput=${(e) => this.#t = e.target.value}></calcite-input>`;
37
+ case "boolean-choice":
38
+ return null;
39
+ default:
40
+ return d(i);
41
+ }
42
+ }
43
+ render() {
44
+ const { _messages: t, type: i } = this, s = i === "boolean-choice";
45
+ return n`<div class="interrupt-container"><calcite-notice open kind=neutral width=full><div slot=title>${s ? t.titleConfirm : t.titleInput}</div><div slot=message class="interrupt-message">${p(this._renderMessageContent())}</div></calcite-notice>${this._renderInterruptInput()}<div class="interrupt-actions"><calcite-button appearance=outline @click=${() => this.arcgisCancel.emit()}>${s ? t.cancelButton : t.skipButton}</calcite-button><calcite-button appearance=solid @click=${() => this.arcgisSubmit.emit(i === "boolean-choice" ? !0 : this.#t)}>${s ? t.confirmButton : t.submitButton}</calcite-button></div></div>`;
46
+ }
47
+ }
48
+ l("arcgis-portal-ai-assistant-interrupt", b);
49
+ export {
50
+ b as ArcgisPortalAiAssistantInterrupt
51
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,6 @@
1
+ import "@esri/calcite-components/components/calcite-list";
2
+ import "@esri/calcite-components/components/calcite-list-item";
3
+ import "@esri/calcite-components/components/calcite-input";
4
+ import "@esri/calcite-components/components/calcite-notice";
5
+ import "@esri/calcite-components/components/calcite-button";
6
+ export * from "./customElement.js";
@@ -1,17 +1,17 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as g } from "../../chunks/runtime.js";
3
- import { LitElement as b, nothing as C } from "@arcgis/lumina";
4
- import { css as v, html as n } from "lit";
5
- import { Task as E, TaskStatus as y } from "@lit/task";
6
- import { createRef as I, ref as x } from "lit/directives/ref.js";
2
+ import { c as C } from "../../chunks/runtime.js";
3
+ import { LitElement as v, nothing as E } from "@arcgis/lumina";
4
+ import { css as y, html as n } from "lit";
5
+ import { Task as I, TaskStatus as x } from "@lit/task";
6
+ import { createRef as f, ref as u } from "lit/directives/ref.js";
7
7
  import { usePropertyChange as w } from "@arcgis/lumina/controllers";
8
8
  import { getClosestElement as R } from "@arcgis/toolkit/dom";
9
- import { u as $, c as S } from "../../chunks/loadClassificationData.js";
10
- import { createArcadeExecutor as P } from "@arcgis/core/arcade.js";
9
+ import { u as $, c as P } from "../../chunks/loadClassificationData.js";
10
+ import { createArcadeExecutor as S } from "@arcgis/core/arcade.js";
11
11
  import { u as V } from "../../chunks/useT9n.js";
12
- import { d as f, a as d, g as O, r as u, c as A, b as F } from "../../chunks/common.js";
13
- import { watch as _ } from "@arcgis/core/core/reactiveUtils.js";
14
- import { r as D } from "../../chunks/requests.js";
12
+ import { d as m, a as d, g as O, r as p, c as _, b as A } from "../../chunks/common.js";
13
+ import { watch as D } from "@arcgis/core/core/reactiveUtils.js";
14
+ import { r as F } from "../../chunks/requests.js";
15
15
  async function T({
16
16
  portalClassificationSchema: a,
17
17
  itemClassification: t
@@ -81,21 +81,21 @@ async function H(a, t, i) {
81
81
  a
82
82
  ) : null;
83
83
  }
84
- const m = async (a, t) => {
84
+ const g = async (a, t) => {
85
85
  const i = a?.bannerExpression;
86
86
  return i?.length ? await h(
87
87
  i,
88
88
  a,
89
89
  t
90
- ) : U(a, t);
91
- }, U = (a, t) => {
90
+ ) : W(a, t);
91
+ }, W = (a, t) => {
92
92
  const i = Object.entries(a.attributes).sort(
93
93
  ([, o], [, l]) => (o?.bannerOrder ?? 0) - (l?.bannerOrder ?? 0)
94
94
  ), e = [], s = [];
95
95
  return i.forEach(([o, l]) => {
96
96
  const c = t?.[o];
97
97
  c && l.bannerOrder && (e.push(
98
- L({
98
+ U({
99
99
  elementType: l.uiElement ?? "",
100
100
  selectionDisplayLabel: l.bannerLabel ?? "",
101
101
  labelDelimiter: l.labelDelimiter ?? "",
@@ -108,7 +108,7 @@ const m = async (a, t) => {
108
108
  // avoiding to have delimiter at the start
109
109
  ""
110
110
  ) : "";
111
- }, L = ({
111
+ }, U = ({
112
112
  elementType: a,
113
113
  selectionDisplayLabel: t,
114
114
  labelDelimiter: i,
@@ -124,10 +124,10 @@ async function h(a, t, i, e = "") {
124
124
  valueJsonString: JSON.stringify(i),
125
125
  attributeId: e
126
126
  };
127
- return (await B(a)).execute(s);
127
+ return (await L(a)).execute(s);
128
128
  }
129
- async function B(a) {
130
- return await P(a, {
129
+ async function L(a) {
130
+ return await S(a, {
131
131
  variables: [
132
132
  {
133
133
  name: "schemaJsonString",
@@ -144,17 +144,17 @@ async function B(a) {
144
144
  ]
145
145
  });
146
146
  }
147
- const J = v`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`;
148
- class W extends b {
147
+ const B = y`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`;
148
+ class J extends v {
149
149
  constructor() {
150
- super(), this.classificationModel = $(this), this.messages = V(), this.formMainContentRef = I(), this._classificationDataTask = S(this), this._formCreationTask = new E(this, {
150
+ super(), this.classificationModel = $(this), this.messages = V(), this.formMainContentRef = f(), this.bannerRef = f(), this._classificationDataTask = P(this), this._formCreationTask = new I(this, {
151
151
  task: async () => {
152
152
  if (await this._classificationDataTask.taskComplete, !this.portalClassificationSchema || !this.portalItem)
153
153
  throw new Error("Portal item and classification schema are required to render the form");
154
154
  const t = this.portalItem.clone();
155
155
  if (await t.load(), !this.primaryAttribute)
156
156
  throw new Error("primaryAttribute is required but was undefined.");
157
- this.existingClassification = !!t.classification, t.classification = f(t.classification, this.primaryAttribute, this.portalClassificationSchema), t.classification && (t.classification.banner = await m(this.portalClassificationSchema, t.classification)), this.pendingPortalItem = t, this._itemClassificationWatchHandle && (this._itemClassificationWatchHandle.remove(), this.portalItem.removeHandles("arcgis-classification-config"), this._itemClassificationWatchHandle = void 0), this._itemClassificationWatchHandle = _(() => this.portalItem.classification, (i) => {
157
+ this.existingClassification = !!t.classification, t.classification = m(t.classification, this.primaryAttribute, this.portalClassificationSchema), t.classification && (t.classification.banner = await g(this.portalClassificationSchema, t.classification)), this.pendingPortalItem = t, this.cleanupItemClassificationWatchHandle(), this._itemClassificationWatchHandle = D(() => this.portalItem.classification, (i) => {
158
158
  if (this.pendingPortalItem) {
159
159
  const e = this.pendingPortalItem.clone();
160
160
  e.load().then(() => {
@@ -163,7 +163,7 @@ class W extends b {
163
163
  console.error(s);
164
164
  });
165
165
  }
166
- }), this.portalItem.addHandles(this._itemClassificationWatchHandle, "arcgis-classification-config"), await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults), this.existingClassification && this.validateForm();
166
+ }), this._itemClassificationWatchPortalItem = this.portalItem, this._itemClassificationWatchPortalItem.addHandles(this._itemClassificationWatchHandle, "arcgis-classification-config"), await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults), this.existingClassification && this.validateForm();
167
167
  },
168
168
  args: () => [this.portalItem, this.portalClassificationSchema]
169
169
  }), this.getFormDisplayOrder = (t) => this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder ?? 0, this.addEditInfoAttributes = () => {
@@ -177,7 +177,7 @@ class W extends b {
177
177
  const i = t.classification;
178
178
  if (this.selectedFavoriteClassificationName = t.name, this.pendingPortalItem) {
179
179
  const e = this.pendingPortalItem.clone();
180
- if (await e.load(), e.classification = u(this.portalClassificationSchema, i), !this.portalClassificationSchema)
180
+ if (await e.load(), e.classification = p(this.portalClassificationSchema, i), !this.portalClassificationSchema)
181
181
  return;
182
182
  await this.evaluateAttributeExpressions(this.portalClassificationSchema, e), e.classification = d(e.classification, this.attributeExpressionResults), this.pendingPortalItem = e;
183
183
  }
@@ -187,17 +187,17 @@ class W extends b {
187
187
  this.properties = { existingClassification: 16, portalClassificationSchema: 16, primaryAttribute: 16, attributeExpressionResults: 16, formValidationErrors: 16, itemClassification: 16, pendingPortalItem: 16, selectedCategory: 16, remoteValidationErrors: 16, canUserConfigureClassification: 16, favoriteClassifications: 16, selectedFavoriteClassificationName: 16, isRequiredErrors: 16, portalItem: 0, status: 35, values: [1, { type: Object }], valid: 7, autoDestroyDisabled: 5 };
188
188
  }
189
189
  static {
190
- this.styles = J;
190
+ this.styles = B;
191
191
  }
192
192
  async destroy() {
193
- await this.manager.destroy();
193
+ this.cleanupItemClassificationWatchHandle(), await this.destroyManagedChildren(), await this.manager.destroy();
194
194
  }
195
195
  async resetForm() {
196
196
  if (this.existingClassification)
197
197
  this.pendingPortalItem = this.portalItem?.clone(), this.portalClassificationSchema && this.pendingPortalItem && (await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults), this.validateForm());
198
198
  else if (this.portalItem && this.primaryAttribute && this.portalClassificationSchema) {
199
199
  const t = this.portalItem.clone();
200
- await t.load(), this.pendingPortalItem = this.portalItem?.clone(), this.pendingPortalItem.classification = f(t.classification, this.primaryAttribute, this.portalClassificationSchema), this.portalClassificationSchema && this.pendingPortalItem && (await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults));
200
+ await t.load(), this.pendingPortalItem = this.portalItem?.clone(), this.pendingPortalItem.classification = m(t.classification, this.primaryAttribute, this.portalClassificationSchema), this.portalClassificationSchema && this.pendingPortalItem && (await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults));
201
201
  }
202
202
  }
203
203
  async validateForm() {
@@ -205,8 +205,8 @@ class W extends b {
205
205
  }
206
206
  async load() {
207
207
  try {
208
- await A(this.portalItem) || (this.canUserConfigureClassification = !1);
209
- const t = await D(this.portalItem);
208
+ await _(this.portalItem) || (this.canUserConfigureClassification = !1);
209
+ const t = await F(this.portalItem);
210
210
  if (t) {
211
211
  const { result: i, error: e } = t;
212
212
  if (e && e.details.raw.messageCode !== "COM_1177") {
@@ -236,8 +236,8 @@ class W extends b {
236
236
  const i = this.pendingPortalItem.clone();
237
237
  await i.load(), Object.entries(t ?? {}).forEach(([e, s]) => {
238
238
  if (e === this.primaryAttribute) {
239
- let r = F(s, i.classification, this.primaryAttribute);
240
- r = u(this.portalClassificationSchema, r), i.classification = r;
239
+ let r = A(s, i.classification, this.primaryAttribute);
240
+ r = p(this.portalClassificationSchema, r), i.classification = r;
241
241
  } else {
242
242
  const r = new Map(Object.entries(i.classification ?? {}));
243
243
  if (s === void 0 || s === "" || Array.isArray(s) && s.length === 0)
@@ -248,7 +248,7 @@ class W extends b {
248
248
  }
249
249
  i.classification = Object.fromEntries(r);
250
250
  }
251
- }), i.classification && !i.classification.fgi && delete i.classification.fgiOptions, await this.evaluateAttributeExpressions(this.portalClassificationSchema, i), i.classification = d(i.classification, this.attributeExpressionResults), i.classification && (i.classification.banner = await m(this.portalClassificationSchema, i.classification)), this.pendingPortalItem = i, this.existingClassification && this.validateForm(), t && "classification" in t && this.updateIsRequiredErrors();
251
+ }), i.classification && !i.classification.fgi && delete i.classification.fgiOptions, await this.evaluateAttributeExpressions(this.portalClassificationSchema, i), i.classification = d(i.classification, this.attributeExpressionResults), i.classification && (i.classification.banner = await g(this.portalClassificationSchema, i.classification)), this.pendingPortalItem = i, this.existingClassification && this.validateForm(), t && "classification" in t && this.updateIsRequiredErrors();
252
252
  }
253
253
  handleCategorySelectChange(t) {
254
254
  this.selectedCategory = t.target.selectedItems[0].value;
@@ -265,8 +265,8 @@ class W extends b {
265
265
  itemClassification: i.classification
266
266
  });
267
267
  Object.keys(t.attributes).forEach((o) => {
268
- const l = e[o]?.enabled ?? !0, c = s[o]?.valueExpressionResult, p = r[o]?.attributeValidationResult;
269
- this.attributeExpressionResults.set(o, { enabled: l, valueExpressionResult: c, attributeValidationResult: p });
268
+ const l = e[o]?.enabled ?? !0, c = s[o]?.valueExpressionResult, b = r[o]?.attributeValidationResult;
269
+ this.attributeExpressionResults.set(o, { enabled: l, valueExpressionResult: c, attributeValidationResult: b });
270
270
  });
271
271
  }
272
272
  updateIsRequiredErrors() {
@@ -304,6 +304,13 @@ class W extends b {
304
304
  );
305
305
  this.remoteValidationErrors = t;
306
306
  }
307
+ cleanupItemClassificationWatchHandle() {
308
+ this._itemClassificationWatchHandle?.remove(), this._itemClassificationWatchHandle = void 0, this._itemClassificationWatchPortalItem?.removeHandles("arcgis-classification-config"), this._itemClassificationWatchPortalItem = void 0;
309
+ }
310
+ async destroyManagedChildren() {
311
+ const t = this.bannerRef.value;
312
+ !t?.autoDestroyDisabled || t.manager?.destroyed || await t.destroy();
313
+ }
307
314
  async handleFormSubmit(t) {
308
315
  this.validateForm(), this.updateIsRequiredErrors(), this.formMainContentRef.value?.scrollIntoView();
309
316
  }
@@ -362,11 +369,11 @@ class W extends b {
362
369
  return this.portalItem ? this._classificationDataTask.render({
363
370
  pending: () => n`<calcite-loader .label=${this.messages.loading ?? "loading"}></calcite-loader>`,
364
371
  error: () => this.renderNotice(this.messages.anerroroccurred ?? "An error has occurred.", "danger"),
365
- complete: () => this.portalItem ? this.canUserConfigureClassification ? this.portalItem.portal.hasClassificationSchema ? n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview ?? "documentbannerpreview" ?? C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview ?? "documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status === y.COMPLETE && n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem ?? this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled}></arcgis-portal-classification-banner>` || ""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length && n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>` || ""}<div class="form-section__main-content" ${x(this.formMainContentRef)}>${this.renderForm()}</div></div>` : this.renderNotice(this.messages.missingclassificationschema ?? "Portal is missing classification schema.") : this.renderNotice(this.messages.userconfigurepermissionrequired ?? "User configuration permission is required.") : this.renderNotice(this.messages.portalitemrequired ?? "Portal item is required.")
372
+ complete: () => this.portalItem ? this.canUserConfigureClassification ? this.portalItem.portal.hasClassificationSchema ? n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview ?? "documentbannerpreview" ?? E}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview ?? "documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status === x.COMPLETE && n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem ?? this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled} ${u(this.bannerRef)}></arcgis-portal-classification-banner>` || ""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length && n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>` || ""}<div class="form-section__main-content" ${u(this.formMainContentRef)}>${this.renderForm()}</div></div>` : this.renderNotice(this.messages.missingclassificationschema ?? "Portal is missing classification schema.") : this.renderNotice(this.messages.userconfigurepermissionrequired ?? "User configuration permission is required.") : this.renderNotice(this.messages.portalitemrequired ?? "Portal item is required.")
366
373
  }) : this.renderNotice(this.messages.portalitemrequired ?? "Portal item is required.");
367
374
  }
368
375
  }
369
- g("arcgis-portal-classification-config", W);
376
+ C("arcgis-portal-classification-config", J);
370
377
  export {
371
- W as ArcgisPortalClassificationConfig
378
+ J as ArcgisPortalClassificationConfig
372
379
  };
@@ -3,7 +3,7 @@ import { g as A, c as x } from "../../chunks/runtime.js";
3
3
  import { css as C, html as y } from "lit";
4
4
  import { LitElement as T, nothing as f, safeClassMap as j } from "@arcgis/lumina";
5
5
  import { u as G } from "../../chunks/useT9n.js";
6
- import { u as v, h as w, j as E, k as L, m as W, n as $, o as R, p as B } from "../../chunks/item2.js";
6
+ import { u as v, h as w, j as E, k as L, m as W, n as $, o as R, p as B } from "../../chunks/item.js";
7
7
  const H = C`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`, V = (t) => typeof t?.role == "string" && t?.role ? t?.role : t?.roleId ?? t?.sourceJSON?.id;
8
8
  function S(t) {
9
9
  return ["org_admin", "account_admin"].includes(V(t)) && !t?.roleId;
@@ -3,6 +3,7 @@ import type Portal from "@arcgis/core/portal/Portal.js";
3
3
  import type PortalUser from "@arcgis/core/portal/PortalUser.js";
4
4
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
5
5
  import type { MentionableEntity } from "./types.js";
6
+ import type { MentionableStarter } from "./utils.js";
6
7
  import type { Popover as Popover } from "@esri/calcite-components/components/calcite-popover";
7
8
  import type { Input as Input } from "@esri/calcite-components/components/calcite-input";
8
9
 
@@ -37,7 +38,7 @@ export abstract class ArcgisPortalMentionableTextArea extends LitElement {
37
38
  */
38
39
  accessor scale: Input["scale"] | undefined;
39
40
  /** Character(s) that trigger the mention popover (e.g., "@", "#", "$") */
40
- accessor starters: string[] | readonly string[];
41
+ accessor starters: MentionableStarter[] | readonly MentionableStarter[];
41
42
  accessor user: PortalUser;
42
43
  /** Current text content */
43
44
  accessor value: string | undefined;
@@ -5,16 +5,16 @@ import { html as u, css as k } from "lit";
5
5
  import { ref as M, createRef as E } from "lit/directives/ref.js";
6
6
  import { makeGenericController as P } from "@arcgis/lumina/controllers";
7
7
  import { debounce as R } from "@arcgis/toolkit/function";
8
- import { s as L } from "../../chunks/item.js";
9
- import { a as w, b as U } from "../../chunks/user.js";
10
- import { keyed as D } from "lit/directives/keyed.js";
11
- const v = ["@", "#", "$"], q = 400;
12
- function O(r, e) {
8
+ import { q as L, s as U } from "../../chunks/groups.js";
9
+ import { a as w, b as D } from "../../chunks/user2.js";
10
+ import { keyed as q } from "lit/directives/keyed.js";
11
+ const v = ["@", "#", "$"], O = 400;
12
+ function _(i, e) {
13
13
  let s = null;
14
14
  for (const n of e) {
15
- const i = n.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&"), l = new RegExp(`${i}"([^"\\n]*)"?$`, "u"), t = r.match(l);
15
+ const r = n.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&"), l = new RegExp(`${r}"([^"\\n]*)"?$`, "u"), t = i.match(l);
16
16
  if (t) {
17
- const o = t[0], h = r.length - o.length, m = t[1] ?? "";
17
+ const o = t[0], h = i.length - o.length, m = t[1] ?? "";
18
18
  (!s || h > s.startIndex) && (s = {
19
19
  starter: n,
20
20
  mentionText: o,
@@ -22,9 +22,9 @@ function O(r, e) {
22
22
  startIndex: h
23
23
  });
24
24
  }
25
- const a = new RegExp(`${i}[\\p{L}\\p{N}_-]+$`, "u"), c = r.match(a);
25
+ const a = new RegExp(`${r}[\\p{L}\\p{N}_-]+$`, "u"), c = i.match(a);
26
26
  if (c) {
27
- const o = c[0], h = r.length - o.length, m = o.slice(n.length);
27
+ const o = c[0], h = i.length - o.length, m = o.slice(n.length);
28
28
  (!s || h > s.startIndex) && (s = {
29
29
  starter: n,
30
30
  mentionText: o,
@@ -35,26 +35,23 @@ function O(r, e) {
35
35
  }
36
36
  return s;
37
37
  }
38
- async function _(r, e = {}) {
39
- return await r.queryGroups(e);
40
- }
41
- const y = (r) => v.includes(r) ? r : "@", F = P((r) => {
38
+ const y = (i) => v.includes(i) ? i : "@", F = P((i) => {
42
39
  let e = [];
43
40
  const s = async (a) => await w({
44
- requester: async () => await L(r.portal, a, { num: 3 }),
41
+ requester: async () => await U(i.portal, a, { num: 3 }),
45
42
  key: "items",
46
43
  id: a
47
44
  }), n = async (a) => await w({
48
- requester: async () => await _(r.portal, { query: `title:${a}`, num: 3 }),
45
+ requester: async () => await L(i.portal, { query: `title:${a}`, num: 3 }),
49
46
  key: "groups",
50
47
  id: a
51
- }), i = R(async (a, c) => {
52
- r.isFetchingEntities = !0;
48
+ }), r = R(async (a, c) => {
49
+ i.isFetchingEntities = !0;
53
50
  const o = a.toLowerCase();
54
51
  switch (y(c)) {
55
52
  case "@":
56
53
  const p = 10;
57
- r.filteredItemsInfo = {
54
+ i.filteredItemsInfo = {
58
55
  type: "user",
59
56
  items: e.filter(
60
57
  (f) => f.username?.toLowerCase().includes(o) || f.fullName?.toLowerCase().includes(o)
@@ -63,23 +60,23 @@ const y = (r) => v.includes(r) ? r : "@", F = P((r) => {
63
60
  break;
64
61
  case "#":
65
62
  const { result: d } = await s(o);
66
- r.filteredItemsInfo = { type: "item", items: d?.results ?? [] };
63
+ i.filteredItemsInfo = { type: "item", items: d?.results ?? [] };
67
64
  break;
68
65
  case "$":
69
66
  const { results: I } = await n(o);
70
- r.filteredItemsInfo = { type: "group", items: I };
67
+ i.filteredItemsInfo = { type: "group", items: I };
71
68
  break;
72
69
  }
73
- (r.filteredItemsInfo?.items?.length ?? 0) === 0 && await r.closePopover(), r.isFetchingEntities = !1;
74
- }, q);
70
+ (i.filteredItemsInfo?.items?.length ?? 0) === 0 && await i.closePopover(), i.isFetchingEntities = !1;
71
+ }, O);
75
72
  return { fetchUsers: async () => {
76
73
  try {
77
- const { users: a } = await U(r.portal);
74
+ const { users: a } = await D(i.portal);
78
75
  e = a ?? [];
79
76
  } catch (a) {
80
77
  e = [], console.error("error fetching org users:", a);
81
78
  }
82
- }, filterItems: i, getItemText: (a, c) => {
79
+ }, filterItems: r, getItemText: (a, c) => {
83
80
  let o = "";
84
81
  switch (y(c)) {
85
82
  case "@":
@@ -94,11 +91,11 @@ const y = (r) => v.includes(r) ? r : "@", F = P((r) => {
94
91
  }
95
92
  return o.trim();
96
93
  } };
97
- }), g = ({ id: r, label: e, selected: s, description: n, contentStart: i, onSelect: l }) => D(r, u`<calcite-list-item class=${T({ selected: s })} .label=${e} .description=${n} .selected=${s} @pointerdown=${async (t) => {
94
+ }), g = ({ id: i, label: e, selected: s, description: n, contentStart: r, onSelect: l }) => q(i, u`<calcite-list-item class=${T({ selected: s })} .label=${e} .description=${n} .selected=${s} @pointerdown=${async (t) => {
98
95
  t.preventDefault(), t.stopPropagation(), await l();
99
96
  }} ${M((t) => {
100
97
  s && t && t.scrollIntoView({ block: "nearest", behavior: "smooth" });
101
- })}>${i}</calcite-list-item>`), N = k`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`;
98
+ })}>${r}</calcite-list-item>`), N = k`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`;
102
99
  class Q extends S {
103
100
  constructor() {
104
101
  super(...arguments), this.calciteTextAreaRef = E(), this.mentionableEntityController = F(this), this.handleInput = (e) => {
@@ -130,30 +127,30 @@ class Q extends S {
130
127
  }, this.bubbleNewValueChange = (e) => {
131
128
  this.arcgisUserMentionableTextAreaChange.emit(e), this.arcgisMentionableTextAreaChange.emit(e);
132
129
  }, this.checkForMention = (e, s) => {
133
- const n = e.substring(0, s), i = O(n, this.starters ?? v);
134
- if (i) {
135
- const { starter: l } = i;
136
- this.currentStarter = l, this.filterMentionItems(i), this.popoverOpen = !0;
130
+ const n = e.substring(0, s), r = _(n, this.starters ?? v);
131
+ if (r) {
132
+ const { starter: l } = r;
133
+ this.currentStarter = l, this.filterMentionItems(r), this.popoverOpen = !0;
137
134
  return;
138
135
  }
139
136
  this.handleClosePopover();
140
137
  }, this.filterMentionItems = (e) => {
141
- const { mentionText: s, query: n, starter: i, startIndex: l } = e;
138
+ const { mentionText: s, query: n, starter: r, startIndex: l } = e;
142
139
  this.currentMentionQuery = s, this.mentionStartPosition = l;
143
140
  const t = n.toLowerCase();
144
- this.mentionableEntityController.filterItems(t, i), this.selectedItemIndex = 0;
141
+ this.mentionableEntityController.filterItems(t, r), this.selectedItemIndex = 0;
145
142
  }, this.popoverOpen = !1, this.currentMentionQuery = "", this.mentionStartPosition = 0, this.selectedItemIndex = 0, this.currentStarter = null, this._value = "", this.filteredItemsInfo = null, this.isFetchingEntities = !1, this.popoverPlacement = "bottom-start", this.disabled = !1, this.scale = "m", this.rows = 3, this.starters = v, this.readOnly = !1, this.arcgisMentionableSelectedIndexChange = b(), this.arcgisMentionableTextAreaChange = b(), this.arcgisMentionableTextAreaKeyDown = b(), this.arcgisUserMentionableTextAreaChange = b(), this.arcgisUserMentionableTextAreaKeyDown = b(), this.renderItemInfo = () => {
146
143
  const { filteredItemsInfo: e, selectedItemIndex: s, portal: n } = this;
147
144
  if (!e)
148
145
  return null;
149
- const { items: i, type: l } = e;
146
+ const { items: r, type: l } = e;
150
147
  switch (l) {
151
148
  case "user":
152
- return i.map((t, a) => g({ id: t.id, label: `@${t.username}`, description: t.fullName, selected: a === s, contentStart: u`<arcgis-portal-user-avatar slot=content-start .user=${t} .portal=${n} scale=m></arcgis-portal-user-avatar>`, onSelect: async () => await this.selectItem(t) }));
149
+ return r.map((t, a) => g({ id: t.id, label: `@${t.username}`, description: t.fullName, selected: a === s, contentStart: u`<arcgis-portal-user-avatar slot=content-start .user=${t} .portal=${n} scale=m></arcgis-portal-user-avatar>`, onSelect: async () => await this.selectItem(t) }));
153
150
  case "item":
154
- return i.map((t, a) => g({ id: t.id ?? `item-${a}`, label: `#${t.title}`, description: t.id ?? void 0, selected: a === s, onSelect: async () => await this.selectItem(t), contentStart: u`<calcite-avatar slot=content-start .fullName=${t.title ?? void 0} .thumbnail=${t.thumbnailUrl ?? void 0} scale=m></calcite-avatar>` }));
151
+ return r.map((t, a) => g({ id: t.id ?? `item-${a}`, label: `#${t.title}`, description: t.id ?? void 0, selected: a === s, onSelect: async () => await this.selectItem(t), contentStart: u`<calcite-avatar slot=content-start .fullName=${t.title ?? void 0} .thumbnail=${t.thumbnailUrl ?? void 0} scale=m></calcite-avatar>` }));
155
152
  case "group":
156
- return i.map((t, a) => g({ id: t.id ?? `group-${a}`, label: `${t.title}`, description: t.id ?? void 0, selected: a === s, onSelect: async () => await this.selectItem(t), contentStart: u`<calcite-avatar slot=content-start .fullName=${t.title ?? void 0} .thumbnail=${t.thumbnailUrl ?? void 0} scale=m></calcite-avatar>` }));
153
+ return r.map((t, a) => g({ id: t.id ?? `group-${a}`, label: `${t.title}`, description: t.id ?? void 0, selected: a === s, onSelect: async () => await this.selectItem(t), contentStart: u`<calcite-avatar slot=content-start .fullName=${t.title ?? void 0} .thumbnail=${t.thumbnailUrl ?? void 0} scale=m></calcite-avatar>` }));
157
154
  }
158
155
  };
159
156
  }
@@ -173,12 +170,12 @@ class Q extends S {
173
170
  await this.calciteTextAreaRef.value?.setFocus();
174
171
  }
175
172
  async selectItem(e) {
176
- const { currentStarter: s, _value: n, mentionStartPosition: i, currentMentionQuery: l, handleClosePopover: t, calciteTextAreaRef: a, nativeTextAreaRef: c, bubbleNewValueChange: o } = this;
173
+ const { currentStarter: s, _value: n, mentionStartPosition: r, currentMentionQuery: l, handleClosePopover: t, calciteTextAreaRef: a, nativeTextAreaRef: c, bubbleNewValueChange: o } = this;
177
174
  if (!e || !s)
178
175
  return;
179
- const m = this.mentionableEntityController.getItemText(e, s).replaceAll('"', "").trim(), p = /\s/u.test(m) ? `${s}"${m}"` : `${s}${m}`, d = (n ?? "").substring(0, i), I = (n ?? "").substring(i + l.length), f = `${d}${p} ${I}`;
176
+ const m = this.mentionableEntityController.getItemText(e, s).replaceAll('"', "").trim(), p = /\s/u.test(m) ? `${s}"${m}"` : `${s}${m}`, d = (n ?? "").substring(0, r), I = (n ?? "").substring(r + l.length), f = `${d}${p} ${I}`;
180
177
  this._value = f, o(this._value);
181
- const x = i + p.length + 1;
178
+ const x = r + p.length + 1;
182
179
  t(), await this.updateComplete, a.value?.setFocus(), c && (c.selectionEnd = x);
183
180
  }
184
181
  willUpdate(e) {
@@ -191,8 +188,8 @@ class Q extends S {
191
188
  }), this.mentionableEntityController.fetchUsers();
192
189
  }
193
190
  render() {
194
- const { popoverPlacement: e, scale: s, _value: n, maxLength: i, rows: l, placeholder: t, readOnly: a, popoverOpen: c, closePopover: o, handleInput: h, handleKeyDown: m, disabled: p, isFetchingEntities: d, filteredItemsInfo: I, renderItemInfo: f, popoverListLabel: x } = this, $ = this.calciteTextAreaRef.value, C = I?.items ?? [];
195
- return u`<calcite-text-area .placeholder=${t} .value=${n} .maxLength=${i} .rows=${l} .scale=${s} .readOnly=${a} .disabled=${p} @blur=${o} @calciteTextAreaInput=${h} @keydown=${m} ${M(this.calciteTextAreaRef)}></calcite-text-area>${$ && u`<calcite-popover .open=${c} .placement=${e} class="mention-popover" .label=${x} .referenceElement=${$} trigger-disabled pointer-disabled focus-trap-disabled><div class=${T({ "mentionable-list": !0, "mentionable-list--loading": d })}>${d && u`<calcite-scrim .loading=${d}></calcite-scrim>` || ""}${C.length > 0 && u`<calcite-list .label=${x}>${f()}</calcite-list>` || ""}</div></calcite-popover>` || ""}`;
191
+ const { popoverPlacement: e, scale: s, _value: n, maxLength: r, rows: l, placeholder: t, readOnly: a, popoverOpen: c, closePopover: o, handleInput: h, handleKeyDown: m, disabled: p, isFetchingEntities: d, filteredItemsInfo: I, renderItemInfo: f, popoverListLabel: x } = this, $ = this.calciteTextAreaRef.value, C = I?.items ?? [];
192
+ return u`<calcite-text-area .placeholder=${t} .value=${n} .maxLength=${r} .rows=${l} .scale=${s} .readOnly=${a} .disabled=${p} @blur=${o} @calciteTextAreaInput=${h} @keydown=${m} ${M(this.calciteTextAreaRef)}></calcite-text-area>${$ && u`<calcite-popover .open=${c} .placement=${e} class="mention-popover" .label=${x} .referenceElement=${$} trigger-disabled pointer-disabled focus-trap-disabled><div class=${T({ "mentionable-list": !0, "mentionable-list--loading": d })}>${d && u`<calcite-scrim .loading=${d}></calcite-scrim>` || ""}${C.length > 0 && u`<calcite-list .label=${x}>${f()}</calcite-list>` || ""}</div></calcite-popover>` || ""}`;
196
193
  }
197
194
  }
198
195
  A("arcgis-portal-mentionable-text-area", Q);
@@ -0,0 +1,7 @@
1
+ export type MentionableStarter = (typeof MentionableStarters)[number];
2
+
3
+ export const MentionableStarters: readonly [
4
+ "@",
5
+ "#",
6
+ "$"
7
+ ];
@@ -16,10 +16,8 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
16
16
  export abstract class ArcgisPortalReplacementItemRedirect extends LitElement {
17
17
  /** The id of a deprecated/retired item to be checked for a replacement */
18
18
  accessor itemId: string;
19
- /** The portal instance */
20
- accessor portal: Portal;
21
19
  /** @internal */
22
- protected t9n: {
20
+ protected messages: {
23
21
  replacementAvailable: string;
24
22
  replacementUnavailable: string;
25
23
  redirectToReplacement: string;
@@ -46,6 +44,8 @@ export abstract class ArcgisPortalReplacementItemRedirect extends LitElement {
46
44
  retiredReplacementUnavailable: string;
47
45
  moreDetails: string;
48
46
  }>;
47
+ /** The portal instance */
48
+ accessor portal: Portal;
49
49
  /** The user. Defaults to `portal.user` if omitted */
50
50
  accessor user: PortalUser | null | undefined;
51
51
  /** Set focus on the component */