@pisell/private-materials 6.8.18 → 6.8.20

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 (27) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/booking/components/footer/index.d.ts +0 -1
  8. package/es/components/booking/components/footer/index.js +2 -4
  9. package/es/components/booking/info/index.d.ts +0 -1
  10. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  11. package/es/components/checkout/PaymentModal.js +12 -8
  12. package/es/components/checkout/PaymentProvider.d.ts +13 -0
  13. package/es/components/checkout/export.d.ts +9 -0
  14. package/es/components/checkout/index.d.ts +5 -0
  15. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  16. package/es/components/ticketBooking/index.d.ts +0 -1
  17. package/lib/components/booking/components/footer/index.d.ts +0 -1
  18. package/lib/components/booking/components/footer/index.js +3 -2
  19. package/lib/components/booking/info/index.d.ts +0 -1
  20. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  21. package/lib/components/checkout/PaymentModal.js +12 -8
  22. package/lib/components/checkout/PaymentProvider.d.ts +13 -0
  23. package/lib/components/checkout/export.d.ts +9 -0
  24. package/lib/components/checkout/index.d.ts +5 -0
  25. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  26. package/lib/components/ticketBooking/index.d.ts +0 -1
  27. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -1783,10 +1783,8 @@ var Footer = function Footer(props) {
1783
1783
  clearAllScanListenersTaskQueue = _useScanManager2.clearAllScanListenersTaskQueue;
1784
1784
  // 清空所有内容并重置购物车
1785
1785
  var handleClearAllAndReset = function handleClearAllAndReset() {
1786
- var _shopDiscount$clear;
1787
- // setTimeout(() => {
1788
- // (window as any)?.shopApi?.bookingTicket?.clearAllCart();
1789
- // }, 0);
1786
+ var _window8, _shopDiscount$clear;
1787
+ (_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.shopApi) === null || _window8 === void 0 || (_window8 = _window8.bookingTicket) === null || _window8 === void 0 || _window8.clearAllCart();
1790
1788
  clearAllScanListenersTaskQueue();
1791
1789
  // 清空服务项目
1792
1790
  dispatch({
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -234,14 +234,18 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
234
234
  _context.next = 5;
235
235
  return checkoutModule === null || checkoutModule === void 0 ? void 0 : checkoutModule.addPaymentItemAsync({
236
236
  amount: result.amount,
237
- /** 支付类型,跟支付列表上对应的支付方式保持一致 */
238
- code: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.code,
239
- /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
240
- custom_payment_id: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.id,
241
- /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
242
- name: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.name,
243
- /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
244
- type: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.type,
237
+ // /** 支付类型,跟支付列表上对应的支付方式保持一致 */
238
+ // code: cashPaymentMethod?.code,
239
+ // /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
240
+ // custom_payment_id: cashPaymentMethod?.id,
241
+ // /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
242
+ // name: cashPaymentMethod?.name,
243
+ // /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
244
+ // type: cashPaymentMethod?.type,
245
+ code: "CUSTOM_10361",
246
+ "type": "custom",
247
+ "name": "Cash - Cafe",
248
+ "custom_payment_id": 10361,
245
249
  /** 代金券、充值卡、积分卡等wallet pass id */
246
250
  voucher_id: 0,
247
251
  rounding_amount: result.roundingAmount
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { PaymentModalProps } from './PaymentModal';
3
+ interface PaymentContextType {
4
+ openPaymentModal: (props: PaymentModalProps) => void;
5
+ closePaymentModal: () => void;
6
+ }
7
+ export declare const PaymentProvider: React.FC<{
8
+ children: React.ReactNode;
9
+ }>;
10
+ export declare const usePaymentModal: () => PaymentContextType;
11
+ export declare const openPaymentModal: (props: PaymentModalProps) => void;
12
+ export declare const closePaymentModal: () => void;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ export { default } from "./index";
2
+ export { default as Checkout } from "./index";
3
+ export { default as AmountSummary } from "./components/AmountSummary/index";
4
+ export { default as WalletPassModule } from "./components/WalletPassModule/index";
5
+ export { default as PaymentOptionsModule } from "./components/PaymentOptionsModule/index";
6
+ export { default as CashPaymentModule } from "./components/CashPaymentModule/index";
7
+ export { default as AdditionalModule } from "./components/AdditionalModule/index";
8
+ export type { CheckoutProps, PaymentData, PaymentItem, PaymentResult, ModuleConfig, StatusConfig, CheckoutCallbacks, AmountSummaryProps, WalletPassModuleProps, CashPaymentModuleProps, PaymentOptionsModuleProps, AdditionalModuleProps, } from "./types";
9
+ export { checkoutStyles, calculateModalHeight } from "./styles";
@@ -0,0 +1,5 @@
1
+ export { default as PaymentModal } from './PaymentModal';
2
+ export { PaymentProvider, usePaymentModal } from './PaymentProvider';
3
+ export type { PaymentModalProps, PaymentModalData } from './PaymentModal';
4
+ export { default as PaymentResultToast, PaymentResultToastProvider, usePaymentResultToast, showPaymentResultToastSuccess, showPaymentResultToastFailed, showPaymentResultToastWalletPassFailed, showPaymentResultToast, closePaymentResultToast, setTillButton } from './components/PaymentResultToast';
5
+ export type { ShowPaymentResultToastConfig, PaymentResultToastContextType, PaymentResultToastProps, PaymentResultToastConfig, ActionButtonProps, ActionButtonGroupList, StatusClassName } from './components/PaymentResultToast';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
4
3
  export declare const _formatBookingDetail: (data: any, modalState: any) => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProductDisplayConfig, ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
3
2
  import './index.less';
4
3
  interface TicketBookingProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -1286,7 +1286,8 @@ var Footer = (props) => {
1286
1286
  const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
1287
1287
  const { clearAllScanListenersTaskQueue } = (0, import_useScanManager.default)();
1288
1288
  const handleClearAllAndReset = () => {
1289
- var _a2;
1289
+ var _a2, _b2, _c2;
1290
+ (_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
1290
1291
  clearAllScanListenersTaskQueue();
1291
1292
  dispatch({
1292
1293
  type: "setService",
@@ -1324,7 +1325,7 @@ var Footer = (props) => {
1324
1325
  orderNote: ""
1325
1326
  }
1326
1327
  });
1327
- (_a2 = shopDiscount == null ? void 0 : shopDiscount.clear) == null ? void 0 : _a2.call(shopDiscount);
1328
+ (_c2 = shopDiscount == null ? void 0 : shopDiscount.clear) == null ? void 0 : _c2.call(shopDiscount);
1328
1329
  setEditOrderId(0);
1329
1330
  };
1330
1331
  const setEditCartMode = (order_id2, payData, closeModal = false) => {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -182,14 +182,18 @@ var PaymentContent = (0, import_react.forwardRef)(
182
182
  });
183
183
  await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
184
184
  amount: result.amount,
185
- /** 支付类型,跟支付列表上对应的支付方式保持一致 */
186
- code: cashPaymentMethod == null ? void 0 : cashPaymentMethod.code,
187
- /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
188
- custom_payment_id: cashPaymentMethod == null ? void 0 : cashPaymentMethod.id,
189
- /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
190
- name: cashPaymentMethod == null ? void 0 : cashPaymentMethod.name,
191
- /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
192
- type: cashPaymentMethod == null ? void 0 : cashPaymentMethod.type,
185
+ // /** 支付类型,跟支付列表上对应的支付方式保持一致 */
186
+ // code: cashPaymentMethod?.code,
187
+ // /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
188
+ // custom_payment_id: cashPaymentMethod?.id,
189
+ // /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
190
+ // name: cashPaymentMethod?.name,
191
+ // /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
192
+ // type: cashPaymentMethod?.type,
193
+ code: "CUSTOM_10361",
194
+ "type": "custom",
195
+ "name": "Cash - Cafe",
196
+ "custom_payment_id": 10361,
193
197
  /** 代金券、充值卡、积分卡等wallet pass id */
194
198
  voucher_id: 0,
195
199
  rounding_amount: result.roundingAmount
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { PaymentModalProps } from './PaymentModal';
3
+ interface PaymentContextType {
4
+ openPaymentModal: (props: PaymentModalProps) => void;
5
+ closePaymentModal: () => void;
6
+ }
7
+ export declare const PaymentProvider: React.FC<{
8
+ children: React.ReactNode;
9
+ }>;
10
+ export declare const usePaymentModal: () => PaymentContextType;
11
+ export declare const openPaymentModal: (props: PaymentModalProps) => void;
12
+ export declare const closePaymentModal: () => void;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ export { default } from "./index";
2
+ export { default as Checkout } from "./index";
3
+ export { default as AmountSummary } from "./components/AmountSummary/index";
4
+ export { default as WalletPassModule } from "./components/WalletPassModule/index";
5
+ export { default as PaymentOptionsModule } from "./components/PaymentOptionsModule/index";
6
+ export { default as CashPaymentModule } from "./components/CashPaymentModule/index";
7
+ export { default as AdditionalModule } from "./components/AdditionalModule/index";
8
+ export type { CheckoutProps, PaymentData, PaymentItem, PaymentResult, ModuleConfig, StatusConfig, CheckoutCallbacks, AmountSummaryProps, WalletPassModuleProps, CashPaymentModuleProps, PaymentOptionsModuleProps, AdditionalModuleProps, } from "./types";
9
+ export { checkoutStyles, calculateModalHeight } from "./styles";
@@ -0,0 +1,5 @@
1
+ export { default as PaymentModal } from './PaymentModal';
2
+ export { PaymentProvider, usePaymentModal } from './PaymentProvider';
3
+ export type { PaymentModalProps, PaymentModalData } from './PaymentModal';
4
+ export { default as PaymentResultToast, PaymentResultToastProvider, usePaymentResultToast, showPaymentResultToastSuccess, showPaymentResultToastFailed, showPaymentResultToastWalletPassFailed, showPaymentResultToast, closePaymentResultToast, setTillButton } from './components/PaymentResultToast';
5
+ export type { ShowPaymentResultToastConfig, PaymentResultToastContextType, PaymentResultToastProps, PaymentResultToastConfig, ActionButtonProps, ActionButtonGroupList, StatusClassName } from './components/PaymentResultToast';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
4
3
  export declare const _formatBookingDetail: (data: any, modalState: any) => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProductDisplayConfig, ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
3
2
  import './index.less';
4
3
  interface TicketBookingProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.8.18",
3
+ "version": "6.8.20",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -76,8 +76,8 @@
76
76
  "react-infinite-scroll-component": "^6.1.0",
77
77
  "react-resizable": "^3.0.5",
78
78
  "styled-components": "^6.0.0-rc.3",
79
- "@pisell/icon": "0.0.11",
80
79
  "@pisell/materials": "6.8.6",
80
+ "@pisell/icon": "0.0.11",
81
81
  "@pisell/utils": "3.0.2",
82
82
  "@pisell/date-picker": "3.0.7"
83
83
  },