@arcgis/portal-components 6.0.0-next.2 → 6.0.0-next.21

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 (308) hide show
  1. package/dist/cdn/{MKSFNVXL.js → 22TDAUX4.js} +1 -1
  2. package/dist/cdn/234TH32X.js +106 -0
  3. package/dist/cdn/2D3FQXJ4.js +2 -0
  4. package/dist/cdn/{BKD7JSV2.js → 2DXO6FVX.js} +1 -1
  5. package/dist/cdn/{TWCJJCPC.js → 2XJX2JUO.js} +1 -1
  6. package/dist/cdn/{SGDDFWCJ.js → 3EQGUCO4.js} +1 -1
  7. package/dist/cdn/{OR6T5SB3.js → 3J3ISO3E.js} +1 -1
  8. package/dist/cdn/3RTST3I6.js +2 -0
  9. package/dist/cdn/3XH3JHOI.js +2 -0
  10. package/dist/cdn/4ONCJSSP.js +2 -0
  11. package/dist/cdn/4QYVBXZT.js +2 -0
  12. package/dist/cdn/{K75JTQPW.js → 4VLEUN7I.js} +1 -1
  13. package/dist/cdn/4WQA7UAJ.js +2 -0
  14. package/dist/cdn/5OWIWCEQ.js +2 -0
  15. package/dist/cdn/{7ZWYUHGK.js → 5R4JJWGB.js} +1 -1
  16. package/dist/cdn/63HYFDRU.js +2 -0
  17. package/dist/cdn/6MATPHXT.js +79 -0
  18. package/dist/cdn/7IP3RVPH.js +2 -0
  19. package/dist/cdn/7ISSDO2T.js +2 -0
  20. package/dist/cdn/AKTIIRJQ.js +2 -0
  21. package/dist/cdn/ASID6YW7.js +135 -0
  22. package/dist/cdn/B3HV5JVN.js +2 -0
  23. package/dist/cdn/B6666VUQ.js +2 -0
  24. package/dist/cdn/BOO7GG5L.js +2 -0
  25. package/dist/cdn/CZ4FC4GM.js +2 -0
  26. package/dist/cdn/D3LZFIHV.js +2 -0
  27. package/dist/cdn/{NWVLGU2C.js → D3Q72PPN.js} +1 -1
  28. package/dist/cdn/DABNV2OO.js +2 -0
  29. package/dist/cdn/DELNTRCT.js +2 -0
  30. package/dist/cdn/DOCNBKQZ.js +2 -0
  31. package/dist/cdn/EP7NWEC5.js +2 -0
  32. package/dist/cdn/EQRBP6H6.js +66 -0
  33. package/dist/cdn/{ABORO35R.js → ESKKH4DE.js} +1 -1
  34. package/dist/cdn/EUQQZIRW.js +2 -0
  35. package/dist/cdn/F2HT5PVQ.js +2 -0
  36. package/dist/cdn/FE3O23SE.js +2 -0
  37. package/dist/cdn/FGRMURKX.js +2 -0
  38. package/dist/cdn/FN2QMDEW.js +2 -0
  39. package/dist/cdn/{I6IRHXWR.js → FYVATGMR.js} +1 -1
  40. package/dist/cdn/{RHCRPJWS.js → G3WDR53S.js} +1 -1
  41. package/dist/cdn/GAU6DNV5.js +2 -0
  42. package/dist/cdn/GPAIXN52.js +2 -0
  43. package/dist/cdn/GRSBU4PD.js +2 -0
  44. package/dist/cdn/{JWBUJT43.js → H7FA5HFE.js} +1 -1
  45. package/dist/cdn/HHGKNVCH.js +4 -0
  46. package/dist/cdn/HJLWIQDI.js +2 -0
  47. package/dist/cdn/I3EWDYTU.js +2 -0
  48. package/dist/cdn/{24QSQLRY.js → IKPVMXXW.js} +1 -1
  49. package/dist/cdn/{5HZNBMW6.js → IOFXDIWC.js} +1 -1
  50. package/dist/cdn/IPHBVKMY.js +2 -0
  51. package/dist/cdn/{GAF4YT5N.js → IUIFCQQU.js} +1 -1
  52. package/dist/cdn/{ZKZDKJ6D.js → IVDZGUNZ.js} +1 -1
  53. package/dist/cdn/J6SI4Z4F.js +2 -0
  54. package/dist/cdn/K3GAZFRI.js +63 -0
  55. package/dist/cdn/K7LYYLUF.js +2 -0
  56. package/dist/cdn/{74T6IXSN.js → KDORI7H4.js} +1 -1
  57. package/dist/cdn/KRORL7QC.js +2 -0
  58. package/dist/cdn/LGJWULAW.js +2 -0
  59. package/dist/cdn/LTMPXQTC.js +2 -0
  60. package/dist/cdn/M5STJJRX.js +2 -0
  61. package/dist/cdn/M7J7RAM4.js +2 -0
  62. package/dist/cdn/{AXOBMX3S.js → MLTZSPZQ.js} +1 -1
  63. package/dist/cdn/MSSJRDR7.js +2 -0
  64. package/dist/cdn/{L64UURQB.js → N4ZRMYZL.js} +1 -1
  65. package/dist/cdn/NBCYYUHP.js +2 -0
  66. package/dist/cdn/NHVPNSNH.js +2 -0
  67. package/dist/cdn/NQ2IAQKL.js +41 -0
  68. package/dist/cdn/NXGTEDK4.js +2 -0
  69. package/dist/cdn/{7LMZHJZG.js → NYOXMT6S.js} +1 -1
  70. package/dist/cdn/O3JP4FQ3.js +2 -0
  71. package/dist/cdn/O4YFPGD5.js +2 -0
  72. package/dist/cdn/{JIJO4CAS.js → ODSA6NNS.js} +1 -1
  73. package/dist/cdn/OHAQPQAP.js +2 -0
  74. package/dist/cdn/OOXTSCQT.js +2 -0
  75. package/dist/cdn/OQ2JULON.js +2 -0
  76. package/dist/cdn/OVH4YLTS.js +2 -0
  77. package/dist/cdn/QB5BGHLA.js +2 -0
  78. package/dist/cdn/QKCRNS75.js +2 -0
  79. package/dist/cdn/{2YZWRFCI.js → RKMW4FUN.js} +1 -1
  80. package/dist/cdn/RT26JZP5.js +2 -0
  81. package/dist/cdn/SKHFISBA.js +2 -0
  82. package/dist/cdn/SKIDJ4QI.js +2 -0
  83. package/dist/cdn/SRWFOV5W.js +2 -0
  84. package/dist/cdn/{IN4JPZTY.js → SSCKCDXD.js} +1 -1
  85. package/dist/cdn/T66G7GIR.js +2 -0
  86. package/dist/cdn/{RQYNPDN3.js → TIMYD2HM.js} +1 -1
  87. package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
  88. package/dist/cdn/TJWJ3LTU.js +2 -0
  89. package/dist/cdn/{DHMNNIXZ.js → TMR4BRFI.js} +1 -1
  90. package/dist/cdn/{JN23JH3T.js → TTQGRN2V.js} +1 -1
  91. package/dist/cdn/{MLYQGIJU.js → U2HTYOBB.js} +13 -13
  92. package/dist/cdn/{YZTBAUIO.js → UHOW7Q65.js} +1 -1
  93. package/dist/cdn/ULGME5RT.js +2 -0
  94. package/dist/cdn/{Z6R3C4AK.js → US3N5L73.js} +1 -1
  95. package/dist/cdn/W5POIPYP.js +2 -0
  96. package/dist/cdn/{TLM457Z5.js → WJWWYBZ7.js} +1 -1
  97. package/dist/cdn/WNEPEEPZ.js +2 -0
  98. package/dist/cdn/WPAZDJHU.js +2 -0
  99. package/dist/cdn/WT72SOAU.js +2 -0
  100. package/dist/cdn/XJGKRAN5.js +2 -0
  101. package/dist/cdn/{JPUUMGX5.js → XS5EOWBK.js} +1 -1
  102. package/dist/cdn/Y5VUMGKH.js +3 -0
  103. package/dist/cdn/{EQDYQOOT.js → YCIFVZ4J.js} +1 -1
  104. package/dist/cdn/{3NSHGKZA.js → YDXJHNDI.js} +1 -1
  105. package/dist/cdn/{32BWFMTC.js → YIOJIA4Y.js} +1 -1
  106. package/dist/cdn/{K2XSYDAP.js → YK6FCXWU.js} +1 -1
  107. package/dist/cdn/YPDHSE2J.js +2 -0
  108. package/dist/cdn/{M5PPX4ZX.js → YQLFXHFG.js} +1 -1
  109. package/dist/cdn/YSVPB3BO.js +2 -0
  110. package/dist/cdn/YUOVGTP5.js +2 -0
  111. package/dist/cdn/Z5CA4C6H.js +2 -0
  112. package/dist/cdn/{TXC7YBGL.js → ZD6XJVGV.js} +1 -1
  113. package/dist/cdn/ZHQXYCPA.js +2 -0
  114. package/dist/cdn/{DLI4XKJ3.js → ZOX4RLS4.js} +1 -1
  115. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
  116. package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -1
  117. package/dist/cdn/assets/portal-item-card-sublayer-select/t9n/messages.en.json +1 -0
  118. package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
  119. package/dist/cdn/index.js +1 -1
  120. package/dist/cdn/main.css +1 -1
  121. package/dist/chunks/fieldAddDelete.js +7 -7
  122. package/dist/chunks/functionalities.js +14 -9
  123. package/dist/chunks/groups.js +8 -61
  124. package/dist/chunks/groups2.js +23 -8
  125. package/dist/chunks/info.js +2 -2
  126. package/dist/chunks/item.js +58 -26
  127. package/dist/chunks/item2.js +34 -30
  128. package/dist/chunks/itemThumbnail.js +21 -21
  129. package/dist/chunks/loadClassificationData.js +26 -27
  130. package/dist/chunks/portal-delete-items-review.js +1 -1
  131. package/dist/chunks/portal-item-badge.js +1 -1
  132. package/dist/chunks/portal-related-items-list-item.js +1 -1
  133. package/dist/chunks/portal.js +6 -6
  134. package/dist/chunks/portal2.js +11 -11
  135. package/dist/chunks/portalEntitySelection.js +54 -0
  136. package/dist/chunks/query.js +13 -13
  137. package/dist/chunks/request.js +49 -41
  138. package/dist/chunks/requests.js +7 -7
  139. package/dist/chunks/selectedMentions.js +25 -0
  140. package/dist/chunks/services.js +1 -1
  141. package/dist/chunks/string.js +14 -10
  142. package/dist/chunks/ui.js +1 -0
  143. package/dist/chunks/url.js +2 -2
  144. package/dist/chunks/user.js +10 -10
  145. package/dist/chunks/utils.js +35 -22
  146. package/dist/chunks/utils2.js +4 -4
  147. package/dist/chunks/utils3.js +88 -657
  148. package/dist/chunks/utils4.js +664 -0
  149. package/dist/components/arcgis-portal-account-switcher/customElement.js +28 -26
  150. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +4 -4
  151. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +8 -8
  152. package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +4 -4
  153. package/dist/components/arcgis-portal-account-switcher-list/customElement.js +6 -6
  154. package/dist/components/arcgis-portal-account-switcher-signout/customElement.d.ts +5 -5
  155. package/dist/components/arcgis-portal-account-switcher-signout/customElement.js +3 -3
  156. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +6 -0
  157. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +153 -130
  158. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +25 -15
  159. package/dist/components/arcgis-portal-ai-assistant/customElement.js +574 -2409
  160. package/dist/components/arcgis-portal-ai-assistant/index.js +4 -0
  161. package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
  162. package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +51 -0
  163. package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +14 -0
  164. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +39 -0
  165. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +63 -27
  166. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -1
  167. package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
  168. package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
  169. package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
  170. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  171. package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
  172. package/dist/components/arcgis-portal-delete-items/customElement.js +446 -330
  173. package/dist/components/arcgis-portal-delete-items/index.js +1 -2
  174. package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
  175. package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +36 -0
  176. package/dist/components/arcgis-portal-entity-picker/customElement.js +202 -120
  177. package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
  178. package/dist/components/arcgis-portal-field-delete/customElement.js +33 -31
  179. package/dist/components/arcgis-portal-field-delete/index.js +1 -1
  180. package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
  181. package/dist/components/arcgis-portal-group-browser/customElement.js +93 -99
  182. package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
  183. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +2 -2
  184. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -1
  185. package/dist/components/arcgis-portal-group-card/customElement.js +18 -18
  186. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
  187. package/dist/components/arcgis-portal-item-card/customElement.d.ts +26 -10
  188. package/dist/components/arcgis-portal-item-card/customElement.js +101 -91
  189. package/dist/components/arcgis-portal-item-card/index.js +2 -1
  190. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
  191. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +352 -0
  192. package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
  193. package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
  194. package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
  195. package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
  196. package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
  197. package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
  198. package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
  199. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
  200. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
  201. package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
  202. package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
  203. package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
  204. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
  205. package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
  206. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
  207. package/dist/components/arcgis-portal-navigation/customElement.js +7 -8
  208. package/dist/components/arcgis-portal-navigation/index.js +1 -1
  209. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
  210. package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
  211. package/dist/components/arcgis-portal-review-related-items/customElement.js +45 -18
  212. package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
  213. package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
  214. package/dist/components/arcgis-portal-user-popup/customElement.js +28 -28
  215. package/dist/components/portal-group-browser-filters/customElement.js +15 -15
  216. package/dist/components/portal-related-items-list-item/customElement.js +16 -14
  217. package/dist/components/portal-related-items-list-item/index.js +1 -1
  218. package/dist/docs/api.json +1 -1
  219. package/dist/docs/docs.json +1 -1
  220. package/dist/docs/vscode.html-custom-data.json +1 -1
  221. package/dist/docs/web-types.json +1 -1
  222. package/dist/index.d.ts +30 -0
  223. package/dist/index.js +155 -6
  224. package/dist/loader.js +15 -12
  225. package/dist/services/groups.d.ts +9 -0
  226. package/dist/services/item.d.ts +9 -0
  227. package/dist/types/item.d.ts +9 -9
  228. package/dist/types/lumina.d.ts +36 -17
  229. package/dist/types/preact.d.ts +39 -17
  230. package/dist/types/react.d.ts +42 -17
  231. package/dist/types/services.d.ts +27 -1
  232. package/dist/types/stencil.d.ts +36 -17
  233. package/dist/utils/generateEmbeddings.d.ts +7 -0
  234. package/dist/utils/semanticSearch.d.ts +60 -0
  235. package/dist/utils/types.d.ts +10 -0
  236. package/package.json +10 -10
  237. package/dist/cdn/23FS4XTG.js +0 -2
  238. package/dist/cdn/2MPQ5IWJ.js +0 -2
  239. package/dist/cdn/3CQKCUM5.js +0 -2
  240. package/dist/cdn/3EYB5GQX.js +0 -2
  241. package/dist/cdn/3LEQ37YT.js +0 -68
  242. package/dist/cdn/46BUEBWS.js +0 -2
  243. package/dist/cdn/4AI52H7C.js +0 -2
  244. package/dist/cdn/4MUB6TL6.js +0 -2
  245. package/dist/cdn/4PRXQFCV.js +0 -2
  246. package/dist/cdn/4QFTKB6T.js +0 -2
  247. package/dist/cdn/4TSXFX3M.js +0 -2
  248. package/dist/cdn/5C5GHX4D.js +0 -2
  249. package/dist/cdn/5PPZNVWG.js +0 -2
  250. package/dist/cdn/66XWNGQ2.js +0 -2
  251. package/dist/cdn/6F4SJDRR.js +0 -2
  252. package/dist/cdn/6RZEXOK3.js +0 -2
  253. package/dist/cdn/A2SQ4EMZ.js +0 -2
  254. package/dist/cdn/AICPYLWE.js +0 -4
  255. package/dist/cdn/AJQT7UXB.js +0 -2
  256. package/dist/cdn/APSYZEPP.js +0 -209
  257. package/dist/cdn/AZOJHVAO.js +0 -2
  258. package/dist/cdn/BSTA5KI5.js +0 -2
  259. package/dist/cdn/CD5UWSCP.js +0 -2
  260. package/dist/cdn/CXXV6WJT.js +0 -2
  261. package/dist/cdn/DDBXEXOV.js +0 -2
  262. package/dist/cdn/DYO5P3F2.js +0 -2
  263. package/dist/cdn/E66BDC6N.js +0 -2
  264. package/dist/cdn/EEAVX4PP.js +0 -2
  265. package/dist/cdn/EITRZQSC.js +0 -2
  266. package/dist/cdn/EMJQI4MA.js +0 -2
  267. package/dist/cdn/FIBQAMJ3.js +0 -2
  268. package/dist/cdn/FIQZPIIK.js +0 -2
  269. package/dist/cdn/FNLBJ4ZQ.js +0 -2
  270. package/dist/cdn/FRE56NBG.js +0 -2
  271. package/dist/cdn/GSOBDGLK.js +0 -2
  272. package/dist/cdn/GUO7HKSP.js +0 -463
  273. package/dist/cdn/GX7U3727.js +0 -2
  274. package/dist/cdn/GXM3XY3J.js +0 -2
  275. package/dist/cdn/I273CANO.js +0 -2
  276. package/dist/cdn/I6NVKNZJ.js +0 -2
  277. package/dist/cdn/J5FKIZAM.js +0 -2
  278. package/dist/cdn/JL52W3Z4.js +0 -2
  279. package/dist/cdn/JOUR2FB2.js +0 -3
  280. package/dist/cdn/LISDTBEX.js +0 -2
  281. package/dist/cdn/LWFACY3F.js +0 -2
  282. package/dist/cdn/LYLQCBVX.js +0 -2
  283. package/dist/cdn/N4VOTJ25.js +0 -2
  284. package/dist/cdn/N5QLV56W.js +0 -2
  285. package/dist/cdn/NRMQDCM3.js +0 -2
  286. package/dist/cdn/OD5WXP7J.js +0 -2
  287. package/dist/cdn/OXPXXIWL.js +0 -2
  288. package/dist/cdn/PMRFXB4F.js +0 -2
  289. package/dist/cdn/PNIFJ5DQ.js +0 -2
  290. package/dist/cdn/PZDI5ZDC.js +0 -2
  291. package/dist/cdn/RVYSVTPQ.js +0 -2
  292. package/dist/cdn/SVROAT3Z.js +0 -2
  293. package/dist/cdn/TBZXKKGP.js +0 -2
  294. package/dist/cdn/TNUCSWBN.js +0 -2
  295. package/dist/cdn/TOICLGFK.js +0 -2
  296. package/dist/cdn/TOTWYGB3.js +0 -2
  297. package/dist/cdn/TUUUK3VX.js +0 -2
  298. package/dist/cdn/U3KMGSVH.js +0 -2
  299. package/dist/cdn/WC3FPLYQ.js +0 -2
  300. package/dist/cdn/XYMBRPC7.js +0 -2
  301. package/dist/cdn/YTODQCOG.js +0 -2
  302. package/dist/cdn/YYTEJVBL.js +0 -2
  303. package/dist/cdn/ZDDN7UKS.js +0 -2
  304. package/dist/chunks/functional.js +0 -9
  305. package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
  306. /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
  307. /package/dist/components/arcgis-portal-ai-assistant/{agents/types.d.ts → types/navigation.d.ts} +0 -0
  308. /package/dist/components/arcgis-portal-ai-assistant/{agents → types}/portalRouteKeys.d.ts +0 -0
@@ -1,56 +1,59 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as F } from "../../chunks/runtime.js";
3
- import q from "@arcgis/core/layers/Layer.js";
4
- import O from "@arcgis/core/portal/PortalItem.js";
5
- import { LitElement as P, createEvent as h } from "@arcgis/lumina";
6
- import { css as V, html as c } from "lit";
7
- import { u as S } from "../../chunks/useT9n.js";
8
- import m from "@arcgis/core/request.js";
9
- import { r as b } from "../../chunks/request.js";
10
- const D = V`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}`;
11
- async function v({
2
+ import { c as S } from "../../chunks/runtime.js";
3
+ import v from "@arcgis/core/layers/Layer.js";
4
+ import I from "@arcgis/core/portal/PortalItem.js";
5
+ import { LitElement as C, createEvent as f } from "@arcgis/lumina";
6
+ import { css as L, html as m } from "lit";
7
+ import { u as A } from "../../chunks/useT9n.js";
8
+ import g from "@arcgis/core/request.js";
9
+ import { r as O } from "../../chunks/request.js";
10
+ import { p as z } from "../../chunks/functionalities.js";
11
+ const w = L`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;
12
+ async function b({
12
13
  item: s,
13
14
  layers: e
14
15
  }) {
15
- const { url: l } = s, a = /* @__PURE__ */ new Map();
16
- if (!l)
17
- return { result: a };
16
+ const { url: t } = s, l = /* @__PURE__ */ new Map();
17
+ if (!t)
18
+ return { result: l };
18
19
  try {
19
- const i = (await m(l, {
20
+ const i = (await g(t, {
21
+ cacheBust: !0,
20
22
  query: { f: "json" },
21
23
  responseType: "json"
22
24
  })).data;
23
25
  if (i.fields) {
24
26
  const n = e?.[0];
25
- return e?.length === 1 && n?.layerId != null && a.set(n.layerId, i.fields), { result: a };
27
+ return e?.length === 1 && n?.layerId != null && l.set(n.layerId, i.fields), { result: l };
26
28
  }
27
29
  if (!i.layers?.length)
28
- return { result: a };
29
- const t = l.replace(/\/$/u, "");
30
+ return { result: l };
31
+ const a = t.replace(/\/$/u, "");
30
32
  return await Promise.all(
31
33
  i.layers.map(async ({ id: n }) => {
32
- const r = (await m(`${t}/${n}`, {
34
+ const r = (await g(`${a}/${n}`, {
35
+ cacheBust: !0,
33
36
  query: { f: "json" },
34
37
  responseType: "json"
35
38
  })).data;
36
- a.set(n, r.fields ?? []);
39
+ l.set(n, r.fields ?? []);
37
40
  })
38
- ), { result: a };
41
+ ), { result: l };
39
42
  } catch (i) {
40
43
  return console.error("Error getting layer fields:", i), { error: { code: "unhandledError" } };
41
44
  }
42
45
  }
43
- const f = (s) => {
46
+ const P = (s) => {
44
47
  const { url: e } = s;
45
48
  return e ? e.replace("/rest/services", "/rest/admin/services").replace(/\/$/u, "") : null;
46
49
  };
47
- async function I({
50
+ async function x({
48
51
  fields: s,
49
52
  item: e,
50
- portal: l,
51
- layerId: a
53
+ portal: t,
54
+ layerId: l
52
55
  }) {
53
- const i = f(e);
56
+ const i = P(e);
54
57
  if (!i)
55
58
  return {
56
59
  error: {
@@ -59,35 +62,35 @@ async function I({
59
62
  }
60
63
  };
61
64
  try {
62
- const t = await b({
63
- url: `${i}/${a != null ? `${a}/` : ""}addToDefinition`,
64
- portal: l,
65
+ const a = await O({
66
+ url: `${i}/${l != null ? `${l}/` : ""}addToDefinition`,
67
+ portal: t,
65
68
  method: "post",
66
69
  params: {
67
70
  addToDefinition: JSON.stringify({ fields: s })
68
71
  }
69
72
  });
70
- return t.success === !1 || t.error ? {
73
+ return a.success === !1 || a.error ? {
71
74
  error: {
72
75
  code: "unhandledError",
73
- message: t.error?.message
76
+ message: a.error?.message
74
77
  }
75
- } : { result: t };
76
- } catch (t) {
77
- return console.error("Error adding fields to the feature service definition:", t), {
78
+ } : { result: a };
79
+ } catch (a) {
80
+ return console.error("Error adding fields to the feature service definition:", a), {
78
81
  error: {
79
82
  code: "unhandledError"
80
83
  }
81
84
  };
82
85
  }
83
86
  }
84
- async function C({
87
+ async function G({
85
88
  fields: s,
86
89
  item: e,
87
- portal: l,
88
- layerId: a
90
+ portal: t,
91
+ layerId: l
89
92
  }) {
90
- const i = f(e);
93
+ const i = P(e);
91
94
  if (!i)
92
95
  return {
93
96
  error: {
@@ -96,61 +99,61 @@ async function C({
96
99
  }
97
100
  };
98
101
  try {
99
- const t = await b({
100
- url: `${i}/${a != null ? `${a}/` : ""}updateDefinition`,
101
- portal: l,
102
+ const a = await O({
103
+ url: `${i}/${l != null ? `${l}/` : ""}updateDefinition`,
104
+ portal: t,
102
105
  method: "post",
103
106
  params: {
104
107
  updateDefinition: JSON.stringify({ fields: s })
105
108
  }
106
109
  });
107
- return t.success === !1 || t.error ? {
110
+ return a.success === !1 || a.error ? {
108
111
  error: {
109
112
  code: "unhandledError",
110
- message: t.error?.message ?? "Failed to update the feature service definition."
113
+ message: a.error?.message ?? "Failed to update the feature service definition."
111
114
  }
112
- } : { result: t };
113
- } catch (t) {
114
- return console.error("Error updating the feature service definition:", t), {
115
+ } : { result: a };
116
+ } catch (a) {
117
+ return console.error("Error updating the feature service definition:", a), {
115
118
  error: {
116
119
  code: "unhandledError"
117
120
  }
118
121
  };
119
122
  }
120
123
  }
121
- async function L(s) {
124
+ async function R(s) {
122
125
  const { url: e } = s;
123
126
  if (!e)
124
127
  return { error: { code: "unhandledError" } };
125
128
  try {
126
- return { result: (await m(e, { query: { f: "json" } })).data };
127
- } catch (l) {
128
- return console.error("Error getting service info:", l), { error: { code: "unhandledError" } };
129
+ return { result: (await g(e, { query: { f: "json" } })).data };
130
+ } catch (t) {
131
+ return console.error("Error getting service info:", t), { error: { code: "unhandledError" } };
129
132
  }
130
133
  }
131
- const A = (s, e) => {
132
- const l = s.domain ?? null, a = e.domain ?? null;
133
- return l === null || a === null ? l === a : l.type !== a.type ? !1 : l.type === "codedValue" && a.type === "codedValue" ? l.name === a.name && l.codedValues.length === a.codedValues.length && l.codedValues.every(
134
- ({ code: i, name: t }, n) => i === a.codedValues[n]?.code && t === a.codedValues[n]?.name
135
- ) : l.type === "range" && a.type === "range" ? l.name === a.name && l.range[0] === a.range[0] && l.range[1] === a.range[1] : !0;
136
- }, z = (s, e) => {
137
- const l = new Map(e.map((t) => [t.name, t])), a = [], i = [];
138
- for (const t of s) {
139
- const n = l.get(t.name);
140
- n ? A(t, n) || i.push({ name: t.name, domain: t.domain }) : a.push(t);
134
+ const E = (s, e) => {
135
+ const t = s.domain ?? null, l = e.domain ?? null;
136
+ return t === null || l === null ? t === l : t.type !== l.type ? !1 : t.type === "codedValue" && l.type === "codedValue" ? t.codedValues.length === l.codedValues.length && t.codedValues.every(
137
+ ({ code: i, name: a }, n) => i === l.codedValues[n]?.code && a === l.codedValues[n]?.name
138
+ ) : t.type === "range" && l.type === "range" ? t.range[0] === l.range[0] && t.range[1] === l.range[1] : !0;
139
+ }, N = (s, e) => {
140
+ const t = new Map(e.map((a) => [a.name, a])), l = [], i = [];
141
+ for (const a of s) {
142
+ const n = t.get(a.name);
143
+ n ? E(a, n) || i.push({ name: a.name, domain: a.domain }) : l.push(a);
141
144
  }
142
- return { missingFields: a, modifiedFields: i };
143
- }, g = (s) => {
145
+ return { missingFields: l, modifiedFields: i };
146
+ }, M = (s) => {
144
147
  switch (s) {
145
148
  case "esriGeometryPolyline":
146
149
  case "esriGeometryPolygon":
147
- return [...G];
150
+ return [...k];
148
151
  case "esriGeometryPoint":
149
- return [...R];
152
+ return [...$];
150
153
  default:
151
154
  return [];
152
155
  }
153
- }, x = (s) => s === "esriGeometryPoint" ? [...E] : [], w = (s) => s === "esriGeometryPoint" ? [...N] : [], G = [
156
+ }, _ = (s) => s === "esriGeometryPoint" ? [...B] : [], F = (s) => s === "esriGeometryPoint" ? [...U] : [], k = [
154
157
  {
155
158
  name: "esrignss_avg_h_rms",
156
159
  type: "esriFieldTypeDouble",
@@ -222,7 +225,7 @@ const A = (s, e) => {
222
225
  domain: null,
223
226
  defaultValue: null
224
227
  }
225
- ], R = [
228
+ ], $ = [
226
229
  {
227
230
  name: "esrignss_speed",
228
231
  type: "esriFieldTypeDouble",
@@ -633,7 +636,7 @@ const A = (s, e) => {
633
636
  domain: null,
634
637
  defaultValue: null
635
638
  }
636
- ], E = [
639
+ ], B = [
637
640
  {
638
641
  name: "esrisnsr_tilt_azimuth_accuracy",
639
642
  type: "esriFieldTypeDouble",
@@ -691,7 +694,7 @@ const A = (s, e) => {
691
694
  },
692
695
  defaultValue: null
693
696
  }
694
- ], N = [
697
+ ], U = [
695
698
  {
696
699
  name: "esrignss_cp1_latitude",
697
700
  type: "esriFieldTypeDouble",
@@ -1180,64 +1183,67 @@ const A = (s, e) => {
1180
1183
  defaultValue: null
1181
1184
  }
1182
1185
  ];
1183
- function M(s) {
1184
- const e = s.capabilities;
1185
- return e?.data?.supportsAttachment && e?.operations?.supportsQueryAttachments;
1186
- }
1187
- function $(s) {
1188
- return s.every(M);
1186
+ function K(s) {
1187
+ if (s.geometryType === "polyline" || s.geometryType === "polygon") {
1188
+ const e = s.capabilities;
1189
+ return e?.data?.supportsAttachment && e?.operations?.supportsQueryAttachments;
1190
+ }
1191
+ return !0;
1189
1192
  }
1190
- const B = ["point", "polyline", "polygon"], T = (s) => s?.type === "Feature Service";
1191
- class k extends P {
1193
+ const Y = (s) => s.every(K), H = ["point", "polyline", "polygon"], q = (s) => s?.type === "Feature Service";
1194
+ class j extends C {
1192
1195
  constructor() {
1193
- super(...arguments), this.messages = S({ blocking: !0 }), this.initCount = 0, this.supportsAttachments = !1, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.loadedItem = null, this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.initializing = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1, this.addingGPSFieldMetadata = [], this.item = null, this.itemId = null, this.arcgisGPSMetadataFieldsAdded = h(), this.arcgisReadOnlyMode = h();
1196
+ super(...arguments), this.messages = A({ blocking: !0 }), this.initCount = 0, this.supportsAttachments = !1, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.loadedItem = null, this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.initializing = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1, this.addingGPSFieldMetadata = [], this.item = null, this.itemId = null, this.messageOverrides = {}, this.arcgisGPSMetadataFieldsAdded = f(), this.arcgisReadOnlyMode = f();
1194
1197
  }
1195
1198
  static {
1196
- this.properties = { loadedItem: 16, gpsFieldFixesBySet: 16, addFieldsDisabled: 16, initializing: 16, hasLineOrPolygonLayer: 16, hasPointFeatureLayer: 16, addingGPSFieldMetadata: 16, item: 0, itemId: 1, portal: 0 };
1199
+ this.properties = { loadedItem: 16, gpsFieldFixesBySet: 16, addFieldsDisabled: 16, initializing: 16, hasLineOrPolygonLayer: 16, hasPointFeatureLayer: 16, addingGPSFieldMetadata: 16, item: 0, itemId: 1, portal: 0, messageOverrides: 0 };
1197
1200
  }
1198
1201
  static {
1199
- this.styles = D;
1202
+ this.styles = w;
1203
+ }
1204
+ connectedCallback() {
1205
+ super.connectedCallback(), this.hasUpdated && this.initItem();
1200
1206
  }
1201
1207
  willUpdate(e) {
1202
1208
  (e.has("item") || e.has("itemId")) && this.initItem();
1203
1209
  }
1204
1210
  async initItem({ showLoading: e = !0 } = {}) {
1205
- const l = ++this.initCount;
1211
+ const t = ++this.initCount;
1206
1212
  if (!this.item && !this.itemId) {
1207
1213
  this.resetItemState(), this.initializing = !1;
1208
1214
  return;
1209
1215
  }
1210
1216
  e && (this.resetItemState(), this.initializing = !0);
1211
- const { item: a, itemId: i, portal: t } = this, n = a ? await a.load() : await new O({
1217
+ const { item: l, itemId: i, portal: a } = this, n = l ? await l.load() : await new I({
1212
1218
  id: i,
1213
- portal: t
1219
+ portal: a
1214
1220
  }).load();
1215
- if (!this.isCurrentInitialization(l))
1221
+ if (!this.isCurrentInitialization(t))
1216
1222
  return;
1217
- if (!T(n)) {
1223
+ if (!q(n)) {
1218
1224
  this.resetItemState(), this.initializing = !1;
1219
1225
  return;
1220
1226
  }
1221
1227
  this.loadedItem = n;
1222
- const r = !e && this.layersLoaded ? [...this.pointLayers, ...this.lineOrPolygonLayers] : await this.getFeatureLayers(n), { result: y } = await L(n);
1223
- if (!this.isCurrentInitialization(l))
1228
+ const r = !e && this.layersLoaded ? [...this.pointLayers, ...this.lineOrPolygonLayers] : await this.getFeatureLayers(n), { result: p } = await R(n);
1229
+ if (!this.isCurrentInitialization(t))
1224
1230
  return;
1225
1231
  this.layersLoaded = !0, this.pointLayers = r.filter((d) => d.geometryType === "point"), this.lineOrPolygonLayers = r.filter((d) => d.geometryType === "polyline" || d.geometryType === "polygon"), this.hasLineOrPolygonLayer = r.some((d) => d.geometryType === "polyline" || d.geometryType === "polygon"), this.hasPointFeatureLayer = r.some((d) => d.geometryType === "point");
1226
- const { result: o, error: u } = r.length > 0 ? await v({ item: n, layers: r }) : {};
1227
- if (!this.isCurrentInitialization(l))
1232
+ const { result: o, error: h } = r.length > 0 ? await b({ item: n, layers: r }) : {};
1233
+ if (!this.isCurrentInitialization(t))
1228
1234
  return;
1229
- if (u) {
1235
+ if (h) {
1230
1236
  this.resetItemState(), this.initializing = !1;
1231
1237
  return;
1232
1238
  }
1233
- const p = o ?? /* @__PURE__ */ new Map();
1239
+ const y = o ?? /* @__PURE__ */ new Map();
1234
1240
  this.gpsFieldFixesBySet = {
1235
- base: this.analyzeFieldSet([...this.pointLayers, ...this.lineOrPolygonLayers], p, "base"),
1236
- gnss: this.analyzeFieldSet(this.pointLayers, p, "gnss"),
1237
- rangefinder: this.analyzeFieldSet(this.pointLayers, p, "rangefinder")
1238
- }, this.supportsAttachments = $(r);
1239
- const _ = y?.sourceSchemaChangesAllowed !== !1;
1240
- this.addFieldsDisabled = !this.supportsAttachments || !_, this.initializing = !1;
1241
+ base: this.analyzeFieldSet([...this.pointLayers, ...this.lineOrPolygonLayers], y, "base"),
1242
+ gnss: this.analyzeFieldSet(this.pointLayers, y, "gnss"),
1243
+ rangefinder: this.analyzeFieldSet(this.pointLayers, y, "rangefinder")
1244
+ }, this.supportsAttachments = Y(r);
1245
+ const T = p?.sourceSchemaChangesAllowed !== !1;
1246
+ this.addFieldsDisabled = !this.supportsAttachments || !T, this.initializing = !1;
1241
1247
  }
1242
1248
  isCurrentInitialization(e) {
1243
1249
  return e === this.initCount;
@@ -1246,11 +1252,11 @@ class k extends P {
1246
1252
  this.loadedItem = null, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1;
1247
1253
  }
1248
1254
  async getFeatureLayers(e) {
1249
- const l = await q.fromPortalItem({ portalItem: e });
1250
- return await l.load(), "layers" in l ? (await Promise.all(l.layers.map(async (i) => (await i.load(), this.isSupportedFeatureLayer(i) ? i : null)))).filter((i) => !!i) : this.isSupportedFeatureLayer(l) ? [l] : [];
1255
+ const t = await v.fromPortalItem({ portalItem: e });
1256
+ return await t.load(), "layers" in t ? (await Promise.all(t.layers.map(async (i) => (await i.load(), this.isSupportedFeatureLayer(i) ? i : null)))).filter((i) => !!i) : this.isSupportedFeatureLayer(t) ? [t] : [];
1251
1257
  }
1252
1258
  isSupportedFeatureLayer(e) {
1253
- return e.type === "feature" && B.some((l) => l === e.geometryType);
1259
+ return e.type === "feature" && H.some((t) => t === e.geometryType);
1254
1260
  }
1255
1261
  getCompatibleEsriGeometryType(e) {
1256
1262
  switch (e.geometryType) {
@@ -1264,14 +1270,14 @@ class k extends P {
1264
1270
  return null;
1265
1271
  }
1266
1272
  }
1267
- analyzeFieldSet(e, l, a) {
1273
+ analyzeFieldSet(e, t, l) {
1268
1274
  const i = [];
1269
- for (const t of e) {
1270
- if (t.layerId == null)
1275
+ for (const a of e) {
1276
+ if (a.layerId == null)
1271
1277
  continue;
1272
- const n = l.get(t.layerId) ?? [], r = this.getCompatibleEsriGeometryType(t), y = r ? a === "base" ? g(r) : a === "gnss" ? x(r) : w(r) : [], o = z(y, n);
1278
+ const n = t.get(a.layerId) ?? [], r = this.getCompatibleEsriGeometryType(a), p = r ? l === "base" ? M(r) : l === "gnss" ? _(r) : F(r) : [], o = N(p, n);
1273
1279
  (o.missingFields.length > 0 || o.modifiedFields.length > 0) && i.push({
1274
- layerId: t.layerId,
1280
+ layerId: a.layerId,
1275
1281
  fieldsToAdd: o.missingFields,
1276
1282
  domainsToUpdate: o.modifiedFields
1277
1283
  });
@@ -1285,46 +1291,63 @@ class k extends P {
1285
1291
  return this.addingGPSFieldMetadata.includes(e);
1286
1292
  }
1287
1293
  async addFields(e) {
1288
- const l = this.portal ?? this.loadedItem?.portal, a = this.loadedItem, i = this.gpsFieldFixesBySet;
1289
- if (!(!l || !a || !i)) {
1290
- if (l.isReadOnly) {
1291
- this.arcgisReadOnlyMode.emit();
1294
+ const t = this.portal ?? this.loadedItem?.portal, l = this.loadedItem, i = this.gpsFieldFixesBySet;
1295
+ if (!t || !l || !i)
1296
+ return;
1297
+ if (t.isReadOnly) {
1298
+ this.arcgisReadOnlyMode.emit();
1299
+ return;
1300
+ }
1301
+ this.addingGPSFieldMetadata = [...this.addingGPSFieldMetadata, e];
1302
+ const a = [...this.pointLayers, ...this.lineOrPolygonLayers];
1303
+ try {
1304
+ const n = i[e], p = (await Promise.all(n.filter(({ fieldsToAdd: u }) => u.length > 0).map(async ({ fieldsToAdd: u, layerId: c }) => await x({ fields: u, item: l, layerId: c, portal: t })))).every(({ error: u }) => !u), o = p ? await Promise.all(n.filter(({ domainsToUpdate: u }) => u.length > 0).map(async ({ domainsToUpdate: u, layerId: c }) => await G({ fields: u, item: l, layerId: c, portal: t }))) : [], h = p && o.every(({ error: u }) => !u);
1305
+ if (!h || this.loadedItem !== l)
1292
1306
  return;
1293
- }
1294
- this.addingGPSFieldMetadata = [...this.addingGPSFieldMetadata, e];
1295
- try {
1296
- const t = i[e], r = (await Promise.all(t.filter(({ fieldsToAdd: u }) => u.length > 0).map(async ({ fieldsToAdd: u, layerId: p }) => await I({ fields: u, item: a, layerId: p, portal: l })))).every(({ error: u }) => !u), y = r ? await Promise.all(t.filter(({ domainsToUpdate: u }) => u.length > 0).map(async ({ domainsToUpdate: u, layerId: p }) => await C({ fields: u, item: a, layerId: p, portal: l }))) : [], o = r && y.every(({ error: u }) => !u);
1297
- await this.initItem({ showLoading: !1 }), r && o && this.gpsFieldFixesBySet && !this.hasFieldChanges(e) && this.arcgisGPSMetadataFieldsAdded.emit(e);
1298
- } finally {
1299
- this.addingGPSFieldMetadata = this.addingGPSFieldMetadata.filter((t) => t !== e);
1300
- }
1307
+ let y;
1308
+ if (await z(async () => {
1309
+ if (this.loadedItem !== l)
1310
+ return !0;
1311
+ const { result: u, error: c } = await b({ item: l, layers: a });
1312
+ if (c || this.loadedItem !== l)
1313
+ return !0;
1314
+ if (!u)
1315
+ return !1;
1316
+ const V = e === "base" ? a : a.filter((D) => D.geometryType === "point");
1317
+ return this.analyzeFieldSet(V, u, e).length > 0 ? !1 : (y = u, !0);
1318
+ }, 10) || console.warn("Fields were not verified on the service.", {
1319
+ itemId: l.id,
1320
+ fieldSet: e
1321
+ }), !y || this.loadedItem !== l)
1322
+ return;
1323
+ await this.initItem({ showLoading: !1 }), p && h && this.gpsFieldFixesBySet && !this.hasFieldChanges(e) && this.arcgisGPSMetadataFieldsAdded.emit(e);
1324
+ } finally {
1325
+ this.addingGPSFieldMetadata = this.addingGPSFieldMetadata.filter((n) => n !== e);
1301
1326
  }
1302
1327
  }
1303
1328
  canShowAddGPSMetadata() {
1304
1329
  const e = this.loadedItem ?? this.item;
1305
- return !!e && T(e);
1330
+ return !!e && q(e);
1306
1331
  }
1307
1332
  showAdvancedFields() {
1308
1333
  const e = this.gpsFieldFixesBySet;
1309
- return !this.hasPointFeatureLayer || !e ? !1 : this.pointLayers.some((l) => {
1310
- if (l.layerId == null)
1311
- return !1;
1312
- const a = this.getCompatibleEsriGeometryType(l), i = a ? g(a) : [];
1313
- return (e.base.find(({ layerId: n }) => n === l.layerId)?.fieldsToAdd ?? []).length < i.length;
1314
- });
1334
+ return !this.hasPointFeatureLayer || !e ? !1 : this.hasFieldChanges("base") ? this.pointLayers.some((t) => t.layerId == null ? !1 : ["gnss", "rangefinder"].some((l) => {
1335
+ const i = l === "gnss" ? _("esriGeometryPoint") : F("esriGeometryPoint");
1336
+ return (e[l].find(({ layerId: n }) => n === t.layerId)?.fieldsToAdd ?? []).length < i.length;
1337
+ })) : !0;
1315
1338
  }
1316
- renderAddFieldsControl(e, l = !1) {
1317
- const a = this.gpsFieldFixesBySet;
1318
- if (!l && a && !this.hasFieldChanges(e))
1319
- return c`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;
1339
+ renderAddFieldsControl(e, t = !1) {
1340
+ const l = this.gpsFieldFixesBySet;
1341
+ if (!t && l && !this.hasFieldChanges(e))
1342
+ return m`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;
1320
1343
  const i = this.isLoading(e);
1321
- return c`<calcite-button slot=actions-end appearance=outline-fill .disabled=${l || !a || i || this.addFieldsDisabled} .loading=${i} @click=${async () => await this.addFields(e)}>${i ? this.messages.addingFields : this.messages.addFields}</calcite-button>`;
1344
+ return m`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${t || !l || i || this.addFieldsDisabled} .loading=${i} @click=${async () => await this.addFields(e)}>${i ? this.messages.addingFields : this.messages.addFields}</calcite-button>`;
1322
1345
  }
1323
1346
  render() {
1324
- return this.canShowAddGPSMetadata() ? c`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing && c`<calcite-scrim loading></calcite-scrim>` || ""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields() && c`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>` || ""}</calcite-list></calcite-block></div>` : null;
1347
+ return this.canShowAddGPSMetadata() ? m`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing && m`<calcite-scrim loading></calcite-scrim>` || ""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields() && m`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>` || ""}</calcite-list></calcite-block></div>` : null;
1325
1348
  }
1326
1349
  }
1327
- F("arcgis-portal-add-gps-metadata", k);
1350
+ S("arcgis-portal-add-gps-metadata", j);
1328
1351
  export {
1329
- k as ArcgisPortalAddGpsMetadata
1352
+ j as ArcgisPortalAddGpsMetadata
1330
1353
  };
@@ -3,8 +3,9 @@ import type Portal from "@arcgis/core/portal/Portal.js";
3
3
  import type PortalUser from "@arcgis/core/portal/PortalUser.js";
4
4
  import type { Config } from "@arcgis/core/config.js";
5
5
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
6
- import type { PartialPortalNavigationTargetMap, PortalNavigationTarget } from "./agents/types.js";
7
- import type { CapabilityRegistry } from "./data/capability-registries/types.js";
6
+ import type { PartialPortalNavigationTargetMap, PortalNavigationTarget } from "./types/navigation.js";
7
+ import type { PortalAssistantTools } from "./types/assistantTools.js";
8
+ import type { PortalAssistantEntityToolPresets } from "./types/portalEntityTools.js";
8
9
  import type { T9nMeta } from "@arcgis/lumina/controllers";
9
10
 
10
11
  /** @internal */
@@ -14,15 +15,27 @@ export abstract class ArcgisPortalAiAssistant extends LitElement {
14
15
  accessor config: Config;
15
16
  /** @default false */
16
17
  accessor defaultClosed: boolean;
17
- /** Optional per-agent disabled map. Any missing key defaults to enabled. */
18
- accessor disabledAgents: PortalAiAssistantDisabledAgents | undefined;
19
- accessor navigationCapabilities: CapabilityRegistry | undefined;
18
+ /** Disables the tool agent when `tools` is true. Omitted means enabled. */
19
+ accessor disabledAgents: { tools?: boolean; } | undefined;
20
+ /** Entity types offered by askUser for explicit picker selection. Omitted entity types are enabled. */
21
+ accessor entityToolPresets: PortalAssistantEntityToolPresets | undefined;
20
22
  /** Optional map of navigation target overrides for generating navigation hrefs from portal navigation suggestions. */
21
23
  accessor navigationTargetMap: PartialPortalNavigationTargetMap | undefined;
24
+ /**
25
+ * Enables runtime tracing and opens a movable, resizable developer diagnostics window.
26
+ * Recorded inputs and outputs may contain sensitive data. Disable when diagnostics are not needed.
27
+ * Set before starting a conversation; changing this flag reinitializes the assistant runtime.
28
+ * Closing the window preserves recorded history and tracing. Reopen it from the assistant header.
29
+ * Disabling removes the panel and its recorded history.
30
+ *
31
+ * @default false
32
+ */
33
+ accessor observabilityEnabled: boolean;
22
34
  accessor portal: Portal;
23
35
  /** @internal */
24
36
  protected t9n: {
25
37
  heading: string;
38
+ diagnostics: string;
26
39
  placeholder: string;
27
40
  askMeAQuestionPlaceholder: string;
28
41
  emptyStateMessage: string;
@@ -92,6 +105,7 @@ export abstract class ArcgisPortalAiAssistant extends LitElement {
92
105
  };
93
106
  } & T9nMeta<{
94
107
  heading: string;
108
+ diagnostics: string;
95
109
  placeholder: string;
96
110
  askMeAQuestionPlaceholder: string;
97
111
  emptyStateMessage: string;
@@ -161,11 +175,13 @@ export abstract class ArcgisPortalAiAssistant extends LitElement {
161
175
  };
162
176
  }>;
163
177
  /**
164
- * When true, uses the production documentation assistant endpoint instead of portal helper services.
178
+ * Generic tools the model can inspect and invoke to fulfill application requests.
165
179
  *
166
- * @default false
180
+ * The factory receives Portal-provided `tool` and
181
+ * `requestPortalAssistantUiAction` helpers.
182
+ * Configure tools before starting a conversation; live replacement during a running turn is not supported.
167
183
  */
168
- accessor useProdDocAssistant: boolean;
184
+ accessor tools: PortalAssistantTools | undefined;
169
185
  accessor user: PortalUser;
170
186
  readonly arcgisPortalNavigationRequest: import("@arcgis/lumina").TargetedEvent<this, {
171
187
  href: string;
@@ -174,10 +190,4 @@ export abstract class ArcgisPortalAiAssistant extends LitElement {
174
190
  readonly "@eventTypes": {
175
191
  arcgisPortalNavigationRequest: ArcgisPortalAiAssistant["arcgisPortalNavigationRequest"]["detail"];
176
192
  };
177
- }
178
-
179
- /** @internal */
180
- export type PortalAiAssistantDisabledAgents = Partial<Record<PortalAiAssistantAgentKey, boolean>>;
181
-
182
- /** @internal */
183
- export type PortalAiAssistantAgentKey = "docAssistant" | "groupAnalytics" | "groupCreation" | "itemAnalytics" | "navigation";
193
+ }