@crystaldesign/grid 25.5.0-beta.35 → 25.5.0-beta.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.
@@ -784,6 +784,7 @@ var css_248z$5 = ".menuItemShowTooltip-m-Rd7 {\n pointer-events: inherit !impor
784
784
  styleInject(css_248z$5);
785
785
 
786
786
  function ActionCell(_ref) {
787
+ var _finalActions$0$disab;
787
788
  var row = _ref.row,
788
789
  actions = _ref.actions,
789
790
  _updateData = _ref.updateData,
@@ -794,6 +795,8 @@ function ActionCell(_ref) {
794
795
  _React$useState2 = _slicedToArray(_React$useState, 2),
795
796
  anchorEl = _React$useState2[0],
796
797
  setAnchorEl = _React$useState2[1];
798
+ var _useTranslation = useTranslation(),
799
+ t = _useTranslation.t;
797
800
  var handleClose = function handleClose() {
798
801
  setAnchorEl(null);
799
802
  };
@@ -845,31 +848,41 @@ function ActionCell(_ref) {
845
848
  var finalActions = actions.filter(function (a) {
846
849
  return typeof a.hide == 'function' ? !a.hide(row.original, row.id) : !a.hide;
847
850
  });
851
+ var actionDisabled = function actionDisabled(action) {
852
+ return typeof action.disabled == 'function' ? action.disabled(row.original, row.id) : action.disabled;
853
+ };
848
854
  if (finalActions.length <= groupActions) {
849
855
  return /*#__PURE__*/jsx(ButtonGroup, {
850
856
  color: "primary",
851
857
  children: finalActions.map(function (a) {
852
- return /*#__PURE__*/jsx(Button, {
853
- disabled: typeof a.disabled == 'function' ? a.disabled(row.original, row.id) : a.disabled,
854
- onClick: function onClick(e) {
855
- onActionClick(a);
856
- e.stopPropagation();
857
- },
858
- children: typeof a.label == 'function' ? a.label(row.original) : a.label
859
- }, typeof a.label == 'function' ? a.label(row.original) : a.label);
858
+ var _a$disabledTooltip;
859
+ return /*#__PURE__*/jsx(Tooltip, {
860
+ title: actionDisabled(a) ? t((_a$disabledTooltip = a.disabledTooltip) !== null && _a$disabledTooltip !== void 0 ? _a$disabledTooltip : '') : '',
861
+ children: /*#__PURE__*/jsx(Button, {
862
+ disabled: actionDisabled(a),
863
+ onClick: function onClick(e) {
864
+ onActionClick(a);
865
+ e.stopPropagation();
866
+ },
867
+ children: typeof a.label == 'function' ? a.label(row.original) : a.label
868
+ }, typeof a.label == 'function' ? a.label(row.original) : a.label)
869
+ }, a.label);
860
870
  })
861
871
  });
862
872
  }
863
873
  return /*#__PURE__*/jsxs(Fragment, {
864
874
  children: [/*#__PURE__*/jsxs(ButtonGroup, {
865
875
  color: "primary",
866
- children: [/*#__PURE__*/jsx(Button, {
867
- disabled: typeof finalActions[0].disabled == 'function' ? finalActions[0].disabled(row.original, row.id) : finalActions[0].disabled,
868
- onClick: function onClick(e) {
869
- onActionClick(finalActions[0]);
870
- e.stopPropagation();
871
- },
872
- children: typeof finalActions[0].label == 'function' ? finalActions[0].label(row.original) : finalActions[0].label
876
+ children: [/*#__PURE__*/jsx(Tooltip, {
877
+ title: actionDisabled(finalActions[0]) ? t((_finalActions$0$disab = finalActions[0].disabledTooltip) !== null && _finalActions$0$disab !== void 0 ? _finalActions$0$disab : '') : '',
878
+ children: /*#__PURE__*/jsx(Button, {
879
+ disabled: actionDisabled(finalActions[0]),
880
+ onClick: function onClick(e) {
881
+ onActionClick(finalActions[0]);
882
+ e.stopPropagation();
883
+ },
884
+ children: typeof finalActions[0].label == 'function' ? finalActions[0].label(row.original) : finalActions[0].label
885
+ }, finalActions[0].label)
873
886
  }, finalActions[0].label), /*#__PURE__*/jsx(Button, {
874
887
  id: "additionalActionsBtn",
875
888
  color: "primary",
@@ -1 +1 @@
1
- {"version":3,"file":"ActionCell.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/cells/action/ActionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAKzD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EACnD,GAAG,EACH,OAAO,EACP,UAAU,EACV,UAAU,EACV,YAAgB,GACjB,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;IACrB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,qBA0HA"}
1
+ {"version":3,"file":"ActionCell.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/cells/action/ActionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAMzD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EACnD,GAAG,EACH,OAAO,EACP,UAAU,EACV,UAAU,EACV,YAAgB,GACjB,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;IACrB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,qBAoIA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/grid",
3
- "version": "25.5.0-beta.35",
3
+ "version": "25.5.0-beta.37",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@mui/x-date-pickers": "^7.22.0",
@@ -12,9 +12,9 @@
12
12
  "react-dom": "18.3.1"
13
13
  },
14
14
  "dependencies": {
15
- "@crystaldesign/content-box": "25.5.0-beta.35",
16
- "@crystaldesign/rtf-editor": "25.5.0-beta.35",
17
- "@crystaldesign/searchfield": "25.5.0-beta.35",
15
+ "@crystaldesign/content-box": "25.5.0-beta.37",
16
+ "@crystaldesign/rtf-editor": "25.5.0-beta.37",
17
+ "@crystaldesign/searchfield": "25.5.0-beta.37",
18
18
  "@hello-pangea/dnd": "^17.0.0",
19
19
  "@mui/icons-material": "^6.1.5",
20
20
  "@mui/lab": "^6.0.0-beta.13",
@@ -40,5 +40,5 @@
40
40
  },
41
41
  "module": "build/esm/index.js",
42
42
  "types": "./build/types/grid/src/index.d.ts",
43
- "gitHead": "901d3a06c739c69b1b8f77789217d3d17fa27e7c"
43
+ "gitHead": "fdb0068429fa91168552b490968daef72ac55507"
44
44
  }