valtech-components 2.0.824 → 2.0.826
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/esm2022/lib/components/atoms/qr-code/qr-code.component.mjs +30 -46
- package/esm2022/lib/components/molecules/feedback-form/feedback-form.component.mjs +12 -36
- package/esm2022/lib/components/molecules/refresher/refresher.component.mjs +3 -3
- package/esm2022/lib/components/molecules/refresher/types.mjs +2 -2
- package/esm2022/lib/components/molecules/username-input/username-input.component.mjs +3 -3
- package/esm2022/lib/components/organisms/avatar-upload/avatar-upload.component.mjs +3 -3
- package/esm2022/lib/components/organisms/comment-section/comment-section.component.mjs +12 -28
- package/esm2022/lib/components/organisms/data-table/data-table.component.mjs +63 -48
- package/esm2022/lib/components/organisms/infinite-list/types.mjs +2 -2
- package/esm2022/lib/components/templates/page-wrapper/page-wrapper.component.mjs +9 -3
- package/esm2022/lib/services/modal/simple-modal-content.component.mjs +16 -5
- package/esm2022/lib/services/skeleton/directives/loading.directive.mjs +3 -4
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +143 -168
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/services/firebase/firebase-messaging-sw.js +19 -8
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -42,21 +42,32 @@ if (!self.FIREBASE_CONFIG) {
|
|
|
42
42
|
messaging.onBackgroundMessage((payload) => {
|
|
43
43
|
console.log('[SW] Mensaje recibido en background:', payload);
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
// Web push usa mensajes data-only (sin bloque `notification`) para que el
|
|
46
|
+
// navegador NO auto-muestre una notificación duplicada — el SW es el único
|
|
47
|
+
// que la pinta. Title/body/icon llegan dentro de `data`. Se mantiene el
|
|
48
|
+
// fallback a `payload.notification` por compatibilidad con mensajes
|
|
49
|
+
// legacy o nativos que sí traen el bloque.
|
|
50
|
+
const data = payload.data || {};
|
|
51
|
+
const notificationTitle =
|
|
52
|
+
payload.notification?.title || data.title || 'Nueva notificación';
|
|
53
|
+
const notificationBody = payload.notification?.body || data.body || '';
|
|
54
|
+
const notificationIcon =
|
|
55
|
+
payload.notification?.icon || data.icon || '/assets/icon/favicon.ico';
|
|
56
|
+
|
|
46
57
|
const notificationOptions = {
|
|
47
|
-
body:
|
|
48
|
-
icon:
|
|
58
|
+
body: notificationBody,
|
|
59
|
+
icon: notificationIcon,
|
|
49
60
|
image: payload.notification?.image,
|
|
50
61
|
badge: '/assets/icon/badge.png',
|
|
51
|
-
tag: payload.messageId || 'default',
|
|
62
|
+
tag: payload.messageId || data.messageId || 'default',
|
|
52
63
|
data: {
|
|
53
|
-
...
|
|
54
|
-
messageId: payload.messageId,
|
|
64
|
+
...data,
|
|
65
|
+
messageId: payload.messageId || data.messageId,
|
|
55
66
|
title: notificationTitle,
|
|
56
|
-
body:
|
|
67
|
+
body: notificationBody,
|
|
57
68
|
},
|
|
58
69
|
vibrate: [200, 100, 200],
|
|
59
|
-
requireInteraction:
|
|
70
|
+
requireInteraction: data.require_interaction === 'true',
|
|
60
71
|
};
|
|
61
72
|
|
|
62
73
|
return self.registration.showNotification(notificationTitle, notificationOptions);
|