@inboxsdk/core 2.1.54 → 2.1.56
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/inboxsdk.js +9 -119
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js +8 -80
- package/pageWorld.js.map +1 -1
- package/src/injected-js/setupCustomViewEventAssassin.d.ts.map +1 -1
- package/src/injected-js/setupInboxCustomViewLinkFixer.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/page-parser.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/fromEventsWithOptions.d.ts +1 -2
- package/src/platform-implementation-js/lib/fromEventsWithOptions.d.ts.map +1 -1
package/package.json
CHANGED
package/pageWorld.js
CHANGED
|
@@ -3495,17 +3495,14 @@ function setupEventReemitter() {
|
|
|
3495
3495
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3496
3496
|
/* harmony export */ A: () => (/* binding */ setupCustomViewEventAssassin)
|
|
3497
3497
|
/* harmony export */ });
|
|
3498
|
-
/* harmony import */ var
|
|
3498
|
+
/* harmony import */ var ud__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7332);
|
|
3499
3499
|
/* harmony import */ var lodash_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5193);
|
|
3500
3500
|
/* harmony import */ var lodash_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_includes__WEBPACK_IMPORTED_MODULE_0__);
|
|
3501
|
-
/* harmony import */ var
|
|
3502
|
-
/* harmony import */ var closest_ng__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(closest_ng__WEBPACK_IMPORTED_MODULE_1__);
|
|
3503
|
-
/* harmony import */ var _injected_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4530);
|
|
3501
|
+
/* harmony import */ var _injected_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4530);
|
|
3504
3502
|
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
3505
3503
|
|
|
3506
3504
|
|
|
3507
3505
|
|
|
3508
|
-
|
|
3509
3506
|
function md(value) {
|
|
3510
3507
|
return {
|
|
3511
3508
|
value,
|
|
@@ -3534,24 +3531,24 @@ function shouldBlockEvent(event) {
|
|
|
3534
3531
|
|
|
3535
3532
|
// Block all escape key presses inside a custom view, even when an input
|
|
3536
3533
|
// is focused.
|
|
3537
|
-
if (event.key === 'Escape' &&
|
|
3534
|
+
if (event.key === 'Escape' && target instanceof HTMLElement && target.closest('.inboxsdk__custom_view')) {
|
|
3538
3535
|
return true;
|
|
3539
3536
|
}
|
|
3540
3537
|
if (lodash_includes__WEBPACK_IMPORTED_MODULE_0___default()(blockedAnyModKeys, key) || /* safari */lodash_includes__WEBPACK_IMPORTED_MODULE_0___default()(blockedKeyIdentifiers, event.keyIdentifier) || lodash_includes__WEBPACK_IMPORTED_MODULE_0___default()(blockedAnyModCharacters, key) || !event.shiftKey && !event.ctrlKey && !event.metaKey && !event.altKey && lodash_includes__WEBPACK_IMPORTED_MODULE_0___default()(blockedNoModCharacters, key) || event.shiftKey && !event.ctrlKey && !event.metaKey && !event.altKey && lodash_includes__WEBPACK_IMPORTED_MODULE_0___default()(blockedShiftCharacters, key.toLowerCase())) {
|
|
3541
3538
|
if (
|
|
3542
3539
|
// Gmail already ignores events originating in these elements even if
|
|
3543
3540
|
// they were made by an extension.
|
|
3544
|
-
|
|
3541
|
+
target instanceof HTMLElement && target.closest('input, textarea, button, [contenteditable]') ||
|
|
3545
3542
|
// Gmail ignores events originating in its own interactive elements
|
|
3546
3543
|
// which tend to have certain role attributes.
|
|
3547
|
-
!
|
|
3544
|
+
target instanceof HTMLElement && !target.closest('.inboxsdk__custom_view') && target.closest('[role=button], [role=link]')) {
|
|
3548
3545
|
return false;
|
|
3549
3546
|
}
|
|
3550
3547
|
return true;
|
|
3551
3548
|
}
|
|
3552
3549
|
return false;
|
|
3553
3550
|
}
|
|
3554
|
-
const handler = (0,
|
|
3551
|
+
const handler = (0,ud__WEBPACK_IMPORTED_MODULE_1__.defn)(module, function (event) {
|
|
3555
3552
|
try {
|
|
3556
3553
|
// If the key is in a blacklist and it originated while a custom view is
|
|
3557
3554
|
// present, then maim the event object before Gmail or Inbox sees it.
|
|
@@ -3569,7 +3566,7 @@ const handler = (0,ud__WEBPACK_IMPORTED_MODULE_2__.defn)(module, function (event
|
|
|
3569
3566
|
});
|
|
3570
3567
|
}
|
|
3571
3568
|
} catch (err) {
|
|
3572
|
-
|
|
3569
|
+
_injected_logger__WEBPACK_IMPORTED_MODULE_2__.error(err);
|
|
3573
3570
|
}
|
|
3574
3571
|
});
|
|
3575
3572
|
function setupCustomViewEventAssassin() {
|
|
@@ -3585,9 +3582,6 @@ function setupCustomViewEventAssassin() {
|
|
|
3585
3582
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3586
3583
|
/* harmony export */ A: () => (/* binding */ setupInboxCustomViewLinkFixer)
|
|
3587
3584
|
/* harmony export */ });
|
|
3588
|
-
/* harmony import */ var closest_ng__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8104);
|
|
3589
|
-
/* harmony import */ var closest_ng__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(closest_ng__WEBPACK_IMPORTED_MODULE_0__);
|
|
3590
|
-
|
|
3591
3585
|
function setupInboxCustomViewLinkFixer() {
|
|
3592
3586
|
const allowedStartTerms = new Set();
|
|
3593
3587
|
document.addEventListener('inboxSDKregisterAllowedHashLinkStartTerm', function (event) {
|
|
@@ -3597,7 +3591,7 @@ function setupInboxCustomViewLinkFixer() {
|
|
|
3597
3591
|
document.addEventListener('click', function (event) {
|
|
3598
3592
|
const target = event.target;
|
|
3599
3593
|
if (!(target instanceof HTMLElement)) return;
|
|
3600
|
-
const anchor =
|
|
3594
|
+
const anchor = target.closest('a[href^="#"]');
|
|
3601
3595
|
if (!anchor || !(anchor instanceof HTMLAnchorElement)) return;
|
|
3602
3596
|
const m = /^#([^/]+)/.exec(anchor.getAttribute('href') || '');
|
|
3603
3597
|
if (!m) return;
|
|
@@ -7384,40 +7378,6 @@ var __WEBPACK_AMD_DEFINE_RESULT__;;(function (globalObject) {
|
|
|
7384
7378
|
})(this);
|
|
7385
7379
|
|
|
7386
7380
|
|
|
7387
|
-
/***/ }),
|
|
7388
|
-
|
|
7389
|
-
/***/ 8104:
|
|
7390
|
-
/***/ ((module, exports, __webpack_require__) => {
|
|
7391
|
-
|
|
7392
|
-
"use strict";
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
exports.__esModule = true;
|
|
7396
|
-
exports["default"] = closest;
|
|
7397
|
-
|
|
7398
|
-
var _matchesSelectorNg = _interopRequireDefault(__webpack_require__(9864));
|
|
7399
|
-
|
|
7400
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
7401
|
-
|
|
7402
|
-
var proto = __webpack_require__.g.Element && __webpack_require__.g.Element.prototype;
|
|
7403
|
-
var vendor = proto && proto.closest;
|
|
7404
|
-
|
|
7405
|
-
function closest(element, selector) {
|
|
7406
|
-
if (vendor) return vendor.call(element, selector);
|
|
7407
|
-
var parent = element;
|
|
7408
|
-
|
|
7409
|
-
do {
|
|
7410
|
-
if ((0, _matchesSelectorNg.default)(parent, selector)) return parent;
|
|
7411
|
-
parent = parent.parentNode;
|
|
7412
|
-
} while (parent && parent !== __webpack_require__.g.document);
|
|
7413
|
-
|
|
7414
|
-
return null;
|
|
7415
|
-
}
|
|
7416
|
-
|
|
7417
|
-
module.exports = exports.default;
|
|
7418
|
-
module.exports["default"] = exports.default;
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
7381
|
/***/ }),
|
|
7422
7382
|
|
|
7423
7383
|
/***/ 4785:
|
|
@@ -18838,38 +18798,6 @@ function values(object) {
|
|
|
18838
18798
|
module.exports = values;
|
|
18839
18799
|
|
|
18840
18800
|
|
|
18841
|
-
/***/ }),
|
|
18842
|
-
|
|
18843
|
-
/***/ 9864:
|
|
18844
|
-
/***/ ((module, exports, __webpack_require__) => {
|
|
18845
|
-
|
|
18846
|
-
"use strict";
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
exports.__esModule = true;
|
|
18850
|
-
exports["default"] = match;
|
|
18851
|
-
var proto = __webpack_require__.g.Element && __webpack_require__.g.Element.prototype;
|
|
18852
|
-
var vendor = proto && (proto.matches || proto.matchesSelector || proto.webkitMatchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector);
|
|
18853
|
-
|
|
18854
|
-
function match(el, selector) {
|
|
18855
|
-
if (vendor) return vendor.call(el, selector);
|
|
18856
|
-
var parentNode = el.parentNode;
|
|
18857
|
-
|
|
18858
|
-
if (parentNode && typeof parentNode.querySelectorAll === 'function') {
|
|
18859
|
-
var nodes = parentNode.querySelectorAll(selector);
|
|
18860
|
-
|
|
18861
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
18862
|
-
if (nodes[i] === el) return true;
|
|
18863
|
-
}
|
|
18864
|
-
}
|
|
18865
|
-
|
|
18866
|
-
return false;
|
|
18867
|
-
}
|
|
18868
|
-
|
|
18869
|
-
module.exports = exports.default;
|
|
18870
|
-
module.exports["default"] = exports.default;
|
|
18871
|
-
|
|
18872
|
-
|
|
18873
18801
|
/***/ }),
|
|
18874
18802
|
|
|
18875
18803
|
/***/ 8498:
|