@inboxsdk/core 1.0.1 → 1.0.3
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 +5 -5
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js.map +1 -1
- package/src/inboxsdk.d.ts +16 -1
- package/src/injected-js/gmail/modify-suggestions.d.ts +2 -0
- package/src/injected-js/gmail/modify-suggestions.d.ts.map +1 -1
- package/src/platform-implementation-js/constants/router.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/custom-style.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/custom-style.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/custom-style.js +16 -21
- package/src/platform-implementation-js/dom-driver/gmail/gmail-butter-bar-driver.d.ts +12 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-butter-bar-driver.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-butter-bar-driver.js +152 -187
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-app-menu-item.d.ts +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-app-menu-item.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-app-menu-item.js +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-toolbar-button-for-app.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-toolbar-button-for-app.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/add-toolbar-button-for-app.js +15 -20
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/create-link.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/create-link.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/create-link.js +59 -56
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-draft-id-for-message-id.d.ts +9 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-draft-id-for-message-id.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-draft-id-for-message-id.js +42 -54
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-native-nav-item.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-native-nav-item.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-native-nav-item.js +31 -33
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-url-object.d.ts +8 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-url-object.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/get-url-object.js +21 -23
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getSyncThreadForOldGmailThreadId.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getSyncThreadForOldGmailThreadId.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getSyncThreadForOldGmailThreadId.js +19 -31
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getSyncThreadFromSyncThreadId.d.ts +7 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/goto-view.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/goto-view.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/goto-view.js +51 -60
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/keyboard-shortcut-help-modifier.d.ts +20 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/keyboard-shortcut-help-modifier.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/keyboard-shortcut-help-modifier.js +166 -130
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/open-compose-window.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/open-compose-window.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/open-compose-window.js +17 -22
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/override-gmail-back-button.d.ts +4 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/override-gmail-back-button.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/override-gmail-back-button.js +44 -51
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-query-rewriter.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-query-rewriter.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-query-rewriter.js +17 -22
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-suggestions-provider.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-suggestions-provider.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/register-search-suggestions-provider.js +136 -129
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-compose-view-driver-stream.d.ts +6 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-compose-view-driver-stream.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-compose-view-driver-stream.js +102 -95
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-route-view-driver-stream.d.ts +6 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-route-view-driver-stream.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-route-view-driver-stream.js +144 -169
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-app-id-warning.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-app-id-warning.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-app-id-warning.js +14 -23
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-route-view.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-route-view.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-route-view.js +41 -49
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-thread-list.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-thread-list.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-thread-list.js +286 -294
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-native-route-view.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-native-route-view.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-native-route-view.js +19 -26
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/suppressAddon.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/suppressAddon.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/suppressAddon.js +36 -42
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/temporary-track-download-url-validity.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/temporary-track-download-url-validity.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/temporary-track-download-url-validity.js +34 -33
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/thread-row-identifier.d.ts +13 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/thread-row-identifier.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/thread-row-identifier.js +80 -81
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-events.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-events.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-events.js +124 -81
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/user-info.d.ts +10 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/user-info.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/user-info.js +47 -54
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver.d.ts +183 -106
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver.js +712 -647
- package/src/platform-implementation-js/dom-driver/gmail/make-xhr-interceptor.d.ts +7 -0
- package/src/platform-implementation-js/dom-driver/gmail/make-xhr-interceptor.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/make-xhr-interceptor.js +93 -82
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/index.d.ts +7 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-toolbar-button-view.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-backdrop.d.ts +11 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-backdrop.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-backdrop.js +20 -32
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.d.ts +8 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view.js +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-processor.d.ts +8 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.js +3 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-row-list-view.d.ts +10 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-row-view.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.d.ts +9 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-toolbar-view.d.ts +12 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/native-gmail-nav-item-view.d.ts +9 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-modal-view-driver.d.ts +20 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-modal-view-driver.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-modal-view-driver.js +107 -108
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-mole-view-driver.d.ts +16 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-mole-view-driver.js +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.d.ts +13 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.js +66 -66
- package/src/platform-implementation-js/dom-driver/inbox/views/inbox-drawer-view.d.ts +5 -0
- package/src/platform-implementation-js/driver-common/getGmailMessageIdForSyncMessageId.d.ts +6 -0
- package/src/platform-implementation-js/driver-common/getGmailThreadIdForRfcMessageId.d.ts +6 -0
- package/src/platform-implementation-js/driver-common/sidebar/ContentPanelViewDriver.d.ts +1 -0
- package/src/platform-implementation-js/driver-interfaces/driver.d.ts +3 -6
- package/src/platform-implementation-js/driver-interfaces/mole-view-driver.d.ts +27 -0
- package/src/platform-implementation-js/lib/copyAndValidateAutocompleteResults.d.ts +4 -0
- package/src/platform-implementation-js/lib/copyAndValidateAutocompleteResults.d.ts.map +1 -0
- package/src/platform-implementation-js/lib/copyAndValidateAutocompleteResults.js +34 -34
- package/src/platform-implementation-js/lib/dom/element-view-mapper.d.ts +10 -0
- package/src/platform-implementation-js/lib/dom/element-view-mapper.d.ts.map +1 -0
- package/src/platform-implementation-js/lib/dom/element-view-mapper.js +9 -17
- package/src/platform-implementation-js/lib/dom/on-mouse-down-and-up.d.ts +4 -0
- package/src/platform-implementation-js/lib/dom/on-mouse-down-and-up.d.ts.map +1 -0
- package/src/platform-implementation-js/lib/dom/on-mouse-down-and-up.js +7 -16
- package/src/platform-implementation-js/lib/populateRouteID.d.ts +6 -0
- package/src/platform-implementation-js/lib/rewriteCssWithIdMap.d.ts +2 -0
- package/src/platform-implementation-js/lib/rewriteCssWithIdMap.d.ts.map +1 -0
- package/src/platform-implementation-js/lib/rewriteCssWithIdMap.js +4 -11
- package/src/platform-implementation-js/lib/routeIDmatchesHash.d.ts +4 -0
- package/src/platform-implementation-js/lib/toLiveSet.d.ts +5 -0
- package/src/platform-implementation-js/lib/toLiveSet.d.ts.map +1 -0
- package/src/platform-implementation-js/lib/toLiveSet.js +22 -33
- package/src/platform-implementation-js/namespaces/router.d.ts +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/setup-route-view-driver-stream.test.js +0 -183
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/show-custom-thread-list.test.js +0 -218
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/user-info.test.js +0 -85
- package/src/platform-implementation-js/lib/rewriteCssWithIdMap.test.js +0 -43
|
@@ -1,89 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _sortBy = _interopRequireDefault(require("lodash/sortBy"));
|
|
9
|
-
var _kefir = _interopRequireDefault(require("kefir"));
|
|
10
|
-
var _kefirBus = _interopRequireDefault(require("kefir-bus"));
|
|
11
|
-
var _ud = require("ud");
|
|
12
|
-
var _modalButtonView = _interopRequireDefault(require("./buttons/modal-button-view"));
|
|
13
|
-
var _basicButtonViewController = _interopRequireDefault(require("../../../widgets/buttons/basic-button-view-controller"));
|
|
14
|
-
var _querySelectorOrFail = _interopRequireDefault(require("../../../lib/dom/querySelectorOrFail"));
|
|
1
|
+
import sortBy from 'lodash/sortBy';
|
|
2
|
+
import kefirBus from 'kefir-bus';
|
|
3
|
+
import ModalButtonView from './buttons/modal-button-view';
|
|
4
|
+
import BasicButtonViewController from '../../../widgets/buttons/basic-button-view-controller';
|
|
5
|
+
import querySelector from '../../../lib/dom/querySelectorOrFail';
|
|
15
6
|
class GmailModalViewDriver {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this._modalContainerElement.remove();
|
|
24
|
-
this._eventStream.end();
|
|
25
|
-
}
|
|
26
|
-
getModalContainerElement() {
|
|
27
|
-
return this._modalContainerElement;
|
|
28
|
-
}
|
|
29
|
-
getEventStream() {
|
|
30
|
-
return this._eventStream;
|
|
31
|
-
}
|
|
32
|
-
_processOptions(options) {
|
|
33
|
-
this.setTitle(options.title);
|
|
34
|
-
this.setContentElement(options.el);
|
|
35
|
-
this.setButtons(options.buttons || []);
|
|
36
|
-
this.setChromeClass(options.chrome, options.showCloseButton, (options.buttons || []).length > 0);
|
|
37
|
-
}
|
|
38
|
-
setTitle(title) {
|
|
39
|
-
const heading = (0, _querySelectorOrFail.default)(this._modalContainerElement, '[role=heading]');
|
|
40
|
-
if (!title) {
|
|
41
|
-
heading.style.display = 'none';
|
|
42
|
-
} else {
|
|
43
|
-
heading.style.display = '';
|
|
44
|
-
heading.textContent = title;
|
|
7
|
+
_eventStream;
|
|
8
|
+
_modalContainerElement;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this._setupModalContainerElement(options);
|
|
11
|
+
this._processOptions(options);
|
|
12
|
+
this._eventStream = kefirBus();
|
|
13
|
+
this._setupEventStream();
|
|
45
14
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
content.innerHTML = '';
|
|
50
|
-
if (typeof element === 'string') {
|
|
51
|
-
content.innerHTML = element;
|
|
52
|
-
} else if (element instanceof Element) {
|
|
53
|
-
content.appendChild(element);
|
|
15
|
+
destroy() {
|
|
16
|
+
this._modalContainerElement.remove();
|
|
17
|
+
this._eventStream.end();
|
|
54
18
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const buttonsEl = (0, _querySelectorOrFail.default)(this._modalContainerElement, '.inboxsdk__modal_buttons');
|
|
58
|
-
buttonsEl.innerHTML = '';
|
|
59
|
-
if (buttons.length === 0) {
|
|
60
|
-
buttonsEl.style.display = 'none';
|
|
61
|
-
this._modalContainerElement.classList.add('inboxsdk__modal_content_no_buttons');
|
|
62
|
-
} else {
|
|
63
|
-
buttonsEl.style.display = '';
|
|
64
|
-
this._modalContainerElement.classList.remove('inboxsdk__modal_content_no_buttons');
|
|
19
|
+
getModalContainerElement() {
|
|
20
|
+
return this._modalContainerElement;
|
|
65
21
|
}
|
|
66
|
-
(
|
|
67
|
-
|
|
68
|
-
setChromeClass(chrome, showCloseButton, hasButtons) {
|
|
69
|
-
this._modalContainerElement.classList.remove('inboxsdk__modal_hideSides');
|
|
70
|
-
this._modalContainerElement.classList.remove('inboxsdk__modal_hideTop');
|
|
71
|
-
this._modalContainerElement.classList.remove('inboxsdk__modal_hideBottom');
|
|
72
|
-
if (chrome === false) {
|
|
73
|
-
this._modalContainerElement.classList.add('inboxsdk__modal_hideSides');
|
|
74
|
-
if (!showCloseButton) {
|
|
75
|
-
this._modalContainerElement.classList.add('inboxsdk__modal_hideTop');
|
|
76
|
-
}
|
|
77
|
-
if (!hasButtons) {
|
|
78
|
-
this._modalContainerElement.classList.add('inboxsdk__modal_hideBottom');
|
|
79
|
-
}
|
|
22
|
+
getEventStream() {
|
|
23
|
+
return this._eventStream;
|
|
80
24
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
25
|
+
_processOptions(options) {
|
|
26
|
+
this.setTitle(options.title);
|
|
27
|
+
this.setContentElement(options.el);
|
|
28
|
+
this.setButtons(options.buttons || []);
|
|
29
|
+
this.setChromeClass(options.chrome, options.showCloseButton, (options.buttons || []).length > 0);
|
|
30
|
+
}
|
|
31
|
+
setTitle(title) {
|
|
32
|
+
const heading = querySelector(this._modalContainerElement, '[role=heading]');
|
|
33
|
+
if (!title) {
|
|
34
|
+
heading.style.display = 'none';
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
heading.style.display = '';
|
|
38
|
+
heading.textContent = title;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
setContentElement(element) {
|
|
42
|
+
const content = querySelector(this._modalContainerElement, '.inboxsdk__modal_content');
|
|
43
|
+
content.innerHTML = '';
|
|
44
|
+
if (typeof element === 'string') {
|
|
45
|
+
content.innerHTML = element;
|
|
46
|
+
}
|
|
47
|
+
else if (element instanceof Element) {
|
|
48
|
+
content.appendChild(element);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
setButtons(buttons) {
|
|
52
|
+
const buttonsEl = querySelector(this._modalContainerElement, '.inboxsdk__modal_buttons');
|
|
53
|
+
buttonsEl.innerHTML = '';
|
|
54
|
+
if (buttons.length === 0) {
|
|
55
|
+
buttonsEl.style.display = 'none';
|
|
56
|
+
this._modalContainerElement.classList.add('inboxsdk__modal_content_no_buttons');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
buttonsEl.style.display = '';
|
|
60
|
+
this._modalContainerElement.classList.remove('inboxsdk__modal_content_no_buttons');
|
|
61
|
+
}
|
|
62
|
+
sortBy(buttons, (button) => button.orderHint || 0).forEach(this._addButton.bind(this, buttonsEl));
|
|
63
|
+
}
|
|
64
|
+
setChromeClass(chrome, showCloseButton, hasButtons) {
|
|
65
|
+
this._modalContainerElement.classList.remove('inboxsdk__modal_hideSides');
|
|
66
|
+
this._modalContainerElement.classList.remove('inboxsdk__modal_hideTop');
|
|
67
|
+
this._modalContainerElement.classList.remove('inboxsdk__modal_hideBottom');
|
|
68
|
+
if (chrome === false) {
|
|
69
|
+
this._modalContainerElement.classList.add('inboxsdk__modal_hideSides');
|
|
70
|
+
if (!showCloseButton) {
|
|
71
|
+
this._modalContainerElement.classList.add('inboxsdk__modal_hideTop');
|
|
72
|
+
}
|
|
73
|
+
if (!hasButtons) {
|
|
74
|
+
this._modalContainerElement.classList.add('inboxsdk__modal_hideBottom');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
_setupModalContainerElement(options) {
|
|
79
|
+
const constrainTitleWidthTopRowClass = options.constrainTitleWidth
|
|
80
|
+
? 'inboxsdk__modal_toprow--constrain-title-width'
|
|
81
|
+
: '';
|
|
82
|
+
this._modalContainerElement = document.createElement('div');
|
|
83
|
+
this._modalContainerElement.className = 'inboxsdk__modal_fullscreen';
|
|
84
|
+
var htmlString = `
|
|
87
85
|
<div class="Kj-JD inboxsdk__modal_container" tabindex="0" role="alertdialog">
|
|
88
86
|
<div class="Kj-JD-K7 Kj-JD-K7-GIHV4 inboxsdk__modal_toprow ${constrainTitleWidthTopRowClass}">
|
|
89
87
|
<span class="Kj-JD-K7-K0" role="heading"></span>
|
|
@@ -94,32 +92,33 @@ class GmailModalViewDriver {
|
|
|
94
92
|
<div class="Kj-JD-Jl inboxsdk__modal_buttons"></div>
|
|
95
93
|
</div>
|
|
96
94
|
`;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
95
|
+
this._modalContainerElement.innerHTML = htmlString;
|
|
96
|
+
}
|
|
97
|
+
_addButton(buttonContainer, buttonDescriptor) {
|
|
98
|
+
const buttonOptions = { ...buttonDescriptor };
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
100
|
+
const buttonColor = ['blue', 'red', 'green'].includes(buttonDescriptor.color) &&
|
|
101
|
+
buttonDescriptor.color;
|
|
102
|
+
buttonOptions.isPrimary = buttonDescriptor.type === 'PRIMARY_ACTION';
|
|
103
|
+
const buttonView = new ModalButtonView(buttonOptions);
|
|
104
|
+
buttonOptions.buttonView = buttonView;
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
106
|
+
const buttonViewController = new BasicButtonViewController(buttonOptions);
|
|
107
|
+
if (buttonDescriptor.type === 'PRIMARY_ACTION') {
|
|
108
|
+
buttonContainer.insertBefore(buttonView.getElement(), buttonContainer.firstElementChild);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
buttonContainer.appendChild(buttonView.getElement());
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
_setupEventStream() {
|
|
115
|
+
const closeElement = querySelector(this._modalContainerElement, '.inboxsdk__modal_close');
|
|
116
|
+
closeElement.addEventListener('click', (event) => {
|
|
117
|
+
this._eventStream.emit({
|
|
118
|
+
eventName: 'closeClick',
|
|
119
|
+
domEvent: event,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
112
122
|
}
|
|
113
|
-
}
|
|
114
|
-
_setupEventStream() {
|
|
115
|
-
const closeElement = (0, _querySelectorOrFail.default)(this._modalContainerElement, '.inboxsdk__modal_close');
|
|
116
|
-
closeElement.addEventListener('click', event => {
|
|
117
|
-
this._eventStream.emit({
|
|
118
|
-
eventName: 'closeClick',
|
|
119
|
-
domEvent: event
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
exports.default = _default;
|
|
124
|
+
export default GmailModalViewDriver;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Kefir from 'kefir';
|
|
2
|
+
import type {
|
|
3
|
+
MoleViewDriver,
|
|
4
|
+
MoleOptions,
|
|
5
|
+
} from '../../../driver-interfaces/mole-view-driver';
|
|
6
|
+
import GmailDriver from '../gmail-driver';
|
|
7
|
+
|
|
8
|
+
export default class GmailMoleViewDriver implements MoleViewDriver {
|
|
9
|
+
constructor(driver: GmailDriver, options: MoleOptions);
|
|
10
|
+
show(): void;
|
|
11
|
+
setTitle(title: string): void;
|
|
12
|
+
setMinimized(minimized: boolean): void;
|
|
13
|
+
getMinimized(): boolean;
|
|
14
|
+
getEventStream(): Kefir.Observable<any, unknown>;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
@@ -15,7 +15,7 @@ var _streamWaitFor = _interopRequireDefault(require("../../../lib/stream-wait-fo
|
|
|
15
15
|
var _querySelectorOrFail = _interopRequireDefault(require("../../../lib/dom/querySelectorOrFail"));
|
|
16
16
|
var _findParent = _interopRequireDefault(require("../../../../common/find-parent"));
|
|
17
17
|
var _gmailElementGetter = _interopRequireDefault(require("../gmail-element-getter"));
|
|
18
|
-
var _isComposeTitlebarLightColor = _interopRequireDefault(require("
|
|
18
|
+
var _isComposeTitlebarLightColor = _interopRequireDefault(require("../is-compose-titlebar-light-color"));
|
|
19
19
|
class GmailMoleViewDriver {
|
|
20
20
|
constructor(driver, options) {
|
|
21
21
|
(0, _defineProperty2.default)(this, "_eventStream", (0, _kefirBus.default)());
|
package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Kefir from 'kefir';
|
|
2
|
+
import type { Bus } from 'kefir-bus';
|
|
3
|
+
export default class GmailTopMessageBarDriver {
|
|
4
|
+
_element: HTMLElement | null | undefined;
|
|
5
|
+
_eventStream: Bus<any, unknown>;
|
|
6
|
+
_resizeObserver: ResizeObserver | null | undefined;
|
|
7
|
+
constructor(optionStream: Kefir.Observable<any, unknown>);
|
|
8
|
+
destroy(): void;
|
|
9
|
+
getEventStream(): Kefir.Observable<any, unknown>;
|
|
10
|
+
remove(): void;
|
|
11
|
+
setTopMessageBarHeight(): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=gmail-top-message-bar-driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gmail-top-message-bar-driver.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,MAAM,CAAC,OAAO,OAAO,wBAAwB;IAC3C,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,YAAY,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChC,eAAe,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;gBAEvC,YAAY,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;IA+CxD,OAAO;IAoBP,cAAc,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;IAIhD,MAAM;IAIN,sBAAsB;CAcvB"}
|
package/src/platform-implementation-js/dom-driver/gmail/widgets/gmail-top-message-bar-driver.js
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import kefirBus from 'kefir-bus';
|
|
2
|
+
import fakeWindowResize from '../../../lib/fake-window-resize';
|
|
3
|
+
export default class GmailTopMessageBarDriver {
|
|
4
|
+
_element;
|
|
5
|
+
_eventStream;
|
|
6
|
+
_resizeObserver;
|
|
7
|
+
constructor(optionStream) {
|
|
8
|
+
this._eventStream = kefirBus();
|
|
9
|
+
const ResizeObserver = global.ResizeObserver;
|
|
10
|
+
if (ResizeObserver) {
|
|
11
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
12
|
+
this.setTopMessageBarHeight();
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
optionStream
|
|
16
|
+
.takeUntilBy(this._eventStream.filter(() => false).beforeEnd(() => null))
|
|
17
|
+
.onValue((option) => {
|
|
18
|
+
if (!option) {
|
|
19
|
+
if (this._element) {
|
|
20
|
+
this._element.remove();
|
|
21
|
+
this._element = null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else if (option) {
|
|
25
|
+
var element = this._element;
|
|
26
|
+
if (!element) {
|
|
27
|
+
element = this._element = document.createElement('div');
|
|
28
|
+
element.classList.add('inboxsdk__topMessageBar');
|
|
29
|
+
document.body.insertBefore(element, document.body.firstChild);
|
|
30
|
+
document.body.classList.add('inboxsdk__hasTopMessageBar');
|
|
31
|
+
fakeWindowResize();
|
|
32
|
+
}
|
|
33
|
+
if (option.el !== element.children[0]) {
|
|
34
|
+
element.innerHTML = '';
|
|
35
|
+
if (option.el) {
|
|
36
|
+
element.appendChild(option.el);
|
|
37
|
+
if (this._resizeObserver) {
|
|
38
|
+
this._resizeObserver.observe(element);
|
|
39
|
+
}
|
|
40
|
+
this.setTopMessageBarHeight();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
19
45
|
}
|
|
20
|
-
|
|
21
|
-
if (!option) {
|
|
46
|
+
destroy() {
|
|
22
47
|
if (this._element) {
|
|
23
|
-
|
|
24
|
-
|
|
48
|
+
this._element.remove();
|
|
49
|
+
this._element = null;
|
|
25
50
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
element = this._element = document.createElement('div');
|
|
30
|
-
element.classList.add('inboxsdk__topMessageBar');
|
|
31
|
-
document.body.insertBefore(element, document.body.firstChild);
|
|
32
|
-
document.body.classList.add('inboxsdk__hasTopMessageBar');
|
|
33
|
-
(0, _fakeWindowResize.default)();
|
|
51
|
+
this._eventStream.end();
|
|
52
|
+
if (this._resizeObserver) {
|
|
53
|
+
this._resizeObserver.disconnect();
|
|
34
54
|
}
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (this._resizeObserver) {
|
|
40
|
-
this._resizeObserver.observe(element);
|
|
41
|
-
}
|
|
55
|
+
if (document.querySelectorAll('.inboxsdk__topMessageBar').length === 0) {
|
|
56
|
+
document.body.classList.remove('inboxsdk__hasTopMessageBar');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
42
59
|
this.setTopMessageBarHeight();
|
|
43
|
-
}
|
|
44
60
|
}
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (this._element) {
|
|
50
|
-
this._element.remove();
|
|
51
|
-
this._element = null;
|
|
61
|
+
fakeWindowResize();
|
|
62
|
+
}
|
|
63
|
+
getEventStream() {
|
|
64
|
+
return this._eventStream;
|
|
52
65
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this._resizeObserver.disconnect();
|
|
66
|
+
remove() {
|
|
67
|
+
this.destroy();
|
|
56
68
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
setTopMessageBarHeight() {
|
|
70
|
+
const topMessageBars = [
|
|
71
|
+
...document.querySelectorAll('.inboxsdk__topMessageBar'),
|
|
72
|
+
];
|
|
73
|
+
const height = topMessageBars.reduce((acc, currValue) => acc + currValue.offsetHeight, 0);
|
|
74
|
+
document.body.style.setProperty('--inboxsdk__topMessageBar-height', `${height}px`);
|
|
61
75
|
}
|
|
62
|
-
(0, _fakeWindowResize.default)();
|
|
63
|
-
}
|
|
64
|
-
getEventStream() {
|
|
65
|
-
return this._eventStream;
|
|
66
|
-
}
|
|
67
|
-
remove() {
|
|
68
|
-
this.destroy();
|
|
69
|
-
}
|
|
70
|
-
setTopMessageBarHeight() {
|
|
71
|
-
const topMessageBars = [...document.querySelectorAll('.inboxsdk__topMessageBar')];
|
|
72
|
-
const height = topMessageBars.reduce((acc, currValue) => acc + currValue.offsetHeight, 0);
|
|
73
|
-
document.body.style.setProperty('--inboxsdk__topMessageBar-height', `${height}px`);
|
|
74
|
-
}
|
|
75
76
|
}
|
|
76
|
-
exports.default = GmailTopMessageBarDriver;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default class ContentPanelViewDriver {}
|
|
@@ -13,10 +13,9 @@ import GmailSupportItemView, {
|
|
|
13
13
|
import { AppMenuItemDescriptor } from '../namespaces/app-menu';
|
|
14
14
|
import { GmailAppMenuItemView } from '../dom-driver/gmail/views/gmail-app-menu-item-view';
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
import GmailBackdrop from '../dom-driver/gmail/views/gmail-backdrop';
|
|
17
17
|
// import InboxBackdrop from '../dom-driver/inbox/views/inbox-backdrop';
|
|
18
|
-
|
|
19
|
-
export type Backdrop = any;
|
|
18
|
+
export type Backdrop = GmailBackdrop | any;
|
|
20
19
|
|
|
21
20
|
// import GmailThreadView from '../dom-driver/gmail/views/gmail-thread-view';
|
|
22
21
|
// import InboxThreadView from '../dom-driver/inbox/views/inbox-thread-view';
|
|
@@ -94,7 +93,7 @@ export interface Driver {
|
|
|
94
93
|
): GmailSupportItemView;
|
|
95
94
|
addAppMenuItem(
|
|
96
95
|
menuItemDescriptor: AppMenuItemDescriptor
|
|
97
|
-
): Promise<GmailAppMenuItemView>;
|
|
96
|
+
): Promise<GmailAppMenuItemView | undefined>;
|
|
98
97
|
getSentMailNativeNavItem(): Promise<any>;
|
|
99
98
|
createLink(a: any, b: any): any;
|
|
100
99
|
goto(routeID: string, params: any): Promise<void>;
|
|
@@ -125,8 +124,6 @@ export interface Driver {
|
|
|
125
124
|
|
|
126
125
|
getSelectedThreadRowViewDrivers(): ReadonlyArray<ThreadRowViewDriver>;
|
|
127
126
|
registerThreadRowViewSelectionHandler(handler: () => any): () => void;
|
|
128
|
-
|
|
129
|
-
getLoadEventDetails(): any;
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
export interface ButterBarDriver {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as Kefir from 'kefir';
|
|
2
|
+
|
|
3
|
+
export type MoleViewDriver = {
|
|
4
|
+
show(): void;
|
|
5
|
+
setTitle(title: string): void;
|
|
6
|
+
setMinimized(minimized: boolean): void;
|
|
7
|
+
getMinimized(): boolean;
|
|
8
|
+
getEventStream(): Kefir.Observable<any, unknown>;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type MoleButtonDescriptor = {
|
|
13
|
+
title: string;
|
|
14
|
+
iconUrl: string;
|
|
15
|
+
iconClass?: string;
|
|
16
|
+
onClick: Function;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type MoleOptions = {
|
|
20
|
+
el: HTMLElement;
|
|
21
|
+
className?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
titleEl?: HTMLElement;
|
|
24
|
+
minimizedTitleEl?: HTMLElement;
|
|
25
|
+
titleButtons?: MoleButtonDescriptor[];
|
|
26
|
+
chrome?: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Driver } from '../driver-interfaces/driver';
|
|
2
|
+
import type { AutocompleteSearchResult } from '../../injected-js/gmail/modify-suggestions';
|
|
3
|
+
export default function copyAndValidateAutocompleteResults(driver: Driver, results: Array<AutocompleteSearchResult>): Array<AutocompleteSearchResult>;
|
|
4
|
+
//# sourceMappingURL=copyAndValidateAutocompleteResults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyAndValidateAutocompleteResults.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/lib/copyAndValidateAutocompleteResults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAE3F,MAAM,CAAC,OAAO,UAAU,kCAAkC,CACxD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,KAAK,CAAC,wBAAwB,CAAC,GACvC,KAAK,CAAC,wBAAwB,CAAC,CA8CjC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = copyAndValidateAutocompleteResults;
|
|
7
|
-
function copyAndValidateAutocompleteResults(driver, results) {
|
|
8
|
-
if (!Array.isArray(results)) {
|
|
9
|
-
throw new Error('suggestions must be an array');
|
|
10
|
-
}
|
|
11
|
-
return results.map(result => {
|
|
12
|
-
const resultCopy = {
|
|
13
|
-
...result
|
|
14
|
-
};
|
|
15
|
-
if (typeof resultCopy.name !== 'string' && typeof resultCopy.nameHTML !== 'string') {
|
|
16
|
-
throw new Error('suggestion must have name or nameHTML property');
|
|
1
|
+
export default function copyAndValidateAutocompleteResults(driver, results) {
|
|
2
|
+
if (!Array.isArray(results)) {
|
|
3
|
+
throw new Error('suggestions must be an array');
|
|
17
4
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
driver.getLogger().deprecationWarning('AutocompleteSearchResult "iconURL" property', 'AutocompleteSearchResult.iconUrl');
|
|
24
|
-
if (!resultCopy.iconUrl) {
|
|
25
|
-
if (driver.getOpts().REQUESTED_API_VERSION === 1) {
|
|
26
|
-
resultCopy.iconUrl = iconURL;
|
|
27
|
-
} else {
|
|
28
|
-
// eslint-disable-next-line no-console
|
|
29
|
-
console.error('Support for iconURL property was dropped after API version 1');
|
|
5
|
+
return results.map((result) => {
|
|
6
|
+
const resultCopy = { ...result };
|
|
7
|
+
if (typeof resultCopy.name !== 'string' &&
|
|
8
|
+
typeof resultCopy.nameHTML !== 'string') {
|
|
9
|
+
throw new Error('suggestion must have name or nameHTML property');
|
|
30
10
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
11
|
+
if (typeof resultCopy.routeName !== 'string' &&
|
|
12
|
+
typeof resultCopy.externalURL !== 'string' &&
|
|
13
|
+
typeof resultCopy.searchTerm !== 'string' &&
|
|
14
|
+
typeof resultCopy.onClick !== 'function') {
|
|
15
|
+
throw new Error('suggestion must have routeName, externalURL, ' +
|
|
16
|
+
'searchTerm, or onClick property');
|
|
17
|
+
}
|
|
18
|
+
if (typeof resultCopy.iconURL === 'string') {
|
|
19
|
+
const iconURL = resultCopy.iconURL;
|
|
20
|
+
driver
|
|
21
|
+
.getLogger()
|
|
22
|
+
.deprecationWarning('AutocompleteSearchResult "iconURL" property', 'AutocompleteSearchResult.iconUrl');
|
|
23
|
+
if (!resultCopy.iconUrl) {
|
|
24
|
+
if (driver.getOpts().REQUESTED_API_VERSION === 1) {
|
|
25
|
+
resultCopy.iconUrl = iconURL;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.error('Support for iconURL property was dropped after API version 1');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
delete resultCopy.iconURL;
|
|
33
|
+
}
|
|
34
|
+
return resultCopy;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a function suitable for mapping over a stream returned from
|
|
3
|
+
* makeElementChildStream or kefirMakeElementChildStream. */
|
|
4
|
+
type View = {
|
|
5
|
+
destroy(): void;
|
|
6
|
+
};
|
|
7
|
+
import type { ElementWithLifetime } from './make-element-child-stream';
|
|
8
|
+
export default function elementViewMapper<T extends View>(viewFn: (el: HTMLElement) => T): (event: ElementWithLifetime) => T;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=element-view-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-view-mapper.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/lib/dom/element-view-mapper.ts"],"names":[],"mappings":"AAAA;;4DAE4D;AAC5D,KAAK,IAAI,GAAG;IAAE,OAAO,IAAI,IAAI,CAAA;CAAE,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,SAAS,IAAI,EACtD,MAAM,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,CAAC,GAC7B,CAAC,KAAK,EAAE,mBAAmB,KAAK,CAAC,CAQnC"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return event => {
|
|
11
|
-
const view = viewFn(event.el);
|
|
12
|
-
event.removalStream.take(1).onValue(() => {
|
|
13
|
-
view.destroy();
|
|
14
|
-
});
|
|
15
|
-
return view;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
1
|
+
export default function elementViewMapper(viewFn) {
|
|
2
|
+
return (event) => {
|
|
3
|
+
const view = viewFn(event.el);
|
|
4
|
+
event.removalStream.take(1).onValue(() => {
|
|
5
|
+
view.destroy();
|
|
6
|
+
});
|
|
7
|
+
return view;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-mouse-down-and-up.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/lib/dom/on-mouse-down-and-up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,gBAAgB,OAEU,WAAW,KAAG,MAAM,UAAU,CAAC,KAAK,EAAE,OAAO,CAM5E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|