@inboxsdk/core 1.2.3 → 1.2.5
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 +100 -42
- 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 +0 -6
- package/src/common/load-script.d.ts.map +1 -1
- package/src/common/load-script.js +1 -3
- package/src/inboxsdk-js/loading/platform-implementation-loader.d.ts.map +1 -1
- package/src/inboxsdk-js/loading/platform-implementation-loader.js +0 -3
- package/src/injected-js/gmail/thread-identifier/index.d.ts.map +1 -1
- package/src/injected-js/gmail/thread-identifier/index.js +13 -2
- package/src/injected-js/gmail/thread-identifier/thread-row-parser.d.ts +5 -1
- package/src/injected-js/gmail/thread-identifier/thread-row-parser.d.ts.map +1 -1
- package/src/injected-js/gmail/thread-identifier/thread-row-parser.js +9 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/gmail-load-event.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/gmail-load-event.js +17 -18
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-gmail-styles.d.ts +4 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-gmail-styles.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/track-gmail-styles.js +21 -3
- package/src/platform-implementation-js/dom-driver/gmail/gmail-page-communicator.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-page-communicator.js +3 -2
- 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 +10 -0
- 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-compose-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.js +20 -3
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.d.ts +2 -2
- 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 +8 -0
- 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 +8 -5
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.d.ts +1 -1
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/dom/custom-events.d.ts +5 -0
- package/src/platform-implementation-js/lib/dom/custom-events.d.ts.map +1 -0
- package/src/platform-implementation-js/lib/dom/custom-events.js +5 -0
- package/src/platform-implementation-js/lib/inject-script-EMBEDDED.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/inject-script-EMBEDDED.js +6 -1
- package/src/platform-implementation-js/lib/wait-for.d.ts +8 -0
- package/src/platform-implementation-js/lib/wait-for.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/wait-for.js +11 -1
- package/src/platform-implementation-js/views/conversations/message-view.d.ts +10 -2
- package/src/platform-implementation-js/views/conversations/message-view.d.ts.map +1 -1
- package/src/platform-implementation-js/driver-interfaces/message-view-driver.d.ts +0 -34
- package/src/platform-implementation-js/driver-interfaces/message-view-driver.d.ts.map +0 -1
- package/src/platform-implementation-js/driver-interfaces/message-view-driver.js +0 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
export class WaitForError extends Error {
|
|
2
|
+
name = 'WaitForError';
|
|
3
|
+
constructor() {
|
|
4
|
+
super('waitFor timeout');
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @param condition a function that returns the value to wait for, or falsey if it's not ready yet
|
|
9
|
+
* @throws {WaitForError} if the condition is not met within the timeout
|
|
10
|
+
*/
|
|
1
11
|
export default function waitFor(condition, timeout = 120 * 1000, steptime = 250) {
|
|
2
12
|
// make this error here so we have a sensible stack.
|
|
3
|
-
const timeoutError = new
|
|
13
|
+
const timeoutError = new WaitForError();
|
|
4
14
|
return new Promise(function (resolve, reject) {
|
|
5
15
|
let waited = 0;
|
|
6
16
|
function step() {
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import type Membrane from '../../lib/Membrane';
|
|
2
2
|
import type AttachmentCardView from './attachment-card-view';
|
|
3
3
|
import Conversations from '../../namespaces/conversations';
|
|
4
|
-
import type { MessageViewDriver, VIEW_STATE, MessageViewLinkDescriptor } from '../../driver-interfaces/message-view-driver';
|
|
5
4
|
import type { Driver } from '../../driver-interfaces/driver';
|
|
6
5
|
import type { Contact, MessageView as IMessageView } from '../../../inboxsdk';
|
|
7
6
|
import type { MessageViewDriverEventByName } from '../../dom-driver/gmail/views/gmail-message-view';
|
|
8
7
|
import type TypedEventEmitter from 'typed-emitter';
|
|
8
|
+
import type MessageViewDriver from '../../dom-driver/gmail/views/gmail-message-view';
|
|
9
|
+
export type VIEW_STATE = 'HIDDEN' | 'COLLAPSED' | 'EXPANDED';
|
|
10
|
+
type MessageViewLinkDescriptor = {
|
|
11
|
+
text: string;
|
|
12
|
+
html: string;
|
|
13
|
+
element: HTMLElement;
|
|
14
|
+
href: string;
|
|
15
|
+
isInQuotedArea: boolean;
|
|
16
|
+
};
|
|
9
17
|
export type MessageViewEvent = {
|
|
10
18
|
contactHover(data: Omit<MessageViewDriverEventByName['contactHover'], 'eventName'>): void;
|
|
11
19
|
destroy(): void;
|
|
@@ -40,7 +48,7 @@ declare class MessageView extends MessageView_base implements IMessageView {
|
|
|
40
48
|
getRecipientsFull(): Promise<Array<Contact>>;
|
|
41
49
|
getThreadView(): ReturnType<IMessageView['getThreadView']>;
|
|
42
50
|
getDateString(): string;
|
|
43
|
-
addAttachmentIcon(iconDescriptor: Parameters<IMessageView['addAttachmentIcon']>[0]): import("
|
|
51
|
+
addAttachmentIcon(iconDescriptor: Parameters<IMessageView['addAttachmentIcon']>[0]): import("../../dom-driver/gmail/views/gmail-message-view/attachment-icon").default;
|
|
44
52
|
getViewState(): VIEW_STATE;
|
|
45
53
|
hasOpenReply(): boolean;
|
|
46
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/conversations/message-view.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAC7D,OAAO,aAEN,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"message-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/conversations/message-view.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAC7D,OAAO,aAEN,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,iBAAiB,MAAM,iDAAiD,CAAC;AAErF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAE7D,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,OAAO,CAAC;CACzB,CAA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,OAAO;IAMpD,QAAQ,IAAI,OAAO;IAInB,cAAc,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAmBlD,SAAS,IAAI,OAAO;IAIpB,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC;IAa/B,0BAA0B,IAAI,KAAK,CAAC,MAAM,CAAC;IAO3C,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAI5C,aAAa,IAAI,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAK1D,aAAa,IAAI,MAAM;IAIvB,iBAAiB,CACf,cAAc,EAAE,UAAU,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAOlE,YAAY,IAAI,UAAU;IAO1B,YAAY,IAAI,OAAO;CAUxB;AA4DD,eAAe,WAAW,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type * as Kefir from 'kefir';
|
|
2
|
-
import type { AttachmentCardViewDriver } from './driver';
|
|
3
|
-
import type { AttachmentIcon, Contact, MessageAttachmentIconDescriptor, MessageViewToolbarButtonDescriptor } from '../../inboxsdk';
|
|
4
|
-
import { type MessageViewDriverEvents } from '../dom-driver/gmail/views/gmail-message-view';
|
|
5
|
-
export type VIEW_STATE = 'HIDDEN' | 'COLLAPSED' | 'EXPANDED';
|
|
6
|
-
export type MessageViewLinkDescriptor = {
|
|
7
|
-
text: string;
|
|
8
|
-
html: string;
|
|
9
|
-
element: HTMLElement;
|
|
10
|
-
href: string;
|
|
11
|
-
isInQuotedArea: boolean;
|
|
12
|
-
};
|
|
13
|
-
export interface MessageViewDriver {
|
|
14
|
-
addAttachmentIcon(opts: MessageAttachmentIconDescriptor | Kefir.Stream<MessageAttachmentIconDescriptor, never>): AttachmentIcon;
|
|
15
|
-
isElementInQuotedArea(element: HTMLElement): boolean;
|
|
16
|
-
getMessageID(): string;
|
|
17
|
-
getContentsElement(): HTMLElement;
|
|
18
|
-
addMoreMenuItem(options: MessageViewToolbarButtonDescriptor): void;
|
|
19
|
-
getAttachmentCardViewDrivers(): Array<AttachmentCardViewDriver>;
|
|
20
|
-
addAttachmentCard(options: Record<string, any>): AttachmentCardViewDriver;
|
|
21
|
-
addButtonToDownloadAllArea(options: Record<string, any>): void;
|
|
22
|
-
getEventStream(): Kefir.Observable<MessageViewDriverEvents, unknown>;
|
|
23
|
-
getMessageIDAsync(): Promise<string>;
|
|
24
|
-
getRecipientsFull(): Promise<Array<Contact>>;
|
|
25
|
-
getViewState(): VIEW_STATE;
|
|
26
|
-
getDateString(): string;
|
|
27
|
-
getReadyStream(): Kefir.Observable<any, unknown>;
|
|
28
|
-
getRecipientEmailAddresses(): Array<string>;
|
|
29
|
-
getSender(): Contact;
|
|
30
|
-
getThreadViewDriver(): Record<string, any>;
|
|
31
|
-
hasOpenReply(): boolean;
|
|
32
|
-
isLoaded(): boolean;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=message-view-driver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-view-driver.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/driver-interfaces/message-view-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,+BAA+B,EAC/B,kCAAkC,EACnC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAE5F,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAC7D,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAA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