@pisell/private-materials 6.8.38 → 6.8.39

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.
@@ -9,6 +9,7 @@ import { useMemoizedFn } from 'ahooks';
9
9
  import SkuDetailModal from "../../../../../pro/skuDetailModal";
10
10
  import { Context } from "../../../info/model";
11
11
  import { setProductPrice } from "../editService/utils";
12
+ import { formatDataKey } from "../../../../ticketBooking/components/addServiceVariant/utils";
12
13
  var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
13
14
  var _ref = useContext(Context),
14
15
  state = _ref.state,
@@ -87,8 +88,6 @@ var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
87
88
  origin_total: data.total
88
89
  });
89
90
  var e = {
90
- key: payload.productId,
91
- rowKey: payload.productId,
92
91
  product_id: payload.productId,
93
92
  price: skuValue.price || 0,
94
93
  product_variant_id: skuValue.product_variant_id || 0,
@@ -96,6 +95,7 @@ var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
96
95
  option: skuValue.option || [],
97
96
  quantity: quantity
98
97
  };
98
+ e = formatDataKey(e);
99
99
  payload.callback(e, undefined, detail, false);
100
100
  return;
101
101
  }
@@ -1,5 +1,6 @@
1
1
  export declare const formatVariantGroupTitle: (title: any, variant_group?: never[]) => string | undefined;
2
2
  export declare const createCacheItem: (detail: any, values: any, state: any) => any;
3
+ export declare const formatDataKey: (data: any) => any;
3
4
  export declare const isVariant: (item: any) => boolean;
4
5
  export declare const isOption: (item: any) => boolean;
5
6
  export declare const isBundle: (item: any) => boolean;
@@ -58,7 +58,7 @@ export var createCacheItem = function createCacheItem(detail, values, state) {
58
58
  });
59
59
  return cacheItem;
60
60
  };
61
- var formatDataKey = function formatDataKey(data) {
61
+ export var formatDataKey = function formatDataKey(data) {
62
62
  var _data$option, _data$bundle;
63
63
  var _data = _objectSpread({}, data);
64
64
  var key = "".concat(_data.product_id);
@@ -37,6 +37,7 @@ var import_ahooks = require("ahooks");
37
37
  var import_skuDetailModal = __toESM(require("../../../../../pro/skuDetailModal"));
38
38
  var import_model = require("../../../info/model");
39
39
  var import_utils = require("../editService/utils");
40
+ var import_utils2 = require("../../../../ticketBooking/components/addServiceVariant/utils");
40
41
  var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
41
42
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
42
43
  const modalRef = (0, import_react.useRef)(null);
@@ -101,9 +102,7 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
101
102
  },
102
103
  origin_total: data.total
103
104
  };
104
- const e = {
105
- key: payload.productId,
106
- rowKey: payload.productId,
105
+ let e = {
107
106
  product_id: payload.productId,
108
107
  price: skuValue.price || 0,
109
108
  product_variant_id: skuValue.product_variant_id || 0,
@@ -111,6 +110,7 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
111
110
  option: skuValue.option || [],
112
111
  quantity
113
112
  };
113
+ e = (0, import_utils2.formatDataKey)(e);
114
114
  payload.callback(e, void 0, detail, false);
115
115
  return;
116
116
  }
@@ -1,5 +1,6 @@
1
1
  export declare const formatVariantGroupTitle: (title: any, variant_group?: never[]) => string | undefined;
2
2
  export declare const createCacheItem: (detail: any, values: any, state: any) => any;
3
+ export declare const formatDataKey: (data: any) => any;
3
4
  export declare const isVariant: (item: any) => boolean;
4
5
  export declare const isOption: (item: any) => boolean;
5
6
  export declare const isBundle: (item: any) => boolean;
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var utils_exports = {};
21
21
  __export(utils_exports, {
22
22
  createCacheItem: () => createCacheItem,
23
+ formatDataKey: () => formatDataKey,
23
24
  formatVariantGroupTitle: () => formatVariantGroupTitle,
24
25
  genValues: () => genValues,
25
26
  getHandleSetService: () => getHandleSetService,
@@ -165,6 +166,7 @@ var getHandleSetService = () => {
165
166
  // Annotate the CommonJS export names for ESM import in node:
166
167
  0 && (module.exports = {
167
168
  createCacheItem,
169
+ formatDataKey,
168
170
  formatVariantGroupTitle,
169
171
  genValues,
170
172
  getHandleSetService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.8.38",
3
+ "version": "6.8.39",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -76,10 +76,10 @@
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/materials": "6.8.7",
79
80
  "@pisell/icon": "0.0.11",
80
- "@pisell/date-picker": "3.0.7",
81
81
  "@pisell/utils": "3.0.2",
82
- "@pisell/materials": "6.8.7"
82
+ "@pisell/date-picker": "3.0.7"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": "^18.0.0",