@carbon/ai-chat 0.3.2 → 0.3.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/dist/docs/carbon-chat-docs.js +1 -1
- package/dist/docs/carbon-chat.html +1 -1
- package/dist/es/AppContainer.js +7 -7
- package/dist/es/Avatar.js +90 -0
- package/dist/es/BodyAndFooterPanelComponent.js +118 -0
- package/dist/es/BrandingOverlay.js +108 -0
- package/dist/es/Carousel.js +2 -2
- package/dist/es/CatastrophicError.js +153 -0
- package/dist/es/Chat.js +2288 -0
- package/dist/es/Disclaimer.js +213 -0
- package/dist/es/GenesysMessengerServiceDesk.js +2 -2
- package/dist/es/HomeScreenContainer.js +180 -0
- package/dist/es/HumanAgentServiceImpl.js +2 -2
- package/dist/es/IFrameComponent.js +91 -0
- package/dist/es/IFramePanel.js +75 -0
- package/dist/es/InlineError.js +41 -0
- package/dist/es/Input.js +537 -0
- package/dist/es/MessageTypeComponent.js +6492 -0
- package/dist/es/NiceDFOServiceDesk.js +2 -2
- package/dist/es/PDFViewerContainer.js +2 -2
- package/dist/es/ReactPlayer.js +2 -2
- package/dist/es/RichText.js +24801 -0
- package/dist/es/SFServiceDesk.js +2 -2
- package/dist/es/SearchResultBody.js +142 -0
- package/dist/es/ServiceDeskImpl.js +2 -2
- package/dist/es/TourContainer.js +429 -0
- package/dist/es/VideoComponent.js +241 -0
- package/dist/es/ViewSourcePanel.js +85 -0
- package/dist/es/ZendeskServiceDesk.js +2 -2
- package/dist/es/_node-resolve_empty.js +2 -2
- package/dist/es/aiChatEntry.js +2 -2
- package/dist/es/ar-dz.js +2 -2
- package/dist/es/ar-kw.js +2 -2
- package/dist/es/ar-ly.js +2 -2
- package/dist/es/ar-ma.js +2 -2
- package/dist/es/ar-sa.js +2 -2
- package/dist/es/ar-tn.js +2 -2
- package/dist/es/ar.js +2 -2
- package/dist/es/ar2.js +2 -2
- package/dist/es/cds-aichat-code.js +103 -0
- package/dist/es/cds-aichat-container.js +3 -3
- package/dist/es/cds-aichat-custom-element.js +2 -2
- package/dist/es/common.js +15342 -0
- package/dist/es/cs.js +2 -2
- package/dist/es/cs2.js +2 -2
- package/dist/es/customElement.js +2 -2
- package/dist/es/de-at.js +2 -2
- package/dist/es/de-ch.js +2 -2
- package/dist/es/de.js +2 -2
- package/dist/es/de2.js +2 -2
- package/dist/es/decode.js +561 -0
- package/dist/es/en-au.js +2 -2
- package/dist/es/en-ca.js +2 -2
- package/dist/es/en-gb.js +2 -2
- package/dist/es/en-ie.js +2 -2
- package/dist/es/en-il.js +2 -2
- package/dist/es/en-nz.js +2 -2
- package/dist/es/es-do.js +2 -2
- package/dist/es/es-us.js +2 -2
- package/dist/es/es.js +2 -2
- package/dist/es/es2.js +2 -2
- package/dist/es/export.carbon.js +2 -2
- package/dist/es/export.js +3 -3
- package/dist/es/export.legacy.carbon.js +2 -2
- package/dist/es/export.legacy.js +3 -3
- package/dist/es/fr-ca.js +2 -2
- package/dist/es/fr-ch.js +2 -2
- package/dist/es/fr.js +2 -2
- package/dist/es/fr2.js +2 -2
- package/dist/es/it-ch.js +2 -2
- package/dist/es/it.js +2 -2
- package/dist/es/it2.js +2 -2
- package/dist/es/ja.js +2 -2
- package/dist/es/ja2.js +2 -2
- package/dist/es/ko.js +2 -2
- package/dist/es/ko2.js +2 -2
- package/dist/es/markdown.js +9323 -0
- package/dist/es/markdown.worker.js +66 -0
- package/dist/es/mockServiceDesk.js +2 -2
- package/dist/es/moduleFederationPluginUtils.js +159 -0
- package/dist/es/nl.js +2 -2
- package/dist/es/nl2.js +2 -2
- package/dist/es/pt-br.js +2 -2
- package/dist/es/pt-br2.js +2 -2
- package/dist/es/pt.js +2 -2
- package/dist/es/scriptRender.js +2 -2
- package/dist/es/tokenTree.js +143 -0
- package/dist/es/useCounter.js +37 -0
- package/dist/es/useWindowSize.js +30 -0
- package/dist/es/zh-cn.js +2 -2
- package/dist/es/zh-tw.js +2 -2
- package/dist/es/zh-tw2.js +2 -2
- package/dist/es/zh.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><title>Carbon AI chat documentation</title><meta name="description" content="Carbon AI chat is a framework-agnostic code snippet you can immediately embed on your website. Web chat can be extended and customized in a variety of ways, so you can concentrate on your unique solutions."><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="none"><link rel="schema.dcterms" href="http://purl.org/dc/terms/"><meta name="dcterms.rightsHolder" content="IBM"><meta name="dcterms.dateCopyrighted" content="2024"><link rel="shortcut icon" href="https://web-chat.global.assistant.watson.cloud.ibm.com/favicon.ico"><script>window.CarbonChatDocumentationTarget = "carbon";</script><script defer="defer" src="carbon-chat-docs.js?
|
|
1
|
+
<!doctype html><html lang="en"><head><title>Carbon AI chat documentation</title><meta name="description" content="Carbon AI chat is a framework-agnostic code snippet you can immediately embed on your website. Web chat can be extended and customized in a variety of ways, so you can concentrate on your unique solutions."><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="none"><link rel="schema.dcterms" href="http://purl.org/dc/terms/"><meta name="dcterms.rightsHolder" content="IBM"><meta name="dcterms.dateCopyrighted" content="2024"><link rel="shortcut icon" href="https://web-chat.global.assistant.watson.cloud.ibm.com/favicon.ico"><script>window.CarbonChatDocumentationTarget = "carbon";</script><script defer="defer" src="carbon-chat-docs.js?ec49346bc5c42eb88122"></script></head><body><root/><script>function validateDirection(direction) {
|
|
2
2
|
if (direction === 'rtl' || direction === 'ltr') {
|
|
3
3
|
return direction;
|
|
4
4
|
}
|
package/dist/es/AppContainer.js
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* or implied. See the License for the specific language governing permissions and limitations under
|
|
14
14
|
* the License.
|
|
15
15
|
*
|
|
16
|
-
* @carbon/ai-chat 0.3.
|
|
16
|
+
* @carbon/ai-chat 0.3.3
|
|
17
17
|
*
|
|
18
|
-
* Built:
|
|
18
|
+
* Built: Jul 11 2025 1:09 pm -04:00
|
|
19
19
|
*
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
@@ -4038,7 +4038,7 @@ async function throwOnStatus(responsePromise, allowedCodes = DEFAULT_ALLOWED_RES
|
|
|
4038
4038
|
|
|
4039
4039
|
/* eslint-disable prefer-destructuring */
|
|
4040
4040
|
const NODE_ENV = "production";
|
|
4041
|
-
const VERSION = "0.3.
|
|
4041
|
+
const VERSION = "0.3.3";
|
|
4042
4042
|
|
|
4043
4043
|
var CarbonThemeClassNames;
|
|
4044
4044
|
(function (CarbonThemeClassNames) {
|
|
@@ -15230,7 +15230,7 @@ class TrackService {
|
|
|
15230
15230
|
'Browser device type': BROWSER_DEVICE_TYPE,
|
|
15231
15231
|
'Deployed full path': getURLHostnameAndPath(),
|
|
15232
15232
|
'Deployed hostname': window.location.hostname,
|
|
15233
|
-
'User loaded version': "0.3.
|
|
15233
|
+
'User loaded version': "0.3.3",
|
|
15234
15234
|
...event.user_properties,
|
|
15235
15235
|
};
|
|
15236
15236
|
return event;
|
|
@@ -15302,7 +15302,7 @@ class TrackService {
|
|
|
15302
15302
|
'Secondary color changed': Boolean(initConfig.css_variables?.['BASE-secondary-color']),
|
|
15303
15303
|
'Accent color changed': Boolean(initConfig.css_variables?.['BASE-accent-color']),
|
|
15304
15304
|
'Secure login enabled': Boolean(identityToken || initConfig.authorization?.is_on),
|
|
15305
|
-
'Loaded version': "0.3.
|
|
15305
|
+
'Loaded version': "0.3.3",
|
|
15306
15306
|
'Requested version': config.public.clientVersion || 'unknown',
|
|
15307
15307
|
'LoadWAC version': additionalChatParameters?.loadVersion || 'unknown',
|
|
15308
15308
|
'Suggestions enabled': Boolean(initConfig.alternate_suggestions?.is_on),
|
|
@@ -25588,8 +25588,8 @@ ensureChatBrowserWindowConfigExists();
|
|
|
25588
25588
|
const { loadScriptPromises } = getSharedConfig();
|
|
25589
25589
|
// In the testing environment, this is not set. In non-testing environments, this promise resolves with
|
|
25590
25590
|
// WatsonAssistantChat to let the entry script know we have loaded.
|
|
25591
|
-
if (loadScriptPromises["0.3.
|
|
25592
|
-
loadScriptPromises["0.3.
|
|
25591
|
+
if (loadScriptPromises["0.3.3"]) {
|
|
25592
|
+
loadScriptPromises["0.3.3"].doResolve(Chat$2);
|
|
25593
25593
|
}
|
|
25594
25594
|
|
|
25595
25595
|
function _typeof$1(obj) {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* (C) Copyright IBM Corp. 2017, 2025. All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
7
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
12
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
13
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
14
|
+
* the License.
|
|
15
|
+
*
|
|
16
|
+
* @carbon/ai-chat 0.3.2
|
|
17
|
+
*
|
|
18
|
+
* Built: Jul 9 2025 11:10 am -04:00
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import React__default from 'react';
|
|
24
|
+
import { aQ as uuid } from './AppContainer.js';
|
|
25
|
+
import { C as CarbonTheme } from './customElement.js';
|
|
26
|
+
|
|
27
|
+
function Avatar({ theme }) {
|
|
28
|
+
const a = `a-${uuid()}`;
|
|
29
|
+
const b = `b-${uuid()}`;
|
|
30
|
+
const c = `c-${uuid()}`;
|
|
31
|
+
const d = `d-${uuid()}`;
|
|
32
|
+
const e = `e-${uuid()}`;
|
|
33
|
+
if (theme === CarbonTheme.WHITE || theme === CarbonTheme.G10) {
|
|
34
|
+
return (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", className: "cds--watsonx-avatar", "aria-hidden": "true" },
|
|
35
|
+
React__default.createElement("defs", null,
|
|
36
|
+
React__default.createElement("linearGradient", { id: a, x1: "1186.526", y1: "2863.168", x2: "1199.825", y2: "2845.109", gradientTransform: "matrix(.8312 .55596 -.27409 .40979 -198.894 -1827.398)", gradientUnits: "userSpaceOnUse" },
|
|
37
|
+
React__default.createElement("stop", { offset: ".3" }),
|
|
38
|
+
React__default.createElement("stop", { offset: "1", stopOpacity: "0" })),
|
|
39
|
+
React__default.createElement("linearGradient", { id: b, x1: "1189.388", y1: "2911.794", x2: "1200.478", y2: "2896.735", gradientTransform: "rotate(146.223 380.87 -882.286) scale(1 -.493)", gradientUnits: "userSpaceOnUse" },
|
|
40
|
+
React__default.createElement("stop", { offset: ".3" }),
|
|
41
|
+
React__default.createElement("stop", { offset: ".9", stopOpacity: "0" })),
|
|
42
|
+
React__default.createElement("linearGradient", { id: c, x1: "-4995.033", y1: "-20162.835", x2: "-4981.733", y2: "-20180.895", gradientTransform: "rotate(-146.223 -971.422 -5714.55) scale(1 .493)", gradientUnits: "userSpaceOnUse" },
|
|
43
|
+
React__default.createElement("stop", { offset: ".32" }),
|
|
44
|
+
React__default.createElement("stop", { offset: ".354", stopOpacity: ".798" }),
|
|
45
|
+
React__default.createElement("stop", { offset: ".7", stopOpacity: "0" })),
|
|
46
|
+
React__default.createElement("linearGradient", { id: d, x1: "0", y1: "32", x2: "32", y2: "0", gradientUnits: "userSpaceOnUse" },
|
|
47
|
+
React__default.createElement("stop", { offset: ".1", stopColor: "#a56eff" }),
|
|
48
|
+
React__default.createElement("stop", { offset: ".9", stopColor: "#0f62fe" })),
|
|
49
|
+
React__default.createElement("mask", { id: e, x: "0", y: "0", width: "32", height: "32", maskUnits: "userSpaceOnUse" },
|
|
50
|
+
React__default.createElement("path", { d: "M16 1A14.915 14.915 0 0 0 5.502 5.286l1.4 1.429A12.922 12.922 0 0 1 16 3.001c.977 0 1.929.109 2.845.315-3.402.921-5.916 4.026-5.916 7.715 0 .782.118 1.537.328 2.252a7.978 7.978 0 0 0-2.188-.312c-3.704 0-6.819 2.534-7.726 5.957a12.954 12.954 0 0 1-.345-2.927c0-2.117.492-4.134 1.462-5.996l-1.773-.924A15.037 15.037 0 0 0 .999 16c0 8.271 6.729 15 15 15 3.949 0 7.678-1.522 10.498-4.286l-1.4-1.428A12.926 12.926 0 0 1 15.999 29c-3.648 0-6.945-1.516-9.309-3.945a5.959 5.959 0 0 1-1.621-4.086c0-3.309 2.691-6 6-6a6.006 6.006 0 0 1 5.897 7.107l1.967.367a7.971 7.971 0 0 0-.192-3.726 7.976 7.976 0 0 0 2.187.312c3.71 0 6.829-2.542 7.73-5.974.22.947.34 1.931.34 2.944 0 2.117-.492 4.134-1.462 5.995l1.773.924a15.034 15.034 0 0 0 1.688-6.919C31 7.729 24.272 1 16 1zm4.93 16.03c-3.309 0-6-2.692-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z", style: { fill: '#fff', strokeWidth: 0 } }),
|
|
51
|
+
React__default.createElement("path", { style: { fill: `url(#${a})`, strokeWidth: 0 }, d: "M8 9 0 0h16l2.305 3.304L8 9z" }),
|
|
52
|
+
React__default.createElement("path", { style: { fill: `url(#${b})`, strokeWidth: 0 }, d: "m12 31 4.386-9L6 21 2 31h10z" }),
|
|
53
|
+
React__default.createElement("path", { style: { fill: `url(#${c})`, strokeWidth: 0 }, d: "m24 23 8 9H16l-2.304-3.305L24 23z" }),
|
|
54
|
+
React__default.createElement("path", { style: { strokeWidth: 0 }, d: "M16 31h-4.283L15 22h2l-1 9z" }))),
|
|
55
|
+
React__default.createElement("g", { style: { mask: `url(#${e})` } },
|
|
56
|
+
React__default.createElement("path", { style: { fill: `url(#${d})`, strokeWidth: 0 }, d: "M0 0h32v32H0z" })),
|
|
57
|
+
React__default.createElement("circle", { cx: "6", cy: "6", r: "2", style: { fill: '#001d6c', strokeWidth: 0 } }),
|
|
58
|
+
React__default.createElement("circle", { cx: "26", cy: "26", r: "2", style: { fill: '#001d6c', strokeWidth: 0 } }),
|
|
59
|
+
React__default.createElement("path", { d: "M16 31c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5zm0-8c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3z", style: { fill: '#001d6c', strokeWidth: 0 } })));
|
|
60
|
+
}
|
|
61
|
+
return (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", className: "cds--watsonx-avatar", "aria-hidden": "true" },
|
|
62
|
+
React__default.createElement("defs", null,
|
|
63
|
+
React__default.createElement("linearGradient", { id: a, x1: "1196.653", y1: "2930.892", x2: "1209.953", y2: "2912.832", gradientTransform: "matrix(.8312 .55596 -.27409 .40979 -188.767 -1860.755)", gradientUnits: "userSpaceOnUse" },
|
|
64
|
+
React__default.createElement("stop", { offset: ".3" }),
|
|
65
|
+
React__default.createElement("stop", { offset: "1", stopOpacity: "0" })),
|
|
66
|
+
React__default.createElement("linearGradient", { id: b, x1: "1299.261", y1: "2844.072", x2: "1310.351", y2: "2829.012", gradientTransform: "rotate(146.223 440.869 -882.286) scale(1 -.493)", gradientUnits: "userSpaceOnUse" },
|
|
67
|
+
React__default.createElement("stop", { offset: ".3" }),
|
|
68
|
+
React__default.createElement("stop", { offset: ".9", stopOpacity: "0" })),
|
|
69
|
+
React__default.createElement("linearGradient", { id: c, x1: "-4885.16", y1: "-20230.559", x2: "-4871.86", y2: "-20248.618", gradientTransform: "rotate(-146.223 -911.421 -5714.55) scale(1 .493)", gradientUnits: "userSpaceOnUse" },
|
|
70
|
+
React__default.createElement("stop", { offset: ".32" }),
|
|
71
|
+
React__default.createElement("stop", { offset: ".354", stopOpacity: ".798" }),
|
|
72
|
+
React__default.createElement("stop", { offset: ".7", stopOpacity: "0" })),
|
|
73
|
+
React__default.createElement("linearGradient", { id: d, x1: "0", y1: "32", x2: "32", y2: "0", gradientUnits: "userSpaceOnUse" },
|
|
74
|
+
React__default.createElement("stop", { offset: ".1", stopColor: "#be95ff" }),
|
|
75
|
+
React__default.createElement("stop", { offset: ".9", stopColor: "#4589ff" })),
|
|
76
|
+
React__default.createElement("mask", { id: e, x: "0", y: "0", width: "32", height: "32", maskUnits: "userSpaceOnUse" },
|
|
77
|
+
React__default.createElement("path", { d: "M16 1A14.915 14.915 0 0 0 5.502 5.286l1.4 1.429A12.922 12.922 0 0 1 16 3.001c.977 0 1.929.109 2.845.315-3.402.921-5.916 4.026-5.916 7.715 0 .782.118 1.537.328 2.252a7.978 7.978 0 0 0-2.188-.312c-3.704 0-6.819 2.534-7.726 5.957a12.954 12.954 0 0 1-.345-2.927c0-2.117.492-4.134 1.462-5.996l-1.773-.924A15.037 15.037 0 0 0 .999 16c0 8.271 6.729 15 15 15 3.949 0 7.678-1.522 10.498-4.286l-1.4-1.428A12.926 12.926 0 0 1 15.999 29c-3.648 0-6.945-1.516-9.309-3.945a5.959 5.959 0 0 1-1.621-4.086c0-3.309 2.691-6 6-6a6.006 6.006 0 0 1 5.897 7.107l1.967.367a7.971 7.971 0 0 0-.192-3.726 7.976 7.976 0 0 0 2.187.312c3.71 0 6.829-2.542 7.73-5.974.22.947.34 1.931.34 2.944 0 2.117-.492 4.134-1.462 5.995l1.773.924a15.034 15.034 0 0 0 1.688-6.919c0-8.271-6.729-15-15-15zm4.93 16.03c-3.309 0-6-2.692-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z", style: { fill: '#fff', strokeWidth: 0 } }),
|
|
78
|
+
React__default.createElement("path", { style: { fill: `url(#${a})`, strokeWidth: 0 }, d: "M8 9 0 0h16l2.305 3.305L8 9z" }),
|
|
79
|
+
React__default.createElement("path", { style: { fill: `url(#${b})`, strokeWidth: 0 }, d: "m12 31 4.386-9L6 21 2 31h10z" }),
|
|
80
|
+
React__default.createElement("path", { style: { fill: `url(#${c})`, strokeWidth: 0 }, d: "m24 23 8 9H16l-2.305-3.305L24 23z" }),
|
|
81
|
+
React__default.createElement("path", { style: { strokeWidth: 0 }, d: "M16 31h-4.283L15 22h2l-1 9z" }))),
|
|
82
|
+
React__default.createElement("g", { style: { mask: `url(#${e})` } },
|
|
83
|
+
React__default.createElement("path", { style: { fill: `url(#${d})`, strokeWidth: 0 }, d: "M0 0h32v32H0z" })),
|
|
84
|
+
React__default.createElement("circle", { cx: "6", cy: "6", r: "2", style: { fill: '#f4f4f4', strokeWidth: 0 } }),
|
|
85
|
+
React__default.createElement("circle", { cx: "26", cy: "26", r: "2", style: { fill: '#f4f4f4', strokeWidth: 0 } }),
|
|
86
|
+
React__default.createElement("path", { d: "M16 31c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5zm0-8c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3z", style: { fill: '#f4f4f4', strokeWidth: 0 } })));
|
|
87
|
+
}
|
|
88
|
+
const AvatarExport = React__default.memo(Avatar);
|
|
89
|
+
|
|
90
|
+
export { AvatarExport as A };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* (C) Copyright IBM Corp. 2017, 2025. All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
7
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
12
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
13
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
14
|
+
* the License.
|
|
15
|
+
*
|
|
16
|
+
* @carbon/ai-chat 0.3.2
|
|
17
|
+
*
|
|
18
|
+
* Built: Jul 9 2025 11:10 am -04:00
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { _ as useLanguagePack, a0 as useServiceManager, bQ as AnimationInType, bR as AnimationOutType, bP as OverlayPanel, bT as BasePanelComponentExport, Z as cx } from './AppContainer.js';
|
|
24
|
+
import React__default from 'react';
|
|
25
|
+
import { useSelector } from 'react-redux';
|
|
26
|
+
import { B as BodyWithFooterComponent } from './MessageTypeComponent.js';
|
|
27
|
+
import './customElement.js';
|
|
28
|
+
import 'react-intl';
|
|
29
|
+
import '@carbon/react';
|
|
30
|
+
import '@carbon/icons-react/es/AiLaunch.js';
|
|
31
|
+
import '@carbon/icons-react/es/ArrowUpLeft.js';
|
|
32
|
+
import '@carbon/icons-react/es/ChatLaunch.js';
|
|
33
|
+
import '@carbon/icons-react/es/Close.js';
|
|
34
|
+
import '@carbon/icons-react/es/Information.js';
|
|
35
|
+
import '@carbon/icons-react/es/Home.js';
|
|
36
|
+
import '@carbon/web-components/es-custom/components/slug/index.js';
|
|
37
|
+
import '@carbon/icons-react/es/CloseLarge.js';
|
|
38
|
+
import '@carbon/icons-react/es/DownToBottom.js';
|
|
39
|
+
import '@carbon/icons-react/es/Menu.js';
|
|
40
|
+
import '@carbon/icons-react/es/Restart.js';
|
|
41
|
+
import '@carbon/icons-react/es/SidePanelClose.js';
|
|
42
|
+
import '@carbon/icons-react/es/SubtractLarge.js';
|
|
43
|
+
import '@carbon/web-components/es-custom/components/ai-label/defs.js';
|
|
44
|
+
import '@carbon/web-components/es-custom/components/popover/defs.js';
|
|
45
|
+
import '@carbon/web-components/es-custom/components/skeleton-icon/index.js';
|
|
46
|
+
import 'lit';
|
|
47
|
+
import 'lit/decorators.js';
|
|
48
|
+
import '@carbon/web-components/es-custom/components/button/index.js';
|
|
49
|
+
import '@carbon/web-components/es-custom/components/overflow-menu/index.js';
|
|
50
|
+
import '@carbon/icons-react/es/ChevronDown.js';
|
|
51
|
+
import '@carbon/icons-react/es/ChevronUp.js';
|
|
52
|
+
import 'react-dom';
|
|
53
|
+
import '@carbon/web-components/es-custom/components/ai-label/ai-label-action-button.js';
|
|
54
|
+
import '@carbon/web-components/es-custom/components/ai-label/ai-label.js';
|
|
55
|
+
import '@carbon/icons-react/es/Attachment.js';
|
|
56
|
+
import './RichText.js';
|
|
57
|
+
import 'lit/directives/unsafe-html.js';
|
|
58
|
+
import '@carbon/web-components/es-custom/components/inline-loading/index.js';
|
|
59
|
+
import '@carbon/icon-helpers';
|
|
60
|
+
import '@carbon/icons/es/checkmark--filled/16.js';
|
|
61
|
+
import '@carbon/icons/es/chevron--right/16.js';
|
|
62
|
+
import '@carbon/icons/es/error--filled/16.js';
|
|
63
|
+
import 'lit/directives/unsafe-svg.js';
|
|
64
|
+
import '@carbon/web-components/es-custom/components/textarea/index.js';
|
|
65
|
+
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
|
66
|
+
import '@carbon/icons/es/thumbs-down/16.js';
|
|
67
|
+
import '@carbon/icons/es/thumbs-down--filled/16.js';
|
|
68
|
+
import '@carbon/icons/es/thumbs-up/16.js';
|
|
69
|
+
import '@carbon/icons/es/thumbs-up--filled/16.js';
|
|
70
|
+
import '@carbon/web-components/es-custom/components/tag/index.js';
|
|
71
|
+
import '@carbon/web-components/es-custom/components/chat-button/index.js';
|
|
72
|
+
import '@carbon/web-components/es-custom/components/button/button.js';
|
|
73
|
+
import '@carbon/web-components/es-custom/components/layer/index.js';
|
|
74
|
+
import '@carbon/icons-react/es/Checkmark.js';
|
|
75
|
+
import '@carbon/icons-react/es/Headset.js';
|
|
76
|
+
import '@carbon/icons-react/es/HelpDesk.js';
|
|
77
|
+
import '@carbon/icons-react/es/Logout.js';
|
|
78
|
+
import './SearchResultBody.js';
|
|
79
|
+
import './VideoComponent.js';
|
|
80
|
+
import './InlineError.js';
|
|
81
|
+
import '@carbon/icons-react/es/ErrorFilled.js';
|
|
82
|
+
import '@carbon/icons-react/es/Music.js';
|
|
83
|
+
import '@carbon/icons-react/es/TouchInteraction.js';
|
|
84
|
+
import '@carbon/icons-react/es/Send.js';
|
|
85
|
+
import '@carbon/icons-react/es/ArrowRight.js';
|
|
86
|
+
import '@carbon/icons-react/es/Launch.js';
|
|
87
|
+
import './useWindowSize.js';
|
|
88
|
+
import '@carbon/icons-react/es/DocumentPdf.js';
|
|
89
|
+
import '@carbon/icons-react/es/Link.js';
|
|
90
|
+
import '@carbon/icons-react/es/Maximize.js';
|
|
91
|
+
import './useCounter.js';
|
|
92
|
+
import './IFrameComponent.js';
|
|
93
|
+
import '@carbon/web-components/es-custom/components/data-table/index.js';
|
|
94
|
+
import '@carbon/web-components/es-custom/components/checkbox/index.js';
|
|
95
|
+
import '@carbon/icons/es/download/16.js';
|
|
96
|
+
import 'lit-html/directives/repeat.js';
|
|
97
|
+
import '@carbon/web-components/es-custom/components/pagination/index.js';
|
|
98
|
+
import '@carbon/web-components/es-custom/components/select/index.js';
|
|
99
|
+
import '@carbon/web-components/es-custom/components/data-table/table-skeleton.js';
|
|
100
|
+
import './moduleFederationPluginUtils.js';
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* This component handles rendering a panel with body/footer content.
|
|
104
|
+
*/
|
|
105
|
+
function BodyAndFooterPanelComponent(props) {
|
|
106
|
+
const { isOpen, isMessageForInput, localMessageItem, eventName, eventDescription, overlayPanelName, className, title, useAITheme, requestFocus, onClickBack, onClose, onClickRestart, onCloseAndRestart, onPanelOpenEnd, onPanelCloseEnd, onPanelOpenStart, onPanelCloseStart, } = props;
|
|
107
|
+
const languagePack = useLanguagePack();
|
|
108
|
+
const serviceManager = useServiceManager();
|
|
109
|
+
const originalMessage = useSelector((state) => state.allMessagesByID[localMessageItem?.fullMessageID]);
|
|
110
|
+
const showAnimations = props.showAnimations ?? true;
|
|
111
|
+
const disableAnimation = !showAnimations;
|
|
112
|
+
const openAnimation = disableAnimation ? AnimationInType.NONE : AnimationInType.SLIDE_IN_FROM_BOTTOM;
|
|
113
|
+
const closeAnimation = disableAnimation ? AnimationOutType.NONE : AnimationOutType.SLIDE_OUT_TO_BOTTOM;
|
|
114
|
+
return (React__default.createElement(OverlayPanel, { className: "WAC__overlay--covering", panelName: "BodyAndFooter", onOpenStart: onPanelOpenStart, onOpenEnd: onPanelOpenEnd, onCloseStart: onPanelCloseStart, onCloseEnd: onPanelCloseEnd, animationOnOpen: openAnimation, animationOnClose: closeAnimation, shouldOpen: isOpen, serviceManager: serviceManager, overlayPanelName: overlayPanelName },
|
|
115
|
+
React__default.createElement(BasePanelComponentExport, { className: cx('WACBodyAndFooterComponent', className), eventName: eventName, eventDescription: eventDescription, isOpen: isOpen, title: title, disableAnimation: disableAnimation, useAITheme: useAITheme, labelBackButton: languagePack.general_returnToAssistant, onClickBack: onClickBack, onClickClose: onClose, onClickRestart: onClickRestart, onClickCloseAndRestart: onCloseAndRestart }, originalMessage && (React__default.createElement(BodyWithFooterComponent, { localMessageItem: localMessageItem, fullMessage: originalMessage, isMessageForInput: isMessageForInput, requestFocus: requestFocus })))));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export { BodyAndFooterPanelComponent };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* (C) Copyright IBM Corp. 2017, 2025. All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
7
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
12
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
13
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
14
|
+
* the License.
|
|
15
|
+
*
|
|
16
|
+
* @carbon/ai-chat 0.3.2
|
|
17
|
+
*
|
|
18
|
+
* Built: Jul 9 2025 11:10 am -04:00
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import Close from '@carbon/icons-react/es/Close.js';
|
|
24
|
+
import { Button } from '@carbon/react';
|
|
25
|
+
import React__default, { useContext, useRef, useEffect } from 'react';
|
|
26
|
+
import { useSelector } from 'react-redux';
|
|
27
|
+
import { _ as useLanguagePack, a0 as useServiceManager, aB as AriaAnnouncerContext, aE as ButtonKindEnum, aH as ButtonSizeEnum, a4 as MaybeDangerouslySetInnerHTMLExport, w as actions } from './AppContainer.js';
|
|
28
|
+
import { A as AvatarExport } from './Avatar.js';
|
|
29
|
+
import './customElement.js';
|
|
30
|
+
import 'react-intl';
|
|
31
|
+
import '@carbon/icons-react/es/AiLaunch.js';
|
|
32
|
+
import '@carbon/icons-react/es/ArrowUpLeft.js';
|
|
33
|
+
import '@carbon/icons-react/es/ChatLaunch.js';
|
|
34
|
+
import '@carbon/icons-react/es/Information.js';
|
|
35
|
+
import '@carbon/icons-react/es/Home.js';
|
|
36
|
+
import '@carbon/web-components/es-custom/components/slug/index.js';
|
|
37
|
+
import '@carbon/icons-react/es/CloseLarge.js';
|
|
38
|
+
import '@carbon/icons-react/es/DownToBottom.js';
|
|
39
|
+
import '@carbon/icons-react/es/Menu.js';
|
|
40
|
+
import '@carbon/icons-react/es/Restart.js';
|
|
41
|
+
import '@carbon/icons-react/es/SidePanelClose.js';
|
|
42
|
+
import '@carbon/icons-react/es/SubtractLarge.js';
|
|
43
|
+
import '@carbon/web-components/es-custom/components/ai-label/defs.js';
|
|
44
|
+
import '@carbon/web-components/es-custom/components/popover/defs.js';
|
|
45
|
+
import '@carbon/web-components/es-custom/components/skeleton-icon/index.js';
|
|
46
|
+
import 'lit';
|
|
47
|
+
import 'lit/decorators.js';
|
|
48
|
+
import '@carbon/web-components/es-custom/components/button/index.js';
|
|
49
|
+
import '@carbon/web-components/es-custom/components/overflow-menu/index.js';
|
|
50
|
+
import '@carbon/icons-react/es/ChevronDown.js';
|
|
51
|
+
import '@carbon/icons-react/es/ChevronUp.js';
|
|
52
|
+
import 'react-dom';
|
|
53
|
+
import '@carbon/web-components/es-custom/components/ai-label/ai-label-action-button.js';
|
|
54
|
+
import '@carbon/web-components/es-custom/components/ai-label/ai-label.js';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The branding overlay that appears everytime a user clicks on the information icon in the branding banner to learn a
|
|
58
|
+
* little about IBM Watson.
|
|
59
|
+
*
|
|
60
|
+
* Note: We should only make the close button visible when the overlay is open. The reason for this is because VoiceOver
|
|
61
|
+
* still places it's virtual cursor on the close button even after the close animation for the panel has ended and
|
|
62
|
+
* announces to close the overlay.
|
|
63
|
+
*/
|
|
64
|
+
function BrandingOverlayComponent({ brandingCloseButtonRef, carbonTheme }) {
|
|
65
|
+
const { branding_headline, branding_description, branding_sign_up, general_ariaAnnounceClosedInformationOverlay, general_ariaAnnounceEscapeOverlay, } = useLanguagePack();
|
|
66
|
+
const serviceManager = useServiceManager();
|
|
67
|
+
const brandingState = useSelector((app) => app.brandingState);
|
|
68
|
+
const ariaAnnouncer = useContext(AriaAnnouncerContext);
|
|
69
|
+
const overlayRef = useRef();
|
|
70
|
+
const overlayTextHolderRef = useRef();
|
|
71
|
+
const { isOpen } = brandingState;
|
|
72
|
+
// Gets the sign up url that includes the hostname as the utm_source.
|
|
73
|
+
const getSignUpURL = `https://www.ibm.com/cloud/watson-assistant/?utm_medium=webchat&utm_source=${window.location.hostname}`;
|
|
74
|
+
// Closes branding overlay, but show branding banner.
|
|
75
|
+
const handleClose = () => {
|
|
76
|
+
serviceManager.store.dispatch(actions.setBrandingOverlayIsOpen(false));
|
|
77
|
+
};
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (isOpen) {
|
|
80
|
+
ariaAnnouncer(overlayTextHolderRef.current);
|
|
81
|
+
ariaAnnouncer(general_ariaAnnounceEscapeOverlay);
|
|
82
|
+
}
|
|
83
|
+
}, [ariaAnnouncer, general_ariaAnnounceEscapeOverlay, isOpen]);
|
|
84
|
+
return (
|
|
85
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
86
|
+
React__default.createElement("div", { className: "WACBrandingOverlay WACPanelContent", ref: overlayRef, onKeyDown: event => {
|
|
87
|
+
// Close the branding overlay when the user presses the escape key.
|
|
88
|
+
if (event.key === 'Escape') {
|
|
89
|
+
handleClose();
|
|
90
|
+
}
|
|
91
|
+
} },
|
|
92
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__header" }, isOpen && (React__default.createElement(Button, { kind: ButtonKindEnum.GHOST, size: ButtonSizeEnum.SMALL, onClick: handleClose, type: "button", "aria-label": general_ariaAnnounceClosedInformationOverlay, ref: brandingCloseButtonRef },
|
|
93
|
+
React__default.createElement(Close, null)))),
|
|
94
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__body" },
|
|
95
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__main-content" },
|
|
96
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__logoContainer" },
|
|
97
|
+
React__default.createElement(AvatarExport, { theme: carbonTheme })),
|
|
98
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__textHolder", ref: overlayTextHolderRef },
|
|
99
|
+
React__default.createElement(MaybeDangerouslySetInnerHTMLExport, { html: branding_headline }),
|
|
100
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__headline" }),
|
|
101
|
+
React__default.createElement("div", { className: "WACBrandingOverlay__text" },
|
|
102
|
+
branding_description,
|
|
103
|
+
' ',
|
|
104
|
+
React__default.createElement("a", { href: getSignUpURL, rel: "noreferrer noopener", target: "_blank" }, branding_sign_up)))))));
|
|
105
|
+
}
|
|
106
|
+
const BrandingOverlayExport = React__default.memo(BrandingOverlayComponent);
|
|
107
|
+
|
|
108
|
+
export { BrandingOverlayExport as BrandingOverlayComponent };
|
package/dist/es/Carousel.js
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* or implied. See the License for the specific language governing permissions and limitations under
|
|
14
14
|
* the License.
|
|
15
15
|
*
|
|
16
|
-
* @carbon/ai-chat 0.3.
|
|
16
|
+
* @carbon/ai-chat 0.3.3
|
|
17
17
|
*
|
|
18
|
-
* Built:
|
|
18
|
+
* Built: Jul 11 2025 1:09 pm -04:00
|
|
19
19
|
*
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* (C) Copyright IBM Corp. 2017, 2025. All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
7
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
12
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
13
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
14
|
+
* the License.
|
|
15
|
+
*
|
|
16
|
+
* @carbon/ai-chat 0.3.2
|
|
17
|
+
*
|
|
18
|
+
* Built: Jul 9 2025 11:10 am -04:00
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import Restart from '@carbon/icons-react/es/Restart.js';
|
|
24
|
+
import { unstable__ChatButton } from '@carbon/react';
|
|
25
|
+
import { aQ as uuid, aP as BotHeaderExport, Z as cx, aE as ButtonKindEnum, aH as ButtonSizeEnum } from './AppContainer.js';
|
|
26
|
+
import React__default from 'react';
|
|
27
|
+
import { useIntl } from 'react-intl';
|
|
28
|
+
import { useSelector } from 'react-redux';
|
|
29
|
+
import { R as RichTextExport } from './RichText.js';
|
|
30
|
+
import { C as CarbonTheme, e as CatastrophicErrorType } from './customElement.js';
|
|
31
|
+
import '@carbon/icons-react/es/AiLaunch.js';
|
|
32
|
+
import '@carbon/icons-react/es/ArrowUpLeft.js';
|
|
33
|
+
import '@carbon/icons-react/es/ChatLaunch.js';
|
|
34
|
+
import '@carbon/icons-react/es/Close.js';
|
|
35
|
+
import '@carbon/icons-react/es/Information.js';
|
|
36
|
+
import '@carbon/icons-react/es/Home.js';
|
|
37
|
+
import '@carbon/web-components/es-custom/components/slug/index.js';
|
|
38
|
+
import '@carbon/icons-react/es/CloseLarge.js';
|
|
39
|
+
import '@carbon/icons-react/es/DownToBottom.js';
|
|
40
|
+
import '@carbon/icons-react/es/Menu.js';
|
|
41
|
+
import '@carbon/icons-react/es/SidePanelClose.js';
|
|
42
|
+
import '@carbon/icons-react/es/SubtractLarge.js';
|
|
43
|
+
import '@carbon/web-components/es-custom/components/ai-label/defs.js';
|
|
44
|
+
import '@carbon/web-components/es-custom/components/popover/defs.js';
|
|
45
|
+
import '@carbon/web-components/es-custom/components/skeleton-icon/index.js';
|
|
46
|
+
import 'lit';
|
|
47
|
+
import 'lit/decorators.js';
|
|
48
|
+
import '@carbon/web-components/es-custom/components/button/index.js';
|
|
49
|
+
import '@carbon/web-components/es-custom/components/overflow-menu/index.js';
|
|
50
|
+
import '@carbon/icons-react/es/ChevronDown.js';
|
|
51
|
+
import '@carbon/icons-react/es/ChevronUp.js';
|
|
52
|
+
import 'react-dom';
|
|
53
|
+
import '@carbon/web-components/es-custom/components/ai-label/ai-label-action-button.js';
|
|
54
|
+
import '@carbon/web-components/es-custom/components/ai-label/ai-label.js';
|
|
55
|
+
import 'lit/directives/unsafe-html.js';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This component renders an error message svg to indicate an error has occurred.
|
|
59
|
+
*/
|
|
60
|
+
function ErrorMessageDark() {
|
|
61
|
+
const linearGradientID = uuid();
|
|
62
|
+
return (React__default.createElement("svg", { viewBox: "0 0 80 80" },
|
|
63
|
+
React__default.createElement("defs", null,
|
|
64
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-1`, x1: "38.91", y1: "4.92", x2: "38.91", y2: "73.85", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
65
|
+
React__default.createElement("stop", { offset: "0", stopColor: "#262626" }),
|
|
66
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#393939" })),
|
|
67
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-2`, x1: "12.44", y1: "71.21", x2: "76.34", y2: "34.31", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
68
|
+
React__default.createElement("stop", { offset: "0", stopColor: "#525252" }),
|
|
69
|
+
React__default.createElement("stop", { offset: "0.52", stopColor: "#393939" }),
|
|
70
|
+
React__default.createElement("stop", { offset: "0.61", stopColor: "#393939" }),
|
|
71
|
+
React__default.createElement("stop", { offset: "0.99", stopColor: "#161616" })),
|
|
72
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-3`, x1: "39.38", y1: "50.63", x2: "52.04", y2: "72.55", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
73
|
+
React__default.createElement("stop", { offset: "0.11", stopColor: "#6f6f6f", stopOpacity: "0" }),
|
|
74
|
+
React__default.createElement("stop", { offset: "0.94", stopColor: "#6f6f6f" }))),
|
|
75
|
+
React__default.createElement("rect", { width: "80", height: "80", fill: "none" }),
|
|
76
|
+
React__default.createElement("polygon", { points: "59.91 78.34 16.91 53.51 21.77 50.7 64.77 75.53 59.91 78.34", opacity: "0.25", style: { isolation: 'isolate' } }),
|
|
77
|
+
React__default.createElement("path", { d: "M39,6.92c12.15,7,22,24,21.92,38S51,64.49,38.83,57.48s-22-24-21.92-38S26.83-.09,39,6.92Z", fill: `url(#${linearGradientID}-1)` }),
|
|
78
|
+
React__default.createElement("path", { d: "M42.85,4.68C36.74,1.15,31.2.82,27.2,3.15L23.54,5.28C27.52,3.08,33,3.45,39,6.92c12.15,7,22,24,21.92,38,0,6.77-2.35,11.58-6.13,13.94h-.07c-.32.2,3.66-2.1,3.66-2.1,4-2.3,6.39-7.18,6.41-14.12C64.81,28.7,55,11.69,42.85,4.68Z", fill: `url(#${linearGradientID}-2)` }),
|
|
79
|
+
React__default.createElement("path", { d: "M29.11,3.91v.36a19.59,19.59,0,0,1,9.68,3c12,6.94,21.78,23.84,21.74,37.65,0,9.4-4.56,15.23-11.83,15.23a19.59,19.59,0,0,1-9.68-3C27,50.21,17.24,33.32,17.28,19.5c0-9.39,4.56-15.23,11.83-15.23V3.91m0,0c-7.21,0-12.17,5.71-12.2,15.59,0,14,9.77,31,21.92,38a20.18,20.18,0,0,0,9.87,3c7.21,0,12.17-5.71,12.2-15.6C60.9,31,51.13,14,39,6.9a19.94,19.94,0,0,0-9.87-3Z", fill: `url(#${linearGradientID}-3)` }),
|
|
80
|
+
React__default.createElement("path", { className: "cls-6", d: "M38.93,49.79a6.83,6.83,0,0,1-2.66-2.51,6.19,6.19,0,0,1-.81-3v-1a2.26,2.26,0,0,1,.81-2c.54-.35,1.43-.17,2.66.54a6.67,6.67,0,0,1,2.61,2.5,6,6,0,0,1,.81,3v1a2.23,2.23,0,0,1-.81,2C41,50.66,40.13,50.49,38.93,49.79ZM37.77,38.16,36,22.77V13l5.81,3.36v9.73L40.17,39.55Z", fill: "#525252" })));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* This component renders an error message svg to indicate an error has occurred.
|
|
85
|
+
*/
|
|
86
|
+
function ErrorMessageLight() {
|
|
87
|
+
const linearGradientID = uuid();
|
|
88
|
+
return (React__default.createElement("svg", { viewBox: "0 0 80 80" },
|
|
89
|
+
React__default.createElement("defs", null,
|
|
90
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-1`, x1: "29.96", y1: "36.32", x2: "53.15", y2: "-3.84", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
91
|
+
React__default.createElement("stop", { offset: "0", stopColor: "#525252", stopOpacity: "0.05" }),
|
|
92
|
+
React__default.createElement("stop", { offset: "1", stopOpacity: "0.1" })),
|
|
93
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-2`, x1: "38.91", y1: "29.41", x2: "38.91", y2: "78.7", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
94
|
+
React__default.createElement("stop", { offset: "0", stopColor: "#c6c6c6" }),
|
|
95
|
+
React__default.createElement("stop", { offset: "0.78", stopColor: "#e0e0e0" })),
|
|
96
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-3`, x1: "18.08", y1: "67.95", x2: "71.65", y2: "37.02", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
97
|
+
React__default.createElement("stop", { offset: "0", stopColor: "#e0e0e0" }),
|
|
98
|
+
React__default.createElement("stop", { offset: "0.13", stopColor: "#f4f4f4" }),
|
|
99
|
+
React__default.createElement("stop", { offset: "0.56", stopColor: "#e0e0e0" }),
|
|
100
|
+
React__default.createElement("stop", { offset: "0.62", stopColor: "#d8d8d8" }),
|
|
101
|
+
React__default.createElement("stop", { offset: "0.7", stopColor: "#c6c6c6" }),
|
|
102
|
+
React__default.createElement("stop", { offset: "0.89", stopColor: "#a8a8a8" }),
|
|
103
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#8d8d8d" })),
|
|
104
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-4`, x1: "27.93", y1: "30.78", x2: "49.86", y2: "68.76", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
105
|
+
React__default.createElement("stop", { offset: "0.54", stopColor: "#d0d0d0", stopOpacity: "0" }),
|
|
106
|
+
React__default.createElement("stop", { offset: "0.82", stopColor: "#f1f1f1", stopOpacity: "0.7" }),
|
|
107
|
+
React__default.createElement("stop", { offset: "0.94", stopColor: "#fff" })),
|
|
108
|
+
React__default.createElement("linearGradient", { id: `${linearGradientID}-5`, x1: "28.67", y1: "55.68", x2: "47.16", y2: "45.01", gradientTransform: "matrix(1, 0, 0, -1, 0, 82)", gradientUnits: "userSpaceOnUse" },
|
|
109
|
+
React__default.createElement("stop", { offset: "0", stopColor: "#fff" }),
|
|
110
|
+
React__default.createElement("stop", { offset: "0.05", stopColor: "#fdfdfd" }),
|
|
111
|
+
React__default.createElement("stop", { offset: "0.3", stopColor: "#f6f6f6" }),
|
|
112
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#f4f4f4" }))),
|
|
113
|
+
React__default.createElement("rect", { width: "80", height: "80", fill: "none" }),
|
|
114
|
+
React__default.createElement("polygon", { points: "59.91 78.34 16.91 53.51 21.77 50.7 64.77 75.53 59.91 78.34", fill: `url(#${linearGradientID}-1)` }),
|
|
115
|
+
React__default.createElement("path", { d: "M39,6.92c12.15,7,22,24,21.92,38S51,64.49,38.83,57.48s-22-24-21.92-38S26.83-.09,39,6.92Z", fill: `url(#${linearGradientID}-2)` }),
|
|
116
|
+
React__default.createElement("path", { d: "M42.85,4.68C36.74,1.15,31.2.82,27.2,3.15L23.54,5.28C27.52,3.08,33,3.45,39,6.92c12.15,7,22,24,21.92,38,0,6.77-2.35,11.58-6.13,13.94h-.07c-.32.2,3.66-2.1,3.66-2.1,4-2.3,6.39-7.18,6.41-14.12C64.81,28.7,55,11.69,42.85,4.68Z", fill: `url(#${linearGradientID}-3)` }),
|
|
117
|
+
React__default.createElement("path", { d: "M29.11,3.91v.36a19.59,19.59,0,0,1,9.68,3c12,6.94,21.78,23.84,21.74,37.65,0,9.4-4.56,15.23-11.83,15.23a19.59,19.59,0,0,1-9.68-3C27,50.21,17.24,33.32,17.28,19.5c0-9.39,4.56-15.23,11.83-15.23V3.91m0,0c-7.21,0-12.17,5.71-12.2,15.59,0,14,9.77,31,21.92,38a20.18,20.18,0,0,0,9.87,3c7.21,0,12.17-5.71,12.2-15.6C60.9,31,51.13,14,39,6.9a19.94,19.94,0,0,0-9.87-3Z", fill: `url(#${linearGradientID}-4)` }),
|
|
118
|
+
React__default.createElement("path", { d: "M38.93,49.79a6.83,6.83,0,0,1-2.66-2.51,6.19,6.19,0,0,1-.81-3v-1a2.26,2.26,0,0,1,.81-2c.54-.35,1.43-.17,2.66.54a6.67,6.67,0,0,1,2.61,2.5,6,6,0,0,1,.81,3v1a2.23,2.23,0,0,1-.81,2C41,50.66,40.13,50.49,38.93,49.79ZM37.77,38.16,36,22.77V13l5.81,3.36v9.73L40.17,39.55Z", fill: `url(#${linearGradientID}-5)` })));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* This component is rendered while the web chat is hydrating.
|
|
123
|
+
*/
|
|
124
|
+
function CatastrophicError({ serviceManager, onClose, languagePack, onRestart, showHeader, botName, headerDisplayName, catastrophicErrorType, }) {
|
|
125
|
+
const intl = useIntl();
|
|
126
|
+
const carbonTheme = useSelector((state) => state.theme.carbonTheme);
|
|
127
|
+
const isDarkTheme = carbonTheme === CarbonTheme.G90 || carbonTheme === CarbonTheme.G100;
|
|
128
|
+
let errorKey;
|
|
129
|
+
switch (catastrophicErrorType) {
|
|
130
|
+
case CatastrophicErrorType.AGENT_APP_EXPIRED_SESSION:
|
|
131
|
+
errorKey = 'errors_agentAppSessionExpired';
|
|
132
|
+
break;
|
|
133
|
+
case CatastrophicErrorType.THROTTLED:
|
|
134
|
+
errorKey = 'errors_busy';
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
errorKey = 'errors_communicating';
|
|
138
|
+
}
|
|
139
|
+
const errorBodyText = intl.formatMessage({ id: errorKey }, { botName });
|
|
140
|
+
return (React__default.createElement("div", { className: "WAC" },
|
|
141
|
+
showHeader && (React__default.createElement(BotHeaderExport, { headerDisplayName: headerDisplayName, onClose: onClose, onToggleHomeScreen: null, includeWriteableElement: false })),
|
|
142
|
+
React__default.createElement("div", { className: cx('WACCatastrophicError', 'WACPanelContent', { 'WACCatastrophicError--withHeader': showHeader }) },
|
|
143
|
+
React__default.createElement("div", { className: "WACCatastrophicError__ErrorTextContainer" },
|
|
144
|
+
isDarkTheme && React__default.createElement(ErrorMessageDark, null),
|
|
145
|
+
!isDarkTheme && React__default.createElement(ErrorMessageLight, null),
|
|
146
|
+
React__default.createElement("div", { className: "WACCatastrophicError__ErrorHeading" }, languagePack.errors_somethingWrong),
|
|
147
|
+
React__default.createElement("div", { className: "WACCatastrophicError__ErrorBody" },
|
|
148
|
+
React__default.createElement(RichTextExport, { text: errorBodyText })),
|
|
149
|
+
catastrophicErrorType !== CatastrophicErrorType.AGENT_APP_EXPIRED_SESSION && onRestart && (React__default.createElement(unstable__ChatButton, { className: "WACCatastrophicError__RestartButton", kind: ButtonKindEnum.TERTIARY, size: ButtonSizeEnum.SMALL, id: `WAC__error-reset${serviceManager.namespace.suffix}`, "aria-label": languagePack.buttons_restart, onClick: onRestart, renderIcon: Restart, type: "button" }, languagePack.buttons_retry))))));
|
|
150
|
+
}
|
|
151
|
+
const CatastrophicErrorExport = React__default.memo(CatastrophicError);
|
|
152
|
+
|
|
153
|
+
export { CatastrophicErrorExport as CatastrophicError };
|