awing-library 2.1.99-beta → 2.1.101-beta
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.
|
@@ -135,7 +135,9 @@ var RowAdvanceComponent = function (_a) {
|
|
|
135
135
|
// Th3: field ko trong groupNames hiển thị total hoặ thông tin schedule nếu nó là cấp cuối cùng
|
|
136
136
|
groupNames
|
|
137
137
|
.slice(0, priorityGroupLevel - 1)
|
|
138
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((
|
|
138
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((options === null || options === void 0 ? void 0 : options.places[row === null || row === void 0 ? void 0 : row.placeId])
|
|
139
|
+
? (_b = options === null || options === void 0 ? void 0 : options.places[row === null || row === void 0 ? void 0 : row.placeId]) === null || _b === void 0 ? void 0 : _b.name
|
|
140
|
+
: row === null || row === void 0 ? void 0 : row.placeId) ||
|
|
139
141
|
((row === null || row === void 0 ? void 0 : row.totalPlace) !==
|
|
140
142
|
0
|
|
141
143
|
? row === null || row === void 0 ? void 0 : row.totalPlace
|
|
@@ -152,7 +154,10 @@ var RowAdvanceComponent = function (_a) {
|
|
|
152
154
|
? (_c = options === null || options === void 0 ? void 0 : options.domains[row === null || row === void 0 ? void 0 : row.groupKeyId]) === null || _c === void 0 ? void 0 : _c.name
|
|
153
155
|
: row === null || row === void 0 ? void 0 : row.groupKeyId })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
154
156
|
.slice(0, priorityGroupLevel - 1)
|
|
155
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((
|
|
157
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((options === null || options === void 0 ? void 0 : options.places[row === null || row === void 0 ? void 0 : row.domainId])
|
|
158
|
+
? (_d = options === null || options === void 0 ? void 0 : options.places[row === null || row === void 0 ? void 0 : row.domainId]) === null || _d === void 0 ? void 0 : _d.name
|
|
159
|
+
: row === null || row === void 0 ? void 0 : row.domainId) ||
|
|
160
|
+
(row === null || row === void 0 ? void 0 : row.totalDomain) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
156
161
|
case Enum_1.HEAD_CELL_NAMES.DATE:
|
|
157
162
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
158
163
|
Enum_1.HEAD_CELL_NAMES.DATE ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDateField, children: startDate || endDate })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
@@ -32,14 +32,13 @@ var react_1 = __importDefault(require("react"));
|
|
|
32
32
|
var react_i18next_1 = require("react-i18next");
|
|
33
33
|
var BasicInput_1 = __importDefault(require("./BasicInput"));
|
|
34
34
|
var validation_1 = require("../../../AWING/ultis/validation");
|
|
35
|
-
var cronRegex = /^(\*|[0-5]?\d)(?:\/\d+)? (\*|1?\d|2[0-3])(?:\/\d+)? (\*|0?[1-9]|[12]\d|3[01])(?:\/\d+)? (\*|0?[1-9]|1[0-2]|(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))(?:\/\d+)? (\*|0?[0-7]|(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat))(?:\/\d+)?$/;
|
|
36
35
|
var CornJobInput = function (_a) {
|
|
37
36
|
var jobModel = _a.jobModel, handleChange = _a.handleChange;
|
|
38
37
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
39
38
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: 'relative' }, children: (0, jsx_runtime_1.jsx)(BasicInput_1.default, { fullWidth: true, sx: {
|
|
40
39
|
marginTop: function (t) { return t.spacing(1); },
|
|
41
40
|
marginBottom: function (t) { return t.spacing(1); },
|
|
42
|
-
}, name: "cronTime", label: t('TaskScheduler.Help.Crontime'), onChange: handleChange, value: jobModel.cronTime, checkValid: function (value) { return (0, validation_1.textValidation)(value, 50, true,
|
|
41
|
+
}, name: "cronTime", label: t('TaskScheduler.Help.Crontime'), onChange: handleChange, value: jobModel.cronTime, checkValid: function (value) { return (0, validation_1.textValidation)(value, 50, true, false, false); }, InputProps: {
|
|
43
42
|
startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "start", sx: { marginRight: '30px' }, children: (0, jsx_runtime_1.jsx)(HtmlTooltip, { arrow: true, placement: "bottom-start", title: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('TaskScheduler.Help.Crontime') }), (0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsxs)("span", { children: ["[", t('Common.Minute'), "]"] }), (0, jsx_runtime_1.jsxs)("span", { children: ["_[", t('Common.Hour'), "]"] }), (0, jsx_runtime_1.jsxs)("span", { children: ["_[", t('Common.Day'), "]"] }), (0, jsx_runtime_1.jsxs)("span", { children: ["_[", t('Common.Month'), "]"] }), (0, jsx_runtime_1.jsxs)("span", { children: ["_[", t('Common.DayOfWeek'), "]"] })] }), (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("th", { children: [t('Common.Minute'), ":"] }), (0, jsx_runtime_1.jsx)("td", { children: "0 - 59" })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("th", { children: [t('Common.Hour'), ":"] }), (0, jsx_runtime_1.jsx)("td", { children: "0 - 23" })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("th", { children: [t('Common.Day'), ":"] }), (0, jsx_runtime_1.jsx)("td", { children: "1 - 31" })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("th", { children: [t('Common.Month'), ":"] }), (0, jsx_runtime_1.jsx)("td", { children: "1 - 12" })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("th", { children: [t('Common.DayOfWeek'), ":"] }), (0, jsx_runtime_1.jsx)("td", { children: "0 - 6" })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "*" }), (0, jsx_runtime_1.jsx)("td", { children: t('TaskScheduler.Help.*') })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "," }), (0, jsx_runtime_1.jsx)("td", { children: t('TaskScheduler.Help.,') })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "-" }), (0, jsx_runtime_1.jsx)("td", { children: t('TaskScheduler.Help.-') })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "/" }), (0, jsx_runtime_1.jsx)("td", { children: t('TaskScheduler.Help./') })] })] }) })] }), children: (0, jsx_runtime_1.jsx)(icons_material_1.HelpOutline, { fontSize: "small", color: "action", style: { position: 'absolute', left: '0' } }) }) })),
|
|
44
43
|
} }) }));
|
|
45
44
|
};
|
|
@@ -96,7 +96,7 @@ exports.logicExpressionValid = logicExpressionValid;
|
|
|
96
96
|
var textValidation = function (str, length, required, pattern, invertRegex) {
|
|
97
97
|
if (length === void 0) { length = 50; }
|
|
98
98
|
if (required === void 0) { required = true; }
|
|
99
|
-
if (pattern === void 0) { pattern = /^[a-zA-Z0-9
|
|
99
|
+
if (pattern === void 0) { pattern = /^[a-zA-Z0-9đĐ\/\-_.()\[\] \u0080-\uFFFF]+$/g; }
|
|
100
100
|
var validRes = {
|
|
101
101
|
valid: true,
|
|
102
102
|
message: [],
|
|
@@ -106,18 +106,11 @@ var textValidation = function (str, length, required, pattern, invertRegex) {
|
|
|
106
106
|
validRes.valid = false;
|
|
107
107
|
validRes.message.push(i18n_1.default.t('Common.Required'));
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
.normalize('NFD')
|
|
111
|
-
.toLowerCase()
|
|
112
|
-
.replace(/\s\s+/g, ' ')
|
|
113
|
-
.replace(/[\u0300-\u036f]/g, '')
|
|
114
|
-
.replace(/đ/g, 'd')
|
|
115
|
-
.trim();
|
|
116
|
-
if (textTransform && pattern && !pattern.test(textTransform)) {
|
|
109
|
+
if (str && pattern && !pattern.test(str)) {
|
|
117
110
|
validRes.valid = false;
|
|
118
111
|
if (invertRegex !== false) {
|
|
119
112
|
var invertedRegex = invertRegex || new RegExp("[^".concat(pattern.source.replace(/[*+?^${}|]/g, ''), "]").replace(/\[\[|\]\]/g, ']'), 'g');
|
|
120
|
-
validRes.message.push("".concat(i18n_1.default.t('Common.InvalidChars'), ": ").concat(Array.from(new Set(
|
|
113
|
+
validRes.message.push("".concat(i18n_1.default.t('Common.InvalidChars'), ": ").concat(Array.from(new Set(str.match(invertedRegex))).join(' ')));
|
|
121
114
|
}
|
|
122
115
|
}
|
|
123
116
|
var byteSize = new Blob([str]).size;
|