@pisell/private-materials 6.12.408 → 6.12.409

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.
Files changed (54) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +3 -3
  6. package/build/lowcode/view.js +3 -3
  7. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
  8. package/es/components/bigSale/components/ProductList/index.js +179 -27
  9. package/es/components/bigSale/components/ProductListSettingsModal/index.js +5 -3
  10. package/es/components/bigSale/components/TimeBar/index.js +0 -1
  11. package/es/components/bigSale/dialog.js +0 -1
  12. package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
  13. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
  14. package/es/components/bigSale/index.js +0 -1
  15. package/es/components/bigSale/templates/Kiosk/index.js +0 -1
  16. package/es/components/bigSale/utils/productListPreferences.js +5 -2
  17. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
  18. package/es/components/venueBookingSales/BookingComposer.js +44 -8
  19. package/es/components/venueBookingSales/VenueBookingShared.js +1 -1
  20. package/es/components/venueBookingSales/availability/BookingSelectionPanel.js +12 -1
  21. package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +0 -1
  22. package/es/components/venueBookingSales/extras/VenueExtraDetailModal.js +1 -1
  23. package/es/index.js +0 -2
  24. package/es/plus/multiCurrencySettlement/index.js +1 -1
  25. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  26. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  27. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  28. package/es/plus/saleDetail/Base.js +0 -1
  29. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
  30. package/es/plus/saleDetail/components/DetailActions/PrintAction.js +0 -1
  31. package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
  32. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
  33. package/es/plus/saleDetail/index.js +0 -1
  34. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
  35. package/es/plus/saleDetail/tmpl/B/index.js +0 -1
  36. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  37. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  38. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  39. package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
  40. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  41. package/es/pro/Login2.0/index.d.ts +2 -2
  42. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  43. package/es/pro/bookingProductDetailModal/index.js +7 -7
  44. package/lib/components/bigSale/components/ProductList/index.js +179 -26
  45. package/lib/components/bigSale/components/ProductListSettingsModal/index.js +5 -3
  46. package/lib/components/bigSale/utils/productListPreferences.js +5 -2
  47. package/lib/components/venueBookingSales/BookingComposer.js +43 -7
  48. package/lib/components/venueBookingSales/VenueBookingShared.js +1 -1
  49. package/lib/components/venueBookingSales/availability/BookingSelectionPanel.js +12 -1
  50. package/lib/components/venueBookingSales/extras/VenueExtraDetailModal.js +1 -1
  51. package/lib/pro/bookingProductDetailModal/index.js +7 -7
  52. package/package.json +2 -2
  53. package/es/plus/pisellReservation/index.js +0 -17
  54. package/es/plus/salesSdk/index.js +0 -54
package/es/index.js CHANGED
@@ -90,7 +90,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
90
90
  import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
91
91
  import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
92
92
  import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
93
- import "./plus/salesSdk/index.js";
94
93
  import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
95
94
  import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
96
95
  import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
@@ -154,7 +153,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
154
153
  import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
155
154
  import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
156
155
  import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
157
- import "./plus/pisellReservation/index.js";
158
156
  import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
159
157
  import cupProject_default from "./components/ecocup/cupProject/index.js";
160
158
  import CupList from "./components/ecocup/cupList/index.js";
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
280
280
  });
281
281
  }
282
282
  //#endregion
283
- export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, findFirstVirtualCurrencyAsset, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getReservedVirtualSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
283
+ export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
259
259
  return rows;
260
260
  }
261
261
  //#endregion
262
- export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
262
+ export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
78
78
  PisellToast({ content: err instanceof Error ? err.message : String(err) });
79
79
  }
80
80
  //#endregion
81
- export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
81
+ export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
927
927
  ];
928
928
  }
929
929
  //#endregion
930
- export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
930
+ export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
@@ -13,7 +13,6 @@ import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
13
13
  import locales_default from "./locales.js";
14
14
  import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
15
15
  import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
16
- import "../salesSdk/index.js";
17
16
  import locales_default$1 from "./components/LineItem/locales.js";
18
17
  import { SaleOrderActionBoundary } from "./actions/index.js";
19
18
  import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
@@ -2,7 +2,6 @@ import useEngineContext from "../../../../../hooks/useEngineContext.js";
2
2
  import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import { resolveContactsInfo } from "../utils.js";
4
4
  import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
5
- import "../../../../salesSdk/index.js";
6
5
  import { useMemo } from "react";
7
6
  import { useMemoizedFn } from "ahooks";
8
7
  //#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
@@ -4,7 +4,6 @@ import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.
4
4
  import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
5
5
  import useLogger from "../../../../hooks/useLogger.js";
6
6
  import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
7
- import "../../../salesSdk/index.js";
8
7
  import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
9
8
  import { getRemotePrintActions, getWristbandList } from "../../serve.js";
10
9
  import { EBizPrintType } from "./types.js";
@@ -10,7 +10,6 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
10
10
  import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
11
11
  import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
12
12
  import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
13
- import "../../../salesSdk/index.js";
14
13
  import { resolveSaleDetailTempOrder } from "../../utils.js";
15
14
  import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
16
15
  import { deriveSaleOrderSubmitState } from "../../actions/state.js";
@@ -5,7 +5,6 @@ import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js
5
5
  import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
6
6
  import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
7
7
  import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
8
- import "../../../salesSdk/index.js";
9
8
  import { resolveSaleDetailTempOrder } from "../../utils.js";
10
9
  import React, { memo, useMemo } from "react";
11
10
  import { formatAmount, locales } from "@pisell/utils";
@@ -5,7 +5,6 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
5
5
  import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
6
6
  import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
7
7
  import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
8
- import "../salesSdk/index.js";
9
8
  import Base_default from "./Base.js";
10
9
  import { resolveSaleDetailOsProps } from "./osProps.js";
11
10
  import React, { forwardRef, useImperativeHandle } from "react";
@@ -1,7 +1,6 @@
1
1
  import useStableInstanceId from "../../../../../../hooks/useStableInstanceId.js";
2
2
  import { useSalesSdkDish } from "../../../../../salesSdk/hooks/useSalesSdkDish.js";
3
3
  import { useCurrentSalesSdkDish } from "../../../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
4
- import "../../../../../salesSdk/index.js";
5
4
  import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
6
5
  import { DishGroupView } from "./DishGroupView.js";
7
6
  import dayjs from "dayjs";
@@ -1,7 +1,6 @@
1
1
  import useEngineContext from "../../../../hooks/useEngineContext.js";
2
2
  import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import { useCurrentSalesSdkDish } from "../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
4
- import "../../../salesSdk/index.js";
5
4
  import { getInternalNotesByScheduleEvent } from "../../serve.js";
6
5
  import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
7
6
  import { DetailActions } from "../../components/DetailActions/index.js";
@@ -407,4 +407,4 @@ function createAddProductWithFlowDebounced(deps) {
407
407
  };
408
408
  }
409
409
  //#endregion
410
- export { createAddProductWithFlowDebounced, shouldBypassAddProductDebounce };
410
+ export { createAddProductWithFlowDebounced };
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
31
31
  return typeof off === "function" ? off : () => {};
32
32
  }
33
33
  //#endregion
34
- export { BOOKING_CONTEXT_DATE_EVENT, formatBookingDateTime, subscribeBookingDateChange };
34
+ export { formatBookingDateTime, subscribeBookingDateChange };
@@ -102,4 +102,4 @@ function buildHolderListRequestKey(params) {
102
102
  });
103
103
  }
104
104
  //#endregion
105
- export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
105
+ export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, resolveHolderDisplayConfig };
@@ -0,0 +1 @@
1
+ export { };
@@ -14,4 +14,4 @@ interface AuthModalProps {
14
14
  */
15
15
  declare const AuthModal: React.FC<AuthModalProps>;
16
16
  //#endregion
17
- export { AuthModal };
17
+ export { AuthModal, AuthModalProps };
@@ -1,4 +1,4 @@
1
- import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
1
+ import { AuthMethodType, VerificationMethod } from "./shared/types.js";
2
2
  import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
3
3
  import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
4
- import { AuthModal } from "./AuthModal.js";
4
+ import { AuthModal, AuthModalProps } from "./AuthModal.js";
@@ -226,4 +226,4 @@ interface RegisterFormData {
226
226
  verification_token?: string;
227
227
  }
228
228
  //#endregion
229
- export { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
229
+ export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
@@ -62,7 +62,7 @@ function BookingProductDetailModal(props) {
62
62
  return ui ? session : /* @__PURE__ */ React.createElement(VenueBookingDesignProvider, { lang: props.locale || "en" }, session);
63
63
  }
64
64
  function DetailSession(props) {
65
- var _props$configuration$, _props$skuOptions, _props$skuOptions2, _bookingActionAmount, _props$labels$confirm, _props$labels, _configurationFooter$, _skuPresentation$moda, _getAppearance, _skuPresentation$moda2, _props$skuOptions3, _props$skuOptions4, _props$skuOptions5;
65
+ var _props$configuration$, _props$skuOptions, _props$skuOptions2, _bookingActionAmount, _configurationFooter$, _props$labels$confirm, _props$labels, _configurationFooter$2, _skuPresentation$moda, _getAppearance, _skuPresentation$moda2, _props$skuOptions3, _props$skuOptions4, _props$skuOptions5;
66
66
  const ui = useOptionalBookingUI();
67
67
  const brandTokens = ui === null || ui === void 0 ? void 0 : ui.brandTokens;
68
68
  const [plan] = useState(() => props.plan);
@@ -203,7 +203,7 @@ function DetailSession(props) {
203
203
  busy
204
204
  };
205
205
  const footerContent = typeof props.footerContent === "function" ? props.footerContent(footerContext) : props.footerContent;
206
- const configurationFooter = !isTicket && "configurationFooter" in props ? props.configurationFooter : void 0;
206
+ const configurationFooter = step === "configuration" ? props.configurationFooter : void 0;
207
207
  const actionLabel = step === "configuration" ? isTicket ? labels.next : labels.confirmConfiguration : labels.confirmBooking;
208
208
  const error = invalid ? labels.invalidPlan : message || props.error;
209
209
  const skuType = ((_props$skuOptions = props.skuOptions) === null || _props$skuOptions === void 0 ? void 0 : _props$skuOptions.type) || "flat";
@@ -232,7 +232,7 @@ function DetailSession(props) {
232
232
  wide: true,
233
233
  className: `${isTicket ? "reservation-modal" : "party-package-dialog"} pisell-booking-product-detail-modal ${props.className || ""}`,
234
234
  bodyClassName: `${isTicket ? "reservation-content" : "package-config-body"} pisell-booking-product-detail-body`,
235
- footerClassName: `${isTicket ? "booking-config-dialog-footer" : "package-config-footer"} pisell-booking-product-detail-footer${isTicket && step === "configuration" ? " pisell-booking-product-detail-options-footer" : ""}${configurationFooter ? " pisell-booking-product-detail-configuration-footer" : ""}`,
235
+ footerClassName: `${isTicket ? "booking-config-dialog-footer" : "package-config-footer"} pisell-booking-product-detail-footer${isTicket && step === "configuration" && !configurationFooter ? " pisell-booking-product-detail-options-footer" : ""}${!isTicket && configurationFooter ? " pisell-booking-product-detail-configuration-footer" : ""}`,
236
236
  mobile: "fullscreen",
237
237
  bodyRef: setScrollContainer,
238
238
  portal,
@@ -241,9 +241,9 @@ function DetailSession(props) {
241
241
  style: _objectSpread2(_objectSpread2({}, props.width ? { width: props.width } : {}), props.style),
242
242
  intro: steps,
243
243
  footer: isTicket ? /* @__PURE__ */ React.createElement(ConfigurationFooter, {
244
- leading: step === "booking" ? footerContent : void 0,
245
- label: step === "booking" ? translate(locale, "subtotal") : void 0,
246
- amount: step === "booking" ? (_bookingActionAmount = props.bookingActionAmount) !== null && _bookingActionAmount !== void 0 ? _bookingActionAmount : "—" : null,
244
+ leading: step === "booking" || configurationFooter ? footerContent : void 0,
245
+ label: step === "booking" ? translate(locale, "subtotal") : configurationFooter === null || configurationFooter === void 0 ? void 0 : configurationFooter.label,
246
+ amount: step === "booking" ? (_bookingActionAmount = props.bookingActionAmount) !== null && _bookingActionAmount !== void 0 ? _bookingActionAmount : "—" : (_configurationFooter$ = configurationFooter === null || configurationFooter === void 0 ? void 0 : configurationFooter.amount) !== null && _configurationFooter$ !== void 0 ? _configurationFooter$ : null,
247
247
  action: {
248
248
  label: completed ? labels.working : actionLabel,
249
249
  compactLabel: completed ? labels.working : step === "booking" ? (_props$labels$confirm = (_props$labels = props.labels) === null || _props$labels === void 0 ? void 0 : _props$labels.confirmBooking) !== null && _props$labels$confirm !== void 0 ? _props$labels$confirm : translate(locale, editing ? "saveTicketsCompact" : "addTicketsCompact") : actionLabel,
@@ -257,7 +257,7 @@ function DetailSession(props) {
257
257
  }, error)
258
258
  }) : configurationFooter ? /* @__PURE__ */ React.createElement(ConfigurationFooter, {
259
259
  leading: footerContent,
260
- label: (_configurationFooter$ = configurationFooter.label) !== null && _configurationFooter$ !== void 0 ? _configurationFooter$ : translate(locale, "subtotal"),
260
+ label: (_configurationFooter$2 = configurationFooter.label) !== null && _configurationFooter$2 !== void 0 ? _configurationFooter$2 : translate(locale, "subtotal"),
261
261
  amount: configurationFooter.amount,
262
262
  action: {
263
263
  label: completed ? labels.working : actionLabel,
@@ -52,6 +52,42 @@ function getCurrentRoutePath() {
52
52
  const { pathname, search, hash } = window.location;
53
53
  return `${pathname}${search}${hash}`;
54
54
  }
55
+ function getOperatorMetadata(user) {
56
+ var _user$id, _user$email, _user$pos_id;
57
+ if (!user || typeof user !== "object") return null;
58
+ const name = [user.staff_first_name, user.staff_last_name].filter(Boolean).join(" ").trim() || [user.first_name, user.last_name].filter(Boolean).join(" ").trim() || null;
59
+ const operator = {
60
+ id: (_user$id = user.id) !== null && _user$id !== void 0 ? _user$id : null,
61
+ name,
62
+ email: (_user$email = user.email) !== null && _user$email !== void 0 ? _user$email : null,
63
+ posId: (_user$pos_id = user.pos_id) !== null && _user$pos_id !== void 0 ? _user$pos_id : null
64
+ };
65
+ return Object.values(operator).some(Boolean) ? operator : null;
66
+ }
67
+ function getCurrentOperatorMetadata(engineContext) {
68
+ var _engineContext$appHel;
69
+ const utils = engineContext === null || engineContext === void 0 || (_engineContext$appHel = engineContext.appHelper) === null || _engineContext$appHel === void 0 ? void 0 : _engineContext$appHel.utils;
70
+ const candidates = [];
71
+ if (typeof (utils === null || utils === void 0 ? void 0 : utils.getData) === "function") try {
72
+ candidates.push(utils.getData("account"), utils.getData("customer"));
73
+ } catch (_unused) {}
74
+ let appStorage;
75
+ if (typeof (utils === null || utils === void 0 ? void 0 : utils.getApp) === "function") try {
76
+ var _utils$getApp;
77
+ appStorage = (_utils$getApp = utils.getApp()) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.storage;
78
+ } catch (_unused2) {}
79
+ [utils === null || utils === void 0 ? void 0 : utils.storage, appStorage].forEach((storage) => {
80
+ if (typeof (storage === null || storage === void 0 ? void 0 : storage.get) !== "function") return;
81
+ try {
82
+ candidates.push(storage.get("account"), storage.get("customer"));
83
+ } catch (_unused3) {}
84
+ });
85
+ for (const candidate of candidates) try {
86
+ const operator = getOperatorMetadata(typeof candidate === "string" ? JSON.parse(candidate) : candidate);
87
+ if (operator) return operator;
88
+ } catch (_unused4) {}
89
+ return null;
90
+ }
55
91
  function resolvePhoneCartEntryQuantity(value) {
56
92
  var _value$_extend$displa, _value$_extend;
57
93
  const quantity = Number((_value$_extend$displa = value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.displayQuantity) !== null && _value$_extend$displa !== void 0 ? _value$_extend$displa : value === null || value === void 0 ? void 0 : value.num);
@@ -140,7 +176,7 @@ function shouldHideSingleKioskCategoryNavigation(navigation, items) {
140
176
  * 商品列表只做“加载商品 + 触发加购”,加购决策交给 salesSdk。
141
177
  */
142
178
  const BigSaleProductListInner = ({ renderContent, className, renderProductCard, catalog, quantityByProductId, onSelectProduct, onQuantityChange, getProductPresentation, isActive = true, catalogPreparation, osKey, productListPreferencesChannel, mode, context, businessCode, productLoadParams, productDisplayConfig, productCatalogSessionKey, requiredOrderId, categoryResetKey, revealProductRequest, productListPreferences: controlledProductListPreferences, productListPreferencesOverride: controlledProductListPreferencesOverride, defaultProductListPreferences: controlledDefaultProductListPreferences, onProductListPreferencesChange, onProductListPreferencesReset, variant, categoryNavigation = "tabbar", defaultCategorySelection = "first", allCategoryLabel, hideSingleCategoryNavigation = false, categoryDisplayMode = "switch", persistentSearch = false, onScrollActivityChange, showActiveCategoryTitle = false, productListHeaderSlot, productSelectionTrigger = "pointerUp", productCardVersion = "v1", addToCartToastIcon, addToCartToastOptions, showSettings = true }) => {
143
- var _engineContext$appHel, _catalog$products, _sales$bookingTicket$, _sales$bookingTicket, _sales$bookingTicket$2, _productLoadParams$me, _sales$defaultProduct, _sales$tempOrder3;
179
+ var _engineContext$appHel2, _catalog$products, _sales$bookingTicket$, _sales$bookingTicket, _sales$bookingTicket$2, _productLoadParams$me, _sales$defaultProduct, _sales$tempOrder3;
144
180
  const isControlledCatalog = catalog !== void 0;
145
181
  const hasControlledActions = isControlledCatalog || quantityByProductId !== void 0 || !!onSelectProduct || !!onQuantityChange;
146
182
  const scopeKey = catalog === null || catalog === void 0 ? void 0 : catalog.scopeKey;
@@ -151,7 +187,8 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
151
187
  const usesV2ProductCard = variant === "phone" && productCardVersion === "v2";
152
188
  const Toast = (0, _pisell_materials.useToast)();
153
189
  const engineContext = require_useEngineContext.default();
154
- const getEngineData = engineContext === null || engineContext === void 0 || (_engineContext$appHel = engineContext.appHelper) === null || _engineContext$appHel === void 0 || (_engineContext$appHel = _engineContext$appHel.utils) === null || _engineContext$appHel === void 0 ? void 0 : _engineContext$appHel.getData;
190
+ const getEngineData = engineContext === null || engineContext === void 0 || (_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.utils) === null || _engineContext$appHel2 === void 0 ? void 0 : _engineContext$appHel2.getData;
191
+ const operator = getCurrentOperatorMetadata(engineContext);
155
192
  const addToCartToastApi = (0, react.useMemo)(() => addToCartToastIcon ? { success: (content) => {
156
193
  Toast.show({
157
194
  content,
@@ -242,8 +279,60 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
242
279
  const [uncontrolledProductListPreferences, setUncontrolledProductListPreferences] = (0, react.useState)(() => require_productListPreferences.readBigSaleProductListPreferences(preferencesKey, defaultProductListPreferences));
243
280
  const [uncontrolledProductListPreferencesKey, setUncontrolledProductListPreferencesKey] = (0, react.useState)(preferencesKey);
244
281
  const [uncontrolledProductListPreferencesOverride, setUncontrolledProductListPreferencesOverride] = (0, react.useState)(() => Boolean(require_productListPreferences.readStoredBigSaleProductListPreferences(preferencesKey, defaultProductListPreferences)));
282
+ const productListPreferenceStorageLogRef = (0, react.useRef)();
283
+ const productListEntryLogRef = (0, react.useRef)();
245
284
  const productListPreferences = controlledProductListPreferences || (uncontrolledProductListPreferencesKey === preferencesKey ? uncontrolledProductListPreferences : defaultProductListPreferences);
246
285
  const productListPreferencesOverride = controlledProductListPreferences !== void 0 ? controlledProductListPreferencesOverride !== false : uncontrolledProductListPreferencesOverride;
286
+ (0, react.useEffect)(() => {
287
+ const metadata = {
288
+ eventVersion: 1,
289
+ action: "enter-sales-page",
290
+ mode,
291
+ businessCode: businessCode !== null && businessCode !== void 0 ? businessCode : null,
292
+ osKey: osKey !== null && osKey !== void 0 ? osKey : null,
293
+ channel: productListPreferencesChannel !== null && productListPreferencesChannel !== void 0 ? productListPreferencesChannel : null,
294
+ scopeKey: scopeKey !== null && scopeKey !== void 0 ? scopeKey : null,
295
+ variant: variant !== null && variant !== void 0 ? variant : null,
296
+ pathname: getCurrentRoutePath(),
297
+ operator,
298
+ storageKey: preferencesKey,
299
+ productListPreferencesSource: controlledProductListPreferences ? "controlled" : productListPreferencesOverride ? "local-storage" : "auto",
300
+ productListPreferences,
301
+ catalogProductCount: currentProducts.length
302
+ };
303
+ const entrySignature = JSON.stringify({
304
+ mode,
305
+ businessCode: businessCode !== null && businessCode !== void 0 ? businessCode : null,
306
+ osKey: osKey !== null && osKey !== void 0 ? osKey : null,
307
+ channel: productListPreferencesChannel !== null && productListPreferencesChannel !== void 0 ? productListPreferencesChannel : null,
308
+ scopeKey: scopeKey !== null && scopeKey !== void 0 ? scopeKey : null,
309
+ pathname: metadata.pathname
310
+ });
311
+ if (productListEntryLogRef.current === entrySignature) return;
312
+ productListEntryLogRef.current = entrySignature;
313
+ try {
314
+ var _logger$addLog;
315
+ logger === null || logger === void 0 || (_logger$addLog = logger.addLog) === null || _logger$addLog === void 0 || _logger$addLog.call(logger, {
316
+ type: "info",
317
+ title: "[BigSaleProductList] 商品列表进入销售页",
318
+ metadata
319
+ });
320
+ } catch (_unused5) {}
321
+ }, [
322
+ businessCode,
323
+ controlledProductListPreferences,
324
+ currentProducts.length,
325
+ logger,
326
+ mode,
327
+ operator,
328
+ osKey,
329
+ preferencesKey,
330
+ productListPreferences,
331
+ productListPreferencesChannel,
332
+ productListPreferencesOverride,
333
+ scopeKey,
334
+ variant
335
+ ]);
247
336
  const productListConfig = require_useBigSaleProductListConfig.useBigSaleProductListConfig({
248
337
  products: currentProducts,
249
338
  scopeKey,
@@ -287,11 +376,44 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
287
376
  setUncontrolledProductListPreferences(storedPreferences || defaultProductListPreferences);
288
377
  setUncontrolledProductListPreferencesKey(preferencesKey);
289
378
  setUncontrolledProductListPreferencesOverride(Boolean(storedPreferences));
379
+ const metadata = {
380
+ eventVersion: 1,
381
+ mode,
382
+ businessCode: businessCode !== null && businessCode !== void 0 ? businessCode : null,
383
+ osKey: osKey !== null && osKey !== void 0 ? osKey : null,
384
+ channel: productListPreferencesChannel !== null && productListPreferencesChannel !== void 0 ? productListPreferencesChannel : null,
385
+ operator,
386
+ variant: variant !== null && variant !== void 0 ? variant : null,
387
+ pathname: getCurrentRoutePath(),
388
+ storageKey: preferencesKey,
389
+ cacheHit: Boolean(storedPreferences),
390
+ storedPreferences: storedPreferences !== null && storedPreferences !== void 0 ? storedPreferences : null,
391
+ fallbackPreferences: defaultProductListPreferences
392
+ };
393
+ const signature = JSON.stringify(metadata);
394
+ if (productListPreferenceStorageLogRef.current !== signature) {
395
+ productListPreferenceStorageLogRef.current = signature;
396
+ try {
397
+ var _logger$addLog2;
398
+ logger === null || logger === void 0 || (_logger$addLog2 = logger.addLog) === null || _logger$addLog2 === void 0 || _logger$addLog2.call(logger, {
399
+ type: "info",
400
+ title: "[BigSaleProductList] 商品卡配置本地缓存读取",
401
+ metadata
402
+ });
403
+ } catch (_unused6) {}
404
+ }
290
405
  }
291
406
  }, [
407
+ businessCode,
292
408
  controlledProductListPreferences,
293
409
  defaultProductListPreferences,
294
- preferencesKey
410
+ logger,
411
+ mode,
412
+ osKey,
413
+ operator,
414
+ preferencesKey,
415
+ productListPreferencesChannel,
416
+ variant
295
417
  ]);
296
418
  const productListLayoutLogRef = (0, react.useRef)();
297
419
  (0, react.useEffect)(() => {
@@ -313,13 +435,13 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
313
435
  if (productListLayoutLogRef.current === signature) return;
314
436
  productListLayoutLogRef.current = signature;
315
437
  try {
316
- var _logger$addLog;
317
- logger === null || logger === void 0 || (_logger$addLog = logger.addLog) === null || _logger$addLog === void 0 || _logger$addLog.call(logger, {
438
+ var _logger$addLog3;
439
+ logger === null || logger === void 0 || (_logger$addLog3 = logger.addLog) === null || _logger$addLog3 === void 0 || _logger$addLog3.call(logger, {
318
440
  type: "info",
319
441
  title: "[BigSaleProductList] 商品列表布局已解析",
320
442
  metadata
321
443
  });
322
- } catch (_unused) {}
444
+ } catch (_unused7) {}
323
445
  }, [
324
446
  businessCode,
325
447
  controlledProductListPreferences,
@@ -505,13 +627,13 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
505
627
  const productId = String((_ref6 = (_product$id = product === null || product === void 0 ? void 0 : product.id) !== null && _product$id !== void 0 ? _product$id : product === null || product === void 0 ? void 0 : product.product_id) !== null && _ref6 !== void 0 ? _ref6 : "");
506
628
  const baselineQuantity = phoneCartProductEntries.filter((entry) => resolvePhoneCartProductId(entry.value) === productId).reduce((total, entry) => total + entry.quantity, 0);
507
629
  try {
508
- var _sales$tempOrder4, _logger$addLog2, _cart$items$length, _cart$items, _cart$bookings$length, _cart$bookings, _ref7, _sales$tempOrder$orde, _sales$tempOrder5;
630
+ var _sales$tempOrder4, _logger$addLog4, _cart$items$length, _cart$items, _cart$bookings$length, _cart$bookings, _ref7, _sales$tempOrder$orde, _sales$tempOrder5;
509
631
  if (!(yield businessAvailability.ensureCanShop())) return;
510
632
  if (!sales.isReady) return;
511
633
  if (requiredOrderId !== void 0 && Number((_sales$tempOrder4 = sales.tempOrder) === null || _sales$tempOrder4 === void 0 ? void 0 : _sales$tempOrder4.order_id) !== Number(requiredOrderId)) return;
512
634
  const latestProduct = currentProducts.find((currentProduct) => currentProduct.id === product.id);
513
635
  latestProduct && require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, product), {}, { cartDetailValue: latestProduct.cartDetailValue });
514
- logger === null || logger === void 0 || (_logger$addLog2 = logger.addLog) === null || _logger$addLog2 === void 0 || _logger$addLog2.call(logger, {
636
+ logger === null || logger === void 0 || (_logger$addLog4 = logger.addLog) === null || _logger$addLog4 === void 0 || _logger$addLog4.call(logger, {
515
637
  type: "info",
516
638
  title: "[BigSaleProductList] 用户点击商品卡片加入购物车",
517
639
  metadata: {
@@ -1025,39 +1147,68 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
1025
1147
  setSettingsOpen(false);
1026
1148
  });
1027
1149
  const handleSaveSettings = (0, ahooks.useMemoizedFn)((preferences) => {
1028
- require_productListPreferences.writeBigSaleProductListPreferences(preferencesKey, preferences);
1150
+ const cacheWriteSucceeded = require_productListPreferences.writeBigSaleProductListPreferences(preferencesKey, preferences);
1151
+ const persistedPreferences = cacheWriteSucceeded ? require_productListPreferences.readStoredBigSaleProductListPreferences(preferencesKey, defaultProductListPreferences) : void 0;
1029
1152
  setUncontrolledProductListPreferences(preferences);
1030
1153
  setUncontrolledProductListPreferencesKey(preferencesKey);
1031
1154
  setUncontrolledProductListPreferencesOverride(true);
1155
+ const metadata = {
1156
+ eventVersion: 1,
1157
+ action: "save-completed",
1158
+ mode,
1159
+ businessCode: businessCode !== null && businessCode !== void 0 ? businessCode : null,
1160
+ osKey: osKey !== null && osKey !== void 0 ? osKey : null,
1161
+ channel: productListPreferencesChannel !== null && productListPreferencesChannel !== void 0 ? productListPreferencesChannel : null,
1162
+ operator,
1163
+ variant: variant !== null && variant !== void 0 ? variant : null,
1164
+ pathname: getCurrentRoutePath(),
1165
+ storageKey: preferencesKey,
1166
+ cacheWriteSucceeded,
1167
+ persistedPreferences: persistedPreferences !== null && persistedPreferences !== void 0 ? persistedPreferences : null,
1168
+ preferences
1169
+ };
1032
1170
  try {
1033
- var _logger$addLog3;
1034
- logger === null || logger === void 0 || (_logger$addLog3 = logger.addLog) === null || _logger$addLog3 === void 0 || _logger$addLog3.call(logger, {
1171
+ var _logger$addLog5;
1172
+ logger === null || logger === void 0 || (_logger$addLog5 = logger.addLog) === null || _logger$addLog5 === void 0 || _logger$addLog5.call(logger, {
1035
1173
  type: "info",
1036
1174
  title: "[BigSaleProductList] 商品列表布局设置已保存",
1037
- metadata: {
1038
- mode,
1039
- businessCode: businessCode !== null && businessCode !== void 0 ? businessCode : null,
1040
- variant: variant !== null && variant !== void 0 ? variant : null,
1041
- pathname: getCurrentRoutePath(),
1042
- columns: preferences.columns,
1043
- cardLayoutDirection: preferences.layoutDirection,
1044
- showImage: preferences.showImage,
1045
- imageWidth: preferences.imageWidth,
1046
- imageHeight: preferences.imageHeight
1047
- }
1175
+ metadata
1048
1176
  });
1049
- } catch (_unused2) {}
1177
+ } catch (_unused8) {}
1050
1178
  onProductListPreferencesChange === null || onProductListPreferencesChange === void 0 || onProductListPreferencesChange(preferences);
1051
1179
  setSettingsOpen(false);
1052
1180
  });
1181
+ const handleSettingsSaveAttempt = (0, ahooks.useMemoizedFn)((preferences) => {
1182
+ const metadata = {
1183
+ eventVersion: 1,
1184
+ action: "save-clicked",
1185
+ mode,
1186
+ businessCode: businessCode !== null && businessCode !== void 0 ? businessCode : null,
1187
+ osKey: osKey !== null && osKey !== void 0 ? osKey : null,
1188
+ channel: productListPreferencesChannel !== null && productListPreferencesChannel !== void 0 ? productListPreferencesChannel : null,
1189
+ variant: variant !== null && variant !== void 0 ? variant : null,
1190
+ pathname: getCurrentRoutePath(),
1191
+ storageKey: preferencesKey,
1192
+ operator,
1193
+ preferences
1194
+ };
1195
+ try {
1196
+ var _logger$addLog6;
1197
+ logger === null || logger === void 0 || (_logger$addLog6 = logger.addLog) === null || _logger$addLog6 === void 0 || _logger$addLog6.call(logger, {
1198
+ type: "info",
1199
+ title: "[BigSaleProductList] 商品卡配置弹窗点击保存",
1200
+ metadata
1201
+ });
1202
+ } catch (_unused9) {}
1203
+ });
1053
1204
  const handleResetSettings = (0, ahooks.useMemoizedFn)(() => {
1054
1205
  require_productListPreferences.removeBigSaleProductListPreferences(preferencesKey);
1055
1206
  setUncontrolledProductListPreferences(defaultProductListPreferences);
1056
1207
  setUncontrolledProductListPreferencesKey(preferencesKey);
1057
1208
  setUncontrolledProductListPreferencesOverride(false);
1058
1209
  try {
1059
- var _logger$addLog4;
1060
- logger === null || logger === void 0 || (_logger$addLog4 = logger.addLog) === null || _logger$addLog4 === void 0 || _logger$addLog4.call(logger, {
1210
+ var _logger$addLog7;
1211
+ logger === null || logger === void 0 || (_logger$addLog7 = logger.addLog) === null || _logger$addLog7 === void 0 || _logger$addLog7.call(logger, {
1061
1212
  type: "info",
1062
1213
  title: "[BigSaleProductList] 商品列表布局设置已重置",
1063
1214
  metadata: {
@@ -1069,7 +1220,7 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
1069
1220
  cardLayoutDirection: defaultProductListPreferences.layoutDirection
1070
1221
  }
1071
1222
  });
1072
- } catch (_unused3) {}
1223
+ } catch (_unused10) {}
1073
1224
  onProductListPreferencesReset === null || onProductListPreferencesReset === void 0 || onProductListPreferencesReset(defaultProductListPreferences);
1074
1225
  setSettingsOpen(false);
1075
1226
  });
@@ -1279,6 +1430,7 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
1279
1430
  variant,
1280
1431
  fullWidthActions: categoryNavigation === "sidebar",
1281
1432
  onCancel: handleCloseSettings,
1433
+ onSaveAttempt: handleSettingsSaveAttempt,
1282
1434
  onSave: handleSaveSettings,
1283
1435
  onSaveAuto: handleResetSettings
1284
1436
  }) : null), [
@@ -1296,6 +1448,7 @@ const BigSaleProductListInner = ({ renderContent, className, renderProductCard,
1296
1448
  handleOpenSettings,
1297
1449
  handleResetSettings,
1298
1450
  handleSaveSettings,
1451
+ handleSettingsSaveAttempt,
1299
1452
  defaultProductListPreferences,
1300
1453
  purchaseDisabled,
1301
1454
  listData,
@@ -17,7 +17,7 @@ function getPlatformByVariant(variant) {
17
17
  /**
18
18
  * Big Sale 商品卡片设置弹窗,只负责编辑当前页面本地偏好。
19
19
  */
20
- const BigSaleProductListSettingsModal = ({ open, preferences, autoPreferences, isAutoMode, variant, fullWidthActions = false, onCancel, onSave, onSaveAuto }) => {
20
+ const BigSaleProductListSettingsModal = ({ open, preferences, autoPreferences, isAutoMode, variant, fullWidthActions = false, onCancel, onSaveAttempt, onSave, onSaveAuto }) => {
21
21
  const [form] = antd.Form.useForm();
22
22
  const isPhoneVariant = variant === "phone";
23
23
  const [preferenceMode, setPreferenceMode] = (0, react.useState)(isAutoMode ? "auto" : "custom");
@@ -46,7 +46,7 @@ const BigSaleProductListSettingsModal = ({ open, preferences, autoPreferences, i
46
46
  return;
47
47
  }
48
48
  const values = yield form.validateFields();
49
- onSave({
49
+ const nextPreferences = {
50
50
  columns: values.columns,
51
51
  layoutDirection: values.layoutDirection,
52
52
  showImage: values.showImage,
@@ -58,7 +58,9 @@ const BigSaleProductListSettingsModal = ({ open, preferences, autoPreferences, i
58
58
  imageHeight: values.imageHeight,
59
59
  imageObjectFit: values.imageObjectFit,
60
60
  saleDetailWidth: values.saleDetailWidth
61
- });
61
+ };
62
+ onSaveAttempt === null || onSaveAttempt === void 0 || onSaveAttempt(nextPreferences);
63
+ onSave(nextPreferences);
62
64
  });
63
65
  return function handleSave() {
64
66
  return _ref.apply(this, arguments);
@@ -266,11 +266,14 @@ function readBigSaleProductListPreferences(key, defaultPreferences = DEFAULT_BIG
266
266
  return readStoredBigSaleProductListPreferences(key, normalizedDefault) || normalizedDefault;
267
267
  }
268
268
  function writeBigSaleProductListPreferences(key, preferences) {
269
- if (typeof localStorage === "undefined") return;
269
+ if (typeof localStorage === "undefined") return false;
270
270
  const normalized = normalizePreferences(preferences, void 0, true);
271
271
  try {
272
272
  localStorage.setItem(key, JSON.stringify(normalized || DEFAULT_BIG_SALE_PRODUCT_LIST_PREFERENCES));
273
- } catch (_unused2) {}
273
+ return true;
274
+ } catch (_unused2) {
275
+ return false;
276
+ }
274
277
  }
275
278
  function removeBigSaleProductListPreferences(key) {
276
279
  if (typeof localStorage === "undefined") return;