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