@apia/notifications 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) [year] [fullname]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) [year] [fullname]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,28 +1,28 @@
1
- # Initiator
2
-
3
- Este package se creó con la única utilidad de copiarlo entero y pegarlo a la hora de crear un nuevo package.
4
-
5
- Este iniciador permite crear un paquete que compila typescript y puede ser importado desde otros packages.
6
-
7
- ## IMPORTANTE
8
-
9
- Los archivos **tsconfig.json** y **tsup.config.ts** no son archivos únicos sino symlinks a archivos de configuración comunes a todos los packages. En caso de que sea necesario modificar alguno de ellos **que en la gran mayoría de los casos no sería necesario**, es necesario eliminar el archivo a modificar y crear uno nuevo.
10
-
11
- ## Procedimiento
12
-
13
- - Copiar la carpeta initiator y pegarla con otro nombre dentro de packages.
14
- - Modificar el package.json:
15
- - Eliminar la línea ```private: true```.
16
- - Cambiar la ocurrencia `initiator` por el nombre del nuevo paquete.
17
- - Agregar los scripts convenientes: dev, build, etc.
18
- - Ejecutar el comando lerna bootstrap desde la carpeta raíz.
19
-
20
- Luego de ejecutar estos pasos, el package estaría listo para comenzar a usarse.
21
-
22
- Este package trae como dependencias por defecto theme-ui y react. Si se desea agregar más dependencias se debe ejecutar el comando ```lerna add --scope="@apia/packageName" dependencyName```. Ejemplo, si creamos un paquete con el nombre @apia/myPackage y queremos agregar lodash-es como dependencia, ejecutamos el comando ```lerna add --scope="@apia/myPackage" lodash-es```.
23
-
24
- **Importante 1**: Dado que estamos desarrollando packages, es importante determinar si las dependencias que vamos a agregar son de tipo dependency o de tipo peerDependency.
25
-
26
- **Importante 2**: lerna no permite instalar de a varias dependencias a la vez como lo hace npm, por lo tanto, si se desea agregar varias dependencias se debe ejecutar el comando anterior tantas veces como dependencias se quiera agregar.
27
-
1
+ # Initiator
2
+
3
+ Este package se creó con la única utilidad de copiarlo entero y pegarlo a la hora de crear un nuevo package.
4
+
5
+ Este iniciador permite crear un paquete que compila typescript y puede ser importado desde otros packages.
6
+
7
+ ## IMPORTANTE
8
+
9
+ Los archivos **tsconfig.json** y **tsup.config.ts** no son archivos únicos sino symlinks a archivos de configuración comunes a todos los packages. En caso de que sea necesario modificar alguno de ellos **que en la gran mayoría de los casos no sería necesario**, es necesario eliminar el archivo a modificar y crear uno nuevo.
10
+
11
+ ## Procedimiento
12
+
13
+ - Copiar la carpeta initiator y pegarla con otro nombre dentro de packages.
14
+ - Modificar el package.json:
15
+ - Eliminar la línea ```private: true```.
16
+ - Cambiar la ocurrencia `initiator` por el nombre del nuevo paquete.
17
+ - Agregar los scripts convenientes: dev, build, etc.
18
+ - Ejecutar el comando lerna bootstrap desde la carpeta raíz.
19
+
20
+ Luego de ejecutar estos pasos, el package estaría listo para comenzar a usarse.
21
+
22
+ Este package trae como dependencias por defecto theme-ui y react. Si se desea agregar más dependencias se debe ejecutar el comando ```lerna add --scope="@apia/packageName" dependencyName```. Ejemplo, si creamos un paquete con el nombre @apia/myPackage y queremos agregar lodash-es como dependencia, ejecutamos el comando ```lerna add --scope="@apia/myPackage" lodash-es```.
23
+
24
+ **Importante 1**: Dado que estamos desarrollando packages, es importante determinar si las dependencias que vamos a agregar son de tipo dependency o de tipo peerDependency.
25
+
26
+ **Importante 2**: lerna no permite instalar de a varias dependencias a la vez como lo hace npm, por lo tanto, si se desea agregar varias dependencias se debe ejecutar el comando anterior tantas veces como dependencias se quiera agregar.
27
+
28
28
  **Importante 3**: React y theme-ui vienen instalados como peerDependencies. En caso de no ser necesarios pueden ser removidos, pero en cualquier caso asegurarse de que estas dependencias no sean instaladas como dependencies puesto que esto causaría comportamientos indeseados en la aplicación.
package/cleanDist.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "cleanDist": 0.055914100472197026
3
+ }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/notificationsStore.ts","../src/defaultNotifier.ts","../src/Notification.tsx","../src/NotificationsList.tsx","../src/apia/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { createSlice, injectReducers, PayloadAction } from '@apia/store';\r\nimport { getSpecificParent } from '@apia/util';\r\nimport { INotification, TNotificationId } from './types';\r\n\r\nfunction putNotificationToVibrate(message: string) {\r\n let hasAnimated = false;\r\n document\r\n .querySelectorAll('.notificationsFloatingList .notification__text')\r\n .forEach((current) => {\r\n if (current.textContent === String(message)) {\r\n const notificationElement = getSpecificParent(\r\n current as HTMLElement,\r\n (search) => {\r\n return search.classList.contains('notification');\r\n },\r\n );\r\n if (notificationElement) {\r\n notificationElement.classList.add('animate');\r\n setTimeout(() => {\r\n notificationElement.classList.remove('animate');\r\n }, 300);\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 return hasAnimated;\r\n}\r\n\r\nexport const notificationsSlice = createSlice({\r\n name: 'notificationsSlice',\r\n initialState: { notifications: [] } as {\r\n notifications: INotification<any>[];\r\n },\r\n reducers: {\r\n close(state, { payload }: PayloadAction<{ id: TNotificationId }>) {\r\n state.notifications = state.notifications.map((current) => {\r\n return current.id === payload.id\r\n ? { ...current, isOpen: false }\r\n : current;\r\n });\r\n },\r\n closeAll(state) {\r\n const firstOpenIndex = state.notifications.findIndex((current) => {\r\n return current.isOpen;\r\n });\r\n if (firstOpenIndex >= 0) {\r\n state.notifications[firstOpenIndex].isOpen = false;\r\n setTimeout(() => {\r\n return notificationsStore.dispatch(notificationsActions.closeAll());\r\n }, 50);\r\n }\r\n },\r\n delete: (\r\n state,\r\n { payload: { id } }: PayloadAction<{ id: TNotificationId }>,\r\n ) => {\r\n state.notifications = state.notifications.filter((current) => {\r\n return current.id !== id;\r\n });\r\n },\r\n push(\r\n state,\r\n payload: PayloadAction<{ notifications: INotification<any>[] }>,\r\n ) {\r\n const notifications = payload.payload.notifications.filter(\r\n (notification) => {\r\n return !putNotificationToVibrate(notification.message);\r\n },\r\n );\r\n\r\n state.notifications.push(...notifications);\r\n },\r\n },\r\n});\r\n\r\nexport const {\r\n store: notificationsStore,\r\n useSelector: useNotificationsSelector,\r\n} = injectReducers({\r\n notificationsSlice: notificationsSlice.reducer,\r\n});\r\n\r\nexport const notificationsActions = notificationsSlice.actions;\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { uniqueId } from 'lodash-es';\r\nimport {\r\n notificationsActions,\r\n notificationsStore,\r\n useNotificationsSelector,\r\n} from './notificationsStore';\r\nimport {\r\n INotification,\r\n INotificationsDispatcher,\r\n TNotificationId,\r\n TNotificationSelector,\r\n} from './types';\r\n\r\nexport const onCloseNotificationCallbacks: Record<string, () => unknown> = {};\r\n\r\nexport type TNotificationType = 'danger' | 'success' | 'warning';\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\r\n implements INotificationsDispatcher<TNotificationType>\r\n{\r\n areNotificationsOpen(): boolean {\r\n return !!document.querySelector('.notification');\r\n }\r\n\r\n close(id: TNotificationId | INotification): void {\r\n notificationsStore.dispatch(\r\n notificationsActions.close({ id: typeof id === 'object' ? id.id : id }),\r\n );\r\n }\r\n\r\n closeAll(): void {\r\n notificationsStore.dispatch(notificationsActions.closeAll());\r\n }\r\n\r\n delete(id: TNotificationId | INotification): void {\r\n notificationsStore.dispatch(\r\n notificationsActions.delete({ id: typeof id === 'object' ? id.id : id }),\r\n );\r\n }\r\n\r\n getSelector(): (\r\n selector: TNotificationSelector<TNotificationType>,\r\n ) => INotification<TNotificationType>[] {\r\n return (selector: TNotificationSelector<TNotificationType>) => {\r\n return useNotificationsSelector((global) => {\r\n return selector(\r\n global.notificationsSlice\r\n .notifications as INotification<TNotificationType>[],\r\n );\r\n });\r\n };\r\n }\r\n\r\n notify(notification: TDispatchedNotification): void {\r\n const id = notification.id ?? uniqueId();\r\n\r\n if (notification.onClose)\r\n onCloseNotificationCallbacks[id] = notification.onClose;\r\n\r\n notificationsStore.dispatch(\r\n notificationsActions.push({\r\n notifications: [\r\n {\r\n ...notification,\r\n isOpen: true,\r\n type: notification.type ?? 'warning',\r\n id,\r\n onClose: undefined,\r\n },\r\n ],\r\n }),\r\n );\r\n }\r\n}\r\n\r\nexport const defaultNotifier = new DefaultNotifier();\r\n\r\nexport function notify(notification: TDispatchedNotification) {\r\n new DefaultNotifier().notify(notification);\r\n}\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\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\r\n const onClick = React.useCallback(() => {\r\n setShouldShow(false);\r\n }, []);\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 <>\r\n <Box as=\"code\" className=\"notification__trace\">\r\n <Box as=\"strong\" className=\"notification__traceLabel\">\r\n Trace:\r\n </Box>\r\n <Box className=\"notification__traceText\">\r\n {innerNotification.trace}\r\n </Box>\r\n </Box>\r\n </>\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\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.getSelector();\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 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 { uniqueId } from 'lodash-es';\r\nimport { notify, TNotificationType } 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":["__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,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KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,EAAW,QAAQ,CAAE,CAAA,OAAA;AAAA,QAChE,MAAA;AAAA,OACF,CAAA;AAAA,GACJ;AACF;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/notificationsStore.ts","../src/defaultNotifier.ts","../src/Notification.tsx","../src/NotificationsList.tsx","../src/apia/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createSlice, injectReducers, PayloadAction } from '@apia/store';\nimport { getSpecificParent } from '@apia/util';\nimport { INotification, TNotificationId } from './types';\n\nfunction putNotificationToVibrate(message: string) {\n let hasAnimated = false;\n document\n .querySelectorAll('.notificationsFloatingList .notification__text')\n .forEach((current) => {\n if (current.textContent === String(message)) {\n const notificationElement = getSpecificParent(\n current as HTMLElement,\n (search) => {\n return search.classList.contains('notification');\n },\n );\n if (notificationElement) {\n notificationElement.classList.add('animate');\n setTimeout(() => {\n notificationElement.classList.remove('animate');\n }, 300);\n hasAnimated = true;\n } else\n console.warn(\n 'A notification with that text was found, but it could not be animated',\n );\n }\n });\n return hasAnimated;\n}\n\nexport const notificationsSlice = createSlice({\n name: 'notificationsSlice',\n initialState: { notifications: [] } as {\n notifications: INotification<any>[];\n },\n reducers: {\n close(state, { payload }: PayloadAction<{ id: TNotificationId }>) {\n state.notifications = state.notifications.map((current) => {\n return current.id === payload.id\n ? { ...current, isOpen: false }\n : current;\n });\n },\n closeAll(state) {\n const firstOpenIndex = state.notifications.findIndex((current) => {\n return current.isOpen;\n });\n if (firstOpenIndex >= 0) {\n state.notifications[firstOpenIndex].isOpen = false;\n setTimeout(() => {\n return notificationsStore.dispatch(notificationsActions.closeAll());\n }, 50);\n }\n },\n delete: (\n state,\n { payload: { id } }: PayloadAction<{ id: TNotificationId }>,\n ) => {\n state.notifications = state.notifications.filter((current) => {\n return current.id !== id;\n });\n },\n push(\n state,\n payload: PayloadAction<{ notifications: INotification<any>[] }>,\n ) {\n const notifications = payload.payload.notifications.filter(\n (notification) => {\n return !putNotificationToVibrate(notification.message);\n },\n );\n\n state.notifications.push(...notifications);\n },\n },\n});\n\nexport const {\n store: notificationsStore,\n useSelector: useNotificationsSelector,\n} = injectReducers({\n notificationsSlice: notificationsSlice.reducer,\n});\n\nexport const notificationsActions = notificationsSlice.actions;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { uniqueId } from 'lodash-es';\nimport {\n notificationsActions,\n notificationsStore,\n useNotificationsSelector,\n} from './notificationsStore';\nimport {\n INotification,\n INotificationsDispatcher,\n TNotificationId,\n TNotificationSelector,\n} from './types';\n\nexport const onCloseNotificationCallbacks: Record<string, () => unknown> = {};\n\nexport type TNotificationType = 'danger' | 'success' | 'warning';\n\nexport type TDispatchedNotification = Omit<\n INotification<TNotificationType>,\n 'id' | 'type' | 'isOpen'\n> &\n Partial<Pick<INotification<TNotificationType>, 'id' | 'type'>>;\n\nexport class DefaultNotifier\n implements INotificationsDispatcher<TNotificationType>\n{\n areNotificationsOpen(): boolean {\n return !!document.querySelector('.notification');\n }\n\n close(id: TNotificationId | INotification): void {\n notificationsStore.dispatch(\n notificationsActions.close({ id: typeof id === 'object' ? id.id : id }),\n );\n }\n\n closeAll(): void {\n notificationsStore.dispatch(notificationsActions.closeAll());\n }\n\n delete(id: TNotificationId | INotification): void {\n notificationsStore.dispatch(\n notificationsActions.delete({ id: typeof id === 'object' ? id.id : id }),\n );\n }\n\n getSelector(): (\n selector: TNotificationSelector<TNotificationType>,\n ) => INotification<TNotificationType>[] {\n return (selector: TNotificationSelector<TNotificationType>) => {\n return useNotificationsSelector((global) => {\n return selector(\n global.notificationsSlice\n .notifications as INotification<TNotificationType>[],\n );\n });\n };\n }\n\n notify(notification: TDispatchedNotification): void {\n const id = notification.id ?? uniqueId();\n\n if (notification.onClose)\n onCloseNotificationCallbacks[id] = notification.onClose;\n\n notificationsStore.dispatch(\n notificationsActions.push({\n notifications: [\n {\n ...notification,\n isOpen: true,\n type: notification.type ?? 'warning',\n id,\n onClose: undefined,\n },\n ],\n }),\n );\n }\n}\n\nexport const defaultNotifier = new DefaultNotifier();\n\nexport function notify(notification: TDispatchedNotification) {\n new DefaultNotifier().notify(notification);\n}\n","import * as React from 'react';\nimport { Alert, Box, Close } from '@apia/theme';\nimport { CSSTransition } from 'react-transition-group';\nimport { getIndex, useUnmount, useUpdateEffect } from '@apia/util';\nimport { Icon, isIconName, TIconName } from '@apia/icons';\nimport { INotification } from './types';\nimport {\n defaultNotifier,\n onCloseNotificationCallbacks,\n} from './defaultNotifier';\n\nexport interface INotificationProps {\n animationName?: string;\n animationTimeout?: number;\n className?: string;\n disableClose?: boolean;\n notification: INotification;\n}\n\nexport const Notification: React.FC<INotificationProps> = ({\n animationName = 'fromRight',\n animationTimeout = 150,\n className,\n disableClose,\n notification,\n}) => {\n const innerNotification = React.useMemo(\n () => ({ ...notification }),\n [notification],\n );\n const nodeRef = React.useRef(null);\n if (!innerNotification.title)\n innerNotification.title = getIndex(\n [window.LBL_ERROR, window.LBL_WARNING, window.LBL_COMPLETE_OPERATION],\n [\n innerNotification.type === 'danger',\n innerNotification.type === 'warning',\n innerNotification.type === 'success',\n ],\n );\n if (!innerNotification.icon)\n innerNotification.icon = getIndex<TIconName>(\n ['Check', 'Alert', 'Close'],\n [\n innerNotification.type === 'success',\n innerNotification.type === 'warning',\n innerNotification.type === 'danger',\n ],\n );\n\n const [shouldShow, setShouldShow] = React.useState(true);\n\n const close = React.useCallback(() => {\n defaultNotifier.delete(innerNotification);\n }, [innerNotification]);\n\n useUpdateEffect(() => {\n if (!innerNotification.isOpen) setShouldShow(false);\n }, [innerNotification.isOpen]);\n\n useUnmount(() => {\n if (onCloseNotificationCallbacks[innerNotification.id])\n onCloseNotificationCallbacks[innerNotification.id]();\n });\n\n let notificationType: INotification['type'] = 'warning';\n if (['sysException', 'exception', 'danger'].includes(innerNotification.type))\n notificationType = 'danger';\n if (['greenMessage', 'success'].includes(innerNotification.type))\n notificationType = 'success';\n\n const onClick = React.useCallback(() => {\n setShouldShow(false);\n }, []);\n\n return (\n <CSSTransition\n in={shouldShow}\n timeout={animationTimeout}\n classNames={animationName}\n appear\n unmountOnExit\n onExited={close}\n nodeRef={nodeRef}\n >\n <Alert\n data-testid={notificationType}\n role=\"alert\"\n ref={nodeRef}\n variant={`alerts.${notificationType}`}\n className={`${\n className ?? ''\n } notification notification__alert ${notificationType}`}\n tabIndex={0}\n onKeyDown={React.useCallback((ev: React.KeyboardEvent) => {\n if (\n ev.key.toLowerCase() === 'escape' ||\n ev.key.toLowerCase() === 'enter' ||\n ev.key === ' '\n ) {\n ev.preventDefault();\n ev.stopPropagation();\n setShouldShow(false);\n }\n }, [])}\n >\n {(!disableClose ||\n innerNotification.icon ||\n innerNotification.title) && (\n <Box className=\"notification__header\">\n {(innerNotification.title || innerNotification.icon) && (\n <Box as=\"h4\" className=\"notification__title\">\n {innerNotification.icon && (\n <Box className=\"notification__icon\">\n {isIconName(\n innerNotification.icon as unknown as TIconName,\n ) ? (\n <Icon\n title=\"\"\n name={innerNotification.icon as unknown as TIconName}\n />\n ) : (\n innerNotification.icon\n )}\n </Box>\n )}\n {innerNotification.title}\n </Box>\n )}\n {!disableClose && (\n <Close\n type=\"button\"\n onClick={onClick}\n tabIndex={-1}\n className=\"notification__closeButton\"\n />\n )}\n </Box>\n )}\n <Box className=\"notification__body\">\n <Box className=\"notification__content\">\n <Box className=\"notification__message\">\n <Box\n dangerouslySetInnerHTML={{\n __html: innerNotification.message,\n }}\n className=\"notification__text\"\n />\n </Box>\n {innerNotification.trace && (\n <>\n <Box as=\"code\" className=\"notification__trace\">\n <Box as=\"strong\" className=\"notification__traceLabel\">\n Trace:\n </Box>\n <Box className=\"notification__traceText\">\n {innerNotification.trace}\n </Box>\n </Box>\n </>\n )}\n </Box>\n </Box>\n </Alert>\n </CSSTransition>\n );\n};\n","import React from 'react';\nimport { Box } from '@apia/theme';\nimport { getVariant, makeStyledComponent, spacing } from '@apia/theme';\nimport { keyframes } from '@emotion/react';\nimport { Notification } from './Notification';\nimport { 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,IA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AAM,GAAA,KAAA,CAAA,aAAA,KAAN,IAAqB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,EAAW,QAAQ,CAAE,CAAA,OAAA;AAAA,QAChE,MAAA;AAAA,OACF,CAAA;AAAA,GACJ;AACF;;;;"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "name": "@apia/notifications",
7
7
  "sideEffects": false,
8
8
  "types": "./dist/index.d.ts",
9
- "version": "0.2.2",
9
+ "version": "0.2.4",
10
10
  "scripts": {
11
11
  "build": "rollup -c rollup.config.esb.mjs",
12
12
  "buildDev": "rollup -c rollup.config.esb.mjs --dev",
@@ -26,10 +26,10 @@
26
26
  "typescript": "^4.9.5"
27
27
  },
28
28
  "dependencies": {
29
- "@apia/icons": "^0.2.2",
30
- "@apia/store": "^0.2.2",
31
- "@apia/theme": "^0.2.2",
32
- "@apia/util": "^0.2.2",
29
+ "@apia/icons": "^0.2.4",
30
+ "@apia/store": "^0.2.4",
31
+ "@apia/theme": "^0.2.4",
32
+ "@apia/util": "^0.2.4",
33
33
  "@types/lodash-es": "^4.17.7",
34
34
  "@types/react-transition-group": "^4.4.5",
35
35
  "lodash-es": "^4.17.21",
@@ -49,5 +49,5 @@
49
49
  "url": "http://corp-gitlab-01.domst.st.net/products/apia/ApiaNPMPackages.git",
50
50
  "directory": "packages/notifications"
51
51
  },
52
- "gitHead": "eed8d2895151a4b3e0d4b7ca00c7f22371075487"
52
+ "gitHead": "f14ade3161fb978c89e9f0949e46aca54d2e1db3"
53
53
  }