x25 3.0.0 → 17.0.0
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/Account/Load.js +75 -0
- package/Account/actions.js +15 -0
- package/Account/index.js +20 -0
- package/Account/reducer.js +122 -0
- package/Account/request.js +44 -0
- package/Async/InitModule.js +190 -0
- package/Async/RouteLoading.js +64 -0
- package/Async/SimulatedException.js +44 -0
- package/Async/index.js +95 -0
- package/Async/types.js +1 -0
- package/Company/Load.js +82 -0
- package/Company/actions.js +15 -0
- package/Company/index.js +20 -0
- package/Company/reducer.js +165 -0
- package/Company/request.js +36 -0
- package/Company/util.js +10 -0
- package/Header/AccountOptionsContainer.js +144 -0
- package/Header/AdminSelectCompany.js +109 -0
- package/Header/ClientSelectCompany.js +104 -0
- package/Header/Header.js +127 -0
- package/Header/HeaderContainer.js +39 -0
- package/Header/Logo.js +30 -0
- package/Header/LogoutButton.js +39 -0
- package/Header/index.js +19 -0
- package/Header/request.js +26 -0
- package/Header/types.js +1 -0
- package/Header/util.js +58 -0
- package/Inputs/Business/BankAccount.js +48 -0
- package/Inputs/Business/BankName.js +49 -0
- package/Inputs/Business/CifField.js +112 -0
- package/Inputs/Business/CifFieldContainer.js +157 -0
- package/Inputs/Business/Email.js +37 -0
- package/Inputs/Business/NidField.js +91 -0
- package/Inputs/Business/Phone.js +37 -0
- package/Inputs/Business/index.js +34 -0
- package/Inputs/Business/request.js +39 -0
- package/Inputs/CaptchaBox.js +151 -0
- package/Inputs/DateInput.js +172 -0
- package/Inputs/DateTemplate.js +200 -0
- package/Inputs/DelayInputChange.js +135 -0
- package/Inputs/FocusTemplate.js +47 -0
- package/Inputs/InputTemplate.js +78 -0
- package/Inputs/LabelTemplate.js +59 -0
- package/Inputs/NumericInput.js +139 -0
- package/Inputs/NumericTemplate.js +148 -0
- package/Inputs/Selects/County.js +29 -0
- package/Inputs/Selects/Custom.js +56 -0
- package/Inputs/Selects/Simple.js +75 -0
- package/Inputs/Selects/index.js +52 -0
- package/Inputs/SimpleInput.js +42 -0
- package/Inputs/SimpleTextarea.js +47 -0
- package/Inputs/TextareaTemplate.js +55 -0
- package/Inputs/Tooltip.js +82 -0
- package/Inputs/index.js +185 -0
- package/Messages/Error.js +106 -0
- package/Messages/Loading.js +68 -0
- package/Messages/index.js +29 -0
- package/Modal/Delete.js +240 -0
- package/Modal/Root.js +81 -0
- package/Modal/SimpleModal.js +57 -0
- package/Modal/actions.js +10 -0
- package/Modal/getComponent.js +42 -0
- package/Modal/index.js +22 -0
- package/Modal/reducer.js +53 -0
- package/Modal/types.js +7 -0
- package/Modal/util.js +17 -0
- package/Payment/EstimatePrice/Description.js +92 -0
- package/Payment/EstimatePrice/PayBox.js +220 -0
- package/Payment/EstimatePrice/index.js +92 -0
- package/Payment/EstimatePrice/util.js +21 -0
- package/Payment/MobilpayForm.js +86 -0
- package/Payment/Modal/BankTransfer.js +233 -0
- package/Payment/Modal/CompanyValability.js +28 -0
- package/Payment/Modal/DoneForm.js +222 -0
- package/Payment/Modal/PaymentDone.js +53 -0
- package/Payment/Modal/index.js +27 -0
- package/Payment/actions.js +23 -0
- package/{src/Payment → Payment}/codes.js +19 -16
- package/Payment/index.js +141 -0
- package/Payment/request.js +49 -0
- package/Payment/types.js +1 -0
- package/Payment/util.js +50 -0
- package/Payment/validate.js +23 -0
- package/Sidebar.js +156 -0
- package/Things.js +53 -0
- package/actions.js +73 -0
- package/config.js +10 -0
- package/dev/ErrorBoundary.js +109 -0
- package/dev/TheError.js +113 -0
- package/dev/index.js +132 -0
- package/dev/types.js +1 -0
- package/package.json +13 -13
- package/prod/SentryErrorBoundary.js +150 -0
- package/reducer/captchas.js +51 -0
- package/reducer/counties.js +57 -0
- package/reducer/index.js +38 -0
- package/reducer/module.js +48 -0
- package/style/index.css +1 -0
- package/style/sidebar.css +1 -0
- package/types.js +1 -0
- package/utility/calendar.js +45 -0
- package/utility/date.js +111 -0
- package/utility/index.js +125 -0
- package/utility/language.js +20 -0
- package/utility/mql.js +6 -0
- package/utility/normalize-test.js +54 -0
- package/utility/normalize.js +108 -0
- package/utility/numbers.js +93 -0
- package/utility/numeric.js +103 -0
- package/utility/others.js +142 -0
- package/utility/strings-test.js +216 -0
- package/utility/strings.js +85 -0
- package/utility/validation/common.js +278 -0
- package/utility/validation/index.js +110 -0
- package/utility/validation/specific.js +14 -0
- package/utility/validation/validate/bank-test.js +41 -0
- package/utility/validation/validate/bank.js +176 -0
- package/utility/validation/validate/cif-test.js +37 -0
- package/utility/validation/validate/cif.js +44 -0
- package/utility/validation/validate/cnp-test.js +68 -0
- package/utility/validation/validate/cnp.js +193 -0
- package/{src/utility → utility}/validation/validate/date.js +61 -73
- package/utility/validation/validate/email-test.js +30 -0
- package/utility/validation/validate/email.js +11 -0
- package/utility/validation/validate/index.js +65 -0
- package/.eslintignore +0 -2
- package/.eslintrc.json +0 -275
- package/.flowconfig +0 -23
- package/conf/dev.js +0 -19
- package/conf/dist.js +0 -19
- package/conf/polyfills/tempPolyfills.js +0 -7
- package/src/Account/Load.jsx +0 -79
- package/src/Account/actions.js +0 -10
- package/src/Account/index.js +0 -11
- package/src/Account/reducer.js +0 -139
- package/src/Account/request.js +0 -36
- package/src/Async/InitModule.jsx +0 -114
- package/src/Async/RouteLoading.jsx +0 -52
- package/src/Async/SimulatedException.jsx +0 -19
- package/src/Async/index.jsx +0 -75
- package/src/Async/types.js +0 -39
- package/src/Company/Load.jsx +0 -84
- package/src/Company/actions.js +0 -10
- package/src/Company/index.js +0 -11
- package/src/Company/reducer.js +0 -201
- package/src/Company/request.js +0 -30
- package/src/Company/util.js +0 -7
- package/src/Header/AccountOptionsContainer.jsx +0 -124
- package/src/Header/AdminSelectCompany.jsx +0 -101
- package/src/Header/ClientSelectCompany.jsx +0 -90
- package/src/Header/Header.jsx +0 -120
- package/src/Header/HeaderContainer.jsx +0 -30
- package/src/Header/Logo.jsx +0 -16
- package/src/Header/LogoutButton.jsx +0 -34
- package/src/Header/index.jsx +0 -9
- package/src/Header/request.js +0 -28
- package/src/Header/types.js +0 -6
- package/src/Header/util.jsx +0 -61
- package/src/Inputs/Business/BankAccount.jsx +0 -39
- package/src/Inputs/Business/BankName.jsx +0 -40
- package/src/Inputs/Business/CifField.jsx +0 -93
- package/src/Inputs/Business/CifFieldContainer.jsx +0 -142
- package/src/Inputs/Business/Email.jsx +0 -23
- package/src/Inputs/Business/NidField.jsx +0 -77
- package/src/Inputs/Business/Phone.jsx +0 -23
- package/src/Inputs/Business/index.js +0 -16
- package/src/Inputs/Business/request.js +0 -39
- package/src/Inputs/CaptchaBox.jsx +0 -131
- package/src/Inputs/DateInput.jsx +0 -188
- package/src/Inputs/DateTemplate.jsx +0 -213
- package/src/Inputs/DelayInputChange.jsx +0 -130
- package/src/Inputs/FocusTemplate.jsx +0 -41
- package/src/Inputs/InputTemplate.jsx +0 -79
- package/src/Inputs/LabelTemplate.jsx +0 -47
- package/src/Inputs/NumericInput.jsx +0 -142
- package/src/Inputs/NumericTemplate.jsx +0 -155
- package/src/Inputs/Selects/County.jsx +0 -19
- package/src/Inputs/Selects/Custom.jsx +0 -55
- package/src/Inputs/Selects/Simple.jsx +0 -73
- package/src/Inputs/Selects/index.jsx +0 -37
- package/src/Inputs/SimpleInput.jsx +0 -40
- package/src/Inputs/SimpleTextarea.jsx +0 -55
- package/src/Inputs/TextareaTemplate.jsx +0 -57
- package/src/Inputs/Tooltip.jsx +0 -61
- package/src/Inputs/index.js +0 -22
- package/src/Messages/Error.jsx +0 -83
- package/src/Messages/Loading.jsx +0 -43
- package/src/Messages/index.jsx +0 -4
- package/src/Modal/Delete.jsx +0 -237
- package/src/Modal/Root.jsx +0 -57
- package/src/Modal/SimpleModal.jsx +0 -47
- package/src/Modal/actions.js +0 -7
- package/src/Modal/getComponent.jsx +0 -32
- package/src/Modal/index.jsx +0 -12
- package/src/Modal/reducer.js +0 -40
- package/src/Modal/types.js +0 -6
- package/src/Modal/util.js +0 -15
- package/src/Payment/EstimatePrice/Description.jsx +0 -101
- package/src/Payment/EstimatePrice/PayBox.jsx +0 -173
- package/src/Payment/EstimatePrice/index.jsx +0 -63
- package/src/Payment/EstimatePrice/util.js +0 -15
- package/src/Payment/MobilpayForm.jsx +0 -77
- package/src/Payment/Modal/BankTransfer.jsx +0 -129
- package/src/Payment/Modal/CompanyValability.jsx +0 -14
- package/src/Payment/Modal/DoneForm.jsx +0 -209
- package/src/Payment/Modal/PaymentDone.jsx +0 -27
- package/src/Payment/Modal/index.js +0 -13
- package/src/Payment/actions.jsx +0 -22
- package/src/Payment/index.jsx +0 -124
- package/src/Payment/request.js +0 -50
- package/src/Payment/types.js +0 -14
- package/src/Payment/util.jsx +0 -52
- package/src/Payment/validate.js +0 -25
- package/src/Sidebar.jsx +0 -158
- package/src/Things.jsx +0 -35
- package/src/actions.js +0 -36
- package/src/config.js +0 -7
- package/src/dev/ErrorBoundary.jsx +0 -98
- package/src/dev/TheError.jsx +0 -87
- package/src/dev/index.js +0 -127
- package/src/dev/types.js +0 -10
- package/src/prod/SentryErrorBoundary.jsx +0 -98
- package/src/reducer/captchas.js +0 -44
- package/src/reducer/counties.js +0 -46
- package/src/reducer/index.js +0 -25
- package/src/reducer/module.jsx +0 -43
- package/src/style/.sass-lint.yml +0 -84
- package/src/style/.stylelintrc.json +0 -161
- package/src/style/_fancy-text.scss +0 -37
- package/src/style/_fix_bootstrap_placeholder_color.scss +0 -14
- package/src/style/_header-company.scss +0 -69
- package/src/style/_inputs.scss +0 -12
- package/src/style/_minimal.scss +0 -31
- package/src/style/_navigation.scss +0 -24
- package/src/style/_others.scss +0 -79
- package/src/style/index.scss +0 -7
- package/src/style/sidebar/_animations.scss +0 -21
- package/src/style/sidebar/_dark-theme.scss +0 -77
- package/src/style/sidebar/_scroll.scss +0 -37
- package/src/style/sidebar/_structure.scss +0 -299
- package/src/style/sidebar.scss +0 -4
- package/src/types.js +0 -31
- package/src/utility/calendar.js +0 -39
- package/src/utility/date.js +0 -100
- package/src/utility/index.js +0 -12
- package/src/utility/language.js +0 -17
- package/src/utility/mql.js +0 -3
- package/src/utility/normalize-test.js +0 -58
- package/src/utility/normalize.js +0 -119
- package/src/utility/numbers.js +0 -87
- package/src/utility/numeric.js +0 -114
- package/src/utility/others.jsx +0 -160
- package/src/utility/strings-test.js +0 -136
- package/src/utility/strings.js +0 -80
- package/src/utility/validation/common.js +0 -360
- package/src/utility/validation/index.js +0 -70
- package/src/utility/validation/specific.js +0 -9
- package/src/utility/validation/validate/bank-test.js +0 -129
- package/src/utility/validation/validate/bank.js +0 -176
- package/src/utility/validation/validate/cif-test.js +0 -105
- package/src/utility/validation/validate/cif.js +0 -44
- package/src/utility/validation/validate/cnp-test.js +0 -216
- package/src/utility/validation/validate/cnp.js +0 -261
- package/src/utility/validation/validate/email-test.js +0 -36
- package/src/utility/validation/validate/email.js +0 -6
- package/src/utility/validation/validate/index.js +0 -7
- package/webpack.config.js +0 -90
- package/x25.wiki/Account.md +0 -41
- package/x25.wiki/Company.md +0 -39
- package/x25.wiki/Header.md +0 -21
- package/x25.wiki/Home.md +0 -1
- package/x25.wiki/Inputs.md +0 -33
- package/x25.wiki/Messages.md +0 -27
- package/x25.wiki/Payment.md +0 -42
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
9
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
10
|
+
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
|
|
13
|
+
var _react2 = _interopRequireDefault(_react);
|
|
14
|
+
|
|
15
|
+
var _immutable = require("redux-form/immutable");
|
|
16
|
+
|
|
17
|
+
var _reactRedux = require("react-redux");
|
|
18
|
+
|
|
19
|
+
var _request = require("./request");
|
|
20
|
+
|
|
21
|
+
var _actions = require("../../actions");
|
|
22
|
+
|
|
23
|
+
var actions = _interopRequireWildcard(_actions);
|
|
24
|
+
|
|
25
|
+
var _utility = require("../../utility");
|
|
26
|
+
|
|
27
|
+
var _CifField = require("./CifField");
|
|
28
|
+
|
|
29
|
+
var _CifField2 = _interopRequireDefault(_CifField);
|
|
30
|
+
|
|
31
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
32
|
+
|
|
33
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
+
|
|
35
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
36
|
+
|
|
37
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
38
|
+
|
|
39
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
40
|
+
|
|
41
|
+
var createPromise = function createPromise(after) {
|
|
42
|
+
return new Promise(function (resolve) {
|
|
43
|
+
after();
|
|
44
|
+
setTimeout(function () {
|
|
45
|
+
resolve();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var tryToGetInfo = function tryToGetInfo(_ref) {
|
|
51
|
+
var dispatch = _ref.dispatch,
|
|
52
|
+
cif = _ref.cif,
|
|
53
|
+
focusInput = _ref.focusInput,
|
|
54
|
+
formID = _ref.formID;
|
|
55
|
+
return (0, _request.getCompanyDetails)(cif).then(function (response) {
|
|
56
|
+
var before = [createPromise(function () {
|
|
57
|
+
return dispatch(actions.notify("Am preluat informațiile"));
|
|
58
|
+
})],
|
|
59
|
+
changes = Object.keys(response).map(function (key) {
|
|
60
|
+
return function () {
|
|
61
|
+
return createPromise(function () {
|
|
62
|
+
return dispatch((0, _immutable.change)(formID, key, response[key]));
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}),
|
|
66
|
+
after = [createPromise(function () {
|
|
67
|
+
return dispatch((0, _immutable.stopSubmit)(formID));
|
|
68
|
+
}), createPromise(function () {
|
|
69
|
+
return focusInput();
|
|
70
|
+
})];
|
|
71
|
+
|
|
72
|
+
var promises = before.concat(changes).concat(after);
|
|
73
|
+
|
|
74
|
+
promises.reduce(function (prev, cur) {
|
|
75
|
+
return prev.then(cur);
|
|
76
|
+
}, Promise.resolve());
|
|
77
|
+
}).catch(function () {
|
|
78
|
+
(0, _utility.delay)().then(function () {
|
|
79
|
+
dispatch(actions.notifyError("Nu am putut prelua informațiile firmei"));
|
|
80
|
+
}).then(function () {
|
|
81
|
+
dispatch((0, _immutable.stopSubmit)(formID));
|
|
82
|
+
}).then(function () {
|
|
83
|
+
focusInput();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var mapDispatchToProps = function mapDispatchToProps(dispatch, _ref2) {
|
|
89
|
+
var formID = _ref2.formID,
|
|
90
|
+
focusInput = _ref2.focusInput;
|
|
91
|
+
return {
|
|
92
|
+
findDetailsByCif: function findDetailsByCif(cif) {
|
|
93
|
+
return function () {
|
|
94
|
+
dispatch((0, _immutable.startSubmit)(formID));
|
|
95
|
+
|
|
96
|
+
if ((0, _utility.isValidCIF)(cif)) {
|
|
97
|
+
tryToGetInfo({
|
|
98
|
+
dispatch: dispatch,
|
|
99
|
+
cif: cif,
|
|
100
|
+
focusInput: focusInput,
|
|
101
|
+
formID: formID
|
|
102
|
+
});
|
|
103
|
+
} else {
|
|
104
|
+
(0, _utility.delay)().then(function () {
|
|
105
|
+
dispatch(actions.notifyError("Trebuie furnizat un CIF valid"));
|
|
106
|
+
}).then(function () {
|
|
107
|
+
dispatch((0, _immutable.stopSubmit)(formID));
|
|
108
|
+
}).then(function () {
|
|
109
|
+
focusInput();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
var CifFieldContainer = function (_React$Component) {
|
|
118
|
+
_inherits(CifFieldContainer, _React$Component);
|
|
119
|
+
|
|
120
|
+
function CifFieldContainer(props) {
|
|
121
|
+
_classCallCheck(this, CifFieldContainer);
|
|
122
|
+
|
|
123
|
+
var _this = _possibleConstructorReturn(this, (CifFieldContainer.__proto__ || Object.getPrototypeOf(CifFieldContainer)).call(this, props));
|
|
124
|
+
|
|
125
|
+
_this.handleKeyPressed = function (event) {
|
|
126
|
+
var _this$props = _this.props,
|
|
127
|
+
findDetailsByCif = _this$props.findDetailsByCif,
|
|
128
|
+
value = _this$props.input.value;
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
if (event.key === "Enter" && event.shiftKey) {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
event.stopPropagation();
|
|
134
|
+
findDetailsByCif(value)();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
return _this;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
_createClass(CifFieldContainer, [{
|
|
141
|
+
key: "shouldComponentUpdate",
|
|
142
|
+
value: function shouldComponentUpdate(nextProps) {
|
|
143
|
+
return this.props.input !== nextProps.input || this.props.meta.submitting !== nextProps.meta.submitting || this.props.meta.touched !== nextProps.meta.touched || this.props.meta.error !== nextProps.meta.error;
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
key: "render",
|
|
147
|
+
value: function render() {
|
|
148
|
+
return _react2.default.createElement(_CifField2.default, _extends({}, this.props, {
|
|
149
|
+
handleKeyPressed: this.handleKeyPressed
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
}]);
|
|
153
|
+
|
|
154
|
+
return CifFieldContainer;
|
|
155
|
+
}(_react2.default.Component);
|
|
156
|
+
|
|
157
|
+
exports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(CifFieldContainer);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
/* eslint-disable no-duplicate-imports */
|
|
9
|
+
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
|
|
12
|
+
var _react2 = _interopRequireDefault(_react);
|
|
13
|
+
|
|
14
|
+
var _SimpleInput = require("../SimpleInput");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var EmailInput = function EmailInput(props) {
|
|
19
|
+
return _react2.default.createElement(
|
|
20
|
+
"div",
|
|
21
|
+
{ className: "input-group" },
|
|
22
|
+
_react2.default.createElement(
|
|
23
|
+
"div",
|
|
24
|
+
{ className: "input-group-prepend" },
|
|
25
|
+
_react2.default.createElement(
|
|
26
|
+
"span",
|
|
27
|
+
{ className: "input-group-text" },
|
|
28
|
+
_react2.default.createElement("i", { className: "fa fa-envelope-o" })
|
|
29
|
+
)
|
|
30
|
+
),
|
|
31
|
+
_react2.default.createElement(_SimpleInput.SimpleInput, _extends({}, props, {
|
|
32
|
+
placeholder: "ex. design@gmail.ro"
|
|
33
|
+
}))
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.default = EmailInput;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
9
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
10
|
+
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
|
|
13
|
+
var _react2 = _interopRequireDefault(_react);
|
|
14
|
+
|
|
15
|
+
var _classnames = require("classnames");
|
|
16
|
+
|
|
17
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
+
|
|
23
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
24
|
+
|
|
25
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
26
|
+
|
|
27
|
+
var NidField = function (_React$Component) {
|
|
28
|
+
_inherits(NidField, _React$Component);
|
|
29
|
+
|
|
30
|
+
function NidField() {
|
|
31
|
+
_classCallCheck(this, NidField);
|
|
32
|
+
|
|
33
|
+
return _possibleConstructorReturn(this, (NidField.__proto__ || Object.getPrototypeOf(NidField)).apply(this, arguments));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_createClass(NidField, [{
|
|
37
|
+
key: "shouldComponentUpdate",
|
|
38
|
+
value: function shouldComponentUpdate(nextProps) {
|
|
39
|
+
return this.props.input !== nextProps.input || this.props.meta.submitting !== nextProps.meta.submitting || this.props.meta.touched !== nextProps.meta.touched || this.props.meta.error !== nextProps.meta.error;
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "render",
|
|
43
|
+
value: function render() {
|
|
44
|
+
var _props = this.props,
|
|
45
|
+
input = _props.input,
|
|
46
|
+
_props$meta = _props.meta,
|
|
47
|
+
error = _props$meta.error,
|
|
48
|
+
submitting = _props$meta.submitting,
|
|
49
|
+
touched = _props$meta.touched,
|
|
50
|
+
onRegisterRef = _props.onRegisterRef;
|
|
51
|
+
var name = input.name;
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
return _react2.default.createElement(
|
|
55
|
+
"div",
|
|
56
|
+
{ className: (0, _classnames2.default)("form-group row", { "is-invalid": touched && error }) },
|
|
57
|
+
_react2.default.createElement(
|
|
58
|
+
"label",
|
|
59
|
+
{
|
|
60
|
+
className: "\r col-md-3\r text-md-right\r form-control-label\r form-control-lg", htmlFor: name },
|
|
61
|
+
"C.N.P "
|
|
62
|
+
),
|
|
63
|
+
_react2.default.createElement(
|
|
64
|
+
"div",
|
|
65
|
+
{ className: "col-md-9 col-lg-6" },
|
|
66
|
+
_react2.default.createElement("input", _extends({}, input, {
|
|
67
|
+
"aria-label": "Cod numeric personal",
|
|
68
|
+
className: (0, _classnames2.default)("form-control form-control-lg", {
|
|
69
|
+
"is-invalid": touched && error
|
|
70
|
+
}),
|
|
71
|
+
disabled: submitting,
|
|
72
|
+
id: name,
|
|
73
|
+
name: name,
|
|
74
|
+
placeholder: "ex. 1750826256625",
|
|
75
|
+
ref: onRegisterRef,
|
|
76
|
+
type: "text"
|
|
77
|
+
})),
|
|
78
|
+
_react2.default.createElement(
|
|
79
|
+
"div",
|
|
80
|
+
{ className: "invalid-feedback" },
|
|
81
|
+
touched && error ? error : null
|
|
82
|
+
)
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
}]);
|
|
87
|
+
|
|
88
|
+
return NidField;
|
|
89
|
+
}(_react2.default.Component);
|
|
90
|
+
|
|
91
|
+
exports.default = NidField;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
/* eslint-disable no-duplicate-imports */
|
|
9
|
+
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
|
|
12
|
+
var _react2 = _interopRequireDefault(_react);
|
|
13
|
+
|
|
14
|
+
var _SimpleInput = require("../SimpleInput");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var PhoneInput = function PhoneInput(props) {
|
|
19
|
+
return _react2.default.createElement(
|
|
20
|
+
"div",
|
|
21
|
+
{ className: "input-group" },
|
|
22
|
+
_react2.default.createElement(
|
|
23
|
+
"div",
|
|
24
|
+
{ className: "input-group-prepend" },
|
|
25
|
+
_react2.default.createElement(
|
|
26
|
+
"span",
|
|
27
|
+
{ className: "input-group-text" },
|
|
28
|
+
_react2.default.createElement("i", { className: "fa fa-phone" })
|
|
29
|
+
)
|
|
30
|
+
),
|
|
31
|
+
_react2.default.createElement(_SimpleInput.SimpleInput, _extends({}, props, {
|
|
32
|
+
placeholder: "ex. 0755326517"
|
|
33
|
+
}))
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.default = PhoneInput;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CifFieldContainer = exports.BankNameField = exports.BankAccountInput = exports.PhoneInput = exports.EmailInput = undefined;
|
|
7
|
+
|
|
8
|
+
var _Email = require("./Email");
|
|
9
|
+
|
|
10
|
+
var _Email2 = _interopRequireDefault(_Email);
|
|
11
|
+
|
|
12
|
+
var _Phone = require("./Phone");
|
|
13
|
+
|
|
14
|
+
var _Phone2 = _interopRequireDefault(_Phone);
|
|
15
|
+
|
|
16
|
+
var _BankAccount = require("./BankAccount");
|
|
17
|
+
|
|
18
|
+
var _BankAccount2 = _interopRequireDefault(_BankAccount);
|
|
19
|
+
|
|
20
|
+
var _BankName = require("./BankName");
|
|
21
|
+
|
|
22
|
+
var _BankName2 = _interopRequireDefault(_BankName);
|
|
23
|
+
|
|
24
|
+
var _CifFieldContainer = require("./CifFieldContainer");
|
|
25
|
+
|
|
26
|
+
var _CifFieldContainer2 = _interopRequireDefault(_CifFieldContainer);
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
exports.EmailInput = _Email2.default;
|
|
31
|
+
exports.PhoneInput = _Phone2.default;
|
|
32
|
+
exports.BankAccountInput = _BankAccount2.default;
|
|
33
|
+
exports.BankNameField = _BankName2.default;
|
|
34
|
+
exports.CifFieldContainer = _CifFieldContainer2.default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCompanyDetails = undefined;
|
|
7
|
+
|
|
8
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
9
|
+
|
|
10
|
+
var _superagent = require("superagent");
|
|
11
|
+
|
|
12
|
+
var _superagent2 = _interopRequireDefault(_superagent);
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
18
|
+
var fields = ["Address", "IsVatPayer", "Name", "Phone", "Registration", "Email"];
|
|
19
|
+
|
|
20
|
+
var normalizeCompanyDetails = function normalizeCompanyDetails(resolve, reject) {
|
|
21
|
+
return function (error, response) {
|
|
22
|
+
if (error) {
|
|
23
|
+
reject({ error: error });
|
|
24
|
+
} else {
|
|
25
|
+
var body = response.body;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
resolve(fields.reduce(function (accumulator, currentValue) {
|
|
29
|
+
return _extends({}, accumulator, _defineProperty({}, currentValue, body[currentValue]));
|
|
30
|
+
}, {}));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var getCompanyDetails = exports.getCompanyDetails = function getCompanyDetails(cif) {
|
|
36
|
+
return new Promise(function (resolve, reject) {
|
|
37
|
+
return _superagent2.default.post("/api/extern/get-company-information/" + cif).type("json").end(normalizeCompanyDetails(resolve, reject));
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CaptchaBox = undefined;
|
|
7
|
+
|
|
8
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
9
|
+
|
|
10
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
var _react2 = _interopRequireDefault(_react);
|
|
15
|
+
|
|
16
|
+
var _reactstrap = require("reactstrap");
|
|
17
|
+
|
|
18
|
+
var _classnames = require("classnames");
|
|
19
|
+
|
|
20
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
27
|
+
|
|
28
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
29
|
+
|
|
30
|
+
var InfoIcon = function (_React$Component) {
|
|
31
|
+
_inherits(InfoIcon, _React$Component);
|
|
32
|
+
|
|
33
|
+
function InfoIcon(props) {
|
|
34
|
+
_classCallCheck(this, InfoIcon);
|
|
35
|
+
|
|
36
|
+
var _this = _possibleConstructorReturn(this, (InfoIcon.__proto__ || Object.getPrototypeOf(InfoIcon)).call(this, props));
|
|
37
|
+
|
|
38
|
+
_this.state = {
|
|
39
|
+
showTooltip: false
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
_this.toggle = function () {
|
|
43
|
+
_this.setState(function (prevState) {
|
|
44
|
+
return {
|
|
45
|
+
showTooltip: !prevState.showTooltip
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
return _this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
_createClass(InfoIcon, [{
|
|
53
|
+
key: "render",
|
|
54
|
+
value: function render() {
|
|
55
|
+
return _react2.default.createElement(
|
|
56
|
+
"div",
|
|
57
|
+
{ className: "d-inline float-right" },
|
|
58
|
+
_react2.default.createElement("i", {
|
|
59
|
+
className: "fa fa-info-circle fa-2x text-info pull-right",
|
|
60
|
+
id: "TooltipExample"
|
|
61
|
+
}),
|
|
62
|
+
_react2.default.createElement(
|
|
63
|
+
_reactstrap.Tooltip,
|
|
64
|
+
{
|
|
65
|
+
isOpen: this.state.showTooltip,
|
|
66
|
+
placement: "right",
|
|
67
|
+
target: "TooltipExample",
|
|
68
|
+
toggle: this.toggle },
|
|
69
|
+
"Scopul acestei verific\u0103ri este de a deosebi o person\u0103 de un robot.\n De obicei, acest cod apare atunci cand se folole\u0219te excesiv\n o functionalitate din aplica\u021Bie"
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}]);
|
|
74
|
+
|
|
75
|
+
return InfoIcon;
|
|
76
|
+
}(_react2.default.Component);
|
|
77
|
+
|
|
78
|
+
var CaptchaBox = exports.CaptchaBox = function CaptchaBox(props) {
|
|
79
|
+
var autoFocus = props.autoFocus,
|
|
80
|
+
id = props.id,
|
|
81
|
+
input = props.input,
|
|
82
|
+
tabIndex = props.tabIndex,
|
|
83
|
+
label = props.label,
|
|
84
|
+
left = props.left,
|
|
85
|
+
right = props.right,
|
|
86
|
+
_props$meta = props.meta,
|
|
87
|
+
touched = _props$meta.touched,
|
|
88
|
+
error = _props$meta.error,
|
|
89
|
+
submitting = _props$meta.submitting,
|
|
90
|
+
type = props.type;
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
if (typeof id === "undefined" || id === "") {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return _react2.default.createElement(
|
|
98
|
+
"div",
|
|
99
|
+
{ className: "form-group row" },
|
|
100
|
+
_react2.default.createElement(
|
|
101
|
+
"label",
|
|
102
|
+
{
|
|
103
|
+
className: (left ? left : "col-md-4 text-md-right") + " form-control-label",
|
|
104
|
+
htmlFor: input.name },
|
|
105
|
+
"Verificare ",
|
|
106
|
+
_react2.default.createElement(InfoIcon, null)
|
|
107
|
+
),
|
|
108
|
+
_react2.default.createElement(
|
|
109
|
+
"div",
|
|
110
|
+
{ className: right ? right : "col-md-8" },
|
|
111
|
+
_react2.default.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{ className: "custom-class" },
|
|
114
|
+
_react2.default.createElement(
|
|
115
|
+
"span",
|
|
116
|
+
{ className: "custom-control-description text-muted" },
|
|
117
|
+
"Tastează numere din imaginea de mai jos"
|
|
118
|
+
),
|
|
119
|
+
_react2.default.createElement(
|
|
120
|
+
"div",
|
|
121
|
+
{ className: "text-center my-1" },
|
|
122
|
+
_react2.default.createElement("img", {
|
|
123
|
+
alt: "CaptchaBox",
|
|
124
|
+
src: "/captcha/" + id + ".png"
|
|
125
|
+
})
|
|
126
|
+
)
|
|
127
|
+
),
|
|
128
|
+
_react2.default.createElement("input", _extends({}, input, {
|
|
129
|
+
"aria-label": label,
|
|
130
|
+
autoFocus: autoFocus,
|
|
131
|
+
className: (0, _classnames2.default)("form-control", {
|
|
132
|
+
"is-invalid": touched && error
|
|
133
|
+
}),
|
|
134
|
+
disabled: submitting,
|
|
135
|
+
id: input.name,
|
|
136
|
+
placeholder: "Tasteaz\u0103 numerele",
|
|
137
|
+
tabIndex: tabIndex,
|
|
138
|
+
type: type
|
|
139
|
+
})),
|
|
140
|
+
_react2.default.createElement(
|
|
141
|
+
"div",
|
|
142
|
+
{ className: "invalid-feedback" },
|
|
143
|
+
touched && error ? _react2.default.createElement(
|
|
144
|
+
"span",
|
|
145
|
+
null,
|
|
146
|
+
error
|
|
147
|
+
) : null
|
|
148
|
+
)
|
|
149
|
+
)
|
|
150
|
+
);
|
|
151
|
+
};
|