@hed-hog/core 0.0.299 → 0.0.301

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 (133) hide show
  1. package/dist/ai/ai.service.d.ts +13 -2
  2. package/dist/ai/ai.service.d.ts.map +1 -1
  3. package/dist/ai/ai.service.js +104 -2
  4. package/dist/ai/ai.service.js.map +1 -1
  5. package/dist/dashboard/dashboard/dashboard.controller.d.ts +6 -0
  6. package/dist/dashboard/dashboard/dashboard.controller.d.ts.map +1 -1
  7. package/dist/dashboard/dashboard/dashboard.service.d.ts +6 -0
  8. package/dist/dashboard/dashboard/dashboard.service.d.ts.map +1 -1
  9. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +2 -1
  10. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
  11. package/dist/dashboard/dashboard-component/dashboard-component.controller.js +6 -3
  12. package/dist/dashboard/dashboard-component/dashboard-component.controller.js.map +1 -1
  13. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +7 -1
  14. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
  15. package/dist/dashboard/dashboard-component/dashboard-component.service.js +76 -33
  16. package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
  17. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +82 -0
  18. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
  19. package/dist/dashboard/dashboard-core/dashboard-core.controller.js +117 -0
  20. package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
  21. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +93 -0
  22. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
  23. package/dist/dashboard/dashboard-core/dashboard-core.service.js +654 -20
  24. package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
  25. package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +2 -0
  26. package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts.map +1 -1
  27. package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +2 -0
  28. package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
  29. package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +2 -0
  30. package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts.map +1 -1
  31. package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +2 -0
  32. package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts.map +1 -1
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +1 -0
  36. package/dist/index.js.map +1 -1
  37. package/dist/mail/mail.service.d.ts +9 -2
  38. package/dist/mail/mail.service.d.ts.map +1 -1
  39. package/dist/mail/mail.service.js +56 -4
  40. package/dist/mail/mail.service.js.map +1 -1
  41. package/dist/setting/setting.service.d.ts +6 -1
  42. package/dist/setting/setting.service.d.ts.map +1 -1
  43. package/dist/setting/setting.service.js +188 -15
  44. package/dist/setting/setting.service.js.map +1 -1
  45. package/hedhog/data/dashboard.yaml +12 -6
  46. package/hedhog/data/dashboard_component_role.yaml +66 -0
  47. package/hedhog/data/dashboard_role.yaml +2 -8
  48. package/hedhog/data/route.yaml +72 -0
  49. package/hedhog/data/setting_group.yaml +28 -0
  50. package/hedhog/frontend/app/dashboard/[slug]/dashboard-content.tsx.ejs +333 -128
  51. package/hedhog/frontend/app/dashboard/[slug]/widget-renderer.tsx.ejs +277 -53
  52. package/hedhog/frontend/app/dashboard/components/add-widget-selector-dialog.tsx.ejs +179 -231
  53. package/hedhog/frontend/app/dashboard/components/draggable-grid.tsx.ejs +64 -18
  54. package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +1619 -0
  55. package/hedhog/frontend/app/dashboard/dashboard.css.ejs +37 -0
  56. package/hedhog/frontend/app/dashboard/management/page.tsx.ejs +1 -1
  57. package/hedhog/frontend/app/dashboard/management/tabs/components-tab.tsx.ejs +6 -6
  58. package/hedhog/frontend/app/dashboard/management/tabs/dashboards-tab.tsx.ejs +8 -8
  59. package/hedhog/frontend/app/dashboard/management/tabs/items-tab.tsx.ejs +3 -3
  60. package/hedhog/frontend/app/dashboard/page.tsx.ejs +3 -25
  61. package/hedhog/frontend/messages/en.json +124 -2
  62. package/hedhog/frontend/messages/pt.json +123 -1
  63. package/hedhog/frontend/widgets/account-security.tsx.ejs +1 -1
  64. package/hedhog/frontend/widgets/active-users-card.tsx.ejs +2 -2
  65. package/hedhog/frontend/widgets/activity-timeline.tsx.ejs +1 -1
  66. package/hedhog/frontend/widgets/email-notifications.tsx.ejs +1 -1
  67. package/hedhog/frontend/widgets/locale-config.tsx.ejs +1 -1
  68. package/hedhog/frontend/widgets/login-history-chart.tsx.ejs +1 -1
  69. package/hedhog/frontend/widgets/mail-config.tsx.ejs +1 -1
  70. package/hedhog/frontend/widgets/mail-sent-card.tsx.ejs +2 -2
  71. package/hedhog/frontend/widgets/mail-sent-chart.tsx.ejs +1 -1
  72. package/hedhog/frontend/widgets/menus-card.tsx.ejs +2 -2
  73. package/hedhog/frontend/widgets/oauth-config.tsx.ejs +1 -1
  74. package/hedhog/frontend/widgets/permissions-card.tsx.ejs +2 -2
  75. package/hedhog/frontend/widgets/permissions-chart.tsx.ejs +1 -1
  76. package/hedhog/frontend/widgets/profile-card.tsx.ejs +1 -1
  77. package/hedhog/frontend/widgets/routes-card.tsx.ejs +2 -2
  78. package/hedhog/frontend/widgets/session-activity-chart.tsx.ejs +1 -1
  79. package/hedhog/frontend/widgets/sessions-today-card.tsx.ejs +2 -2
  80. package/hedhog/frontend/widgets/stat-access-level.tsx.ejs +1 -1
  81. package/hedhog/frontend/widgets/stat-actions-today.tsx.ejs +1 -1
  82. package/hedhog/frontend/widgets/stat-consecutive-days.tsx.ejs +1 -1
  83. package/hedhog/frontend/widgets/stat-online-time.tsx.ejs +1 -1
  84. package/hedhog/frontend/widgets/storage-config.tsx.ejs +1 -1
  85. package/hedhog/frontend/widgets/theme-config.tsx.ejs +1 -1
  86. package/hedhog/frontend/widgets/user-growth-chart.tsx.ejs +1 -1
  87. package/hedhog/frontend/widgets/user-roles.tsx.ejs +1 -1
  88. package/hedhog/frontend/widgets/user-sessions.tsx.ejs +1 -1
  89. package/hedhog/table/dashboard.yaml +6 -0
  90. package/package.json +3 -3
  91. package/src/ai/ai.service.ts +129 -1
  92. package/src/dashboard/dashboard-component/dashboard-component.controller.ts +15 -2
  93. package/src/dashboard/dashboard-component/dashboard-component.service.ts +107 -43
  94. package/src/dashboard/dashboard-core/dashboard-core.controller.ts +119 -1
  95. package/src/dashboard/dashboard-core/dashboard-core.service.ts +876 -20
  96. package/src/index.ts +7 -6
  97. package/src/mail/mail.service.ts +67 -3
  98. package/src/setting/setting.service.ts +222 -15
  99. package/hedhog/frontend/app/dashboard/components/widgets/core..gitkeep.ejs +0 -11
  100. package/hedhog/frontend/app/dashboard/components/widgets/core.account-security.tsx.ejs +0 -192
  101. package/hedhog/frontend/app/dashboard/components/widgets/core.active-users-card.tsx.ejs +0 -58
  102. package/hedhog/frontend/app/dashboard/components/widgets/core.activity-timeline.tsx.ejs +0 -223
  103. package/hedhog/frontend/app/dashboard/components/widgets/core.email-notifications.tsx.ejs +0 -226
  104. package/hedhog/frontend/app/dashboard/components/widgets/core.locale-config.tsx.ejs +0 -168
  105. package/hedhog/frontend/app/dashboard/components/widgets/core.login-history-chart.tsx.ejs +0 -115
  106. package/hedhog/frontend/app/dashboard/components/widgets/core.mail-config.tsx.ejs +0 -199
  107. package/hedhog/frontend/app/dashboard/components/widgets/core.mail-sent-card.tsx.ejs +0 -58
  108. package/hedhog/frontend/app/dashboard/components/widgets/core.mail-sent-chart.tsx.ejs +0 -149
  109. package/hedhog/frontend/app/dashboard/components/widgets/core.menus-card.tsx.ejs +0 -58
  110. package/hedhog/frontend/app/dashboard/components/widgets/core.oauth-config.tsx.ejs +0 -175
  111. package/hedhog/frontend/app/dashboard/components/widgets/core.permissions-card.tsx.ejs +0 -61
  112. package/hedhog/frontend/app/dashboard/components/widgets/core.permissions-chart.tsx.ejs +0 -156
  113. package/hedhog/frontend/app/dashboard/components/widgets/core.profile-card.tsx.ejs +0 -186
  114. package/hedhog/frontend/app/dashboard/components/widgets/core.routes-card.tsx.ejs +0 -58
  115. package/hedhog/frontend/app/dashboard/components/widgets/core.session-activity-chart.tsx.ejs +0 -183
  116. package/hedhog/frontend/app/dashboard/components/widgets/core.sessions-today-card.tsx.ejs +0 -62
  117. package/hedhog/frontend/app/dashboard/components/widgets/core.stat-access-level.tsx.ejs +0 -57
  118. package/hedhog/frontend/app/dashboard/components/widgets/core.stat-actions-today.tsx.ejs +0 -57
  119. package/hedhog/frontend/app/dashboard/components/widgets/core.stat-consecutive-days.tsx.ejs +0 -57
  120. package/hedhog/frontend/app/dashboard/components/widgets/core.stat-online-time.tsx.ejs +0 -57
  121. package/hedhog/frontend/app/dashboard/components/widgets/core.storage-config.tsx.ejs +0 -196
  122. package/hedhog/frontend/app/dashboard/components/widgets/core.theme-config.tsx.ejs +0 -213
  123. package/hedhog/frontend/app/dashboard/components/widgets/core.user-growth-chart.tsx.ejs +0 -210
  124. package/hedhog/frontend/app/dashboard/components/widgets/core.user-roles.tsx.ejs +0 -132
  125. package/hedhog/frontend/app/dashboard/components/widgets/core.user-sessions.tsx.ejs +0 -236
  126. package/hedhog/frontend/app/dashboard/components/widgets/finance.alerts.tsx.ejs +0 -108
  127. package/hedhog/frontend/app/dashboard/components/widgets/finance.cash-balance-kpi.tsx.ejs +0 -66
  128. package/hedhog/frontend/app/dashboard/components/widgets/finance.cash-flow-chart.tsx.ejs +0 -122
  129. package/hedhog/frontend/app/dashboard/components/widgets/finance.default-kpi.tsx.ejs +0 -63
  130. package/hedhog/frontend/app/dashboard/components/widgets/finance.payable-30d-kpi.tsx.ejs +0 -73
  131. package/hedhog/frontend/app/dashboard/components/widgets/finance.receivable-30d-kpi.tsx.ejs +0 -73
  132. package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-payable.tsx.ejs +0 -123
  133. package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-receivable.tsx.ejs +0 -118
@@ -1,3 +1,40 @@
1
+ .dashboard-tabs-list .dashboard-tab-trigger {
2
+ position: relative;
3
+ border: none !important;
4
+ border-bottom: 0 !important;
5
+ box-shadow: none !important;
6
+ border-radius: 8px 8px 0 0 !important;
7
+ transition:
8
+ background-color 160ms ease,
9
+ color 160ms ease,
10
+ box-shadow 160ms ease;
11
+ }
12
+
13
+ .dashboard-tabs-list .dashboard-tab-trigger.dashboard-tab-trigger-inactive {
14
+ background: transparent !important;
15
+ color: hsl(var(--muted-foreground) / 0.6) !important;
16
+ }
17
+
18
+ .dashboard-tabs-list
19
+ .dashboard-tab-trigger.dashboard-tab-trigger-inactive:hover {
20
+ background: hsl(var(--background) / 0.5) !important;
21
+ color: hsl(var(--foreground) / 0.8) !important;
22
+ }
23
+
24
+ .dashboard-tabs-list .dashboard-tab-trigger.dashboard-tab-trigger-active,
25
+ .dashboard-tabs-list
26
+ .dashboard-tab-trigger.dashboard-tab-trigger-active[data-state='active'] {
27
+ z-index: 10;
28
+ background: hsl(var(--background)) !important;
29
+ color: hsl(var(--primary)) !important;
30
+ border: none !important;
31
+ box-shadow: none !important;
32
+ }
33
+
34
+ .dashboard-tabs-list .dashboard-tab-trigger.dashboard-tab-trigger-active svg {
35
+ color: hsl(var(--primary)) !important;
36
+ }
37
+
1
38
  .dashboard-grid.react-grid-layout {
2
39
  position: relative;
3
40
  transition: height 200ms ease;
@@ -16,7 +16,7 @@ export default function Page() {
16
16
  <div className="flex flex-col h-screen px-4">
17
17
  <PageHeader
18
18
  breadcrumbs={[
19
- { label: 'Home', href: '/' },
19
+ { label: t('homeBreadcrumb'), href: '/' },
20
20
  { label: t('description') },
21
21
  ]}
22
22
  title={t('title')}
@@ -278,7 +278,7 @@ export function ComponentsTab() {
278
278
  setOpen(true);
279
279
  } catch (error) {
280
280
  console.error('Erro ao carregar componente:', error);
281
- toast.error('Erro ao carregar componente');
281
+ toast.error(t('loadComponentError'));
282
282
  }
283
283
  };
284
284
 
@@ -323,7 +323,7 @@ export function ComponentsTab() {
323
323
  refetch();
324
324
  } catch (error) {
325
325
  console.error('Erro ao salvar componente:', error);
326
- toast.error('Erro ao salvar componente');
326
+ toast.error(t('saveComponentError'));
327
327
  }
328
328
  };
329
329
 
@@ -345,7 +345,7 @@ export function ComponentsTab() {
345
345
  refetch();
346
346
  } catch (error) {
347
347
  console.error('Erro ao excluir componente:', error);
348
- toast.error('Erro ao excluir componente');
348
+ toast.error(t('deleteComponentError'));
349
349
  } finally {
350
350
  setDeleteDialogOpen(false);
351
351
  setComponentToDelete(null);
@@ -476,7 +476,7 @@ export function ComponentsTab() {
476
476
  <Label htmlFor="slug">{t('slug')}</Label>
477
477
  <Input
478
478
  id="slug"
479
- placeholder="total-users"
479
+ placeholder={t('componentSlugPlaceholder')}
480
480
  value={selectedComponent.slug || ''}
481
481
  onChange={(e) =>
482
482
  setSelectedComponent({
@@ -491,7 +491,7 @@ export function ComponentsTab() {
491
491
  <Label htmlFor="name">{t('name')}</Label>
492
492
  <Input
493
493
  id="name"
494
- placeholder="Total de Usuários"
494
+ placeholder={t('componentNamePlaceholder')}
495
495
  value={
496
496
  selectedComponent.locale?.[selectedLocale]?.name || ''
497
497
  }
@@ -701,7 +701,7 @@ export function ComponentsTab() {
701
701
 
702
702
  <div className="flex items-center gap-2 mb-4">
703
703
  <Input
704
- placeholder={`${t('searchPlaceholder') || 'Buscar'}...`}
704
+ placeholder={t('searchPlaceholder')}
705
705
  value={searchQuery}
706
706
  onChange={(e) => {
707
707
  setSearchQuery(e.target.value);
@@ -231,7 +231,7 @@ export function DashboardsTab() {
231
231
  setOpen(true);
232
232
  } catch (error) {
233
233
  console.error('Erro ao carregar dashboard:', error);
234
- toast.error('Erro ao carregar dashboard');
234
+ toast.error(t('loadDashboardError'));
235
235
  }
236
236
  };
237
237
 
@@ -265,7 +265,7 @@ export function DashboardsTab() {
265
265
  refetch();
266
266
  } catch (error) {
267
267
  console.error('Erro ao salvar dashboard:', error);
268
- toast.error('Erro ao salvar dashboard');
268
+ toast.error(t('saveDashboardError'));
269
269
  }
270
270
  };
271
271
 
@@ -282,11 +282,11 @@ export function DashboardsTab() {
282
282
  url: `/dashboard/${dashboardToDelete}`,
283
283
  method: 'DELETE',
284
284
  });
285
- toast.success(t('dashboardUpdated'));
285
+ toast.success(t('dashboardDeleted'));
286
286
  refetch();
287
287
  } catch (error) {
288
288
  console.error('Erro ao excluir dashboard:', error);
289
- toast.error('Erro ao excluir dashboard');
289
+ toast.error(t('deleteDashboardError'));
290
290
  } finally {
291
291
  setDeleteDialogOpen(false);
292
292
  setDashboardToDelete(null);
@@ -419,7 +419,7 @@ export function DashboardsTab() {
419
419
  <Label htmlFor="slug">{t('slug')}</Label>
420
420
  <Input
421
421
  id="slug"
422
- placeholder="admin-dashboard"
422
+ placeholder={t('dashboardSlugPlaceholder')}
423
423
  value={selectedDashboard.slug || ''}
424
424
  onChange={(e) =>
425
425
  setSelectedDashboard({
@@ -433,7 +433,7 @@ export function DashboardsTab() {
433
433
  <Label htmlFor="name">{t('name')}</Label>
434
434
  <Input
435
435
  id="name"
436
- placeholder="Dashboard Admin"
436
+ placeholder={t('dashboardNamePlaceholder')}
437
437
  value={
438
438
  selectedDashboard.locale?.[selectedLocale]?.name || ''
439
439
  }
@@ -462,7 +462,7 @@ export function DashboardsTab() {
462
462
 
463
463
  <div className="flex items-center gap-2 mb-4">
464
464
  <Input
465
- placeholder={`${t('searchPlaceholder') || 'Buscar'}...`}
465
+ placeholder={t('searchPlaceholder')}
466
466
  value={searchQuery}
467
467
  onChange={(e) => {
468
468
  setSearchQuery(e.target.value);
@@ -476,7 +476,7 @@ export function DashboardsTab() {
476
476
  <Table>
477
477
  <TableHeader>
478
478
  <TableRow>
479
- <TableHead>ID</TableHead>
479
+ <TableHead>{t('id')}</TableHead>
480
480
  <TableHead>{t('slug')}</TableHead>
481
481
  <TableHead>{t('name')}</TableHead>
482
482
  <TableHead>{t('role')}</TableHead>
@@ -207,7 +207,7 @@ export function ItemsTab() {
207
207
  refetch();
208
208
  } catch (error) {
209
209
  console.error('Erro ao adicionar item:', error);
210
- toast.error('Erro ao adicionar item');
210
+ toast.error(t('addItemError'));
211
211
  }
212
212
  };
213
213
 
@@ -228,7 +228,7 @@ export function ItemsTab() {
228
228
  refetch();
229
229
  } catch (error) {
230
230
  console.error('Erro ao excluir item:', error);
231
- toast.error('Erro ao excluir item');
231
+ toast.error(t('deleteItemError'));
232
232
  } finally {
233
233
  setDeleteDialogOpen(false);
234
234
  setItemToDelete(null);
@@ -457,7 +457,7 @@ export function ItemsTab() {
457
457
  <Table>
458
458
  <TableHeader>
459
459
  <TableRow>
460
- <TableHead>ID</TableHead>
460
+ <TableHead>{t('id')}</TableHead>
461
461
  <TableHead>{t('dashboard')}</TableHead>
462
462
  <TableHead>{t('component')}</TableHead>
463
463
  <TableHead className="w-[100px]">{t('actions')}</TableHead>
@@ -1,29 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Dashboard } from '@hed-hog/api-types';
4
- import { useApp, useQuery } from '@hed-hog/next-app-provider';
5
- import { useRouter } from 'next/navigation';
6
- import { useEffect } from 'react';
3
+ import { DashboardHomeTabs } from './dashboard-home-tabs';
7
4
 
8
- export default function DashboardRedirectPage() {
9
- const router = useRouter();
10
- const { request, currentLocaleCode } = useApp();
11
-
12
- const { data: dashboardData, isLoading } = useQuery<Dashboard | null>({
13
- queryKey: ['dashboard-home-redirect', currentLocaleCode],
14
- queryFn: async () => {
15
- const response = await request<Dashboard>({
16
- url: '/dashboard-core/home',
17
- });
18
- return response.data ?? null;
19
- },
20
- });
21
-
22
- useEffect(() => {
23
- if (isLoading) return;
24
-
25
- router.replace(`/core/dashboard/${dashboardData?.slug ?? 'default'}`);
26
- }, [dashboardData?.slug, isLoading, router]);
27
-
28
- return null;
5
+ export default function DashboardPage() {
6
+ return <DashboardHomeTabs />;
29
7
  }
@@ -905,6 +905,11 @@
905
905
  "title": "Select Dashboard Components",
906
906
  "description": "Choose the components you want to display on your dashboard.",
907
907
  "selectedOfTotal": "{selected} selected of {total}",
908
+ "search": "Search",
909
+ "searchPlaceholder": "Type the widget name, slug, or module",
910
+ "module": "Module",
911
+ "moduleFilterLabel": "Filter by module",
912
+ "allModules": "All modules",
908
913
  "noComponentsAvailable": "No components available at the moment.",
909
914
  "dimensions": "Dimensions",
910
915
  "resizable": "Resizable",
@@ -914,6 +919,92 @@
914
919
  "cancel": "Cancel",
915
920
  "add": "Add"
916
921
  },
922
+ "DashboardHomeTabs": {
923
+ "share": "Share",
924
+ "newDashboard": "New dashboard",
925
+ "pageTitle": "Dashboards",
926
+ "pageDescription": "Use compact tabs to switch between dashboards, create new views, and share them with other people who can edit the layout and widgets.",
927
+ "enterDashboardName": "Enter a name for the dashboard.",
928
+ "enterValidLucideIcon": "Enter a valid Lucide icon.",
929
+ "dashboardCreated": "Dashboard created successfully.",
930
+ "createDashboardError": "Could not create the dashboard.",
931
+ "setAsHomeSuccess": "Dashboard set as home.",
932
+ "updateHomeError": "Could not update the home dashboard.",
933
+ "dashboardRenamed": "Dashboard renamed successfully.",
934
+ "renameDashboardError": "Could not rename the dashboard.",
935
+ "dashboardIconUpdated": "Dashboard icon updated successfully.",
936
+ "updateDashboardIconError": "Could not update the dashboard icon.",
937
+ "tabRemoved": "The tab was removed from your home.",
938
+ "removeTabError": "Could not remove the tab.",
939
+ "dashboardShared": "Dashboard shared successfully.",
940
+ "shareDashboardError": "Could not share the dashboard.",
941
+ "shareRemoved": "Sharing removed.",
942
+ "revokeShareError": "Could not remove the sharing.",
943
+ "addWidgets": "Add widgets",
944
+ "setAsHome": "Set as home",
945
+ "rename": "Rename",
946
+ "changeIcon": "Change icon",
947
+ "delete": "Delete",
948
+ "emptyTitle": "No dashboards available.",
949
+ "emptyDescription": "Create the first tab to start organizing your home.",
950
+ "createToStart": "Create a dashboard to get started.",
951
+ "newDashboardTitle": "New dashboard",
952
+ "newDashboardDescription": "Create a new custom tab for your home. The slug will be generated automatically.",
953
+ "dashboardTemplateLabel": "Start from",
954
+ "templateSelectedBadge": "Template",
955
+ "blankDashboardBadge": "Blank",
956
+ "blankDashboardTitle": "Blank dashboard",
957
+ "blankDashboardDescription": "Start with an empty layout and add widgets manually.",
958
+ "templateWidgetCount": "{count} widgets",
959
+ "noTemplatesAvailable": "No templates are available for your roles right now.",
960
+ "dashboardNameLabel": "Dashboard name",
961
+ "dashboardNamePlaceholder": "E.g. Sales, Operations, KPIs",
962
+ "dashboardIconLabel": "Dashboard icon",
963
+ "dashboardIconPlaceholder": "E.g. layout-dashboard, chart-line, wallet",
964
+ "invalidIconName": "The entered name does not match a Lucide icon.",
965
+ "selectIconHint": "When you select an option below, the name will be filled in automatically.",
966
+ "iconSuggestions": "Icon suggestions",
967
+ "createDashboard": "Create dashboard",
968
+ "changeDashboardIconTitle": "Change dashboard icon",
969
+ "changeDashboardIconDescription": "Choose a Lucide option or type the icon name using the site pattern, such as layout-dashboard.",
970
+ "iconNameLabel": "Icon name",
971
+ "iconNamePlaceholder": "E.g. layout-dashboard, briefcase, users",
972
+ "noCustomIcon": "No custom icon",
973
+ "dashboardLabel": "Dashboard",
974
+ "suggestions": "Suggestions",
975
+ "saveIcon": "Save icon",
976
+ "shareDashboardTitle": "Share {name}",
977
+ "shareDashboardDescription": "Sharing only adds people to this dashboard. It does not change their roles or guarantee access to protected widgets.",
978
+ "shareRoleNotice": "Shared users keep their current roles. They can open this dashboard and its widgets only if they already have the required permissions.",
979
+ "searchUser": "Search user",
980
+ "searchUserPlaceholder": "Type a name or email",
981
+ "usersWithAccess": "With access",
982
+ "usersWithAccessDescription": "People currently listed on this dashboard share. Removing them revokes the share immediately.",
983
+ "noSharedUsers": "There are no shared users yet.",
984
+ "you": "You",
985
+ "home": "Home",
986
+ "noPublicEmail": "No public email",
987
+ "roleRequiredBadge": "Needs roles",
988
+ "shareBlockedHint": "This user is shared on the dashboard, but will be blocked when opening it until the required roles are granted.",
989
+ "addPeople": "Add people",
990
+ "addPeopleDescription": "Search users, select one or more, and confirm once. Sharing does not change roles.",
991
+ "loadingUsers": "Loading users...",
992
+ "selectedUsers": "Selected users",
993
+ "selectedUsersHint": "Select one or more users, then confirm once to grant dashboard sharing.",
994
+ "selectedUsersWarning": "{count} selected user(s) still need the required roles to open this dashboard.",
995
+ "sharePageStatus": "Page {page} of {totalPages}",
996
+ "previousPage": "Previous",
997
+ "nextPage": "Next",
998
+ "shareSelectedUsers": "Grant access to {count} user(s)",
999
+ "dashboardSharedSelected": "Dashboard shared with {count} user(s).",
1000
+ "noUsersToShare": "No users found to share.",
1001
+ "add": "Add",
1002
+ "cancel": "Cancel",
1003
+ "removeTabTitle": "Remove this tab from your home?",
1004
+ "removeTabDescription": "The “{name}” tab will be removed only from your list.",
1005
+ "removeTabDescriptionFallback": "This action only removes the tab from your list.",
1006
+ "removeTab": "Remove tab"
1007
+ },
917
1008
  "DashboardMenu": {
918
1009
  "addWidgets": "Add Widgets",
919
1010
  "switchDashboard": "Switch Dashboard",
@@ -1121,6 +1212,23 @@
1121
1212
  "notSet": "Not set"
1122
1213
  }
1123
1214
  },
1215
+ "WidgetRenderer": {
1216
+ "saveWidgetPreview": "Save widget preview",
1217
+ "generatingWidgetScreenshot": "Generating widget screenshot",
1218
+ "generateWidgetScreenshot": "Generate widget screenshot",
1219
+ "generateScreenshotError": "Could not generate the widget screenshot.",
1220
+ "generateAgainToDownload": "Generate the screenshot again to download the image.",
1221
+ "generateAgainToShare": "Generate the screenshot again to share the image.",
1222
+ "shareNotSupported": "Sharing is not supported in this browser.",
1223
+ "shareText": "Widget screenshot {name}",
1224
+ "shareImageError": "Could not share the image.",
1225
+ "screenshotTitle": "Widget screenshot",
1226
+ "screenshotDescription": "Share or download the generated image for this component.",
1227
+ "screenshotAlt": "Widget screenshot {name}",
1228
+ "sharing": "Sharing...",
1229
+ "share": "Share",
1230
+ "downloadImage": "Download image"
1231
+ },
1124
1232
  "HomePage": {
1125
1233
  "buildingYourApplication": "Building Your Application",
1126
1234
  "dataFetching": "Data Fetching"
@@ -1245,7 +1353,7 @@
1245
1353
  "manageDashboards": "Manage system dashboards",
1246
1354
  "selectDashboardRequired": "Select a dashboard",
1247
1355
  "selectComponentRequired": "Select a component",
1248
- "manageComponentsRoles": "Manage access permissions to components",
1356
+ "manageComponentRoles": "Manage access permissions to components",
1249
1357
  "addRole": "Add Permission",
1250
1358
  "selectRole": "Select a permission",
1251
1359
  "selectRoleRequired": "Select a permission",
@@ -1259,7 +1367,21 @@
1259
1367
  "errorDeletingRole": "Error deleting permission",
1260
1368
  "dashboardRolesTab": "Dashboard Permissions",
1261
1369
  "manageDashboardRoles": "Manage access permissions to dashboards",
1262
- "selectDashboardAndRole": "Select the dashboard and permission"
1370
+ "selectDashboardAndRole": "Select the dashboard and permission",
1371
+ "homeBreadcrumb": "Home",
1372
+ "id": "ID",
1373
+ "loadDashboardError": "Error loading dashboard",
1374
+ "saveDashboardError": "Error saving dashboard",
1375
+ "deleteDashboardError": "Error deleting dashboard",
1376
+ "dashboardSlugPlaceholder": "admin-dashboard",
1377
+ "dashboardNamePlaceholder": "Admin Dashboard",
1378
+ "loadComponentError": "Error loading component",
1379
+ "saveComponentError": "Error saving component",
1380
+ "deleteComponentError": "Error deleting component",
1381
+ "componentSlugPlaceholder": "total-users",
1382
+ "componentNamePlaceholder": "Total Users",
1383
+ "addItemError": "Error adding item",
1384
+ "deleteItemError": "Error deleting item"
1263
1385
  },
1264
1386
  "ForbiddenDialog": {
1265
1387
  "title": "Access Denied",
@@ -908,6 +908,11 @@
908
908
  "title": "Selecionar Componentes do Dashboard",
909
909
  "description": "Escolha os componentes que deseja exibir no seu dashboard.",
910
910
  "selectedOfTotal": "{selected} selecionados de {total}",
911
+ "search": "Buscar",
912
+ "searchPlaceholder": "Digite o nome, slug ou módulo do widget",
913
+ "module": "Módulo",
914
+ "moduleFilterLabel": "Filtrar por módulo",
915
+ "allModules": "Todos os módulos",
911
916
  "noComponentsAvailable": "Nenhum componente disponível no momento.",
912
917
  "dimensions": "Dimensões",
913
918
  "resizable": "Redimensionável",
@@ -917,6 +922,92 @@
917
922
  "cancel": "Cancelar",
918
923
  "add": "Adicionar"
919
924
  },
925
+ "DashboardHomeTabs": {
926
+ "share": "Compartilhar",
927
+ "newDashboard": "Novo dashboard",
928
+ "pageTitle": "Dashboards",
929
+ "pageDescription": "Use abas compactas para alternar entre dashboards, criar novas visões e compartilhar com outras pessoas que podem editar layout e widgets.",
930
+ "enterDashboardName": "Informe um nome para o dashboard.",
931
+ "enterValidLucideIcon": "Informe um ícone válido do Lucide.",
932
+ "dashboardCreated": "Dashboard criado com sucesso.",
933
+ "createDashboardError": "Não foi possível criar o dashboard.",
934
+ "setAsHomeSuccess": "Dashboard definido como home.",
935
+ "updateHomeError": "Não foi possível atualizar a home.",
936
+ "dashboardRenamed": "Dashboard renomeado com sucesso.",
937
+ "renameDashboardError": "Não foi possível renomear o dashboard.",
938
+ "dashboardIconUpdated": "Ícone do dashboard atualizado com sucesso.",
939
+ "updateDashboardIconError": "Não foi possível atualizar o ícone do dashboard.",
940
+ "tabRemoved": "A aba foi removida da sua home.",
941
+ "removeTabError": "Não foi possível remover a aba.",
942
+ "dashboardShared": "Dashboard compartilhado com sucesso.",
943
+ "shareDashboardError": "Não foi possível compartilhar o dashboard.",
944
+ "shareRemoved": "Compartilhamento removido.",
945
+ "revokeShareError": "Não foi possível remover o compartilhamento.",
946
+ "addWidgets": "Adicionar widgets",
947
+ "setAsHome": "Definir como home",
948
+ "rename": "Renomear",
949
+ "changeIcon": "Trocar ícone",
950
+ "delete": "Excluir",
951
+ "emptyTitle": "Nenhum dashboard disponível.",
952
+ "emptyDescription": "Crie a primeira aba para começar a organizar sua home.",
953
+ "createToStart": "Crie um dashboard para começar.",
954
+ "newDashboardTitle": "Novo dashboard",
955
+ "newDashboardDescription": "Crie uma nova aba personalizada para sua home. O slug será gerado automaticamente.",
956
+ "dashboardTemplateLabel": "Começar de",
957
+ "templateSelectedBadge": "Template",
958
+ "blankDashboardBadge": "Em branco",
959
+ "blankDashboardTitle": "Dashboard em branco",
960
+ "blankDashboardDescription": "Comece com um layout vazio e adicione os widgets manualmente.",
961
+ "templateWidgetCount": "{count} widgets",
962
+ "noTemplatesAvailable": "Nenhum template está disponível para os seus perfis no momento.",
963
+ "dashboardNameLabel": "Nome do dashboard",
964
+ "dashboardNamePlaceholder": "Ex.: Comercial, Operações, Indicadores",
965
+ "dashboardIconLabel": "Ícone do dashboard",
966
+ "dashboardIconPlaceholder": "Ex.: layout-dashboard, chart-line, wallet",
967
+ "invalidIconName": "O nome informado não corresponde a um ícone do Lucide.",
968
+ "selectIconHint": "Ao selecionar uma opção abaixo, o nome será preenchido automaticamente.",
969
+ "iconSuggestions": "Sugestões de ícones",
970
+ "createDashboard": "Criar dashboard",
971
+ "changeDashboardIconTitle": "Trocar ícone do dashboard",
972
+ "changeDashboardIconDescription": "Escolha uma opção do Lucide ou digite o nome do ícone no padrão do site, como layout-dashboard.",
973
+ "iconNameLabel": "Nome do ícone",
974
+ "iconNamePlaceholder": "Ex.: layout-dashboard, briefcase, users",
975
+ "noCustomIcon": "Sem ícone personalizado",
976
+ "dashboardLabel": "Dashboard",
977
+ "suggestions": "Sugestões",
978
+ "saveIcon": "Salvar ícone",
979
+ "shareDashboardTitle": "Compartilhar {name}",
980
+ "shareDashboardDescription": "O compartilhamento apenas adiciona pessoas a este dashboard. Isso não altera roles nem garante acesso a widgets protegidos.",
981
+ "shareRoleNotice": "Usuários compartilhados mantêm as roles atuais. Eles só conseguem abrir este dashboard e seus widgets se já tiverem as permissões necessárias.",
982
+ "searchUser": "Buscar usuário",
983
+ "searchUserPlaceholder": "Digite um nome ou e-mail",
984
+ "usersWithAccess": "Com acesso",
985
+ "usersWithAccessDescription": "Pessoas atualmente listadas neste compartilhamento. Ao remover, o compartilhamento é revogado imediatamente.",
986
+ "noSharedUsers": "Ainda não há usuários compartilhados.",
987
+ "you": "Você",
988
+ "home": "Home",
989
+ "noPublicEmail": "Sem e-mail público",
990
+ "roleRequiredBadge": "Precisa de roles",
991
+ "shareBlockedHint": "Este usuário continuará compartilhado, mas será bloqueado ao abrir o dashboard até receber as roles necessárias.",
992
+ "addPeople": "Adicionar pessoas",
993
+ "addPeopleDescription": "Busque usuários, selecione um ou mais e confirme uma única vez. Compartilhar não altera roles.",
994
+ "loadingUsers": "Carregando usuários...",
995
+ "selectedUsers": "Usuários selecionados",
996
+ "selectedUsersHint": "Selecione um ou mais usuários e confirme uma única vez para conceder o compartilhamento do dashboard.",
997
+ "selectedUsersWarning": "{count} usuário(s) selecionado(s) ainda precisam das roles necessárias para abrir este dashboard.",
998
+ "sharePageStatus": "Página {page} de {totalPages}",
999
+ "previousPage": "Anterior",
1000
+ "nextPage": "Próxima",
1001
+ "shareSelectedUsers": "Conceder acesso para {count} usuário(s)",
1002
+ "dashboardSharedSelected": "Dashboard compartilhado com {count} usuário(s).",
1003
+ "noUsersToShare": "Nenhum usuário encontrado para compartilhar.",
1004
+ "add": "Adicionar",
1005
+ "cancel": "Cancelar",
1006
+ "removeTabTitle": "Remover aba da sua home?",
1007
+ "removeTabDescription": "A aba “{name}” será removida apenas da sua lista.",
1008
+ "removeTabDescriptionFallback": "Essa ação remove a aba apenas da sua lista.",
1009
+ "removeTab": "Remover aba"
1010
+ },
920
1011
  "DashboardMenu": {
921
1012
  "addWidgets": "Adicionar Widgets",
922
1013
  "switchDashboard": "Trocar Dashboard",
@@ -1126,6 +1217,23 @@
1126
1217
  "notSet": "Não definido"
1127
1218
  }
1128
1219
  },
1220
+ "WidgetRenderer": {
1221
+ "saveWidgetPreview": "Salvar preview do widget",
1222
+ "generatingWidgetScreenshot": "Gerando print do widget",
1223
+ "generateWidgetScreenshot": "Gerar print do widget",
1224
+ "generateScreenshotError": "Não foi possível gerar o print do widget.",
1225
+ "generateAgainToDownload": "Gere o print novamente para baixar a imagem.",
1226
+ "generateAgainToShare": "Gere o print novamente para compartilhar a imagem.",
1227
+ "shareNotSupported": "O compartilhamento não é suportado neste navegador.",
1228
+ "shareText": "Print do widget {name}",
1229
+ "shareImageError": "Não foi possível compartilhar a imagem.",
1230
+ "screenshotTitle": "Print do widget",
1231
+ "screenshotDescription": "Compartilhe ou baixe a imagem gerada deste componente.",
1232
+ "screenshotAlt": "Print do widget {name}",
1233
+ "sharing": "Compartilhando...",
1234
+ "share": "Compartilhar",
1235
+ "downloadImage": "Baixar imagem"
1236
+ },
1129
1237
  "HomePage": {
1130
1238
  "buildingYourApplication": "Construindo Sua Aplicação",
1131
1239
  "dataFetching": "Busca de Dados"
@@ -1264,7 +1372,21 @@
1264
1372
  "errorDeletingRole": "Erro ao excluir permissão",
1265
1373
  "dashboardRolesTab": "Permissões de Dashboard",
1266
1374
  "manageDashboardRoles": "Gerencie as permissões de acesso aos dashboards",
1267
- "selectDashboardAndRole": "Selecione o dashboard e a permissão"
1375
+ "selectDashboardAndRole": "Selecione o dashboard e a permissão",
1376
+ "homeBreadcrumb": "Home",
1377
+ "id": "ID",
1378
+ "loadDashboardError": "Erro ao carregar dashboard",
1379
+ "saveDashboardError": "Erro ao salvar dashboard",
1380
+ "deleteDashboardError": "Erro ao excluir dashboard",
1381
+ "dashboardSlugPlaceholder": "admin-dashboard",
1382
+ "dashboardNamePlaceholder": "Dashboard Admin",
1383
+ "loadComponentError": "Erro ao carregar componente",
1384
+ "saveComponentError": "Erro ao salvar componente",
1385
+ "deleteComponentError": "Erro ao excluir componente",
1386
+ "componentSlugPlaceholder": "total-users",
1387
+ "componentNamePlaceholder": "Total de Usuários",
1388
+ "addItemError": "Erro ao adicionar item",
1389
+ "deleteItemError": "Erro ao excluir item"
1268
1390
  },
1269
1391
  "DashboardComponent": {
1270
1392
  "title": "Componentes do Dashboard",
@@ -23,7 +23,7 @@ import { useEffect, useState } from 'react';
23
23
 
24
24
  import type { AccountSecurityData } from '@/types/widget-data';
25
25
  import { useRouter } from 'next/navigation';
26
- import { WidgetWrapper } from '../widget-wrapper';
26
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
27
27
 
28
28
  const ICON_MAP: Record<string, React.ElementType> = {
29
29
  password: Lock,
@@ -1,8 +1,8 @@
1
1
  import { useWidgetData } from '@/hooks/use-widget-data';
2
2
  import { Users } from 'lucide-react';
3
3
  import { useTranslations } from 'next-intl';
4
- import StatCard from '../stats';
5
- import { WidgetWrapper } from '../widget-wrapper';
4
+ import StatCard from '@/app/(app)/(libraries)/core/dashboard/components/stats';
5
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
6
6
 
7
7
  interface ActiveUsersProps {
8
8
  widget?: any;
@@ -21,7 +21,7 @@ import {
21
21
  UserCheck,
22
22
  } from 'lucide-react';
23
23
  import { useTranslations } from 'next-intl';
24
- import { WidgetWrapper } from '../widget-wrapper';
24
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
25
25
 
26
26
  const typeIconMap: Record<string, React.ElementType> = {
27
27
  login: LogIn,
@@ -20,7 +20,7 @@ import type {
20
20
  import { Mail, MailCheck, MailWarning, MailX } from 'lucide-react';
21
21
  import { useTranslations } from 'next-intl';
22
22
  import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from 'recharts';
23
- import { WidgetWrapper } from '../widget-wrapper';
23
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
24
24
 
25
25
  const defaultEmailNotificationsData: EmailNotificationsData = {
26
26
  cards: {
@@ -15,7 +15,7 @@ import type {
15
15
  } from '@/types/widget-data';
16
16
  import { Calendar, Clock, Globe, Languages } from 'lucide-react';
17
17
  import { useTranslations } from 'next-intl';
18
- import { WidgetWrapper } from '../widget-wrapper';
18
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
19
19
 
20
20
  const defaultLocaleConfigData: LocaleConfigWidgetData = {
21
21
  status: {
@@ -17,7 +17,7 @@ import type { AllWidgetsData, LoginDay } from '@/types/widget-data';
17
17
  import { LogIn } from 'lucide-react';
18
18
  import { useTranslations } from 'next-intl';
19
19
  import { Bar, BarChart, CartesianGrid, XAxis, YAxis } from 'recharts';
20
- import { WidgetWrapper } from '../widget-wrapper';
20
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
21
21
 
22
22
  function LoginChart({ data }: { data: LoginDay[] }) {
23
23
  const t = useTranslations('core.DashboardPage.loginHistory');
@@ -15,7 +15,7 @@ import type {
15
15
  } from '@/types/widget-data';
16
16
  import { CheckCircle2, Mail, Send, Server } from 'lucide-react';
17
17
  import { useTranslations } from 'next-intl';
18
- import { WidgetWrapper } from '../widget-wrapper';
18
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
19
19
 
20
20
  const defaultMailConfigData: MailConfigWidgetData = {
21
21
  status: {
@@ -1,8 +1,8 @@
1
1
  import { useWidgetData } from '@/hooks/use-widget-data';
2
2
  import { Mail } from 'lucide-react';
3
3
  import { useTranslations } from 'next-intl';
4
- import StatCard from '../stats';
5
- import { WidgetWrapper } from '../widget-wrapper';
4
+ import StatCard from '@/app/(app)/(libraries)/core/dashboard/components/stats';
5
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
6
6
 
7
7
  interface MailSentProps {
8
8
  widget?: any;
@@ -19,7 +19,7 @@ import {
19
19
  XAxis,
20
20
  YAxis,
21
21
  } from 'recharts';
22
- import { WidgetWrapper } from '../widget-wrapper';
22
+ import { WidgetWrapper } from '@/app/(app)/(libraries)/core/dashboard/components';
23
23
 
24
24
  function CustomTooltip({
25
25
  active,