@ada-support/embed2 1.0.70 → 1.0.73
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/README.md +14 -0
- package/dist/npm-entry/{index.d.ts → index-npm.d.ts} +0 -0
- package/dist/npm-entry/index.js +14 -18
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -26,3 +26,17 @@ adaEmbed.start({
|
|
|
26
26
|
});
|
|
27
27
|
```
|
|
28
28
|
In the example above the `handle` key is a part of `AdaSettings`. To learn more about other settings, consult the [API reference](https://adasupport.github.io/documentation/#api-reference).
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## 3. Using the example page
|
|
32
|
+
Clone this repo and run
|
|
33
|
+
```
|
|
34
|
+
yarn && yarn start
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Ensure you have API running on port 8000 and CHAT running on 8002
|
|
38
|
+
|
|
39
|
+
In your browser, visit `http://<your-bot-handle>.localhost:9000/`
|
|
40
|
+
Note: If you see an error in the chat that says your server IP cannot be found, add `127.0.0.1 <your-bot-handle>.chat` to your `/etc/hosts` file
|
|
41
|
+
|
|
42
|
+
To modify the settings, edit `example/index.html`
|
|
File without changes
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -8788,7 +8788,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8788
8788
|
return event;
|
|
8789
8789
|
},
|
|
8790
8790
|
environment: "production",
|
|
8791
|
-
release: "1.0.
|
|
8791
|
+
release: "1.0.73-9e99a7f",
|
|
8792
8792
|
sampleRate: 0.25,
|
|
8793
8793
|
autoSessionTracking: false,
|
|
8794
8794
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -9490,7 +9490,7 @@ function getEmbedURL(_ref) {
|
|
|
9490
9490
|
polyfillVersionString = "legacy";
|
|
9491
9491
|
}
|
|
9492
9492
|
|
|
9493
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9493
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "9e99a7f", "/index.html");
|
|
9494
9494
|
}
|
|
9495
9495
|
/**
|
|
9496
9496
|
* Generate the Chat / API URL
|
|
@@ -11519,14 +11519,12 @@ function ButtonFrame_mapStateToProps(storeState) {
|
|
|
11519
11519
|
var _client$chat_button, _client$ui_settings, _client$ui_settings$e;
|
|
11520
11520
|
|
|
11521
11521
|
var client = storeState.client,
|
|
11522
|
-
isDrawerOpen = storeState.isDrawerOpen
|
|
11523
|
-
language = storeState.language;
|
|
11522
|
+
isDrawerOpen = storeState.isDrawerOpen;
|
|
11524
11523
|
return {
|
|
11525
11524
|
buttonSize: client === null || client === void 0 ? void 0 : (_client$chat_button = client.chat_button) === null || _client$chat_button === void 0 ? void 0 : _client$chat_button.size,
|
|
11526
11525
|
buttonStyle: client === null || client === void 0 ? void 0 : (_client$ui_settings = client.ui_settings) === null || _client$ui_settings === void 0 ? void 0 : (_client$ui_settings$e = _client$ui_settings.embed) === null || _client$ui_settings$e === void 0 ? void 0 : _client$ui_settings$e.style,
|
|
11527
11526
|
client: client,
|
|
11528
|
-
isDrawerOpen: isDrawerOpen
|
|
11529
|
-
language: language
|
|
11527
|
+
isDrawerOpen: isDrawerOpen
|
|
11530
11528
|
};
|
|
11531
11529
|
}
|
|
11532
11530
|
|
|
@@ -12323,8 +12321,7 @@ function ChatFrame_mapStateToProps(storeState) {
|
|
|
12323
12321
|
testMode = storeState.testMode,
|
|
12324
12322
|
client = storeState.client,
|
|
12325
12323
|
chatDimensions = storeState.chatDimensions,
|
|
12326
|
-
drawerHasBeenOpened = storeState.drawerHasBeenOpened
|
|
12327
|
-
chatterInLiveChat = storeState.chatterInLiveChat;
|
|
12324
|
+
drawerHasBeenOpened = storeState.drawerHasBeenOpened;
|
|
12328
12325
|
return {
|
|
12329
12326
|
handle: handle,
|
|
12330
12327
|
domain: domain,
|
|
@@ -12338,8 +12335,7 @@ function ChatFrame_mapStateToProps(storeState) {
|
|
|
12338
12335
|
testMode: testMode,
|
|
12339
12336
|
client: client,
|
|
12340
12337
|
chatDimensions: chatDimensions,
|
|
12341
|
-
drawerHasBeenOpened: drawerHasBeenOpened
|
|
12342
|
-
chatterInLiveChat: chatterInLiveChat
|
|
12338
|
+
drawerHasBeenOpened: drawerHasBeenOpened
|
|
12343
12339
|
};
|
|
12344
12340
|
}
|
|
12345
12341
|
|
|
@@ -12441,7 +12437,6 @@ function IntroFrame_mapStateToProps(storeState) {
|
|
|
12441
12437
|
introDimensions = storeState.introDimensions,
|
|
12442
12438
|
isIntroShown = storeState.isIntroShown,
|
|
12443
12439
|
isDrawerOpen = storeState.isDrawerOpen,
|
|
12444
|
-
language = storeState.language,
|
|
12445
12440
|
adaSettings = storeState.adaSettings;
|
|
12446
12441
|
return {
|
|
12447
12442
|
client: client,
|
|
@@ -12449,7 +12444,6 @@ function IntroFrame_mapStateToProps(storeState) {
|
|
|
12449
12444
|
introDimensions: introDimensions,
|
|
12450
12445
|
isIntroShown: isIntroShown,
|
|
12451
12446
|
isDrawerOpen: isDrawerOpen,
|
|
12452
|
-
language: language,
|
|
12453
12447
|
adaSettings: adaSettings
|
|
12454
12448
|
};
|
|
12455
12449
|
}
|
|
@@ -14348,9 +14342,9 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
14348
14342
|
/* harmony export */ "yv": function() { return /* binding */ isProduction; },
|
|
14349
14343
|
/* harmony export */ "Mk": function() { return /* binding */ embed2Version; }
|
|
14350
14344
|
/* harmony export */ });
|
|
14351
|
-
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15|(1[6-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(
|
|
14345
|
+
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15|(1[6-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(99|([1-9]\\d\\d|\\d{4,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(15|(1[6-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(98|(99|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(98|(99|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
14352
14346
|
var isProduction = "production" === "production";
|
|
14353
|
-
var embed2Version = "
|
|
14347
|
+
var embed2Version = "9e99a7f";
|
|
14354
14348
|
|
|
14355
14349
|
/***/ }),
|
|
14356
14350
|
|
|
@@ -14696,9 +14690,9 @@ function _log() {
|
|
|
14696
14690
|
service: "embed",
|
|
14697
14691
|
env: "production",
|
|
14698
14692
|
embedVersion: 2,
|
|
14699
|
-
version: "1.0.
|
|
14693
|
+
version: "1.0.73",
|
|
14700
14694
|
isNpm: true,
|
|
14701
|
-
commitHash: "
|
|
14695
|
+
commitHash: "9e99a7f"
|
|
14702
14696
|
}))
|
|
14703
14697
|
});
|
|
14704
14698
|
|
|
@@ -25639,7 +25633,7 @@ function _loadEmbed() {
|
|
|
25639
25633
|
polyfillVersionString = "legacy";
|
|
25640
25634
|
}
|
|
25641
25635
|
|
|
25642
|
-
embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "
|
|
25636
|
+
embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "9e99a7f", "/index.js");
|
|
25643
25637
|
}
|
|
25644
25638
|
|
|
25645
25639
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -26205,7 +26199,9 @@ function createEmbedObject() {
|
|
|
26205
26199
|
}
|
|
26206
26200
|
;// CONCATENATED MODULE: ./src/index-npm.ts
|
|
26207
26201
|
|
|
26208
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 5265));
|
|
26202
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 5265)); // We need "export default" for NPM module to be used as `import adaEmbed from "@ada-support/embed2";`
|
|
26203
|
+
// eslint-disable-next-line import/no-default-export
|
|
26204
|
+
|
|
26209
26205
|
/* harmony default export */ var index_npm = (createEmbedObject());
|
|
26210
26206
|
}();
|
|
26211
26207
|
module.exports = __webpack_exports__;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
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 66",
|
|
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",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"author": "",
|
|
55
55
|
"license": "ISC",
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@ada-support/eslint-config-ada": "^1.2.
|
|
57
|
+
"@ada-support/eslint-config-ada": "^1.2.1",
|
|
58
58
|
"@types/enzyme": "^3.10.11",
|
|
59
59
|
"@types/jest": "^27.0.2",
|
|
60
60
|
"@types/json-stable-stringify": "^1.0.33",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"enzyme-adapter-preact-pure": "^2.2.0",
|
|
73
73
|
"eslint": "^8.8.0",
|
|
74
74
|
"eslint-plugin-chai-friendly": "^0.7.2",
|
|
75
|
-
"eslint-plugin-compat": "^
|
|
75
|
+
"eslint-plugin-compat": "^4.0.2",
|
|
76
76
|
"eslint-plugin-cypress": "^2.11.3",
|
|
77
77
|
"eslint-plugin-sonarjs": "^0.11.0",
|
|
78
78
|
"husky": "^7.0.0",
|
|
@@ -81,11 +81,10 @@
|
|
|
81
81
|
"lint-staged": "^11.2.3",
|
|
82
82
|
"npm-run-all": "^4.1.5",
|
|
83
83
|
"start-server-and-test": "^1.14.0",
|
|
84
|
-
"testcafe": "^1.18.
|
|
85
|
-
"testcafe-browser-provider-lambdatest": "^2.0.
|
|
84
|
+
"testcafe": "^1.18.4",
|
|
85
|
+
"testcafe-browser-provider-lambdatest": "^2.0.18",
|
|
86
86
|
"ts-node": "^10.2.1",
|
|
87
87
|
"tsconfig-paths": "^3.11.0",
|
|
88
|
-
"typescript-eslint-language-service": "^4.1.5",
|
|
89
88
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
90
89
|
"webpack-dev-server": "^4.3.1"
|
|
91
90
|
},
|
|
@@ -112,7 +111,7 @@
|
|
|
112
111
|
"lodash.debounce": "^4.0.8",
|
|
113
112
|
"lodash.memoize": "^4.1.2",
|
|
114
113
|
"preact": "10.4.5",
|
|
115
|
-
"typescript": "^4.
|
|
114
|
+
"typescript": "^4.6.2",
|
|
116
115
|
"uniqid": "^5.3.0",
|
|
117
116
|
"webpack": "^5.67.0",
|
|
118
117
|
"webpack-cli": "^4.9.2",
|
|
@@ -121,7 +120,8 @@
|
|
|
121
120
|
"webpack-subresource-integrity": "^5.1.0"
|
|
122
121
|
},
|
|
123
122
|
"resolutions": {
|
|
124
|
-
"@lambdatest/node-tunnel": ">=3.0.2"
|
|
123
|
+
"@lambdatest/node-tunnel": ">=3.0.2",
|
|
124
|
+
"minimist": ">=1.2.6"
|
|
125
125
|
},
|
|
126
126
|
"files": [
|
|
127
127
|
"dist/npm-entry"
|