deep-chat-dev 9.0.18 → 9.0.19
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/deepChat.js
CHANGED
@@ -6911,6 +6911,16 @@ var HTMLDeepChatElements = /*#__PURE__*/function () {
|
|
6911
6911
|
_classCallCheck(this, HTMLDeepChatElements);
|
6912
6912
|
}
|
6913
6913
|
_createClass(HTMLDeepChatElements, null, [{
|
6914
|
+
key: "applySuggestionEvent",
|
6915
|
+
value: function applySuggestionEvent(e, t) {
|
6916
|
+
setTimeout(function () {
|
6917
|
+
t.addEventListener("click", function () {
|
6918
|
+
var n, s;
|
6919
|
+
(s = e.submitUserMessage) == null || s.call(e, ((n = t.textContent) == null ? void 0 : n.trim()) || "");
|
6920
|
+
});
|
6921
|
+
});
|
6922
|
+
}
|
6923
|
+
}, {
|
6914
6924
|
key: "isElementTemporary",
|
6915
6925
|
value: function isElementTemporary(e) {
|
6916
6926
|
return e ? e.bubbleElement.children[0].classList.contains(DEEP_CHAT_TEMPORARY_MESSAGE) : !1;
|
@@ -6922,23 +6932,13 @@ var HTMLDeepChatElements = /*#__PURE__*/function () {
|
|
6922
6932
|
return e.classList.contains(t);
|
6923
6933
|
});
|
6924
6934
|
}
|
6925
|
-
}, {
|
6926
|
-
key: "applyCustomSuggestionEvent",
|
6927
|
-
value: function applyCustomSuggestionEvent(e, t) {
|
6928
|
-
setTimeout(function () {
|
6929
|
-
t.addEventListener("click", function () {
|
6930
|
-
var n, s;
|
6931
|
-
(s = e.submitUserMessage) == null || s.call(e, ((n = t.textContent) == null ? void 0 : n.trim()) || "");
|
6932
|
-
});
|
6933
|
-
});
|
6934
|
-
}
|
6935
6935
|
}, {
|
6936
6936
|
key: "applyEvents",
|
6937
|
-
value: function applyEvents(e, t
|
6938
|
-
var
|
6939
|
-
Object.keys(
|
6940
|
-
|
6941
|
-
})
|
6937
|
+
value: function applyEvents(e, t) {
|
6938
|
+
var n = DEEP_CHAT_ELEMENTS[t].events;
|
6939
|
+
Object.keys(n || []).forEach(function (s) {
|
6940
|
+
e.addEventListener(s, n == null ? void 0 : n[s]);
|
6941
|
+
});
|
6942
6942
|
}
|
6943
6943
|
}, {
|
6944
6944
|
key: "getProcessedStyles",
|
@@ -6956,13 +6956,17 @@ var HTMLDeepChatElements = /*#__PURE__*/function () {
|
|
6956
6956
|
}, {
|
6957
6957
|
key: "applyDeepChatUtilities",
|
6958
6958
|
value: function applyDeepChatUtilities(e, t, n) {
|
6959
|
-
DEEP_CHAT_ELEMENT_CLASSES.forEach(function (
|
6960
|
-
var
|
6961
|
-
Array.from(
|
6962
|
-
var
|
6963
|
-
HTMLMessageUtils.applyStylesToElement(
|
6959
|
+
DEEP_CHAT_ELEMENT_CLASSES.forEach(function (o) {
|
6960
|
+
var a = n.getElementsByClassName(o);
|
6961
|
+
Array.from(a || []).forEach(function (l) {
|
6962
|
+
var c = HTMLDeepChatElements.getProcessedStyles(t, l, o);
|
6963
|
+
HTMLMessageUtils.applyStylesToElement(l, c), HTMLDeepChatElements.applyEvents(l, o);
|
6964
6964
|
});
|
6965
6965
|
});
|
6966
|
+
var s = n.getElementsByClassName(DEEP_CHAT_SUGGESTION_BUTTON);
|
6967
|
+
Array.from(s).forEach(function (o) {
|
6968
|
+
return HTMLDeepChatElements.applySuggestionEvent(e, o);
|
6969
|
+
});
|
6966
6970
|
}
|
6967
6971
|
}]);
|
6968
6972
|
return HTMLDeepChatElements;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { HTMLClassUtilities } from '../../../../types/html';
|
2
2
|
import { MessageElements, Messages } from '../messages';
|
3
3
|
export declare class HTMLDeepChatElements {
|
4
|
+
private static applySuggestionEvent;
|
4
5
|
static isElementTemporary(messageElements?: MessageElements): boolean;
|
5
6
|
static doesElementContainDeepChatClass(element: HTMLElement): string | undefined;
|
6
|
-
private static applyCustomSuggestionEvent;
|
7
7
|
private static applyEvents;
|
8
8
|
private static getProcessedStyles;
|
9
9
|
static applyDeepChatUtilities(messages: Messages, utilities: HTMLClassUtilities, element: HTMLElement): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"htmlDeepChatElements.d.ts","sourceRoot":"","sources":["../../../../../../src/views/chat/messages/html/htmlDeepChatElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AA8BtD,qBAAa,oBAAoB;
|
1
|
+
{"version":3,"file":"htmlDeepChatElements.d.ts","sourceRoot":"","sources":["../../../../../../src/views/chat/messages/html/htmlDeepChatElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AA8BtD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,oBAAoB;WASrB,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe;WAKpD,+BAA+B,CAAC,OAAO,EAAE,WAAW;IAIlE,OAAO,CAAC,MAAM,CAAC,WAAW;IAO1B,OAAO,CAAC,MAAM,CAAC,kBAAkB;WAcnB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;CAY7G"}
|