@pisell/private-materials 6.11.218 → 6.11.220
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.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/ecocup/cupList/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useSkuModal.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/walletList/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/plus/noteModal/AddTempModal.d.ts +0 -1
- package/es/plus/orderList/config.d.ts +0 -1
- package/es/plus/pisellReservation/PisellReservation.js +0 -2
- package/es/plus/pisellReservation/components/blockTimeModal/demo.d.ts +0 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.d.ts +2 -2
- package/es/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.d.ts +13 -2
- package/es/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.js +46 -26
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +0 -1
- package/es/plus/pisellReservation/hooks/useFloorMapBookingInteraction.d.ts +1 -8
- package/es/plus/pisellReservation/hooks/useFloorMapBookingInteraction.js +25 -28
- package/es/plus/pisellReservation/hooks/useReservationResourceWallPersist.d.ts +2 -3
- package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/es/plus/pisellSalesGrid/PisellSalesGrid.js +7 -2
- package/es/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -2
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.js +18 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/utils.d.ts +1 -1
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/es/plus/walletPassGallery/index.d.ts +0 -1
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +0 -1
- package/es/pro/skuDetailModal/components/weighing/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/ecocup/cupList/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useSkuModal.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/walletList/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/plus/noteModal/AddTempModal.d.ts +0 -1
- package/lib/plus/orderList/config.d.ts +0 -1
- package/lib/plus/pisellReservation/PisellReservation.js +0 -2
- package/lib/plus/pisellReservation/components/blockTimeModal/demo.d.ts +0 -1
- package/lib/plus/pisellReservation/floorMap/floorPlanApi.d.ts +2 -2
- package/lib/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.d.ts +13 -2
- package/lib/plus/pisellReservation/floorRoomCard/mapRowToFloorRoomCardData.js +32 -26
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +0 -1
- package/lib/plus/pisellReservation/hooks/useFloorMapBookingInteraction.d.ts +1 -8
- package/lib/plus/pisellReservation/hooks/useFloorMapBookingInteraction.js +13 -37
- package/lib/plus/pisellReservation/hooks/useReservationResourceWallPersist.d.ts +2 -3
- package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.js +7 -2
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -2
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.js +11 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/utils.d.ts +1 -1
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/index.d.ts +0 -1
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +0 -1
- package/lib/pro/skuDetailModal/components/weighing/index.d.ts +0 -1
- package/package.json +3 -3
|
@@ -28,7 +28,6 @@ var import_floorMapHostCheckout = require("../floorMap/floorMapHostCheckout");
|
|
|
28
28
|
var import_calendarAdapter = require("../data/calendarAdapter");
|
|
29
29
|
var import_bookingToReservationTables = require("../data/bookingToReservationTables");
|
|
30
30
|
var import_mapRowToFloorRoomCardData = require("../floorRoomCard/mapRowToFloorRoomCardData");
|
|
31
|
-
var import_reservationTicketBookingHostParams = require("../utils/reservationTicketBookingHostParams");
|
|
32
31
|
function bookingOrderFinancialSig(raw) {
|
|
33
32
|
const order = raw.order;
|
|
34
33
|
const sum = order == null ? void 0 : order.summary;
|
|
@@ -116,8 +115,6 @@ function useFloorMapBookingInteraction(options) {
|
|
|
116
115
|
onFloorMapBookingClick,
|
|
117
116
|
dataSources,
|
|
118
117
|
mergedTableRows,
|
|
119
|
-
reservationRuleProduct,
|
|
120
|
-
associated_menu_list_ids,
|
|
121
118
|
reservationBiz,
|
|
122
119
|
resourceSelectMode
|
|
123
120
|
} = options;
|
|
@@ -178,7 +175,12 @@ function useFloorMapBookingInteraction(options) {
|
|
|
178
175
|
const shopId = ((_b = utils == null ? void 0 : utils.getData) == null ? void 0 : _b.call(utils, "shop_id")) ?? ((_g = (_f = (_e = (_d = (_c = utils == null ? void 0 : utils.store) == null ? void 0 : _c.getState) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.global) == null ? void 0 : _f.globalConfig) == null ? void 0 : _g.id);
|
|
179
176
|
const n = Number(shopId);
|
|
180
177
|
const isLegacyCheckoutShop = Number.isFinite(n) && n === 2155;
|
|
181
|
-
|
|
178
|
+
const recHasBooking = (() => {
|
|
179
|
+
const rid = rec.id;
|
|
180
|
+
const bid = rec.booking_id;
|
|
181
|
+
return rid != null && String(rid).trim() !== "" || bid != null && String(bid).trim() !== "";
|
|
182
|
+
})();
|
|
183
|
+
if (isLegacyCheckoutShop && reservationBiz !== "dine_in" && recHasBooking) {
|
|
182
184
|
(_h = utils == null ? void 0 : utils.action) == null ? void 0 : _h.call(utils, {
|
|
183
185
|
type: "pisell1.handleOpenHostCheckoutDrawer",
|
|
184
186
|
data: { item: rec }
|
|
@@ -201,7 +203,7 @@ function useFloorMapBookingInteraction(options) {
|
|
|
201
203
|
);
|
|
202
204
|
const floorMapItemClickBefore = (0, import_react.useCallback)(
|
|
203
205
|
(args) => {
|
|
204
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
206
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
205
207
|
if (args.mode === "edit") return;
|
|
206
208
|
const rowHit = (0, import_reservationCards.findReservationRow)(args.item, args.dataSources);
|
|
207
209
|
if (resourceSelectMode == null ? void 0 : resourceSelectMode.enabled) {
|
|
@@ -234,50 +236,24 @@ function useFloorMapBookingInteraction(options) {
|
|
|
234
236
|
const bid = rec.booking_id;
|
|
235
237
|
return rid != null && String(rid).trim() !== "" || bid != null && String(bid).trim() !== "";
|
|
236
238
|
})();
|
|
237
|
-
if (!hasValidBooking) {
|
|
238
|
-
if (!reservationRuleProduct) return;
|
|
239
|
-
if (!rowHit) return;
|
|
240
|
-
const createModeConfig = (0, import_reservationTicketBookingHostParams.buildReservationTicketBookingCreateModeConfigForRow)({
|
|
241
|
-
reservationBiz,
|
|
242
|
-
associated_menu_list_ids,
|
|
243
|
-
reservationRuleProduct,
|
|
244
|
-
row: rowHit
|
|
245
|
-
});
|
|
246
|
-
if (!createModeConfig) return;
|
|
247
|
-
(_f = (_e = (_d = engineCtx == null ? void 0 : engineCtx.appHelper) == null ? void 0 : _d.utils) == null ? void 0 : _e.action) == null ? void 0 : _f.call(_e, {
|
|
248
|
-
type: "pisell1.handleOpenEditBooking",
|
|
249
|
-
data: {
|
|
250
|
-
createModeConfig
|
|
251
|
-
},
|
|
252
|
-
callback: () => {
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
239
|
const rowResolved = rowHit ?? {
|
|
258
240
|
id: String(
|
|
259
|
-
((
|
|
241
|
+
((_e = (_d = args.item._sceneElement) == null ? void 0 : _d.dataBinding) == null ? void 0 : _e.recordId) ?? "unknown"
|
|
260
242
|
),
|
|
261
|
-
code: ((
|
|
243
|
+
code: ((_f = args.item._sceneElement) == null ? void 0 : _f.name) != null ? String(args.item._sceneElement.name) : "—",
|
|
262
244
|
cardStatus: "available"
|
|
263
245
|
};
|
|
264
|
-
const sceneName = ((
|
|
246
|
+
const sceneName = ((_g = args.item._sceneElement) == null ? void 0 : _g.name) != null ? String(args.item._sceneElement.name).trim() : void 0;
|
|
247
|
+
const recForDetail = hasValidBooking ? rec : {};
|
|
265
248
|
showBookingDetail({
|
|
266
|
-
rec,
|
|
249
|
+
rec: recForDetail,
|
|
267
250
|
rowResolved,
|
|
268
251
|
event: args.event,
|
|
269
252
|
sceneElementName: sceneName,
|
|
270
253
|
floorMapItemId: String(args.item.id)
|
|
271
254
|
});
|
|
272
255
|
},
|
|
273
|
-
[
|
|
274
|
-
showBookingDetail,
|
|
275
|
-
reservationRuleProduct,
|
|
276
|
-
engineCtx,
|
|
277
|
-
associated_menu_list_ids,
|
|
278
|
-
reservationBiz,
|
|
279
|
-
resourceSelectMode
|
|
280
|
-
]
|
|
256
|
+
[showBookingDetail, resourceSelectMode]
|
|
281
257
|
);
|
|
282
258
|
const openBookingDetailFromRaw = (0, import_react.useCallback)(
|
|
283
259
|
(payload) => {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { RecordBoardResourceWallCardModel, RecordBoardResourceWallLayoutPersist, VenueWallAppearanceTheme } from '@pisell/materials';
|
|
3
2
|
export interface UseReservationResourceWallPersistParams {
|
|
4
3
|
bodyViewStorageKey: string | undefined;
|
|
@@ -14,8 +13,8 @@ export interface UseReservationResourceWallPersistParams {
|
|
|
14
13
|
export declare function useReservationResourceWallPersist({ bodyViewStorageKey, isInternalListData, searchParams, onSearch, venueWallCards, floorDayBookingLoading, }: UseReservationResourceWallPersistParams): {
|
|
15
14
|
venueWallAppearanceTheme: VenueWallAppearanceTheme;
|
|
16
15
|
setVenueWallAppearanceTheme: import("react").Dispatch<import("react").SetStateAction<VenueWallAppearanceTheme>>;
|
|
17
|
-
venueWallAppearanceMode: "
|
|
18
|
-
setVenueWallAppearanceMode: import("react").Dispatch<import("react").SetStateAction<"
|
|
16
|
+
venueWallAppearanceMode: "dark" | "light";
|
|
17
|
+
setVenueWallAppearanceMode: import("react").Dispatch<import("react").SetStateAction<"dark" | "light">>;
|
|
19
18
|
venueWallResourceLayout: RecordBoardResourceWallLayoutPersist;
|
|
20
19
|
setVenueWallResourceLayout: import("react").Dispatch<import("react").SetStateAction<RecordBoardResourceWallLayoutPersist>>;
|
|
21
20
|
};
|
|
@@ -254,6 +254,10 @@ var PisellSalesGrid = (props) => {
|
|
|
254
254
|
};
|
|
255
255
|
}, [searchParams, pagination.pageNumber, pagination.pageSize]);
|
|
256
256
|
const initLoad = (0, import_react.useCallback)(() => {
|
|
257
|
+
if (propsOnRefresh) {
|
|
258
|
+
propsOnRefresh();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
257
261
|
if (currentPerspective === "monitor") {
|
|
258
262
|
_getBookingList.run({ ...requestParams, ...(extParams == null ? void 0 : extParams.list) || {} });
|
|
259
263
|
return;
|
|
@@ -262,11 +266,12 @@ var PisellSalesGrid = (props) => {
|
|
|
262
266
|
...requestParams,
|
|
263
267
|
...(extParams == null ? void 0 : extParams.list) || {}
|
|
264
268
|
});
|
|
265
|
-
}, [currentPerspective, requestParams, _getBookingList, _getOrderList]);
|
|
269
|
+
}, [currentPerspective, requestParams, _getBookingList, _getOrderList, propsOnRefresh]);
|
|
266
270
|
const onClearSelection = (0, import_react.useCallback)(() => {
|
|
267
271
|
setSelectedKeys([]);
|
|
268
272
|
setSelectedRows([]);
|
|
269
|
-
|
|
273
|
+
propsOnSelectionChange == null ? void 0 : propsOnSelectionChange([], []);
|
|
274
|
+
}, [propsOnSelectionChange]);
|
|
270
275
|
const actions = (0, import_useActions.default)({
|
|
271
276
|
onRefresh: initLoad,
|
|
272
277
|
onClearSelection
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface UseSalesGridDataParams {
|
|
3
2
|
perspective: 'monitor' | 'handle';
|
|
4
3
|
extParams?: {
|
|
@@ -25,7 +24,7 @@ export declare function useSalesGridData(params: UseSalesGridDataParams): {
|
|
|
25
24
|
selectedKeys: import("react").Key[];
|
|
26
25
|
selectedRows: any[];
|
|
27
26
|
onSelectionChange: (keys: React.Key[], rows: any[]) => void;
|
|
28
|
-
rowKey: "
|
|
27
|
+
rowKey: (record: any) => import("react").Key;
|
|
29
28
|
onRefresh: () => void;
|
|
30
29
|
refreshAsync: () => Promise<any>;
|
|
31
30
|
};
|
|
@@ -62,6 +62,12 @@ function getDefaultSearchParams(perspective) {
|
|
|
62
62
|
sort: "created_at:desc"
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
+
function resolveSalesGridRowKey(perspective, record) {
|
|
66
|
+
if (perspective === "handle") {
|
|
67
|
+
return (record == null ? void 0 : record.order_id) || (record == null ? void 0 : record.id);
|
|
68
|
+
}
|
|
69
|
+
return (record == null ? void 0 : record.id) ?? "";
|
|
70
|
+
}
|
|
65
71
|
function useSalesGridData(params) {
|
|
66
72
|
var _a, _b, _c, _d;
|
|
67
73
|
const { perspective, extParams } = params;
|
|
@@ -181,6 +187,10 @@ function useSalesGridData(params) {
|
|
|
181
187
|
const data = perspective === "monitor" ? ((_a = _getBookingList.data) == null ? void 0 : _a.list) ?? [] : ((_b = _getOrderList.data) == null ? void 0 : _b.list) ?? [];
|
|
182
188
|
const loading = perspective === "monitor" ? _getBookingList.loading : _getOrderList.loading;
|
|
183
189
|
const total = perspective === "monitor" ? ((_c = _getBookingList.data) == null ? void 0 : _c.count) ?? 0 : ((_d = _getOrderList.data) == null ? void 0 : _d.count) ?? 0;
|
|
190
|
+
const rowKey = (0, import_react.useMemo)(
|
|
191
|
+
() => (record) => resolveSalesGridRowKey(perspective, record),
|
|
192
|
+
[perspective]
|
|
193
|
+
);
|
|
184
194
|
return {
|
|
185
195
|
data,
|
|
186
196
|
loading,
|
|
@@ -193,7 +203,7 @@ function useSalesGridData(params) {
|
|
|
193
203
|
selectedKeys,
|
|
194
204
|
selectedRows,
|
|
195
205
|
onSelectionChange,
|
|
196
|
-
rowKey
|
|
206
|
+
rowKey,
|
|
197
207
|
onRefresh,
|
|
198
208
|
refreshAsync
|
|
199
209
|
};
|
|
@@ -14,7 +14,7 @@ export declare const getSkuCardConfig: (finalConfig: ProductCardConfig) => {
|
|
|
14
14
|
paddingY: number | undefined;
|
|
15
15
|
paddingX: number | undefined;
|
|
16
16
|
isBorderVisible: boolean;
|
|
17
|
-
layoutDirection: "
|
|
17
|
+
layoutDirection: "column" | "row";
|
|
18
18
|
};
|
|
19
19
|
skuActionConfig: {
|
|
20
20
|
isOpen: boolean;
|
|
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
|
|
|
3
3
|
value?: string;
|
|
4
4
|
onChange?: (val: string) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const getBaseTime: (size: number) =>
|
|
6
|
+
export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
|
|
7
7
|
declare const ImageUpload: React.FC<ImageUploadProps>;
|
|
8
8
|
export default ImageUpload;
|
|
@@ -3,7 +3,7 @@ import { ItemLayout, ItemProps, PresetConfig, SelectorProps, SelectorVariant } f
|
|
|
3
3
|
import './selector.less';
|
|
4
4
|
export declare const SelectorContext: React.Context<{
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
|
-
mode?: "
|
|
6
|
+
mode?: "single" | "multiple" | undefined;
|
|
7
7
|
itemLayout?: ItemLayout | undefined;
|
|
8
8
|
valueType?: "object" | "primitive" | undefined;
|
|
9
9
|
variant?: SelectorVariant | undefined;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
|
|
5
5
|
* 包括如何通过 Context 访问父组件配置
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
export declare const BasicExample: () => JSX.Element;
|
|
9
8
|
export declare const ChildrenExample: () => JSX.Element;
|
|
10
9
|
export declare const CustomItemExample: () => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.220",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"react-resizable": "^3.0.5",
|
|
69
69
|
"styled-components": "^6.0.0-rc.3",
|
|
70
70
|
"@pisell/utils": "3.0.2",
|
|
71
|
+
"@pisell/materials": "6.11.71",
|
|
71
72
|
"@pisell/icon": "0.0.11",
|
|
72
|
-
"@pisell/date-picker": "3.0.8"
|
|
73
|
-
"@pisell/materials": "6.11.71"
|
|
73
|
+
"@pisell/date-picker": "3.0.8"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": "^18.0.0",
|