Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-live-chat-loader

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-live-chat-loader - npm Package Compare versions

Comparing version 2.0.5 to 2.1.0

dist/components/Drift/index.js

46

dist/components/HelpScout/index.js
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -26,16 +26,12 @@ Object.defineProperty(exports, "__esModule", {

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -121,7 +117,7 @@

case 'message':
return /*#__PURE__*/_react["default"].createElement("svg", {
return _react["default"].createElement("svg", {
width: "24",
height: "22",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
d: "M20.347 20.871l-.003-.05c0 .017.001.034.003.05zm-.243-4.278a2 2 0 0 1 .513-1.455c1.11-1.226 1.383-2.212 1.383-4.74C22 5.782 18.046 2 13.125 2h-2.25C5.954 2 2 5.78 2 10.399c0 4.675 4.01 8.626 8.875 8.626h2.25c.834 0 1.606-.207 3.212-.798a2 2 0 0 1 1.575.083l2.355 1.161-.163-2.878zM10.875 0h2.25C19.13 0 24 4.656 24 10.399c0 2.6-.25 4.257-1.9 6.08l.243 4.279c.072.845-.807 1.471-1.633 1.162l-3.682-1.816c-1.212.446-2.527.921-3.903.921h-2.25C4.869 21.025 0 16.142 0 10.4 0 4.656 4.869 0 10.875 0z",

@@ -132,7 +128,7 @@ fill: "#FFF"

case 'antenna':
return /*#__PURE__*/_react["default"].createElement("svg", {
return _react["default"].createElement("svg", {
width: "28",
height: "26",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
d: "M14.002 12a3.01 3.01 0 0 0-3.015 3c0 1.654 1.353 3 3.015 3a3.01 3.01 0 0 0 3.014-3c0-1.654-1.353-3-3.014-3m-1.005 7.9c-2.29-.465-4.019-2.485-4.019-4.9 0-2.757 2.254-5 5.024-5s5.023 2.243 5.023 5c0 2.415-1.729 4.435-4.019 4.9V25c0 .552-.45 1-1.004 1a1.003 1.003 0 0 1-1.005-1v-5.1zm9.36-7.345c-.393 0-.768-.232-.928-.617A8.019 8.019 0 0 0 14.001 7a8.018 8.018 0 0 0-7.426 4.936c-.213.51-.8.753-1.314.54a1 1 0 0 1-.543-1.307A10.024 10.024 0 0 1 14 5c4.078 0 7.722 2.422 9.284 6.17a.998.998 0 0 1-.927 1.385M1.005 10.637a1.005 1.005 0 0 1-.928-1.384C2.422 3.632 7.887 0 14.001 0c6.111 0 11.576 3.629 13.922 9.246a.998.998 0 0 1-.542 1.307 1.006 1.006 0 0 1-1.313-.54C24.033 5.146 19.298 2 14.001 2 8.703 2 3.965 5.148 1.933 10.02c-.16.385-.535.617-.928.617",

@@ -144,7 +140,7 @@ fill: "#FFF",

case 'search':
return /*#__PURE__*/_react["default"].createElement("svg", {
return _react["default"].createElement("svg", {
width: "23",
height: "24",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
d: "M15.79 15.46C17.184 13.982 18 12.07 18 10a8 8 0 1 0-8 8c1.676 0 3.24-.544 4.578-1.488l.659-.465.554-.588zm6.41 6.326a.999.999 0 0 1-.002 1.412.999.999 0 0 1-1.412.002l-5.095-5.094C14.064 19.256 12.142 19.997 10 20c-5.515.008-10.008-4.485-10-10C.008 4.485 4.485.008 10 0c5.515-.008 10.008 4.485 10 10-.004 2.652-1.105 5-2.794 6.791l4.994 4.995zM14 9c0-1.654-1.346-3-3-3a1 1 0 0 1 0-2c2.757 0 5 2.243 5 5a1 1 0 0 1-2 0z",

@@ -155,7 +151,7 @@ fill: "#FFF"

case 'question':
return /*#__PURE__*/_react["default"].createElement("svg", {
return _react["default"].createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "52",
height: "52"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
id: "a",

@@ -168,7 +164,7 @@ d: "M27.031 32h-2.488v-2.046c0-.635.077-1.21.232-1.72.154-.513.366-.972.639-1.381.272-.41.58-.779.923-1.109.345-.328.694-.652 1.049-.97l.995-.854a6.432 6.432 0 0 0 1.475-1.568c.39-.59.585-1.329.585-2.216 0-.635-.117-1.203-.355-1.703a3.7 3.7 0 0 0-.96-1.263 4.305 4.305 0 0 0-1.401-.783A5.324 5.324 0 0 0 26 16.114c-1.28 0-2.316.375-3.11 1.124-.795.75-1.286 1.705-1.475 2.865L19 19.693c.356-1.772 1.166-3.165 2.434-4.176C22.701 14.507 24.26 14 26.107 14c.947 0 1.842.131 2.682.392.84.262 1.57.648 2.185 1.16a5.652 5.652 0 0 1 1.475 1.892c.368.75.551 1.602.551 2.556 0 .728-.083 1.364-.248 1.909a5.315 5.315 0 0 1-.693 1.467 6.276 6.276 0 0 1-1.048 1.176c-.403.351-.83.71-1.28 1.073-.498.387-.918.738-1.26 1.057a4.698 4.698 0 0 0-.836 1.006 3.847 3.847 0 0 0-.462 1.176c-.095.432-.142.955-.142 1.568V32zM26 37a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z",

case 'beacon':
return /*#__PURE__*/_react["default"].createElement("svg", {
return _react["default"].createElement("svg", {
width: "30",
height: "30",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
d: "M26.244 21.523l-4.356-4.355a7.192 7.192 0 0 0 0-4.345l4.356-4.355a12.98 12.98 0 0 1 0 13.055zm-.4 3.215l-1.1 1.1a.557.557 0 0 1-.786 0l-4.884-4.884a7.27 7.27 0 0 0 1.885-1.886l4.885 4.885a.55.55 0 0 1 0 .785zM8.471 26.236l4.355-4.354a7.197 7.197 0 0 0 4.347 0l4.355 4.354a12.983 12.983 0 0 1-13.057 0zm-2.43-.398a.556.556 0 0 1-.786 0l-1.1-1.1a.556.556 0 0 1 0-.786l4.884-4.884a7.275 7.275 0 0 0 1.887 1.886L6.04 25.838zm-2.285-4.315a12.98 12.98 0 0 1 0-13.055l4.355 4.354a7.192 7.192 0 0 0 0 4.347l-4.355 4.354zm.399-16.27l1.1-1.1a.554.554 0 0 1 .785 0l4.886 4.884a7.27 7.27 0 0 0-1.887 1.885L4.155 6.039a.556.556 0 0 1 0-.786zm17.373-1.5l-4.355 4.355a7.229 7.229 0 0 0-4.347 0L8.471 3.754a12.99 12.99 0 0 1 13.057 0zm-1.305 11.242A5.228 5.228 0 0 1 15 20.217a5.228 5.228 0 0 1-5.224-5.222A5.228 5.228 0 0 1 15 9.773a5.23 5.23 0 0 1 5.223 5.222zm3.735-10.842a.556.556 0 0 1 .786 0l1.1 1.1a.553.553 0 0 1 0 .786l-4.884 4.883a7.302 7.302 0 0 0-1.886-1.885l4.884-4.884zm3.688 2.786c.23-.39.362-.83.362-1.293 0-.683-.266-1.325-.75-1.807l-1.098-1.1a2.555 2.555 0 0 0-3.101-.387 14.985 14.985 0 0 0-16.125.004c-.973-.548-2.284-.426-3.093.383l-1.101 1.1a2.533 2.533 0 0 0-.387 3.1 14.97 14.97 0 0 0 0 16.114 2.553 2.553 0 0 0 .387 3.099l1.1 1.1A2.549 2.549 0 0 0 5.649 28a2.55 2.55 0 0 0 1.293-.361A14.961 14.961 0 0 0 15 30.002a14.97 14.97 0 0 0 8.059-2.363c.398.234.844.36 1.292.36.655 0 1.31-.25 1.809-.747l1.099-1.1a2.531 2.531 0 0 0 .387-3.1 14.963 14.963 0 0 0 0-16.113z",

@@ -181,7 +177,7 @@ fill: "#FFF",

default:
return /*#__PURE__*/_react["default"].createElement("svg", {
return _react["default"].createElement("svg", {
width: 14,
height: 14,
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
d: "M13.707.293a.999.999 0 0 0-1.414 0L7 5.586 1.707.293A.999.999 0 1 0 .293 1.707L5.586 7 .293 12.293a.999.999 0 1 0 1.414 1.414L7 8.414l5.293 5.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L8.414 7l5.293-5.293a.999.999 0 0 0 0-1.414",

@@ -225,7 +221,7 @@ fill: "#FFF",

if (state === _states["default"].COMPLETE) return null;
return /*#__PURE__*/_react["default"].createElement("div", {
return _react["default"].createElement("div", {
style: _objectSpread({}, styles.wrapper, {}, positionStyles, {
zIndex: zIndex
})
}, /*#__PURE__*/_react["default"].createElement("button", {
}, _react["default"].createElement("button", {
onClick: function onClick() {

@@ -244,7 +240,7 @@ return loadChat({

})
}, /*#__PURE__*/_react["default"].createElement("span", {
}, _react["default"].createElement("span", {
style: _objectSpread({}, styles.icon, {
transform: state === _states["default"].INITIAL ? 'rotate(0deg) scale(1)' : 'rotate(30deg) scale(0)'
})
}, getIcon(icon)), /*#__PURE__*/_react["default"].createElement("span", {
}, getIcon(icon)), _react["default"].createElement("span", {
style: _objectSpread({}, styles.close, {

@@ -251,0 +247,0 @@ opacity: state === _states["default"].INITIAL ? 0 : 1,

@@ -18,16 +18,12 @@ "use strict";

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -126,9 +122,9 @@

if (state === _states["default"].COMPLETE) return null;
return /*#__PURE__*/_react["default"].createElement("div", {
return _react["default"].createElement("div", {
style: _objectSpread({}, styles.wrapper, {
background: color
})
}, /*#__PURE__*/_react["default"].createElement("div", {
}, _react["default"].createElement("div", {
styles: styles.region
}, /*#__PURE__*/_react["default"].createElement("div", {
}, _react["default"].createElement("div", {
onClick: function onClick() {

@@ -145,7 +141,7 @@ return loadChat({

style: styles.launcher
}, /*#__PURE__*/_react["default"].createElement("div", {
}, _react["default"].createElement("div", {
style: _objectSpread({}, styles.logo, {
opacity: state === _states["default"].INITIAL ? 1 : 0
})
}, /*#__PURE__*/_react["default"].createElement("svg", {
}, _react["default"].createElement("svg", {
height: "32px",

@@ -156,6 +152,6 @@ width: "28px",

viewBox: "0 0 28 32"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
fill: "rgb(255, 255, 255)",
d: "M28,32 C28,32 23.2863266,30.1450667 19.4727818,28.6592 L3.43749107,28.6592 C1.53921989,28.6592 0,27.0272 0,25.0144 L0,3.6448 C0,1.632 1.53921989,0 3.43749107,0 L24.5615088,0 C26.45978,0 27.9989999,1.632 27.9989999,3.6448 L27.9989999,22.0490667 L28,22.0490667 L28,32 Z M23.8614088,20.0181333 C23.5309223,19.6105242 22.9540812,19.5633836 22.5692242,19.9125333 C22.5392199,19.9392 19.5537934,22.5941333 13.9989999,22.5941333 C8.51321617,22.5941333 5.48178311,19.9584 5.4277754,19.9104 C5.04295119,19.5629428 4.46760991,19.6105095 4.13759108,20.0170667 C3.97913051,20.2124916 3.9004494,20.4673395 3.91904357,20.7249415 C3.93763774,20.9825435 4.05196575,21.2215447 4.23660523,21.3888 C4.37862552,21.5168 7.77411059,24.5386667 13.9989999,24.5386667 C20.2248893,24.5386667 23.6203743,21.5168 23.7623946,21.3888 C23.9467342,21.2215726 24.0608642,20.9827905 24.0794539,20.7254507 C24.0980436,20.4681109 24.0195551,20.2135019 23.8614088,20.0181333 Z"
}))), /*#__PURE__*/_react["default"].createElement("div", {
}))), _react["default"].createElement("div", {
style: _objectSpread({}, styles.close, {

@@ -165,3 +161,3 @@ opacity: state === _states["default"].INITIAL ? 0 : 1,

})
}, /*#__PURE__*/_react["default"].createElement("svg", {
}, _react["default"].createElement("svg", {
height: "14px",

@@ -171,3 +167,3 @@ width: "14px",

"aria-hidden": "true"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
fill: "rgb(255, 255, 255)",

@@ -174,0 +170,0 @@ d: "M13.978 12.637l-1.341 1.341L6.989 8.33l-5.648 5.648L0 12.637l5.648-5.648L0 1.341 1.341 0l5.648 5.648L12.637 0l1.341 1.341L8.33 6.989l5.648 5.648z",

"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -28,12 +28,8 @@ Object.defineProperty(exports, "__esModule", {

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -71,3 +67,3 @@

greetingDialogDelay = _ref.greetingDialogDelay;
return /*#__PURE__*/_react["default"].createElement("div", {
return _react["default"].createElement("div", {
className: "fb-customerchat",

@@ -94,3 +90,3 @@ page_id: providerKey,

if (state === _states["default"].COMPLETE) return null;
return /*#__PURE__*/_react["default"].createElement("div", {
return _react["default"].createElement("div", {
style: styles.button,

@@ -107,7 +103,7 @@ onClick: function onClick() {

}
}, /*#__PURE__*/_react["default"].createElement("svg", {
}, _react["default"].createElement("svg", {
width: "60px",
height: "60px",
viewBox: "0 0 60 60"
}, /*#__PURE__*/_react["default"].createElement("svg", {
}, _react["default"].createElement("svg", {
x: "0",

@@ -117,3 +113,3 @@ y: "0",

height: "60px"
}, /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("linearGradient", {
}, _react["default"].createElement("defs", null, _react["default"].createElement("linearGradient", {
x1: "50%",

@@ -124,9 +120,9 @@ y1: "0%",

id: "linearGradient-1"
}, /*#__PURE__*/_react["default"].createElement("stop", {
}, _react["default"].createElement("stop", {
stopColor: "#00B2FF",
offset: "0%"
}), /*#__PURE__*/_react["default"].createElement("stop", {
}), _react["default"].createElement("stop", {
stopColor: "#006AFF",
offset: "100%"
}))), /*#__PURE__*/_react["default"].createElement("g", {
}))), _react["default"].createElement("g", {
stroke: "none",

@@ -136,3 +132,3 @@ strokeWidth: "1",

fillRule: "evenodd"
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("circle", {
}, _react["default"].createElement("g", null, _react["default"].createElement("circle", {
fill: color ? color : '#FFFFFF',

@@ -142,6 +138,6 @@ cx: "30",

r: "30"
}), /*#__PURE__*/_react["default"].createElement("svg", {
}), _react["default"].createElement("svg", {
x: "10",
y: "10"
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("rect", {
}, _react["default"].createElement("g", null, _react["default"].createElement("rect", {
id: "container",

@@ -152,9 +148,9 @@ x: "0",

height: "40"
}), /*#__PURE__*/_react["default"].createElement("g", {
}), _react["default"].createElement("g", {
id: "logo"
}, /*#__PURE__*/_react["default"].createElement("path", {
}, _react["default"].createElement("path", {
d: "M20,0 C8.7334,0 0,8.2528 0,19.4 C0,25.2307 2.3896,30.2691 6.2811,33.7492 C6.6078,34.0414 6.805,34.4513 6.8184,34.8894 L6.9273,38.4474 C6.9621,39.5819 8.1343,40.3205 9.1727,39.8621 L13.1424,38.1098 C13.4789,37.9612 13.856,37.9335 14.2106,38.0311 C16.0348,38.5327 17.9763,38.8 20,38.8 C31.2666,38.8 40,30.5472 40,19.4 C40,8.2528 31.2666,0 20,0",
id: "bubble",
fill: color ? '#FFFFFF' : 'url(#linearGradient-1)'
}), /*#__PURE__*/_react["default"].createElement("path", {
}), _react["default"].createElement("path", {
d: "M7.99009,25.07344 L13.86509,15.75264 C14.79959,14.26984 16.80079,13.90064 18.20299,14.95224 L22.87569,18.45674 C23.30439,18.77834 23.89429,18.77664 24.32119,18.45264 L30.63189,13.66324 C31.47419,13.02404 32.57369,14.03204 32.00999,14.92654 L26.13499,24.24744 C25.20039,25.73014 23.19919,26.09944 21.79709,25.04774 L17.12429,21.54314 C16.69559,21.22164 16.10569,21.22334 15.67879,21.54734 L9.36809,26.33674 C8.52579,26.97594 7.42629,25.96794 7.99009,25.07344",

@@ -173,6 +169,6 @@ id: "bolt",

return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(CustomerChat, _extends({
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(CustomerChat, _extends({
color: color,
providerKey: providerKey
}, props)), /*#__PURE__*/_react["default"].createElement(Widget, {
}, props)), _react["default"].createElement(Widget, {
color: color

@@ -179,0 +175,0 @@ }));

@@ -20,3 +20,3 @@ "use strict";

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

@@ -108,5 +108,2 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

}, options));
setTimeout(function () {
return setState(_states["default"].COMPLETE);
}, 2000);
}

@@ -113,0 +110,0 @@

@@ -10,12 +10,8 @@ "use strict";

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -22,0 +18,0 @@

"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -20,2 +20,8 @@ Object.defineProperty(exports, "__esModule", {

});
Object.defineProperty(exports, "Drift", {
enumerable: true,
get: function get() {
return _Drift["default"];
}
});
Object.defineProperty(exports, "HelpScout", {

@@ -51,2 +57,4 @@ enumerable: true,

var _Drift = _interopRequireDefault(require("./components/Drift"));
var _HelpScout = _interopRequireDefault(require("./components/HelpScout"));

@@ -66,16 +74,12 @@

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -114,5 +118,5 @@

return /*#__PURE__*/_react["default"].createElement(LiveChatLoaderContext.Provider, {
return _react["default"].createElement(LiveChatLoaderContext.Provider, {
value: value
}, /*#__PURE__*/_react["default"].createElement("link", {
}, _react["default"].createElement("link", {
href: chatProvider.domain,

@@ -119,0 +123,0 @@ rel: "preconnect",

@@ -7,2 +7,7 @@ "use strict";

exports["default"] = void 0;
var _states = _interopRequireDefault(require("../utils/states"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var domain = 'https://beacon-v2.helpscout.net';

@@ -31,5 +36,9 @@

var load = function load(_ref) {
var providerKey = _ref.providerKey;
var providerKey = _ref.providerKey,
setState = _ref.setState;
loadScript();
window.Beacon('init', providerKey);
setTimeout(function () {
return setState(_states["default"].COMPLETE);
}, 2000);
};

@@ -36,0 +45,0 @@

@@ -8,2 +8,4 @@ "use strict";

var _drift = _interopRequireDefault(require("./drift"));
var _helpScout = _interopRequireDefault(require("./helpScout"));

@@ -18,2 +20,3 @@

var Providers = {
drift: _drift["default"],
helpScout: _helpScout["default"],

@@ -20,0 +23,0 @@ intercom: _intercom["default"],

@@ -7,2 +7,7 @@ "use strict";

exports["default"] = void 0;
var _states = _interopRequireDefault(require("../utils/states"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var domain = 'https://widget.intercom.io';

@@ -50,3 +55,4 @@

var load = function load(_ref) {
var providerKey = _ref.providerKey;
var providerKey = _ref.providerKey,
setState = _ref.setState;
loadScript();

@@ -56,2 +62,5 @@ window.Intercom('boot', {

});
setTimeout(function () {
return setState(_states["default"].COMPLETE);
}, 2000);
};

@@ -58,0 +67,0 @@

@@ -7,2 +7,7 @@ "use strict";

exports["default"] = void 0;
var _states = _interopRequireDefault(require("../utils/states"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var domain = 'https://connect.facebook.net';

@@ -36,3 +41,4 @@

_ref2$locale = _ref2.locale,
locale = _ref2$locale === void 0 ? 'en_US' : _ref2$locale;
locale = _ref2$locale === void 0 ? 'en_US' : _ref2$locale,
setState = _ref2.setState;
loadScript({

@@ -51,2 +57,6 @@ locale: locale

};
setTimeout(function () {
return setState(_states["default"].COMPLETE);
}, 2000);
};

@@ -53,0 +63,0 @@

{
"name": "react-live-chat-loader",
"version": "2.0.5",
"version": "2.1.0",
"description": "Implement live chat in your react app without taking a performance hit.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# React Live Chat Loader
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

@@ -8,3 +11,3 @@

experience impact of chat tools. `react-live-chat-loader` shows a fake widget
until the page has become idle or users are ready to interact with chat. Currently works with [Intercom](#intercom), [Help Scout](#help-scout) and [Messenger](#messenger).
until the page has become idle or users are ready to interact with chat. Currently works with [Intercom](#intercom), [Help Scout](#help-scout), [Drift](#drift) and [Messenger](#messenger).

@@ -121,3 +124,3 @@ Made by the team at [♠ Calibre](https://calibreapp.com/), your performance companion.

- `provider`: Choose from `helpScout` or `intercom` ([see below](#providers))
- `provider`: Choose from `helpScout`, `intercom`, `drift` or `messenger` ([see below](#providers))
- `providerKey`: Provider API Key ([see below](#providers))

@@ -130,3 +133,3 @@ - `idlePeriod`: How long to wait in ms before loading the provider. Default is

Currently there are two supported providers:
Currently there are four supported providers:

@@ -247,2 +250,29 @@ <details>

<details>
<summary>Drift</summary>
To use Drift import the `LiveChatLoaderProvider` and set the `provider` prop
as `drift` and the `providerKey` prop as your Drift App ID.
Then import the `Drift` component.
```jsx
import { LiveChatLoaderProvider, Drift } from 'react-live-chat-loader'
export default () => (
<LiveChatLoaderProvider providerKey="asdhjg127s1s" provider="drift">
/* ... */
<Drift />
</LiveChatLoaderProvider>
)
```
You can customise the Drift Messenger by passing the following props to the
`Drift` component:
- `color`: The background color of the messenger
- `icon`: Choose from `A`, `B`, `C`, `D`; you're presented with these preset icons when signing up for Drift, or in the "Drift Widget > Design > Widget icon" entry under the "App Settings" header on the Drift settings page.
</details>
## Adding a provider

@@ -384,3 +414,3 @@

<td align="center"><a href="http://ash.ms"><img src="https://avatars3.githubusercontent.com/u/49600?v=4" width="100px;" alt=""/><br /><sub><b>Ash Kyd</b></sub></a><br /><a href="https://github.com/calibreapp/react-live-chat-loader/commits?author=AshKyd" title="Documentation">📖</a></td>
<td align="center"><a href="https://reiner.design"><img src="https://avatars3.githubusercontent.com/u/8116716?v=4" width="100px;" alt=""/><br /><sub><b>Jeff Reiner</b></sub></a><br /><a href="https://github.com/calibreapp/react-live-chat-loader/commits?author=mirshko" title="Documentation">📖</a></td>
<td align="center"><a href="https://reiner.design"><img src="https://avatars3.githubusercontent.com/u/8116716?v=4" width="100px;" alt=""/><br /><sub><b>Jeff Reiner</b></sub></a><br /><a href="https://github.com/calibreapp/react-live-chat-loader/commits?author=mirshko" title="Documentation">📖</a> <a href="https://github.com/calibreapp/react-live-chat-loader/commits?author=mirshko" title="Code">💻</a></td>
</tr>

@@ -391,4 +421,5 @@ </table>

<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc