@pisell/materials 1.0.469 → 1.0.471
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 +5 -5
- 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 +15 -15
- package/es/components/buttonGroupPreview/index.d.ts +3 -4
- package/es/components/buttonGroupPreview/index.js +5 -10
- package/es/components/cardMetricItem/index.d.ts +12 -0
- package/es/components/cardMetricItem/index.js +39 -0
- package/es/components/cardMetricItem/index.less +38 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/{pisellUploadCrop → cropPhoto}/index.js +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.d.ts +1 -4
- package/es/components/dataSourceComponents/fields/index.d.ts +1 -8
- package/es/components/pisellAnchor/index.d.ts +5 -11
- package/es/components/pisellAnchor/index.js +98 -90
- package/es/components/pisellAnchor/index.less +84 -91
- package/es/components/pisellCard/index.js +2 -1
- package/es/components/pisellInformationEntry/Input/index.d.ts +1 -0
- package/es/components/pisellInformationEntry/Input/index.js +3 -2
- package/es/components/pisellInformationEntry/index.d.ts +2 -0
- package/es/components/pisellInformationEntry/index.js +5 -2
- package/es/components/pisellQrcode/index.d.ts +6 -1
- package/es/components/pisellQrcode/index.js +13 -18
- package/es/components/pisellStatisticList/index.d.ts +3 -0
- package/es/components/pisellStatisticList/index.js +17 -5
- package/es/components/pisellWalletPassCard/index.d.ts +2 -2
- package/es/components/pisellWalletPassCard/index.js +20 -9
- package/es/components/pisellWalletPassCard/index.less +6 -0
- package/es/components/record-view/index.d.ts +9 -2
- package/es/components/record-view/index.js +55 -42
- package/es/components/record-view/index.less +18 -0
- package/es/components/section-footers/index.js +2 -1
- package/es/components/section-footers/index.less +5 -0
- package/es/components/walletCard/index.d.ts +26 -0
- package/es/components/{pisellWalletCard → walletCard}/index.js +62 -21
- package/es/index.d.ts +3 -3
- package/es/index.js +3 -3
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/buttonGroupPreview/index.d.ts +3 -4
- package/lib/components/buttonGroupPreview/index.js +6 -8
- package/lib/components/cardMetricItem/index.d.ts +12 -0
- package/lib/components/{pisellStatistic → cardMetricItem}/index.js +39 -10
- package/lib/components/cardMetricItem/index.less +38 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/{pisellUploadCrop → cropPhoto}/index.js +7 -7
- package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.d.ts +1 -4
- package/lib/components/dataSourceComponents/fields/index.d.ts +1 -8
- package/lib/components/pisellAnchor/index.d.ts +5 -11
- package/lib/components/pisellAnchor/index.js +82 -53
- package/lib/components/pisellAnchor/index.less +84 -91
- package/lib/components/pisellCard/index.js +2 -1
- package/lib/components/pisellInformationEntry/Input/index.d.ts +1 -0
- package/lib/components/pisellInformationEntry/Input/index.js +2 -2
- package/lib/components/pisellInformationEntry/index.d.ts +2 -0
- package/lib/components/pisellInformationEntry/index.js +11 -9
- package/lib/components/pisellQrcode/index.d.ts +6 -1
- package/lib/components/pisellQrcode/index.js +11 -4
- package/lib/components/pisellStatisticList/index.d.ts +3 -0
- package/lib/components/pisellStatisticList/index.js +35 -15
- package/lib/components/pisellWalletPassCard/index.d.ts +2 -2
- package/lib/components/pisellWalletPassCard/index.js +13 -8
- package/lib/components/pisellWalletPassCard/index.less +6 -0
- package/lib/components/record-view/index.d.ts +9 -2
- package/lib/components/record-view/index.js +54 -25
- package/lib/components/record-view/index.less +18 -0
- package/lib/components/section-footers/index.js +11 -1
- package/lib/components/section-footers/index.less +5 -0
- package/lib/components/walletCard/index.d.ts +26 -0
- package/lib/components/{pisellWalletCard → walletCard}/index.js +63 -29
- package/lib/index.d.ts +3 -3
- package/lib/index.js +9 -9
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lowcode/{pisell-statistic → card-metric-item}/meta.ts +3 -3
- package/lowcode/{pisell-statistic → card-metric-item}/snippets.ts +2 -2
- package/lowcode/{pisell-upload-crop → crop-photo}/meta.ts +3 -3
- package/lowcode/{pisell-upload-crop → crop-photo}/snippe.ts +2 -2
- package/lowcode/pisell-qrcode/meta.ts +1 -1
- package/lowcode/pisell-qrcode/snippets.ts +3 -2
- package/lowcode/tabs/meta.ts +10 -0
- package/lowcode/{pisell-wallet-card → wallet-card}/meta.ts +4 -4
- package/lowcode/{pisell-wallet-card → wallet-card}/snippets.ts +2 -2
- package/package.json +1 -1
- package/es/components/pisellStatistic/index.d.ts +0 -10
- package/es/components/pisellStatistic/index.js +0 -25
- package/es/components/pisellStatistic/index.less +0 -14
- package/es/components/pisellUploadCrop/index.d.ts +0 -3
- package/es/components/pisellWalletCard/index.d.ts +0 -4
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/es/components/table/Actions/component/ExportImport/utils/index.js +0 -11
- package/lib/components/pisellStatistic/index.d.ts +0 -10
- package/lib/components/pisellStatistic/index.less +0 -14
- package/lib/components/pisellUploadCrop/index.d.ts +0 -3
- package/lib/components/pisellWalletCard/index.d.ts +0 -4
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +0 -31
- /package/es/components/{pisellUploadCrop → cropPhoto}/index.less +0 -0
- /package/es/components/{pisellWalletCard → walletCard}/img/drak.png +0 -0
- /package/es/components/{pisellWalletCard → walletCard}/img/light.png +0 -0
- /package/es/components/{pisellWalletCard → walletCard}/index.less +0 -0
- /package/lib/components/{pisellUploadCrop → cropPhoto}/index.less +0 -0
- /package/lib/components/{pisellWalletCard → walletCard}/img/drak.png +0 -0
- /package/lib/components/{pisellWalletCard → walletCard}/img/light.png +0 -0
- /package/lib/components/{pisellWalletCard → walletCard}/index.less +0 -0
|
@@ -11,26 +11,51 @@ import Iconfont from "./../iconfont";
|
|
|
11
11
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
12
12
|
import Barcode from 'react-barcode';
|
|
13
13
|
import { image } from '@pisell/utils';
|
|
14
|
+
import Amount from "./../pisellText/components/Amount";
|
|
14
15
|
import "./index.less";
|
|
15
16
|
import classNames from 'classnames';
|
|
16
|
-
var
|
|
17
|
-
var PisellWalletCard = function PisellWalletCard(props) {
|
|
17
|
+
var WalletCard = function WalletCard(props) {
|
|
18
18
|
var _context$appHelper;
|
|
19
|
-
var mode = props.mode,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
var _props$mode = props.mode,
|
|
20
|
+
mode = _props$mode === void 0 ? 'dark' : _props$mode,
|
|
21
|
+
_props$cardStyle = props.cardStyle,
|
|
22
|
+
cardStyle = _props$cardStyle === void 0 ? 'normal' : _props$cardStyle,
|
|
23
|
+
_props$codeType = props.codeType,
|
|
24
|
+
codeType = _props$codeType === void 0 ? 'one' : _props$codeType,
|
|
25
|
+
_props$icon = props.icon,
|
|
26
|
+
icon = _props$icon === void 0 ? false : _props$icon,
|
|
27
|
+
_props$vipLevel = props.vipLevel,
|
|
28
|
+
vipLevel = _props$vipLevel === void 0 ? true : _props$vipLevel,
|
|
24
29
|
_props$shopName = props.shopName,
|
|
25
|
-
shopName = _props$shopName === void 0 ? '
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
shopName = _props$shopName === void 0 ? '默认店铺名称' : _props$shopName,
|
|
31
|
+
_props$isShowShopName = props.isShowShopName,
|
|
32
|
+
isShowShopName = _props$isShowShopName === void 0 ? true : _props$isShowShopName,
|
|
33
|
+
_props$pointsValue = props.pointsValue,
|
|
34
|
+
pointsValue = _props$pointsValue === void 0 ? 0 : _props$pointsValue,
|
|
35
|
+
_props$balanceValue = props.balanceValue,
|
|
36
|
+
balanceValue = _props$balanceValue === void 0 ? 0 : _props$balanceValue,
|
|
37
|
+
_props$vouCherValue = props.vouCherValue,
|
|
38
|
+
vouCherValue = _props$vouCherValue === void 0 ? 0 : _props$vouCherValue,
|
|
39
|
+
_props$couponValue = props.couponValue,
|
|
40
|
+
couponValue = _props$couponValue === void 0 ? 0 : _props$couponValue,
|
|
41
|
+
_props$cardNo = props.cardNo,
|
|
42
|
+
cardNo = _props$cardNo === void 0 ? '' : _props$cardNo,
|
|
43
|
+
_props$isShowCardNo = props.isShowCardNo,
|
|
44
|
+
isShowCardNo = _props$isShowCardNo === void 0 ? true : _props$isShowCardNo,
|
|
45
|
+
_props$codeDirection = props.codeDirection,
|
|
46
|
+
codeDirection = _props$codeDirection === void 0 ? 'bottom' : _props$codeDirection,
|
|
47
|
+
_props$showCode = props.showCode,
|
|
48
|
+
showCode = _props$showCode === void 0 ? 'true' : _props$showCode,
|
|
49
|
+
_props$points = props.points,
|
|
50
|
+
points = _props$points === void 0 ? true : _props$points,
|
|
51
|
+
_props$balance = props.balance,
|
|
52
|
+
balance = _props$balance === void 0 ? true : _props$balance,
|
|
53
|
+
_props$coupon = props.coupon,
|
|
54
|
+
coupon = _props$coupon === void 0 ? true : _props$coupon,
|
|
55
|
+
_props$vouCher = props.vouCher,
|
|
56
|
+
vouCher = _props$vouCher === void 0 ? true : _props$vouCher,
|
|
57
|
+
_props$discountCard = props.discountCard,
|
|
58
|
+
discountCard = _props$discountCard === void 0 ? true : _props$discountCard; // 裁剪形状
|
|
34
59
|
var context = useEngineContext();
|
|
35
60
|
var _useState = useState(false),
|
|
36
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -45,12 +70,12 @@ var PisellWalletCard = function PisellWalletCard(props) {
|
|
|
45
70
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
46
71
|
justify: "center"
|
|
47
72
|
}, codeType === 'one' ? /*#__PURE__*/React.createElement(Barcode, {
|
|
48
|
-
value:
|
|
73
|
+
value: cardNo,
|
|
49
74
|
height: 114,
|
|
50
75
|
width: 3
|
|
51
76
|
}) : /*#__PURE__*/React.createElement(QRCode, {
|
|
52
77
|
size: 250,
|
|
53
|
-
value:
|
|
78
|
+
value: cardNo,
|
|
54
79
|
bordered: false
|
|
55
80
|
}));
|
|
56
81
|
};
|
|
@@ -81,7 +106,7 @@ var PisellWalletCard = function PisellWalletCard(props) {
|
|
|
81
106
|
className: "pisell-wallet-card-header-icon"
|
|
82
107
|
}, icon), vipLevel && /*#__PURE__*/React.createElement("p", {
|
|
83
108
|
className: classNames('pisell-wallet-card-header-level-text')
|
|
84
|
-
}, "Level")),
|
|
109
|
+
}, "Level")), isShowShopName && /*#__PURE__*/React.createElement("p", null, shopName), isShowCardNo && /*#__PURE__*/React.createElement("p", null, cardNo)), /*#__PURE__*/React.createElement(Flex, {
|
|
85
110
|
className: classNames('pisell-wallet-card-header-right')
|
|
86
111
|
}, showCode && cardStyle === 'normal' && /*#__PURE__*/React.createElement(React.Fragment, null, codeType === 'one' ? /*#__PURE__*/React.createElement(Iconfont, {
|
|
87
112
|
type: "pisell2-Barcode",
|
|
@@ -102,7 +127,23 @@ var PisellWalletCard = function PisellWalletCard(props) {
|
|
|
102
127
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
103
128
|
className: classNames('pisell-wallet-card-row'),
|
|
104
129
|
justify: "space-around"
|
|
105
|
-
}, points && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Points"), /*#__PURE__*/React.createElement("p", null,
|
|
130
|
+
}, points && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Points"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(Amount, {
|
|
131
|
+
className: "pisell-card-amount-item-value",
|
|
132
|
+
useThousandsSeparator: true,
|
|
133
|
+
value: pointsValue
|
|
134
|
+
}))), balance && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Balance"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(Amount, {
|
|
135
|
+
className: "pisell-card-amount-item-value",
|
|
136
|
+
useThousandsSeparator: true,
|
|
137
|
+
value: balanceValue
|
|
138
|
+
}))), coupon && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Coupon"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(Amount, {
|
|
139
|
+
className: "pisell-card-amount-item-value",
|
|
140
|
+
useThousandsSeparator: true,
|
|
141
|
+
value: couponValue
|
|
142
|
+
}))), vouCher && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "VouCher"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(Amount, {
|
|
143
|
+
className: "pisell-card-amount-item-value",
|
|
144
|
+
useThousandsSeparator: true,
|
|
145
|
+
value: vouCherValue
|
|
146
|
+
})))), /*#__PURE__*/React.createElement(Flex, {
|
|
106
147
|
className: classNames('pisell-wallet-card-row')
|
|
107
148
|
}, discountCard && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Discount card"), /*#__PURE__*/React.createElement("p", null, 0))))), showCode && cardStyle === 'full' && /*#__PURE__*/React.createElement("div", {
|
|
108
149
|
className: classNames('pisell-wallet-card-showCode')
|
|
@@ -117,4 +158,4 @@ var PisellWalletCard = function PisellWalletCard(props) {
|
|
|
117
158
|
footer: null
|
|
118
159
|
}, codeRender()));
|
|
119
160
|
};
|
|
120
|
-
export default
|
|
161
|
+
export default WalletCard;
|
package/es/index.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ export { default as PisellWalletPassCard } from './components/pisellWalletPassCa
|
|
|
105
105
|
export { default as PisellScan } from './components/pisellScan';
|
|
106
106
|
export { default as PisellAlert } from './components/pisellAlert';
|
|
107
107
|
export { default as PisellCard } from './components/pisellCard';
|
|
108
|
-
export { default as
|
|
108
|
+
export { default as CropPhoto } from './components/cropPhoto';
|
|
109
109
|
export { default as PisellQrcode } from './components/pisellQrcode';
|
|
110
110
|
export { default as PisellInformationEntry } from './components/pisellInformationEntry';
|
|
111
111
|
export { default as usePisellConfig } from './components/pisell-config-provider/hooks/usePisellConfig';
|
|
@@ -119,8 +119,8 @@ export { default as PisellAdjustPrice } from './components/pisellAdjustPrice';
|
|
|
119
119
|
export { default as PisellAdjustPriceInputNumber } from './components/pisellAdjustPrice/PisellAdjustPriceInputNumber';
|
|
120
120
|
export { default as ProductCard } from './components/productCard';
|
|
121
121
|
export { default as Collapse } from './components/collapse';
|
|
122
|
-
export { default as
|
|
123
|
-
export { default as
|
|
122
|
+
export { default as CardMetricItem } from './components/cardMetricItem';
|
|
123
|
+
export { default as WalletCard } from './components/walletCard';
|
|
124
124
|
export { default as PisellUpload } from './components/pisellUpload';
|
|
125
125
|
export { ColorPicker } from 'antd';
|
|
126
126
|
export { default as DataSourceForm } from './components/dataSourceComponents/dataSourceForm';
|
package/es/index.js
CHANGED
|
@@ -132,7 +132,7 @@ export { default as PisellWalletPassCard } from "./components/pisellWalletPassCa
|
|
|
132
132
|
export { default as PisellScan } from "./components/pisellScan";
|
|
133
133
|
export { default as PisellAlert } from "./components/pisellAlert";
|
|
134
134
|
export { default as PisellCard } from "./components/pisellCard";
|
|
135
|
-
export { default as
|
|
135
|
+
export { default as CropPhoto } from "./components/cropPhoto";
|
|
136
136
|
export { default as PisellQrcode } from "./components/pisellQrcode";
|
|
137
137
|
export { default as PisellInformationEntry } from "./components/pisellInformationEntry";
|
|
138
138
|
export { default as usePisellConfig } from "./components/pisell-config-provider/hooks/usePisellConfig";
|
|
@@ -146,8 +146,8 @@ export { default as PisellAdjustPrice } from "./components/pisellAdjustPrice";
|
|
|
146
146
|
export { default as PisellAdjustPriceInputNumber } from "./components/pisellAdjustPrice/PisellAdjustPriceInputNumber";
|
|
147
147
|
export { default as ProductCard } from "./components/productCard";
|
|
148
148
|
export { default as Collapse } from "./components/collapse";
|
|
149
|
-
export { default as
|
|
150
|
-
export { default as
|
|
149
|
+
export { default as CardMetricItem } from "./components/cardMetricItem";
|
|
150
|
+
export { default as WalletCard } from "./components/walletCard";
|
|
151
151
|
export { default as PisellUpload } from "./components/pisellUpload";
|
|
152
152
|
export { ColorPicker } from 'antd';
|
|
153
153
|
export { default as DataSourceForm } from "./components/dataSourceComponents/dataSourceForm";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ declare const _default: {
|
|
|
113
113
|
'pisell-input-copy': string;
|
|
114
114
|
'pisell-empty-description-no-data': string;
|
|
115
115
|
'pisell-information-entry-input-search': string;
|
|
116
|
+
'pisell-information-entry-input-confirm': string;
|
|
116
117
|
'pisell-information-entry-scan-exit': string;
|
|
117
118
|
'pisell-wallet-pass-card-detail': string;
|
|
118
119
|
'pisell-wallet-pass-card-redeem': string;
|
package/es/locales/en-US.js
CHANGED
|
@@ -138,6 +138,7 @@ export default {
|
|
|
138
138
|
'pisell-empty-description-no-data': 'No Data',
|
|
139
139
|
// 信息录入组件
|
|
140
140
|
'pisell-information-entry-input-search': 'Search',
|
|
141
|
+
'pisell-information-entry-input-confirm': 'Confirm',
|
|
141
142
|
'pisell-information-entry-scan-exit': 'Exit',
|
|
142
143
|
// 钱包卡片组件
|
|
143
144
|
'pisell-wallet-pass-card-detail': 'Detail',
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ declare const _default: {
|
|
|
113
113
|
'pisell-input-copy': string;
|
|
114
114
|
'pisell-empty-description-no-data': string;
|
|
115
115
|
'pisell-information-entry-input-search': string;
|
|
116
|
+
'pisell-information-entry-input-confirm': string;
|
|
116
117
|
'pisell-information-entry-scan-exit': string;
|
|
117
118
|
'pisell-wallet-pass-card-detail': string;
|
|
118
119
|
'pisell-wallet-pass-card-redeem': string;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -138,6 +138,7 @@ export default {
|
|
|
138
138
|
'pisell-empty-description-no-data': '暂无数据',
|
|
139
139
|
// 信息录入组件
|
|
140
140
|
'pisell-information-entry-input-search': '搜索',
|
|
141
|
+
'pisell-information-entry-input-confirm': '确认',
|
|
141
142
|
'pisell-information-entry-scan-exit': '退出',
|
|
142
143
|
// 钱包卡片组件
|
|
143
144
|
'pisell-wallet-pass-card-detail': '详情',
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ declare const _default: {
|
|
|
113
113
|
'pisell-input-copy': string;
|
|
114
114
|
'pisell-empty-description-no-data': string;
|
|
115
115
|
'pisell-information-entry-input-search': string;
|
|
116
|
+
'pisell-information-entry-input-confirm': string;
|
|
116
117
|
'pisell-information-entry-scan-exit': string;
|
|
117
118
|
'pisell-wallet-pass-card-detail': string;
|
|
118
119
|
'pisell-wallet-pass-card-redeem': string;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -138,6 +138,7 @@ export default {
|
|
|
138
138
|
'pisell-empty-description-no-data': '暫無數據',
|
|
139
139
|
// 信息录入组件
|
|
140
140
|
'pisell-information-entry-input-search': '搜索',
|
|
141
|
+
'pisell-information-entry-input-confirm': '确认',
|
|
141
142
|
'pisell-information-entry-scan-exit': '退出',
|
|
142
143
|
// 钱包卡片组件
|
|
143
144
|
'pisell-wallet-pass-card-detail': '詳情',
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MenuProps, ButtonProps } from 'antd';
|
|
3
3
|
export interface ButtonGroupListItemProps {
|
|
4
|
-
id
|
|
5
|
-
children?: string;
|
|
4
|
+
id?: string;
|
|
6
5
|
isMore?: boolean;
|
|
7
6
|
menuData?: MenuProps['items'];
|
|
8
7
|
buttonProps?: ButtonProps;
|
|
9
|
-
updateButtonProps?: ButtonProps;
|
|
10
8
|
}
|
|
11
9
|
interface ButtonConfigProps {
|
|
12
10
|
[id: string]: ButtonGroupListItemProps;
|
|
@@ -14,7 +12,8 @@ interface ButtonConfigProps {
|
|
|
14
12
|
export declare type ButtonGroupListProps = ButtonGroupListItemProps[][];
|
|
15
13
|
interface ButtonGroupPreviewProps {
|
|
16
14
|
buttonConfig?: ButtonConfigProps;
|
|
17
|
-
buttonGroupList
|
|
15
|
+
buttonGroupList?: ButtonGroupListProps;
|
|
16
|
+
updateButtonProps?: ButtonGroupListItemProps;
|
|
18
17
|
}
|
|
19
18
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupPreviewProps & React.RefAttributes<any>>>;
|
|
20
19
|
export default _default;
|
|
@@ -33,6 +33,7 @@ __export(buttonGroupPreview_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(buttonGroupPreview_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_button = __toESM(require("./../button"));
|
|
36
37
|
var import_antd = require("antd");
|
|
37
38
|
var import_icons = require("@ant-design/icons");
|
|
38
39
|
var updateSourceData = ({
|
|
@@ -62,17 +63,14 @@ var ButtonGroupPreview = (0, import_react.forwardRef)(
|
|
|
62
63
|
isMore = false,
|
|
63
64
|
id = "",
|
|
64
65
|
menuData = [],
|
|
65
|
-
|
|
66
|
-
buttonProps,
|
|
67
|
-
updateButtonProps = {}
|
|
66
|
+
buttonProps
|
|
68
67
|
} = items;
|
|
69
|
-
const btnProps = { ...buttonProps, ...updateButtonProps };
|
|
70
|
-
return isMore ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: menuData } }, /* @__PURE__ */ import_react.default.createElement(
|
|
71
|
-
|
|
68
|
+
const btnProps = { ...buttonProps, ...props.updateButtonProps };
|
|
69
|
+
return isMore ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: menuData } }, /* @__PURE__ */ import_react.default.createElement(import_button.default, null, /* @__PURE__ */ import_react.default.createElement(import_icons.MoreOutlined, null))) : /* @__PURE__ */ import_react.default.createElement(
|
|
70
|
+
import_button.default,
|
|
72
71
|
{
|
|
73
72
|
key: id,
|
|
74
|
-
...btnProps
|
|
75
|
-
children: updateButtonProps.children || children
|
|
73
|
+
...btnProps
|
|
76
74
|
}
|
|
77
75
|
);
|
|
78
76
|
}))));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PisellStatisticProps {
|
|
4
|
+
title: string;
|
|
5
|
+
number: string | number;
|
|
6
|
+
hint?: React.ReactNode;
|
|
7
|
+
tags?: React.ReactNode;
|
|
8
|
+
showCurrencySymbol?: boolean;
|
|
9
|
+
style?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const CardMetricItem: (props: PisellStatisticProps) => React.JSX.Element;
|
|
12
|
+
export default CardMetricItem;
|
|
@@ -26,21 +26,50 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// src/components/
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
32
|
-
default: () =>
|
|
29
|
+
// src/components/cardMetricItem/index.tsx
|
|
30
|
+
var cardMetricItem_exports = {};
|
|
31
|
+
__export(cardMetricItem_exports, {
|
|
32
|
+
default: () => cardMetricItem_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var import_react = require("react");
|
|
34
|
+
module.exports = __toCommonJS(cardMetricItem_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_hooks = require("../../hooks");
|
|
40
|
+
var import_usePisellConfig = __toESM(require("./../pisell-config-provider/hooks/usePisellConfig"));
|
|
38
41
|
var import_index = require("./index.less");
|
|
39
|
-
var
|
|
42
|
+
var CardMetricItem = (props) => {
|
|
40
43
|
(0, import_react.useEffect)(() => {
|
|
41
44
|
document.body.id = "body";
|
|
42
45
|
}, []);
|
|
43
|
-
const {
|
|
44
|
-
|
|
46
|
+
const {
|
|
47
|
+
title = "",
|
|
48
|
+
number,
|
|
49
|
+
hint,
|
|
50
|
+
tags,
|
|
51
|
+
showCurrencySymbol = true,
|
|
52
|
+
style
|
|
53
|
+
} = props;
|
|
54
|
+
const config = (0, import_usePisellConfig.default)();
|
|
55
|
+
const amount = (0, import_react.useMemo)(() => {
|
|
56
|
+
return (0, import_utils.formatAmountWithOptions)(number, (config == null ? void 0 : config.symbol) || "", {
|
|
57
|
+
showCurrencySymbol
|
|
58
|
+
});
|
|
59
|
+
}, [number, showCurrencySymbol]);
|
|
60
|
+
const responsive = (0, import_hooks.useResponsive)();
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: (0, import_classnames.default)(
|
|
65
|
+
"pisell-statistic-wrap",
|
|
66
|
+
responsive === "pc" ? "pc" : "phone"
|
|
67
|
+
),
|
|
68
|
+
style
|
|
69
|
+
},
|
|
70
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-statistic-hint") }, hint),
|
|
71
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-statistic-tags") }, tags),
|
|
72
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Statistic, { title, value: amount })
|
|
73
|
+
);
|
|
45
74
|
};
|
|
46
|
-
var
|
|
75
|
+
var cardMetricItem_default = CardMetricItem;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.pisell-statistic-wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
padding: 24px;
|
|
4
|
+
border: 1px solid var(--Gray-200, #eaecf0);
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
|
|
7
|
+
&.pc {
|
|
8
|
+
width: fit-content;
|
|
9
|
+
min-width: 300px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.phone {
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pisell-statistic-hint {
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: 20px;
|
|
19
|
+
top: 20px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pisell-statistic-tags {
|
|
23
|
+
position: absolute;
|
|
24
|
+
right: 24px;
|
|
25
|
+
bottom: 30px;
|
|
26
|
+
}
|
|
27
|
+
.pisell-lowcode-statistic-content-value {
|
|
28
|
+
color: var(--Gray-900, #101828);
|
|
29
|
+
|
|
30
|
+
/* Display md/Semibold */
|
|
31
|
+
font-family: Inter;
|
|
32
|
+
font-size: 36px;
|
|
33
|
+
font-style: normal;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
line-height: 44px; /* 122.222% */
|
|
36
|
+
letter-spacing: -0.72px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// src/components/
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
32
|
-
default: () =>
|
|
29
|
+
// src/components/cropPhoto/index.tsx
|
|
30
|
+
var cropPhoto_exports = {};
|
|
31
|
+
__export(cropPhoto_exports, {
|
|
32
|
+
default: () => cropPhoto_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(cropPhoto_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_antd_img_crop = __toESM(require("antd-img-crop"));
|
|
38
|
-
var
|
|
38
|
+
var CropPhoto = (props) => {
|
|
39
39
|
const { cropShape } = props;
|
|
40
40
|
const [fileList, setFileList] = (0, import_react.useState)([]);
|
|
41
41
|
const onChange = ({ fileList: newFileList }) => {
|
|
@@ -67,4 +67,4 @@ var pisellUploadCrop = (props) => {
|
|
|
67
67
|
fileList.length < 5 && "+ Upload"
|
|
68
68
|
));
|
|
69
69
|
};
|
|
70
|
-
var
|
|
70
|
+
var cropPhoto_default = CropPhoto;
|
|
@@ -12,12 +12,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
12
12
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
13
13
|
} & {
|
|
14
14
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
15
|
-
}) | (
|
|
16
|
-
options?: any;
|
|
17
|
-
optionSourceType?: string | undefined;
|
|
18
|
-
labelField: string;
|
|
19
|
-
valueField: string;
|
|
20
|
-
} & {
|
|
21
|
-
dataSource?: any;
|
|
22
|
-
}) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
15
|
+
}) | import("react").FC<import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
23
16
|
export { getFieldComponent };
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AnchorProps } from 'antd';
|
|
3
2
|
import './index.less';
|
|
4
|
-
|
|
5
|
-
items
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
interface PisellAnchorProps {
|
|
4
|
+
items?: any[];
|
|
5
|
+
getContainer?: () => HTMLElement | Window;
|
|
6
|
+
className?: string;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
* PisellAnchor锚点组件
|
|
11
|
-
* @param props
|
|
12
|
-
* @constructor
|
|
13
|
-
*/
|
|
14
|
-
declare const PisellAnchor: (props: PisellAnchorProps) => React.JSX.Element;
|
|
8
|
+
declare const PisellAnchor: React.FC<PisellAnchorProps>;
|
|
15
9
|
export default PisellAnchor;
|
|
@@ -34,69 +34,98 @@ __export(pisellAnchor_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(pisellAnchor_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
-
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_ahooks = require("ahooks");
|
|
39
37
|
var import_icons = require("@ant-design/icons");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
39
|
var import_index = require("./index.less");
|
|
41
40
|
var PisellAnchor = (props) => {
|
|
42
|
-
const [
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
return "";
|
|
54
|
-
},
|
|
55
|
-
items
|
|
41
|
+
const { items = [], getContainer, className } = props;
|
|
42
|
+
const scrollRef = (0, import_react.useRef)(null);
|
|
43
|
+
const [canScrollLeft, setCanScrollLeft] = (0, import_react.useState)(false);
|
|
44
|
+
const [canScrollRight, setCanScrollRight] = (0, import_react.useState)(false);
|
|
45
|
+
const checkScroll = () => {
|
|
46
|
+
if (scrollRef.current) {
|
|
47
|
+
const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;
|
|
48
|
+
setCanScrollLeft(scrollLeft > 0);
|
|
49
|
+
setCanScrollRight(scrollLeft < scrollWidth - clientWidth);
|
|
50
|
+
}
|
|
56
51
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
(0, import_react.useEffect)(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
document.body.id = "body";
|
|
55
|
+
checkScroll();
|
|
56
|
+
(_a = scrollRef.current) == null ? void 0 : _a.addEventListener("scroll", checkScroll);
|
|
57
|
+
return () => {
|
|
58
|
+
var _a2;
|
|
59
|
+
(_a2 = scrollRef.current) == null ? void 0 : _a2.removeEventListener("scroll", checkScroll);
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
const handleScroll = (direction) => {
|
|
63
|
+
if (scrollRef.current) {
|
|
64
|
+
const scrollAmount = 50;
|
|
65
|
+
const newScrollLeft = scrollRef.current.scrollLeft + (direction === "left" ? -scrollAmount : scrollAmount);
|
|
66
|
+
scrollRef.current.scrollTo({
|
|
67
|
+
left: newScrollLeft,
|
|
68
|
+
behavior: "smooth"
|
|
69
|
+
});
|
|
70
|
+
}
|
|
63
71
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
72
|
+
const smoothScroll = (targetElement) => {
|
|
73
|
+
const offsetTop = 40;
|
|
74
|
+
const startPosition = window.pageYOffset;
|
|
75
|
+
const targetPosition = targetElement.getBoundingClientRect().top + startPosition - offsetTop;
|
|
76
|
+
const distance = targetPosition - startPosition;
|
|
77
|
+
const duration = 800;
|
|
78
|
+
let start = null;
|
|
79
|
+
const animation = (currentTime) => {
|
|
80
|
+
if (start === null)
|
|
81
|
+
start = currentTime;
|
|
82
|
+
const timeElapsed = currentTime - start;
|
|
83
|
+
const progress = Math.min(timeElapsed / duration, 1);
|
|
84
|
+
const ease = progress < 0.5 ? 4 * progress * progress * progress : 1 - Math.pow(-2 * progress + 2, 3) / 2;
|
|
85
|
+
window.scrollTo(0, startPosition + distance * ease);
|
|
86
|
+
if (timeElapsed < duration) {
|
|
87
|
+
requestAnimationFrame(animation);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
requestAnimationFrame(animation);
|
|
66
91
|
};
|
|
67
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-anchor-
|
|
68
|
-
import_antd.
|
|
92
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-anchor-container", className) }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-anchor-scroll", ref: scrollRef }, /* @__PURE__ */ import_react.default.createElement(
|
|
93
|
+
import_antd.Anchor,
|
|
69
94
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
95
|
+
className: "pisell-lowcode-anchor",
|
|
96
|
+
getContainer,
|
|
97
|
+
items,
|
|
98
|
+
direction: "horizontal",
|
|
99
|
+
onClick: (e) => {
|
|
100
|
+
const targetElement = document.querySelector(e.href);
|
|
101
|
+
if (targetElement) {
|
|
102
|
+
smoothScroll(targetElement);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
targetOffset: 40,
|
|
106
|
+
bounds: 40,
|
|
107
|
+
affix: false
|
|
74
108
|
}
|
|
109
|
+
)), (canScrollRight || canScrollLeft) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-anchor-buttons" }, /* @__PURE__ */ import_react.default.createElement(
|
|
110
|
+
import_antd.Button,
|
|
111
|
+
{
|
|
112
|
+
className: (0, import_classnames.default)("scroll-button", {
|
|
113
|
+
disabled: !canScrollLeft
|
|
114
|
+
}),
|
|
115
|
+
onClick: () => handleScroll("left"),
|
|
116
|
+
disabled: !canScrollLeft
|
|
117
|
+
},
|
|
118
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null)
|
|
75
119
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
76
120
|
import_antd.Button,
|
|
77
121
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
onClick: () =>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
id: `${item.key}`,
|
|
88
|
-
className: (0, import_classnames.default)("pisell-anchor-content"),
|
|
89
|
-
style: {
|
|
90
|
-
width: "100vw",
|
|
91
|
-
height: "100vh",
|
|
92
|
-
textAlign: "center",
|
|
93
|
-
background: "rgba(0,255,0,0.02)"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"这是",
|
|
97
|
-
item.title,
|
|
98
|
-
"的内容"
|
|
99
|
-
);
|
|
100
|
-
}));
|
|
122
|
+
className: (0, import_classnames.default)("scroll-button", {
|
|
123
|
+
disabled: !canScrollRight
|
|
124
|
+
}),
|
|
125
|
+
onClick: () => handleScroll("right"),
|
|
126
|
+
disabled: !canScrollRight
|
|
127
|
+
},
|
|
128
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null)
|
|
129
|
+
)));
|
|
101
130
|
};
|
|
102
131
|
var pisellAnchor_default = PisellAnchor;
|