@pisell/materials 2.2.90 → 2.2.92
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/index.js +1 -1
- package/build/lowcode/meta.js +4 -4
- package/build/lowcode/preview.js +144 -144
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -32
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -32
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +43 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +282 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/index.js +28 -9
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +43 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +330 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/index.js +29 -13
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- 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
|
+
}
|
|
@@ -2,6 +2,7 @@ import './index.less';
|
|
|
2
2
|
import { ProductCardTypes } from '../types';
|
|
3
3
|
interface ISKUCardProps extends ProductCardTypes {
|
|
4
4
|
type: 'a2' | 'a5';
|
|
5
|
+
rightActions: any[];
|
|
5
6
|
}
|
|
6
7
|
export declare const PREFIX = "pisell-cart-sku-card";
|
|
7
8
|
declare const CartSkuCard: (props: ISKUCardProps) => JSX.Element;
|
|
@@ -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
|
|
88
|
+
const _rightActions = (0, import_react.useMemo)(() => {
|
|
88
89
|
const deleteAction = {
|
|
89
90
|
key: "delete",
|
|
90
|
-
text: /* @__PURE__ */ import_react.default.createElement(
|
|
91
|
-
|
|
91
|
+
text: /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
"div",
|
|
92
93
|
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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.
|
|
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
|
-
|
|
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",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.92",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -55,6 +55,8 @@
|
|
|
55
55
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
56
56
|
"@dnd-kit/sortable": "^7.0.2",
|
|
57
57
|
"@dnd-kit/utilities": "^3.2.1",
|
|
58
|
+
"@react-spring/web": "^9.6.1",
|
|
59
|
+
"@use-gesture/react": "^10.3.1",
|
|
58
60
|
"@zxing/library": "0.21.2",
|
|
59
61
|
"ahooks": "^3.7.6",
|
|
60
62
|
"antd": "^5.6.3",
|
|
@@ -63,13 +65,13 @@
|
|
|
63
65
|
"crypto-js": "^4.2.0",
|
|
64
66
|
"dayjs": "^1.11.8",
|
|
65
67
|
"libphonenumber-js": "^1.11.17",
|
|
68
|
+
"react-barcode": "^1.5.3",
|
|
66
69
|
"react-infinite-scroll-component": "^6.1.0",
|
|
67
70
|
"react-resizable": "^3.0.5",
|
|
68
71
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
69
72
|
"react-window": "^1.8.10",
|
|
70
73
|
"styled-components": "^6.0.0-rc.3",
|
|
71
74
|
"swiper": "^8.4.7",
|
|
72
|
-
"react-barcode": "^1.5.3",
|
|
73
75
|
"vod-js-sdk-v6": "^1.4.11",
|
|
74
76
|
"@pisell/date-picker": "1.0.101",
|
|
75
77
|
"@pisell/icon": "0.0.11",
|