ods-component-lib 1.18.35 → 1.18.37

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.
@@ -1202,9 +1202,9 @@ function OdsDataGrid(props) {
1202
1202
  component: e.component,
1203
1203
  worksheet: workbook.addWorksheet('Main sheet'),
1204
1204
  autoFilterEnabled: true,
1205
- customizeCell: function customizeCell(_ref) {
1206
- var gridCell = _ref.gridCell,
1207
- excelCell = _ref.excelCell;
1205
+ customizeCell: function customizeCell(options) {
1206
+ var gridCell = options.gridCell,
1207
+ excelCell = options.excelCell;
1208
1208
  if (gridCell.rowType === 'data') {
1209
1209
  if (gridCell.column.dataField === 'IsActive') {
1210
1210
  if (localStorage.getItem("locale") === "tr") excelCell.value = excelCell.value ? "Aktif" : "Pasif";else if (localStorage.getItem("locale") === "en") excelCell.value = excelCell.value ? "Active" : "Passive";else excelCell.value = excelCell.value;
@@ -1213,6 +1213,19 @@ function OdsDataGrid(props) {
1213
1213
  props.onExportingCustom(gridCell, excelCell);
1214
1214
  }
1215
1215
  }
1216
+ if (gridCell.column.dataType === "datetime" && gridCell.value) {
1217
+ var _gridCell$column$calc, _gridCell$column$meta;
1218
+ if (((_gridCell$column$calc = gridCell.column.calculateFilterExpression) === null || _gridCell$column$calc === void 0 ? void 0 : _gridCell$column$calc.name) === "calculateFilterExpressionForColumn" && (_gridCell$column$meta = gridCell.column['meta']) !== null && _gridCell$column$meta !== void 0 && _gridCell$column$meta.hasCustomCellRenderer) {
1219
+ var date = moment(gridCell.value);
1220
+ var offsetMinutes = date.utcOffset();
1221
+ var sign = offsetMinutes >= 0 ? '+' : '-';
1222
+ var hours = Math.floor(Math.abs(offsetMinutes) / 60);
1223
+ var minutes = Math.abs(offsetMinutes) % 60;
1224
+ var formattedOffset = "(UTC" + sign + hours.toString().padStart(2, '0') + ":" + minutes.toString().padStart(2, '0') + ")";
1225
+ var formattedDate = date.format('DD.MM.YYYY HH:mm') + " " + formattedOffset;
1226
+ excelCell.value = formattedDate;
1227
+ }
1228
+ }
1216
1229
  }
1217
1230
  }).then(function () {
1218
1231
  workbook.xlsx.writeBuffer().then(function (buffer) {
@@ -17471,7 +17484,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
17471
17484
  allowUpdating: props.edit.allowUpdating,
17472
17485
  allowDeleting: props.edit.allowDeleting,
17473
17486
  allowAdding: props.edit.allowAdding,
17474
- useIcons: true
17487
+ useIcons: props.edit.useIcons
17475
17488
  }, props.edit.mode === "popup" && React.createElement("div", null, React.createElement(Popup, {
17476
17489
  showTitle: true,
17477
17490
  width: 700,