@apia/notifications 0.0.9-alpha.0 → 0.1.0

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/cleanDist.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "cleanDist": 0.055914100472197026
3
+ }
package/dist/index.d.ts CHANGED
@@ -49,7 +49,7 @@ interface INotificationProps {
49
49
  disableClose?: boolean;
50
50
  notification: INotification;
51
51
  }
52
- declare const _default$1: React.NamedExoticComponent<INotificationProps>;
52
+ declare const Notification: React.FC<INotificationProps>;
53
53
 
54
54
  declare const _default: React__default.MemoExoticComponent<((props: object) => theme_ui_jsx_runtime.JSX.Element) & {
55
55
  displayName: string;
@@ -71,7 +71,7 @@ declare function notify(notification: TDispatchedNotification): void;
71
71
 
72
72
  interface TMessage {
73
73
  text: string;
74
- label?: string;
74
+ content?: string;
75
75
  title?: string;
76
76
  type?: string;
77
77
  }
@@ -105,4 +105,5 @@ declare const parseServerNotification: (serverNotification: TMessage | TMessage[
105
105
  */
106
106
  declare const dispatchNotifications: (alert: TNotificationMessage) => void;
107
107
 
108
- export { DefaultNotifier, INotification, INotificationsDispatcher, _default$1 as Notification, _default as NotificationsList, TDispatchedNotification, TMessage, TNotificationId, TNotificationMessage, TNotificationSelector, TNotificationType, defaultNotifier, dispatchNotifications, getNotificationMessageObj, notify, onCloseNotificationCallbacks, parseServerNotification };
108
+ export { DefaultNotifier, INotification, INotificationsDispatcher, Notification, _default as NotificationsList, TDispatchedNotification, TMessage, TNotificationId, TNotificationMessage, TNotificationSelector, TNotificationType, defaultNotifier, dispatchNotifications, getNotificationMessageObj, notify, onCloseNotificationCallbacks, parseServerNotification };
109
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,37 +1,329 @@
1
- 'use strict';
2
-
3
- var c = require('react');
4
- var themeUi = require('theme-ui');
5
- var reactTransitionGroup = require('react-transition-group');
6
- var util = require('@apia/util');
7
- var icons = require('@apia/icons');
8
- var lodashEs = require('lodash-es');
9
- var store = require('@apia/store');
10
- var jsxRuntime = require('theme-ui/jsx-runtime');
11
- var theme = require('@apia/theme');
12
- var react = require('@emotion/react');
13
-
14
- function _interopNamespace(e) {
15
- if (e && e.__esModule) return e;
16
- var n = Object.create(null);
17
- if (e) {
18
- Object.keys(e).forEach(function (k) {
19
- if (k !== 'default') {
20
- var d = Object.getOwnPropertyDescriptor(e, k);
21
- Object.defineProperty(n, k, d.get ? d : {
22
- enumerable: true,
23
- get: function () { return e[k]; }
24
- });
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { Alert, Box, Close } from 'theme-ui';
5
+ import { CSSTransition } from 'react-transition-group';
6
+ import { getSpecificParent, getIndex, useUpdateEffect, useUnmount, arrayOrArray } from '@apia/util';
7
+ import { isIconName, Icon } from '@apia/icons';
8
+ import { uniqueId } from 'lodash-es';
9
+ import { createSlice, injectReducers } from '@apia/store';
10
+ import { makeStyledComponent, spacing, getVariant } from '@apia/theme';
11
+ import { keyframes } from '@emotion/react';
12
+
13
+ var __defProp$3 = Object.defineProperty;
14
+ var __defProps$2 = Object.defineProperties;
15
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
16
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
17
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
18
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
19
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
+ var __spreadValues$3 = (a, b) => {
21
+ for (var prop in b || (b = {}))
22
+ if (__hasOwnProp$3.call(b, prop))
23
+ __defNormalProp$3(a, prop, b[prop]);
24
+ if (__getOwnPropSymbols$3)
25
+ for (var prop of __getOwnPropSymbols$3(b)) {
26
+ if (__propIsEnum$3.call(b, prop))
27
+ __defNormalProp$3(a, prop, b[prop]);
28
+ }
29
+ return a;
30
+ };
31
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
32
+ function putNotificationToVibrate(message) {
33
+ let hasAnimated = false;
34
+ document.querySelectorAll(".notificationsFloatingList .notification__text").forEach((current) => {
35
+ if (current.textContent === String(message)) {
36
+ const notificationElement = getSpecificParent(
37
+ current,
38
+ (search) => {
39
+ return search.classList.contains("notification");
40
+ }
41
+ );
42
+ if (notificationElement) {
43
+ notificationElement.classList.add("animate");
44
+ setTimeout(() => {
45
+ notificationElement.classList.remove("animate");
46
+ }, 300);
47
+ hasAnimated = true;
48
+ } else
49
+ console.warn(
50
+ "A notification with that text was found, but it could not be animated"
51
+ );
52
+ }
53
+ });
54
+ return hasAnimated;
55
+ }
56
+ const notificationsSlice = createSlice({
57
+ name: "notificationsSlice",
58
+ initialState: { notifications: [] },
59
+ reducers: {
60
+ close(state, { payload }) {
61
+ state.notifications = state.notifications.map((current) => {
62
+ return current.id === payload.id ? __spreadProps$2(__spreadValues$3({}, current), { isOpen: false }) : current;
63
+ });
64
+ },
65
+ closeAll(state) {
66
+ const firstOpenIndex = state.notifications.findIndex((current) => {
67
+ return current.isOpen;
68
+ });
69
+ if (firstOpenIndex >= 0) {
70
+ state.notifications[firstOpenIndex].isOpen = false;
71
+ setTimeout(() => {
72
+ return notificationsStore.dispatch(notificationsActions.closeAll());
73
+ }, 50);
25
74
  }
26
- });
75
+ },
76
+ delete: (state, { payload: { id } }) => {
77
+ state.notifications = state.notifications.filter((current) => {
78
+ return current.id !== id;
79
+ });
80
+ },
81
+ push(state, payload) {
82
+ const notifications = payload.payload.notifications.filter(
83
+ (notification) => {
84
+ return !putNotificationToVibrate(notification.message);
85
+ }
86
+ );
87
+ state.notifications.push(...notifications);
88
+ }
89
+ }
90
+ });
91
+ const {
92
+ store: notificationsStore,
93
+ useSelector: useNotificationsSelector
94
+ } = injectReducers({
95
+ notificationsSlice: notificationsSlice.reducer
96
+ });
97
+ const notificationsActions = notificationsSlice.actions;
98
+
99
+ var __defProp$2 = Object.defineProperty;
100
+ var __defProps$1 = Object.defineProperties;
101
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
102
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
103
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
104
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
105
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
106
+ var __spreadValues$2 = (a, b) => {
107
+ for (var prop in b || (b = {}))
108
+ if (__hasOwnProp$2.call(b, prop))
109
+ __defNormalProp$2(a, prop, b[prop]);
110
+ if (__getOwnPropSymbols$2)
111
+ for (var prop of __getOwnPropSymbols$2(b)) {
112
+ if (__propIsEnum$2.call(b, prop))
113
+ __defNormalProp$2(a, prop, b[prop]);
114
+ }
115
+ return a;
116
+ };
117
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
118
+ const onCloseNotificationCallbacks = {};
119
+ class DefaultNotifier {
120
+ areNotificationsOpen() {
121
+ return !!document.querySelector(".notification");
122
+ }
123
+ close(id) {
124
+ notificationsStore.dispatch(
125
+ notificationsActions.close({ id: typeof id === "object" ? id.id : id })
126
+ );
27
127
  }
28
- n.default = e;
29
- return Object.freeze(n);
128
+ closeAll() {
129
+ notificationsStore.dispatch(notificationsActions.closeAll());
130
+ }
131
+ delete(id) {
132
+ notificationsStore.dispatch(
133
+ notificationsActions.delete({ id: typeof id === "object" ? id.id : id })
134
+ );
135
+ }
136
+ getSelector() {
137
+ return (selector) => {
138
+ return useNotificationsSelector((global) => {
139
+ return selector(
140
+ global.notificationsSlice.notifications
141
+ );
142
+ });
143
+ };
144
+ }
145
+ notify(notification) {
146
+ var _a, _b;
147
+ const id = (_a = notification.id) != null ? _a : uniqueId();
148
+ if (notification.onClose)
149
+ onCloseNotificationCallbacks[id] = notification.onClose;
150
+ notificationsStore.dispatch(
151
+ notificationsActions.push({
152
+ notifications: [
153
+ __spreadProps$1(__spreadValues$2({}, notification), {
154
+ isOpen: true,
155
+ type: (_b = notification.type) != null ? _b : "warning",
156
+ id,
157
+ onClose: void 0
158
+ })
159
+ ]
160
+ })
161
+ );
162
+ }
163
+ }
164
+ const defaultNotifier = new DefaultNotifier();
165
+ function notify(notification) {
166
+ new DefaultNotifier().notify(notification);
30
167
  }
31
168
 
32
- var c__namespace = /*#__PURE__*/_interopNamespace(c);
169
+ var __defProp$1 = Object.defineProperty;
170
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
171
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
172
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
173
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
174
+ var __spreadValues$1 = (a, b) => {
175
+ for (var prop in b || (b = {}))
176
+ if (__hasOwnProp$1.call(b, prop))
177
+ __defNormalProp$1(a, prop, b[prop]);
178
+ if (__getOwnPropSymbols$1)
179
+ for (var prop of __getOwnPropSymbols$1(b)) {
180
+ if (__propIsEnum$1.call(b, prop))
181
+ __defNormalProp$1(a, prop, b[prop]);
182
+ }
183
+ return a;
184
+ };
185
+ const Notification = ({
186
+ animationName = "fromRight",
187
+ animationTimeout = 150,
188
+ className,
189
+ disableClose,
190
+ notification
191
+ }) => {
192
+ const innerNotification = React.useMemo(
193
+ () => __spreadValues$1({}, notification),
194
+ [notification]
195
+ );
196
+ const nodeRef = React.useRef(null);
197
+ if (!innerNotification.title)
198
+ innerNotification.title = getIndex(
199
+ [window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],
200
+ [
201
+ innerNotification.type === "danger",
202
+ innerNotification.type === "warning",
203
+ innerNotification.type === "success"
204
+ ]
205
+ );
206
+ if (!innerNotification.icon)
207
+ innerNotification.icon = getIndex(
208
+ ["Check", "Alert", "Close"],
209
+ [
210
+ innerNotification.type === "success",
211
+ innerNotification.type === "warning",
212
+ innerNotification.type === "danger"
213
+ ]
214
+ );
215
+ const [shouldShow, setShouldShow] = React.useState(true);
216
+ const close = React.useCallback(() => {
217
+ defaultNotifier.delete(innerNotification);
218
+ }, [innerNotification]);
219
+ useUpdateEffect(() => {
220
+ if (!innerNotification.isOpen)
221
+ setShouldShow(false);
222
+ }, [innerNotification.isOpen]);
223
+ useUnmount(() => {
224
+ if (onCloseNotificationCallbacks[innerNotification.id])
225
+ onCloseNotificationCallbacks[innerNotification.id]();
226
+ });
227
+ let notificationType = "warning";
228
+ if (["sysException", "exception", "danger"].includes(innerNotification.type))
229
+ notificationType = "danger";
230
+ if (["greenMessage", "success"].includes(innerNotification.type))
231
+ notificationType = "success";
232
+ const onClick = React.useCallback(() => {
233
+ setShouldShow(false);
234
+ }, []);
235
+ return /* @__PURE__ */ jsx(
236
+ CSSTransition,
237
+ {
238
+ in: shouldShow,
239
+ timeout: animationTimeout,
240
+ classNames: animationName,
241
+ appear: true,
242
+ unmountOnExit: true,
243
+ onExited: close,
244
+ nodeRef,
245
+ children: /* @__PURE__ */ jsxs(
246
+ Alert,
247
+ {
248
+ "data-testid": notificationType,
249
+ role: "alert",
250
+ ref: nodeRef,
251
+ variant: `alerts.${notificationType}`,
252
+ className: `${className != null ? className : ""} notification notification__alert ${notificationType}`,
253
+ tabIndex: 0,
254
+ onKeyDown: React.useCallback((ev) => {
255
+ if (ev.key.toLowerCase() === "escape" || ev.key.toLowerCase() === "enter" || ev.key === " ") {
256
+ ev.preventDefault();
257
+ ev.stopPropagation();
258
+ setShouldShow(false);
259
+ }
260
+ }, []),
261
+ children: [
262
+ (!disableClose || innerNotification.icon || innerNotification.title) && /* @__PURE__ */ jsxs(Box, { className: "notification__header", children: [
263
+ (innerNotification.title || innerNotification.icon) && /* @__PURE__ */ jsxs(Box, { as: "h4", className: "notification__title", children: [
264
+ innerNotification.icon && /* @__PURE__ */ jsx(Box, { className: "notification__icon", children: isIconName(
265
+ innerNotification.icon
266
+ ) ? /* @__PURE__ */ jsx(
267
+ Icon,
268
+ {
269
+ title: "",
270
+ name: innerNotification.icon
271
+ }
272
+ ) : innerNotification.icon }),
273
+ innerNotification.title
274
+ ] }),
275
+ !disableClose && /* @__PURE__ */ jsx(
276
+ Close,
277
+ {
278
+ type: "button",
279
+ onClick,
280
+ tabIndex: -1,
281
+ className: "notification__closeButton"
282
+ }
283
+ )
284
+ ] }),
285
+ /* @__PURE__ */ jsx(Box, { className: "notification__body", children: /* @__PURE__ */ jsxs(Box, { className: "notification__content", children: [
286
+ /* @__PURE__ */ jsx(Box, { className: "notification__message", children: /* @__PURE__ */ jsx(
287
+ Box,
288
+ {
289
+ dangerouslySetInnerHTML: {
290
+ __html: innerNotification.message
291
+ },
292
+ className: "notification__text"
293
+ }
294
+ ) }),
295
+ innerNotification.trace && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Box, { as: "code", className: "notification__trace", children: [
296
+ /* @__PURE__ */ jsx(Box, { as: "strong", className: "notification__traceLabel", children: "Trace:" }),
297
+ /* @__PURE__ */ jsx(Box, { className: "notification__traceText", children: innerNotification.trace })
298
+ ] }) })
299
+ ] }) })
300
+ ]
301
+ }
302
+ )
303
+ }
304
+ );
305
+ };
33
306
 
34
- var k=Object.defineProperty,B=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var R=(i,t,o)=>t in i?k(i,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[t]=o,r=(i,t)=>{for(var o in t||(t={}))P.call(t,o)&&R(i,o,t[o]);if(w)for(var o of w(t))v.call(t,o)&&R(i,o,t[o]);return i},f=(i,t)=>B(i,M(t));function F(i){let t=!1;return document.querySelectorAll(".notificationsFloatingList .notification__text").forEach(o=>{if(o.textContent===String(i)){let n=util.getSpecificParent(o,e=>e.classList.contains("notification"));n?(n.classList.add("animate"),setTimeout(()=>{n.classList.remove("animate");},300),t=!0):console.warn("A notification with that text was found, but it could not be animated");}}),t}var b=store.createSlice({name:"notificationsSlice",initialState:{notifications:[]},reducers:{close(i,{payload:t}){i.notifications=i.notifications.map(o=>o.id===t.id?f(r({},o),{isOpen:!1}):o);},closeAll(i){let t=i.notifications.findIndex(o=>o.isOpen);t>=0&&(i.notifications[t].isOpen=!1,setTimeout(()=>p.dispatch(l.closeAll()),50));},delete:(i,{payload:{id:t}})=>{i.notifications=i.notifications.filter(o=>o.id!==t);},push(i,t){let o=t.payload.notifications.filter(n=>!F(n.message));i.notifications.push(...o);}}}),{store:p,useSelector:C}=store.injectReducers({notificationsSlice:b.reducer}),l=b.actions;var T={},x=class{areNotificationsOpen(){return !!document.querySelector(".notification")}close(t){p.dispatch(l.close({id:typeof t=="object"?t.id:t}));}closeAll(){p.dispatch(l.closeAll());}delete(t){p.dispatch(l.delete({id:typeof t=="object"?t.id:t}));}getSelector(){return t=>C(o=>t(o.notificationsSlice.notifications))}notify(t){var n,e;let o=(n=t.id)!=null?n:lodashEs.uniqueId();t.onClose&&(T[o]=t.onClose),p.dispatch(l.push({notifications:[f(r({},t),{isOpen:!0,type:(e=t.type)!=null?e:"warning",id:o,onClose:void 0})]}));}},h=new x;function I(i){new x().notify(i);}var G=({animationName:i="fromRight",animationTimeout:t=150,className:o,disableClose:n,notification:e})=>{let N=c__namespace.useRef(null);e.title||(e.title=util.getIndex([window.LBL_ERROR,window.LBL_WARNING,window.LBL_COMPLETE_OPERATION],[e.type==="danger",e.type==="warning",e.type==="success"])),e.icon||(e.icon=util.getIndex(["Check","Alert","Close"],[e.type==="success",e.type==="warning",e.type==="danger"]));let[g,S]=c__namespace.useState(!0),O=c__namespace.useCallback(()=>{h.delete(e);},[e]);util.useUpdateEffect(()=>{e.isOpen||S(!1);},[e.isOpen]),util.useUnmount(()=>{T[e.id]&&T[e.id]();});let d="warning";["sysException","exception","danger"].includes(e.type)&&(d="danger"),["greenMessage","success"].includes(e.type)&&(d="success");let E=c__namespace.useCallback(()=>{S(!1);},[]);return jsxRuntime.jsx(reactTransitionGroup.CSSTransition,{in:g,timeout:t,classNames:i,appear:!0,unmountOnExit:!0,onExited:O,nodeRef:N,children:jsxRuntime.jsxs(themeUi.Alert,{"data-testid":d,role:"alert",ref:N,variant:`alerts.${d}`,className:`${o!=null?o:""} notification notification__alert ${d}`,tabIndex:0,onKeyDown:c__namespace.useCallback(u=>{(u.key.toLowerCase()==="escape"||u.key.toLowerCase()==="enter"||u.key===" ")&&(u.preventDefault(),u.stopPropagation(),S(!1));},[]),children:[(!n||e.icon||e.title)&&jsxRuntime.jsxs(themeUi.Box,{className:"notification__header",children:[(e.title||e.icon)&&jsxRuntime.jsxs(themeUi.Box,{as:"h4",className:"notification__title",children:[e.icon&&jsxRuntime.jsx(themeUi.Box,{className:"notification__icon",children:icons.isIconName(e.icon)?jsxRuntime.jsx(icons.Icon,{name:e.icon}):e.icon}),e.title]}),!n&&jsxRuntime.jsx(themeUi.Close,{type:"button",onClick:E,tabIndex:-1,className:"notification__closeButton"})]}),jsxRuntime.jsx(themeUi.Box,{className:"notification__body",children:jsxRuntime.jsxs(themeUi.Box,{className:"notification__content",children:[jsxRuntime.jsx(themeUi.Box,{className:"notification__message",children:jsxRuntime.jsx(themeUi.Box,{dangerouslySetInnerHTML:{__html:e.message},className:"notification__text"})}),e.trace&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(themeUi.Box,{as:"code",className:"notification__trace",children:[jsxRuntime.jsx(themeUi.Box,{as:"strong",className:"notification__traceLabel",children:"Trace:"}),jsxRuntime.jsx(themeUi.Box,{className:"notification__traceText",children:e.trace})]})})]})})]})})},_=c__namespace.memo(G);var et=react.keyframes`
307
+ var __defProp = Object.defineProperty;
308
+ var __defProps = Object.defineProperties;
309
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
310
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
311
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
312
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
313
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
314
+ var __spreadValues = (a, b) => {
315
+ for (var prop in b || (b = {}))
316
+ if (__hasOwnProp.call(b, prop))
317
+ __defNormalProp(a, prop, b[prop]);
318
+ if (__getOwnPropSymbols)
319
+ for (var prop of __getOwnPropSymbols(b)) {
320
+ if (__propIsEnum.call(b, prop))
321
+ __defNormalProp(a, prop, b[prop]);
322
+ }
323
+ return a;
324
+ };
325
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
326
+ const vibrate = keyframes`
35
327
  0% {
36
328
  transform: rotate(0);
37
329
  }
@@ -46,14 +338,123 @@ var k=Object.defineProperty,B=Object.defineProperties;var M=Object.getOwnPropert
46
338
 
47
339
  100% {
48
340
  transform: rotate(0);
49
- }`,nt=h.getSelector(),st=theme.makeStyledComponent("NotificationsList","layout.common.notifications.list",{".notificationsFloatingList":{bottom:"10px",height:"min-content",maxHeight:"calc(100vh - 20px)",maxWidth:"floatingNotifications",position:"fixed",pr:"5px",right:"5px",width:"100%",zIndex:"notifications","& > *:not(:last-child)":{mb:theme.spacing(5)},".notification.animate":{animation:`${et} 0.1s linear infinite`}},".fromRight-enter, .fromRight-appear":{transform:"translateX(550px)"},".fromRight-enter-active, .fromRight-appear-active":{transition:"transform 150ms",transform:"translateX(0)"},".fromRight-exit":{transform:"translateX(0)"},".fromRight-exit-active":{transition:"transform 150ms",transform:"translateX(550px)"}},()=>{let i=nt(t=>t);return jsxRuntime.jsx(themeUi.Box,f(r({className:"notificationsFloatingList"},theme.getVariant("layout.common.components.notifications.list")),{children:i.map(t=>jsxRuntime.jsx(_,{notification:t},t.id))}))}),at=c__namespace.default.memo(st);var $t=i=>{var o,n;let t=[];return (o=i==null?void 0:i.sysMessages)!=null&&o.message&&t.push(...m(i.sysMessages.message,"warning")),i!=null&&i.sysExceptions&&t.push(...m(i.sysExceptions.exception,"danger")),(n=i==null?void 0:i.exceptions)!=null&&n.exception&&t.push(...m(i.exceptions.exception,"danger")),t.length>0?t:null};function ft(i){switch(i){case"1":return "success";case"2":return "warning";case"3":return "danger";default:return "warning"}}var m=(i,t)=>util.arrayOrArray(i).map(n=>({message:n.text,trace:n.label,title:n.title,type:n.type!==void 0?ft(n.type):t,isOpen:!0,id:lodashEs.uniqueId()})),Ht=i=>{var t,o,n,e,N,g;i&&((t=i.sysMessages)!=null&&t.message&&m((o=i.sysMessages)==null?void 0:o.message,"warning").forEach(I),(n=i.exceptions)!=null&&n.exception&&m((e=i.exceptions)==null?void 0:e.exception,"danger").forEach(I),(N=i.sysExceptions)!=null&&N.exception&&m((g=i.sysExceptions)==null?void 0:g.exception,"danger").forEach(I));};
50
-
51
- exports.DefaultNotifier = x;
52
- exports.Notification = _;
53
- exports.NotificationsList = at;
54
- exports.defaultNotifier = h;
55
- exports.dispatchNotifications = Ht;
56
- exports.getNotificationMessageObj = $t;
57
- exports.notify = I;
58
- exports.onCloseNotificationCallbacks = T;
59
- exports.parseServerNotification = m;
341
+ }`;
342
+ const useSelector = defaultNotifier.getSelector();
343
+ const NotificationsList = makeStyledComponent(
344
+ "NotificationsList",
345
+ "layout.common.notifications.list",
346
+ {
347
+ ".notificationsFloatingList": {
348
+ bottom: "10px",
349
+ height: "min-content",
350
+ maxHeight: "calc(100vh - 20px)",
351
+ maxWidth: "floatingNotifications",
352
+ position: "fixed",
353
+ pr: "5px",
354
+ right: "5px",
355
+ width: "100%",
356
+ zIndex: "notifications",
357
+ "& > *:not(:last-child)": {
358
+ mb: spacing(5)
359
+ },
360
+ ".notification.animate": {
361
+ animation: `${vibrate} 0.1s linear infinite`
362
+ }
363
+ },
364
+ ".fromRight-enter, .fromRight-appear": { transform: "translateX(550px)" },
365
+ ".fromRight-enter-active, .fromRight-appear-active": {
366
+ transition: "transform 150ms",
367
+ transform: "translateX(0)"
368
+ },
369
+ ".fromRight-exit": { transform: "translateX(0)" },
370
+ ".fromRight-exit-active": {
371
+ transition: "transform 150ms",
372
+ transform: "translateX(550px)"
373
+ }
374
+ },
375
+ () => {
376
+ const notifications = useSelector((current) => {
377
+ return current;
378
+ });
379
+ return /* @__PURE__ */ jsx(
380
+ Box,
381
+ __spreadProps(__spreadValues({
382
+ className: "notificationsFloatingList"
383
+ }, getVariant("layout.common.components.notifications.list")), {
384
+ children: notifications.map((current) => {
385
+ return /* @__PURE__ */ jsx(Notification, { notification: current }, current.id);
386
+ })
387
+ })
388
+ );
389
+ }
390
+ );
391
+ var NotificationsList$1 = React__default.memo(NotificationsList);
392
+
393
+ const getNotificationMessageObj = (data) => {
394
+ var _a, _b;
395
+ const notifications = [];
396
+ if ((_a = data == null ? void 0 : data.sysMessages) == null ? void 0 : _a.message) {
397
+ notifications.push(
398
+ ...parseServerNotification(data.sysMessages.message, "warning")
399
+ );
400
+ }
401
+ if (data == null ? void 0 : data.sysExceptions) {
402
+ notifications.push(
403
+ ...parseServerNotification(data.sysExceptions.exception, "danger")
404
+ );
405
+ }
406
+ if ((_b = data == null ? void 0 : data.exceptions) == null ? void 0 : _b.exception) {
407
+ notifications.push(
408
+ ...parseServerNotification(data.exceptions.exception, "danger")
409
+ );
410
+ }
411
+ if (notifications.length > 0)
412
+ return notifications;
413
+ return null;
414
+ };
415
+ function parseServerNotificationType(type) {
416
+ switch (type) {
417
+ case "1":
418
+ return "success";
419
+ case "2":
420
+ return "warning";
421
+ case "3":
422
+ return "danger";
423
+ default:
424
+ return "warning";
425
+ }
426
+ }
427
+ const parseServerNotification = (serverNotification, type) => {
428
+ const messages = arrayOrArray(serverNotification);
429
+ return messages.map((current) => {
430
+ const returnNotification = {
431
+ message: current.text,
432
+ trace: current.content,
433
+ title: current.title,
434
+ type: current.type !== void 0 ? parseServerNotificationType(current.type) : type,
435
+ isOpen: true,
436
+ id: uniqueId()
437
+ };
438
+ return returnNotification;
439
+ });
440
+ };
441
+ const dispatchNotifications = (alert) => {
442
+ var _a, _b, _c, _d, _e, _f;
443
+ if (alert) {
444
+ if ((_a = alert.sysMessages) == null ? void 0 : _a.message)
445
+ parseServerNotification((_b = alert.sysMessages) == null ? void 0 : _b.message, "warning").forEach(
446
+ notify
447
+ );
448
+ if ((_c = alert.exceptions) == null ? void 0 : _c.exception)
449
+ parseServerNotification((_d = alert.exceptions) == null ? void 0 : _d.exception, "danger").forEach(
450
+ notify
451
+ );
452
+ if ((_e = alert.sysExceptions) == null ? void 0 : _e.exception)
453
+ parseServerNotification((_f = alert.sysExceptions) == null ? void 0 : _f.exception, "danger").forEach(
454
+ notify
455
+ );
456
+ }
457
+ };
458
+
459
+ export { DefaultNotifier, Notification, NotificationsList$1 as NotificationsList, defaultNotifier, dispatchNotifications, getNotificationMessageObj, notify, onCloseNotificationCallbacks, parseServerNotification };
460
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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 'theme-ui';\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 'theme-ui';\nimport { getVariant, makeStyledComponent, spacing } from '@apia/theme';\nimport { keyframes } from '@emotion/react';\nimport { Notification } from './Notification';\nimport { defaultNotifier } from './defaultNotifier';\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.getSelector();\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 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,WAAY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,KAAN,IAAmB,GAAA,KAAA,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;;;;"}
package/package.json CHANGED
@@ -6,22 +6,35 @@
6
6
  "name": "@apia/notifications",
7
7
  "sideEffects": false,
8
8
  "types": "./dist/index.d.ts",
9
- "version": "0.0.9-alpha.0",
9
+ "version": "0.1.0",
10
+ "scripts": {
11
+ "build": "rollup -c rollup.config.esb.mjs",
12
+ "buildDev": "rollup -c rollup.config.esb.mjs --dev",
13
+ "watch": "rollup -c rollup.config.esb.mjs --dev --watch"
14
+ },
15
+ "devDependencies": {
16
+ "@rollup/plugin-commonjs": "^24.0.1",
17
+ "@rollup/plugin-json": "^6.0.0",
18
+ "@rollup/plugin-node-resolve": "^15.0.1",
19
+ "@rollup/plugin-terser": "^0.4.0",
20
+ "@rollup/plugin-typescript": "^11.0.0",
21
+ "esbuild": "^0.17.14",
22
+ "rollup": "^3.20.2",
23
+ "rollup-plugin-bundle-analyzer": "^1.6.6",
24
+ "rollup-plugin-dts": "^5.3.0",
25
+ "rollup-plugin-esbuild": "^5.0.0",
26
+ "typescript": "^4.9.5"
27
+ },
10
28
  "dependencies": {
11
- "@apia/icons": "^0.0.9-alpha.0",
12
- "@apia/store": "^0.0.9-alpha.0",
13
- "@apia/theme": "^0.0.9-alpha.0",
14
- "@apia/util": "^0.0.9-alpha.0",
29
+ "@apia/icons": "^0.1.0",
30
+ "@apia/store": "^0.1.0",
31
+ "@apia/theme": "^0.1.0",
32
+ "@apia/util": "^0.1.0",
15
33
  "@types/lodash-es": "^4.17.7",
16
34
  "@types/react-transition-group": "^4.4.5",
17
35
  "lodash-es": "^4.17.21",
18
36
  "react-transition-group": "^4.4.5"
19
37
  },
20
- "devDependencies": {
21
- "tsup": "^6.6.3",
22
- "type-fest": "^3.6.1",
23
- "typescript": "^4.9.5"
24
- },
25
38
  "peerDependencies": {
26
39
  "@emotion/react": "^11.10.6",
27
40
  "react": "^18.2.0",
@@ -37,9 +50,5 @@
37
50
  "url": "http://corp-gitlab-01.domst.st.net/products/apia/ApiaNPMPackages.git",
38
51
  "directory": "packages/notifications"
39
52
  },
40
- "scripts": {
41
- "build": "tsup",
42
- "buildDev": "tsup"
43
- },
44
- "gitHead": "44a7f4d12bba024c862a7a811b79547c6a8030b1"
53
+ "gitHead": "86196b99a03a2e33392a8b95b847b4d036271a48"
45
54
  }