@pisell/pisellos 2.3.32 → 2.3.33

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.
@@ -1047,7 +1047,7 @@ export function createDefaultTempOrder(params) {
1047
1047
  };
1048
1048
  }
1049
1049
  export function buildSubmitPayload(params) {
1050
- var _tempOrder$customer_i, _tempOrder$order_numb, _tempOrder$shop_order, _tempOrder$shop_full_, _ref30, _tempOrder$is_price_i, _tempOrder$is_deposit, _enhancedPayload$summ;
1050
+ var _tempOrder$customer_i, _tempOrder$country_ca, _tempOrder$phone, _tempOrder$email, _tempOrder$order_numb, _tempOrder$shop_order, _tempOrder$shop_full_, _ref30, _tempOrder$is_price_i, _tempOrder$is_deposit, _enhancedPayload$summ;
1051
1051
  var tempOrder = params.tempOrder,
1052
1052
  cacheId = params.cacheId,
1053
1053
  _params$now = params.now,
@@ -1093,6 +1093,9 @@ export function buildSubmitPayload(params) {
1093
1093
  var payload = _objectSpread(_objectSpread({}, tempOrderRest), {}, {
1094
1094
  customer_id: (_tempOrder$customer_i = tempOrder.customer_id) !== null && _tempOrder$customer_i !== void 0 ? _tempOrder$customer_i : 1,
1095
1095
  customer_name: tempOrder.customer_name || 'Walk-In',
1096
+ country_calling_code: String((_tempOrder$country_ca = tempOrder.country_calling_code) !== null && _tempOrder$country_ca !== void 0 ? _tempOrder$country_ca : ''),
1097
+ phone: String((_tempOrder$phone = tempOrder.phone) !== null && _tempOrder$phone !== void 0 ? _tempOrder$phone : ''),
1098
+ email: String((_tempOrder$email = tempOrder.email) !== null && _tempOrder$email !== void 0 ? _tempOrder$email : ''),
1096
1099
  order_number: (_tempOrder$order_numb = tempOrder.order_number) !== null && _tempOrder$order_numb !== void 0 ? _tempOrder$order_numb : null,
1097
1100
  shop_order_number: (_tempOrder$shop_order = tempOrder.shop_order_number) !== null && _tempOrder$shop_order !== void 0 ? _tempOrder$shop_order : null,
1098
1101
  shop_full_order_number: (_tempOrder$shop_full_ = tempOrder.shop_full_order_number) !== null && _tempOrder$shop_full_ !== void 0 ? _tempOrder$shop_full_ : null,
@@ -4962,7 +4962,12 @@ var Server = /*#__PURE__*/function () {
4962
4962
  }, {
4963
4963
  key: "sanitizeLocalRecoveryOrder",
4964
4964
  value: function sanitizeLocalRecoveryOrder(order) {
4965
- var next = _objectSpread({}, order);
4965
+ var _order$country_callin, _order$phone, _order$email;
4966
+ var next = _objectSpread(_objectSpread({}, order), {}, {
4967
+ country_calling_code: String((_order$country_callin = order.country_calling_code) !== null && _order$country_callin !== void 0 ? _order$country_callin : ''),
4968
+ phone: String((_order$phone = order.phone) !== null && _order$phone !== void 0 ? _order$phone : ''),
4969
+ email: String((_order$email = order.email) !== null && _order$email !== void 0 ? _order$email : '')
4970
+ });
4966
4971
  var externalSaleNumber = next.external_sale_number;
4967
4972
  if (Number(next.is_draft_order || 0) === 1 && next.order_id !== undefined && externalSaleNumber !== undefined && String(next.order_id) === String(externalSaleNumber)) {
4968
4973
  delete next.order_id;
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 1 | 2 | 5 | 4 | 3 | 6;
314
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -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
+ });
@@ -965,6 +965,9 @@ function buildSubmitPayload(params) {
965
965
  ...tempOrderRest,
966
966
  customer_id: tempOrder.customer_id ?? 1,
967
967
  customer_name: tempOrder.customer_name || "Walk-In",
968
+ country_calling_code: String(tempOrder.country_calling_code ?? ""),
969
+ phone: String(tempOrder.phone ?? ""),
970
+ email: String(tempOrder.email ?? ""),
968
971
  order_number: tempOrder.order_number ?? null,
969
972
  shop_order_number: tempOrder.shop_order_number ?? null,
970
973
  shop_full_order_number: tempOrder.shop_full_order_number ?? null,
@@ -3227,7 +3227,12 @@ var Server = class {
3227
3227
  }
3228
3228
  }
3229
3229
  sanitizeLocalRecoveryOrder(order) {
3230
- const next = { ...order };
3230
+ const next = {
3231
+ ...order,
3232
+ country_calling_code: String(order.country_calling_code ?? ""),
3233
+ phone: String(order.phone ?? ""),
3234
+ email: String(order.email ?? "")
3235
+ };
3231
3236
  const externalSaleNumber = next.external_sale_number;
3232
3237
  if (Number(next.is_draft_order || 0) === 1 && next.order_id !== void 0 && externalSaleNumber !== void 0 && String(next.order_id) === String(externalSaleNumber)) {
3233
3238
  delete next.order_id;
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 1 | 2 | 5 | 4 | 3 | 6;
314
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.3.32",
4
+ "version": "2.3.33",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",