@pisell/materials 2.2.5 → 2.2.7

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.
Files changed (67) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +13 -13
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/Pagination/index.d.ts +1 -1
  20. package/es/components/drag-sort-tree/TreeItem/index.d.ts +16 -0
  21. package/es/components/drag-sort-tree/TreeItem/index.js +196 -0
  22. package/es/components/drag-sort-tree/TreeItem/index.less +41 -0
  23. package/es/components/drag-sort-tree/index.d.ts +4 -0
  24. package/es/components/drag-sort-tree/index.js +88 -0
  25. package/es/components/drag-sort-tree/types.d.ts +20 -0
  26. package/es/components/drag-sort-tree/types.js +1 -0
  27. package/es/components/drawer/index.d.ts +1 -1
  28. package/es/components/drawer/index.js +23 -17
  29. package/es/components/drawer/index.less +25 -1
  30. package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.less +2 -1
  31. package/es/components/table/BasicTable/index.js +5 -2
  32. package/es/components/table/Table/index.less +10 -0
  33. package/es/components/table/Table/tableConfig/body/index.d.ts +4 -4
  34. package/es/components/table/Table/tableConfig/body/index.js +14 -20
  35. package/es/components/table/Table/tableConfig/body/index.less +13 -0
  36. package/es/components/table/Table/utils.d.ts +1 -1
  37. package/es/components/tabs/index.d.ts +4 -4
  38. package/es/components/tabs/index.js +10 -9
  39. package/es/index.d.ts +81 -80
  40. package/es/index.js +40 -39
  41. package/lib/components/Pagination/index.d.ts +1 -1
  42. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +16 -0
  43. package/lib/components/drag-sort-tree/TreeItem/index.js +183 -0
  44. package/lib/components/drag-sort-tree/TreeItem/index.less +41 -0
  45. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  46. package/lib/components/drag-sort-tree/index.js +114 -0
  47. package/lib/components/drag-sort-tree/types.d.ts +20 -0
  48. package/lib/components/drag-sort-tree/types.js +17 -0
  49. package/lib/components/drawer/index.d.ts +1 -1
  50. package/lib/components/drawer/index.js +4 -1
  51. package/lib/components/drawer/index.less +25 -1
  52. package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.less +2 -1
  53. package/lib/components/table/BasicTable/index.js +2 -2
  54. package/lib/components/table/Table/index.less +10 -0
  55. package/lib/components/table/Table/tableConfig/body/index.d.ts +4 -4
  56. package/lib/components/table/Table/tableConfig/body/index.js +2 -2
  57. package/lib/components/table/Table/tableConfig/body/index.less +13 -0
  58. package/lib/components/table/Table/utils.d.ts +1 -1
  59. package/lib/components/tabs/index.d.ts +4 -4
  60. package/lib/components/tabs/index.js +3 -1
  61. package/lib/index.d.ts +81 -80
  62. package/lib/index.js +3 -0
  63. package/lowcode/drag-sort-tree/__screenshots__/drag-sort-tree.png +0 -0
  64. package/lowcode/drag-sort-tree/meta.ts +108 -0
  65. package/lowcode/drag-sort-tree/snippets.ts +57 -0
  66. package/lowcode/tabs/meta.ts +9 -0
  67. package/package.json +2 -2
@@ -0,0 +1,183 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/drag-sort-tree/TreeItem/index.tsx
30
+ var TreeItem_exports = {};
31
+ __export(TreeItem_exports, {
32
+ default: () => TreeItem_default
33
+ });
34
+ module.exports = __toCommonJS(TreeItem_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_sortable = require("@dnd-kit/sortable");
37
+ var import_core = require("@dnd-kit/core");
38
+ var import_utilities = require("@dnd-kit/utilities");
39
+ var import_icons = require("@ant-design/icons");
40
+ var import_sortable2 = require("@dnd-kit/sortable");
41
+ var import_modifiers = require("@dnd-kit/modifiers");
42
+ var import_classnames = __toESM(require("classnames"));
43
+ var import_index = require("./index.less");
44
+ var prefix = "pisell-lowcode";
45
+ var TreeItem = (props) => {
46
+ const { id, item, depth, activeId, sensors, childrenProps, lists, onChange } = props;
47
+ const [expandedKeys, setExpandedKeys] = (0, import_react.useState)([]);
48
+ const { attributes, listeners, setNodeRef, transform, transition } = (0, import_sortable.useSortable)({ id });
49
+ (0, import_react.useEffect)(() => {
50
+ if (activeId) {
51
+ setExpandedKeys([]);
52
+ }
53
+ }, [activeId]);
54
+ const style = {
55
+ transform: import_utilities.CSS.Transform.toString(transform && { ...transform, scaleY: 1 }),
56
+ transition
57
+ };
58
+ const rowKey = (0, import_react.useMemo)(() => {
59
+ return (childrenProps == null ? void 0 : childrenProps.rowKey) || "id";
60
+ }, [childrenProps == null ? void 0 : childrenProps.rowKey]);
61
+ const handleDragEnd = (event) => {
62
+ var _a, _b, _c;
63
+ const { active, over } = event;
64
+ if (!over || !active || !lists.length)
65
+ return;
66
+ try {
67
+ let [activeParentId, activeId2] = (_a = active == null ? void 0 : active.id) == null ? void 0 : _a.split("-");
68
+ let [overParentId, overId] = (_b = over == null ? void 0 : over.id) == null ? void 0 : _b.split("-");
69
+ const parentIndex = lists.findIndex(
70
+ (item2) => item2[rowKey] == activeParentId
71
+ );
72
+ if (activeId2 !== overId && activeParentId === overParentId && parentIndex !== -1) {
73
+ const activeIndex = item.children.findIndex(
74
+ (item2) => item2[rowKey] == activeId2
75
+ );
76
+ const overIndex = item.children.findIndex(
77
+ (item2) => item2[rowKey] == overId
78
+ );
79
+ if (activeIndex !== -1 && overIndex !== -1) {
80
+ const newChildren = (0, import_sortable2.arrayMove)(
81
+ (_c = lists[parentIndex]) == null ? void 0 : _c.children,
82
+ activeIndex,
83
+ overIndex
84
+ );
85
+ const _lists = [
86
+ ...lists.slice(0, parentIndex),
87
+ { ...lists == null ? void 0 : lists[parentIndex], children: newChildren },
88
+ ...lists.slice(parentIndex + 1)
89
+ ];
90
+ onChange && onChange([..._lists]);
91
+ }
92
+ }
93
+ } catch (error) {
94
+ }
95
+ };
96
+ const handleShow = (e) => {
97
+ e.stopPropagation();
98
+ e.preventDefault();
99
+ const index = lists == null ? void 0 : lists.findIndex(
100
+ (node) => node[rowKey] === item[rowKey]
101
+ );
102
+ if (index !== -1) {
103
+ lists[index].show = !lists[index].show;
104
+ onChange == null ? void 0 : onChange([...lists]);
105
+ }
106
+ };
107
+ const onSelect = () => {
108
+ var _a;
109
+ if (depth === 0 && ((_a = item.children) == null ? void 0 : _a.length)) {
110
+ const key = item[rowKey];
111
+ if (expandedKeys.includes(key)) {
112
+ const _ids = expandedKeys.filter((id2) => id2 !== key);
113
+ setExpandedKeys(_ids);
114
+ } else {
115
+ setExpandedKeys([...expandedKeys, key]);
116
+ }
117
+ }
118
+ };
119
+ const renderChildren = (0, import_react.useMemo)(() => {
120
+ var _a;
121
+ const showChildren = ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length) > 0 && (expandedKeys == null ? void 0 : expandedKeys.includes(item[rowKey]));
122
+ const _isAvailableTab = (childrenProps == null ? void 0 : childrenProps.tabKey) === "available";
123
+ return showChildren && /* @__PURE__ */ import_react.default.createElement(
124
+ import_sortable2.SortableContext,
125
+ {
126
+ items: item.children.map(
127
+ (child) => `${item[rowKey]}-${child[rowKey]}`
128
+ ),
129
+ strategy: import_sortable2.verticalListSortingStrategy
130
+ },
131
+ item.children.map(
132
+ (child) => _isAvailableTab && (child == null ? void 0 : child.is_available) || !_isAvailableTab ? /* @__PURE__ */ import_react.default.createElement(
133
+ TreeItem,
134
+ {
135
+ id: `${item[rowKey]}-${child[rowKey]}`,
136
+ key: `${item[rowKey]}-${child[rowKey]}`,
137
+ item: child,
138
+ lists,
139
+ depth: depth + 1,
140
+ childrenProps
141
+ }
142
+ ) : null
143
+ )
144
+ );
145
+ }, [item.children, expandedKeys, rowKey, lists, childrenProps == null ? void 0 : childrenProps.tabKey]);
146
+ const rightIcon = (0, import_react.useMemo)(() => {
147
+ const hiddenRightIcon = childrenProps == null ? void 0 : childrenProps.hiddenRightIcon;
148
+ return !hiddenRightIcon ? /* @__PURE__ */ import_react.default.createElement(
149
+ "div",
150
+ {
151
+ className: (0, import_classnames.default)(`${prefix}-drag-sort-tree-icon`),
152
+ onClick: handleShow
153
+ },
154
+ item.show ? /* @__PURE__ */ import_react.default.createElement(import_icons.EyeOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.EyeInvisibleOutlined, null)
155
+ ) : null;
156
+ }, [childrenProps == null ? void 0 : childrenProps.hiddenRightIcon, item == null ? void 0 : item.show, lists]);
157
+ const warningIcon = (0, import_react.useMemo)(() => {
158
+ const hiddenWarningIcon = childrenProps == null ? void 0 : childrenProps.hiddenWarningIcon;
159
+ return !hiddenWarningIcon && !(item == null ? void 0 : item.is_available) ? /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}-drag-sort-tree-item-icon`) }, /* @__PURE__ */ import_react.default.createElement(import_icons.WarningOutlined, { style: { color: "red" } })) : null;
160
+ }, [childrenProps == null ? void 0 : childrenProps.hiddenWarningIcon, item == null ? void 0 : item.is_available]);
161
+ return /* @__PURE__ */ import_react.default.createElement(
162
+ import_core.DndContext,
163
+ {
164
+ sensors,
165
+ modifiers: [import_modifiers.restrictToVerticalAxis, import_modifiers.restrictToParentElement],
166
+ onDragEnd: handleDragEnd
167
+ },
168
+ /* @__PURE__ */ import_react.default.createElement("div", { ref: setNodeRef, style, ...attributes, ...listeners }, /* @__PURE__ */ import_react.default.createElement(
169
+ "div",
170
+ {
171
+ style: { paddingLeft: !depth ? "8px" : `${depth * 20}px` },
172
+ className: (0, import_classnames.default)(
173
+ `${prefix}-drag-sort-tree`,
174
+ childrenProps == null ? void 0 : childrenProps.className
175
+ ),
176
+ onClick: onSelect
177
+ },
178
+ /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}-drag-sort-tree-item`) }, !(childrenProps == null ? void 0 : childrenProps.hiddenDraggableIcon) ? /* @__PURE__ */ import_react.default.createElement(import_icons.HolderOutlined, null) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-drag-sort-tree-title` }, (childrenProps == null ? void 0 : childrenProps.titleRender) || (item == null ? void 0 : item.title))),
179
+ !depth ? rightIcon : warningIcon
180
+ ), renderChildren)
181
+ );
182
+ };
183
+ var TreeItem_default = TreeItem;
@@ -0,0 +1,41 @@
1
+ @pisell-prefix: pisell-lowcode;
2
+
3
+ .@{pisell-prefix} {
4
+ &-drag-sort-tree{
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ font-size: 16px;
9
+ cursor: pointer;
10
+ touch-action: none !important;
11
+ width: 100%;
12
+ color: #101828;
13
+ height: 40px;
14
+ line-height: 40px;
15
+ }
16
+
17
+ &-drag-sort-tree:hover {
18
+ background: rgb(237, 238, 238);
19
+ }
20
+
21
+ &-drag-sort-tree-item {
22
+ display: flex;
23
+ align-items: center;
24
+ }
25
+
26
+ &-drag-sort-tree &-drag-sort-tree-title {
27
+ margin-left: 10px;
28
+ font-size: 14px;
29
+ }
30
+
31
+ &-drag-sort-tree-icon,
32
+ &-drag-sort-tree-item-icon {
33
+ height: 30px;
34
+ width: 30px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ }
39
+ }
40
+
41
+
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SortType } from './types';
3
+ declare const DragSortTree: (props: SortType) => React.JSX.Element;
4
+ export default DragSortTree;
@@ -0,0 +1,114 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/drag-sort-tree/index.tsx
30
+ var drag_sort_tree_exports = {};
31
+ __export(drag_sort_tree_exports, {
32
+ default: () => drag_sort_tree_default
33
+ });
34
+ module.exports = __toCommonJS(drag_sort_tree_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_core = require("@dnd-kit/core");
37
+ var import_sortable = require("@dnd-kit/sortable");
38
+ var import_TreeItem = __toESM(require("./TreeItem"));
39
+ var import_modifiers = require("@dnd-kit/modifiers");
40
+ var DragSortTree = (props) => {
41
+ const { value, rowKey, tabKey, onChange } = props;
42
+ const [items, setItems] = (0, import_react.useState)(value || []);
43
+ const [activeId, setActiveId] = (0, import_react.useState)(null);
44
+ (0, import_react.useEffect)(() => {
45
+ setItems(value || []);
46
+ }, [tabKey]);
47
+ const sensors = (0, import_core.useSensors)(
48
+ (0, import_core.useSensor)(import_core.PointerSensor, {
49
+ activationConstraint: {
50
+ distance: 5
51
+ }
52
+ })
53
+ );
54
+ const handleDragStart = (event) => {
55
+ const { active } = event;
56
+ setActiveId(active == null ? void 0 : active.id);
57
+ };
58
+ const handleDragEnd = (event) => {
59
+ const { active, over } = event;
60
+ setActiveId(null);
61
+ if (!over || !active)
62
+ return;
63
+ try {
64
+ const activeId2 = active.id;
65
+ const overId = over.id;
66
+ if (activeId2 !== overId) {
67
+ const activeIndex = items.findIndex(
68
+ (item) => item[rowKey] === activeId2
69
+ );
70
+ const overIndex = items.findIndex(
71
+ (item) => item[rowKey] === overId
72
+ );
73
+ const _lists = (0, import_sortable.arrayMove)(items, activeIndex, overIndex);
74
+ handleChange(_lists);
75
+ }
76
+ } catch (error) {
77
+ }
78
+ };
79
+ const handleChange = (value2) => {
80
+ setItems(value2);
81
+ onChange && onChange(value2);
82
+ };
83
+ return /* @__PURE__ */ import_react.default.createElement(
84
+ import_core.DndContext,
85
+ {
86
+ sensors,
87
+ onDragEnd: handleDragEnd,
88
+ onDragStart: handleDragStart,
89
+ modifiers: [import_modifiers.restrictToVerticalAxis, import_modifiers.restrictToParentElement]
90
+ },
91
+ /* @__PURE__ */ import_react.default.createElement(
92
+ import_sortable.SortableContext,
93
+ {
94
+ items: items.map((item) => item[rowKey]),
95
+ strategy: import_sortable.verticalListSortingStrategy
96
+ },
97
+ items.map((item) => /* @__PURE__ */ import_react.default.createElement(
98
+ import_TreeItem.default,
99
+ {
100
+ key: item[rowKey],
101
+ id: item[rowKey],
102
+ item,
103
+ depth: 0,
104
+ sensors,
105
+ activeId,
106
+ childrenProps: props,
107
+ lists: items,
108
+ onChange: handleChange
109
+ }
110
+ ))
111
+ )
112
+ );
113
+ };
114
+ var drag_sort_tree_default = DragSortTree;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export declare type ValueProps = {
3
+ id: number | string;
4
+ title: string;
5
+ show?: boolean;
6
+ is_available?: boolean;
7
+ type_id?: number;
8
+ children?: ValueProps[];
9
+ };
10
+ export declare type SortType = {
11
+ value: ValueProps[];
12
+ rowKey: string;
13
+ className?: string | Function;
14
+ titleRender?: string | React.ReactElement;
15
+ hiddenDraggableIcon?: boolean;
16
+ hiddenRightIcon?: boolean;
17
+ hiddenWarningIcon?: boolean;
18
+ tabKey?: string;
19
+ onChange?: (value: ValueProps[]) => void;
20
+ };
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/drag-sort-tree/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -1,3 +1,3 @@
1
- import "./index.less";
1
+ import './index.less';
2
2
  declare const Drawer: any;
3
3
  export default Drawer;
@@ -126,7 +126,10 @@ var Drawer = (props) => {
126
126
  )
127
127
  };
128
128
  }
129
- return headerStyle;
129
+ return {
130
+ closeIcon: /* @__PURE__ */ import_react.default.createElement(import_XClose.default, { className: `${prefix}drawer-header-close-icon` }),
131
+ ...headerStyle
132
+ };
130
133
  }, [operateMode, placement, onClose, persistentState, setPersistentState]);
131
134
  return /* @__PURE__ */ import_react.default.createElement(
132
135
  import_antd.Drawer,
@@ -1,6 +1,24 @@
1
1
  @pisell-prefix: pisell-lowcode;
2
2
 
3
3
  .@{pisell-prefix} {
4
+ &-drawer-header {
5
+ position: relative;
6
+ }
7
+
8
+ &-drawer-header-close-icon {
9
+ position: absolute;
10
+ top: 0;
11
+ bottom: 0;
12
+ left: 0;
13
+ width: 50px;
14
+ cursor: pointer;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ font-size: 20px;
19
+ z-index: 1;
20
+ }
21
+
4
22
  &-drawer-outside-wrap {
5
23
  position: absolute;
6
24
  padding: 10px;
@@ -8,9 +26,11 @@
8
26
  display: flex;
9
27
  flex-direction: column;
10
28
  }
29
+
11
30
  &-drawer-outside-wrap-right {
12
31
  left: -82px;
13
32
  }
33
+
14
34
  &-drawer-outside-action-wrap {
15
35
  width: 56px;
16
36
  height: 56px;
@@ -24,17 +44,21 @@
24
44
  justify-content: center;
25
45
  margin-bottom: 20px;
26
46
  cursor: pointer;
47
+
27
48
  &:hover {
28
49
  background: #e8e8ee;
29
50
  }
51
+
30
52
  .anticon {
31
53
  font-size: 20px;
32
54
  }
33
55
  }
56
+
34
57
  &-drawer-outside-action-wrap:last-child {
35
58
  margin-bottom: 0;
36
59
  }
60
+
37
61
  &-drawer-outside-action-active {
38
62
  background: var(--Primary-200, #E9D7FE) !important;
39
63
  }
40
- }
64
+ }
@@ -22,7 +22,7 @@
22
22
  }
23
23
  &-table-action-column-drag-item {
24
24
  display: flex;
25
- height: 36px;
25
+ min-height: 36px;
26
26
  border-radius: 4px;
27
27
  align-items: center;
28
28
  &:hover {
@@ -39,6 +39,7 @@
39
39
  padding-right: 6px;
40
40
  display: flex;
41
41
  justify-content: space-between;
42
+ align-items: center;
42
43
  flex: 1;
43
44
  }
44
45
  &-table-action-column-drag-item-right-text {
@@ -45,7 +45,7 @@ var BasicTable = (props) => {
45
45
  const [filter, setFilter] = (0, import_react.useState)();
46
46
  const [sort, setSort] = (0, import_react.useState)();
47
47
  const form = import_antd.Form.useFormInstance();
48
- const formPagination = import_antd.Form.useWatch("pagination", form) || {
48
+ const formPagination = import_antd.Form.useWatch("pagination", { form, preserve: true }) || {
49
49
  page: 1,
50
50
  size: 10
51
51
  };
@@ -144,7 +144,7 @@ var BasicTable = (props) => {
144
144
  defaultExpandAllRows: true
145
145
  }
146
146
  }
147
- ), total > (((_a = pagination == null ? void 0 : pagination.pageSizeOptions) == null ? void 0 : _a[0]) || 10) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "pagination" }, /* @__PURE__ */ import_react.default.createElement(
147
+ ), total > ((pagination == null ? void 0 : pagination.pageSize) || ((_a = pagination == null ? void 0 : pagination.pageSizeOptions) == null ? void 0 : _a[0]) || 10) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "pagination" }, /* @__PURE__ */ import_react.default.createElement(
148
148
  import_Pagination.FormPagination,
149
149
  {
150
150
  ...pagination,
@@ -15,6 +15,16 @@
15
15
  margin-top: 12px;
16
16
  }
17
17
  }
18
+
19
+ .pisell-lowcode-checkbox{
20
+ position: static;
21
+ width: auto!important;
22
+ height: auto!important;
23
+ }
24
+
25
+ .pisell-lowcode-checkbox-inner, .pisell-lowcode-radio-inner{
26
+ position: relative
27
+ }
18
28
  }
19
29
 
20
30
  .materials-grid-table-wrap {
@@ -1,6 +1,6 @@
1
- import type { FormInstance } from "antd/es/form";
2
- import React from "react";
3
- import "./index.less";
1
+ import type { FormInstance } from 'antd/es/form';
2
+ import React from 'react';
3
+ import './index.less';
4
4
  export declare const EditableContext: React.Context<FormInstance<any> | null>;
5
5
  interface Item {
6
6
  key: string;
@@ -10,7 +10,7 @@ interface Item {
10
10
  }
11
11
  export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
12
12
  index: number;
13
- "data-row-key": string;
13
+ 'data-row-key': string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
16
  __is_drag_sort?: boolean;
@@ -80,11 +80,11 @@ var EditableRow = ({
80
80
  }
81
81
  return import_react.default.Children.map(children, (child) => {
82
82
  if (child.key === "__sort") {
83
- const handleIcon = order_by ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-drag-sort-disabled-tip") }, /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, { style: { touchAction: "none", cursor: "move" } })) : /* @__PURE__ */ import_react.default.createElement(
83
+ const handleIcon = order_by ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-drag-sort-disabled-tip") }, /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, { className: "pisell-lowcode-menu-out-lined-icon" })) : /* @__PURE__ */ import_react.default.createElement(
84
84
  import_icons.MenuOutlined,
85
85
  {
86
86
  ref: setActivatorNodeRef,
87
- style: { touchAction: "none", cursor: "move" },
87
+ className: "pisell-lowcode-menu-out-lined-icon",
88
88
  ...listeners
89
89
  }
90
90
  );
@@ -3,6 +3,19 @@
3
3
  height: 100%;
4
4
  }
5
5
 
6
+ .pisell-lowcode-menu-out-lined-icon{
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ cursor: move;
16
+ touch-action: none;
17
+ }
18
+
6
19
  .materials-grid-table-cell {
7
20
  padding: 12px;
8
21
  }
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -1,6 +1,6 @@
1
- import React, { Component } from "react";
2
- import { TabsProps } from "antd";
3
- import "./index.less";
1
+ import React, { Component } from 'react';
2
+ import { TabsProps } from 'antd';
3
+ import './index.less';
4
4
  declare class Tabs extends Component<any> {
5
5
  state: {
6
6
  activeKey: any;
@@ -8,7 +8,7 @@ declare class Tabs extends Component<any> {
8
8
  private _handleChange;
9
9
  setActiveKey: (key: string) => void;
10
10
  getActiveKey: () => any;
11
- renderIconLabelTabBar: TabsProps["renderTabBar"];
11
+ renderIconLabelTabBar: TabsProps['renderTabBar'];
12
12
  filterHiddenTabs: (tabs: any[]) => any[];
13
13
  render(): React.JSX.Element;
14
14
  }
@@ -59,6 +59,7 @@ var Tabs = class extends import_react.Component {
59
59
  return this.state.activeKey;
60
60
  };
61
61
  this.renderIconLabelTabBar = (props, DefaultTabBar) => {
62
+ var _a;
62
63
  const { items, sidebarWidth } = this.props;
63
64
  let wrapStyle = {
64
65
  gap: props.tabBarGutter
@@ -75,7 +76,8 @@ var Tabs = class extends import_react.Component {
75
76
  className: (0, import_classnames.default)(
76
77
  "pisell-lowcode-tabs-nav",
77
78
  `${prefix}tab-bar-wrap`,
78
- `${prefix}tab-bar-wrap-${props.tabPosition}`
79
+ `${prefix}tab-bar-wrap-${props.tabPosition}`,
80
+ (_a = this.props) == null ? void 0 : _a.className
79
81
  ),
80
82
  style: wrapStyle
81
83
  },