@pisell/materials 6.11.260 → 6.11.262
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 +3 -3
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +48 -48
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +48 -48
- package/es/components/PisellSelectionFlow/PisellSelectionFlow.js +2 -3
- package/es/components/page/dateLocale.js +33 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/page/index.js +30 -4
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +13 -7
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +2 -1
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +6 -6
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +3 -3
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +3 -3
- package/es/components/pisellRecordBoard/types.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +2 -2
- package/es/components/productCard/lineItem/BookingLineItem.js +3 -2
- package/lib/components/PisellSelectionFlow/PisellSelectionFlow.js +2 -3
- package/lib/components/page/dateLocale.js +35 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/page/index.js +33 -4
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +12 -6
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +2 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +6 -6
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +2 -2
- package/lib/components/pisellRecordBoard/types.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +2 -2
- package/lib/components/productCard/lineItem/BookingLineItem.js +3 -2
- package/package.json +3 -3
package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js
CHANGED
|
@@ -26,16 +26,16 @@ function addDays(date, n) {
|
|
|
26
26
|
next.setDate(next.getDate() + n);
|
|
27
27
|
return next;
|
|
28
28
|
}
|
|
29
|
-
function startOfWeek(date) {
|
|
29
|
+
function startOfWeek(date, weekStartsOn = 1) {
|
|
30
30
|
const d = new Date(date);
|
|
31
31
|
const day = d.getDay();
|
|
32
|
-
const diff = day === 0 ? -6 : 1 - day;
|
|
32
|
+
const diff = weekStartsOn === 0 ? -day : day === 0 ? -6 : 1 - day;
|
|
33
33
|
d.setDate(d.getDate() + diff);
|
|
34
34
|
d.setHours(0, 0, 0, 0);
|
|
35
35
|
return d;
|
|
36
36
|
}
|
|
37
|
-
function rangeDays(anchor) {
|
|
38
|
-
const start = startOfWeek(anchor);
|
|
37
|
+
function rangeDays(anchor, weekStartsOn = 1) {
|
|
38
|
+
const start = startOfWeek(anchor, weekStartsOn);
|
|
39
39
|
return Array.from({ length: 7 }, (_, i) => addDays(start, i));
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -69,11 +69,11 @@ function formatShortMonthDay(dateKey) {
|
|
|
69
69
|
if (!m || !d) return dateKey;
|
|
70
70
|
return `${m}/${d}`;
|
|
71
71
|
}
|
|
72
|
-
function monthGrid(date, bookings, courtsList = [], hourSlotsIn, slotStepHours = 1) {
|
|
72
|
+
function monthGrid(date, bookings, courtsList = [], hourSlotsIn, slotStepHours = 1, weekStartsOn = 1) {
|
|
73
73
|
const hourSlots = hourSlotsIn && hourSlotsIn.length ? hourSlotsIn : require_index.buildCalendarTimelineSlotStartsFromRange(require_bookingCalendarConstants.DEFAULT_CALENDAR_TIMELINE, date, 60);
|
|
74
74
|
const year = date.getFullYear();
|
|
75
75
|
const month = date.getMonth();
|
|
76
|
-
const start = startOfWeek(new Date(year, month, 1));
|
|
76
|
+
const start = startOfWeek(new Date(year, month, 1), weekStartsOn);
|
|
77
77
|
return Array.from({ length: 35 }, (_, i) => addDays(start, i)).map((day) => {
|
|
78
78
|
const key = fmtDate(day);
|
|
79
79
|
const dayBookings = bookings.filter((b) => b.kind === "booking" && getBookingSegmentForDate(b, key) != null);
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js
CHANGED
|
@@ -17,7 +17,7 @@ const MONTH_GRID_COLS = 7;
|
|
|
17
17
|
* - 行高内自适应 effectiveMaxLane,超出 → cell 级 `+N` tile;
|
|
18
18
|
* - cell 层只负责日期 header / 点击跳日 / drop 改期,不再渲染 booking 列表(被 overlay 替代)。
|
|
19
19
|
*/
|
|
20
|
-
function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode }) {
|
|
20
|
+
function BookingCalendarMonthView({ weekdayIds, isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode }) {
|
|
21
21
|
const todayKey = require_bookingCalendarDateUtils.fmtDate(/* @__PURE__ */ new Date());
|
|
22
22
|
const weekRows = (0, react.useMemo)(() => {
|
|
23
23
|
const out = [];
|
|
@@ -50,7 +50,7 @@ function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, go
|
|
|
50
50
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
51
51
|
key: `month-${anchorDate.getFullYear()}-${anchorDate.getMonth()}`,
|
|
52
52
|
className: "flex min-h-0 flex-1 flex-col"
|
|
53
|
-
}, /* @__PURE__ */ react.default.createElement("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-auto overflow-y-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel flex min-h-[0] min-w-[980px] flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel-alt grid shrink-0 grid-cols-7 border-b theme-border shadow-[0_6px_12px_rgba(0,0,0,0.08)]" },
|
|
53
|
+
}, /* @__PURE__ */ react.default.createElement("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-auto overflow-y-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel flex min-h-[0] min-w-[980px] flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel-alt grid shrink-0 grid-cols-7 border-b theme-border shadow-[0_6px_12px_rgba(0,0,0,0.08)]" }, weekdayIds.map((id) => /* @__PURE__ */ react.default.createElement("div", {
|
|
54
54
|
key: id,
|
|
55
55
|
className: "px-4 py-2.5 text-center text-sm font-medium"
|
|
56
56
|
}, require_calendarI18n.tCal(id)))), /* @__PURE__ */ react.default.createElement("div", {
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js
CHANGED
|
@@ -15,7 +15,7 @@ const WEEK_VIEW_OVERLAY_LANE_GAP = 4;
|
|
|
15
15
|
/**
|
|
16
16
|
* 周视图:7 日网格 + 左侧分组(可折叠),单元格调起日视图;格内 drop 触发改期草稿。
|
|
17
17
|
*/
|
|
18
|
-
function BookingCalendarWeekView({ calendarProps, isLight, weekDays, bookings, courts, hourSlots, slotStepHours, visibleCourts, visibleCourtRows, isBusinessHour, goToDayFromCell, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, tickFillMode }) {
|
|
18
|
+
function BookingCalendarWeekView({ weekdayIds, calendarProps, isLight, weekDays, bookings, courts, hourSlots, slotStepHours, visibleCourts, visibleCourtRows, isBusinessHour, goToDayFromCell, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, tickFillMode }) {
|
|
19
19
|
const props = calendarProps;
|
|
20
20
|
const todayKey = require_bookingCalendarDateUtils.fmtDate(/* @__PURE__ */ new Date());
|
|
21
21
|
/** 与下方 grid `minmax(…px, 1fr)` 一致:窄屏由外层 overflow-auto + min-w-0 定视口宽,本值撑开 scrollWidth */
|
|
@@ -144,7 +144,7 @@ function BookingCalendarWeekView({ calendarProps, isLight, weekDays, bookings, c
|
|
|
144
144
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
145
145
|
key,
|
|
146
146
|
className: `relative z-20 border-b border-l px-1.5 py-2 text-center shadow-[0_8px_16px_rgba(0,0,0,0.06)] ${isLight ? "theme-border theme-text" : "border-zinc-800"} ${isToday ? isLight ? "bg-gradient-to-b from-violet-50 to-white" : "bg-gradient-to-b from-violet-950 to-[#1a1a22]" : isLight ? "theme-panel-soft" : "bg-[#1a1a22]"}`
|
|
147
|
-
}, /* @__PURE__ */ react.default.createElement("div", { className: `text-sm leading-tight ${isLight ? "theme-text-faint" : "text-zinc-400"}` }, require_calendarI18n.tCal(
|
|
147
|
+
}, /* @__PURE__ */ react.default.createElement("div", { className: `text-sm leading-tight ${isLight ? "theme-text-faint" : "text-zinc-400"}` }, require_calendarI18n.tCal(weekdayIds[i])), /* @__PURE__ */ react.default.createElement("div", { className: "mt-0.5 flex justify-center" }, /* @__PURE__ */ react.default.createElement("span", {
|
|
148
148
|
className: "grid h-10 w-10 place-items-center text-3xl font-semibold leading-none",
|
|
149
149
|
"aria-label": isToday ? "Today" : void 0
|
|
150
150
|
}, day.getDate())));
|
|
@@ -329,6 +329,8 @@ interface RecordBoardBlockedTimePanelPayload {
|
|
|
329
329
|
}
|
|
330
330
|
/** 日历视图槽位 props:由 Shell 合并根级与子槽后传入 PisellRecordBoardCalendarView */
|
|
331
331
|
interface RecordBoardCalendarProps {
|
|
332
|
+
/** 0 = Sunday, 1 = Monday. Omitted keeps the original Monday-first behaviour. */
|
|
333
|
+
weekStartsOn?: 0 | 1;
|
|
332
334
|
persistGuard?: CalendarPersistContextValue;
|
|
333
335
|
/**
|
|
334
336
|
* 日历画布外观:亮色切换 `theme-root.theme-light`;未传或 `dark` 为深色(默认)。
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
|
|
154
154
|
&--weighing {
|
|
155
155
|
.product-info .product-name {
|
|
156
|
-
font-size:
|
|
156
|
+
font-size: var(--pisell-cart-sku-card-physical-text-height);
|
|
157
157
|
line-height: 1.3;
|
|
158
158
|
letter-spacing: -0.01em;
|
|
159
159
|
}
|
|
@@ -201,4 +201,4 @@
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
}
|
|
204
|
+
}
|
|
@@ -115,8 +115,9 @@ const BookingLineItem = (props) => {
|
|
|
115
115
|
e.stopPropagation();
|
|
116
116
|
} }), /* @__PURE__ */ react.default.createElement("span", { className: `${PREFIX}__status-label` }, currentStatus.label), canChangeStatus ? /* @__PURE__ */ react.default.createElement(_ant_design_icons.DownOutlined, null) : null);
|
|
117
117
|
};
|
|
118
|
-
const
|
|
119
|
-
|
|
118
|
+
const promotionItems = (dataSource === null || dataSource === void 0 || (_dataSource$promotion = dataSource.promotions) === null || _dataSource$promotion === void 0 ? void 0 : _dataSource$promotion.length) ? dataSource.promotions : relatedProductDataSource === null || relatedProductDataSource === void 0 ? void 0 : relatedProductDataSource.promotions;
|
|
119
|
+
const renderPromotion = (promotionItems === null || promotionItems === void 0 ? void 0 : promotionItems.length) ? /* @__PURE__ */ react.default.createElement(require_index$7.default, {
|
|
120
|
+
promotions: promotionItems,
|
|
120
121
|
onClick: (item) => onPromotion === null || onPromotion === void 0 ? void 0 : onPromotion(item)
|
|
121
122
|
}) : null;
|
|
122
123
|
const renderProductCard = (productDataSource, source, options = {}) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.262",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"swiper": "^8.4.7",
|
|
96
96
|
"antd-mobile": "^5.38.1",
|
|
97
97
|
"vod-js-sdk-v6": "^1.4.11",
|
|
98
|
-
"@pisell/
|
|
98
|
+
"@pisell/date-picker": "3.0.10",
|
|
99
99
|
"@pisell/utils": "3.0.4",
|
|
100
|
-
"@pisell/
|
|
100
|
+
"@pisell/icon": "0.0.11"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"react": "^18.0.0",
|