@pisell/private-materials 6.3.15 → 6.3.17

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 (218) 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 +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  12. package/es/components/booking/addons/model.d.ts +10 -1
  13. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  14. package/es/components/booking/components/browserSelect/index.js +1 -1
  15. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  16. package/es/components/booking/forms/model.d.ts +10 -1
  17. package/es/components/booking/forms/model.js +5 -5
  18. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  19. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  20. package/es/components/booking/info/model.d.ts +10 -1
  21. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  22. package/es/components/booking/info/service/like/index.d.ts +1 -0
  23. package/es/components/booking/info/service/like/index.js +1 -1
  24. package/es/components/booking/info/service2/utils.d.ts +1 -1
  25. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  26. package/es/components/booking/model.d.ts +9 -1
  27. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  28. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  29. package/es/components/booking/notes/model.d.ts +10 -1
  30. package/es/components/booking/notes/model.js +5 -5
  31. package/es/components/booking/payments/model.d.ts +10 -1
  32. package/es/components/booking/payments/model.js +5 -5
  33. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  34. package/es/components/eftpos/group/index.d.ts +1 -0
  35. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  36. package/es/components/eftpos/icon/device.d.ts +1 -0
  37. package/es/components/eftpos/receipt/index.d.ts +1 -0
  38. package/es/components/eftposPay/amount.d.ts +1 -1
  39. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  40. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  41. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  42. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  43. package/es/components/eftposPay/device.d.ts +1 -1
  44. package/es/components/eftposPay/hooks.d.ts +2 -2
  45. package/es/components/eftposPay/store/index.d.ts +3 -3
  46. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  47. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  48. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  49. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  50. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  51. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  52. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  53. package/es/components/index.d.ts +3 -1
  54. package/es/components/index.js +3 -1
  55. package/es/components/listComponent/index.js +5 -5
  56. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  57. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
  58. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
  59. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
  60. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
  61. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
  62. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
  63. package/es/components/pay/toC/model.d.ts +9 -1
  64. package/es/components/pay/toC/utils.js +1 -1
  65. package/es/components/pinModal/hooks.d.ts +7 -0
  66. package/es/components/pinModal/hooks.js +65 -0
  67. package/es/components/pinModal/index.d.ts +4 -0
  68. package/es/components/pinModal/index.js +98 -0
  69. package/es/components/pinModal/index.less +44 -0
  70. package/es/components/pinModal/locales.d.ts +27 -0
  71. package/es/components/pinModal/locales.js +26 -0
  72. package/es/components/pinModal/serve.d.ts +6 -0
  73. package/es/components/pinModal/serve.js +11 -0
  74. package/es/components/pinModal/types.d.ts +0 -0
  75. package/es/components/pinModal/types.js +0 -0
  76. package/es/components/pinVerifyModal/hooks.d.ts +7 -0
  77. package/es/components/pinVerifyModal/hooks.js +80 -0
  78. package/es/components/pinVerifyModal/index.d.ts +5 -0
  79. package/es/components/pinVerifyModal/index.js +218 -0
  80. package/es/components/pinVerifyModal/index.less +92 -0
  81. package/es/components/pinVerifyModal/locales.d.ts +24 -0
  82. package/es/components/pinVerifyModal/locales.js +23 -0
  83. package/es/components/pinVerifyModal/types.d.ts +33 -0
  84. package/es/components/pinVerifyModal/types.js +1 -0
  85. package/es/components/productExtension/card/index.js +3 -3
  86. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  87. package/es/components/productExtension/fields/Forms/index.js +12 -12
  88. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  89. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  90. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  91. package/es/components/productExtension/server.js +2 -2
  92. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  93. package/es/components/schedules/calendar/index.js +4 -4
  94. package/es/components/schedules/calendar/serve.js +2 -2
  95. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  96. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  97. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  98. package/es/components/schedules/components/ResourceList/index.js +1 -1
  99. package/es/components/schedules/components/Search/index.js +5 -5
  100. package/es/components/schedules/model.d.ts +9 -1
  101. package/es/components/schedules/model.js +5 -5
  102. package/es/components/schedules/openHours/index.js +1 -1
  103. package/es/components/schedules/openHours/serve.js +2 -2
  104. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  105. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  107. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  108. package/es/components/schedules/products/serve.js +2 -2
  109. package/es/components/schedules/products/utils.js +5 -5
  110. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  111. package/es/components/schedules/resources/detail/index.js +10 -10
  112. package/es/components/schedules/resources/list/index.js +2 -2
  113. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  114. package/es/components/schedules/resources/serve.js +2 -2
  115. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  116. package/es/components/schedules/utils.d.ts +1 -1
  117. package/es/components/schedules/utils.js +4 -4
  118. package/es/components/selectModal/index.js +2 -2
  119. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -0
  120. package/es/components/wallet/Detail/index.js +3 -1
  121. package/es/components/wallet/Detail/model.d.ts +13 -1
  122. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  123. package/es/components/wallet/PointCard/model.d.ts +13 -1
  124. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  125. package/es/components/wallet/Voucher/model.d.ts +13 -1
  126. package/es/components/wallet/components/WalletCard.js +8 -3
  127. package/es/components/wallet/model.d.ts +9 -1
  128. package/es/components/walletList/index.js +20 -2
  129. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  130. package/es/hooks/useComponents.js +1 -1
  131. package/es/index.d.ts +2 -0
  132. package/es/index.js +3 -1
  133. package/es/utils/index.d.ts +1 -1
  134. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  135. package/lib/components/booking/addons/model.d.ts +10 -1
  136. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  137. package/lib/components/booking/forms/model.d.ts +10 -1
  138. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  139. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  140. package/lib/components/booking/info/model.d.ts +10 -1
  141. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  142. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  143. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  144. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  145. package/lib/components/booking/model.d.ts +9 -1
  146. package/lib/components/booking/notes/model.d.ts +10 -1
  147. package/lib/components/booking/payments/model.d.ts +10 -1
  148. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  149. package/lib/components/eftpos/group/index.d.ts +1 -0
  150. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  151. package/lib/components/eftpos/icon/device.d.ts +1 -0
  152. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  153. package/lib/components/eftposPay/amount.d.ts +1 -1
  154. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  155. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  156. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  157. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  158. package/lib/components/eftposPay/device.d.ts +1 -1
  159. package/lib/components/eftposPay/hooks.d.ts +2 -2
  160. package/lib/components/eftposPay/store/index.d.ts +3 -3
  161. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  162. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  163. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  164. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  165. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  166. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  167. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  168. package/lib/components/index.d.ts +3 -1
  169. package/lib/components/index.js +6 -0
  170. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  171. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
  172. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
  173. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
  174. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
  175. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
  176. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
  177. package/lib/components/pay/toC/model.d.ts +9 -1
  178. package/lib/components/pay/toC/utils.js +1 -1
  179. package/lib/components/pinModal/hooks.d.ts +7 -0
  180. package/lib/components/pinModal/hooks.js +85 -0
  181. package/lib/components/pinModal/index.d.ts +4 -0
  182. package/lib/components/pinModal/index.js +88 -0
  183. package/lib/components/pinModal/index.less +44 -0
  184. package/lib/components/pinModal/locales.d.ts +27 -0
  185. package/lib/components/pinModal/locales.js +50 -0
  186. package/lib/components/pinModal/serve.d.ts +6 -0
  187. package/lib/components/pinModal/serve.js +37 -0
  188. package/lib/components/pinModal/types.d.ts +0 -0
  189. package/lib/components/pinModal/types.js +0 -0
  190. package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
  191. package/lib/components/pinVerifyModal/hooks.js +93 -0
  192. package/lib/components/pinVerifyModal/index.d.ts +5 -0
  193. package/lib/components/pinVerifyModal/index.js +230 -0
  194. package/lib/components/pinVerifyModal/index.less +92 -0
  195. package/lib/components/pinVerifyModal/locales.d.ts +24 -0
  196. package/lib/components/pinVerifyModal/locales.js +47 -0
  197. package/lib/components/pinVerifyModal/types.d.ts +33 -0
  198. package/lib/components/pinVerifyModal/types.js +17 -0
  199. package/lib/components/schedules/model.d.ts +9 -1
  200. package/lib/components/schedules/utils.d.ts +1 -1
  201. package/lib/components/schedules/utils.js +1 -1
  202. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -0
  203. package/lib/components/wallet/Detail/index.js +18 -5
  204. package/lib/components/wallet/Detail/model.d.ts +13 -1
  205. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  206. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  207. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  208. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  209. package/lib/components/wallet/components/WalletCard.js +3 -1
  210. package/lib/components/wallet/model.d.ts +9 -1
  211. package/lib/components/walletList/index.js +19 -2
  212. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  213. package/lib/index.d.ts +2 -0
  214. package/lib/index.js +6 -0
  215. package/lib/utils/index.d.ts +1 -1
  216. package/lowcode/pin-modal/meta.ts +37 -0
  217. package/lowcode/pin-verify-modal/meta.ts +80 -0
  218. package/package.json +3 -3
@@ -0,0 +1,230 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pinVerifyModal/index.tsx
30
+ var pinVerifyModal_exports = {};
31
+ __export(pinVerifyModal_exports, {
32
+ default: () => pinVerifyModal_default
33
+ });
34
+ module.exports = __toCommonJS(pinVerifyModal_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_Delete = __toESM(require("@pisell/icon/es/Delete"));
37
+ var import_materials = require("@pisell/materials");
38
+ var import_utils = require("@pisell/utils");
39
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
40
+ var import_locales = __toESM(require("./locales"));
41
+ var import_utils2 = require("../../utils");
42
+ var import_index = require("./index.less");
43
+ var import_hooks = require("./hooks");
44
+ var PinVerifyModal = (props, ref) => {
45
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
46
+ const context = (0, import_useEngineContext.default)();
47
+ import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
48
+ import_utils2.request.setRequest((_d = (_c = context == null ? void 0 : context.appHelper) == null ? void 0 : _c.utils) == null ? void 0 : _d.request);
49
+ const isTerminal = (_g = (_f = (_e = context == null ? void 0 : context.appHelper) == null ? void 0 : _e.utils) == null ? void 0 : _f.isTerminal) == null ? void 0 : _g.call(_f);
50
+ const platform = (_i = (_h = context == null ? void 0 : context.appHelper) == null ? void 0 : _h.constants) == null ? void 0 : _i.platform;
51
+ const [visible, setVisible] = (0, import_react.useState)(false);
52
+ const modalParamsRef = (0, import_react.useRef)({});
53
+ const [pin, setPin] = (0, import_react.useState)("");
54
+ const { verifyPin, loading, verifyInfo, setVerifyInfo } = (0, import_hooks.usePinVerify)();
55
+ const KeyboardItems = (0, import_react.useMemo)(() => {
56
+ return [
57
+ {
58
+ value: 1,
59
+ label: "1",
60
+ disabled: false,
61
+ type: "text"
62
+ },
63
+ {
64
+ value: 2,
65
+ label: "2",
66
+ disabled: false,
67
+ type: "text"
68
+ },
69
+ {
70
+ value: 3,
71
+ label: "3",
72
+ disabled: false,
73
+ type: "text"
74
+ },
75
+ {
76
+ value: 4,
77
+ label: "4",
78
+ disabled: false,
79
+ type: "text"
80
+ },
81
+ {
82
+ value: 5,
83
+ label: "5",
84
+ disabled: false,
85
+ type: "text"
86
+ },
87
+ {
88
+ value: 6,
89
+ label: "6",
90
+ disabled: false,
91
+ type: "text"
92
+ },
93
+ {
94
+ value: 7,
95
+ label: "7",
96
+ disabled: false,
97
+ type: "text"
98
+ },
99
+ {
100
+ value: 8,
101
+ label: "8",
102
+ disabled: false,
103
+ type: "text"
104
+ },
105
+ {
106
+ value: 9,
107
+ label: "9",
108
+ disabled: false,
109
+ type: "text"
110
+ },
111
+ {
112
+ value: "delete",
113
+ label: /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" }),
114
+ disabled: false,
115
+ type: "text"
116
+ },
117
+ {
118
+ value: 0,
119
+ label: "0",
120
+ disabled: false,
121
+ type: "text"
122
+ },
123
+ {
124
+ value: "verify",
125
+ label: import_utils.locales.getText("pisell2.pin.verify.modal.keyboard.verify"),
126
+ disabled: false,
127
+ type: "primary"
128
+ }
129
+ ];
130
+ }, [import_utils.locales]);
131
+ const onOpen = (params) => {
132
+ var _a2;
133
+ modalParamsRef.current = params;
134
+ setVerifyInfo({
135
+ failed_count: (params == null ? void 0 : params.failed_count) || 0,
136
+ check_max_count: (params == null ? void 0 : params.check_max_count) || 0
137
+ });
138
+ setVisible(true);
139
+ (_a2 = props.onOpen) == null ? void 0 : _a2.call(props);
140
+ };
141
+ const onClose = () => {
142
+ var _a2;
143
+ modalParamsRef.current = {};
144
+ setPin("");
145
+ setVerifyInfo(null);
146
+ setVisible(false);
147
+ (_a2 = props.onClose) == null ? void 0 : _a2.call(props);
148
+ };
149
+ (0, import_react.useImperativeHandle)(ref, () => ({
150
+ open: onOpen,
151
+ close: onClose
152
+ }));
153
+ const handleChange = (e) => {
154
+ if (e === "delete") {
155
+ setPin(pin.slice(0, -1));
156
+ return;
157
+ } else if (e === "verify") {
158
+ handleVerify();
159
+ return;
160
+ } else {
161
+ if (pin.length < 4) {
162
+ setPin(pin + e);
163
+ }
164
+ }
165
+ };
166
+ const handleVerify = () => {
167
+ var _a2;
168
+ if (loading) {
169
+ return;
170
+ }
171
+ if (pin.length === 4) {
172
+ const wallet_detail_id = (_a2 = modalParamsRef.current) == null ? void 0 : _a2.wallet_detail_id;
173
+ verifyPin({ wallet_detail_id, pin }, (params) => {
174
+ var _a3;
175
+ (_a3 = props.onSuccess) == null ? void 0 : _a3.call(props, params);
176
+ onClose();
177
+ });
178
+ } else {
179
+ (0, import_materials.PisellToast)({
180
+ content: import_utils.locales.getText("pisell2.pin.verify.modal.keyboard.title"),
181
+ duration: 2
182
+ });
183
+ }
184
+ };
185
+ return /* @__PURE__ */ import_react.default.createElement(
186
+ import_materials.PisellModal,
187
+ {
188
+ platform: isTerminal ? "h5" : void 0,
189
+ visible,
190
+ title: import_utils.locales.getText("pisell2.pin.verify.modal.title"),
191
+ headerDivider: false,
192
+ footer: null,
193
+ onClose,
194
+ maskClosable: false,
195
+ onCancel: onClose,
196
+ destroyOnClose: true,
197
+ mobileModalHeight: isTerminal ? void 0 : "auto"
198
+ },
199
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-user" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-user-avatar" }, /* @__PURE__ */ import_react.default.createElement(
200
+ "img",
201
+ {
202
+ src: ((_j = modalParamsRef.current.customer) == null ? void 0 : _j.cover) || "https://file.mypisell.com/static/default_product.png",
203
+ alt: "avatar",
204
+ className: "pin-verify-modal-content-user-avatar-img"
205
+ }
206
+ )), /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-user-right" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-user-right-name" }, ((_k = modalParamsRef.current.customer) == null ? void 0 : _k.display_name) || ((_l = modalParamsRef.current.customer) == null ? void 0 : _l.nickname)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-user-right-wallet" }, import_utils.locales.getText("pisell2.pin.verify.modal.wallet"), modalParamsRef.current.wallet_code))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-keyboard" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-keyboard-title" }, import_utils.locales.getText("pisell2.pin.verify.modal.keyboard.title")), /* @__PURE__ */ import_react.default.createElement(
207
+ import_materials.VirtualKeyboard,
208
+ {
209
+ style: { width: "300px" },
210
+ keyboardProps: {
211
+ keydown: false,
212
+ items: KeyboardItems,
213
+ onChange: handleChange
214
+ },
215
+ virtualKeyInputProps: {
216
+ value: pin,
217
+ onChange: (e) => {
218
+ setPin(e.target.value);
219
+ },
220
+ placeholder: "0000",
221
+ style: {
222
+ height: "45px",
223
+ fontSize: "36px"
224
+ }
225
+ }
226
+ }
227
+ ), (verifyInfo == null ? void 0 : verifyInfo.check_max_count) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-verify-modal-content-keyboard-desc" }, import_utils.locales.getText("pisell2.pin.verify.modal.keyboard.desc"), verifyInfo == null ? void 0 : verifyInfo.remaining_count, "/", verifyInfo == null ? void 0 : verifyInfo.check_max_count) : null))
228
+ );
229
+ };
230
+ var pinVerifyModal_default = (0, import_react.forwardRef)(PinVerifyModal);
@@ -0,0 +1,92 @@
1
+ .pin-verify-modal-content {
2
+ width: 100%;
3
+ height: 100%;
4
+ padding-bottom: 16px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ gap: 16px;
9
+
10
+ &-user {
11
+ min-width: 300px;
12
+ min-height: 60px;
13
+ padding: 8px;
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 8px;
17
+ border-radius: 8px;
18
+ border: 1px solid #d0d5dd;
19
+
20
+ &-avatar {
21
+ width: 42px;
22
+ height: 42px;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ border-radius: 50%;
27
+ overflow: hidden;
28
+
29
+ &-img {
30
+ width: 100%;
31
+ }
32
+ }
33
+
34
+ &-right {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 4px;
38
+
39
+ &-name {
40
+ font-size: 16px;
41
+ font-weight: 600;
42
+ color: #101828;
43
+ }
44
+
45
+ &-wallet {
46
+ color: #667085;
47
+ font-size: 14px;
48
+ font-weight: 400;
49
+ }
50
+ }
51
+ }
52
+
53
+ &-keyboard {
54
+ display: flex;
55
+ flex-direction: column;
56
+ align-items: center;
57
+ gap: 8px;
58
+
59
+ &-title {
60
+ text-align: center;
61
+ color: #101828;
62
+ font-size: 16px;
63
+ font-weight: 500;
64
+ }
65
+
66
+ &-desc {
67
+ color: #667085;
68
+ font-size: 16px;
69
+ font-weight: 400;
70
+ }
71
+ }
72
+
73
+ .virtual-keyboard-input-wrap {
74
+ height: 45px !important;
75
+ }
76
+
77
+ .virtual-keyboard-wrap .virtual-keyboard-content .virtual-keyboard-item {
78
+ padding-top: 50px !important;
79
+ }
80
+
81
+ .virtual-keyboard-wrap
82
+ .virtual-keyboard-content
83
+ .virtual-keyboard-item
84
+ .virtual-keyboard-item-button {
85
+ padding: 0 !important;
86
+ }
87
+
88
+ .virtual-keyboard-input-delete {
89
+ font-size: 30px;
90
+ color: #000;
91
+ }
92
+ }
@@ -0,0 +1,24 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.pin.verify.modal.title': string;
4
+ 'pisell2.pin.verify.modal.wallet': string;
5
+ 'pisell2.pin.verify.modal.keyboard.title': string;
6
+ 'pisell2.pin.verify.modal.keyboard.desc': string;
7
+ 'pisell2.pin.verify.modal.keyboard.verify': string;
8
+ };
9
+ 'zh-CN': {
10
+ 'pisell2.pin.verify.modal.title': string;
11
+ 'pisell2.pin.verify.modal.wallet': string;
12
+ 'pisell2.pin.verify.modal.keyboard.title': string;
13
+ 'pisell2.pin.verify.modal.keyboard.desc': string;
14
+ 'pisell2.pin.verify.modal.keyboard.verify': string;
15
+ };
16
+ 'zh-HK': {
17
+ 'pisell2.pin.verify.modal.title': string;
18
+ 'pisell2.pin.verify.modal.wallet': string;
19
+ 'pisell2.pin.verify.modal.keyboard.title': string;
20
+ 'pisell2.pin.verify.modal.keyboard.desc': string;
21
+ 'pisell2.pin.verify.modal.keyboard.verify': string;
22
+ };
23
+ };
24
+ export default _default;
@@ -0,0 +1,47 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pinVerifyModal/locales.ts
20
+ var locales_exports = {};
21
+ __export(locales_exports, {
22
+ default: () => locales_default
23
+ });
24
+ module.exports = __toCommonJS(locales_exports);
25
+ var locales_default = {
26
+ en: {
27
+ "pisell2.pin.verify.modal.title": "Wallet Verification",
28
+ "pisell2.pin.verify.modal.wallet": "Wallet : ",
29
+ "pisell2.pin.verify.modal.keyboard.title": "Enter the 4-digit PIN to continue",
30
+ "pisell2.pin.verify.modal.keyboard.desc": "Remaining attempts : ",
31
+ "pisell2.pin.verify.modal.keyboard.verify": "Verify"
32
+ },
33
+ "zh-CN": {
34
+ "pisell2.pin.verify.modal.title": "钱包验证",
35
+ "pisell2.pin.verify.modal.wallet": "钱包 : ",
36
+ "pisell2.pin.verify.modal.keyboard.title": "请输入该钱包的4位PIN码以继续",
37
+ "pisell2.pin.verify.modal.keyboard.desc": "剩余验证次数 : ",
38
+ "pisell2.pin.verify.modal.keyboard.verify": "验证"
39
+ },
40
+ "zh-HK": {
41
+ "pisell2.pin.verify.modal.title": "錢包驗證",
42
+ "pisell2.pin.verify.modal.wallet": "錢包 : ",
43
+ "pisell2.pin.verify.modal.keyboard.title": "請輸入該錢包的4位PIN碼以繼續",
44
+ "pisell2.pin.verify.modal.keyboard.desc": "剩餘驗證次數 : ",
45
+ "pisell2.pin.verify.modal.keyboard.verify": "驗證"
46
+ }
47
+ };
@@ -0,0 +1,33 @@
1
+ export interface PinVerifyModalProps {
2
+ onOpen?: () => void;
3
+ onClose?: () => void;
4
+ onSuccess?: (params?: VerifyPinSuccessParams) => void;
5
+ }
6
+ export interface PinVerifyModalRef {
7
+ open: (params: ModalParams) => void;
8
+ close: () => void;
9
+ }
10
+ export interface ModalParams {
11
+ wallet_code: string;
12
+ wallet_detail_id: string | number;
13
+ failed_count?: number;
14
+ check_max_count?: number;
15
+ customer?: {
16
+ display_name?: string;
17
+ nickname?: string;
18
+ cover?: string;
19
+ };
20
+ }
21
+ export interface VerifyInfo {
22
+ remaining_count?: number;
23
+ failed_count?: number;
24
+ check_max_count?: number;
25
+ }
26
+ export declare type TVerifyPin = (data: {
27
+ wallet_detail_id: string | number;
28
+ pin: string;
29
+ }, onSuccess: (params: VerifyPinSuccessParams) => void) => void;
30
+ export interface VerifyPinSuccessParams {
31
+ customer_id: string | number;
32
+ customer_pin_key: string;
33
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/pinVerifyModal/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
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
+ }>;
@@ -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;
@@ -210,6 +210,7 @@ var TicketBooking = () => {
210
210
  const _callbackFnRef = (0, import_react.useRef)();
211
211
  (0, import_react.useEffect)(() => {
212
212
  var _a2, _b2, _c2, _d, _e, _f;
213
+ localStorage.removeItem("bookingResourceList");
213
214
  _persistentRef.current = storage.get(`drawer-booking`) === "true" ? true : isTerminal();
214
215
  if (lowcodeRef) {
215
216
  lowcodeRef.onReady(void 0);
@@ -67,7 +67,11 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
67
67
  expire_date = "",
68
68
  product = {}
69
69
  } = detail;
70
- const { description = "", extension_data = [], customer_order_behavior_count = 0 } = product || {};
70
+ const {
71
+ description = "",
72
+ extension_data = [],
73
+ customer_order_behavior_count = 0
74
+ } = product || {};
71
75
  const context = (0, import_useEngineContext.default)();
72
76
  const [extensionData, setExtensionData] = (0, import_react.useState)([]);
73
77
  const [customerOrderBehaviorCount, setCustomerOrderBehaviorCount] = (0, import_react.useState)(0);
@@ -154,7 +158,10 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
154
158
  };
155
159
  };
156
160
  const usageRules = generateUsageRules(usageCreditsData);
157
- const personalLimit = generatePersonalLimit(usageCreditsData, { totalOrderBehaviorCount, customerOrderBehaviorCount });
161
+ const personalLimit = generatePersonalLimit(usageCreditsData, {
162
+ totalOrderBehaviorCount,
163
+ customerOrderBehaviorCount
164
+ });
158
165
  const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
159
166
  const dvaStore = (_c = (_b = utils == null ? void 0 : utils.getStore) == null ? void 0 : _b.call(utils)) == null ? void 0 : _c.getState();
160
167
  const [TimeLineData, setTimeLineData] = (0, import_react.useState)([]);
@@ -206,6 +213,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
206
213
  }
207
214
  };
208
215
  (0, import_react.useEffect)(() => {
216
+ var _a2;
209
217
  let data = [
210
218
  {
211
219
  label: import_utils.locales.getText("page.wallet.cardName"),
@@ -222,9 +230,10 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
222
230
  }
223
231
  ];
224
232
  if (tag === "product_discount_card") {
233
+ const isFixedAmount = ((_a2 = detail.metadata) == null ? void 0 : _a2.discount_card_type) === "fixed_amount";
225
234
  data.splice(2, 0, {
226
235
  label: import_utils.locales.getText("page.wallet.discount"),
227
- value: balance ? `${Number(balance)}%` : ""
236
+ value: balance ? isFixedAmount ? `${symbol}${Number(balance)}` : `${Number(balance)}%` : ""
228
237
  });
229
238
  } else if (tag === "point_card") {
230
239
  data.splice(2, 0, {
@@ -287,7 +296,9 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
287
296
  setWeekOrderBehaviorCount(week_order_behavior_count);
288
297
  setMonthOrderBehaviorCount(month_order_behavior_count);
289
298
  if (Array.isArray(extension_data2) && extension_data2.length > 0) {
290
- const usageCreditsItem = extension_data2.find((item) => item.field_key === "usage_credits");
299
+ const usageCreditsItem = extension_data2.find(
300
+ (item) => item.field_key === "usage_credits"
301
+ );
291
302
  if (usageCreditsItem == null ? void 0 : usageCreditsItem.value) {
292
303
  setUsageCreditsData(usageCreditsItem.value);
293
304
  setShouldShowUsageRules(true);
@@ -388,7 +399,9 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
388
399
  throw new Error(`HTTP error! status: ${response.status}`);
389
400
  }
390
401
  const passData = await response.arrayBuffer();
391
- const blob = new Blob([passData], { type: "application/vnd.apple.pkpass" });
402
+ const blob = new Blob([passData], {
403
+ type: "application/vnd.apple.pkpass"
404
+ });
392
405
  const downloadUrl = URL.createObjectURL(blob);
393
406
  const a = document.createElement("a");
394
407
  a.href = downloadUrl;
@@ -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 {};
@@ -54,7 +54,8 @@ var WalletCard = ({
54
54
  limit_status,
55
55
  product_cover = "",
56
56
  par_value = "",
57
- unified_messages = {}
57
+ unified_messages = {},
58
+ ...rest
58
59
  } = item;
59
60
  const platform = (0, import_react.useMemo)(() => (0, import_utils.isMobile)() ? "h5" : "pc", []);
60
61
  const { title: disabledReason = "" } = unified_messages;
@@ -64,6 +65,7 @@ var WalletCard = ({
64
65
  return /* @__PURE__ */ import_react.default.createElement(
65
66
  import_materials.PisellWalletPassCard,
66
67
  {
68
+ ...rest,
67
69
  balanceTitle,
68
70
  showDetail: false,
69
71
  showRedeem: false,