odaptos_design_system 2.0.113 → 2.0.114

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.113",
2
+ "version": "2.0.114",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -710,7 +710,9 @@ display: flex;
710
710
  }
711
711
  };
712
712
 
713
- const openPiP = async (): Promise<void> => {
713
+ const openPiP = async (url: string): Promise<void> => {
714
+ window.open(url, '_blank');
715
+
714
716
  if (document.pictureInPictureEnabled && !document.pictureInPictureElement) {
715
717
  try {
716
718
  const pipWindow = await window.documentPictureInPicture.requestWindow({
@@ -792,16 +794,7 @@ display: flex;
792
794
  disabled={disabled}
793
795
  onClick={() => {
794
796
  if (url) {
795
- openPiP().catch((error) => {
796
- console.error("Erreur lors de l'ouverture du PiP :", error);
797
- });
798
-
799
- // Petit délai pour s'assurer que la nouvelle fenêtre est bien ouverte
800
- setTimeout(() => {
801
- // Ouvrir d'abord l'URL dans un nouvel onglet
802
- const fullUrl = url.includes('https://') ? url : `https://${url}`;
803
- window.open(fullUrl, '_blank');
804
- }, 10000);
797
+ openPiP(url);
805
798
  }
806
799
  }}
807
800
  />