@inboxsdk/core 2.1.26 → 2.1.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inboxsdk/core",
3
- "version": "2.1.26",
3
+ "version": "2.1.28",
4
4
  "description": "Library for building browser extensions for Gmail",
5
5
  "main": "inboxsdk.js",
6
6
  "author": "Streak",
package/src/inboxsdk.d.ts CHANGED
@@ -33,6 +33,9 @@ import type {
33
33
  default as Toolbars,
34
34
  LegacyToolbarButtonDescriptor,
35
35
  } from './platform-implementation-js/namespaces/toolbars';
36
+ import type CollapsibleSectionView from './platform-implementation-js/views/collapsible-section-view';
37
+ import type ListRouteView from './platform-implementation-js/views/route-view/list-route-view';
38
+ import type SectionView from './platform-implementation-js/views/section-view';
36
39
 
37
40
  export type { User };
38
41
 
@@ -254,14 +257,35 @@ export interface DraftLabelDescriptor {
254
257
  count?: string | number;
255
258
  }
256
259
 
260
+ /**
261
+ * This type is used to describe labels that you add to {@link ThreadRowView} and {@link CollapsibleSectionView}.
262
+ */
257
263
  export interface LabelDescriptor {
264
+ /**
265
+ * Text of the label.
266
+ *
267
+ * @todo marked as required in the docs.
268
+ */
258
269
  title?: string;
270
+ /** @internal is this still used? */
259
271
  titleHtml?: string;
272
+ /** A background color to put on the icon element if present. */
273
+ iconBackgroundColor?: string;
274
+ /**
275
+ * URL for the icon to show on the label. Should be a local extension file URL or a HTTPS URL.
276
+ *
277
+ * @todo marked as required in the docs
278
+ */
260
279
  iconUrl?: string;
280
+ /** A CSS class to apply to the icon. */
261
281
  iconClass?: string;
282
+ /** Html for the icon to show on the label. This property can't be used with iconUrl or iconClass. */
262
283
  iconHtml?: string;
284
+ /** The text color of the label. */
263
285
  foregroundColor?: string;
286
+ /** The background color of the label. */
264
287
  backgroundColor?: string;
288
+ /** Max width for the label title.The default label title max-width is 90px */
265
289
  maxWidth?: string;
266
290
  }
267
291
 
@@ -273,13 +297,7 @@ export interface ThreadRowAttachmentIconDescriptor {
273
297
 
274
298
  export { NavItemView };
275
299
 
276
- export interface SectionView extends EventEmitter {
277
- remove(): void;
278
- }
279
-
280
- export interface CollapsibleSectionView extends SectionView {
281
- setCollapsed(value: boolean): void;
282
- }
300
+ export { SectionView, CollapsibleSectionView };
283
301
 
284
302
  export class RouteView extends EventEmitter {
285
303
  constructor(
@@ -297,12 +315,74 @@ export class RouteView extends EventEmitter {
297
315
  isCustomRouteBelongingToApp(): boolean;
298
316
  }
299
317
 
300
- export interface ListRouteView extends RouteView {
301
- addCollapsibleSection(options: any): CollapsibleSectionView;
302
- addSection(options: any): SectionView;
303
- refresh(): void;
318
+ /**
319
+ * Represents the a single row to render in {@link SectionView}s and {@link CollapsibleSectionView}s
320
+ */
321
+ export interface RowDescriptor {
322
+ /** First textual column */
323
+ title: string;
324
+ /** Second textual column */
325
+ body: string;
326
+ /** Last text right-aligned. Often used for dates. */
327
+ shortDetailText: string;
328
+ /**
329
+ * Whether the row should be rendered as read or unread similar to Gmail styles.
330
+ *
331
+ * @TODO is this actually required like the docs say?
332
+ */
333
+ isRead?: string;
334
+ /** Any labels that should be rendered. */
335
+ labels: LabelDescriptor[];
336
+ /** An optional class to apply to the icon. */
337
+ iconClass?: string;
338
+ /** An optional HTML to an icon to display on the left side of the row */
339
+ iconHtml?: string;
340
+ /** An optional url to an icon to display on the left side of the row */
341
+ iconUrl?: string;
342
+ /** The name of the route to navigate to when the row is clicked on. */
343
+ routeID?: string;
344
+ /** The parameters of the route being navigated to when the row is clicked on. */
345
+ routeParams?: string[];
346
+ /** Callback for when the row is clicked on. */
347
+ onClick?(e: unknown): void;
304
348
  }
305
349
 
350
+ /**
351
+ * The properties required to create a {@link SectionView} or {@link CollapsibleSectionView}.
352
+ */
353
+ export interface SectionDescriptor {
354
+ /** Main title */
355
+ title: string;
356
+ /** Subtitle */
357
+ subtitle?: string | null;
358
+ /** Link to display in the summary area of the {@link SectionView}. Typically page counts are displayed here. */
359
+ titleLinkText?: string;
360
+ /** A function to call when the title link has been clicked. */
361
+ onTitleLinkClick?(e: MouseEvent): void;
362
+ /** Whether to display a dropdown arrow for more options on the collapsible section. */
363
+ hasDropdown?: boolean;
364
+ /**
365
+ * A function to call when the dropdown is opened. Your function is passed an event object with a single dropdown property.
366
+ */
367
+ onDropdownClick?(e: unknown): void;
368
+ /** The rows that should be shown. */
369
+ tableRows?: RowDescriptor[];
370
+ /** An arbitrary HTML element to place above the table rows but below the title. */
371
+ contentElement?: HTMLElement;
372
+ /** A link to place in the footer of the {@link SectionView}. */
373
+ footerLinkText?: string;
374
+ /** A function to call when the link in the footer is clicked. */
375
+ onFooterLinkClick?(e: MouseEvent): void;
376
+ /** @internal */
377
+ orderHint?: unknown;
378
+ /** @internal */
379
+ footerLinkIconUrl?: unknown;
380
+ /** @internal */
381
+ footerLinkIconClass?: unknown;
382
+ }
383
+
384
+ export { ListRouteView };
385
+
306
386
  export interface CustomRouteView extends RouteView {
307
387
  getElement(): HTMLElement;
308
388
  }
@@ -1,61 +1,15 @@
1
1
  import * as Kefir from 'kefir';
2
2
  import type { Bus } from 'kefir-bus';
3
3
  import type GmailDriver from '../gmail-driver';
4
+ import type { SectionDescriptor } from '../../../../inboxsdk';
4
5
  declare class GmailCollapsibleSectionView {
5
- _driver: GmailDriver;
6
- _groupOrderHint: number;
7
- _isReadyDeferred: Record<string, any>;
8
- _isCollapsible: boolean;
9
- _collapsibleSectionDescriptor: Record<string, any>;
10
- _isSearch: boolean;
11
- _element: HTMLElement | null | undefined;
12
- _headerElement: HTMLElement | null | undefined;
13
- _titleElement: HTMLElement | null | undefined;
14
- _bodyElement: HTMLElement | null | undefined;
15
- _contentElement: HTMLElement | null | undefined;
16
- _tableBodyElement: HTMLElement | null | undefined;
17
- _collapsedContainer: HTMLElement | null | undefined;
18
- _messageElement: HTMLElement | null | undefined;
19
- _footerElement: HTMLElement | null | undefined;
20
- _eventStream: Bus<any, unknown>;
21
- _isCollapsed: boolean;
22
- _inboxDropdownButtonView: Record<string, any> | null | undefined;
23
- _dropdownViewController: Record<string, any> | null | undefined;
6
+ #private;
24
7
  constructor(driver: GmailDriver, groupOrderHint: number, isSearch: boolean, isCollapsible: boolean);
25
8
  destroy(): void;
26
9
  getElement(): HTMLElement;
27
10
  getEventStream(): Bus<any, unknown>;
28
- setCollapsibleSectionDescriptorProperty(collapsibleSectionDescriptorProperty: Kefir.Observable<Record<string, any> | null | undefined, unknown>): void;
11
+ setCollapsibleSectionDescriptorProperty(collapsibleSectionDescriptorProperty: Kefir.Observable<SectionDescriptor | null | undefined, unknown>): void;
29
12
  setCollapsed(value: boolean): void;
30
- _updateValues(collapsibleSectionDescriptor: Record<string, any> | null | undefined): void;
31
- _setupElement(collapsibleSectionDescriptor: Record<string, any>): void;
32
- _setupHeader(collapsibleSectionDescriptor: Record<string, any>): void;
33
- _setupGmailv2Header(headerElement: HTMLElement, collapsibleSectionDescriptor: Record<string, any>): void;
34
- _setupFooter(): void;
35
- _updateElement(collapsibleSectionDescriptor: Record<string, any>): void;
36
- _updateHeader(collapsibleSectionDescriptor: Record<string, any>): void;
37
- _updateTitle(collapsibleSectionDescriptor: Record<string, any>): void;
38
- _updateSubtitle(collapsibleSectionDescriptor: Record<string, any>): void;
39
- _updateSummaryText(collapsibleSectionDescriptor: Record<string, any>): void;
40
- _updateDropdown(collapsibleSectionDescriptor: Record<string, any>): void;
41
- _updateContentElement(collapsibleSectionDescriptor: Record<string, any>): void;
42
- _updateTableRows(collapsibleSectionDescriptor: Record<string, any>): void;
43
- _renderTable(tableRows: Array<Record<string, any>>): void;
44
- _updateMessageElement(collapsibleSectionDescriptor: Record<string, any>): void;
45
- _showLoadingMessage(): void;
46
- _showEmptyMessage(): void;
47
- _updateFooter(collapsibleSectionDescriptor: Record<string, any>): void;
48
- _toggleCollapseState(): void;
49
- _collapse(): void;
50
- _expand(): void;
51
- _addToCollapsedContainer(): void;
52
- _removeFromCollapsedContainer(): void;
53
- _pulloutSectionsFromCollapsedContainer(container: HTMLElement): void;
54
- _readdToCollapsedContainer(): void;
55
- _isCollapsedContainer(element: any): any;
56
- _recollapse(children: Array<Record<string, any>>): void;
57
- _createCollapsedContainer(): void;
58
- _destroyCollapsedContainer(): void;
59
13
  }
60
14
  export default GmailCollapsibleSectionView;
61
15
  //# sourceMappingURL=gmail-collapsible-section-view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gmail-collapsible-section-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-collapsible-section-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAE/C,cAAM,2BAA2B;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,cAAc,EAAE,OAAO,CAAC;IACxB,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IAChD,cAAc,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IACtD,aAAa,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IACrD,YAAY,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IACpD,eAAe,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IACvD,iBAAiB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IACzD,mBAAmB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAQ;IAC3D,eAAe,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAA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AAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAoCjE,kBAAkB,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IA2DpE,eAAe,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAuCjE,qBAAqB,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAavE,gBAAgB,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAelE,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IA0BlD,qBAAqB,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAqBvE,mBAAmB;IAcnB,iBAAiB;IAWjB,aAAa,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAgC/D,oBAAoB;IAQpB,SAAS;IAgCT,OAAO;IAgCP,wBAAwB;IAgCxB,6BAA6B;IA0B7B,sCAAsC,CAAC,SAAS,EAAE,WAAW;IAa7D,0BAA0B;IAwC1B,qBAAqB,CAAC,OAAO,EAAE,GAAG;IAOlC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqBhD,yBAAyB;IAczB,0BAA0B;CAO3B;AAiID,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"gmail-collapsible-section-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-collapsible-section-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAY9B,cAAM,2BAA2B;;gBAuB7B,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,OAAO;IAUxB,OAAO;IAcP,UAAU,IAAI,WAAW;IAOzB,cAAc;IAId,uCAAuC,CACrC,oCAAoC,EAAE,KAAK,CAAC,UAAU,CACpD,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,CACR;IASH,YAAY,CAAC,KAAK,EAAE,OAAO;CAmrB5B;AAiID,eAAe,2BAA2B,CAAC"}
@@ -5,6 +5,7 @@ import GmailThreadView from '../gmail-thread-view';
5
5
  import GmailCollapsibleSectionView from '../gmail-collapsible-section-view';
6
6
  import type GmailDriver from '../../gmail-driver';
7
7
  import type GmailRouteProcessor from '../gmail-route-view/gmail-route-processor';
8
+ import { type SectionDescriptor } from '../../../../../inboxsdk';
8
9
  declare class GmailRouteView {
9
10
  #private;
10
11
  _type: string;
@@ -43,8 +44,8 @@ declare class GmailRouteView {
43
44
  getType(): string;
44
45
  isCustomRouteBelongingToApp(): boolean;
45
46
  getParams: () => Record<string, string>;
46
- addCollapsibleSection(sectionDescriptorProperty: Kefir.Observable<Record<string, any> | null | undefined, unknown>, groupOrderHint: any): GmailCollapsibleSectionView;
47
- addSection(sectionDescriptorProperty: Kefir.Observable<Record<string, any> | null | undefined, unknown>, groupOrderHint: any): GmailCollapsibleSectionView;
47
+ addCollapsibleSection(sectionDescriptorProperty: Kefir.Observable<SectionDescriptor | null | undefined, unknown>, groupOrderHint: number): GmailCollapsibleSectionView;
48
+ addSection(sectionDescriptorProperty: Kefir.Observable<SectionDescriptor | null | undefined, unknown>, groupOrderHint: number): GmailCollapsibleSectionView;
48
49
  _setupCustomViewElement(): void;
49
50
  _monitorLeftNavHeight(): void;
50
51
  _setCustomViewElementHeight(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"gmail-route-view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/plat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AmB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAe1C,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAuC5C,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAM9C,aAAa,IAAI,MAAM;IAUvB,UAAU,IAAI,MAAM;IAmBpB,OAAO;IAoBP,kBAAkB;IAClB,YAAY;IAIZ,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAOvD,0BAA0B;CAG3B;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"gmail-route-view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/platform-implementation-js/dom-driver/gmail/views/gmail-route-view/gmail-route-view.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,2BAA2B,MAAM,mCAAmC,CAAC;AAG5E,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,mBAAmB,MAAM,2CAA2C,CAAC;AAQjF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,cAAM,cAAc;;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,QAAQ,kCAAkB;IAC1B,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,oBAAoB,EAAE,mBAAmB,CAAC;IAE1C,YAAY,EAAE,GAAG,CACb;QAAE,SAAS,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,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AAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAyBvC,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAcvC,cAAc,IAAI,OAAO;IAOzB,mBAAmB,IAAI,OAAO;IAI9B,cAAc,IAAI,OAAO;IAQzB,qBAAqB,IAAI,OAAO;IAMhC,aAAa,IAAI,OAAO;IAQxB,YAAY,IAAI,OAAO;IAKvB,YAAY,IAAI,MAAM;IAoBtB,cAAc,IAAI,OAAO;IAIzB,YAAY,IAAI,OAAO;IASvB,gBAAgB,IAAI,OAAO;IAI3B,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAQ5C,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAe1C,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAuC5C,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAM9C,aAAa,IAAI,MAAM;IAUvB,UAAU,IAAI,MAAM;IAmBpB,OAAO;IAoBP,kBAAkB;IAClB,YAAY;IAIZ,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAOvD,0BAA0B;CAG3B;AAED,eAAe,cAAc,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type * as Kefir from 'kefir';
2
2
  import type GmailCollapsibleSectionView from '../dom-driver/gmail/views/gmail-collapsible-section-view';
3
+ import { SectionDescriptor } from '../../inboxsdk';
3
4
  export type MinRouteViewDriver = {
4
5
  getRouteType(): string;
5
6
  getRouteID(): string;
@@ -12,7 +13,7 @@ export type RouteViewDriver = MinRouteViewDriver & {
12
13
  getType(): string;
13
14
  getHash(): string;
14
15
  addSection(sectionDescriptorProperty: Kefir.Observable<Record<string, any> | null | undefined, unknown>, groupOrderHint: any): GmailCollapsibleSectionView;
15
- addCollapsibleSection(sectionDescriptorProperty: Kefir.Observable<Record<string, any> | null | undefined, unknown>, groupOrderHint: any): GmailCollapsibleSectionView;
16
+ addCollapsibleSection(sectionDescriptorProperty: Kefir.Observable<SectionDescriptor | null | undefined, unknown>, groupOrderHint: any): GmailCollapsibleSectionView;
16
17
  getCustomViewElement(): HTMLElement | null | undefined;
17
18
  setFullWidth(fullWidth: boolean): void;
18
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"route-view-driver.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/driver-interfaces/route-view-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,2BAA2B,MAAM,0DAA0D,CAAC;AAExG,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,IAAI,MAAM,CAAC;IACvB,UAAU,IAAI,MAAM,CAAC;IACrB,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,cAAc,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACjE,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG;IACjD,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,IAAI,MAAM,CAAC;IAClB,OAAO,IAAI,MAAM,CAAC;IAClB,UAAU,CACR,yBAAyB,EAAE,KAAK,CAAC,UAAU,CACzC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,CACR,EACD,cAAc,EAAE,GAAG,GAClB,2BAA2B,CAAC;IAC/B,qBAAqB,CACnB,yBAAyB,EAAE,KAAK,CAAC,UAAU,CACzC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,CACR,EACD,cAAc,EAAE,GAAG,GAClB,2BAA2B,CAAC;IAC/B,oBAAoB,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC,CAAC"}
1
+ {"version":3,"file":"route-view-driver.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/driver-interfaces/route-view-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,2BAA2B,MAAM,0DAA0D,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,IAAI,MAAM,CAAC;IACvB,UAAU,IAAI,MAAM,CAAC;IACrB,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,cAAc,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACjE,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG;IACjD,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,IAAI,MAAM,CAAC;IAClB,OAAO,IAAI,MAAM,CAAC;IAClB,UAAU,CACR,yBAAyB,EAAE,KAAK,CAAC,UAAU,CACzC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,CACR,EACD,cAAc,EAAE,GAAG,GAClB,2BAA2B,CAAC;IAC/B,qBAAqB,CACnB,yBAAyB,EAAE,KAAK,CAAC,UAAU,CACzC,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,CACR,EACD,cAAc,EAAE,GAAG,GAClB,2BAA2B,CAAC;IAC/B,oBAAoB,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC,CAAC"}
@@ -1,10 +1,21 @@
1
1
  import EventEmitter from '../lib/safe-event-emitter';
2
2
  import type { Driver } from '../driver-interfaces/driver';
3
3
  import type GmailCollapsibleSectionView from '../dom-driver/gmail/views/gmail-collapsible-section-view';
4
+ /**
5
+ * {@link CollapsibleSectionView}s allow you to display additional content on ListRouteViews. They are typically rendered as additional content above the list of threads below. The visual style is similar to that of multiple inbox sections used in native Gmail. Note that the rendering may vary slightly depending on the actual ListRouteView that the {@link CollapsibleSectionView} is rendered in. For example, {@link CollapsibleSectionViews} rendered on search results pages use different header styles to match Gmail's style more accurately.
6
+
7
+ * You can either render rows (that are visually similar to Gmail rows) or custom content in your {@link CollapsibleSectionView}. Until content is provided, the SectionView will simply display a "Loading..." indicator.
8
+ *
9
+ * @see ListRouteView.addCollapsibleSection for more information.
10
+ * @todo the docs mention this class extending SectionView. That doesn't seem to be the case.
11
+ */
4
12
  declare class CollapsibleSectionView extends EventEmitter {
13
+ #private;
14
+ /** This property is set to true once the view is destroyed. */
5
15
  destroyed: boolean;
6
16
  constructor(collapsibleSectionViewDriver: GmailCollapsibleSectionView, driver: Driver);
7
17
  setCollapsed(value: boolean): void;
18
+ /** Removes this section from the current Route */
8
19
  remove(): void;
9
20
  destroy(): void;
10
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible-section-view.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/views/collapsible-section-view.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,2BAA2B,MAAM,0DAA0D,CAAC;AAGxG,cAAM,sBAAuB,SAAQ,YAAY;IAC/C,SAAS,EAAE,OAAO,CAAC;gBAGjB,4BAA4B,EAAE,2BAA2B,EACzD,MAAM,EAAE,MAAM;IAYhB,YAAY,CAAC,KAAK,EAAE,OAAO;IAI3B,MAAM;IAIN,OAAO;CAKR;AA4CD,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"collapsible-section-view.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/views/collapsible-section-view.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,2BAA2B,MAAM,0DAA0D,CAAC;AAExG;;;;;;;EAOE;AACF,cAAM,sBAAuB,SAAQ,YAAY;;IAC/C,+DAA+D;IAC/D,SAAS,EAAE,OAAO,CAAC;gBAIjB,4BAA4B,EAAE,2BAA2B,EACzD,MAAM,EAAE,MAAM;IAShB,YAAY,CAAC,KAAK,EAAE,OAAO;IAI3B,kDAAkD;IAClD,MAAM;IAIN,OAAO;CAIR;AA4CD,eAAe,sBAAsB,CAAC"}
@@ -1,12 +1,23 @@
1
1
  import RouteView from './route-view';
2
+ import { Observable } from 'kefir';
2
3
  import CollapsibleSectionView from '../collapsible-section-view';
3
4
  import SectionView from '../section-view';
4
5
  import type { RouteViewDriver } from '../../driver-interfaces/route-view-driver';
5
6
  import type { Driver } from '../../driver-interfaces/driver';
7
+ import type { SectionDescriptor } from '../../../inboxsdk';
8
+ /**
9
+ * Extends {@link RouteView}. {@link ListRouteView}s represent pages within Gmail that show a list of emails. Typical examples are the Inbox, Sent Mail, Drafts, etc. However, views like the Conversation view or Settings would not be a ListRouteView.
10
+ */
6
11
  declare class ListRouteView extends RouteView {
12
+ #private;
7
13
  constructor(routeViewDriver: RouteViewDriver, driver: Driver, appId: string);
8
- addCollapsibleSection(collapsibleSectionDescriptor: Record<string, any> | null | undefined): CollapsibleSectionView;
14
+ /**
15
+ * Adds a collapsible section to the top of the page.
16
+ */
17
+ addCollapsibleSection(collapsibleSectionDescriptor: SectionDescriptor | Observable<SectionDescriptor | null | undefined, unknown> | null | undefined): CollapsibleSectionView;
18
+ /** Adds a non-collapsible section to the top of the page. */
9
19
  addSection(sectionDescriptor: Record<string, any> | null | undefined): SectionView;
20
+ /** Simulates a click on the Gmail thread list refresh button. */
10
21
  refresh(): void;
11
22
  }
12
23
  export default ListRouteView;
@@ -1 +1 @@
1
- {"version":3,"file":"list-route-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/route-view/list-route-view.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE7D,cAAM,aAAc,SAAQ,SAAS;gBACvB,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAa3E,qBAAqB,CACnB,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,GACnE,sBAAsB;IAezB,UAAU,CACR,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,GACxD,WAAW;IAWd,OAAO;CAGR;AAgBD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"list-route-view.d.ts","sourceRoot":"","sources":["../../../../../../src/platform-implementation-js/views/route-view/list-route-view.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;GAEG;AACH,cAAM,aAAc,SAAQ,SAAS;;gBAMvB,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAS3E;;OAEG;IACH,qBAAqB,CACnB,4BAA4B,EACxB,iBAAiB,GACjB,UAAU,CAAC,iBAAiB,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,CAAC,GACzD,IAAI,GACJ,SAAS,GACZ,sBAAsB;IAoBzB,6DAA6D;IAC7D,UAAU,CACR,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,GACxD,WAAW;IAUd,iEAAiE;IACjE,OAAO;CAWR;AAED,eAAe,aAAa,CAAC"}
@@ -2,6 +2,7 @@ import EventEmitter from '../lib/safe-event-emitter';
2
2
  import type { Driver } from '../driver-interfaces/driver';
3
3
  import type GmailCollapsibleSectionView from '../dom-driver/gmail/views/gmail-collapsible-section-view';
4
4
  declare class SectionView extends EventEmitter {
5
+ #private;
5
6
  destroyed: boolean;
6
7
  constructor(sectionViewDriver: GmailCollapsibleSectionView, driver: Driver);
7
8
  remove(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"section-view.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/views/section-view.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,2BAA2B,MAAM,0DAA0D,CAAC;AAGxG,cAAM,WAAY,SAAQ,YAAY;IACpC,SAAS,EAAE,OAAO,CAAC;gBAEP,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM;IAW1E,MAAM;IAIN,OAAO;CAKR;AAoDD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"section-view.d.ts","sourceRoot":"","sources":["../../../../../src/platform-implementation-js/views/section-view.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,2BAA2B,MAAM,0DAA0D,CAAC;AAExG,cAAM,WAAY,SAAQ,YAAY;;IACpC,SAAS,EAAE,OAAO,CAAC;gBAGP,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM;IAQ1E,MAAM;IAIN,OAAO;CAIR;AAoDD,eAAe,WAAW,CAAC"}