@pisell/pisellos 3.0.88 → 3.0.89

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.
@@ -19,7 +19,7 @@ interface PackageSubItemUsageRules {
19
19
  type: 'universal_discount' | 'package_exclusive' | 'single_item_promo' | 'custom_usage_rules';
20
20
  rules: ("original_price" | "markup_price")[];
21
21
  package_scope?: {
22
- type: 'all_packages' | 'specific_packages';
22
+ type: 'all_packages' | 'specific_packages' | 'product_all' | 'products';
23
23
  exclude_bundle_product_ids: number[];
24
24
  include_bundle_product_ids: number[];
25
25
  filter: 0 | 1;
@@ -1838,8 +1838,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1838
1838
  // 套餐适用范围校验
1839
1839
  var isScopeValid = false;
1840
1840
 
1841
- // 排除套餐判断
1842
- if (scopeType === 'all_packages') {
1841
+ // 排除套餐判断, product_all值兼容旧数据
1842
+ if (scopeType === 'all_packages' || scopeType === 'product_all') {
1843
1843
  // 所有套餐可用
1844
1844
  if (!filter) {
1845
1845
  isScopeValid = true;
@@ -1848,8 +1848,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1848
1848
  }
1849
1849
  }
1850
1850
 
1851
- // 包含套餐判断
1852
- if (scopeType === 'specific_packages') {
1851
+ // 包含套餐判断, products值兼容旧数据
1852
+ if (scopeType === 'specific_packages' || scopeType === 'products') {
1853
1853
  isScopeValid = include_bundle_product_ids.includes(Number(mainProductId));
1854
1854
  }
1855
1855
 
@@ -301,7 +301,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
301
301
  autoSelectAllProductResources(resources_code: string, timeSlots?: TimeSliceItem): {
302
302
  errorList: any[];
303
303
  };
304
- getTimeSlotByAllResources(resources_code: string, split?: number): any[];
304
+ getTimeSlotByAllResources(resources_code: string): any[];
305
305
  getTimeSlotByAllResourcesForDate({ resources_code, startDate, endDate }: {
306
306
  resources_code: string;
307
307
  startDate: string;
@@ -310,7 +310,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
310
310
  date: string;
311
311
  status: string;
312
312
  week: string;
313
- weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
313
+ weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
314
314
  }[]>;
315
315
  submitTimeSlot(timeSlots: TimeSliceItem): void;
316
316
  private getScheduleDataByIds;
@@ -2061,7 +2061,6 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2061
2061
  _cartItems$,
2062
2062
  _cartItems$2,
2063
2063
  _this$shopStore$get;
2064
- var split = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
2065
2064
  var dateRange = this.store.date.getDateRange();
2066
2065
  // 取出购物车中所有一已选择的第一步资源
2067
2066
  var resources = [];
@@ -2245,7 +2244,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2245
2244
  resourcesMap: resourcesMap,
2246
2245
  duration: duration,
2247
2246
  currentDate: dateRange[0].date,
2248
- split: split,
2247
+ split: 10,
2249
2248
  resourcesUseableMap: resourcesUseableMap,
2250
2249
  capacity: maxCapacity,
2251
2250
  cut_off_time: maxCutOffTime,
@@ -19,7 +19,7 @@ interface PackageSubItemUsageRules {
19
19
  type: 'universal_discount' | 'package_exclusive' | 'single_item_promo' | 'custom_usage_rules';
20
20
  rules: ("original_price" | "markup_price")[];
21
21
  package_scope?: {
22
- type: 'all_packages' | 'specific_packages';
22
+ type: 'all_packages' | 'specific_packages' | 'product_all' | 'products';
23
23
  exclude_bundle_product_ids: number[];
24
24
  include_bundle_product_ids: number[];
25
25
  filter: 0 | 1;
@@ -1396,14 +1396,14 @@ var RulesModule = class extends import_BaseModule.BaseModule {
1396
1396
  const _isMarkupPrice = isMarkupPrice && rules.includes("markup_price");
1397
1397
  const isPriceValid = _isOriginalPrice || _isMarkupPrice;
1398
1398
  let isScopeValid = false;
1399
- if (scopeType === "all_packages") {
1399
+ if (scopeType === "all_packages" || scopeType === "product_all") {
1400
1400
  if (!filter) {
1401
1401
  isScopeValid = true;
1402
1402
  } else {
1403
1403
  isScopeValid = !exclude_bundle_product_ids.includes(Number(mainProductId));
1404
1404
  }
1405
1405
  }
1406
- if (scopeType === "specific_packages") {
1406
+ if (scopeType === "specific_packages" || scopeType === "products") {
1407
1407
  isScopeValid = include_bundle_product_ids.includes(Number(mainProductId));
1408
1408
  }
1409
1409
  if (isPriceValid && isScopeValid) {
@@ -301,7 +301,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
301
301
  autoSelectAllProductResources(resources_code: string, timeSlots?: TimeSliceItem): {
302
302
  errorList: any[];
303
303
  };
304
- getTimeSlotByAllResources(resources_code: string, split?: number): any[];
304
+ getTimeSlotByAllResources(resources_code: string): any[];
305
305
  getTimeSlotByAllResourcesForDate({ resources_code, startDate, endDate }: {
306
306
  resources_code: string;
307
307
  startDate: string;
@@ -310,7 +310,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
310
310
  date: string;
311
311
  status: string;
312
312
  week: string;
313
- weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
313
+ weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
314
314
  }[]>;
315
315
  submitTimeSlot(timeSlots: TimeSliceItem): void;
316
316
  private getScheduleDataByIds;
@@ -1406,7 +1406,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
1406
1406
  return { errorList };
1407
1407
  }
1408
1408
  // 从购物车中获取已经分配好第一步资源的所有时间片
1409
- getTimeSlotByAllResources(resources_code, split = 10) {
1409
+ getTimeSlotByAllResources(resources_code) {
1410
1410
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
1411
1411
  let dateRange = this.store.date.getDateRange();
1412
1412
  const resources = [];
@@ -1564,7 +1564,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
1564
1564
  resourcesMap,
1565
1565
  duration,
1566
1566
  currentDate: dateRange[0].date,
1567
- split,
1567
+ split: 10,
1568
1568
  resourcesUseableMap,
1569
1569
  capacity: maxCapacity,
1570
1570
  cut_off_time: maxCutOffTime,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "3.0.88",
4
+ "version": "3.0.89",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",