x25 17.0.9 → 17.0.13
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 +3 -5
- package/Async/InitModule.js +1 -7
- package/Async/RouteLoading.js +4 -6
- package/Async/index.js +2 -4
- package/Company/Load.js +3 -5
- package/Header/AccountOptionsContainer.js +4 -6
- package/Header/AdminSelectCompany.js +1 -5
- package/Header/ClientSelectCompany.js +2 -4
- package/Header/Header.js +5 -7
- package/Header/LogoutButton.js +3 -5
- package/Header/util.js +3 -5
- package/Inputs/Business/BankAccount.js +2 -4
- package/Inputs/Business/BankName.js +3 -5
- package/Inputs/Business/CifField.js +4 -6
- package/Inputs/Business/CifFieldContainer.js +2 -6
- package/Inputs/Business/NidField.js +3 -5
- package/Inputs/CaptchaBox.js +5 -7
- package/Inputs/DateInput.js +1 -5
- package/Inputs/DateTemplate.js +1 -5
- package/Inputs/Selects/County.js +2 -4
- package/Inputs/Selects/Simple.js +2 -4
- package/Messages/Error.js +4 -6
- package/Messages/Loading.js +2 -4
- package/Modal/Delete.js +3 -5
- package/dev/ErrorBoundary.js +2 -4
- package/dev/index.js +2 -6
- package/package.json +1 -1
- package/prod/SentryErrorBoundary.js +7 -9
- package/utility/index.js +12 -0
- package/utility/normalize.js +2 -6
- package/utility/others.js +4 -58
- package/utility/validation/common.js +16 -20
- package/utility/validation/index.js +2 -6
- package/utility/words.js +172 -0
- package/utility/language.js +0 -20
- package/words.js +0 -122
package/Modal/Delete.js
CHANGED
|
@@ -14,9 +14,7 @@ var _reactRedux = require("react-redux");
|
|
|
14
14
|
|
|
15
15
|
var _reactstrap = require("reactstrap");
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var _words2 = _interopRequireDefault(_words);
|
|
17
|
+
var _utility = require("../utility");
|
|
20
18
|
|
|
21
19
|
var _actions = require("./actions");
|
|
22
20
|
|
|
@@ -37,8 +35,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
37
35
|
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; }
|
|
38
36
|
/* eslint-disable handle-callback-err, react/forbid-component-props, no-console */
|
|
39
37
|
|
|
40
|
-
var languageMessage =
|
|
41
|
-
label =
|
|
38
|
+
var languageMessage = _utility.words.message,
|
|
39
|
+
label = _utility.words.label;
|
|
42
40
|
|
|
43
41
|
|
|
44
42
|
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
package/dev/ErrorBoundary.js
CHANGED
|
@@ -14,9 +14,7 @@ var _TheError = require("./TheError");
|
|
|
14
14
|
|
|
15
15
|
var _TheError2 = _interopRequireDefault(_TheError);
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var _words2 = _interopRequireDefault(_words);
|
|
17
|
+
var _utility = require("../utility");
|
|
20
18
|
|
|
21
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
20
|
|
|
@@ -61,7 +59,7 @@ var ErrorBoundary = function (_React$Component) {
|
|
|
61
59
|
|
|
62
60
|
_this.refresh = function () {
|
|
63
61
|
_this.setState({
|
|
64
|
-
status:
|
|
62
|
+
status: _utility.words.TryingToRecover,
|
|
65
63
|
error: null,
|
|
66
64
|
info: null
|
|
67
65
|
}, function () {
|
package/dev/index.js
CHANGED
|
@@ -12,11 +12,7 @@ var _immutable = require("immutable");
|
|
|
12
12
|
|
|
13
13
|
var Immutable = _interopRequireWildcard(_immutable);
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var _words2 = _interopRequireDefault(_words);
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
var _utility = require("../utility");
|
|
20
16
|
|
|
21
17
|
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; } }
|
|
22
18
|
|
|
@@ -63,7 +59,7 @@ var ensureImmutableState = function ensureImmutableState() {
|
|
|
63
59
|
}
|
|
64
60
|
};
|
|
65
61
|
|
|
66
|
-
alert(
|
|
62
|
+
alert(_utility.words.SomethingIsNotImmutable);
|
|
67
63
|
|
|
68
64
|
currentKey.map(function (current) {
|
|
69
65
|
return log(problems.get(current));
|
package/package.json
CHANGED
|
@@ -14,9 +14,7 @@ var _react = require("react");
|
|
|
14
14
|
|
|
15
15
|
var _react2 = _interopRequireDefault(_react);
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var _words2 = _interopRequireDefault(_words);
|
|
17
|
+
var _utility = require("../utility");
|
|
20
18
|
|
|
21
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
20
|
|
|
@@ -55,7 +53,7 @@ var ErrorBoundary = function (_React$Component) {
|
|
|
55
53
|
};
|
|
56
54
|
|
|
57
55
|
_this.tellUs = function () {
|
|
58
|
-
return Sentry.showReportDialog(
|
|
56
|
+
return Sentry.showReportDialog(_utility.words.Sentry.TellUs);
|
|
59
57
|
};
|
|
60
58
|
return _this;
|
|
61
59
|
}
|
|
@@ -71,31 +69,31 @@ var ErrorBoundary = function (_React$Component) {
|
|
|
71
69
|
_react2.default.createElement(
|
|
72
70
|
"h1",
|
|
73
71
|
{ className: "display-4" },
|
|
74
|
-
|
|
72
|
+
_utility.words.Sentry.TellUs.title
|
|
75
73
|
),
|
|
76
74
|
_react2.default.createElement(
|
|
77
75
|
"p",
|
|
78
76
|
{ className: "lead" },
|
|
79
|
-
|
|
77
|
+
_utility.words.Sentry.Message
|
|
80
78
|
),
|
|
81
79
|
_react2.default.createElement("hr", { className: "my-4" }),
|
|
82
80
|
_react2.default.createElement(
|
|
83
81
|
"p",
|
|
84
82
|
null,
|
|
85
|
-
|
|
83
|
+
_utility.words.Sentry.TellUs.subtitle2,
|
|
86
84
|
_react2.default.createElement(
|
|
87
85
|
"button",
|
|
88
86
|
{
|
|
89
87
|
className: "btn btn-primary text-link",
|
|
90
88
|
onClick: this.tellUs, type: "button" },
|
|
91
|
-
|
|
89
|
+
_utility.words.Sentry.Button
|
|
92
90
|
)
|
|
93
91
|
),
|
|
94
92
|
_react2.default.createElement("hr", null),
|
|
95
93
|
_react2.default.createElement(
|
|
96
94
|
"p",
|
|
97
95
|
null,
|
|
98
|
-
|
|
96
|
+
_utility.words.Sentry.Hint,
|
|
99
97
|
_react2.default.createElement(
|
|
100
98
|
"ul",
|
|
101
99
|
null,
|
package/utility/index.js
CHANGED
|
@@ -110,4 +110,16 @@ Object.keys(_validation).forEach(function (key) {
|
|
|
110
110
|
return _validation[key];
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
var _words = require("./words");
|
|
116
|
+
|
|
117
|
+
Object.keys(_words).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
Object.defineProperty(exports, key, {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function get() {
|
|
122
|
+
return _words[key];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
113
125
|
});
|
package/utility/normalize.js
CHANGED
|
@@ -9,11 +9,7 @@ var _immutable = require("immutable");
|
|
|
9
9
|
|
|
10
10
|
var Immutable = _interopRequireWildcard(_immutable);
|
|
11
11
|
|
|
12
|
-
var _words = require("
|
|
13
|
-
|
|
14
|
-
var _words2 = _interopRequireDefault(_words);
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _words = require("./words");
|
|
17
13
|
|
|
18
14
|
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; } }
|
|
19
15
|
|
|
@@ -56,7 +52,7 @@ var withPromiseCallback = exports.withPromiseCallback = function withPromiseCall
|
|
|
56
52
|
document.location.href = "/";
|
|
57
53
|
} else {
|
|
58
54
|
// error.message
|
|
59
|
-
reject({ error:
|
|
55
|
+
reject({ error: _words.words.ThereWasAProblem });
|
|
60
56
|
}
|
|
61
57
|
} else {
|
|
62
58
|
resolve(response.body);
|
package/utility/others.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.userHasPressedCKeyAlone = exports.showCheck = exports.delay = exports.ReduxFormSubmissionError = exports.addID = exports.removeID = exports.nothingFetched = exports.rowsPerLoad = exports.noError = exports.createModal = exports.isAdministratorAccount = exports.getDateSortNumber = undefined;
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
@@ -11,9 +11,7 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
11
11
|
|
|
12
12
|
var _immutable = require("redux-form/immutable");
|
|
13
13
|
|
|
14
|
-
var _words = require("
|
|
15
|
-
|
|
16
|
-
var _words2 = _interopRequireDefault(_words);
|
|
14
|
+
var _words = require("./words");
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
@@ -62,7 +60,7 @@ var ReduxFormSubmissionError = exports.ReduxFormSubmissionError = function Redux
|
|
|
62
60
|
throw error;
|
|
63
61
|
}
|
|
64
62
|
|
|
65
|
-
var _error = typeof error.error === "string" ? error.error :
|
|
63
|
+
var _error = typeof error.error === "string" ? error.error : _words.words.ThereWasAProblem;
|
|
66
64
|
|
|
67
65
|
throw new _immutable.SubmissionError({
|
|
68
66
|
_error: _error
|
|
@@ -91,56 +89,4 @@ var userHasPressedCKeyAlone = exports.userHasPressedCKeyAlone = function userHas
|
|
|
91
89
|
isNotInputOrTextarea = tag !== "input" && tag !== "textarea";
|
|
92
90
|
|
|
93
91
|
return !ctrlKey && keyCode === createInvoiceKey && isNotInputOrTextarea;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
var years = exports.years = [{
|
|
97
|
-
value: 2018,
|
|
98
|
-
name: "2018"
|
|
99
|
-
}, {
|
|
100
|
-
value: 2019,
|
|
101
|
-
name: "2019"
|
|
102
|
-
}, {
|
|
103
|
-
value: 2020,
|
|
104
|
-
name: "2020"
|
|
105
|
-
}, {
|
|
106
|
-
value: 2021,
|
|
107
|
-
name: "2021"
|
|
108
|
-
}];
|
|
109
|
-
|
|
110
|
-
var months = exports.months = [{
|
|
111
|
-
value: 0,
|
|
112
|
-
name: _words2.default.Month[0]
|
|
113
|
-
}, {
|
|
114
|
-
value: 1,
|
|
115
|
-
name: _words2.default.Month[1]
|
|
116
|
-
}, {
|
|
117
|
-
value: 2,
|
|
118
|
-
name: _words2.default.Month[2]
|
|
119
|
-
}, {
|
|
120
|
-
value: 3,
|
|
121
|
-
name: _words2.default.Month[3]
|
|
122
|
-
}, {
|
|
123
|
-
value: 4,
|
|
124
|
-
name: _words2.default.Month[4]
|
|
125
|
-
}, {
|
|
126
|
-
value: 5,
|
|
127
|
-
name: _words2.default.Month[5]
|
|
128
|
-
}, {
|
|
129
|
-
value: 6,
|
|
130
|
-
name: _words2.default.Month[6]
|
|
131
|
-
}, {
|
|
132
|
-
value: 7,
|
|
133
|
-
name: _words2.default.Month[7]
|
|
134
|
-
}, {
|
|
135
|
-
value: 8,
|
|
136
|
-
name: _words2.default.Month[8]
|
|
137
|
-
}, {
|
|
138
|
-
value: 9,
|
|
139
|
-
name: _words2.default.Month[9]
|
|
140
|
-
}, {
|
|
141
|
-
value: 10,
|
|
142
|
-
name: _words2.default.Month[10]
|
|
143
|
-
}, {
|
|
144
|
-
value: 11,
|
|
145
|
-
name: _words2.default.Month[11]
|
|
146
|
-
}];
|
|
92
|
+
};
|
|
@@ -11,11 +11,7 @@ var _templateObject = _taggedTemplateLiteral([" ", " ", ""], [" ", " ", ""]);
|
|
|
11
11
|
|
|
12
12
|
var _validate = require("./validate");
|
|
13
13
|
|
|
14
|
-
var _words = require("
|
|
15
|
-
|
|
16
|
-
var _words2 = _interopRequireDefault(_words);
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
var _words = require("../words");
|
|
19
15
|
|
|
20
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; }
|
|
21
17
|
|
|
@@ -30,7 +26,7 @@ var validateHumanNid = exports.validateHumanNid = function validateHumanNid() {
|
|
|
30
26
|
var optional = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
31
27
|
return function (value) {
|
|
32
28
|
var notValid = optional && typeof value !== "undefined" && value !== "" && !(0, _validate.isValidCNP)(value) || !optional && (typeof value === "undefined" || !(0, _validate.isValidCNP)(value)),
|
|
33
|
-
error = notValid ?
|
|
29
|
+
error = notValid ? _words.words.EnterValidPersonalID : null;
|
|
34
30
|
|
|
35
31
|
return {
|
|
36
32
|
notValid: notValid,
|
|
@@ -41,7 +37,7 @@ var validateHumanNid = exports.validateHumanNid = function validateHumanNid() {
|
|
|
41
37
|
|
|
42
38
|
var validateCif = exports.validateCif = function validateCif(value) {
|
|
43
39
|
var notValid = typeof value === "undefined" || !(0, _validate.isValidCIF)(value),
|
|
44
|
-
error = notValid ?
|
|
40
|
+
error = notValid ? _words.words.EnterAValidFiscalID : null;
|
|
45
41
|
|
|
46
42
|
return {
|
|
47
43
|
notValid: notValid,
|
|
@@ -51,7 +47,7 @@ var validateCif = exports.validateCif = function validateCif(value) {
|
|
|
51
47
|
|
|
52
48
|
var validateBankAccount = exports.validateBankAccount = function validateBankAccount(value) {
|
|
53
49
|
var notValid = typeof value !== "undefined" && value !== "" && !(0, _validate.isValidBankAccount)(value),
|
|
54
|
-
error = notValid ?
|
|
50
|
+
error = notValid ? _words.words.EnterValidBankAccount : null;
|
|
55
51
|
|
|
56
52
|
return {
|
|
57
53
|
notValid: notValid,
|
|
@@ -63,7 +59,7 @@ var validateEmail = exports.validateEmail = function validateEmail(_ref) {
|
|
|
63
59
|
var optional = _ref.optional;
|
|
64
60
|
return function (value) {
|
|
65
61
|
var notValid = optional && typeof value !== "undefined" && value !== "" && !(0, _validate.isValidEmail)(value) || !optional && (typeof value === "undefined" || !(0, _validate.isValidEmail)(value)),
|
|
66
|
-
error = notValid ?
|
|
62
|
+
error = notValid ? _words.words.EnterValidEmail : null;
|
|
67
63
|
|
|
68
64
|
return {
|
|
69
65
|
notValid: notValid,
|
|
@@ -74,7 +70,7 @@ var validateEmail = exports.validateEmail = function validateEmail(_ref) {
|
|
|
74
70
|
|
|
75
71
|
var validateOptionalDate = exports.validateOptionalDate = function validateOptionalDate(value) {
|
|
76
72
|
var notValid = !(typeof value === "undefined" || value === "" || value === null || (0, _validate.isValidDateStamp)(value)),
|
|
77
|
-
error = notValid ?
|
|
73
|
+
error = notValid ? _words.words.EnterValidDate : null;
|
|
78
74
|
|
|
79
75
|
return {
|
|
80
76
|
notValid: notValid,
|
|
@@ -84,7 +80,7 @@ var validateOptionalDate = exports.validateOptionalDate = function validateOptio
|
|
|
84
80
|
|
|
85
81
|
var validateDate = exports.validateDate = function validateDate(value) {
|
|
86
82
|
var notValid = !(typeof value !== "undefined" && (0, _validate.isValidDateStamp)(value)),
|
|
87
|
-
error = notValid ?
|
|
83
|
+
error = notValid ? _words.words.EnterValidDate : null;
|
|
88
84
|
|
|
89
85
|
return {
|
|
90
86
|
notValid: notValid,
|
|
@@ -121,9 +117,9 @@ var getNumberRangeError = function getNumberRangeError(_ref3) {
|
|
|
121
117
|
|
|
122
118
|
var minTense = typeof min === "number" ? getNumberTense(min) : "",
|
|
123
119
|
maxTense = typeof max === "number" ? getNumberTense(max) : "",
|
|
124
|
-
range = typeof min === "number" && typeof max === "number" ? " " +
|
|
120
|
+
range = typeof min === "number" && typeof max === "number" ? " " + _words.words.NumberBetween + " " + minTense + " " + _words.words.NumberAnd + " " + maxTense : typeof max === "number" ? " " + _words.words.NumberUpTo + " " + maxTense : typeof min === "number" ? " " + _words.words.NumberGreaterThan + " " + minTense : "";
|
|
125
121
|
|
|
126
|
-
return
|
|
122
|
+
return _words.words.NumberMustBe(_templateObject, integer ? _words.words.NumberInteger : _words.words.NumberFloat, range);
|
|
127
123
|
};
|
|
128
124
|
|
|
129
125
|
var validateFloat = exports.validateFloat = function validateFloat(props) {
|
|
@@ -168,9 +164,9 @@ var getStringTense = function getStringTense(_ref4) {
|
|
|
168
164
|
var maxTense = max ? getNumberTense(max) : "",
|
|
169
165
|
minTense = min ? getNumberTense(min) : "",
|
|
170
166
|
isBetween = typeof max === "number" && typeof min === "number",
|
|
171
|
-
rangeError = isBetween ?
|
|
167
|
+
rangeError = isBetween ? _words.words.NumberBetween + " " + minTense + " " + _words.words.NumberAnd + " " + maxTense : typeof max === "number" ? _words.words.NumberUpTo + " " + maxTense : typeof min === "number" ? _words.words.NumberGreaterThan + " " + minTense : "";
|
|
172
168
|
|
|
173
|
-
return what + " " +
|
|
169
|
+
return what + " " + _words.words.Has + " " + rangeError + " " + _words.words.Chars;
|
|
174
170
|
};
|
|
175
171
|
|
|
176
172
|
var validateStringRange = function validateStringRange(_ref5) {
|
|
@@ -192,7 +188,7 @@ var validateStringRange = function validateStringRange(_ref5) {
|
|
|
192
188
|
var validateString = exports.validateString = function validateString(props) {
|
|
193
189
|
return function (value) {
|
|
194
190
|
var _props$what = props.what,
|
|
195
|
-
what = _props$what === undefined ?
|
|
191
|
+
what = _props$what === undefined ? _words.words.TheField : _props$what,
|
|
196
192
|
min = props.min,
|
|
197
193
|
max = props.max,
|
|
198
194
|
optional = props.optional;
|
|
@@ -224,7 +220,7 @@ var validateString = exports.validateString = function validateString(props) {
|
|
|
224
220
|
var validateSelect = exports.validateSelect = function validateSelect(message) {
|
|
225
221
|
return function (value) {
|
|
226
222
|
var notValid = typeof value === "undefined" || value === null || value === "",
|
|
227
|
-
error = notValid ? typeof message === "undefined" ?
|
|
223
|
+
error = notValid ? typeof message === "undefined" ? _words.words.PleaseSelect : message : null;
|
|
228
224
|
|
|
229
225
|
return {
|
|
230
226
|
notValid: notValid,
|
|
@@ -236,7 +232,7 @@ var validateSelect = exports.validateSelect = function validateSelect(message) {
|
|
|
236
232
|
var validateID = exports.validateID = function validateID(message) {
|
|
237
233
|
return function (value) {
|
|
238
234
|
var notValid = !(typeof value === "number" && !isNaN(value)),
|
|
239
|
-
error = notValid ? typeof message === "undefined" ?
|
|
235
|
+
error = notValid ? typeof message === "undefined" ? _words.words.PleaseSelect : message : null;
|
|
240
236
|
|
|
241
237
|
return {
|
|
242
238
|
notValid: notValid,
|
|
@@ -248,7 +244,7 @@ var validateID = exports.validateID = function validateID(message) {
|
|
|
248
244
|
var validateCaptchaSolution = exports.validateCaptchaSolution = function validateCaptchaSolution(value) {
|
|
249
245
|
var pattern = /^[0-9]{6}$/,
|
|
250
246
|
notValid = typeof value !== "undefined" && !pattern.test(value),
|
|
251
|
-
error = notValid ?
|
|
247
|
+
error = notValid ? _words.words.Has6Digits : null;
|
|
252
248
|
|
|
253
249
|
return {
|
|
254
250
|
notValid: notValid,
|
|
@@ -259,7 +255,7 @@ var validateCaptchaSolution = exports.validateCaptchaSolution = function validat
|
|
|
259
255
|
var validateResetToken = exports.validateResetToken = function validateResetToken(value) {
|
|
260
256
|
var tokenSize = 64,
|
|
261
257
|
notValid = typeof value === "undefined" || String(value).length !== tokenSize,
|
|
262
|
-
error = notValid ?
|
|
258
|
+
error = notValid ? _words.words.CodeNotValid : null;
|
|
263
259
|
|
|
264
260
|
return {
|
|
265
261
|
notValid: notValid,
|
|
@@ -41,11 +41,7 @@ Object.keys(_validate).forEach(function (key) {
|
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
var _words = require("
|
|
45
|
-
|
|
46
|
-
var _words2 = _interopRequireDefault(_words);
|
|
47
|
-
|
|
48
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
44
|
+
var _words = require("../words");
|
|
49
45
|
|
|
50
46
|
var processErrors = function processErrors(_ref, _ref2) {
|
|
51
47
|
var error = _ref.error,
|
|
@@ -96,7 +92,7 @@ var performValidateRows = exports.performValidateRows = function performValidate
|
|
|
96
92
|
if (notValid) {
|
|
97
93
|
return {
|
|
98
94
|
notValid: notValid,
|
|
99
|
-
_error:
|
|
95
|
+
_error: _words.words.AddARow,
|
|
100
96
|
isArray: true
|
|
101
97
|
};
|
|
102
98
|
}
|
package/utility/words.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var DateFormat = exports.DateFormat = "DD.MM.YEAR",
|
|
7
|
+
words = exports.words = {
|
|
8
|
+
PleaseWait: "Please wait...",
|
|
9
|
+
TryAgain: "Try again",
|
|
10
|
+
LoadingData: "Loading data...",
|
|
11
|
+
ThereWasAProblem: "There was a problem. Try again",
|
|
12
|
+
|
|
13
|
+
NoErrorPassed: "No ErrorBoundary passed to x25",
|
|
14
|
+
ItLoadsSlower: "It seems that it loads slower than usual. Please wait... ",
|
|
15
|
+
|
|
16
|
+
TryingToRecover: "Trying to recover...",
|
|
17
|
+
|
|
18
|
+
SomethingIsNotImmutable: "Something is not immutable. check console",
|
|
19
|
+
|
|
20
|
+
// header
|
|
21
|
+
ConnectionLost: "I lost the connection to server. Try again.",
|
|
22
|
+
Options: "Options",
|
|
23
|
+
TermsAndConditions: "Terms and conditions",
|
|
24
|
+
PrivacyPolicy: "Privacy Policy",
|
|
25
|
+
SelectCompany: "Select company",
|
|
26
|
+
Toggle: "Toggle",
|
|
27
|
+
Settings: "Settings",
|
|
28
|
+
RenewSubscription: "Renew subscription",
|
|
29
|
+
TheSubscriptionWillExpireIn: "The subscription will expire in",
|
|
30
|
+
SignOut: "Sing out",
|
|
31
|
+
NoOptions: "No options",
|
|
32
|
+
|
|
33
|
+
// inputs
|
|
34
|
+
BankAccount: "Bank Account",
|
|
35
|
+
BankName: "Bank Name",
|
|
36
|
+
FiscalID: "Fiscal ID",
|
|
37
|
+
GetDataFromInternet: "Getting the data from the Internet",
|
|
38
|
+
EnterAValidFiscalID: "Please type a valid fiscal ID",
|
|
39
|
+
PersonalID: "Personal ID",
|
|
40
|
+
County: "County",
|
|
41
|
+
Select: "Select",
|
|
42
|
+
|
|
43
|
+
CaptchaDescription: "The purpose of this check is to distinguish a person from a robot. \n This code usually appears when a feature in the application is overused",
|
|
44
|
+
|
|
45
|
+
CaptchaTypeNumbers: "Type numbers from the image below",
|
|
46
|
+
CaptchaVerify: "Verification",
|
|
47
|
+
DateFormat: DateFormat,
|
|
48
|
+
|
|
49
|
+
ErrorNeverExisted: "It may have been deleted or never existed",
|
|
50
|
+
ErrorConnection: "There seems to be a problem with your server or your internet connection\n has been interrupted.",
|
|
51
|
+
|
|
52
|
+
Sentry: {
|
|
53
|
+
TellUs: {
|
|
54
|
+
title: "It seems we have a problem",
|
|
55
|
+
subtitle: "Our team has been announced.",
|
|
56
|
+
subtitle2: "If you want to help us, tell us what happened below.\n It will help us a lot",
|
|
57
|
+
labelName: "Your name",
|
|
58
|
+
labelEmail: "Email",
|
|
59
|
+
labelComments: "What happened?",
|
|
60
|
+
labelClose: "Close",
|
|
61
|
+
labelSubmit: "Send",
|
|
62
|
+
errorGeneric: "An unknown error occurred while sending the report\n Please try again",
|
|
63
|
+
errorFormEntry: "Some fields were invalid. Please correct the errors and try again.",
|
|
64
|
+
successMessage: "Your feedback has been sent. Thanks!"
|
|
65
|
+
},
|
|
66
|
+
Message: "This message appears when the program failed and failed\n to recover. The administrator has been automatically notified about\n this problem. All we have to do is apologize.",
|
|
67
|
+
Button: "Tell us",
|
|
68
|
+
Hint: "Tip: Try refreshing the page - press the key"
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
// validation
|
|
72
|
+
PleaseSelect: "Please select",
|
|
73
|
+
EnterValidPersonalID: "Type a valid personal ID",
|
|
74
|
+
EnterValidFiscalID: "Type a valid fiscal ID",
|
|
75
|
+
EnterValidBankAccount: "Type a valid bank account",
|
|
76
|
+
EnterValidEmail: "Type a valid email",
|
|
77
|
+
EnterValidDate: "Type a valid date (" + DateFormat + ")",
|
|
78
|
+
NumberBetween: "between",
|
|
79
|
+
NumberAnd: "and",
|
|
80
|
+
NumberUpTo: "up to",
|
|
81
|
+
NumberGreaterThan: "grater than",
|
|
82
|
+
NumberMustBe: "Must be a number",
|
|
83
|
+
NumberInteger: "integer",
|
|
84
|
+
NumberFloat: "float",
|
|
85
|
+
Chars: "chars",
|
|
86
|
+
Has: "has",
|
|
87
|
+
TheField: "The field",
|
|
88
|
+
Has6Digits: "The code has 6 digits",
|
|
89
|
+
CodeNotValid: "The code is not valid",
|
|
90
|
+
AddARow: "Add at least a row",
|
|
91
|
+
|
|
92
|
+
message: {
|
|
93
|
+
failPerform: "Could not perform task",
|
|
94
|
+
confirmDelete: "I deleted successfully",
|
|
95
|
+
confirmAdd: "Successfully added",
|
|
96
|
+
confirmUpdate: "Updated data"
|
|
97
|
+
},
|
|
98
|
+
label: {
|
|
99
|
+
modify: "Modify",
|
|
100
|
+
add: "Add",
|
|
101
|
+
remove: "Delete",
|
|
102
|
+
confirmation: "Confirm",
|
|
103
|
+
cancel: "Cancel"
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
Month: {
|
|
107
|
+
0: "January",
|
|
108
|
+
1: "February",
|
|
109
|
+
2: "March",
|
|
110
|
+
3: "April",
|
|
111
|
+
4: "May",
|
|
112
|
+
5: "June",
|
|
113
|
+
6: "July",
|
|
114
|
+
7: "August",
|
|
115
|
+
8: "September",
|
|
116
|
+
9: "October",
|
|
117
|
+
10: "November",
|
|
118
|
+
11: "December"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var years = exports.years = [{
|
|
123
|
+
value: 2018,
|
|
124
|
+
name: "2018"
|
|
125
|
+
}, {
|
|
126
|
+
value: 2019,
|
|
127
|
+
name: "2019"
|
|
128
|
+
}, {
|
|
129
|
+
value: 2020,
|
|
130
|
+
name: "2020"
|
|
131
|
+
}, {
|
|
132
|
+
value: 2021,
|
|
133
|
+
name: "2021"
|
|
134
|
+
}];
|
|
135
|
+
|
|
136
|
+
var months = exports.months = [{
|
|
137
|
+
value: 0,
|
|
138
|
+
name: words.Month[0]
|
|
139
|
+
}, {
|
|
140
|
+
value: 1,
|
|
141
|
+
name: words.Month[1]
|
|
142
|
+
}, {
|
|
143
|
+
value: 2,
|
|
144
|
+
name: words.Month[2]
|
|
145
|
+
}, {
|
|
146
|
+
value: 3,
|
|
147
|
+
name: words.Month[3]
|
|
148
|
+
}, {
|
|
149
|
+
value: 4,
|
|
150
|
+
name: words.Month[4]
|
|
151
|
+
}, {
|
|
152
|
+
value: 5,
|
|
153
|
+
name: words.Month[5]
|
|
154
|
+
}, {
|
|
155
|
+
value: 6,
|
|
156
|
+
name: words.Month[6]
|
|
157
|
+
}, {
|
|
158
|
+
value: 7,
|
|
159
|
+
name: words.Month[7]
|
|
160
|
+
}, {
|
|
161
|
+
value: 8,
|
|
162
|
+
name: words.Month[8]
|
|
163
|
+
}, {
|
|
164
|
+
value: 9,
|
|
165
|
+
name: words.Month[9]
|
|
166
|
+
}, {
|
|
167
|
+
value: 10,
|
|
168
|
+
name: words.Month[10]
|
|
169
|
+
}, {
|
|
170
|
+
value: 11,
|
|
171
|
+
name: words.Month[11]
|
|
172
|
+
}];
|
package/utility/language.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var language = exports.language = {
|
|
7
|
-
message: {
|
|
8
|
-
failPerform: "Nu am putut îndeplini sarcina",
|
|
9
|
-
confirmDelete: "Am șters cu succes",
|
|
10
|
-
confirmAdd: "Am adăugat cu succes",
|
|
11
|
-
confirmUpdate: "Am actualizat datele"
|
|
12
|
-
},
|
|
13
|
-
label: {
|
|
14
|
-
modify: "Modifică",
|
|
15
|
-
add: "Adaugă",
|
|
16
|
-
remove: "Șterge",
|
|
17
|
-
confirmation: "Confirmare",
|
|
18
|
-
cancel: "Renunță"
|
|
19
|
-
}
|
|
20
|
-
};
|