@pisell/materials 6.2.26 → 6.2.28

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.
Files changed (105) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +144 -160
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +25 -44
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +30 -49
  11. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  13. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  14. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  15. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  16. package/es/components/iconfont/index.d.ts +8 -0
  17. package/es/components/pisellAdjustPrice/index.d.ts +4 -0
  18. package/es/components/pisellAdjustPrice/status.d.ts +32 -0
  19. package/es/components/pisellAdjustPrice/type.d.ts +20 -0
  20. package/es/components/pisellToast/index.d.ts +16 -0
  21. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
  22. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +1 -1
  23. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  24. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  25. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  26. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  27. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  28. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
  29. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  30. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +43 -0
  31. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +282 -0
  32. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
  33. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  34. package/es/components/productCard/cartSkuCard/index.d.ts +9 -0
  35. package/es/components/productCard/cartSkuCard/index.js +28 -9
  36. package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
  37. package/es/components/productCard/components/Header/index.d.ts +3 -0
  38. package/es/components/productCard/components/Sales/index.d.ts +3 -0
  39. package/es/components/productCard/index.d.ts +7 -0
  40. package/es/components/productCard/locales.d.ts +84 -0
  41. package/es/components/productCard/status.d.ts +32 -0
  42. package/es/components/productCard/types.d.ts +84 -0
  43. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  44. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  45. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  46. package/es/components/table/Table/utils.d.ts +1 -1
  47. package/es/components/virtual-keyboard/Amount/index.d.ts +5 -0
  48. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  49. package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
  50. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +21 -0
  51. package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  52. package/es/components/virtual-keyboard/Number/index.d.ts +5 -0
  53. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  54. package/es/components/virtual-keyboard/Number/types.d.ts +25 -0
  55. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
  56. package/es/components/virtual-keyboard/index.d.ts +25 -0
  57. package/es/utils/index.d.ts +1 -1
  58. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  59. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  60. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  61. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  62. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  63. package/lib/components/iconfont/index.d.ts +8 -0
  64. package/lib/components/pisellAdjustPrice/index.d.ts +4 -0
  65. package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
  66. package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
  67. package/lib/components/pisellToast/index.d.ts +16 -0
  68. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
  69. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +1 -1
  70. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  71. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  72. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  73. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  74. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  75. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
  76. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  77. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +43 -0
  78. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +330 -0
  79. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
  80. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  81. package/lib/components/productCard/cartSkuCard/index.d.ts +9 -0
  82. package/lib/components/productCard/cartSkuCard/index.js +29 -13
  83. package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
  84. package/lib/components/productCard/components/Header/index.d.ts +3 -0
  85. package/lib/components/productCard/components/Sales/index.d.ts +3 -0
  86. package/lib/components/productCard/index.d.ts +7 -0
  87. package/lib/components/productCard/locales.d.ts +84 -0
  88. package/lib/components/productCard/status.d.ts +32 -0
  89. package/lib/components/productCard/types.d.ts +84 -0
  90. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  91. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  92. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  93. package/lib/components/table/Table/utils.d.ts +1 -1
  94. package/lib/components/virtual-keyboard/Amount/index.d.ts +5 -0
  95. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  96. package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
  97. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +21 -0
  98. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  99. package/lib/components/virtual-keyboard/Number/index.d.ts +5 -0
  100. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  101. package/lib/components/virtual-keyboard/Number/types.d.ts +25 -0
  102. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
  103. package/lib/components/virtual-keyboard/index.d.ts +25 -0
  104. package/lib/utils/index.d.ts +1 -1
  105. package/package.json +4 -2
@@ -0,0 +1,330 @@
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/cartSkuCard/components/swipeAction/index.tsx
30
+ var swipeAction_exports = {};
31
+ __export(swipeAction_exports, {
32
+ SwipeAction: () => SwipeAction
33
+ });
34
+ module.exports = __toCommonJS(swipeAction_exports);
35
+ var import_web = require("@react-spring/web");
36
+ var import_use_gesture_react = require("@use-gesture/react/dist/use-gesture-react.cjs");
37
+ var import_react = __toESM(require("react"));
38
+ var import_index = require("./index.less");
39
+ function withNativeProps(props, element) {
40
+ const p = {
41
+ ...element.props
42
+ };
43
+ if (props.className) {
44
+ p.className = props.className + (element.props.className ? ` ${element.props.className}` : "");
45
+ }
46
+ if (props.style) {
47
+ p.style = {
48
+ ...props.style,
49
+ ...element.props.style
50
+ };
51
+ }
52
+ return import_react.default.cloneElement(element, p);
53
+ }
54
+ function nearest(arr, target) {
55
+ return arr.reduce((prev, curr) => {
56
+ return Math.abs(curr - target) < Math.abs(prev - target) ? curr : prev;
57
+ });
58
+ }
59
+ function mergeProps(a, b) {
60
+ return {
61
+ ...a,
62
+ ...b
63
+ };
64
+ }
65
+ function withStopPropagation(events, element) {
66
+ if (!events.includes("click")) {
67
+ return element;
68
+ }
69
+ const onClick = (e) => {
70
+ var _a, _b;
71
+ e.stopPropagation();
72
+ (_b = (_a = element.props).onClick) == null ? void 0 : _b.call(_a, e);
73
+ };
74
+ return import_react.default.cloneElement(element, {
75
+ ...element.props,
76
+ onClick
77
+ });
78
+ }
79
+ var Button = ({
80
+ children,
81
+ className,
82
+ style,
83
+ onClick
84
+ }) => {
85
+ return /* @__PURE__ */ import_react.default.createElement(
86
+ "button",
87
+ {
88
+ className,
89
+ style: {
90
+ border: "none",
91
+ background: (style == null ? void 0 : style["--background-color"]) || "transparent",
92
+ ...style
93
+ },
94
+ onClick
95
+ },
96
+ children
97
+ );
98
+ };
99
+ var classPrefix = `pisell-custom-swipe-action`;
100
+ var defaultProps = {
101
+ rightActions: [],
102
+ leftActions: [],
103
+ closeOnTouchOutside: true,
104
+ closeOnAction: true,
105
+ stopPropagation: []
106
+ };
107
+ var SwipeAction = (0, import_react.forwardRef)(
108
+ (p, ref) => {
109
+ const props = mergeProps(defaultProps, p);
110
+ const rootRef = (0, import_react.useRef)(null);
111
+ const leftRef = (0, import_react.useRef)(null);
112
+ const rightRef = (0, import_react.useRef)(null);
113
+ function getWidth(ref2) {
114
+ const element = ref2.current;
115
+ if (!element) return 0;
116
+ return element.offsetWidth;
117
+ }
118
+ function getLeftWidth() {
119
+ return getWidth(leftRef);
120
+ }
121
+ function getRightWidth() {
122
+ return getWidth(rightRef);
123
+ }
124
+ const [{ x }, api] = (0, import_web.useSpring)(
125
+ () => ({
126
+ x: 0,
127
+ config: { tension: 200, friction: 30 }
128
+ }),
129
+ []
130
+ );
131
+ const draggingRef = (0, import_react.useRef)(false);
132
+ const dragCancelRef = (0, import_react.useRef)(null);
133
+ function forceCancelDrag() {
134
+ var _a;
135
+ (_a = dragCancelRef.current) == null ? void 0 : _a.call(dragCancelRef);
136
+ draggingRef.current = false;
137
+ }
138
+ const bind = (0, import_use_gesture_react.useDrag)(
139
+ (state) => {
140
+ var _a;
141
+ dragCancelRef.current = state.cancel;
142
+ if (!state.intentional) return;
143
+ if (state.down) {
144
+ draggingRef.current = true;
145
+ }
146
+ if (!draggingRef.current) return;
147
+ const [offsetX] = state.offset;
148
+ if (state.last) {
149
+ const leftWidth = getLeftWidth();
150
+ const rightWidth = getRightWidth();
151
+ let position = offsetX + state.velocity[0] * state.direction[0] * 50;
152
+ if (offsetX > 0) {
153
+ position = Math.max(0, position);
154
+ } else if (offsetX < 0) {
155
+ position = Math.min(0, position);
156
+ } else {
157
+ position = 0;
158
+ }
159
+ const targetX = nearest([-rightWidth, 0, leftWidth], position);
160
+ api.start({
161
+ x: targetX
162
+ });
163
+ if (targetX !== 0) {
164
+ (_a = p.onActionsReveal) == null ? void 0 : _a.call(p, targetX > 0 ? "left" : "right");
165
+ }
166
+ window.setTimeout(() => {
167
+ draggingRef.current = false;
168
+ });
169
+ } else {
170
+ api.start({
171
+ x: offsetX,
172
+ immediate: true
173
+ });
174
+ }
175
+ },
176
+ {
177
+ from: () => [x.get(), 0],
178
+ bounds: () => {
179
+ const leftWidth = getLeftWidth();
180
+ const rightWidth = getRightWidth();
181
+ return {
182
+ left: -rightWidth,
183
+ right: leftWidth
184
+ };
185
+ },
186
+ axis: "x",
187
+ preventScroll: true,
188
+ pointer: { touch: true },
189
+ triggerAllEvents: true
190
+ }
191
+ );
192
+ const close = () => {
193
+ var _a;
194
+ api.start({
195
+ x: 0
196
+ });
197
+ forceCancelDrag();
198
+ (_a = props.onClose) == null ? void 0 : _a.call(props);
199
+ };
200
+ (0, import_react.useImperativeHandle)(ref, () => ({
201
+ show: (side = "right") => {
202
+ var _a;
203
+ if (side === "right") {
204
+ api.start({
205
+ x: -getRightWidth()
206
+ });
207
+ } else if (side === "left") {
208
+ api.start({
209
+ x: getLeftWidth()
210
+ });
211
+ }
212
+ (_a = p.onActionsReveal) == null ? void 0 : _a.call(p, side);
213
+ },
214
+ close
215
+ }));
216
+ (0, import_react.useEffect)(() => {
217
+ if (!props.closeOnTouchOutside) return;
218
+ function handle(e) {
219
+ if (x.get() === 0) {
220
+ return;
221
+ }
222
+ const root = rootRef.current;
223
+ if (root && !root.contains(e.target)) {
224
+ close();
225
+ }
226
+ }
227
+ document.addEventListener("touchstart", handle);
228
+ return () => {
229
+ document.removeEventListener("touchstart", handle);
230
+ };
231
+ }, [props.closeOnTouchOutside]);
232
+ function renderAction(action) {
233
+ const color = action.color ?? "light";
234
+ const _style = action.style || {};
235
+ return /* @__PURE__ */ import_react.default.createElement(
236
+ Button,
237
+ {
238
+ key: action.key,
239
+ className: `${classPrefix}-action-button`,
240
+ style: {
241
+ "--background-color": colorRecord[color] ?? color,
242
+ ..._style
243
+ },
244
+ onClick: (e) => {
245
+ var _a, _b;
246
+ if (props.closeOnAction) {
247
+ close();
248
+ }
249
+ (_a = action.onClick) == null ? void 0 : _a.call(action, e);
250
+ (_b = props.onAction) == null ? void 0 : _b.call(props, action, e);
251
+ }
252
+ },
253
+ action.text
254
+ );
255
+ }
256
+ return withNativeProps(
257
+ props,
258
+ /* @__PURE__ */ import_react.default.createElement(
259
+ "div",
260
+ {
261
+ className: classPrefix,
262
+ ...bind(),
263
+ ref: rootRef,
264
+ onClickCapture: (e) => {
265
+ if (draggingRef.current) {
266
+ e.stopPropagation();
267
+ e.preventDefault();
268
+ }
269
+ }
270
+ },
271
+ /* @__PURE__ */ import_react.default.createElement(import_web.animated.div, { className: `${classPrefix}-track`, style: { x } }, withStopPropagation(
272
+ props.stopPropagation,
273
+ /* @__PURE__ */ import_react.default.createElement(
274
+ "div",
275
+ {
276
+ className: `${classPrefix}-actions ${classPrefix}-actions-left`,
277
+ ref: leftRef
278
+ },
279
+ props.leftActions.map(renderAction)
280
+ )
281
+ ), /* @__PURE__ */ import_react.default.createElement(
282
+ "div",
283
+ {
284
+ className: `${classPrefix}-content`,
285
+ onClickCapture: (e) => {
286
+ if (x.goal !== 0) {
287
+ e.preventDefault();
288
+ e.stopPropagation();
289
+ close();
290
+ }
291
+ }
292
+ },
293
+ /* @__PURE__ */ import_react.default.createElement(
294
+ import_web.animated.div,
295
+ {
296
+ style: {
297
+ pointerEvents: x.to(
298
+ (v) => v !== 0 && x.goal !== 0 ? "none" : "auto"
299
+ )
300
+ }
301
+ },
302
+ props.children
303
+ )
304
+ ), withStopPropagation(
305
+ props.stopPropagation,
306
+ /* @__PURE__ */ import_react.default.createElement(
307
+ "div",
308
+ {
309
+ className: `${classPrefix}-actions ${classPrefix}-actions-right`,
310
+ ref: rightRef
311
+ },
312
+ props.rightActions.map(renderAction)
313
+ )
314
+ ))
315
+ )
316
+ );
317
+ }
318
+ );
319
+ var colorRecord = {
320
+ light: "#ccc",
321
+ weak: "#999",
322
+ primary: "#1677ff",
323
+ success: "#00b578",
324
+ warning: "#ff8f1f",
325
+ danger: "#ff3141"
326
+ };
327
+ // Annotate the CommonJS export names for ESM import in node:
328
+ 0 && (module.exports = {
329
+ SwipeAction
330
+ });
@@ -0,0 +1,35 @@
1
+ .pisell-custom-swipe-action {
2
+ cursor: grab;
3
+ overflow: hidden;
4
+ touch-action: pan-y;
5
+ &-track {
6
+ position: relative;
7
+ overflow: visible;
8
+ }
9
+ &-content {
10
+ }
11
+ &-actions {
12
+ position: absolute;
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: stretch;
16
+ width: auto;
17
+ white-space: nowrap;
18
+ &-right {
19
+ left: 100%;
20
+ top: 0;
21
+ height: 100%;
22
+ }
23
+ &-left {
24
+ right: 100%;
25
+ top: 0;
26
+ height: 100%;
27
+ }
28
+ }
29
+ &-action-button {
30
+ --border-radius: 0;
31
+ --border-width: 0;
32
+ padding-left: 4px;
33
+ padding-right: 4px;
34
+ }
35
+ }
@@ -0,0 +1,6 @@
1
+ import 'dayjs/locale/zh-cn';
2
+ import 'dayjs/locale/en';
3
+ import 'dayjs/locale/zh-tw';
4
+ import './index.less';
5
+ declare const TimeRange: (props: any) => JSX.Element | null;
6
+ export default TimeRange;
@@ -0,0 +1,9 @@
1
+ import './index.less';
2
+ import { ProductCardTypes } from '../types';
3
+ interface ISKUCardProps extends ProductCardTypes {
4
+ type: 'a2' | 'a5';
5
+ rightActions: any[];
6
+ }
7
+ export declare const PREFIX = "pisell-cart-sku-card";
8
+ declare const CartSkuCard: (props: ISKUCardProps) => JSX.Element;
9
+ export default CartSkuCard;
@@ -35,7 +35,6 @@ __export(cartSkuCard_exports, {
35
35
  module.exports = __toCommonJS(cartSkuCard_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_antd_mobile = require("antd-mobile");
39
38
  var import_utils = require("@pisell/utils");
40
39
  var import_locales = __toESM(require("./locales"));
41
40
  var import_basicInfo = __toESM(require("./components/basicInfo"));
@@ -45,6 +44,7 @@ var import_timeRange = __toESM(require("./components/timeRange"));
45
44
  var import_resources = __toESM(require("./components/resources"));
46
45
  var import_packages = __toESM(require("./components/packages"));
47
46
  var import_sales = __toESM(require("./components/sales"));
47
+ var import_swipeAction = require("./components/swipeAction");
48
48
  var import_index = require("./index.less");
49
49
  var import_iconfont = __toESM(require("../../iconfont"));
50
50
  var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
@@ -74,6 +74,7 @@ var CartSkuCard = (props) => {
74
74
  onChangeResource,
75
75
  onChangeHolder,
76
76
  type,
77
+ rightActions = [],
77
78
  ...other
78
79
  } = props;
79
80
  const useOpenNoteRef = (0, import_react.useRef)();
@@ -84,16 +85,30 @@ var CartSkuCard = (props) => {
84
85
  );
85
86
  console.log("prodcut props", props);
86
87
  const { isShowAction, actionText } = dataSource;
87
- const rightActions = (0, import_react.useMemo)(() => {
88
+ const _rightActions = (0, import_react.useMemo)(() => {
88
89
  const deleteAction = {
89
90
  key: "delete",
90
- text: /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
91
- import_iconfont.default,
91
+ text: /* @__PURE__ */ import_react.default.createElement(
92
+ "div",
92
93
  {
93
- type: "pisell2-trash-01",
94
- style: { fontSize: 20, marginRight: 4 }
95
- }
96
- ), /* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: 12 } }, import_utils.locales.getText("pisell2.cart.sku-card.actions.delete"))),
94
+ style: {
95
+ display: "flex",
96
+ justifyContent: "center",
97
+ alignItems: "center",
98
+ color: "white",
99
+ cursor: "pointer",
100
+ padding: "10px 0px"
101
+ }
102
+ },
103
+ /* @__PURE__ */ import_react.default.createElement(
104
+ import_iconfont.default,
105
+ {
106
+ type: "pisell2-trash-01",
107
+ style: { fontSize: 20, marginRight: 4 }
108
+ }
109
+ ),
110
+ /* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: 12, fontWeight: 500 } }, import_utils.locales.getText("pisell2.cart.sku-card.actions.delete"))
111
+ ),
97
112
  color: "danger",
98
113
  onClick: (e) => {
99
114
  e.preventDefault();
@@ -101,12 +116,12 @@ var CartSkuCard = (props) => {
101
116
  onDelete == null ? void 0 : onDelete(dataSource);
102
117
  }
103
118
  };
104
- const actions = [];
119
+ const actions = [...rightActions];
105
120
  if (isShowDelete) {
106
- actions.push(deleteAction);
121
+ actions.unshift(deleteAction);
107
122
  }
108
123
  return actions;
109
- }, [dataSource, onDelete, isShowDelete]);
124
+ }, [dataSource, onDelete, isShowDelete, rightActions]);
110
125
  const hideDivider = (0, import_react.useMemo)(() => {
111
126
  const { bundle, relation_products } = dataSource;
112
127
  return (bundle == null ? void 0 : bundle.length) || (relation_products == null ? void 0 : relation_products.length);
@@ -179,10 +194,11 @@ var CartSkuCard = (props) => {
179
194
  return renderA2();
180
195
  };
181
196
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
182
- import_antd_mobile.SwipeAction,
197
+ import_swipeAction.SwipeAction,
183
198
  {
199
+ closeOnAction: false,
184
200
  className: (0, import_classnames.default)(`${PREFIX}-wrapper`),
185
- rightActions
201
+ rightActions: _rightActions
186
202
  },
187
203
  /* @__PURE__ */ import_react.default.createElement(
188
204
  "div",
@@ -0,0 +1,96 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.product.card.discount.reason': string;
4
+ 'pisell2.cart.sku-card.more': string;
5
+ 'pisell2.cart.sku-card.packages.title': string;
6
+ 'pisell2.cart.sku-card.sales.title': string;
7
+ 'pisell2.cart.sku-card.actions.delete': string;
8
+ 'pisell2.product.card.day': (val: number) => string;
9
+ 'pisell2.product.card.day.event': (val: number) => string;
10
+ 'pisell2.product.card.minute': (val: number) => string;
11
+ 'pisell2.product.card.discount.note': string;
12
+ 'pisell2.product.card.edit': string;
13
+ 'pisell2.product.card.discount.add.note': string;
14
+ 'pisell2.product.card.discount.edit.note': string;
15
+ 'pisell2.product.card.confirm': string;
16
+ 'pisell2.product.card.cancel': string;
17
+ 'pisell2.product.card.note.pla': string;
18
+ 'pisell2.product.card.items.package': string;
19
+ 'pisell2.product.card.view-all': string;
20
+ 'pisell2.product.card.view-less': string;
21
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
22
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
23
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
24
+ 'pisell2.product.card.add.holder.modal.title.1': string;
25
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
26
+ 'pisell2.product.card.sales': string;
27
+ 'pisell2.product.card.add.holder.modal.cancel': string;
28
+ 'pisell2.product.card.add.holder.modal.clear': string;
29
+ 'pisell2.product.card.add.holder.modal.apply': string;
30
+ 'pisell2.product.card.add.holder.modal.add': string;
31
+ 'pisell2.product.card.closing-soon.warning': string;
32
+ };
33
+ 'zh-CN': {
34
+ 'pisell2.product.card.discount.reason': string;
35
+ 'pisell2.cart.sku-card.more': string;
36
+ 'pisell2.cart.sku-card.packages.title': string;
37
+ 'pisell2.cart.sku-card.sales.title': string;
38
+ 'pisell2.cart.sku-card.actions.delete': string;
39
+ 'pisell2.product.card.edit': string;
40
+ 'pisell2.product.card.day': (val: number) => string;
41
+ 'pisell2.product.card.day.event': (val: number) => string;
42
+ 'pisell2.product.card.minute': (val: number) => string;
43
+ 'pisell2.product.card.discount.note': string;
44
+ 'pisell2.product.card.discount.add.note': string;
45
+ 'pisell2.product.card.discount.edit.note': string;
46
+ 'pisell2.product.card.confirm': string;
47
+ 'pisell2.product.card.cancel': string;
48
+ 'pisell2.product.card.note.pla': string;
49
+ 'pisell2.product.card.items.package': string;
50
+ 'pisell2.product.card.view-all': string;
51
+ 'pisell2.product.card.view-less': string;
52
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
53
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
54
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
55
+ 'pisell2.product.card.add.holder.modal.title.1': string;
56
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
57
+ 'pisell2.product.card.sales': string;
58
+ 'pisell2.product.card.add.holder.modal.cancel': string;
59
+ 'pisell2.product.card.add.holder.modal.clear': string;
60
+ 'pisell2.product.card.add.holder.modal.apply': string;
61
+ 'pisell2.product.card.add.holder.modal.add': string;
62
+ 'pisell2.product.card.closing-soon.warning': string;
63
+ };
64
+ 'zh-HK': {
65
+ 'pisell2.product.card.discount.reason': string;
66
+ 'pisell2.cart.sku-card.more': string;
67
+ 'pisell2.cart.sku-card.packages.title': string;
68
+ 'pisell2.cart.sku-card.sales.title': string;
69
+ 'pisell2.cart.sku-card.actions.delete': string;
70
+ 'pisell2.product.card.edit': string;
71
+ 'pisell2.product.card.day': (val: number) => string;
72
+ 'pisell2.product.card.day.event': (val: number) => string;
73
+ 'pisell2.product.card.minute': (val: number) => string;
74
+ 'pisell2.product.card.discount.note': string;
75
+ 'pisell2.product.card.discount.add.note': string;
76
+ 'pisell2.product.card.discount.edit.note': string;
77
+ 'pisell2.product.card.confirm': string;
78
+ 'pisell2.product.card.cancel': string;
79
+ 'pisell2.product.card.note.pla': string;
80
+ 'pisell2.product.card.items.package': string;
81
+ 'pisell2.product.card.view-all': string;
82
+ 'pisell2.product.card.view-less': string;
83
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
84
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
85
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
86
+ 'pisell2.product.card.add.holder.modal.title.1': string;
87
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
88
+ 'pisell2.product.card.sales': string;
89
+ 'pisell2.product.card.add.holder.modal.cancel': string;
90
+ 'pisell2.product.card.add.holder.modal.clear': string;
91
+ 'pisell2.product.card.add.holder.modal.apply': string;
92
+ 'pisell2.product.card.add.holder.modal.add': string;
93
+ 'pisell2.product.card.closing-soon.warning': string;
94
+ };
95
+ };
96
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Header: (props: any) => JSX.Element;
3
+ export default Header;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Sales: ({ item, isShowNote }: any) => JSX.Element | null;
3
+ export default Sales;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ProductCardTypes } from './types';
3
+ import './index.less';
4
+ declare const ProductCard: React.FC<ProductCardTypes> & {
5
+ V2: any;
6
+ };
7
+ export default ProductCard;
@@ -0,0 +1,84 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.product.card.day': (val: number) => string;
4
+ 'pisell2.product.card.day.event': (val: number) => string;
5
+ 'pisell2.product.card.minute': (val: number) => string;
6
+ 'pisell2.product.card.discount.reason': string;
7
+ 'pisell2.product.card.discount.note': string;
8
+ 'pisell2.product.card.edit': string;
9
+ 'pisell2.product.card.discount.add.note': string;
10
+ 'pisell2.product.card.discount.edit.note': string;
11
+ 'pisell2.product.card.confirm': string;
12
+ 'pisell2.product.card.cancel': string;
13
+ 'pisell2.product.card.note.pla': string;
14
+ 'pisell2.product.card.items.package': string;
15
+ 'pisell2.product.card.view-all': string;
16
+ 'pisell2.product.card.view-less': string;
17
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
18
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
19
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
20
+ 'pisell2.product.card.add.holder.modal.title.1': string;
21
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
22
+ 'pisell2.product.card.sales': string;
23
+ 'pisell2.product.card.add.holder.modal.cancel': string;
24
+ 'pisell2.product.card.add.holder.modal.clear': string;
25
+ 'pisell2.product.card.add.holder.modal.apply': string;
26
+ 'pisell2.product.card.add.holder.modal.add': string;
27
+ 'pisell2.product.card.closing-soon.warning': string;
28
+ };
29
+ 'zh-CN': {
30
+ 'pisell2.product.card.edit': string;
31
+ 'pisell2.product.card.day': (val: number) => string;
32
+ 'pisell2.product.card.day.event': (val: number) => string;
33
+ 'pisell2.product.card.minute': (val: number) => string;
34
+ 'pisell2.product.card.discount.reason': string;
35
+ 'pisell2.product.card.discount.note': string;
36
+ 'pisell2.product.card.discount.add.note': string;
37
+ 'pisell2.product.card.discount.edit.note': string;
38
+ 'pisell2.product.card.confirm': string;
39
+ 'pisell2.product.card.cancel': string;
40
+ 'pisell2.product.card.note.pla': string;
41
+ 'pisell2.product.card.items.package': string;
42
+ 'pisell2.product.card.view-all': string;
43
+ 'pisell2.product.card.view-less': string;
44
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
45
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
46
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
47
+ 'pisell2.product.card.add.holder.modal.title.1': string;
48
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
49
+ 'pisell2.product.card.sales': string;
50
+ 'pisell2.product.card.add.holder.modal.cancel': string;
51
+ 'pisell2.product.card.add.holder.modal.clear': string;
52
+ 'pisell2.product.card.add.holder.modal.apply': string;
53
+ 'pisell2.product.card.add.holder.modal.add': string;
54
+ 'pisell2.product.card.closing-soon.warning': string;
55
+ };
56
+ 'zh-HK': {
57
+ 'pisell2.product.card.edit': string;
58
+ 'pisell2.product.card.day': (val: number) => string;
59
+ 'pisell2.product.card.day.event': (val: number) => string;
60
+ 'pisell2.product.card.minute': (val: number) => string;
61
+ 'pisell2.product.card.discount.reason': string;
62
+ 'pisell2.product.card.discount.note': string;
63
+ 'pisell2.product.card.discount.add.note': string;
64
+ 'pisell2.product.card.discount.edit.note': string;
65
+ 'pisell2.product.card.confirm': string;
66
+ 'pisell2.product.card.cancel': string;
67
+ 'pisell2.product.card.note.pla': string;
68
+ 'pisell2.product.card.items.package': string;
69
+ 'pisell2.product.card.view-all': string;
70
+ 'pisell2.product.card.view-less': string;
71
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
72
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
73
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
74
+ 'pisell2.product.card.add.holder.modal.title.1': string;
75
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
76
+ 'pisell2.product.card.sales': string;
77
+ 'pisell2.product.card.add.holder.modal.cancel': string;
78
+ 'pisell2.product.card.add.holder.modal.clear': string;
79
+ 'pisell2.product.card.add.holder.modal.apply': string;
80
+ 'pisell2.product.card.add.holder.modal.add': string;
81
+ 'pisell2.product.card.closing-soon.warning': string;
82
+ };
83
+ };
84
+ export default _default;