@pisell/materials 1.0.219 → 1.0.220

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.
@@ -108,6 +108,7 @@ var BasicTable = function BasicTable(props) {
108
108
  var _other$onRow;
109
109
  return _objectSpread(_objectSpread({}, (other === null || other === void 0 ? void 0 : (_other$onRow = other.onRow) === null || _other$onRow === void 0 ? void 0 : _other$onRow.call(other, record, index)) || {}), {}, {
110
110
  __is_group: record.__is_group,
111
+ __is_drag_sort: other.dragSort,
111
112
  className: record.__is_group ? "pisell-lowcode-table-group-row-wrap" : ""
112
113
  });
113
114
  },
@@ -13,6 +13,7 @@ export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
13
13
  "data-row-key": string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
+ __is_drag_sort?: boolean;
16
17
  __table_data_source_children?: Record<string, any>[];
17
18
  }
18
19
  export interface EditableCellProps {
@@ -1,5 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["index", "__is_group", "children"],
2
+ var _excluded = ["index", "__is_group", "children", "__is_drag_sort"],
3
3
  _excluded2 = ["title", "editable", "children", "dataIndex", "field_type", "record", "handleSave", "lock", "render"];
4
4
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -29,6 +29,7 @@ var EditableRow = function EditableRow(_ref) {
29
29
  var index = _ref.index,
30
30
  __is_group = _ref.__is_group,
31
31
  children = _ref.children,
32
+ __is_drag_sort = _ref.__is_drag_sort,
32
33
  props = _objectWithoutProperties(_ref, _excluded);
33
34
  var _Form$useForm = Form.useForm(),
34
35
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
@@ -50,7 +51,7 @@ var EditableRow = function EditableRow(_ref) {
50
51
  scaleY: 1
51
52
  })),
52
53
  transition: transition
53
- }, isDragging ? {
54
+ }, isDragging && __is_drag_sort ? {
54
55
  position: "relative",
55
56
  zIndex: 9999
56
57
  } : {});
@@ -123,6 +123,7 @@ var BasicTable = (props) => {
123
123
  return {
124
124
  ...((_a2 = other == null ? void 0 : other.onRow) == null ? void 0 : _a2.call(other, record, index)) || {},
125
125
  __is_group: record.__is_group,
126
+ __is_drag_sort: other.dragSort,
126
127
  className: record.__is_group ? "pisell-lowcode-table-group-row-wrap" : ""
127
128
  };
128
129
  },
@@ -13,6 +13,7 @@ export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
13
13
  "data-row-key": string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
+ __is_drag_sort?: boolean;
16
17
  __table_data_source_children?: Record<string, any>[];
17
18
  }
18
19
  export interface EditableCellProps {
@@ -51,6 +51,7 @@ var EditableRow = ({
51
51
  children,
52
52
  // __table_group_field,
53
53
  // __table_data_source_children,
54
+ __is_drag_sort,
54
55
  ...props
55
56
  }) => {
56
57
  const [form] = import_antd.Form.useForm();
@@ -71,7 +72,7 @@ var EditableRow = ({
71
72
  ...props.style,
72
73
  transform: import_utilities.CSS.Transform.toString(transform && { ...transform, scaleY: 1 }),
73
74
  transition,
74
- ...isDragging ? { position: "relative", zIndex: 9999 } : {}
75
+ ...isDragging && __is_drag_sort ? { position: "relative", zIndex: 9999 } : {}
75
76
  };
76
77
  const cells = (0, import_react.useMemo)(() => {
77
78
  if (__is_group) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.219",
3
+ "version": "1.0.220",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -60,9 +60,9 @@
60
60
  "react-infinite-scroll-component": "^6.1.0",
61
61
  "react-window": "^1.8.10",
62
62
  "react-virtualized-auto-sizer": "^1.0.20",
63
- "@pisell/icon": "0.0.8",
63
+ "@pisell/utils": "1.0.23",
64
64
  "@pisell/date-picker": "1.0.68",
65
- "@pisell/utils": "1.0.23"
65
+ "@pisell/icon": "0.0.8"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",