@burdenoff/fe-libs 2026.526.1 → 2026.527.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.
@@ -146,4 +146,4 @@ function y(e) {
146
146
  return d.attempted.has(e);
147
147
  }
148
148
  //#endregion
149
- export { g as I18nProvider, v as clearTranslationCache, y as isTranslationAttempted, _ as useI18n };
149
+ export { g as I18nProvider, v as clearTranslationCache, y as isTranslationAttempted, h as mergeTranslationDictionaries, _ as useI18n };
@@ -1,21 +1,22 @@
1
1
  import { graphqlFetch as e } from "../../graphql/fetch.js";
2
2
  import "../../../shared-graphql.js";
3
3
  import { useAuth as t } from "./AuthProvider.js";
4
- import { I18nProvider as n } from "./I18nProvider.js";
5
- import { useCallback as r, useMemo as i } from "react";
6
- import { jsx as a } from "react/jsx-runtime";
7
- import { useLocation as o } from "react-router-dom";
4
+ import { I18nProvider as n, mergeTranslationDictionaries as r } from "./I18nProvider.js";
5
+ import { useCallback as i, useMemo as a } from "react";
6
+ import { jsx as o } from "react/jsx-runtime";
7
+ import { useLocation as s } from "react-router-dom";
8
8
  //#region src/shared/providers/shell/ProfileI18nBridge.tsx
9
- var s = "\n query ExportTranslations($productId: String!, $languageCode: String!, $format: ImportJobFormat!) {\n exportTranslations(productId: $productId, languageCode: $languageCode, format: $format) {\n format\n url\n }\n }\n";
10
- function c({ children: c, i18nProductId: l, defaultLocale: u = "en", fallbackTranslations: d, disableDynamicFetch: f = !1 }) {
11
- let p = o(), { user: m } = t(), h = m?.id ?? null, g = !f && !p.pathname.startsWith("/auth/") && !p.pathname.startsWith("/devportal") && !p.pathname.startsWith("/organizations"), _ = r(async (t) => {
12
- if (!g) return d?.[t] ?? {};
9
+ var c = "\n query ExportTranslations($productId: String!, $languageCode: String!, $format: ImportJobFormat!) {\n exportTranslations(productId: $productId, languageCode: $languageCode, format: $format) {\n format\n url\n }\n }\n";
10
+ function l({ children: l, i18nProductId: u, defaultLocale: d = "en", fallbackTranslations: f, disableDynamicFetch: p = !1 }) {
11
+ let m = s(), { user: h } = t(), g = h?.id ?? null, _ = !p && !m.pathname.startsWith("/auth/") && !m.pathname.startsWith("/devportal") && !m.pathname.startsWith("/organizations"), v = i(async (t) => {
12
+ let n = f?.[t] ?? {};
13
+ if (!_) return n;
13
14
  try {
14
- let n = await e({
15
+ let i = await e({
15
16
  gateway: "global",
16
- query: s,
17
+ query: c,
17
18
  variables: {
18
- productId: l,
19
+ productId: u,
19
20
  languageCode: t,
20
21
  format: "JSON"
21
22
  },
@@ -24,20 +25,20 @@ function c({ children: c, i18nProductId: l, defaultLocale: u = "en", fallbackTra
24
25
  "x-actor-type": "service"
25
26
  }
26
27
  });
27
- if (n.errors?.length || !n.data?.exportTranslations?.url) return {};
28
- let r = n.data.exportTranslations.url, i = decodeURIComponent(r.replace("data:application/json;charset=utf-8,", ""));
29
- return JSON.parse(i);
28
+ if (i.errors?.length || !i.data?.exportTranslations?.url) return {};
29
+ let a = i.data.exportTranslations.url, o = decodeURIComponent(a.replace("data:application/json;charset=utf-8,", ""));
30
+ return r(n, JSON.parse(o));
30
31
  } catch {
31
32
  return {};
32
33
  }
33
34
  }, [
34
- d,
35
- l,
36
- g
35
+ f,
36
+ u,
37
+ _
37
38
  ]);
38
- return /* @__PURE__ */ a(n, {
39
- defaultLocale: u,
40
- translations: i(() => d ?? {
39
+ return /* @__PURE__ */ o(n, {
40
+ defaultLocale: d,
41
+ translations: a(() => f ?? {
41
42
  en: {},
42
43
  es: {},
43
44
  fr: {},
@@ -46,12 +47,12 @@ function c({ children: c, i18nProductId: l, defaultLocale: u = "en", fallbackTra
46
47
  zh: {},
47
48
  ta: {},
48
49
  hi: {}
49
- }, [d]),
50
- fetchTranslations: g ? _ : void 0,
51
- profileId: h,
50
+ }, [f]),
51
+ fetchTranslations: _ ? v : void 0,
52
+ profileId: g,
52
53
  showChildrenWhileLoading: !0,
53
- children: c
54
+ children: l
54
55
  });
55
56
  }
56
57
  //#endregion
57
- export { c as ProfileI18nBridge };
58
+ export { l as ProfileI18nBridge };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.526.1",
3
+ "version": "2026.527.1",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {