@pisell/private-materials 6.12.319 → 6.12.320

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 (52) 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 +1 -0
  8. package/es/components/bigSale/components/ProductList/index.js +1 -0
  9. package/es/components/bigSale/components/TimeBar/index.js +1 -0
  10. package/es/components/bigSale/dialog.js +1 -0
  11. package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
  12. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
  13. package/es/components/bigSale/index.js +1 -0
  14. package/es/components/bigSale/templates/Kiosk/KioskFulfillmentModal.js +7 -1
  15. package/es/components/bigSale/templates/Kiosk/KioskFulfillmentReference.js +22 -4
  16. package/es/components/bigSale/templates/Kiosk/index.js +1 -0
  17. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
  18. package/es/index.js +2 -0
  19. package/es/plus/multiCurrencySettlement/index.js +1 -1
  20. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  21. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  22. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  23. package/es/plus/pisellReservation/index.js +17 -0
  24. package/es/plus/saleDetail/Base.js +1 -0
  25. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
  26. package/es/plus/saleDetail/components/DetailActions/PrintAction.js +1 -0
  27. package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
  28. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
  29. package/es/plus/saleDetail/index.js +1 -0
  30. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
  31. package/es/plus/saleDetail/tmpl/B/index.js +1 -0
  32. package/es/plus/salesSdk/components/FulfillmentReferenceModal.js +29 -6
  33. package/es/plus/salesSdk/components/FulfillmentTiming/index.js +2 -1
  34. package/es/plus/salesSdk/components/FulfillmentTiming/locales.js +10 -0
  35. package/es/plus/salesSdk/index.js +54 -0
  36. package/es/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +9 -4
  37. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  38. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  39. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  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/skuDetailModal/flow/locales.js +6 -0
  44. package/lib/components/bigSale/templates/Kiosk/KioskFulfillmentModal.js +7 -1
  45. package/lib/components/bigSale/templates/Kiosk/KioskFulfillmentReference.js +22 -4
  46. package/lib/plus/salesSdk/components/FulfillmentReferenceModal.js +29 -6
  47. package/lib/plus/salesSdk/components/FulfillmentTiming/index.js +2 -1
  48. package/lib/plus/salesSdk/components/FulfillmentTiming/locales.js +10 -0
  49. package/lib/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +9 -4
  50. package/lib/pro/skuDetailModal/flow/locales.js +6 -0
  51. package/package.json +3 -3
  52. package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
@@ -249,10 +249,15 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
249
249
  const [preparedOpen, setPreparedOpen] = useState(null);
250
250
  const [hydratedHolderContext, setHydratedHolderContext] = useState(null);
251
251
  const showHostError = useMemoizedFn((error) => {
252
- var _details, _Toast$fail3;
252
+ var _details, _Toast$fail4;
253
253
  const message = error instanceof Error ? error.message : "商品选择初始化失败。";
254
+ if (message === "缓存重校验后资源已不可提交") {
255
+ var _Toast$fail3;
256
+ Toast === null || Toast === void 0 || (_Toast$fail3 = Toast.fail) === null || _Toast$fail3 === void 0 || _Toast$fail3.call(Toast, locales.getText("pisell2.text.sku.detail.modal.validation.resource.commit.failed"));
257
+ return;
258
+ }
254
259
  const isResourceCapacityExceeded = Boolean(error === null || error === void 0 || (_details = error.details) === null || _details === void 0 || (_details = _details.validation) === null || _details === void 0 || (_details = _details.conflicts) === null || _details === void 0 ? void 0 : _details.some((conflict) => (conflict === null || conflict === void 0 ? void 0 : conflict.code) === "resource_capacity_exceeded"));
255
- Toast === null || Toast === void 0 || (_Toast$fail3 = Toast.fail) === null || _Toast$fail3 === void 0 || _Toast$fail3.call(Toast, isResourceCapacityExceeded ? message : `商品选择失败:${message}`);
260
+ Toast === null || Toast === void 0 || (_Toast$fail4 = Toast.fail) === null || _Toast$fail4 === void 0 || _Toast$fail4.call(Toast, isResourceCapacityExceeded ? message : `商品选择失败:${message}`);
256
261
  });
257
262
  useEffect(() => () => {
258
263
  if (bridge.getSnapshot()) bridge.complete(null);
@@ -767,10 +772,10 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
767
772
  autoApply: !isEditing && (detailPayload === null || detailPayload === void 0 ? void 0 : detailPayload._rememberTimeAutoApply) !== false,
768
773
  onToggle: (enabled) => {
769
774
  try {
770
- var _Toast$fail4;
775
+ var _Toast$fail5;
771
776
  assertRememberedIntent();
772
777
  const result = setRememberedTimeEnabled(scope, enabled);
773
- if (!result.ok) Toast === null || Toast === void 0 || (_Toast$fail4 = Toast.fail) === null || _Toast$fail4 === void 0 || _Toast$fail4.call(Toast, "The time preference could not be saved.");
778
+ if (!result.ok) Toast === null || Toast === void 0 || (_Toast$fail5 = Toast.fail) === null || _Toast$fail5 === void 0 || _Toast$fail5.call(Toast, "The time preference could not be saved.");
774
779
  return result.ok;
775
780
  } catch (error) {
776
781
  showHostError(error);
@@ -389,4 +389,4 @@ function createAddProductWithFlowDebounced(deps) {
389
389
  };
390
390
  }
391
391
  //#endregion
392
- export { createAddProductWithFlowDebounced };
392
+ export { createAddProductWithFlowDebounced, shouldBypassAddProductDebounce };
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
31
31
  return typeof off === "function" ? off : () => {};
32
32
  }
33
33
  //#endregion
34
- export { formatBookingDateTime, subscribeBookingDateChange };
34
+ export { BOOKING_CONTEXT_DATE_EVENT, formatBookingDateTime, subscribeBookingDateChange };
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
71
71
  });
72
72
  }
73
73
  //#endregion
74
- export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, resolveHolderDisplayConfig };
74
+ export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
@@ -14,4 +14,4 @@ interface AuthModalProps {
14
14
  */
15
15
  declare const AuthModal: React.FC<AuthModalProps>;
16
16
  //#endregion
17
- export { AuthModal, AuthModalProps };
17
+ export { AuthModal };
@@ -1,4 +1,4 @@
1
- import { AuthMethodType, VerificationMethod } from "./shared/types.js";
1
+ import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, 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, AuthModalProps } from "./AuthModal.js";
4
+ import { AuthModal } from "./AuthModal.js";
@@ -226,4 +226,4 @@ interface RegisterFormData {
226
226
  verification_token?: string;
227
227
  }
228
228
  //#endregion
229
- export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
229
+ export { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
@@ -14,6 +14,7 @@ const keys = {
14
14
  /** Selection Flow 专属语言包;与旧 SkuDetailModal 文案分开,便于模块复用。 */
15
15
  var locales_default = {
16
16
  en: {
17
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "Product selection failed: The selected resource could not be booked. Please review your selection.",
17
18
  "pisell2.text.sku.detail.modal.remember.time": "Remember selected time",
18
19
  "pisell2.text.sku.detail.modal.remember.description": "Reuse this time when selecting this product again. If it is no longer available, select a new time.",
19
20
  "pisell2.text.sku.detail.modal.remember.save.failed": "The preference could not be saved. Please try again.",
@@ -97,6 +98,7 @@ var locales_default = {
97
98
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "Failed to validate availability for the new quantity. Please try again."
98
99
  },
99
100
  "zh-CN": {
101
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品选择失败:所选资源无法预订,请检查资源选择后重试。",
100
102
  "pisell2.text.sku.detail.modal.remember.time": "记住所选时间",
101
103
  "pisell2.text.sku.detail.modal.remember.description": "后续选择此商品时复用所选时间;该时间不可用时,请重新选择。",
102
104
  "pisell2.text.sku.detail.modal.remember.save.failed": "偏好保存失败,请重试。",
@@ -180,6 +182,7 @@ var locales_default = {
180
182
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新数量的预约可用性校验失败,请重试。"
181
183
  },
182
184
  "zh-HK": {
185
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品選擇失敗:所選資源無法預訂,請檢查資源選擇後重試。",
183
186
  "pisell2.text.sku.detail.modal.remember.time": "記住所選時間",
184
187
  "pisell2.text.sku.detail.modal.remember.description": "後續選擇此商品時沿用所選時間;該時間不可用時,請重新選擇。",
185
188
  "pisell2.text.sku.detail.modal.remember.save.failed": "偏好儲存失敗,請重試。",
@@ -263,6 +266,7 @@ var locales_default = {
263
266
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新數量的預約可用性校驗失敗,請重試。"
264
267
  },
265
268
  "zh-TW": {
269
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品選擇失敗:所選資源無法預訂,請檢查資源選擇後重試。",
266
270
  "pisell2.text.sku.detail.modal.remember.time": "記住所選時間",
267
271
  "pisell2.text.sku.detail.modal.remember.description": "後續選擇此商品時沿用所選時間;該時間不可用時,請重新選擇。",
268
272
  "pisell2.text.sku.detail.modal.remember.save.failed": "偏好儲存失敗,請重試。",
@@ -274,6 +278,7 @@ var locales_default = {
274
278
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新數量的預約可用性校驗失敗,請重試。"
275
279
  },
276
280
  ja: {
281
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品を選択できませんでした。選択したリソースを予約できません。選択内容をご確認ください。",
277
282
  "pisell2.text.sku.detail.modal.remember.time": "選択した時刻を記憶",
278
283
  "pisell2.text.sku.detail.modal.remember.description": "次回この商品を選ぶときに時刻を再利用します。利用できない場合は選び直してください。",
279
284
  "pisell2.text.sku.detail.modal.remember.save.failed": "設定を保存できませんでした。もう一度お試しください。",
@@ -354,6 +359,7 @@ var locales_default = {
354
359
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新しい数量の空き状況を確認できませんでした。もう一度お試しください。"
355
360
  },
356
361
  pt: {
362
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "Falha na seleção do produto: não foi possível reservar o recurso selecionado. Verifique a sua seleção.",
357
363
  "pisell2.text.sku.detail.modal.remember.time": "Lembrar horário selecionado",
358
364
  "pisell2.text.sku.detail.modal.remember.description": "Reutilizar este horário ao selecionar o produto novamente. Se não estiver disponível, selecione outro.",
359
365
  "pisell2.text.sku.detail.modal.remember.save.failed": "Não foi possível salvar a preferência. Tente novamente.",
@@ -13,6 +13,7 @@ require("./KioskFulfillmentModal.less");
13
13
  const COPY = {
14
14
  en: {
15
15
  title: "Order fulfillment",
16
+ roomServiceTitle: "Room Service",
16
17
  cancel: "Cancel",
17
18
  continue: "Continue to checkout",
18
19
  loading: "Loading order fulfillment…",
@@ -20,6 +21,7 @@ const COPY = {
20
21
  },
21
22
  "zh-CN": {
22
23
  title: "取餐信息",
24
+ roomServiceTitle: "客房送餐",
23
25
  cancel: "取消",
24
26
  continue: "继续结账",
25
27
  loading: "正在加载取餐信息…",
@@ -27,6 +29,7 @@ const COPY = {
27
29
  },
28
30
  "zh-HK": {
29
31
  title: "取餐資訊",
32
+ roomServiceTitle: "客房送餐",
30
33
  cancel: "取消",
31
34
  continue: "繼續結帳",
32
35
  loading: "正在載入取餐資訊…",
@@ -34,6 +37,7 @@ const COPY = {
34
37
  },
35
38
  ja: {
36
39
  title: "受け取り情報",
40
+ roomServiceTitle: "ルームサービス",
37
41
  cancel: "キャンセル",
38
42
  continue: "お会計へ進む",
39
43
  loading: "受け取り情報を読み込み中…",
@@ -41,6 +45,7 @@ const COPY = {
41
45
  },
42
46
  pt: {
43
47
  title: "Recebimento do pedido",
48
+ roomServiceTitle: "Serviço de quarto",
44
49
  cancel: "Cancelar",
45
50
  continue: "Continuar para pagamento",
46
51
  loading: "Carregando informações do pedido…",
@@ -66,7 +71,7 @@ function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, s
66
71
  }, [open]);
67
72
  return /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellModal, {
68
73
  open,
69
- title: copy.title,
74
+ title: (selection === null || selection === void 0 ? void 0 : selection.serviceType) === "room_service" ? copy.roomServiceTitle : copy.title,
70
75
  platform: mobile ? "h5" : "pc",
71
76
  width: 720,
72
77
  mobileModalHeight: "auto",
@@ -119,6 +124,7 @@ function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, s
119
124
  onStateChange: setPanelState
120
125
  }) : null, (config === null || config === void 0 ? void 0 : config.fulfillmentRefMode) === "manual_input" ? /* @__PURE__ */ react.default.createElement(require_KioskFulfillmentReference.default, {
121
126
  value: reference,
127
+ serviceType: selection === null || selection === void 0 ? void 0 : selection.serviceType,
122
128
  manualInputType: config.manualInputType,
123
129
  disabled: saving,
124
130
  onChange: onReferenceChange,
@@ -12,6 +12,9 @@ const COPY = {
12
12
  placeholder: "Enter a name or number",
13
13
  nameDescription: "Enter the name we should call when your order is ready.",
14
14
  namePlaceholder: "Enter your pickup name",
15
+ roomServiceTitle: "Enter your room number and name",
16
+ roomServiceDescription: "We’ll use these details to deliver your order to the right room.",
17
+ roomServicePlaceholder: "e.g. 1208, John",
15
18
  clear: "Clear"
16
19
  },
17
20
  "zh-CN": {
@@ -20,6 +23,9 @@ const COPY = {
20
23
  placeholder: "请输入名称或编号",
21
24
  nameDescription: "请输入取餐姓名,方便订单完成时叫号。",
22
25
  namePlaceholder: "请输入取餐姓名",
26
+ roomServiceTitle: "请输入您的房间号和姓名",
27
+ roomServiceDescription: "我们将根据这些信息把订单送到正确的房间",
28
+ roomServicePlaceholder: "例如:1208, John",
23
29
  clear: "清除"
24
30
  },
25
31
  "zh-HK": {
@@ -28,6 +34,9 @@ const COPY = {
28
34
  placeholder: "請輸入名稱或編號",
29
35
  nameDescription: "請輸入取餐姓名,方便訂單完成時叫號。",
30
36
  namePlaceholder: "請輸入取餐姓名",
37
+ roomServiceTitle: "請輸入您的房間號和姓名",
38
+ roomServiceDescription: "我們將根據這些資訊把訂單送到正確的房間",
39
+ roomServicePlaceholder: "例如:1208, John",
31
40
  clear: "清除"
32
41
  },
33
42
  ja: {
@@ -36,6 +45,9 @@ const COPY = {
36
45
  placeholder: "名前または番号を入力",
37
46
  nameDescription: "注文の準備ができた際にお呼びするお名前を入力してください。",
38
47
  namePlaceholder: "受け取り時のお名前を入力",
48
+ roomServiceTitle: "お部屋番号とお名前を入力してください",
49
+ roomServiceDescription: "ご入力いただいた情報をもとに、ご注文の商品を正しいお部屋へお届けします。",
50
+ roomServicePlaceholder: "例:1208, John",
39
51
  clear: "クリア"
40
52
  },
41
53
  pt: {
@@ -44,31 +56,37 @@ const COPY = {
44
56
  placeholder: "Insira um nome ou número",
45
57
  nameDescription: "Insira o nome que devemos chamar quando seu pedido estiver pronto.",
46
58
  namePlaceholder: "Insira o nome para retirada",
59
+ roomServiceTitle: "Introduza o número do seu quarto e o seu nome",
60
+ roomServiceDescription: "Usaremos estas informações para entregar o seu pedido no quarto certo.",
61
+ roomServicePlaceholder: "Ex.: 1208, John",
47
62
  clear: "Limpar"
48
63
  }
49
64
  };
50
65
  /** Controlled customer input; persistence and checkout ordering belong to the host. */
51
- function KioskFulfillmentReference({ value, manualInputType, disabled = false, error, onChange, onBlur, onClear, onCompositionStart, onCompositionEnd }) {
66
+ function KioskFulfillmentReference({ value, serviceType, manualInputType, disabled = false, error, onChange, onBlur, onClear, onCompositionStart, onCompositionEnd }) {
52
67
  const locale = String(require_useLocale.default()).replace(/_/g, "-").toLowerCase();
53
68
  const copy = locale.startsWith("zh") ? /^zh-(hk|tw|hant)/.test(locale) ? COPY["zh-HK"] : COPY["zh-CN"] : locale.startsWith("ja") ? COPY.ja : locale.startsWith("pt") ? COPY.pt : COPY.en;
54
69
  const id = require_useStableInstanceId.default("kiosk-fulfillment-reference");
55
70
  const inputId = `${id}-reference`;
56
71
  const hintId = `${id}-hint`;
57
72
  const errorId = `${id}-error`;
73
+ const isRoomService = serviceType === "room_service";
58
74
  const isCustomerName = manualInputType === "customer_name";
75
+ const description = isRoomService ? copy.roomServiceDescription : isCustomerName ? copy.nameDescription : copy.description;
76
+ const placeholder = isRoomService ? copy.roomServicePlaceholder : isCustomerName ? copy.namePlaceholder : copy.placeholder;
59
77
  return /* @__PURE__ */ react.default.createElement("section", { className: "pisell-kiosk-fulfillment-reference" }, /* @__PURE__ */ react.default.createElement("label", {
60
78
  className: "pisell-kiosk-fulfillment-reference__title",
61
79
  htmlFor: inputId
62
- }, copy.title), /* @__PURE__ */ react.default.createElement("p", {
80
+ }, isRoomService ? copy.roomServiceTitle : copy.title), /* @__PURE__ */ react.default.createElement("p", {
63
81
  className: "pisell-kiosk-fulfillment-reference__description",
64
82
  id: hintId
65
- }, isCustomerName ? copy.nameDescription : copy.description), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-fulfillment-reference__input-row" }, /* @__PURE__ */ react.default.createElement("input", {
83
+ }, description), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-fulfillment-reference__input-row" }, /* @__PURE__ */ react.default.createElement("input", {
66
84
  id: inputId,
67
85
  className: "pisell-kiosk-fulfillment-reference__input",
68
86
  type: "text",
69
87
  value,
70
88
  disabled,
71
- placeholder: isCustomerName ? copy.namePlaceholder : copy.placeholder,
89
+ placeholder,
72
90
  "aria-describedby": error ? `${hintId} ${errorId}` : hintId,
73
91
  "aria-invalid": Boolean(error),
74
92
  onChange: (event) => onChange(event.currentTarget.value),
@@ -1,7 +1,9 @@
1
1
  const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
2
2
  const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
3
3
  const require_index = require("../../../pro/compensatedPisellContainer/index.js");
4
+ const require_useLocale = require("../../../hooks/useLocale.js");
4
5
  const require_useInitLocalesOnce = require("../../../hooks/useInitLocalesOnce.js");
6
+ const require_messages = require("./FulfillmentTiming/messages.js");
5
7
  const require_index$1 = require("./FulfillmentTiming/index.js");
6
8
  let react = require("react");
7
9
  react = require_runtime.__toESM(react);
@@ -18,6 +20,9 @@ const FULFILLMENT_REFERENCE_LOCALES = {
18
20
  "pisell2.sales-sdk.fulfillment-reference.input-placeholder": "Enter a reference",
19
21
  "pisell2.sales-sdk.fulfillment-reference.clear": "Clear",
20
22
  "pisell2.sales-sdk.fulfillment-reference.hint": "Enter a name or number to identify this order.",
23
+ "pisell2.sales-sdk.fulfillment-reference.room-service.field-label": "Enter your room number and name",
24
+ "pisell2.sales-sdk.fulfillment-reference.room-service.description": "We’ll use these details to deliver your order to the right room.",
25
+ "pisell2.sales-sdk.fulfillment-reference.room-service.input-placeholder": "e.g. 1208, John",
21
26
  "pisell2.sales-sdk.fulfillment-reference.cancel": "Cancel",
22
27
  "pisell2.sales-sdk.fulfillment-reference.continue-checkout": "Continue & Checkout"
23
28
  },
@@ -30,6 +35,9 @@ const FULFILLMENT_REFERENCE_LOCALES = {
30
35
  "pisell2.sales-sdk.fulfillment-reference.input-placeholder": "请输入履约标识",
31
36
  "pisell2.sales-sdk.fulfillment-reference.clear": "清除",
32
37
  "pisell2.sales-sdk.fulfillment-reference.hint": "输入用于识别此订单的名称或编号。",
38
+ "pisell2.sales-sdk.fulfillment-reference.room-service.field-label": "请输入您的房间号和姓名",
39
+ "pisell2.sales-sdk.fulfillment-reference.room-service.description": "我们将根据这些信息把订单送到正确的房间",
40
+ "pisell2.sales-sdk.fulfillment-reference.room-service.input-placeholder": "例如:1208, John",
33
41
  "pisell2.sales-sdk.fulfillment-reference.cancel": "取消",
34
42
  "pisell2.sales-sdk.fulfillment-reference.continue-checkout": "继续结账"
35
43
  },
@@ -42,6 +50,9 @@ const FULFILLMENT_REFERENCE_LOCALES = {
42
50
  "pisell2.sales-sdk.fulfillment-reference.input-placeholder": "請輸入履約標識",
43
51
  "pisell2.sales-sdk.fulfillment-reference.clear": "清除",
44
52
  "pisell2.sales-sdk.fulfillment-reference.hint": "輸入用於識別此訂單的名稱或編號。",
53
+ "pisell2.sales-sdk.fulfillment-reference.room-service.field-label": "請輸入您的房間號和姓名",
54
+ "pisell2.sales-sdk.fulfillment-reference.room-service.description": "我們將根據這些資訊把訂單送到正確的房間",
55
+ "pisell2.sales-sdk.fulfillment-reference.room-service.input-placeholder": "例如:1208, John",
45
56
  "pisell2.sales-sdk.fulfillment-reference.cancel": "取消",
46
57
  "pisell2.sales-sdk.fulfillment-reference.continue-checkout": "繼續結帳"
47
58
  },
@@ -54,6 +65,9 @@ const FULFILLMENT_REFERENCE_LOCALES = {
54
65
  "pisell2.sales-sdk.fulfillment-reference.input-placeholder": "受け取り識別子を入力",
55
66
  "pisell2.sales-sdk.fulfillment-reference.clear": "クリア",
56
67
  "pisell2.sales-sdk.fulfillment-reference.hint": "この注文を識別するための名前または番号を入力してください。",
68
+ "pisell2.sales-sdk.fulfillment-reference.room-service.field-label": "お部屋番号とお名前を入力してください",
69
+ "pisell2.sales-sdk.fulfillment-reference.room-service.description": "ご入力いただいた情報をもとに、ご注文の商品を正しいお部屋へお届けします。",
70
+ "pisell2.sales-sdk.fulfillment-reference.room-service.input-placeholder": "例:1208, John",
57
71
  "pisell2.sales-sdk.fulfillment-reference.cancel": "キャンセル",
58
72
  "pisell2.sales-sdk.fulfillment-reference.continue-checkout": "会計へ進む"
59
73
  },
@@ -66,13 +80,22 @@ const FULFILLMENT_REFERENCE_LOCALES = {
66
80
  "pisell2.sales-sdk.fulfillment-reference.input-placeholder": "Insira uma referência de atendimento",
67
81
  "pisell2.sales-sdk.fulfillment-reference.clear": "Limpar",
68
82
  "pisell2.sales-sdk.fulfillment-reference.hint": "Insira um nome ou número para identificar este pedido.",
83
+ "pisell2.sales-sdk.fulfillment-reference.room-service.field-label": "Introduza o número do seu quarto e o seu nome",
84
+ "pisell2.sales-sdk.fulfillment-reference.room-service.description": "Usaremos estas informações para entregar o seu pedido no quarto certo.",
85
+ "pisell2.sales-sdk.fulfillment-reference.room-service.input-placeholder": "Ex.: 1208, John",
69
86
  "pisell2.sales-sdk.fulfillment-reference.cancel": "Cancelar",
70
87
  "pisell2.sales-sdk.fulfillment-reference.continue-checkout": "Continuar para o checkout"
71
88
  }
72
89
  };
73
90
  /** BigSale 下单共用的取餐方式、时间和手动标识弹窗;确认后由 action runtime 写入。 */
74
91
  const FulfillmentReferenceModal = ({ open, value, customerName, canUseCustomer, saving = false, referenceEnabled = true, pickupTiming, onChange, onCancel, onContinue }) => {
75
- require_useInitLocalesOnce.default(FULFILLMENT_REFERENCE_LOCALES);
92
+ const locale = require_useLocale.default();
93
+ require_useInitLocalesOnce.default(FULFILLMENT_REFERENCE_LOCALES, locale);
94
+ const isRoomService = (pickupTiming === null || pickupTiming === void 0 ? void 0 : pickupTiming.value.serviceType) === "room_service";
95
+ const referenceTextPrefix = isRoomService ? "pisell2.sales-sdk.fulfillment-reference.room-service" : "pisell2.sales-sdk.fulfillment-reference";
96
+ const fieldLabel = _pisell_utils.locales.getText(`${referenceTextPrefix}.field-label`);
97
+ const description = _pisell_utils.locales.getText(`${referenceTextPrefix}.description`);
98
+ const placeholder = _pisell_utils.locales.getText(`${referenceTextPrefix}.input-placeholder`);
76
99
  const [inputSource, setInputSource] = (0, react.useState)("manual");
77
100
  const [timingState, setTimingState] = (0, react.useState)({ loading: false });
78
101
  (0, react.useEffect)(() => {
@@ -91,7 +114,7 @@ const FulfillmentReferenceModal = ({ open, value, customerName, canUseCustomer,
91
114
  destroyOnClose: true,
92
115
  maskClosable: false,
93
116
  zIndex: 2100,
94
- title: _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.title"),
117
+ title: isRoomService ? require_messages.getFulfillmentText("pisell2.fulfillment.room_service", locale) : _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.title"),
95
118
  className: "pisell-fulfillment-reference-modal",
96
119
  headerDivider: true,
97
120
  onCancel,
@@ -111,10 +134,10 @@ const FulfillmentReferenceModal = ({ open, value, customerName, canUseCustomer,
111
134
  isPos: true,
112
135
  disabled: saving,
113
136
  onStateChange: setTimingState
114
- })) : null, referenceEnabled ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("section", { className: "pisell-fulfillment-reference__field" }, /* @__PURE__ */ react.default.createElement("h3", null, _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.field-label")), /* @__PURE__ */ react.default.createElement("p", { className: "pisell-fulfillment-reference__description" }, _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.description")), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-fulfillment-reference__card" }, null, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-fulfillment-reference__input-row" }, /* @__PURE__ */ react.default.createElement("input", {
115
- "aria-label": String(_pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.field-label")),
137
+ })) : null, referenceEnabled ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("section", { className: "pisell-fulfillment-reference__field" }, /* @__PURE__ */ react.default.createElement("h3", null, fieldLabel), /* @__PURE__ */ react.default.createElement("p", { className: "pisell-fulfillment-reference__description" }, description), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-fulfillment-reference__card" }, null, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-fulfillment-reference__input-row" }, /* @__PURE__ */ react.default.createElement("input", {
138
+ "aria-label": String(fieldLabel),
116
139
  value,
117
- placeholder: String(_pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.input-placeholder")),
140
+ placeholder: String(placeholder),
118
141
  disabled: saving,
119
142
  onChange: (event) => {
120
143
  setInputSource("manual");
@@ -128,7 +151,7 @@ const FulfillmentReferenceModal = ({ open, value, customerName, canUseCustomer,
128
151
  setInputSource("manual");
129
152
  onChange("");
130
153
  }
131
- }, _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.clear"))), /* @__PURE__ */ react.default.createElement("p", { className: "pisell-fulfillment-reference__hint" }, _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.hint"))))) : null));
154
+ }, _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.clear"))), !isRoomService ? /* @__PURE__ */ react.default.createElement("p", { className: "pisell-fulfillment-reference__hint" }, _pisell_utils.locales.getText("pisell2.sales-sdk.fulfillment-reference.hint")) : null))) : null));
132
155
  };
133
156
  //#endregion
134
157
  exports.default = FulfillmentReferenceModal;
@@ -21,7 +21,8 @@ const knownModes = new Set([
21
21
  "takeaway",
22
22
  "delivery",
23
23
  "dine_in",
24
- "table_service"
24
+ "table_service",
25
+ "room_service"
25
26
  ]);
26
27
  const serviceLabel = (mode) => knownModes.has(mode) ? text(mode) : mode.replace(/_/g, " ");
27
28
  const summary = (value) => value.date && value.time ? `${value.date} · ${value.time}` : "";
@@ -12,6 +12,8 @@ var locales_default = {
12
12
  "pisell2.fulfillment.dine_in.description": "Enjoy your order here.",
13
13
  "pisell2.fulfillment.table_service": "Table service",
14
14
  "pisell2.fulfillment.table_service.description": "Have your order brought to your table.",
15
+ "pisell2.fulfillment.room_service": "Room Service",
16
+ "pisell2.fulfillment.room_service.description": "Deliver orders to the guest’s room.",
15
17
  "pisell2.fulfillment.when": "When would you like to pick it up?",
16
18
  "pisell2.fulfillment.asap": "As soon as possible",
17
19
  "pisell2.fulfillment.fastest": "Fastest",
@@ -59,6 +61,8 @@ var locales_default = {
59
61
  "pisell2.fulfillment.dine_in.description": "在店内享用。",
60
62
  "pisell2.fulfillment.table_service": "送餐到桌",
61
63
  "pisell2.fulfillment.table_service.description": "将餐品送到您的桌前。",
64
+ "pisell2.fulfillment.room_service": "客房送餐",
65
+ "pisell2.fulfillment.room_service.description": "将订单送至客人所在房间",
62
66
  "pisell2.fulfillment.when": "您希望什么时候取餐?",
63
67
  "pisell2.fulfillment.asap": "尽快取餐",
64
68
  "pisell2.fulfillment.fastest": "最快",
@@ -106,6 +110,8 @@ var locales_default = {
106
110
  "pisell2.fulfillment.dine_in.description": "在店內享用。",
107
111
  "pisell2.fulfillment.table_service": "送餐到桌",
108
112
  "pisell2.fulfillment.table_service.description": "將餐品送到您的桌前。",
113
+ "pisell2.fulfillment.room_service": "客房送餐",
114
+ "pisell2.fulfillment.room_service.description": "將訂單送至客人所在房間",
109
115
  "pisell2.fulfillment.when": "您希望甚麼時候取餐?",
110
116
  "pisell2.fulfillment.asap": "盡快取餐",
111
117
  "pisell2.fulfillment.fastest": "最快",
@@ -153,6 +159,8 @@ var locales_default = {
153
159
  "pisell2.fulfillment.dine_in.description": "店内でお召し上がりください。",
154
160
  "pisell2.fulfillment.table_service": "テーブルサービス",
155
161
  "pisell2.fulfillment.table_service.description": "ご注文の商品をテーブルまでお届けします。",
162
+ "pisell2.fulfillment.room_service": "ルームサービス",
163
+ "pisell2.fulfillment.room_service.description": "ご注文の商品をお客様のお部屋までお届けします。",
156
164
  "pisell2.fulfillment.when": "受け取り日時をお選びください",
157
165
  "pisell2.fulfillment.asap": "できるだけ早く",
158
166
  "pisell2.fulfillment.fastest": "最短",
@@ -200,6 +208,8 @@ var locales_default = {
200
208
  "pisell2.fulfillment.dine_in.description": "Desfrute do seu pedido no local.",
201
209
  "pisell2.fulfillment.table_service": "Serviço à mesa",
202
210
  "pisell2.fulfillment.table_service.description": "Receba o seu pedido à mesa.",
211
+ "pisell2.fulfillment.room_service": "Serviço de quarto",
212
+ "pisell2.fulfillment.room_service.description": "Entregamos os pedidos no quarto do hóspede.",
203
213
  "pisell2.fulfillment.when": "Quando deseja recolher o seu pedido?",
204
214
  "pisell2.fulfillment.asap": "O mais rápido possível",
205
215
  "pisell2.fulfillment.fastest": "Mais rápido",
@@ -252,10 +252,15 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
252
252
  const [preparedOpen, setPreparedOpen] = (0, react.useState)(null);
253
253
  const [hydratedHolderContext, setHydratedHolderContext] = (0, react.useState)(null);
254
254
  const showHostError = (0, ahooks.useMemoizedFn)((error) => {
255
- var _details, _Toast$fail3;
255
+ var _details, _Toast$fail4;
256
256
  const message = error instanceof Error ? error.message : "商品选择初始化失败。";
257
+ if (message === "缓存重校验后资源已不可提交") {
258
+ var _Toast$fail3;
259
+ Toast === null || Toast === void 0 || (_Toast$fail3 = Toast.fail) === null || _Toast$fail3 === void 0 || _Toast$fail3.call(Toast, _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.validation.resource.commit.failed"));
260
+ return;
261
+ }
257
262
  const isResourceCapacityExceeded = Boolean(error === null || error === void 0 || (_details = error.details) === null || _details === void 0 || (_details = _details.validation) === null || _details === void 0 || (_details = _details.conflicts) === null || _details === void 0 ? void 0 : _details.some((conflict) => (conflict === null || conflict === void 0 ? void 0 : conflict.code) === "resource_capacity_exceeded"));
258
- Toast === null || Toast === void 0 || (_Toast$fail3 = Toast.fail) === null || _Toast$fail3 === void 0 || _Toast$fail3.call(Toast, isResourceCapacityExceeded ? message : `商品选择失败:${message}`);
263
+ Toast === null || Toast === void 0 || (_Toast$fail4 = Toast.fail) === null || _Toast$fail4 === void 0 || _Toast$fail4.call(Toast, isResourceCapacityExceeded ? message : `商品选择失败:${message}`);
259
264
  });
260
265
  (0, react.useEffect)(() => () => {
261
266
  if (bridge.getSnapshot()) bridge.complete(null);
@@ -770,10 +775,10 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
770
775
  autoApply: !isEditing && (detailPayload === null || detailPayload === void 0 ? void 0 : detailPayload._rememberTimeAutoApply) !== false,
771
776
  onToggle: (enabled) => {
772
777
  try {
773
- var _Toast$fail4;
778
+ var _Toast$fail5;
774
779
  assertRememberedIntent();
775
780
  const result = require_rememberedTime.setRememberedTimeEnabled(scope, enabled);
776
- if (!result.ok) Toast === null || Toast === void 0 || (_Toast$fail4 = Toast.fail) === null || _Toast$fail4 === void 0 || _Toast$fail4.call(Toast, "The time preference could not be saved.");
781
+ if (!result.ok) Toast === null || Toast === void 0 || (_Toast$fail5 = Toast.fail) === null || _Toast$fail5 === void 0 || _Toast$fail5.call(Toast, "The time preference could not be saved.");
777
782
  return result.ok;
778
783
  } catch (error) {
779
784
  showHostError(error);
@@ -14,6 +14,7 @@ const keys = {
14
14
  /** Selection Flow 专属语言包;与旧 SkuDetailModal 文案分开,便于模块复用。 */
15
15
  var locales_default = {
16
16
  en: {
17
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "Product selection failed: The selected resource could not be booked. Please review your selection.",
17
18
  "pisell2.text.sku.detail.modal.remember.time": "Remember selected time",
18
19
  "pisell2.text.sku.detail.modal.remember.description": "Reuse this time when selecting this product again. If it is no longer available, select a new time.",
19
20
  "pisell2.text.sku.detail.modal.remember.save.failed": "The preference could not be saved. Please try again.",
@@ -97,6 +98,7 @@ var locales_default = {
97
98
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "Failed to validate availability for the new quantity. Please try again."
98
99
  },
99
100
  "zh-CN": {
101
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品选择失败:所选资源无法预订,请检查资源选择后重试。",
100
102
  "pisell2.text.sku.detail.modal.remember.time": "记住所选时间",
101
103
  "pisell2.text.sku.detail.modal.remember.description": "后续选择此商品时复用所选时间;该时间不可用时,请重新选择。",
102
104
  "pisell2.text.sku.detail.modal.remember.save.failed": "偏好保存失败,请重试。",
@@ -180,6 +182,7 @@ var locales_default = {
180
182
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新数量的预约可用性校验失败,请重试。"
181
183
  },
182
184
  "zh-HK": {
185
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品選擇失敗:所選資源無法預訂,請檢查資源選擇後重試。",
183
186
  "pisell2.text.sku.detail.modal.remember.time": "記住所選時間",
184
187
  "pisell2.text.sku.detail.modal.remember.description": "後續選擇此商品時沿用所選時間;該時間不可用時,請重新選擇。",
185
188
  "pisell2.text.sku.detail.modal.remember.save.failed": "偏好儲存失敗,請重試。",
@@ -263,6 +266,7 @@ var locales_default = {
263
266
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新數量的預約可用性校驗失敗,請重試。"
264
267
  },
265
268
  "zh-TW": {
269
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品選擇失敗:所選資源無法預訂,請檢查資源選擇後重試。",
266
270
  "pisell2.text.sku.detail.modal.remember.time": "記住所選時間",
267
271
  "pisell2.text.sku.detail.modal.remember.description": "後續選擇此商品時沿用所選時間;該時間不可用時,請重新選擇。",
268
272
  "pisell2.text.sku.detail.modal.remember.save.failed": "偏好儲存失敗,請重試。",
@@ -274,6 +278,7 @@ var locales_default = {
274
278
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新數量的預約可用性校驗失敗,請重試。"
275
279
  },
276
280
  ja: {
281
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "商品を選択できませんでした。選択したリソースを予約できません。選択内容をご確認ください。",
277
282
  "pisell2.text.sku.detail.modal.remember.time": "選択した時刻を記憶",
278
283
  "pisell2.text.sku.detail.modal.remember.description": "次回この商品を選ぶときに時刻を再利用します。利用できない場合は選び直してください。",
279
284
  "pisell2.text.sku.detail.modal.remember.save.failed": "設定を保存できませんでした。もう一度お試しください。",
@@ -354,6 +359,7 @@ var locales_default = {
354
359
  "pisell2.text.sku.detail.modal.flow.quantity.revalidation.failed": "新しい数量の空き状況を確認できませんでした。もう一度お試しください。"
355
360
  },
356
361
  pt: {
362
+ "pisell2.text.sku.detail.modal.validation.resource.commit.failed": "Falha na seleção do produto: não foi possível reservar o recurso selecionado. Verifique a sua seleção.",
357
363
  "pisell2.text.sku.detail.modal.remember.time": "Lembrar horário selecionado",
358
364
  "pisell2.text.sku.detail.modal.remember.description": "Reutilizar este horário ao selecionar o produto novamente. Se não estiver disponível, selecione outro.",
359
365
  "pisell2.text.sku.detail.modal.remember.save.failed": "Não foi possível salvar a preferência. Tente novamente.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.12.319",
3
+ "version": "6.12.320",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -71,10 +71,10 @@
71
71
  "react-zoom-pan-pinch": "^3.7.0",
72
72
  "styled-components": "^6.0.0-rc.3",
73
73
  "use-sync-external-store": "^1.6.0",
74
- "@pisell/pi-payment-sdk": "0.0.3",
75
- "@pisell/icon": "0.0.11",
76
74
  "@pisell/utils": "3.0.7",
75
+ "@pisell/pi-payment-sdk": "0.0.3",
77
76
  "@pisell/materials": "6.12.79",
77
+ "@pisell/icon": "0.0.11",
78
78
  "@pisell/date-picker": "3.0.12"
79
79
  },
80
80
  "peerDependencies": {
@@ -1 +0,0 @@
1
- export { };