ods-component-lib 1.17.110 → 1.17.111

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/index.js CHANGED
@@ -1224,6 +1224,7 @@ function OdsDataGrid(props) {
1224
1224
  return grid(props, dataGridRef);
1225
1225
  }
1226
1226
  function grid(props, dataGridRef) {
1227
+ var _props$actionPermissi5;
1227
1228
  var headerCellRender = function headerCellRender(colProperties) {
1228
1229
  return React__default.createElement("th", {
1229
1230
  className: "dx-datagrid-headers",
@@ -1416,6 +1417,7 @@ function grid(props, dataGridRef) {
1416
1417
  }));
1417
1418
  }), function () {
1418
1419
  if (props.customPopup !== undefined) {
1420
+ var _props$actionPermissi, _props$actionPermissi2;
1419
1421
  return React__default.createElement(dataGrid.Column, {
1420
1422
  dataField: "Actions",
1421
1423
  fixed: true,
@@ -1427,17 +1429,18 @@ function grid(props, dataGridRef) {
1427
1429
  }, props.edit.allowUpdating && React__default.createElement(dataGrid.Button, {
1428
1430
  hint: props.HintEdit,
1429
1431
  visible: true,
1430
- disabled: true,
1432
+ disabled: (_props$actionPermissi = !props.actionPermission) != null ? _props$actionPermissi : false,
1431
1433
  icon: "edit",
1432
1434
  onClick: props.editButtonClick
1433
1435
  }), props.edit.allowDeleting && React__default.createElement(dataGrid.Button, {
1434
1436
  hint: props.HintDelete,
1435
1437
  visible: true,
1436
- disabled: true,
1438
+ disabled: (_props$actionPermissi2 = !props.actionPermission) != null ? _props$actionPermissi2 : false,
1437
1439
  icon: "trash",
1438
1440
  onClick: props.deleteButtonClick
1439
1441
  }));
1440
1442
  } else {
1443
+ var _props$actionPermissi3, _props$actionPermissi4;
1441
1444
  return React__default.createElement(dataGrid.Column, {
1442
1445
  dataField: "Actions",
1443
1446
  caption: "Actions",
@@ -1445,9 +1448,11 @@ function grid(props, dataGridRef) {
1445
1448
  width: 110,
1446
1449
  showInColumnChooser: false
1447
1450
  }, React__default.createElement(React__default.Fragment, null, props.edit.allowUpdating && React__default.createElement(dataGrid.Button, {
1448
- name: "edit"
1451
+ name: "edit",
1452
+ disabled: (_props$actionPermissi3 = !props.actionPermission) != null ? _props$actionPermissi3 : false
1449
1453
  }), props.edit.allowDeleting && React__default.createElement(dataGrid.Button, {
1450
- name: "delete"
1454
+ name: "delete",
1455
+ disabled: (_props$actionPermissi4 = !props.actionPermission) != null ? _props$actionPermissi4 : false
1451
1456
  })));
1452
1457
  }
1453
1458
  }(), React__default.createElement(dataGrid.Toolbar, null, props.pageTitle && React__default.createElement(dataGrid.Item, {
@@ -1465,7 +1470,7 @@ function grid(props, dataGridRef) {
1465
1470
  location: "before"
1466
1471
  }, React__default.createElement(OdsButton, {
1467
1472
  type: "primary",
1468
- disabled: true,
1473
+ disabled: (_props$actionPermissi5 = !props.actionPermission) != null ? _props$actionPermissi5 : false,
1469
1474
  onClick: props.onAddButton,
1470
1475
  style: {
1471
1476
  marginBottom: "10px"