@pisell/materials 1.0.38 → 1.0.39
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 +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.d.ts +2 -1
- package/es/components/Pagination/index.js +44 -1
- package/es/components/Pagination/index.less +8 -1
- package/es/components/date-picker/index.js +12 -2
- 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.js +53 -17
- package/es/components/table/Actions/index.js +6 -5
- package/es/components/table/Actions/index.less +2 -0
- package/es/components/table/BasicTable/index.js +32 -48
- package/es/components/table/Table/fields/index.d.ts +29 -0
- package/es/components/table/Table/fields/index.js +5 -2
- package/es/components/table/Table/fields/link/Show/index.js +5 -2
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +13 -3
- package/es/components/table/Table/fields/search/Config/index.d.ts +3 -0
- package/es/components/table/Table/fields/search/Config/index.js +4 -0
- package/es/components/table/Table/fields/search/Edit/index.d.ts +4 -0
- package/es/components/table/Table/fields/search/Edit/index.js +28 -0
- package/es/components/table/Table/fields/search/Edit/index.less +0 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +4 -0
- package/es/components/table/Table/fields/search/Show/index.js +16 -0
- package/es/components/table/Table/fields/search/Show/index.less +0 -0
- package/es/components/table/Table/fields/search/Sort/index.d.ts +3 -0
- package/es/components/table/Table/fields/search/Sort/index.js +4 -0
- package/es/components/table/Table/fields/search/index.d.ts +14 -0
- package/es/components/table/Table/fields/search/index.js +17 -0
- package/es/components/table/Table/fields/search/index.less +0 -0
- 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/Table/tableConfig/header/CellProvider/index.less +1 -1
- package/es/components/table/index.js +21 -4
- package/es/components/table/model.js +1 -1
- package/es/index.d.ts +64 -63
- package/es/index.js +41 -43
- package/lib/components/Pagination/index.d.ts +2 -1
- package/lib/components/Pagination/index.js +34 -0
- package/lib/components/Pagination/index.less +8 -1
- package/lib/components/date-picker/index.js +2 -8
- 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.js +47 -2
- package/lib/components/table/Actions/index.js +2 -2
- package/lib/components/table/Actions/index.less +2 -0
- package/lib/components/table/BasicTable/index.js +31 -25
- package/lib/components/table/Table/fields/index.d.ts +29 -0
- package/lib/components/table/Table/fields/index.js +5 -2
- package/lib/components/table/Table/fields/link/Show/index.js +11 -2
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +6 -1
- package/lib/components/table/Table/fields/search/Config/index.d.ts +3 -0
- package/lib/components/table/Table/fields/search/Config/index.js +28 -0
- package/lib/components/table/Table/fields/search/Edit/index.d.ts +4 -0
- package/lib/components/table/Table/fields/search/Edit/index.js +51 -0
- package/lib/components/table/Table/fields/search/Edit/index.less +0 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +4 -0
- package/lib/components/table/Table/fields/search/Show/index.js +37 -0
- package/lib/components/table/Table/fields/search/Show/index.less +0 -0
- package/lib/components/table/Table/fields/search/Sort/index.d.ts +3 -0
- package/lib/components/table/Table/fields/search/Sort/index.js +28 -0
- package/lib/components/table/Table/fields/search/index.d.ts +14 -0
- package/lib/components/table/Table/fields/search/index.js +51 -0
- package/lib/components/table/Table/fields/search/index.less +0 -0
- package/lib/components/table/Table/index.js +4 -6
- 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/Table/tableConfig/header/CellProvider/index.less +1 -1
- package/lib/components/table/index.js +21 -3
- package/lib/components/table/model.js +1 -1
- package/lib/index.d.ts +64 -63
- package/lib/index.js +3 -0
- package/lowcode/div/meta.ts +6 -2
- package/package.json +1 -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
|
@@ -5,9 +5,10 @@ export declare const paginationConfig: {
|
|
|
5
5
|
className: string;
|
|
6
6
|
defaultCurrent: number;
|
|
7
7
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "page" | "
|
|
8
|
+
itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
12
12
|
declare const Pagination: (props: PaginationProps) => JSX.Element | null;
|
|
13
13
|
export default Pagination;
|
|
14
|
+
export declare const FormPagination: ({ value, onChange, page, pageSize, ...other }: any) => JSX.Element;
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/Pagination/index.tsx
|
|
30
30
|
var Pagination_exports = {};
|
|
31
31
|
__export(Pagination_exports, {
|
|
32
|
+
FormPagination: () => FormPagination,
|
|
32
33
|
default: () => Pagination_default,
|
|
33
34
|
paginationConfig: () => paginationConfig
|
|
34
35
|
});
|
|
@@ -118,7 +119,40 @@ var MiniPagination = (props) => {
|
|
|
118
119
|
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("paginator-page-btn", "right") }, /* @__PURE__ */ import_react.default.createElement(import_icon.ArrowRight, { className: "paginator-page-btn-right-icon" }))
|
|
119
120
|
));
|
|
120
121
|
};
|
|
122
|
+
var FormPagination = ({
|
|
123
|
+
value = {},
|
|
124
|
+
onChange,
|
|
125
|
+
page,
|
|
126
|
+
pageSize,
|
|
127
|
+
...other
|
|
128
|
+
}) => {
|
|
129
|
+
const [_p, _setP] = (0, import_react.useState)(1);
|
|
130
|
+
const [_ps, _setPs] = (0, import_react.useState)(10);
|
|
131
|
+
const _onChange = (p, ps) => {
|
|
132
|
+
onChange && onChange({
|
|
133
|
+
page: ps === _ps ? p : 1,
|
|
134
|
+
size: ps
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
(0, import_react.useEffect)(() => {
|
|
138
|
+
const _page = (value == null ? void 0 : value.page) || 1;
|
|
139
|
+
const _size = (value == null ? void 0 : value.size) || 10;
|
|
140
|
+
_setP(_page);
|
|
141
|
+
_setPs(_size);
|
|
142
|
+
}, [value]);
|
|
143
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
144
|
+
Pagination,
|
|
145
|
+
{
|
|
146
|
+
...other,
|
|
147
|
+
pageSize: _ps,
|
|
148
|
+
current: _p,
|
|
149
|
+
onChange: _onChange,
|
|
150
|
+
onShowSizeChange: _onChange
|
|
151
|
+
}
|
|
152
|
+
));
|
|
153
|
+
};
|
|
121
154
|
// Annotate the CommonJS export names for ESM import in node:
|
|
122
155
|
0 && (module.exports = {
|
|
156
|
+
FormPagination,
|
|
123
157
|
paginationConfig
|
|
124
158
|
});
|
|
@@ -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;
|
|
@@ -35,22 +35,16 @@ module.exports = __toCommonJS(date_picker_exports);
|
|
|
35
35
|
var import_antd = require("antd");
|
|
36
36
|
var import_hoc = require("../../utils/hoc");
|
|
37
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_date_picker = require("@pisell/date-picker");
|
|
38
39
|
var import_localeData = __toESM(require("dayjs/plugin/localeData"));
|
|
39
40
|
var import_weekday = __toESM(require("dayjs/plugin/weekday"));
|
|
40
41
|
import_dayjs.default.extend(import_weekday.default);
|
|
41
42
|
import_dayjs.default.extend(import_localeData.default);
|
|
42
|
-
var OriginalRangePicker = import_antd.DatePicker.RangePicker;
|
|
43
43
|
var DatePicker = (0, import_hoc.withMomentProps)(import_antd.DatePicker, [
|
|
44
44
|
"defaultPickerValue",
|
|
45
45
|
"defaultValue",
|
|
46
46
|
"showTime.defaultValue",
|
|
47
47
|
"value"
|
|
48
48
|
]);
|
|
49
|
-
|
|
50
|
-
"defaultPickerValue",
|
|
51
|
-
"defaultValue",
|
|
52
|
-
"showTime.defaultValue",
|
|
53
|
-
"value"
|
|
54
|
-
]);
|
|
55
|
-
DatePicker.RangePicker = RangePicker;
|
|
49
|
+
DatePicker.RangePicker = import_date_picker.RangePicker;
|
|
56
50
|
var date_picker_default = DatePicker;
|
|
@@ -34,89 +34,164 @@ __export(page_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(page_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
37
|
+
var import_AdapterDayjs = require("@pisell/date-picker/es/AdapterDayjs");
|
|
38
|
+
var import_date_picker = require("@pisell/date-picker");
|
|
37
39
|
var theme = {
|
|
38
|
-
components: {
|
|
39
|
-
Table: {
|
|
40
|
-
colorFillContent: "
|
|
41
|
-
colorFillSecondary: "
|
|
42
|
-
colorBorderSecondary: "#EAECF0",
|
|
43
|
-
colorFillAlter: "
|
|
40
|
+
"components": {
|
|
41
|
+
"Table": {
|
|
42
|
+
"colorFillContent": "#EAECF0",
|
|
43
|
+
"colorFillSecondary": "#F2F4F7",
|
|
44
|
+
"colorBorderSecondary": "#EAECF0",
|
|
45
|
+
"colorFillAlter": "#F9FAFB",
|
|
46
|
+
"controlItemBgHover": "#F9FAFB",
|
|
47
|
+
"colorTextHeading": "#475467",
|
|
48
|
+
"colorTextDescription": "#667085",
|
|
49
|
+
"colorText": "#101828",
|
|
50
|
+
"controlHeight": 32,
|
|
51
|
+
"padding": 24,
|
|
52
|
+
"margin": 16
|
|
53
|
+
},
|
|
54
|
+
"Button": {
|
|
55
|
+
"borderRadiusSM": 6,
|
|
56
|
+
"borderRadiusLG": 9,
|
|
57
|
+
"borderRadius": 8,
|
|
58
|
+
"controlHeight": 36,
|
|
59
|
+
"colorBgContainerDisabled": "#F2F4F7",
|
|
60
|
+
"colorBgTextHover": "#F9FAFB",
|
|
61
|
+
"colorBorder": "#D0D5DD",
|
|
62
|
+
"colorError": "#D92D20",
|
|
63
|
+
"colorErrorActive": "#D92D20",
|
|
64
|
+
"colorErrorHover": "#B42318",
|
|
65
|
+
"colorErrorBg": "#FEF3F2",
|
|
66
|
+
"colorErrorBorderHover": "#FDA29B",
|
|
67
|
+
"colorErrorOutline": "rgba(217, 45, 32, 0.06)",
|
|
68
|
+
"colorLink": "#175CD3",
|
|
69
|
+
"colorLinkActive": "#194185",
|
|
70
|
+
"colorLinkHover": "#1849A9",
|
|
71
|
+
"colorPrimaryActive": "#7f56d9",
|
|
72
|
+
"colorPrimaryBorder": "#E9D7FE",
|
|
73
|
+
"colorText": "#344054",
|
|
74
|
+
"colorTextDisabled": "#D0D5DD",
|
|
75
|
+
"colorTextLightSolid": "#fff",
|
|
76
|
+
"colorBgTextActive": "#D0D5DD",
|
|
77
|
+
"controlOutline": "rgba(127, 86, 217, 0.04)",
|
|
78
|
+
"controlTmpOutline": "#F9FAFB",
|
|
79
|
+
"paddingContentHorizontal": 14,
|
|
80
|
+
"marginXS": 8
|
|
81
|
+
},
|
|
82
|
+
"Divider": {
|
|
83
|
+
"colorSplit": "#EAECF0"
|
|
84
|
+
},
|
|
85
|
+
"Breadcrumb": {
|
|
86
|
+
"itemColor": "#475467",
|
|
87
|
+
"colorTextDescription": "#475467",
|
|
88
|
+
"lastItemColor": "#6941C6",
|
|
89
|
+
"separatorMargin": 12,
|
|
90
|
+
"separatorColor": "#D0D5DD",
|
|
91
|
+
"linkHoverColor": "#1D2939",
|
|
92
|
+
"linkColor": "#475467",
|
|
93
|
+
"colorBgTextHover": "#F9FAFB",
|
|
94
|
+
"paddingXXS": 8
|
|
95
|
+
},
|
|
96
|
+
"Dropdown": {
|
|
97
|
+
"borderRadiusLG": 8,
|
|
98
|
+
// "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
|
|
99
|
+
"controlHeight": 42,
|
|
100
|
+
"fontSize": 14
|
|
101
|
+
},
|
|
102
|
+
"DatePicker": {
|
|
103
|
+
"borderRadius": 8,
|
|
104
|
+
"colorTextPlaceholder": "#667085",
|
|
105
|
+
"colorIcon": "#667085",
|
|
106
|
+
"colorTextQuaternary": "#D0D5DD",
|
|
107
|
+
"colorBgContainerDisabled": "#F9FAFB",
|
|
108
|
+
"colorTextDisabled": "#98A2B3"
|
|
44
109
|
}
|
|
45
110
|
},
|
|
46
|
-
token: {
|
|
47
|
-
colorPrimary: "#7F56D9",
|
|
48
|
-
colorPrimaryBg: "#F9F5FF",
|
|
49
|
-
colorPrimaryBgHover: "#F4EBFF",
|
|
50
|
-
colorPrimaryBorder: "#E9D7FE",
|
|
51
|
-
colorPrimaryBorderHover: "#D6BBFB",
|
|
52
|
-
colorPrimaryHover: "#6941C6",
|
|
53
|
-
colorPrimaryActive: "#53389E",
|
|
54
|
-
colorPrimaryTextHover: "#53389E",
|
|
55
|
-
colorPrimaryText: "#6941C6",
|
|
56
|
-
colorPrimaryTextActive: "#42307D",
|
|
57
|
-
colorSuccess: "#079455",
|
|
58
|
-
colorSuccessBg: "#ECFDF3",
|
|
59
|
-
colorSuccessBgHover: "#DCFAE6",
|
|
60
|
-
colorSuccessBorder: "#ABEFC6",
|
|
61
|
-
colorSuccessBorderHover: "#75E0A7",
|
|
62
|
-
colorSuccessHover: "#067647",
|
|
63
|
-
colorSuccessText: "#067647",
|
|
64
|
-
colorSuccessActive: "#085D3A",
|
|
65
|
-
colorSuccessTextHover: "#085D3A",
|
|
66
|
-
colorSuccessTextActive: "#074D31",
|
|
67
|
-
colorWarning: "#dc6803",
|
|
68
|
-
colorWarningBg: "#FFFAEB",
|
|
69
|
-
colorWarningBgHover: "#FEF0C7",
|
|
70
|
-
colorWarningBorder: "#FEDF89",
|
|
71
|
-
colorWarningBorderHover: "#FEC84B",
|
|
72
|
-
colorWarningHover: "#B54708",
|
|
73
|
-
colorWarningText: "#B54708",
|
|
74
|
-
colorWarningActive: "#93370D",
|
|
75
|
-
colorWarningTextHover: "#93370D",
|
|
76
|
-
colorWarningTextActive: "#7A2E0E",
|
|
77
|
-
colorError: "#d92d20",
|
|
78
|
-
colorErrorBg: "#FEF3F2",
|
|
79
|
-
colorErrorBgHover: "#FEE4E2",
|
|
80
|
-
colorErrorBorder: "#FECDCA",
|
|
81
|
-
colorErrorBorderHover: "#FDA29B",
|
|
82
|
-
colorErrorHover: "#B42318",
|
|
83
|
-
colorErrorText: "#B42318",
|
|
84
|
-
colorErrorActive: "#912018",
|
|
85
|
-
colorErrorTextHover: "#912018",
|
|
86
|
-
colorErrorTextActive: "#7A271A",
|
|
87
|
-
colorInfo: "#1570ef",
|
|
88
|
-
colorInfoBg: "#EFF8FF",
|
|
89
|
-
colorInfoBgHover: "#D1E9FF",
|
|
90
|
-
colorInfoBorder: "#B2DDFF",
|
|
91
|
-
colorInfoBorderHover: "#84CAFF",
|
|
92
|
-
colorInfoHover: "#175CD3",
|
|
93
|
-
colorInfoText: "#175CD3",
|
|
94
|
-
colorInfoActive: "#1849A9",
|
|
95
|
-
colorInfoTextHover: "#1849A9",
|
|
96
|
-
colorInfoTextActive: "#194185",
|
|
97
|
-
colorText: "#101828",
|
|
98
|
-
colorTextSecondary: "#475467",
|
|
99
|
-
colorTextTertiary: "#667085",
|
|
100
|
-
colorTextQuaternary: "#D0D5DD",
|
|
101
|
-
colorBorder: "#D0D5DD",
|
|
102
|
-
colorBorderSecondary: "#EAECF0",
|
|
103
|
-
colorFill: "#D0D5DD",
|
|
104
|
-
colorFillSecondary: "#EAECF0",
|
|
105
|
-
colorFillTertiary: "#F2F4F7",
|
|
106
|
-
colorFillQuaternary: "#F9FAFB",
|
|
107
|
-
colorBgLayout: "#F2F4F7",
|
|
108
|
-
colorBgSpotlight: "#101828",
|
|
109
|
-
colorBgMask: "rgba(0, 0, 0, 0.5)"
|
|
111
|
+
"token": {
|
|
112
|
+
"colorPrimary": "#7F56D9",
|
|
113
|
+
"colorPrimaryBg": "#F9F5FF",
|
|
114
|
+
"colorPrimaryBgHover": "#F4EBFF",
|
|
115
|
+
"colorPrimaryBorder": "#E9D7FE",
|
|
116
|
+
"colorPrimaryBorderHover": "#D6BBFB",
|
|
117
|
+
"colorPrimaryHover": "#6941C6",
|
|
118
|
+
"colorPrimaryActive": "#53389E",
|
|
119
|
+
"colorPrimaryTextHover": "#53389E",
|
|
120
|
+
"colorPrimaryText": "#6941C6",
|
|
121
|
+
"colorPrimaryTextActive": "#42307D",
|
|
122
|
+
"colorSuccess": "#079455",
|
|
123
|
+
"colorSuccessBg": "#ECFDF3",
|
|
124
|
+
"colorSuccessBgHover": "#DCFAE6",
|
|
125
|
+
"colorSuccessBorder": "#ABEFC6",
|
|
126
|
+
"colorSuccessBorderHover": "#75E0A7",
|
|
127
|
+
"colorSuccessHover": "#067647",
|
|
128
|
+
"colorSuccessText": "#067647",
|
|
129
|
+
"colorSuccessActive": "#085D3A",
|
|
130
|
+
"colorSuccessTextHover": "#085D3A",
|
|
131
|
+
"colorSuccessTextActive": "#074D31",
|
|
132
|
+
"colorWarning": "#dc6803",
|
|
133
|
+
"colorWarningBg": "#FFFAEB",
|
|
134
|
+
"colorWarningBgHover": "#FEF0C7",
|
|
135
|
+
"colorWarningBorder": "#FEDF89",
|
|
136
|
+
"colorWarningBorderHover": "#FEC84B",
|
|
137
|
+
"colorWarningHover": "#B54708",
|
|
138
|
+
"colorWarningText": "#B54708",
|
|
139
|
+
"colorWarningActive": "#93370D",
|
|
140
|
+
"colorWarningTextHover": "#93370D",
|
|
141
|
+
"colorWarningTextActive": "#7A2E0E",
|
|
142
|
+
"colorError": "#d92d20",
|
|
143
|
+
"colorErrorBg": "#FEF3F2",
|
|
144
|
+
"colorErrorBgHover": "#FEE4E2",
|
|
145
|
+
"colorErrorBorder": "#FECDCA",
|
|
146
|
+
"colorErrorBorderHover": "#FDA29B",
|
|
147
|
+
"colorErrorHover": "#B42318",
|
|
148
|
+
"colorErrorText": "#B42318",
|
|
149
|
+
"colorErrorActive": "#912018",
|
|
150
|
+
"colorErrorTextHover": "#912018",
|
|
151
|
+
"colorErrorTextActive": "#7A271A",
|
|
152
|
+
"colorInfo": "#1570ef",
|
|
153
|
+
"colorInfoBg": "#EFF8FF",
|
|
154
|
+
"colorInfoBgHover": "#D1E9FF",
|
|
155
|
+
"colorInfoBorder": "#B2DDFF",
|
|
156
|
+
"colorInfoBorderHover": "#84CAFF",
|
|
157
|
+
"colorInfoHover": "#175CD3",
|
|
158
|
+
"colorInfoText": "#175CD3",
|
|
159
|
+
"colorInfoActive": "#1849A9",
|
|
160
|
+
"colorInfoTextHover": "#1849A9",
|
|
161
|
+
"colorInfoTextActive": "#194185",
|
|
162
|
+
"colorText": "#101828",
|
|
163
|
+
"colorTextSecondary": "#475467",
|
|
164
|
+
"colorTextTertiary": "#667085",
|
|
165
|
+
"colorTextQuaternary": "#D0D5DD",
|
|
166
|
+
"colorBorder": "#D0D5DD",
|
|
167
|
+
"colorBorderSecondary": "#EAECF0",
|
|
168
|
+
"colorFill": "#D0D5DD",
|
|
169
|
+
"colorFillSecondary": "#EAECF0",
|
|
170
|
+
"colorFillTertiary": "#F2F4F7",
|
|
171
|
+
"colorFillQuaternary": "#F9FAFB",
|
|
172
|
+
"colorBgLayout": "#F2F4F7",
|
|
173
|
+
"colorBgSpotlight": "#101828",
|
|
174
|
+
"colorBgMask": "rgba(0, 0, 0, 0.5)",
|
|
175
|
+
"wireframe": false,
|
|
176
|
+
"borderRadius": 8
|
|
110
177
|
}
|
|
111
178
|
};
|
|
179
|
+
var _a;
|
|
180
|
+
var datePickerTheme = (0, import_date_picker.createTheme)({
|
|
181
|
+
palette: {
|
|
182
|
+
primary: { main: ((_a = theme.token) == null ? void 0 : _a.colorPrimary) || "#7F56D9" }
|
|
183
|
+
}
|
|
184
|
+
});
|
|
112
185
|
var Page = (props) => {
|
|
186
|
+
const { children, ...others } = props;
|
|
113
187
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
114
188
|
import_config_provider.default,
|
|
115
189
|
{
|
|
116
|
-
...
|
|
190
|
+
...others,
|
|
117
191
|
prefixCls: props.prefixCls || "pisell-lowcode",
|
|
118
192
|
theme: props.theme || theme
|
|
119
|
-
}
|
|
193
|
+
},
|
|
194
|
+
/* @__PURE__ */ import_react.default.createElement(import_date_picker.LocalizationProvider, { dateAdapter: import_AdapterDayjs.AdapterDayjs }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, children))
|
|
120
195
|
);
|
|
121
196
|
};
|
|
122
197
|
var page_default = Page;
|
|
@@ -37,11 +37,11 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_fields = require("../../../Table/fields");
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
39
|
var FilterItem = (props) => {
|
|
40
|
-
const { label, type, name } = props;
|
|
40
|
+
const { label, type, name, other } = props;
|
|
41
41
|
const Com = (0, import_react.useMemo)(() => {
|
|
42
42
|
var _a;
|
|
43
43
|
return (_a = import_fields.fieldMaps[type]) == null ? void 0 : _a.edit;
|
|
44
44
|
}, [type]);
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label, name }, /* @__PURE__ */ import_react.default.createElement(Com,
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label, name }, /* @__PURE__ */ import_react.default.createElement(Com, { ...other }));
|
|
46
46
|
};
|
|
47
47
|
var FilterItem_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;
|
|
@@ -35,7 +35,52 @@ module.exports = __toCommonJS(Sort_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_icon = require("@pisell/icon");
|
|
38
|
-
var
|
|
39
|
-
|
|
38
|
+
var sortChildrenMap = {
|
|
39
|
+
date: (key) => [
|
|
40
|
+
{
|
|
41
|
+
key: `${key}:desc`,
|
|
42
|
+
label: "Oldest to newest"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: `${key}:asc`,
|
|
46
|
+
label: "Newest to oldest"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
string: (key) => [
|
|
50
|
+
{
|
|
51
|
+
key: `${key}:asc`,
|
|
52
|
+
label: "A to Z"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: `${key}:desc`,
|
|
56
|
+
label: "Z to A"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
number: (key) => [
|
|
60
|
+
{
|
|
61
|
+
key: `${key}:asc`,
|
|
62
|
+
label: "Lowest to highest"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: `${key}:desc`,
|
|
66
|
+
label: "Highest to lowest"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
};
|
|
70
|
+
var Sort = ({ list = [], onChange }) => {
|
|
71
|
+
const sortItems = (0, import_react.useMemo)(() => {
|
|
72
|
+
return list.map((d) => {
|
|
73
|
+
return {
|
|
74
|
+
key: d.name,
|
|
75
|
+
label: d.label,
|
|
76
|
+
children: sortChildrenMap[d.type](d.name)
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
}, [list]);
|
|
80
|
+
const onClick = (detail) => {
|
|
81
|
+
var _a;
|
|
82
|
+
onChange == null ? void 0 : onChange((_a = detail == null ? void 0 : detail.keyPath) == null ? void 0 : _a[0]);
|
|
83
|
+
};
|
|
84
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: sortItems, onClick } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { icon: /* @__PURE__ */ import_react.default.createElement(import_icon.SwitchVertical01, null) }, "Sort"));
|
|
40
85
|
};
|
|
41
86
|
var Sort_default = Sort;
|
|
@@ -33,7 +33,7 @@ __export(Actions_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Actions_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_antd = require("antd");
|
|
37
37
|
var import_QuickFilter = __toESM(require("./Filter/QuickFilter"));
|
|
38
38
|
var import_Sort = __toESM(require("./Sort"));
|
|
39
39
|
var import_index = require("./index.less");
|
|
@@ -41,6 +41,6 @@ var Actions = ({ filter, sort }) => {
|
|
|
41
41
|
const showActions = (0, import_react.useMemo)(() => {
|
|
42
42
|
return (filter == null ? void 0 : filter.show) || (sort == null ? void 0 : sort.show);
|
|
43
43
|
}, [filter == null ? void 0 : filter.show, sort == null ? void 0 : sort.show]);
|
|
44
|
-
return showActions ? /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-actions" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "left-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_QuickFilter.default, null)), /* @__PURE__ */ import_react.default.createElement("div", { className: "right-wrap" }, (
|
|
44
|
+
return showActions ? /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-actions" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "left-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_QuickFilter.default, null)), /* @__PURE__ */ import_react.default.createElement("div", { className: "right-wrap" }, (sort == null ? void 0 : sort.show) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "order_by", noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_Sort.default, { list: (sort == null ? void 0 : sort.list) || [] })) : null)) : null;
|
|
45
45
|
};
|
|
46
46
|
var Actions_default = Actions;
|
|
@@ -34,44 +34,50 @@ __export(BasicTable_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(BasicTable_exports);
|
|
35
35
|
var import_antd = require("antd");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_Pagination =
|
|
37
|
+
var import_Pagination = require("../../Pagination");
|
|
38
38
|
var BasicTable = (props) => {
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
(
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
var _a;
|
|
40
|
+
const { dataSource, pagination, value, ...other } = props;
|
|
41
|
+
const form = import_antd.Form.useFormInstance();
|
|
42
|
+
const formPagination = import_antd.Form.useWatch("pagination", form) || {
|
|
43
|
+
page: 1,
|
|
44
|
+
size: 10
|
|
45
|
+
};
|
|
46
|
+
const { showTotal } = pagination;
|
|
47
|
+
const _showTotal = (0, import_react.useCallback)(
|
|
48
|
+
(total2, range) => {
|
|
49
|
+
let _size = formPagination.size;
|
|
50
|
+
return showTotal(total2, range, _size);
|
|
51
|
+
},
|
|
52
|
+
[showTotal, formPagination == null ? void 0 : formPagination.page, formPagination == null ? void 0 : formPagination.size]
|
|
53
|
+
);
|
|
45
54
|
const _dataSource = (0, import_react.useMemo)(() => {
|
|
46
|
-
let
|
|
47
|
-
let
|
|
48
|
-
|
|
55
|
+
let _page = formPagination.page;
|
|
56
|
+
let _size = formPagination.size;
|
|
57
|
+
let list = [];
|
|
58
|
+
let _total = total;
|
|
59
|
+
if (dataSource.length > _size) {
|
|
60
|
+
list = dataSource;
|
|
61
|
+
_total = list.length;
|
|
62
|
+
list = list.slice((_page - 1) * _size, _page * _size);
|
|
63
|
+
} else {
|
|
49
64
|
list = dataSource;
|
|
50
|
-
total2 = list.length;
|
|
51
65
|
}
|
|
52
|
-
list = list.slice((currentPage - 1) * pageSize, currentPage * pageSize);
|
|
53
66
|
return {
|
|
54
67
|
list,
|
|
55
|
-
total:
|
|
68
|
+
total: _total
|
|
56
69
|
};
|
|
57
|
-
}, [dataSource,
|
|
70
|
+
}, [dataSource, formPagination == null ? void 0 : formPagination.page, formPagination == null ? void 0 : formPagination.size]);
|
|
58
71
|
const total = (0, import_react.useMemo)(() => {
|
|
59
72
|
return (pagination == null ? void 0 : pagination.total) || (_dataSource == null ? void 0 : _dataSource.total) || 0;
|
|
60
73
|
}, [dataSource, pagination]);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
setPageSize(pageSize2);
|
|
64
|
-
};
|
|
65
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_antd.Table, { ...other, pagination: false, dataSource: _dataSource == null ? void 0 : _dataSource.list }), total > pageSize ? /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
-
import_Pagination.default,
|
|
74
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_antd.Table, { ...other, pagination: false, dataSource: _dataSource == null ? void 0 : _dataSource.list }), 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(
|
|
75
|
+
import_Pagination.FormPagination,
|
|
67
76
|
{
|
|
68
77
|
...pagination,
|
|
69
|
-
|
|
70
|
-
pageSize,
|
|
71
|
-
onShowSizeChange: onPaginationChange,
|
|
72
|
-
onChange: onPaginationChange,
|
|
78
|
+
showTotal: _showTotal,
|
|
73
79
|
total
|
|
74
80
|
}
|
|
75
|
-
) : null);
|
|
81
|
+
)) : null);
|
|
76
82
|
};
|
|
77
83
|
var BasicTable_default = BasicTable;
|
|
@@ -84,6 +84,18 @@ export declare const fieldMaps: {
|
|
|
84
84
|
sort: () => JSX.Element;
|
|
85
85
|
show: (props: import("./types").FieldPropsType) => JSX.Element;
|
|
86
86
|
};
|
|
87
|
+
search: {
|
|
88
|
+
field: {
|
|
89
|
+
field_icon: string;
|
|
90
|
+
field_name: string;
|
|
91
|
+
field_type: string;
|
|
92
|
+
default_value: string;
|
|
93
|
+
};
|
|
94
|
+
config: () => JSX.Element;
|
|
95
|
+
edit: import("react").ForwardRefExoticComponent<Omit<import("./types").EditPropsType, "ref"> & import("react").RefAttributes<any>>;
|
|
96
|
+
sort: () => JSX.Element;
|
|
97
|
+
show: (props: import("./types").FieldPropsType) => JSX.Element;
|
|
98
|
+
};
|
|
87
99
|
};
|
|
88
100
|
export declare const fieldList: ({
|
|
89
101
|
field_icon: string;
|
|
@@ -120,6 +132,11 @@ export declare const fieldList: ({
|
|
|
120
132
|
field_name: string;
|
|
121
133
|
field_type: string;
|
|
122
134
|
default_value: string;
|
|
135
|
+
} | {
|
|
136
|
+
field_icon: string;
|
|
137
|
+
field_name: string;
|
|
138
|
+
field_type: string;
|
|
139
|
+
default_value: string;
|
|
123
140
|
})[];
|
|
124
141
|
export declare const getFieldByType: (type: string) => {
|
|
125
142
|
field: {
|
|
@@ -218,5 +235,17 @@ declare const _default: {
|
|
|
218
235
|
sort: () => JSX.Element;
|
|
219
236
|
show: (props: import("./types").FieldPropsType) => JSX.Element;
|
|
220
237
|
};
|
|
238
|
+
search: {
|
|
239
|
+
field: {
|
|
240
|
+
field_icon: string;
|
|
241
|
+
field_name: string;
|
|
242
|
+
field_type: string;
|
|
243
|
+
default_value: string;
|
|
244
|
+
};
|
|
245
|
+
config: () => JSX.Element;
|
|
246
|
+
edit: import("react").ForwardRefExoticComponent<Omit<import("./types").EditPropsType, "ref"> & import("react").RefAttributes<any>>;
|
|
247
|
+
sort: () => JSX.Element;
|
|
248
|
+
show: (props: import("./types").FieldPropsType) => JSX.Element;
|
|
249
|
+
};
|
|
221
250
|
};
|
|
222
251
|
export default _default;
|
|
@@ -42,6 +42,7 @@ var import_select = __toESM(require("./select"));
|
|
|
42
42
|
var import_text = __toESM(require("./text"));
|
|
43
43
|
var import_image = __toESM(require("./image"));
|
|
44
44
|
var import_rangePicker = __toESM(require("./rangePicker"));
|
|
45
|
+
var import_search = __toESM(require("./search"));
|
|
45
46
|
var fieldMaps = {
|
|
46
47
|
text: import_text.default,
|
|
47
48
|
link: import_link.default,
|
|
@@ -49,7 +50,8 @@ var fieldMaps = {
|
|
|
49
50
|
date: import_date.default,
|
|
50
51
|
select: import_select.default,
|
|
51
52
|
image: import_image.default,
|
|
52
|
-
rangePicker: import_rangePicker.default
|
|
53
|
+
rangePicker: import_rangePicker.default,
|
|
54
|
+
search: import_search.default
|
|
53
55
|
};
|
|
54
56
|
var fieldList = Object.values(fieldMaps).map((d) => {
|
|
55
57
|
return d.field;
|
|
@@ -64,7 +66,8 @@ var fields_default = {
|
|
|
64
66
|
date: import_date.default,
|
|
65
67
|
select: import_select.default,
|
|
66
68
|
image: import_image.default,
|
|
67
|
-
rangePicker: import_rangePicker.default
|
|
69
|
+
rangePicker: import_rangePicker.default,
|
|
70
|
+
search: import_search.default
|
|
68
71
|
};
|
|
69
72
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
73
|
0 && (module.exports = {
|
|
@@ -38,11 +38,20 @@ var Show = (props) => {
|
|
|
38
38
|
if ((0, import_utils.isString)(record[dataIndex])) {
|
|
39
39
|
return {
|
|
40
40
|
content: record[dataIndex],
|
|
41
|
-
url:
|
|
41
|
+
url: record[dataIndex]
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
return record[dataIndex];
|
|
45
45
|
}, [record, dataIndex]);
|
|
46
|
-
return /* @__PURE__ */ React.createElement(
|
|
46
|
+
return /* @__PURE__ */ React.createElement(
|
|
47
|
+
"a",
|
|
48
|
+
{
|
|
49
|
+
className: "",
|
|
50
|
+
href: field.url,
|
|
51
|
+
target: "_blank",
|
|
52
|
+
onClick: (e) => e.stopPropagation()
|
|
53
|
+
},
|
|
54
|
+
field.content
|
|
55
|
+
);
|
|
47
56
|
};
|
|
48
57
|
var Show_default = Show;
|