@copart/ops-tool-kit 1.12.1-alpha.23 → 1.12.1-alpha.25
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/ops-tool-kit.js +127 -32
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -32,7 +32,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
32
32
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
33
33
|
|
|
34
34
|
const name$r = "@copart/ops-tool-kit";
|
|
35
|
-
const version$7 = "1.12.1-alpha.
|
|
35
|
+
const version$7 = "1.12.1-alpha.25";
|
|
36
36
|
const main$1 = "dist/ops-tool-kit.js";
|
|
37
37
|
const style = "dist/ops-tool-kit.css";
|
|
38
38
|
const files = [
|
|
@@ -35811,7 +35811,7 @@ var GoHome = function GoHome(props) {
|
|
|
35811
35811
|
}, props.reason));
|
|
35812
35812
|
};
|
|
35813
35813
|
|
|
35814
|
-
var css_248z$3 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
|
|
35814
|
+
var css_248z$3 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n height: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n /* .mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n } */\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
|
|
35815
35815
|
styleInject(css_248z$3);
|
|
35816
35816
|
|
|
35817
35817
|
var _styleModuleImportMap$2 = {
|
|
@@ -35926,6 +35926,10 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
35926
35926
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
35927
35927
|
chatWindowWidth = _useState30[0],
|
|
35928
35928
|
setChatWindowWidth = _useState30[1];
|
|
35929
|
+
var _useState31 = React.useState(0),
|
|
35930
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
35931
|
+
windowInnerWidthForMobile = _useState32[0],
|
|
35932
|
+
setWindowInnerWidthForMobile = _useState32[1];
|
|
35929
35933
|
var chatWindowHeight = 600; //update this if changed in css
|
|
35930
35934
|
var chatIconSize = 60; //update this if changed in css
|
|
35931
35935
|
|
|
@@ -35942,6 +35946,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
35942
35946
|
if (width <= 350) newWidth = 300;
|
|
35943
35947
|
if (width <= 325) newWidth = 275;
|
|
35944
35948
|
setChatWindowWidth(newWidth);
|
|
35949
|
+
setWindowInnerWidthForMobile(width);
|
|
35945
35950
|
};
|
|
35946
35951
|
updateChatWindowWidth();
|
|
35947
35952
|
window.addEventListener('resize', updateChatWindowWidth);
|
|
@@ -35951,9 +35956,10 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
35951
35956
|
}, []);
|
|
35952
35957
|
React.useEffect(function () {
|
|
35953
35958
|
var updateInitialPosition = function updateInitialPosition() {
|
|
35959
|
+
var bufferForMobile = window.innerWidth <= 575 ? 40 : 0;
|
|
35954
35960
|
setPosition({
|
|
35955
|
-
x: window.innerWidth - chatIconSize,
|
|
35956
|
-
y: window.innerHeight -
|
|
35961
|
+
x: window.innerWidth - chatIconSize + bufferForMobile,
|
|
35962
|
+
y: window.innerHeight - chatIconSize + 30
|
|
35957
35963
|
});
|
|
35958
35964
|
};
|
|
35959
35965
|
updateInitialPosition();
|
|
@@ -35962,42 +35968,68 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
35962
35968
|
return window.removeEventListener('resize', updateInitialPosition);
|
|
35963
35969
|
};
|
|
35964
35970
|
}, []);
|
|
35965
|
-
var
|
|
35971
|
+
var handleStart = function handleStart(e) {
|
|
35972
|
+
var target = e.target;
|
|
35973
|
+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {
|
|
35974
|
+
return;
|
|
35975
|
+
}
|
|
35976
|
+
e.preventDefault();
|
|
35966
35977
|
setIsDragging(true);
|
|
35967
35978
|
setDragged(false);
|
|
35979
|
+
var clientX = e.touches ? e.touches[0].clientX : e.clientX;
|
|
35980
|
+
var clientY = e.touches ? e.touches[0].clientY : e.clientY;
|
|
35968
35981
|
setOffset({
|
|
35969
|
-
x:
|
|
35970
|
-
y:
|
|
35982
|
+
x: clientX - position.x,
|
|
35983
|
+
y: clientY - position.y
|
|
35971
35984
|
});
|
|
35972
35985
|
};
|
|
35973
|
-
var
|
|
35986
|
+
var handleMove = function handleMove(e) {
|
|
35987
|
+
var _e$target;
|
|
35988
|
+
if (e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && _e$target.closest('#chatCloseIcon')) return;
|
|
35974
35989
|
if (isDragging) {
|
|
35975
35990
|
setDragged(true);
|
|
35976
|
-
var
|
|
35977
|
-
var
|
|
35991
|
+
var clientX = e.touches ? e.touches[0].clientX : e.clientX;
|
|
35992
|
+
var clientY = e.touches ? e.touches[0].clientY : e.clientY;
|
|
35993
|
+
var newX = clientX - offset.x;
|
|
35994
|
+
var newY = clientY - offset.y;
|
|
35978
35995
|
|
|
35979
35996
|
// chat icon has to stay within set screen bounds
|
|
35980
|
-
newX = Math.max(chatIconSize + 10, Math.min(newX, window.innerWidth -
|
|
35981
|
-
newY = Math.max(
|
|
35997
|
+
newX = Math.max(chatIconSize + 10, Math.min(newX, window.innerWidth - 20));
|
|
35998
|
+
newY = Math.max(chatIconSize + 20, Math.min(newY, window.innerHeight - chatIconSize + 30));
|
|
35982
35999
|
setPosition({
|
|
35983
36000
|
x: newX,
|
|
35984
36001
|
y: newY
|
|
35985
36002
|
});
|
|
35986
36003
|
}
|
|
35987
36004
|
};
|
|
35988
|
-
var
|
|
36005
|
+
var handleEnd = function handleEnd() {
|
|
35989
36006
|
setIsDragging(false);
|
|
35990
36007
|
setTimeout(function () {
|
|
35991
36008
|
return setDragged(false);
|
|
35992
36009
|
}, 100);
|
|
35993
|
-
adjustChatWindowPosition();
|
|
35994
36010
|
};
|
|
36011
|
+
React.useEffect(function () {
|
|
36012
|
+
if (!isDragging) {
|
|
36013
|
+
adjustChatWindowPosition();
|
|
36014
|
+
if (showChatWindow) {
|
|
36015
|
+
adjustChatIconPosition();
|
|
36016
|
+
}
|
|
36017
|
+
}
|
|
36018
|
+
}, [isDragging, position, showChatWindow]);
|
|
36019
|
+
React.useEffect(function () {
|
|
36020
|
+
var isMobile = window.innerWidth < 575;
|
|
36021
|
+
if (showChatWindow && isMobile && !dragged) {
|
|
36022
|
+
adjustChatWindowPosition();
|
|
36023
|
+
}
|
|
36024
|
+
}, [position, dragged]);
|
|
35995
36025
|
var adjustChatWindowPosition = function adjustChatWindowPosition() {
|
|
36026
|
+
var bufferForMobile = window.innerWidth <= 575 ? 40 : 0;
|
|
36027
|
+
// let chatX = 0 - chatIconSize + bufferForMobile
|
|
35996
36028
|
var chatX = 0 - chatIconSize;
|
|
35997
36029
|
var chatY = -chatWindowHeight - chatIconSize - 10; // Default: Open above
|
|
35998
36030
|
|
|
35999
36031
|
// Adjust horizontally
|
|
36000
|
-
if (position.x + chatWindowWidth > window.innerWidth) {
|
|
36032
|
+
if (position.x + chatWindowWidth > window.innerWidth + bufferForMobile) {
|
|
36001
36033
|
chatX = -chatWindowWidth; // Move left if overflowing right
|
|
36002
36034
|
}
|
|
36003
36035
|
|
|
@@ -36011,17 +36043,53 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
36011
36043
|
y: chatY
|
|
36012
36044
|
});
|
|
36013
36045
|
};
|
|
36046
|
+
var adjustChatIconPosition = function adjustChatIconPosition() {
|
|
36047
|
+
var newX = position.x;
|
|
36048
|
+
var newY = position.y;
|
|
36049
|
+
var isMobile = windowInnerWidthForMobile < 575;
|
|
36050
|
+
var middleX = windowInnerWidthForMobile / 2; // Middle of the screen
|
|
36051
|
+
var closerToLeft = position.x < middleX; // Check if icon is closer to left or right
|
|
36052
|
+
|
|
36053
|
+
// Move chat icon up if chat window is overflowing at the bottom
|
|
36054
|
+
if (position.y < chatWindowHeight && window.innerHeight - position.y < chatWindowHeight) {
|
|
36055
|
+
newY = position.y - (chatWindowHeight - (window.innerHeight - position.y)) - 20;
|
|
36056
|
+
}
|
|
36057
|
+
|
|
36058
|
+
// Move chat icon down if chat window is overflowing at the top
|
|
36059
|
+
else if (position.y > chatWindowHeight && position.y < chatWindowHeight + chatIconSize + 10) {
|
|
36060
|
+
newY = chatWindowHeight + chatIconSize + 20;
|
|
36061
|
+
}
|
|
36062
|
+
|
|
36063
|
+
// In Mobile, move chat icon to the nearest screen edge (left or right)
|
|
36064
|
+
if (isMobile) {
|
|
36065
|
+
newX = closerToLeft ? 70 : windowInnerWidthForMobile - 10;
|
|
36066
|
+
}
|
|
36067
|
+
if (newX !== position.x || newY !== position.y) {
|
|
36068
|
+
setPosition({
|
|
36069
|
+
x: newX,
|
|
36070
|
+
y: newY
|
|
36071
|
+
});
|
|
36072
|
+
}
|
|
36073
|
+
};
|
|
36014
36074
|
React.useEffect(function () {
|
|
36015
36075
|
if (isDragging) {
|
|
36016
|
-
document.addEventListener('mousemove',
|
|
36017
|
-
document.addEventListener('mouseup',
|
|
36076
|
+
document.addEventListener('mousemove', handleMove);
|
|
36077
|
+
document.addEventListener('mouseup', handleEnd);
|
|
36078
|
+
document.addEventListener('touchmove', handleMove, {
|
|
36079
|
+
passive: false
|
|
36080
|
+
});
|
|
36081
|
+
document.addEventListener('touchend', handleEnd);
|
|
36018
36082
|
} else {
|
|
36019
|
-
document.removeEventListener('mousemove',
|
|
36020
|
-
document.removeEventListener('mouseup',
|
|
36083
|
+
document.removeEventListener('mousemove', handleMove);
|
|
36084
|
+
document.removeEventListener('mouseup', handleEnd);
|
|
36085
|
+
document.removeEventListener('touchmove', handleMove);
|
|
36086
|
+
document.removeEventListener('touchend', handleEnd);
|
|
36021
36087
|
}
|
|
36022
36088
|
return function () {
|
|
36023
|
-
document.removeEventListener('mousemove',
|
|
36024
|
-
document.removeEventListener('mouseup',
|
|
36089
|
+
document.removeEventListener('mousemove', handleMove);
|
|
36090
|
+
document.removeEventListener('mouseup', handleEnd);
|
|
36091
|
+
document.removeEventListener('touchmove', handleMove);
|
|
36092
|
+
document.removeEventListener('touchend', handleEnd);
|
|
36025
36093
|
};
|
|
36026
36094
|
}, [isDragging]);
|
|
36027
36095
|
var handleChatIconClick = function handleChatIconClick() {
|
|
@@ -36031,6 +36099,11 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
36031
36099
|
});
|
|
36032
36100
|
}
|
|
36033
36101
|
};
|
|
36102
|
+
React.useEffect(function () {
|
|
36103
|
+
if (showChatWindow) {
|
|
36104
|
+
adjustChatIconPosition();
|
|
36105
|
+
}
|
|
36106
|
+
}, [showChatWindow]);
|
|
36034
36107
|
React.useEffect(function () {
|
|
36035
36108
|
var conversationsFromSession = storage$1.getLocalItem('mihelpAgentConversations');
|
|
36036
36109
|
var conversationsToBeSaved = !isEmpty$2(conversationsFromSession) ? conversationsFromSession : [];
|
|
@@ -36244,8 +36317,9 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
36244
36317
|
var isChrome = /CriOS/i.test(userAgent);
|
|
36245
36318
|
return isIPhone && isChrome;
|
|
36246
36319
|
};
|
|
36247
|
-
|
|
36248
|
-
onMouseDown:
|
|
36320
|
+
var chatbotUI = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
36321
|
+
onMouseDown: handleStart,
|
|
36322
|
+
onTouchStart: handleStart,
|
|
36249
36323
|
style: {
|
|
36250
36324
|
left: "".concat(position.x, "px"),
|
|
36251
36325
|
top: "".concat(position.y, "px"),
|
|
@@ -36267,7 +36341,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
36267
36341
|
}, "MiHelp Bot"), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
36268
36342
|
onClick: function onClick() {
|
|
36269
36343
|
return setShowChatWindow(false);
|
|
36270
|
-
}
|
|
36344
|
+
},
|
|
36345
|
+
id: "chatCloseIcon"
|
|
36271
36346
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
36272
36347
|
name: "xmark",
|
|
36273
36348
|
variant: "light",
|
|
@@ -36425,6 +36500,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
|
|
|
36425
36500
|
fontSize: '22px'
|
|
36426
36501
|
}
|
|
36427
36502
|
})));
|
|
36503
|
+
return ReactDOM__default["default"].createPortal(chatbotUI, document.body);
|
|
36428
36504
|
};
|
|
36429
36505
|
|
|
36430
36506
|
/**
|
|
@@ -47400,15 +47476,19 @@ var AppFrame = function AppFrame(props) {
|
|
|
47400
47476
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
47401
47477
|
chatBotEnabled = _useState4[0],
|
|
47402
47478
|
setChatBotEnabled = _useState4[1];
|
|
47403
|
-
|
|
47404
|
-
var _useState5 = React.useState([]),
|
|
47479
|
+
var _useState5 = React.useState(false),
|
|
47405
47480
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
47406
|
-
|
|
47407
|
-
|
|
47408
|
-
|
|
47481
|
+
isLandscapeInMobile = _useState6[0],
|
|
47482
|
+
setIsLandscapeInMobile = _useState6[1];
|
|
47483
|
+
// const [activeSubmenu, setActiveSubmenu] = useState(null)
|
|
47484
|
+
var _useState7 = React.useState([]),
|
|
47409
47485
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
47410
|
-
|
|
47411
|
-
|
|
47486
|
+
activeSubmenu = _useState8[0],
|
|
47487
|
+
setActiveSubmenu = _useState8[1];
|
|
47488
|
+
var _useState9 = React.useState(null),
|
|
47489
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
47490
|
+
showNavigationCounts = _useState10[0],
|
|
47491
|
+
setShowNavigationCounts = _useState10[1];
|
|
47412
47492
|
var setChatBotEnableStatus = function setChatBotEnableStatus() {
|
|
47413
47493
|
var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
|
|
47414
47494
|
var tileData = findAppData(coreAppConfig.tiles, coreAppConfig.tileOverrides) || {};
|
|
@@ -47445,6 +47525,21 @@ var AppFrame = function AppFrame(props) {
|
|
|
47445
47525
|
var authGuardProps = _objectSpread2(_objectSpread2({}, props), {}, {
|
|
47446
47526
|
setAppBarMounted: setAppBarMounted
|
|
47447
47527
|
});
|
|
47528
|
+
var isMobileLandscape = function isMobileLandscape() {
|
|
47529
|
+
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
47530
|
+
var isMobile = /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
|
47531
|
+
var isLandscape = window.innerWidth > window.innerHeight;
|
|
47532
|
+
return isMobile && isLandscape;
|
|
47533
|
+
};
|
|
47534
|
+
React.useEffect(function () {
|
|
47535
|
+
var handleResize = function handleResize() {
|
|
47536
|
+
setIsLandscapeInMobile(isMobileLandscape());
|
|
47537
|
+
};
|
|
47538
|
+
window.addEventListener("resize", handleResize);
|
|
47539
|
+
return function () {
|
|
47540
|
+
return window.removeEventListener("resize", handleResize);
|
|
47541
|
+
};
|
|
47542
|
+
}, []);
|
|
47448
47543
|
|
|
47449
47544
|
// const showNavigationCounts = props.getCounts && typeof props.getCounts === 'function'
|
|
47450
47545
|
var navigationWidth = activeSubmenu !== null && activeSubmenu !== void 0 && activeSubmenu.length && showNavigationCounts ? '100px' : '50px';
|
|
@@ -47487,7 +47582,7 @@ var AppFrame = function AppFrame(props) {
|
|
|
47487
47582
|
height: '100%',
|
|
47488
47583
|
transition: 'all 0.5s ease-in-out'
|
|
47489
47584
|
}
|
|
47490
|
-
}, props.children), chatBotEnabled && /*#__PURE__*/React__default["default"].createElement(MiHelpAgent, {
|
|
47585
|
+
}, props.children), chatBotEnabled && !isLandscapeInMobile && /*#__PURE__*/React__default["default"].createElement(MiHelpAgent, {
|
|
47491
47586
|
quickReplies: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro = props.mihelpAgentProps) === null || _props$mihelpAgentPro === void 0 ? void 0 : _props$mihelpAgentPro.quickReplies,
|
|
47492
47587
|
collection: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro2 = props.mihelpAgentProps) === null || _props$mihelpAgentPro2 === void 0 ? void 0 : _props$mihelpAgentPro2.collection,
|
|
47493
47588
|
systemPrompt: (props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro3 = props.mihelpAgentProps) === null || _props$mihelpAgentPro3 === void 0 ? void 0 : _props$mihelpAgentPro3.systemPrompt) || defaultSystemPrompt,
|