ods-component-lib 1.18.242 → 1.18.243
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/components/devextreme/OdsTimelineTable/OdsTimelineTable.Style.d.ts +2 -0
- package/dist/components/devextreme/OdsTimelineTable/OdsTimelineTable.Types.d.ts +11 -2
- package/dist/index.js +164 -57
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +164 -57
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,4 +12,6 @@ export declare const useStyles: (props?: {
|
|
|
12
12
|
columnChooserHeader: import("antd-style").SerializedStyles;
|
|
13
13
|
columnChooserCloseButton: import("antd-style").SerializedStyles;
|
|
14
14
|
columnChooserDivider: import("antd-style").SerializedStyles;
|
|
15
|
+
columnChooserCheckbox: import("antd-style").SerializedStyles;
|
|
16
|
+
columnChooserSearchbox: import("antd-style").SerializedStyles;
|
|
15
17
|
}>;
|
|
@@ -98,6 +98,7 @@ export interface IButtonGroup extends Omit<IButtonProps, "icon"> {
|
|
|
98
98
|
onclick?: React.MouseEventHandler<HTMLElement>;
|
|
99
99
|
}
|
|
100
100
|
export interface IOdsTimelineTableColumnProps extends IColumnProps {
|
|
101
|
+
name: string;
|
|
101
102
|
isMinimized?: boolean;
|
|
102
103
|
isStatusColumn?: boolean;
|
|
103
104
|
isCheckboxColumn?: boolean;
|
|
@@ -134,6 +135,8 @@ export interface IOdsTimelineTableToolbarSettings {
|
|
|
134
135
|
columnChooser?: {
|
|
135
136
|
visible?: boolean;
|
|
136
137
|
title?: string;
|
|
138
|
+
selectAllText: string;
|
|
139
|
+
onSelection?(items: string[], isSelected: boolean): void;
|
|
137
140
|
};
|
|
138
141
|
dateFilterVisible?: boolean;
|
|
139
142
|
zoomVisible?: boolean;
|
|
@@ -157,6 +160,12 @@ export interface ITranslationValue {
|
|
|
157
160
|
}
|
|
158
161
|
export interface IOdsTimelineTableColumnChooserProps {
|
|
159
162
|
title: string;
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
selectAllText: string;
|
|
164
|
+
items: IOdsTimelineTableColumnChooserItemProps[];
|
|
165
|
+
onSelection?(items: string[], isSelected: boolean): void;
|
|
166
|
+
}
|
|
167
|
+
export interface IOdsTimelineTableColumnChooserItemProps {
|
|
168
|
+
columnName: string;
|
|
169
|
+
columnCaption: string;
|
|
170
|
+
visible: boolean;
|
|
162
171
|
}
|
package/dist/index.js
CHANGED
|
@@ -38515,19 +38515,6 @@ var OdsMergeCellDataGrid = function OdsMergeCellDataGrid(props) {
|
|
|
38515
38515
|
})));
|
|
38516
38516
|
};
|
|
38517
38517
|
|
|
38518
|
-
var currentYear = new Date().getFullYear();
|
|
38519
|
-
var Constants = {
|
|
38520
|
-
timelineDefaultStartDate: new Date(currentYear, 0, 1),
|
|
38521
|
-
timelineDefaultEndDate: new Date(currentYear + 1, 0, 1)
|
|
38522
|
-
};
|
|
38523
|
-
var actionColumnProps = {
|
|
38524
|
-
dataField: "Actions",
|
|
38525
|
-
allowExporting: false,
|
|
38526
|
-
allowFiltering: false,
|
|
38527
|
-
allowSorting: false,
|
|
38528
|
-
dataType: "object"
|
|
38529
|
-
};
|
|
38530
|
-
|
|
38531
38518
|
var lodash = createCommonjsModule(function (module, exports) {
|
|
38532
38519
|
(function() {
|
|
38533
38520
|
|
|
@@ -55718,6 +55705,23 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
55718
55705
|
}.call(commonjsGlobal));
|
|
55719
55706
|
});
|
|
55720
55707
|
|
|
55708
|
+
var uniqueRecords = function uniqueRecords(value, index, array) {
|
|
55709
|
+
return array.indexOf(value) === index;
|
|
55710
|
+
};
|
|
55711
|
+
|
|
55712
|
+
var currentYear = new Date().getFullYear();
|
|
55713
|
+
var Constants = {
|
|
55714
|
+
timelineDefaultStartDate: new Date(currentYear, 0, 1),
|
|
55715
|
+
timelineDefaultEndDate: new Date(currentYear + 1, 0, 1)
|
|
55716
|
+
};
|
|
55717
|
+
var actionColumnProps = {
|
|
55718
|
+
dataField: "Actions",
|
|
55719
|
+
allowExporting: false,
|
|
55720
|
+
allowFiltering: false,
|
|
55721
|
+
allowSorting: false,
|
|
55722
|
+
dataType: "object"
|
|
55723
|
+
};
|
|
55724
|
+
|
|
55721
55725
|
var checkboxCellComponent = function checkboxCellComponent(props) {
|
|
55722
55726
|
var isChecked = props.data.value;
|
|
55723
55727
|
var onChange = function onChange(e) {
|
|
@@ -55950,6 +55954,7 @@ var OdsTimelineSelectionColumn = function OdsTimelineSelectionColumn(selectionEv
|
|
|
55950
55954
|
minWidth: 50,
|
|
55951
55955
|
width: 50,
|
|
55952
55956
|
dataField: "isSelected",
|
|
55957
|
+
name: "selection",
|
|
55953
55958
|
allowExporting: false,
|
|
55954
55959
|
cellComponent: function cellComponent(props) {
|
|
55955
55960
|
var onChange = function onChange(e) {
|
|
@@ -55971,23 +55976,26 @@ var OdsTimelineSelectionColumn = function OdsTimelineSelectionColumn(selectionEv
|
|
|
55971
55976
|
return selectionColumn;
|
|
55972
55977
|
};
|
|
55973
55978
|
|
|
55974
|
-
var _templateObject$B, _templateObject2$9, _templateObject3$6, _templateObject4$5, _templateObject5$4, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$3;
|
|
55979
|
+
var _templateObject$B, _templateObject2$9, _templateObject3$6, _templateObject4$5, _templateObject5$4, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$3, _templateObject10$3, _templateObject11$3;
|
|
55975
55980
|
var useStyles$b = antdStyle.createStyles(function (_ref, props) {
|
|
55976
55981
|
var _props$taskWidth, _props$progressPerc, _props$progressColor;
|
|
55977
55982
|
var css = _ref.css;
|
|
55978
55983
|
var _taskWidth = (_props$taskWidth = props === null || props === void 0 ? void 0 : props.taskWidth) != null ? _props$taskWidth : 0;
|
|
55979
55984
|
var _progressPerc = (_props$progressPerc = props === null || props === void 0 ? void 0 : props.progressPerc) != null ? _props$progressPerc : 100;
|
|
55980
55985
|
var _progressColor = (_props$progressColor = props === null || props === void 0 ? void 0 : props.progressColor) != null ? _props$progressColor : "unset";
|
|
55986
|
+
var searchBox = "\n padding-left: 5px;\n ";
|
|
55981
55987
|
return {
|
|
55982
55988
|
taskBar: css(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n min-height: 22px;\n display: block;\n overflow: hidden;\n width: ", "px;\n border: 1px solid #f0f0f0;\n border-radius: 5px;\n background-color: #f0f0f0;\n "])), _taskWidth != null ? _taskWidth : 0),
|
|
55983
55989
|
taskProgress: css(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n height: 100%;\n position: absolute;\n left: 0;\n bottom: 0;\n width: ", "%;\n border: 1px solid ", ";\n border-radius: 5px;\n background-color: ", ";\n "])), _progressPerc, _progressColor, _progressColor),
|
|
55984
55990
|
taskBarTitle: css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n z-index: 1;\n padding-left: 4px;\n position: absolute;\n "]))),
|
|
55985
55991
|
searchBoxIcon: css(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n color: #999;\n font-size: 17px;\n line-height: 18px;\n "]))),
|
|
55986
|
-
searchBox: css(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n
|
|
55992
|
+
searchBox: css(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n ", "\n "])), searchBox),
|
|
55987
55993
|
columnChooserPopup: css(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n min-width: 250px;\n "]))),
|
|
55988
55994
|
columnChooserHeader: css(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n "]))),
|
|
55989
|
-
columnChooserCloseButton: css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n flex: 1;\n text-align: end;\n
|
|
55990
|
-
columnChooserDivider: css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n margin-top: 10px;\n margin-bottom: 10px;\n "])))
|
|
55995
|
+
columnChooserCloseButton: css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n flex: 1;\n text-align: end;\n "]))),
|
|
55996
|
+
columnChooserDivider: css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n margin-top: 10px;\n margin-bottom: 10px;\n "]))),
|
|
55997
|
+
columnChooserCheckbox: css(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n margin-top: 4px;\n margin-bottom: 4px;\n "]))),
|
|
55998
|
+
columnChooserSearchbox: css(_templateObject11$3 || (_templateObject11$3 = _taggedTemplateLiteralLoose(["\n ", "\n margin-top: 4px;\n margin-bottom: 4px;\n "])), searchBox)
|
|
55991
55999
|
};
|
|
55992
56000
|
});
|
|
55993
56001
|
|
|
@@ -56046,85 +56054,140 @@ var OdsTimelineTableSearchBox = function OdsTimelineTableSearchBox(props) {
|
|
|
56046
56054
|
}));
|
|
56047
56055
|
};
|
|
56048
56056
|
|
|
56049
|
-
var uniqueRecords = function uniqueRecords(value, index, array) {
|
|
56050
|
-
return array.indexOf(value) === index;
|
|
56051
|
-
};
|
|
56052
|
-
|
|
56053
56057
|
var OdsTimelineTableColumnChooser = function OdsTimelineTableColumnChooser(props) {
|
|
56054
56058
|
var _useStyles = useStyles$b(),
|
|
56055
56059
|
timelineTableStyles = _useStyles.styles;
|
|
56060
|
+
var initialSelectedColumns = props.items.filter(function (item) {
|
|
56061
|
+
return item.visible !== false;
|
|
56062
|
+
});
|
|
56056
56063
|
var _useState = React.useState(false),
|
|
56057
56064
|
open = _useState[0],
|
|
56058
56065
|
setOpen = _useState[1];
|
|
56059
56066
|
var _useState2 = React.useState(props.items),
|
|
56060
56067
|
columns = _useState2[0],
|
|
56061
56068
|
setColumns = _useState2[1];
|
|
56062
|
-
var _useState3 = React.useState(
|
|
56069
|
+
var _useState3 = React.useState(initialSelectedColumns),
|
|
56063
56070
|
selectedColumns = _useState3[0],
|
|
56064
56071
|
setSelectedColumns = _useState3[1];
|
|
56065
56072
|
var filterColumns = function filterColumns(searchValue) {
|
|
56073
|
+
var _columns = [];
|
|
56066
56074
|
if (searchValue !== undefined && searchValue !== null && searchValue !== "") {
|
|
56067
|
-
|
|
56068
|
-
return
|
|
56069
|
-
return item.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase());
|
|
56070
|
-
});
|
|
56075
|
+
_columns = columns.filter(function (item) {
|
|
56076
|
+
return item.columnCaption.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase());
|
|
56071
56077
|
});
|
|
56072
56078
|
} else {
|
|
56073
|
-
|
|
56079
|
+
_columns = props.items;
|
|
56074
56080
|
}
|
|
56081
|
+
setColumns(_columns);
|
|
56082
|
+
updateSelectAll({
|
|
56083
|
+
columnList: _columns
|
|
56084
|
+
});
|
|
56075
56085
|
};
|
|
56076
56086
|
var selectAllChanged = function selectAllChanged(isSelected) {
|
|
56087
|
+
setSelectAll(isSelected);
|
|
56088
|
+
var newSelectedColumns = [];
|
|
56077
56089
|
if (isSelected) {
|
|
56078
|
-
|
|
56079
|
-
return [].concat(prev, columns).filter(uniqueRecords);
|
|
56080
|
-
});
|
|
56090
|
+
newSelectedColumns = [].concat(selectedColumns, columns).filter(uniqueRecords);
|
|
56081
56091
|
} else {
|
|
56082
|
-
|
|
56083
|
-
return
|
|
56084
|
-
return
|
|
56085
|
-
return x === item;
|
|
56086
|
-
});
|
|
56092
|
+
newSelectedColumns = selectedColumns.filter(function (item) {
|
|
56093
|
+
return !columns.some(function (x) {
|
|
56094
|
+
return x.columnName === item.columnName;
|
|
56087
56095
|
});
|
|
56088
56096
|
});
|
|
56089
56097
|
}
|
|
56098
|
+
setSelectedColumns(newSelectedColumns);
|
|
56099
|
+
props.onSelection && props.onSelection(columns.map(function (item) {
|
|
56100
|
+
return item.columnName;
|
|
56101
|
+
}), isSelected);
|
|
56102
|
+
};
|
|
56103
|
+
var selectChanged = function selectChanged(isSelected, column) {
|
|
56104
|
+
var newSelectedColumns = [];
|
|
56105
|
+
if (isSelected) {
|
|
56106
|
+
newSelectedColumns = [].concat(selectedColumns, [column]).filter(uniqueRecords);
|
|
56107
|
+
} else {
|
|
56108
|
+
newSelectedColumns = selectedColumns.filter(function (item) {
|
|
56109
|
+
return item.columnName !== column.columnName;
|
|
56110
|
+
});
|
|
56111
|
+
}
|
|
56112
|
+
setSelectedColumns(newSelectedColumns);
|
|
56113
|
+
updateSelectAll({
|
|
56114
|
+
selectedColumnList: newSelectedColumns
|
|
56115
|
+
});
|
|
56116
|
+
props.onSelection && props.onSelection([column.columnName], isSelected);
|
|
56117
|
+
};
|
|
56118
|
+
var updateSelectAll = function updateSelectAll(params) {
|
|
56119
|
+
var columnList = params.columnList,
|
|
56120
|
+
selectedColumnList = params.selectedColumnList;
|
|
56121
|
+
setSelectAll(isAllSelected({
|
|
56122
|
+
columnList: columnList,
|
|
56123
|
+
selectedColumnList: selectedColumnList
|
|
56124
|
+
}));
|
|
56090
56125
|
};
|
|
56091
|
-
var selectChanged = function selectChanged(_isSelected, _columnName) {};
|
|
56092
56126
|
var isSelected = function isSelected(columnName) {
|
|
56093
|
-
return selectedColumns.some(
|
|
56127
|
+
return selectedColumns.some(function (item) {
|
|
56128
|
+
return item.columnName === columnName;
|
|
56129
|
+
});
|
|
56094
56130
|
};
|
|
56131
|
+
var isAllSelected = function isAllSelected(params) {
|
|
56132
|
+
var _params$columnList, _params$selectedColum;
|
|
56133
|
+
var _columns = (_params$columnList = params === null || params === void 0 ? void 0 : params.columnList) != null ? _params$columnList : columns;
|
|
56134
|
+
var _selectedColumns = (_params$selectedColum = params === null || params === void 0 ? void 0 : params.selectedColumnList) != null ? _params$selectedColum : selectedColumns;
|
|
56135
|
+
var _result = true;
|
|
56136
|
+
lodash.forEach(_columns, function (_column) {
|
|
56137
|
+
if (!_selectedColumns.some(function (_selectedColumn) {
|
|
56138
|
+
return _selectedColumn.columnName === _column.columnName;
|
|
56139
|
+
})) {
|
|
56140
|
+
_result = false;
|
|
56141
|
+
return;
|
|
56142
|
+
}
|
|
56143
|
+
});
|
|
56144
|
+
return _result;
|
|
56145
|
+
};
|
|
56146
|
+
var _useState4 = React.useState(isAllSelected({
|
|
56147
|
+
columnList: props.items,
|
|
56148
|
+
selectedColumnList: initialSelectedColumns
|
|
56149
|
+
})),
|
|
56150
|
+
selectAll = _useState4[0],
|
|
56151
|
+
setSelectAll = _useState4[1];
|
|
56095
56152
|
var content = React__default.createElement("div", {
|
|
56096
56153
|
className: timelineTableStyles.columnChooserPopup
|
|
56097
56154
|
}, React__default.createElement("div", {
|
|
56098
56155
|
className: timelineTableStyles.columnChooserHeader
|
|
56099
56156
|
}, React__default.createElement("span", null, props.title), React__default.createElement("span", {
|
|
56100
|
-
className: timelineTableStyles.columnChooserCloseButton
|
|
56157
|
+
className: timelineTableStyles.columnChooserCloseButton
|
|
56158
|
+
}, React__default.createElement(outline.CrossIcon, {
|
|
56159
|
+
style: {
|
|
56160
|
+
cursor: "pointer"
|
|
56161
|
+
},
|
|
56101
56162
|
onClick: function onClick() {
|
|
56102
56163
|
return setOpen(false);
|
|
56103
56164
|
}
|
|
56104
|
-
}
|
|
56165
|
+
}))), React__default.createElement(OdsInput, {
|
|
56105
56166
|
key: "OdsTimelineTableColumnChooser_OdsSearch",
|
|
56106
56167
|
prefix: React__default.createElement("span", {
|
|
56107
56168
|
className: "dx-icon-search " + timelineTableStyles.searchBoxIcon
|
|
56108
56169
|
}),
|
|
56109
|
-
className: timelineTableStyles.
|
|
56170
|
+
className: timelineTableStyles.columnChooserSearchbox,
|
|
56110
56171
|
onChange: function onChange(e) {
|
|
56111
56172
|
return filterColumns(e.target.value);
|
|
56112
56173
|
}
|
|
56113
56174
|
}), React__default.createElement(OdsCheckbox, {
|
|
56114
|
-
|
|
56175
|
+
className: timelineTableStyles.columnChooserCheckbox,
|
|
56176
|
+
checked: selectAll,
|
|
56115
56177
|
onChange: function onChange(e) {
|
|
56116
|
-
return selectAllChanged(e.target.
|
|
56178
|
+
return selectAllChanged(e.target.checked);
|
|
56117
56179
|
}
|
|
56118
|
-
}), React__default.createElement(antd.Divider, {
|
|
56180
|
+
}, props.selectAllText), React__default.createElement(antd.Divider, {
|
|
56119
56181
|
className: timelineTableStyles.columnChooserDivider
|
|
56120
|
-
}), columns.map(function (
|
|
56121
|
-
return React__default.createElement(OdsCheckbox, {
|
|
56182
|
+
}), columns.map(function (_column, index) {
|
|
56183
|
+
return React__default.createElement("div", null, React__default.createElement(OdsCheckbox, {
|
|
56122
56184
|
key: "OdsTimelineTableColumnChooser_OdsCheckbox_" + index,
|
|
56123
|
-
|
|
56185
|
+
className: timelineTableStyles.columnChooserCheckbox,
|
|
56186
|
+
checked: isSelected(_column.columnName),
|
|
56124
56187
|
onChange: function onChange(e) {
|
|
56125
|
-
return selectChanged();
|
|
56188
|
+
return selectChanged(e.target.checked, _column);
|
|
56126
56189
|
}
|
|
56127
|
-
});
|
|
56190
|
+
}, _column.columnCaption));
|
|
56128
56191
|
}));
|
|
56129
56192
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(antd.Popover, {
|
|
56130
56193
|
open: open,
|
|
@@ -56180,6 +56243,15 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56180
56243
|
}),
|
|
56181
56244
|
sortingChangeEventProps = _useState7[0],
|
|
56182
56245
|
setSortingChangeEventProps = _useState7[1];
|
|
56246
|
+
var _useState8 = React.useState(customColumns),
|
|
56247
|
+
columnList = _useState8[0],
|
|
56248
|
+
setColumnList = _useState8[1];
|
|
56249
|
+
var _useState9 = React.useState(customColumns.filter(function (item) {
|
|
56250
|
+
return item.visible === false;
|
|
56251
|
+
}).map(function (item) {
|
|
56252
|
+
return item.name;
|
|
56253
|
+
})),
|
|
56254
|
+
unvisibleColumnNames = _useState9[0];
|
|
56183
56255
|
var originalSortingMode = sorting.mode === undefined || sorting.mode === "" ? "none" : sorting.mode;
|
|
56184
56256
|
var sortingMode = sortingProcess == "ServerSideSorting" ? "none" : originalSortingMode;
|
|
56185
56257
|
var showSortIndexes = sortingProcess == "ServerSideSorting" ? false : sorting.showSortIndexes;
|
|
@@ -56260,7 +56332,7 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56260
56332
|
updateSelectionData(e.data[props.customTaskKey].toString(), e.isSelected);
|
|
56261
56333
|
onCustomSelectionChanged && onCustomSelectionChanged(e);
|
|
56262
56334
|
};
|
|
56263
|
-
var timelineColumns = multiSelectionEnabled ? [OdsTimelineSelectionColumn(onTimelineCheckboxSelectionChange)].concat(
|
|
56335
|
+
var timelineColumns = multiSelectionEnabled ? [OdsTimelineSelectionColumn(onTimelineCheckboxSelectionChange)].concat(columnList) : columnList;
|
|
56264
56336
|
var minimalHeaderCellComponent = function minimalHeaderCellComponent(data) {
|
|
56265
56337
|
return customHeaderCellComponent(data, true);
|
|
56266
56338
|
};
|
|
@@ -56365,6 +56437,33 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56365
56437
|
endDate: e.endDate
|
|
56366
56438
|
});
|
|
56367
56439
|
};
|
|
56440
|
+
var onColumnChooserSelection = function onColumnChooserSelection(items, isSelected) {
|
|
56441
|
+
var _props$toolbarSetting, _props$toolbarSetting2, _props$toolbarSetting3, _props$toolbarSetting4;
|
|
56442
|
+
var _visibleColumns = columnList.filter(function (item) {
|
|
56443
|
+
return item.visible !== false;
|
|
56444
|
+
});
|
|
56445
|
+
if (isSelected) {
|
|
56446
|
+
_visibleColumns = [].concat(_visibleColumns, customColumns.filter(function (item) {
|
|
56447
|
+
return items.includes(item.name);
|
|
56448
|
+
})).filter(uniqueRecords);
|
|
56449
|
+
} else {
|
|
56450
|
+
_visibleColumns = _visibleColumns.filter(function (item) {
|
|
56451
|
+
return !items.includes(item.name);
|
|
56452
|
+
});
|
|
56453
|
+
}
|
|
56454
|
+
_visibleColumns = _visibleColumns.filter(function (x) {
|
|
56455
|
+
return !unvisibleColumnNames.includes(x.name);
|
|
56456
|
+
});
|
|
56457
|
+
setColumnList(function (prev) {
|
|
56458
|
+
return prev.map(function (item) {
|
|
56459
|
+
item.visible = _visibleColumns.some(function (x) {
|
|
56460
|
+
return x.name === item.name;
|
|
56461
|
+
});
|
|
56462
|
+
return item;
|
|
56463
|
+
});
|
|
56464
|
+
});
|
|
56465
|
+
((_props$toolbarSetting = props.toolbarSettings) === null || _props$toolbarSetting === void 0 ? void 0 : (_props$toolbarSetting2 = _props$toolbarSetting.columnChooser) === null || _props$toolbarSetting2 === void 0 ? void 0 : _props$toolbarSetting2.onSelection) && ((_props$toolbarSetting3 = props.toolbarSettings) === null || _props$toolbarSetting3 === void 0 ? void 0 : (_props$toolbarSetting4 = _props$toolbarSetting3.columnChooser) === null || _props$toolbarSetting4 === void 0 ? void 0 : _props$toolbarSetting4.onSelection(items, isSelected));
|
|
56466
|
+
};
|
|
56368
56467
|
var searchBoxComponent = function searchBoxComponent(props) {
|
|
56369
56468
|
var _toolbarSettings$sear4;
|
|
56370
56469
|
var filterInAllFields = function filterInAllFields(item, searchValue) {
|
|
@@ -56419,13 +56518,13 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56419
56518
|
var getExportFileName = function getExportFileName() {
|
|
56420
56519
|
var _toolbarSettings$expo4, _toolbarSettings$expo5;
|
|
56421
56520
|
var now = new Date();
|
|
56422
|
-
var datePart = (
|
|
56423
|
-
var timePart = (
|
|
56521
|
+
var datePart = ("0" + now.getDate()).slice(-2) + "-" + ("0" + (now.getMonth() + 1)).slice(-2) + "-" + now.getFullYear();
|
|
56522
|
+
var timePart = ("0" + now.getHours()).slice(-2) + ":" + ("0" + now.getMinutes()).slice(-2);
|
|
56424
56523
|
return ((_toolbarSettings$expo4 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$expo5 = toolbarSettings["export"]) === null || _toolbarSettings$expo5 === void 0 ? void 0 : _toolbarSettings$expo5.fileName) != null ? _toolbarSettings$expo4 : "Timeline") + "-" + datePart + "-" + timePart + ".pdf";
|
|
56425
56524
|
};
|
|
56426
56525
|
var exportedColumns = React.useMemo(function () {
|
|
56427
56526
|
var newExportedColumns = [];
|
|
56428
|
-
var exportableColumns =
|
|
56527
|
+
var exportableColumns = columnList.filter(function (item) {
|
|
56429
56528
|
return item.visible != false && item.allowExporting != false;
|
|
56430
56529
|
});
|
|
56431
56530
|
var isResizableColumn = function isResizableColumn(item) {
|
|
@@ -56446,7 +56545,7 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56446
56545
|
newExportedColumns.push(col);
|
|
56447
56546
|
});
|
|
56448
56547
|
return newExportedColumns;
|
|
56449
|
-
}, [exportableTasks]);
|
|
56548
|
+
}, [exportableTasks, columnList]);
|
|
56450
56549
|
React.useImperativeHandle(ref, function () {
|
|
56451
56550
|
return {
|
|
56452
56551
|
getSelectedRowsData: getSelectedRowsData,
|
|
@@ -56510,12 +56609,20 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
|
|
|
56510
56609
|
visible: toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$colu = toolbarSettings.columnChooser) === null || _toolbarSettings$colu === void 0 ? void 0 : _toolbarSettings$colu.visible,
|
|
56511
56610
|
location: toolbarSettings === null || toolbarSettings === void 0 ? void 0 : toolbarSettings.location,
|
|
56512
56611
|
component: function component(props) {
|
|
56513
|
-
var _toolbarSettings$colu2, _toolbarSettings$colu3;
|
|
56612
|
+
var _toolbarSettings$colu2, _toolbarSettings$colu3, _toolbarSettings$colu4, _toolbarSettings$colu5;
|
|
56514
56613
|
return OdsTimelineTableColumnChooser(_extends({}, props, {
|
|
56515
56614
|
title: (_toolbarSettings$colu2 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$colu3 = toolbarSettings.columnChooser) === null || _toolbarSettings$colu3 === void 0 ? void 0 : _toolbarSettings$colu3.title) != null ? _toolbarSettings$colu2 : "Column Chooser",
|
|
56516
|
-
|
|
56517
|
-
|
|
56518
|
-
|
|
56615
|
+
selectAllText: (_toolbarSettings$colu4 = toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$colu5 = toolbarSettings.columnChooser) === null || _toolbarSettings$colu5 === void 0 ? void 0 : _toolbarSettings$colu5.selectAllText) != null ? _toolbarSettings$colu4 : "Select All",
|
|
56616
|
+
items: columnList.filter(function (item) {
|
|
56617
|
+
return item.caption !== undefined && item.caption !== "";
|
|
56618
|
+
}).map(function (item) {
|
|
56619
|
+
return {
|
|
56620
|
+
columnCaption: item.caption,
|
|
56621
|
+
columnName: item.name,
|
|
56622
|
+
visible: item.visible
|
|
56623
|
+
};
|
|
56624
|
+
}),
|
|
56625
|
+
onSelection: onColumnChooserSelection
|
|
56519
56626
|
}));
|
|
56520
56627
|
}
|
|
56521
56628
|
})) : "", React__default.createElement(gantt.ContextMenu, {
|