@pisell/private-materials 6.1.4 → 6.1.6

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 (92) 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/render/default/view.js +3 -3
  7. package/build/lowcode/view.js +3 -3
  8. package/es/components/booking/addons/model.d.ts +10 -1
  9. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  10. package/es/components/booking/components/browserSelect/index.js +1 -1
  11. package/es/components/booking/forms/model.d.ts +10 -1
  12. package/es/components/booking/forms/model.js +5 -5
  13. package/es/components/booking/info/model.d.ts +10 -1
  14. package/es/components/booking/info/service/like/index.js +1 -1
  15. package/es/components/booking/info2/service/editService/index.js +28 -12
  16. package/es/components/booking/materiels/startTime/index.js +1 -1
  17. package/es/components/booking/model.d.ts +9 -1
  18. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  19. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  20. package/es/components/booking/notes/model.d.ts +10 -1
  21. package/es/components/booking/notes/model.js +5 -5
  22. package/es/components/booking/payments/model.d.ts +10 -1
  23. package/es/components/booking/payments/model.js +5 -5
  24. package/es/components/listComponent/index.js +5 -5
  25. package/es/components/pay/toC/model.d.ts +9 -1
  26. package/es/components/productExtension/card/index.js +3 -3
  27. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  28. package/es/components/productExtension/fields/Forms/index.js +12 -12
  29. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  30. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  31. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  32. package/es/components/productExtension/server.js +2 -2
  33. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  34. package/es/components/schedules/calendar/index.js +4 -4
  35. package/es/components/schedules/calendar/serve.js +2 -2
  36. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  37. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  38. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  39. package/es/components/schedules/components/ResourceList/index.js +1 -1
  40. package/es/components/schedules/components/Search/index.js +5 -5
  41. package/es/components/schedules/model.d.ts +9 -1
  42. package/es/components/schedules/model.js +5 -5
  43. package/es/components/schedules/openHours/index.js +1 -1
  44. package/es/components/schedules/openHours/serve.js +2 -2
  45. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  46. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  47. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  48. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  49. package/es/components/schedules/products/serve.js +2 -2
  50. package/es/components/schedules/products/utils.js +5 -5
  51. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  52. package/es/components/schedules/resources/detail/index.js +10 -10
  53. package/es/components/schedules/resources/list/index.js +2 -2
  54. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  55. package/es/components/schedules/resources/serve.js +2 -2
  56. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  57. package/es/components/schedules/utils.js +4 -4
  58. package/es/components/selectModal/index.js +2 -2
  59. package/es/components/ticketBooking/components/addServiceVariant/addService.js +178 -156
  60. package/es/components/wallet/Detail/model.d.ts +13 -1
  61. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  62. package/es/components/wallet/PointCard/model.d.ts +13 -1
  63. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  64. package/es/components/wallet/Voucher/model.d.ts +13 -1
  65. package/es/components/wallet/model.d.ts +9 -1
  66. package/es/hooks/useComponents.js +1 -1
  67. package/lib/components/booking/addons/model.d.ts +10 -1
  68. package/lib/components/booking/forms/model.d.ts +10 -1
  69. package/lib/components/booking/info/model.d.ts +10 -1
  70. package/lib/components/booking/info2/service/editService/index.js +20 -7
  71. package/lib/components/booking/model.d.ts +9 -1
  72. package/lib/components/booking/notes/model.d.ts +10 -1
  73. package/lib/components/booking/payments/model.d.ts +10 -1
  74. package/lib/components/pay/toC/model.d.ts +9 -1
  75. package/lib/components/schedules/model.d.ts +9 -1
  76. package/lib/components/schedules/utils.js +1 -1
  77. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +147 -126
  78. package/lib/components/wallet/Detail/model.d.ts +13 -1
  79. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  80. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  81. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  82. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  83. package/lib/components/wallet/model.d.ts +9 -1
  84. package/package.json +2 -2
  85. package/es/components/booking/components/drawer/index.d.ts +0 -19
  86. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  87. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  88. package/es/components/booking/materiels/duration/index.d.ts +0 -13
  89. package/lib/components/booking/components/drawer/index.d.ts +0 -19
  90. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  91. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  92. package/lib/components/booking/materiels/duration/index.d.ts +0 -13
@@ -261,16 +261,193 @@ var AddSerivce = function AddSerivce(props) {
261
261
  }();
262
262
  var handleSelectProduct = useMemoizedFn(function (item) {
263
263
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'select';
264
+ console.log('点击了加入购物车');
264
265
  var isSession = isSessionProduct(item);
265
266
  // 是否有单规格 组合规格 套餐, 或者session商品 如果没有不需要打开弹窗
266
267
  var isEject = getIsEject(item, type);
267
268
  var isOnlySession = getIsOnlySession(item);
268
269
  var lock = false;
270
+ // 对于不需要打开弹窗的商品, 直接模拟数据, 不走弹窗
271
+ var cacheValues = null;
269
272
  if (isEject) {
270
273
  setCurrentProduct(item);
271
274
  } else {
272
275
  setCurrentProduct(null);
276
+ cacheValues = {
277
+ bundle: [],
278
+ key: item.id,
279
+ option: [],
280
+ product_id: item.id,
281
+ product_variant_id: 0,
282
+ quantity: 1,
283
+ rowKey: item.id,
284
+ session: null,
285
+ unique: '08974625397'
286
+ };
273
287
  }
288
+ var callback = /*#__PURE__*/function () {
289
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e, extension_type, detail) {
290
+ var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI, _Toast$success, _addService, _list, quantity, _context$appHelper$ut3, _context$appHelper$ut4, val, sendData;
291
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
292
+ while (1) switch (_context3.prev = _context3.next) {
293
+ case 0:
294
+ console.timeEnd('打开弹窗');
295
+ console.log('点击了加入购物车 ---弹窗', e);
296
+ setCurrentProduct(null);
297
+ // 防止选择商品弹窗多次触发callback
298
+ if (!lock) {
299
+ _context3.next = 5;
300
+ break;
301
+ }
302
+ return _context3.abrupt("return");
303
+ case 5:
304
+ lock = true;
305
+
306
+ // 2秒后解除
307
+ setTimeout(function () {
308
+ lock = false;
309
+ }, 2000);
310
+ if (isBooking4) {
311
+ _context3.next = 13;
312
+ break;
313
+ }
314
+ _context3.next = 10;
315
+ return createBookingData({
316
+ product: _objectSpread(_objectSpread({}, detail || item), {}, {
317
+ _params: e
318
+ })
319
+ });
320
+ case 10:
321
+ data = _context3.sent;
322
+ // 创建预约
323
+ createBooking({
324
+ booking: data
325
+ });
326
+ return _context3.abrupt("return");
327
+ case 13:
328
+ // info2 addService 逻辑
329
+ _detail = detail || item;
330
+ other = JSON.parse(JSON.stringify(e));
331
+ other.session = e.session;
332
+ cacheItem = _objectSpread(_objectSpread({}, _detail), {}, {
333
+ product_id: item.id,
334
+ _id: getUniqueId(),
335
+ _key: e.key,
336
+ _extend: {
337
+ start_date: state.date.value,
338
+ quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
339
+ price: _detail.price,
340
+ product_name: item.title,
341
+ other: other
342
+ },
343
+ new: 1
344
+ });
345
+ _total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
346
+ cacheItem._extend.total = _total;
347
+ // 用于储存原价
348
+ cacheItem._extend.origin_total = _total;
349
+ _isEdit = !!state.service.cacheItem;
350
+ if (_isEdit) {
351
+ cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
352
+ cacheItem.new = 0;
353
+ }
354
+ // 渲染到当前位置模式时,默认无资源 时间默认取顶部设置的时间
355
+ if (renderMode === 'current') {
356
+ // cacheItem._extend.resource = 0;
357
+ cacheItem.currentDefaultTime = state.date.value.format('HH:mm');
358
+ }
359
+ cacheItem = getProductExtend({
360
+ cacheItem: cacheItem,
361
+ state: state,
362
+ isDisabledTime: true
363
+ });
364
+ if (state.renderType === 'eventBooking') {
365
+ cacheItem.autoClose = false;
366
+ }
367
+ if (cacheItem.autoClose) {
368
+ cacheItem.autoClose = false;
369
+ cacheItem._serviceKey = genServiceKey(cacheItem);
370
+ _addService = addService(_toConsumableArray(state.service.value), cacheItem, state), _list = _addService.list, quantity = _addService.quantity;
371
+ Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, /*#__PURE__*/React.createElement("div", {
372
+ className: "add-toast-wrap"
373
+ }, /*#__PURE__*/React.createElement("div", {
374
+ className: "add-toast-title"
375
+ }, cacheItem.title), /*#__PURE__*/React.createElement("div", {
376
+ className: "add-toast-quantity"
377
+ }, locales.getText('pisell2.ticket-booking.in-cart')(quantity || 1))));
378
+ addServiceScroll(e.rowKey, cacheItem);
379
+ try {
380
+ if (((_context$appHelper$ut3 = context.appHelper.utils.store) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut3.getState) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.call(_context$appHelper$ut3)) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.global) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.id) === 2155) {
381
+ val = _list === null || _list === void 0 ? void 0 : _list.map(function (s) {
382
+ return {
383
+ product_id: s === null || s === void 0 ? void 0 : s.product_id,
384
+ detailId: s === null || s === void 0 ? void 0 : s.id,
385
+ detailProductId: s === null || s === void 0 ? void 0 : s.product_id,
386
+ product_name: s === null || s === void 0 ? void 0 : s.title,
387
+ price: s === null || s === void 0 ? void 0 : s.price,
388
+ _id: s === null || s === void 0 ? void 0 : s._id,
389
+ _key: s === null || s === void 0 ? void 0 : s._key,
390
+ _serviceKey: s === null || s === void 0 ? void 0 : s._serviceKey
391
+ };
392
+ });
393
+ sendData = {
394
+ product_id: item === null || item === void 0 ? void 0 : item.id,
395
+ detailId: _detail === null || _detail === void 0 ? void 0 : _detail.id,
396
+ detailProductId: _detail === null || _detail === void 0 ? void 0 : _detail.product_id,
397
+ product_name: item === null || item === void 0 ? void 0 : item.title,
398
+ price: _detail === null || _detail === void 0 ? void 0 : _detail.price,
399
+ serviceVal: val
400
+ };
401
+ sendWarningLog({
402
+ title: 'addService',
403
+ content: [{
404
+ key: '添加数据',
405
+ value: JSON.stringify(sendData)
406
+ }, {
407
+ key: '日期',
408
+ value: dayjs().format('YYYY-MM-DD HH:mm:ss')
409
+ }]
410
+ });
411
+ }
412
+ } catch (error) {}
413
+ dispatch({
414
+ type: 'setService',
415
+ payload: {
416
+ addModal: false,
417
+ value: _list,
418
+ edit: true,
419
+ changeService: false
420
+ }
421
+ });
422
+ } else {
423
+ openBookingEditModal();
424
+ dispatch({
425
+ type: 'setService',
426
+ payload: {
427
+ editModal: true,
428
+ cacheItem: cacheItem,
429
+ addModal: !cacheItem.autoClose,
430
+ changeService: false
431
+ }
432
+ });
433
+ onEdit === null || onEdit === void 0 || onEdit(cacheItem);
434
+ }
435
+ case 26:
436
+ case "end":
437
+ return _context3.stop();
438
+ }
439
+ }, _callee3);
440
+ }));
441
+ return function callback(_x3, _x4, _x5) {
442
+ return _ref3.apply(this, arguments);
443
+ };
444
+ }();
445
+ // 如果不需要打开弹窗, 直接添加数据
446
+ if (cacheValues) {
447
+ callback(cacheValues, '', item);
448
+ return;
449
+ }
450
+ console.time('打开弹窗');
274
451
  state.action({
275
452
  type: 'pisell1.handleOpenProductModal',
276
453
  data: {
@@ -291,162 +468,7 @@ var AddSerivce = function AddSerivce(props) {
291
468
  onCancel: function onCancel() {
292
469
  setCurrentProduct(null);
293
470
  },
294
- callback: function () {
295
- var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e, extension_type, detail) {
296
- var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI, _Toast$success, _addService, _list, quantity, _context$appHelper$ut3, _context$appHelper$ut4, val, sendData;
297
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
298
- while (1) switch (_context3.prev = _context3.next) {
299
- case 0:
300
- setCurrentProduct(null);
301
- // 防止选择商品弹窗多次触发callback
302
- if (!lock) {
303
- _context3.next = 3;
304
- break;
305
- }
306
- return _context3.abrupt("return");
307
- case 3:
308
- lock = true;
309
-
310
- // 2秒后解除
311
- setTimeout(function () {
312
- lock = false;
313
- }, 2000);
314
- if (isBooking4) {
315
- _context3.next = 11;
316
- break;
317
- }
318
- _context3.next = 8;
319
- return createBookingData({
320
- product: _objectSpread(_objectSpread({}, detail || item), {}, {
321
- _params: e
322
- })
323
- });
324
- case 8:
325
- data = _context3.sent;
326
- // 创建预约
327
- createBooking({
328
- booking: data
329
- });
330
- return _context3.abrupt("return");
331
- case 11:
332
- // info2 addService 逻辑
333
- _detail = detail || item;
334
- other = JSON.parse(JSON.stringify(e));
335
- other.session = e.session;
336
- cacheItem = _objectSpread(_objectSpread({}, _detail), {}, {
337
- product_id: item.id,
338
- _id: getUniqueId(),
339
- _key: e.key,
340
- _extend: {
341
- start_date: state.date.value,
342
- quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
343
- price: _detail.price,
344
- product_name: item.title,
345
- other: other
346
- },
347
- new: 1
348
- });
349
- _total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
350
- cacheItem._extend.total = _total;
351
- // 用于储存原价
352
- cacheItem._extend.origin_total = _total;
353
- _isEdit = !!state.service.cacheItem;
354
- if (_isEdit) {
355
- cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
356
- cacheItem.new = 0;
357
- }
358
- // 渲染到当前位置模式时,默认无资源 时间默认取顶部设置的时间
359
- if (renderMode === 'current') {
360
- // cacheItem._extend.resource = 0;
361
- cacheItem.currentDefaultTime = state.date.value.format('HH:mm');
362
- }
363
- cacheItem = getProductExtend({
364
- cacheItem: cacheItem,
365
- state: state,
366
- isDisabledTime: true
367
- });
368
- if (state.renderType === 'eventBooking') {
369
- cacheItem.autoClose = false;
370
- }
371
- if (cacheItem.autoClose) {
372
- cacheItem.autoClose = false;
373
- cacheItem._serviceKey = genServiceKey(cacheItem);
374
- _addService = addService(_toConsumableArray(state.service.value), cacheItem, state), _list = _addService.list, quantity = _addService.quantity;
375
- Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, /*#__PURE__*/React.createElement("div", {
376
- className: "add-toast-wrap"
377
- }, /*#__PURE__*/React.createElement("div", {
378
- className: "add-toast-title"
379
- }, cacheItem.title), /*#__PURE__*/React.createElement("div", {
380
- className: "add-toast-quantity"
381
- }, locales.getText('pisell2.ticket-booking.in-cart')(quantity || 1))));
382
- addServiceScroll(e.rowKey, cacheItem);
383
- try {
384
- if (((_context$appHelper$ut3 = context.appHelper.utils.store) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut3.getState) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.call(_context$appHelper$ut3)) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.global) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.id) === 2155) {
385
- val = _list === null || _list === void 0 ? void 0 : _list.map(function (s) {
386
- return {
387
- product_id: s === null || s === void 0 ? void 0 : s.product_id,
388
- detailId: s === null || s === void 0 ? void 0 : s.id,
389
- detailProductId: s === null || s === void 0 ? void 0 : s.product_id,
390
- product_name: s === null || s === void 0 ? void 0 : s.title,
391
- price: s === null || s === void 0 ? void 0 : s.price,
392
- _id: s === null || s === void 0 ? void 0 : s._id,
393
- _key: s === null || s === void 0 ? void 0 : s._key,
394
- _serviceKey: s === null || s === void 0 ? void 0 : s._serviceKey
395
- };
396
- });
397
- sendData = {
398
- product_id: item === null || item === void 0 ? void 0 : item.id,
399
- detailId: _detail === null || _detail === void 0 ? void 0 : _detail.id,
400
- detailProductId: _detail === null || _detail === void 0 ? void 0 : _detail.product_id,
401
- product_name: item === null || item === void 0 ? void 0 : item.title,
402
- price: _detail === null || _detail === void 0 ? void 0 : _detail.price,
403
- serviceVal: val
404
- };
405
- sendWarningLog({
406
- title: 'addService',
407
- content: [{
408
- key: '添加数据',
409
- value: JSON.stringify(sendData)
410
- }, {
411
- key: '日期',
412
- value: dayjs().format('YYYY-MM-DD HH:mm:ss')
413
- }]
414
- });
415
- }
416
- } catch (error) {}
417
- dispatch({
418
- type: 'setService',
419
- payload: {
420
- addModal: false,
421
- value: _list,
422
- edit: true,
423
- changeService: false
424
- }
425
- });
426
- } else {
427
- openBookingEditModal();
428
- dispatch({
429
- type: 'setService',
430
- payload: {
431
- editModal: true,
432
- cacheItem: cacheItem,
433
- addModal: !cacheItem.autoClose,
434
- changeService: false
435
- }
436
- });
437
- onEdit === null || onEdit === void 0 || onEdit(cacheItem);
438
- }
439
- case 24:
440
- case "end":
441
- return _context3.stop();
442
- }
443
- }, _callee3);
444
- }));
445
- function callback(_x3, _x4, _x5) {
446
- return _callback.apply(this, arguments);
447
- }
448
- return callback;
449
- }()
471
+ callback: callback
450
472
  });
451
473
  });
452
474
  var renderList = useMemo(function () {
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ addWalletCard: any;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ walletDetailState: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,14 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ setup?: 'menu' | 'list' | 'detail' | string;
5
+ }
6
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
+ state: RechargeState;
8
+ } & {
9
+ dispatch: (params: {
10
+ type: string;
11
+ payload: any;
12
+ }) => void;
13
+ }>;
14
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from './serve';
2
3
  export interface WalletCardItemProps {
3
4
  id: string;
@@ -26,4 +27,11 @@ export interface WalletListProps {
26
27
  currentSearchListItemCode?: string;
27
28
  [key: string]: any;
28
29
  }
29
- export declare const Provider: any, Context: any;
30
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
+ global_wallet: WalletListProps;
32
+ } & {
33
+ dispatch: (params: {
34
+ type: string;
35
+ payload: any;
36
+ }) => void;
37
+ }>;
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
8
8
  var _utils$getComponents;
9
9
  var _ref = appHelper || {},
10
10
  utils = _ref.utils;
11
- return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
11
+ return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
12
12
  }, [components]);
13
13
  return Cpt;
14
14
  };
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -73,8 +73,11 @@ var Info = (_, ref) => {
73
73
  };
74
74
  }, []);
75
75
  const isNormalProduct = (0, import_react.useMemo)(() => {
76
- var _a2, _b2;
77
- return ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem) && (0, import_utils4.isNormalProductByDurationSchedule)((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem);
76
+ var _a2, _b2, _c2;
77
+ if (!((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem)) {
78
+ return true;
79
+ }
80
+ return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils4.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
78
81
  }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
79
82
  const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
80
83
  let values = form.getFieldsValue();
@@ -93,13 +96,13 @@ var Info = (_, ref) => {
93
96
  const durationProps = (0, import_react.useMemo)(() => {
94
97
  var _a2, _b2, _c2;
95
98
  let _cacheItem = getCurrentCacheItem();
96
- const val = (0, import_utils7.getDurationProps)({
99
+ const val2 = (0, import_utils7.getDurationProps)({
97
100
  cacheItem: _cacheItem,
98
101
  useStartTime,
99
102
  // currentResource,
100
103
  slice: (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time
101
104
  });
102
- return val;
105
+ return val2;
103
106
  }, [
104
107
  // currentResource,
105
108
  state.service.cacheItem,
@@ -114,14 +117,14 @@ var Info = (_, ref) => {
114
117
  return op;
115
118
  }, [durationProps, import_utils.locales.locale]);
116
119
  const timeObj = (0, import_react.useMemo)(() => {
117
- const val = (0, import_utils7.getTimeObj)({
120
+ const val2 = (0, import_utils7.getTimeObj)({
118
121
  durationProps,
119
122
  useStartTime,
120
123
  currentResource,
121
124
  state,
122
125
  useDuration
123
126
  });
124
- return val;
127
+ return val2;
125
128
  }, [
126
129
  durationProps,
127
130
  useStartTime,
@@ -641,6 +644,16 @@ var Info = (_, ref) => {
641
644
  performance.now() - window.pp1,
642
645
  "打开商品1"
643
646
  );
647
+ const [val, setVal] = (0, import_react.useState)(false);
648
+ (0, import_react.useEffect)(() => {
649
+ if (isShowTimeAndResource) {
650
+ setTimeout(() => {
651
+ setVal(true);
652
+ }, 200);
653
+ } else {
654
+ setVal(false);
655
+ }
656
+ }, [isShowTimeAndResource]);
644
657
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
645
658
  import_drawer.default,
646
659
  {
@@ -662,7 +675,7 @@ var Info = (_, ref) => {
662
675
  });
663
676
  }
664
677
  },
665
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)
678
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)
666
679
  ));
667
680
  };
668
681
  var editService_default = (0, import_react.forwardRef)(Info);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -104,4 +105,11 @@ export declare const walkInData: {
104
105
  id: number;
105
106
  nickname: string;
106
107
  };
107
- export declare const Provider: any, Context: any;
108
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
109
+ state: FormState;
110
+ } & {
111
+ dispatch: (params: {
112
+ type: string;
113
+ payload: any;
114
+ }) => void;
115
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -28,4 +29,11 @@ export interface PayGroup {
28
29
  pay_number?: string;
29
30
  _order: any;
30
31
  }
31
- export declare const Provider: any, Context: any;
32
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
+ state: FormState;
34
+ } & {
35
+ dispatch: (params: {
36
+ type: string;
37
+ payload: any;
38
+ }) => void;
39
+ }>;