@pisell/materials 1.0.484 → 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 +6 -6
- 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 +20 -20
- 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/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +4 -4
- package/es/components/pisellCard/index.d.ts +7 -0
- package/es/components/pisellCard/index.js +32 -6
- package/es/components/pisellCard/index.less +24 -4
- 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 +9 -7
- package/es/components/tabs/index.less +5 -5
- package/es/components/walletCard/index.d.ts +4 -3
- package/es/components/walletCard/index.js +29 -25
- package/es/index.d.ts +1 -1
- package/es/index.js +4 -1
- package/es/locales/en-US.d.ts +4 -0
- package/es/locales/en-US.js +5 -1
- package/es/locales/zh-CN.d.ts +4 -0
- package/es/locales/zh-CN.js +5 -1
- package/es/locales/zh-TW.d.ts +4 -0
- package/es/locales/zh-TW.js +5 -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/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +4 -4
- package/lib/components/pisellCard/index.d.ts +7 -0
- package/lib/components/pisellCard/index.js +28 -8
- package/lib/components/pisellCard/index.less +24 -4
- 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 +8 -5
- package/lib/components/tabs/index.less +5 -5
- package/lib/components/walletCard/index.d.ts +4 -3
- package/lib/components/walletCard/index.js +29 -37
- package/lib/index.d.ts +1 -1
- package/lib/index.js +36 -36
- package/lib/locales/en-US.d.ts +4 -0
- package/lib/locales/en-US.js +5 -1
- package/lib/locales/zh-CN.d.ts +4 -0
- package/lib/locales/zh-CN.js +5 -1
- package/lib/locales/zh-TW.d.ts +4 -0
- package/lib/locales/zh-TW.js +5 -1
- package/lowcode/badge/meta.ts +10 -1
- package/lowcode/badge/snippets.ts +2 -0
- package/lowcode/card/snippets.ts +55 -55
- package/lowcode/pisell-card/meta.ts +63 -27
- package/lowcode/pisell-card/snippets.ts +6 -0
- package/lowcode/wallet-card/meta.ts +51 -40
- package/lowcode/wallet-card/snippets.ts +20 -1
- 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?: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const ColorPicker: React.FC<import("
|
|
2
|
+
declare const ColorPicker: React.FC<import("antd").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -39,18 +39,18 @@ declare const formFieldMap: {
|
|
|
39
39
|
FormItemDateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
40
40
|
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
41
41
|
};
|
|
42
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
42
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
|
|
43
43
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
44
44
|
} & {
|
|
45
45
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
46
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
46
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
47
47
|
JSON: import("react").FC<any>;
|
|
48
48
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
49
49
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
50
50
|
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
51
51
|
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
52
52
|
Phone: import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
53
|
-
}) | (import("react").FC<{}> & {
|
|
53
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
54
54
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
55
55
|
} & {
|
|
56
56
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -61,5 +61,5 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
61
61
|
valueField: string;
|
|
62
62
|
} & {
|
|
63
63
|
dataSource?: any;
|
|
64
|
-
}) => import("react").JSX.Element) | import("react").FC<
|
|
64
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
65
65
|
export { getFieldComponent, formFieldMap };
|
|
@@ -2,6 +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?: boolean;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
padding?: number;
|
|
9
|
+
borderRadius?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
5
12
|
}
|
|
6
13
|
/**
|
|
7
14
|
* Pisell 卡片容器组件
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
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 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
|
+
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
|
+
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import React, { useEffect } from 'react';
|
|
3
8
|
import { Card } from 'antd';
|
|
4
9
|
import classNames from 'classnames';
|
|
5
10
|
import "./index.less";
|
|
@@ -9,9 +14,30 @@ import "./index.less";
|
|
|
9
14
|
* @constructor
|
|
10
15
|
*/
|
|
11
16
|
var PisellCard = function PisellCard(props) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
var _props$borderRadius = props.borderRadius,
|
|
18
|
+
borderRadius = _props$borderRadius === void 0 ? 12 : _props$borderRadius,
|
|
19
|
+
_props$padding = props.padding,
|
|
20
|
+
padding = _props$padding === void 0 ? 16 : _props$padding,
|
|
21
|
+
_props$loading = props.loading,
|
|
22
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
23
|
+
_props$selected = props.selected,
|
|
24
|
+
selected = _props$selected === void 0 ? false : _props$selected,
|
|
25
|
+
_props$bordered = props.bordered,
|
|
26
|
+
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
27
|
+
_props$disabled = props.disabled,
|
|
28
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
29
|
+
style = props.style,
|
|
30
|
+
className = props.className;
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
document.body.id = 'body';
|
|
33
|
+
}, []);
|
|
34
|
+
var cardProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
35
|
+
style: _objectSpread({
|
|
36
|
+
'--card-padding': "".concat(padding, "px"),
|
|
37
|
+
'--card-borderRadius': "".concat(borderRadius, "px")
|
|
38
|
+
}, style),
|
|
39
|
+
className: classNames('pisell-card-wrap', selected && 'pisell-card-wrap-selected', disabled && 'pisell-card-wrap-disabled', className)
|
|
40
|
+
});
|
|
41
|
+
return /*#__PURE__*/React.createElement(Card, cardProps);
|
|
16
42
|
};
|
|
17
43
|
export default PisellCard;
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
.pisell-card-wrap {
|
|
2
|
-
border-radius: 12px;
|
|
2
|
+
border-radius: var(--card-borderRadius, 12px);
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
6
|
+
&.pisell-card-wrap-selected {
|
|
7
|
+
border-width: 2px;
|
|
8
|
+
border-color: var(--theme-color, #7f56d9);
|
|
9
|
+
}
|
|
10
|
+
&.pisell-card-wrap-disabled {
|
|
11
|
+
cursor: not-allowed;
|
|
12
|
+
opacity: 0.4;
|
|
13
|
+
// pointer-events: none;
|
|
14
|
+
|
|
15
|
+
&:hover,
|
|
16
|
+
&:active,
|
|
17
|
+
&.focus {
|
|
18
|
+
background-color: inherit;
|
|
19
|
+
color: inherit;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
3
23
|
.pisell-lowcode-card-body {
|
|
4
|
-
padding: 16px;
|
|
24
|
+
padding: var(--card-padding, 16px);
|
|
5
25
|
}
|
|
6
26
|
&:hover {
|
|
7
|
-
background: var(--Gray-50, #
|
|
27
|
+
background: var(--Gray-50, #f9fafb);
|
|
8
28
|
}
|
|
9
|
-
}
|
|
29
|
+
}
|
|
@@ -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-';
|
|
@@ -124,12 +125,12 @@ var Tabs = /*#__PURE__*/function (_Component) {
|
|
|
124
125
|
}).filter(Boolean);
|
|
125
126
|
}
|
|
126
127
|
items = this.filterHiddenTabs(items);
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
128
|
+
if (type === 'icon-label') {
|
|
129
|
+
otherProps = {
|
|
130
|
+
renderTabBar: this.renderIconLabelTabBar,
|
|
131
|
+
type: 'line'
|
|
132
|
+
};
|
|
133
|
+
}
|
|
133
134
|
if (type === 'line') {
|
|
134
135
|
items = items.map(function (item) {
|
|
135
136
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -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", {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
border-radius: 99px;
|
|
32
32
|
background: #f2f2f7;
|
|
33
33
|
margin-bottom: 6px;
|
|
34
|
-
color: #
|
|
34
|
+
color: #acacac;
|
|
35
35
|
transition: background 200ms ease-in-out, border-color 200ms ease-in-out;
|
|
36
36
|
border: 1px solid #f2f2f7;
|
|
37
37
|
&:hover {
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
line-height: 20px;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
&-tab-bar-item-active
|
|
50
|
-
background: var(--primary-600, #
|
|
49
|
+
&-tab-bar-item-active &-tab-bar-icon-wrap {
|
|
50
|
+
background: var(--primary-600, #7f56d9);
|
|
51
51
|
color: #fff;
|
|
52
52
|
}
|
|
53
|
-
&-tab-bar-item-active
|
|
54
|
-
color: var(--primary-600, #
|
|
53
|
+
&-tab-bar-item-active &-tab-bar-label {
|
|
54
|
+
color: var(--primary-600, #7f56d9);
|
|
55
55
|
font-size: 14px;
|
|
56
56
|
font-style: normal;
|
|
57
57
|
font-weight: 400;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
interface WalletCardProps {
|
|
4
|
-
platform
|
|
4
|
+
platform?: 'pc' | 'h5' | 'ipad';
|
|
5
5
|
mode?: 'dark' | 'light';
|
|
6
6
|
cardStyle?: 'normal' | 'full';
|
|
7
7
|
codeType?: 'one' | 'two';
|
|
@@ -16,13 +16,14 @@ interface WalletCardProps {
|
|
|
16
16
|
points?: boolean;
|
|
17
17
|
balance?: boolean;
|
|
18
18
|
coupon?: boolean;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
isShowVouCher?: boolean;
|
|
20
|
+
isShowDiscountCard?: boolean;
|
|
21
21
|
pointsValue?: number;
|
|
22
22
|
balanceValue?: number;
|
|
23
23
|
couponValue?: number;
|
|
24
24
|
vouCherValue?: number;
|
|
25
25
|
discountCardValue?: number;
|
|
26
|
+
items: [];
|
|
26
27
|
}
|
|
27
28
|
declare const WalletCard: (props: WalletCardProps) => React.JSX.Element;
|
|
28
29
|
export default WalletCard;
|
|
@@ -58,9 +58,12 @@ var WalletCard = function WalletCard(props) {
|
|
|
58
58
|
coupon = _props$coupon === void 0 ? true : _props$coupon,
|
|
59
59
|
_props$vouCher = props.vouCher,
|
|
60
60
|
vouCher = _props$vouCher === void 0 ? true : _props$vouCher,
|
|
61
|
-
_props$
|
|
62
|
-
|
|
63
|
-
platform = props.platform
|
|
61
|
+
_props$isShowDiscount = props.isShowDiscountCard,
|
|
62
|
+
isShowDiscountCard = _props$isShowDiscount === void 0 ? true : _props$isShowDiscount,
|
|
63
|
+
_props$platform = props.platform,
|
|
64
|
+
platform = _props$platform === void 0 ? 'pc' : _props$platform,
|
|
65
|
+
_props$items = props.items,
|
|
66
|
+
items = _props$items === void 0 ? [] : _props$items; // 裁剪形状
|
|
64
67
|
var context = useEngineContext();
|
|
65
68
|
var _useState = useState(false),
|
|
66
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -121,7 +124,7 @@ var WalletCard = function WalletCard(props) {
|
|
|
121
124
|
className: classNames('pisell-wallet-card-header-level'),
|
|
122
125
|
gap: 10,
|
|
123
126
|
align: "center"
|
|
124
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
}, icon && /*#__PURE__*/React.createElement("div", {
|
|
125
128
|
className: "pisell-wallet-card-header-icon"
|
|
126
129
|
}, icon), vipLevel && /*#__PURE__*/React.createElement("p", {
|
|
127
130
|
className: classNames('pisell-wallet-card-header-level-text')
|
|
@@ -129,14 +132,16 @@ var WalletCard = function WalletCard(props) {
|
|
|
129
132
|
className: classNames('pisell-wallet-card-header-right')
|
|
130
133
|
}, showCode && cardStyle === 'normal' && /*#__PURE__*/React.createElement(React.Fragment, null, codeType === 'one' ? /*#__PURE__*/React.createElement(Iconfont, {
|
|
131
134
|
type: "pisell2-Barcode",
|
|
132
|
-
onClick: function onClick() {
|
|
133
|
-
|
|
135
|
+
onClick: function onClick(e) {
|
|
136
|
+
e.stopPropagation();
|
|
137
|
+
setIsModalOpen(true);
|
|
134
138
|
},
|
|
135
139
|
className: classNames('pisell-wallet-card-icon')
|
|
136
140
|
}) : /*#__PURE__*/React.createElement(Iconfont, {
|
|
137
141
|
type: "pisell2-a-qr-code-02",
|
|
138
|
-
onClick: function onClick() {
|
|
139
|
-
|
|
142
|
+
onClick: function onClick(e) {
|
|
143
|
+
e.stopPropagation();
|
|
144
|
+
setIsModalOpen(true);
|
|
140
145
|
},
|
|
141
146
|
className: classNames('pisell-wallet-card-icon')
|
|
142
147
|
})))), /*#__PURE__*/React.createElement(Flex, {
|
|
@@ -146,23 +151,22 @@ var WalletCard = function WalletCard(props) {
|
|
|
146
151
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
147
152
|
className: classNames('pisell-wallet-card-row'),
|
|
148
153
|
justify: "space-around"
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
})))))), showCode && cardStyle === 'full' && /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
}, items.map(function (item, index) {
|
|
155
|
+
console.log('%c [ item ]-187', 'font-size:13px; background:pink; color:#bf2c9f;', item);
|
|
156
|
+
var _item$hidden = item.hidden,
|
|
157
|
+
hidden = _item$hidden === void 0 ? false : _item$hidden,
|
|
158
|
+
_item$key = item.key,
|
|
159
|
+
key = _item$key === void 0 ? '' : _item$key;
|
|
160
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
key: index,
|
|
162
|
+
hidden: hidden
|
|
163
|
+
}, /*#__PURE__*/React.createElement("p", null, " ", getText("walletCard-".concat(key))), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(Amount, {
|
|
164
|
+
className: "pisell-card-amount-item-value",
|
|
165
|
+
useThousandsSeparator: true,
|
|
166
|
+
showCurrencySymbol: true,
|
|
167
|
+
value: pointsValue
|
|
168
|
+
})));
|
|
169
|
+
})))), showCode && cardStyle === 'full' && /*#__PURE__*/React.createElement("div", {
|
|
166
170
|
className: classNames('pisell-wallet-card-showCode')
|
|
167
171
|
}, codeRender()))), /*#__PURE__*/React.createElement(PisellModal, modalProps, /*#__PURE__*/React.createElement(QRCode, {
|
|
168
172
|
size: 200,
|
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";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -151,5 +151,9 @@ declare const _default: {
|
|
|
151
151
|
'pisell-upload-setting-size-error': (maxSize: number) => string;
|
|
152
152
|
'pisell-upload-setting-type-error': (type: string) => string;
|
|
153
153
|
'pisell-upload-count-error': (count: number) => string;
|
|
154
|
+
'walletCard-points': string;
|
|
155
|
+
'walletCard-rechargeable': string;
|
|
156
|
+
'walletCard-voucher': string;
|
|
157
|
+
'walletCard-discount': string;
|
|
154
158
|
};
|
|
155
159
|
export default _default;
|
package/es/locales/en-US.js
CHANGED
|
@@ -195,5 +195,9 @@ export default {
|
|
|
195
195
|
},
|
|
196
196
|
'pisell-upload-count-error': function pisellUploadCountError(count) {
|
|
197
197
|
return "Please upload ".concat(count, " file");
|
|
198
|
-
}
|
|
198
|
+
},
|
|
199
|
+
'walletCard-points': 'Points',
|
|
200
|
+
'walletCard-rechargeable': 'Recharge',
|
|
201
|
+
'walletCard-voucher': 'Voucher',
|
|
202
|
+
'walletCard-discount': 'Discount'
|
|
199
203
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -151,5 +151,9 @@ declare const _default: {
|
|
|
151
151
|
'pisell-upload-setting-size-error': (maxSize: number) => string;
|
|
152
152
|
'pisell-upload-setting-type-error': (type: string) => string;
|
|
153
153
|
'pisell-upload-count-error': (count: number) => string;
|
|
154
|
+
'walletCard-points': string;
|
|
155
|
+
'walletCard-rechargeable': string;
|
|
156
|
+
'walletCard-voucher': string;
|
|
157
|
+
'walletCard-discount': string;
|
|
154
158
|
};
|
|
155
159
|
export default _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -194,5 +194,9 @@ export default {
|
|
|
194
194
|
},
|
|
195
195
|
'pisell-upload-count-error': function pisellUploadCountError(count) {
|
|
196
196
|
return "\u8BF7\u4E0A\u4F20".concat(count, "\u4E2A\u6587\u4EF6");
|
|
197
|
-
}
|
|
197
|
+
},
|
|
198
|
+
'walletCard-points': '积分卡',
|
|
199
|
+
'walletCard-rechargeable': '充值卡',
|
|
200
|
+
'walletCard-voucher': '代金券',
|
|
201
|
+
'walletCard-discount': '折扣卡'
|
|
198
202
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -151,5 +151,9 @@ declare const _default: {
|
|
|
151
151
|
'pisell-upload-setting-size-error': (maxSize: number) => string;
|
|
152
152
|
'pisell-upload-setting-type-error': (type: string) => string;
|
|
153
153
|
'pisell-upload-count-error': (count: number) => string;
|
|
154
|
+
'walletCard-points': string;
|
|
155
|
+
'walletCard-rechargeable': string;
|
|
156
|
+
'walletCard-voucher': string;
|
|
157
|
+
'walletCard-discount': string;
|
|
154
158
|
};
|
|
155
159
|
export default _default;
|