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?: "
|
|
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
|
@@ -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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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(
|
|
125
|
+
return clients.openWindow('/');
|
|
114
126
|
}
|
|
115
127
|
})
|
|
116
128
|
);
|