@pisell/private-materials 6.12.175 → 6.12.177

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 (165) 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/preview.css +1 -1
  6. package/build/lowcode/preview.js +1 -1
  7. package/build/lowcode/render/default/view.js +21 -21
  8. package/build/lowcode/view.js +21 -21
  9. package/es/components/appointmentBooking/deposit/index.d.ts +2 -1
  10. package/es/components/appointmentBooking/index.d.ts +2 -1
  11. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
  12. package/es/components/bigSale/components/TimeBar/index.js +0 -1
  13. package/es/components/bigSale/dialog.js +0 -1
  14. package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
  15. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
  16. package/es/components/bigSale/index.js +1 -1
  17. package/es/components/bigSale/templates/Kiosk/index.js +104 -48
  18. package/es/components/booking/deposit/index.d.ts +3 -1
  19. package/es/components/booking/info/addServiceVariant/index.d.ts +3 -1
  20. package/es/components/booking/info/index.d.ts +2 -1
  21. package/es/components/booking/materiels/contacts/index.d.ts +2 -1
  22. package/es/components/booking/materiels/duration/index.d.ts +2 -1
  23. package/es/components/booking/materiels/startTime/index.d.ts +2 -1
  24. package/es/components/ecocup/cupList/index.d.ts +2 -1
  25. package/es/components/ecocup/customerList/index.d.ts +2 -2
  26. package/es/components/eftpos/index.d.ts +2 -1
  27. package/es/components/eftposPay/index.d.ts +2 -1
  28. package/es/components/eventBooking/index.d.ts +2 -1
  29. package/es/components/kioskSale/index.d.ts +2 -2
  30. package/es/components/kioskSale/index.js +1 -1
  31. package/es/components/kioskSkuDetail/index.d.ts +1 -1
  32. package/es/components/login/index.d.ts +2 -1
  33. package/es/components/pisellSelectCustomerModal/index.d.ts +2 -1
  34. package/es/components/productExtension/index.d.ts +2 -1
  35. package/es/components/ruleSetting/index.d.ts +2 -1
  36. package/es/components/scanOrder/index.d.ts +2 -2
  37. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
  38. package/es/components/sharedSecondaryBigSale/index.d.ts +2 -2
  39. package/es/components/shoppingCart/index.d.ts +2 -1
  40. package/es/components/subTotal/index.d.ts +1 -1
  41. package/es/components/taxSelect/index.d.ts +2 -1
  42. package/es/components/ticketBooking/index.d.ts +1 -1
  43. package/es/components/venueBooking/index.d.ts +2 -2
  44. package/es/components/walletList/index.d.ts +2 -1
  45. package/es/index.js +0 -2
  46. package/es/plus/orderList/index.d.ts +1 -1
  47. package/es/plus/pisellProResourcePickerModal/PisellFloorMapPaletteViewAllModal.d.ts +1 -1
  48. package/es/plus/pisellProResourcePickerModal/PisellProResourcePickerModal.d.ts +2 -2
  49. package/es/plus/pisellReservation/components/SelectFloorMapResourceDialog.d.ts +1 -1
  50. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  51. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  52. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  53. package/es/plus/pisellReservation/floorRoomCard/FloorRoomCardFromData.d.ts +1 -1
  54. package/es/plus/pisellReservation/floorRoomCard/ReservationFloorRoomCard.d.ts +1 -1
  55. package/es/plus/pisellReservation/floorRoomCard/mapFloorRoomCardViewProps.d.ts +1 -0
  56. package/es/plus/pisellReservation/floorRoomCard/views/RoomCardHeaderView.d.ts +1 -0
  57. package/es/plus/pisellSalesManagement/index.d.ts +1 -1
  58. package/es/plus/pisellTopology/PisellTopology.d.ts +2 -2
  59. package/es/plus/pisellTopology/TopologyDeviceCard.d.ts +1 -1
  60. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +7 -5
  61. package/es/plus/saasCreateOrganization/index.d.ts +2 -1
  62. package/es/plus/saleDetail/Base.js +0 -1
  63. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
  64. package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
  65. package/es/plus/saleDetail/components/PromotionWalletPanels/index.d.ts +1 -1
  66. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
  67. package/es/plus/saleDetail/index.js +0 -1
  68. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
  69. package/es/plus/saleDetail/tmpl/B/index.js +0 -1
  70. package/es/plus/salesSdk/bookingEditService/BookingEditHolderField.js +6 -6
  71. package/es/plus/salesSdk/components/SalesSdkConfirmHolderModal.js +2 -4
  72. package/es/plus/salesSdk/context/SalesSdkCartContext.js +28 -21
  73. package/es/plus/salesSdk/context/SalesSdkHolderContext.js +104 -22
  74. package/es/plus/salesSdk/context/SalesSdkProvider.js +3 -12
  75. package/es/plus/salesSdk/hosts/ConfirmHolderHostRenderer.js +14 -5
  76. package/es/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +5 -2
  77. package/es/plus/salesSdk/types.d.ts +16 -1
  78. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  79. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  80. package/es/plus/salesSdk/utils/customerAuthGate.js +2 -5
  81. package/es/plus/salesSdk/utils/enrichCacheItemBeforeAdd.js +1 -1
  82. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  83. package/es/plus/salesSdk/utils/ensureCustomerAuthBeforeAdd.js +6 -6
  84. package/es/plus/salesSdk/utils/holderSubmitValidation.js +3 -4
  85. package/es/plus/salesSdk/utils/productHolderConfig.js +3 -17
  86. package/es/plus/salesSdk/utils/runAddProductFlow.js +14 -5
  87. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -1
  88. package/es/plus/walletPassGallery/index.d.ts +2 -1
  89. package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
  90. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  91. package/es/pro/Login2.0/index.d.ts +1 -2
  92. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  93. package/es/pro/Selector/Item.d.ts +1 -1
  94. package/es/pro/numberKeyboard/index.d.ts +1 -1
  95. package/es/pro/pisellPhoneKeyboard/index.d.ts +2 -1
  96. package/es/pro/skuDetailModal/components/weighing/index.d.ts +2 -1
  97. package/es/pro/skuDetailModal/flow/modules/holder/index.js +4 -1
  98. package/lib/components/appointmentBooking/deposit/index.d.ts +2 -2
  99. package/lib/components/appointmentBooking/index.d.ts +2 -2
  100. package/lib/components/bigSale/index.js +1 -0
  101. package/lib/components/bigSale/templates/Kiosk/index.js +104 -47
  102. package/lib/components/booking/deposit/index.d.ts +3 -2
  103. package/lib/components/booking/info/addServiceVariant/index.d.ts +3 -2
  104. package/lib/components/booking/info/index.d.ts +2 -2
  105. package/lib/components/booking/materiels/contacts/index.d.ts +2 -2
  106. package/lib/components/booking/materiels/duration/index.d.ts +2 -2
  107. package/lib/components/booking/materiels/startTime/index.d.ts +2 -2
  108. package/lib/components/ecocup/cupList/index.d.ts +2 -2
  109. package/lib/components/ecocup/customerList/index.d.ts +2 -2
  110. package/lib/components/eftpos/index.d.ts +2 -2
  111. package/lib/components/eftposPay/index.d.ts +2 -2
  112. package/lib/components/eventBooking/index.d.ts +2 -2
  113. package/lib/components/kioskSale/index.d.ts +2 -2
  114. package/lib/components/kioskSale/index.js +1 -1
  115. package/lib/components/kioskSkuDetail/index.d.ts +1 -1
  116. package/lib/components/login/index.d.ts +2 -2
  117. package/lib/components/pisellSelectCustomerModal/index.d.ts +2 -2
  118. package/lib/components/productExtension/index.d.ts +2 -2
  119. package/lib/components/ruleSetting/index.d.ts +2 -2
  120. package/lib/components/scanOrder/index.d.ts +2 -2
  121. package/lib/components/sharedSecondaryBigSale/index.d.ts +2 -2
  122. package/lib/components/shoppingCart/index.d.ts +2 -2
  123. package/lib/components/subTotal/index.d.ts +1 -1
  124. package/lib/components/taxSelect/index.d.ts +2 -2
  125. package/lib/components/ticketBooking/index.d.ts +1 -1
  126. package/lib/components/venueBooking/index.d.ts +2 -2
  127. package/lib/components/walletList/index.d.ts +2 -2
  128. package/lib/plus/orderList/index.d.ts +1 -1
  129. package/lib/plus/pisellProResourcePickerModal/PisellFloorMapPaletteViewAllModal.d.ts +1 -1
  130. package/lib/plus/pisellProResourcePickerModal/PisellProResourcePickerModal.d.ts +2 -2
  131. package/lib/plus/pisellReservation/components/SelectFloorMapResourceDialog.d.ts +1 -1
  132. package/lib/plus/pisellReservation/floorRoomCard/FloorRoomCardFromData.d.ts +1 -1
  133. package/lib/plus/pisellReservation/floorRoomCard/ReservationFloorRoomCard.d.ts +1 -1
  134. package/lib/plus/pisellReservation/floorRoomCard/mapFloorRoomCardViewProps.d.ts +1 -0
  135. package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardHeaderView.d.ts +1 -0
  136. package/lib/plus/pisellSalesManagement/index.d.ts +1 -1
  137. package/lib/plus/pisellTopology/PisellTopology.d.ts +2 -2
  138. package/lib/plus/pisellTopology/TopologyDeviceCard.d.ts +1 -1
  139. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +7 -6
  140. package/lib/plus/saasCreateOrganization/index.d.ts +2 -2
  141. package/lib/plus/saleDetail/components/PromotionWalletPanels/index.d.ts +1 -1
  142. package/lib/plus/salesSdk/bookingEditService/BookingEditHolderField.js +5 -5
  143. package/lib/plus/salesSdk/components/SalesSdkConfirmHolderModal.js +2 -4
  144. package/lib/plus/salesSdk/context/SalesSdkCartContext.js +28 -21
  145. package/lib/plus/salesSdk/context/SalesSdkHolderContext.js +104 -22
  146. package/lib/plus/salesSdk/context/SalesSdkProvider.js +3 -12
  147. package/lib/plus/salesSdk/hosts/ConfirmHolderHostRenderer.js +14 -5
  148. package/lib/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +5 -2
  149. package/lib/plus/salesSdk/types.d.ts +16 -1
  150. package/lib/plus/salesSdk/utils/customerAuthGate.js +1 -4
  151. package/lib/plus/salesSdk/utils/enrichCacheItemBeforeAdd.js +1 -1
  152. package/lib/plus/salesSdk/utils/ensureCustomerAuthBeforeAdd.js +6 -6
  153. package/lib/plus/salesSdk/utils/holderSubmitValidation.js +3 -4
  154. package/lib/plus/salesSdk/utils/productHolderConfig.js +3 -17
  155. package/lib/plus/salesSdk/utils/runAddProductFlow.js +14 -5
  156. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -2
  157. package/lib/plus/walletPassGallery/index.d.ts +2 -2
  158. package/lib/pro/Selector/Item.d.ts +1 -1
  159. package/lib/pro/numberKeyboard/index.d.ts +1 -1
  160. package/lib/pro/pisellPhoneKeyboard/index.d.ts +2 -2
  161. package/lib/pro/skuDetailModal/components/weighing/index.d.ts +2 -2
  162. package/lib/pro/skuDetailModal/flow/modules/holder/index.js +4 -1
  163. package/package.json +4 -4
  164. package/es/plus/pisellReservation/index.js +0 -17
  165. package/es/plus/salesSdk/index.js +0 -51
@@ -11,6 +11,11 @@ import { buildHolderListRequestKey, buildHolderListRequestParams, resolveHolderD
11
11
  import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
12
12
  import { useMemoizedFn } from "ahooks";
13
13
  //#region src/plus/salesSdk/context/SalesSdkHolderContext.tsx
14
+ const HOLDER_ACCESS_ALLOWED = {
15
+ allowed: true,
16
+ loginOpened: false,
17
+ loginClosed: false
18
+ };
14
19
  const SalesSdkHolderContext = createContext(null);
15
20
  SalesSdkHolderContext.displayName = "SalesSdkHolderContext";
16
21
  const EMPTY_HOLDER_OPTIONS = [];
@@ -108,31 +113,49 @@ const SalesSdkHolderProvider = ({ children }) => {
108
113
  }
109
114
  return true;
110
115
  }));
111
- const ensureHolderRequestAccess = useMemoizedFn(() => {
116
+ const ensureHolderRequestAccess = useMemoizedFn((options) => {
112
117
  const normalizedPlatform = String(platform || "").trim().toLowerCase();
113
- if (normalizedPlatform !== "pc" && normalizedPlatform !== "h5") return Promise.resolve(true);
118
+ if (normalizedPlatform !== "pc" && normalizedPlatform !== "h5") return Promise.resolve(HOLDER_ACCESS_ALLOWED);
114
119
  const currentCustomerId = resolveHolderCustomerId(bookingTicket);
115
120
  const loggedIn = isLoggedIn();
116
- if (loggedIn && !isUnboundHolderCustomerId(currentCustomerId)) return Promise.resolve(true);
121
+ if (!isUnboundHolderCustomerId(currentCustomerId) && (loggedIn || (options === null || options === void 0 ? void 0 : options.allowBoundCustomerAccess) === true)) return Promise.resolve(HOLDER_ACCESS_ALLOWED);
117
122
  if (holderAccessPromiseRef.current) return holderAccessPromiseRef.current;
118
- const accessPromise = loggedIn ? syncAuthenticatedHolderCustomer() : new Promise((resolve) => {
123
+ const accessPromise = loggedIn ? syncAuthenticatedHolderCustomer().then((allowed) => ({
124
+ allowed,
125
+ loginOpened: false,
126
+ loginClosed: false
127
+ })) : new Promise((resolve) => {
119
128
  let settled = false;
120
- const finish = (allowed) => {
129
+ const finish = (result) => {
121
130
  if (settled) return;
122
131
  settled = true;
123
- resolve(allowed);
132
+ resolve(result);
124
133
  };
125
134
  if (!openLoginModal({ callback: (status) => {
126
135
  if (settled) return;
127
136
  if (status !== "success") {
128
- finish(false);
137
+ finish({
138
+ allowed: false,
139
+ loginOpened: true,
140
+ loginClosed: true
141
+ });
129
142
  return;
130
143
  }
131
144
  settled = true;
132
- syncAuthenticatedHolderCustomer().then(resolve);
145
+ syncAuthenticatedHolderCustomer().then((allowed) => {
146
+ resolve({
147
+ allowed,
148
+ loginOpened: true,
149
+ loginClosed: false
150
+ });
151
+ });
133
152
  } })) {
134
153
  console.warn("[SalesSdk] holder request blocked: login modal is unavailable");
135
- finish(false);
154
+ finish({
155
+ allowed: false,
156
+ loginOpened: false,
157
+ loginClosed: false
158
+ });
136
159
  }
137
160
  });
138
161
  holderAccessPromiseRef.current = accessPromise;
@@ -184,14 +207,30 @@ const SalesSdkHolderProvider = ({ children }) => {
184
207
  }, {});
185
208
  });
186
209
  });
187
- const ensureHolderOptionsForSource = useMemoizedFn(function() {
188
- var _ref = _asyncToGenerator(function* (source) {
210
+ const prepareHolderOptionsForSource = useMemoizedFn(function() {
211
+ var _ref = _asyncToGenerator(function* (source, options) {
189
212
  const holderConfig = resolveEffectiveHolderConfig(source, bookingConfig);
190
- if (!holderConfig.enabled || holderConfig.formId === void 0) return EMPTY_HOLDER_OPTIONS;
191
- if (!(yield ensureHolderRequestAccess())) return EMPTY_HOLDER_OPTIONS;
213
+ if (!holderConfig.enabled || holderConfig.formId === void 0) return {
214
+ options: EMPTY_HOLDER_OPTIONS,
215
+ accessAllowed: true,
216
+ loginOpened: false,
217
+ loginClosed: false
218
+ };
219
+ const access = yield ensureHolderRequestAccess(options);
220
+ if (!access.allowed) return {
221
+ options: EMPTY_HOLDER_OPTIONS,
222
+ accessAllowed: false,
223
+ loginOpened: access.loginOpened,
224
+ loginClosed: access.loginClosed
225
+ };
192
226
  const params = resolveRequestParams(source);
193
227
  const requestKey = buildHolderListRequestKey(params);
194
- if (!params || !requestKey) return EMPTY_HOLDER_OPTIONS;
228
+ if (!params || !requestKey) return {
229
+ options: EMPTY_HOLDER_OPTIONS,
230
+ accessAllowed: true,
231
+ loginOpened: access.loginOpened,
232
+ loginClosed: access.loginClosed
233
+ };
195
234
  const cached = mergeHolderOptionsStable(optimisticHolderOptionsByKey[requestKey] || EMPTY_HOLDER_OPTIONS, serverHolderOptionsByKey[requestKey] || EMPTY_HOLDER_OPTIONS);
196
235
  if (cached.length) {
197
236
  setHolderOptionsRequestKey(requestKey);
@@ -208,9 +247,19 @@ const SalesSdkHolderProvider = ({ children }) => {
208
247
  setLoading(loadingKeysRef.current.size > 0);
209
248
  });
210
249
  }
211
- return cached;
250
+ return {
251
+ options: cached,
252
+ accessAllowed: true,
253
+ loginOpened: access.loginOpened,
254
+ loginClosed: access.loginClosed
255
+ };
212
256
  }
213
- if (loadingKeysRef.current.has(requestKey)) return cached;
257
+ if (loadingKeysRef.current.has(requestKey)) return {
258
+ options: cached,
259
+ accessAllowed: true,
260
+ loginOpened: access.loginOpened,
261
+ loginClosed: access.loginClosed
262
+ };
214
263
  loadingKeysRef.current.add(requestKey);
215
264
  setLoading(true);
216
265
  try {
@@ -218,20 +267,38 @@ const SalesSdkHolderProvider = ({ children }) => {
218
267
  const fromServer = formatHolderOptions(Array.isArray(data === null || data === void 0 ? void 0 : data.list) ? data.list : []);
219
268
  setServerHolderOptionsByKey((prev) => _objectSpread2(_objectSpread2({}, prev), {}, { [requestKey]: fromServer }));
220
269
  setHolderOptionsRequestKey(requestKey);
221
- return mergeHolderOptionsStable(optimisticHolderOptionsByKey[requestKey] || EMPTY_HOLDER_OPTIONS, fromServer);
270
+ return {
271
+ options: mergeHolderOptionsStable(optimisticHolderOptionsByKey[requestKey] || EMPTY_HOLDER_OPTIONS, fromServer),
272
+ accessAllowed: true,
273
+ loginOpened: access.loginOpened,
274
+ loginClosed: access.loginClosed
275
+ };
222
276
  } catch (err) {
223
277
  console.warn("[SalesSdk] load holderOptions failed", err);
224
278
  setHolderOptionsRequestKey(null);
225
- return EMPTY_HOLDER_OPTIONS;
279
+ return {
280
+ options: EMPTY_HOLDER_OPTIONS,
281
+ accessAllowed: true,
282
+ loginOpened: access.loginOpened,
283
+ loginClosed: access.loginClosed
284
+ };
226
285
  } finally {
227
286
  loadingKeysRef.current.delete(requestKey);
228
287
  setLoading(loadingKeysRef.current.size > 0);
229
288
  }
230
289
  });
231
- return function(_x) {
290
+ return function(_x, _x2) {
232
291
  return _ref.apply(this, arguments);
233
292
  };
234
293
  }());
294
+ const ensureHolderOptionsForSource = useMemoizedFn(function() {
295
+ var _ref2 = _asyncToGenerator(function* (source) {
296
+ return (yield prepareHolderOptionsForSource(source)).options;
297
+ });
298
+ return function(_x3) {
299
+ return _ref2.apply(this, arguments);
300
+ };
301
+ }());
235
302
  useEffect(() => {
236
303
  return registerHolderOptionsSyncBridge({
237
304
  upsertHolderOptions,
@@ -249,7 +316,7 @@ const SalesSdkHolderProvider = ({ children }) => {
249
316
  let cancelled = false;
250
317
  collectHolderSources(bookingTicket, bookingConfig).forEach((source) => {
251
318
  _asyncToGenerator(function* () {
252
- if (!(yield ensureHolderRequestAccess()) || cancelled) return;
319
+ if (!(yield ensureHolderRequestAccess()).allowed || cancelled) return;
253
320
  const params = resolveRequestParams(source);
254
321
  const requestKey = buildHolderListRequestKey(params);
255
322
  if (!params || !requestKey) return;
@@ -305,6 +372,7 @@ const SalesSdkHolderProvider = ({ children }) => {
305
372
  getHolderOptionsForSource,
306
373
  getHolderOptionsRequestKeyForSource,
307
374
  ensureHolderOptionsForSource,
375
+ prepareHolderOptionsForSource,
308
376
  reload,
309
377
  upsertHolderOptions
310
378
  }), [
@@ -315,6 +383,7 @@ const SalesSdkHolderProvider = ({ children }) => {
315
383
  getHolderOptionsForSource,
316
384
  getHolderOptionsRequestKeyForSource,
317
385
  ensureHolderOptionsForSource,
386
+ prepareHolderOptionsForSource,
318
387
  reload,
319
388
  upsertHolderOptions
320
389
  ]);
@@ -333,11 +402,24 @@ function useSalesSdkHolderOptional() {
333
402
  getHolderOptionsForSource: () => EMPTY_HOLDER_OPTIONS,
334
403
  getHolderOptionsRequestKeyForSource: () => null,
335
404
  ensureHolderOptionsForSource: function() {
336
- var _ref2 = _asyncToGenerator(function* () {
405
+ var _ref3 = _asyncToGenerator(function* () {
337
406
  return EMPTY_HOLDER_OPTIONS;
338
407
  });
339
408
  return function ensureHolderOptionsForSource() {
340
- return _ref2.apply(this, arguments);
409
+ return _ref3.apply(this, arguments);
410
+ };
411
+ }(),
412
+ prepareHolderOptionsForSource: function() {
413
+ var _ref4 = _asyncToGenerator(function* () {
414
+ return {
415
+ options: EMPTY_HOLDER_OPTIONS,
416
+ accessAllowed: true,
417
+ loginOpened: false,
418
+ loginClosed: false
419
+ };
420
+ });
421
+ return function prepareHolderOptionsForSource() {
422
+ return _ref4.apply(this, arguments);
341
423
  };
342
424
  }(),
343
425
  reload: () => void 0,
@@ -219,7 +219,7 @@ function SalesSdkBootstrap({ autoRestoreOnInit, autoBootstrap, autoInitBookingCo
219
219
  ]);
220
220
  return null;
221
221
  }
222
- const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "ensure", lifecycleOwner = "provider", businessCode, bookingConfigParams, autoInitBookingContext = true, otherParams, shouldMergeProductLines, rulesHooks, orderId, preloadedSalesDetail, autoBootstrap = true, autoRestoreOnInit = true, restoreOrderAfterPaidCheckout = true, destroyOnUnmount = true, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay = true, legacyOpenProductDetail, enableTempOrderSync = false, enableTempOrderPersist = false, syncDetailOnOrderChange = false, isActive = true, preserveProductCatalogOnInactiveCustomerClear = false, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, defaultProductLoadParams, children }) => {
222
+ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "ensure", lifecycleOwner = "provider", businessCode, bookingConfigParams, autoInitBookingContext = true, otherParams, deferHolderAuthOnClose = false, shouldMergeProductLines, rulesHooks, orderId, preloadedSalesDetail, autoBootstrap = true, autoRestoreOnInit = true, restoreOrderAfterPaidCheckout = true, destroyOnUnmount = true, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay = true, legacyOpenProductDetail, enableTempOrderSync = false, enableTempOrderPersist = false, syncDetailOnOrderChange = false, isActive = true, preserveProductCatalogOnInactiveCustomerClear = false, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, defaultProductLoadParams, children }) => {
223
223
  var _context$appHelper, _osKey$replace;
224
224
  const context = useEngineContext();
225
225
  const utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
@@ -231,17 +231,7 @@ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "e
231
231
  engineChannel: channel,
232
232
  platform: otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform
233
233
  });
234
- const shouldEnableCustomerAuthModule = useMemo(() => [
235
- otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform,
236
- otherParams === null || otherParams === void 0 ? void 0 : otherParams.channel,
237
- channel,
238
- productLoadChannel
239
- ].some((value) => String(value || "").trim().toLowerCase() === "kiosk"), [
240
- channel,
241
- otherParams === null || otherParams === void 0 ? void 0 : otherParams.channel,
242
- otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform,
243
- productLoadChannel
244
- ]);
234
+ const shouldEnableCustomerAuthModule = deferHolderAuthOnClose;
245
235
  const [promotionScanItemIncreaseRevision, setPromotionScanItemIncreaseRevision] = useState(0);
246
236
  /** 加车 enrich 早于 BookingEdit 抽屉,须提前注入 HTTP 客户端供跨日报价等 serve 使用 */
247
237
  useEffect(() => {
@@ -1335,6 +1325,7 @@ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "e
1335
1325
  isActive,
1336
1326
  preserveCatalogOnInactiveCustomerClear: preserveProductCatalogOnInactiveCustomerClear
1337
1327
  }, /* @__PURE__ */ React.createElement(SalesSdkSummaryProvider, { ref: summaryProviderRef }, /* @__PURE__ */ React.createElement(SalesSdkCartProvider, {
1328
+ deferHolderAuthOnClose,
1338
1329
  shouldMergeProductLines,
1339
1330
  mergeBookingLinesForDisplay
1340
1331
  }, /* @__PURE__ */ React.createElement(SalesSdkGlobalScanSubscriber, {
@@ -1,5 +1,6 @@
1
1
  import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
2
2
  import { useSalesSdkHostBridges } from "../context/SalesSdkHostBridgesContext.js";
3
+ import { isProductHolderRequired } from "../utils/productHolderConfig.js";
3
4
  import { useSalesSdkHolderOptional } from "../context/SalesSdkHolderContext.js";
4
5
  import { useSalesSdkUIHosts } from "../context/SalesSdkUIHostsContext.js";
5
6
  import { assignHolderToCartLineWithFeedback } from "../utils/assignHolderToCartLine.js";
@@ -28,14 +29,16 @@ const ConfirmHolderHostRenderer = () => {
28
29
  const ctx = pending === null || pending === void 0 ? void 0 : pending.ctx;
29
30
  const open = Boolean((pending === null || pending === void 0 ? void 0 : pending.open) && ctx);
30
31
  const snapshotLineKeys = (_ctx$snapshotLineKeys = ctx === null || ctx === void 0 ? void 0 : ctx.snapshotLineKeys) !== null && _ctx$snapshotLineKeys !== void 0 ? _ctx$snapshotLineKeys : [];
31
- const liveUnassignedCount = useMemo(() => {
32
- if (!open || !bookingTicket) return 0;
33
- return calculateUnassignedHolderCount(collectUnassignedHolderLines(bookingTicket));
32
+ const liveUnassignedLines = useMemo(() => {
33
+ if (!open || !bookingTicket) return [];
34
+ return collectUnassignedHolderLines(bookingTicket);
34
35
  }, [
35
36
  bookingTicket,
36
37
  open,
37
38
  refreshKey
38
39
  ]);
40
+ const liveUnassignedCount = useMemo(() => calculateUnassignedHolderCount(liveUnassignedLines), [liveUnassignedLines]);
41
+ const canSkip = liveUnassignedLines.length > 0 && !liveUnassignedLines.some((line) => isProductHolderRequired(line.cacheItem));
39
42
  const lines = useMemo(() => {
40
43
  if (!open || !bookingTicket || !snapshotLineKeys.length) return [];
41
44
  return buildHolderConfirmDisplayLines({
@@ -85,8 +88,14 @@ const ConfirmHolderHostRenderer = () => {
85
88
  holderConfirm.complete();
86
89
  }, [holderConfirm, liveUnassignedCount]);
87
90
  const handleSkip = useCallback(() => {
91
+ if (!canSkip) {
92
+ PisellToast({ content: locales.getText("pisell2.text.press-card-assign-holder") });
93
+ setRefreshKey((key) => key + 1);
94
+ holderConfirm.refresh();
95
+ return;
96
+ }
88
97
  holderConfirm.complete();
89
- }, [holderConfirm]);
98
+ }, [canSkip, holderConfirm]);
90
99
  const handleDismissConfirmed = useCallback(() => {
91
100
  holderConfirm.cancel();
92
101
  }, [holderConfirm]);
@@ -95,7 +104,7 @@ const ConfirmHolderHostRenderer = () => {
95
104
  open,
96
105
  lines,
97
106
  liveUnassignedCount,
98
- bookingConfig: ctx.bookingConfig,
107
+ canSkip,
99
108
  onAssign: handleAssign,
100
109
  onConfirm: handleConfirm,
101
110
  onSkip: handleSkip,
@@ -217,6 +217,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
217
217
  var _ref17 = _asyncToGenerator(function* () {
218
218
  var _bookingTicket$getBoo3, _bookingTicket$getBoo4;
219
219
  const payload = capturedPending.payload;
220
+ const deferHolderUntilSubmit = payload.mode === "create" ? payload.requiresDetailPayload.deferHolderUntilSubmit === true : payload.mode === "booking-create" ? payload.requiresBookingEditPayload.deferHolderUntilSubmit === true : false;
220
221
  let openArgs;
221
222
  let bookingConfig = (_bookingTicket$getBoo3 = bookingTicket === null || bookingTicket === void 0 || (_bookingTicket$getBoo4 = bookingTicket.getBookingConfig) === null || _bookingTicket$getBoo4 === void 0 ? void 0 : _bookingTicket$getBoo4.call(bookingTicket)) !== null && _bookingTicket$getBoo3 !== void 0 ? _bookingTicket$getBoo3 : null;
222
223
  let bookingState = null;
@@ -333,7 +334,8 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
333
334
  const refreshHolderContextFromHydratedProduct = function() {
334
335
  var _ref6 = _asyncToGenerator(function* ({ productData }) {
335
336
  holderSource = productData;
336
- try {
337
+ if (deferHolderUntilSubmit) holderOptions = getHolderOptionsForSource(productData);
338
+ else try {
337
339
  holderOptions = yield ensureHolderOptionsForSource(productData);
338
340
  } catch (error) {
339
341
  console.warn("[SalesSdk] 水合后 Holder 字典加载失败,沿用当前分源缓存", error);
@@ -347,7 +349,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
347
349
  } catch (error) {
348
350
  console.warn("[SalesSdk] 水合后预约配置加载失败,沿用当前 isFranchisee", error);
349
351
  }
350
- if (bookingState) bookingState = _objectSpread2(_objectSpread2({}, bookingState), {}, {
352
+ if (bookingState) bookingState = _objectSpread2(_objectSpread2(_objectSpread2({}, bookingState), deferHolderUntilSubmit ? { deferHolderUntilSubmit: true } : {}), {}, {
351
353
  isFranchisee: hydratedIsFranchisee,
352
354
  otherParams: hydratedOtherParams,
353
355
  pet: _objectSpread2(_objectSpread2({}, bookingState.pet || {}), {}, { holders: holderOptions })
@@ -568,6 +570,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
568
570
  };
569
571
  }
570
572
  if (!isCurrentPending()) return;
573
+ if (bookingState && deferHolderUntilSubmit) bookingState = _objectSpread2(_objectSpread2({}, bookingState), {}, { deferHolderUntilSubmit: true });
571
574
  setPreparedOpen({
572
575
  pending: capturedPending,
573
576
  openArgs,
@@ -1324,6 +1324,8 @@ interface SalesSdkAddProductRequiresDetailPayload {
1324
1324
  initialQuantity?: number;
1325
1325
  /** @internal 本次详情 Flow 的 Holder 初始选择。 */
1326
1326
  initialHolderIds?: Array<number | string>;
1327
+ /** @internal 登录被关闭后,仅把 Holder 必填延后到提交前校验。 */
1328
+ deferHolderUntilSubmit?: boolean;
1327
1329
  }
1328
1330
  /**
1329
1331
  * `requiresBookingEdit` 时 UI 打开资源 / 时间编辑抽屉所需 payload。
@@ -1334,6 +1336,8 @@ interface SalesSdkRequiresBookingEditPayload {
1334
1336
  date: string | null;
1335
1337
  /** @internal 仅供加车前 Selection Flow 初始化 Holder 草稿。 */
1336
1338
  initialHolderIds?: Array<number | string>;
1339
+ /** @internal 登录被关闭后,仅把 Holder 必填延后到提交前校验。 */
1340
+ deferHolderUntilSubmit?: boolean;
1337
1341
  /**
1338
1342
  * 已加车行「编辑资源」:强制打开抽屉,忽略 cacheItem.autoClose。
1339
1343
  * 加车链路(requiresBookingEdit)不传此字段;autoClose=true 时自动 confirm 跳过抽屉。
@@ -1529,7 +1533,8 @@ interface SalesSdkConfirmDetailInput {
1529
1533
  quantity?: number;
1530
1534
  notShowToast?: boolean; /** Holder 弹窗的初始选中项;最终仍以用户确认结果为准 */
1531
1535
  initialHolderIds?: Array<number | string>; /** 跨日弹窗确认后的区间(规格弹窗之后注入) */
1532
- multiDayRange?: SalesSdkMultiDaySelectResult;
1536
+ multiDayRange?: SalesSdkMultiDaySelectResult; /** @internal 当前确认延后 Holder 到提交前补录。 */
1537
+ deferHolderUntilSubmit?: boolean;
1533
1538
  };
1534
1539
  }
1535
1540
  /**
@@ -1639,6 +1644,11 @@ interface SalesSdkAddProductWithFlowOptions {
1639
1644
  * @internal 由 createAddProductWithFlowDebounced 注入,业务调用方勿传。
1640
1645
  */
1641
1646
  preparedCacheItem?: any;
1647
+ /**
1648
+ * 当前商品 Flow 已关闭登录;详情/加购阶段延后 Holder,提交前仍按原配置校验。
1649
+ * @internal 由 Kiosk 模板登录门禁注入,业务调用方勿传。
1650
+ */
1651
+ deferHolderUntilSubmit?: boolean;
1642
1652
  }
1643
1653
  /**
1644
1654
  * 资源不可用原因(与 OS `BookingContext.ResourceUnavailableReason` 一比一对齐)。
@@ -1701,6 +1711,11 @@ interface SalesSdkProviderProps {
1701
1711
  autoInitBookingContext?: boolean;
1702
1712
  /** 透传给 OS 注册时的 otherParams(platform / type / channel / dineInConfig 等) */
1703
1713
  otherParams?: Record<string, any>;
1714
+ /**
1715
+ * Kiosk 模板专用:用户关闭商品 Holder 登录后继续详情/加购,并延后到提交前补录。
1716
+ * @internal 由 BigSale 根据 resolvedTemplate 注入。
1717
+ */
1718
+ deferHolderAuthOnClose?: boolean;
1704
1719
  /**
1705
1720
  * 运行时商品行合并策略;返回 false 时快速加购不做防抖合并,OS 始终新增商品行,
1706
1721
  * 预约商品也保持独立展示。默认合并。
@@ -340,4 +340,4 @@ function createAddProductWithFlowDebounced(deps) {
340
340
  };
341
341
  }
342
342
  //#endregion
343
- export { createAddProductWithFlowDebounced, shouldBypassAddProductDebounce };
343
+ 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 };
@@ -14,15 +14,12 @@ function isTruthyRequired(value) {
14
14
  function normalizeText(value) {
15
15
  return value == null ? "" : String(value).trim().toLowerCase();
16
16
  }
17
- function isKioskRuntime(params) {
18
- return normalizeText(params.platform) === "kiosk" || normalizeText(params.channel) === "kiosk";
19
- }
20
17
  function isHolderRequiredProduct(product) {
21
18
  const holderConfig = product === null || product === void 0 ? void 0 : product.holder_config;
22
19
  return normalizeText(holderConfig === null || holderConfig === void 0 ? void 0 : holderConfig.status) === "enable" && isTruthyRequired(holderConfig === null || holderConfig === void 0 ? void 0 : holderConfig.required);
23
20
  }
24
21
  function shouldPromptCustomerAuthForProduct(params) {
25
- return isKioskRuntime(params) && isHolderRequiredProduct(params.product) && !isValidOrderCustomerId(params.currentCustomerId);
22
+ return params.enabled === true && isHolderRequiredProduct(params.product) && !isValidOrderCustomerId(params.currentCustomerId);
26
23
  }
27
24
  function normalizeCustomerAuthCustomer(value) {
28
25
  if (!value || typeof value !== "object") return null;
@@ -62,4 +59,4 @@ function normalizeCustomerAuthCustomer(value) {
62
59
  return null;
63
60
  }
64
61
  //#endregion
65
- export { isHolderRequiredProduct, isKioskRuntime, isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
62
+ export { isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
@@ -20,7 +20,7 @@ function _enrichCacheItemBeforeAdd() {
20
20
  const customerId = resolveAddFlowCustomerId(input.tempOrder, input.customerId);
21
21
  const holderSource = (_input$catalogItem2 = input.catalogItem) !== null && _input$catalogItem2 !== void 0 ? _input$catalogItem2 : cacheItem;
22
22
  const effectiveHolderConfig = resolveEffectiveHolderConfig(holderSource, input.bookingConfig);
23
- if (shouldPromptHolderOnAddCart({
23
+ if (!input.deferHolderUntilSubmit && shouldPromptHolderOnAddCart({
24
24
  cacheItem,
25
25
  bookingConfig: input.bookingConfig,
26
26
  productSource: holderSource,
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
71
71
  });
72
72
  }
73
73
  //#endregion
74
- export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
74
+ export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, resolveHolderDisplayConfig };
@@ -6,10 +6,10 @@ function ensureCustomerAuthBeforeAdd(_x) {
6
6
  }
7
7
  function _ensureCustomerAuthBeforeAdd() {
8
8
  _ensureCustomerAuthBeforeAdd = _asyncToGenerator(function* (params) {
9
- if (!shouldPromptCustomerAuthForProduct(params)) return true;
9
+ if (!shouldPromptCustomerAuthForProduct(params)) return { status: "ready" };
10
10
  if (!params.openCustomerAuth) {
11
11
  console.warn("[SalesSdk] Kiosk holder-required product needs customer auth, but openCustomerAuth is unavailable");
12
- return false;
12
+ return { status: "fallback" };
13
13
  }
14
14
  try {
15
15
  const result = yield params.openCustomerAuth({
@@ -17,16 +17,16 @@ function _ensureCustomerAuthBeforeAdd() {
17
17
  product: params.product,
18
18
  currentCustomerId: params.currentCustomerId
19
19
  });
20
- if (!(result === null || result === void 0 ? void 0 : result.customer)) return false;
20
+ if (!(result === null || result === void 0 ? void 0 : result.customer)) return { status: "deferred" };
21
21
  if (typeof params.setOrderCustomer !== "function") {
22
22
  console.warn("[SalesSdk] Customer auth succeeded, but setOrderCustomer is unavailable");
23
- return false;
23
+ return { status: "fallback" };
24
24
  }
25
25
  yield params.setOrderCustomer(result.customer);
26
- return true;
26
+ return { status: "ready" };
27
27
  } catch (error) {
28
28
  console.warn("[SalesSdk] Customer auth before add failed", error);
29
- return false;
29
+ return { status: "fallback" };
30
30
  }
31
31
  });
32
32
  return _ensureCustomerAuthBeforeAdd.apply(this, arguments);
@@ -104,9 +104,8 @@ function collectUnassignedHolderLines(bookingTicket) {
104
104
  const orderLine = (_bookingView$_extend = bookingView._extend) === null || _bookingView$_extend === void 0 ? void 0 : _bookingView$_extend.product;
105
105
  if (!orderLine) return;
106
106
  const sourceProduct = (_catalog$find = catalog.find((p) => String(p.id) === String(orderLine.product_id))) !== null && _catalog$find !== void 0 ? _catalog$find : null;
107
- const holderSource = (_ref = sourceProduct !== null && sourceProduct !== void 0 ? sourceProduct : orderLine) !== null && _ref !== void 0 ? _ref : bookingView;
108
- const effectiveHolderConfig = resolveEffectiveHolderConfig(holderSource, bookingConfig);
109
- if (!(effectiveHolderConfig.source === "product" ? effectiveHolderConfig.required : effectiveHolderConfig.enabled)) return;
107
+ const effectiveHolderConfig = resolveEffectiveHolderConfig((_ref = sourceProduct !== null && sourceProduct !== void 0 ? sourceProduct : orderLine) !== null && _ref !== void 0 ? _ref : bookingView, bookingConfig);
108
+ if (!effectiveHolderConfig.enabled) return;
110
109
  const cacheItem = buildCacheItemFromOrderLine({
111
110
  product: orderLine,
112
111
  booking: bookingView,
@@ -115,7 +114,7 @@ function collectUnassignedHolderLines(bookingTicket) {
115
114
  if (isNormalProductByDurationSchedule(cacheItem)) return;
116
115
  if (hasHolderAssigned(cacheItem)) return;
117
116
  rawLines.push({
118
- cacheItem: _objectSpread2(_objectSpread2({}, cacheItem), isProductHolderRequired(cacheItem) ? {} : { holder_config: holderSource === null || holderSource === void 0 ? void 0 : holderSource.holder_config }),
117
+ cacheItem: _objectSpread2(_objectSpread2({}, cacheItem), isProductHolderRequired(cacheItem) ? {} : { holder_config: effectiveHolderConfig.raw }),
119
118
  booking: bookingView,
120
119
  orderLine
121
120
  });
@@ -30,26 +30,12 @@ function resolveProductHolderConfig(source) {
30
30
  }, formId !== void 0 && formId !== null && formId !== "" ? { formId } : {}), {}, { raw });
31
31
  }
32
32
  /**
33
- * 统一解析 Holder 配置:商品只要明确携带 holder_config(包括 disable),
34
- * 就完全以商品级配置为准;只有商品没有该字段时才回退旧 appointment_subject。
35
- *
36
- * 这样既允许新商品单独关闭店铺级 Holder,也能继续兼容尚未迁移的旧预约商品。
33
+ * 统一解析 Holder 配置:保留旧函数签名以减少调用方改动,
34
+ * 启用与必填判断不再回退 bookingConfig。
37
35
  */
38
- function resolveEffectiveHolderConfig(source, bookingConfig) {
39
- var _bookingConfig$config;
36
+ function resolveEffectiveHolderConfig(source, _bookingConfig) {
40
37
  const productConfig = resolveProductHolderConfig(source);
41
38
  if (productConfig.raw) return _objectSpread2(_objectSpread2({}, productConfig), {}, { source: "product" });
42
- const basicConfig = bookingConfig === null || bookingConfig === void 0 || (_bookingConfig$config = bookingConfig.config) === null || _bookingConfig$config === void 0 ? void 0 : _bookingConfig$config.basic;
43
- const appointmentSubject = basicConfig === null || basicConfig === void 0 ? void 0 : basicConfig.appointment_subject;
44
- const legacyEnabled = (appointmentSubject === null || appointmentSubject === void 0 ? void 0 : appointmentSubject.type) === "form" && (appointmentSubject === null || appointmentSubject === void 0 ? void 0 : appointmentSubject.show_hold_on_add_cart) !== 0;
45
- const legacyFormId = appointmentSubject === null || appointmentSubject === void 0 ? void 0 : appointmentSubject.form_id;
46
- if (appointmentSubject) return _objectSpread2(_objectSpread2({
47
- enabled: legacyEnabled,
48
- required: legacyEnabled && (basicConfig === null || basicConfig === void 0 ? void 0 : basicConfig.subject_require) === "require"
49
- }, legacyFormId !== void 0 && legacyFormId !== null && legacyFormId !== "" ? { formId: legacyFormId } : {}), {}, {
50
- raw: null,
51
- source: "legacy"
52
- });
53
39
  return {
54
40
  enabled: false,
55
41
  required: false,
@@ -40,7 +40,8 @@ function _openBookingEditAfterEnrich() {
40
40
  cacheItem,
41
41
  catalogProduct: catalogProduct !== null && catalogProduct !== void 0 ? catalogProduct : payload.catalogProduct,
42
42
  customerId: drawerCustomerId,
43
- initialHolderIds: flowOptions.initialHolderIds
43
+ initialHolderIds: flowOptions.initialHolderIds,
44
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit
44
45
  }));
45
46
  if (selectionResult.status === "cancelled") return { status: "cancelled" };
46
47
  if (selectionResult.status === "committed") {
@@ -63,6 +64,7 @@ function _openBookingEditAfterEnrich() {
63
64
  customerId: (_flowOptions$customer2 = flowOptions.customerId) !== null && _flowOptions$customer2 !== void 0 ? _flowOptions$customer2 : payload.customerId,
64
65
  initialHolderIds: flowOptions.initialHolderIds,
65
66
  holderOptions: flowOptions.holderOptions,
67
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit,
66
68
  date: payload.date,
67
69
  locale: flowOptions.locale,
68
70
  mode: "drawer"
@@ -102,6 +104,7 @@ function _openBookingEditAfterEnrich() {
102
104
  customerId: (_flowOptions$customer3 = flowOptions.customerId) !== null && _flowOptions$customer3 !== void 0 ? _flowOptions$customer3 : payload.customerId,
103
105
  initialHolderIds: flowOptions.initialHolderIds,
104
106
  holderOptions: flowOptions.holderOptions,
107
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit,
105
108
  date: payload.date,
106
109
  locale: flowOptions.locale,
107
110
  mode: "drawer"
@@ -110,12 +113,16 @@ function _openBookingEditAfterEnrich() {
110
113
  const openEdit = hosts === null || hosts === void 0 ? void 0 : hosts.openBookingEdit;
111
114
  if (!openEdit) return {
112
115
  status: "requiresBookingEdit",
113
- payload: _objectSpread2(_objectSpread2({}, payload), {}, { cacheItem: enriched.cacheItem })
116
+ payload: _objectSpread2(_objectSpread2({}, payload), {}, {
117
+ cacheItem: enriched.cacheItem,
118
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit
119
+ })
114
120
  };
115
121
  const edited = yield openEdit(_objectSpread2(_objectSpread2({}, payload), {}, {
116
122
  cacheItem: enriched.cacheItem,
117
123
  catalogProduct: catalogProduct !== null && catalogProduct !== void 0 ? catalogProduct : payload.catalogProduct,
118
- customerId: drawerCustomerId
124
+ customerId: drawerCustomerId,
125
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit
119
126
  }));
120
127
  if (!edited) return { status: "cancelled" };
121
128
  const { products } = yield cart.confirmBookingEdit({
@@ -149,7 +156,8 @@ function _runAddProductFlow() {
149
156
  if (!openDetail) return result;
150
157
  const detailResult = yield openDetail(_objectSpread2(_objectSpread2({}, result.payload), {}, {
151
158
  initialQuantity: (_flowOptions$quantity = flowOptions.quantity) !== null && _flowOptions$quantity !== void 0 ? _flowOptions$quantity : result.payload.initialQuantity,
152
- initialHolderIds: (_flowOptions$initialH = flowOptions.initialHolderIds) !== null && _flowOptions$initialH !== void 0 ? _flowOptions$initialH : result.payload.initialHolderIds
159
+ initialHolderIds: (_flowOptions$initialH = flowOptions.initialHolderIds) !== null && _flowOptions$initialH !== void 0 ? _flowOptions$initialH : result.payload.initialHolderIds,
160
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit
153
161
  }));
154
162
  if (!detailResult) return { status: "cancelled" };
155
163
  if (detailResult._committedProducts) {
@@ -189,7 +197,8 @@ function _runAddProductFlow() {
189
197
  options: flowOptions
190
198
  }),
191
199
  initialHolderIds: flowOptions.initialHolderIds,
192
- multiDayRange: multiDayRange || void 0
200
+ multiDayRange: multiDayRange || void 0,
201
+ deferHolderUntilSubmit: flowOptions.deferHolderUntilSubmit
193
202
  }
194
203
  };
195
204
  result = yield cart.confirmDetail(confirmInput);
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  //#region src/plus/walletPassGallery/components/passDetail/index.d.ts
2
3
  interface PassDetailProps {
3
4
  dataSource?: any | null;
@@ -7,6 +8,6 @@ interface PassDetailProps {
7
8
  showTimeLine?: boolean;
8
9
  onListRefresh?: () => void;
9
10
  }
10
- declare const PassDetail: (props: PassDetailProps) => JSX.Element | null;
11
+ declare const PassDetail: (props: PassDetailProps) => React.JSX.Element | null;
11
12
  //#endregion
12
13
  export { PassDetail };
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  //#region src/plus/walletPassGallery/index.d.ts
2
3
  interface WalletPassGalleryProps {
3
4
  hideTitle: boolean;
@@ -6,6 +7,6 @@ interface WalletPassGalleryProps {
6
7
  platform?: 'pc' | 'h5';
7
8
  [key: string]: any;
8
9
  }
9
- declare const WalletPassGallery: (props: WalletPassGalleryProps) => JSX.Element;
10
+ declare const WalletPassGallery: (props: WalletPassGalleryProps) => React.JSX.Element;
10
11
  //#endregion
11
12
  export { WalletPassGallery };
@@ -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,3 @@
1
- import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
2
1
  import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
3
2
  import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
4
- import { AuthModal } from "./AuthModal.js";
3
+ import { AuthModal, AuthModalProps } from "./AuthModal.js";