@trycourier/courier-ui-inbox 1.0.7-beta → 1.0.9-beta
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/README.md +380 -0
- package/dist/components/courier-inbox-header-title.d.ts +12 -9
- package/dist/components/courier-inbox-header.d.ts +11 -8
- package/dist/components/courier-inbox-list-item-menu.d.ts +7 -6
- package/dist/components/courier-inbox-list-item.d.ts +11 -12
- package/dist/components/courier-inbox-list.d.ts +11 -6
- package/dist/components/courier-inbox-menu-button.d.ts +10 -5
- package/dist/components/courier-inbox-option-menu-item.d.ts +9 -9
- package/dist/components/courier-inbox-option-menu.d.ts +11 -9
- package/dist/components/courier-inbox-pagination-list-item.d.ts +12 -8
- package/dist/components/courier-inbox-popup-menu.d.ts +19 -16
- package/dist/components/courier-inbox-skeleton-list-item.d.ts +10 -5
- package/dist/components/courier-inbox-skeleton-list.d.ts +7 -3
- package/dist/components/courier-inbox.d.ts +10 -8
- package/dist/components/courier-unread-count-badge.d.ts +10 -6
- package/dist/datastore/datastore.d.ts +1 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1062 -852
- package/dist/index.mjs.map +1 -1
- package/dist/types/courier-inbox-theme.d.ts +52 -52
- package/dist/types/snapshots.d.ts +2 -2
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourierBaseElement } from '@trycourier/courier-ui-core';
|
|
2
2
|
import { CourierInboxTheme } from '../types/courier-inbox-theme';
|
|
3
|
-
export declare class CourierInboxPaginationListItem extends
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private
|
|
3
|
+
export declare class CourierInboxPaginationListItem extends CourierBaseElement {
|
|
4
|
+
static get id(): string;
|
|
5
|
+
private _theme;
|
|
6
|
+
private _style?;
|
|
7
|
+
private _skeletonLoadingList?;
|
|
8
|
+
private _observer?;
|
|
9
|
+
private _customItem?;
|
|
10
|
+
private _onPaginationTrigger;
|
|
8
11
|
constructor(props: {
|
|
9
12
|
theme: CourierInboxTheme;
|
|
10
13
|
customItem?: HTMLElement;
|
|
11
14
|
onPaginationTrigger: () => void;
|
|
12
15
|
});
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
onComponentMounted(): void;
|
|
17
|
+
onComponentUnmounted(): void;
|
|
18
|
+
static getStyles(_theme: CourierInboxTheme): string;
|
|
15
19
|
}
|
|
@@ -2,9 +2,10 @@ import { CourierInboxDatastoreEvents } from '../datastore/datatore-events';
|
|
|
2
2
|
import { CourierInboxHeaderFactoryProps, CourierInboxListItemActionFactoryProps, CourierInboxListItemFactoryProps, CourierInboxMenuButtonFactoryProps, CourierInboxPaginationItemFactoryProps, CourierInboxStateEmptyFactoryProps, CourierInboxStateErrorFactoryProps, CourierInboxStateLoadingFactoryProps } from '../types/factories';
|
|
3
3
|
import { CourierInboxFeedType } from '../types/feed-type';
|
|
4
4
|
import { CourierInboxTheme } from '../types/courier-inbox-theme';
|
|
5
|
-
import {
|
|
5
|
+
import { CourierComponentThemeMode, CourierBaseElement } from '@trycourier/courier-ui-core';
|
|
6
6
|
export type CourierInboxPopupAlignment = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center' | 'center-right' | 'center-left' | 'center-center';
|
|
7
|
-
export declare class CourierInboxPopupMenu extends
|
|
7
|
+
export declare class CourierInboxPopupMenu extends CourierBaseElement implements CourierInboxDatastoreEvents {
|
|
8
|
+
static get id(): string;
|
|
8
9
|
private _width;
|
|
9
10
|
private _height;
|
|
10
11
|
private _popupAlignment;
|
|
@@ -16,16 +17,19 @@ export declare class CourierInboxPopupMenu extends BaseElement implements Courie
|
|
|
16
17
|
get theme(): CourierInboxTheme;
|
|
17
18
|
setLightTheme(theme: CourierInboxTheme): void;
|
|
18
19
|
setDarkTheme(theme: CourierInboxTheme): void;
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
20
|
+
setMode(mode: CourierComponentThemeMode): void;
|
|
21
|
+
private _triggerButton?;
|
|
22
|
+
private _popup?;
|
|
23
|
+
private _inbox?;
|
|
24
|
+
private _style?;
|
|
23
25
|
private _datastoreListener?;
|
|
24
26
|
private _popupMenuButtonFactory?;
|
|
25
27
|
static get observedAttributes(): string[];
|
|
26
28
|
constructor();
|
|
29
|
+
onComponentMounted(): void;
|
|
30
|
+
onComponentUnmounted(): void;
|
|
27
31
|
private refreshTheme;
|
|
28
|
-
|
|
32
|
+
static getStyles(theme: CourierInboxTheme, width: string, height: string): string;
|
|
29
33
|
attributeChangedCallback(name: string, _: string, newValue: string): void;
|
|
30
34
|
onUnreadCountChange(_: number): void;
|
|
31
35
|
onMessageClick(handler?: (props: CourierInboxListItemFactoryProps) => void): void;
|
|
@@ -39,14 +43,13 @@ export declare class CourierInboxPopupMenu extends BaseElement implements Courie
|
|
|
39
43
|
setSize(width: string, height: string): void;
|
|
40
44
|
setPosition(position: CourierInboxPopupAlignment): void;
|
|
41
45
|
setFeedType(feedType: CourierInboxFeedType): void;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
setHeader(factory: (props: CourierInboxHeaderFactoryProps | undefined | null) => HTMLElement): void;
|
|
47
|
+
removeHeader(): void;
|
|
48
|
+
setLoadingState(factory: (props: CourierInboxStateLoadingFactoryProps | undefined | null) => HTMLElement): void;
|
|
49
|
+
setEmptyState(factory: (props: CourierInboxStateEmptyFactoryProps | undefined | null) => HTMLElement): void;
|
|
50
|
+
setErrorState(factory: (props: CourierInboxStateErrorFactoryProps | undefined | null) => HTMLElement): void;
|
|
51
|
+
setListItem(factory: (props: CourierInboxListItemFactoryProps | undefined | null) => HTMLElement): void;
|
|
52
|
+
setPaginationItem(factory: (props: CourierInboxPaginationItemFactoryProps | undefined | null) => HTMLElement): void;
|
|
53
|
+
setMenuButton(factory: (props: CourierInboxMenuButtonFactoryProps | undefined | null) => HTMLElement): void;
|
|
50
54
|
private render;
|
|
51
|
-
disconnectedCallback(): void;
|
|
52
55
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourierBaseElement } from '@trycourier/courier-ui-core';
|
|
2
2
|
import { CourierInboxTheme } from '../types/courier-inbox-theme';
|
|
3
|
-
export declare class CourierInboxSkeletonListItem extends
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
3
|
+
export declare class CourierInboxSkeletonListItem extends CourierBaseElement {
|
|
4
|
+
static get id(): string;
|
|
5
|
+
private _theme;
|
|
6
|
+
private _style?;
|
|
7
|
+
constructor(theme: CourierInboxTheme);
|
|
8
|
+
onComponentMounted(): void;
|
|
9
|
+
onComponentUnmounted(): void;
|
|
10
|
+
private render;
|
|
11
|
+
static getStyles(_theme: CourierInboxTheme): string;
|
|
7
12
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourierFactoryElement } from '@trycourier/courier-ui-core';
|
|
2
2
|
import { CourierInboxTheme } from '../types/courier-inbox-theme';
|
|
3
|
-
export declare class CourierInboxSkeletonList extends
|
|
3
|
+
export declare class CourierInboxSkeletonList extends CourierFactoryElement {
|
|
4
|
+
static get id(): string;
|
|
4
5
|
private _theme;
|
|
6
|
+
private _style?;
|
|
5
7
|
constructor(theme: CourierInboxTheme);
|
|
8
|
+
onComponentMounted(): void;
|
|
9
|
+
onComponentUnmounted(): void;
|
|
6
10
|
defaultElement(): HTMLElement;
|
|
7
|
-
|
|
11
|
+
static getStyles(theme: CourierInboxTheme): string;
|
|
8
12
|
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourierBaseElement, CourierComponentThemeMode } from '@trycourier/courier-ui-core';
|
|
2
2
|
import { CourierInboxFeedType } from '../types/feed-type';
|
|
3
3
|
import { CourierInboxHeaderFactoryProps, CourierInboxListItemActionFactoryProps, CourierInboxListItemFactoryProps, CourierInboxPaginationItemFactoryProps, CourierInboxStateEmptyFactoryProps, CourierInboxStateErrorFactoryProps, CourierInboxStateLoadingFactoryProps } from '../types/factories';
|
|
4
4
|
import { CourierInboxTheme } from '../types/courier-inbox-theme';
|
|
5
5
|
import { CourierInboxThemeManager } from '../types/courier-inbox-theme-manager';
|
|
6
|
-
export declare class CourierInbox extends
|
|
6
|
+
export declare class CourierInbox extends CourierBaseElement {
|
|
7
|
+
static get id(): string;
|
|
7
8
|
private _currentFeed;
|
|
8
9
|
private _themeManager;
|
|
9
10
|
get theme(): CourierInboxTheme;
|
|
10
11
|
setLightTheme(theme: CourierInboxTheme): void;
|
|
11
12
|
setDarkTheme(theme: CourierInboxTheme): void;
|
|
12
|
-
|
|
13
|
-
private
|
|
13
|
+
setMode(mode: CourierComponentThemeMode): void;
|
|
14
|
+
private _inboxStyle?;
|
|
15
|
+
private _unreadIndicatorStyle?;
|
|
16
|
+
private _list?;
|
|
14
17
|
private _datastoreListener;
|
|
15
18
|
private _authListener;
|
|
16
|
-
private
|
|
17
|
-
private _header;
|
|
19
|
+
private _header?;
|
|
18
20
|
private _headerFactory;
|
|
19
21
|
private _onMessageClick?;
|
|
20
22
|
private _onMessageActionClick?;
|
|
@@ -22,6 +24,8 @@ export declare class CourierInbox extends BaseElement {
|
|
|
22
24
|
private _defaultProps;
|
|
23
25
|
static get observedAttributes(): string[];
|
|
24
26
|
constructor(themeManager?: CourierInboxThemeManager);
|
|
27
|
+
onComponentMounted(): void;
|
|
28
|
+
onComponentUnmounted(): void;
|
|
25
29
|
private refreshTheme;
|
|
26
30
|
private getStyles;
|
|
27
31
|
setHeader(factory: (props: CourierInboxHeaderFactoryProps | undefined | null) => HTMLElement): void;
|
|
@@ -38,7 +42,5 @@ export declare class CourierInbox extends BaseElement {
|
|
|
38
42
|
private updateHeader;
|
|
39
43
|
private load;
|
|
40
44
|
refresh(): void;
|
|
41
|
-
connectedCallback(): void;
|
|
42
|
-
disconnectedCallback(): void;
|
|
43
45
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
44
46
|
}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourierBaseElement } from '@trycourier/courier-ui-core';
|
|
2
|
+
import { CourierInboxTheme } from '../types/courier-inbox-theme';
|
|
2
3
|
import { CourierInboxThemeManager } from '../types/courier-inbox-theme-manager';
|
|
3
4
|
export type CourierUnreadCountLocation = 'button' | 'header';
|
|
4
|
-
export declare class CourierUnreadCountBadge extends
|
|
5
|
+
export declare class CourierUnreadCountBadge extends CourierBaseElement {
|
|
6
|
+
static get id(): string;
|
|
5
7
|
private _themeSubscription;
|
|
6
8
|
private _location;
|
|
7
9
|
private _count;
|
|
8
|
-
private _badge
|
|
9
|
-
private _style
|
|
10
|
+
private _badge?;
|
|
11
|
+
private _style?;
|
|
12
|
+
get theme(): CourierInboxTheme;
|
|
10
13
|
constructor(props: {
|
|
11
14
|
themeBus: CourierInboxThemeManager;
|
|
12
15
|
location: CourierUnreadCountLocation;
|
|
13
16
|
});
|
|
14
|
-
|
|
17
|
+
onComponentMounted(): void;
|
|
18
|
+
onComponentUnmounted(): void;
|
|
19
|
+
static getStyles(theme: CourierInboxTheme): string;
|
|
15
20
|
setCount(count: number): void;
|
|
16
21
|
refreshTheme(location: CourierUnreadCountLocation): void;
|
|
17
22
|
private updateBadge;
|
|
18
|
-
disconnectedCallback(): void;
|
|
19
23
|
}
|
|
@@ -16,16 +16,12 @@ export declare class CourierInboxDatastore {
|
|
|
16
16
|
get archiveDataSet(): InboxDataSet;
|
|
17
17
|
addDataStoreListener(listener: CourierInboxDataStoreListener): void;
|
|
18
18
|
removeDataStoreListener(listener: CourierInboxDataStoreListener): void;
|
|
19
|
-
private
|
|
19
|
+
private fetchCachableDataSet;
|
|
20
20
|
private fetchUnreadCount;
|
|
21
21
|
load(props?: {
|
|
22
|
-
feedType: CourierInboxFeedType;
|
|
23
22
|
canUseCache: boolean;
|
|
24
23
|
}): Promise<void>;
|
|
25
|
-
/** Listen for inbox and archive dataset updates. */
|
|
26
24
|
listenForUpdates(): Promise<void>;
|
|
27
|
-
/** Fetch either/both datasets if they aren't already loaded. */
|
|
28
|
-
private ensureDataSetsLoaded;
|
|
29
25
|
private connectSocket;
|
|
30
26
|
/**
|
|
31
27
|
* Get a message by messageId from the inbox or archive data set
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,5 @@ export * from './types/inbox-data-set';
|
|
|
11
11
|
export * from './datastore/datastore';
|
|
12
12
|
export * from './datastore/datastore-listener';
|
|
13
13
|
export * from './datastore/datatore-events';
|
|
14
|
+
export { Courier } from '@trycourier/courier-js';
|
|
15
|
+
export type { CourierProps, CourierClientOptions, CourierBrand, CourierApiUrls, CourierUserPreferences, CourierUserPreferencesStatus, CourierUserPreferencesChannel, CourierUserPreferencesPaging, CourierUserPreferencesTopic, CourierUserPreferencesTopicResponse, CourierDevice, CourierToken, CourierGetInboxMessageResponse, CourierGetInboxMessagesResponse, InboxMessage, InboxAction, InboxMessageEventEnvelope, } from '@trycourier/courier-js';
|