@trycourier/courier-react 8.0.15-beta → 8.0.16-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/dist/index.js +1 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -475
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -194,7 +194,7 @@ const _CourierSocket = class _CourierSocket2 {
|
|
|
194
194
|
(_b = this.logger) == null ? void 0 : _b.error(`Max retry attempts (${_CourierSocket2.MAX_RETRY_ATTEMPTS}) reached.`);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
const backoffTimeInMillis = suggestedBackoffTimeInMillis
|
|
197
|
+
const backoffTimeInMillis = suggestedBackoffTimeInMillis ?? this.getBackoffTimeInMillis();
|
|
198
198
|
this.retryTimeoutId = window.setTimeout(async () => {
|
|
199
199
|
try {
|
|
200
200
|
await this.connect();
|
|
@@ -346,8 +346,7 @@ Response JSON: ${JSON.stringify(data.response, null, 2)}
|
|
|
346
346
|
`);
|
|
347
347
|
}
|
|
348
348
|
async function http(props) {
|
|
349
|
-
|
|
350
|
-
const validCodes = (_a = props.validCodes) != null ? _a : [200];
|
|
349
|
+
const validCodes = props.validCodes ?? [200];
|
|
351
350
|
const uid = props.options.showLogs ? UUID.nanoid() : void 0;
|
|
352
351
|
const request = new Request(props.url, {
|
|
353
352
|
method: props.method,
|
|
@@ -609,11 +608,10 @@ class InboxClient extends Client {
|
|
|
609
608
|
* @returns Promise resolving to paginated messages response
|
|
610
609
|
*/
|
|
611
610
|
async getMessages(props) {
|
|
612
|
-
var _a;
|
|
613
611
|
const query = `
|
|
614
612
|
query GetInboxMessages(
|
|
615
613
|
$params: FilterParamsInput = { ${this.options.tenantId ? `accountId: "${this.options.tenantId}"` : ""} }
|
|
616
|
-
$limit: Int = ${(
|
|
614
|
+
$limit: Int = ${(props == null ? void 0 : props.paginationLimit) ?? 24}
|
|
617
615
|
$after: String ${(props == null ? void 0 : props.startCursor) ? `= "${props.startCursor}"` : ""}
|
|
618
616
|
) {
|
|
619
617
|
count(params: $params)
|
|
@@ -662,11 +660,10 @@ class InboxClient extends Client {
|
|
|
662
660
|
* @returns Promise resolving to paginated archived messages response
|
|
663
661
|
*/
|
|
664
662
|
async getArchivedMessages(props) {
|
|
665
|
-
var _a;
|
|
666
663
|
const query = `
|
|
667
664
|
query GetInboxMessages(
|
|
668
665
|
$params: FilterParamsInput = { ${this.options.tenantId ? `accountId: "${this.options.tenantId}"` : ""}, archived: true }
|
|
669
|
-
$limit: Int = ${(
|
|
666
|
+
$limit: Int = ${(props == null ? void 0 : props.paginationLimit) ?? 24}
|
|
670
667
|
$after: String ${(props == null ? void 0 : props.startCursor) ? `= "${props.startCursor}"` : ""}
|
|
671
668
|
) {
|
|
672
669
|
count(params: $params)
|
|
@@ -713,7 +710,6 @@ class InboxClient extends Client {
|
|
|
713
710
|
* @returns Promise resolving to number of unread messages
|
|
714
711
|
*/
|
|
715
712
|
async getUnreadMessageCount() {
|
|
716
|
-
var _a2;
|
|
717
713
|
var _a;
|
|
718
714
|
const query = `
|
|
719
715
|
query GetMessages {
|
|
@@ -729,7 +725,7 @@ class InboxClient extends Client {
|
|
|
729
725
|
},
|
|
730
726
|
url: this.options.apiUrls.inbox.graphql
|
|
731
727
|
});
|
|
732
|
-
return (
|
|
728
|
+
return ((_a = response.data) == null ? void 0 : _a.count) ?? 0;
|
|
733
729
|
}
|
|
734
730
|
/**
|
|
735
731
|
* Track a click event
|
|
@@ -1212,14 +1208,13 @@ class TrackingClient extends Client {
|
|
|
1212
1208
|
}
|
|
1213
1209
|
class CourierClient extends Client {
|
|
1214
1210
|
constructor(props) {
|
|
1215
|
-
var _a2;
|
|
1216
1211
|
var _a, _b;
|
|
1217
|
-
const showLogs = props.showLogs !== void 0 ? props.showLogs :
|
|
1212
|
+
const showLogs = props.showLogs !== void 0 ? props.showLogs : false;
|
|
1218
1213
|
const baseOptions = {
|
|
1219
1214
|
...props,
|
|
1220
1215
|
showLogs,
|
|
1221
1216
|
apiUrls: props.apiUrls || getCourierApiUrls(),
|
|
1222
|
-
accessToken:
|
|
1217
|
+
accessToken: props.jwt ?? props.publicApiKey
|
|
1223
1218
|
};
|
|
1224
1219
|
super({
|
|
1225
1220
|
...baseOptions,
|
|
@@ -1297,8 +1292,7 @@ const _Courier = class _Courier2 {
|
|
|
1297
1292
|
* @param options - The options for the Courier client
|
|
1298
1293
|
*/
|
|
1299
1294
|
signIn(props) {
|
|
1300
|
-
|
|
1301
|
-
const connectionId = (_a = props.connectionId) != null ? _a : UUID.nanoid();
|
|
1295
|
+
const connectionId = props.connectionId ?? UUID.nanoid();
|
|
1302
1296
|
this.instanceClient = new CourierClient({ ...props, connectionId });
|
|
1303
1297
|
this.notifyAuthenticationListeners({ userId: props.userId });
|
|
1304
1298
|
}
|
|
@@ -1495,7 +1489,6 @@ class CourierButton extends CourierSystemThemeElement {
|
|
|
1495
1489
|
});
|
|
1496
1490
|
}
|
|
1497
1491
|
getStyles(props) {
|
|
1498
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1499
1492
|
const defaultTextColor = () => {
|
|
1500
1493
|
const secondary = CourierButtonVariants.secondary(this.currentSystemTheme);
|
|
1501
1494
|
return secondary.textColor;
|
|
@@ -1531,18 +1524,18 @@ class CourierButton extends CourierSystemThemeElement {
|
|
|
1531
1524
|
|
|
1532
1525
|
button {
|
|
1533
1526
|
border: none;
|
|
1534
|
-
border-radius: ${
|
|
1535
|
-
font-weight: ${
|
|
1536
|
-
font-family: ${
|
|
1537
|
-
font-size: ${
|
|
1527
|
+
border-radius: ${props.borderRadius ?? defaultBorderRadius()};
|
|
1528
|
+
font-weight: ${props.fontWeight ?? defaultFontWeight()};
|
|
1529
|
+
font-family: ${props.fontFamily ?? "inherit"};
|
|
1530
|
+
font-size: ${props.fontSize ?? defaultFontSize()};
|
|
1538
1531
|
padding: 6px 10px;
|
|
1539
1532
|
cursor: pointer;
|
|
1540
1533
|
width: 100%;
|
|
1541
1534
|
height: 100%;
|
|
1542
|
-
background-color: ${
|
|
1543
|
-
color: ${
|
|
1544
|
-
border: ${
|
|
1545
|
-
box-shadow: ${
|
|
1535
|
+
background-color: ${props.backgroundColor ?? defaultBackgroundColor()};
|
|
1536
|
+
color: ${props.textColor ?? defaultTextColor()};
|
|
1537
|
+
border: ${props.border ?? defaultBorder()};
|
|
1538
|
+
box-shadow: ${props.shadow ?? defaultShadow()};
|
|
1546
1539
|
touch-action: manipulation;
|
|
1547
1540
|
}
|
|
1548
1541
|
|
|
@@ -1603,7 +1596,7 @@ class CourierIcon extends BaseElement {
|
|
|
1603
1596
|
__publicField2(this, "_svg");
|
|
1604
1597
|
__publicField2(this, "_iconContainer");
|
|
1605
1598
|
__publicField2(this, "_style");
|
|
1606
|
-
this._color = color
|
|
1599
|
+
this._color = color ?? CourierColors.black[500];
|
|
1607
1600
|
this._svg = svg;
|
|
1608
1601
|
const shadow = this.attachShadow({ mode: "open" });
|
|
1609
1602
|
this._iconContainer = document.createElement("div");
|
|
@@ -1821,7 +1814,7 @@ class CourierElement extends CourierSystemThemeElement {
|
|
|
1821
1814
|
this.shadow.replaceChildren();
|
|
1822
1815
|
return;
|
|
1823
1816
|
}
|
|
1824
|
-
const element = newElement
|
|
1817
|
+
const element = newElement ?? this.defaultElement();
|
|
1825
1818
|
this.shadow.replaceChildren(element);
|
|
1826
1819
|
}
|
|
1827
1820
|
// Default element to be used if no factory is provided
|
|
@@ -1847,14 +1840,13 @@ class CourierInfoState extends CourierElement {
|
|
|
1847
1840
|
this._props = props;
|
|
1848
1841
|
}
|
|
1849
1842
|
defaultElement() {
|
|
1850
|
-
var _a2;
|
|
1851
1843
|
var _a, _b;
|
|
1852
1844
|
const container = document.createElement("div");
|
|
1853
1845
|
this._title = document.createElement("h2");
|
|
1854
1846
|
if ((_a = this._props.title) == null ? void 0 : _a.text) {
|
|
1855
1847
|
this._title.textContent = this._props.title.text;
|
|
1856
1848
|
}
|
|
1857
|
-
this._button = new CourierButton(
|
|
1849
|
+
this._button = new CourierButton(this._props.button ?? CourierButtonVariants.secondary(this.currentSystemTheme));
|
|
1858
1850
|
this._style = document.createElement("style");
|
|
1859
1851
|
this._style.textContent = this.getStyles(this._props);
|
|
1860
1852
|
container.className = "container";
|
|
@@ -1873,7 +1865,6 @@ class CourierInfoState extends CourierElement {
|
|
|
1873
1865
|
this.updateStyles(this._props);
|
|
1874
1866
|
}
|
|
1875
1867
|
getStyles(props) {
|
|
1876
|
-
var _a2, _b2, _c2, _d2;
|
|
1877
1868
|
var _a, _b, _c, _d;
|
|
1878
1869
|
return `
|
|
1879
1870
|
:host {
|
|
@@ -1896,10 +1887,10 @@ class CourierInfoState extends CourierElement {
|
|
|
1896
1887
|
|
|
1897
1888
|
.container h2 {
|
|
1898
1889
|
margin: 0;
|
|
1899
|
-
color: ${(
|
|
1900
|
-
font-size: ${(
|
|
1901
|
-
font-weight: ${(
|
|
1902
|
-
font-family: ${(
|
|
1890
|
+
color: ${((_a = props.title) == null ? void 0 : _a.textColor) ?? "red"};
|
|
1891
|
+
font-size: ${((_b = props.title) == null ? void 0 : _b.fontSize) ?? "16px"};
|
|
1892
|
+
font-weight: ${((_c = props.title) == null ? void 0 : _c.fontWeight) ?? "500"};
|
|
1893
|
+
font-family: ${((_d = props.title) == null ? void 0 : _d.fontFamily) ?? "inherit"};
|
|
1903
1894
|
}
|
|
1904
1895
|
`;
|
|
1905
1896
|
}
|
|
@@ -1948,33 +1939,32 @@ class CourierIconButton extends BaseElement {
|
|
|
1948
1939
|
this._style.textContent = this.getStyles();
|
|
1949
1940
|
}
|
|
1950
1941
|
getStyles() {
|
|
1951
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1952
1942
|
return `
|
|
1953
1943
|
:host {
|
|
1954
1944
|
display: inline-block;
|
|
1955
|
-
border-radius: ${
|
|
1945
|
+
border-radius: ${this._borderRadius ?? "50%"};
|
|
1956
1946
|
}
|
|
1957
1947
|
|
|
1958
1948
|
button {
|
|
1959
1949
|
border: none;
|
|
1960
|
-
border-radius: ${
|
|
1950
|
+
border-radius: ${this._borderRadius ?? "50%"};
|
|
1961
1951
|
cursor: pointer;
|
|
1962
|
-
width: ${
|
|
1963
|
-
height: ${
|
|
1952
|
+
width: ${this._width ?? "36px"};
|
|
1953
|
+
height: ${this._height ?? "36px"};
|
|
1964
1954
|
display: flex;
|
|
1965
1955
|
align-items: center;
|
|
1966
1956
|
justify-content: center;
|
|
1967
|
-
background: ${
|
|
1957
|
+
background: ${this._backgroundColor ?? "transparent"};
|
|
1968
1958
|
transition: background-color 0.2s ease;
|
|
1969
1959
|
touch-action: manipulation;
|
|
1970
1960
|
}
|
|
1971
1961
|
|
|
1972
1962
|
button:hover {
|
|
1973
|
-
background-color: ${
|
|
1963
|
+
background-color: ${this._hoverBackgroundColor ?? "red"};
|
|
1974
1964
|
}
|
|
1975
1965
|
|
|
1976
1966
|
button:active {
|
|
1977
|
-
background-color: ${
|
|
1967
|
+
background-color: ${this._activeBackgroundColor ?? "red"};
|
|
1978
1968
|
}
|
|
1979
1969
|
|
|
1980
1970
|
button:disabled {
|
|
@@ -2085,17 +2075,16 @@ class CourierInboxListItemMenu extends BaseElement {
|
|
|
2085
2075
|
shadow.appendChild(menu);
|
|
2086
2076
|
}
|
|
2087
2077
|
getStyles() {
|
|
2088
|
-
var _a2, _b2, _c2, _d;
|
|
2089
2078
|
var _a, _b, _c;
|
|
2090
2079
|
const menu = (_c = (_b = (_a = this._theme.inbox) == null ? void 0 : _a.list) == null ? void 0 : _b.item) == null ? void 0 : _c.menu;
|
|
2091
2080
|
return `
|
|
2092
2081
|
:host {
|
|
2093
2082
|
display: block;
|
|
2094
2083
|
position: absolute;
|
|
2095
|
-
background: ${(
|
|
2096
|
-
border: ${(
|
|
2097
|
-
border-radius: ${(
|
|
2098
|
-
box-shadow: ${(
|
|
2084
|
+
background: ${(menu == null ? void 0 : menu.backgroundColor) ?? "red"};
|
|
2085
|
+
border: ${(menu == null ? void 0 : menu.border) ?? "1px solid red"};
|
|
2086
|
+
border-radius: ${(menu == null ? void 0 : menu.borderRadius) ?? "0px"};
|
|
2087
|
+
box-shadow: ${(menu == null ? void 0 : menu.shadow) ?? "0 2px 8px red"};
|
|
2099
2088
|
user-select: none;
|
|
2100
2089
|
opacity: 0;
|
|
2101
2090
|
pointer-events: none;
|
|
@@ -2180,16 +2169,13 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2180
2169
|
return _CourierInboxDatastore2.instance;
|
|
2181
2170
|
}
|
|
2182
2171
|
get unreadCount() {
|
|
2183
|
-
|
|
2184
|
-
return (_a = this._unreadCount) != null ? _a : 0;
|
|
2172
|
+
return this._unreadCount ?? 0;
|
|
2185
2173
|
}
|
|
2186
2174
|
get inboxDataSet() {
|
|
2187
|
-
|
|
2188
|
-
return (_a = this._inboxDataSet) != null ? _a : { feedType: "inbox", messages: [], canPaginate: false, paginationCursor: null };
|
|
2175
|
+
return this._inboxDataSet ?? { feedType: "inbox", messages: [], canPaginate: false, paginationCursor: null };
|
|
2189
2176
|
}
|
|
2190
2177
|
get archiveDataSet() {
|
|
2191
|
-
|
|
2192
|
-
return (_a = this._archiveDataSet) != null ? _a : { feedType: "archive", messages: [], canPaginate: false, paginationCursor: null };
|
|
2178
|
+
return this._archiveDataSet ?? { feedType: "archive", messages: [], canPaginate: false, paginationCursor: null };
|
|
2193
2179
|
}
|
|
2194
2180
|
addDataStoreListener(listener) {
|
|
2195
2181
|
this._dataStoreListeners.push(listener);
|
|
@@ -2198,7 +2184,6 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2198
2184
|
this._dataStoreListeners = this._dataStoreListeners.filter((l) => l !== listener);
|
|
2199
2185
|
}
|
|
2200
2186
|
async fetchDataSet(props) {
|
|
2201
|
-
var _a2, _b2, _c2;
|
|
2202
2187
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2203
2188
|
if (props.canUseCache) {
|
|
2204
2189
|
switch (props.feedType) {
|
|
@@ -2217,9 +2202,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2217
2202
|
const response = props.feedType === "inbox" ? await ((_a = Courier.shared.client) == null ? void 0 : _a.inbox.getMessages()) : await ((_b = Courier.shared.client) == null ? void 0 : _b.inbox.getArchivedMessages());
|
|
2218
2203
|
return {
|
|
2219
2204
|
feedType: props.feedType,
|
|
2220
|
-
messages: (
|
|
2221
|
-
canPaginate: (
|
|
2222
|
-
paginationCursor: (
|
|
2205
|
+
messages: ((_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.messages) == null ? void 0 : _d.nodes) ?? [],
|
|
2206
|
+
canPaginate: ((_g = (_f = (_e = response == null ? void 0 : response.data) == null ? void 0 : _e.messages) == null ? void 0 : _f.pageInfo) == null ? void 0 : _g.hasNextPage) ?? false,
|
|
2207
|
+
paginationCursor: ((_j = (_i = (_h = response == null ? void 0 : response.data) == null ? void 0 : _h.messages) == null ? void 0 : _i.pageInfo) == null ? void 0 : _j.startCursor) ?? null
|
|
2223
2208
|
};
|
|
2224
2209
|
}
|
|
2225
2210
|
async fetchUnreadCount(props) {
|
|
@@ -2228,7 +2213,7 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2228
2213
|
return this._unreadCount;
|
|
2229
2214
|
}
|
|
2230
2215
|
const unreadCount = await ((_a = Courier.shared.client) == null ? void 0 : _a.inbox.getUnreadMessageCount());
|
|
2231
|
-
return unreadCount
|
|
2216
|
+
return unreadCount ?? 0;
|
|
2232
2217
|
}
|
|
2233
2218
|
async load(props) {
|
|
2234
2219
|
var _a, _b, _c;
|
|
@@ -2236,7 +2221,7 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2236
2221
|
if (!((_a = Courier.shared.client) == null ? void 0 : _a.options.userId)) {
|
|
2237
2222
|
throw new Error("User is not signed in");
|
|
2238
2223
|
}
|
|
2239
|
-
const properties = props
|
|
2224
|
+
const properties = props ?? { feedType: "inbox", canUseCache: true };
|
|
2240
2225
|
const [dataSet, unreadCount] = await Promise.all([
|
|
2241
2226
|
this.fetchDataSet(properties),
|
|
2242
2227
|
this.fetchUnreadCount(properties)
|
|
@@ -2251,10 +2236,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2251
2236
|
}
|
|
2252
2237
|
this._unreadCount = unreadCount;
|
|
2253
2238
|
this._dataStoreListeners.forEach((listener) => {
|
|
2254
|
-
var _a3;
|
|
2255
2239
|
var _a2, _b2, _c2, _d;
|
|
2256
2240
|
(_b2 = (_a2 = listener.events).onDataSetChange) == null ? void 0 : _b2.call(_a2, dataSet, properties.feedType);
|
|
2257
|
-
(_d = (_c2 = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c2,
|
|
2241
|
+
(_d = (_c2 = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c2, this._unreadCount ?? 0);
|
|
2258
2242
|
});
|
|
2259
2243
|
} catch (error) {
|
|
2260
2244
|
(_c = (_b = Courier.shared.client) == null ? void 0 : _b.options.logger) == null ? void 0 : _c.error("Error loading inbox:", error);
|
|
@@ -2362,12 +2346,11 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2362
2346
|
* @returns The message or undefined if it is not found
|
|
2363
2347
|
*/
|
|
2364
2348
|
getMessage(props) {
|
|
2365
|
-
var _a2;
|
|
2366
2349
|
var _a, _b;
|
|
2367
2350
|
if (!props.messageId) {
|
|
2368
2351
|
return void 0;
|
|
2369
2352
|
}
|
|
2370
|
-
return (
|
|
2353
|
+
return ((_a = this._inboxDataSet) == null ? void 0 : _a.messages.find((m) => m.messageId === props.messageId)) ?? ((_b = this._archiveDataSet) == null ? void 0 : _b.messages.find((m) => m.messageId === props.messageId));
|
|
2371
2354
|
}
|
|
2372
2355
|
/**
|
|
2373
2356
|
* Fetch the next page of messages
|
|
@@ -2375,7 +2358,6 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2375
2358
|
* @returns The next page of messages or null if there is no next page
|
|
2376
2359
|
*/
|
|
2377
2360
|
async fetchNextPageOfMessages(props) {
|
|
2378
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
2379
2361
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
2380
2362
|
switch (props.feedType) {
|
|
2381
2363
|
case "inbox":
|
|
@@ -2391,9 +2373,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2391
2373
|
}));
|
|
2392
2374
|
const dataSet = {
|
|
2393
2375
|
feedType: "inbox",
|
|
2394
|
-
messages: (
|
|
2395
|
-
canPaginate: (
|
|
2396
|
-
paginationCursor: (
|
|
2376
|
+
messages: ((_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.messages) == null ? void 0 : _d.nodes) ?? [],
|
|
2377
|
+
canPaginate: ((_g = (_f = (_e = response == null ? void 0 : response.data) == null ? void 0 : _e.messages) == null ? void 0 : _f.pageInfo) == null ? void 0 : _g.hasNextPage) ?? false,
|
|
2378
|
+
paginationCursor: ((_j = (_i = (_h = response == null ? void 0 : response.data) == null ? void 0 : _h.messages) == null ? void 0 : _i.pageInfo) == null ? void 0 : _j.startCursor) ?? null
|
|
2397
2379
|
};
|
|
2398
2380
|
this.addPage(dataSet);
|
|
2399
2381
|
return dataSet;
|
|
@@ -2418,9 +2400,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2418
2400
|
}));
|
|
2419
2401
|
const dataSet = {
|
|
2420
2402
|
feedType: "archive",
|
|
2421
|
-
messages: (
|
|
2422
|
-
canPaginate: (
|
|
2423
|
-
paginationCursor: (
|
|
2403
|
+
messages: ((_p = (_o = response == null ? void 0 : response.data) == null ? void 0 : _o.messages) == null ? void 0 : _p.nodes) ?? [],
|
|
2404
|
+
canPaginate: ((_s = (_r = (_q = response == null ? void 0 : response.data) == null ? void 0 : _q.messages) == null ? void 0 : _r.pageInfo) == null ? void 0 : _s.hasNextPage) ?? false,
|
|
2405
|
+
paginationCursor: ((_v = (_u = (_t = response == null ? void 0 : response.data) == null ? void 0 : _t.messages) == null ? void 0 : _u.pageInfo) == null ? void 0 : _v.startCursor) ?? null
|
|
2424
2406
|
};
|
|
2425
2407
|
this.addPage(dataSet);
|
|
2426
2408
|
return dataSet;
|
|
@@ -2584,7 +2566,6 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2584
2566
|
}
|
|
2585
2567
|
}
|
|
2586
2568
|
async archiveReadMessages({ canCallApi = true } = {}) {
|
|
2587
|
-
var _a2;
|
|
2588
2569
|
var _a, _b, _c, _d;
|
|
2589
2570
|
if (!this.canMutate()) {
|
|
2590
2571
|
return;
|
|
@@ -2592,11 +2573,11 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2592
2573
|
const datastoreSnapshot = this.getDatastoreSnapshot(this.unreadCount, this._inboxDataSet, this._archiveDataSet);
|
|
2593
2574
|
try {
|
|
2594
2575
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
2595
|
-
const messagesToArchive = (
|
|
2576
|
+
const messagesToArchive = ((_a = this._inboxDataSet) == null ? void 0 : _a.messages.filter((message) => message.read)) ?? [];
|
|
2596
2577
|
messagesToArchive.forEach((message) => {
|
|
2597
|
-
var
|
|
2578
|
+
var _a2, _b2, _c2;
|
|
2598
2579
|
message.archived = timestamp;
|
|
2599
|
-
const inboxIndex = (
|
|
2580
|
+
const inboxIndex = (_a2 = this._inboxDataSet) == null ? void 0 : _a2.messages.findIndex((m) => m.messageId === message.messageId);
|
|
2600
2581
|
if (inboxIndex !== void 0 && inboxIndex !== -1) {
|
|
2601
2582
|
(_b2 = this._inboxDataSet) == null ? void 0 : _b2.messages.splice(inboxIndex, 1);
|
|
2602
2583
|
}
|
|
@@ -2606,9 +2587,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2606
2587
|
}
|
|
2607
2588
|
});
|
|
2608
2589
|
this._dataStoreListeners.forEach((listener) => {
|
|
2609
|
-
var
|
|
2590
|
+
var _a2, _b2, _c2, _d2;
|
|
2610
2591
|
if (this._inboxDataSet) {
|
|
2611
|
-
(_b2 = (
|
|
2592
|
+
(_b2 = (_a2 = listener.events).onDataSetChange) == null ? void 0 : _b2.call(_a2, this._inboxDataSet, "inbox");
|
|
2612
2593
|
}
|
|
2613
2594
|
if (this._archiveDataSet) {
|
|
2614
2595
|
(_d2 = (_c2 = listener.events).onDataSetChange) == null ? void 0 : _d2.call(_c2, this._archiveDataSet, "archive");
|
|
@@ -2754,10 +2735,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2754
2735
|
break;
|
|
2755
2736
|
}
|
|
2756
2737
|
this._dataStoreListeners.forEach((listener) => {
|
|
2757
|
-
var _a3;
|
|
2758
2738
|
var _a2, _b2, _c, _d;
|
|
2759
2739
|
(_b2 = (_a2 = listener.events).onMessageAdd) == null ? void 0 : _b2.call(_a2, message, index, feedType);
|
|
2760
|
-
(_d = (_c = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c,
|
|
2740
|
+
(_d = (_c = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c, this._unreadCount ?? 0);
|
|
2761
2741
|
});
|
|
2762
2742
|
}
|
|
2763
2743
|
removeMessage(message, index, feedType) {
|
|
@@ -2774,10 +2754,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2774
2754
|
break;
|
|
2775
2755
|
}
|
|
2776
2756
|
this._dataStoreListeners.forEach((listener) => {
|
|
2777
|
-
var _a3;
|
|
2778
2757
|
var _a2, _b2, _c, _d;
|
|
2779
2758
|
(_b2 = (_a2 = listener.events).onMessageRemove) == null ? void 0 : _b2.call(_a2, message, index, feedType);
|
|
2780
|
-
(_d = (_c = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c,
|
|
2759
|
+
(_d = (_c = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c, this._unreadCount ?? 0);
|
|
2781
2760
|
});
|
|
2782
2761
|
}
|
|
2783
2762
|
/**
|
|
@@ -2831,10 +2810,9 @@ const _CourierInboxDatastore = class _CourierInboxDatastore2 {
|
|
|
2831
2810
|
break;
|
|
2832
2811
|
}
|
|
2833
2812
|
this._dataStoreListeners.forEach((listener) => {
|
|
2834
|
-
var _a2;
|
|
2835
2813
|
var _a, _b, _c, _d;
|
|
2836
2814
|
(_b = (_a = listener.events).onMessageUpdate) == null ? void 0 : _b.call(_a, message, index, feedType);
|
|
2837
|
-
(_d = (_c = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c,
|
|
2815
|
+
(_d = (_c = listener.events).onUnreadCountChange) == null ? void 0 : _d.call(_c, this._unreadCount ?? 0);
|
|
2838
2816
|
});
|
|
2839
2817
|
}
|
|
2840
2818
|
/**
|
|
@@ -2946,19 +2924,18 @@ class CourierListItem extends BaseElement {
|
|
|
2946
2924
|
"touchstart",
|
|
2947
2925
|
() => {
|
|
2948
2926
|
this._longPressTimeout = window.setTimeout(() => {
|
|
2949
|
-
var _a2, _b2;
|
|
2950
2927
|
this._isLongPress = true;
|
|
2951
2928
|
this._showMenu();
|
|
2952
2929
|
if (this._message && this.onItemLongPress) {
|
|
2953
2930
|
this.onItemLongPress(this._message);
|
|
2954
2931
|
if (navigator.vibrate) {
|
|
2955
|
-
navigator.vibrate((
|
|
2932
|
+
navigator.vibrate((longPress == null ? void 0 : longPress.vibrationDuration) ?? 50);
|
|
2956
2933
|
}
|
|
2957
2934
|
}
|
|
2958
2935
|
setTimeout(() => {
|
|
2959
2936
|
this._hideMenu();
|
|
2960
2937
|
this._isLongPress = false;
|
|
2961
|
-
}, (
|
|
2938
|
+
}, (longPress == null ? void 0 : longPress.displayDuration) ?? 2e3);
|
|
2962
2939
|
}, 650);
|
|
2963
2940
|
},
|
|
2964
2941
|
{ passive: true }
|
|
@@ -2975,7 +2952,6 @@ class CourierListItem extends BaseElement {
|
|
|
2975
2952
|
}
|
|
2976
2953
|
// Helpers
|
|
2977
2954
|
_getMenuOptions() {
|
|
2978
|
-
var _a2, _b2;
|
|
2979
2955
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
2980
2956
|
const menuTheme = (_d = (_c = (_b = (_a = this._theme.inbox) == null ? void 0 : _a.list) == null ? void 0 : _b.item) == null ? void 0 : _c.menu) == null ? void 0 : _d.item;
|
|
2981
2957
|
let options = [];
|
|
@@ -2985,7 +2961,7 @@ class CourierListItem extends BaseElement {
|
|
|
2985
2961
|
id: ((_e = this._message) == null ? void 0 : _e.read) ? "unread" : "read",
|
|
2986
2962
|
icon: {
|
|
2987
2963
|
svg: ((_f = this._message) == null ? void 0 : _f.read) ? (_g = menuTheme == null ? void 0 : menuTheme.unread) == null ? void 0 : _g.svg : (_h = menuTheme == null ? void 0 : menuTheme.read) == null ? void 0 : _h.svg,
|
|
2988
|
-
color: ((_i = this._message) == null ? void 0 : _i.read) ? (_j = menuTheme == null ? void 0 : menuTheme.unread) == null ? void 0 : _j.color : (
|
|
2964
|
+
color: ((_i = this._message) == null ? void 0 : _i.read) ? (_j = menuTheme == null ? void 0 : menuTheme.unread) == null ? void 0 : _j.color : ((_k = menuTheme == null ? void 0 : menuTheme.read) == null ? void 0 : _k.color) ?? "red"
|
|
2989
2965
|
},
|
|
2990
2966
|
onClick: () => {
|
|
2991
2967
|
if (this._message) {
|
|
@@ -3002,7 +2978,7 @@ class CourierListItem extends BaseElement {
|
|
|
3002
2978
|
id: isArchiveFeed ? "unarchive" : "archive",
|
|
3003
2979
|
icon: {
|
|
3004
2980
|
svg: isArchiveFeed ? (_l = menuTheme == null ? void 0 : menuTheme.unarchive) == null ? void 0 : _l.svg : (_m = menuTheme == null ? void 0 : menuTheme.archive) == null ? void 0 : _m.svg,
|
|
3005
|
-
color: isArchiveFeed ? (_n = menuTheme == null ? void 0 : menuTheme.unarchive) == null ? void 0 : _n.color : (
|
|
2981
|
+
color: isArchiveFeed ? (_n = menuTheme == null ? void 0 : menuTheme.unarchive) == null ? void 0 : _n.color : ((_o = menuTheme == null ? void 0 : menuTheme.archive) == null ? void 0 : _o.color) ?? "red"
|
|
3006
2982
|
},
|
|
3007
2983
|
onClick: () => {
|
|
3008
2984
|
if (this._message) {
|
|
@@ -3037,7 +3013,6 @@ class CourierListItem extends BaseElement {
|
|
|
3037
3013
|
}
|
|
3038
3014
|
}
|
|
3039
3015
|
_getStyles() {
|
|
3040
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l, _m, _n, _o, _p;
|
|
3041
3016
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
3042
3017
|
const listItem = (_b = (_a = this._theme.inbox) == null ? void 0 : _a.list) == null ? void 0 : _b.item;
|
|
3043
3018
|
return `
|
|
@@ -3046,7 +3021,7 @@ class CourierListItem extends BaseElement {
|
|
|
3046
3021
|
flex-direction: row;
|
|
3047
3022
|
align-items: flex-start;
|
|
3048
3023
|
justify-content: space-between;
|
|
3049
|
-
border-bottom: ${(
|
|
3024
|
+
border-bottom: ${(listItem == null ? void 0 : listItem.divider) ?? "1px solid red"};
|
|
3050
3025
|
font-family: inherit;
|
|
3051
3026
|
cursor: pointer;
|
|
3052
3027
|
transition: background-color 0.2s ease;
|
|
@@ -3055,7 +3030,7 @@ class CourierListItem extends BaseElement {
|
|
|
3055
3030
|
box-sizing: border-box;
|
|
3056
3031
|
padding: 12px 20px;
|
|
3057
3032
|
position: relative;
|
|
3058
|
-
background-color: ${(
|
|
3033
|
+
background-color: ${(listItem == null ? void 0 : listItem.backgroundColor) ?? "transparent"};
|
|
3059
3034
|
user-select: none;
|
|
3060
3035
|
-webkit-user-select: none;
|
|
3061
3036
|
-moz-user-select: none;
|
|
@@ -3066,21 +3041,21 @@ class CourierListItem extends BaseElement {
|
|
|
3066
3041
|
/* ───────────────────────── Base hover / active ────────────────── */
|
|
3067
3042
|
@media (hover: hover) {
|
|
3068
3043
|
:host(:hover) {
|
|
3069
|
-
background-color: ${(
|
|
3044
|
+
background-color: ${(listItem == null ? void 0 : listItem.hoverBackgroundColor) ?? "red"};
|
|
3070
3045
|
}
|
|
3071
3046
|
}
|
|
3072
3047
|
:host(:active) {
|
|
3073
|
-
background-color: ${(
|
|
3048
|
+
background-color: ${(listItem == null ? void 0 : listItem.activeBackgroundColor) ?? "red"};
|
|
3074
3049
|
}
|
|
3075
3050
|
|
|
3076
3051
|
/* ───────────────────────── Menu hover / active ────────────────── */
|
|
3077
3052
|
@media (hover: hover) {
|
|
3078
3053
|
:host(:hover):has(courier-inbox-list-item-menu:hover, courier-inbox-list-item-menu *:hover, courier-button:hover, courier-button *:hover) {
|
|
3079
|
-
background-color: ${(
|
|
3054
|
+
background-color: ${(listItem == null ? void 0 : listItem.backgroundColor) ?? "transparent"};
|
|
3080
3055
|
}
|
|
3081
3056
|
}
|
|
3082
3057
|
:host(:active):has(courier-inbox-list-item-menu:active, courier-inbox-list-item-menu *:active, courier-button:active, courier-button *:active) {
|
|
3083
|
-
background-color: ${(
|
|
3058
|
+
background-color: ${(listItem == null ? void 0 : listItem.backgroundColor) ?? "transparent"};
|
|
3084
3059
|
}
|
|
3085
3060
|
|
|
3086
3061
|
:host(:last-child) {
|
|
@@ -3094,7 +3069,7 @@ class CourierListItem extends BaseElement {
|
|
|
3094
3069
|
width: 8px;
|
|
3095
3070
|
height: 8px;
|
|
3096
3071
|
border-radius: 50%;
|
|
3097
|
-
background-color: ${(
|
|
3072
|
+
background-color: ${(listItem == null ? void 0 : listItem.unreadIndicatorColor) ?? "red"};
|
|
3098
3073
|
display: none;
|
|
3099
3074
|
}
|
|
3100
3075
|
|
|
@@ -3123,22 +3098,22 @@ class CourierListItem extends BaseElement {
|
|
|
3123
3098
|
}
|
|
3124
3099
|
|
|
3125
3100
|
p[part='title'] {
|
|
3126
|
-
font-family: ${(
|
|
3127
|
-
font-size: ${(
|
|
3128
|
-
color: ${(
|
|
3101
|
+
font-family: ${((_c = listItem == null ? void 0 : listItem.title) == null ? void 0 : _c.family) ?? "inherit"};
|
|
3102
|
+
font-size: ${((_d = listItem == null ? void 0 : listItem.title) == null ? void 0 : _d.size) ?? "14px"};
|
|
3103
|
+
color: ${((_e = listItem == null ? void 0 : listItem.title) == null ? void 0 : _e.color) ?? "red"};
|
|
3129
3104
|
margin-bottom: 4px;
|
|
3130
3105
|
}
|
|
3131
3106
|
|
|
3132
3107
|
p[part='subtitle'] {
|
|
3133
|
-
font-family: ${(
|
|
3134
|
-
font-size: ${(
|
|
3135
|
-
color: ${(
|
|
3108
|
+
font-family: ${((_f = listItem == null ? void 0 : listItem.subtitle) == null ? void 0 : _f.family) ?? "inherit"};
|
|
3109
|
+
font-size: ${((_g = listItem == null ? void 0 : listItem.subtitle) == null ? void 0 : _g.size) ?? "14px"};
|
|
3110
|
+
color: ${((_h = listItem == null ? void 0 : listItem.subtitle) == null ? void 0 : _h.color) ?? "red"};
|
|
3136
3111
|
}
|
|
3137
3112
|
|
|
3138
3113
|
p[part='time'] {
|
|
3139
|
-
font-family: ${(
|
|
3140
|
-
font-size: ${(
|
|
3141
|
-
color: ${(
|
|
3114
|
+
font-family: ${((_i = listItem == null ? void 0 : listItem.time) == null ? void 0 : _i.family) ?? "inherit"};
|
|
3115
|
+
font-size: ${((_j = listItem == null ? void 0 : listItem.time) == null ? void 0 : _j.size) ?? "14px"};
|
|
3116
|
+
color: ${((_k = listItem == null ? void 0 : listItem.time) == null ? void 0 : _k.color) ?? "red"};
|
|
3142
3117
|
text-align: right;
|
|
3143
3118
|
white-space: nowrap;
|
|
3144
3119
|
}
|
|
@@ -3283,9 +3258,8 @@ class CourierSkeletonAnimatedRow extends BaseElement {
|
|
|
3283
3258
|
this._shadow.appendChild(skeletonItem);
|
|
3284
3259
|
}
|
|
3285
3260
|
getStyles(theme2, widthPercent) {
|
|
3286
|
-
var _a2, _b2, _c2, _d2;
|
|
3287
3261
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
3288
|
-
const color = (
|
|
3262
|
+
const color = ((_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.loading) == null ? void 0 : _b.animation) == null ? void 0 : _c.barColor) ?? "#000";
|
|
3289
3263
|
const hexColor = color.length === 4 ? `#${color[1]}${color[1]}${color[2]}${color[2]}${color[3]}${color[3]}` : color;
|
|
3290
3264
|
const r = parseInt(hexColor.slice(1, 3), 16);
|
|
3291
3265
|
const g = parseInt(hexColor.slice(3, 5), 16);
|
|
@@ -3302,7 +3276,7 @@ class CourierSkeletonAnimatedRow extends BaseElement {
|
|
|
3302
3276
|
}
|
|
3303
3277
|
|
|
3304
3278
|
.skeleton-item {
|
|
3305
|
-
height: ${(
|
|
3279
|
+
height: ${((_f = (_e = (_d = theme2.inbox) == null ? void 0 : _d.loading) == null ? void 0 : _e.animation) == null ? void 0 : _f.barHeight) ?? "14px"};
|
|
3306
3280
|
width: 100%;
|
|
3307
3281
|
background: linear-gradient(
|
|
3308
3282
|
90deg,
|
|
@@ -3311,8 +3285,8 @@ class CourierSkeletonAnimatedRow extends BaseElement {
|
|
|
3311
3285
|
${colorWithAlpha80} 75%
|
|
3312
3286
|
);
|
|
3313
3287
|
background-size: 200% 100%;
|
|
3314
|
-
animation: shimmer ${(
|
|
3315
|
-
border-radius: ${(
|
|
3288
|
+
animation: shimmer ${((_i = (_h = (_g = theme2.inbox) == null ? void 0 : _g.loading) == null ? void 0 : _h.animation) == null ? void 0 : _i.duration) ?? "2s"} ease-in-out infinite;
|
|
3289
|
+
border-radius: ${((_l = (_k = (_j = theme2.inbox) == null ? void 0 : _j.loading) == null ? void 0 : _k.animation) == null ? void 0 : _l.barBorderRadius) ?? "14px"};
|
|
3316
3290
|
}
|
|
3317
3291
|
|
|
3318
3292
|
@keyframes shimmer {
|
|
@@ -3347,7 +3321,6 @@ class CourierInboxSkeletonList extends CourierElement {
|
|
|
3347
3321
|
return list;
|
|
3348
3322
|
}
|
|
3349
3323
|
getStyles() {
|
|
3350
|
-
var _a2;
|
|
3351
3324
|
var _a, _b;
|
|
3352
3325
|
return `
|
|
3353
3326
|
:host {
|
|
@@ -3368,7 +3341,7 @@ class CourierInboxSkeletonList extends CourierElement {
|
|
|
3368
3341
|
}
|
|
3369
3342
|
|
|
3370
3343
|
.list > * {
|
|
3371
|
-
border-bottom: ${(
|
|
3344
|
+
border-bottom: ${((_b = (_a = this._theme.inbox) == null ? void 0 : _a.loading) == null ? void 0 : _b.divider) ?? "1px solid red"};
|
|
3372
3345
|
}
|
|
3373
3346
|
|
|
3374
3347
|
.list > *:last-child {
|
|
@@ -3465,14 +3438,13 @@ class CourierInboxList extends BaseElement {
|
|
|
3465
3438
|
return this._messages;
|
|
3466
3439
|
}
|
|
3467
3440
|
getStyles() {
|
|
3468
|
-
var _a2;
|
|
3469
3441
|
var _a;
|
|
3470
3442
|
const list = (_a = this._themeSubscription.manager.getTheme().inbox) == null ? void 0 : _a.list;
|
|
3471
3443
|
return `
|
|
3472
3444
|
:host {
|
|
3473
3445
|
flex: 1;
|
|
3474
3446
|
width: 100%;
|
|
3475
|
-
background-color: ${(
|
|
3447
|
+
background-color: ${(list == null ? void 0 : list.backgroundColor) ?? CourierColors.white[500]};
|
|
3476
3448
|
}
|
|
3477
3449
|
|
|
3478
3450
|
ul {
|
|
@@ -3545,7 +3517,6 @@ class CourierInboxList extends BaseElement {
|
|
|
3545
3517
|
this._onRefresh();
|
|
3546
3518
|
}
|
|
3547
3519
|
render() {
|
|
3548
|
-
var _a2, _b2;
|
|
3549
3520
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da;
|
|
3550
3521
|
this.reset();
|
|
3551
3522
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
@@ -3553,7 +3524,7 @@ class CourierInboxList extends BaseElement {
|
|
|
3553
3524
|
const error = (_a = theme2.inbox) == null ? void 0 : _a.error;
|
|
3554
3525
|
const errorElement = new CourierInfoState({
|
|
3555
3526
|
title: {
|
|
3556
|
-
text: (
|
|
3527
|
+
text: ((_b = error == null ? void 0 : error.title) == null ? void 0 : _b.text) ?? this._error.message,
|
|
3557
3528
|
textColor: (_d = (_c = error == null ? void 0 : error.title) == null ? void 0 : _c.font) == null ? void 0 : _d.color,
|
|
3558
3529
|
fontFamily: (_f = (_e = error == null ? void 0 : error.title) == null ? void 0 : _e.font) == null ? void 0 : _f.family,
|
|
3559
3530
|
fontSize: (_h = (_g = error == null ? void 0 : error.title) == null ? void 0 : _g.font) == null ? void 0 : _h.size,
|
|
@@ -3588,7 +3559,7 @@ class CourierInboxList extends BaseElement {
|
|
|
3588
3559
|
const empty = (_D = theme2.inbox) == null ? void 0 : _D.empty;
|
|
3589
3560
|
const emptyElement = new CourierInfoState({
|
|
3590
3561
|
title: {
|
|
3591
|
-
text: (
|
|
3562
|
+
text: ((_E = empty == null ? void 0 : empty.title) == null ? void 0 : _E.text) ?? `No ${this._feedType} messages yet`,
|
|
3592
3563
|
textColor: (_G = (_F = empty == null ? void 0 : empty.title) == null ? void 0 : _F.font) == null ? void 0 : _G.color,
|
|
3593
3564
|
fontFamily: (_I = (_H = empty == null ? void 0 : empty.title) == null ? void 0 : _H.font) == null ? void 0 : _I.family,
|
|
3594
3565
|
fontSize: (_K = (_J = empty == null ? void 0 : empty.title) == null ? void 0 : _J.font) == null ? void 0 : _K.size,
|
|
@@ -3623,16 +3594,16 @@ class CourierInboxList extends BaseElement {
|
|
|
3623
3594
|
const listItem = new CourierListItem(theme2);
|
|
3624
3595
|
listItem.setMessage(message, this._feedType);
|
|
3625
3596
|
listItem.setOnItemClick((message2) => {
|
|
3626
|
-
var
|
|
3627
|
-
return (
|
|
3597
|
+
var _a2;
|
|
3598
|
+
return (_a2 = this._onMessageClick) == null ? void 0 : _a2.call(this, message2, index);
|
|
3628
3599
|
});
|
|
3629
3600
|
listItem.setOnItemActionClick((message2, action) => {
|
|
3630
|
-
var
|
|
3631
|
-
return (
|
|
3601
|
+
var _a2;
|
|
3602
|
+
return (_a2 = this._onMessageActionClick) == null ? void 0 : _a2.call(this, message2, action, index);
|
|
3632
3603
|
});
|
|
3633
3604
|
listItem.setOnItemLongPress((message2) => {
|
|
3634
|
-
var
|
|
3635
|
-
return (
|
|
3605
|
+
var _a2;
|
|
3606
|
+
return (_a2 = this._onMessageLongPress) == null ? void 0 : _a2.call(this, message2, index);
|
|
3636
3607
|
});
|
|
3637
3608
|
list.appendChild(listItem);
|
|
3638
3609
|
});
|
|
@@ -3641,8 +3612,8 @@ class CourierInboxList extends BaseElement {
|
|
|
3641
3612
|
theme: theme2,
|
|
3642
3613
|
customItem: (_da = this._paginationItemFactory) == null ? void 0 : _da.call(this, { feedType: this._feedType }),
|
|
3643
3614
|
onPaginationTrigger: () => {
|
|
3644
|
-
var
|
|
3645
|
-
return (
|
|
3615
|
+
var _a2;
|
|
3616
|
+
return (_a2 = this._onPaginationTrigger) == null ? void 0 : _a2.call(this, this._feedType);
|
|
3646
3617
|
}
|
|
3647
3618
|
});
|
|
3648
3619
|
list.appendChild(paginationItem);
|
|
@@ -3680,7 +3651,6 @@ class CourierInboxList extends BaseElement {
|
|
|
3680
3651
|
registerElement("courier-inbox-list", CourierInboxList);
|
|
3681
3652
|
class CourierInboxOptionMenuItem extends BaseElement {
|
|
3682
3653
|
constructor(props) {
|
|
3683
|
-
var _a;
|
|
3684
3654
|
super();
|
|
3685
3655
|
__publicField(this, "_option");
|
|
3686
3656
|
__publicField(this, "_isSelected");
|
|
@@ -3697,7 +3667,7 @@ class CourierInboxOptionMenuItem extends BaseElement {
|
|
|
3697
3667
|
this._style = document.createElement("style");
|
|
3698
3668
|
this._content = document.createElement("div");
|
|
3699
3669
|
this._content.className = "menu-item";
|
|
3700
|
-
this._itemIcon = new CourierIcon(
|
|
3670
|
+
this._itemIcon = new CourierIcon(this._option.icon.svg ?? CourierIconSVGs.inbox);
|
|
3701
3671
|
this._itemIcon.setAttribute("size", "16");
|
|
3702
3672
|
this._title = document.createElement("p");
|
|
3703
3673
|
this._title.textContent = this._option.text;
|
|
@@ -3716,7 +3686,6 @@ class CourierInboxOptionMenuItem extends BaseElement {
|
|
|
3716
3686
|
this.refreshTheme();
|
|
3717
3687
|
}
|
|
3718
3688
|
getStyles() {
|
|
3719
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
3720
3689
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H;
|
|
3721
3690
|
const theme2 = this._themeManager.getTheme();
|
|
3722
3691
|
return `
|
|
@@ -3728,11 +3697,11 @@ class CourierInboxOptionMenuItem extends BaseElement {
|
|
|
3728
3697
|
}
|
|
3729
3698
|
|
|
3730
3699
|
:host(:hover) {
|
|
3731
|
-
background-color: ${(
|
|
3700
|
+
background-color: ${((_e = (_d = (_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.header) == null ? void 0 : _b.menus) == null ? void 0 : _c.popup) == null ? void 0 : _d.list) == null ? void 0 : _e.hoverBackgroundColor) ?? "red"};
|
|
3732
3701
|
}
|
|
3733
3702
|
|
|
3734
3703
|
:host(:active) {
|
|
3735
|
-
background-color: ${(
|
|
3704
|
+
background-color: ${((_j = (_i = (_h = (_g = (_f = theme2.inbox) == null ? void 0 : _f.header) == null ? void 0 : _g.menus) == null ? void 0 : _h.popup) == null ? void 0 : _i.list) == null ? void 0 : _j.activeBackgroundColor) ?? "red"};
|
|
3736
3705
|
}
|
|
3737
3706
|
|
|
3738
3707
|
.menu-item {
|
|
@@ -3748,10 +3717,10 @@ class CourierInboxOptionMenuItem extends BaseElement {
|
|
|
3748
3717
|
|
|
3749
3718
|
p {
|
|
3750
3719
|
margin: 0;
|
|
3751
|
-
font-family: ${(
|
|
3752
|
-
font-weight: ${(
|
|
3753
|
-
font-size: ${(
|
|
3754
|
-
color: ${(
|
|
3720
|
+
font-family: ${((_p = (_o = (_n = (_m = (_l = (_k = theme2.inbox) == null ? void 0 : _k.header) == null ? void 0 : _l.menus) == null ? void 0 : _m.popup) == null ? void 0 : _n.list) == null ? void 0 : _o.font) == null ? void 0 : _p.family) ?? "inherit"};
|
|
3721
|
+
font-weight: ${((_v = (_u = (_t = (_s = (_r = (_q = theme2.inbox) == null ? void 0 : _q.header) == null ? void 0 : _r.menus) == null ? void 0 : _s.popup) == null ? void 0 : _t.list) == null ? void 0 : _u.font) == null ? void 0 : _v.weight) ?? "inherit"};
|
|
3722
|
+
font-size: ${((_B = (_A = (_z = (_y = (_x = (_w = theme2.inbox) == null ? void 0 : _w.header) == null ? void 0 : _x.menus) == null ? void 0 : _y.popup) == null ? void 0 : _z.list) == null ? void 0 : _A.font) == null ? void 0 : _B.size) ?? "14px"};
|
|
3723
|
+
color: ${((_H = (_G = (_F = (_E = (_D = (_C = theme2.inbox) == null ? void 0 : _C.header) == null ? void 0 : _D.menus) == null ? void 0 : _E.popup) == null ? void 0 : _F.list) == null ? void 0 : _G.font) == null ? void 0 : _H.color) ?? "red"};
|
|
3755
3724
|
white-space: nowrap;
|
|
3756
3725
|
}
|
|
3757
3726
|
|
|
@@ -3761,14 +3730,13 @@ class CourierInboxOptionMenuItem extends BaseElement {
|
|
|
3761
3730
|
`;
|
|
3762
3731
|
}
|
|
3763
3732
|
refreshTheme() {
|
|
3764
|
-
var _a2, _b2, _c2, _d2, _e;
|
|
3765
3733
|
var _a, _b, _c, _d;
|
|
3766
3734
|
this._style.textContent = this.getStyles();
|
|
3767
|
-
this._selectionIcon.updateColor((
|
|
3768
|
-
this._selectionIcon.updateSVG((
|
|
3769
|
-
this._title.textContent =
|
|
3770
|
-
this._itemIcon.updateColor((
|
|
3771
|
-
this._itemIcon.updateSVG((
|
|
3735
|
+
this._selectionIcon.updateColor(((_a = this._option.selectionIcon) == null ? void 0 : _a.color) ?? "red");
|
|
3736
|
+
this._selectionIcon.updateSVG(((_b = this._option.selectionIcon) == null ? void 0 : _b.svg) ?? CourierIconSVGs.check);
|
|
3737
|
+
this._title.textContent = this._option.text ?? "Missing Text";
|
|
3738
|
+
this._itemIcon.updateColor(((_c = this._option.icon) == null ? void 0 : _c.color) ?? "red");
|
|
3739
|
+
this._itemIcon.updateSVG(((_d = this._option.icon) == null ? void 0 : _d.svg) ?? CourierIconSVGs.inbox);
|
|
3772
3740
|
}
|
|
3773
3741
|
}
|
|
3774
3742
|
registerElement("courier-inbox-filter-menu-item", CourierInboxOptionMenuItem);
|
|
@@ -3805,7 +3773,6 @@ class CourierInboxOptionMenu extends BaseElement {
|
|
|
3805
3773
|
this.refreshTheme();
|
|
3806
3774
|
}
|
|
3807
3775
|
getStyles() {
|
|
3808
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
3809
3776
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
3810
3777
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
3811
3778
|
return `
|
|
@@ -3819,10 +3786,10 @@ class CourierInboxOptionMenu extends BaseElement {
|
|
|
3819
3786
|
position: absolute;
|
|
3820
3787
|
top: 42px;
|
|
3821
3788
|
right: -6px;
|
|
3822
|
-
border-radius: ${(
|
|
3823
|
-
border: ${(
|
|
3824
|
-
background: ${(
|
|
3825
|
-
box-shadow: ${(
|
|
3789
|
+
border-radius: ${((_d = (_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.header) == null ? void 0 : _b.menus) == null ? void 0 : _c.popup) == null ? void 0 : _d.borderRadius) ?? "6px"};
|
|
3790
|
+
border: ${((_h = (_g = (_f = (_e = theme2.inbox) == null ? void 0 : _e.header) == null ? void 0 : _f.menus) == null ? void 0 : _g.popup) == null ? void 0 : _h.border) ?? "1px solid red"};
|
|
3791
|
+
background: ${((_l = (_k = (_j = (_i = theme2.inbox) == null ? void 0 : _i.header) == null ? void 0 : _j.menus) == null ? void 0 : _k.popup) == null ? void 0 : _l.backgroundColor) ?? "red"};
|
|
3792
|
+
box-shadow: ${((_p = (_o = (_n = (_m = theme2.inbox) == null ? void 0 : _m.header) == null ? void 0 : _n.menus) == null ? void 0 : _o.popup) == null ? void 0 : _p.shadow) ?? "0 4px 12px 0 red"};
|
|
3826
3793
|
z-index: 1000;
|
|
3827
3794
|
min-width: 200px;
|
|
3828
3795
|
overflow: hidden;
|
|
@@ -3830,7 +3797,7 @@ class CourierInboxOptionMenu extends BaseElement {
|
|
|
3830
3797
|
}
|
|
3831
3798
|
|
|
3832
3799
|
courier-inbox-filter-menu-item {
|
|
3833
|
-
border-bottom: ${(
|
|
3800
|
+
border-bottom: ${((_u = (_t = (_s = (_r = (_q = theme2.inbox) == null ? void 0 : _q.header) == null ? void 0 : _r.menus) == null ? void 0 : _s.popup) == null ? void 0 : _t.list) == null ? void 0 : _u.divider) ?? "none"};
|
|
3834
3801
|
}
|
|
3835
3802
|
|
|
3836
3803
|
courier-inbox-filter-menu-item:last-child {
|
|
@@ -3839,7 +3806,6 @@ class CourierInboxOptionMenu extends BaseElement {
|
|
|
3839
3806
|
`;
|
|
3840
3807
|
}
|
|
3841
3808
|
refreshTheme() {
|
|
3842
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
3843
3809
|
var _a, _b, _c, _d, _e, _f;
|
|
3844
3810
|
this._style.textContent = this.getStyles();
|
|
3845
3811
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
@@ -3847,11 +3813,11 @@ class CourierInboxOptionMenu extends BaseElement {
|
|
|
3847
3813
|
const isFilter = this._type === "filters";
|
|
3848
3814
|
const buttonConfig = isFilter ? (_c = menu == null ? void 0 : menu.filters) == null ? void 0 : _c.button : (_d = menu == null ? void 0 : menu.actions) == null ? void 0 : _d.button;
|
|
3849
3815
|
const defaultIcon = isFilter ? CourierIconSVGs.filter : CourierIconSVGs.overflow;
|
|
3850
|
-
this._menuButton.updateIconSVG((
|
|
3851
|
-
this._menuButton.updateIconColor((
|
|
3852
|
-
this._menuButton.updateBackgroundColor((
|
|
3853
|
-
this._menuButton.updateHoverBackgroundColor((
|
|
3854
|
-
this._menuButton.updateActiveBackgroundColor((
|
|
3816
|
+
this._menuButton.updateIconSVG(((_e = buttonConfig == null ? void 0 : buttonConfig.icon) == null ? void 0 : _e.svg) ?? defaultIcon);
|
|
3817
|
+
this._menuButton.updateIconColor(((_f = buttonConfig == null ? void 0 : buttonConfig.icon) == null ? void 0 : _f.color) ?? "red");
|
|
3818
|
+
this._menuButton.updateBackgroundColor((buttonConfig == null ? void 0 : buttonConfig.backgroundColor) ?? "transparent");
|
|
3819
|
+
this._menuButton.updateHoverBackgroundColor((buttonConfig == null ? void 0 : buttonConfig.hoverBackgroundColor) ?? "red");
|
|
3820
|
+
this._menuButton.updateActiveBackgroundColor((buttonConfig == null ? void 0 : buttonConfig.activeBackgroundColor) ?? "red");
|
|
3855
3821
|
this.refreshMenuItems();
|
|
3856
3822
|
}
|
|
3857
3823
|
setOptions(options) {
|
|
@@ -3970,7 +3936,6 @@ class CourierUnreadCountBadge extends BaseElement {
|
|
|
3970
3936
|
registerElement("courier-unread-count-badge", CourierUnreadCountBadge);
|
|
3971
3937
|
class CourierInboxHeaderTitle extends BaseElement {
|
|
3972
3938
|
constructor(themeManager, option) {
|
|
3973
|
-
var _a;
|
|
3974
3939
|
super();
|
|
3975
3940
|
__publicField(this, "_themeSubscription");
|
|
3976
3941
|
__publicField(this, "_option");
|
|
@@ -3997,13 +3962,11 @@ class CourierInboxHeaderTitle extends BaseElement {
|
|
|
3997
3962
|
shadow.appendChild(this._style);
|
|
3998
3963
|
shadow.appendChild(this._container);
|
|
3999
3964
|
this._themeSubscription = themeManager.subscribe((_) => {
|
|
4000
|
-
|
|
4001
|
-
this.refreshTheme((_a2 = this._feedType) != null ? _a2 : "inbox");
|
|
3965
|
+
this.refreshTheme(this._feedType ?? "inbox");
|
|
4002
3966
|
});
|
|
4003
|
-
this.refreshTheme(
|
|
3967
|
+
this.refreshTheme(this._feedType ?? "inbox");
|
|
4004
3968
|
}
|
|
4005
3969
|
getStyles() {
|
|
4006
|
-
var _a2, _b2, _c2, _d2;
|
|
4007
3970
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
4008
3971
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
4009
3972
|
return `
|
|
@@ -4021,10 +3984,10 @@ class CourierInboxHeaderTitle extends BaseElement {
|
|
|
4021
3984
|
|
|
4022
3985
|
h2 {
|
|
4023
3986
|
margin: 0;
|
|
4024
|
-
font-family: ${(
|
|
4025
|
-
font-size: ${(
|
|
4026
|
-
font-weight: ${(
|
|
4027
|
-
color: ${(
|
|
3987
|
+
font-family: ${((_d = (_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.header) == null ? void 0 : _b.filters) == null ? void 0 : _c.font) == null ? void 0 : _d.family) ?? "inherit"};
|
|
3988
|
+
font-size: ${((_h = (_g = (_f = (_e = theme2.inbox) == null ? void 0 : _e.header) == null ? void 0 : _f.filters) == null ? void 0 : _g.font) == null ? void 0 : _h.size) ?? "18px"};
|
|
3989
|
+
font-weight: ${((_l = (_k = (_j = (_i = theme2.inbox) == null ? void 0 : _i.header) == null ? void 0 : _j.filters) == null ? void 0 : _k.font) == null ? void 0 : _l.weight) ?? "500"};
|
|
3990
|
+
color: ${((_p = (_o = (_n = (_m = theme2.inbox) == null ? void 0 : _m.header) == null ? void 0 : _n.filters) == null ? void 0 : _o.font) == null ? void 0 : _p.color) ?? "red"};
|
|
4028
3991
|
}
|
|
4029
3992
|
|
|
4030
3993
|
courier-unread-count-badge {
|
|
@@ -4045,19 +4008,18 @@ class CourierInboxHeaderTitle extends BaseElement {
|
|
|
4045
4008
|
this.updateFilter();
|
|
4046
4009
|
}
|
|
4047
4010
|
updateFilter() {
|
|
4048
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
4049
4011
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
4050
4012
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
4051
4013
|
switch (this._feedType) {
|
|
4052
4014
|
case "inbox":
|
|
4053
|
-
this._titleElement.textContent = (
|
|
4054
|
-
this._iconElement.updateSVG((
|
|
4055
|
-
this._iconElement.updateColor((
|
|
4015
|
+
this._titleElement.textContent = ((_d = (_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.header) == null ? void 0 : _b.filters) == null ? void 0 : _c.inbox) == null ? void 0 : _d.text) ?? "Inbox";
|
|
4016
|
+
this._iconElement.updateSVG(((_i = (_h = (_g = (_f = (_e = theme2.inbox) == null ? void 0 : _e.header) == null ? void 0 : _f.filters) == null ? void 0 : _g.inbox) == null ? void 0 : _h.icon) == null ? void 0 : _i.svg) ?? CourierIconSVGs.inbox);
|
|
4017
|
+
this._iconElement.updateColor(((_n = (_m = (_l = (_k = (_j = theme2.inbox) == null ? void 0 : _j.header) == null ? void 0 : _k.filters) == null ? void 0 : _l.inbox) == null ? void 0 : _m.icon) == null ? void 0 : _n.color) ?? "red");
|
|
4056
4018
|
break;
|
|
4057
4019
|
case "archive":
|
|
4058
|
-
this._titleElement.textContent = (
|
|
4059
|
-
this._iconElement.updateSVG((
|
|
4060
|
-
this._iconElement.updateColor((
|
|
4020
|
+
this._titleElement.textContent = ((_r = (_q = (_p = (_o = theme2.inbox) == null ? void 0 : _o.header) == null ? void 0 : _p.filters) == null ? void 0 : _q.archive) == null ? void 0 : _r.text) ?? "Archive";
|
|
4021
|
+
this._iconElement.updateSVG(((_w = (_v = (_u = (_t = (_s = theme2.inbox) == null ? void 0 : _s.header) == null ? void 0 : _t.filters) == null ? void 0 : _u.archive) == null ? void 0 : _v.icon) == null ? void 0 : _w.svg) ?? CourierIconSVGs.archive);
|
|
4022
|
+
this._iconElement.updateColor(((_B = (_A = (_z = (_y = (_x = theme2.inbox) == null ? void 0 : _x.header) == null ? void 0 : _y.filters) == null ? void 0 : _z.archive) == null ? void 0 : _A.icon) == null ? void 0 : _B.color) ?? "red");
|
|
4061
4023
|
break;
|
|
4062
4024
|
}
|
|
4063
4025
|
}
|
|
@@ -4085,21 +4047,20 @@ class CourierInboxHeader extends CourierElement {
|
|
|
4085
4047
|
}
|
|
4086
4048
|
// Menu options
|
|
4087
4049
|
getFilterOptions() {
|
|
4088
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
4089
4050
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
4090
4051
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
4091
4052
|
const filterMenu = (_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.header) == null ? void 0 : _b.menus) == null ? void 0 : _c.filters;
|
|
4092
4053
|
return [
|
|
4093
4054
|
{
|
|
4094
4055
|
id: "inbox",
|
|
4095
|
-
text: (
|
|
4056
|
+
text: ((_d = filterMenu == null ? void 0 : filterMenu.inbox) == null ? void 0 : _d.text) ?? "Inbox",
|
|
4096
4057
|
icon: {
|
|
4097
|
-
color: (
|
|
4098
|
-
svg: (
|
|
4058
|
+
color: ((_f = (_e = filterMenu == null ? void 0 : filterMenu.inbox) == null ? void 0 : _e.icon) == null ? void 0 : _f.color) ?? "red",
|
|
4059
|
+
svg: ((_h = (_g = filterMenu == null ? void 0 : filterMenu.inbox) == null ? void 0 : _g.icon) == null ? void 0 : _h.svg) ?? CourierIconSVGs.inbox
|
|
4099
4060
|
},
|
|
4100
4061
|
selectionIcon: {
|
|
4101
|
-
color: (
|
|
4102
|
-
svg: (
|
|
4062
|
+
color: ((_n = (_m = (_l = (_k = (_j = (_i = theme2.inbox) == null ? void 0 : _i.header) == null ? void 0 : _j.menus) == null ? void 0 : _k.popup) == null ? void 0 : _l.list) == null ? void 0 : _m.selectionIcon) == null ? void 0 : _n.color) ?? "red",
|
|
4063
|
+
svg: ((_t = (_s = (_r = (_q = (_p = (_o = theme2.inbox) == null ? void 0 : _o.header) == null ? void 0 : _p.menus) == null ? void 0 : _q.popup) == null ? void 0 : _r.list) == null ? void 0 : _s.selectionIcon) == null ? void 0 : _t.svg) ?? CourierIconSVGs.check
|
|
4103
4064
|
},
|
|
4104
4065
|
onClick: (option) => {
|
|
4105
4066
|
this.handleOptionMenuItemClick("inbox", option);
|
|
@@ -4107,14 +4068,14 @@ class CourierInboxHeader extends CourierElement {
|
|
|
4107
4068
|
},
|
|
4108
4069
|
{
|
|
4109
4070
|
id: "archive",
|
|
4110
|
-
text: (
|
|
4071
|
+
text: ((_u = filterMenu == null ? void 0 : filterMenu.archive) == null ? void 0 : _u.text) ?? "Archive",
|
|
4111
4072
|
icon: {
|
|
4112
|
-
color: (
|
|
4113
|
-
svg: (
|
|
4073
|
+
color: ((_w = (_v = filterMenu == null ? void 0 : filterMenu.archive) == null ? void 0 : _v.icon) == null ? void 0 : _w.color) ?? "red",
|
|
4074
|
+
svg: ((_y = (_x = filterMenu == null ? void 0 : filterMenu.archive) == null ? void 0 : _x.icon) == null ? void 0 : _y.svg) ?? CourierIconSVGs.archive
|
|
4114
4075
|
},
|
|
4115
4076
|
selectionIcon: {
|
|
4116
|
-
color: (
|
|
4117
|
-
svg: (
|
|
4077
|
+
color: ((_E = (_D = (_C = (_B = (_A = (_z = theme2.inbox) == null ? void 0 : _z.header) == null ? void 0 : _A.menus) == null ? void 0 : _B.popup) == null ? void 0 : _C.list) == null ? void 0 : _D.selectionIcon) == null ? void 0 : _E.color) ?? "red",
|
|
4078
|
+
svg: ((_K = (_J = (_I = (_H = (_G = (_F = theme2.inbox) == null ? void 0 : _F.header) == null ? void 0 : _G.menus) == null ? void 0 : _H.popup) == null ? void 0 : _I.list) == null ? void 0 : _J.selectionIcon) == null ? void 0 : _K.svg) ?? CourierIconSVGs.check
|
|
4118
4079
|
},
|
|
4119
4080
|
onClick: (option) => {
|
|
4120
4081
|
this.handleOptionMenuItemClick("archive", option);
|
|
@@ -4123,17 +4084,16 @@ class CourierInboxHeader extends CourierElement {
|
|
|
4123
4084
|
];
|
|
4124
4085
|
}
|
|
4125
4086
|
getActionOptions() {
|
|
4126
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
4127
4087
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
4128
4088
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
4129
4089
|
const actionMenu = (_c = (_b = (_a = theme2.inbox) == null ? void 0 : _a.header) == null ? void 0 : _b.menus) == null ? void 0 : _c.actions;
|
|
4130
4090
|
return [
|
|
4131
4091
|
{
|
|
4132
4092
|
id: "markAllRead",
|
|
4133
|
-
text: (
|
|
4093
|
+
text: ((_d = actionMenu == null ? void 0 : actionMenu.markAllRead) == null ? void 0 : _d.text) ?? "Mark All as Read",
|
|
4134
4094
|
icon: {
|
|
4135
|
-
color: (
|
|
4136
|
-
svg: (
|
|
4095
|
+
color: ((_f = (_e = actionMenu == null ? void 0 : actionMenu.markAllRead) == null ? void 0 : _e.icon) == null ? void 0 : _f.color) ?? "red",
|
|
4096
|
+
svg: ((_h = (_g = actionMenu == null ? void 0 : actionMenu.markAllRead) == null ? void 0 : _g.icon) == null ? void 0 : _h.svg) ?? CourierIconSVGs.inbox
|
|
4137
4097
|
},
|
|
4138
4098
|
selectionIcon: null,
|
|
4139
4099
|
onClick: (_) => {
|
|
@@ -4142,10 +4102,10 @@ class CourierInboxHeader extends CourierElement {
|
|
|
4142
4102
|
},
|
|
4143
4103
|
{
|
|
4144
4104
|
id: "archiveAll",
|
|
4145
|
-
text: (
|
|
4105
|
+
text: ((_i = actionMenu == null ? void 0 : actionMenu.archiveAll) == null ? void 0 : _i.text) ?? "Archive All",
|
|
4146
4106
|
icon: {
|
|
4147
|
-
color: (
|
|
4148
|
-
svg: (
|
|
4107
|
+
color: ((_k = (_j = actionMenu == null ? void 0 : actionMenu.archiveAll) == null ? void 0 : _j.icon) == null ? void 0 : _k.color) ?? "red",
|
|
4108
|
+
svg: ((_m = (_l = actionMenu == null ? void 0 : actionMenu.archiveAll) == null ? void 0 : _l.icon) == null ? void 0 : _m.svg) ?? CourierIconSVGs.archive
|
|
4149
4109
|
},
|
|
4150
4110
|
selectionIcon: null,
|
|
4151
4111
|
onClick: (_) => {
|
|
@@ -4154,10 +4114,10 @@ class CourierInboxHeader extends CourierElement {
|
|
|
4154
4114
|
},
|
|
4155
4115
|
{
|
|
4156
4116
|
id: "archiveRead",
|
|
4157
|
-
text: (
|
|
4117
|
+
text: ((_n = actionMenu == null ? void 0 : actionMenu.archiveRead) == null ? void 0 : _n.text) ?? "Archive Read",
|
|
4158
4118
|
icon: {
|
|
4159
|
-
color: (
|
|
4160
|
-
svg: (
|
|
4119
|
+
color: ((_p = (_o = actionMenu == null ? void 0 : actionMenu.archiveRead) == null ? void 0 : _o.icon) == null ? void 0 : _p.color) ?? "red",
|
|
4120
|
+
svg: ((_r = (_q = actionMenu == null ? void 0 : actionMenu.archiveRead) == null ? void 0 : _q.icon) == null ? void 0 : _r.svg) ?? CourierIconSVGs.archive
|
|
4161
4121
|
},
|
|
4162
4122
|
selectionIcon: null,
|
|
4163
4123
|
onClick: (_) => {
|
|
@@ -4170,13 +4130,12 @@ class CourierInboxHeader extends CourierElement {
|
|
|
4170
4130
|
return ["icon", "title", "feed-type"];
|
|
4171
4131
|
}
|
|
4172
4132
|
refreshTheme() {
|
|
4173
|
-
var _a2, _b2;
|
|
4174
4133
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4175
4134
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
4176
4135
|
const header = (_a = this.shadow) == null ? void 0 : _a.querySelector(".courier-inbox-header");
|
|
4177
4136
|
if (header) {
|
|
4178
|
-
header.style.backgroundColor = (
|
|
4179
|
-
header.style.boxShadow = (
|
|
4137
|
+
header.style.backgroundColor = ((_c = (_b = theme2.inbox) == null ? void 0 : _b.header) == null ? void 0 : _c.backgroundColor) ?? CourierColors.white[500];
|
|
4138
|
+
header.style.boxShadow = ((_e = (_d = theme2.inbox) == null ? void 0 : _d.header) == null ? void 0 : _e.shadow) ?? `0px 1px 0px 0px ${CourierColors.gray[500]}`;
|
|
4180
4139
|
}
|
|
4181
4140
|
(_f = this._filterMenu) == null ? void 0 : _f.setOptions(this.getFilterOptions());
|
|
4182
4141
|
(_g = this._actionMenu) == null ? void 0 : _g.setOptions(this.getActionOptions());
|
|
@@ -5070,7 +5029,7 @@ let CourierInbox$1 = class CourierInbox extends BaseElement {
|
|
|
5070
5029
|
height: "768px"
|
|
5071
5030
|
});
|
|
5072
5031
|
this._shadow = this.attachShadow({ mode: "open" });
|
|
5073
|
-
this._themeManager = themeManager
|
|
5032
|
+
this._themeManager = themeManager ?? new CourierInboxThemeManager(defaultLightTheme);
|
|
5074
5033
|
this._header = new CourierInboxHeader({
|
|
5075
5034
|
themeManager: this._themeManager,
|
|
5076
5035
|
onFeedTypeChange: (feedType) => {
|
|
@@ -5398,14 +5357,13 @@ class CourierInboxMenuButton extends CourierElement {
|
|
|
5398
5357
|
this.updateTheme();
|
|
5399
5358
|
}
|
|
5400
5359
|
updateTheme() {
|
|
5401
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
5402
5360
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
5403
5361
|
const theme2 = this._themeSubscription.manager.getTheme();
|
|
5404
|
-
(_d = this._triggerButton) == null ? void 0 : _d.updateIconColor((
|
|
5405
|
-
(_h = this._triggerButton) == null ? void 0 : _h.updateIconSVG((
|
|
5406
|
-
(_k = this._triggerButton) == null ? void 0 : _k.updateBackgroundColor((
|
|
5407
|
-
(_n = this._triggerButton) == null ? void 0 : _n.updateHoverBackgroundColor((
|
|
5408
|
-
(_q = this._triggerButton) == null ? void 0 : _q.updateActiveBackgroundColor((
|
|
5362
|
+
(_d = this._triggerButton) == null ? void 0 : _d.updateIconColor(((_c = (_b = (_a = theme2 == null ? void 0 : theme2.popup) == null ? void 0 : _a.button) == null ? void 0 : _b.icon) == null ? void 0 : _c.color) ?? CourierColors.black[500]);
|
|
5363
|
+
(_h = this._triggerButton) == null ? void 0 : _h.updateIconSVG(((_g = (_f = (_e = theme2 == null ? void 0 : theme2.popup) == null ? void 0 : _e.button) == null ? void 0 : _f.icon) == null ? void 0 : _g.svg) ?? CourierIconSVGs.inbox);
|
|
5364
|
+
(_k = this._triggerButton) == null ? void 0 : _k.updateBackgroundColor(((_j = (_i = theme2 == null ? void 0 : theme2.popup) == null ? void 0 : _i.button) == null ? void 0 : _j.backgroundColor) ?? "transparent");
|
|
5365
|
+
(_n = this._triggerButton) == null ? void 0 : _n.updateHoverBackgroundColor(((_m = (_l = theme2 == null ? void 0 : theme2.popup) == null ? void 0 : _l.button) == null ? void 0 : _m.hoverBackgroundColor) ?? CourierColors.black[50010]);
|
|
5366
|
+
(_q = this._triggerButton) == null ? void 0 : _q.updateActiveBackgroundColor(((_p = (_o = theme2 == null ? void 0 : theme2.popup) == null ? void 0 : _o.button) == null ? void 0 : _p.activeBackgroundColor) ?? CourierColors.black[50020]);
|
|
5409
5367
|
(_r = this._unreadCountBadge) == null ? void 0 : _r.refreshTheme("button");
|
|
5410
5368
|
}
|
|
5411
5369
|
disconnectedCallback() {
|
|
@@ -5468,7 +5426,6 @@ let CourierInboxPopupMenu$1 = class CourierInboxPopupMenu extends BaseElement {
|
|
|
5468
5426
|
this._style.textContent = this.getStyles();
|
|
5469
5427
|
}
|
|
5470
5428
|
getStyles() {
|
|
5471
|
-
var _a2, _b2, _c2, _d2;
|
|
5472
5429
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5473
5430
|
return `
|
|
5474
5431
|
:host {
|
|
@@ -5484,10 +5441,10 @@ let CourierInboxPopupMenu$1 = class CourierInboxPopupMenu extends BaseElement {
|
|
|
5484
5441
|
.popup {
|
|
5485
5442
|
display: none;
|
|
5486
5443
|
position: absolute;
|
|
5487
|
-
background: ${(
|
|
5488
|
-
border-radius: ${(
|
|
5489
|
-
border: ${(
|
|
5490
|
-
box-shadow: ${(
|
|
5444
|
+
background: ${((_b = (_a = this.theme.popup) == null ? void 0 : _a.window) == null ? void 0 : _b.backgroundColor) ?? "red"};
|
|
5445
|
+
border-radius: ${((_d = (_c = this.theme.popup) == null ? void 0 : _c.window) == null ? void 0 : _d.borderRadius) ?? "8px"};
|
|
5446
|
+
border: ${((_f = (_e = this.theme.popup) == null ? void 0 : _e.window) == null ? void 0 : _f.border) ?? `1px solid red`};
|
|
5447
|
+
box-shadow: ${((_h = (_g = this.theme.popup) == null ? void 0 : _g.window) == null ? void 0 : _h.shadow) ?? `0px 8px 16px -4px red`};
|
|
5491
5448
|
z-index: 1000;
|
|
5492
5449
|
width: ${this._width};
|
|
5493
5450
|
height: ${this._height};
|
|
@@ -5837,284 +5794,12 @@ function requireReactJsxRuntime_production() {
|
|
|
5837
5794
|
reactJsxRuntime_production.jsxs = jsxProd;
|
|
5838
5795
|
return reactJsxRuntime_production;
|
|
5839
5796
|
}
|
|
5840
|
-
var reactJsxRuntime_development = {};
|
|
5841
|
-
/**
|
|
5842
|
-
* @license React
|
|
5843
|
-
* react-jsx-runtime.development.js
|
|
5844
|
-
*
|
|
5845
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5846
|
-
*
|
|
5847
|
-
* This source code is licensed under the MIT license found in the
|
|
5848
|
-
* LICENSE file in the root directory of this source tree.
|
|
5849
|
-
*/
|
|
5850
|
-
var hasRequiredReactJsxRuntime_development;
|
|
5851
|
-
function requireReactJsxRuntime_development() {
|
|
5852
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
5853
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
5854
|
-
"production" !== process.env.NODE_ENV && function() {
|
|
5855
|
-
function getComponentNameFromType(type) {
|
|
5856
|
-
if (null == type) return null;
|
|
5857
|
-
if ("function" === typeof type)
|
|
5858
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
5859
|
-
if ("string" === typeof type) return type;
|
|
5860
|
-
switch (type) {
|
|
5861
|
-
case REACT_FRAGMENT_TYPE:
|
|
5862
|
-
return "Fragment";
|
|
5863
|
-
case REACT_PROFILER_TYPE:
|
|
5864
|
-
return "Profiler";
|
|
5865
|
-
case REACT_STRICT_MODE_TYPE:
|
|
5866
|
-
return "StrictMode";
|
|
5867
|
-
case REACT_SUSPENSE_TYPE:
|
|
5868
|
-
return "Suspense";
|
|
5869
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
5870
|
-
return "SuspenseList";
|
|
5871
|
-
case REACT_ACTIVITY_TYPE:
|
|
5872
|
-
return "Activity";
|
|
5873
|
-
}
|
|
5874
|
-
if ("object" === typeof type)
|
|
5875
|
-
switch ("number" === typeof type.tag && console.error(
|
|
5876
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
5877
|
-
), type.$$typeof) {
|
|
5878
|
-
case REACT_PORTAL_TYPE:
|
|
5879
|
-
return "Portal";
|
|
5880
|
-
case REACT_CONTEXT_TYPE:
|
|
5881
|
-
return (type.displayName || "Context") + ".Provider";
|
|
5882
|
-
case REACT_CONSUMER_TYPE:
|
|
5883
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
5884
|
-
case REACT_FORWARD_REF_TYPE:
|
|
5885
|
-
var innerType = type.render;
|
|
5886
|
-
type = type.displayName;
|
|
5887
|
-
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
5888
|
-
return type;
|
|
5889
|
-
case REACT_MEMO_TYPE:
|
|
5890
|
-
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
5891
|
-
case REACT_LAZY_TYPE:
|
|
5892
|
-
innerType = type._payload;
|
|
5893
|
-
type = type._init;
|
|
5894
|
-
try {
|
|
5895
|
-
return getComponentNameFromType(type(innerType));
|
|
5896
|
-
} catch (x) {
|
|
5897
|
-
}
|
|
5898
|
-
}
|
|
5899
|
-
return null;
|
|
5900
|
-
}
|
|
5901
|
-
function testStringCoercion(value) {
|
|
5902
|
-
return "" + value;
|
|
5903
|
-
}
|
|
5904
|
-
function checkKeyStringCoercion(value) {
|
|
5905
|
-
try {
|
|
5906
|
-
testStringCoercion(value);
|
|
5907
|
-
var JSCompiler_inline_result = false;
|
|
5908
|
-
} catch (e) {
|
|
5909
|
-
JSCompiler_inline_result = true;
|
|
5910
|
-
}
|
|
5911
|
-
if (JSCompiler_inline_result) {
|
|
5912
|
-
JSCompiler_inline_result = console;
|
|
5913
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
5914
|
-
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
5915
|
-
JSCompiler_temp_const.call(
|
|
5916
|
-
JSCompiler_inline_result,
|
|
5917
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
5918
|
-
JSCompiler_inline_result$jscomp$0
|
|
5919
|
-
);
|
|
5920
|
-
return testStringCoercion(value);
|
|
5921
|
-
}
|
|
5922
|
-
}
|
|
5923
|
-
function getTaskName(type) {
|
|
5924
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
5925
|
-
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
5926
|
-
return "<...>";
|
|
5927
|
-
try {
|
|
5928
|
-
var name = getComponentNameFromType(type);
|
|
5929
|
-
return name ? "<" + name + ">" : "<...>";
|
|
5930
|
-
} catch (x) {
|
|
5931
|
-
return "<...>";
|
|
5932
|
-
}
|
|
5933
|
-
}
|
|
5934
|
-
function getOwner() {
|
|
5935
|
-
var dispatcher = ReactSharedInternals.A;
|
|
5936
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
5937
|
-
}
|
|
5938
|
-
function UnknownOwner() {
|
|
5939
|
-
return Error("react-stack-top-frame");
|
|
5940
|
-
}
|
|
5941
|
-
function hasValidKey(config) {
|
|
5942
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
5943
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
5944
|
-
if (getter && getter.isReactWarning) return false;
|
|
5945
|
-
}
|
|
5946
|
-
return void 0 !== config.key;
|
|
5947
|
-
}
|
|
5948
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
5949
|
-
function warnAboutAccessingKey() {
|
|
5950
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
5951
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
5952
|
-
displayName
|
|
5953
|
-
));
|
|
5954
|
-
}
|
|
5955
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
5956
|
-
Object.defineProperty(props, "key", {
|
|
5957
|
-
get: warnAboutAccessingKey,
|
|
5958
|
-
configurable: true
|
|
5959
|
-
});
|
|
5960
|
-
}
|
|
5961
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
5962
|
-
var componentName = getComponentNameFromType(this.type);
|
|
5963
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
5964
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
5965
|
-
));
|
|
5966
|
-
componentName = this.props.ref;
|
|
5967
|
-
return void 0 !== componentName ? componentName : null;
|
|
5968
|
-
}
|
|
5969
|
-
function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
|
|
5970
|
-
self = props.ref;
|
|
5971
|
-
type = {
|
|
5972
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
5973
|
-
type,
|
|
5974
|
-
key,
|
|
5975
|
-
props,
|
|
5976
|
-
_owner: owner
|
|
5977
|
-
};
|
|
5978
|
-
null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
|
|
5979
|
-
enumerable: false,
|
|
5980
|
-
get: elementRefGetterWithDeprecationWarning
|
|
5981
|
-
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
5982
|
-
type._store = {};
|
|
5983
|
-
Object.defineProperty(type._store, "validated", {
|
|
5984
|
-
configurable: false,
|
|
5985
|
-
enumerable: false,
|
|
5986
|
-
writable: true,
|
|
5987
|
-
value: 0
|
|
5988
|
-
});
|
|
5989
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
5990
|
-
configurable: false,
|
|
5991
|
-
enumerable: false,
|
|
5992
|
-
writable: true,
|
|
5993
|
-
value: null
|
|
5994
|
-
});
|
|
5995
|
-
Object.defineProperty(type, "_debugStack", {
|
|
5996
|
-
configurable: false,
|
|
5997
|
-
enumerable: false,
|
|
5998
|
-
writable: true,
|
|
5999
|
-
value: debugStack
|
|
6000
|
-
});
|
|
6001
|
-
Object.defineProperty(type, "_debugTask", {
|
|
6002
|
-
configurable: false,
|
|
6003
|
-
enumerable: false,
|
|
6004
|
-
writable: true,
|
|
6005
|
-
value: debugTask
|
|
6006
|
-
});
|
|
6007
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
6008
|
-
return type;
|
|
6009
|
-
}
|
|
6010
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
|
|
6011
|
-
var children = config.children;
|
|
6012
|
-
if (void 0 !== children)
|
|
6013
|
-
if (isStaticChildren)
|
|
6014
|
-
if (isArrayImpl(children)) {
|
|
6015
|
-
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
|
|
6016
|
-
validateChildKeys(children[isStaticChildren]);
|
|
6017
|
-
Object.freeze && Object.freeze(children);
|
|
6018
|
-
} else
|
|
6019
|
-
console.error(
|
|
6020
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
6021
|
-
);
|
|
6022
|
-
else validateChildKeys(children);
|
|
6023
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
6024
|
-
children = getComponentNameFromType(type);
|
|
6025
|
-
var keys = Object.keys(config).filter(function(k) {
|
|
6026
|
-
return "key" !== k;
|
|
6027
|
-
});
|
|
6028
|
-
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
6029
|
-
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
6030
|
-
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
6031
|
-
isStaticChildren,
|
|
6032
|
-
children,
|
|
6033
|
-
keys,
|
|
6034
|
-
children
|
|
6035
|
-
), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
6036
|
-
}
|
|
6037
|
-
children = null;
|
|
6038
|
-
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
6039
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
6040
|
-
if ("key" in config) {
|
|
6041
|
-
maybeKey = {};
|
|
6042
|
-
for (var propName in config)
|
|
6043
|
-
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
6044
|
-
} else maybeKey = config;
|
|
6045
|
-
children && defineKeyPropWarningGetter(
|
|
6046
|
-
maybeKey,
|
|
6047
|
-
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
6048
|
-
);
|
|
6049
|
-
return ReactElement(
|
|
6050
|
-
type,
|
|
6051
|
-
children,
|
|
6052
|
-
self,
|
|
6053
|
-
source,
|
|
6054
|
-
getOwner(),
|
|
6055
|
-
maybeKey,
|
|
6056
|
-
debugStack,
|
|
6057
|
-
debugTask
|
|
6058
|
-
);
|
|
6059
|
-
}
|
|
6060
|
-
function validateChildKeys(node) {
|
|
6061
|
-
"object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
|
|
6062
|
-
}
|
|
6063
|
-
var React$1 = React, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
6064
|
-
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
6065
|
-
return null;
|
|
6066
|
-
};
|
|
6067
|
-
React$1 = {
|
|
6068
|
-
"react-stack-bottom-frame": function(callStackForError) {
|
|
6069
|
-
return callStackForError();
|
|
6070
|
-
}
|
|
6071
|
-
};
|
|
6072
|
-
var specialPropKeyWarningShown;
|
|
6073
|
-
var didWarnAboutElementRef = {};
|
|
6074
|
-
var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
|
|
6075
|
-
React$1,
|
|
6076
|
-
UnknownOwner
|
|
6077
|
-
)();
|
|
6078
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
6079
|
-
var didWarnAboutKeySpread = {};
|
|
6080
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
6081
|
-
reactJsxRuntime_development.jsx = function(type, config, maybeKey, source, self) {
|
|
6082
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
6083
|
-
return jsxDEVImpl(
|
|
6084
|
-
type,
|
|
6085
|
-
config,
|
|
6086
|
-
maybeKey,
|
|
6087
|
-
false,
|
|
6088
|
-
source,
|
|
6089
|
-
self,
|
|
6090
|
-
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
6091
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
6092
|
-
);
|
|
6093
|
-
};
|
|
6094
|
-
reactJsxRuntime_development.jsxs = function(type, config, maybeKey, source, self) {
|
|
6095
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
6096
|
-
return jsxDEVImpl(
|
|
6097
|
-
type,
|
|
6098
|
-
config,
|
|
6099
|
-
maybeKey,
|
|
6100
|
-
true,
|
|
6101
|
-
source,
|
|
6102
|
-
self,
|
|
6103
|
-
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
6104
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
6105
|
-
);
|
|
6106
|
-
};
|
|
6107
|
-
}();
|
|
6108
|
-
return reactJsxRuntime_development;
|
|
6109
|
-
}
|
|
6110
5797
|
var hasRequiredJsxRuntime;
|
|
6111
5798
|
function requireJsxRuntime() {
|
|
6112
5799
|
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
6113
5800
|
hasRequiredJsxRuntime = 1;
|
|
6114
|
-
|
|
5801
|
+
{
|
|
6115
5802
|
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
6116
|
-
} else {
|
|
6117
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
6118
5803
|
}
|
|
6119
5804
|
return jsxRuntime.exports;
|
|
6120
5805
|
}
|