@inboxsdk/core 2.1.41 → 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';
@@ -31,6 +30,7 @@ import type ComposeView from './platform-implementation-js/views/compose-view';
31
30
  import type Search from './platform-implementation-js/namespaces/search';
32
31
  import type {
33
32
  default as Toolbars,
33
+ LegacyToolbarButtonOnClickEvent,
34
34
  LegacyToolbarButtonDescriptor,
35
35
  } from './platform-implementation-js/namespaces/toolbars';
36
36
  import type CollapsibleSectionView from './platform-implementation-js/views/collapsible-section-view';
@@ -142,7 +142,11 @@ export interface Widgets {
142
142
  showTopMessageBarView(opts: { el: Element }): TopMessageBarView;
143
143
  }
144
144
 
145
- export { Toolbars, LegacyToolbarButtonDescriptor };
145
+ export {
146
+ Toolbars,
147
+ LegacyToolbarButtonDescriptor,
148
+ LegacyToolbarButtonOnClickEvent,
149
+ };
146
150
  export {
147
151
  ToolbarButtonDescriptor,
148
152
  ToolbarButtonOnClickEvent,
@@ -447,54 +451,7 @@ export interface SimpleElementView extends EventEmitter {
447
451
  destroy(): void;
448
452
  }
449
453
 
450
- export interface ThreadView extends TypedEventEmitter<ThreadViewEvents> {
451
- addLabel(): SimpleElementView;
452
- addSidebarContentPanel(
453
- contentPanelDescriptor:
454
- | ContentPanelDescriptor
455
- | Kefir.Observable<ContentPanelDescriptor, unknown>,
456
- ): ContentPanelView;
457
- /**
458
- * @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.
459
- */
460
- getMessageViews(): Array<MessageView>;
461
- /**
462
- * @returns {MessageView[]} of all the MessageView objects in the thread regardless of their load state. @see MessageView for more information on what "loaded" means.
463
- */
464
- getMessageViewsAll(): Array<MessageView>;
465
- getSubject(): string;
466
- /**
467
- * @deprecated
468
- */
469
- getThreadID(): string;
470
- getThreadIDAsync(): Promise<string>;
471
- addNoticeBar(): SimpleElementView;
472
- }
473
-
474
- export interface UNSTABLE_ThreadView extends ThreadView {
475
- //#region Undocumented methods
476
- /**
477
- * @internal
478
- */
479
- addCustomMessage: (descriptor: {
480
- collapsedEl: HTMLElement;
481
- headerEl: HTMLElement;
482
- bodyEl: HTMLElement;
483
- iconUrl: string;
484
- sortDate: Date;
485
- }) => CustomMessageView;
486
- /**
487
- * @internal
488
- */
489
- registerHiddenCustomMessageNoticeProvider: (
490
- provider: (
491
- numCustomHidden: number,
492
- numberNativeHidden: number,
493
- unmountPromise: Promise<void>,
494
- ) => HTMLElement | null,
495
- ) => void;
496
- //#endregion
497
- }
454
+ export { ThreadView };
498
455
 
499
456
  export interface CustomMessageView extends EventEmitter {
500
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":["../../../../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O,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,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AAGnE,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,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;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,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;yCAEkD,kBAAkB,gBAAgB,CAAC;AAAv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