@arcgis/portal-components 5.2.0-next.12 → 5.2.0-next.14

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 (47) hide show
  1. package/dist/cdn/{ROCZLAYA.js → 2RGMWFHB.js} +1 -1
  2. package/dist/cdn/{2X4VWQ5E.js → 3KS5IDT2.js} +1 -1
  3. package/dist/cdn/{XLHPYPQY.js → 47NPIL2S.js} +1 -1
  4. package/dist/cdn/{YKHMRMUE.js → 5VHBNEN3.js} +1 -1
  5. package/dist/cdn/CMPGO4XS.js +2 -0
  6. package/dist/cdn/{DB6O5DIG.js → DBKSQGEI.js} +1 -1
  7. package/dist/cdn/{W3ZB6MHE.js → EETBNQU2.js} +1 -1
  8. package/dist/cdn/{VHSATYO4.js → EHRAFAEA.js} +1 -1
  9. package/dist/cdn/{GS6MPCDK.js → EKO6SVAF.js} +1 -1
  10. package/dist/cdn/{MLPVRTHY.js → FI45QCN2.js} +1 -1
  11. package/dist/cdn/{JVKWYKZR.js → GEIZTD7F.js} +1 -1
  12. package/dist/cdn/{2V5S6KBL.js → HGSK6OFA.js} +1 -1
  13. package/dist/cdn/{4BGBBW4V.js → HIRM34QB.js} +1 -1
  14. package/dist/cdn/{KL4LVBFR.js → HJEFXVHY.js} +145 -145
  15. package/dist/cdn/HMBSJR37.js +2 -0
  16. package/dist/cdn/KT7PE6UE.js +2 -0
  17. package/dist/cdn/{XFFD6YY5.js → KY7Q7DH3.js} +1 -1
  18. package/dist/cdn/{IKOAI6C7.js → KZWW4BWJ.js} +1 -1
  19. package/dist/cdn/{4VRIZNFA.js → MLTQECPL.js} +1 -1
  20. package/dist/cdn/{VQU2EEJR.js → OKRYML2G.js} +1 -1
  21. package/dist/cdn/PDL3DPMG.js +2 -0
  22. package/dist/cdn/{Z73H62GB.js → QJ2UHWPU.js} +1 -1
  23. package/dist/cdn/{W6PSG4GX.js → VRXKORTR.js} +9 -4
  24. package/dist/cdn/{QGFU75HM.js → VXCB2YBR.js} +1 -1
  25. package/dist/cdn/{BMUU2S5H.js → WJ2NMHDE.js} +1 -1
  26. package/dist/cdn/{QN3ZQLFB.js → YECI7XG3.js} +1 -1
  27. package/dist/cdn/{SB25M4FP.js → ZDLFZJBT.js} +1 -1
  28. package/dist/cdn/index.js +1 -1
  29. package/dist/chunks/{groups2.js → item2.js} +28 -28
  30. package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
  31. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
  32. package/dist/components/arcgis-portal-ai-assistant/customElement.js +436 -432
  33. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
  34. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +4 -5
  35. package/dist/docs/api.json +1 -1
  36. package/dist/docs/docs.json +1 -1
  37. package/dist/docs/web-types.json +1 -1
  38. package/dist/loader.js +1 -1
  39. package/dist/types/lumina.d.ts +1 -1
  40. package/dist/types/preact.d.ts +1 -1
  41. package/dist/types/react.d.ts +1 -1
  42. package/dist/types/stencil.d.ts +1 -1
  43. package/package.json +5 -5
  44. package/dist/cdn/2CA7QHVV.js +0 -2
  45. package/dist/cdn/CTVWAEEO.js +0 -2
  46. package/dist/cdn/G3AK2CRM.js +0 -2
  47. package/dist/cdn/OMD65KRY.js +0 -2
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 a,y as e}from"./BMUU2S5H.js";import"./YIMNOUTF.js";var t=e(a,{"arcgis-portal-ai-assistant":[()=>import("./KL4LVBFR.js"),"autoDestroyDisabled,config:,defaultClosed,portal:,t9n:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./VHSATYO4.js"),"_messages:,message,options:,type"],"arcgis-portal-classification-banner":[()=>import("./W3ZB6MHE.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./XFFD6YY5.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./XLHPYPQY.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./VQU2EEJR.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-extent-picker":[()=>import("./MLPVRTHY.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./QN3ZQLFB.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./OMD65KRY.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./4VRIZNFA.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-card":[()=>import("./2X4VWQ5E.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("./SB25M4FP.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-item-type":[()=>import("./JVKWYKZR.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./CTVWAEEO.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-replacement-item-redirect":[()=>import("./2CA7QHVV.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-user-avatar":[()=>import("./IKOAI6C7.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-popup":[()=>import("./QGFU75HM.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("./2V5S6KBL.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)
2
+ import{P as a,z as e}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";var t=e(a,{"arcgis-portal-ai-assistant":[()=>import("./HJEFXVHY.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("./CMPGO4XS.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)
@@ -1,30 +1,10 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import n from "@arcgis/core/request.js";
3
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 = {}) {
4
+ async function l(o, t = {}) {
25
5
  return await o.queryGroups(t);
26
6
  }
27
- async function g(o, t) {
7
+ async function p(o, t) {
28
8
  const e = t.title.trim();
29
9
  if (!e)
30
10
  return { error: { code: "unhandledError", message: "Group title is required." } };
@@ -58,7 +38,7 @@ async function g(o, t) {
58
38
  };
59
39
  }
60
40
  }
61
- async function y(o, t, e) {
41
+ async function m(o, t, e) {
62
42
  if (!e.length)
63
43
  return { error: { code: "unhandledError", message: "At least one username is required." } };
64
44
  try {
@@ -77,10 +57,30 @@ async function y(o, t, e) {
77
57
  return console.error("Error adding users to portal group:", r), { error: { code: "unhandledError" } };
78
58
  }
79
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
80
  export {
81
- y as a,
82
- g as c,
83
- p as g,
84
- m as q,
85
- l as s
81
+ m as a,
82
+ p as c,
83
+ y as g,
84
+ l as q,
85
+ g as s
86
86
  };
@@ -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"];