@pisell/pisellos 2.2.232 → 2.2.233

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";
@@ -172,7 +172,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
172
172
  key: "loadOpenDataConfig",
173
173
  value: function () {
174
174
  var _loadOpenDataConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
175
- var businessCode, lastFetchedAt, cachedData, openDataConfig;
175
+ var businessCode, lastFetchedAt, cachedData, channel, openDataConfig;
176
176
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
177
177
  while (1) switch (_context2.prev = _context2.next) {
178
178
  case 0:
@@ -208,28 +208,29 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
208
208
  case 14:
209
209
  return _context2.abrupt("return", _context2.sent);
210
210
  case 15:
211
+ channel = this.getSubmitOrderSalesChannel();
211
212
  this.loadOpenDataConfigInFlight = this.store.openData.fetchOpenData({
212
213
  scope: 'board',
213
- target: "".concat(businessCode, "+pos"),
214
+ target: "".concat(businessCode, "+").concat(channel),
214
215
  // target: `dine_in+pos`,
215
216
  section_code: [].concat(OPEN_DATA_SECTION_CODES)
216
217
  });
217
- _context2.prev = 16;
218
- _context2.next = 19;
218
+ _context2.prev = 17;
219
+ _context2.next = 20;
219
220
  return this.loadOpenDataConfigInFlight;
220
- case 19:
221
+ case 20:
221
222
  openDataConfig = _context2.sent;
222
223
  this.otherParams.openData = openDataConfig;
223
224
  return _context2.abrupt("return", openDataConfig);
224
- case 22:
225
- _context2.prev = 22;
225
+ case 23:
226
+ _context2.prev = 23;
226
227
  this.loadOpenDataConfigInFlight = null;
227
- return _context2.finish(22);
228
- case 25:
228
+ return _context2.finish(23);
229
+ case 26:
229
230
  case "end":
230
231
  return _context2.stop();
231
232
  }
232
- }, _callee2, this, [[16,, 22, 25]]);
233
+ }, _callee2, this, [[17,, 23, 26]]);
233
234
  }));
234
235
  function loadOpenDataConfig() {
235
236
  return _loadOpenDataConfig.apply(this, arguments);
@@ -0,0 +1,49 @@
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
+ });
@@ -149,9 +149,10 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
149
149
  }
150
150
  if (this.loadOpenDataConfigInFlight)
151
151
  return await this.loadOpenDataConfigInFlight;
152
+ const channel = this.getSubmitOrderSalesChannel();
152
153
  this.loadOpenDataConfigInFlight = this.store.openData.fetchOpenData({
153
154
  scope: "board",
154
- target: `${businessCode}+pos`,
155
+ target: `${businessCode}+${channel}`,
155
156
  // target: `dine_in+pos`,
156
157
  section_code: [...OPEN_DATA_SECTION_CODES]
157
158
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.232",
4
+ "version": "2.2.233",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",