@carbon/ai-chat 0.1.6 → 0.1.7-test-no-cjs
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/es/{cds-aichat-internal.js → AppContainer.js} +50756 -18310
- package/dist/es/Carousel.js +14 -8
- package/dist/es/GenesysMessengerServiceDesk.js +17 -11
- package/dist/es/HumanAgentServiceImpl.js +17 -12
- package/dist/es/NiceDFOServiceDesk.js +17 -12
- package/dist/es/PDFViewerContainer.js +15 -108
- package/dist/es/ReactPlayer.js +2 -2
- package/dist/es/SFServiceDesk.js +18 -11
- package/dist/es/ServiceDeskImpl.js +2 -2
- package/dist/es/Table.js +429 -315
- package/dist/es/ZendeskServiceDesk.js +17 -11
- package/dist/es/_node-resolve_empty.js +2 -2
- package/dist/es/aiChatEntry.js +137 -120
- package/dist/es/ar-dz.js +3 -4
- package/dist/es/ar-kw.js +3 -4
- package/dist/es/ar-ly.js +3 -4
- package/dist/es/ar-ma.js +3 -4
- package/dist/es/ar-sa.js +3 -4
- package/dist/es/ar-tn.js +3 -4
- package/dist/es/ar.js +3 -4
- package/dist/es/ar2.js +2 -2
- package/dist/es/cds-aichat-container.js +104 -18
- package/dist/es/cds-aichat-custom-element.js +31 -21
- package/dist/es/cs.js +3 -4
- package/dist/es/cs2.js +2 -2
- package/dist/es/de-at.js +3 -4
- package/dist/es/de-ch.js +3 -4
- package/dist/es/de.js +3 -4
- package/dist/es/de2.js +2 -2
- package/dist/es/en-au.js +3 -4
- package/dist/es/en-ca.js +3 -4
- package/dist/es/en-gb.js +3 -4
- package/dist/es/en-ie.js +3 -4
- package/dist/es/en-il.js +3 -4
- package/dist/es/en-nz.js +3 -4
- package/dist/es/es-do.js +3 -4
- package/dist/es/es-us.js +3 -4
- package/dist/es/es.js +3 -4
- package/dist/es/es2.js +2 -2
- package/dist/es/export.js +3 -3
- package/dist/es/export.legacy.js +3 -3
- package/dist/es/fontUtils.js +2 -2
- package/dist/es/fr-ca.js +3 -4
- package/dist/es/fr-ch.js +3 -4
- package/dist/es/fr.js +3 -4
- package/dist/es/fr2.js +2 -2
- package/dist/es/it-ch.js +3 -4
- package/dist/es/it.js +3 -4
- package/dist/es/it2.js +2 -2
- package/dist/es/ja.js +3 -4
- package/dist/es/ja2.js +2 -2
- package/dist/es/ko.js +3 -4
- package/dist/es/ko2.js +2 -2
- package/dist/es/mockServiceDesk.js +17 -11
- package/dist/es/nl.js +3 -4
- package/dist/es/nl2.js +2 -2
- package/dist/es/pt-br.js +3 -4
- package/dist/es/pt-br2.js +2 -2
- package/dist/es/pt.js +3 -4
- package/dist/es/render.js +25 -12
- package/dist/es/zh-cn.js +3 -4
- package/dist/es/zh-tw.js +3 -4
- package/dist/es/zh-tw2.js +2 -2
- package/dist/es/zh.js +2 -2
- package/dist/types/aiChatEntry.d.ts +599 -11
- package/package.json +29 -21
- package/dist/cjs/Carousel.js +0 -5711
- package/dist/cjs/Chat.js +0 -8838
- package/dist/cjs/GenesysMessengerServiceDesk.js +0 -598
- package/dist/cjs/HumanAgentServiceImpl.js +0 -1145
- package/dist/cjs/NiceDFOServiceDesk.js +0 -2116
- package/dist/cjs/PDFViewerContainer.js +0 -83227
- package/dist/cjs/ReactPlayer.js +0 -57
- package/dist/cjs/SFServiceDesk.js +0 -1031
- package/dist/cjs/ServiceDeskImpl.js +0 -74
- package/dist/cjs/Table.js +0 -3146
- package/dist/cjs/ZendeskServiceDesk.js +0 -670
- package/dist/cjs/_node-resolve_empty.js +0 -27
- package/dist/cjs/agentActions.js +0 -214
- package/dist/cjs/aiChatEntry.js +0 -354
- package/dist/cjs/anonymousUserIDStorage.js +0 -254
- package/dist/cjs/ar-dz.js +0 -57
- package/dist/cjs/ar-kw.js +0 -57
- package/dist/cjs/ar-ly.js +0 -57
- package/dist/cjs/ar-ma.js +0 -57
- package/dist/cjs/ar-sa.js +0 -57
- package/dist/cjs/ar-tn.js +0 -57
- package/dist/cjs/ar.js +0 -57
- package/dist/cjs/ar2.js +0 -763
- package/dist/cjs/cds-aichat-container.js +0 -143
- package/dist/cjs/cds-aichat-custom-element.js +0 -200
- package/dist/cjs/cds-aichat-internal.js +0 -39150
- package/dist/cjs/cs.js +0 -57
- package/dist/cjs/cs2.js +0 -763
- package/dist/cjs/de-at.js +0 -57
- package/dist/cjs/de-ch.js +0 -57
- package/dist/cjs/de.js +0 -57
- package/dist/cjs/de2.js +0 -763
- package/dist/cjs/en-au.js +0 -57
- package/dist/cjs/en-ca.js +0 -57
- package/dist/cjs/en-gb.js +0 -57
- package/dist/cjs/en-ie.js +0 -57
- package/dist/cjs/en-il.js +0 -57
- package/dist/cjs/en-nz.js +0 -57
- package/dist/cjs/es-do.js +0 -57
- package/dist/cjs/es-us.js +0 -57
- package/dist/cjs/es.js +0 -57
- package/dist/cjs/es2.js +0 -763
- package/dist/cjs/export.js +0 -27
- package/dist/cjs/export.legacy.js +0 -27
- package/dist/cjs/fontUtils.js +0 -1038
- package/dist/cjs/fr-ca.js +0 -57
- package/dist/cjs/fr-ch.js +0 -57
- package/dist/cjs/fr.js +0 -57
- package/dist/cjs/fr2.js +0 -763
- package/dist/cjs/highlight_js.js +0 -15325
- package/dist/cjs/it-ch.js +0 -57
- package/dist/cjs/it.js +0 -57
- package/dist/cjs/it2.js +0 -763
- package/dist/cjs/ja.js +0 -57
- package/dist/cjs/ja2.js +0 -763
- package/dist/cjs/jstz.min.js +0 -43
- package/dist/cjs/ko.js +0 -57
- package/dist/cjs/ko2.js +0 -763
- package/dist/cjs/markdown.js +0 -8505
- package/dist/cjs/markdown_attrs.js +0 -805
- package/dist/cjs/mockServiceDesk.js +0 -887
- package/dist/cjs/nl.js +0 -57
- package/dist/cjs/nl2.js +0 -763
- package/dist/cjs/pt-br.js +0 -57
- package/dist/cjs/pt-br2.js +0 -763
- package/dist/cjs/pt.js +0 -57
- package/dist/cjs/render.js +0 -94
- package/dist/cjs/zh-cn.js +0 -57
- package/dist/cjs/zh-tw.js +0 -57
- package/dist/cjs/zh-tw2.js +0 -763
- package/dist/cjs/zh.js +0 -763
- package/dist/es/Chat.js +0 -8836
- package/dist/es/agentActions.js +0 -186
- package/dist/es/anonymousUserIDStorage.js +0 -249
- package/dist/es/highlight_js.js +0 -15320
- package/dist/es/jstz.min.js +0 -41
- package/dist/es/markdown.js +0 -8501
- package/dist/es/markdown_attrs.js +0 -803
|
@@ -13,40 +13,124 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
23
|
+
import { __decorate } from 'tslib';
|
|
24
24
|
import { LitElement, html } from 'lit';
|
|
25
25
|
import { property, state } from 'lit/decorators.js';
|
|
26
|
-
import '
|
|
27
|
-
import 'react
|
|
28
|
-
import '
|
|
29
|
-
import '@carbon/react';
|
|
26
|
+
import { c as carbonElement, r as isEqual, s as consoleWarn, A as AppContainerExport } from './AppContainer.js';
|
|
27
|
+
import React__default from 'react';
|
|
28
|
+
import { createRoot } from 'react-dom/client';
|
|
30
29
|
import 'react-intl';
|
|
30
|
+
import '@carbon/icons-react';
|
|
31
|
+
import 'classnames';
|
|
32
|
+
import '@carbon/react';
|
|
31
33
|
import 'react-redux';
|
|
32
|
-
import '
|
|
33
|
-
import './markdown_attrs.js';
|
|
34
|
+
import 'tabbable';
|
|
34
35
|
import '@carbon/web-components/es/components/button/index.js';
|
|
35
36
|
import '@carbon/web-components/es/components/overflow-menu/index.js';
|
|
36
37
|
import 'lit/directives/unsafe-html.js';
|
|
38
|
+
import 'prop-types';
|
|
37
39
|
import '@carbon/web-components/es/components/slug/index.js';
|
|
38
40
|
import '@carbon/web-components/es/components/popover/defs.js';
|
|
39
41
|
import '@carbon/web-components/es/components/slug/defs.js';
|
|
42
|
+
import '@floating-ui/react';
|
|
43
|
+
import 'react-dom';
|
|
40
44
|
import '@carbon/web-components/es/components/slug/slug-action-button.js';
|
|
41
45
|
import '@carbon/web-components/es/components/slug/slug.js';
|
|
46
|
+
import '@carbon/web-components/es/components/inline-loading/index.js';
|
|
47
|
+
import '@carbon/icon-helpers';
|
|
48
|
+
import '@carbon/icons';
|
|
49
|
+
import 'lit/directives/unsafe-svg.js';
|
|
42
50
|
import '@carbon/web-components/es/components/textarea/index.js';
|
|
43
51
|
import '@carbon/web-components/es/components/icon-button/index.js';
|
|
44
|
-
import 'lit/directives/unsafe-svg.js';
|
|
45
52
|
import '@carbon/web-components/es/components/tag/index.js';
|
|
46
53
|
import '@carbon/web-components/es/components/chat-button/index.js';
|
|
47
54
|
import '@carbon/web-components/es/components/button/button.js';
|
|
48
55
|
import '@carbon/web-components/es/components/layer/index.js';
|
|
49
56
|
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* IBM Confidential
|
|
60
|
+
*
|
|
61
|
+
* (C) Copyright IBM Corp. 2024
|
|
62
|
+
*
|
|
63
|
+
* The source code for this program is not published or otherwise
|
|
64
|
+
* divested of its trade secrets, irrespective of what has been
|
|
65
|
+
* deposited with the U. S. Copyright Office
|
|
66
|
+
*
|
|
67
|
+
* US Government Users Restricted Rights - Use, duplication or
|
|
68
|
+
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
let ChatContainerInternal = class ChatContainerInternal extends LitElement {
|
|
72
|
+
firstUpdated() {
|
|
73
|
+
// Render the React component with any updated properties if necessary
|
|
74
|
+
const style = document.createElement('style');
|
|
75
|
+
style.textContent = `
|
|
76
|
+
:host {
|
|
77
|
+
display: block;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
${this.config?.element ? '' : 'z-index: var(--cds-chat-BASE-z-index);'}
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
this.appendChild(style);
|
|
85
|
+
if (this.config) {
|
|
86
|
+
this.renderReactApp();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
updated(changedProperties) {
|
|
90
|
+
// Render the React component with any updated properties if necessary. isEqual performs a deep check, but for
|
|
91
|
+
// elements only checks the reference.
|
|
92
|
+
if (changedProperties.has('config') && !isEqual(this.config, changedProperties.get('config'))) {
|
|
93
|
+
if (changedProperties.get('config')) {
|
|
94
|
+
consoleWarn('The config object you have passed to AI chat has updated. Tearing down and re-starting the chat.');
|
|
95
|
+
}
|
|
96
|
+
if (this.config) {
|
|
97
|
+
this.renderReactApp();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async renderReactApp() {
|
|
102
|
+
const previousContainer = this.shadowRoot.querySelector('.cds--aichat-react-app');
|
|
103
|
+
previousContainer?.remove();
|
|
104
|
+
const container = document.createElement('div');
|
|
105
|
+
container.classList.add('cds--aichat-react-app');
|
|
106
|
+
this.shadowRoot.appendChild(container);
|
|
107
|
+
// Make sure we only have one root.
|
|
108
|
+
if (this.root) {
|
|
109
|
+
this.root.unmount();
|
|
110
|
+
}
|
|
111
|
+
this.root = createRoot(container);
|
|
112
|
+
this.root.render(React__default.createElement(AppContainerExport, { config: this.config, renderUserDefinedResponse: this.renderUserDefinedResponse, renderWriteableElements: this.renderWriteableElements, onBeforeRender: this.onBeforeRender, onAfterRender: this.onAfterRender, container: container }));
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: Object })
|
|
117
|
+
], ChatContainerInternal.prototype, "config", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property()
|
|
120
|
+
], ChatContainerInternal.prototype, "onBeforeRender", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property()
|
|
123
|
+
], ChatContainerInternal.prototype, "onAfterRender", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property()
|
|
126
|
+
], ChatContainerInternal.prototype, "renderUserDefinedResponse", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ type: Object })
|
|
129
|
+
], ChatContainerInternal.prototype, "renderWriteableElements", void 0);
|
|
130
|
+
ChatContainerInternal = __decorate([
|
|
131
|
+
carbonElement('cds-aichat-internal')
|
|
132
|
+
], ChatContainerInternal);
|
|
133
|
+
|
|
50
134
|
/**
|
|
51
135
|
*
|
|
52
136
|
* IBM Confidential
|
|
@@ -62,7 +146,9 @@ import '@carbon/web-components/es/components/layer/index.js';
|
|
|
62
146
|
*
|
|
63
147
|
*/
|
|
64
148
|
/**
|
|
65
|
-
* cds-aichat-container
|
|
149
|
+
* The cds-aichat-container managing creating slotted elements for user_defined responses and writable elements.
|
|
150
|
+
* It then passes that slotted content into cds-aichat-internal. That component will boot up the full chat application
|
|
151
|
+
* and pass the slotted elements into their slots.
|
|
66
152
|
*/
|
|
67
153
|
let ChatContainer = class ChatContainer extends LitElement {
|
|
68
154
|
constructor() {
|
|
@@ -79,22 +165,22 @@ let ChatContainer = class ChatContainer extends LitElement {
|
|
|
79
165
|
* Adds the slot attribute to the element for the user_defined response type and then injects it into the component by
|
|
80
166
|
* updating this._userDefinedSlotNames;
|
|
81
167
|
*/
|
|
82
|
-
this.
|
|
168
|
+
this.userDefinedHandler = (event) => {
|
|
83
169
|
// This element already has `slot` as an attribute.
|
|
84
170
|
const { slot } = event.data;
|
|
85
171
|
if (!this._userDefinedSlotNames.includes(slot)) {
|
|
86
172
|
this._userDefinedSlotNames = [...this._userDefinedSlotNames, slot];
|
|
87
173
|
}
|
|
88
174
|
};
|
|
89
|
-
this.
|
|
175
|
+
this.onBeforeRenderOverride = async (instance) => {
|
|
90
176
|
this._instance = instance;
|
|
91
|
-
this._instance.on({ type: "userDefinedResponse" /* BusEventType.USER_DEFINED_RESPONSE */, handler: this.
|
|
92
|
-
this._instance.on({ type: "chunk:userDefinedResponse" /* BusEventType.CHUNK_USER_DEFINED_RESPONSE */, handler: this.
|
|
93
|
-
this.
|
|
177
|
+
this._instance.on({ type: "userDefinedResponse" /* BusEventType.USER_DEFINED_RESPONSE */, handler: this.userDefinedHandler });
|
|
178
|
+
this._instance.on({ type: "chunk:userDefinedResponse" /* BusEventType.CHUNK_USER_DEFINED_RESPONSE */, handler: this.userDefinedHandler });
|
|
179
|
+
this.addWriteableElementSlots();
|
|
94
180
|
await this.onBeforeRender?.(instance);
|
|
95
181
|
};
|
|
96
182
|
}
|
|
97
|
-
|
|
183
|
+
addWriteableElementSlots() {
|
|
98
184
|
const writeableElementSlots = [this._instance.customPanels.getPanel().hostElement.getAttribute('slot')];
|
|
99
185
|
Object.keys(this._instance.writeableElements).forEach(writeableElementKey => {
|
|
100
186
|
writeableElementSlots.push(writeableElementKey);
|
|
@@ -108,7 +194,7 @@ let ChatContainer = class ChatContainer extends LitElement {
|
|
|
108
194
|
return html `<cds-aichat-internal
|
|
109
195
|
.config=${this.config}
|
|
110
196
|
.onAfterRender=${this.onAfterRender}
|
|
111
|
-
.onBeforeRender=${this.
|
|
197
|
+
.onBeforeRender=${this.onBeforeRenderOverride}
|
|
112
198
|
>
|
|
113
199
|
${this._writeableElementSlots.map(slot => html `<div slot=${slot}><slot name=${slot}></slot></div>`)}
|
|
114
200
|
${this._userDefinedSlotNames.map(slot => html `<div slot=${slot}><slot name=${slot}></slot></div>`)}
|
|
@@ -13,36 +13,43 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
23
|
+
import { __decorate } from 'tslib';
|
|
24
24
|
import './cds-aichat-container.js';
|
|
25
25
|
import { LitElement, html } from 'lit';
|
|
26
26
|
import { property, state } from 'lit/decorators.js';
|
|
27
|
+
import { c as carbonElement } from './AppContainer.js';
|
|
27
28
|
import 'react';
|
|
28
|
-
import 'react-dom';
|
|
29
|
-
import './highlight_js.js';
|
|
30
|
-
import '@carbon/react';
|
|
29
|
+
import 'react-dom/client';
|
|
31
30
|
import 'react-intl';
|
|
31
|
+
import '@carbon/icons-react';
|
|
32
|
+
import 'classnames';
|
|
33
|
+
import '@carbon/react';
|
|
32
34
|
import 'react-redux';
|
|
33
|
-
import '
|
|
34
|
-
import './markdown_attrs.js';
|
|
35
|
+
import 'tabbable';
|
|
35
36
|
import '@carbon/web-components/es/components/button/index.js';
|
|
36
37
|
import '@carbon/web-components/es/components/overflow-menu/index.js';
|
|
37
38
|
import 'lit/directives/unsafe-html.js';
|
|
39
|
+
import 'prop-types';
|
|
38
40
|
import '@carbon/web-components/es/components/slug/index.js';
|
|
39
41
|
import '@carbon/web-components/es/components/popover/defs.js';
|
|
40
42
|
import '@carbon/web-components/es/components/slug/defs.js';
|
|
43
|
+
import '@floating-ui/react';
|
|
44
|
+
import 'react-dom';
|
|
41
45
|
import '@carbon/web-components/es/components/slug/slug-action-button.js';
|
|
42
46
|
import '@carbon/web-components/es/components/slug/slug.js';
|
|
47
|
+
import '@carbon/web-components/es/components/inline-loading/index.js';
|
|
48
|
+
import '@carbon/icon-helpers';
|
|
49
|
+
import '@carbon/icons';
|
|
50
|
+
import 'lit/directives/unsafe-svg.js';
|
|
43
51
|
import '@carbon/web-components/es/components/textarea/index.js';
|
|
44
52
|
import '@carbon/web-components/es/components/icon-button/index.js';
|
|
45
|
-
import 'lit/directives/unsafe-svg.js';
|
|
46
53
|
import '@carbon/web-components/es/components/tag/index.js';
|
|
47
54
|
import '@carbon/web-components/es/components/chat-button/index.js';
|
|
48
55
|
import '@carbon/web-components/es/components/button/button.js';
|
|
@@ -63,7 +70,10 @@ import '@carbon/web-components/es/components/layer/index.js';
|
|
|
63
70
|
*
|
|
64
71
|
*/
|
|
65
72
|
/**
|
|
66
|
-
* cds-aichat-container
|
|
73
|
+
* cds-aichat-custom-element will is a pass through to cds-aichat-container. It takes any user_defined and writeable element
|
|
74
|
+
* slotted content and forwards it to cds-aichat-container. It also will setup the custom element with a default viewChange
|
|
75
|
+
* pattern (e.g. hiding and showing the custom element when the chat should be open/closed) if a onViewChange property is not
|
|
76
|
+
* defined. Finally, it registers the custom element with cds-aichat-container so a default "floating" element will not be created.
|
|
67
77
|
*/
|
|
68
78
|
let ChatCustomElement = class ChatCustomElement extends LitElement {
|
|
69
79
|
constructor() {
|
|
@@ -96,23 +106,23 @@ let ChatCustomElement = class ChatCustomElement extends LitElement {
|
|
|
96
106
|
* Adds the slot attribute to the element for the user_defined response type and then injects it into the component by
|
|
97
107
|
* updating this._userDefinedSlotNames;
|
|
98
108
|
*/
|
|
99
|
-
this.
|
|
109
|
+
this.userDefinedHandler = (event) => {
|
|
100
110
|
// This element already has `slot` as an attribute.
|
|
101
111
|
const { slot } = event.data;
|
|
102
112
|
if (!this._userDefinedSlotNames.includes(slot)) {
|
|
103
113
|
this._userDefinedSlotNames = [...this._userDefinedSlotNames, slot];
|
|
104
114
|
}
|
|
105
115
|
};
|
|
106
|
-
this.
|
|
116
|
+
this.onBeforeRenderOverride = async (instance) => {
|
|
107
117
|
this._instance = instance;
|
|
108
118
|
this._instance.on({ type: "view:change" /* BusEventType.VIEW_CHANGE */, handler: this.onViewChange || this.defaultViewChangeHandler });
|
|
109
|
-
this._instance.on({ type: "userDefinedResponse" /* BusEventType.USER_DEFINED_RESPONSE */, handler: this.
|
|
110
|
-
this._instance.on({ type: "chunk:userDefinedResponse" /* BusEventType.CHUNK_USER_DEFINED_RESPONSE */, handler: this.
|
|
111
|
-
this.
|
|
119
|
+
this._instance.on({ type: "userDefinedResponse" /* BusEventType.USER_DEFINED_RESPONSE */, handler: this.userDefinedHandler });
|
|
120
|
+
this._instance.on({ type: "chunk:userDefinedResponse" /* BusEventType.CHUNK_USER_DEFINED_RESPONSE */, handler: this.userDefinedHandler });
|
|
121
|
+
this.addWriteableElementSlots();
|
|
112
122
|
await this.onBeforeRender?.(instance);
|
|
113
123
|
};
|
|
114
124
|
}
|
|
115
|
-
|
|
125
|
+
addWriteableElementSlots() {
|
|
116
126
|
const writeableElementSlots = [this._instance.customPanels.getPanel().hostElement.getAttribute('slot')];
|
|
117
127
|
Object.keys(this._instance.writeableElements).forEach(writeableElementKey => {
|
|
118
128
|
writeableElementSlots.push(writeableElementKey);
|
|
@@ -120,14 +130,14 @@ let ChatCustomElement = class ChatCustomElement extends LitElement {
|
|
|
120
130
|
this._writeableElementSlots = writeableElementSlots;
|
|
121
131
|
}
|
|
122
132
|
firstUpdated() {
|
|
123
|
-
this.
|
|
133
|
+
this._configOverride = {
|
|
124
134
|
...this.config,
|
|
125
135
|
element: this,
|
|
126
136
|
};
|
|
127
137
|
}
|
|
128
138
|
updated(changedProperties) {
|
|
129
139
|
if (changedProperties.has('config')) {
|
|
130
|
-
this.
|
|
140
|
+
this._configOverride = {
|
|
131
141
|
...this.config,
|
|
132
142
|
element: this,
|
|
133
143
|
};
|
|
@@ -151,9 +161,9 @@ let ChatCustomElement = class ChatCustomElement extends LitElement {
|
|
|
151
161
|
render() {
|
|
152
162
|
return html `${this.renderStyles()}
|
|
153
163
|
<cds-aichat-container
|
|
154
|
-
.config=${this.
|
|
164
|
+
.config=${this._configOverride}
|
|
155
165
|
.onAfterRender=${this.onAfterRender}
|
|
156
|
-
.onBeforeRender=${this.
|
|
166
|
+
.onBeforeRender=${this.onBeforeRenderOverride}
|
|
157
167
|
>
|
|
158
168
|
${this._writeableElementSlots.map(slot => html `<div slot=${slot}><slot name=${slot}></slot></div>`)}
|
|
159
169
|
${this._userDefinedSlotNames.map(slot => html `<div slot=${slot}><slot name=${slot}></slot></div>`)}
|
|
@@ -174,7 +184,7 @@ __decorate([
|
|
|
174
184
|
], ChatCustomElement.prototype, "onViewChange", void 0);
|
|
175
185
|
__decorate([
|
|
176
186
|
state()
|
|
177
|
-
], ChatCustomElement.prototype, "
|
|
187
|
+
], ChatCustomElement.prototype, "_configOverride", void 0);
|
|
178
188
|
__decorate([
|
|
179
189
|
state()
|
|
180
190
|
], ChatCustomElement.prototype, "_originalStyles", void 0);
|
package/dist/es/cs.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/cs2.js
CHANGED
|
@@ -13,9 +13,9 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
package/dist/es/de-at.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/de-ch.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/de.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/de2.js
CHANGED
|
@@ -13,9 +13,9 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
package/dist/es/en-au.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/en-ca.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/en-gb.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/en-ie.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/en-il.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/en-nz.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/es-do.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/es-us.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/es.js
CHANGED
|
@@ -13,15 +13,14 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { e6 as dayjs_minExports } from './cds-aichat-internal.js';
|
|
23
|
+
import { al as getDefaultExportFromCjs, am as dayjs_minExports, an as commonjsGlobal } from './AppContainer.js';
|
|
25
24
|
|
|
26
25
|
function _mergeNamespaces(n, m) {
|
|
27
26
|
m.forEach(function (e) {
|
package/dist/es/es2.js
CHANGED
|
@@ -13,9 +13,9 @@ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
|
|
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.1.
|
|
16
|
+
@carbon/ai-chat 0.1.7-test-no-cjs
|
|
17
17
|
|
|
18
|
-
Built: Feb
|
|
18
|
+
Built: Feb 26 2025 2:36 pm -05:00
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|