@burdenoff/microfe-notification 2026.1023.1 → 2026.1029.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/components/NotificationBell.js +35 -34
- package/dist/components/NotificationBell.js.map +1 -1
- package/dist/components/NotificationCard.js +9 -9
- package/dist/graphql/global-client.js +43 -28
- package/dist/graphql/global-client.js.map +1 -1
- package/dist/hooks/useNotificationTopics.js +40 -38
- package/dist/hooks/useNotificationTopics.js.map +1 -1
- package/dist/hooks/useNotifications.js +140 -129
- package/dist/hooks/useNotifications.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/CreateNotificationPage.js +5 -5
- package/dist/pages/NotificationCenterPage.js +5 -5
- package/dist/pages/NotificationPreferencesPage.js +43 -39
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +35 -31
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +5 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useNotificationAnalytics as e } from "../hooks/useNotificationAnalytics.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isPermissionError as t } from "../utils/index.js";
|
|
3
|
+
import { useTr as n } from "../shared/hooks/useTr.js";
|
|
4
4
|
import { NOTIFICATION_PERMISSIONS as r } from "../constants/permissions.js";
|
|
5
5
|
import { useNotificationTemplate as i, useNotificationTemplates as ee } from "../hooks/useNotificationTemplates.js";
|
|
6
6
|
import { TemplatePreview as te } from "../components/TemplatePreview.js";
|
|
@@ -128,7 +128,7 @@ function xe(e) {
|
|
|
128
128
|
})) : [] : [];
|
|
129
129
|
}
|
|
130
130
|
function v() {
|
|
131
|
-
let v = de(), y =
|
|
131
|
+
let v = de(), y = n(), { locale: b } = ge(), { templateId: x } = fe(), S = !!x, { hasPermission: Se, isLoading: Ce, refreshPermissions: we } = ie(), { showToast: Te } = re(), { createTemplate: Ee, updateTemplate: De, isCreating: Oe, isUpdating: ke } = ee(), { trackTemplateSaved: C } = e(), { template: w, isLoading: Ae, error: T } = i(S ? x : void 0), [E, D] = c(""), [O, k] = c(""), [je, Me] = c(!1), [A, j] = c(""), [M, N] = c("TRANSACTIONAL"), [P, Ne] = c(""), [F, I] = c("en"), [L, R] = c(""), [z, B] = c(""), [V, H] = c(""), [U, W] = c([]), [G, K] = c("text"), Pe = ne(null), Fe = ne(null), [Ie, q] = c(null), [Le, J] = c(null), [Y, X] = c(!0), [Re, ze] = c("email");
|
|
132
132
|
o(() => {
|
|
133
133
|
w && (D(w.name), k(w.slug), Me(!0), j(w.description || ""), N(w.type), I(w.locale || "en"), R(w.subject || ""), B(w.bodyTemplate || ""), H(w.htmlTemplate || ""), W(xe(w.variables)), w.htmlTemplate && K("html"));
|
|
134
134
|
}, [w]), o(() => {
|
|
@@ -186,7 +186,7 @@ function v() {
|
|
|
186
186
|
q(y("notifTemplates.variablesNeedName", "All variables must have a name"));
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
|
-
let
|
|
189
|
+
let n = U.map((e) => e.name.trim()), r = n.filter((e, t) => n.indexOf(e) !== t);
|
|
190
190
|
if (r.length > 0) {
|
|
191
191
|
q(`${y("notifTemplates.duplicateVariableName", "Duplicate variable name")}: ${r[0]}`);
|
|
192
192
|
return;
|
|
@@ -227,7 +227,7 @@ function v() {
|
|
|
227
227
|
hasHtml: !!V.trim()
|
|
228
228
|
}), J(y("notifTemplates.createSuccess", "Template created successfully")), setTimeout(() => v("..", { relative: "path" }), 1200);
|
|
229
229
|
} catch (e) {
|
|
230
|
-
if (
|
|
230
|
+
if (t(e)) {
|
|
231
231
|
Te(y("notifTemplates.permissionDeniedOnSave", "You don't have permission to save this template. Refreshing access…"), "warning"), we().catch((e) => console.warn("[permissions] refresh failed after template save denial:", e));
|
|
232
232
|
return;
|
|
233
233
|
}
|