@pisell/private-materials 3.4.1 → 3.4.2

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/preview.js +13 -13
  7. package/build/lowcode/render/default/view.js +4 -4
  8. package/build/lowcode/view.js +7 -7
  9. package/es/components/booking/addons/model.d.ts +1 -10
  10. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  11. package/es/components/booking/components/browserSelect/index.js +1 -1
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/forms/model.js +5 -5
  14. package/es/components/booking/info/model.d.ts +1 -10
  15. package/es/components/booking/info/service/like/index.js +1 -1
  16. package/es/components/booking/info2/index.js +6 -4
  17. package/es/components/booking/materiels/startTime/index.js +1 -1
  18. package/es/components/booking/model.d.ts +1 -9
  19. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  20. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  21. package/es/components/booking/notes/model.d.ts +1 -10
  22. package/es/components/booking/notes/model.js +5 -5
  23. package/es/components/booking/payments/model.d.ts +1 -10
  24. package/es/components/booking/payments/model.js +5 -5
  25. package/es/components/listComponent/index.js +5 -5
  26. package/es/components/pay/toC/PaymentMethods/index.js +70 -21
  27. package/es/components/pay/toC/index.js +46 -14
  28. package/es/components/pay/toC/model.d.ts +1 -9
  29. package/es/components/productExtension/card/index.js +3 -3
  30. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  31. package/es/components/productExtension/fields/Forms/index.js +12 -12
  32. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  33. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  34. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  35. package/es/components/productExtension/server.js +2 -2
  36. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  37. package/es/components/schedules/calendar/index.js +4 -4
  38. package/es/components/schedules/calendar/serve.js +2 -2
  39. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  40. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  41. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  42. package/es/components/schedules/components/ResourceList/index.js +1 -1
  43. package/es/components/schedules/components/Search/index.js +5 -5
  44. package/es/components/schedules/model.d.ts +1 -9
  45. package/es/components/schedules/model.js +5 -5
  46. package/es/components/schedules/openHours/index.js +1 -1
  47. package/es/components/schedules/openHours/serve.js +2 -2
  48. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  49. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  50. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  51. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  52. package/es/components/schedules/products/serve.js +2 -2
  53. package/es/components/schedules/products/utils.js +5 -5
  54. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  55. package/es/components/schedules/resources/detail/index.js +10 -10
  56. package/es/components/schedules/resources/list/index.js +2 -2
  57. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  58. package/es/components/schedules/resources/serve.js +2 -2
  59. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  60. package/es/components/schedules/utils.d.ts +1 -1
  61. package/es/components/schedules/utils.js +4 -4
  62. package/es/components/selectModal/index.js +2 -2
  63. package/es/components/ticketBooking/components/ticketBooking/index.js +121 -2
  64. package/es/components/ticketBooking/locales.d.ts +164 -146
  65. package/es/components/ticketBooking/locales.js +195 -147
  66. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  67. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  68. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  69. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  70. package/es/components/wallet/Detail/model.d.ts +1 -13
  71. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  72. package/es/components/wallet/PointCard/model.d.ts +1 -13
  73. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  74. package/es/components/wallet/Voucher/model.d.ts +1 -13
  75. package/es/components/wallet/model.d.ts +1 -9
  76. package/es/hooks/useComponents.js +1 -1
  77. package/es/utils/index.d.ts +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/info2/index.js +21 -11
  82. package/lib/components/booking/model.d.ts +1 -9
  83. package/lib/components/booking/notes/model.d.ts +1 -10
  84. package/lib/components/booking/payments/model.d.ts +1 -10
  85. package/lib/components/pay/toC/PaymentMethods/index.js +30 -2
  86. package/lib/components/pay/toC/index.js +29 -9
  87. package/lib/components/pay/toC/model.d.ts +1 -9
  88. package/lib/components/schedules/model.d.ts +1 -9
  89. package/lib/components/schedules/utils.d.ts +1 -1
  90. package/lib/components/schedules/utils.js +1 -1
  91. package/lib/components/ticketBooking/components/ticketBooking/index.js +141 -22
  92. package/lib/components/ticketBooking/locales.d.ts +164 -146
  93. package/lib/components/ticketBooking/locales.js +22 -4
  94. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  95. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  96. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  97. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  98. package/lib/components/wallet/Detail/model.d.ts +1 -13
  99. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  100. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  101. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  102. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  103. package/lib/components/wallet/model.d.ts +1 -9
  104. package/lib/utils/index.d.ts +1 -1
  105. package/package.json +2 -2
@@ -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;
@@ -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 ? 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 || (_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
  };
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -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,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;
@@ -166,11 +166,17 @@ var Info = (0, import_model.Provider)((props) => {
166
166
  try {
167
167
  setTimeout(async () => {
168
168
  var _a2, _b2, _c2, _d2;
169
- let data = await (0, import_serve.getResourceList)({
170
- date: currentDate
171
- }, (_d2 = (_c2 = (_b2 = (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.map) == null ? void 0 : _d2.call(_c2, (item) => item == null ? void 0 : item.booking_id));
172
- data.date = currentDate;
173
- localStorage.setItem("bookingResourceList", JSON.stringify(data));
169
+ let data = await (0, import_serve.getResourceList)(
170
+ {
171
+ date: currentDate
172
+ },
173
+ (_d2 = (_c2 = (_b2 = (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.map) == null ? void 0 : _d2.call(_c2, (item) => item == null ? void 0 : item.booking_id)
174
+ );
175
+ try {
176
+ data.date = currentDate;
177
+ localStorage.setItem("bookingResourceList", JSON.stringify(data));
178
+ } catch (err) {
179
+ }
174
180
  modal.dispatch({
175
181
  type: "setService",
176
182
  payload: {
@@ -184,13 +190,17 @@ var Info = (0, import_model.Provider)((props) => {
184
190
  console.log(err, "err");
185
191
  }
186
192
  };
187
- (0, import_ahooks.useDebounceEffect)(() => {
188
- if (currentDate) {
189
- getResourcesData();
193
+ (0, import_ahooks.useDebounceEffect)(
194
+ () => {
195
+ if (currentDate) {
196
+ getResourcesData();
197
+ }
198
+ },
199
+ [currentDate],
200
+ {
201
+ wait: 300
190
202
  }
191
- }, [currentDate], {
192
- wait: 300
193
- });
203
+ );
194
204
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
195
205
  import_tabPane.default,
196
206
  {
@@ -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;
@@ -86,6 +86,15 @@ var PaymentMethods = (props, ref) => {
86
86
  var _a2, _b;
87
87
  const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
88
88
  const cards = (_b = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b.length;
89
+ (0, import_utils2.sendWarningLog)({
90
+ title: "支付初始化",
91
+ content: [
92
+ { key: "type", value: type },
93
+ { key: "payGroup", value: JSON.stringify(payGroup) },
94
+ { key: "waitAmount", value: waitAmount },
95
+ { key: "cards", value: cards }
96
+ ]
97
+ });
89
98
  if (cards && (waitAmount <= 0 || isOfflinePayment(type))) {
90
99
  try {
91
100
  await (0, import_serve.walletPassPay)((0, import_utils.formatWalletPassParams)(payGroup));
@@ -98,6 +107,14 @@ var PaymentMethods = (props, ref) => {
98
107
  }
99
108
  });
100
109
  } catch (err) {
110
+ (0, import_utils2.sendWarningLog)({
111
+ title: "钱包支付失败 catch",
112
+ content: [
113
+ { key: "错误信息", value: (err == null ? void 0 : err.message) || "未知错误" },
114
+ { key: "错误堆栈", value: (err == null ? void 0 : err.stack) || "无堆栈信息" },
115
+ { key: "错误类型", value: (err == null ? void 0 : err.name) || "未知错误类型" }
116
+ ]
117
+ });
101
118
  return props.payCallback({
102
119
  key: "fail",
103
120
  data: {
@@ -109,8 +126,19 @@ var PaymentMethods = (props, ref) => {
109
126
  }
110
127
  }
111
128
  if (waitAmount <= 0) {
112
- (0, import_payGroup.removePayGroupFromStorage)(payGroup.order_id);
113
- props.payCallback({ key: "success" });
129
+ try {
130
+ (0, import_payGroup.removePayGroupFromStorage)(payGroup.order_id);
131
+ props.payCallback({ key: "success" });
132
+ } catch (err) {
133
+ (0, import_utils2.sendWarningLog)({
134
+ title: "跳转成功页面 catch",
135
+ content: [
136
+ { key: "错误信息", value: (err == null ? void 0 : err.message) || "未知错误" },
137
+ { key: "错误堆栈", value: (err == null ? void 0 : err.stack) || "无堆栈信息" },
138
+ { key: "错误类型", value: (err == null ? void 0 : err.name) || "未知错误类型" }
139
+ ]
140
+ });
141
+ }
114
142
  return;
115
143
  }
116
144
  await onPayByType({ type, payGroup });
@@ -208,6 +208,14 @@ var ToCPay = (props, ref) => {
208
208
  payment_priority: data.payment_priority
209
209
  };
210
210
  } catch (err) {
211
+ (0, import_utils.sendWarningLog)({
212
+ title: "创建交易组失败 paymentInit catch",
213
+ content: [
214
+ { key: "错误信息", value: (err == null ? void 0 : err.message) || "未知错误" },
215
+ { key: "错误堆栈", value: (err == null ? void 0 : err.stack) || "无堆栈信息" },
216
+ { key: "错误类型", value: (err == null ? void 0 : err.name) || "未知错误类型" }
217
+ ]
218
+ });
211
219
  setSubmitLoading(false);
212
220
  payCallback({
213
221
  key: "fail",
@@ -243,16 +251,28 @@ var ToCPay = (props, ref) => {
243
251
  };
244
252
  const onSubmit = async (newOrderId) => {
245
253
  var _a2;
246
- let newPayGroup = state.payGroup;
247
- const result = await getIsShowDetectIncognitoConfirm(newPayGroup);
248
- if (result) {
249
- setShowDetectIncognitoConfirm(true);
250
- return;
251
- }
252
- if (!((_a2 = state.payGroup) == null ? void 0 : _a2.payment_group_id)) {
253
- newPayGroup = await paymentInit(newOrderId);
254
+ try {
255
+ let newPayGroup = state.payGroup;
256
+ const result = await getIsShowDetectIncognitoConfirm(newPayGroup);
257
+ if (result) {
258
+ setShowDetectIncognitoConfirm(true);
259
+ return;
260
+ }
261
+ if (!((_a2 = state.payGroup) == null ? void 0 : _a2.payment_group_id)) {
262
+ newPayGroup = await paymentInit(newOrderId);
263
+ }
264
+ handlePaymentByType(void 0, newPayGroup);
265
+ } catch (err) {
266
+ console.log("err", err);
267
+ (0, import_utils.sendWarningLog)({
268
+ title: "提交支付失败 onSubmit catch",
269
+ content: [
270
+ { key: "错误信息", value: (err == null ? void 0 : err.message) || "未知错误" },
271
+ { key: "错误堆栈", value: (err == null ? void 0 : err.stack) || "无堆栈信息" },
272
+ { key: "错误类型", value: (err == null ? void 0 : err.name) || "未知错误类型" }
273
+ ]
274
+ });
254
275
  }
255
- handlePaymentByType(void 0, newPayGroup);
256
276
  };
257
277
  const paymentTypeChange = (payload) => {
258
278
  dispatch({
@@ -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;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -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;