@inboxsdk/core 1.2.1 → 1.2.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 +1284 -1629
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js +1 -1
- package/pageWorld.js.map +1 -1
- package/src/common/load-script.d.ts +6 -0
- package/src/common/load-script.d.ts.map +1 -1
- package/src/common/load-script.js +3 -1
- package/src/inboxsdk-js/loading/platform-implementation-loader.d.ts.map +1 -1
- package/src/inboxsdk-js/loading/platform-implementation-loader.js +5 -1
- package/src/inboxsdk.d.ts +32 -72
- package/src/platform-implementation-js/constants/toolbars.d.ts +5 -1
- package/src/platform-implementation-js/constants/toolbars.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.js +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.js +3 -10
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.d.ts +2 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-body-changes-stream.d.ts +3 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-body-changes-stream.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-response-type-changes-stream.d.ts +6 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-response-type-changes-stream.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/manage-button-grouping.js +30 -38
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts +8 -8
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.js +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/attachment-icon.d.ts +3 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/attachment-icon.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.d.ts +33 -6
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-row-view.d.ts +9 -5
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-row-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-row-view.js +6 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.d.ts.map +1 -1
- package/src/platform-implementation-js/driver-common/compose/getDiscardStream.d.ts +6 -1
- package/src/platform-implementation-js/driver-common/compose/getDiscardStream.d.ts.map +1 -1
- package/src/platform-implementation-js/driver-common/compose/getPresendingStream.d.ts +6 -1
- package/src/platform-implementation-js/driver-common/compose/getPresendingStream.d.ts.map +1 -1
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.d.ts +40 -1
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.d.ts.map +1 -1
- package/src/platform-implementation-js/driver-interfaces/message-view-driver.d.ts +11 -4
- package/src/platform-implementation-js/driver-interfaces/message-view-driver.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/inject-script-EMBEDDED.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/inject-script-EMBEDDED.js +2 -7
- package/src/platform-implementation-js/namespaces/global.d.ts.map +1 -1
- package/src/platform-implementation-js/namespaces/toolbars.d.ts +8 -3
- package/src/platform-implementation-js/namespaces/toolbars.d.ts.map +1 -1
- package/src/platform-implementation-js/namespaces/toolbars.js +2 -1
- package/src/platform-implementation-js/views/app-toolbar-button-view.d.ts +7 -2
- package/src/platform-implementation-js/views/app-toolbar-button-view.d.ts.map +1 -1
- package/src/platform-implementation-js/views/compose-view.d.ts +63 -11
- package/src/platform-implementation-js/views/compose-view.d.ts.map +1 -1
- package/src/platform-implementation-js/views/compose-view.js +0 -1
- package/src/platform-implementation-js/views/conversations/message-view.d.ts +18 -3
- package/src/platform-implementation-js/views/conversations/message-view.d.ts.map +1 -1
- package/src/platform-implementation-js/views/conversations/message-view.js +2 -2
- package/src/platform-implementation-js/views/conversations/thread-view.d.ts +13 -3
- package/src/platform-implementation-js/views/conversations/thread-view.d.ts.map +1 -1
- package/src/platform-implementation-js/views/conversations/thread-view.js +1 -1
- package/src/platform-implementation-js/views/thread-row-view.d.ts +61 -8
- package/src/platform-implementation-js/views/thread-row-view.d.ts.map +1 -1
- package/src/platform-implementation-js/views/thread-row-view.js +3 -1
- package/src/platform-implementation-js/driver-interfaces/thread-row-view-driver.d.ts +0 -11
- package/src/platform-implementation-js/driver-interfaces/thread-row-view-driver.d.ts.map +0 -1
- package/src/platform-implementation-js/driver-interfaces/thread-row-view-driver.js +0 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export interface LoadScriptOptions {
|
|
2
|
+
/**
|
|
3
|
+
* By default, the script is executed within a function, so that top-level
|
|
4
|
+
* variables defined in it don't become global variables. Setting nowrap to
|
|
5
|
+
* true disables this behavior.
|
|
6
|
+
*/
|
|
2
7
|
nowrap?: boolean;
|
|
3
8
|
disableSourceMappingURL?: boolean;
|
|
9
|
+
disableSourceURL?: boolean;
|
|
4
10
|
XMLHttpRequest?: typeof XMLHttpRequest;
|
|
5
11
|
}
|
|
6
12
|
export default function loadScript(url: string, opts?: LoadScriptOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-script.d.ts","sourceRoot":"","sources":["../../../../src/common/load-script.ts"],"names":[],"mappings":"AAoDA,MAAM,WAAW,iBAAiB;
|
|
1
|
+
{"version":3,"file":"load-script.d.ts","sourceRoot":"","sources":["../../../../src/common/load-script.ts"],"names":[],"mappings":"AAoDA,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,iBAAiB,GACvB,OAAO,CAAC,IAAI,CAAC,CAkHf"}
|
|
@@ -71,7 +71,9 @@ export default function loadScript(url, opts) {
|
|
|
71
71
|
codeParts.unshift('(function(){');
|
|
72
72
|
codeParts.push('\n});');
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
if (opts?.disableSourceURL !== true) {
|
|
75
|
+
codeParts.push('\n//# sourceURL=' + url + '\n');
|
|
76
|
+
}
|
|
75
77
|
const codeToRun = codeParts.join('');
|
|
76
78
|
let program;
|
|
77
79
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-implementation-loader.d.ts","sourceRoot":"","sources":["../../../../../src/inboxsdk-js/loading/platform-implementation-loader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAElG,QAAA,MAAM,4BAA4B;gBACpB,MAAM,QAAQ,GAAG,GAAG,QAAQ,sBAAsB,CAAC;;;
|
|
1
|
+
{"version":3,"file":"platform-implementation-loader.d.ts","sourceRoot":"","sources":["../../../../../src/inboxsdk-js/loading/platform-implementation-loader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAElG,QAAA,MAAM,4BAA4B;gBACpB,MAAM,QAAQ,GAAG,GAAG,QAAQ,sBAAsB,CAAC;;;CA4BhE,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -16,7 +16,11 @@ const PlatformImplementationLoader = {
|
|
|
16
16
|
},
|
|
17
17
|
_loadScript: once(function () {
|
|
18
18
|
return loadScript(process.env.IMPLEMENTATION_URL, {
|
|
19
|
-
|
|
19
|
+
// platform-implementation has no top-level vars so no need for function wrapping
|
|
20
|
+
nowrap: true,
|
|
21
|
+
// webpack adds a sourceMappingURL comment.
|
|
22
|
+
// This source mapping URL includes cache breaking for error reporting in remote builds.
|
|
23
|
+
disableSourceURL: true,
|
|
20
24
|
});
|
|
21
25
|
}),
|
|
22
26
|
preload() {
|
package/src/inboxsdk.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import * as Kefir from 'kefir';
|
|
3
|
-
import TypedEmitter from 'typed-emitter';
|
|
2
|
+
import type * as Kefir from 'kefir';
|
|
3
|
+
import type TypedEmitter from 'typed-emitter';
|
|
4
4
|
import AppMenu from './platform-implementation-js/namespaces/app-menu';
|
|
5
|
-
import {
|
|
5
|
+
import type {
|
|
6
6
|
NavItemTypes,
|
|
7
7
|
NavItemDescriptor,
|
|
8
8
|
} from './platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view';
|
|
9
9
|
import NavItemView from './platform-implementation-js/views/nav-item-view';
|
|
10
10
|
import type { Stopper } from 'kefir-stopper';
|
|
11
|
-
import GmailRouteProcessor from './platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-processor';
|
|
12
|
-
import GmailDriver from './platform-implementation-js/dom-driver/gmail/gmail-driver';
|
|
13
|
-
import GmailRowListView from './platform-implementation-js/dom-driver/gmail/views/gmail-row-list-view';
|
|
11
|
+
import type GmailRouteProcessor from './platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-processor';
|
|
12
|
+
import type GmailDriver from './platform-implementation-js/dom-driver/gmail/gmail-driver';
|
|
13
|
+
import type GmailRowListView from './platform-implementation-js/dom-driver/gmail/views/gmail-row-list-view';
|
|
14
14
|
import type { AppLogger } from './platform-implementation-js/lib/logger';
|
|
15
|
+
import type { IThreadRowView as ThreadRowView } from './platform-implementation-js/views/thread-row-view';
|
|
16
|
+
import TypedEventEmitter from 'typed-emitter';
|
|
17
|
+
import { MessageViewEvent } from './platform-implementation-js/views/conversations/message-view';
|
|
18
|
+
import type { ThreadViewEvents } from './platform-implementation-js/views/conversations/thread-view';
|
|
19
|
+
import type { ComposeViewEvent } from './platform-implementation-js/views/compose-view';
|
|
15
20
|
export * from './platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view';
|
|
16
21
|
|
|
17
22
|
export const LOADER_VERSION: string;
|
|
@@ -263,59 +268,10 @@ export interface User {
|
|
|
263
268
|
isConversationViewDisabled(): Promise<boolean>;
|
|
264
269
|
}
|
|
265
270
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
on(event: 'destroy', listener: () => void): this;
|
|
271
|
-
off(event: 'destroy', listener: () => void): this;
|
|
272
|
-
once(event: 'destroy', listener: () => void): this;
|
|
273
|
-
prependListener(event: 'destroy', listener: () => void): this;
|
|
274
|
-
prependOnceListener(event: 'destroy', listener: () => void): this;
|
|
275
|
-
removeListener(event: 'destroy', listener: () => void): this;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export interface ImageDescriptor {
|
|
279
|
-
imageUrl?: string;
|
|
280
|
-
imageClass?: string;
|
|
281
|
-
tooltip?: string;
|
|
282
|
-
orderHint?: number;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface ThreadRowView extends Destroyable {
|
|
286
|
-
addLabel(labelDescriptor: LabelDescriptor | any): void;
|
|
287
|
-
addAttachmentIcon(threadRowAttachmentIconDescriptor: any): void;
|
|
288
|
-
addImage(
|
|
289
|
-
imageDescriptor:
|
|
290
|
-
| ImageDescriptor
|
|
291
|
-
| Kefir.Observable<ImageDescriptor | null, any>
|
|
292
|
-
): void;
|
|
293
|
-
getElement(): HTMLElement;
|
|
294
|
-
getVisibleDraftCount(): number;
|
|
295
|
-
getThreadIDIfStable(): string | null;
|
|
296
|
-
getThreadIDIfStableAsync(): Promise<string | null>;
|
|
297
|
-
addButton(threadRowButtonDescriptor: any): void;
|
|
298
|
-
getThreadID(): string;
|
|
299
|
-
getThreadIDAsync(): Promise<string>;
|
|
300
|
-
getDraftID(): Promise<string>;
|
|
301
|
-
isSelected(): boolean;
|
|
302
|
-
replaceDate(
|
|
303
|
-
threadDateDescriptor:
|
|
304
|
-
| ThreadDateDescriptor
|
|
305
|
-
| null
|
|
306
|
-
| Kefir.Observable<ThreadDateDescriptor | null, any>
|
|
307
|
-
): void;
|
|
308
|
-
getVisibleMessageCount(): number;
|
|
309
|
-
getSubject(): string;
|
|
310
|
-
replaceSubject(newSubjectStr: string): void;
|
|
311
|
-
getContacts(): Array<{ name: string | null; emailAddress: string }>;
|
|
312
|
-
replaceDraftLabel(
|
|
313
|
-
descriptor:
|
|
314
|
-
| DraftLabelDescriptor
|
|
315
|
-
| null
|
|
316
|
-
| Kefir.Observable<DraftLabelDescriptor | null, any>
|
|
317
|
-
): void;
|
|
318
|
-
}
|
|
271
|
+
export {
|
|
272
|
+
IThreadRowView as ThreadRowView,
|
|
273
|
+
ImageDescriptor,
|
|
274
|
+
} from './platform-implementation-js/views/thread-row-view';
|
|
319
275
|
|
|
320
276
|
export interface ThreadDateDescriptor {
|
|
321
277
|
text: string;
|
|
@@ -329,9 +285,9 @@ export interface DraftLabelDescriptor {
|
|
|
329
285
|
}
|
|
330
286
|
|
|
331
287
|
export interface LabelDescriptor {
|
|
332
|
-
title
|
|
288
|
+
title?: string;
|
|
333
289
|
titleHtml?: string;
|
|
334
|
-
iconUrl
|
|
290
|
+
iconUrl?: string;
|
|
335
291
|
iconClass?: string;
|
|
336
292
|
iconHtml?: string;
|
|
337
293
|
foregroundColor?: string;
|
|
@@ -469,7 +425,7 @@ export interface SimpleElementView extends EventEmitter {
|
|
|
469
425
|
destroy(): void;
|
|
470
426
|
}
|
|
471
427
|
|
|
472
|
-
export interface ThreadView extends
|
|
428
|
+
export interface ThreadView extends TypedEventEmitter<ThreadViewEvents> {
|
|
473
429
|
addLabel(): SimpleElementView;
|
|
474
430
|
addSidebarContentPanel(
|
|
475
431
|
contentPanelDescriptor: ContentPanelDescriptor
|
|
@@ -559,7 +515,7 @@ export interface MessageViewToolbarButtonDescriptor {
|
|
|
559
515
|
orderHint?: number;
|
|
560
516
|
}
|
|
561
517
|
|
|
562
|
-
export interface MessageView extends
|
|
518
|
+
export interface MessageView extends TypedEventEmitter<MessageViewEvent> {
|
|
563
519
|
addAttachmentIcon(
|
|
564
520
|
opts:
|
|
565
521
|
| MessageAttachmentIconDescriptor
|
|
@@ -639,7 +595,13 @@ export interface DropdownView extends EventEmitter {
|
|
|
639
595
|
reposition(): void;
|
|
640
596
|
}
|
|
641
597
|
|
|
642
|
-
export
|
|
598
|
+
export {
|
|
599
|
+
ComposeViewEvent,
|
|
600
|
+
LinkPopOver,
|
|
601
|
+
LinkPopOverSection,
|
|
602
|
+
} from './platform-implementation-js/views/compose-view';
|
|
603
|
+
|
|
604
|
+
export interface ComposeView extends TypedEmitter<ComposeViewEvent> {
|
|
643
605
|
destroyed: boolean;
|
|
644
606
|
addButton(
|
|
645
607
|
buttonOptions:
|
|
@@ -660,10 +622,9 @@ export interface ComposeView extends EventEmitter {
|
|
|
660
622
|
getBccRecipients(): Array<Contact>;
|
|
661
623
|
getBodyElement(): HTMLElement;
|
|
662
624
|
getCcRecipients(): Array<Contact>;
|
|
663
|
-
getCurrentDraftID(): Promise<string | null>;
|
|
625
|
+
getCurrentDraftID(): Promise<string | null | undefined>;
|
|
664
626
|
getElement(): HTMLElement;
|
|
665
|
-
getDraftID(): Promise<string | null>;
|
|
666
|
-
getMessageIDAsync(): Promise<string>;
|
|
627
|
+
getDraftID(): Promise<string | null | undefined>;
|
|
667
628
|
getSubject(): string;
|
|
668
629
|
getSubjectInput(): HTMLInputElement | null;
|
|
669
630
|
getThreadID(): string;
|
|
@@ -675,7 +636,7 @@ export interface ComposeView extends EventEmitter {
|
|
|
675
636
|
isMinimized(): boolean;
|
|
676
637
|
setMinimized(minimized: boolean): void;
|
|
677
638
|
isFullscreen(): boolean;
|
|
678
|
-
insertHTMLIntoBodyAtCursor(html: string): HTMLElement;
|
|
639
|
+
insertHTMLIntoBodyAtCursor(html: string): HTMLElement | null | undefined;
|
|
679
640
|
isForward(): boolean;
|
|
680
641
|
isInlineReplyForm(): boolean;
|
|
681
642
|
isReply(): boolean;
|
|
@@ -702,10 +663,9 @@ export interface SendOptions {
|
|
|
702
663
|
sendAndArchive?: boolean;
|
|
703
664
|
}
|
|
704
665
|
|
|
705
|
-
export
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
}
|
|
666
|
+
export type ComposeViewDestroyEvent = Parameters<
|
|
667
|
+
ComposeViewEvent['destroy']
|
|
668
|
+
>[0];
|
|
709
669
|
|
|
710
670
|
export interface ComposeButtonDescriptor {
|
|
711
671
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbars.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/constants/toolbars.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"toolbars.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/constants/toolbars.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;EAIf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,YAAY,MAAM,eAAe,CAAC;AAGzC,OAAO,UAAU,MAAM,iDAAiD,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iD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OP,8BAA8B,IAAI,OAAO;IAQzC,8BAA8B,CAAC,IAAI,EAAE,OAAO;IAW5C,8BAA8B,IAAI,OAAO;IAQzC,8BAA8B,CAAC,IAAI,EAAE,OAAO;IAW5C,4BAA4B,IAAI,WAAW;IA6G3C,6BAA6B;IAQ7B,oBAAoB,EAAE,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAM/D;IAEF,oBAAoB,IAAI,OAAO,CAAC,UAAU,CAAC;IAsC3C,yBAAyB,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS;IAkB3D,YAAY,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAQ;IAEvE,UAAU,CACR,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,QAAQ,EAAE,OAAO;IAqMnB,aAAa,CACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAC1C,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS;IAgD1C,gCAAgC,CAAC,qBAAqB,EAAE,WAAW;IAwBnE,6BAA6B,CAC3B,eAAe,EAAE,WAAW,EAC5B,QAAQ,EAAE,OAAO;IAkDnB,aAAa;CA2bd;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -161,6 +161,7 @@ class GmailAppSidebarPrimary {
|
|
|
161
161
|
titleBar = lastElementAboveViewPort;
|
|
162
162
|
}
|
|
163
163
|
if (titleBar) {
|
|
164
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
164
165
|
const instanceId = titleBar.getAttribute('data-instance-id');
|
|
165
166
|
const appName = titleBar.getAttribute('data-app-name');
|
|
166
167
|
if (!appName)
|
|
@@ -569,6 +570,7 @@ class GmailAppSidebarPrimary {
|
|
|
569
570
|
.filter((e) => e.detail.sidebarId === this._instanceId && !e.detail.isGlobal)
|
|
570
571
|
.takeUntilBy(this._stopper)
|
|
571
572
|
.onValue((e) => {
|
|
573
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
572
574
|
this._renderThreadSidebar().then((threadSidebarComponent) => {
|
|
573
575
|
const descriptor = this._instanceIdsToDescriptors.get(e.detail.instanceId);
|
|
574
576
|
if (!descriptor)
|
package/src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmail-attachment-card-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AAGzD,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAKxD,cAAM,uBAAuB;IAC3B,QAAQ,EAAG,WAAW,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IACrB,kBAAkB,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAAC;IACxD,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG;QAC1C,OAAO,IAAI,IAAI,CAAC;KACjB,CAAkB;IACnB,cAAc,6BAAgC;gBAG5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,MAAM,EAAE,WAAW,EACnB,iBAAiB,CAAC,EAAE,gBAAgB,GAAG,IAAI;IAY7C,OAAO;IAIP,UAAU,IAAI,WAAW;IAIzB,oBAAoB;IAIpB,UAAU;;;IAIV,gBAAgB;IAIhB,qBAAqB,IAAI,OAAO;IAIhC,iBAAiB,IAAI,MAAM;IAc3B,mBAAmB,IAAI,MAAM;IA2B7B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"gmail-attachment-card-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-attachment-card-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AAGzD,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAKxD,cAAM,uBAAuB;IAC3B,QAAQ,EAAG,WAAW,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IACrB,kBAAkB,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAAC;IACxD,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG;QAC1C,OAAO,IAAI,IAAI,CAAC;KACjB,CAAkB;IACnB,cAAc,6BAAgC;gBAG5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,MAAM,EAAE,WAAW,EACnB,iBAAiB,CAAC,EAAE,gBAAgB,GAAG,IAAI;IAY7C,OAAO;IAIP,UAAU,IAAI,WAAW;IAIzB,oBAAoB;IAIpB,UAAU;;;IAIV,gBAAgB;IAIhB,qBAAqB,IAAI,OAAO;IAIhC,iBAAiB,IAAI,MAAM;IAc3B,mBAAmB,IAAI,MAAM;IA2B7B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAStC,QAAQ,IAAI,MAAM;IAMlB,gBAAgB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS;IA2BvC,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IA8C1D,2BAA2B,IAAI,MAAM;IAIrC,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAuH9C,eAAe;IAsBf,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAsD/C,eAAe,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS;IAU3E,UAAU,CAAC,UAAU,EAAE,UAAU;IAMjC,mBAAmB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS;IAUhD,gBAAgB,IAAI,gBAAgB;IAIpC,0BAA0B,IAAI,WAAW;CAG1C;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -77,16 +77,6 @@ class GmailAttachmentCardView {
|
|
|
77
77
|
iconUrl: options.iconUrl,
|
|
78
78
|
tooltip: options.tooltip,
|
|
79
79
|
});
|
|
80
|
-
var basicButtonViewController = new BasicButtonViewController({
|
|
81
|
-
activateFunction: () => {
|
|
82
|
-
if (options.onClick) {
|
|
83
|
-
options.onClick({
|
|
84
|
-
getDownloadURL: () => this.getDownloadURL(),
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
buttonView: buttonView,
|
|
89
|
-
});
|
|
90
80
|
this._addButton(buttonView);
|
|
91
81
|
}
|
|
92
82
|
getTitle() {
|
|
@@ -225,12 +215,14 @@ class GmailAttachmentCardView {
|
|
|
225
215
|
}
|
|
226
216
|
this._addMoreButtons(options.buttons);
|
|
227
217
|
}
|
|
218
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
228
219
|
var self = this;
|
|
229
220
|
this._previewClicks.plug(Kefir.fromEvents(this._element, 'click').map((event) => ({
|
|
230
221
|
preventDefault: () => event.preventDefault(),
|
|
231
222
|
})));
|
|
232
223
|
if (options.previewThumbnailUrl && options.failoverPreviewIconUrl) {
|
|
233
224
|
const previewThumbnailUrlImage = querySelector(this._element, '.inboxsdk__attachmentCard_previewThumbnailUrl');
|
|
225
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
234
226
|
previewThumbnailUrlImage.onerror = (e) => {
|
|
235
227
|
var iconDiv = document.createElement('div');
|
|
236
228
|
iconDiv.classList.add('aYv');
|
|
@@ -273,6 +265,7 @@ class GmailAttachmentCardView {
|
|
|
273
265
|
buttonView
|
|
274
266
|
.getElement()
|
|
275
267
|
.setAttribute('data-inboxsdk-download-url', options.downloadUrl);
|
|
268
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
276
269
|
const basicButtonViewController = new BasicButtonViewController({
|
|
277
270
|
activateFunction: function () {
|
|
278
271
|
let prevented = false;
|
package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Kefir from 'kefir';
|
|
2
2
|
import type GmailComposeView from '../gmail-compose-view';
|
|
3
|
-
import {
|
|
4
|
-
export default function addButton(gmailComposeView: GmailComposeView, buttonDescriptorStream: Kefir.Observable<
|
|
3
|
+
import { ComposeButtonDescriptor } from '../../../../driver-interfaces/compose-view-driver';
|
|
4
|
+
export default function addButton(gmailComposeView: GmailComposeView, buttonDescriptorStream: Kefir.Observable<ComposeButtonDescriptor | null | undefined, unknown>, groupOrderHint: string, extraOnClickOptions: Record<string, any>): Promise<Record<string, any> | null | undefined>;
|
|
5
5
|
//# sourceMappingURL=add-button.d.ts.map
|
package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"add-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/add-button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAE5F,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,KAAK,CAAC,UAAU,CACtC,uBAAuB,GAAG,IAAI,GAAG,SAAS,EAC1C,OAAO,CACR,EACD,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAoCjD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as Kefir from 'kefir';
|
|
2
1
|
import type GmailComposeView from '../gmail-compose-view';
|
|
3
|
-
export default function (gmailComposeView: GmailComposeView):
|
|
2
|
+
export default function (gmailComposeView: GmailComposeView): import("kefir").Observable<{
|
|
3
|
+
eventName: "bodyChanged";
|
|
4
|
+
}, never>;
|
|
4
5
|
//# sourceMappingURL=get-body-changes-stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-body-changes-stream.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-body-changes-stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-body-changes-stream.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-body-changes-stream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,MAAM,CAAC,OAAO,WAAW,gBAAgB,EAAE,gBAAgB;;UAW1D"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import * as Kefir from 'kefir';
|
|
2
2
|
import type GmailComposeView from '../gmail-compose-view';
|
|
3
|
-
export default function (gmailComposeView: GmailComposeView): Kefir.Observable<
|
|
3
|
+
export default function (gmailComposeView: GmailComposeView): Kefir.Observable<{
|
|
4
|
+
data: {
|
|
5
|
+
isForward: boolean;
|
|
6
|
+
};
|
|
7
|
+
eventName: "responseTypeChanged";
|
|
8
|
+
}, never>;
|
|
4
9
|
//# sourceMappingURL=get-response-type-changes-stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-response-type-changes-stream.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-response-type-changes-stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-response-type-changes-stream.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-response-type-changes-stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D,MAAM,CAAC,OAAO,WAAW,gBAAgB,EAAE,gBAAgB;;;;;UAqB1D"}
|
|
@@ -34,13 +34,13 @@ export default defn(module, function manageButtonGrouping(gmailComposeView) {
|
|
|
34
34
|
return event.eventName === 'buttonAdded';
|
|
35
35
|
})
|
|
36
36
|
.onValue(() => {
|
|
37
|
-
|
|
37
|
+
groupButtonsAndAdjustToolbarPosition(gmailComposeView);
|
|
38
38
|
});
|
|
39
39
|
gmailComposeView
|
|
40
40
|
.getEventStream()
|
|
41
41
|
.filter((event) => event.eventName === 'resize' || event.eventName === 'restored')
|
|
42
42
|
.onValue(() => {
|
|
43
|
-
|
|
43
|
+
groupButtonsAndAdjustToolbarPosition(gmailComposeView);
|
|
44
44
|
});
|
|
45
45
|
var el = gmailComposeView.getElement();
|
|
46
46
|
gmailComposeView.getStopper().onValue(function () {
|
|
@@ -54,7 +54,7 @@ function _handleComposeFullscreenStateChanged(gmailComposeView) {
|
|
|
54
54
|
.querySelector('.inboxsdk__compose_groupedActionToolbar')) {
|
|
55
55
|
_ungroupButtons(gmailComposeView);
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
groupButtonsAndAdjustToolbarPosition(gmailComposeView);
|
|
58
58
|
}
|
|
59
59
|
function _ungroupButtons(gmailComposeView) {
|
|
60
60
|
const members = get(memberMap, gmailComposeView);
|
|
@@ -72,7 +72,7 @@ function _ungroupButtons(gmailComposeView) {
|
|
|
72
72
|
composeActionToolbar.appendChild(buttonToolbar);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function groupButtonsAndAdjustToolbarPosition(gmailComposeView) {
|
|
76
76
|
_groupButtonsIfNeeded(gmailComposeView);
|
|
77
77
|
_fixToolbarPosition(gmailComposeView);
|
|
78
78
|
}
|
|
@@ -85,19 +85,12 @@ function _groupButtonsIfNeeded(gmailComposeView) {
|
|
|
85
85
|
groupButtonsIfNeededMap.delete(gmailComposeView);
|
|
86
86
|
if (gmailComposeView.isDestroyed())
|
|
87
87
|
return;
|
|
88
|
-
_narrowButtonsIfNeeded(gmailComposeView);
|
|
89
88
|
if (_doButtonsNeedToGroup(gmailComposeView)) {
|
|
90
89
|
var groupedActionToolbarContainer = _createGroupedActionToolbarContainer(gmailComposeView);
|
|
91
90
|
var groupToggleButtonViewController = _createGroupToggleButtonViewController(gmailComposeView);
|
|
92
91
|
_swapToActionToolbar(gmailComposeView, groupToggleButtonViewController);
|
|
93
92
|
_checkAndSetInitialState(gmailComposeView, groupToggleButtonViewController);
|
|
94
93
|
_startMonitoringFormattingToolbar(gmailComposeView, groupToggleButtonViewController);
|
|
95
|
-
// remove narrow buttons class
|
|
96
|
-
gmailComposeView
|
|
97
|
-
.getElement()
|
|
98
|
-
.classList.remove('inboxsdk__compose_narrow_buttons');
|
|
99
|
-
// see if we should narrow buttons again
|
|
100
|
-
_narrowButtonsIfNeeded(gmailComposeView);
|
|
101
94
|
gmailComposeView.getStopper().onValue(function () {
|
|
102
95
|
groupedActionToolbarContainer.remove();
|
|
103
96
|
groupToggleButtonViewController.destroy();
|
|
@@ -105,37 +98,36 @@ function _groupButtonsIfNeeded(gmailComposeView) {
|
|
|
105
98
|
}
|
|
106
99
|
});
|
|
107
100
|
}
|
|
108
|
-
function _narrowButtonsIfNeeded(gmailComposeView) {
|
|
109
|
-
if (gmailComposeView.getElement().clientWidth >
|
|
110
|
-
_getBottomBarTableWidth(gmailComposeView) ||
|
|
111
|
-
gmailComposeView.getElement().querySelectorAll('.inboxsdk__composeButton')
|
|
112
|
-
.length === 0 ||
|
|
113
|
-
gmailComposeView
|
|
114
|
-
.getElement()
|
|
115
|
-
.classList.contains('inboxsdk__compose_narrow_buttons'))
|
|
116
|
-
return;
|
|
117
|
-
gmailComposeView
|
|
118
|
-
.getElement()
|
|
119
|
-
.classList.add('inboxsdk__compose_narrow_buttons');
|
|
120
|
-
//force reflow
|
|
121
|
-
gmailComposeView.getElement().offsetTop;
|
|
122
|
-
}
|
|
123
101
|
function _doButtonsNeedToGroup(gmailComposeView) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.querySelector('.inboxsdk__compose_groupedActionToolbar'))
|
|
102
|
+
const composeEl = gmailComposeView.getElement();
|
|
103
|
+
if (composeEl.querySelector('.inboxsdk__compose_groupedActionToolbar'))
|
|
127
104
|
return false;
|
|
128
|
-
if (
|
|
129
|
-
.getElement()
|
|
130
|
-
.querySelectorAll('.inboxsdk__composeButton:not([data-no-overflow])')
|
|
131
|
-
.length < 2)
|
|
105
|
+
if (composeEl.querySelectorAll('.inboxsdk__composeButton:not([data-no-overflow])').length < 2)
|
|
132
106
|
return false;
|
|
133
|
-
|
|
134
|
-
|
|
107
|
+
if (areNativeToolbarButtonsGrouped(composeEl)) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
135
111
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
112
|
+
const toolbarButtonStyles = new WeakMap();
|
|
113
|
+
function areNativeToolbarButtonsGrouped(composeEl) {
|
|
114
|
+
const nativeButtonsContainer = composeEl.querySelector('.bAK');
|
|
115
|
+
const containerWidth = nativeButtonsContainer?.offsetWidth ?? 0;
|
|
116
|
+
const nativeButtons = Array.from(nativeButtonsContainer?.querySelectorAll('.wG') ?? []);
|
|
117
|
+
let buttonsWidth = 0;
|
|
118
|
+
for (const button of nativeButtons) {
|
|
119
|
+
const style = toolbarButtonStyles.get(button) ?? getComputedStyle(button);
|
|
120
|
+
if (!toolbarButtonStyles.has(button)) {
|
|
121
|
+
toolbarButtonStyles.set(button, style);
|
|
122
|
+
}
|
|
123
|
+
const margin = parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
124
|
+
buttonsWidth += button.offsetWidth;
|
|
125
|
+
buttonsWidth += margin;
|
|
126
|
+
if (buttonsWidth > containerWidth) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return false;
|
|
139
131
|
}
|
|
140
132
|
function _createGroupedActionToolbarContainer(gmailComposeView) {
|
|
141
133
|
var groupedActionToolbarContainer = document.createElement('div');
|
|
@@ -2,13 +2,13 @@ import * as Kefir from 'kefir';
|
|
|
2
2
|
import type { Bus } from 'kefir-bus';
|
|
3
3
|
import type { Stopper } from 'kefir-stopper';
|
|
4
4
|
import type { TooltipDescriptor } from '../../../views/compose-button-view';
|
|
5
|
-
import PageParserTree from 'page-parser-tree';
|
|
6
|
-
import { TagTree } from 'tag-tree';
|
|
7
|
-
import type { ComposeNotice, StatusBar } from '../../../driver-interfaces/compose-view-driver';
|
|
5
|
+
import type PageParserTree from 'page-parser-tree';
|
|
6
|
+
import type { TagTree } from 'tag-tree';
|
|
7
|
+
import type { ComposeButtonDescriptor, ComposeNotice, ComposeViewDriver, ComposeViewDriverEvent, StatusBar } from '../../../driver-interfaces/compose-view-driver';
|
|
8
8
|
import type GmailDriver from '../gmail-driver';
|
|
9
|
-
import {
|
|
9
|
+
import { Contact } from '../../../../inboxsdk';
|
|
10
10
|
import BasicButtonViewController from '../../../widgets/buttons/basic-button-view-controller';
|
|
11
|
-
declare class GmailComposeView {
|
|
11
|
+
declare class GmailComposeView implements ComposeViewDriver {
|
|
12
12
|
_element: HTMLElement;
|
|
13
13
|
_seenBodyElement: HTMLElement;
|
|
14
14
|
_isInlineReplyForm: boolean;
|
|
@@ -19,7 +19,7 @@ declare class GmailComposeView {
|
|
|
19
19
|
_managedViewControllers: Array<{
|
|
20
20
|
destroy(): void;
|
|
21
21
|
}>;
|
|
22
|
-
_eventStream: Bus<
|
|
22
|
+
_eventStream: Bus<ComposeViewDriverEvent, unknown>;
|
|
23
23
|
_isTriggeringADraftSavePending: boolean;
|
|
24
24
|
_buttonViewControllerTooltipMap: WeakMap<Record<string, any>, Record<string, any>>;
|
|
25
25
|
_composeID: string;
|
|
@@ -56,7 +56,7 @@ declare class GmailComposeView {
|
|
|
56
56
|
destroy(): void;
|
|
57
57
|
_destroy(): void;
|
|
58
58
|
getStopper(): Stopper;
|
|
59
|
-
getEventStream(): Bus<
|
|
59
|
+
getEventStream(): Bus<ComposeViewDriverEvent, unknown>;
|
|
60
60
|
getGmailDriver(): GmailDriver;
|
|
61
61
|
isDestroyed(): boolean;
|
|
62
62
|
_setupStreams(): void;
|
|
@@ -85,7 +85,7 @@ declare class GmailComposeView {
|
|
|
85
85
|
getFromContact(): Contact;
|
|
86
86
|
getFromContactChoices(): Contact[];
|
|
87
87
|
setFromEmail(email: string): void;
|
|
88
|
-
addButton(buttonDescriptor: Kefir.Observable<
|
|
88
|
+
addButton(buttonDescriptor: Kefir.Observable<ComposeButtonDescriptor | null | undefined, unknown>, groupOrderHint: string, extraOnClickOptions: Record<string, any>): Promise<Record<string, any> | null | undefined>;
|
|
89
89
|
addTooltipToButton(buttonViewController: BasicButtonViewController, buttonDescriptor: Record<string, any>, tooltipDescriptor: TooltipDescriptor): void;
|
|
90
90
|
closeButtonTooltip(buttonViewController: Record<string, any>): void;
|
|
91
91
|
addComposeNotice(options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmail-compose-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAiC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAuB5E,OAAO,cAAc,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"gmail-compose-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAiC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAuB5E,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,SAAS,EACV,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,WAAW,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AM,GAAG,IAAI,GAAG,SAAS,CAAC;IAmIrE,wBAAwB,CAAC,cAAc,EAAE;QAAE,OAAO,IAAI,IAAI,CAAA;KAAE;IAI5D,oBAAoB,CAAC,IAAI,EAAE,MAAM;IAIjC,gCAAgC,IAAI,IAAI;IAIxC,WAAW,IAAI,OAAO;IA6BtB,YAAY,CAAC,SAAS,EAAE,OAAO;IAS/B,aAAa,CAAC,UAAU,EAAE,OAAO;IAYjC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,IAAI;IAsB3C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,IAAI;IAkDzC,iBAAiB;IA+BjB,mBAAmB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS;IAUhD,YAAY,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS;IAYzC,UAAU,IAAI,WAAW;IAIzB,YAAY,IAAI,OAAO;IAIvB,qBAAqB,IAAI,KAAK,GAAG,IAAI,GAAG,SAAS;IAejD,qBAAqB,CAAC,kBAAkB,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS;IAIlE,uBAAuB,CACrB,QAAQ,EAAE,CAAC,aAAa,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtC;QACE,IAAI,EAAE,MAAM,CAAC;KACd,GACD,OAAO,CAAC;QACN,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAsBR,sCAAsC;IAyDtC,iBAAiB,IAAI,IAAI;CAO1B;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1197,6 +1197,7 @@ class GmailComposeView {
|
|
|
1197
1197
|
try {
|
|
1198
1198
|
// If this succeeds, then the draft must exist on the server and we
|
|
1199
1199
|
// can safely return the draft id we know.
|
|
1200
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1200
1201
|
const gmailMessageId = await this._driver.getGmailMessageIdForSyncDraftId(syncMessageId);
|
|
1201
1202
|
}
|
|
1202
1203
|
catch (e) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare
|
|
1
|
+
import { AttachmentIcon as IAttachmentIcon } from '../../../../../inboxsdk';
|
|
2
|
+
declare const AttachmentIcon_base: new () => IAttachmentIcon;
|
|
3
|
+
declare class AttachmentIcon extends AttachmentIcon_base {
|
|
3
4
|
}
|
|
4
5
|
export default AttachmentIcon;
|
|
5
6
|
//# sourceMappingURL=attachment-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-icon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/attachment-icon.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"attachment-icon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/attachment-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAG5E,cAAM,cAAe,SAAQ,mBAA+C;CAAG;AAE/E,eAAe,cAAc,CAAC"}
|