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
|
@@ -1,73 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
30,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (year < 1000 || year > 3000 || month === 0 || month > 12) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Adjust for leap years
|
|
67
|
-
if ((year % 400 === 0) || (year % 100 !== 0) || (year % 4 !== 0)) {
|
|
68
|
-
monthLength[1] = 29;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Check the range of the day
|
|
72
|
-
return day > 0 && day <= monthLength[month - 1];
|
|
73
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
/* eslint-disable no-magic-numbers */
|
|
8
|
+
|
|
9
|
+
var pattern = /^[0-9]{1,2}\.[0-9]{2}\.[0-9]{4}$/,
|
|
10
|
+
monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
11
|
+
|
|
12
|
+
// 2018-03-31T00:00:00.000Z
|
|
13
|
+
// 2015-02-25T00:00:00Z
|
|
14
|
+
var isValidDateStamp = exports.isValidDateStamp = function isValidDateStamp(raw) {
|
|
15
|
+
|
|
16
|
+
if (typeof raw !== "string" || raw.length < 20 || raw.length > 24) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var value = new Date(raw);
|
|
21
|
+
|
|
22
|
+
if (Object.prototype.toString.call(value) === "[object Date]") {
|
|
23
|
+
if (isNaN(value.getTime())) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// e.g. 25.08.2015
|
|
33
|
+
var isValidDate = exports.isValidDate = function isValidDate(dateString) {
|
|
34
|
+
|
|
35
|
+
if (typeof dateString !== "string" || dateString.length !== 10) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (!pattern.test(dateString)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Parse the date parts to integers
|
|
44
|
+
var parts = dateString.split("."),
|
|
45
|
+
day = parseInt(parts[0], 10),
|
|
46
|
+
month = parseInt(parts[1], 10),
|
|
47
|
+
year = parseInt(parts[2], 10);
|
|
48
|
+
|
|
49
|
+
// Check the ranges of month and year
|
|
50
|
+
if (year < 1000 || year > 3000 || month === 0 || month > 12) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Adjust for leap years
|
|
55
|
+
if (year % 400 === 0 || year % 100 !== 0 || year % 4 !== 0) {
|
|
56
|
+
monthLength[1] = 29;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Check the range of the day
|
|
60
|
+
return day > 0 && day <= monthLength[month - 1];
|
|
61
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _email = require("./email");
|
|
4
|
+
|
|
5
|
+
var valid = true,
|
|
6
|
+
notValid = false;
|
|
7
|
+
|
|
8
|
+
describe("given an email without @ [email]", function () {
|
|
9
|
+
it("should not be valid", function () {
|
|
10
|
+
expect((0, _email.isValidEmail)("email")).toBe(notValid);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe("given an email without the user [email@]", function () {
|
|
15
|
+
it("should not be valid", function () {
|
|
16
|
+
expect((0, _email.isValidEmail)("email@")).toBe(notValid);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe("given an email without domain [email@email]", function () {
|
|
21
|
+
it("should not be valid", function () {
|
|
22
|
+
expect((0, _email.isValidEmail)("email@email")).toBe(notValid);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
describe("given a good email (email@email.ro)", function () {
|
|
27
|
+
it("should be valid", function () {
|
|
28
|
+
expect((0, _email.isValidEmail)("email@email.ro")).toBe(valid);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var isValidEmail = exports.isValidEmail = function isValidEmail(value) {
|
|
7
|
+
return (
|
|
8
|
+
/* eslint-disable-next-line */
|
|
9
|
+
new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/igm).test(value)
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _date = require("./date");
|
|
8
|
+
|
|
9
|
+
Object.keys(_date).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return _date[key];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _email = require("./email");
|
|
20
|
+
|
|
21
|
+
Object.keys(_email).forEach(function (key) {
|
|
22
|
+
if (key === "default" || key === "__esModule") return;
|
|
23
|
+
Object.defineProperty(exports, key, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function get() {
|
|
26
|
+
return _email[key];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _cif = require("./cif");
|
|
32
|
+
|
|
33
|
+
Object.keys(_cif).forEach(function (key) {
|
|
34
|
+
if (key === "default" || key === "__esModule") return;
|
|
35
|
+
Object.defineProperty(exports, key, {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function get() {
|
|
38
|
+
return _cif[key];
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var _cnp = require("./cnp");
|
|
44
|
+
|
|
45
|
+
Object.keys(_cnp).forEach(function (key) {
|
|
46
|
+
if (key === "default" || key === "__esModule") return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _cnp[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _bank = require("./bank");
|
|
56
|
+
|
|
57
|
+
Object.keys(_bank).forEach(function (key) {
|
|
58
|
+
if (key === "default" || key === "__esModule") return;
|
|
59
|
+
Object.defineProperty(exports, key, {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function get() {
|
|
62
|
+
return _bank[key];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env":{
|
|
3
|
-
"browser":true,
|
|
4
|
-
"es6":true,
|
|
5
|
-
"jest":true
|
|
6
|
-
},
|
|
7
|
-
"parser":"babel-eslint",
|
|
8
|
-
"extends":[
|
|
9
|
-
"eslint:all",
|
|
10
|
-
"plugin:react/all",
|
|
11
|
-
"plugin:react-hooks/recommended"
|
|
12
|
-
],
|
|
13
|
-
"settings": {
|
|
14
|
-
"react": {
|
|
15
|
-
"pragma": "React",
|
|
16
|
-
"version": "16.12.0",
|
|
17
|
-
"flowVersion": "0.112.0"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"parserOptions":{
|
|
21
|
-
"ecmaVersion":2018,
|
|
22
|
-
"ecmaFeatures":{
|
|
23
|
-
"jsx":true,
|
|
24
|
-
"modules":true
|
|
25
|
-
},
|
|
26
|
-
"sourceType":"module"
|
|
27
|
-
},
|
|
28
|
-
"plugins":[
|
|
29
|
-
"react"
|
|
30
|
-
],
|
|
31
|
-
"rules":{
|
|
32
|
-
"react/require-optimization": 0,
|
|
33
|
-
"default-param-last": 0,
|
|
34
|
-
"react/jsx-props-no-spreading": 0,
|
|
35
|
-
"function-call-argument-newline": ["error", "consistent"],
|
|
36
|
-
|
|
37
|
-
"react/no-deprecated": 0,
|
|
38
|
-
"max-lines-per-function": ["error", { "max": 300 }],
|
|
39
|
-
|
|
40
|
-
"react/jsx-fragments": 0,
|
|
41
|
-
"react/state-in-constructor": 0,
|
|
42
|
-
"react/jsx-handler-names":0,
|
|
43
|
-
"no-confusing-arrow":0,
|
|
44
|
-
"max-statements":0,
|
|
45
|
-
"react/destructuring-assignment":0,
|
|
46
|
-
"react/no-unused-prop-types":0,
|
|
47
|
-
"react/require-default-props":0,
|
|
48
|
-
"react/jsx-sort-default-props":0,
|
|
49
|
-
"react/jsx-max-depth":0,
|
|
50
|
-
"prefer-promise-reject-errors":0,
|
|
51
|
-
"react/no-unused-state": 0,
|
|
52
|
-
"react/jsx-one-expression-per-line":0,
|
|
53
|
-
"react/jsx-no-literals":0,
|
|
54
|
-
"react/default-props-match-prop-types":0,
|
|
55
|
-
"padding-line-between-statements":[
|
|
56
|
-
"error",
|
|
57
|
-
{
|
|
58
|
-
"blankLine":"always",
|
|
59
|
-
"prev":[
|
|
60
|
-
"const",
|
|
61
|
-
"let",
|
|
62
|
-
"var"
|
|
63
|
-
],
|
|
64
|
-
"next":"*"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"blankLine":"any",
|
|
68
|
-
"prev":[
|
|
69
|
-
"const",
|
|
70
|
-
"let",
|
|
71
|
-
"var"
|
|
72
|
-
],
|
|
73
|
-
"next":[
|
|
74
|
-
"const",
|
|
75
|
-
"let",
|
|
76
|
-
"var"
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"react/forbid-component-props":0,
|
|
81
|
-
"react/no-multi-comp":0,
|
|
82
|
-
"react/no-set-state":0,
|
|
83
|
-
"react/jsx-closing-bracket-location":0,
|
|
84
|
-
"react/jsx-max-props-per-line":0,
|
|
85
|
-
"no-underscore-dangle":0,
|
|
86
|
-
"function-paren-newline":0,
|
|
87
|
-
"no-nested-ternary":0,
|
|
88
|
-
"max-params":[
|
|
89
|
-
"error",
|
|
90
|
-
5
|
|
91
|
-
],
|
|
92
|
-
"multiline-comment-style":0,
|
|
93
|
-
"lines-between-class-members":[
|
|
94
|
-
"error",
|
|
95
|
-
"always",
|
|
96
|
-
{
|
|
97
|
-
"exceptAfterSingleLine":true
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
"react/jsx-indent-props":0,
|
|
101
|
-
"react/jsx-indent":0,
|
|
102
|
-
"react/no-array-index-key":0,
|
|
103
|
-
"react/jsx-curly-brace-presence":[
|
|
104
|
-
2,
|
|
105
|
-
{
|
|
106
|
-
"props":"never",
|
|
107
|
-
"children":"ignore"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"react/sort-comp":[
|
|
111
|
-
2,
|
|
112
|
-
{
|
|
113
|
-
"order":[
|
|
114
|
-
"static-methods",
|
|
115
|
-
"lifecycle",
|
|
116
|
-
"render"
|
|
117
|
-
],
|
|
118
|
-
"groups":{
|
|
119
|
-
"lifecycle":[
|
|
120
|
-
"defaultProps",
|
|
121
|
-
"props",
|
|
122
|
-
"contextTypes",
|
|
123
|
-
"childContextTypes",
|
|
124
|
-
"statics",
|
|
125
|
-
"state",
|
|
126
|
-
"everything-else",
|
|
127
|
-
"constructor",
|
|
128
|
-
"getDefaultProps",
|
|
129
|
-
"getInitialState",
|
|
130
|
-
"getChildContext",
|
|
131
|
-
"componentWillMount",
|
|
132
|
-
"componentDidMount",
|
|
133
|
-
"componentWillReceiveProps",
|
|
134
|
-
"shouldComponentUpdate",
|
|
135
|
-
"componentWillUpdate",
|
|
136
|
-
"componentDidUpdate",
|
|
137
|
-
"componentWillUnmount"
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"new-cap":[
|
|
143
|
-
2,
|
|
144
|
-
{
|
|
145
|
-
"capIsNewExceptions":[
|
|
146
|
-
"List",
|
|
147
|
-
"Map",
|
|
148
|
-
"OrderedList",
|
|
149
|
-
"OrderedMap",
|
|
150
|
-
"OrderedSet",
|
|
151
|
-
"Record",
|
|
152
|
-
"Stack"
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"comma-dangle":[
|
|
157
|
-
"error",
|
|
158
|
-
"always-multiline"
|
|
159
|
-
],
|
|
160
|
-
"no-extra-parens":[
|
|
161
|
-
"off"
|
|
162
|
-
],
|
|
163
|
-
"no-magic-numbers":[
|
|
164
|
-
"error",
|
|
165
|
-
{
|
|
166
|
-
"ignore":[
|
|
167
|
-
0,
|
|
168
|
-
1,
|
|
169
|
-
2,
|
|
170
|
-
10
|
|
171
|
-
],
|
|
172
|
-
"ignoreArrayIndexes":true
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
"strict":[
|
|
176
|
-
"error",
|
|
177
|
-
"global"
|
|
178
|
-
],
|
|
179
|
-
"max-lines":[
|
|
180
|
-
2,
|
|
181
|
-
450
|
|
182
|
-
],
|
|
183
|
-
"max-len":[
|
|
184
|
-
"error",
|
|
185
|
-
105
|
|
186
|
-
],
|
|
187
|
-
"object-curly-spacing":[
|
|
188
|
-
"error",
|
|
189
|
-
"always"
|
|
190
|
-
],
|
|
191
|
-
"indent":[
|
|
192
|
-
"error",
|
|
193
|
-
2,
|
|
194
|
-
{
|
|
195
|
-
"SwitchCase":1
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
"linebreak-style":[
|
|
199
|
-
"error",
|
|
200
|
-
"windows"
|
|
201
|
-
],
|
|
202
|
-
"padded-blocks":[
|
|
203
|
-
"off"
|
|
204
|
-
],
|
|
205
|
-
"one-var":[
|
|
206
|
-
"off"
|
|
207
|
-
],
|
|
208
|
-
"no-ternary":[
|
|
209
|
-
"off"
|
|
210
|
-
],
|
|
211
|
-
"multiline-ternary":[
|
|
212
|
-
"off"
|
|
213
|
-
],
|
|
214
|
-
"quote-props":[
|
|
215
|
-
"error",
|
|
216
|
-
"consistent"
|
|
217
|
-
],
|
|
218
|
-
"object-curly-newline":[
|
|
219
|
-
"off"
|
|
220
|
-
],
|
|
221
|
-
"quotes":[
|
|
222
|
-
"error",
|
|
223
|
-
"double",
|
|
224
|
-
"avoid-escape"
|
|
225
|
-
],
|
|
226
|
-
"semi":[
|
|
227
|
-
"error"
|
|
228
|
-
],
|
|
229
|
-
"sort-vars":[
|
|
230
|
-
"off"
|
|
231
|
-
],
|
|
232
|
-
"sort-keys":[
|
|
233
|
-
"off"
|
|
234
|
-
],
|
|
235
|
-
"sort-imports":[
|
|
236
|
-
"off"
|
|
237
|
-
],
|
|
238
|
-
"capitalized-comments":[
|
|
239
|
-
"off"
|
|
240
|
-
],
|
|
241
|
-
"arrow-body-style":[
|
|
242
|
-
"error",
|
|
243
|
-
"as-needed"
|
|
244
|
-
],
|
|
245
|
-
"arrow-parens":[
|
|
246
|
-
"error",
|
|
247
|
-
"always"
|
|
248
|
-
],
|
|
249
|
-
"class-methods-use-this":[
|
|
250
|
-
"error",
|
|
251
|
-
{
|
|
252
|
-
"exceptMethods":[
|
|
253
|
-
"componentDidMount",
|
|
254
|
-
"componentDidUpdate",
|
|
255
|
-
"componentWillMount",
|
|
256
|
-
"componentWillReceiveProps",
|
|
257
|
-
"componentWillUnmount",
|
|
258
|
-
"componentWillUpdate",
|
|
259
|
-
"render",
|
|
260
|
-
"shouldComponentUpdate"
|
|
261
|
-
]
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"key-spacing":[
|
|
265
|
-
"error",
|
|
266
|
-
{
|
|
267
|
-
"align":{
|
|
268
|
-
"beforeColon":true,
|
|
269
|
-
"afterColon":true,
|
|
270
|
-
"on":"colon"
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
|
-
}
|
|
275
|
-
}
|
package/.flowconfig
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
[ignore]
|
|
2
|
-
.*/node_modules/fbjs/.*
|
|
3
|
-
.*/node_modules/config-chain/test/broken.json
|
|
4
|
-
.*/node_modules/npmconf/test/.*
|
|
5
|
-
.*/node_modules/npm/test/.*
|
|
6
|
-
[untyped]
|
|
7
|
-
.*/node_modules/react-select/.*
|
|
8
|
-
[include]
|
|
9
|
-
[libs]
|
|
10
|
-
src/types
|
|
11
|
-
[options]
|
|
12
|
-
emoji=true
|
|
13
|
-
esproposal.class_static_fields=enable
|
|
14
|
-
module.file_ext=.css
|
|
15
|
-
module.file_ext=.js
|
|
16
|
-
module.file_ext=.json
|
|
17
|
-
module.file_ext=.jsx
|
|
18
|
-
module.file_ext=.scss
|
|
19
|
-
module.ignore_non_literal_requires=true
|
|
20
|
-
suppress_type=$FlowIssue
|
|
21
|
-
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
|
|
22
|
-
suppress_type=$Intl
|
|
23
|
-
module.name_mapper='^src\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
|
package/conf/dev.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
/* eslint-disable no-console, no-undefined */
|
|
3
|
-
|
|
4
|
-
const fileName = "config.json";
|
|
5
|
-
|
|
6
|
-
const fs = require("fs");
|
|
7
|
-
|
|
8
|
-
const file = require(`../${fileName}`);
|
|
9
|
-
|
|
10
|
-
file.isProduction = false;
|
|
11
|
-
|
|
12
|
-
fs.writeFile(fileName, JSON.stringify(file, null, 2), (err) => {
|
|
13
|
-
|
|
14
|
-
if (err) {
|
|
15
|
-
return console.log(err);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return undefined;
|
|
19
|
-
});
|
package/conf/dist.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
/* eslint-disable no-console, no-undefined */
|
|
3
|
-
|
|
4
|
-
const fileName = "config.json";
|
|
5
|
-
|
|
6
|
-
const fs = require("fs");
|
|
7
|
-
|
|
8
|
-
const file = require(`../${fileName}`);
|
|
9
|
-
|
|
10
|
-
file.isProduction = true;
|
|
11
|
-
|
|
12
|
-
fs.writeFile(fileName, JSON.stringify(file, null, 2), (err) => {
|
|
13
|
-
|
|
14
|
-
if (err) {
|
|
15
|
-
return console.log(err);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return undefined;
|
|
19
|
-
});
|
package/src/Account/Load.jsx
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
/* eslint-disable react/require-optimization */
|
|
3
|
-
|
|
4
|
-
import type { Dispatch, State } from "src\\types";
|
|
5
|
-
|
|
6
|
-
type PropTypes = {
|
|
7
|
-
+appName: string;
|
|
8
|
-
+isFetching: bool;
|
|
9
|
-
+hasError: bool;
|
|
10
|
-
+data: any;
|
|
11
|
-
+children: any;
|
|
12
|
-
+shouldFetch: any;
|
|
13
|
-
|
|
14
|
-
+fetchInitialInformation: () => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
import React from "react";
|
|
18
|
-
|
|
19
|
-
import { connect } from "react-redux";
|
|
20
|
-
|
|
21
|
-
import { selectors } from "./reducer";
|
|
22
|
-
|
|
23
|
-
import { fetchInitialInformation as fetchInitialInformationAction } from "./actions";
|
|
24
|
-
|
|
25
|
-
import { LargeErrorMessage, LoadingMessage } from "../Messages";
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
mapStateToProps = (state : State) => ({
|
|
29
|
-
data : selectors.getCurrentAccount(state),
|
|
30
|
-
hasError : selectors.getCurrentAccountHasError(state),
|
|
31
|
-
fetched : selectors.getCurrentAccountIsFetched(state),
|
|
32
|
-
isFetching : selectors.getCurrentAccountIsFetching(state),
|
|
33
|
-
shouldFetch : selectors.getCurrentAccountShouldFetch(state),
|
|
34
|
-
}),
|
|
35
|
-
mapDispatchToProps = (dispatch : Dispatch, { appName }) => ({
|
|
36
|
-
fetchInitialInformation () {
|
|
37
|
-
setTimeout(() => {
|
|
38
|
-
dispatch(fetchInitialInformationAction(appName));
|
|
39
|
-
});
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const LoadAccount = (props : PropTypes) => {
|
|
44
|
-
const { children, data, isFetching, shouldFetch, hasError, fetchInitialInformation } = props;
|
|
45
|
-
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
if (shouldFetch) {
|
|
48
|
-
fetchInitialInformation();
|
|
49
|
-
}
|
|
50
|
-
}, [
|
|
51
|
-
shouldFetch,
|
|
52
|
-
isFetching,
|
|
53
|
-
hasError,
|
|
54
|
-
]);
|
|
55
|
-
|
|
56
|
-
if (isFetching) {
|
|
57
|
-
return (
|
|
58
|
-
<LoadingMessage message="Așteaptă..." />
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (hasError) {
|
|
63
|
-
return (
|
|
64
|
-
<LargeErrorMessage
|
|
65
|
-
message="Nu am putut stabili conexiunea cu server-ul"
|
|
66
|
-
onRetry={fetchInitialInformation}
|
|
67
|
-
/>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (data.size === 0) {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return children;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export default connect(mapStateToProps,
|
|
79
|
-
mapDispatchToProps)(LoadAccount);
|
package/src/Account/actions.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import type { Action } from "src\\types";
|
|
4
|
-
|
|
5
|
-
import { fetchInitialInformation as fetchInitialInformationRequest } from "./request";
|
|
6
|
-
|
|
7
|
-
export const fetchInitialInformation = (appName : string) : Action => ({
|
|
8
|
-
type : "FETCH_INITIAL_INFORMATION",
|
|
9
|
-
payload : fetchInitialInformationRequest(appName),
|
|
10
|
-
});
|