cozy-ui 130.3.1 → 130.4.0
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [130.4.0](https://github.com/cozy/cozy-ui/compare/v130.3.1...v130.4.0) (2025-10-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Disable table row on cut :sparkles: ([41f8c1d](https://github.com/cozy/cozy-ui/commit/41f8c1d))
|
|
7
|
+
|
|
1
8
|
## [130.3.1](https://github.com/cozy/cozy-ui/compare/v130.3.0...v130.3.1) (2025-09-24)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { getEmptyImage } from 'react-dnd-html5-backend'
|
|
|
4
4
|
|
|
5
5
|
import TableRowClassic from '../../../TableRow'
|
|
6
6
|
|
|
7
|
-
const TableRow = ({ item, context, ...props }) => {
|
|
7
|
+
const TableRow = ({ item, context, componentsProps, ...props }) => {
|
|
8
8
|
const {
|
|
9
9
|
selectedItems,
|
|
10
10
|
itemsInDropProcess,
|
|
@@ -18,7 +18,8 @@ const TableRow = ({ item, context, ...props }) => {
|
|
|
18
18
|
dragId
|
|
19
19
|
} = dragProps
|
|
20
20
|
const isSelected = context?.isSelectedItem(item)
|
|
21
|
-
const isDisabled =
|
|
21
|
+
const isDisabled =
|
|
22
|
+
itemsInDropProcess.includes(item._id) || componentsProps?.tableRow?.disabled
|
|
22
23
|
|
|
23
24
|
const [dragCollect, dragRef, dragRefPreview] = useDrag(
|
|
24
25
|
() => ({
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["item", "context"];
|
|
5
|
+
var _excluded = ["item", "context", "componentsProps"];
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { useEffect } from 'react';
|
|
8
8
|
import { useDrag, useDrop } from 'react-dnd';
|
|
@@ -10,8 +10,11 @@ import { getEmptyImage } from 'react-dnd-html5-backend';
|
|
|
10
10
|
import TableRowClassic from "cozy-ui/transpiled/react/TableRow";
|
|
11
11
|
|
|
12
12
|
var TableRow = function TableRow(_ref) {
|
|
13
|
+
var _componentsProps$tabl;
|
|
14
|
+
|
|
13
15
|
var item = _ref.item,
|
|
14
16
|
context = _ref.context,
|
|
17
|
+
componentsProps = _ref.componentsProps,
|
|
15
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
19
|
|
|
17
20
|
var selectedItems = context.selectedItems,
|
|
@@ -23,7 +26,7 @@ var TableRow = function TableRow(_ref) {
|
|
|
23
26
|
canDragProps = dragProps.canDrag,
|
|
24
27
|
dragId = dragProps.dragId;
|
|
25
28
|
var isSelected = context === null || context === void 0 ? void 0 : context.isSelectedItem(item);
|
|
26
|
-
var isDisabled = itemsInDropProcess.includes(item._id);
|
|
29
|
+
var isDisabled = itemsInDropProcess.includes(item._id) || (componentsProps === null || componentsProps === void 0 ? void 0 : (_componentsProps$tabl = componentsProps.tableRow) === null || _componentsProps$tabl === void 0 ? void 0 : _componentsProps$tabl.disabled);
|
|
27
30
|
|
|
28
31
|
var _useDrag = useDrag(function () {
|
|
29
32
|
return {
|