@ada-support/embed2 1.1.2 → 1.1.3
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
CHANGED
|
@@ -8788,7 +8788,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8788
8788
|
return event;
|
|
8789
8789
|
},
|
|
8790
8790
|
environment: "production",
|
|
8791
|
-
release: "1.1.
|
|
8791
|
+
release: "1.1.3-6707009",
|
|
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, "6707009", "/index.html");
|
|
9494
9494
|
}
|
|
9495
9495
|
/**
|
|
9496
9496
|
* Generate the Chat / API URL
|
|
@@ -11346,6 +11346,7 @@ var IFrame = /*#__PURE__*/function (_Component) {
|
|
|
11346
11346
|
value: function render() {
|
|
11347
11347
|
var _this$props4 = this.props,
|
|
11348
11348
|
name = _this$props4.name,
|
|
11349
|
+
roleDescription = _this$props4.roleDescription,
|
|
11349
11350
|
onTransitionEnd = _this$props4.onTransitionEnd,
|
|
11350
11351
|
styles = _this$props4.styles,
|
|
11351
11352
|
title = _this$props4.title;
|
|
@@ -11361,7 +11362,7 @@ var IFrame = /*#__PURE__*/function (_Component) {
|
|
|
11361
11362
|
title: title || iFrameName,
|
|
11362
11363
|
className: iFrameName,
|
|
11363
11364
|
onTransitionEnd: onTransitionEnd,
|
|
11364
|
-
"aria-roledescription":
|
|
11365
|
+
"aria-roledescription": roleDescription,
|
|
11365
11366
|
role: "application"
|
|
11366
11367
|
});
|
|
11367
11368
|
}
|
|
@@ -11402,6 +11403,7 @@ function mapDispatchToProps(dispatch) {
|
|
|
11402
11403
|
|
|
11403
11404
|
|
|
11404
11405
|
|
|
11406
|
+
|
|
11405
11407
|
function ButtonFrame_createSuper(Derived) { var hasNativeReflectConstruct = ButtonFrame_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); }; }
|
|
11406
11408
|
|
|
11407
11409
|
function ButtonFrame_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; } }
|
|
@@ -11509,12 +11511,25 @@ var ButtonFrame = /*#__PURE__*/function (_Component) {
|
|
|
11509
11511
|
value: function render() {
|
|
11510
11512
|
var _this2 = this;
|
|
11511
11513
|
|
|
11514
|
+
var client = this.props.client;
|
|
11515
|
+
|
|
11516
|
+
var roleDescription = function roleDescription() {
|
|
11517
|
+
var _context11;
|
|
11518
|
+
|
|
11519
|
+
if (!(client !== null && client !== void 0 && client.handle)) {
|
|
11520
|
+
return "Chat Button";
|
|
11521
|
+
}
|
|
11522
|
+
|
|
11523
|
+
return "".concat(client.handle.charAt(0).toUpperCase() + slice_default()(_context11 = client.handle).call(_context11, 1), " Chat Button");
|
|
11524
|
+
};
|
|
11525
|
+
|
|
11512
11526
|
return v(StoreContext.Consumer, null, function (store) {
|
|
11513
11527
|
return v(MessageServiceContext.Consumer, null, function (messageService) {
|
|
11514
11528
|
return v(components_IFrame, {
|
|
11515
11529
|
title: "Chat with bot",
|
|
11516
11530
|
styles: _this2.styles,
|
|
11517
11531
|
name: BUTTON_IFRAME,
|
|
11532
|
+
roleDescription: roleDescription(),
|
|
11518
11533
|
store: store,
|
|
11519
11534
|
messageService: messageService,
|
|
11520
11535
|
onTransitionEnd: _this2.handleOnTransitionEndBound
|
|
@@ -11558,6 +11573,7 @@ var isMobile = /(iPhone)|(iPod)|(android)|(webOS)/i.exec(navigator.userAgent) !=
|
|
|
11558
11573
|
|
|
11559
11574
|
|
|
11560
11575
|
|
|
11576
|
+
|
|
11561
11577
|
function ChatFrame_createSuper(Derived) { var hasNativeReflectConstruct = ChatFrame_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); }; }
|
|
11562
11578
|
|
|
11563
11579
|
function ChatFrame_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; } }
|
|
@@ -12324,8 +12340,20 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12324
12340
|
value: function render() {
|
|
12325
12341
|
var _this$props12 = this.props,
|
|
12326
12342
|
name = _this$props12.name,
|
|
12343
|
+
client = _this$props12.client,
|
|
12327
12344
|
isDrawerOpen = _this$props12.isDrawerOpen;
|
|
12328
12345
|
var iFrameName = "ada-".concat(name, "-frame");
|
|
12346
|
+
|
|
12347
|
+
var roleDescription = function roleDescription() {
|
|
12348
|
+
var _context23;
|
|
12349
|
+
|
|
12350
|
+
if (!(client !== null && client !== void 0 && client.handle)) {
|
|
12351
|
+
return "Chat Window";
|
|
12352
|
+
}
|
|
12353
|
+
|
|
12354
|
+
return "".concat(client.handle.charAt(0).toUpperCase() + slice_default()(_context23 = client.handle).call(_context23, 1), " Chat Window");
|
|
12355
|
+
};
|
|
12356
|
+
|
|
12329
12357
|
return v("iframe", {
|
|
12330
12358
|
src: this.url,
|
|
12331
12359
|
scrolling: "no",
|
|
@@ -12337,6 +12365,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12337
12365
|
title: iFrameName,
|
|
12338
12366
|
className: iFrameName,
|
|
12339
12367
|
"aria-expanded": isDrawerOpen,
|
|
12368
|
+
"aria-roledescription": roleDescription(),
|
|
12340
12369
|
allowTransparency: true,
|
|
12341
12370
|
allowFullScreen: true,
|
|
12342
12371
|
onLoad: this.frameLoaded.bind(this)
|
|
@@ -14379,7 +14408,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
14379
14408
|
/* harmony export */ });
|
|
14380
14409
|
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);
|
|
14381
14410
|
var isProduction = "production" === "production";
|
|
14382
|
-
var embed2Version = "
|
|
14411
|
+
var embed2Version = "6707009";
|
|
14383
14412
|
|
|
14384
14413
|
/***/ }),
|
|
14385
14414
|
|
|
@@ -14725,9 +14754,9 @@ function _log() {
|
|
|
14725
14754
|
service: "embed",
|
|
14726
14755
|
env: "production",
|
|
14727
14756
|
embedVersion: 2,
|
|
14728
|
-
version: "1.1.
|
|
14757
|
+
version: "1.1.3",
|
|
14729
14758
|
isNpm: true,
|
|
14730
|
-
commitHash: "
|
|
14759
|
+
commitHash: "6707009"
|
|
14731
14760
|
}))
|
|
14732
14761
|
});
|
|
14733
14762
|
|
|
@@ -25668,7 +25697,7 @@ function _loadClientChunk() {
|
|
|
25668
25697
|
polyfillVersionString = "legacy";
|
|
25669
25698
|
}
|
|
25670
25699
|
|
|
25671
|
-
clientScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "
|
|
25700
|
+
clientScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "6707009", "/index.js");
|
|
25672
25701
|
} // `window.__AdaEmbedConstructor` gets created in the "client" bundle
|
|
25673
25702
|
|
|
25674
25703
|
|