@inboxsdk/core 2.1.42 → 2.1.43-0

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.
@@ -1,3 +1,3 @@
1
- import nonremote from './inboxsdk-NONREMOTE';
1
+ import * as nonremote from './inboxsdk-NONREMOTE';
2
2
  export default nonremote;
3
3
  //# sourceMappingURL=inboxsdk-NONREMOTE-INTEGRATED-PAGEWORLD.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inboxsdk-NONREMOTE-INTEGRATED-PAGEWORLD.d.ts","sourceRoot":"","sources":["../../../../src/inboxsdk-js/inboxsdk-NONREMOTE-INTEGRATED-PAGEWORLD.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAQ7C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"inboxsdk-NONREMOTE-INTEGRATED-PAGEWORLD.d.ts","sourceRoot":"","sources":["../../../../src/inboxsdk-js/inboxsdk-NONREMOTE-INTEGRATED-PAGEWORLD.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAQlD,eAAe,SAAS,CAAC"}
@@ -1,4 +1,7 @@
1
1
  import './inboxsdk-NONREMOTE-setup';
2
- import * as SDK from './inboxsdk';
3
- export default SDK;
2
+ /**
3
+ * Ultimately, as we move away from MV2 and towards a more tree-shaking friendly setup,
4
+ * we should be able to export the InboxSDK API directly from this file instead of relying on a class.
5
+ */
6
+ export * from './inboxsdk';
4
7
  //# sourceMappingURL=inboxsdk-NONREMOTE.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inboxsdk-NONREMOTE.d.ts","sourceRoot":"","sources":["../../../../src/inboxsdk-js/inboxsdk-NONREMOTE.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAElC,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"inboxsdk-NONREMOTE.d.ts","sourceRoot":"","sources":["../../../../src/inboxsdk-js/inboxsdk-NONREMOTE.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,cAAc,YAAY,CAAC"}
package/src/inboxsdk.d.ts CHANGED
@@ -15,9 +15,8 @@ import type GmailDriver from './platform-implementation-js/dom-driver/gmail/gmai
15
15
  import type GmailRowListView from './platform-implementation-js/dom-driver/gmail/views/gmail-row-list-view';
16
16
  import type { AppLogger } from './platform-implementation-js/lib/logger';
17
17
  import type ThreadRowView from './platform-implementation-js/views/thread-row-view';
18
- import TypedEventEmitter from 'typed-emitter';
19
18
  import { default as MessageView } from './platform-implementation-js/views/conversations/message-view';
20
- import type { ThreadViewEvents } from './platform-implementation-js/views/conversations/thread-view';
19
+ import type ThreadView from './platform-implementation-js/views/conversations/thread-view';
21
20
  import type { ComposeViewEvent } from './platform-implementation-js/views/compose-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';
@@ -452,54 +451,7 @@ export interface SimpleElementView extends EventEmitter {
452
451
  destroy(): void;
453
452
  }
454
453
 
455
- export interface ThreadView extends TypedEventEmitter<ThreadViewEvents> {
456
- addLabel(): SimpleElementView;
457
- addSidebarContentPanel(
458
- contentPanelDescriptor:
459
- | ContentPanelDescriptor
460
- | Kefir.Observable<ContentPanelDescriptor, unknown>,
461
- ): ContentPanelView;
462
- /**
463
- * @returns {MessageView[]} of all the loaded MessageView objects currently in the thread. @see MessageView for more information on what "loaded" means. Note that more messages may load into the thread later! If it's important to get future messages, use {@link Conversations#registerMessageViewHandler} instead.
464
- */
465
- getMessageViews(): Array<MessageView>;
466
- /**
467
- * @returns {MessageView[]} of all the MessageView objects in the thread regardless of their load state. @see MessageView for more information on what "loaded" means.
468
- */
469
- getMessageViewsAll(): Array<MessageView>;
470
- getSubject(): string;
471
- /**
472
- * @deprecated
473
- */
474
- getThreadID(): string;
475
- getThreadIDAsync(): Promise<string>;
476
- addNoticeBar(): SimpleElementView;
477
- }
478
-
479
- export interface UNSTABLE_ThreadView extends ThreadView {
480
- //#region Undocumented methods
481
- /**
482
- * @internal
483
- */
484
- addCustomMessage: (descriptor: {
485
- collapsedEl: HTMLElement;
486
- headerEl: HTMLElement;
487
- bodyEl: HTMLElement;
488
- iconUrl: string;
489
- sortDate: Date;
490
- }) => CustomMessageView;
491
- /**
492
- * @internal
493
- */
494
- registerHiddenCustomMessageNoticeProvider: (
495
- provider: (
496
- numCustomHidden: number,
497
- numberNativeHidden: number,
498
- unmountPromise: Promise<void>,
499
- ) => HTMLElement | null,
500
- ) => void;
501
- //#endregion
502
- }
454
+ export { ThreadView };
503
455
 
504
456
  export interface CustomMessageView extends EventEmitter {
505
457
  destroy(): void;
@@ -1,6 +1,5 @@
1
1
  import type Membrane from '../../lib/Membrane';
2
2
  import type SimpleElementView from '../../views/SimpleElementView';
3
- import { type Observable } from 'kefir';
4
3
  import ContentPanelView from '../content-panel-view';
5
4
  import type MessageView from './message-view';
6
5
  import type { Driver, ThreadViewDriver } from '../../driver-interfaces/driver';
@@ -8,6 +7,7 @@ import type CustomMessageView from '../../views/conversations/custom-message-vie
8
7
  import type { Contact } from '../../../inboxsdk';
9
8
  import type TypedEventEmitter from 'typed-emitter';
10
9
  import { type ContentPanelDescriptor } from '../../driver-common/sidebar/ContentPanelViewDriver';
10
+ import type { Descriptor } from '../../../types/descriptor';
11
11
  export type ThreadViewEvents = {
12
12
  destroy(): void;
13
13
  contactHover(data: {
@@ -18,15 +18,30 @@ export type ThreadViewEvents = {
18
18
  };
19
19
  declare const ThreadView_base: new () => TypedEventEmitter<ThreadViewEvents>;
20
20
  declare class ThreadView extends ThreadView_base {
21
+ #private;
21
22
  destroyed: boolean;
22
23
  constructor(threadViewImplementation: ThreadViewDriver, appId: string, driver: Driver, membrane: Membrane);
23
- addSidebarContentPanel(descriptor: ContentPanelDescriptor | Observable<ContentPanelDescriptor, unknown>): ContentPanelView;
24
+ addSidebarContentPanel(descriptor: Descriptor<ContentPanelDescriptor>): ContentPanelView;
24
25
  addNoticeBar(): SimpleElementView;
26
+ /**
27
+ * @alpha
28
+ * @internal
29
+ */
25
30
  registerHiddenCustomMessageNoticeProvider(provider: (numberCustomMessagesHidden: number, numberNativeMessagesHidden: number | null | undefined, unmountPromise: Promise<void>) => HTMLElement): void;
31
+ /**
32
+ * @alpha
33
+ * @internal
34
+ */
26
35
  addCustomMessage(descriptor: Record<string, any>): CustomMessageView;
36
+ /**
37
+ * @returns {MessageView[]} of all the loaded MessageView objects currently in the thread. @see MessageView for more information on what "loaded" means. Note that more messages may load into the thread later! If it's important to get future messages, use {@link Conversations#registerMessageViewHandler} instead.
38
+ */
27
39
  getMessageViews(): Array<MessageView>;
28
40
  getMessageViewsAll(): Array<MessageView>;
29
41
  getSubject(): string;
42
+ /**
43
+ * @deprecated
44
+ */
30
45
  getThreadID(): string;
31
46
  getThreadIDAsync(): Promise<string>;
32
47
  addLabel(): SimpleElementView;
@@ -1 +1 @@
1
- {"version":3,"file":"thread-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/conversations/thread-view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AAEnE,OAAc,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,iBAAiB,MAAM,+CAA+C,CAAC;AACnF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AASjG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,IAAI,IAAI,CAAC;IAChB,YAAY,CAAC,IAAI,EAAE;QACjB,WAAW,EAAE,WAAW,CAAC;QACzB,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,UAAU,CAAC;KACxB,GAAG,IAAI,CAAC;CACV,CAAC;yCAIkD,kBAAkB,gBAAgB,CAAC;AAAvF,cAAM,UAAW,SAAQ,eAA+D;IACtF,SAAS,UAAS;gBAGhB,wBAAwB,EAAE,gBAAgB,EAC1C,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ;IAcpB,sBAAsB,CACpB,UAAU,EACN,sBAAsB,GACtB,UAAU,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAC9C,gBAAgB;IAqBnB,YAAY,IAAI,iBAAiB;IAKjC,yCAAyC,CACvC,QAAQ,EAAE,CACR,0BAA0B,EAAE,MAAM,EAClC,0BAA0B,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrD,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,KAC1B,WAAW;IAQlB,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,iBAAiB;IAYpE,eAAe,IAAI,KAAK,CAAC,WAAW,CAAC;IAQrC,kBAAkB,IAAI,KAAK,CAAC,WAAW,CAAC;IAOxC,UAAU,IAAI,MAAM;IAIpB,WAAW,IAAI,MAAM;IAUrB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,QAAQ,IAAI,iBAAiB;CAG9B;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"thread-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/conversations/thread-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,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