@pisell/materials 1.0.870 → 1.0.871

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 (133) 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 -144
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +23 -32
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -32
  11. package/es/components/batch-editor/index.d.ts +1 -0
  12. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  13. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
  14. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +98 -0
  16. package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
  17. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -0
  18. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  19. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  20. package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
  21. package/es/components/date-picker/index.d.ts +1 -0
  22. package/es/components/page/index.d.ts +1 -0
  23. package/es/components/pisellInput/index.d.ts +1 -0
  24. package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
  25. package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
  26. package/es/components/pisellModal/components/index.d.ts +1 -0
  27. package/es/components/pisellWalletPassCard/index.d.ts +1 -0
  28. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +43 -0
  29. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +282 -0
  30. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +38 -0
  31. package/es/components/productCard/cartSkuCard/index.d.ts +1 -0
  32. package/es/components/productCard/cartSkuCard/index.js +26 -9
  33. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  34. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  35. package/es/components/productCard/components/Warning/index.d.ts +7 -0
  36. package/es/components/productCard/index.d.ts +7 -0
  37. package/es/components/productCard/utils.d.ts +31 -0
  38. package/es/components/select-time/index.d.ts +1 -0
  39. package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
  40. package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
  41. package/es/components/table/Actions/component/Group/index.d.ts +1 -0
  42. package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
  43. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
  44. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  45. package/es/components/table/Gallery/index.d.ts +5 -0
  46. package/es/components/table/Table/fields/date/index.d.ts +1 -0
  47. package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
  48. package/es/components/table/Table/fields/image/index.d.ts +1 -0
  49. package/es/components/table/Table/fields/link/index.d.ts +1 -0
  50. package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
  51. package/es/components/table/Table/fields/number/index.d.ts +1 -0
  52. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
  53. package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
  54. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  55. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
  56. package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
  57. package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  58. package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
  59. package/es/components/table/Table/fields/search/index.d.ts +1 -0
  60. package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
  61. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  62. package/es/components/table/Table/utils.d.ts +173 -0
  63. package/es/components/table/hooks/useTableSetting.d.ts +22 -0
  64. package/es/components/table/hooks/useTransDataSource.d.ts +12 -0
  65. package/es/components/versionSelect/index.d.ts +1 -0
  66. package/es/components/virtual-keyboard/Amount/index.d.ts +5 -0
  67. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +21 -0
  68. package/es/components/virtual-keyboard/Number/index.d.ts +5 -0
  69. package/es/index.d.ts +142 -0
  70. package/lib/components/batch-editor/index.d.ts +1 -0
  71. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  72. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
  73. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  74. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +98 -0
  75. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
  76. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -0
  77. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  78. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  79. package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
  80. package/lib/components/date-picker/index.d.ts +1 -0
  81. package/lib/components/page/index.d.ts +1 -0
  82. package/lib/components/pisellInput/index.d.ts +1 -0
  83. package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
  84. package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
  85. package/lib/components/pisellModal/components/index.d.ts +1 -0
  86. package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
  87. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +43 -0
  88. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +325 -0
  89. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +38 -0
  90. package/lib/components/productCard/cartSkuCard/index.d.ts +1 -0
  91. package/lib/components/productCard/cartSkuCard/index.js +27 -13
  92. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  93. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  94. package/lib/components/productCard/components/Warning/index.d.ts +7 -0
  95. package/lib/components/productCard/index.d.ts +7 -0
  96. package/lib/components/productCard/utils.d.ts +31 -0
  97. package/lib/components/select-time/index.d.ts +1 -0
  98. package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
  99. package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
  100. package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
  101. package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
  102. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
  103. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  104. package/lib/components/table/Gallery/index.d.ts +5 -0
  105. package/lib/components/table/Table/fields/date/index.d.ts +1 -0
  106. package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
  107. package/lib/components/table/Table/fields/image/index.d.ts +1 -0
  108. package/lib/components/table/Table/fields/link/index.d.ts +1 -0
  109. package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
  110. package/lib/components/table/Table/fields/number/index.d.ts +1 -0
  111. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
  112. package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
  113. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  114. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
  115. package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
  116. package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  117. package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
  118. package/lib/components/table/Table/fields/search/index.d.ts +1 -0
  119. package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
  120. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  121. package/lib/components/table/Table/utils.d.ts +173 -0
  122. package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
  123. package/lib/components/table/hooks/useTransDataSource.d.ts +12 -0
  124. package/lib/components/versionSelect/index.d.ts +1 -0
  125. package/lib/components/virtual-keyboard/Amount/index.d.ts +5 -0
  126. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +21 -0
  127. package/lib/components/virtual-keyboard/Number/index.d.ts +5 -0
  128. package/lib/index.d.ts +142 -0
  129. package/package.json +6 -4
  130. package/es/components/iconfont/index.d.ts +0 -8
  131. package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
  132. package/lib/components/iconfont/index.d.ts +0 -8
  133. package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
@@ -0,0 +1,325 @@
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 = ({ children, className, style, onClick }) => {
80
+ return /* @__PURE__ */ import_react.default.createElement(
81
+ "button",
82
+ {
83
+ className,
84
+ style: {
85
+ border: "none",
86
+ background: (style == null ? void 0 : style["--background-color"]) || "transparent",
87
+ ...style
88
+ },
89
+ onClick
90
+ },
91
+ children
92
+ );
93
+ };
94
+ var classPrefix = `pisell-swipe-action`;
95
+ var defaultProps = {
96
+ rightActions: [],
97
+ leftActions: [],
98
+ closeOnTouchOutside: true,
99
+ closeOnAction: true,
100
+ stopPropagation: []
101
+ };
102
+ var SwipeAction = (0, import_react.forwardRef)(
103
+ (p, ref) => {
104
+ const props = mergeProps(defaultProps, p);
105
+ const rootRef = (0, import_react.useRef)(null);
106
+ const leftRef = (0, import_react.useRef)(null);
107
+ const rightRef = (0, import_react.useRef)(null);
108
+ function getWidth(ref2) {
109
+ const element = ref2.current;
110
+ if (!element) return 0;
111
+ return element.offsetWidth;
112
+ }
113
+ function getLeftWidth() {
114
+ return getWidth(leftRef);
115
+ }
116
+ function getRightWidth() {
117
+ return getWidth(rightRef);
118
+ }
119
+ const [{ x }, api] = (0, import_web.useSpring)(
120
+ () => ({
121
+ x: 0,
122
+ config: { tension: 200, friction: 30 }
123
+ }),
124
+ []
125
+ );
126
+ const draggingRef = (0, import_react.useRef)(false);
127
+ const dragCancelRef = (0, import_react.useRef)(null);
128
+ function forceCancelDrag() {
129
+ var _a;
130
+ (_a = dragCancelRef.current) == null ? void 0 : _a.call(dragCancelRef);
131
+ draggingRef.current = false;
132
+ }
133
+ const bind = (0, import_use_gesture_react.useDrag)(
134
+ (state) => {
135
+ var _a;
136
+ dragCancelRef.current = state.cancel;
137
+ if (!state.intentional) return;
138
+ if (state.down) {
139
+ draggingRef.current = true;
140
+ }
141
+ if (!draggingRef.current) return;
142
+ const [offsetX] = state.offset;
143
+ if (state.last) {
144
+ const leftWidth = getLeftWidth();
145
+ const rightWidth = getRightWidth();
146
+ let position = offsetX + state.velocity[0] * state.direction[0] * 50;
147
+ if (offsetX > 0) {
148
+ position = Math.max(0, position);
149
+ } else if (offsetX < 0) {
150
+ position = Math.min(0, position);
151
+ } else {
152
+ position = 0;
153
+ }
154
+ const targetX = nearest([-rightWidth, 0, leftWidth], position);
155
+ api.start({
156
+ x: targetX
157
+ });
158
+ if (targetX !== 0) {
159
+ (_a = p.onActionsReveal) == null ? void 0 : _a.call(p, targetX > 0 ? "left" : "right");
160
+ }
161
+ window.setTimeout(() => {
162
+ draggingRef.current = false;
163
+ });
164
+ } else {
165
+ api.start({
166
+ x: offsetX,
167
+ immediate: true
168
+ });
169
+ }
170
+ },
171
+ {
172
+ from: () => [x.get(), 0],
173
+ bounds: () => {
174
+ const leftWidth = getLeftWidth();
175
+ const rightWidth = getRightWidth();
176
+ return {
177
+ left: -rightWidth,
178
+ right: leftWidth
179
+ };
180
+ },
181
+ axis: "x",
182
+ preventScroll: true,
183
+ pointer: { touch: true },
184
+ triggerAllEvents: true
185
+ }
186
+ );
187
+ const close = () => {
188
+ var _a;
189
+ api.start({
190
+ x: 0
191
+ });
192
+ forceCancelDrag();
193
+ (_a = props.onClose) == null ? void 0 : _a.call(props);
194
+ };
195
+ (0, import_react.useImperativeHandle)(ref, () => ({
196
+ show: (side = "right") => {
197
+ var _a;
198
+ if (side === "right") {
199
+ api.start({
200
+ x: -getRightWidth()
201
+ });
202
+ } else if (side === "left") {
203
+ api.start({
204
+ x: getLeftWidth()
205
+ });
206
+ }
207
+ (_a = p.onActionsReveal) == null ? void 0 : _a.call(p, side);
208
+ },
209
+ close
210
+ }));
211
+ (0, import_react.useEffect)(() => {
212
+ if (!props.closeOnTouchOutside) return;
213
+ function handle(e) {
214
+ if (x.get() === 0) {
215
+ return;
216
+ }
217
+ const root = rootRef.current;
218
+ if (root && !root.contains(e.target)) {
219
+ close();
220
+ }
221
+ }
222
+ document.addEventListener("touchstart", handle);
223
+ return () => {
224
+ document.removeEventListener("touchstart", handle);
225
+ };
226
+ }, [props.closeOnTouchOutside]);
227
+ function renderAction(action) {
228
+ const color = action.color ?? "light";
229
+ const _style = action.style || {};
230
+ return /* @__PURE__ */ import_react.default.createElement(
231
+ Button,
232
+ {
233
+ key: action.key,
234
+ className: `${classPrefix}-action-button`,
235
+ style: {
236
+ "--background-color": colorRecord[color] ?? color,
237
+ ..._style
238
+ },
239
+ onClick: (e) => {
240
+ var _a, _b;
241
+ if (props.closeOnAction) {
242
+ close();
243
+ }
244
+ (_a = action.onClick) == null ? void 0 : _a.call(action, e);
245
+ (_b = props.onAction) == null ? void 0 : _b.call(props, action, e);
246
+ }
247
+ },
248
+ action.text
249
+ );
250
+ }
251
+ return withNativeProps(
252
+ props,
253
+ /* @__PURE__ */ import_react.default.createElement(
254
+ "div",
255
+ {
256
+ className: classPrefix,
257
+ ...bind(),
258
+ ref: rootRef,
259
+ onClickCapture: (e) => {
260
+ if (draggingRef.current) {
261
+ e.stopPropagation();
262
+ e.preventDefault();
263
+ }
264
+ }
265
+ },
266
+ /* @__PURE__ */ import_react.default.createElement(import_web.animated.div, { className: `${classPrefix}-track`, style: { x } }, withStopPropagation(
267
+ props.stopPropagation,
268
+ /* @__PURE__ */ import_react.default.createElement(
269
+ "div",
270
+ {
271
+ className: `${classPrefix}-actions ${classPrefix}-actions-left`,
272
+ ref: leftRef
273
+ },
274
+ props.leftActions.map(renderAction)
275
+ )
276
+ ), /* @__PURE__ */ import_react.default.createElement(
277
+ "div",
278
+ {
279
+ className: `${classPrefix}-content`,
280
+ onClickCapture: (e) => {
281
+ if (x.goal !== 0) {
282
+ e.preventDefault();
283
+ e.stopPropagation();
284
+ close();
285
+ }
286
+ }
287
+ },
288
+ /* @__PURE__ */ import_react.default.createElement(
289
+ import_web.animated.div,
290
+ {
291
+ style: {
292
+ pointerEvents: x.to(
293
+ (v) => v !== 0 && x.goal !== 0 ? "none" : "auto"
294
+ )
295
+ }
296
+ },
297
+ props.children
298
+ )
299
+ ), withStopPropagation(
300
+ props.stopPropagation,
301
+ /* @__PURE__ */ import_react.default.createElement(
302
+ "div",
303
+ {
304
+ className: `${classPrefix}-actions ${classPrefix}-actions-right`,
305
+ ref: rightRef
306
+ },
307
+ props.rightActions.map(renderAction)
308
+ )
309
+ ))
310
+ )
311
+ );
312
+ }
313
+ );
314
+ var colorRecord = {
315
+ light: "var(--adm-color-light)",
316
+ weak: "var(--adm-color-weak)",
317
+ primary: "var(--adm-color-primary)",
318
+ success: "var(--adm-color-success)",
319
+ warning: "var(--adm-color-warning)",
320
+ danger: "var(--adm-color-danger)"
321
+ };
322
+ // Annotate the CommonJS export names for ESM import in node:
323
+ 0 && (module.exports = {
324
+ SwipeAction
325
+ });
@@ -0,0 +1,38 @@
1
+ .pisell-swipe-action {
2
+ --background: var(--adm-color-background);
3
+ background: var(--background);
4
+ cursor: grab;
5
+ overflow: hidden;
6
+ touch-action: pan-y;
7
+ &-track {
8
+ position: relative;
9
+ overflow: visible;
10
+ }
11
+ &-content {
12
+ }
13
+ &-actions {
14
+ position: absolute;
15
+ display: flex;
16
+ justify-content: center;
17
+ align-items: stretch;
18
+ width: auto;
19
+ white-space: nowrap;
20
+ &-right {
21
+ left: 100%;
22
+ top: 0;
23
+ height: 100%;
24
+ }
25
+ &-left {
26
+ right: 100%;
27
+ top: 0;
28
+ height: 100%;
29
+ }
30
+ }
31
+ &-action-button {
32
+ --border-radius: 0;
33
+ --border-width: 0;
34
+ --text-color: var(--adm-color-text-light-solid);
35
+ padding-left: 4px;
36
+ padding-right: 4px;
37
+ }
38
+ }
@@ -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,28 @@ 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
+ }
100
+ },
101
+ /* @__PURE__ */ import_react.default.createElement(
102
+ import_iconfont.default,
103
+ {
104
+ type: "pisell2-trash-01",
105
+ style: { fontSize: 20, marginRight: 4 }
106
+ }
107
+ ),
108
+ /* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: 12, fontWeight: 500 } }, import_utils.locales.getText("pisell2.cart.sku-card.actions.delete"))
109
+ ),
97
110
  color: "danger",
98
111
  onClick: (e) => {
99
112
  e.preventDefault();
@@ -101,12 +114,12 @@ var CartSkuCard = (props) => {
101
114
  onDelete == null ? void 0 : onDelete(dataSource);
102
115
  }
103
116
  };
104
- const actions = [];
117
+ const actions = [...rightActions];
105
118
  if (isShowDelete) {
106
- actions.push(deleteAction);
119
+ actions.unshift(deleteAction);
107
120
  }
108
121
  return actions;
109
- }, [dataSource, onDelete, isShowDelete]);
122
+ }, [dataSource, onDelete, isShowDelete, rightActions]);
110
123
  const hideDivider = (0, import_react.useMemo)(() => {
111
124
  const { bundle, relation_products } = dataSource;
112
125
  return (bundle == null ? void 0 : bundle.length) || (relation_products == null ? void 0 : relation_products.length);
@@ -179,10 +192,11 @@ var CartSkuCard = (props) => {
179
192
  return renderA2();
180
193
  };
181
194
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
182
- import_antd_mobile.SwipeAction,
195
+ import_swipeAction.SwipeAction,
183
196
  {
197
+ closeOnAction: false,
184
198
  className: (0, import_classnames.default)(`${PREFIX}-wrapper`),
185
- rightActions
199
+ rightActions: _rightActions
186
200
  },
187
201
  /* @__PURE__ */ import_react.default.createElement(
188
202
  "div",
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const SelectHolder: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
3
+ export default SelectHolder;
@@ -0,0 +1,18 @@
1
+ import './index.less';
2
+ interface ResourceItem {
3
+ id: string | number;
4
+ label: string;
5
+ isError?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ interface SelectResourceProps {
9
+ lists: ResourceItem[];
10
+ value: any;
11
+ onChange: (val: any) => void;
12
+ resourceMode?: 'multiple' | 'tags' | undefined;
13
+ maxLength?: number;
14
+ isParallelResource?: boolean;
15
+ [key: string]: any;
16
+ }
17
+ declare const SelectResource: ({ lists, value, onChange, resourceMode, allowClear, onClearResource, maxLength, isErrorResource, resourceErrorText, ...props }: SelectResourceProps) => JSX.Element;
18
+ export default SelectResource;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import '../../index.less';
3
+ declare const Warning: React.FC<{
4
+ errorMessage: string | Array<string>;
5
+ osWarnTips: Array<string>;
6
+ }>;
7
+ export default Warning;
@@ -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,31 @@
1
+ import 'dayjs/locale/zh-cn';
2
+ import 'dayjs/locale/en';
3
+ import 'dayjs/locale/zh-tw';
4
+ /**
5
+ * @title: 是否英文
6
+ * @description:
7
+ * @param {any} item
8
+ * @return {*}
9
+ * @Author: WangHan
10
+ * @Date: 2024-12-28 22:49
11
+ */
12
+ export declare const isEn: (item: any) => boolean;
13
+ /**
14
+ * @title: 跨日预约时间
15
+ * @description:
16
+ * @param {any} item
17
+ * @return {*}
18
+ * @Author: WangHan
19
+ * @Date: 2024-12-28 22:50
20
+ */
21
+ export declare const formatMultiDayDate: (item: any) => string;
22
+ /**
23
+ * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
24
+ * @description:
25
+ * @param {any} item
26
+ * @param {any} currentDate
27
+ * @return {*}
28
+ * @Author: zhiwei.Wang
29
+ * @Date: 2024-04-26 14:04
30
+ */
31
+ export declare const getServiceTime: (item: any, currentDate: any) => string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { VirtualKeyboardTimeProps } from "../virtual-keyboard/Time";
2
3
  import { PopoverProps, TimePickerProps } from "antd";
3
4
  import "./index.less";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type ColumnsSettingProps = {
2
3
  value?: Record<string, any>[];
3
4
  onChange?: (val: Record<string, any>[]) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GallerySettingType, ModeType } from "../../../types";
2
3
  import "./index.less";
3
4
  declare type GallerySettingProps = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DataSourceGroupType } from "../../../types";
2
3
  declare type GroupProps = {
3
4
  setting: DataSourceGroupType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GallerySettingType, GallerySettingValueType } from "../../../../../types";
2
3
  declare type CoverProps = {
3
4
  cover?: GallerySettingType["cover"];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GallerySettingType } from "../../../../../types";
2
3
  import "./index.less";
3
4
  declare type TitleProps = GallerySettingType["title"] & {
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { GallerySettingType, GallerySettingValueType } from "../../../types";
3
+ import "./index.less";
4
+ declare type GalleryItemProps = {
5
+ record: Record<string, any>;
6
+ gallery: GallerySettingType;
7
+ columnsMap: Map<string, Record<string, any>>;
8
+ index: number;
9
+ gallerySetting: GallerySettingValueType;
10
+ columns: Record<string, any>[];
11
+ onClick: React.MouseEventHandler<HTMLDivElement>;
12
+ };
13
+ declare const GalleryItem: (props: GalleryItemProps) => JSX.Element;
14
+ export default GalleryItem;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { GalleryProps } from './types';
3
+ import './index.less';
4
+ declare const _default: React.MemoExoticComponent<(props: GalleryProps) => JSX.Element>;
5
+ export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: {
2
3
  field: {
3
4
  field_icon: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: {
2
3
  field: {
3
4
  field_icon: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: {
2
3
  field: {
3
4
  field_icon: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;