@ada-support/embed2 1.0.40 → 1.0.41
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/npm-entry/common/lib/fc/index.d.ts +1 -1
- package/dist/npm-entry/frames/components/x-storage/index.d.ts +12 -0
- package/dist/npm-entry/frames/helpers/frame-init.d.ts +3 -0
- package/dist/npm-entry/frames/lib/error-tracker.d.ts +6 -0
- package/dist/npm-entry/frames/lib/frame-fc.d.ts +3 -0
- package/dist/npm-entry/frames/lib/store-proxy.d.ts +2 -0
- package/dist/npm-entry/index.js +73 -57
- package/package.json +2 -1
|
@@ -20,5 +20,5 @@ export default class FC extends Channel {
|
|
|
20
20
|
private static isMessageEvent;
|
|
21
21
|
postMessage<T extends EmbedEvent>(eventName: T, data?: PayloadByEvent[T], id?: string, status?: FetchEventStatusType): void;
|
|
22
22
|
addEventListener(handler: (type: string, payload?: object, id?: string, status?: FetchEventStatusType) => void): Refhandler;
|
|
23
|
-
constructObjectToSend(
|
|
23
|
+
constructObjectToSend(eventName?: string, payload?: unknown, id?: string, status?: FetchEventStatusType): string;
|
|
24
24
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "frames/lib/error-tracker";
|
|
2
|
+
export declare const LIVE_CHAT_PENDING_STORAGE_KEY = "liveChatPending";
|
|
3
|
+
export declare const IS_DRAWER_OPEN_STORAGE_KEY = "ada-embed_is-drawer-open";
|
|
4
|
+
/**
|
|
5
|
+
* NOTE: If you import this file into any other file
|
|
6
|
+
* it will trigger the init() function below - may cause errors!
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Auto-opens the chat door if crossWindowPersistence is one, the chatter is in
|
|
10
|
+
* a live chat, and if the drawer was previously opened.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setIsDrawerOpen(): Promise<void>;
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -873,12 +873,14 @@ var values_default = /*#__PURE__*/__webpack_require__.n(values);
|
|
|
873
873
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/construct.js
|
|
874
874
|
var construct = __webpack_require__(1068);
|
|
875
875
|
var construct_default = /*#__PURE__*/__webpack_require__.n(construct);
|
|
876
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/typeof.js
|
|
877
|
+
var esm_typeof = __webpack_require__(9623);
|
|
876
878
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/assertThisInitialized.js
|
|
877
879
|
var assertThisInitialized = __webpack_require__(5281);
|
|
878
880
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/inherits.js
|
|
879
881
|
var inherits = __webpack_require__(306);
|
|
880
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js
|
|
881
|
-
var possibleConstructorReturn = __webpack_require__(
|
|
882
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js
|
|
883
|
+
var possibleConstructorReturn = __webpack_require__(3020);
|
|
882
884
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/getPrototypeOf.js
|
|
883
885
|
var getPrototypeOf = __webpack_require__(3362);
|
|
884
886
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/set.js
|
|
@@ -890,6 +892,9 @@ var includes_default = /*#__PURE__*/__webpack_require__.n(includes);
|
|
|
890
892
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js
|
|
891
893
|
var stringify = __webpack_require__(9340);
|
|
892
894
|
var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
|
|
895
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js
|
|
896
|
+
var concat = __webpack_require__(7766);
|
|
897
|
+
var concat_default = /*#__PURE__*/__webpack_require__.n(concat);
|
|
893
898
|
// EXTERNAL MODULE: ./node_modules/uniqid/index.js
|
|
894
899
|
var uniqid = __webpack_require__(6104);
|
|
895
900
|
var uniqid_default = /*#__PURE__*/__webpack_require__.n(uniqid);
|
|
@@ -8495,7 +8500,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8495
8500
|
return event;
|
|
8496
8501
|
},
|
|
8497
8502
|
environment: "production",
|
|
8498
|
-
release: "
|
|
8503
|
+
release: "70f4c5105d5400a23f717c52bc54f58ec20ae89a",
|
|
8499
8504
|
sampleRate: 0.25,
|
|
8500
8505
|
autoSessionTracking: false,
|
|
8501
8506
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -8775,12 +8780,16 @@ var Channel = /*#__PURE__*/function () {
|
|
|
8775
8780
|
|
|
8776
8781
|
|
|
8777
8782
|
|
|
8783
|
+
|
|
8784
|
+
|
|
8785
|
+
|
|
8778
8786
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,getPrototypeOf/* default */.Z)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,getPrototypeOf/* default */.Z)(this).constructor; result = construct_default()(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,possibleConstructorReturn/* default */.Z)(this, result); }; }
|
|
8779
8787
|
|
|
8780
8788
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !(construct_default())) return false; if ((construct_default()).sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(construct_default()(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
8781
8789
|
|
|
8782
8790
|
|
|
8783
8791
|
|
|
8792
|
+
|
|
8784
8793
|
/**
|
|
8785
8794
|
* Frame Channel: Used for postMessage communication between iFrames.
|
|
8786
8795
|
* NOTE: iFrames must have the same domain - when postMessages are sent between
|
|
@@ -8868,19 +8877,28 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
8868
8877
|
}, {
|
|
8869
8878
|
key: "constructObjectToSend",
|
|
8870
8879
|
value: function constructObjectToSend() {
|
|
8871
|
-
var
|
|
8880
|
+
var eventName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
8872
8881
|
var payload = arguments.length > 1 ? arguments[1] : undefined;
|
|
8873
8882
|
var id = arguments.length > 2 ? arguments[2] : undefined;
|
|
8874
8883
|
var status = arguments.length > 3 ? arguments[3] : undefined;
|
|
8884
|
+
|
|
8875
8885
|
// IE passes event message data as a string, so we normalize to string for all objects
|
|
8876
8886
|
// (for all browsers)
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8887
|
+
try {
|
|
8888
|
+
return stringify_default()({
|
|
8889
|
+
name: this.name,
|
|
8890
|
+
type: eventName,
|
|
8891
|
+
payload: payload,
|
|
8892
|
+
id: id,
|
|
8893
|
+
status: status
|
|
8894
|
+
});
|
|
8895
|
+
} catch (e) {
|
|
8896
|
+
var _context2, _context3;
|
|
8897
|
+
|
|
8898
|
+
var reason = e instanceof Error ? e.message : "unknown";
|
|
8899
|
+
var payloadRootKeys = payload && (0,esm_typeof/* default */.Z)(payload) === "object" ? keys_default()(payload) : [];
|
|
8900
|
+
throw new errors/* AdaEmbedError */.S(concat_default()(_context2 = concat_default()(_context3 = "Failed to stringify object to JSON. Reason: \"".concat(reason, "\". Event name: \"")).call(_context3, eventName, "\". Payload root keys: ")).call(_context2, payloadRootKeys.join(", "), "."));
|
|
8901
|
+
}
|
|
8884
8902
|
}
|
|
8885
8903
|
}], [{
|
|
8886
8904
|
key: "isMessageEvent",
|
|
@@ -8893,9 +8911,6 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
8893
8911
|
}(Channel);
|
|
8894
8912
|
|
|
8895
8913
|
|
|
8896
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js
|
|
8897
|
-
var concat = __webpack_require__(7766);
|
|
8898
|
-
var concat_default = /*#__PURE__*/__webpack_require__.n(concat);
|
|
8899
8914
|
;// CONCATENATED MODULE: ./src/client/helpers/events/index.ts
|
|
8900
8915
|
/**
|
|
8901
8916
|
* Older browsers like IE11 cannot use Event and CustomEvent constructors. These
|
|
@@ -9020,8 +9035,6 @@ var CE = /*#__PURE__*/function (_Channel) {
|
|
|
9020
9035
|
}, {
|
|
9021
9036
|
key: "constructObjectToSend",
|
|
9022
9037
|
value: function constructObjectToSend(type, payload, id, status) {
|
|
9023
|
-
// IE passes event message data as a string, so we normalize to string for all objects
|
|
9024
|
-
// (for all browsers)
|
|
9025
9038
|
return {
|
|
9026
9039
|
type: type || "",
|
|
9027
9040
|
payload: payload,
|
|
@@ -9179,7 +9192,7 @@ function getEmbedURL(_ref) {
|
|
|
9179
9192
|
polyfillVersionString = "legacy";
|
|
9180
9193
|
}
|
|
9181
9194
|
|
|
9182
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9195
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "70f4c51", "/index.html");
|
|
9183
9196
|
}
|
|
9184
9197
|
/**
|
|
9185
9198
|
* Generate the Chat / API URL
|
|
@@ -13879,7 +13892,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
13879
13892
|
/* harmony export */ });
|
|
13880
13893
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(14|(1[5-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(92|(9[3-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(14|(1[5-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
13881
13894
|
var isProduction = "production" === "production";
|
|
13882
|
-
var embed2Version = "
|
|
13895
|
+
var embed2Version = "70f4c51";
|
|
13883
13896
|
|
|
13884
13897
|
/***/ }),
|
|
13885
13898
|
|
|
@@ -13901,8 +13914,8 @@ var construct_default = /*#__PURE__*/__webpack_require__.n(construct);
|
|
|
13901
13914
|
var classCallCheck = __webpack_require__(8420);
|
|
13902
13915
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/inherits.js
|
|
13903
13916
|
var inherits = __webpack_require__(306);
|
|
13904
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js
|
|
13905
|
-
var possibleConstructorReturn = __webpack_require__(
|
|
13917
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js
|
|
13918
|
+
var possibleConstructorReturn = __webpack_require__(3020);
|
|
13906
13919
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/getPrototypeOf.js
|
|
13907
13920
|
var getPrototypeOf = __webpack_require__(3362);
|
|
13908
13921
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js/map.js
|
|
@@ -23399,51 +23412,25 @@ function _inherits(subClass, superClass) {
|
|
|
23399
23412
|
|
|
23400
23413
|
/***/ }),
|
|
23401
23414
|
|
|
23402
|
-
/***/
|
|
23415
|
+
/***/ 3020:
|
|
23403
23416
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
23404
23417
|
|
|
23405
23418
|
"use strict";
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js/symbol.js
|
|
23413
|
-
var symbol = __webpack_require__(1446);
|
|
23414
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js/symbol/iterator.js
|
|
23415
|
-
var iterator = __webpack_require__(3327);
|
|
23416
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/typeof.js
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
function _typeof(obj) {
|
|
23420
|
-
"@babel/helpers - typeof";
|
|
23421
|
-
|
|
23422
|
-
if (typeof symbol === "function" && typeof iterator === "symbol") {
|
|
23423
|
-
_typeof = function _typeof(obj) {
|
|
23424
|
-
return typeof obj;
|
|
23425
|
-
};
|
|
23426
|
-
} else {
|
|
23427
|
-
_typeof = function _typeof(obj) {
|
|
23428
|
-
return obj && typeof symbol === "function" && obj.constructor === symbol && obj !== symbol.prototype ? "symbol" : typeof obj;
|
|
23429
|
-
};
|
|
23430
|
-
}
|
|
23431
|
-
|
|
23432
|
-
return _typeof(obj);
|
|
23433
|
-
}
|
|
23434
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/assertThisInitialized.js
|
|
23435
|
-
var assertThisInitialized = __webpack_require__(5281);
|
|
23436
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js
|
|
23419
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23420
|
+
/* harmony export */ "Z": function() { return /* binding */ _possibleConstructorReturn; }
|
|
23421
|
+
/* harmony export */ });
|
|
23422
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9623);
|
|
23423
|
+
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5281);
|
|
23437
23424
|
|
|
23438
23425
|
|
|
23439
23426
|
function _possibleConstructorReturn(self, call) {
|
|
23440
|
-
if (call && (
|
|
23427
|
+
if (call && ((0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(call) === "object" || typeof call === "function")) {
|
|
23441
23428
|
return call;
|
|
23442
23429
|
} else if (call !== void 0) {
|
|
23443
23430
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
23444
23431
|
}
|
|
23445
23432
|
|
|
23446
|
-
return (0,
|
|
23433
|
+
return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(self);
|
|
23447
23434
|
}
|
|
23448
23435
|
|
|
23449
23436
|
/***/ }),
|
|
@@ -23466,6 +23453,35 @@ function _setPrototypeOf(o, p) {
|
|
|
23466
23453
|
return _setPrototypeOf(o, p);
|
|
23467
23454
|
}
|
|
23468
23455
|
|
|
23456
|
+
/***/ }),
|
|
23457
|
+
|
|
23458
|
+
/***/ 9623:
|
|
23459
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
23460
|
+
|
|
23461
|
+
"use strict";
|
|
23462
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23463
|
+
/* harmony export */ "Z": function() { return /* binding */ _typeof; }
|
|
23464
|
+
/* harmony export */ });
|
|
23465
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1446);
|
|
23466
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3327);
|
|
23467
|
+
|
|
23468
|
+
|
|
23469
|
+
function _typeof(obj) {
|
|
23470
|
+
"@babel/helpers - typeof";
|
|
23471
|
+
|
|
23472
|
+
if (typeof _babel_runtime_corejs3_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__ === "function" && typeof _babel_runtime_corejs3_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_1__ === "symbol") {
|
|
23473
|
+
_typeof = function _typeof(obj) {
|
|
23474
|
+
return typeof obj;
|
|
23475
|
+
};
|
|
23476
|
+
} else {
|
|
23477
|
+
_typeof = function _typeof(obj) {
|
|
23478
|
+
return obj && typeof _babel_runtime_corejs3_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__ === "function" && obj.constructor === _babel_runtime_corejs3_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__ && obj !== _babel_runtime_corejs3_core_js_symbol__WEBPACK_IMPORTED_MODULE_0__.prototype ? "symbol" : typeof obj;
|
|
23479
|
+
};
|
|
23480
|
+
}
|
|
23481
|
+
|
|
23482
|
+
return _typeof(obj);
|
|
23483
|
+
}
|
|
23484
|
+
|
|
23469
23485
|
/***/ })
|
|
23470
23486
|
|
|
23471
23487
|
/******/ });
|
|
@@ -23660,7 +23676,7 @@ function _loadEmbed() {
|
|
|
23660
23676
|
polyfillVersionString = "legacy";
|
|
23661
23677
|
}
|
|
23662
23678
|
|
|
23663
|
-
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "
|
|
23679
|
+
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "70f4c51", "/index.js");
|
|
23664
23680
|
}
|
|
23665
23681
|
|
|
23666
23682
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -23787,10 +23803,10 @@ function createEmbedObject() {
|
|
|
23787
23803
|
handle: adaSettings.handle,
|
|
23788
23804
|
embedVersion: 2,
|
|
23789
23805
|
embedSettings: adaSettings,
|
|
23790
|
-
version: "1.0.
|
|
23806
|
+
version: "1.0.41",
|
|
23791
23807
|
isNpm: true,
|
|
23792
23808
|
hostPage: window.location.href,
|
|
23793
|
-
commitHash: "
|
|
23809
|
+
commitHash: "70f4c51"
|
|
23794
23810
|
}, {
|
|
23795
23811
|
sampleRate: 0.01 // 1% of logs will go through
|
|
23796
23812
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/npm-entry",
|
|
6
6
|
"typings": "dist/npm-entry/index.d.ts",
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"resolutions": {
|
|
122
122
|
"json-schema": ">=0.4.0",
|
|
123
123
|
"minimist": ">=0.2.1",
|
|
124
|
+
"node-forge": ">=1.0.0",
|
|
124
125
|
"nth-check": ">=2.0.1"
|
|
125
126
|
},
|
|
126
127
|
"files": [
|