@pisell/materials 6.12.50 → 6.12.51
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 +44 -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 +44 -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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicCardProps } from "./types.js";
|
|
3
2
|
import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
|
|
4
3
|
import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
|
|
3
2
|
import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
|
|
4
3
|
import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
|
|
@@ -222,19 +222,28 @@ const CartSkuCard = (props) => {
|
|
|
222
222
|
openNote: openNoteEditor
|
|
223
223
|
})) : null);
|
|
224
224
|
};
|
|
225
|
-
const renderA12 = () =>
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
225
|
+
const renderA12 = () => {
|
|
226
|
+
var _a12Slots$contentFoot;
|
|
227
|
+
const note = isShowNote ? /* @__PURE__ */ React.createElement(Note, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
228
|
+
item: dataSource,
|
|
229
|
+
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
230
|
+
openNote: openNoteEditor
|
|
231
|
+
})) : null;
|
|
232
|
+
const slots = note ? _objectSpread2(_objectSpread2({}, a12Slots), {}, { contentFooter: (_a12Slots$contentFoot = a12Slots === null || a12Slots === void 0 ? void 0 : a12Slots.contentFooter) !== null && _a12Slots$contentFoot !== void 0 ? _a12Slots$contentFoot : (() => note) }) : a12Slots;
|
|
233
|
+
return /* @__PURE__ */ React.createElement(A12, {
|
|
234
|
+
dataSource,
|
|
235
|
+
isShowImage,
|
|
236
|
+
isShowDelete,
|
|
237
|
+
isShowOriginalPrice,
|
|
238
|
+
isShowEditProduct,
|
|
239
|
+
disabled: Boolean(disabledClick),
|
|
240
|
+
disabledEditClick,
|
|
241
|
+
slots,
|
|
242
|
+
presentation: a12Presentation,
|
|
243
|
+
onDelete,
|
|
244
|
+
onEditProduct
|
|
245
|
+
});
|
|
246
|
+
};
|
|
238
247
|
const renderContent = () => {
|
|
239
248
|
if (type === "a12") return renderA12();
|
|
240
249
|
if (type === "a9") return renderA9();
|
|
@@ -11,6 +11,7 @@ interface CartSkuCardSlotContext {
|
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
}
|
|
13
13
|
interface CartSkuCardA12Slots {
|
|
14
|
+
contentFooter?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
14
15
|
quantityControl?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
15
16
|
actionRail?: (context: CartSkuCardSlotContext & {
|
|
16
17
|
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;
|
|
66
|
+
var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter;
|
|
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]);
|
|
@@ -81,6 +81,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
81
81
|
key: specification.key
|
|
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
|
+
const contentFooter = slots === null || slots === void 0 || (_slots$contentFooter = slots.contentFooter) === null || _slots$contentFooter === void 0 ? void 0 : _slots$contentFooter.call(slots, slotContext);
|
|
84
85
|
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);
|
|
85
86
|
const defaultEdit = Boolean(isShowEditProduct && onEditProduct) ? /* @__PURE__ */ React.createElement("button", {
|
|
86
87
|
type: "button",
|
|
@@ -92,17 +93,18 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
92
93
|
onEditProduct === null || onEditProduct === void 0 || onEditProduct(dataSource);
|
|
93
94
|
}
|
|
94
95
|
}, locales.getText("pisell2.product.card.edit")) : null;
|
|
95
|
-
const defaultQuantityControl = (slots === null || slots === void 0 ? void 0 : slots.quantityControl) ? slots.quantityControl(slotContext) : /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__quantity-fallback` },
|
|
96
|
+
const defaultQuantityControl = (slots === null || slots === void 0 ? void 0 : slots.quantityControl) ? slots.quantityControl(slotContext) : /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__quantity-fallback` }, /* @__PURE__ */ React.createElement("span", null, display.quantityText || `× ${quantity}`));
|
|
97
|
+
const defaultActionRail = /* @__PURE__ */ React.createElement("aside", { className: `${PREFIX}-a12__rail` }, isShowDelete && onDelete ? /* @__PURE__ */ React.createElement("button", {
|
|
96
98
|
type: "button",
|
|
97
|
-
|
|
99
|
+
className: `${PREFIX}-a12__delete`,
|
|
100
|
+
"aria-label": locales.getText("pisell2.cart.sku-card.actions.delete"),
|
|
98
101
|
disabled,
|
|
99
102
|
onClick: (event) => {
|
|
100
103
|
event.preventDefault();
|
|
101
104
|
event.stopPropagation();
|
|
102
105
|
onDelete(dataSource);
|
|
103
106
|
}
|
|
104
|
-
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-trash-01" })) : null, /* @__PURE__ */ React.createElement("
|
|
105
|
-
const defaultActionRail = /* @__PURE__ */ React.createElement("aside", { className: `${PREFIX}-a12__rail` }, defaultPrice, defaultEdit, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__quantity-control` }, defaultQuantityControl));
|
|
107
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-trash-01" })) : null, defaultPrice, defaultEdit, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__quantity-control` }, defaultQuantityControl));
|
|
106
108
|
const actionRail = (slots === null || slots === void 0 ? void 0 : slots.actionRail) ? slots.actionRail(_objectSpread2(_objectSpread2({}, slotContext), {}, {
|
|
107
109
|
defaultPrice,
|
|
108
110
|
defaultEdit,
|
|
@@ -118,7 +120,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
|
|
|
118
120
|
}) : /* @__PURE__ */ React.createElement("span", { "aria-hidden": "true" }, String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.name) || "").slice(0, 2))) : null, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__content` }, display.eyebrow ? /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__eyebrow` }, display.eyebrow) : null, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__name` }, dataSource === null || dataSource === void 0 ? void 0 : dataSource.name), weighingInfo ? /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__weighing` }, /* @__PURE__ */ React.createElement(Weighing, {
|
|
119
121
|
dataSource: weighingInfo,
|
|
120
122
|
symbol
|
|
121
|
-
})) : null, specifications), actionRail);
|
|
123
|
+
})) : null, specifications, contentFooter ? /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-a12__content-footer` }, contentFooter) : null), actionRail);
|
|
122
124
|
};
|
|
123
125
|
//#endregion
|
|
124
126
|
export { A12 as default };
|
|
@@ -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,15 @@
|
|
|
67
67
|
padding: var(--pc-a12-content-padding);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
&__content-footer {
|
|
71
|
+
margin-top: auto;
|
|
72
|
+
padding-top: 12px;
|
|
73
|
+
|
|
74
|
+
.ant-divider {
|
|
75
|
+
margin-bottom: 16px !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
&--align-center &__content {
|
|
71
80
|
justify-content: center;
|
|
72
81
|
}
|
|
@@ -145,6 +154,7 @@
|
|
|
145
154
|
}
|
|
146
155
|
|
|
147
156
|
&__rail {
|
|
157
|
+
position: relative;
|
|
148
158
|
display: flex;
|
|
149
159
|
min-width: 0;
|
|
150
160
|
flex-direction: column;
|
|
@@ -154,6 +164,39 @@
|
|
|
154
164
|
border-left: 1px solid var(--pc-a12-border-color);
|
|
155
165
|
}
|
|
156
166
|
|
|
167
|
+
&__delete {
|
|
168
|
+
position: absolute;
|
|
169
|
+
top: 6px;
|
|
170
|
+
right: 6px;
|
|
171
|
+
display: grid;
|
|
172
|
+
width: 42px;
|
|
173
|
+
height: 42px;
|
|
174
|
+
padding: 0;
|
|
175
|
+
place-items: center;
|
|
176
|
+
border: 0;
|
|
177
|
+
border-radius: 50%;
|
|
178
|
+
background: transparent;
|
|
179
|
+
color: var(--pc-a12-accent);
|
|
180
|
+
font-size: 26px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
|
|
183
|
+
.anticon,
|
|
184
|
+
svg {
|
|
185
|
+
width: 30px;
|
|
186
|
+
height: 30px;
|
|
187
|
+
font-size: 30px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:active {
|
|
191
|
+
background: #fef3f2;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&:disabled {
|
|
195
|
+
cursor: not-allowed;
|
|
196
|
+
opacity: 0.5;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
157
200
|
&__price {
|
|
158
201
|
display: flex;
|
|
159
202
|
flex-direction: column;
|
|
@@ -210,18 +253,6 @@
|
|
|
210
253
|
justify-content: center;
|
|
211
254
|
gap: 16px;
|
|
212
255
|
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
256
|
}
|
|
226
257
|
|
|
227
258
|
&--compact {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicCardProps } from "./types.js";
|
|
3
2
|
import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
|
|
4
3
|
import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
|
|
3
2
|
import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
|
|
4
3
|
import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
|
|
@@ -225,19 +225,28 @@ const CartSkuCard = (props) => {
|
|
|
225
225
|
openNote: openNoteEditor
|
|
226
226
|
})) : null);
|
|
227
227
|
};
|
|
228
|
-
const renderA12 = () =>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
228
|
+
const renderA12 = () => {
|
|
229
|
+
var _a12Slots$contentFoot;
|
|
230
|
+
const note = isShowNote ? /* @__PURE__ */ react.default.createElement(require_index$9.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
|
|
231
|
+
item: dataSource,
|
|
232
|
+
disabledEdit: disabledNoteEdit !== null && disabledNoteEdit !== void 0 ? disabledNoteEdit : other.disabledEdit,
|
|
233
|
+
openNote: openNoteEditor
|
|
234
|
+
})) : null;
|
|
235
|
+
const slots = note ? require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, a12Slots), {}, { contentFooter: (_a12Slots$contentFoot = a12Slots === null || a12Slots === void 0 ? void 0 : a12Slots.contentFooter) !== null && _a12Slots$contentFoot !== void 0 ? _a12Slots$contentFoot : (() => note) }) : a12Slots;
|
|
236
|
+
return /* @__PURE__ */ react.default.createElement(require_index$16.default, {
|
|
237
|
+
dataSource,
|
|
238
|
+
isShowImage,
|
|
239
|
+
isShowDelete,
|
|
240
|
+
isShowOriginalPrice,
|
|
241
|
+
isShowEditProduct,
|
|
242
|
+
disabled: Boolean(disabledClick),
|
|
243
|
+
disabledEditClick,
|
|
244
|
+
slots,
|
|
245
|
+
presentation: a12Presentation,
|
|
246
|
+
onDelete,
|
|
247
|
+
onEditProduct
|
|
248
|
+
});
|
|
249
|
+
};
|
|
241
250
|
const renderContent = () => {
|
|
242
251
|
if (type === "a12") return renderA12();
|
|
243
252
|
if (type === "a9") return renderA9();
|
|
@@ -11,6 +11,7 @@ interface CartSkuCardSlotContext {
|
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
}
|
|
13
13
|
interface CartSkuCardA12Slots {
|
|
14
|
+
contentFooter?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
14
15
|
quantityControl?: (context: CartSkuCardSlotContext) => ReactNode;
|
|
15
16
|
actionRail?: (context: CartSkuCardSlotContext & {
|
|
16
17
|
defaultPrice: ReactNode;
|