@majoo-ui/react 1.58.3 → 1.58.4-rc.1

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.
@@ -1107,6 +1107,7 @@ export interface RowGroup {
1107
1107
  interface CustomRowsStyle {
1108
1108
  predicate: boolean;
1109
1109
  css: CSS;
1110
+ hideContextMenu?: boolean;
1110
1111
  }
1111
1112
  export interface ColumnInstanceProps<D extends object> extends ColumnInstance<D> {
1112
1113
  options?: [];
package/index.esm.js CHANGED
@@ -22316,20 +22316,23 @@ function Table({
22316
22316
  }), void 0)
22317
22317
  }, {
22318
22318
  children: page.map((row, i) => {
22319
- var _a, _b;
22319
+ var _a, _b, _c;
22320
22320
  prepareRow(row);
22321
22321
  const subRowCells = row.cells.filter(cell => cell.column.isSubRow);
22322
22322
  const leftAddOnCells = (_a = row.cells.filter(cell => ['expander', 'selection'].includes(cell.column.id))) !== null && _a !== void 0 ? _a : [];
22323
22323
  const notNullHeaderColumns = visibleColumns.filter(column => typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow);
22324
- const isContextMenu = (_b = row.cells.filter(cell => {
22324
+ let isContextMenu = Boolean((_b = row.cells.filter(cell => {
22325
22325
  var _a, _b;
22326
22326
  return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
22327
- })) === null || _b === void 0 ? void 0 : _b.length;
22327
+ })) === null || _b === void 0 ? void 0 : _b.length);
22328
22328
  let customStyle = {};
22329
22329
  if (customRowsStyle && customRowsStyle(row.original).length) {
22330
22330
  for (let _i2 = 0; _i2 < customRowsStyle(row.original).length; _i2++) {
22331
22331
  if (customRowsStyle(row.original)[_i2].predicate) {
22332
22332
  customStyle = customRowsStyle(row.original)[_i2].css;
22333
+ if ((_c = customRowsStyle(row.original)[_i2]) === null || _c === void 0 ? void 0 : _c.hideContextMenu) {
22334
+ isContextMenu = false;
22335
+ }
22333
22336
  }
22334
22337
  }
22335
22338
  }
package/index.umd.js CHANGED
@@ -22681,7 +22681,7 @@
22681
22681
  }
22682
22682
  }, {
22683
22683
  children: page.map(function (row, i) {
22684
- var _a, _b;
22684
+ var _a, _b, _c;
22685
22685
  prepareRow(row);
22686
22686
  var subRowCells = row.cells.filter(function (cell) {
22687
22687
  return cell.column.isSubRow;
@@ -22692,15 +22692,18 @@
22692
22692
  var notNullHeaderColumns = visibleColumns.filter(function (column) {
22693
22693
  return typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow;
22694
22694
  });
22695
- var isContextMenu = (_b = row.cells.filter(function (cell) {
22695
+ var isContextMenu = Boolean((_b = row.cells.filter(function (cell) {
22696
22696
  var _a, _b;
22697
22697
  return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
22698
- })) === null || _b === void 0 ? void 0 : _b.length;
22698
+ })) === null || _b === void 0 ? void 0 : _b.length);
22699
22699
  var customStyle = {};
22700
22700
  if (customRowsStyle && customRowsStyle(row.original).length) {
22701
22701
  for (var i_2 = 0; i_2 < customRowsStyle(row.original).length; i_2++) {
22702
22702
  if (customRowsStyle(row.original)[i_2].predicate) {
22703
22703
  customStyle = customRowsStyle(row.original)[i_2].css;
22704
+ if ((_c = customRowsStyle(row.original)[i_2]) === null || _c === void 0 ? void 0 : _c.hideContextMenu) {
22705
+ isContextMenu = false;
22706
+ }
22704
22707
  }
22705
22708
  }
22706
22709
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.58.3",
3
+ "version": "1.58.4-rc.1",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",