@pisell/pisellos 0.0.112 → 0.0.113

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.
@@ -212,7 +212,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
212
212
  }): void;
213
213
  setOtherData(key: string, value: any): void;
214
214
  getOtherData(key: string): any;
215
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
215
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
216
216
  /**
217
217
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
218
218
  *
@@ -293,7 +293,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
293
293
  }).flatMap(function (n) {
294
294
  return n.schedule_id;
295
295
  }).filter(function (n) {
296
- return n !== null;
296
+ return n !== null && n !== undefined;
297
297
  }); // 尝试去拿schedule 里的 other_product_ids 和 product_ids 拼在一起去重
298
298
  otherProductsIds = this.store.schedule.getOtherProductsIds() || [];
299
299
  allProductIds = [].concat(_toConsumableArray(product_ids), _toConsumableArray(otherProductsIds)).filter(function (n, index, self) {
@@ -212,7 +212,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
212
212
  }): void;
213
213
  setOtherData(key: string, value: any): void;
214
214
  getOtherData(key: string): any;
215
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
215
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
216
216
  /**
217
217
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
218
218
  *
@@ -220,7 +220,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
220
220
  { date, status: "available", week: "", weekNum: 0 },
221
221
  { date, status: "available", week: "", weekNum: 0 }
222
222
  ]);
223
- const scheduleIds = scheduleList.filter((n) => n.date === date).flatMap((n) => n.schedule_id).filter((n) => n !== null);
223
+ const scheduleIds = scheduleList.filter((n) => n.date === date).flatMap((n) => n.schedule_id).filter((n) => n !== null && n !== void 0);
224
224
  const otherProductsIds = this.store.schedule.getOtherProductsIds() || [];
225
225
  const allProductIds = [...product_ids, ...otherProductsIds].filter((n, index, self) => self.indexOf(n) === index);
226
226
  return await this.loadProducts({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.112",
4
+ "version": "0.0.113",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",