@inboxsdk/core 2.1.38 → 2.1.39
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
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.39-1712261377230-745de69ef3533e1a";
|
|
894
894
|
if (false) {}
|
|
895
895
|
|
|
896
896
|
/***/ }),
|
|
@@ -10629,7 +10629,7 @@ options.insert = htmlElement => {
|
|
|
10629
10629
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
10630
10630
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
10631
10631
|
///@ts-ignore
|
|
10632
|
-
"2.1.
|
|
10632
|
+
"2.1.39-1712261377230-745de69ef3533e1a");
|
|
10633
10633
|
document.head.append(htmlElement);
|
|
10634
10634
|
};
|
|
10635
10635
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -12852,6 +12852,14 @@ function _setupViewDriverWatcher(appId, stream, ViewClass, handlerRegistry, Conv
|
|
|
12852
12852
|
|
|
12853
12853
|
|
|
12854
12854
|
|
|
12855
|
+
/**
|
|
12856
|
+
* Represents a visible message in the UI. There are properties to access data about the message itself as well as change the state of the UI. MessageViews have a view state as well as a loaded state. These 2 properties are orthogonal to each other.
|
|
12857
|
+
|
|
12858
|
+
* A messages' view state can be one of {@link MessageViewViewStates.EXPANDED}, {@link MessageViewViewStates.COLLAPSED} or {@link MessageViewViewStates.HIDDEN}. Gmail visually display messages in a thread in different ways depending on what they are trying to show a user. These values are described in the enum MessageViewViewStates. The load state of a message determines whether all of the data pertaining to a message has been loaded in the UI. In some case, not all the information (such as recipients or the body) may be loaded, typically when the the view state is COLLAPSED or HIDDEN.
|
|
12859
|
+
|
|
12860
|
+
* @note You should not depend on any relationship between the view state
|
|
12861
|
+
* and load state. Instead, use the provided {MessageView#getViewState} and {MessageView#isLoaded} methods.
|
|
12862
|
+
*/
|
|
12855
12863
|
class MessageView extends safe_event_emitter/* default */.Z {
|
|
12856
12864
|
destroyed = false;
|
|
12857
12865
|
#driver;
|
|
@@ -12931,6 +12939,10 @@ class MessageView extends safe_event_emitter/* default */.Z {
|
|
|
12931
12939
|
isElementInQuotedArea(element) {
|
|
12932
12940
|
return this.#messageViewImplementation.isElementInQuotedArea(element);
|
|
12933
12941
|
}
|
|
12942
|
+
|
|
12943
|
+
/**
|
|
12944
|
+
* Returns whether this message has been loaded yet. If the message has not been loaded, some of the data related methods on this object may return empty results. The message may be loaded once the user clicks on the message stub.
|
|
12945
|
+
*/
|
|
12934
12946
|
isLoaded() {
|
|
12935
12947
|
return this.#messageViewImplementation.isLoaded();
|
|
12936
12948
|
}
|
|
@@ -12947,6 +12959,14 @@ class MessageView extends safe_event_emitter/* default */.Z {
|
|
|
12947
12959
|
}
|
|
12948
12960
|
return this.#linksInBody;
|
|
12949
12961
|
}
|
|
12962
|
+
|
|
12963
|
+
/**
|
|
12964
|
+
* Get the contact of the sender of this message.
|
|
12965
|
+
* @returns {Contact} The contact of the sender of this message.
|
|
12966
|
+
* @throws {Error} If the message has not been loaded yet.
|
|
12967
|
+
*
|
|
12968
|
+
* @note If you're using this method on an array of {MessageView}s returned by {@link ThreadRowView#getMessageViewsAll}, make sure to check {@link MessageView#isLoaded} before calling this method.
|
|
12969
|
+
*/
|
|
12950
12970
|
getSender() {
|
|
12951
12971
|
return this.#messageViewImplementation.getSender();
|
|
12952
12972
|
}
|
|
@@ -15496,7 +15516,7 @@ options.insert = htmlElement => {
|
|
|
15496
15516
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
15497
15517
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
15498
15518
|
///@ts-ignore
|
|
15499
|
-
"2.1.
|
|
15519
|
+
"2.1.39-1712261377230-745de69ef3533e1a");
|
|
15500
15520
|
document.head.append(htmlElement);
|
|
15501
15521
|
};
|
|
15502
15522
|
options.domAPI = (styleDomAPI_default());
|
|
@@ -19582,7 +19602,7 @@ mole_view_module_options.insert = htmlElement => {
|
|
|
19582
19602
|
htmlElement.setAttribute('data-inboxsdk-version',
|
|
19583
19603
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
|
|
19584
19604
|
///@ts-ignore
|
|
19585
|
-
"2.1.
|
|
19605
|
+
"2.1.39-1712261377230-745de69ef3533e1a");
|
|
19586
19606
|
document.head.append(htmlElement);
|
|
19587
19607
|
};
|
|
19588
19608
|
mole_view_module_options.domAPI = (styleDomAPI_default());
|
package/package.json
CHANGED
package/src/inboxsdk.d.ts
CHANGED
|
@@ -15,10 +15,9 @@ import type GmailRowListView from './platform-implementation-js/dom-driver/gmail
|
|
|
15
15
|
import type { AppLogger } from './platform-implementation-js/lib/logger';
|
|
16
16
|
import type ThreadRowView from './platform-implementation-js/views/thread-row-view';
|
|
17
17
|
import TypedEventEmitter from 'typed-emitter';
|
|
18
|
-
import {
|
|
18
|
+
import { default as MessageView } from './platform-implementation-js/views/conversations/message-view';
|
|
19
19
|
import type { ThreadViewEvents } from './platform-implementation-js/views/conversations/thread-view';
|
|
20
20
|
import type { ComposeViewEvent } from './platform-implementation-js/views/compose-view';
|
|
21
|
-
import type AttachmentCardView from './platform-implementation-js/views/conversations/attachment-card-view';
|
|
22
21
|
import type TopMessageBarView from './platform-implementation-js/widgets/top-message-bar-view';
|
|
23
22
|
import type { IMoleView as MoleView } from './platform-implementation-js/widgets/mole-view';
|
|
24
23
|
export * from './platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view';
|
|
@@ -586,56 +585,13 @@ export type AttachmentIcon = TypedEmitter<{
|
|
|
586
585
|
tooltipShown: () => void;
|
|
587
586
|
}>;
|
|
588
587
|
|
|
589
|
-
export type MessageViewToolbarSectionNames = 'MORE';
|
|
590
|
-
|
|
591
|
-
export interface MessageViewToolbarButtonDescriptor {
|
|
592
|
-
section: MessageViewToolbarSectionNames;
|
|
593
|
-
title: string;
|
|
594
|
-
iconUrl?: string;
|
|
595
|
-
iconClass?: string;
|
|
596
|
-
onClick: (e: MouseEvent) => void;
|
|
597
|
-
orderHint?: number;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
588
|
export type { MessageViewViewStates } from './platform-implementation-js/namespaces/conversations';
|
|
601
589
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
* @note You should not depend on any relationship between the view state
|
|
608
|
-
* and load state. Instead, use the provided {MessageView#getViewState} and {MessageView#isLoaded} methods.
|
|
609
|
-
*/
|
|
610
|
-
export interface MessageView extends TypedEventEmitter<MessageViewEvent> {
|
|
611
|
-
addAttachmentIcon(
|
|
612
|
-
opts:
|
|
613
|
-
| MessageAttachmentIconDescriptor
|
|
614
|
-
| Kefir.Stream<MessageAttachmentIconDescriptor, never>,
|
|
615
|
-
): AttachmentIcon;
|
|
616
|
-
addToolbarButton(opts: MessageViewToolbarButtonDescriptor): void;
|
|
617
|
-
getBodyElement(): HTMLElement;
|
|
618
|
-
isElementInQuotedArea(element: HTMLElement): boolean;
|
|
619
|
-
/**
|
|
620
|
-
* Returns whether this message has been loaded yet. If the message has not been loaded, some of the data related methods on this object may return empty results. The message may be loaded once the user clicks on the message stub.
|
|
621
|
-
*/
|
|
622
|
-
isLoaded(): boolean;
|
|
623
|
-
getFileAttachmentCardViews(): AttachmentCardView[];
|
|
624
|
-
/**
|
|
625
|
-
* Get the contact of the sender of this message.
|
|
626
|
-
|
|
627
|
-
* @returns {Contact} The contact of the sender of this message.
|
|
628
|
-
* @throws {Error} If the message has not been loaded yet.
|
|
629
|
-
*
|
|
630
|
-
* @note If you're using this method on an array of {MessageView}s returned by {@link ThreadRowView#getMessageViewsAll}, make sure to check {@link MessageView#isLoaded} before calling this method.
|
|
631
|
-
*/
|
|
632
|
-
getSender(): Contact;
|
|
633
|
-
getRecipients(): Array<Contact>;
|
|
634
|
-
getRecipientsFull(): Promise<Array<Contact>>;
|
|
635
|
-
getLinksInBody(): Array<MessageViewLinkDescriptor>;
|
|
636
|
-
getThreadView(): ThreadView;
|
|
637
|
-
getMessageIDAsync(): Promise<string>;
|
|
638
|
-
}
|
|
590
|
+
export {
|
|
591
|
+
default as MessageView,
|
|
592
|
+
MessageViewToolbarButtonDescriptor,
|
|
593
|
+
MessageViewToolbarSectionNames,
|
|
594
|
+
} from './platform-implementation-js/views/conversations/message-view';
|
|
639
595
|
|
|
640
596
|
export interface Contact {
|
|
641
597
|
name: string;
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import type Membrane from '../../lib/Membrane';
|
|
2
2
|
import type AttachmentCardView from './attachment-card-view';
|
|
3
3
|
import type { Driver } from '../../driver-interfaces/driver';
|
|
4
|
-
import type { Contact,
|
|
4
|
+
import type { Contact, MessageAttachmentIconDescriptor } from '../../../inboxsdk';
|
|
5
5
|
import type { MessageViewDriverEventByName } from '../../dom-driver/gmail/views/gmail-message-view';
|
|
6
6
|
import type TypedEventEmitter from 'typed-emitter';
|
|
7
7
|
import type MessageViewDriver from '../../dom-driver/gmail/views/gmail-message-view';
|
|
8
|
+
import ThreadView from './thread-view';
|
|
9
|
+
import { Descriptor } from '../../../types/descriptor';
|
|
8
10
|
export type VIEW_STATE = 'HIDDEN' | 'COLLAPSED' | 'EXPANDED';
|
|
11
|
+
export type MessageViewToolbarSectionNames = 'MORE';
|
|
12
|
+
export interface MessageViewToolbarButtonDescriptor {
|
|
13
|
+
section: MessageViewToolbarSectionNames;
|
|
14
|
+
title: string;
|
|
15
|
+
iconUrl?: string;
|
|
16
|
+
iconClass?: string;
|
|
17
|
+
onClick: (e: MouseEvent) => void;
|
|
18
|
+
orderHint?: number;
|
|
19
|
+
}
|
|
9
20
|
interface MessageViewLinkDescriptor {
|
|
10
21
|
text: string;
|
|
11
22
|
html: string;
|
|
@@ -26,29 +37,48 @@ export type MessageViewEvent = {
|
|
|
26
37
|
}): void;
|
|
27
38
|
};
|
|
28
39
|
declare const MessageView_base: new () => TypedEventEmitter<MessageViewEvent>;
|
|
29
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Represents a visible message in the UI. There are properties to access data about the message itself as well as change the state of the UI. MessageViews have a view state as well as a loaded state. These 2 properties are orthogonal to each other.
|
|
42
|
+
|
|
43
|
+
* A messages' view state can be one of {@link MessageViewViewStates.EXPANDED}, {@link MessageViewViewStates.COLLAPSED} or {@link MessageViewViewStates.HIDDEN}. Gmail visually display messages in a thread in different ways depending on what they are trying to show a user. These values are described in the enum MessageViewViewStates. The load state of a message determines whether all of the data pertaining to a message has been loaded in the UI. In some case, not all the information (such as recipients or the body) may be loaded, typically when the the view state is COLLAPSED or HIDDEN.
|
|
44
|
+
|
|
45
|
+
* @note You should not depend on any relationship between the view state
|
|
46
|
+
* and load state. Instead, use the provided {MessageView#getViewState} and {MessageView#isLoaded} methods.
|
|
47
|
+
*/
|
|
48
|
+
export default class MessageView extends MessageView_base {
|
|
30
49
|
#private;
|
|
31
50
|
destroyed: boolean;
|
|
32
51
|
constructor(messageViewImplementation: MessageViewDriver, membrane: Membrane, driver: Driver);
|
|
33
52
|
addAttachmentCardView(cardOptions: Record<string, any>): AttachmentCardView;
|
|
34
53
|
addAttachmentCardViewNoPreview(cardOptions: Record<string, any>): AttachmentCardView;
|
|
35
54
|
addAttachmentsToolbarButton(buttonOptions: Record<string, any>): void;
|
|
36
|
-
addToolbarButton(buttonOptions:
|
|
55
|
+
addToolbarButton(buttonOptions: MessageViewToolbarButtonDescriptor): void;
|
|
37
56
|
getBodyElement(): HTMLElement;
|
|
38
57
|
getMessageID(): string;
|
|
39
58
|
getMessageIDAsync(): Promise<string>;
|
|
40
59
|
getFileAttachmentCardViews(): Array<AttachmentCardView>;
|
|
41
60
|
getAttachmentCardViews(): Array<AttachmentCardView>;
|
|
42
61
|
isElementInQuotedArea(element: HTMLElement): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Returns whether this message has been loaded yet. If the message has not been loaded, some of the data related methods on this object may return empty results. The message may be loaded once the user clicks on the message stub.
|
|
64
|
+
*/
|
|
43
65
|
isLoaded(): boolean;
|
|
44
66
|
getLinksInBody(): Array<MessageViewLinkDescriptor>;
|
|
67
|
+
/**
|
|
68
|
+
* Get the contact of the sender of this message.
|
|
69
|
+
|
|
70
|
+
* @returns {Contact} The contact of the sender of this message.
|
|
71
|
+
* @throws {Error} If the message has not been loaded yet.
|
|
72
|
+
*
|
|
73
|
+
* @note If you're using this method on an array of {MessageView}s returned by {@link ThreadRowView#getMessageViewsAll}, make sure to check {@link MessageView#isLoaded} before calling this method.
|
|
74
|
+
*/
|
|
45
75
|
getSender(): Contact;
|
|
46
76
|
getRecipients(): Array<Contact>;
|
|
47
77
|
getRecipientEmailAddresses(): Array<string>;
|
|
48
78
|
getRecipientsFull(): Promise<Array<Contact>>;
|
|
49
|
-
getThreadView():
|
|
79
|
+
getThreadView(): ThreadView;
|
|
50
80
|
getDateString(): string;
|
|
51
|
-
addAttachmentIcon(iconDescriptor:
|
|
81
|
+
addAttachmentIcon(iconDescriptor: Descriptor<MessageAttachmentIconDescriptor, never>): import("../../dom-driver/gmail/views/gmail-message-view/attachment-icon").default;
|
|
52
82
|
getViewState(): VIEW_STATE;
|
|
53
83
|
hasOpenReply(): boolean;
|
|
54
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/conversations/message-view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAK7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"message-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/conversations/message-view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAK7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EACV,OAAO,EACP,+BAA+B,EAChC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,iBAAiB,MAAM,iDAAiD,CAAC;AACrF,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAE7D,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,kCAAkC;IACjD,OAAO,EAAE,8BAA8B,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,yBAAyB;IACjC,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;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,CACV,IAAI,EAAE,IAAI,CAAC,4BAA4B,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,GACpE,IAAI,CAAC;IACR,OAAO,IA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