@pisell/private-materials 6.12.125 → 6.12.126
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/TimeBar/index.js +1 -0
- package/es/components/bigSale/dialog.js +1 -0
- package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
- package/es/components/bigSale/index.js +1 -0
- package/es/components/bigSale/templates/Kiosk/index.js +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +2 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +5 -3
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +2 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +5 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.js +2 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/index.js +2 -0
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/pisellReservation/index.js +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +10 -5
- package/es/plus/productSelect/ProductCard/index.js +25 -5
- package/es/plus/productSelect/ProductCard/utils.js +11 -1
- package/es/plus/saleDetail/Base.js +1 -0
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
- package/es/plus/saleDetail/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/index.js +1 -0
- package/es/plus/salesSdk/index.js +48 -0
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -1
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/index.less +27 -0
- package/es/pro/skuDetailModal/flow/modules/date.js +1 -0
- package/es/pro/skuDetailModal/flow/modules/resource.js +1 -2
- package/es/pro/skuDetailModal/flow/modules/resource.less +37 -0
- package/es/pro/skuDetailModal/index.js +45 -3
- package/es/pro/skuDetailModal/index.less +12 -7
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +2 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +5 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +2 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +5 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.js +2 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +10 -5
- package/lib/plus/productSelect/ProductCard/index.js +24 -4
- package/lib/plus/productSelect/ProductCard/utils.js +11 -0
- package/lib/pro/skuDetailModal/flow/index.less +27 -0
- package/lib/pro/skuDetailModal/flow/modules/date.js +1 -0
- package/lib/pro/skuDetailModal/flow/modules/resource.js +1 -2
- package/lib/pro/skuDetailModal/flow/modules/resource.less +37 -0
- package/lib/pro/skuDetailModal/index.js +45 -3
- package/lib/pro/skuDetailModal/index.less +12 -7
- package/package.json +3 -3
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -3,8 +3,45 @@
|
|
|
3
3
|
min-height: 166px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
// ResourceDisplay 的文本头像沿用 Ant Avatar 的缩放定位规则;在 Flow 的
|
|
7
|
+
// 纵向卡片中改为由 flex 容器直接居中,避免首字母视觉上向右偏移。
|
|
8
|
+
.pisell-resource-card-empty-avatar
|
|
9
|
+
.pisell-lowcode-avatar-string,
|
|
10
|
+
.pisell-resource-card-empty-avatar .ant-avatar-string {
|
|
11
|
+
position: static;
|
|
12
|
+
left: auto;
|
|
13
|
+
width: 100%;
|
|
14
|
+
margin: 0;
|
|
15
|
+
text-align: center;
|
|
16
|
+
transform: none !important;
|
|
17
|
+
transform-origin: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 不依赖 PisellText 的默认 display/text-align,确保资源名称始终相对
|
|
21
|
+
// 整张卡片居中,而不是相对文字自身宽度居中。
|
|
22
|
+
.pisell-resource-card-info {
|
|
23
|
+
align-items: center;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pisell-resource-card-name {
|
|
28
|
+
display: block;
|
|
29
|
+
width: 100%;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
6
35
|
.selection-flow-resource-card--disabled {
|
|
7
36
|
cursor: not-allowed;
|
|
8
37
|
opacity: 0.45;
|
|
9
38
|
}
|
|
39
|
+
|
|
40
|
+
// 默认使用四列;只有真正窄于手机内容宽度时才退回两列。
|
|
41
|
+
// 需要 !important 覆盖 PisellViewGrid 写在元素上的 grid-template-columns。
|
|
42
|
+
@media (max-width: 600px) {
|
|
43
|
+
.pisell-view-grid-content {
|
|
44
|
+
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
10
47
|
}
|
|
@@ -146,6 +146,9 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
146
146
|
* - 称重商品打开弹窗时,自动滚动到底部以完整展示称重模块
|
|
147
147
|
*/
|
|
148
148
|
const leftTopRef = useRef(null);
|
|
149
|
+
/** 新 Flow 当前步骤的滚动容器;切换步骤时回到顶部。 */
|
|
150
|
+
const selectionFlowScrollRef = useRef(null);
|
|
151
|
+
const [selectionFlowCanScrollDown, setSelectionFlowCanScrollDown] = useState(false);
|
|
149
152
|
const Toast = useToast$1();
|
|
150
153
|
const logger = useLogger();
|
|
151
154
|
/**
|
|
@@ -303,6 +306,40 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
303
306
|
* 此时回退到旧详情界面,避免全局预设阻断称重等普通商品。
|
|
304
307
|
*/
|
|
305
308
|
const isCustomSelectionFlow = isCreateMode && Array.isArray(effectiveSelectionFlowSteps) && (selectionFlowProcedureSteps === null || selectionFlowProcedureSteps === void 0 ? void 0 : selectionFlowProcedureSteps.length) !== 0;
|
|
309
|
+
const updateSelectionFlowScrollAffordance = useCallback(() => {
|
|
310
|
+
const container = selectionFlowScrollRef.current;
|
|
311
|
+
if (!container) {
|
|
312
|
+
setSelectionFlowCanScrollDown(false);
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
setSelectionFlowCanScrollDown(container.scrollHeight - container.scrollTop - container.clientHeight > 2);
|
|
316
|
+
}, []);
|
|
317
|
+
useLayoutEffect(() => {
|
|
318
|
+
if (!open || !isCustomSelectionFlow) {
|
|
319
|
+
setSelectionFlowCanScrollDown(false);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
const container = selectionFlowScrollRef.current;
|
|
323
|
+
container === null || container === void 0 || container.scrollTo({
|
|
324
|
+
top: 0,
|
|
325
|
+
behavior: "auto"
|
|
326
|
+
});
|
|
327
|
+
const animationFrame = requestAnimationFrame(updateSelectionFlowScrollAffordance);
|
|
328
|
+
if (!container || typeof ResizeObserver === "undefined") return () => cancelAnimationFrame(animationFrame);
|
|
329
|
+
const resizeObserver = new ResizeObserver(updateSelectionFlowScrollAffordance);
|
|
330
|
+
resizeObserver.observe(container);
|
|
331
|
+
Array.from(container.children).forEach((child) => resizeObserver.observe(child));
|
|
332
|
+
return () => {
|
|
333
|
+
cancelAnimationFrame(animationFrame);
|
|
334
|
+
resizeObserver.disconnect();
|
|
335
|
+
};
|
|
336
|
+
}, [
|
|
337
|
+
currentStep,
|
|
338
|
+
isCustomSelectionFlow,
|
|
339
|
+
open,
|
|
340
|
+
selectionFlowInstanceKey,
|
|
341
|
+
updateSelectionFlowScrollAffordance
|
|
342
|
+
]);
|
|
306
343
|
const selectionFlowInitialDraft = useMemo(() => {
|
|
307
344
|
var _openParamsRef$curren, _resolvedSkuValue$bun, _resolvedSkuValue$opt, _bookingState$client, _extend$duration, _openParamsRef$curren2, _openParamsRef$curren3;
|
|
308
345
|
if (!isCustomSelectionFlow || !productData) return null;
|
|
@@ -1280,7 +1317,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1280
1317
|
};
|
|
1281
1318
|
const rightContent = () => {
|
|
1282
1319
|
if (detailLoading || !productData) return /* @__PURE__ */ React.createElement("div", { className: "sku-detail-right-content" }, renderLoadingPanel());
|
|
1283
|
-
if (isCustomSelectionFlow && selectionFlowInitialDraft) return /* @__PURE__ */ React.createElement("div", { className: "sku-detail-
|
|
1320
|
+
if (isCustomSelectionFlow && selectionFlowInitialDraft) return /* @__PURE__ */ React.createElement("div", { className: classNames("sku-detail-selection-flow-scroll-shell", selectionFlowCanScrollDown && "sku-detail-selection-flow-scroll-shell--can-scroll-down") }, /* @__PURE__ */ React.createElement("div", {
|
|
1321
|
+
ref: selectionFlowScrollRef,
|
|
1322
|
+
className: "sku-detail-right-content sku-detail-right-content--selection-flow",
|
|
1323
|
+
onScroll: updateSelectionFlowScrollAffordance
|
|
1324
|
+
}, isMobile && (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProductSummary) ? renderProductSummary() : null, shouldRenderMobileWeighing ? /* @__PURE__ */ React.createElement("div", { className: "sku-detail-mobile-weighing" }, renderWeighingSection()) : null, /* @__PURE__ */ React.createElement(ForwardedSelectionFlow, {
|
|
1284
1325
|
key: selectionFlowInstanceKey,
|
|
1285
1326
|
ref: selectionFlowRef,
|
|
1286
1327
|
steps: effectiveSelectionFlowSteps || [],
|
|
@@ -1334,7 +1375,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1334
1375
|
onCancel: () => {
|
|
1335
1376
|
if (openTaskIdRef.current === selectionFlowInstanceKey) handleCancel();
|
|
1336
1377
|
}
|
|
1337
|
-
}));
|
|
1378
|
+
})));
|
|
1338
1379
|
const shouldRenderSkuSelection = (isMobile || currentStep === 1) && hasSkuOptions;
|
|
1339
1380
|
const shouldRenderMobileProductDetails = isMobile && (!isCreateMode || !!(skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProductSummary));
|
|
1340
1381
|
const shouldRenderProductSummary = shouldRenderSkuSelection || shouldRenderMobileProductDetails;
|
|
@@ -1382,13 +1423,14 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1382
1423
|
closable: false,
|
|
1383
1424
|
destroyOnClose: true,
|
|
1384
1425
|
style: { maxHeight: variant === "phone" ? "95dvh" : void 0 },
|
|
1385
|
-
height: variant === "phone" ? "auto" : void 0,
|
|
1426
|
+
height: variant === "phone" ? isCustomSelectionFlow ? "clamp(600px, 50dvh, 1600px)" : "auto" : void 0,
|
|
1386
1427
|
width: variant === "phone" ? "100%" : "80%",
|
|
1387
1428
|
className: classNames({
|
|
1388
1429
|
"pisell-sku-detail-modal": variant !== "phone",
|
|
1389
1430
|
"pisell-sku-detail-modal--smallTablet": variant !== "phone" && variant === "smallTablet",
|
|
1390
1431
|
"pisell-sku-detail-modal--tablet": variant !== "phone" && variant === "tablet",
|
|
1391
1432
|
"pisell-sku-detail-drawer": variant === "phone",
|
|
1433
|
+
"pisell-sku-detail-drawer--selection-flow": variant === "phone" && isCustomSelectionFlow,
|
|
1392
1434
|
"aside-full": isWeighingProductWithoutSku && !shouldRenderMobileWeighing
|
|
1393
1435
|
}),
|
|
1394
1436
|
placement: variant === "phone" ? "bottom" : void 0
|
|
@@ -897,13 +897,18 @@
|
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
|
|
900
|
-
//
|
|
901
|
-
//
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
900
|
+
// 预约步骤的内容量差异很大:时间片可能很多,资源也可能只有一两个。
|
|
901
|
+
// Flow Drawer 使用稳定的外壳高度,中间内容区沿用上方的 overflow-y:auto;
|
|
902
|
+
// 普通商品没有该修饰类,仍保持原来的内容自适应高度。
|
|
903
|
+
.pisell-sku-detail-drawer--selection-flow {
|
|
904
|
+
max-height: 95dvh;
|
|
905
|
+
|
|
906
|
+
.pisell-lowcode-floating-layer-content,
|
|
907
|
+
.pisell-lowcode-drawer-content,
|
|
908
|
+
.pisell-lowcode-floating-layer-body,
|
|
909
|
+
.pisell-lowcode-drawer-body {
|
|
910
|
+
height: 100%;
|
|
911
|
+
min-height: 0;
|
|
907
912
|
}
|
|
908
913
|
}
|
|
909
914
|
|
|
@@ -10,7 +10,7 @@ let _pisell_materials = require("@pisell/materials");
|
|
|
10
10
|
require("./index.less");
|
|
11
11
|
//#region src/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.tsx
|
|
12
12
|
const WeekItem = (props) => {
|
|
13
|
-
const { weekList, currentDate, setCurrentDate, isActive, productId, dateLimitData, getLimitData, cutTime, showStatusBar = true, ignoreAvailabilityDisabled = false, minSelectableDate, enableRangeSelection = false, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader = false, disableCallToBook = false, onPrevWeek, onNextWeek, showNavigation = true } = props;
|
|
13
|
+
const { weekList, currentDate, setCurrentDate, isActive, productId, dateLimitData, getLimitData, cutTime, showStatusBar = true, ignoreAvailabilityDisabled = false, minSelectableDate, minViewDate, enableRangeSelection = false, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader = false, disableCallToBook = false, onPrevWeek, onNextWeek, showNavigation = true } = props;
|
|
14
14
|
const [monthIndex, setMonthIndex] = (0, react.useState)([]);
|
|
15
15
|
(0, react.useEffect)(() => {
|
|
16
16
|
if (isActive && productId) {}
|
|
@@ -22,7 +22,7 @@ const WeekItem = (props) => {
|
|
|
22
22
|
(0, react.useEffect)(() => {
|
|
23
23
|
setMonthIndex(require_utils.getMonthIndex(weekList));
|
|
24
24
|
}, [weekList]);
|
|
25
|
-
const prevWeekDisabled = minSelectableDate && (weekList === null || weekList === void 0 ? void 0 : weekList[0]) && (0, dayjs.default)(weekList[0]).subtract(1, "day").isBefore((0, dayjs.default)(minSelectableDate), "day");
|
|
25
|
+
const prevWeekDisabled = (minViewDate || minSelectableDate) && (weekList === null || weekList === void 0 ? void 0 : weekList[0]) && (0, dayjs.default)(weekList[0]).subtract(1, "day").isBefore((0, dayjs.default)(minViewDate || minSelectableDate), "day");
|
|
26
26
|
return /* @__PURE__ */ React.createElement("div", { className: "week-item-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "week-item-content" }, showNavigation ? /* @__PURE__ */ React.createElement(_pisell_materials.Iconfont, {
|
|
27
27
|
type: "pisell2-arrow-left",
|
|
28
28
|
className: "week-item__icon",
|
|
@@ -12,7 +12,7 @@ classnames = require_runtime.__toESM(classnames);
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
//#region src/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.tsx
|
|
14
14
|
const CalenDateWeek = (props) => {
|
|
15
|
-
const { currentDate, dateChange, productId, timeList, dateLimitData, getLimitData, cutTime, showStatusBar = true, showDisabledStatus = true, ignoreAvailabilityDisabled = false, minSelectableDate, enableRangeSelection = false, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader = false, enableSwipeNavigation = false, disableCallToBook = false } = props;
|
|
15
|
+
const { currentDate, dateChange, productId, timeList, dateLimitData, getLimitData, cutTime, showStatusBar = true, showDisabledStatus = true, ignoreAvailabilityDisabled = false, minSelectableDate, minViewDate, enableRangeSelection = false, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader = false, enableSwipeNavigation = false, disableCallToBook = false } = props;
|
|
16
16
|
const [weekList, setWeekList] = (0, react.useState)([]);
|
|
17
17
|
const [weekAnchorDate, setWeekAnchorDate] = (0, react.useState)(currentDate);
|
|
18
18
|
const [pendingWeekList, setPendingWeekList] = (0, react.useState)(null);
|
|
@@ -87,7 +87,8 @@ const CalenDateWeek = (props) => {
|
|
|
87
87
|
if (weekListRef === null || weekListRef === void 0 ? void 0 : weekListRef.current) weekListRef.current.scrollLeft = 0;
|
|
88
88
|
}, [currentDate, weekList]);
|
|
89
89
|
const resolveWeekNavigation = (direction) => {
|
|
90
|
-
const
|
|
90
|
+
const minimumViewDate = minViewDate || minSelectableDate;
|
|
91
|
+
const minDate = minimumViewDate ? (0, dayjs.default)(minimumViewDate).startOf("day") : null;
|
|
91
92
|
const nextDate = (0, dayjs.default)(weekAnchorDate).add(direction * 7, "day");
|
|
92
93
|
const nextAnchorDate = direction < 0 && minDate && nextDate.isBefore(minDate, "day") ? minDate.format("YYYY-MM-DD") : nextDate.format("YYYY-MM-DD");
|
|
93
94
|
const nextWeekList = initCurrentWeekData(nextAnchorDate);
|
|
@@ -184,6 +185,7 @@ const CalenDateWeek = (props) => {
|
|
|
184
185
|
showStatusBar,
|
|
185
186
|
ignoreAvailabilityDisabled,
|
|
186
187
|
minSelectableDate,
|
|
188
|
+
minViewDate,
|
|
187
189
|
enableRangeSelection,
|
|
188
190
|
selectedRangeStartDate,
|
|
189
191
|
selectedRangeEndDate,
|
|
@@ -193,7 +195,7 @@ const CalenDateWeek = (props) => {
|
|
|
193
195
|
onNextWeek: () => handleWeekNavigate(1),
|
|
194
196
|
showNavigation: !enableSwipeNavigation
|
|
195
197
|
});
|
|
196
|
-
const prevWeekDisabled = Boolean(minSelectableDate && (weekList === null || weekList === void 0 ? void 0 : weekList[0]) && (0, dayjs.default)(weekList[0]).subtract(1, "day").isBefore((0, dayjs.default)(minSelectableDate), "day"));
|
|
198
|
+
const prevWeekDisabled = Boolean((minViewDate || minSelectableDate) && (weekList === null || weekList === void 0 ? void 0 : weekList[0]) && (0, dayjs.default)(weekList[0]).subtract(1, "day").isBefore((0, dayjs.default)(minViewDate || minSelectableDate), "day"));
|
|
197
199
|
return /* @__PURE__ */ React.createElement("div", { className: "calendar-week-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-week-navigation" }, enableSwipeNavigation ? /* @__PURE__ */ React.createElement(_pisell_materials.Iconfont, {
|
|
198
200
|
type: "pisell2-arrow-left",
|
|
199
201
|
className: "calendar-week-navigation__icon",
|
|
@@ -15,7 +15,7 @@ let classnames = require("classnames");
|
|
|
15
15
|
classnames = require_runtime.__toESM(classnames);
|
|
16
16
|
require("./index.less");
|
|
17
17
|
//#region src/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.tsx
|
|
18
|
-
const SelectDate = ({ currentDate, detail, currentDateChange, setSurplusDisabledChange, cutTime, setCutTime, showCalendarPopup, showStatusLegend = true, showDateStatusBar = true, title = "Select a date", showHeader = true, showDisabledStatus = true, ignoreAvailabilityDisabled = false, minSelectableDate, enableRangeSelection = false, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader = false, enableWeekSwipe = false, availabilityDates }, ref) => {
|
|
18
|
+
const SelectDate = ({ currentDate, detail, currentDateChange, setSurplusDisabledChange, cutTime, setCutTime, showCalendarPopup, showStatusLegend = true, showDateStatusBar = true, title = "Select a date", showHeader = true, showDisabledStatus = true, ignoreAvailabilityDisabled = false, minSelectableDate, minViewDate, enableRangeSelection = false, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader = false, enableWeekSwipe = false, availabilityDates }, ref) => {
|
|
19
19
|
const [dateLimitData, setDateLimitData] = (0, react.useState)(require_mock.mock.availability_calendar.limitData);
|
|
20
20
|
/**
|
|
21
21
|
* UBS 日期结果只负责状态展示,不伪造旧事件预约的 times/库存结构。
|
|
@@ -71,6 +71,7 @@ const SelectDate = ({ currentDate, detail, currentDateChange, setSurplusDisabled
|
|
|
71
71
|
showDisabledStatus,
|
|
72
72
|
ignoreAvailabilityDisabled,
|
|
73
73
|
minSelectableDate,
|
|
74
|
+
minViewDate,
|
|
74
75
|
enableRangeSelection,
|
|
75
76
|
selectedRangeStartDate,
|
|
76
77
|
selectedRangeEndDate,
|
|
@@ -32,6 +32,11 @@ interface BookingAvailabilityCalendarProps {
|
|
|
32
32
|
showDisabledStatus?: boolean;
|
|
33
33
|
ignoreAvailabilityDisabled?: boolean;
|
|
34
34
|
minSelectableDate?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 周历允许查看的最早日期;未传时继续沿用 minSelectableDate。
|
|
37
|
+
* 该值只控制翻页边界,不会让不可选日期变成可选。
|
|
38
|
+
*/
|
|
39
|
+
minViewDate?: string;
|
|
35
40
|
enableRangeSelection?: boolean;
|
|
36
41
|
selectedRangeStartDate?: string;
|
|
37
42
|
selectedRangeEndDate?: string;
|
|
@@ -12,7 +12,7 @@ require("./index.less");
|
|
|
12
12
|
const BookingAvailabilityCalendar = (props) => {
|
|
13
13
|
var _mock$availability_ca, _mock$availability_ca2, _mock$availability_ca3;
|
|
14
14
|
_pisell_utils.locales.init(require_locales.default, _pisell_utils.locales.locale || "en");
|
|
15
|
-
const { showCalendarPopup, onDateChange, detail = (_mock$availability_ca = require_mock.mock.availability_calendar) === null || _mock$availability_ca === void 0 ? void 0 : _mock$availability_ca.detail, currentDate = (_mock$availability_ca2 = require_mock.mock.availability_calendar) === null || _mock$availability_ca2 === void 0 ? void 0 : _mock$availability_ca2.currentDate, cutTime = (_mock$availability_ca3 = require_mock.mock.availability_calendar) === null || _mock$availability_ca3 === void 0 ? void 0 : _mock$availability_ca3.cutTime, onCurrentDateChange, onCutTimeChange, onSurplusDisabledChange, showStatusLegend = true, showDateStatusBar = true, theme = "light", className, title, showHeader, showDisabledStatus, ignoreAvailabilityDisabled, minSelectableDate, enableRangeSelection, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader, enableWeekSwipe, availabilityDates } = props;
|
|
15
|
+
const { showCalendarPopup, onDateChange, detail = (_mock$availability_ca = require_mock.mock.availability_calendar) === null || _mock$availability_ca === void 0 ? void 0 : _mock$availability_ca.detail, currentDate = (_mock$availability_ca2 = require_mock.mock.availability_calendar) === null || _mock$availability_ca2 === void 0 ? void 0 : _mock$availability_ca2.currentDate, cutTime = (_mock$availability_ca3 = require_mock.mock.availability_calendar) === null || _mock$availability_ca3 === void 0 ? void 0 : _mock$availability_ca3.cutTime, onCurrentDateChange, onCutTimeChange, onSurplusDisabledChange, showStatusLegend = true, showDateStatusBar = true, theme = "light", className, title, showHeader, showDisabledStatus, ignoreAvailabilityDisabled, minSelectableDate, minViewDate, enableRangeSelection, selectedRangeStartDate, selectedRangeEndDate, showMonthHeader, enableWeekSwipe, availabilityDates } = props;
|
|
16
16
|
console.log(detail, currentDate, cutTime, "detail, currentDate, cutTime");
|
|
17
17
|
return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("event-booking-availability-calendar", `event-booking-availability-calendar--${theme}`, className) }, /* @__PURE__ */ react.default.createElement(require_index.default, {
|
|
18
18
|
showCalendarPopup,
|
|
@@ -32,6 +32,7 @@ const BookingAvailabilityCalendar = (props) => {
|
|
|
32
32
|
showDisabledStatus,
|
|
33
33
|
ignoreAvailabilityDisabled,
|
|
34
34
|
minSelectableDate,
|
|
35
|
+
minViewDate,
|
|
35
36
|
enableRangeSelection,
|
|
36
37
|
selectedRangeStartDate,
|
|
37
38
|
selectedRangeEndDate,
|
|
@@ -11,7 +11,8 @@ var locales_default = {
|
|
|
11
11
|
"pisell2.sku-card.time.remaining": "Time Remaining",
|
|
12
12
|
"pisell2.sku-card.capacity": "Capacity",
|
|
13
13
|
"pisell2.sku-card.free": "Free",
|
|
14
|
-
"pisell2.sku-card.max": "Max"
|
|
14
|
+
"pisell2.sku-card.max": "Max",
|
|
15
|
+
"pisell2.sku-card.sold-out": "Sold Out"
|
|
15
16
|
},
|
|
16
17
|
"zh-CN": {
|
|
17
18
|
"pisell2.sku-card.search": "搜索",
|
|
@@ -24,7 +25,8 @@ var locales_default = {
|
|
|
24
25
|
"pisell2.sku-card.time.remaining": "剩余",
|
|
25
26
|
"pisell2.sku-card.capacity": "容量",
|
|
26
27
|
"pisell2.sku-card.free": "免费",
|
|
27
|
-
"pisell2.sku-card.max": "最大"
|
|
28
|
+
"pisell2.sku-card.max": "最大",
|
|
29
|
+
"pisell2.sku-card.sold-out": "已售罄"
|
|
28
30
|
},
|
|
29
31
|
"zh-HK": {
|
|
30
32
|
"pisell2.sku-card.search": "搜索",
|
|
@@ -37,7 +39,8 @@ var locales_default = {
|
|
|
37
39
|
"pisell2.sku-card.time.remaining": "剩余",
|
|
38
40
|
"pisell2.sku-card.capacity": "容量",
|
|
39
41
|
"pisell2.sku-card.free": "免費",
|
|
40
|
-
"pisell2.sku-card.max": "最大"
|
|
42
|
+
"pisell2.sku-card.max": "最大",
|
|
43
|
+
"pisell2.sku-card.sold-out": "已售罄"
|
|
41
44
|
},
|
|
42
45
|
ja: {
|
|
43
46
|
"pisell2.sku-card.search": "検索",
|
|
@@ -50,7 +53,8 @@ var locales_default = {
|
|
|
50
53
|
"pisell2.sku-card.time.remaining": "残り時間",
|
|
51
54
|
"pisell2.sku-card.capacity": "容量",
|
|
52
55
|
"pisell2.sku-card.free": "無料",
|
|
53
|
-
"pisell2.sku-card.max": "最大"
|
|
56
|
+
"pisell2.sku-card.max": "最大",
|
|
57
|
+
"pisell2.sku-card.sold-out": "売り切れ"
|
|
54
58
|
},
|
|
55
59
|
pt: {
|
|
56
60
|
"pisell2.sku-card.search": "Pesquisar",
|
|
@@ -63,7 +67,8 @@ var locales_default = {
|
|
|
63
67
|
"pisell2.sku-card.time.remaining": "Tempo Restante",
|
|
64
68
|
"pisell2.sku-card.capacity": "Capacidade",
|
|
65
69
|
"pisell2.sku-card.free": "Grátis",
|
|
66
|
-
"pisell2.sku-card.max": "Máx"
|
|
70
|
+
"pisell2.sku-card.max": "Máx",
|
|
71
|
+
"pisell2.sku-card.sold-out": "Esgotado"
|
|
67
72
|
}
|
|
68
73
|
};
|
|
69
74
|
//#endregion
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
|
|
3
|
+
const require_useEngineContext = require("../../../hooks/useEngineContext.js");
|
|
3
4
|
const require_IntersectionObserver = require("../components/IntersectionObserver.js");
|
|
4
5
|
const require_index = require("../components/pisellPriceText/index.js");
|
|
5
6
|
require("./ProductCardSkeleton.js");
|
|
6
7
|
const require_weighingPrice = require("./weighingPrice.js");
|
|
8
|
+
const require_locales = require("./SkuCard/locales.js");
|
|
9
|
+
const require_useInitLocalesOnce = require("../../../hooks/useInitLocalesOnce.js");
|
|
7
10
|
const require_index$1 = require("./SkuCard/index.js");
|
|
8
11
|
const require_utils = require("./utils.js");
|
|
9
12
|
const require_useTranslationOriginal = require("../../../hooks/useTranslationOriginal.js");
|
|
@@ -43,10 +46,15 @@ const defaultConfig = {
|
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
48
|
const ProductCard = (0, react.memo)(({ item, index: index$1, context, onSelect, onSelectCover, onSelectInfo, isSelected, className, decorateConfig = {}, scenario = "default", selectionTrigger = "pointerUp", customSkuCardAllConfig }) => {
|
|
49
|
+
var _engineContext$appHel, _engineContext$appHel2;
|
|
50
|
+
const engineContext = require_useEngineContext.default();
|
|
51
|
+
require_useInitLocalesOnce.default(require_locales.default);
|
|
46
52
|
const finalConfig = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, defaultConfig), decorateConfig);
|
|
47
53
|
const { imgHeight, imgWidth, isOriginPrice, isPrice, isProductCover, isStock, isSubtitle, isTitle, radius, showZeroPrice, gap, rightStyle } = finalConfig;
|
|
48
54
|
const { __typename } = item;
|
|
49
55
|
const translationOriginal = require_useTranslationOriginal.default();
|
|
56
|
+
const isSoldOut = require_utils.shouldShowInventorySoldOut(item, engineContext === null || engineContext === void 0 || (_engineContext$appHel = engineContext.appHelper) === null || _engineContext$appHel === void 0 || (_engineContext$appHel = _engineContext$appHel.utils) === null || _engineContext$appHel === void 0 || (_engineContext$appHel2 = _engineContext$appHel.getData) === null || _engineContext$appHel2 === void 0 ? void 0 : _engineContext$appHel2.call(_engineContext$appHel, "channel"));
|
|
57
|
+
const soldOutText = _pisell_utils.locales.getText("pisell2.sku-card.sold-out") || "Sold Out";
|
|
50
58
|
if (__typename === "category") return /* @__PURE__ */ react.default.createElement("div", {
|
|
51
59
|
className: (0, classnames.default)(`${require_index$2.PREFIX}__product-category`, className),
|
|
52
60
|
"data-index": index$1,
|
|
@@ -137,11 +145,21 @@ const ProductCard = (0, react.memo)(({ item, index: index$1, context, onSelect,
|
|
|
137
145
|
*/
|
|
138
146
|
const skuCardRender = (0, react.useMemo)(() => {
|
|
139
147
|
const skuCardAllConfig = customSkuCardAllConfig || require_utils.getSkuCardConfig(finalConfig);
|
|
148
|
+
const skuStatusOverlayConfig = isSoldOut ? require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, skuCardAllConfig.skuStatusOverlayConfig), {}, {
|
|
149
|
+
isOpen: 1,
|
|
150
|
+
text: soldOutText,
|
|
151
|
+
fontSize: 28,
|
|
152
|
+
fontWeight: 700,
|
|
153
|
+
color: "#000000",
|
|
154
|
+
background: "rgba(255, 255, 255, 0.72)",
|
|
155
|
+
slot: null
|
|
156
|
+
}) : skuCardAllConfig.skuStatusOverlayConfig;
|
|
140
157
|
return /* @__PURE__ */ react.default.createElement(require_index$1.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({ key: item.id }, skuCardAllConfig), {}, {
|
|
158
|
+
skuStatusOverlayConfig,
|
|
141
159
|
dataSource: skuCardDataSource,
|
|
142
|
-
onCardClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(item),
|
|
143
|
-
onSelectCover: () => onSelectCover === null || onSelectCover === void 0 ? void 0 : onSelectCover(item),
|
|
144
|
-
onSelectInfo: () => onSelectInfo === null || onSelectInfo === void 0 ? void 0 : onSelectInfo(item),
|
|
160
|
+
onCardClick: isSoldOut ? void 0 : () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(item),
|
|
161
|
+
onSelectCover: isSoldOut ? void 0 : () => onSelectCover === null || onSelectCover === void 0 ? void 0 : onSelectCover(item),
|
|
162
|
+
onSelectInfo: isSoldOut ? void 0 : () => onSelectInfo === null || onSelectInfo === void 0 ? void 0 : onSelectInfo(item),
|
|
145
163
|
selectionTrigger,
|
|
146
164
|
isSelected,
|
|
147
165
|
"data-index": index$1,
|
|
@@ -166,7 +184,9 @@ const ProductCard = (0, react.memo)(({ item, index: index$1, context, onSelect,
|
|
|
166
184
|
rightStyle,
|
|
167
185
|
className,
|
|
168
186
|
customSkuCardAllConfig,
|
|
169
|
-
selectionTrigger
|
|
187
|
+
selectionTrigger,
|
|
188
|
+
isSoldOut,
|
|
189
|
+
soldOutText
|
|
170
190
|
]);
|
|
171
191
|
/**
|
|
172
192
|
* @description: 根据 scenario 决定渲染内容
|
|
@@ -16,6 +16,16 @@ const formatProductPrice = (item) => {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
+
* 追踪库存且禁止超售时,库存小于等于 0 视为售罄。
|
|
20
|
+
*/
|
|
21
|
+
const isInventorySoldOut = (item) => Number(item === null || item === void 0 ? void 0 : item.is_track) === 1 && Number(item === null || item === void 0 ? void 0 : item.over_sold) === 0 && Number(item === null || item === void 0 ? void 0 : item.stock_quantity) <= 0;
|
|
22
|
+
/**
|
|
23
|
+
* POS 保持原有商品选择行为;其它渠道才展示库存售罄状态。
|
|
24
|
+
*/
|
|
25
|
+
const shouldShowInventorySoldOut = (item, channel) => {
|
|
26
|
+
return (String(channel || "pos").trim().toLowerCase() || "pos") !== "pos" && isInventorySoldOut(item);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
19
29
|
* @description: 获取sku卡配置
|
|
20
30
|
* @param {ProductCardConfig} finalConfig
|
|
21
31
|
* @return {*}
|
|
@@ -56,3 +66,4 @@ const getSkuCardConfig = (finalConfig) => {
|
|
|
56
66
|
//#endregion
|
|
57
67
|
exports.formatProductPrice = formatProductPrice;
|
|
58
68
|
exports.getSkuCardConfig = getSkuCardConfig;
|
|
69
|
+
exports.shouldShowInventorySoldOut = shouldShowInventorySoldOut;
|
|
@@ -70,7 +70,34 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
.sku-detail-selection-flow-scroll-shell {
|
|
74
|
+
position: relative;
|
|
75
|
+
display: flex;
|
|
76
|
+
min-height: 0;
|
|
77
|
+
flex: 1;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
|
|
80
|
+
// 阴影挂在不滚动的外壳上,因此不会混入时间卡片并跟随内容移动。
|
|
81
|
+
// 仅在下方仍有内容时展示,并使用较浅的渐变作为轻量提示。
|
|
82
|
+
&--can-scroll-down::after {
|
|
83
|
+
position: absolute;
|
|
84
|
+
right: 12px;
|
|
85
|
+
bottom: 0;
|
|
86
|
+
left: 0;
|
|
87
|
+
z-index: 2;
|
|
88
|
+
height: 16px;
|
|
89
|
+
background: linear-gradient(
|
|
90
|
+
to bottom,
|
|
91
|
+
rgba(255, 255, 255, 0),
|
|
92
|
+
rgba(16, 24, 40, 0.08)
|
|
93
|
+
);
|
|
94
|
+
content: '';
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
73
99
|
.sku-detail-right-content--selection-flow {
|
|
74
100
|
display: flex;
|
|
101
|
+
flex: 1;
|
|
75
102
|
flex-direction: column;
|
|
76
103
|
}
|
|
@@ -279,6 +279,7 @@ const DateFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
279
279
|
showHeader: false,
|
|
280
280
|
showMonthHeader: true,
|
|
281
281
|
enableWeekSwipe: true,
|
|
282
|
+
minViewDate: (0, dayjs.default)().startOf("day").format("YYYY-MM-DD"),
|
|
282
283
|
minSelectableDate: minimumSelectableDate.format("YYYY-MM-DD")
|
|
283
284
|
});
|
|
284
285
|
}
|
|
@@ -13,7 +13,6 @@ const require_serve = require("../../../../components/booking/info2/serve.js");
|
|
|
13
13
|
let react = require("react");
|
|
14
14
|
react = require_runtime.__toESM(react);
|
|
15
15
|
let antd = require("antd");
|
|
16
|
-
let _pisell_utils = require("@pisell/utils");
|
|
17
16
|
let _pisell_materials = require("@pisell/materials");
|
|
18
17
|
require("./resource.less");
|
|
19
18
|
//#region src/pro/skuDetailModal/flow/modules/resource.tsx
|
|
@@ -336,7 +335,7 @@ const ResourceFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
336
335
|
fontWeight: 600
|
|
337
336
|
} }, group.title || group.code || "Resource"), /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellCustomCheckboxGroup, {
|
|
338
337
|
dataSource: group.options,
|
|
339
|
-
columns:
|
|
338
|
+
columns: 4,
|
|
340
339
|
horizontalGap: 16,
|
|
341
340
|
verticalGap: 16,
|
|
342
341
|
className: "selection-flow-resource-grid",
|
|
@@ -3,8 +3,45 @@
|
|
|
3
3
|
min-height: 166px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
// ResourceDisplay 的文本头像沿用 Ant Avatar 的缩放定位规则;在 Flow 的
|
|
7
|
+
// 纵向卡片中改为由 flex 容器直接居中,避免首字母视觉上向右偏移。
|
|
8
|
+
.pisell-resource-card-empty-avatar
|
|
9
|
+
.pisell-lowcode-avatar-string,
|
|
10
|
+
.pisell-resource-card-empty-avatar .ant-avatar-string {
|
|
11
|
+
position: static;
|
|
12
|
+
left: auto;
|
|
13
|
+
width: 100%;
|
|
14
|
+
margin: 0;
|
|
15
|
+
text-align: center;
|
|
16
|
+
transform: none !important;
|
|
17
|
+
transform-origin: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 不依赖 PisellText 的默认 display/text-align,确保资源名称始终相对
|
|
21
|
+
// 整张卡片居中,而不是相对文字自身宽度居中。
|
|
22
|
+
.pisell-resource-card-info {
|
|
23
|
+
align-items: center;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pisell-resource-card-name {
|
|
28
|
+
display: block;
|
|
29
|
+
width: 100%;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
6
35
|
.selection-flow-resource-card--disabled {
|
|
7
36
|
cursor: not-allowed;
|
|
8
37
|
opacity: 0.45;
|
|
9
38
|
}
|
|
39
|
+
|
|
40
|
+
// 默认使用四列;只有真正窄于手机内容宽度时才退回两列。
|
|
41
|
+
// 需要 !important 覆盖 PisellViewGrid 写在元素上的 grid-template-columns。
|
|
42
|
+
@media (max-width: 600px) {
|
|
43
|
+
.pisell-view-grid-content {
|
|
44
|
+
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
10
47
|
}
|
|
@@ -152,6 +152,9 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
152
152
|
* - 称重商品打开弹窗时,自动滚动到底部以完整展示称重模块
|
|
153
153
|
*/
|
|
154
154
|
const leftTopRef = (0, react.useRef)(null);
|
|
155
|
+
/** 新 Flow 当前步骤的滚动容器;切换步骤时回到顶部。 */
|
|
156
|
+
const selectionFlowScrollRef = (0, react.useRef)(null);
|
|
157
|
+
const [selectionFlowCanScrollDown, setSelectionFlowCanScrollDown] = (0, react.useState)(false);
|
|
155
158
|
const Toast = require_useToast.default();
|
|
156
159
|
const logger = require_useLogger.default();
|
|
157
160
|
/**
|
|
@@ -309,6 +312,40 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
309
312
|
* 此时回退到旧详情界面,避免全局预设阻断称重等普通商品。
|
|
310
313
|
*/
|
|
311
314
|
const isCustomSelectionFlow = isCreateMode && Array.isArray(effectiveSelectionFlowSteps) && (selectionFlowProcedureSteps === null || selectionFlowProcedureSteps === void 0 ? void 0 : selectionFlowProcedureSteps.length) !== 0;
|
|
315
|
+
const updateSelectionFlowScrollAffordance = (0, react.useCallback)(() => {
|
|
316
|
+
const container = selectionFlowScrollRef.current;
|
|
317
|
+
if (!container) {
|
|
318
|
+
setSelectionFlowCanScrollDown(false);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
setSelectionFlowCanScrollDown(container.scrollHeight - container.scrollTop - container.clientHeight > 2);
|
|
322
|
+
}, []);
|
|
323
|
+
(0, react.useLayoutEffect)(() => {
|
|
324
|
+
if (!open || !isCustomSelectionFlow) {
|
|
325
|
+
setSelectionFlowCanScrollDown(false);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
const container = selectionFlowScrollRef.current;
|
|
329
|
+
container === null || container === void 0 || container.scrollTo({
|
|
330
|
+
top: 0,
|
|
331
|
+
behavior: "auto"
|
|
332
|
+
});
|
|
333
|
+
const animationFrame = requestAnimationFrame(updateSelectionFlowScrollAffordance);
|
|
334
|
+
if (!container || typeof ResizeObserver === "undefined") return () => cancelAnimationFrame(animationFrame);
|
|
335
|
+
const resizeObserver = new ResizeObserver(updateSelectionFlowScrollAffordance);
|
|
336
|
+
resizeObserver.observe(container);
|
|
337
|
+
Array.from(container.children).forEach((child) => resizeObserver.observe(child));
|
|
338
|
+
return () => {
|
|
339
|
+
cancelAnimationFrame(animationFrame);
|
|
340
|
+
resizeObserver.disconnect();
|
|
341
|
+
};
|
|
342
|
+
}, [
|
|
343
|
+
currentStep,
|
|
344
|
+
isCustomSelectionFlow,
|
|
345
|
+
open,
|
|
346
|
+
selectionFlowInstanceKey,
|
|
347
|
+
updateSelectionFlowScrollAffordance
|
|
348
|
+
]);
|
|
312
349
|
const selectionFlowInitialDraft = (0, react.useMemo)(() => {
|
|
313
350
|
var _openParamsRef$curren, _resolvedSkuValue$bun, _resolvedSkuValue$opt, _bookingState$client, _extend$duration, _openParamsRef$curren2, _openParamsRef$curren3;
|
|
314
351
|
if (!isCustomSelectionFlow || !productData) return null;
|
|
@@ -1286,7 +1323,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1286
1323
|
};
|
|
1287
1324
|
const rightContent = () => {
|
|
1288
1325
|
if (detailLoading || !productData) return /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-right-content" }, renderLoadingPanel());
|
|
1289
|
-
if (isCustomSelectionFlow && selectionFlowInitialDraft) return /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-
|
|
1326
|
+
if (isCustomSelectionFlow && selectionFlowInitialDraft) return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("sku-detail-selection-flow-scroll-shell", selectionFlowCanScrollDown && "sku-detail-selection-flow-scroll-shell--can-scroll-down") }, /* @__PURE__ */ react.default.createElement("div", {
|
|
1327
|
+
ref: selectionFlowScrollRef,
|
|
1328
|
+
className: "sku-detail-right-content sku-detail-right-content--selection-flow",
|
|
1329
|
+
onScroll: updateSelectionFlowScrollAffordance
|
|
1330
|
+
}, isMobile && (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProductSummary) ? renderProductSummary() : null, shouldRenderMobileWeighing ? /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-mobile-weighing" }, renderWeighingSection()) : null, /* @__PURE__ */ react.default.createElement(require_SelectionFlow.default, {
|
|
1290
1331
|
key: selectionFlowInstanceKey,
|
|
1291
1332
|
ref: selectionFlowRef,
|
|
1292
1333
|
steps: effectiveSelectionFlowSteps || [],
|
|
@@ -1340,7 +1381,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1340
1381
|
onCancel: () => {
|
|
1341
1382
|
if (openTaskIdRef.current === selectionFlowInstanceKey) handleCancel();
|
|
1342
1383
|
}
|
|
1343
|
-
}));
|
|
1384
|
+
})));
|
|
1344
1385
|
const shouldRenderSkuSelection = (isMobile || currentStep === 1) && hasSkuOptions;
|
|
1345
1386
|
const shouldRenderMobileProductDetails = isMobile && (!isCreateMode || !!(skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProductSummary));
|
|
1346
1387
|
const shouldRenderProductSummary = shouldRenderSkuSelection || shouldRenderMobileProductDetails;
|
|
@@ -1388,13 +1429,14 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1388
1429
|
closable: false,
|
|
1389
1430
|
destroyOnClose: true,
|
|
1390
1431
|
style: { maxHeight: variant === "phone" ? "95dvh" : void 0 },
|
|
1391
|
-
height: variant === "phone" ? "auto" : void 0,
|
|
1432
|
+
height: variant === "phone" ? isCustomSelectionFlow ? "clamp(600px, 50dvh, 1600px)" : "auto" : void 0,
|
|
1392
1433
|
width: variant === "phone" ? "100%" : "80%",
|
|
1393
1434
|
className: (0, classnames.default)({
|
|
1394
1435
|
"pisell-sku-detail-modal": variant !== "phone",
|
|
1395
1436
|
"pisell-sku-detail-modal--smallTablet": variant !== "phone" && variant === "smallTablet",
|
|
1396
1437
|
"pisell-sku-detail-modal--tablet": variant !== "phone" && variant === "tablet",
|
|
1397
1438
|
"pisell-sku-detail-drawer": variant === "phone",
|
|
1439
|
+
"pisell-sku-detail-drawer--selection-flow": variant === "phone" && isCustomSelectionFlow,
|
|
1398
1440
|
"aside-full": isWeighingProductWithoutSku && !shouldRenderMobileWeighing
|
|
1399
1441
|
}),
|
|
1400
1442
|
placement: variant === "phone" ? "bottom" : void 0
|
|
@@ -897,13 +897,18 @@
|
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
|
|
900
|
-
//
|
|
901
|
-
//
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
900
|
+
// 预约步骤的内容量差异很大:时间片可能很多,资源也可能只有一两个。
|
|
901
|
+
// Flow Drawer 使用稳定的外壳高度,中间内容区沿用上方的 overflow-y:auto;
|
|
902
|
+
// 普通商品没有该修饰类,仍保持原来的内容自适应高度。
|
|
903
|
+
.pisell-sku-detail-drawer--selection-flow {
|
|
904
|
+
max-height: 95dvh;
|
|
905
|
+
|
|
906
|
+
.pisell-lowcode-floating-layer-content,
|
|
907
|
+
.pisell-lowcode-drawer-content,
|
|
908
|
+
.pisell-lowcode-floating-layer-body,
|
|
909
|
+
.pisell-lowcode-drawer-body {
|
|
910
|
+
height: 100%;
|
|
911
|
+
min-height: 0;
|
|
907
912
|
}
|
|
908
913
|
}
|
|
909
914
|
|