@box/box-ai-agent-selector 0.52.6 → 0.53.0
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/types.js +5 -2
- package/dist/esm/index.js +13 -12
- package/dist/esm/lib/box-ai-agent-selector-with-api-container.js +16 -14
- package/dist/esm/lib/box-ai-agent-selector-with-api.js +51 -49
- package/dist/esm/lib/box-ai-agent-selector.js +1511 -1507
- package/dist/i18n/en-x-pseudo.js +8 -8
- package/dist/i18n/en-x-pseudo.properties +8 -8
- package/dist/styles/box-ai-agent-selector.css +1 -1
- package/dist/types/lib/box-ai-agent-selector-with-api-container.d.ts +1 -1
- package/dist/types/lib/box-ai-agent-selector-with-api.d.ts +1 -1
- package/dist/types/lib/box-ai-agent-selector.d.ts +1 -1
- package/dist/types/lib/types.d.ts +13 -0
- package/package.json +1 -1
package/dist/i18n/en-x-pseudo.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
export default {
|
2
|
-
"boxAI.agentSelector.agent": "⟦萬
|
3
|
-
"boxAI.agentSelector.agentList": "⟦萬萬
|
4
|
-
"boxAI.agentSelector.defaultAgent": "⟦萬萬
|
5
|
-
"boxAI.agentSelector.defaultStatus": "⟦萬萬
|
6
|
-
"boxAI.agentSelector.errorMessage": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬
|
7
|
-
"boxAI.agentSelector.errorTooltip": "⟦萬萬萬萬萬萬萬萬萬萬萬萬
|
8
|
-
"boxAI.agentSelector.loadingMessage": "⟦萬萬萬萬萬萬萬
|
9
|
-
"boxAI.agentSelector.selectAgent": "⟦萬萬萬萬
|
2
|
+
"boxAI.agentSelector.agent": "⟦萬 Àġеήτ 國⟧",
|
3
|
+
"boxAI.agentSelector.agentList": "⟦萬萬 Äġéиť Ĺïśţ 國國⟧",
|
4
|
+
"boxAI.agentSelector.defaultAgent": "⟦萬萬 Ďεƒâũĺţ 國國⟧",
|
5
|
+
"boxAI.agentSelector.defaultStatus": "⟦萬萬 ĎΈ₣ÅÛĻŦ 國國⟧",
|
6
|
+
"boxAI.agentSelector.errorMessage": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 ₣ãïļėď ŧό ĺŏãď áνáïľâвľе άġεπťś. Ύοŭ'ŕę ¢цяґέйτľý üŝіňğ ỳøüя οřĝāпĭżάţïοη'ѕ ďęƒáûľţ âĝěпŧ. Çľĩĉκ нèяê ŧø ŕèŧŕγ. 國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國⟧",
|
7
|
+
"boxAI.agentSelector.errorTooltip": "⟦萬萬萬萬萬萬萬萬萬萬萬萬 ₣ǻìĺėď ŧö ĺøǻď ăνǻιĺâьĺê ǻğĕиŧş. Ťѓÿ ąġάīπ. 國國國國國國國國國國國國⟧",
|
8
|
+
"boxAI.agentSelector.loadingMessage": "⟦萬萬萬萬萬萬萬 Ľόǻďїиğ àναϊļάьļé ãğёņτş 國國國國國國國⟧",
|
9
|
+
"boxAI.agentSelector.selectAgent": "⟦萬萬萬萬 Şēĺëçţ ǻņ Âġейτ 國國國國⟧"
|
10
10
|
}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# AI agent label
|
2
|
-
boxAI.agentSelector.agent = ⟦萬
|
2
|
+
boxAI.agentSelector.agent = ⟦萬 Àġеήτ 國⟧
|
3
3
|
# Aria Label for the list displaying the agents
|
4
|
-
boxAI.agentSelector.agentList = ⟦萬萬
|
4
|
+
boxAI.agentSelector.agentList = ⟦萬萬 Äġéиť Ĺïśţ 國國⟧
|
5
5
|
# Label for the default agent used when no other agents are available
|
6
|
-
boxAI.agentSelector.defaultAgent = ⟦萬萬
|
6
|
+
boxAI.agentSelector.defaultAgent = ⟦萬萬 Ďεƒâũĺţ 國國⟧
|
7
7
|
# Status indicator to define whether or not the agent on the list is the default for the enterprise
|
8
|
-
boxAI.agentSelector.defaultStatus = ⟦萬萬
|
8
|
+
boxAI.agentSelector.defaultStatus = ⟦萬萬 ĎΈ₣ÅÛĻŦ 國國⟧
|
9
9
|
# Error message for retry option when the agents failed to load
|
10
|
-
boxAI.agentSelector.errorMessage = ⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬
|
10
|
+
boxAI.agentSelector.errorMessage = ⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 ₣ãïļėď ŧό ĺŏãď áνáïľâвľе άġεπťś. Ύοŭ'ŕę ¢цяґέйτľý üŝіňğ ỳøüя οřĝāпĭżάţïοη'ѕ ďęƒáûľţ âĝěпŧ. Çľĩĉκ нèяê ŧø ŕèŧŕγ. 國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國⟧
|
11
11
|
# Error tooltip content for agent selector when the agents failed to load
|
12
|
-
boxAI.agentSelector.errorTooltip = ⟦萬萬萬萬萬萬萬萬萬萬萬萬
|
12
|
+
boxAI.agentSelector.errorTooltip = ⟦萬萬萬萬萬萬萬萬萬萬萬萬 ₣ǻìĺėď ŧö ĺøǻď ăνǻιĺâьĺê ǻğĕиŧş. Ťѓÿ ąġάīπ. 國國國國國國國國國國國國⟧
|
13
13
|
# Message for loading indicator while loading available agents
|
14
|
-
boxAI.agentSelector.loadingMessage = ⟦萬萬萬萬萬萬萬
|
14
|
+
boxAI.agentSelector.loadingMessage = ⟦萬萬萬萬萬萬萬 Ľόǻďїиğ àναϊļάьļé ãğёņτş 國國國國國國國⟧
|
15
15
|
# Label for the AI agent selector when the user has not selected any agent
|
16
|
-
boxAI.agentSelector.selectAgent = ⟦萬萬萬萬
|
16
|
+
boxAI.agentSelector.selectAgent = ⟦萬萬萬萬 Şēĺëçţ ǻņ Âġейτ 國國國國⟧
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._agentSelector_1x7bs_1._agentAlignmentLeft_1x7bs_1{margin-left:0}._agentSelector_1x7bs_1._agentAlignmentOffsetFromLeft_1x7bs_4{margin-inline-start:.75rem}._agentSelectorButton_1x7bs_7{background:transparent;border:0}._agentSelector_1x7bs_1 ._agentStatus_1x7bs_11{margin-inline-start:.5rem}._agentSelector_1x7bs_1 ._agentStatus_1x7bs_11>span{background:linear-gradient(#f4f4f4 0,#f4f4f4 0) padding-box,linear-gradient(135deg,#fe01da,#2486fc) border-box;border:.0625rem solid rgba(0,0,0,0)}._agentSelector_1x7bs_1 ._agentStatus_1x7bs_11>span span{color:transparent;text-transform:uppercase;background:linear-gradient(135deg,#fe01da,#2486fc);-webkit-background-clip:text;background-clip:text}._agentSelector_1x7bs_1 ._agentLoader_1x7bs_24{position:inherit}._agentSelector_1x7bs_1 ._agentError_1x7bs_27 path{fill:#d5324e}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30{display:flex;max-width:376px;text-align:start;background-color:#faf5fe}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30 ._agentLabel_1x7bs_36{flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30 ._dropdownIndicator_1x7bs_42{flex-shrink:0;margin-inline-start:0}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30 ._dropdownIndicator_1x7bs_42 svg{margin-inline-start:0}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30:disabled ._dropdownIndicator_1x7bs_42{opacity:.3}@media (max-width: 374px){._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30{width:100%}}._agentSelector_1x7bs_1._sidebar_1x7bs_57{margin:0 .25rem 0 0;margin-inline-start:0}@media (max-width: 767px){._agentSelector_1x7bs_1._sidebar_1x7bs_57{width:100%}}._agentSelector_1x7bs_1._sidebar_1x7bs_57 ._triggerChip_1x7bs_30{max-width:246px}._agentListRetryButton_1x7bs_70[data-target-id]{max-width:320px;margin:.25rem;text-wrap:wrap}._agentListRetryButton_1x7bs_70[data-target-id]._sidebar_1x7bs_57{max-width:184px}._agentList_1x7bs_70{display:flex;flex-wrap:wrap;row-gap:var(--space-2)}._agentList_1x7bs_70:focus-visible{outline:0}._agentList_1x7bs_70>[role=option]{display:flex;width:100%;overflow:hidden;border-radius:var(--radius-4)}._agentList_1x7bs_70>[role=option][data-focus-visible],._agentList_1x7bs_70>[role=option][data-active-item]{background:var(--item-hover)}._agentList_1x7bs_70>[role=option][data-focus-visible]{--actions-opacity: 1;outline:var(--border-2) solid var(--outline-focus-on-light);outline-offset:calc(var(--border-4) * -1)}._agentListItemIcon_1x7bs_102{width:2rem;height:2rem}._agentListContainer_1x7bs_107{--item-hover: var(--surface-item-small-surface-hover);min-width:320px;max-width:376px;z-index:2;box-sizing:border-box;width:360px;padding:var(--space-3);overflow:hidden;background:var(--surface-card-surface);border-radius:var(--radius-4);box-shadow:var(--dropshadow-3);margin-block:var(--space-1)}@media (max-width: 376px){._agentListContainer_1x7bs_107{max-width:320px;margin-left:-.5rem}}._agentListContainer_1x7bs_107:focus-visible{outline:0}._agentListContainer_1x7bs_107>[role=listbox]{display:flex;width:100%;max-height:32.5rem;overflow:hidden auto;border-radius:var(--radius-4)}._agentListContainer_1x7bs_107>[role=listbox][data-focus-visible]{outline:0}._agentListContainer_1x7bs_107._sidebar_1x7bs_57{min-width:320px;max-width:360px;transform:translate(-6px)}@media (max-width: 360px){._agentListContainer_1x7bs_107._sidebar_1x7bs_57{max-width:320px;margin-left:-.5rem}}@media (max-width: 767px){._agentListContainer_1x7bs_107._sidebar_1x7bs_57{width:auto;max-width:unset}}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { BoxAiAgentSelectorWithApiProps } from './types';
|
2
|
-
export declare function BoxAiAgentSelectorWithApiContainer({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState, disabled, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare function BoxAiAgentSelectorWithApiContainer({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState, disabled, selectorAlignment, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default BoxAiAgentSelectorWithApiContainer;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { BoxAiAgentSelectorWithApiProps } from './types';
|
2
|
-
export declare function BoxAiAgentSelectorWithApi({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState: requestStateProp, disabled, onAgentsListOpen, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in false
|
2
|
+
export declare function BoxAiAgentSelectorWithApi({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState: requestStateProp, disabled, onAgentsListOpen, selectorAlignment, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in false
|
3
3
|
variant, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element | null;
|
4
4
|
export default BoxAiAgentSelectorWithApi;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { BoxAiAgentSelectorProps } from './types';
|
2
|
-
export declare function BoxAiAgentSelector({ agents, contentClassName, onErrorAction, recordAction, requestState, disabled, onAgentsListOpen, selectedAgent, triggerChipClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in true
|
2
|
+
export declare function BoxAiAgentSelector({ agents, contentClassName, onErrorAction, recordAction, requestState, disabled, onAgentsListOpen, selectedAgent, selectorAlignment, triggerChipClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in true
|
3
3
|
variant, }: BoxAiAgentSelectorProps): import("react/jsx-runtime").JSX.Element;
|
4
4
|
export default BoxAiAgentSelector;
|
@@ -18,6 +18,10 @@ export declare enum REQUEST_STATE {
|
|
18
18
|
ERROR = "error",
|
19
19
|
CANCELLED = "cancelled"
|
20
20
|
}
|
21
|
+
export declare enum SELECTOR_ALIGNMENT {
|
22
|
+
LEFT = "left",
|
23
|
+
OFFSET_FROM_LEFT = "offset_from_left"
|
24
|
+
}
|
21
25
|
export type AgentState = {
|
22
26
|
agents: AgentType[];
|
23
27
|
requestState: REQUEST_STATE;
|
@@ -77,6 +81,11 @@ export interface BoxAiAgentSelectorWithApiProps {
|
|
77
81
|
disabled?: boolean;
|
78
82
|
/** Callback function when user opens agents list */
|
79
83
|
onAgentsListOpen?: () => void;
|
84
|
+
/**
|
85
|
+
* Alignment of the agent selector, either left or offset from left.
|
86
|
+
* @default SELECTOR_ALIGNMENT.OFFSET_FROM_LEFT
|
87
|
+
*/
|
88
|
+
selectorAlignment?: SELECTOR_ALIGNMENT;
|
80
89
|
/**
|
81
90
|
* Determines whether the agent selector component should remain hidden
|
82
91
|
* until the initial data fetch is complete.
|
@@ -120,6 +129,10 @@ export interface BoxAiAgentSelectorProps {
|
|
120
129
|
* The currently selected agent, or null if no agent is selected.
|
121
130
|
*/
|
122
131
|
selectedAgent: AgentType | null;
|
132
|
+
/**
|
133
|
+
* Alignment of the agent selector, either left or offset from left.
|
134
|
+
*/
|
135
|
+
selectorAlignment?: SELECTOR_ALIGNMENT;
|
123
136
|
triggerChipClassName?: string;
|
124
137
|
useAgentLocalStorage?: boolean;
|
125
138
|
/**
|