{"version":3,"sources":["app/Layout/FrontendLayout/components/Snackbar/Actions/index.tsx","app/Layout/FrontendLayout/components/Snackbar/index.tsx"],"names":["RefreshTableButton","t","useTranslation","dispatch","useDispatch","layoutActions","useLayoutSlice","actions","Button","variant","size","onClick","setRefreshTable","translations","RefreshTable","OpenDetails","props","bold","itemName","Box","component","marginX","openPanel","renderPageType","detailsType","renderPageProps","detailsTypeProps","expanded","useSidePanel","isCover","openSidePanel","type","Id","itemEndName","created","OpenMultiDetails","multiDetails","map","f","displayed","ClosableMessage","closeSnackbar","closable","message","key","style","marginRight","IconButton","shape","aria-label","position","right","top","color","icon","colorExtend","SnackbarManager","useAppSettingsSlice","notifications","useSelector","selectNotifications","useSnackbar","enqueueSnackbar","history","useHistory","theme","useTheme","getActions","useCallback","item","actionType","SnackBarActionType","refreshTable","push","persist","length","display","gridGap","i","LinkOnClick","React","itemLinkProps","messageTypeProps","undefined","linkUrl","replaceUrl","replace","window","open","toRootedURL","renderMessage","messageType","Fragment","parse","SnackBarMessageType","openSidepanelDetails","itemProps","multiple","createElement","showLinkMessage","flexDirection","alignItems","gap","linkText","afterLinkText","HTML","fileDownload","fileProps","file","fileName","fileTitle","messageList","listProps","margin","messages","msg","paddingBottom","useEffect","forEach","includes","id","x","anchorOrigin","vertical","horizontal","preventDuplicate","autoHideDuration","action","onExited","_","myKey","removeNotification","filter","direction"],"mappings":"uPAgDO,SAASA,IAAsB,IAC5BC,EAAMC,cAAND,EACFE,EAAWC,wBACAC,EAAkBC,cAA3BC,QAIR,OACE,cAACC,EAAA,EAAD,CAAQC,QAAQ,OAAOC,KAAK,QAAQC,QAJX,WACzBR,EAASE,EAAcO,iBAAgB,KAGvC,SACGX,EAAEY,IAAaC,gBAIf,SAASC,EAAYC,GAC1B,IAAMb,EAAWC,wBACTG,EAAYD,cAAZC,QACR,OACE,cAAC,WAAD,UACE,eAAC,IAAD,CAAMU,MAAM,EAAMP,KAAK,QAAvB,UACGM,EAAME,SACP,cAACC,EAAA,EA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qOhBrH,EAASI,EAAQ4H,mBAAmBD,IArOpBV,EAsOAU,EArOtB3F,EAAS,YAAOA,EAAU6F,QAAO,SAAAxF,GAAG,OAAI4E,IAAO5E,QAyO7CkB,EAAgB4B,EAAcrB,GAAOoD,GA9OlBD,EAgPJnD,EAAKzB,IA/OtBL,EAAS,sBAAOA,GAAP,CAAkBiF,UAiP1B,CACD9D,EACAnD,EACAkC,EACAqB,EACA3D,EACA8D,EAAMoE,UACN3C,EACAvB,IAGK","file":"static/js/104.6d46932b.chunk.js","sourcesContent":["import { Body } from 'app/components/Typography';\r\nimport { translations } from 'locales/translations';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useDispatch } from 'react-redux';\r\nimport { useLayoutSlice } from '../../../slice';\r\nimport * as React from 'react';\r\nimport {\r\n PageTypeProps,\r\n RenderPageType,\r\n} from 'app/Layout/FrontendLayout/slice/type';\r\nimport { Box } from '@material-ui/core';\r\nimport { Button } from 'app/components/BasicButtons/Button';\r\nimport { SidePanelOpenState } from 'app/hooks/useSidePanelOpen';\r\n\r\nexport interface OpenDetailsProps {\r\n Id?: number;\r\n created: boolean;\r\n itemName: string;\r\n linkUrl?: string;\r\n linkText?: string;\r\n afterLinkText?: string;\r\n replaceUrl?: boolean;\r\n itemEndName?: string;\r\n detailsType?: RenderPageType;\r\n detailsTypeProps?: PageTypeProps;\r\n detailsUlr?: string;\r\n multiple?: boolean;\r\n multiDetails?: MultiDetailsProps[];\r\n useSidePanel?: boolean;\r\n openPanel?: (state: SidePanelOpenState) => void;\r\n}\r\nexport interface MultiDetailsProps {\r\n Id: number;\r\n detailsType: RenderPageType;\r\n detailsTypeProps: PageTypeProps;\r\n}\r\nexport interface ListMessagesProps {\r\n messages: SingleMessagesProps[];\r\n}\r\nexport interface SingleMessagesProps {\r\n Id: string;\r\n message: string;\r\n}\r\nexport interface DownloadFileProps {\r\n file: any;\r\n fileTitle: string;\r\n fileName: string;\r\n}\r\nexport function RefreshTableButton() {\r\n const { t } = useTranslation();\r\n const dispatch = useDispatch();\r\n const { actions: layoutActions } = useLayoutSlice();\r\n const handleRefreshClick = () => {\r\n dispatch(layoutActions.setRefreshTable(true));\r\n };\r\n return (\r\n \r\n );\r\n}\r\nexport function OpenDetails(props: OpenDetailsProps) {\r\n const dispatch = useDispatch();\r\n const { actions } = useLayoutSlice();\r\n return (\r\n \r\n \r\n {props.itemName}\r\n \r\n {\r\n if (!!props.openPanel) {\r\n props.openPanel({\r\n renderPageType: props.detailsType,\r\n renderPageProps: props.detailsTypeProps,\r\n expanded: false,\r\n useSidePanel: props.useSidePanel,\r\n isCover: props.useSidePanel,\r\n });\r\n } else {\r\n dispatch(\r\n actions.openSidePanel({\r\n type: props.detailsType,\r\n props: props.detailsTypeProps,\r\n }),\r\n );\r\n }\r\n }}\r\n >\r\n {`#${props.Id} `}\r\n \r\n \r\n {props.itemEndName\r\n ? props.itemEndName\r\n : `${props.created ? 'Created' : 'Updated'}!`}\r\n \r\n \r\n );\r\n}\r\nexport function OpenMultiDetails(props: OpenDetailsProps) {\r\n const dispatch = useDispatch();\r\n const { actions } = useLayoutSlice();\r\n return (\r\n \r\n \r\n {props.itemName}\r\n \r\n {props.multiDetails?.map(f => (\r\n {\r\n if (!!props.openPanel) {\r\n props.openPanel({\r\n renderPageType: f.detailsType,\r\n renderPageProps: f.detailsTypeProps,\r\n expanded: false,\r\n useSidePanel: props.useSidePanel,\r\n isCover: props.useSidePanel,\r\n });\r\n } else {\r\n dispatch(\r\n actions.openSidePanel({\r\n type: f.detailsType,\r\n props: f.detailsTypeProps,\r\n }),\r\n );\r\n }\r\n }}\r\n >\r\n {`#${f.Id} `}\r\n \r\n ))}\r\n \r\n {props.itemEndName\r\n ? props.itemEndName\r\n : `${props.created ? 'Created' : 'Updated'}!`}\r\n \r\n \r\n );\r\n}\r\n","import React, { useCallback } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\n\r\nimport { useSnackbar, OptionsObject, SnackbarKey } from 'notistack';\r\n\r\nimport { selectNotifications } from '../../../../slice/selectors';\r\nimport { useAppSettingsSlice } from 'app/slice';\r\nimport { Notification as AppNotificationMessage } from 'types/Notification';\r\nimport { useTheme } from '@material-ui/core/styles';\r\nimport { SnackBarActionType, SnackBarMessageType } from './types';\r\nimport {\r\n DownloadFileProps,\r\n ListMessagesProps,\r\n OpenDetails,\r\n OpenDetailsProps,\r\n OpenMultiDetails,\r\n RefreshTableButton,\r\n} from './Actions';\r\nimport { toRootedURL } from 'utils/url-utils';\r\nimport { Icon } from 'app/components/BasicIcons/FontAwesome';\r\nimport { Box } from 'app/components/basic/Wrappers/Box';\r\nimport { parse } from 'app/components/CommentsContainer/commentParser';\r\nimport { Button } from 'app/components/BasicButtons/Button';\r\nimport { Caption } from 'app/components/Typography';\r\nimport { IconButton } from 'app/components/BasicButtons/IconButton';\r\nimport { useHistory } from 'react-router-dom';\r\nimport fileDownload from 'js-file-download';\r\n\r\nlet displayed: any[] = [];\r\n\r\nconst SnackbarManager = () => {\r\n const dispatch = useDispatch();\r\n const { actions } = useAppSettingsSlice();\r\n const notifications = useSelector(selectNotifications);\r\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\r\n const history = useHistory();\r\n const theme = useTheme();\r\n const storeDisplayed = id => {\r\n displayed = [...displayed, id];\r\n };\r\n\r\n const removeDisplayed = id => {\r\n displayed = [...displayed.filter(key => id !== key)];\r\n };\r\n\r\n const getActions = useCallback(\r\n (item: AppNotificationMessage): React.ReactNode | undefined => {\r\n const actions: React.ReactNode[] = [];\r\n if (item.actionType) {\r\n switch (item.actionType) {\r\n case SnackBarActionType.refreshTable:\r\n actions.push();\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n if (item.persist) {\r\n actions.push(\r\n closeSnackbar(item.key)} />,\r\n );\r\n }\r\n if (actions.length > 0) {\r\n return (\r\n \r\n {actions.map((component, i) => (\r\n {component}\r\n ))}\r\n \r\n );\r\n }\r\n return undefined;\r\n },\r\n [closeSnackbar],\r\n );\r\n const LinkOnClick = React.useCallback(\r\n (item: AppNotificationMessage) => {\r\n closeSnackbar(item.key);\r\n let itemLinkProps = item.messageTypeProps as OpenDetailsProps;\r\n if (itemLinkProps?.linkUrl !== undefined) {\r\n if (!!itemLinkProps.replaceUrl) {\r\n history.replace(itemLinkProps.linkUrl);\r\n } else {\r\n window.open(toRootedURL(itemLinkProps?.linkUrl), '_self');\r\n }\r\n }\r\n },\r\n [closeSnackbar, history],\r\n );\r\n const renderMessage = React.useCallback(\r\n (item: AppNotificationMessage): React.ReactNode => {\r\n if (\r\n item.messageType !== undefined &&\r\n item.messageTypeProps !== undefined\r\n ) {\r\n switch (item.messageType) {\r\n case SnackBarMessageType.openSidepanelDetails:\r\n let itemProps = item.messageTypeProps as OpenDetailsProps;\r\n if (itemProps.multiple === true) {\r\n if (\r\n !!itemProps.multiDetails &&\r\n itemProps.multiDetails.length > 0\r\n ) {\r\n return (\r\n \r\n {React.createElement(OpenMultiDetails, itemProps)}\r\n \r\n );\r\n } else {\r\n return {item.message};\r\n }\r\n } else {\r\n if (\r\n itemProps.detailsType !== undefined &&\r\n itemProps.detailsTypeProps !== undefined\r\n ) {\r\n return (\r\n \r\n {React.createElement(OpenDetails, itemProps)}\r\n \r\n );\r\n } else {\r\n return {item.message};\r\n }\r\n }\r\n\r\n case SnackBarMessageType.showLinkMessage:\r\n let itemLinkProps = item.messageTypeProps as OpenDetailsProps;\r\n if (itemLinkProps.linkUrl !== undefined) {\r\n return (\r\n \r\n {itemLinkProps.itemName}\r\n \r\n LinkOnClick(item)}\r\n >\r\n {itemLinkProps.linkText}\r\n \r\n \r\n {itemLinkProps.afterLinkText && (\r\n {itemLinkProps.afterLinkText}\r\n )}\r\n \r\n );\r\n } else {\r\n return item.closable ? (\r\n \r\n ) : (\r\n {item.message}\r\n );\r\n }\r\n case SnackBarMessageType.HTML:\r\n return <>{parse(item.message)};\r\n case SnackBarMessageType.fileDownload:\r\n const fileProps = item.messageTypeProps as DownloadFileProps;\r\n return (\r\n <>\r\n {item.message}{' '}\r\n \r\n fileDownload(fileProps.file, fileProps.fileName)\r\n }\r\n >\r\n {fileProps.fileTitle}\r\n \r\n \r\n );\r\n case SnackBarMessageType.messageList:\r\n let listProps = item.messageTypeProps as ListMessagesProps;\r\n return item.closable ? (\r\n \r\n {listProps.messages.map(msg => (\r\n
  • \r\n {msg.message}\r\n
  • \r\n ))}\r\n \r\n }\r\n closable={item.closable}\r\n key={item.key}\r\n />\r\n ) : (\r\n
      \r\n {listProps.messages.map(msg => (\r\n
    • \r\n {msg.message}\r\n
    • \r\n ))}\r\n
    \r\n );\r\n default:\r\n return item.closable ? (\r\n \r\n ) : (\r\n {item.message}\r\n );\r\n }\r\n // switch (item.messageType) {\r\n // case SnackBarMessageType.openTrainingDetails:\r\n // return (\r\n // \r\n // {React.createElement(OpenDetails, item.messageTypeProps)}\r\n // \r\n // );\r\n // case SnackBarMessageType.openWorkOrderDetails:\r\n // return ( \r\n // {React.createElement(OpenDetails, item.messageTypeProps)}\r\n // \r\n // )\r\n // default:\r\n // return {item.message};\r\n // }\r\n } else {\r\n if (item.closable) {\r\n return (\r\n \r\n );\r\n } else {\r\n return {parse(item.message)};\r\n }\r\n }\r\n },\r\n [LinkOnClick, closeSnackbar],\r\n );\r\n\r\n React.useEffect(() => {\r\n notifications.forEach((item: AppNotificationMessage) => {\r\n if (displayed.length > 0 && displayed.includes(item.key)) return;\r\n const x: OptionsObject = {\r\n key: item.key,\r\n persist: item.persist,\r\n anchorOrigin: {\r\n vertical: 'bottom',\r\n horizontal: 'center',\r\n },\r\n variant: item.variant,\r\n preventDuplicate: true,\r\n autoHideDuration: item.autoHideDuration,\r\n action: getActions(item),\r\n\r\n onExited: (_, myKey) => {\r\n dispatch(actions.removeNotification(myKey));\r\n removeDisplayed(myKey);\r\n },\r\n };\r\n //Object.assign(x, { closable: item.closable });\r\n enqueueSnackbar(renderMessage(item), x);\r\n\r\n storeDisplayed(item.key);\r\n });\r\n }, [\r\n notifications,\r\n actions,\r\n closeSnackbar,\r\n enqueueSnackbar,\r\n dispatch,\r\n theme.direction,\r\n renderMessage,\r\n getActions,\r\n ]);\r\n\r\n return null;\r\n};\r\nconst ClosableMessage = ({\r\n closeSnackbar,\r\n closable,\r\n message,\r\n key,\r\n}: {\r\n closeSnackbar: (key?: SnackbarKey | undefined) => void;\r\n closable?: boolean;\r\n message: React.ReactNode;\r\n key?: SnackbarKey | undefined;\r\n}): JSX.Element => {\r\n return (\r\n \r\n {message}\r\n {!!closable && closable === true && (\r\n closeSnackbar(key)}\r\n style={{ position: 'absolute', right: 0, top: 0, color: 'white' }}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\nexport default SnackbarManager;\r\n"],"sourceRoot":""}