@pisell/pisellos 0.0.436 → 0.0.439

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.
@@ -37,5 +37,5 @@ export declare class DateModule extends BaseModule implements Module, DateModule
37
37
  getResourceAvailableTimeList(params: IGetAvailableTimeListParams): Promise<ITime[]>;
38
38
  clearDateRange(): void;
39
39
  storeChange(): void;
40
- getResourcesListByDate(date: string): any[] | undefined;
40
+ getResourcesListByDate(date: string): any[];
41
41
  }
@@ -401,9 +401,9 @@ export var DateModule = /*#__PURE__*/function (_BaseModule) {
401
401
  value: function getResourcesListByDate(date) {
402
402
  var _dateList$find;
403
403
  var dateList = this.store.dateList;
404
- var resourcesList = (_dateList$find = dateList.find(function (item) {
404
+ var resourcesList = (dateList === null || dateList === void 0 || (_dateList$find = dateList.find(function (item) {
405
405
  return item.date === date;
406
- })) === null || _dateList$find === void 0 ? void 0 : _dateList$find.resource;
406
+ })) === null || _dateList$find === void 0 ? void 0 : _dateList$find.resource) || [];
407
407
  return resourcesList;
408
408
  }
409
409
  }]);
@@ -22,6 +22,7 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
22
22
  with_discount_card: 0 | 1;
23
23
  customer_id: number;
24
24
  with_wallet_pass_holder: 0 | 1;
25
+ request_timezone: string;
25
26
  }): Promise<Discount[]>;
26
27
  batchSearch(code: string, customerId?: number): Promise<Discount[]>;
27
28
  filterEnabledDiscountList(discountList: Discount[]): Discount[];
@@ -190,7 +190,8 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
190
190
  relation_product: 1,
191
191
  with: ['extensionData', 'customScheduleSnapshot', 'holder.detail'],
192
192
  order_behavior_count: 1,
193
- order_behavior_count_customer_id: customerId || 1
193
+ order_behavior_count_customer_id: customerId || 1,
194
+ request_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
194
195
  });
195
196
  case 2:
196
197
  result = _context5.sent;
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 2 | 1 | 3 | 5 | 4 | 6;
314
+ weekNum: 0 | 2 | 1 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -123,7 +123,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
123
123
  * 获取当前的客户搜索条件
124
124
  * @returns 当前搜索条件
125
125
  */
126
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
126
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
127
127
  /**
128
128
  * 获取客户列表状态(包含滚动加载相关状态)
129
129
  * @returns 客户状态
@@ -755,7 +755,8 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
755
755
  action: 'create',
756
756
  with_good_pass: 1,
757
757
  with_discount_card: 1,
758
- with_wallet_pass_holder: 1
758
+ with_wallet_pass_holder: 1,
759
+ request_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
759
760
  });
760
761
  case 4:
761
762
  goodPassList = _context9.sent;
@@ -37,5 +37,5 @@ export declare class DateModule extends BaseModule implements Module, DateModule
37
37
  getResourceAvailableTimeList(params: IGetAvailableTimeListParams): Promise<ITime[]>;
38
38
  clearDateRange(): void;
39
39
  storeChange(): void;
40
- getResourcesListByDate(date: string): any[] | undefined;
40
+ getResourcesListByDate(date: string): any[];
41
41
  }
@@ -258,7 +258,7 @@ var DateModule = class extends import_BaseModule.BaseModule {
258
258
  getResourcesListByDate(date) {
259
259
  var _a;
260
260
  const dateList = this.store.dateList;
261
- const resourcesList = (_a = dateList.find((item) => item.date === date)) == null ? void 0 : _a.resource;
261
+ const resourcesList = ((_a = dateList == null ? void 0 : dateList.find((item) => item.date === date)) == null ? void 0 : _a.resource) || [];
262
262
  return resourcesList;
263
263
  }
264
264
  };
@@ -22,6 +22,7 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
22
22
  with_discount_card: 0 | 1;
23
23
  customer_id: number;
24
24
  with_wallet_pass_holder: 0 | 1;
25
+ request_timezone: string;
25
26
  }): Promise<Discount[]>;
26
27
  batchSearch(code: string, customerId?: number): Promise<Discount[]>;
27
28
  filterEnabledDiscountList(discountList: Discount[]): Discount[];
@@ -111,7 +111,8 @@ var DiscountModule = class extends import_BaseModule.BaseModule {
111
111
  relation_product: 1,
112
112
  with: ["extensionData", "customScheduleSnapshot", "holder.detail"],
113
113
  order_behavior_count: 1,
114
- order_behavior_count_customer_id: customerId || 1
114
+ order_behavior_count_customer_id: customerId || 1,
115
+ request_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
115
116
  });
116
117
  const resultDiscountList = this.filterEnabledDiscountList((result == null ? void 0 : result.data) || []) || [];
117
118
  return resultDiscountList;
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 2 | 1 | 3 | 5 | 4 | 6;
314
+ weekNum: 0 | 2 | 1 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -123,7 +123,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
123
123
  * 获取当前的客户搜索条件
124
124
  * @returns 当前搜索条件
125
125
  */
126
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
126
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
127
127
  /**
128
128
  * 获取客户列表状态(包含滚动加载相关状态)
129
129
  * @returns 客户状态
@@ -501,7 +501,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
501
501
  action: "create",
502
502
  with_good_pass: 1,
503
503
  with_discount_card: 1,
504
- with_wallet_pass_holder: 1
504
+ with_wallet_pass_holder: 1,
505
+ request_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
505
506
  }));
506
507
  const scanDiscount = (_c = this.getDiscountList()) == null ? void 0 : _c.filter(
507
508
  (item) => item.isScan
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.436",
4
+ "version": "0.0.439",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",