@box/box-ai-agent-selector 0.23.0 → 0.23.3
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/esm/lib/box-ai-agent-selector.js +4 -5
- package/esm/lib/box-ai-agent.js +9 -10
- package/package.json +5 -5
- package/types/lib/box-ai-agent-selector-with-api-container.d.ts +1 -1
- package/types/lib/box-ai-agent-selector-with-api.d.ts +1 -1
- package/types/lib/box-ai-agent-selector.d.ts +1 -1
- package/types/lib/box-ai-agent.d.ts +1 -1
- package/types/lib/constants.d.ts +1 -1
- package/types/lib/contexts/constants.d.ts +1 -1
- package/types/lib/contexts/context.d.ts +1 -1
- package/types/lib/contexts/reducer.d.ts +1 -1
- package/types/lib/stories/shared.d.ts +2 -2
- package/types/lib/test-utils/mocks.d.ts +1 -1
- package/types/lib/types.d.ts +2 -2
@@ -1,4 +1,3 @@
|
|
1
|
-
import "../../styles/box-ai-agent-selector.css";
|
2
1
|
import { useFullTextTooltip as z, FilterChip as m, Popover as p, Tooltip as H, Status as J, LoadingIndicator as X, SmallList as Z, Button as $ } from "@box/blueprint-web";
|
3
2
|
import { AlertBadge as q } from "@box/blueprint-web-assets/icons/Fill";
|
4
3
|
import d from "clsx";
|
@@ -11,7 +10,7 @@ import { useAgentsDispatch as rt } from "./contexts/context.js";
|
|
11
10
|
import i from "./messages.js";
|
12
11
|
import { R } from "../../chunks/types.js";
|
13
12
|
import { jsx as t, jsxs as x } from "react/jsx-runtime";
|
14
|
-
const it = "_agentSelector_1uxm1_1", st = "_agentStatus_1uxm1_4", lt = "_agentLoader_1uxm1_18", ct = "_agentError_1uxm1_21", gt = "_triggerChip_1uxm1_24", mt = "_agentLabel_1uxm1_29", pt = "_dropdownIndicator_1uxm1_35", dt = "_sidebar_1uxm1_50", _t = "_agentListItemIcon_1uxm1_69", ft = "_agentListContainer_1uxm1_74", ut = "_agentListRetryButton_1uxm1_93", a = {
|
13
|
+
import '../../styles/box-ai-agent-selector.css';const it = "_agentSelector_1uxm1_1", st = "_agentStatus_1uxm1_4", lt = "_agentLoader_1uxm1_18", ct = "_agentError_1uxm1_21", gt = "_triggerChip_1uxm1_24", mt = "_agentLabel_1uxm1_29", pt = "_dropdownIndicator_1uxm1_35", dt = "_sidebar_1uxm1_50", _t = "_agentListItemIcon_1uxm1_69", ft = "_agentListContainer_1uxm1_74", ut = "_agentListRetryButton_1uxm1_93", a = {
|
15
14
|
agentSelector: it,
|
16
15
|
agentStatus: st,
|
17
16
|
agentLoader: lt,
|
@@ -24,7 +23,7 @@ const it = "_agentSelector_1uxm1_1", st = "_agentStatus_1uxm1_4", lt = "_agentLo
|
|
24
23
|
agentListContainer: ft,
|
25
24
|
agentListRetryButton: ut
|
26
25
|
};
|
27
|
-
function
|
26
|
+
function yt({
|
28
27
|
agents: f,
|
29
28
|
contentClassName: A,
|
30
29
|
onErrorAction: b,
|
@@ -148,6 +147,6 @@ function Gt({
|
|
148
147
|
});
|
149
148
|
}
|
150
149
|
export {
|
151
|
-
|
152
|
-
|
150
|
+
yt as BoxAiAgentSelector,
|
151
|
+
yt as default
|
153
152
|
};
|
package/esm/lib/box-ai-agent.js
CHANGED
@@ -1,21 +1,20 @@
|
|
1
|
-
import "../../styles/box-ai-agent.css";
|
2
1
|
import { useFullTextTooltip as c, SmallList as s, Text as d, Status as f } from "@box/blueprint-web";
|
3
2
|
import { BoxAiLogo as p } from "@box/blueprint-web-assets/icons/Logo";
|
4
3
|
import { SurfaceStatusSurfaceGray as g } from "@box/blueprint-web-assets/tokens/tokens";
|
5
4
|
import { useRef as A } from "react";
|
6
5
|
import { useIntl as _ } from "react-intl";
|
7
6
|
import I from "./messages.js";
|
8
|
-
import { jsxs as
|
9
|
-
const S = "_agentListItem_1s7vn_1", x = "_agentListItemIcon_1s7vn_1", N = "_defaultAgentHeader_1s7vn_5", h = "_defaultAgentName_1s7vn_9", v = "_defaultAgentStatus_1s7vn_15", a = {
|
7
|
+
import { jsxs as l, jsx as t, Fragment as L } from "react/jsx-runtime";
|
8
|
+
import '../../styles/box-ai-agent.css';const S = "_agentListItem_1s7vn_1", x = "_agentListItemIcon_1s7vn_1", N = "_defaultAgentHeader_1s7vn_5", h = "_defaultAgentName_1s7vn_9", v = "_defaultAgentStatus_1s7vn_15", a = {
|
10
9
|
agentListItem: S,
|
11
10
|
agentListItemIcon: x,
|
12
11
|
defaultAgentHeader: N,
|
13
12
|
defaultAgentName: h,
|
14
13
|
defaultAgentStatus: v
|
15
14
|
};
|
16
|
-
function
|
15
|
+
function k({
|
17
16
|
agent: e,
|
18
|
-
onAction:
|
17
|
+
onAction: i
|
19
18
|
}) {
|
20
19
|
const {
|
21
20
|
formatMessage: m
|
@@ -27,10 +26,10 @@ function w({
|
|
27
26
|
textValue: e.name,
|
28
27
|
skipOverflowCheck: !n
|
29
28
|
});
|
30
|
-
return /* @__PURE__ */
|
29
|
+
return /* @__PURE__ */ l(s.Item, {
|
31
30
|
className: a.agentListItem,
|
32
31
|
id: e.id,
|
33
|
-
onAction:
|
32
|
+
onAction: i,
|
34
33
|
children: [/* @__PURE__ */ t(s.Thumbnail, {
|
35
34
|
className: a.agentListItemIcon,
|
36
35
|
children: e.imageURL ? /* @__PURE__ */ t("img", {
|
@@ -42,7 +41,7 @@ function w({
|
|
42
41
|
}), /* @__PURE__ */ t(s.Header, {
|
43
42
|
className: n ? a.defaultAgentHeader : void 0,
|
44
43
|
textValue: e.name,
|
45
|
-
children: n ? /* @__PURE__ */
|
44
|
+
children: n ? /* @__PURE__ */ l(L, {
|
46
45
|
children: [/* @__PURE__ */ t(o, {
|
47
46
|
...u,
|
48
47
|
children: /* @__PURE__ */ t(d, {
|
@@ -65,6 +64,6 @@ function w({
|
|
65
64
|
});
|
66
65
|
}
|
67
66
|
export {
|
68
|
-
|
69
|
-
|
67
|
+
k as BoxAiAgent,
|
68
|
+
k as default
|
70
69
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/box-ai-agent-selector",
|
3
|
-
"version": "0.23.
|
3
|
+
"version": "0.23.3",
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
5
5
|
"peerDependencies": {
|
6
6
|
"@box/blueprint-web": "^7.31.1",
|
@@ -10,10 +10,10 @@
|
|
10
10
|
"react-intl": "^6.4.2"
|
11
11
|
},
|
12
12
|
"devDependencies": {
|
13
|
-
"@box/blueprint-web": "^9.16.
|
14
|
-
"@box/blueprint-web-assets": "^4.
|
13
|
+
"@box/blueprint-web": "^9.16.3",
|
14
|
+
"@box/blueprint-web-assets": "^4.33.0",
|
15
15
|
"@box/eslint-plugin-blueprint": "^1.0.3",
|
16
|
-
"@box/storybook-utils": "^0.8.
|
16
|
+
"@box/storybook-utils": "^0.8.2",
|
17
17
|
"react-intl": "^6.4.2"
|
18
18
|
},
|
19
19
|
"scripts": {
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"sideEffects": [
|
47
47
|
"**/*.css"
|
48
48
|
],
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "b16d18a1af84c9a7afd61816fdd396f151e317f0"
|
50
50
|
}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
1
|
+
import { BoxAiAgentSelectorWithApiProps } from './types';
|
2
2
|
export declare function BoxAiAgentSelectorWithApiContainer({ fetcher, hostAppName, onSelectAgent, recordAction, requestState, disabled, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default BoxAiAgentSelectorWithApiContainer;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
1
|
+
import { BoxAiAgentSelectorWithApiProps } from './types';
|
2
2
|
export declare function BoxAiAgentSelectorWithApi({ fetcher, hostAppName, onSelectAgent, recordAction, requestState: requestStateProp, disabled, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, variant, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element | null;
|
3
3
|
export default BoxAiAgentSelectorWithApi;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
1
|
+
import { BoxAiAgentSelectorProps } from './types';
|
2
2
|
export declare function BoxAiAgentSelector({ agents, contentClassName, onErrorAction, recordAction, requestState, disabled, selectedAgent, triggerChipClassName, variant, }: BoxAiAgentSelectorProps): import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default BoxAiAgentSelector;
|
package/types/lib/constants.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { RecordActionType } from './types';
|
2
2
|
export declare const LOGGER_ACTION_CLICK = "click";
|
3
3
|
export declare const LOGGER_ACTION_KEYPRESS = "keypress";
|
4
4
|
export declare const LOGGER_ACTION_PROGRAMMATIC = "programmatic";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import { AgentState } from '../types';
|
2
2
|
export declare const defaultState: AgentState;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { AgentAction, AgentState } from '../types';
|
2
2
|
type DispatchType = React.Dispatch<AgentAction>;
|
3
3
|
export declare function useAgents(): AgentState;
|
4
4
|
export declare function useAgentsDispatch(): DispatchType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import { AgentAction, AgentState } from '../types';
|
2
2
|
export declare const agentsReducer: (state: AgentState, action: AgentAction) => AgentState;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { BoxAiAgentSelectorWithApiProps } from '../../index';
|
2
2
|
export declare const defaultBoxAiAgentSelectorProps: {
|
3
3
|
fetcher: () => Promise<{
|
4
|
-
agents: import(
|
4
|
+
agents: import('../types').AgentType[];
|
5
5
|
}>;
|
6
6
|
};
|
7
7
|
export declare const DefaultBoxAiAgentSelectorWithApiContainer: (props: BoxAiAgentSelectorWithApiProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { AgentState, AgentType } from '../types';
|
2
2
|
export declare const mockAgents: AgentType[];
|
3
3
|
export declare const mockAgentsWithLongNamesAndDescriptions: AgentType[];
|
4
4
|
export declare const mockAgentProviderState: AgentState;
|
package/types/lib/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { LOGGER_ACTION_CLICK, LOGGER_ACTION_KEYPRESS, LOGGER_ACTION_PROGRAMMATIC } from './constants';
|
2
|
+
import { ACTIONS } from './contexts';
|
3
3
|
export type AgentType = {
|
4
4
|
id: string;
|
5
5
|
name: string;
|