@burdenoff/microfe-notification 2026.1029.2 → 2026.1113.1
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/AdminNotificationRoot.d.ts +33 -0
- package/dist/AdminNotificationRoot.js +9 -6
- package/dist/AdminNotificationRoot.js.map +1 -1
- package/dist/AdminNotificationRoutes.d.ts +1 -0
- package/dist/AdminNotificationRoutes.js +22 -23
- package/dist/AdminNotificationRoutes.js.map +1 -1
- package/dist/NotificationRoot.d.ts +29 -0
- package/dist/NotificationRoot.js +9 -6
- package/dist/NotificationRoot.js.map +1 -1
- package/dist/NotificationRoutes.d.ts +18 -0
- package/dist/NotificationRoutes.js +109 -38
- package/dist/NotificationRoutes.js.map +1 -1
- package/dist/UserNotificationRoot.d.ts +32 -0
- package/dist/UserNotificationRoot.js +9 -6
- package/dist/UserNotificationRoot.js.map +1 -1
- package/dist/UserNotificationRoutes.d.ts +16 -0
- package/dist/UserNotificationRoutes.js +9 -10
- package/dist/UserNotificationRoutes.js.map +1 -1
- package/dist/components/ConfirmDeleteDialog.d.ts +17 -0
- package/dist/components/ConfirmDeleteDialog.js +22 -0
- package/dist/components/ConfirmDeleteDialog.js.map +1 -0
- package/dist/components/FeatureDisabledPage.d.ts +6 -0
- package/dist/components/FeatureDisabledPage.js +1 -2
- package/dist/components/FeatureDisabledPage.js.map +1 -1
- package/dist/components/NotificationBell.d.ts +13 -0
- package/dist/components/NotificationBell.js +6 -7
- package/dist/components/NotificationBell.js.map +1 -1
- package/dist/components/NotificationCard.d.ts +27 -0
- package/dist/components/NotificationCard.js +106 -76
- package/dist/components/NotificationCard.js.map +1 -1
- package/dist/components/NotificationPanel.d.ts +10 -0
- package/dist/components/NotificationPanel.js +5 -6
- package/dist/components/NotificationPanel.js.map +1 -1
- package/dist/components/RecipientSelector.d.ts +32 -0
- package/dist/components/RecipientSelector.js +2 -3
- package/dist/components/RecipientSelector.js.map +1 -1
- package/dist/components/TemplatePreview.d.ts +21 -0
- package/dist/components/TemplatePreview.js +3 -4
- package/dist/components/TemplatePreview.js.map +1 -1
- package/dist/components/VariableInserter.d.ts +11 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +4 -3
- package/dist/constants/permissions.d.ts +23 -0
- package/dist/constants/permissions.js +1 -2
- package/dist/constants/permissions.js.map +1 -1
- package/dist/dev/main.d.ts +0 -0
- package/dist/generated/global-operations.d.ts +2119 -0
- package/dist/generated/global-operations.js +80 -69
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +23507 -0
- package/dist/generated/wspace-operations.d.ts +4 -0
- package/dist/generated/wspace-types.d.ts +57831 -0
- package/dist/graphql/global-client.d.ts +32 -0
- package/dist/graphql/global-client.js +23 -30
- package/dist/graphql/global-client.js.map +1 -1
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +7 -6
- package/dist/hooks/useNotificationAdmin.d.ts +46 -0
- package/dist/hooks/useNotificationAdmin.js +18 -17
- package/dist/hooks/useNotificationAdmin.js.map +1 -1
- package/dist/hooks/useNotificationAnalytics.d.ts +65 -0
- package/dist/hooks/useNotificationAnalytics.js +1 -2
- package/dist/hooks/useNotificationAnalytics.js.map +1 -1
- package/dist/hooks/useNotificationPreferences.d.ts +10 -0
- package/dist/hooks/useNotificationPreferences.js +7 -7
- package/dist/hooks/useNotificationPreferences.js.map +1 -1
- package/dist/hooks/useNotificationTemplates.d.ts +131 -0
- package/dist/hooks/useNotificationTemplates.js +1 -2
- package/dist/hooks/useNotificationTemplates.js.map +1 -1
- package/dist/hooks/useNotificationTopics.d.ts +35 -0
- package/dist/hooks/useNotificationTopics.js +22 -22
- package/dist/hooks/useNotificationTopics.js.map +1 -1
- package/dist/hooks/useNotifications.d.ts +39 -0
- package/dist/hooks/useNotifications.js +6 -4
- package/dist/hooks/useNotifications.js.map +1 -1
- package/dist/hooks/usePreferenceToggles.d.ts +27 -0
- package/dist/hooks/usePreferenceToggles.js +84 -0
- package/dist/hooks/usePreferenceToggles.js.map +1 -0
- package/dist/hooks/useSendNotification.d.ts +158 -0
- package/dist/hooks/useSendNotification.js +12 -10
- package/dist/hooks/useSendNotification.js.map +1 -1
- package/dist/hooks/useUserSearch.d.ts +26 -0
- package/dist/hooks/useUserSearch.js +8 -10
- package/dist/hooks/useUserSearch.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/dist/index.js +8 -8
- package/dist/navigation-v2/AdminPageV2.d.ts +14 -0
- package/dist/navigation-v2/AdminPageV2.js +51 -0
- package/dist/navigation-v2/AdminPageV2.js.map +1 -0
- package/dist/navigation-v2/AdminToolsMenu.d.ts +6 -0
- package/dist/navigation-v2/AdminToolsMenu.js +32 -0
- package/dist/navigation-v2/AdminToolsMenu.js.map +1 -0
- package/dist/navigation-v2/BackToNotifications.d.ts +2 -0
- package/dist/navigation-v2/BackToNotifications.js +20 -0
- package/dist/navigation-v2/BackToNotifications.js.map +1 -0
- package/dist/navigation-v2/FilterControls.d.ts +25 -0
- package/dist/navigation-v2/FilterControls.js +64 -0
- package/dist/navigation-v2/FilterControls.js.map +1 -0
- package/dist/navigation-v2/NotificationArchivedV2.d.ts +9 -0
- package/dist/navigation-v2/NotificationArchivedV2.js +174 -0
- package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -0
- package/dist/navigation-v2/NotificationInboxV2.d.ts +9 -0
- package/dist/navigation-v2/NotificationInboxV2.js +309 -0
- package/dist/navigation-v2/NotificationInboxV2.js.map +1 -0
- package/dist/navigation-v2/NotificationSettingsV2.d.ts +9 -0
- package/dist/navigation-v2/NotificationSettingsV2.js +203 -0
- package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -0
- package/dist/navigation-v2/NotificationsV2Landing.d.ts +9 -0
- package/dist/navigation-v2/NotificationsV2Landing.js +37 -0
- package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -0
- package/dist/navigation-v2/__tests__/uiMocks.d.ts +71 -0
- package/dist/navigation-v2/inboxFilters.d.ts +8 -0
- package/dist/navigation-v2/inboxFilters.js +10 -0
- package/dist/navigation-v2/inboxFilters.js.map +1 -0
- package/dist/navigation-v2/paths.d.ts +24 -0
- package/dist/navigation-v2/paths.js +31 -0
- package/dist/navigation-v2/paths.js.map +1 -0
- package/dist/navigation-v2/settingsOptions.d.ts +12 -0
- package/dist/navigation-v2/settingsOptions.js +58 -0
- package/dist/navigation-v2/settingsOptions.js.map +1 -0
- package/dist/navigation-v2/useAdminTools.d.ts +22 -0
- package/dist/navigation-v2/useAdminTools.js +76 -0
- package/dist/navigation-v2/useAdminTools.js.map +1 -0
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
- package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
- package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js +9 -10
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/version.js +2 -3
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
- package/dist/node_modules/@wry/trie/lib/index.js +2 -3
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/client.js +76 -69
- package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/pages/CreateNotificationPage.d.ts +5 -0
- package/dist/pages/CreateNotificationPage.js +591 -573
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.d.ts +8 -0
- package/dist/pages/NotificationCenterPage.js +87 -83
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.d.ts +2 -0
- package/dist/pages/NotificationHistoryAdminPage.js +7 -8
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.d.ts +6 -0
- package/dist/pages/NotificationHistoryPage.js +59 -55
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationLandingPage.d.ts +10 -0
- package/dist/pages/NotificationLandingPage.js +5 -6
- package/dist/pages/NotificationLandingPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.d.ts +5 -0
- package/dist/pages/NotificationPreferencesPage.js +97 -159
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.d.ts +7 -0
- package/dist/pages/NotificationTemplatesPage.js +192 -172
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.d.ts +1 -0
- package/dist/pages/NotificationTopicsPage.js +126 -112
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.d.ts +12 -0
- package/dist/pages/TemplateEditorPage.js +381 -341
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/dist/providers/NotificationProvider.d.ts +11 -0
- package/dist/providers/NotificationProvider.js +7 -7
- package/dist/providers/NotificationProvider.js.map +1 -1
- package/dist/shared/hooks/useTr.d.ts +13 -0
- package/dist/shared/hooks/useTr.js +1 -2
- package/dist/shared/hooks/useTr.js.map +1 -1
- package/dist/store/notificationStore.d.ts +30 -0
- package/dist/store/notificationStore.js +1 -2
- package/dist/store/notificationStore.js.map +1 -1
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.d.ts +468 -0
- package/dist/types/index.d.ts +257 -0
- package/dist/utils/inAppNavigation.d.ts +37 -0
- package/dist/utils/inAppNavigation.js +2 -3
- package/dist/utils/inAppNavigation.js.map +1 -1
- package/dist/utils/index.d.ts +68 -0
- package/dist/utils/index.js +1 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +2 -0
- package/dist/utils/nativeBridge.js +1 -2
- package/dist/utils/notificationHistoryExport.d.ts +12 -0
- package/dist/utils/notificationHistoryExport.js +1 -2
- package/dist/utils/notificationHistoryExport.js.map +1 -1
- package/package.json +67 -49
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
|
@@ -1,353 +1,373 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useNotificationTemplates as e } from "../hooks/useNotificationTemplates.js";
|
|
2
|
+
import { NOTIFICATION_PERMISSIONS as t } from "../constants/permissions.js";
|
|
3
|
+
import { useTr as n } from "../shared/hooks/useTr.js";
|
|
4
|
+
import { nativeConfirm as r, nativeImpact as i, nativeNotify as a } from "../utils/nativeBridge.js";
|
|
5
|
+
import { ConfirmDeleteDialog as o } from "../components/ConfirmDeleteDialog.js";
|
|
6
|
+
import { useNavigationV2 as s, useNotificationPaths as c } from "../navigation-v2/paths.js";
|
|
7
|
+
import { useMemo as ee, useState as l } from "react";
|
|
8
|
+
import { usePermissions as te } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
9
|
+
import { AlertCircle as u, FileText as d, Loader2 as f, Plus as p, RefreshCw as ne, Search as re, Trash2 as m } from "lucide-react";
|
|
10
|
+
import { useNavigate as ie } from "react-router";
|
|
11
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
+
import { Button as _, EmphasisPanel as v, GlassCard as y, IllustratedEmptyState as b, NextSteps as ae, PagePurpose as oe } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
// src/pages/NotificationTemplatesPage.tsx
|
|
15
|
+
var S = {
|
|
14
16
|
TRANSACTIONAL: "text-status-info-text bg-status-info-bg-subtle border-status-info-bg-subtle",
|
|
15
17
|
MARKETING: "text-accent-purple bg-accent-purple-subtle border-accent-purple-subtle",
|
|
16
18
|
SYSTEM: "text-status-warning-text bg-status-warning-bg-subtle border-status-warning-bg-subtle",
|
|
17
19
|
ALERT: "text-status-error-text bg-status-error-bg-subtle border-status-error-bg-subtle"
|
|
18
|
-
},
|
|
20
|
+
}, se = {
|
|
19
21
|
TRANSACTIONAL: "Transactional",
|
|
20
22
|
MARKETING: "Marketing",
|
|
21
23
|
SYSTEM: "System",
|
|
22
24
|
ALERT: "Alert"
|
|
23
25
|
};
|
|
24
|
-
function
|
|
26
|
+
function C(e, t) {
|
|
25
27
|
return new Date(e).toLocaleDateString(t || "en-US", {
|
|
26
28
|
month: "short",
|
|
27
29
|
day: "numeric",
|
|
28
30
|
year: "numeric"
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
33
|
-
e
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
function w() {
|
|
34
|
+
let w = ie(), T = n(), E = c(), D = s(), [O, k] = l(null), A = (e, t) => D ? new Promise((n) => k({
|
|
35
|
+
title: e,
|
|
36
|
+
message: t,
|
|
37
|
+
resolve: n
|
|
38
|
+
})) : Promise.resolve(window.confirm(t)), { locale: j } = x(), { hasPermission: M, isLoading: ce } = te(), { templates: N, isLoading: P, isDeleting: F, error: I, total: L, hasMore: R, filter: z, refetch: B, loadMore: V, deleteTemplate: H, updateFilter: U } = e(), [W, G] = l(null), [K, q] = l(null), [J, Y] = l(/* @__PURE__ */ new Set()), X = ee(() => N.filter((e) => J.has(e.id)), [J, N]), Z = N.length > 0 && N.every((e) => J.has(e.id)), le = N.some((e) => J.has(e.id)) && !Z, Q = M(t.TEMPLATE_CREATE), $ = M(t.TEMPLATE_DELETE), ue = async (e, t) => {
|
|
39
|
+
e.stopPropagation(), i("medium");
|
|
40
|
+
let n = T("notifTemplates.confirmDelete", `Delete template "${t.name}"? This cannot be undone.`), o = await r({
|
|
41
|
+
title: T("notifTemplates.deleteTitle", "Delete template"),
|
|
42
|
+
message: n,
|
|
43
|
+
okButtonTitle: T("notifTemplates.delete", "Delete")
|
|
38
44
|
});
|
|
39
|
-
if (o === null ?
|
|
40
|
-
|
|
45
|
+
if (o === null ? await A(T("notifTemplates.deleteTitle", "Delete template"), n) : o) {
|
|
46
|
+
G(t.id), q(null);
|
|
41
47
|
try {
|
|
42
|
-
await
|
|
48
|
+
await H(t.id), a("success");
|
|
43
49
|
} catch (e) {
|
|
44
|
-
|
|
50
|
+
a("error"), q(e instanceof Error ? e.message : T("notifTemplates.deleteFailed", "Failed to delete template"));
|
|
45
51
|
} finally {
|
|
46
|
-
|
|
52
|
+
G(null);
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
|
-
},
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
let e =
|
|
53
|
-
title:
|
|
55
|
+
}, de = async () => {
|
|
56
|
+
if (X.length === 0) return;
|
|
57
|
+
i("medium");
|
|
58
|
+
let e = T("notifTemplates.confirmBulkDelete", `Delete ${X.length} selected template${X.length === 1 ? "" : "s"}? This cannot be undone.`), t = await r({
|
|
59
|
+
title: T("notifTemplates.bulkDeleteTitle", "Delete templates"),
|
|
54
60
|
message: e,
|
|
55
|
-
okButtonTitle:
|
|
61
|
+
okButtonTitle: T("notifTemplates.delete", "Delete")
|
|
56
62
|
});
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
if (!(t === null ? await A(T("notifTemplates.bulkDeleteTitle", "Delete templates"), e) : t)) return;
|
|
64
|
+
q(null);
|
|
65
|
+
let n = (await Promise.allSettled(X.map((e) => H(e.id)))).some((e) => e.status === "rejected");
|
|
66
|
+
a(n ? "error" : "success"), Y(/* @__PURE__ */ new Set());
|
|
67
|
+
}, fe = (e, t) => {
|
|
68
|
+
Y((n) => {
|
|
60
69
|
let r = new Set(n);
|
|
61
70
|
return t ? r.add(e) : r.delete(e), r;
|
|
62
71
|
});
|
|
63
|
-
},
|
|
64
|
-
|
|
72
|
+
}, pe = (e) => {
|
|
73
|
+
Y((t) => {
|
|
65
74
|
let n = new Set(t);
|
|
66
|
-
return
|
|
75
|
+
return N.forEach((t) => {
|
|
67
76
|
e ? n.add(t.id) : n.delete(t.id);
|
|
68
77
|
}), n;
|
|
69
78
|
});
|
|
70
79
|
};
|
|
71
|
-
return
|
|
80
|
+
return ce ? /* @__PURE__ */ h("div", {
|
|
72
81
|
className: "flex h-64 items-center justify-center",
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
}) :
|
|
82
|
+
children: /* @__PURE__ */ h("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
83
|
+
}) : M(t.TEMPLATE_LIST) || Q || $ || M(t.TEMPLATE_UPDATE) ? P && N.length === 0 ? /* @__PURE__ */ g("div", {
|
|
75
84
|
className: "flex flex-col items-center justify-center h-64 gap-3",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ h(f, {
|
|
77
86
|
size: 28,
|
|
78
87
|
className: "animate-spin text-accent-primary"
|
|
79
|
-
}), /* @__PURE__ */
|
|
88
|
+
}), /* @__PURE__ */ h("p", {
|
|
80
89
|
className: "text-sm text-secondary",
|
|
81
|
-
children:
|
|
90
|
+
children: T("notifTemplates.loading", "Loading templates...")
|
|
82
91
|
})]
|
|
83
|
-
}) :
|
|
92
|
+
}) : I && N.length === 0 ? /* @__PURE__ */ g("div", {
|
|
84
93
|
className: "flex flex-col items-center justify-center h-64 gap-4",
|
|
85
94
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ h(u, {
|
|
87
96
|
size: 28,
|
|
88
97
|
className: "text-error"
|
|
89
98
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ h("p", {
|
|
91
100
|
className: "text-sm text-error",
|
|
92
|
-
children:
|
|
101
|
+
children: I
|
|
93
102
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
onClick:
|
|
103
|
+
/* @__PURE__ */ g("button", {
|
|
104
|
+
onClick: B,
|
|
96
105
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-accent-primary hover:bg-accent-primary/90 rounded-lg transition-all duration-150",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ h(ne, { size: 14 }), T("notifTemplates.retry", "Retry")]
|
|
98
107
|
})
|
|
99
108
|
]
|
|
100
|
-
}) : /* @__PURE__ */
|
|
109
|
+
}) : /* @__PURE__ */ g("div", {
|
|
101
110
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-200",
|
|
102
111
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
icon: /* @__PURE__ */
|
|
105
|
-
children:
|
|
112
|
+
/* @__PURE__ */ h(oe, {
|
|
113
|
+
icon: /* @__PURE__ */ h(d, { size: 16 }),
|
|
114
|
+
children: T("notifTemplates.purpose", "Reusable, versioned message blueprints — subject lines, bodies and channel layouts with {{variables}} you fill in at send time. Build a template once (e.g. a welcome email or a payment receipt) and reuse it from the Send page so every notification stays on-brand and consistent.")
|
|
106
115
|
}),
|
|
107
|
-
/* @__PURE__ */ v
|
|
116
|
+
/* @__PURE__ */ g(v, {
|
|
108
117
|
className: "flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between sm:p-6",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
110
119
|
className: "text-xl sm:text-2xl font-bold text-primary",
|
|
111
|
-
children:
|
|
112
|
-
}), /* @__PURE__ */
|
|
120
|
+
children: T("notifTemplates.title", "Notification Templates")
|
|
121
|
+
}), /* @__PURE__ */ g("p", {
|
|
113
122
|
className: "text-sm text-secondary mt-1",
|
|
114
123
|
children: [
|
|
115
|
-
|
|
124
|
+
L,
|
|
116
125
|
" ",
|
|
117
|
-
|
|
118
|
-
|
|
126
|
+
T("notifTemplates.templateCount", "template"),
|
|
127
|
+
L === 1 ? "" : "s",
|
|
119
128
|
" ",
|
|
120
|
-
|
|
129
|
+
T("notifTemplates.total", "total")
|
|
121
130
|
]
|
|
122
|
-
})] }), Q && /* @__PURE__ */
|
|
123
|
-
onClick: () =>
|
|
131
|
+
})] }), Q && /* @__PURE__ */ g(_, {
|
|
132
|
+
onClick: () => w(E.newTemplate),
|
|
124
133
|
className: "gap-2",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ h(p, { size: 16 }), T("notifTemplates.createTemplate", "Create Template")]
|
|
126
135
|
})]
|
|
127
136
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ h(ae, {
|
|
129
138
|
storageKey: "notification-templates",
|
|
130
139
|
steps: [
|
|
131
140
|
...Q ? [{
|
|
132
141
|
id: "create-template",
|
|
133
|
-
label:
|
|
134
|
-
description:
|
|
135
|
-
onClick: () =>
|
|
142
|
+
label: T("notifTemplates.nextCreateLabel", "Create your first template"),
|
|
143
|
+
description: T("notifTemplates.nextCreateDesc", "Build a reusable message blueprint with {{variables}} you fill in at send time."),
|
|
144
|
+
onClick: () => w(E.newTemplate)
|
|
136
145
|
}] : [],
|
|
137
146
|
{
|
|
138
147
|
id: "filter-type",
|
|
139
|
-
label:
|
|
140
|
-
description:
|
|
141
|
-
onClick: () =>
|
|
148
|
+
label: T("notifTemplates.nextFilterLabel", "Filter by type"),
|
|
149
|
+
description: T("notifTemplates.nextFilterDesc", "Narrow to Transactional, Marketing, System or Alert templates to find one fast."),
|
|
150
|
+
onClick: () => U({ type: "TRANSACTIONAL" })
|
|
142
151
|
},
|
|
143
152
|
{
|
|
144
153
|
id: "use-on-send",
|
|
145
|
-
label:
|
|
146
|
-
description:
|
|
147
|
-
href:
|
|
154
|
+
label: T("notifTemplates.nextUseLabel", "Send with a template"),
|
|
155
|
+
description: T("notifTemplates.nextUseDesc", "Pick any saved template from the Send page so every notification stays on-brand."),
|
|
156
|
+
href: E.send
|
|
148
157
|
}
|
|
149
158
|
]
|
|
150
159
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ g("div", {
|
|
152
161
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ g("div", {
|
|
154
163
|
className: "relative flex-1",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ h(re, {
|
|
156
165
|
size: 16,
|
|
157
166
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-tertiary"
|
|
158
|
-
}), /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ h("input", {
|
|
159
168
|
type: "text",
|
|
160
|
-
value:
|
|
161
|
-
onChange: (e) =>
|
|
162
|
-
placeholder:
|
|
169
|
+
value: z.search || "",
|
|
170
|
+
onChange: (e) => U({ search: e.target.value }),
|
|
171
|
+
placeholder: T("notifTemplates.searchPlaceholder", "Search templates..."),
|
|
163
172
|
className: "w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150"
|
|
164
173
|
})]
|
|
165
|
-
}), /* @__PURE__ */
|
|
166
|
-
value:
|
|
167
|
-
onChange: (e) =>
|
|
174
|
+
}), /* @__PURE__ */ g("select", {
|
|
175
|
+
value: z.type || "",
|
|
176
|
+
onChange: (e) => U({ type: e.target.value || void 0 }),
|
|
168
177
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
169
178
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ h("option", {
|
|
171
180
|
value: "",
|
|
172
|
-
children:
|
|
181
|
+
children: T("notifTemplates.allTypes", "All Types")
|
|
173
182
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ h("option", {
|
|
175
184
|
value: "TRANSACTIONAL",
|
|
176
|
-
children:
|
|
185
|
+
children: T("notifTemplates.typeTransactional", "Transactional")
|
|
177
186
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ h("option", {
|
|
179
188
|
value: "MARKETING",
|
|
180
|
-
children:
|
|
189
|
+
children: T("notifTemplates.typeMarketing", "Marketing")
|
|
181
190
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ h("option", {
|
|
183
192
|
value: "SYSTEM",
|
|
184
|
-
children:
|
|
193
|
+
children: T("notifTemplates.typeSystem", "System")
|
|
185
194
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ h("option", {
|
|
187
196
|
value: "ALERT",
|
|
188
|
-
children:
|
|
197
|
+
children: T("notifTemplates.typeAlert", "Alert")
|
|
189
198
|
})
|
|
190
199
|
]
|
|
191
200
|
})]
|
|
192
201
|
}),
|
|
193
|
-
|
|
202
|
+
N.length > 0 && /* @__PURE__ */ g(y, {
|
|
194
203
|
treatment: "plain",
|
|
195
204
|
className: "flex flex-col gap-3 border-border-seam p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ g("label", {
|
|
197
206
|
className: "flex items-center gap-2 text-sm text-primary",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ h("input", {
|
|
199
208
|
type: "checkbox",
|
|
200
|
-
checked:
|
|
209
|
+
checked: Z,
|
|
201
210
|
ref: (e) => {
|
|
202
|
-
e && (e.indeterminate =
|
|
211
|
+
e && (e.indeterminate = le && !Z);
|
|
203
212
|
},
|
|
204
|
-
onChange: (e) =>
|
|
205
|
-
"aria-label":
|
|
213
|
+
onChange: (e) => pe(e.target.checked),
|
|
214
|
+
"aria-label": T("notifTemplates.selectAllVisibleAria", "Select all notification templates"),
|
|
206
215
|
className: "h-4 w-4 rounded border-default text-accent-primary"
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
-
}), /* @__PURE__ */
|
|
216
|
+
}), /* @__PURE__ */ h("span", { children: T("notifTemplates.selectAllVisible", "Select all visible") })]
|
|
217
|
+
}), /* @__PURE__ */ g("div", {
|
|
209
218
|
className: "flex items-center gap-2",
|
|
210
219
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ g("span", {
|
|
212
221
|
className: "text-sm text-secondary",
|
|
213
222
|
children: [
|
|
214
|
-
|
|
223
|
+
J.size,
|
|
215
224
|
" ",
|
|
216
|
-
|
|
225
|
+
T("notifTemplates.selected", "selected")
|
|
217
226
|
]
|
|
218
227
|
}),
|
|
219
|
-
|
|
220
|
-
onClick: () =>
|
|
228
|
+
J.size > 0 && /* @__PURE__ */ h("button", {
|
|
229
|
+
onClick: () => Y(/* @__PURE__ */ new Set()),
|
|
221
230
|
className: "text-sm text-secondary hover:text-primary",
|
|
222
|
-
children:
|
|
231
|
+
children: T("notifTemplates.clearSelection", "Clear selection")
|
|
223
232
|
}),
|
|
224
|
-
$ && /* @__PURE__ */
|
|
225
|
-
onClick:
|
|
226
|
-
disabled:
|
|
233
|
+
$ && /* @__PURE__ */ g("button", {
|
|
234
|
+
onClick: de,
|
|
235
|
+
disabled: X.length === 0 || F,
|
|
227
236
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-error border border-error/30 hover:bg-error/10 rounded-lg transition-all duration-150 disabled:opacity-50",
|
|
228
237
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
|
|
231
|
-
|
|
238
|
+
/* @__PURE__ */ h(m, { size: 14 }),
|
|
239
|
+
T("notifTemplates.deleteSelected", "Delete Selected"),
|
|
240
|
+
X.length > 0 ? ` (${X.length})` : ""
|
|
232
241
|
]
|
|
233
242
|
})
|
|
234
243
|
]
|
|
235
244
|
})]
|
|
236
245
|
}),
|
|
237
|
-
|
|
246
|
+
K && /* @__PURE__ */ g("div", {
|
|
238
247
|
className: "flex items-center gap-3 p-3 bg-error/10 border border-error/30 rounded-lg",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ h(u, {
|
|
240
249
|
size: 16,
|
|
241
250
|
className: "text-error shrink-0"
|
|
242
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ h("p", {
|
|
243
252
|
className: "text-sm text-error",
|
|
244
|
-
children:
|
|
253
|
+
children: K
|
|
245
254
|
})]
|
|
246
255
|
}),
|
|
247
|
-
|
|
248
|
-
illustration:
|
|
249
|
-
title:
|
|
250
|
-
description:
|
|
251
|
-
action: !
|
|
252
|
-
onClick: () =>
|
|
256
|
+
N.length === 0 && !P && /* @__PURE__ */ h(b, {
|
|
257
|
+
illustration: z.search || z.type ? "empty-search" : "empty-files",
|
|
258
|
+
title: z.search || z.type ? T("notifTemplates.noMatchingTemplates", "No templates match your filters") : T("notifTemplates.noTemplatesYet", "No templates yet. Create your first one!"),
|
|
259
|
+
description: z.search || z.type ? T("notifications.adjustSearchOrDateRange", "Try adjusting your filters") : T("notifTemplates.noTemplatesDescription", "Reusable templates let you send consistent notifications fast."),
|
|
260
|
+
action: !z.search && !z.type && Q ? /* @__PURE__ */ g(_, {
|
|
261
|
+
onClick: () => w(E.newTemplate),
|
|
253
262
|
className: "gap-2",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ h(p, { size: 16 }), T("notifTemplates.createTemplate", "Create Template")]
|
|
255
264
|
}) : void 0
|
|
256
265
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ h("div", {
|
|
258
267
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
259
|
-
children:
|
|
260
|
-
onClick: () =>
|
|
261
|
-
className: `group relative p-4 bg-gloss-card border rounded-lg cursor-pointer transition-[box-shadow,border-color] duration-200 hover:shadow-[var(--shadow-pop)] hover:border-accent-primary/30 ${
|
|
268
|
+
children: N.map((e) => /* @__PURE__ */ g("div", {
|
|
269
|
+
onClick: () => w(E.template(e.slug)),
|
|
270
|
+
className: `group relative p-4 bg-gloss-card border rounded-lg cursor-pointer transition-[box-shadow,border-color] duration-200 hover:shadow-[var(--shadow-pop)] hover:border-accent-primary/30 ${J.has(e.id) ? "border-accent-primary/50 ring-1 ring-accent-primary/20" : "border-border-seam"}`,
|
|
262
271
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ g("div", {
|
|
264
273
|
className: "flex items-start justify-between mb-3",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ g("div", {
|
|
266
275
|
className: "flex items-center gap-2",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ h("input", {
|
|
268
277
|
type: "checkbox",
|
|
269
|
-
checked:
|
|
278
|
+
checked: J.has(e.id),
|
|
270
279
|
onChange: (t) => {
|
|
271
|
-
t.stopPropagation(),
|
|
280
|
+
t.stopPropagation(), fe(e.id, t.target.checked);
|
|
272
281
|
},
|
|
273
282
|
onClick: (e) => e.stopPropagation(),
|
|
274
|
-
"aria-label":
|
|
283
|
+
"aria-label": T("notifTemplates.selectTemplateAria", "Select template {{name}}").replace("{{name}}", e.name),
|
|
275
284
|
className: "h-4 w-4 rounded border-default text-accent-primary"
|
|
276
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ h(d, {
|
|
277
286
|
size: 20,
|
|
278
287
|
className: "text-accent-primary"
|
|
279
288
|
})]
|
|
280
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ g("div", {
|
|
281
290
|
className: "flex items-center gap-2",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
283
|
-
className: `px-2 py-0.5 text-[10px] font-semibold rounded-full border ${
|
|
284
|
-
children:
|
|
285
|
-
}), $ && /* @__PURE__ */
|
|
286
|
-
onClick: (t) =>
|
|
287
|
-
disabled:
|
|
291
|
+
children: [/* @__PURE__ */ h("span", {
|
|
292
|
+
className: `px-2 py-0.5 text-[10px] font-semibold rounded-full border ${S[e.type] || "text-tertiary bg-bg-sunken border-default"}`,
|
|
293
|
+
children: T(`notifTemplates.type.${e.type}`, se[e.type] || e.type)
|
|
294
|
+
}), $ && /* @__PURE__ */ h("button", {
|
|
295
|
+
onClick: (t) => ue(t, e),
|
|
296
|
+
disabled: F && W === e.id,
|
|
288
297
|
className: "opacity-0 group-hover:opacity-100 p-1 text-tertiary hover:text-error rounded transition-all duration-150",
|
|
289
|
-
title:
|
|
290
|
-
children:
|
|
298
|
+
title: T("notifTemplates.deleteTemplate", "Delete template"),
|
|
299
|
+
children: F && W === e.id ? /* @__PURE__ */ h(f, {
|
|
291
300
|
size: 14,
|
|
292
301
|
className: "animate-spin"
|
|
293
|
-
}) : /* @__PURE__ */
|
|
302
|
+
}) : /* @__PURE__ */ h(m, { size: 14 })
|
|
294
303
|
})]
|
|
295
304
|
})]
|
|
296
305
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ h("h3", {
|
|
298
307
|
className: "text-sm font-semibold text-primary mb-1 truncate",
|
|
299
308
|
children: e.name
|
|
300
309
|
}),
|
|
301
|
-
e.description && /* @__PURE__ */
|
|
310
|
+
e.description && /* @__PURE__ */ h("p", {
|
|
302
311
|
className: "text-xs text-secondary mb-2 line-clamp-2",
|
|
303
312
|
children: e.description
|
|
304
313
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ g("div", {
|
|
306
315
|
className: "flex items-center gap-2 text-[11px] text-tertiary mt-auto pt-2 border-t border-default/50",
|
|
307
316
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ h("code", {
|
|
309
318
|
className: "px-1.5 py-0.5 bg-bg-sunken rounded text-[10px]",
|
|
310
319
|
children: e.slug
|
|
311
320
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ h("span", { children: "•" }),
|
|
322
|
+
/* @__PURE__ */ h("span", { children: e.locale || "en" }),
|
|
323
|
+
/* @__PURE__ */ h("span", { children: "•" }),
|
|
324
|
+
/* @__PURE__ */ h("span", {
|
|
316
325
|
className: e.enabled ? "text-success" : "text-tertiary",
|
|
317
|
-
children: e.enabled ?
|
|
326
|
+
children: e.enabled ? T("notifTemplates.enabled", "Enabled") : T("notifTemplates.disabled", "Disabled")
|
|
318
327
|
})
|
|
319
328
|
]
|
|
320
329
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ g("p", {
|
|
322
331
|
className: "text-[10px] text-tertiary mt-1.5",
|
|
323
332
|
children: [
|
|
324
|
-
|
|
333
|
+
T("notifTemplates.updated", "Updated"),
|
|
325
334
|
" ",
|
|
326
|
-
|
|
335
|
+
C(e.updatedAt, j)
|
|
327
336
|
]
|
|
328
337
|
})
|
|
329
338
|
]
|
|
330
339
|
}, e.id))
|
|
331
340
|
}),
|
|
332
|
-
|
|
341
|
+
R && /* @__PURE__ */ h("div", {
|
|
333
342
|
className: "flex justify-center pt-2",
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
onClick:
|
|
336
|
-
disabled:
|
|
343
|
+
children: /* @__PURE__ */ g("button", {
|
|
344
|
+
onClick: V,
|
|
345
|
+
disabled: P,
|
|
337
346
|
className: "flex items-center gap-2 px-4 py-2 text-sm text-secondary hover:text-primary border border-default rounded-lg transition-all duration-150 hover:shadow-sm",
|
|
338
|
-
children: [
|
|
347
|
+
children: [P ? /* @__PURE__ */ h(f, {
|
|
339
348
|
size: 14,
|
|
340
349
|
className: "animate-spin"
|
|
341
|
-
}) : null,
|
|
350
|
+
}) : null, T("notifTemplates.loadMore", "Load More")]
|
|
342
351
|
})
|
|
352
|
+
}),
|
|
353
|
+
D && /* @__PURE__ */ h(o, {
|
|
354
|
+
open: O !== null,
|
|
355
|
+
title: O?.title ?? "",
|
|
356
|
+
description: O?.message ?? "",
|
|
357
|
+
confirmLabel: T("notifTemplates.delete", "Delete"),
|
|
358
|
+
onCancel: () => {
|
|
359
|
+
O?.resolve(!1), k(null);
|
|
360
|
+
},
|
|
361
|
+
onConfirm: () => {
|
|
362
|
+
O?.resolve(!0), k(null);
|
|
363
|
+
}
|
|
343
364
|
})
|
|
344
365
|
]
|
|
345
|
-
}) : /* @__PURE__ */
|
|
366
|
+
}) : /* @__PURE__ */ h("div", {
|
|
346
367
|
className: "p-8 text-center text-text-secondary",
|
|
347
|
-
children:
|
|
368
|
+
children: T("notifTemplates.noPermissionView", "You don't have permission to view notification templates.")
|
|
348
369
|
});
|
|
349
370
|
}
|
|
350
|
-
|
|
351
|
-
export { D as NotificationTemplatesPage };
|
|
371
|
+
export { w as NotificationTemplatesPage };
|
|
352
372
|
|
|
353
373
|
//# sourceMappingURL=NotificationTemplatesPage.js.map
|