@pisell/materials 1.0.26 → 1.0.28
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 +1 -1
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +159 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +155 -7
- package/dist/umd/materials.min.css +1 -1
- package/dist/umd/materials.min.js +1 -1
- package/es/components/Pagination/index.less +8 -1
- package/es/components/date-picker/index.d.ts.map +1 -1
- package/es/components/date-picker/index.js +1 -0
- package/es/components/page/index.d.ts.map +1 -1
- package/es/components/page/index.js +156 -72
- package/es/components/table/Actions/Filter/FilterItem/index.js +3 -2
- package/es/components/table/Actions/Sort/index.d.ts +3 -3
- package/es/components/table/Actions/Sort/index.d.ts.map +1 -1
- package/es/components/table/Actions/Sort/index.js +53 -17
- package/es/components/table/Actions/index.d.ts.map +1 -1
- package/es/components/table/Actions/index.js +5 -5
- package/es/components/table/Actions/index.less +2 -0
- package/es/components/table/BasicTable/index.d.ts.map +1 -1
- package/es/components/table/BasicTable/index.js +11 -2
- package/es/components/table/Table/fields/rangePicker/Edit/index.d.ts.map +1 -1
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +13 -3
- package/es/components/table/Table/index.js +4 -4
- package/es/components/table/Table/tableConfig/body/CellContent/index.less +0 -1
- package/es/components/table/Table/tableConfig/body/CellProvider/index.less +0 -3
- package/es/components/table/index.js +2 -2
- package/es/components/table/model.js +1 -1
- package/lib/components/Pagination/index.less +8 -1
- package/lib/components/date-picker/index.d.ts.map +1 -1
- package/lib/components/page/index.d.ts.map +1 -1
- package/lib/components/page/index.js +147 -72
- package/lib/components/table/Actions/Filter/FilterItem/index.js +2 -2
- package/lib/components/table/Actions/Sort/index.d.ts +3 -3
- package/lib/components/table/Actions/Sort/index.d.ts.map +1 -1
- package/lib/components/table/Actions/Sort/index.js +47 -2
- package/lib/components/table/Actions/index.d.ts.map +1 -1
- package/lib/components/table/Actions/index.js +2 -2
- package/lib/components/table/Actions/index.less +2 -0
- package/lib/components/table/BasicTable/index.d.ts.map +1 -1
- package/lib/components/table/BasicTable/index.js +10 -1
- package/lib/components/table/Table/fields/rangePicker/Edit/index.d.ts.map +1 -1
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +6 -1
- package/lib/components/table/Table/index.js +4 -4
- package/lib/components/table/Table/tableConfig/body/CellContent/index.less +0 -1
- package/lib/components/table/Table/tableConfig/body/CellProvider/index.less +0 -3
- package/lib/components/table/index.js +2 -2
- package/lib/components/table/model.js +1 -1
- package/lowcode/table/meta.ts +63 -0
- package/package.json +2 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
|
@@ -55,7 +55,14 @@
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.pisell-lowcode-pagination-disabled {
|
|
58
|
+
.pisell-lowcode-pagination-disabled {
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
color: rgba(0,0,0,.25);
|
|
61
|
+
.paginator-page-btn {
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
color: rgba(0,0,0,.25);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
59
66
|
|
|
60
67
|
.pisell-lowcode-pagination-item-active:hover {
|
|
61
68
|
border-color: #D0D5DD !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAYA,QAAA,MAAM,UAAU,6BAKd,CAAC;AAWH,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DatePicker as OriginalDatePicker } from 'antd';
|
|
2
2
|
import { withMomentProps } from "../../utils/hoc";
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
|
+
// import { RangePicker } from "@pisell/date-picker"
|
|
4
5
|
import localeData from 'dayjs/plugin/localeData';
|
|
5
6
|
import weekday from 'dayjs/plugin/weekday';
|
|
6
7
|
dayjs.extend(weekday);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AACA,OAAuB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AACA,OAAuB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAKzE,UAAU,SAAU,SAAQ,mBAAmB;CAAG;AAqJlD,QAAA,MAAM,IAAI,UAAW,SAAS,gBAgB7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,85 +1,169 @@
|
|
|
1
|
+
var _excluded = ["children"];
|
|
2
|
+
var _theme$token;
|
|
1
3
|
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); }
|
|
4
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
6
|
import React from "react";
|
|
3
7
|
import ConfigProvider from "../config-provider";
|
|
8
|
+
import { AdapterDayjs } from '@pisell/date-picker/es/AdapterDayjs';
|
|
9
|
+
import { LocalizationProvider, createTheme, ThemeProvider } from '@pisell/date-picker';
|
|
4
10
|
var theme = {
|
|
5
|
-
components: {
|
|
6
|
-
Table: {
|
|
7
|
-
colorFillContent: "
|
|
8
|
-
colorFillSecondary: "
|
|
9
|
-
colorBorderSecondary: "#EAECF0",
|
|
10
|
-
colorFillAlter: "
|
|
11
|
+
"components": {
|
|
12
|
+
"Table": {
|
|
13
|
+
"colorFillContent": "#EAECF0",
|
|
14
|
+
"colorFillSecondary": "#F2F4F7",
|
|
15
|
+
"colorBorderSecondary": "#EAECF0",
|
|
16
|
+
"colorFillAlter": "#F9FAFB",
|
|
17
|
+
"controlItemBgHover": "#F9FAFB",
|
|
18
|
+
"colorTextHeading": "#475467",
|
|
19
|
+
"colorTextDescription": "#667085",
|
|
20
|
+
"colorText": "#101828",
|
|
21
|
+
"controlHeight": 32,
|
|
22
|
+
"padding": 24,
|
|
23
|
+
"margin": 16
|
|
24
|
+
},
|
|
25
|
+
"Button": {
|
|
26
|
+
"borderRadiusSM": 6,
|
|
27
|
+
"borderRadiusLG": 9,
|
|
28
|
+
"borderRadius": 8,
|
|
29
|
+
"controlHeight": 36,
|
|
30
|
+
"colorBgContainerDisabled": "#F2F4F7",
|
|
31
|
+
"colorBgTextHover": "#F9FAFB",
|
|
32
|
+
"colorBorder": "#D0D5DD",
|
|
33
|
+
"colorError": "#D92D20",
|
|
34
|
+
"colorErrorActive": "#D92D20",
|
|
35
|
+
"colorErrorHover": "#B42318",
|
|
36
|
+
"colorErrorBg": "#FEF3F2",
|
|
37
|
+
"colorErrorBorderHover": "#FDA29B",
|
|
38
|
+
"colorErrorOutline": "rgba(217, 45, 32, 0.06)",
|
|
39
|
+
"colorLink": "#175CD3",
|
|
40
|
+
"colorLinkActive": "#194185",
|
|
41
|
+
"colorLinkHover": "#1849A9",
|
|
42
|
+
"colorPrimaryActive": "#7f56d9",
|
|
43
|
+
"colorPrimaryBorder": "#E9D7FE",
|
|
44
|
+
"colorText": "#344054",
|
|
45
|
+
"colorTextDisabled": "#D0D5DD",
|
|
46
|
+
"colorTextLightSolid": "#fff",
|
|
47
|
+
"colorBgTextActive": "#D0D5DD",
|
|
48
|
+
"controlOutline": "rgba(127, 86, 217, 0.04)",
|
|
49
|
+
"controlTmpOutline": "#F9FAFB",
|
|
50
|
+
"paddingContentHorizontal": 14,
|
|
51
|
+
"marginXS": 8
|
|
52
|
+
},
|
|
53
|
+
"Divider": {
|
|
54
|
+
"colorSplit": "#EAECF0"
|
|
55
|
+
},
|
|
56
|
+
"Breadcrumb": {
|
|
57
|
+
"itemColor": "#475467",
|
|
58
|
+
"colorTextDescription": "#475467",
|
|
59
|
+
"lastItemColor": "#6941C6",
|
|
60
|
+
"separatorMargin": 12,
|
|
61
|
+
"separatorColor": "#D0D5DD",
|
|
62
|
+
"linkHoverColor": "#1D2939",
|
|
63
|
+
"linkColor": "#475467",
|
|
64
|
+
"colorBgTextHover": "#F9FAFB",
|
|
65
|
+
"paddingXXS": 8
|
|
66
|
+
},
|
|
67
|
+
"Dropdown": {
|
|
68
|
+
"borderRadiusLG": 8,
|
|
69
|
+
// "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
|
|
70
|
+
"controlHeight": 42,
|
|
71
|
+
"fontSize": 14
|
|
72
|
+
},
|
|
73
|
+
"DatePicker": {
|
|
74
|
+
"borderRadius": 8,
|
|
75
|
+
"colorTextPlaceholder": "#667085",
|
|
76
|
+
"colorIcon": "#667085",
|
|
77
|
+
"colorTextQuaternary": "#D0D5DD",
|
|
78
|
+
"colorBgContainerDisabled": "#F9FAFB",
|
|
79
|
+
"colorTextDisabled": "#98A2B3"
|
|
11
80
|
}
|
|
12
81
|
},
|
|
13
|
-
token: {
|
|
14
|
-
colorPrimary: "#7F56D9",
|
|
15
|
-
colorPrimaryBg: "#F9F5FF",
|
|
16
|
-
colorPrimaryBgHover: "#F4EBFF",
|
|
17
|
-
colorPrimaryBorder: "#E9D7FE",
|
|
18
|
-
colorPrimaryBorderHover: "#D6BBFB",
|
|
19
|
-
colorPrimaryHover: "#6941C6",
|
|
20
|
-
colorPrimaryActive: "#53389E",
|
|
21
|
-
colorPrimaryTextHover: "#53389E",
|
|
22
|
-
colorPrimaryText: "#6941C6",
|
|
23
|
-
colorPrimaryTextActive: "#42307D",
|
|
24
|
-
colorSuccess: "#079455",
|
|
25
|
-
colorSuccessBg: "#ECFDF3",
|
|
26
|
-
colorSuccessBgHover: "#DCFAE6",
|
|
27
|
-
colorSuccessBorder: "#ABEFC6",
|
|
28
|
-
colorSuccessBorderHover: "#75E0A7",
|
|
29
|
-
colorSuccessHover: "#067647",
|
|
30
|
-
colorSuccessText: "#067647",
|
|
31
|
-
colorSuccessActive: "#085D3A",
|
|
32
|
-
colorSuccessTextHover: "#085D3A",
|
|
33
|
-
colorSuccessTextActive: "#074D31",
|
|
34
|
-
colorWarning: "#dc6803",
|
|
35
|
-
colorWarningBg: "#FFFAEB",
|
|
36
|
-
colorWarningBgHover: "#FEF0C7",
|
|
37
|
-
colorWarningBorder: "#FEDF89",
|
|
38
|
-
colorWarningBorderHover: "#FEC84B",
|
|
39
|
-
colorWarningHover: "#B54708",
|
|
40
|
-
colorWarningText: "#B54708",
|
|
41
|
-
colorWarningActive: "#93370D",
|
|
42
|
-
colorWarningTextHover: "#93370D",
|
|
43
|
-
colorWarningTextActive: "#7A2E0E",
|
|
44
|
-
colorError: "#d92d20",
|
|
45
|
-
colorErrorBg: "#FEF3F2",
|
|
46
|
-
colorErrorBgHover: "#FEE4E2",
|
|
47
|
-
colorErrorBorder: "#FECDCA",
|
|
48
|
-
colorErrorBorderHover: "#FDA29B",
|
|
49
|
-
colorErrorHover: "#B42318",
|
|
50
|
-
colorErrorText: "#B42318",
|
|
51
|
-
colorErrorActive: "#912018",
|
|
52
|
-
colorErrorTextHover: "#912018",
|
|
53
|
-
colorErrorTextActive: "#7A271A",
|
|
54
|
-
colorInfo: "#1570ef",
|
|
55
|
-
colorInfoBg: "#EFF8FF",
|
|
56
|
-
colorInfoBgHover: "#D1E9FF",
|
|
57
|
-
colorInfoBorder: "#B2DDFF",
|
|
58
|
-
colorInfoBorderHover: "#84CAFF",
|
|
59
|
-
colorInfoHover: "#175CD3",
|
|
60
|
-
colorInfoText: "#175CD3",
|
|
61
|
-
colorInfoActive: "#1849A9",
|
|
62
|
-
colorInfoTextHover: "#1849A9",
|
|
63
|
-
colorInfoTextActive: "#194185",
|
|
64
|
-
colorText: "#101828",
|
|
65
|
-
colorTextSecondary: "#475467",
|
|
66
|
-
colorTextTertiary: "#667085",
|
|
67
|
-
colorTextQuaternary: "#D0D5DD",
|
|
68
|
-
colorBorder: "#D0D5DD",
|
|
69
|
-
colorBorderSecondary: "#EAECF0",
|
|
70
|
-
colorFill: "#D0D5DD",
|
|
71
|
-
colorFillSecondary: "#EAECF0",
|
|
72
|
-
colorFillTertiary: "#F2F4F7",
|
|
73
|
-
colorFillQuaternary: "#F9FAFB",
|
|
74
|
-
colorBgLayout: "#F2F4F7",
|
|
75
|
-
colorBgSpotlight: "#101828",
|
|
76
|
-
colorBgMask: "rgba(0, 0, 0, 0.5)"
|
|
82
|
+
"token": {
|
|
83
|
+
"colorPrimary": "#7F56D9",
|
|
84
|
+
"colorPrimaryBg": "#F9F5FF",
|
|
85
|
+
"colorPrimaryBgHover": "#F4EBFF",
|
|
86
|
+
"colorPrimaryBorder": "#E9D7FE",
|
|
87
|
+
"colorPrimaryBorderHover": "#D6BBFB",
|
|
88
|
+
"colorPrimaryHover": "#6941C6",
|
|
89
|
+
"colorPrimaryActive": "#53389E",
|
|
90
|
+
"colorPrimaryTextHover": "#53389E",
|
|
91
|
+
"colorPrimaryText": "#6941C6",
|
|
92
|
+
"colorPrimaryTextActive": "#42307D",
|
|
93
|
+
"colorSuccess": "#079455",
|
|
94
|
+
"colorSuccessBg": "#ECFDF3",
|
|
95
|
+
"colorSuccessBgHover": "#DCFAE6",
|
|
96
|
+
"colorSuccessBorder": "#ABEFC6",
|
|
97
|
+
"colorSuccessBorderHover": "#75E0A7",
|
|
98
|
+
"colorSuccessHover": "#067647",
|
|
99
|
+
"colorSuccessText": "#067647",
|
|
100
|
+
"colorSuccessActive": "#085D3A",
|
|
101
|
+
"colorSuccessTextHover": "#085D3A",
|
|
102
|
+
"colorSuccessTextActive": "#074D31",
|
|
103
|
+
"colorWarning": "#dc6803",
|
|
104
|
+
"colorWarningBg": "#FFFAEB",
|
|
105
|
+
"colorWarningBgHover": "#FEF0C7",
|
|
106
|
+
"colorWarningBorder": "#FEDF89",
|
|
107
|
+
"colorWarningBorderHover": "#FEC84B",
|
|
108
|
+
"colorWarningHover": "#B54708",
|
|
109
|
+
"colorWarningText": "#B54708",
|
|
110
|
+
"colorWarningActive": "#93370D",
|
|
111
|
+
"colorWarningTextHover": "#93370D",
|
|
112
|
+
"colorWarningTextActive": "#7A2E0E",
|
|
113
|
+
"colorError": "#d92d20",
|
|
114
|
+
"colorErrorBg": "#FEF3F2",
|
|
115
|
+
"colorErrorBgHover": "#FEE4E2",
|
|
116
|
+
"colorErrorBorder": "#FECDCA",
|
|
117
|
+
"colorErrorBorderHover": "#FDA29B",
|
|
118
|
+
"colorErrorHover": "#B42318",
|
|
119
|
+
"colorErrorText": "#B42318",
|
|
120
|
+
"colorErrorActive": "#912018",
|
|
121
|
+
"colorErrorTextHover": "#912018",
|
|
122
|
+
"colorErrorTextActive": "#7A271A",
|
|
123
|
+
"colorInfo": "#1570ef",
|
|
124
|
+
"colorInfoBg": "#EFF8FF",
|
|
125
|
+
"colorInfoBgHover": "#D1E9FF",
|
|
126
|
+
"colorInfoBorder": "#B2DDFF",
|
|
127
|
+
"colorInfoBorderHover": "#84CAFF",
|
|
128
|
+
"colorInfoHover": "#175CD3",
|
|
129
|
+
"colorInfoText": "#175CD3",
|
|
130
|
+
"colorInfoActive": "#1849A9",
|
|
131
|
+
"colorInfoTextHover": "#1849A9",
|
|
132
|
+
"colorInfoTextActive": "#194185",
|
|
133
|
+
"colorText": "#101828",
|
|
134
|
+
"colorTextSecondary": "#475467",
|
|
135
|
+
"colorTextTertiary": "#667085",
|
|
136
|
+
"colorTextQuaternary": "#D0D5DD",
|
|
137
|
+
"colorBorder": "#D0D5DD",
|
|
138
|
+
"colorBorderSecondary": "#EAECF0",
|
|
139
|
+
"colorFill": "#D0D5DD",
|
|
140
|
+
"colorFillSecondary": "#EAECF0",
|
|
141
|
+
"colorFillTertiary": "#F2F4F7",
|
|
142
|
+
"colorFillQuaternary": "#F9FAFB",
|
|
143
|
+
"colorBgLayout": "#F2F4F7",
|
|
144
|
+
"colorBgSpotlight": "#101828",
|
|
145
|
+
"colorBgMask": "rgba(0, 0, 0, 0.5)",
|
|
146
|
+
"wireframe": false,
|
|
147
|
+
"borderRadius": 8
|
|
77
148
|
}
|
|
78
149
|
};
|
|
150
|
+
var datePickerTheme = createTheme({
|
|
151
|
+
palette: {
|
|
152
|
+
primary: {
|
|
153
|
+
main: ((_theme$token = theme.token) === null || _theme$token === void 0 ? void 0 : _theme$token.colorPrimary) || "#7F56D9"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
79
157
|
var Page = function Page(props) {
|
|
80
|
-
|
|
158
|
+
var children = props.children,
|
|
159
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
160
|
+
return /*#__PURE__*/React.createElement(ConfigProvider, _extends({}, others, {
|
|
81
161
|
prefixCls: props.prefixCls || "pisell-lowcode",
|
|
82
162
|
theme: props.theme || theme
|
|
83
|
-
})
|
|
163
|
+
}), /*#__PURE__*/React.createElement(LocalizationProvider, {
|
|
164
|
+
dateAdapter: AdapterDayjs
|
|
165
|
+
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
166
|
+
theme: datePickerTheme
|
|
167
|
+
}, children)));
|
|
84
168
|
};
|
|
85
169
|
export default Page;
|
|
@@ -5,7 +5,8 @@ import "./index.less";
|
|
|
5
5
|
var FilterItem = function FilterItem(props) {
|
|
6
6
|
var label = props.label,
|
|
7
7
|
type = props.type,
|
|
8
|
-
name = props.name
|
|
8
|
+
name = props.name,
|
|
9
|
+
other = props.other;
|
|
9
10
|
var Com = useMemo(function () {
|
|
10
11
|
var _fieldMaps;
|
|
11
12
|
return (_fieldMaps = fieldMaps[type]) === null || _fieldMaps === void 0 ? void 0 : _fieldMaps.edit;
|
|
@@ -13,6 +14,6 @@ var FilterItem = function FilterItem(props) {
|
|
|
13
14
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
14
15
|
label: label,
|
|
15
16
|
name: name
|
|
16
|
-
}, /*#__PURE__*/React.createElement(Com,
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Com, other));
|
|
17
18
|
};
|
|
18
19
|
export default FilterItem;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare type SortItemProps = {
|
|
3
|
-
type: "
|
|
3
|
+
type: "date" | "string" | "number";
|
|
4
|
+
label: string;
|
|
4
5
|
name: string;
|
|
5
|
-
props: object;
|
|
6
|
-
title: string;
|
|
7
6
|
};
|
|
8
7
|
declare type SortListProps = {
|
|
9
8
|
list: SortItemProps[];
|
|
9
|
+
onChange?: (val: string) => void;
|
|
10
10
|
};
|
|
11
11
|
declare const Sort: React.FC<SortListProps>;
|
|
12
12
|
export default Sort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,oBAAY,aAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,aAAK,aAAa,GAAG;IACnB,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC,CAAC;AAmCF,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoBjC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,23 +1,59 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Button } from "antd";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { Button, Dropdown } from "antd";
|
|
3
3
|
import { SwitchVertical01 } from "@pisell/icon";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
var sortChildrenMap = {
|
|
5
|
+
date: function date(key) {
|
|
6
|
+
return [{
|
|
7
|
+
key: "".concat(key, ":desc"),
|
|
8
|
+
label: "Oldest to newest"
|
|
9
|
+
}, {
|
|
10
|
+
key: "".concat(key, ":asc"),
|
|
11
|
+
label: "Newest to oldest"
|
|
12
|
+
}];
|
|
13
|
+
},
|
|
14
|
+
string: function string(key) {
|
|
15
|
+
return [{
|
|
16
|
+
key: "".concat(key, ":asc"),
|
|
17
|
+
label: "A to Z"
|
|
18
|
+
}, {
|
|
19
|
+
key: "".concat(key, ":desc"),
|
|
20
|
+
label: "Z to A"
|
|
21
|
+
}];
|
|
22
|
+
},
|
|
23
|
+
number: function number(key) {
|
|
24
|
+
return [{
|
|
25
|
+
key: "".concat(key, ":asc"),
|
|
26
|
+
label: "Lowest to highest"
|
|
27
|
+
}, {
|
|
28
|
+
key: "".concat(key, ":desc"),
|
|
29
|
+
label: "Highest to lowest"
|
|
30
|
+
}];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
16
33
|
var Sort = function Sort(_ref) {
|
|
17
34
|
var _ref$list = _ref.list,
|
|
18
|
-
list = _ref$list === void 0 ? [] : _ref$list
|
|
19
|
-
|
|
35
|
+
list = _ref$list === void 0 ? [] : _ref$list,
|
|
36
|
+
onChange = _ref.onChange;
|
|
37
|
+
var sortItems = useMemo(function () {
|
|
38
|
+
return list.map(function (d) {
|
|
39
|
+
return {
|
|
40
|
+
key: d.name,
|
|
41
|
+
label: d.label,
|
|
42
|
+
children: sortChildrenMap[d.type](d.name)
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}, [list]);
|
|
46
|
+
var onClick = function onClick(detail) {
|
|
47
|
+
var _detail$keyPath;
|
|
48
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(detail === null || detail === void 0 ? void 0 : (_detail$keyPath = detail.keyPath) === null || _detail$keyPath === void 0 ? void 0 : _detail$keyPath[0]);
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
51
|
+
menu: {
|
|
52
|
+
items: sortItems,
|
|
53
|
+
onClick: onClick
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
20
56
|
icon: /*#__PURE__*/React.createElement(SwitchVertical01, null)
|
|
21
|
-
}, "Sort");
|
|
57
|
+
}, "Sort"));
|
|
22
58
|
};
|
|
23
59
|
export default Sort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAKA,OAAO,cAAc,CAAC;AAEtB,QAAA,MAAM,OAAO,qBAAsB,GAAG,uBAmBrC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import
|
|
2
|
+
import { Form } from "antd";
|
|
3
3
|
import QuickFilter from "./Filter/QuickFilter";
|
|
4
4
|
import Sort from "./Sort";
|
|
5
5
|
import "./index.less";
|
|
@@ -15,10 +15,10 @@ var Actions = function Actions(_ref) {
|
|
|
15
15
|
className: "left-wrap"
|
|
16
16
|
}, /*#__PURE__*/React.createElement(QuickFilter, null)), /*#__PURE__*/React.createElement("div", {
|
|
17
17
|
className: "right-wrap"
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
}
|
|
18
|
+
}, sort !== null && sort !== void 0 && sort.show ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
19
|
+
name: "order_by"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Sort, {
|
|
21
21
|
list: (sort === null || sort === void 0 ? void 0 : sort.list) || []
|
|
22
|
-
}) : null)) : null;
|
|
22
|
+
})) : null)) : null;
|
|
23
23
|
};
|
|
24
24
|
export default Actions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,MAAM,CAAC;AAIzC,QAAA,MAAM,UAAU,UAAW,WAAW,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,MAAM,CAAC;AAIzC,QAAA,MAAM,UAAU,UAAW,WAAW,GAAG,CAAC,gBAyEzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -9,9 +9,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import { Table } from "antd";
|
|
12
|
-
import React, { useState, useMemo, useEffect } from "react";
|
|
12
|
+
import React, { useState, useMemo, useEffect, useCallback } from "react";
|
|
13
13
|
import Pagination from "../../Pagination";
|
|
14
14
|
var BasicTable = function BasicTable(props) {
|
|
15
|
+
var _pagination$pageSizeO;
|
|
15
16
|
var dataSource = props.dataSource,
|
|
16
17
|
pagination = props.pagination,
|
|
17
18
|
other = _objectWithoutProperties(props, _excluded);
|
|
@@ -23,9 +24,16 @@ var BasicTable = function BasicTable(props) {
|
|
|
23
24
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
25
|
pageSize = _useState4[0],
|
|
25
26
|
setPageSize = _useState4[1];
|
|
27
|
+
var showTotal = pagination.showTotal;
|
|
28
|
+
var _showTotal = useCallback(function (total, range) {
|
|
29
|
+
return showTotal(total, range, pageSize);
|
|
30
|
+
}, [showTotal, pageSize, currentPage]);
|
|
26
31
|
useEffect(function () {
|
|
27
32
|
setCurrentPage(1);
|
|
28
33
|
}, [dataSource]);
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
(pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) && setPageSize(pagination === null || pagination === void 0 ? void 0 : pagination.pageSize);
|
|
36
|
+
}, [pagination.pageSize]);
|
|
29
37
|
|
|
30
38
|
// 分割数据源
|
|
31
39
|
var _dataSource = useMemo(function () {
|
|
@@ -63,7 +71,8 @@ var BasicTable = function BasicTable(props) {
|
|
|
63
71
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, _extends({}, other, {
|
|
64
72
|
pagination: false,
|
|
65
73
|
dataSource: _dataSource === null || _dataSource === void 0 ? void 0 : _dataSource.list
|
|
66
|
-
})), total >
|
|
74
|
+
})), total > ((pagination === null || pagination === void 0 ? void 0 : (_pagination$pageSizeO = pagination.pageSizeOptions) === null || _pagination$pageSizeO === void 0 ? void 0 : _pagination$pageSizeO[0]) || 10) ? /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
|
|
75
|
+
showTotal: _showTotal,
|
|
67
76
|
current: currentPage,
|
|
68
77
|
pageSize: pageSize,
|
|
69
78
|
onShowSizeChange: onPaginationChange,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;;AA4E5C,wBAAgC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["value", "onChange", "onPressEnter", "onBlur", "style", "bordered", "presets", "showTime", "format"];
|
|
3
|
+
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
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
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; }
|
|
5
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
8
|
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); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
11
|
import { isArr, isBoolean, isString } from "@pisell/utils";
|
|
8
12
|
import dayjs from "dayjs";
|
|
9
13
|
import { forwardRef, useMemo } from "react";
|
|
@@ -17,7 +21,9 @@ var Edit = function Edit(props, ref) {
|
|
|
17
21
|
style = props.style,
|
|
18
22
|
bordered = props.bordered,
|
|
19
23
|
presets = props.presets,
|
|
20
|
-
showTime = props.showTime
|
|
24
|
+
showTime = props.showTime,
|
|
25
|
+
format = props.format,
|
|
26
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
21
27
|
var dayjsVal = useMemo(function () {
|
|
22
28
|
if (isString(value)) {
|
|
23
29
|
return dayjs(value);
|
|
@@ -35,6 +41,9 @@ var Edit = function Edit(props, ref) {
|
|
|
35
41
|
var rangePresets = [{
|
|
36
42
|
label: "Today",
|
|
37
43
|
value: [dayjs().startOf('day'), dayjs().endOf('day')]
|
|
44
|
+
}, {
|
|
45
|
+
label: "Yesterday",
|
|
46
|
+
value: [dayjs().add(-1, "d").startOf('day'), dayjs().add(-1, "d").endOf('day')]
|
|
38
47
|
}, {
|
|
39
48
|
label: "Last 3 Days",
|
|
40
49
|
value: [dayjs().add(-3, "d").startOf('day'), dayjs().endOf('day')]
|
|
@@ -57,7 +66,8 @@ var Edit = function Edit(props, ref) {
|
|
|
57
66
|
}
|
|
58
67
|
return true;
|
|
59
68
|
}, [showTime]);
|
|
60
|
-
return /*#__PURE__*/React.createElement(RangePicker, {
|
|
69
|
+
return /*#__PURE__*/React.createElement(RangePicker, _extends({}, others, {
|
|
70
|
+
format: format,
|
|
61
71
|
showTime: _showTime,
|
|
62
72
|
presets: presets || rangePresets,
|
|
63
73
|
ref: ref,
|
|
@@ -82,6 +92,6 @@ var Edit = function Edit(props, ref) {
|
|
|
82
92
|
}
|
|
83
93
|
}, dom);
|
|
84
94
|
}
|
|
85
|
-
});
|
|
95
|
+
}));
|
|
86
96
|
};
|
|
87
97
|
export default /*#__PURE__*/forwardRef(Edit);
|
|
@@ -87,11 +87,11 @@ var GridViewTable = function GridViewTable(_ref) {
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}, [defaultColumns]);
|
|
90
|
-
var showTotal = useCallback(function (total, range) {
|
|
90
|
+
var showTotal = useCallback(function (total, range, pageSize) {
|
|
91
91
|
var start = range[0] - 1;
|
|
92
|
-
var _current = start /
|
|
93
|
-
return "Page ".concat(_current, " of ").concat(Math.ceil(total /
|
|
94
|
-
}, [
|
|
92
|
+
var _current = start / pageSize + 1;
|
|
93
|
+
return "Page ".concat(_current, " of ").concat(Math.ceil(total / pageSize));
|
|
94
|
+
}, []);
|
|
95
95
|
var _paginationConfig = useMemo(function () {
|
|
96
96
|
if (tableProps.pagination === false) {
|
|
97
97
|
return false;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
.cell-provider {
|
|
2
|
-
// position: relative;
|
|
3
|
-
cursor: pointer;
|
|
4
2
|
width: 100%;
|
|
5
3
|
height: 100%;
|
|
6
4
|
display: flex;
|
|
@@ -8,7 +6,6 @@
|
|
|
8
6
|
justify-content: center;
|
|
9
7
|
border-radius: 4px;
|
|
10
8
|
padding: 12px;
|
|
11
|
-
// cursor: pointer;
|
|
12
9
|
|
|
13
10
|
&.focus {
|
|
14
11
|
box-shadow: var(--theme-color) 0px 0px 0px 1px !important;
|
|
@@ -62,11 +62,11 @@ var GridView = Provider(function (props) {
|
|
|
62
62
|
});
|
|
63
63
|
}, [filter]);
|
|
64
64
|
var initialValues = useMemo(function () {
|
|
65
|
-
return (filter.list || []).reduce(function (p, c) {
|
|
65
|
+
return ((filter === null || filter === void 0 ? void 0 : filter.list) || []).reduce(function (p, c) {
|
|
66
66
|
var _c$other;
|
|
67
67
|
return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.name, c === null || c === void 0 ? void 0 : (_c$other = c.other) === null || _c$other === void 0 ? void 0 : _c$other.defaultValue));
|
|
68
68
|
}, {});
|
|
69
|
-
}, [filter.list]);
|
|
69
|
+
}, [filter === null || filter === void 0 ? void 0 : filter.list]);
|
|
70
70
|
return /*#__PURE__*/React.createElement(Form, {
|
|
71
71
|
form: form,
|
|
72
72
|
layout: "vertical",
|
|
@@ -55,7 +55,14 @@
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.pisell-lowcode-pagination-disabled {
|
|
58
|
+
.pisell-lowcode-pagination-disabled {
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
color: rgba(0,0,0,.25);
|
|
61
|
+
.paginator-page-btn {
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
color: rgba(0,0,0,.25);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
59
66
|
|
|
60
67
|
.pisell-lowcode-pagination-item-active:hover {
|
|
61
68
|
border-color: #D0D5DD !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAYA,QAAA,MAAM,UAAU,6BAKd,CAAC;AAWH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AACA,OAAuB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AACA,OAAuB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAKzE,UAAU,SAAU,SAAQ,mBAAmB;CAAG;AAqJlD,QAAA,MAAM,IAAI,UAAW,SAAS,gBAgB7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|