@pisell/materials 1.0.690 → 1.0.691
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 +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/walletCard/Guest/index.d.ts +4 -0
- package/es/components/walletCard/Guest/index.js +82 -0
- package/es/components/walletCard/Guest/index.less +70 -0
- package/es/components/walletCard/index.d.ts +7 -0
- package/es/components/walletCard/index.js +18 -9
- package/lib/components/walletCard/Guest/index.d.ts +4 -0
- package/lib/components/walletCard/Guest/index.js +120 -0
- package/lib/components/walletCard/Guest/index.less +70 -0
- package/lib/components/walletCard/index.d.ts +7 -0
- package/lib/components/walletCard/index.js +52 -17
- package/lowcode/wallet-card/meta.ts +52 -2
- package/lowcode/wallet-card/snippets.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// import { pxToVw } from '@/utils/index';
|
|
2
|
+
// import { useDispatch } from 'umi';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
5
|
+
import Button from "../../button";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
var Guest = function Guest(props) {
|
|
8
|
+
var _setting$titleConfig, _setting$subtitleConf, _setting$buttonConfig;
|
|
9
|
+
var setting = props.setting;
|
|
10
|
+
// const dispatch = useDispatch();
|
|
11
|
+
var context = useEngineContext();
|
|
12
|
+
var _ref = context.appHelper || {},
|
|
13
|
+
utils = _ref.utils;
|
|
14
|
+
console.log(utils, setting, 'wh97896');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @title: 拉起登录
|
|
18
|
+
* @description:
|
|
19
|
+
* @return {*}
|
|
20
|
+
* @Author: WangHan
|
|
21
|
+
* @Date: 2025-03-13 15:34
|
|
22
|
+
*/
|
|
23
|
+
var goLogin = function goLogin() {
|
|
24
|
+
// dispatch({
|
|
25
|
+
// type: 'login/checkLogin',
|
|
26
|
+
// callback: () => {},
|
|
27
|
+
// });
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @title: 样式处理
|
|
32
|
+
* @description:
|
|
33
|
+
* @param {any} config
|
|
34
|
+
* @return {*}
|
|
35
|
+
* @Author: WangHan
|
|
36
|
+
* @Date: 2025-03-13 15:39
|
|
37
|
+
*/
|
|
38
|
+
var getTextStyle = function getTextStyle(config, otherConfig) {
|
|
39
|
+
return {
|
|
40
|
+
color: (config === null || config === void 0 ? void 0 : config.color) || (otherConfig === null || otherConfig === void 0 ? void 0 : otherConfig.color) || '#fff',
|
|
41
|
+
fontSize: config !== null && config !== void 0 && config.size && utils !== null && utils !== void 0 && utils.pxToVw ? utils === null || utils === void 0 ? void 0 : utils.pxToVw(config.size) : (otherConfig === null || otherConfig === void 0 ? void 0 : otherConfig.size) || 14,
|
|
42
|
+
fontWeight: (config === null || config === void 0 ? void 0 : config.weight) || (otherConfig === null || otherConfig === void 0 ? void 0 : otherConfig.weight) || 400,
|
|
43
|
+
fontStyle: (config === null || config === void 0 ? void 0 : config.style) || 'normal'
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "pisell-wallet-guest-wrap",
|
|
48
|
+
style: {
|
|
49
|
+
backgroundColor: setting === null || setting === void 0 ? void 0 : setting.backgroundColor
|
|
50
|
+
}
|
|
51
|
+
}, utils !== null && utils !== void 0 && utils.translation(setting === null || setting === void 0 ? void 0 : setting.backgroundImage) ? /*#__PURE__*/React.createElement("img", {
|
|
52
|
+
className: "pisell-wallet-guest-bg",
|
|
53
|
+
src: utils === null || utils === void 0 ? void 0 : utils.ali(utils === null || utils === void 0 ? void 0 : utils.translation(setting.backgroundImage), 1920),
|
|
54
|
+
alt: utils === null || utils === void 0 ? void 0 : utils.translation(setting === null || setting === void 0 ? void 0 : setting.backgroundImageAlt),
|
|
55
|
+
title: utils === null || utils === void 0 ? void 0 : utils.translation(setting === null || setting === void 0 ? void 0 : setting.backgroundImageAlt)
|
|
56
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: "pisell-wallet-guest-content ".concat(setting.align === 'center' ? 'pisell-wallet-guest-center' : '')
|
|
58
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: "pisell-wallet-guest-title",
|
|
60
|
+
style: getTextStyle(setting === null || setting === void 0 ? void 0 : setting.titleConfig, {
|
|
61
|
+
size: 18,
|
|
62
|
+
weight: 600
|
|
63
|
+
})
|
|
64
|
+
}, utils === null || utils === void 0 ? void 0 : utils.translation((setting === null || setting === void 0 ? void 0 : setting.title) || (setting === null || setting === void 0 || (_setting$titleConfig = setting.titleConfig) === null || _setting$titleConfig === void 0 ? void 0 : _setting$titleConfig.text))), /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: "pisell-wallet-guest-subtitle",
|
|
66
|
+
style: getTextStyle(setting === null || setting === void 0 ? void 0 : setting.subtitleConfig, {
|
|
67
|
+
color: '#D0D5DD'
|
|
68
|
+
})
|
|
69
|
+
}, utils === null || utils === void 0 ? void 0 : utils.translation((setting === null || setting === void 0 ? void 0 : setting.subtitle) || (setting === null || setting === void 0 || (_setting$subtitleConf = setting.subtitleConfig) === null || _setting$subtitleConf === void 0 ? void 0 : _setting$subtitleConf.text)))), /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: "pisell-wallet-guest-button-wrap"
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
72
|
+
style: {
|
|
73
|
+
backgroundColor: (setting === null || setting === void 0 ? void 0 : setting.buttonColor) || '#7F56D9'
|
|
74
|
+
},
|
|
75
|
+
onClick: goLogin
|
|
76
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
style: getTextStyle(setting === null || setting === void 0 ? void 0 : setting.buttonConfig, {
|
|
78
|
+
weight: 600
|
|
79
|
+
})
|
|
80
|
+
}, utils === null || utils === void 0 ? void 0 : utils.translation((setting === null || setting === void 0 ? void 0 : setting.buttonText) || (setting === null || setting === void 0 || (_setting$buttonConfig = setting.buttonConfig) === null || _setting$buttonConfig === void 0 ? void 0 : _setting$buttonConfig.text)))))));
|
|
81
|
+
};
|
|
82
|
+
export default Guest;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
.pisell-wallet-guest-wrap {
|
|
2
|
+
background-repeat: no-repeat;
|
|
3
|
+
background-position: center center;
|
|
4
|
+
background-size: contain;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
position: relative;
|
|
7
|
+
min-height: 136px;
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
.pisell-wallet-guest-bg {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
left: 50%;
|
|
14
|
+
transform: translate(-50%, -50%);
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
object-fit: contain;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-wallet-guest-content {
|
|
21
|
+
position: relative;
|
|
22
|
+
text-align: left;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
flex: 1;
|
|
27
|
+
width: 100%;
|
|
28
|
+
|
|
29
|
+
&.pisell-wallet-guest-center {
|
|
30
|
+
text-align: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.pisell-wallet-guest-title {
|
|
35
|
+
line-height: 28px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.pisell-wallet-guest-subtitle {
|
|
39
|
+
line-height: 20px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pisell-wallet-guest-button-wrap {
|
|
43
|
+
display: flex;
|
|
44
|
+
width: fit-content;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pisell-lowcode-btn-default {
|
|
49
|
+
margin-top: 8px;
|
|
50
|
+
display: flex;
|
|
51
|
+
padding: 10px 16px;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background: transparent;
|
|
55
|
+
border-color: transparent;
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
border: 1px solid var(--Primary-600, #7f56d9);
|
|
58
|
+
background: var(--Primary-600, #7f56d9);
|
|
59
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
width: auto;
|
|
62
|
+
> div {
|
|
63
|
+
max-width: 100%;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -53,6 +53,13 @@ export interface WalletCardProps {
|
|
|
53
53
|
items: WalletCardItem[];
|
|
54
54
|
/** 自定义样式 */
|
|
55
55
|
style?: React.CSSProperties;
|
|
56
|
+
title?: string;
|
|
57
|
+
subTitle?: string;
|
|
58
|
+
align?: 'left' | 'center';
|
|
59
|
+
buttonText?: string;
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
/** 是否已登录 */
|
|
62
|
+
isLogin?: boolean;
|
|
56
63
|
}
|
|
57
64
|
declare const WalletCard: React.FC<WalletCardProps>;
|
|
58
65
|
export default WalletCard;
|
|
@@ -10,14 +10,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useState, useMemo } from 'react';
|
|
14
13
|
import { Card, QRCode } from 'antd';
|
|
15
|
-
import Iconfont from "./../iconfont";
|
|
16
|
-
import Barcode from 'react-barcode';
|
|
17
|
-
import Amount from "./../pisellText/components/Amount";
|
|
18
|
-
import PisellModal from "./../pisellModal";
|
|
19
14
|
import classNames from 'classnames';
|
|
15
|
+
import React, { useMemo, useState } from 'react';
|
|
16
|
+
import Barcode from 'react-barcode';
|
|
20
17
|
import { getText } from "../../locales/index";
|
|
18
|
+
import Iconfont from "./../iconfont";
|
|
19
|
+
import PisellModal from "./../pisellModal";
|
|
20
|
+
import Amount from "./../pisellText/components/Amount";
|
|
21
|
+
import Guest from "./Guest";
|
|
21
22
|
import "./index.less";
|
|
22
23
|
|
|
23
24
|
// 添加JSX类型声明
|
|
@@ -57,7 +58,8 @@ var DEFAULT_PROPS = {
|
|
|
57
58
|
key: 'discount',
|
|
58
59
|
label: 'discount',
|
|
59
60
|
value: 0
|
|
60
|
-
}]
|
|
61
|
+
}],
|
|
62
|
+
isLogin: false
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
// 自定义钩子:处理二维码/条形码模态框
|
|
@@ -108,7 +110,9 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
108
110
|
cardStyle = _ref$cardStyle === void 0 ? 'normal' : _ref$cardStyle,
|
|
109
111
|
_ref$codeType = _ref.codeType,
|
|
110
112
|
codeType = _ref$codeType === void 0 ? 'barCode' : _ref$codeType,
|
|
111
|
-
onCodeClick = _ref.onCodeClick
|
|
113
|
+
onCodeClick = _ref.onCodeClick,
|
|
114
|
+
_ref$isLogin = _ref.isLogin,
|
|
115
|
+
isLogin = _ref$isLogin === void 0 ? false : _ref$isLogin;
|
|
112
116
|
return /*#__PURE__*/React.createElement("div", {
|
|
113
117
|
className: "pisell-wallet-card-header"
|
|
114
118
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -264,7 +268,9 @@ var WalletCard = function WalletCard(props) {
|
|
|
264
268
|
onCodeClick = _DEFAULT_PROPS$props.onCodeClick,
|
|
265
269
|
onClick = _DEFAULT_PROPS$props.onClick,
|
|
266
270
|
className = _DEFAULT_PROPS$props.className,
|
|
267
|
-
style = _DEFAULT_PROPS$props.style
|
|
271
|
+
style = _DEFAULT_PROPS$props.style,
|
|
272
|
+
_DEFAULT_PROPS$props$2 = _DEFAULT_PROPS$props.isLogin,
|
|
273
|
+
isLogin = _DEFAULT_PROPS$props$2 === void 0 ? false : _DEFAULT_PROPS$props$2;
|
|
268
274
|
|
|
269
275
|
// 使用自定义钩子处理模态框逻辑
|
|
270
276
|
var _useCodeModal = useCodeModal(cardNo, onCodeClick),
|
|
@@ -284,6 +290,7 @@ var WalletCard = function WalletCard(props) {
|
|
|
284
290
|
};
|
|
285
291
|
}
|
|
286
292
|
}, [props.customBackgroundImage, mode]);
|
|
293
|
+
console.log(isLogin, 'wh987976');
|
|
287
294
|
return /*#__PURE__*/React.createElement("div", {
|
|
288
295
|
className: classNames('pisell-wallet-card-wrapper', className),
|
|
289
296
|
style: style,
|
|
@@ -300,7 +307,7 @@ var WalletCard = function WalletCard(props) {
|
|
|
300
307
|
}, /*#__PURE__*/React.createElement("div", {
|
|
301
308
|
className: classNames('pisell-wallet-card-content', mode),
|
|
302
309
|
style: backgroundStyle
|
|
303
|
-
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
310
|
+
}, isLogin ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, {
|
|
304
311
|
showWalletName: showWalletName,
|
|
305
312
|
showIcon: showIcon,
|
|
306
313
|
iconImg: iconImg,
|
|
@@ -316,6 +323,8 @@ var WalletCard = function WalletCard(props) {
|
|
|
316
323
|
}), /*#__PURE__*/React.createElement(CardContent, {
|
|
317
324
|
items: items,
|
|
318
325
|
symbol: symbol
|
|
326
|
+
})) : /*#__PURE__*/React.createElement(Guest, {
|
|
327
|
+
setting: props
|
|
319
328
|
})), cardStyle === 'full' && /*#__PURE__*/React.createElement("div", {
|
|
320
329
|
className: classNames('pisell-wallet-card-showCode', codeDirection === 'top' ? 'code-top' : 'code-bottom')
|
|
321
330
|
}, /*#__PURE__*/React.createElement(CodeDisplay, {
|
|
@@ -0,0 +1,120 @@
|
|
|
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/walletCard/Guest/index.tsx
|
|
30
|
+
var Guest_exports = {};
|
|
31
|
+
__export(Guest_exports, {
|
|
32
|
+
default: () => Guest_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Guest_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
37
|
+
var import_button = __toESM(require("../../button"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var Guest = (props) => {
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
const { setting } = props;
|
|
42
|
+
const context = (0, import_useEngineContext.default)();
|
|
43
|
+
const { utils } = context.appHelper || {};
|
|
44
|
+
console.log(utils, setting, "wh97896");
|
|
45
|
+
const goLogin = () => {
|
|
46
|
+
};
|
|
47
|
+
const getTextStyle = (config, otherConfig) => ({
|
|
48
|
+
color: (config == null ? void 0 : config.color) || (otherConfig == null ? void 0 : otherConfig.color) || "#fff",
|
|
49
|
+
fontSize: (config == null ? void 0 : config.size) && (utils == null ? void 0 : utils.pxToVw) ? utils == null ? void 0 : utils.pxToVw(config.size) : (otherConfig == null ? void 0 : otherConfig.size) || 14,
|
|
50
|
+
fontWeight: (config == null ? void 0 : config.weight) || (otherConfig == null ? void 0 : otherConfig.weight) || 400,
|
|
51
|
+
fontStyle: (config == null ? void 0 : config.style) || "normal"
|
|
52
|
+
});
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: "pisell-wallet-guest-wrap",
|
|
57
|
+
style: {
|
|
58
|
+
backgroundColor: setting == null ? void 0 : setting.backgroundColor
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
(utils == null ? void 0 : utils.translation(setting == null ? void 0 : setting.backgroundImage)) ? /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
"img",
|
|
63
|
+
{
|
|
64
|
+
className: "pisell-wallet-guest-bg",
|
|
65
|
+
src: utils == null ? void 0 : utils.ali(utils == null ? void 0 : utils.translation(setting.backgroundImage), 1920),
|
|
66
|
+
alt: utils == null ? void 0 : utils.translation(setting == null ? void 0 : setting.backgroundImageAlt),
|
|
67
|
+
title: utils == null ? void 0 : utils.translation(setting == null ? void 0 : setting.backgroundImageAlt)
|
|
68
|
+
}
|
|
69
|
+
) : null,
|
|
70
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: `pisell-wallet-guest-content ${setting.align === "center" ? "pisell-wallet-guest-center" : ""}`
|
|
74
|
+
},
|
|
75
|
+
/* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: "pisell-wallet-guest-title",
|
|
79
|
+
style: getTextStyle(setting == null ? void 0 : setting.titleConfig, {
|
|
80
|
+
size: 18,
|
|
81
|
+
weight: 600
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
utils == null ? void 0 : utils.translation((setting == null ? void 0 : setting.title) || ((_a = setting == null ? void 0 : setting.titleConfig) == null ? void 0 : _a.text))
|
|
85
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
className: "pisell-wallet-guest-subtitle",
|
|
89
|
+
style: getTextStyle(setting == null ? void 0 : setting.subtitleConfig, {
|
|
90
|
+
color: "#D0D5DD"
|
|
91
|
+
})
|
|
92
|
+
},
|
|
93
|
+
utils == null ? void 0 : utils.translation(
|
|
94
|
+
(setting == null ? void 0 : setting.subtitle) || ((_b = setting == null ? void 0 : setting.subtitleConfig) == null ? void 0 : _b.text)
|
|
95
|
+
)
|
|
96
|
+
)),
|
|
97
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-guest-button-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
98
|
+
import_button.default,
|
|
99
|
+
{
|
|
100
|
+
style: {
|
|
101
|
+
backgroundColor: (setting == null ? void 0 : setting.buttonColor) || "#7F56D9"
|
|
102
|
+
},
|
|
103
|
+
onClick: goLogin
|
|
104
|
+
},
|
|
105
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
style: getTextStyle(setting == null ? void 0 : setting.buttonConfig, {
|
|
109
|
+
weight: 600
|
|
110
|
+
})
|
|
111
|
+
},
|
|
112
|
+
utils == null ? void 0 : utils.translation(
|
|
113
|
+
(setting == null ? void 0 : setting.buttonText) || ((_c = setting == null ? void 0 : setting.buttonConfig) == null ? void 0 : _c.text)
|
|
114
|
+
)
|
|
115
|
+
)
|
|
116
|
+
))
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
var Guest_default = Guest;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
.pisell-wallet-guest-wrap {
|
|
2
|
+
background-repeat: no-repeat;
|
|
3
|
+
background-position: center center;
|
|
4
|
+
background-size: contain;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
position: relative;
|
|
7
|
+
min-height: 136px;
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
.pisell-wallet-guest-bg {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
left: 50%;
|
|
14
|
+
transform: translate(-50%, -50%);
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
object-fit: contain;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-wallet-guest-content {
|
|
21
|
+
position: relative;
|
|
22
|
+
text-align: left;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
flex: 1;
|
|
27
|
+
width: 100%;
|
|
28
|
+
|
|
29
|
+
&.pisell-wallet-guest-center {
|
|
30
|
+
text-align: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.pisell-wallet-guest-title {
|
|
35
|
+
line-height: 28px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.pisell-wallet-guest-subtitle {
|
|
39
|
+
line-height: 20px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pisell-wallet-guest-button-wrap {
|
|
43
|
+
display: flex;
|
|
44
|
+
width: fit-content;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pisell-lowcode-btn-default {
|
|
49
|
+
margin-top: 8px;
|
|
50
|
+
display: flex;
|
|
51
|
+
padding: 10px 16px;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background: transparent;
|
|
55
|
+
border-color: transparent;
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
border: 1px solid var(--Primary-600, #7f56d9);
|
|
58
|
+
background: var(--Primary-600, #7f56d9);
|
|
59
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
width: auto;
|
|
62
|
+
> div {
|
|
63
|
+
max-width: 100%;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -53,6 +53,13 @@ export interface WalletCardProps {
|
|
|
53
53
|
items: WalletCardItem[];
|
|
54
54
|
/** 自定义样式 */
|
|
55
55
|
style?: React.CSSProperties;
|
|
56
|
+
title?: string;
|
|
57
|
+
subTitle?: string;
|
|
58
|
+
align?: 'left' | 'center';
|
|
59
|
+
buttonText?: string;
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
/** 是否已登录 */
|
|
62
|
+
isLogin?: boolean;
|
|
56
63
|
}
|
|
57
64
|
declare const WalletCard: React.FC<WalletCardProps>;
|
|
58
65
|
export default WalletCard;
|
|
@@ -32,14 +32,15 @@ __export(walletCard_exports, {
|
|
|
32
32
|
default: () => walletCard_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(walletCard_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
35
|
var import_antd = require("antd");
|
|
37
|
-
var import_iconfont = __toESM(require("./../iconfont"));
|
|
38
|
-
var import_react_barcode = __toESM(require("react-barcode"));
|
|
39
|
-
var import_Amount = __toESM(require("./../pisellText/components/Amount"));
|
|
40
|
-
var import_pisellModal = __toESM(require("./../pisellModal"));
|
|
41
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_react_barcode = __toESM(require("react-barcode"));
|
|
42
39
|
var import_locales = require("../../locales/index");
|
|
40
|
+
var import_iconfont = __toESM(require("./../iconfont"));
|
|
41
|
+
var import_pisellModal = __toESM(require("./../pisellModal"));
|
|
42
|
+
var import_Amount = __toESM(require("./../pisellText/components/Amount"));
|
|
43
|
+
var import_Guest = __toESM(require("./Guest"));
|
|
43
44
|
var import_index = require("./index.less");
|
|
44
45
|
var DEFAULT_PROPS = {
|
|
45
46
|
symbol: "$",
|
|
@@ -78,7 +79,8 @@ var DEFAULT_PROPS = {
|
|
|
78
79
|
label: "discount",
|
|
79
80
|
value: 0
|
|
80
81
|
}
|
|
81
|
-
]
|
|
82
|
+
],
|
|
83
|
+
isLogin: false
|
|
82
84
|
};
|
|
83
85
|
var useCodeModal = (cardNo, onCodeClick) => {
|
|
84
86
|
const [isModalOpen, setIsModalOpen] = (0, import_react.useState)(false);
|
|
@@ -112,9 +114,17 @@ var CardHeader = ({
|
|
|
112
114
|
cardNo = "Wallet number",
|
|
113
115
|
cardStyle = "normal",
|
|
114
116
|
codeType = "barCode",
|
|
115
|
-
onCodeClick
|
|
117
|
+
onCodeClick,
|
|
118
|
+
isLogin = false
|
|
116
119
|
}) => {
|
|
117
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level" }, showIcon && iconImg && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-icon" }, /* @__PURE__ */ import_react.default.createElement(
|
|
120
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level" }, showIcon && iconImg && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-icon" }, /* @__PURE__ */ import_react.default.createElement(
|
|
121
|
+
"img",
|
|
122
|
+
{
|
|
123
|
+
src: iconImg,
|
|
124
|
+
alt: "wallet icon",
|
|
125
|
+
style: { width: "20px", height: "20px" }
|
|
126
|
+
}
|
|
127
|
+
)), showWalletName && walletName && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level-text" }, walletName)), showShopName && shopName && /* @__PURE__ */ import_react.default.createElement("div", null, shopName), showCardNo && cardNo && /* @__PURE__ */ import_react.default.createElement("div", null, cardNo)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-right" }, showCode && cardStyle === "normal" && /* @__PURE__ */ import_react.default.createElement(
|
|
118
128
|
"div",
|
|
119
129
|
{
|
|
120
130
|
className: "pisell-wallet-card-icon-wrapper",
|
|
@@ -167,7 +177,9 @@ var CodeModal = ({ isOpen, onClose, codeType, cardNo, platform }) => {
|
|
|
167
177
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
168
178
|
import_pisellModal.default,
|
|
169
179
|
{
|
|
170
|
-
title: (0, import_locales.getText)(
|
|
180
|
+
title: (0, import_locales.getText)(
|
|
181
|
+
codeType === "barCode" ? "walletCard-barcode" : "walletCard-qrcode"
|
|
182
|
+
),
|
|
171
183
|
platform,
|
|
172
184
|
onCancel: onClose,
|
|
173
185
|
open: isOpen,
|
|
@@ -201,19 +213,26 @@ var WalletCard = (props) => {
|
|
|
201
213
|
onCodeClick,
|
|
202
214
|
onClick,
|
|
203
215
|
className,
|
|
204
|
-
style
|
|
216
|
+
style,
|
|
217
|
+
isLogin = false
|
|
205
218
|
} = {
|
|
206
219
|
...DEFAULT_PROPS,
|
|
207
220
|
...props
|
|
208
221
|
};
|
|
209
|
-
const { isModalOpen, handleCodeClick, closeModal } = useCodeModal(
|
|
222
|
+
const { isModalOpen, handleCodeClick, closeModal } = useCodeModal(
|
|
223
|
+
cardNo,
|
|
224
|
+
onCodeClick
|
|
225
|
+
);
|
|
210
226
|
const backgroundStyle = (0, import_react.useMemo)(() => {
|
|
211
227
|
if (props.customBackgroundImage) {
|
|
212
228
|
return { backgroundImage: `url(${props.customBackgroundImage})` };
|
|
213
229
|
} else {
|
|
214
|
-
return {
|
|
230
|
+
return {
|
|
231
|
+
backgroundImage: `url(https://file.mypisell-dev.com/pisel/image/9/${mode === "dark" ? "3d039c83ff5b84fadafb8a23c33d6cc42025_02_26_00_42_53_288_08413160975__720_456__" : "61dcbe950c9451164a6bb1d17d5bc5f02025_02_26_00_43_42_741_04853453608__720_456__"}.png)`
|
|
232
|
+
};
|
|
215
233
|
}
|
|
216
234
|
}, [props.customBackgroundImage, mode]);
|
|
235
|
+
console.log(isLogin, "wh987976");
|
|
217
236
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
218
237
|
"div",
|
|
219
238
|
{
|
|
@@ -225,7 +244,9 @@ var WalletCard = (props) => {
|
|
|
225
244
|
"div",
|
|
226
245
|
{
|
|
227
246
|
className: "pisell-wallet-card-container",
|
|
228
|
-
style: {
|
|
247
|
+
style: {
|
|
248
|
+
flexDirection: codeDirection === "top" ? "column-reverse" : "column"
|
|
249
|
+
}
|
|
229
250
|
},
|
|
230
251
|
/* @__PURE__ */ import_react.default.createElement(
|
|
231
252
|
"div",
|
|
@@ -233,7 +254,7 @@ var WalletCard = (props) => {
|
|
|
233
254
|
className: (0, import_classnames.default)("pisell-wallet-card-content", mode),
|
|
234
255
|
style: backgroundStyle
|
|
235
256
|
},
|
|
236
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
257
|
+
isLogin ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
237
258
|
CardHeader,
|
|
238
259
|
{
|
|
239
260
|
showWalletName,
|
|
@@ -249,10 +270,24 @@ var WalletCard = (props) => {
|
|
|
249
270
|
codeType,
|
|
250
271
|
onCodeClick: handleCodeClick
|
|
251
272
|
}
|
|
252
|
-
),
|
|
253
|
-
|
|
273
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
274
|
+
CardContent,
|
|
275
|
+
{
|
|
276
|
+
items,
|
|
277
|
+
symbol
|
|
278
|
+
}
|
|
279
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_Guest.default, { setting: props })
|
|
254
280
|
),
|
|
255
|
-
cardStyle === "full" && /* @__PURE__ */ import_react.default.createElement(
|
|
281
|
+
cardStyle === "full" && /* @__PURE__ */ import_react.default.createElement(
|
|
282
|
+
"div",
|
|
283
|
+
{
|
|
284
|
+
className: (0, import_classnames.default)(
|
|
285
|
+
"pisell-wallet-card-showCode",
|
|
286
|
+
codeDirection === "top" ? "code-top" : "code-bottom"
|
|
287
|
+
)
|
|
288
|
+
},
|
|
289
|
+
/* @__PURE__ */ import_react.default.createElement(CodeDisplay, { codeType, cardNo })
|
|
290
|
+
)
|
|
256
291
|
)),
|
|
257
292
|
/* @__PURE__ */ import_react.default.createElement(
|
|
258
293
|
CodeModal,
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
defaultValue: 'dark',
|
|
52
|
-
},
|
|
52
|
+
},
|
|
53
53
|
{
|
|
54
54
|
name: 'cardStyle',
|
|
55
55
|
title: {
|
|
@@ -74,7 +74,7 @@ export default {
|
|
|
74
74
|
},
|
|
75
75
|
},
|
|
76
76
|
defaultValue: 'normal',
|
|
77
|
-
},
|
|
77
|
+
},
|
|
78
78
|
{
|
|
79
79
|
name: 'codeDirection',
|
|
80
80
|
title: {
|
|
@@ -198,6 +198,56 @@ export default {
|
|
|
198
198
|
defaultValue: true
|
|
199
199
|
}
|
|
200
200
|
]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: 'guest',
|
|
204
|
+
type: 'group',
|
|
205
|
+
display: 'accordion',
|
|
206
|
+
title: "未登录信息展示",
|
|
207
|
+
items: [
|
|
208
|
+
{
|
|
209
|
+
name: 'title',
|
|
210
|
+
title: { label: '主标题', tip: '主标题' },
|
|
211
|
+
propType: 'string',
|
|
212
|
+
defaultValue: 'Hi Guest, Join Us',
|
|
213
|
+
setter: 'PisellI18nSetter',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'subtitle',
|
|
217
|
+
title: { label: '副标题', tip: '副标题' },
|
|
218
|
+
propType: 'string',
|
|
219
|
+
defaultValue: 'Unlock perks with every purchase',
|
|
220
|
+
setter: 'TextAreaSetter',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'align',
|
|
224
|
+
title: { label: '对齐方式', tip: '内容区域文字对齐方式 left | center' },
|
|
225
|
+
setter: {
|
|
226
|
+
componentName: 'RadioGroupSetter',
|
|
227
|
+
props: {
|
|
228
|
+
options: [
|
|
229
|
+
{
|
|
230
|
+
title: '左对齐',
|
|
231
|
+
value: 'left',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
title: '居中对齐',
|
|
235
|
+
value: 'center',
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
propType: { type: 'oneOf', value: ['left', 'center'] },
|
|
241
|
+
defaultValue: 'left',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'buttonText',
|
|
245
|
+
title: { label: '按钮文本', tip: '按钮文本' },
|
|
246
|
+
propType: 'string',
|
|
247
|
+
defaultValue: 'Sign Up Now',
|
|
248
|
+
setter: 'PisellI18nSetter',
|
|
249
|
+
}
|
|
250
|
+
]
|
|
201
251
|
}
|
|
202
252
|
],
|
|
203
253
|
configure: {
|