@inboxsdk/core 2.2.15 → 2.2.17
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.17-1783630599514-85b889d6702953de";
|
|
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.17-1783630599514-85b889d6702953de");
|
|
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;
|
|
@@ -6145,10 +6149,12 @@ class GmailComposeView {
|
|
|
6145
6149
|
return result;
|
|
6146
6150
|
}
|
|
6147
6151
|
getCloseButton() {
|
|
6148
|
-
|
|
6152
|
+
// Prefer legacy <img> titlebar controls; fall back to newer <button class="Ha">.
|
|
6153
|
+
return this.#element.querySelectorAll('.Hm > img')[2] || (0,querySelectorOrFail/* default */.A)(this.#element, '.Hm .Ha');
|
|
6149
6154
|
}
|
|
6150
6155
|
getMoleSwitchButton() {
|
|
6151
|
-
|
|
6156
|
+
// Prefer legacy <img> titlebar controls; fall back to newer <button class="Hq">.
|
|
6157
|
+
return this.#element.querySelectorAll('.Hm > img')[1] || (0,querySelectorOrFail/* default */.A)(this.#element, '.Hm .Hq');
|
|
6152
6158
|
}
|
|
6153
6159
|
getBottomBarTable() {
|
|
6154
6160
|
return (0,querySelectorOrFail/* default */.A)(this.#element, '.aoP .aDh > table');
|
|
@@ -6285,20 +6291,28 @@ class GmailComposeView {
|
|
|
6285
6291
|
setMinimized(minimized) {
|
|
6286
6292
|
if (minimized !== this.isMinimized()) {
|
|
6287
6293
|
if (this.#isInlineReplyForm) throw new Error('Not implemented for inline compose views');
|
|
6288
|
-
|
|
6294
|
+
// Prefer legacy <img>; fall back to newer <button class="Hl">.
|
|
6295
|
+
const minimizeButton = this.#element.querySelector('.Hm > img') || (0,querySelectorOrFail/* default */.A)(this.#element, '.Hm .Hl');
|
|
6289
6296
|
(0,simulate_mouse_event/* simulateClick */.jp)(minimizeButton);
|
|
6290
6297
|
}
|
|
6291
6298
|
}
|
|
6292
6299
|
setFullscreen(fullscreen) {
|
|
6293
6300
|
if (fullscreen !== this.isFullscreen()) {
|
|
6294
6301
|
if (this.#isInlineReplyForm) throw new Error('Not implemented for inline compose views');
|
|
6295
|
-
|
|
6302
|
+
// Prefer legacy <img>; fall back to newer <button class="Hq">.
|
|
6303
|
+
const fullscreenButton = this.#element.querySelector('.Hm > img:nth-of-type(2)') || (0,querySelectorOrFail/* default */.A)(this.#element, '.Hm .Hq');
|
|
6296
6304
|
(0,simulate_mouse_event/* simulateClick */.jp)(fullscreenButton);
|
|
6297
6305
|
}
|
|
6298
6306
|
}
|
|
6299
6307
|
setTitleBarColor(color) {
|
|
6300
|
-
|
|
6301
|
-
const
|
|
6308
|
+
// Gmail A/B-renames the `Ht` token; fall back to a structural selector.
|
|
6309
|
+
const buttonParent = this.#element.querySelector('.nH.Hy.aXJ table.cf.Ht td.Hm') || this.#element.querySelector('.nH.Hy.aXJ table.cf td.Hm');
|
|
6310
|
+
if (!buttonParent) {
|
|
6311
|
+
// cosmetic; log and skip rather than throw
|
|
6312
|
+
this.#driver.getLogger().error(new Error('setTitleBarColor: could not find compose title bar'));
|
|
6313
|
+
return (noop_default());
|
|
6314
|
+
}
|
|
6315
|
+
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
6316
|
buttonParent.classList.add('inboxsdk__compose_customTitleBarColor');
|
|
6303
6317
|
elementsToModify.forEach(el => {
|
|
6304
6318
|
el.style.backgroundColor = color;
|
|
@@ -6314,13 +6328,22 @@ class GmailComposeView {
|
|
|
6314
6328
|
if (this.isInlineReplyForm()) {
|
|
6315
6329
|
throw new Error('setTitleBarText() is not supported on inline compose views');
|
|
6316
6330
|
}
|
|
6317
|
-
|
|
6331
|
+
|
|
6332
|
+
// Gmail A/B-renames the `Ht` token; fall back to a structural selector.
|
|
6333
|
+
const titleBarTable = this.#element.querySelector('.nH.Hy.aXJ table.cf.Ht') || this.#element.querySelector('.nH.Hy.aXJ table.cf');
|
|
6334
|
+
if (!titleBarTable) {
|
|
6335
|
+
// cosmetic; log and skip rather than throw
|
|
6336
|
+
this.#driver.getLogger().error(new Error('setTitleBarText: could not find compose title bar'));
|
|
6337
|
+
return (noop_default());
|
|
6338
|
+
}
|
|
6318
6339
|
if (titleBarTable.classList.contains('inboxsdk__compose_hasCustomTitleBarText')) {
|
|
6319
6340
|
throw new Error('Custom title bar text is already registered for this compose view');
|
|
6320
6341
|
}
|
|
6321
|
-
const titleTextParent = (
|
|
6342
|
+
const titleTextParent = titleBarTable.querySelector('div.Hp')?.parentElement;
|
|
6322
6343
|
if (!(titleTextParent instanceof HTMLElement)) {
|
|
6323
|
-
|
|
6344
|
+
// cosmetic; log and skip rather than throw
|
|
6345
|
+
this.#driver.getLogger().error(new Error('setTitleBarText: could not locate title bar text parent'));
|
|
6346
|
+
return (noop_default());
|
|
6324
6347
|
}
|
|
6325
6348
|
titleBarTable.classList.add('inboxsdk__compose_hasCustomTitleBarText');
|
|
6326
6349
|
titleTextParent.classList.add('inboxsdk__compose_nativeTitleBarText');
|
|
@@ -10313,7 +10336,7 @@ options.insert = htmlElement => {
|
|
|
10313
10336
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10314
10337
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10315
10338
|
///@ts-ignore
|
|
10316
|
-
"2.2.
|
|
10339
|
+
"2.2.17-1783630599514-85b889d6702953de");
|
|
10317
10340
|
document.head.append(htmlElement);
|
|
10318
10341
|
};
|
|
10319
10342
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -15075,7 +15098,7 @@ options.insert = htmlElement => {
|
|
|
15075
15098
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
15076
15099
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
15077
15100
|
///@ts-ignore
|
|
15078
|
-
"2.2.
|
|
15101
|
+
"2.2.17-1783630599514-85b889d6702953de");
|
|
15079
15102
|
document.head.append(htmlElement);
|
|
15080
15103
|
};
|
|
15081
15104
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -19841,7 +19864,7 @@ mole_view_module_options.insert = htmlElement => {
|
|
|
19841
19864
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
19842
19865
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
19843
19866
|
///@ts-ignore
|
|
19844
|
-
"2.2.
|
|
19867
|
+
"2.2.17-1783630599514-85b889d6702953de");
|
|
19845
19868
|
document.head.append(htmlElement);
|
|
19846
19869
|
};
|
|
19847
19870
|
mole_view_module_options.domAPI = (styleDomAPI_default());
|