@gooddata/sdk-ui-gen-ai 10.12.0-alpha.9 → 10.13.0-alpha.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/NOTICE +3 -38
- package/esm/components/EmptyState.d.ts +11 -1
- package/esm/components/EmptyState.d.ts.map +1 -1
- package/esm/components/EmptyState.js +31 -26
- package/esm/components/EmptyState.js.map +1 -1
- package/esm/components/ErrorBoundary.d.ts +16 -0
- package/esm/components/ErrorBoundary.d.ts.map +1 -0
- package/esm/components/ErrorBoundary.js +22 -0
- package/esm/components/ErrorBoundary.js.map +1 -0
- package/esm/components/GenAIChat.d.ts.map +1 -1
- package/esm/components/GenAIChat.js +7 -2
- package/esm/components/GenAIChat.js.map +1 -1
- package/esm/components/GenAIChatDialog.d.ts.map +1 -1
- package/esm/components/GenAIChatDialog.js +7 -2
- package/esm/components/GenAIChatDialog.js.map +1 -1
- package/esm/components/GenAIChatOverlay.d.ts +16 -2
- package/esm/components/GenAIChatOverlay.d.ts.map +1 -1
- package/esm/components/GenAIChatOverlay.js +15 -10
- package/esm/components/GenAIChatOverlay.js.map +1 -1
- package/esm/components/GenAIChatWrapper.d.ts.map +1 -1
- package/esm/components/GenAIChatWrapper.js +8 -4
- package/esm/components/GenAIChatWrapper.js.map +1 -1
- package/esm/components/GlobalError.d.ts +21 -0
- package/esm/components/GlobalError.d.ts.map +1 -0
- package/esm/components/GlobalError.js +25 -0
- package/esm/components/GlobalError.js.map +1 -0
- package/esm/components/Input.d.ts +13 -2
- package/esm/components/Input.d.ts.map +1 -1
- package/esm/components/Input.js +22 -15
- package/esm/components/Input.js.map +1 -1
- package/esm/components/Messages.d.ts +7 -1
- package/esm/components/Messages.d.ts.map +1 -1
- package/esm/components/Messages.js +15 -9
- package/esm/components/Messages.js.map +1 -1
- package/esm/components/StopIcon.d.ts +7 -0
- package/esm/components/StopIcon.d.ts.map +1 -0
- package/esm/components/StopIcon.js +10 -0
- package/esm/components/StopIcon.js.map +1 -0
- package/esm/components/messages/AgentIcon.d.ts +1 -0
- package/esm/components/messages/AgentIcon.d.ts.map +1 -1
- package/esm/components/messages/AgentIcon.js +4 -3
- package/esm/components/messages/AgentIcon.js.map +1 -1
- package/esm/components/messages/AgentState.d.ts.map +1 -1
- package/esm/components/messages/AgentState.js +3 -1
- package/esm/components/messages/AgentState.js.map +1 -1
- package/esm/components/messages/AssistantCancelledMessage.d.ts +8 -0
- package/esm/components/messages/AssistantCancelledMessage.d.ts.map +1 -0
- package/esm/components/messages/AssistantCancelledMessage.js +12 -0
- package/esm/components/messages/AssistantCancelledMessage.js.map +1 -0
- package/esm/components/messages/AssistantErrorMessage.d.ts +4 -1
- package/esm/components/messages/AssistantErrorMessage.d.ts.map +1 -1
- package/esm/components/messages/AssistantErrorMessage.js +6 -2
- package/esm/components/messages/AssistantErrorMessage.js.map +1 -1
- package/esm/components/messages/AssistantSearchCreateMessage.d.ts.map +1 -1
- package/esm/components/messages/AssistantSearchCreateMessage.js +3 -1
- package/esm/components/messages/AssistantSearchCreateMessage.js.map +1 -1
- package/esm/components/messages/AssistantTextMessage.js +1 -1
- package/esm/components/messages/AssistantTextMessage.js.map +1 -1
- package/esm/components/messages/FoundObjects.d.ts +8 -0
- package/esm/components/messages/FoundObjects.d.ts.map +1 -0
- package/esm/components/messages/FoundObjects.js +28 -0
- package/esm/components/messages/FoundObjects.js.map +1 -0
- package/esm/components/messages/SystemMessage.js +1 -1
- package/esm/components/messages/SystemMessage.js.map +1 -1
- package/esm/components/messages/UserTextMessage.d.ts +8 -0
- package/esm/components/messages/UserTextMessage.d.ts.map +1 -0
- package/esm/components/messages/UserTextMessage.js +10 -0
- package/esm/components/messages/UserTextMessage.js.map +1 -0
- package/esm/components/messages/Visualization.d.ts.map +1 -1
- package/esm/components/messages/Visualization.js +31 -4
- package/esm/components/messages/Visualization.js.map +1 -1
- package/esm/components/messages/index.d.ts +2 -1
- package/esm/components/messages/index.d.ts.map +1 -1
- package/esm/components/messages/index.js +2 -1
- package/esm/components/messages/index.js.map +1 -1
- package/esm/components/messages/useExecution.d.ts +4 -1
- package/esm/components/messages/useExecution.d.ts.map +1 -1
- package/esm/components/messages/useExecution.js +17 -23
- package/esm/components/messages/useExecution.js.map +1 -1
- package/esm/hooks/useGenAIStore.d.ts +1 -1
- package/esm/hooks/useGenAIStore.d.ts.map +1 -1
- package/esm/hooks/useGenAIStore.js +2 -5
- package/esm/hooks/useGenAIStore.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.json +102 -1
- package/esm/model.d.ts +84 -27
- package/esm/model.d.ts.map +1 -1
- package/esm/model.js +70 -23
- package/esm/model.js.map +1 -1
- package/esm/sdk-ui-gen-ai.d.ts +40 -17
- package/esm/store/messages/messagesSelectors.d.ts.map +1 -1
- package/esm/store/messages/messagesSelectors.js +2 -1
- package/esm/store/messages/messagesSelectors.js.map +1 -1
- package/esm/store/messages/messagesSlice.d.ts.map +1 -1
- package/esm/store/messages/messagesSlice.js +10 -0
- package/esm/store/messages/messagesSlice.js.map +1 -1
- package/esm/store/sideEffects/converters/evalToMessage.js +2 -2
- package/esm/store/sideEffects/converters/evalToMessage.js.map +1 -1
- package/esm/store/sideEffects/converters/messagesToHistory.d.ts.map +1 -1
- package/esm/store/sideEffects/converters/messagesToHistory.js +22 -10
- package/esm/store/sideEffects/converters/messagesToHistory.js.map +1 -1
- package/esm/store/sideEffects/index.js +3 -3
- package/esm/store/sideEffects/index.js.map +1 -1
- package/esm/store/sideEffects/onNewMessage.d.ts +5 -1
- package/esm/store/sideEffects/onNewMessage.d.ts.map +1 -1
- package/esm/store/sideEffects/onNewMessage.js +37 -27
- package/esm/store/sideEffects/onNewMessage.js.map +1 -1
- package/esm/store/sideEffects/utils.js +1 -1
- package/esm/store/sideEffects/utils.js.map +1 -1
- package/package.json +13 -13
- package/styles/css/agentIcon.css +6 -0
- package/styles/css/agentIcon.css.map +1 -1
- package/styles/css/input.css +10 -5
- package/styles/css/input.css.map +1 -1
- package/styles/css/main.css +64 -9
- package/styles/css/main.css.map +1 -1
- package/styles/css/messages.css +27 -1
- package/styles/css/messages.css.map +1 -1
- package/styles/css/window.css +7 -2
- package/styles/css/window.css.map +1 -1
- package/styles/scss/agentIcon.scss +10 -0
- package/styles/scss/input.scss +10 -5
- package/styles/scss/main.scss +17 -1
- package/styles/scss/messages.scss +36 -1
- package/styles/scss/window.scss +8 -2
- package/esm/components/messages/UserMessage.d.ts +0 -8
- package/esm/components/messages/UserMessage.d.ts.map +0 -1
- package/esm/components/messages/UserMessage.js +0 -8
- package/esm/components/messages/UserMessage.js.map +0 -1
package/NOTICE
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
|
|
9
9
|
|
|
10
|
-
Date generated: 2024-
|
|
10
|
+
Date generated: 2024-10-1
|
|
11
11
|
|
|
12
|
-
Revision ID:
|
|
12
|
+
Revision ID: 266145b7f290dd306974971535b2271c242c1c38
|
|
13
13
|
|
|
14
14
|
================================================================================
|
|
15
15
|
================================================================================
|
|
@@ -795,7 +795,6 @@ Revision ID: 5ec20cf74f4c62bb1ba108ac794da39cba17e187
|
|
|
795
795
|
- remark-rehype (11.1.0) [MIT]
|
|
796
796
|
- require-from-string (2.0.2) [MIT]
|
|
797
797
|
- requires-port (1.0.0) [MIT]
|
|
798
|
-
- reselect (5.1.1) [MIT]
|
|
799
798
|
- reselect (4.1.8) [MIT]
|
|
800
799
|
- resize-observer-polyfill (1.5.1) [MIT]
|
|
801
800
|
- resolve (1.22.8) [MIT, ISC]
|
|
@@ -29238,40 +29237,6 @@ SOFTWARE.
|
|
|
29238
29237
|
|
|
29239
29238
|
|
|
29240
29239
|
|
|
29241
|
-
--------------------------------------------------------------------------------
|
|
29242
|
-
Package Title: reselect (5.1.1)
|
|
29243
|
-
|
|
29244
|
-
Package Locator: npm+reselect$5.1.1
|
|
29245
|
-
--------------------------------------------------------------------------------
|
|
29246
|
-
|
|
29247
|
-
* Declared Licenses *
|
|
29248
|
-
MIT
|
|
29249
|
-
|
|
29250
|
-
|
|
29251
|
-
The MIT License (MIT)
|
|
29252
|
-
|
|
29253
|
-
Copyright (c) 2015-2018 Reselect Contributors
|
|
29254
|
-
|
|
29255
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
29256
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
29257
|
-
in the Software without restriction, including without limitation the rights
|
|
29258
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
29259
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
29260
|
-
furnished to do so, subject to the following conditions:
|
|
29261
|
-
|
|
29262
|
-
The above copyright notice and this permission notice shall be included in all
|
|
29263
|
-
copies or substantial portions of the Software.
|
|
29264
|
-
|
|
29265
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29266
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29267
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29268
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29269
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29270
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29271
|
-
SOFTWARE.
|
|
29272
|
-
|
|
29273
|
-
|
|
29274
|
-
|
|
29275
29240
|
--------------------------------------------------------------------------------
|
|
29276
29241
|
Package Title: reselect (4.1.8)
|
|
29277
29242
|
|
|
@@ -69221,4 +69186,4 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
69221
69186
|
--------------------------------------------------------------------------------
|
|
69222
69187
|
--------------------------------------------------------------------------------
|
|
69223
69188
|
|
|
69224
|
-
Report Generated by FOSSA on 2024-
|
|
69189
|
+
Report Generated by FOSSA on 2024-10-1
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { setMessages } from "../store/index.js";
|
|
3
|
+
import { WrappedComponentProps } from "react-intl";
|
|
4
|
+
type EmptyStateDispatchProps = {
|
|
5
|
+
setMessages: typeof setMessages;
|
|
6
|
+
};
|
|
7
|
+
export declare const EmptyState: import("react-redux").ConnectedComponent<React.FC<import("react-intl").WithIntlProps<EmptyStateDispatchProps & WrappedComponentProps>> & {
|
|
8
|
+
WrappedComponent: React.ComponentType<EmptyStateDispatchProps & WrappedComponentProps>;
|
|
9
|
+
}, import("react-redux").Omit<Omit<EmptyStateDispatchProps & WrappedComponentProps, "intl"> & {
|
|
10
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
11
|
+
}, "setMessages">>;
|
|
12
|
+
export {};
|
|
3
13
|
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAA+C,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAuBhG,KAAK,uBAAuB,GAAG;IAC3B,WAAW,EAAE,OAAO,WAAW,CAAC;CACnC,CAAC;AAqCF,eAAO,MAAM,UAAU;;;;kBAAqE,CAAC"}
|
|
@@ -1,40 +1,45 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { Button, Typography } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import {
|
|
5
|
-
import { makeAssistantTextMessage,
|
|
3
|
+
import { Button, Icon, Typography } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { connect } from "react-redux";
|
|
5
|
+
import { makeAssistantTextMessage, makeUserTextMessage } from "../model.js";
|
|
6
6
|
import { setMessages } from "../store/index.js";
|
|
7
|
+
import { defineMessage, FormattedMessage, injectIntl } from "react-intl";
|
|
7
8
|
const quickOptions = [
|
|
8
9
|
{
|
|
9
|
-
title:
|
|
10
|
-
question:
|
|
11
|
-
answer:
|
|
12
|
-
|
|
10
|
+
title: defineMessage({ id: "gd.gen-ai.welcome.option-1.title" }),
|
|
11
|
+
question: defineMessage({ id: "gd.gen-ai.welcome.option-1.title" }),
|
|
12
|
+
answer: defineMessage({ id: "gd.gen-ai.welcome.option-1.answer" }),
|
|
13
|
+
Icon: Icon.Search,
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
|
-
title:
|
|
16
|
-
question:
|
|
17
|
-
answer:
|
|
16
|
+
title: defineMessage({ id: "gd.gen-ai.welcome.option-2.title" }),
|
|
17
|
+
question: defineMessage({ id: "gd.gen-ai.welcome.option-2.title" }),
|
|
18
|
+
answer: defineMessage({ id: "gd.gen-ai.welcome.option-2.answer" }),
|
|
19
|
+
Icon: Icon.NewVisualization,
|
|
18
20
|
},
|
|
19
21
|
{
|
|
20
|
-
title:
|
|
21
|
-
question:
|
|
22
|
-
answer:
|
|
22
|
+
title: defineMessage({ id: "gd.gen-ai.welcome.option-3.title" }),
|
|
23
|
+
question: defineMessage({ id: "gd.gen-ai.welcome.option-3.title" }),
|
|
24
|
+
answer: defineMessage({ id: "gd.gen-ai.welcome.option-3.answer" }),
|
|
25
|
+
Icon: Icon.ChatBubble,
|
|
23
26
|
},
|
|
24
27
|
];
|
|
25
|
-
|
|
26
|
-
const dispatch = useDispatch();
|
|
27
|
-
const withClickValue = (option) => ({
|
|
28
|
-
onClick: () => {
|
|
29
|
-
dispatch(setMessages([makeUserMessage(option.question), makeAssistantTextMessage(option.answer)]));
|
|
30
|
-
},
|
|
31
|
-
value: option.title,
|
|
32
|
-
variant: "secondary",
|
|
33
|
-
iconLeft: option.icon,
|
|
34
|
-
});
|
|
28
|
+
const EmptyStateComponent = ({ setMessages, intl, }) => {
|
|
35
29
|
return (React.createElement("div", { className: "gd-gen-ai-chat__messages__empty" },
|
|
36
|
-
React.createElement(Typography, { tagName: "h1", className: "gd-gen-ai-chat__messages__empty__h1--accent" },
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
React.createElement(Typography, { tagName: "h1", className: "gd-gen-ai-chat__messages__empty__h1--accent" },
|
|
31
|
+
React.createElement(FormattedMessage, { id: "gd.gen-ai.welcome.line-1" })),
|
|
32
|
+
React.createElement(Typography, { tagName: "h1" },
|
|
33
|
+
React.createElement(FormattedMessage, { id: "gd.gen-ai.welcome.line-2" })),
|
|
34
|
+
quickOptions.map((option) => (React.createElement(Button, { key: option.title.id, onClick: () => setMessages([
|
|
35
|
+
makeUserTextMessage(intl.formatMessage(option.question)),
|
|
36
|
+
makeAssistantTextMessage(intl.formatMessage(option.answer)),
|
|
37
|
+
]), variant: "secondary" },
|
|
38
|
+
React.createElement(option.Icon, { width: 18, height: 18 }),
|
|
39
|
+
React.createElement(FormattedMessage, { tagName: "span", id: option.title.id }))))));
|
|
39
40
|
};
|
|
41
|
+
const mapDispatchToProps = {
|
|
42
|
+
setMessages,
|
|
43
|
+
};
|
|
44
|
+
export const EmptyState = connect(null, mapDispatchToProps)(injectIntl(EmptyStateComponent));
|
|
40
45
|
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../src/components/EmptyState.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,O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ps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
type ErrorBoundaryState = {
|
|
6
|
+
errorDetails: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
9
|
+
constructor(props: ErrorBoundaryProps);
|
|
10
|
+
static getDerivedStateFromError(error: unknown): {
|
|
11
|
+
errorDetails: string;
|
|
12
|
+
};
|
|
13
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,kBAAkB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBAC1E,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO;;;IAI9C,MAAM;CAgBT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { GlobalError } from "./GlobalError.js";
|
|
4
|
+
import { extractError } from "../store/sideEffects/utils.js";
|
|
5
|
+
export class ErrorBoundary extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = { errorDetails: "" };
|
|
9
|
+
}
|
|
10
|
+
static getDerivedStateFromError(error) {
|
|
11
|
+
return { errorDetails: extractError(error) };
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
if (this.state.errorDetails) {
|
|
15
|
+
return (React.createElement(GlobalError, { errorDetails: this.state.errorDetails, clearError: () => this.setState({
|
|
16
|
+
errorDetails: "",
|
|
17
|
+
}) }));
|
|
18
|
+
}
|
|
19
|
+
return this.props.children;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAU7D,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IACtF,YAAY,KAAyB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAc;QAC1C,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;IACjD,CAAC;IAED,MAAM;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO,CACH,oBAAC,WAAW,IACR,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,UAAU,EAAE,GAAG,EAAE,CACb,IAAI,CAAC,QAAQ,CAAC;oBACV,YAAY,EAAE,EAAE;iBACnB,CAAC,GAER,CACL,CAAC;QACN,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChat.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChat.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChat.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChat.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAItC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgB9C,CAAC"}
|
|
@@ -4,14 +4,19 @@ import { Provider as StoreProvider } from "react-redux";
|
|
|
4
4
|
import { useGenAIStore } from "../hooks/useGenAIStore.js";
|
|
5
5
|
import { IntlWrapper } from "../localization/IntlWrapper.js";
|
|
6
6
|
import { GenAIChatWrapper } from "./GenAIChatWrapper.js";
|
|
7
|
+
import { BackendProvider, useBackendStrict, useWorkspaceStrict, WorkspaceProvider } from "@gooddata/sdk-ui";
|
|
7
8
|
/**
|
|
8
9
|
* UI component that renders the Gen AI chat.
|
|
9
10
|
* @alpha
|
|
10
11
|
*/
|
|
11
12
|
export const GenAIChat = ({ backend, workspace, history }) => {
|
|
12
|
-
const
|
|
13
|
+
const effectiveBackend = useBackendStrict(backend);
|
|
14
|
+
const effectiveWorkspace = useWorkspaceStrict(workspace);
|
|
15
|
+
const genAIStore = useGenAIStore(effectiveBackend, effectiveWorkspace, history);
|
|
13
16
|
return (React.createElement(IntlWrapper, null,
|
|
14
17
|
React.createElement(StoreProvider, { store: genAIStore },
|
|
15
|
-
React.createElement(
|
|
18
|
+
React.createElement(BackendProvider, { backend: effectiveBackend },
|
|
19
|
+
React.createElement(WorkspaceProvider, { workspace: effectiveWorkspace },
|
|
20
|
+
React.createElement(GenAIChatWrapper, null))))));
|
|
16
21
|
};
|
|
17
22
|
//# sourceMappingURL=GenAIChat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChat.js","sourceRoot":"","sources":["../../src/components/GenAIChat.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChat.js","sourceRoot":"","sources":["../../src/components/GenAIChat.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAqB5G;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IACnF,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,aAAa,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAEhF,OAAO,CACH,oBAAC,WAAW;QACR,oBAAC,aAAa,IAAC,KAAK,EAAE,UAAU;YAC5B,oBAAC,eAAe,IAAC,OAAO,EAAE,gBAAgB;gBACtC,oBAAC,iBAAiB,IAAC,SAAS,EAAE,kBAAkB;oBAC5C,oBAAC,gBAAgB,OAAG,CACJ,CACN,CACN,CACN,CACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatDialog.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChatDialog.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAItC,MAAM,MAAM,oBAAoB,GAAG;IAC/B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwB1D,CAAC"}
|
|
@@ -4,12 +4,17 @@ import { Provider as StoreProvider } from "react-redux";
|
|
|
4
4
|
import { useGenAIStore } from "../hooks/useGenAIStore.js";
|
|
5
5
|
import { IntlWrapper } from "../localization/IntlWrapper.js";
|
|
6
6
|
import { GenAIChatOverlay } from "./GenAIChatOverlay.js";
|
|
7
|
+
import { BackendProvider, useBackendStrict, useWorkspaceStrict, WorkspaceProvider } from "@gooddata/sdk-ui";
|
|
7
8
|
export const GenAIChatDialog = ({ backend, workspace, history, isOpen, onClose, }) => {
|
|
8
|
-
const
|
|
9
|
+
const effectiveBackend = useBackendStrict(backend);
|
|
10
|
+
const effectiveWorkspace = useWorkspaceStrict(workspace);
|
|
11
|
+
const genAIStore = useGenAIStore(effectiveBackend, effectiveWorkspace, history);
|
|
9
12
|
if (!isOpen)
|
|
10
13
|
return null;
|
|
11
14
|
return (React.createElement(IntlWrapper, null,
|
|
12
15
|
React.createElement(StoreProvider, { store: genAIStore },
|
|
13
|
-
React.createElement(
|
|
16
|
+
React.createElement(BackendProvider, { backend: effectiveBackend },
|
|
17
|
+
React.createElement(WorkspaceProvider, { workspace: effectiveWorkspace },
|
|
18
|
+
React.createElement(GenAIChatOverlay, { onClose: onClose }))))));
|
|
14
19
|
};
|
|
15
20
|
//# sourceMappingURL=GenAIChatDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatDialog.js","sourceRoot":"","sources":["../../src/components/GenAIChatDialog.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChatDialog.js","sourceRoot":"","sources":["../../src/components/GenAIChatDialog.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAU5G,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC5D,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,OAAO,GACV,EAAE,EAAE;IACD,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,aAAa,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAEhF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACH,oBAAC,WAAW;QACR,oBAAC,aAAa,IAAC,KAAK,EAAE,UAAU;YAC5B,oBAAC,eAAe,IAAC,OAAO,EAAE,gBAAgB;gBACtC,oBAAC,iBAAiB,IAAC,SAAS,EAAE,kBAAkB;oBAC5C,oBAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,GAAI,CACtB,CACN,CACN,CACN,CACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { clearMessagesAction } from "../store/index.js";
|
|
3
|
+
import { WrappedComponentProps } from "react-intl";
|
|
4
|
+
type GenAIChatOverlayOwnProps = {
|
|
3
5
|
onClose: () => void;
|
|
4
6
|
};
|
|
5
|
-
|
|
7
|
+
type GenAIChatOverlayStateProps = {
|
|
8
|
+
hasMessages: boolean;
|
|
9
|
+
};
|
|
10
|
+
type GenAIChatOverlayDispatchProps = {
|
|
11
|
+
clearMessages: typeof clearMessagesAction;
|
|
12
|
+
};
|
|
13
|
+
export type GenAIChatOverlayProps = GenAIChatOverlayOwnProps & GenAIChatOverlayStateProps & GenAIChatOverlayDispatchProps;
|
|
14
|
+
export declare const GenAIChatOverlay: import("react-redux").ConnectedComponent<React.FC<import("react-intl").WithIntlProps<GenAIChatOverlayOwnProps & GenAIChatOverlayStateProps & GenAIChatOverlayDispatchProps & WrappedComponentProps>> & {
|
|
15
|
+
WrappedComponent: React.ComponentType<GenAIChatOverlayOwnProps & GenAIChatOverlayStateProps & GenAIChatOverlayDispatchProps & WrappedComponentProps>;
|
|
16
|
+
}, import("react-redux").Omit<Omit<GenAIChatOverlayOwnProps & GenAIChatOverlayStateProps & GenAIChatOverlayDispatchProps & WrappedComponentProps, "intl"> & {
|
|
17
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
18
|
+
}, "hasMessages" | "clearMessages">>;
|
|
19
|
+
export {};
|
|
6
20
|
//# sourceMappingURL=GenAIChatOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatOverlay.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChatOverlay.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAkC,MAAM,mBAAmB,CAAC;AAIxF,OAAO,EAAc,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE/D,KAAK,wBAAwB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAC9B,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACjC,aAAa,EAAE,OAAO,mBAAmB,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GACxD,0BAA0B,GAC1B,6BAA6B,CAAC;AAsElC,eAAO,MAAM,gBAAgB;;;;oCAGW,CAAC"}
|
|
@@ -5,26 +5,31 @@ import { Icon, Overlay } from "@gooddata/sdk-ui-kit";
|
|
|
5
5
|
import { clearMessagesAction, hasMessagesSelector } from "../store/index.js";
|
|
6
6
|
import cx from "classnames";
|
|
7
7
|
import { HeaderIcon } from "./HeaderIcon.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import { connect } from "react-redux";
|
|
9
|
+
import { injectIntl } from "react-intl";
|
|
10
|
+
const GenAIChatOverlayComponent = ({ onClose, hasMessages, clearMessages, intl, }) => {
|
|
10
11
|
const [isFullScreen, setIsFullScreen] = React.useState(false);
|
|
11
|
-
const dispatch = useDispatch();
|
|
12
|
-
const hasMessages = useSelector(hasMessagesSelector);
|
|
13
12
|
const isModal = isFullScreen;
|
|
14
|
-
const reset = () => {
|
|
15
|
-
dispatch(clearMessagesAction());
|
|
16
|
-
};
|
|
17
13
|
const classNames = cx("gd-gen-ai-chat__window", {
|
|
18
14
|
"gd-gen-ai-chat__window--fullscreen": isFullScreen,
|
|
19
15
|
});
|
|
20
16
|
return (React.createElement(Overlay, { isModal: isModal, positionType: "fixed", alignPoints: [{ align: isModal ? "cc cc" : "br br" }], closeOnEscape: true, closeOnParentScroll: false, closeOnOutsideClick: false, closeOnMouseDrag: false, zIndex: 6000, onClose: onClose },
|
|
21
17
|
React.createElement("div", { className: classNames },
|
|
22
18
|
React.createElement("div", { className: "gd-gen-ai-chat__window__header" },
|
|
23
|
-
React.createElement(HeaderIcon, { Icon: Icon.Undo, className: "gd-gen-ai-chat__window__header__icon--reset", tooltip: "
|
|
19
|
+
React.createElement(HeaderIcon, { Icon: Icon.Undo, className: "gd-gen-ai-chat__window__header__icon--reset", tooltip: intl.formatMessage({ id: "gd.gen-ai.header.reset-tooltip" }), onClick: () => clearMessages(), disabled: !hasMessages }),
|
|
24
20
|
React.createElement("div", { className: "gd-gen-ai-chat__window__header__gap" }),
|
|
25
|
-
React.createElement(HeaderIcon, { Icon: isFullScreen ? Icon.Contract : Icon.Expand, className: "gd-gen-ai-chat__window__header__icon--fullscreen", tooltip: isFullScreen
|
|
21
|
+
React.createElement(HeaderIcon, { Icon: isFullScreen ? Icon.Contract : Icon.Expand, className: "gd-gen-ai-chat__window__header__icon--fullscreen", tooltip: isFullScreen
|
|
22
|
+
? intl.formatMessage({ id: "gd.gen-ai.header.contract-tooltip" })
|
|
23
|
+
: intl.formatMessage({ id: "gd.gen-ai.header.expand-tooltip" }), onClick: () => setIsFullScreen(!isFullScreen) }),
|
|
26
24
|
React.createElement("div", { className: "gd-gen-ai-chat__window__header__divider" }),
|
|
27
|
-
React.createElement(HeaderIcon, { Icon: Icon.Close, className: "gd-gen-ai-chat__window__header__icon--close", tooltip: "
|
|
25
|
+
React.createElement(HeaderIcon, { Icon: Icon.Close, className: "gd-gen-ai-chat__window__header__icon--close", tooltip: intl.formatMessage({ id: "gd.gen-ai.header.close-tooltip" }), onClick: onClose })),
|
|
28
26
|
React.createElement(GenAIChatWrapper, null))));
|
|
29
27
|
};
|
|
28
|
+
const mapStateToProps = (state) => ({
|
|
29
|
+
hasMessages: hasMessagesSelector(state),
|
|
30
|
+
});
|
|
31
|
+
const mapDispatchToProps = {
|
|
32
|
+
clearMessages: clearMessagesAction,
|
|
33
|
+
};
|
|
34
|
+
export const GenAIChatOverlay = connect(mapStateToProps, mapDispatchToProps)(injectIntl(GenAIChatOverlayComponent));
|
|
30
35
|
//# sourceMappingURL=GenAIChatOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatOverlay.js","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"GenAIChatOverlay.js","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAa,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,UAAU,EAAyB,MAAM,YAAY,CAAC;AAkB/D,MAAM,yBAAyB,GAA4D,CAAC,EACxF,OAAO,EACP,WAAW,EACX,aAAa,EACb,IAAI,GACP,EAAE,EAAE;IACD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9D,MAAM,OAAO,GAAG,YAAY,CAAC;IAE7B,MAAM,UAAU,GAAG,EAAE,CAAC,wBAAwB,EAAE;QAC5C,oCAAoC,EAAE,YAAY;KACrD,CAAC,CAAC;IAEH,OAAO,CACH,oBAAC,OAAO,IACJ,OAAO,EAAE,OAAO,E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AgC,EAAE,CAAC,EACrE,OAAO,EAAE,OAAO,GAClB,CACA;YACN,oBAAC,gBAAgB,OAAG,CAClB,CACA,CACb,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAgB,EAA8B,EAAE,CAAC,CAAC;IACvE,WAAW,EAAE,mBAAmB,CAAC,KAAK,CAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAkC;IACtD,aAAa,EAAE,mBAAmB;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CACnC,eAAe,EACf,kBAAkB,CACrB,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatWrapper.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChatWrapper.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAYpC,CAAC"}
|
|
@@ -3,14 +3,18 @@ import React from "react";
|
|
|
3
3
|
import { Input } from "./Input.js";
|
|
4
4
|
import { Messages } from "./Messages.js";
|
|
5
5
|
import { Typography } from "@gooddata/sdk-ui-kit";
|
|
6
|
+
import { ErrorBoundary } from "./ErrorBoundary.js";
|
|
7
|
+
import { FormattedMessage } from "react-intl";
|
|
6
8
|
/**
|
|
7
9
|
* UI component that renders the Gen AI chat.
|
|
8
10
|
* @internal
|
|
9
11
|
*/
|
|
10
12
|
export const GenAIChatWrapper = () => {
|
|
11
|
-
return (React.createElement(
|
|
12
|
-
React.createElement(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
return (React.createElement(ErrorBoundary, null,
|
|
14
|
+
React.createElement("div", { className: "gd-gen-ai-chat" },
|
|
15
|
+
React.createElement(Messages, null),
|
|
16
|
+
React.createElement(Input, null),
|
|
17
|
+
React.createElement(Typography, { tagName: "p", className: "gd-gen-ai-chat__disclaimer" },
|
|
18
|
+
React.createElement(FormattedMessage, { id: "gd.gen-ai.disclaimer" })))));
|
|
15
19
|
};
|
|
16
20
|
//# sourceMappingURL=GenAIChatWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatWrapper.js","sourceRoot":"","sources":["../../src/components/GenAIChatWrapper.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChatWrapper.js","sourceRoot":"","sources":["../../src/components/GenAIChatWrapper.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAa,GAAG,EAAE;IAC3C,OAAO,CACH,oBAAC,aAAa;QACV,6BAAK,SAAS,EAAC,gBAAgB;YAC3B,oBAAC,QAAQ,OAAG;YACZ,oBAAC,KAAK,OAAG;YACT,oBAAC,UAAU,IAAC,OAAO,EAAC,GAAG,EAAC,SAAS,EAAC,4BAA4B;gBAC1D,oBAAC,gBAAgB,IAAC,EAAE,EAAC,sBAAsB,GAAG,CACrC,CACX,CACM,CACnB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
type GlobalErrorDispatchProps = {
|
|
4
|
+
clearMessagesAction: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const GlobalError: import("react-redux").ConnectedComponent<React.FC<import("react-intl").WithIntlProps<GlobalErrorDispatchProps & {
|
|
7
|
+
errorDetails: string;
|
|
8
|
+
clearError: () => void;
|
|
9
|
+
} & WrappedComponentProps>> & {
|
|
10
|
+
WrappedComponent: React.ComponentType<GlobalErrorDispatchProps & {
|
|
11
|
+
errorDetails: string;
|
|
12
|
+
clearError: () => void;
|
|
13
|
+
} & WrappedComponentProps>;
|
|
14
|
+
}, import("react-redux").Omit<Omit<GlobalErrorDispatchProps & {
|
|
15
|
+
errorDetails: string;
|
|
16
|
+
clearError: () => void;
|
|
17
|
+
} & WrappedComponentProps, "intl"> & {
|
|
18
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
19
|
+
}, "clearMessagesAction">>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=GlobalError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalError.d.ts","sourceRoot":"","sources":["../../src/components/GlobalError.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgC,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEjF,KAAK,wBAAwB,GAAG;IAC5B,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACnC,CAAC;AAmDF,eAAO,MAAM,WAAW;kBAhDN,MAAM;gBACR,MAAM,IAAI;;;sBADR,MAAM;oBACR,MAAM,IAAI;;;kBADR,MAAM;gBACR,MAAM,IAAI;;;0BA+CoE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Button, Typography } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { connect } from "react-redux";
|
|
5
|
+
import { clearMessagesAction } from "../store/index.js";
|
|
6
|
+
import { FormattedMessage, injectIntl } from "react-intl";
|
|
7
|
+
const GlobalErrorComponent = ({ errorDetails, clearMessagesAction, clearError, intl, }) => {
|
|
8
|
+
const [showMore, setShowMore] = React.useState(false);
|
|
9
|
+
const showMoreButton = Boolean(errorDetails && !showMore);
|
|
10
|
+
const clearCallback = () => {
|
|
11
|
+
clearMessagesAction();
|
|
12
|
+
clearError();
|
|
13
|
+
};
|
|
14
|
+
return (React.createElement("div", { className: "gd-gen-ai-chat__global_error" },
|
|
15
|
+
React.createElement(Typography, { tagName: "p" },
|
|
16
|
+
React.createElement(FormattedMessage, { id: "gd.gen-ai.global-error" })),
|
|
17
|
+
React.createElement(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-error.button-clear" }), onClick: clearCallback }),
|
|
18
|
+
showMoreButton ? (React.createElement(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-error.button-details" }), onClick: () => setShowMore(true) })) : null,
|
|
19
|
+
showMore ? (React.createElement(Typography, { tagName: "p", className: "gd-gen-ai-chat__global_error__details" }, errorDetails)) : null));
|
|
20
|
+
};
|
|
21
|
+
const mapDispatchToProps = {
|
|
22
|
+
clearMessagesAction,
|
|
23
|
+
};
|
|
24
|
+
export const GlobalError = connect(null, mapDispatchToProps)(injectIntl(GlobalErrorComponent));
|
|
25
|
+
//# sourceMappingURL=GlobalError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalError.js","sourceRoot":"","sources":["../../src/components/GlobalError.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OA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AAC,uCAAuC,IACpE,YAAY,CACJ,CAChB,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACvB,mBAAmB;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { newMessageAction } from "../store/index.js";
|
|
3
|
+
import { WrappedComponentProps } from "react-intl/src/components/injectIntl.js";
|
|
4
|
+
type InputStateProps = {
|
|
5
|
+
isBusy: boolean;
|
|
6
|
+
};
|
|
7
|
+
type InputDispatchProps = {
|
|
8
|
+
newMessage: typeof newMessageAction;
|
|
9
|
+
};
|
|
10
|
+
export declare const Input: import("react-redux").ConnectedComponent<React.FC<import("react-intl").WithIntlProps<InputStateProps & InputDispatchProps & WrappedComponentProps>> & {
|
|
11
|
+
WrappedComponent: React.ComponentType<InputStateProps & InputDispatchProps & WrappedComponentProps>;
|
|
12
|
+
}, import("react-redux").Omit<Omit<InputStateProps & InputDispatchProps & WrappedComponentProps, "intl"> & {
|
|
13
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
14
|
+
}, "isBusy" | "newMessage">>;
|
|
4
15
|
export {};
|
|
5
16
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAwB,gBAAgB,EAAa,MAAM,mBAAmB,CAAC;AAGtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAOhF,KAAK,eAAe,GAAG;IACnB,MAAM,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACtB,UAAU,EAAE,OAAO,gBAAgB,CAAC;CACvC,CAAC;AAyEF,eAAO,MAAM,KAAK;;;;4BAA2E,CAAC"}
|
package/esm/components/Input.js
CHANGED
|
@@ -2,36 +2,37 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import DefaultTextArea from "react-textarea-autosize";
|
|
4
4
|
import { defaultImport } from "default-import";
|
|
5
|
-
import DefaultNativeListener from "react-native-listener";
|
|
6
5
|
import cx from "classnames";
|
|
7
6
|
import { SendIcon } from "./SendIcon.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { connect } from "react-redux";
|
|
8
|
+
import { makeAssistantCancelledMessage, makeUserTextMessage } from "../model.js";
|
|
10
9
|
import { agentLoadingSelector, newMessageAction } from "../store/index.js";
|
|
10
|
+
import { StopIcon } from "./StopIcon.js";
|
|
11
|
+
import { injectIntl } from "react-intl";
|
|
11
12
|
// There are known compatibility issues between CommonJS (CJS) and ECMAScript modules (ESM).
|
|
12
13
|
// In ESM, default exports of CJS modules are wrapped in default properties instead of being exposed directly.
|
|
13
14
|
// https://github.com/microsoft/TypeScript/issues/52086#issuecomment-1385978414
|
|
14
15
|
const TextareaAutosize = defaultImport(DefaultTextArea);
|
|
15
|
-
const
|
|
16
|
-
export const Input = () => {
|
|
16
|
+
const InputComponent = ({ isBusy, newMessage, intl, }) => {
|
|
17
17
|
const [value, setValue] = React.useState("");
|
|
18
|
-
const dispatch = useDispatch();
|
|
19
|
-
const disabled = useSelector(agentLoadingSelector);
|
|
20
18
|
const textareaRef = React.useRef(null);
|
|
21
19
|
React.useEffect(() => {
|
|
22
20
|
// Autofocus the textarea when the chat is not disabled and the user is not focusing on another element
|
|
23
21
|
// Important, given the disabled states changes depending on the agent's loading state
|
|
24
22
|
// And it's loosing focus after the loading state changes
|
|
25
|
-
if (!
|
|
23
|
+
if (!isBusy && document.activeElement === document.body) {
|
|
26
24
|
textareaRef.current?.focus();
|
|
27
25
|
}
|
|
28
|
-
}, [
|
|
26
|
+
}, [isBusy]);
|
|
29
27
|
const handleSubmit = () => {
|
|
30
|
-
|
|
28
|
+
newMessage(makeUserTextMessage(value));
|
|
31
29
|
setValue("");
|
|
32
30
|
};
|
|
31
|
+
const handleCancel = () => {
|
|
32
|
+
newMessage(makeAssistantCancelledMessage());
|
|
33
|
+
};
|
|
33
34
|
const handleKeyDown = (e) => {
|
|
34
|
-
if (e.key === "Enter" && !e.shiftKey && !
|
|
35
|
+
if (e.key === "Enter" && !e.shiftKey && !isBusy && value) {
|
|
35
36
|
e.preventDefault();
|
|
36
37
|
handleSubmit();
|
|
37
38
|
}
|
|
@@ -40,11 +41,17 @@ export const Input = () => {
|
|
|
40
41
|
setValue(e.target.value);
|
|
41
42
|
};
|
|
42
43
|
const buttonClasses = cx("gd-gen-ai-chat__input__send_button", {
|
|
43
|
-
"gd-gen-ai-chat__input__send_button--disabled":
|
|
44
|
+
"gd-gen-ai-chat__input__send_button--disabled": !value,
|
|
44
45
|
});
|
|
45
46
|
return (React.createElement("div", { className: "gd-gen-ai-chat__input" },
|
|
46
|
-
React.createElement(TextareaAutosize, { ref: textareaRef, className: "gd-gen-ai-chat__input__textarea", placeholder: "
|
|
47
|
-
React.createElement(
|
|
48
|
-
|
|
47
|
+
React.createElement(TextareaAutosize, { ref: textareaRef, className: "gd-gen-ai-chat__input__textarea", placeholder: intl.formatMessage({ id: "gd.gen-ai.input-placeholder" }), value: value, onChange: handleChange, onKeyDown: handleKeyDown, disabled: isBusy }),
|
|
48
|
+
React.createElement("div", { onClick: isBusy ? handleCancel : handleSubmit }, !isBusy ? (React.createElement(SendIcon, { className: buttonClasses })) : (React.createElement(StopIcon, { className: "gd-gen-ai-chat__input__send_button" })))));
|
|
49
|
+
};
|
|
50
|
+
const mapStateToProps = (state) => ({
|
|
51
|
+
isBusy: agentLoadingSelector(state),
|
|
52
|
+
});
|
|
53
|
+
const mapDispatchToProps = {
|
|
54
|
+
newMessage: newMessageAction,
|
|
49
55
|
};
|
|
56
|
+
export const Input = connect(mapStateToProps, mapDispatchToProps)(injectIntl(InputComponent));
|
|
50
57
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAa,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,4FAA4F;AAC5F,8GAA8G;AAC9G,+EAA+E;AAC/E,MAAM,gBAAgB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;AAUxD,MAAM,cAAc,GAA2E,CAAC,EAC5F,MAAM,EACN,UAAU,E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AAC,uBAAuB;QAClC,oBAAC,gBAAgB,IACb,GAAG,EAAE,WAAW,EAChB,SAAS,EAAC,iCAAiC,EAC3C,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,6BAA6B,EAAE,CAAC,EACtE,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,MAAM,GAClB;QACF,6BAAK,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,IAC7C,CAAC,MAAM,CAAC,CAAC,CAAC,CACP,oBAAC,QAAQ,IAAC,SAAS,EAAE,aAAa,GAAI,CACzC,CAAC,CAAC,CAAC,CACA,oBAAC,QAAQ,IAAC,SAAS,EAAC,oCAAoC,GAAG,CAC9D,CACC,CACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAgB,EAAmB,EAAE,CAAC,CAAC;IAC5D,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC;CACtC,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG;IACvB,UAAU,EAAE,gBAAgB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { agentLoadingSelector, visibleMessagesSelector } from "../store/index.js";
|
|
3
|
+
type MessagesComponentProps = {
|
|
4
|
+
messages: ReturnType<typeof visibleMessagesSelector>;
|
|
5
|
+
loading: ReturnType<typeof agentLoadingSelector>;
|
|
6
|
+
};
|
|
7
|
+
export declare const Messages: import("react-redux").ConnectedComponent<React.FC<MessagesComponentProps>, import("react-redux").Omit<MessagesComponentProps, "loading" | "messages">>;
|
|
8
|
+
export {};
|
|
3
9
|
//# sourceMappingURL=Messages.d.ts.map
|