@arcgis/portal-components 5.2.0-next.2 → 5.2.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 (100) hide show
  1. package/dist/cdn/25UUUQAQ.js +71 -0
  2. package/dist/cdn/{OQDPULPD.js → 2RGMWFHB.js} +1 -1
  3. package/dist/cdn/3KS5IDT2.js +2 -0
  4. package/dist/cdn/{AQWTJKUH.js → 3MQIRMUM.js} +9 -7
  5. package/dist/cdn/{JNRN6DTV.js → 47NPIL2S.js} +1 -1
  6. package/dist/cdn/{LQ3DMZ3K.js → 5VHBNEN3.js} +1 -1
  7. package/dist/cdn/6AGZRMJC.js +2 -0
  8. package/dist/cdn/6W2IHKCA.js +2 -0
  9. package/dist/cdn/{WOZDQW3S.js → DBKSQGEI.js} +1 -1
  10. package/dist/cdn/DFTUMKSN.js +3 -0
  11. package/dist/cdn/{YMPTDKT6.js → EETBNQU2.js} +1 -1
  12. package/dist/cdn/EHRAFAEA.js +65 -0
  13. package/dist/cdn/EKO6SVAF.js +2 -0
  14. package/dist/cdn/{GHQ3ZW4U.js → FI45QCN2.js} +1 -1
  15. package/dist/cdn/GEIZTD7F.js +2 -0
  16. package/dist/cdn/{ZTHTFEYA.js → HGSK6OFA.js} +1 -1
  17. package/dist/cdn/{LAFNDBTQ.js → HIRM34QB.js} +1 -1
  18. package/dist/cdn/HMBSJR37.js +2 -0
  19. package/dist/cdn/KT7PE6UE.js +2 -0
  20. package/dist/cdn/{BEHLBKKM.js → KY7Q7DH3.js} +1 -1
  21. package/dist/cdn/{5DPWJ7DI.js → KZWW4BWJ.js} +1 -1
  22. package/dist/cdn/{N6G6Z7BF.js → MH7KZ5G3.js} +256 -154
  23. package/dist/cdn/MLTQECPL.js +2 -0
  24. package/dist/cdn/{G47ZZQYL.js → OKRYML2G.js} +1 -1
  25. package/dist/cdn/PDL3DPMG.js +2 -0
  26. package/dist/cdn/{QNUYUNEY.js → QJ2UHWPU.js} +1 -1
  27. package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
  28. package/dist/cdn/TSLW4FSA.js +2 -0
  29. package/dist/cdn/{72N3KAXN.js → TW4LFQA5.js} +1 -1
  30. package/dist/cdn/{7WZHZP6U.js → UR7W4CEV.js} +8 -2
  31. package/dist/cdn/{W6PSG4GX.js → VRXKORTR.js} +9 -4
  32. package/dist/cdn/VXCB2YBR.js +3 -0
  33. package/dist/cdn/{DHHSKOUY.js → WJ2NMHDE.js} +1 -1
  34. package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
  35. package/dist/cdn/{53MSUMA3.js → XCZSPNKS.js} +16 -0
  36. package/dist/cdn/{K3HS2LQ7.js → YECI7XG3.js} +1 -1
  37. package/dist/cdn/ZDLFZJBT.js +2 -0
  38. package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
  39. package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
  40. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
  41. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
  42. package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
  43. package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
  44. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  45. package/dist/cdn/assets/portal-user-popup/t9n/messages.en.json +1 -0
  46. package/dist/cdn/index.js +1 -1
  47. package/dist/cdn/main.css +1 -1
  48. package/dist/chunks/groups.js +7 -83
  49. package/dist/chunks/item2.js +86 -0
  50. package/dist/chunks/portal.js +48 -8
  51. package/dist/chunks/user2.js +26 -25
  52. package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
  53. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
  54. package/dist/components/arcgis-portal-ai-assistant/customElement.js +797 -488
  55. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
  56. package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
  57. package/dist/components/arcgis-portal-group-badges/customElement.js +50 -0
  58. package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
  59. package/dist/components/arcgis-portal-group-badges/index.js +3 -0
  60. package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
  61. package/dist/components/arcgis-portal-group-card/customElement.d.ts +167 -0
  62. package/dist/components/arcgis-portal-group-card/customElement.js +187 -0
  63. package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
  64. package/dist/components/arcgis-portal-group-card/index.js +8 -0
  65. package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
  66. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
  67. package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
  68. package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
  69. package/dist/components/arcgis-portal-item-type/customElement.d.ts +2 -0
  70. package/dist/components/arcgis-portal-item-type/customElement.js +45 -37
  71. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
  72. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -42
  73. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
  74. package/dist/components/arcgis-portal-user-popup/customElement.js +231 -0
  75. package/dist/components/arcgis-portal-user-popup/index.d.ts +1 -0
  76. package/dist/components/arcgis-portal-user-popup/index.js +5 -0
  77. package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
  78. package/dist/docs/api.json +1 -1
  79. package/dist/docs/docs.json +1 -1
  80. package/dist/docs/vscode.html-custom-data.json +1 -1
  81. package/dist/docs/web-types.json +1 -1
  82. package/dist/index.d.ts +30 -2
  83. package/dist/loader.js +8 -4
  84. package/dist/types/lumina.d.ts +26 -1
  85. package/dist/types/preact.d.ts +30 -1
  86. package/dist/types/react.d.ts +34 -1
  87. package/dist/types/stencil.d.ts +26 -1
  88. package/dist/types/tracking.d.ts +10 -0
  89. package/dist/types/user.d.ts +2 -2
  90. package/package.json +7 -7
  91. package/dist/cdn/5VSDGPHH.js +0 -2
  92. package/dist/cdn/CI5ENGVT.js +0 -2
  93. package/dist/cdn/EVDOPN3G.js +0 -54
  94. package/dist/cdn/GNOZCQ34.js +0 -2
  95. package/dist/cdn/KEKBRUUC.js +0 -2
  96. package/dist/cdn/RNLVNDGG.js +0 -2
  97. package/dist/cdn/SM4GWLRA.js +0 -66
  98. package/dist/cdn/TMYTUOSS.js +0 -2
  99. package/dist/cdn/YG5YYL6X.js +0 -2
  100. /package/dist/cdn/{B7633S2A.js → 5NIJVBS7.js} +0 -0
@@ -1 +1 @@
1
- {"hosted":"hosted","hostedView":"hosted, view","hostedPhotos":"hosted, photos","hostedCollection":"hosted, collection","hostedMultidimensional":"hosted, multidimensional","hostedCollectionMultidimensional":"hosted, collection, multidimensional","collectionMultidimensional":"collection, multidimensional","multidimensional":"multidimensional","collection":"collection","photoLocations":"photos","locatorView":"view","utilityNetwork":"utility network","parcelFabric":"parcel fabric","parcelFabricHosted":"parcel fabric, hosted","Integrated Mesh":"integrated mesh","3D Object":"3D object","Point":"point","Point Cloud":"point cloud","Building Scene Layer":"building scene layer","Voxel Scene Layer":"voxel scene layer","dataStore":{"bigdata":"big data file share","cloud":"cloud","cloudStorage":"cloud storage","database":"database","folder":"folder"}}
1
+ {"hosted":"hosted","hostedView":"hosted, view","hostedPhotos":"hosted, photos","hostedCollection":"hosted, collection","hostedMultidimensional":"hosted, multidimensional","hostedCollectionMultidimensional":"hosted, collection, multidimensional","collectionMultidimensional":"collection, multidimensional","multidimensional":"multidimensional","query":"query","collection":"collection","photoLocations":"photos","locatorView":"view","utilityNetwork":"utility network","parcelFabric":"parcel fabric","parcelFabricHosted":"parcel fabric, hosted","Integrated Mesh":"integrated mesh","3D Object":"3D object","Point":"point","Point Cloud":"point cloud","Building Scene Layer":"building scene layer","Voxel Scene Layer":"voxel scene layer","dataStore":{"bigdata":"big data file share","cloud":"cloud","cloudStorage":"cloud storage","database":"database","folder":"folder"}}
@@ -0,0 +1 @@
1
+ {"expand":"Expand","showLess":"Show less","homepage":"Home page","gallery":"Gallery","profile":"Profile","groups":"Groups (${number})","items":"Items (${number})","viewAll":"View all","loadingUserInformation":"Loading user information","itemManagedBy":"Item managed by: ${username}"}
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{O as t,y as e}from"./DHHSKOUY.js";import"./YIMNOUTF.js";var a=e(t,{"arcgis-portal-ai-assistant":[()=>import("./N6G6Z7BF.js"),"autoDestroyDisabled,config:,defaultClosed,portal:,t9n:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./SM4GWLRA.js"),"_messages:,message,options:,type"],"arcgis-portal-classification-banner":[()=>import("./YMPTDKT6.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./BEHLBKKM.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./JNRN6DTV.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./G47ZZQYL.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-extent-picker":[()=>import("./GHQ3ZW4U.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./K3HS2LQ7.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./YG5YYL6X.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-item-type":[()=>import("./TMYTUOSS.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./CI5ENGVT.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-replacement-item-redirect":[()=>import("./GNOZCQ34.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-user-avatar":[()=>import("./5DPWJ7DI.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-voice-input":[()=>import("./ZTHTFEYA.js"),"language;clearText,startListening,stopListening"]});a({resourcesUrl:import.meta.url});var s=new CSSStyleSheet;s.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,s];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,t)
2
+ import{P as a,z as e}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";var t=e(a,{"arcgis-portal-ai-assistant":[()=>import("./MH7KZ5G3.js"),"autoDestroyDisabled,config:,defaultClosed,navigationTargetMap:,portal:,t9n:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./EHRAFAEA.js"),"_messages:,message,options:,type"],"arcgis-portal-classification-banner":[()=>import("./EETBNQU2.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./KY7Q7DH3.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./47NPIL2S.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./OKRYML2G.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-extent-picker":[()=>import("./FI45QCN2.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./YECI7XG3.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./PDL3DPMG.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./MLTQECPL.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-card":[()=>import("./3KS5IDT2.js"),"disabled,group:,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showBadges,showDateCreated,showDateUpdated,showOwner,showSummary,showViewableBy,user:,view;restoreFocus"],"arcgis-portal-group-thumbnail":[()=>import("./ZDLFZJBT.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-item-type":[()=>import("./GEIZTD7F.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./KT7PE6UE.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-replacement-item-redirect":[()=>import("./TSLW4FSA.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-user-avatar":[()=>import("./KZWW4BWJ.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-popup":[()=>import("./VXCB2YBR.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./HGSK6OFA.js"),"language;clearText,startListening,stopListening"]});t({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-card,arcgis-portal-group-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
package/dist/cdn/main.css CHANGED
@@ -1 +1 @@
1
- @layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-voice-input){visibility:hidden}}
1
+ @layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-card,arcgis-portal-group-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}
@@ -1,86 +1,10 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import n from "@arcgis/core/request.js";
3
- import { g as a } from "./portal.js";
4
- const l = async (o, t, e) => {
5
- try {
6
- return { result: await o.queryItems({ ...e, query: `title:${t}` }) };
7
- } catch (r) {
8
- return console.error(r), { error: { code: "unhandledError" } };
9
- }
10
- }, p = async (o, t, e) => {
11
- const r = `${t.restUrl}/content/users/${o.id}/items/${e}/generateContext`;
12
- try {
13
- return {
14
- result: (await n(r, {
15
- method: "post",
16
- responseType: "json",
17
- query: { f: "json" }
18
- })).data
19
- };
20
- } catch (s) {
21
- return console.error("Error fetching item context:", s), { error: { code: "unhandledError" } };
22
- }
23
- };
24
- async function m(o, t = {}) {
25
- return await o.queryGroups(t);
26
- }
27
- async function g(o, t) {
28
- const e = t.title.trim();
29
- if (!e)
30
- return { error: { code: "unhandledError", message: "Group title is required." } };
31
- try {
32
- const { data: r } = await n(`${a(o)}community/createGroup`, {
33
- method: "post",
34
- responseType: "json",
35
- query: {
36
- f: "json",
37
- ...t,
38
- title: e
39
- }
40
- });
41
- return !r.success || !r.group?.id ? {
42
- error: {
43
- code: "unhandledError",
44
- message: "Unable to create a group with the provided title."
45
- }
46
- } : {
47
- result: {
48
- id: r.group.id,
49
- title: r.group.title || e
50
- }
51
- };
52
- } catch (r) {
53
- return console.error("Error creating portal group:", r), {
54
- error: {
55
- code: "unhandledError",
56
- message: r.details.messages.join(",")
57
- }
58
- };
59
- }
60
- }
61
- async function y(o, t, e) {
62
- if (!e.length)
63
- return { error: { code: "unhandledError", message: "At least one username is required." } };
64
- try {
65
- const { data: r } = await n(
66
- `${a(o)}community/groups/${t}/addUsers`,
67
- {
68
- method: "post",
69
- responseType: "json",
70
- query: { f: "json", users: e.join(",") }
71
- }
72
- ), s = r.notAdded;
73
- return {
74
- result: { addedUsernames: s?.length ? e.filter((d) => !s.includes(d)) : e, notAddedUsers: r.notAddedDetails }
75
- };
76
- } catch (r) {
77
- return console.error("Error adding users to portal group:", r), { error: { code: "unhandledError" } };
78
- }
79
- }
2
+ const e = (s) => s.sourceJSON, t = (s) => e(s)?.capabilities ?? [], i = (s) => e(s).orgId, o = (s) => e(s).membershipAccess, a = (s) => e(s).isOpenData === !0, r = (s) => t(s).includes("distributed");
80
3
  export {
81
- y as a,
82
- g as c,
83
- p as g,
84
- m as q,
85
- l as s
4
+ i as a,
5
+ o as b,
6
+ e as c,
7
+ r as d,
8
+ t as g,
9
+ a as i
86
10
  };
@@ -0,0 +1,86 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import n from "@arcgis/core/request.js";
3
+ import { g as a } from "./portal.js";
4
+ async function l(o, t = {}) {
5
+ return await o.queryGroups(t);
6
+ }
7
+ async function p(o, t) {
8
+ const e = t.title.trim();
9
+ if (!e)
10
+ return { error: { code: "unhandledError", message: "Group title is required." } };
11
+ try {
12
+ const { data: r } = await n(`${a(o)}community/createGroup`, {
13
+ method: "post",
14
+ responseType: "json",
15
+ query: {
16
+ f: "json",
17
+ ...t,
18
+ title: e
19
+ }
20
+ });
21
+ return !r.success || !r.group?.id ? {
22
+ error: {
23
+ code: "unhandledError",
24
+ message: "Unable to create a group with the provided title."
25
+ }
26
+ } : {
27
+ result: {
28
+ id: r.group.id,
29
+ title: r.group.title || e
30
+ }
31
+ };
32
+ } catch (r) {
33
+ return console.error("Error creating portal group:", r), {
34
+ error: {
35
+ code: "unhandledError",
36
+ message: r.details.messages.join(",")
37
+ }
38
+ };
39
+ }
40
+ }
41
+ async function m(o, t, e) {
42
+ if (!e.length)
43
+ return { error: { code: "unhandledError", message: "At least one username is required." } };
44
+ try {
45
+ const { data: r } = await n(
46
+ `${a(o)}community/groups/${t}/addUsers`,
47
+ {
48
+ method: "post",
49
+ responseType: "json",
50
+ query: { f: "json", users: e.join(",") }
51
+ }
52
+ ), s = r.notAdded;
53
+ return {
54
+ result: { addedUsernames: s?.length ? e.filter((d) => !s.includes(d)) : e, notAddedUsers: r.notAddedDetails }
55
+ };
56
+ } catch (r) {
57
+ return console.error("Error adding users to portal group:", r), { error: { code: "unhandledError" } };
58
+ }
59
+ }
60
+ const g = async (o, t, e) => {
61
+ try {
62
+ return { result: await o.queryItems({ ...e, query: `title:${t}` }) };
63
+ } catch (r) {
64
+ return console.error(r), { error: { code: "unhandledError" } };
65
+ }
66
+ }, y = async (o, t, e) => {
67
+ const r = `${t.restUrl}/content/users/${o.id}/items/${e}/generateContext`;
68
+ try {
69
+ return {
70
+ result: (await n(r, {
71
+ method: "post",
72
+ responseType: "json",
73
+ query: { f: "json" }
74
+ })).data
75
+ };
76
+ } catch (s) {
77
+ return console.error("Error fetching item context:", s), { error: { code: "unhandledError" } };
78
+ }
79
+ };
80
+ export {
81
+ m as a,
82
+ p as c,
83
+ y as g,
84
+ l as q,
85
+ g as s
86
+ };
@@ -1,16 +1,56 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const n = (e) => e && !e.endsWith("/") ? `${e}/` : e;
3
- function t(e) {
4
- return n(e.restUrl);
2
+ const s = (e) => e && !e.endsWith("/") ? `${e}/` : e;
3
+ function i(e) {
4
+ return s(e.restUrl);
5
5
  }
6
- function s(e) {
6
+ function p(e) {
7
7
  return e.credential?.token || e.token || e.user?.credential?.token || e.portalUser?.token || "";
8
8
  }
9
- function i(e) {
9
+ function c(e) {
10
10
  return e.sourceJSON?.isWebTierAuth;
11
11
  }
12
+ function a(e, r, t) {
13
+ if (!r?.type)
14
+ return !1;
15
+ const n = r.typeKeywords ?? [];
16
+ switch (e) {
17
+ case "arcgisinstantapps":
18
+ return r.type === "Web Mapping Application" && n.includes("configurableApp");
19
+ case "arcgis360vr":
20
+ return !t && r.type === "360 VR Experience";
21
+ case "survey123":
22
+ return r.type === "Form";
23
+ case "datapipelines":
24
+ return r.type === "Data Pipeline";
25
+ case "dashboards":
26
+ return r.type === "Dashboard";
27
+ case "experienceBuilder":
28
+ return r.type === "Web Experience" || r.type === "Web Experience Template";
29
+ case "webappbuilder":
30
+ return r.type === "Web Mapping Application" && (n.includes("Web AppBuilder") || n.includes("WebAppBuilder"));
31
+ case "fieldmaps":
32
+ return r.type === "Web Map";
33
+ case "arcgisnotebooks":
34
+ return r.type === "Notebook";
35
+ case "HubforArcGIS":
36
+ return [
37
+ "Discussion",
38
+ "Hub Page",
39
+ "Hub Initiative Template",
40
+ "Hub Initiative",
41
+ "Hub Event",
42
+ "Hub Project"
43
+ ].includes(r.type);
44
+ default:
45
+ return !1;
46
+ }
47
+ }
48
+ function u(e, r, t) {
49
+ return (r ?? []).some((n) => a(n, e, t));
50
+ }
12
51
  export {
13
- s as a,
14
- t as g,
15
- i
52
+ p as a,
53
+ u as b,
54
+ i as g,
55
+ c as i
16
56
  };
@@ -3,28 +3,28 @@ import { i as C, a as b, g as w } from "./portal.js";
3
3
  import E from "@arcgis/core/identity/IdentityManager.js";
4
4
  import A from "@arcgis/core/request.js";
5
5
  const u = {}, f = {}, l = {};
6
- async function p({ requester: t, key: e, id: n, cacheOption: s }) {
7
- const r = l[e]?.[n]?.expireAt, i = !!r && (/* @__PURE__ */ new Date()).getTime() > r;
8
- if (u[e]?.[n] && !i)
9
- return u[e][n];
10
- f[e] || (f[e] = {}), (!f[e][n] || i) && (f[e][n] = t());
11
- const o = await f[e][n];
12
- if (u[e] || (u[e] = {}), l[e] || (l[e] = {}), u[e][n] = o, s) {
13
- const { expireAfter: a, getExpireAfterFromResult: c } = s, h = c || a ? (/* @__PURE__ */ new Date()).getTime() + (c?.(o) ?? a ?? 0) : null;
14
- l[e][n] = { ...l[e][n], expireAt: h };
6
+ async function p({ requester: t, key: e, id: s, cacheOption: n }) {
7
+ const r = l[e]?.[s]?.expireAt, i = !!r && (/* @__PURE__ */ new Date()).getTime() > r;
8
+ if (u[e]?.[s] && !i)
9
+ return u[e][s];
10
+ f[e] || (f[e] = {}), (!f[e][s] || i) && (f[e][s] = t());
11
+ const o = await f[e][s];
12
+ if (u[e] || (u[e] = {}), l[e] || (l[e] = {}), u[e][s] = o, n) {
13
+ const { expireAfter: a, getExpireAfterFromResult: c } = n, h = c || a ? (/* @__PURE__ */ new Date()).getTime() + (c?.(o) ?? a ?? 0) : null;
14
+ l[e][s] = { ...l[e][s], expireAt: h };
15
15
  }
16
16
  return o;
17
17
  }
18
18
  async function x({
19
19
  url: t,
20
20
  portal: e,
21
- params: n = {},
22
- options: s = {},
21
+ params: s = {},
22
+ options: n = {},
23
23
  method: r,
24
24
  abortControllerId: i,
25
25
  excludeJson: o
26
26
  }) {
27
- const a = R(i)?.signal, { customToken: c, addTokenManually: h, addSSL: P, useProxy: S } = s, m = { ...n };
27
+ const a = R(i)?.signal, { customToken: c, addTokenManually: h, addSSL: P, useProxy: S } = n, m = { ...s };
28
28
  if (!t.includes("f=") && !o && (m.f = "json"), c)
29
29
  m.token = c;
30
30
  else if (h !== !1) {
@@ -34,10 +34,10 @@ async function x({
34
34
  const T = P ? U(t, e) : t, q = {
35
35
  query: m,
36
36
  method: r || "auto",
37
- ...s,
38
- timeout: s.timeout || 0,
37
+ ...n,
38
+ timeout: n.timeout || 0,
39
39
  useProxy: S,
40
- ...s?.disableIdentityLookup ? { authMode: "anonymous" } : {}
40
+ ...n?.disableIdentityLookup ? { authMode: "anonymous" } : {}
41
41
  }, y = await A(T, { signal: a, ...q });
42
42
  return i && (d[i] = void 0), y.data;
43
43
  }
@@ -50,24 +50,24 @@ const $ = async (t) => {
50
50
  const e = C(t);
51
51
  if (!t?.isPortal || !e)
52
52
  return b(t);
53
- const n = t?.user;
54
- if (!n && e)
53
+ const s = t?.user;
54
+ if (!s && e)
55
55
  return;
56
- const { token: s } = await p({
56
+ const { token: n } = await p({
57
57
  requester: async () => await L(t),
58
58
  key: "platformSelf",
59
- id: n?.id ?? t.id ?? "<unknown>",
59
+ id: s?.id ?? t.id ?? "<unknown>",
60
60
  cacheOption: { getExpireAfterFromResult: (r) => r.expires_in }
61
61
  });
62
- return s;
62
+ return n;
63
63
  }, L = async (t) => {
64
- const n = {
64
+ const s = {
65
65
  "X-Esri-Auth-Client-Id": await M(t),
66
66
  "X-Esri-Auth-Redirect-Uri": window.location.href.replace(/#.*$/u, "")
67
67
  };
68
68
  return (await A(`${w(t)}/oauth2/platformSelf`, {
69
69
  authMode: "no-prompt",
70
- headers: n,
70
+ headers: s,
71
71
  withCredentials: !0,
72
72
  method: "post"
73
73
  })).data;
@@ -79,8 +79,8 @@ const $ = async (t) => {
79
79
  function U(t, e) {
80
80
  return window.location.protocol === "https:" || e.allSSL ? t.replace("http:", "https:") : t;
81
81
  }
82
- async function B(t, e, n) {
83
- const r = `${n ? "https://www.arcgis.com/sharing/rest/" : w(e)}community/users/${t}`, i = r?.includes("www.arcgis.com") && e.isPortal, o = r?.includes(".arcgis.com") && !e.isPortal && !e.user, a = i || o ? { disableIdentityLookup: !0, addTokenManually: !1 } : {};
82
+ async function B(t, e, s) {
83
+ const r = `${s ? "https://www.arcgis.com/sharing/rest/" : w(e)}community/users/${t}`, i = r?.includes("www.arcgis.com") && e.isPortal, o = r?.includes(".arcgis.com") && !e.isPortal && !e.user, a = i || o ? { disableIdentityLookup: !0, addTokenManually: !1 } : {};
84
84
  return await p({
85
85
  requester: async () => {
86
86
  try {
@@ -109,5 +109,6 @@ const k = async (t) => {
109
109
  export {
110
110
  p as a,
111
111
  k as b,
112
- B as f
112
+ B as f,
113
+ x as r
113
114
  };
@@ -1,7 +1,16 @@
1
- export type DocAssistantNavigationTarget = { destinationType: "portal-content"; } | {
1
+ export type PortalNavigationTarget = { destinationType: "portal-content"; } | {
2
2
  destinationType: "portal-group";
3
3
  groupId: string;
4
4
  } | { destinationType: "portal-groups"; } | {
5
5
  destinationType: "portal-item";
6
6
  itemId: string;
7
- };
7
+ };
8
+
9
+ export type PartialPortalNavigationTargetMap = Partial<PortalNavigationTargetMap>;
10
+
11
+ export interface PortalNavigationTargetMap {
12
+ "portal-content": string;
13
+ "portal-groups": string;
14
+ "portal-item": (itemId: string) => string;
15
+ "portal-group": (groupId: string) => string;
16
+ }
@@ -3,7 +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 { Config } from "@arcgis/core/config.js";
5
5
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
6
- import type { DocAssistantNavigationTarget } from "./agents/types.js";
6
+ import type { PartialPortalNavigationTargetMap, PortalNavigationTarget } from "./agents/types.js";
7
7
  import type { T9nMeta } from "@arcgis/lumina/controllers";
8
8
 
9
9
  /** @internal */
@@ -13,6 +13,8 @@ export abstract class ArcgisPortalAiAssistant extends LitElement {
13
13
  accessor config: Config;
14
14
  /** @default false */
15
15
  accessor defaultClosed: boolean;
16
+ /** Optional map of navigation target overrides for generating navigation hrefs from portal navigation suggestions. */
17
+ accessor navigationTargetMap: PartialPortalNavigationTargetMap | undefined;
16
18
  accessor portal: Portal;
17
19
  /** @internal */
18
20
  protected t9n: {
@@ -113,7 +115,7 @@ export abstract class ArcgisPortalAiAssistant extends LitElement {
113
115
  accessor user: PortalUser;
114
116
  readonly arcgisPortalNavigationRequest: import("@arcgis/lumina").TargetedEvent<this, {
115
117
  href: string;
116
- targetDetail: DocAssistantNavigationTarget;
118
+ targetDetail: PortalNavigationTarget;
117
119
  }>;
118
120
  readonly "@eventTypes": {
119
121
  arcgisPortalNavigationRequest: ArcgisPortalAiAssistant["arcgisPortalNavigationRequest"]["detail"];