@pisell/private-materials 6.11.62 → 6.11.64

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.
@@ -1,5 +1,6 @@
1
1
  .payment-modal-modal {
2
2
  width: 880px!important;
3
+ max-width: unset!important;
3
4
  }
4
5
 
5
6
  .payment-modal-wrapper {
@@ -47,6 +48,7 @@
47
48
  display: flex;
48
49
  flex-direction: column;
49
50
  width: 100%!important;
51
+ max-width: unset!important;
50
52
 
51
53
  .pisell-lowcode-modal-body {
52
54
  // JavaScript设置: maxHeight: '100%' (基于父元素)
@@ -33,7 +33,7 @@ import useLogger from "../../hooks/useLogger";
33
33
  import { filterVariantGroupByVariants } from "../../components/shoppingCart/utils";
34
34
  import { cloneDeep } from 'lodash';
35
35
  var SkuDetailModal = function SkuDetailModal(_ref, ref) {
36
- var _context$appHelper, _store$getState, _context$engine, _bookingState$booking3, _bookingState$booking6, _bookingState$booking9, _productData$_extend2, _bookingState$booking13, _bookingState$booking14;
36
+ var _context$appHelper, _context$engine, _bookingState$booking3, _bookingState$booking6, _bookingState$booking9, _productData$_extend2, _bookingState$booking13, _bookingState$booking14;
37
37
  var onConfirm = _ref.onConfirm,
38
38
  onRemove = _ref.onRemove,
39
39
  onClose = _ref.onClose;
@@ -137,7 +137,7 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
137
137
  */
138
138
  var _ref3 = useContext(BookingContext) || {},
139
139
  bookingState = _ref3.state;
140
- var symbol = (store === null || store === void 0 || (_store$getState = store.getState) === null || _store$getState === void 0 || (_store$getState = _store$getState.call(store)) === null || _store$getState === void 0 || (_store$getState = _store$getState.global) === null || _store$getState === void 0 ? void 0 : _store$getState.symbol) || '$';
140
+ var symbol = getData('shop_symbol');
141
141
  locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
142
142
  var getDetailData = /*#__PURE__*/function () {
143
143
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data, open_deposit) {
@@ -5,12 +5,14 @@
5
5
  */
6
6
  height: 884px;
7
7
  width: 80%!important;
8
+ max-width: unset!important;
8
9
 
9
10
  // PisellModal(PC)内容容器:固定高度,内部 body 使用 flex 占满剩余空间
10
11
  .pisell-lowcode-modal-content {
11
12
  width: 100% !important;
12
13
  height: 884px;
13
14
  max-height: 884px!important;
15
+ max-width: unset!important;
14
16
  }
15
17
 
16
18
  /**
@@ -1,5 +1,6 @@
1
1
  .payment-modal-modal {
2
2
  width: 880px!important;
3
+ max-width: unset!important;
3
4
  }
4
5
 
5
6
  .payment-modal-wrapper {
@@ -47,6 +48,7 @@
47
48
  display: flex;
48
49
  flex-direction: column;
49
50
  width: 100%!important;
51
+ max-width: unset!important;
50
52
 
51
53
  .pisell-lowcode-modal-body {
52
54
  // JavaScript设置: maxHeight: '100%' (基于父元素)
@@ -52,7 +52,7 @@ var import_useLogger = __toESM(require("../../hooks/useLogger"));
52
52
  var import_utils3 = require("../../components/shoppingCart/utils");
53
53
  var import_lodash = require("lodash");
54
54
  var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
55
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
55
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
56
56
  const [open, setOpen] = (0, import_react.useState)(false);
57
57
  const [productData, setProductData] = (0, import_react.useState)(null);
58
58
  const [note, setNote] = (0, import_react.useState)("");
@@ -91,8 +91,8 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
91
91
  const context = (0, import_useEngineContext.default)();
92
92
  const { store, getData, isWebPos } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
93
93
  const { state: bookingState } = (0, import_react.useContext)(import_model.Context) || {};
94
- const symbol = ((_d = (_c = (_b = store == null ? void 0 : store.getState) == null ? void 0 : _b.call(store)) == null ? void 0 : _c.global) == null ? void 0 : _d.symbol) || "$";
95
- import_utils.locales.init(import_locales.default, ((_f = (_e = context == null ? void 0 : context.engine) == null ? void 0 : _e.props) == null ? void 0 : _f.locale) || "en");
94
+ const symbol = getData("shop_symbol");
95
+ import_utils.locales.init(import_locales.default, ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en");
96
96
  const getDetailData = async (data, open_deposit) => {
97
97
  var _a2;
98
98
  const isCallProductDetail = ((_a2 = data == null ? void 0 : data.skuDetailConfig) == null ? void 0 : _a2.isCallProductDetail) ?? false;
@@ -115,19 +115,19 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
115
115
  return Number(
116
116
  ((_c2 = (_b2 = (_a2 = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.stock_setting) == null ? void 0 : _c2.stock_validation) ?? 0
117
117
  );
118
- }, [(_h = (_g = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _g.config) == null ? void 0 : _h.stock_setting]);
118
+ }, [(_e = (_d = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _d.config) == null ? void 0 : _e.stock_setting]);
119
119
  const allowAddToCartWhenOutStock = (0, import_react.useMemo)(() => {
120
120
  var _a2, _b2, _c2;
121
121
  return Number(
122
122
  ((_c2 = (_b2 = (_a2 = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.stock_setting) == null ? void 0 : _c2.allow_add_to_cart_when_out_stock) ?? 0
123
123
  );
124
- }, [(_j = (_i = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _i.config) == null ? void 0 : _j.stock_setting]);
124
+ }, [(_g = (_f = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _f.config) == null ? void 0 : _g.stock_setting]);
125
125
  const enableDontShowAgainToday = (0, import_react.useMemo)(() => {
126
126
  var _a2, _b2, _c2;
127
127
  return Number(
128
128
  ((_c2 = (_b2 = (_a2 = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.stock_setting) == null ? void 0 : _c2.do_not_show_again_today) ?? 0
129
129
  );
130
- }, [(_l = (_k = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _k.config) == null ? void 0 : _l.stock_setting]);
130
+ }, [(_i = (_h = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _h.config) == null ? void 0 : _i.stock_setting]);
131
131
  const hasSkuOptions = (0, import_react.useMemo)(() => {
132
132
  const data = productData;
133
133
  const hasVariantGroup = Array.isArray(data == null ? void 0 : data.variant_group) && data.variant_group.length > 0;
@@ -314,7 +314,7 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
314
314
  const price = ((_a2 = productData == null ? void 0 : productData._extend) == null ? void 0 : _a2.price) || 0;
315
315
  const priceSign = Number(price) < 0 ? "-" : "";
316
316
  return `${priceSign}${symbol}${Math.abs(Number(price))}`;
317
- }, [(_m = productData == null ? void 0 : productData._extend) == null ? void 0 : _m.price, symbol]);
317
+ }, [(_j = productData == null ? void 0 : productData._extend) == null ? void 0 : _j.price, symbol]);
318
318
  const unitPrice = (0, import_react.useMemo)(() => {
319
319
  const activeSkuValue = (skuValue == null ? void 0 : skuValue.product_id) ? skuValue : skuDefaultValue;
320
320
  return getSelectedUnitPrice({ productData, skuValue: activeSkuValue });
@@ -817,7 +817,7 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
817
817
  onCancel: handleStockAlertCancel
818
818
  },
819
819
  /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "40px 0 0 0" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#344054", fontSize: 14, lineHeight: "22px" } }, import_utils.locales.getText("pisell2.text.sku.detail.modal.stock.alert.desc")), Number(
820
- ((_p = (_o = (_n = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _n.config) == null ? void 0 : _o.stock_setting) == null ? void 0 : _p.do_not_show_again_today) ?? 0
820
+ ((_m = (_l = (_k = bookingState == null ? void 0 : bookingState.bookingConfig) == null ? void 0 : _k.config) == null ? void 0 : _l.stock_setting) == null ? void 0 : _m.do_not_show_again_today) ?? 0
821
821
  ) === 1 && /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16 } }, /* @__PURE__ */ import_react.default.createElement(
822
822
  import_materials.Checkbox,
823
823
  {
@@ -5,12 +5,14 @@
5
5
  */
6
6
  height: 884px;
7
7
  width: 80%!important;
8
+ max-width: unset!important;
8
9
 
9
10
  // PisellModal(PC)内容容器:固定高度,内部 body 使用 flex 占满剩余空间
10
11
  .pisell-lowcode-modal-content {
11
12
  width: 100% !important;
12
13
  height: 884px;
13
14
  max-height: 884px!important;
15
+ max-width: unset!important;
14
16
  }
15
17
 
16
18
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.62",
3
+ "version": "6.11.64",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -68,9 +68,9 @@
68
68
  "react-resizable": "^3.0.5",
69
69
  "styled-components": "^6.0.0-rc.3",
70
70
  "@pisell/utils": "3.0.2",
71
- "@pisell/materials": "6.11.17",
72
71
  "@pisell/icon": "0.0.11",
73
- "@pisell/date-picker": "3.0.8"
72
+ "@pisell/date-picker": "3.0.8",
73
+ "@pisell/materials": "6.11.17"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": "^18.0.0",
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface PaymentModalData {
4
- order_info: any;
5
- subtotal_info: {
6
- subTotalList: any[];
7
- orderTotalList: any[];
8
- total: number;
9
- showDetail: boolean;
10
- };
11
- total: any;
12
- }
13
- interface PaymentModalProps {
14
- open?: boolean;
15
- data?: PaymentModalData;
16
- callback?: (result: any) => void;
17
- onClose?: (reset?: boolean) => void;
18
- paymentResultDisplayMode?: string;
19
- shopDiscount?: number;
20
- client?: any;
21
- currentTotalPrice?: number;
22
- config?: any;
23
- onChangeShopDiscount?: (discount: string) => void;
24
- onChangeOrderNote?: (note: string) => void;
25
- onDeleteOrderNote?: () => void;
26
- }
27
- interface PaymentModalMainProps extends PaymentModalProps {
28
- onClose?: (reset?: boolean) => void;
29
- onSetLocalOrderId?: (order_id: number) => void;
30
- setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
31
- editOrderId?: number;
32
- config?: {
33
- showHeaderCenter?: boolean;
34
- showHeaderRightButton?: boolean;
35
- disabledSwitchClient?: boolean;
36
- };
37
- }
38
- declare const PaymentModal: React.FC<PaymentModalMainProps>;
39
- export type { PaymentModalData, PaymentModalProps };
40
- export default PaymentModal;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { SkuDetailModalProps, SkuDetailModalRef } from './types';
3
- import './index.less';
4
- declare const _default: React.ForwardRefExoticComponent<SkuDetailModalProps & React.RefAttributes<SkuDetailModalRef>>;
5
- export default _default;
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface PaymentModalData {
4
- order_info: any;
5
- subtotal_info: {
6
- subTotalList: any[];
7
- orderTotalList: any[];
8
- total: number;
9
- showDetail: boolean;
10
- };
11
- total: any;
12
- }
13
- interface PaymentModalProps {
14
- open?: boolean;
15
- data?: PaymentModalData;
16
- callback?: (result: any) => void;
17
- onClose?: (reset?: boolean) => void;
18
- paymentResultDisplayMode?: string;
19
- shopDiscount?: number;
20
- client?: any;
21
- currentTotalPrice?: number;
22
- config?: any;
23
- onChangeShopDiscount?: (discount: string) => void;
24
- onChangeOrderNote?: (note: string) => void;
25
- onDeleteOrderNote?: () => void;
26
- }
27
- interface PaymentModalMainProps extends PaymentModalProps {
28
- onClose?: (reset?: boolean) => void;
29
- onSetLocalOrderId?: (order_id: number) => void;
30
- setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
31
- editOrderId?: number;
32
- config?: {
33
- showHeaderCenter?: boolean;
34
- showHeaderRightButton?: boolean;
35
- disabledSwitchClient?: boolean;
36
- };
37
- }
38
- declare const PaymentModal: React.FC<PaymentModalMainProps>;
39
- export type { PaymentModalData, PaymentModalProps };
40
- export default PaymentModal;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { SkuDetailModalProps, SkuDetailModalRef } from './types';
3
- import './index.less';
4
- declare const _default: React.ForwardRefExoticComponent<SkuDetailModalProps & React.RefAttributes<SkuDetailModalRef>>;
5
- export default _default;