@pisell/private-materials 6.1.2 → 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 (105) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/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/Lists.js +2 -0
  15. package/es/components/booking/info/service/editService/index.js +3 -0
  16. package/es/components/booking/info/service/like/index.js +1 -1
  17. package/es/components/booking/info/service/serviceList/index.js +2 -0
  18. package/es/components/booking/info/service/serviceManager/index.js +3 -1
  19. package/es/components/booking/info/service2/Lists.js +1 -0
  20. package/es/components/booking/info2/index.js +1 -0
  21. package/es/components/booking/info2/service/addService/index.js +1 -0
  22. package/es/components/booking/info2/service/editService/index.js +18 -2
  23. package/es/components/booking/info2/service/serviceList/index.js +2 -0
  24. package/es/components/booking/materiels/startTime/index.js +1 -1
  25. package/es/components/booking/model.d.ts +1 -9
  26. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  27. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  28. package/es/components/booking/notes/model.d.ts +1 -10
  29. package/es/components/booking/notes/model.js +5 -5
  30. package/es/components/booking/payments/model.d.ts +1 -10
  31. package/es/components/booking/payments/model.js +5 -5
  32. package/es/components/listComponent/index.js +5 -5
  33. package/es/components/pay/toC/model.d.ts +1 -9
  34. package/es/components/productExtension/card/index.js +3 -3
  35. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  36. package/es/components/productExtension/fields/Forms/index.js +12 -12
  37. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  38. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  39. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  40. package/es/components/productExtension/server.js +2 -2
  41. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  42. package/es/components/schedules/calendar/index.js +4 -4
  43. package/es/components/schedules/calendar/serve.js +2 -2
  44. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  45. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  46. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  47. package/es/components/schedules/components/ResourceList/index.js +1 -1
  48. package/es/components/schedules/components/Search/index.js +5 -5
  49. package/es/components/schedules/model.d.ts +1 -9
  50. package/es/components/schedules/model.js +5 -5
  51. package/es/components/schedules/openHours/index.js +1 -1
  52. package/es/components/schedules/openHours/serve.js +2 -2
  53. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  54. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  55. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  56. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  57. package/es/components/schedules/products/serve.js +2 -2
  58. package/es/components/schedules/products/utils.js +5 -5
  59. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  60. package/es/components/schedules/resources/detail/index.js +10 -10
  61. package/es/components/schedules/resources/list/index.js +2 -2
  62. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  63. package/es/components/schedules/resources/serve.js +2 -2
  64. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  65. package/es/components/schedules/utils.js +4 -4
  66. package/es/components/selectModal/index.js +2 -2
  67. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
  68. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  69. package/es/components/ticketBooking/components/timeBar/index.js +78 -71
  70. package/es/components/ticketBooking/index.js +2 -2
  71. package/es/components/wallet/Detail/model.d.ts +1 -13
  72. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  73. package/es/components/wallet/PointCard/model.d.ts +1 -13
  74. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  75. package/es/components/wallet/Voucher/model.d.ts +1 -13
  76. package/es/components/wallet/model.d.ts +1 -9
  77. package/es/hooks/useComponents.js +1 -1
  78. package/lib/components/booking/addons/model.d.ts +1 -10
  79. package/lib/components/booking/forms/model.d.ts +1 -10
  80. package/lib/components/booking/info/model.d.ts +1 -10
  81. package/lib/components/booking/info/service/Lists.js +2 -0
  82. package/lib/components/booking/info/service/editService/index.js +3 -0
  83. package/lib/components/booking/info/service/serviceList/index.js +2 -0
  84. package/lib/components/booking/info/service/serviceManager/index.js +2 -0
  85. package/lib/components/booking/info/service2/Lists.js +1 -0
  86. package/lib/components/booking/info2/service/addService/index.js +1 -0
  87. package/lib/components/booking/info2/service/editService/index.js +16 -3
  88. package/lib/components/booking/info2/service/serviceList/index.js +2 -0
  89. package/lib/components/booking/model.d.ts +1 -9
  90. package/lib/components/booking/notes/model.d.ts +1 -10
  91. package/lib/components/booking/payments/model.d.ts +1 -10
  92. package/lib/components/pay/toC/model.d.ts +1 -9
  93. package/lib/components/schedules/model.d.ts +1 -9
  94. package/lib/components/schedules/utils.js +1 -1
  95. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
  96. package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
  97. package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
  98. package/lib/components/ticketBooking/index.js +2 -2
  99. package/lib/components/wallet/Detail/model.d.ts +1 -13
  100. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  101. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  102. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  103. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  104. package/lib/components/wallet/model.d.ts +1 -9
  105. package/package.json +2 -2
@@ -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.2",
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,8 +60,8 @@
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
62
  "@pisell/utils": "3.0.0",
63
- "@pisell/date-picker": "3.0.2",
64
63
  "@pisell/icon": "0.0.11",
64
+ "@pisell/date-picker": "3.0.2",
65
65
  "@pisell/materials": "6.1.1"
66
66
  },
67
67
  "peerDependencies": {