@pisell/private-materials 3.4.41 → 3.4.43

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 (97) 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.css +1 -1
  6. package/build/lowcode/render/default/view.js +3 -3
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +3 -3
  9. package/es/components/appointmentBooking/components/Services/index.js +22 -8
  10. package/es/components/authentication/admin/AuthMethods/AuthMethods.less +11 -9
  11. package/es/components/authentication/admin/AuthMethods/index.js +29 -6
  12. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  13. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  14. package/es/components/booking/forms/table/index.d.ts +0 -1
  15. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  16. package/es/components/booking/info/service/like/index.d.ts +0 -1
  17. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  18. package/es/components/eftpos/form/index.d.ts +0 -1
  19. package/es/components/eftpos/group/index.d.ts +0 -1
  20. package/es/components/eftpos/hooks.d.ts +0 -1
  21. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  22. package/es/components/eftpos/icon/device.d.ts +0 -1
  23. package/es/components/eftpos/receipt/index.d.ts +0 -1
  24. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  25. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  26. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  27. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  28. package/es/components/eftposPay/hooks.d.ts +1 -1
  29. package/es/components/eftposPay/store/index.d.ts +1 -1
  30. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  31. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  32. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  33. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  34. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  35. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  36. package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
  37. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
  38. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  39. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  40. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  41. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  42. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  43. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  44. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  45. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  46. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  47. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  48. package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
  49. package/es/plus/productSelect/ProductCard/index.js +14 -5
  50. package/es/plus/productSelect/index.d.ts +3 -2
  51. package/es/plus/productSelect/index.js +33 -8
  52. package/es/plus/productSelect/index.less +4 -0
  53. package/lib/components/appointmentBooking/components/Services/index.js +8 -3
  54. package/lib/components/authentication/admin/AuthMethods/AuthMethods.less +11 -9
  55. package/lib/components/authentication/admin/AuthMethods/index.js +23 -7
  56. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  57. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  58. package/lib/components/booking/forms/table/index.d.ts +0 -1
  59. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  60. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  61. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  62. package/lib/components/eftpos/form/index.d.ts +0 -1
  63. package/lib/components/eftpos/group/index.d.ts +0 -1
  64. package/lib/components/eftpos/hooks.d.ts +0 -1
  65. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  66. package/lib/components/eftpos/icon/device.d.ts +0 -1
  67. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  68. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  69. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  70. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  71. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  72. package/lib/components/eftposPay/hooks.d.ts +1 -1
  73. package/lib/components/eftposPay/store/index.d.ts +1 -1
  74. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  75. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  76. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  77. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  78. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  79. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  80. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
  81. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
  82. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  83. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  84. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  85. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  86. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  87. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  88. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  89. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  90. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  91. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  92. package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
  93. package/lib/plus/productSelect/ProductCard/index.js +18 -4
  94. package/lib/plus/productSelect/index.d.ts +3 -2
  95. package/lib/plus/productSelect/index.js +20 -6
  96. package/lib/plus/productSelect/index.less +4 -0
  97. package/package.json +2 -2
@@ -70,7 +70,11 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
70
70
  setProductLoading(false);
71
71
  });
72
72
  }, [isDateSelectedFirst]);
73
- const handleSelectProduct = async (item) => {
73
+ const isShowProductDetailStepper = (0, import_react.useMemo)(() => {
74
+ const { productModuleParams } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
75
+ return productModuleParams == null ? void 0 : productModuleParams.isShowProductDetailStepper;
76
+ }, [appointmentBooking == null ? void 0 : appointmentBooking.otherParams]);
77
+ const handleSelectProduct = async (item, clickType) => {
74
78
  let type = "";
75
79
  if (!isRetailTemplate) {
76
80
  type = await checkProductType(item == null ? void 0 : item.id);
@@ -82,7 +86,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
82
86
  type: "pisell1.productDetail",
83
87
  data: {
84
88
  detail: { ...item, open_deposit: 1 },
85
- setting: { can_input: true }
89
+ setting: { can_input: true, item_max_length: isShowProductDetailStepper, is_detail_open: clickType === "cover" }
86
90
  },
87
91
  callback: async (data) => {
88
92
  var _a, _b;
@@ -205,7 +209,8 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
205
209
  cardSelectedBg: "var(--theme-color)"
206
210
  },
207
211
  productListSetting,
208
- selectedItems: carts
212
+ selectedItems: carts,
213
+ hideCategoryWhenOne: true
209
214
  }
210
215
  ));
211
216
  });
@@ -6,13 +6,17 @@
6
6
  .auth-methods-item {
7
7
  display: flex;
8
8
  align-items: center;
9
- padding: 20px 24px;
10
9
  border: 1px solid #f0f0f0;
11
10
  border-radius: 8px;
12
11
  background: #fff;
13
12
  margin-bottom: 12px;
14
- transition: all 0.3s;
15
- cursor: move;
13
+ }
14
+
15
+ .auth-methods-item-body {
16
+ display: flex;
17
+ flex: 1;
18
+ padding: 20px 24px 20px 0;
19
+ align-items: center;
16
20
  }
17
21
 
18
22
  .auth-methods-item:hover {
@@ -23,14 +27,12 @@
23
27
  display: flex;
24
28
  align-items: center;
25
29
  justify-content: center;
26
- margin-right: 16px;
27
30
  color: #d9d9d9;
28
- font-size: 16px;
31
+ font-size: 20px;
32
+ padding-left: 24px;
33
+ padding-right: 16px;
29
34
  cursor: grab;
30
- }
31
-
32
- .auth-methods-item-drag:active {
33
- cursor: grabbing;
35
+ align-self: stretch;
34
36
  }
35
37
 
36
38
  .auth-methods-item-icon {
@@ -37,6 +37,7 @@ __export(AuthMethods_exports, {
37
37
  module.exports = __toCommonJS(AuthMethods_exports);
38
38
  var import_react = __toESM(require("react"));
39
39
  var import_antd = require("antd");
40
+ var import_materials = require("@pisell/materials");
40
41
  var import_icons = require("@ant-design/icons");
41
42
  var import_core = require("@dnd-kit/core");
42
43
  var import_sortable = require("@dnd-kit/sortable");
@@ -87,8 +88,7 @@ var SortableItem = ({
87
88
  })
88
89
  },
89
90
  /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-drag", ...attributes, ...listeners }, /* @__PURE__ */ import_react.default.createElement(import_icons.HolderOutlined, null)),
90
- /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-icon" }, method.icon),
91
- /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-header" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "auth-methods-item-title" }, method.title), /* @__PURE__ */ import_react.default.createElement(
91
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-body" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-icon" }, method.icon), /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-header" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "auth-methods-item-title" }, method.title), /* @__PURE__ */ import_react.default.createElement(
92
92
  "span",
93
93
  {
94
94
  className: (0, import_classnames.default)(
@@ -97,8 +97,15 @@ var SortableItem = ({
97
97
  )
98
98
  },
99
99
  getCategoryText(method.category)
100
- )), /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-description" }, method.description), method.configLink && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 8, fontSize: 12, color: "#8c8c8c", display: "flex", alignItems: "center", gap: 4 } }, /* @__PURE__ */ import_react.default.createElement(import_icons.InfoCircleOutlined, { style: { marginRight: 4 } }), import_utils.locales.getText(method.configLink), /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-config-link", onClick: onConfigClick }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("auth.oauth.config.link")))))),
101
- /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-actions" }, enableSetting && method.hasSettings && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "default", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SettingOutlined, null), onClick: onSettings }, import_utils.locales.getText("auth.button.settings")), /* @__PURE__ */ import_react.default.createElement(import_antd.Switch, { checked: method.enabled, onChange: onToggle, disabled: method.disableToggle }))
100
+ )), /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-description" }, method.description), method.configLink && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 8, fontSize: 12, color: "#8c8c8c", display: "flex", alignItems: "center", gap: 4 } }, /* @__PURE__ */ import_react.default.createElement(import_icons.InfoCircleOutlined, { style: { marginRight: 4 } }), import_utils.locales.getText(method.configLink), /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-config-link", onClick: onConfigClick }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("auth.oauth.config.link")))))), /* @__PURE__ */ import_react.default.createElement("div", { className: "auth-methods-item-actions" }, enableSetting && method.hasSettings && /* @__PURE__ */ import_react.default.createElement(
101
+ import_materials.Button,
102
+ {
103
+ type: "default",
104
+ icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SettingOutlined, null),
105
+ onClick: () => onSettings()
106
+ },
107
+ import_utils.locales.getText("auth.button.settings")
108
+ ), /* @__PURE__ */ import_react.default.createElement(import_antd.Switch, { checked: method.enabled, onChange: onToggle, disabled: method.disableToggle })))
102
109
  );
103
110
  };
104
111
  var AuthMethods = ({
@@ -118,7 +125,12 @@ var AuthMethods = ({
118
125
  (0, import_react.useEffect)(() => {
119
126
  if (initialMethods && initialMethods.length > 0) {
120
127
  console.log("AuthMethods 组件同步父组件数据:", initialMethods);
121
- setMethods(initialMethods);
128
+ const sortedMethods = [...initialMethods].sort((a, b) => {
129
+ const sortA = a.sort ?? 0;
130
+ const sortB = b.sort ?? 0;
131
+ return sortA - sortB;
132
+ });
133
+ setMethods(sortedMethods);
122
134
  }
123
135
  }, [initialMethods]);
124
136
  const sensors = (0, import_core.useSensors)(
@@ -138,8 +150,12 @@ var AuthMethods = ({
138
150
  const oldIndex = items.findIndex((item) => item.id === active.id);
139
151
  const newIndex = items.findIndex((item) => item.id === over.id);
140
152
  const newItems = (0, import_sortable.arrayMove)(items, oldIndex, newIndex);
141
- onOrderChange == null ? void 0 : onOrderChange(newItems);
142
- return newItems;
153
+ const updatedItems = newItems.map((item, index) => ({
154
+ ...item,
155
+ sort: index
156
+ }));
157
+ onOrderChange == null ? void 0 : onOrderChange(updatedItems);
158
+ return updatedItems;
143
159
  });
144
160
  }
145
161
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -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 "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 递归循环表单数据
4
3
  * @Author: hongbing.wang
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RadioGroupProps } from 'antd';
3
2
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
4
3
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 自定义组件设置
4
3
  * @description: 自定义组件设置
@@ -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;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
300
+ eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 获取 Tyro 资源
4
3
  * @description:
@@ -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 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;
@@ -94,7 +94,7 @@ var ApplePay = (props, ref) => {
94
94
  linkElement.href = currentURL;
95
95
  const shop_domain = linkElement.hostname;
96
96
  const _href = `${config.pay}${(0, import_utils2.formatFranchiseeRoute)(
97
- `/apple-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}&front_order_uuid=${state.front_order_uuid}`,
97
+ `/apple-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}&front_order_uuid=${state.front_order_uuid}&is_replace_router=1`,
98
98
  state.history
99
99
  )}`;
100
100
  paymentLogger.addLog({
@@ -107,7 +107,7 @@ var GooglePay = (props, ref) => {
107
107
  linkElement.href = currentURL;
108
108
  const shop_domain = linkElement.hostname;
109
109
  const _href = `${config.pay}${(0, import_utils2.formatFranchiseeRoute)(
110
- `/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}&front_order_uuid=${state.front_order_uuid}`,
110
+ `/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}&front_order_uuid=${state.front_order_uuid}&is_replace_router=1`,
111
111
  state.history
112
112
  )}`;
113
113
  paymentLogger.addLog({
@@ -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
  import './index.module.less';
3
2
  declare const StripePayment: () => JSX.Element;
4
3
  export default StripePayment;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const Actor: ({ name }: {
3
2
  name: string;
4
3
  }) => JSX.Element;
@@ -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 { CalendarDataItem } from "../type";
3
2
  declare type CalendarItemProps = {
4
3
  month: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductDetail: ({ form, currentProduct, }: {
4
3
  form: any;
@@ -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 RelationProduct: ({ value, onChange, }: {
4
3
  value?: any;
@@ -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;
@@ -29,10 +29,12 @@ export interface ProductCardProps {
29
29
  onSelectProduct?: (item: any) => void;
30
30
  currentProductId?: number;
31
31
  onSelect?: (item: any) => void;
32
+ onSelectCover?: (item: any) => void;
33
+ onSelectInfo?: (item: any) => void;
32
34
  isSelected?: boolean;
33
35
  decorateConfig?: ProductCardConfig;
34
36
  }
35
- export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
37
+ export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, onSelectCover, onSelectInfo, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
36
38
  export declare const DefaultItemContent: React.MemoExoticComponent<(props: {
37
39
  item: any;
38
40
  index: number;
@@ -66,6 +66,8 @@ var ProductCard = (0, import_react.memo)(
66
66
  index,
67
67
  context,
68
68
  onSelect,
69
+ onSelectCover,
70
+ onSelectInfo,
69
71
  isSelected,
70
72
  className,
71
73
  decorateConfig = {}
@@ -129,9 +131,6 @@ var ProductCard = (0, import_react.memo)(
129
131
  className: (0, import_classnames.default)(`${import__.PREFIX}__product-card`, className, {
130
132
  selected: isSelected
131
133
  }),
132
- onClick: () => {
133
- onSelect == null ? void 0 : onSelect(item);
134
- },
135
134
  "data-index": index,
136
135
  "data-item-index": index
137
136
  },
@@ -142,6 +141,9 @@ var ProductCard = (0, import_react.memo)(
142
141
  style: {
143
142
  width: imgWidth || "auto",
144
143
  height: imgHeight || "auto"
144
+ },
145
+ onClick: () => {
146
+ onSelectCover == null ? void 0 : onSelectCover(item);
145
147
  }
146
148
  },
147
149
  item.cover ? /* @__PURE__ */ import_react.default.createElement(
@@ -154,7 +156,19 @@ var ProductCard = (0, import_react.memo)(
154
156
  }
155
157
  ) : /* @__PURE__ */ import_react.default.createElement("div", { className: "text-cover", style: { borderRadius: radius } }, getTextCover(item.title))
156
158
  ) : null,
157
- /* @__PURE__ */ import_react.default.createElement("div", { className: "card-right" }, !!isTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null, !!isSubtitle && item.subtitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "subtitle" }, item.subtitle) : null, !!isStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null, renderPrice(item))
159
+ /* @__PURE__ */ import_react.default.createElement(
160
+ "div",
161
+ {
162
+ className: "card-right",
163
+ onClick: () => {
164
+ onSelectInfo == null ? void 0 : onSelectInfo(item);
165
+ }
166
+ },
167
+ !!isTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null,
168
+ !!isSubtitle && item.subtitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "subtitle" }, item.subtitle) : null,
169
+ !!isStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null,
170
+ renderPrice(item)
171
+ )
158
172
  );
159
173
  if (context) {
160
174
  return /* @__PURE__ */ import_react.default.createElement(
@@ -8,7 +8,7 @@ interface ProductSelectProps {
8
8
  grid: boolean;
9
9
  config: string;
10
10
  };
11
- onChange: (value: any) => void;
11
+ onChange: (value: any, type?: string) => void;
12
12
  value?: number;
13
13
  loading?: boolean;
14
14
  style?: React.CSSProperties;
@@ -25,7 +25,8 @@ interface ProductSelectProps {
25
25
  productListSetting?: Partial<any>;
26
26
  /** 兼容scrollDom */
27
27
  customScrollParent?: HTMLElement | string;
28
+ hideCategoryWhenOne?: boolean;
28
29
  }
29
30
  export declare const PREFIX = "pisell-product-select";
30
- declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, ...rest }: ProductSelectProps) => JSX.Element;
31
+ declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, hideCategoryWhenOne, ...rest }: ProductSelectProps) => JSX.Element;
31
32
  export default index;
@@ -79,6 +79,7 @@ var index = ({
79
79
  customScrollParent,
80
80
  loading = false,
81
81
  layout,
82
+ hideCategoryWhenOne = false,
82
83
  ...rest
83
84
  }) => {
84
85
  const searchRef = (0, import_react.useRef)(null);
@@ -119,6 +120,12 @@ var index = ({
119
120
  };
120
121
  });
121
122
  }, [_groupedList]);
123
+ const isHideCategory = (0, import_react.useMemo)(() => {
124
+ if (hideCategoryWhenOne) {
125
+ return (_categories == null ? void 0 : _categories.length) === 1 || !(_categories == null ? void 0 : _categories.length);
126
+ }
127
+ return false;
128
+ }, [_categories, hideCategoryWhenOne]);
122
129
  (0, import_react.useEffect)(() => {
123
130
  if (!(_categories == null ? void 0 : _categories.length)) {
124
131
  setActiveKey("");
@@ -158,9 +165,9 @@ var index = ({
158
165
  return !!(productListSetting == null ? void 0 : productListSetting.list_max_length) && Array.isArray(selectedItems) && (selectedItems == null ? void 0 : selectedItems.length) > 0;
159
166
  }, [productListSetting, selectedItems]);
160
167
  const _onChange = (0, import_react.useCallback)(
161
- (value2) => {
168
+ (value2, type) => {
162
169
  if (disabled) return;
163
- onChange == null ? void 0 : onChange(value2);
170
+ onChange == null ? void 0 : onChange(value2, type);
164
171
  },
165
172
  [disabled, onChange]
166
173
  );
@@ -237,7 +244,7 @@ var index = ({
237
244
  }
238
245
  }
239
246
  )) : null,
240
- /* @__PURE__ */ import_react.default.createElement(
247
+ !isHideCategory ? /* @__PURE__ */ import_react.default.createElement(
241
248
  import_CategoryTabs.default,
242
249
  {
243
250
  activeKey,
@@ -246,7 +253,7 @@ var index = ({
246
253
  loading,
247
254
  skeleton: /* @__PURE__ */ import_react.default.createElement(import_CategoryTabs.CategorySkeleton, null)
248
255
  }
249
- ),
256
+ ) : null,
250
257
  !loading && !(_groupedList == null ? void 0 : _groupedList.length) ? /* @__PURE__ */ import_react.default.createElement(
251
258
  import_materials2.PisellEmpty,
252
259
  {
@@ -261,7 +268,9 @@ var index = ({
261
268
  /* @__PURE__ */ import_react.default.createElement(
262
269
  import_ProductList.default,
263
270
  {
264
- className: `${PREFIX}__product-list`,
271
+ className: (0, import_classnames.default)(`${PREFIX}__product-list`, {
272
+ [`${PREFIX}__product-list_hide_category`]: isHideCategory
273
+ }),
265
274
  loading,
266
275
  data: loading ? MOCK_DATA : _groupedList,
267
276
  context: {
@@ -281,7 +290,12 @@ var index = ({
281
290
  index: index2,
282
291
  item,
283
292
  context: context2,
284
- onSelect: _onChange,
293
+ onSelectCover: (e) => {
294
+ _onChange(e, "cover");
295
+ },
296
+ onSelectInfo: (e) => {
297
+ _onChange(e, "info");
298
+ },
285
299
  isSelected: item.id === value,
286
300
  decorateConfig: productListSetting
287
301
  }
@@ -45,6 +45,10 @@
45
45
  padding: 0px 12px 12px;
46
46
  }
47
47
 
48
+ &__product-list_hide_category {
49
+ padding-top: 16px;
50
+ }
51
+
48
52
  &__tabs-wrapper {
49
53
  position: sticky;
50
54
  top: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.4.41",
3
+ "version": "3.4.43",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,8 +59,8 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
- "@pisell/materials": "3.3.63",
63
62
  "@pisell/utils": "3.0.1",
63
+ "@pisell/materials": "3.3.63",
64
64
  "@pisell/icon": "0.0.11",
65
65
  "@pisell/date-picker": "3.0.3"
66
66
  },