@burdenoff/microfe-i18n 2026.510.107

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.
Files changed (69) hide show
  1. package/dist/i18n/I18nRoot.d.ts +34 -0
  2. package/dist/i18n/I18nRoot.d.ts.map +1 -0
  3. package/dist/i18n/I18nRoot.js +103 -0
  4. package/dist/i18n/I18nRoutes.d.ts +24 -0
  5. package/dist/i18n/I18nRoutes.d.ts.map +1 -0
  6. package/dist/i18n/I18nRoutes.js +82 -0
  7. package/dist/i18n/index.d.ts +40 -0
  8. package/dist/i18n/index.d.ts.map +1 -0
  9. package/dist/i18n/pages/ImportExportPage.d.ts +10 -0
  10. package/dist/i18n/pages/ImportExportPage.d.ts.map +1 -0
  11. package/dist/i18n/pages/ImportExportPage.js +368 -0
  12. package/dist/i18n/pages/LanguagesListPage.d.ts +8 -0
  13. package/dist/i18n/pages/LanguagesListPage.d.ts.map +1 -0
  14. package/dist/i18n/pages/LanguagesListPage.js +148 -0
  15. package/dist/i18n/pages/LocaleConfigPage.d.ts +8 -0
  16. package/dist/i18n/pages/LocaleConfigPage.d.ts.map +1 -0
  17. package/dist/i18n/pages/LocaleConfigPage.js +318 -0
  18. package/dist/i18n/pages/ProductsListPage.d.ts +8 -0
  19. package/dist/i18n/pages/ProductsListPage.d.ts.map +1 -0
  20. package/dist/i18n/pages/ProductsListPage.js +131 -0
  21. package/dist/i18n/pages/ProgressDashboardPage.d.ts +8 -0
  22. package/dist/i18n/pages/ProgressDashboardPage.d.ts.map +1 -0
  23. package/dist/i18n/pages/ProgressDashboardPage.js +294 -0
  24. package/dist/i18n/pages/ReviewQueuePage.d.ts +8 -0
  25. package/dist/i18n/pages/ReviewQueuePage.d.ts.map +1 -0
  26. package/dist/i18n/pages/ReviewQueuePage.js +209 -0
  27. package/dist/i18n/pages/TranslationEditorPage.d.ts +8 -0
  28. package/dist/i18n/pages/TranslationEditorPage.d.ts.map +1 -0
  29. package/dist/i18n/pages/TranslationEditorPage.js +243 -0
  30. package/dist/i18n/providers/I18nProvider.d.ts +21 -0
  31. package/dist/i18n/providers/I18nProvider.d.ts.map +1 -0
  32. package/dist/i18n/providers/I18nProvider.js +45 -0
  33. package/dist/i18n/store/i18nStore.d.ts +46 -0
  34. package/dist/i18n/store/i18nStore.d.ts.map +1 -0
  35. package/dist/i18n/store/i18nStore.js +103 -0
  36. package/dist/i18n/types/index.d.ts +323 -0
  37. package/dist/i18n/types/index.d.ts.map +1 -0
  38. package/dist/i18n/utils/i18n.d.ts +3 -0
  39. package/dist/i18n/utils/i18n.d.ts.map +1 -0
  40. package/dist/i18n/utils/i18n.js +9 -0
  41. package/dist/i18n.js +4 -0
  42. package/dist/index.d.ts +1 -0
  43. package/dist/node_modules/lucide-react/dist/esm/Icon.js +16 -0
  44. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +15 -0
  45. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +14 -0
  46. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +8 -0
  47. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +8 -0
  48. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +26 -0
  49. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check-big.js +11 -0
  50. package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js +20 -0
  51. package/dist/node_modules/lucide-react/dist/esm/icons/download.js +21 -0
  52. package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js +26 -0
  53. package/dist/node_modules/lucide-react/dist/esm/icons/globe.js +20 -0
  54. package/dist/node_modules/lucide-react/dist/esm/icons/languages.js +30 -0
  55. package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +8 -0
  56. package/dist/node_modules/lucide-react/dist/esm/icons/package.js +22 -0
  57. package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js +11 -0
  58. package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +11 -0
  59. package/dist/node_modules/lucide-react/dist/esm/icons/save.js +18 -0
  60. package/dist/node_modules/lucide-react/dist/esm/icons/search.js +13 -0
  61. package/dist/node_modules/lucide-react/dist/esm/icons/send.js +11 -0
  62. package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
  63. package/dist/node_modules/lucide-react/dist/esm/icons/trash-2.js +32 -0
  64. package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +11 -0
  65. package/dist/node_modules/lucide-react/dist/esm/icons/upload.js +21 -0
  66. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +4 -0
  67. package/dist/utils/nativeBridge.d.ts +3 -0
  68. package/dist/utils/nativeBridge.d.ts.map +1 -0
  69. package/package.json +93 -0
@@ -0,0 +1,34 @@
1
+ import { FC } from 'react';
2
+ import { I18nRootProps } from './types';
3
+
4
+ /**
5
+ * Root component for the I18n microfrontend.
6
+ *
7
+ * This is the main entry point that host applications import and render.
8
+ * It sets up the necessary providers and renders the internal routing.
9
+ * Automatically registers navigation items with the shell if registration functions are provided.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { I18nRoot, type I18nRootProps } from '@burdenoff/micro-fe/i18n';
14
+ *
15
+ * function App() {
16
+ * const props: I18nRootProps = {
17
+ * basePath: '/i18n',
18
+ * navigate: (path) => router.push(path),
19
+ * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },
20
+ * tenantId: 'tenant-123',
21
+ * apiGatewayUrl: 'https://api.example.com',
22
+ * authToken: 'token',
23
+ * defaultView: 'languages',
24
+ * onLanguageChange: (language) => console.log('Language changed:', language),
25
+ * onTranslationPublish: (translation) => console.log('Translation published:', translation),
26
+ * registerNavItems: (items) => { return () => {}; },
27
+ * };
28
+ *
29
+ * return <I18nRoot {...props} />;
30
+ * }
31
+ * ```
32
+ */
33
+ export declare const I18nRoot: FC<I18nRootProps>;
34
+ //# sourceMappingURL=I18nRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I18nRoot.d.ts","sourceRoot":"","sources":["../../src/i18n/I18nRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAqHtC,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { CircleCheckBig as e } from "../node_modules/lucide-react/dist/esm/icons/circle-check-big.js";
2
+ import { Download as t } from "../node_modules/lucide-react/dist/esm/icons/download.js";
3
+ import { Globe as n } from "../node_modules/lucide-react/dist/esm/icons/globe.js";
4
+ import { Package as r } from "../node_modules/lucide-react/dist/esm/icons/package.js";
5
+ import { PenLine as i } from "../node_modules/lucide-react/dist/esm/icons/pen-line.js";
6
+ import { Settings as a } from "../node_modules/lucide-react/dist/esm/icons/settings.js";
7
+ import { TrendingUp as o } from "../node_modules/lucide-react/dist/esm/icons/trending-up.js";
8
+ import { Upload as s } from "../node_modules/lucide-react/dist/esm/icons/upload.js";
9
+ import { I18nProvider as c } from "./providers/I18nProvider.js";
10
+ import { I18nRoutes as l } from "./I18nRoutes.js";
11
+ import { useEffect as u } from "react";
12
+ import { jsx as d } from "react/jsx-runtime";
13
+ import { FeatureFlagProvider as f } from "@burdenoff/fe-libs/shared/feature-flags";
14
+ //#region src/i18n/I18nRoot.tsx
15
+ var p = (p) => {
16
+ let { registerNavItems: m, registerFooterItems: h, basePath: g = "/" } = p, _ = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
17
+ return u(() => {
18
+ if (m) return m([
19
+ {
20
+ id: "i18n-languages",
21
+ label: "Languages",
22
+ path: _(g, "languages"),
23
+ icon: /* @__PURE__ */ d(n, { size: 20 }),
24
+ order: 10,
25
+ group: "i18n"
26
+ },
27
+ {
28
+ id: "i18n-products",
29
+ label: "Products",
30
+ path: _(g, "products"),
31
+ icon: /* @__PURE__ */ d(r, { size: 20 }),
32
+ order: 20,
33
+ group: "i18n"
34
+ },
35
+ {
36
+ id: "i18n-editor",
37
+ label: "Translation Editor",
38
+ path: _(g, "editor"),
39
+ icon: /* @__PURE__ */ d(i, { size: 20 }),
40
+ order: 30,
41
+ group: "i18n"
42
+ },
43
+ {
44
+ id: "i18n-progress",
45
+ label: "Progress",
46
+ path: _(g, "progress"),
47
+ icon: /* @__PURE__ */ d(o, { size: 20 }),
48
+ order: 40,
49
+ group: "i18n"
50
+ },
51
+ {
52
+ id: "i18n-review",
53
+ label: "Review Queue",
54
+ path: _(g, "review"),
55
+ icon: /* @__PURE__ */ d(e, { size: 20 }),
56
+ order: 50,
57
+ group: "i18n"
58
+ },
59
+ {
60
+ id: "i18n-import",
61
+ label: "Import",
62
+ path: _(g, "import"),
63
+ icon: /* @__PURE__ */ d(s, { size: 20 }),
64
+ order: 60,
65
+ group: "i18n"
66
+ },
67
+ {
68
+ id: "i18n-export",
69
+ label: "Export",
70
+ path: _(g, "export"),
71
+ icon: /* @__PURE__ */ d(t, { size: 20 }),
72
+ order: 70,
73
+ group: "i18n"
74
+ },
75
+ {
76
+ id: "i18n-locales",
77
+ label: "Locale Settings",
78
+ path: _(g, "locales"),
79
+ icon: /* @__PURE__ */ d(a, { size: 20 }),
80
+ order: 80,
81
+ group: "i18n"
82
+ }
83
+ ]);
84
+ }, [m, g]), u(() => {
85
+ if (h) return h([{
86
+ id: "i18n-status",
87
+ label: "I18n Ready",
88
+ type: "status",
89
+ order: 10,
90
+ section: "left"
91
+ }]);
92
+ }, [h]), /* @__PURE__ */ d(f, {
93
+ workspaceId: null,
94
+ gateway: "global",
95
+ defaultEnabled: !0,
96
+ children: /* @__PURE__ */ d(c, {
97
+ ...p,
98
+ children: /* @__PURE__ */ d(l, {})
99
+ })
100
+ });
101
+ };
102
+ //#endregion
103
+ export { p as I18nRoot };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Internal router for the I18n microfrontend.
3
+ * This component handles routing within the microfrontend using React Router v7.
4
+ *
5
+ * Routes:
6
+ * - / → Redirects to languages
7
+ * - /languages → Languages list and management
8
+ * - /languages/new → Create new language
9
+ * - /languages/:code → Language detail and configuration
10
+ * - /products → Products and hierarchy management
11
+ * - /products/new → Create new product
12
+ * - /products/:id → Product detail
13
+ * - /editor → Translation editor (list view)
14
+ * - /editor/:keyId → Edit specific translation key
15
+ * - /editor/:keyId/:languageCode → Edit translation for specific key and language
16
+ * - /progress → Translation progress dashboard
17
+ * - /review → Review queue for pending translations
18
+ * - /import → Import translations
19
+ * - /export → Export translations
20
+ * - /locales → Locale configuration list
21
+ * - /locales/:code → Locale configuration for specific language
22
+ */
23
+ export declare function I18nRoutes(): import("react/jsx-runtime").JSX.Element;
24
+ //# sourceMappingURL=I18nRoutes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I18nRoutes.d.ts","sourceRoot":"","sources":["../../src/i18n/I18nRoutes.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,4CA6CzB"}
@@ -0,0 +1,82 @@
1
+ import { LanguagesListPage as e } from "./pages/LanguagesListPage.js";
2
+ import { ProductsListPage as t } from "./pages/ProductsListPage.js";
3
+ import { TranslationEditorPage as n } from "./pages/TranslationEditorPage.js";
4
+ import { ProgressDashboardPage as r } from "./pages/ProgressDashboardPage.js";
5
+ import { ReviewQueuePage as i } from "./pages/ReviewQueuePage.js";
6
+ import { ImportExportPage as a } from "./pages/ImportExportPage.js";
7
+ import { LocaleConfigPage as o } from "./pages/LocaleConfigPage.js";
8
+ import { Navigate as s, Route as c, Routes as l } from "react-router-dom";
9
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ //#region src/i18n/I18nRoutes.tsx
11
+ function f() {
12
+ return /* @__PURE__ */ d(l, { children: [
13
+ /* @__PURE__ */ u(c, {
14
+ index: !0,
15
+ element: /* @__PURE__ */ u(s, {
16
+ to: "languages",
17
+ replace: !0
18
+ })
19
+ }),
20
+ /* @__PURE__ */ u(c, {
21
+ path: "languages",
22
+ element: /* @__PURE__ */ u(e, {})
23
+ }),
24
+ /* @__PURE__ */ u(c, {
25
+ path: "languages/new",
26
+ element: /* @__PURE__ */ u(o, {})
27
+ }),
28
+ /* @__PURE__ */ u(c, {
29
+ path: "languages/:code",
30
+ element: /* @__PURE__ */ u(o, {})
31
+ }),
32
+ /* @__PURE__ */ u(c, {
33
+ path: "products",
34
+ element: /* @__PURE__ */ u(t, {})
35
+ }),
36
+ /* @__PURE__ */ u(c, {
37
+ path: "editor",
38
+ element: /* @__PURE__ */ u(n, {})
39
+ }),
40
+ /* @__PURE__ */ u(c, {
41
+ path: "editor/:keyId",
42
+ element: /* @__PURE__ */ u(n, {})
43
+ }),
44
+ /* @__PURE__ */ u(c, {
45
+ path: "editor/:keyId/:languageCode",
46
+ element: /* @__PURE__ */ u(n, {})
47
+ }),
48
+ /* @__PURE__ */ u(c, {
49
+ path: "progress",
50
+ element: /* @__PURE__ */ u(r, {})
51
+ }),
52
+ /* @__PURE__ */ u(c, {
53
+ path: "review",
54
+ element: /* @__PURE__ */ u(i, {})
55
+ }),
56
+ /* @__PURE__ */ u(c, {
57
+ path: "import",
58
+ element: /* @__PURE__ */ u(a, { mode: "import" })
59
+ }),
60
+ /* @__PURE__ */ u(c, {
61
+ path: "export",
62
+ element: /* @__PURE__ */ u(a, { mode: "export" })
63
+ }),
64
+ /* @__PURE__ */ u(c, {
65
+ path: "locales",
66
+ element: /* @__PURE__ */ u(e, {})
67
+ }),
68
+ /* @__PURE__ */ u(c, {
69
+ path: "locales/:code",
70
+ element: /* @__PURE__ */ u(o, {})
71
+ }),
72
+ /* @__PURE__ */ u(c, {
73
+ path: "*",
74
+ element: /* @__PURE__ */ u(s, {
75
+ to: "languages",
76
+ replace: !0
77
+ })
78
+ })
79
+ ] });
80
+ }
81
+ //#endregion
82
+ export { f as I18nRoutes };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * I18n (Internationalization) Microfrontend
3
+ *
4
+ * Provides a comprehensive UI for managing translations, languages, locales,
5
+ * and localization workflows across all Burdenoff products.
6
+ *
7
+ * This is a TENANT module microfrontend that enables:
8
+ * - Language management (create, configure, enable/disable)
9
+ * - Translation hierarchy (Product → Module → Namespace → Key)
10
+ * - Translation editor with plural forms, suggestions, and comparison
11
+ * - Translation workflow (Draft → Review → Approve → Publish)
12
+ * - Progress tracking and coverage analytics
13
+ * - Import/Export (JSON, CSV, XLSX, PO, XLIFF)
14
+ * - Locale configuration (date/time/number formats, plural rules)
15
+ * - Version history and rollback
16
+ * - Translation memory and suggestions
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { I18nRoot, type I18nRootProps } from '@burdenoff/micro-fe/i18n';
21
+ *
22
+ * function App() {
23
+ * const props: I18nRootProps = {
24
+ * basePath: '/i18n',
25
+ * navigate: (path) => router.push(path),
26
+ * currentUser: { id: '1', email: 'user@example.com' },
27
+ * tenantId: 'tenant-123',
28
+ * apiGatewayUrl: 'https://api.example.com',
29
+ * authToken: 'token',
30
+ * };
31
+ *
32
+ * return <I18nRoot {...props} />;
33
+ * }
34
+ * ```
35
+ */
36
+ export { I18nRoot } from './I18nRoot';
37
+ export type { I18nRootProps, I18nView, I18nTab, Language, I18nProduct, I18nModule, I18nNamespace, TranslationKey, Translation, TranslationStatus, TranslationCoverage, ImportJob, ImportFormat, ImportJobStatus, ExportRequest, ExportResult, NavItem, FooterItem, } from './types';
38
+ export { useI18n } from './providers/I18nProvider';
39
+ export { useI18nStore } from './store/i18nStore';
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,aAAa,EACb,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,OAAO,EACP,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+
3
+ /**
4
+ * Import/Export page
5
+ * Handles translation import and export operations
6
+ */
7
+ export declare const ImportExportPage: FC<{
8
+ mode: "import" | "export";
9
+ }>;
10
+ //# sourceMappingURL=ImportExportPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportExportPage.d.ts","sourceRoot":"","sources":["../../../src/i18n/pages/ImportExportPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAAE,CAyZ9D,CAAC"}