@pisell/private-materials 6.2.46 → 6.2.48

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 (125) 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 +148 -164
  7. package/build/lowcode/render/default/view.js +8 -8
  8. package/build/lowcode/view.js +8 -8
  9. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  10. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  11. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  12. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  13. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  14. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  15. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  16. package/es/components/booking/components/voucher/index.js +18 -4
  17. package/es/components/booking/forms/table/index.d.ts +0 -1
  18. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  19. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  20. package/es/components/booking/info/notes/index.d.ts +0 -1
  21. package/es/components/booking/info/service/like/index.d.ts +0 -1
  22. package/es/components/booking/info2/cartClientCard/index.js +49 -17
  23. package/es/components/booking/info2/cartClientCard/utils.d.ts +2 -2
  24. package/es/components/eftpos/hooks.d.ts +0 -1
  25. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  26. package/es/components/eftpos/icon/device.d.ts +0 -1
  27. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  28. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  29. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  30. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  31. package/es/components/eftposPay/pay.d.ts +0 -1
  32. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  33. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  34. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  35. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  36. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  37. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  38. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  39. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  40. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  41. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  42. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  43. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  44. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  45. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  46. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  47. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  48. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  49. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  50. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  51. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  52. package/es/components/schedules/products/index.d.ts +0 -1
  53. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  54. package/es/components/schedules/utils.d.ts +1 -1
  55. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  56. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  57. package/es/components/shoppingCart/index.d.ts +0 -1
  58. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -0
  59. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +3 -1
  60. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  61. package/es/plus/clientName/index.d.ts +0 -1
  62. package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  63. package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
  64. package/es/plus/saasRegister/components/Header.d.ts +0 -1
  65. package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  66. package/es/utils/index.d.ts +1 -1
  67. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  68. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  69. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  70. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  71. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  72. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  73. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  74. package/lib/components/booking/components/voucher/index.js +15 -3
  75. package/lib/components/booking/forms/table/index.d.ts +0 -1
  76. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  77. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  78. package/lib/components/booking/info/notes/index.d.ts +0 -1
  79. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  80. package/lib/components/booking/info2/cartClientCard/index.js +15 -3
  81. package/lib/components/booking/info2/cartClientCard/utils.d.ts +2 -2
  82. package/lib/components/eftpos/hooks.d.ts +0 -1
  83. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  84. package/lib/components/eftpos/icon/device.d.ts +0 -1
  85. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  86. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  87. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  88. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  89. package/lib/components/eftposPay/pay.d.ts +0 -1
  90. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  91. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  92. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  93. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  94. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  95. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  96. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  97. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  98. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  99. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  100. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  101. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  102. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  103. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  104. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  105. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  106. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  107. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  108. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  109. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  110. package/lib/components/schedules/products/index.d.ts +0 -1
  111. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  112. package/lib/components/schedules/utils.d.ts +1 -1
  113. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  114. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  115. package/lib/components/shoppingCart/index.d.ts +0 -1
  116. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -0
  117. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +3 -1
  118. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  119. package/lib/plus/clientName/index.d.ts +0 -1
  120. package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  121. package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
  122. package/lib/plus/saasRegister/components/Header.d.ts +0 -1
  123. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  124. package/lib/utils/index.d.ts +1 -1
  125. package/package.json +3 -3
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const CartItem: ({ onNext }: any) => JSX.Element;
4
3
  export default CartItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
4
3
  export default SelectProductItem;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const renderBundles: (item: any, amountSymbol: string) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const FooterMenus: ({ state, menuChange, items }: any) => JSX.Element | null;
4
3
  export default FooterMenus;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -102,6 +102,18 @@ var VoucherCard = function VoucherCard(props) {
102
102
  });
103
103
  return val;
104
104
  }, [state.service.value]);
105
+ var onScanWallPassCode = useMemoizedFn(function (e) {
106
+ if (!e.detail.code) {
107
+ return;
108
+ }
109
+ onScanCode(e.detail.code);
110
+ });
111
+ useEffect(function () {
112
+ window.addEventListener('onScanWallPassCode', onScanWallPassCode);
113
+ return function () {
114
+ window.removeEventListener('onScanWallPassCode', onScanWallPassCode);
115
+ };
116
+ }, []);
105
117
  var addonsMemo = useMemo(function () {
106
118
  var _ref2;
107
119
  var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
@@ -210,13 +222,13 @@ var VoucherCard = function VoucherCard(props) {
210
222
 
211
223
  // apply code
212
224
  var onScanCode = /*#__PURE__*/function () {
213
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
225
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(codeParam) {
214
226
  var val;
215
227
  return _regeneratorRuntime().wrap(function _callee$(_context) {
216
228
  while (1) switch (_context.prev = _context.next) {
217
229
  case 0:
218
230
  _context.next = 2;
219
- return shopDiscount.scanCode(code);
231
+ return shopDiscount.scanCode(codeParam || code);
220
232
  case 2:
221
233
  val = _context.sent;
222
234
  console.log(val);
@@ -234,7 +246,7 @@ var VoucherCard = function VoucherCard(props) {
234
246
  }
235
247
  }, _callee);
236
248
  }));
237
- return function onScanCode() {
249
+ return function onScanCode(_x) {
238
250
  return _ref3.apply(this, arguments);
239
251
  };
240
252
  }();
@@ -318,7 +330,9 @@ var VoucherCard = function VoucherCard(props) {
318
330
  // }
319
331
  })), /*#__PURE__*/React.createElement(Button, {
320
332
  size: "small",
321
- onClick: onScanCode,
333
+ onClick: function onClick() {
334
+ return onScanCode();
335
+ },
322
336
  disabled: !code
323
337
  }, locales.getText('pisell2.text.apply')))));
324
338
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -215,23 +215,53 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (props, ref) {
215
215
  }, [pagination, loading]);
216
216
 
217
217
  // 切换客户
218
- var handleSetClient = useMemoizedFn(function (record) {
219
- // 没有客户 设置客户
220
- if (isWalkIn(selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id)) {
221
- var _Toast$success;
222
- selectCustomer(record);
223
- setSearchModalVisible(false);
224
- Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, locales.getText('pisell2.text.add-client-success'));
225
- return;
226
- }
227
- if ((selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id) === (record === null || record === void 0 ? void 0 : record.id)) {
228
- setSearchModalVisible(false);
229
- return;
230
- }
231
- // 有客户 打开切换客户弹窗
232
- setPendingCustomer(record);
233
- setSwitchModalVisible(true);
234
- });
218
+ var handleSetClient = useMemoizedFn( /*#__PURE__*/function () {
219
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(record, options) {
220
+ var _options$fullData, _options$fullData2;
221
+ var _options$fullData3, _Toast$success;
222
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
223
+ while (1) switch (_context3.prev = _context3.next) {
224
+ case 0:
225
+ if (!(isWalkIn(selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id) && (options === null || options === void 0 || (_options$fullData = options.fullData) === null || _options$fullData === void 0 ? void 0 : _options$fullData.searchType) === 'walletPass' && options !== null && options !== void 0 && (_options$fullData2 = options.fullData) !== null && _options$fullData2 !== void 0 && _options$fullData2.scanCode)) {
226
+ _context3.next = 3;
227
+ break;
228
+ }
229
+ window.dispatchEvent(new CustomEvent('onScanWallPassCode', {
230
+ detail: {
231
+ code: options === null || options === void 0 || (_options$fullData3 = options.fullData) === null || _options$fullData3 === void 0 ? void 0 : _options$fullData3.scanCode
232
+ }
233
+ }));
234
+ return _context3.abrupt("return");
235
+ case 3:
236
+ if (!isWalkIn(selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id)) {
237
+ _context3.next = 8;
238
+ break;
239
+ }
240
+ selectCustomer(record);
241
+ setSearchModalVisible(false);
242
+ Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, locales.getText('pisell2.text.add-client-success'));
243
+ return _context3.abrupt("return");
244
+ case 8:
245
+ if (!((selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id) === (record === null || record === void 0 ? void 0 : record.id))) {
246
+ _context3.next = 11;
247
+ break;
248
+ }
249
+ setSearchModalVisible(false);
250
+ return _context3.abrupt("return");
251
+ case 11:
252
+ // 有客户 打开切换客户弹窗
253
+ setPendingCustomer(record);
254
+ setSwitchModalVisible(true);
255
+ case 13:
256
+ case "end":
257
+ return _context3.stop();
258
+ }
259
+ }, _callee3);
260
+ }));
261
+ return function (_x3, _x4) {
262
+ return _ref4.apply(this, arguments);
263
+ };
264
+ }());
235
265
 
236
266
  // 确认切换客户
237
267
  var handleConfirmSwitch = function handleConfirmSwitch() {
@@ -250,6 +280,8 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (props, ref) {
250
280
  };
251
281
  useMemo(function () {
252
282
  setHandleSetClient(handleSetClient);
283
+ }, []);
284
+ useEffect(function () {
253
285
  return function () {
254
286
  setHandleSetClient(null);
255
287
  };
@@ -1,3 +1,3 @@
1
1
  import { ClientData } from "./types";
2
- export declare const setHandleSetClient: (fn: ((customer: ClientData | null) => void) | null) => void;
3
- export declare const getHandleSetClient: () => ((customer: ClientData | null) => void) | null;
2
+ export declare const setHandleSetClient: (fn: ((customer: ClientData | null, options?: any) => void) | null) => void;
3
+ export declare const getHandleSetClient: () => ((customer: ClientData | null, options?: any) => void) | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Eftpos } from './const';
3
2
  /**
4
3
  * @title: tyro 设备连接
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: () => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './titlebar.less';
3
2
  declare enum EPopupTitleBarVariantType {
4
3
  BackTitleClose = "back-title-cancel",
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StatusType } from '../../const';
3
2
  declare const _default: (props: {
4
3
  status: StatusType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: (props: {
3
2
  status: string;
4
3
  pedding?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps } from './const';
3
2
  import './index.less';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 获取 Tyro 资源
4
3
  * @description:
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ api, onChange, formatAmount, }: {
3
2
  api: any;
4
3
  onChange: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: () => JSX.Element;
3
2
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Layout: () => JSX.Element;
4
3
  export default Layout;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectHolderModal: (props: any) => JSX.Element;
3
2
  export default SelectHolderModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Status: (props: any) => JSX.Element;
4
3
  export default Status;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const DayItem: (props: any) => JSX.Element;
4
3
  export default DayItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { CalendarItemProps } from '../../../../../type';
4
3
  declare const Item: (props: CalendarItemProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Status: (props: any) => JSX.Element;
4
3
  export default Status;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Resource: (props: any) => JSX.Element;
3
2
  export default Resource;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Schedule: () => JSX.Element;
3
2
  export default Schedule;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductItemPreview: ({ item, onClick, onRemove, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItemPreview;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface valueType {
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const MaxParticipantsModule: ({ form, value, onChange, useSchedule, isAutoChange, onData, }: {
4
3
  form: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const ResourcesModule: ({ product }: {
3
2
  product: any;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductDetailByDate: () => JSX.Element;
4
3
  export default ProductDetailByDate;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Products: () => JSX.Element;
4
3
  export default Products;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const RelationProduct: ({ value, onChange, }: {
4
3
  value?: 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/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Empty: (props: any) => JSX.Element;
4
3
  export default Empty;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Content: () => JSX.Element;
4
3
  export default Content;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { shoppingCartProps } from './type';
3
2
  declare const shoppingCart: ({ onCard, onAction, onChange, onAddProduct, onActiveKey, ...props }: shoppingCartProps) => JSX.Element;
4
3
  export default shoppingCart;
@@ -260,6 +260,8 @@ var TicketBooking = function TicketBooking() {
260
260
  openScan(function (data) {
261
261
  handleScan(data);
262
262
  });
263
+ }, []);
264
+ useEffect(function () {
263
265
  return function () {
264
266
  closeScan();
265
267
  };
@@ -21,7 +21,9 @@ var useScanGlobalHandle = function useScanGlobalHandle() {
21
21
  return;
22
22
  }
23
23
  if (handleSetClient && data.data) {
24
- handleSetClient(data.data);
24
+ handleSetClient(data.data, {
25
+ fullData: data
26
+ });
25
27
  }
26
28
  };
27
29
  var productHandle = function productHandle(data) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from '../serve';
3
2
  /**
4
3
  * 钱包卡片Hook的参数
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { IClientNameProps } from './type';
4
3
  declare const ClientName: ({ className, dataSource, style }: IClientNameProps) => JSX.Element | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SCOProps } from '../types';
3
2
  import '../index.less';
4
3
  export declare const Header: (props: SCOProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SRProps } from '../types';
3
2
  import '../index.less';
4
3
  declare const GoLogin: (props: SRProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SRProps } from '../types';
3
2
  import '../index.less';
4
3
  export declare const Header: (props: SRProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../index.less';
3
2
  declare const VerifyingEmailLink: (props: {
4
3
  onVerifyLink: () => Promise<void>;
@@ -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/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const CartItem: ({ onNext }: any) => JSX.Element;
4
3
  export default CartItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
4
3
  export default SelectProductItem;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const renderBundles: (item: any, amountSymbol: string) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const FooterMenus: ({ state, menuChange, items }: any) => JSX.Element | null;
4
3
  export default FooterMenus;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -107,6 +107,18 @@ var VoucherCard = (props) => {
107
107
  });
108
108
  return val;
109
109
  }, [state.service.value]);
110
+ const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
111
+ if (!e.detail.code) {
112
+ return;
113
+ }
114
+ onScanCode(e.detail.code);
115
+ });
116
+ (0, import_react.useEffect)(() => {
117
+ window.addEventListener("onScanWallPassCode", onScanWallPassCode);
118
+ return () => {
119
+ window.removeEventListener("onScanWallPassCode", onScanWallPassCode);
120
+ };
121
+ }, []);
110
122
  const addonsMemo = (0, import_react.useMemo)(() => {
111
123
  var _a2;
112
124
  const val = (_a2 = state.addons.value || []) == null ? void 0 : _a2.map((value) => {
@@ -220,8 +232,8 @@ var VoucherCard = (props) => {
220
232
  }
221
233
  });
222
234
  });
223
- const onScanCode = async () => {
224
- const val = await shopDiscount.scanCode(code);
235
+ const onScanCode = async (codeParam) => {
236
+ const val = await shopDiscount.scanCode(codeParam || code);
225
237
  console.log(val);
226
238
  if (val == null ? void 0 : val.isAvailable) {
227
239
  productListToValue(val.productList, true);
@@ -305,7 +317,7 @@ var VoucherCard = (props) => {
305
317
  allowClear: true,
306
318
  placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
307
319
  }
308
- )), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
320
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: () => onScanCode(), disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
309
321
  ));
310
322
  };
311
323
  var voucher_default = VoucherCard;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;