@pisell/materials 1.0.11 → 1.0.13
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 +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/MultipleContainersSortList/index.d.ts +2 -1
- package/es/components/MultipleContainersSortList/index.js +10 -2
- package/es/components/MultipleContainersSortList/index.less +6 -0
- package/es/components/{table/Pagination → Pagination}/index.d.ts +3 -1
- package/es/components/Pagination/index.js +142 -0
- package/{lib/components/table → es/components}/Pagination/index.less +69 -11
- package/es/components/config-provider/index.d.ts +6 -2
- package/es/components/config-provider/index.js +10 -11
- package/es/components/page/index.d.ts +6 -0
- package/es/components/page/index.js +85 -0
- package/es/components/table/Actions/Filter/Dropdown/index.js +9 -2
- package/es/components/table/Actions/Filter/Dropdown/index.less +3 -1
- package/es/components/table/Actions/index.less +1 -1
- package/es/components/table/BasicTable/index.d.ts +4 -0
- package/es/components/table/BasicTable/index.js +71 -0
- package/es/components/table/Table/AddFieldModal/index.less +1 -1
- package/es/components/table/Table/fields/date/Show/index.js +3 -1
- package/es/components/table/Table/index.js +14 -7
- package/es/components/table/index.js +6 -5
- package/es/hooks/index.d.ts +2 -1
- package/es/hooks/index.js +2 -1
- package/es/hooks/useResponsive.d.ts +4 -0
- package/es/hooks/useResponsive.js +95 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/components/MultipleContainersSortList/index.d.ts +2 -1
- package/lib/components/MultipleContainersSortList/index.js +15 -3
- package/lib/components/MultipleContainersSortList/index.less +6 -0
- package/lib/components/{table/Pagination → Pagination}/index.d.ts +3 -1
- package/lib/components/{table/Pagination → Pagination}/index.js +61 -4
- package/{es/components/table → lib/components}/Pagination/index.less +69 -11
- package/lib/components/config-provider/index.d.ts +6 -2
- package/lib/components/page/index.d.ts +6 -0
- package/lib/components/page/index.js +122 -0
- package/lib/components/table/Actions/Filter/Dropdown/index.js +6 -1
- package/lib/components/table/Actions/Filter/Dropdown/index.less +3 -1
- package/lib/components/table/Actions/index.less +1 -1
- package/lib/components/table/BasicTable/index.d.ts +4 -0
- package/lib/components/table/BasicTable/index.js +74 -0
- package/lib/components/table/Table/AddFieldModal/index.less +1 -1
- package/lib/components/table/Table/fields/date/Show/index.js +13 -1
- package/lib/components/table/Table/index.js +15 -8
- package/lib/components/table/index.js +6 -1
- package/lib/hooks/index.d.ts +2 -1
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useResponsive.d.ts +4 -0
- package/lib/hooks/useResponsive.js +104 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +29 -0
- package/lowcode/config-provider/meta.ts +113 -109
- package/lowcode/page/meta.ts +44 -0
- package/package.json +3 -2
- package/es/components/table/Pagination/index.js +0 -43
|
@@ -16,125 +16,129 @@ export default {
|
|
|
16
16
|
destructuring: true,
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
tip: "自动在按钮中 2 个汉字之间插入空格",
|
|
26
|
-
},
|
|
27
|
-
propType: "bool",
|
|
28
|
-
defaultValue: true,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "componentSize",
|
|
32
|
-
title: { label: "组件大小", tip: "设置 antd 组件大小" },
|
|
33
|
-
propType: { type: "oneOf", value: ["small", "middle", "large"] },
|
|
34
|
-
default: "middle",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: "csp",
|
|
38
|
-
title: {
|
|
39
|
-
label: "CSP配置",
|
|
40
|
-
tip: "设置Content Security Policy配置",
|
|
41
|
-
},
|
|
42
|
-
propType: "object",
|
|
43
|
-
setter: "JsonSetter",
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: "autoInsertSpaceInButton",
|
|
22
|
+
title: {
|
|
23
|
+
label: "按钮插入空格",
|
|
24
|
+
tip: "自动在按钮中 2 个汉字之间插入空格",
|
|
44
25
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
26
|
+
propType: "bool",
|
|
27
|
+
defaultValue: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "componentSize",
|
|
31
|
+
title: { label: "组件大小", tip: "设置 antd 组件大小" },
|
|
32
|
+
propType: { type: "oneOf", value: ["small", "middle", "large"] },
|
|
33
|
+
default: "middle",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "csp",
|
|
37
|
+
title: {
|
|
38
|
+
label: "CSP配置",
|
|
39
|
+
tip: "设置Content Security Policy配置",
|
|
53
40
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
propType: "object",
|
|
42
|
+
setter: "JsonSetter",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "form",
|
|
46
|
+
title: {
|
|
47
|
+
label: "Form通用属性",
|
|
48
|
+
tip: "设置 Form 组件的通用属性",
|
|
62
49
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
label: "弹出框父节点",
|
|
72
|
-
tip: "弹出框渲染父节点,默认渲染到 body 上。",
|
|
73
|
-
},
|
|
74
|
-
propType: "func",
|
|
50
|
+
propType: "object",
|
|
51
|
+
setter: "JsonSetter",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "input",
|
|
55
|
+
title: {
|
|
56
|
+
label: "Input通用属性",
|
|
57
|
+
tip: "设置 Input 组件的通用属性",
|
|
75
58
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
59
|
+
propType: "object",
|
|
60
|
+
setter: "JsonSetter",
|
|
61
|
+
},
|
|
62
|
+
// {
|
|
63
|
+
// name: 'renderEmpty',
|
|
64
|
+
// title: { label: '自定义组件空状态', tip: '自定义组件空状态' },
|
|
65
|
+
// propType: 'func',
|
|
66
|
+
// },
|
|
67
|
+
{
|
|
68
|
+
name: "getPopupContainer",
|
|
69
|
+
title: {
|
|
70
|
+
label: "弹出框父节点",
|
|
71
|
+
tip: "弹出框渲染父节点,默认渲染到 body 上。",
|
|
83
72
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
defaultValue: "en-US",
|
|
73
|
+
propType: "func",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "getTargetContainer",
|
|
77
|
+
title: {
|
|
78
|
+
label: "滚动监听容器",
|
|
79
|
+
tip: "配置 Affix、Anchor 滚动监听容器。",
|
|
92
80
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
propType: "func",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "locale",
|
|
85
|
+
title: { label: "语言", tip: "语言" },
|
|
86
|
+
propType: {
|
|
87
|
+
type: "oneOf",
|
|
88
|
+
value: ["zh-CN", "en-US"],
|
|
100
89
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
setter: "JsonSetter",
|
|
90
|
+
defaultValue: "en-US",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "prefixCls",
|
|
94
|
+
title: {
|
|
95
|
+
label: "样式前缀",
|
|
96
|
+
tip: "设置统一样式前缀。`注意:这将不会应用由 antd 提供的默认样式`",
|
|
109
97
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
propType: "string",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "pageHeader",
|
|
102
|
+
title: {
|
|
103
|
+
label: "统一设置 PageHeader 的 ghost",
|
|
104
|
+
tip: "统一设置 PageHeader 的 ghost",
|
|
114
105
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
106
|
+
propType: "object",
|
|
107
|
+
setter: "JsonSetter",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "direction",
|
|
111
|
+
title: { label: "文本方向", tip: "设置文本展示方向" },
|
|
112
|
+
propType: { type: "oneOf", value: ["ltr", "rtl"] },
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "space",
|
|
116
|
+
title: { label: "设置 Space 的 尺寸", tip: "设置 Space 的 `size`" },
|
|
117
|
+
propType: {
|
|
118
|
+
type: "oneOf",
|
|
119
|
+
value: ["small", "middle", "large", "number"],
|
|
122
120
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
propType: "bool",
|
|
130
|
-
defaultValue: true,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "virtual",
|
|
124
|
+
title: {
|
|
125
|
+
label: "虚拟滚动",
|
|
126
|
+
tip: "设置 `false` 时关闭虚拟滚动",
|
|
131
127
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
propType: "bool",
|
|
129
|
+
defaultValue: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "dropdownMatchSelectWidth",
|
|
133
|
+
title: { label: "下拉菜单和选择器同宽", tip: "下拉菜单和选择器同宽" },
|
|
134
|
+
propType: { type: "oneOfType", value: ["bool", "number"] },
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
configure: {
|
|
138
|
+
component: {
|
|
139
|
+
isContainer: true,
|
|
140
|
+
isPage: true,
|
|
141
|
+
disableBehaviors: '*',
|
|
142
|
+
},
|
|
139
143
|
},
|
|
140
144
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
|
|
2
|
+
|
|
3
|
+
const PageMeta: ComponentMetadata = {
|
|
4
|
+
componentName: "Page",
|
|
5
|
+
title: "Page",
|
|
6
|
+
docUrl: "",
|
|
7
|
+
screenshot: "",
|
|
8
|
+
devMode: "proCode",
|
|
9
|
+
npm: {
|
|
10
|
+
package: "@pisell/materials",
|
|
11
|
+
version: "1.0.11",
|
|
12
|
+
exportName: "Page",
|
|
13
|
+
main: "src/index.tsx",
|
|
14
|
+
destructuring: true,
|
|
15
|
+
subName: "",
|
|
16
|
+
},
|
|
17
|
+
configure: {
|
|
18
|
+
props: [],
|
|
19
|
+
supports: {
|
|
20
|
+
style: true,
|
|
21
|
+
},
|
|
22
|
+
component: {
|
|
23
|
+
isContainer: true,
|
|
24
|
+
isPage: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const snippets: Snippet[] = [
|
|
29
|
+
{
|
|
30
|
+
title: "Page",
|
|
31
|
+
screenshot: "",
|
|
32
|
+
schema: {
|
|
33
|
+
componentName: "Page",
|
|
34
|
+
props: {
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
...PageMeta,
|
|
43
|
+
snippets,
|
|
44
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"@alilc/lowcode-react-renderer": "^1.1.7",
|
|
24
24
|
"@alilc/lowcode-types": "1.1.7",
|
|
25
25
|
"@svgr/webpack": "^5.5.0",
|
|
26
|
-
"url-loader": "^4.1.1"
|
|
26
|
+
"url-loader": "^4.1.1",
|
|
27
|
+
"@alilc/build-plugin-alt": "^1.3.3"
|
|
27
28
|
},
|
|
28
29
|
"publishConfig": {
|
|
29
30
|
"access": "public"
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
import React, { useMemo } from "react";
|
|
3
|
-
import { ArrowLeft, ArrowRight } from "@pisell/icon";
|
|
4
|
-
import { Pagination as OriginPagination } from "antd";
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
import "./index.less";
|
|
7
|
-
var itemRender = function itemRender(_, type, originalElement) {
|
|
8
|
-
if (type === "prev") {
|
|
9
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
-
className: classNames("paginator-page-btn", "left")
|
|
11
|
-
}, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
12
|
-
className: "paginator-page-btn-left-icon"
|
|
13
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
14
|
-
className: "paginator-page-btn-text"
|
|
15
|
-
}, "Previous"));
|
|
16
|
-
}
|
|
17
|
-
if (type === "next") {
|
|
18
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: classNames("paginator-page-btn", "right")
|
|
20
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
21
|
-
className: "paginator-page-btn-text"
|
|
22
|
-
}, "Next"), /*#__PURE__*/React.createElement(ArrowRight, {
|
|
23
|
-
className: "paginator-page-btn-right-icon"
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
return originalElement;
|
|
27
|
-
};
|
|
28
|
-
export var paginationConfig = {
|
|
29
|
-
className: "materials-grid-paginator",
|
|
30
|
-
defaultCurrent: 1,
|
|
31
|
-
showTotal: function showTotal(total, range) {
|
|
32
|
-
return "Page ".concat(range[0], " of ").concat(range[1]);
|
|
33
|
-
},
|
|
34
|
-
itemRender: itemRender
|
|
35
|
-
};
|
|
36
|
-
var Pagination = function Pagination(props) {
|
|
37
|
-
console.log(props);
|
|
38
|
-
var show = useMemo(function () {
|
|
39
|
-
return Object.keys(props).length;
|
|
40
|
-
}, [props]);
|
|
41
|
-
return show ? /*#__PURE__*/React.createElement(OriginPagination, _extends({}, paginationConfig, props)) : null;
|
|
42
|
-
};
|
|
43
|
-
export default Pagination;
|