@pisell/private-materials 6.1.3 → 6.1.4

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 (87) 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 +1 -10
  9. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  10. package/es/components/booking/components/browserSelect/index.js +1 -1
  11. package/es/components/booking/forms/model.d.ts +1 -10
  12. package/es/components/booking/forms/model.js +5 -5
  13. package/es/components/booking/info/model.d.ts +1 -10
  14. package/es/components/booking/info/service/like/index.js +1 -1
  15. package/es/components/booking/info2/index.js +1 -0
  16. package/es/components/booking/materiels/startTime/index.js +1 -1
  17. package/es/components/booking/model.d.ts +1 -9
  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 +1 -10
  21. package/es/components/booking/notes/model.js +5 -5
  22. package/es/components/booking/payments/model.d.ts +1 -10
  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 +1 -9
  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 +1 -9
  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/ticketBooking/index.js +2 -2
  60. package/es/components/ticketBooking/components/timeBar/index.js +78 -71
  61. package/es/components/ticketBooking/index.js +2 -2
  62. package/es/components/wallet/Detail/model.d.ts +1 -13
  63. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  64. package/es/components/wallet/PointCard/model.d.ts +1 -13
  65. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  66. package/es/components/wallet/Voucher/model.d.ts +1 -13
  67. package/es/components/wallet/model.d.ts +1 -9
  68. package/es/hooks/useComponents.js +1 -1
  69. package/lib/components/booking/addons/model.d.ts +1 -10
  70. package/lib/components/booking/forms/model.d.ts +1 -10
  71. package/lib/components/booking/info/model.d.ts +1 -10
  72. package/lib/components/booking/model.d.ts +1 -9
  73. package/lib/components/booking/notes/model.d.ts +1 -10
  74. package/lib/components/booking/payments/model.d.ts +1 -10
  75. package/lib/components/pay/toC/model.d.ts +1 -9
  76. package/lib/components/schedules/model.d.ts +1 -9
  77. package/lib/components/schedules/utils.js +1 -1
  78. package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
  79. package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
  80. package/lib/components/ticketBooking/index.js +2 -2
  81. package/lib/components/wallet/Detail/model.d.ts +1 -13
  82. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  83. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  84. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  85. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  86. package/lib/components/wallet/model.d.ts +1 -9
  87. package/package.json +3 -3
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
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
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -105,11 +104,4 @@ export declare const walkInData: {
105
104
  id: number;
106
105
  nickname: string;
107
106
  };
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
- }>;
107
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  platform: 'pc' | 'h5' | '' | undefined;
4
3
  order: any;
@@ -29,11 +28,4 @@ export interface PayGroup {
29
28
  pay_number?: string;
30
29
  _order: any;
31
30
  }
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
- }>;
31
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,11 +68,4 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
- state: FormState;
74
- } & {
75
- dispatch: (params: {
76
- type: string;
77
- payload: any;
78
- }) => void;
79
- }>;
71
+ export declare const Provider: any, Context: any;
@@ -27,8 +27,8 @@ __export(utils_exports, {
27
27
  module.exports = __toCommonJS(utils_exports);
28
28
  var import_utils = require("@pisell/utils");
29
29
  var Request = class {
30
+ request = {};
30
31
  constructor() {
31
- this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
@@ -188,7 +188,7 @@ var _formatBookingDetail = (data, modalState) => {
188
188
  };
189
189
  };
190
190
  var TicketBooking = () => {
191
- var _a;
191
+ var _a, _b, _c;
192
192
  const [state, setState] = (0, import_miniRedux.useStore)();
193
193
  const engineContext = (0, import_useEngineContext.default)();
194
194
  const { props: engineProps } = engineContext.engine;
@@ -210,7 +210,7 @@ var TicketBooking = () => {
210
210
  const _timerRef = (0, import_react.useRef)();
211
211
  const _callbackFnRef = (0, import_react.useRef)();
212
212
  (0, import_react.useEffect)(() => {
213
- var _a2, _b, _c, _d, _e, _f;
213
+ var _a2, _b2, _c2, _d, _e, _f;
214
214
  _persistentRef.current = storage.get(`drawer-booking`) === "true" ? true : isTerminal();
215
215
  if (lowcodeRef) {
216
216
  lowcodeRef.onReady(void 0);
@@ -235,7 +235,7 @@ var TicketBooking = () => {
235
235
  });
236
236
  setState(
237
237
  {
238
- amountSymbol: (getData == null ? void 0 : getData("shop_symbol")) || ((_d = (_c = (_b = store == null ? void 0 : store.getState) == null ? void 0 : _b.call(store)) == null ? void 0 : _c.global) == null ? void 0 : _d.symbol) || "$"
238
+ amountSymbol: (getData == null ? void 0 : getData("shop_symbol")) || ((_d = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d.symbol) || "$"
239
239
  },
240
240
  () => {
241
241
  _initStateRef.current = JSON.parse(JSON.stringify(state));
@@ -291,10 +291,10 @@ var TicketBooking = () => {
291
291
  });
292
292
  };
293
293
  (0, import_react.useEffect)(() => {
294
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
295
- const cartItems = (_b = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.service) == null ? void 0 : _b.value;
294
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
295
+ const cartItems = (_b2 = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value;
296
296
  if (!Array.isArray(cartItems) || cartItems.length === 0) {
297
- (_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
297
+ (_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.postMessageToApp) == null ? void 0 : _d.call(_c2, {
298
298
  module: "cds",
299
299
  key: "cartUpdate",
300
300
  data: {
@@ -395,15 +395,15 @@ var TicketBooking = () => {
395
395
  fees
396
396
  }
397
397
  });
398
- }, [state.modalState]);
398
+ }, [(_c = (_b = state == null ? void 0 : state.modalState) == null ? void 0 : _b.service) == null ? void 0 : _c.value]);
399
399
  const _setModalState = (props) => {
400
- var _a2, _b;
400
+ var _a2, _b2;
401
401
  console.log("同步state到外层", props);
402
402
  let newVal = { ...props };
403
403
  if (newVal.service) {
404
404
  newVal.service.value = ((_a2 = newVal == null ? void 0 : newVal.service) == null ? void 0 : _a2.value) || [];
405
405
  }
406
- console.log((_b = newVal == null ? void 0 : newVal.service) == null ? void 0 : _b.value, "newVal.service.value");
406
+ console.log((_b2 = newVal == null ? void 0 : newVal.service) == null ? void 0 : _b2.value, "newVal.service.value");
407
407
  setState({
408
408
  modalState: {
409
409
  ...state.modalState,
@@ -430,10 +430,10 @@ var TicketBooking = () => {
430
430
  }
431
431
  });
432
432
  setTimeout(() => {
433
- var _a2, _b, _c, _d, _e;
434
- if ((_b = (_a2 = state.modalState.service) == null ? void 0 : _a2.value) == null ? void 0 : _b.length) {
435
- let _list = (_e = (_c = state.bookingFunctions) == null ? void 0 : _c.updateServiceDate) == null ? void 0 : _e.call(
436
- _c,
433
+ var _a2, _b2, _c2, _d, _e;
434
+ if ((_b2 = (_a2 = state.modalState.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
435
+ let _list = (_e = (_c2 = state.bookingFunctions) == null ? void 0 : _c2.updateServiceDate) == null ? void 0 : _e.call(
436
+ _c2,
437
437
  (_d = state.modalState.service) == null ? void 0 : _d.value,
438
438
  date,
439
439
  false
@@ -449,8 +449,8 @@ var TicketBooking = () => {
449
449
  }, 100);
450
450
  };
451
451
  const _setShopOpeningHours = () => {
452
- var _a2, _b, _c, _d, _e, _f;
453
- let time = ((_a2 = getData == null ? void 0 : getData("operating_day_boundary")) == null ? void 0 : _a2.time) || ((_f = (_e = (_d = (_c = (_b = store == null ? void 0 : store.getState) == null ? void 0 : _b.call(store)) == null ? void 0 : _c.global) == null ? void 0 : _d.shopDetail) == null ? void 0 : _e.operating_day_boundary) == null ? void 0 : _f.time);
452
+ var _a2, _b2, _c2, _d, _e, _f;
453
+ let time = ((_a2 = getData == null ? void 0 : getData("operating_day_boundary")) == null ? void 0 : _a2.time) || ((_f = (_e = (_d = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d.shopDetail) == null ? void 0 : _e.operating_day_boundary) == null ? void 0 : _f.time);
454
454
  if (time) {
455
455
  localStorage.setItem("shopOpeningHours", time);
456
456
  }
@@ -467,12 +467,12 @@ var TicketBooking = () => {
467
467
  });
468
468
  };
469
469
  const _getBoardConfig = async () => {
470
- var _a2, _b, _c;
470
+ var _a2, _b2, _c2;
471
471
  const { bookingConfigParams } = state;
472
472
  const data = await (0, import_serve.getBookingConfig)({
473
473
  ...bookingConfigParams
474
474
  });
475
- if ((_c = (_b = (_a2 = data == null ? void 0 : data.config) == null ? void 0 : _a2.information_tab) == null ? void 0 : _b.appointment_card) == null ? void 0 : _c.quick_time) {
475
+ if ((_c2 = (_b2 = (_a2 = data == null ? void 0 : data.config) == null ? void 0 : _a2.information_tab) == null ? void 0 : _b2.appointment_card) == null ? void 0 : _c2.quick_time) {
476
476
  _getAddTimeProducts();
477
477
  }
478
478
  setState({
@@ -566,7 +566,7 @@ var TicketBooking = () => {
566
566
  }
567
567
  };
568
568
  const _initBookingData = (type, data) => {
569
- var _a2, _b, _c, _d, _e, _f, _g;
569
+ var _a2, _b2, _c2, _d, _e, _f, _g;
570
570
  let initState = _getInitState({
571
571
  bookingDetail: null,
572
572
  bookingConfig: state.bookingConfig,
@@ -588,14 +588,14 @@ var TicketBooking = () => {
588
588
  if (type === "create") {
589
589
  if ((_a2 = data == null ? void 0 : data.serviceParams) == null ? void 0 : _a2.start_date) {
590
590
  initState.modalState.date.value = (0, import_dayjs.default)(
591
- (_b = data == null ? void 0 : data.serviceParams) == null ? void 0 : _b.start_date
591
+ (_b2 = data == null ? void 0 : data.serviceParams) == null ? void 0 : _b2.start_date
592
592
  );
593
593
  sessionStorage.setItem(
594
594
  "pisell2.booking.serviceParams",
595
595
  JSON.stringify(data)
596
596
  );
597
597
  } else {
598
- let timezone = (_f = (_e = (_d = (_c = store == null ? void 0 : store.getState) == null ? void 0 : _c.call(store)) == null ? void 0 : _d.global) == null ? void 0 : _e.globalConfig) == null ? void 0 : _f.timezone;
598
+ let timezone = (_f = (_e = (_d = (_c2 = store == null ? void 0 : store.getState) == null ? void 0 : _c2.call(store)) == null ? void 0 : _d.global) == null ? void 0 : _e.globalConfig) == null ? void 0 : _f.timezone;
599
599
  initState.modalState.date.value = import_dayjs.default.tz(/* @__PURE__ */ new Date(), timezone);
600
600
  sessionStorage.removeItem("pisell2.booking.serviceParams");
601
601
  }
@@ -613,9 +613,9 @@ var TicketBooking = () => {
613
613
  });
614
614
  };
615
615
  const _rebook = () => {
616
- var _a2, _b, _c;
616
+ var _a2, _b2, _c2;
617
617
  let date = (0, import_utils2.getNextTimeSlice)(
618
- ((_c = (_b = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.service_time.value) || 10
618
+ ((_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time.value) || 10
619
619
  );
620
620
  setState({
621
621
  rebookState: {
@@ -703,7 +703,7 @@ var TicketBooking = () => {
703
703
  );
704
704
  };
705
705
  const _scanBookingDetailResult = async (detail) => {
706
- var _a2, _b, _c;
706
+ var _a2, _b2, _c2;
707
707
  (_a2 = Toast == null ? void 0 : Toast.loading) == null ? void 0 : _a2.call(Toast, import_utils.locales.getText("pisell2.ticket-booking.loading"), 6e4);
708
708
  let result = {};
709
709
  try {
@@ -711,7 +711,7 @@ var TicketBooking = () => {
711
711
  } catch (err) {
712
712
  }
713
713
  if (!(result == null ? void 0 : result.value)) {
714
- (_b = import_antd.message) == null ? void 0 : _b.error(
714
+ (_b2 = import_antd.message) == null ? void 0 : _b2.error(
715
715
  import_utils.locales.getText("pisell2.ticket-booking.appointment-not-found")
716
716
  );
717
717
  Toast == null ? void 0 : Toast.hide();
@@ -720,7 +720,7 @@ var TicketBooking = () => {
720
720
  const objDetail = await (0, import_serve.getOrderInfoByCode)({ code: result.value });
721
721
  Toast == null ? void 0 : Toast.hide();
722
722
  if (!(objDetail == null ? void 0 : objDetail.order_id) || (objDetail == null ? void 0 : objDetail.event_id) === 0) {
723
- (_c = import_antd.message) == null ? void 0 : _c.error(
723
+ (_c2 = import_antd.message) == null ? void 0 : _c2.error(
724
724
  import_utils.locales.getText("pisell2.ticket-booking.appointment-not-found")
725
725
  );
726
726
  return;
@@ -35,115 +35,122 @@ module.exports = __toCommonJS(timeBar_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_icons = require("@ant-design/icons");
37
37
  var import_materials = require("@pisell/materials");
38
+ var import_ahooks = require("ahooks");
38
39
  var import_antd = require("antd");
39
40
  var import_classnames = __toESM(require("classnames"));
40
41
  var import_utils = require("@pisell/utils");
41
42
  var import_index = require("./index.less");
42
43
  var TimeBar = (props) => {
43
- var _a, _b, _c, _d;
44
+ var _a, _b;
44
45
  const { globalState: state, setGlobalState, locale } = props;
45
- const _onClickNext = () => {
46
- var _a2, _b2, _c2, _d2;
46
+ const _onClickNext = (0, import_ahooks.useMemoizedFn)(() => {
47
+ var _a2, _b2, _c, _d;
47
48
  const currentTime = (_b2 = (_a2 = state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value;
48
49
  const newTime = currentTime["add"](1, "day");
49
- (_c2 = props.onDateChange) == null ? void 0 : _c2.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
50
- (_d2 = props.setIntervalTime) == null ? void 0 : _d2.call(props, false);
51
- };
52
- const _onClickPre = () => {
53
- var _a2, _b2, _c2, _d2;
50
+ (_c = props.onDateChange) == null ? void 0 : _c.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
51
+ (_d = props.setIntervalTime) == null ? void 0 : _d.call(props, false);
52
+ });
53
+ const _onClickPre = (0, import_ahooks.useMemoizedFn)(() => {
54
+ var _a2, _b2, _c, _d;
54
55
  const currentTime = (_b2 = (_a2 = state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value;
55
56
  const newTime = currentTime["subtract"](1, "day");
56
- (_c2 = props.onDateChange) == null ? void 0 : _c2.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
57
- (_d2 = props.setIntervalTime) == null ? void 0 : _d2.call(props, false);
58
- };
59
- const _onClickToday = () => {
60
- var _a2;
61
- (_a2 = props.setIntervalTime) == null ? void 0 : _a2.call(props, true);
62
- };
63
- const _onClickNow = () => {
57
+ (_c = props.onDateChange) == null ? void 0 : _c.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
58
+ (_d = props.setIntervalTime) == null ? void 0 : _d.call(props, false);
59
+ });
60
+ const _onClickToday = (0, import_ahooks.useMemoizedFn)(() => {
61
+ var _a2, _b2, _c, _d;
62
+ const currentTime = (_b2 = (_a2 = state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value;
63
+ const newTime = currentTime["subtract"](1, "day");
64
+ (_c = props.onDateChange) == null ? void 0 : _c.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
65
+ (_d = props.setIntervalTime) == null ? void 0 : _d.call(props, false);
66
+ });
67
+ const _onClickNow = (0, import_ahooks.useMemoizedFn)(() => {
64
68
  var _a2;
65
69
  (_a2 = props.setIntervalTime) == null ? void 0 : _a2.call(props, true);
66
- };
67
- const _onDateTimeChange = (timeString) => {
68
- var _a2, _b2, _c2, _d2;
70
+ });
71
+ const _onDateTimeChange = (0, import_ahooks.useMemoizedFn)((timeString) => {
72
+ var _a2, _b2, _c, _d;
69
73
  const currentTime = (_b2 = (_a2 = state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value;
70
74
  const [hours, minutes] = timeString.split(":").map(Number);
71
75
  const newTime = currentTime.hour(hours).minute(minutes).second(0);
72
- (_c2 = props.onDateTimeChange) == null ? void 0 : _c2.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
76
+ (_c = props.onDateTimeChange) == null ? void 0 : _c.call(props, newTime, newTime.format("YYYY-MM-DD HH:mm:ss"));
73
77
  setGlobalState({
74
78
  isTimeChange: true
75
79
  });
76
- (_d2 = props.setIntervalTime) == null ? void 0 : _d2.call(props, false);
77
- };
78
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-ticket-booking-time-bar" }, /* @__PURE__ */ import_react.default.createElement(
79
- import_antd.Button,
80
- {
81
- icon: /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null),
82
- onClick: _onClickPre,
83
- size: "large"
84
- }
85
- ), /* @__PURE__ */ import_react.default.createElement(
86
- import_antd.Button,
87
- {
88
- onClick: _onClickToday,
89
- size: "large",
90
- style: state.intervalSetTime ? { background: "#000", color: "#fff" } : void 0
91
- },
92
- import_utils.locales.getText("pisell2.ticket-booking.today")
93
- ), /* @__PURE__ */ import_react.default.createElement(
94
- "div",
95
- {
96
- className: (0, import_classnames.default)({
97
- "booking-page-date-picker-select": state.isDateChange
98
- }),
99
- style: { width: 200, flexShrink: 0 }
100
- },
101
- /* @__PURE__ */ import_react.default.createElement(
102
- import_materials.DatePicker,
80
+ (_d = props.setIntervalTime) == null ? void 0 : _d.call(props, false);
81
+ });
82
+ return (0, import_react.useMemo)(() => {
83
+ var _a2, _b2, _c, _d;
84
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-ticket-booking-time-bar" }, /* @__PURE__ */ import_react.default.createElement(
85
+ import_antd.Button,
103
86
  {
104
- inputReadOnly: true,
105
- value: (_b = (_a = state == null ? void 0 : state.modalState) == null ? void 0 : _a.date) == null ? void 0 : _b.value,
106
- format: locale === "en" ? "dddd, DD MMM YYYY" : "YYYY年MM月DD日",
107
- onChange: props == null ? void 0 : props.onDateChange,
108
- size: "large",
109
- style: { width: "100%" }
87
+ icon: /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null),
88
+ onClick: _onClickPre,
89
+ size: "large"
110
90
  }
111
- )
112
- ), /* @__PURE__ */ import_react.default.createElement(
113
- import_antd.Button,
114
- {
115
- icon: /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null),
116
- onClick: _onClickNext,
117
- size: "large"
118
- }
119
- ), /* @__PURE__ */ import_react.default.createElement(
120
- "div",
121
- {
122
- className: (0, import_classnames.default)({
123
- "booking-page-date-picker-select": state.isTimeChange
124
- })
125
- },
126
- /* @__PURE__ */ import_react.default.createElement(
127
- import_materials.SelectTime,
91
+ ), /* @__PURE__ */ import_react.default.createElement(
92
+ import_antd.Button,
128
93
  {
129
- value: (_d = (_c = state == null ? void 0 : state.modalState) == null ? void 0 : _c.date) == null ? void 0 : _d.value.format("HH:mm"),
130
- onChange: _onDateTimeChange,
131
- popoverProps: {
132
- style: { zoom: 0.8 }
133
- },
134
- timePickerProps: {},
135
- timeProps: {},
136
- slice: 5
94
+ onClick: _onClickToday,
95
+ size: "large",
96
+ style: state.intervalSetTime ? { background: "#000", color: "#fff" } : void 0
97
+ },
98
+ import_utils.locales.getText("pisell2.ticket-booking.today")
99
+ ), /* @__PURE__ */ import_react.default.createElement(
100
+ "div",
101
+ {
102
+ className: (0, import_classnames.default)({
103
+ "booking-page-date-picker-select": state.isDateChange
104
+ }),
105
+ style: { width: 200, flexShrink: 0 }
106
+ },
107
+ /* @__PURE__ */ import_react.default.createElement(
108
+ import_materials.DatePicker,
109
+ {
110
+ inputReadOnly: true,
111
+ value: (_b2 = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value,
112
+ format: locale === "en" ? "dddd, DD MMM YYYY" : "YYYY年MM月DD日",
113
+ onChange: props == null ? void 0 : props.onDateChange,
114
+ size: "large",
115
+ style: { width: "100%" }
116
+ }
117
+ )
118
+ ), /* @__PURE__ */ import_react.default.createElement(
119
+ import_antd.Button,
120
+ {
121
+ icon: /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null),
122
+ onClick: _onClickNext,
123
+ size: "large"
137
124
  }
138
- )
139
- ), /* @__PURE__ */ import_react.default.createElement(
140
- import_antd.Button,
141
- {
142
- onClick: _onClickNow,
143
- size: "large",
144
- style: state.intervalSetTime ? { background: "#000", color: "#fff" } : void 0
145
- },
146
- import_utils.locales.getText("pisell2.ticket-booking.now")
147
- ));
125
+ ), /* @__PURE__ */ import_react.default.createElement(
126
+ "div",
127
+ {
128
+ className: (0, import_classnames.default)({
129
+ "booking-page-date-picker-select": state.isTimeChange
130
+ })
131
+ },
132
+ /* @__PURE__ */ import_react.default.createElement(
133
+ import_materials.SelectTime,
134
+ {
135
+ value: (_d = (_c = state == null ? void 0 : state.modalState) == null ? void 0 : _c.date) == null ? void 0 : _d.value.format("HH:mm"),
136
+ onChange: _onDateTimeChange,
137
+ popoverProps: {
138
+ style: { zoom: 0.8 }
139
+ },
140
+ timePickerProps: {},
141
+ timeProps: {},
142
+ slice: 5
143
+ }
144
+ )
145
+ ), /* @__PURE__ */ import_react.default.createElement(
146
+ import_antd.Button,
147
+ {
148
+ onClick: _onClickNow,
149
+ size: "large",
150
+ style: state.intervalSetTime ? { background: "#000", color: "#fff" } : void 0
151
+ },
152
+ import_utils.locales.getText("pisell2.ticket-booking.now")
153
+ ));
154
+ }, [(_b = (_a = state.modalState) == null ? void 0 : _a.date) == null ? void 0 : _b.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale]);
148
155
  };
149
156
  var timeBar_default = TimeBar;
@@ -183,13 +183,13 @@ var initialState = {
183
183
  ]
184
184
  };
185
185
  var ticketBooking_default = (props) => {
186
- var _a, _b, _c, _d, _e, _f;
186
+ var _a, _b, _c, _d, _e, _f, _g;
187
187
  const { productExtensionType, bookingConfigParams } = props;
188
188
  const storeRef = (0, import_react.useRef)(null);
189
189
  const context = (0, import_useEngineContext.default)();
190
190
  import_utils.locales.init(
191
191
  import_locales.default,
192
- ((_d = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.getApp()) == null ? void 0 : _b.locales) == null ? void 0 : _c.getLocale) == null ? void 0 : _d.call(_c)) || ((_f = (_e = context.appHelper.utils) == null ? void 0 : _e.storage) == null ? void 0 : _f.get("umi_locale")) || "en"
192
+ ((_e = (_d = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.getApp) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.locales) == null ? void 0 : _d.getLocale) == null ? void 0 : _e.call(_d)) || ((_g = (_f = context.appHelper.utils) == null ? void 0 : _f.storage) == null ? void 0 : _g.get("umi_locale")) || "en"
193
193
  );
194
194
  (0, import_react.useLayoutEffect)(() => {
195
195
  import_utils2.request.setRequest(context.appHelper.utils.request);
@@ -1,13 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,14 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,29 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from './serve';
3
2
  export interface WalletCardItemProps {
4
3
  id: string;
@@ -27,11 +26,4 @@ export interface WalletListProps {
27
26
  currentSearchListItemCode?: string;
28
27
  [key: string]: any;
29
28
  }
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
- }>;
29
+ export declare const Provider: any, Context: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.1.3",
3
+ "version": "6.1.4",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -60,9 +60,9 @@
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
62
  "@pisell/utils": "3.0.0",
63
- "@pisell/materials": "6.1.1",
64
63
  "@pisell/icon": "0.0.11",
65
- "@pisell/date-picker": "3.0.2"
64
+ "@pisell/date-picker": "3.0.2",
65
+ "@pisell/materials": "6.1.1"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",