@inboxsdk/core 2.2.11 → 2.2.12
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 +38 -18
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js +7 -5
- package/pageWorld.js.map +1 -1
- package/src/inboxsdk.d.ts +6 -0
- package/src/injected-js/gmail/setup-gmail-interceptor.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-modal-view-driver.d.ts +5 -1
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-modal-view-driver.d.ts.map +1 -1
- package/src/platform-implementation-js/namespaces/keyboard.d.ts +1 -0
- package/src/platform-implementation-js/namespaces/keyboard.d.ts.map +1 -1
- package/src/platform-implementation-js/views/keyboard-shortcut-handle.d.ts +2 -1
- package/src/platform-implementation-js/views/keyboard-shortcut-handle.d.ts.map +1 -1
- package/src/platform-implementation-js/widgets/modal-view.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.12-1777580345308-37be721fe51fe009";
|
|
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.12-1777580345308-37be721fe51fe009");
|
|
2669
2669
|
document.head.append(htmlElement);
|
|
2670
2670
|
};
|
|
2671
2671
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -10313,7 +10313,7 @@ options.insert = htmlElement => {
|
|
|
10313
10313
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10314
10314
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10315
10315
|
///@ts-ignore
|
|
10316
|
-
"2.2.
|
|
10316
|
+
"2.2.12-1777580345308-37be721fe51fe009");
|
|
10317
10317
|
document.head.append(htmlElement);
|
|
10318
10318
|
};
|
|
10319
10319
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -11558,10 +11558,11 @@ var safe_event_emitter = __webpack_require__(2788);
|
|
|
11558
11558
|
;// CONCATENATED MODULE: ./src/platform-implementation-js/views/keyboard-shortcut-handle.ts
|
|
11559
11559
|
|
|
11560
11560
|
class KeyboardShortcutHandle extends safe_event_emitter/* default */.A {
|
|
11561
|
-
constructor(chord, description) {
|
|
11561
|
+
constructor(chord, description, orderHint) {
|
|
11562
11562
|
super();
|
|
11563
11563
|
this.chord = chord;
|
|
11564
11564
|
this.description = description;
|
|
11565
|
+
this.orderHint = orderHint;
|
|
11565
11566
|
}
|
|
11566
11567
|
remove() {
|
|
11567
11568
|
this.emit('destroy');
|
|
@@ -11588,14 +11589,15 @@ class Keyboard {
|
|
|
11588
11589
|
// eslint-disable-next-line prefer-const
|
|
11589
11590
|
let {
|
|
11590
11591
|
chord,
|
|
11591
|
-
description
|
|
11592
|
+
description,
|
|
11593
|
+
orderHint
|
|
11592
11594
|
} = shortcutDescriptor;
|
|
11593
11595
|
if (!chord) throw new Error('Keyboard.createShortcutHandle chord missing');
|
|
11594
11596
|
if (description == null) {
|
|
11595
11597
|
console.error('Keyboard.createShortcutHandle chord missing');
|
|
11596
11598
|
description = '';
|
|
11597
11599
|
}
|
|
11598
|
-
const keyboardShortcutHandle = new KeyboardShortcutHandle(chord, description);
|
|
11600
|
+
const keyboardShortcutHandle = new KeyboardShortcutHandle(chord, description, orderHint);
|
|
11599
11601
|
members.driver.activateShortcut(keyboardShortcutHandle, members.appName, members.appIconUrl);
|
|
11600
11602
|
return keyboardShortcutHandle;
|
|
11601
11603
|
}
|
|
@@ -15073,7 +15075,7 @@ options.insert = htmlElement => {
|
|
|
15073
15075
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
15074
15076
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
15075
15077
|
///@ts-ignore
|
|
15076
|
-
"2.2.
|
|
15078
|
+
"2.2.12-1777580345308-37be721fe51fe009");
|
|
15077
15079
|
document.head.append(htmlElement);
|
|
15078
15080
|
};
|
|
15079
15081
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -16516,12 +16518,14 @@ class ModalView extends safe_event_emitter/* default */.A {
|
|
|
16516
16518
|
const hideAndDestroyStream = kefir_esm["default"].merge([kefir_esm["default"].fromEvents(this, 'destroy'), hideStream.filter(modalView => modalView === this)]);
|
|
16517
16519
|
document.body.appendChild(modalViewDriver.getModalContainerElement());
|
|
16518
16520
|
modalViewDriver.getModalContainerElement().focus();
|
|
16519
|
-
|
|
16520
|
-
domEvent.
|
|
16521
|
-
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16521
|
+
if (modalViewDriver.getCloseOnEscape()) {
|
|
16522
|
+
kefir_esm["default"].fromEvents(document.body, 'keydown').filter(domEvent => domEvent.key === 'Escape').takeUntilBy(hideAndDestroyStream).onValue(domEvent => {
|
|
16523
|
+
domEvent.stopImmediatePropagation();
|
|
16524
|
+
domEvent.stopPropagation();
|
|
16525
|
+
domEvent.preventDefault();
|
|
16526
|
+
this.close();
|
|
16527
|
+
});
|
|
16528
|
+
}
|
|
16525
16529
|
_replaceCurrentlyShowingModal(this, modalViewDriver);
|
|
16526
16530
|
}
|
|
16527
16531
|
setTitle(title) {
|
|
@@ -19705,6 +19709,7 @@ class GmailModalViewDriver {
|
|
|
19705
19709
|
constructor(options) {
|
|
19706
19710
|
this._setupModalContainerElement(options);
|
|
19707
19711
|
this._processOptions(options);
|
|
19712
|
+
this._closeOnEscape = options.closeOnEscape ?? true;
|
|
19708
19713
|
this._eventStream = kefir_bus_default()();
|
|
19709
19714
|
this._setupEventStream();
|
|
19710
19715
|
}
|
|
@@ -19718,6 +19723,9 @@ class GmailModalViewDriver {
|
|
|
19718
19723
|
getEventStream() {
|
|
19719
19724
|
return this._eventStream;
|
|
19720
19725
|
}
|
|
19726
|
+
getCloseOnEscape() {
|
|
19727
|
+
return this._closeOnEscape;
|
|
19728
|
+
}
|
|
19721
19729
|
_processOptions(options) {
|
|
19722
19730
|
this.setTitle(options.title);
|
|
19723
19731
|
this.setContentElement(options.el);
|
|
@@ -19833,7 +19841,7 @@ mole_view_module_options.insert = htmlElement => {
|
|
|
19833
19841
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
19834
19842
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
19835
19843
|
///@ts-ignore
|
|
19836
|
-
"2.2.
|
|
19844
|
+
"2.2.12-1777580345308-37be721fe51fe009");
|
|
19837
19845
|
document.head.append(htmlElement);
|
|
19838
19846
|
};
|
|
19839
19847
|
mole_view_module_options.domAPI = (styleDomAPI_default());
|
|
@@ -20605,14 +20613,12 @@ class KeyboardShortcutHelpModifier {
|
|
|
20605
20613
|
if (this._shortcuts.size === 0) {
|
|
20606
20614
|
return;
|
|
20607
20615
|
}
|
|
20608
|
-
this._shortcuts.
|
|
20616
|
+
const sortedShortcuts = Array.from(this._shortcuts).sort(sortByOrderHintAsc);
|
|
20609
20617
|
var header = this._renderHeader();
|
|
20610
20618
|
var table = this._renderTable();
|
|
20611
20619
|
var bodies = table.querySelectorAll('tbody tbody');
|
|
20612
|
-
|
|
20613
|
-
this._shortcuts.forEach(keyboardShortcutHandle => {
|
|
20620
|
+
sortedShortcuts.forEach((keyboardShortcutHandle, index) => {
|
|
20614
20621
|
this._renderShortcut(bodies[index % 2], keyboardShortcutHandle);
|
|
20615
|
-
index++;
|
|
20616
20622
|
});
|
|
20617
20623
|
const firstHeader = (0,querySelectorOrFail/* default */.A)(node, '.aov');
|
|
20618
20624
|
const parent = firstHeader.parentElement;
|
|
@@ -20690,6 +20696,20 @@ function _getSeparatorHTML(separator) {
|
|
|
20690
20696
|
return '';
|
|
20691
20697
|
}
|
|
20692
20698
|
}
|
|
20699
|
+
|
|
20700
|
+
// Sort: items with orderHint first (ascending), then items without
|
|
20701
|
+
function sortByOrderHintAsc(a, b) {
|
|
20702
|
+
if (a.orderHint == null && b.orderHint == null) {
|
|
20703
|
+
return 0;
|
|
20704
|
+
}
|
|
20705
|
+
if (a.orderHint == null) {
|
|
20706
|
+
return 1;
|
|
20707
|
+
}
|
|
20708
|
+
if (b.orderHint == null) {
|
|
20709
|
+
return -1;
|
|
20710
|
+
}
|
|
20711
|
+
return a.orderHint - b.orderHint;
|
|
20712
|
+
}
|
|
20693
20713
|
// EXTERNAL MODULE: ./src/platform-implementation-js/driver-common/getSyncThreadsForSearch.ts
|
|
20694
20714
|
var getSyncThreadsForSearch = __webpack_require__(6743);
|
|
20695
20715
|
// EXTERNAL MODULE: ./node_modules/@macil/simple-base-converter/dist/index.js
|