@pisell/materials 2.2.80 → 2.2.81
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +14 -14
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -15
- package/es/components/media/index.d.ts +15 -1
- package/es/components/media/index.js +12 -12
- package/es/components/pisellVHFix/index.d.ts +13 -0
- package/es/components/pisellVHFix/index.js +36 -0
- package/es/components/pisellVHFix/index.less +10 -0
- package/es/components/productCard/components/AmountFooter/index.js +22 -6
- package/es/components/productCard/components/AmountFooter/index.less +28 -1
- package/es/components/productCard/components/Warning/index.d.ts +7 -0
- package/es/components/productCard/components/Warning/index.js +48 -0
- package/es/components/productCard/index.js +8 -8
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +6 -3
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +1 -0
- package/lib/components/media/index.d.ts +15 -1
- package/lib/components/media/index.js +12 -12
- package/lib/components/pisellVHFix/index.d.ts +13 -0
- package/lib/components/pisellVHFix/index.js +56 -0
- package/lib/components/pisellVHFix/index.less +10 -0
- package/lib/components/productCard/components/AmountFooter/index.js +16 -6
- package/lib/components/productCard/components/AmountFooter/index.less +28 -1
- package/lib/components/productCard/components/Warning/index.d.ts +7 -0
- package/lib/components/productCard/components/Warning/index.js +68 -0
- package/lib/components/productCard/index.js +4 -11
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -47,6 +47,19 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
47
47
|
if (!origin_total) return false;
|
|
48
48
|
return Number(total) != Number(origin_total);
|
|
49
49
|
}, [total, origin_total]);
|
|
50
|
+
const renderDiscountReason = () => {
|
|
51
|
+
if (isDiscount && discount_reason && type === "total") {
|
|
52
|
+
if (Array.isArray(discount_reason)) {
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-item-discount-reason` }, discount_reason.map((reason, index) => {
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { key: index, color: "red" }, reason);
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-item-discount-reason` }, /* @__PURE__ */ import_react.default.createElement("span", null, `${import_utils2.locales.getText(
|
|
58
|
+
"pisell2.product.card.discount.reason"
|
|
59
|
+
)}: ${discount_reason}`)));
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
50
63
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !hideDivider ? /* @__PURE__ */ import_react.default.createElement(import_Divider.default, { type: type !== "total" ? "inside" : "" }) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
51
64
|
"div",
|
|
52
65
|
{
|
|
@@ -74,11 +87,8 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
74
87
|
}
|
|
75
88
|
)) : null
|
|
76
89
|
), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
77
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, (0, import_utils._formatAmount)(total * num, symbol))
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
), isDiscount && discount_reason && type === "total" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-item-discount-reason` }, /* @__PURE__ */ import_react.default.createElement("span", null, `${import_utils2.locales.getText(
|
|
81
|
-
"pisell2.product.card.discount.reason"
|
|
82
|
-
)}: ${discount_reason}`))) : null);
|
|
90
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num, symbol)))
|
|
91
|
+
)
|
|
92
|
+
), renderDiscountReason());
|
|
83
93
|
};
|
|
84
94
|
var AmountFooter_default = Footer;
|
|
@@ -35,6 +35,19 @@
|
|
|
35
35
|
color: var(--Gray-900, #101828);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&-packages-product-footer-origin-total {
|
|
39
|
+
color: var(--Gray-500, #667085);
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
line-height: 18px; /* 150% */
|
|
45
|
+
text-decoration-line: line-through;
|
|
46
|
+
margin-right: 8px;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
transform: translateY(-1px);
|
|
49
|
+
}
|
|
50
|
+
|
|
38
51
|
&-packages-product-hide-divider-footer {
|
|
39
52
|
margin-top: 8px;
|
|
40
53
|
}
|
|
@@ -45,6 +58,20 @@
|
|
|
45
58
|
font-style: normal;
|
|
46
59
|
font-weight: 400;
|
|
47
60
|
line-height: 20px;
|
|
48
|
-
|
|
61
|
+
margin-top: 4px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
gap: 4px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
|
|
67
|
+
>span {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
49
76
|
}
|
|
50
77
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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/productCard/components/Warning/index.tsx
|
|
30
|
+
var Warning_exports = {};
|
|
31
|
+
__export(Warning_exports, {
|
|
32
|
+
default: () => Warning_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Warning_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import__ = require("../../index.less");
|
|
39
|
+
var Warning = ({ errorMessage, osWarnTips }) => {
|
|
40
|
+
const errorLists = (0, import_react.useMemo)(() => {
|
|
41
|
+
if (errorMessage) {
|
|
42
|
+
if (Array.isArray(errorMessage)) {
|
|
43
|
+
return errorMessage;
|
|
44
|
+
}
|
|
45
|
+
if (typeof errorMessage === "string") {
|
|
46
|
+
return [errorMessage];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if ((osWarnTips == null ? void 0 : osWarnTips.length) > 0) {
|
|
50
|
+
return osWarnTips.map((item) => import_utils.locales.getText(item));
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
53
|
+
}, [errorMessage, osWarnTips]);
|
|
54
|
+
if ((errorLists == null ? void 0 : errorLists.length) === 0) {
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, errorLists.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
import_antd.Alert,
|
|
59
|
+
{
|
|
60
|
+
key: index,
|
|
61
|
+
message: item,
|
|
62
|
+
type: "warning",
|
|
63
|
+
showIcon: true,
|
|
64
|
+
className: "pisell-lowcode-product-card-error"
|
|
65
|
+
}
|
|
66
|
+
)));
|
|
67
|
+
};
|
|
68
|
+
var Warning_default = Warning;
|
|
@@ -34,7 +34,6 @@ __export(productCard_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(productCard_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_antd = require("antd");
|
|
38
37
|
var import_utils = require("@pisell/utils");
|
|
39
38
|
var import_cardPro = __toESM(require("../cardPro"));
|
|
40
39
|
var import_Header = __toESM(require("./components/Header"));
|
|
@@ -50,6 +49,7 @@ var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
|
|
|
50
49
|
var import_locales = __toESM(require("./locales"));
|
|
51
50
|
var import_status = require("./status");
|
|
52
51
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
52
|
+
var import_Warning = __toESM(require("./components/Warning"));
|
|
53
53
|
var import_index = require("./index.less");
|
|
54
54
|
var ProductCard = (props) => {
|
|
55
55
|
var _a, _b;
|
|
@@ -84,7 +84,8 @@ var ProductCard = (props) => {
|
|
|
84
84
|
isShowAction,
|
|
85
85
|
actionText,
|
|
86
86
|
errorMessage,
|
|
87
|
-
isNormalProduct
|
|
87
|
+
isNormalProduct,
|
|
88
|
+
osWarnTips = []
|
|
88
89
|
} = dataSource;
|
|
89
90
|
const showImage = (0, import_react.useMemo)(() => {
|
|
90
91
|
return isShowImage && image;
|
|
@@ -180,15 +181,7 @@ var ProductCard = (props) => {
|
|
|
180
181
|
onAction: () => onAction == null ? void 0 : onAction(dataSource)
|
|
181
182
|
}
|
|
182
183
|
) : null,
|
|
183
|
-
|
|
184
|
-
import_antd.Alert,
|
|
185
|
-
{
|
|
186
|
-
message: errorMessage,
|
|
187
|
-
type: "warning",
|
|
188
|
-
showIcon: true,
|
|
189
|
-
className: "pisell-lowcode-product-card-error"
|
|
190
|
-
}
|
|
191
|
-
) : null
|
|
184
|
+
/* @__PURE__ */ import_react.default.createElement(import_Warning.default, { errorMessage, osWarnTips })
|
|
192
185
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
193
186
|
import_useOpenNote.default,
|
|
194
187
|
{
|
|
@@ -24,6 +24,7 @@ declare const _default: {
|
|
|
24
24
|
'pisell2.product.card.add.holder.modal.clear': string;
|
|
25
25
|
'pisell2.product.card.add.holder.modal.apply': string;
|
|
26
26
|
'pisell2.product.card.add.holder.modal.add': string;
|
|
27
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
27
28
|
};
|
|
28
29
|
'zh-CN': {
|
|
29
30
|
'pisell2.product.card.edit': string;
|
|
@@ -50,6 +51,7 @@ declare const _default: {
|
|
|
50
51
|
'pisell2.product.card.add.holder.modal.clear': string;
|
|
51
52
|
'pisell2.product.card.add.holder.modal.apply': string;
|
|
52
53
|
'pisell2.product.card.add.holder.modal.add': string;
|
|
54
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
53
55
|
};
|
|
54
56
|
'zh-HK': {
|
|
55
57
|
'pisell2.product.card.edit': string;
|
|
@@ -76,6 +78,7 @@ declare const _default: {
|
|
|
76
78
|
'pisell2.product.card.add.holder.modal.clear': string;
|
|
77
79
|
'pisell2.product.card.add.holder.modal.apply': string;
|
|
78
80
|
'pisell2.product.card.add.holder.modal.add': string;
|
|
81
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
79
82
|
};
|
|
80
83
|
};
|
|
81
84
|
export default _default;
|
|
@@ -47,7 +47,8 @@ var locales_default = {
|
|
|
47
47
|
"pisell2.product.card.add.holder.modal.cancel": "Cancel",
|
|
48
48
|
"pisell2.product.card.add.holder.modal.clear": "Clear",
|
|
49
49
|
"pisell2.product.card.add.holder.modal.apply": "Apply",
|
|
50
|
-
"pisell2.product.card.add.holder.modal.add": "Add New"
|
|
50
|
+
"pisell2.product.card.add.holder.modal.add": "Add New",
|
|
51
|
+
"pisell2.product.card.closing-soon.warning": "The venue will close soon. Please make sure you have enough time for your visit."
|
|
51
52
|
},
|
|
52
53
|
"zh-CN": {
|
|
53
54
|
"pisell2.product.card.edit": "编辑",
|
|
@@ -73,7 +74,8 @@ var locales_default = {
|
|
|
73
74
|
"pisell2.product.card.add.holder.modal.cancel": "取消",
|
|
74
75
|
"pisell2.product.card.add.holder.modal.clear": "清除",
|
|
75
76
|
"pisell2.product.card.add.holder.modal.apply": "应用",
|
|
76
|
-
"pisell2.product.card.add.holder.modal.add": "添加"
|
|
77
|
+
"pisell2.product.card.add.holder.modal.add": "添加",
|
|
78
|
+
"pisell2.product.card.closing-soon.warning": "当前入场时间临近营业结束,请确认是否仍要购买。"
|
|
77
79
|
},
|
|
78
80
|
"zh-HK": {
|
|
79
81
|
"pisell2.product.card.edit": "編輯",
|
|
@@ -99,6 +101,7 @@ var locales_default = {
|
|
|
99
101
|
"pisell2.product.card.add.holder.modal.cancel": "取消",
|
|
100
102
|
"pisell2.product.card.add.holder.modal.clear": "清除",
|
|
101
103
|
"pisell2.product.card.add.holder.modal.apply": "應用",
|
|
102
|
-
"pisell2.product.card.add.holder.modal.add": "添加"
|
|
104
|
+
"pisell2.product.card.add.holder.modal.add": "添加",
|
|
105
|
+
"pisell2.product.card.closing-soon.warning": "當前入場時間臨近營業結束,請確認是否仍要購買。"
|
|
103
106
|
}
|
|
104
107
|
};
|
|
@@ -61,7 +61,9 @@ var defaultValue = {
|
|
|
61
61
|
isShowPackageNote: true,
|
|
62
62
|
isShowEditProduct: false,
|
|
63
63
|
locale: "en-US",
|
|
64
|
-
symbol: "$"
|
|
64
|
+
symbol: "$",
|
|
65
|
+
// os层自定义错误提示
|
|
66
|
+
osWarnTips: []
|
|
65
67
|
};
|
|
66
68
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
69
|
0 && (module.exports = {
|