@box/box-ai-agent-selector 2.1.35 → 2.1.36
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.
- package/dist/chunks/box-ai-agent-selector.js +15 -4373
- package/dist/chunks/box-ai-agent.js +1 -85
- package/dist/chunks/types.js +1 -6
- package/dist/esm/index.js +1 -10
- package/dist/esm/lib/box-ai-agent-selector-with-api-container.js +1 -21
- package/dist/esm/lib/box-ai-agent-selector-with-api.js +1 -70
- package/dist/esm/lib/box-ai-agent-selector.js +1 -2
- package/dist/esm/lib/box-ai-agent.js +1 -2
- package/dist/esm/lib/constants.js +1 -12
- package/dist/esm/lib/contexts/actions.js +1 -4
- package/dist/esm/lib/contexts/constants.js +1 -7
- package/dist/esm/lib/contexts/context.js +1 -26
- package/dist/esm/lib/contexts/index.js +1 -3
- package/dist/esm/lib/contexts/reducer.js +1 -38
- package/dist/esm/lib/hooks/__tests__/useLocalStorageAIAgents.tests.js +1 -69
- package/dist/esm/lib/hooks/index.js +1 -2
- package/dist/esm/lib/hooks/useLocalStorageAIAgents.js +1 -23
- package/dist/esm/lib/messages.js +1 -36
- package/package.json +8 -8
|
@@ -1,85 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { forwardRef as t, useMemo as n } from "react";
|
|
3
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import { Status as a, Text as o, Tooltip as s, TooltipProvider as c } from "@box/blueprint-web";
|
|
5
|
-
import { useIntl as l } from "react-intl";
|
|
6
|
-
import { BoxAiLogo24 as u } from "@box/blueprint-web-assets/icons/Logo";
|
|
7
|
-
import { SurfaceStatusSurfaceGray as d } from "@box/blueprint-web-assets/tokens/tokens";
|
|
8
|
-
import '../styles/box-ai-agent.css';var f = {
|
|
9
|
-
agentListItem: "_agentListItem_xtqqd_1",
|
|
10
|
-
agentInfo: "_agentInfo_xtqqd_11",
|
|
11
|
-
thumbnailWrapper: "_thumbnailWrapper_xtqqd_20",
|
|
12
|
-
agentListItemIcon: "_agentListItemIcon_xtqqd_23",
|
|
13
|
-
defaultAgentHeader: "_defaultAgentHeader_xtqqd_33",
|
|
14
|
-
agentHeader: "_agentHeader_xtqqd_44",
|
|
15
|
-
defaultAgentName: "_defaultAgentName_xtqqd_51",
|
|
16
|
-
agentDescription: "_agentDescription_xtqqd_59",
|
|
17
|
-
defaultAgentStatusWrapper: "_defaultAgentStatusWrapper_xtqqd_69"
|
|
18
|
-
}, p = /*#__PURE__*/ t(({ agent: t }, p) => {
|
|
19
|
-
let { formatMessage: m } = l(), h = t.isEnterpriseDefault, g = n(() => {
|
|
20
|
-
if (t.customIcon) return /* @__PURE__ */ r(t.customIcon, {});
|
|
21
|
-
if (t.imageURL) try {
|
|
22
|
-
let e = new URL(t.imageURL);
|
|
23
|
-
return /* @__PURE__ */ r("img", {
|
|
24
|
-
"aria-label": t.name,
|
|
25
|
-
src: e.toString()
|
|
26
|
-
});
|
|
27
|
-
} catch {
|
|
28
|
-
return /* @__PURE__ */ r(u, { "aria-label": t.name });
|
|
29
|
-
}
|
|
30
|
-
else return /* @__PURE__ */ r(u, { "aria-label": t.name });
|
|
31
|
-
}, [t]);
|
|
32
|
-
return /* @__PURE__ */ r("div", {
|
|
33
|
-
ref: p,
|
|
34
|
-
className: f.agentListItem,
|
|
35
|
-
"data-target-id": "SmallList.Item-boxAIAgent",
|
|
36
|
-
id: t.id,
|
|
37
|
-
children: /* @__PURE__ */ i(c, { children: [
|
|
38
|
-
/* @__PURE__ */ r("div", {
|
|
39
|
-
className: f.thumbnailWrapper,
|
|
40
|
-
children: /* @__PURE__ */ r("div", {
|
|
41
|
-
className: f.agentListItemIcon,
|
|
42
|
-
children: g
|
|
43
|
-
})
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ i("div", {
|
|
46
|
-
className: f.agentInfo,
|
|
47
|
-
children: [/* @__PURE__ */ r(o, {
|
|
48
|
-
as: "span",
|
|
49
|
-
className: h ? f.defaultAgentHeader : f.agentHeader,
|
|
50
|
-
children: h ? /* @__PURE__ */ r(s, {
|
|
51
|
-
content: t.name,
|
|
52
|
-
children: /* @__PURE__ */ r(o, {
|
|
53
|
-
as: "span",
|
|
54
|
-
className: f.defaultAgentName,
|
|
55
|
-
variant: "subtitle",
|
|
56
|
-
children: t.name
|
|
57
|
-
})
|
|
58
|
-
}) : /* @__PURE__ */ r(o, {
|
|
59
|
-
as: "span",
|
|
60
|
-
variant: "subtitle",
|
|
61
|
-
children: t.name
|
|
62
|
-
})
|
|
63
|
-
}), t.description && /* @__PURE__ */ r(s, {
|
|
64
|
-
content: t.description,
|
|
65
|
-
children: /* @__PURE__ */ r(o, {
|
|
66
|
-
as: "span",
|
|
67
|
-
className: f.agentDescription,
|
|
68
|
-
variant: "caption",
|
|
69
|
-
children: t.description
|
|
70
|
-
})
|
|
71
|
-
})]
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(o, {
|
|
74
|
-
as: "span",
|
|
75
|
-
className: f.defaultAgentStatusWrapper,
|
|
76
|
-
children: h && /* @__PURE__ */ r(a, {
|
|
77
|
-
className: f.defaultAgentStatus,
|
|
78
|
-
color: d,
|
|
79
|
-
text: m(e.defaultStatus)
|
|
80
|
-
})
|
|
81
|
-
}) })
|
|
82
|
-
] })
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
export { p as t };
|
|
1
|
+
import messages from"../esm/lib/messages.js";import{forwardRef,useMemo}from"react";import{jsx,jsxs}from"react/jsx-runtime";import{Status,Text,Tooltip,TooltipProvider}from"@box/blueprint-web";import{useIntl}from"react-intl";import{BoxAiLogo24}from"@box/blueprint-web-assets/icons/Logo";import{SurfaceStatusSurfaceGray}from"@box/blueprint-web-assets/tokens/tokens";import '../styles/box-ai-agent.css';var box_ai_agent_module_default={agentListItem:`_agentListItem_xtqqd_1`,agentInfo:`_agentInfo_xtqqd_11`,thumbnailWrapper:`_thumbnailWrapper_xtqqd_20`,agentListItemIcon:`_agentListItemIcon_xtqqd_23`,defaultAgentHeader:`_defaultAgentHeader_xtqqd_33`,agentHeader:`_agentHeader_xtqqd_44`,defaultAgentName:`_defaultAgentName_xtqqd_51`,agentDescription:`_agentDescription_xtqqd_59`,defaultAgentStatusWrapper:`_defaultAgentStatusWrapper_xtqqd_69`},BoxAiAgent=forwardRef(({agent},mainRef)=>{let{formatMessage}=useIntl(),isDefault=agent.isEnterpriseDefault,iconToRender=useMemo(()=>{if(agent.customIcon)return jsx(agent.customIcon,{});if(agent.imageURL)try{let validUrl=new URL(agent.imageURL);return jsx(`img`,{"aria-label":agent.name,src:validUrl.toString()})}catch{return jsx(BoxAiLogo24,{"aria-label":agent.name})}else return jsx(BoxAiLogo24,{"aria-label":agent.name})},[agent]);return jsx(`div`,{ref:mainRef,className:box_ai_agent_module_default.agentListItem,"data-target-id":`SmallList.Item-boxAIAgent`,id:agent.id,children:jsxs(TooltipProvider,{children:[jsx(`div`,{className:box_ai_agent_module_default.thumbnailWrapper,children:jsx(`div`,{className:box_ai_agent_module_default.agentListItemIcon,children:iconToRender})}),jsxs(`div`,{className:box_ai_agent_module_default.agentInfo,children:[jsx(Text,{as:`span`,className:isDefault?box_ai_agent_module_default.defaultAgentHeader:box_ai_agent_module_default.agentHeader,children:isDefault?jsx(Tooltip,{content:agent.name,children:jsx(Text,{as:`span`,className:box_ai_agent_module_default.defaultAgentName,variant:`subtitle`,children:agent.name})}):jsx(Text,{as:`span`,variant:`subtitle`,children:agent.name})}),agent.description&&jsx(Tooltip,{content:agent.description,children:jsx(Text,{as:`span`,className:box_ai_agent_module_default.agentDescription,variant:`caption`,children:agent.description})})]}),jsx(`div`,{children:jsx(Text,{as:`span`,className:box_ai_agent_module_default.defaultAgentStatusWrapper,children:isDefault&&jsx(Status,{className:box_ai_agent_module_default.defaultAgentStatus,color:SurfaceStatusSurfaceGray,text:formatMessage(messages.defaultStatus)})})})]})})});export{BoxAiAgent as t};
|
package/dist/chunks/types.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
return e.NOT_STARTED = "not_started", e.IN_PROGRESS = "in_progress", e.SUCCESS = "success", e.ERROR = "error", e.CANCELLED = "cancelled", e;
|
|
3
|
-
}({}), t = /* @__PURE__ */ function(e) {
|
|
4
|
-
return e.LEFT = "left", e.OFFSET_FROM_LEFT = "offset_from_left", e;
|
|
5
|
-
}({});
|
|
6
|
-
export { t as n, e as t };
|
|
1
|
+
var REQUEST_STATE=function(REQUEST_STATE){return REQUEST_STATE.NOT_STARTED=`not_started`,REQUEST_STATE.IN_PROGRESS=`in_progress`,REQUEST_STATE.SUCCESS=`success`,REQUEST_STATE.ERROR=`error`,REQUEST_STATE.CANCELLED=`cancelled`,REQUEST_STATE}({}),SELECTOR_ALIGNMENT=function(SELECTOR_ALIGNMENT){return SELECTOR_ALIGNMENT.LEFT=`left`,SELECTOR_ALIGNMENT.OFFSET_FROM_LEFT=`offset_from_left`,SELECTOR_ALIGNMENT}({});export{SELECTOR_ALIGNMENT as n,REQUEST_STATE as t};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { AI_AGENTS_LOCAL_STORAGE_KEY as t } from "./lib/constants.js";
|
|
3
|
-
import { ACTIONS as n } from "./lib/contexts/actions.js";
|
|
4
|
-
import { n as r, t as i } from "../chunks/types.js";
|
|
5
|
-
import { AgentsProvider as a, useAgents as o, useAgentsDispatch as s } from "./lib/contexts/context.js";
|
|
6
|
-
import c from "./lib/hooks/useLocalStorageAIAgents.js";
|
|
7
|
-
import { BoxAiAgentSelectorWithApi as l } from "./lib/box-ai-agent-selector-with-api.js";
|
|
8
|
-
import { BoxAiAgentSelectorWithApiContainer as u } from "./lib/box-ai-agent-selector-with-api-container.js";
|
|
9
|
-
import "./lib/hooks/index.js";
|
|
10
|
-
export { n as ACTIONS, t as AI_AGENTS_LOCAL_STORAGE_KEY, a as AgentsProvider, e as BoxAiAgentSelector, l as BoxAiAgentSelectorWithApi, u as BoxAiAgentSelectorWithApiContainer, i as REQUEST_STATE, r as SELECTOR_ALIGNMENT, o as useAgents, s as useAgentsDispatch, c as useLocalStorageAIAgents };
|
|
1
|
+
import{t as BoxAiAgentSelector}from"../chunks/box-ai-agent-selector.js";import{AI_AGENTS_LOCAL_STORAGE_KEY}from"./lib/constants.js";import{ACTIONS}from"./lib/contexts/actions.js";import{n as SELECTOR_ALIGNMENT,t as REQUEST_STATE}from"../chunks/types.js";import{AgentsProvider,useAgents,useAgentsDispatch}from"./lib/contexts/context.js";import useLocalStorageAIAgents from"./lib/hooks/useLocalStorageAIAgents.js";import{BoxAiAgentSelectorWithApi}from"./lib/box-ai-agent-selector-with-api.js";import{BoxAiAgentSelectorWithApiContainer}from"./lib/box-ai-agent-selector-with-api-container.js";import"./lib/hooks/index.js";export{ACTIONS,AI_AGENTS_LOCAL_STORAGE_KEY,AgentsProvider,BoxAiAgentSelector,BoxAiAgentSelectorWithApi,BoxAiAgentSelectorWithApiContainer,REQUEST_STATE,SELECTOR_ALIGNMENT,useAgents,useAgentsDispatch,useLocalStorageAIAgents};
|
|
@@ -1,21 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AgentsProvider as t } from "./contexts/context.js";
|
|
3
|
-
import { BoxAiAgentSelectorWithApi as n } from "./box-ai-agent-selector-with-api.js";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
function i({ fetcher: i, hostAppName: a, onSelectAgent: o, onSelectedAgentCallback: s, recordAction: c, requestState: l, disabled: u, selectorAlignment: d = e.OFFSET_FROM_LEFT, shouldHideAgentSelectorOnLoad: f = !0, triggerChipClassName: p, contentClassName: m, useAgentLocalStorage: h = !1 }) {
|
|
6
|
-
return /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(n, {
|
|
7
|
-
contentClassName: m,
|
|
8
|
-
disabled: u,
|
|
9
|
-
fetcher: i,
|
|
10
|
-
hostAppName: a,
|
|
11
|
-
onSelectAgent: o,
|
|
12
|
-
onSelectedAgentCallback: s,
|
|
13
|
-
recordAction: c,
|
|
14
|
-
requestState: l,
|
|
15
|
-
selectorAlignment: d,
|
|
16
|
-
shouldHideAgentSelectorOnLoad: f,
|
|
17
|
-
triggerChipClassName: p,
|
|
18
|
-
useAgentLocalStorage: h
|
|
19
|
-
}) });
|
|
20
|
-
}
|
|
21
|
-
export { i as BoxAiAgentSelectorWithApiContainer, i as default };
|
|
1
|
+
import{n as SELECTOR_ALIGNMENT}from"../../chunks/types.js";import{AgentsProvider}from"./contexts/context.js";import{BoxAiAgentSelectorWithApi}from"./box-ai-agent-selector-with-api.js";import{jsx}from"react/jsx-runtime";function BoxAiAgentSelectorWithApiContainer({fetcher,hostAppName,onSelectAgent,onSelectedAgentCallback,recordAction,requestState,disabled,selectorAlignment=SELECTOR_ALIGNMENT.OFFSET_FROM_LEFT,shouldHideAgentSelectorOnLoad=!0,triggerChipClassName,contentClassName,useAgentLocalStorage=!1}){return jsx(AgentsProvider,{children:jsx(BoxAiAgentSelectorWithApi,{contentClassName,disabled,fetcher,hostAppName,onSelectAgent,onSelectedAgentCallback,recordAction,requestState,selectorAlignment,shouldHideAgentSelectorOnLoad,triggerChipClassName,useAgentLocalStorage})})}export{BoxAiAgentSelectorWithApiContainer,BoxAiAgentSelectorWithApiContainer as default};
|
|
@@ -1,70 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LOGGER_BASE_CONFIG as t, LOGGER_TARGET as n } from "./constants.js";
|
|
3
|
-
import { ACTIONS as r } from "./contexts/actions.js";
|
|
4
|
-
import { n as i, t as a } from "../../chunks/types.js";
|
|
5
|
-
import { useAgents as o, useAgentsDispatch as s } from "./contexts/context.js";
|
|
6
|
-
import { useCallback as c, useEffect as l, useState as u } from "react";
|
|
7
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
8
|
-
function f({ fetcher: f, hostAppName: p, onSelectAgent: m, onSelectedAgentCallback: h, recordAction: g, requestState: _, disabled: v, onAgentsListOpen: y, selectorAlignment: b = i.OFFSET_FROM_LEFT, shouldHideAgentSelectorOnLoad: x, triggerChipClassName: S, contentClassName: C, useAgentLocalStorage: w = !1, variant: T = "modal" }) {
|
|
9
|
-
let E = s(), { agents: D, requestState: O, selectedAgent: k } = o(), [A, j] = u(!1), M = c((e) => {
|
|
10
|
-
g && (e.data ??= {}, e.data.hostAppName = p, g(e));
|
|
11
|
-
}, [p, g]), N = c(async () => {
|
|
12
|
-
E({
|
|
13
|
-
type: r.SET_REQUEST_STATE,
|
|
14
|
-
requestState: a.IN_PROGRESS
|
|
15
|
-
});
|
|
16
|
-
try {
|
|
17
|
-
let e = await f();
|
|
18
|
-
E({
|
|
19
|
-
type: r.SET_AGENT_LIST,
|
|
20
|
-
agents: e.agents
|
|
21
|
-
}), M({
|
|
22
|
-
...t,
|
|
23
|
-
target: n.LOADED_AGENTS
|
|
24
|
-
});
|
|
25
|
-
} catch {
|
|
26
|
-
E({
|
|
27
|
-
type: r.SET_REQUEST_STATE,
|
|
28
|
-
requestState: a.ERROR
|
|
29
|
-
}), M({
|
|
30
|
-
...t,
|
|
31
|
-
target: n.ERROR_LOADING_AGENTS
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}, [
|
|
35
|
-
E,
|
|
36
|
-
M,
|
|
37
|
-
f
|
|
38
|
-
]), P = O !== a.SUCCESS || !D.length || !k;
|
|
39
|
-
return l(() => {
|
|
40
|
-
P ? N().finally(() => {
|
|
41
|
-
j(!0);
|
|
42
|
-
}) : j(!0);
|
|
43
|
-
}, [N, P]), l(() => {
|
|
44
|
-
_ && _ !== O && (_ !== a.SUCCESS && E({
|
|
45
|
-
type: r.SET_AGENT_LIST,
|
|
46
|
-
agents: []
|
|
47
|
-
}), E({
|
|
48
|
-
type: r.SET_REQUEST_STATE,
|
|
49
|
-
requestState: _
|
|
50
|
-
}));
|
|
51
|
-
}, [E, _]), l(() => {
|
|
52
|
-
m && m(k);
|
|
53
|
-
}, [m, k?.id]), l(() => {
|
|
54
|
-
h && h(k);
|
|
55
|
-
}, [h, k?.id]), x && !A || O === a.SUCCESS && D.length <= 1 ? null : /* @__PURE__ */ d(e, {
|
|
56
|
-
agents: D,
|
|
57
|
-
contentClassName: C,
|
|
58
|
-
disabled: v,
|
|
59
|
-
onAgentsListOpen: y,
|
|
60
|
-
onErrorAction: N,
|
|
61
|
-
recordAction: M,
|
|
62
|
-
requestState: O,
|
|
63
|
-
selectedAgent: k,
|
|
64
|
-
selectorAlignment: b,
|
|
65
|
-
triggerChipClassName: S,
|
|
66
|
-
useAgentLocalStorage: w,
|
|
67
|
-
variant: T
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
export { f as BoxAiAgentSelectorWithApi, f as default };
|
|
1
|
+
import{t as BoxAiAgentSelector}from"../../chunks/box-ai-agent-selector.js";import{LOGGER_BASE_CONFIG,LOGGER_TARGET}from"./constants.js";import{ACTIONS}from"./contexts/actions.js";import{n as SELECTOR_ALIGNMENT,t as REQUEST_STATE}from"../../chunks/types.js";import{useAgents,useAgentsDispatch}from"./contexts/context.js";import{useCallback,useEffect,useState}from"react";import{jsx}from"react/jsx-runtime";function BoxAiAgentSelectorWithApi({fetcher,hostAppName,onSelectAgent,onSelectedAgentCallback,recordAction,requestState:requestStateProp,disabled,onAgentsListOpen,selectorAlignment=SELECTOR_ALIGNMENT.OFFSET_FROM_LEFT,shouldHideAgentSelectorOnLoad,triggerChipClassName,contentClassName,useAgentLocalStorage=!1,variant=`modal`}){let dispatch=useAgentsDispatch(),{agents,requestState,selectedAgent}=useAgents(),[isFirstAgentRequestCompleted,setIsFirstAgentRequestCompleted]=useState(!1),eventLogger=useCallback(payload=>{recordAction&&(payload.data??={},payload.data.hostAppName=hostAppName,recordAction(payload))},[hostAppName,recordAction]),fetchAgents=useCallback(async()=>{dispatch({type:ACTIONS.SET_REQUEST_STATE,requestState:REQUEST_STATE.IN_PROGRESS});try{let payload=await fetcher();dispatch({type:ACTIONS.SET_AGENT_LIST,agents:payload.agents}),eventLogger({...LOGGER_BASE_CONFIG,target:LOGGER_TARGET.LOADED_AGENTS})}catch{dispatch({type:ACTIONS.SET_REQUEST_STATE,requestState:REQUEST_STATE.ERROR}),eventLogger({...LOGGER_BASE_CONFIG,target:LOGGER_TARGET.ERROR_LOADING_AGENTS})}},[dispatch,eventLogger,fetcher]),shouldFetchAgents=requestState!==REQUEST_STATE.SUCCESS||!agents.length||!selectedAgent;return useEffect(()=>{shouldFetchAgents?fetchAgents().finally(()=>{setIsFirstAgentRequestCompleted(!0)}):setIsFirstAgentRequestCompleted(!0)},[fetchAgents,shouldFetchAgents]),useEffect(()=>{requestStateProp&&requestStateProp!==requestState&&(requestStateProp!==REQUEST_STATE.SUCCESS&&dispatch({type:ACTIONS.SET_AGENT_LIST,agents:[]}),dispatch({type:ACTIONS.SET_REQUEST_STATE,requestState:requestStateProp}))},[dispatch,requestStateProp]),useEffect(()=>{onSelectAgent&&onSelectAgent(selectedAgent)},[onSelectAgent,selectedAgent?.id]),useEffect(()=>{onSelectedAgentCallback&&onSelectedAgentCallback(selectedAgent)},[onSelectedAgentCallback,selectedAgent?.id]),shouldHideAgentSelectorOnLoad&&!isFirstAgentRequestCompleted||requestState===REQUEST_STATE.SUCCESS&&agents.length<=1?null:jsx(BoxAiAgentSelector,{agents,contentClassName,disabled,onAgentsListOpen,onErrorAction:fetchAgents,recordAction:eventLogger,requestState,selectedAgent,selectorAlignment,triggerChipClassName,useAgentLocalStorage,variant})}export{BoxAiAgentSelectorWithApi,BoxAiAgentSelectorWithApi as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as BoxAiAgentSelector, e as default };
|
|
1
|
+
import{t as BoxAiAgentSelector}from"../../chunks/box-ai-agent-selector.js";export{BoxAiAgentSelector,BoxAiAgentSelector as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as BoxAiAgent, e as default };
|
|
1
|
+
import{t as BoxAiAgent}from"../../chunks/box-ai-agent.js";export{BoxAiAgent,BoxAiAgent as default};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
LOADED_AGENTS: "loadedAgents",
|
|
3
|
-
ERROR_LOADING_AGENTS: "errorLoadingAgents",
|
|
4
|
-
RETRY_LOADING_AGENTS: "retryLoadingAgents",
|
|
5
|
-
OPEN_SELECTOR: "openSelector",
|
|
6
|
-
SELECT_AGENT: "selectAgent"
|
|
7
|
-
}, s = {
|
|
8
|
-
action: n,
|
|
9
|
-
component: r,
|
|
10
|
-
feature: i
|
|
11
|
-
};
|
|
12
|
-
export { a as AI_AGENTS_LOCAL_STORAGE_KEY, e as LOGGER_ACTION_CLICK, t as LOGGER_ACTION_KEYPRESS, n as LOGGER_ACTION_PROGRAMMATIC, s as LOGGER_BASE_CONFIG, r as LOGGER_COMPONENT, i as LOGGER_FEATURE, o as LOGGER_TARGET };
|
|
1
|
+
var LOGGER_ACTION_CLICK=`click`,LOGGER_ACTION_KEYPRESS=`keypress`,LOGGER_ACTION_PROGRAMMATIC=`programmatic`,LOGGER_COMPONENT=`selector`,LOGGER_FEATURE=`agentSelector`,AI_AGENTS_LOCAL_STORAGE_KEY=`aiAgent`,LOGGER_TARGET={LOADED_AGENTS:`loadedAgents`,ERROR_LOADING_AGENTS:`errorLoadingAgents`,RETRY_LOADING_AGENTS:`retryLoadingAgents`,OPEN_SELECTOR:`openSelector`,SELECT_AGENT:`selectAgent`},LOGGER_BASE_CONFIG={action:LOGGER_ACTION_PROGRAMMATIC,component:LOGGER_COMPONENT,feature:LOGGER_FEATURE};export{AI_AGENTS_LOCAL_STORAGE_KEY,LOGGER_ACTION_CLICK,LOGGER_ACTION_KEYPRESS,LOGGER_ACTION_PROGRAMMATIC,LOGGER_BASE_CONFIG,LOGGER_COMPONENT,LOGGER_FEATURE,LOGGER_TARGET};
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
return e.SET_AGENT_LIST = "SET_AGENT_LIST", e.SET_ASK_CONFIG = "SET_ASK_CONFIG", e.SET_REQUEST_STATE = "SET_REQUEST_STATE", e.SET_SELECTED_AGENT = "SET_SELECTED_AGENT", e;
|
|
3
|
-
}({});
|
|
4
|
-
export { e as ACTIONS };
|
|
1
|
+
var ACTIONS=function(ACTIONS){return ACTIONS.SET_AGENT_LIST=`SET_AGENT_LIST`,ACTIONS.SET_ASK_CONFIG=`SET_ASK_CONFIG`,ACTIONS.SET_REQUEST_STATE=`SET_REQUEST_STATE`,ACTIONS.SET_SELECTED_AGENT=`SET_SELECTED_AGENT`,ACTIONS}({});export{ACTIONS};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = {
|
|
3
|
-
agents: [],
|
|
4
|
-
requestState: e.NOT_STARTED,
|
|
5
|
-
selectedAgent: null
|
|
6
|
-
};
|
|
7
|
-
export { t as defaultState };
|
|
1
|
+
import{t as REQUEST_STATE}from"../../../chunks/types.js";var defaultState={agents:[],requestState:REQUEST_STATE.NOT_STARTED,selectedAgent:null};export{defaultState};
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { agentsReducer as t } from "./reducer.js";
|
|
3
|
-
import { createContext as n, useContext as r, useReducer as i } from "react";
|
|
4
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
-
var o = /*#__PURE__*/ n(e), s = /*#__PURE__*/ n(() => {});
|
|
6
|
-
function c() {
|
|
7
|
-
return r(o);
|
|
8
|
-
}
|
|
9
|
-
function l() {
|
|
10
|
-
return r(s);
|
|
11
|
-
}
|
|
12
|
-
function u({ children: n, value: r }) {
|
|
13
|
-
let [{ agents: c, requestState: l, selectedAgent: u }, d] = i(t, r || e);
|
|
14
|
-
return /* @__PURE__ */ a(o.Provider, {
|
|
15
|
-
value: {
|
|
16
|
-
agents: c,
|
|
17
|
-
requestState: l,
|
|
18
|
-
selectedAgent: u
|
|
19
|
-
},
|
|
20
|
-
children: /* @__PURE__ */ a(s.Provider, {
|
|
21
|
-
value: d,
|
|
22
|
-
children: n
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
export { u as AgentsProvider, c as useAgents, l as useAgentsDispatch };
|
|
1
|
+
import{defaultState}from"./constants.js";import{agentsReducer}from"./reducer.js";import{createContext,useContext,useReducer}from"react";import{jsx}from"react/jsx-runtime";var AgentsContext=createContext(defaultState),AgentsDispatchContext=createContext(()=>{});function useAgents(){return useContext(AgentsContext)}function useAgentsDispatch(){return useContext(AgentsDispatchContext)}function AgentsProvider({children,value}){let[{agents,requestState,selectedAgent},dispatch]=useReducer(agentsReducer,value||defaultState);return jsx(AgentsContext.Provider,{value:{agents,requestState,selectedAgent},children:jsx(AgentsDispatchContext.Provider,{value:dispatch,children})})}export{AgentsProvider,useAgents,useAgentsDispatch};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AgentsProvider as t, useAgents as n, useAgentsDispatch as r } from "./context.js";
|
|
3
|
-
export { e as ACTIONS, t as AgentsProvider, n as useAgents, r as useAgentsDispatch };
|
|
1
|
+
import{ACTIONS}from"./actions.js";import{AgentsProvider,useAgents,useAgentsDispatch}from"./context.js";export{ACTIONS,AgentsProvider,useAgents,useAgentsDispatch};
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { t } from "../../../chunks/types.js";
|
|
3
|
-
var n = (n, r) => {
|
|
4
|
-
switch (r.type) {
|
|
5
|
-
case e.SET_AGENT_LIST: {
|
|
6
|
-
let e = r?.agents?.find((e) => e.isSelected) || null;
|
|
7
|
-
return e ||= r?.agents?.find((e) => e.isEnterpriseDefault) || null, {
|
|
8
|
-
agents: r?.agents || [],
|
|
9
|
-
requestState: t.SUCCESS,
|
|
10
|
-
selectedAgent: e
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
case e.SET_ASK_CONFIG: return {
|
|
14
|
-
agents: n.agents.map((e) => e.id === r.id ? {
|
|
15
|
-
...e,
|
|
16
|
-
ask: r.ask
|
|
17
|
-
} : e),
|
|
18
|
-
requestState: n.requestState,
|
|
19
|
-
selectedAgent: n.selectedAgent ? {
|
|
20
|
-
...n.selectedAgent,
|
|
21
|
-
ask: r.ask
|
|
22
|
-
} : null
|
|
23
|
-
};
|
|
24
|
-
case e.SET_REQUEST_STATE: return {
|
|
25
|
-
...n,
|
|
26
|
-
requestState: r.requestState || t.NOT_STARTED
|
|
27
|
-
};
|
|
28
|
-
case e.SET_SELECTED_AGENT: {
|
|
29
|
-
let e = n.agents.find((e) => e.id === r.id) || null;
|
|
30
|
-
return {
|
|
31
|
-
...n,
|
|
32
|
-
selectedAgent: e
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
default: return n;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export { n as agentsReducer };
|
|
1
|
+
import{ACTIONS}from"./actions.js";import{t as REQUEST_STATE}from"../../../chunks/types.js";var agentsReducer=(state,action)=>{switch(action.type){case ACTIONS.SET_AGENT_LIST:{let defaultAgent=action?.agents?.find(agent=>agent.isSelected)||null;return defaultAgent||=action?.agents?.find(agent=>agent.isEnterpriseDefault)||null,{agents:action?.agents||[],requestState:REQUEST_STATE.SUCCESS,selectedAgent:defaultAgent}}case ACTIONS.SET_ASK_CONFIG:return{agents:state.agents.map(agent=>agent.id===action.id?{...agent,ask:action.ask}:agent),requestState:state.requestState,selectedAgent:state.selectedAgent?{...state.selectedAgent,ask:action.ask}:null};case ACTIONS.SET_REQUEST_STATE:return{...state,requestState:action.requestState||REQUEST_STATE.NOT_STARTED};case ACTIONS.SET_SELECTED_AGENT:{let newSelectedAgent=state.agents.find(agent=>agent.id===action.id)||null;return{...state,selectedAgent:newSelectedAgent}}default:return state}};export{agentsReducer};
|
|
@@ -1,69 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { act as t, renderHook as n } from "@testing-library/react";
|
|
3
|
-
describe("useLocalStorageAIAgents", () => {
|
|
4
|
-
let r = "testAgentKey", i = "agent-456", a = {}, o = jest.fn((e) => a[e]), s = jest.fn((e, t) => {
|
|
5
|
-
a[e] = t;
|
|
6
|
-
}), c = jest.fn((e) => {
|
|
7
|
-
delete a[e];
|
|
8
|
-
});
|
|
9
|
-
Object.defineProperty(window, "localStorage", { value: {
|
|
10
|
-
getItem: (e) => o(e),
|
|
11
|
-
setItem: (e, t) => s(e, t),
|
|
12
|
-
removeItem: (e) => c(e)
|
|
13
|
-
} }), beforeEach(() => {
|
|
14
|
-
a = {};
|
|
15
|
-
}), afterEach(() => {
|
|
16
|
-
jest.clearAllMocks();
|
|
17
|
-
}), test("should initialize with null when localStorage is empty", () => {
|
|
18
|
-
let { result: t } = n(() => e(r)), [i] = t.current;
|
|
19
|
-
expect(i).toBeNull(), expect(o(r)).toBeUndefined();
|
|
20
|
-
}), test("should initialize with value from localStorage if it exists and is valid", () => {
|
|
21
|
-
let t = "agent-123";
|
|
22
|
-
a[r] = t;
|
|
23
|
-
let { result: i } = n(() => e(r)), [s] = i.current;
|
|
24
|
-
expect(s).toBe(t), expect(o).toHaveBeenCalledWith(r);
|
|
25
|
-
}), test("should return null if localStorage value contains invalid characters", () => {
|
|
26
|
-
[
|
|
27
|
-
"><script>alert('XSS Attack!');<\/script><div class=\"",
|
|
28
|
-
"admin'; DROP TABLE users; --",
|
|
29
|
-
"${process.env.SECRET_KEY}",
|
|
30
|
-
"../../../etc/passwd",
|
|
31
|
-
"agent@123!"
|
|
32
|
-
].forEach((t) => {
|
|
33
|
-
a[r] = t;
|
|
34
|
-
let { result: i } = n(() => e(r)), [o] = i.current;
|
|
35
|
-
expect(o).toBeNull(), expect(c).toHaveBeenCalledWith(r);
|
|
36
|
-
});
|
|
37
|
-
}), test("should update localStorage when state changes", () => {
|
|
38
|
-
let { result: a, rerender: o } = n(() => e(r)), [c, l] = a.current;
|
|
39
|
-
expect(c).not.toBe(i), t(() => {
|
|
40
|
-
l(i);
|
|
41
|
-
}), o(), [c] = a.current, expect(c).toBe(i), expect(s).toHaveBeenCalledWith(r, i);
|
|
42
|
-
}), test("should remove localStorage item when setting to null", () => {
|
|
43
|
-
let { result: a, rerender: o } = n(() => e(r)), [s, l] = a.current;
|
|
44
|
-
expect(s).toBeNull(), t(() => {
|
|
45
|
-
l(i);
|
|
46
|
-
}), o(), [s] = a.current, expect(s).toBe(i), t(() => {
|
|
47
|
-
l(null);
|
|
48
|
-
}), o(), [s] = a.current, expect(s).toBeNull(), expect(c).toHaveBeenCalledWith(r);
|
|
49
|
-
}), test("should handle valid alphanumeric characters with underscores and hyphens", () => {
|
|
50
|
-
let i = "valid-agent_123", { result: a, rerender: o } = n(() => e(r)), [, c] = a.current;
|
|
51
|
-
t(() => {
|
|
52
|
-
c(i);
|
|
53
|
-
}), o();
|
|
54
|
-
let [l] = a.current;
|
|
55
|
-
expect(l).toBe(i), expect(s).toHaveBeenCalledWith(r, i);
|
|
56
|
-
}), test("should return null for whitespace-only values in localStorage", () => {
|
|
57
|
-
a[r] = " ";
|
|
58
|
-
let { result: t } = n(() => e(r)), [i] = t.current;
|
|
59
|
-
expect(i).toBeNull();
|
|
60
|
-
}), test("should keep agent selection when localStorage full", () => {
|
|
61
|
-
s = jest.fn((e, t) => {
|
|
62
|
-
throw Error("Quota exceeded");
|
|
63
|
-
});
|
|
64
|
-
let { result: a, rerender: o } = n(() => e(r)), [l, u] = a.current;
|
|
65
|
-
expect(l).not.toBe(i), t(() => {
|
|
66
|
-
u(i);
|
|
67
|
-
}), o(), [l] = a.current, expect(l).toBe(i), expect(s).toHaveBeenCalledWith(r, i), expect(c).toHaveBeenCalledWith(r);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
1
|
+
import useLocalStorageAIAgents from"../useLocalStorageAIAgents.js";import{act,renderHook}from"@testing-library/react";describe(`useLocalStorageAIAgents`,()=>{let KEY=`testAgentKey`,NEW_AGENT_ID=`agent-456`,mockLocal={},mockGetItem=jest.fn(key=>mockLocal[key]),mockSetItem=jest.fn((key,value)=>{mockLocal[key]=value}),mockRemoveItem=jest.fn(key=>{delete mockLocal[key]});Object.defineProperty(window,"localStorage",{value:{getItem:key=>mockGetItem(key),setItem:(key,value)=>mockSetItem(key,value),removeItem:key=>mockRemoveItem(key)}}),beforeEach(()=>{mockLocal={}}),afterEach(()=>{jest.clearAllMocks()}),test(`should initialize with null when localStorage is empty`,()=>{let{result}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent]=result.current;expect(storedAgent).toBeNull(),expect(mockGetItem(KEY)).toBeUndefined()}),test(`should initialize with value from localStorage if it exists and is valid`,()=>{let testAgent=`agent-123`;mockLocal[KEY]=testAgent;let{result}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent]=result.current;expect(storedAgent).toBe(testAgent),expect(mockGetItem).toHaveBeenCalledWith(KEY)}),test(`should return null if localStorage value contains invalid characters`,()=>{[`><script>alert('XSS Attack!');<\/script><div class="`,`admin'; DROP TABLE users; --`,"${process.env.SECRET_KEY}",`../../../etc/passwd`,`agent@123!`].forEach(unsafeString=>{mockLocal[KEY]=unsafeString;let{result}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent]=result.current;expect(storedAgent).toBeNull(),expect(mockRemoveItem).toHaveBeenCalledWith(KEY)})}),test(`should update localStorage when state changes`,()=>{let{result,rerender}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent,setStoredAgent]=result.current;expect(storedAgent).not.toBe(NEW_AGENT_ID),act(()=>{setStoredAgent(NEW_AGENT_ID)}),rerender(),[storedAgent]=result.current,expect(storedAgent).toBe(NEW_AGENT_ID),expect(mockSetItem).toHaveBeenCalledWith(KEY,NEW_AGENT_ID)}),test(`should remove localStorage item when setting to null`,()=>{let{result,rerender}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent,setStoredAgent]=result.current;expect(storedAgent).toBeNull(),act(()=>{setStoredAgent(NEW_AGENT_ID)}),rerender(),[storedAgent]=result.current,expect(storedAgent).toBe(NEW_AGENT_ID),act(()=>{setStoredAgent(null)}),rerender(),[storedAgent]=result.current,expect(storedAgent).toBeNull(),expect(mockRemoveItem).toHaveBeenCalledWith(KEY)}),test(`should handle valid alphanumeric characters with underscores and hyphens`,()=>{let validAgentId=`valid-agent_123`,{result,rerender}=renderHook(()=>useLocalStorageAIAgents(KEY)),[,setStoredAgent]=result.current;act(()=>{setStoredAgent(validAgentId)}),rerender();let[storedAgent]=result.current;expect(storedAgent).toBe(validAgentId),expect(mockSetItem).toHaveBeenCalledWith(KEY,validAgentId)}),test(`should return null for whitespace-only values in localStorage`,()=>{mockLocal[KEY]=` `;let{result}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent]=result.current;expect(storedAgent).toBeNull()}),test(`should keep agent selection when localStorage full`,()=>{mockSetItem=jest.fn((key,value)=>{throw Error(`Quota exceeded`)});let{result,rerender}=renderHook(()=>useLocalStorageAIAgents(KEY)),[storedAgent,setStoredAgent]=result.current;expect(storedAgent).not.toBe(NEW_AGENT_ID),act(()=>{setStoredAgent(NEW_AGENT_ID)}),rerender(),[storedAgent]=result.current,expect(storedAgent).toBe(NEW_AGENT_ID),expect(mockSetItem).toHaveBeenCalledWith(KEY,NEW_AGENT_ID),expect(mockRemoveItem).toHaveBeenCalledWith(KEY)})});
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as useLocalStorageAIAgents };
|
|
1
|
+
import useLocalStorageAIAgents from"./useLocalStorageAIAgents.js";export{useLocalStorageAIAgents};
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var n = (n, r = !0) => {
|
|
3
|
-
let [i, a] = t(() => {
|
|
4
|
-
try {
|
|
5
|
-
let e = localStorage.getItem(n);
|
|
6
|
-
if (!e) return null;
|
|
7
|
-
if (r && !/^[a-zA-Z0-9_-]+$/.test(e)) throw Error("Invalid characters in stored value");
|
|
8
|
-
return e;
|
|
9
|
-
} catch {
|
|
10
|
-
return localStorage.removeItem(n), null;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
return e(() => {
|
|
14
|
-
try {
|
|
15
|
-
if (i) {
|
|
16
|
-
localStorage.setItem(n, i);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
} catch {}
|
|
20
|
-
localStorage.removeItem(n);
|
|
21
|
-
}, [i, n]), [i, a];
|
|
22
|
-
};
|
|
23
|
-
export { n as default };
|
|
1
|
+
import{useEffect,useState}from"react";var useLocalStorageAIAgents=(key,alphaNumDashValidation=!0)=>{let[storedAgent,setStoredAgent]=useState(()=>{try{let storedValue=localStorage.getItem(key);if(!storedValue)return null;if(alphaNumDashValidation&&!/^[a-zA-Z0-9_-]+$/.test(storedValue))throw Error(`Invalid characters in stored value`);return storedValue}catch{return localStorage.removeItem(key),null}});return useEffect(()=>{try{if(storedAgent){localStorage.setItem(key,storedAgent);return}}catch{}localStorage.removeItem(key)},[storedAgent,key]),[storedAgent,setStoredAgent]};export{useLocalStorageAIAgents as default};
|
package/dist/esm/lib/messages.js
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
agent: {
|
|
4
|
-
id: "boxAI.agentSelector.agent",
|
|
5
|
-
defaultMessage: "AGENT"
|
|
6
|
-
},
|
|
7
|
-
agentList: {
|
|
8
|
-
id: "boxAI.agentSelector.agentList",
|
|
9
|
-
defaultMessage: "Agent List"
|
|
10
|
-
},
|
|
11
|
-
selectAgent: {
|
|
12
|
-
id: "boxAI.agentSelector.selectAgent",
|
|
13
|
-
defaultMessage: "Select an Agent"
|
|
14
|
-
},
|
|
15
|
-
defaultAgent: {
|
|
16
|
-
id: "boxAI.agentSelector.defaultAgent",
|
|
17
|
-
defaultMessage: "Default"
|
|
18
|
-
},
|
|
19
|
-
defaultStatus: {
|
|
20
|
-
id: "boxAI.agentSelector.defaultStatus",
|
|
21
|
-
defaultMessage: "DEFAULT"
|
|
22
|
-
},
|
|
23
|
-
errorMessage: {
|
|
24
|
-
id: "boxAI.agentSelector.errorMessage",
|
|
25
|
-
defaultMessage: "Failed to load available agents. You're currently using your organization's default agent. Click here to retry."
|
|
26
|
-
},
|
|
27
|
-
errorTooltip: {
|
|
28
|
-
id: "boxAI.agentSelector.errorTooltip",
|
|
29
|
-
defaultMessage: "Failed to load available agents. Try again."
|
|
30
|
-
},
|
|
31
|
-
loadingMessage: {
|
|
32
|
-
id: "boxAI.agentSelector.loadingMessage",
|
|
33
|
-
defaultMessage: "Loading available agents"
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({agent:{id:`boxAI.agentSelector.agent`,defaultMessage:`AGENT`},agentList:{id:`boxAI.agentSelector.agentList`,defaultMessage:`Agent List`},selectAgent:{id:`boxAI.agentSelector.selectAgent`,defaultMessage:`Select an Agent`},defaultAgent:{id:`boxAI.agentSelector.defaultAgent`,defaultMessage:`Default`},defaultStatus:{id:`boxAI.agentSelector.defaultStatus`,defaultMessage:`DEFAULT`},errorMessage:{id:`boxAI.agentSelector.errorMessage`,defaultMessage:`Failed to load available agents. You're currently using your organization's default agent. Click here to retry.`},errorTooltip:{id:`boxAI.agentSelector.errorTooltip`,defaultMessage:`Failed to load available agents. Try again.`},loadingMessage:{id:`boxAI.agentSelector.loadingMessage`,defaultMessage:`Loading available agents`}});export{messages as default};
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/box-ai-agent-selector",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.36",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@ariakit/react": "^0.4.21",
|
|
7
|
-
"@box/blueprint-web": "^16.13.
|
|
8
|
-
"@box/blueprint-web-assets": "^5.5.
|
|
7
|
+
"@box/blueprint-web": "^16.13.1",
|
|
8
|
+
"@box/blueprint-web-assets": "^5.5.10",
|
|
9
9
|
"react": "^17.0.0 || ^18.0.0",
|
|
10
10
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
11
11
|
"react-intl": "^6.4.2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ariakit/react": "^0.4.21",
|
|
15
|
-
"@box/babel-plugin-target-attributes": "2.1.
|
|
16
|
-
"@box/blueprint-web": "^16.13.
|
|
17
|
-
"@box/blueprint-web-assets": "^5.5.
|
|
18
|
-
"@box/eslint-plugin-blueprint": "^2.1.
|
|
19
|
-
"@box/storybook-utils": "^1.1.
|
|
15
|
+
"@box/babel-plugin-target-attributes": "2.1.11",
|
|
16
|
+
"@box/blueprint-web": "^16.13.1",
|
|
17
|
+
"@box/blueprint-web-assets": "^5.5.10",
|
|
18
|
+
"@box/eslint-plugin-blueprint": "^2.1.11",
|
|
19
|
+
"@box/storybook-utils": "^1.1.34",
|
|
20
20
|
"@testing-library/react": "^15.0.6",
|
|
21
21
|
"react-intl": "^6.4.2"
|
|
22
22
|
},
|