@dashadmin/dash-admin 1.3.50 → 1.3.52

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 (59) 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/default-theme/DashThemeContext.js +3 -8
  18. package/dist/pages/DASHLightWeightLogin.js +7 -5
  19. package/dist/pages/Profile.js +5 -3
  20. package/dist/pages/RecoverPassword.js +28 -14
  21. package/dist/schemas/subscription/components/SubscriptionPaymentHistory.js +14 -2
  22. package/dist/schemas/subscription/components/SubscriptionPlanFeatures.js +37 -25
  23. package/dist/schemas/subscription/components/SubscriptionPlanPreview.js +47 -28
  24. package/dist/schemas/subscription/components/SubscriptionPlanStats.js +127 -37
  25. package/package.json +3 -3
  26. package/src/DASHAdmin.tsx +1 -0
  27. package/src/components/avatar/Avatar.tsx +8 -4
  28. package/src/components/currency/Format.tsx +8 -6
  29. package/src/components/i18n/BridgedLocalesMenuButton.tsx +4 -2
  30. package/src/components/misc/DASHGlobalErrorHandler.tsx +1 -1
  31. package/src/components/misc/NoResults.tsx +7 -4
  32. package/src/components/permission/AvailablePermissionsContext.tsx +1 -1
  33. package/src/components/permission/PermissionsSelector.tsx +48 -33
  34. package/src/components/permission/PermissionsSelectorList.tsx +7 -2
  35. package/src/components/selects/RASearchableSelect.tsx +22 -19
  36. package/src/components/selects/RASearchableSelectChips.tsx +23 -19
  37. package/src/components/selects/SearchableSelect.tsx +22 -18
  38. package/src/components/subscription/PlanAddonsSettings.tsx +61 -20
  39. package/src/components/subscription/PlanAuditLog.tsx +22 -8
  40. package/src/components/subscription/PlanFeaturesSettings.tsx +28 -8
  41. package/src/components/subscription/PlanMetadataSettings.tsx +29 -7
  42. package/src/components/subscription/PlanPricesSettings.tsx +30 -18
  43. package/src/components/tenant/TenantAttributesContext.tsx +1 -1
  44. package/src/components/tenant/TenantSelector.tsx +20 -17
  45. package/src/components/tenant/TenantSettingsContext.tsx +1 -1
  46. package/src/components/user/UserPreferences.tsx +56 -21
  47. package/src/contexts/SystemRequestsCache.tsx +1 -1
  48. package/src/default-theme/DASHAppProviders.tsx +1 -1
  49. package/src/default-theme/DashThemeContext.tsx +5 -14
  50. package/src/default-theme/menu/AppMenuComponents/expanded/CollapsableSidebarMenu.tsx +3 -3
  51. package/src/default-theme/menu/SidebarActions.tsx +6 -6
  52. package/src/pages/DASHLightWeightLogin.tsx +8 -7
  53. package/src/pages/Profile.tsx +10 -9
  54. package/src/pages/RecoverPassword.tsx +15 -6
  55. package/src/schemas/subscription/components/SubscriptionPaymentHistory.tsx +9 -2
  56. package/src/schemas/subscription/components/SubscriptionPlanFeatures.tsx +10 -3
  57. package/src/schemas/subscription/components/SubscriptionPlanPreview.tsx +25 -12
  58. package/src/schemas/subscription/components/SubscriptionPlanStats.tsx +64 -14
  59. package/src/theme/AppSidebarLogo.tsx +7 -7
@@ -40,30 +40,40 @@ const EditComponent = ({ method, attribute, resourceConfig }) => {
40
40
  };
41
41
  return /* @__PURE__ */ jsxs(Box, { children: [
42
42
  /* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Caracter\xEDsticas del Plan" }),
43
- /* @__PURE__ */ jsxs(Box, { display: "flex", gap: 1, mb: 2, children: [
44
- /* @__PURE__ */ jsx(
45
- TextField,
46
- {
47
- fullWidth: true,
48
- size: "small",
49
- label: "Nueva caracter\xEDstica",
50
- value: newFeature,
51
- onChange: (e) => setNewFeature(e.target.value),
52
- onKeyPress: handleKeyPress,
53
- placeholder: "Ej: Acceso ilimitado, Soporte 24/7"
54
- }
55
- ),
56
- /* @__PURE__ */ jsx(
57
- Button,
58
- {
59
- variant: "contained",
60
- startIcon: /* @__PURE__ */ jsx(AddIcon, {}),
61
- onClick: handleAddFeature,
62
- disabled: !newFeature.trim(),
63
- children: "Agregar"
64
- }
65
- )
66
- ] }),
43
+ /* @__PURE__ */ jsxs(
44
+ Box,
45
+ {
46
+ sx: {
47
+ display: "flex",
48
+ gap: 1,
49
+ mb: 2
50
+ },
51
+ children: [
52
+ /* @__PURE__ */ jsx(
53
+ TextField,
54
+ {
55
+ fullWidth: true,
56
+ size: "small",
57
+ label: "Nueva caracter\xEDstica",
58
+ value: newFeature,
59
+ onChange: (e) => setNewFeature(e.target.value),
60
+ onKeyPress: handleKeyPress,
61
+ placeholder: "Ej: Acceso ilimitado, Soporte 24/7"
62
+ }
63
+ ),
64
+ /* @__PURE__ */ jsx(
65
+ Button,
66
+ {
67
+ variant: "contained",
68
+ startIcon: /* @__PURE__ */ jsx(AddIcon, {}),
69
+ onClick: handleAddFeature,
70
+ disabled: !newFeature.trim(),
71
+ children: "Agregar"
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ ),
67
77
  features.length > 0 ? /* @__PURE__ */ jsx(Paper, { variant: "outlined", children: /* @__PURE__ */ jsx(List, { dense: true, children: features.map((feature, index) => /* @__PURE__ */ jsxs(ListItem, { children: [
68
78
  /* @__PURE__ */ jsx(ListItemText, { primary: feature }),
69
79
  /* @__PURE__ */ jsx(ListItemSecondaryAction, { children: /* @__PURE__ */ jsx(
@@ -77,7 +87,9 @@ const EditComponent = ({ method, attribute, resourceConfig }) => {
77
87
  }
78
88
  ) })
79
89
  ] }, index)) }) }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", style: { fontStyle: "italic" }, children: "No hay caracter\xEDsticas definidas para este plan" }),
80
- /* @__PURE__ */ jsx(Box, { mt: 2, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Las caracter\xEDsticas se mostrar\xE1n a los usuarios al seleccionar este plan de suscripci\xF3n." }) })
90
+ /* @__PURE__ */ jsx(Box, { sx: {
91
+ mt: 2
92
+ }, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Las caracter\xEDsticas se mostrar\xE1n a los usuarios al seleccionar este plan de suscripci\xF3n." }) })
81
93
  ] });
82
94
  };
83
95
  const ViewComponent = ({ method, attribute, resourceConfig }) => {
@@ -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.50",
3
+ "version": "1.3.52",
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",
@@ -48,7 +48,7 @@
48
48
  "query-string": "latest",
49
49
  "ra-input-rich-text": "5.14.6",
50
50
  "react": "latest",
51
- "react-admin": "5.14.6",
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",
package/src/DASHAdmin.tsx CHANGED
@@ -397,6 +397,7 @@ const DASHAdminApp: React.FC<IDASHAdmin<unknown, unknown, unknown, unknown>> = R
397
397
  // are present it triggers createThemeWithVars which can produce a theme with undefined
398
398
  // breakpoints.internal_mediaKeys, crashing MUI v9's responsive sx prop handling.
399
399
  const { colorSchemes: _cs, cssVariables: _cv, defaultColorScheme: _dcs, ...safeAdminThemeOptions } = themeOptions as any;
400
+
400
401
  // Memoize AdminContext props
401
402
  const adminContextProps = {
402
403
  dataProvider: customDataProvider || dataProvider,
@@ -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
  }