@carbon/ai-chat 0.1.1-alpha5 → 0.1.1-react17
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/App.js +933 -55468
- package/dist/Carousel.js +1 -5705
- package/dist/Chat.js +1 -8339
- package/dist/GenesysMessengerServiceDesk.js +1 -579
- package/dist/HumanAgentServiceImpl.js +1 -1122
- package/dist/NiceDFOServiceDesk.js +2 -2097
- package/dist/PDFViewerContainer.js +2 -27439
- package/dist/SFServiceDesk.js +1 -1012
- package/dist/ServiceDeskImpl.js +1 -72
- package/dist/ZendeskServiceDesk.js +1 -649
- package/dist/_commonjsHelpers.js +1 -33
- package/dist/_node-resolve_empty.js +1 -25
- package/dist/agentActions.js +1 -187
- package/dist/aiChatEntry.js +1 -28
- package/dist/aiChatEntry2.js +4 -7022
- package/dist/anonymousUserIDStorage.js +2 -250
- package/dist/ar-dz.js +1 -55
- package/dist/ar-kw.js +1 -55
- package/dist/ar-ly.js +1 -55
- package/dist/ar-ma.js +1 -55
- package/dist/ar-sa.js +1 -55
- package/dist/ar-tn.js +1 -55
- package/dist/ar.js +1 -55
- package/dist/ar2.js +1 -470
- package/dist/cs.js +1 -55
- package/dist/cs2.js +1 -470
- package/dist/de-at.js +1 -55
- package/dist/de-ch.js +1 -55
- package/dist/de.js +1 -55
- package/dist/de2.js +1 -470
- package/dist/domUtils.js +2 -820
- package/dist/en-au.js +1 -55
- package/dist/en-ca.js +1 -55
- package/dist/en-gb.js +1 -55
- package/dist/en-ie.js +1 -55
- package/dist/en-il.js +1 -55
- package/dist/en-nz.js +1 -55
- package/dist/es-do.js +1 -55
- package/dist/es-us.js +1 -55
- package/dist/es.js +1 -55
- package/dist/es2.js +1 -470
- package/dist/export.js +1 -25
- package/dist/export.legacy.js +1 -25
- package/dist/fontUtils.js +1 -1036
- package/dist/fr-ca.js +1 -55
- package/dist/fr-ch.js +1 -55
- package/dist/fr.js +1 -55
- package/dist/fr2.js +1 -470
- package/dist/humanAgentUtils.js +1 -1393
- package/dist/it-ch.js +1 -55
- package/dist/it.js +1 -55
- package/dist/it2.js +1 -470
- package/dist/ja.js +1 -55
- package/dist/ja2.js +1 -470
- package/dist/jstz.min.js +1 -41
- package/dist/ko.js +1 -55
- package/dist/ko2.js +1 -470
- package/dist/messageUtils.js +1 -1338
- package/dist/mockServiceDesk.js +1 -851
- package/dist/moduleFederationPluginUtils.js +2 -5852
- package/dist/nl.js +1 -55
- package/dist/nl2.js +1 -470
- package/dist/pt-br.js +1 -55
- package/dist/pt-br2.js +1 -470
- package/dist/pt.js +1 -55
- package/dist/render.js +1 -88
- package/dist/web-components/cds-aichat-container/index.js +3 -3
- package/dist/web-components/cds-aichat-container/index.js.map +1 -1
- package/dist/web-components/cds-aichat-custom-element/index.js +2 -2
- package/dist/web-components/cds-aichat-custom-element/index.js.map +1 -1
- package/dist/zh-cn.js +1 -55
- package/dist/zh-tw.js +1 -55
- package/dist/zh-tw2.js +1 -470
- package/dist/zh.js +1 -470
- package/package.json +1 -1
package/dist/_commonjsHelpers.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
(C) Copyright IBM Corp. 2017, 2024. 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.1.1-alpha5
|
|
17
|
-
|
|
18
|
-
Built: Oct 24 2024 10:59 am -04:00
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
24
|
-
|
|
25
|
-
function getDefaultExportFromCjs (x) {
|
|
26
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
30
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { getDefaultExportFromNamespaceIfNotNamed as a, commonjsGlobal as c, getDefaultExportFromCjs as g };
|
|
1
|
+
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}export{l as a,e as c,t as g};
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
(C) Copyright IBM Corp. 2017, 2024. 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.1.1-alpha5
|
|
17
|
-
|
|
18
|
-
Built: Oct 24 2024 10:59 am -04:00
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
var _nodeResolve_empty = {};
|
|
24
|
-
|
|
25
|
-
export { _nodeResolve_empty as default };
|
|
1
|
+
var a={};export{a as default};
|
package/dist/agentActions.js
CHANGED
|
@@ -1,187 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
(C) Copyright IBM Corp. 2017, 2024. 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.1.1-alpha5
|
|
17
|
-
|
|
18
|
-
Built: Oct 24 2024 10:59 am -04:00
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
import './messageUtils.js';
|
|
24
|
-
import { p as MessageResponseTypes, u as uuid, U as UUIDType } from './aiChatEntry2.js';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* IBM Confidential
|
|
29
|
-
*
|
|
30
|
-
* (C) Copyright IBM Corp. 2020, 2023
|
|
31
|
-
*
|
|
32
|
-
* The source code for this program is not published or otherwise
|
|
33
|
-
* divested of its trade secrets, irrespective of what has been
|
|
34
|
-
* deposited with the U. S. Copyright Office
|
|
35
|
-
*
|
|
36
|
-
* US Government Users Restricted Rights - Use, duplication or
|
|
37
|
-
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* Takes data from the v2 message API and transforms into something usable by WAC.
|
|
42
|
-
*
|
|
43
|
-
* @param message Takes an object in the shape of a v2 message API Send object. With an additional `ui_state`
|
|
44
|
-
* object for local state.
|
|
45
|
-
* @param originalUserText The original text provided by the user before it was potentially modified on the
|
|
46
|
-
* underlying {@link MessageRequest}. This value may be null if there is no text from the user to display.
|
|
47
|
-
* instance.
|
|
48
|
-
* @param id If you have already generated an id, it's ok to pass it in. If not, one will be generated.
|
|
49
|
-
*/
|
|
50
|
-
function inputItemToLocalItem(message, originalUserText, id = uuid(UUIDType.LOCAL_MESSAGE)) {
|
|
51
|
-
const localMessage = {
|
|
52
|
-
// The individual message in the format of an item from output.generic in the docs above.
|
|
53
|
-
item: {
|
|
54
|
-
response_type: MessageResponseTypes.TEXT,
|
|
55
|
-
...message.input,
|
|
56
|
-
},
|
|
57
|
-
// ui_state is for rendering concerns and is not persistent.
|
|
58
|
-
ui_state: {
|
|
59
|
-
id,
|
|
60
|
-
originalUserText,
|
|
61
|
-
needsAnnouncement: false, // We don't announce text that came from the user.
|
|
62
|
-
},
|
|
63
|
-
fullMessageID: message.id,
|
|
64
|
-
};
|
|
65
|
-
return localMessage;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* IBM Confidential
|
|
71
|
-
*
|
|
72
|
-
* (C) Copyright IBM Corp. 2019, 2023
|
|
73
|
-
*
|
|
74
|
-
* The source code for this program is not published or otherwise
|
|
75
|
-
* divested of its trade secrets, irrespective of what has been
|
|
76
|
-
* deposited with the U. S. Copyright Office
|
|
77
|
-
*
|
|
78
|
-
* US Government Users Restricted Rights - Use, duplication or
|
|
79
|
-
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Redux action creators for human agent actions.
|
|
84
|
-
*/
|
|
85
|
-
const HA_SET_AGENT_AVAILABILITY = 'HA_SET_AGENT_AVAILABILITY';
|
|
86
|
-
const HA_SET_IS_CONNECTING = 'HA_SET_IS_CONNECTING';
|
|
87
|
-
const HA_SET_IS_RECONNECTING = 'HA_SET_IS_RECONNECTING';
|
|
88
|
-
const HA_SET_AGENT_JOINED = 'HA_SET_AGENT_JOINED';
|
|
89
|
-
const HA_SET_AGENT_LEFT_CHAT = 'HA_SET_AGENT_LEFT_CHAT';
|
|
90
|
-
const HA_END_CHAT = 'HA_END_CHAT';
|
|
91
|
-
const HA_UPDATE_CAPABILITIES = 'HA_UPDATE_CAPABILITIES';
|
|
92
|
-
const HA_UPDATE_FILE_UPLOAD_IN_PROGRESS = 'HA_UPDATE_FILE_UPLOAD_IN_PROGRESS';
|
|
93
|
-
const HA_SET_SHOW_SCREEN_SHARE_REQUEST = 'HA_SET_SHOW_SCREEN_SHARE_REQUEST';
|
|
94
|
-
const HA_SET_IS_SCREEN_SHARING = 'HA_SET_IS_SCREEN_SHARING';
|
|
95
|
-
const HA_SET_PERSISTED_STATE = 'HA_SET_PERSISTED_STATE';
|
|
96
|
-
const HA_UPDATE_IS_SUSPENDED = 'HA_UPDATE_IS_SUSPENDED';
|
|
97
|
-
const HA_UPDATE_IS_TYPING = 'HA_UPDATE_IS_TYPING';
|
|
98
|
-
/**
|
|
99
|
-
* Sets the "is connecting" status for a human agent.
|
|
100
|
-
*/
|
|
101
|
-
function setIsConnecting(isConnecting, localMessageID) {
|
|
102
|
-
return {
|
|
103
|
-
type: HA_SET_IS_CONNECTING,
|
|
104
|
-
isConnecting,
|
|
105
|
-
localMessageID,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Sets the "is reconnecting" status for a human agent.
|
|
110
|
-
*/
|
|
111
|
-
function setIsReconnecting(isReconnecting) {
|
|
112
|
-
return { type: HA_SET_IS_RECONNECTING, isReconnecting };
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Indicate agent has left chat.
|
|
116
|
-
*/
|
|
117
|
-
function setAgentLeftChat() {
|
|
118
|
-
return { type: HA_SET_AGENT_LEFT_CHAT };
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Ends the current chat.
|
|
122
|
-
*/
|
|
123
|
-
function endChat() {
|
|
124
|
-
return { type: HA_END_CHAT };
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Sets the availability information for a user who is waiting to be connected to an agent.
|
|
128
|
-
*/
|
|
129
|
-
function setAgentAvailability(availability) {
|
|
130
|
-
return {
|
|
131
|
-
type: HA_SET_AGENT_AVAILABILITY,
|
|
132
|
-
availability,
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Sets the availability information for a user who is waiting to be connected to an agent.
|
|
137
|
-
*/
|
|
138
|
-
function setAgentJoined(agentProfile) {
|
|
139
|
-
return {
|
|
140
|
-
type: HA_SET_AGENT_JOINED,
|
|
141
|
-
agentProfile,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Updates web chat with the capabilities supported by the service desk.
|
|
146
|
-
*/
|
|
147
|
-
function updateCapabilities(capabilities) {
|
|
148
|
-
return { type: HA_UPDATE_CAPABILITIES, capabilities };
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Updates the indicator for if any files are being uploaded.
|
|
152
|
-
*/
|
|
153
|
-
function updateFilesUploadInProgress(fileUploadInProgress) {
|
|
154
|
-
return { type: HA_UPDATE_FILE_UPLOAD_IN_PROGRESS, fileUploadInProgress };
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Sets the state of the screen sharing modal.
|
|
158
|
-
*/
|
|
159
|
-
function setShowScreenShareRequest(showRequest) {
|
|
160
|
-
return { type: HA_SET_SHOW_SCREEN_SHARE_REQUEST, showRequest };
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Sets the state of screen sharing.
|
|
164
|
-
*/
|
|
165
|
-
function setIsScreenSharing(isSharing) {
|
|
166
|
-
return { type: HA_SET_IS_SCREEN_SHARING, isSharing };
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Updates the object that is stored containing state for the service desk.
|
|
170
|
-
*/
|
|
171
|
-
function setPersistedServiceDeskState(state) {
|
|
172
|
-
return { type: HA_SET_PERSISTED_STATE, state };
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Updates the suspended status for the current service desk.
|
|
176
|
-
*/
|
|
177
|
-
function agentUpdateIsSuspended(isSuspended) {
|
|
178
|
-
return { type: HA_UPDATE_IS_SUSPENDED, isSuspended };
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Updates the suspended status for the current service desk.
|
|
182
|
-
*/
|
|
183
|
-
function agentUpdateIsTyping(isTyping) {
|
|
184
|
-
return { type: HA_UPDATE_IS_TYPING, isTyping };
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export { HA_SET_IS_CONNECTING as H, agentUpdateIsSuspended as a, HA_SET_IS_RECONNECTING as b, HA_SET_AGENT_AVAILABILITY as c, HA_SET_SHOW_SCREEN_SHARE_REQUEST as d, HA_SET_AGENT_JOINED as e, HA_SET_PERSISTED_STATE as f, HA_UPDATE_IS_SUSPENDED as g, HA_UPDATE_IS_TYPING as h, inputItemToLocalItem as i, HA_SET_AGENT_LEFT_CHAT as j, HA_UPDATE_CAPABILITIES as k, HA_SET_IS_SCREEN_SHARING as l, HA_UPDATE_FILE_UPLOAD_IN_PROGRESS as m, HA_END_CHAT as n, endChat as o, setIsScreenSharing as p, setIsReconnecting as q, setShowScreenShareRequest as r, setIsConnecting as s, updateCapabilities as t, updateFilesUploadInProgress as u, setAgentAvailability as v, setAgentJoined as w, agentUpdateIsTyping as x, setAgentLeftChat as y, setPersistedServiceDeskState as z };
|
|
1
|
+
import"./messageUtils.js";import{p as n,u as t,U as e}from"./aiChatEntry2.js";function s(s,a,_=t(e.LOCAL_MESSAGE)){return{item:{response_type:n.TEXT,...s.input},ui_state:{id:_,originalUserText:a,needsAnnouncement:!1},fullMessageID:s.id}}const a="HA_SET_AGENT_AVAILABILITY",_="HA_SET_IS_CONNECTING",i="HA_SET_IS_RECONNECTING",r="HA_SET_AGENT_JOINED",E="HA_SET_AGENT_LEFT_CHAT",u="HA_END_CHAT",A="HA_UPDATE_CAPABILITIES",S="HA_UPDATE_FILE_UPLOAD_IN_PROGRESS",T="HA_SET_SHOW_SCREEN_SHARE_REQUEST",o="HA_SET_IS_SCREEN_SHARING",p="HA_SET_PERSISTED_STATE",c="HA_UPDATE_IS_SUSPENDED",I="HA_UPDATE_IS_TYPING";function f(n,t){return{type:_,isConnecting:n,localMessageID:t}}function H(n){return{type:i,isReconnecting:n}}function y(){return{type:E}}function N(){return{type:u}}function l(n){return{type:a,availability:n}}function C(n){return{type:r,agentProfile:n}}function D(n){return{type:A,capabilities:n}}function P(n){return{type:S,fileUploadInProgress:n}}function g(n){return{type:T,showRequest:n}}function R(n){return{type:o,isSharing:n}}function U(n){return{type:p,state:n}}function G(n){return{type:c,isSuspended:n}}function L(n){return{type:I,isTyping:n}}export{_ as H,G as a,i as b,a as c,T as d,r as e,p as f,c as g,I as h,s as i,E as j,A as k,o as l,S as m,u as n,N as o,R as p,H as q,g as r,f as s,D as t,P as u,l as v,C as w,L as x,y,U as z};
|
package/dist/aiChatEntry.js
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
(C) Copyright IBM Corp. 2017, 2024. 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.1.1-alpha5
|
|
17
|
-
|
|
18
|
-
Built: Oct 24 2024 10:59 am -04:00
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
export { b9 as CarbonTheme, bA as ChatContainer, bB as ChatCustomElement, aB as CornersType, bh as IFrameItemDisplayOption, a3 as MessageInputType, p as MessageResponseTypes, b7 as MinimizeButtonIconType, bz as OptionItemPreference, w as ViewType } from './aiChatEntry2.js';
|
|
24
|
-
import '@lit/react';
|
|
25
|
-
import 'react';
|
|
26
|
-
import 'lit';
|
|
27
|
-
import 'lit/decorators.js';
|
|
28
|
-
import 'react-dom';
|
|
1
|
+
export{b9 as CarbonTheme,bA as ChatContainer,bB as ChatCustomElement,aB as CornersType,bh as IFrameItemDisplayOption,a3 as MessageInputType,p as MessageResponseTypes,b7 as MinimizeButtonIconType,bz as OptionItemPreference,w as ViewType}from"./aiChatEntry2.js";import"@lit/react";import"react";import"lit";import"lit/decorators.js";import"react-dom";
|