@novu/js 2.6.6 → 3.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chunk-Z4XIR64I.js → chunk-MCK3RKPK.js} +308 -281
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +14 -14
- package/dist/{esm/novu-DbpFmjhC.d.mts → cjs/novu-C2hAbM3b.d.ts} +20 -4
- package/dist/cjs/themes/index.d.ts +2 -2
- package/dist/cjs/themes/index.js +4 -3
- package/dist/cjs/types-CKkldJh0.d.ts +102 -0
- package/dist/cjs/ui/index.d.ts +22 -9
- package/dist/cjs/ui/index.js +1359 -843
- package/dist/esm/{chunk-JJC36NOH.mjs → chunk-B2OUPMZV.mjs} +308 -281
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/{cjs/novu-DbpFmjhC.d.ts → esm/novu-C2hAbM3b.d.mts} +20 -4
- package/dist/esm/themes/index.d.mts +2 -2
- package/dist/esm/themes/index.mjs +4 -3
- package/dist/esm/types-Bi5NkU2g.d.mts +102 -0
- package/dist/esm/ui/index.d.mts +22 -9
- package/dist/esm/ui/index.mjs +1358 -842
- package/dist/index.css +1 -1
- package/dist/novu.min.js +10 -10
- package/dist/novu.min.js.gz +0 -0
- package/package.json +19 -19
- package/dist/cjs/types-B8jOWXQS.d.ts +0 -98
- package/dist/esm/types-DVZXB5KI.d.mts +0 -98
package/dist/esm/ui/index.mjs
CHANGED
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
import { Novu, isSameFilter } from '../chunk-
|
|
1
|
+
import { Novu, isSameFilter } from '../chunk-B2OUPMZV.mjs';
|
|
2
2
|
import { parseMarkdownIntoTokens } from '../chunk-GPV65U5R.mjs';
|
|
3
3
|
import { __privateAdd, __privateSet, __privateMethod, __privateGet, __spreadProps, __spreadValues, __objRest, __async } from '../chunk-STZMOEWR.mjs';
|
|
4
|
-
import { delegateEvents, createComponent, mergeProps, render, Portal, spread, template, insert, memo, effect, className, use, setAttribute,
|
|
5
|
-
import { createSignal, createContext, useContext, onMount, onCleanup, For, createMemo, createEffect, splitProps, Show, Switch as Switch$1, Match, createResource,
|
|
4
|
+
import { delegateEvents, createComponent, mergeProps, render, Portal, spread, template, insert, memo, effect, className, use, setAttribute, Dynamic } from 'solid-js/web';
|
|
5
|
+
import { createSignal, createContext, useContext, onMount, onCleanup, For, createMemo, createEffect, splitProps, Show, Switch as Switch$1, Match, createResource, batch } from 'solid-js';
|
|
6
6
|
import { createStore } from 'solid-js/store';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
|
-
import { Motion as Motion$1, Presence } from 'solid-motionone';
|
|
11
10
|
import { autoUpdate, offset, flip, shift } from '@floating-ui/dom';
|
|
12
11
|
import { useFloating } from 'solid-floating-ui';
|
|
12
|
+
import { Motion as Motion$1 } from 'solid-motionone';
|
|
13
13
|
|
|
14
|
-
// src/ui/config/defaultVariables.ts
|
|
15
|
-
var defaultVariables = {
|
|
16
|
-
colorPrimary: "#0081F1",
|
|
17
|
-
colorPrimaryForeground: "white",
|
|
18
|
-
colorSecondary: "#F3F3F3",
|
|
19
|
-
colorSecondaryForeground: "#1A1523",
|
|
20
|
-
colorCounter: "#E5484D",
|
|
21
|
-
colorCounterForeground: "white",
|
|
22
|
-
colorBackground: "#FCFCFC",
|
|
23
|
-
colorForeground: "#1A1523",
|
|
24
|
-
colorNeutral: "#525252",
|
|
25
|
-
colorShadow: "rgba(122,133,153,0.25)",
|
|
26
|
-
fontSize: "inherit",
|
|
27
|
-
borderRadius: "0.375rem"
|
|
28
|
-
};
|
|
29
14
|
var defaultLocalization = {
|
|
30
15
|
locale: "en-US",
|
|
31
16
|
"inbox.filters.dropdownOptions.unread": "Unread only",
|
|
@@ -34,7 +19,7 @@ var defaultLocalization = {
|
|
|
34
19
|
"inbox.filters.labels.unread": "Unread",
|
|
35
20
|
"inbox.filters.labels.default": "Inbox",
|
|
36
21
|
"inbox.filters.labels.archived": "Archived",
|
|
37
|
-
"notifications.emptyNotice": "
|
|
22
|
+
"notifications.emptyNotice": "Quiet for now. Check back later.",
|
|
38
23
|
"notifications.actions.readAll": "Mark all as read",
|
|
39
24
|
"notifications.actions.archiveAll": "Archive all",
|
|
40
25
|
"notifications.actions.archiveRead": "Archive read",
|
|
@@ -43,17 +28,64 @@ var defaultLocalization = {
|
|
|
43
28
|
"notification.actions.unread.tooltip": "Mark as unread",
|
|
44
29
|
"notification.actions.archive.tooltip": "Archive",
|
|
45
30
|
"notification.actions.unarchive.tooltip": "Unarchive",
|
|
46
|
-
"preferences.title": "
|
|
31
|
+
"preferences.title": "Preferences",
|
|
32
|
+
"preferences.emptyNotice": "No notification specific preferences yet.",
|
|
47
33
|
"preferences.global": "Global Preferences",
|
|
48
34
|
"preferences.workflow.disabled.notice": "Contact admin to enable subscription management for this critical notification.",
|
|
49
35
|
"preferences.workflow.disabled.tooltip": "Contact admin to edit"
|
|
50
36
|
};
|
|
51
37
|
var [dynamicLocalization, setDynamicLocalization] = createSignal({});
|
|
52
38
|
|
|
39
|
+
// src/ui/context/LocalizationContext.tsx
|
|
40
|
+
var LocalizationContext = createContext(void 0);
|
|
41
|
+
var LocalizationProvider = (props) => {
|
|
42
|
+
const localization = createMemo(() => {
|
|
43
|
+
const _a = props.localization || {}, {
|
|
44
|
+
dynamic
|
|
45
|
+
} = _a, localizationObject = __objRest(_a, [
|
|
46
|
+
"dynamic"
|
|
47
|
+
]);
|
|
48
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, defaultLocalization), dynamicLocalization()), dynamic || {}), localizationObject);
|
|
49
|
+
});
|
|
50
|
+
const t = (key, ...args) => {
|
|
51
|
+
const value = localization()[key];
|
|
52
|
+
if (typeof value === "function") {
|
|
53
|
+
return value(args[0]);
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
};
|
|
57
|
+
const locale = createMemo(() => localization().locale);
|
|
58
|
+
return createComponent(LocalizationContext.Provider, {
|
|
59
|
+
value: {
|
|
60
|
+
t,
|
|
61
|
+
locale
|
|
62
|
+
},
|
|
63
|
+
get children() {
|
|
64
|
+
return props.children;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
function useLocalization() {
|
|
69
|
+
const context = useContext(LocalizationContext);
|
|
70
|
+
if (!context) {
|
|
71
|
+
throw new Error("useLocalization must be used within an LocalizationProvider");
|
|
72
|
+
}
|
|
73
|
+
return context;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/ui/types.ts
|
|
77
|
+
var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
|
|
78
|
+
NotificationStatus2["UNREAD_READ"] = "unreadRead";
|
|
79
|
+
NotificationStatus2["UNREAD"] = "unread";
|
|
80
|
+
NotificationStatus2["ARCHIVED"] = "archived";
|
|
81
|
+
return NotificationStatus2;
|
|
82
|
+
})(NotificationStatus || {});
|
|
83
|
+
|
|
53
84
|
// src/ui/config/appearanceKeys.ts
|
|
54
85
|
var appearanceKeys = [
|
|
55
86
|
// Primitives
|
|
56
87
|
"button",
|
|
88
|
+
"icon",
|
|
57
89
|
"popoverContent",
|
|
58
90
|
"popoverTrigger",
|
|
59
91
|
"dropdownContent",
|
|
@@ -61,13 +93,17 @@ var appearanceKeys = [
|
|
|
61
93
|
"dropdownItem",
|
|
62
94
|
"dropdownItemLabel",
|
|
63
95
|
"dropdownItemLabelContainer",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
96
|
+
"dropdownItemLeft__icon",
|
|
97
|
+
"dropdownItemRight__icon",
|
|
98
|
+
"dropdownItem__icon",
|
|
99
|
+
"collapsible",
|
|
66
100
|
"tooltipContent",
|
|
67
101
|
"tooltipTrigger",
|
|
68
102
|
"back__button",
|
|
69
103
|
"skeletonText",
|
|
70
104
|
"skeletonAvatar",
|
|
105
|
+
"skeletonSwitch",
|
|
106
|
+
"skeletonSwitchThumb",
|
|
71
107
|
"tabsRoot",
|
|
72
108
|
"tabsList",
|
|
73
109
|
"tabsContent",
|
|
@@ -90,10 +126,18 @@ var appearanceKeys = [
|
|
|
90
126
|
"notificationListContainer",
|
|
91
127
|
"notificationList",
|
|
92
128
|
"notificationListEmptyNoticeContainer",
|
|
93
|
-
"
|
|
129
|
+
"notificationListEmptyNoticeOverlay",
|
|
94
130
|
"notificationListEmptyNoticeIcon",
|
|
131
|
+
"notificationListEmptyNotice",
|
|
132
|
+
"notificationList__skeleton",
|
|
133
|
+
"notificationList__skeletonContent",
|
|
134
|
+
"notificationList__skeletonItem",
|
|
135
|
+
"notificationList__skeletonAvatar",
|
|
136
|
+
"notificationList__skeletonText",
|
|
95
137
|
"notificationListNewNotificationsNotice__button",
|
|
96
138
|
"notification",
|
|
139
|
+
"notificationContent",
|
|
140
|
+
"notificationTextContainer",
|
|
97
141
|
"notificationDot",
|
|
98
142
|
"notificationSubject",
|
|
99
143
|
"notificationSubject__strong",
|
|
@@ -101,7 +145,9 @@ var appearanceKeys = [
|
|
|
101
145
|
"notificationBody__strong",
|
|
102
146
|
"notificationBodyContainer",
|
|
103
147
|
"notificationImage",
|
|
148
|
+
"notificationImageLoadingFallback",
|
|
104
149
|
"notificationDate",
|
|
150
|
+
"notificationDateActionsContainer",
|
|
105
151
|
"notificationDefaultActions",
|
|
106
152
|
"notificationCustomActions",
|
|
107
153
|
"notificationPrimaryAction__button",
|
|
@@ -110,6 +156,10 @@ var appearanceKeys = [
|
|
|
110
156
|
"notificationUnread__button",
|
|
111
157
|
"notificationArchive__button",
|
|
112
158
|
"notificationUnarchive__button",
|
|
159
|
+
"notificationRead__icon",
|
|
160
|
+
"notificationUnread__icon",
|
|
161
|
+
"notificationArchive__icon",
|
|
162
|
+
"notificationUnarchive__icon",
|
|
113
163
|
// Notifications tabs
|
|
114
164
|
"notificationsTabs__tabsRoot",
|
|
115
165
|
"notificationsTabs__tabsList",
|
|
@@ -126,6 +176,8 @@ var appearanceKeys = [
|
|
|
126
176
|
"inboxStatus__dropdownItemLabelContainer",
|
|
127
177
|
"inboxStatus__dropdownItemLeft__icon",
|
|
128
178
|
"inboxStatus__dropdownItemRight__icon",
|
|
179
|
+
"inboxStatus__dropdownItem__icon",
|
|
180
|
+
"inboxStatus__dropdownItemCheck__icon",
|
|
129
181
|
// More actions
|
|
130
182
|
"moreActionsContainer",
|
|
131
183
|
"moreActions__dropdownTrigger",
|
|
@@ -136,7 +188,7 @@ var appearanceKeys = [
|
|
|
136
188
|
"moreActions__dots",
|
|
137
189
|
// More tabs
|
|
138
190
|
"moreTabs__button",
|
|
139
|
-
"
|
|
191
|
+
"moreTabs__icon",
|
|
140
192
|
"moreTabs__dropdownTrigger",
|
|
141
193
|
"moreTabs__dropdownContent",
|
|
142
194
|
"moreTabs__dropdownItem",
|
|
@@ -151,13 +203,15 @@ var appearanceKeys = [
|
|
|
151
203
|
"workflowLabelDisabled__icon",
|
|
152
204
|
"workflowContainerRight__icon",
|
|
153
205
|
"workflowArrow__icon",
|
|
206
|
+
"workflowDescription",
|
|
154
207
|
// channel
|
|
155
208
|
"channelContainer",
|
|
209
|
+
"channelIconContainer",
|
|
210
|
+
"channel__icon",
|
|
156
211
|
"channelsContainerCollapsible",
|
|
157
212
|
"channelsContainer",
|
|
158
213
|
"channelLabel",
|
|
159
214
|
"channelLabelContainer",
|
|
160
|
-
"channelDescription",
|
|
161
215
|
"channelName",
|
|
162
216
|
"channelSwitchContainer",
|
|
163
217
|
"channelSwitch",
|
|
@@ -165,47 +219,133 @@ var appearanceKeys = [
|
|
|
165
219
|
// Preferences Header
|
|
166
220
|
"preferencesHeader",
|
|
167
221
|
"preferencesHeader__back__button",
|
|
222
|
+
"preferencesHeader__back__button__icon",
|
|
168
223
|
"preferencesHeader__title",
|
|
224
|
+
"preferencesHeader__icon",
|
|
169
225
|
// Preferences Loading
|
|
170
|
-
"
|
|
226
|
+
"preferencesListEmptyNoticeContainer",
|
|
227
|
+
"preferencesListEmptyNotice",
|
|
228
|
+
"preferencesList__skeleton",
|
|
229
|
+
"preferencesList__skeletonContent",
|
|
230
|
+
"preferencesList__skeletonItem",
|
|
231
|
+
"preferencesList__skeletonIcon",
|
|
232
|
+
"preferencesList__skeletonSwitch",
|
|
233
|
+
"preferencesList__skeletonSwitchThumb",
|
|
234
|
+
"preferencesList__skeletonText",
|
|
171
235
|
// Text formatting
|
|
172
236
|
"strong"
|
|
173
237
|
];
|
|
174
|
-
|
|
238
|
+
|
|
239
|
+
// src/ui/config/defaultVariables.ts
|
|
240
|
+
var defaultVariables = {
|
|
241
|
+
colorPrimary: "#7D52F4",
|
|
242
|
+
colorPrimaryForeground: "white",
|
|
243
|
+
colorSecondary: "#FFFFFF",
|
|
244
|
+
colorSecondaryForeground: "#646464",
|
|
245
|
+
colorCounter: "#FB3748",
|
|
246
|
+
colorCounterForeground: "white",
|
|
247
|
+
colorBackground: "#FCFCFC",
|
|
248
|
+
colorRing: "#E1E4EA",
|
|
249
|
+
colorForeground: "#1A1523",
|
|
250
|
+
colorNeutral: "#525252",
|
|
251
|
+
colorShadow: "rgb(0,0,0)",
|
|
252
|
+
fontSize: "1rem",
|
|
253
|
+
borderRadius: "0.375rem"
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// src/ui/helpers/constants.ts
|
|
257
|
+
var DEFAULT_TARGET = "_blank";
|
|
258
|
+
var DEFAULT_REFERRER = "noopener noreferrer";
|
|
259
|
+
function createInfiniteScroll(fetcher, options) {
|
|
175
260
|
const [data, setData] = createSignal([]);
|
|
176
261
|
const [initialLoading, setInitialLoading] = createSignal(true);
|
|
177
|
-
const [
|
|
262
|
+
const [after, setAfter] = createSignal(void 0);
|
|
178
263
|
const [end, setEnd] = createSignal(false);
|
|
179
|
-
const [contents, { mutate, refetch }] = createResource(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
264
|
+
const [contents, { mutate, refetch }] = createResource(
|
|
265
|
+
() => ({ trigger: true, after: after() }),
|
|
266
|
+
(params) => fetcher(params.after)
|
|
267
|
+
);
|
|
268
|
+
let observedElement = null;
|
|
269
|
+
let io = null;
|
|
270
|
+
onMount(() => {
|
|
271
|
+
io = new IntersectionObserver(
|
|
272
|
+
(entries) => {
|
|
273
|
+
var _a;
|
|
274
|
+
const entry = entries[0];
|
|
275
|
+
if (entry && entry.isIntersecting && !end() && !contents.loading) {
|
|
276
|
+
const data2 = (_a = contents.latest) == null ? void 0 : _a.data;
|
|
277
|
+
if (data2) {
|
|
278
|
+
setAfter(data2[data2.length - 1][options.paginationField]);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
threshold: 0.1
|
|
186
284
|
}
|
|
285
|
+
);
|
|
286
|
+
if (observedElement && io) {
|
|
287
|
+
io.observe(observedElement);
|
|
288
|
+
}
|
|
289
|
+
onCleanup(() => {
|
|
290
|
+
io == null ? void 0 : io.disconnect();
|
|
291
|
+
io = null;
|
|
187
292
|
});
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
onCleanup(() => io.unobserve(el));
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
createComputed(() => {
|
|
293
|
+
});
|
|
294
|
+
createEffect(() => {
|
|
295
|
+
if (contents.loading) return;
|
|
195
296
|
const content = contents.latest;
|
|
196
297
|
if (!content) return;
|
|
197
298
|
setInitialLoading(false);
|
|
198
299
|
batch(() => {
|
|
199
300
|
if (!content.hasMore) setEnd(true);
|
|
200
301
|
setData(content.data);
|
|
302
|
+
requestAnimationFrame(() => {
|
|
303
|
+
checkVisibilityAndLoadMore();
|
|
304
|
+
});
|
|
201
305
|
});
|
|
202
306
|
});
|
|
307
|
+
const checkVisibilityAndLoadMore = () => {
|
|
308
|
+
if (observedElement && !end() && !contents.loading) {
|
|
309
|
+
const observer = new IntersectionObserver(
|
|
310
|
+
(entries) => {
|
|
311
|
+
var _a;
|
|
312
|
+
const entry = entries[0];
|
|
313
|
+
if (entry.isIntersecting) {
|
|
314
|
+
const data2 = (_a = contents.latest) == null ? void 0 : _a.data;
|
|
315
|
+
if (data2) {
|
|
316
|
+
setAfter(data2[data2.length - 1][options.paginationField]);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
observer.disconnect();
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
threshold: [0.1]
|
|
323
|
+
}
|
|
324
|
+
);
|
|
325
|
+
observer.observe(observedElement);
|
|
326
|
+
onCleanup(() => {
|
|
327
|
+
observer.disconnect();
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
const setEl = (el) => {
|
|
332
|
+
if (io && observedElement) {
|
|
333
|
+
io.unobserve(observedElement);
|
|
334
|
+
}
|
|
335
|
+
observedElement = el;
|
|
336
|
+
if (io && el) {
|
|
337
|
+
io.observe(el);
|
|
338
|
+
}
|
|
339
|
+
onCleanup(() => {
|
|
340
|
+
if (io && el) io.unobserve(el);
|
|
341
|
+
});
|
|
342
|
+
};
|
|
203
343
|
const reset = () => __async(this, null, function* () {
|
|
204
344
|
setData([]);
|
|
205
345
|
setInitialLoading(true);
|
|
206
346
|
setEnd(false);
|
|
207
|
-
if (
|
|
208
|
-
|
|
347
|
+
if (after() !== void 0) {
|
|
348
|
+
setAfter(void 0);
|
|
209
349
|
} else {
|
|
210
350
|
yield refetch();
|
|
211
351
|
}
|
|
@@ -215,7 +355,7 @@ function createInfiniteScroll(fetcher) {
|
|
|
215
355
|
{
|
|
216
356
|
initialLoading,
|
|
217
357
|
setEl,
|
|
218
|
-
|
|
358
|
+
after,
|
|
219
359
|
end,
|
|
220
360
|
mutate,
|
|
221
361
|
reset
|
|
@@ -255,6 +395,7 @@ function formatToRelativeTime({
|
|
|
255
395
|
var twMerge = extendTailwindMerge({
|
|
256
396
|
prefix: "nt-"
|
|
257
397
|
});
|
|
398
|
+
var publicFacingTwMerge = extendTailwindMerge({});
|
|
258
399
|
function cn(...inputs) {
|
|
259
400
|
return twMerge(clsx(inputs));
|
|
260
401
|
}
|
|
@@ -286,31 +427,105 @@ function createClassAndRuleFromCssString(classNameSet, styles) {
|
|
|
286
427
|
classNameSet.add(className);
|
|
287
428
|
return { className, rule };
|
|
288
429
|
}
|
|
289
|
-
var shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
430
|
+
var shades = [25, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
290
431
|
function generateDefaultColor(props) {
|
|
291
432
|
const cssVariableDefaultRule = `.${props.id} { --nv-${props.key}: oklch(from ${props.color} l c h); }`;
|
|
292
433
|
return cssVariableDefaultRule;
|
|
293
434
|
}
|
|
294
|
-
function
|
|
435
|
+
function generateSolidShadeRulesFromColor({ color, key, id }) {
|
|
295
436
|
const rules = [];
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
437
|
+
const adjustLightness = (factor) => {
|
|
438
|
+
if (factor >= 0) {
|
|
439
|
+
return `min(1, calc(l + ${factor} * (1 - l)))`;
|
|
440
|
+
} else {
|
|
441
|
+
return `max(0, calc(l * (1 + ${factor})))`;
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
const lightnessOffsets = {
|
|
445
|
+
25: adjustLightness(0.475),
|
|
446
|
+
50: adjustLightness(0.45),
|
|
447
|
+
100: adjustLightness(0.4),
|
|
448
|
+
200: adjustLightness(0.3),
|
|
449
|
+
300: adjustLightness(0.2),
|
|
450
|
+
400: adjustLightness(0.1),
|
|
451
|
+
500: "l",
|
|
452
|
+
600: adjustLightness(-0.1),
|
|
453
|
+
700: adjustLightness(-0.2),
|
|
454
|
+
800: adjustLightness(-0.3),
|
|
455
|
+
900: adjustLightness(-0.4)
|
|
456
|
+
};
|
|
457
|
+
shades.forEach((shade) => {
|
|
458
|
+
const newLightness = lightnessOffsets[shade];
|
|
459
|
+
const cssVariableRule = `.${id} { --nv-${key}-${shade}: oklch(from ${color} ${newLightness} c h); }`;
|
|
460
|
+
rules.push(cssVariableRule);
|
|
461
|
+
});
|
|
301
462
|
return rules;
|
|
302
463
|
}
|
|
303
|
-
function
|
|
464
|
+
function generateAlphaShadeRulesFromColor({ color, key, id }) {
|
|
304
465
|
const rules = [];
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
466
|
+
const alphaMap = {
|
|
467
|
+
25: 0.025,
|
|
468
|
+
50: 0.05,
|
|
469
|
+
100: 0.1,
|
|
470
|
+
200: 0.2,
|
|
471
|
+
300: 0.3,
|
|
472
|
+
400: 0.4,
|
|
473
|
+
500: 0.5,
|
|
474
|
+
600: 0.6,
|
|
475
|
+
700: 0.7,
|
|
476
|
+
800: 0.8,
|
|
477
|
+
900: 0.9
|
|
478
|
+
};
|
|
479
|
+
Object.entries(alphaMap).forEach(([shade, alpha]) => {
|
|
480
|
+
const cssVariableAlphaRule = `.${id} { --nv-${key}-${shade}: oklch(from ${color} l c h / ${alpha}); }`;
|
|
308
481
|
rules.push(cssVariableAlphaRule);
|
|
309
|
-
}
|
|
482
|
+
});
|
|
483
|
+
return rules;
|
|
484
|
+
}
|
|
485
|
+
function generateFontSizeRules(props) {
|
|
486
|
+
const { id, baseFontSize } = props;
|
|
487
|
+
const sizeRatios = {
|
|
488
|
+
xs: 0.65625,
|
|
489
|
+
sm: 0.765625,
|
|
490
|
+
base: 0.875,
|
|
491
|
+
lg: 0.984375,
|
|
492
|
+
xl: 1.09375,
|
|
493
|
+
"2xl": 1.3125,
|
|
494
|
+
"3xl": 1.640625,
|
|
495
|
+
"4xl": 1.96875
|
|
496
|
+
};
|
|
497
|
+
const rules = [];
|
|
498
|
+
Object.entries(sizeRatios).forEach(([key, ratio]) => {
|
|
499
|
+
const size = `calc(${baseFontSize} * ${ratio})`;
|
|
500
|
+
const lineHeight = `calc(${baseFontSize} * ${ratio} * 1.33)`;
|
|
501
|
+
const cssVariableRule = `.${id} { --nv-font-size-${key}: ${size}; --nv-line-height-${key}: ${lineHeight}; }`;
|
|
502
|
+
rules.push(cssVariableRule);
|
|
503
|
+
});
|
|
504
|
+
return rules;
|
|
505
|
+
}
|
|
506
|
+
function generateBorderRadiusRules(props) {
|
|
507
|
+
const { id, baseRadius } = props;
|
|
508
|
+
const radiusRatios = {
|
|
509
|
+
none: 0,
|
|
510
|
+
xs: 0.333,
|
|
511
|
+
sm: 0.667,
|
|
512
|
+
md: 1,
|
|
513
|
+
lg: 1.333,
|
|
514
|
+
xl: 2,
|
|
515
|
+
"2xl": 2.667,
|
|
516
|
+
"3xl": 4,
|
|
517
|
+
full: 9999
|
|
518
|
+
};
|
|
519
|
+
const rules = [];
|
|
520
|
+
Object.entries(radiusRatios).forEach(([key, ratio]) => {
|
|
521
|
+
const value = key === "none" ? "0px" : key === "full" ? "9999px" : `calc(${baseRadius} * ${ratio})`;
|
|
522
|
+
const cssVariableRule = `.${id} { --nv-radius-${key}: ${value}; }`;
|
|
523
|
+
rules.push(cssVariableRule);
|
|
524
|
+
});
|
|
310
525
|
return rules;
|
|
311
526
|
}
|
|
312
527
|
var parseVariables = (variables, id) => {
|
|
313
|
-
|
|
528
|
+
const rules = [
|
|
314
529
|
generateDefaultColor({ color: variables.colorBackground, key: "color-background", id }),
|
|
315
530
|
generateDefaultColor({ color: variables.colorForeground, key: "color-foreground", id }),
|
|
316
531
|
generateDefaultColor({ color: variables.colorPrimary, key: "color-primary", id }),
|
|
@@ -320,24 +535,28 @@ var parseVariables = (variables, id) => {
|
|
|
320
535
|
generateDefaultColor({ color: variables.colorCounter, key: "color-counter", id }),
|
|
321
536
|
generateDefaultColor({ color: variables.colorCounterForeground, key: "color-counter-foreground", id }),
|
|
322
537
|
generateDefaultColor({ color: variables.colorShadow, key: "color-shadow", id }),
|
|
323
|
-
|
|
324
|
-
...
|
|
325
|
-
...
|
|
326
|
-
...
|
|
327
|
-
...
|
|
538
|
+
generateDefaultColor({ color: variables.colorRing, key: "color-ring", id }),
|
|
539
|
+
...generateAlphaShadeRulesFromColor({ color: variables.colorBackground, key: "color-background-alpha", id }),
|
|
540
|
+
...generateAlphaShadeRulesFromColor({ color: variables.colorForeground, key: "color-foreground-alpha", id }),
|
|
541
|
+
...generateSolidShadeRulesFromColor({ color: variables.colorPrimary, key: "color-primary", id }),
|
|
542
|
+
...generateAlphaShadeRulesFromColor({ color: variables.colorPrimary, key: "color-primary-alpha", id }),
|
|
543
|
+
...generateAlphaShadeRulesFromColor({
|
|
328
544
|
color: variables.colorPrimaryForeground,
|
|
329
545
|
key: "color-primary-foreground-alpha",
|
|
330
546
|
id
|
|
331
547
|
}),
|
|
332
|
-
...
|
|
333
|
-
...
|
|
334
|
-
...
|
|
548
|
+
...generateSolidShadeRulesFromColor({ color: variables.colorSecondary, key: "color-secondary", id }),
|
|
549
|
+
...generateAlphaShadeRulesFromColor({ color: variables.colorSecondary, key: "color-secondary-alpha", id }),
|
|
550
|
+
...generateAlphaShadeRulesFromColor({
|
|
335
551
|
color: variables.colorSecondaryForeground,
|
|
336
552
|
key: "color-secondary-foreground-alpha",
|
|
337
553
|
id
|
|
338
554
|
}),
|
|
339
|
-
...
|
|
555
|
+
...generateAlphaShadeRulesFromColor({ color: variables.colorNeutral, key: "color-neutral-alpha", id }),
|
|
556
|
+
...generateFontSizeRules({ id, baseFontSize: variables.fontSize }),
|
|
557
|
+
...generateBorderRadiusRules({ id, baseRadius: variables.borderRadius })
|
|
340
558
|
];
|
|
559
|
+
return rules;
|
|
341
560
|
};
|
|
342
561
|
var parseElements = (elements) => {
|
|
343
562
|
const elementsStyleData = [];
|
|
@@ -352,7 +571,12 @@ var parseElements = (elements) => {
|
|
|
352
571
|
}
|
|
353
572
|
}
|
|
354
573
|
}
|
|
355
|
-
|
|
574
|
+
const sortedElementsStyleData = elementsStyleData.sort((a, b) => {
|
|
575
|
+
const countA = (a.key.match(/__/g) || []).length;
|
|
576
|
+
const countB = (b.key.match(/__/g) || []).length;
|
|
577
|
+
return countA - countB;
|
|
578
|
+
});
|
|
579
|
+
return sortedElementsStyleData;
|
|
356
580
|
};
|
|
357
581
|
var getTagsFromTab = (tab) => {
|
|
358
582
|
var _a;
|
|
@@ -362,7 +586,7 @@ var getTagsFromTab = (tab) => {
|
|
|
362
586
|
// src/ui/helpers/useStyle.ts
|
|
363
587
|
var useStyle = () => {
|
|
364
588
|
const appearance = useAppearance();
|
|
365
|
-
const [
|
|
589
|
+
const [isServer, setIsServer] = createSignal(true);
|
|
366
590
|
onMount(() => {
|
|
367
591
|
setIsServer(false);
|
|
368
592
|
});
|
|
@@ -389,13 +613,14 @@ var useStyle = () => {
|
|
|
389
613
|
return countB - countA;
|
|
390
614
|
});
|
|
391
615
|
const finalClassName = classes.filter((className2) => !finalAppearanceKeys.includes(className2)).join(" ");
|
|
392
|
-
|
|
393
|
-
for (let i = 0; i < finalAppearanceKeys.length; i += 1) {
|
|
616
|
+
let appearanceClassnames = [];
|
|
617
|
+
for (let i = 0; i < finalAppearanceKeys.reverse().length; i += 1) {
|
|
394
618
|
if (typeof ((_a = appearance.elements()) == null ? void 0 : _a[finalAppearanceKeys[i]]) === "string") {
|
|
395
619
|
appearanceClassnames.push((_b = appearance.elements()) == null ? void 0 : _b[finalAppearanceKeys[i]]);
|
|
396
620
|
}
|
|
397
621
|
}
|
|
398
|
-
|
|
622
|
+
appearanceClassnames = [publicFacingTwMerge(appearanceClassnames)];
|
|
623
|
+
const cssInJsClasses = !!finalAppearanceKeys.length && !isServer() ? finalAppearanceKeys.map((appKey) => appearance.appearanceKeyToCssInJsClass[appKey]) : [];
|
|
399
624
|
return cn(
|
|
400
625
|
...finalAppearanceKeys.map((key) => `nv-${key}`),
|
|
401
626
|
"\u{1F514}",
|
|
@@ -416,10 +641,6 @@ function useUncontrolledState(props) {
|
|
|
416
641
|
return [uncontrolledValue, setUncontrolledValue];
|
|
417
642
|
}
|
|
418
643
|
|
|
419
|
-
// src/ui/helpers/constants.ts
|
|
420
|
-
var DEFAULT_TARGET = "_blank";
|
|
421
|
-
var DEFAULT_REFERRER = "noopener noreferrer";
|
|
422
|
-
|
|
423
644
|
// src/ui/context/AppearanceContext.tsx
|
|
424
645
|
var AppearanceContext = createContext(void 0);
|
|
425
646
|
var AppearanceProvider = (props) => {
|
|
@@ -592,51 +813,6 @@ var useWebSocketEvent = ({
|
|
|
592
813
|
});
|
|
593
814
|
});
|
|
594
815
|
};
|
|
595
|
-
var LocalizationContext = createContext(void 0);
|
|
596
|
-
var LocalizationProvider = (props) => {
|
|
597
|
-
const localization = createMemo(() => {
|
|
598
|
-
const _a = props.localization || {}, {
|
|
599
|
-
dynamic
|
|
600
|
-
} = _a, localizationObject = __objRest(_a, [
|
|
601
|
-
"dynamic"
|
|
602
|
-
]);
|
|
603
|
-
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, defaultLocalization), dynamicLocalization()), dynamic || {}), localizationObject);
|
|
604
|
-
});
|
|
605
|
-
const t = (key, ...args) => {
|
|
606
|
-
const value = localization()[key];
|
|
607
|
-
if (typeof value === "function") {
|
|
608
|
-
return value(args[0]);
|
|
609
|
-
}
|
|
610
|
-
return value;
|
|
611
|
-
};
|
|
612
|
-
const locale = createMemo(() => localization().locale);
|
|
613
|
-
return createComponent(LocalizationContext.Provider, {
|
|
614
|
-
value: {
|
|
615
|
-
t,
|
|
616
|
-
locale
|
|
617
|
-
},
|
|
618
|
-
get children() {
|
|
619
|
-
return props.children;
|
|
620
|
-
}
|
|
621
|
-
});
|
|
622
|
-
};
|
|
623
|
-
function useLocalization() {
|
|
624
|
-
const context = useContext(LocalizationContext);
|
|
625
|
-
if (!context) {
|
|
626
|
-
throw new Error("useLocalization must be used within an LocalizationProvider");
|
|
627
|
-
}
|
|
628
|
-
return context;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
// src/ui/types.ts
|
|
632
|
-
var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
|
|
633
|
-
NotificationStatus2["UNREAD_READ"] = "unreadRead";
|
|
634
|
-
NotificationStatus2["UNREAD"] = "unread";
|
|
635
|
-
NotificationStatus2["ARCHIVED"] = "archived";
|
|
636
|
-
return NotificationStatus2;
|
|
637
|
-
})(NotificationStatus || {});
|
|
638
|
-
|
|
639
|
-
// src/ui/context/InboxContext.tsx
|
|
640
816
|
var InboxContext = createContext(void 0);
|
|
641
817
|
var STATUS_TO_FILTER = {
|
|
642
818
|
["unreadRead" /* UNREAD_READ */]: {
|
|
@@ -833,7 +1009,7 @@ var CountProvider = (props) => {
|
|
|
833
1009
|
const limitValue = limit();
|
|
834
1010
|
const tabFilter = __spreadProps(__spreadValues({}, filter()), {
|
|
835
1011
|
tags,
|
|
836
|
-
|
|
1012
|
+
after: void 0,
|
|
837
1013
|
limit: limitValue
|
|
838
1014
|
});
|
|
839
1015
|
const hasEmptyCache = !notificationsCache.has(tabFilter);
|
|
@@ -867,11 +1043,16 @@ var CountProvider = (props) => {
|
|
|
867
1043
|
if (filter().archived) {
|
|
868
1044
|
return;
|
|
869
1045
|
}
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
1046
|
+
const tagsMap = tabs().reduce((acc, tab) => {
|
|
1047
|
+
const tags = getTagsFromTab(tab);
|
|
1048
|
+
const tagsKey = createKey(tags);
|
|
1049
|
+
acc.set(tagsKey, tags);
|
|
1050
|
+
return acc;
|
|
1051
|
+
}, /* @__PURE__ */ new Map());
|
|
1052
|
+
const uniqueTags = Array.from(tagsMap.values());
|
|
1053
|
+
if (uniqueTags.length > 0) {
|
|
1054
|
+
for (let i = 0; i < uniqueTags.length; i += 1) {
|
|
1055
|
+
const tags = uniqueTags[i];
|
|
875
1056
|
const allNotifications = tags.length === 0;
|
|
876
1057
|
const includesAtLeastOneTag = tags.some((tag) => {
|
|
877
1058
|
var _a;
|
|
@@ -1047,144 +1228,144 @@ var ExternalElementRenderer = (props) => {
|
|
|
1047
1228
|
return _el$;
|
|
1048
1229
|
})();
|
|
1049
1230
|
};
|
|
1050
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1051
|
-
var
|
|
1231
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path fill=currentColor d="M5.833 8.333L10 12.5l4.166-4.167H5.833z">`);
|
|
1232
|
+
var ArrowDropDown = (props) => {
|
|
1052
1233
|
return (() => {
|
|
1053
1234
|
var _el$ = _tmpl$2();
|
|
1054
1235
|
spread(_el$, props, true, true);
|
|
1055
1236
|
return _el$;
|
|
1056
1237
|
})();
|
|
1057
1238
|
};
|
|
1058
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1059
|
-
var
|
|
1239
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.20425 9.99907L12.9168 13.7116L11.8563 14.7721L7.08325 9.99907L11.8563 5.22607L12.9168 6.28657L9.20425 9.99907Z"fill=currentColor>`);
|
|
1240
|
+
var ArrowLeft = (props) => {
|
|
1060
1241
|
return (() => {
|
|
1061
1242
|
var _el$ = _tmpl$3();
|
|
1062
1243
|
spread(_el$, props, true, true);
|
|
1063
1244
|
return _el$;
|
|
1064
1245
|
})();
|
|
1065
1246
|
};
|
|
1066
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1067
|
-
|
|
1247
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 12"fill=none xmlns=http://www.w3.org/2000/svg><path d="M5 12C5.6875 12 6.25 11.4462 6.25 10.7692H3.75C3.75 11.4462 4.3125 12 5 12ZM8.75 8.30769V5.23077C8.75 3.34154 7.73125 1.76 5.9375 1.34154V0.923077C5.9375 0.412308 5.51875 0 5 0C4.48125 0 4.0625 0.412308 4.0625 0.923077V1.34154C2.275 1.76 1.25 3.33538 1.25 5.23077V8.30769L0 9.53846V10.1538H10V9.53846L8.75 8.30769ZM7.5 8.92308H2.5V5.23077C2.5 3.70462 3.44375 2.46154 5 2.46154C6.55625 2.46154 7.5 3.70462 7.5 5.23077V8.92308Z"fill=currentColor>`);
|
|
1248
|
+
function Bell(props) {
|
|
1068
1249
|
return (() => {
|
|
1069
1250
|
var _el$ = _tmpl$4();
|
|
1070
1251
|
spread(_el$, props, true, true);
|
|
1071
1252
|
return _el$;
|
|
1072
1253
|
})();
|
|
1073
|
-
}
|
|
1074
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1075
|
-
var
|
|
1254
|
+
}
|
|
1255
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M0.625 9.375L2.93989 8.86059C3.5538 9.18889 4.25516 9.375 5 9.375C7.41622 9.375 9.375 7.41622 9.375 5C9.375 2.58375 7.41622 0.625 5 0.625C2.58375 0.625 0.625 2.58375 0.625 5C0.625 5.74484 0.81113 6.4462 1.13942 7.0601L0.625 9.375ZM6.50881 2.8125L6.43224 3.68761H7.1875V4.56259H6.35568L6.27912 5.43759H7.1875V6.31259H6.2026L6.12604 7.1875H5.24771L5.32423 6.31259H4.44591L4.36934 7.1875H3.49101L3.56755 6.31259H2.8125V5.43759H3.64411L3.72066 4.56259H2.8125V3.68761H3.79721L3.87377 2.8125H4.75211L4.67555 3.68761H5.55392L5.63048 2.8125H6.50881ZM4.59899 4.56259L4.52247 5.43759H5.40079L5.47736 4.56259H4.59899Z"fill=currentColor>`);
|
|
1256
|
+
var Chat = (props) => {
|
|
1076
1257
|
return (() => {
|
|
1077
1258
|
var _el$ = _tmpl$5();
|
|
1078
1259
|
spread(_el$, props, true, true);
|
|
1079
1260
|
return _el$;
|
|
1080
1261
|
})();
|
|
1081
1262
|
};
|
|
1082
|
-
var _tmpl$6 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1083
|
-
|
|
1263
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<svg viewBox="0 0 8 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.99994 4.58847L7.33298 0L8 0.705765L2.99994 6L0 2.82356L0.666549 2.11779L2.99994 4.58847Z"fill=currentColor>`);
|
|
1264
|
+
var Check = (props) => {
|
|
1084
1265
|
return (() => {
|
|
1085
1266
|
var _el$ = _tmpl$6();
|
|
1086
1267
|
spread(_el$, props, true, true);
|
|
1087
1268
|
return _el$;
|
|
1088
1269
|
})();
|
|
1089
|
-
}
|
|
1090
|
-
var _tmpl$7 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1091
|
-
var
|
|
1270
|
+
};
|
|
1271
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path fill=currentColor d="M5 8.333c-.917 0-1.667.75-1.667 1.667s.75 1.667 1.667 1.667c.916 0 1.666-.75 1.666-1.667S5.916 8.333 5 8.333zm10 0c-.917 0-1.667.75-1.667 1.667s.75 1.667 1.667 1.667c.916 0 1.666-.75 1.666-1.667S15.916 8.333 15 8.333zm-5 0c-.917 0-1.667.75-1.667 1.667s.75 1.667 1.667 1.667c.916 0 1.666-.75 1.666-1.667S10.916 8.333 10 8.333z">`);
|
|
1272
|
+
var Dots = (props) => {
|
|
1092
1273
|
return (() => {
|
|
1093
1274
|
var _el$ = _tmpl$7();
|
|
1094
1275
|
spread(_el$, props, true, true);
|
|
1095
1276
|
return _el$;
|
|
1096
1277
|
})();
|
|
1097
1278
|
};
|
|
1098
|
-
var _tmpl$8 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1099
|
-
var
|
|
1279
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M4.20703 1.875H2.8125H2.10547H1.875V2.04688V2.8125V3.60156V5.33984L0.00390625 3.95508C0.0351562 3.60156 0.216797 3.27344 0.505859 3.06055L0.9375 2.74023V1.875C0.9375 1.35742 1.35742 0.9375 1.875 0.9375H3.37109L4.3457 0.216797C4.53516 0.0761719 4.76367 0 5 0C5.23633 0 5.46484 0.0761719 5.6543 0.214844L6.62891 0.9375H8.125C8.64258 0.9375 9.0625 1.35742 9.0625 1.875V2.74023L9.49414 3.06055C9.7832 3.27344 9.96484 3.60156 9.99609 3.95508L8.125 5.33984V3.60156V2.8125V2.04688V1.875H7.89453H7.1875H5.79297H4.20508H4.20703ZM0 8.75V4.72852L4.25 7.87695C4.4668 8.03711 4.73047 8.125 5 8.125C5.26953 8.125 5.5332 8.03906 5.75 7.87695L10 4.72852V8.75C10 9.43945 9.43945 10 8.75 10H1.25C0.560547 10 0 9.43945 0 8.75ZM3.4375 3.125H6.5625C6.73438 3.125 6.875 3.26562 6.875 3.4375C6.875 3.60938 6.73438 3.75 6.5625 3.75H3.4375C3.26562 3.75 3.125 3.60938 3.125 3.4375C3.125 3.26562 3.26562 3.125 3.4375 3.125ZM3.4375 4.375H6.5625C6.73438 4.375 6.875 4.51562 6.875 4.6875C6.875 4.85938 6.73438 5 6.5625 5H3.4375C3.26562 5 3.125 4.85938 3.125 4.6875C3.125 4.51562 3.26562 4.375 3.4375 4.375Z"fill=currentColor>`);
|
|
1280
|
+
var Email = (props) => {
|
|
1100
1281
|
return (() => {
|
|
1101
1282
|
var _el$ = _tmpl$8();
|
|
1102
1283
|
spread(_el$, props, true, true);
|
|
1103
1284
|
return _el$;
|
|
1104
1285
|
})();
|
|
1105
1286
|
};
|
|
1106
|
-
var _tmpl$9 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1107
|
-
var
|
|
1287
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 12"fill=none xmlns=http://www.w3.org/2000/svg><path d="M4.99962 0.856934C4.64404 0.856934 4.35676 1.14421 4.35676 1.49979V1.88551C2.89024 2.18283 1.78533 3.48059 1.78533 5.03551V5.41318C1.78533 6.35738 1.43779 7.26943 0.810999 7.97658L0.662339 8.14332C0.493589 8.33216 0.45341 8.60336 0.555865 8.83439C0.658321 9.06542 0.889348 9.21408 1.14247 9.21408H8.85676C9.10988 9.21408 9.3389 9.06542 9.44337 8.83439C9.54783 8.60336 9.50564 8.33216 9.33689 8.14332L9.18823 7.97658C8.56145 7.26943 8.2139 6.35939 8.2139 5.41318V5.03551C8.2139 3.48059 7.10899 2.18283 5.64247 1.88551V1.49979C5.64247 1.14421 5.3552 0.856934 4.99962 0.856934ZM5.90966 10.767C6.15073 10.5259 6.28533 10.1985 6.28533 9.85693H4.99962H3.7139C3.7139 10.1985 3.8485 10.5259 4.08957 10.767C4.33064 11.008 4.6581 11.1426 4.99962 11.1426C5.34113 11.1426 5.66859 11.008 5.90966 10.767Z"fill=currentColor>`);
|
|
1288
|
+
var InApp = (props) => {
|
|
1108
1289
|
return (() => {
|
|
1109
1290
|
var _el$ = _tmpl$9();
|
|
1110
1291
|
spread(_el$, props, true, true);
|
|
1111
1292
|
return _el$;
|
|
1112
1293
|
})();
|
|
1113
1294
|
};
|
|
1114
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1115
|
-
var
|
|
1295
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.29671 10C1.78742 10 1.39807 9.85716 1.12864 9.57149C0.862497 9.28581 0.729426 8.86623 0.729426 8.31274V2.64594H1.69543V8.29668C1.69543 8.52163 1.74964 8.69487 1.85806 8.81624C1.96978 8.93408 2.12914 8.99301 2.33614 8.99301H7.66389C7.86764 8.99301 8.02366 8.93408 8.13209 8.81624C8.24384 8.69487 8.29965 8.52163 8.29965 8.29668V2.64594H9.27059V8.31274C9.27059 8.8627 9.13591 9.28048 8.86648 9.56608C8.59705 9.85536 8.20931 10 7.70333 10H2.29671ZM3.41056 5.34543C3.29556 5.34543 3.20028 5.30438 3.1247 5.22226C3.04913 5.14015 3.01134 5.03304 3.01134 4.90089V4.72949C3.01134 4.59737 3.04749 4.49204 3.11977 4.41348C3.19535 4.33492 3.29227 4.29564 3.41056 4.29564H6.5944C6.71271 4.29564 6.80795 4.33492 6.88026 4.41348C6.95582 4.49204 6.9936 4.59737 6.9936 4.72949V4.90089C6.9936 5.03304 6.95582 5.14015 6.88026 5.22226C6.8047 5.30438 6.70939 5.34543 6.5944 5.34543H3.41056ZM1.05964 3.16014C0.724502 3.16014 0.463285 3.05301 0.276004 2.83877C0.0920037 2.62095 0 2.33172 0 1.97107V1.18907C0 0.824846 0.0952841 0.535614 0.28586 0.321373C0.476428 0.107124 0.734358 0 1.05964 0H8.94536C9.27715 0 9.53511 0.107124 9.71911 0.321373C9.90642 0.535614 10 0.824846 10 1.18907V1.97107C10 2.33172 9.90642 2.62095 9.71911 2.83877C9.53511 3.05301 9.27715 3.16014 8.94536 3.16014H1.05964ZM1.24693 2.19067H8.75805C8.87304 2.19067 8.95516 2.16211 9.00448 2.10497C9.05372 2.04427 9.07838 1.95322 9.07838 1.83181V1.32833C9.07838 1.20335 9.05372 1.1123 9.00448 1.05517C8.95516 0.99803 8.87304 0.969462 8.75805 0.969462H1.24693C1.13193 0.969462 1.04814 0.99803 0.995567 1.05517C0.946281 1.1123 0.921638 1.20335 0.921638 1.32833V1.83181C0.921638 1.95322 0.946281 2.04427 0.995567 2.10497C1.04814 2.16211 1.13193 2.19067 1.24693 2.19067Z"fill=currentColor>`);
|
|
1296
|
+
var MarkAsArchived = (props) => {
|
|
1116
1297
|
return (() => {
|
|
1117
1298
|
var _el$ = _tmpl$10();
|
|
1118
1299
|
spread(_el$, props, true, true);
|
|
1119
1300
|
return _el$;
|
|
1120
1301
|
})();
|
|
1121
1302
|
};
|
|
1122
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1123
|
-
var
|
|
1303
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.29671 10C1.78742 10 1.39807 9.85716 1.12864 9.57149C0.862497 9.28581 0.729426 8.86623 0.729426 8.31274V2.64594H1.69543V8.29668C1.69543 8.52163 1.74964 8.69487 1.85806 8.81624C1.96978 8.93408 2.12914 8.99301 2.33614 8.99301H7.66389C7.86764 8.99301 8.02366 8.93408 8.13209 8.81624C8.24384 8.69487 8.29965 8.52163 8.29965 8.29668V2.64594H9.27059V8.31274C9.27059 8.8627 9.13591 9.28048 8.86648 9.56608C8.59705 9.85536 8.20931 10 7.70333 10H2.29671ZM1.05964 3.16014C0.724502 3.16014 0.463285 3.05301 0.276004 2.83877C0.0920037 2.62095 0 2.33172 0 1.97107V1.18907C0 0.824846 0.0952841 0.535614 0.28586 0.321373C0.476428 0.107124 0.734358 0 1.05964 0H8.94536C9.27715 0 9.53511 0.107124 9.71911 0.321373C9.90642 0.535614 10 0.824846 10 1.18907V1.97107C10 2.33172 9.90642 2.62095 9.71911 2.83877C9.53511 3.05301 9.27715 3.16014 8.94536 3.16014H1.05964ZM1.24693 2.19067H8.75805C8.87304 2.19067 8.95516 2.16211 9.00448 2.10497C9.05372 2.04427 9.07838 1.95322 9.07838 1.83181V1.32833C9.07838 1.20335 9.05372 1.1123 9.00448 1.05517C8.95516 0.99803 8.87304 0.969462 8.75805 0.969462H1.24693C1.13193 0.969462 1.04814 0.99803 0.995567 1.05517C0.946281 1.1123 0.921638 1.20335 0.921638 1.32833V1.83181C0.921638 1.95322 0.946281 2.04427 0.995567 2.10497C1.04814 2.16211 1.13193 2.19067 1.24693 2.19067Z"fill=currentColor>`);
|
|
1304
|
+
var MarkAsArchivedRead = (props) => {
|
|
1124
1305
|
return (() => {
|
|
1125
1306
|
var _el$ = _tmpl$11();
|
|
1126
1307
|
spread(_el$, props, true, true);
|
|
1127
1308
|
return _el$;
|
|
1128
1309
|
})();
|
|
1129
1310
|
};
|
|
1130
|
-
var _tmpl$12 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1131
|
-
var
|
|
1311
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1.75683 10C1.17837 10 0.740942 9.85182 0.444565 9.55546C0.148188 9.26266 0 8.83065 0 8.25932V1.74077C0 1.16587 0.148188 0.732023 0.444565 0.43921C0.740942 0.146407 1.17837 0 1.75683 0H8.24315C8.82161 0 9.25901 0.146407 9.55546 0.43921C9.85182 0.732023 10 1.16587 10 1.74077V8.25932C10 8.83065 9.85182 9.26266 9.55546 9.55546C9.25901 9.85182 8.82161 10 8.24315 10H1.75683ZM1.8211 8.94491H8.17889C8.42524 8.94491 8.61456 8.88056 8.74665 8.75204C8.87874 8.62351 8.94483 8.42889 8.94483 8.16818V1.82647C8.94483 1.56937 8.87874 1.37655 8.74665 1.248C8.61456 1.11945 8.42524 1.05518 8.17889 1.05518H1.8211C1.57115 1.05518 1.38011 1.11945 1.248 1.248C1.11944 1.37655 1.05517 1.56937 1.05517 1.82647V8.16818C1.05517 8.42889 1.11944 8.62351 1.248 8.75204C1.38011 8.88056 1.57115 8.94491 1.8211 8.94491ZM4.42957 7.53616C4.32958 7.53616 4.24032 7.51477 4.16176 7.47189C4.0832 7.42546 4.00643 7.35763 3.93144 7.26841L2.66738 5.72579C2.57454 5.60795 2.52812 5.48833 2.52812 5.36693C2.52812 5.23481 2.57276 5.12232 2.66202 5.02949C2.75487 4.93307 2.86556 4.88486 2.99411 4.88486C3.07624 4.88486 3.14944 4.90272 3.21371 4.93843C3.28156 4.97056 3.34762 5.02949 3.4119 5.11518L4.40814 6.37925L6.52383 2.98876C6.63453 2.80666 6.77379 2.7156 6.94162 2.7156C7.06658 2.7156 7.17911 2.75667 7.27903 2.83879C7.37903 2.92093 7.42903 3.02804 7.42903 3.16016C7.42903 3.22087 7.41477 3.28336 7.38616 3.34763C7.3612 3.40834 7.33086 3.46547 7.29511 3.51903L4.90091 7.26301C4.78664 7.44511 4.62953 7.53616 4.42957 7.53616Z"fill=currentColor>`);
|
|
1312
|
+
var MarkAsRead = (props) => {
|
|
1132
1313
|
return (() => {
|
|
1133
1314
|
var _el$ = _tmpl$12();
|
|
1134
1315
|
spread(_el$, props, true, true);
|
|
1135
1316
|
return _el$;
|
|
1136
1317
|
})();
|
|
1137
1318
|
};
|
|
1138
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1139
|
-
var
|
|
1319
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M3.15789 2.99902V4.99902L0 2.49902L3.15789 -0.000976562V1.99902H5.78947C6.90618 1.99902 7.97714 2.42045 8.76677 3.1706C9.55639 3.92074 10 4.93816 10 5.99902C10 7.05989 9.55639 8.0773 8.76677 8.82745C7.97714 9.5776 6.90618 9.99902 5.78947 9.99902H1.05263V8.99902H5.78947C6.627 8.99902 7.43022 8.68295 8.02244 8.12034C8.61466 7.55773 8.94737 6.79467 8.94737 5.99902C8.94737 5.20337 8.61466 4.44031 8.02244 3.8777C7.43022 3.31509 6.627 2.99902 5.78947 2.99902H3.15789Z"fill=currentColor>`);
|
|
1320
|
+
var MarkAsUnarchived = (props) => {
|
|
1140
1321
|
return (() => {
|
|
1141
1322
|
var _el$ = _tmpl$13();
|
|
1142
1323
|
spread(_el$, props, true, true);
|
|
1143
1324
|
return _el$;
|
|
1144
1325
|
})();
|
|
1145
1326
|
};
|
|
1146
|
-
var _tmpl$14 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1147
|
-
var
|
|
1327
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<svg viewBox="0 0 11 11"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6.8 1.5H1.5C0.947715 1.5 0.5 1.94772 0.5 2.5V9.5C0.5 10.0523 0.947715 10.5 1.5 10.5H8.5C9.05228 10.5 9.5 10.0523 9.5 9.5V4.2"stroke=currentColor stroke-miterlimit=1 stroke-linecap=round></path><circle cx=9.25 cy=1.75 r=1.25 fill=currentColor>`);
|
|
1328
|
+
var MarkAsUnread = (props) => {
|
|
1148
1329
|
return (() => {
|
|
1149
1330
|
var _el$ = _tmpl$14();
|
|
1150
1331
|
spread(_el$, props, true, true);
|
|
1151
1332
|
return _el$;
|
|
1152
1333
|
})();
|
|
1153
1334
|
};
|
|
1154
|
-
var _tmpl$15 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1155
|
-
var
|
|
1335
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 13 12"><path fill=currentColor d="M9.787.98A5.972 5.972 0 006.5 0c-.668 0-1.31.11-1.911.31L9.187 4.94c.221.222.6.065.6-.248V.98z"></path><path fill=currentColor d="M2.879 1.216A5.99 5.99 0 00.5 6c0 1.134.315 2.195.862 3.1V7.309c0-1.966 2.379-2.946 3.764-1.552l4.995 5.027A5.99 5.99 0 0012.5 6a5.972 5.972 0 00-.862-3.1v1.791c0 1.966-2.379 2.946-3.764 1.552L2.879 1.216z"></path><path fill=currentColor d="M8.411 11.69L3.813 7.06a.351.351 0 00-.6.248v3.711c.944.62 2.073.98 3.287.98.668 0 1.31-.11 1.911-.31z">`);
|
|
1336
|
+
var Novu2 = (props) => {
|
|
1156
1337
|
return (() => {
|
|
1157
1338
|
var _el$ = _tmpl$15();
|
|
1158
1339
|
spread(_el$, props, true, true);
|
|
1159
1340
|
return _el$;
|
|
1160
1341
|
})();
|
|
1161
1342
|
};
|
|
1162
|
-
var _tmpl$16 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1163
|
-
var
|
|
1343
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M4.12531 1.8999C3.94958 1.8999 3.80713 2.04235 3.80713 2.21808C3.80713 2.39382 3.94958 2.53627 4.12531 2.53627H6.0344C6.21013 2.53627 6.35258 2.39382 6.35258 2.21808C6.35258 2.04235 6.21013 1.8999 6.0344 1.8999H4.12531Z"fill=currentColor></path><path d="M4.12531 1.8999C3.94958 1.8999 3.80713 2.04235 3.80713 2.21808C3.80713 2.39382 3.94958 2.53627 4.12531 2.53627H6.0344C6.21013 2.53627 6.35258 2.39382 6.35258 2.21808C6.35258 2.04235 6.21013 1.8999 6.0344 1.8999H4.12531Z"stroke=currentColor></path><path d="M2.69329 1.46818H7.30693C7.75127 1.46818 8.11147 1.82839 8.11147 2.27273V13.7273C8.11147 14.1716 7.75127 14.5318 7.30693 14.5318H2.69329C2.24896 14.5318 1.88875 14.1716 1.88875 13.7273V2.27273C1.88875 1.82839 2.24896 1.46818 2.69329 1.46818ZM2.69329 0.85C1.90754 0.85 1.27057 1.48698 1.27057 2.27273V2.95695C1.17568 3.00972 1.11147 3.111 1.11147 3.22727V3.54545C1.11147 3.64155 1.15532 3.7274 1.22411 3.78409C1.15532 3.84078 1.11147 3.92663 1.11147 4.02273V4.65909C1.11147 4.75519 1.15532 4.84104 1.22411 4.89773C1.15532 4.95442 1.11147 5.04027 1.11147 5.13636V6.09091C1.11147 6.20718 1.17568 6.30846 1.27057 6.36123V13.7273C1.27057 14.513 1.90754 15.15 2.69329 15.15H7.30693C8.09268 15.15 8.72966 14.513 8.72966 13.7273V6.36123C8.82454 6.30846 8.88875 6.20718 8.88875 6.09091V4.81818C8.88875 4.70191 8.82454 4.60063 8.72966 4.54786V2.27273C8.72966 1.48698 8.09268 0.85 7.30693 0.85H2.69329Z"fill=currentColor stroke=currentColor stroke-width=0.3>`);
|
|
1344
|
+
var Push = (props) => {
|
|
1164
1345
|
return (() => {
|
|
1165
1346
|
var _el$ = _tmpl$16();
|
|
1166
1347
|
spread(_el$, props, true, true);
|
|
1167
1348
|
return _el$;
|
|
1168
1349
|
})();
|
|
1169
1350
|
};
|
|
1170
|
-
var _tmpl$17 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1171
|
-
var
|
|
1351
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10 1.75L17.125 5.875V14.125L10 18.25L2.875 14.125V5.875L10 1.75ZM10 3.48325L4.375 6.73975V13.2603L10 16.5167L15.625 13.2603V6.73975L10 3.48325ZM10 13C9.20435 13 8.44129 12.6839 7.87868 12.1213C7.31607 11.5587 7 10.7956 7 10C7 9.20435 7.31607 8.44129 7.87868 7.87868C8.44129 7.31607 9.20435 7 10 7C10.7956 7 11.5587 7.31607 12.1213 7.87868C12.6839 8.44129 13 9.20435 13 10C13 10.7956 12.6839 11.5587 12.1213 12.1213C11.5587 12.6839 10.7956 13 10 13ZM10 11.5C10.3978 11.5 10.7794 11.342 11.0607 11.0607C11.342 10.7794 11.5 10.3978 11.5 10C11.5 9.60218 11.342 9.22064 11.0607 8.93934C10.7794 8.65804 10.3978 8.5 10 8.5C9.60218 8.5 9.22064 8.65804 8.93934 8.93934C8.65804 9.22064 8.5 9.60218 8.5 10C8.5 10.3978 8.65804 10.7794 8.93934 11.0607C9.22064 11.342 9.60218 11.5 10 11.5Z"fill=currentColor>`);
|
|
1352
|
+
var Settings = (props) => {
|
|
1172
1353
|
return (() => {
|
|
1173
1354
|
var _el$ = _tmpl$17();
|
|
1174
1355
|
spread(_el$, props, true, true);
|
|
1175
1356
|
return _el$;
|
|
1176
1357
|
})();
|
|
1177
1358
|
};
|
|
1178
|
-
var _tmpl$18 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1179
|
-
var
|
|
1359
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M5.00051 9.28364C7.76195 9.28364 10 7.20598 10 4.64182C10 2.07766 7.76195 0 5.00051 0C2.23907 0 0.00101462 2.07766 0.00101462 4.64182C0.00101462 5.64829 0.346683 6.57889 0.932561 7.33988C0.895455 7.88663 0.709927 8.37313 0.514634 8.74358C0.407223 8.94889 0.297859 9.11404 0.21779 9.22562C0.176778 9.28141 0.145531 9.32381 0.122096 9.35282C0.110379 9.36621 0.102567 9.37737 0.096708 9.38407L0.0908493 9.39076C0.00101462 9.49342 -0.0243734 9.64517 0.0244497 9.77907C0.0732729 9.91297 0.186543 10 0.313483 10C0.873973 10 1.43837 9.80138 1.90707 9.56929C2.35429 9.34613 2.73511 9.08056 2.96751 8.88641C3.58854 9.14305 4.27597 9.28587 5.00051 9.28587V9.28364ZM1.87582 4.03481C1.87582 3.58179 2.19806 3.21357 2.5945 3.21357H2.96946C3.14132 3.21357 3.28193 3.37425 3.28193 3.57063C3.28193 3.76702 3.14132 3.92769 2.96946 3.92769H2.5945C2.54177 3.92769 2.50076 3.97679 2.50076 4.03481C2.50076 4.07052 2.51638 4.10399 2.54373 4.12408L3.11789 4.56148C3.31904 4.71323 3.43817 4.96987 3.43817 5.2466C3.43817 5.69962 3.11593 6.06784 2.71949 6.06784L2.18829 6.07007C2.01644 6.07007 1.87582 5.9094 1.87582 5.71301C1.87582 5.51663 2.01644 5.35595 2.18829 5.35595H2.71949C2.77222 5.35595 2.81323 5.30685 2.81323 5.24883C2.81323 5.21312 2.79761 5.17965 2.77026 5.15956L2.1961 4.72216C1.99691 4.56818 1.87582 4.31154 1.87582 4.03481ZM7.28153 3.21357H7.65649C7.82834 3.21357 7.96896 3.37425 7.96896 3.57063C7.96896 3.76702 7.82834 3.92769 7.65649 3.92769H7.28153C7.2288 3.92769 7.18779 3.97679 7.18779 4.03481C7.18779 4.07052 7.20341 4.10399 7.23075 4.12408L7.80491 4.56148C8.00411 4.71323 8.12519 4.96987 8.12519 5.2466C8.12519 5.69962 7.80296 6.06784 7.40651 6.06784L6.87532 6.07007C6.70346 6.07007 6.56285 5.9094 6.56285 5.71301C6.56285 5.51663 6.70346 5.35595 6.87532 5.35595H7.40651C7.45924 5.35595 7.50025 5.30685 7.50025 5.24883C7.50025 5.21312 7.48463 5.17965 7.45729 5.15956L6.88313 4.72216C6.68393 4.57041 6.56285 4.31377 6.56285 4.03705C6.56285 3.58402 6.88508 3.2158 7.28153 3.2158V3.21357ZM4.31308 3.35639L5.00051 4.40304L5.68794 3.35639C5.76801 3.23365 5.90862 3.18233 6.03751 3.23142C6.1664 3.28052 6.25038 3.41665 6.25038 3.57063V5.71301C6.25038 5.9094 6.10977 6.07007 5.93791 6.07007C5.76605 6.07007 5.62544 5.9094 5.62544 5.71301V4.64182L5.25048 5.21312C5.19189 5.30239 5.09815 5.35595 5.00051 5.35595C4.90286 5.35595 4.80912 5.30239 4.75053 5.21312L4.37557 4.64182V5.71301C4.37557 5.9094 4.23496 6.07007 4.0631 6.07007C3.89124 6.07007 3.75063 5.9094 3.75063 5.71301V3.57063C3.75063 3.41665 3.83656 3.28052 3.9635 3.23142C4.09044 3.18233 4.23105 3.23365 4.31308 3.35639Z"fill=currentColor>`);
|
|
1360
|
+
var Sms = (props) => {
|
|
1180
1361
|
return (() => {
|
|
1181
1362
|
var _el$ = _tmpl$18();
|
|
1182
1363
|
spread(_el$, props, true, true);
|
|
1183
1364
|
return _el$;
|
|
1184
1365
|
})();
|
|
1185
1366
|
};
|
|
1186
|
-
var _tmpl$19 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1187
|
-
var
|
|
1367
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 8"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1.0119 0.348031C1.06274 0.14468 1.26565 0 1.5 0H8.5C8.73435 0 8.93725 0.14468 8.9881 0.348031L9.9881 4.34804C9.996 4.37969 10 4.412 10 4.44444V7.55556C10 7.80102 9.77615 8 9.5 8H0.5C0.22386 8 0 7.80102 0 7.55556V4.44444C0 4.412 0.00399495 4.37969 0.011905 4.34804L1.0119 0.348031ZM1.90108 0.888889L1.12331 4H3.5C3.5 4.7364 4.17155 5.33333 5 5.33333C5.82845 5.33333 6.5 4.7364 6.5 4H8.8767L8.0989 0.888889H1.90108ZM7.292 4.88889C6.9062 5.67373 6.02515 6.22222 5 6.22222C3.97484 6.22222 3.0938 5.67373 2.70802 4.88889H1V7.11111H9V4.88889H7.292Z"fill=currentColor>`);
|
|
1368
|
+
var UnreadRead = (props) => {
|
|
1188
1369
|
return (() => {
|
|
1189
1370
|
var _el$ = _tmpl$19();
|
|
1190
1371
|
spread(_el$, props, true, true);
|
|
@@ -1198,9 +1379,9 @@ var BellContainer = (props) => {
|
|
|
1198
1379
|
const style = useStyle();
|
|
1199
1380
|
return (() => {
|
|
1200
1381
|
var _el$ = _tmpl$20();
|
|
1201
|
-
insert(_el$, createComponent(
|
|
1382
|
+
insert(_el$, createComponent(Bell, {
|
|
1202
1383
|
get ["class"]() {
|
|
1203
|
-
return style("bellIcon");
|
|
1384
|
+
return style("bellIcon", "nt-size-4");
|
|
1204
1385
|
}
|
|
1205
1386
|
}), null);
|
|
1206
1387
|
insert(_el$, createComponent(Show, {
|
|
@@ -1209,17 +1390,17 @@ var BellContainer = (props) => {
|
|
|
1209
1390
|
},
|
|
1210
1391
|
get children() {
|
|
1211
1392
|
var _el$2 = _tmpl$20();
|
|
1212
|
-
effect(() => className(_el$2, style("bellDot", "nt-absolute nt-top-
|
|
1393
|
+
effect(() => className(_el$2, style("bellDot", "nt-absolute nt-top-0 nt-right-0 nt-block nt-size-2 nt-transform nt-bg-counter nt-rounded-full nt-border nt-border-background")));
|
|
1213
1394
|
return _el$2;
|
|
1214
1395
|
}
|
|
1215
1396
|
}), null);
|
|
1216
|
-
effect(() => className(_el$, style("bellContainer", `nt-
|
|
1397
|
+
effect(() => className(_el$, style("bellContainer", `nt-size-4 nt-flex nt-justify-center nt-items-center nt-relative nt-text-foreground nt-cursor-pointer`)));
|
|
1217
1398
|
return _el$;
|
|
1218
1399
|
})();
|
|
1219
1400
|
};
|
|
1220
1401
|
|
|
1221
1402
|
// src/ui/components/elements/Bell/Bell.tsx
|
|
1222
|
-
var
|
|
1403
|
+
var Bell2 = (props) => {
|
|
1223
1404
|
const {
|
|
1224
1405
|
totalUnreadCount
|
|
1225
1406
|
} = useTotalUnreadCount();
|
|
@@ -1248,7 +1429,7 @@ function isBrowser() {
|
|
|
1248
1429
|
}
|
|
1249
1430
|
|
|
1250
1431
|
// src/ui/components/elements/Footer.tsx
|
|
1251
|
-
var _tmpl$21 = /* @__PURE__ */ template(`<div class="nt-flex nt-shrink-0 nt-justify-center nt-items-center nt-gap-1 nt-mt-auto nt-
|
|
1432
|
+
var _tmpl$21 = /* @__PURE__ */ template(`<div class="nt-flex nt-shrink-0 nt-justify-center nt-items-center nt-gap-1 nt-mt-auto nt-py-3 nt-text-foreground-alpha-400"><a target=_blank class="nt-w-full nt-flex nt-items-center nt-gap-1 nt-justify-center"><span class=nt-text-xs>Inbox by</span><span class=nt-text-xs>Novu`);
|
|
1252
1433
|
var Footer = () => {
|
|
1253
1434
|
const {
|
|
1254
1435
|
hideBranding
|
|
@@ -1258,8 +1439,10 @@ var Footer = () => {
|
|
|
1258
1439
|
return !hideBranding();
|
|
1259
1440
|
},
|
|
1260
1441
|
get children() {
|
|
1261
|
-
var _el$ = _tmpl$21(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
1262
|
-
insert(_el$2, createComponent(Novu2, {
|
|
1442
|
+
var _el$ = _tmpl$21(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
1443
|
+
insert(_el$2, createComponent(Novu2, {
|
|
1444
|
+
"class": "nt-size-4"
|
|
1445
|
+
}), _el$4);
|
|
1263
1446
|
effect(() => setAttribute(_el$2, "href", `https://go.novu.co/powered?ref=${getCurrentDomain()}`));
|
|
1264
1447
|
return _el$;
|
|
1265
1448
|
}
|
|
@@ -1272,21 +1455,21 @@ function getCurrentDomain() {
|
|
|
1272
1455
|
return "";
|
|
1273
1456
|
}
|
|
1274
1457
|
var _tmpl$22 = /* @__PURE__ */ template(`<button>`);
|
|
1275
|
-
var buttonVariants = cva(
|
|
1458
|
+
var buttonVariants = cva(cn('nt-inline-flex nt-gap-4 nt-items-center nt-justify-center nt-whitespace-nowrap nt-text-sm nt-font-medium nt-transition-colors disabled:nt-pointer-events-none disabled:nt-opacity-50 after:nt-absolute after:nt-content-[""] before:nt-content-[""] before:nt-absolute [&_svg]:nt-pointer-events-none [&_svg]:nt-shrink-0', `focus-visible:nt-outline-none focus-visible:nt-ring-2 focus-visible:nt-rounded-md focus-visible:nt-ring-ring focus-visible:nt-ring-offset-2`), {
|
|
1276
1459
|
variants: {
|
|
1277
1460
|
variant: {
|
|
1278
|
-
default: "nt-bg-primary nt-text-primary-foreground hover:nt-bg-primary-alpha-
|
|
1279
|
-
secondary: "nt-bg-secondary nt-text-secondary-foreground hover:nt-bg-secondary-alpha-
|
|
1280
|
-
|
|
1281
|
-
ghost: "hover:nt-bg-neutral-alpha-50",
|
|
1461
|
+
default: "nt-bg-gradient-to-b nt-from-20% nt-from-primary-foreground-alpha-200 nt-to-transparent nt-bg-primary nt-text-primary-foreground nt-shadow-[0_0_0_0.5px_var(--nv-color-primary-600)] nt-relative before:nt-absolute before:nt-inset-0 before:nt-border before:nt-border-primary-foreground-alpha-100 after:nt-absolute after:nt-inset-0 after:nt-opacity-0 hover:after:nt-opacity-100 after:nt-transition-opacity after:nt-bg-gradient-to-b after:nt-from-primary-foreground-alpha-50 after:nt-to-transparent",
|
|
1462
|
+
secondary: "nt-bg-secondary nt-text-secondary-foreground nt-shadow-[0_0_0_0.5px_var(--nv-color-secondary-600)] nt-relative before:nt-absolute before:nt-inset-0 before:nt-border before:nt-border-secondary-foreground-alpha-100 after:nt-absolute after:nt-inset-0 after:nt-opacity-0 hover:after:nt-opacity-100 after:nt-transition-opacity after:nt-bg-gradient-to-b after:nt-from-secondary-foreground-alpha-50 after:nt-to-transparent",
|
|
1463
|
+
ghost: "hover:nt-bg-neutral-alpha-100 nt-text-foreground-alpha-600 hover:nt-text-foreground-alpha-800",
|
|
1282
1464
|
unstyled: ""
|
|
1283
1465
|
},
|
|
1284
1466
|
size: {
|
|
1285
1467
|
none: "",
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1468
|
+
iconSm: "nt-p-1 nt-rounded-md after:nt-rounded-md before:nt-rounded-md focus-visible:nt-rounded-md",
|
|
1469
|
+
icon: "nt-p-2.5 nt-rounded-xl before:nt-rounded-xl after:nt-rounded-xl focus-visible:nt-rounded-xl",
|
|
1470
|
+
default: "nt-px-2 nt-py-1 nt-rounded-lg focus-visible:nt-rounded-lg before:nt-rounded-lg after:nt-rounded-lg",
|
|
1471
|
+
sm: "nt-px-1 nt-py-px nt-rounded-md nt-text-xs nt-px-1 before:nt-rounded-md focus-visible:nt-rounded-md after:nt-rounded-md",
|
|
1472
|
+
lg: "nt-px-8 nt-py-2 nt-text-base before:nt-rounded-lg after:nt-rounded-lg focus-visible:nt-rounded-lg"
|
|
1290
1473
|
}
|
|
1291
1474
|
},
|
|
1292
1475
|
defaultVariants: {
|
|
@@ -1344,24 +1527,37 @@ var PopoverClose = (props) => {
|
|
|
1344
1527
|
})();
|
|
1345
1528
|
};
|
|
1346
1529
|
delegateEvents(["click"]);
|
|
1347
|
-
var
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1530
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
|
|
1531
|
+
var Root = (props) => {
|
|
1532
|
+
const [_, rest] = splitProps(props, ["class"]);
|
|
1533
|
+
const {
|
|
1534
|
+
id
|
|
1535
|
+
} = useAppearance();
|
|
1536
|
+
const style = useStyle();
|
|
1537
|
+
const {
|
|
1538
|
+
hideBranding
|
|
1539
|
+
} = useInboxContext();
|
|
1540
|
+
return [createComponent(Show, {
|
|
1541
|
+
get when() {
|
|
1542
|
+
return !hideBranding();
|
|
1543
|
+
},
|
|
1544
|
+
children: new Comment(" Powered by Novu - https://novu.co ")
|
|
1545
|
+
}), (() => {
|
|
1546
|
+
var _el$ = _tmpl$24();
|
|
1547
|
+
spread(_el$, mergeProps({
|
|
1548
|
+
get id() {
|
|
1549
|
+
return `novu-root-${id()}`;
|
|
1550
|
+
},
|
|
1551
|
+
get ["class"]() {
|
|
1552
|
+
return style("root"), cn("novu", id(), "nt-text-foreground nt-h-full");
|
|
1358
1553
|
}
|
|
1359
|
-
}));
|
|
1360
|
-
|
|
1361
|
-
});
|
|
1554
|
+
}, rest), false, false);
|
|
1555
|
+
return _el$;
|
|
1556
|
+
})()];
|
|
1557
|
+
};
|
|
1362
1558
|
var PopoverContext = createContext(void 0);
|
|
1363
1559
|
function PopoverRoot(props) {
|
|
1364
|
-
var _a
|
|
1560
|
+
var _a;
|
|
1365
1561
|
const [uncontrolledIsOpen, setUncontrolledIsOpen] = createSignal((_a = props.open) != null ? _a : false);
|
|
1366
1562
|
const onOpenChange = () => {
|
|
1367
1563
|
var _a2;
|
|
@@ -1374,23 +1570,19 @@ function PopoverRoot(props) {
|
|
|
1374
1570
|
const [reference, setReference] = createSignal(null);
|
|
1375
1571
|
const [floating, setFloating] = createSignal(null);
|
|
1376
1572
|
const position = useFloating(reference, floating, {
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
layoutShift: false
|
|
1383
|
-
}),
|
|
1384
|
-
middleware: [offset((_b = props.offset) != null ? _b : 10), flip({
|
|
1385
|
-
fallbackPlacements: props.fallbackPlacements || ["top-start"]
|
|
1573
|
+
strategy: "fixed",
|
|
1574
|
+
placement: props.placement,
|
|
1575
|
+
whileElementsMounted: autoUpdate,
|
|
1576
|
+
middleware: [offset(10), flip({
|
|
1577
|
+
fallbackPlacements: props.fallbackPlacements
|
|
1386
1578
|
}), shift()]
|
|
1387
1579
|
});
|
|
1388
1580
|
const floatingStyles = createMemo(() => {
|
|
1389
|
-
var _a2,
|
|
1581
|
+
var _a2, _b;
|
|
1390
1582
|
return {
|
|
1391
1583
|
position: position.strategy,
|
|
1392
1584
|
top: `${(_a2 = position.y) != null ? _a2 : 0}px`,
|
|
1393
|
-
left: `${(
|
|
1585
|
+
left: `${(_b = position.x) != null ? _b : 0}px`
|
|
1394
1586
|
};
|
|
1395
1587
|
});
|
|
1396
1588
|
const onClose = () => {
|
|
@@ -1424,7 +1616,8 @@ function usePopover() {
|
|
|
1424
1616
|
}
|
|
1425
1617
|
|
|
1426
1618
|
// src/ui/components/primitives/Popover/PopoverContent.tsx
|
|
1427
|
-
var
|
|
1619
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<div>`);
|
|
1620
|
+
var popoverContentVariants = () => cn("nt-w-[400px] nt-h-[600px] nt-rounded-xl nt-bg-background", "nt-shadow-popover nt-animate-in nt-slide-in-from-top-2 nt-fade-in nt-z-10 nt-cursor-default nt-flex nt-flex-col nt-overflow-hidden nt-border nt-border-border");
|
|
1428
1621
|
var PopoverContentBody = (props) => {
|
|
1429
1622
|
const {
|
|
1430
1623
|
open,
|
|
@@ -1445,29 +1638,25 @@ var PopoverContentBody = (props) => {
|
|
|
1445
1638
|
removeActive(floatingEl);
|
|
1446
1639
|
});
|
|
1447
1640
|
});
|
|
1448
|
-
return
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
}, rest));
|
|
1468
|
-
};
|
|
1469
|
-
var PopoverContent = (props) => {
|
|
1470
|
-
const [local, rest] = splitProps(props, ["portal"]);
|
|
1641
|
+
return (() => {
|
|
1642
|
+
var _el$ = _tmpl$25();
|
|
1643
|
+
use(setFloating, _el$);
|
|
1644
|
+
spread(_el$, mergeProps({
|
|
1645
|
+
get ["class"]() {
|
|
1646
|
+
return memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "popoverContent", popoverContentVariants());
|
|
1647
|
+
},
|
|
1648
|
+
get style() {
|
|
1649
|
+
return floatingStyles();
|
|
1650
|
+
},
|
|
1651
|
+
get ["data-open"]() {
|
|
1652
|
+
return open();
|
|
1653
|
+
}
|
|
1654
|
+
}, rest), false, false);
|
|
1655
|
+
return _el$;
|
|
1656
|
+
})();
|
|
1657
|
+
};
|
|
1658
|
+
var PopoverContent = (props) => {
|
|
1659
|
+
const [local, rest] = splitProps(props, ["portal"]);
|
|
1471
1660
|
const {
|
|
1472
1661
|
open,
|
|
1473
1662
|
onClose,
|
|
@@ -1530,7 +1719,7 @@ var PopoverContent = (props) => {
|
|
|
1530
1719
|
}
|
|
1531
1720
|
});
|
|
1532
1721
|
};
|
|
1533
|
-
var _tmpl$
|
|
1722
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<button>`);
|
|
1534
1723
|
var PopoverTrigger = (props) => {
|
|
1535
1724
|
const {
|
|
1536
1725
|
setReference,
|
|
@@ -1554,7 +1743,7 @@ var PopoverTrigger = (props) => {
|
|
|
1554
1743
|
}, rest));
|
|
1555
1744
|
}
|
|
1556
1745
|
return (() => {
|
|
1557
|
-
var _el$ = _tmpl$
|
|
1746
|
+
var _el$ = _tmpl$26();
|
|
1558
1747
|
_el$.$$click = handleClick;
|
|
1559
1748
|
use(setReference, _el$);
|
|
1560
1749
|
spread(_el$, mergeProps({
|
|
@@ -1586,7 +1775,7 @@ var Popover = {
|
|
|
1586
1775
|
*/
|
|
1587
1776
|
Close: PopoverClose
|
|
1588
1777
|
};
|
|
1589
|
-
var dropdownContentVariants = () => "nt-w-max nt-rounded-xl nt-p-1 nt-overflow-hidden nt-flex nt-flex-col nt-min-w-52 nt-shadow-dropdown nt-z-10 nt-bg-background";
|
|
1778
|
+
var dropdownContentVariants = () => "nt-w-max nt-rounded-xl nt-border nt-border-border nt-p-1 nt-text-sm nt-overflow-hidden nt-flex nt-flex-col nt-min-w-52 nt-shadow-dropdown nt-z-10 nt-bg-background nt-animate-in nt-slide-in-from-top-2 nt-fade-in";
|
|
1590
1779
|
var DropdownContent = (props) => {
|
|
1591
1780
|
const style = useStyle();
|
|
1592
1781
|
const [local, rest] = splitProps(props, ["appearanceKey"]);
|
|
@@ -1596,7 +1785,7 @@ var DropdownContent = (props) => {
|
|
|
1596
1785
|
}
|
|
1597
1786
|
}, rest));
|
|
1598
1787
|
};
|
|
1599
|
-
var dropdownItemVariants = () => "focus:nt-outline-none nt-rounded-lg nt-items-center hover:nt-bg-neutral-alpha-50 focus-visible:nt-bg-neutral-alpha-50 nt-py-1 nt-px-
|
|
1788
|
+
var dropdownItemVariants = () => "focus:nt-outline-none nt-text-sm nt-rounded-lg nt-items-center hover:nt-bg-neutral-alpha-50 focus-visible:nt-bg-neutral-alpha-50 nt-py-1 nt-px-2";
|
|
1600
1789
|
var DropdownItem = (props) => {
|
|
1601
1790
|
const style = useStyle();
|
|
1602
1791
|
const [local, rest] = splitProps(props, ["appearanceKey", "onClick", "class"]);
|
|
@@ -1654,25 +1843,21 @@ var Dropdown = {
|
|
|
1654
1843
|
*/
|
|
1655
1844
|
Item: DropdownItem
|
|
1656
1845
|
};
|
|
1657
|
-
var
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
get ["class"]() {
|
|
1669
|
-
return memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tabsList", tabsListVariants());
|
|
1846
|
+
var Motion = new Proxy(Motion$1, {
|
|
1847
|
+
get: (_, tag) => (props) => {
|
|
1848
|
+
const {
|
|
1849
|
+
animations
|
|
1850
|
+
} = useAppearance();
|
|
1851
|
+
return createComponent(Motion$1, mergeProps(props, {
|
|
1852
|
+
tag,
|
|
1853
|
+
get transition() {
|
|
1854
|
+
return animations() ? props.transition : {
|
|
1855
|
+
duration: 0
|
|
1856
|
+
};
|
|
1670
1857
|
}
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
})(), _tmpl$26()];
|
|
1675
|
-
};
|
|
1858
|
+
}));
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1676
1861
|
var useKeyboardNavigation = ({
|
|
1677
1862
|
activeTab,
|
|
1678
1863
|
setActiveTab,
|
|
@@ -1765,7 +1950,7 @@ var TabsRoot = (props) => {
|
|
|
1765
1950
|
use(setTabsContainer, _el$);
|
|
1766
1951
|
spread(_el$, mergeProps({
|
|
1767
1952
|
get ["class"]() {
|
|
1768
|
-
return
|
|
1953
|
+
return style(local.appearanceKey || "tabsRoot", cn(tabsRootVariants(), local.class));
|
|
1769
1954
|
}
|
|
1770
1955
|
}, rest), false, true);
|
|
1771
1956
|
insert(_el$, () => local.children);
|
|
@@ -1807,7 +1992,26 @@ var TabsContent = (props) => {
|
|
|
1807
1992
|
}
|
|
1808
1993
|
});
|
|
1809
1994
|
};
|
|
1810
|
-
var
|
|
1995
|
+
var _tmpl$29 = /* @__PURE__ */ template(`<div role=tablist>`);
|
|
1996
|
+
var _tmpl$210 = /* @__PURE__ */ template(`<div class="nt-relative nt-z-[-1]">`);
|
|
1997
|
+
var tabsListVariants = () => "nt-flex nt-gap-6";
|
|
1998
|
+
var TabsList = (props) => {
|
|
1999
|
+
const [local, rest] = splitProps(props, ["class", "appearanceKey", "ref", "children"]);
|
|
2000
|
+
const style = useStyle();
|
|
2001
|
+
return [(() => {
|
|
2002
|
+
var _el$ = _tmpl$29();
|
|
2003
|
+
var _ref$ = local.ref;
|
|
2004
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : local.ref = _el$;
|
|
2005
|
+
spread(_el$, mergeProps({
|
|
2006
|
+
get ["class"]() {
|
|
2007
|
+
return style(local.appearanceKey || "tabsList", cn(tabsListVariants(), local.class));
|
|
2008
|
+
}
|
|
2009
|
+
}, rest), false, true);
|
|
2010
|
+
insert(_el$, () => local.children);
|
|
2011
|
+
return _el$;
|
|
2012
|
+
})(), _tmpl$210()];
|
|
2013
|
+
};
|
|
2014
|
+
var tabsTriggerVariants = () => cn("nt-relative nt-transition nt-outline-none nt-text-foreground-alpha-600 nt-pb-[0.625rem]", `after:nt-absolute after:nt-content-[''] after:nt-bottom-0 after:nt-left-0 after:nt-w-full after:nt-h-[2px]`, "after:nt-transition-opacity after:nt-duration-200", "data-[state=active]:after:nt-border-b-2 data-[state=active]:after:nt-border-primary data-[state=active]:after:nt-opacity-100", "data-[state=active]:nt-text-foreground after:nt-border-b-transparent after:nt-opacity-0", "focus-visible:nt-outline-none focus-visible:nt-rounded-lg focus-visible:nt-ring-2 focus-visible:nt-ring-ring focus-visible:nt-ring-offset-2");
|
|
1811
2015
|
var TabsTrigger = (props) => {
|
|
1812
2016
|
const [local, rest] = splitProps(props, ["value", "class", "appearanceKey", "ref", "onClick", "children"]);
|
|
1813
2017
|
const style = useStyle();
|
|
@@ -1874,17 +2078,16 @@ var inboxFilterLocalizationKeys = {
|
|
|
1874
2078
|
unread: "inbox.filters.labels.unread",
|
|
1875
2079
|
archived: "inbox.filters.labels.archived"
|
|
1876
2080
|
};
|
|
1877
|
-
var _tmpl$
|
|
1878
|
-
var _tmpl$210 = /* @__PURE__ */ template(`<span>`);
|
|
2081
|
+
var _tmpl$30 = /* @__PURE__ */ template(`<span><span></span><span>`);
|
|
1879
2082
|
var cases = [{
|
|
1880
2083
|
status: "unreadRead" /* UNREAD_READ */,
|
|
1881
|
-
icon:
|
|
2084
|
+
icon: UnreadRead
|
|
1882
2085
|
}, {
|
|
1883
2086
|
status: "unread" /* UNREAD */,
|
|
1884
|
-
icon:
|
|
2087
|
+
icon: MarkAsUnread
|
|
1885
2088
|
}, {
|
|
1886
2089
|
status: "archived" /* ARCHIVED */,
|
|
1887
|
-
icon:
|
|
2090
|
+
icon: MarkAsArchived
|
|
1888
2091
|
}];
|
|
1889
2092
|
var StatusOptions = (props) => {
|
|
1890
2093
|
return createComponent(For, {
|
|
@@ -1919,11 +2122,11 @@ var StatusItem = (props) => {
|
|
|
1919
2122
|
},
|
|
1920
2123
|
get children() {
|
|
1921
2124
|
return [(() => {
|
|
1922
|
-
var _el$ = _tmpl$
|
|
2125
|
+
var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
1923
2126
|
insert(_el$2, () => props.icon());
|
|
1924
2127
|
insert(_el$3, () => t(props.localizationKey));
|
|
1925
2128
|
effect((_p$) => {
|
|
1926
|
-
var _v$ = style("inboxStatus__dropdownItemLabelContainer", "nt-flex nt-gap-2 nt-items-center"), _v$2 = style("inboxStatus__dropdownItemLeft__icon"), _v$3 = props.localizationKey, _v$4 = style("inboxStatus__dropdownItemLabel");
|
|
2129
|
+
var _v$ = style("inboxStatus__dropdownItemLabelContainer", "nt-flex nt-gap-2 nt-items-center"), _v$2 = style("inboxStatus__dropdownItemLeft__icon", "nt-size-3"), _v$3 = props.localizationKey, _v$4 = style("inboxStatus__dropdownItemLabel");
|
|
1927
2130
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
1928
2131
|
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
1929
2132
|
_v$3 !== _p$.a && setAttribute(_el$3, "data-localization", _p$.a = _v$3);
|
|
@@ -1941,10 +2144,11 @@ var StatusItem = (props) => {
|
|
|
1941
2144
|
return props.isSelected;
|
|
1942
2145
|
},
|
|
1943
2146
|
get children() {
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2147
|
+
return createComponent(Check, {
|
|
2148
|
+
get ["class"]() {
|
|
2149
|
+
return style("inboxStatus__dropdownItemCheck__icon", "nt-size-3");
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
1948
2152
|
}
|
|
1949
2153
|
})];
|
|
1950
2154
|
}
|
|
@@ -1952,7 +2156,7 @@ var StatusItem = (props) => {
|
|
|
1952
2156
|
};
|
|
1953
2157
|
|
|
1954
2158
|
// src/ui/components/elements/InboxStatus/InboxStatusDropdown.tsx
|
|
1955
|
-
var _tmpl$
|
|
2159
|
+
var _tmpl$31 = /* @__PURE__ */ template(`<span>`);
|
|
1956
2160
|
var StatusDropdown = () => {
|
|
1957
2161
|
const style = useStyle();
|
|
1958
2162
|
const {
|
|
@@ -1969,7 +2173,7 @@ var StatusDropdown = () => {
|
|
|
1969
2173
|
return style("inboxStatus__dropdownTrigger", cn(buttonVariants({
|
|
1970
2174
|
variant: "unstyled",
|
|
1971
2175
|
size: "none"
|
|
1972
|
-
}), "nt-gap-
|
|
2176
|
+
}), "nt-gap-0.5"));
|
|
1973
2177
|
},
|
|
1974
2178
|
asChild: (triggerProps) => createComponent(Button, mergeProps({
|
|
1975
2179
|
variant: "unstyled",
|
|
@@ -1977,10 +2181,10 @@ var StatusDropdown = () => {
|
|
|
1977
2181
|
}, triggerProps, {
|
|
1978
2182
|
get children() {
|
|
1979
2183
|
return [(() => {
|
|
1980
|
-
var _el$ = _tmpl$
|
|
2184
|
+
var _el$ = _tmpl$31();
|
|
1981
2185
|
insert(_el$, () => t(inboxFilterLocalizationKeys[status()]));
|
|
1982
2186
|
effect((_p$) => {
|
|
1983
|
-
var _v$ = inboxFilterLocalizationKeys[status()], _v$2 = style("inboxStatus__title", "nt-text-
|
|
2187
|
+
var _v$ = inboxFilterLocalizationKeys[status()], _v$2 = style("inboxStatus__title", "nt-text-base");
|
|
1984
2188
|
_v$ !== _p$.e && setAttribute(_el$, "data-localization", _p$.e = _v$);
|
|
1985
2189
|
_v$2 !== _p$.t && className(_el$, _p$.t = _v$2);
|
|
1986
2190
|
return _p$;
|
|
@@ -1989,12 +2193,11 @@ var StatusDropdown = () => {
|
|
|
1989
2193
|
t: void 0
|
|
1990
2194
|
});
|
|
1991
2195
|
return _el$;
|
|
1992
|
-
})(), (
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
})()];
|
|
2196
|
+
})(), createComponent(ArrowDropDown, {
|
|
2197
|
+
get ["class"]() {
|
|
2198
|
+
return style("inboxStatus__dropdownItemRight__icon", "nt-text-foreground-alpha-600 nt-size-4");
|
|
2199
|
+
}
|
|
2200
|
+
})];
|
|
1998
2201
|
}
|
|
1999
2202
|
}))
|
|
2000
2203
|
}), createComponent(Dropdown.Content, {
|
|
@@ -2011,14 +2214,49 @@ var StatusDropdown = () => {
|
|
|
2011
2214
|
}
|
|
2012
2215
|
});
|
|
2013
2216
|
};
|
|
2217
|
+
|
|
2218
|
+
// src/ui/api/hooks/useArchiveAll.ts
|
|
2219
|
+
var useArchiveAll = (props) => {
|
|
2220
|
+
const novu = useNovu();
|
|
2221
|
+
const archiveAll = (..._0) => __async(void 0, [..._0], function* ({ tags } = {}) {
|
|
2222
|
+
var _a, _b;
|
|
2223
|
+
try {
|
|
2224
|
+
yield novu.notifications.archiveAll({ tags });
|
|
2225
|
+
(_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
|
|
2226
|
+
} catch (error) {
|
|
2227
|
+
(_b = void 0 ) == null ? void 0 : _b.call(props, error);
|
|
2228
|
+
}
|
|
2229
|
+
});
|
|
2230
|
+
return { archiveAll };
|
|
2231
|
+
};
|
|
2232
|
+
|
|
2233
|
+
// src/ui/api/hooks/useArchiveAllRead.ts
|
|
2234
|
+
var useArchiveAllRead = (props) => {
|
|
2235
|
+
const novu = useNovu();
|
|
2236
|
+
const archiveAllRead = (..._0) => __async(void 0, [..._0], function* ({ tags } = {}) {
|
|
2237
|
+
var _a, _b;
|
|
2238
|
+
try {
|
|
2239
|
+
yield novu.notifications.archiveAllRead({ tags });
|
|
2240
|
+
(_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
|
|
2241
|
+
} catch (error) {
|
|
2242
|
+
(_b = void 0 ) == null ? void 0 : _b.call(props, error);
|
|
2243
|
+
}
|
|
2244
|
+
});
|
|
2245
|
+
return { archiveAllRead };
|
|
2246
|
+
};
|
|
2014
2247
|
var useNotificationsInfiniteScroll = (props) => {
|
|
2015
2248
|
const novu = useNovu();
|
|
2016
2249
|
let filter = __spreadValues({}, props.options());
|
|
2017
|
-
const [data, { initialLoading, setEl, end, mutate, reset }] = createInfiniteScroll(
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2250
|
+
const [data, { initialLoading, setEl, end, mutate, reset }] = createInfiniteScroll(
|
|
2251
|
+
(after) => __async(void 0, null, function* () {
|
|
2252
|
+
var _a, _b;
|
|
2253
|
+
const { data: data2 } = yield novu.notifications.list(__spreadProps(__spreadValues({}, props.options() || {}), { after }));
|
|
2254
|
+
return { data: (_a = data2 == null ? void 0 : data2.notifications) != null ? _a : [], hasMore: (_b = data2 == null ? void 0 : data2.hasMore) != null ? _b : false };
|
|
2255
|
+
}),
|
|
2256
|
+
{
|
|
2257
|
+
paginationField: "id"
|
|
2258
|
+
}
|
|
2259
|
+
);
|
|
2022
2260
|
onMount(() => {
|
|
2023
2261
|
const listener = ({ data: data2 }) => {
|
|
2024
2262
|
if (!data2 || !isSameFilter(filter, data2.filter)) {
|
|
@@ -2029,19 +2267,19 @@ var useNotificationsInfiniteScroll = (props) => {
|
|
|
2029
2267
|
const cleanup = novu.on("notifications.list.updated", listener);
|
|
2030
2268
|
onCleanup(() => cleanup());
|
|
2031
2269
|
});
|
|
2032
|
-
createEffect(() => {
|
|
2270
|
+
createEffect(() => __async(void 0, null, function* () {
|
|
2033
2271
|
const newFilter = __spreadValues({}, props.options());
|
|
2034
2272
|
if (isSameFilter(filter, newFilter)) {
|
|
2035
2273
|
return;
|
|
2036
2274
|
}
|
|
2037
2275
|
novu.notifications.clearCache();
|
|
2038
|
-
reset();
|
|
2276
|
+
yield reset();
|
|
2039
2277
|
filter = newFilter;
|
|
2040
|
-
});
|
|
2041
|
-
const refetch = ({ filter: filter2 })
|
|
2278
|
+
}));
|
|
2279
|
+
const refetch = (_0) => __async(void 0, [_0], function* ({ filter: filter2 }) {
|
|
2042
2280
|
novu.notifications.clearCache({ filter: filter2 });
|
|
2043
|
-
reset();
|
|
2044
|
-
};
|
|
2281
|
+
yield reset();
|
|
2282
|
+
});
|
|
2045
2283
|
return { data, initialLoading, setEl, end, refetch };
|
|
2046
2284
|
};
|
|
2047
2285
|
var usePreferences = (options) => {
|
|
@@ -2087,38 +2325,8 @@ var useReadAll = (props) => {
|
|
|
2087
2325
|
return { readAll };
|
|
2088
2326
|
};
|
|
2089
2327
|
|
|
2090
|
-
// src/ui/api/hooks/useArchiveAll.ts
|
|
2091
|
-
var useArchiveAll = (props) => {
|
|
2092
|
-
const novu = useNovu();
|
|
2093
|
-
const archiveAll = (..._0) => __async(void 0, [..._0], function* ({ tags } = {}) {
|
|
2094
|
-
var _a, _b;
|
|
2095
|
-
try {
|
|
2096
|
-
yield novu.notifications.archiveAll({ tags });
|
|
2097
|
-
(_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
|
|
2098
|
-
} catch (error) {
|
|
2099
|
-
(_b = void 0 ) == null ? void 0 : _b.call(props, error);
|
|
2100
|
-
}
|
|
2101
|
-
});
|
|
2102
|
-
return { archiveAll };
|
|
2103
|
-
};
|
|
2104
|
-
|
|
2105
|
-
// src/ui/api/hooks/useArchiveAllRead.ts
|
|
2106
|
-
var useArchiveAllRead = (props) => {
|
|
2107
|
-
const novu = useNovu();
|
|
2108
|
-
const archiveAllRead = (..._0) => __async(void 0, [..._0], function* ({ tags } = {}) {
|
|
2109
|
-
var _a, _b;
|
|
2110
|
-
try {
|
|
2111
|
-
yield novu.notifications.archiveAllRead({ tags });
|
|
2112
|
-
(_a = props == null ? void 0 : props.onSuccess) == null ? void 0 : _a.call(props);
|
|
2113
|
-
} catch (error) {
|
|
2114
|
-
(_b = void 0 ) == null ? void 0 : _b.call(props, error);
|
|
2115
|
-
}
|
|
2116
|
-
});
|
|
2117
|
-
return { archiveAllRead };
|
|
2118
|
-
};
|
|
2119
|
-
|
|
2120
2328
|
// src/ui/components/elements/Header/MoreActionsOptions.tsx
|
|
2121
|
-
var _tmpl$
|
|
2329
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<span>`);
|
|
2122
2330
|
var MoreActionsOptions = () => {
|
|
2123
2331
|
const {
|
|
2124
2332
|
filter
|
|
@@ -2137,19 +2345,19 @@ var MoreActionsOptions = () => {
|
|
|
2137
2345
|
onClick: () => readAll({
|
|
2138
2346
|
tags: filter().tags
|
|
2139
2347
|
}),
|
|
2140
|
-
icon:
|
|
2348
|
+
icon: MarkAsRead
|
|
2141
2349
|
}), createComponent(ActionsItem, {
|
|
2142
2350
|
localizationKey: "notifications.actions.archiveAll",
|
|
2143
2351
|
onClick: () => archiveAll({
|
|
2144
2352
|
tags: filter().tags
|
|
2145
2353
|
}),
|
|
2146
|
-
icon:
|
|
2354
|
+
icon: MarkAsArchived
|
|
2147
2355
|
}), createComponent(ActionsItem, {
|
|
2148
2356
|
localizationKey: "notifications.actions.archiveRead",
|
|
2149
2357
|
onClick: () => archiveAllRead({
|
|
2150
2358
|
tags: filter().tags
|
|
2151
2359
|
}),
|
|
2152
|
-
icon:
|
|
2360
|
+
icon: MarkAsArchivedRead
|
|
2153
2361
|
})];
|
|
2154
2362
|
};
|
|
2155
2363
|
var ActionsItem = (props) => {
|
|
@@ -2166,12 +2374,12 @@ var ActionsItem = (props) => {
|
|
|
2166
2374
|
},
|
|
2167
2375
|
get children() {
|
|
2168
2376
|
return [(() => {
|
|
2169
|
-
var _el$ = _tmpl$
|
|
2377
|
+
var _el$ = _tmpl$32();
|
|
2170
2378
|
insert(_el$, () => props.icon());
|
|
2171
|
-
effect(() => className(_el$, style("moreActions__dropdownItemLeft__icon", "nt-
|
|
2379
|
+
effect(() => className(_el$, style("moreActions__dropdownItemLeft__icon", "nt-size-3")));
|
|
2172
2380
|
return _el$;
|
|
2173
2381
|
})(), (() => {
|
|
2174
|
-
var _el$2 = _tmpl$
|
|
2382
|
+
var _el$2 = _tmpl$32();
|
|
2175
2383
|
insert(_el$2, () => t(props.localizationKey));
|
|
2176
2384
|
effect((_p$) => {
|
|
2177
2385
|
var _v$ = props.localizationKey, _v$2 = style("moreActions__dropdownItemLabel");
|
|
@@ -2206,13 +2414,13 @@ var MoreActionsDropdown = () => {
|
|
|
2206
2414
|
return style("moreActions__dropdownTrigger");
|
|
2207
2415
|
},
|
|
2208
2416
|
asChild: (triggerProps) => createComponent(Button, mergeProps({
|
|
2209
|
-
variant: "
|
|
2210
|
-
size: "
|
|
2417
|
+
variant: "ghost",
|
|
2418
|
+
size: "iconSm"
|
|
2211
2419
|
}, triggerProps, {
|
|
2212
2420
|
get children() {
|
|
2213
2421
|
return createComponent(Dots, {
|
|
2214
2422
|
get ["class"]() {
|
|
2215
|
-
return style("moreActions__dots");
|
|
2423
|
+
return style("moreActions__dots", "nt-size-5");
|
|
2216
2424
|
}
|
|
2217
2425
|
});
|
|
2218
2426
|
}
|
|
@@ -2230,11 +2438,11 @@ var MoreActionsDropdown = () => {
|
|
|
2230
2438
|
};
|
|
2231
2439
|
|
|
2232
2440
|
// src/ui/components/elements/Header/ActionsContainer.tsx
|
|
2233
|
-
var _tmpl$
|
|
2441
|
+
var _tmpl$33 = /* @__PURE__ */ template(`<div>`);
|
|
2234
2442
|
var ActionsContainer = (props) => {
|
|
2235
2443
|
const style = useStyle();
|
|
2236
2444
|
return (() => {
|
|
2237
|
-
var _el$ = _tmpl$
|
|
2445
|
+
var _el$ = _tmpl$33();
|
|
2238
2446
|
insert(_el$, createComponent(MoreActionsDropdown, {}), null);
|
|
2239
2447
|
insert(_el$, createComponent(Show, {
|
|
2240
2448
|
get when() {
|
|
@@ -2242,99 +2450,68 @@ var ActionsContainer = (props) => {
|
|
|
2242
2450
|
},
|
|
2243
2451
|
children: (showPreferences) => createComponent(Button, {
|
|
2244
2452
|
appearanceKey: "preferences__button",
|
|
2245
|
-
variant: "
|
|
2246
|
-
size: "
|
|
2453
|
+
variant: "ghost",
|
|
2454
|
+
size: "iconSm",
|
|
2247
2455
|
get onClick() {
|
|
2248
2456
|
return showPreferences();
|
|
2249
2457
|
},
|
|
2250
2458
|
get children() {
|
|
2251
|
-
return createComponent(Settings, {
|
|
2459
|
+
return createComponent(Settings, {
|
|
2460
|
+
get ["class"]() {
|
|
2461
|
+
return style("preferences__icon", "nt-size-5");
|
|
2462
|
+
}
|
|
2463
|
+
});
|
|
2252
2464
|
}
|
|
2253
2465
|
})
|
|
2254
2466
|
}), null);
|
|
2255
|
-
effect(() => className(_el$, style("moreActionsContainer", "nt-flex nt-gap-
|
|
2467
|
+
effect(() => className(_el$, style("moreActionsContainer", "nt-flex nt-gap-3")));
|
|
2256
2468
|
return _el$;
|
|
2257
2469
|
})();
|
|
2258
2470
|
};
|
|
2259
2471
|
|
|
2260
2472
|
// src/ui/components/elements/Header/Header.tsx
|
|
2261
|
-
var _tmpl$
|
|
2473
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<div>`);
|
|
2262
2474
|
var Header = (props) => {
|
|
2263
2475
|
const style = useStyle();
|
|
2264
2476
|
return (() => {
|
|
2265
|
-
var _el$ = _tmpl$
|
|
2477
|
+
var _el$ = _tmpl$34();
|
|
2266
2478
|
insert(_el$, createComponent(StatusDropdown, {}), null);
|
|
2267
2479
|
insert(_el$, createComponent(ActionsContainer, {
|
|
2268
2480
|
get showPreferences() {
|
|
2269
2481
|
return props.navigateToPreferences;
|
|
2270
2482
|
}
|
|
2271
2483
|
}), null);
|
|
2272
|
-
effect(() => className(_el$, style("inboxHeader", cn("nt-flex nt-shrink-0 nt-justify-between nt-items-center nt-w-full nt-
|
|
2273
|
-
return _el$;
|
|
2274
|
-
})();
|
|
2275
|
-
};
|
|
2276
|
-
var _tmpl$34 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
|
|
2277
|
-
var _tmpl$211 = /* @__PURE__ */ template(`<button>`);
|
|
2278
|
-
var PreferencesHeader = (props) => {
|
|
2279
|
-
const style = useStyle();
|
|
2280
|
-
const {
|
|
2281
|
-
t
|
|
2282
|
-
} = useLocalization();
|
|
2283
|
-
return (() => {
|
|
2284
|
-
var _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
|
|
2285
|
-
insert(_el$, createComponent(Show, {
|
|
2286
|
-
get when() {
|
|
2287
|
-
return props.navigateToNotifications;
|
|
2288
|
-
},
|
|
2289
|
-
children: (navigateToNotifications) => (() => {
|
|
2290
|
-
var _el$3 = _tmpl$211();
|
|
2291
|
-
addEventListener(_el$3, "click", navigateToNotifications(), true);
|
|
2292
|
-
insert(_el$3, createComponent(ArrowLeft, {}));
|
|
2293
|
-
effect(() => className(_el$3, style("preferencesHeader__back__button", "nt-h-6 nt-w-6 nt-flex nt-justify-center nt-items-center nt-rounded-md nt-relative hover:nt-bg-foreground-alpha-50 focus:nt-bg-foreground-alpha-50 nt-text-foreground-alpha-600")));
|
|
2294
|
-
return _el$3;
|
|
2295
|
-
})()
|
|
2296
|
-
}), _el$2);
|
|
2297
|
-
insert(_el$2, () => t("preferences.title"));
|
|
2298
|
-
effect((_p$) => {
|
|
2299
|
-
var _v$ = style("preferencesHeader", "nt-flex nt-items-center nt-py-5 nt-px-6 nt-gap-2"), _v$2 = style("preferencesHeader__title", "nt-text-xl nt-font-semibold");
|
|
2300
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
2301
|
-
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
2302
|
-
return _p$;
|
|
2303
|
-
}, {
|
|
2304
|
-
e: void 0,
|
|
2305
|
-
t: void 0
|
|
2306
|
-
});
|
|
2484
|
+
effect(() => className(_el$, style("inboxHeader", cn("nt-flex nt-bg-neutral-alpha-25 nt-shrink-0 nt-justify-between nt-items-center nt-w-full nt-pb-2 nt-pt-2.5 nt-px-4"))));
|
|
2307
2485
|
return _el$;
|
|
2308
2486
|
})();
|
|
2309
2487
|
};
|
|
2310
|
-
delegateEvents(["click"]);
|
|
2311
2488
|
var _tmpl$35 = /* @__PURE__ */ template(`<div>`);
|
|
2312
|
-
var
|
|
2313
|
-
const [_, rest] = splitProps(props, ["class"]);
|
|
2314
|
-
const {
|
|
2315
|
-
id
|
|
2316
|
-
} = useAppearance();
|
|
2489
|
+
var Collapsible = (props) => {
|
|
2317
2490
|
const style = useStyle();
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
},
|
|
2325
|
-
children: new Comment(" Powered by Novu - https://novu.co ")
|
|
2326
|
-
}), (() => {
|
|
2491
|
+
let contentRef;
|
|
2492
|
+
const [enableTransition, setEnableTransition] = createSignal(false);
|
|
2493
|
+
createEffect(() => {
|
|
2494
|
+
requestAnimationFrame(() => setEnableTransition(true));
|
|
2495
|
+
});
|
|
2496
|
+
return (() => {
|
|
2327
2497
|
var _el$ = _tmpl$35();
|
|
2498
|
+
var _ref$ = contentRef;
|
|
2499
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : contentRef = _el$;
|
|
2328
2500
|
spread(_el$, mergeProps({
|
|
2329
|
-
get id() {
|
|
2330
|
-
return `novu-root-${id()}`;
|
|
2331
|
-
},
|
|
2332
2501
|
get ["class"]() {
|
|
2333
|
-
return style("
|
|
2502
|
+
return style("collapsible", props.class);
|
|
2503
|
+
},
|
|
2504
|
+
get style() {
|
|
2505
|
+
return {
|
|
2506
|
+
overflow: "hidden",
|
|
2507
|
+
opacity: props.open ? 1 : 0,
|
|
2508
|
+
transition: enableTransition() ? "height 250ms ease-in-out, opacity 250ms ease-in-out" : "none",
|
|
2509
|
+
height: props.open ? `${contentRef == null ? void 0 : contentRef.scrollHeight}px` : "0px"
|
|
2510
|
+
};
|
|
2334
2511
|
}
|
|
2335
|
-
},
|
|
2512
|
+
}, props), false, false);
|
|
2336
2513
|
return _el$;
|
|
2337
|
-
})()
|
|
2514
|
+
})();
|
|
2338
2515
|
};
|
|
2339
2516
|
var _tmpl$36 = /* @__PURE__ */ template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
|
|
2340
2517
|
var Switch = (props) => {
|
|
@@ -2345,7 +2522,7 @@ var Switch = (props) => {
|
|
|
2345
2522
|
props.onChange(e.target.checked);
|
|
2346
2523
|
});
|
|
2347
2524
|
effect((_p$) => {
|
|
2348
|
-
var _v$ = style("channelSwitch", `nt-relative nt-inline-flex nt-cursor-pointer nt-items-center`), _v$2 = style("channelSwitchThumb", `nt-peer nt-h-
|
|
2525
|
+
var _v$ = style("channelSwitch", `nt-relative nt-inline-flex nt-cursor-pointer nt-items-center`), _v$2 = style("channelSwitchThumb", `nt-peer nt-h-4 nt-w-7 nt-rounded-full peer-checked:nt-shadow-none peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300 after:nt-absolute after:nt-top-0.5 after:nt-size-3 after:nt-left-0.5 after:nt-rounded-full after:nt-bg-background after:nt-transition-all after:nt-content-[''] peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full peer-checked:after:nt-border-background nt-transition-all nt-duration-200 after:nt-duration-200 shadow-sm`), _v$3 = props.checked;
|
|
2349
2526
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
2350
2527
|
_v$2 !== _p$.t && className(_el$3, _p$.t = _v$2);
|
|
2351
2528
|
_v$3 !== _p$.a && setAttribute(_el$3, "data-checked", _p$.a = _v$3);
|
|
@@ -2371,15 +2548,17 @@ var ChannelRow = (props) => {
|
|
|
2371
2548
|
workflowId: props.workflowId
|
|
2372
2549
|
});
|
|
2373
2550
|
});
|
|
2374
|
-
const onChange = (checked) => {
|
|
2375
|
-
updatePreference(checked);
|
|
2376
|
-
};
|
|
2551
|
+
const onChange = (checked) => __async(void 0, null, function* () {
|
|
2552
|
+
yield updatePreference(checked);
|
|
2553
|
+
});
|
|
2377
2554
|
return (() => {
|
|
2378
2555
|
var _el$ = _tmpl$37(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
|
|
2379
2556
|
insert(_el$3, createComponent(ChannelIcon, {
|
|
2557
|
+
appearanceKey: "channel__icon",
|
|
2380
2558
|
get channel() {
|
|
2381
2559
|
return props.channel;
|
|
2382
|
-
}
|
|
2560
|
+
},
|
|
2561
|
+
"class": "nt-size-3"
|
|
2383
2562
|
}));
|
|
2384
2563
|
insert(_el$4, () => getLabel(props.channel));
|
|
2385
2564
|
insert(_el$5, createComponent(Switch, {
|
|
@@ -2389,33 +2568,56 @@ var ChannelRow = (props) => {
|
|
|
2389
2568
|
onChange: (checked) => onChange(checked)
|
|
2390
2569
|
}));
|
|
2391
2570
|
effect((_p$) => {
|
|
2392
|
-
var _v$ = style("channelContainer", "nt-flex nt-justify-between nt-items-center nt-
|
|
2571
|
+
var _v$ = style("channelContainer", "nt-flex nt-justify-between nt-items-center nt-gap-2 data-[disabled=true]:nt-text-foreground-alpha-600"), _v$2 = style("channelLabelContainer", "nt-flex nt-items-center nt-gap-2 nt-text-foreground"), _v$3 = style("channelIconContainer", "nt-p-1 nt-rounded-md nt-bg-neutral-alpha-25 nt-text-foreground-alpha-300"), _v$4 = style("channelLabel", "nt-text-sm nt-font-semibold"), _v$5 = style("channelSwitchContainer", "nt-flex nt-items-center");
|
|
2393
2572
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
2394
2573
|
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
2395
|
-
_v$3 !== _p$.a && className(_el$
|
|
2396
|
-
_v$4 !== _p$.o && className(_el$
|
|
2574
|
+
_v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
|
|
2575
|
+
_v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
|
|
2576
|
+
_v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
|
|
2397
2577
|
return _p$;
|
|
2398
2578
|
}, {
|
|
2399
2579
|
e: void 0,
|
|
2400
2580
|
t: void 0,
|
|
2401
2581
|
a: void 0,
|
|
2402
|
-
o: void 0
|
|
2582
|
+
o: void 0,
|
|
2583
|
+
i: void 0
|
|
2403
2584
|
});
|
|
2404
2585
|
return _el$;
|
|
2405
2586
|
})();
|
|
2406
2587
|
};
|
|
2407
2588
|
var ChannelIcon = (props) => {
|
|
2589
|
+
const style = useStyle();
|
|
2408
2590
|
switch (props.channel) {
|
|
2409
2591
|
case "in_app" /* IN_APP */:
|
|
2410
|
-
return createComponent(InApp, {
|
|
2592
|
+
return createComponent(InApp, {
|
|
2593
|
+
get ["class"]() {
|
|
2594
|
+
return style(props.appearanceKey, props.class);
|
|
2595
|
+
}
|
|
2596
|
+
});
|
|
2411
2597
|
case "email" /* EMAIL */:
|
|
2412
|
-
return createComponent(Email, {
|
|
2598
|
+
return createComponent(Email, {
|
|
2599
|
+
get ["class"]() {
|
|
2600
|
+
return style(props.appearanceKey, props.class);
|
|
2601
|
+
}
|
|
2602
|
+
});
|
|
2413
2603
|
case "push" /* PUSH */:
|
|
2414
|
-
return createComponent(Push, {
|
|
2604
|
+
return createComponent(Push, {
|
|
2605
|
+
get ["class"]() {
|
|
2606
|
+
return style(props.appearanceKey, props.class);
|
|
2607
|
+
}
|
|
2608
|
+
});
|
|
2415
2609
|
case "sms" /* SMS */:
|
|
2416
|
-
return createComponent(Sms, {
|
|
2610
|
+
return createComponent(Sms, {
|
|
2611
|
+
get ["class"]() {
|
|
2612
|
+
return style(props.appearanceKey, props.class);
|
|
2613
|
+
}
|
|
2614
|
+
});
|
|
2417
2615
|
case "chat" /* CHAT */:
|
|
2418
|
-
return createComponent(Chat, {
|
|
2616
|
+
return createComponent(Chat, {
|
|
2617
|
+
get ["class"]() {
|
|
2618
|
+
return style(props.appearanceKey, props.class);
|
|
2619
|
+
}
|
|
2620
|
+
});
|
|
2419
2621
|
default:
|
|
2420
2622
|
return null;
|
|
2421
2623
|
}
|
|
@@ -2437,11 +2639,12 @@ var getLabel = (channel) => {
|
|
|
2437
2639
|
}
|
|
2438
2640
|
};
|
|
2439
2641
|
var _tmpl$38 = /* @__PURE__ */ template(`<div>`);
|
|
2642
|
+
var _tmpl$211 = /* @__PURE__ */ template(`<div><div></div><div>`);
|
|
2440
2643
|
var SkeletonText = (props) => {
|
|
2441
2644
|
const style = useStyle();
|
|
2442
2645
|
return (() => {
|
|
2443
2646
|
var _el$ = _tmpl$38();
|
|
2444
|
-
effect(() => className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-foreground-alpha-
|
|
2647
|
+
effect(() => className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
|
|
2445
2648
|
return _el$;
|
|
2446
2649
|
})();
|
|
2447
2650
|
};
|
|
@@ -2449,61 +2652,162 @@ var SkeletonAvatar = (props) => {
|
|
|
2449
2652
|
const style = useStyle();
|
|
2450
2653
|
return (() => {
|
|
2451
2654
|
var _el$2 = _tmpl$38();
|
|
2452
|
-
effect(() => className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-foreground-alpha-
|
|
2655
|
+
effect(() => className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
|
|
2453
2656
|
return _el$2;
|
|
2454
2657
|
})();
|
|
2455
2658
|
};
|
|
2456
|
-
|
|
2457
|
-
// src/ui/components/elements/Preferences/LoadingScreen.tsx
|
|
2458
|
-
var _tmpl$39 = /* @__PURE__ */ template(`<div><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-1 nt-flex-1"></div><div>`);
|
|
2459
|
-
var LoadingScreen = () => {
|
|
2460
|
-
return createComponent(For, {
|
|
2461
|
-
get each() {
|
|
2462
|
-
return Array.from({
|
|
2463
|
-
length: 8
|
|
2464
|
-
});
|
|
2465
|
-
},
|
|
2466
|
-
children: () => createComponent(LoadingSkeleton, {})
|
|
2467
|
-
});
|
|
2468
|
-
};
|
|
2469
|
-
var LoadingSkeleton = () => {
|
|
2659
|
+
var SkeletonSwitch = (props) => {
|
|
2470
2660
|
const style = useStyle();
|
|
2471
2661
|
return (() => {
|
|
2472
|
-
var _el$ = _tmpl$
|
|
2473
|
-
|
|
2474
|
-
appearanceKey
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2662
|
+
var _el$3 = _tmpl$211(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
2663
|
+
effect((_p$) => {
|
|
2664
|
+
var _v$ = style(props.appearanceKey, cn("nt-relative nt-inline-flex nt-items-center", props.class)), _v$2 = style(props.appearanceKey, "nt-h-4 nt-w-7 nt-rounded-full nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent"), _v$3 = style(props.thumbAppearanceKey, "nt-absolute nt-top-0.5 nt-left-0.5 nt-size-3 nt-rounded-full nt-bg-background nt-shadow");
|
|
2665
|
+
_v$ !== _p$.e && className(_el$3, _p$.e = _v$);
|
|
2666
|
+
_v$2 !== _p$.t && className(_el$4, _p$.t = _v$2);
|
|
2667
|
+
_v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
|
|
2668
|
+
return _p$;
|
|
2669
|
+
}, {
|
|
2670
|
+
e: void 0,
|
|
2671
|
+
t: void 0,
|
|
2672
|
+
a: void 0
|
|
2673
|
+
});
|
|
2674
|
+
return _el$3;
|
|
2484
2675
|
})();
|
|
2485
2676
|
};
|
|
2486
2677
|
|
|
2487
|
-
// src/ui/components/elements/Preferences/
|
|
2488
|
-
var _tmpl$
|
|
2489
|
-
var
|
|
2490
|
-
var
|
|
2491
|
-
var Preferences = () => {
|
|
2492
|
-
var _a;
|
|
2678
|
+
// src/ui/components/elements/Preferences/PreferencesListSkeleton.tsx
|
|
2679
|
+
var _tmpl$39 = /* @__PURE__ */ template(`<div>`);
|
|
2680
|
+
var channelIcons = [InApp, Email, Sms, Push, Chat];
|
|
2681
|
+
var PreferencesListSkeleton = (props) => {
|
|
2493
2682
|
const style = useStyle();
|
|
2494
2683
|
const {
|
|
2495
|
-
|
|
2496
|
-
} =
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2684
|
+
t
|
|
2685
|
+
} = useLocalization();
|
|
2686
|
+
return (() => {
|
|
2687
|
+
var _el$ = _tmpl$39();
|
|
2688
|
+
insert(_el$, createComponent(Motion.div, {
|
|
2689
|
+
get animate() {
|
|
2690
|
+
return {
|
|
2691
|
+
scale: props.loading ? 1 : 0.7
|
|
2692
|
+
};
|
|
2693
|
+
},
|
|
2694
|
+
transition: {
|
|
2695
|
+
duration: 0.6,
|
|
2696
|
+
easing: [0.39, 0.24, 0.3, 1],
|
|
2697
|
+
delay: 0.3
|
|
2698
|
+
},
|
|
2699
|
+
get ["class"]() {
|
|
2700
|
+
return style("preferencesList__skeleton", "nt-flex nt-relative nt-mx-auto nt-flex-col nt-w-full nt-mb-4");
|
|
2701
|
+
},
|
|
2702
|
+
get children() {
|
|
2703
|
+
return [memo(() => Array.from({
|
|
2704
|
+
length: 5
|
|
2705
|
+
}).map((_, i) => {
|
|
2706
|
+
const Icon = channelIcons[i];
|
|
2707
|
+
return createComponent(Motion.div, {
|
|
2708
|
+
get animate() {
|
|
2709
|
+
return {
|
|
2710
|
+
marginBottom: props.loading ? 0 : "16px",
|
|
2711
|
+
borderWidth: props.loading ? 0 : "1px",
|
|
2712
|
+
borderRadius: props.loading ? 0 : "var(--nv-radius-lg)"
|
|
2713
|
+
};
|
|
2714
|
+
},
|
|
2715
|
+
transition: {
|
|
2716
|
+
duration: 0.5,
|
|
2717
|
+
delay: 0.3,
|
|
2718
|
+
easing: "ease-in-out"
|
|
2719
|
+
},
|
|
2720
|
+
get ["class"]() {
|
|
2721
|
+
return style("preferencesList__skeletonContent", "nt-flex nt-border-neutral-alpha-50 nt-items-center nt-gap-3 nt-p-3 nt-bg-neutral-alpha-25");
|
|
2722
|
+
},
|
|
2723
|
+
get children() {
|
|
2724
|
+
return [createComponent(Icon, {
|
|
2725
|
+
get ["class"]() {
|
|
2726
|
+
return style("preferencesList__skeletonIcon", "nt-size-8 nt-p-2 nt-rounded-lg nt-bg-neutral-alpha-100");
|
|
2727
|
+
}
|
|
2728
|
+
}), (() => {
|
|
2729
|
+
var _el$3 = _tmpl$39();
|
|
2730
|
+
insert(_el$3, createComponent(SkeletonText, {
|
|
2731
|
+
appearanceKey: "notificationList__skeletonText",
|
|
2732
|
+
"class": "nt-h-2 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
2733
|
+
}), null);
|
|
2734
|
+
insert(_el$3, createComponent(SkeletonText, {
|
|
2735
|
+
appearanceKey: "preferencesList__skeletonText",
|
|
2736
|
+
"class": "nt-h-2 nt-w-2/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
2737
|
+
}), null);
|
|
2738
|
+
effect(() => className(_el$3, style("preferencesList__skeletonItem", "nt-flex nt-flex-col nt-gap-2 nt-flex-1")));
|
|
2739
|
+
return _el$3;
|
|
2740
|
+
})(), createComponent(SkeletonSwitch, {
|
|
2741
|
+
appearanceKey: "preferencesList__skeletonSwitch",
|
|
2742
|
+
thumbAppearanceKey: "preferencesList__skeletonSwitchThumb"
|
|
2743
|
+
})];
|
|
2744
|
+
}
|
|
2745
|
+
});
|
|
2746
|
+
})), (() => {
|
|
2747
|
+
var _el$2 = _tmpl$39();
|
|
2748
|
+
effect(() => className(_el$2, style("notificationListEmptyNoticeOverlay", "nt-absolute nt-size-full nt-z-10 nt-inset-0 nt-bg-gradient-to-b nt-from-transparent nt-to-background")));
|
|
2749
|
+
return _el$2;
|
|
2750
|
+
})()];
|
|
2751
|
+
}
|
|
2752
|
+
}), null);
|
|
2753
|
+
insert(_el$, createComponent(Show, {
|
|
2754
|
+
get when() {
|
|
2755
|
+
return !props.loading;
|
|
2756
|
+
},
|
|
2757
|
+
get children() {
|
|
2758
|
+
return createComponent(Motion.p, {
|
|
2759
|
+
initial: {
|
|
2760
|
+
opacity: 0,
|
|
2761
|
+
y: -4,
|
|
2762
|
+
filter: "blur(4px)"
|
|
2763
|
+
},
|
|
2764
|
+
get animate() {
|
|
2765
|
+
return {
|
|
2766
|
+
opacity: props.loading ? 0 : 1,
|
|
2767
|
+
y: 0,
|
|
2768
|
+
filter: "blur(0px)"
|
|
2769
|
+
};
|
|
2770
|
+
},
|
|
2771
|
+
transition: {
|
|
2772
|
+
duration: 0.7,
|
|
2773
|
+
easing: [0.39, 0.24, 0.3, 1],
|
|
2774
|
+
delay: 0.6
|
|
2775
|
+
},
|
|
2776
|
+
get ["class"]() {
|
|
2777
|
+
return style("preferencesListEmptyNotice"), "nt-text-center";
|
|
2778
|
+
},
|
|
2779
|
+
"data-localization": "preferences.emptyNotice",
|
|
2780
|
+
get children() {
|
|
2781
|
+
return t("preferences.emptyNotice");
|
|
2782
|
+
}
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
}), null);
|
|
2786
|
+
effect(() => className(_el$, style("preferencesListEmptyNoticeContainer", "nt-flex nt-flex-col nt-items-center nt-h-fit nt-w-full nt-text-sm nt-text-foreground-alpha-400 nt-text-center")));
|
|
2787
|
+
return _el$;
|
|
2788
|
+
})();
|
|
2789
|
+
};
|
|
2790
|
+
|
|
2791
|
+
// src/ui/components/elements/Preferences/Preferences.tsx
|
|
2792
|
+
var _tmpl$40 = /* @__PURE__ */ template(`<div>`);
|
|
2793
|
+
var _tmpl$212 = /* @__PURE__ */ template(`<span>`);
|
|
2794
|
+
var _tmpl$310 = /* @__PURE__ */ template(`<div><div><div><div></div></div><span>`);
|
|
2795
|
+
var Preferences = () => {
|
|
2796
|
+
var _a;
|
|
2797
|
+
const style = useStyle();
|
|
2798
|
+
const {
|
|
2799
|
+
preferencesFilter
|
|
2800
|
+
} = useInboxContext();
|
|
2801
|
+
const {
|
|
2802
|
+
preferences,
|
|
2803
|
+
loading
|
|
2804
|
+
} = usePreferences({
|
|
2805
|
+
tags: (_a = preferencesFilter()) == null ? void 0 : _a.tags
|
|
2806
|
+
});
|
|
2807
|
+
const allPreferences = createMemo(() => {
|
|
2808
|
+
var _a2, _b;
|
|
2809
|
+
const globalPreference = (_a2 = preferences()) == null ? void 0 : _a2.find((preference) => preference.level === "global" /* GLOBAL */);
|
|
2810
|
+
const workflowPreferences = (_b = preferences()) == null ? void 0 : _b.filter((preference) => preference.level === "template" /* TEMPLATE */);
|
|
2507
2811
|
const workflowPreferencesIds = workflowPreferences == null ? void 0 : workflowPreferences.map((preference) => {
|
|
2508
2812
|
var _a3;
|
|
2509
2813
|
return (_a3 = preference.workflow) == null ? void 0 : _a3.id;
|
|
@@ -2523,41 +2827,42 @@ var Preferences = () => {
|
|
|
2523
2827
|
}, {}));
|
|
2524
2828
|
});
|
|
2525
2829
|
});
|
|
2526
|
-
const optimisticUpdate = (preference) => ({
|
|
2830
|
+
const optimisticUpdate = (preference) => (_0) => __async(void 0, [_0], function* ({
|
|
2527
2831
|
channel,
|
|
2528
2832
|
enabled
|
|
2529
|
-
})
|
|
2530
|
-
preference == null ? void 0 : preference.update({
|
|
2833
|
+
}) {
|
|
2834
|
+
yield preference == null ? void 0 : preference.update({
|
|
2531
2835
|
channels: {
|
|
2532
2836
|
[channel]: enabled
|
|
2533
2837
|
}
|
|
2534
2838
|
});
|
|
2535
|
-
};
|
|
2839
|
+
});
|
|
2536
2840
|
return (() => {
|
|
2537
2841
|
var _el$ = _tmpl$40();
|
|
2538
|
-
insert(_el$, createComponent(
|
|
2539
|
-
|
|
2540
|
-
|
|
2842
|
+
insert(_el$, createComponent(PreferencesRow, {
|
|
2843
|
+
localizationKey: "preferences.global",
|
|
2844
|
+
get channels() {
|
|
2845
|
+
var _a2;
|
|
2846
|
+
return ((_a2 = allPreferences().globalPreference) == null ? void 0 : _a2.channels) || {};
|
|
2541
2847
|
},
|
|
2542
|
-
get
|
|
2543
|
-
return
|
|
2848
|
+
get onChange() {
|
|
2849
|
+
return optimisticUpdate(allPreferences().globalPreference);
|
|
2544
2850
|
}
|
|
2545
2851
|
}), null);
|
|
2546
2852
|
insert(_el$, createComponent(Show, {
|
|
2547
2853
|
get when() {
|
|
2548
|
-
|
|
2854
|
+
var _a2;
|
|
2855
|
+
return (_a2 = allPreferences().workflowPreferences) == null ? void 0 : _a2.length;
|
|
2549
2856
|
},
|
|
2550
|
-
get
|
|
2551
|
-
return
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
var _a2;
|
|
2555
|
-
return ((_a2 = allPreferences().globalPreference) == null ? void 0 : _a2.channels) || {};
|
|
2556
|
-
},
|
|
2557
|
-
get onChange() {
|
|
2558
|
-
return optimisticUpdate(allPreferences().globalPreference);
|
|
2857
|
+
get fallback() {
|
|
2858
|
+
return createComponent(PreferencesListSkeleton, {
|
|
2859
|
+
get loading() {
|
|
2860
|
+
return loading();
|
|
2559
2861
|
}
|
|
2560
|
-
})
|
|
2862
|
+
});
|
|
2863
|
+
},
|
|
2864
|
+
get children() {
|
|
2865
|
+
return createComponent(For, {
|
|
2561
2866
|
get each() {
|
|
2562
2867
|
return allPreferences().workflowPreferencesIds;
|
|
2563
2868
|
},
|
|
@@ -2585,14 +2890,14 @@ var Preferences = () => {
|
|
|
2585
2890
|
}
|
|
2586
2891
|
});
|
|
2587
2892
|
}
|
|
2588
|
-
})
|
|
2893
|
+
});
|
|
2589
2894
|
}
|
|
2590
2895
|
}), null);
|
|
2591
|
-
effect(() => className(_el$, style("preferencesContainer", "nt-
|
|
2896
|
+
effect(() => className(_el$, style("preferencesContainer", "nt-px-3 nt-py-4 nt-flex nt-flex-col nt-gap-1 nt-overflow-y-auto nt-h-full")));
|
|
2592
2897
|
return _el$;
|
|
2593
2898
|
})();
|
|
2594
2899
|
};
|
|
2595
|
-
var
|
|
2900
|
+
var WorkflowDescription = (props) => {
|
|
2596
2901
|
const style = useStyle();
|
|
2597
2902
|
const channelNames = () => {
|
|
2598
2903
|
const channels = [];
|
|
@@ -2614,96 +2919,86 @@ var ChannelsLabel = (props) => {
|
|
|
2614
2919
|
return (() => {
|
|
2615
2920
|
var _el$3 = _tmpl$40();
|
|
2616
2921
|
insert(_el$3, channelNames);
|
|
2617
|
-
effect(() => className(_el$3, style(
|
|
2922
|
+
effect(() => className(_el$3, style(props.appearanceKey, cn("nt-text-sm nt-text-foreground-alpha-600 nt-text-start", props.class))));
|
|
2618
2923
|
return _el$3;
|
|
2619
2924
|
})();
|
|
2620
2925
|
};
|
|
2621
2926
|
var PreferencesRow = (props) => {
|
|
2622
|
-
const [isOpen, setIsOpen] = createSignal(false);
|
|
2623
2927
|
const style = useStyle();
|
|
2928
|
+
const [isOpenDescription, setIsOpenDescription] = createSignal(true);
|
|
2929
|
+
const [isOpenChannels, setIsOpenChannels] = createSignal(false);
|
|
2624
2930
|
const {
|
|
2625
2931
|
t
|
|
2626
2932
|
} = useLocalization();
|
|
2627
|
-
const channels = createMemo(() => Object.keys(props.channels
|
|
2933
|
+
const channels = createMemo(() => Object.keys(props.channels));
|
|
2628
2934
|
return createComponent(Show, {
|
|
2629
2935
|
get when() {
|
|
2630
2936
|
return channels().length > 0;
|
|
2631
2937
|
},
|
|
2632
2938
|
get children() {
|
|
2633
2939
|
var _el$4 = _tmpl$310(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling;
|
|
2634
|
-
_el$5.$$click = () =>
|
|
2940
|
+
_el$5.$$click = () => {
|
|
2941
|
+
setIsOpenChannels((prev) => !prev);
|
|
2942
|
+
setIsOpenDescription((prev) => !prev);
|
|
2943
|
+
};
|
|
2635
2944
|
insert(_el$7, () => t(props.localizationKey));
|
|
2636
|
-
insert(_el$6, createComponent(
|
|
2637
|
-
get
|
|
2638
|
-
return
|
|
2945
|
+
insert(_el$6, createComponent(Collapsible, {
|
|
2946
|
+
get open() {
|
|
2947
|
+
return isOpenDescription();
|
|
2948
|
+
},
|
|
2949
|
+
get children() {
|
|
2950
|
+
return createComponent(WorkflowDescription, {
|
|
2951
|
+
get channels() {
|
|
2952
|
+
return props.channels;
|
|
2953
|
+
},
|
|
2954
|
+
appearanceKey: "workflowDescription",
|
|
2955
|
+
"class": "nt-overflow-hidden"
|
|
2956
|
+
});
|
|
2639
2957
|
}
|
|
2640
2958
|
}), null);
|
|
2641
2959
|
insert(_el$8, createComponent(ArrowDropDown, {
|
|
2642
2960
|
get ["class"]() {
|
|
2643
|
-
return style("workflowArrow__icon", "nt-text-foreground-alpha-600");
|
|
2961
|
+
return style("workflowArrow__icon", "nt-text-foreground-alpha-600 nt-size-4");
|
|
2644
2962
|
}
|
|
2645
2963
|
}));
|
|
2646
|
-
insert(_el$4, createComponent(
|
|
2647
|
-
|
|
2964
|
+
insert(_el$4, createComponent(Collapsible, {
|
|
2965
|
+
get open() {
|
|
2966
|
+
return isOpenChannels();
|
|
2967
|
+
},
|
|
2648
2968
|
get children() {
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2969
|
+
var _el$9 = _tmpl$40();
|
|
2970
|
+
insert(_el$9, createComponent(For, {
|
|
2971
|
+
get each() {
|
|
2972
|
+
return channels();
|
|
2652
2973
|
},
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
get children() {
|
|
2669
|
-
var _el$9 = _tmpl$40();
|
|
2670
|
-
insert(_el$9, createComponent(For, {
|
|
2671
|
-
get each() {
|
|
2672
|
-
return channels();
|
|
2673
|
-
},
|
|
2674
|
-
children: (channel) => createComponent(ChannelRow, {
|
|
2675
|
-
channel,
|
|
2676
|
-
get enabled() {
|
|
2677
|
-
return !!props.channels[channel];
|
|
2678
|
-
},
|
|
2679
|
-
get workflowId() {
|
|
2680
|
-
return props.workflowId;
|
|
2681
|
-
},
|
|
2682
|
-
get onChange() {
|
|
2683
|
-
return props.onChange;
|
|
2684
|
-
}
|
|
2685
|
-
})
|
|
2686
|
-
}));
|
|
2687
|
-
effect(() => className(_el$9, style("channelsContainer", "nt-overflow-hidden nt-flex-col nt-gap-1")));
|
|
2688
|
-
return _el$9;
|
|
2689
|
-
}
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2692
|
-
});
|
|
2974
|
+
children: (channel) => createComponent(ChannelRow, {
|
|
2975
|
+
channel,
|
|
2976
|
+
get enabled() {
|
|
2977
|
+
return !!props.channels[channel];
|
|
2978
|
+
},
|
|
2979
|
+
get workflowId() {
|
|
2980
|
+
return props.workflowId;
|
|
2981
|
+
},
|
|
2982
|
+
get onChange() {
|
|
2983
|
+
return props.onChange;
|
|
2984
|
+
}
|
|
2985
|
+
})
|
|
2986
|
+
}));
|
|
2987
|
+
effect(() => className(_el$9, style("channelsContainer", "nt-flex nt-bg-background nt-border nt-border-neutral-alpha-50 nt-rounded-lg nt-p-2 nt-flex-col nt-gap-1 nt-overflow-hidden")));
|
|
2988
|
+
return _el$9;
|
|
2693
2989
|
}
|
|
2694
2990
|
}), null);
|
|
2695
2991
|
effect((_p$) => {
|
|
2696
|
-
var _v$ = style("workflowContainer", `nt-p-
|
|
2992
|
+
var _v$ = style("workflowContainer", `nt-p-1 nt-bg-neutral-alpha-25 nt-rounded-lg`), _v$2 = isOpenChannels(), _v$3 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-p-1 nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center nt-overflow-hidden"), _v$4 = style("workflowLabelHeader", "nt-overflow-hidden"), _v$5 = style("workflowLabel", "nt-text-sm nt-font-semibold nt-truncate"), _v$6 = props.localizationKey, _v$7 = isOpenChannels(), _v$8 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$9 = isOpenChannels();
|
|
2697
2993
|
_v$ !== _p$.e && className(_el$4, _p$.e = _v$);
|
|
2698
2994
|
_v$2 !== _p$.t && setAttribute(_el$4, "data-open", _p$.t = _v$2);
|
|
2699
2995
|
_v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
|
|
2700
|
-
_v$4 !== _p$.o &&
|
|
2701
|
-
_v$5 !== _p$.i && className(_el$
|
|
2702
|
-
_v$6 !== _p$.n &&
|
|
2703
|
-
_v$7 !== _p$.s && setAttribute(_el$7, "data-
|
|
2704
|
-
_v$8 !== _p$.h &&
|
|
2705
|
-
_v$9 !== _p$.r &&
|
|
2706
|
-
_v$10 !== _p$.d && setAttribute(_el$8, "data-open", _p$.d = _v$10);
|
|
2996
|
+
_v$4 !== _p$.o && className(_el$6, _p$.o = _v$4);
|
|
2997
|
+
_v$5 !== _p$.i && className(_el$7, _p$.i = _v$5);
|
|
2998
|
+
_v$6 !== _p$.n && setAttribute(_el$7, "data-localization", _p$.n = _v$6);
|
|
2999
|
+
_v$7 !== _p$.s && setAttribute(_el$7, "data-open", _p$.s = _v$7);
|
|
3000
|
+
_v$8 !== _p$.h && className(_el$8, _p$.h = _v$8);
|
|
3001
|
+
_v$9 !== _p$.r && setAttribute(_el$8, "data-open", _p$.r = _v$9);
|
|
2707
3002
|
return _p$;
|
|
2708
3003
|
}, {
|
|
2709
3004
|
e: void 0,
|
|
@@ -2714,20 +3009,98 @@ var PreferencesRow = (props) => {
|
|
|
2714
3009
|
n: void 0,
|
|
2715
3010
|
s: void 0,
|
|
2716
3011
|
h: void 0,
|
|
2717
|
-
r: void 0
|
|
2718
|
-
d: void 0
|
|
3012
|
+
r: void 0
|
|
2719
3013
|
});
|
|
2720
3014
|
return _el$4;
|
|
2721
3015
|
}
|
|
2722
3016
|
});
|
|
2723
3017
|
};
|
|
2724
3018
|
delegateEvents(["click"]);
|
|
2725
|
-
var _tmpl$41 = /* @__PURE__ */ template(`<
|
|
3019
|
+
var _tmpl$41 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
|
|
3020
|
+
var PreferencesHeader = (props) => {
|
|
3021
|
+
const style = useStyle();
|
|
3022
|
+
const {
|
|
3023
|
+
t
|
|
3024
|
+
} = useLocalization();
|
|
3025
|
+
return (() => {
|
|
3026
|
+
var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
|
|
3027
|
+
insert(_el$, createComponent(Show, {
|
|
3028
|
+
get when() {
|
|
3029
|
+
return props.navigateToNotifications;
|
|
3030
|
+
},
|
|
3031
|
+
children: (navigateToNotifications) => createComponent(Button, {
|
|
3032
|
+
appearanceKey: "preferencesHeader__back__button",
|
|
3033
|
+
"class": "nt-text-foreground-alpha-600",
|
|
3034
|
+
variant: "unstyled",
|
|
3035
|
+
size: "none",
|
|
3036
|
+
get onClick() {
|
|
3037
|
+
return navigateToNotifications();
|
|
3038
|
+
},
|
|
3039
|
+
get children() {
|
|
3040
|
+
return createComponent(ArrowLeft, {
|
|
3041
|
+
get ["class"]() {
|
|
3042
|
+
return style("preferencesHeader__back__button__icon", "nt-size-4");
|
|
3043
|
+
}
|
|
3044
|
+
});
|
|
3045
|
+
}
|
|
3046
|
+
})
|
|
3047
|
+
}), _el$2);
|
|
3048
|
+
insert(_el$2, () => t("preferences.title"));
|
|
3049
|
+
effect((_p$) => {
|
|
3050
|
+
var _v$ = style("preferencesHeader", "nt-flex nt-bg-neutral-alpha-25 nt-shrink-0 nt-border-b nt-border-border nt-items-center nt-py-3.5 nt-px-4 nt-gap-2"), _v$2 = style("preferencesHeader__title", "nt-text-base nt-font-medium");
|
|
3051
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
3052
|
+
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
3053
|
+
return _p$;
|
|
3054
|
+
}, {
|
|
3055
|
+
e: void 0,
|
|
3056
|
+
t: void 0
|
|
3057
|
+
});
|
|
3058
|
+
return _el$;
|
|
3059
|
+
})();
|
|
3060
|
+
};
|
|
3061
|
+
var useTabsDropdown = ({ tabs }) => {
|
|
3062
|
+
const [tabsList, setTabsList] = createSignal();
|
|
3063
|
+
const [visibleTabs, setVisibleTabs] = createSignal([]);
|
|
3064
|
+
const [dropdownTabs, setDropdownTabs] = createSignal([]);
|
|
3065
|
+
onMount(() => {
|
|
3066
|
+
const tabsListEl = tabsList();
|
|
3067
|
+
if (!tabsListEl) return;
|
|
3068
|
+
const tabsElements = [...tabsListEl.querySelectorAll('[role="tab"]')];
|
|
3069
|
+
const observer = new IntersectionObserver(
|
|
3070
|
+
(entries) => {
|
|
3071
|
+
let visibleTabIds = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio === 1).map((entry) => entry.target.id);
|
|
3072
|
+
if (tabsElements.length === visibleTabIds.length) {
|
|
3073
|
+
setVisibleTabs(tabs.filter((tab) => visibleTabIds.includes(tab.label)));
|
|
3074
|
+
observer.disconnect();
|
|
3075
|
+
return;
|
|
3076
|
+
}
|
|
3077
|
+
visibleTabIds = visibleTabIds.slice(0, -1);
|
|
3078
|
+
setVisibleTabs(tabs.filter((tab) => visibleTabIds.includes(tab.label)));
|
|
3079
|
+
setDropdownTabs(tabs.filter((tab) => !visibleTabIds.includes(tab.label)));
|
|
3080
|
+
observer.disconnect();
|
|
3081
|
+
},
|
|
3082
|
+
{ root: tabsListEl }
|
|
3083
|
+
);
|
|
3084
|
+
for (const tabElement of tabsElements) {
|
|
3085
|
+
observer.observe(tabElement);
|
|
3086
|
+
}
|
|
3087
|
+
});
|
|
3088
|
+
return { dropdownTabs, setTabsList, visibleTabs };
|
|
3089
|
+
};
|
|
3090
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10.0001 10.879L13.7126 7.1665L14.7731 8.227L10.0001 13L5.22705 8.227L6.28755 7.1665L10.0001 10.879Z"fill=currentColor>`);
|
|
3091
|
+
var ArrowDown = (props) => {
|
|
3092
|
+
return (() => {
|
|
3093
|
+
var _el$ = _tmpl$42();
|
|
3094
|
+
spread(_el$, props, true, true);
|
|
3095
|
+
return _el$;
|
|
3096
|
+
})();
|
|
3097
|
+
};
|
|
3098
|
+
var _tmpl$43 = /* @__PURE__ */ template(`<strong>`);
|
|
2726
3099
|
var _tmpl$213 = /* @__PURE__ */ template(`<p>`);
|
|
2727
3100
|
var Bold = (props) => {
|
|
2728
3101
|
const style = useStyle();
|
|
2729
3102
|
return (() => {
|
|
2730
|
-
var _el$ = _tmpl$
|
|
3103
|
+
var _el$ = _tmpl$43();
|
|
2731
3104
|
insert(_el$, () => props.children);
|
|
2732
3105
|
effect(() => className(_el$, style(props.appearanceKey || "strong", "nt-font-semibold")));
|
|
2733
3106
|
return _el$;
|
|
@@ -2818,7 +3191,7 @@ function useTooltip() {
|
|
|
2818
3191
|
}
|
|
2819
3192
|
|
|
2820
3193
|
// src/ui/components/primitives/Tooltip/TooltipContent.tsx
|
|
2821
|
-
var _tmpl$
|
|
3194
|
+
var _tmpl$44 = /* @__PURE__ */ template(`<div>`);
|
|
2822
3195
|
var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
|
|
2823
3196
|
var TooltipContentBody = (props) => {
|
|
2824
3197
|
const {
|
|
@@ -2841,7 +3214,7 @@ var TooltipContentBody = (props) => {
|
|
|
2841
3214
|
});
|
|
2842
3215
|
});
|
|
2843
3216
|
return (() => {
|
|
2844
|
-
var _el$ = _tmpl$
|
|
3217
|
+
var _el$ = _tmpl$44();
|
|
2845
3218
|
use(setFloating, _el$);
|
|
2846
3219
|
spread(_el$, mergeProps({
|
|
2847
3220
|
get ["class"]() {
|
|
@@ -2880,7 +3253,7 @@ var TooltipContent = (props) => {
|
|
|
2880
3253
|
}
|
|
2881
3254
|
});
|
|
2882
3255
|
};
|
|
2883
|
-
var _tmpl$
|
|
3256
|
+
var _tmpl$45 = /* @__PURE__ */ template(`<button>`);
|
|
2884
3257
|
var TooltipTrigger = (props) => {
|
|
2885
3258
|
const {
|
|
2886
3259
|
setReference,
|
|
@@ -2903,7 +3276,7 @@ var TooltipTrigger = (props) => {
|
|
|
2903
3276
|
}, rest));
|
|
2904
3277
|
}
|
|
2905
3278
|
return (() => {
|
|
2906
|
-
var _el$ = _tmpl$
|
|
3279
|
+
var _el$ = _tmpl$45();
|
|
2907
3280
|
_el$.addEventListener("mouseleave", () => {
|
|
2908
3281
|
setOpen(false);
|
|
2909
3282
|
});
|
|
@@ -2935,9 +3308,10 @@ var Tooltip = {
|
|
|
2935
3308
|
};
|
|
2936
3309
|
|
|
2937
3310
|
// src/ui/components/Notification/DefaultNotification.tsx
|
|
2938
|
-
var _tmpl$
|
|
2939
|
-
var _tmpl$214 = /* @__PURE__ */ template(`<
|
|
2940
|
-
var _tmpl$311 = /* @__PURE__ */ template(`<
|
|
3311
|
+
var _tmpl$46 = /* @__PURE__ */ template(`<img>`);
|
|
3312
|
+
var _tmpl$214 = /* @__PURE__ */ template(`<div>`);
|
|
3313
|
+
var _tmpl$311 = /* @__PURE__ */ template(`<span>`);
|
|
3314
|
+
var _tmpl$47 = /* @__PURE__ */ template(`<a><div><div></div><div></div><p>`);
|
|
2941
3315
|
var DefaultNotification = (props) => {
|
|
2942
3316
|
const style = useStyle();
|
|
2943
3317
|
const {
|
|
@@ -2962,62 +3336,99 @@ var DefaultNotification = (props) => {
|
|
|
2962
3336
|
}, 1e3 * 60);
|
|
2963
3337
|
return () => clearInterval(interval);
|
|
2964
3338
|
});
|
|
2965
|
-
const handleNotificationClick = (e) => {
|
|
3339
|
+
const handleNotificationClick = (e) => __async(void 0, null, function* () {
|
|
2966
3340
|
var _a, _b, _c;
|
|
2967
3341
|
e.stopPropagation();
|
|
2968
3342
|
e.preventDefault();
|
|
2969
3343
|
if (!props.notification.isRead) {
|
|
2970
|
-
props.notification.read();
|
|
3344
|
+
yield props.notification.read();
|
|
2971
3345
|
}
|
|
2972
3346
|
(_a = props.onNotificationClick) == null ? void 0 : _a.call(props, props.notification);
|
|
2973
3347
|
navigate((_b = props.notification.redirect) == null ? void 0 : _b.url, (_c = props.notification.redirect) == null ? void 0 : _c.target);
|
|
2974
|
-
};
|
|
2975
|
-
const handleActionButtonClick = (action, e) => {
|
|
3348
|
+
});
|
|
3349
|
+
const handleActionButtonClick = (action, e) => __async(void 0, null, function* () {
|
|
2976
3350
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2977
3351
|
e.stopPropagation();
|
|
2978
3352
|
if (action === "primary" /* PRIMARY */) {
|
|
2979
|
-
props.notification.completePrimary();
|
|
3353
|
+
yield props.notification.completePrimary();
|
|
2980
3354
|
(_a = props.onPrimaryActionClick) == null ? void 0 : _a.call(props, props.notification);
|
|
2981
3355
|
navigate((_c = (_b = props.notification.primaryAction) == null ? void 0 : _b.redirect) == null ? void 0 : _c.url, (_e = (_d = props.notification.primaryAction) == null ? void 0 : _d.redirect) == null ? void 0 : _e.target);
|
|
2982
3356
|
} else {
|
|
2983
|
-
props.notification.completeSecondary();
|
|
3357
|
+
yield props.notification.completeSecondary();
|
|
2984
3358
|
(_f = props.onSecondaryActionClick) == null ? void 0 : _f.call(props, props.notification);
|
|
2985
3359
|
navigate((_h = (_g = props.notification.secondaryAction) == null ? void 0 : _g.redirect) == null ? void 0 : _h.url, (_j = (_i = props.notification.secondaryAction) == null ? void 0 : _i.redirect) == null ? void 0 : _j.target);
|
|
2986
3360
|
}
|
|
2987
|
-
};
|
|
3361
|
+
});
|
|
2988
3362
|
return (() => {
|
|
2989
|
-
var _el$ = _tmpl$
|
|
3363
|
+
var _el$ = _tmpl$47(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling;
|
|
2990
3364
|
_el$.$$click = handleNotificationClick;
|
|
2991
|
-
insert(_el$, createComponent(Show, {
|
|
2992
|
-
get when() {
|
|
2993
|
-
return !props.notification.isRead;
|
|
2994
|
-
},
|
|
2995
|
-
get children() {
|
|
2996
|
-
var _el$2 = _tmpl$44();
|
|
2997
|
-
effect(() => className(_el$2, style("notificationDot", "nt-absolute -nt-translate-x-[1.0625rem] nt-translate-y-1/2 nt-size-2.5 nt-bg-primary nt-rounded-full nt-border nt-border-neutral-alpha-200")));
|
|
2998
|
-
return _el$2;
|
|
2999
|
-
}
|
|
3000
|
-
}), _el$4);
|
|
3001
3365
|
insert(_el$, createComponent(Show, {
|
|
3002
3366
|
get when() {
|
|
3003
3367
|
return props.notification.avatar;
|
|
3004
3368
|
},
|
|
3369
|
+
get fallback() {
|
|
3370
|
+
return (() => {
|
|
3371
|
+
var _el$9 = _tmpl$214();
|
|
3372
|
+
effect(() => className(_el$9, style("notificationImageLoadingFallback", "nt-size-8 nt-rounded-lg nt-shrink-0 nt-aspect-square")));
|
|
3373
|
+
return _el$9;
|
|
3374
|
+
})();
|
|
3375
|
+
},
|
|
3005
3376
|
get children() {
|
|
3006
|
-
var _el$
|
|
3377
|
+
var _el$2 = _tmpl$46();
|
|
3007
3378
|
effect((_p$) => {
|
|
3008
|
-
var _v$ = style("notificationImage", "nt-size-8 nt-rounded-lg"), _v$2 = props.notification.avatar;
|
|
3009
|
-
_v$ !== _p$.e && className(_el$
|
|
3010
|
-
_v$2 !== _p$.t && setAttribute(_el$
|
|
3379
|
+
var _v$ = style("notificationImage", "nt-size-8 nt-rounded-lg nt-object-cover nt-aspect-square"), _v$2 = props.notification.avatar;
|
|
3380
|
+
_v$ !== _p$.e && className(_el$2, _p$.e = _v$);
|
|
3381
|
+
_v$2 !== _p$.t && setAttribute(_el$2, "src", _p$.t = _v$2);
|
|
3011
3382
|
return _p$;
|
|
3012
3383
|
}, {
|
|
3013
3384
|
e: void 0,
|
|
3014
3385
|
t: void 0
|
|
3015
3386
|
});
|
|
3016
|
-
return _el$
|
|
3387
|
+
return _el$2;
|
|
3017
3388
|
}
|
|
3018
|
-
}), _el$
|
|
3019
|
-
insert(_el$
|
|
3020
|
-
|
|
3389
|
+
}), _el$3);
|
|
3390
|
+
insert(_el$4, createComponent(Show, {
|
|
3391
|
+
get when() {
|
|
3392
|
+
return props.renderSubject;
|
|
3393
|
+
},
|
|
3394
|
+
get fallback() {
|
|
3395
|
+
return createComponent(Show, {
|
|
3396
|
+
get when() {
|
|
3397
|
+
return props.notification.subject;
|
|
3398
|
+
},
|
|
3399
|
+
children: (subject) => createComponent(Markdown_default, {
|
|
3400
|
+
appearanceKey: "notificationSubject",
|
|
3401
|
+
"class": "nt-text-start nt-font-medium",
|
|
3402
|
+
strongAppearanceKey: "notificationSubject__strong",
|
|
3403
|
+
get children() {
|
|
3404
|
+
return subject();
|
|
3405
|
+
}
|
|
3406
|
+
})
|
|
3407
|
+
});
|
|
3408
|
+
},
|
|
3409
|
+
children: (renderSubject) => createComponent(ExternalElementRenderer, {
|
|
3410
|
+
render: (el) => renderSubject()(el, props.notification)
|
|
3411
|
+
})
|
|
3412
|
+
}), null);
|
|
3413
|
+
insert(_el$4, createComponent(Show, {
|
|
3414
|
+
get when() {
|
|
3415
|
+
return props.renderBody;
|
|
3416
|
+
},
|
|
3417
|
+
get fallback() {
|
|
3418
|
+
return createComponent(Markdown_default, {
|
|
3419
|
+
appearanceKey: "notificationBody",
|
|
3420
|
+
strongAppearanceKey: "notificationBody__strong",
|
|
3421
|
+
"class": "nt-text-start nt-whitespace-pre-wrap nt-text-foreground-alpha-600",
|
|
3422
|
+
get children() {
|
|
3423
|
+
return props.notification.body;
|
|
3424
|
+
}
|
|
3425
|
+
});
|
|
3426
|
+
},
|
|
3427
|
+
children: (renderBody) => createComponent(ExternalElementRenderer, {
|
|
3428
|
+
render: (el) => renderBody()(el, props.notification)
|
|
3429
|
+
})
|
|
3430
|
+
}), null);
|
|
3431
|
+
insert(_el$5, createComponent(Show, {
|
|
3021
3432
|
get when() {
|
|
3022
3433
|
return status() !== "archived" /* ARCHIVED */;
|
|
3023
3434
|
},
|
|
@@ -3032,16 +3443,19 @@ var DefaultNotification = (props) => {
|
|
|
3032
3443
|
return [createComponent(Tooltip.Trigger, {
|
|
3033
3444
|
asChild: (childProps) => createComponent(Button, mergeProps({
|
|
3034
3445
|
appearanceKey: "notificationRead__button",
|
|
3035
|
-
size: "
|
|
3036
|
-
variant: "
|
|
3446
|
+
size: "iconSm",
|
|
3447
|
+
variant: "ghost"
|
|
3037
3448
|
}, childProps, {
|
|
3038
|
-
onClick: (e) => {
|
|
3449
|
+
onClick: (e) => __async(this, null, function* () {
|
|
3039
3450
|
e.stopPropagation();
|
|
3040
|
-
props.notification.read();
|
|
3041
|
-
},
|
|
3042
|
-
"class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
|
|
3451
|
+
yield props.notification.read();
|
|
3452
|
+
}),
|
|
3043
3453
|
get children() {
|
|
3044
|
-
return createComponent(
|
|
3454
|
+
return createComponent(MarkAsRead, {
|
|
3455
|
+
get ["class"]() {
|
|
3456
|
+
return style("notificationRead__icon", "nt-size-3");
|
|
3457
|
+
}
|
|
3458
|
+
});
|
|
3045
3459
|
}
|
|
3046
3460
|
}))
|
|
3047
3461
|
}), createComponent(Tooltip.Content, {
|
|
@@ -3059,16 +3473,19 @@ var DefaultNotification = (props) => {
|
|
|
3059
3473
|
return [createComponent(Tooltip.Trigger, {
|
|
3060
3474
|
asChild: (childProps) => createComponent(Button, mergeProps({
|
|
3061
3475
|
appearanceKey: "notificationUnread__button",
|
|
3062
|
-
size: "
|
|
3063
|
-
variant: "
|
|
3476
|
+
size: "iconSm",
|
|
3477
|
+
variant: "ghost"
|
|
3064
3478
|
}, childProps, {
|
|
3065
|
-
onClick: (e) => {
|
|
3479
|
+
onClick: (e) => __async(this, null, function* () {
|
|
3066
3480
|
e.stopPropagation();
|
|
3067
|
-
props.notification.unread();
|
|
3068
|
-
},
|
|
3069
|
-
"class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
|
|
3481
|
+
yield props.notification.unread();
|
|
3482
|
+
}),
|
|
3070
3483
|
get children() {
|
|
3071
|
-
return createComponent(
|
|
3484
|
+
return createComponent(MarkAsUnread, {
|
|
3485
|
+
get ["class"]() {
|
|
3486
|
+
return style("notificationUnread__icon", "nt-size-3");
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3072
3489
|
}
|
|
3073
3490
|
}))
|
|
3074
3491
|
}), createComponent(Tooltip.Content, {
|
|
@@ -3083,7 +3500,7 @@ var DefaultNotification = (props) => {
|
|
|
3083
3500
|
});
|
|
3084
3501
|
}
|
|
3085
3502
|
}), null);
|
|
3086
|
-
insert(_el$
|
|
3503
|
+
insert(_el$5, createComponent(Show, {
|
|
3087
3504
|
get when() {
|
|
3088
3505
|
return props.notification.isArchived;
|
|
3089
3506
|
},
|
|
@@ -3093,16 +3510,19 @@ var DefaultNotification = (props) => {
|
|
|
3093
3510
|
return [createComponent(Tooltip.Trigger, {
|
|
3094
3511
|
asChild: (childProps) => createComponent(Button, mergeProps({
|
|
3095
3512
|
appearanceKey: "notificationArchive__button",
|
|
3096
|
-
size: "
|
|
3097
|
-
variant: "
|
|
3513
|
+
size: "iconSm",
|
|
3514
|
+
variant: "ghost"
|
|
3098
3515
|
}, childProps, {
|
|
3099
|
-
onClick: (e) => {
|
|
3516
|
+
onClick: (e) => __async(this, null, function* () {
|
|
3100
3517
|
e.stopPropagation();
|
|
3101
|
-
props.notification.archive();
|
|
3102
|
-
},
|
|
3103
|
-
"class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
|
|
3518
|
+
yield props.notification.archive();
|
|
3519
|
+
}),
|
|
3104
3520
|
get children() {
|
|
3105
|
-
return createComponent(
|
|
3521
|
+
return createComponent(MarkAsArchived, {
|
|
3522
|
+
get ["class"]() {
|
|
3523
|
+
return style("notificationArchive__icon", "nt-size-3");
|
|
3524
|
+
}
|
|
3525
|
+
});
|
|
3106
3526
|
}
|
|
3107
3527
|
}))
|
|
3108
3528
|
}), createComponent(Tooltip.Content, {
|
|
@@ -3120,16 +3540,19 @@ var DefaultNotification = (props) => {
|
|
|
3120
3540
|
return [createComponent(Tooltip.Trigger, {
|
|
3121
3541
|
asChild: (childProps) => createComponent(Button, mergeProps({
|
|
3122
3542
|
appearanceKey: "notificationUnarchive__button",
|
|
3123
|
-
size: "
|
|
3124
|
-
variant: "
|
|
3543
|
+
size: "iconSm",
|
|
3544
|
+
variant: "ghost"
|
|
3125
3545
|
}, childProps, {
|
|
3126
|
-
onClick: (e) => {
|
|
3546
|
+
onClick: (e) => __async(this, null, function* () {
|
|
3127
3547
|
e.stopPropagation();
|
|
3128
|
-
props.notification.unarchive();
|
|
3129
|
-
},
|
|
3130
|
-
"class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
|
|
3548
|
+
yield props.notification.unarchive();
|
|
3549
|
+
}),
|
|
3131
3550
|
get children() {
|
|
3132
|
-
return createComponent(
|
|
3551
|
+
return createComponent(MarkAsUnarchived, {
|
|
3552
|
+
get ["class"]() {
|
|
3553
|
+
return style("notificationArchive__icon", "nt-size-3");
|
|
3554
|
+
}
|
|
3555
|
+
});
|
|
3133
3556
|
}
|
|
3134
3557
|
}))
|
|
3135
3558
|
}), createComponent(Tooltip.Content, {
|
|
@@ -3142,65 +3565,65 @@ var DefaultNotification = (props) => {
|
|
|
3142
3565
|
});
|
|
3143
3566
|
}
|
|
3144
3567
|
}), null);
|
|
3145
|
-
insert(_el$
|
|
3568
|
+
insert(_el$3, createComponent(Show, {
|
|
3146
3569
|
get when() {
|
|
3147
|
-
return props.notification.
|
|
3570
|
+
return props.notification.primaryAction || props.notification.secondaryAction;
|
|
3148
3571
|
},
|
|
3149
|
-
children: (subject) => createComponent(Markdown_default, {
|
|
3150
|
-
appearanceKey: "notificationSubject__strong",
|
|
3151
|
-
"class": "nt-text-start",
|
|
3152
|
-
strongAppearanceKey: "notificationSubject__strong",
|
|
3153
|
-
get children() {
|
|
3154
|
-
return subject();
|
|
3155
|
-
}
|
|
3156
|
-
})
|
|
3157
|
-
}), _el$8);
|
|
3158
|
-
insert(_el$4, createComponent(Markdown_default, {
|
|
3159
|
-
appearanceKey: "notificationBody__strong",
|
|
3160
|
-
strongAppearanceKey: "notificationBody__strong",
|
|
3161
|
-
"class": "nt-text-start nt-whitespace-pre-wrap",
|
|
3162
3572
|
get children() {
|
|
3163
|
-
|
|
3573
|
+
var _el$6 = _tmpl$214();
|
|
3574
|
+
insert(_el$6, createComponent(Show, {
|
|
3575
|
+
get when() {
|
|
3576
|
+
return props.notification.primaryAction;
|
|
3577
|
+
},
|
|
3578
|
+
keyed: true,
|
|
3579
|
+
children: (primaryAction) => createComponent(Button, {
|
|
3580
|
+
appearanceKey: "notificationPrimaryAction__button",
|
|
3581
|
+
variant: "default",
|
|
3582
|
+
onClick: (e) => handleActionButtonClick("primary" /* PRIMARY */, e),
|
|
3583
|
+
get children() {
|
|
3584
|
+
return primaryAction.label;
|
|
3585
|
+
}
|
|
3586
|
+
})
|
|
3587
|
+
}), null);
|
|
3588
|
+
insert(_el$6, createComponent(Show, {
|
|
3589
|
+
get when() {
|
|
3590
|
+
return props.notification.secondaryAction;
|
|
3591
|
+
},
|
|
3592
|
+
keyed: true,
|
|
3593
|
+
children: (secondaryAction) => createComponent(Button, {
|
|
3594
|
+
appearanceKey: "notificationSecondaryAction__button",
|
|
3595
|
+
variant: "secondary",
|
|
3596
|
+
onClick: (e) => handleActionButtonClick("secondary" /* SECONDARY */, e),
|
|
3597
|
+
get children() {
|
|
3598
|
+
return secondaryAction.label;
|
|
3599
|
+
}
|
|
3600
|
+
})
|
|
3601
|
+
}), null);
|
|
3602
|
+
effect(() => className(_el$6, style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-2")));
|
|
3603
|
+
return _el$6;
|
|
3164
3604
|
}
|
|
3165
|
-
}), _el$
|
|
3166
|
-
insert(_el$
|
|
3167
|
-
|
|
3168
|
-
return props.notification.primaryAction;
|
|
3169
|
-
},
|
|
3170
|
-
keyed: true,
|
|
3171
|
-
children: (primaryAction) => createComponent(Button, {
|
|
3172
|
-
appearanceKey: "notificationPrimaryAction__button",
|
|
3173
|
-
variant: "default",
|
|
3174
|
-
onClick: (e) => handleActionButtonClick("primary" /* PRIMARY */, e),
|
|
3175
|
-
get children() {
|
|
3176
|
-
return primaryAction.label;
|
|
3177
|
-
}
|
|
3178
|
-
})
|
|
3179
|
-
}), null);
|
|
3180
|
-
insert(_el$8, createComponent(Show, {
|
|
3605
|
+
}), _el$7);
|
|
3606
|
+
insert(_el$7, date);
|
|
3607
|
+
insert(_el$, createComponent(Show, {
|
|
3181
3608
|
get when() {
|
|
3182
|
-
return props.notification.
|
|
3609
|
+
return !props.notification.isRead;
|
|
3183
3610
|
},
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
get children() {
|
|
3190
|
-
return secondaryAction.label;
|
|
3191
|
-
}
|
|
3192
|
-
})
|
|
3611
|
+
get children() {
|
|
3612
|
+
var _el$8 = _tmpl$311();
|
|
3613
|
+
effect(() => className(_el$8, style("notificationDot", "nt-size-1.5 nt-bg-primary nt-rounded-full nt-shrink-0")));
|
|
3614
|
+
return _el$8;
|
|
3615
|
+
}
|
|
3193
3616
|
}), null);
|
|
3194
3617
|
effect((_p$) => {
|
|
3195
3618
|
var _a;
|
|
3196
|
-
var _v$3 = style("notification", cn("nt-w-full nt-text-sm hover:nt-bg-
|
|
3619
|
+
var _v$3 = style("notification", cn("nt-w-full nt-text-sm hover:nt-bg-primary-alpha-25 nt-group nt-relative nt-flex nt-items-start nt-p-4 nt-gap-2", "[&:not(:first-child)]:nt-border-t nt-border-neutral-alpha-100", {
|
|
3197
3620
|
"nt-cursor-pointer": !props.notification.isRead || !!((_a = props.notification.redirect) == null ? void 0 : _a.url)
|
|
3198
|
-
})), _v$4 = style("
|
|
3621
|
+
})), _v$4 = style("notificationContent", "nt-flex nt-flex-col nt-gap-2 nt-w-full"), _v$5 = style("notificationTextContainer"), _v$6 = style("notificationDefaultActions", "nt-absolute nt-transition nt-duration-100 nt-ease-out nt-gap-0.5 nt-flex nt-shrink-0 nt-opacity-0 group-hover:nt-opacity-100 group-focus-within:nt-opacity-100 nt-justify-center nt-items-center nt-bg-background/90 nt-right-3 nt-top-3 nt-border nt-border-neutral-alpha-100 nt-rounded-lg nt-backdrop-blur-lg nt-p-0.5"), _v$7 = style("notificationDate", "nt-text-foreground-alpha-400");
|
|
3199
3622
|
_v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
|
|
3200
|
-
_v$4 !== _p$.t && className(_el$
|
|
3201
|
-
_v$5 !== _p$.a && className(_el$
|
|
3202
|
-
_v$6 !== _p$.o && className(_el$
|
|
3203
|
-
_v$7 !== _p$.i && className(_el$
|
|
3623
|
+
_v$4 !== _p$.t && className(_el$3, _p$.t = _v$4);
|
|
3624
|
+
_v$5 !== _p$.a && className(_el$4, _p$.a = _v$5);
|
|
3625
|
+
_v$6 !== _p$.o && className(_el$5, _p$.o = _v$6);
|
|
3626
|
+
_v$7 !== _p$.i && className(_el$7, _p$.i = _v$7);
|
|
3204
3627
|
return _p$;
|
|
3205
3628
|
}, {
|
|
3206
3629
|
e: void 0,
|
|
@@ -3225,6 +3648,12 @@ var Notification = (props) => {
|
|
|
3225
3648
|
get notification() {
|
|
3226
3649
|
return props.notification;
|
|
3227
3650
|
},
|
|
3651
|
+
get renderSubject() {
|
|
3652
|
+
return props.renderSubject;
|
|
3653
|
+
},
|
|
3654
|
+
get renderBody() {
|
|
3655
|
+
return props.renderBody;
|
|
3656
|
+
},
|
|
3228
3657
|
get onNotificationClick() {
|
|
3229
3658
|
return props.onNotificationClick;
|
|
3230
3659
|
},
|
|
@@ -3243,14 +3672,6 @@ var Notification = (props) => {
|
|
|
3243
3672
|
}
|
|
3244
3673
|
});
|
|
3245
3674
|
};
|
|
3246
|
-
var _tmpl$45 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill=currentColor d="M35.2 21.62L32.38 18.8L39.5 11.7L42.32 14.52C42.1 14.58 35.2 21.62 35.2 21.62ZM26 6H22V16H26V6ZM12.8 21.62L15.62 18.8L8.52 11.68L5.68 14.52C5.9 14.58 12.8 21.62 12.8 21.62ZM40 28H33.16C31.62 31.52 28.08 34 24 34C19.92 34 16.38 31.52 14.84 28H8V38H40V28ZM40 24C42.2 24 44 25.8 44 28V38C44 40.2 42.2 42 40 42H8C5.8 42 4 40.2 4 38V28C4 25.8 5.8 24 8 24H18C18 27.32 20.68 30 24 30C27.32 30 30 27.32 30 24H40Z">`);
|
|
3247
|
-
function EmptyIcon(props) {
|
|
3248
|
-
return (() => {
|
|
3249
|
-
var _el$ = _tmpl$45();
|
|
3250
|
-
spread(_el$, props, true, true);
|
|
3251
|
-
return _el$;
|
|
3252
|
-
})();
|
|
3253
|
-
}
|
|
3254
3675
|
var NewMessagesCta = (props) => {
|
|
3255
3676
|
const shouldRender = createMemo(() => !!props.count);
|
|
3256
3677
|
const {
|
|
@@ -3263,7 +3684,7 @@ var NewMessagesCta = (props) => {
|
|
|
3263
3684
|
get children() {
|
|
3264
3685
|
return createComponent(Button, {
|
|
3265
3686
|
appearanceKey: "notificationListNewNotificationsNotice__button",
|
|
3266
|
-
"class": "nt-absolute nt-w-fit nt-top-0 nt-mx-auto nt-inset-2 nt-z-10 nt-rounded-full hover:nt-bg-primary-600 nt-animate-in nt-slide-in-from-top-2 nt-fade-in",
|
|
3687
|
+
"class": "nt-absolute nt-w-fit nt-h-fit nt-top-0 nt-mx-auto nt-inset-2 nt-z-10 nt-rounded-full hover:nt-bg-primary-600 nt-animate-in nt-slide-in-from-top-2 nt-fade-in",
|
|
3267
3688
|
get onClick() {
|
|
3268
3689
|
return props.onClick;
|
|
3269
3690
|
},
|
|
@@ -3277,66 +3698,113 @@ var NewMessagesCta = (props) => {
|
|
|
3277
3698
|
}
|
|
3278
3699
|
});
|
|
3279
3700
|
};
|
|
3280
|
-
var _tmpl$
|
|
3281
|
-
var NotificationSkeleton = () => {
|
|
3282
|
-
return (() => {
|
|
3283
|
-
var _el$ = _tmpl$46(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
3284
|
-
insert(_el$, createComponent(SkeletonAvatar, {
|
|
3285
|
-
appearanceKey: "skeletonAvatar"
|
|
3286
|
-
}), _el$2);
|
|
3287
|
-
insert(_el$2, createComponent(SkeletonText, {
|
|
3288
|
-
appearanceKey: "skeletonText",
|
|
3289
|
-
"class": "nt-w-1/4"
|
|
3290
|
-
}), _el$3);
|
|
3291
|
-
insert(_el$3, createComponent(SkeletonText, {
|
|
3292
|
-
appearanceKey: "skeletonText"
|
|
3293
|
-
}), null);
|
|
3294
|
-
insert(_el$3, createComponent(SkeletonText, {
|
|
3295
|
-
appearanceKey: "skeletonText"
|
|
3296
|
-
}), null);
|
|
3297
|
-
insert(_el$4, createComponent(SkeletonText, {
|
|
3298
|
-
appearanceKey: "skeletonText",
|
|
3299
|
-
"class": "nt-w-2/3"
|
|
3300
|
-
}), null);
|
|
3301
|
-
insert(_el$4, createComponent(SkeletonText, {
|
|
3302
|
-
appearanceKey: "skeletonText",
|
|
3303
|
-
"class": "nt-w-1/3"
|
|
3304
|
-
}), null);
|
|
3305
|
-
return _el$;
|
|
3306
|
-
})();
|
|
3307
|
-
};
|
|
3701
|
+
var _tmpl$48 = /* @__PURE__ */ template(`<div>`);
|
|
3308
3702
|
var NotificationListSkeleton = (props) => {
|
|
3309
|
-
return createComponent(For, {
|
|
3310
|
-
get each() {
|
|
3311
|
-
return Array.from({
|
|
3312
|
-
length: props.count
|
|
3313
|
-
});
|
|
3314
|
-
},
|
|
3315
|
-
children: () => createComponent(NotificationSkeleton, {})
|
|
3316
|
-
});
|
|
3317
|
-
};
|
|
3318
|
-
|
|
3319
|
-
// src/ui/components/Notification/NotificationList.tsx
|
|
3320
|
-
var _tmpl$47 = /* @__PURE__ */ template(`<div><p class=nt-text-center data-localization=notifications.emptyNotice>`);
|
|
3321
|
-
var _tmpl$215 = /* @__PURE__ */ template(`<div>`);
|
|
3322
|
-
var _tmpl$312 = /* @__PURE__ */ template(`<div><div>`);
|
|
3323
|
-
var EmptyNotificationList = () => {
|
|
3324
3703
|
const style = useStyle();
|
|
3325
3704
|
const {
|
|
3326
3705
|
t
|
|
3327
3706
|
} = useLocalization();
|
|
3328
3707
|
return (() => {
|
|
3329
|
-
var _el$ = _tmpl$
|
|
3330
|
-
insert(_el$, createComponent(
|
|
3708
|
+
var _el$ = _tmpl$48();
|
|
3709
|
+
insert(_el$, createComponent(Motion.div, {
|
|
3710
|
+
get animate() {
|
|
3711
|
+
return {
|
|
3712
|
+
scale: props.loading ? 1 : 0.7
|
|
3713
|
+
};
|
|
3714
|
+
},
|
|
3715
|
+
transition: {
|
|
3716
|
+
duration: 0.6,
|
|
3717
|
+
easing: [0.39, 0.24, 0.3, 1],
|
|
3718
|
+
delay: 0.3
|
|
3719
|
+
},
|
|
3331
3720
|
get ["class"]() {
|
|
3332
|
-
return style("
|
|
3721
|
+
return style("notificationList__skeleton", "nt-flex nt-relative nt-mx-auto nt-flex-col nt-w-full nt-mb-4");
|
|
3722
|
+
},
|
|
3723
|
+
get children() {
|
|
3724
|
+
return [memo(() => Array.from({
|
|
3725
|
+
length: 5
|
|
3726
|
+
}).map((_, i) => createComponent(Motion.div, {
|
|
3727
|
+
get animate() {
|
|
3728
|
+
return {
|
|
3729
|
+
marginBottom: props.loading ? 0 : "16px",
|
|
3730
|
+
borderWidth: props.loading ? 0 : "1px",
|
|
3731
|
+
borderRadius: props.loading ? 0 : "var(--nv-radius-lg)"
|
|
3732
|
+
};
|
|
3733
|
+
},
|
|
3734
|
+
transition: {
|
|
3735
|
+
duration: 0.5,
|
|
3736
|
+
delay: 0.3,
|
|
3737
|
+
easing: "ease-in-out"
|
|
3738
|
+
},
|
|
3739
|
+
get ["class"]() {
|
|
3740
|
+
return style("notificationList__skeletonContent", "nt-flex nt-border-neutral-alpha-50 nt-items-center nt-gap-3 nt-p-3 nt-bg-neutral-alpha-25");
|
|
3741
|
+
},
|
|
3742
|
+
get children() {
|
|
3743
|
+
return [createComponent(SkeletonAvatar, {
|
|
3744
|
+
appearanceKey: "notificationList__skeletonAvatar",
|
|
3745
|
+
"class": "nt-w-8 nt-h-8 nt-rounded-full nt-bg-neutral-alpha-100"
|
|
3746
|
+
}), (() => {
|
|
3747
|
+
var _el$3 = _tmpl$48();
|
|
3748
|
+
insert(_el$3, createComponent(SkeletonText, {
|
|
3749
|
+
appearanceKey: "notificationList__skeletonText",
|
|
3750
|
+
"class": "nt-h-2 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
3751
|
+
}), null);
|
|
3752
|
+
insert(_el$3, createComponent(SkeletonText, {
|
|
3753
|
+
appearanceKey: "notificationList__skeletonText",
|
|
3754
|
+
"class": "nt-h-2 nt-w-2/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
3755
|
+
}), null);
|
|
3756
|
+
effect(() => className(_el$3, style("notificationList__skeletonItem", "nt-flex nt-flex-col nt-gap-2 nt-flex-1")));
|
|
3757
|
+
return _el$3;
|
|
3758
|
+
})()];
|
|
3759
|
+
}
|
|
3760
|
+
}))), (() => {
|
|
3761
|
+
var _el$2 = _tmpl$48();
|
|
3762
|
+
effect(() => className(_el$2, style("notificationListEmptyNoticeOverlay", "nt-absolute nt-size-full nt-z-10 nt-inset-0 nt-bg-gradient-to-b nt-from-transparent nt-to-background")));
|
|
3763
|
+
return _el$2;
|
|
3764
|
+
})()];
|
|
3333
3765
|
}
|
|
3334
|
-
}),
|
|
3335
|
-
insert(_el
|
|
3336
|
-
|
|
3766
|
+
}), null);
|
|
3767
|
+
insert(_el$, createComponent(Show, {
|
|
3768
|
+
get when() {
|
|
3769
|
+
return !props.loading;
|
|
3770
|
+
},
|
|
3771
|
+
get children() {
|
|
3772
|
+
return createComponent(Motion.p, {
|
|
3773
|
+
initial: {
|
|
3774
|
+
opacity: 0,
|
|
3775
|
+
y: -4,
|
|
3776
|
+
filter: "blur(4px)"
|
|
3777
|
+
},
|
|
3778
|
+
get animate() {
|
|
3779
|
+
return {
|
|
3780
|
+
opacity: props.loading ? 0 : 1,
|
|
3781
|
+
y: 0,
|
|
3782
|
+
filter: "blur(0px)"
|
|
3783
|
+
};
|
|
3784
|
+
},
|
|
3785
|
+
transition: {
|
|
3786
|
+
duration: 0.7,
|
|
3787
|
+
easing: [0.39, 0.24, 0.3, 1],
|
|
3788
|
+
delay: 0.6
|
|
3789
|
+
},
|
|
3790
|
+
get ["class"]() {
|
|
3791
|
+
return style("notificationListEmptyNotice", "nt-text-center");
|
|
3792
|
+
},
|
|
3793
|
+
"data-localization": "notifications.emptyNotice",
|
|
3794
|
+
get children() {
|
|
3795
|
+
return t("notifications.emptyNotice");
|
|
3796
|
+
}
|
|
3797
|
+
});
|
|
3798
|
+
}
|
|
3799
|
+
}), null);
|
|
3800
|
+
effect(() => className(_el$, style("notificationListEmptyNoticeContainer", "nt-flex nt-flex-col nt-items-center nt-h-fit nt-w-full nt-text-sm nt-text-foreground-alpha-400 nt-text-center")));
|
|
3337
3801
|
return _el$;
|
|
3338
3802
|
})();
|
|
3339
3803
|
};
|
|
3804
|
+
|
|
3805
|
+
// src/ui/components/Notification/NotificationList.tsx
|
|
3806
|
+
var _tmpl$49 = /* @__PURE__ */ template(`<div>`);
|
|
3807
|
+
var _tmpl$215 = /* @__PURE__ */ template(`<div><div>`);
|
|
3340
3808
|
var NotificationList = (props) => {
|
|
3341
3809
|
var _a, _b;
|
|
3342
3810
|
const options = createMemo(() => __spreadProps(__spreadValues({}, props.filter), {
|
|
@@ -3379,99 +3847,92 @@ var NotificationList = (props) => {
|
|
|
3379
3847
|
});
|
|
3380
3848
|
});
|
|
3381
3849
|
return (() => {
|
|
3382
|
-
var _el$
|
|
3383
|
-
insert(_el
|
|
3850
|
+
var _el$ = _tmpl$215(), _el$2 = _el$.firstChild;
|
|
3851
|
+
insert(_el$, createComponent(NewMessagesCta, {
|
|
3384
3852
|
get count() {
|
|
3385
3853
|
return count();
|
|
3386
3854
|
},
|
|
3387
3855
|
onClick: handleOnNewMessagesClick
|
|
3388
|
-
}), _el$
|
|
3856
|
+
}), _el$2);
|
|
3389
3857
|
use((el) => {
|
|
3390
3858
|
notificationListElement = el;
|
|
3391
|
-
}, _el$
|
|
3392
|
-
insert(_el$
|
|
3859
|
+
}, _el$2);
|
|
3860
|
+
insert(_el$2, createComponent(Show, {
|
|
3393
3861
|
get when() {
|
|
3394
|
-
return
|
|
3862
|
+
return data().length > 0;
|
|
3395
3863
|
},
|
|
3396
3864
|
get fallback() {
|
|
3397
3865
|
return createComponent(NotificationListSkeleton, {
|
|
3398
|
-
|
|
3866
|
+
get loading() {
|
|
3867
|
+
return initialLoading();
|
|
3868
|
+
}
|
|
3399
3869
|
});
|
|
3400
3870
|
},
|
|
3401
3871
|
get children() {
|
|
3402
|
-
return createComponent(
|
|
3403
|
-
get
|
|
3404
|
-
return
|
|
3405
|
-
},
|
|
3406
|
-
get fallback() {
|
|
3407
|
-
return createComponent(EmptyNotificationList, {});
|
|
3872
|
+
return [createComponent(For, {
|
|
3873
|
+
get each() {
|
|
3874
|
+
return ids();
|
|
3408
3875
|
},
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3876
|
+
children: (_, index) => {
|
|
3877
|
+
const notification = () => data()[index()];
|
|
3878
|
+
return createComponent(Notification, {
|
|
3879
|
+
get notification() {
|
|
3880
|
+
return notification();
|
|
3413
3881
|
},
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
return createComponent(Notification, {
|
|
3417
|
-
get notification() {
|
|
3418
|
-
return notification();
|
|
3419
|
-
},
|
|
3420
|
-
get renderNotification() {
|
|
3421
|
-
return props.renderNotification;
|
|
3422
|
-
},
|
|
3423
|
-
get onNotificationClick() {
|
|
3424
|
-
return props.onNotificationClick;
|
|
3425
|
-
},
|
|
3426
|
-
get onPrimaryActionClick() {
|
|
3427
|
-
return props.onPrimaryActionClick;
|
|
3428
|
-
},
|
|
3429
|
-
get onSecondaryActionClick() {
|
|
3430
|
-
return props.onSecondaryActionClick;
|
|
3431
|
-
}
|
|
3432
|
-
});
|
|
3433
|
-
}
|
|
3434
|
-
}), createComponent(Show, {
|
|
3435
|
-
get when() {
|
|
3436
|
-
return !end();
|
|
3882
|
+
get renderNotification() {
|
|
3883
|
+
return props.renderNotification;
|
|
3437
3884
|
},
|
|
3438
|
-
get
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3885
|
+
get renderSubject() {
|
|
3886
|
+
return props.renderSubject;
|
|
3887
|
+
},
|
|
3888
|
+
get renderBody() {
|
|
3889
|
+
return props.renderBody;
|
|
3890
|
+
},
|
|
3891
|
+
get onNotificationClick() {
|
|
3892
|
+
return props.onNotificationClick;
|
|
3893
|
+
},
|
|
3894
|
+
get onPrimaryActionClick() {
|
|
3895
|
+
return props.onPrimaryActionClick;
|
|
3896
|
+
},
|
|
3897
|
+
get onSecondaryActionClick() {
|
|
3898
|
+
return props.onSecondaryActionClick;
|
|
3450
3899
|
}
|
|
3451
|
-
})
|
|
3900
|
+
});
|
|
3452
3901
|
}
|
|
3453
|
-
})
|
|
3902
|
+
}), createComponent(Show, {
|
|
3903
|
+
get when() {
|
|
3904
|
+
return !end();
|
|
3905
|
+
},
|
|
3906
|
+
get children() {
|
|
3907
|
+
var _el$3 = _tmpl$49();
|
|
3908
|
+
use(setEl, _el$3);
|
|
3909
|
+
insert(_el$3, createComponent(NotificationListSkeleton, {
|
|
3910
|
+
loading: true
|
|
3911
|
+
}));
|
|
3912
|
+
return _el$3;
|
|
3913
|
+
}
|
|
3914
|
+
})];
|
|
3454
3915
|
}
|
|
3455
3916
|
}));
|
|
3456
3917
|
effect((_p$) => {
|
|
3457
|
-
var _v$ = style("notificationListContainer", "nt-relative nt-h-full nt-overflow-hidden"), _v$2 = style("notificationList", "nt-relative nt-h-full nt-flex nt-flex-col nt-overflow-y-auto");
|
|
3458
|
-
_v$ !== _p$.e && className(_el
|
|
3459
|
-
_v$2 !== _p$.t && className(_el$
|
|
3918
|
+
var _v$ = style("notificationListContainer", "nt-relative nt-border-t nt-border-t-neutral-alpha-200 nt-h-full nt-overflow-hidden"), _v$2 = style("notificationList", "nt-relative nt-h-full nt-flex nt-flex-col nt-overflow-y-auto");
|
|
3919
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
3920
|
+
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
3460
3921
|
return _p$;
|
|
3461
3922
|
}, {
|
|
3462
3923
|
e: void 0,
|
|
3463
3924
|
t: void 0
|
|
3464
3925
|
});
|
|
3465
|
-
return _el
|
|
3926
|
+
return _el$;
|
|
3466
3927
|
})();
|
|
3467
3928
|
};
|
|
3468
|
-
var _tmpl$
|
|
3929
|
+
var _tmpl$50 = /* @__PURE__ */ template(`<span>`);
|
|
3469
3930
|
var getDisplayCount = (count) => count >= 100 ? "99+" : count;
|
|
3470
3931
|
var InboxTabUnreadNotificationsCount = (props) => {
|
|
3471
3932
|
const style = useStyle();
|
|
3472
3933
|
const displayCount = createMemo(() => getDisplayCount(props.count));
|
|
3473
3934
|
return (() => {
|
|
3474
|
-
var _el$ = _tmpl$
|
|
3935
|
+
var _el$ = _tmpl$50();
|
|
3475
3936
|
insert(_el$, displayCount);
|
|
3476
3937
|
effect(() => className(_el$, style("notificationsTabsTriggerCount", "nt-rounded-full nt-bg-counter nt-px-[6px] nt-text-counter-foreground nt-text-sm")));
|
|
3477
3938
|
return _el$;
|
|
@@ -3496,7 +3957,7 @@ var InboxTab = (props) => {
|
|
|
3496
3957
|
},
|
|
3497
3958
|
get children() {
|
|
3498
3959
|
return [(() => {
|
|
3499
|
-
var _el$2 = _tmpl$
|
|
3960
|
+
var _el$2 = _tmpl$50();
|
|
3500
3961
|
insert(_el$2, () => props.label);
|
|
3501
3962
|
effect(() => className(_el$2, style("notificationsTabsTriggerLabel", "nt-text-sm nt-font-medium")));
|
|
3502
3963
|
return _el$2;
|
|
@@ -3534,7 +3995,7 @@ var InboxDropdownTab = (props) => {
|
|
|
3534
3995
|
},
|
|
3535
3996
|
get children() {
|
|
3536
3997
|
return [(() => {
|
|
3537
|
-
var _el$3 = _tmpl$
|
|
3998
|
+
var _el$3 = _tmpl$50();
|
|
3538
3999
|
insert(_el$3, () => props.label);
|
|
3539
4000
|
effect(() => className(_el$3, style("moreTabs__dropdownItemLabel", "nt-mr-auto")));
|
|
3540
4001
|
return _el$3;
|
|
@@ -3553,38 +4014,9 @@ var InboxDropdownTab = (props) => {
|
|
|
3553
4014
|
}
|
|
3554
4015
|
});
|
|
3555
4016
|
};
|
|
3556
|
-
var useTabsDropdown = ({ tabs }) => {
|
|
3557
|
-
const [tabsList, setTabsList] = createSignal();
|
|
3558
|
-
const [visibleTabs, setVisibleTabs] = createSignal([]);
|
|
3559
|
-
const [dropdownTabs, setDropdownTabs] = createSignal([]);
|
|
3560
|
-
onMount(() => {
|
|
3561
|
-
const tabsListEl = tabsList();
|
|
3562
|
-
if (!tabsListEl) return;
|
|
3563
|
-
const tabsElements = [...tabsListEl.querySelectorAll('[role="tab"]')];
|
|
3564
|
-
const observer = new IntersectionObserver(
|
|
3565
|
-
(entries) => {
|
|
3566
|
-
let visibleTabIds = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio === 1).map((entry) => entry.target.id);
|
|
3567
|
-
if (tabsElements.length === visibleTabIds.length) {
|
|
3568
|
-
setVisibleTabs(tabs.filter((tab) => visibleTabIds.includes(tab.label)));
|
|
3569
|
-
observer.disconnect();
|
|
3570
|
-
return;
|
|
3571
|
-
}
|
|
3572
|
-
visibleTabIds = visibleTabIds.slice(0, -1);
|
|
3573
|
-
setVisibleTabs(tabs.filter((tab) => visibleTabIds.includes(tab.label)));
|
|
3574
|
-
setDropdownTabs(tabs.filter((tab) => !visibleTabIds.includes(tab.label)));
|
|
3575
|
-
observer.disconnect();
|
|
3576
|
-
},
|
|
3577
|
-
{ root: tabsListEl }
|
|
3578
|
-
);
|
|
3579
|
-
for (const tabElement of tabsElements) {
|
|
3580
|
-
observer.observe(tabElement);
|
|
3581
|
-
}
|
|
3582
|
-
});
|
|
3583
|
-
return { dropdownTabs, setTabsList, visibleTabs };
|
|
3584
|
-
};
|
|
3585
4017
|
|
|
3586
4018
|
// src/ui/components/InboxTabs/InboxTabs.tsx
|
|
3587
|
-
var tabsDropdownTriggerVariants = () => `nt-relative after:nt-absolute after:nt-content-[''] after:nt-bottom-0 after:nt-left-0 after:nt-w-full after:nt-h-[2px] after:nt-border-b-2 nt-
|
|
4019
|
+
var tabsDropdownTriggerVariants = () => `nt-relative after:nt-absolute after:nt-content-[''] after:nt-bottom-0 after:nt-left-0 after:nt-w-full after:nt-h-[2px] after:nt-border-b-2 nt-mb-[0.625rem]`;
|
|
3588
4020
|
var InboxTabs = (props) => {
|
|
3589
4021
|
const style = useStyle();
|
|
3590
4022
|
const {
|
|
@@ -3608,16 +4040,15 @@ var InboxTabs = (props) => {
|
|
|
3608
4040
|
const options = createMemo(() => dropdownTabs().map((tab) => __spreadProps(__spreadValues({}, tab), {
|
|
3609
4041
|
rightIcon: tab.label === activeTab() ? createComponent(Check, {
|
|
3610
4042
|
get ["class"]() {
|
|
3611
|
-
return style("moreTabs__dropdownItemRight__icon");
|
|
4043
|
+
return style("moreTabs__dropdownItemRight__icon", "nt-size-3");
|
|
3612
4044
|
}
|
|
3613
4045
|
}) : void 0
|
|
3614
4046
|
})));
|
|
3615
4047
|
const dropdownTabsUnreadSum = createMemo(() => dropdownTabsUnreadCounts().reduce((accumulator, currentValue) => accumulator + currentValue, 0));
|
|
3616
4048
|
const isTabsDropdownActive = createMemo(() => dropdownTabs().map((tab) => tab.label).includes(activeTab()));
|
|
3617
4049
|
return createComponent(Tabs.Root, {
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
},
|
|
4050
|
+
appearanceKey: "notificationsTabs__tabsRoot",
|
|
4051
|
+
"class": "nt-flex nt-flex-col nt-flex-1 nt-min-h-0",
|
|
3621
4052
|
get value() {
|
|
3622
4053
|
return activeTab();
|
|
3623
4054
|
},
|
|
@@ -3631,6 +4062,7 @@ var InboxTabs = (props) => {
|
|
|
3631
4062
|
return createComponent(Tabs.List, {
|
|
3632
4063
|
ref: setTabsList,
|
|
3633
4064
|
appearanceKey: "notificationsTabs__tabsList",
|
|
4065
|
+
"class": "nt-bg-neutral-alpha-25 nt-px-4",
|
|
3634
4066
|
get children() {
|
|
3635
4067
|
return props.tabs.map((tab) => createComponent(InboxTab, mergeProps(tab, {
|
|
3636
4068
|
"class": "nt-invisible"
|
|
@@ -3641,30 +4073,34 @@ var InboxTabs = (props) => {
|
|
|
3641
4073
|
get children() {
|
|
3642
4074
|
return createComponent(Tabs.List, {
|
|
3643
4075
|
appearanceKey: "notificationsTabs__tabsList",
|
|
4076
|
+
"class": "nt-bg-neutral-alpha-25 nt-px-4",
|
|
3644
4077
|
get children() {
|
|
3645
|
-
return [
|
|
4078
|
+
return [createComponent(For, {
|
|
4079
|
+
get each() {
|
|
4080
|
+
return visibleTabs();
|
|
4081
|
+
},
|
|
4082
|
+
children: (tab) => createComponent(InboxTab, tab)
|
|
4083
|
+
}), createComponent(Show, {
|
|
3646
4084
|
get when() {
|
|
3647
4085
|
return dropdownTabs().length > 0;
|
|
3648
4086
|
},
|
|
3649
4087
|
get children() {
|
|
3650
4088
|
return createComponent(Dropdown.Root, {
|
|
3651
|
-
fallbackPlacements: ["bottom", "top"],
|
|
3652
|
-
placement: "bottom-start",
|
|
3653
4089
|
get children() {
|
|
3654
4090
|
return [createComponent(Dropdown.Trigger, {
|
|
3655
4091
|
appearanceKey: "moreTabs__dropdownTrigger",
|
|
3656
4092
|
asChild: (triggerProps) => createComponent(Button, mergeProps({
|
|
3657
4093
|
variant: "unstyled",
|
|
3658
|
-
size: "
|
|
4094
|
+
size: "iconSm",
|
|
3659
4095
|
appearanceKey: "moreTabs__button"
|
|
3660
4096
|
}, triggerProps, {
|
|
3661
4097
|
get ["class"]() {
|
|
3662
|
-
return cn(tabsDropdownTriggerVariants(), isTabsDropdownActive() ? "after:nt-border-b-primary" : "after:nt-border-b-transparent nt-text-foreground-alpha-
|
|
4098
|
+
return cn(tabsDropdownTriggerVariants(), "nt-ml-auto", isTabsDropdownActive() ? "after:nt-border-b-primary" : "after:nt-border-b-transparent nt-text-foreground-alpha-700");
|
|
3663
4099
|
},
|
|
3664
4100
|
get children() {
|
|
3665
|
-
return [createComponent(
|
|
4101
|
+
return [createComponent(ArrowDown, {
|
|
3666
4102
|
get ["class"]() {
|
|
3667
|
-
return style("
|
|
4103
|
+
return style("moreTabs__icon", "nt-size-5");
|
|
3668
4104
|
}
|
|
3669
4105
|
}), createComponent(Show, {
|
|
3670
4106
|
get when() {
|
|
@@ -3705,13 +4141,19 @@ var InboxTabs = (props) => {
|
|
|
3705
4141
|
return tab.label;
|
|
3706
4142
|
},
|
|
3707
4143
|
get ["class"]() {
|
|
3708
|
-
return style("notificationsTabs__tabsContent", cn(activeTab() === tab.label ? "nt-block" : "nt-hidden", "nt-flex-1 nt-
|
|
4144
|
+
return style("notificationsTabs__tabsContent", cn(activeTab() === tab.label ? "nt-block" : "nt-hidden", "nt-overflow-auto nt-flex-1 nt-flex nt-flex-col nt-min-h-0"));
|
|
3709
4145
|
},
|
|
3710
4146
|
get children() {
|
|
3711
4147
|
return createComponent(NotificationList, {
|
|
3712
4148
|
get renderNotification() {
|
|
3713
4149
|
return props.renderNotification;
|
|
3714
4150
|
},
|
|
4151
|
+
get renderSubject() {
|
|
4152
|
+
return props.renderSubject;
|
|
4153
|
+
},
|
|
4154
|
+
get renderBody() {
|
|
4155
|
+
return props.renderBody;
|
|
4156
|
+
},
|
|
3715
4157
|
get onNotificationClick() {
|
|
3716
4158
|
return props.onNotificationClick;
|
|
3717
4159
|
},
|
|
@@ -3734,7 +4176,7 @@ var InboxTabs = (props) => {
|
|
|
3734
4176
|
};
|
|
3735
4177
|
|
|
3736
4178
|
// src/ui/components/Inbox.tsx
|
|
3737
|
-
var _tmpl$
|
|
4179
|
+
var _tmpl$51 = /* @__PURE__ */ template(`<div>`);
|
|
3738
4180
|
var InboxPage = /* @__PURE__ */ function(InboxPage2) {
|
|
3739
4181
|
InboxPage2["Notifications"] = "notifications";
|
|
3740
4182
|
InboxPage2["Preferences"] = "preferences";
|
|
@@ -3756,7 +4198,7 @@ var InboxContent = (props) => {
|
|
|
3756
4198
|
};
|
|
3757
4199
|
});
|
|
3758
4200
|
return (() => {
|
|
3759
|
-
var _el$ = _tmpl$
|
|
4201
|
+
var _el$ = _tmpl$51();
|
|
3760
4202
|
insert(_el$, createComponent(Switch$1, {
|
|
3761
4203
|
get children() {
|
|
3762
4204
|
return [createComponent(Match, {
|
|
@@ -3778,6 +4220,12 @@ var InboxContent = (props) => {
|
|
|
3778
4220
|
get renderNotification() {
|
|
3779
4221
|
return props.renderNotification;
|
|
3780
4222
|
},
|
|
4223
|
+
get renderSubject() {
|
|
4224
|
+
return props.renderSubject;
|
|
4225
|
+
},
|
|
4226
|
+
get renderBody() {
|
|
4227
|
+
return props.renderBody;
|
|
4228
|
+
},
|
|
3781
4229
|
get onNotificationClick() {
|
|
3782
4230
|
return props.onNotificationClick;
|
|
3783
4231
|
},
|
|
@@ -3797,6 +4245,12 @@ var InboxContent = (props) => {
|
|
|
3797
4245
|
get renderNotification() {
|
|
3798
4246
|
return props.renderNotification;
|
|
3799
4247
|
},
|
|
4248
|
+
get renderSubject() {
|
|
4249
|
+
return props.renderSubject;
|
|
4250
|
+
},
|
|
4251
|
+
get renderBody() {
|
|
4252
|
+
return props.renderBody;
|
|
4253
|
+
},
|
|
3800
4254
|
get onNotificationClick() {
|
|
3801
4255
|
return props.onNotificationClick;
|
|
3802
4256
|
},
|
|
@@ -3832,7 +4286,7 @@ var InboxContent = (props) => {
|
|
|
3832
4286
|
return _el$;
|
|
3833
4287
|
})();
|
|
3834
4288
|
};
|
|
3835
|
-
var
|
|
4289
|
+
var Inbox = (props) => {
|
|
3836
4290
|
const style = useStyle();
|
|
3837
4291
|
const {
|
|
3838
4292
|
isOpened,
|
|
@@ -3863,7 +4317,7 @@ var Inbox2 = (props) => {
|
|
|
3863
4317
|
size: "icon"
|
|
3864
4318
|
}, triggerProps, {
|
|
3865
4319
|
get children() {
|
|
3866
|
-
return createComponent(
|
|
4320
|
+
return createComponent(Bell2, {
|
|
3867
4321
|
get renderBell() {
|
|
3868
4322
|
return props.renderBell;
|
|
3869
4323
|
}
|
|
@@ -3874,18 +4328,44 @@ var Inbox2 = (props) => {
|
|
|
3874
4328
|
appearanceKey: "inbox__popoverContent",
|
|
3875
4329
|
portal: true,
|
|
3876
4330
|
get children() {
|
|
3877
|
-
return createComponent(
|
|
3878
|
-
get
|
|
4331
|
+
return createComponent(Show, {
|
|
4332
|
+
get when() {
|
|
3879
4333
|
return props.renderNotification;
|
|
3880
4334
|
},
|
|
3881
|
-
get
|
|
3882
|
-
return
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
4335
|
+
get fallback() {
|
|
4336
|
+
return createComponent(InboxContent, {
|
|
4337
|
+
get renderSubject() {
|
|
4338
|
+
return props.renderSubject;
|
|
4339
|
+
},
|
|
4340
|
+
get renderBody() {
|
|
4341
|
+
return props.renderBody;
|
|
4342
|
+
},
|
|
4343
|
+
get onNotificationClick() {
|
|
4344
|
+
return props.onNotificationClick;
|
|
4345
|
+
},
|
|
4346
|
+
get onPrimaryActionClick() {
|
|
4347
|
+
return props.onPrimaryActionClick;
|
|
4348
|
+
},
|
|
4349
|
+
get onSecondaryActionClick() {
|
|
4350
|
+
return props.onSecondaryActionClick;
|
|
4351
|
+
}
|
|
4352
|
+
});
|
|
3886
4353
|
},
|
|
3887
|
-
get
|
|
3888
|
-
return
|
|
4354
|
+
get children() {
|
|
4355
|
+
return createComponent(InboxContent, {
|
|
4356
|
+
get renderNotification() {
|
|
4357
|
+
return props.renderNotification;
|
|
4358
|
+
},
|
|
4359
|
+
get onNotificationClick() {
|
|
4360
|
+
return props.onNotificationClick;
|
|
4361
|
+
},
|
|
4362
|
+
get onPrimaryActionClick() {
|
|
4363
|
+
return props.onPrimaryActionClick;
|
|
4364
|
+
},
|
|
4365
|
+
get onSecondaryActionClick() {
|
|
4366
|
+
return props.onSecondaryActionClick;
|
|
4367
|
+
}
|
|
4368
|
+
});
|
|
3889
4369
|
}
|
|
3890
4370
|
});
|
|
3891
4371
|
}
|
|
@@ -3896,21 +4376,55 @@ var Inbox2 = (props) => {
|
|
|
3896
4376
|
|
|
3897
4377
|
// src/ui/components/Renderer.tsx
|
|
3898
4378
|
var novuComponents = {
|
|
3899
|
-
Inbox
|
|
4379
|
+
Inbox,
|
|
3900
4380
|
InboxContent,
|
|
3901
|
-
Bell,
|
|
3902
|
-
Notifications: (props) =>
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
4381
|
+
Bell: Bell2,
|
|
4382
|
+
Notifications: (props) => {
|
|
4383
|
+
if (props.renderNotification) {
|
|
4384
|
+
const _a = props, propsWithoutBodyAndSubject = __objRest(_a, [
|
|
4385
|
+
"renderBody",
|
|
4386
|
+
"renderSubject"
|
|
4387
|
+
]);
|
|
4388
|
+
return createComponent(InboxContent, mergeProps(propsWithoutBodyAndSubject, {
|
|
4389
|
+
hideNav: true,
|
|
4390
|
+
get initialPage() {
|
|
4391
|
+
return InboxPage.Notifications;
|
|
4392
|
+
}
|
|
4393
|
+
}));
|
|
3906
4394
|
}
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
4395
|
+
const _b = props, propsWithoutRenderNotification = __objRest(_b, [
|
|
4396
|
+
"renderNotification"
|
|
4397
|
+
]);
|
|
4398
|
+
return createComponent(InboxContent, mergeProps(propsWithoutRenderNotification, {
|
|
4399
|
+
hideNav: true,
|
|
4400
|
+
get initialPage() {
|
|
4401
|
+
return InboxPage.Notifications;
|
|
4402
|
+
}
|
|
4403
|
+
}));
|
|
4404
|
+
},
|
|
4405
|
+
Preferences: (props) => {
|
|
4406
|
+
if (props.renderNotification) {
|
|
4407
|
+
const _a = props, propsWithoutBodyAndSubject = __objRest(_a, [
|
|
4408
|
+
"renderBody",
|
|
4409
|
+
"renderSubject"
|
|
4410
|
+
]);
|
|
4411
|
+
return createComponent(InboxContent, mergeProps(propsWithoutBodyAndSubject, {
|
|
4412
|
+
hideNav: true,
|
|
4413
|
+
get initialPage() {
|
|
4414
|
+
return InboxPage.Preferences;
|
|
4415
|
+
}
|
|
4416
|
+
}));
|
|
3912
4417
|
}
|
|
3913
|
-
|
|
4418
|
+
const _b = props, propsWithoutRenderNotification = __objRest(_b, [
|
|
4419
|
+
"renderNotification"
|
|
4420
|
+
]);
|
|
4421
|
+
return createComponent(InboxContent, mergeProps(propsWithoutRenderNotification, {
|
|
4422
|
+
hideNav: true,
|
|
4423
|
+
get initialPage() {
|
|
4424
|
+
return InboxPage.Preferences;
|
|
4425
|
+
}
|
|
4426
|
+
}));
|
|
4427
|
+
}
|
|
3914
4428
|
};
|
|
3915
4429
|
var Renderer = (props) => {
|
|
3916
4430
|
const nodes = () => [...props.nodes.keys()];
|
|
@@ -3975,11 +4489,13 @@ var Renderer = (props) => {
|
|
|
3975
4489
|
let portalDivElement;
|
|
3976
4490
|
const Component = novuComponents[novuComponent().name];
|
|
3977
4491
|
onMount(() => {
|
|
3978
|
-
if (!["Notifications", "Preferences"].includes(novuComponent().name)) return;
|
|
4492
|
+
if (!["Notifications", "Preferences", "InboxContent"].includes(novuComponent().name)) return;
|
|
3979
4493
|
if (node instanceof HTMLElement) {
|
|
3980
|
-
node.
|
|
4494
|
+
node.style.height = "100%";
|
|
4495
|
+
}
|
|
4496
|
+
if (portalDivElement) {
|
|
4497
|
+
portalDivElement.style.height = "100%";
|
|
3981
4498
|
}
|
|
3982
|
-
portalDivElement.classList.add("nt-h-full");
|
|
3983
4499
|
});
|
|
3984
4500
|
return createComponent(Portal, {
|
|
3985
4501
|
mount: node,
|
|
@@ -4009,7 +4525,7 @@ var Renderer = (props) => {
|
|
|
4009
4525
|
}
|
|
4010
4526
|
});
|
|
4011
4527
|
};
|
|
4012
|
-
var version = "
|
|
4528
|
+
var version = "3.0.0-canary.0";
|
|
4013
4529
|
var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
|
|
4014
4530
|
var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
|
|
4015
4531
|
var NovuUI = class {
|