@nsxbet/admin-sdk 0.5.0 → 0.6.0
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/CHECKLIST.md +40 -10
- package/README.md +337 -36
- package/dist/auth/client/gateway-token.d.ts +19 -0
- package/dist/auth/client/gateway-token.js +89 -0
- package/dist/auth/client/in-memory.d.ts +5 -1
- package/dist/auth/client/in-memory.js +75 -38
- package/dist/auth/client/index.d.ts +0 -1
- package/dist/auth/client/interface.d.ts +6 -3
- package/dist/auth/client/keycloak.d.ts +0 -1
- package/dist/auth/client/keycloak.js +6 -3
- package/dist/auth/components/UserSelector.d.ts +0 -1
- package/dist/auth/components/UserSelector.js +89 -7
- package/dist/auth/components/index.d.ts +0 -1
- package/dist/auth/index.d.ts +0 -1
- package/dist/components/AuthProvider.d.ts +0 -1
- package/dist/components/Timestamp.d.ts +7 -0
- package/dist/components/Timestamp.js +50 -0
- package/dist/hooks/useAuth.d.ts +0 -1
- package/dist/hooks/useAuth.js +1 -1
- package/dist/hooks/useFetch.d.ts +0 -1
- package/dist/hooks/useI18n.d.ts +0 -1
- package/dist/hooks/usePlatformAPI.d.ts +0 -1
- package/dist/hooks/useTelemetry.d.ts +0 -1
- package/dist/hooks/useTimestamp.d.ts +8 -0
- package/dist/hooks/useTimestamp.js +122 -0
- package/dist/i18n/config.d.ts +20 -2
- package/dist/i18n/config.js +48 -0
- package/dist/i18n/index.d.ts +2 -3
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/locales/en-US.json +95 -18
- package/dist/i18n/locales/es.json +95 -18
- package/dist/i18n/locales/pt-BR.json +95 -18
- package/dist/i18n/locales/ro.json +95 -18
- package/dist/index.d.ts +11 -7
- package/dist/index.js +5 -1
- package/dist/registry/AdminShellRegistry.d.ts +1 -2
- package/dist/registry/cache/cached-catalog.d.ts +11 -0
- package/dist/registry/cache/cached-catalog.js +42 -0
- package/dist/registry/cache/catalog-cache.d.ts +10 -0
- package/dist/registry/cache/catalog-cache.js +58 -0
- package/dist/registry/cache/index.d.ts +5 -0
- package/dist/registry/cache/index.js +3 -0
- package/dist/registry/cache/types.d.ts +20 -0
- package/dist/registry/cache/types.js +3 -0
- package/dist/registry/client/http.d.ts +0 -1
- package/dist/registry/client/http.js +13 -0
- package/dist/registry/client/in-memory.d.ts +0 -1
- package/dist/registry/client/in-memory.js +117 -12
- package/dist/registry/client/index.d.ts +0 -1
- package/dist/registry/client/interface.d.ts +21 -6
- package/dist/registry/index.d.ts +5 -2
- package/dist/registry/index.js +4 -0
- package/dist/registry/types/index.d.ts +2 -3
- package/dist/registry/types/manifest.d.ts +20 -24
- package/dist/registry/types/manifest.js +17 -18
- package/dist/registry/types/module.d.ts +43 -14
- package/dist/registry/useRegistryPolling.d.ts +15 -0
- package/dist/registry/useRegistryPolling.js +66 -0
- package/dist/router/DynamicModule.d.ts +6 -22
- package/dist/router/DynamicModule.js +25 -48
- package/dist/router/ModuleErrorBoundary.d.ts +39 -0
- package/dist/router/ModuleErrorBoundary.js +101 -0
- package/dist/router/index.d.ts +1 -1
- package/dist/router/url-allowlist.d.ts +22 -0
- package/dist/router/url-allowlist.js +65 -0
- package/dist/shell/AdminShell.d.ts +0 -1
- package/dist/shell/AdminShell.js +178 -43
- package/dist/shell/BackofficeShell.d.ts +0 -1
- package/dist/shell/BackofficeShell.js +59 -25
- package/dist/shell/components/CommandPalette.d.ts +0 -1
- package/dist/shell/components/CommandPalette.js +26 -50
- package/dist/shell/components/DevtoolsPanel.d.ts +11 -0
- package/dist/shell/components/DevtoolsPanel.js +145 -0
- package/dist/shell/components/HomePage.d.ts +0 -1
- package/dist/shell/components/HomePage.js +9 -4
- package/dist/shell/components/LeftNav.d.ts +0 -1
- package/dist/shell/components/LeftNav.js +91 -93
- package/dist/shell/components/MainContent.d.ts +3 -2
- package/dist/shell/components/MainContent.js +8 -23
- package/dist/shell/components/ModuleOverview.d.ts +0 -1
- package/dist/shell/components/ModuleOverview.js +4 -20
- package/dist/shell/components/ProfilePage.d.ts +0 -1
- package/dist/shell/components/ProfilePage.js +1 -1
- package/dist/shell/components/RegistryPage.d.ts +0 -1
- package/dist/shell/components/RegistryPage.js +154 -64
- package/dist/shell/components/RegistryStatusBanner.d.ts +6 -0
- package/dist/shell/components/RegistryStatusBanner.js +31 -0
- package/dist/shell/components/RegistryUnavailable.d.ts +4 -0
- package/dist/shell/components/RegistryUnavailable.js +7 -0
- package/dist/shell/components/SettingsPage.d.ts +0 -1
- package/dist/shell/components/StackedPanel.d.ts +15 -0
- package/dist/shell/components/StackedPanel.js +45 -0
- package/dist/shell/components/TopBar.d.ts +4 -2
- package/dist/shell/components/TopBar.js +9 -3
- package/dist/shell/components/UpdateBanner.d.ts +5 -0
- package/dist/shell/components/UpdateBanner.js +8 -0
- package/dist/shell/components/index.d.ts +4 -1
- package/dist/shell/components/index.js +2 -0
- package/dist/shell/components/theme-provider.d.ts +0 -1
- package/dist/shell/components/theme-provider.js +8 -5
- package/dist/shell/hooks/useCspViolations.d.ts +12 -0
- package/dist/shell/hooks/useCspViolations.js +34 -0
- package/dist/shell/index.d.ts +1 -2
- package/dist/shell/polling-config.d.ts +10 -0
- package/dist/shell/polling-config.js +26 -0
- package/dist/shell/search/fuzzy.d.ts +0 -1
- package/dist/shell/search/index.d.ts +0 -1
- package/dist/shell/telemetry.d.ts +0 -1
- package/dist/shell/types.d.ts +34 -18
- package/dist/tailwind/index.d.ts +0 -1
- package/dist/types/keycloak.d.ts +0 -1
- package/dist/types/platform.d.ts +12 -1
- package/dist/vite/AdminShellSharedDeps.d.ts +64 -0
- package/dist/vite/AdminShellSharedDeps.js +215 -0
- package/dist/vite/config.d.ts +10 -2
- package/dist/vite/config.js +13 -10
- package/dist/vite/i18n-plugin.d.ts +13 -0
- package/dist/vite/i18n-plugin.js +81 -0
- package/dist/vite/index.d.ts +2 -1
- package/dist/vite/index.js +2 -0
- package/dist/vite/plugins.d.ts +0 -1
- package/package.json +6 -2
- package/dist/auth/client/in-memory.d.ts.map +0 -1
- package/dist/auth/client/index.d.ts.map +0 -1
- package/dist/auth/client/interface.d.ts.map +0 -1
- package/dist/auth/client/keycloak.d.ts.map +0 -1
- package/dist/auth/components/UserSelector.d.ts.map +0 -1
- package/dist/auth/components/index.d.ts.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/components/AuthProvider.d.ts.map +0 -1
- package/dist/hooks/useAuth.d.ts.map +0 -1
- package/dist/hooks/useFetch.d.ts.map +0 -1
- package/dist/hooks/useI18n.d.ts.map +0 -1
- package/dist/hooks/usePlatformAPI.d.ts.map +0 -1
- package/dist/hooks/useTelemetry.d.ts.map +0 -1
- package/dist/i18n/config.d.ts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/registry/AdminShellRegistry.d.ts.map +0 -1
- package/dist/registry/client/http.d.ts.map +0 -1
- package/dist/registry/client/in-memory.d.ts.map +0 -1
- package/dist/registry/client/index.d.ts.map +0 -1
- package/dist/registry/client/interface.d.ts.map +0 -1
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/types/index.d.ts.map +0 -1
- package/dist/registry/types/manifest.d.ts.map +0 -1
- package/dist/registry/types/module.d.ts.map +0 -1
- package/dist/router/DynamicModule.d.ts.map +0 -1
- package/dist/router/index.d.ts.map +0 -1
- package/dist/shell/AdminShell.d.ts.map +0 -1
- package/dist/shell/BackofficeShell.d.ts.map +0 -1
- package/dist/shell/components/CommandPalette.d.ts.map +0 -1
- package/dist/shell/components/HomePage.d.ts.map +0 -1
- package/dist/shell/components/LeftNav.d.ts.map +0 -1
- package/dist/shell/components/MainContent.d.ts.map +0 -1
- package/dist/shell/components/ModuleOverview.d.ts.map +0 -1
- package/dist/shell/components/ProfilePage.d.ts.map +0 -1
- package/dist/shell/components/RegistryPage.d.ts.map +0 -1
- package/dist/shell/components/SettingsPage.d.ts.map +0 -1
- package/dist/shell/components/TopBar.d.ts.map +0 -1
- package/dist/shell/components/index.d.ts.map +0 -1
- package/dist/shell/components/theme-provider.d.ts.map +0 -1
- package/dist/shell/index.d.ts.map +0 -1
- package/dist/shell/search/fuzzy.d.ts.map +0 -1
- package/dist/shell/search/index.d.ts.map +0 -1
- package/dist/shell/telemetry.d.ts.map +0 -1
- package/dist/shell/types.d.ts.map +0 -1
- package/dist/tailwind/index.d.ts.map +0 -1
- package/dist/types/keycloak.d.ts.map +0 -1
- package/dist/types/platform.d.ts.map +0 -1
- package/dist/vite/config.d.ts.map +0 -1
- package/dist/vite/index.d.ts.map +0 -1
- package/dist/vite/plugins.d.ts.map +0 -1
|
@@ -30,9 +30,14 @@
|
|
|
30
30
|
"themeLight": "Claro",
|
|
31
31
|
"themeDark": "Escuro",
|
|
32
32
|
"themeSystem": "Sistema",
|
|
33
|
-
"language": "Idioma"
|
|
33
|
+
"language": "Idioma",
|
|
34
|
+
"timezone": "Fuso horário",
|
|
35
|
+
"timezoneUtc": "UTC",
|
|
36
|
+
"timezoneLocal": "Local",
|
|
37
|
+
"timezoneToggleUtc": "Alternar fuso horário: atualmente UTC",
|
|
38
|
+
"timezoneToggleLocal": "Alternar fuso horário: atualmente Local"
|
|
34
39
|
},
|
|
35
|
-
"
|
|
40
|
+
"navigation": {
|
|
36
41
|
"home": "Início",
|
|
37
42
|
"settings": "Configurações",
|
|
38
43
|
"profile": "Perfil",
|
|
@@ -95,23 +100,40 @@
|
|
|
95
100
|
"mode": "Modo",
|
|
96
101
|
"apiMode": "Modo API",
|
|
97
102
|
"inMemoryMode": "Modo Em Memória",
|
|
98
|
-
"addModule": "Adicionar Módulo",
|
|
99
|
-
"addByUrl": "Por URL",
|
|
100
|
-
"addByManifest": "Por Manifesto",
|
|
101
|
-
"moduleUrl": "URL do Módulo",
|
|
102
|
-
"moduleUrlPlaceholder": "https://exemplo.com/modulo",
|
|
103
|
-
"manifestJson": "JSON do Manifesto",
|
|
104
|
-
"manifestPlaceholder": "Cole o JSON do manifesto aqui...",
|
|
105
|
-
"register": "Registrar",
|
|
106
103
|
"registeredModules": "Módulos Registrados",
|
|
107
104
|
"noModules": "Nenhum módulo registrado",
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
105
|
+
"noModulesHint": "Módulos são registrados através do pipeline CI/CD.",
|
|
106
|
+
"loadingModules": "Carregando módulos...",
|
|
107
|
+
"loadingVersions": "Carregando versões...",
|
|
108
|
+
"enabled": "Habilitado",
|
|
109
|
+
"disabled": "Desabilitado",
|
|
110
|
+
"unversioned": "sem versão",
|
|
111
|
+
"noDescription": "Sem descrição",
|
|
112
|
+
"versionHistory": "Histórico de Versões",
|
|
113
|
+
"versionActive": "Ativo",
|
|
114
|
+
"noVersionHistory": "Nenhum histórico de versões disponível.",
|
|
115
|
+
"rollback": "Reverter",
|
|
116
|
+
"rollbackTitle": "Reverter para v{{version}}?",
|
|
117
|
+
"rollbackDescription": "{{name}} será revertido de v{{fromVersion}} para v{{toVersion}}. A versão atual será substituída imediatamente para todos os usuários.",
|
|
118
|
+
"rollbackConfirm": "Confirmar Reversão",
|
|
119
|
+
"rollingBack": "Revertendo...",
|
|
120
|
+
"rolledBackFrom": "revertido da v{{version}}",
|
|
121
|
+
"disableTitle": "Desabilitar {{name}}?",
|
|
122
|
+
"disableDescription": "Este módulo será removido da navegação para todos os usuários. As rotas do módulo ficarão inacessíveis até ser reabilitado.",
|
|
123
|
+
"disableConfirm": "Desabilitar Módulo",
|
|
124
|
+
"deleteConfirm": "Tem certeza que deseja excluir \"{{name}}\"? Esta ação não pode ser desfeita.",
|
|
125
|
+
"manageOrder": "Gerenciar Ordem",
|
|
126
|
+
"saveOrder": "Salvar Ordem",
|
|
127
|
+
"savingOrder": "Salvando...",
|
|
128
|
+
"position": "#{{position}}",
|
|
129
|
+
"errorClientUnavailable": "Cliente do registro não disponível. Verifique a configuração.",
|
|
130
|
+
"errorLoadModules": "Falha ao carregar módulos",
|
|
131
|
+
"errorUpdateModule": "Falha ao atualizar módulo",
|
|
132
|
+
"errorDisableModule": "Falha ao desabilitar módulo",
|
|
133
|
+
"errorDeleteModule": "Falha ao excluir módulo",
|
|
134
|
+
"errorLoadVersions": "Falha ao carregar histórico de versões",
|
|
135
|
+
"errorRollback": "Falha ao reverter módulo",
|
|
136
|
+
"errorSaveOrder": "Falha ao salvar ordem"
|
|
115
137
|
},
|
|
116
138
|
"moduleOverview": {
|
|
117
139
|
"title": "Visão Geral do Módulo",
|
|
@@ -128,6 +150,17 @@
|
|
|
128
150
|
"support": "Suporte",
|
|
129
151
|
"supportChannel": "Canal de Suporte"
|
|
130
152
|
},
|
|
153
|
+
"moduleError": {
|
|
154
|
+
"title": "Falha ao Carregar Módulo",
|
|
155
|
+
"description": "Ocorreu um erro ao carregar o módulo.",
|
|
156
|
+
"ownerTeam": "Proprietário",
|
|
157
|
+
"supportChannel": "Suporte",
|
|
158
|
+
"retry": "Tentar Novamente",
|
|
159
|
+
"reload": "Recarregar Página",
|
|
160
|
+
"networkTitle": "Módulo Indisponível",
|
|
161
|
+
"networkDescription": "O servidor do módulo não está respondendo. Verifique se o módulo está em execução.",
|
|
162
|
+
"contactHeading": "Reportar este problema"
|
|
163
|
+
},
|
|
131
164
|
"errors": {
|
|
132
165
|
"generic": "Algo deu errado",
|
|
133
166
|
"notFound": "Página não encontrada",
|
|
@@ -138,7 +171,51 @@
|
|
|
138
171
|
"moduleLoadFailed": "Falha ao carregar módulo",
|
|
139
172
|
"networkError": "Erro de conexão"
|
|
140
173
|
},
|
|
174
|
+
"registryCache": {
|
|
175
|
+
"cachedMessage": "Usando dados de módulos em cache — registro indisponível",
|
|
176
|
+
"staleMessage": "Usando dados de módulos desatualizados — registro indisponível por mais de 24 horas",
|
|
177
|
+
"unavailableTitle": "Registro Admin Indisponível",
|
|
178
|
+
"unavailableDescription": "Não foi possível carregar o catálogo de módulos do registro. Verifique sua conexão e tente novamente.",
|
|
179
|
+
"retry": "Tentar Novamente",
|
|
180
|
+
"lastUpdated": "Última atualização {{time}}"
|
|
181
|
+
},
|
|
182
|
+
"devtoolsPanel": {
|
|
183
|
+
"title": "Devtools",
|
|
184
|
+
"triggerLabel": "Abrir painel de devtools",
|
|
185
|
+
"registry": "Registro",
|
|
186
|
+
"modules": "Módulos",
|
|
187
|
+
"cacheStatus": "Status do Cache",
|
|
188
|
+
"cspViolations": "Violações CSP",
|
|
189
|
+
"copyDebugInfo": "Copiar info de debug",
|
|
190
|
+
"copied": "Copiado!",
|
|
191
|
+
"close": "Fechar",
|
|
192
|
+
"catalogVersion": "Versão do Catálogo",
|
|
193
|
+
"generatedAt": "Gerado Em",
|
|
194
|
+
"registryMode": "Modo do Registro",
|
|
195
|
+
"apiMode": "Modo API",
|
|
196
|
+
"inMemoryMode": "Modo Em Memória",
|
|
197
|
+
"fresh": "Atualizado",
|
|
198
|
+
"cached": "Em Cache",
|
|
199
|
+
"stale": "Desatualizado",
|
|
200
|
+
"unavailable": "Indisponível",
|
|
201
|
+
"cachedAt": "Em Cache Desde",
|
|
202
|
+
"enabled": "Habilitado",
|
|
203
|
+
"disabled": "Desabilitado",
|
|
204
|
+
"noModules": "Nenhum módulo registrado",
|
|
205
|
+
"noViolations": "Nenhuma violação registrada",
|
|
206
|
+
"cspHintConnect": "Adicione {{host}} ao CSP_CONNECT_HOSTS",
|
|
207
|
+
"cspHintScript": "Adicione {{host}} ao CSP_SCRIPT_HOSTS",
|
|
208
|
+
"cspHintGeneric": "Violação CSP {{directive}} para {{uri}}",
|
|
209
|
+
"blockedUri": "URI Bloqueada",
|
|
210
|
+
"violatedDirective": "Diretiva Violada",
|
|
211
|
+
"hint": "Dica",
|
|
212
|
+
"baseUrl": "URL Base",
|
|
213
|
+
"id": "ID"
|
|
214
|
+
},
|
|
141
215
|
"breadcrumbs": {
|
|
142
|
-
"home": "Início"
|
|
216
|
+
"home": "Início",
|
|
217
|
+
"registry": "Registro",
|
|
218
|
+
"settings": "Configurações",
|
|
219
|
+
"profile": "Perfil"
|
|
143
220
|
}
|
|
144
221
|
}
|
|
@@ -30,9 +30,14 @@
|
|
|
30
30
|
"themeLight": "Deschis",
|
|
31
31
|
"themeDark": "Întunecat",
|
|
32
32
|
"themeSystem": "Sistem",
|
|
33
|
-
"language": "Limbă"
|
|
33
|
+
"language": "Limbă",
|
|
34
|
+
"timezone": "Fus orar",
|
|
35
|
+
"timezoneUtc": "UTC",
|
|
36
|
+
"timezoneLocal": "Local",
|
|
37
|
+
"timezoneToggleUtc": "Comutare fus orar: momentan UTC",
|
|
38
|
+
"timezoneToggleLocal": "Comutare fus orar: momentan Local"
|
|
34
39
|
},
|
|
35
|
-
"
|
|
40
|
+
"navigation": {
|
|
36
41
|
"home": "Acasă",
|
|
37
42
|
"settings": "Setări",
|
|
38
43
|
"profile": "Profil",
|
|
@@ -95,23 +100,40 @@
|
|
|
95
100
|
"mode": "Mod",
|
|
96
101
|
"apiMode": "Mod API",
|
|
97
102
|
"inMemoryMode": "Mod În Memorie",
|
|
98
|
-
"addModule": "Adaugă Modul",
|
|
99
|
-
"addByUrl": "După URL",
|
|
100
|
-
"addByManifest": "După Manifest",
|
|
101
|
-
"moduleUrl": "URL Modul",
|
|
102
|
-
"moduleUrlPlaceholder": "https://exemplu.com/modul",
|
|
103
|
-
"manifestJson": "JSON Manifest",
|
|
104
|
-
"manifestPlaceholder": "Lipește JSON-ul manifestului aici...",
|
|
105
|
-
"register": "Înregistrează",
|
|
106
103
|
"registeredModules": "Module Înregistrate",
|
|
107
104
|
"noModules": "Nu există module înregistrate",
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
105
|
+
"noModulesHint": "Modulele sunt înregistrate prin pipeline-ul CI/CD.",
|
|
106
|
+
"loadingModules": "Se încarcă modulele...",
|
|
107
|
+
"loadingVersions": "Se încarcă versiunile...",
|
|
108
|
+
"enabled": "Activat",
|
|
109
|
+
"disabled": "Dezactivat",
|
|
110
|
+
"unversioned": "fără versiune",
|
|
111
|
+
"noDescription": "Fără descriere",
|
|
112
|
+
"versionHistory": "Istoric Versiuni",
|
|
113
|
+
"versionActive": "Activ",
|
|
114
|
+
"noVersionHistory": "Nu există istoric de versiuni disponibil.",
|
|
115
|
+
"rollback": "Revenire",
|
|
116
|
+
"rollbackTitle": "Reveniți la v{{version}}?",
|
|
117
|
+
"rollbackDescription": "{{name}} va fi readus de la v{{fromVersion}} la v{{toVersion}}. Versiunea curentă va fi înlocuită imediat pentru toți utilizatorii.",
|
|
118
|
+
"rollbackConfirm": "Confirmă Revenirea",
|
|
119
|
+
"rollingBack": "Se revine...",
|
|
120
|
+
"rolledBackFrom": "readus de la v{{version}}",
|
|
121
|
+
"disableTitle": "Dezactivați {{name}}?",
|
|
122
|
+
"disableDescription": "Acest modul va fi eliminat din navigare pentru toți utilizatorii. Rutele modulului vor fi inaccesibile până la reactivare.",
|
|
123
|
+
"disableConfirm": "Dezactivează Modul",
|
|
124
|
+
"deleteConfirm": "Ești sigur că vrei să ștergi \"{{name}}\"? Această acțiune nu poate fi anulată.",
|
|
125
|
+
"manageOrder": "Gestionare Ordine",
|
|
126
|
+
"saveOrder": "Salvează Ordinea",
|
|
127
|
+
"savingOrder": "Se salvează...",
|
|
128
|
+
"position": "#{{position}}",
|
|
129
|
+
"errorClientUnavailable": "Clientul registrului nu este disponibil. Verifică configurarea.",
|
|
130
|
+
"errorLoadModules": "Eroare la încărcarea modulelor",
|
|
131
|
+
"errorUpdateModule": "Eroare la actualizarea modulului",
|
|
132
|
+
"errorDisableModule": "Eroare la dezactivarea modulului",
|
|
133
|
+
"errorDeleteModule": "Eroare la ștergerea modulului",
|
|
134
|
+
"errorLoadVersions": "Eroare la încărcarea istoricului de versiuni",
|
|
135
|
+
"errorRollback": "Eroare la revenirea modulului",
|
|
136
|
+
"errorSaveOrder": "Eroare la salvarea ordinii"
|
|
115
137
|
},
|
|
116
138
|
"moduleOverview": {
|
|
117
139
|
"title": "Prezentare Generală Modul",
|
|
@@ -128,6 +150,17 @@
|
|
|
128
150
|
"support": "Suport",
|
|
129
151
|
"supportChannel": "Canal Suport"
|
|
130
152
|
},
|
|
153
|
+
"moduleError": {
|
|
154
|
+
"title": "Eroare la Încărcarea Modulului",
|
|
155
|
+
"description": "A apărut o eroare la încărcarea modulului.",
|
|
156
|
+
"ownerTeam": "Proprietar",
|
|
157
|
+
"supportChannel": "Suport",
|
|
158
|
+
"retry": "Încearcă Din Nou",
|
|
159
|
+
"reload": "Reîncarcă Pagina",
|
|
160
|
+
"networkTitle": "Modul Indisponibil",
|
|
161
|
+
"networkDescription": "Serverul modulului nu răspunde. Asigurați-vă că modulul rulează.",
|
|
162
|
+
"contactHeading": "Raportați această problemă"
|
|
163
|
+
},
|
|
131
164
|
"errors": {
|
|
132
165
|
"generic": "Ceva nu a funcționat",
|
|
133
166
|
"notFound": "Pagina nu a fost găsită",
|
|
@@ -138,7 +171,51 @@
|
|
|
138
171
|
"moduleLoadFailed": "Eroare la încărcarea modulului",
|
|
139
172
|
"networkError": "Eroare de rețea"
|
|
140
173
|
},
|
|
174
|
+
"registryCache": {
|
|
175
|
+
"cachedMessage": "Se folosesc date de module din cache — registrul nu este disponibil",
|
|
176
|
+
"staleMessage": "Se folosesc date de module învechite — registrul nu este disponibil de peste 24 de ore",
|
|
177
|
+
"unavailableTitle": "Registrul Admin Indisponibil",
|
|
178
|
+
"unavailableDescription": "Nu s-a putut încărca catalogul de module din registru. Verifică conexiunea și încearcă din nou.",
|
|
179
|
+
"retry": "Reîncearcă",
|
|
180
|
+
"lastUpdated": "Ultima actualizare {{time}}"
|
|
181
|
+
},
|
|
182
|
+
"devtoolsPanel": {
|
|
183
|
+
"title": "Devtools",
|
|
184
|
+
"triggerLabel": "Deschide panoul devtools",
|
|
185
|
+
"registry": "Registru",
|
|
186
|
+
"modules": "Module",
|
|
187
|
+
"cacheStatus": "Stare Cache",
|
|
188
|
+
"cspViolations": "Încălcări CSP",
|
|
189
|
+
"copyDebugInfo": "Copiază info de depanare",
|
|
190
|
+
"copied": "Copiat!",
|
|
191
|
+
"close": "Închide",
|
|
192
|
+
"catalogVersion": "Versiune Catalog",
|
|
193
|
+
"generatedAt": "Generat La",
|
|
194
|
+
"registryMode": "Mod Registru",
|
|
195
|
+
"apiMode": "Mod API",
|
|
196
|
+
"inMemoryMode": "Mod În Memorie",
|
|
197
|
+
"fresh": "Proaspăt",
|
|
198
|
+
"cached": "În Cache",
|
|
199
|
+
"stale": "Învechit",
|
|
200
|
+
"unavailable": "Indisponibil",
|
|
201
|
+
"cachedAt": "În Cache Din",
|
|
202
|
+
"enabled": "Activat",
|
|
203
|
+
"disabled": "Dezactivat",
|
|
204
|
+
"noModules": "Nu există module înregistrate",
|
|
205
|
+
"noViolations": "Nu s-au înregistrat încălcări",
|
|
206
|
+
"cspHintConnect": "Adaugă {{host}} la CSP_CONNECT_HOSTS",
|
|
207
|
+
"cspHintScript": "Adaugă {{host}} la CSP_SCRIPT_HOSTS",
|
|
208
|
+
"cspHintGeneric": "Încălcare CSP {{directive}} pentru {{uri}}",
|
|
209
|
+
"blockedUri": "URI Blocat",
|
|
210
|
+
"violatedDirective": "Directivă Încălcată",
|
|
211
|
+
"hint": "Indiciu",
|
|
212
|
+
"baseUrl": "URL Bază",
|
|
213
|
+
"id": "ID"
|
|
214
|
+
},
|
|
141
215
|
"breadcrumbs": {
|
|
142
|
-
"home": "Acasă"
|
|
216
|
+
"home": "Acasă",
|
|
217
|
+
"registry": "Registru",
|
|
218
|
+
"settings": "Setări",
|
|
219
|
+
"profile": "Profil"
|
|
143
220
|
}
|
|
144
221
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,23 +5,27 @@
|
|
|
5
5
|
* Provides authentication, navigation, and platform integration
|
|
6
6
|
*/
|
|
7
7
|
export { AuthProvider, useAuthContext, useOptionalAuthContext } from './components/AuthProvider';
|
|
8
|
+
export { Timestamp } from './components/Timestamp';
|
|
9
|
+
export type { TimestampProps } from './components/Timestamp';
|
|
8
10
|
export { useAuth } from './hooks/useAuth';
|
|
9
11
|
export { usePlatformAPI } from './hooks/usePlatformAPI';
|
|
10
12
|
export { useFetch } from './hooks/useFetch';
|
|
11
13
|
export { useTelemetry } from './hooks/useTelemetry';
|
|
12
14
|
export { useI18n } from './hooks/useI18n';
|
|
15
|
+
export { useTimestamp } from './hooks/useTimestamp';
|
|
13
16
|
export { createInMemoryAuthClient, clearInMemoryAuth, createMockUsersFromRoles, createKeycloakAuthClient, UserSelector, } from './auth';
|
|
14
17
|
export type { AuthClient, InMemoryAuthClient, MockUser, MockUserRoles, AuthState, AuthStateCallback, InMemoryAuthClientOptions, KeycloakAuthClientOptions, } from './auth';
|
|
15
|
-
export type { PlatformAPI, Breadcrumb, User } from './types/platform';
|
|
18
|
+
export type { PlatformAPI, Breadcrumb, User, TimezoneMode, TimestampFormat } from './types/platform';
|
|
16
19
|
export type { KeycloakConfig } from './types/keycloak';
|
|
17
20
|
export type { UseAuthResult } from './hooks/useAuth';
|
|
18
21
|
export type { UseTelemetryResult } from './hooks/useTelemetry';
|
|
19
22
|
export type { UseI18nResult } from './hooks/useI18n';
|
|
20
|
-
export {
|
|
21
|
-
export
|
|
22
|
-
export {
|
|
23
|
-
export
|
|
23
|
+
export type { UseTimestampResult } from './hooks/useTimestamp';
|
|
24
|
+
export { initI18n, saveLocale, isSupportedLocale, resolveLocalizedString, registerModuleTranslations, i18n, SUPPORTED_LOCALES, LOCALE_FLAGS, LOCALE_NAMES, } from './i18n';
|
|
25
|
+
export type { SupportedLocale, LocalizedField } from './i18n';
|
|
26
|
+
export { createInMemoryRegistryClient, clearInMemoryRegistry, createHttpRegistryClient, validateManifest, parseManifest, useRegistryPolling, AdminShellRegistry, useRegistry, useRegistryClient, } from './registry';
|
|
27
|
+
export type { RegistryClient, ModuleOperations, CatalogOperations, InMemoryRegistryOptions, PreConfiguredModule, HttpRegistryOptions, AdminModuleManifest, ModuleCommand as RegistryModuleCommand, ModulePermissions, ModuleOwners, RegisteredModule, UpdateModuleDto, ReorderModuleDto, ModuleFilters, Catalog as RegistryCatalog, CatalogModule, CatalogVersion, ImportMap as RegistryImportMap, RegistryPollingState, UseRegistryPollingOptions, RegistryContextValue, AdminShellRegistryProps, } from './registry';
|
|
24
28
|
export { AdminShell, TopBar, LeftNav, MainContent, CommandPalette, ThemeProvider, useTheme, initTelemetry, track, trackError, fuzzySearch, } from './shell';
|
|
25
29
|
export { DynamicModule, ModuleLoading, ModuleErrorBoundary, } from './router';
|
|
26
|
-
export type {
|
|
27
|
-
|
|
30
|
+
export type { ModuleInfo, ErrorBoundaryProps, } from './router';
|
|
31
|
+
export type { AdminShellProps, TopBarProps, CommandPaletteProps, Module, ModuleCommand, ModuleStatus, NavigationSection, ModuleNavigation, Catalog, ImportMap, SearchableItem, SearchResult, SearchOptions, } from './shell';
|
package/dist/index.js
CHANGED
|
@@ -6,22 +6,26 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Components
|
|
8
8
|
export { AuthProvider, useAuthContext, useOptionalAuthContext } from './components/AuthProvider';
|
|
9
|
+
export { Timestamp } from './components/Timestamp';
|
|
9
10
|
// Hooks
|
|
10
11
|
export { useAuth } from './hooks/useAuth';
|
|
11
12
|
export { usePlatformAPI } from './hooks/usePlatformAPI';
|
|
12
13
|
export { useFetch } from './hooks/useFetch';
|
|
13
14
|
export { useTelemetry } from './hooks/useTelemetry';
|
|
14
15
|
export { useI18n } from './hooks/useI18n';
|
|
16
|
+
export { useTimestamp } from './hooks/useTimestamp';
|
|
15
17
|
// Auth Client
|
|
16
18
|
export { createInMemoryAuthClient, clearInMemoryAuth, createMockUsersFromRoles, createKeycloakAuthClient, UserSelector, } from './auth';
|
|
17
19
|
// i18n
|
|
18
|
-
export { initI18n, saveLocale, isSupportedLocale, i18n, SUPPORTED_LOCALES, LOCALE_FLAGS, LOCALE_NAMES, } from './i18n';
|
|
20
|
+
export { initI18n, saveLocale, isSupportedLocale, resolveLocalizedString, registerModuleTranslations, i18n, SUPPORTED_LOCALES, LOCALE_FLAGS, LOCALE_NAMES, } from './i18n';
|
|
19
21
|
// Registry
|
|
20
22
|
export {
|
|
21
23
|
// Client factory
|
|
22
24
|
createInMemoryRegistryClient, clearInMemoryRegistry, createHttpRegistryClient,
|
|
23
25
|
// Validation
|
|
24
26
|
validateManifest, parseManifest,
|
|
27
|
+
// Polling
|
|
28
|
+
useRegistryPolling,
|
|
25
29
|
// React Context
|
|
26
30
|
AdminShellRegistry, useRegistry, useRegistryClient, } from './registry';
|
|
27
31
|
// Shell
|
|
@@ -52,7 +52,7 @@ export interface RegistryContextValue {
|
|
|
52
52
|
/** Reorder modules */
|
|
53
53
|
reorderModules: (order: Array<{
|
|
54
54
|
id: number;
|
|
55
|
-
|
|
55
|
+
navigationOrder: number;
|
|
56
56
|
}>) => Promise<void>;
|
|
57
57
|
/** Get a single module by ID */
|
|
58
58
|
getModule: (id: number) => RegisteredModule | undefined;
|
|
@@ -137,4 +137,3 @@ export declare function useRegistry(): RegistryContextValue;
|
|
|
137
137
|
* ```
|
|
138
138
|
*/
|
|
139
139
|
export declare function useRegistryClient(): RegistryClient;
|
|
140
|
-
//# sourceMappingURL=AdminShellRegistry.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Catalog } from '../types';
|
|
2
|
+
import type { CatalogOperations } from '../client/interface';
|
|
3
|
+
import type { RegistryCacheStatus } from './types';
|
|
4
|
+
export interface CachedCatalogOperations extends CatalogOperations {
|
|
5
|
+
getStatus(): RegistryCacheStatus;
|
|
6
|
+
retry(): Promise<Catalog>;
|
|
7
|
+
}
|
|
8
|
+
export interface CachedCatalogOptions {
|
|
9
|
+
staleThresholdMs?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function createCachedCatalog(inner: CatalogOperations, options?: CachedCatalogOptions): CachedCatalogOperations;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DEFAULT_STALE_THRESHOLD_MS } from './types';
|
|
2
|
+
import { CatalogCache } from './catalog-cache';
|
|
3
|
+
export function createCachedCatalog(inner, options = {}) {
|
|
4
|
+
const { staleThresholdMs = DEFAULT_STALE_THRESHOLD_MS } = options;
|
|
5
|
+
const cache = new CatalogCache();
|
|
6
|
+
let status = { state: 'fresh' };
|
|
7
|
+
function resolveStatus(cachedAt) {
|
|
8
|
+
const age = Date.now() - new Date(cachedAt).getTime();
|
|
9
|
+
if (age > staleThresholdMs) {
|
|
10
|
+
return { state: 'stale', cachedAt };
|
|
11
|
+
}
|
|
12
|
+
return { state: 'cached', cachedAt };
|
|
13
|
+
}
|
|
14
|
+
async function fetchWithCache() {
|
|
15
|
+
try {
|
|
16
|
+
const catalog = await inner.get();
|
|
17
|
+
cache.save(catalog);
|
|
18
|
+
status = { state: 'fresh' };
|
|
19
|
+
return catalog;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
const cached = cache.load();
|
|
23
|
+
if (cached) {
|
|
24
|
+
status = resolveStatus(cached.cachedAt);
|
|
25
|
+
return cached.catalog;
|
|
26
|
+
}
|
|
27
|
+
status = { state: 'unavailable' };
|
|
28
|
+
throw new Error('Registry unavailable and no cache exists');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
get: fetchWithCache,
|
|
33
|
+
version: () => inner.version(),
|
|
34
|
+
getImportMap: (environment) => inner.getImportMap(environment),
|
|
35
|
+
getStatus() {
|
|
36
|
+
return status;
|
|
37
|
+
},
|
|
38
|
+
async retry() {
|
|
39
|
+
return fetchWithCache();
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Catalog } from '../types';
|
|
2
|
+
import type { CachedCatalog } from './types';
|
|
3
|
+
export declare class CatalogCache {
|
|
4
|
+
private readonly storageKey;
|
|
5
|
+
constructor(storageKey?: string);
|
|
6
|
+
save(catalog: Catalog): void;
|
|
7
|
+
load(): CachedCatalog | null;
|
|
8
|
+
clear(): void;
|
|
9
|
+
private isValidCachedCatalog;
|
|
10
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CACHE_SCHEMA_VERSION, CACHE_STORAGE_KEY } from './types';
|
|
2
|
+
export class CatalogCache {
|
|
3
|
+
constructor(storageKey = CACHE_STORAGE_KEY) {
|
|
4
|
+
Object.defineProperty(this, "storageKey", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true,
|
|
8
|
+
value: void 0
|
|
9
|
+
});
|
|
10
|
+
this.storageKey = storageKey;
|
|
11
|
+
}
|
|
12
|
+
save(catalog) {
|
|
13
|
+
try {
|
|
14
|
+
const entry = {
|
|
15
|
+
schemaVersion: CACHE_SCHEMA_VERSION,
|
|
16
|
+
catalog,
|
|
17
|
+
cachedAt: new Date().toISOString(),
|
|
18
|
+
};
|
|
19
|
+
localStorage.setItem(this.storageKey, JSON.stringify(entry));
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// Silently ignore write failures (quota exceeded, etc.)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
load() {
|
|
26
|
+
try {
|
|
27
|
+
const raw = localStorage.getItem(this.storageKey);
|
|
28
|
+
if (!raw)
|
|
29
|
+
return null;
|
|
30
|
+
const parsed = JSON.parse(raw);
|
|
31
|
+
if (!this.isValidCachedCatalog(parsed)) {
|
|
32
|
+
this.clear();
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return parsed;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
clear() {
|
|
42
|
+
try {
|
|
43
|
+
localStorage.removeItem(this.storageKey);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// Silently ignore
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
isValidCachedCatalog(value) {
|
|
50
|
+
if (typeof value !== 'object' || value === null)
|
|
51
|
+
return false;
|
|
52
|
+
const obj = value;
|
|
53
|
+
return (obj.schemaVersion === CACHE_SCHEMA_VERSION &&
|
|
54
|
+
typeof obj.cachedAt === 'string' &&
|
|
55
|
+
typeof obj.catalog === 'object' &&
|
|
56
|
+
obj.catalog !== null);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { CatalogCache } from './catalog-cache';
|
|
2
|
+
export { createCachedCatalog } from './cached-catalog';
|
|
3
|
+
export type { CachedCatalogOperations, CachedCatalogOptions } from './cached-catalog';
|
|
4
|
+
export type { CachedCatalog, RegistryCacheStatus } from './types';
|
|
5
|
+
export { CACHE_SCHEMA_VERSION, CACHE_STORAGE_KEY, DEFAULT_STALE_THRESHOLD_MS } from './types';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Catalog } from '../types';
|
|
2
|
+
export declare const CACHE_SCHEMA_VERSION = 1;
|
|
3
|
+
export declare const CACHE_STORAGE_KEY = "@nsxbet/registry-cache";
|
|
4
|
+
export declare const DEFAULT_STALE_THRESHOLD_MS: number;
|
|
5
|
+
export interface CachedCatalog {
|
|
6
|
+
schemaVersion: number;
|
|
7
|
+
catalog: Catalog;
|
|
8
|
+
cachedAt: string;
|
|
9
|
+
}
|
|
10
|
+
export type RegistryCacheStatus = {
|
|
11
|
+
state: 'fresh';
|
|
12
|
+
} | {
|
|
13
|
+
state: 'cached';
|
|
14
|
+
cachedAt: string;
|
|
15
|
+
} | {
|
|
16
|
+
state: 'stale';
|
|
17
|
+
cachedAt: string;
|
|
18
|
+
} | {
|
|
19
|
+
state: 'unavailable';
|
|
20
|
+
};
|
|
@@ -83,12 +83,25 @@ export function createHttpRegistryClient(options) {
|
|
|
83
83
|
body: JSON.stringify(order),
|
|
84
84
|
});
|
|
85
85
|
},
|
|
86
|
+
async listVersions(id) {
|
|
87
|
+
const response = await request(`/modules/${id}/versions`);
|
|
88
|
+
return response.versions;
|
|
89
|
+
},
|
|
90
|
+
async rollback(id, targetVersion) {
|
|
91
|
+
return request(`/modules/${id}/rollback`, {
|
|
92
|
+
method: 'POST',
|
|
93
|
+
body: JSON.stringify({ targetVersion }),
|
|
94
|
+
});
|
|
95
|
+
},
|
|
86
96
|
};
|
|
87
97
|
// Catalog operations
|
|
88
98
|
const catalog = {
|
|
89
99
|
async get() {
|
|
90
100
|
return request('/catalog');
|
|
91
101
|
},
|
|
102
|
+
async version() {
|
|
103
|
+
return request('/catalog/version');
|
|
104
|
+
},
|
|
92
105
|
async getImportMap(_environment) {
|
|
93
106
|
// Generate import map from catalog baseUrl
|
|
94
107
|
const catalogData = await this.get();
|