ods-component-lib 1.18.258 → 1.18.259
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.
|
@@ -128,10 +128,15 @@ export interface IOdsTimelineTableToolbarSettings {
|
|
|
128
128
|
passiveText?: string;
|
|
129
129
|
pdf?: {
|
|
130
130
|
title?: string;
|
|
131
|
+
loadingText?: string;
|
|
131
132
|
documentFormat?: ExportDocumentType;
|
|
132
133
|
};
|
|
133
134
|
excel?: {
|
|
134
135
|
title?: string;
|
|
136
|
+
loadingText?: string;
|
|
137
|
+
};
|
|
138
|
+
messages?: {
|
|
139
|
+
noRecord?: string;
|
|
135
140
|
};
|
|
136
141
|
};
|
|
137
142
|
columnChooser?: {
|
package/dist/index.js
CHANGED
|
@@ -56936,7 +56936,7 @@ var callAddFont = function callAddFont() {
|
|
|
56936
56936
|
jsPDF.jsPDF.API.events.push(['addFonts', callAddFont]);
|
|
56937
56937
|
|
|
56938
56938
|
var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
56939
|
-
var _toolbarSettings$sear, _toolbarSettings$sear5, _toolbarSettings$expo12, _toolbarSettings$expo13, _toolbarSettings$expo14, _toolbarSettings$expo15, _toolbarSettings$
|
|
56939
|
+
var _toolbarSettings$sear, _toolbarSettings$sear5, _toolbarSettings$expo12, _toolbarSettings$expo13, _toolbarSettings$expo14, _toolbarSettings$expo15, _toolbarSettings$expo19, _toolbarSettings$expo20, _toolbarSettings$expo21, _toolbarSettings$colu, _props$toolbarSetting5, _props$toolbarSetting6, _props$toolbarSetting7, _props$toolbarSetting8;
|
|
56940
56940
|
var customColumns = props.customColumns,
|
|
56941
56941
|
customTasks = props.customTasks,
|
|
56942
56942
|
customTaskKey = props.customTaskKey,
|
|
@@ -56988,6 +56988,12 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56988
56988
|
return item.name;
|
|
56989
56989
|
})),
|
|
56990
56990
|
unvisibleColumnNames = _useState9[0];
|
|
56991
|
+
var _useState10 = React.useState(false),
|
|
56992
|
+
exportPdfModalOpen = _useState10[0],
|
|
56993
|
+
setExportPdfModalOpen = _useState10[1];
|
|
56994
|
+
var _useState11 = React.useState(false),
|
|
56995
|
+
exporting = _useState11[0],
|
|
56996
|
+
setExporting = _useState11[1];
|
|
56991
56997
|
var originalSortingMode = sorting.mode === undefined || sorting.mode === "" ? "none" : sorting.mode;
|
|
56992
56998
|
var sortingMode = sortingProcess == "ServerSideSorting" ? "none" : originalSortingMode;
|
|
56993
56999
|
var showSortIndexes = sortingProcess == "ServerSideSorting" ? false : sorting.showSortIndexes;
|
|
@@ -57027,7 +57033,8 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
57027
57033
|
setExportableTasks(result);
|
|
57028
57034
|
};
|
|
57029
57035
|
var prepareTimelineTasks = function prepareTimelineTasks(tasks, selectedKeys) {
|
|
57030
|
-
|
|
57036
|
+
var _tasks = mapSelectedKeys(tasks.map(mapCustomTask), customTaskKey, multiSelectionEnabled ? selectedKeys : selectedKeys.length > 0 ? selectedKeys[0] : []);
|
|
57037
|
+
setTimelineTasks(_tasks);
|
|
57031
57038
|
};
|
|
57032
57039
|
var getSelectedRowsData = function getSelectedRowsData() {
|
|
57033
57040
|
return timelineTasks.filter(function (item) {
|
|
@@ -57267,7 +57274,8 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
57267
57274
|
}).then(function (doc) {
|
|
57268
57275
|
return doc.save(getExportFileName());
|
|
57269
57276
|
})["finally"](function () {
|
|
57270
|
-
|
|
57277
|
+
setExporting(false);
|
|
57278
|
+
setExportPdfModalOpen(false);
|
|
57271
57279
|
});
|
|
57272
57280
|
};
|
|
57273
57281
|
var getExportFileName = function getExportFileName() {
|
|
@@ -57302,6 +57310,41 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
57302
57310
|
});
|
|
57303
57311
|
return newExportedColumns;
|
|
57304
57312
|
}, [exportableTasks, columnList]);
|
|
57313
|
+
var exportableTimelineTable = React__default.createElement(React__default.Fragment, null, React__default.createElement(antd.Spin, {
|
|
57314
|
+
size: "large",
|
|
57315
|
+
spinning: exporting
|
|
57316
|
+
}, React__default.createElement("div", {
|
|
57317
|
+
style: {
|
|
57318
|
+
overflowX: "auto",
|
|
57319
|
+
overflowY: "auto",
|
|
57320
|
+
paddingTop: 20
|
|
57321
|
+
}
|
|
57322
|
+
}, React__default.createElement(gantt.Gantt, Object.assign({
|
|
57323
|
+
key: "OdsTimelineTableExportable",
|
|
57324
|
+
width: "100%",
|
|
57325
|
+
height: 500,
|
|
57326
|
+
startDateRange: startDate,
|
|
57327
|
+
endDateRange: endDate,
|
|
57328
|
+
taskContentRender: function taskContentRender(params) {
|
|
57329
|
+
return React__default.createElement(OdsTimelineTableTaskTemplate, Object.assign({}, params));
|
|
57330
|
+
}
|
|
57331
|
+
}, props, {
|
|
57332
|
+
ref: refGanttExportable,
|
|
57333
|
+
sorting: {
|
|
57334
|
+
mode: "none",
|
|
57335
|
+
showSortIndexes: false
|
|
57336
|
+
}
|
|
57337
|
+
}), React__default.createElement(gantt.ContextMenu, {
|
|
57338
|
+
enabled: false
|
|
57339
|
+
}), exportedColumns.map(function (columnProps, index) {
|
|
57340
|
+
return React__default.createElement(gantt.Column, Object.assign({}, columnProps, {
|
|
57341
|
+
key: "TimelineTable_ExportPdfColumn_" + index
|
|
57342
|
+
}));
|
|
57343
|
+
}), React__default.createElement(gantt.Tasks, {
|
|
57344
|
+
dataSource: exportableTasks
|
|
57345
|
+
}), children, React__default.createElement(gantt.Sorting, {
|
|
57346
|
+
mode: "none"
|
|
57347
|
+
})))));
|
|
57305
57348
|
React.useImperativeHandle(ref, function () {
|
|
57306
57349
|
return {
|
|
57307
57350
|
getSelectedRowsData: getSelectedRowsData,
|
|
@@ -57367,9 +57410,22 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
57367
57410
|
items: [{
|
|
57368
57411
|
text: (_toolbarSettings$expo13 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$expo14 = toolbarSettings["export"]) === null || _toolbarSettings$expo14 === void 0 ? void 0 : (_toolbarSettings$expo15 = _toolbarSettings$expo14.pdf) === null || _toolbarSettings$expo15 === void 0 ? void 0 : _toolbarSettings$expo15.title) != null ? _toolbarSettings$expo13 : "Export to Pdf",
|
|
57369
57412
|
icon: "exportpdf",
|
|
57370
|
-
onClick:
|
|
57413
|
+
onClick: function onClick() {
|
|
57414
|
+
if (exportableTasks.length > 0) {
|
|
57415
|
+
setExportPdfModalOpen(true);
|
|
57416
|
+
setExporting(true);
|
|
57417
|
+
} else {
|
|
57418
|
+
var _toolbarSettings$expo16, _toolbarSettings$expo17, _toolbarSettings$expo18;
|
|
57419
|
+
OdsNotification({
|
|
57420
|
+
title: "",
|
|
57421
|
+
content: (_toolbarSettings$expo16 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$expo17 = toolbarSettings["export"]) === null || _toolbarSettings$expo17 === void 0 ? void 0 : (_toolbarSettings$expo18 = _toolbarSettings$expo17.messages) === null || _toolbarSettings$expo18 === void 0 ? void 0 : _toolbarSettings$expo18.noRecord) != null ? _toolbarSettings$expo16 : "No record",
|
|
57422
|
+
type: "warning",
|
|
57423
|
+
placement: "bottom"
|
|
57424
|
+
});
|
|
57425
|
+
}
|
|
57426
|
+
}
|
|
57371
57427
|
}, {
|
|
57372
|
-
text: (_toolbarSettings$
|
|
57428
|
+
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",
|
|
57373
57429
|
icon: "exportxlsx",
|
|
57374
57430
|
onClick: exportExcel
|
|
57375
57431
|
}]
|
|
@@ -57439,23 +57495,23 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
57439
57495
|
}), children, React__default.createElement(gantt.Sorting, {
|
|
57440
57496
|
mode: sortingMode,
|
|
57441
57497
|
showSortIndexes: showSortIndexes
|
|
57442
|
-
})), React__default.createElement(
|
|
57443
|
-
|
|
57444
|
-
|
|
57445
|
-
|
|
57446
|
-
|
|
57447
|
-
|
|
57448
|
-
|
|
57449
|
-
|
|
57450
|
-
|
|
57451
|
-
|
|
57452
|
-
|
|
57453
|
-
|
|
57454
|
-
|
|
57455
|
-
|
|
57456
|
-
|
|
57457
|
-
|
|
57458
|
-
}
|
|
57498
|
+
})), React__default.createElement(antd.Modal, {
|
|
57499
|
+
title: (_props$toolbarSetting5 = (_props$toolbarSetting6 = props.toolbarSettings) === null || _props$toolbarSetting6 === void 0 ? void 0 : (_props$toolbarSetting7 = _props$toolbarSetting6["export"]) === null || _props$toolbarSetting7 === void 0 ? void 0 : (_props$toolbarSetting8 = _props$toolbarSetting7.pdf) === null || _props$toolbarSetting8 === void 0 ? void 0 : _props$toolbarSetting8.loadingText) != null ? _props$toolbarSetting5 : "Exporting to Pdf",
|
|
57500
|
+
width: 1200,
|
|
57501
|
+
open: exportPdfModalOpen,
|
|
57502
|
+
closable: false,
|
|
57503
|
+
footer: "",
|
|
57504
|
+
afterOpenChange: function afterOpenChange(open) {
|
|
57505
|
+
if (open) {
|
|
57506
|
+
var _exportableTimelineTable = refGanttExportable.current.instance;
|
|
57507
|
+
_exportableTimelineTable.refresh().then(function () {
|
|
57508
|
+
setTimeout(function () {
|
|
57509
|
+
return exportPdf();
|
|
57510
|
+
}, 2000);
|
|
57511
|
+
});
|
|
57512
|
+
}
|
|
57513
|
+
}
|
|
57514
|
+
}, exportableTimelineTable), React__default.createElement(DataGrid__default, {
|
|
57459
57515
|
key: "DataGrid_Export",
|
|
57460
57516
|
ref: refDataGridExportable,
|
|
57461
57517
|
className: "odsTimelineTable-ExportDataGrid",
|