ods-component-lib 1.18.260 → 1.18.261
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/dist/index.js +36 -70
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +37 -71
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -23,7 +23,7 @@ import { saveAs as saveAs$1 } from 'file-saver';
|
|
|
23
23
|
import 'devextreme/dist/css/dx.light.css';
|
|
24
24
|
import DataSource from 'devextreme/data/data_source';
|
|
25
25
|
import query from 'devextreme/data/query';
|
|
26
|
-
import { Gantt,
|
|
26
|
+
import { Gantt, HeaderFilter as HeaderFilter$1, FilterRow as FilterRow$1, Toolbar as Toolbar$2, Item as Item$2, ContextMenu, Column as Column$1, Tasks, Sorting as Sorting$1 } from 'devextreme-react/gantt';
|
|
27
27
|
import 'jspdf-autotable';
|
|
28
28
|
import { Button as Button$2 } from 'devextreme-react/button';
|
|
29
29
|
|
|
@@ -56914,7 +56914,7 @@ var callAddFont = function callAddFont() {
|
|
|
56914
56914
|
jsPDF$1.API.events.push(['addFonts', callAddFont]);
|
|
56915
56915
|
|
|
56916
56916
|
var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
56917
|
-
var _toolbarSettings$sear, _toolbarSettings$sear5, _toolbarSettings$expo12, _toolbarSettings$expo13, _toolbarSettings$expo14, _toolbarSettings$expo15, _toolbarSettings$expo19, _toolbarSettings$expo20, _toolbarSettings$expo21, _toolbarSettings$colu
|
|
56917
|
+
var _toolbarSettings$sear, _toolbarSettings$sear5, _toolbarSettings$expo12, _toolbarSettings$expo13, _toolbarSettings$expo14, _toolbarSettings$expo15, _toolbarSettings$expo19, _toolbarSettings$expo20, _toolbarSettings$expo21, _toolbarSettings$colu;
|
|
56918
56918
|
var customColumns = props.customColumns,
|
|
56919
56919
|
customTasks = props.customTasks,
|
|
56920
56920
|
customTaskKey = props.customTaskKey,
|
|
@@ -56967,14 +56967,8 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
56967
56967
|
})),
|
|
56968
56968
|
unvisibleColumnNames = _useState9[0];
|
|
56969
56969
|
var _useState10 = useState(false),
|
|
56970
|
-
|
|
56971
|
-
|
|
56972
|
-
var _useState11 = useState(false),
|
|
56973
|
-
exporting = _useState11[0],
|
|
56974
|
-
setExporting = _useState11[1];
|
|
56975
|
-
var _useState12 = useState(false),
|
|
56976
|
-
columnChooserOpen = _useState12[0],
|
|
56977
|
-
setColumnChooserOpen = _useState12[1];
|
|
56970
|
+
columnChooserOpen = _useState10[0],
|
|
56971
|
+
setColumnChooserOpen = _useState10[1];
|
|
56978
56972
|
var originalSortingMode = sorting.mode === undefined || sorting.mode === "" ? "none" : sorting.mode;
|
|
56979
56973
|
var sortingMode = sortingProcess == "ServerSideSorting" ? "none" : originalSortingMode;
|
|
56980
56974
|
var showSortIndexes = sortingProcess == "ServerSideSorting" ? false : sorting.showSortIndexes;
|
|
@@ -57003,7 +56997,7 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57003
56997
|
};
|
|
57004
56998
|
var getTimelineEndDate = function getTimelineEndDate() {
|
|
57005
56999
|
var newED = endDate;
|
|
57006
|
-
newED = moment(newED).add(1, "months").set("date",
|
|
57000
|
+
newED = moment(newED).add(1, "months").set("date", 28).toDate();
|
|
57007
57001
|
return newED;
|
|
57008
57002
|
};
|
|
57009
57003
|
var actionButtons = useMemo(function () {
|
|
@@ -57030,8 +57024,7 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57030
57024
|
setExportableTasks(result);
|
|
57031
57025
|
};
|
|
57032
57026
|
var prepareTimelineTasks = function prepareTimelineTasks(tasks, selectedKeys) {
|
|
57033
|
-
|
|
57034
|
-
setTimelineTasks(_tasks);
|
|
57027
|
+
setTimelineTasks(mapSelectedKeys(tasks.map(mapCustomTask), customTaskKey, multiSelectionEnabled ? selectedKeys : selectedKeys.length > 0 ? selectedKeys[0] : []));
|
|
57035
57028
|
};
|
|
57036
57029
|
var getSelectedRowsData = function getSelectedRowsData() {
|
|
57037
57030
|
return timelineTasks.filter(function (item) {
|
|
@@ -57271,8 +57264,7 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57271
57264
|
}).then(function (doc) {
|
|
57272
57265
|
return doc.save(getExportFileName());
|
|
57273
57266
|
})["finally"](function () {
|
|
57274
|
-
|
|
57275
|
-
setExportPdfModalOpen(false);
|
|
57267
|
+
return exportableTimelineTable.repaint();
|
|
57276
57268
|
});
|
|
57277
57269
|
};
|
|
57278
57270
|
var getExportFileName = function getExportFileName() {
|
|
@@ -57307,41 +57299,6 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57307
57299
|
});
|
|
57308
57300
|
return newExportedColumns;
|
|
57309
57301
|
}, [exportableTasks, columnList]);
|
|
57310
|
-
var exportableTimelineTable = React.createElement(React.Fragment, null, React.createElement(Spin, {
|
|
57311
|
-
size: "large",
|
|
57312
|
-
spinning: exporting
|
|
57313
|
-
}, React.createElement("div", {
|
|
57314
|
-
style: {
|
|
57315
|
-
overflowX: "auto",
|
|
57316
|
-
overflowY: "auto",
|
|
57317
|
-
paddingTop: 20
|
|
57318
|
-
}
|
|
57319
|
-
}, React.createElement(Gantt, Object.assign({
|
|
57320
|
-
key: "OdsTimelineTableExportable",
|
|
57321
|
-
width: "100%",
|
|
57322
|
-
height: 500,
|
|
57323
|
-
startDateRange: getTimelineStartDate(),
|
|
57324
|
-
endDateRange: getTimelineEndDate(),
|
|
57325
|
-
taskContentRender: function taskContentRender(params) {
|
|
57326
|
-
return React.createElement(OdsTimelineTableTaskTemplate, Object.assign({}, params));
|
|
57327
|
-
}
|
|
57328
|
-
}, props, {
|
|
57329
|
-
ref: refGanttExportable,
|
|
57330
|
-
sorting: {
|
|
57331
|
-
mode: "none",
|
|
57332
|
-
showSortIndexes: false
|
|
57333
|
-
}
|
|
57334
|
-
}), React.createElement(ContextMenu, {
|
|
57335
|
-
enabled: false
|
|
57336
|
-
}), exportedColumns.map(function (columnProps, index) {
|
|
57337
|
-
return React.createElement(Column$1, Object.assign({}, columnProps, {
|
|
57338
|
-
key: "TimelineTable_ExportPdfColumn_" + index
|
|
57339
|
-
}));
|
|
57340
|
-
}), React.createElement(Tasks, {
|
|
57341
|
-
dataSource: exportableTasks
|
|
57342
|
-
}), children, React.createElement(Sorting$1, {
|
|
57343
|
-
mode: "none"
|
|
57344
|
-
})))));
|
|
57345
57302
|
useImperativeHandle(ref, function () {
|
|
57346
57303
|
return {
|
|
57347
57304
|
getSelectedRowsData: getSelectedRowsData,
|
|
@@ -57409,8 +57366,7 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57409
57366
|
icon: "exportpdf",
|
|
57410
57367
|
onClick: function onClick() {
|
|
57411
57368
|
if (exportableTasks.length > 0) {
|
|
57412
|
-
|
|
57413
|
-
setExporting(true);
|
|
57369
|
+
exportPdf();
|
|
57414
57370
|
} else {
|
|
57415
57371
|
var _toolbarSettings$expo16, _toolbarSettings$expo17, _toolbarSettings$expo18;
|
|
57416
57372
|
OdsNotification({
|
|
@@ -57424,7 +57380,19 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57424
57380
|
}, {
|
|
57425
57381
|
text: (_toolbarSettings$expo19 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$expo20 = toolbarSettings["export"]) === null || _toolbarSettings$expo20 === void 0 ? void 0 : (_toolbarSettings$expo21 = _toolbarSettings$expo20.excel) === null || _toolbarSettings$expo21 === void 0 ? void 0 : _toolbarSettings$expo21.title) != null ? _toolbarSettings$expo19 : "Export to Excel",
|
|
57426
57382
|
icon: "exportxlsx",
|
|
57427
|
-
onClick:
|
|
57383
|
+
onClick: function onClick() {
|
|
57384
|
+
if (exportableTasks.length > 0) {
|
|
57385
|
+
exportExcel();
|
|
57386
|
+
} else {
|
|
57387
|
+
var _toolbarSettings$expo22, _toolbarSettings$expo23, _toolbarSettings$expo24;
|
|
57388
|
+
OdsNotification({
|
|
57389
|
+
title: "",
|
|
57390
|
+
content: (_toolbarSettings$expo22 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$expo23 = toolbarSettings["export"]) === null || _toolbarSettings$expo23 === void 0 ? void 0 : (_toolbarSettings$expo24 = _toolbarSettings$expo23.messages) === null || _toolbarSettings$expo24 === void 0 ? void 0 : _toolbarSettings$expo24.noRecord) != null ? _toolbarSettings$expo22 : "No record",
|
|
57391
|
+
type: "warning",
|
|
57392
|
+
placement: "bottom"
|
|
57393
|
+
});
|
|
57394
|
+
}
|
|
57395
|
+
}
|
|
57428
57396
|
}]
|
|
57429
57397
|
}]
|
|
57430
57398
|
}
|
|
@@ -57484,7 +57452,8 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57484
57452
|
}, columnProps));
|
|
57485
57453
|
}
|
|
57486
57454
|
}), actionColumnSettings.actionColumnEnable != false ? React.createElement(Column$1, Object.assign({
|
|
57487
|
-
key: "OdsTimelineColumn_Actions"
|
|
57455
|
+
key: "OdsTimelineColumn_Actions",
|
|
57456
|
+
width: 100
|
|
57488
57457
|
}, actionColumnProps, {
|
|
57489
57458
|
caption: actionColumnSettings.actionButtonGroupCaption,
|
|
57490
57459
|
cssClass: "actionButtonGroupCell",
|
|
@@ -57496,23 +57465,20 @@ var OdsTimelineTable = forwardRef(function (props, ref) {
|
|
|
57496
57465
|
}), children, React.createElement(Sorting$1, {
|
|
57497
57466
|
mode: sortingMode,
|
|
57498
57467
|
showSortIndexes: showSortIndexes
|
|
57499
|
-
})), React.createElement(
|
|
57500
|
-
|
|
57501
|
-
|
|
57502
|
-
|
|
57503
|
-
|
|
57504
|
-
|
|
57505
|
-
|
|
57506
|
-
|
|
57507
|
-
|
|
57508
|
-
|
|
57509
|
-
|
|
57510
|
-
|
|
57511
|
-
|
|
57512
|
-
|
|
57513
|
-
}
|
|
57514
|
-
}
|
|
57515
|
-
}, exportableTimelineTable), React.createElement(DataGrid$1, {
|
|
57468
|
+
})), React.createElement(Gantt, Object.assign({}, props, {
|
|
57469
|
+
startDateRange: getTimelineStartDate(),
|
|
57470
|
+
endDateRange: getTimelineEndDate(),
|
|
57471
|
+
width: 0,
|
|
57472
|
+
height: 0,
|
|
57473
|
+
ref: refGanttExportable,
|
|
57474
|
+
key: "OdsTimelineTable_Export"
|
|
57475
|
+
}), exportedColumns.map(function (columnProps, index) {
|
|
57476
|
+
return React.createElement(Column$1, Object.assign({}, columnProps, {
|
|
57477
|
+
key: "TimelineTable_ExportPdfColumn_" + index
|
|
57478
|
+
}));
|
|
57479
|
+
}), React.createElement(Tasks, {
|
|
57480
|
+
dataSource: exportableTasks
|
|
57481
|
+
}), children), React.createElement(DataGrid$1, {
|
|
57516
57482
|
key: "DataGrid_Export",
|
|
57517
57483
|
ref: refDataGridExportable,
|
|
57518
57484
|
className: "odsTimelineTable-ExportDataGrid",
|