@esri/hub-web-components 0.0.5

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 (70) hide show
  1. package/LICENSE.md +13 -0
  2. package/README.md +35 -0
  3. package/dist/cdn/2NFBUAOJ.js +4 -0
  4. package/dist/cdn/3ZRJV7VD.js +3 -0
  5. package/dist/cdn/CADUTR4A.js +4 -0
  6. package/dist/cdn/E5QHKHGG.js +41 -0
  7. package/dist/cdn/IDWXUFCL.js +6 -0
  8. package/dist/cdn/MNXAWZSB.js +9 -0
  9. package/dist/cdn/YBCM3RPB.js +4 -0
  10. package/dist/cdn/assets/hub-ai-assistant/t9n/messages.en.json +1 -0
  11. package/dist/cdn/assets/hub-ai-assistant/t9n/messages.es.json +1 -0
  12. package/dist/cdn/index.js +4 -0
  13. package/dist/chunks/chat-action.js +41 -0
  14. package/dist/chunks/runtime.js +12 -0
  15. package/dist/components/arcgis-chat-shell/customElement.d.ts +27 -0
  16. package/dist/components/arcgis-chat-shell/customElement.js +44 -0
  17. package/dist/components/arcgis-chat-shell/index.d.ts +5 -0
  18. package/dist/components/arcgis-chat-shell/index.js +5 -0
  19. package/dist/components/arcgis-chat-ui/components/chat-action/customElement.d.ts +9 -0
  20. package/dist/components/arcgis-chat-ui/components/chat-action/customElement.js +9 -0
  21. package/dist/components/arcgis-chat-ui/components/chat-action/index.d.ts +2 -0
  22. package/dist/components/arcgis-chat-ui/components/chat-action/index.js +2 -0
  23. package/dist/components/arcgis-chat-ui/components/chat-response/customElement.d.ts +9 -0
  24. package/dist/components/arcgis-chat-ui/components/chat-response/customElement.js +42 -0
  25. package/dist/components/arcgis-chat-ui/components/chat-response/index.d.ts +8 -0
  26. package/dist/components/arcgis-chat-ui/components/chat-response/index.js +8 -0
  27. package/dist/components/arcgis-chat-ui/components/chat-status/customElement.d.ts +6 -0
  28. package/dist/components/arcgis-chat-ui/components/chat-status/customElement.js +8 -0
  29. package/dist/components/arcgis-chat-ui/components/chat-status/index.d.ts +1 -0
  30. package/dist/components/arcgis-chat-ui/components/chat-status/index.js +1 -0
  31. package/dist/components/arcgis-chat-ui/customElement.d.ts +58 -0
  32. package/dist/components/arcgis-chat-ui/customElement.js +127 -0
  33. package/dist/components/arcgis-chat-ui/index.d.ts +3 -0
  34. package/dist/components/arcgis-chat-ui/index.js +3 -0
  35. package/dist/components/arcgis-chat-ui/util/constants.d.ts +4 -0
  36. package/dist/components/arcgis-chat-ui/util/customElement.d.ts +3 -0
  37. package/dist/components/arcgis-chat-ui/util/types.d.ts +27 -0
  38. package/dist/components/arcgis-hub-ai-assistant/customElement.d.ts +90 -0
  39. package/dist/components/arcgis-hub-ai-assistant/customElement.js +210 -0
  40. package/dist/components/arcgis-hub-ai-assistant/index.d.ts +9 -0
  41. package/dist/components/arcgis-hub-ai-assistant/index.js +9 -0
  42. package/dist/components/arcgis-hub-ai-assistant/util/api.d.ts +25 -0
  43. package/dist/components/arcgis-hub-ai-assistant/util/customElement.d.ts +18 -0
  44. package/dist/components/arcgis-hub-ai-assistant/util/customElement.js +33 -0
  45. package/dist/components/arcgis-hub-ai-assistant/util/framework.d.ts +184 -0
  46. package/dist/components/arcgis-hub-ai-assistant/util/index.d.ts +1 -0
  47. package/dist/components/arcgis-hub-ai-assistant/util/index.js +1 -0
  48. package/dist/components/arcgis-hub-ai-assistant/util/test.d.ts +1387 -0
  49. package/dist/controllers/useT9n.d.ts +1 -0
  50. package/dist/docs/api.json +1113 -0
  51. package/dist/docs/docs.json +1010 -0
  52. package/dist/docs/vscode.css-custom-data.json +6 -0
  53. package/dist/docs/vscode.html-custom-data.json +133 -0
  54. package/dist/docs/web-types.json +413 -0
  55. package/dist/embed-config.d.ts +18 -0
  56. package/dist/embed-config.js +24 -0
  57. package/dist/enums.d.ts +10 -0
  58. package/dist/index.d.ts +74 -0
  59. package/dist/index.js +8 -0
  60. package/dist/loader.d.ts +2 -0
  61. package/dist/loader.js +13 -0
  62. package/dist/main.css +1 -0
  63. package/dist/runtime.d.ts +6 -0
  64. package/dist/types/components.d.ts +1 -0
  65. package/dist/types/lumina.d.ts +28 -0
  66. package/dist/types/preact.d.ts +36 -0
  67. package/dist/types/react.d.ts +47 -0
  68. package/dist/types/stencil.d.ts +35 -0
  69. package/dist/util/configuration.d.ts +16 -0
  70. package/package.json +99 -0
@@ -0,0 +1,74 @@
1
+ import type { ChatShell } from "./components/arcgis-chat-shell";
2
+ import type { ArcgisChatUI } from "./components/arcgis-chat-ui";
3
+ import type { ArcGISHubAIAssistant } from "./components/arcgis-hub-ai-assistant";
4
+
5
+ /**
6
+ * Place in this file any utility functions you wish to expose for the consumers
7
+ * of your package
8
+ */
9
+ export { getAssetPath, setAssetPath } from './runtime';
10
+
11
+
12
+ export interface ArcgisChatShellCustomEvent<T> extends CustomEvent<T> {
13
+ detail: T;
14
+ target: HTMLArcgisChatShellElement;
15
+ currentTarget: HTMLArcgisChatShellElement;
16
+ }
17
+ export interface ArcgisChatUiCustomEvent<T> extends CustomEvent<T> {
18
+ detail: T;
19
+ target: HTMLArcgisChatUiElement;
20
+ currentTarget: HTMLArcgisChatUiElement;
21
+ }
22
+ export interface ArcgisHubAiAssistantCustomEvent<T> extends CustomEvent<T> {
23
+ detail: T;
24
+ target: HTMLArcgisHubAiAssistantElement;
25
+ currentTarget: HTMLArcgisHubAiAssistantElement;
26
+ }
27
+
28
+ export { ToEvents, TargetedEvent } from "@arcgis/lumina";
29
+
30
+ declare global {
31
+ interface HTMLElementTagNameMap {
32
+ "arcgis-chat-shell": HTMLArcgisChatShellElement;
33
+ "arcgis-chat-ui": HTMLArcgisChatUiElement;
34
+ "arcgis-hub-ai-assistant": HTMLArcgisHubAiAssistantElement;
35
+ }
36
+
37
+ interface HTMLArcgisChatShellElementEventMap {
38
+ "arcgisUpdateMapVisibility": ChatShell["arcgisUpdateMapVisibility"]["detail"];
39
+ }
40
+
41
+ interface HTMLArcgisChatShellElement extends ChatShell {
42
+ addEventListener<K extends keyof HTMLArcgisChatShellElementEventMap>(type: K, listener: (this: HTMLArcgisChatShellElement, ev: ArcgisChatShellCustomEvent<HTMLArcgisChatShellElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
43
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
44
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
45
+ removeEventListener<K extends keyof HTMLArcgisChatShellElementEventMap>(type: K, listener: (this: HTMLArcgisChatShellElement, ev: ArcgisChatShellCustomEvent<HTMLArcgisChatShellElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
46
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
47
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
48
+ }
49
+ interface HTMLArcgisChatUiElementEventMap {
50
+ "arcgisAddDataClick": ArcgisChatUI["arcgisAddDataClick"]["detail"];
51
+ "arcgisLocationClick": ArcgisChatUI["arcgisLocationClick"]["detail"];
52
+ }
53
+
54
+ interface HTMLArcgisChatUiElement extends ArcgisChatUI {
55
+ addEventListener<K extends keyof HTMLArcgisChatUiElementEventMap>(type: K, listener: (this: HTMLArcgisChatUiElement, ev: ArcgisChatUiCustomEvent<HTMLArcgisChatUiElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
56
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
57
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
58
+ removeEventListener<K extends keyof HTMLArcgisChatUiElementEventMap>(type: K, listener: (this: HTMLArcgisChatUiElement, ev: ArcgisChatUiCustomEvent<HTMLArcgisChatUiElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
59
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
60
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
61
+ }
62
+ interface HTMLArcgisHubAiAssistantElementEventMap {
63
+ "arcgisAddLayer": ArcGISHubAIAssistant["arcgisAddLayer"]["detail"];
64
+ }
65
+
66
+ interface HTMLArcgisHubAiAssistantElement extends ArcGISHubAIAssistant {
67
+ addEventListener<K extends keyof HTMLArcgisHubAiAssistantElementEventMap>(type: K, listener: (this: HTMLArcgisHubAiAssistantElement, ev: ArcgisHubAiAssistantCustomEvent<HTMLArcgisHubAiAssistantElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
68
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
69
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
70
+ removeEventListener<K extends keyof HTMLArcgisHubAiAssistantElementEventMap>(type: K, listener: (this: HTMLArcgisHubAiAssistantElement, ev: ArcgisHubAiAssistantCustomEvent<HTMLArcgisHubAiAssistantElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
71
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
72
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
73
+ }
74
+ }
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { g as e, s as a } from "./chunks/runtime.js";
2
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/0.0/esri/copyright.txt for details.
4
+ v0.0.5 */
5
+ export {
6
+ e as getAssetPath,
7
+ a as setAssetPath
8
+ };
@@ -0,0 +1,2 @@
1
+ import "./index";
2
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;
package/dist/loader.js ADDED
@@ -0,0 +1,13 @@
1
+ import { r as e } from "./chunks/runtime.js";
2
+ import { makeDefineCustomElements as t } from "@arcgis/lumina";
3
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
+ See https://js.arcgis.com/0.0/esri/copyright.txt for details.
5
+ v0.0.5 */
6
+ const o = t(e, {
7
+ "arcgis-chat-shell": [() => import("./components/arcgis-chat-shell/customElement.js"), "aboutContent,aboutVisible,chatComponent:,featureTable:,map:,mapEnabled,mapVisible"],
8
+ "arcgis-chat-ui": [() => import("./components/arcgis-chat-ui/customElement.js"), "botDescription,botTitle,conversationId,defaultSuggestions:,devFeatureMessage:,getFinderResponse:,inputText;;submitUserMessage"],
9
+ "arcgis-hub-ai-assistant": [() => import("./components/arcgis-hub-ai-assistant/customElement.js"), "apiUrl,authentication:,botDescription,botTitle,context,defaultSuggestions:,entityId,extent:,hub,itemId,language,location,mapBasemap,mapEnabled,mapLayers:,mapShowTable,mapVisible,portalUrl"]
10
+ });
11
+ export {
12
+ o as defineCustomElements
13
+ };
package/dist/main.css ADDED
@@ -0,0 +1 @@
1
+ :not([hydrated]):is(arcgis-chat-shell,arcgis-chat-ui,arcgis-hub-ai-assistant){visibility:hidden}:root{--acme-components-text-color: #111}
@@ -0,0 +1,6 @@
1
+ export declare const runtime: import('@arcgis/lumina').Runtime;
2
+ /**
3
+ * "customElement" needs to be exported - it will be used by the build system.
4
+ * You should not call it directly.
5
+ */
6
+ export declare const customElement: (tagName: string, component: typeof import('@arcgis/lumina').LitElement) => void, getAssetPath: (suffix: string) => string, setAssetPath: (path: URL | string) => void;
@@ -0,0 +1 @@
1
+ export * from "./stencil";
@@ -0,0 +1,28 @@
1
+ /// <reference types="../index.d.ts" />
2
+ import type { ChatShell } from "../components/arcgis-chat-shell";
3
+ import type { ArcgisChatUI } from "../components/arcgis-chat-ui";
4
+ import type { ArcGISHubAIAssistant } from "../components/arcgis-hub-ai-assistant";
5
+ import type { h, EventHandler } from "@arcgis/lumina";
6
+
7
+ interface LuminaArcgisChatShell extends Partial<Pick<ChatShell, 'aboutContent' | 'aboutVisible' | 'chatComponent' | 'featureTable' | 'map' | 'mapEnabled' | 'mapVisible'>>, h.JSX.HTMLAttributes<HTMLArcgisChatShellElement> {
8
+ onarcgisUpdateMapVisibility?: EventHandler<HTMLArcgisChatShellElement["arcgisUpdateMapVisibility"]>;
9
+ }
10
+
11
+ interface LuminaArcgisChatUi extends Partial<Pick<ArcgisChatUI, 'botDescription' | 'botTitle' | 'conversationId' | 'defaultSuggestions' | 'devFeatureMessage' | 'getFinderResponse' | 'inputText'>>, h.JSX.HTMLAttributes<HTMLArcgisChatUiElement> {
12
+ onarcgisAddDataClick?: EventHandler<HTMLArcgisChatUiElement["arcgisAddDataClick"]>;
13
+ onarcgisLocationClick?: EventHandler<HTMLArcgisChatUiElement["arcgisLocationClick"]>;
14
+ }
15
+
16
+ interface LuminaArcgisHubAiAssistant extends Partial<Pick<ArcGISHubAIAssistant, 'apiUrl' | 'authentication' | 'botDescription' | 'botTitle' | 'context' | 'defaultSuggestions' | 'entityId' | 'extent' | 'hub' | 'itemId' | 'language' | 'location' | 'mapBasemap' | 'mapEnabled' | 'mapLayers' | 'mapShowTable' | 'mapVisible' | 'portalUrl'>>, h.JSX.HTMLAttributes<HTMLArcgisHubAiAssistantElement> {
17
+ onarcgisAddLayer?: EventHandler<HTMLArcgisHubAiAssistantElement["arcgisAddLayer"]>;
18
+ }
19
+
20
+ declare module "@arcgis/lumina" {
21
+ export namespace h.JSX {
22
+ interface IntrinsicElements {
23
+ "arcgis-chat-shell": LuminaArcgisChatShell;
24
+ "arcgis-chat-ui": LuminaArcgisChatUi;
25
+ "arcgis-hub-ai-assistant": LuminaArcgisHubAiAssistant;
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,36 @@
1
+ /// <reference types="../index.d.ts" />
2
+ import type { ChatShell } from "../components/arcgis-chat-shell";
3
+ import type { ArcgisChatUI } from "../components/arcgis-chat-ui";
4
+ import type { ArcGISHubAIAssistant } from "../components/arcgis-hub-ai-assistant";
5
+ import { JSX as PreactJsx } from "preact";
6
+ import type { EventHandler } from "@arcgis/lumina";
7
+
8
+ interface PreactArcgisChatShell extends Partial<Pick<ChatShell, 'aboutContent' | 'aboutVisible' | 'chatComponent' | 'featureTable' | 'map' | 'mapEnabled' | 'mapVisible'>>, PreactJsx.HTMLAttributes<HTMLArcgisChatShellElement> {
9
+ onarcgisUpdateMapVisibility?: EventHandler<HTMLArcgisChatShellElement["arcgisUpdateMapVisibility"]>;
10
+ }
11
+
12
+ interface PreactArcgisChatUi extends Partial<Pick<ArcgisChatUI, 'botDescription' | 'botTitle' | 'conversationId' | 'defaultSuggestions' | 'devFeatureMessage' | 'getFinderResponse' | 'inputText'>>, PreactJsx.HTMLAttributes<HTMLArcgisChatUiElement> {
13
+ onarcgisAddDataClick?: EventHandler<HTMLArcgisChatUiElement["arcgisAddDataClick"]>;
14
+ onarcgisLocationClick?: EventHandler<HTMLArcgisChatUiElement["arcgisLocationClick"]>;
15
+ }
16
+
17
+ interface PreactArcgisHubAiAssistant extends Partial<Pick<ArcGISHubAIAssistant, 'apiUrl' | 'authentication' | 'botDescription' | 'botTitle' | 'context' | 'defaultSuggestions' | 'entityId' | 'extent' | 'hub' | 'itemId' | 'language' | 'location' | 'mapBasemap' | 'mapEnabled' | 'mapLayers' | 'mapShowTable' | 'mapVisible' | 'portalUrl'>>, PreactJsx.HTMLAttributes<HTMLArcgisHubAiAssistantElement> {
18
+ onarcgisAddLayer?: EventHandler<HTMLArcgisHubAiAssistantElement["arcgisAddLayer"]>;
19
+ }
20
+
21
+ declare module 'preact' {
22
+ namespace createElement.JSX {
23
+ interface IntrinsicElements extends PreactJsx.IntrinsicElements {
24
+ "arcgis-chat-shell": PreactArcgisChatShell;
25
+ "arcgis-chat-ui": PreactArcgisChatUi;
26
+ "arcgis-hub-ai-assistant": PreactArcgisHubAiAssistant;
27
+ }
28
+ }
29
+ namespace h.JSX {
30
+ interface IntrinsicElements extends PreactJsx.IntrinsicElements {
31
+ "arcgis-chat-shell": PreactArcgisChatShell;
32
+ "arcgis-chat-ui": PreactArcgisChatUi;
33
+ "arcgis-hub-ai-assistant": PreactArcgisHubAiAssistant;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,47 @@
1
+ /// <reference types="../index.d.ts" />
2
+ import type { ChatShell } from "../components/arcgis-chat-shell";
3
+ import type { ArcgisChatUI } from "../components/arcgis-chat-ui";
4
+ import type { ArcGISHubAIAssistant } from "../components/arcgis-hub-ai-assistant";
5
+ import type { HTMLProps } from 'react';
6
+ import type { EventHandler } from "@arcgis/lumina";
7
+
8
+ interface ReactArcgisChatShell extends Partial<Pick<ChatShell, 'aboutContent' | 'aboutVisible' | 'chatComponent' | 'featureTable' | 'map' | 'mapEnabled' | 'mapVisible'>>, HTMLProps<HTMLArcgisChatShellElement> {
9
+ onarcgisUpdateMapVisibility?: EventHandler<HTMLArcgisChatShellElement["arcgisUpdateMapVisibility"]>;
10
+ }
11
+
12
+ interface ReactArcgisChatUi extends Partial<Pick<ArcgisChatUI, 'botDescription' | 'botTitle' | 'conversationId' | 'defaultSuggestions' | 'devFeatureMessage' | 'getFinderResponse' | 'inputText'>>, HTMLProps<HTMLArcgisChatUiElement> {
13
+ onarcgisAddDataClick?: EventHandler<HTMLArcgisChatUiElement["arcgisAddDataClick"]>;
14
+ onarcgisLocationClick?: EventHandler<HTMLArcgisChatUiElement["arcgisLocationClick"]>;
15
+ }
16
+
17
+ interface ReactArcgisHubAiAssistant extends Partial<Pick<ArcGISHubAIAssistant, 'apiUrl' | 'authentication' | 'botDescription' | 'botTitle' | 'context' | 'defaultSuggestions' | 'entityId' | 'extent' | 'hub' | 'itemId' | 'language' | 'location' | 'mapBasemap' | 'mapEnabled' | 'mapLayers' | 'mapShowTable' | 'mapVisible' | 'portalUrl'>>, HTMLProps<HTMLArcgisHubAiAssistantElement> {
18
+ onarcgisAddLayer?: EventHandler<HTMLArcgisHubAiAssistantElement["arcgisAddLayer"]>;
19
+ }
20
+
21
+ declare module "react" {
22
+ namespace JSX {
23
+ interface IntrinsicElements {
24
+ "arcgis-chat-shell": ReactArcgisChatShell;
25
+ "arcgis-chat-ui": ReactArcgisChatUi;
26
+ "arcgis-hub-ai-assistant": ReactArcgisHubAiAssistant;
27
+ }
28
+ }
29
+ }
30
+ declare module "react/jsx-runtime" {
31
+ namespace JSX {
32
+ interface IntrinsicElements {
33
+ "arcgis-chat-shell": ReactArcgisChatShell;
34
+ "arcgis-chat-ui": ReactArcgisChatUi;
35
+ "arcgis-hub-ai-assistant": ReactArcgisHubAiAssistant;
36
+ }
37
+ }
38
+ }
39
+ declare module "react/jsx-dev-runtime" {
40
+ namespace JSX {
41
+ interface IntrinsicElements {
42
+ "arcgis-chat-shell": ReactArcgisChatShell;
43
+ "arcgis-chat-ui": ReactArcgisChatUi;
44
+ "arcgis-hub-ai-assistant": ReactArcgisHubAiAssistant;
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,35 @@
1
+ /// <reference types="../index.d.ts" />
2
+ import type { ChatShell } from "../components/arcgis-chat-shell";
3
+ import type { ArcgisChatUI } from "../components/arcgis-chat-ui";
4
+ import type { ArcGISHubAIAssistant } from "../components/arcgis-hub-ai-assistant";
5
+ import { JSXBase as StencilJsx } from "@stencil/core/internal";
6
+ import type { EventHandler } from "@arcgis/lumina";
7
+
8
+ interface StencilArcgisChatShell extends Partial<Pick<ChatShell, 'aboutContent' | 'aboutVisible' | 'chatComponent' | 'featureTable' | 'map' | 'mapEnabled' | 'mapVisible'>>, StencilJsx.HTMLAttributes<HTMLArcgisChatShellElement> {
9
+ onArcgisUpdateMapVisibility?: EventHandler<HTMLArcgisChatShellElement["arcgisUpdateMapVisibility"]>;
10
+ }
11
+
12
+ interface StencilArcgisChatUi extends Partial<Pick<ArcgisChatUI, 'botDescription' | 'botTitle' | 'conversationId' | 'defaultSuggestions' | 'devFeatureMessage' | 'getFinderResponse' | 'inputText'>>, StencilJsx.HTMLAttributes<HTMLArcgisChatUiElement> {
13
+ onArcgisAddDataClick?: EventHandler<HTMLArcgisChatUiElement["arcgisAddDataClick"]>;
14
+ onArcgisLocationClick?: EventHandler<HTMLArcgisChatUiElement["arcgisLocationClick"]>;
15
+ }
16
+
17
+ interface StencilArcgisHubAiAssistant extends Partial<Pick<ArcGISHubAIAssistant, 'apiUrl' | 'authentication' | 'botDescription' | 'botTitle' | 'context' | 'defaultSuggestions' | 'entityId' | 'extent' | 'hub' | 'itemId' | 'language' | 'location' | 'mapBasemap' | 'mapEnabled' | 'mapLayers' | 'mapShowTable' | 'mapVisible' | 'portalUrl'>>, StencilJsx.HTMLAttributes<HTMLArcgisHubAiAssistantElement> {
18
+ onArcgisAddLayer?: EventHandler<HTMLArcgisHubAiAssistantElement["arcgisAddLayer"]>;
19
+ }
20
+
21
+ interface ExposedElements {
22
+ "arcgis-chat-shell": StencilArcgisChatShell;
23
+ "arcgis-chat-ui": StencilArcgisChatUi;
24
+ "arcgis-hub-ai-assistant": StencilArcgisHubAiAssistant;
25
+ }
26
+
27
+ export namespace JSX {
28
+ export interface IntrinsicElements extends ExposedElements {}
29
+ }
30
+
31
+ declare module "@stencil/core/internal/stencil-public-runtime" {
32
+ export namespace h.JSX {
33
+ interface IntrinsicElements extends ExposedElements {}
34
+ }
35
+ }
@@ -0,0 +1,16 @@
1
+ import { ArcGISIdentityManager } from '@esri/arcgis-rest-request';
2
+ import { Configuration } from '../types';
3
+ export declare function HubAssistantLogger(message: string, data?: any): void;
4
+ /**
5
+ * Get the organization settings to determine if AI Assistants are enabled
6
+ *
7
+ * @returns {boolean} Whether AI Assistants are enabled for the organization
8
+ */
9
+ export declare function getOrganizationAssistantsEnabled({ portal, authentication, }: {
10
+ portal: string;
11
+ authentication?: ArcGISIdentityManager | string;
12
+ }): Promise<boolean>;
13
+ /**
14
+ * Fetch the configuration of an assistant from the ArcGIS Online item
15
+ */
16
+ export declare function fetchConfiguration(itemId: string): Promise<Configuration>;
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "@esri/hub-web-components",
3
+ "version": "0.0.5",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": "./dist/index.js",
10
+ "./loader": "./dist/loader.js",
11
+ "./package.json": "./package.json",
12
+ "./components/*/customElement": "./dist/components/*/customElement.js",
13
+ "./components/*": "./dist/components/*/index.js",
14
+ "./types/*": "./dist/types/*.d.ts",
15
+ "./cdn/index.css": "./dist/cdn/index.css",
16
+ "./main.css": "./dist/main.css",
17
+ "./embed-config": "./dist/embed-config.js"
18
+ },
19
+ "files": [
20
+ "dist/"
21
+ ],
22
+ "license": "SEE LICENSE IN LICENSE.md",
23
+ "overrides": {
24
+ "@esri/calcite-components": {
25
+ "@arcgis/lumina": ">=4.33.0-next <4.34.0",
26
+ "@arcgis/components-controllers": ">=4.33.0-next <4.34.0",
27
+ "@arcgis/components-utils": ">=4.33.0-next <4.34.0"
28
+ }
29
+ },
30
+ "dependencies": {
31
+ "@arcgis/components-utils": ">=4.33.0-next <4.34.0",
32
+ "@arcgis/lumina": ">=4.33.0-next <4.34.0",
33
+ "@arcgis/map-components": ">=4.33.0-next <4.34.0",
34
+ "@esri/arcgis-rest-portal": "^4.4.1",
35
+ "@esri/arcgis-rest-request": "^4.2.3",
36
+ "@ts-stack/markdown": "^1.5.0",
37
+ "dotenv": "^17.2.0",
38
+ "tslib": "^2.8.1"
39
+ },
40
+ "devDependencies": {
41
+ "@arcgis/core": ">=4.33.0-next <4.34",
42
+ "@arcgis/eslint-config": ">=4.33.0-next <4.34.0",
43
+ "@arcgis/lumina-compiler": ">=4.33.0-next <4.34.0",
44
+ "@arcgis/prettier-config": "https://hub-library-preview.s3.amazonaws.com/@arcgis/prettier-config/4.33.0-next.121.tgz",
45
+ "@arcgis/storybook-utils": "https://hub-library-preview.s3.amazonaws.com/@arcgis/storybook-utils/4.33.0-next.121.tgz",
46
+ "@arcgis/typescript-config": "https://hub-library-preview.s3.amazonaws.com/@arcgis/typescript-config/4.33.0-next.121.tgz",
47
+ "@esri/calcite-components": "^3.2.0-next.15",
48
+ "@playwright/test": "^1.54.1",
49
+ "@testing-library/dom": "^10.4.0",
50
+ "@types/node": "^22.0.0",
51
+ "@vitest/browser": "^3.1.3",
52
+ "@vitest/coverage-v8": "^3.1.3",
53
+ "eslint": "^9.23.0",
54
+ "eslint-gitignore": "^0.1.0",
55
+ "lint-staged": "^15.1.0",
56
+ "playwright": "^1.52.0",
57
+ "prettier": "^3.3.3",
58
+ "rimraf": "^6.0.1",
59
+ "shx": "^0.4.0",
60
+ "storybook": "^8.5.6",
61
+ "typescript": "~5.8.3",
62
+ "vite": "^6.3.4",
63
+ "vitest": "^3.1.3"
64
+ },
65
+ "peerDependencies": {
66
+ "@arcgis/core": ">=4.33.0-next <4.34",
67
+ "@esri/calcite-components": "^3.2.0-next.15"
68
+ },
69
+ "css.customData": [
70
+ "dist/docs/vscode.css-custom-data.json"
71
+ ],
72
+ "customElements": "dist/docs/api.json",
73
+ "html.customData": [
74
+ "dist/docs/vscode.html-custom-data.json"
75
+ ],
76
+ "web-types": "dist/docs/web-types.json",
77
+ "description": "A new Lumina components project",
78
+ "scripts": {
79
+ "start": "vite",
80
+ "start-internal-storybook": "storybook dev -c .storybook/internal -p 6007 --quiet",
81
+ "disabled-start-external-storybook": "storybook dev -c .storybook/external dev -p 6017 --quiet",
82
+ "build": "vite build && npm run copy-redirect && npm run copy-config",
83
+ "copy-redirect": "shx cp redirect.html www/redirect.html",
84
+ "copy-config": "shx cp dist/embed-config.js www/src/embed-config.js",
85
+ "build-dev": "vite build --mode development",
86
+ "watch": "npm run build-dev --watch",
87
+ "build-internal-storybook": "storybook build -c .storybook/internal --quiet",
88
+ "disabled-build-external-storybook": "storybook build -c .storybook/external -o storybook-static-external --quiet",
89
+ "lint": "lint-staged --config lint-staged.config.js",
90
+ "test-pre": "npx playwright install --with-deps chromium",
91
+ "test": "npm run test-pre && vitest run --browser.headless",
92
+ "test-playwright": "npx playwright install && npx playwright test",
93
+ "test-debug": "vitest run --no-file-parallelism --no-isolate --inspect",
94
+ "test-watch": "npm run test-pre && vitest",
95
+ "clean": "rimraf ./www ./node_modules ./storybook-static ./storybook-static-external ./turbo ./dist ./playwright-report ./test-results",
96
+ "prettier": "prettier src/** --check",
97
+ "prettier-fix": "prettier src/** --write"
98
+ }
99
+ }