@inboxsdk/core 2.2.15 → 2.2.16
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
CHANGED
|
@@ -371,7 +371,7 @@ function isNotNil(value) {
|
|
|
371
371
|
|
|
372
372
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- SDK_VERSION is injected by webpack
|
|
373
373
|
///@ts-ignore
|
|
374
|
-
const BUILD_VERSION = "2.2.
|
|
374
|
+
const BUILD_VERSION = "2.2.16-1783455994598-383ba7105eb7983b";
|
|
375
375
|
if (false) {}
|
|
376
376
|
|
|
377
377
|
/***/ }),
|
|
@@ -2665,7 +2665,7 @@ options.insert = htmlElement => {
|
|
|
2665
2665
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
2666
2666
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
2667
2667
|
///@ts-ignore
|
|
2668
|
-
"2.2.
|
|
2668
|
+
"2.2.16-1783455994598-383ba7105eb7983b");
|
|
2669
2669
|
document.head.append(htmlElement);
|
|
2670
2670
|
};
|
|
2671
2671
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -3686,6 +3686,9 @@ var constant_default = /*#__PURE__*/__webpack_require__.n(constant);
|
|
|
3686
3686
|
// EXTERNAL MODULE: ./node_modules/lodash/find.js
|
|
3687
3687
|
var find = __webpack_require__(4455);
|
|
3688
3688
|
var find_default = /*#__PURE__*/__webpack_require__.n(find);
|
|
3689
|
+
// EXTERNAL MODULE: ./node_modules/lodash/noop.js
|
|
3690
|
+
var noop = __webpack_require__(1700);
|
|
3691
|
+
var noop_default = /*#__PURE__*/__webpack_require__.n(noop);
|
|
3689
3692
|
// EXTERNAL MODULE: ./node_modules/asap/browser-asap.js
|
|
3690
3693
|
var browser_asap = __webpack_require__(4622);
|
|
3691
3694
|
var browser_asap_default = /*#__PURE__*/__webpack_require__.n(browser_asap);
|
|
@@ -5328,6 +5331,7 @@ function setFromEmail(driver, gmailComposeView, email) {
|
|
|
5328
5331
|
|
|
5329
5332
|
|
|
5330
5333
|
|
|
5334
|
+
|
|
5331
5335
|
|
|
5332
5336
|
|
|
5333
5337
|
let hasReportedMissingBody = false;
|
|
@@ -6297,8 +6301,14 @@ class GmailComposeView {
|
|
|
6297
6301
|
}
|
|
6298
6302
|
}
|
|
6299
6303
|
setTitleBarColor(color) {
|
|
6300
|
-
|
|
6301
|
-
const
|
|
6304
|
+
// Gmail A/B-renames the `Ht` token; fall back to a structural selector.
|
|
6305
|
+
const buttonParent = this.#element.querySelector('.nH.Hy.aXJ table.cf.Ht td.Hm') || this.#element.querySelector('.nH.Hy.aXJ table.cf td.Hm');
|
|
6306
|
+
if (!buttonParent) {
|
|
6307
|
+
// cosmetic; log and skip rather than throw
|
|
6308
|
+
this.#driver.getLogger().error(new Error('setTitleBarColor: could not find compose title bar'));
|
|
6309
|
+
return (noop_default());
|
|
6310
|
+
}
|
|
6311
|
+
const elementsToModify = [this.#element.querySelector('.nH.Hy.aXJ .pi > .l.o'), this.#element.querySelector('.nH.Hy.aXJ .l.m'), this.#element.querySelector('.nH.Hy.aXJ .l.m > .l.n')].filter(el => el != null);
|
|
6302
6312
|
buttonParent.classList.add('inboxsdk__compose_customTitleBarColor');
|
|
6303
6313
|
elementsToModify.forEach(el => {
|
|
6304
6314
|
el.style.backgroundColor = color;
|
|
@@ -6314,13 +6324,22 @@ class GmailComposeView {
|
|
|
6314
6324
|
if (this.isInlineReplyForm()) {
|
|
6315
6325
|
throw new Error('setTitleBarText() is not supported on inline compose views');
|
|
6316
6326
|
}
|
|
6317
|
-
|
|
6327
|
+
|
|
6328
|
+
// Gmail A/B-renames the `Ht` token; fall back to a structural selector.
|
|
6329
|
+
const titleBarTable = this.#element.querySelector('.nH.Hy.aXJ table.cf.Ht') || this.#element.querySelector('.nH.Hy.aXJ table.cf');
|
|
6330
|
+
if (!titleBarTable) {
|
|
6331
|
+
// cosmetic; log and skip rather than throw
|
|
6332
|
+
this.#driver.getLogger().error(new Error('setTitleBarText: could not find compose title bar'));
|
|
6333
|
+
return (noop_default());
|
|
6334
|
+
}
|
|
6318
6335
|
if (titleBarTable.classList.contains('inboxsdk__compose_hasCustomTitleBarText')) {
|
|
6319
6336
|
throw new Error('Custom title bar text is already registered for this compose view');
|
|
6320
6337
|
}
|
|
6321
|
-
const titleTextParent = (
|
|
6338
|
+
const titleTextParent = titleBarTable.querySelector('div.Hp')?.parentElement;
|
|
6322
6339
|
if (!(titleTextParent instanceof HTMLElement)) {
|
|
6323
|
-
|
|
6340
|
+
// cosmetic; log and skip rather than throw
|
|
6341
|
+
this.#driver.getLogger().error(new Error('setTitleBarText: could not locate title bar text parent'));
|
|
6342
|
+
return (noop_default());
|
|
6324
6343
|
}
|
|
6325
6344
|
titleBarTable.classList.add('inboxsdk__compose_hasCustomTitleBarText');
|
|
6326
6345
|
titleTextParent.classList.add('inboxsdk__compose_nativeTitleBarText');
|
|
@@ -10313,7 +10332,7 @@ options.insert = htmlElement => {
|
|
|
10313
10332
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10314
10333
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10315
10334
|
///@ts-ignore
|
|
10316
|
-
"2.2.
|
|
10335
|
+
"2.2.16-1783455994598-383ba7105eb7983b");
|
|
10317
10336
|
document.head.append(htmlElement);
|
|
10318
10337
|
};
|
|
10319
10338
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -15075,7 +15094,7 @@ options.insert = htmlElement => {
|
|
|
15075
15094
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
15076
15095
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
15077
15096
|
///@ts-ignore
|
|
15078
|
-
"2.2.
|
|
15097
|
+
"2.2.16-1783455994598-383ba7105eb7983b");
|
|
15079
15098
|
document.head.append(htmlElement);
|
|
15080
15099
|
};
|
|
15081
15100
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -19841,7 +19860,7 @@ mole_view_module_options.insert = htmlElement => {
|
|
|
19841
19860
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
19842
19861
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
19843
19862
|
///@ts-ignore
|
|
19844
|
-
"2.2.
|
|
19863
|
+
"2.2.16-1783455994598-383ba7105eb7983b");
|
|
19845
19864
|
document.head.append(htmlElement);
|
|
19846
19865
|
};
|
|
19847
19866
|
mole_view_module_options.domAPI = (styleDomAPI_default());
|