valtech-components 2.0.474 → 2.0.475

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.
@@ -90,7 +90,7 @@ export declare class ArticleComponent implements OnInit {
90
90
  contentInterpolation?: Record<string, string | number>;
91
91
  icon?: import("valtech-components").IconMetada;
92
92
  shape?: "round";
93
- size?: "default" | "small" | "large";
93
+ size?: "small" | "large" | "default";
94
94
  fill?: "default" | "clear" | "outline" | "solid";
95
95
  type: "button" | "submit" | "reset";
96
96
  token?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.474",
3
+ "version": "2.0.475",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
@@ -97,20 +97,32 @@ if (!self.FIREBASE_CONFIG) {
97
97
  clients
98
98
  .matchAll({ type: 'window', includeUncontrolled: true })
99
99
  .then((clientList) => {
100
+ // Siempre enviar postMessage para que la app pueda reaccionar
100
101
  for (const client of clientList) {
101
- if ('focus' in client) {
102
- client.postMessage(notificationPayload);
103
- if (data.route && !data.url) {
104
- return client.focus();
105
- }
106
- if (data.url) {
102
+ client.postMessage(notificationPayload);
103
+ }
104
+
105
+ // Navegar si hay route o url
106
+ if (targetUrl !== '/') {
107
+ for (const client of clientList) {
108
+ if ('navigate' in client) {
107
109
  return client.navigate(targetUrl).then((c) => c?.focus());
108
110
  }
111
+ }
112
+ // Si no hay cliente abierto, abrir nueva ventana
113
+ if (clients.openWindow) {
114
+ return clients.openWindow(targetUrl);
115
+ }
116
+ }
117
+
118
+ // Solo hacer focus si no hay navegación
119
+ for (const client of clientList) {
120
+ if ('focus' in client) {
109
121
  return client.focus();
110
122
  }
111
123
  }
112
124
  if (clients.openWindow) {
113
- return clients.openWindow(targetUrl);
125
+ return clients.openWindow('/');
114
126
  }
115
127
  })
116
128
  );