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.
@@ -0,0 +1,2 @@
1
+ export interface OdsDatagridProps {
2
+ }
package/dist/index.js CHANGED
@@ -1207,9 +1207,9 @@ function OdsDataGrid(props) {
1207
1207
  component: e.component,
1208
1208
  worksheet: workbook.addWorksheet('Main sheet'),
1209
1209
  autoFilterEnabled: true,
1210
- customizeCell: function customizeCell(_ref) {
1211
- var gridCell = _ref.gridCell,
1212
- excelCell = _ref.excelCell;
1210
+ customizeCell: function customizeCell(options) {
1211
+ var gridCell = options.gridCell,
1212
+ excelCell = options.excelCell;
1213
1213
  if (gridCell.rowType === 'data') {
1214
1214
  if (gridCell.column.dataField === 'IsActive') {
1215
1215
  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;
@@ -1218,6 +1218,19 @@ function OdsDataGrid(props) {
1218
1218
  props.onExportingCustom(gridCell, excelCell);
1219
1219
  }
1220
1220
  }
1221
+ if (gridCell.column.dataType === "datetime" && gridCell.value) {
1222
+ var _gridCell$column$calc, _gridCell$column$meta;
1223
+ 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) {
1224
+ var date = moment(gridCell.value);
1225
+ var offsetMinutes = date.utcOffset();
1226
+ var sign = offsetMinutes >= 0 ? '+' : '-';
1227
+ var hours = Math.floor(Math.abs(offsetMinutes) / 60);
1228
+ var minutes = Math.abs(offsetMinutes) % 60;
1229
+ var formattedOffset = "(UTC" + sign + hours.toString().padStart(2, '0') + ":" + minutes.toString().padStart(2, '0') + ")";
1230
+ var formattedDate = date.format('DD.MM.YYYY HH:mm') + " " + formattedOffset;
1231
+ excelCell.value = formattedDate;
1232
+ }
1233
+ }
1221
1234
  }
1222
1235
  }).then(function () {
1223
1236
  workbook.xlsx.writeBuffer().then(function (buffer) {
@@ -17476,7 +17489,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
17476
17489
  allowUpdating: props.edit.allowUpdating,
17477
17490
  allowDeleting: props.edit.allowDeleting,
17478
17491
  allowAdding: props.edit.allowAdding,
17479
- useIcons: true
17492
+ useIcons: props.edit.useIcons
17480
17493
  }, props.edit.mode === "popup" && React__default.createElement("div", null, React__default.createElement(DataGrid.Popup, {
17481
17494
  showTitle: true,
17482
17495
  width: 700,