@apia/notifications 4.0.44 → 5.0.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/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ declare const _default: React__default.MemoExoticComponent<((props: object) => R
36
36
  }>;
37
37
 
38
38
  declare const onCloseNotificationCallbacks: Record<string, () => unknown>;
39
- type TNotificationType = 'danger' | 'success' | 'warning';
39
+ type TNotificationType = 'danger' | 'error' | 'success' | 'info' | 'warning' | 'modal';
40
40
  declare function uniqueId(): string;
41
41
  type TDispatchedNotification = Omit<INotification<TNotificationType>, 'id' | 'type' | 'isOpen'> & Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;
42
42
  declare class DefaultNotifier extends EventEmitter<{
package/dist/index.js CHANGED
@@ -202,20 +202,27 @@ const Notification = ({
202
202
  const nodeRef = React.useRef(null);
203
203
  if (!innerNotification.title)
204
204
  innerNotification.title = getIndex(
205
- [window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],
205
+ [
206
+ window.LBL_ERROR,
207
+ window.LBL_ERROR,
208
+ window.LBL_WARNING,
209
+ window.LBL_COMPLETE_OPERATION
210
+ ],
206
211
  [
207
212
  innerNotification.type === "danger",
213
+ innerNotification.type === "error",
208
214
  innerNotification.type === "warning",
209
215
  innerNotification.type === "success"
210
216
  ]
211
217
  );
212
218
  if (!innerNotification.icon)
213
219
  innerNotification.icon = getIndex(
214
- ["Check", "Alert", "Close"],
220
+ ["Check", "Alert", "Close", "Close"],
215
221
  [
216
222
  innerNotification.type === "success",
217
223
  innerNotification.type === "warning",
218
- innerNotification.type === "danger"
224
+ innerNotification.type === "danger",
225
+ innerNotification.type === "error"
219
226
  ]
220
227
  );
221
228
  const [shouldShow, setShouldShow] = React.useState(true);
@@ -231,7 +238,9 @@ const Notification = ({
231
238
  onCloseNotificationCallbacks[innerNotification.id]();
232
239
  });
233
240
  let notificationType = "warning";
234
- if (["sysException", "exception", "danger"].includes(innerNotification.type))
241
+ if (["sysException", "exception", "danger", "error"].includes(
242
+ innerNotification.type
243
+ ))
235
244
  notificationType = "danger";
236
245
  if (["greenMessage", "success"].includes(innerNotification.type))
237
246
  notificationType = "success";
@@ -413,6 +422,8 @@ function parseServerNotificationType(type) {
413
422
  return "warning";
414
423
  case "3":
415
424
  return "danger";
425
+ case "4":
426
+ return "modal";
416
427
  default:
417
428
  return "warning";
418
429
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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 {\r\n arrayOrArray,\r\n T__LEGACY_SERVER__Message,\r\n T__LEGACY_SERVER__MessagesPayload,\r\n} from '@apia/util';\r\nimport { notify, TNotificationType, uniqueId } from '../defaultNotifier';\r\nimport { INotification } 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: T__LEGACY_SERVER__MessagesPayload,\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: T__LEGACY_SERVER__Message | T__LEGACY_SERVER__Message[],\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 = (\r\n alert: T__LEGACY_SERVER__MessagesPayload,\r\n) => {\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"],"names":["id","React"],"mappings":";;;;;;;;;;;;;;;AAKO,MAAM,+BAA8D;AAI3E,SAAS,YAAA,CAAa,GAAc,CAAA,EAAc;AAChD,EAAA,IAAI,CAAA,CAAE,WAAW,CAAA,CAAE,MAAA;AAAQ,IAAA,OAAO,KAAA;AAElC,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,CAAA,CAAE,MAAA,EAAQ,CAAA,EAAA;AAAK,IAAA,IAAI,CAAA,CAAE,CAAC,CAAA,KAAM,CAAA,CAAE,CAAC,CAAA;AAAG,MAAA,OAAO,KAAA;AAE7D,EAAA,OAAO,IAAA;AACT;AAEA,IAAI,EAAA,GAAK,CAAA;AACF,SAAS,QAAA,GAAW;AACzB,EAAA,OAAO,gBAAgB,EAAA,EAAI,CAAA,CAAA;AAC7B;AAQO,MAAM,wBAAwB,YAAA,CAAuC;AAAA,EAArE,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AACL,IAAA,aAAA,CAAA,IAAA,EAAA,eAAA,EAAoD,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AA,GAAuD;AAAA,MAC3D,SAAS,OAAA,CAAQ,IAAA;AAAA,MACjB,OAAO,OAAA,CAAQ,OAAA;AAAA,MACf,OAAO,OAAA,CAAQ,KAAA;AAAA,MACf,MACE,OAAA,CAAQ,IAAA,KAAS,SACb,2BAAA,CAA4B,OAAA,CAAQ,IAAI,CAAA,GACvC,IAAA;AAAA,MACP,MAAA,EAAQ,IAAA;AAAA,MACR,IAAI,QAAA;AAAS,KACf;AACA,IAAA,OAAO,kBAAA;AAAA,GACR,CAAA;AACH;AAOO,MAAM,qBAAA,GAAwB,CACnC,KAAA,KACG;AACH,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,MAAM,WAAA,EAAa,OAAA;AACrB,MAAA,uBAAA,CAAwB,KAAA,CAAM,WAAA,EAAa,OAAA,EAAS,SAAS,CAAA,CAAE,OAAA;AAAA,QAC7D;AAAA,OACF;AACF,IAAA,IAAI,MAAM,UAAA,EAAY,SAAA;AACpB,MAAA,uBAAA,CAAwB,KAAA,CAAM,UAAA,EAAY,SAAA,EAAW,QAAQ,CAAA,CAAE,OAAA;AAAA,QAC7D;AAAA,OACF;AACF,IAAA,IAAI,MAAM,aAAA,EAAe,SAAA;AACvB,MAAA,uBAAA,CAAwB,KAAA,CAAM,aAAA,EAAe,SAAA,EAAW,QAAQ,CAAA,CAAE,OAAA;AAAA,QAChE;AAAA,OACF;AAAA;AAEN;;;;"}
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 =\r\n | 'danger'\r\n | 'error'\r\n | 'success'\r\n | 'info'\r\n | 'warning'\r\n | 'modal';\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 [\r\n window.LBL_ERROR,\r\n window.LBL_ERROR,\r\n window.LBL_WARNING,\r\n window.LBL_COMPLETE_OPERATION,\r\n ],\r\n [\r\n innerNotification.type === 'danger',\r\n innerNotification.type === 'error',\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', 'Close'],\r\n [\r\n innerNotification.type === 'success',\r\n innerNotification.type === 'warning',\r\n innerNotification.type === 'danger',\r\n innerNotification.type === 'error',\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 (\r\n ['sysException', 'exception', 'danger', 'error'].includes(\r\n innerNotification.type,\r\n )\r\n )\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 {\r\n arrayOrArray,\r\n T__LEGACY_SERVER__Message,\r\n T__LEGACY_SERVER__MessagesPayload,\r\n} from '@apia/util';\r\nimport { notify, TNotificationType, uniqueId } from '../defaultNotifier';\r\nimport { INotification } 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: T__LEGACY_SERVER__MessagesPayload,\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 case '4':\r\n return 'modal';\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: T__LEGACY_SERVER__Message | T__LEGACY_SERVER__Message[],\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 = (\r\n alert: T__LEGACY_SERVER__MessagesPayload,\r\n) => {\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.s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ACf;AACA,IAAA,OAAO,kBAAA;AAAA,GACR,CAAA;AACH;AAOO,MAAM,qBAAA,GAAwB,CACnC,KAAA,KACG;AACH,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,MAAM,WAAA,EAAa,OAAA;AACrB,MAAA,uBAAA,CAAwB,KAAA,CAAM,WAAA,EAAa,OAAA,EAAS,SAAS,CAAA,CAAE,OAAA;AAAA,QAC7D;AAAA,OACF;AACF,IAAA,IAAI,MAAM,UAAA,EAAY,SAAA;AACpB,MAAA,uBAAA,CAAwB,KAAA,CAAM,UAAA,EAAY,SAAA,EAAW,QAAQ,CAAA,CAAE,OAAA;AAAA,QAC7D;AAAA,OACF;AACF,IAAA,IAAI,MAAM,aAAA,EAAe,SAAA;AACvB,MAAA,uBAAA,CAAwB,KAAA,CAAM,aAAA,EAAe,SAAA,EAAW,QAAQ,CAAA,CAAE,OAAA;AAAA,QAChE;AAAA,OACF;AAAA;AAEN;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apia/notifications",
3
- "version": "4.0.44",
3
+ "version": "5.0.0",
4
4
  "sideEffects": false,
5
5
  "author": "Alexis Leite <alexisleite@live.com>",
6
6
  "main": "dist/index.js",
@@ -15,10 +15,10 @@
15
15
  "libWatchForDashboards": "rollup --watch --config ../../config/rollup.common.mjs --environment MODE:development,ENTRY:index.ts,WATCH:true,DEV_SERVER_MODULE:dashboards"
16
16
  },
17
17
  "dependencies": {
18
- "@apia/icons": "^4.0.44",
19
- "@apia/store": "^4.0.44",
20
- "@apia/theme": "^4.0.44",
21
- "@apia/util": "^4.0.44",
18
+ "@apia/icons": "^5.0.0",
19
+ "@apia/store": "^5.0.0",
20
+ "@apia/theme": "^5.0.0",
21
+ "@apia/util": "^5.0.0",
22
22
  "@emotion/react": "^11.11.4",
23
23
  "@types/react-transition-group": "^4.4.5",
24
24
  "react-transition-group": "^4.4.5"
@@ -43,5 +43,5 @@
43
43
  "url": "http://corp-gitlab-01.domst.st.net/products/apia/ApiaNPMPackages.git",
44
44
  "directory": "packages/notifications"
45
45
  },
46
- "gitHead": "0822e3a7f4a7fa49b47087e8097caab678d36ef6"
46
+ "gitHead": "985b675635fb9d3dc5e26a90a6d9898864418b84"
47
47
  }