ods-component-lib 1.19.15 → 1.20.0

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.
Files changed (31) hide show
  1. package/README.md +39 -39
  2. package/dist/components/antd/button/OdsButton.styled.d.ts +1 -1
  3. package/dist/components/antd/timepicker/OdsTimepicker.styled.d.ts +1 -1
  4. package/dist/index.css +267 -267
  5. package/dist/index.js +74 -364
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.modern.js +74 -364
  8. package/dist/index.modern.js.map +1 -1
  9. package/dist/stories/OdsDatepicker/OdsDatepicker.stories.d.ts +2 -2
  10. package/package.json +101 -101
  11. package/dist/components/antd/datepicker/OdsDatepicker.styled.d.ts +0 -1
  12. package/dist/components/antd/input/OdsInput..d.ts +0 -4
  13. package/dist/components/devextreme/OdsCabinDataGrid/OdsCabinGrid.Constants.d.ts +0 -3
  14. package/dist/components/devextreme/OdsCabinDataGrid/OdsCabinGrid.Functions.d.ts +0 -4
  15. package/dist/components/devextreme/OdsCabinDataGrid/OdsCabinGrid.Helpers.d.ts +0 -12
  16. package/dist/components/devextreme/OdsCabinDataGrid/OdsCabinGrid.Style.d.ts +0 -94
  17. package/dist/components/devextreme/OdsCabinDataGrid/OdsCabinGrid.Types.d.ts +0 -46
  18. package/dist/components/devextreme/OdsCabinDataGrid/OdsCabinGrid.d.ts +0 -4
  19. package/dist/components/devextreme/OdsDataGrid.d.ts +0 -4
  20. package/dist/components/devextreme/treeview/DxTreeList.d.ts +0 -4
  21. package/dist/stories/OdsMasterDetailDataGrid/OdsMasterDetailDataGrid.stories.d.ts +0 -3
  22. package/dist/stories/OdsMasterDetailDataGrid/Samples/OdsMasterDetailDataGrid/OdsMasterDetailDataGrid.Constants.d.ts +0 -22
  23. package/dist/stories/OdsMasterDetailDataGrid/Samples/OdsMasterDetailDataGrid/OdsMasterDetailDataGrid.MockData.d.ts +0 -44
  24. package/dist/stories/OdsSwitch/OdsSwitch.stories copy.d.ts +0 -16
  25. package/dist/stories/OdsTreeList/OdsTreeList.stories.d.ts +0 -165
  26. package/dist/stories/OdsTreeList/Samples/BasicTreeListTemplate.Constants.d.ts +0 -15
  27. package/dist/stories/OdsTreeList/Samples/BasicTreeListTemplate.MockData.d.ts +0 -24
  28. package/dist/stories/OdsTreeList/Samples/BasicTreeListTemplate.Sample.d.ts +0 -1
  29. package/dist/stories/OdsTreeList/Samples/EmployeeCell.d.ts +0 -4
  30. /package/dist/components/antd/{datepicker/OdsDatepicker.d.ts → datePicker/OdsDatePicker.d.ts} +0 -0
  31. /package/dist/components/antd/{datepicker/OdsDateRangepicker.d.ts → datePicker/OdsDateRangePicker.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -48,6 +48,7 @@ var jsPDF__default = _interopDefault(jsPDF);
48
48
  var fileSaverEs = require('file-saver-es');
49
49
  var DataSource = _interopDefault(require('devextreme/data/data_source'));
50
50
  var query = _interopDefault(require('devextreme/data/query'));
51
+ var queryString = _interopDefault(require('query-string'));
51
52
  var gantt = require('devextreme-react/gantt');
52
53
  require('jspdf-autotable');
53
54
  var button = require('devextreme-react/button');
@@ -34209,7 +34210,8 @@ var OdsBatchEditDataGrid = function OdsBatchEditDataGrid(props) {
34209
34210
  localization.locale(localStorage.getItem("locale"));
34210
34211
  localization.loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
34211
34212
  if (props.dataGridRef.current) {
34212
- props.dataGridRef.current.instance.updateDimensions();
34213
+ var _props$dataGridRef$cu, _props$dataGridRef$cu2, _props$dataGridRef$cu3, _props$dataGridRef$cu4;
34214
+ (_props$dataGridRef$cu = props.dataGridRef.current) === null || _props$dataGridRef$cu === void 0 ? void 0 : (_props$dataGridRef$cu2 = _props$dataGridRef$cu.instance) === null || _props$dataGridRef$cu2 === void 0 ? void 0 : (_props$dataGridRef$cu3 = (_props$dataGridRef$cu4 = _props$dataGridRef$cu2.call(_props$dataGridRef$cu)).updateDimensions) === null || _props$dataGridRef$cu3 === void 0 ? void 0 : _props$dataGridRef$cu3.call(_props$dataGridRef$cu4);
34213
34215
  }
34214
34216
  }, []);
34215
34217
  React.useEffect(function () {
@@ -34218,8 +34220,9 @@ var OdsBatchEditDataGrid = function OdsBatchEditDataGrid(props) {
34218
34220
  var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
34219
34221
  var onOptionChanged = props.onOptionChanged;
34220
34222
  if (onOptionChanged) {
34221
- var dataGridInstance = props.dataGridRef.current.instance;
34222
- var sortingState = dataGridInstance.getVisibleColumns().filter(function (p) {
34223
+ var _props$dataGridRef$cu5, _props$dataGridRef$cu6;
34224
+ var dataGridInstance = (_props$dataGridRef$cu5 = props.dataGridRef.current) === null || _props$dataGridRef$cu5 === void 0 ? void 0 : (_props$dataGridRef$cu6 = _props$dataGridRef$cu5.instance) === null || _props$dataGridRef$cu6 === void 0 ? void 0 : _props$dataGridRef$cu6.call(_props$dataGridRef$cu5);
34225
+ var sortingState = dataGridInstance === null || dataGridInstance === void 0 ? void 0 : dataGridInstance.getVisibleColumns().filter(function (p) {
34223
34226
  return !p.command;
34224
34227
  }).map(function (column, index) {
34225
34228
  return {
@@ -34908,9 +34911,7 @@ var MasterDetailDataGrid = function MasterDetailDataGrid(_ref) {
34908
34911
  return React__default.createElement(DataGrid.Column, Object.assign({
34909
34912
  key: col.dataField
34910
34913
  }, col, {
34911
- headerFilter: {
34912
- visible: col.allowFiltering
34913
- }
34914
+ allowHeaderFiltering: col.allowFiltering
34914
34915
  }));
34915
34916
  }), React__default.createElement(DataGrid.ColumnChooser, {
34916
34917
  enabled: masterDetailFeatures.columnChooser,
@@ -35058,7 +35059,8 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
35058
35059
  localization.locale(localStorage.getItem("locale"));
35059
35060
  localization.loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
35060
35061
  if (gridRef.current) {
35061
- gridRef.current.instance.updateDimensions();
35062
+ var _gridRef$current, _gridRef$current$inst, _gridRef$current$inst2;
35063
+ (_gridRef$current = gridRef.current) === null || _gridRef$current === void 0 ? void 0 : (_gridRef$current$inst = _gridRef$current.instance) === null || _gridRef$current$inst === void 0 ? void 0 : (_gridRef$current$inst2 = _gridRef$current$inst.call(_gridRef$current)) === null || _gridRef$current$inst2 === void 0 ? void 0 : _gridRef$current$inst2.updateDimensions();
35062
35064
  }
35063
35065
  hasFastUpdate && document.addEventListener("keydown", keydownEvent);
35064
35066
  return function () {
@@ -35071,8 +35073,9 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
35071
35073
  var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
35072
35074
  var onOptionChanged = props.onOptionChanged;
35073
35075
  if (onOptionChanged) {
35074
- var dataGridInstance = gridRef.current.instance;
35075
- var sortingState = dataGridInstance.getVisibleColumns().filter(function (p) {
35076
+ var _gridRef$current2, _gridRef$current2$ins;
35077
+ var dataGridInstance = (_gridRef$current2 = gridRef.current) === null || _gridRef$current2 === void 0 ? void 0 : (_gridRef$current2$ins = _gridRef$current2.instance) === null || _gridRef$current2$ins === void 0 ? void 0 : _gridRef$current2$ins.call(_gridRef$current2);
35078
+ var sortingState = dataGridInstance === null || dataGridInstance === void 0 ? void 0 : dataGridInstance.getVisibleColumns().filter(function (p) {
35076
35079
  return !p.command;
35077
35080
  }).map(function (column, index) {
35078
35081
  return {
@@ -35086,7 +35089,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
35086
35089
  });
35087
35090
  if (sortedColumn) {
35088
35091
  if (sortedColumn.sortOrder) {
35089
- dataGridInstance.option("columns[" + sortedColumn.index + "].sortOrder", sortedColumn.sortOrder);
35092
+ dataGridInstance === null || dataGridInstance === void 0 ? void 0 : dataGridInstance.option("columns[" + sortedColumn.index + "].sortOrder", sortedColumn.sortOrder);
35090
35093
  var fullName = "columns[" + sortedColumn.index + "].sortOrder";
35091
35094
  var gridEvent = {
35092
35095
  component: dataGridInstance,
@@ -35153,13 +35156,16 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
35153
35156
  }));
35154
35157
  for (var rowIndex = minRowIndex; rowIndex <= maxRowIndex; rowIndex++) {
35155
35158
  var _loop2 = function _loop2() {
35156
- var _column = gridRef.current.instance.columnOption(colIndex);
35159
+ var _gridRef$current3, _gridRef$current3$ins, _gridRef$current3$ins2;
35160
+ var _column = (_gridRef$current3 = gridRef.current) === null || _gridRef$current3 === void 0 ? void 0 : (_gridRef$current3$ins = _gridRef$current3.instance) === null || _gridRef$current3$ins === void 0 ? void 0 : (_gridRef$current3$ins2 = _gridRef$current3$ins.call(_gridRef$current3)) === null || _gridRef$current3$ins2 === void 0 ? void 0 : _gridRef$current3$ins2.columnOption(colIndex);
35157
35161
  if (constants$1.allowedDataTypesForMultiCellEditing.some(function (item) {
35158
- return item.toLocaleLowerCase() == _column.dataType.toLocaleLowerCase();
35162
+ var _column$dataType;
35163
+ return item.toLocaleLowerCase() == (_column === null || _column === void 0 ? void 0 : (_column$dataType = _column.dataType) === null || _column$dataType === void 0 ? void 0 : _column$dataType.toLocaleLowerCase());
35159
35164
  })) {
35165
+ var _gridRef$current4, _gridRef$current4$ins, _gridRef$current4$ins2;
35160
35166
  result.push({
35161
35167
  dataField: _column.dataField,
35162
- pkValue: gridRef.current.instance.cellValue(rowIndex, pkName)
35168
+ pkValue: (_gridRef$current4 = gridRef.current) === null || _gridRef$current4 === void 0 ? void 0 : (_gridRef$current4$ins = _gridRef$current4.instance) === null || _gridRef$current4$ins === void 0 ? void 0 : (_gridRef$current4$ins2 = _gridRef$current4$ins.call(_gridRef$current4)) === null || _gridRef$current4$ins2 === void 0 ? void 0 : _gridRef$current4$ins2.cellValue(rowIndex, pkName)
35163
35169
  });
35164
35170
  }
35165
35171
  };
@@ -35195,8 +35201,9 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
35195
35201
  });
35196
35202
  };
35197
35203
  var removeSelectedCell = function removeSelectedCell(rowIndex, colIndex) {
35198
- var dataField = gridRef.current.instance.columnOption(colIndex).dataField;
35199
- var pkValue = gridRef.current.instance.cellValue(rowIndex, pkName);
35204
+ var _gridRef$current5, _gridRef$current5$ins, _gridRef$current5$ins2, _gridRef$current5$ins3, _gridRef$current6, _gridRef$current6$ins, _gridRef$current6$ins2;
35205
+ var dataField = (_gridRef$current5 = gridRef.current) === null || _gridRef$current5 === void 0 ? void 0 : (_gridRef$current5$ins = _gridRef$current5.instance) === null || _gridRef$current5$ins === void 0 ? void 0 : (_gridRef$current5$ins2 = _gridRef$current5$ins.call(_gridRef$current5)) === null || _gridRef$current5$ins2 === void 0 ? void 0 : (_gridRef$current5$ins3 = _gridRef$current5$ins2.columnOption(colIndex)) === null || _gridRef$current5$ins3 === void 0 ? void 0 : _gridRef$current5$ins3.dataField;
35206
+ var pkValue = (_gridRef$current6 = gridRef.current) === null || _gridRef$current6 === void 0 ? void 0 : (_gridRef$current6$ins = _gridRef$current6.instance) === null || _gridRef$current6$ins === void 0 ? void 0 : (_gridRef$current6$ins2 = _gridRef$current6$ins.call(_gridRef$current6)) === null || _gridRef$current6$ins2 === void 0 ? void 0 : _gridRef$current6$ins2.cellValue(rowIndex, pkName);
35200
35207
  setSelectedCells(function (prev) {
35201
35208
  return prev.filter(function (cell) {
35202
35209
  return !(cell.dataField == dataField && cell.pkValue == pkValue);
@@ -36384,22 +36391,23 @@ var useOnExportingHandler$1 = function useOnExportingHandler(exportProps, getSum
36384
36391
 
36385
36392
  var useOnOptionChangedHandler = function useOnOptionChangedHandler(dataGridRef, totalFilteredCount, sortingProps, setFilterApplied, setUpdateTrigger, callback) {
36386
36393
  var onOptionChanged = React.useCallback(function (e) {
36387
- var dataGrid = dataGridRef.current.instance;
36394
+ var _dataGridRef$current, _dataGridRef$current$;
36395
+ var dataGrid = (_dataGridRef$current = dataGridRef.current) === null || _dataGridRef$current === void 0 ? void 0 : (_dataGridRef$current$ = _dataGridRef$current.instance) === null || _dataGridRef$current$ === void 0 ? void 0 : _dataGridRef$current$.call(_dataGridRef$current);
36388
36396
  var updateFilterStatus = function updateFilterStatus() {
36389
- var filters = dataGrid.getCombinedFilter(true);
36397
+ var filters = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.getCombinedFilter(true);
36390
36398
  var active = filters && filters.length > 0;
36391
36399
  setFilterApplied(active);
36392
36400
  return active;
36393
36401
  };
36394
36402
  if (e.fullName.includes("sortOrder")) {
36395
- dataGrid.getScrollable().scrollTo(0);
36403
+ dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.getScrollable().scrollTo(0);
36396
36404
  }
36397
36405
  if (e.fullName.includes("filterValue") || e.fullName.includes("filter") || e.fullName === "searchPanel.text") {
36398
36406
  var active = updateFilterStatus();
36399
36407
  if (active) {
36400
36408
  setTimeout(function () {
36401
- dataGrid.refresh().done(function () {
36402
- totalFilteredCount.current = dataGrid.totalCount();
36409
+ dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.refresh().done(function () {
36410
+ totalFilteredCount.current = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.totalCount();
36403
36411
  setUpdateTrigger(function (prev) {
36404
36412
  return !prev;
36405
36413
  });
@@ -54422,25 +54430,26 @@ var OdsMergeCellDataGrid = React.forwardRef(function (props, ref) {
54422
54430
  store: data,
54423
54431
  load: function load(options) {
54424
54432
  try {
54425
- var _refGrid$current$inst;
54433
+ var _refGrid$current, _refGrid$current$inst, _instance$_firstLoad;
54426
54434
  var _data = [].concat(data);
54427
- var _firstLoad = (_refGrid$current$inst = refGrid.current.instance._firstLoad) != null ? _refGrid$current$inst : true;
54428
- if (_firstLoad) {
54429
- refGrid.current.instance._firstLoad = false;
54435
+ var instance = (_refGrid$current = refGrid.current) === null || _refGrid$current === void 0 ? void 0 : (_refGrid$current$inst = _refGrid$current.instance) === null || _refGrid$current$inst === void 0 ? void 0 : _refGrid$current$inst.call(_refGrid$current);
54436
+ var _firstLoad = (_instance$_firstLoad = instance === null || instance === void 0 ? void 0 : instance._firstLoad) != null ? _instance$_firstLoad : true;
54437
+ if (_firstLoad && instance) {
54438
+ instance._firstLoad = false;
54430
54439
  }
54431
54440
  if (options.filter) {
54432
54441
  _data = query(_data).filter(options.filter).toArray();
54433
54442
  }
54434
- var _prevSort = refGrid.current.instance._prevSortedColumns;
54435
- var _currentSort = getSortedColumns(refGrid.current.instance);
54443
+ var _prevSort = instance === null || instance === void 0 ? void 0 : instance._prevSortedColumns;
54444
+ var _currentSort = getSortedColumns(instance);
54436
54445
  if (!_firstLoad && isSortChanged(_prevSort, _currentSort)) {
54437
54446
  props.onSortingChanged && props.onSortingChanged(_currentSort);
54438
54447
  }
54439
- refGrid.current.instance._prevSortedColumns = _currentSort;
54448
+ instance._prevSortedColumns = _currentSort;
54440
54449
  helper.columns = props.columns;
54441
54450
  helper.mergeDataFields = props.mergeDataFields;
54442
54451
  helper.dataSource = _data;
54443
- refGrid.current.instance._mergedCells = helper.mergeDataSource();
54452
+ instance._mergedCells = helper.mergeDataSource();
54444
54453
  return Promise.resolve({
54445
54454
  data: _data,
54446
54455
  totalCount: _data.length
@@ -54453,7 +54462,8 @@ var OdsMergeCellDataGrid = React.forwardRef(function (props, ref) {
54453
54462
  React.useImperativeHandle(ref, function () {
54454
54463
  return {
54455
54464
  getSortedColumns: function getSortedColumns$1() {
54456
- return getSortedColumns(refGrid.current.instance);
54465
+ var _refGrid$current2, _refGrid$current2$ins;
54466
+ return getSortedColumns((_refGrid$current2 = refGrid.current) === null || _refGrid$current2 === void 0 ? void 0 : (_refGrid$current2$ins = _refGrid$current2.instance) === null || _refGrid$current2$ins === void 0 ? void 0 : _refGrid$current2$ins.call(_refGrid$current2));
54457
54467
  }
54458
54468
  };
54459
54469
  });
@@ -55131,309 +55141,6 @@ function debounce(func, wait, options) {
55131
55141
 
55132
55142
  var debounce_1 = debounce;
55133
55143
 
55134
- var strictUriEncode = function (str) {
55135
- return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
55136
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
55137
- });
55138
- };
55139
-
55140
- /*
55141
- object-assign
55142
- (c) Sindre Sorhus
55143
- @license MIT
55144
- */
55145
- /* eslint-disable no-unused-vars */
55146
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
55147
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
55148
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
55149
-
55150
- function toObject(val) {
55151
- if (val === null || val === undefined) {
55152
- throw new TypeError('Object.assign cannot be called with null or undefined');
55153
- }
55154
-
55155
- return Object(val);
55156
- }
55157
-
55158
- function shouldUseNative() {
55159
- try {
55160
- if (!Object.assign) {
55161
- return false;
55162
- }
55163
-
55164
- // Detect buggy property enumeration order in older V8 versions.
55165
-
55166
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
55167
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
55168
- test1[5] = 'de';
55169
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
55170
- return false;
55171
- }
55172
-
55173
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
55174
- var test2 = {};
55175
- for (var i = 0; i < 10; i++) {
55176
- test2['_' + String.fromCharCode(i)] = i;
55177
- }
55178
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
55179
- return test2[n];
55180
- });
55181
- if (order2.join('') !== '0123456789') {
55182
- return false;
55183
- }
55184
-
55185
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
55186
- var test3 = {};
55187
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
55188
- test3[letter] = letter;
55189
- });
55190
- if (Object.keys(Object.assign({}, test3)).join('') !==
55191
- 'abcdefghijklmnopqrst') {
55192
- return false;
55193
- }
55194
-
55195
- return true;
55196
- } catch (err) {
55197
- // We don't expect any of the above to throw, but better to be safe.
55198
- return false;
55199
- }
55200
- }
55201
-
55202
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
55203
- var from;
55204
- var to = toObject(target);
55205
- var symbols;
55206
-
55207
- for (var s = 1; s < arguments.length; s++) {
55208
- from = Object(arguments[s]);
55209
-
55210
- for (var key in from) {
55211
- if (hasOwnProperty$1.call(from, key)) {
55212
- to[key] = from[key];
55213
- }
55214
- }
55215
-
55216
- if (getOwnPropertySymbols) {
55217
- symbols = getOwnPropertySymbols(from);
55218
- for (var i = 0; i < symbols.length; i++) {
55219
- if (propIsEnumerable.call(from, symbols[i])) {
55220
- to[symbols[i]] = from[symbols[i]];
55221
- }
55222
- }
55223
- }
55224
- }
55225
-
55226
- return to;
55227
- };
55228
-
55229
- function encoderForArrayFormat(opts) {
55230
- switch (opts.arrayFormat) {
55231
- case 'index':
55232
- return function (key, value, index) {
55233
- return value === null ? [
55234
- encode(key, opts),
55235
- '[',
55236
- index,
55237
- ']'
55238
- ].join('') : [
55239
- encode(key, opts),
55240
- '[',
55241
- encode(index, opts),
55242
- ']=',
55243
- encode(value, opts)
55244
- ].join('');
55245
- };
55246
-
55247
- case 'bracket':
55248
- return function (key, value) {
55249
- return value === null ? encode(key, opts) : [
55250
- encode(key, opts),
55251
- '[]=',
55252
- encode(value, opts)
55253
- ].join('');
55254
- };
55255
-
55256
- default:
55257
- return function (key, value) {
55258
- return value === null ? encode(key, opts) : [
55259
- encode(key, opts),
55260
- '=',
55261
- encode(value, opts)
55262
- ].join('');
55263
- };
55264
- }
55265
- }
55266
-
55267
- function parserForArrayFormat(opts) {
55268
- var result;
55269
-
55270
- switch (opts.arrayFormat) {
55271
- case 'index':
55272
- return function (key, value, accumulator) {
55273
- result = /\[(\d*)\]$/.exec(key);
55274
-
55275
- key = key.replace(/\[\d*\]$/, '');
55276
-
55277
- if (!result) {
55278
- accumulator[key] = value;
55279
- return;
55280
- }
55281
-
55282
- if (accumulator[key] === undefined) {
55283
- accumulator[key] = {};
55284
- }
55285
-
55286
- accumulator[key][result[1]] = value;
55287
- };
55288
-
55289
- case 'bracket':
55290
- return function (key, value, accumulator) {
55291
- result = /(\[\])$/.exec(key);
55292
- key = key.replace(/\[\]$/, '');
55293
-
55294
- if (!result) {
55295
- accumulator[key] = value;
55296
- return;
55297
- } else if (accumulator[key] === undefined) {
55298
- accumulator[key] = [value];
55299
- return;
55300
- }
55301
-
55302
- accumulator[key] = [].concat(accumulator[key], value);
55303
- };
55304
-
55305
- default:
55306
- return function (key, value, accumulator) {
55307
- if (accumulator[key] === undefined) {
55308
- accumulator[key] = value;
55309
- return;
55310
- }
55311
-
55312
- accumulator[key] = [].concat(accumulator[key], value);
55313
- };
55314
- }
55315
- }
55316
-
55317
- function encode(value, opts) {
55318
- if (opts.encode) {
55319
- return opts.strict ? strictUriEncode(value) : encodeURIComponent(value);
55320
- }
55321
-
55322
- return value;
55323
- }
55324
-
55325
- function keysSorter(input) {
55326
- if (Array.isArray(input)) {
55327
- return input.sort();
55328
- } else if (typeof input === 'object') {
55329
- return keysSorter(Object.keys(input)).sort(function (a, b) {
55330
- return Number(a) - Number(b);
55331
- }).map(function (key) {
55332
- return input[key];
55333
- });
55334
- }
55335
-
55336
- return input;
55337
- }
55338
-
55339
- var extract = function (str) {
55340
- return str.split('?')[1] || '';
55341
- };
55342
-
55343
- var parse = function (str, opts) {
55344
- opts = objectAssign({arrayFormat: 'none'}, opts);
55345
-
55346
- var formatter = parserForArrayFormat(opts);
55347
-
55348
- // Create an object with no prototype
55349
- // https://github.com/sindresorhus/query-string/issues/47
55350
- var ret = Object.create(null);
55351
-
55352
- if (typeof str !== 'string') {
55353
- return ret;
55354
- }
55355
-
55356
- str = str.trim().replace(/^(\?|#|&)/, '');
55357
-
55358
- if (!str) {
55359
- return ret;
55360
- }
55361
-
55362
- str.split('&').forEach(function (param) {
55363
- var parts = param.replace(/\+/g, ' ').split('=');
55364
- // Firefox (pre 40) decodes `%3D` to `=`
55365
- // https://github.com/sindresorhus/query-string/pull/37
55366
- var key = parts.shift();
55367
- var val = parts.length > 0 ? parts.join('=') : undefined;
55368
-
55369
- // missing `=` should be `null`:
55370
- // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
55371
- val = val === undefined ? null : decodeURIComponent(val);
55372
-
55373
- formatter(decodeURIComponent(key), val, ret);
55374
- });
55375
-
55376
- return Object.keys(ret).sort().reduce(function (result, key) {
55377
- var val = ret[key];
55378
- if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {
55379
- // Sort object keys, not values
55380
- result[key] = keysSorter(val);
55381
- } else {
55382
- result[key] = val;
55383
- }
55384
-
55385
- return result;
55386
- }, Object.create(null));
55387
- };
55388
-
55389
- var stringify = function (obj, opts) {
55390
- var defaults = {
55391
- encode: true,
55392
- strict: true,
55393
- arrayFormat: 'none'
55394
- };
55395
-
55396
- opts = objectAssign(defaults, opts);
55397
-
55398
- var formatter = encoderForArrayFormat(opts);
55399
-
55400
- return obj ? Object.keys(obj).sort().map(function (key) {
55401
- var val = obj[key];
55402
-
55403
- if (val === undefined) {
55404
- return '';
55405
- }
55406
-
55407
- if (val === null) {
55408
- return encode(key, opts);
55409
- }
55410
-
55411
- if (Array.isArray(val)) {
55412
- var result = [];
55413
-
55414
- val.slice().forEach(function (val2) {
55415
- if (val2 === undefined) {
55416
- return;
55417
- }
55418
-
55419
- result.push(formatter(key, val2, result.length));
55420
- });
55421
-
55422
- return result.join('&');
55423
- }
55424
-
55425
- return encode(key, opts) + '=' + encode(val, opts);
55426
- }).filter(function (x) {
55427
- return x.length > 0;
55428
- }).join('&') : '';
55429
- };
55430
-
55431
- var queryString = {
55432
- extract: extract,
55433
- parse: parse,
55434
- stringify: stringify
55435
- };
55436
-
55437
55144
  var exportFormats$2 = ["xlsx"];
55438
55145
  var totalPageCount = 1;
55439
55146
  var loadedPageCount = 1;
@@ -55518,13 +55225,15 @@ var _OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
55518
55225
  localization.locale(localStorage.getItem("locale"));
55519
55226
  localization.loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
55520
55227
  if (gridRef.current) {
55521
- gridRef.current.instance.updateDimensions();
55228
+ var _gridRef$current, _gridRef$current$inst, _gridRef$current$inst2;
55229
+ (_gridRef$current = gridRef.current) === null || _gridRef$current === void 0 ? void 0 : (_gridRef$current$inst = _gridRef$current.instance) === null || _gridRef$current$inst === void 0 ? void 0 : (_gridRef$current$inst2 = _gridRef$current$inst.call(_gridRef$current)) === null || _gridRef$current$inst2 === void 0 ? void 0 : _gridRef$current$inst2.updateDimensions();
55522
55230
  }
55523
55231
  }, []);
55524
55232
  React.useEffect(function () {
55525
55233
  if (contentReady) checkSortingPropertyForInitilaize();
55526
55234
  }, [contentReady]);
55527
55235
  React.useEffect(function () {
55236
+ var _gridRef$current$inst4, _gridRef$current3;
55528
55237
  var cssRules = "\n .data-exists .dx-datagrid-borders > .dx-datagrid-filter-panel,\n .data-exists .dx-datagrid-borders > .dx-datagrid-headers {\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n padding-right: 0px !important;\n }\n \n .data-exists .dx-datagrid-headers .dx-datagrid-content {\n margin-bottom: -1px;\n padding-right: 17px !important;\n }\n ";
55529
55238
  var styleSheet = document.createElement('style');
55530
55239
  styleSheet.type = 'text/css';
@@ -55532,9 +55241,10 @@ var _OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
55532
55241
  document.head.appendChild(styleSheet);
55533
55242
  var checkData = function checkData() {
55534
55243
  if (gridRef.current) {
55535
- var _dataGridInstance = gridRef.current.instance;
55244
+ var _gridRef$current$inst3, _gridRef$current2;
55245
+ var _dataGridInstance = (_gridRef$current$inst3 = (_gridRef$current2 = gridRef.current).instance) === null || _gridRef$current$inst3 === void 0 ? void 0 : _gridRef$current$inst3.call(_gridRef$current2);
55536
55246
  var dataExists = data.length >= 15;
55537
- var gridElement = _dataGridInstance.element();
55247
+ var gridElement = _dataGridInstance === null || _dataGridInstance === void 0 ? void 0 : _dataGridInstance.element();
55538
55248
  if (dataExists) {
55539
55249
  gridElement.classList.add('data-exists');
55540
55250
  } else {
@@ -55542,19 +55252,20 @@ var _OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
55542
55252
  }
55543
55253
  }
55544
55254
  };
55545
- var dataGridInstance = gridRef.current.instance;
55546
- dataGridInstance.on('dataChanged', checkData);
55255
+ var dataGridInstance = (_gridRef$current$inst4 = (_gridRef$current3 = gridRef.current).instance) === null || _gridRef$current$inst4 === void 0 ? void 0 : _gridRef$current$inst4.call(_gridRef$current3);
55256
+ dataGridInstance === null || dataGridInstance === void 0 ? void 0 : dataGridInstance.on('dataChanged', checkData);
55547
55257
  checkData();
55548
55258
  return function () {
55549
55259
  document.head.removeChild(styleSheet);
55550
- dataGridInstance.off('dataChanged', checkData);
55260
+ dataGridInstance === null || dataGridInstance === void 0 ? void 0 : dataGridInstance.off('dataChanged', checkData);
55551
55261
  };
55552
55262
  }, [data]);
55553
55263
  var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
55554
55264
  var onOptionChanged = props.onOptionChanged;
55555
55265
  if (onOptionChanged) {
55556
- var dataGridInstance = gridRef.current.instance;
55557
- var sortingState = dataGridInstance.getVisibleColumns().filter(function (p) {
55266
+ var _gridRef$current$inst5, _gridRef$current4;
55267
+ var dataGridInstance = (_gridRef$current$inst5 = (_gridRef$current4 = gridRef.current).instance) === null || _gridRef$current$inst5 === void 0 ? void 0 : _gridRef$current$inst5.call(_gridRef$current4);
55268
+ var sortingState = dataGridInstance === null || dataGridInstance === void 0 ? void 0 : dataGridInstance.getVisibleColumns().filter(function (p) {
55558
55269
  return !p.command;
55559
55270
  }).map(function (column, index) {
55560
55271
  return {
@@ -55951,7 +55662,8 @@ var _OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
55951
55662
  run(e);
55952
55663
  };
55953
55664
  React.useEffect(function () {
55954
- var gridElement = gridRef.current.instance.element();
55665
+ var _gridRef$current$inst6, _gridRef$current5, _gridRef$current$inst7;
55666
+ var gridElement = (_gridRef$current$inst6 = (_gridRef$current5 = gridRef.current).instance) === null || _gridRef$current$inst6 === void 0 ? void 0 : (_gridRef$current$inst7 = _gridRef$current$inst6.call(_gridRef$current5)) === null || _gridRef$current$inst7 === void 0 ? void 0 : _gridRef$current$inst7.element();
55955
55667
  gridElement.scrollTop = scrollPosition;
55956
55668
  }, [data.length]);
55957
55669
  React.useEffect(function () {
@@ -56288,22 +56000,26 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
56288
56000
  }
56289
56001
  }, [props.columns, filterApplied]);
56290
56002
  var handleOptionChanged = React.useCallback(function (e) {
56291
- var dataGrid = props.dataGridRef.current.instance;
56003
+ var _props$dataGridRef$cu, _props$dataGridRef$cu2;
56004
+ if (props.dataGridRef.current === null) {
56005
+ return;
56006
+ }
56007
+ var dataGrid = (_props$dataGridRef$cu = props.dataGridRef.current) === null || _props$dataGridRef$cu === void 0 ? void 0 : (_props$dataGridRef$cu2 = _props$dataGridRef$cu.instance) === null || _props$dataGridRef$cu2 === void 0 ? void 0 : _props$dataGridRef$cu2.call(_props$dataGridRef$cu);
56292
56008
  var updateFilterStatus = function updateFilterStatus() {
56293
- var filters = dataGrid.getCombinedFilter(true);
56009
+ var filters = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.getCombinedFilter(true);
56294
56010
  var active = filters && filters.length > 0;
56295
56011
  setFilterApplied(active);
56296
56012
  return active;
56297
56013
  };
56298
56014
  if (e.fullName.includes("sortOrder")) {
56299
- dataGrid.getScrollable().scrollTo(0);
56015
+ dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.getScrollable().scrollTo(0);
56300
56016
  }
56301
56017
  if (e.fullName.includes("filterValue") || e.fullName.includes("filter") || e.fullName === "searchPanel.text") {
56302
56018
  var active = updateFilterStatus();
56303
56019
  if (active) {
56304
56020
  setTimeout(function () {
56305
- dataGrid.refresh().done(function () {
56306
- totalFilteredCount.current = dataGrid.totalCount();
56021
+ dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.refresh().done(function () {
56022
+ totalFilteredCount.current = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.totalCount();
56307
56023
  setUpdateTrigger(function (prev) {
56308
56024
  return !prev;
56309
56025
  });
@@ -57337,7 +57053,8 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
57337
57053
  });
57338
57054
  });
57339
57055
  } else {
57340
- refGantt.current.instance.clearSorting();
57056
+ var _refGantt$current, _refGantt$current$ins, _refGantt$current$ins2;
57057
+ (_refGantt$current = refGantt.current) === null || _refGantt$current === void 0 ? void 0 : (_refGantt$current$ins = _refGantt$current.instance) === null || _refGantt$current$ins === void 0 ? void 0 : (_refGantt$current$ins2 = _refGantt$current$ins.call(_refGantt$current)) === null || _refGantt$current$ins2 === void 0 ? void 0 : _refGantt$current$ins2.clearSorting();
57341
57058
  }
57342
57059
  onSortingChanged && onSortingChanged([], undefined);
57343
57060
  };
@@ -57529,8 +57246,8 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
57529
57246
  }));
57530
57247
  };
57531
57248
  var exportExcel = function exportExcel() {
57532
- var _toolbarSettings$expo, _toolbarSettings$expo2, _toolbarSettings$expo3, _toolbarSettings$expo4, _toolbarSettings$expo5, _toolbarSettings$expo6;
57533
- var exportableDataGrid = refDataGridExportable.current.instance;
57249
+ var _refDataGridExportabl, _refDataGridExportabl2, _toolbarSettings$expo, _toolbarSettings$expo2, _toolbarSettings$expo3, _toolbarSettings$expo4, _toolbarSettings$expo5, _toolbarSettings$expo6;
57250
+ var exportableDataGrid = (_refDataGridExportabl = refDataGridExportable.current) === null || _refDataGridExportabl === void 0 ? void 0 : (_refDataGridExportabl2 = _refDataGridExportabl.instance) === null || _refDataGridExportabl2 === void 0 ? void 0 : _refDataGridExportabl2.call(_refDataGridExportabl);
57534
57251
  exportToExcel({
57535
57252
  gridComponent: exportableDataGrid,
57536
57253
  baseFileName: toolbarSettings === null || toolbarSettings === void 0 ? void 0 : (_toolbarSettings$expo = toolbarSettings["export"]) === null || _toolbarSettings$expo === void 0 ? void 0 : _toolbarSettings$expo.fileName,
@@ -57544,8 +57261,8 @@ var OdsTimelineTable = React.forwardRef(function (props, ref) {
57544
57261
  });
57545
57262
  };
57546
57263
  var exportPdf = function exportPdf() {
57547
- var _toolbarSettings$expo7, _toolbarSettings$expo8, _toolbarSettings$expo9;
57548
- var exportableTimelineTable = refGanttExportable.current.instance;
57264
+ var _refGanttExportable$c, _refGanttExportable$c2, _toolbarSettings$expo7, _toolbarSettings$expo8, _toolbarSettings$expo9;
57265
+ var exportableTimelineTable = (_refGanttExportable$c = refGanttExportable.current) === null || _refGanttExportable$c === void 0 ? void 0 : (_refGanttExportable$c2 = _refGanttExportable$c.instance) === null || _refGanttExportable$c2 === void 0 ? void 0 : _refGanttExportable$c2.call(_refGanttExportable$c);
57549
57266
  pdf_exporter.exportGantt({
57550
57267
  component: exportableTimelineTable,
57551
57268
  createDocumentMethod: function createDocumentMethod(args) {
@@ -58098,16 +57815,13 @@ var OdsTransfer = function OdsTransfer(props) {
58098
57815
  }, (_props$showFilters = props.showFilters) != null ? _props$showFilters : React__default.createElement(DataGrid.FilterRow, {
58099
57816
  visible: true
58100
57817
  }), props.columns.map(function (column) {
58101
- return React__default.createElement(DataGrid.Column, Object.assign({
57818
+ return React__default.createElement(DataGrid.Column, {
58102
57819
  dataField: column.dataField,
58103
57820
  caption: column.caption,
58104
57821
  dataType: column.dataType,
58105
- calculateSortValue: column.calculateSortValue
58106
- }, props.showFilters ? {
58107
- headerFilter: {
58108
- visible: true
58109
- }
58110
- } : {}));
57822
+ calculateSortValue: column.calculateSortValue,
57823
+ allowHeaderFiltering: props.showFilters
57824
+ });
58111
57825
  }), props.displayPageTitle && React__default.createElement(DataGrid.Toolbar, null, React__default.createElement(DataGrid.Item, {
58112
57826
  location: "before",
58113
57827
  cssClass: "toolbarTitleItem"
@@ -58362,18 +58076,14 @@ var OdsTransferV2 = function OdsTransferV2(_ref) {
58362
58076
  key: column,
58363
58077
  dataField: column,
58364
58078
  caption: column,
58365
- headerFilter: {
58366
- visible: true
58367
- }
58079
+ headerFilter: {}
58368
58080
  }) : React__default.createElement(DataGrid.Column, {
58369
58081
  key: column.dataIndex,
58370
58082
  dataField: column.dataField || column.dataIndex,
58371
58083
  caption: column.caption || column.title,
58372
58084
  dataType: column.dataType,
58373
58085
  calculateSortValue: column.calculateSortValue,
58374
- headerFilter: {
58375
- visible: true
58376
- }
58086
+ headerFilter: {}
58377
58087
  });
58378
58088
  }), displayPageTitle && React__default.createElement(DataGrid.Toolbar, null, React__default.createElement(DataGrid.Item, {
58379
58089
  location: "before",