@pisell/private-materials 6.11.674 → 6.11.676

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 (57) 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 +18 -18
  6. package/build/lowcode/view.js +18 -18
  7. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
  8. package/es/components/bigSale/components/TimeBar/index.js +1 -0
  9. package/es/components/bigSale/dialog.js +1 -0
  10. package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
  11. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
  12. package/es/components/bigSale/index.js +1 -0
  13. package/es/components/bigSale/templates/Kiosk/index.js +1 -0
  14. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
  15. package/es/index.js +2 -0
  16. package/es/plus/multiCurrencySettlement/index.js +1 -1
  17. package/es/plus/piPaymentOld/ui/eftpos/amount.js +6 -3
  18. package/es/plus/piPaymentOld/ui/eftpos/pages/DevicePage.js +9 -21
  19. package/es/plus/piPaymentUI/eftpos/amount.js +6 -3
  20. package/es/plus/piPaymentUI/eftpos/pages/DevicePage.js +9 -21
  21. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  22. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  23. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  24. package/es/plus/pisellReservation/index.js +17 -0
  25. package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
  26. package/es/plus/saleDetail/Base.js +1 -0
  27. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
  28. package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
  29. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
  30. package/es/plus/saleDetail/index.js +1 -0
  31. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
  32. package/es/plus/saleDetail/tmpl/B/index.js +1 -0
  33. package/es/plus/salesSdk/index.js +53 -0
  34. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  35. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  36. package/es/plus/salesSdk/utils/customerAuthGate.js +1 -1
  37. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  38. package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
  39. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  40. package/es/pro/Login2.0/index.d.ts +2 -2
  41. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  42. package/es/pro/skuDetailModal/flow/modules/autoResolution.js +19 -3
  43. package/es/pro/skuDetailModal/flow/modules/time/index.js +78 -38
  44. package/es/pro/skuDetailModal/flow/modules/time/posCustomTime.js +17 -8
  45. package/es/pro/skuDetailModal/flow/types.d.ts +4 -0
  46. package/es/pro/skuDetailModal/index.js +36 -28
  47. package/lib/plus/piPaymentOld/ui/eftpos/amount.js +6 -2
  48. package/lib/plus/piPaymentOld/ui/eftpos/pages/DevicePage.js +9 -22
  49. package/lib/plus/piPaymentUI/eftpos/amount.js +6 -2
  50. package/lib/plus/piPaymentUI/eftpos/pages/DevicePage.js +9 -22
  51. package/lib/pro/skuDetailModal/flow/modules/autoResolution.js +19 -2
  52. package/lib/pro/skuDetailModal/flow/modules/time/index.js +76 -36
  53. package/lib/pro/skuDetailModal/flow/modules/time/posCustomTime.js +18 -9
  54. package/lib/pro/skuDetailModal/flow/types.d.ts +4 -0
  55. package/lib/pro/skuDetailModal/index.js +36 -28
  56. package/package.json +2 -2
  57. package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
@@ -2,6 +2,15 @@ const require_availabilityModel = require("../availabilityModel.js");
2
2
  const require_utils = require("../../../../components/eventBooking/components/bookingAvailabilityCalendar/utils.js");
3
3
  const require_model = require("./resource/model.js");
4
4
  //#region src/pro/skuDetailModal/flow/modules/autoResolution.ts
5
+ /**
6
+ * POS 首屏自动推导 Session 时只认 UBS 返回顺序中的第一场。
7
+ * 缺省容量沿用旧兼容语义;明确无容量时不允许走自动确认。
8
+ */
9
+ const resolveFirstPosSessionAutoCandidate = (candidates) => {
10
+ const firstCandidate = candidates[0];
11
+ if (!firstCandidate || firstCandidate.source !== "session_schedule" || firstCandidate.status !== "available" && firstCandidate.status !== "limited" || typeof firstCandidate.maxPartySize === "number" && firstCandidate.maxPartySize <= 0) return;
12
+ return firstCandidate;
13
+ };
5
14
  const findFirstNormallyAvailableDate = (items) => items.find((item) => {
6
15
  const status = require_utils.resolveAvailabilityStatus(item) || "unavailable";
7
16
  return status === "available" || status === "limited";
@@ -18,13 +27,20 @@ const validateAvailabilityDateAutoResolution = (context, module) => {
18
27
  return startDate.isSame(endDate, "day") && (status === "available" || status === "limited");
19
28
  };
20
29
  const validateAvailabilityTimeAutoResolution = (context, module) => {
21
- var _module$options2, _context$getModuleDat, _context$draft$bookin;
30
+ var _module$options2, _context$draft$bookin, _context$services$isP, _context$services, _context$services$isP2, _context$services2;
22
31
  if (((_module$options2 = module.options) === null || _module$options2 === void 0 ? void 0 : _module$options2.mode) !== "availability" || !context.services.availability) return false;
23
- const candidate = (_context$getModuleDat = context.getModuleData(module.key)) === null || _context$getModuleDat === void 0 ? void 0 : _context$getModuleDat.selectedCandidate;
32
+ const data = context.getModuleData(module.key);
33
+ const candidate = data === null || data === void 0 ? void 0 : data.selectedCandidate;
24
34
  const duration = context.draft.booking.duration;
25
35
  if (!candidate || !context.draft.booking.startTime || !(typeof duration === "number" && duration > 0 || typeof duration === "string" && duration.length > 0) || String(((_context$draft$bookin = context.draft.booking.selectedCandidate) === null || _context$draft$bookin === void 0 ? void 0 : _context$draft$bookin.key) || "") !== String(candidate.key)) return false;
36
+ if (((_context$services$isP = (_context$services = context.services).isPosAutoResolutionActive) === null || _context$services$isP === void 0 ? void 0 : _context$services$isP.call(_context$services)) === true && (data === null || data === void 0 ? void 0 : data.posCustomTimeSelectionIntent) === "fallback") return false;
26
37
  if (candidate.status !== "available" && candidate.status !== "limited") return false;
27
38
  if (typeof candidate.maxPartySize === "number" && candidate.maxPartySize <= 0) return false;
39
+ if (((_context$services$isP2 = (_context$services2 = context.services).isPosAutoResolutionActive) === null || _context$services$isP2 === void 0 ? void 0 : _context$services$isP2.call(_context$services2)) === true && candidate.source === "session_schedule") {
40
+ var _data$timeSlots;
41
+ const firstCandidate = data === null || data === void 0 || (_data$timeSlots = data.timeSlots) === null || _data$timeSlots === void 0 || (_data$timeSlots = _data$timeSlots[0]) === null || _data$timeSlots === void 0 ? void 0 : _data$timeSlots.candidate;
42
+ if (!firstCandidate || resolveFirstPosSessionAutoCandidate([firstCandidate]) !== candidate) return false;
43
+ }
28
44
  return context.steps.some((step) => step.modules.some((item) => item.type === "resource")) || Boolean(context.draft.booking.commitCandidate);
29
45
  };
30
46
  const validateAvailabilityResourceAutoResolution = (context, module) => {
@@ -64,6 +80,7 @@ exports.findFirstNormallyAvailableDate = findFirstNormallyAvailableDate;
64
80
  exports.getDefaultCustomCapacitySelection = getDefaultCustomCapacitySelection;
65
81
  exports.isCapacityAutoResolved = isCapacityAutoResolved;
66
82
  exports.isHolderAutoResolved = isHolderAutoResolved;
83
+ exports.resolveFirstPosSessionAutoCandidate = resolveFirstPosSessionAutoCandidate;
67
84
  exports.validateAvailabilityDateAutoResolution = validateAvailabilityDateAutoResolution;
68
85
  exports.validateAvailabilityResourceAutoResolution = validateAvailabilityResourceAutoResolution;
69
86
  exports.validateAvailabilityTimeAutoResolution = validateAvailabilityTimeAutoResolution;
@@ -99,7 +99,8 @@ const getProductDurationMinutes = (context) => {
99
99
  const product = context.draft.productData;
100
100
  if (require_utils$2.isSessionProduct(product) || (product === null || product === void 0 || (_product$cartDetailVa = product.cartDetailValue) === null || _product$cartDetailVa === void 0 ? void 0 : _product$cartDetailVa.session) || (product === null || product === void 0 || (_product$_extend = product._extend) === null || _product$_extend === void 0 || (_product$_extend = _product$_extend.other) === null || _product$_extend === void 0 ? void 0 : _product$_extend.session)) return null;
101
101
  const duration = (_normalizeDurationMin = normalizeDurationMinutesValue(product === null || product === void 0 ? void 0 : product.duration)) !== null && _normalizeDurationMin !== void 0 ? _normalizeDurationMin : normalizeDurationMinutesValue(product === null || product === void 0 ? void 0 : product.service_duration);
102
- return duration ? Math.floor(duration) : null;
102
+ const normalizedDuration = duration ? Math.floor(duration) : 0;
103
+ return normalizedDuration > 0 ? normalizedDuration : null;
103
104
  };
104
105
  const isPosDurationAvailabilityContext = (context) => {
105
106
  var _product$cartDetailVa2, _product$_extend2;
@@ -166,9 +167,29 @@ const finalizeCandidateWithoutResourceStep = function() {
166
167
  return _ref3.apply(this, arguments);
167
168
  };
168
169
  }();
170
+ const clearPosSessionAutoResolutionSelection = (context, module) => {
171
+ if (context.draft.booking.startTime == null && context.draft.booking.endTime == null && context.draft.booking.duration == null && context.draft.booking.selectedCandidate == null && context.draft.booking.commitCandidate == null) return;
172
+ context.updateDraft({ booking: {
173
+ startTime: null,
174
+ endTime: null,
175
+ duration: null,
176
+ selectedCandidate: void 0,
177
+ commitCandidate: void 0
178
+ } }, {
179
+ changedFields: [
180
+ "booking.startTime",
181
+ "booking.endTime",
182
+ "booking.duration",
183
+ "booking.selectedCandidate",
184
+ "booking.commitCandidate"
185
+ ],
186
+ sourceModuleKey: module.key,
187
+ sourceModuleType: "time"
188
+ });
189
+ };
169
190
  const refreshAvailabilityTimes = function() {
170
191
  var _ref5 = require_asyncToGenerator._asyncToGenerator(function* (context, module, options = {}) {
171
- var _context$getModuleDat2, _ref4;
192
+ var _context$getModuleDat3, _ref4, _context$services$isP2, _context$services2;
172
193
  const { durationOverride, startTimeOverride, selectionIntent = "restore" } = options;
173
194
  const availability = context.services.availability;
174
195
  const allowUnavailable = context.services.allowUnavailableBookingSelection === true;
@@ -182,6 +203,8 @@ const refreshAvailabilityTimes = function() {
182
203
  const previousTimeData = context.getModuleData(module.key);
183
204
  const posCustomTimeHydrationKey = posCustomTimeAvailability && draftRequestedDuration && draftRequestedStartTime ? `${selectedDate}|${draftRequestedStartTime}|${draftRequestedDuration}` : void 0;
184
205
  const product = context.draft.productData;
206
+ const flexibleDuration = require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration);
207
+ const fixedDuration = getProductDurationMinutes(context);
185
208
  const effectiveSelectionIntent = require_posCustomTime.resolvePosFlexibleDurationRequestIntent({
186
209
  selectionIntent,
187
210
  previousSelectionIntent: previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.posCustomTimeSelectionIntent,
@@ -192,8 +215,9 @@ const refreshAvailabilityTimes = function() {
192
215
  selectionIntent: effectiveSelectionIntent,
193
216
  isEditMode: context.services.selectionFlowMode === "edit"
194
217
  });
195
- const requestedDuration = suppressFlexiblePresetOverride ? void 0 : draftRequestedDuration;
196
- const requestedStartTime = suppressFlexiblePresetOverride ? void 0 : draftRequestedStartTime;
218
+ const isPosDurationCreateRestore = posDurationAvailability && context.services.selectionFlowMode === "create" && effectiveSelectionIntent === "restore";
219
+ const requestedDuration = suppressFlexiblePresetOverride ? void 0 : isPosDurationCreateRestore && !flexibleDuration ? fixedDuration !== null && fixedDuration !== void 0 ? fixedDuration : void 0 : draftRequestedDuration;
220
+ const requestedStartTime = suppressFlexiblePresetOverride || isPosDurationCreateRestore ? void 0 : draftRequestedStartTime;
197
221
  context.setModuleData(module.key, {
198
222
  requestId,
199
223
  timeSlots: [],
@@ -209,42 +233,55 @@ const refreshAvailabilityTimes = function() {
209
233
  partySize: require_availabilityModel.resolveSelectionFlowQueryPartySize(context.draft, availability.partySize)
210
234
  }, requestedDuration ? require_objectSpread2._objectSpread2({ durationMinutesByProductId: { [String(availability.productId)]: requestedDuration } }, requestedStartTime ? { durationStartTimesByProductId: { [String(availability.productId)]: [requestedStartTime] } } : {}) : {}))).find((item) => String(item.productId) === String(availability.productId));
211
235
  const candidates = (group === null || group === void 0 ? void 0 : group.ranges) || [];
212
- if (posDurationAvailability && effectiveSelectionIntent === "restore" && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) && candidates.length === 0) {
213
- var _context$hostContext, _moduleOptions$slice, _context$draft$bookin2, _normalizeDurationMin3;
236
+ const posDurationFallbackStartTime = posDurationAvailability ? require_posCustomTime.resolvePosDurationFallbackStartTime({
237
+ presentationPlatform: context.services.presentationPlatform,
238
+ selectionFlowMode: context.services.selectionFlowMode,
239
+ allowUnavailableBookingSelection: allowUnavailable,
240
+ selectionIntent: effectiveSelectionIntent,
241
+ groupKind: group === null || group === void 0 ? void 0 : group.kind,
242
+ candidateCount: candidates.length,
243
+ hasValidDuration: flexibleDuration || fixedDuration !== null,
244
+ selectedDate,
245
+ selectionFlowOpenedAt: context.services.selectionFlowOpenedAt
246
+ }) : null;
247
+ if (posDurationFallbackStartTime) {
248
+ var _context$getModuleDat, _context$hostContext, _moduleOptions$slice, _context$draft$bookin2, _normalizeDurationMin3;
249
+ if (((_context$getModuleDat = context.getModuleData(module.key)) === null || _context$getModuleDat === void 0 ? void 0 : _context$getModuleDat.requestId) !== requestId) return;
214
250
  const moduleOptions = require_index$1.getModuleOptions(module);
215
251
  const configuredSlice = (_context$hostContext = context.hostContext) === null || _context$hostContext === void 0 || (_context$hostContext = _context$hostContext.bookingConfig) === null || _context$hostContext === void 0 || (_context$hostContext = _context$hostContext.config) === null || _context$hostContext === void 0 || (_context$hostContext = _context$hostContext.basic) === null || _context$hostContext === void 0 ? void 0 : _context$hostContext.service_time;
216
252
  const fallbackSlice = (_moduleOptions$slice = moduleOptions.slice) !== null && _moduleOptions$slice !== void 0 ? _moduleOptions$slice : typeof configuredSlice === "object" ? configuredSlice === null || configuredSlice === void 0 ? void 0 : configuredSlice.value : configuredSlice;
217
253
  const baseDurationMinutes = require_posCustomTime.resolvePosCustomTimeBaseMinutes(getProductDurationMinutes(context), group === null || group === void 0 ? void 0 : group.slotStepMinutes, fallbackSlice);
218
- const resetForSelectedDate = require_posCustomTime.shouldResetPosFlexibleTimeForDate((_context$draft$bookin2 = context.draft.booking.selectedCandidate) !== null && _context$draft$bookin2 !== void 0 ? _context$draft$bookin2 : previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.selectedCandidate, selectedDate);
219
- const nextStartTime = require_posCustomTime.resolvePosCustomTimeDefaultStartTime(resetForSelectedDate ? null : context.draft.booking.startTime, baseDurationMinutes);
220
- const nextDuration = require_posCustomTime.resolvePosCustomTimeDefaultDurationMinutes(resetForSelectedDate ? product === null || product === void 0 ? void 0 : product.duration : (_normalizeDurationMin3 = normalizeDurationMinutesValue(context.draft.booking.duration)) !== null && _normalizeDurationMin3 !== void 0 ? _normalizeDurationMin3 : context.draft.booking.duration, baseDurationMinutes);
254
+ const nextDuration = require_posCustomTime.resolvePosDurationFallbackDurationMinutes({
255
+ isFlexibleDuration: flexibleDuration,
256
+ productDurationMinutes: fixedDuration,
257
+ durationValue: require_posCustomTime.shouldResetPosFlexibleTimeForDate((_context$draft$bookin2 = context.draft.booking.selectedCandidate) !== null && _context$draft$bookin2 !== void 0 ? _context$draft$bookin2 : previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.selectedCandidate, selectedDate) ? product === null || product === void 0 ? void 0 : product.duration : (_normalizeDurationMin3 = normalizeDurationMinutesValue(context.draft.booking.duration)) !== null && _normalizeDurationMin3 !== void 0 ? _normalizeDurationMin3 : context.draft.booking.duration,
258
+ baseDurationMinutes
259
+ });
221
260
  const changedFields = [];
222
- if (nextStartTime !== context.draft.booking.startTime) changedFields.push("booking.startTime");
261
+ if (posDurationFallbackStartTime !== context.draft.booking.startTime) changedFields.push("booking.startTime");
223
262
  if (nextDuration !== context.draft.booking.duration) changedFields.push("booking.duration");
224
263
  if (context.draft.booking.selectedCandidate) changedFields.push("booking.selectedCandidate");
225
264
  if (context.draft.booking.commitCandidate) changedFields.push("booking.commitCandidate");
226
- if (changedFields.length > 0 && nextStartTime) {
227
- context.updateDraft({ booking: {
228
- startTime: nextStartTime,
229
- duration: nextDuration,
230
- selectedCandidate: void 0,
231
- commitCandidate: void 0
232
- } }, {
233
- changedFields,
234
- sourceModuleKey: module.key,
235
- sourceModuleType: "time"
236
- });
237
- yield refreshAvailabilityTimes(context, module, {
238
- durationOverride: nextDuration,
239
- startTimeOverride: nextStartTime,
240
- selectionIntent: "fallback"
241
- });
242
- return;
243
- }
265
+ if (changedFields.length > 0) context.updateDraft({ booking: {
266
+ startTime: posDurationFallbackStartTime,
267
+ duration: nextDuration,
268
+ selectedCandidate: void 0,
269
+ commitCandidate: void 0
270
+ } }, {
271
+ changedFields,
272
+ sourceModuleKey: module.key,
273
+ sourceModuleType: "time"
274
+ });
275
+ yield refreshAvailabilityTimes(context, module, {
276
+ durationOverride: nextDuration,
277
+ startTimeOverride: posDurationFallbackStartTime,
278
+ selectionIntent: "fallback"
279
+ });
280
+ return;
244
281
  }
245
282
  if (candidates.length === 0) {
246
- var _context$getModuleDat;
247
- if (((_context$getModuleDat = context.getModuleData(module.key)) === null || _context$getModuleDat === void 0 ? void 0 : _context$getModuleDat.requestId) !== requestId) return;
283
+ var _context$getModuleDat2, _context$services$isP, _context$services;
284
+ if (((_context$getModuleDat2 = context.getModuleData(module.key)) === null || _context$getModuleDat2 === void 0 ? void 0 : _context$getModuleDat2.requestId) !== requestId) return;
248
285
  context.setModuleData(module.key, {
249
286
  requestId,
250
287
  timeSlots: [],
@@ -253,6 +290,7 @@ const refreshAvailabilityTimes = function() {
253
290
  posCustomTimeHydrationKey,
254
291
  posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
255
292
  });
293
+ if (posSessionAvailability && ((_context$services$isP = (_context$services = context.services).isPosAutoResolutionActive) === null || _context$services$isP === void 0 ? void 0 : _context$services$isP.call(_context$services)) === true) clearPosSessionAutoResolutionSelection(context, module);
256
294
  return;
257
295
  }
258
296
  const result = yield availability.queryBookingAvailability(availability.contextId, {
@@ -261,7 +299,7 @@ const refreshAvailabilityTimes = function() {
261
299
  candidates,
262
300
  partySize: require_availabilityModel.resolveSelectionFlowQueryPartySize(context.draft, availability.partySize)
263
301
  });
264
- if (((_context$getModuleDat2 = context.getModuleData(module.key)) === null || _context$getModuleDat2 === void 0 ? void 0 : _context$getModuleDat2.requestId) !== requestId) return;
302
+ if (((_context$getModuleDat3 = context.getModuleData(module.key)) === null || _context$getModuleDat3 === void 0 ? void 0 : _context$getModuleDat3.requestId) !== requestId) return;
265
303
  const timeGroup = result.data.find((item) => String(item === null || item === void 0 ? void 0 : item.productId) === String(availability.productId));
266
304
  const times = Array.isArray(timeGroup === null || timeGroup === void 0 ? void 0 : timeGroup.times) ? timeGroup.times : [];
267
305
  const existingCandidate = context.draft.booking.selectedCandidate;
@@ -304,9 +342,10 @@ const refreshAvailabilityTimes = function() {
304
342
  const selectableCandidates = normallySelectableCandidates.length > 0 || !allowUnavailable ? normallySelectableCandidates : times;
305
343
  const shouldPreserveRequestedPosStart = posCustomTimeAvailability && Boolean(requestedPosStartTime && requestedPosDuration);
306
344
  const displayCandidates = posSessionAvailability ? require_posCustomTime.getSessionPresetCandidates(times) : posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? require_posCustomTime.getPosFlexibleDurationPresetCandidates(times, requestedCustomRange, customSelectionIntent, Boolean(!customSelectionIntent && existingCandidate && existingCandidate.date === selectedDate && (previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.timeSlots.some((slot) => String(slot.id) === String(existingCandidate.key))))) : times;
345
+ const restrictPosSessionAutoResolution = posSessionAvailability && ((_context$services$isP2 = (_context$services2 = context.services).isPosAutoResolutionActive) === null || _context$services$isP2 === void 0 ? void 0 : _context$services$isP2.call(_context$services2)) === true;
307
346
  const fallbackCandidate = shouldPreserveRequestedPosStart ? void 0 : selectableCandidates[0];
308
347
  const preferPosFlexiblePreset = posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) && !customSelectionIntent && context.services.selectionFlowMode !== "edit" && (selectionIntent === "fallback" || !existingCandidate || existingCandidate.date !== selectedDate);
309
- const initialCandidate = posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? require_posCustomTime.resolvePosFlexibleDurationInitialCandidate({
348
+ const initialCandidate = restrictPosSessionAutoResolution ? require_autoResolution.resolveFirstPosSessionAutoCandidate(displayCandidates) : posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? require_posCustomTime.resolvePosFlexibleDurationInitialCandidate({
310
349
  presetCandidates: displayCandidates,
311
350
  restoredCandidate,
312
351
  fallbackCandidate,
@@ -329,6 +368,7 @@ const refreshAvailabilityTimes = function() {
329
368
  posCustomTimeHydrationKey,
330
369
  posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
331
370
  });
371
+ if (restrictPosSessionAutoResolution && !initialCandidate) clearPosSessionAutoResolutionSelection(context, module);
332
372
  const shouldWriteInitialCandidate = Boolean(initialCandidate) && (posCustomTimeAvailability || !existingCandidate || initialCandidate.key !== existingCandidate.key);
333
373
  if (initialCandidate && shouldWriteInitialCandidate) {
334
374
  const startAt = (0, dayjs.default)(initialCandidate.startAt);
@@ -380,9 +420,9 @@ const normalizeSelectionDuration = (duration) => {
380
420
  return null;
381
421
  };
382
422
  const buildTimeCacheItem = (context, startTime, duration) => {
383
- var _context$getModuleDat3;
423
+ var _context$getModuleDat4;
384
424
  const resourceModule = context.steps.flatMap((step) => step.modules).find((item) => item.type === "resource");
385
- const cacheItem = require_index$1.buildDraftCacheItem(context, resourceModule ? (_context$getModuleDat3 = context.getModuleData(resourceModule.key)) === null || _context$getModuleDat3 === void 0 ? void 0 : _context$getModuleDat3.cacheItem : void 0);
425
+ const cacheItem = require_index$1.buildDraftCacheItem(context, resourceModule ? (_context$getModuleDat4 = context.getModuleData(resourceModule.key)) === null || _context$getModuleDat4 === void 0 ? void 0 : _context$getModuleDat4.cacheItem : void 0);
386
426
  return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, cacheItem), {}, { _extend: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, (cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem._extend) || {}), {}, {
387
427
  start_time: startTime,
388
428
  duration
@@ -436,9 +476,9 @@ const getFlexibleDuration = (timeObj) => {
436
476
  return (timeObj === null || timeObj === void 0 || (_timeObj$durationSlic = timeObj.durationSlicesBasedOnTime) === null || _timeObj$durationSlic === void 0 || (_timeObj$durationSlic = _timeObj$durationSlic.find((item) => typeof (item === null || item === void 0 ? void 0 : item.value) === "string" && item.value.startsWith("flexible_") && !item.disabled)) === null || _timeObj$durationSlic === void 0 ? void 0 : _timeObj$durationSlic.value) || (timeObj === null || timeObj === void 0 || (_timeObj$durationSlic2 = timeObj.durationSlicesBasedOnTime) === null || _timeObj$durationSlic2 === void 0 || (_timeObj$durationSlic2 = _timeObj$durationSlic2.find((item) => typeof (item === null || item === void 0 ? void 0 : item.value) === "string" && item.value.startsWith("flexible_"))) === null || _timeObj$durationSlic2 === void 0 ? void 0 : _timeObj$durationSlic2.value);
437
477
  };
438
478
  const resolveInitialDuration = (context) => {
439
- var _context$services$get, _context$services, _serviceCacheItem$_ex, _serviceCacheItem$_ex2, _context$draft$produc, _context$draft$produc2, _timeObj$durationSlic3, _ref6, _configuredOption$val, _timeObj$durationSlic4;
479
+ var _context$services$get, _context$services3, _serviceCacheItem$_ex, _serviceCacheItem$_ex2, _context$draft$produc, _context$draft$produc2, _timeObj$durationSlic3, _ref6, _configuredOption$val, _timeObj$durationSlic4;
440
480
  if (hasDurationValue(context.draft.booking.duration)) return context.draft.booking.duration;
441
- const serviceCacheItem = (_context$services$get = (_context$services = context.services).getCurrentCacheItem) === null || _context$services$get === void 0 ? void 0 : _context$services$get.call(_context$services);
481
+ const serviceCacheItem = (_context$services$get = (_context$services3 = context.services).getCurrentCacheItem) === null || _context$services$get === void 0 ? void 0 : _context$services$get.call(_context$services3);
442
482
  const existingDuration = normalizeSelectionDuration((_serviceCacheItem$_ex = serviceCacheItem === null || serviceCacheItem === void 0 || (_serviceCacheItem$_ex2 = serviceCacheItem._extend) === null || _serviceCacheItem$_ex2 === void 0 ? void 0 : _serviceCacheItem$_ex2.duration) !== null && _serviceCacheItem$_ex !== void 0 ? _serviceCacheItem$_ex : (_context$draft$produc = context.draft.productData) === null || _context$draft$produc === void 0 || (_context$draft$produc = _context$draft$produc._extend) === null || _context$draft$produc === void 0 ? void 0 : _context$draft$produc.duration);
443
483
  if (hasDurationValue(existingDuration)) return existingDuration;
444
484
  const { timeObj } = getTimeRuntime(context, context.draft.booking.startTime, null);
@@ -22,19 +22,23 @@ const resolvePosCustomTimeBaseMinutes = (...values) => {
22
22
  }
23
23
  return 30;
24
24
  };
25
- const resolvePosCustomTimeDefaultStartTime = (currentValue, sliceMinutes, now) => {
25
+ const resolvePosCustomTimeDefaultStartTime = (currentValue, _sliceMinutes, now) => {
26
26
  if (typeof currentValue === "string") {
27
27
  const matched = currentValue.trim().match(/^([01]\d|2[0-3]):([0-5]\d)(?::[0-5]\d)?$/);
28
28
  if (matched) return `${matched[1]}:${matched[2]}`;
29
29
  }
30
30
  const current = now === void 0 ? (0, dayjs.default)() : (0, dayjs.default)(now);
31
31
  if (!current.isValid()) return null;
32
- const step = Math.min(resolvePosCustomTimeBaseMinutes(sliceMinutes), 1440);
33
- const minuteOfDay = current.hour() * 60 + current.minute();
34
- const alignedMinute = Math.floor(minuteOfDay / step) * step;
35
- const hours = Math.floor(alignedMinute / 60);
36
- const minutes = alignedMinute % 60;
37
- return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
32
+ return current.format("HH:mm");
33
+ };
34
+ const resolvePosDurationFallbackStartTime = (params) => {
35
+ if (params.presentationPlatform !== "pos" || params.selectionFlowMode !== "create" || params.allowUnavailableBookingSelection !== true || params.selectionIntent !== "restore" || params.groupKind !== "duration" || params.candidateCount !== 0 || !params.hasValidDuration || !params.selectionFlowOpenedAt) return null;
36
+ const openedAt = (0, dayjs.default)(params.selectionFlowOpenedAt);
37
+ const current = params.now === void 0 ? (0, dayjs.default)() : (0, dayjs.default)(params.now);
38
+ if (!openedAt.isValid() || !current.isValid()) return null;
39
+ const openedDate = openedAt.format("YYYY-MM-DD");
40
+ if (params.selectedDate !== openedDate || params.selectedDate !== current.format("YYYY-MM-DD")) return null;
41
+ return resolvePosCustomTimeDefaultStartTime(null, 1, params.selectionFlowOpenedAt);
38
42
  };
39
43
  const shouldResetPosFlexibleTimeForDate = (candidate, selectedDate) => Boolean(candidate && candidate.date !== selectedDate);
40
44
  const resolvePosCustomTimeDefaultDurationMinutes = (currentValue, baseDurationMinutes) => {
@@ -48,6 +52,11 @@ const resolvePosCustomTimeDefaultDurationMinutes = (currentValue, baseDurationMi
48
52
  if (Number.isFinite(currentMinutes) && currentMinutes > 0) return Math.max(1, Math.floor(currentMinutes));
49
53
  return resolvePosCustomTimeBaseMinutes(baseDurationMinutes);
50
54
  };
55
+ const resolvePosDurationFallbackDurationMinutes = (params) => {
56
+ if (params.isFlexibleDuration) return resolvePosCustomTimeDefaultDurationMinutes(params.durationValue, params.baseDurationMinutes);
57
+ const productDurationMinutes = Math.floor(Number(params.productDurationMinutes));
58
+ return Number.isFinite(productDurationMinutes) && productDurationMinutes > 0 ? productDurationMinutes : null;
59
+ };
51
60
  const shouldShowPosCustomTimeCandidateCards = (params) => params.isSessionAvailability || params.isDurationAvailability && params.candidateCount > 0;
52
61
  const getAvailabilityCandidateDurationMinutes = (candidate) => {
53
62
  const startAt = (0, dayjs.default)(candidate.startAt);
@@ -86,8 +95,8 @@ exports.isFlexibleDurationValue = isFlexibleDurationValue;
86
95
  exports.isSameAvailabilityCandidateRange = isSameAvailabilityCandidateRange;
87
96
  exports.resolvePosCustomTimeBaseMinutes = resolvePosCustomTimeBaseMinutes;
88
97
  exports.resolvePosCustomTimeCandidate = resolvePosCustomTimeCandidate;
89
- exports.resolvePosCustomTimeDefaultDurationMinutes = resolvePosCustomTimeDefaultDurationMinutes;
90
- exports.resolvePosCustomTimeDefaultStartTime = resolvePosCustomTimeDefaultStartTime;
98
+ exports.resolvePosDurationFallbackDurationMinutes = resolvePosDurationFallbackDurationMinutes;
99
+ exports.resolvePosDurationFallbackStartTime = resolvePosDurationFallbackStartTime;
91
100
  exports.resolvePosFlexibleDurationInitialCandidate = resolvePosFlexibleDurationInitialCandidate;
92
101
  exports.resolvePosFlexibleDurationRequestIntent = resolvePosFlexibleDurationRequestIntent;
93
102
  exports.shouldApplyPosFlexibleDurationOverride = shouldApplyPosFlexibleDurationOverride;
@@ -189,6 +189,10 @@ interface SelectionFlowAvailabilityService {
189
189
  interface SelectionFlowServices {
190
190
  /** 当前 Host 打开 Flow 的业务模式;编辑专属 module 通过它决定是否参与。 */
191
191
  selectionFlowMode?: 'create' | 'edit';
192
+ /** 本次 POS create 首屏是否仍处于自动推导阶段;进入人工流程后立即关闭。 */
193
+ isPosAutoResolutionActive?: () => boolean;
194
+ /** 当前 SKU Detail 弹窗打开时的稳定时间锚点,供 POS 当天兜底使用。 */
195
+ selectionFlowOpenedAt?: string;
192
196
  /** POS 旧 Edit service 是否应在资源步骤展示可编辑 Price。 */
193
197
  showServicePrice?: boolean;
194
198
  /**
@@ -214,6 +214,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
214
214
  });
215
215
  const openParamsRef = (0, react.useRef)(null);
216
216
  const openTaskIdRef = (0, react.useRef)(0);
217
+ const selectionFlowOpenedAtRef = (0, react.useRef)(null);
217
218
  const flowDateHydrationVersionRef = (0, react.useRef)(0);
218
219
  /**
219
220
  * 左侧可滚动容器 ref
@@ -623,13 +624,30 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
623
624
  if (require_isSkuOnlyDraftChange.isSkuOnlyDraftChange(previousDraft, draft)) react.default.startTransition(projectDraftToModal);
624
625
  else projectDraftToModal();
625
626
  }, [productData]);
626
- const selectionFlowServices = (0, react.useMemo)(() => {
627
+ const isPosCreateAutoResolutionEligible = (0, react.useMemo)(() => {
627
628
  var _openParamsRef$curren6;
628
- return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ((_openParamsRef$curren6 = openParamsRef.current) === null || _openParamsRef$curren6 === void 0 ? void 0 : _openParamsRef$curren6.selectionFlowServices) || {}), {}, {
629
+ return isCustomSelectionFlow && require_posAutoResolution.isPosCreateAutoResolutionCandidate({
630
+ platform: actualSelectionFlowPlatform,
631
+ selectionFlowMode: (_openParamsRef$curren6 = openParamsRef.current) === null || _openParamsRef$curren6 === void 0 || (_openParamsRef$curren6 = _openParamsRef$curren6.selectionFlowServices) === null || _openParamsRef$curren6 === void 0 ? void 0 : _openParamsRef$curren6.selectionFlowMode,
632
+ steps: compiledSelectionFlowSteps
633
+ });
634
+ }, [
635
+ actualSelectionFlowPlatform,
636
+ compiledSelectionFlowSteps,
637
+ isCustomSelectionFlow
638
+ ]);
639
+ const selectionFlowServices = (0, react.useMemo)(() => {
640
+ var _openParamsRef$curren7;
641
+ return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ((_openParamsRef$curren7 = openParamsRef.current) === null || _openParamsRef$curren7 === void 0 ? void 0 : _openParamsRef$curren7.selectionFlowServices) || {}), {}, {
642
+ isPosAutoResolutionActive: () => {
643
+ var _selectionFlowRef$cur3;
644
+ return isPosCreateAutoResolutionEligible && !posAutoResolutionAbandonedRef.current && ((_selectionFlowRef$cur3 = selectionFlowRef.current) === null || _selectionFlowRef$cur3 === void 0 ? void 0 : _selectionFlowRef$cur3.getState().currentStepIndex) === 0;
645
+ },
646
+ selectionFlowOpenedAt: selectionFlowOpenedAtRef.current || void 0,
629
647
  hydrateProductDataForDate: hydrateFlowProductDataForDate,
630
648
  getCurrentCacheItem: () => {
631
- var _selectionFlowRef$cur3;
632
- return ((_selectionFlowRef$cur3 = selectionFlowRef.current) === null || _selectionFlowRef$cur3 === void 0 ? void 0 : _selectionFlowRef$cur3.getState().draft.productData) || productData;
649
+ var _selectionFlowRef$cur4;
650
+ return ((_selectionFlowRef$cur4 = selectionFlowRef.current) === null || _selectionFlowRef$cur4 === void 0 ? void 0 : _selectionFlowRef$cur4.getState().draft.productData) || productData;
633
651
  },
634
652
  skuSelectionConfig,
635
653
  skuSelectionSkuCardConfig,
@@ -645,6 +663,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
645
663
  hydrateFlowProductDataForDate,
646
664
  isKioskPlatform,
647
665
  isMobile,
666
+ isPosCreateAutoResolutionEligible,
648
667
  productData,
649
668
  skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.allowUnavailableBookingSelection,
650
669
  skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.allowNoResourceBookingSelection,
@@ -713,18 +732,6 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
713
732
  effectiveSelectionFlowSteps,
714
733
  selectionFlowProcedureSteps
715
734
  ]);
716
- const isPosCreateAutoResolutionEligible = (0, react.useMemo)(() => {
717
- var _openParamsRef$curren7;
718
- return isCustomSelectionFlow && require_posAutoResolution.isPosCreateAutoResolutionCandidate({
719
- platform: actualSelectionFlowPlatform,
720
- selectionFlowMode: (_openParamsRef$curren7 = openParamsRef.current) === null || _openParamsRef$curren7 === void 0 || (_openParamsRef$curren7 = _openParamsRef$curren7.selectionFlowServices) === null || _openParamsRef$curren7 === void 0 ? void 0 : _openParamsRef$curren7.selectionFlowMode,
721
- steps: compiledSelectionFlowSteps
722
- });
723
- }, [
724
- actualSelectionFlowPlatform,
725
- compiledSelectionFlowSteps,
726
- isCustomSelectionFlow
727
- ]);
728
735
  const posAutoResolutionDraftKey = (0, react.useMemo)(() => require_posAutoResolution.getPosAutoResolutionDraftKey(latestSelectionFlowDraft), [latestSelectionFlowDraft]);
729
736
  (0, react.useEffect)(() => {
730
737
  const runId = posAutoResolutionRunRef.current + 1;
@@ -759,9 +766,9 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
759
766
  });
760
767
  const maxStepIndex = (0, react.useMemo)(() => Math.max(0, procedureSteps.length - 1), [procedureSteps]);
761
768
  (0, react.useLayoutEffect)(() => {
762
- var _selectionFlowRef$cur4, _selectionFlowRef$cur5, _procedureRef$current, _procedureRef$current2;
769
+ var _selectionFlowRef$cur5, _selectionFlowRef$cur6, _procedureRef$current, _procedureRef$current2;
763
770
  if (procedureSteps.length === 0) return;
764
- const sourceStepIndex = isCustomSelectionFlow ? (_selectionFlowRef$cur4 = (_selectionFlowRef$cur5 = selectionFlowRef.current) === null || _selectionFlowRef$cur5 === void 0 ? void 0 : _selectionFlowRef$cur5.getState().currentStepIndex) !== null && _selectionFlowRef$cur4 !== void 0 ? _selectionFlowRef$cur4 : currentStep : currentStep;
771
+ const sourceStepIndex = isCustomSelectionFlow ? (_selectionFlowRef$cur5 = (_selectionFlowRef$cur6 = selectionFlowRef.current) === null || _selectionFlowRef$cur6 === void 0 ? void 0 : _selectionFlowRef$cur6.getState().currentStepIndex) !== null && _selectionFlowRef$cur5 !== void 0 ? _selectionFlowRef$cur5 : currentStep : currentStep;
765
772
  const nextStepIndex = Math.min(Math.max(0, sourceStepIndex), procedureSteps.length - 1);
766
773
  if (currentStep !== nextStepIndex) setCurrentStep(nextStepIndex);
767
774
  (_procedureRef$current = procedureRef.current) === null || _procedureRef$current === void 0 || (_procedureRef$current2 = _procedureRef$current.goToStep) === null || _procedureRef$current2 === void 0 || _procedureRef$current2.call(_procedureRef$current, nextStepIndex);
@@ -799,6 +806,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
799
806
  open: function() {
800
807
  var _ref16 = require_asyncToGenerator._asyncToGenerator(function* (data) {
801
808
  var _skuDetailConfig$enab, _skuDetailConfig$isSh, _skuDetailConfig$isSh2, _skuDetailConfig$isSh3, _skuDetailConfig$isSh4, _skuDetailConfig$isSh5, _skuDetailConfig$hide, _skuDetailConfig$isSh6, _skuDetailConfig$isSh7, _skuDetailConfig$isSh8, _skuDetailConfig$exte, _skuDetailConfig$useC, _skuDetailConfig$cust, _skuDetailConfig$isCa, _skuDetailConfig, _skuDetailConfig2, _data$bundle_group, _data$_extend, _data$_extend2, _data$discount_list, _ref14, _data$_extend3, _data$_extend4, _data$_extend5, _data$discount_list$f, _data$discount_list2, _ref15, _data$_extend$priceOv, _data$_extend7;
809
+ selectionFlowOpenedAtRef.current = (0, dayjs.default)().toISOString();
802
810
  const currentTaskId = openTaskIdRef.current + 1;
803
811
  openTaskIdRef.current = currentTaskId;
804
812
  flowDateHydrationVersionRef.current += 1;
@@ -1391,7 +1399,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
1391
1399
  };
1392
1400
  const handleConfirm = function() {
1393
1401
  var _ref17 = require_asyncToGenerator._asyncToGenerator(function* (flowDraft) {
1394
- var _bookingState$booking2, _selectionFlowRef$cur6, _selectionFlowService2;
1402
+ var _bookingState$booking2, _selectionFlowRef$cur7, _selectionFlowService2;
1395
1403
  if (isCustomSelectionFlow && !flowDraft) {
1396
1404
  var _snapshot$currentStep;
1397
1405
  const flow = selectionFlowRef.current;
@@ -1504,7 +1512,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
1504
1512
  console.log("sku_detail_modal_validate_error>>>>>", error);
1505
1513
  return false;
1506
1514
  }
1507
- const flowSnapshot = flowDraft ? (_selectionFlowRef$cur6 = selectionFlowRef.current) === null || _selectionFlowRef$cur6 === void 0 ? void 0 : _selectionFlowRef$cur6.getState() : void 0;
1515
+ const flowSnapshot = flowDraft ? (_selectionFlowRef$cur7 = selectionFlowRef.current) === null || _selectionFlowRef$cur7 === void 0 ? void 0 : _selectionFlowRef$cur7.getState() : void 0;
1508
1516
  const activeFlowModuleTypes = flowSnapshot === null || flowSnapshot === void 0 ? void 0 : flowSnapshot.steps.flatMap((step) => step.modules.map((module) => module.type));
1509
1517
  const requiresBookingPrice = Boolean(flowDraft && (activeFlowModuleTypes === null || activeFlowModuleTypes === void 0 ? void 0 : activeFlowModuleTypes.includes("bookingPrice")));
1510
1518
  const expectedBookingPriceRequestKey = flowDraft ? require_bookingPrice.resolveSelectionFlowBookingPriceRequestKey(flowDraft, selectionFlowServices.bookingPrice) : void 0;
@@ -1658,8 +1666,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
1658
1666
  if (isWeighingProduct$1) return;
1659
1667
  if (value && value > 0) {
1660
1668
  if (value !== quantity && isCustomSelectionFlow && isKioskPlatform) {
1661
- var _selectionFlowRef$cur7;
1662
- const snapshot = (_selectionFlowRef$cur7 = selectionFlowRef.current) === null || _selectionFlowRef$cur7 === void 0 ? void 0 : _selectionFlowRef$cur7.getState();
1669
+ var _selectionFlowRef$cur8;
1670
+ const snapshot = (_selectionFlowRef$cur8 = selectionFlowRef.current) === null || _selectionFlowRef$cur8 === void 0 ? void 0 : _selectionFlowRef$cur8.getState();
1663
1671
  const reviewStepIndex = snapshot ? require_revalidateBookingSelection.getLateQuantityReviewStepIndex(snapshot.steps, snapshot.currentStepIndex) : null;
1664
1672
  if (reviewStepIndex != null) lateQuantityReviewStepIndexRef.current = reviewStepIndex;
1665
1673
  }
@@ -1935,9 +1943,9 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
1935
1943
  if (openTaskIdRef.current !== selectionFlowInstanceKey) return;
1936
1944
  setCompiledSelectionFlowSteps(steps);
1937
1945
  if (steps.length === 0 && typeof ((_openParamsRef$curren8 = openParamsRef.current) === null || _openParamsRef$curren8 === void 0 ? void 0 : _openParamsRef$curren8.onSelectionFlowNotApplicable) === "function") {
1938
- var _selectionFlowRef$cur8;
1946
+ var _selectionFlowRef$cur9;
1939
1947
  const onNotApplicable = openParamsRef.current.onSelectionFlowNotApplicable;
1940
- const latestProductData = ((_selectionFlowRef$cur8 = selectionFlowRef.current) === null || _selectionFlowRef$cur8 === void 0 ? void 0 : _selectionFlowRef$cur8.getState().draft.productData) || productData;
1948
+ const latestProductData = ((_selectionFlowRef$cur9 = selectionFlowRef.current) === null || _selectionFlowRef$cur9 === void 0 ? void 0 : _selectionFlowRef$cur9.getState().draft.productData) || productData;
1941
1949
  if (latestProductData) {
1942
1950
  if (onNotApplicable({
1943
1951
  productData: latestProductData,
@@ -2096,15 +2104,15 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
2096
2104
  defaultCurrent: currentStep,
2097
2105
  layoutMode: "ratio",
2098
2106
  onPrev: () => {
2099
- var _selectionFlowRef$cur9;
2107
+ var _selectionFlowRef$cur10;
2100
2108
  if (!isCustomSelectionFlow) return;
2101
- return ((_selectionFlowRef$cur9 = selectionFlowRef.current) === null || _selectionFlowRef$cur9 === void 0 ? void 0 : _selectionFlowRef$cur9.back()) ? void 0 : false;
2109
+ return ((_selectionFlowRef$cur10 = selectionFlowRef.current) === null || _selectionFlowRef$cur10 === void 0 ? void 0 : _selectionFlowRef$cur10.back()) ? void 0 : false;
2102
2110
  },
2103
2111
  onStepsChange: (result) => {
2104
2112
  const nextStep = Math.min(Number(result.currentStep || 0), maxStepIndex);
2105
2113
  if (isCustomSelectionFlow) {
2106
- var _selectionFlowRef$cur10;
2107
- setCurrentStep(((_selectionFlowRef$cur10 = selectionFlowRef.current) === null || _selectionFlowRef$cur10 === void 0 ? void 0 : _selectionFlowRef$cur10.getState().currentStepIndex) || 0);
2114
+ var _selectionFlowRef$cur11;
2115
+ setCurrentStep(((_selectionFlowRef$cur11 = selectionFlowRef.current) === null || _selectionFlowRef$cur11 === void 0 ? void 0 : _selectionFlowRef$cur11.getState().currentStepIndex) || 0);
2108
2116
  return;
2109
2117
  }
2110
2118
  setCurrentStep(nextStep);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.674",
3
+ "version": "6.11.676",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -70,8 +70,8 @@
70
70
  "styled-components": "^6.0.0-rc.3",
71
71
  "use-sync-external-store": "^1.6.0",
72
72
  "@pisell/pi-payment-sdk": "0.0.3",
73
- "@pisell/utils": "3.0.4",
74
73
  "@pisell/icon": "0.0.11",
74
+ "@pisell/utils": "3.0.4",
75
75
  "@pisell/materials": "6.11.261",
76
76
  "@pisell/date-picker": "3.0.10"
77
77
  },
@@ -1 +0,0 @@
1
- export { };