awing-library 2.1.133-beta → 2.1.135-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.
|
@@ -56,8 +56,11 @@ var ImportTemplate = function () {
|
|
|
56
56
|
fileName: tempFile === null || tempFile === void 0 ? void 0 : tempFile.name,
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
var handleChangeFormData = (0, react_1.useCallback)(function (obj) {
|
|
60
|
-
setBussinessData(function (prev) {
|
|
59
|
+
var handleChangeFormData = (0, react_1.useCallback)(function (obj, valid, key) {
|
|
60
|
+
setBussinessData(function (prev) {
|
|
61
|
+
var _a;
|
|
62
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[key] = obj[key], _a.id = prev.id || (obj === null || obj === void 0 ? void 0 : obj.id) || '0', _a.directoryId = (obj === null || obj === void 0 ? void 0 : obj.directoryId) || rootDirectoryId, _a)));
|
|
63
|
+
});
|
|
61
64
|
}, [rootDirectoryId]);
|
|
62
65
|
return ((0, jsx_runtime_1.jsxs)(ClassicDrawer_1.default, { title: t('TemplateManagement.ImportTemplate'), onSubmit: handleSubmit, disableButtonSubmit: !(tempFile === null || tempFile === void 0 ? void 0 : tempFile.name), confirmExit: true, childrenWrapperStyle: { padding: 0 }, children: [(0, jsx_runtime_1.jsx)(AWING_1.DataForm, { fields: [
|
|
63
66
|
{
|
|
@@ -16,6 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var material_1 = require("@mui/material");
|
|
19
|
+
var styles_1 = require("@mui/styles");
|
|
19
20
|
var Helpers_1 = require("../../Utils/Helpers");
|
|
20
21
|
require("chartjs-adapter-moment");
|
|
21
22
|
var moment_1 = __importDefault(require("moment"));
|
|
@@ -23,7 +24,23 @@ var react_i18next_1 = require("react-i18next");
|
|
|
23
24
|
var i18n_1 = __importDefault(require("../../i18n"));
|
|
24
25
|
var Enums_1 = require("./Enums");
|
|
25
26
|
var Styles_1 = require("./Styles");
|
|
27
|
+
var useStyles = (0, styles_1.makeStyles)({
|
|
28
|
+
point: {
|
|
29
|
+
position: "relative",
|
|
30
|
+
'&::after': {
|
|
31
|
+
content: '""',
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
top: '50%',
|
|
34
|
+
left: '-5px', /* Adjust as needed */
|
|
35
|
+
right: '-5px', /* Adjust as needed */
|
|
36
|
+
height: '2px', /* Thickness of the line */
|
|
37
|
+
backgroundColor: 'inherit',
|
|
38
|
+
transform: 'translateY(-50%)'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
});
|
|
26
42
|
var BarLineComponent = function (props) {
|
|
43
|
+
var classes = useStyles();
|
|
27
44
|
var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
|
|
28
45
|
var optionsDefault = props.optionsDefault;
|
|
29
46
|
var chart = props.chart, _a = props.width, width = _a === void 0 ? 'auto' : _a, _b = props.height, height = _b === void 0 ? 350 : _b, _c = props.timeline, timeline = _c === void 0 ? Enums_1.TYPE_TIMELINE.DAY : _c, _d = props.optionCustom, optionCustom = _d === void 0 ? {} : _d, dataChart = props.dataChart, type = props.type, _e = props.options, options = _e === void 0 ? {
|
|
@@ -82,7 +99,7 @@ var BarLineComponent = function (props) {
|
|
|
82
99
|
position: 'bottom',
|
|
83
100
|
labels: {
|
|
84
101
|
usePointStyle: true,
|
|
85
|
-
pointStyle: 'circle',
|
|
102
|
+
// pointStyle: 'circle',
|
|
86
103
|
boxHeight: 12,
|
|
87
104
|
boxWidth: 12,
|
|
88
105
|
padding: 30,
|
|
@@ -229,16 +246,22 @@ var BarLineComponent = function (props) {
|
|
|
229
246
|
chart.update();
|
|
230
247
|
};
|
|
231
248
|
// Color box
|
|
232
|
-
var boxSpan = document.createElement('
|
|
249
|
+
var boxSpan = document.createElement('div');
|
|
233
250
|
boxSpan.style.background = item.fillStyle;
|
|
234
251
|
boxSpan.style.borderColor = item.strokeStyle;
|
|
235
252
|
boxSpan.style.borderWidth = item.lineWidth + 'px';
|
|
236
253
|
boxSpan.style.display = 'inline-block';
|
|
237
254
|
boxSpan.style.flexShrink = '0';
|
|
238
|
-
boxSpan.style.height = '
|
|
239
|
-
boxSpan.style.marginRight = '
|
|
240
|
-
boxSpan.style.width = '
|
|
241
|
-
|
|
255
|
+
boxSpan.style.height = '15px';
|
|
256
|
+
boxSpan.style.marginRight = '15px';
|
|
257
|
+
boxSpan.style.width = '15px';
|
|
258
|
+
console.log('item', item);
|
|
259
|
+
if ((item === null || item === void 0 ? void 0 : item.lineWidth) && (item === null || item === void 0 ? void 0 : item.pointStyle)) {
|
|
260
|
+
boxSpan.setAttribute("class", classes.point);
|
|
261
|
+
}
|
|
262
|
+
if ((item === null || item === void 0 ? void 0 : item.pointStyle) === 'circle') {
|
|
263
|
+
boxSpan.style.borderRadius = '20px';
|
|
264
|
+
}
|
|
242
265
|
// Text
|
|
243
266
|
var textContainer = document.createElement('p');
|
|
244
267
|
textContainer.style.color = item.fontColor;
|