@pisell/materials 1.0.485 → 1.0.486
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +16 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/es/components/badge/index.d.ts +8 -0
- package/es/components/badge/index.js +44 -0
- package/es/components/badge/index.less +2 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/pisellCard/index.d.ts +7 -5
- package/es/components/pisellCard/index.js +2 -3
- package/es/components/pisellEmpty/index.d.ts +1 -1
- package/es/components/pisellInformationEntry/Input/index.d.ts +0 -1
- package/es/components/pisellInformationEntry/Input/index.js +2 -3
- package/es/components/pisellInformationEntry/index.d.ts +0 -2
- package/es/components/pisellInformationEntry/index.js +2 -5
- package/es/components/pisellWalletPassCard/index.d.ts +1 -1
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/record-view/index.js +5 -4
- package/es/components/tabs/index.js +3 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +4 -1
- package/lib/components/badge/index.d.ts +8 -0
- package/lib/components/badge/index.js +70 -0
- package/lib/components/badge/index.less +2 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/pisellCard/index.d.ts +7 -5
- package/lib/components/pisellCard/index.js +2 -7
- package/lib/components/pisellEmpty/index.d.ts +1 -1
- package/lib/components/pisellInformationEntry/Input/index.d.ts +0 -1
- package/lib/components/pisellInformationEntry/Input/index.js +2 -2
- package/lib/components/pisellInformationEntry/index.d.ts +0 -2
- package/lib/components/pisellInformationEntry/index.js +2 -10
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/record-view/index.js +3 -3
- package/lib/components/tabs/index.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +36 -36
- package/lowcode/badge/meta.ts +10 -1
- package/lowcode/badge/snippets.ts +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BadgeProps as OriginalBadgeprops } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface Badgeprops extends OriginalBadgeprops {
|
|
5
|
+
styleType: 'default' | 'warning';
|
|
6
|
+
}
|
|
7
|
+
declare const Badge: (props: any) => React.JSX.Element;
|
|
8
|
+
export default Badge;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
8
|
+
import React, { useEffect } from 'react';
|
|
9
|
+
import { Badge as OriginalBadge } from 'antd';
|
|
10
|
+
import { withWrap } from "../../utils/hoc";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
|
|
14
|
+
var Badge = withWrap(function (props) {
|
|
15
|
+
var _props$styleType = props.styleType,
|
|
16
|
+
styleType = _props$styleType === void 0 ? '' : _props$styleType,
|
|
17
|
+
_props$color = props.color,
|
|
18
|
+
color = _props$color === void 0 ? '' : _props$color;
|
|
19
|
+
var state = props;
|
|
20
|
+
useEffect(function () {
|
|
21
|
+
document.body.id = 'body';
|
|
22
|
+
}, []);
|
|
23
|
+
var formatColor = function formatColor() {
|
|
24
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
25
|
+
var newColor = color;
|
|
26
|
+
if (styleType === 'default') {
|
|
27
|
+
newColor = '#f6f7f9';
|
|
28
|
+
} else if (styleType === 'warning') {
|
|
29
|
+
newColor = '#D92D20';
|
|
30
|
+
}
|
|
31
|
+
return newColor;
|
|
32
|
+
};
|
|
33
|
+
var BadgeProps = _objectSpread(_objectSpread({}, state), {}, {
|
|
34
|
+
className: 'pisell-badge-wrap',
|
|
35
|
+
color: formatColor(color)
|
|
36
|
+
});
|
|
37
|
+
return /*#__PURE__*/React.createElement(OriginalBadge, _extends({}, BadgeProps, {
|
|
38
|
+
style: {
|
|
39
|
+
borderColor: styleType === 'default' ? '#e7e9ed' : state.color,
|
|
40
|
+
color: styleType === 'default' ? '#344054' : '#fff'
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
43
|
+
});
|
|
44
|
+
export default Badge;
|
|
@@ -16,7 +16,7 @@ interface UseTablePropsProps {
|
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
19
|
-
title: number | boolean |
|
|
19
|
+
title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
20
20
|
pagination: {
|
|
21
21
|
total: number;
|
|
22
22
|
current: number;
|
|
@@ -25,7 +25,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
25
25
|
showSizeChanger: boolean;
|
|
26
26
|
};
|
|
27
27
|
columns: import("./useColumns").Column[];
|
|
28
|
-
subTitle: number | boolean |
|
|
28
|
+
subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
29
29
|
buttons: any[] | null;
|
|
30
30
|
filter: React.JSX.Element | null;
|
|
31
31
|
onRow: (record: any) => any;
|
|
@@ -40,7 +40,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
40
40
|
width: number;
|
|
41
41
|
align: "center" | "left" | "right";
|
|
42
42
|
fixed: false | "left" | "right";
|
|
43
|
-
type: "
|
|
43
|
+
type: "link" | "button";
|
|
44
44
|
items: OperationItem[];
|
|
45
45
|
} | undefined;
|
|
46
46
|
operationContent?: {
|
|
@@ -2,11 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { CardProps } from 'antd';
|
|
3
3
|
import './index.less';
|
|
4
4
|
export interface PisellCardProps extends CardProps {
|
|
5
|
-
bordered
|
|
6
|
-
selected
|
|
7
|
-
loading
|
|
8
|
-
padding
|
|
9
|
-
borderRadius
|
|
5
|
+
bordered?: boolean;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
padding?: number;
|
|
9
|
+
borderRadius?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Pisell 卡片容器组件
|
|
@@ -28,17 +28,16 @@ var PisellCard = function PisellCard(props) {
|
|
|
28
28
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
29
29
|
style = props.style,
|
|
30
30
|
className = props.className;
|
|
31
|
-
console.log('%c [ props ]-30', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
32
31
|
useEffect(function () {
|
|
33
32
|
document.body.id = 'body';
|
|
34
33
|
}, []);
|
|
35
|
-
var cardProps = _objectSpread({
|
|
34
|
+
var cardProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
36
35
|
style: _objectSpread({
|
|
37
36
|
'--card-padding': "".concat(padding, "px"),
|
|
38
37
|
'--card-borderRadius': "".concat(borderRadius, "px")
|
|
39
38
|
}, style),
|
|
40
39
|
className: classNames('pisell-card-wrap', selected && 'pisell-card-wrap-selected', disabled && 'pisell-card-wrap-disabled', className)
|
|
41
|
-
}
|
|
40
|
+
});
|
|
42
41
|
return /*#__PURE__*/React.createElement(Card, cardProps);
|
|
43
42
|
};
|
|
44
43
|
export default PisellCard;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmptyProps } from 'antd';
|
|
3
|
-
import { PisellContextType } from
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export interface PisellEmptyProps extends EmptyProps {
|
|
6
6
|
/** 平台 */
|
|
@@ -3,7 +3,6 @@ import './index.less';
|
|
|
3
3
|
export interface PisellEntryInputProps {
|
|
4
4
|
onChange: (val: string) => void;
|
|
5
5
|
searchDescribe?: React.ReactNode;
|
|
6
|
-
isBlurSearch?: boolean;
|
|
7
6
|
}
|
|
8
7
|
declare const PisellEntryInput: (props: PisellEntryInputProps) => React.JSX.Element;
|
|
9
8
|
export default PisellEntryInput;
|
|
@@ -12,8 +12,7 @@ import "./index.less";
|
|
|
12
12
|
import { getText } from "../../../locales";
|
|
13
13
|
var PisellEntryInput = function PisellEntryInput(props) {
|
|
14
14
|
var _onChange = props.onChange,
|
|
15
|
-
searchDescribe = props.searchDescribe
|
|
16
|
-
isBlurSearch = props.isBlurSearch;
|
|
15
|
+
searchDescribe = props.searchDescribe;
|
|
17
16
|
var _useState = useState(''),
|
|
18
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
18
|
value = _useState2[0],
|
|
@@ -50,7 +49,7 @@ var PisellEntryInput = function PisellEntryInput(props) {
|
|
|
50
49
|
return _onChange(value);
|
|
51
50
|
},
|
|
52
51
|
disabled: !value
|
|
53
|
-
},
|
|
52
|
+
}, getText('pisell-information-entry-input-search'))), /*#__PURE__*/React.createElement("div", {
|
|
54
53
|
className: "pisell-entry-input-describe"
|
|
55
54
|
}, searchDescribe));
|
|
56
55
|
};
|
|
@@ -26,8 +26,6 @@ export interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<H
|
|
|
26
26
|
searchDescribe?: React.ReactNode;
|
|
27
27
|
/** 录入信息值改变 */
|
|
28
28
|
onChange?: (val: string) => void;
|
|
29
|
-
/** 是否支持模糊搜索 在启用了手动录入的前提下 */
|
|
30
|
-
isBlurSearch: boolean;
|
|
31
29
|
}
|
|
32
30
|
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => React.JSX.Element;
|
|
33
31
|
export default PisellInformationEntry;
|
|
@@ -38,9 +38,7 @@ var PisellInformationEntry = function PisellInformationEntry(props) {
|
|
|
38
38
|
_props$entryModes = props.entryModes,
|
|
39
39
|
entryModes = _props$entryModes === void 0 ? [] : _props$entryModes,
|
|
40
40
|
searchDescribe = props.searchDescribe,
|
|
41
|
-
onChange = props.onChange
|
|
42
|
-
_props$isBlurSearch = props.isBlurSearch,
|
|
43
|
-
isBlurSearch = _props$isBlurSearch === void 0 ? false : _props$isBlurSearch;
|
|
41
|
+
onChange = props.onChange;
|
|
44
42
|
var config = usePisellConfig();
|
|
45
43
|
var platform = config.platform;
|
|
46
44
|
var _useState = useState(null),
|
|
@@ -201,8 +199,7 @@ var PisellInformationEntry = function PisellInformationEntry(props) {
|
|
|
201
199
|
}
|
|
202
200
|
}), currentType === 'input' && /*#__PURE__*/React.createElement(Input, {
|
|
203
201
|
onChange: handleChange,
|
|
204
|
-
searchDescribe: searchDescribe
|
|
205
|
-
isBlurSearch: isBlurSearch
|
|
202
|
+
searchDescribe: searchDescribe
|
|
206
203
|
})));
|
|
207
204
|
};
|
|
208
205
|
export default PisellInformationEntry;
|
|
@@ -106,7 +106,7 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
|
|
|
106
106
|
className: "pisell-card-code-wrap"
|
|
107
107
|
}, /*#__PURE__*/React.createElement("div", {
|
|
108
108
|
className: "pisell-card-code"
|
|
109
|
-
}, showCode && /*#__PURE__*/React.createElement("div", null, code), showValidDate && /*#__PURE__*/React.createElement("div", null, getText('pisell-wallet-pass-card-valid-to'),
|
|
109
|
+
}, showCode && /*#__PURE__*/React.createElement("div", null, code), showValidDate && /*#__PURE__*/React.createElement("div", null, getText('pisell-wallet-pass-card-valid-to'), ' ', !!validDate ? validDate : '长期')), showQrCode && /*#__PURE__*/React.createElement("div", {
|
|
110
110
|
className: "pisell-card-qr-code"
|
|
111
111
|
}, /*#__PURE__*/React.createElement(PisellQrcode, {
|
|
112
112
|
value: qrCode,
|
|
@@ -9,11 +9,12 @@ 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 React, { useCallback, useMemo, useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
12
|
-
import { Col,
|
|
12
|
+
import { Col, List, Row, Skeleton, Badge } from 'antd';
|
|
13
13
|
import { getUniqueId } from '@pisell/utils';
|
|
14
14
|
import Pagination from "../Pagination";
|
|
15
15
|
import { CloseOutlined } from '@ant-design/icons';
|
|
16
16
|
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
17
|
+
import PisellEmpty from "./../pisellEmpty";
|
|
17
18
|
import { useResponsive } from "../../hooks";
|
|
18
19
|
import "./index.less";
|
|
19
20
|
var prefix = 'pisell-lowcode-';
|
|
@@ -104,9 +105,9 @@ var RecordView = function RecordView(props, ref) {
|
|
|
104
105
|
if (dataSource.length > 0) {
|
|
105
106
|
return null;
|
|
106
107
|
}
|
|
107
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
108
|
-
description: locale === null || locale === void 0 ? void 0 : locale.emptyText
|
|
109
|
-
image
|
|
108
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PisellEmpty, {
|
|
109
|
+
description: locale === null || locale === void 0 ? void 0 : locale.emptyText
|
|
110
|
+
// image={Empty.PRESENTED_IMAGE_SIMPLE}
|
|
110
111
|
}));
|
|
111
112
|
}, [props.dataSource, locale, emptyButtons]);
|
|
112
113
|
var scrollListId = useMemo(function () {
|
|
@@ -19,8 +19,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
19
19
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
20
|
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); }
|
|
21
21
|
import React, { Component } from 'react';
|
|
22
|
-
import {
|
|
22
|
+
import { Tabs as OriginalTabs } from 'antd';
|
|
23
23
|
import { warning } from "../../utils/warning";
|
|
24
|
+
import Badge from "./../badge";
|
|
24
25
|
import classNames from 'classnames';
|
|
25
26
|
import "./index.less";
|
|
26
27
|
var prefix = 'pisell-lowcode-';
|
|
@@ -138,6 +139,7 @@ var Tabs = /*#__PURE__*/function (_Component) {
|
|
|
138
139
|
margin: '0 9px'
|
|
139
140
|
}
|
|
140
141
|
}, /*#__PURE__*/React.createElement(Badge, {
|
|
142
|
+
styleType: "default",
|
|
141
143
|
count: item.badge,
|
|
142
144
|
offset: [18, 10]
|
|
143
145
|
}, /*#__PURE__*/React.createElement("span", {
|
package/es/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export { Affix } from 'antd';
|
|
|
2
2
|
export { Anchor } from 'antd';
|
|
3
3
|
export { Alert } from 'antd';
|
|
4
4
|
export { Avatar } from 'antd';
|
|
5
|
-
export { Badge } from 'antd';
|
|
6
5
|
export { Breadcrumb } from 'antd';
|
|
7
6
|
export { Card } from 'antd';
|
|
8
7
|
export { Carousel } from 'antd';
|
|
@@ -35,6 +34,7 @@ export { Tag } from 'antd';
|
|
|
35
34
|
export { Timeline } from 'antd';
|
|
36
35
|
export { Tooltip } from 'antd';
|
|
37
36
|
export { version } from 'antd';
|
|
37
|
+
export { default as Badge } from './components/badge';
|
|
38
38
|
export { default as Typography } from './components/typography';
|
|
39
39
|
export { default as ButtonGroupEdit } from './components/buttonGroupEdit';
|
|
40
40
|
export { default as ButtonGroupPreview } from './components/buttonGroupPreview';
|
package/es/index.js
CHANGED
|
@@ -2,7 +2,9 @@ export { Affix } from 'antd';
|
|
|
2
2
|
export { Anchor } from 'antd';
|
|
3
3
|
export { Alert } from 'antd';
|
|
4
4
|
export { Avatar } from 'antd';
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// export { Badge } from 'antd';
|
|
7
|
+
|
|
6
8
|
export { Breadcrumb } from 'antd';
|
|
7
9
|
export { Card } from 'antd';
|
|
8
10
|
|
|
@@ -60,6 +62,7 @@ export { Tag } from 'antd';
|
|
|
60
62
|
export { Timeline } from 'antd';
|
|
61
63
|
export { Tooltip } from 'antd';
|
|
62
64
|
export { version } from 'antd';
|
|
65
|
+
export { default as Badge } from "./components/badge";
|
|
63
66
|
export { default as Typography } from "./components/typography";
|
|
64
67
|
export { default as ButtonGroupEdit } from "./components/buttonGroupEdit";
|
|
65
68
|
export { default as ButtonGroupPreview } from "./components/buttonGroupPreview";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BadgeProps as OriginalBadgeprops } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface Badgeprops extends OriginalBadgeprops {
|
|
5
|
+
styleType: 'default' | 'warning';
|
|
6
|
+
}
|
|
7
|
+
declare const Badge: (props: any) => React.JSX.Element;
|
|
8
|
+
export default Badge;
|
|
@@ -0,0 +1,70 @@
|
|
|
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/badge/index.tsx
|
|
30
|
+
var badge_exports = {};
|
|
31
|
+
__export(badge_exports, {
|
|
32
|
+
default: () => badge_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(badge_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_hoc = require("../../utils/hoc");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var Badge = (0, import_hoc.withWrap)((props) => {
|
|
40
|
+
const { styleType = "", color = "" } = props;
|
|
41
|
+
let state = props;
|
|
42
|
+
(0, import_react.useEffect)(() => {
|
|
43
|
+
document.body.id = "body";
|
|
44
|
+
}, []);
|
|
45
|
+
const formatColor = (color2 = "") => {
|
|
46
|
+
let newColor = color2;
|
|
47
|
+
if (styleType === "default") {
|
|
48
|
+
newColor = "#f6f7f9";
|
|
49
|
+
} else if (styleType === "warning") {
|
|
50
|
+
newColor = "#D92D20";
|
|
51
|
+
}
|
|
52
|
+
return newColor;
|
|
53
|
+
};
|
|
54
|
+
const BadgeProps = {
|
|
55
|
+
...state,
|
|
56
|
+
className: "pisell-badge-wrap",
|
|
57
|
+
color: formatColor(color)
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
60
|
+
import_antd.Badge,
|
|
61
|
+
{
|
|
62
|
+
...BadgeProps,
|
|
63
|
+
style: {
|
|
64
|
+
borderColor: styleType === "default" ? "#e7e9ed" : state.color,
|
|
65
|
+
color: styleType === "default" ? "#344054" : "#fff"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
var badge_default = Badge;
|
|
@@ -16,7 +16,7 @@ interface UseTablePropsProps {
|
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
19
|
-
title: number | boolean |
|
|
19
|
+
title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
20
20
|
pagination: {
|
|
21
21
|
total: number;
|
|
22
22
|
current: number;
|
|
@@ -25,7 +25,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
25
25
|
showSizeChanger: boolean;
|
|
26
26
|
};
|
|
27
27
|
columns: import("./useColumns").Column[];
|
|
28
|
-
subTitle: number | boolean |
|
|
28
|
+
subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
29
29
|
buttons: any[] | null;
|
|
30
30
|
filter: React.JSX.Element | null;
|
|
31
31
|
onRow: (record: any) => any;
|
|
@@ -40,7 +40,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
40
40
|
width: number;
|
|
41
41
|
align: "center" | "left" | "right";
|
|
42
42
|
fixed: false | "left" | "right";
|
|
43
|
-
type: "
|
|
43
|
+
type: "link" | "button";
|
|
44
44
|
items: OperationItem[];
|
|
45
45
|
} | undefined;
|
|
46
46
|
operationContent?: {
|
|
@@ -2,11 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { CardProps } from 'antd';
|
|
3
3
|
import './index.less';
|
|
4
4
|
export interface PisellCardProps extends CardProps {
|
|
5
|
-
bordered
|
|
6
|
-
selected
|
|
7
|
-
loading
|
|
8
|
-
padding
|
|
9
|
-
borderRadius
|
|
5
|
+
bordered?: boolean;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
padding?: number;
|
|
9
|
+
borderRadius?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Pisell 卡片容器组件
|
|
@@ -47,15 +47,11 @@ var PisellCard = (props) => {
|
|
|
47
47
|
style,
|
|
48
48
|
className
|
|
49
49
|
} = props;
|
|
50
|
-
console.log(
|
|
51
|
-
"%c [ props ]-30",
|
|
52
|
-
"font-size:13px; background:pink; color:#bf2c9f;",
|
|
53
|
-
props
|
|
54
|
-
);
|
|
55
50
|
(0, import_react.useEffect)(() => {
|
|
56
51
|
document.body.id = "body";
|
|
57
52
|
}, []);
|
|
58
53
|
const cardProps = {
|
|
54
|
+
...props,
|
|
59
55
|
style: {
|
|
60
56
|
"--card-padding": `${padding}px`,
|
|
61
57
|
"--card-borderRadius": `${borderRadius}px`,
|
|
@@ -66,8 +62,7 @@ var PisellCard = (props) => {
|
|
|
66
62
|
selected && "pisell-card-wrap-selected",
|
|
67
63
|
disabled && "pisell-card-wrap-disabled",
|
|
68
64
|
className
|
|
69
|
-
)
|
|
70
|
-
...props
|
|
65
|
+
)
|
|
71
66
|
};
|
|
72
67
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Card, { ...cardProps });
|
|
73
68
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmptyProps } from 'antd';
|
|
3
|
-
import { PisellContextType } from
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export interface PisellEmptyProps extends EmptyProps {
|
|
6
6
|
/** 平台 */
|
|
@@ -3,7 +3,6 @@ import './index.less';
|
|
|
3
3
|
export interface PisellEntryInputProps {
|
|
4
4
|
onChange: (val: string) => void;
|
|
5
5
|
searchDescribe?: React.ReactNode;
|
|
6
|
-
isBlurSearch?: boolean;
|
|
7
6
|
}
|
|
8
7
|
declare const PisellEntryInput: (props: PisellEntryInputProps) => React.JSX.Element;
|
|
9
8
|
export default PisellEntryInput;
|
|
@@ -39,7 +39,7 @@ var import_iconfont = __toESM(require("../../iconfont"));
|
|
|
39
39
|
var import_index = require("./index.less");
|
|
40
40
|
var import_locales = require("../../../locales");
|
|
41
41
|
var PisellEntryInput = (props) => {
|
|
42
|
-
const { onChange, searchDescribe
|
|
42
|
+
const { onChange, searchDescribe } = props;
|
|
43
43
|
const [value, setValue] = (0, import_react.useState)("");
|
|
44
44
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-line" }, /* @__PURE__ */ import_react.default.createElement(
|
|
45
45
|
import_pisellInput.default,
|
|
@@ -59,6 +59,6 @@ var PisellEntryInput = (props) => {
|
|
|
59
59
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#667085" }, type: "pisell2-search-lg" }),
|
|
60
60
|
allowClear: true
|
|
61
61
|
}
|
|
62
|
-
), /* @__PURE__ */ import_react.default.createElement(import_button.default, { size: "large", onClick: () => onChange(value), disabled: !value },
|
|
62
|
+
), /* @__PURE__ */ import_react.default.createElement(import_button.default, { size: "large", onClick: () => onChange(value), disabled: !value }, (0, import_locales.getText)("pisell-information-entry-input-search"))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-describe" }, searchDescribe));
|
|
63
63
|
};
|
|
64
64
|
var Input_default = PisellEntryInput;
|
|
@@ -26,8 +26,6 @@ export interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<H
|
|
|
26
26
|
searchDescribe?: React.ReactNode;
|
|
27
27
|
/** 录入信息值改变 */
|
|
28
28
|
onChange?: (val: string) => void;
|
|
29
|
-
/** 是否支持模糊搜索 在启用了手动录入的前提下 */
|
|
30
|
-
isBlurSearch: boolean;
|
|
31
29
|
}
|
|
32
30
|
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => React.JSX.Element;
|
|
33
31
|
export default PisellInformationEntry;
|
|
@@ -54,8 +54,7 @@ var PisellInformationEntry = (props) => {
|
|
|
54
54
|
title,
|
|
55
55
|
entryModes = [],
|
|
56
56
|
searchDescribe,
|
|
57
|
-
onChange
|
|
58
|
-
isBlurSearch = false
|
|
57
|
+
onChange
|
|
59
58
|
} = props;
|
|
60
59
|
const config = (0, import_usePisellConfig.default)();
|
|
61
60
|
const { platform } = config;
|
|
@@ -168,13 +167,6 @@ var PisellInformationEntry = (props) => {
|
|
|
168
167
|
},
|
|
169
168
|
item.name || detail.text
|
|
170
169
|
);
|
|
171
|
-
})), /* @__PURE__ */ import_react.default.createElement("div", null, currentType === "scanCode" && /* @__PURE__ */ import_react.default.createElement(import_Scan.default, { onChange: handleChange, onCancel: () => setCurrentType(null) }), currentType === "input" && /* @__PURE__ */ import_react.default.createElement(
|
|
172
|
-
import_Input.default,
|
|
173
|
-
{
|
|
174
|
-
onChange: handleChange,
|
|
175
|
-
searchDescribe,
|
|
176
|
-
isBlurSearch
|
|
177
|
-
}
|
|
178
|
-
)));
|
|
170
|
+
})), /* @__PURE__ */ import_react.default.createElement("div", null, currentType === "scanCode" && /* @__PURE__ */ import_react.default.createElement(import_Scan.default, { onChange: handleChange, onCancel: () => setCurrentType(null) }), currentType === "input" && /* @__PURE__ */ import_react.default.createElement(import_Input.default, { onChange: handleChange, searchDescribe })));
|
|
179
171
|
};
|
|
180
172
|
var pisellInformationEntry_default = PisellInformationEntry;
|
|
@@ -106,7 +106,7 @@ var PisellWalletPassCard = (props) => {
|
|
|
106
106
|
showCurrencySymbol: showBalanceSymbol
|
|
107
107
|
}
|
|
108
108
|
)), showDiscount && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-label" }, (0, import_locales.getText)("pisell-discount-card-title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-value" }, discount, "% ", (0, import_locales.getText)("pisell-discount-card-unit")))),
|
|
109
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code" }, showCode && /* @__PURE__ */ import_react.default.createElement("div", null, code), showValidDate && /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_locales.getText)("pisell-wallet-pass-card-valid-to"), " ", validDate)), showQrCode && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-qr-code" }, /* @__PURE__ */ import_react.default.createElement(import_pisellQrcode.default, { value: qrCode, size: 60 }))),
|
|
109
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code" }, showCode && /* @__PURE__ */ import_react.default.createElement("div", null, code), showValidDate && /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_locales.getText)("pisell-wallet-pass-card-valid-to"), " ", !!validDate ? validDate : "长期")), showQrCode && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-qr-code" }, /* @__PURE__ */ import_react.default.createElement(import_pisellQrcode.default, { value: qrCode, size: 60 }))),
|
|
110
110
|
(disabled || disabledReason) && showDisabledReason && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-warn-message" }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { className: "pisell-card-icon", type: "pisell2-alert-circle" }), /* @__PURE__ */ import_react.default.createElement("span", null, disabledReason))
|
|
111
111
|
);
|
|
112
112
|
};
|
|
@@ -38,6 +38,7 @@ var import_utils = require("@pisell/utils");
|
|
|
38
38
|
var import_Pagination = __toESM(require("../Pagination"));
|
|
39
39
|
var import_icons = require("@ant-design/icons");
|
|
40
40
|
var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
|
|
41
|
+
var import_pisellEmpty = __toESM(require("./../pisellEmpty"));
|
|
41
42
|
var import_hooks = require("../../hooks");
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var prefix = "pisell-lowcode-";
|
|
@@ -130,10 +131,9 @@ var RecordView = (props, ref) => {
|
|
|
130
131
|
return null;
|
|
131
132
|
}
|
|
132
133
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
133
|
-
|
|
134
|
+
import_pisellEmpty.default,
|
|
134
135
|
{
|
|
135
|
-
description: locale == null ? void 0 : locale.emptyText
|
|
136
|
-
image: import_antd.Empty.PRESENTED_IMAGE_SIMPLE
|
|
136
|
+
description: locale == null ? void 0 : locale.emptyText
|
|
137
137
|
}
|
|
138
138
|
));
|
|
139
139
|
}, [props.dataSource, locale, emptyButtons]);
|
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(tabs_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_warning = require("../../utils/warning");
|
|
38
|
+
var import_badge = __toESM(require("./../badge"));
|
|
38
39
|
var import_classnames = __toESM(require("classnames"));
|
|
39
40
|
var import_index = require("./index.less");
|
|
40
41
|
var prefix = "pisell-lowcode-";
|
|
@@ -137,7 +138,7 @@ var Tabs = class extends import_react.Component {
|
|
|
137
138
|
items = items.map((item) => {
|
|
138
139
|
return {
|
|
139
140
|
...item,
|
|
140
|
-
label: /* @__PURE__ */ import_react.default.createElement("div", { style: { margin: "0 9px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
141
|
+
label: /* @__PURE__ */ import_react.default.createElement("div", { style: { margin: "0 9px" } }, /* @__PURE__ */ import_react.default.createElement(import_badge.default, { styleType: "default", count: item.badge, offset: [18, 10] }, /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}tab-bar-label` }, item.label)))
|
|
141
142
|
};
|
|
142
143
|
});
|
|
143
144
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export { Affix } from 'antd';
|
|
|
2
2
|
export { Anchor } from 'antd';
|
|
3
3
|
export { Alert } from 'antd';
|
|
4
4
|
export { Avatar } from 'antd';
|
|
5
|
-
export { Badge } from 'antd';
|
|
6
5
|
export { Breadcrumb } from 'antd';
|
|
7
6
|
export { Card } from 'antd';
|
|
8
7
|
export { Carousel } from 'antd';
|
|
@@ -35,6 +34,7 @@ export { Tag } from 'antd';
|
|
|
35
34
|
export { Timeline } from 'antd';
|
|
36
35
|
export { Tooltip } from 'antd';
|
|
37
36
|
export { version } from 'antd';
|
|
37
|
+
export { default as Badge } from './components/badge';
|
|
38
38
|
export { default as Typography } from './components/typography';
|
|
39
39
|
export { default as ButtonGroupEdit } from './components/buttonGroupEdit';
|
|
40
40
|
export { default as ButtonGroupPreview } from './components/buttonGroupPreview';
|