@stack-spot/ai-chat-widget 1.21.0 → 1.21.1
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/CHANGELOG.md +7 -0
- package/dist/app-metadata.json +2 -2
- package/dist/views/MessageInput/SelectContent.d.ts.map +1 -1
- package/dist/views/MessageInput/SelectContent.js +14 -2
- package/dist/views/MessageInput/SelectContent.js.map +1 -1
- package/package.json +1 -1
- package/src/app-metadata.json +2 -2
- package/src/views/MessageInput/SelectContent.tsx +22 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.21.1](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.21.0...ai-chat-widget@v1.21.1) (2025-05-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* chat options title ([#145](https://github.com/stack-spot/portal-ai-chat-widget/issues/145)) ([03fed29](https://github.com/stack-spot/portal-ai-chat-widget/commit/03fed29ab6897c538f9e453c8b153e1f5ed7b0d8))
|
|
9
|
+
|
|
3
10
|
## [1.21.0](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.20.2...ai-chat-widget@v1.21.0) (2025-05-19)
|
|
4
11
|
|
|
5
12
|
|
package/dist/app-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/ai-chat-widget",
|
|
3
|
-
"version": "1.21.
|
|
4
|
-
"date": "
|
|
3
|
+
"version": "1.21.1",
|
|
4
|
+
"date": "Tue May 20 2025 13:32:27 GMT+0000 (Coordinated Universal Time)",
|
|
5
5
|
"dependencies": [
|
|
6
6
|
{
|
|
7
7
|
"name": "@stack-spot/app-metadata",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectContent.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/SelectContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectContent.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/SelectContent.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,sDAiEzB,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { Clip, KnowledgeSource, Spaces, Stack } from '@citric/icons';
|
|
3
3
|
import { IconButton } from '@citric/ui';
|
|
4
4
|
import { SelectionList } from '@stack-spot/portal-components/SelectionList';
|
|
5
|
+
import { useTranslate } from '@stack-spot/portal-translate';
|
|
5
6
|
import { useMemo, useState } from 'react';
|
|
6
7
|
import { useCurrentChatState, useWidget } from '../../context/hooks.js';
|
|
7
8
|
export const SelectContent = () => {
|
|
@@ -9,6 +10,7 @@ export const SelectContent = () => {
|
|
|
9
10
|
const [visibleMenu, setVisibleMenu] = useState(false);
|
|
10
11
|
const features = useCurrentChatState('features');
|
|
11
12
|
const hasFeatureButtons = features.workspace || features.knowledgeSource || features.stack;
|
|
13
|
+
const t = useTranslate(dictionary);
|
|
12
14
|
const itemConfigs = [
|
|
13
15
|
{
|
|
14
16
|
key: 'knowledgeSource',
|
|
@@ -40,9 +42,19 @@ export const SelectContent = () => {
|
|
|
40
42
|
})), [features, widget]);
|
|
41
43
|
if (!hasFeatureButtons)
|
|
42
44
|
return null;
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { color: "light", appearance: "square", role: "button", title:
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { color: "light", appearance: "square", role: "button", title: visibleMenu ? t.collapse : t.expand, "data-test-hint": "button-options", "aria-label": visibleMenu ? t.collapse : t.expand, onClick: () => setVisibleMenu(state => !state), children: _jsx(Clip, {}) }), _jsx(SelectionList, { style: {
|
|
44
46
|
position: 'absolute',
|
|
45
47
|
top: '-140px',
|
|
46
|
-
}, id: "
|
|
48
|
+
}, id: "menuConfig", visible: visibleMenu, onHide: () => setVisibleMenu(false), items: listItems })] }));
|
|
49
|
+
};
|
|
50
|
+
const dictionary = {
|
|
51
|
+
en: {
|
|
52
|
+
expand: 'Expand options',
|
|
53
|
+
collapse: 'Collapse options',
|
|
54
|
+
},
|
|
55
|
+
pt: {
|
|
56
|
+
expand: 'Mostrar opções',
|
|
57
|
+
collapse: 'Esconder opções',
|
|
58
|
+
},
|
|
47
59
|
};
|
|
48
60
|
//# sourceMappingURL=SelectContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectContent.js","sourceRoot":"","sources":["../../../src/views/MessageInput/SelectContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAKpE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACrD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAChD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,eAAe,IAAI,QAAQ,CAAC,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"SelectContent.js","sourceRoot":"","sources":["../../../src/views/MessageInput/SelectContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,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BAAgB;QACxB,QAAQ,EAAE,iBAAiB;KAC5B;CACmB,CAAA"}
|
package/package.json
CHANGED
package/src/app-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/ai-chat-widget",
|
|
3
|
-
"version": "1.21.
|
|
4
|
-
"date": "
|
|
3
|
+
"version": "1.21.1",
|
|
4
|
+
"date": "Tue May 20 2025 13:32:27 GMT+0000 (Coordinated Universal Time)",
|
|
5
5
|
"dependencies": [
|
|
6
6
|
{
|
|
7
7
|
"name": "@stack-spot/app-metadata",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Clip, KnowledgeSource, Spaces, Stack } from '@citric/icons'
|
|
2
2
|
import { IconButton } from '@citric/ui'
|
|
3
3
|
import { SelectionList } from '@stack-spot/portal-components/SelectionList'
|
|
4
|
+
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
4
5
|
import { useMemo, useState } from 'react'
|
|
5
6
|
import { useCurrentChatState, useWidget } from '../../context/hooks'
|
|
6
7
|
|
|
@@ -12,6 +13,7 @@ export const SelectContent = () => {
|
|
|
12
13
|
const [visibleMenu, setVisibleMenu] = useState(false)
|
|
13
14
|
const features = useCurrentChatState('features')
|
|
14
15
|
const hasFeatureButtons = features.workspace || features.knowledgeSource || features.stack
|
|
16
|
+
const t = useTranslate(dictionary)
|
|
15
17
|
|
|
16
18
|
const itemConfigs = [
|
|
17
19
|
{
|
|
@@ -49,22 +51,22 @@ export const SelectContent = () => {
|
|
|
49
51
|
|
|
50
52
|
return (
|
|
51
53
|
<>
|
|
52
|
-
<IconButton
|
|
54
|
+
<IconButton
|
|
53
55
|
color="light"
|
|
54
56
|
appearance="square"
|
|
55
57
|
role="button"
|
|
56
|
-
title=
|
|
57
|
-
data-test-hint="button-
|
|
58
|
-
aria-label=
|
|
58
|
+
title={visibleMenu ? t.collapse : t.expand}
|
|
59
|
+
data-test-hint="button-options"
|
|
60
|
+
aria-label={visibleMenu ? t.collapse : t.expand}
|
|
59
61
|
onClick={() => setVisibleMenu(state => !state)}>
|
|
60
62
|
<Clip />
|
|
61
63
|
</IconButton>
|
|
62
64
|
<SelectionList
|
|
63
|
-
style={{
|
|
64
|
-
position: 'absolute',
|
|
65
|
-
top: '-140px',
|
|
65
|
+
style={{
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
top: '-140px',
|
|
66
68
|
}}
|
|
67
|
-
id="
|
|
69
|
+
id="menuConfig"
|
|
68
70
|
visible={visibleMenu}
|
|
69
71
|
onHide={() => setVisibleMenu(false)}
|
|
70
72
|
items={listItems}
|
|
@@ -72,3 +74,15 @@ export const SelectContent = () => {
|
|
|
72
74
|
</>
|
|
73
75
|
)
|
|
74
76
|
}
|
|
77
|
+
|
|
78
|
+
const dictionary = {
|
|
79
|
+
en: {
|
|
80
|
+
expand: 'Expand options',
|
|
81
|
+
collapse: 'Collapse options',
|
|
82
|
+
},
|
|
83
|
+
pt: {
|
|
84
|
+
expand: 'Mostrar opções',
|
|
85
|
+
collapse: 'Esconder opções',
|
|
86
|
+
},
|
|
87
|
+
} satisfies Dictionary
|
|
88
|
+
|