@pisell/pisellos 0.0.494 → 0.0.495
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.
|
@@ -1,9 +0,0 @@
|
|
|
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";
|
|
@@ -48,7 +48,7 @@ import { createUuidV4 } from "../../modules/Order/utils";
|
|
|
48
48
|
import { OrderModule } from "../../modules/Order";
|
|
49
49
|
import { RegisterAndLoginHooks } from "../RegisterAndLogin/types";
|
|
50
50
|
export * from "./types";
|
|
51
|
-
var OPEN_DATA_SECTION_CODES = ['basic', 'fulfillment', 'reservation', 'sale', 'menu', 'availability', 'workflow'];
|
|
51
|
+
var OPEN_DATA_SECTION_CODES = ['basic', 'fulfillment', 'reservation', 'sale', 'menu', 'availability', 'workflow', 'checkout'];
|
|
52
52
|
function cloneCustomDepositData(customDepositData) {
|
|
53
53
|
if (!customDepositData || _typeof(customDepositData) !== 'object') return undefined;
|
|
54
54
|
return _objectSpread(_objectSpread({}, customDepositData), {}, {
|
|
@@ -787,7 +787,7 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
787
787
|
}
|
|
788
788
|
throw new Error('addonProducts 模块未初始化');
|
|
789
789
|
case 6:
|
|
790
|
-
associatedMenus = ((_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 || (_this$otherParams6 = _this$otherParams6.
|
|
790
|
+
associatedMenus = ((_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 || (_this$otherParams6 = _this$otherParams6.openData) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6['menu.associated_menus']) || [];
|
|
791
791
|
if (associatedMenus.length) {
|
|
792
792
|
_context10.next = 9;
|
|
793
793
|
break;
|
|
@@ -2126,7 +2126,7 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2126
2126
|
});
|
|
2127
2127
|
case 4:
|
|
2128
2128
|
openDataConfig = _context28.sent;
|
|
2129
|
-
this.otherParams.
|
|
2129
|
+
this.otherParams.openData = openDataConfig;
|
|
2130
2130
|
return _context28.abrupt("return", openDataConfig);
|
|
2131
2131
|
case 7:
|
|
2132
2132
|
case "end":
|
|
@@ -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
|
-
});
|
|
@@ -60,7 +60,8 @@ var OPEN_DATA_SECTION_CODES = [
|
|
|
60
60
|
"sale",
|
|
61
61
|
"menu",
|
|
62
62
|
"availability",
|
|
63
|
-
"workflow"
|
|
63
|
+
"workflow",
|
|
64
|
+
"checkout"
|
|
64
65
|
];
|
|
65
66
|
function cloneCustomDepositData(customDepositData) {
|
|
66
67
|
if (!customDepositData || typeof customDepositData !== "object")
|
|
@@ -504,7 +505,7 @@ var VenueBookingImpl = class extends import_BaseModule.BaseModule {
|
|
|
504
505
|
throw new Error("venueProducts 模块未初始化");
|
|
505
506
|
if (!this.store.addonProducts)
|
|
506
507
|
throw new Error("addonProducts 模块未初始化");
|
|
507
|
-
const associatedMenus = ((_b = (_a = this.otherParams) == null ? void 0 : _a.
|
|
508
|
+
const associatedMenus = ((_b = (_a = this.otherParams) == null ? void 0 : _a.openData) == null ? void 0 : _b["menu.associated_menus"]) || [];
|
|
508
509
|
if (!associatedMenus.length) {
|
|
509
510
|
throw new Error("未获取到餐牌配置(menu.associated_menus),请检查 OpenData 配置");
|
|
510
511
|
}
|
|
@@ -1229,7 +1230,7 @@ var VenueBookingImpl = class extends import_BaseModule.BaseModule {
|
|
|
1229
1230
|
target: "venue_booking+online_store",
|
|
1230
1231
|
section_code: [...OPEN_DATA_SECTION_CODES]
|
|
1231
1232
|
});
|
|
1232
|
-
this.otherParams.
|
|
1233
|
+
this.otherParams.openData = openDataConfig;
|
|
1233
1234
|
return openDataConfig;
|
|
1234
1235
|
}
|
|
1235
1236
|
async loadRuntimeConfigs() {
|