@pisell/private-materials 6.3.7 → 6.3.10

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 (39) 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/appointmentBooking/components/Footer/index.d.ts +0 -1
  8. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  9. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  10. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  11. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  12. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  13. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  14. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  15. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  16. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  17. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +20 -7
  18. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  19. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  20. package/es/components/pay/toC/utils.d.ts +1 -1
  21. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  22. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  23. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  24. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  25. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  26. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  27. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  28. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  29. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  30. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  31. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  32. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  33. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +11 -7
  34. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  35. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  36. package/lib/components/pay/toC/utils.d.ts +1 -1
  37. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  38. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  39. package/package.json +4 -4
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => JSX.Element;
4
3
  export default ErrorTip;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const InformationOptionsModal: (props: any) => JSX.Element;
4
3
  export default InformationOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type CallToBookProps = {
3
2
  show: boolean;
4
3
  type: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const WeekItem: (props: any) => JSX.Element;
4
3
  export default WeekItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare type CalenDateWeekProps = {
4
3
  currentDate: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem } from '../../type';
3
2
  declare type CalendarItemProps = {
4
3
  month: string;
@@ -15,7 +15,7 @@ import ThreedsLoading from "../MWCreditCard/TDSPay/ThreedsLoading";
15
15
  import { Context } from "../../model";
16
16
  import { getPayGroupParamsFromStorage } from "../../payGroup";
17
17
  import useEngineContext from "../../../../../hooks/useEngineContext";
18
- import { formatFranchiseeRoute } from "../../utils";
18
+ import { clientPayment, formatFranchiseeRoute } from "../../utils";
19
19
  /**
20
20
  * @title: 谷歌支付
21
21
  * @description:
@@ -26,7 +26,7 @@ import { formatFranchiseeRoute } from "../../utils";
26
26
  * @Date: 2024-08-16 11:01
27
27
  */
28
28
  var GooglePay = function GooglePay(props, ref) {
29
- var _context$appHelper;
29
+ var _context$appHelper, _context$appHelper2;
30
30
  var _useContext = useContext(Context),
31
31
  state = _useContext.state;
32
32
  var _useState = useState(false),
@@ -36,6 +36,8 @@ var GooglePay = function GooglePay(props, ref) {
36
36
  var context = useEngineContext();
37
37
  var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
38
38
  config = _ref.config;
39
+ var _context$appHelper$ut = (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils,
40
+ interaction = _context$appHelper$ut.interaction;
39
41
 
40
42
  /**
41
43
  * @title: 初始化
@@ -47,23 +49,34 @@ var GooglePay = function GooglePay(props, ref) {
47
49
  */
48
50
  var init = /*#__PURE__*/function () {
49
51
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
50
- var _utils$getStore;
52
+ var _utils$getStore, _interaction$utils, _interaction$utils$is, _interaction$utils2, _interaction$utils2$i;
51
53
  var payGroup, utils, dvaStore, values, _dvaStore$core, _dvaStore$core2, _state$payGroup, locale, shopId, currentURL, linkElement, shop_domain, _href;
52
54
  return _regeneratorRuntime().wrap(function _callee$(_context) {
53
55
  while (1) switch (_context.prev = _context.next) {
54
56
  case 0:
55
57
  payGroup = _ref2.payGroup;
56
- setOpen(true);
57
58
  utils = context.appHelper.utils || {};
58
59
  dvaStore = utils === null || utils === void 0 || (_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 ? void 0 : _utils$getStore.getState(); // 获取交易组
59
60
  values = getPayGroupParamsFromStorage(payGroup.order_id);
61
+ if (!(interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils) && (interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$i = _interaction$utils2.isAndroid_ios) === null || _interaction$utils2$i === void 0 ? void 0 : _interaction$utils2$i.call(_interaction$utils2)) === 'android')) {
62
+ _context.next = 6;
63
+ break;
64
+ }
65
+ return _context.abrupt("return", clientPayment({
66
+ order_id: payGroup.order_id,
67
+ type: 'google_pay',
68
+ values: values,
69
+ interaction: interaction
70
+ }));
71
+ case 6:
72
+ setOpen(true);
60
73
  if (values) {
61
- _context.next = 8;
74
+ _context.next = 10;
62
75
  break;
63
76
  }
64
77
  setOpen(false);
65
78
  return _context.abrupt("return");
66
- case 8:
79
+ case 10:
67
80
  try {
68
81
  locale = ((_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en';
69
82
  shopId = (_dvaStore$core2 = dvaStore.core) === null || _dvaStore$core2 === void 0 || (_dvaStore$core2 = _dvaStore$core2.core) === null || _dvaStore$core2 === void 0 || (_dvaStore$core2 = _dvaStore$core2.shop) === null || _dvaStore$core2 === void 0 ? void 0 : _dvaStore$core2.id;
@@ -78,7 +91,7 @@ var GooglePay = function GooglePay(props, ref) {
78
91
  } catch (err) {
79
92
  setOpen(false);
80
93
  }
81
- case 9:
94
+ case 11:
82
95
  case "end":
83
96
  return _context.stop();
84
97
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
4
3
  export default SetupForm;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
3
2
  import './index.less';
4
3
  interface WalletUseListProps {
@@ -51,7 +51,7 @@ export declare const formatFranchiseeRoute: (url: string, history?: any) => stri
51
51
  export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
52
52
  export declare const clientPayment: (params: {
53
53
  order_id: number;
54
- type: "aliPay" | "wxPay";
54
+ type: "aliPay" | "wxPay" | 'google_pay';
55
55
  values: any;
56
56
  interaction?: any;
57
57
  }) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
3
2
  import './index.less';
4
3
  interface ModalProps extends AntModalProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './../../index.less';
3
2
  declare const Search: () => JSX.Element;
4
3
  export default Search;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => JSX.Element;
4
3
  export default ErrorTip;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const InformationOptionsModal: (props: any) => JSX.Element;
4
3
  export default InformationOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type CallToBookProps = {
3
2
  show: boolean;
4
3
  type: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const WeekItem: (props: any) => JSX.Element;
4
3
  export default WeekItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare type CalenDateWeekProps = {
4
3
  currentDate: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem } from '../../type';
3
2
  declare type CalendarItemProps = {
4
3
  month: string;
@@ -41,30 +41,34 @@ var import_payGroup = require("../../payGroup");
41
41
  var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
42
42
  var import_utils2 = require("../../utils");
43
43
  var GooglePay = (props, ref) => {
44
- var _a;
44
+ var _a, _b;
45
45
  const { state } = (0, import_react.useContext)(import_model.Context);
46
46
  const [open, setOpen] = (0, import_react.useState)(false);
47
47
  const context = (0, import_useEngineContext.default)();
48
48
  const { config } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
49
+ const { interaction } = (_b = context.appHelper) == null ? void 0 : _b.utils;
49
50
  const init = async ({ payGroup }) => {
50
- var _a2, _b, _c, _d, _e, _f, _g;
51
- setOpen(true);
51
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k;
52
52
  const utils = context.appHelper.utils || {};
53
- const dvaStore = (_b = (_a2 = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a2.call(utils)) == null ? void 0 : _b.getState();
53
+ const dvaStore = (_b2 = (_a2 = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a2.call(utils)) == null ? void 0 : _b2.getState();
54
54
  const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
55
+ if (((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) && ((_f = (_e = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e.isAndroid_ios) == null ? void 0 : _f.call(_e)) === "android") {
56
+ return (0, import_utils2.clientPayment)({ order_id: payGroup.order_id, type: "google_pay", values, interaction });
57
+ }
58
+ setOpen(true);
55
59
  if (!values) {
56
60
  setOpen(false);
57
61
  return;
58
62
  }
59
63
  try {
60
- const locale = ((_c = dvaStore.core) == null ? void 0 : _c.translateLocale) || "en";
61
- const shopId = (_f = (_e = (_d = dvaStore.core) == null ? void 0 : _d.core) == null ? void 0 : _e.shop) == null ? void 0 : _f.id;
64
+ const locale = ((_g = dvaStore.core) == null ? void 0 : _g.translateLocale) || "en";
65
+ const shopId = (_j = (_i = (_h = dvaStore.core) == null ? void 0 : _h.core) == null ? void 0 : _i.shop) == null ? void 0 : _j.id;
62
66
  const currentURL = window.location.href;
63
67
  const linkElement = document.createElement("a");
64
68
  linkElement.href = currentURL;
65
69
  const shop_domain = linkElement.hostname;
66
70
  const _href = `${config.pay}${(0, import_utils2.formatFranchiseeRoute)(
67
- `/google-pay?order_id=${(_g = state.payGroup) == null ? void 0 : _g.order_id}&shop_id=${shopId}&locale=${locale}&shop_domain=${shop_domain}&total_amount=${values.amount}&payment_group_id=${values.payment_group_id}`,
71
+ `/google-pay?order_id=${(_k = state.payGroup) == null ? void 0 : _k.order_id}&shop_id=${shopId}&locale=${locale}&shop_domain=${shop_domain}&total_amount=${values.amount}&payment_group_id=${values.payment_group_id}`,
68
72
  state.history
69
73
  )}`;
70
74
  window.location.href = _href;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
4
3
  export default SetupForm;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
3
2
  import './index.less';
4
3
  interface WalletUseListProps {
@@ -51,7 +51,7 @@ export declare const formatFranchiseeRoute: (url: string, history?: any) => stri
51
51
  export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
52
52
  export declare const clientPayment: (params: {
53
53
  order_id: number;
54
- type: "aliPay" | "wxPay";
54
+ type: "aliPay" | "wxPay" | 'google_pay';
55
55
  values: any;
56
56
  interaction?: any;
57
57
  }) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
3
2
  import './index.less';
4
3
  interface ModalProps extends AntModalProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './../../index.less';
3
2
  declare const Search: () => JSX.Element;
4
3
  export default Search;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.3.7",
3
+ "version": "6.3.10",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -60,9 +60,9 @@
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
62
  "@pisell/utils": "3.0.0",
63
- "@pisell/materials": "6.3.2",
64
- "@pisell/icon": "0.0.11",
65
- "@pisell/date-picker": "3.0.4"
63
+ "@pisell/materials": "6.3.3",
64
+ "@pisell/date-picker": "3.0.4",
65
+ "@pisell/icon": "0.0.11"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",