d2coreui 21.0.15 → 21.0.17
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/components/clipboard/clipboardUtils.js.map +1 -1
- package/components/codemirror/SyntaxHighlighter.js.map +1 -1
- package/components/collapse/expandable.js.map +1 -1
- package/components/color/colorPicker.d.ts +1 -0
- package/components/color/colorPicker.js +1 -1
- package/components/color/colorPicker.js.map +1 -1
- package/components/color/colorSwatch.js.map +1 -1
- package/components/color/colorUtils.js.map +1 -1
- package/components/date/dateRangeInput.js +2 -2
- package/components/date/dateRangeInput.js.map +1 -1
- package/components/date/dateRangeInputAdvancedPanel.js.map +1 -1
- package/components/date/dateRangeInputConfirm.js.map +1 -1
- package/components/date/dateTimeInput.d.ts +2 -0
- package/components/date/dateTimeInput.js +10 -4
- package/components/date/dateTimeInput.js.map +1 -1
- package/components/date/durationInput.d.ts +7 -7
- package/components/date/durationInput.js +128 -75
- package/components/date/durationInput.js.map +1 -1
- package/components/form/NiceFormItem.d.ts +13 -0
- package/components/form/NiceFormItem.js +29 -0
- package/components/form/NiceFormItem.js.map +1 -0
- package/components/grid/cell/cellEditorUtils.js.map +1 -1
- package/components/grid/cell/customEnumCellEditor.js.map +1 -1
- package/components/grid/cell/dateCellEditor.js +1 -1
- package/components/grid/cell/dateCellEditor.js.map +1 -1
- package/components/grid/cell/durationCellEditor.js.map +1 -1
- package/components/grid/cell/hexaOctetStringCellEditor.js.map +1 -1
- package/components/grid/cell/hexaValueCellEditor.js.map +1 -1
- package/components/grid/cell/numberCellEditor.js.map +1 -1
- package/components/grid/cell/rangeSelector.js.map +1 -1
- package/components/grid/cell/simpleStatusTextCellEditor.js.map +1 -1
- package/components/grid/cell/statusTextCellEditor.js.map +1 -1
- package/components/grid/cell/tableDefaultRowStyleRules.js.map +1 -1
- package/components/grid/cell/textCellEditor.js +5 -1
- package/components/grid/cell/textCellEditor.js.map +1 -1
- package/components/grid/cell/wildcardQuickFilter.js.map +1 -1
- package/components/grid/columnUtils.js.map +1 -1
- package/components/grid/config/columnTransfer.js.map +1 -1
- package/components/grid/config/dataGridEditor.js.map +1 -1
- package/components/grid/config/rowStylePicker.js.map +1 -1
- package/components/grid/dataGrid.d.ts +3 -2
- package/components/grid/dataGrid.js +51 -54
- package/components/grid/dataGrid.js.map +1 -1
- package/components/grid/export/contextMenu.d.ts +2 -1
- package/components/grid/export/contextMenu.js +3 -3
- package/components/grid/export/contextMenu.js.map +1 -1
- package/components/grid/export/progressPopup.js.map +1 -1
- package/components/grid/export/worker/clipboardExport.js.map +1 -1
- package/components/grid/export/worker/csvExport.js.map +1 -1
- package/components/grid/export/worker/pdfExport.js.map +1 -1
- package/components/grid/export/worker/txtExport.js.map +1 -1
- package/components/grid/extendedDataGrid.d.ts +1 -0
- package/components/grid/extendedDataGrid.js +6 -2
- package/components/grid/extendedDataGrid.js.map +1 -1
- package/components/grid/filter/customColumnFilter.js.map +1 -1
- package/components/grid/filter/dateColumnFilter.js.map +1 -1
- package/components/grid/filter/textColumnFilter.js.map +1 -1
- package/components/grid/header/simpleHeader.js.map +1 -1
- package/components/grid/panel/dataGridPagination.d.ts +16 -0
- package/components/grid/panel/dataGridPagination.js +59 -0
- package/components/grid/panel/dataGridPagination.js.map +1 -0
- package/components/grid/panel/loadingOverlay.js.map +1 -1
- package/components/grid/panel/noRecordsOverlay.js.map +1 -1
- package/components/grid/panel/tablePagination.js.map +1 -1
- package/components/icons/ant-design-double-right-outline.svg +5 -5
- package/components/icons/ant-design_close-outline.svg +5 -5
- package/components/icons/undoIcon.js.map +1 -1
- package/components/input/autoCompleteInput.js.map +1 -1
- package/components/input/draftUtils.js.map +1 -1
- package/components/input/draftail.js.map +1 -1
- package/components/input/hexaFormattedInput.js.map +1 -1
- package/components/input/mask/helpers.js.map +1 -1
- package/components/input/mask/inputMaskCore.js.map +1 -1
- package/components/input/mask/pattern.js.map +1 -1
- package/components/input/maskedInput.d.ts +2 -2
- package/components/input/maskedInput.js.map +1 -1
- package/components/input/passwordInput.js.map +1 -1
- package/components/input/simpleAutoComplete.js.map +1 -1
- package/components/input/textarea/extractSpansOfClasses.js.map +1 -1
- package/components/input/textarea/getRanges.js.map +1 -1
- package/components/input/textarea/getType.js.map +1 -1
- package/components/input/textarea/highlighedContents.js.map +1 -1
- package/components/input/textarea/mentionsWithHighlighting.js +1 -1
- package/components/input/textarea/mentionsWithHighlighting.js.map +1 -1
- package/components/keyboard/keyboardUtils.js.map +1 -1
- package/components/modal/draggableModalProvider.js.map +1 -1
- package/components/modal/impl/clamp.js.map +1 -1
- package/components/modal/impl/draggableModal.js.map +1 -1
- package/components/modal/impl/draggableModalContext.js.map +1 -1
- package/components/modal/impl/draggableModalInner.js.map +1 -1
- package/components/modal/impl/draggableModalReducer.js.map +1 -1
- package/components/modal/impl/getWindowSize.js.map +1 -1
- package/components/modal/impl/index.js.map +1 -1
- package/components/modal/impl/resizeHandle.js.map +1 -1
- package/components/modal/impl/useDrag.js.map +1 -1
- package/components/modal/impl/usePrevious.js.map +1 -1
- package/components/modal/impl/useResize.js.map +1 -1
- package/components/modal/modalDialog.js.map +1 -1
- package/components/picker/enumValuePicker.js.map +1 -1
- package/components/platformSpecific.js.map +1 -1
- package/components/scrollTo/onlyText.js.map +1 -1
- package/components/scrollTo/scrollTo.js.map +1 -1
- package/components/table/dataTable.d.ts +1 -0
- package/components/table/dataTable.js.map +1 -1
- package/components/table/dragSortingTable.js.map +1 -1
- package/components/text/impl/innerSize.js.map +1 -1
- package/components/text/impl/series.js.map +1 -1
- package/components/text/impl/shallowEqual.js.map +1 -1
- package/components/text/impl/uniqueId.js.map +1 -1
- package/components/text/impl/whilst.js.map +1 -1
- package/components/text/textFit.js.map +1 -1
- package/i18n/components.cs.json +100 -0
- package/i18n/components.sk.json +5 -1
- package/i18n/componentsLocaleHolder.d.ts +1 -1
- package/i18n/componentsLocaleHolder.js +6 -4
- package/i18n/componentsLocaleHolder.js.map +1 -1
- package/package.json +70 -70
- package/style/ag-grid/_ag-theme-antd-vars.scss +194 -194
- package/style/ag-grid/ag-theme-antd.scss +87 -87
- package/style/ag-grid/aggrid-adaptations.css +42 -42
- package/style/ag-grid/aggrid.scss +11 -11
- package/style/antd/antd-tree-showline.css +24 -24
- package/style/antd/full-height-tabs.scss +62 -62
- package/style/draftail/draftail-editor.css +179 -179
- package/style/flexLayout/flexLayout.scss +130 -130
- package/style/flexLayout/flexLayoutBase.scss +623 -623
- package/style/flexLayout/new/flexLayoutBase.scss +621 -621
- package/style/form/niceFormItem.css +39 -0
- package/style/index.less +291 -291
- package/style/loading.css +31 -31
- package/style/modal/DraggableModal.css +40 -40
- package/style/modal/ResizeHandle.css +19 -19
- package/style/splitPane/splitPane.css +48 -48
- package/style/table/dragSortingTable.css +6 -6
- package/components/date/millisecondDatePicker.d.ts +0 -16
- package/components/date/millisecondDatePicker.js +0 -56
- package/components/date/millisecondDatePicker.js.map +0 -1
|
@@ -22,7 +22,6 @@ import SimpleHeader from "d2coreui/components/grid/header/simpleHeader";
|
|
|
22
22
|
import DataGridEditor from "d2coreui/components/grid/config/dataGridEditor";
|
|
23
23
|
import i18n from "d2core/i18n/i18n";
|
|
24
24
|
import AutoCompleteInput from "d2coreui/components/input/autoCompleteInput";
|
|
25
|
-
import TablePagination from "d2coreui/components/grid/panel/tablePagination";
|
|
26
25
|
import isEqual from "lodash/isEqual";
|
|
27
26
|
import ContextMenu from "d2coreui/components/grid/export/contextMenu";
|
|
28
27
|
import LoadingOverlay from "d2coreui/components/grid/panel/loadingOverlay";
|
|
@@ -53,8 +52,9 @@ import CustomEnumCellEditor from "d2coreui/components/grid/cell/customEnumCellEd
|
|
|
53
52
|
import HexaValueCellEditor from "d2coreui/components/grid/cell/hexaValueCellEditor";
|
|
54
53
|
import HexaOctetStringCellEditor from "d2coreui/components/grid/cell/hexaOctetStringCellEditor";
|
|
55
54
|
import ReactDOM from "react-dom";
|
|
56
|
-
import { D2000UnixTimeNullValue, unixTimeToMoment } from "d2core/types/
|
|
55
|
+
import { D2000UnixTimeNullValue, unixTimeToMoment } from "d2core/types/unixTimeUtils";
|
|
57
56
|
import { compileExpression } from "filtrex";
|
|
57
|
+
import DataGridPagination from "./panel/dataGridPagination";
|
|
58
58
|
const gridFrameworkComponents = {
|
|
59
59
|
customColumnFilter: CustomColumnFilter,
|
|
60
60
|
textColumnFilter: TextColumnFilter,
|
|
@@ -144,7 +144,7 @@ export default class DataGrid extends React.Component {
|
|
|
144
144
|
"localizedArrayColumn": {
|
|
145
145
|
cellRenderer: (params) => {
|
|
146
146
|
const value = DataGrid.getCellValue(params);
|
|
147
|
-
if (value) {
|
|
147
|
+
if (value !== undefined) {
|
|
148
148
|
return value.map((s) => i18n(s)).join(",");
|
|
149
149
|
}
|
|
150
150
|
else {
|
|
@@ -156,14 +156,14 @@ export default class DataGrid extends React.Component {
|
|
|
156
156
|
},
|
|
157
157
|
filterValueGetter: function (params) {
|
|
158
158
|
const value = DataGrid.getCellValue(params);
|
|
159
|
-
if (value) {
|
|
159
|
+
if (value !== undefined) {
|
|
160
160
|
return value.map((s) => i18n(s)).join(",");
|
|
161
161
|
}
|
|
162
162
|
return null;
|
|
163
163
|
},
|
|
164
164
|
getQuickFilterText: function (params) {
|
|
165
165
|
const value = DataGrid.getCellValue(params);
|
|
166
|
-
if (value) {
|
|
166
|
+
if (value !== undefined) {
|
|
167
167
|
return value.map((s) => i18n(s)).join(",");
|
|
168
168
|
}
|
|
169
169
|
return "";
|
|
@@ -172,7 +172,7 @@ export default class DataGrid extends React.Component {
|
|
|
172
172
|
"numberColumn": {
|
|
173
173
|
cellRenderer: (params) => {
|
|
174
174
|
const value = DataGrid.getCellValue(params);
|
|
175
|
-
if (value
|
|
175
|
+
if (value !== undefined) {
|
|
176
176
|
return LocaleHolder.formatNumber(value);
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
@@ -184,7 +184,7 @@ export default class DataGrid extends React.Component {
|
|
|
184
184
|
},
|
|
185
185
|
filterValueGetter: function (params) {
|
|
186
186
|
const value = DataGrid.getCellValue(params);
|
|
187
|
-
if (value
|
|
187
|
+
if (value) {
|
|
188
188
|
return LocaleHolder.formatNumber(value);
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
@@ -193,7 +193,7 @@ export default class DataGrid extends React.Component {
|
|
|
193
193
|
},
|
|
194
194
|
getQuickFilterText: function (params) {
|
|
195
195
|
const value = DataGrid.getCellValue(params);
|
|
196
|
-
if (value
|
|
196
|
+
if (value !== undefined) {
|
|
197
197
|
return LocaleHolder.formatNumber(value);
|
|
198
198
|
}
|
|
199
199
|
else {
|
|
@@ -204,7 +204,7 @@ export default class DataGrid extends React.Component {
|
|
|
204
204
|
"dateColumn": {
|
|
205
205
|
cellRenderer: (params) => {
|
|
206
206
|
const value = DataGrid.getCellValue(params);
|
|
207
|
-
if (value) {
|
|
207
|
+
if (value !== undefined) {
|
|
208
208
|
if (value === D2000UnixTimeNullValue) {
|
|
209
209
|
return "---";
|
|
210
210
|
}
|
|
@@ -218,7 +218,7 @@ export default class DataGrid extends React.Component {
|
|
|
218
218
|
},
|
|
219
219
|
valueFormatter: (params) => {
|
|
220
220
|
const value = DataGrid.getCellValue(params);
|
|
221
|
-
if (value) {
|
|
221
|
+
if (value !== undefined) {
|
|
222
222
|
return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));
|
|
223
223
|
}
|
|
224
224
|
return "---";
|
|
@@ -228,14 +228,14 @@ export default class DataGrid extends React.Component {
|
|
|
228
228
|
},
|
|
229
229
|
filterValueGetter: (params) => {
|
|
230
230
|
const value = DataGrid.getCellValue(params);
|
|
231
|
-
if (value) {
|
|
231
|
+
if (value !== undefined) {
|
|
232
232
|
return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));
|
|
233
233
|
}
|
|
234
234
|
return null;
|
|
235
235
|
},
|
|
236
236
|
getQuickFilterText: (params) => {
|
|
237
237
|
const value = DataGrid.getCellValue(params);
|
|
238
|
-
if (value) {
|
|
238
|
+
if (value !== undefined) {
|
|
239
239
|
return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));
|
|
240
240
|
}
|
|
241
241
|
return "";
|
|
@@ -244,9 +244,9 @@ export default class DataGrid extends React.Component {
|
|
|
244
244
|
"dateTimeColumn": {
|
|
245
245
|
cellRenderer: (params) => {
|
|
246
246
|
const value = DataGrid.getCellValue(params);
|
|
247
|
-
if (value) {
|
|
247
|
+
if (value !== undefined) {
|
|
248
248
|
if (value === D2000UnixTimeNullValue) {
|
|
249
|
-
return "
|
|
249
|
+
return "Null Time";
|
|
250
250
|
}
|
|
251
251
|
let tooltipValue;
|
|
252
252
|
tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true));
|
|
@@ -258,7 +258,7 @@ export default class DataGrid extends React.Component {
|
|
|
258
258
|
},
|
|
259
259
|
valueFormatter: (params) => {
|
|
260
260
|
const value = DataGrid.getCellValue(params);
|
|
261
|
-
if (value) {
|
|
261
|
+
if (value !== undefined) {
|
|
262
262
|
return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds));
|
|
263
263
|
}
|
|
264
264
|
return "---";
|
|
@@ -268,14 +268,14 @@ export default class DataGrid extends React.Component {
|
|
|
268
268
|
},
|
|
269
269
|
filterValueGetter: (params) => {
|
|
270
270
|
const value = DataGrid.getCellValue(params);
|
|
271
|
-
if (value) {
|
|
271
|
+
if (value !== undefined) {
|
|
272
272
|
return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds));
|
|
273
273
|
}
|
|
274
274
|
return null;
|
|
275
275
|
},
|
|
276
276
|
getQuickFilterText: (params) => {
|
|
277
277
|
const value = DataGrid.getCellValue(params);
|
|
278
|
-
if (value) {
|
|
278
|
+
if (value !== undefined) {
|
|
279
279
|
return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds));
|
|
280
280
|
}
|
|
281
281
|
return "";
|
|
@@ -284,7 +284,7 @@ export default class DataGrid extends React.Component {
|
|
|
284
284
|
"fromNowDateTimeColumn": {
|
|
285
285
|
cellRenderer: (params) => {
|
|
286
286
|
const value = DataGrid.getCellValue(params);
|
|
287
|
-
if (value) {
|
|
287
|
+
if (value !== undefined) {
|
|
288
288
|
let tooltipValue;
|
|
289
289
|
tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true));
|
|
290
290
|
return `<span title="${tooltipValue}">${unixTimeToMoment(value).fromNow()}</span>`;
|
|
@@ -295,7 +295,7 @@ export default class DataGrid extends React.Component {
|
|
|
295
295
|
},
|
|
296
296
|
valueFormatter: (params) => {
|
|
297
297
|
const value = DataGrid.getCellValue(params);
|
|
298
|
-
if (value) {
|
|
298
|
+
if (value !== undefined) {
|
|
299
299
|
return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds));
|
|
300
300
|
}
|
|
301
301
|
return "---";
|
|
@@ -305,14 +305,14 @@ export default class DataGrid extends React.Component {
|
|
|
305
305
|
},
|
|
306
306
|
filterValueGetter: (params) => {
|
|
307
307
|
const value = DataGrid.getCellValue(params);
|
|
308
|
-
if (value) {
|
|
308
|
+
if (value !== undefined) {
|
|
309
309
|
return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds));
|
|
310
310
|
}
|
|
311
311
|
return null;
|
|
312
312
|
},
|
|
313
313
|
getQuickFilterText: (params) => {
|
|
314
314
|
const value = DataGrid.getCellValue(params);
|
|
315
|
-
if (value) {
|
|
315
|
+
if (value !== undefined) {
|
|
316
316
|
return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds));
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
@@ -321,9 +321,8 @@ export default class DataGrid extends React.Component {
|
|
|
321
321
|
"escapedValueColumn": {
|
|
322
322
|
cellRenderer: (params) => {
|
|
323
323
|
const value = DataGrid.getCellValue(params);
|
|
324
|
-
if (value) {
|
|
325
|
-
|
|
326
|
-
return `<span style="white-space: pre" title="${text}">${text}</span>`;
|
|
324
|
+
if (value !== undefined) {
|
|
325
|
+
return `<span style="white-space: pre" title="${escape(value)}">${typeof value === "string" ? escape(value.replace(/[\r\n]+/g, ' ')) : value}</span>`;
|
|
327
326
|
}
|
|
328
327
|
else {
|
|
329
328
|
return "";
|
|
@@ -331,7 +330,7 @@ export default class DataGrid extends React.Component {
|
|
|
331
330
|
},
|
|
332
331
|
valueFormatter: (params) => {
|
|
333
332
|
const value = DataGrid.getCellValue(params);
|
|
334
|
-
if (value) {
|
|
333
|
+
if (value !== undefined) {
|
|
335
334
|
return typeof value === "string" ? value.replace(/[\r\n]+/g, ' ') : value;
|
|
336
335
|
}
|
|
337
336
|
else {
|
|
@@ -715,20 +714,23 @@ export default class DataGrid extends React.Component {
|
|
|
715
714
|
}, 400);
|
|
716
715
|
}
|
|
717
716
|
if (this.props.autofocus) {
|
|
718
|
-
|
|
719
|
-
var _a, _b, _c, _d;
|
|
720
|
-
if (!this.isActive()) {
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
const columnModel = (_a = this.gridColumnApi) === null || _a === void 0 ? void 0 : _a.getColumnState();
|
|
724
|
-
let columnIdToFocus = ((_b = columnModel === null || columnModel === void 0 ? void 0 : columnModel[0]) === null || _b === void 0 ? void 0 : _b.colId) || "name";
|
|
725
|
-
const selectedNodes = (_c = this.gridApi) === null || _c === void 0 ? void 0 : _c.getSelectedNodes();
|
|
726
|
-
const selectedRowIndex = (selectedNodes && selectedNodes.length > 0 && selectedNodes[selectedNodes.length - 1].rowIndex) || 0;
|
|
727
|
-
(_d = this.gridApi) === null || _d === void 0 ? void 0 : _d.setFocusedCell(selectedRowIndex, columnIdToFocus);
|
|
728
|
-
}, 200);
|
|
717
|
+
this.focus();
|
|
729
718
|
}
|
|
730
719
|
});
|
|
731
720
|
}
|
|
721
|
+
focus() {
|
|
722
|
+
setTimeout(() => {
|
|
723
|
+
var _a, _b, _c, _d;
|
|
724
|
+
if (!this.isActive()) {
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
const columnModel = (_a = this.gridColumnApi) === null || _a === void 0 ? void 0 : _a.getColumnState();
|
|
728
|
+
let columnIdToFocus = ((_b = columnModel === null || columnModel === void 0 ? void 0 : columnModel[0]) === null || _b === void 0 ? void 0 : _b.colId) || "name";
|
|
729
|
+
const selectedNodes = (_c = this.gridApi) === null || _c === void 0 ? void 0 : _c.getSelectedNodes();
|
|
730
|
+
const selectedRowIndex = (selectedNodes && selectedNodes.length > 0 && selectedNodes[selectedNodes.length - 1].rowIndex) || 0;
|
|
731
|
+
(_d = this.gridApi) === null || _d === void 0 ? void 0 : _d.setFocusedCell(selectedRowIndex, columnIdToFocus);
|
|
732
|
+
}, 200);
|
|
733
|
+
}
|
|
732
734
|
isActive() {
|
|
733
735
|
return !!this.gridApi && !this.gridApi.destroyCalled;
|
|
734
736
|
}
|
|
@@ -1023,7 +1025,7 @@ export default class DataGrid extends React.Component {
|
|
|
1023
1025
|
if (focusedCell) {
|
|
1024
1026
|
const displayedRowAtIndex2 = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);
|
|
1025
1027
|
if (displayedRowAtIndex2) {
|
|
1026
|
-
ClipboardUtils.copyToClipboard(this.getValue(focusedCell.column, displayedRowAtIndex2));
|
|
1028
|
+
ClipboardUtils.copyToClipboard(this.getValue(focusedCell.column, displayedRowAtIndex2, true));
|
|
1027
1029
|
}
|
|
1028
1030
|
this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());
|
|
1029
1031
|
}
|
|
@@ -1036,11 +1038,11 @@ export default class DataGrid extends React.Component {
|
|
|
1036
1038
|
(_l = (_k = this.props).onKeyPressed) === null || _l === void 0 ? void 0 : _l.call(_k, params.event);
|
|
1037
1039
|
return false;
|
|
1038
1040
|
}
|
|
1039
|
-
getValue(column, row) {
|
|
1041
|
+
getValue(column, row, doNotReplaceNewline) {
|
|
1040
1042
|
var _a;
|
|
1041
1043
|
let formattedValue = (_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.getValue(column, row);
|
|
1042
|
-
if (formattedValue && typeof formattedValue === "string" && formattedValue.indexOf(EXPORT_SEPARATOR) > 0) {
|
|
1043
|
-
formattedValue = formattedValue.
|
|
1044
|
+
if (formattedValue && typeof formattedValue === "string" && formattedValue.indexOf(EXPORT_SEPARATOR) > 0 && !doNotReplaceNewline) {
|
|
1045
|
+
formattedValue = formattedValue.replace(/[\n\r]+/, ' ');
|
|
1044
1046
|
}
|
|
1045
1047
|
const valueFormatter = column.getColDef().valueFormatter;
|
|
1046
1048
|
if (valueFormatter) {
|
|
@@ -1115,7 +1117,7 @@ export default class DataGrid extends React.Component {
|
|
|
1115
1117
|
rowCount = virtualRowCount ? virtualRowCount : 0;
|
|
1116
1118
|
}
|
|
1117
1119
|
}
|
|
1118
|
-
progressPopup.setRecordCount(rowCount);
|
|
1120
|
+
progressPopup === null || progressPopup === void 0 ? void 0 : progressPopup.setRecordCount(rowCount);
|
|
1119
1121
|
let percentStep = Math.floor(rowCount / 100);
|
|
1120
1122
|
if (percentStep < 100) {
|
|
1121
1123
|
percentStep = 100;
|
|
@@ -1129,7 +1131,7 @@ export default class DataGrid extends React.Component {
|
|
|
1129
1131
|
});
|
|
1130
1132
|
tableContent.push(record);
|
|
1131
1133
|
if (index % percentStep === 0) {
|
|
1132
|
-
progressPopup.update(Math.floor(index / rowCount * 100) - 1);
|
|
1134
|
+
progressPopup === null || progressPopup === void 0 ? void 0 : progressPopup.update(Math.floor(index / rowCount * 100) - 1);
|
|
1133
1135
|
await TimeUtils.sleep(100);
|
|
1134
1136
|
}
|
|
1135
1137
|
}
|
|
@@ -1155,12 +1157,12 @@ export default class DataGrid extends React.Component {
|
|
|
1155
1157
|
} while (record.filter((cell) => !!cell).length === 0);
|
|
1156
1158
|
tableContent.push(record);
|
|
1157
1159
|
if (index % percentStep === 0) {
|
|
1158
|
-
progressPopup.update(Math.floor(index / rowCount * 100) - 1);
|
|
1160
|
+
progressPopup === null || progressPopup === void 0 ? void 0 : progressPopup.update(Math.floor(index / rowCount * 100) - 1);
|
|
1159
1161
|
await TimeUtils.sleep(100);
|
|
1160
1162
|
}
|
|
1161
1163
|
}
|
|
1162
1164
|
}
|
|
1163
|
-
progressPopup.update(99);
|
|
1165
|
+
progressPopup === null || progressPopup === void 0 ? void 0 : progressPopup.update(99);
|
|
1164
1166
|
await TimeUtils.sleep(300);
|
|
1165
1167
|
return tableContent;
|
|
1166
1168
|
}
|
|
@@ -1334,19 +1336,14 @@ export default class DataGrid extends React.Component {
|
|
|
1334
1336
|
return customFrameworkComponents;
|
|
1335
1337
|
}
|
|
1336
1338
|
renderNavigationPanel() {
|
|
1337
|
-
var _a;
|
|
1339
|
+
var _a, _b;
|
|
1338
1340
|
return (React.createElement(React.Fragment, null,
|
|
1339
1341
|
this.props.toolbar && this.props.toolbar.renderToolbar ? this.props.toolbar.renderToolbar(this.renderToolBarWithSearch()) : this.renderToolBarWithSearch(),
|
|
1340
1342
|
this.props.paging.pageSize >= 0 &&
|
|
1341
|
-
React.createElement(
|
|
1342
|
-
|
|
1343
|
-
textAlign: "right",
|
|
1344
|
-
whiteSpace: "nowrap",
|
|
1345
|
-
marginLeft: "24px"
|
|
1346
|
-
}, onChange: (selectedPage, _) => {
|
|
1347
|
-
this.onGoToPage(selectedPage - 1);
|
|
1343
|
+
React.createElement(DataGridPagination, { disabled: this.state.loading, current: this.state.pageIndex ? this.state.pageIndex + 1 : 1, pageSize: this.state.pageSize ? this.state.pageSize : 20, total: (_a = this.state.recordsCount) !== null && _a !== void 0 ? _a : 1, onGoToPage: page => {
|
|
1344
|
+
this.onGoToPage(page - 1);
|
|
1348
1345
|
} }),
|
|
1349
|
-
this.props.paging.pageSize < 0 && this.state.recordsCount && !((
|
|
1346
|
+
this.props.paging.pageSize < 0 && this.state.recordsCount && !((_b = this.props.toolbar) === null || _b === void 0 ? void 0 : _b.hideRecordCount) ?
|
|
1350
1347
|
React.createElement("span", { className: "ant-pagination-total-text", style: {
|
|
1351
1348
|
flex: "0 1 auto",
|
|
1352
1349
|
textAlign: "right",
|
|
@@ -1411,7 +1408,7 @@ export default class DataGrid extends React.Component {
|
|
|
1411
1408
|
}
|
|
1412
1409
|
renderContextMenu() {
|
|
1413
1410
|
var _a, _b;
|
|
1414
|
-
return React.createElement(ContextMenu, { onlySelectedNodes: true, showMilliseconds: !!this.props.showMilliseconds, showYear: !this.props.hideYear, renderer: (_a = this.props.contextMenu) === null || _a === void 0 ? void 0 : _a.renderer, onClick: (_b = this.props.contextMenu) === null || _b === void 0 ? void 0 : _b.onClick, getExportContent: this.getExportContent });
|
|
1411
|
+
return React.createElement(ContextMenu, { onlySelectedNodes: true, showMilliseconds: !!this.props.showMilliseconds, showYear: !this.props.hideYear, renderer: (_a = this.props.contextMenu) === null || _a === void 0 ? void 0 : _a.renderer, onClick: (_b = this.props.contextMenu) === null || _b === void 0 ? void 0 : _b.onClick, getExportContent: this.getExportContent, hideNotificationOnClipboardCopy: true });
|
|
1415
1412
|
}
|
|
1416
1413
|
getAdaptedColumnDefs(columnDefs, floatingFilterEnabled, disableColumnDefsPreprocessing) {
|
|
1417
1414
|
if (columnDefs.length === 0) {
|