@pisell/private-materials 6.12.397 → 6.12.398
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/useBigSaleProductListConfig.js +0 -1
- 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/ticketBooking/components/addServiceVariant/addService.js +0 -1
- package/es/components/venueBookingSales/catalogPresentation.js +0 -1
- 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/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/DetailActions/index.less +3 -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/context/SalesSdkCartContext.js +8 -10
- package/es/plus/salesSdk/index.js +54 -0
- package/es/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +3 -3
- 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/skuOptionsSelection/utils/transformValueToSelectorValue.js +18 -11
- 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/compensatedPisellContainer/floatingLayer/index.js +11 -2
- package/es/pro/compensatedPisellContainer/floatingLayer/observeTransitions.js +25 -1
- package/es/pro/skuDetailModal/flow/SkuDetailSelectionFlowView.js +3 -2
- package/es/pro/skuDetailModal/flow/registry.d.ts +1 -1
- package/es/pro/skuDetailModal/index.js +8 -5
- package/lib/plus/saleDetail/components/DetailActions/index.less +3 -0
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +8 -10
- package/lib/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +3 -3
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +17 -10
- package/lib/pro/compensatedPisellContainer/floatingLayer/index.js +11 -2
- package/lib/pro/compensatedPisellContainer/floatingLayer/observeTransitions.js +25 -1
- package/lib/pro/skuDetailModal/flow/SkuDetailSelectionFlowView.js +3 -2
- package/lib/pro/skuDetailModal/flow/registry.d.ts +1 -1
- package/lib/pro/skuDetailModal/index.js +8 -5
- package/package.json +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +0 -3
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
+
import "../../../../plus/salesSdk/index.js";
|
|
3
4
|
import dayjs from "dayjs";
|
|
4
5
|
import { useCallback, useEffect, useState } from "react";
|
|
5
6
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -20,6 +20,7 @@ import { showAddToCartToast } from "../../../../plus/salesSdk/components/showAdd
|
|
|
20
20
|
import { mergeBookingsForDisplay } from "../../../../plus/salesSdk/utils/mergeBookingsForDisplay.js";
|
|
21
21
|
import useSalesSdkGlobalScanHandler from "../../../../plus/salesSdk/hooks/useSalesSdkGlobalScanHandler.js";
|
|
22
22
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
23
|
+
import "../../../../plus/salesSdk/index.js";
|
|
23
24
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
24
25
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
25
26
|
import { showSalesGuardErrorToast } from "../../../../plus/salesSdk/utils/salesGuard.js";
|
|
@@ -5,6 +5,7 @@ import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { setBookingTimeSelectionIntent } from "../../../../plus/salesSdk/utils/bookingTimeSelection.js";
|
|
7
7
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
+
import "../../../../plus/salesSdk/index.js";
|
|
8
9
|
import locales_default from "../../locales/index.js";
|
|
9
10
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
10
11
|
import dayjs from "dayjs";
|
|
@@ -6,6 +6,7 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
6
6
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
7
7
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
8
8
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
9
|
+
import "../../plus/salesSdk/index.js";
|
|
9
10
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
10
11
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
11
12
|
import BigSale from "./index.js";
|
|
@@ -4,6 +4,7 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
|
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
6
|
import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import { useMemo } from "react";
|
|
8
9
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
9
10
|
/**
|
|
@@ -2,7 +2,6 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import { generateProductTabs, sortProductsByTabOrder } from "../../ticketBooking/components/ProductDisplayAdapter/utils.js";
|
|
4
4
|
import { ProductDisplayPresets } from "../../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
5
|
-
import "../../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
6
5
|
import { mergeBigSaleProductListPreferences } from "../utils/productListPreferences.js";
|
|
7
6
|
import { useMemo, useRef } from "react";
|
|
8
7
|
import isEqual from "lodash/isEqual";
|
|
@@ -3,6 +3,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
3
3
|
import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from "../../../plus/salesSdk/utils/buildDefaultLoadProductsParams.js";
|
|
4
4
|
import { useSalesSdkUIHosts } from "../../../plus/salesSdk/context/SalesSdkUIHostsContext.js";
|
|
5
5
|
import { SalesSdkRootRefreshContext } from "../../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
6
|
+
import "../../../plus/salesSdk/index.js";
|
|
6
7
|
import { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
|
|
7
8
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
9
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
@@ -8,6 +8,7 @@ import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
|
8
8
|
import { useSalesSdkCustomer } from "../../plus/salesSdk/hooks/useSalesSdkCustomer.js";
|
|
9
9
|
import { SalesSdkProvider } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
10
10
|
import { SalesSdkBookingContextProvider } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
11
|
+
import "../../plus/salesSdk/index.js";
|
|
11
12
|
import { resolveKioskPlatformSource, resolveKioskPresentation } from "../kioskSale/resolveKioskPresentation.js";
|
|
12
13
|
import { resolveCustomerDetailAppearance } from "../../pro/skuDetailModal/customerDetailPolicy.js";
|
|
13
14
|
import { ResponsiveBigSaleBase } from "./Base.js";
|
|
@@ -13,6 +13,7 @@ import { useSalesSdkBusinessAvailability } from "../../../../plus/salesSdk/conte
|
|
|
13
13
|
import { collectUnassignedHolderLines } from "../../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
14
14
|
import { isFulfillmentTimingBooking } from "../../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
15
15
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
16
|
+
import "../../../../plus/salesSdk/index.js";
|
|
16
17
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
17
18
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
18
19
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -2,6 +2,7 @@ import useEngineContext from "../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
3
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { TEMP_ORDER_SYNC_REQUEST_MESSAGE_TYPE, getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
+
import "../../plus/salesSdk/index.js";
|
|
5
6
|
import { useEffect, useRef, useState } from "react";
|
|
6
7
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
|
7
8
|
function createRequestId() {
|
|
@@ -19,7 +19,6 @@ import { useProducts } from "../../hooks/pisellos/useProducts.js";
|
|
|
19
19
|
import { useService } from "../../../booking/info/service/serviceManager/index.js";
|
|
20
20
|
import ProductDisplayAdapter_default from "../ProductDisplayAdapter/ProductDisplayAdapter.js";
|
|
21
21
|
import { resolveProductDisplayConfig } from "../ProductDisplayAdapter/types.js";
|
|
22
|
-
import "../ProductDisplayAdapter/index.js";
|
|
23
22
|
import notAvailable_default from "../notAvailable/index.js";
|
|
24
23
|
import MultiDayTimeSelectModal from "./MultiDayTimeSelectModal.js";
|
|
25
24
|
import dayjs from "dayjs";
|
|
@@ -3,7 +3,6 @@ import index from "../../plus/productSelect/components/pisellPriceText/index.js"
|
|
|
3
3
|
import { resolveProductPricePresentation } from "../../plus/productSelect/pricing/pricePresentation.js";
|
|
4
4
|
import SettlementPriceList from "../../plus/multiCurrencySettlement/SettlementPriceList.js";
|
|
5
5
|
import { ProductDisplayPresets } from "../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
6
|
-
import "../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
7
6
|
import { DEFAULT_BIG_SALE_PRODUCT_LIST_PREFERENCES } from "../bigSale/utils/productListPreferences.js";
|
|
8
7
|
import { translate } from "../../plus/venueBookingDesign/i18n.js";
|
|
9
8
|
import { ProductCard as ProductCard$1 } from "../../plus/venueBookingDesign/shared/ProductCard.js";
|
|
@@ -6,6 +6,7 @@ import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkH
|
|
|
6
6
|
import { isVirtualSettlementTempOrder } from "../../../plus/multiCurrencySettlement/index.js";
|
|
7
7
|
import { freePayApi } from "../../Sales/Checkout/serve.js";
|
|
8
8
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
9
|
+
import "../../../plus/salesSdk/index.js";
|
|
9
10
|
import { isSalesOrderSubmitSuccess } from "../../../plus/saleDetail/components/DetailActions/utils.js";
|
|
10
11
|
import { isH5ZeroAmountValue, resolveKioskSubmittedPayableAmount, toFiniteKioskAmount } from "../../bigSale/templates/Kiosk/zeroAmountCheckout.js";
|
|
11
12
|
import { resolveKioskDeferredSubmission } from "../../bigSale/templates/Kiosk/deferredCheckout.js";
|
package/es/index.js
CHANGED
|
@@ -90,6 +90,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
90
90
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
91
91
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
92
92
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
93
|
+
import "./plus/salesSdk/index.js";
|
|
93
94
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
94
95
|
import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
|
|
95
96
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
@@ -153,6 +154,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
153
154
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
154
155
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
155
156
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
157
|
+
import "./plus/pisellReservation/index.js";
|
|
156
158
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
157
159
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
158
160
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
283
|
+
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";
|
|
@@ -1121,24 +1121,22 @@ const SalesSdkCartProvider = ({ children, normalProductDetailConfig, resourceIdF
|
|
|
1121
1121
|
const preparedSelection = (_options$calendarSele = options === null || options === void 0 ? void 0 : options.calendarSelection) !== null && _options$calendarSele !== void 0 ? _options$calendarSele : options === null || options === void 0 ? void 0 : options.rememberedSelection;
|
|
1122
1122
|
options === null || options === void 0 || (_options$memoryCommit = options.memoryCommitLifecycle) === null || _options$memoryCommit === void 0 || _options$memoryCommit.beforeCommit();
|
|
1123
1123
|
if (preparedSelection) {
|
|
1124
|
-
var _options$rememberedTi, _sales$salesModule, _options$
|
|
1124
|
+
var _options$rememberedTi, _sales$salesModule, _options$salesNotes2, _committed$validation, _options$memoryCommit2, _committed$tempOrder, _bookingTicket$getTem11;
|
|
1125
1125
|
options === null || options === void 0 || (_options$rememberedTi = options.rememberedTimeGuard) === null || _options$rememberedTi === void 0 || _options$rememberedTi.call(options);
|
|
1126
1126
|
if (!(sales === null || sales === void 0 || (_sales$salesModule = sales.salesModule) === null || _sales$salesModule === void 0 ? void 0 : _sales$salesModule.commitAvailabilitySelection)) throw new Error("The current sales module cannot validate the booking.");
|
|
1127
|
-
const committed = yield sales.salesModule.commitAvailabilitySelection(preparedSelection.contextId, _objectSpread2({
|
|
1127
|
+
const committed = yield sales.salesModule.commitAvailabilitySelection(preparedSelection.contextId, _objectSpread2(_objectSpread2({
|
|
1128
1128
|
mode: "add",
|
|
1129
1129
|
orderProduct: normalizeAvailabilityOrderProductForCommit(_objectSpread2(_objectSpread2(_objectSpread2({}, cacheItemForTransform), orderLine), {}, { _extend: cacheItemForTransform._extend })),
|
|
1130
1130
|
candidate: preparedSelection.candidate,
|
|
1131
1131
|
requirementSelections: preparedSelection.requirementSelections,
|
|
1132
1132
|
partySize: preparedSelection.partySize,
|
|
1133
1133
|
bookingCount: preparedSelection.bookingCount,
|
|
1134
|
-
selectionIntent: (options === null || options === void 0 ? void 0 : options.calendarSelection) ? "manual" : "remembered"
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
}
|
|
1141
|
-
}, (options === null || options === void 0 || (_options$salesNotes2 = options.salesNotes) === null || _options$salesNotes2 === void 0 ? void 0 : _options$salesNotes2.length) ? { salesNotes: options.salesNotes } : {}));
|
|
1134
|
+
selectionIntent: (options === null || options === void 0 ? void 0 : options.calendarSelection) ? "manual" : "remembered"
|
|
1135
|
+
}, !(options === null || options === void 0 ? void 0 : options.calendarSelection) && (options === null || options === void 0 ? void 0 : options.rememberedSelection) ? { orderSessionId: options.rememberedSelection.orderSessionId } : {}), {}, { availabilityCommitGuard: () => {
|
|
1136
|
+
var _options$rememberedTi2;
|
|
1137
|
+
assertBookingCurrent();
|
|
1138
|
+
options === null || options === void 0 || (_options$rememberedTi2 = options.rememberedTimeGuard) === null || _options$rememberedTi2 === void 0 || _options$rememberedTi2.call(options);
|
|
1139
|
+
} }, (options === null || options === void 0 || (_options$salesNotes2 = options.salesNotes) === null || _options$salesNotes2 === void 0 ? void 0 : _options$salesNotes2.length) ? { salesNotes: options.salesNotes } : {}));
|
|
1142
1140
|
if (((_committed$validation = committed.validation) === null || _committed$validation === void 0 ? void 0 : _committed$validation.ok) === false) throw Object.assign(/* @__PURE__ */ new Error((options === null || options === void 0 ? void 0 : options.calendarSelection) ? "The calendar booking could not be saved." : "The remembered time is no longer available."), { code: "REVALIDATION_FAILED" });
|
|
1143
1141
|
options === null || options === void 0 || (_options$memoryCommit2 = options.memoryCommitLifecycle) === null || _options$memoryCommit2 === void 0 || _options$memoryCommit2.onCommitted();
|
|
1144
1142
|
const products = ((_committed$tempOrder = committed.tempOrder) === null || _committed$tempOrder === void 0 ? void 0 : _committed$tempOrder.products) || ((_bookingTicket$getTem11 = bookingTicket.getTempOrder) === null || _bookingTicket$getTem11 === void 0 || (_bookingTicket$getTem11 = _bookingTicket$getTem11.call(bookingTicket)) === null || _bookingTicket$getTem11 === void 0 ? void 0 : _bookingTicket$getTem11.products) || [];
|
|
@@ -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 {};
|
|
@@ -425,14 +425,14 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig, resourceIdFro
|
|
|
425
425
|
};
|
|
426
426
|
const bookingPriceContextKey = JSON.stringify({
|
|
427
427
|
channel: productLoadChannel || "",
|
|
428
|
-
platform:
|
|
428
|
+
platform: pricingRuntimePlatform,
|
|
429
429
|
businessCode: businessCode || ""
|
|
430
430
|
});
|
|
431
431
|
const attachBookingPriceService = (options) => {
|
|
432
432
|
if (!usesUnifiedBookingSales) return;
|
|
433
433
|
selectionFlowServices = _objectSpread2(_objectSpread2({}, selectionFlowServices), {}, { bookingPrice: createBookingSelectionPriceService({
|
|
434
434
|
contextKey: bookingPriceContextKey,
|
|
435
|
-
runtimePlatform:
|
|
435
|
+
runtimePlatform: pricingRuntimePlatform,
|
|
436
436
|
channel: productLoadChannel,
|
|
437
437
|
initialSnapshot: options === null || options === void 0 ? void 0 : options.initialSnapshot,
|
|
438
438
|
pricingDuration: options === null || options === void 0 ? void 0 : options.pricingDuration,
|
|
@@ -854,7 +854,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig, resourceIdFro
|
|
|
854
854
|
booking: bookingPayload.booking || {},
|
|
855
855
|
customerId,
|
|
856
856
|
contextKey: bookingPriceContextKey,
|
|
857
|
-
runtimePlatform:
|
|
857
|
+
runtimePlatform: pricingRuntimePlatform,
|
|
858
858
|
quantity: Number(initialCacheItem === null || initialCacheItem === void 0 || (_initialCacheItem$_ex3 = initialCacheItem._extend) === null || _initialCacheItem$_ex3 === void 0 ? void 0 : _initialCacheItem$_ex3.quantity) || 1,
|
|
859
859
|
pricingDuration
|
|
860
860
|
}) : void 0
|
|
@@ -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,12 +1,13 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
-
import { isSkuRecordEnabled, isSkuRecordSellable } from "./skuSemantics.js";
|
|
2
|
+
import { isSkuRecordEnabled, isSkuRecordSellable, isWithinSkuBounds, parseSkuNumber } from "./skuSemantics.js";
|
|
3
3
|
import { hasOwnProductionCode, normalizeNonNegativeInteger, resolveProductionCode } from "./normalizers.js";
|
|
4
4
|
import Decimal from "decimal.js";
|
|
5
5
|
//#region src/plus/skuOptionsSelection/utils/transformValueToSelectorValue.ts
|
|
6
6
|
/** 接口详情与订单行可能分别返回 number/string,SKU 回填按业务 ID 比较。 */
|
|
7
7
|
const isSameId = (left, right) => left !== void 0 && left !== null && right !== void 0 && right !== null && String(left) === String(right);
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* 为唯一必选项或必须全选的固定套餐组补齐默认业务值。
|
|
10
|
+
* 仅初始化尚未选择的分组,所有默认项都必须可售且无内层配置。
|
|
10
11
|
* 同时返回本次补齐的分组 ID,供受控组件精确触发这些分组的校验。
|
|
11
12
|
*/
|
|
12
13
|
const resolveRequiredSoleBundleDefaults = (value, dataSource, options = {}) => {
|
|
@@ -19,23 +20,29 @@ const resolveRequiredSoleBundleDefaults = (value, dataSource, options = {}) => {
|
|
|
19
20
|
const defaults = [];
|
|
20
21
|
const defaultedGroupIds = [];
|
|
21
22
|
((dataSource === null || dataSource === void 0 ? void 0 : dataSource.bundle_group) || []).forEach((group) => {
|
|
22
|
-
var _item$option_group;
|
|
23
23
|
const minimum = normalizeNonNegativeInteger(group === null || group === void 0 ? void 0 : group.min_quantity, 0);
|
|
24
24
|
const items = Array.isArray(group === null || group === void 0 ? void 0 : group.bundle_item) ? group.bundle_item : [];
|
|
25
|
-
if (minimum <= 0 || items.length
|
|
25
|
+
if (minimum <= 0 || items.length === 0 || !isSkuRecordEnabled(group) || currentBundle.some((item) => {
|
|
26
26
|
var _item$group_id;
|
|
27
27
|
return isSameId((_item$group_id = item === null || item === void 0 ? void 0 : item.group_id) !== null && _item$group_id !== void 0 ? _item$group_id : item === null || item === void 0 ? void 0 : item.bundle_group_id, group === null || group === void 0 ? void 0 : group.id);
|
|
28
28
|
})) return;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
if (items.length === 1) {
|
|
30
|
+
var _item$option_group;
|
|
31
|
+
const [item] = items;
|
|
32
|
+
const maximums = [normalizeNonNegativeInteger(group === null || group === void 0 ? void 0 : group.max_quantity, 0), normalizeNonNegativeInteger(item === null || item === void 0 ? void 0 : item.max_quantity, 0)].filter((maximum) => maximum > 0);
|
|
33
|
+
if (minimum > (maximums.length ? Math.min(...maximums) : Infinity) || (item === null || item === void 0 || (_item$option_group = item.option_group) === null || _item$option_group === void 0 ? void 0 : _item$option_group.length) || !isSkuRecordSellable(item, { overSold: options.overSold })) return;
|
|
34
|
+
} else if (items.length !== minimum || !isWithinSkuBounds(minimum, group === null || group === void 0 ? void 0 : group.min_quantity, group === null || group === void 0 ? void 0 : group.max_quantity) || items.some((item) => {
|
|
35
|
+
var _item$option_group2;
|
|
36
|
+
return parseSkuNumber(item === null || item === void 0 ? void 0 : item.max_quantity) !== 1 || !isWithinSkuBounds(1, item === null || item === void 0 ? void 0 : item.min_quantity, item === null || item === void 0 ? void 0 : item.max_quantity) || (item === null || item === void 0 || (_item$option_group2 = item.option_group) === null || _item$option_group2 === void 0 ? void 0 : _item$option_group2.length) || !isSkuRecordSellable(item, { overSold: options.overSold });
|
|
37
|
+
})) return;
|
|
38
|
+
const quantity = items.length === 1 ? minimum : 1;
|
|
39
|
+
defaults.push(...items.map((item) => _objectSpread2(_objectSpread2({}, item || {}), {}, {
|
|
33
40
|
id: item === null || item === void 0 ? void 0 : item.id,
|
|
34
41
|
group_id: group === null || group === void 0 ? void 0 : group.id,
|
|
35
42
|
bundle_group_id: group === null || group === void 0 ? void 0 : group.id,
|
|
36
|
-
quantity
|
|
37
|
-
num:
|
|
38
|
-
}));
|
|
43
|
+
quantity,
|
|
44
|
+
num: quantity
|
|
45
|
+
})));
|
|
39
46
|
defaultedGroupIds.push(group === null || group === void 0 ? void 0 : group.id);
|
|
40
47
|
});
|
|
41
48
|
if (!defaults.length) return {
|
|
@@ -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 };
|
|
@@ -209,7 +209,7 @@ const getLegacyModalClass = (mode, suffix) => {
|
|
|
209
209
|
};
|
|
210
210
|
const TransformFloatingLayer = (props) => {
|
|
211
211
|
var _ref;
|
|
212
|
-
const { afterOpenChange, autoHideHeaderFooterOnScroll = false, bodyStyle, cancelButtonProps, cancelText = "Cancel", centered, children, className, classNames: layerClassNames, closeIcon, closable = true, confirmLoading, contentWrapperStyle, destroyOnClose, extra, footer, footerStyle, getContainer: customGetContainer, headerStyle, height, keyboard = true, mask = true, maskClosable = true, mode = "drawer", modalRender, okButtonProps, okText = "OK", onCancel, onClose, onOk, open, placement: rawPlacement, rootClassName, rootStyle, skipEnterMotion = false, size, style, styles, title, visible, width, wrapClassName, zIndex } = props;
|
|
212
|
+
const { afterEnterStart, afterOpenChange, autoHideHeaderFooterOnScroll = false, bodyStyle, cancelButtonProps, cancelText = "Cancel", centered, children, className, classNames: layerClassNames, closeIcon, closable = true, confirmLoading, contentWrapperStyle, destroyOnClose, extra, footer, footerStyle, getContainer: customGetContainer, headerStyle, height, keyboard = true, mask = true, maskClosable = true, mode = "drawer", modalRender, okButtonProps, okText = "OK", onCancel, onClose, onOk, open, placement: rawPlacement, rootClassName, rootStyle, skipEnterMotion = false, size, style, styles, title, visible, width, wrapClassName, zIndex } = props;
|
|
213
213
|
const placement = rawPlacement || (mode === "modal" ? "bottom" : "right");
|
|
214
214
|
const mergedOpen = Boolean(open !== null && open !== void 0 ? open : visible);
|
|
215
215
|
const showCloseButton = closable && closeIcon !== false;
|
|
@@ -253,10 +253,12 @@ const TransformFloatingLayer = (props) => {
|
|
|
253
253
|
const hasSettledHiddenRef = useRef(false);
|
|
254
254
|
const motionRunRef = useRef(0);
|
|
255
255
|
const motionOptionsRef = useRef({
|
|
256
|
+
afterEnterStart,
|
|
256
257
|
afterOpenChange,
|
|
257
258
|
shouldDestroyOnClose
|
|
258
259
|
});
|
|
259
260
|
motionOptionsRef.current = {
|
|
261
|
+
afterEnterStart,
|
|
260
262
|
afterOpenChange,
|
|
261
263
|
shouldDestroyOnClose
|
|
262
264
|
};
|
|
@@ -315,7 +317,14 @@ const TransformFloatingLayer = (props) => {
|
|
|
315
317
|
if (motionOptionsRef.current.shouldDestroyOnClose) setRendered(false);
|
|
316
318
|
}
|
|
317
319
|
(_motionOptionsRef$cur = (_motionOptionsRef$cur2 = motionOptionsRef.current).afterOpenChange) === null || _motionOptionsRef$cur === void 0 || _motionOptionsRef$cur.call(_motionOptionsRef$cur2, motion.open);
|
|
318
|
-
}
|
|
320
|
+
}, motion.open && wrapperRef.current ? {
|
|
321
|
+
element: wrapperRef.current,
|
|
322
|
+
onStarted: () => {
|
|
323
|
+
var _motionOptionsRef$cur3, _motionOptionsRef$cur4;
|
|
324
|
+
if (motion.id !== motionRunRef.current) return;
|
|
325
|
+
(_motionOptionsRef$cur3 = (_motionOptionsRef$cur4 = motionOptionsRef.current).afterEnterStart) === null || _motionOptionsRef$cur3 === void 0 || _motionOptionsRef$cur3.call(_motionOptionsRef$cur4);
|
|
326
|
+
}
|
|
327
|
+
} : void 0);
|
|
319
328
|
}, [motion, mergedOpen]);
|
|
320
329
|
useEffect(() => {
|
|
321
330
|
if (!mergedOpen || keyboard === false || typeof window === "undefined") return;
|
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
//#region src/pro/compensatedPisellContainer/floatingLayer/observeTransitions.ts
|
|
2
2
|
/** Observe only the shell's own transitions, never animations inside its content. */
|
|
3
|
-
const observeTransitions = (elements, onSettled) => {
|
|
3
|
+
const observeTransitions = (elements, onSettled, start) => {
|
|
4
4
|
let disposed = false;
|
|
5
5
|
let frame;
|
|
6
|
+
let startFrame;
|
|
7
|
+
let started = false;
|
|
6
8
|
const pendingEvents = /* @__PURE__ */ new Map();
|
|
7
9
|
const supportsAnimations = elements.every((element) => typeof element.getAnimations === "function");
|
|
8
10
|
const isMotionProperty = (property) => property === "opacity" || property === "transform";
|
|
11
|
+
const reportStart = () => {
|
|
12
|
+
if (disposed || started) return;
|
|
13
|
+
started = true;
|
|
14
|
+
if (startFrame !== void 0) cancelAnimationFrame(startFrame);
|
|
15
|
+
startFrame = void 0;
|
|
16
|
+
start === null || start === void 0 || start.onStarted();
|
|
17
|
+
};
|
|
18
|
+
const handleStart = (event) => {
|
|
19
|
+
const transition = event;
|
|
20
|
+
if (disposed || started || startFrame !== void 0 || event.target !== (start === null || start === void 0 ? void 0 : start.element) || !isMotionProperty(transition.propertyName)) return;
|
|
21
|
+
startFrame = requestAnimationFrame(() => {
|
|
22
|
+
startFrame = requestAnimationFrame(() => {
|
|
23
|
+
startFrame = void 0;
|
|
24
|
+
reportStart();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
};
|
|
9
28
|
const check = () => {
|
|
10
29
|
if (disposed) return;
|
|
11
30
|
if (supportsAnimations) {
|
|
@@ -18,6 +37,8 @@ const observeTransitions = (elements, onSettled) => {
|
|
|
18
37
|
return;
|
|
19
38
|
}
|
|
20
39
|
} else if ([...pendingEvents.values()].some((properties) => properties.size)) return;
|
|
40
|
+
reportStart();
|
|
41
|
+
if (disposed) return;
|
|
21
42
|
disposed = true;
|
|
22
43
|
removeListeners();
|
|
23
44
|
onSettled();
|
|
@@ -38,12 +59,14 @@ const observeTransitions = (elements, onSettled) => {
|
|
|
38
59
|
}
|
|
39
60
|
};
|
|
40
61
|
const removeListeners = () => {
|
|
62
|
+
start === null || start === void 0 || start.element.removeEventListener("transitionstart", handleStart);
|
|
41
63
|
elements.forEach((element) => {
|
|
42
64
|
element.removeEventListener("transitionrun", handleTransition);
|
|
43
65
|
element.removeEventListener("transitionend", handleTransition);
|
|
44
66
|
element.removeEventListener("transitioncancel", handleTransition);
|
|
45
67
|
});
|
|
46
68
|
};
|
|
69
|
+
start === null || start === void 0 || start.element.addEventListener("transitionstart", handleStart);
|
|
47
70
|
elements.forEach((element) => {
|
|
48
71
|
pendingEvents.set(element, /* @__PURE__ */ new Set());
|
|
49
72
|
if (!supportsAnimations) {
|
|
@@ -58,6 +81,7 @@ const observeTransitions = (elements, onSettled) => {
|
|
|
58
81
|
return () => {
|
|
59
82
|
disposed = true;
|
|
60
83
|
if (frame !== void 0) cancelAnimationFrame(frame);
|
|
84
|
+
if (startFrame !== void 0) cancelAnimationFrame(startFrame);
|
|
61
85
|
removeListeners();
|
|
62
86
|
};
|
|
63
87
|
};
|