@pisell/private-materials 6.12.470 → 6.12.471
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/preview.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- 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 +8 -2
- package/es/components/bigSale/templates/Kiosk/payment/index.js +16 -6
- package/es/components/bigSale/templates/Kiosk/payment/useKioskScreenProtection.js +13 -8
- package/es/components/kiosk/README.md +3 -2
- package/es/components/kiosk/components/BottomBar/index.d.ts +1 -1
- package/es/components/kiosk/components/BottomBar/index.js +3 -2
- package/es/components/kiosk/components/BottomBar/useKioskBarLayout.js +4 -6
- package/es/components/kiosk/components/Shell/KioskBottomBarHost.js +10 -5
- package/es/components/kiosk/components/Shell/index.d.ts +3 -0
- package/es/components/kiosk/components/Shell/index.js +3 -2
- package/es/components/kiosk/components/Shell/useKioskMemberAction.js +1 -0
- package/es/components/kiosk/sales/KioskSaleSession.js +16 -6
- package/es/components/kiosk/sales/contracts.d.ts +1 -0
- package/es/components/kiosk/sales/shopping/ShoppingOrderBar.js +3 -3
- package/es/components/kiosk/sales/shopping/ShoppingScreen.js +1 -2
- package/es/components/kiosk/sales/shopping/types.d.ts +0 -3
- package/es/components/kiosk/sales/useCheckout.js +1 -0
- package/es/components/kiosk/sales/useSaleSessionExit.js +1 -0
- package/es/components/kiosk/slices/payment/PaymentContent.js +5 -4
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/components/vendingMachine/README.md +1 -1
- package/es/components/venueBookingSales/checkout/VenueBookingHolderStep.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueCustomerAccess.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueKioskCheckout.js +1 -0
- package/es/components/venueBookingSales/extras/VenueExtraDetailModal.js +1 -0
- package/es/components/venueBookingSales/useVenueBookingSession.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/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/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/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/lib/components/bigSale/templates/Kiosk/index.js +7 -2
- package/lib/components/bigSale/templates/Kiosk/payment/index.js +16 -6
- package/lib/components/bigSale/templates/Kiosk/payment/useKioskScreenProtection.js +13 -8
- package/lib/components/kiosk/README.md +3 -2
- package/lib/components/kiosk/components/BottomBar/index.d.ts +1 -1
- package/lib/components/kiosk/components/BottomBar/index.js +3 -2
- package/lib/components/kiosk/components/BottomBar/useKioskBarLayout.js +4 -6
- package/lib/components/kiosk/components/Shell/KioskBottomBarHost.js +10 -5
- package/lib/components/kiosk/components/Shell/index.d.ts +3 -0
- package/lib/components/kiosk/components/Shell/index.js +3 -2
- package/lib/components/kiosk/sales/KioskSaleSession.js +15 -6
- package/lib/components/kiosk/sales/contracts.d.ts +1 -0
- package/lib/components/kiosk/sales/shopping/ShoppingOrderBar.js +3 -3
- package/lib/components/kiosk/sales/shopping/ShoppingScreen.js +1 -2
- package/lib/components/kiosk/sales/shopping/types.d.ts +0 -3
- package/lib/components/kiosk/slices/payment/PaymentContent.js +4 -3
- package/lib/components/vendingMachine/README.md +1 -1
- package/package.json +4 -4
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -4,6 +4,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
4
4
|
import useInitLocalesOnce from "../../../hooks/useInitLocalesOnce.js";
|
|
5
5
|
import { isHolderConfirmCancelled } from "../../../plus/salesSdk/holderConfirm/createHolderConfirmBridge.js";
|
|
6
6
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import locales_default from "../../bigSale/locales/index.js";
|
|
8
9
|
import { presentBaseSalesPaymentResult } from "../../checkout/paymentRuntime/presentBaseSalesPaymentResult.js";
|
|
9
10
|
import { usePaymentScreenProtection } from "../../checkout/paymentRuntime/usePaymentScreenProtection.js";
|
|
@@ -10,6 +10,7 @@ import immersive from "../../../pro/skuDetailModal/appearances/immersive/index.j
|
|
|
10
10
|
import { resolveEffectiveHolderConfig } from "../../../plus/salesSdk/utils/productHolderConfig.js";
|
|
11
11
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
12
12
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
13
|
+
import "../../../plus/salesSdk/index.js";
|
|
13
14
|
import { localizedText, orderIdentity } from "../presentation.js";
|
|
14
15
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
15
16
|
import { ProductDescription } from "../../../plus/venueBookingDesign/shared/ProductDescription.js";
|
|
@@ -11,6 +11,7 @@ import { useSalesSdkHostBridges } from "../../plus/salesSdk/context/SalesSdkHost
|
|
|
11
11
|
import { formatTempOrderSettlementAmount } from "../../plus/multiCurrencySettlement/index.js";
|
|
12
12
|
import { useSalesSdkBusinessAvailability } from "../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
13
13
|
import { pickIdentity } from "../../plus/salesSdk/utils/identity.js";
|
|
14
|
+
import "../../plus/salesSdk/index.js";
|
|
14
15
|
import { getPendingWalletPaymentAmount, resolveEffectiveSaleDetailAmountDue } from "../../plus/saleDetail/utils.js";
|
|
15
16
|
import { useBookingUI } from "../../plus/venueBookingDesign/context.js";
|
|
16
17
|
import { useBookingProgress } from "../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
package/es/index.js
CHANGED
|
@@ -92,6 +92,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
92
92
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
93
93
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
94
94
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
95
|
+
import "./plus/salesSdk/index.js";
|
|
95
96
|
import { defineExitPolicy, defineNavigationGuard, definePredicate, defineTrigger, defineWorkflow } from "./components/HDLKiosk/kernel/application/defineApplication.js";
|
|
96
97
|
import { accept, defineSlice, perform, require } from "./components/HDLKiosk/kernel/application/defineSlice.js";
|
|
97
98
|
import { defineKioskScanCommand, kioskScanTrigger, salesScan, startOnScan } from "./components/kiosk/sales/inputs/scan.js";
|
|
@@ -185,6 +186,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
185
186
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
186
187
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
187
188
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
189
|
+
import "./plus/pisellReservation/index.js";
|
|
188
190
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
189
191
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
190
192
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -290,4 +290,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
//#endregion
|
|
293
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
293
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, findFirstVirtualCurrencyAsset, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getReservedVirtualSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
|
|
|
259
259
|
return rows;
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
|
-
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
|
|
|
78
78
|
PisellToast({ content: err instanceof Error ? err.message : String(err) });
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
|
|
|
927
927
|
];
|
|
928
928
|
}
|
|
929
929
|
//#endregion
|
|
930
|
-
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./serve/formResourcePage.js";
|
|
2
|
+
import "./floorRoomCard/mapRowToFloorRoomCardData.js";
|
|
3
|
+
import "./floorRoomCard/ReservationFloorRoomCard.js";
|
|
4
|
+
import "./floorMap/reservationMock.js";
|
|
5
|
+
import "./floorMap/floorPlanApi.js";
|
|
6
|
+
import "./reservationConstants.js";
|
|
7
|
+
import "./data/bookingToReservationTables.js";
|
|
8
|
+
import "./data/formResourceToReservationTables.js";
|
|
9
|
+
import "./data/salesEmbeddedResourceToTableRows.js";
|
|
10
|
+
import "./floorMap/reservationCards.js";
|
|
11
|
+
import "./PisellReservation.js";
|
|
12
|
+
import "./PisellReservationBookingPage.js";
|
|
13
|
+
import "./PisellVenueControlPage.js";
|
|
14
|
+
import "./PisellVenueWallPage.js";
|
|
15
|
+
import "./PisellReservationTablePage.js";
|
|
16
|
+
import "./components/SelectFloorMapResourceDialog.js";
|
|
17
|
+
export {};
|
|
@@ -13,6 +13,7 @@ import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
|
|
|
13
13
|
import locales_default from "./locales.js";
|
|
14
14
|
import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
15
15
|
import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
|
|
16
|
+
import "../salesSdk/index.js";
|
|
16
17
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
17
18
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
18
19
|
import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
|
|
@@ -2,6 +2,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import { resolveContactsInfo } from "../utils.js";
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
|
|
5
|
+
import "../../../../salesSdk/index.js";
|
|
5
6
|
import { useMemo } from "react";
|
|
6
7
|
import { useMemoizedFn } from "ahooks";
|
|
7
8
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -4,6 +4,7 @@ import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.
|
|
|
4
4
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
5
5
|
import useLogger from "../../../../hooks/useLogger.js";
|
|
6
6
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
7
|
+
import "../../../salesSdk/index.js";
|
|
7
8
|
import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
|
|
8
9
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
9
10
|
import { EBizPrintType } from "./types.js";
|
|
@@ -10,6 +10,7 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
|
10
10
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
11
11
|
import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
12
12
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
13
|
+
import "../../../salesSdk/index.js";
|
|
13
14
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
14
15
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
15
16
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -5,6 +5,7 @@ import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js
|
|
|
5
5
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
8
|
+
import "../../../salesSdk/index.js";
|
|
8
9
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
9
10
|
import React, { memo, useMemo } from "react";
|
|
10
11
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -5,6 +5,7 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
|
|
|
5
5
|
import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
|
|
6
6
|
import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
|
|
7
7
|
import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
+
import "../salesSdk/index.js";
|
|
8
9
|
import Base_default from "./Base.js";
|
|
9
10
|
import { resolveSaleDetailOsProps } from "./osProps.js";
|
|
10
11
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import useStableInstanceId from "../../../../../../hooks/useStableInstanceId.js";
|
|
2
2
|
import { useSalesSdkDish } from "../../../../../salesSdk/hooks/useSalesSdkDish.js";
|
|
3
3
|
import { useCurrentSalesSdkDish } from "../../../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
|
|
4
|
+
import "../../../../../salesSdk/index.js";
|
|
4
5
|
import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
|
|
5
6
|
import { DishGroupView } from "./DishGroupView.js";
|
|
6
7
|
import dayjs from "dayjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import { useCurrentSalesSdkDish } from "../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
|
|
4
|
+
import "../../../salesSdk/index.js";
|
|
4
5
|
import { getInternalNotesByScheduleEvent } from "../../serve.js";
|
|
5
6
|
import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
|
|
6
7
|
import { DetailActions } from "../../components/DetailActions/index.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "./hosts/createInstanceHostBridge.js";
|
|
2
|
+
import "./holderConfirm/createHolderConfirmBridge.js";
|
|
3
|
+
import "./giftSelect/createGiftSelectBridge.js";
|
|
4
|
+
import "./context/SalesSdkHostBridgesContext.js";
|
|
5
|
+
import "./utils/formatHolderOptions.js";
|
|
6
|
+
import "./utils/enrichCartLineHolderDisplay.js";
|
|
7
|
+
import "./context/SalesSdkHolderContext.js";
|
|
8
|
+
import "../multiCurrencySettlement/index.js";
|
|
9
|
+
import "./utils/customerAuthGate.js";
|
|
10
|
+
import "./context/SalesSdkBusinessAvailabilityContext.js";
|
|
11
|
+
import "./utils/appendPromotionTags.js";
|
|
12
|
+
import "./utils/productSkuOptions.js";
|
|
13
|
+
import "./context/SalesSdkUIHostsContext.js";
|
|
14
|
+
import "./utils/runAddProductFlow.js";
|
|
15
|
+
import "./components/showAddToCartToast.js";
|
|
16
|
+
import "./utils/resolveAddProductDebounceKey.js";
|
|
17
|
+
import "./utils/identity.js";
|
|
18
|
+
import "./utils/resolveInCartQuantityForAddToast.js";
|
|
19
|
+
import "./utils/addProductWithFlowDebounced.js";
|
|
20
|
+
import "./utils/bookingDate.js";
|
|
21
|
+
import "./utils/holderSubmitValidation.js";
|
|
22
|
+
import "./utils/removeOrderProducts.js";
|
|
23
|
+
import "./selectors.js";
|
|
24
|
+
import "./utils/enrich.js";
|
|
25
|
+
import "./giftSelect/createOpenGiftSelectHost.js";
|
|
26
|
+
import "./utils/ensureHoldersBeforeSubmit.js";
|
|
27
|
+
import "./hooks/useSalesSdk.js";
|
|
28
|
+
import "./bookingEditService/BookingEditServiceDrawer.js";
|
|
29
|
+
import "./hosts/BookingEditHostRenderer.js";
|
|
30
|
+
import "./hosts/CustomerAuthHostRenderer.js";
|
|
31
|
+
import "./hooks/useSalesSdkCart.js";
|
|
32
|
+
import "./hooks/useSalesSdkCustomer.js";
|
|
33
|
+
import "./normalProductDetail/NormalProductDetailHostRenderer.js";
|
|
34
|
+
import "./hosts/createOpenBookingEditHost.js";
|
|
35
|
+
import "./hosts/createOpenMultiDaySelectHost.js";
|
|
36
|
+
import "./hosts/createOpenHolderSelectHost.js";
|
|
37
|
+
import "./hosts/createOpenCustomerAuthHost.js";
|
|
38
|
+
import "./demo/hosts/legacyOpenProductDetail.js";
|
|
39
|
+
import "./hosts/createCompositeOpenProductDetailHost.js";
|
|
40
|
+
import "./normalProductDetail/createOpenNormalProductDetailHost.js";
|
|
41
|
+
import "./normalProductDetail/createOpenBookingSelectionFlowHost.js";
|
|
42
|
+
import "./giftSelect/GiftSelectModal.js";
|
|
43
|
+
import "./giftSelect/GiftSelectHostRenderer.js";
|
|
44
|
+
import "./allergy/AllergySelectionModal.js";
|
|
45
|
+
import "./context/SalesSdkProvider.js";
|
|
46
|
+
import "./context/SalesSdkDishContext.js";
|
|
47
|
+
import "./context/SalesSdkBookingContext.js";
|
|
48
|
+
import "./hooks/useSalesSdkSummary.js";
|
|
49
|
+
import "./hooks/useSalesSdkProducts.js";
|
|
50
|
+
import "./demo/index.js";
|
|
51
|
+
import "./hooks/useSalesSdkDish.js";
|
|
52
|
+
import "./hooks/useCurrentSalesSdkDish.js";
|
|
53
|
+
import "./hooks/useSyncOsModule.js";
|
|
54
|
+
export {};
|
|
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
|
|
|
31
31
|
return typeof off === "function" ? off : () => {};
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export { formatBookingDateTime, subscribeBookingDateChange };
|
|
34
|
+
export { BOOKING_CONTEXT_DATE_EVENT, formatBookingDateTime, subscribeBookingDateChange };
|
|
@@ -102,4 +102,4 @@ function buildHolderListRequestKey(params) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
|
-
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, resolveHolderDisplayConfig };
|
|
105
|
+
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthMethodType, VerificationMethod } from "./shared/types.js";
|
|
1
|
+
import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
|
|
2
2
|
import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
|
|
3
3
|
import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
|
|
4
|
-
import { AuthModal
|
|
4
|
+
import { AuthModal } from "./AuthModal.js";
|
|
@@ -226,4 +226,4 @@ interface RegisterFormData {
|
|
|
226
226
|
verification_token?: string;
|
|
227
227
|
}
|
|
228
228
|
//#endregion
|
|
229
|
-
export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
|
|
229
|
+
export { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
|
|
@@ -334,7 +334,7 @@ function KioskBigSaleTemplate({ isActive = true, catalogPreparation, osKey, prod
|
|
|
334
334
|
isReturningToAdvertisement,
|
|
335
335
|
view
|
|
336
336
|
]);
|
|
337
|
-
const protectScreen = require_useKioskScreenProtection.useKioskScreenProtection(app, onPaymentPageActiveChange,
|
|
337
|
+
const protectScreen = require_useKioskScreenProtection.useKioskScreenProtection(app, onPaymentPageActiveChange, false);
|
|
338
338
|
(0, react.useEffect)(() => {
|
|
339
339
|
const bookingTicket = context.sales.bookingTicket;
|
|
340
340
|
if (!bookingTicket || context.sales.status !== "ready" || !context.sales.tempOrder) return;
|
|
@@ -1240,7 +1240,12 @@ function KioskBigSaleTemplate({ isActive = true, catalogPreparation, osKey, prod
|
|
|
1240
1240
|
context,
|
|
1241
1241
|
checkoutPreparation: paymentPreparation,
|
|
1242
1242
|
channel: platform,
|
|
1243
|
-
protectPayment: isActive
|
|
1243
|
+
protectPayment: isActive ? protectScreen : void 0,
|
|
1244
|
+
onHostHome: isActive && onRequestHome ? () => {
|
|
1245
|
+
if (!paymentPageSessionRef.current || paymentPageSessionRef.current.completed) return;
|
|
1246
|
+
closePaymentPage();
|
|
1247
|
+
handleReturnToAdvertisement();
|
|
1248
|
+
} : void 0,
|
|
1244
1249
|
onBack: () => {
|
|
1245
1250
|
var _paymentPageSessionRe3, _paymentPageSessionRe4;
|
|
1246
1251
|
const returnView = (_paymentPageSessionRe3 = (_paymentPageSessionRe4 = paymentPageSessionRef.current) === null || _paymentPageSessionRe4 === void 0 ? void 0 : _paymentPageSessionRe4.returnView) !== null && _paymentPageSessionRe3 !== void 0 ? _paymentPageSessionRe3 : "cart";
|
|
@@ -47,8 +47,8 @@ const paymentPageLocales = Object.entries(require_locales.default).reduce((resul
|
|
|
47
47
|
return result;
|
|
48
48
|
}, {});
|
|
49
49
|
/** Owns this Kiosk screen only; the existing POS PaymentModal is never mounted. */
|
|
50
|
-
function KioskPaymentPage({ context, checkoutPreparation, channel, active = true, paymentPolicy, loadingFallback, onDisposed, protectPayment, onBack, onPaid }) {
|
|
51
|
-
var _baseSales$getTempOrd, _utils$
|
|
50
|
+
function KioskPaymentPage({ context, checkoutPreparation, channel, active = true, paymentPolicy, loadingFallback, onDisposed, protectPayment, onBack, onHostHome, onPaid }) {
|
|
51
|
+
var _utils$getApp, _baseSales$getTempOrd, _utils$getApp2, _utils$getApp2$getLoc, _utils$storage, _utils$storage$get;
|
|
52
52
|
const utils = require_useEngineContext.default().appHelper.utils;
|
|
53
53
|
const baseSales = context.sales.bookingTicket;
|
|
54
54
|
const readAmount = (paymentPolicy === null || paymentPolicy === void 0 ? void 0 : paymentPolicy.readAmount) || require_transaction.readPaymentAmount;
|
|
@@ -63,7 +63,17 @@ function KioskPaymentPage({ context, checkoutPreparation, channel, active = true
|
|
|
63
63
|
activeRef.current = active;
|
|
64
64
|
const stateRef = (0, react.useRef)(require_transaction.hasUnresolvedDevicePayment(baseSales) ? "uncertain" : "idle");
|
|
65
65
|
const [state, setState] = (0, react.useState)(stateRef.current);
|
|
66
|
-
const
|
|
66
|
+
const retryPending = (0, react.useRef)(false);
|
|
67
|
+
const attemptEvents = require_useKioskScreenProtection.usePaymentAttemptProtection(state, protectPayment, retryPending);
|
|
68
|
+
const history = onHostHome ? (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.call(utils)) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.history) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.instance : void 0;
|
|
69
|
+
const handleNavigation = (0, ahooks.useMemoizedFn)(({ pathname }) => {
|
|
70
|
+
if (pathname !== "/") return;
|
|
71
|
+
if (stateRef.current === "idle" || stateRef.current === "paying" && retryPending.current) onHostHome === null || onHostHome === void 0 || onHostHome();
|
|
72
|
+
});
|
|
73
|
+
(0, react.useEffect)(() => {
|
|
74
|
+
var _history$listen;
|
|
75
|
+
return history === null || history === void 0 || (_history$listen = history.listen) === null || _history$listen === void 0 ? void 0 : _history$listen.call(history, handleNavigation);
|
|
76
|
+
}, [history, handleNavigation]);
|
|
67
77
|
const [methods, setMethods] = (0, react.useState)([]);
|
|
68
78
|
const [ready, setReady] = (0, react.useState)(false);
|
|
69
79
|
const [optionsError, setOptionsError] = (0, react.useState)();
|
|
@@ -109,7 +119,7 @@ function KioskPaymentPage({ context, checkoutPreparation, channel, active = true
|
|
|
109
119
|
Promise.resolve((_disposalCallbackRef$ = disposalCallbackRef.current) === null || _disposalCallbackRef$ === void 0 ? void 0 : _disposalCallbackRef$.call(disposalCallbackRef)).catch(() => {});
|
|
110
120
|
} catch (_unused2) {}
|
|
111
121
|
});
|
|
112
|
-
require_useInitLocalesOnce.default(paymentPageLocales, ((_utils$
|
|
122
|
+
require_useInitLocalesOnce.default(paymentPageLocales, ((_utils$getApp2 = utils.getApp) === null || _utils$getApp2 === void 0 || (_utils$getApp2 = _utils$getApp2.call(utils)) === null || _utils$getApp2 === void 0 || (_utils$getApp2 = _utils$getApp2.locales) === null || _utils$getApp2 === void 0 || (_utils$getApp2$getLoc = _utils$getApp2.getLocale) === null || _utils$getApp2$getLoc === void 0 ? void 0 : _utils$getApp2$getLoc.call(_utils$getApp2)) || ((_utils$storage = utils.storage) === null || _utils$storage === void 0 || (_utils$storage$get = _utils$storage.get) === null || _utils$storage$get === void 0 ? void 0 : _utils$storage$get.call(_utils$storage, "umi_locale")) || "en");
|
|
113
123
|
(0, react.useEffect)(() => {
|
|
114
124
|
mountedRef.current = true;
|
|
115
125
|
return () => {
|
|
@@ -376,9 +386,9 @@ function KioskPaymentPage({ context, checkoutPreparation, channel, active = true
|
|
|
376
386
|
return release;
|
|
377
387
|
});
|
|
378
388
|
(0, react.useEffect)(() => {
|
|
379
|
-
var _utils$
|
|
389
|
+
var _utils$getApp3, _app$applicationManag, _app$applicationManag2;
|
|
380
390
|
if (normalizedChannel !== "kiosk") return;
|
|
381
|
-
const app = ((_utils$
|
|
391
|
+
const app = ((_utils$getApp3 = utils.getApp) === null || _utils$getApp3 === void 0 ? void 0 : _utils$getApp3.call(utils)) || window.app;
|
|
382
392
|
const globalApp = app === null || app === void 0 || (_app$applicationManag = app.applicationManager) === null || _app$applicationManag === void 0 || (_app$applicationManag2 = _app$applicationManag.get) === null || _app$applicationManag2 === void 0 ? void 0 : _app$applicationManag2.call(_app$applicationManag, "global");
|
|
383
393
|
let cleanup;
|
|
384
394
|
try {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
require("../../../../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
let react = require("react");
|
|
3
3
|
//#region src/components/bigSale/templates/Kiosk/payment/useKioskScreenProtection.ts
|
|
4
|
-
/**
|
|
5
|
-
* protection only while its payment page is processing a payment. */
|
|
4
|
+
/** Payment attempts and protected device steps (such as dispensing) share the host timer. */
|
|
6
5
|
function useKioskScreenProtection(app, onActiveChange, protectWholeStep) {
|
|
7
6
|
const protect = (0, react.useCallback)(() => {
|
|
8
7
|
var _app$getPlugin, _app$history, _app$history$block;
|
|
@@ -29,16 +28,22 @@ function useKioskScreenProtection(app, onActiveChange, protectWholeStep) {
|
|
|
29
28
|
}, [protectWholeStep, protect]);
|
|
30
29
|
return protect;
|
|
31
30
|
}
|
|
32
|
-
function usePaymentAttemptProtection(state, protect) {
|
|
33
|
-
const [waitingForRetry,
|
|
34
|
-
const
|
|
31
|
+
function usePaymentAttemptProtection(state, protect, retryPending) {
|
|
32
|
+
const [waitingForRetry, setRetryState] = (0, react.useState)(false);
|
|
33
|
+
const setWaitingForRetry = (0, react.useCallback)((waiting) => {
|
|
34
|
+
if (retryPending) retryPending.current = waiting;
|
|
35
|
+
setRetryState(waiting);
|
|
36
|
+
}, [retryPending]);
|
|
37
|
+
const processing = state === "paying" || state === "authorizing" || state === "cancelling" || state === "complete";
|
|
38
|
+
const awaitingRetry = state === "paying" && waitingForRetry;
|
|
35
39
|
(0, react.useLayoutEffect)(() => {
|
|
36
40
|
if (!processing) setWaitingForRetry(false);
|
|
37
|
-
else if (!
|
|
41
|
+
else if (!awaitingRetry) return protect === null || protect === void 0 ? void 0 : protect();
|
|
38
42
|
}, [
|
|
39
43
|
processing,
|
|
40
|
-
|
|
41
|
-
protect
|
|
44
|
+
awaitingRetry,
|
|
45
|
+
protect,
|
|
46
|
+
setWaitingForRetry
|
|
42
47
|
]);
|
|
43
48
|
return protect && {
|
|
44
49
|
onAttemptStarted: () => setWaitingForRetry(false),
|
|
@@ -181,7 +181,7 @@ kiosk/
|
|
|
181
181
|
## 组件尺寸开关
|
|
182
182
|
|
|
183
183
|
具有宽度相关尺寸调整的组件使用同名属性 `enableResponsiveScaling?: boolean`,默认 `false`。
|
|
184
|
-
|
|
184
|
+
各组件独立控制尺寸。Retail vending 的 Catalog、购物车和支付页共用宿主传入的 `shoppingBottomBarProps`。
|
|
185
185
|
关闭时采用原有规则在 **1080 CSS px** 下的计算值,保留 `clamp()` 上下限;开启时沿用原来的视口/容器宽度规则。
|
|
186
186
|
普通容器填充、换行、滚动、安全区和弹窗边界限制始终保留。窄窗口下固定尺寸不会自动缩小。
|
|
187
187
|
|
|
@@ -189,7 +189,7 @@ kiosk/
|
|
|
189
189
|
| --- | --- | --- |
|
|
190
190
|
| `CatalogProductCard` | 商品名称、价格、促销字号、数量控件、卡片最小高度 | 组件 prop;在 `ProductCatalog` 中由 `getCardProps(product)` 返回该属性 |
|
|
191
191
|
| `KioskCategorySidebar` | 分类侧栏宽度 | 组件 prop;组合目录通过 `categorySidebarProps` 透传 |
|
|
192
|
-
| `KioskBottomBar` | 底栏字体、按钮、图标、间距及外壳底部偏移 |
|
|
192
|
+
| `KioskBottomBar` | 底栏字体、按钮、图标、间距及外壳底部偏移 | 同时设置 `enableResponsiveScaling` 和 `compactScale`(大于 0 且不超过 1)时启用,省略比例时使用固定尺寸 |
|
|
193
193
|
| `KioskDialog` | 弹窗媒体查询中的字体、图标、内边距和按钮尺寸 | 组件 prop,模式直接设置在 Portal 根节点 |
|
|
194
194
|
| 删除商品确认框 | 确认面板内边距 | `getOrderActionDialogProps({ enableResponsiveScaling: true })`;原 `orderActionDialogProps` 为固定模式 |
|
|
195
195
|
| `IdleScreen` | 欢迎页文字和间距的容器断点 | 组件 prop |
|
|
@@ -207,6 +207,7 @@ kiosk/
|
|
|
207
207
|
useKioskBottomBar({
|
|
208
208
|
ariaLabel: 'Order actions',
|
|
209
209
|
enableResponsiveScaling: true,
|
|
210
|
+
compactScale: 0.975,
|
|
210
211
|
trailing: <button onClick={checkout}>Checkout</button>,
|
|
211
212
|
});
|
|
212
213
|
|
|
@@ -2,7 +2,7 @@ import { ResponsiveScalingProps } from "../responsiveScaling.js";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
//#region src/components/kiosk/components/BottomBar/index.d.ts
|
|
4
4
|
interface KioskBottomBarScalingProps extends ResponsiveScalingProps {
|
|
5
|
-
/** Scale at a container width of 1024px, in (0, 1].
|
|
5
|
+
/** Scale at a container width of 1024px, in (0, 1]. Omit to keep the bar at its fixed size. */
|
|
6
6
|
compactScale?: number;
|
|
7
7
|
}
|
|
8
8
|
interface KioskBottomBarProps extends KioskBottomBarScalingProps {
|
|
@@ -17,12 +17,13 @@ function KioskBackButton(_ref) {
|
|
|
17
17
|
return /* @__PURE__ */ react.default.createElement("button", require_objectSpread2._objectSpread2({ type: "button" }, props), /* @__PURE__ */ react.default.createElement(_ant_design_icons.ArrowLeftOutlined, { "aria-hidden": "true" }), /* @__PURE__ */ react.default.createElement("span", null, children));
|
|
18
18
|
}
|
|
19
19
|
function KioskBottomBar({ ariaLabel, leading, summary, trailing, enableResponsiveScaling = false, compactScale }) {
|
|
20
|
-
const
|
|
20
|
+
const scale = enableResponsiveScaling && compactScale !== void 0 && compactScale > 0 && compactScale <= 1 ? compactScale : void 0;
|
|
21
|
+
const barRef = require_useKioskBarLayout.useKioskBarLayout(scale);
|
|
21
22
|
return /* @__PURE__ */ react.default.createElement("footer", {
|
|
22
23
|
ref: barRef,
|
|
23
24
|
className: "pisell-kiosk-bottom-bar",
|
|
24
25
|
"aria-label": ariaLabel,
|
|
25
|
-
"data-responsive-scaling":
|
|
26
|
+
"data-responsive-scaling": scale !== void 0
|
|
26
27
|
}, hasBottomBarContent(leading) && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-bottom-bar__leading" }, leading), hasBottomBarContent(summary) && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-bottom-bar__summary" }, summary), hasBottomBarContent(trailing) && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-bottom-bar__trailing" }, trailing));
|
|
27
28
|
}
|
|
28
29
|
//#endregion
|
|
@@ -2,8 +2,7 @@ require("../../../../_virtual/_rolldown/runtime.js");
|
|
|
2
2
|
let react = require("react");
|
|
3
3
|
//#region src/components/kiosk/components/BottomBar/useKioskBarLayout.ts
|
|
4
4
|
const compactWidth = 1024;
|
|
5
|
-
|
|
6
|
-
function useKioskBarLayout(enableResponsiveScaling = false, compactScale = defaultCompactScale) {
|
|
5
|
+
function useKioskBarLayout(compactScale) {
|
|
7
6
|
const barRef = (0, react.useRef)(null);
|
|
8
7
|
(0, react.useLayoutEffect)(() => {
|
|
9
8
|
const bar = barRef.current;
|
|
@@ -20,11 +19,10 @@ function useKioskBarLayout(enableResponsiveScaling = false, compactScale = defau
|
|
|
20
19
|
else target.style.removeProperty(property);
|
|
21
20
|
});
|
|
22
21
|
setUnit(1);
|
|
23
|
-
if (
|
|
24
|
-
const scale = compactScale > 0 && compactScale <= 1 ? compactScale : defaultCompactScale;
|
|
22
|
+
if (compactScale === void 0 || !container) return restore;
|
|
25
23
|
const resize = (width) => {
|
|
26
24
|
if (width <= 0) return;
|
|
27
|
-
setUnit(width <= compactWidth ?
|
|
25
|
+
setUnit(width <= compactWidth ? compactScale * width / compactWidth : 1);
|
|
28
26
|
};
|
|
29
27
|
const measure = () => {
|
|
30
28
|
const style = window.getComputedStyle(container);
|
|
@@ -42,7 +40,7 @@ function useKioskBarLayout(enableResponsiveScaling = false, compactScale = defau
|
|
|
42
40
|
if (!observer) window.removeEventListener("resize", measure);
|
|
43
41
|
restore();
|
|
44
42
|
};
|
|
45
|
-
}, [
|
|
43
|
+
}, [compactScale]);
|
|
46
44
|
return barRef;
|
|
47
45
|
}
|
|
48
46
|
//#endregion
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
2
|
+
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
|
|
2
3
|
const require_index = require("../BottomBar/index.js");
|
|
3
4
|
let react = require("react");
|
|
4
5
|
react = require_runtime.__toESM(react);
|
|
5
6
|
let react_dom = require("react-dom");
|
|
6
7
|
//#region src/components/kiosk/components/Shell/KioskBottomBarHost.tsx
|
|
7
8
|
const RegistrationContext = (0, react.createContext)(null);
|
|
8
|
-
const DockContext = (0, react.createContext)(null);
|
|
9
|
+
const DockContext = (0, react.createContext)({ dock: null });
|
|
9
10
|
const SurfaceContext = (0, react.createContext)("page");
|
|
10
11
|
/** A retained background screen keeps its state while the foreground owns the dock. */
|
|
11
12
|
function KioskBottomBarScope({ active, overlay, children }) {
|
|
@@ -48,7 +49,7 @@ function hasSlots({ leading, summary, trailing }) {
|
|
|
48
49
|
].some(require_index.hasBottomBarContent);
|
|
49
50
|
}
|
|
50
51
|
function DockedBar(props) {
|
|
51
|
-
const dock = (0, react.useContext)(DockContext);
|
|
52
|
+
const { dock, bottomBarProps } = (0, react.useContext)(DockContext);
|
|
52
53
|
(0, react.useLayoutEffect)(() => {
|
|
53
54
|
const shell = dock === null || dock === void 0 ? void 0 : dock.parentElement;
|
|
54
55
|
if (!dock || !shell) return;
|
|
@@ -77,7 +78,7 @@ function DockedBar(props) {
|
|
|
77
78
|
shell.style.removeProperty("--pisell-kiosk-footer-clearance");
|
|
78
79
|
};
|
|
79
80
|
}, [dock]);
|
|
80
|
-
return /* @__PURE__ */ react.default.createElement(require_index.KioskBottomBar, props);
|
|
81
|
+
return /* @__PURE__ */ react.default.createElement(require_index.KioskBottomBar, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, bottomBarProps), props));
|
|
81
82
|
}
|
|
82
83
|
/** Register the active screen's slots with the shell. Pass null to release its bar. */
|
|
83
84
|
function useKioskBottomBar(declaration) {
|
|
@@ -90,10 +91,14 @@ function KioskSliceBottomBar(props) {
|
|
|
90
91
|
useRegisterBottomBar(hasSlots(props) ? outlet : null);
|
|
91
92
|
return target ? (0, react_dom.createPortal)(/* @__PURE__ */ react.default.createElement(DockedBar, props), target) : null;
|
|
92
93
|
}
|
|
93
|
-
function KioskBottomBarHost({ children }) {
|
|
94
|
+
function KioskBottomBarHost({ children, bottomBarProps }) {
|
|
94
95
|
const [active, setBar] = (0, react.useState)(null);
|
|
95
96
|
const [dock, setDock] = (0, react.useState)(null);
|
|
96
|
-
|
|
97
|
+
const dockContext = (0, react.useMemo)(() => ({
|
|
98
|
+
dock,
|
|
99
|
+
bottomBarProps
|
|
100
|
+
}), [dock, bottomBarProps]);
|
|
101
|
+
return /* @__PURE__ */ react.default.createElement(RegistrationContext.Provider, { value: setBar }, /* @__PURE__ */ react.default.createElement(DockContext.Provider, { value: dockContext }, children, /* @__PURE__ */ react.default.createElement("div", {
|
|
97
102
|
className: "pisell-kiosk-shell__footer",
|
|
98
103
|
ref: setDock,
|
|
99
104
|
"data-surface": active === null || active === void 0 ? void 0 : active.surface
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { KioskBottomBarScalingProps } from "../BottomBar/index.js";
|
|
1
2
|
import React from "react";
|
|
2
3
|
//#region src/components/kiosk/components/Shell/index.d.ts
|
|
3
4
|
type Props = React.HTMLAttributes<HTMLElement> & {
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
header?: React.ReactNode;
|
|
7
|
+
bottomBarProps?: KioskBottomBarScalingProps;
|
|
6
8
|
blocking?: boolean;
|
|
7
9
|
overlays?: React.ReactNode;
|
|
8
10
|
};
|
|
@@ -10,6 +12,7 @@ declare function KioskShell({
|
|
|
10
12
|
className,
|
|
11
13
|
children,
|
|
12
14
|
header,
|
|
15
|
+
bottomBarProps,
|
|
13
16
|
overlays,
|
|
14
17
|
blocking,
|
|
15
18
|
...props
|
|
@@ -11,12 +11,13 @@ const _excluded = [
|
|
|
11
11
|
"className",
|
|
12
12
|
"children",
|
|
13
13
|
"header",
|
|
14
|
+
"bottomBarProps",
|
|
14
15
|
"overlays",
|
|
15
16
|
"blocking"
|
|
16
17
|
];
|
|
17
18
|
function KioskShell(_ref) {
|
|
18
|
-
let { className, children, header, overlays, blocking } = _ref, props = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return /* @__PURE__ */ react.default.createElement("section", require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), {}, { className: ["pisell-kiosk-shell", className].filter(Boolean).join(" ") }), header && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-shell__header" }, header), /* @__PURE__ */ react.default.createElement(require_KioskBottomBarHost.KioskBottomBarHost,
|
|
19
|
+
let { className, children, header, bottomBarProps, overlays, blocking } = _ref, props = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return /* @__PURE__ */ react.default.createElement("section", require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), {}, { className: ["pisell-kiosk-shell", className].filter(Boolean).join(" ") }), header && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-shell__header" }, header), /* @__PURE__ */ react.default.createElement(require_KioskBottomBarHost.KioskBottomBarHost, { bottomBarProps }, /* @__PURE__ */ react.default.createElement("main", { className: "pisell-kiosk-shell__main" }, children), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-shell__overlays" }, overlays)), blocking && /* @__PURE__ */ react.default.createElement("div", {
|
|
20
21
|
className: "pisell-kiosk-shell__blocking",
|
|
21
22
|
role: "status",
|
|
22
23
|
"aria-busy": "true"
|