1 line
6.6 KiB
JSON
1 line
6.6 KiB
JSON
{"remainingRequest":"/var/www/html/payroll_manager/front-end/node_modules/thread-loader/dist/cjs.js??ref--4-2!/var/www/html/payroll_manager/front-end/node_modules/ts-loader/index.js??ref--4-3!/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/login/login.tsx","dependencies":[{"path":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/login/login.tsx","mtime":1533613271469},{"path":"/var/www/html/payroll_manager/front-end/node_modules/react-hot-loader/webpack.js","mtime":1505850161000},{"path":"/var/www/html/payroll_manager/front-end/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/var/www/html/payroll_manager/front-end/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/var/www/html/payroll_manager/front-end/node_modules/ts-loader/index.js","mtime":1530127508000},{"path":"/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js","mtime":1519899048000}],"contextDependencies":[],"result":["import * as tslib_1 from \"tslib\";\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport { login } from 'app/shared/reducers/authentication';\nimport LoginModal from './login-modal';\nvar Login = /** @class */ (function (_super) {\n tslib_1.__extends(Login, _super);\n function Login() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n showModal: _this.props.showModal\n };\n _this.handleLogin = function (username, password, rememberMe) {\n if (rememberMe === void 0) { rememberMe = false; }\n _this.props.login(username, password, rememberMe);\n };\n _this.handleClose = function () {\n _this.setState({ showModal: false });\n };\n return _this;\n }\n Login.prototype.componentDidUpdate = function (prevProps, prevState) {\n if (this.props !== prevProps) {\n this.setState({ showModal: this.props.showModal });\n }\n };\n Login.prototype.render = function () {\n var _a = this.props, location = _a.location, isAuthenticated = _a.isAuthenticated;\n var from = (location.state || { from: { pathname: '/', search: location.search } }).from;\n var showModal = this.state.showModal;\n if (isAuthenticated) {\n return React.createElement(Redirect, { to: from });\n }\n return (React.createElement(LoginModal, { showModal: showModal, handleLogin: this.handleLogin, handleClose: this.handleClose, loginError: this.props.loginError }));\n };\n return Login;\n}(React.Component));\nexport { Login };\nvar mapStateToProps = function (_a) {\n var authentication = _a.authentication;\n return ({\n isAuthenticated: authentication.isAuthenticated,\n loginError: authentication.loginError,\n showModal: authentication.showModalLogin\n });\n};\nvar mapDispatchToProps = { login: login };\nexport default connect(mapStateToProps, mapDispatchToProps)(Login);\n",{"version":3,"file":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/login/login.tsx","sourceRoot":"","sources":["/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/login/login.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAuB,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAC3D,OAAO,UAAU,MAAM,eAAe,CAAC;AAQvC;IAA2B,iCAAyC;IAApE;QAAA,qEA8BC;QA7BC,WAAK,GAAgB;YACnB,SAAS,EAAE,KAAI,CAAC,KAAK,CAAC,SAAS;SAChC,CAAC;QAQF,iBAAW,GAAG,UAAC,QAAQ,EAAE,QAAQ,EAAE,UAAkB;YAAlB,2BAAA,EAAA,kBAAkB;YACnD,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QACnD,CAAC,CAAC;QAEF,iBAAW,GAAG;YACZ,KAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;QACtC,CAAC,CAAC;;IAaJ,CAAC;IAzBC,kCAAkB,GAAlB,UAAmB,SAAsB,EAAE,SAAS;QAClD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;SACpD;IACH,CAAC;IAUD,sBAAM,GAAN;QACQ,IAAA,eAA0C,EAAxC,sBAAQ,EAAE,oCAAe,CAAgB;QACzC,IAAA,oFAAI,CAA4E;QAChF,IAAA,gCAAS,CAAgB;QACjC,IAAI,eAAe,EAAE;YACnB,OAAO,oBAAC,QAAQ,IAAC,EAAE,EAAE,IAAI,GAAI,CAAC;SAC/B;QACD,OAAO,CACL,oBAAC,UAAU,IAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAAI,CACtI,CAAC;IACJ,CAAC;IACH,YAAC;AAAD,CAAC,AA9BD,CAA2B,KAAK,CAAC,SAAS,GA8BzC;;AAED,IAAM,eAAe,GAAG,UAAC,EAA8B;QAA5B,kCAAc;IAAmB,OAAA,CAAC;QAC3D,eAAe,EAAE,cAAc,CAAC,eAAe;QAC/C,UAAU,EAAE,cAAc,CAAC,UAAU;QACrC,SAAS,EAAE,cAAc,CAAC,cAAc;KACzC,CAAC;AAJ0D,CAI1D,CAAC;AAEH,IAAM,kBAAkB,GAAG,EAAE,KAAK,OAAA,EAAE,CAAC;AAKrC,eAAe,OAAO,CACpB,eAAe,EACf,kBAAkB,CACnB,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect, RouteComponentProps } from 'react-router-dom';\n\nimport { IRootState } from 'app/shared/reducers';\nimport { login } from 'app/shared/reducers/authentication';\nimport LoginModal from './login-modal';\n\nexport interface ILoginProps extends StateProps, DispatchProps, RouteComponentProps<{}> {}\n\nexport interface ILoginState {\n showModal: boolean;\n}\n\nexport class Login extends React.Component<ILoginProps, ILoginState> {\n state: ILoginState = {\n showModal: this.props.showModal\n };\n\n componentDidUpdate(prevProps: ILoginProps, prevState) {\n if (this.props !== prevProps) {\n this.setState({ showModal: this.props.showModal });\n }\n }\n\n handleLogin = (username, password, rememberMe = false) => {\n this.props.login(username, password, rememberMe);\n };\n\n handleClose = () => {\n this.setState({ showModal: false });\n };\n\n render() {\n const { location, isAuthenticated } = this.props;\n const { from } = location.state || { from: { pathname: '/', search: location.search } };\n const { showModal } = this.state;\n if (isAuthenticated) {\n return <Redirect to={from} />;\n }\n return (\n <LoginModal showModal={showModal} handleLogin={this.handleLogin} handleClose={this.handleClose} loginError={this.props.loginError} />\n );\n }\n}\n\nconst mapStateToProps = ({ authentication }: IRootState) => ({\n isAuthenticated: authentication.isAuthenticated,\n loginError: authentication.loginError,\n showModal: authentication.showModalLogin\n});\n\nconst mapDispatchToProps = { login };\n\ntype StateProps = ReturnType<typeof mapStateToProps>;\ntype DispatchProps = typeof mapDispatchToProps;\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(Login);\n"]}]} |