@pisell/materials 1.0.145 → 1.0.147
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/designer.html +2 -2
- package/build/lowcode/index.html +2 -2
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +17 -19
- package/build/lowcode/view.js +16 -18
- 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.js +5 -9
- package/es/components/classicLayout/index.d.ts +4 -0
- package/es/components/classicLayout/index.js +25 -0
- package/es/components/classicLayout/index.less +22 -0
- package/es/components/list/index.d.ts +7 -0
- package/es/components/list/index.js +19 -0
- package/es/components/list/index.less +13 -0
- package/es/components/table/Table/index.js +2 -1
- package/es/components/table/TableFilter/numberFilter.js +5 -4
- package/es/components/table/TableFilter/selectFilter.js +3 -2
- package/es/components/table/TableFilter/stringFilter.js +4 -3
- package/es/components/table/model.js +1 -29
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/locales/en-US.d.ts +11 -0
- package/es/locales/en-US.js +12 -0
- package/es/locales/index.d.ts +1 -0
- package/es/locales/index.js +21 -0
- package/es/locales/zh-CN.d.ts +11 -0
- package/es/locales/zh-CN.js +12 -0
- package/es/locales/zh-TW.d.ts +11 -0
- package/es/locales/zh-TW.js +12 -0
- package/es/utils/locale.d.ts +1 -0
- package/es/utils/locale.js +5 -0
- package/lib/components/Pagination/index.js +5 -3
- package/lib/components/classicLayout/index.d.ts +4 -0
- package/lib/components/classicLayout/index.js +59 -0
- package/lib/components/classicLayout/index.less +22 -0
- package/lib/components/list/index.d.ts +7 -0
- package/lib/components/list/index.js +54 -0
- package/lib/components/list/index.less +13 -0
- package/lib/components/table/Table/index.js +2 -1
- package/lib/components/table/TableFilter/numberFilter.js +5 -4
- package/lib/components/table/TableFilter/selectFilter.js +3 -2
- package/lib/components/table/TableFilter/stringFilter.js +4 -3
- package/lib/components/table/model.js +1 -34
- package/lib/index.d.ts +2 -1
- package/lib/index.js +26 -23
- package/lib/locales/en-US.d.ts +11 -0
- package/lib/locales/en-US.js +34 -0
- package/lib/locales/index.d.ts +1 -0
- package/lib/locales/index.js +58 -0
- package/lib/locales/zh-CN.d.ts +11 -0
- package/lib/locales/zh-CN.js +34 -0
- package/lib/locales/zh-TW.d.ts +11 -0
- package/lib/locales/zh-TW.js +34 -0
- package/lib/utils/locale.d.ts +1 -0
- package/lib/utils/locale.js +32 -0
- package/lowcode/tabs/meta.ts +0 -3
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -16,6 +16,7 @@ import { Pagination as OriginPagination } from "antd";
|
|
|
16
16
|
import classNames from "classnames";
|
|
17
17
|
import { useResponsive } from "../../hooks";
|
|
18
18
|
import "./index.less";
|
|
19
|
+
import { getText } from "../../locales";
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* @title: 自定义渲染
|
|
@@ -32,14 +33,14 @@ var itemRender = function itemRender(_, type, originalElement) {
|
|
|
32
33
|
className: "paginator-page-btn-left-icon"
|
|
33
34
|
}), /*#__PURE__*/React.createElement("span", {
|
|
34
35
|
className: "paginator-page-btn-text"
|
|
35
|
-
},
|
|
36
|
+
}, getText('table-pagination-previous')));
|
|
36
37
|
}
|
|
37
38
|
if (type === "next") {
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
40
|
className: classNames("paginator-page-btn", "right")
|
|
40
41
|
}, /*#__PURE__*/React.createElement("span", {
|
|
41
42
|
className: "paginator-page-btn-text"
|
|
42
|
-
},
|
|
43
|
+
}, getText('table-pagination-next')), /*#__PURE__*/React.createElement(ArrowRight, {
|
|
43
44
|
className: "paginator-page-btn-right-icon"
|
|
44
45
|
}));
|
|
45
46
|
}
|
|
@@ -112,6 +113,7 @@ var MiniPagination = function MiniPagination(props) {
|
|
|
112
113
|
}
|
|
113
114
|
props.onChange && props.onChange(currentPage, pageSize || 10);
|
|
114
115
|
};
|
|
116
|
+
console.log(getText('table-pagination-total'), 'getText(\'table-pagination-total\')');
|
|
115
117
|
return /*#__PURE__*/React.createElement("div", {
|
|
116
118
|
className: "materials-grid-paginator materials-grid-paginator-mini"
|
|
117
119
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -130,13 +132,7 @@ var MiniPagination = function MiniPagination(props) {
|
|
|
130
132
|
className: "materials-grid-paginator-center"
|
|
131
133
|
}, /*#__PURE__*/React.createElement("span", {
|
|
132
134
|
className: "materials-grid-paginator-center-text"
|
|
133
|
-
},
|
|
134
|
-
className: "materials-grid-paginator-center-value"
|
|
135
|
-
}, current), /*#__PURE__*/React.createElement("span", {
|
|
136
|
-
className: "materials-grid-paginator-center-text"
|
|
137
|
-
}, "of"), /*#__PURE__*/React.createElement("span", {
|
|
138
|
-
className: "materials-grid-paginator-center-value"
|
|
139
|
-
}, MAX)), /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
}, getText('table-pagination-total')(current, MAX))), /*#__PURE__*/React.createElement("div", {
|
|
140
136
|
className: "pisell-lowcode-pagination-next",
|
|
141
137
|
onClick: function onClick() {
|
|
142
138
|
if (current >= MAX) {
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
|
+
import React from "react";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import "./index.less";
|
|
8
|
+
var prefix = "pisell-lowcode-";
|
|
9
|
+
var ClassicLayout = function ClassicLayout(props) {
|
|
10
|
+
var header = props.header,
|
|
11
|
+
content = props.content,
|
|
12
|
+
footer = props.footer,
|
|
13
|
+
style = props.style,
|
|
14
|
+
fixedHeader = props.fixedHeader,
|
|
15
|
+
fixedFooter = props.fixedFooter;
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "".concat(prefix, "claseic-layout"),
|
|
18
|
+
style: style
|
|
19
|
+
}, /*#__PURE__*/React.createElement("header", {
|
|
20
|
+
className: classNames(_defineProperty({}, "".concat(prefix, "claseic-layout-fixed-header"), fixedHeader))
|
|
21
|
+
}, header), content, /*#__PURE__*/React.createElement("footer", {
|
|
22
|
+
className: classNames(_defineProperty({}, "".concat(prefix, "claseic-layout-fixed-footer"), fixedFooter))
|
|
23
|
+
}, footer));
|
|
24
|
+
};
|
|
25
|
+
export default ClassicLayout;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@pisell-prefix: pisell-lowcode;
|
|
2
|
+
|
|
3
|
+
.@{pisell-prefix} {
|
|
4
|
+
&-claseic-layout {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
&-claseic-layout-fixed-header {
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: 0;
|
|
13
|
+
z-index: 1;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
&-claseic-layout-fixed-footer {
|
|
17
|
+
position: sticky;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
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); }
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
import React from "react";
|
|
7
|
+
import classNames from "classnames";
|
|
8
|
+
import { List as AntList } from "antd";
|
|
9
|
+
import "./index.less";
|
|
10
|
+
var prefix = "pisell-lowcode-";
|
|
11
|
+
var List = function List(props) {
|
|
12
|
+
var _props$grid;
|
|
13
|
+
var className = props.className;
|
|
14
|
+
return /*#__PURE__*/React.createElement(AntList, _extends({}, props, {
|
|
15
|
+
className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0 ? void 0 : (_props$grid = props.grid) === null || _props$grid === void 0 ? void 0 : _props$grid.oneLine))
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
List.Item = AntList.Item;
|
|
19
|
+
export default List;
|
|
@@ -27,6 +27,7 @@ import getColumnStringProps from "../TableFilter/stringFilter";
|
|
|
27
27
|
import getColumnNumberProps from "../TableFilter/numberFilter";
|
|
28
28
|
import getColumnSelectProps from "../TableFilter/selectFilter";
|
|
29
29
|
import SortIcon from "../TableFilter/SortIcon";
|
|
30
|
+
import { getText } from "../../../locales";
|
|
30
31
|
var GridViewTable = function GridViewTable(_ref) {
|
|
31
32
|
var tableProps = _ref.tableProps;
|
|
32
33
|
var responsive = useResponsive();
|
|
@@ -126,7 +127,7 @@ var GridViewTable = function GridViewTable(_ref) {
|
|
|
126
127
|
var showTotal = useCallback(function (total, range, pageSize) {
|
|
127
128
|
var start = range[0] - 1;
|
|
128
129
|
var _current = start / pageSize + 1;
|
|
129
|
-
return
|
|
130
|
+
return getText('table-pagination-total')(_current, Math.ceil(total / pageSize));
|
|
130
131
|
}, []);
|
|
131
132
|
var _paginationConfig = useMemo(function () {
|
|
132
133
|
if (tableProps.pagination === false) {
|
|
@@ -9,6 +9,7 @@ import { Button, InputNumber, Space } from "antd";
|
|
|
9
9
|
// import { FilterFunnel01, FilterFunnel01Fill } from "@pisell/icon/es";
|
|
10
10
|
import FilterFunnel01 from "@pisell/icon/es/FilterFunnel01";
|
|
11
11
|
import FilterFunnel01Fill from "@pisell/icon/es/FilterFunnel01Fill";
|
|
12
|
+
import { getText } from "../../../locales";
|
|
12
13
|
import "./index.less";
|
|
13
14
|
var getColumnNumberProps = function getColumnNumberProps(_ref) {
|
|
14
15
|
var dataIndex = _ref.dataIndex;
|
|
@@ -36,7 +37,7 @@ var getColumnNumberProps = function getColumnNumberProps(_ref) {
|
|
|
36
37
|
});
|
|
37
38
|
setSelectedKeys([newVal]);
|
|
38
39
|
},
|
|
39
|
-
placeholder: "
|
|
40
|
+
placeholder: getText("table-filter-min"),
|
|
40
41
|
onPressEnter: function onPressEnter() {
|
|
41
42
|
return confirm();
|
|
42
43
|
},
|
|
@@ -45,7 +46,7 @@ var getColumnNumberProps = function getColumnNumberProps(_ref) {
|
|
|
45
46
|
}
|
|
46
47
|
}), /*#__PURE__*/React.createElement(InputNumber, {
|
|
47
48
|
value: selectedKeys === null || selectedKeys === void 0 ? void 0 : (_selectedKeys$2 = selectedKeys[0]) === null || _selectedKeys$2 === void 0 ? void 0 : _selectedKeys$2.max,
|
|
48
|
-
placeholder: "
|
|
49
|
+
placeholder: getText("table-filter-max"),
|
|
49
50
|
onChange: function onChange(value) {
|
|
50
51
|
var newVal = _objectSpread(_objectSpread({}, (selectedKeys === null || selectedKeys === void 0 ? void 0 : selectedKeys[0]) || {}), {}, {
|
|
51
52
|
max: value
|
|
@@ -71,13 +72,13 @@ var getColumnNumberProps = function getColumnNumberProps(_ref) {
|
|
|
71
72
|
confirm();
|
|
72
73
|
},
|
|
73
74
|
block: true
|
|
74
|
-
}, "
|
|
75
|
+
}, getText("table-filter-clear")), /*#__PURE__*/React.createElement(Button, {
|
|
75
76
|
type: "primary",
|
|
76
77
|
onClick: function onClick() {
|
|
77
78
|
return confirm();
|
|
78
79
|
},
|
|
79
80
|
block: true
|
|
80
|
-
}, "
|
|
81
|
+
}, getText("table-filter-filter"))));
|
|
81
82
|
},
|
|
82
83
|
filterIcon: function filterIcon(filtered) {
|
|
83
84
|
return filtered ? /*#__PURE__*/React.createElement(FilterFunnel01Fill, {
|
|
@@ -13,6 +13,7 @@ import React, { useEffect, useMemo, useState } from "react";
|
|
|
13
13
|
import { Button, Checkbox, Space, Menu } from "antd";
|
|
14
14
|
import FilterFunnel01Fill from "@pisell/icon/es/FilterFunnel01Fill";
|
|
15
15
|
import FilterFunnel01 from "@pisell/icon/es/FilterFunnel01";
|
|
16
|
+
import { getText } from "../../../locales";
|
|
16
17
|
import "./index.less";
|
|
17
18
|
var FilterDropdown = function FilterDropdown(props) {
|
|
18
19
|
var setSelectedKeys = props.setSelectedKeys,
|
|
@@ -89,7 +90,7 @@ var FilterDropdown = function FilterDropdown(props) {
|
|
|
89
90
|
style: {
|
|
90
91
|
flex: 1
|
|
91
92
|
}
|
|
92
|
-
}, "
|
|
93
|
+
}, getText("table-filter-clear")), /*#__PURE__*/React.createElement(Button, {
|
|
93
94
|
type: "primary",
|
|
94
95
|
onClick: function onClick() {
|
|
95
96
|
return confirm();
|
|
@@ -98,7 +99,7 @@ var FilterDropdown = function FilterDropdown(props) {
|
|
|
98
99
|
style: {
|
|
99
100
|
flex: 1
|
|
100
101
|
}
|
|
101
|
-
}, "
|
|
102
|
+
}, getText("table-filter-filter"))));
|
|
102
103
|
};
|
|
103
104
|
var getColumnSelectProps = function getColumnSelectProps(_ref2) {
|
|
104
105
|
var dataIndex = _ref2.dataIndex,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Button, Input, Space } from "antd";
|
|
3
3
|
import SearchLg from "@pisell/icon/es/SearchLg";
|
|
4
|
+
import { getText } from "../../../locales";
|
|
4
5
|
import "./index.less";
|
|
5
6
|
var getColumnStringProps = function getColumnStringProps(_ref) {
|
|
6
7
|
var dataIndex = _ref.dataIndex;
|
|
@@ -20,7 +21,7 @@ var getColumnStringProps = function getColumnStringProps(_ref) {
|
|
|
20
21
|
className: "pisell-table-filter-dropdown-top"
|
|
21
22
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
22
23
|
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
23
|
-
placeholder: "
|
|
24
|
+
placeholder: getText("table-filter-search"),
|
|
24
25
|
value: selectedKeys[0],
|
|
25
26
|
onChange: function onChange(e) {
|
|
26
27
|
return setSelectedKeys(e.target.value ? [e.target.value] : []);
|
|
@@ -47,7 +48,7 @@ var getColumnStringProps = function getColumnStringProps(_ref) {
|
|
|
47
48
|
style: {
|
|
48
49
|
flex: 1
|
|
49
50
|
}
|
|
50
|
-
},
|
|
51
|
+
}, getText('table-filter-clear')), /*#__PURE__*/React.createElement(Button, {
|
|
51
52
|
type: "primary",
|
|
52
53
|
onClick: function onClick() {
|
|
53
54
|
return confirm();
|
|
@@ -56,7 +57,7 @@ var getColumnStringProps = function getColumnStringProps(_ref) {
|
|
|
56
57
|
style: {
|
|
57
58
|
flex: 1
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
+
}, getText('table-filter-filter'))));
|
|
60
61
|
},
|
|
61
62
|
filterIcon: function filterIcon(filtered) {
|
|
62
63
|
return /*#__PURE__*/React.createElement(SearchLg, {
|
|
@@ -21,34 +21,7 @@ var defaultState = {
|
|
|
21
21
|
address: "London, Park Lane no. 1",
|
|
22
22
|
image: ["https://file.mypisell-dev.com//static/avatar.png"]
|
|
23
23
|
}],
|
|
24
|
-
defaultColumns: [
|
|
25
|
-
title: "Name",
|
|
26
|
-
dataIndex: "name",
|
|
27
|
-
field_type: "text",
|
|
28
|
-
editable: true,
|
|
29
|
-
width: 200,
|
|
30
|
-
fixed: "left",
|
|
31
|
-
lock: true
|
|
32
|
-
}, {
|
|
33
|
-
title: "Age",
|
|
34
|
-
dataIndex: "age",
|
|
35
|
-
editable: true,
|
|
36
|
-
width: 200,
|
|
37
|
-
field_type: "text",
|
|
38
|
-
lock: true
|
|
39
|
-
}, {
|
|
40
|
-
title: "Address",
|
|
41
|
-
dataIndex: "address",
|
|
42
|
-
editable: true,
|
|
43
|
-
width: 200,
|
|
44
|
-
field_type: "text"
|
|
45
|
-
}, {
|
|
46
|
-
title: "Image",
|
|
47
|
-
dataIndex: "image",
|
|
48
|
-
editable: true,
|
|
49
|
-
width: 200,
|
|
50
|
-
field_type: "image"
|
|
51
|
-
}],
|
|
24
|
+
defaultColumns: [],
|
|
52
25
|
currentCell: null,
|
|
53
26
|
quickFilter: [],
|
|
54
27
|
otherFilter: [],
|
|
@@ -113,7 +86,6 @@ export { Provider, Context };
|
|
|
113
86
|
var formatColumn = function formatColumn(item) {
|
|
114
87
|
var _other = _objectSpread({
|
|
115
88
|
editable: true,
|
|
116
|
-
width: 100,
|
|
117
89
|
field_type: "text",
|
|
118
90
|
lock: true
|
|
119
91
|
}, item.other || {});
|
package/es/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export { Empty } from "antd";
|
|
|
14
14
|
export { Grid } from "antd";
|
|
15
15
|
export { Image } from "antd";
|
|
16
16
|
export { InputNumber } from "antd";
|
|
17
|
-
export { List } from "antd";
|
|
18
17
|
export { message } from "antd";
|
|
19
18
|
export { Mentions } from "antd";
|
|
20
19
|
export { Statistic } from "antd";
|
|
@@ -66,3 +65,5 @@ export { default as Translation } from "./components/translation";
|
|
|
66
65
|
export { default as SortableList } from "./components/sortableList";
|
|
67
66
|
export { default as RecordView } from "./components/record-view";
|
|
68
67
|
export { default as QRCode } from "./components/qrcode";
|
|
68
|
+
export { default as ClassicLayout } from "./components/classicLayout";
|
|
69
|
+
export { default as List } from "./components/list";
|
package/es/index.js
CHANGED
|
@@ -23,7 +23,6 @@ export { Grid } from "antd";
|
|
|
23
23
|
|
|
24
24
|
export { Image } from "antd";
|
|
25
25
|
export { InputNumber } from "antd";
|
|
26
|
-
export { List } from "antd";
|
|
27
26
|
export { message } from "antd";
|
|
28
27
|
|
|
29
28
|
// export { Menu } from "antd";
|
|
@@ -88,4 +87,6 @@ export { default as Filter } from "./components/filter";
|
|
|
88
87
|
export { default as Translation } from "./components/translation";
|
|
89
88
|
export { default as SortableList } from "./components/sortableList";
|
|
90
89
|
export { default as RecordView } from "./components/record-view";
|
|
91
|
-
export { default as QRCode } from "./components/qrcode";
|
|
90
|
+
export { default as QRCode } from "./components/qrcode";
|
|
91
|
+
export { default as ClassicLayout } from "./components/classicLayout";
|
|
92
|
+
export { default as List } from "./components/list";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"table-filter-search": string;
|
|
3
|
+
"table-filter-clear": string;
|
|
4
|
+
"table-filter-filter": string;
|
|
5
|
+
"table-filter-min": string;
|
|
6
|
+
"table-filter-max": string;
|
|
7
|
+
"table-pagination-previous": string;
|
|
8
|
+
"table-pagination-next": string;
|
|
9
|
+
"table-pagination-total": (current: string, total: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"table-filter-search": "Search",
|
|
3
|
+
"table-filter-clear": "Clear",
|
|
4
|
+
"table-filter-filter": "Filter",
|
|
5
|
+
"table-filter-min": "Min",
|
|
6
|
+
"table-filter-max": "Max",
|
|
7
|
+
"table-pagination-previous": "Previous",
|
|
8
|
+
"table-pagination-next": "Next",
|
|
9
|
+
"table-pagination-total": function tablePaginationTotal(current, total) {
|
|
10
|
+
return "Page ".concat(current, " of ").concat(total);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getText: (id: string) => any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import zhCN from "./zh-CN";
|
|
2
|
+
import enUS from "./en-US";
|
|
3
|
+
import zhTW from "./zh-TW";
|
|
4
|
+
import { getCurrentLocale } from "../utils/locale";
|
|
5
|
+
var langMap = {
|
|
6
|
+
"zh-CN": zhCN,
|
|
7
|
+
"en-US": enUS,
|
|
8
|
+
"zh-TW": zhTW
|
|
9
|
+
};
|
|
10
|
+
export var getText = function getText(id) {
|
|
11
|
+
if (!id) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
var locale = getCurrentLocale();
|
|
15
|
+
if (!locale) {
|
|
16
|
+
localStorage.setItem("umi_locale", "en-US");
|
|
17
|
+
locale = "en-US";
|
|
18
|
+
}
|
|
19
|
+
//@ts-ignore
|
|
20
|
+
return langMap[locale][id] || id;
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'table-filter-search': string;
|
|
3
|
+
'table-filter-clear': string;
|
|
4
|
+
'table-filter-filter': string;
|
|
5
|
+
'table-filter-min': string;
|
|
6
|
+
'table-filter-max': string;
|
|
7
|
+
'table-pagination-previous': string;
|
|
8
|
+
'table-pagination-next': string;
|
|
9
|
+
'table-pagination-total': (current: string, total: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'table-filter-search': '搜索',
|
|
3
|
+
'table-filter-clear': '清除',
|
|
4
|
+
'table-filter-filter': '筛选',
|
|
5
|
+
'table-filter-min': '最小',
|
|
6
|
+
'table-filter-max': '最大',
|
|
7
|
+
'table-pagination-previous': '上一页',
|
|
8
|
+
'table-pagination-next': '下一页',
|
|
9
|
+
'table-pagination-total': function tablePaginationTotal(current, total) {
|
|
10
|
+
return "\u7B2C".concat(current, "\u9875 \u5171").concat(total, "\u9875");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'table-filter-search': string;
|
|
3
|
+
'table-filter-clear': string;
|
|
4
|
+
'table-filter-filter': string;
|
|
5
|
+
'table-filter-min': string;
|
|
6
|
+
'table-filter-max': string;
|
|
7
|
+
'table-pagination-previous': string;
|
|
8
|
+
'table-pagination-next': string;
|
|
9
|
+
'table-pagination-total': (current: string, total: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'table-filter-search': '搜索',
|
|
3
|
+
'table-filter-clear': '清除',
|
|
4
|
+
'table-filter-filter': '篩選',
|
|
5
|
+
'table-filter-min': '最小',
|
|
6
|
+
'table-filter-max': '最大',
|
|
7
|
+
'table-pagination-previous': '上一頁',
|
|
8
|
+
'table-pagination-next': '下一頁',
|
|
9
|
+
'table-pagination-total': function tablePaginationTotal(current, total) {
|
|
10
|
+
return "\u7B2C".concat(current, "\u9801 \u5171").concat(total, "\u9801");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCurrentLocale: () => string;
|
|
@@ -41,12 +41,13 @@ var import_antd = require("antd");
|
|
|
41
41
|
var import_classnames = __toESM(require("classnames"));
|
|
42
42
|
var import_hooks = require("../../hooks");
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
|
+
var import_locales = require("../../locales");
|
|
44
45
|
var itemRender = (_, type, originalElement) => {
|
|
45
46
|
if (type === "prev") {
|
|
46
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ import_react.default.createElement(import_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "paginator-page-btn-text" }, "
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ import_react.default.createElement(import_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "paginator-page-btn-text" }, (0, import_locales.getText)("table-pagination-previous")));
|
|
47
48
|
}
|
|
48
49
|
if (type === "next") {
|
|
49
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("paginator-page-btn", "right") }, /* @__PURE__ */ import_react.default.createElement("span", { className: "paginator-page-btn-text" }, "
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("paginator-page-btn", "right") }, /* @__PURE__ */ import_react.default.createElement("span", { className: "paginator-page-btn-text" }, (0, import_locales.getText)("table-pagination-next")), /* @__PURE__ */ import_react.default.createElement(import_ArrowRight.default, { className: "paginator-page-btn-right-icon" }));
|
|
50
51
|
}
|
|
51
52
|
return originalElement;
|
|
52
53
|
};
|
|
@@ -94,6 +95,7 @@ var MiniPagination = (props) => {
|
|
|
94
95
|
}
|
|
95
96
|
props.onChange && props.onChange(currentPage, pageSize || 10);
|
|
96
97
|
};
|
|
98
|
+
console.log((0, import_locales.getText)("table-pagination-total"), "getText('table-pagination-total')");
|
|
97
99
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-paginator materials-grid-paginator-mini" }, /* @__PURE__ */ import_react.default.createElement(
|
|
98
100
|
"div",
|
|
99
101
|
{
|
|
@@ -106,7 +108,7 @@ var MiniPagination = (props) => {
|
|
|
106
108
|
}
|
|
107
109
|
},
|
|
108
110
|
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ import_react.default.createElement(import_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }))
|
|
109
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-paginator-center" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "materials-grid-paginator-center-text" },
|
|
111
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-paginator-center" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "materials-grid-paginator-center-text" }, (0, import_locales.getText)("table-pagination-total")(current, MAX))), /* @__PURE__ */ import_react.default.createElement(
|
|
110
112
|
"div",
|
|
111
113
|
{
|
|
112
114
|
className: "pisell-lowcode-pagination-next",
|
|
@@ -0,0 +1,59 @@
|
|
|
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/classicLayout/index.tsx
|
|
30
|
+
var classicLayout_exports = {};
|
|
31
|
+
__export(classicLayout_exports, {
|
|
32
|
+
default: () => classicLayout_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(classicLayout_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var prefix = "pisell-lowcode-";
|
|
39
|
+
var ClassicLayout = (props) => {
|
|
40
|
+
const { header, content, footer, style, fixedHeader, fixedFooter } = props;
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}claseic-layout`, style }, /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
+
"header",
|
|
43
|
+
{
|
|
44
|
+
className: (0, import_classnames.default)({
|
|
45
|
+
[`${prefix}claseic-layout-fixed-header`]: fixedHeader
|
|
46
|
+
})
|
|
47
|
+
},
|
|
48
|
+
header
|
|
49
|
+
), content, /* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
"footer",
|
|
51
|
+
{
|
|
52
|
+
className: (0, import_classnames.default)({
|
|
53
|
+
[`${prefix}claseic-layout-fixed-footer`]: fixedFooter
|
|
54
|
+
})
|
|
55
|
+
},
|
|
56
|
+
footer
|
|
57
|
+
));
|
|
58
|
+
};
|
|
59
|
+
var classicLayout_default = ClassicLayout;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@pisell-prefix: pisell-lowcode;
|
|
2
|
+
|
|
3
|
+
.@{pisell-prefix} {
|
|
4
|
+
&-claseic-layout {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
&-claseic-layout-fixed-header {
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: 0;
|
|
13
|
+
z-index: 1;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
&-claseic-layout-fixed-footer {
|
|
17
|
+
position: sticky;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|