@apia/notifications 3.0.1 → 3.0.2
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 +96 -6
- package/dist/index.js +452 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/Notification.d.ts +0 -14
- package/dist/Notification.d.ts.map +0 -1
- package/dist/Notification.js +0 -133
- package/dist/Notification.js.map +0 -1
- package/dist/NotificationsList.d.ts +0 -8
- package/dist/NotificationsList.d.ts.map +0 -1
- package/dist/NotificationsList.js +0 -84
- package/dist/NotificationsList.js.map +0 -1
- package/dist/Trace.js +0 -77
- package/dist/Trace.js.map +0 -1
- package/dist/apia/index.d.ts +0 -24
- package/dist/apia/index.d.ts.map +0 -1
- package/dist/apia/index.js +0 -69
- package/dist/apia/index.js.map +0 -1
- package/dist/apia/types.d.ts +0 -21
- package/dist/apia/types.d.ts.map +0 -1
- package/dist/defaultNotifier.d.ts +0 -27
- package/dist/defaultNotifier.d.ts.map +0 -1
- package/dist/defaultNotifier.js +0 -116
- package/dist/defaultNotifier.js.map +0 -1
- package/dist/types.d.ts +0 -24
- package/dist/types.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import { EventEmitter, TApiaSystemMessageObj } from '@apia/util';
|
|
4
|
+
|
|
5
|
+
type TNotificationId = string | number;
|
|
6
|
+
interface INotification<T = string> {
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
id: TNotificationId;
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
onClose?: () => unknown;
|
|
12
|
+
title?: string;
|
|
13
|
+
trace?: string;
|
|
14
|
+
type: T;
|
|
15
|
+
}
|
|
16
|
+
type TNotificationSelector<T> = (notifications: INotification<T>[]) => INotification<T>[];
|
|
17
|
+
declare global {
|
|
18
|
+
interface Window {
|
|
19
|
+
LBL_ERROR: string;
|
|
20
|
+
LBL_WARNING: string;
|
|
21
|
+
LBL_COMPLETE_OPERATION: string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface INotificationProps {
|
|
26
|
+
animationName?: string;
|
|
27
|
+
animationTimeout?: number;
|
|
28
|
+
className?: string;
|
|
29
|
+
disableClose?: boolean;
|
|
30
|
+
notification: INotification;
|
|
31
|
+
}
|
|
32
|
+
declare const Notification: React.FC<INotificationProps>;
|
|
33
|
+
|
|
34
|
+
declare const _default: React__default.MemoExoticComponent<((props: object) => React__default.JSX.Element) & {
|
|
35
|
+
displayName: string;
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
declare const onCloseNotificationCallbacks: Record<string, () => unknown>;
|
|
39
|
+
type TNotificationType = 'danger' | 'success' | 'warning';
|
|
40
|
+
declare function uniqueId(): string;
|
|
41
|
+
type TDispatchedNotification = Omit<INotification<TNotificationType>, 'id' | 'type' | 'isOpen'> & Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;
|
|
42
|
+
declare class DefaultNotifier extends EventEmitter<{
|
|
43
|
+
changedList: boolean;
|
|
44
|
+
}> {
|
|
45
|
+
notifications: INotification<TNotificationType>[];
|
|
46
|
+
areNotificationsOpen(): boolean;
|
|
47
|
+
shout(): void;
|
|
48
|
+
close(id: TNotificationId | INotification): void;
|
|
49
|
+
closeAll(): void;
|
|
50
|
+
delete(id: TNotificationId | INotification): void;
|
|
51
|
+
useSelector: (selector: TNotificationSelector<TNotificationType>) => INotification<TNotificationType>[];
|
|
52
|
+
notify(notification: TDispatchedNotification): void;
|
|
53
|
+
on<K extends 'changedList'>(eventName: K, fn: (params: {
|
|
54
|
+
changedList: boolean;
|
|
55
|
+
}[K]) => unknown): () => void;
|
|
56
|
+
}
|
|
57
|
+
declare const defaultNotifier: DefaultNotifier;
|
|
58
|
+
declare function notify(notification: TDispatchedNotification): void;
|
|
59
|
+
|
|
60
|
+
interface TMessage {
|
|
61
|
+
text: string;
|
|
62
|
+
content?: string;
|
|
63
|
+
title?: string;
|
|
64
|
+
type?: string;
|
|
65
|
+
}
|
|
66
|
+
interface TNotificationMessage {
|
|
67
|
+
onClose?: string;
|
|
68
|
+
sysMessages?: {
|
|
69
|
+
message: TMessage | TMessage[];
|
|
70
|
+
};
|
|
71
|
+
sysExceptions?: {
|
|
72
|
+
exception: TMessage | TMessage[];
|
|
73
|
+
};
|
|
74
|
+
exceptions?: {
|
|
75
|
+
exception: TMessage | TMessage[];
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Devuelve un array de notificaciones a partir de
|
|
81
|
+
* una respuesta de Apia.
|
|
82
|
+
*/
|
|
83
|
+
declare const getNotificationMessageObj: (data: TApiaSystemMessageObj) => INotification<TNotificationType>[] | null;
|
|
84
|
+
/**
|
|
85
|
+
* Toma un objeto de notificación de servidor y lo convierte a un
|
|
86
|
+
* objeto de notificación de cliente.
|
|
87
|
+
*/
|
|
88
|
+
declare const parseServerNotification: (serverNotification: TMessage | TMessage[], type: TNotificationType) => INotification<TNotificationType>[];
|
|
89
|
+
/**
|
|
90
|
+
* Toma un objeto de respuesta de servidor que puede eventualmente
|
|
91
|
+
* tener notificaciones y las pasa al sistema de notificaciones si
|
|
92
|
+
* es que hay alguna.
|
|
93
|
+
*/
|
|
94
|
+
declare const dispatchNotifications: (alert: TNotificationMessage) => void;
|
|
95
|
+
|
|
96
|
+
export { DefaultNotifier, type INotification, Notification, _default as NotificationsList, type TDispatchedNotification, type TMessage, type TNotificationId, type TNotificationMessage, type TNotificationSelector, type TNotificationType, defaultNotifier, dispatchNotifications, getNotificationMessageObj, notify, onCloseNotificationCallbacks, parseServerNotification, uniqueId };
|
|
7
97
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,453 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs, jsx, Fragment } from '@apia/theme/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { useState } from 'react';
|
|
4
|
+
import { Box, IconButton, Button, Alert, Close, makeStyledComponent, spacing, getVariant } from '@apia/theme';
|
|
5
|
+
import { CSSTransition } from 'react-transition-group';
|
|
6
|
+
import { EventEmitter, useLatest, useMount, getIndex, useUpdateEffect, useUnmount, arrayOrArray } from '@apia/util';
|
|
7
|
+
import { Icon, isIconName } from '@apia/icons';
|
|
8
|
+
import { keyframes } from '@emotion/react';
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __publicField = (obj, key, value) => {
|
|
13
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
16
|
+
const onCloseNotificationCallbacks = {};
|
|
17
|
+
function shallowEqual(a, b) {
|
|
18
|
+
if (a.length !== b.length)
|
|
19
|
+
return false;
|
|
20
|
+
for (let i = 0; i < a.length; i++)
|
|
21
|
+
if (a[i] !== b[i])
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
let id = 0;
|
|
26
|
+
function uniqueId() {
|
|
27
|
+
return `notification_${id++}`;
|
|
28
|
+
}
|
|
29
|
+
class DefaultNotifier extends EventEmitter {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
__publicField(this, "notifications", []);
|
|
33
|
+
__publicField(this, "useSelector", (selector) => {
|
|
34
|
+
const [state, setState] = useState([]);
|
|
35
|
+
const lastState = useLatest(state);
|
|
36
|
+
useMount(() => {
|
|
37
|
+
return this.on("changedList", () => {
|
|
38
|
+
const newState = selector(this.notifications);
|
|
39
|
+
if (!shallowEqual(newState, lastState.current)) {
|
|
40
|
+
setState([...newState]);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return state;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
areNotificationsOpen() {
|
|
48
|
+
return !!document.querySelector(".notification");
|
|
49
|
+
}
|
|
50
|
+
shout() {
|
|
51
|
+
this.emit("changedList", true);
|
|
52
|
+
}
|
|
53
|
+
close(id2) {
|
|
54
|
+
const actualId = typeof id2 === "object" ? id2.id : id2;
|
|
55
|
+
this.notifications = this.notifications.map((current) => {
|
|
56
|
+
if (current.id === actualId) {
|
|
57
|
+
current.onClose?.();
|
|
58
|
+
return { ...current, isOpen: false };
|
|
59
|
+
}
|
|
60
|
+
return current;
|
|
61
|
+
});
|
|
62
|
+
this.shout();
|
|
63
|
+
}
|
|
64
|
+
closeAll() {
|
|
65
|
+
this.notifications = this.notifications.map((current) => {
|
|
66
|
+
current.onClose?.();
|
|
67
|
+
return {
|
|
68
|
+
...current,
|
|
69
|
+
isOpen: false
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
this.shout();
|
|
73
|
+
}
|
|
74
|
+
delete(id2) {
|
|
75
|
+
const actualId = typeof id2 === "object" ? id2.id : id2;
|
|
76
|
+
this.notifications = this.notifications.filter(
|
|
77
|
+
(current) => current.id !== actualId
|
|
78
|
+
);
|
|
79
|
+
this.shout();
|
|
80
|
+
}
|
|
81
|
+
notify(notification) {
|
|
82
|
+
const id2 = notification.id ?? uniqueId();
|
|
83
|
+
let hasAnimated = false;
|
|
84
|
+
document.querySelectorAll(".notificationsFloatingList .notification__text").forEach((current) => {
|
|
85
|
+
if (current.textContent === notification.message) {
|
|
86
|
+
const notificationElement = current.closest(
|
|
87
|
+
".notification"
|
|
88
|
+
);
|
|
89
|
+
if (notificationElement) {
|
|
90
|
+
notificationElement.classList.add("animate");
|
|
91
|
+
setTimeout(() => {
|
|
92
|
+
notificationElement.classList.remove("animate");
|
|
93
|
+
}, 200);
|
|
94
|
+
hasAnimated = true;
|
|
95
|
+
} else
|
|
96
|
+
console.warn(
|
|
97
|
+
"A notification with that text was found, but it could not be animated"
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
if (hasAnimated)
|
|
102
|
+
return;
|
|
103
|
+
this.notifications.push({
|
|
104
|
+
...notification,
|
|
105
|
+
isOpen: true,
|
|
106
|
+
type: notification.type ?? "warning",
|
|
107
|
+
id: id2
|
|
108
|
+
});
|
|
109
|
+
this.shout();
|
|
110
|
+
}
|
|
111
|
+
on(eventName, fn) {
|
|
112
|
+
fn(true);
|
|
113
|
+
return super.on(eventName, fn);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const defaultNotifier = new DefaultNotifier();
|
|
117
|
+
function notify(notification) {
|
|
118
|
+
defaultNotifier.notify(notification);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const Trace = ({ trace }) => {
|
|
122
|
+
const openModal = () => {
|
|
123
|
+
document.dispatchEvent(
|
|
124
|
+
new CustomEvent("openModal", {
|
|
125
|
+
detail: {
|
|
126
|
+
NavBar: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
127
|
+
Button,
|
|
128
|
+
{
|
|
129
|
+
variant: "outline-sm",
|
|
130
|
+
onClick: () => {
|
|
131
|
+
void navigator.clipboard.writeText(
|
|
132
|
+
document.querySelector(".TraceModal__content")?.innerText ?? ""
|
|
133
|
+
);
|
|
134
|
+
},
|
|
135
|
+
children: "Copy trace"
|
|
136
|
+
}
|
|
137
|
+
) }),
|
|
138
|
+
children: /* @__PURE__ */ jsx(
|
|
139
|
+
Box,
|
|
140
|
+
{
|
|
141
|
+
dangerouslySetInnerHTML: {
|
|
142
|
+
__html: trace.replaceAll(
|
|
143
|
+
/\((\w+\.java:\d+)\)/g,
|
|
144
|
+
"(<strong>$1</strong>)"
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
size: "xxl",
|
|
150
|
+
title: "Stack trace"
|
|
151
|
+
}
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
return /* @__PURE__ */ jsxs(Box, { as: "code", className: "notification__trace", children: [
|
|
156
|
+
/* @__PURE__ */ jsxs(Box, { as: "strong", className: "notification__traceLabel", children: [
|
|
157
|
+
/* @__PURE__ */ jsx(
|
|
158
|
+
IconButton,
|
|
159
|
+
{
|
|
160
|
+
size: "IconMd",
|
|
161
|
+
onClick: openModal,
|
|
162
|
+
title: "View trace",
|
|
163
|
+
sx: {
|
|
164
|
+
height: "24px",
|
|
165
|
+
width: "24px"
|
|
166
|
+
},
|
|
167
|
+
children: /* @__PURE__ */ jsx(Icon, { size: "iconXs", title: "", name: "External" })
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ jsx(
|
|
171
|
+
IconButton,
|
|
172
|
+
{
|
|
173
|
+
size: "IconMd",
|
|
174
|
+
title: "Copy trace",
|
|
175
|
+
sx: {
|
|
176
|
+
height: "24px",
|
|
177
|
+
width: "24px"
|
|
178
|
+
},
|
|
179
|
+
onClick: () => void navigator.clipboard.writeText(
|
|
180
|
+
trace.replaceAll(/<br *\/?>/g, "\n")
|
|
181
|
+
),
|
|
182
|
+
children: /* @__PURE__ */ jsx(Icon, { size: "iconXs", title: "", name: "Copy" })
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ jsx(Box, { as: "span", children: "Trace:" })
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ jsx(Box, { className: "notification__traceText", children: trace })
|
|
188
|
+
] });
|
|
189
|
+
};
|
|
190
|
+
var Trace$1 = Trace;
|
|
191
|
+
|
|
192
|
+
const Notification = ({
|
|
193
|
+
animationName = "fromRight",
|
|
194
|
+
animationTimeout = 150,
|
|
195
|
+
className,
|
|
196
|
+
disableClose,
|
|
197
|
+
notification
|
|
198
|
+
}) => {
|
|
199
|
+
const innerNotification = React.useMemo(
|
|
200
|
+
() => ({ ...notification }),
|
|
201
|
+
[notification]
|
|
202
|
+
);
|
|
203
|
+
const nodeRef = React.useRef(null);
|
|
204
|
+
if (!innerNotification.title)
|
|
205
|
+
innerNotification.title = getIndex(
|
|
206
|
+
[window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],
|
|
207
|
+
[
|
|
208
|
+
innerNotification.type === "danger",
|
|
209
|
+
innerNotification.type === "warning",
|
|
210
|
+
innerNotification.type === "success"
|
|
211
|
+
]
|
|
212
|
+
);
|
|
213
|
+
if (!innerNotification.icon)
|
|
214
|
+
innerNotification.icon = getIndex(
|
|
215
|
+
["Check", "Alert", "Close"],
|
|
216
|
+
[
|
|
217
|
+
innerNotification.type === "success",
|
|
218
|
+
innerNotification.type === "warning",
|
|
219
|
+
innerNotification.type === "danger"
|
|
220
|
+
]
|
|
221
|
+
);
|
|
222
|
+
const [shouldShow, setShouldShow] = React.useState(true);
|
|
223
|
+
const close = React.useCallback(() => {
|
|
224
|
+
defaultNotifier.delete(innerNotification);
|
|
225
|
+
}, [innerNotification]);
|
|
226
|
+
useUpdateEffect(() => {
|
|
227
|
+
if (!innerNotification.isOpen)
|
|
228
|
+
setShouldShow(false);
|
|
229
|
+
}, [innerNotification.isOpen]);
|
|
230
|
+
useUnmount(() => {
|
|
231
|
+
if (onCloseNotificationCallbacks[innerNotification.id])
|
|
232
|
+
onCloseNotificationCallbacks[innerNotification.id]();
|
|
233
|
+
});
|
|
234
|
+
let notificationType = "warning";
|
|
235
|
+
if (["sysException", "exception", "danger"].includes(innerNotification.type))
|
|
236
|
+
notificationType = "danger";
|
|
237
|
+
if (["greenMessage", "success"].includes(innerNotification.type))
|
|
238
|
+
notificationType = "success";
|
|
239
|
+
if (["info"].includes(innerNotification.type))
|
|
240
|
+
notificationType = "info";
|
|
241
|
+
const onClick = React.useCallback(() => {
|
|
242
|
+
setShouldShow(false);
|
|
243
|
+
defaultNotifier.close(innerNotification);
|
|
244
|
+
}, [innerNotification]);
|
|
245
|
+
return /* @__PURE__ */ jsx(
|
|
246
|
+
CSSTransition,
|
|
247
|
+
{
|
|
248
|
+
in: shouldShow,
|
|
249
|
+
timeout: animationTimeout,
|
|
250
|
+
classNames: animationName,
|
|
251
|
+
appear: true,
|
|
252
|
+
unmountOnExit: true,
|
|
253
|
+
onExited: close,
|
|
254
|
+
nodeRef,
|
|
255
|
+
children: /* @__PURE__ */ jsxs(
|
|
256
|
+
Alert,
|
|
257
|
+
{
|
|
258
|
+
"data-testid": notificationType,
|
|
259
|
+
role: "alert",
|
|
260
|
+
ref: nodeRef,
|
|
261
|
+
variant: `alerts.${notificationType}`,
|
|
262
|
+
className: `${className ?? ""} notification notification__alert ${notificationType}`,
|
|
263
|
+
tabIndex: 0,
|
|
264
|
+
onKeyDown: React.useCallback((ev) => {
|
|
265
|
+
if (ev.key.toLowerCase() === "escape" || ev.key.toLowerCase() === "enter" || ev.key === " ") {
|
|
266
|
+
ev.preventDefault();
|
|
267
|
+
ev.stopPropagation();
|
|
268
|
+
setShouldShow(false);
|
|
269
|
+
}
|
|
270
|
+
}, []),
|
|
271
|
+
children: [
|
|
272
|
+
(!disableClose || innerNotification.icon || innerNotification.title) && /* @__PURE__ */ jsxs(Box, { className: "notification__header", children: [
|
|
273
|
+
(innerNotification.title || innerNotification.icon) && /* @__PURE__ */ jsxs(Box, { as: "h4", className: "notification__title", children: [
|
|
274
|
+
innerNotification.icon && /* @__PURE__ */ jsx(Box, { className: "notification__icon", children: isIconName(
|
|
275
|
+
innerNotification.icon
|
|
276
|
+
) ? /* @__PURE__ */ jsx(
|
|
277
|
+
Icon,
|
|
278
|
+
{
|
|
279
|
+
title: "",
|
|
280
|
+
name: innerNotification.icon
|
|
281
|
+
}
|
|
282
|
+
) : innerNotification.icon }),
|
|
283
|
+
innerNotification.title
|
|
284
|
+
] }),
|
|
285
|
+
!disableClose && /* @__PURE__ */ jsx(
|
|
286
|
+
Close,
|
|
287
|
+
{
|
|
288
|
+
type: "button",
|
|
289
|
+
onClick,
|
|
290
|
+
tabIndex: -1,
|
|
291
|
+
className: "notification__closeButton"
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ jsx(Box, { className: "notification__body", children: /* @__PURE__ */ jsxs(Box, { className: "notification__content", children: [
|
|
296
|
+
/* @__PURE__ */ jsx(Box, { className: "notification__message", children: /* @__PURE__ */ jsx(
|
|
297
|
+
Box,
|
|
298
|
+
{
|
|
299
|
+
dangerouslySetInnerHTML: {
|
|
300
|
+
__html: innerNotification.message
|
|
301
|
+
},
|
|
302
|
+
className: "notification__text"
|
|
303
|
+
}
|
|
304
|
+
) }),
|
|
305
|
+
innerNotification.trace && /* @__PURE__ */ jsx(Trace$1, { trace: innerNotification.trace })
|
|
306
|
+
] }) })
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
const vibrate = keyframes`
|
|
315
|
+
0% {
|
|
316
|
+
transform: rotate(0);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
25% {
|
|
320
|
+
transform: rotate(1.5deg);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
75% {
|
|
324
|
+
transform: rotate(-1.5deg);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
100% {
|
|
328
|
+
transform: rotate(0);
|
|
329
|
+
}`;
|
|
330
|
+
const useSelector = defaultNotifier.useSelector;
|
|
331
|
+
const NotificationsList = makeStyledComponent(
|
|
332
|
+
"NotificationsList",
|
|
333
|
+
"layout.common.notifications.list",
|
|
334
|
+
{
|
|
335
|
+
".notificationsFloatingList": {
|
|
336
|
+
bottom: "10px",
|
|
337
|
+
height: "min-content",
|
|
338
|
+
maxHeight: "calc(100vh - 20px)",
|
|
339
|
+
maxWidth: "floatingNotifications",
|
|
340
|
+
position: "fixed",
|
|
341
|
+
pr: "5px",
|
|
342
|
+
right: "5px",
|
|
343
|
+
width: "100%",
|
|
344
|
+
zIndex: "notifications",
|
|
345
|
+
"& > *:not(:last-child)": {
|
|
346
|
+
mb: spacing(5)
|
|
347
|
+
},
|
|
348
|
+
".notification.animate": {
|
|
349
|
+
animation: `${vibrate} 0.1s linear infinite`
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
".fromRight-enter, .fromRight-appear": { transform: "translateX(550px)" },
|
|
353
|
+
".fromRight-enter-active, .fromRight-appear-active": {
|
|
354
|
+
transition: "transform 150ms",
|
|
355
|
+
transform: "translateX(0)"
|
|
356
|
+
},
|
|
357
|
+
".fromRight-exit": { transform: "translateX(0)" },
|
|
358
|
+
".fromRight-exit-active": {
|
|
359
|
+
transition: "transform 150ms",
|
|
360
|
+
transform: "translateX(550px)"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
() => {
|
|
364
|
+
const notifications = useSelector((current) => {
|
|
365
|
+
return current;
|
|
366
|
+
});
|
|
367
|
+
useMount(() => {
|
|
368
|
+
document.addEventListener("keydown", (ev) => {
|
|
369
|
+
if (ev.code === "Escape") {
|
|
370
|
+
defaultNotifier.closeAll();
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
return /* @__PURE__ */ jsx(
|
|
375
|
+
Box,
|
|
376
|
+
{
|
|
377
|
+
className: "notificationsFloatingList",
|
|
378
|
+
...getVariant("layout.common.components.notifications.list"),
|
|
379
|
+
children: notifications.map((current) => {
|
|
380
|
+
return /* @__PURE__ */ jsx(Notification, { notification: current }, current.id);
|
|
381
|
+
})
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
var NotificationsList$1 = React__default.memo(NotificationsList);
|
|
387
|
+
|
|
388
|
+
const getNotificationMessageObj = (data) => {
|
|
389
|
+
const notifications = [];
|
|
390
|
+
if (data?.sysMessages?.message) {
|
|
391
|
+
notifications.push(
|
|
392
|
+
...parseServerNotification(data.sysMessages.message, "warning")
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
if (data?.sysExceptions) {
|
|
396
|
+
notifications.push(
|
|
397
|
+
...parseServerNotification(data.sysExceptions.exception, "danger")
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
if (data?.exceptions?.exception) {
|
|
401
|
+
notifications.push(
|
|
402
|
+
...parseServerNotification(data.exceptions.exception, "danger")
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
if (notifications.length > 0)
|
|
406
|
+
return notifications;
|
|
407
|
+
return null;
|
|
408
|
+
};
|
|
409
|
+
function parseServerNotificationType(type) {
|
|
410
|
+
switch (type) {
|
|
411
|
+
case "1":
|
|
412
|
+
return "success";
|
|
413
|
+
case "2":
|
|
414
|
+
return "warning";
|
|
415
|
+
case "3":
|
|
416
|
+
return "danger";
|
|
417
|
+
default:
|
|
418
|
+
return "warning";
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
const parseServerNotification = (serverNotification, type) => {
|
|
422
|
+
const messages = arrayOrArray(serverNotification);
|
|
423
|
+
return messages.map((current) => {
|
|
424
|
+
const returnNotification = {
|
|
425
|
+
message: current.text,
|
|
426
|
+
trace: current.content,
|
|
427
|
+
title: current.title,
|
|
428
|
+
type: current.type !== void 0 ? parseServerNotificationType(current.type) : type,
|
|
429
|
+
isOpen: true,
|
|
430
|
+
id: uniqueId()
|
|
431
|
+
};
|
|
432
|
+
return returnNotification;
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
const dispatchNotifications = (alert) => {
|
|
436
|
+
if (alert) {
|
|
437
|
+
if (alert.sysMessages?.message)
|
|
438
|
+
parseServerNotification(alert.sysMessages?.message, "warning").forEach(
|
|
439
|
+
notify
|
|
440
|
+
);
|
|
441
|
+
if (alert.exceptions?.exception)
|
|
442
|
+
parseServerNotification(alert.exceptions?.exception, "danger").forEach(
|
|
443
|
+
notify
|
|
444
|
+
);
|
|
445
|
+
if (alert.sysExceptions?.exception)
|
|
446
|
+
parseServerNotification(alert.sysExceptions?.exception, "danger").forEach(
|
|
447
|
+
notify
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
export { DefaultNotifier, Notification, NotificationsList$1 as NotificationsList, defaultNotifier, dispatchNotifications, getNotificationMessageObj, notify, onCloseNotificationCallbacks, parseServerNotification, uniqueId };
|
|
5
453
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/defaultNotifier.ts","../src/Trace.tsx","../src/Notification.tsx","../src/NotificationsList.tsx","../src/apia/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { INotification, TNotificationId, TNotificationSelector } from './types';\r\nimport { EventEmitter, useMount, useLatest } from '@apia/util';\r\nimport { useState } from 'react';\r\n\r\nexport const onCloseNotificationCallbacks: Record<string, () => unknown> = {};\r\n\r\nexport type TNotificationType = 'danger' | 'success' | 'warning';\r\n\r\nfunction shallowEqual(a: unknown[], b: unknown[]) {\r\n if (a.length !== b.length) return false;\r\n\r\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\r\n\r\n return true;\r\n}\r\n\r\nlet id=0;\r\nexport function uniqueId() {\r\n return `notification_${id++}`\r\n}\r\n\r\nexport type TDispatchedNotification = Omit<\r\n INotification<TNotificationType>,\r\n 'id' | 'type' | 'isOpen'\r\n> &\r\n Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;\r\n\r\nexport class DefaultNotifier extends EventEmitter<{ changedList: boolean }> {\r\n notifications: INotification<TNotificationType>[] = [];\r\n\r\n areNotificationsOpen(): boolean {\r\n return !!document.querySelector('.notification');\r\n }\r\n\r\n shout() {\r\n this.emit('changedList', true);\r\n }\r\n\r\n close(id: TNotificationId | INotification): void {\r\n const actualId = typeof id === 'object' ? id.id : id;\r\n this.notifications = this.notifications.map((current) => {\r\n if (current.id === actualId) {\r\n current.onClose?.();\r\n return { ...current, isOpen: false };\r\n }\r\n return current;\r\n });\r\n this.shout();\r\n }\r\n\r\n closeAll(): void {\r\n this.notifications = this.notifications.map((current) => {\r\n current.onClose?.();\r\n return {\r\n ...current,\r\n isOpen: false,\r\n };\r\n });\r\n this.shout();\r\n }\r\n\r\n delete(id: TNotificationId | INotification): void {\r\n const actualId = typeof id === 'object' ? id.id : id;\r\n this.notifications = this.notifications.filter(\r\n (current) => current.id !== actualId,\r\n );\r\n this.shout();\r\n }\r\n\r\n useSelector = (\r\n selector: TNotificationSelector<TNotificationType>,\r\n ): INotification<TNotificationType>[] => {\r\n const [state, setState] = useState<INotification<TNotificationType>[]>([]);\r\n\r\n const lastState = useLatest(state);\r\n useMount(() => {\r\n return this.on('changedList', () => {\r\n const newState = selector(this.notifications);\r\n if (!shallowEqual(newState, lastState.current)) {\r\n setState([...newState]);\r\n }\r\n });\r\n });\r\n\r\n return state;\r\n };\r\n\r\n notify(notification: TDispatchedNotification): void {\r\n const id = notification.id ?? uniqueId();\r\n\r\n let hasAnimated = false;\r\n document\r\n .querySelectorAll('.notificationsFloatingList .notification__text')\r\n .forEach((current) => {\r\n if (current.textContent === notification.message) {\r\n const notificationElement = (current as HTMLElement).closest(\r\n '.notification',\r\n ) as HTMLElement;\r\n if (notificationElement) {\r\n notificationElement.classList.add('animate');\r\n setTimeout(() => {\r\n notificationElement.classList.remove('animate');\r\n }, 200);\r\n hasAnimated = true;\r\n } else\r\n console.warn(\r\n 'A notification with that text was found, but it could not be animated',\r\n );\r\n }\r\n });\r\n if (hasAnimated) return;\r\n\r\n this.notifications.push({\r\n ...notification,\r\n isOpen: true,\r\n type: notification.type ?? 'warning',\r\n id,\r\n });\r\n\r\n this.shout();\r\n }\r\n\r\n on<K extends 'changedList'>(\r\n eventName: K,\r\n fn: (params: { changedList: boolean }[K]) => unknown,\r\n ): () => void {\r\n fn(true);\r\n return super.on(eventName, fn);\r\n }\r\n}\r\n\r\nexport const defaultNotifier = new DefaultNotifier();\r\n\r\nexport function notify(notification: TDispatchedNotification) {\r\n defaultNotifier.notify(notification);\r\n}\r\n","import { Icon } from '@apia/icons';\r\nimport { Box, Button, IconButton } from '@apia/theme';\r\n\r\ninterface ITrace {\r\n trace: string;\r\n}\r\n\r\nconst Trace = ({ trace }: ITrace) => {\r\n const openModal = () => {\r\n document.dispatchEvent(\r\n new CustomEvent('openModal', {\r\n detail: {\r\n NavBar: (\r\n <>\r\n <Button\r\n variant=\"outline-sm\"\r\n onClick={() => {\r\n void navigator.clipboard.writeText(\r\n document.querySelector<HTMLElement>('.TraceModal__content')\r\n ?.innerText ?? '',\r\n );\r\n }}\r\n >\r\n Copy trace\r\n </Button>\r\n </>\r\n ),\r\n children: (\r\n <Box\r\n dangerouslySetInnerHTML={{\r\n __html: trace.replaceAll(\r\n /\\((\\w+\\.java:\\d+)\\)/g,\r\n '(<strong>$1</strong>)',\r\n ),\r\n }}\r\n />\r\n ),\r\n size: 'xxl',\r\n title: 'Stack trace',\r\n },\r\n }),\r\n );\r\n };\r\n\r\n return (\r\n <Box as=\"code\" className=\"notification__trace\">\r\n <Box as=\"strong\" className=\"notification__traceLabel\">\r\n <IconButton\r\n size=\"IconMd\"\r\n onClick={openModal}\r\n title=\"View trace\"\r\n sx={{\r\n height: '24px',\r\n width: '24px',\r\n }}\r\n >\r\n <Icon size=\"iconXs\" title=\"\" name=\"External\" />\r\n </IconButton>\r\n <IconButton\r\n size=\"IconMd\"\r\n title=\"Copy trace\"\r\n sx={{\r\n height: '24px',\r\n width: '24px',\r\n }}\r\n onClick={() =>\r\n void navigator.clipboard.writeText(\r\n trace.replaceAll(/<br *\\/?>/g, '\\n'),\r\n )\r\n }\r\n >\r\n <Icon size=\"iconXs\" title=\"\" name=\"Copy\" />\r\n </IconButton>\r\n <Box as=\"span\">Trace:</Box>\r\n </Box>\r\n <Box className=\"notification__traceText\">{trace}</Box>\r\n </Box>\r\n );\r\n};\r\n\r\nexport default Trace;\r\n","import * as React from 'react';\r\nimport { Alert, Box, Close } from '@apia/theme';\r\nimport { CSSTransition } from 'react-transition-group';\r\nimport { getIndex, useUnmount, useUpdateEffect } from '@apia/util';\r\nimport { Icon, isIconName, TIconName } from '@apia/icons';\r\nimport { INotification } from './types';\r\nimport {\r\n defaultNotifier,\r\n onCloseNotificationCallbacks,\r\n} from './defaultNotifier';\r\nimport Trace from './Trace';\r\n\r\nexport interface INotificationProps {\r\n animationName?: string;\r\n animationTimeout?: number;\r\n className?: string;\r\n disableClose?: boolean;\r\n notification: INotification;\r\n}\r\n\r\nexport const Notification: React.FC<INotificationProps> = ({\r\n animationName = 'fromRight',\r\n animationTimeout = 150,\r\n className,\r\n disableClose,\r\n notification,\r\n}) => {\r\n const innerNotification = React.useMemo(\r\n () => ({ ...notification }),\r\n [notification],\r\n );\r\n const nodeRef = React.useRef(null);\r\n if (!innerNotification.title)\r\n innerNotification.title = getIndex(\r\n [window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],\r\n [\r\n innerNotification.type === 'danger',\r\n innerNotification.type === 'warning',\r\n innerNotification.type === 'success',\r\n ],\r\n );\r\n if (!innerNotification.icon)\r\n innerNotification.icon = getIndex<TIconName>(\r\n ['Check', 'Alert', 'Close'],\r\n [\r\n innerNotification.type === 'success',\r\n innerNotification.type === 'warning',\r\n innerNotification.type === 'danger',\r\n ],\r\n );\r\n\r\n const [shouldShow, setShouldShow] = React.useState(true);\r\n\r\n const close = React.useCallback(() => {\r\n defaultNotifier.delete(innerNotification);\r\n }, [innerNotification]);\r\n\r\n useUpdateEffect(() => {\r\n if (!innerNotification.isOpen) setShouldShow(false);\r\n }, [innerNotification.isOpen]);\r\n\r\n useUnmount(() => {\r\n if (onCloseNotificationCallbacks[innerNotification.id])\r\n onCloseNotificationCallbacks[innerNotification.id]();\r\n });\r\n\r\n let notificationType: INotification['type'] = 'warning';\r\n if (['sysException', 'exception', 'danger'].includes(innerNotification.type))\r\n notificationType = 'danger';\r\n if (['greenMessage', 'success'].includes(innerNotification.type))\r\n notificationType = 'success';\r\n if (['info'].includes(innerNotification.type)) notificationType = 'info';\r\n\r\n const onClick = React.useCallback(() => {\r\n setShouldShow(false);\r\n defaultNotifier.close(innerNotification);\r\n }, [innerNotification]);\r\n\r\n return (\r\n <CSSTransition\r\n in={shouldShow}\r\n timeout={animationTimeout}\r\n classNames={animationName}\r\n appear\r\n unmountOnExit\r\n onExited={close}\r\n nodeRef={nodeRef}\r\n >\r\n <Alert\r\n data-testid={notificationType}\r\n role=\"alert\"\r\n ref={nodeRef}\r\n variant={`alerts.${notificationType}`}\r\n className={`${\r\n className ?? ''\r\n } notification notification__alert ${notificationType}`}\r\n tabIndex={0}\r\n onKeyDown={React.useCallback((ev: React.KeyboardEvent) => {\r\n if (\r\n ev.key.toLowerCase() === 'escape' ||\r\n ev.key.toLowerCase() === 'enter' ||\r\n ev.key === ' '\r\n ) {\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n setShouldShow(false);\r\n }\r\n }, [])}\r\n >\r\n {(!disableClose ||\r\n innerNotification.icon ||\r\n innerNotification.title) && (\r\n <Box className=\"notification__header\">\r\n {(innerNotification.title || innerNotification.icon) && (\r\n <Box as=\"h4\" className=\"notification__title\">\r\n {innerNotification.icon && (\r\n <Box className=\"notification__icon\">\r\n {isIconName(\r\n innerNotification.icon as unknown as TIconName,\r\n ) ? (\r\n <Icon\r\n title=\"\"\r\n name={innerNotification.icon as unknown as TIconName}\r\n />\r\n ) : (\r\n innerNotification.icon\r\n )}\r\n </Box>\r\n )}\r\n {innerNotification.title}\r\n </Box>\r\n )}\r\n {!disableClose && (\r\n <Close\r\n type=\"button\"\r\n onClick={onClick}\r\n tabIndex={-1}\r\n className=\"notification__closeButton\"\r\n />\r\n )}\r\n </Box>\r\n )}\r\n <Box className=\"notification__body\">\r\n <Box className=\"notification__content\">\r\n <Box className=\"notification__message\">\r\n <Box\r\n dangerouslySetInnerHTML={{\r\n __html: innerNotification.message,\r\n }}\r\n className=\"notification__text\"\r\n />\r\n </Box>\r\n {innerNotification.trace && (\r\n <Trace trace={innerNotification.trace} />\r\n )}\r\n </Box>\r\n </Box>\r\n </Alert>\r\n </CSSTransition>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Box } from '@apia/theme';\r\nimport { getVariant, makeStyledComponent, spacing } from '@apia/theme';\r\nimport { keyframes } from '@emotion/react';\r\nimport { Notification } from './Notification';\r\nimport { defaultNotifier } from './defaultNotifier';\r\nimport { useMount } from '@apia/util';\r\n\r\nconst vibrate = keyframes`\r\n0% {\r\n transform: rotate(0);\r\n}\r\n\r\n25% {\r\n transform: rotate(1.5deg);\r\n}\r\n\r\n75% {\r\n transform: rotate(-1.5deg);\r\n}\r\n\r\n100% {\r\n transform: rotate(0);\r\n}`;\r\n\r\nconst useSelector = defaultNotifier.useSelector;\r\n\r\nconst NotificationsList = makeStyledComponent(\r\n 'NotificationsList',\r\n 'layout.common.notifications.list',\r\n {\r\n '.notificationsFloatingList': {\r\n bottom: '10px',\r\n height: 'min-content',\r\n maxHeight: 'calc(100vh - 20px)',\r\n maxWidth: 'floatingNotifications',\r\n position: 'fixed',\r\n pr: '5px',\r\n right: '5px',\r\n width: '100%',\r\n zIndex: 'notifications',\r\n\r\n '& > *:not(:last-child)': {\r\n mb: spacing(5),\r\n },\r\n\r\n '.notification.animate': {\r\n animation: `${vibrate} 0.1s linear infinite`,\r\n },\r\n },\r\n\r\n '.fromRight-enter, .fromRight-appear': { transform: 'translateX(550px)' },\r\n '.fromRight-enter-active, .fromRight-appear-active': {\r\n transition: 'transform 150ms',\r\n transform: 'translateX(0)',\r\n },\r\n '.fromRight-exit': { transform: 'translateX(0)' },\r\n '.fromRight-exit-active': {\r\n transition: 'transform 150ms',\r\n transform: 'translateX(550px)',\r\n },\r\n },\r\n () => {\r\n const notifications = useSelector((current) => {\r\n return current;\r\n });\r\n\r\n useMount(() => {\r\n document.addEventListener('keydown', (ev) => {\r\n if (ev.code === 'Escape') {\r\n defaultNotifier.closeAll();\r\n }\r\n });\r\n });\r\n\r\n return (\r\n <Box\r\n className=\"notificationsFloatingList\"\r\n {...getVariant('layout.common.components.notifications.list')}\r\n >\r\n {notifications.map((current) => {\r\n return <Notification notification={current} key={current.id} />;\r\n })}\r\n </Box>\r\n );\r\n },\r\n);\r\n\r\nexport default React.memo(NotificationsList);\r\n","import { arrayOrArray, TApiaSystemMessageObj } from '@apia/util';\r\nimport { notify, TNotificationType, uniqueId } from '../defaultNotifier';\r\nimport { INotification } from '../types';\r\nimport { TMessage, TNotificationMessage } from './types';\r\n\r\n/**\r\n * Devuelve un array de notificaciones a partir de\r\n * una respuesta de Apia.\r\n */\r\nexport const getNotificationMessageObj = (\r\n data: TApiaSystemMessageObj,\r\n): INotification<TNotificationType>[] | null => {\r\n const notifications: INotification<TNotificationType>[] = [];\r\n if (data?.sysMessages?.message) {\r\n notifications.push(\r\n ...parseServerNotification(data.sysMessages.message, 'warning'),\r\n );\r\n }\r\n if (data?.sysExceptions) {\r\n notifications.push(\r\n ...parseServerNotification(data.sysExceptions.exception, 'danger'),\r\n );\r\n }\r\n if (data?.exceptions?.exception) {\r\n notifications.push(\r\n ...parseServerNotification(data.exceptions.exception, 'danger'),\r\n );\r\n }\r\n if (notifications.length > 0) return notifications;\r\n return null;\r\n};\r\n\r\nfunction parseServerNotificationType(type: string): TNotificationType {\r\n switch (type) {\r\n case '1':\r\n return 'success';\r\n case '2':\r\n return 'warning';\r\n case '3':\r\n return 'danger';\r\n default:\r\n return 'warning';\r\n }\r\n}\r\n\r\n/**\r\n * Toma un objeto de notificación de servidor y lo convierte a un\r\n * objeto de notificación de cliente.\r\n */\r\nexport const parseServerNotification = (\r\n serverNotification: TMessage | TMessage[],\r\n type: TNotificationType,\r\n): INotification<TNotificationType>[] => {\r\n const messages = arrayOrArray(serverNotification);\r\n return messages.map((current) => {\r\n const returnNotification: INotification<TNotificationType> = {\r\n message: current.text,\r\n trace: current.content,\r\n title: current.title,\r\n type:\r\n current.type !== undefined\r\n ? parseServerNotificationType(current.type)\r\n : (type as TNotificationType),\r\n isOpen: true,\r\n id: uniqueId(),\r\n };\r\n return returnNotification;\r\n });\r\n};\r\n\r\n/**\r\n * Toma un objeto de respuesta de servidor que puede eventualmente\r\n * tener notificaciones y las pasa al sistema de notificaciones si\r\n * es que hay alguna.\r\n */\r\nexport const dispatchNotifications = (alert: TNotificationMessage) => {\r\n if (alert) {\r\n if (alert.sysMessages?.message)\r\n parseServerNotification(alert.sysMessages?.message, 'warning').forEach(\r\n notify,\r\n );\r\n if (alert.exceptions?.exception)\r\n parseServerNotification(alert.exceptions?.exception, 'danger').forEach(\r\n notify,\r\n );\r\n if (alert.sysExceptions?.exception)\r\n parseServerNotification(alert.sysExceptions?.exception, 'danger').forEach(\r\n notify,\r\n );\r\n }\r\n};\r\n\r\nexport * from './types';\r\n"],"names":["id","Trace","React"],"mappings":";;;;;;;;;;;;;;;AAKO,MAAM,+BAA8D,GAAC;AAI5E,SAAS,YAAA,CAAa,GAAc,CAAc,EAAA;AAChD,EAAI,IAAA,CAAA,CAAE,WAAW,CAAE,CAAA,MAAA;AAAQ,IAAO,OAAA,KAAA,CAAA;AAElC,EAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,CAAA,CAAE,MAAQ,EAAA,CAAA,EAAA;AAAK,IAAA,IAAI,CAAE,CAAA,CAAC,CAAM,KAAA,CAAA,CAAE,CAAC,CAAA;AAAG,MAAO,OAAA,KAAA,CAAA;AAE7D,EAAO,OAAA,IAAA,CAAA;AACT,CAAA;AAEA,IAAI,EAAG,GAAA,CAAA,CAAA;AACA,SAAS,QAAW,GAAA;AACzB,EAAA,OAAO,gBAAgB,EAAI,EAAA,CAAA,CAAA,CAAA;AAC7B,CAAA;AAQO,MA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,OAAQ,CAAA,IAAA;AAAA,MACjB,OAAO,OAAQ,CAAA,OAAA;AAAA,MACf,OAAO,OAAQ,CAAA,KAAA;AAAA,MACf,MACE,OAAQ,CAAA,IAAA,KAAS,SACb,2BAA4B,CAAA,OAAA,CAAQ,IAAI,CACvC,GAAA,IAAA;AAAA,MACP,MAAQ,EAAA,IAAA;AAAA,MACR,IAAI,QAAS,EAAA;AAAA,KACf,CAAA;AACA,IAAO,OAAA,kBAAA,CAAA;AAAA,GACR,CAAA,CAAA;AACH,EAAA;AAOa,MAAA,qBAAA,GAAwB,CAAC,KAAgC,KAAA;AACpE,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,IAAI,MAAM,WAAa,EAAA,OAAA;AACrB,MAAA,uBAAA,CAAwB,KAAM,CAAA,WAAA,EAAa,OAAS,EAAA,SAAS,CAAE,CAAA,OAAA;AAAA,QAC7D,MAAA;AAAA,OACF,CAAA;AACF,IAAA,IAAI,MAAM,UAAY,EAAA,SAAA;AACpB,MAAA,uBAAA,CAAwB,KAAM,CAAA,UAAA,EAAY,SAAW,EAAA,QAAQ,CAAE,CAAA,OAAA;AAAA,QAC7D,MAAA;AAAA,OACF,CAAA;AACF,IAAA,IAAI,MAAM,aAAe,EAAA,SAAA;AACvB,MAAA,uBAAA,CAAwB,KAAM,CAAA,aAAA,EAAe,SAAW,EAAA,QAAQ,CAAE,CAAA,OAAA;AAAA,QAChE,MAAA;AAAA,OACF,CAAA;AAAA,GACJ;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apia/notifications",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Alexis Leite <alexisleite@live.com>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"url": "http://corp-gitlab-01.domst.st.net/products/apia/ApiaNPMPackages.git",
|
|
42
42
|
"directory": "packages/notifications"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "1be67c2956d7c0964b4e8a18173af7cde3fc534e"
|
|
45
45
|
}
|
package/dist/Notification.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { INotification } from './types.js';
|
|
3
|
-
|
|
4
|
-
interface INotificationProps {
|
|
5
|
-
animationName?: string;
|
|
6
|
-
animationTimeout?: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
disableClose?: boolean;
|
|
9
|
-
notification: INotification;
|
|
10
|
-
}
|
|
11
|
-
declare const Notification: React.FC<INotificationProps>;
|
|
12
|
-
|
|
13
|
-
export { type INotificationProps, Notification };
|
|
14
|
-
//# sourceMappingURL=Notification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|