@pisell/materials 6.12.50 → 6.12.52
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 +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/index.d.ts +0 -1
- package/es/components/PisellFields/index.d.ts +0 -1
- package/es/components/PisellLayouts/index.d.ts +0 -1
- package/es/components/PisellMetrics/index.d.ts +0 -1
- package/es/components/appVersionControl/types.d.ts +0 -1
- package/es/components/calendar/index.d.ts +0 -1
- package/es/components/checkbox/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/types.d.ts +0 -1
- package/es/components/filter/components/FilterButton/types.d.ts +0 -1
- package/es/components/input/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +0 -1
- package/es/components/pisellDatePicker/index.d.ts +0 -1
- package/es/components/pisellGridPro/ToolBar/type.d.ts +0 -1
- package/es/components/pisellMenu/types.d.ts +0 -1
- package/es/components/pisellQuickFilter/type.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/index.js +22 -13
- package/es/components/productCard/cartSkuCard/types.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/variants/A12/index.js +8 -6
- package/es/components/productCard/cartSkuCard/variants/A12/index.less +47 -13
- package/es/components/radio/index.d.ts +0 -1
- package/es/components/section-footers/index.d.ts +0 -1
- package/es/components/skeleton/index.d.ts +0 -1
- package/es/components/time-picker/index.d.ts +0 -1
- package/es/components/upload/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -1
- package/lib/components/PisellCards/index.d.ts +0 -1
- package/lib/components/PisellFields/index.d.ts +0 -1
- package/lib/components/PisellLayouts/index.d.ts +0 -1
- package/lib/components/PisellMetrics/index.d.ts +0 -1
- package/lib/components/appVersionControl/types.d.ts +0 -1
- package/lib/components/calendar/index.d.ts +0 -1
- package/lib/components/checkbox/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/types.d.ts +0 -1
- package/lib/components/filter/components/FilterButton/types.d.ts +0 -1
- package/lib/components/input/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +0 -1
- package/lib/components/pisellDatePicker/index.d.ts +0 -1
- package/lib/components/pisellGridPro/ToolBar/type.d.ts +0 -1
- package/lib/components/pisellMenu/types.d.ts +0 -1
- package/lib/components/pisellQuickFilter/type.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/index.js +22 -13
- package/lib/components/productCard/cartSkuCard/types.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/variants/A12/index.js +8 -6
- package/lib/components/productCard/cartSkuCard/variants/A12/index.less +47 -13
- package/lib/components/radio/index.d.ts +0 -1
- package/lib/components/section-footers/index.d.ts +0 -1
- package/lib/components/skeleton/index.d.ts +0 -1
- package/lib/components/time-picker/index.d.ts +0 -1
- package/lib/components/upload/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -1
- package/package.json +2 -2
|
@@ -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;
|
|
69
|
+
var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter;
|
|
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]);
|
|
@@ -84,6 +84,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
84
84
|
key: specification.key
|
|
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
|
+
const contentFooter = slots === null || slots === void 0 || (_slots$contentFooter = slots.contentFooter) === null || _slots$contentFooter === void 0 ? void 0 : _slots$contentFooter.call(slots, slotContext);
|
|
87
88
|
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);
|
|
88
89
|
const defaultEdit = Boolean(isShowEditProduct && onEditProduct) ? /* @__PURE__ */ react.default.createElement("button", {
|
|
89
90
|
type: "button",
|
|
@@ -95,17 +96,18 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
95
96
|
onEditProduct === null || onEditProduct === void 0 || onEditProduct(dataSource);
|
|
96
97
|
}
|
|
97
98
|
}, _pisell_utils.locales.getText("pisell2.product.card.edit")) : null;
|
|
98
|
-
const defaultQuantityControl = (slots === null || slots === void 0 ? void 0 : slots.quantityControl) ? slots.quantityControl(slotContext) : /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-fallback` },
|
|
99
|
+
const defaultQuantityControl = (slots === null || slots === void 0 ? void 0 : slots.quantityControl) ? slots.quantityControl(slotContext) : /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-fallback` }, /* @__PURE__ */ react.default.createElement("span", null, display.quantityText || `× ${quantity}`));
|
|
100
|
+
const defaultActionRail = /* @__PURE__ */ react.default.createElement("aside", { className: `${require_index$2.PREFIX}-a12__rail` }, isShowDelete && onDelete ? /* @__PURE__ */ react.default.createElement("button", {
|
|
99
101
|
type: "button",
|
|
100
|
-
|
|
102
|
+
className: `${require_index$2.PREFIX}-a12__delete`,
|
|
103
|
+
"aria-label": _pisell_utils.locales.getText("pisell2.cart.sku-card.actions.delete"),
|
|
101
104
|
disabled,
|
|
102
105
|
onClick: (event) => {
|
|
103
106
|
event.preventDefault();
|
|
104
107
|
event.stopPropagation();
|
|
105
108
|
onDelete(dataSource);
|
|
106
109
|
}
|
|
107
|
-
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, /* @__PURE__ */ react.default.createElement("
|
|
108
|
-
const defaultActionRail = /* @__PURE__ */ react.default.createElement("aside", { className: `${require_index$2.PREFIX}-a12__rail` }, defaultPrice, defaultEdit, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-control` }, defaultQuantityControl));
|
|
110
|
+
}, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, defaultPrice, defaultEdit, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-control` }, defaultQuantityControl));
|
|
109
111
|
const actionRail = (slots === null || slots === void 0 ? void 0 : slots.actionRail) ? slots.actionRail(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, slotContext), {}, {
|
|
110
112
|
defaultPrice,
|
|
111
113
|
defaultEdit,
|
|
@@ -121,7 +123,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
121
123
|
}) : /* @__PURE__ */ react.default.createElement("span", { "aria-hidden": "true" }, String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.name) || "").slice(0, 2))) : null, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__content` }, display.eyebrow ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__eyebrow` }, display.eyebrow) : null, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__name` }, dataSource === null || dataSource === void 0 ? void 0 : dataSource.name), weighingInfo ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__weighing` }, /* @__PURE__ */ react.default.createElement(require_index$1.default, {
|
|
122
124
|
dataSource: weighingInfo,
|
|
123
125
|
symbol
|
|
124
|
-
})) : null, specifications), actionRail);
|
|
126
|
+
})) : null, specifications, contentFooter ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__content-footer` }, contentFooter) : null), actionRail);
|
|
125
127
|
};
|
|
126
128
|
//#endregion
|
|
127
129
|
exports.default = A12;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
--pc-a12-radius: 18px;
|
|
5
5
|
--pc-a12-min-height: 164px;
|
|
6
6
|
--pc-a12-media-width: 228px;
|
|
7
|
-
--pc-a12-rail-width:
|
|
7
|
+
--pc-a12-rail-width: 190px;
|
|
8
8
|
--pc-a12-content-padding: 20px 22px;
|
|
9
9
|
--pc-a12-rail-padding: 18px 20px;
|
|
10
10
|
--pc-a12-accent: #b20d12;
|
|
@@ -67,6 +67,18 @@
|
|
|
67
67
|
padding: var(--pc-a12-content-padding);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
&__content-footer {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 8px;
|
|
74
|
+
margin-top: auto;
|
|
75
|
+
padding-top: 12px;
|
|
76
|
+
|
|
77
|
+
.ant-divider {
|
|
78
|
+
margin: 0 !important;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
70
82
|
&--align-center &__content {
|
|
71
83
|
justify-content: center;
|
|
72
84
|
}
|
|
@@ -145,6 +157,7 @@
|
|
|
145
157
|
}
|
|
146
158
|
|
|
147
159
|
&__rail {
|
|
160
|
+
position: relative;
|
|
148
161
|
display: flex;
|
|
149
162
|
min-width: 0;
|
|
150
163
|
flex-direction: column;
|
|
@@ -154,6 +167,39 @@
|
|
|
154
167
|
border-left: 1px solid var(--pc-a12-border-color);
|
|
155
168
|
}
|
|
156
169
|
|
|
170
|
+
&__delete {
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 6px;
|
|
173
|
+
right: 6px;
|
|
174
|
+
display: grid;
|
|
175
|
+
width: 42px;
|
|
176
|
+
height: 42px;
|
|
177
|
+
padding: 0;
|
|
178
|
+
place-items: center;
|
|
179
|
+
border: 0;
|
|
180
|
+
border-radius: 50%;
|
|
181
|
+
background: transparent;
|
|
182
|
+
color: var(--pc-a12-accent);
|
|
183
|
+
font-size: 26px;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
|
|
186
|
+
.anticon,
|
|
187
|
+
svg {
|
|
188
|
+
width: 30px;
|
|
189
|
+
height: 30px;
|
|
190
|
+
font-size: 30px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&:active {
|
|
194
|
+
background: #fef3f2;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:disabled {
|
|
198
|
+
cursor: not-allowed;
|
|
199
|
+
opacity: 0.5;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
157
203
|
&__price {
|
|
158
204
|
display: flex;
|
|
159
205
|
flex-direction: column;
|
|
@@ -210,18 +256,6 @@
|
|
|
210
256
|
justify-content: center;
|
|
211
257
|
gap: 16px;
|
|
212
258
|
font-weight: 700;
|
|
213
|
-
|
|
214
|
-
button {
|
|
215
|
-
display: grid;
|
|
216
|
-
width: 40px;
|
|
217
|
-
height: 40px;
|
|
218
|
-
place-items: center;
|
|
219
|
-
border: 1px solid #f5b7ba;
|
|
220
|
-
border-radius: 50%;
|
|
221
|
-
background: #fff;
|
|
222
|
-
color: var(--pc-a12-accent);
|
|
223
|
-
cursor: pointer;
|
|
224
|
-
}
|
|
225
259
|
}
|
|
226
260
|
|
|
227
261
|
&--compact {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.52",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"swiper": "^8.4.7",
|
|
96
96
|
"antd-mobile": "^5.38.1",
|
|
97
97
|
"vod-js-sdk-v6": "^1.4.11",
|
|
98
|
-
"@pisell/utils": "3.0.4",
|
|
99
98
|
"@pisell/date-picker": "3.0.10",
|
|
99
|
+
"@pisell/utils": "3.0.4",
|
|
100
100
|
"@pisell/icon": "0.0.11"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|