@hed-hog/core 0.0.292 → 0.0.294

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.
@@ -1,223 +1,223 @@
1
- - component_id:
2
- where:
3
- slug: active-users-card
4
- role_id:
5
- where:
6
- slug: admin-access
7
- - component_id:
8
- where:
9
- slug: mail-sent-card
10
- role_id:
11
- where:
12
- slug: admin-access
13
- - component_id:
14
- where:
15
- slug: mail-sent-chart
16
- role_id:
17
- where:
18
- slug: admin-access
19
- - component_id:
20
- where:
21
- slug: permissions-card
22
- role_id:
23
- where:
24
- slug: admin-access
25
- - component_id:
26
- where:
27
- slug: permissions-chart
28
- role_id:
29
- where:
30
- slug: admin-access
31
- - component_id:
32
- where:
33
- slug: session-activity-chart
34
- role_id:
35
- where:
36
- slug: admin-access
37
- - component_id:
38
- where:
39
- slug: sessions-today-card
40
- role_id:
41
- where:
42
- slug: admin-access
43
- - component_id:
44
- where:
45
- slug: menus-card
46
- role_id:
47
- where:
48
- slug: admin-access
49
- - component_id:
50
- where:
51
- slug: routes-card
52
- role_id:
53
- where:
54
- slug: admin-access
55
- - component_id:
56
- where:
57
- slug: user-growth-chart
58
- role_id:
59
- where:
60
- slug: admin-access
61
- - component_id:
62
- where:
63
- slug: account-security
64
- role_id:
65
- where:
66
- slug: user
67
- - component_id:
68
- where:
69
- slug: account-security
70
- role_id:
71
- where:
72
- slug: admin-access
73
- - component_id:
74
- where:
75
- slug: activity-timeline
76
- role_id:
77
- where:
78
- slug: user
79
- - component_id:
80
- where:
81
- slug: activity-timeline
82
- role_id:
83
- where:
84
- slug: admin-access
85
- - component_id:
86
- where:
87
- slug: email-notifications
88
- role_id:
89
- where:
90
- slug: user
91
- - component_id:
92
- where:
93
- slug: email-notifications
94
- role_id:
95
- where:
96
- slug: admin-access
97
- - component_id:
98
- where:
99
- slug: login-history-chart
100
- role_id:
101
- where:
102
- slug: user
103
- - component_id:
104
- where:
105
- slug: login-history-chart
106
- role_id:
107
- where:
108
- slug: admin-access
109
- - component_id:
110
- where:
111
- slug: profile-card
112
- role_id:
113
- where:
114
- slug: user
115
- - component_id:
116
- where:
117
- slug: profile-card
118
- role_id:
119
- where:
120
- slug: admin-access
121
- - component_id:
122
- where:
123
- slug: stat-online-time
124
- role_id:
125
- where:
126
- slug: user
127
- - component_id:
128
- where:
129
- slug: stat-online-time
130
- role_id:
131
- where:
132
- slug: admin-access
133
- - component_id:
134
- where:
135
- slug: stat-actions-today
136
- role_id:
137
- where:
138
- slug: user
139
- - component_id:
140
- where:
141
- slug: stat-actions-today
142
- role_id:
143
- where:
144
- slug: admin-access
145
- - component_id:
146
- where:
147
- slug: stat-consecutive-days
148
- role_id:
149
- where:
150
- slug: user
151
- - component_id:
152
- where:
153
- slug: stat-consecutive-days
154
- role_id:
155
- where:
156
- slug: admin-access
157
- - component_id:
158
- where:
159
- slug: stat-access-level
160
- role_id:
161
- where:
162
- slug: user
163
- - component_id:
164
- where:
165
- slug: stat-access-level
166
- role_id:
167
- where:
168
- slug: admin-access
169
- - component_id:
170
- where:
171
- slug: user-roles
172
- role_id:
173
- where:
174
- slug: user
175
- - component_id:
176
- where:
177
- slug: user-roles
178
- role_id:
179
- where:
180
- slug: admin-access
181
- - component_id:
182
- where:
183
- slug: user-sessions
184
- role_id:
185
- where:
186
- slug: user
187
- - component_id:
188
- where:
189
- slug: user-sessions
190
- role_id:
191
- where:
192
- slug: admin-access
193
-
194
- - component_id:
195
- where:
196
- slug: mail-config
197
- role_id:
198
- where:
199
- slug: admin
200
- - component_id:
201
- where:
202
- slug: locale-config
203
- role_id:
204
- where:
205
- slug: admin
206
- - component_id:
207
- where:
208
- slug: oauth-config
209
- role_id:
210
- where:
211
- slug: admin
212
- - component_id:
213
- where:
214
- slug: storage-config
215
- role_id:
216
- where:
217
- slug: admin
218
- - component_id:
219
- where:
220
- slug: theme-config
221
- role_id:
222
- where:
223
- slug: admin
1
+ - component_id:
2
+ where:
3
+ slug: active-users-card
4
+ role_id:
5
+ where:
6
+ slug: admin-access
7
+ - component_id:
8
+ where:
9
+ slug: mail-sent-card
10
+ role_id:
11
+ where:
12
+ slug: admin-access
13
+ - component_id:
14
+ where:
15
+ slug: mail-sent-chart
16
+ role_id:
17
+ where:
18
+ slug: admin-access
19
+ - component_id:
20
+ where:
21
+ slug: permissions-card
22
+ role_id:
23
+ where:
24
+ slug: admin-access
25
+ - component_id:
26
+ where:
27
+ slug: permissions-chart
28
+ role_id:
29
+ where:
30
+ slug: admin-access
31
+ - component_id:
32
+ where:
33
+ slug: session-activity-chart
34
+ role_id:
35
+ where:
36
+ slug: admin-access
37
+ - component_id:
38
+ where:
39
+ slug: sessions-today-card
40
+ role_id:
41
+ where:
42
+ slug: admin-access
43
+ - component_id:
44
+ where:
45
+ slug: menus-card
46
+ role_id:
47
+ where:
48
+ slug: admin-access
49
+ - component_id:
50
+ where:
51
+ slug: routes-card
52
+ role_id:
53
+ where:
54
+ slug: admin-access
55
+ - component_id:
56
+ where:
57
+ slug: user-growth-chart
58
+ role_id:
59
+ where:
60
+ slug: admin-access
61
+ - component_id:
62
+ where:
63
+ slug: account-security
64
+ role_id:
65
+ where:
66
+ slug: user
67
+ - component_id:
68
+ where:
69
+ slug: account-security
70
+ role_id:
71
+ where:
72
+ slug: admin-access
73
+ - component_id:
74
+ where:
75
+ slug: activity-timeline
76
+ role_id:
77
+ where:
78
+ slug: user
79
+ - component_id:
80
+ where:
81
+ slug: activity-timeline
82
+ role_id:
83
+ where:
84
+ slug: admin-access
85
+ - component_id:
86
+ where:
87
+ slug: email-notifications
88
+ role_id:
89
+ where:
90
+ slug: user
91
+ - component_id:
92
+ where:
93
+ slug: email-notifications
94
+ role_id:
95
+ where:
96
+ slug: admin-access
97
+ - component_id:
98
+ where:
99
+ slug: login-history-chart
100
+ role_id:
101
+ where:
102
+ slug: user
103
+ - component_id:
104
+ where:
105
+ slug: login-history-chart
106
+ role_id:
107
+ where:
108
+ slug: admin-access
109
+ - component_id:
110
+ where:
111
+ slug: profile-card
112
+ role_id:
113
+ where:
114
+ slug: user
115
+ - component_id:
116
+ where:
117
+ slug: profile-card
118
+ role_id:
119
+ where:
120
+ slug: admin-access
121
+ - component_id:
122
+ where:
123
+ slug: stat-online-time
124
+ role_id:
125
+ where:
126
+ slug: user
127
+ - component_id:
128
+ where:
129
+ slug: stat-online-time
130
+ role_id:
131
+ where:
132
+ slug: admin-access
133
+ - component_id:
134
+ where:
135
+ slug: stat-actions-today
136
+ role_id:
137
+ where:
138
+ slug: user
139
+ - component_id:
140
+ where:
141
+ slug: stat-actions-today
142
+ role_id:
143
+ where:
144
+ slug: admin-access
145
+ - component_id:
146
+ where:
147
+ slug: stat-consecutive-days
148
+ role_id:
149
+ where:
150
+ slug: user
151
+ - component_id:
152
+ where:
153
+ slug: stat-consecutive-days
154
+ role_id:
155
+ where:
156
+ slug: admin-access
157
+ - component_id:
158
+ where:
159
+ slug: stat-access-level
160
+ role_id:
161
+ where:
162
+ slug: user
163
+ - component_id:
164
+ where:
165
+ slug: stat-access-level
166
+ role_id:
167
+ where:
168
+ slug: admin-access
169
+ - component_id:
170
+ where:
171
+ slug: user-roles
172
+ role_id:
173
+ where:
174
+ slug: user
175
+ - component_id:
176
+ where:
177
+ slug: user-roles
178
+ role_id:
179
+ where:
180
+ slug: admin-access
181
+ - component_id:
182
+ where:
183
+ slug: user-sessions
184
+ role_id:
185
+ where:
186
+ slug: user
187
+ - component_id:
188
+ where:
189
+ slug: user-sessions
190
+ role_id:
191
+ where:
192
+ slug: admin-access
193
+
194
+ - component_id:
195
+ where:
196
+ slug: mail-config
197
+ role_id:
198
+ where:
199
+ slug: admin
200
+ - component_id:
201
+ where:
202
+ slug: locale-config
203
+ role_id:
204
+ where:
205
+ slug: admin
206
+ - component_id:
207
+ where:
208
+ slug: oauth-config
209
+ role_id:
210
+ where:
211
+ slug: admin
212
+ - component_id:
213
+ where:
214
+ slug: storage-config
215
+ role_id:
216
+ where:
217
+ slug: admin
218
+ - component_id:
219
+ where:
220
+ slug: theme-config
221
+ role_id:
222
+ where:
223
+ slug: admin
@@ -4,21 +4,21 @@
4
4
  role_id:
5
5
  where:
6
6
  slug: admin-access
7
- - dashboard_id:
8
- where:
9
- slug: user
10
- role_id:
11
- where:
12
- slug: user
13
- - dashboard_id:
14
- where:
15
- slug: user
16
- role_id:
17
- where:
18
- slug: admin-access
19
- - dashboard_id:
20
- where:
21
- slug: config
22
- role_id:
23
- where:
24
- slug: admin
7
+ - dashboard_id:
8
+ where:
9
+ slug: user
10
+ role_id:
11
+ where:
12
+ slug: user
13
+ - dashboard_id:
14
+ where:
15
+ slug: user
16
+ role_id:
17
+ where:
18
+ slug: admin-access
19
+ - dashboard_id:
20
+ where:
21
+ slug: config
22
+ role_id:
23
+ where:
24
+ slug: admin
@@ -119,8 +119,6 @@ export const DashboardContent = ({ dashboardSlug }: DashboardContentProps) => {
119
119
  static: false,
120
120
  }));
121
121
 
122
- console.log('📊 Layout recebido do backend:', gridLayout);
123
-
124
122
  setLayout(gridLayout);
125
123
  setWidgets(userLayout);
126
124
  } else {
@@ -37,24 +37,24 @@ function CustomTooltip({
37
37
  );
38
38
  }
39
39
 
40
- interface PermissionsChartProps {
41
- widget?: {
42
- name?: string;
43
- } | null;
44
- onRemove?: () => void;
45
- }
46
-
47
- interface PermissionDistributionItem {
48
- name: string;
49
- value: number;
50
- color: string;
51
- }
52
-
53
- interface UserStatsData {
54
- charts?: {
55
- permissionDistribution?: PermissionDistributionItem[];
56
- };
57
- }
40
+ interface PermissionsChartProps {
41
+ widget?: {
42
+ name?: string;
43
+ } | null;
44
+ onRemove?: () => void;
45
+ }
46
+
47
+ interface PermissionDistributionItem {
48
+ name: string;
49
+ value: number;
50
+ color: string;
51
+ }
52
+
53
+ interface UserStatsData {
54
+ charts?: {
55
+ permissionDistribution?: PermissionDistributionItem[];
56
+ };
57
+ }
58
58
 
59
59
  export default function PermissionsChart({
60
60
  widget,
@@ -70,10 +70,10 @@ export default function PermissionsChart({
70
70
  } = useWidgetData<UserStatsData>({
71
71
  endpoint: '/dashboard-core/stats/overview/users',
72
72
  queryKey: 'dashboard-stats-users',
73
- });
74
-
75
- const data = statsData?.charts?.permissionDistribution || [];
76
- const total = data.reduce((sum, item) => sum + item.value, 0);
73
+ });
74
+
75
+ const data = statsData?.charts?.permissionDistribution || [];
76
+ const total = data.reduce((sum, item) => sum + item.value, 0);
77
77
 
78
78
  return (
79
79
  <WidgetWrapper
@@ -90,19 +90,19 @@ export default function PermissionsChart({
90
90
  >
91
91
  <IconGripVertical className="text-muted-foreground/50 size-4 shrink-0" />
92
92
  </div>
93
- <CardHeader className="pb-2 pt-4 pl-10">
94
- <CardTitle className="text-base font-semibold">
95
- {t('permissionsDistributionTitle')}
96
- </CardTitle>
93
+ <CardHeader className="pb-2 pt-4 pl-10">
94
+ <CardTitle className="text-base font-semibold">
95
+ {t('permissionsDistributionTitle')}
96
+ </CardTitle>
97
97
  <CardDescription>
98
98
  {t('permissionsDistributionDescription')}
99
99
  </CardDescription>
100
- </CardHeader>
101
- <CardContent className="flex-1 pt-0">
102
- <div className="flex h-full items-center justify-between gap-4 overflow-hidden">
103
- <div className="relative h-[280px] w-[280px] shrink-0">
104
- <ResponsiveContainer width="100%" height="100%">
105
- <PieChart>
100
+ </CardHeader>
101
+ <CardContent className="flex-1 pt-0">
102
+ <div className="flex h-full items-center justify-between gap-4 overflow-hidden">
103
+ <div className="relative h-[280px] w-[280px] shrink-0">
104
+ <ResponsiveContainer width="100%" height="100%">
105
+ <PieChart>
106
106
  <Pie
107
107
  data={data}
108
108
  cx="50%"
@@ -110,14 +110,14 @@ export default function PermissionsChart({
110
110
  innerRadius={70}
111
111
  outerRadius={110}
112
112
  paddingAngle={4}
113
- dataKey="value"
114
- animationDuration={1200}
115
- strokeWidth={0}
116
- >
117
- {data.map((entry, index: number) => (
118
- <Cell key={`cell-${index}`} fill={entry.color} />
119
- ))}
120
- </Pie>
113
+ dataKey="value"
114
+ animationDuration={1200}
115
+ strokeWidth={0}
116
+ >
117
+ {data.map((entry, index: number) => (
118
+ <Cell key={`cell-${index}`} fill={entry.color} />
119
+ ))}
120
+ </Pie>
121
121
  <Tooltip content={<CustomTooltip />} />
122
122
  </PieChart>
123
123
  </ResponsiveContainer>
@@ -125,28 +125,28 @@ export default function PermissionsChart({
125
125
  <span className="text-2xl font-bold text-foreground">
126
126
  {total}
127
127
  </span>
128
- <span className="text-[10px] text-muted-foreground">
129
- {t('total')}
130
- </span>
131
- </div>
132
- </div>
133
- <div className="grid max-h-[280px] min-w-0 flex-1 grid-cols-2 content-start gap-x-4 gap-y-2 overflow-y-auto pr-2">
134
- {data.map((item) => (
135
- <div key={item.name} className="flex min-w-0 items-start gap-2.5">
136
- <div
137
- className="mt-1 h-2.5 w-2.5 shrink-0 rounded-sm"
138
- style={{ backgroundColor: item.color }}
139
- />
140
- <div className="flex min-w-0 flex-col">
141
- <span className="break-words text-xs font-medium leading-tight text-foreground">
142
- {item.name}
143
- </span>
144
- <span className="text-[11px] text-muted-foreground">
145
- {item.value} ({total ? Math.round((item.value / total) * 100) : 0}%)
146
- </span>
147
- </div>
148
- </div>
149
- ))}
128
+ <span className="text-[10px] text-muted-foreground">
129
+ {t('total')}
130
+ </span>
131
+ </div>
132
+ </div>
133
+ <div className="grid max-h-[280px] min-w-0 flex-1 grid-cols-2 content-start gap-x-4 gap-y-2 overflow-y-auto pr-2">
134
+ {data.map((item) => (
135
+ <div key={item.name} className="flex min-w-0 items-start gap-2.5">
136
+ <div
137
+ className="mt-1 h-2.5 w-2.5 shrink-0 rounded-sm"
138
+ style={{ backgroundColor: item.color }}
139
+ />
140
+ <div className="flex min-w-0 flex-col">
141
+ <span className="break-words text-xs font-medium leading-tight text-foreground">
142
+ {item.name}
143
+ </span>
144
+ <span className="text-[11px] text-muted-foreground">
145
+ {item.value} ({total ? Math.round((item.value / total) * 100) : 0}%)
146
+ </span>
147
+ </div>
148
+ </div>
149
+ ))}
150
150
  </div>
151
151
  </div>
152
152
  </CardContent>