From e19fd5314bee88e995614b4c175ad44fa5b14e6a Mon Sep 17 00:00:00 2001 From: esme <23175119+esme@users.noreply.github.com> Date: Thu, 12 Oct 2023 19:12:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20HubSpot/?= =?UTF-8?q?calling-extensions-sdk@ede2194a9b9e70a1f99a1ab593e8f0e46c67b1fb?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo-minimal-js.bundle.js | 2 +- demo-react-ts.bundle.js | 2 +- demo-react-ts.bundle.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo-minimal-js.bundle.js b/demo-minimal-js.bundle.js index 0aaef28f..7aea5ef3 100644 --- a/demo-minimal-js.bundle.js +++ b/demo-minimal-js.bundle.js @@ -26,7 +26,7 @@ return /******/ (() => { // webpackBootstrap \******************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"answerCall\": () => (/* binding */ answerCall),\n/* harmony export */ \"completeCall\": () => (/* binding */ completeCall),\n/* harmony export */ \"endCall\": () => (/* binding */ endCall),\n/* harmony export */ \"incomingCall\": () => (/* binding */ incomingCall),\n/* harmony export */ \"initialize\": () => (/* binding */ initialize),\n/* harmony export */ \"logIn\": () => (/* binding */ logIn),\n/* harmony export */ \"logOut\": () => (/* binding */ logOut),\n/* harmony export */ \"outgoingCall\": () => (/* binding */ outgoingCall),\n/* harmony export */ \"resizeWidget\": () => (/* binding */ resizeWidget),\n/* harmony export */ \"sendError\": () => (/* binding */ sendError)\n/* harmony export */ });\n/* harmony import */ var _hubspot_calling_extensions_sdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @hubspot/calling-extensions-sdk */ \"./node_modules/@hubspot/calling-extensions-sdk/index.js\");\n// import CallingExtensions from \"../../src/CallingExtensions\";\n// import { errorType, callEndStatus } from \"../../src/Constants\";\n\nconst { errorType, callEndStatus } = _hubspot_calling_extensions_sdk__WEBPACK_IMPORTED_MODULE_0__.Constants;\n\nconst state = {\n phoneNumber: \"\",\n engagementId: 0,\n};\n\nconst sizeInfo = {\n width: 400,\n height: 600,\n};\n\nconst cti = new _hubspot_calling_extensions_sdk__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n debugMode: true,\n eventHandlers: {\n onReady: () => {\n cti.initialized({\n isLoggedIn: false,\n sizeInfo,\n });\n },\n onDialNumber: (data, rawEvent) => {\n const { phoneNumber } = data;\n state.phoneNumber = phoneNumber;\n },\n onEngagementCreated: (data, rawEvent) => {\n const { engagementId } = data;\n state.engagementId = engagementId;\n },\n onEndCall: () => {\n window.setTimeout(() => {\n cti.callEnded();\n }, 500);\n },\n onVisibilityChanged: (data, rawEvent) => {},\n },\n});\n\n/** Button IDs */\nconst ANSWER_CALL = \"answercall\";\nconst COMPLETE_CALL = \"completecall\";\nconst END_CALL = \"endcall\";\nconst INITIALIZE = \"initialize\";\nconst LOG_IN = \"login\";\nconst LOG_OUT = \"logout\";\nconst OUTGOING_CALL = \"outgoingcall\";\nconst RESIZE_WIDGET = \"resizewidget\";\nconst SEND_ERROR = \"senderror\";\n\nfunction disableButtons(ids) {\n ids.forEach(id => {\n document.querySelector(`#${id}`).setAttribute(\"disabled\", true);\n });\n}\n\nfunction enableButtons(ids) {\n ids.forEach(id => {\n document.querySelector(`#${id}`).removeAttribute(\"disabled\");\n });\n}\n\nfunction initialize() {\n cti.initialized({\n isLoggedIn: false,\n });\n disableButtons([INITIALIZE]);\n enableButtons([LOG_IN, SEND_ERROR, RESIZE_WIDGET]);\n}\n\nfunction logIn() {\n cti.userLoggedIn();\n disableButtons([LOG_IN, INITIALIZE]);\n enableButtons([LOG_OUT, OUTGOING_CALL]);\n}\n\nfunction logOut() {\n cti.userLoggedOut();\n disableButtons([\n LOG_OUT,\n OUTGOING_CALL,\n ANSWER_CALL,\n END_CALL,\n COMPLETE_CALL,\n ]);\n enableButtons([LOG_IN]);\n}\n\nfunction incomingCall() {\n window.setTimeout(() => {\n cti.incomingCall();\n }, 500);\n}\n\nfunction outgoingCall() {\n window.setTimeout(() => {\n cti.outgoingCall({\n createEngagement: \"true\",\n phoneNumber: state.phoneNumber,\n });\n }, 500);\n disableButtons([OUTGOING_CALL]);\n enableButtons([ANSWER_CALL, END_CALL]);\n}\n\nfunction answerCall() {\n cti.callAnswered();\n disableButtons([ANSWER_CALL]);\n}\n\nfunction endCall() {\n cti.callEnded({\n callEndStatus: callEndStatus.INTERNAL_COMPLETED,\n });\n disableButtons([ANSWER_CALL, END_CALL]);\n enableButtons([COMPLETE_CALL, OUTGOING_CALL]);\n}\n\nfunction completeCall() {\n cti.callCompleted({\n engagementId: state.engagementId,\n hideWidget: false,\n });\n disableButtons([COMPLETE_CALL]);\n enableButtons([OUTGOING_CALL]);\n}\n\nfunction sendError() {\n cti.sendError({\n type: errorType.GENERIC,\n message: \"This is an error alert shown in the Hubspot UI\",\n });\n}\n\nfunction resizeWidget() {\n sizeInfo.width += 20;\n sizeInfo.height += 20;\n cti.resizeWidget({\n width: sizeInfo.width,\n height: sizeInfo.height,\n });\n}\n\n\n//# sourceURL=webpack://calling-extensions-sdk-demo-minimal-js/./index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"answerCall\": () => (/* binding */ answerCall),\n/* harmony export */ \"completeCall\": () => (/* binding */ completeCall),\n/* harmony export */ \"endCall\": () => (/* binding */ endCall),\n/* harmony export */ \"incomingCall\": () => (/* binding */ incomingCall),\n/* harmony export */ \"initialize\": () => (/* binding */ initialize),\n/* harmony export */ \"logIn\": () => (/* binding */ logIn),\n/* harmony export */ \"logOut\": () => (/* binding */ logOut),\n/* harmony export */ \"outgoingCall\": () => (/* binding */ outgoingCall),\n/* harmony export */ \"resizeWidget\": () => (/* binding */ resizeWidget),\n/* harmony export */ \"sendError\": () => (/* binding */ sendError)\n/* harmony export */ });\n/* harmony import */ var _hubspot_calling_extensions_sdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @hubspot/calling-extensions-sdk */ \"./node_modules/@hubspot/calling-extensions-sdk/index.js\");\n// import CallingExtensions from \"../../src/CallingExtensions\";\n// import { errorType, callEndStatus } from \"../../src/Constants\";\n\nconst { errorType, callEndStatus } = _hubspot_calling_extensions_sdk__WEBPACK_IMPORTED_MODULE_0__.Constants;\n\nconst state = {\n phoneNumber: \"\",\n engagementId: 0,\n};\n\nconst sizeInfo = {\n width: 400,\n height: 600,\n};\n\nconst cti = new _hubspot_calling_extensions_sdk__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n debugMode: true,\n eventHandlers: {\n onReady: () => {\n cti.initialized({\n isLoggedIn: false,\n sizeInfo,\n });\n },\n onDialNumber: (data, rawEvent) => {\n const { phoneNumber } = data;\n state.phoneNumber = phoneNumber;\n },\n onEngagementCreated: (data, rawEvent) => {\n const { engagementId } = data;\n state.engagementId = engagementId;\n },\n onEndCall: () => {\n window.setTimeout(() => {\n cti.callEnded();\n }, 500);\n },\n onVisibilityChanged: (data, rawEvent) => {},\n onCreateEngagementSucceeded: (data, rawEvent) => {\n const { engagementId } = data;\n state.engagementId = engagementId;\n },\n onCreateEngagementFailed: (data, rawEvent) => {},\n onUpdateEngagementSucceeded: (data, rawEvent) => {\n const { engagementId } = data;\n state.engagementId = engagementId;\n },\n onUpdateEngagementFailed: (data, rawEvent) => {},\n },\n});\n\n/** Button IDs */\nconst ANSWER_CALL = \"answercall\";\nconst COMPLETE_CALL = \"completecall\";\nconst END_CALL = \"endcall\";\nconst INITIALIZE = \"initialize\";\nconst LOG_IN = \"login\";\nconst LOG_OUT = \"logout\";\nconst OUTGOING_CALL = \"outgoingcall\";\nconst RESIZE_WIDGET = \"resizewidget\";\nconst SEND_ERROR = \"senderror\";\n\nfunction disableButtons(ids) {\n ids.forEach(id => {\n document.querySelector(`#${id}`).setAttribute(\"disabled\", true);\n });\n}\n\nfunction enableButtons(ids) {\n ids.forEach(id => {\n document.querySelector(`#${id}`).removeAttribute(\"disabled\");\n });\n}\n\nfunction initialize() {\n cti.initialized({\n isLoggedIn: false,\n });\n disableButtons([INITIALIZE]);\n enableButtons([LOG_IN, SEND_ERROR, RESIZE_WIDGET]);\n}\n\nfunction logIn() {\n cti.userLoggedIn();\n disableButtons([LOG_IN, INITIALIZE]);\n enableButtons([LOG_OUT, OUTGOING_CALL]);\n}\n\nfunction logOut() {\n cti.userLoggedOut();\n disableButtons([\n LOG_OUT,\n OUTGOING_CALL,\n ANSWER_CALL,\n END_CALL,\n COMPLETE_CALL,\n ]);\n enableButtons([LOG_IN]);\n}\n\nfunction incomingCall() {\n window.setTimeout(() => {\n cti.incomingCall();\n }, 500);\n}\n\nfunction outgoingCall() {\n window.setTimeout(() => {\n cti.outgoingCall({\n createEngagement: \"true\",\n phoneNumber: state.phoneNumber,\n });\n }, 500);\n disableButtons([OUTGOING_CALL]);\n enableButtons([ANSWER_CALL, END_CALL]);\n}\n\nfunction answerCall() {\n cti.callAnswered();\n disableButtons([ANSWER_CALL]);\n}\n\nfunction endCall() {\n cti.callEnded({\n callEndStatus: callEndStatus.INTERNAL_COMPLETED,\n });\n disableButtons([ANSWER_CALL, END_CALL]);\n enableButtons([COMPLETE_CALL, OUTGOING_CALL]);\n}\n\nfunction completeCall() {\n cti.callCompleted({\n engagementId: state.engagementId,\n hideWidget: false,\n engagementProperties: {\n hs_call_title: \"Demo call\",\n hs_call_body: \"Resolved issue\",\n },\n });\n disableButtons([COMPLETE_CALL]);\n enableButtons([OUTGOING_CALL]);\n}\n\nfunction sendError() {\n cti.sendError({\n type: errorType.GENERIC,\n message: \"This is an error alert shown in the Hubspot UI\",\n });\n}\n\nfunction resizeWidget() {\n sizeInfo.width += 20;\n sizeInfo.height += 20;\n cti.resizeWidget({\n width: sizeInfo.width,\n height: sizeInfo.height,\n });\n}\n\n\n//# sourceURL=webpack://calling-extensions-sdk-demo-minimal-js/./index.js?"); /***/ }), diff --git a/demo-react-ts.bundle.js b/demo-react-ts.bundle.js index dbe00641..d43c32fb 100644 --- a/demo-react-ts.bundle.js +++ b/demo-react-ts.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see demo-react-ts.bundle.js.LICENSE.txt */ -(()=>{var e={679:(e,t,n)=>{"use strict";var r=n(864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},l={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function u(e){return r.isMemo(e)?l:i[e.$$typeof]||a}i[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[r.Memo]=l;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var l=c(n);f&&(l=l.concat(f(n)));for(var i=u(t),h=u(n),g=0;g{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,l){if(l!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},448:(e,t,n)=>{"use strict";var r=n(294),a=n(840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n