@inboxsdk/core 2.2.22 → 2.2.23
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 +39 -12
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/selectors.d.ts +10 -0
- package/src/platform-implementation-js/dom-driver/gmail/selectors.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/page-parser.d.ts +2 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/page-parser.d.ts.map +1 -1
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.23-1788892817778-0b7ebbd328d16089";
|
|
375
375
|
if (false) {}
|
|
376
376
|
|
|
377
377
|
/***/ }),
|
|
@@ -2711,7 +2711,7 @@ options.insert = htmlElement => {
|
|
|
2711
2711
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
2712
2712
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
2713
2713
|
///@ts-ignore
|
|
2714
|
-
"2.2.
|
|
2714
|
+
"2.2.23-1788892817778-0b7ebbd328d16089");
|
|
2715
2715
|
document.head.append(htmlElement);
|
|
2716
2716
|
};
|
|
2717
2717
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -10383,7 +10383,7 @@ options.insert = htmlElement => {
|
|
|
10383
10383
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10384
10384
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10385
10385
|
///@ts-ignore
|
|
10386
|
-
"2.2.
|
|
10386
|
+
"2.2.23-1788892817778-0b7ebbd328d16089");
|
|
10387
10387
|
document.head.append(htmlElement);
|
|
10388
10388
|
};
|
|
10389
10389
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -15289,7 +15289,7 @@ options.insert = htmlElement => {
|
|
|
15289
15289
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
15290
15290
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
15291
15291
|
///@ts-ignore
|
|
15292
|
-
"2.2.
|
|
15292
|
+
"2.2.23-1788892817778-0b7ebbd328d16089");
|
|
15293
15293
|
document.head.append(htmlElement);
|
|
15294
15294
|
};
|
|
15295
15295
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -15912,7 +15912,7 @@ var isNotNil = __webpack_require__(960);
|
|
|
15912
15912
|
|
|
15913
15913
|
|
|
15914
15914
|
|
|
15915
|
-
function makePageParser(element, logger) {
|
|
15915
|
+
function makePageParser(element, logger, selectors) {
|
|
15916
15916
|
return new (page_parser_tree_js_default())(element, {
|
|
15917
15917
|
logError(err, el) {
|
|
15918
15918
|
const details = {
|
|
@@ -15926,18 +15926,21 @@ function makePageParser(element, logger) {
|
|
|
15926
15926
|
sources: [null],
|
|
15927
15927
|
tag: 'rowListElementContainer',
|
|
15928
15928
|
selectors: [{
|
|
15929
|
-
$map: () =>
|
|
15929
|
+
$map: () => selectors.querySelectorByKey(document, 'routeView.rowListWrapper')?.parentElement
|
|
15930
15930
|
}]
|
|
15931
15931
|
}, {
|
|
15932
15932
|
sources: ['rowListElementContainer'],
|
|
15933
15933
|
tag: 'rowListElement',
|
|
15934
|
-
selectors: [
|
|
15934
|
+
selectors: [
|
|
15935
|
+
// `.bGI.nH` stays literal here: this is a descent path, and a
|
|
15936
|
+
// registry key resolves a single element rather than a path step.
|
|
15937
|
+
{
|
|
15935
15938
|
$or: [[], ['.bGI.nH', '.bf5', '.bv9', '.bGC']]
|
|
15936
15939
|
}, '.bGI[role=main]', '[gh=tl]']
|
|
15937
15940
|
}],
|
|
15938
15941
|
finders: {
|
|
15939
15942
|
rowListElementContainer: {
|
|
15940
|
-
fn: root => [
|
|
15943
|
+
fn: root => [selectors.querySelectorByKey(root, 'routeView.rowListWrapper')?.parentElement].filter(isNotNil/* default */.A)
|
|
15941
15944
|
},
|
|
15942
15945
|
rowListElement: {
|
|
15943
15946
|
fn: root => root.querySelectorAll('[gh=tl]')
|
|
@@ -16036,7 +16039,7 @@ class GmailRouteView {
|
|
|
16036
16039
|
this.#driver = driver;
|
|
16037
16040
|
this._eventStream = kefir_bus_default()();
|
|
16038
16041
|
this._hasAddedCollapsibleSection = false;
|
|
16039
|
-
this.#page = makePageParser(document.body, driver.getLogger());
|
|
16042
|
+
this.#page = makePageParser(document.body, driver.getLogger(), driver.selectors);
|
|
16040
16043
|
if (this._type === 'CUSTOM') {
|
|
16041
16044
|
this._setupCustomViewElement();
|
|
16042
16045
|
driver.getStopper().takeUntilBy(this._stopper.delay(0)).onValue(() => {
|
|
@@ -16349,13 +16352,27 @@ class GmailRouteView {
|
|
|
16349
16352
|
if (!sectionsContainer) {
|
|
16350
16353
|
sectionsContainer = document.createElement('div');
|
|
16351
16354
|
sectionsContainer.classList.add('inboxsdk__custom_sections');
|
|
16352
|
-
main
|
|
16355
|
+
this.#insertSectionsContainer(main, sectionsContainer);
|
|
16353
16356
|
} else if (sectionsContainer.classList.contains('Wc') && !this._isSearchRoute()) {
|
|
16354
16357
|
sectionsContainer.classList.remove('Wc');
|
|
16355
16358
|
}
|
|
16356
16359
|
return sectionsContainer;
|
|
16357
16360
|
}).toProperty();
|
|
16358
16361
|
}
|
|
16362
|
+
|
|
16363
|
+
/**
|
|
16364
|
+
* Gmail nests the list toolbar inside the row list wrapper, so the top of
|
|
16365
|
+
* the container is above it.
|
|
16366
|
+
*/
|
|
16367
|
+
#insertSectionsContainer(main, sectionsContainer) {
|
|
16368
|
+
const rowListWrapper = this.#driver.selectors.querySelectorByKey(main, 'routeView.rowListWrapper');
|
|
16369
|
+
const listToolbar = rowListWrapper && this.#driver.selectors.querySelectorByKey(rowListWrapper, 'routeView.listToolbar');
|
|
16370
|
+
if (listToolbar?.parentElement) {
|
|
16371
|
+
listToolbar.parentElement.insertBefore(sectionsContainer, listToolbar.nextSibling);
|
|
16372
|
+
return;
|
|
16373
|
+
}
|
|
16374
|
+
main.insertBefore(sectionsContainer, main.firstChild);
|
|
16375
|
+
}
|
|
16359
16376
|
_getCustomParams() {
|
|
16360
16377
|
var params = Object.create(null);
|
|
16361
16378
|
if (!this._customRouteID) throw new Error("Should not happen, can't get custom params for non-custom view");
|
|
@@ -20052,7 +20069,7 @@ mole_view_module_options.insert = htmlElement => {
|
|
|
20052
20069
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
20053
20070
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
20054
20071
|
///@ts-ignore
|
|
20055
|
-
"2.2.
|
|
20072
|
+
"2.2.23-1788892817778-0b7ebbd328d16089");
|
|
20056
20073
|
document.head.append(htmlElement);
|
|
20057
20074
|
};
|
|
20058
20075
|
mole_view_module_options.domAPI = (styleDomAPI_default());
|
|
@@ -24500,7 +24517,17 @@ const GMAIL_SELECTORS = {
|
|
|
24500
24517
|
* when it contains emoji images.
|
|
24501
24518
|
* Root: thread element.
|
|
24502
24519
|
*/
|
|
24503
|
-
'threadView.subject': ['.ha h2']
|
|
24520
|
+
'threadView.subject': ['.ha h2'],
|
|
24521
|
+
/**
|
|
24522
|
+
* The element holding the list toolbar and the thread list.
|
|
24523
|
+
* Root: the row list element container.
|
|
24524
|
+
*/
|
|
24525
|
+
'routeView.rowListWrapper': ['.bGI.nH'],
|
|
24526
|
+
/**
|
|
24527
|
+
* The toolbar above the thread list.
|
|
24528
|
+
* Root: `routeView.rowListWrapper`.
|
|
24529
|
+
*/
|
|
24530
|
+
'routeView.listToolbar': ['[gh=tm]', '.G-atb']
|
|
24504
24531
|
};
|
|
24505
24532
|
|
|
24506
24533
|
/** Resolved candidates for every key. The merge builds new lists. */
|