@pisell/materials 1.10.31 → 1.10.32
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 +3 -3
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/productCard/cartSkuCard/types.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/variants/A12/index.js +3 -2
- package/lib/components/productCard/cartSkuCard/types.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/variants/A12/index.js +3 -2
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@ interface CartSkuCardSlotContext {
|
|
|
12
12
|
}
|
|
13
13
|
interface CartSkuCardA12Slots {
|
|
14
14
|
contentFooter?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
15
|
+
/** 有内容时替代价格、编辑和数量区域,保留默认删除按钮;空值沿用原展示。 */
|
|
16
|
+
status?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
15
17
|
quantityControl?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
16
18
|
actionRail?: (context: CartSkuCardSlotContext & {
|
|
17
19
|
defaultPrice: ReactNode;
|
|
@@ -63,7 +63,7 @@ function getPresentationStyle(presentation) {
|
|
|
63
63
|
return style;
|
|
64
64
|
}
|
|
65
65
|
const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOriginalPrice = false, isShowEditProduct = false, disabled = false, disabledEditClick = false, slots, presentation, onDelete, onEditProduct }) => {
|
|
66
|
-
var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter;
|
|
66
|
+
var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter, _slots$status;
|
|
67
67
|
const display = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.a12) || {};
|
|
68
68
|
const specificationsData = useMemo(() => resolveSpecifications(dataSource), [dataSource]);
|
|
69
69
|
const weighingInfo = useMemo(() => resolveWeighingSnapshot(dataSource), [dataSource]);
|
|
@@ -82,6 +82,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
82
82
|
}, specification.label ? /* @__PURE__ */ React.createElement("span", { className: `${PREFIX}-a12__specification-label` }, specification.label) : null, /* @__PURE__ */ React.createElement("strong", { className: `${PREFIX}-a12__specification-value` }, specification.value)))) : (dataSource === null || dataSource === void 0 ? void 0 : dataSource.product_option_string) ? /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__specification-summary` }, dataSource.product_option_string) : null;
|
|
83
83
|
const specifications = (slots === null || slots === void 0 ? void 0 : slots.specifications) ? slots.specifications(_objectSpread2(_objectSpread2({}, slotContext), {}, { defaultSpecifications })) : defaultSpecifications;
|
|
84
84
|
const contentFooter = slots === null || slots === void 0 || (_slots$contentFooter = slots.contentFooter) === null || _slots$contentFooter === void 0 ? void 0 : _slots$contentFooter.call(slots, slotContext);
|
|
85
|
+
const status = slots === null || slots === void 0 || (_slots$status = slots.status) === null || _slots$status === void 0 ? void 0 : _slots$status.call(slots, slotContext);
|
|
85
86
|
const defaultPrice = /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__price` }, /* @__PURE__ */ React.createElement("strong", null, formatAmount(lineTotal, 2, symbol)), isShowOriginalPrice && originalTotal > 0 && originalTotal !== lineTotal ? /* @__PURE__ */ React.createElement("del", null, formatAmount(originalTotal, 2, symbol)) : null);
|
|
86
87
|
const defaultEdit = Boolean(isShowEditProduct && onEditProduct) ? /* @__PURE__ */ React.createElement("button", {
|
|
87
88
|
type: "button",
|
|
@@ -104,7 +105,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
104
105
|
event.stopPropagation();
|
|
105
106
|
onDelete(dataSource);
|
|
106
107
|
}
|
|
107
|
-
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-trash-01" })) : null, defaultPrice, defaultEdit, /* @__PURE__ */ React.createElement("div", { className:
|
|
108
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-trash-01" })) : null, status || /* @__PURE__ */ React.createElement(React.Fragment, null, defaultPrice, defaultEdit, /* @__PURE__ */ React.createElement("div", { className: `pisell-cart-sku-card-a12__quantity-control` }, defaultQuantityControl)));
|
|
108
109
|
const actionRail = (slots === null || slots === void 0 ? void 0 : slots.actionRail) ? slots.actionRail(_objectSpread2(_objectSpread2({}, slotContext), {}, {
|
|
109
110
|
defaultPrice,
|
|
110
111
|
defaultEdit,
|
|
@@ -12,6 +12,8 @@ interface CartSkuCardSlotContext {
|
|
|
12
12
|
}
|
|
13
13
|
interface CartSkuCardA12Slots {
|
|
14
14
|
contentFooter?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
15
|
+
/** 有内容时替代价格、编辑和数量区域,保留默认删除按钮;空值沿用原展示。 */
|
|
16
|
+
status?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
15
17
|
quantityControl?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
16
18
|
actionRail?: (context: CartSkuCardSlotContext & {
|
|
17
19
|
defaultPrice: ReactNode;
|
|
@@ -66,7 +66,7 @@ function getPresentationStyle(presentation) {
|
|
|
66
66
|
return style;
|
|
67
67
|
}
|
|
68
68
|
const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOriginalPrice = false, isShowEditProduct = false, disabled = false, disabledEditClick = false, slots, presentation, onDelete, onEditProduct }) => {
|
|
69
|
-
var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter;
|
|
69
|
+
var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter, _slots$status;
|
|
70
70
|
const display = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.a12) || {};
|
|
71
71
|
const specificationsData = (0, react.useMemo)(() => resolveSpecifications(dataSource), [dataSource]);
|
|
72
72
|
const weighingInfo = (0, react.useMemo)(() => (0, _pisell_utils.resolveWeighingSnapshot)(dataSource), [dataSource]);
|
|
@@ -85,6 +85,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
85
85
|
}, specification.label ? /* @__PURE__ */ react.default.createElement("span", { className: `${require_index$2.PREFIX}-a12__specification-label` }, specification.label) : null, /* @__PURE__ */ react.default.createElement("strong", { className: `${require_index$2.PREFIX}-a12__specification-value` }, specification.value)))) : (dataSource === null || dataSource === void 0 ? void 0 : dataSource.product_option_string) ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__specification-summary` }, dataSource.product_option_string) : null;
|
|
86
86
|
const specifications = (slots === null || slots === void 0 ? void 0 : slots.specifications) ? slots.specifications(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, slotContext), {}, { defaultSpecifications })) : defaultSpecifications;
|
|
87
87
|
const contentFooter = slots === null || slots === void 0 || (_slots$contentFooter = slots.contentFooter) === null || _slots$contentFooter === void 0 ? void 0 : _slots$contentFooter.call(slots, slotContext);
|
|
88
|
+
const status = slots === null || slots === void 0 || (_slots$status = slots.status) === null || _slots$status === void 0 ? void 0 : _slots$status.call(slots, slotContext);
|
|
88
89
|
const defaultPrice = /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__price` }, /* @__PURE__ */ react.default.createElement("strong", null, (0, _pisell_utils.formatAmount)(lineTotal, 2, symbol)), isShowOriginalPrice && originalTotal > 0 && originalTotal !== lineTotal ? /* @__PURE__ */ react.default.createElement("del", null, (0, _pisell_utils.formatAmount)(originalTotal, 2, symbol)) : null);
|
|
89
90
|
const defaultEdit = Boolean(isShowEditProduct && onEditProduct) ? /* @__PURE__ */ react.default.createElement("button", {
|
|
90
91
|
type: "button",
|
|
@@ -107,7 +108,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
107
108
|
event.stopPropagation();
|
|
108
109
|
onDelete(dataSource);
|
|
109
110
|
}
|
|
110
|
-
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, defaultPrice, defaultEdit, /* @__PURE__ */ react.default.createElement("div", { className:
|
|
111
|
+
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, status || /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, defaultPrice, defaultEdit, /* @__PURE__ */ react.default.createElement("div", { className: `pisell-cart-sku-card-a12__quantity-control` }, defaultQuantityControl)));
|
|
111
112
|
const actionRail = (slots === null || slots === void 0 ? void 0 : slots.actionRail) ? slots.actionRail(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, slotContext), {}, {
|
|
112
113
|
defaultPrice,
|
|
113
114
|
defaultEdit,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.32",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev:tailwind-css": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css --watch",
|
|
6
6
|
"build:tailwind-css:once": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css",
|