@microsoft/omnichannel-chat-widget 1.7.3 → 1.7.4-main.9d63968
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/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -6
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +24 -1
- package/lib/cjs/index.js +7 -0
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -6
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +24 -1
- package/lib/esm/index.js +1 -0
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +20 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -55,7 +55,7 @@ const createMagicCodeSuccessResponse = signin => {
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
const WebChatContainerStateful = props => {
|
|
58
|
-
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2,
|
|
58
|
+
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _props$webChatContain9, _props$webChatContain10;
|
|
59
59
|
const {
|
|
60
60
|
BasicWebChat
|
|
61
61
|
} = _botframeworkWebchat.Components;
|
|
@@ -171,6 +171,11 @@ const WebChatContainerStateful = props => {
|
|
|
171
171
|
div[class="ac-textBlock"] *,
|
|
172
172
|
div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp6 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp6 === void 0 ? void 0 : _webChatContainerProp6.textWhiteSpace) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.textWhiteSpace}}
|
|
173
173
|
|
|
174
|
+
div[class="ac-input-container"] input.ac-multichoiceInput,
|
|
175
|
+
div[class="ac-input-container"] select.ac-multichoiceInput {
|
|
176
|
+
${webChatContainerProps !== null && webChatContainerProps !== void 0 && (_webChatContainerProp7 = webChatContainerProps.adaptiveCardStyles) !== null && _webChatContainerProp7 !== void 0 && _webChatContainerProp7.choiceInputPadding ? `padding: ${webChatContainerProps.adaptiveCardStyles.choiceInputPadding} !important;` : ""}
|
|
177
|
+
}
|
|
178
|
+
|
|
174
179
|
.ms_lcw_webchat_received_message>div.webchat__stacked-layout>div.webchat__stacked-layout__main>div.webchat__stacked-layout__content>div.webchat__stacked-layout__message-row>[class^=webchat]:not(.webchat__bubble--from-user)>.webchat__bubble__content {
|
|
175
180
|
background-color: ${((_props$webChatContain5 = props.webChatContainerProps) === null || _props$webChatContain5 === void 0 ? void 0 : (_props$webChatContain6 = _props$webChatContain5.webChatStyles) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.bubbleBackground) ?? ((_defaultWebChatContai = _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps.webChatStyles) === null || _defaultWebChatContai === void 0 ? void 0 : _defaultWebChatContai.bubbleBackground)};
|
|
176
181
|
color:${((_props$webChatContain7 = props.webChatContainerProps) === null || _props$webChatContain7 === void 0 ? void 0 : (_props$webChatContain8 = _props$webChatContain7.webChatStyles) === null || _props$webChatContain8 === void 0 ? void 0 : _props$webChatContain8.bubbleTextColor) ?? ((_defaultWebChatContai2 = _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps.webChatStyles) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.bubbleTextColor)};
|
|
@@ -180,16 +185,16 @@ const WebChatContainerStateful = props => {
|
|
|
180
185
|
div[class="ac-textBlock"] a:visited,
|
|
181
186
|
div[class="ac-textBlock"] a:hover,
|
|
182
187
|
div[class="ac-textBlock"] a:active {
|
|
183
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
188
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp8 === void 0 ? void 0 : _webChatContainerProp8.anchorColor) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.anchorColor};
|
|
184
189
|
}
|
|
185
190
|
|
|
186
|
-
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
191
|
+
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp9 === void 0 ? void 0 : _webChatContainerProp9.buttonWhiteSpace) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
|
|
187
192
|
|
|
188
193
|
.ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
|
|
189
194
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03LjI1MDEgNC41MDAxN0gxMC43NDk1QzExLjE2MzcgNC41MDAxNyAxMS40OTk1IDQuODM1OTYgMTEuNDk5NSA1LjI1MDE3QzExLjQ5OTUgNS42Mjk4NiAxMS4yMTczIDUuOTQzNjYgMTAuODUxMyA1Ljk5M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jc4MDQgMy4yMjE1NkwyMC44NjQxIDMuMzIwMTRMMjAuOTE4MyAzLjQxMDI1TDIwLjk1NyAzLjUwMDU3TDIwLjk3NjIgMy41NjQ3NkwyMC45ODk4IDMuNjI4NjJMMjAuOTk5MiAzLjcyMjgyTDIwLjk5OTcgMTAuMjU1NEMyMC45OTk3IDEwLjY2OTYgMjAuNjYzOSAxMS4wMDU0IDIwLjI0OTcgMTEuMDA1NEMxOS44NyAxMS4wMDU0IDE5LjU1NjIgMTAuNzIzMiAxOS41MDY1IDEwLjM1NzFMMTkuNDk5NyAxMC4yNTU0TDE5LjQ5ODkgNS41NjE0N0wxMi4yNzk3IDEyLjc4NDdDMTIuMDEzNCAxMy4wNTEgMTEuNTk2OCAxMy4wNzUzIDExLjMwMzEgMTIuODU3NUwxMS4yMTkgMTIuNzg0OUMxMC45NTI3IDEyLjUxODcgMTAuOTI4NCAxMi4xMDIxIDExLjE0NjIgMTEuODA4NEwxMS4yMTg4IDExLjcyNDNMMTguNDM2OSA0LjUwMTQ2SDEzLjc0ODFDMTMuMzY4NCA0LjUwMTQ2IDEzLjA1NDYgNC4yMTkzMSAxMy4wMDUgMy44NTMyNEwxMi45OTgxIDMuNzUxNDZDMTIuOTk4MSAzLjM3MTc3IDEzLjI4MDMgMy4wNTc5NyAxMy42NDY0IDMuMDA4MzFMMTMuNzQ4MSAzLjAwMTQ2WiIgZmlsbD0iI0ZGRkZGRiIgLz48L3N2Zz4) !important;
|
|
190
195
|
height: .75em;
|
|
191
196
|
margin-left: .25em;
|
|
192
|
-
filter:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
197
|
+
filter:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp10 === void 0 ? void 0 : (_webChatContainerProp11 = _webChatContainerProp10.receivedMessageAnchorStyles) === null || _webChatContainerProp11 === void 0 ? void 0 : _webChatContainerProp11.filter) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.filter)};
|
|
193
198
|
}
|
|
194
199
|
pre {
|
|
195
200
|
white-space: pre-wrap;
|
|
@@ -202,13 +207,13 @@ const WebChatContainerStateful = props => {
|
|
|
202
207
|
.ms_lcw_webchat_received_message a:visited,
|
|
203
208
|
.ms_lcw_webchat_received_message a:hover,
|
|
204
209
|
.ms_lcw_webchat_received_message a:active {
|
|
205
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
210
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp12 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp12 === void 0 ? void 0 : (_webChatContainerProp13 = _webChatContainerProp12.receivedMessageAnchorStyles) === null || _webChatContainerProp13 === void 0 ? void 0 : _webChatContainerProp13.color) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.color)};
|
|
206
211
|
}
|
|
207
212
|
.ms_lcw_webchat_sent_message a:link,
|
|
208
213
|
.ms_lcw_webchat_sent_message a:visited,
|
|
209
214
|
.ms_lcw_webchat_sent_message a:hover,
|
|
210
215
|
.ms_lcw_webchat_sent_message a:active {
|
|
211
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
216
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp14 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp14 === void 0 ? void 0 : (_webChatContainerProp15 = _webChatContainerProp14.sentMessageAnchorStyles) === null || _webChatContainerProp15 === void 0 ? void 0 : _webChatContainerProp15.color) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.color)};
|
|
212
217
|
}
|
|
213
218
|
|
|
214
219
|
.webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
|
|
@@ -6,18 +6,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.DesignerChatSDK = void 0;
|
|
7
7
|
var _DesignerChatAdapter = require("./DesignerChatAdapter");
|
|
8
8
|
var _mockchatsdk = require("./mockchatsdk");
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
12
|
class DesignerChatSDK extends _mockchatsdk.MockChatSDK {
|
|
10
13
|
constructor() {
|
|
11
14
|
super();
|
|
15
|
+
_defineProperty(this, "localeId", this.getLiveChatConfig().ChatWidgetLanguage.msdyn_localeid);
|
|
12
16
|
}
|
|
13
17
|
createChatAdapter() {
|
|
14
18
|
return new _DesignerChatAdapter.DesignerChatAdapter();
|
|
15
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* If the widget is running in designer mode, we mock the initialize response. We don't want
|
|
22
|
+
* any interactions with a real server in when designing LCW widget visually in Modern Admin.
|
|
23
|
+
*
|
|
24
|
+
* - All GUIDs were changed to 00000000-0000-0000-0000-000000000000.
|
|
25
|
+
* - msdyn_callingoptions was changed to disable calling functionality
|
|
26
|
+
*/
|
|
16
27
|
getLiveChatConfig() {
|
|
17
28
|
return {
|
|
18
29
|
LiveWSAndLiveChatEngJoin: {
|
|
30
|
+
msdyn_widgetthemecolor: "19236002",
|
|
31
|
+
// msdyn_callingoptions was changed to disable calling functionality
|
|
32
|
+
msdyn_callingoptions: "192350000",
|
|
33
|
+
msdyn_widgettitle: "Let\u0027s chat",
|
|
34
|
+
msdyn_conversationmode: "192350000",
|
|
35
|
+
msdyn_avatarurl: "https://oc-cdn-ocprod.azureedge.net/livechatwidget/images/chatIcon.svg",
|
|
36
|
+
msdyn_name: "Let's Chat",
|
|
19
37
|
msdyn_postconversationsurveyenable: "false",
|
|
20
|
-
|
|
38
|
+
OutOfOperatingHours: "False",
|
|
39
|
+
ShowWidget: "True"
|
|
40
|
+
},
|
|
41
|
+
ChatWidgetLanguage: {
|
|
42
|
+
msdyn_localeid: "1033",
|
|
43
|
+
msdyn_languagename: "English - United States"
|
|
21
44
|
}
|
|
22
45
|
};
|
|
23
46
|
}
|
package/lib/cjs/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "encodeComponentString", {
|
|
|
33
33
|
return _omnichannelChatComponents.encodeComponentString;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "getMockChatSDKIfApplicable", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _getMockChatSDKIfApplicable.getMockChatSDKIfApplicable;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "getWidgetCacheId", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
@@ -63,4 +69,5 @@ var _useChatSDKStore = _interopRequireDefault(require("./hooks/useChatSDKStore")
|
|
|
63
69
|
var _utils = require("./common/utils");
|
|
64
70
|
var _ConversationState = require("./contexts/common/ConversationState");
|
|
65
71
|
var _LiveChatWidget = _interopRequireDefault(require("./components/livechatwidget/LiveChatWidget"));
|
|
72
|
+
var _getMockChatSDKIfApplicable = require("./components/livechatwidget/common/getMockChatSDKIfApplicable");
|
|
66
73
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -47,7 +47,7 @@ const createMagicCodeSuccessResponse = signin => {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export const WebChatContainerStateful = props => {
|
|
50
|
-
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2,
|
|
50
|
+
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _props$webChatContain9, _props$webChatContain10;
|
|
51
51
|
const {
|
|
52
52
|
BasicWebChat
|
|
53
53
|
} = Components;
|
|
@@ -163,6 +163,11 @@ export const WebChatContainerStateful = props => {
|
|
|
163
163
|
div[class="ac-textBlock"] *,
|
|
164
164
|
div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp6 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp6 === void 0 ? void 0 : _webChatContainerProp6.textWhiteSpace) ?? defaultAdaptiveCardStyles.textWhiteSpace}}
|
|
165
165
|
|
|
166
|
+
div[class="ac-input-container"] input.ac-multichoiceInput,
|
|
167
|
+
div[class="ac-input-container"] select.ac-multichoiceInput {
|
|
168
|
+
${webChatContainerProps !== null && webChatContainerProps !== void 0 && (_webChatContainerProp7 = webChatContainerProps.adaptiveCardStyles) !== null && _webChatContainerProp7 !== void 0 && _webChatContainerProp7.choiceInputPadding ? `padding: ${webChatContainerProps.adaptiveCardStyles.choiceInputPadding} !important;` : ""}
|
|
169
|
+
}
|
|
170
|
+
|
|
166
171
|
.ms_lcw_webchat_received_message>div.webchat__stacked-layout>div.webchat__stacked-layout__main>div.webchat__stacked-layout__content>div.webchat__stacked-layout__message-row>[class^=webchat]:not(.webchat__bubble--from-user)>.webchat__bubble__content {
|
|
167
172
|
background-color: ${((_props$webChatContain5 = props.webChatContainerProps) === null || _props$webChatContain5 === void 0 ? void 0 : (_props$webChatContain6 = _props$webChatContain5.webChatStyles) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.bubbleBackground) ?? ((_defaultWebChatContai = defaultWebChatContainerStatefulProps.webChatStyles) === null || _defaultWebChatContai === void 0 ? void 0 : _defaultWebChatContai.bubbleBackground)};
|
|
168
173
|
color:${((_props$webChatContain7 = props.webChatContainerProps) === null || _props$webChatContain7 === void 0 ? void 0 : (_props$webChatContain8 = _props$webChatContain7.webChatStyles) === null || _props$webChatContain8 === void 0 ? void 0 : _props$webChatContain8.bubbleTextColor) ?? ((_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatStyles) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.bubbleTextColor)};
|
|
@@ -172,16 +177,16 @@ export const WebChatContainerStateful = props => {
|
|
|
172
177
|
div[class="ac-textBlock"] a:visited,
|
|
173
178
|
div[class="ac-textBlock"] a:hover,
|
|
174
179
|
div[class="ac-textBlock"] a:active {
|
|
175
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
180
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp8 === void 0 ? void 0 : _webChatContainerProp8.anchorColor) ?? defaultAdaptiveCardStyles.anchorColor};
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
183
|
+
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp9 === void 0 ? void 0 : _webChatContainerProp9.buttonWhiteSpace) ?? defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
|
|
179
184
|
|
|
180
185
|
.ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
|
|
181
186
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03LjI1MDEgNC41MDAxN0gxMC43NDk1QzExLjE2MzcgNC41MDAxNyAxMS40OTk1IDQuODM1OTYgMTEuNDk5NSA1LjI1MDE3QzExLjQ5OTUgNS42Mjk4NiAxMS4yMTczIDUuOTQzNjYgMTAuODUxMyA1Ljk5MzMyTDEwLjc0OTUgNi4wMDAxN0g3LjI0OTc0QzYuMDcwNzkgNS45OTk2MSA1LjEwMzQ5IDYuOTA2NTYgNS4wMDc4NiA4LjA2MTEyTDUuMDAwMjggOC4yMjAwM0w1LjAwMzEyIDE2Ljc1MDdDNS4wMDM0MyAxNy45NDE1IDUuOTI4ODUgMTguOTE2MSA3LjA5OTY2IDE4Ljk5NDlMNy4yNTM3MSAxOS4wMDAxTDE1Ljc1MTggMTguOTg4NEMxNi45NDE1IDE4Ljk4NjggMTcuOTE0NSAxOC4wNjIgMTcuOTkzNSAxNi44OTIzTDE3Ljk5ODcgMTYuNzM4NFYxMy4yMzIxQzE3Ljk5ODcgMTIuODE3OSAxOC4zMzQ1IDEyLjQ4MjEgMTguNzQ4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jMwMzEgMTIuODU3NUwxMS4yMTkgMTIuNzg0OUMxMC45NTI3IDEyLjUxODcgMTAuOTI4NCAxMi4xMDIxIDExLjE0NjIgMTEuODA4NEwxMS4yMTg4IDExLjcyNDNMMTguNDM2OSA0LjUwMTQ2SDEzLjc0ODFDMTMuMzY4NCA0LjUwMTQ2IDEzLjA1NDYgNC4yMTkzMSAxMy4wMDUgMy44NTMyNEwxMi45OTgxIDMuNzUxNDZDMTIuOTk4MSAzLjM3MTc3IDEzLjI4MDMgMy4wNTc5NyAxMy42NDY0IDMuMDA4MzFMMTMuNzQ4MSAzLjAwMTQ2WiIgZmlsbD0iI0ZGRkZGRiIgLz48L3N2Zz4) !important;
|
|
182
187
|
height: .75em;
|
|
183
188
|
margin-left: .25em;
|
|
184
|
-
filter:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
189
|
+
filter:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp10 === void 0 ? void 0 : (_webChatContainerProp11 = _webChatContainerProp10.receivedMessageAnchorStyles) === null || _webChatContainerProp11 === void 0 ? void 0 : _webChatContainerProp11.filter) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.filter)};
|
|
185
190
|
}
|
|
186
191
|
pre {
|
|
187
192
|
white-space: pre-wrap;
|
|
@@ -194,13 +199,13 @@ export const WebChatContainerStateful = props => {
|
|
|
194
199
|
.ms_lcw_webchat_received_message a:visited,
|
|
195
200
|
.ms_lcw_webchat_received_message a:hover,
|
|
196
201
|
.ms_lcw_webchat_received_message a:active {
|
|
197
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
202
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp12 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp12 === void 0 ? void 0 : (_webChatContainerProp13 = _webChatContainerProp12.receivedMessageAnchorStyles) === null || _webChatContainerProp13 === void 0 ? void 0 : _webChatContainerProp13.color) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)};
|
|
198
203
|
}
|
|
199
204
|
.ms_lcw_webchat_sent_message a:link,
|
|
200
205
|
.ms_lcw_webchat_sent_message a:visited,
|
|
201
206
|
.ms_lcw_webchat_sent_message a:hover,
|
|
202
207
|
.ms_lcw_webchat_sent_message a:active {
|
|
203
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
208
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp14 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp14 === void 0 ? void 0 : (_webChatContainerProp15 = _webChatContainerProp14.sentMessageAnchorStyles) === null || _webChatContainerProp15 === void 0 ? void 0 : _webChatContainerProp15.color) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)};
|
|
204
209
|
}
|
|
205
210
|
|
|
206
211
|
.webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
|
|
@@ -1,17 +1,40 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
4
|
import { DesignerChatAdapter } from "./DesignerChatAdapter";
|
|
2
5
|
import { MockChatSDK } from "./mockchatsdk";
|
|
3
6
|
export class DesignerChatSDK extends MockChatSDK {
|
|
4
7
|
constructor() {
|
|
5
8
|
super();
|
|
9
|
+
_defineProperty(this, "localeId", this.getLiveChatConfig().ChatWidgetLanguage.msdyn_localeid);
|
|
6
10
|
}
|
|
7
11
|
createChatAdapter() {
|
|
8
12
|
return new DesignerChatAdapter();
|
|
9
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* If the widget is running in designer mode, we mock the initialize response. We don't want
|
|
16
|
+
* any interactions with a real server in when designing LCW widget visually in Modern Admin.
|
|
17
|
+
*
|
|
18
|
+
* - All GUIDs were changed to 00000000-0000-0000-0000-000000000000.
|
|
19
|
+
* - msdyn_callingoptions was changed to disable calling functionality
|
|
20
|
+
*/
|
|
10
21
|
getLiveChatConfig() {
|
|
11
22
|
return {
|
|
12
23
|
LiveWSAndLiveChatEngJoin: {
|
|
24
|
+
msdyn_widgetthemecolor: "19236002",
|
|
25
|
+
// msdyn_callingoptions was changed to disable calling functionality
|
|
26
|
+
msdyn_callingoptions: "192350000",
|
|
27
|
+
msdyn_widgettitle: "Let\u0027s chat",
|
|
28
|
+
msdyn_conversationmode: "192350000",
|
|
29
|
+
msdyn_avatarurl: "https://oc-cdn-ocprod.azureedge.net/livechatwidget/images/chatIcon.svg",
|
|
30
|
+
msdyn_name: "Let's Chat",
|
|
13
31
|
msdyn_postconversationsurveyenable: "false",
|
|
14
|
-
|
|
32
|
+
OutOfOperatingHours: "False",
|
|
33
|
+
ShowWidget: "True"
|
|
34
|
+
},
|
|
35
|
+
ChatWidgetLanguage: {
|
|
36
|
+
msdyn_localeid: "1033",
|
|
37
|
+
msdyn_languagename: "English - United States"
|
|
15
38
|
}
|
|
16
39
|
};
|
|
17
40
|
}
|
package/lib/esm/index.js
CHANGED
|
@@ -4,5 +4,6 @@ import useChatSDKStore from "./hooks/useChatSDKStore";
|
|
|
4
4
|
import { getWidgetCacheId, getWidgetEndChatEventName } from "./common/utils";
|
|
5
5
|
import { ConversationState } from "./contexts/common/ConversationState";
|
|
6
6
|
export { default as LiveChatWidget } from "./components/livechatwidget/LiveChatWidget";
|
|
7
|
+
export { getMockChatSDKIfApplicable } from "./components/livechatwidget/common/getMockChatSDKIfApplicable";
|
|
7
8
|
export { encodeComponentString, decodeComponentString, BroadcastService, useChatSDKStore, useChatContextStore };
|
|
8
9
|
export { getWidgetCacheId, getWidgetEndChatEventName, ConversationState };
|
|
@@ -3,10 +3,29 @@ import { MockChatSDK } from "./mockchatsdk";
|
|
|
3
3
|
export declare class DesignerChatSDK extends MockChatSDK {
|
|
4
4
|
constructor();
|
|
5
5
|
createChatAdapter(): DesignerChatAdapter;
|
|
6
|
+
localeId: string;
|
|
7
|
+
/**
|
|
8
|
+
* If the widget is running in designer mode, we mock the initialize response. We don't want
|
|
9
|
+
* any interactions with a real server in when designing LCW widget visually in Modern Admin.
|
|
10
|
+
*
|
|
11
|
+
* - All GUIDs were changed to 00000000-0000-0000-0000-000000000000.
|
|
12
|
+
* - msdyn_callingoptions was changed to disable calling functionality
|
|
13
|
+
*/
|
|
6
14
|
getLiveChatConfig(): {
|
|
7
15
|
LiveWSAndLiveChatEngJoin: {
|
|
8
|
-
|
|
16
|
+
msdyn_widgetthemecolor: string;
|
|
17
|
+
msdyn_callingoptions: string;
|
|
18
|
+
msdyn_widgettitle: string;
|
|
9
19
|
msdyn_conversationmode: string;
|
|
20
|
+
msdyn_avatarurl: string;
|
|
21
|
+
msdyn_name: string;
|
|
22
|
+
msdyn_postconversationsurveyenable: string;
|
|
23
|
+
OutOfOperatingHours: string;
|
|
24
|
+
ShowWidget: string;
|
|
25
|
+
};
|
|
26
|
+
ChatWidgetLanguage: {
|
|
27
|
+
msdyn_localeid: string;
|
|
28
|
+
msdyn_languagename: string;
|
|
10
29
|
};
|
|
11
30
|
};
|
|
12
31
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ import useChatSDKStore from "./hooks/useChatSDKStore";
|
|
|
4
4
|
import { getWidgetCacheId, getWidgetEndChatEventName } from "./common/utils";
|
|
5
5
|
import { ConversationState } from "./contexts/common/ConversationState";
|
|
6
6
|
export { default as LiveChatWidget } from "./components/livechatwidget/LiveChatWidget";
|
|
7
|
+
export { getMockChatSDKIfApplicable } from "./components/livechatwidget/common/getMockChatSDKIfApplicable";
|
|
7
8
|
export { encodeComponentString, decodeComponentString, BroadcastService, useChatSDKStore, useChatContextStore };
|
|
8
9
|
export { getWidgetCacheId, getWidgetEndChatEventName, ConversationState };
|