@apia/notifications 0.3.2 → 0.3.4
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.ts +11 -23
- package/dist/index.js +94 -122
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { TApiaSystemMessageObj } from '@apia/util';
|
|
3
|
+
import { EventEmitter, TApiaSystemMessageObj } from '@apia/util';
|
|
4
4
|
|
|
5
5
|
type TNotificationId = string | number;
|
|
6
6
|
interface INotification<T = string> {
|
|
@@ -14,25 +14,6 @@ interface INotification<T = string> {
|
|
|
14
14
|
type: T;
|
|
15
15
|
}
|
|
16
16
|
type TNotificationSelector<T> = (notifications: INotification<T>[]) => INotification<T>[];
|
|
17
|
-
interface INotificationsDispatcher<K> {
|
|
18
|
-
areNotificationsOpen(): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* El método close da la señal de cierre. Es importante llamar a delete para
|
|
21
|
-
* que no se acumulen las notificaciones en el store
|
|
22
|
-
*/
|
|
23
|
-
close(id: TNotificationId | INotification): void;
|
|
24
|
-
closeAll(): void;
|
|
25
|
-
/**
|
|
26
|
-
* El método delete elimina la entrada en el store, no debe llamarse este
|
|
27
|
-
* método directamente, sino el método close
|
|
28
|
-
*/
|
|
29
|
-
delete(id: TNotificationId | INotification): void;
|
|
30
|
-
getSelector(): (selector: TNotificationSelector<K>) => INotification<K>[];
|
|
31
|
-
/**
|
|
32
|
-
* Agrega una nueva notificación
|
|
33
|
-
*/
|
|
34
|
-
notify(notification: INotification<K>): void;
|
|
35
|
-
}
|
|
36
17
|
declare global {
|
|
37
18
|
interface Window {
|
|
38
19
|
LBL_ERROR: string;
|
|
@@ -57,13 +38,20 @@ declare const _default: React__default.MemoExoticComponent<((props: object) => R
|
|
|
57
38
|
declare const onCloseNotificationCallbacks: Record<string, () => unknown>;
|
|
58
39
|
type TNotificationType = 'danger' | 'success' | 'warning';
|
|
59
40
|
type TDispatchedNotification = Omit<INotification<TNotificationType>, 'id' | 'type' | 'isOpen'> & Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;
|
|
60
|
-
declare class DefaultNotifier
|
|
41
|
+
declare class DefaultNotifier extends EventEmitter<{
|
|
42
|
+
changedList: boolean;
|
|
43
|
+
}> {
|
|
44
|
+
notifications: INotification<TNotificationType>[];
|
|
61
45
|
areNotificationsOpen(): boolean;
|
|
46
|
+
shout(): void;
|
|
62
47
|
close(id: TNotificationId | INotification): void;
|
|
63
48
|
closeAll(): void;
|
|
64
49
|
delete(id: TNotificationId | INotification): void;
|
|
65
|
-
|
|
50
|
+
useSelector: (selector: TNotificationSelector<TNotificationType>) => INotification<TNotificationType>[];
|
|
66
51
|
notify(notification: TDispatchedNotification): void;
|
|
52
|
+
on<K extends 'changedList'>(eventName: K, fn: (params: {
|
|
53
|
+
changedList: boolean;
|
|
54
|
+
}[K]) => unknown): () => void;
|
|
67
55
|
}
|
|
68
56
|
declare const defaultNotifier: DefaultNotifier;
|
|
69
57
|
declare function notify(notification: TDispatchedNotification): void;
|
|
@@ -104,4 +92,4 @@ declare const parseServerNotification: (serverNotification: TMessage | TMessage[
|
|
|
104
92
|
*/
|
|
105
93
|
declare const dispatchNotifications: (alert: TNotificationMessage) => void;
|
|
106
94
|
|
|
107
|
-
export { DefaultNotifier, INotification,
|
|
95
|
+
export { DefaultNotifier, INotification, Notification, _default as NotificationsList, TDispatchedNotification, TMessage, TNotificationId, TNotificationMessage, TNotificationSelector, TNotificationType, defaultNotifier, dispatchNotifications, getNotificationMessageObj, notify, onCloseNotificationCallbacks, parseServerNotification };
|
package/dist/index.js
CHANGED
|
@@ -1,100 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default from 'react';
|
|
3
|
+
import React__default, { useState } from 'react';
|
|
4
4
|
import { Alert, Box, Close, makeStyledComponent, spacing, getVariant } from '@apia/theme';
|
|
5
5
|
import { CSSTransition } from 'react-transition-group';
|
|
6
|
-
import {
|
|
6
|
+
import { EventEmitter, useLatest, useMount, getIndex, useUpdateEffect, useUnmount, arrayOrArray } from '@apia/util';
|
|
7
7
|
import { isIconName, Icon } from '@apia/icons';
|
|
8
8
|
import { uniqueId } from 'lodash-es';
|
|
9
|
-
import { createSlice, injectReducers } from '@apia/store';
|
|
10
9
|
import { keyframes } from '@emotion/react';
|
|
11
10
|
|
|
12
|
-
var __defProp$3 = Object.defineProperty;
|
|
13
|
-
var __defProps$2 = Object.defineProperties;
|
|
14
|
-
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
15
|
-
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
16
|
-
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
17
|
-
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
18
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
-
var __spreadValues$3 = (a, b) => {
|
|
20
|
-
for (var prop in b || (b = {}))
|
|
21
|
-
if (__hasOwnProp$3.call(b, prop))
|
|
22
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
23
|
-
if (__getOwnPropSymbols$3)
|
|
24
|
-
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
25
|
-
if (__propIsEnum$3.call(b, prop))
|
|
26
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
27
|
-
}
|
|
28
|
-
return a;
|
|
29
|
-
};
|
|
30
|
-
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
31
|
-
function putNotificationToVibrate(message) {
|
|
32
|
-
let hasAnimated = false;
|
|
33
|
-
document.querySelectorAll(".notificationsFloatingList .notification__text").forEach((current) => {
|
|
34
|
-
if (current.textContent === String(message)) {
|
|
35
|
-
const notificationElement = getSpecificParent(
|
|
36
|
-
current,
|
|
37
|
-
(search) => {
|
|
38
|
-
return search.classList.contains("notification");
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
if (notificationElement) {
|
|
42
|
-
notificationElement.classList.add("animate");
|
|
43
|
-
setTimeout(() => {
|
|
44
|
-
notificationElement.classList.remove("animate");
|
|
45
|
-
}, 300);
|
|
46
|
-
hasAnimated = true;
|
|
47
|
-
} else
|
|
48
|
-
console.warn(
|
|
49
|
-
"A notification with that text was found, but it could not be animated"
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
return hasAnimated;
|
|
54
|
-
}
|
|
55
|
-
const notificationsSlice = createSlice({
|
|
56
|
-
name: "notificationsSlice",
|
|
57
|
-
initialState: { notifications: [] },
|
|
58
|
-
reducers: {
|
|
59
|
-
close(state, { payload }) {
|
|
60
|
-
state.notifications = state.notifications.map((current) => {
|
|
61
|
-
return current.id === payload.id ? __spreadProps$2(__spreadValues$3({}, current), { isOpen: false }) : current;
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
closeAll(state) {
|
|
65
|
-
const firstOpenIndex = state.notifications.findIndex((current) => {
|
|
66
|
-
return current.isOpen;
|
|
67
|
-
});
|
|
68
|
-
if (firstOpenIndex >= 0) {
|
|
69
|
-
state.notifications[firstOpenIndex].isOpen = false;
|
|
70
|
-
setTimeout(() => {
|
|
71
|
-
return notificationsStore.dispatch(notificationsActions.closeAll());
|
|
72
|
-
}, 50);
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
delete: (state, { payload: { id } }) => {
|
|
76
|
-
state.notifications = state.notifications.filter((current) => {
|
|
77
|
-
return current.id !== id;
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
push(state, payload) {
|
|
81
|
-
const notifications = payload.payload.notifications.filter(
|
|
82
|
-
(notification) => {
|
|
83
|
-
return !putNotificationToVibrate(notification.message);
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
state.notifications.push(...notifications);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
const {
|
|
91
|
-
store: notificationsStore,
|
|
92
|
-
useSelector: useNotificationsSelector
|
|
93
|
-
} = injectReducers({
|
|
94
|
-
notificationsSlice: notificationsSlice.reducer
|
|
95
|
-
});
|
|
96
|
-
const notificationsActions = notificationsSlice.actions;
|
|
97
|
-
|
|
98
11
|
var __defProp$2 = Object.defineProperty;
|
|
99
12
|
var __defProps$1 = Object.defineProperties;
|
|
100
13
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
@@ -115,54 +28,105 @@ var __spreadValues$2 = (a, b) => {
|
|
|
115
28
|
};
|
|
116
29
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
117
30
|
const onCloseNotificationCallbacks = {};
|
|
118
|
-
|
|
31
|
+
function shallowEqual(a, b) {
|
|
32
|
+
if (a.length !== b.length)
|
|
33
|
+
return false;
|
|
34
|
+
for (let i = 0; i < a.length; i++)
|
|
35
|
+
if (a[i] !== b[i])
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
class DefaultNotifier extends EventEmitter {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.notifications = [];
|
|
43
|
+
this.useSelector = (selector) => {
|
|
44
|
+
const [state, setState] = useState([]);
|
|
45
|
+
const lastState = useLatest(state);
|
|
46
|
+
useMount(() => {
|
|
47
|
+
return this.on("changedList", () => {
|
|
48
|
+
const newState = selector(this.notifications);
|
|
49
|
+
if (!shallowEqual(newState, lastState.current)) {
|
|
50
|
+
setState([...newState]);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
return state;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
119
57
|
areNotificationsOpen() {
|
|
120
58
|
return !!document.querySelector(".notification");
|
|
121
59
|
}
|
|
60
|
+
shout() {
|
|
61
|
+
this.emit("changedList", true);
|
|
62
|
+
}
|
|
122
63
|
close(id) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
64
|
+
const actualId = typeof id === "object" ? id.id : id;
|
|
65
|
+
this.notifications = this.notifications.map((current) => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (current.id === actualId) {
|
|
68
|
+
(_a = current.onClose) == null ? void 0 : _a.call(current);
|
|
69
|
+
return __spreadProps$1(__spreadValues$2({}, current), { isOpen: false });
|
|
70
|
+
}
|
|
71
|
+
return current;
|
|
72
|
+
});
|
|
73
|
+
this.shout();
|
|
126
74
|
}
|
|
127
75
|
closeAll() {
|
|
128
|
-
|
|
76
|
+
this.notifications = this.notifications.map((current) => {
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = current.onClose) == null ? void 0 : _a.call(current);
|
|
79
|
+
return __spreadProps$1(__spreadValues$2({}, current), {
|
|
80
|
+
isOpen: false
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
this.shout();
|
|
129
84
|
}
|
|
130
85
|
delete(id) {
|
|
131
|
-
|
|
132
|
-
|
|
86
|
+
const actualId = typeof id === "object" ? id.id : id;
|
|
87
|
+
this.notifications = this.notifications.filter(
|
|
88
|
+
(current) => current.id !== actualId
|
|
133
89
|
);
|
|
134
|
-
|
|
135
|
-
getSelector() {
|
|
136
|
-
return (selector) => {
|
|
137
|
-
return useNotificationsSelector((global) => {
|
|
138
|
-
return selector(
|
|
139
|
-
global.notificationsSlice.notifications
|
|
140
|
-
);
|
|
141
|
-
});
|
|
142
|
-
};
|
|
90
|
+
this.shout();
|
|
143
91
|
}
|
|
144
92
|
notify(notification) {
|
|
145
93
|
var _a, _b;
|
|
146
94
|
const id = (_a = notification.id) != null ? _a : uniqueId();
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
95
|
+
let hasAnimated = false;
|
|
96
|
+
document.querySelectorAll(".notificationsFloatingList .notification__text").forEach((current) => {
|
|
97
|
+
if (current.textContent === notification.message) {
|
|
98
|
+
const notificationElement = current.closest(
|
|
99
|
+
".notification"
|
|
100
|
+
);
|
|
101
|
+
if (notificationElement) {
|
|
102
|
+
notificationElement.classList.add("animate");
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
notificationElement.classList.remove("animate");
|
|
105
|
+
}, 200);
|
|
106
|
+
hasAnimated = true;
|
|
107
|
+
} else
|
|
108
|
+
console.warn(
|
|
109
|
+
"A notification with that text was found, but it could not be animated"
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
if (hasAnimated)
|
|
114
|
+
return;
|
|
115
|
+
this.notifications.push(__spreadProps$1(__spreadValues$2({}, notification), {
|
|
116
|
+
isOpen: true,
|
|
117
|
+
type: (_b = notification.type) != null ? _b : "warning",
|
|
118
|
+
id
|
|
119
|
+
}));
|
|
120
|
+
this.shout();
|
|
121
|
+
}
|
|
122
|
+
on(eventName, fn) {
|
|
123
|
+
fn(true);
|
|
124
|
+
return super.on(eventName, fn);
|
|
161
125
|
}
|
|
162
126
|
}
|
|
163
127
|
const defaultNotifier = new DefaultNotifier();
|
|
164
128
|
function notify(notification) {
|
|
165
|
-
|
|
129
|
+
defaultNotifier.notify(notification);
|
|
166
130
|
}
|
|
167
131
|
|
|
168
132
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -230,7 +194,8 @@ const Notification = ({
|
|
|
230
194
|
notificationType = "success";
|
|
231
195
|
const onClick = React.useCallback(() => {
|
|
232
196
|
setShouldShow(false);
|
|
233
|
-
|
|
197
|
+
defaultNotifier.close(innerNotification);
|
|
198
|
+
}, [innerNotification]);
|
|
234
199
|
return /* @__PURE__ */ jsx(
|
|
235
200
|
CSSTransition,
|
|
236
201
|
{
|
|
@@ -338,7 +303,7 @@ const vibrate = keyframes`
|
|
|
338
303
|
100% {
|
|
339
304
|
transform: rotate(0);
|
|
340
305
|
}`;
|
|
341
|
-
const useSelector = defaultNotifier.
|
|
306
|
+
const useSelector = defaultNotifier.useSelector;
|
|
342
307
|
const NotificationsList = makeStyledComponent(
|
|
343
308
|
"NotificationsList",
|
|
344
309
|
"layout.common.notifications.list",
|
|
@@ -375,6 +340,13 @@ const NotificationsList = makeStyledComponent(
|
|
|
375
340
|
const notifications = useSelector((current) => {
|
|
376
341
|
return current;
|
|
377
342
|
});
|
|
343
|
+
useMount(() => {
|
|
344
|
+
document.addEventListener("keydown", (ev) => {
|
|
345
|
+
if (ev.code === "Escape") {
|
|
346
|
+
defaultNotifier.closeAll();
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
});
|
|
378
350
|
return /* @__PURE__ */ jsx(
|
|
379
351
|
Box,
|
|
380
352
|
__spreadProps(__spreadValues({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/notificationsStore.ts","../src/defaultNotifier.ts","../src/Notification.tsx","../src/NotificationsList.tsx","../src/apia/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createSlice, injectReducers, PayloadAction } from '@apia/store';\nimport { getSpecificParent } from '@apia/util';\nimport { INotification, TNotificationId } from './types';\n\nfunction putNotificationToVibrate(message: string) {\n let hasAnimated = false;\n document\n .querySelectorAll('.notificationsFloatingList .notification__text')\n .forEach((current) => {\n if (current.textContent === String(message)) {\n const notificationElement = getSpecificParent(\n current as HTMLElement,\n (search) => {\n return search.classList.contains('notification');\n },\n );\n if (notificationElement) {\n notificationElement.classList.add('animate');\n setTimeout(() => {\n notificationElement.classList.remove('animate');\n }, 300);\n hasAnimated = true;\n } else\n console.warn(\n 'A notification with that text was found, but it could not be animated',\n );\n }\n });\n return hasAnimated;\n}\n\nexport const notificationsSlice = createSlice({\n name: 'notificationsSlice',\n initialState: { notifications: [] } as {\n notifications: INotification<any>[];\n },\n reducers: {\n close(state, { payload }: PayloadAction<{ id: TNotificationId }>) {\n state.notifications = state.notifications.map((current) => {\n return current.id === payload.id\n ? { ...current, isOpen: false }\n : current;\n });\n },\n closeAll(state) {\n const firstOpenIndex = state.notifications.findIndex((current) => {\n return current.isOpen;\n });\n if (firstOpenIndex >= 0) {\n state.notifications[firstOpenIndex].isOpen = false;\n setTimeout(() => {\n return notificationsStore.dispatch(notificationsActions.closeAll());\n }, 50);\n }\n },\n delete: (\n state,\n { payload: { id } }: PayloadAction<{ id: TNotificationId }>,\n ) => {\n state.notifications = state.notifications.filter((current) => {\n return current.id !== id;\n });\n },\n push(\n state,\n payload: PayloadAction<{ notifications: INotification<any>[] }>,\n ) {\n const notifications = payload.payload.notifications.filter(\n (notification) => {\n return !putNotificationToVibrate(notification.message);\n },\n );\n\n state.notifications.push(...notifications);\n },\n },\n});\n\nexport const {\n store: notificationsStore,\n useSelector: useNotificationsSelector,\n} = injectReducers({\n notificationsSlice: notificationsSlice.reducer,\n});\n\nexport const notificationsActions = notificationsSlice.actions;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { uniqueId } from 'lodash-es';\nimport {\n notificationsActions,\n notificationsStore,\n useNotificationsSelector,\n} from './notificationsStore';\nimport {\n INotification,\n INotificationsDispatcher,\n TNotificationId,\n TNotificationSelector,\n} from './types';\n\nexport const onCloseNotificationCallbacks: Record<string, () => unknown> = {};\n\nexport type TNotificationType = 'danger' | 'success' | 'warning';\n\nexport type TDispatchedNotification = Omit<\n INotification<TNotificationType>,\n 'id' | 'type' | 'isOpen'\n> &\n Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;\n\nexport class DefaultNotifier\n implements INotificationsDispatcher<TNotificationType>\n{\n areNotificationsOpen(): boolean {\n return !!document.querySelector('.notification');\n }\n\n close(id: TNotificationId | INotification): void {\n notificationsStore.dispatch(\n notificationsActions.close({ id: typeof id === 'object' ? id.id : id }),\n );\n }\n\n closeAll(): void {\n notificationsStore.dispatch(notificationsActions.closeAll());\n }\n\n delete(id: TNotificationId | INotification): void {\n notificationsStore.dispatch(\n notificationsActions.delete({ id: typeof id === 'object' ? id.id : id }),\n );\n }\n\n getSelector(): (\n selector: TNotificationSelector<TNotificationType>,\n ) => INotification<TNotificationType>[] {\n return (selector: TNotificationSelector<TNotificationType>) => {\n return useNotificationsSelector((global) => {\n return selector(\n global.notificationsSlice\n .notifications as INotification<TNotificationType>[],\n );\n });\n };\n }\n\n notify(notification: TDispatchedNotification): void {\n const id = notification.id ?? uniqueId();\n\n if (notification.onClose)\n onCloseNotificationCallbacks[id] = notification.onClose;\n\n notificationsStore.dispatch(\n notificationsActions.push({\n notifications: [\n {\n ...notification,\n isOpen: true,\n type: notification.type ?? 'warning',\n id,\n onClose: undefined,\n },\n ],\n }),\n );\n }\n}\n\nexport const defaultNotifier = new DefaultNotifier();\n\nexport function notify(notification: TDispatchedNotification) {\n new DefaultNotifier().notify(notification);\n}\n","import * as React from 'react';\nimport { Alert, Box, Close } from '@apia/theme';\nimport { CSSTransition } from 'react-transition-group';\nimport { getIndex, useUnmount, useUpdateEffect } from '@apia/util';\nimport { Icon, isIconName, TIconName } from '@apia/icons';\nimport { INotification } from './types';\nimport {\n defaultNotifier,\n onCloseNotificationCallbacks,\n} from './defaultNotifier';\n\nexport interface INotificationProps {\n animationName?: string;\n animationTimeout?: number;\n className?: string;\n disableClose?: boolean;\n notification: INotification;\n}\n\nexport const Notification: React.FC<INotificationProps> = ({\n animationName = 'fromRight',\n animationTimeout = 150,\n className,\n disableClose,\n notification,\n}) => {\n const innerNotification = React.useMemo(\n () => ({ ...notification }),\n [notification],\n );\n const nodeRef = React.useRef(null);\n if (!innerNotification.title)\n innerNotification.title = getIndex(\n [window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],\n [\n innerNotification.type === 'danger',\n innerNotification.type === 'warning',\n innerNotification.type === 'success',\n ],\n );\n if (!innerNotification.icon)\n innerNotification.icon = getIndex<TIconName>(\n ['Check', 'Alert', 'Close'],\n [\n innerNotification.type === 'success',\n innerNotification.type === 'warning',\n innerNotification.type === 'danger',\n ],\n );\n\n const [shouldShow, setShouldShow] = React.useState(true);\n\n const close = React.useCallback(() => {\n defaultNotifier.delete(innerNotification);\n }, [innerNotification]);\n\n useUpdateEffect(() => {\n if (!innerNotification.isOpen) setShouldShow(false);\n }, [innerNotification.isOpen]);\n\n useUnmount(() => {\n if (onCloseNotificationCallbacks[innerNotification.id])\n onCloseNotificationCallbacks[innerNotification.id]();\n });\n\n let notificationType: INotification['type'] = 'warning';\n if (['sysException', 'exception', 'danger'].includes(innerNotification.type))\n notificationType = 'danger';\n if (['greenMessage', 'success'].includes(innerNotification.type))\n notificationType = 'success';\n\n const onClick = React.useCallback(() => {\n setShouldShow(false);\n }, []);\n\n return (\n <CSSTransition\n in={shouldShow}\n timeout={animationTimeout}\n classNames={animationName}\n appear\n unmountOnExit\n onExited={close}\n nodeRef={nodeRef}\n >\n <Alert\n data-testid={notificationType}\n role=\"alert\"\n ref={nodeRef}\n variant={`alerts.${notificationType}`}\n className={`${\n className ?? ''\n } notification notification__alert ${notificationType}`}\n tabIndex={0}\n onKeyDown={React.useCallback((ev: React.KeyboardEvent) => {\n if (\n ev.key.toLowerCase() === 'escape' ||\n ev.key.toLowerCase() === 'enter' ||\n ev.key === ' '\n ) {\n ev.preventDefault();\n ev.stopPropagation();\n setShouldShow(false);\n }\n }, [])}\n >\n {(!disableClose ||\n innerNotification.icon ||\n innerNotification.title) && (\n <Box className=\"notification__header\">\n {(innerNotification.title || innerNotification.icon) && (\n <Box as=\"h4\" className=\"notification__title\">\n {innerNotification.icon && (\n <Box className=\"notification__icon\">\n {isIconName(\n innerNotification.icon as unknown as TIconName,\n ) ? (\n <Icon\n title=\"\"\n name={innerNotification.icon as unknown as TIconName}\n />\n ) : (\n innerNotification.icon\n )}\n </Box>\n )}\n {innerNotification.title}\n </Box>\n )}\n {!disableClose && (\n <Close\n type=\"button\"\n onClick={onClick}\n tabIndex={-1}\n className=\"notification__closeButton\"\n />\n )}\n </Box>\n )}\n <Box className=\"notification__body\">\n <Box className=\"notification__content\">\n <Box className=\"notification__message\">\n <Box\n dangerouslySetInnerHTML={{\n __html: innerNotification.message,\n }}\n className=\"notification__text\"\n />\n </Box>\n {innerNotification.trace && (\n <>\n <Box as=\"code\" className=\"notification__trace\">\n <Box as=\"strong\" className=\"notification__traceLabel\">\n Trace:\n </Box>\n <Box className=\"notification__traceText\">\n {innerNotification.trace}\n </Box>\n </Box>\n </>\n )}\n </Box>\n </Box>\n </Alert>\n </CSSTransition>\n );\n};\n","import React from 'react';\nimport { Box } from '@apia/theme';\nimport { getVariant, makeStyledComponent, spacing } from '@apia/theme';\nimport { keyframes } from '@emotion/react';\nimport { Notification } from './Notification';\nimport { useNotificationsSelector } from './notificationsStore';\n\nconst vibrate = keyframes`\n0% {\n transform: rotate(0);\n}\n\n25% {\n transform: rotate(1.5deg);\n}\n\n75% {\n transform: rotate(-1.5deg);\n}\n\n100% {\n transform: rotate(0);\n}`;\n\nconst NotificationsList = makeStyledComponent(\n 'NotificationsList',\n 'layout.common.notifications.list',\n {\n '.notificationsFloatingList': {\n bottom: '10px',\n height: 'min-content',\n maxHeight: 'calc(100vh - 20px)',\n maxWidth: 'floatingNotifications',\n position: 'fixed',\n pr: '5px',\n right: '5px',\n width: '100%',\n zIndex: 'notifications',\n\n '& > *:not(:last-child)': {\n mb: spacing(5),\n },\n\n '.notification.animate': {\n animation: `${vibrate} 0.1s linear infinite`,\n },\n },\n\n '.fromRight-enter, .fromRight-appear': { transform: 'translateX(550px)' },\n '.fromRight-enter-active, .fromRight-appear-active': {\n transition: 'transform 150ms',\n transform: 'translateX(0)',\n },\n '.fromRight-exit': { transform: 'translateX(0)' },\n '.fromRight-exit-active': {\n transition: 'transform 150ms',\n transform: 'translateX(550px)',\n },\n },\n () => {\n const notifications = useNotificationsSelector((current) => {\n return current.notificationsSlice.notifications;\n });\n\n return (\n <Box\n className=\"notificationsFloatingList\"\n {...getVariant('layout.common.components.notifications.list')}\n >\n {notifications.map((current) => {\n return <Notification notification={current} key={current.id} />;\n })}\n </Box>\n );\n },\n);\n\nexport default React.memo(NotificationsList);\n","import { arrayOrArray, TApiaSystemMessageObj } from '@apia/util';\nimport { uniqueId } from 'lodash-es';\nimport { notify, TNotificationType } from '../defaultNotifier';\nimport { INotification } from '../types';\nimport { TMessage, TNotificationMessage } from './types';\n\n/**\n * Devuelve un array de notificaciones a partir de\n * una respuesta de Apia.\n */\nexport const getNotificationMessageObj = (\n data: TApiaSystemMessageObj,\n): INotification<TNotificationType>[] | null => {\n const notifications: INotification<TNotificationType>[] = [];\n if (data?.sysMessages?.message) {\n notifications.push(\n ...parseServerNotification(data.sysMessages.message, 'warning'),\n );\n }\n if (data?.sysExceptions) {\n notifications.push(\n ...parseServerNotification(data.sysExceptions.exception, 'danger'),\n );\n }\n if (data?.exceptions?.exception) {\n notifications.push(\n ...parseServerNotification(data.exceptions.exception, 'danger'),\n );\n }\n if (notifications.length > 0) return notifications;\n return null;\n};\n\nfunction parseServerNotificationType(type: string): TNotificationType {\n switch (type) {\n case '1':\n return 'success';\n case '2':\n return 'warning';\n case '3':\n return 'danger';\n default:\n return 'warning';\n }\n}\n\n/**\n * Toma un objeto de notificación de servidor y lo convierte a un\n * objeto de notificación de cliente.\n */\nexport const parseServerNotification = (\n serverNotification: TMessage | TMessage[],\n type: TNotificationType,\n): INotification<TNotificationType>[] => {\n const messages = arrayOrArray(serverNotification);\n return messages.map((current) => {\n const returnNotification: INotification<TNotificationType> = {\n message: current.text,\n trace: current.content,\n title: current.title,\n type:\n current.type !== undefined\n ? parseServerNotificationType(current.type)\n : (type as TNotificationType),\n isOpen: true,\n id: uniqueId(),\n };\n return returnNotification;\n });\n};\n\n/**\n * Toma un objeto de respuesta de servidor que puede eventualmente\n * tener notificaciones y las pasa al sistema de notificaciones si\n * es que hay alguna.\n */\nexport const dispatchNotifications = (alert: TNotificationMessage) => {\n if (alert) {\n if (alert.sysMessages?.message)\n parseServerNotification(alert.sysMessages?.message, 'warning').forEach(\n notify,\n );\n if (alert.exceptions?.exception)\n parseServerNotification(alert.exceptions?.exception, 'danger').forEach(\n notify,\n );\n if (alert.sysExceptions?.exception)\n parseServerNotification(alert.sysExceptions?.exception, 'danger').forEach(\n notify,\n );\n }\n};\n\nexport * from './types';\n"],"names":["__spreadProps","__spreadValues","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAAS,yBAAyB,OAAiB,EAAA;AACjD,EAAA,IAAI,WAAc,GAAA,KAAA,CAAA;AAClB,EAAA,QAAA,CACG,gBAAiB,CAAA,gDAAgD,CACjE,CAAA,OAAA,CAAQ,CAAC,OAAY,KAAA;AACpB,IAAA,IAAI,OAAQ,CAAA,WAAA,KAAgB,MAAO,CAAA,OAAO,CAAG,EAAA;AAC3C,MAAA,MAAM,mBAAsB,GAAA,iBAAA;AAAA,QAC1B,OAAA;AAAA,QACA,CAAC,MAAW,KAAA;AACV,UAAO,OAAA,MAAA,CAAO,SAAU,CAAA,QAAA,CAAS,cAAc,CAAA,CAAA;AAAA,SACjD;AAAA,OACF,CAAA;AACA,MAAA,IAAI,mBAAqB,EAAA;AACvB,QAAoB,mBAAA,CAAA,SAAA,CAAU,IAAI,SAAS,CAAA,CAAA;AAC3C,QAAA,UAAA,CAAW,MAAM;AACf,UAAoB,mBAAA,CAAA,SAAA,CAAU,OAAO,SAAS,CAAA,CAAA;AAAA,WAC7C,GAAG,CAAA,CAAA;AACN,QAAc,WAAA,GAAA,IAAA,CAAA;AAAA,OAChB;AACE,QAAQ,OAAA,CAAA,IAAA;AAAA,UACN,uEAAA;AAAA,SACF,CAAA;AAAA,KACJ;AAAA,GACD,CAAA,CAAA;AACH,EAAO,OAAA,WAAA,CAAA;AACT,CAAA;AAEO,MAAM,qBAAqB,WA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A,CAAA,GAAA,EAAA,CAAA,OAAA,EAAS,SAAS,CAAE,CAAA,OAAA;AAAA,QAC7D,MAAA;AAAA,OACF,CAAA;AACF,IAAI,IAAA,CAAA,EAAA,GAAA,KAAA,CAAM,eAAN,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA;AACpB,MAAA,uBAAA,CAAA,CAAwB,EAAM,GAAA,KAAA,CAAA,UAAA,KAAN,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,EAAW,QAAQ,CAAE,CAAA,OAAA;AAAA,QAC7D,MAAA;AAAA,OACF,CAAA;AACF,IAAI,IAAA,CAAA,EAAA,GAAA,KAAA,CAAM,kBAAN,IAAqB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA;AACvB,MAAA,uBAAA,CAAA,CAAwB,EAAM,GAAA,KAAA,CAAA,aAAA,KAAN,IAAqB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,EAAW,QAAQ,CAAE,CAAA,OAAA;AAAA,QAChE,MAAA;AAAA,OACF,CAAA;AAAA,GACJ;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/defaultNotifier.ts","../src/Notification.tsx","../src/NotificationsList.tsx","../src/apia/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { uniqueId } from 'lodash-es';\nimport { INotification, TNotificationId, TNotificationSelector } from './types';\nimport { EventEmitter, useMount, useLatest } from '@apia/util';\nimport { useState } from 'react';\n\nexport const onCloseNotificationCallbacks: Record<string, () => unknown> = {};\n\nexport type TNotificationType = 'danger' | 'success' | 'warning';\n\nfunction shallowEqual(a: unknown[], b: unknown[]) {\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n\n return true;\n}\n\nexport type TDispatchedNotification = Omit<\n INotification<TNotificationType>,\n 'id' | 'type' | 'isOpen'\n> &\n Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;\n\nexport class DefaultNotifier extends EventEmitter<{ changedList: boolean }> {\n notifications: INotification<TNotificationType>[] = [];\n\n areNotificationsOpen(): boolean {\n return !!document.querySelector('.notification');\n }\n\n shout() {\n this.emit('changedList', true);\n }\n\n close(id: TNotificationId | INotification): void {\n const actualId = typeof id === 'object' ? id.id : id;\n this.notifications = this.notifications.map((current) => {\n if (current.id === actualId) {\n current.onClose?.();\n return { ...current, isOpen: false };\n }\n return current;\n });\n this.shout();\n }\n\n closeAll(): void {\n this.notifications = this.notifications.map((current) => {\n current.onClose?.();\n return {\n ...current,\n isOpen: false,\n };\n });\n this.shout();\n }\n\n delete(id: TNotificationId | INotification): void {\n const actualId = typeof id === 'object' ? id.id : id;\n this.notifications = this.notifications.filter(\n (current) => current.id !== actualId,\n );\n this.shout();\n }\n\n useSelector = (\n selector: TNotificationSelector<TNotificationType>,\n ): INotification<TNotificationType>[] => {\n const [state, setState] = useState<INotification<TNotificationType>[]>([]);\n\n const lastState = useLatest(state);\n useMount(() => {\n return this.on('changedList', () => {\n const newState = selector(this.notifications);\n if (!shallowEqual(newState, lastState.current)) {\n setState([...newState]);\n }\n });\n });\n\n return state;\n };\n\n notify(notification: TDispatchedNotification): void {\n const id = notification.id ?? uniqueId();\n\n let hasAnimated = false;\n document\n .querySelectorAll('.notificationsFloatingList .notification__text')\n .forEach((current) => {\n if (current.textContent === notification.message) {\n const notificationElement = (current as HTMLElement).closest(\n '.notification',\n ) as HTMLElement;\n if (notificationElement) {\n notificationElement.classList.add('animate');\n setTimeout(() => {\n notificationElement.classList.remove('animate');\n }, 200);\n hasAnimated = true;\n } else\n console.warn(\n 'A notification with that text was found, but it could not be animated',\n );\n }\n });\n if (hasAnimated) return;\n\n this.notifications.push({\n ...notification,\n isOpen: true,\n type: notification.type ?? 'warning',\n id,\n });\n\n this.shout();\n }\n\n on<K extends 'changedList'>(\n eventName: K,\n fn: (params: { changedList: boolean }[K]) => unknown,\n ): () => void {\n fn(true);\n return super.on(eventName, fn);\n }\n}\n\nexport const defaultNotifier = new DefaultNotifier();\n\nexport function notify(notification: TDispatchedNotification) {\n defaultNotifier.notify(notification);\n}\n","import * as React from 'react';\nimport { Alert, Box, Close } from '@apia/theme';\nimport { CSSTransition } from 'react-transition-group';\nimport { getIndex, useUnmount, useUpdateEffect } from '@apia/util';\nimport { Icon, isIconName, TIconName } from '@apia/icons';\nimport { INotification } from './types';\nimport {\n defaultNotifier,\n onCloseNotificationCallbacks,\n} from './defaultNotifier';\n\nexport interface INotificationProps {\n animationName?: string;\n animationTimeout?: number;\n className?: string;\n disableClose?: boolean;\n notification: INotification;\n}\n\nexport const Notification: React.FC<INotificationProps> = ({\n animationName = 'fromRight',\n animationTimeout = 150,\n className,\n disableClose,\n notification,\n}) => {\n const innerNotification = React.useMemo(\n () => ({ ...notification }),\n [notification],\n );\n const nodeRef = React.useRef(null);\n if (!innerNotification.title)\n innerNotification.title = getIndex(\n [window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],\n [\n innerNotification.type === 'danger',\n innerNotification.type === 'warning',\n innerNotification.type === 'success',\n ],\n );\n if (!innerNotification.icon)\n innerNotification.icon = getIndex<TIconName>(\n ['Check', 'Alert', 'Close'],\n [\n innerNotification.type === 'success',\n innerNotification.type === 'warning',\n innerNotification.type === 'danger',\n ],\n );\n\n const [shouldShow, setShouldShow] = React.useState(true);\n\n const close = React.useCallback(() => {\n defaultNotifier.delete(innerNotification);\n }, [innerNotification]);\n\n useUpdateEffect(() => {\n if (!innerNotification.isOpen) setShouldShow(false);\n }, [innerNotification.isOpen]);\n\n useUnmount(() => {\n if (onCloseNotificationCallbacks[innerNotification.id])\n onCloseNotificationCallbacks[innerNotification.id]();\n });\n\n let notificationType: INotification['type'] = 'warning';\n if (['sysException', 'exception', 'danger'].includes(innerNotification.type))\n notificationType = 'danger';\n if (['greenMessage', 'success'].includes(innerNotification.type))\n notificationType = 'success';\n\n const onClick = React.useCallback(() => {\n setShouldShow(false);\n defaultNotifier.close(innerNotification);\n }, [innerNotification]);\n\n return (\n <CSSTransition\n in={shouldShow}\n timeout={animationTimeout}\n classNames={animationName}\n appear\n unmountOnExit\n onExited={close}\n nodeRef={nodeRef}\n >\n <Alert\n data-testid={notificationType}\n role=\"alert\"\n ref={nodeRef}\n variant={`alerts.${notificationType}`}\n className={`${\n className ?? ''\n } notification notification__alert ${notificationType}`}\n tabIndex={0}\n onKeyDown={React.useCallback((ev: React.KeyboardEvent) => {\n if (\n ev.key.toLowerCase() === 'escape' ||\n ev.key.toLowerCase() === 'enter' ||\n ev.key === ' '\n ) {\n ev.preventDefault();\n ev.stopPropagation();\n setShouldShow(false);\n }\n }, [])}\n >\n {(!disableClose ||\n innerNotification.icon ||\n innerNotification.title) && (\n <Box className=\"notification__header\">\n {(innerNotification.title || innerNotification.icon) && (\n <Box as=\"h4\" className=\"notification__title\">\n {innerNotification.icon && (\n <Box className=\"notification__icon\">\n {isIconName(\n innerNotification.icon as unknown as TIconName,\n ) ? (\n <Icon\n title=\"\"\n name={innerNotification.icon as unknown as TIconName}\n />\n ) : (\n innerNotification.icon\n )}\n </Box>\n )}\n {innerNotification.title}\n </Box>\n )}\n {!disableClose && (\n <Close\n type=\"button\"\n onClick={onClick}\n tabIndex={-1}\n className=\"notification__closeButton\"\n />\n )}\n </Box>\n )}\n <Box className=\"notification__body\">\n <Box className=\"notification__content\">\n <Box className=\"notification__message\">\n <Box\n dangerouslySetInnerHTML={{\n __html: innerNotification.message,\n }}\n className=\"notification__text\"\n />\n </Box>\n {innerNotification.trace && (\n <>\n <Box as=\"code\" className=\"notification__trace\">\n <Box as=\"strong\" className=\"notification__traceLabel\">\n Trace:\n </Box>\n <Box className=\"notification__traceText\">\n {innerNotification.trace}\n </Box>\n </Box>\n </>\n )}\n </Box>\n </Box>\n </Alert>\n </CSSTransition>\n );\n};\n","import React from 'react';\nimport { Box } from '@apia/theme';\nimport { getVariant, makeStyledComponent, spacing } from '@apia/theme';\nimport { keyframes } from '@emotion/react';\nimport { Notification } from './Notification';\nimport { defaultNotifier } from './defaultNotifier';\nimport { useMount } from '@apia/util';\n\nconst vibrate = keyframes`\n0% {\n transform: rotate(0);\n}\n\n25% {\n transform: rotate(1.5deg);\n}\n\n75% {\n transform: rotate(-1.5deg);\n}\n\n100% {\n transform: rotate(0);\n}`;\n\nconst useSelector = defaultNotifier.useSelector;\n\nconst NotificationsList = makeStyledComponent(\n 'NotificationsList',\n 'layout.common.notifications.list',\n {\n '.notificationsFloatingList': {\n bottom: '10px',\n height: 'min-content',\n maxHeight: 'calc(100vh - 20px)',\n maxWidth: 'floatingNotifications',\n position: 'fixed',\n pr: '5px',\n right: '5px',\n width: '100%',\n zIndex: 'notifications',\n\n '& > *:not(:last-child)': {\n mb: spacing(5),\n },\n\n '.notification.animate': {\n animation: `${vibrate} 0.1s linear infinite`,\n },\n },\n\n '.fromRight-enter, .fromRight-appear': { transform: 'translateX(550px)' },\n '.fromRight-enter-active, .fromRight-appear-active': {\n transition: 'transform 150ms',\n transform: 'translateX(0)',\n },\n '.fromRight-exit': { transform: 'translateX(0)' },\n '.fromRight-exit-active': {\n transition: 'transform 150ms',\n transform: 'translateX(550px)',\n },\n },\n () => {\n const notifications = useSelector((current) => {\n return current;\n });\n\n useMount(() => {\n document.addEventListener('keydown', (ev) => {\n if (ev.code === 'Escape') {\n defaultNotifier.closeAll();\n }\n });\n });\n\n return (\n <Box\n className=\"notificationsFloatingList\"\n {...getVariant('layout.common.components.notifications.list')}\n >\n {notifications.map((current) => {\n return <Notification notification={current} key={current.id} />;\n })}\n </Box>\n );\n },\n);\n\nexport default React.memo(NotificationsList);\n","import { arrayOrArray, TApiaSystemMessageObj } from '@apia/util';\nimport { uniqueId } from 'lodash-es';\nimport { notify, TNotificationType } from '../defaultNotifier';\nimport { INotification } from '../types';\nimport { TMessage, TNotificationMessage } from './types';\n\n/**\n * Devuelve un array de notificaciones a partir de\n * una respuesta de Apia.\n */\nexport const getNotificationMessageObj = (\n data: TApiaSystemMessageObj,\n): INotification<TNotificationType>[] | null => {\n const notifications: INotification<TNotificationType>[] = [];\n if (data?.sysMessages?.message) {\n notifications.push(\n ...parseServerNotification(data.sysMessages.message, 'warning'),\n );\n }\n if (data?.sysExceptions) {\n notifications.push(\n ...parseServerNotification(data.sysExceptions.exception, 'danger'),\n );\n }\n if (data?.exceptions?.exception) {\n notifications.push(\n ...parseServerNotification(data.exceptions.exception, 'danger'),\n );\n }\n if (notifications.length > 0) return notifications;\n return null;\n};\n\nfunction parseServerNotificationType(type: string): TNotificationType {\n switch (type) {\n case '1':\n return 'success';\n case '2':\n return 'warning';\n case '3':\n return 'danger';\n default:\n return 'warning';\n }\n}\n\n/**\n * Toma un objeto de notificación de servidor y lo convierte a un\n * objeto de notificación de cliente.\n */\nexport const parseServerNotification = (\n serverNotification: TMessage | TMessage[],\n type: TNotificationType,\n): INotification<TNotificationType>[] => {\n const messages = arrayOrArray(serverNotification);\n return messages.map((current) => {\n const returnNotification: INotification<TNotificationType> = {\n message: current.text,\n trace: current.content,\n title: current.title,\n type:\n current.type !== undefined\n ? parseServerNotificationType(current.type)\n : (type as TNotificationType),\n isOpen: true,\n id: uniqueId(),\n };\n return returnNotification;\n });\n};\n\n/**\n * Toma un objeto de respuesta de servidor que puede eventualmente\n * tener notificaciones y las pasa al sistema de notificaciones si\n * es que hay alguna.\n */\nexport const dispatchNotifications = (alert: TNotificationMessage) => {\n if (alert) {\n if (alert.sysMessages?.message)\n parseServerNotification(alert.sysMessages?.message, 'warning').forEach(\n notify,\n );\n if (alert.exceptions?.exception)\n parseServerNotification(alert.exceptions?.exception, 'danger').forEach(\n notify,\n );\n if (alert.sysExceptions?.exception)\n parseServerNotification(alert.sysExceptions?.exception, 'danger').forEach(\n notify,\n );\n }\n};\n\nexport * from './types';\n"],"names":["__spreadProps","__spreadValues","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,+BAA8D,GAAC;AAI5E,SAAS,YAAA,CAAa,GAAc,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AAA,GAAA,EAAA,CAAA,SAAA;AACpB,MAAA,uBAAA,CAAA,CAAwB,EAAM,GAAA,KAAA,CAAA,UAAA,KAAN,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,EAAW,QAAQ,CAAE,CAAA,OAAA;AAAA,QAC7D,MAAA;AAAA,OACF,CAAA;AACF,IAAI,IAAA,CAAA,EAAA,GAAA,KAAA,CAAM,kBAAN,IAAqB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA;AACvB,MAAA,uBAAA,CAAA,CAAwB,EAAM,GAAA,KAAA,CAAA,aAAA,KAAN,IAAqB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,EAAW,QAAQ,CAAE,CAAA,OAAA;AAAA,QAChE,MAAA;AAAA,OACF,CAAA;AAAA,GACJ;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"name": "@apia/notifications",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.4",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "rollup -c rollup.config.esb.mjs",
|
|
12
12
|
"buildDev": "rollup -c rollup.config.esb.mjs --dev",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"typescript": "^4.9.5"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@apia/icons": "^0.3.2",
|
|
30
|
-
"@apia/store": "^0.3.2",
|
|
31
|
-
"@apia/theme": "^0.3.2",
|
|
32
|
-
"@apia/util": "^0.3.2",
|
|
33
29
|
"@types/lodash-es": "^4.17.7",
|
|
34
30
|
"@types/react-transition-group": "^4.4.5",
|
|
35
31
|
"lodash-es": "^4.17.21",
|
|
36
32
|
"react-transition-group": "^4.4.5"
|
|
37
33
|
},
|
|
38
34
|
"peerDependencies": {
|
|
35
|
+
"@apia/icons": "^0.3.2",
|
|
36
|
+
"@apia/store": "^0.3.2",
|
|
37
|
+
"@apia/theme": "^0.3.2",
|
|
38
|
+
"@apia/util": "^0.3.2",
|
|
39
39
|
"@emotion/react": "^11.10.6",
|
|
40
40
|
"react": "^18.2.0",
|
|
41
41
|
"react-dom": "^18.2.0"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"url": "http://corp-gitlab-01.domst.st.net/products/apia/ApiaNPMPackages.git",
|
|
50
50
|
"directory": "packages/notifications"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c85594050cd0abfe6550184ba6d65753a2e1004e"
|
|
53
53
|
}
|