@pisell/private-materials 6.12.423 → 6.12.425
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 +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/ProductList/index.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/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/components/venueBookingSales/PartyBookingPage.js +1 -0
- package/es/components/venueBookingSales/TicketBookingPage.js +2 -0
- package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +1 -0
- package/es/index.js +2 -0
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- 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/pisellReservation/utils/calendarBookingSelection.js +4 -4
- package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
- 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/PrintAction.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
- package/es/plus/saleDetail/components/RefundModal/index.js +8 -6
- package/es/plus/saleDetail/components/RefundModal/index.less +18 -9
- 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 +54 -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/plus/venueBookingDesign/BookingDatePicker.js +21 -9
- package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/calendarEntry.js +2 -2
- package/lib/components/venueBookingSales/PartyBookingPage.js +1 -0
- package/lib/components/venueBookingSales/TicketBookingPage.js +2 -0
- package/lib/plus/saleDetail/components/RefundModal/index.js +8 -6
- package/lib/plus/saleDetail/components/RefundModal/index.less +18 -9
- package/lib/plus/venueBookingDesign/BookingDatePicker.js +21 -9
- package/package.json +4 -4
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -118,6 +118,7 @@ function TicketBookingPage(props) {
|
|
|
118
118
|
stepNumber: 1,
|
|
119
119
|
stepStatus: indicators === null || indicators === void 0 ? void 0 : indicators[0],
|
|
120
120
|
timeZone: r.bookingUI.timeZone,
|
|
121
|
+
todayMarker: "device",
|
|
121
122
|
minDate: r.today,
|
|
122
123
|
dateStates: r.dateStates,
|
|
123
124
|
loading: datePreview.searching,
|
|
@@ -196,6 +197,7 @@ function TicketBookingPage(props) {
|
|
|
196
197
|
locale: r.locale,
|
|
197
198
|
title: r.text("Visit date", "游玩日期"),
|
|
198
199
|
timeZone: r.bookingUI.timeZone,
|
|
200
|
+
todayMarker: "device",
|
|
199
201
|
minDate: r.today,
|
|
200
202
|
dateStates: r.dateStates,
|
|
201
203
|
onVisibleDatesChange: r.setVisibleDates,
|
|
@@ -200,6 +200,7 @@ function RefundModal({ amountFormatter, confirmationCopy, currencySymbol = "$",
|
|
|
200
200
|
const editableAmount = getTransactionRefundAmount(transaction);
|
|
201
201
|
const selectionDisabled = isTransactionSelectionDisabled(transaction);
|
|
202
202
|
const amountEditingEnabled = transaction.amountEditable && !selectionDisabled;
|
|
203
|
+
const AmountContainer = amountEditingEnabled ? "button" : "span";
|
|
203
204
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
204
205
|
key: transaction.key,
|
|
205
206
|
role: "listitem",
|
|
@@ -219,14 +220,15 @@ function RefundModal({ amountFormatter, confirmationCopy, currencySymbol = "$",
|
|
|
219
220
|
event.stopPropagation();
|
|
220
221
|
handleTransactionChange(transaction);
|
|
221
222
|
}
|
|
222
|
-
}, /* @__PURE__ */ react.default.createElement("span", { "aria-hidden": "true" }, selected ? "✓" : "")), /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-copy" }, /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-badges" }, /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-status" }, transaction.statusText), transaction.refundStatusText ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-refund-status" }, transaction.refundStatusText) : null), /* @__PURE__ */ react.default.createElement("strong", null, transaction.title), transaction.channelText || transaction.staffText ? /* @__PURE__ */ react.default.createElement("span", null, transaction.channelText, transaction.channelText && transaction.staffText ? " · " : null, transaction.staffText) : null, transaction.occurredAt ? /* @__PURE__ */ react.default.createElement("span", null, transaction.occurredAt) : null), /* @__PURE__ */ react.default.createElement(
|
|
223
|
-
type: "button",
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
}, /* @__PURE__ */ react.default.createElement("span", { "aria-hidden": "true" }, selected ? "✓" : "")), /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-copy" }, /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-badges" }, /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-status" }, transaction.statusText), transaction.refundStatusText ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-refund-status" }, transaction.refundStatusText) : null), /* @__PURE__ */ react.default.createElement("strong", null, transaction.title), transaction.channelText || transaction.staffText ? /* @__PURE__ */ react.default.createElement("span", null, transaction.channelText, transaction.channelText && transaction.staffText ? " · " : null, transaction.staffText) : null, transaction.occurredAt ? /* @__PURE__ */ react.default.createElement("span", null, transaction.occurredAt) : null), /* @__PURE__ */ react.default.createElement(AmountContainer, {
|
|
224
|
+
type: amountEditingEnabled ? "button" : void 0,
|
|
225
|
+
"aria-haspopup": amountEditingEnabled ? "dialog" : void 0,
|
|
226
|
+
className: (0, classnames.default)("pisell-sale-detail-refund-modal__transaction-amounts", { "pisell-sale-detail-refund-modal__transaction-amounts--editable": amountEditingEnabled }),
|
|
227
|
+
onClick: amountEditingEnabled ? (event) => {
|
|
226
228
|
event.stopPropagation();
|
|
227
229
|
handleOpenAmountEditor(transaction);
|
|
228
|
-
}
|
|
229
|
-
}, formatRefundAmount(editableAmount, currencySymbol, amountFormatter), /* @__PURE__ */ react.default.createElement("span", { "aria-hidden": "true" }, " ✎")) : /* @__PURE__ */ react.default.createElement("strong", null, (_transaction$amountTe = transaction.amountText) !== null && _transaction$amountTe !== void 0 ? _transaction$amountTe : formatRefundAmount(editableAmount, currencySymbol, amountFormatter)), refunded.greaterThan(0) ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-calculation" }, "(", formatRefundAmount(transaction.paidAmount, currencySymbol, amountFormatter), "−", formatRefundAmount(refunded, currencySymbol, amountFormatter), ")") : null, transaction.refundRouteText ? /* @__PURE__ */ react.default.createElement("span", null, transaction.refundRouteText) : null, transaction.surchargeAmount !== void 0 && !toDecimal(transaction.surchargeAmount).isZero() ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-service-charge" }, "(", _pisell_utils.locales.getText("pisell2.sale-detail.pay-v2.incl-payment-sc"), " ", formatRefundAmount(transaction.surchargeAmount, currencySymbol, amountFormatter), ")") : null));
|
|
230
|
+
} : void 0
|
|
231
|
+
}, amountEditingEnabled ? /* @__PURE__ */ react.default.createElement("strong", { className: "pisell-sale-detail-refund-modal__transaction-amount-edit" }, formatRefundAmount(editableAmount, currencySymbol, amountFormatter), /* @__PURE__ */ react.default.createElement("span", { "aria-hidden": "true" }, " ✎")) : /* @__PURE__ */ react.default.createElement("strong", null, (_transaction$amountTe = transaction.amountText) !== null && _transaction$amountTe !== void 0 ? _transaction$amountTe : formatRefundAmount(editableAmount, currencySymbol, amountFormatter)), refunded.greaterThan(0) ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-calculation" }, "(", formatRefundAmount(transaction.paidAmount, currencySymbol, amountFormatter), "−", formatRefundAmount(refunded, currencySymbol, amountFormatter), ")") : null, transaction.refundRouteText ? /* @__PURE__ */ react.default.createElement("span", null, transaction.refundRouteText) : null, transaction.surchargeAmount !== void 0 && !toDecimal(transaction.surchargeAmount).isZero() ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-sale-detail-refund-modal__transaction-service-charge" }, "(", _pisell_utils.locales.getText("pisell2.sale-detail.pay-v2.incl-payment-sc"), " ", formatRefundAmount(transaction.surchargeAmount, currencySymbol, amountFormatter), ")") : null));
|
|
230
232
|
}) : /* @__PURE__ */ react.default.createElement("div", { className: "pisell-sale-detail-refund-modal__empty" }, _pisell_utils.locales.getText("pisell2.sale-detail.pay.empty")))), /* @__PURE__ */ react.default.createElement("footer", { className: "pisell-sale-detail-refund-modal__footer" }, /* @__PURE__ */ react.default.createElement("label", { className: "pisell-sale-detail-refund-modal__refund-note" }, /* @__PURE__ */ react.default.createElement("textarea", {
|
|
231
233
|
value: refundNote,
|
|
232
234
|
"aria-label": String(_pisell_utils.locales.getText("pisell2.sale-detail.refund-modal.refund-note")),
|
|
@@ -471,20 +471,29 @@
|
|
|
471
471
|
font-weight: 900;
|
|
472
472
|
line-height: 28px;
|
|
473
473
|
}
|
|
474
|
+
|
|
475
|
+
&--editable {
|
|
476
|
+
align-self: stretch;
|
|
477
|
+
justify-content: center;
|
|
478
|
+
// Cover the right column, including the transaction card's vertical/right padding.
|
|
479
|
+
margin: -12px -14px -12px 0;
|
|
480
|
+
padding: 12px 14px 12px 0;
|
|
481
|
+
border: 0;
|
|
482
|
+
border-radius: 0 11px 11px 0;
|
|
483
|
+
font-family: inherit;
|
|
484
|
+
background: transparent;
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
|
|
487
|
+
&:focus-visible {
|
|
488
|
+
outline: 2px solid #9a65ff;
|
|
489
|
+
outline-offset: -3px;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
474
492
|
}
|
|
475
493
|
|
|
476
494
|
&__transaction-amount-edit {
|
|
477
|
-
padding: 0;
|
|
478
|
-
border: 0;
|
|
479
|
-
color: #edf2ff;
|
|
480
|
-
font: inherit;
|
|
481
|
-
font-size: 22px;
|
|
482
|
-
font-weight: 900;
|
|
483
|
-
line-height: 28px;
|
|
484
495
|
text-decoration: underline;
|
|
485
496
|
text-underline-offset: 5px;
|
|
486
|
-
background: transparent;
|
|
487
|
-
cursor: pointer;
|
|
488
497
|
}
|
|
489
498
|
|
|
490
499
|
&__transaction-calculation {
|
|
@@ -8,10 +8,20 @@ let react = require("react");
|
|
|
8
8
|
react = require_runtime.__toESM(react);
|
|
9
9
|
let _phosphor_icons_react = require("@phosphor-icons/react");
|
|
10
10
|
//#region src/plus/venueBookingDesign/BookingDatePicker.tsx
|
|
11
|
-
function
|
|
12
|
-
const
|
|
11
|
+
function useCalendarToday(timeZone = require_booking_date.VENUE_TIME_ZONE) {
|
|
12
|
+
const readToday = () => {
|
|
13
|
+
const now = /* @__PURE__ */ new Date();
|
|
14
|
+
return {
|
|
15
|
+
venue: require_booking_date.dateInZone(now, timeZone),
|
|
16
|
+
device: `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}`
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const [today, setToday] = (0, react.useState)(readToday);
|
|
13
20
|
(0, react.useEffect)(() => {
|
|
14
|
-
const refresh = () =>
|
|
21
|
+
const refresh = () => {
|
|
22
|
+
const next = readToday();
|
|
23
|
+
setToday((previous) => previous.venue === next.venue && previous.device === next.device ? previous : next);
|
|
24
|
+
};
|
|
15
25
|
refresh();
|
|
16
26
|
const timer = window.setInterval(refresh, 1e3);
|
|
17
27
|
window.addEventListener("focus", refresh);
|
|
@@ -24,9 +34,11 @@ function useVenueToday(timeZone = require_booking_date.VENUE_TIME_ZONE) {
|
|
|
24
34
|
}, [timeZone]);
|
|
25
35
|
return today;
|
|
26
36
|
}
|
|
27
|
-
function BookingDatePicker({ value, onChange, locale, title, description, stepNumber, stepStatus, timeZone = require_booking_date.VENUE_TIME_ZONE, minDate: minimum, maxDate: maximum, isUnavailable, dateStates = {}, onVisibleDatesChange, onInteraction, disabled = false, loading = false, allowEmpty = false, t }) {
|
|
37
|
+
function BookingDatePicker({ value, onChange, locale, title, description, stepNumber, stepStatus, timeZone = require_booking_date.VENUE_TIME_ZONE, todayMarker = "venue", minDate: minimum, maxDate: maximum, isUnavailable, dateStates = {}, onVisibleDatesChange, onInteraction, disabled = false, loading = false, allowEmpty = false, t }) {
|
|
28
38
|
var _dateStates$value, _dateStates$value2, _dateStates$value3;
|
|
29
|
-
const
|
|
39
|
+
const calendarToday = useCalendarToday(timeZone);
|
|
40
|
+
const today = calendarToday.venue;
|
|
41
|
+
const markedToday = todayMarker === "device" ? calendarToday.device : today;
|
|
30
42
|
const minDate = minimum || today;
|
|
31
43
|
const initialViewEnd = require_booking_date.shiftDate(require_booking_date.isCalendarDate(value) && value > minDate ? value : minDate, 180);
|
|
32
44
|
const [expandedViewEnd, setExpandedViewEnd] = (0, react.useState)(initialViewEnd);
|
|
@@ -339,13 +351,13 @@ function BookingDatePicker({ value, onChange, locale, title, description, stepNu
|
|
|
339
351
|
type: "button",
|
|
340
352
|
key: day,
|
|
341
353
|
"data-booking-day": day,
|
|
342
|
-
className: `booking-day ${day === value ? "is-selected" : ""} ${day ===
|
|
354
|
+
className: `booking-day ${day === value ? "is-selected" : ""} ${day === markedToday ? "is-today" : ""}`,
|
|
343
355
|
disabled: !allowed(day),
|
|
344
356
|
"aria-busy": loading || !dateStates[day] || dateStates[day].status === "loading" || void 0,
|
|
345
357
|
title: (_dateStates$day4 = dateStates[day]) === null || _dateStates$day4 === void 0 ? void 0 : _dateStates$day4.reason,
|
|
346
358
|
"aria-label": require_booking_date.calendarDateLabel(day, locale),
|
|
347
359
|
"aria-pressed": day === value,
|
|
348
|
-
"aria-current": day ===
|
|
360
|
+
"aria-current": day === markedToday ? "date" : void 0,
|
|
349
361
|
tabIndex: pageIndex === visiblePage && day === tabDay ? 0 : -1,
|
|
350
362
|
onClick: () => select(day),
|
|
351
363
|
onFocus: () => setFocusDay(day),
|
|
@@ -380,7 +392,7 @@ function BookingDatePicker({ value, onChange, locale, title, description, stepNu
|
|
|
380
392
|
return (_track$current4 = track.current) === null || _track$current4 === void 0 || (_track$current4 = _track$current4.querySelector(`[data-booking-day="${next}"]`)) === null || _track$current4 === void 0 ? void 0 : _track$current4.focus({ preventScroll: true });
|
|
381
393
|
});
|
|
382
394
|
}
|
|
383
|
-
}, /* @__PURE__ */ react.default.createElement("small", null, day ===
|
|
395
|
+
}, /* @__PURE__ */ react.default.createElement("small", null, day === markedToday ? t("calendarToday") : require_booking_date.calendarDateLabel(day, locale, { weekday: "short" })), /* @__PURE__ */ react.default.createElement("span", { className: "booking-day-date" }, /* @__PURE__ */ react.default.createElement("span", { className: "booking-day-date-full" }, require_booking_date.calendarDateLabel(day, locale, {
|
|
384
396
|
day: "numeric",
|
|
385
397
|
month: "short"
|
|
386
398
|
})), /* @__PURE__ */ react.default.createElement("span", { className: "booking-day-date-short" }, locale.startsWith("zh") ? day.slice(0, 7) === visibleWeek.slice(0, 7) ? require_booking_date.calendarDateLabel(day, locale, { day: "numeric" }) : `${Number(day.slice(5, 7))}/${Number(day.slice(-2))}` : require_booking_date.calendarDateLabel(day, locale, {
|
|
@@ -412,7 +424,7 @@ function BookingDatePicker({ value, onChange, locale, title, description, stepNu
|
|
|
412
424
|
}, /* @__PURE__ */ react.default.createElement(require_BookingMonthCalendar.BookingMonthCalendar, {
|
|
413
425
|
locale,
|
|
414
426
|
firstDay,
|
|
415
|
-
today,
|
|
427
|
+
today: markedToday,
|
|
416
428
|
month,
|
|
417
429
|
onMonthChange: (next) => {
|
|
418
430
|
if (disabled) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.425",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"react-zoom-pan-pinch": "^3.7.0",
|
|
75
75
|
"styled-components": "^6.0.0-rc.3",
|
|
76
76
|
"use-sync-external-store": "^1.6.0",
|
|
77
|
-
"@pisell/utils": "3.0.7",
|
|
78
77
|
"@pisell/pi-payment-sdk": "0.0.4",
|
|
79
78
|
"@pisell/icon": "0.0.11",
|
|
80
|
-
"@pisell/
|
|
81
|
-
"@pisell/materials": "6.12.
|
|
79
|
+
"@pisell/utils": "3.0.7",
|
|
80
|
+
"@pisell/materials": "6.12.95",
|
|
81
|
+
"@pisell/date-picker": "3.0.12"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"react": "^18.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|