@pisell/materials 6.11.105 → 6.11.106
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +14 -3
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +1 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -3
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +8 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +3 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +4 -1
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +8 -0
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +18 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +11 -2
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +1 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +6 -3
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +8 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +3 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +6 -4
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +8 -0
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +18 -0
- package/package.json +3 -3
- package/es/components/buttonGroupPreview/index.d.ts +0 -19
- package/lib/components/buttonGroupPreview/index.d.ts +0 -19
|
@@ -5,7 +5,7 @@ import { Tag, Tooltip } from 'antd';
|
|
|
5
5
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
6
6
|
import { _formatAmount } from "../packages/utils";
|
|
7
7
|
import "./index.less";
|
|
8
|
-
import { locales } from '@pisell/utils';
|
|
8
|
+
import { locales, formatAmountWithOptions } from '@pisell/utils';
|
|
9
9
|
import { PREFIX } from "../../index";
|
|
10
10
|
var Footer = function Footer(_ref) {
|
|
11
11
|
var _item$_origin;
|
|
@@ -20,6 +20,17 @@ var Footer = function Footer(_ref) {
|
|
|
20
20
|
num = item.num,
|
|
21
21
|
discount_reason = item.discount_reason;
|
|
22
22
|
var weighingInfo = item === null || item === void 0 || (_item$_origin = item._origin) === null || _item$_origin === void 0 || (_item$_origin = _item$_origin._extend) === null || _item$_origin === void 0 ? void 0 : _item$_origin.weighing;
|
|
23
|
+
var formatFooterAmount = function formatFooterAmount(amount) {
|
|
24
|
+
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
25
|
+
if (!weighingInfo) {
|
|
26
|
+
return _formatAmount(amount, symbol, precision);
|
|
27
|
+
}
|
|
28
|
+
return formatAmountWithOptions(amount, symbol, {
|
|
29
|
+
precision: precision,
|
|
30
|
+
hideDecimalForWholeNumbers: false
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
23
34
|
/**
|
|
24
35
|
* @title: 折扣
|
|
25
36
|
* @description:
|
|
@@ -65,7 +76,7 @@ var Footer = function Footer(_ref) {
|
|
|
65
76
|
className: classNames("".concat(PREFIX, "__footer-price-wrap"), weighingInfo && "".concat(PREFIX, "__footer-price-wrap--weighing"))
|
|
66
77
|
}, !isOnlyTotal ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
67
78
|
className: classNames("".concat(PREFIX, "__footer-price"))
|
|
68
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
79
|
+
}, /*#__PURE__*/React.createElement("span", null, formatFooterAmount(total)), tip ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
69
80
|
title: locales.getText(tip),
|
|
70
81
|
destroyTooltipOnHide: true
|
|
71
82
|
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
@@ -77,6 +88,6 @@ var Footer = function Footer(_ref) {
|
|
|
77
88
|
className: "".concat(PREFIX, "__footer-total")
|
|
78
89
|
}, isDiscount ? /*#__PURE__*/React.createElement("span", {
|
|
79
90
|
className: "".concat(PREFIX, "__footer-origin-total")
|
|
80
|
-
},
|
|
91
|
+
}, formatFooterAmount(origin_total * num)) : null, /*#__PURE__*/React.createElement("span", null, formatFooterAmount(total * num))))), renderDiscountReason());
|
|
81
92
|
};
|
|
82
93
|
export default Footer;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
isShowImage?: boolean;
|
|
5
|
+
dataSource: {
|
|
6
|
+
image?: string;
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
options?: any[];
|
|
9
|
+
product_option_string?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
symbol?: string;
|
|
12
|
+
price?: string | number;
|
|
13
|
+
total?: number;
|
|
14
|
+
origin_total?: number;
|
|
15
|
+
num?: number;
|
|
16
|
+
holder_id?: any;
|
|
17
|
+
isFormSubject?: boolean;
|
|
18
|
+
totalDifference?: number;
|
|
19
|
+
};
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** 作为主商品卡片展示
|
|
22
|
+
* 1. 影响商品数量 tag 的位置
|
|
23
|
+
* 2. isMain 且 type 为 a5,展示holder
|
|
24
|
+
*/
|
|
25
|
+
isMainProduct?: boolean;
|
|
26
|
+
maxSpecsCount?: number;
|
|
27
|
+
type?: 'a2' | 'a5' | 'a9';
|
|
28
|
+
isBundle?: boolean;
|
|
29
|
+
showFooter?: boolean;
|
|
30
|
+
isShowOriginalPrice?: boolean;
|
|
31
|
+
isShowEditProduct?: boolean;
|
|
32
|
+
onEditProduct?: (val: any) => void;
|
|
33
|
+
disabledEditClick?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const BasicInfo: (props: IProps) => React.JSX.Element;
|
|
36
|
+
export default BasicInfo;
|
|
@@ -58,6 +58,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
58
58
|
var weighingInfo = dataSource === null || dataSource === void 0 || (_origin = dataSource._origin) === null || _origin === void 0 || (_origin = _origin._extend) === null || _origin === void 0 ? void 0 : _origin.weighing;
|
|
59
59
|
var hasWeighingInfo = Boolean(weighingInfo && (Number.isFinite(Number(weighingInfo === null || weighingInfo === void 0 ? void 0 : weighingInfo.weight)) || Number.isFinite(Number(weighingInfo === null || weighingInfo === void 0 ? void 0 : weighingInfo.net_weight))));
|
|
60
60
|
var hasProductMeta = hasSpecs || hasWeighingInfo;
|
|
61
|
+
var basicInfoClassName = classNames("".concat(PREFIX, "__basic-info"), _defineProperty({}, "".concat(PREFIX, "__basic-info--weighing"), hasWeighingInfo));
|
|
61
62
|
var renderProductMeta = function renderProductMeta() {
|
|
62
63
|
if (!hasProductMeta) {
|
|
63
64
|
return null;
|
|
@@ -119,7 +120,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
119
120
|
}, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
|
|
120
121
|
if (type === 'a5') {
|
|
121
122
|
return /*#__PURE__*/React.createElement("div", {
|
|
122
|
-
className:
|
|
123
|
+
className: basicInfoClassName,
|
|
123
124
|
style: style || {}
|
|
124
125
|
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
125
126
|
style: {
|
|
@@ -142,7 +143,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
142
143
|
// 套餐列表中,如果没有规格,则显示总价
|
|
143
144
|
var _price = showAmount ? Number(price !== null && price !== void 0 ? price : 0) * num : price;
|
|
144
145
|
return /*#__PURE__*/React.createElement("div", {
|
|
145
|
-
className:
|
|
146
|
+
className: basicInfoClassName,
|
|
146
147
|
style: style || {}
|
|
147
148
|
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
148
149
|
style: {
|
|
@@ -163,7 +164,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
163
164
|
}, formatAmount(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
|
|
164
165
|
}
|
|
165
166
|
return /*#__PURE__*/React.createElement("div", {
|
|
166
|
-
className:
|
|
167
|
+
className: basicInfoClassName,
|
|
167
168
|
style: style || {}
|
|
168
169
|
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
169
170
|
style: {
|
|
@@ -151,6 +151,14 @@
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
&--weighing {
|
|
155
|
+
.product-info .product-name {
|
|
156
|
+
font-size: 18px;
|
|
157
|
+
line-height: 1.3;
|
|
158
|
+
letter-spacing: -0.01em;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
154
162
|
.product-info-a9, .product-info-a5 {
|
|
155
163
|
display: flex;
|
|
156
164
|
justify-content: space-between;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
color: #667085;
|
|
13
13
|
font-size: 10px;
|
|
14
14
|
line-height: 10px;
|
|
15
|
+
letter-spacing: normal;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
> div {
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
.pisell-lowcode-packages-product-bundle-option {
|
|
49
50
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 4mm);
|
|
50
51
|
line-height: 1.3;
|
|
52
|
+
letter-spacing: -0.04em;
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -62,5 +64,6 @@
|
|
|
62
64
|
.pisell-cart-sku-card__specs {
|
|
63
65
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 4mm);
|
|
64
66
|
line-height: 1.3;
|
|
67
|
+
letter-spacing: -0.04em;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -35,6 +35,7 @@ var Weighing = function Weighing(props) {
|
|
|
35
35
|
var netLabel = locales.getText('pisell2.cart.sku-card.weighing.net');
|
|
36
36
|
var unitPriceText = "".concat(symbol || '').concat(unit_price !== null && unit_price !== void 0 ? unit_price : '0.00');
|
|
37
37
|
var manualPrefix = isManualWeight ? '(M) ' : '';
|
|
38
|
+
var netWeightText = "".concat(tareValue > 0 ? '' : manualPrefix).concat(formatWeight(net_weight, unit), " ").concat(netLabel);
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
40
|
className: "".concat(PREFIX, "__weighing")
|
|
40
41
|
}, tareValue > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -43,6 +44,8 @@ var Weighing = function Weighing(props) {
|
|
|
43
44
|
className: "".concat(PREFIX, "__weighing-row ").concat(PREFIX, "__weighing-row--large")
|
|
44
45
|
}, /*#__PURE__*/React.createElement("span", null, "".concat(tareLabel, ": ").concat(formatWeight(tare === null || tare === void 0 ? void 0 : tare.value, (tare === null || tare === void 0 ? void 0 : tare.unit) || unit)))) : null, /*#__PURE__*/React.createElement("div", {
|
|
45
46
|
className: "".concat(PREFIX, "__weighing-row ").concat(PREFIX, "__weighing-row--large")
|
|
46
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
47
|
+
}, /*#__PURE__*/React.createElement("span", null, netWeightText), /*#__PURE__*/React.createElement("span", {
|
|
48
|
+
className: "".concat(PREFIX, "__weighing-unit-price")
|
|
49
|
+
}, "@ ".concat(unitPriceText, "/").concat(unitLabel))));
|
|
47
50
|
};
|
|
48
51
|
export default Weighing;
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
&--large {
|
|
26
26
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 4mm) !important;
|
|
27
27
|
line-height: 1.3;
|
|
28
|
+
letter-spacing: -0.04em;
|
|
28
29
|
align-items: flex-start;
|
|
29
30
|
flex-wrap: wrap;
|
|
31
|
+
column-gap: 2px;
|
|
32
|
+
row-gap: 0;
|
|
30
33
|
overflow: visible;
|
|
31
34
|
white-space: normal;
|
|
32
35
|
text-overflow: clip;
|
|
@@ -40,4 +43,9 @@
|
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
46
|
+
|
|
47
|
+
&-unit-price {
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
white-space: nowrap !important;
|
|
50
|
+
}
|
|
43
51
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProductCardTypes } from '../types';
|
|
3
|
+
import type { LineItemStatusOption, LineItemType } from './types';
|
|
4
|
+
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
5
|
+
dataSource: any;
|
|
6
|
+
type: LineItemType;
|
|
7
|
+
cartSkuType: 'a2' | 'a5' | 'a9';
|
|
8
|
+
relatedProductDataSource?: any;
|
|
9
|
+
rightActions?: any[];
|
|
10
|
+
escapeDom?: string;
|
|
11
|
+
statusOptions?: LineItemStatusOption[];
|
|
12
|
+
statusLoading?: boolean;
|
|
13
|
+
statusDisabled?: boolean;
|
|
14
|
+
isShowRelatedProduct?: boolean;
|
|
15
|
+
onBookingStatusChange?: (status: string, item: any) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const BookingLineItem: (props: BookingLineItemProps) => React.JSX.Element | null;
|
|
18
|
+
export default BookingLineItem;
|
|
@@ -45,6 +45,15 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
45
45
|
var _a, _b;
|
|
46
46
|
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
47
47
|
const weighingInfo = (_b = (_a = item == null ? void 0 : item._origin) == null ? void 0 : _a._extend) == null ? void 0 : _b.weighing;
|
|
48
|
+
const formatFooterAmount = (amount, precision = 2) => {
|
|
49
|
+
if (!weighingInfo) {
|
|
50
|
+
return (0, import_utils._formatAmount)(amount, symbol, precision);
|
|
51
|
+
}
|
|
52
|
+
return (0, import_utils2.formatAmountWithOptions)(amount, symbol, {
|
|
53
|
+
precision,
|
|
54
|
+
hideDecimalForWholeNumbers: false
|
|
55
|
+
});
|
|
56
|
+
};
|
|
48
57
|
const isDiscount = (0, import_react.useMemo)(() => {
|
|
49
58
|
if (!origin_total) return false;
|
|
50
59
|
return Number(total) != Number(origin_total);
|
|
@@ -79,13 +88,13 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
79
88
|
weighingInfo && `${import__.PREFIX}__footer-price-wrap--weighing`
|
|
80
89
|
)
|
|
81
90
|
},
|
|
82
|
-
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, (
|
|
91
|
+
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, formatFooterAmount(total)), tip ? /* @__PURE__ */ import_react.default.createElement(import_antd2.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
83
92
|
import_icons.QuestionCircleOutlined,
|
|
84
93
|
{
|
|
85
94
|
style: { fontSize: "16px", color: "#1570ef" }
|
|
86
95
|
}
|
|
87
96
|
)) : null), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
88
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-origin-total` }, (
|
|
97
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-origin-total` }, formatFooterAmount(origin_total * num)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, formatFooterAmount(total * num)))
|
|
89
98
|
)
|
|
90
99
|
), renderDiscountReason());
|
|
91
100
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
isShowImage?: boolean;
|
|
5
|
+
dataSource: {
|
|
6
|
+
image?: string;
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
options?: any[];
|
|
9
|
+
product_option_string?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
symbol?: string;
|
|
12
|
+
price?: string | number;
|
|
13
|
+
total?: number;
|
|
14
|
+
origin_total?: number;
|
|
15
|
+
num?: number;
|
|
16
|
+
holder_id?: any;
|
|
17
|
+
isFormSubject?: boolean;
|
|
18
|
+
totalDifference?: number;
|
|
19
|
+
};
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** 作为主商品卡片展示
|
|
22
|
+
* 1. 影响商品数量 tag 的位置
|
|
23
|
+
* 2. isMain 且 type 为 a5,展示holder
|
|
24
|
+
*/
|
|
25
|
+
isMainProduct?: boolean;
|
|
26
|
+
maxSpecsCount?: number;
|
|
27
|
+
type?: 'a2' | 'a5' | 'a9';
|
|
28
|
+
isBundle?: boolean;
|
|
29
|
+
showFooter?: boolean;
|
|
30
|
+
isShowOriginalPrice?: boolean;
|
|
31
|
+
isShowEditProduct?: boolean;
|
|
32
|
+
onEditProduct?: (val: any) => void;
|
|
33
|
+
disabledEditClick?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const BasicInfo: (props: IProps) => React.JSX.Element;
|
|
36
|
+
export default BasicInfo;
|
|
@@ -89,6 +89,9 @@ var BasicInfo = (props) => {
|
|
|
89
89
|
weighingInfo && (Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.weight)) || Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.net_weight)))
|
|
90
90
|
);
|
|
91
91
|
const hasProductMeta = hasSpecs || hasWeighingInfo;
|
|
92
|
+
const basicInfoClassName = (0, import_classnames.default)(`${import__.PREFIX}__basic-info`, {
|
|
93
|
+
[`${import__.PREFIX}__basic-info--weighing`]: hasWeighingInfo
|
|
94
|
+
});
|
|
92
95
|
const renderProductMeta = () => {
|
|
93
96
|
if (!hasProductMeta) {
|
|
94
97
|
return null;
|
|
@@ -144,7 +147,7 @@ var BasicInfo = (props) => {
|
|
|
144
147
|
return _originalTotal !== 0 && _originalTotal != _total;
|
|
145
148
|
}, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
|
|
146
149
|
if (type === "a5") {
|
|
147
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className:
|
|
150
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
148
151
|
"div",
|
|
149
152
|
{
|
|
150
153
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -155,7 +158,7 @@ var BasicInfo = (props) => {
|
|
|
155
158
|
if (type === "a9") {
|
|
156
159
|
const showAmount = isBundle && !showFooter;
|
|
157
160
|
const _price = showAmount ? Number(price ?? 0) * num : price;
|
|
158
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className:
|
|
161
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
159
162
|
"div",
|
|
160
163
|
{
|
|
161
164
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -163,6 +166,6 @@ var BasicInfo = (props) => {
|
|
|
163
166
|
name
|
|
164
167
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ import_react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `original-price` }, (0, import_utils.formatAmount)(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
|
|
165
168
|
}
|
|
166
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className:
|
|
169
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
167
170
|
};
|
|
168
171
|
var basicInfo_default = BasicInfo;
|
|
@@ -151,6 +151,14 @@
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
&--weighing {
|
|
155
|
+
.product-info .product-name {
|
|
156
|
+
font-size: 18px;
|
|
157
|
+
line-height: 1.3;
|
|
158
|
+
letter-spacing: -0.01em;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
154
162
|
.product-info-a9, .product-info-a5 {
|
|
155
163
|
display: flex;
|
|
156
164
|
justify-content: space-between;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
color: #667085;
|
|
13
13
|
font-size: 10px;
|
|
14
14
|
line-height: 10px;
|
|
15
|
+
letter-spacing: normal;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
> div {
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
.pisell-lowcode-packages-product-bundle-option {
|
|
49
50
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 4mm);
|
|
50
51
|
line-height: 1.3;
|
|
52
|
+
letter-spacing: -0.04em;
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -62,5 +64,6 @@
|
|
|
62
64
|
.pisell-cart-sku-card__specs {
|
|
63
65
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 4mm);
|
|
64
66
|
line-height: 1.3;
|
|
67
|
+
letter-spacing: -0.04em;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -69,6 +69,10 @@ var Weighing = (props) => {
|
|
|
69
69
|
const netLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.net");
|
|
70
70
|
const unitPriceText = `${symbol || ""}${unit_price ?? "0.00"}`;
|
|
71
71
|
const manualPrefix = isManualWeight ? "(M) " : "";
|
|
72
|
+
const netWeightText = `${tareValue > 0 ? "" : manualPrefix}${formatWeight(
|
|
73
|
+
net_weight,
|
|
74
|
+
unit
|
|
75
|
+
)} ${netLabel}`;
|
|
72
76
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing` }, tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
73
77
|
"div",
|
|
74
78
|
{
|
|
@@ -92,10 +96,8 @@ var Weighing = (props) => {
|
|
|
92
96
|
{
|
|
93
97
|
className: `${import__.PREFIX}__weighing-row ${import__.PREFIX}__weighing-row--large`
|
|
94
98
|
},
|
|
95
|
-
/* @__PURE__ */ import_react.default.createElement("span", null,
|
|
96
|
-
|
|
97
|
-
unit
|
|
98
|
-
)} ${netLabel} @ ${unitPriceText}/${unitLabel}`)
|
|
99
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, netWeightText),
|
|
100
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__weighing-unit-price` }, `@ ${unitPriceText}/${unitLabel}`)
|
|
99
101
|
));
|
|
100
102
|
};
|
|
101
103
|
var weighing_default = Weighing;
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
&--large {
|
|
26
26
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 4mm) !important;
|
|
27
27
|
line-height: 1.3;
|
|
28
|
+
letter-spacing: -0.04em;
|
|
28
29
|
align-items: flex-start;
|
|
29
30
|
flex-wrap: wrap;
|
|
31
|
+
column-gap: 2px;
|
|
32
|
+
row-gap: 0;
|
|
30
33
|
overflow: visible;
|
|
31
34
|
white-space: normal;
|
|
32
35
|
text-overflow: clip;
|
|
@@ -40,4 +43,9 @@
|
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
46
|
+
|
|
47
|
+
&-unit-price {
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
white-space: nowrap !important;
|
|
50
|
+
}
|
|
43
51
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProductCardTypes } from '../types';
|
|
3
|
+
import type { LineItemStatusOption, LineItemType } from './types';
|
|
4
|
+
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
5
|
+
dataSource: any;
|
|
6
|
+
type: LineItemType;
|
|
7
|
+
cartSkuType: 'a2' | 'a5' | 'a9';
|
|
8
|
+
relatedProductDataSource?: any;
|
|
9
|
+
rightActions?: any[];
|
|
10
|
+
escapeDom?: string;
|
|
11
|
+
statusOptions?: LineItemStatusOption[];
|
|
12
|
+
statusLoading?: boolean;
|
|
13
|
+
statusDisabled?: boolean;
|
|
14
|
+
isShowRelatedProduct?: boolean;
|
|
15
|
+
onBookingStatusChange?: (status: string, item: any) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const BookingLineItem: (props: BookingLineItemProps) => React.JSX.Element | null;
|
|
18
|
+
export default BookingLineItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.106",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"antd-mobile": "^5.38.1",
|
|
100
100
|
"vod-js-sdk-v6": "^1.4.11",
|
|
101
101
|
"@pisell/date-picker": "3.0.8",
|
|
102
|
-
"@pisell/
|
|
103
|
-
"@pisell/
|
|
102
|
+
"@pisell/utils": "3.0.2",
|
|
103
|
+
"@pisell/icon": "0.0.11"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": "^18.0.0",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MenuProps, ButtonProps } from 'antd';
|
|
3
|
-
export interface ButtonGroupListItemProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
isMore?: boolean;
|
|
6
|
-
menuData?: MenuProps['items'];
|
|
7
|
-
buttonProps?: ButtonProps;
|
|
8
|
-
}
|
|
9
|
-
interface ButtonConfigProps {
|
|
10
|
-
[id: string]: ButtonGroupListItemProps;
|
|
11
|
-
}
|
|
12
|
-
export declare type ButtonGroupListProps = ButtonGroupListItemProps[][];
|
|
13
|
-
interface ButtonGroupPreviewProps {
|
|
14
|
-
buttonConfig?: ButtonConfigProps;
|
|
15
|
-
buttonGroupList?: ButtonGroupListProps;
|
|
16
|
-
updateButtonProps?: ButtonGroupListItemProps;
|
|
17
|
-
}
|
|
18
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupPreviewProps & React.RefAttributes<any>>>;
|
|
19
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MenuProps, ButtonProps } from 'antd';
|
|
3
|
-
export interface ButtonGroupListItemProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
isMore?: boolean;
|
|
6
|
-
menuData?: MenuProps['items'];
|
|
7
|
-
buttonProps?: ButtonProps;
|
|
8
|
-
}
|
|
9
|
-
interface ButtonConfigProps {
|
|
10
|
-
[id: string]: ButtonGroupListItemProps;
|
|
11
|
-
}
|
|
12
|
-
export declare type ButtonGroupListProps = ButtonGroupListItemProps[][];
|
|
13
|
-
interface ButtonGroupPreviewProps {
|
|
14
|
-
buttonConfig?: ButtonConfigProps;
|
|
15
|
-
buttonGroupList?: ButtonGroupListProps;
|
|
16
|
-
updateButtonProps?: ButtonGroupListItemProps;
|
|
17
|
-
}
|
|
18
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupPreviewProps & React.RefAttributes<any>>>;
|
|
19
|
-
export default _default;
|