@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.
- package/dist/i18n/I18nRoot.d.ts +34 -0
- package/dist/i18n/I18nRoot.d.ts.map +1 -0
- package/dist/i18n/I18nRoot.js +103 -0
- package/dist/i18n/I18nRoutes.d.ts +24 -0
- package/dist/i18n/I18nRoutes.d.ts.map +1 -0
- package/dist/i18n/I18nRoutes.js +82 -0
- package/dist/i18n/index.d.ts +40 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/pages/ImportExportPage.d.ts +10 -0
- package/dist/i18n/pages/ImportExportPage.d.ts.map +1 -0
- package/dist/i18n/pages/ImportExportPage.js +368 -0
- package/dist/i18n/pages/LanguagesListPage.d.ts +8 -0
- package/dist/i18n/pages/LanguagesListPage.d.ts.map +1 -0
- package/dist/i18n/pages/LanguagesListPage.js +148 -0
- package/dist/i18n/pages/LocaleConfigPage.d.ts +8 -0
- package/dist/i18n/pages/LocaleConfigPage.d.ts.map +1 -0
- package/dist/i18n/pages/LocaleConfigPage.js +318 -0
- package/dist/i18n/pages/ProductsListPage.d.ts +8 -0
- package/dist/i18n/pages/ProductsListPage.d.ts.map +1 -0
- package/dist/i18n/pages/ProductsListPage.js +131 -0
- package/dist/i18n/pages/ProgressDashboardPage.d.ts +8 -0
- package/dist/i18n/pages/ProgressDashboardPage.d.ts.map +1 -0
- package/dist/i18n/pages/ProgressDashboardPage.js +294 -0
- package/dist/i18n/pages/ReviewQueuePage.d.ts +8 -0
- package/dist/i18n/pages/ReviewQueuePage.d.ts.map +1 -0
- package/dist/i18n/pages/ReviewQueuePage.js +209 -0
- package/dist/i18n/pages/TranslationEditorPage.d.ts +8 -0
- package/dist/i18n/pages/TranslationEditorPage.d.ts.map +1 -0
- package/dist/i18n/pages/TranslationEditorPage.js +243 -0
- package/dist/i18n/providers/I18nProvider.d.ts +21 -0
- package/dist/i18n/providers/I18nProvider.d.ts.map +1 -0
- package/dist/i18n/providers/I18nProvider.js +45 -0
- package/dist/i18n/store/i18nStore.d.ts +46 -0
- package/dist/i18n/store/i18nStore.d.ts.map +1 -0
- package/dist/i18n/store/i18nStore.js +103 -0
- package/dist/i18n/types/index.d.ts +323 -0
- package/dist/i18n/types/index.d.ts.map +1 -0
- package/dist/i18n/utils/i18n.d.ts +3 -0
- package/dist/i18n/utils/i18n.d.ts.map +1 -0
- package/dist/i18n/utils/i18n.js +9 -0
- package/dist/i18n.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +26 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check-big.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js +26 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/globe.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/languages.js +30 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/package.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/save.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/send.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trash-2.js +32 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +4 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { CircleAlert as e } from "../../node_modules/lucide-react/dist/esm/icons/circle-alert.js";
|
|
2
|
+
import { Download as t } from "../../node_modules/lucide-react/dist/esm/icons/download.js";
|
|
3
|
+
import { FileText as n } from "../../node_modules/lucide-react/dist/esm/icons/file-text.js";
|
|
4
|
+
import { Upload as r } from "../../node_modules/lucide-react/dist/esm/icons/upload.js";
|
|
5
|
+
import { useI18n as i } from "../providers/I18nProvider.js";
|
|
6
|
+
import { useI18nStore as a } from "../store/i18nStore.js";
|
|
7
|
+
import { useState as o } from "react";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/i18n/pages/ImportExportPage.tsx
|
|
10
|
+
var u = ({ mode: u }) => {
|
|
11
|
+
let { t: d } = i(), f = (e, t, n) => d(e, t, n), { importState: p, startImport: m, resetImport: h } = a(), [g, _] = o("json"), [v, y] = o(null);
|
|
12
|
+
return /* @__PURE__ */ l("div", {
|
|
13
|
+
className: "flex h-full flex-col",
|
|
14
|
+
children: [/* @__PURE__ */ c("div", {
|
|
15
|
+
className: "border-b border-border bg-surface-elevated p-6",
|
|
16
|
+
children: /* @__PURE__ */ c("div", {
|
|
17
|
+
className: "flex items-center gap-3",
|
|
18
|
+
children: u === "import" ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ c("h1", {
|
|
19
|
+
className: "text-2xl font-semibold text-content-primary",
|
|
20
|
+
children: f("i18n.import.title", "Import Translations")
|
|
21
|
+
})] }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ c("h1", {
|
|
22
|
+
className: "text-2xl font-semibold text-content-primary",
|
|
23
|
+
children: f("i18n.export.title", "Export Translations")
|
|
24
|
+
})] })
|
|
25
|
+
})
|
|
26
|
+
}), /* @__PURE__ */ c("div", {
|
|
27
|
+
className: "flex-1 overflow-auto p-6",
|
|
28
|
+
children: /* @__PURE__ */ c("div", {
|
|
29
|
+
className: "mx-auto max-w-2xl",
|
|
30
|
+
children: u === "import" ? /* @__PURE__ */ c(s, { children: /* @__PURE__ */ l("div", {
|
|
31
|
+
className: "space-y-6",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
34
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
35
|
+
children: f("i18n.import.fields.format", "Select Format")
|
|
36
|
+
}), /* @__PURE__ */ l("select", {
|
|
37
|
+
value: g,
|
|
38
|
+
onChange: (e) => _(e.target.value),
|
|
39
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ c("option", {
|
|
42
|
+
value: "json",
|
|
43
|
+
children: f("i18n.shared.format.json", "JSON (i18next nested)")
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ c("option", {
|
|
46
|
+
value: "csv",
|
|
47
|
+
children: f("i18n.shared.format.csv", "CSV")
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ c("option", {
|
|
50
|
+
value: "xlsx",
|
|
51
|
+
children: f("i18n.shared.format.xlsx", "Excel (XLSX)")
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ c("option", {
|
|
54
|
+
value: "po",
|
|
55
|
+
children: f("i18n.shared.format.po", "Gettext (PO)")
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ c("option", {
|
|
58
|
+
value: "xliff",
|
|
59
|
+
children: f("i18n.shared.format.xliff", "XLIFF")
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
})] }),
|
|
63
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
64
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
65
|
+
children: f("i18n.import.fields.uploadFile", "Upload File")
|
|
66
|
+
}), /* @__PURE__ */ l("div", {
|
|
67
|
+
className: "relative rounded-lg border-2 border-dashed border-border bg-surface p-8 text-center transition-colors hover:border-accent-primary",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ c("input", {
|
|
70
|
+
type: "file",
|
|
71
|
+
onChange: (e) => {
|
|
72
|
+
let t = e.target.files?.[0];
|
|
73
|
+
t && y(t);
|
|
74
|
+
},
|
|
75
|
+
accept: ".json,.csv,.xlsx,.po,.xliff",
|
|
76
|
+
className: "absolute inset-0 cursor-pointer opacity-0"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ c(r, { className: "mx-auto mb-4 size-12 text-content-tertiary" }),
|
|
79
|
+
/* @__PURE__ */ c("p", {
|
|
80
|
+
className: "mb-1 text-sm font-medium text-content-primary",
|
|
81
|
+
children: v ? v.name : f("i18n.import.fields.dropzonePlaceholder", "Drop file here or click to browse")
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ c("p", {
|
|
84
|
+
className: "text-xs text-content-tertiary",
|
|
85
|
+
children: f("i18n.import.fields.supportedFormats", "Supported formats: JSON, CSV, XLSX, PO, XLIFF")
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
})] }),
|
|
89
|
+
/* @__PURE__ */ l("div", {
|
|
90
|
+
className: "grid grid-cols-2 gap-4",
|
|
91
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
92
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
93
|
+
children: f("i18n.import.fields.product", "Product")
|
|
94
|
+
}), /* @__PURE__ */ l("select", {
|
|
95
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ c("option", {
|
|
98
|
+
value: "workspaces",
|
|
99
|
+
children: "Workspaces"
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ c("option", {
|
|
102
|
+
value: "tenant",
|
|
103
|
+
children: "Tenant"
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ c("option", {
|
|
106
|
+
value: "botlit",
|
|
107
|
+
children: "Botlit"
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
111
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
112
|
+
children: f("i18n.import.fields.module", "Module")
|
|
113
|
+
}), /* @__PURE__ */ l("select", {
|
|
114
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ c("option", {
|
|
117
|
+
value: "auth",
|
|
118
|
+
children: "Auth"
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ c("option", {
|
|
121
|
+
value: "billing",
|
|
122
|
+
children: "Billing"
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ c("option", {
|
|
125
|
+
value: "calendar",
|
|
126
|
+
children: "Calendar"
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
})] })]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
132
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
133
|
+
children: f("i18n.import.fields.targetLanguage", "Target Language")
|
|
134
|
+
}), /* @__PURE__ */ l("select", {
|
|
135
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ c("option", {
|
|
138
|
+
value: "es-ES",
|
|
139
|
+
children: f("i18n.shared.language.esEs", "Spanish (es-ES)")
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ c("option", {
|
|
142
|
+
value: "fr-FR",
|
|
143
|
+
children: f("i18n.shared.language.frFr", "French (fr-FR)")
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ c("option", {
|
|
146
|
+
value: "de-DE",
|
|
147
|
+
children: f("i18n.shared.language.deDe", "German (de-DE)")
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
})] }),
|
|
151
|
+
/* @__PURE__ */ l("div", {
|
|
152
|
+
className: "space-y-2",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ l("div", {
|
|
155
|
+
className: "flex items-center gap-2",
|
|
156
|
+
children: [/* @__PURE__ */ c("input", {
|
|
157
|
+
type: "checkbox",
|
|
158
|
+
id: "create-namespaces",
|
|
159
|
+
defaultChecked: !0,
|
|
160
|
+
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
161
|
+
}), /* @__PURE__ */ c("label", {
|
|
162
|
+
htmlFor: "create-namespaces",
|
|
163
|
+
className: "text-sm text-content-primary",
|
|
164
|
+
children: f("i18n.import.options.createNamespaces", "Create missing namespaces automatically")
|
|
165
|
+
})]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ l("div", {
|
|
168
|
+
className: "flex items-center gap-2",
|
|
169
|
+
children: [/* @__PURE__ */ c("input", {
|
|
170
|
+
type: "checkbox",
|
|
171
|
+
id: "update-existing",
|
|
172
|
+
defaultChecked: !0,
|
|
173
|
+
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
174
|
+
}), /* @__PURE__ */ c("label", {
|
|
175
|
+
htmlFor: "update-existing",
|
|
176
|
+
className: "text-sm text-content-primary",
|
|
177
|
+
children: f("i18n.import.options.updateExisting", "Update existing translations")
|
|
178
|
+
})]
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ l("div", {
|
|
181
|
+
className: "flex items-center gap-2",
|
|
182
|
+
children: [/* @__PURE__ */ c("input", {
|
|
183
|
+
type: "checkbox",
|
|
184
|
+
id: "skip-errors",
|
|
185
|
+
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
186
|
+
}), /* @__PURE__ */ c("label", {
|
|
187
|
+
htmlFor: "skip-errors",
|
|
188
|
+
className: "text-sm text-content-primary",
|
|
189
|
+
children: f("i18n.import.options.skipErrors", "Skip validation errors (import valid only)")
|
|
190
|
+
})]
|
|
191
|
+
})
|
|
192
|
+
]
|
|
193
|
+
}),
|
|
194
|
+
p.jobId && /* @__PURE__ */ l("div", {
|
|
195
|
+
className: "rounded-lg border border-border bg-surface-elevated p-4",
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ l("div", {
|
|
198
|
+
className: "mb-2 flex items-center justify-between text-sm",
|
|
199
|
+
children: [/* @__PURE__ */ c("span", {
|
|
200
|
+
className: "text-content-primary",
|
|
201
|
+
children: f("i18n.import.progress.title", "Import Progress")
|
|
202
|
+
}), /* @__PURE__ */ l("span", {
|
|
203
|
+
className: "text-content-tertiary",
|
|
204
|
+
children: [p.progress, "%"]
|
|
205
|
+
})]
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ c("div", {
|
|
208
|
+
className: "h-2 overflow-hidden rounded-full bg-surface",
|
|
209
|
+
children: /* @__PURE__ */ c("div", {
|
|
210
|
+
className: "h-full bg-accent-primary transition-all",
|
|
211
|
+
style: { width: `${p.progress}%` }
|
|
212
|
+
})
|
|
213
|
+
}),
|
|
214
|
+
p.errors.length > 0 && /* @__PURE__ */ c("div", {
|
|
215
|
+
className: "mt-3 space-y-1",
|
|
216
|
+
children: p.errors.map((t, n) => /* @__PURE__ */ l("div", {
|
|
217
|
+
className: "flex items-start gap-2 text-xs text-error",
|
|
218
|
+
children: [/* @__PURE__ */ c(e, { className: "mt-0.5 size-3 flex-shrink-0" }), /* @__PURE__ */ c("span", { children: t.message })]
|
|
219
|
+
}, n))
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ l("div", {
|
|
224
|
+
className: "flex items-center gap-3",
|
|
225
|
+
children: [/* @__PURE__ */ l("button", {
|
|
226
|
+
onClick: () => {
|
|
227
|
+
v && (m(g, "job-123"), console.log("Starting import:", v.name, g));
|
|
228
|
+
},
|
|
229
|
+
disabled: !v,
|
|
230
|
+
className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover disabled:opacity-50",
|
|
231
|
+
children: [/* @__PURE__ */ c(r, { className: "size-4" }), f("i18n.import.actions.start", "Start Import")]
|
|
232
|
+
}), p.jobId && /* @__PURE__ */ c("button", {
|
|
233
|
+
onClick: h,
|
|
234
|
+
className: "rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
|
|
235
|
+
children: f("i18n.import.actions.reset", "Reset")
|
|
236
|
+
})]
|
|
237
|
+
})
|
|
238
|
+
]
|
|
239
|
+
}) }) : /* @__PURE__ */ c(s, { children: /* @__PURE__ */ l("div", {
|
|
240
|
+
className: "space-y-6",
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
243
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
244
|
+
children: f("i18n.export.fields.format", "Export Format")
|
|
245
|
+
}), /* @__PURE__ */ l("select", {
|
|
246
|
+
value: g,
|
|
247
|
+
onChange: (e) => _(e.target.value),
|
|
248
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
249
|
+
children: [
|
|
250
|
+
/* @__PURE__ */ c("option", {
|
|
251
|
+
value: "json",
|
|
252
|
+
children: f("i18n.shared.format.json", "JSON (i18next nested)")
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ c("option", {
|
|
255
|
+
value: "csv",
|
|
256
|
+
children: f("i18n.shared.format.csv", "CSV")
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ c("option", {
|
|
259
|
+
value: "xlsx",
|
|
260
|
+
children: f("i18n.shared.format.xlsx", "Excel (XLSX)")
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ c("option", {
|
|
263
|
+
value: "po",
|
|
264
|
+
children: f("i18n.shared.format.po", "Gettext (PO)")
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ c("option", {
|
|
267
|
+
value: "xliff",
|
|
268
|
+
children: f("i18n.shared.format.xliff", "XLIFF")
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
})] }),
|
|
272
|
+
/* @__PURE__ */ l("div", {
|
|
273
|
+
className: "grid grid-cols-2 gap-4",
|
|
274
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
275
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
276
|
+
children: f("i18n.export.fields.product", "Product")
|
|
277
|
+
}), /* @__PURE__ */ l("select", {
|
|
278
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ c("option", {
|
|
281
|
+
value: "",
|
|
282
|
+
children: f("i18n.export.fields.product.all", "All Products")
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ c("option", {
|
|
285
|
+
value: "workspaces",
|
|
286
|
+
children: "Workspaces"
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ c("option", {
|
|
289
|
+
value: "tenant",
|
|
290
|
+
children: "Tenant"
|
|
291
|
+
})
|
|
292
|
+
]
|
|
293
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
294
|
+
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
295
|
+
children: f("i18n.export.fields.language", "Language")
|
|
296
|
+
}), /* @__PURE__ */ l("select", {
|
|
297
|
+
className: "w-full rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ c("option", {
|
|
300
|
+
value: "",
|
|
301
|
+
children: f("i18n.export.fields.language.all", "All Languages")
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ c("option", {
|
|
304
|
+
value: "es-ES",
|
|
305
|
+
children: f("i18n.export.fields.language.spanish", "Spanish")
|
|
306
|
+
}),
|
|
307
|
+
/* @__PURE__ */ c("option", {
|
|
308
|
+
value: "fr-FR",
|
|
309
|
+
children: f("i18n.export.fields.language.french", "French")
|
|
310
|
+
})
|
|
311
|
+
]
|
|
312
|
+
})] })]
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ l("div", {
|
|
315
|
+
className: "space-y-2",
|
|
316
|
+
children: [/* @__PURE__ */ l("div", {
|
|
317
|
+
className: "flex items-center gap-2",
|
|
318
|
+
children: [/* @__PURE__ */ c("input", {
|
|
319
|
+
type: "checkbox",
|
|
320
|
+
id: "include-metadata",
|
|
321
|
+
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
322
|
+
}), /* @__PURE__ */ c("label", {
|
|
323
|
+
htmlFor: "include-metadata",
|
|
324
|
+
className: "text-sm text-content-primary",
|
|
325
|
+
children: f("i18n.export.options.includeMetadata", "Include metadata")
|
|
326
|
+
})]
|
|
327
|
+
}), /* @__PURE__ */ l("div", {
|
|
328
|
+
className: "flex items-center gap-2",
|
|
329
|
+
children: [/* @__PURE__ */ c("input", {
|
|
330
|
+
type: "checkbox",
|
|
331
|
+
id: "published-only",
|
|
332
|
+
defaultChecked: !0,
|
|
333
|
+
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
334
|
+
}), /* @__PURE__ */ c("label", {
|
|
335
|
+
htmlFor: "published-only",
|
|
336
|
+
className: "text-sm text-content-primary",
|
|
337
|
+
children: f("i18n.export.options.publishedOnly", "Published translations only")
|
|
338
|
+
})]
|
|
339
|
+
})]
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ l("div", {
|
|
342
|
+
className: "flex items-start gap-3 rounded-lg bg-accent-primary/10 p-4",
|
|
343
|
+
children: [/* @__PURE__ */ c(n, { className: "size-5 flex-shrink-0 text-accent-primary" }), /* @__PURE__ */ l("div", {
|
|
344
|
+
className: "text-sm",
|
|
345
|
+
children: [/* @__PURE__ */ c("p", {
|
|
346
|
+
className: "font-medium text-accent-primary",
|
|
347
|
+
children: f("i18n.export.preview.title", "Export Preview")
|
|
348
|
+
}), /* @__PURE__ */ c("p", {
|
|
349
|
+
className: "mt-1 text-content-secondary",
|
|
350
|
+
children: f("i18n.export.preview.description", "Approximately 1,245 translation keys will be exported based on your selection.")
|
|
351
|
+
})]
|
|
352
|
+
})]
|
|
353
|
+
}),
|
|
354
|
+
/* @__PURE__ */ l("button", {
|
|
355
|
+
onClick: () => {
|
|
356
|
+
console.log("Starting export:", g);
|
|
357
|
+
},
|
|
358
|
+
className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
|
|
359
|
+
children: [/* @__PURE__ */ c(t, { className: "size-4" }), f("i18n.export.actions.start", "Export Translations")]
|
|
360
|
+
})
|
|
361
|
+
]
|
|
362
|
+
}) })
|
|
363
|
+
})
|
|
364
|
+
})]
|
|
365
|
+
});
|
|
366
|
+
};
|
|
367
|
+
//#endregion
|
|
368
|
+
export { u as ImportExportPage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LanguagesListPage.d.ts","sourceRoot":"","sources":["../../../src/i18n/pages/LanguagesListPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAqK/B,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { Globe as e } from "../../node_modules/lucide-react/dist/esm/icons/globe.js";
|
|
2
|
+
import { Plus as t } from "../../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
3
|
+
import { Search as n } from "../../node_modules/lucide-react/dist/esm/icons/search.js";
|
|
4
|
+
import { useI18n as r } from "../providers/I18nProvider.js";
|
|
5
|
+
import { useI18nStore as i } from "../store/i18nStore.js";
|
|
6
|
+
import { useState as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
//#region src/i18n/pages/LanguagesListPage.tsx
|
|
9
|
+
var c = () => {
|
|
10
|
+
let { t: c } = r(), l = (e, t, n) => c(e, t, n), { languageFilter: u, updateLanguageFilter: d, setSelectedLanguage: f } = i(), [p, m] = a(u.search), h = [{
|
|
11
|
+
id: "1",
|
|
12
|
+
code: "en",
|
|
13
|
+
name: "English",
|
|
14
|
+
nativeName: "English",
|
|
15
|
+
direction: "ltr",
|
|
16
|
+
status: "active",
|
|
17
|
+
isDefault: !0
|
|
18
|
+
}, {
|
|
19
|
+
id: "2",
|
|
20
|
+
code: "es",
|
|
21
|
+
name: "Spanish",
|
|
22
|
+
nativeName: "Español",
|
|
23
|
+
direction: "ltr",
|
|
24
|
+
status: "active",
|
|
25
|
+
isDefault: !1
|
|
26
|
+
}], g = (e) => {
|
|
27
|
+
m(e), d({ search: e });
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ s("div", {
|
|
30
|
+
className: "flex h-full flex-col",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ o("div", {
|
|
33
|
+
className: "border-b border-border bg-surface-elevated p-6",
|
|
34
|
+
children: /* @__PURE__ */ s("div", {
|
|
35
|
+
className: "flex items-center justify-between",
|
|
36
|
+
children: [/* @__PURE__ */ s("div", {
|
|
37
|
+
className: "flex items-center gap-3",
|
|
38
|
+
children: [/* @__PURE__ */ o(e, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ o("h1", {
|
|
39
|
+
className: "text-2xl font-semibold text-content-primary",
|
|
40
|
+
children: l("i18n.languages.title", "Languages")
|
|
41
|
+
})]
|
|
42
|
+
}), /* @__PURE__ */ s("button", {
|
|
43
|
+
className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
|
|
44
|
+
children: [/* @__PURE__ */ o(t, { className: "size-4" }), l("i18n.languages.actions.add", "Add Language")]
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ o("div", {
|
|
49
|
+
className: "border-b border-border bg-surface p-4",
|
|
50
|
+
children: /* @__PURE__ */ s("div", {
|
|
51
|
+
className: "flex items-center gap-4",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ s("div", {
|
|
54
|
+
className: "relative flex-1",
|
|
55
|
+
children: [/* @__PURE__ */ o(n, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-content-secondary" }), /* @__PURE__ */ o("input", {
|
|
56
|
+
type: "text",
|
|
57
|
+
placeholder: l("i18n.languages.filters.searchPlaceholder", "Search languages..."),
|
|
58
|
+
value: p,
|
|
59
|
+
onChange: (e) => g(e.target.value),
|
|
60
|
+
className: "w-full rounded-md border border-border bg-surface-elevated py-2 pl-10 pr-4 text-sm text-content-primary placeholder:text-content-tertiary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
|
|
61
|
+
})]
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ s("select", {
|
|
64
|
+
value: u.status,
|
|
65
|
+
onChange: (e) => d({ status: e.target.value }),
|
|
66
|
+
className: "rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ o("option", {
|
|
69
|
+
value: "all",
|
|
70
|
+
children: l("i18n.languages.filters.status.all", "All Status")
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ o("option", {
|
|
73
|
+
value: "active",
|
|
74
|
+
children: l("i18n.shared.status.active", "Active")
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ o("option", {
|
|
77
|
+
value: "inactive",
|
|
78
|
+
children: l("i18n.shared.status.inactive", "Inactive")
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ s("select", {
|
|
83
|
+
value: u.direction,
|
|
84
|
+
onChange: (e) => d({ direction: e.target.value }),
|
|
85
|
+
className: "rounded-md border border-border bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ o("option", {
|
|
88
|
+
value: "all",
|
|
89
|
+
children: l("i18n.languages.filters.direction.all", "All Directions")
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ o("option", {
|
|
92
|
+
value: "ltr",
|
|
93
|
+
children: l("i18n.shared.direction.ltr", "LTR")
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ o("option", {
|
|
96
|
+
value: "rtl",
|
|
97
|
+
children: l("i18n.shared.direction.rtl", "RTL")
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ o("div", {
|
|
105
|
+
className: "flex-1 overflow-auto p-6",
|
|
106
|
+
children: /* @__PURE__ */ o("div", {
|
|
107
|
+
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
108
|
+
children: h.map((e) => /* @__PURE__ */ o("div", {
|
|
109
|
+
onClick: () => f(e),
|
|
110
|
+
className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-4 transition-all hover:border-accent-primary hover:shadow-md",
|
|
111
|
+
children: /* @__PURE__ */ s("div", {
|
|
112
|
+
className: "flex items-start justify-between",
|
|
113
|
+
children: [/* @__PURE__ */ s("div", {
|
|
114
|
+
className: "flex-1",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ s("div", {
|
|
117
|
+
className: "flex items-center gap-2",
|
|
118
|
+
children: [/* @__PURE__ */ o("h3", {
|
|
119
|
+
className: "font-medium text-content-primary",
|
|
120
|
+
children: e.name
|
|
121
|
+
}), e.isDefault && /* @__PURE__ */ o("span", {
|
|
122
|
+
className: "rounded bg-accent-primary/10 px-2 py-0.5 text-xs font-medium text-accent-primary",
|
|
123
|
+
children: l("i18n.languages.badges.default", "Default")
|
|
124
|
+
})]
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ o("p", {
|
|
127
|
+
className: "mt-1 text-sm text-content-secondary",
|
|
128
|
+
children: e.nativeName
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ s("div", {
|
|
131
|
+
className: "mt-2 flex items-center gap-3 text-xs text-content-tertiary",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ o("span", { children: l("i18n.languages.card.code", "Code: {{code}}", { code: e.code }) }),
|
|
134
|
+
/* @__PURE__ */ o("span", { children: "•" }),
|
|
135
|
+
/* @__PURE__ */ o("span", { children: e.direction === "ltr" ? l("i18n.shared.direction.ltr", "LTR") : l("i18n.shared.direction.rtl", "RTL") })
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
}), /* @__PURE__ */ o("div", { className: `size-2 rounded-full ${e.status === "active" ? "bg-success" : "bg-content-tertiary"}` })]
|
|
140
|
+
})
|
|
141
|
+
}, e.id))
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
//#endregion
|
|
148
|
+
export { c as LanguagesListPage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocaleConfigPage.d.ts","sourceRoot":"","sources":["../../../src/i18n/pages/LocaleConfigPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAiU9B,CAAC"}
|