payroll_manager/front-end/build/cache-loader/6d1685a0d3763dc9fdbc4d68a8d5a57d.json

1 line
12 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/account/password/password.tsx","dependencies":[{"path":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/password/password.tsx","mtime":1533613271749},{"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 { AvForm, AvField } from 'availity-reactstrap-validation';\nimport { Row, Col, Button } from 'reactstrap';\nimport { getSession } from 'app/shared/reducers/authentication';\nimport PasswordStrengthBar from 'app/shared/layout/password/password-strength-bar';\nimport { savePassword, reset } from './password.reducer';\nvar PasswordPage = /** @class */ (function (_super) {\n tslib_1.__extends(PasswordPage, _super);\n function PasswordPage() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n password: ''\n };\n _this.handleValidSubmit = function (event, values) {\n _this.props.savePassword(values.currentPassword, values.newPassword);\n };\n _this.updatePassword = function (event) {\n _this.setState({ password: event.target.value });\n };\n return _this;\n }\n PasswordPage.prototype.componentDidMount = function () {\n this.props.reset();\n this.props.getSession();\n };\n PasswordPage.prototype.componentWillUnmount = function () {\n this.props.reset();\n };\n PasswordPage.prototype.render = function () {\n var account = this.props.account;\n return (React.createElement(\"div\", null,\n React.createElement(Row, { className: \"justify-content-center\" },\n React.createElement(Col, { md: \"8\" },\n React.createElement(\"h2\", { id: \"password-title\" },\n \"Password for \",\n account.login),\n React.createElement(AvForm, { id: \"password-form\", onValidSubmit: this.handleValidSubmit },\n React.createElement(AvField, { name: \"currentPassword\", label: \"Current password\", placeholder: \"Current password\", type: \"password\", validate: {\n required: { value: true, errorMessage: 'Your password is required.' }\n } }),\n React.createElement(AvField, { name: \"newPassword\", label: \"New password\", placeholder: \"New password\", type: \"password\", validate: {\n required: { value: true, errorMessage: 'Your password is required.' },\n minLength: { value: 4, errorMessage: 'Your password is required to be at least 4 characters.' },\n maxLength: { value: 50, errorMessage: 'Your password cannot be longer than 50 characters.' }\n }, onChange: this.updatePassword }),\n React.createElement(PasswordStrengthBar, { password: this.state.password }),\n React.createElement(AvField, { name: \"confirmPassword\", label: \"New password confirmation\", placeholder: \"Confirm the new password\", type: \"password\", validate: {\n required: {\n value: true,\n errorMessage: 'Your confirmation password is required.'\n },\n minLength: {\n value: 4,\n errorMessage: 'Your confirmation password is required to be at least 4 characters.'\n },\n maxLength: {\n value: 50,\n errorMessage: 'Your confirmation password cannot be longer than 50 characters.'\n },\n match: {\n value: 'newPassword',\n errorMessage: 'The password and its confirmation do not match!'\n }\n } }),\n React.createElement(Button, { color: \"success\", type: \"submit\" }, \"Save\"))))));\n };\n return PasswordPage;\n}(React.Component));\nexport { PasswordPage };\nvar mapStateToProps = function (_a) {\n var authentication = _a.authentication;\n return ({\n account: authentication.account,\n isAuthenticated: authentication.isAuthenticated\n });\n};\nvar mapDispatchToProps = { getSession: getSession, savePassword: savePassword, reset: reset };\nexport default connect(mapStateToProps, mapDispatchToProps)(PasswordPage);\n",{"version":3,"file":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/password/password.tsx","sourceRoot":"","sources":["/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-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oCACL,KAAK,EAAE,aAAa;oCACpB,YAAY,EAAE,iDAAiD;iCAChE;6BACF,GACD;wBACF,oBAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,WAE5B,CACF,CACL,CACF,CACF,CACP,CAAC;IACJ,CAAC;IACH,mBAAC;AAAD,CAAC,AAtFD,CAAkC,KAAK,CAAC,SAAS,GAsFhD;;AAED,IAAM,eAAe,GAAG,UAAC,EAA8B;QAA5B,kCAAc;IAAmB,OAAA,CAAC;QAC3D,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,eAAe,EAAE,cAAc,CAAC,eAAe;KAChD,CAAC;AAH0D,CAG1D,CAAC;AAEH,IAAM,kBAAkB,GAAG,EAAE,UAAU,YAAA,EAAE,YAAY,cAAA,EAAE,KAAK,OAAA,EAAE,CAAC;AAK/D,eAAe,OAAO,CACpB,eAAe,EACf,kBAAkB,CACnB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { connect } from 'react-redux';\nimport { AvForm, AvField } from 'availity-reactstrap-validation';\nimport { Row, Col, Button } from 'reactstrap';\n\nimport { IRootState } from 'app/shared/reducers';\nimport { getSession } from 'app/shared/reducers/authentication';\nimport PasswordStrengthBar from 'app/shared/layout/password/password-strength-bar';\nimport { savePassword, reset } from './password.reducer';\n\nexport interface IUserPasswordProps extends StateProps, DispatchProps {}\n\nexport interface IUserPasswordState {\n password: string;\n}\n\nexport class PasswordPage extends React.Component<IUserPasswordProps, IUserPasswordState> {\n state: IUserPasswordState = {\n password: ''\n };\n\n componentDidMount() {\n this.props.reset();\n this.props.getSession();\n }\n\n componentWillUnmount() {\n this.props.reset();\n }\n\n handleValidSubmit = (event, values) => {\n this.props.savePassword(values.currentPassword, values.newPassword);\n };\n\n updatePassword = event => {\n this.setState({ password: event.target.value });\n };\n\n render() {\n const { account } = this.props;\n\n return (\n <div>\n <Row className=\"justify-content-center\">\n <Col md=\"8\">\n <h2 id=\"password-title\">Password for {account.login}</h2>\n <AvForm id=\"password-form\" onValidSubmit={this.handleValidSubmit}>\n <AvField\n name=\"currentPassword\"\n label=\"Current password\"\n placeholder=\"Current password\"\n type=\"password\"\n validate={{\n required: { value: true, errorMessage: 'Your password is required.' }\n }}\n />\n <AvField\n name=\"newPassword\"\n label=\"New password\"\n placeholder=\"New password\"\n type=\"password\"\n validate={{\n required: { value: true, errorMessage: 'Your password is required.' },\n minLength: { value: 4, errorMessage: 'Your password is required to be at least 4 characters.' },\n maxLength: { value: 50, errorMessage: 'Your password cannot be longer than 50 characters.' }\n }}\n onChange={this.updatePassword}\n />\n <PasswordStrengthBar password={this.state.password} />\n <AvField\n name=\"confirmPassword\"\n label=\"New password confirmation\"\n placeholder=\"Confirm the new password\"\n type=\"password\"\n validate={{\n required: {\n value: true,\n errorMessage: 'Your confirmation password is required.'\n },\n minLength: {\n value: 4,\n errorMessage: 'Your confirmation password is required to be at least 4 characters.'\n },\n maxLength: {\n value: 50,\n errorMessage: 'Your confirmation password cannot be longer than 50 characters.'\n },\n match: {\n value: 'newPassword',\n errorMessage: 'The password and its confirmation do not match!'\n }\n }}\n />\n <Button color=\"success\" type=\"submit\">\n Save\n </Button>\n </AvForm>\n </Col>\n </Row>\n </div>\n );\n }\n}\n\nconst mapStateToProps = ({ authentication }: IRootState) => ({\n account: authentication.account,\n isAuthenticated: authentication.isAuthenticated\n});\n\nconst mapDispatchToProps = { getSession, savePassword, reset };\n\ntype StateProps = ReturnType<typeof mapStateToProps>;\ntype DispatchProps = typeof mapDispatchToProps;\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(PasswordPage);\n"]}]}