@dashadmin/dash-admin 1.3.51 → 1.3.53

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 (55) hide show
  1. package/dist/components/avatar/Avatar.js +10 -1
  2. package/dist/components/currency/Format.js +3 -1
  3. package/dist/components/i18n/BridgedLocalesMenuButton.js +4 -2
  4. package/dist/components/misc/NoResults.js +3 -1
  5. package/dist/components/permission/PermissionsSelector.js +34 -14
  6. package/dist/components/permission/PermissionsSelectorList.js +11 -1
  7. package/dist/components/selects/RASearchableSelect.js +8 -6
  8. package/dist/components/selects/RASearchableSelectChips.js +8 -6
  9. package/dist/components/selects/SearchableSelect.js +8 -6
  10. package/dist/components/subscription/PlanAddonsSettings.js +88 -17
  11. package/dist/components/subscription/PlanAuditLog.js +41 -21
  12. package/dist/components/subscription/PlanFeaturesSettings.js +35 -6
  13. package/dist/components/subscription/PlanMetadataSettings.js +78 -42
  14. package/dist/components/subscription/PlanPricesSettings.js +20 -8
  15. package/dist/components/tenant/TenantSelector.js +8 -6
  16. package/dist/components/user/UserPreferences.js +77 -22
  17. package/dist/pages/DASHLightWeightLogin.js +7 -5
  18. package/dist/pages/Profile.js +5 -3
  19. package/dist/pages/RecoverPassword.js +28 -14
  20. package/dist/schemas/subscription/components/SubscriptionPaymentHistory.js +14 -2
  21. package/dist/schemas/subscription/components/SubscriptionPlanFeatures.js +37 -25
  22. package/dist/schemas/subscription/components/SubscriptionPlanPreview.js +47 -28
  23. package/dist/schemas/subscription/components/SubscriptionPlanStats.js +127 -37
  24. package/package.json +5 -5
  25. package/src/components/avatar/Avatar.tsx +8 -4
  26. package/src/components/currency/Format.tsx +8 -6
  27. package/src/components/i18n/BridgedLocalesMenuButton.tsx +4 -2
  28. package/src/components/misc/DASHGlobalErrorHandler.tsx +1 -1
  29. package/src/components/misc/NoResults.tsx +7 -4
  30. package/src/components/permission/AvailablePermissionsContext.tsx +1 -1
  31. package/src/components/permission/PermissionsSelector.tsx +48 -33
  32. package/src/components/permission/PermissionsSelectorList.tsx +7 -2
  33. package/src/components/selects/RASearchableSelect.tsx +22 -19
  34. package/src/components/selects/RASearchableSelectChips.tsx +23 -19
  35. package/src/components/selects/SearchableSelect.tsx +22 -18
  36. package/src/components/subscription/PlanAddonsSettings.tsx +61 -20
  37. package/src/components/subscription/PlanAuditLog.tsx +22 -8
  38. package/src/components/subscription/PlanFeaturesSettings.tsx +28 -8
  39. package/src/components/subscription/PlanMetadataSettings.tsx +29 -7
  40. package/src/components/subscription/PlanPricesSettings.tsx +30 -18
  41. package/src/components/tenant/TenantAttributesContext.tsx +1 -1
  42. package/src/components/tenant/TenantSelector.tsx +20 -17
  43. package/src/components/tenant/TenantSettingsContext.tsx +1 -1
  44. package/src/components/user/UserPreferences.tsx +56 -21
  45. package/src/contexts/SystemRequestsCache.tsx +1 -1
  46. package/src/default-theme/menu/AppMenuComponents/expanded/CollapsableSidebarMenu.tsx +3 -3
  47. package/src/default-theme/menu/SidebarActions.tsx +6 -6
  48. package/src/pages/DASHLightWeightLogin.tsx +8 -7
  49. package/src/pages/Profile.tsx +10 -9
  50. package/src/pages/RecoverPassword.tsx +15 -6
  51. package/src/schemas/subscription/components/SubscriptionPaymentHistory.tsx +9 -2
  52. package/src/schemas/subscription/components/SubscriptionPlanFeatures.tsx +10 -3
  53. package/src/schemas/subscription/components/SubscriptionPlanPreview.tsx +25 -12
  54. package/src/schemas/subscription/components/SubscriptionPlanStats.tsx +64 -14
  55. package/src/theme/AppSidebarLogo.tsx +7 -7
@@ -24,31 +24,46 @@ const SubscriptionPlanPreview = ({ method, attribute, resourceConfig }) => {
24
24
  const getBillingCycleText = (cycle) => {
25
25
  return cycle === "monthly" ? "mes" : "a\xF1o";
26
26
  };
27
- return /* @__PURE__ */ jsx(Box, { maxWidth: 400, children: /* @__PURE__ */ jsx(Card, { elevation: 3, children: /* @__PURE__ */ jsxs(CardContent, { children: [
28
- /* @__PURE__ */ jsxs(Box, { textAlign: "center", mb: 2, children: [
29
- /* @__PURE__ */ jsx(Typography, { variant: "h5", component: "h2", gutterBottom: true, children: record.name }),
30
- record.has_trial && /* @__PURE__ */ jsx(
31
- Chip,
32
- {
33
- icon: /* @__PURE__ */ jsx(StarIcon, {}),
34
- label: `${record.trial_days} d\xEDas gratis`,
35
- color: "primary",
36
- size: "small",
37
- sx: { mb: 1 }
38
- }
39
- ),
40
- /* @__PURE__ */ jsx(Typography, { variant: "h3", component: "div", color: "primary", children: formatPrice(record.price) }),
41
- /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", children: [
42
- "por ",
43
- getBillingCycleText(record.billing_cycle)
44
- ] }),
45
- record.billing_cycle === "yearly" && /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "success.main", children: [
46
- formatPrice(record.price_per_month),
47
- " por mes"
48
- ] })
49
- ] }),
27
+ return /* @__PURE__ */ jsx(Box, { sx: {
28
+ maxWidth: 400
29
+ }, children: /* @__PURE__ */ jsx(Card, { elevation: 3, children: /* @__PURE__ */ jsxs(CardContent, { children: [
30
+ /* @__PURE__ */ jsxs(
31
+ Box,
32
+ {
33
+ sx: {
34
+ textAlign: "center",
35
+ mb: 2
36
+ },
37
+ children: [
38
+ /* @__PURE__ */ jsx(Typography, { variant: "h5", component: "h2", gutterBottom: true, children: record.name }),
39
+ record.has_trial && /* @__PURE__ */ jsx(
40
+ Chip,
41
+ {
42
+ icon: /* @__PURE__ */ jsx(StarIcon, {}),
43
+ label: `${record.trial_days} d\xEDas gratis`,
44
+ color: "primary",
45
+ size: "small",
46
+ sx: { mb: 1 }
47
+ }
48
+ ),
49
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", component: "div", color: "primary", children: formatPrice(record.price) }),
50
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", children: [
51
+ "por ",
52
+ getBillingCycleText(record.billing_cycle)
53
+ ] }),
54
+ record.billing_cycle === "yearly" && /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: {
55
+ color: "success.main"
56
+ }, children: [
57
+ formatPrice(record.price_per_month),
58
+ " por mes"
59
+ ] })
60
+ ]
61
+ }
62
+ ),
50
63
  /* @__PURE__ */ jsx(Divider, { sx: { my: 2 } }),
51
- record.description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", paragraph: true, children: record.description }),
64
+ record.description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", sx: {
65
+ marginBottom: "16px"
66
+ }, children: record.description }),
52
67
  record.features && record.features.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
53
68
  /* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Caracter\xEDsticas incluidas:" }),
54
69
  /* @__PURE__ */ jsx(List, { dense: true, children: record.features.map((feature, index) => /* @__PURE__ */ jsxs(ListItem, { disableGutters: true, children: [
@@ -57,7 +72,9 @@ const SubscriptionPlanPreview = ({ method, attribute, resourceConfig }) => {
57
72
  ListItemText,
58
73
  {
59
74
  primary: feature,
60
- primaryTypographyProps: { variant: "body2" }
75
+ slotProps: {
76
+ primary: { variant: "body2" }
77
+ }
61
78
  }
62
79
  )
63
80
  ] }, index)) })
@@ -78,9 +95,11 @@ const SubscriptionPlanPreview = ({ method, attribute, resourceConfig }) => {
78
95
  {
79
96
  variant: "caption",
80
97
  color: "error",
81
- display: "block",
82
- textAlign: "center",
83
- mt: 1,
98
+ sx: {
99
+ display: "block",
100
+ textAlign: "center",
101
+ mt: 1
102
+ },
84
103
  children: "Plan no disponible"
85
104
  }
86
105
  )
@@ -71,7 +71,17 @@ const StatsView = ({ method, attribute, resourceConfig }) => {
71
71
  return priceFormatter(amount, "CLP");
72
72
  };
73
73
  if (loading) {
74
- return /* @__PURE__ */ jsx(Box, { display: "flex", justifyContent: "center", p: 4, children: /* @__PURE__ */ jsx(CircularProgress, {}) });
74
+ return /* @__PURE__ */ jsx(
75
+ Box,
76
+ {
77
+ sx: {
78
+ display: "flex",
79
+ justifyContent: "center",
80
+ p: 4
81
+ },
82
+ children: /* @__PURE__ */ jsx(CircularProgress, {})
83
+ }
84
+ );
75
85
  }
76
86
  if (!stats) {
77
87
  return /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "error", children: "Error al cargar las estad\xEDsticas" });
@@ -80,60 +90,140 @@ const StatsView = ({ method, attribute, resourceConfig }) => {
80
90
  /* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Estad\xEDsticas del Plan" }),
81
91
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
82
92
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
83
- /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 1, children: [
84
- /* @__PURE__ */ jsx(PeopleIcon, { color: "primary", sx: { mr: 1 } }),
85
- /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: stats.total_subscriptions })
86
- ] }),
93
+ /* @__PURE__ */ jsxs(
94
+ Box,
95
+ {
96
+ sx: {
97
+ display: "flex",
98
+ alignItems: "center",
99
+ mb: 1
100
+ },
101
+ children: [
102
+ /* @__PURE__ */ jsx(PeopleIcon, { color: "primary", sx: { mr: 1 } }),
103
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: stats.total_subscriptions })
104
+ ]
105
+ }
106
+ ),
87
107
  /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Total Suscripciones" })
88
108
  ] }) }) }),
89
109
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
90
- /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 1, children: [
91
- /* @__PURE__ */ jsx(TrendingUpIcon, { color: "success", sx: { mr: 1 } }),
92
- /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "success.main", children: stats.active_subscriptions })
93
- ] }),
110
+ /* @__PURE__ */ jsxs(
111
+ Box,
112
+ {
113
+ sx: {
114
+ display: "flex",
115
+ alignItems: "center",
116
+ mb: 1
117
+ },
118
+ children: [
119
+ /* @__PURE__ */ jsx(TrendingUpIcon, { color: "success", sx: { mr: 1 } }),
120
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
121
+ color: "success.main"
122
+ }, children: stats.active_subscriptions })
123
+ ]
124
+ }
125
+ ),
94
126
  /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Suscripciones Activas" })
95
127
  ] }) }) }),
96
128
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
97
- /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 1, children: [
98
- /* @__PURE__ */ jsx(TimelineIcon, { color: "info", sx: { mr: 1 } }),
99
- /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "info.main", children: stats.trial_subscriptions })
100
- ] }),
129
+ /* @__PURE__ */ jsxs(
130
+ Box,
131
+ {
132
+ sx: {
133
+ display: "flex",
134
+ alignItems: "center",
135
+ mb: 1
136
+ },
137
+ children: [
138
+ /* @__PURE__ */ jsx(TimelineIcon, { color: "info", sx: { mr: 1 } }),
139
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
140
+ color: "info.main"
141
+ }, children: stats.trial_subscriptions })
142
+ ]
143
+ }
144
+ ),
101
145
  /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "En Per\xEDodo de Prueba" })
102
146
  ] }) }) }),
103
147
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
104
- /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", mb: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "error.main", children: stats.cancelled_subscriptions }) }),
148
+ /* @__PURE__ */ jsx(
149
+ Box,
150
+ {
151
+ sx: {
152
+ display: "flex",
153
+ alignItems: "center",
154
+ mb: 1
155
+ },
156
+ children: /* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
157
+ color: "error.main"
158
+ }, children: stats.cancelled_subscriptions })
159
+ }
160
+ ),
105
161
  /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Canceladas" })
106
162
  ] }) }) }),
107
163
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
108
- /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 1, children: [
109
- /* @__PURE__ */ jsx(MoneyIcon, { color: "success", sx: { mr: 1 } }),
110
- /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "success.main", children: formatCurrency(stats.total_revenue) })
111
- ] }),
164
+ /* @__PURE__ */ jsxs(
165
+ Box,
166
+ {
167
+ sx: {
168
+ display: "flex",
169
+ alignItems: "center",
170
+ mb: 1
171
+ },
172
+ children: [
173
+ /* @__PURE__ */ jsx(MoneyIcon, { color: "success", sx: { mr: 1 } }),
174
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
175
+ color: "success.main"
176
+ }, children: formatCurrency(stats.total_revenue) })
177
+ ]
178
+ }
179
+ ),
112
180
  /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Ingresos Totales" })
113
181
  ] }) }) }),
114
182
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
115
- /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", mb: 1, children: [
116
- /* @__PURE__ */ jsx(MoneyIcon, { color: "primary", sx: { mr: 1 } }),
117
- /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: formatCurrency(stats.monthly_revenue) })
118
- ] }),
119
- /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Ingresos Mensuales" })
120
- ] }) }) }),
121
- /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: 12, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
122
- /* @__PURE__ */ jsxs(Box, { children: [
123
- /* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Tasa de Conversi\xF3n" }),
124
- /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "De prueba a suscripci\xF3n pagada" })
125
- ] }),
126
- /* @__PURE__ */ jsx(
127
- Chip,
183
+ /* @__PURE__ */ jsxs(
184
+ Box,
128
185
  {
129
- label: `${stats.conversion_rate.toFixed(1)}%`,
130
- color: stats.conversion_rate > 50 ? "success" : stats.conversion_rate > 25 ? "warning" : "error",
131
- size: "medium"
186
+ sx: {
187
+ display: "flex",
188
+ alignItems: "center",
189
+ mb: 1
190
+ },
191
+ children: [
192
+ /* @__PURE__ */ jsx(MoneyIcon, { color: "primary", sx: { mr: 1 } }),
193
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: formatCurrency(stats.monthly_revenue) })
194
+ ]
132
195
  }
133
- )
134
- ] }) }) }) })
196
+ ),
197
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Ingresos Mensuales" })
198
+ ] }) }) }),
199
+ /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: 12, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(
200
+ Box,
201
+ {
202
+ sx: {
203
+ display: "flex",
204
+ alignItems: "center",
205
+ justifyContent: "space-between"
206
+ },
207
+ children: [
208
+ /* @__PURE__ */ jsxs(Box, { children: [
209
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Tasa de Conversi\xF3n" }),
210
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "De prueba a suscripci\xF3n pagada" })
211
+ ] }),
212
+ /* @__PURE__ */ jsx(
213
+ Chip,
214
+ {
215
+ label: `${stats.conversion_rate.toFixed(1)}%`,
216
+ color: stats.conversion_rate > 50 ? "success" : stats.conversion_rate > 25 ? "warning" : "error",
217
+ size: "medium"
218
+ }
219
+ )
220
+ ]
221
+ }
222
+ ) }) }) })
135
223
  ] }),
136
- /* @__PURE__ */ jsxs(Box, { mt: 3, children: [
224
+ /* @__PURE__ */ jsxs(Box, { sx: {
225
+ mt: 3
226
+ }, children: [
137
227
  /* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Informaci\xF3n Adicional" }),
138
228
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
139
229
  /* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashadmin/dash-admin",
3
- "version": "1.3.51",
3
+ "version": "1.3.53",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -32,7 +32,7 @@
32
32
  "@tanstack/react-query-persist-client": "latest",
33
33
  "@emotion/react": "latest",
34
34
  "@emotion/styled": "latest",
35
- "@mui/material": "^7.3.10",
35
+ "@mui/material": "^9.3.0",
36
36
  "@rollup/plugin-alias": "latest",
37
37
  "@rollup/plugin-commonjs": "latest",
38
38
  "@rollup/plugin-node-resolve": "latest",
@@ -47,8 +47,8 @@
47
47
  "prop-types": "latest",
48
48
  "query-string": "latest",
49
49
  "ra-input-rich-text": "5.14.6",
50
- "react": "latest",
51
- "react-admin": "5.14.6",
50
+ "react": "19.2.8",
51
+ "react-admin": "5.15.1",
52
52
  "react-custom-scrollbars-2": "latest",
53
53
  "react-hook-form": "^7.54.0",
54
54
  "react-loading-overlay-ts": "latest",
@@ -96,7 +96,7 @@
96
96
  "eslint-plugin-react-hooks": "latest",
97
97
  "@dashadmin/dash-prettier": "workspace:*",
98
98
  "query-string": "latest",
99
- "react-dom": "latest",
99
+ "react-dom": "19.2.8",
100
100
  "rollup": "latest",
101
101
  "rollup-plugin-copy-assets": "latest",
102
102
  "rollup-plugin-external-globals": "latest",
@@ -47,10 +47,14 @@ export const AvatarDisplay: React.FC<AvatarComponent> = (props) => {
47
47
  const imageUrl = record?.[_attributeName];
48
48
 
49
49
  return (
50
- <Box display="flex" alignItems="center">
51
- <AvatarMui src={imageUrl} alt="avatar" />
52
- </Box>
53
- );
50
+ <Box
51
+ sx={{
52
+ display: "flex",
53
+ alignItems: "center"
54
+ }}>
55
+ <AvatarMui src={imageUrl} alt="avatar" />
56
+ </Box>
57
+ );
54
58
  };
55
59
 
56
60
  const Avatar = ({ method, attribute,resourceConfig }: IDashAutoAdminCustomFieldComponent) => {
@@ -45,19 +45,21 @@ const ComponentEdit: React.FC<IDashAutoAdminCustomFieldComponent> = ({
45
45
  }, [format, symbol]);
46
46
 
47
47
  return (
48
- <>
49
- <TextField
48
+ <>
49
+ <TextField
50
50
  label='Probar formateo'
51
51
  value={rawText}
52
52
  onChange={({ target: { value } }) => formatNumber(value)}
53
53
  />
54
- <TextField
54
+ <TextField
55
55
  label='Valor formateado'
56
56
  value={formattedNumber}
57
- inputProps={{ readOnly: true }}
57
+ slotProps={{
58
+ htmlInput: { readOnly: true }
59
+ }}
58
60
  />
59
- </>
60
- );
61
+ </>
62
+ );
61
63
  };
62
64
 
63
65
  const FormatCurrency = ({
@@ -137,8 +137,10 @@ const BridgedLocalesMenuButton: React.FC<BridgedLocalesMenuButtonProps> = ({
137
137
  anchorEl={anchorEl}
138
138
  open={open}
139
139
  onClose={handleClose}
140
- MenuListProps={{
141
- 'aria-labelledby': 'locale-button',
140
+ slotProps={{
141
+ list: {
142
+ 'aria-labelledby': 'locale-button',
143
+ }
142
144
  }}
143
145
  >
144
146
  {locales.map((localeOption) => (
@@ -80,7 +80,7 @@ const _checkError = (errorData: any): IDashGlobalError => {
80
80
  }
81
81
 
82
82
  // Handle legacy error format
83
- let e: IDashGlobalError = { ...errorData?.error ? errorData.error : {} };
83
+ let e: IDashGlobalError = { ...(errorData?.error ? errorData.error : {}) };
84
84
 
85
85
  let _extra = "";
86
86
  if (e.status >= 400 && e.status < 499) {
@@ -12,14 +12,17 @@ export const NoResults: React.FC<INoResults> = (props) => {
12
12
  const { title, description, children } = props;
13
13
 
14
14
  return (
15
- <Card sx={{ p: 0 }}>
16
- <CardContent sx={{ display: 'flex', flexDirection: 'column', alignItems: 'left', gap: 2 }}>
15
+ <Card sx={{ p: 0 }}>
16
+ <CardContent sx={{ display: 'flex', flexDirection: 'column', alignItems: 'left', gap: 2 }}>
17
17
  <div style={{ display: 'flex', alignItems: 'center', gap: 2 }}>
18
18
  <InfoIcon sx={{ fontSize: 32 }} />
19
19
  {title ? <Typography variant="h5">{title}</Typography> : "No hay registros"}
20
20
  </div>
21
- {description && <Typography variant="body1" color="text.secondary">{description}</Typography>}
21
+ {description && <Typography variant="body1" sx={{
22
+ color: "text.secondary"
23
+ }}>{description}</Typography>}
22
24
  {children ? children : <></>}
23
25
  </CardContent>
24
- </Card> );
26
+ </Card>
27
+ );
25
28
  };
@@ -71,7 +71,7 @@ export const AvailablePermissionsContext: React.FC<{children: React.ReactNode}>
71
71
  if (!LAST_FETCH_TIME) {
72
72
  try {
73
73
  // Try to get last fetch time from IndexedDB
74
- LAST_FETCH_TIME = await idbGet("system_available_permissions_cache") || 0;
74
+ LAST_FETCH_TIME = (await idbGet("system_available_permissions_cache")) || 0;
75
75
  } catch (error) {
76
76
  console.error("Error reading from IndexedDB:", error);
77
77
  }
@@ -94,7 +94,9 @@ const PermissionsSelectorView: React.FC<IDashAutoAdminCustomFieldComponent> = ({
94
94
  if (!record?.permissions || record.permissions.length === 0) {
95
95
  return (
96
96
  <Box sx={{ p: 2, textAlign: 'center' }}>
97
- <Typography variant="body2" color="text.secondary">
97
+ <Typography variant="body2" sx={{
98
+ color: "text.secondary"
99
+ }}>
98
100
  No permissions assigned
99
101
  </Typography>
100
102
  </Box>
@@ -109,7 +111,7 @@ const PermissionsSelectorView: React.FC<IDashAutoAdminCustomFieldComponent> = ({
109
111
  <Grid container spacing={3}>
110
112
  {permissions?.map((tab, index) => (
111
113
  /* @ts-ignore */
112
- <Grid item xs={12} sm={6} md={4} lg={3} key={index}>
114
+ (<Grid item xs={12} sm={6} md={4} lg={3} key={index}>
113
115
  <Card
114
116
  variant="outlined"
115
117
  sx={{
@@ -138,7 +140,7 @@ const PermissionsSelectorView: React.FC<IDashAutoAdminCustomFieldComponent> = ({
138
140
  </Stack>
139
141
  </CardContent>
140
142
  </Card>
141
- </Grid>
143
+ </Grid>)
142
144
  ))}
143
145
  </Grid>
144
146
  </Box>
@@ -533,19 +535,21 @@ const PermissionsSelectorBase: React.FC<IDashAutoAdminCustomFieldComponent & { r
533
535
  placeholder="e.g., user, admin, system..."
534
536
  value={groupSearchTerm}
535
537
  onChange={e => setGroupSearchTerm(e.target.value)}
536
- InputProps={{
537
- startAdornment: (
538
- <InputAdornment position="start">
539
- <SearchIcon color="action" />
540
- </InputAdornment>
541
- ),
542
- endAdornment: groupSearchTerm && (
543
- <InputAdornment position="end">
544
- <IconButton size="small" onClick={handleClearGroupSearch}>
545
- <ClearIcon fontSize="small" />
546
- </IconButton>
547
- </InputAdornment>
548
- )
538
+ slotProps={{
539
+ input: {
540
+ startAdornment: (
541
+ <InputAdornment position="start">
542
+ <SearchIcon color="action" />
543
+ </InputAdornment>
544
+ ),
545
+ endAdornment: groupSearchTerm && (
546
+ <InputAdornment position="end">
547
+ <IconButton size="small" onClick={handleClearGroupSearch}>
548
+ <ClearIcon fontSize="small" />
549
+ </IconButton>
550
+ </InputAdornment>
551
+ )
552
+ }
549
553
  }}
550
554
  />
551
555
  </Grid>
@@ -558,26 +562,30 @@ const PermissionsSelectorBase: React.FC<IDashAutoAdminCustomFieldComponent & { r
558
562
  placeholder="e.g., create, edit, delete, view..."
559
563
  value={itemSearchTerm}
560
564
  onChange={e => setItemSearchTerm(e.target.value)}
561
- InputProps={{
562
- startAdornment: (
563
- <InputAdornment position="start">
564
- <SearchIcon color="action" />
565
- </InputAdornment>
566
- ),
567
- endAdornment: itemSearchTerm && (
568
- <InputAdornment position="end">
569
- <IconButton size="small" onClick={handleClearItemSearch}>
570
- <ClearIcon fontSize="small" />
571
- </IconButton>
572
- </InputAdornment>
573
- )
565
+ slotProps={{
566
+ input: {
567
+ startAdornment: (
568
+ <InputAdornment position="start">
569
+ <SearchIcon color="action" />
570
+ </InputAdornment>
571
+ ),
572
+ endAdornment: itemSearchTerm && (
573
+ <InputAdornment position="end">
574
+ <IconButton size="small" onClick={handleClearItemSearch}>
575
+ <ClearIcon fontSize="small" />
576
+ </IconButton>
577
+ </InputAdornment>
578
+ )
579
+ }
574
580
  }}
575
581
  />
576
582
  </Grid>
577
583
  </Grid>
578
584
  {hasActiveSearch && (
579
585
  <Box sx={{ mt: 2, p: 2, bgcolor: 'action.hover', borderRadius: 1 }}>
580
- <Typography variant="body2" color="text.secondary">
586
+ <Typography variant="body2" sx={{
587
+ color: "text.secondary"
588
+ }}>
581
589
  <strong>Search Results:</strong> {filteredGroupsCount} group{filteredGroupsCount !== 1 ? 's' : ''}
582
590
  {' '}({totalFilteredItems} permission{totalFilteredItems !== 1 ? 's' : ''})
583
591
  {' '}of {permissionsData.length} total groups ({totalPermissions} total permissions)
@@ -606,10 +614,17 @@ const PermissionsSelectorBase: React.FC<IDashAutoAdminCustomFieldComponent & { r
606
614
  borderColor: 'divider'
607
615
  }}>
608
616
  <SearchIcon sx={{ fontSize: 48, color: 'text.disabled', mb: 2 }} />
609
- <Typography variant="h6" color="text.secondary" gutterBottom>
617
+ <Typography variant="h6" gutterBottom sx={{
618
+ color: "text.secondary"
619
+ }}>
610
620
  No permissions found
611
621
  </Typography>
612
- <Typography variant="body2" color="text.disabled" sx={{ mb: 2 }}>
622
+ <Typography
623
+ variant="body2"
624
+ sx={{
625
+ color: "text.disabled",
626
+ mb: 2
627
+ }}>
613
628
  No permissions match your search criteria
614
629
  {debouncedGroupSearch && ` for group "${debouncedGroupSearch}"`}
615
630
  {debouncedItemSearch && ` for permission "${debouncedItemSearch}"`}
@@ -638,7 +653,7 @@ const PermissionsSelectorBase: React.FC<IDashAutoAdminCustomFieldComponent & { r
638
653
  const visibleItems = isExpanded ? group : group.slice(0, INITIAL_ITEMS_COUNT);
639
654
  const remainingCount = group.length - INITIAL_ITEMS_COUNT;
640
655
  return (
641
- /* @ts-ignore */
656
+ /* @ts-ignore */
642
657
  <Grid item xs={12} md={4} key={groupIndex}>
643
658
  <Card variant="outlined" sx={{
644
659
  height: '100%',
@@ -305,7 +305,7 @@ const PermissionsSelectorListBase: React.FC<IDashAutoAdminCustomFieldComponent &
305
305
 
306
306
  return (
307
307
  <Box sx={{ p: 2 }}>
308
-
308
+
309
309
  {/* Global Toolbar */}
310
310
  <Paper elevation={1} sx={{ mb: 3, p: 2 }}>
311
311
  <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>
@@ -418,7 +418,12 @@ const PermissionsSelectorListBase: React.FC<IDashAutoAdminCustomFieldComponent &
418
418
  ) : (
419
419
  <TableRow>
420
420
  <TableCell colSpan={4} align="center">
421
- <Typography variant="body2" color="text.secondary" sx={{ py: 3 }}>
421
+ <Typography
422
+ variant="body2"
423
+ sx={{
424
+ color: "text.secondary",
425
+ py: 3
426
+ }}>
422
427
  No permissions found
423
428
  </Typography>
424
429
  </TableCell>