@inboxsdk/core 2.1.47 → 2.1.49
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 +161 -201
- package/package.json +1 -1
- package/src/inboxsdk-js/inboxsdk.d.ts +2 -1
- package/src/inboxsdk-js/inboxsdk.d.ts.map +1 -1
- package/src/inboxsdk-js/loading/platform-implementation-loader.d.ts +1 -1
- package/src/inboxsdk-js/loading/platform-implementation-loader.d.ts.map +1 -1
- package/src/inboxsdk.d.ts +5 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/logger.d.ts +2 -1
- package/src/platform-implementation-js/lib/logger.d.ts.map +1 -1
- package/src/platform-implementation-js/main.d.ts +2 -2
- package/src/platform-implementation-js/main.d.ts.map +1 -1
- package/src/platform-implementation-js/namespaces/global.d.ts +1 -2
- package/src/platform-implementation-js/namespaces/global.d.ts.map +1 -1
- package/src/platform-implementation-js/namespaces/modal.d.ts +7 -0
- package/src/platform-implementation-js/namespaces/modal.d.ts.map +1 -1
- package/src/platform-implementation-js/platform-implementation.d.ts +8 -4
- package/src/platform-implementation-js/platform-implementation.d.ts.map +1 -1
package/inboxsdk.js
CHANGED
|
@@ -890,7 +890,7 @@ function isNotNil(value) {
|
|
|
890
890
|
|
|
891
891
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- SDK_VERSION is injected by webpack
|
|
892
892
|
///@ts-ignore
|
|
893
|
-
const BUILD_VERSION = "2.1.
|
|
893
|
+
const BUILD_VERSION = "2.1.49-1713534035478-41c8975865386e10";
|
|
894
894
|
if (false) {}
|
|
895
895
|
|
|
896
896
|
/***/ }),
|
|
@@ -10653,7 +10653,7 @@ options.insert = htmlElement => {
|
|
|
10653
10653
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10654
10654
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10655
10655
|
///@ts-ignore
|
|
10656
|
-
"2.1.
|
|
10656
|
+
"2.1.49-1713534035478-41c8975865386e10");
|
|
10657
10657
|
document.head.append(htmlElement);
|
|
10658
10658
|
};
|
|
10659
10659
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -11157,7 +11157,6 @@ var isStreakAppId = __webpack_require__(3045);
|
|
|
11157
11157
|
|
|
11158
11158
|
|
|
11159
11159
|
|
|
11160
|
-
|
|
11161
11160
|
// Yeah, this module is a singleton with some shared state. This is just for
|
|
11162
11161
|
// logging convenience. Other modules should avoid doing this!
|
|
11163
11162
|
const _extensionAppIds = [];
|
|
@@ -11780,7 +11779,7 @@ if (!globalThis.__InboxSDKImpLoader) {
|
|
|
11780
11779
|
await onready;
|
|
11781
11780
|
const {
|
|
11782
11781
|
makePlatformImplementation
|
|
11783
|
-
} = await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
11782
|
+
} = await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 6101));
|
|
11784
11783
|
return makePlatformImplementation(appId, opts, {
|
|
11785
11784
|
piMainStarted,
|
|
11786
11785
|
piLoadStarted,
|
|
@@ -11927,63 +11926,7 @@ class Keyboard {
|
|
|
11927
11926
|
|
|
11928
11927
|
/***/ }),
|
|
11929
11928
|
|
|
11930
|
-
/***/
|
|
11931
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
11932
|
-
|
|
11933
|
-
"use strict";
|
|
11934
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11935
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11936
|
-
/* harmony export */ });
|
|
11937
|
-
/* harmony import */ var ud__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1010);
|
|
11938
|
-
/* harmony import */ var _widgets_modal_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3869);
|
|
11939
|
-
/* harmony import */ var _common_get_or_fail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7791);
|
|
11940
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
const memberMap = (0,ud__WEBPACK_IMPORTED_MODULE_1__.defonce)(module, () => new WeakMap()); // Deprecated, applications should use Widgets instead.
|
|
11945
|
-
|
|
11946
|
-
class Modal {
|
|
11947
|
-
constructor(appId, driver, piOpts) {
|
|
11948
|
-
const members = {
|
|
11949
|
-
appId,
|
|
11950
|
-
driver,
|
|
11951
|
-
piOpts
|
|
11952
|
-
};
|
|
11953
|
-
memberMap.set(this, members);
|
|
11954
|
-
}
|
|
11955
|
-
|
|
11956
|
-
// Deprecated, use Widgets.showModalView
|
|
11957
|
-
show(options) {
|
|
11958
|
-
const driver = (0,_common_get_or_fail__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(memberMap, this).driver;
|
|
11959
|
-
if ((0,_common_get_or_fail__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(memberMap, this).piOpts.inboxBeta) {
|
|
11960
|
-
driver.getLogger().deprecationWarning('Modal.show', 'Widgets.showModalView');
|
|
11961
|
-
}
|
|
11962
|
-
const modalViewDriver = driver.createModalViewDriver(options);
|
|
11963
|
-
const modalView = new _widgets_modal_view__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z({
|
|
11964
|
-
driver,
|
|
11965
|
-
modalViewDriver
|
|
11966
|
-
});
|
|
11967
|
-
modalView.show();
|
|
11968
|
-
return modalView;
|
|
11969
|
-
}
|
|
11970
|
-
|
|
11971
|
-
// Deprecated, does not have an exact replacement. Use Widgets.showModalView.
|
|
11972
|
-
createModalView(options) {
|
|
11973
|
-
const driver = (0,_common_get_or_fail__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(memberMap, this).driver;
|
|
11974
|
-
driver.getLogger().deprecationWarning('Modal.createModalView', 'Widgets.showModalView');
|
|
11975
|
-
const modalViewDriver = driver.createModalViewDriver(options);
|
|
11976
|
-
return new _widgets_modal_view__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z({
|
|
11977
|
-
driver,
|
|
11978
|
-
modalViewDriver
|
|
11979
|
-
});
|
|
11980
|
-
}
|
|
11981
|
-
}
|
|
11982
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Modal);
|
|
11983
|
-
|
|
11984
|
-
/***/ }),
|
|
11985
|
-
|
|
11986
|
-
/***/ 1000:
|
|
11929
|
+
/***/ 6101:
|
|
11987
11930
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11988
11931
|
|
|
11989
11932
|
"use strict";
|
|
@@ -12000,8 +11943,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
12000
11943
|
var safe_event_emitter = __webpack_require__(6666);
|
|
12001
11944
|
// EXTERNAL MODULE: ./src/common/version.ts
|
|
12002
11945
|
var version = __webpack_require__(7403);
|
|
12003
|
-
// EXTERNAL MODULE: ./src/common/get-or-fail.ts
|
|
12004
|
-
var get_or_fail = __webpack_require__(7791);
|
|
12005
11946
|
;// CONCATENATED MODULE: ./src/platform-implementation-js/lib/Membrane.ts
|
|
12006
11947
|
// Used to make the *View objects out of our *ViewDriver objects, and to make
|
|
12007
11948
|
// sure we return the same *View object back if we've already made one for
|
|
@@ -12408,6 +12349,8 @@ class GmailAttachmentCardView {
|
|
|
12408
12349
|
// EXTERNAL MODULE: ./node_modules/asap/browser-asap.js
|
|
12409
12350
|
var browser_asap = __webpack_require__(9272);
|
|
12410
12351
|
var browser_asap_default = /*#__PURE__*/__webpack_require__.n(browser_asap);
|
|
12352
|
+
// EXTERNAL MODULE: ./src/common/get-or-fail.ts
|
|
12353
|
+
var get_or_fail = __webpack_require__(7791);
|
|
12411
12354
|
// EXTERNAL MODULE: ./node_modules/kefir-cast/index.js
|
|
12412
12355
|
var kefir_cast = __webpack_require__(7781);
|
|
12413
12356
|
var kefir_cast_default = /*#__PURE__*/__webpack_require__.n(kefir_cast);
|
|
@@ -14875,10 +14818,12 @@ class GmailThreadView {
|
|
|
14875
14818
|
return new basic_button_view_controller/* default */.Z(buttonOptions);
|
|
14876
14819
|
}
|
|
14877
14820
|
addFooterButton(button) {
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14821
|
+
// This element contains either an inline reply or the row of buttons
|
|
14822
|
+
const lastMessageFooterSelector = 'div.nH .aHU div[role="list"] [role=“listitem”]:last-child .gA';
|
|
14823
|
+
const lastMessageFooter = this._element.querySelector(lastMessageFooterSelector);
|
|
14824
|
+
if (!lastMessageFooter) {
|
|
14825
|
+
throw new querySelectorOrFail/* SelectorError */.u(lastMessageFooterSelector, {
|
|
14826
|
+
cause: 'Last message footer element not found'
|
|
14882
14827
|
});
|
|
14883
14828
|
}
|
|
14884
14829
|
const buttonOptions = {
|
|
@@ -14915,7 +14860,7 @@ class GmailThreadView {
|
|
|
14915
14860
|
}
|
|
14916
14861
|
}
|
|
14917
14862
|
});
|
|
14918
|
-
observer.observe(
|
|
14863
|
+
observer.observe(lastMessageFooter, {
|
|
14919
14864
|
childList: true,
|
|
14920
14865
|
subtree: true
|
|
14921
14866
|
});
|
|
@@ -15434,7 +15379,7 @@ options.insert = htmlElement => {
|
|
|
15434
15379
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
15435
15380
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
15436
15381
|
///@ts-ignore
|
|
15437
|
-
"2.1.
|
|
15382
|
+
"2.1.49-1713534035478-41c8975865386e10");
|
|
15438
15383
|
document.head.append(htmlElement);
|
|
15439
15384
|
};
|
|
15440
15385
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -16836,8 +16781,102 @@ class ButterBar {
|
|
|
16836
16781
|
var compose = __webpack_require__(8731);
|
|
16837
16782
|
// EXTERNAL MODULE: ./src/platform-implementation-js/namespaces/keyboard.ts + 1 modules
|
|
16838
16783
|
var keyboard = __webpack_require__(326);
|
|
16839
|
-
|
|
16840
|
-
|
|
16784
|
+
;// CONCATENATED MODULE: ./src/platform-implementation-js/widgets/modal-view.ts
|
|
16785
|
+
|
|
16786
|
+
|
|
16787
|
+
|
|
16788
|
+
class ModalView extends safe_event_emitter/* default */.Z {
|
|
16789
|
+
destroyed = false;
|
|
16790
|
+
constructor(options) {
|
|
16791
|
+
super();
|
|
16792
|
+
this._driver = options.driver;
|
|
16793
|
+
this._modalViewDriver = options.modalViewDriver;
|
|
16794
|
+
options.modalViewDriver.getEventStream().filter(event => event.eventName === 'closeClick').onValue(() => {
|
|
16795
|
+
this.close();
|
|
16796
|
+
});
|
|
16797
|
+
options.modalViewDriver.getEventStream().onEnd(() => {
|
|
16798
|
+
this._modalViewDriver = null;
|
|
16799
|
+
this.destroyed = true;
|
|
16800
|
+
_handleModalStackOnModalDestroy(this);
|
|
16801
|
+
this.emit('destroy');
|
|
16802
|
+
});
|
|
16803
|
+
}
|
|
16804
|
+
show() {
|
|
16805
|
+
const modalViewDriver = this._modalViewDriver;
|
|
16806
|
+
if (!modalViewDriver) {
|
|
16807
|
+
throw new Error('Modal can not be shown after being hidden');
|
|
16808
|
+
}
|
|
16809
|
+
const hideAndDestroyStream = kefir_esm["default"].merge([kefir_esm["default"].fromEvents(this, 'destroy'), hideStream.filter(modalView => modalView === this)]);
|
|
16810
|
+
document.body.appendChild(modalViewDriver.getModalContainerElement());
|
|
16811
|
+
modalViewDriver.getModalContainerElement().focus();
|
|
16812
|
+
kefir_esm["default"].fromEvents(document.body, 'keydown').filter(domEvent => domEvent.keyCode === 27).takeUntilBy(hideAndDestroyStream).onValue(domEvent => {
|
|
16813
|
+
domEvent.stopImmediatePropagation();
|
|
16814
|
+
domEvent.stopPropagation();
|
|
16815
|
+
domEvent.preventDefault();
|
|
16816
|
+
this.close();
|
|
16817
|
+
});
|
|
16818
|
+
_replaceCurrentlyShowingModal(this, modalViewDriver);
|
|
16819
|
+
}
|
|
16820
|
+
setTitle(title) {
|
|
16821
|
+
if (!this._modalViewDriver) {
|
|
16822
|
+
throw new Error('Modal can not be shown after being hidden');
|
|
16823
|
+
}
|
|
16824
|
+
this._modalViewDriver.setTitle(title);
|
|
16825
|
+
}
|
|
16826
|
+
close() {
|
|
16827
|
+
if (this._modalViewDriver) {
|
|
16828
|
+
this._modalViewDriver.destroy();
|
|
16829
|
+
}
|
|
16830
|
+
}
|
|
16831
|
+
addButton() {
|
|
16832
|
+
throw new Error('not implemented');
|
|
16833
|
+
}
|
|
16834
|
+
}
|
|
16835
|
+
let activeBackdrop = null;
|
|
16836
|
+
let currentlyShowingModal = null;
|
|
16837
|
+
const hideStream = kefir_bus_default()();
|
|
16838
|
+
const hiddenModalStack = [];
|
|
16839
|
+
function _handleModalStackOnModalDestroy(modalView) {
|
|
16840
|
+
if (currentlyShowingModal && currentlyShowingModal.modalView === modalView) {
|
|
16841
|
+
currentlyShowingModal = null;
|
|
16842
|
+
|
|
16843
|
+
// we have modals in the stack
|
|
16844
|
+
if (hiddenModalStack.length > 0) {
|
|
16845
|
+
hiddenModalStack.pop().show();
|
|
16846
|
+
} else {
|
|
16847
|
+
if (activeBackdrop) {
|
|
16848
|
+
activeBackdrop.destroy();
|
|
16849
|
+
}
|
|
16850
|
+
}
|
|
16851
|
+
} else if (hiddenModalStack.indexOf(modalView) > -1) {
|
|
16852
|
+
hiddenModalStack.splice(hiddenModalStack.indexOf(modalView), 1);
|
|
16853
|
+
}
|
|
16854
|
+
}
|
|
16855
|
+
function _replaceCurrentlyShowingModal(modalView, modalViewDriver) {
|
|
16856
|
+
if (currentlyShowingModal) {
|
|
16857
|
+
hideStream.emit(currentlyShowingModal.modalView);
|
|
16858
|
+
hiddenModalStack.push(currentlyShowingModal.modalView);
|
|
16859
|
+
currentlyShowingModal.modalViewDriver.getModalContainerElement().remove();
|
|
16860
|
+
} else {
|
|
16861
|
+
if (!activeBackdrop) {
|
|
16862
|
+
activeBackdrop = modalView._driver.createBackdrop(502);
|
|
16863
|
+
activeBackdrop.getStopper().onValue(() => {
|
|
16864
|
+
activeBackdrop = null;
|
|
16865
|
+
hiddenModalStack.slice().forEach(modalView => {
|
|
16866
|
+
modalView.close();
|
|
16867
|
+
});
|
|
16868
|
+
if (currentlyShowingModal) {
|
|
16869
|
+
currentlyShowingModal.modalView.close();
|
|
16870
|
+
}
|
|
16871
|
+
});
|
|
16872
|
+
}
|
|
16873
|
+
}
|
|
16874
|
+
currentlyShowingModal = {
|
|
16875
|
+
modalView,
|
|
16876
|
+
modalViewDriver
|
|
16877
|
+
};
|
|
16878
|
+
}
|
|
16879
|
+
/* harmony default export */ const modal_view = (ModalView);
|
|
16841
16880
|
;// CONCATENATED MODULE: ./src/platform-implementation-js/widgets/mole-view.ts
|
|
16842
16881
|
|
|
16843
16882
|
|
|
@@ -16991,7 +17030,7 @@ class Widgets {
|
|
|
16991
17030
|
driver
|
|
16992
17031
|
} = (0,get_or_fail/* default */.Z)(widgets_memberMap, this);
|
|
16993
17032
|
const modalViewDriver = driver.createModalViewDriver(options);
|
|
16994
|
-
const modalView = new modal_view
|
|
17033
|
+
const modalView = new modal_view({
|
|
16995
17034
|
driver,
|
|
16996
17035
|
modalViewDriver
|
|
16997
17036
|
});
|
|
@@ -17026,8 +17065,48 @@ class Widgets {
|
|
|
17026
17065
|
}
|
|
17027
17066
|
const widgets_memberMap = new Map();
|
|
17028
17067
|
/* harmony default export */ const widgets = (Widgets);
|
|
17029
|
-
|
|
17030
|
-
|
|
17068
|
+
;// CONCATENATED MODULE: ./src/platform-implementation-js/namespaces/modal.ts
|
|
17069
|
+
|
|
17070
|
+
/**
|
|
17071
|
+
* @deprecated applications should use Widgets instead.
|
|
17072
|
+
*/
|
|
17073
|
+
class Modal {
|
|
17074
|
+
#driver;
|
|
17075
|
+
#piOpts;
|
|
17076
|
+
constructor(appId, driver, piOpts) {
|
|
17077
|
+
this.#driver = driver;
|
|
17078
|
+
this.#piOpts = piOpts;
|
|
17079
|
+
}
|
|
17080
|
+
|
|
17081
|
+
/**
|
|
17082
|
+
* @deprecated use Widgets.showModalView
|
|
17083
|
+
*/
|
|
17084
|
+
show(options) {
|
|
17085
|
+
const driver = this.#driver;
|
|
17086
|
+
if (this.#piOpts.REQUESTED_API_VERSION < 2) {
|
|
17087
|
+
driver.getLogger().deprecationWarning('Modal.show', 'Widgets.showModalView');
|
|
17088
|
+
}
|
|
17089
|
+
const modalViewDriver = driver.createModalViewDriver(options);
|
|
17090
|
+
const modalView = new modal_view({
|
|
17091
|
+
driver,
|
|
17092
|
+
modalViewDriver
|
|
17093
|
+
});
|
|
17094
|
+
modalView.show();
|
|
17095
|
+
return modalView;
|
|
17096
|
+
}
|
|
17097
|
+
|
|
17098
|
+
// Deprecated, does not have an exact replacement. Use Widgets.showModalView.
|
|
17099
|
+
createModalView(options) {
|
|
17100
|
+
const driver = this.#driver;
|
|
17101
|
+
driver.getLogger().deprecationWarning('Modal.createModalView', 'Widgets.showModalView');
|
|
17102
|
+
const modalViewDriver = driver.createModalViewDriver(options);
|
|
17103
|
+
return new modal_view({
|
|
17104
|
+
driver,
|
|
17105
|
+
modalViewDriver
|
|
17106
|
+
});
|
|
17107
|
+
}
|
|
17108
|
+
}
|
|
17109
|
+
/* harmony default export */ const modal = (Modal);
|
|
17031
17110
|
;// CONCATENATED MODULE: ./src/platform-implementation-js/namespaces/lists.ts
|
|
17032
17111
|
|
|
17033
17112
|
|
|
@@ -19089,7 +19168,7 @@ class User {
|
|
|
19089
19168
|
|
|
19090
19169
|
class Global {
|
|
19091
19170
|
#driver;
|
|
19092
|
-
constructor(appId, driver
|
|
19171
|
+
constructor(appId, driver) {
|
|
19093
19172
|
this.#driver = driver;
|
|
19094
19173
|
}
|
|
19095
19174
|
get gmailTheme() {
|
|
@@ -19923,7 +20002,7 @@ mole_view_module_options.insert = htmlElement => {
|
|
|
19923
20002
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
19924
20003
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
19925
20004
|
///@ts-ignore
|
|
19926
|
-
"2.1.
|
|
20005
|
+
"2.1.49-1713534035478-41c8975865386e10");
|
|
19927
20006
|
document.head.append(htmlElement);
|
|
19928
20007
|
};
|
|
19929
20008
|
mole_view_module_options.domAPI = (styleDomAPI_default());
|
|
@@ -24672,9 +24751,6 @@ function isValidAppId(appId) {
|
|
|
24672
24751
|
return shasum.digest('hex').slice(0, 10) === hash;
|
|
24673
24752
|
}
|
|
24674
24753
|
;// CONCATENATED MODULE: ./src/platform-implementation-js/platform-implementation.ts
|
|
24675
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
24676
|
-
|
|
24677
|
-
|
|
24678
24754
|
|
|
24679
24755
|
|
|
24680
24756
|
|
|
@@ -24711,12 +24787,12 @@ function isValidAppId(appId) {
|
|
|
24711
24787
|
// Some types
|
|
24712
24788
|
|
|
24713
24789
|
const loadedAppIds = new Set();
|
|
24714
|
-
const platform_implementation_memberMap = new WeakMap();
|
|
24715
24790
|
class PlatformImplementation extends safe_event_emitter/* default */.Z {
|
|
24716
24791
|
/**
|
|
24717
24792
|
* @deprecated
|
|
24718
24793
|
*/
|
|
24719
24794
|
|
|
24795
|
+
#driver;
|
|
24720
24796
|
constructor(driver, appId, piOpts) {
|
|
24721
24797
|
super();
|
|
24722
24798
|
const {
|
|
@@ -24724,11 +24800,7 @@ class PlatformImplementation extends safe_event_emitter/* default */.Z {
|
|
|
24724
24800
|
appIconUrl,
|
|
24725
24801
|
VERSION: LOADER_VERSION
|
|
24726
24802
|
} = piOpts;
|
|
24727
|
-
|
|
24728
|
-
driver
|
|
24729
|
-
};
|
|
24730
|
-
platform_implementation_memberMap.set(this, members);
|
|
24731
|
-
if (false) {}
|
|
24803
|
+
this.#driver = driver;
|
|
24732
24804
|
const membrane = new Membrane([[gmail_compose_view/* default */.Z, viewDriver => new compose_view/* default */.Z(driver, viewDriver, membrane)], [gmail_attachment_card_view, viewDriver => new AttachmentCardView(viewDriver, driver, membrane)], [gmail_message_view, viewDriver => new MessageView(viewDriver, membrane, driver)], [gmail_thread_view, viewDriver => new thread_view(viewDriver, appId, driver, membrane)], [gmail_thread_row_view/* default */.Z, viewDriver => new ThreadRowView(viewDriver)], [gmail_route_view, viewDriver => new route_view/* default */.Z(viewDriver)], [dummy_route_view_driver, viewDriver => new route_view/* default */.Z(viewDriver)]]);
|
|
24733
24805
|
this.destroyed = false;
|
|
24734
24806
|
this.LOADER_VERSION = LOADER_VERSION;
|
|
@@ -24749,18 +24821,18 @@ class PlatformImplementation extends safe_event_emitter/* default */.Z {
|
|
|
24749
24821
|
if (piOpts.REQUESTED_API_VERSION === 1) {
|
|
24750
24822
|
// Modal is deprecated; just drop it when apps switch to the next version
|
|
24751
24823
|
// whenever we start that.
|
|
24752
|
-
this.Modal = new modal
|
|
24824
|
+
this.Modal = new modal(appId, driver, piOpts);
|
|
24753
24825
|
}
|
|
24754
24826
|
if (piOpts.REQUESTED_API_VERSION >= 2) {
|
|
24755
24827
|
// new Global namespace only available in v2 or above
|
|
24756
|
-
this.Global = new Global(appId, driver
|
|
24828
|
+
this.Global = new Global(appId, driver);
|
|
24757
24829
|
}
|
|
24758
24830
|
this.Logger = driver.getLogger().getAppLogger();
|
|
24759
24831
|
}
|
|
24760
24832
|
destroy() {
|
|
24761
24833
|
if (!this.destroyed) {
|
|
24762
24834
|
this.destroyed = true;
|
|
24763
|
-
|
|
24835
|
+
this.#driver.destroy();
|
|
24764
24836
|
this.emit('destroy');
|
|
24765
24837
|
}
|
|
24766
24838
|
}
|
|
@@ -24774,14 +24846,11 @@ function makePlatformImplementation(appId, _opts, envData) {
|
|
|
24774
24846
|
// defaults
|
|
24775
24847
|
globalErrorLogging: true,
|
|
24776
24848
|
eventTracking: true,
|
|
24777
|
-
inboxBeta: false,
|
|
24778
24849
|
..._opts
|
|
24779
24850
|
};
|
|
24780
24851
|
opts.REQUESTED_API_VERSION = +opts.REQUESTED_API_VERSION;
|
|
24781
24852
|
switch (opts.REQUESTED_API_VERSION) {
|
|
24782
24853
|
case 2:
|
|
24783
|
-
opts.inboxBeta = true;
|
|
24784
|
-
break;
|
|
24785
24854
|
case 1:
|
|
24786
24855
|
break;
|
|
24787
24856
|
default:
|
|
@@ -24792,7 +24861,7 @@ function makePlatformImplementation(appId, _opts, envData) {
|
|
|
24792
24861
|
const logger = new lib_logger/* default */.Z(appId, opts, LOADER_VERSION, IMPL_VERSION);
|
|
24793
24862
|
const origin = false || document.location.origin;
|
|
24794
24863
|
if (origin !== 'https://mail.google.com') {
|
|
24795
|
-
|
|
24864
|
+
/* eslint-disable-next-line @typescript-eslint/no-empty-function -- never resolve */
|
|
24796
24865
|
return new Promise(() => {});
|
|
24797
24866
|
}
|
|
24798
24867
|
const driver = new gmail_driver(appId, LOADER_VERSION, IMPL_VERSION, logger, opts, envData);
|
|
@@ -25716,115 +25785,6 @@ class DropdownView extends safe_event_emitter/* default */.Z {
|
|
|
25716
25785
|
|
|
25717
25786
|
/***/ }),
|
|
25718
25787
|
|
|
25719
|
-
/***/ 3869:
|
|
25720
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25721
|
-
|
|
25722
|
-
"use strict";
|
|
25723
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25724
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25725
|
-
/* harmony export */ });
|
|
25726
|
-
/* harmony import */ var kefir__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6609);
|
|
25727
|
-
/* harmony import */ var kefir_bus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3652);
|
|
25728
|
-
/* harmony import */ var kefir_bus__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(kefir_bus__WEBPACK_IMPORTED_MODULE_2__);
|
|
25729
|
-
/* harmony import */ var _lib_safe_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6666);
|
|
25730
|
-
|
|
25731
|
-
|
|
25732
|
-
|
|
25733
|
-
class ModalView extends _lib_safe_event_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z {
|
|
25734
|
-
destroyed = false;
|
|
25735
|
-
constructor(options) {
|
|
25736
|
-
super();
|
|
25737
|
-
this._driver = options.driver;
|
|
25738
|
-
this._modalViewDriver = options.modalViewDriver;
|
|
25739
|
-
options.modalViewDriver.getEventStream().filter(event => event.eventName === 'closeClick').onValue(() => {
|
|
25740
|
-
this.close();
|
|
25741
|
-
});
|
|
25742
|
-
options.modalViewDriver.getEventStream().onEnd(() => {
|
|
25743
|
-
this._modalViewDriver = null;
|
|
25744
|
-
this.destroyed = true;
|
|
25745
|
-
_handleModalStackOnModalDestroy(this);
|
|
25746
|
-
this.emit('destroy');
|
|
25747
|
-
});
|
|
25748
|
-
}
|
|
25749
|
-
show() {
|
|
25750
|
-
const modalViewDriver = this._modalViewDriver;
|
|
25751
|
-
if (!modalViewDriver) {
|
|
25752
|
-
throw new Error('Modal can not be shown after being hidden');
|
|
25753
|
-
}
|
|
25754
|
-
const hideAndDestroyStream = kefir__WEBPACK_IMPORTED_MODULE_0__["default"].merge([kefir__WEBPACK_IMPORTED_MODULE_0__["default"].fromEvents(this, 'destroy'), hideStream.filter(modalView => modalView === this)]);
|
|
25755
|
-
document.body.appendChild(modalViewDriver.getModalContainerElement());
|
|
25756
|
-
modalViewDriver.getModalContainerElement().focus();
|
|
25757
|
-
kefir__WEBPACK_IMPORTED_MODULE_0__["default"].fromEvents(document.body, 'keydown').filter(domEvent => domEvent.keyCode === 27).takeUntilBy(hideAndDestroyStream).onValue(domEvent => {
|
|
25758
|
-
domEvent.stopImmediatePropagation();
|
|
25759
|
-
domEvent.stopPropagation();
|
|
25760
|
-
domEvent.preventDefault();
|
|
25761
|
-
this.close();
|
|
25762
|
-
});
|
|
25763
|
-
_replaceCurrentlyShowingModal(this, modalViewDriver);
|
|
25764
|
-
}
|
|
25765
|
-
setTitle(title) {
|
|
25766
|
-
if (!this._modalViewDriver) {
|
|
25767
|
-
throw new Error('Modal can not be shown after being hidden');
|
|
25768
|
-
}
|
|
25769
|
-
this._modalViewDriver.setTitle(title);
|
|
25770
|
-
}
|
|
25771
|
-
close() {
|
|
25772
|
-
if (this._modalViewDriver) {
|
|
25773
|
-
this._modalViewDriver.destroy();
|
|
25774
|
-
}
|
|
25775
|
-
}
|
|
25776
|
-
addButton() {
|
|
25777
|
-
throw new Error('not implemented');
|
|
25778
|
-
}
|
|
25779
|
-
}
|
|
25780
|
-
let activeBackdrop = null;
|
|
25781
|
-
let currentlyShowingModal = null;
|
|
25782
|
-
const hideStream = kefir_bus__WEBPACK_IMPORTED_MODULE_2___default()();
|
|
25783
|
-
const hiddenModalStack = [];
|
|
25784
|
-
function _handleModalStackOnModalDestroy(modalView) {
|
|
25785
|
-
if (currentlyShowingModal && currentlyShowingModal.modalView === modalView) {
|
|
25786
|
-
currentlyShowingModal = null;
|
|
25787
|
-
|
|
25788
|
-
// we have modals in the stack
|
|
25789
|
-
if (hiddenModalStack.length > 0) {
|
|
25790
|
-
hiddenModalStack.pop().show();
|
|
25791
|
-
} else {
|
|
25792
|
-
if (activeBackdrop) {
|
|
25793
|
-
activeBackdrop.destroy();
|
|
25794
|
-
}
|
|
25795
|
-
}
|
|
25796
|
-
} else if (hiddenModalStack.indexOf(modalView) > -1) {
|
|
25797
|
-
hiddenModalStack.splice(hiddenModalStack.indexOf(modalView), 1);
|
|
25798
|
-
}
|
|
25799
|
-
}
|
|
25800
|
-
function _replaceCurrentlyShowingModal(modalView, modalViewDriver) {
|
|
25801
|
-
if (currentlyShowingModal) {
|
|
25802
|
-
hideStream.emit(currentlyShowingModal.modalView);
|
|
25803
|
-
hiddenModalStack.push(currentlyShowingModal.modalView);
|
|
25804
|
-
currentlyShowingModal.modalViewDriver.getModalContainerElement().remove();
|
|
25805
|
-
} else {
|
|
25806
|
-
if (!activeBackdrop) {
|
|
25807
|
-
activeBackdrop = modalView._driver.createBackdrop(502);
|
|
25808
|
-
activeBackdrop.getStopper().onValue(() => {
|
|
25809
|
-
activeBackdrop = null;
|
|
25810
|
-
hiddenModalStack.slice().forEach(modalView => {
|
|
25811
|
-
modalView.close();
|
|
25812
|
-
});
|
|
25813
|
-
if (currentlyShowingModal) {
|
|
25814
|
-
currentlyShowingModal.modalView.close();
|
|
25815
|
-
}
|
|
25816
|
-
});
|
|
25817
|
-
}
|
|
25818
|
-
}
|
|
25819
|
-
currentlyShowingModal = {
|
|
25820
|
-
modalView,
|
|
25821
|
-
modalViewDriver
|
|
25822
|
-
};
|
|
25823
|
-
}
|
|
25824
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ModalView);
|
|
25825
|
-
|
|
25826
|
-
/***/ }),
|
|
25827
|
-
|
|
25828
25788
|
/***/ 9742:
|
|
25829
25789
|
/***/ ((__unused_webpack_module, exports) => {
|
|
25830
25790
|
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LoadScriptOptions } from '../common/load-script';
|
|
2
|
+
import type { PiOpts } from '../platform-implementation-js/platform-implementation';
|
|
2
3
|
declare global {
|
|
3
4
|
var __test_origin: string | undefined;
|
|
4
5
|
}
|
|
@@ -8,5 +9,5 @@ export declare const LOADER_VERSION: string;
|
|
|
8
9
|
* @deprecated
|
|
9
10
|
*/
|
|
10
11
|
export declare function loadScript(url: string, opts?: LoadScriptOptions): Promise<void>;
|
|
11
|
-
export declare function load(version:
|
|
12
|
+
export declare function load(version: number, appId: string, opts?: Partial<PiOpts>): Promise<import("../platform-implementation-js/platform-implementation").PlatformImplementation>;
|
|
12
13
|
//# sourceMappingURL=inboxsdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inboxsdk.d.ts","sourceRoot":"","sources":["../../../../src/inboxsdk-js/inboxsdk.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"inboxsdk.d.ts","sourceRoot":"","sources":["../../../../src/inboxsdk-js/inboxsdk.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAEpF,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,eAAO,MAAM,cAAc,QAAgB,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,iBAAiB,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,mGAgB1E"}
|
|
@@ -7,7 +7,7 @@ export declare class PlatformImplementationLoader {
|
|
|
7
7
|
* scanning for that.
|
|
8
8
|
*/
|
|
9
9
|
static loadScript: () => Promise<void>;
|
|
10
|
-
static load(appId: string, opts: PiOpts): Promise<PlatformImplementation>;
|
|
10
|
+
static load(appId: string, opts: Partial<PiOpts>): Promise<PlatformImplementation>;
|
|
11
11
|
static preload(): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=platform-implementation-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-implementation-loader.d.ts","sourceRoot":"","sources":["../../../../../src/inboxsdk-js/loading/platform-implementation-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,sBAAsB,EACvB,MAAM,0DAA0D,CAAC;AAElE,qBAAa,4BAA4B;IACvC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAEpC;WAEW,IAAI,CACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"platform-implementation-loader.d.ts","sourceRoot":"","sources":["../../../../../src/inboxsdk-js/loading/platform-implementation-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,sBAAsB,EACvB,MAAM,0DAA0D,CAAC;AAElE,qBAAa,4BAA4B;IACvC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAEpC;WAEW,IAAI,CACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,GACpB,OAAO,CAAC,sBAAsB,CAAC;WAUrB,OAAO;CAIrB"}
|
package/src/inboxsdk.d.ts
CHANGED
|
@@ -38,7 +38,10 @@ import Router, {
|
|
|
38
38
|
type RouteParams,
|
|
39
39
|
} from './platform-implementation-js/namespaces/router';
|
|
40
40
|
import CustomRouteView from './platform-implementation-js/views/route-view/custom-route-view';
|
|
41
|
-
import type {
|
|
41
|
+
import type {
|
|
42
|
+
PiOpts,
|
|
43
|
+
PlatformImplementation,
|
|
44
|
+
} from './platform-implementation-js/platform-implementation';
|
|
42
45
|
|
|
43
46
|
export type { User };
|
|
44
47
|
|
|
@@ -47,7 +50,7 @@ export const LOADER_VERSION: string;
|
|
|
47
50
|
export function load(
|
|
48
51
|
version: number,
|
|
49
52
|
appId: string,
|
|
50
|
-
opts
|
|
53
|
+
opts?: Partial<PiOpts>,
|
|
51
54
|
): Promise<InboxSDK>;
|
|
52
55
|
|
|
53
56
|
// types
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmail-thread-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,iBAAiB,MA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mE9D,mBAAmB,CACjB,0BAA0B,EAAE,WAAW,EACvC,yBAAyB,EAAE,OAAO;IAoEpC,UAAU,IAAI,MAAM;IA0BpB,aAAa,IAAI,MAAM;IAKvB,WAAW,IAAI,MAAM;IAkDf,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAqBzC,QAAQ,IAAI,iBAAiB;IAyC7B,gBAAgB,CAAC,MAAM,EAAE,gBAAgB;IAmDzC,eAAe,CAAC,MAAM,EAAE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"gmail-thread-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAE/C,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,YAAY,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAGpG,OAAO,KAAK,cAAc,MAAM,qCAAqC,CAAC;AAEtE,OAAO,yBAEN,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI7D,cAAM,eAAe;;IACnB,QAAQ,EAAE,WAAW,CAAC;IACtB,gBAAgB,EAAE,GAAG,CAAC;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,GAAG,CAAC,GAAG,EAAE,OA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3B;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { PiOpts } from '../platform-implementation';
|
|
1
2
|
export interface AppLogger {
|
|
2
3
|
error(err: Error | unknown, details?: any): void;
|
|
3
4
|
event(name: string, details?: any): void;
|
|
4
5
|
}
|
|
5
6
|
export default class Logger {
|
|
6
7
|
#private;
|
|
7
|
-
constructor(appId: string, opts:
|
|
8
|
+
constructor(appId: string, opts: PiOpts, loaderVersion: string, implVersion: string);
|
|
8
9
|
setUserEmailAddress(email: string): void;
|
|
9
10
|
shouldTrackEverything(): boolean;
|
|
10
11
|
static run<T>(cb: () => T, details?: any): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/lib/logger.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AA6CzD,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IACjD,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,MAAM;;gBAKvB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM;IA8CrB,mBAAmB,CAAC,KAAK,EAAE,MAAM;IAIjC,qBAAqB,IAAI,OAAO;IAOhC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,CAAC;IAS5C,GAAG,CAAC,CAAC,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
load: (version: string, appId: string, opts:
|
|
4
|
+
load: (version: string, appId: string, opts: Partial<PiOpts>) => Promise<PlatformImplementation>;
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/platform-implementation-js/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/platform-implementation-js/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,mBAAmB,EAAE;QACvB,IAAI,EAAE,CACJ,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAClB,OAAO,CAAC,sBAAsB,CAAC,CAAC;KACtC,CAAC;CACH;AAgED,OAAO,EAAE,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Observable } from 'kefir';
|
|
2
2
|
import ContentPanelView from '../views/content-panel-view';
|
|
3
|
-
import type { PiOpts } from '../platform-implementation';
|
|
4
3
|
import type { Driver } from '../driver-interfaces/driver';
|
|
5
4
|
import GmailSupportItemView from '../dom-driver/gmail/views/gmail-support-item-view';
|
|
6
5
|
import type { SupportItemDescriptor } from '../dom-driver/gmail/views/gmail-support-item-view';
|
|
7
6
|
import { type ContentPanelDescriptor } from '../driver-common/sidebar/ContentPanelViewDriver';
|
|
8
7
|
export default class Global {
|
|
9
8
|
#private;
|
|
10
|
-
constructor(appId: string, driver: Driver
|
|
9
|
+
constructor(appId: string, driver: Driver);
|
|
11
10
|
get gmailTheme(): {
|
|
12
11
|
isDarkMode: {
|
|
13
12
|
frame: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/namespaces/global.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/namespaces/global.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,oBAAoB,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAE9F,MAAM,CAAC,OAAO,OAAO,MAAM;;gBAGb,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAIzC,IAAI,UAAU;;;;;MAEb;IAEK,sBAAsB,CAC1B,UAAU,EACN,sBAAsB,GACtB,UAAU,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAC9C,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAiBnC,cAAc,CACZ,qBAAqB,EAAE,qBAAqB,GAC3C,oBAAoB;CAIxB"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import ModalView from '../widgets/modal-view';
|
|
2
2
|
import type { Driver } from '../driver-interfaces/driver';
|
|
3
3
|
import type { PiOpts } from '../platform-implementation';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated applications should use Widgets instead.
|
|
6
|
+
*/
|
|
4
7
|
declare class Modal {
|
|
8
|
+
#private;
|
|
5
9
|
constructor(appId: string, driver: Driver, piOpts: PiOpts);
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated use Widgets.showModalView
|
|
12
|
+
*/
|
|
6
13
|
show(options: Record<string, any>): ModalView;
|
|
7
14
|
createModalView(options: Record<string, any>): ModalView;
|
|
8
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/namespaces/modal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/namespaces/modal.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;GAEG;AACH,cAAM,KAAK;;gBAIG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAKzD;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAmB7C,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;CAWzD;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -16,18 +16,22 @@ import Global from './namespaces/global';
|
|
|
16
16
|
import GmailDriver from './dom-driver/gmail/gmail-driver';
|
|
17
17
|
import type { AppLogger } from './lib/logger';
|
|
18
18
|
export type PiOpts = {
|
|
19
|
-
appName
|
|
20
|
-
appIconUrl
|
|
21
|
-
|
|
19
|
+
appName?: string | null;
|
|
20
|
+
appIconUrl?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Is this used?
|
|
23
|
+
*/
|
|
24
|
+
appVersion?: string;
|
|
25
|
+
suppressAddonTitle?: string | null;
|
|
22
26
|
VERSION: string;
|
|
23
27
|
globalErrorLogging: boolean;
|
|
24
28
|
eventTracking: boolean;
|
|
25
|
-
inboxBeta: boolean;
|
|
26
29
|
REQUESTED_API_VERSION: number;
|
|
27
30
|
primaryColor?: string;
|
|
28
31
|
secondaryColor?: string;
|
|
29
32
|
};
|
|
30
33
|
export declare class PlatformImplementation extends SafeEventEmitter {
|
|
34
|
+
#private;
|
|
31
35
|
destroyed: boolean;
|
|
32
36
|
LOADER_VERSION: string;
|
|
33
37
|
IMPL_VERSION: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-implementation.d.ts","sourceRoot":"","sources":["../../../../src/platform-implementation-js/platform-implementation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform-implementation.d.ts","sourceRoot":"","sources":["../../../../src/platform-implementation-js/platform-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AAgBxD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAI1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,MAAM,GAAG;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CA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