@pisell/materials 2.2.6 → 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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +13 -13
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +16 -0
- package/es/components/drag-sort-tree/TreeItem/index.js +196 -0
- package/es/components/drag-sort-tree/TreeItem/index.less +41 -0
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/drag-sort-tree/index.js +88 -0
- package/es/components/drag-sort-tree/types.d.ts +20 -0
- package/es/components/drag-sort-tree/types.js +1 -0
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/drawer/index.js +23 -17
- package/es/components/drawer/index.less +25 -1
- package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.less +2 -1
- package/es/components/table/BasicTable/index.js +5 -2
- package/es/components/tabs/index.d.ts +4 -4
- package/es/components/tabs/index.js +10 -9
- package/es/index.d.ts +81 -80
- package/es/index.js +40 -39
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +16 -0
- package/lib/components/drag-sort-tree/TreeItem/index.js +183 -0
- package/lib/components/drag-sort-tree/TreeItem/index.less +41 -0
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/drag-sort-tree/index.js +114 -0
- package/lib/components/drag-sort-tree/types.d.ts +20 -0
- package/lib/components/drag-sort-tree/types.js +17 -0
- package/lib/components/drawer/index.d.ts +1 -1
- package/lib/components/drawer/index.js +4 -1
- package/lib/components/drawer/index.less +25 -1
- package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.less +2 -1
- package/lib/components/table/BasicTable/index.js +2 -2
- package/lib/components/tabs/index.d.ts +4 -4
- package/lib/components/tabs/index.js +3 -1
- package/lib/index.d.ts +81 -80
- package/lib/index.js +3 -0
- package/lowcode/drag-sort-tree/__screenshots__/drag-sort-tree.png +0 -0
- package/lowcode/drag-sort-tree/meta.ts +108 -0
- package/lowcode/drag-sort-tree/snippets.ts +57 -0
- package/lowcode/tabs/meta.ts +9 -0
- package/package.json +2 -2
|
@@ -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);
|
|
@@ -126,7 +126,10 @@ var Drawer = (props) => {
|
|
|
126
126
|
)
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
return
|
|
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,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import { TabsProps } from
|
|
3
|
-
import
|
|
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[
|
|
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
|
},
|
package/lib/index.d.ts
CHANGED
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
export { Affix } from
|
|
2
|
-
export { Anchor } from
|
|
3
|
-
export { Alert } from
|
|
4
|
-
export { Avatar } from
|
|
5
|
-
export { Badge } from
|
|
6
|
-
export { Breadcrumb } from
|
|
7
|
-
export { Card } from
|
|
8
|
-
export { Collapse } from
|
|
9
|
-
export { Carousel } from
|
|
10
|
-
export { Col } from
|
|
11
|
-
export { Descriptions } from
|
|
12
|
-
export { Divider } from
|
|
13
|
-
export { Empty } from
|
|
14
|
-
export { Grid } from
|
|
15
|
-
export { Image } from
|
|
16
|
-
export { InputNumber } from
|
|
17
|
-
export { message } from
|
|
18
|
-
export { Menu } from
|
|
19
|
-
export { Mentions } from
|
|
20
|
-
export { Statistic } from
|
|
21
|
-
export { notification } from
|
|
22
|
-
export { Pagination } from
|
|
23
|
-
export { Popconfirm } from
|
|
24
|
-
export { Popover } from
|
|
25
|
-
export { Progress } from
|
|
26
|
-
export { Rate } from
|
|
27
|
-
export { Result } from
|
|
28
|
-
export { Row } from
|
|
29
|
-
export { Space } from
|
|
30
|
-
export { Spin } from
|
|
31
|
-
export { Steps } from
|
|
32
|
-
export { Switch } from
|
|
33
|
-
export { Transfer } from
|
|
34
|
-
export { Tree } from
|
|
35
|
-
export { Tag } from
|
|
36
|
-
export { Timeline } from
|
|
37
|
-
export { Tooltip } from
|
|
38
|
-
export { version } from
|
|
39
|
-
export { default as Typography } from
|
|
40
|
-
export { default as Skeleton } from
|
|
41
|
-
export { default as Checkbox } from
|
|
42
|
-
export { default as Button } from
|
|
43
|
-
export { default as Radio } from
|
|
44
|
-
export { default as Upload } from
|
|
45
|
-
export { default as Icon } from
|
|
46
|
-
export { default as Form } from
|
|
47
|
-
export { default as Dropdown } from
|
|
48
|
-
export { default as Calendar } from
|
|
49
|
-
export { default as ConfigProvider } from
|
|
50
|
-
export { default as DatePicker } from
|
|
51
|
-
export { default as Tabs } from
|
|
52
|
-
export { default as TimePicker } from
|
|
53
|
-
export { default as Slider } from
|
|
54
|
-
export { default as Table } from
|
|
55
|
-
export { default as Modal } from
|
|
56
|
-
export { default as Drawer } from
|
|
57
|
-
export { default as TreeSelect } from
|
|
58
|
-
export { default as Input } from
|
|
59
|
-
export { default as Select } from
|
|
60
|
-
export { default as Cascader } from
|
|
61
|
-
export { default as AutoComplete } from
|
|
62
|
-
export { default as Div } from
|
|
63
|
-
export { default as Page } from
|
|
64
|
-
export { default as Component } from
|
|
65
|
-
export { default as Filter } from
|
|
66
|
-
export { default as Translation } from
|
|
67
|
-
export { default as SortableList } from
|
|
68
|
-
export { default as RecordView } from
|
|
69
|
-
export { default as QRCode } from
|
|
70
|
-
export { default as ClassicLayout } from
|
|
71
|
-
export { default as List } from
|
|
72
|
-
export { default as Sort } from
|
|
73
|
-
export { default as InputNumberRange } from
|
|
74
|
-
export { default as LowCodePage } from
|
|
75
|
-
export { default as Segmented } from
|
|
76
|
-
export { default as VirtualKeyboard } from
|
|
77
|
-
export { default as VirtualKeyboardTime } from
|
|
78
|
-
export { default as SelectTime } from
|
|
79
|
-
export { default as AutoCompleteNumber } from
|
|
80
|
-
export { default as BatchEditor } from
|
|
1
|
+
export { Affix } from 'antd';
|
|
2
|
+
export { Anchor } from 'antd';
|
|
3
|
+
export { Alert } from 'antd';
|
|
4
|
+
export { Avatar } from 'antd';
|
|
5
|
+
export { Badge } from 'antd';
|
|
6
|
+
export { Breadcrumb } from 'antd';
|
|
7
|
+
export { Card } from 'antd';
|
|
8
|
+
export { Collapse } from 'antd';
|
|
9
|
+
export { Carousel } from 'antd';
|
|
10
|
+
export { Col } from 'antd';
|
|
11
|
+
export { Descriptions } from 'antd';
|
|
12
|
+
export { Divider } from 'antd';
|
|
13
|
+
export { Empty } from 'antd';
|
|
14
|
+
export { Grid } from 'antd';
|
|
15
|
+
export { Image } from 'antd';
|
|
16
|
+
export { InputNumber } from 'antd';
|
|
17
|
+
export { message } from 'antd';
|
|
18
|
+
export { Menu } from 'antd';
|
|
19
|
+
export { Mentions } from 'antd';
|
|
20
|
+
export { Statistic } from 'antd';
|
|
21
|
+
export { notification } from 'antd';
|
|
22
|
+
export { Pagination } from 'antd';
|
|
23
|
+
export { Popconfirm } from 'antd';
|
|
24
|
+
export { Popover } from 'antd';
|
|
25
|
+
export { Progress } from 'antd';
|
|
26
|
+
export { Rate } from 'antd';
|
|
27
|
+
export { Result } from 'antd';
|
|
28
|
+
export { Row } from 'antd';
|
|
29
|
+
export { Space } from 'antd';
|
|
30
|
+
export { Spin } from 'antd';
|
|
31
|
+
export { Steps } from 'antd';
|
|
32
|
+
export { Switch } from 'antd';
|
|
33
|
+
export { Transfer } from 'antd';
|
|
34
|
+
export { Tree } from 'antd';
|
|
35
|
+
export { Tag } from 'antd';
|
|
36
|
+
export { Timeline } from 'antd';
|
|
37
|
+
export { Tooltip } from 'antd';
|
|
38
|
+
export { version } from 'antd';
|
|
39
|
+
export { default as Typography } from './components/typography';
|
|
40
|
+
export { default as Skeleton } from './components/skeleton';
|
|
41
|
+
export { default as Checkbox } from './components/checkbox';
|
|
42
|
+
export { default as Button } from './components/button';
|
|
43
|
+
export { default as Radio } from './components/radio';
|
|
44
|
+
export { default as Upload } from './components/upload';
|
|
45
|
+
export { default as Icon } from './components/icon';
|
|
46
|
+
export { default as Form } from './components/form';
|
|
47
|
+
export { default as Dropdown } from './components/dropdown';
|
|
48
|
+
export { default as Calendar } from './components/calendar';
|
|
49
|
+
export { default as ConfigProvider } from './components/config-provider';
|
|
50
|
+
export { default as DatePicker } from './components/date-picker';
|
|
51
|
+
export { default as Tabs } from './components/tabs';
|
|
52
|
+
export { default as TimePicker } from './components/time-picker';
|
|
53
|
+
export { default as Slider } from './components/slider';
|
|
54
|
+
export { default as Table } from './components/table';
|
|
55
|
+
export { default as Modal } from './components/modal';
|
|
56
|
+
export { default as Drawer } from './components/drawer';
|
|
57
|
+
export { default as TreeSelect } from './components/tree-select';
|
|
58
|
+
export { default as Input } from './components/input';
|
|
59
|
+
export { default as Select } from './components/select';
|
|
60
|
+
export { default as Cascader } from './components/cascader';
|
|
61
|
+
export { default as AutoComplete } from './components/auto-complete';
|
|
62
|
+
export { default as Div } from './components/div';
|
|
63
|
+
export { default as Page } from './components/page';
|
|
64
|
+
export { default as Component } from './components/component';
|
|
65
|
+
export { default as Filter } from './components/filter';
|
|
66
|
+
export { default as Translation } from './components/translation';
|
|
67
|
+
export { default as SortableList } from './components/sortableList';
|
|
68
|
+
export { default as RecordView } from './components/record-view';
|
|
69
|
+
export { default as QRCode } from './components/qrcode';
|
|
70
|
+
export { default as ClassicLayout } from './components/classicLayout';
|
|
71
|
+
export { default as List } from './components/list';
|
|
72
|
+
export { default as Sort } from './components/sort';
|
|
73
|
+
export { default as InputNumberRange } from './components/input-number-range';
|
|
74
|
+
export { default as LowCodePage } from './components/lowCodePage';
|
|
75
|
+
export { default as Segmented } from './components/segmented';
|
|
76
|
+
export { default as VirtualKeyboard } from './components/virtual-keyboard';
|
|
77
|
+
export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
|
|
78
|
+
export { default as SelectTime } from './components/select-time';
|
|
79
|
+
export { default as AutoCompleteNumber } from './components/auto-complete-number';
|
|
80
|
+
export { default as BatchEditor } from './components/batch-editor';
|
|
81
|
+
export { default as DragSortTree } from './components/drag-sort-tree';
|
package/lib/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(src_exports, {
|
|
|
53
53
|
Descriptions: () => import_antd11.Descriptions,
|
|
54
54
|
Div: () => import_div.default,
|
|
55
55
|
Divider: () => import_antd12.Divider,
|
|
56
|
+
DragSortTree: () => import_drag_sort_tree.default,
|
|
56
57
|
Drawer: () => import_drawer.default,
|
|
57
58
|
Dropdown: () => import_dropdown.default,
|
|
58
59
|
Empty: () => import_antd13.Empty,
|
|
@@ -191,6 +192,7 @@ var import_Time = __toESM(require("./components/virtual-keyboard/Time"));
|
|
|
191
192
|
var import_select_time = __toESM(require("./components/select-time"));
|
|
192
193
|
var import_auto_complete_number = __toESM(require("./components/auto-complete-number"));
|
|
193
194
|
var import_batch_editor = __toESM(require("./components/batch-editor"));
|
|
195
|
+
var import_drag_sort_tree = __toESM(require("./components/drag-sort-tree"));
|
|
194
196
|
// Annotate the CommonJS export names for ESM import in node:
|
|
195
197
|
0 && (module.exports = {
|
|
196
198
|
Affix,
|
|
@@ -217,6 +219,7 @@ var import_batch_editor = __toESM(require("./components/batch-editor"));
|
|
|
217
219
|
Descriptions,
|
|
218
220
|
Div,
|
|
219
221
|
Divider,
|
|
222
|
+
DragSortTree,
|
|
220
223
|
Drawer,
|
|
221
224
|
Dropdown,
|
|
222
225
|
Empty,
|
|
Binary file
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: "DragSortTree",
|
|
6
|
+
title: "拖拽排序",
|
|
7
|
+
category: "数据展示",
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "DragSortTree",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
title: '数据源',
|
|
22
|
+
display: 'block',
|
|
23
|
+
type: 'group',
|
|
24
|
+
items: [
|
|
25
|
+
{
|
|
26
|
+
name: 'value',
|
|
27
|
+
title: '列表数据源',
|
|
28
|
+
propType: { type: 'arrayOf', value: 'any' },
|
|
29
|
+
setter: ['JsonSetter', 'VariableSetter'],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'rowKey',
|
|
33
|
+
title: {
|
|
34
|
+
label: '行Key',
|
|
35
|
+
tip: 'rowKey | 当 renderItem 自定义渲染列表项有效时,自定义每一行的 key 的获取方式',
|
|
36
|
+
},
|
|
37
|
+
propType: {
|
|
38
|
+
type: 'oneOfType',
|
|
39
|
+
value: ['string', 'function'],
|
|
40
|
+
},
|
|
41
|
+
defaultValue: 'id',
|
|
42
|
+
setter: [
|
|
43
|
+
'StringSetter',
|
|
44
|
+
{
|
|
45
|
+
componentName: 'FunctionSetter',
|
|
46
|
+
props: {
|
|
47
|
+
template:
|
|
48
|
+
'rowKey(item,${extParams}){\n// 自定义每一行的 key\nreturn `${item.id}`;\n}',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
'VariableSetter',
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'className',
|
|
56
|
+
title: {
|
|
57
|
+
label: '样式类名',
|
|
58
|
+
tip: 'className | 样式类名',
|
|
59
|
+
},
|
|
60
|
+
propType: 'string',
|
|
61
|
+
setter: 'StringSetter',
|
|
62
|
+
},
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "tabKey",
|
|
67
|
+
title: { label: 'tabKey', tip: 'tabKey | 标识当前选中的tab' },
|
|
68
|
+
propType: 'string',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "titleRender",
|
|
72
|
+
title: { label: '标题', tip: '是否自定义标题内容 | node/func' },
|
|
73
|
+
propType: { type: 'oneOfType', value: ['node', 'func'] },
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "hiddenDraggableIcon",
|
|
77
|
+
title: { label: "隐藏拖拽图标", tip: "是否隐藏拖拽图标" },
|
|
78
|
+
propType: "bool",
|
|
79
|
+
defaultValue: false,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "hiddenRightIcon",
|
|
83
|
+
title: { label: "右侧图标", tip: "是否隐藏右侧图标" },
|
|
84
|
+
propType: "bool",
|
|
85
|
+
defaultValue: false,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "hiddenWarningIcon",
|
|
89
|
+
title: { label: "警告图标", tip: "子元素是否隐藏警告图标" },
|
|
90
|
+
propType: "bool",
|
|
91
|
+
defaultValue: false,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
configure: {
|
|
95
|
+
component: {
|
|
96
|
+
isContainer: true,
|
|
97
|
+
},
|
|
98
|
+
supports: {
|
|
99
|
+
style: true,
|
|
100
|
+
events: [
|
|
101
|
+
{
|
|
102
|
+
name: 'onChange',
|
|
103
|
+
template: 'onChange(value,${extParams}){\n// 排序 改变的回调\n}',
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '拖拽排序',
|
|
4
|
+
// screenshot: require('./__screenshots__/drag-sort-tree.png'),
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'DragSortTree',
|
|
7
|
+
props: {
|
|
8
|
+
value: [{
|
|
9
|
+
"id": 1,
|
|
10
|
+
"title": "资源1",
|
|
11
|
+
"show": true,
|
|
12
|
+
"children": [{
|
|
13
|
+
"id": 11,
|
|
14
|
+
"title": "资源1-1",
|
|
15
|
+
"is_available": 1,
|
|
16
|
+
"type_id": 1
|
|
17
|
+
}, {
|
|
18
|
+
"id": 12,
|
|
19
|
+
"title": "资源1-2",
|
|
20
|
+
"is_available": 1,
|
|
21
|
+
"type_id": 1
|
|
22
|
+
}]
|
|
23
|
+
}, {
|
|
24
|
+
"id": 2,
|
|
25
|
+
"title": "资源2",
|
|
26
|
+
"show": false,
|
|
27
|
+
"children": [{
|
|
28
|
+
"id": 21,
|
|
29
|
+
"title": "资源2-1",
|
|
30
|
+
"is_available": 0,
|
|
31
|
+
"type_id": 2
|
|
32
|
+
}, {
|
|
33
|
+
"id": 22,
|
|
34
|
+
"title": "资源2-2",
|
|
35
|
+
"is_available": 1,
|
|
36
|
+
"type_id": 2
|
|
37
|
+
}]
|
|
38
|
+
}, {
|
|
39
|
+
"id": 3,
|
|
40
|
+
"title": "资源3",
|
|
41
|
+
"show": true,
|
|
42
|
+
"children": [{
|
|
43
|
+
"id": 31,
|
|
44
|
+
"title": "资源3-1",
|
|
45
|
+
"is_available": 1,
|
|
46
|
+
"type_id": 3
|
|
47
|
+
}, {
|
|
48
|
+
"id": 32,
|
|
49
|
+
"title": "资源3-2",
|
|
50
|
+
"is_available": 0,
|
|
51
|
+
"type_id": 3
|
|
52
|
+
}]
|
|
53
|
+
}]
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
];
|