@pisell/pisellos 2.1.143 → 2.1.145
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.
- package/dist/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingByStep/index.js +2 -1
- package/lib/model/strategy/adapter/promotion/index.js +0 -49
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingByStep/index.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// 导出评估器
|
|
2
|
+
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
+
|
|
4
|
+
// 导出适配器
|
|
5
|
+
export { PromotionAdapter } from "./adapter";
|
|
6
|
+
export { default } from "./adapter";
|
|
7
|
+
|
|
8
|
+
// 导出策略配置示例常量
|
|
9
|
+
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY } from "./examples";
|
|
@@ -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): any[];
|
|
304
|
+
getTimeSlotByAllResources(resources_code: string, split?: number): 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 |
|
|
313
|
+
weekNum: 0 | 2 | 1 | 5 | 4 | 3 | 6;
|
|
314
314
|
}[]>;
|
|
315
315
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
316
316
|
private getScheduleDataByIds;
|
|
@@ -2071,6 +2071,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2071
2071
|
_cartItems$,
|
|
2072
2072
|
_cartItems$2,
|
|
2073
2073
|
_this$shopStore$get;
|
|
2074
|
+
var split = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
2074
2075
|
var dateRange = this.store.date.getDateRange();
|
|
2075
2076
|
// 取出购物车中所有一已选择的第一步资源
|
|
2076
2077
|
var resources = [];
|
|
@@ -2254,7 +2255,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2254
2255
|
resourcesMap: resourcesMap,
|
|
2255
2256
|
duration: duration,
|
|
2256
2257
|
currentDate: dateRange[0].date,
|
|
2257
|
-
split:
|
|
2258
|
+
split: split,
|
|
2258
2259
|
resourcesUseableMap: resourcesUseableMap,
|
|
2259
2260
|
capacity: maxCapacity,
|
|
2260
2261
|
cut_off_time: maxCutOffTime,
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/model/strategy/adapter/promotion/index.ts
|
|
30
|
-
var promotion_exports = {};
|
|
31
|
-
__export(promotion_exports, {
|
|
32
|
-
BUY_X_GET_Y_FREE_STRATEGY: () => import_examples.BUY_X_GET_Y_FREE_STRATEGY,
|
|
33
|
-
PromotionAdapter: () => import_adapter.PromotionAdapter,
|
|
34
|
-
PromotionEvaluator: () => import_evaluator.PromotionEvaluator,
|
|
35
|
-
X_ITEMS_FOR_Y_PRICE_STRATEGY: () => import_examples.X_ITEMS_FOR_Y_PRICE_STRATEGY,
|
|
36
|
-
default: () => import_adapter2.default
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(promotion_exports);
|
|
39
|
-
var import_evaluator = require("./evaluator");
|
|
40
|
-
var import_adapter = require("./adapter");
|
|
41
|
-
var import_adapter2 = __toESM(require("./adapter"));
|
|
42
|
-
var import_examples = require("./examples");
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
BUY_X_GET_Y_FREE_STRATEGY,
|
|
46
|
-
PromotionAdapter,
|
|
47
|
-
PromotionEvaluator,
|
|
48
|
-
X_ITEMS_FOR_Y_PRICE_STRATEGY
|
|
49
|
-
});
|
|
@@ -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): any[];
|
|
304
|
+
getTimeSlotByAllResources(resources_code: string, split?: number): 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 |
|
|
313
|
+
weekNum: 0 | 2 | 1 | 5 | 4 | 3 | 6;
|
|
314
314
|
}[]>;
|
|
315
315
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
316
316
|
private getScheduleDataByIds;
|
|
@@ -1407,7 +1407,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1407
1407
|
return { errorList };
|
|
1408
1408
|
}
|
|
1409
1409
|
// 从购物车中获取已经分配好第一步资源的所有时间片
|
|
1410
|
-
getTimeSlotByAllResources(resources_code) {
|
|
1410
|
+
getTimeSlotByAllResources(resources_code, split = 10) {
|
|
1411
1411
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1412
1412
|
let dateRange = this.store.date.getDateRange();
|
|
1413
1413
|
const resources = [];
|
|
@@ -1565,7 +1565,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1565
1565
|
resourcesMap,
|
|
1566
1566
|
duration,
|
|
1567
1567
|
currentDate: dateRange[0].date,
|
|
1568
|
-
split
|
|
1568
|
+
split,
|
|
1569
1569
|
resourcesUseableMap,
|
|
1570
1570
|
capacity: maxCapacity,
|
|
1571
1571
|
cut_off_time: maxCutOffTime,
|