@pisell/pisellos 3.0.87 → 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
 
@@ -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 | 2 | 1 | 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;
@@ -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) {
@@ -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 | 2 | 1 | 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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "3.0.87",
4
+ "version": "3.0.89",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",