@pisell/materials 1.0.441 → 1.0.443
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 +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- 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 +29 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +31 -22
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/pisellStatisticList/index.less +2 -1
- package/es/components/record-view/index.d.ts +3 -3
- package/es/components/record-view/index.js +20 -16
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/pisellStatisticList/index.less +2 -1
- package/lib/components/record-view/index.d.ts +3 -3
- package/lib/components/record-view/index.js +4 -3
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ 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: "
|
|
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
|
};
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
}
|
|
32
32
|
.pisell-lowcode-statistic-list-item-children-label {
|
|
33
33
|
color: var(--Base-White, #fff);
|
|
34
|
-
font-size:
|
|
34
|
+
font-size: 14px;
|
|
35
35
|
font-weight: 400;
|
|
36
36
|
line-height: 18px; /* 150% */
|
|
37
37
|
margin-right: 4px;
|
|
38
|
+
opacity: 0.7;
|
|
38
39
|
}
|
|
39
40
|
.pisell-lowcode-statistic-list-item-children-value {
|
|
40
41
|
color: var(--Base-White, #fff);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
3
|
export interface RecordViewProps {
|
|
4
4
|
dataSource: any[];
|
|
5
5
|
header?: React.ReactNode;
|
|
@@ -15,7 +15,7 @@ export interface RecordViewProps {
|
|
|
15
15
|
pagination?: object;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
17
|
onRowClick: (item: any) => void;
|
|
18
|
-
paginationType?:
|
|
18
|
+
paginationType?: 'default' | 'scroll';
|
|
19
19
|
listGap?: number;
|
|
20
20
|
loadMoreData?: () => void;
|
|
21
21
|
listHeight?: number;
|
|
@@ -8,15 +8,15 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
8
8
|
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
|
-
import React, { useCallback, useMemo, useState } from
|
|
12
|
-
import { Button, Col, Empty, List, Row, Skeleton, Space } from
|
|
13
|
-
import { getUniqueId } from
|
|
11
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
12
|
+
import { Button, Col, Empty, List, Row, Skeleton, Space } from 'antd';
|
|
13
|
+
import { getUniqueId } from '@pisell/utils';
|
|
14
14
|
import Pagination from "../Pagination";
|
|
15
|
-
import { CloseOutlined } from
|
|
16
|
-
import InfiniteScroll from
|
|
15
|
+
import { CloseOutlined } from '@ant-design/icons';
|
|
16
|
+
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
17
17
|
import { useResponsive } from "../../hooks";
|
|
18
18
|
import "./index.less";
|
|
19
|
-
var prefix =
|
|
19
|
+
var prefix = 'pisell-lowcode-';
|
|
20
20
|
var RecordView = function RecordView(props) {
|
|
21
21
|
var detail = props.detail,
|
|
22
22
|
leftSpan = props.leftSpan,
|
|
@@ -46,19 +46,19 @@ var RecordView = function RecordView(props) {
|
|
|
46
46
|
detailModalShow = _useState2[0],
|
|
47
47
|
setDetailModalShow = _useState2[1];
|
|
48
48
|
var detailModalDisplay = useMemo(function () {
|
|
49
|
-
if (responsive ===
|
|
49
|
+
if (responsive === 'pc') {
|
|
50
50
|
return pcDetailModalDisplay;
|
|
51
|
-
} else if (responsive ===
|
|
51
|
+
} else if (responsive === 'ipad') {
|
|
52
52
|
return padDetailModalDisplay;
|
|
53
|
-
} else if (responsive ===
|
|
53
|
+
} else if (responsive === 'phone') {
|
|
54
54
|
return mobilePadDetailModalDisplay;
|
|
55
55
|
}
|
|
56
56
|
}, [responsive, pcDetailModalDisplay, padDetailModalDisplay, mobilePadDetailModalDisplay]);
|
|
57
57
|
var _footer = useMemo(function () {
|
|
58
|
-
if (!(pagination && paginationType ===
|
|
58
|
+
if (!(pagination && paginationType === 'default') && !footer) {
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, pagination && paginationType ===
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, pagination && paginationType === 'default' && /*#__PURE__*/React.createElement(Pagination, _extends({
|
|
62
62
|
showLessItems: true
|
|
63
63
|
}, pagination)), footer);
|
|
64
64
|
}, [pagination, footer]);
|
|
@@ -96,15 +96,18 @@ var RecordView = function RecordView(props) {
|
|
|
96
96
|
return "scrollableDiv-".concat(getUniqueId());
|
|
97
97
|
}, []);
|
|
98
98
|
var list = useMemo(function () {
|
|
99
|
-
if (paginationType ===
|
|
100
|
-
return /*#__PURE__*/React.createElement("div",
|
|
99
|
+
if (paginationType === 'scroll') {
|
|
100
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: "".concat(prefix, "scroll-left-wrap")
|
|
102
|
+
}, header && /*#__PURE__*/React.createElement("div", {
|
|
101
103
|
className: "".concat(prefix, "scroll-header-wrap")
|
|
102
104
|
}, header), /*#__PURE__*/React.createElement("div", {
|
|
103
105
|
id: scrollListId,
|
|
104
106
|
style: {
|
|
105
107
|
height: listHeight || 400,
|
|
106
|
-
overflow:
|
|
107
|
-
}
|
|
108
|
+
overflow: 'auto'
|
|
109
|
+
},
|
|
110
|
+
className: "".concat(prefix, "scroll-content-wrap")
|
|
108
111
|
}, /*#__PURE__*/React.createElement(InfiniteScroll, {
|
|
109
112
|
dataLength: props.dataSource.length,
|
|
110
113
|
next: loadMoreData,
|
|
@@ -135,7 +138,8 @@ var RecordView = function RecordView(props) {
|
|
|
135
138
|
style: style,
|
|
136
139
|
className: "".concat(prefix, "record-view")
|
|
137
140
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
138
|
-
span: _leftSpan
|
|
141
|
+
span: _leftSpan,
|
|
142
|
+
className: "".concat(prefix, "record-view-left")
|
|
139
143
|
}, list), !detailModalDisplay && /*#__PURE__*/React.createElement(Col, {
|
|
140
144
|
span: rightSpan
|
|
141
145
|
}, detail), detailModalShow && detailModalDisplay && /*#__PURE__*/React.createElement("div", {
|
|
@@ -5,7 +5,7 @@ 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: "
|
|
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
|
};
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
}
|
|
32
32
|
.pisell-lowcode-statistic-list-item-children-label {
|
|
33
33
|
color: var(--Base-White, #fff);
|
|
34
|
-
font-size:
|
|
34
|
+
font-size: 14px;
|
|
35
35
|
font-weight: 400;
|
|
36
36
|
line-height: 18px; /* 150% */
|
|
37
37
|
margin-right: 4px;
|
|
38
|
+
opacity: 0.7;
|
|
38
39
|
}
|
|
39
40
|
.pisell-lowcode-statistic-list-item-children-value {
|
|
40
41
|
color: var(--Base-White, #fff);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
3
|
export interface RecordViewProps {
|
|
4
4
|
dataSource: any[];
|
|
5
5
|
header?: React.ReactNode;
|
|
@@ -15,7 +15,7 @@ export interface RecordViewProps {
|
|
|
15
15
|
pagination?: object;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
17
|
onRowClick: (item: any) => void;
|
|
18
|
-
paginationType?:
|
|
18
|
+
paginationType?: 'default' | 'scroll';
|
|
19
19
|
listGap?: number;
|
|
20
20
|
loadMoreData?: () => void;
|
|
21
21
|
listHeight?: number;
|
|
@@ -126,14 +126,15 @@ var RecordView = (props) => {
|
|
|
126
126
|
}, []);
|
|
127
127
|
const list = (0, import_react.useMemo)(() => {
|
|
128
128
|
if (paginationType === "scroll") {
|
|
129
|
-
return /* @__PURE__ */ import_react.default.createElement("div",
|
|
129
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}scroll-left-wrap` }, header && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}scroll-header-wrap` }, header), /* @__PURE__ */ import_react.default.createElement(
|
|
130
130
|
"div",
|
|
131
131
|
{
|
|
132
132
|
id: scrollListId,
|
|
133
133
|
style: {
|
|
134
134
|
height: listHeight || 400,
|
|
135
135
|
overflow: "auto"
|
|
136
|
-
}
|
|
136
|
+
},
|
|
137
|
+
className: `${prefix}scroll-content-wrap`
|
|
137
138
|
},
|
|
138
139
|
/* @__PURE__ */ import_react.default.createElement(
|
|
139
140
|
import_react_infinite_scroll_component.default,
|
|
@@ -167,7 +168,7 @@ var RecordView = (props) => {
|
|
|
167
168
|
emptyDom
|
|
168
169
|
);
|
|
169
170
|
}, [props, _renderItem, _footer]);
|
|
170
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter, style, className: `${prefix}record-view` }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: _leftSpan }, list), !detailModalDisplay && /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: rightSpan }, detail), detailModalShow && detailModalDisplay && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}detail-modal-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}modal-header` }, /* @__PURE__ */ import_react.default.createElement(
|
|
171
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter, style, className: `${prefix}record-view` }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: _leftSpan, className: `${prefix}record-view-left` }, list), !detailModalDisplay && /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: rightSpan }, detail), detailModalShow && detailModalDisplay && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}detail-modal-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}modal-header` }, /* @__PURE__ */ import_react.default.createElement(
|
|
171
172
|
import_icons.CloseOutlined,
|
|
172
173
|
{
|
|
173
174
|
className: `${prefix}close-icon`,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/table/Actions/component/ExportImport/utils/index.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
formatApiUrl: () => formatApiUrl
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var formatApiUrl = (url) => {
|
|
26
|
+
return url || "/shop/form/data";
|
|
27
|
+
};
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
formatApiUrl
|
|
31
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.443",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
65
65
|
"crypto-js": "^4.2.0",
|
|
66
66
|
"@zxing/library": "0.21.2",
|
|
67
|
+
"@pisell/utils": "1.0.42",
|
|
67
68
|
"@pisell/icon": "0.0.10",
|
|
68
|
-
"@pisell/date-picker": "1.0.111"
|
|
69
|
-
"@pisell/utils": "1.0.42"
|
|
69
|
+
"@pisell/date-picker": "1.0.111"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18.0.0",
|