{"version":3,"sources":["actions/contextActions.js","constants/actionTypes.js","components/Loading/index.js","reducers/settings.js","reducers/auth.js","reducers/context.js","reducers/index.js","store/configureStore.js","components/ScrollToTop/index.js","components/themes/lightTheme.js","components/themes/darkTheme.js","components/themes/grayTheme.js","components/App.js","components/Root.js","serviceWorker.js","store/localStorage.js","index.js","helpers/fake-backend.js","helpers/history.js","helpers/auth-header.js","helpers/apiHandlers.js","helpers/api.js","helpers/dateFormatter.js","helpers/globalVariables.js","helpers/maskData.js","helpers/utils.js","helpers/index.js","constants/appConfig.js","helpers/swal.js","actions/authActions.js","components/Loading/Loader.js","helpers/CacheBuster.js","helpers/auth-user.js"],"names":["__webpack_require__","d","__webpack_exports__","clearContext","startProcessing","stopProcessing","setHasMultipleGroupCompanies","setGroupCompanyId","setProjectId","setProject","_constants_actionTypes__WEBPACK_IMPORTED_MODULE_0__","type","types","hasMultipleGroupCompanies","groupCompanyId","projectId","project","TOGGLE_BOXED_LAYOUT","TOGGLE_COLLAPSED_NAV","TOGGLE_NAV_BEHIND","TOGGLE_FIXED_HEADER","CHANGE_SIDEBAR_WIDTH","CHANGE_COLOR_OPTION","CHANGE_THEME","AUTH_LOGIN","AUTH_LOGOUT","CLEAR_CONTEXT","SET_HAS_MULTIPLE_GROUP_COMPANIES","SET_GROUP_COMPANY_ID","SET_PROJECT_ID","SET_PROJECT","START_PROCESSING","STOP_PROCESSING","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_0___default","n","_Loader__WEBPACK_IMPORTED_MODULE_1__","Loading","props","title","error","text","Error","message","a","createElement","className","defaultProps","initialSettings","APPCONFIG","settings","state","arguments","length","undefined","action","Object","objectSpread","layoutBoxed","isLayoutBoxed","navCollapsed","isNavCollapsed","navBehind","isNavBehind","fixedHeader","isFixedHeader","sidebarWidth","colorOption","theme","initialState","loggedIn","selectedGroupCompany","token","expiresIn","user","auth","processing","context","reducers","routing","routerReducer","combineReducers","history","createHistory","configureStore","reactRouterMiddleware","routerMiddleware","middlewares","thunk","createStore","rootReducer","compose","applyMiddleware","apply","ScrollToTop","prevProps","this","location","window","scrollTo","children","React","Component","withRouter","createMuiTheme","palette","primary","main","cyan","dark","contrastText","secondary","green","MainApp","loadable","loader","Promise","all","e","then","bind","loading","LoadingComponent","Exception","Account","PageFullscreen","TicketBasic","App","invalidateLoginIfExpired","_this$props","_this","logout","parseInt","moment","format","_this$props2","api","startListenUserNotAuthenticated","swal","startListenStartApiNotGet","startListenStopApiNotGet","materialUITheme","_this$props3","match","grayTheme","darkTheme","lightTheme","pathname","react_default","Redirect","to","styles","id","classnames","nav-collapsed","theme-gray","theme-dark","sidebar-sm","sidebar-lg","Route","path","concat","url","component","exact","connect","ownProps","dispatch","bindActionCreators","authActions","contextActions","Root","store","react_redux_es","react_router_redux_es","components_ScrollToTop","Boolean","hostname","serializedState","localStorage","getItem","JSON","parse","err","console","log","loadState","subscribe","stateToSave","stringify","setItem","saveState","getState","render","react_hot_loader","Root_Root","document","getElementById","navigator","serviceWorker","ready","registration","unregister","createBrowserHistory","authHeader","Authorization","Content-Type","listenUserNotAuthCallback","convertToJsonIfBlogJson","data","Blob","toLowerCase","indexOf","resolve","reject","reader","FileReader","onload","result","onerror","readAsText","getError","_ref","asyncToGenerator","regenerator_default","mark","_callee","messageError404","_args","wrap","_context","prev","next","response","sent","abrupt","status","errors","reduce","msg","errorCodes","request","toString","stop","_x","handleError","_ref2","_callee2","treatedError","_context2","_x2","listenStartApiNotGetCallback","listenStopApiNotGetCallback","get","headers","config","axios","method","catch","post","finally","put","patch","delete","listenCallbackParam","listenStartApiCallbackParam","listenStopApiCallbackParam","require","dateFormatter","parseDate","date","momentDate","isValid","warn","nowWithoutTimezone","parseDateDbFormat","globalVariables","noWrapText","whiteSpace","wordWrap","maskData","cnpj","join","currency","value","Intl","NumberFormat","maximumFractionDigits","style","generateUUID","replace","c","crypto","getRandomValues","Uint8Array","fileToBase64","file","readAsDataURL","getBase64Extension","split","base64ToFile","_base64ToFile","fetch","res","blob","File","brand","logo","logos","TECNOSET","TECFY","ALMAQ","TRSERVICE","COPYLINK","year","Date","getFullYear","AutoCloseMobileNav","showCustomizer","color","success","info","infoAlt","warning","danger","gray","sweeetalertWithLines","html","otherProps","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__","textString","textWithLineBrs","sweeetalert","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__","toast","position","showConfirmButton","timer","modal","confirmModal","_props$title","_props$text","cancelButtonText","confirmButtonText","showCancelButton","noWait","getClaimValueByName","claimName","claim","claims","find","login","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default","multipleGroupCompany","actions","map","Loader","width","height","viewBox","xmlns","fill","strokeWidth","strokeLinecap","cx","cy","r","global","appVersion","packageJson","version","clearCache","reload","CacheBuster","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","D_projetos_tecnoset_tecnoset_portal_front_end_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","isLatestVersion","serverVersion","clientVersion","checkReloading","json","meta","_this$state","Buffer"],"mappings":"g7EAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAAAH,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QApBOlP,wEA2BV,IAAA+P,EAC4EjS,KAAK7C,MAAhFsE,EADDwQ,EACCxQ,QAASkQ,EADVM,EACUN,gBAAiBC,EAD3BK,EAC2BL,cAAeC,EAD1CI,EAC0CJ,cAAeC,EADzDG,EACyDH,eAChE,OAAO9R,KAAK1D,MAAM8D,SAAS,CAAEqB,UAASkQ,kBAAiBC,gBAAeC,gBAAeC,0BA9B/DzR,IAAMC,WAkCjBgR,2DC3Cf,SAAAY","file":"static/js/main.0642f4a1.chunk.js","sourcesContent":["import * as types from \"../constants/actionTypes\";\r\n\r\nexport const clearContext = () => ({\r\n type: types.CLEAR_CONTEXT\r\n});\r\nexport const startProcessing = () => ({ type: types.START_PROCESSING });\r\nexport const stopProcessing = () => ({ type: types.STOP_PROCESSING });\r\nexport const setHasMultipleGroupCompanies = hasMultipleGroupCompanies => ({\r\n type: types.SET_HAS_MULTIPLE_GROUP_COMPANIES,\r\n hasMultipleGroupCompanies\r\n});\r\nexport const setGroupCompanyId = groupCompanyId => ({\r\n type: types.SET_GROUP_COMPANY_ID,\r\n groupCompanyId\r\n});\r\nexport const setProjectId = projectId => ({\r\n type: types.SET_PROJECT_ID,\r\n projectId\r\n});\r\nexport const setProject = project => ({\r\n type: types.SET_PROJECT,\r\n project\r\n});\r\n","export const TOGGLE_BOXED_LAYOUT = \"TOGGLE_BOXED_LAYOUT\";\r\nexport const TOGGLE_COLLAPSED_NAV = \"TOGGLE_COLLAPSED_NAV\";\r\nexport const TOGGLE_NAV_BEHIND = \"TOGGLE_NAV_BEHIND\";\r\nexport const TOGGLE_FIXED_HEADER = \"TOGGLE_FIXED_HEADER\";\r\nexport const CHANGE_SIDEBAR_WIDTH = \"CHANGE_SIDEBAR_WIDTH\";\r\nexport const CHANGE_COLOR_OPTION = \"CHANGE_COLOR_OPTION\";\r\nexport const CHANGE_THEME = \"CHANGE_THEME\";\r\nexport const AUTH_LOGIN = \"AUTH_LOGIN\";\r\nexport const AUTH_LOGOUT = \"AUTH_LOGOUT\";\r\nexport const CLEAR_CONTEXT = \"CLEAR_CONTEXT\";\r\nexport const SET_HAS_MULTIPLE_GROUP_COMPANIES =\r\n \"SET_HAS_MULTIPLE_GROUP_COMPANIES\";\r\nexport const SET_GROUP_COMPANY_ID = \"SET_GROUP_COMPANY_ID\";\r\nexport const SET_PROJECT_ID = \"SET_PROJECT_ID\";\r\nexport const SET_PROJECT = \"SET_PROJECT\";\r\nexport const START_PROCESSING = \"START_PROCESSING\";\r\nexport const STOP_PROCESSING = \"STOP_PROCESSING\";\r\n","import React from 'react';\r\nimport Loader from './Loader';\r\nimport PropTypes from 'prop-types';\r\n\r\n\r\nconst Loading = (props) => {\r\n const { title, error } = props;\r\n if (error) {\r\n let text = error;\r\n if (error instanceof Error) {\r\n text = error.message;\r\n }\r\n return
{text}
\r\n }\r\n\r\n return (\r\n
\r\n \r\n
{title}
\r\n
\r\n );\r\n}\r\n\r\nLoading.propTypes = {\r\n title: PropTypes.string,\r\n error: PropTypes.string\r\n};\r\n\r\nLoading.defaultProps = {\r\n error: null,\r\n title: 'Carregando...'\r\n};\r\n\r\nexport default Loading;\r\n","import APPCONFIG from 'constants/appConfig';\r\nimport {\r\n TOGGLE_BOXED_LAYOUT,\r\n TOGGLE_COLLAPSED_NAV,\r\n TOGGLE_NAV_BEHIND,\r\n TOGGLE_FIXED_HEADER,\r\n CHANGE_SIDEBAR_WIDTH,\r\n CHANGE_COLOR_OPTION,\r\n CHANGE_THEME\r\n} from '../constants/actionTypes';\r\n\r\nconst initialSettings = APPCONFIG.settings;\r\n\r\nconst settings = (state = initialSettings, action) => {\r\n // console.log(action)\r\n switch (action.type) {\r\n case TOGGLE_BOXED_LAYOUT:\r\n return {\r\n ...state,\r\n layoutBoxed: action.isLayoutBoxed\r\n };\r\n case TOGGLE_COLLAPSED_NAV:\r\n return {\r\n ...state,\r\n navCollapsed: action.isNavCollapsed\r\n };\r\n case TOGGLE_NAV_BEHIND:\r\n return {\r\n ...state,\r\n navBehind: action.isNavBehind\r\n };\r\n case TOGGLE_FIXED_HEADER:\r\n return {\r\n ...state,\r\n fixedHeader: action.isFixedHeader\r\n };\r\n case CHANGE_SIDEBAR_WIDTH:\r\n return {\r\n ...state,\r\n sidebarWidth: action.sidebarWidth\r\n };\r\n case CHANGE_COLOR_OPTION:\r\n return {\r\n ...state,\r\n colorOption: action.colorOption\r\n };\r\n case CHANGE_THEME:\r\n return {\r\n ...state,\r\n theme: action.theme\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport default settings;\r\n","import { AUTH_LOGIN, AUTH_LOGOUT } from \"../constants/actionTypes\";\r\n\r\nconst initialState = {\r\n loggedIn: false,\r\n selectedGroupCompany: false,\r\n token: null,\r\n expiresIn: null,\r\n user: null\r\n};\r\n\r\nconst auth = (state = initialState, action) => {\r\n switch (action.type) {\r\n case AUTH_LOGIN:\r\n return {\r\n ...state,\r\n loggedIn: true,\r\n token: action.token,\r\n expiresIn: action.expiresIn,\r\n user: action.user,\r\n selectedGroupCompany: action.groupCompanyId ? true : false\r\n };\r\n case AUTH_LOGOUT:\r\n return initialState;\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport default auth;\r\n","import {\r\n CLEAR_CONTEXT,\r\n SET_GROUP_COMPANY_ID,\r\n SET_PROJECT_ID,\r\n SET_PROJECT,\r\n SET_HAS_MULTIPLE_GROUP_COMPANIES,\r\n START_PROCESSING,\r\n STOP_PROCESSING\r\n} from \"../constants/actionTypes\";\r\n\r\nconst initialState = {\r\n hasMultipleGroupCompanies: false,\r\n groupCompanyId: null,\r\n projectId: null,\r\n project: null,\r\n processing: false\r\n};\r\n\r\nconst context = (state = initialState, action) => {\r\n switch (action.type) {\r\n case CLEAR_CONTEXT:\r\n return initialState;\r\n case SET_HAS_MULTIPLE_GROUP_COMPANIES:\r\n return {\r\n ...state,\r\n hasMultipleGroupCompanies: action.hasMultipleGroupCompanies\r\n };\r\n case SET_GROUP_COMPANY_ID:\r\n return {\r\n ...state,\r\n groupCompanyId: action.groupCompanyId\r\n };\r\n case SET_PROJECT_ID:\r\n return {\r\n ...state,\r\n projectId: action.projectId\r\n };\r\n case SET_PROJECT:\r\n return {\r\n ...state,\r\n project: action.project\r\n };\r\n case START_PROCESSING:\r\n return {\r\n ...state,\r\n processing: true\r\n };\r\n case STOP_PROCESSING:\r\n return {\r\n ...state,\r\n processing: false\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport default context;\r\n","import { combineReducers } from 'redux';\r\nimport { routerReducer } from 'react-router-redux';\r\nimport settings from './settings';\r\nimport auth from './auth';\r\nimport context from './context';\r\n\r\nconst reducers = {\r\n routing: routerReducer,\r\n context,\r\n settings,\r\n auth\r\n};\r\n\r\nexport default combineReducers(reducers);\r\n","import { createStore, compose, applyMiddleware } from 'redux';\r\nimport reduxImmutableStateInvariant from 'redux-immutable-state-invariant';\r\nimport thunk from 'redux-thunk';\r\nimport createHistory from 'history/createHashHistory';\r\n// 'routerMiddleware': the new way of storing route changes with redux middleware since rrV4.\r\nimport { routerMiddleware } from 'react-router-redux';\r\nimport rootReducer from '../reducers';\r\nexport const history = createHistory();\r\nfunction configureStoreProd(initialState) {\r\n const reactRouterMiddleware = routerMiddleware(history);\r\n const middlewares = [\r\n // Add other middleware on this line...\r\n\r\n // thunk middleware can also accept an extra argument to be passed to each thunk action\r\n // https://github.com/gaearon/redux-thunk#injecting-a-custom-argument\r\n thunk,\r\n reactRouterMiddleware,\r\n ];\r\n\r\n return createStore(rootReducer, initialState, compose(\r\n applyMiddleware(...middlewares)\r\n )\r\n );\r\n}\r\n\r\nfunction configureStoreDev(initialState) {\r\n const reactRouterMiddleware = routerMiddleware(history);\r\n const { logger } = require(`redux-logger`);\r\n const middlewares = [\r\n // Add other middleware on this line...\r\n\r\n // Redux middleware that spits an error on you when you try to mutate your state either inside a dispatch or between dispatches.\r\n reduxImmutableStateInvariant(),\r\n\r\n //Redux logger middleware\r\n logger,\r\n\r\n // thunk middleware can also accept an extra argument to be passed to each thunk action\r\n // https://github.com/gaearon/redux-thunk#injecting-a-custom-argument\r\n thunk,\r\n reactRouterMiddleware,\r\n ];\r\n\r\n const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; // add support for Redux dev tools\r\n const store = createStore(rootReducer, initialState, composeEnhancers(\r\n applyMiddleware(...middlewares)\r\n )\r\n );\r\n\r\n return store;\r\n}\r\n\r\nconst configureStore = process.env.NODE_ENV === 'production' ? configureStoreProd : configureStoreDev;\r\n\r\nexport default configureStore;\r\n","import React from 'react';\r\nimport { withRouter } from 'react-router';\r\n\r\nclass ScrollToTop extends React.Component {\r\n componentDidUpdate(prevProps) {\r\n if (this.props.location !== prevProps.location) {\r\n window.scrollTo(0, 0)\r\n }\r\n }\r\n\r\n render() {\r\n return this.props.children\r\n }\r\n}\r\n\r\nexport default withRouter(ScrollToTop);","import { createMuiTheme } from '@material-ui/core/styles';\r\nimport { cyan, green } from '@material-ui/core/colors';\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n type: 'light',\r\n primary: {\r\n // light: will be calculated from palette.primary.main,\r\n main: cyan[500],\r\n dark: cyan[700],\r\n contrastText: '#fff',\r\n },\r\n secondary: {\r\n main: green[400],\r\n // dark: will be calculated from palette.secondary.main,\r\n contrastText: '#fff',\r\n },\r\n // error: will use the default color\r\n }\r\n});\r\n\r\nexport default theme;\r\n","import { createMuiTheme } from '@material-ui/core/styles';\r\nimport { cyan, green } from '@material-ui/core/colors';\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n type: 'dark',\r\n primary: {\r\n // light: will be calculated from palette.primary.main,\r\n main: cyan[700],\r\n contrastText: 'rgba(255,255,255,.7)',\r\n },\r\n secondary: {\r\n main: green[600],\r\n // dark: will be calculated from palette.secondary.main,\r\n contrastText: 'rgba(255,255,255,.7)',\r\n },\r\n // error: will use the default color\r\n },\r\n});\r\n\r\nexport default theme;\r\n","import { createMuiTheme } from '@material-ui/core/styles';\r\nimport { cyan, green } from '@material-ui/core/colors';\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n type: 'dark',\r\n primary: {\r\n // light: will be calculated from palette.primary.main,\r\n main: cyan[700],\r\n contrastText: 'rgba(255,255,255,.7)',\r\n },\r\n secondary: {\r\n main: green[600],\r\n // dark: will be calculated from palette.secondary.main,\r\n contrastText: 'rgba(255,255,255,.7)',\r\n },\r\n // error: will use the default color\r\n }\r\n});\r\n\r\nexport default theme;\r\n","import React, { Component } from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport classnames from \"classnames\";\r\nimport { MuiThemeProvider } from \"@material-ui/core/styles\";\r\nimport { Route, Redirect } from \"react-router-dom\";\r\nimport loadable from \"react-loadable\";\r\nimport LoadingComponent from \"components/Loading\";\r\nimport moment from \"moment\";\r\nimport * as authActions from \"../actions/authActions\";\r\nimport * as contextActions from \"../actions/contextActions\";\r\n\r\n// = styles =\r\n// 3rd\r\nimport \"styles/bootstrap/bootstrap.scss\";\r\n// custom\r\nimport \"styles/layout.scss\";\r\nimport \"styles/theme.scss\";\r\nimport \"styles/ui.scss\";\r\nimport \"styles/custom.scss\";\r\n\r\nimport lightTheme from \"./themes/lightTheme\";\r\nimport darkTheme from \"./themes/darkTheme\";\r\nimport grayTheme from \"./themes/grayTheme\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { api, swal } from \"../helpers\";\r\nimport Loading from \"./Loading\";\r\n\r\nlet MainApp = loadable({\r\n loader: () => import(\"components/Layout/AppLayout/MainApp\"),\r\n loading: LoadingComponent\r\n});\r\nlet Exception = loadable({\r\n loader: () => import(\"routes/exception/\"),\r\n loading: LoadingComponent\r\n});\r\nlet Account = loadable({\r\n loader: () => import(\"routes/user/\"),\r\n loading: LoadingComponent\r\n});\r\nlet PageFullscreen = loadable({\r\n loader: () => import(\"routes/fullscreen/\"),\r\n loading: LoadingComponent\r\n});\r\nlet TicketBasic = loadable({\r\n loader: () => import(\"routes/ticket-basic/\"),\r\n loading: LoadingComponent\r\n});\r\n\r\nclass App extends Component {\r\n componentDidMount() {\r\n const { logout, startProcessing, stopProcessing } = this.props;\r\n api.startListenUserNotAuthenticated(error => {\r\n swal.error(error);\r\n logout();\r\n });\r\n api.startListenStartApiNotGet(startProcessing);\r\n api.startListenStopApiNotGet(stopProcessing);\r\n this.invalidateLoginIfExpired();\r\n }\r\n invalidateLoginIfExpired = () => {\r\n const { auth, logout } = this.props;\r\n if (auth.loggedIn) {\r\n const expiresIn = parseInt(moment(auth.expiresIn).format(\"X\"));\r\n const now = parseInt(moment().format(\"X\"));\r\n if (now > expiresIn) {\r\n logout();\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n match,\r\n location,\r\n layoutBoxed,\r\n navCollapsed,\r\n navBehind,\r\n fixedHeader,\r\n sidebarWidth,\r\n theme,\r\n processing\r\n } = this.props;\r\n let materialUITheme;\r\n switch (theme) {\r\n case \"gray\":\r\n materialUITheme = grayTheme;\r\n break;\r\n case \"dark\":\r\n materialUITheme = darkTheme;\r\n break;\r\n default:\r\n materialUITheme = lightTheme;\r\n }\r\n\r\n const isRoot = location.pathname === \"/\" ? true : false;\r\n if (isRoot) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {processing && (\r\n
\r\n
\r\n \r\n
\r\n
\r\n )}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state, ownProps) => ({\r\n layoutBoxed: state.settings.layoutBoxed,\r\n navCollapsed: state.settings.navCollapsed,\r\n navBehind: state.settings.navBehind,\r\n fixedHeader: state.settings.fixedHeader,\r\n sidebarWidth: state.settings.sidebarWidth,\r\n theme: state.settings.theme,\r\n processing: state.context.processing,\r\n auth: state.auth\r\n});\r\n\r\nconst mapDispatchToProps = dispatch =>\r\n bindActionCreators(\r\n {\r\n logout: authActions.logout,\r\n startProcessing: contextActions.startProcessing,\r\n stopProcessing: contextActions.stopProcessing\r\n },\r\n dispatch\r\n );\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(App);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ConnectedRouter } from 'react-router-redux';\r\nimport { Provider } from 'react-redux';\r\nimport { Route } from 'react-router-dom';\r\nimport ScrollToTop from 'components/ScrollToTop';\r\nimport App from './App';\r\n\r\nexport default class Root extends Component {\r\n render() {\r\n const { store, history } = this.props;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nRoot.propTypes = {\r\n store: PropTypes.object.isRequired,\r\n history: PropTypes.object.isRequired\r\n};\r\n","// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\r\n );\r\n });\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\r\n\r\n // Execute callback\r\n if (config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","export const loadState = () => {\r\n try {\r\n const serializedState = localStorage.getItem(\"state\");\r\n if (serializedState === null) {\r\n return undefined;\r\n }\r\n return JSON.parse(serializedState);\r\n } catch (err) {\r\n console.log(\"Error on loading state from local storage\");\r\n return undefined;\r\n }\r\n};\r\n\r\nexport const saveState = state => {\r\n try {\r\n const stateToSave = {\r\n context: state.context,\r\n auth: state.auth,\r\n };\r\n const serializedState = JSON.stringify(stateToSave);\r\n localStorage.setItem(\"state\", serializedState);\r\n } catch (err) {\r\n console.log(\"Error on saving state to local storage\");\r\n }\r\n};","import React from 'react';\r\nimport { render } from 'react-dom';\r\nimport { AppContainer } from 'react-hot-loader';\r\nimport configureStore, { history } from './store/configureStore';\r\nimport Root from './components/Root';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport { loadState, saveState } from \"./store/localStorage\";\r\n\r\nconst persistedState = loadState();\r\nconst store = configureStore(persistedState);\r\nstore.subscribe(() => {\r\n saveState(store.getState());\r\n});\r\n\r\n\r\nrender(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\nif (module.hot) {\r\n module.hot.accept('./components/Root', () => {\r\n const NewRoot = require('./components/Root').default;\r\n render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n );\r\n });\r\n}\r\n\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","// array in local storage for registered users\r\nlet users = JSON.parse(localStorage.getItem('users')) || [];\r\n \r\nexport function configureFakeBackend() {\r\n let realFetch = window.fetch;\r\n window.fetch = function (url, opts) {\r\n return new Promise((resolve, reject) => {\r\n // wrap in timeout to simulate server api call\r\n setTimeout(() => {\r\n\r\n // authenticate\r\n if (url.endsWith('/users/authenticate') && opts.method === 'POST') {\r\n // get parameters from post request\r\n let params = JSON.parse(opts.body);\r\n\r\n // find if any user matches login credentials\r\n let filteredUsers = users.filter(user => {\r\n return user.username === params.username && user.password === params.password;\r\n });\r\n\r\n if (filteredUsers.length) {\r\n // if login details are valid return user details and fake jwt token\r\n let user = filteredUsers[0];\r\n let responseJson = {\r\n id: user.id,\r\n username: user.username,\r\n firstName: user.firstName,\r\n lastName: user.lastName,\r\n token: 'fake-jwt-token'\r\n };\r\n resolve({ ok: true, text: () => Promise.resolve(JSON.stringify(responseJson)) });\r\n } else {\r\n // else return error\r\n reject('Username or password is incorrect');\r\n }\r\n\r\n return;\r\n }\r\n\r\n // get users\r\n if (url.endsWith('/users') && opts.method === 'GET') {\r\n // check for fake auth token in header and return users if valid, this security is implemented server side in a real application\r\n if (opts.headers && opts.headers.Authorization === 'Bearer fake-jwt-token') {\r\n resolve({ ok: true, text: () => Promise.resolve(JSON.stringify(users))});\r\n } else {\r\n // return 401 not authorised if token is null or invalid\r\n reject('Unauthorised');\r\n }\r\n\r\n return;\r\n }\r\n\r\n // get user by id\r\n if (url.match(/\\/users\\/\\d+$/) && opts.method === 'GET') {\r\n // check for fake auth token in header and return user if valid, this security is implemented server side in a real application\r\n if (opts.headers && opts.headers.Authorization === 'Bearer fake-jwt-token') {\r\n // find user by id in users array\r\n let urlParts = url.split('/');\r\n let id = parseInt(urlParts[urlParts.length - 1]);\r\n let matchedUsers = users.filter(user => { return user.id === id; });\r\n let user = matchedUsers.length ? matchedUsers[0] : null;\r\n\r\n // respond 200 OK with user\r\n resolve({ ok: true, text: () => JSON.stringify(user)});\r\n } else {\r\n // return 401 not authorised if token is null or invalid\r\n reject('Unauthorised');\r\n }\r\n\r\n return;\r\n }\r\n\r\n // register user\r\n if (url.endsWith('/users/register') && opts.method === 'POST') {\r\n // get new user object from post body\r\n let newUser = JSON.parse(opts.body);\r\n\r\n // validation\r\n let duplicateUser = users.filter(user => { return user.username === newUser.username; }).length;\r\n if (duplicateUser) {\r\n reject('Username \"' + newUser.username + '\" is already taken');\r\n return;\r\n }\r\n\r\n // save new user\r\n newUser.id = users.length ? Math.max(...users.map(user => user.id)) + 1 : 1;\r\n users.push(newUser);\r\n localStorage.setItem('users', JSON.stringify(users));\r\n\r\n // respond 200 OK\r\n resolve({ ok: true, text: () => Promise.resolve() });\r\n\r\n return;\r\n }\r\n\r\n // delete user\r\n if (url.match(/\\/users\\/\\d+$/) && opts.method === 'DELETE') {\r\n // check for fake auth token in header and return user if valid, this security is implemented server side in a real application\r\n if (opts.headers && opts.headers.Authorization === 'Bearer fake-jwt-token') {\r\n // find user by id in users array\r\n let urlParts = url.split('/');\r\n let id = parseInt(urlParts[urlParts.length - 1]);\r\n for (let i = 0; i < users.length; i++) {\r\n let user = users[i];\r\n if (user.id === id) {\r\n // delete user\r\n users.splice(i, 1);\r\n localStorage.setItem('users', JSON.stringify(users));\r\n break;\r\n }\r\n }\r\n\r\n // respond 200 OK\r\n resolve({ ok: true, text: () => Promise.resolve() });\r\n } else {\r\n // return 401 not authorised if token is null or invalid\r\n reject('Unauthorised');\r\n }\r\n\r\n return;\r\n }\r\n\r\n // pass through any requests not handled above\r\n realFetch(url, opts).then(response => resolve(response));\r\n\r\n }, 500);\r\n });\r\n }\r\n}","import { createBrowserHistory } from 'history';\r\n\r\nexport const history = createBrowserHistory();","export function authHeader() {\r\n // return authorization header with jwt token\r\n let state = JSON.parse(localStorage.getItem('state'));\r\n\r\n if (state && state.auth && state.auth.token) {\r\n return { 'Authorization': 'Bearer ' + state.auth.token , 'Content-Type': 'application/json'};\r\n } else {\r\n return {};\r\n }\r\n}","let listenUserNotAuthCallback = null;\r\nexport const startListenUserNotAuthenticated = listenCallbackParam => {\r\n listenUserNotAuthCallback = listenCallbackParam;\r\n};\r\nconst convertToJsonIfBlogJson = data => {\r\n if (\r\n data instanceof Blob &&\r\n data.type &&\r\n data.type.toLowerCase().indexOf(\"json\") !== -1\r\n ) {\r\n return new Promise((resolve, reject) => {\r\n let reader = new FileReader();\r\n reader.onload = () => {\r\n resolve(JSON.parse(reader.result));\r\n };\r\n reader.onerror = error => {\r\n reject(error);\r\n };\r\n\r\n reader.readAsText(data);\r\n });\r\n }\r\n return Promise.resolve(data);\r\n};\r\nconst getError = async (error, messageError404 = 'Dados não encontrados') => {\r\n if (error.response) { \r\n error.response.data = await convertToJsonIfBlogJson(error.response.data);\r\n if (error.response.data.message) {\r\n return new Error(error.response.data.message); // Se houver message, retorna string message\r\n } else if (\r\n typeof error.response.data === \"string\" &&\r\n error.response.data !== \"\"\r\n ) {\r\n return new Error(error.response.data);\r\n } else if (error.response.status === 400 && error.response.data.errors) {\r\n var e = new Error(\r\n error.response.data.errors.reduce(\r\n (msg, error) => msg.concat(error + \"\\n\"),\r\n \"\"\r\n )\r\n );\r\n e.errors = error.response.data.errors;\r\n e.errorCodes = error.response.data.errorCodes;\r\n return e;\r\n } else if (error.response.status === 401) {\r\n return new Error(\"Usuário não autenticado, necessário autenticação.\");\r\n } else if (error.response.status === 403) {\r\n return new Error(\"Usuário autenticado sem acesso ao recurso.\");\r\n } else if (error.response.status === 404) {\r\n return new Error(messageError404);\r\n }\r\n } else if (error.request) {\r\n if (error instanceof Error) {\r\n return error;\r\n } else if (typeof error.toString() == \"string\") {\r\n return new Error(error.toString());\r\n }\r\n } else {\r\n // Something happened in setting up the request that triggered an Error\r\n // console.log('Error', error.toString());\r\n }\r\n return new Error(\"Could not process your request.\");\r\n};\r\nexport const handleError = (reject, messageError404 = '') => async error => {\r\n const treatedError = await getError(error, messageError404);\r\n if (error.response && error.response.status === 401) {\r\n if (listenUserNotAuthCallback) {\r\n listenUserNotAuthCallback(treatedError);\r\n return;\r\n }\r\n }\r\n reject(treatedError);\r\n};\r\n\r\n\r\n// export const handleError = async (reject, messageError404 = '') => {\r\n// var error = reject.error;\r\n// const treatedError = await getError(error, messageError404);\r\n// if (error.response && error.response.status === 401) {\r\n// if (listenUserNotAuthCallback) {\r\n// listenUserNotAuthCallback(treatedError);\r\n// return;\r\n// }\r\n// }\r\n// reject(treatedError);\r\n// };\r\n","import axios from \"axios\";\r\nimport { authHeader } from \"./auth-header\";\r\nimport { startListenUserNotAuthenticated, handleError } from \"./apiHandlers\";\r\n\r\nlet listenStartApiNotGetCallback = null;\r\nconst startListenStartApiNotGet = listenStartApiCallbackParam => {\r\n listenStartApiNotGetCallback = listenStartApiCallbackParam;\r\n};\r\nlet listenStopApiNotGetCallback = null;\r\nconst startListenStopApiNotGet = listenStopApiCallbackParam => {\r\n listenStopApiNotGetCallback = listenStopApiCallbackParam;\r\n};\r\n\r\nconst get = (url, headers = {}, config = {}, messageError404 = \"\") => {\r\n return new Promise((resolve, reject) => {\r\n return axios({\r\n method: \"get\",\r\n url,\r\n headers: {\r\n ...authHeader(),\r\n ...headers\r\n },\r\n ...config\r\n })\r\n .then(resolve)\r\n .catch(handleError(reject, messageError404));\r\n });\r\n};\r\n\r\nconst post = (url, data = {}, headers = {}) => {\r\n return new Promise((resolve, reject) => {\r\n listenStartApiNotGetCallback();\r\n return axios({\r\n method: \"post\",\r\n url,\r\n headers: {\r\n ...authHeader(),\r\n ...headers\r\n },\r\n data\r\n })\r\n .then(resolve)\r\n .catch(handleError(reject))\r\n .finally(listenStopApiNotGetCallback);\r\n });\r\n};\r\n\r\nconst put = (url, data = {}) => {\r\n return new Promise((resolve, reject) => {\r\n listenStartApiNotGetCallback();\r\n return axios({\r\n method: \"put\",\r\n url,\r\n headers: authHeader(),\r\n data\r\n })\r\n .then(resolve)\r\n .catch(handleError(reject))\r\n .finally(listenStopApiNotGetCallback);\r\n });\r\n};\r\n\r\nconst patch = (url, data = {}) => {\r\n return new Promise((resolve, reject) => {\r\n listenStartApiNotGetCallback();\r\n return axios({\r\n method: \"patch\",\r\n url,\r\n headers: authHeader(),\r\n data\r\n })\r\n .then(resolve)\r\n .catch(handleError(reject))\r\n .finally(listenStopApiNotGetCallback);\r\n });\r\n};\r\n\r\nconst httpDelete = (url, data = {}) => {\r\n return new Promise((resolve, reject) => {\r\n listenStartApiNotGetCallback();\r\n return axios({\r\n method: \"delete\",\r\n url,\r\n headers: authHeader(),\r\n data\r\n })\r\n .then(resolve)\r\n .catch(handleError(reject))\r\n .finally(listenStopApiNotGetCallback);\r\n });\r\n};\r\n\r\nexport const api = {\r\n get,\r\n post,\r\n put,\r\n patch,\r\n delete: httpDelete,\r\n startListenUserNotAuthenticated,\r\n startListenStartApiNotGet,\r\n startListenStopApiNotGet\r\n};\r\n","const moment = require(\"moment\");\r\n\r\n/**\r\n * @author: lvieira\r\n * Para mais formatos: https://momentjs.com/\r\n * @param String date\r\n * @param String format\r\n */\r\nconst parseDate = (date, format = \"DD/MM/YYYY HH:mm:ss\") => {\r\n if (!date) {\r\n return \"Invalid date\";\r\n }\r\n\r\n try {\r\n let momentDate = moment(date);\r\n if (momentDate.isValid()) {\r\n if(date.toString() == '0001-01-01T00:00:00'){\r\n return \"--\";\r\n }\r\n return momentDate.format(format);\r\n }\r\n console.warn(`Invalid moment date: ${date}`);\r\n return date;\r\n } catch (e) {\r\n console.log(e.toString());\r\n return date;\r\n }\r\n};\r\n\r\nconst parseDateDbFormat = (date, format = \"YYYY-MM-DD\") => {\r\n if (!date) {\r\n return \"Invalid date\";\r\n }\r\n\r\n try {\r\n let momentDate = moment(date);\r\n if (momentDate.isValid()) {\r\n return momentDate.format(format);\r\n }\r\n console.warn(`Invalid moment date: ${date}`);\r\n return date;\r\n } catch (e) {\r\n console.log(e.toString());\r\n return date;\r\n }\r\n};\r\nconst nowWithoutTimezone = () => moment().format(\"YYYY-MM-DDTHH:mm:ss.SSS\");\r\n\r\nexport const dateFormatter = {\r\n parseDate,\r\n nowWithoutTimezone,\r\n parseDateDbFormat\r\n};\r\n","//Usado para forçar uma quebra de linha\r\nconst noWrapText = {\r\n whiteSpace: \"normal\",\r\n wordWrap: \"break-word\"\r\n };\r\n\r\nexport const globalVariables = {\r\n\tnoWrapText\t: noWrapText\r\n}","const cnpj = cnpj => {\r\n let match = cnpj.match(/(\\d{0,2})(\\d{0,3})(\\d{0,3})(\\d{0,4})(\\d{0,2})/);\r\n return (\r\n [match[1], match[2], match[3]].join(\".\") + \"/\" + match[4] + \"-\" + match[5]\r\n );\r\n};\r\n\r\nconst currency = value => {\r\n return new Intl.NumberFormat(\"pt-BR\", {\r\n maximumFractionDigits: 2,\r\n style: \"currency\",\r\n currency: \"BRL\"\r\n }).format(value);\r\n};\r\n\r\nexport const maskData = {\r\n cnpj,\r\n currency\r\n};\r\n","export function generateUUID() {\r\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\r\n (\r\n c ^\r\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\r\n ).toString(16)\r\n );\r\n}\r\n\r\nexport function fileToBase64(file) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = error => reject(error);\r\n });\r\n}\r\n\r\nexport function getBase64Extension(base64 = \"\") {\r\n return base64.split(\";\")[0];\r\n}\r\n\r\nexport async function base64ToFile(url = \"\") {\r\n return fetch(url)\r\n .then(res => res.blob())\r\n .then(blob => {\r\n return new File([blob], \"Arquivo\", { type: getBase64Extension(url) });\r\n });\r\n}\r\n\r\nexport function orderedDates(dates = [], order = \"asc\") {\r\n const ordered = dates.sort(function (a, b) {\r\n return new Date(`${a}T00:01`) - new Date(`${b}T00:01`);\r\n });\r\n\r\n if (order == \"desc\") return ordered.reverse();\r\n\r\n return ordered;\r\n}\r\n\r\nexport function orderedDate(dates = [], first = false, format = true) {\r\n const sortdate = dates.sort(function (a) {\r\n return new Date(`${a}T00:01`);\r\n });\r\n\r\n if (first && !format) return sortdate[0];\r\n\r\n if (format) {\r\n if (first)\r\n return new Date(`${sortdate[0]}T00:01`).toLocaleDateString(\"pt-BR\");\r\n\r\n return sortdate.map(x =>\r\n new Date(`${x}T00:01`).toLocaleDateString(\"pt-BR\")\r\n );\r\n }\r\n\r\n return sortdate;\r\n}\r\n\r\n","export * from \"./fake-backend\";\r\nexport * from \"./history\";\r\nexport * from \"./auth-header\";\r\nexport * from \"./auth-user\";\r\nexport * from \"./api\";\r\nexport * from \"./CacheBuster\";\r\nexport * from \"./swal\";\r\nexport * from \"./dateFormatter\";\r\nexport * from \"./globalVariables\";\r\nexport * from \"./maskData\";\r\nexport * from \"./utils\";\r\n","const date = new Date();\r\nconst year = date.getFullYear();\r\n\r\nconst APPCONFIG = {\r\n brand: \"Tecnoset\",\r\n logo: \"assets/img/logo.png\",\r\n logos: {\r\n TECNOSET: \"assets/img/tecnoset.png\",\r\n TECFY: \"assets/img/tecfy.png\",\r\n ALMAQ: \"assets/img/almaq.png\",\r\n TRSERVICE: \"assets/img/TRservice.png\",\r\n COPYLINK: \"assets/img/copylink.png\"\r\n },\r\n user: \"Administrador\",\r\n year,\r\n AutoCloseMobileNav: true, // true, false. Automatically close sidenav on route change (Mobile only)\r\n showCustomizer: false, // Boolean: true, false. Customizer will be opened (visible) first time app was loaded if set to true\r\n color: {\r\n primary: \"#005978\",\r\n success: \"#8BC34A\",\r\n info: \"#66BB6A\",\r\n infoAlt: \"#7E57C2\",\r\n warning: \"#FFCA28\",\r\n danger: \"#F44336\",\r\n text: \"#3D4051\",\r\n gray: \"#EDF0F1\"\r\n },\r\n settings: {\r\n layoutBoxed: false, // true, false\r\n navCollapsed: false, // true, false\r\n navBehind: true, // true, false\r\n fixedHeader: true, // true, false\r\n sidebarWidth: \"small\", // small, middle, large\r\n colorOption: \"21\", // String: 11,12,13,14,15,16; 21,22,23,24,25,26; 31,32,33,34,35,36\r\n theme: \"new\" // light, gray, dark\r\n }\r\n};\r\n\r\nexport default APPCONFIG;\r\n","import sweeetalert from \"sweetalert2\";\r\n\r\nconst sweeetalertWithLines = props => {\r\n if (props.text && !props.html) {\r\n const { text, ...otherProps } = props;\r\n const textString = text.toString();\r\n const textWithLineBrs = textString.replace(/\\n/g, \"
\");\r\n if (textWithLineBrs !== textString) {\r\n return sweeetalert({\r\n ...otherProps,\r\n html: textWithLineBrs\r\n });\r\n }\r\n }\r\n return sweeetalert(props);\r\n};\r\n\r\nconst error = (text = \"Algo deu errado...\") => {\r\n if (text instanceof Error) {\r\n text = text.message;\r\n }\r\n return sweeetalertWithLines({\r\n type: \"error\",\r\n text\r\n });\r\n};\r\n\r\nconst success = (title = \"Sucesso!\", text = \"Solicitação processada.\") => {\r\n return sweeetalertWithLines({\r\n title,\r\n type: \"success\",\r\n text\r\n });\r\n};\r\n\r\nconst warning = (title = \"Atenção!\", text = \"Solicitação processada.\") => {\r\n return sweeetalertWithLines({\r\n title,\r\n type: \"warning\",\r\n text\r\n });\r\n};\r\n\r\nconst toast = (text = \"Erro!\", error = true) => {\r\n return sweeetalert({\r\n type: error ? \"error\" : \"success\",\r\n text,\r\n toast: true,\r\n position: \"top-end\",\r\n showConfirmButton: false,\r\n timer: 3000\r\n });\r\n};\r\n\r\nconst modal = props => {\r\n return sweeetalert(props);\r\n};\r\n\r\nconst confirmModal = (props = {}) => {\r\n const {\r\n title = \"Tem certeza?\",\r\n text = \"Deseja prosseguir com sua solicitação?\",\r\n ...otherProps\r\n } = props;\r\n return sweeetalert({\r\n ...otherProps,\r\n title,\r\n text,\r\n type: \"info\",\r\n cancelButtonText: \"Cancelar\",\r\n confirmButtonText: \"Sim\",\r\n showCancelButton: true\r\n });\r\n};\r\nconst noWait = {\r\n error: (...params) => {\r\n error(...params);\r\n },\r\n confirmModal: (...params) => {\r\n confirmModal(...params);\r\n },\r\n success: (...params) => {\r\n success(...params);\r\n },\r\n toast: (...params) => {\r\n toast(...params);\r\n },\r\n modal: (...params) => {\r\n modal(...params);\r\n }\r\n};\r\n\r\nexport const swal = {\r\n error,\r\n confirmModal,\r\n success,\r\n toast,\r\n modal,\r\n noWait,\r\n warning\r\n};\r\n","import * as types from \"../constants/actionTypes\";\r\nimport {\r\n setHasMultipleGroupCompanies,\r\n setGroupCompanyId,\r\n clearContext,\r\n setProjectId,\r\n setProject\r\n} from \"./contextActions\";\r\n\r\nconst getClaimValueByName = (user, claimName) => {\r\n var claim = user.claims.find(c => c.type === claimName);\r\n if (claim) {\r\n return claim.value;\r\n }\r\n return null;\r\n};\r\n\r\nexport const login = (token, expiresIn, user) => async dispatch => {\r\n var groupCompanyId = getClaimValueByName(user, \"GroupCompanyId\");\r\n var multipleGroupCompany = getClaimValueByName(user, \"MultipleGroupCompany\");\r\n var actions = [\r\n setProjectId(null),\r\n setProject(null),\r\n setGroupCompanyId(groupCompanyId ? parseInt(groupCompanyId) : null),\r\n setHasMultipleGroupCompanies(multipleGroupCompany === \"1\"),\r\n { type: types.AUTH_LOGIN, token, expiresIn, user, groupCompanyId }\r\n ];\r\n await Promise.all(actions.map(action => dispatch(action)));\r\n};\r\nexport const logout = () => async dispatch => {\r\n await Promise.all([\r\n dispatch({ type: types.AUTH_LOGOUT }),\r\n dispatch(clearContext())\r\n ]);\r\n};\r\n","import React from 'react';\r\nimport './loader.scss';\r\n\r\nconst Loader = () => (\r\n \r\n \r\n \r\n)\r\n\r\nexport default Loader;","import React from 'react';\r\nimport packageJson from '../../package.json';\r\nglobal.appVersion = packageJson.version;\r\n\r\nconst clearCache = () => {\r\n // deleta cache e recarrega página\r\n window.location.reload(true);\r\n}\r\n\r\nclass CacheBuster extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n loading: true,\r\n isLatestVersion: false,\r\n serverVersion: '',\r\n clientVersion: '',\r\n checkReloading: () => {\r\n fetch('/meta.json')\r\n .then((response) => response.json())\r\n .then((meta) => {\r\n const latestVersion = meta.version;\r\n const currentVersion = global.appVersion;\r\n \r\n this.serverVersion = meta.version;\r\n this.clientVersion = global.appVersion;\r\n\r\n //alert(`meta.version => v ${meta.version} - global.appVersion => v ${global.appVersion}`);\r\n // console.log(`server version => v ${meta.version} - client appVersion => v ${global.appVersion}`)\r\n if (meta.version != global.appVersion) {\r\n clearCache(); \r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n render() {\r\n const { loading, isLatestVersion, serverVersion, clientVersion, checkReloading } = this.state;\r\n return this.props.children({ loading, isLatestVersion, serverVersion, clientVersion, checkReloading });\r\n }\r\n}\r\n\r\nexport default CacheBuster;","export function loggedUser() {\r\n let user = null;\r\n try {\r\n let data = JSON.parse(localStorage.getItem(\"user\"));\r\n let hash = data.token.split('.');\r\n let buf = Buffer.from(hash[1], 'base64');\r\n user = JSON.parse(buf.toString());\r\n } catch (e) {\r\n console.warn('Could not get logged user.');\r\n }\r\n return user;\r\n}"],"sourceRoot":""}