@nocios/crudify-ui 3.0.60 → 3.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -399,6 +399,7 @@ type NotificationOptions = {
399
399
  vertical: "top" | "bottom";
400
400
  horizontal: "left" | "center" | "right";
401
401
  };
402
+ allowHtml?: boolean;
402
403
  };
403
404
  type SessionProviderProps = {
404
405
  children: ReactNode;
@@ -771,6 +772,7 @@ interface GlobalNotificationProviderProps {
771
772
  horizontal: "left" | "center" | "right";
772
773
  };
773
774
  enabled?: boolean;
775
+ allowHtml?: boolean;
774
776
  }
775
777
  declare const GlobalNotificationProvider: React.FC<GlobalNotificationProviderProps>;
776
778
  declare const useGlobalNotification: () => GlobalNotificationContextValue;
package/dist/index.d.ts CHANGED
@@ -399,6 +399,7 @@ type NotificationOptions = {
399
399
  vertical: "top" | "bottom";
400
400
  horizontal: "left" | "center" | "right";
401
401
  };
402
+ allowHtml?: boolean;
402
403
  };
403
404
  type SessionProviderProps = {
404
405
  children: ReactNode;
@@ -771,6 +772,7 @@ interface GlobalNotificationProviderProps {
771
772
  horizontal: "left" | "center" | "right";
772
773
  };
773
774
  enabled?: boolean;
775
+ allowHtml?: boolean;
774
776
  }
775
777
  declare const GlobalNotificationProvider: React.FC<GlobalNotificationProviderProps>;
776
778
  declare const useGlobalNotification: () => GlobalNotificationContextValue;
package/dist/index.js CHANGED
@@ -1424,8 +1424,10 @@ var GlobalNotificationProvider = ({
1424
1424
  maxNotifications = 5,
1425
1425
  defaultAutoHideDuration = 6e3,
1426
1426
  position = { vertical: "top", horizontal: "right" },
1427
- enabled = false
1427
+ enabled = false,
1428
1428
  // ✅ Por defecto DESACTIVADO
1429
+ allowHtml = false
1430
+ // Por defecto no permitir HTML
1429
1431
  }) => {
1430
1432
  const [notifications, setNotifications] = (0, import_react6.useState)([]);
1431
1433
  const showNotification = (0, import_react6.useCallback)(
@@ -1448,8 +1450,8 @@ var GlobalNotificationProvider = ({
1448
1450
  severity,
1449
1451
  autoHideDuration: options?.autoHideDuration ?? defaultAutoHideDuration,
1450
1452
  persistent: options?.persistent ?? false,
1451
- allowHtml: options?.allowHtml ?? false
1452
- // Por defecto NO permitir HTML
1453
+ allowHtml: options?.allowHtml ?? allowHtml
1454
+ // Usar valor del provider por defecto
1453
1455
  };
1454
1456
  setNotifications((prev) => {
1455
1457
  const updatedNotifications = prev.length >= maxNotifications ? prev.slice(-(maxNotifications - 1)) : prev;
@@ -1457,7 +1459,7 @@ var GlobalNotificationProvider = ({
1457
1459
  });
1458
1460
  return id;
1459
1461
  },
1460
- [maxNotifications, defaultAutoHideDuration, enabled]
1462
+ [maxNotifications, defaultAutoHideDuration, enabled, allowHtml]
1461
1463
  );
1462
1464
  const hideNotification = (0, import_react6.useCallback)((id) => {
1463
1465
  setNotifications((prev) => prev.filter((notification) => notification.id !== id));
@@ -1683,7 +1685,9 @@ function SessionProvider(props) {
1683
1685
  enabled: props.showNotifications,
1684
1686
  maxNotifications: props.notificationOptions?.maxNotifications || 5,
1685
1687
  defaultAutoHideDuration: props.notificationOptions?.defaultAutoHideDuration || 6e3,
1686
- position: props.notificationOptions?.position || { vertical: "top", horizontal: "right" }
1688
+ position: props.notificationOptions?.position || { vertical: "top", horizontal: "right" },
1689
+ allowHtml: props.notificationOptions?.allowHtml || false
1690
+ // Pasar allowHtml desde notificationOptions
1687
1691
  };
1688
1692
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GlobalNotificationProvider, { ...notificationConfig, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InnerSessionProvider, { ...props }) });
1689
1693
  }
package/dist/index.mjs CHANGED
@@ -1351,8 +1351,10 @@ var GlobalNotificationProvider = ({
1351
1351
  maxNotifications = 5,
1352
1352
  defaultAutoHideDuration = 6e3,
1353
1353
  position = { vertical: "top", horizontal: "right" },
1354
- enabled = false
1354
+ enabled = false,
1355
1355
  // ✅ Por defecto DESACTIVADO
1356
+ allowHtml = false
1357
+ // Por defecto no permitir HTML
1356
1358
  }) => {
1357
1359
  const [notifications, setNotifications] = useState4([]);
1358
1360
  const showNotification = useCallback2(
@@ -1375,8 +1377,8 @@ var GlobalNotificationProvider = ({
1375
1377
  severity,
1376
1378
  autoHideDuration: options?.autoHideDuration ?? defaultAutoHideDuration,
1377
1379
  persistent: options?.persistent ?? false,
1378
- allowHtml: options?.allowHtml ?? false
1379
- // Por defecto NO permitir HTML
1380
+ allowHtml: options?.allowHtml ?? allowHtml
1381
+ // Usar valor del provider por defecto
1380
1382
  };
1381
1383
  setNotifications((prev) => {
1382
1384
  const updatedNotifications = prev.length >= maxNotifications ? prev.slice(-(maxNotifications - 1)) : prev;
@@ -1384,7 +1386,7 @@ var GlobalNotificationProvider = ({
1384
1386
  });
1385
1387
  return id;
1386
1388
  },
1387
- [maxNotifications, defaultAutoHideDuration, enabled]
1389
+ [maxNotifications, defaultAutoHideDuration, enabled, allowHtml]
1388
1390
  );
1389
1391
  const hideNotification = useCallback2((id) => {
1390
1392
  setNotifications((prev) => prev.filter((notification) => notification.id !== id));
@@ -1610,7 +1612,9 @@ function SessionProvider(props) {
1610
1612
  enabled: props.showNotifications,
1611
1613
  maxNotifications: props.notificationOptions?.maxNotifications || 5,
1612
1614
  defaultAutoHideDuration: props.notificationOptions?.defaultAutoHideDuration || 6e3,
1613
- position: props.notificationOptions?.position || { vertical: "top", horizontal: "right" }
1615
+ position: props.notificationOptions?.position || { vertical: "top", horizontal: "right" },
1616
+ allowHtml: props.notificationOptions?.allowHtml || false
1617
+ // Pasar allowHtml desde notificationOptions
1614
1618
  };
1615
1619
  return /* @__PURE__ */ jsx5(GlobalNotificationProvider, { ...notificationConfig, children: /* @__PURE__ */ jsx5(InnerSessionProvider, { ...props }) });
1616
1620
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocios/crudify-ui",
3
- "version": "3.0.60",
3
+ "version": "3.0.62",
4
4
  "description": "Biblioteca de componentes UI para Crudify",
5
5
  "author": "Nocios",
6
6
  "license": "MIT",