@pisell/pisellos 2.1.40 → 2.1.41

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.
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
345
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
@@ -2732,7 +2732,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2732
2732
  key: "checkMaxDurationCapacity",
2733
2733
  value: function checkMaxDurationCapacity() {
2734
2734
  var _this15 = this;
2735
- var cartItems = cloneDeep(this.store.cart.getItems());
2735
+ var cartItems = this.store.cart.getItems().filter(function (item) {
2736
+ return !isNormalProduct(item._productOrigin);
2737
+ });
2736
2738
  if (cartItems.length === 0) return {
2737
2739
  success: true,
2738
2740
  minAvailableCount: 0
@@ -3155,7 +3157,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
3155
3157
  var product = _ref13.product,
3156
3158
  date = _ref13.date,
3157
3159
  account = _ref13.account;
3158
- var cartItems = cloneDeep(this.store.cart.getItems());
3160
+ var cartItems = this.store.cart.getItems().filter(function (item) {
3161
+ return !isNormalProduct(item._productOrigin);
3162
+ });
3159
3163
 
3160
3164
  // 将 ProductData 转换为 CartItem 但不真正添加到购物车
3161
3165
  var currentCartItem = this.convertProductToCartItem({
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
345
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
@@ -1921,7 +1921,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
1921
1921
  }
1922
1922
  checkMaxDurationCapacity() {
1923
1923
  var _a, _b;
1924
- const cartItems = (0, import_lodash_es.cloneDeep)(this.store.cart.getItems());
1924
+ const cartItems = this.store.cart.getItems().filter((item) => !(0, import_utils5.isNormalProduct)(item._productOrigin));
1925
1925
  if (cartItems.length === 0)
1926
1926
  return { success: true, minAvailableCount: 0 };
1927
1927
  const itemsWithTime = [];
@@ -2183,7 +2183,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
2183
2183
  account
2184
2184
  }) {
2185
2185
  var _a, _b;
2186
- const cartItems = (0, import_lodash_es.cloneDeep)(this.store.cart.getItems());
2186
+ const cartItems = this.store.cart.getItems().filter((item) => !(0, import_utils5.isNormalProduct)(item._productOrigin));
2187
2187
  const currentCartItem = this.convertProductToCartItem({ product, date, account });
2188
2188
  cartItems.push(currentCartItem);
2189
2189
  if (cartItems.length === 0)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.1.40",
4
+ "version": "2.1.41",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",