@inboxsdk/core 2.1.22 → 2.1.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
CHANGED
|
@@ -814,7 +814,7 @@ function isElementVisible(el) {
|
|
|
814
814
|
|
|
815
815
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- SDK_VERSION is injected by webpack
|
|
816
816
|
///@ts-ignore
|
|
817
|
-
const BUILD_VERSION = "2.1.
|
|
817
|
+
const BUILD_VERSION = "2.1.23-1701352191820-be7d2f48de74c647";
|
|
818
818
|
if (false) {}
|
|
819
819
|
|
|
820
820
|
/***/ }),
|
|
@@ -10510,7 +10510,7 @@ options.insert = htmlElement => {
|
|
|
10510
10510
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10511
10511
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10512
10512
|
///@ts-ignore
|
|
10513
|
-
"2.1.
|
|
10513
|
+
"2.1.23-1701352191820-be7d2f48de74c647");
|
|
10514
10514
|
document.head.append(htmlElement);
|
|
10515
10515
|
};
|
|
10516
10516
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -15840,6 +15840,7 @@ function extractDocumentHtmlAndCss() {
|
|
|
15840
15840
|
|
|
15841
15841
|
class GmailRouteView {
|
|
15842
15842
|
_stopper = js_default()();
|
|
15843
|
+
#driver;
|
|
15843
15844
|
#page;
|
|
15844
15845
|
#destroyed = false;
|
|
15845
15846
|
constructor(_ref, gmailRouteProcessor, driver) {
|
|
@@ -15858,7 +15859,7 @@ class GmailRouteView {
|
|
|
15858
15859
|
this._stopper = js_default()();
|
|
15859
15860
|
this._rowListViews = [];
|
|
15860
15861
|
this._gmailRouteProcessor = gmailRouteProcessor;
|
|
15861
|
-
this
|
|
15862
|
+
this.#driver = driver;
|
|
15862
15863
|
this._eventStream = kefir_bus_default()();
|
|
15863
15864
|
this._hasAddedCollapsibleSection = false;
|
|
15864
15865
|
this.#page = makePageParser(document.body, driver.getLogger());
|
|
@@ -15955,7 +15956,7 @@ class GmailRouteView {
|
|
|
15955
15956
|
}
|
|
15956
15957
|
#addCollapsibleSection(collapsibleSectionDescriptorProperty, groupOrderHint, isCollapsible) {
|
|
15957
15958
|
this._hasAddedCollapsibleSection = true;
|
|
15958
|
-
var gmailResultsSectionView = new gmail_collapsible_section_view(this
|
|
15959
|
+
var gmailResultsSectionView = new gmail_collapsible_section_view(this.#driver, groupOrderHint, this.getRouteID() === this._gmailRouteProcessor.NativeRouteIDs.SEARCH, isCollapsible);
|
|
15959
15960
|
kefir_esm.combine([this.#getSectionsContainer(), gmailResultsSectionView.getEventStream().filter(event => {
|
|
15960
15961
|
return event.type === 'update' && event.property === 'orderHint';
|
|
15961
15962
|
})]).onValue(_ref2 => {
|
|
@@ -16012,7 +16013,7 @@ class GmailRouteView {
|
|
|
16012
16013
|
// role=main attribute is not set while page in a loading state
|
|
16013
16014
|
await (0,wait_for/* default */.Z)(() => document.querySelector('[role=main]'), 15_000);
|
|
16014
16015
|
} catch {
|
|
16015
|
-
this.
|
|
16016
|
+
this.#driver.getLogger().error(new querySelectorOrFail/* SelectorError */.u('[role=main]'), {
|
|
16016
16017
|
html: extractDocumentHtmlAndCss()
|
|
16017
16018
|
});
|
|
16018
16019
|
}
|
|
@@ -16028,7 +16029,7 @@ class GmailRouteView {
|
|
|
16028
16029
|
_processRowListElement(rowListElement) {
|
|
16029
16030
|
var rootElement = rowListElement.parentElement;
|
|
16030
16031
|
if (!rootElement) throw new Error('no rootElement');
|
|
16031
|
-
var gmailRowListView = new gmail_row_list_view(rootElement, this, this
|
|
16032
|
+
var gmailRowListView = new gmail_row_list_view(rootElement, this, this.#driver);
|
|
16032
16033
|
this._rowListViews.push(gmailRowListView);
|
|
16033
16034
|
this._eventStream.emit({
|
|
16034
16035
|
eventName: 'newGmailRowListView',
|
|
@@ -16041,7 +16042,7 @@ class GmailRouteView {
|
|
|
16041
16042
|
return;
|
|
16042
16043
|
}
|
|
16043
16044
|
if (parseResult?.threadContainerElement) {
|
|
16044
|
-
var gmailThreadView = new gmail_thread_view(parseResult.threadContainerElement, this, this
|
|
16045
|
+
var gmailThreadView = new gmail_thread_view(parseResult.threadContainerElement, this, this.#driver);
|
|
16045
16046
|
this._threadView = gmailThreadView;
|
|
16046
16047
|
this._eventStream.emit({
|
|
16047
16048
|
eventName: 'newGmailThreadView',
|
|
@@ -16089,8 +16090,8 @@ class GmailRouteView {
|
|
|
16089
16090
|
// avoid logging not found error in this case
|
|
16090
16091
|
} else {
|
|
16091
16092
|
const error = new Error("Thread container element wasn't found");
|
|
16092
|
-
if ((0,isStreakAppId/* default */.Z)(this.
|
|
16093
|
-
this.
|
|
16093
|
+
if ((0,isStreakAppId/* default */.Z)(this.#driver.getAppId())) {
|
|
16094
|
+
this.#driver.getLogger().error(error, {
|
|
16094
16095
|
html: extractDocumentHtmlAndCss()
|
|
16095
16096
|
});
|
|
16096
16097
|
}
|
|
@@ -16116,7 +16117,7 @@ class GmailRouteView {
|
|
|
16116
16117
|
async #startMonitoringPreviewPaneForThread(previewPaneContainer) {
|
|
16117
16118
|
let threadContainerElement;
|
|
16118
16119
|
const selector = 'table.Bs > tr';
|
|
16119
|
-
const
|
|
16120
|
+
const selector_2023_11_30 = '.ao9:has(.a98.iY, .apa)';
|
|
16120
16121
|
try {
|
|
16121
16122
|
threadContainerElement = await (0,wait_for/* default */.Z)(() => {
|
|
16122
16123
|
if (this.#destroyed) {
|
|
@@ -16126,14 +16127,14 @@ class GmailRouteView {
|
|
|
16126
16127
|
if (threadContainerElement) {
|
|
16127
16128
|
return threadContainerElement;
|
|
16128
16129
|
}
|
|
16129
|
-
return previewPaneContainer.querySelector(
|
|
16130
|
+
return previewPaneContainer.querySelector(selector_2023_11_30);
|
|
16130
16131
|
}, 15_000);
|
|
16131
16132
|
} catch {
|
|
16132
|
-
const selectorError = new querySelectorOrFail/* SelectorError */.u(`${selector}, ${
|
|
16133
|
+
const selectorError = new querySelectorOrFail/* SelectorError */.u(`${selector}, ${selector_2023_11_30}`, {
|
|
16133
16134
|
cause: new Error("Thread container for preview pane wasn't found")
|
|
16134
16135
|
});
|
|
16135
|
-
if ((0,isStreakAppId/* default */.Z)(this.
|
|
16136
|
-
this.
|
|
16136
|
+
if ((0,isStreakAppId/* default */.Z)(this.#driver.getAppId())) {
|
|
16137
|
+
this.#driver.getLogger().error(selectorError, {
|
|
16137
16138
|
html: extractDocumentHtmlAndCss()
|
|
16138
16139
|
});
|
|
16139
16140
|
}
|
|
@@ -16142,8 +16143,27 @@ class GmailRouteView {
|
|
|
16142
16143
|
if (threadContainerElement === 'destroyed') {
|
|
16143
16144
|
return;
|
|
16144
16145
|
}
|
|
16145
|
-
const elementStream = (0,make_element_child_stream/* default */.Z)(threadContainerElement).filter(event => !!event.el.querySelector('.if') || !!event.el.querySelector('.PeIF1d') || !!event.el.querySelector('.a98.iY') || event.el.matches('.a98.iY'))
|
|
16146
|
-
|
|
16146
|
+
const elementStream = (0,make_element_child_stream/* default */.Z)(threadContainerElement).filter(event => !!event.el.querySelector('.if') || !!event.el.querySelector('.PeIF1d') || !!event.el.querySelector('.a98.iY') || event.el.matches('.a98.iY')).onValue(_ref4 => {
|
|
16147
|
+
let {
|
|
16148
|
+
el
|
|
16149
|
+
} = _ref4;
|
|
16150
|
+
const versions = [];
|
|
16151
|
+
|
|
16152
|
+
// TODO: remove this once we're sure that all users are on the latest version
|
|
16153
|
+
if (el.matches(":has(.if)")) {
|
|
16154
|
+
versions.push('2014-11-06');
|
|
16155
|
+
} else if (el.matches(":has(.PeIF1d)")) {
|
|
16156
|
+
versions.push('2022-10-12');
|
|
16157
|
+
} else if (el.matches(":has(.a98.iY)")) {
|
|
16158
|
+
return versions.push('2022-11-21');
|
|
16159
|
+
} else if (el.matches(".a98.iY")) {
|
|
16160
|
+
versions.push('2023-11-22');
|
|
16161
|
+
}
|
|
16162
|
+
this.#driver.logger.eventSdkPassive('routeView#startMonitoringPreviewPaneForThread', {
|
|
16163
|
+
versions
|
|
16164
|
+
});
|
|
16165
|
+
});
|
|
16166
|
+
this._eventStream.plug(elementStream.flatMap(makeElementViewStream(element => new gmail_thread_view(element, this, this.#driver, true))).map(view => {
|
|
16147
16167
|
this._threadView = view;
|
|
16148
16168
|
return {
|
|
16149
16169
|
eventName: 'newGmailThreadView',
|
|
@@ -16152,10 +16172,10 @@ class GmailRouteView {
|
|
|
16152
16172
|
}));
|
|
16153
16173
|
}
|
|
16154
16174
|
#getSectionsContainer() {
|
|
16155
|
-
return (0,toItemWithLifetimeStream/* default */.Z)(this.#page.tree.getAllByTag('rowListElementContainer')).takeUntilBy(this._stopper).take(1).map(
|
|
16175
|
+
return (0,toItemWithLifetimeStream/* default */.Z)(this.#page.tree.getAllByTag('rowListElementContainer')).takeUntilBy(this._stopper).take(1).map(_ref5 => {
|
|
16156
16176
|
let {
|
|
16157
16177
|
el
|
|
16158
|
-
} =
|
|
16178
|
+
} = _ref5;
|
|
16159
16179
|
const main = el.getValue();
|
|
16160
16180
|
let sectionsContainer = main.querySelector('.inboxsdk__custom_sections');
|
|
16161
16181
|
if (!sectionsContainer) {
|
|
@@ -16277,7 +16297,7 @@ class GmailRouteView {
|
|
|
16277
16297
|
let threadID;
|
|
16278
16298
|
if (threadContainerElement) {
|
|
16279
16299
|
try {
|
|
16280
|
-
threadID = this.
|
|
16300
|
+
threadID = this.#driver.getPageCommunicator().getCurrentThreadID(threadContainerElement);
|
|
16281
16301
|
} catch (err) {
|
|
16282
16302
|
// leave threadID null to be set below
|
|
16283
16303
|
}
|
|
@@ -19194,7 +19214,7 @@ options.insert = htmlElement => {
|
|
|
19194
19214
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
19195
19215
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
19196
19216
|
///@ts-ignore
|
|
19197
|
-
"2.1.
|
|
19217
|
+
"2.1.23-1701352191820-be7d2f48de74c647");
|
|
19198
19218
|
document.head.append(htmlElement);
|
|
19199
19219
|
};
|
|
19200
19220
|
options.domAPI = (styleDomAPI_default());
|
package/package.json
CHANGED
package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ declare class GmailRouteView {
|
|
|
15
15
|
_stopper: import("kefir-stopper").Stopper;
|
|
16
16
|
_rowListViews: GmailRowListView[];
|
|
17
17
|
_gmailRouteProcessor: GmailRouteProcessor;
|
|
18
|
-
_driver: GmailDriver;
|
|
19
18
|
_eventStream: Bus<{
|
|
20
19
|
eventName: 'newGmailRowListView';
|
|
21
20
|
view: GmailRowListView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmail-route-view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,2BAA2B,MAAM,mCAAmC,CAAC;AAG5E,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,mBAAmB,MAAM,2CAA2C,CAAC;AASjF,cAAM,cAAc;;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,QAAQ,kCAAkB;IAC1B,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,oBAAoB,EAAE,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"gmail-route-view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js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