@ada-support/embed2 1.0.22 → 1.0.26
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/index.js +18 -24
- package/package.json +25 -41
package/dist/npm-entry/index.js
CHANGED
|
@@ -8715,7 +8715,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8715
8715
|
return event;
|
|
8716
8716
|
},
|
|
8717
8717
|
environment: "production",
|
|
8718
|
-
release: "
|
|
8718
|
+
release: "2c12ce9304a9f0b73b7a0b08d4a3fc006577c127",
|
|
8719
8719
|
sampleRate: 0.25,
|
|
8720
8720
|
autoSessionTracking: false,
|
|
8721
8721
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -9050,22 +9050,22 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
9050
9050
|
value: function addEventListener(handler) {
|
|
9051
9051
|
var _this2 = this;
|
|
9052
9052
|
|
|
9053
|
-
var handleRef = function handleRef(
|
|
9053
|
+
var handleRef = function handleRef(event) {
|
|
9054
9054
|
var _context;
|
|
9055
9055
|
|
|
9056
9056
|
var parsedData;
|
|
9057
9057
|
|
|
9058
|
-
if (!includes_default()(_context = _this2.targetOrigin).call(_context,
|
|
9059
|
-
return
|
|
9058
|
+
if ( true && _this2.targetOrigin !== "*" && (!("origin" in event) || !includes_default()(_context = _this2.targetOrigin).call(_context, event.origin))) {
|
|
9059
|
+
return;
|
|
9060
9060
|
}
|
|
9061
9061
|
|
|
9062
9062
|
try {
|
|
9063
|
-
if (FC.isMessageEvent(
|
|
9064
|
-
parsedData = JSON.parse(
|
|
9063
|
+
if (FC.isMessageEvent(event)) {
|
|
9064
|
+
parsedData = JSON.parse(event.data);
|
|
9065
9065
|
}
|
|
9066
9066
|
} catch (_unused) {
|
|
9067
9067
|
(0,errors/* warn */.Z)("postMessage not sent as JSON.");
|
|
9068
|
-
return
|
|
9068
|
+
return;
|
|
9069
9069
|
}
|
|
9070
9070
|
|
|
9071
9071
|
var _parsedData = parsedData,
|
|
@@ -9076,10 +9076,10 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
9076
9076
|
status = _parsedData.status;
|
|
9077
9077
|
|
|
9078
9078
|
if (name !== _this2.name) {
|
|
9079
|
-
return
|
|
9079
|
+
return;
|
|
9080
9080
|
}
|
|
9081
9081
|
|
|
9082
|
-
|
|
9082
|
+
handler(type, payload, id, status);
|
|
9083
9083
|
};
|
|
9084
9084
|
|
|
9085
9085
|
this.addTrackedListener(handleRef);
|
|
@@ -9105,7 +9105,7 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
9105
9105
|
}], [{
|
|
9106
9106
|
key: "isMessageEvent",
|
|
9107
9107
|
value: function isMessageEvent(event) {
|
|
9108
|
-
return event.data !== undefined;
|
|
9108
|
+
return "data" in event && event.data !== undefined;
|
|
9109
9109
|
}
|
|
9110
9110
|
}]);
|
|
9111
9111
|
|
|
@@ -9122,8 +9122,7 @@ var concat_default = /*#__PURE__*/__webpack_require__.n(concat);
|
|
|
9122
9122
|
* functions use the "old-school" approach if Event and CustomEvent are not
|
|
9123
9123
|
* available on the window object.
|
|
9124
9124
|
*/
|
|
9125
|
-
function createNewCustomEvent(
|
|
9126
|
-
eventName, payload) {
|
|
9125
|
+
function createNewCustomEvent(eventName, payload) {
|
|
9127
9126
|
var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
9128
9127
|
var cancelable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
9129
9128
|
var customEvent;
|
|
@@ -9345,7 +9344,7 @@ var config_info = __webpack_require__(198);
|
|
|
9345
9344
|
var ports = {
|
|
9346
9345
|
"localhost": {
|
|
9347
9346
|
"api": 8000,
|
|
9348
|
-
"chat":
|
|
9347
|
+
"chat": 8002,
|
|
9349
9348
|
"default": 9001
|
|
9350
9349
|
},
|
|
9351
9350
|
"e2ereference": {
|
|
@@ -9398,7 +9397,7 @@ function getEmbedURL(_ref) {
|
|
|
9398
9397
|
polyfillVersionString = "legacy";
|
|
9399
9398
|
}
|
|
9400
9399
|
|
|
9401
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9400
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "2c12ce9", "/index.html");
|
|
9402
9401
|
}
|
|
9403
9402
|
/**
|
|
9404
9403
|
* Generate the Chat / API URL
|
|
@@ -10690,8 +10689,7 @@ var ConnectContainer = /*#__PURE__*/function (_Component) {
|
|
|
10690
10689
|
initialized: true
|
|
10691
10690
|
}, _this2.mapStateAndDispatch(state)));
|
|
10692
10691
|
});
|
|
10693
|
-
}
|
|
10694
|
-
|
|
10692
|
+
}
|
|
10695
10693
|
}, {
|
|
10696
10694
|
key: "mapStateAndDispatch",
|
|
10697
10695
|
value: function mapStateAndDispatch(state) {
|
|
@@ -10746,7 +10744,6 @@ function connect(mapStateToProps, mapDispatchToProps) {
|
|
|
10746
10744
|
};
|
|
10747
10745
|
}
|
|
10748
10746
|
function bindActionCreators(action, dispatch) {
|
|
10749
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
10750
10747
|
return function (payload) {
|
|
10751
10748
|
return dispatch(action, payload);
|
|
10752
10749
|
};
|
|
@@ -13882,7 +13879,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
13882
13879
|
/* harmony export */ });
|
|
13883
13880
|
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);
|
|
13884
13881
|
var isProduction = "production" === "production";
|
|
13885
|
-
var embed2Version = "
|
|
13882
|
+
var embed2Version = "2c12ce9";
|
|
13886
13883
|
|
|
13887
13884
|
/***/ }),
|
|
13888
13885
|
|
|
@@ -14086,7 +14083,6 @@ function warn(warningText) {
|
|
|
14086
14083
|
/**
|
|
14087
14084
|
* Vanilla HTTP request. Returns a Promise.
|
|
14088
14085
|
*/
|
|
14089
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14090
14086
|
function httpRequest(obj) {
|
|
14091
14087
|
return new (_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_0___default())(function (resolve, reject) {
|
|
14092
14088
|
var method = obj.method || "GET";
|
|
@@ -23057,7 +23053,7 @@ function _loadEmbed() {
|
|
|
23057
23053
|
polyfillVersionString = "legacy";
|
|
23058
23054
|
}
|
|
23059
23055
|
|
|
23060
|
-
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "
|
|
23056
|
+
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "2c12ce9", "/index.js");
|
|
23061
23057
|
}
|
|
23062
23058
|
|
|
23063
23059
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -23184,10 +23180,10 @@ function createEmbedObject() {
|
|
|
23184
23180
|
handle: adaSettings.handle,
|
|
23185
23181
|
embedVersion: 2,
|
|
23186
23182
|
embedSettings: adaSettings,
|
|
23187
|
-
version: "1.0.
|
|
23183
|
+
version: "1.0.26",
|
|
23188
23184
|
isNpm: true,
|
|
23189
23185
|
hostPage: window.location.href,
|
|
23190
|
-
commitHash: "
|
|
23186
|
+
commitHash: "2c12ce9"
|
|
23191
23187
|
}, {
|
|
23192
23188
|
sampleRate: 0.01 // 1% of logs will go through
|
|
23193
23189
|
|
|
@@ -23410,7 +23406,6 @@ function createEmbedObject() {
|
|
|
23410
23406
|
|
|
23411
23407
|
return reset;
|
|
23412
23408
|
}(),
|
|
23413
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
23414
23409
|
trackEvent: function () {
|
|
23415
23410
|
var _trackEvent = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee10(eventKey, value, meta) {
|
|
23416
23411
|
var _embed7;
|
|
@@ -23481,7 +23476,6 @@ function createEmbedObject() {
|
|
|
23481
23476
|
|
|
23482
23477
|
return createProactive;
|
|
23483
23478
|
}(),
|
|
23484
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
23485
23479
|
triggerCampaign: function () {
|
|
23486
23480
|
var _triggerCampaign = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee12(campaignKey, options) {
|
|
23487
23481
|
var _embed9;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/npm-entry",
|
|
6
6
|
"typings": "dist/npm-entry/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build:modern": "NODE_ENV=production BROWSERSLIST_ENV=modern npx webpack --config webpack.prod.ts",
|
|
11
11
|
"build:npm-types": "tsc --project tsconfig.npm.json --declaration --outDir dist/npm-entry --emitDeclarationOnly --allowJs false --checkJs false",
|
|
12
12
|
"build:npm": "./npm-build.sh",
|
|
13
|
-
"lint": "tsc --noEmit --strict false && ./node_modules/.bin/eslint --report-unused-disable-directives --ext .js,.jsx,.ts,.tsx . --max-warnings
|
|
13
|
+
"lint": "tsc --noEmit --strict false && ./node_modules/.bin/eslint --report-unused-disable-directives --ext .js,.jsx,.ts,.tsx . --max-warnings 32",
|
|
14
14
|
"lint:fix": "yarn lint --fix",
|
|
15
15
|
"deploy-legacy": "TS_NODE_PROJECT=wp.tsconfig.json NODE_ENV=production BROWSERSLIST_ENV=legacy npx webpack --config webpack.prod.ts",
|
|
16
16
|
"deploy-modern": "TS_NODE_PROJECT=wp.tsconfig.json NODE_ENV=production BROWSERSLIST_ENV=modern npx webpack --config webpack.prod.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test:watch": "jest --watch",
|
|
23
23
|
"start": "NODE_ENV=development TS_NODE_PROJECT=wp.tsconfig.json run-p start:example-page start:frames",
|
|
24
24
|
"start:e2e-test": "run-p start:e2e-test-page start:frames",
|
|
25
|
-
"start:example-page": "webpack serve --config webpack.dev.ts --
|
|
26
|
-
"start:e2e-test-page": "webpack serve --config webpack.dev.ts --
|
|
27
|
-
"start:frames": "webpack serve --config webpack.dev.ts --
|
|
28
|
-
"start:cy-test-page": "webpack serve --config webpack.dev
|
|
29
|
-
"start:tc-test-page": "webpack serve --config webpack.dev
|
|
25
|
+
"start:example-page": "CONTENT_BASE=example webpack serve --config webpack.dev-host-page.ts --hot",
|
|
26
|
+
"start:e2e-test-page": "CONTENT_BASE=test/e2e webpack serve --config webpack.dev-host-page.ts --hot",
|
|
27
|
+
"start:frames": "webpack serve --config webpack.dev.ts --hot",
|
|
28
|
+
"start:cy-test-page": "CONTENT_BASE=test/cypress webpack serve --config webpack.dev-host-page.ts",
|
|
29
|
+
"start:tc-test-page": "CONTENT_BASE=test/testcafe webpack serve --config webpack.dev-host-page.ts",
|
|
30
30
|
"cypress": "cypress run",
|
|
31
31
|
"cypress:open": "cypress open",
|
|
32
32
|
"ci-cy-start": "USE_STAGE=true run-p start:cy-test-page start:frames",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"bundle-report-intro:modern": "webpack-bundle-analyzer --port 4204 dist/embed/modern/intro/local/stats.json dist/embed/modern/intro/local",
|
|
47
47
|
"bundle-report-x-storage:modern": "webpack-bundle-analyzer --port 4205 dist/embed/modern/x-storage/local/stats.json dist/embed/modern/x-storage/local",
|
|
48
48
|
"bundle-report:modern": "yarn build && run-p bundle-report-entry bundle-report-button:modern bundle-report-client:modern bundle-report-mask:modern bundle-report-intro:modern bundle-report-x-storage:modern",
|
|
49
|
-
"
|
|
49
|
+
"prepare": "husky install"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [],
|
|
52
52
|
"author": "",
|
|
53
53
|
"license": "ISC",
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@ada-support/eslint-config-ada": "^1.
|
|
55
|
+
"@ada-support/eslint-config-ada": "^1.1.1",
|
|
56
56
|
"@babel/core": "^7.14.8",
|
|
57
57
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
58
58
|
"@babel/plugin-proposal-numeric-separator": "^7.14.5",
|
|
@@ -62,33 +62,29 @@
|
|
|
62
62
|
"@babel/plugin-transform-runtime": "^7.14.5",
|
|
63
63
|
"@babel/preset-env": "^7.14.8",
|
|
64
64
|
"@babel/preset-typescript": "^7.14.5",
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@types/jest": "^27.0.1",
|
|
65
|
+
"@sentry/webpack-plugin": "^1.18.2",
|
|
66
|
+
"@types/jest": "^27.0.2",
|
|
68
67
|
"@types/node": "^16.7.1",
|
|
69
68
|
"@types/webpack": "^5.28.0",
|
|
70
69
|
"@types/webpack-bundle-analyzer": "^4.4.1",
|
|
71
70
|
"@types/webpack-dev-server": "^4.0.0",
|
|
72
|
-
"@types/webpack-subresource-integrity": "^1.2.3",
|
|
73
|
-
"@typescript-eslint/parser": "^4.29.3",
|
|
74
71
|
"babel-loader": "^8.0.6",
|
|
75
72
|
"babel-preset-preact": "^2.0.0",
|
|
76
|
-
"browserslist": "^4.
|
|
77
|
-
"browserslist-useragent-regexp": "^3.0.
|
|
78
|
-
"cypress": "^8.
|
|
73
|
+
"browserslist": "^4.17.4",
|
|
74
|
+
"browserslist-useragent-regexp": "^3.0.2",
|
|
75
|
+
"cypress": "^8.6.0",
|
|
79
76
|
"enzyme": "^3.11.0",
|
|
80
77
|
"enzyme-adapter-preact-pure": "^2.2.0",
|
|
81
|
-
"eslint": "^7.32.0",
|
|
82
78
|
"eslint-plugin-chai-friendly": "^0.7.2",
|
|
83
79
|
"eslint-plugin-compat": "^3.13.0",
|
|
84
80
|
"eslint-plugin-cypress": "^2.11.3",
|
|
85
|
-
"html-webpack-plugin": "^5.
|
|
86
|
-
"husky": "^
|
|
87
|
-
"jest": "^27.
|
|
81
|
+
"html-webpack-plugin": "^5.4.0",
|
|
82
|
+
"husky": "^7.0.0",
|
|
83
|
+
"jest": "^27.3.1",
|
|
88
84
|
"jest-localstorage-mock": "^2.4.0",
|
|
89
|
-
"lint-staged": "^
|
|
85
|
+
"lint-staged": "^11.2.3",
|
|
90
86
|
"npm-run-all": "^4.1.5",
|
|
91
|
-
"start-server-and-test": "^1.
|
|
87
|
+
"start-server-and-test": "^1.14.0",
|
|
92
88
|
"svg-inline-loader": "^0.8.0",
|
|
93
89
|
"testcafe": "^1.15.3",
|
|
94
90
|
"testcafe-browser-provider-lambdatest": "^2.0.5",
|
|
@@ -97,10 +93,10 @@
|
|
|
97
93
|
"tsconfig-paths": "^3.11.0",
|
|
98
94
|
"typescript": "^4.3.5",
|
|
99
95
|
"typescript-eslint-language-service": "^4.1.5",
|
|
100
|
-
"webpack": "5.
|
|
101
|
-
"webpack-bundle-analyzer": "^4.
|
|
102
|
-
"webpack-cli": "^4.
|
|
103
|
-
"webpack-dev-server": "^3.
|
|
96
|
+
"webpack": "^5.59.1",
|
|
97
|
+
"webpack-bundle-analyzer": "^4.5.0",
|
|
98
|
+
"webpack-cli": "^4.9.1",
|
|
99
|
+
"webpack-dev-server": "^4.3.1",
|
|
104
100
|
"webpack-merge": "^5.8.0",
|
|
105
101
|
"webpack-subresource-integrity": "^5.0.0"
|
|
106
102
|
},
|
|
@@ -120,20 +116,8 @@
|
|
|
120
116
|
"webpack-s3-plugin": "^1.2.0-rc.0"
|
|
121
117
|
},
|
|
122
118
|
"resolutions": {
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"dns-packet": ">=1.3.2",
|
|
126
|
-
"glob-parent": ">=5.1.2",
|
|
127
|
-
"hosted-git-info": ">=2.8.9",
|
|
128
|
-
"lodash": ">=4.17.21",
|
|
129
|
-
"minimist": ">=1.2.3",
|
|
130
|
-
"node-fetch": ">=2.6.1",
|
|
131
|
-
"y18n": ">=4.0.1"
|
|
132
|
-
},
|
|
133
|
-
"husky": {
|
|
134
|
-
"hooks": {
|
|
135
|
-
"pre-commit": "lint-staged"
|
|
136
|
-
}
|
|
119
|
+
"minimist": ">=0.2.1",
|
|
120
|
+
"nth-check": ">=2.0.1"
|
|
137
121
|
},
|
|
138
122
|
"files": [
|
|
139
123
|
"dist/npm-entry"
|